]> code.delx.au - gnu-emacs/blob - autogen/configure
* src/keyboard.c (input-decode-map, key-translation-map): Doc fixes.
[gnu-emacs] / 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.2.93.
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.2.93'
553 PACKAGE_STRING='emacs 24.2.93'
554 PACKAGE_BUGREPORT=''
555 PACKAGE_URL=''
556
557 ac_unique_file="src/lisp.h"
558 # Factoring default headers for most tests.
559 ac_includes_default="\
560 #include <stdio.h>
561 #ifdef HAVE_SYS_TYPES_H
562 # include <sys/types.h>
563 #endif
564 #ifdef HAVE_SYS_STAT_H
565 # include <sys/stat.h>
566 #endif
567 #ifdef STDC_HEADERS
568 # include <stdlib.h>
569 # include <stddef.h>
570 #else
571 # ifdef HAVE_STDLIB_H
572 # include <stdlib.h>
573 # endif
574 #endif
575 #ifdef HAVE_STRING_H
576 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
577 # include <memory.h>
578 # endif
579 # include <string.h>
580 #endif
581 #ifdef HAVE_STRINGS_H
582 # include <strings.h>
583 #endif
584 #ifdef HAVE_INTTYPES_H
585 # include <inttypes.h>
586 #endif
587 #ifdef HAVE_STDINT_H
588 # include <stdint.h>
589 #endif
590 #ifdef HAVE_UNISTD_H
591 # include <unistd.h>
592 #endif"
593
594 ac_header_list=
595 ac_func_list=
596 gl_getopt_required=POSIX
597 gl_getopt_required=POSIX
598 ac_subst_vars='gltests_LTLIBOBJS
599 gltests_LIBOBJS
600 gl_LTLIBOBJS
601 gl_LIBOBJS
602 am__EXEEXT_FALSE
603 am__EXEEXT_TRUE
604 LTLIBOBJS
605 LIBOBJS
606 SUBDIR_MAKEFILES_IN
607 WINDOW_SYSTEM_OBJ
608 LIB_GCC
609 LD_FIRSTFLAG
610 LD_SWITCH_SYSTEM_TEMACS
611 LIBGNU_LTLIBDEPS
612 LIBGNU_LIBDEPS
613 gltests_WITNESS
614 gl_GNULIB_ENABLED_verify_FALSE
615 gl_GNULIB_ENABLED_verify_TRUE
616 gl_GNULIB_ENABLED_strtoull_FALSE
617 gl_GNULIB_ENABLED_strtoull_TRUE
618 gl_GNULIB_ENABLED_strtoll_FALSE
619 gl_GNULIB_ENABLED_strtoll_TRUE
620 gl_GNULIB_ENABLED_stat_FALSE
621 gl_GNULIB_ENABLED_stat_TRUE
622 gl_GNULIB_ENABLED_pathmax_FALSE
623 gl_GNULIB_ENABLED_pathmax_TRUE
624 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE
625 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE
626 gl_GNULIB_ENABLED_dosname_FALSE
627 gl_GNULIB_ENABLED_dosname_TRUE
628 LTLIBINTL
629 LIBINTL
630 WINDOWS_64_BIT_OFF_T
631 HAVE_UNISTD_H
632 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
633 NEXT_UNISTD_H
634 LIB_TIMER_TIME
635 PTHREAD_H_DEFINES_STRUCT_TIMESPEC
636 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
637 TIME_H_DEFINES_STRUCT_TIMESPEC
638 NEXT_AS_FIRST_DIRECTIVE_TIME_H
639 NEXT_TIME_H
640 WINDOWS_64_BIT_ST_SIZE
641 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
642 NEXT_SYS_STAT_H
643 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
644 NEXT_STDLIB_H
645 NEXT_AS_FIRST_DIRECTIVE_STDIO_H
646 NEXT_STDIO_H
647 REPLACE_VSPRINTF
648 REPLACE_VSNPRINTF
649 REPLACE_VPRINTF
650 REPLACE_VFPRINTF
651 REPLACE_VDPRINTF
652 REPLACE_VASPRINTF
653 REPLACE_TMPFILE
654 REPLACE_STDIO_WRITE_FUNCS
655 REPLACE_STDIO_READ_FUNCS
656 REPLACE_SPRINTF
657 REPLACE_SNPRINTF
658 REPLACE_RENAMEAT
659 REPLACE_RENAME
660 REPLACE_REMOVE
661 REPLACE_PRINTF
662 REPLACE_POPEN
663 REPLACE_PERROR
664 REPLACE_OBSTACK_PRINTF
665 REPLACE_GETLINE
666 REPLACE_GETDELIM
667 REPLACE_FTELLO
668 REPLACE_FTELL
669 REPLACE_FSEEKO
670 REPLACE_FSEEK
671 REPLACE_FREOPEN
672 REPLACE_FPURGE
673 REPLACE_FPRINTF
674 REPLACE_FOPEN
675 REPLACE_FFLUSH
676 REPLACE_FDOPEN
677 REPLACE_FCLOSE
678 REPLACE_DPRINTF
679 HAVE_VDPRINTF
680 HAVE_VASPRINTF
681 HAVE_RENAMEAT
682 HAVE_POPEN
683 HAVE_PCLOSE
684 HAVE_FTELLO
685 HAVE_FSEEKO
686 HAVE_DPRINTF
687 HAVE_DECL_VSNPRINTF
688 HAVE_DECL_SNPRINTF
689 HAVE_DECL_OBSTACK_PRINTF
690 HAVE_DECL_GETLINE
691 HAVE_DECL_GETDELIM
692 HAVE_DECL_FTELLO
693 HAVE_DECL_FSEEKO
694 HAVE_DECL_FPURGE
695 GNULIB_VSPRINTF_POSIX
696 GNULIB_VSNPRINTF
697 GNULIB_VPRINTF_POSIX
698 GNULIB_VPRINTF
699 GNULIB_VFPRINTF_POSIX
700 GNULIB_VFPRINTF
701 GNULIB_VDPRINTF
702 GNULIB_VSCANF
703 GNULIB_VFSCANF
704 GNULIB_VASPRINTF
705 GNULIB_TMPFILE
706 GNULIB_STDIO_H_SIGPIPE
707 GNULIB_STDIO_H_NONBLOCKING
708 GNULIB_SPRINTF_POSIX
709 GNULIB_SNPRINTF
710 GNULIB_SCANF
711 GNULIB_RENAMEAT
712 GNULIB_RENAME
713 GNULIB_REMOVE
714 GNULIB_PUTS
715 GNULIB_PUTCHAR
716 GNULIB_PUTC
717 GNULIB_PRINTF_POSIX
718 GNULIB_PRINTF
719 GNULIB_POPEN
720 GNULIB_PERROR
721 GNULIB_PCLOSE
722 GNULIB_OBSTACK_PRINTF_POSIX
723 GNULIB_OBSTACK_PRINTF
724 GNULIB_GETLINE
725 GNULIB_GETDELIM
726 GNULIB_GETCHAR
727 GNULIB_GETC
728 GNULIB_FWRITE
729 GNULIB_FTELLO
730 GNULIB_FTELL
731 GNULIB_FSEEKO
732 GNULIB_FSEEK
733 GNULIB_FSCANF
734 GNULIB_FREOPEN
735 GNULIB_FREAD
736 GNULIB_FPUTS
737 GNULIB_FPUTC
738 GNULIB_FPURGE
739 GNULIB_FPRINTF_POSIX
740 GNULIB_FPRINTF
741 GNULIB_FOPEN
742 GNULIB_FGETS
743 GNULIB_FGETC
744 GNULIB_FFLUSH
745 GNULIB_FDOPEN
746 GNULIB_FCLOSE
747 GNULIB_DPRINTF
748 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
749 NEXT_STDDEF_H
750 GL_GENERATE_STDDEF_H_FALSE
751 GL_GENERATE_STDDEF_H_TRUE
752 STDDEF_H
753 HAVE_WCHAR_T
754 REPLACE_NULL
755 HAVE__BOOL
756 GL_GENERATE_STDBOOL_H_FALSE
757 GL_GENERATE_STDBOOL_H_TRUE
758 STDBOOL_H
759 GL_GENERATE_STDARG_H_FALSE
760 GL_GENERATE_STDARG_H_TRUE
761 STDARG_H
762 NEXT_AS_FIRST_DIRECTIVE_STDARG_H
763 NEXT_STDARG_H
764 GL_GENERATE_STDALIGN_H_FALSE
765 GL_GENERATE_STDALIGN_H_TRUE
766 STDALIGN_H
767 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H
768 NEXT_SIGNAL_H
769 LIB_PTHREAD_SIGMASK
770 REPLACE_RAISE
771 REPLACE_PTHREAD_SIGMASK
772 HAVE_SIGHANDLER_T
773 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T
774 HAVE_STRUCT_SIGACTION_SA_SIGACTION
775 HAVE_SIGACTION
776 HAVE_SIGINFO_T
777 HAVE_SIGSET_T
778 HAVE_RAISE
779 HAVE_PTHREAD_SIGMASK
780 HAVE_POSIX_SIGNALBLOCKING
781 GNULIB_SIGACTION
782 GNULIB_SIGPROCMASK
783 GNULIB_SIGNAL_H_SIGPIPE
784 GNULIB_RAISE
785 GNULIB_PTHREAD_SIGMASK
786 HAVE_SYS_SELECT_H
787 NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H
788 NEXT_SYS_SELECT_H
789 REPLACE_SELECT
790 REPLACE_PSELECT
791 HAVE_PSELECT
792 GNULIB_SELECT
793 GNULIB_PSELECT
794 REPLACE_TIMEGM
795 REPLACE_NANOSLEEP
796 REPLACE_MKTIME
797 REPLACE_LOCALTIME_R
798 HAVE_TIMEGM
799 HAVE_STRPTIME
800 HAVE_NANOSLEEP
801 HAVE_DECL_LOCALTIME_R
802 GNULIB_TIME_R
803 GNULIB_TIMEGM
804 GNULIB_STRPTIME
805 GNULIB_NANOSLEEP
806 GNULIB_MKTIME
807 REPLACE_UTIMENSAT
808 REPLACE_STAT
809 REPLACE_MKNOD
810 REPLACE_MKFIFO
811 REPLACE_MKDIR
812 REPLACE_LSTAT
813 REPLACE_FUTIMENS
814 REPLACE_FSTATAT
815 REPLACE_FSTAT
816 HAVE_UTIMENSAT
817 HAVE_MKNODAT
818 HAVE_MKNOD
819 HAVE_MKFIFOAT
820 HAVE_MKFIFO
821 HAVE_MKDIRAT
822 HAVE_LSTAT
823 HAVE_LCHMOD
824 HAVE_FUTIMENS
825 HAVE_FSTATAT
826 HAVE_FCHMODAT
827 GNULIB_UTIMENSAT
828 GNULIB_STAT
829 GNULIB_MKNODAT
830 GNULIB_MKNOD
831 GNULIB_MKFIFOAT
832 GNULIB_MKFIFO
833 GNULIB_MKDIRAT
834 GNULIB_LSTAT
835 GNULIB_LCHMOD
836 GNULIB_FUTIMENS
837 GNULIB_FSTATAT
838 GNULIB_FSTAT
839 GNULIB_FCHMODAT
840 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H
841 NEXT_INTTYPES_H
842 UINT64_MAX_EQ_ULONG_MAX
843 UINT32_MAX_LT_UINTMAX_MAX
844 PRIPTR_PREFIX
845 PRI_MACROS_BROKEN
846 INT64_MAX_EQ_LONG_MAX
847 INT32_MAX_LT_INTMAX_MAX
848 REPLACE_STRTOIMAX
849 HAVE_DECL_STRTOUMAX
850 HAVE_DECL_STRTOIMAX
851 HAVE_DECL_IMAXDIV
852 HAVE_DECL_IMAXABS
853 GNULIB_STRTOUMAX
854 GNULIB_STRTOIMAX
855 GNULIB_IMAXDIV
856 GNULIB_IMAXABS
857 GL_GENERATE_STDINT_H_FALSE
858 GL_GENERATE_STDINT_H_TRUE
859 STDINT_H
860 WINT_T_SUFFIX
861 WCHAR_T_SUFFIX
862 SIG_ATOMIC_T_SUFFIX
863 SIZE_T_SUFFIX
864 PTRDIFF_T_SUFFIX
865 HAVE_SIGNED_WINT_T
866 HAVE_SIGNED_WCHAR_T
867 HAVE_SIGNED_SIG_ATOMIC_T
868 BITSIZEOF_WINT_T
869 BITSIZEOF_WCHAR_T
870 BITSIZEOF_SIG_ATOMIC_T
871 BITSIZEOF_SIZE_T
872 BITSIZEOF_PTRDIFF_T
873 APPLE_UNIVERSAL_BUILD
874 HAVE_SYS_BITYPES_H
875 HAVE_SYS_INTTYPES_H
876 HAVE_STDINT_H
877 NEXT_AS_FIRST_DIRECTIVE_STDINT_H
878 NEXT_STDINT_H
879 HAVE_SYS_TYPES_H
880 HAVE_INTTYPES_H
881 HAVE_WCHAR_H
882 HAVE_UNSIGNED_LONG_LONG_INT
883 HAVE_LONG_LONG_INT
884 HAVE_WINSOCK2_H
885 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
886 NEXT_SYS_TIME_H
887 REPLACE_STRUCT_TIMEVAL
888 REPLACE_GETTIMEOFDAY
889 HAVE_SYS_TIME_H
890 HAVE_STRUCT_TIMEVAL
891 HAVE_GETTIMEOFDAY
892 GNULIB_GETTIMEOFDAY
893 GNULIB_GL_UNISTD_H_GETOPT
894 GETOPT_H
895 HAVE_GETOPT_H
896 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H
897 NEXT_GETOPT_H
898 PRAGMA_COLUMNS
899 PRAGMA_SYSTEM_HEADER
900 INCLUDE_NEXT_AS_FIRST_DIRECTIVE
901 INCLUDE_NEXT
902 GETLOADAVG_LIBS
903 REPLACE_WCTOMB
904 REPLACE_UNSETENV
905 REPLACE_STRTOD
906 REPLACE_SETENV
907 REPLACE_REALPATH
908 REPLACE_REALLOC
909 REPLACE_RANDOM_R
910 REPLACE_PUTENV
911 REPLACE_PTSNAME_R
912 REPLACE_PTSNAME
913 REPLACE_MKSTEMP
914 REPLACE_MBTOWC
915 REPLACE_MALLOC
916 REPLACE_CANONICALIZE_FILE_NAME
917 REPLACE_CALLOC
918 HAVE_DECL_UNSETENV
919 HAVE_UNLOCKPT
920 HAVE_SYS_LOADAVG_H
921 HAVE_STRUCT_RANDOM_DATA
922 HAVE_STRTOULL
923 HAVE_STRTOLL
924 HAVE_STRTOD
925 HAVE_DECL_SETENV
926 HAVE_SETENV
927 HAVE_RPMATCH
928 HAVE_REALPATH
929 HAVE_RANDOM_R
930 HAVE_RANDOM_H
931 HAVE_RANDOM
932 HAVE_PTSNAME_R
933 HAVE_PTSNAME
934 HAVE_POSIX_OPENPT
935 HAVE_MKSTEMPS
936 HAVE_MKSTEMP
937 HAVE_MKOSTEMPS
938 HAVE_MKOSTEMP
939 HAVE_MKDTEMP
940 HAVE_GRANTPT
941 HAVE_GETSUBOPT
942 HAVE_DECL_GETLOADAVG
943 HAVE_CANONICALIZE_FILE_NAME
944 HAVE_ATOLL
945 HAVE__EXIT
946 GNULIB_WCTOMB
947 GNULIB_UNSETENV
948 GNULIB_UNLOCKPT
949 GNULIB_SYSTEM_POSIX
950 GNULIB_STRTOULL
951 GNULIB_STRTOLL
952 GNULIB_STRTOD
953 GNULIB_SETENV
954 GNULIB_RPMATCH
955 GNULIB_REALPATH
956 GNULIB_REALLOC_POSIX
957 GNULIB_RANDOM_R
958 GNULIB_RANDOM
959 GNULIB_PUTENV
960 GNULIB_PTSNAME_R
961 GNULIB_PTSNAME
962 GNULIB_POSIX_OPENPT
963 GNULIB_MKSTEMPS
964 GNULIB_MKSTEMP
965 GNULIB_MKOSTEMPS
966 GNULIB_MKOSTEMP
967 GNULIB_MKDTEMP
968 GNULIB_MBTOWC
969 GNULIB_MALLOC_POSIX
970 GNULIB_GRANTPT
971 GNULIB_GETSUBOPT
972 GNULIB_GETLOADAVG
973 GNULIB_CANONICALIZE_FILE_NAME
974 GNULIB_CALLOC_POSIX
975 GNULIB_ATOLL
976 GNULIB__EXIT
977 GL_GENERATE_EXECINFO_H_FALSE
978 GL_GENERATE_EXECINFO_H_TRUE
979 LIB_EXECINFO
980 EXECINFO_H
981 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
982 UNISTD_H_HAVE_WINSOCK2_H
983 REPLACE_WRITE
984 REPLACE_USLEEP
985 REPLACE_UNLINKAT
986 REPLACE_UNLINK
987 REPLACE_TTYNAME_R
988 REPLACE_SYMLINK
989 REPLACE_SLEEP
990 REPLACE_RMDIR
991 REPLACE_READLINK
992 REPLACE_READ
993 REPLACE_PWRITE
994 REPLACE_PREAD
995 REPLACE_LSEEK
996 REPLACE_LINKAT
997 REPLACE_LINK
998 REPLACE_LCHOWN
999 REPLACE_ISATTY
1000 REPLACE_GETPAGESIZE
1001 REPLACE_GETGROUPS
1002 REPLACE_GETLOGIN_R
1003 REPLACE_GETDOMAINNAME
1004 REPLACE_GETCWD
1005 REPLACE_FTRUNCATE
1006 REPLACE_FCHOWNAT
1007 REPLACE_DUP2
1008 REPLACE_DUP
1009 REPLACE_CLOSE
1010 REPLACE_CHOWN
1011 HAVE_SYS_PARAM_H
1012 HAVE_OS_H
1013 HAVE_DECL_TTYNAME_R
1014 HAVE_DECL_SETHOSTNAME
1015 HAVE_DECL_GETUSERSHELL
1016 HAVE_DECL_GETPAGESIZE
1017 HAVE_DECL_GETLOGIN_R
1018 HAVE_DECL_GETDOMAINNAME
1019 HAVE_DECL_FDATASYNC
1020 HAVE_DECL_FCHDIR
1021 HAVE_DECL_ENVIRON
1022 HAVE_USLEEP
1023 HAVE_UNLINKAT
1024 HAVE_SYMLINKAT
1025 HAVE_SYMLINK
1026 HAVE_SLEEP
1027 HAVE_SETHOSTNAME
1028 HAVE_READLINKAT
1029 HAVE_READLINK
1030 HAVE_PWRITE
1031 HAVE_PREAD
1032 HAVE_PIPE2
1033 HAVE_PIPE
1034 HAVE_LINKAT
1035 HAVE_LINK
1036 HAVE_LCHOWN
1037 HAVE_GROUP_MEMBER
1038 HAVE_GETPAGESIZE
1039 HAVE_GETLOGIN
1040 HAVE_GETHOSTNAME
1041 HAVE_GETGROUPS
1042 HAVE_GETDTABLESIZE
1043 HAVE_FTRUNCATE
1044 HAVE_FSYNC
1045 HAVE_FDATASYNC
1046 HAVE_FCHOWNAT
1047 HAVE_FCHDIR
1048 HAVE_FACCESSAT
1049 HAVE_EUIDACCESS
1050 HAVE_DUP3
1051 HAVE_DUP2
1052 HAVE_CHOWN
1053 GNULIB_WRITE
1054 GNULIB_USLEEP
1055 GNULIB_UNLINKAT
1056 GNULIB_UNLINK
1057 GNULIB_UNISTD_H_SIGPIPE
1058 GNULIB_UNISTD_H_NONBLOCKING
1059 GNULIB_TTYNAME_R
1060 GNULIB_SYMLINKAT
1061 GNULIB_SYMLINK
1062 GNULIB_SLEEP
1063 GNULIB_SETHOSTNAME
1064 GNULIB_RMDIR
1065 GNULIB_READLINKAT
1066 GNULIB_READLINK
1067 GNULIB_READ
1068 GNULIB_PWRITE
1069 GNULIB_PREAD
1070 GNULIB_PIPE2
1071 GNULIB_PIPE
1072 GNULIB_LSEEK
1073 GNULIB_LINKAT
1074 GNULIB_LINK
1075 GNULIB_LCHOWN
1076 GNULIB_ISATTY
1077 GNULIB_GROUP_MEMBER
1078 GNULIB_GETUSERSHELL
1079 GNULIB_GETPAGESIZE
1080 GNULIB_GETLOGIN_R
1081 GNULIB_GETLOGIN
1082 GNULIB_GETHOSTNAME
1083 GNULIB_GETGROUPS
1084 GNULIB_GETDTABLESIZE
1085 GNULIB_GETDOMAINNAME
1086 GNULIB_GETCWD
1087 GNULIB_FTRUNCATE
1088 GNULIB_FSYNC
1089 GNULIB_FDATASYNC
1090 GNULIB_FCHOWNAT
1091 GNULIB_FCHDIR
1092 GNULIB_FACCESSAT
1093 GNULIB_EUIDACCESS
1094 GNULIB_ENVIRON
1095 GNULIB_DUP3
1096 GNULIB_DUP2
1097 GNULIB_DUP
1098 GNULIB_CLOSE
1099 GNULIB_CHOWN
1100 GNULIB_CHDIR
1101 LIB_CLOCK_GETTIME
1102 GL_GENERATE_ALLOCA_H_FALSE
1103 GL_GENERATE_ALLOCA_H_TRUE
1104 ALLOCA_H
1105 ALLOCA
1106 GL_COND_LIBTOOL_FALSE
1107 GL_COND_LIBTOOL_TRUE
1108 POST_ALLOC_OBJ
1109 PRE_ALLOC_OBJ
1110 CYGWIN_OBJ
1111 RALLOC_OBJ
1112 OLDXMENU_DEPS
1113 LIBX_OTHER
1114 LIBXMENU
1115 OLDXMENU
1116 OLDXMENU_TARGET
1117 LIBXT_OTHER
1118 TOOLKIT_LIBW
1119 WIDGET_OBJ
1120 XOBJ
1121 XMENU_OBJ
1122 FONT_OBJ
1123 OTHER_FILES
1124 GNU_OBJC_CFLAGS
1125 ns_appsrc
1126 ns_appresdir
1127 ns_appbindir
1128 ns_appdir
1129 X_TOOLKIT_TYPE
1130 GNUSTEP_CFLAGS
1131 C_SWITCH_X_SITE
1132 LD_SWITCH_X_SITE
1133 gameuser
1134 gamedir
1135 bitmapdir
1136 archlibdir
1137 etcdir
1138 x_default_search_path
1139 lisppath
1140 locallisppath
1141 standardlisppath
1142 leimdir
1143 lispdir
1144 srcdir
1145 canonical
1146 configuration
1147 version
1148 copyright
1149 KRB4LIB
1150 DESLIB
1151 KRB5LIB
1152 CRYPTOLIB
1153 COM_ERRLIB
1154 LIBRESOLV
1155 LIBHESIOD
1156 TERMCAP_OBJ
1157 LIBS_TERMCAP
1158 BLESSMAIL_TARGET
1159 LIBS_MAIL
1160 liblockfile
1161 LIBXML2_LIBS
1162 LIBXML2_CFLAGS
1163 LIBXSM
1164 LIBGPM
1165 LIBGIF
1166 LIBTIFF
1167 LIBPNG
1168 LIBJPEG
1169 LIBXPM
1170 M17N_FLT_LIBS
1171 M17N_FLT_CFLAGS
1172 LIBOTF_LIBS
1173 LIBOTF_CFLAGS
1174 FREETYPE_LIBS
1175 FREETYPE_CFLAGS
1176 XFT_LIBS
1177 XFT_CFLAGS
1178 FONTCONFIG_LIBS
1179 FONTCONFIG_CFLAGS
1180 LIBXMU
1181 LIBXTR6
1182 LIBGNUTLS_LIBS
1183 LIBGNUTLS_CFLAGS
1184 LIBSELINUX_LIBS
1185 SETTINGS_LIBS
1186 SETTINGS_CFLAGS
1187 GOBJECT_LIBS
1188 GOBJECT_CFLAGS
1189 GCONF_LIBS
1190 GCONF_CFLAGS
1191 GSETTINGS_LIBS
1192 GSETTINGS_CFLAGS
1193 DBUS_OBJ
1194 DBUS_LIBS
1195 DBUS_CFLAGS
1196 GTK_OBJ
1197 GTK_LIBS
1198 GTK_CFLAGS
1199 IMAGEMAGICK_LIBS
1200 IMAGEMAGICK_CFLAGS
1201 RSVG_LIBS
1202 RSVG_CFLAGS
1203 LIB_PTHREAD
1204 VMLIMIT_OBJ
1205 GMALLOC_OBJ
1206 HAVE_XSERVER
1207 W32_LIBS
1208 W32_OBJ
1209 LIB_STANDARD
1210 NS_OBJC_OBJ
1211 NS_OBJ
1212 ns_self_contained
1213 INSTALL_ARCH_INDEP_EXTRA
1214 LIBS_GNUSTEP
1215 LD_SWITCH_X_SITE_RPATH
1216 XMKMF
1217 DEPFLAGS
1218 MKDEPDIR
1219 CFLAGS_SOUND
1220 ALSA_LIBS
1221 ALSA_CFLAGS
1222 LIBSOUND
1223 PKG_CONFIG
1224 CRT_DIR
1225 START_FILES
1226 LIB_MATH
1227 LIBS_SYSTEM
1228 C_SWITCH_SYSTEM
1229 UNEXEC_OBJ
1230 C_SWITCH_MACHINE
1231 LD_SWITCH_SYSTEM
1232 CANNOT_DUMP
1233 INFO_OPTS
1234 INFO_EXT
1235 HAVE_MAKEINFO
1236 PAXCTL
1237 GZIP_PROG
1238 INSTALL_INFO
1239 LN_S
1240 GNULIB_WARN_CFLAGS
1241 WARN_CFLAGS
1242 WERROR_CFLAGS
1243 RANLIB
1244 ARFLAGS
1245 AR
1246 EGREP
1247 GREP
1248 CPP
1249 am__fastdepCC_FALSE
1250 am__fastdepCC_TRUE
1251 CCDEPMODE
1252 AMDEPBACKSLASH
1253 AMDEP_FALSE
1254 AMDEP_TRUE
1255 am__quote
1256 am__include
1257 DEPDIR
1258 OBJEXT
1259 EXEEXT
1260 ac_ct_CC
1261 CPPFLAGS
1262 LDFLAGS
1263 CFLAGS
1264 CC
1265 host_os
1266 host_vendor
1267 host_cpu
1268 host
1269 build_os
1270 build_vendor
1271 build_cpu
1272 build
1273 PROFILING_CFLAGS
1274 GZIP_INFO
1275 cache_file
1276 am__untar
1277 am__tar
1278 AMTAR
1279 am__leading_dot
1280 SET_MAKE
1281 AWK
1282 mkdir_p
1283 MKDIR_P
1284 INSTALL_STRIP_PROGRAM
1285 STRIP
1286 install_sh
1287 MAKEINFO
1288 AUTOHEADER
1289 AUTOMAKE
1290 AUTOCONF
1291 ACLOCAL
1292 VERSION
1293 PACKAGE
1294 CYGPATH_W
1295 am__isrc
1296 INSTALL_DATA
1297 INSTALL_SCRIPT
1298 INSTALL_PROGRAM
1299 target_alias
1300 host_alias
1301 build_alias
1302 LIBS
1303 ECHO_T
1304 ECHO_N
1305 ECHO_C
1306 DEFS
1307 mandir
1308 localedir
1309 libdir
1310 psdir
1311 pdfdir
1312 dvidir
1313 htmldir
1314 infodir
1315 docdir
1316 oldincludedir
1317 includedir
1318 localstatedir
1319 sharedstatedir
1320 sysconfdir
1321 datadir
1322 datarootdir
1323 libexecdir
1324 sbindir
1325 bindir
1326 program_transform_name
1327 prefix
1328 exec_prefix
1329 PACKAGE_URL
1330 PACKAGE_BUGREPORT
1331 PACKAGE_STRING
1332 PACKAGE_VERSION
1333 PACKAGE_TARNAME
1334 PACKAGE_NAME
1335 PATH_SEPARATOR
1336 SHELL'
1337 ac_subst_files='deps_frag
1338 lisp_frag'
1339 ac_user_opts='
1340 enable_option_checking
1341 with_all
1342 with_pop
1343 with_kerberos
1344 with_kerberos5
1345 with_hesiod
1346 with_mmdf
1347 with_mail_unlink
1348 with_mailhost
1349 with_sound
1350 with_x_toolkit
1351 with_wide_int
1352 with_xpm
1353 with_jpeg
1354 with_tiff
1355 with_gif
1356 with_png
1357 with_rsvg
1358 with_xml2
1359 with_imagemagick
1360 with_xft
1361 with_libotf
1362 with_m17n_flt
1363 with_toolkit_scroll_bars
1364 with_xaw3d
1365 with_xim
1366 with_ns
1367 with_w32
1368 with_gpm
1369 with_dbus
1370 with_gconf
1371 with_gsettings
1372 with_selinux
1373 with_gnutls
1374 with_makeinfo
1375 with_compress_info
1376 with_pkg_config_prog
1377 with_crt_dir
1378 with_gameuser
1379 with_gnustep_conf
1380 enable_ns_self_contained
1381 enable_locallisppath
1382 enable_checking
1383 enable_check_lisp_object_type
1384 enable_profiling
1385 enable_autodepend
1386 enable_dependency_tracking
1387 enable_largefile
1388 enable_gcc_warnings
1389 enable_link_time_optimization
1390 with_x
1391 '
1392 ac_precious_vars='build_alias
1393 host_alias
1394 target_alias
1395 CC
1396 CFLAGS
1397 LDFLAGS
1398 LIBS
1399 CPPFLAGS
1400 CPP
1401 XMKMF'
1402
1403
1404 # Initialize some variables set by options.
1405 ac_init_help=
1406 ac_init_version=false
1407 ac_unrecognized_opts=
1408 ac_unrecognized_sep=
1409 # The variables have the same names as the options, with
1410 # dashes changed to underlines.
1411 cache_file=/dev/null
1412 exec_prefix=NONE
1413 no_create=
1414 no_recursion=
1415 prefix=NONE
1416 program_prefix=NONE
1417 program_suffix=NONE
1418 program_transform_name=s,x,x,
1419 silent=
1420 site=
1421 srcdir=
1422 verbose=
1423 x_includes=NONE
1424 x_libraries=NONE
1425
1426 # Installation directory options.
1427 # These are left unexpanded so users can "make install exec_prefix=/foo"
1428 # and all the variables that are supposed to be based on exec_prefix
1429 # by default will actually change.
1430 # Use braces instead of parens because sh, perl, etc. also accept them.
1431 # (The list follows the same order as the GNU Coding Standards.)
1432 bindir='${exec_prefix}/bin'
1433 sbindir='${exec_prefix}/sbin'
1434 libexecdir='${exec_prefix}/libexec'
1435 datarootdir='${prefix}/share'
1436 datadir='${datarootdir}'
1437 sysconfdir='${prefix}/etc'
1438 sharedstatedir='${prefix}/com'
1439 localstatedir='${prefix}/var'
1440 includedir='${prefix}/include'
1441 oldincludedir='/usr/include'
1442 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1443 infodir='${datarootdir}/info'
1444 htmldir='${docdir}'
1445 dvidir='${docdir}'
1446 pdfdir='${docdir}'
1447 psdir='${docdir}'
1448 libdir='${exec_prefix}/lib'
1449 localedir='${datarootdir}/locale'
1450 mandir='${datarootdir}/man'
1451
1452 ac_prev=
1453 ac_dashdash=
1454 for ac_option
1455 do
1456 # If the previous option needs an argument, assign it.
1457 if test -n "$ac_prev"; then
1458 eval $ac_prev=\$ac_option
1459 ac_prev=
1460 continue
1461 fi
1462
1463 case $ac_option in
1464 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1465 *) ac_optarg=yes ;;
1466 esac
1467
1468 # Accept the important Cygnus configure options, so we can diagnose typos.
1469
1470 case $ac_dashdash$ac_option in
1471 --)
1472 ac_dashdash=yes ;;
1473
1474 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1475 ac_prev=bindir ;;
1476 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1477 bindir=$ac_optarg ;;
1478
1479 -build | --build | --buil | --bui | --bu)
1480 ac_prev=build_alias ;;
1481 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1482 build_alias=$ac_optarg ;;
1483
1484 -cache-file | --cache-file | --cache-fil | --cache-fi \
1485 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1486 ac_prev=cache_file ;;
1487 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1488 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1489 cache_file=$ac_optarg ;;
1490
1491 --config-cache | -C)
1492 cache_file=config.cache ;;
1493
1494 -datadir | --datadir | --datadi | --datad)
1495 ac_prev=datadir ;;
1496 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1497 datadir=$ac_optarg ;;
1498
1499 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1500 | --dataroo | --dataro | --datar)
1501 ac_prev=datarootdir ;;
1502 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1503 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1504 datarootdir=$ac_optarg ;;
1505
1506 -disable-* | --disable-*)
1507 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1508 # Reject names that are not valid shell variable names.
1509 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1510 as_fn_error "invalid feature name: $ac_useropt"
1511 ac_useropt_orig=$ac_useropt
1512 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1513 case $ac_user_opts in
1514 *"
1515 "enable_$ac_useropt"
1516 "*) ;;
1517 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1518 ac_unrecognized_sep=', ';;
1519 esac
1520 eval enable_$ac_useropt=no ;;
1521
1522 -docdir | --docdir | --docdi | --doc | --do)
1523 ac_prev=docdir ;;
1524 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1525 docdir=$ac_optarg ;;
1526
1527 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1528 ac_prev=dvidir ;;
1529 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1530 dvidir=$ac_optarg ;;
1531
1532 -enable-* | --enable-*)
1533 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1534 # Reject names that are not valid shell variable names.
1535 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1536 as_fn_error "invalid feature name: $ac_useropt"
1537 ac_useropt_orig=$ac_useropt
1538 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1539 case $ac_user_opts in
1540 *"
1541 "enable_$ac_useropt"
1542 "*) ;;
1543 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1544 ac_unrecognized_sep=', ';;
1545 esac
1546 eval enable_$ac_useropt=\$ac_optarg ;;
1547
1548 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1549 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1550 | --exec | --exe | --ex)
1551 ac_prev=exec_prefix ;;
1552 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1553 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1554 | --exec=* | --exe=* | --ex=*)
1555 exec_prefix=$ac_optarg ;;
1556
1557 -gas | --gas | --ga | --g)
1558 # Obsolete; use --with-gas.
1559 with_gas=yes ;;
1560
1561 -help | --help | --hel | --he | -h)
1562 ac_init_help=long ;;
1563 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1564 ac_init_help=recursive ;;
1565 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1566 ac_init_help=short ;;
1567
1568 -host | --host | --hos | --ho)
1569 ac_prev=host_alias ;;
1570 -host=* | --host=* | --hos=* | --ho=*)
1571 host_alias=$ac_optarg ;;
1572
1573 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1574 ac_prev=htmldir ;;
1575 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1576 | --ht=*)
1577 htmldir=$ac_optarg ;;
1578
1579 -includedir | --includedir | --includedi | --included | --include \
1580 | --includ | --inclu | --incl | --inc)
1581 ac_prev=includedir ;;
1582 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1583 | --includ=* | --inclu=* | --incl=* | --inc=*)
1584 includedir=$ac_optarg ;;
1585
1586 -infodir | --infodir | --infodi | --infod | --info | --inf)
1587 ac_prev=infodir ;;
1588 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1589 infodir=$ac_optarg ;;
1590
1591 -libdir | --libdir | --libdi | --libd)
1592 ac_prev=libdir ;;
1593 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1594 libdir=$ac_optarg ;;
1595
1596 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1597 | --libexe | --libex | --libe)
1598 ac_prev=libexecdir ;;
1599 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1600 | --libexe=* | --libex=* | --libe=*)
1601 libexecdir=$ac_optarg ;;
1602
1603 -localedir | --localedir | --localedi | --localed | --locale)
1604 ac_prev=localedir ;;
1605 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1606 localedir=$ac_optarg ;;
1607
1608 -localstatedir | --localstatedir | --localstatedi | --localstated \
1609 | --localstate | --localstat | --localsta | --localst | --locals)
1610 ac_prev=localstatedir ;;
1611 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1612 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1613 localstatedir=$ac_optarg ;;
1614
1615 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1616 ac_prev=mandir ;;
1617 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1618 mandir=$ac_optarg ;;
1619
1620 -nfp | --nfp | --nf)
1621 # Obsolete; use --without-fp.
1622 with_fp=no ;;
1623
1624 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1625 | --no-cr | --no-c | -n)
1626 no_create=yes ;;
1627
1628 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1629 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1630 no_recursion=yes ;;
1631
1632 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1633 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1634 | --oldin | --oldi | --old | --ol | --o)
1635 ac_prev=oldincludedir ;;
1636 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1637 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1638 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1639 oldincludedir=$ac_optarg ;;
1640
1641 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1642 ac_prev=prefix ;;
1643 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1644 prefix=$ac_optarg ;;
1645
1646 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1647 | --program-pre | --program-pr | --program-p)
1648 ac_prev=program_prefix ;;
1649 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1650 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1651 program_prefix=$ac_optarg ;;
1652
1653 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1654 | --program-suf | --program-su | --program-s)
1655 ac_prev=program_suffix ;;
1656 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1657 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1658 program_suffix=$ac_optarg ;;
1659
1660 -program-transform-name | --program-transform-name \
1661 | --program-transform-nam | --program-transform-na \
1662 | --program-transform-n | --program-transform- \
1663 | --program-transform | --program-transfor \
1664 | --program-transfo | --program-transf \
1665 | --program-trans | --program-tran \
1666 | --progr-tra | --program-tr | --program-t)
1667 ac_prev=program_transform_name ;;
1668 -program-transform-name=* | --program-transform-name=* \
1669 | --program-transform-nam=* | --program-transform-na=* \
1670 | --program-transform-n=* | --program-transform-=* \
1671 | --program-transform=* | --program-transfor=* \
1672 | --program-transfo=* | --program-transf=* \
1673 | --program-trans=* | --program-tran=* \
1674 | --progr-tra=* | --program-tr=* | --program-t=*)
1675 program_transform_name=$ac_optarg ;;
1676
1677 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1678 ac_prev=pdfdir ;;
1679 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1680 pdfdir=$ac_optarg ;;
1681
1682 -psdir | --psdir | --psdi | --psd | --ps)
1683 ac_prev=psdir ;;
1684 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1685 psdir=$ac_optarg ;;
1686
1687 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1688 | -silent | --silent | --silen | --sile | --sil)
1689 silent=yes ;;
1690
1691 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1692 ac_prev=sbindir ;;
1693 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1694 | --sbi=* | --sb=*)
1695 sbindir=$ac_optarg ;;
1696
1697 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1698 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1699 | --sharedst | --shareds | --shared | --share | --shar \
1700 | --sha | --sh)
1701 ac_prev=sharedstatedir ;;
1702 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1703 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1704 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1705 | --sha=* | --sh=*)
1706 sharedstatedir=$ac_optarg ;;
1707
1708 -site | --site | --sit)
1709 ac_prev=site ;;
1710 -site=* | --site=* | --sit=*)
1711 site=$ac_optarg ;;
1712
1713 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1714 ac_prev=srcdir ;;
1715 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1716 srcdir=$ac_optarg ;;
1717
1718 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1719 | --syscon | --sysco | --sysc | --sys | --sy)
1720 ac_prev=sysconfdir ;;
1721 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1722 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1723 sysconfdir=$ac_optarg ;;
1724
1725 -target | --target | --targe | --targ | --tar | --ta | --t)
1726 ac_prev=target_alias ;;
1727 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1728 target_alias=$ac_optarg ;;
1729
1730 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1731 verbose=yes ;;
1732
1733 -version | --version | --versio | --versi | --vers | -V)
1734 ac_init_version=: ;;
1735
1736 -with-* | --with-*)
1737 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1738 # Reject names that are not valid shell variable names.
1739 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1740 as_fn_error "invalid package name: $ac_useropt"
1741 ac_useropt_orig=$ac_useropt
1742 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1743 case $ac_user_opts in
1744 *"
1745 "with_$ac_useropt"
1746 "*) ;;
1747 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1748 ac_unrecognized_sep=', ';;
1749 esac
1750 eval with_$ac_useropt=\$ac_optarg ;;
1751
1752 -without-* | --without-*)
1753 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1754 # Reject names that are not valid shell variable names.
1755 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1756 as_fn_error "invalid package name: $ac_useropt"
1757 ac_useropt_orig=$ac_useropt
1758 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1759 case $ac_user_opts in
1760 *"
1761 "with_$ac_useropt"
1762 "*) ;;
1763 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1764 ac_unrecognized_sep=', ';;
1765 esac
1766 eval with_$ac_useropt=no ;;
1767
1768 --x)
1769 # Obsolete; use --with-x.
1770 with_x=yes ;;
1771
1772 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1773 | --x-incl | --x-inc | --x-in | --x-i)
1774 ac_prev=x_includes ;;
1775 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1776 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1777 x_includes=$ac_optarg ;;
1778
1779 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1780 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1781 ac_prev=x_libraries ;;
1782 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1783 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1784 x_libraries=$ac_optarg ;;
1785
1786 -*) as_fn_error "unrecognized option: \`$ac_option'
1787 Try \`$0 --help' for more information."
1788 ;;
1789
1790 *=*)
1791 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1792 # Reject names that are not valid shell variable names.
1793 case $ac_envvar in #(
1794 '' | [0-9]* | *[!_$as_cr_alnum]* )
1795 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1796 esac
1797 eval $ac_envvar=\$ac_optarg
1798 export $ac_envvar ;;
1799
1800 *)
1801 # FIXME: should be removed in autoconf 3.0.
1802 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1803 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1804 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1805 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1806 ;;
1807
1808 esac
1809 done
1810
1811 if test -n "$ac_prev"; then
1812 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1813 as_fn_error "missing argument to $ac_option"
1814 fi
1815
1816 if test -n "$ac_unrecognized_opts"; then
1817 case $enable_option_checking in
1818 no) ;;
1819 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1820 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1821 esac
1822 fi
1823
1824 # Check all directory arguments for consistency.
1825 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1826 datadir sysconfdir sharedstatedir localstatedir includedir \
1827 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1828 libdir localedir mandir
1829 do
1830 eval ac_val=\$$ac_var
1831 # Remove trailing slashes.
1832 case $ac_val in
1833 */ )
1834 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1835 eval $ac_var=\$ac_val;;
1836 esac
1837 # Be sure to have absolute directory names.
1838 case $ac_val in
1839 [\\/$]* | ?:[\\/]* ) continue;;
1840 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1841 esac
1842 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
1843 done
1844
1845 # There might be people who depend on the old broken behavior: `$host'
1846 # used to hold the argument of --host etc.
1847 # FIXME: To remove some day.
1848 build=$build_alias
1849 host=$host_alias
1850 target=$target_alias
1851
1852 # FIXME: To remove some day.
1853 if test "x$host_alias" != x; then
1854 if test "x$build_alias" = x; then
1855 cross_compiling=maybe
1856 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1857 If a cross compiler is detected then cross compile mode will be used." >&2
1858 elif test "x$build_alias" != "x$host_alias"; then
1859 cross_compiling=yes
1860 fi
1861 fi
1862
1863 ac_tool_prefix=
1864 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1865
1866 test "$silent" = yes && exec 6>/dev/null
1867
1868
1869 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1870 ac_ls_di=`ls -di .` &&
1871 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1872 as_fn_error "working directory cannot be determined"
1873 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1874 as_fn_error "pwd does not report name of working directory"
1875
1876
1877 # Find the source files, if location was not specified.
1878 if test -z "$srcdir"; then
1879 ac_srcdir_defaulted=yes
1880 # Try the directory containing this script, then the parent directory.
1881 ac_confdir=`$as_dirname -- "$as_myself" ||
1882 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1883 X"$as_myself" : 'X\(//\)[^/]' \| \
1884 X"$as_myself" : 'X\(//\)$' \| \
1885 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1886 $as_echo X"$as_myself" |
1887 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1888 s//\1/
1889 q
1890 }
1891 /^X\(\/\/\)[^/].*/{
1892 s//\1/
1893 q
1894 }
1895 /^X\(\/\/\)$/{
1896 s//\1/
1897 q
1898 }
1899 /^X\(\/\).*/{
1900 s//\1/
1901 q
1902 }
1903 s/.*/./; q'`
1904 srcdir=$ac_confdir
1905 if test ! -r "$srcdir/$ac_unique_file"; then
1906 srcdir=..
1907 fi
1908 else
1909 ac_srcdir_defaulted=no
1910 fi
1911 if test ! -r "$srcdir/$ac_unique_file"; then
1912 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1913 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
1914 fi
1915 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1916 ac_abs_confdir=`(
1917 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
1918 pwd)`
1919 # When building in place, set srcdir=.
1920 if test "$ac_abs_confdir" = "$ac_pwd"; then
1921 srcdir=.
1922 fi
1923 # Remove unnecessary trailing slashes from srcdir.
1924 # Double slashes in file names in object file debugging info
1925 # mess up M-x gdb in Emacs.
1926 case $srcdir in
1927 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1928 esac
1929 for ac_var in $ac_precious_vars; do
1930 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1931 eval ac_env_${ac_var}_value=\$${ac_var}
1932 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1933 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1934 done
1935
1936 #
1937 # Report the --help message.
1938 #
1939 if test "$ac_init_help" = "long"; then
1940 # Omit some internal or obsolete options to make the list less imposing.
1941 # This message is too long to be a string in the A/UX 3.1 sh.
1942 cat <<_ACEOF
1943 \`configure' configures emacs 24.2.93 to adapt to many kinds of systems.
1944
1945 Usage: $0 [OPTION]... [VAR=VALUE]...
1946
1947 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1948 VAR=VALUE. See below for descriptions of some of the useful variables.
1949
1950 Defaults for the options are specified in brackets.
1951
1952 Configuration:
1953 -h, --help display this help and exit
1954 --help=short display options specific to this package
1955 --help=recursive display the short help of all the included packages
1956 -V, --version display version information and exit
1957 -q, --quiet, --silent do not print \`checking...' messages
1958 --cache-file=FILE cache test results in FILE [disabled]
1959 -C, --config-cache alias for \`--cache-file=config.cache'
1960 -n, --no-create do not create output files
1961 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1962
1963 Installation directories:
1964 --prefix=PREFIX install architecture-independent files in PREFIX
1965 [$ac_default_prefix]
1966 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1967 [PREFIX]
1968
1969 By default, \`make install' will install all the files in
1970 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1971 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1972 for instance \`--prefix=\$HOME'.
1973
1974 For better control, use the options below.
1975
1976 Fine tuning of the installation directories:
1977 --bindir=DIR user executables [EPREFIX/bin]
1978 --sbindir=DIR system admin executables [EPREFIX/sbin]
1979 --libexecdir=DIR program executables [EPREFIX/libexec]
1980 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1981 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1982 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1983 --libdir=DIR object code libraries [EPREFIX/lib]
1984 --includedir=DIR C header files [PREFIX/include]
1985 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1986 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1987 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1988 --infodir=DIR info documentation [DATAROOTDIR/info]
1989 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1990 --mandir=DIR man documentation [DATAROOTDIR/man]
1991 --docdir=DIR documentation root [DATAROOTDIR/doc/emacs]
1992 --htmldir=DIR html documentation [DOCDIR]
1993 --dvidir=DIR dvi documentation [DOCDIR]
1994 --pdfdir=DIR pdf documentation [DOCDIR]
1995 --psdir=DIR ps documentation [DOCDIR]
1996 _ACEOF
1997
1998 cat <<\_ACEOF
1999
2000 Program names:
2001 --program-prefix=PREFIX prepend PREFIX to installed program names
2002 --program-suffix=SUFFIX append SUFFIX to installed program names
2003 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
2004
2005 X features:
2006 --x-includes=DIR X include files are in DIR
2007 --x-libraries=DIR X library files are in DIR
2008
2009 System types:
2010 --build=BUILD configure for building on BUILD [guessed]
2011 --host=HOST cross-compile to build programs to run on HOST [BUILD]
2012 _ACEOF
2013 fi
2014
2015 if test -n "$ac_init_help"; then
2016 case $ac_init_help in
2017 short | recursive ) echo "Configuration of emacs 24.2.93:";;
2018 esac
2019 cat <<\_ACEOF
2020
2021 Optional Features:
2022 --disable-option-checking ignore unrecognized --enable/--with options
2023 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
2024 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
2025 --disable-ns-self-contained
2026 disable self contained build under NeXTstep
2027 --enable-locallisppath=PATH
2028 directories Emacs should search for lisp files
2029 specific to this site
2030 --enable-checking[=LIST]
2031 enable expensive run-time checks. With LIST, enable
2032 only specific categories of checks. Categories are:
2033 all,yes,no. Flags are: stringbytes, stringoverrun,
2034 stringfreelist, xmallocoverrun, conslist, glyphs
2035 --enable-check-lisp-object-type
2036 enable compile time checks for the Lisp_Object data
2037 type. This is useful for development for catching
2038 certain types of bugs.
2039 --enable-profiling build emacs with low-level, gprof profiling support.
2040 Mainly useful for debugging Emacs itself. May not
2041 work on all platforms. Stops profiler.el working.
2042 --enable-autodepend automatically generate dependencies to .h-files.
2043 Requires GNU Make and Gcc. Enabled if GNU Make and
2044 Gcc is found
2045 --disable-dependency-tracking speeds up one-time build
2046 --enable-dependency-tracking do not reject slow dependency extractors
2047 --disable-largefile omit support for large files
2048 --enable-gcc-warnings turn on lots of GCC warnings/errors. This is
2049 intended for developers, and may generate false
2050 alarms when used with older or non-GNU development
2051 tools.
2052 --enable-link-time-optimization
2053 build emacs with link-time optimization. This is
2054 supported only for GCC since 4.5.0.
2055
2056 Optional Packages:
2057 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
2058 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
2059 --without-all omit almost all features and build small executable
2060 with minimal dependencies
2061 --without-pop don't support POP mail retrieval with movemail
2062 --with-kerberos support Kerberos-authenticated POP
2063 --with-kerberos5 support Kerberos version 5 authenticated POP
2064 --with-hesiod support Hesiod to get the POP server host
2065 --with-mmdf support MMDF mailboxes
2066 --with-mail-unlink unlink, rather than empty, mail spool after reading
2067 --with-mailhost=HOSTNAME
2068 string giving default POP mail host
2069 --without-sound don't compile with sound support
2070 --with-x-toolkit=KIT use an X toolkit (KIT one of: yes or gtk, gtk2,
2071 gtk3, lucid or athena, motif, no)
2072 --with-wide-int prefer wide Emacs integers (typically 62-bit)
2073 --without-xpm don't compile with XPM image support
2074 --without-jpeg don't compile with JPEG image support
2075 --without-tiff don't compile with TIFF image support
2076 --without-gif don't compile with GIF image support
2077 --without-png don't compile with PNG image support
2078 --without-rsvg don't compile with SVG image support
2079 --without-xml2 don't compile with XML parsing support
2080 --without-imagemagick don't compile with ImageMagick image support
2081 --without-xft don't use XFT for anti aliased fonts
2082 --without-libotf don't use libotf for OpenType font support
2083 --without-m17n-flt don't use m17n-flt for text shaping
2084 --without-toolkit-scroll-bars
2085 don't use Motif or Xaw3d scroll bars
2086 --without-xaw3d don't use Xaw3d
2087 --without-xim don't use X11 XIM
2088 --with-ns use NeXTstep (Cocoa or GNUstep) windowing system
2089 --with-w32 use native MS Windows GUI
2090 --without-gpm don't use -lgpm for mouse support on a GNU/Linux
2091 console
2092 --without-dbus don't compile with D-Bus support
2093 --without-gconf don't compile with GConf support
2094 --without-gsettings don't compile with GSettings support
2095 --without-selinux don't compile with SELinux support
2096 --without-gnutls don't use -lgnutls for SSL/TLS support
2097 --without-makeinfo don't require makeinfo for building manuals
2098 --without-compress-info don't compress the installed Info pages
2099 --with-pkg-config-prog=PATH
2100 path to pkg-config for finding GTK and librsvg
2101 --with-crt-dir=DIR directory containing crtn.o etc. The default is
2102 /usr/lib, or /usr/lib64 on some platforms.
2103 --with-gameuser=USER user for shared game score files
2104 --with-gnustep-conf=PATH
2105 path to GNUstep.conf; default $GNUSTEP_CONFIG_FILE,
2106 or /etc/GNUstep/GNUstep.conf
2107 --with-x use the X Window System
2108
2109 Some influential environment variables:
2110 CC C compiler command
2111 CFLAGS C compiler flags
2112 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
2113 nonstandard directory <lib dir>
2114 LIBS libraries to pass to the linker, e.g. -l<library>
2115 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2116 you have headers in a nonstandard directory <include dir>
2117 CPP C preprocessor
2118 XMKMF Path to xmkmf, Makefile generator for X Window System
2119
2120 Use these variables to override the choices made by `configure' or to help
2121 it to find libraries and programs with nonstandard names/locations.
2122
2123 Report bugs to the package provider.
2124 _ACEOF
2125 ac_status=$?
2126 fi
2127
2128 if test "$ac_init_help" = "recursive"; then
2129 # If there are subdirs, report their specific --help.
2130 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2131 test -d "$ac_dir" ||
2132 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2133 continue
2134 ac_builddir=.
2135
2136 case "$ac_dir" in
2137 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2138 *)
2139 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2140 # A ".." for each directory in $ac_dir_suffix.
2141 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2142 case $ac_top_builddir_sub in
2143 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2144 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2145 esac ;;
2146 esac
2147 ac_abs_top_builddir=$ac_pwd
2148 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2149 # for backward compatibility:
2150 ac_top_builddir=$ac_top_build_prefix
2151
2152 case $srcdir in
2153 .) # We are building in place.
2154 ac_srcdir=.
2155 ac_top_srcdir=$ac_top_builddir_sub
2156 ac_abs_top_srcdir=$ac_pwd ;;
2157 [\\/]* | ?:[\\/]* ) # Absolute name.
2158 ac_srcdir=$srcdir$ac_dir_suffix;
2159 ac_top_srcdir=$srcdir
2160 ac_abs_top_srcdir=$srcdir ;;
2161 *) # Relative name.
2162 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2163 ac_top_srcdir=$ac_top_build_prefix$srcdir
2164 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2165 esac
2166 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2167
2168 cd "$ac_dir" || { ac_status=$?; continue; }
2169 # Check for guested configure.
2170 if test -f "$ac_srcdir/configure.gnu"; then
2171 echo &&
2172 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2173 elif test -f "$ac_srcdir/configure"; then
2174 echo &&
2175 $SHELL "$ac_srcdir/configure" --help=recursive
2176 else
2177 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2178 fi || ac_status=$?
2179 cd "$ac_pwd" || { ac_status=$?; break; }
2180 done
2181 fi
2182
2183 test -n "$ac_init_help" && exit $ac_status
2184 if $ac_init_version; then
2185 cat <<\_ACEOF
2186 emacs configure 24.2.93
2187 generated by GNU Autoconf 2.65
2188
2189 Copyright (C) 2009 Free Software Foundation, Inc.
2190 This configure script is free software; the Free Software Foundation
2191 gives unlimited permission to copy, distribute and modify it.
2192 _ACEOF
2193 exit
2194 fi
2195
2196 ## ------------------------ ##
2197 ## Autoconf initialization. ##
2198 ## ------------------------ ##
2199
2200 # ac_fn_c_try_compile LINENO
2201 # --------------------------
2202 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2203 ac_fn_c_try_compile ()
2204 {
2205 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2206 rm -f conftest.$ac_objext
2207 if { { ac_try="$ac_compile"
2208 case "(($ac_try" in
2209 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2210 *) ac_try_echo=$ac_try;;
2211 esac
2212 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2213 $as_echo "$ac_try_echo"; } >&5
2214 (eval "$ac_compile") 2>conftest.err
2215 ac_status=$?
2216 if test -s conftest.err; then
2217 grep -v '^ *+' conftest.err >conftest.er1
2218 cat conftest.er1 >&5
2219 mv -f conftest.er1 conftest.err
2220 fi
2221 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2222 test $ac_status = 0; } && {
2223 test -z "$ac_c_werror_flag" ||
2224 test ! -s conftest.err
2225 } && test -s conftest.$ac_objext; then :
2226 ac_retval=0
2227 else
2228 $as_echo "$as_me: failed program was:" >&5
2229 sed 's/^/| /' conftest.$ac_ext >&5
2230
2231 ac_retval=1
2232 fi
2233 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2234 as_fn_set_status $ac_retval
2235
2236 } # ac_fn_c_try_compile
2237
2238 # ac_fn_c_try_cpp LINENO
2239 # ----------------------
2240 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2241 ac_fn_c_try_cpp ()
2242 {
2243 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2244 if { { ac_try="$ac_cpp conftest.$ac_ext"
2245 case "(($ac_try" in
2246 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2247 *) ac_try_echo=$ac_try;;
2248 esac
2249 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2250 $as_echo "$ac_try_echo"; } >&5
2251 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2252 ac_status=$?
2253 if test -s conftest.err; then
2254 grep -v '^ *+' conftest.err >conftest.er1
2255 cat conftest.er1 >&5
2256 mv -f conftest.er1 conftest.err
2257 fi
2258 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2259 test $ac_status = 0; } >/dev/null && {
2260 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2261 test ! -s conftest.err
2262 }; then :
2263 ac_retval=0
2264 else
2265 $as_echo "$as_me: failed program was:" >&5
2266 sed 's/^/| /' conftest.$ac_ext >&5
2267
2268 ac_retval=1
2269 fi
2270 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2271 as_fn_set_status $ac_retval
2272
2273 } # ac_fn_c_try_cpp
2274
2275 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
2276 # -------------------------------------------------------
2277 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2278 # the include files in INCLUDES and setting the cache variable VAR
2279 # accordingly.
2280 ac_fn_c_check_header_mongrel ()
2281 {
2282 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2283 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2285 $as_echo_n "checking for $2... " >&6; }
2286 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2287 $as_echo_n "(cached) " >&6
2288 fi
2289 eval ac_res=\$$3
2290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2291 $as_echo "$ac_res" >&6; }
2292 else
2293 # Is the header compilable?
2294 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2295 $as_echo_n "checking $2 usability... " >&6; }
2296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2297 /* end confdefs.h. */
2298 $4
2299 #include <$2>
2300 _ACEOF
2301 if ac_fn_c_try_compile "$LINENO"; then :
2302 ac_header_compiler=yes
2303 else
2304 ac_header_compiler=no
2305 fi
2306 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2308 $as_echo "$ac_header_compiler" >&6; }
2309
2310 # Is the header present?
2311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2312 $as_echo_n "checking $2 presence... " >&6; }
2313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2314 /* end confdefs.h. */
2315 #include <$2>
2316 _ACEOF
2317 if ac_fn_c_try_cpp "$LINENO"; then :
2318 ac_header_preproc=yes
2319 else
2320 ac_header_preproc=no
2321 fi
2322 rm -f conftest.err conftest.$ac_ext
2323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2324 $as_echo "$ac_header_preproc" >&6; }
2325
2326 # So? What about this header?
2327 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
2328 yes:no: )
2329 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2330 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2331 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2332 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2333 ;;
2334 no:yes:* )
2335 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2336 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2337 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
2338 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
2339 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2340 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2341 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
2342 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
2343 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2344 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2345 ;;
2346 esac
2347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2348 $as_echo_n "checking for $2... " >&6; }
2349 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2350 $as_echo_n "(cached) " >&6
2351 else
2352 eval "$3=\$ac_header_compiler"
2353 fi
2354 eval ac_res=\$$3
2355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2356 $as_echo "$ac_res" >&6; }
2357 fi
2358 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2359
2360 } # ac_fn_c_check_header_mongrel
2361
2362 # ac_fn_c_try_run LINENO
2363 # ----------------------
2364 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2365 # that executables *can* be run.
2366 ac_fn_c_try_run ()
2367 {
2368 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2369 if { { ac_try="$ac_link"
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_link") 2>&5
2377 ac_status=$?
2378 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2379 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2380 { { case "(($ac_try" in
2381 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2382 *) ac_try_echo=$ac_try;;
2383 esac
2384 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2385 $as_echo "$ac_try_echo"; } >&5
2386 (eval "$ac_try") 2>&5
2387 ac_status=$?
2388 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2389 test $ac_status = 0; }; }; then :
2390 ac_retval=0
2391 else
2392 $as_echo "$as_me: program exited with status $ac_status" >&5
2393 $as_echo "$as_me: failed program was:" >&5
2394 sed 's/^/| /' conftest.$ac_ext >&5
2395
2396 ac_retval=$ac_status
2397 fi
2398 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2399 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2400 as_fn_set_status $ac_retval
2401
2402 } # ac_fn_c_try_run
2403
2404 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2405 # -------------------------------------------------------
2406 # Tests whether HEADER exists and can be compiled using the include files in
2407 # INCLUDES, setting the cache variable VAR accordingly.
2408 ac_fn_c_check_header_compile ()
2409 {
2410 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2412 $as_echo_n "checking for $2... " >&6; }
2413 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2414 $as_echo_n "(cached) " >&6
2415 else
2416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2417 /* end confdefs.h. */
2418 $4
2419 #include <$2>
2420 _ACEOF
2421 if ac_fn_c_try_compile "$LINENO"; then :
2422 eval "$3=yes"
2423 else
2424 eval "$3=no"
2425 fi
2426 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2427 fi
2428 eval ac_res=\$$3
2429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2430 $as_echo "$ac_res" >&6; }
2431 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2432
2433 } # ac_fn_c_check_header_compile
2434
2435 # ac_fn_c_try_link LINENO
2436 # -----------------------
2437 # Try to link conftest.$ac_ext, and return whether this succeeded.
2438 ac_fn_c_try_link ()
2439 {
2440 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2441 rm -f conftest.$ac_objext conftest$ac_exeext
2442 if { { ac_try="$ac_link"
2443 case "(($ac_try" in
2444 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2445 *) ac_try_echo=$ac_try;;
2446 esac
2447 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2448 $as_echo "$ac_try_echo"; } >&5
2449 (eval "$ac_link") 2>conftest.err
2450 ac_status=$?
2451 if test -s conftest.err; then
2452 grep -v '^ *+' conftest.err >conftest.er1
2453 cat conftest.er1 >&5
2454 mv -f conftest.er1 conftest.err
2455 fi
2456 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2457 test $ac_status = 0; } && {
2458 test -z "$ac_c_werror_flag" ||
2459 test ! -s conftest.err
2460 } && test -s conftest$ac_exeext && {
2461 test "$cross_compiling" = yes ||
2462 $as_test_x conftest$ac_exeext
2463 }; then :
2464 ac_retval=0
2465 else
2466 $as_echo "$as_me: failed program was:" >&5
2467 sed 's/^/| /' conftest.$ac_ext >&5
2468
2469 ac_retval=1
2470 fi
2471 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2472 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2473 # interfere with the next link command; also delete a directory that is
2474 # left behind by Apple's compiler. We do this before executing the actions.
2475 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2476 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2477 as_fn_set_status $ac_retval
2478
2479 } # ac_fn_c_try_link
2480
2481 # ac_fn_c_check_decl LINENO SYMBOL VAR
2482 # ------------------------------------
2483 # Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2484 ac_fn_c_check_decl ()
2485 {
2486 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5
2488 $as_echo_n "checking whether $2 is declared... " >&6; }
2489 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2490 $as_echo_n "(cached) " >&6
2491 else
2492 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2493 /* end confdefs.h. */
2494 $4
2495 int
2496 main ()
2497 {
2498 #ifndef $2
2499 (void) $2;
2500 #endif
2501
2502 ;
2503 return 0;
2504 }
2505 _ACEOF
2506 if ac_fn_c_try_compile "$LINENO"; then :
2507 eval "$3=yes"
2508 else
2509 eval "$3=no"
2510 fi
2511 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2512 fi
2513 eval ac_res=\$$3
2514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2515 $as_echo "$ac_res" >&6; }
2516 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2517
2518 } # ac_fn_c_check_decl
2519
2520 # ac_fn_c_check_header_preproc LINENO HEADER VAR
2521 # ----------------------------------------------
2522 # Tests whether HEADER is present, setting the cache variable VAR accordingly.
2523 ac_fn_c_check_header_preproc ()
2524 {
2525 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2527 $as_echo_n "checking for $2... " >&6; }
2528 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2529 $as_echo_n "(cached) " >&6
2530 else
2531 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2532 /* end confdefs.h. */
2533 #include <$2>
2534 _ACEOF
2535 if ac_fn_c_try_cpp "$LINENO"; then :
2536 eval "$3=yes"
2537 else
2538 eval "$3=no"
2539 fi
2540 rm -f conftest.err conftest.$ac_ext
2541 fi
2542 eval ac_res=\$$3
2543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2544 $as_echo "$ac_res" >&6; }
2545 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2546
2547 } # ac_fn_c_check_header_preproc
2548
2549 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2550 # ----------------------------------------------------
2551 # Tries to find if the field MEMBER exists in type AGGR, after including
2552 # INCLUDES, setting cache variable VAR accordingly.
2553 ac_fn_c_check_member ()
2554 {
2555 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2557 $as_echo_n "checking for $2.$3... " >&6; }
2558 if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2559 $as_echo_n "(cached) " >&6
2560 else
2561 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2562 /* end confdefs.h. */
2563 $5
2564 int
2565 main ()
2566 {
2567 static $2 ac_aggr;
2568 if (ac_aggr.$3)
2569 return 0;
2570 ;
2571 return 0;
2572 }
2573 _ACEOF
2574 if ac_fn_c_try_compile "$LINENO"; then :
2575 eval "$4=yes"
2576 else
2577 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2578 /* end confdefs.h. */
2579 $5
2580 int
2581 main ()
2582 {
2583 static $2 ac_aggr;
2584 if (sizeof ac_aggr.$3)
2585 return 0;
2586 ;
2587 return 0;
2588 }
2589 _ACEOF
2590 if ac_fn_c_try_compile "$LINENO"; then :
2591 eval "$4=yes"
2592 else
2593 eval "$4=no"
2594 fi
2595 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2596 fi
2597 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2598 fi
2599 eval ac_res=\$$4
2600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2601 $as_echo "$ac_res" >&6; }
2602 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2603
2604 } # ac_fn_c_check_member
2605
2606 # ac_fn_c_check_func LINENO FUNC VAR
2607 # ----------------------------------
2608 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2609 ac_fn_c_check_func ()
2610 {
2611 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2613 $as_echo_n "checking for $2... " >&6; }
2614 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2615 $as_echo_n "(cached) " >&6
2616 else
2617 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2618 /* end confdefs.h. */
2619 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2620 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2621 #define $2 innocuous_$2
2622
2623 /* System header to define __stub macros and hopefully few prototypes,
2624 which can conflict with char $2 (); below.
2625 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2626 <limits.h> exists even on freestanding compilers. */
2627
2628 #ifdef __STDC__
2629 # include <limits.h>
2630 #else
2631 # include <assert.h>
2632 #endif
2633
2634 #undef $2
2635
2636 /* Override any GCC internal prototype to avoid an error.
2637 Use char because int might match the return type of a GCC
2638 builtin and then its argument prototype would still apply. */
2639 #ifdef __cplusplus
2640 extern "C"
2641 #endif
2642 char $2 ();
2643 /* The GNU C library defines this for functions which it implements
2644 to always fail with ENOSYS. Some functions are actually named
2645 something starting with __ and the normal name is an alias. */
2646 #if defined __stub_$2 || defined __stub___$2
2647 choke me
2648 #endif
2649
2650 int
2651 main ()
2652 {
2653 return $2 ();
2654 ;
2655 return 0;
2656 }
2657 _ACEOF
2658 if ac_fn_c_try_link "$LINENO"; then :
2659 eval "$3=yes"
2660 else
2661 eval "$3=no"
2662 fi
2663 rm -f core conftest.err conftest.$ac_objext \
2664 conftest$ac_exeext conftest.$ac_ext
2665 fi
2666 eval ac_res=\$$3
2667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2668 $as_echo "$ac_res" >&6; }
2669 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2670
2671 } # ac_fn_c_check_func
2672
2673 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2674 # -------------------------------------------
2675 # Tests whether TYPE exists after having included INCLUDES, setting cache
2676 # variable VAR accordingly.
2677 ac_fn_c_check_type ()
2678 {
2679 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2681 $as_echo_n "checking for $2... " >&6; }
2682 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2683 $as_echo_n "(cached) " >&6
2684 else
2685 eval "$3=no"
2686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2687 /* end confdefs.h. */
2688 $4
2689 int
2690 main ()
2691 {
2692 if (sizeof ($2))
2693 return 0;
2694 ;
2695 return 0;
2696 }
2697 _ACEOF
2698 if ac_fn_c_try_compile "$LINENO"; then :
2699 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2700 /* end confdefs.h. */
2701 $4
2702 int
2703 main ()
2704 {
2705 if (sizeof (($2)))
2706 return 0;
2707 ;
2708 return 0;
2709 }
2710 _ACEOF
2711 if ac_fn_c_try_compile "$LINENO"; then :
2712
2713 else
2714 eval "$3=yes"
2715 fi
2716 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2717 fi
2718 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2719 fi
2720 eval ac_res=\$$3
2721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2722 $as_echo "$ac_res" >&6; }
2723 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2724
2725 } # ac_fn_c_check_type
2726
2727 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2728 # --------------------------------------------
2729 # Tries to find the compile-time value of EXPR in a program that includes
2730 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2731 # computed
2732 ac_fn_c_compute_int ()
2733 {
2734 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2735 if test "$cross_compiling" = yes; then
2736 # Depending upon the size, compute the lo and hi bounds.
2737 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2738 /* end confdefs.h. */
2739 $4
2740 int
2741 main ()
2742 {
2743 static int test_array [1 - 2 * !(($2) >= 0)];
2744 test_array [0] = 0
2745
2746 ;
2747 return 0;
2748 }
2749 _ACEOF
2750 if ac_fn_c_try_compile "$LINENO"; then :
2751 ac_lo=0 ac_mid=0
2752 while :; do
2753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2754 /* end confdefs.h. */
2755 $4
2756 int
2757 main ()
2758 {
2759 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2760 test_array [0] = 0
2761
2762 ;
2763 return 0;
2764 }
2765 _ACEOF
2766 if ac_fn_c_try_compile "$LINENO"; then :
2767 ac_hi=$ac_mid; break
2768 else
2769 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2770 if test $ac_lo -le $ac_mid; then
2771 ac_lo= ac_hi=
2772 break
2773 fi
2774 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2775 fi
2776 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2777 done
2778 else
2779 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2780 /* end confdefs.h. */
2781 $4
2782 int
2783 main ()
2784 {
2785 static int test_array [1 - 2 * !(($2) < 0)];
2786 test_array [0] = 0
2787
2788 ;
2789 return 0;
2790 }
2791 _ACEOF
2792 if ac_fn_c_try_compile "$LINENO"; then :
2793 ac_hi=-1 ac_mid=-1
2794 while :; do
2795 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2796 /* end confdefs.h. */
2797 $4
2798 int
2799 main ()
2800 {
2801 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2802 test_array [0] = 0
2803
2804 ;
2805 return 0;
2806 }
2807 _ACEOF
2808 if ac_fn_c_try_compile "$LINENO"; then :
2809 ac_lo=$ac_mid; break
2810 else
2811 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2812 if test $ac_mid -le $ac_hi; then
2813 ac_lo= ac_hi=
2814 break
2815 fi
2816 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2817 fi
2818 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2819 done
2820 else
2821 ac_lo= ac_hi=
2822 fi
2823 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2824 fi
2825 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2826 # Binary search between lo and hi bounds.
2827 while test "x$ac_lo" != "x$ac_hi"; do
2828 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2830 /* end confdefs.h. */
2831 $4
2832 int
2833 main ()
2834 {
2835 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2836 test_array [0] = 0
2837
2838 ;
2839 return 0;
2840 }
2841 _ACEOF
2842 if ac_fn_c_try_compile "$LINENO"; then :
2843 ac_hi=$ac_mid
2844 else
2845 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2846 fi
2847 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2848 done
2849 case $ac_lo in #((
2850 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2851 '') ac_retval=1 ;;
2852 esac
2853 else
2854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2855 /* end confdefs.h. */
2856 $4
2857 static long int longval () { return $2; }
2858 static unsigned long int ulongval () { return $2; }
2859 #include <stdio.h>
2860 #include <stdlib.h>
2861 int
2862 main ()
2863 {
2864
2865 FILE *f = fopen ("conftest.val", "w");
2866 if (! f)
2867 return 1;
2868 if (($2) < 0)
2869 {
2870 long int i = longval ();
2871 if (i != ($2))
2872 return 1;
2873 fprintf (f, "%ld", i);
2874 }
2875 else
2876 {
2877 unsigned long int i = ulongval ();
2878 if (i != ($2))
2879 return 1;
2880 fprintf (f, "%lu", i);
2881 }
2882 /* Do not output a trailing newline, as this causes \r\n confusion
2883 on some platforms. */
2884 return ferror (f) || fclose (f) != 0;
2885
2886 ;
2887 return 0;
2888 }
2889 _ACEOF
2890 if ac_fn_c_try_run "$LINENO"; then :
2891 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2892 else
2893 ac_retval=1
2894 fi
2895 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2896 conftest.$ac_objext conftest.beam conftest.$ac_ext
2897 rm -f conftest.val
2898
2899 fi
2900 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2901 as_fn_set_status $ac_retval
2902
2903 } # ac_fn_c_compute_int
2904 cat >config.log <<_ACEOF
2905 This file contains any messages produced by compilers while
2906 running configure, to aid debugging if configure makes a mistake.
2907
2908 It was created by emacs $as_me 24.2.93, which was
2909 generated by GNU Autoconf 2.65. Invocation command line was
2910
2911 $ $0 $@
2912
2913 _ACEOF
2914 exec 5>>config.log
2915 {
2916 cat <<_ASUNAME
2917 ## --------- ##
2918 ## Platform. ##
2919 ## --------- ##
2920
2921 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2922 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2923 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2924 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2925 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2926
2927 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2928 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2929
2930 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2931 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2932 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2933 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2934 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2935 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2936 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2937
2938 _ASUNAME
2939
2940 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2941 for as_dir in $PATH
2942 do
2943 IFS=$as_save_IFS
2944 test -z "$as_dir" && as_dir=.
2945 $as_echo "PATH: $as_dir"
2946 done
2947 IFS=$as_save_IFS
2948
2949 } >&5
2950
2951 cat >&5 <<_ACEOF
2952
2953
2954 ## ----------- ##
2955 ## Core tests. ##
2956 ## ----------- ##
2957
2958 _ACEOF
2959
2960
2961 # Keep a trace of the command line.
2962 # Strip out --no-create and --no-recursion so they do not pile up.
2963 # Strip out --silent because we don't want to record it for future runs.
2964 # Also quote any args containing shell meta-characters.
2965 # Make two passes to allow for proper duplicate-argument suppression.
2966 ac_configure_args=
2967 ac_configure_args0=
2968 ac_configure_args1=
2969 ac_must_keep_next=false
2970 for ac_pass in 1 2
2971 do
2972 for ac_arg
2973 do
2974 case $ac_arg in
2975 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2976 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2977 | -silent | --silent | --silen | --sile | --sil)
2978 continue ;;
2979 *\'*)
2980 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2981 esac
2982 case $ac_pass in
2983 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2984 2)
2985 as_fn_append ac_configure_args1 " '$ac_arg'"
2986 if test $ac_must_keep_next = true; then
2987 ac_must_keep_next=false # Got value, back to normal.
2988 else
2989 case $ac_arg in
2990 *=* | --config-cache | -C | -disable-* | --disable-* \
2991 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2992 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2993 | -with-* | --with-* | -without-* | --without-* | --x)
2994 case "$ac_configure_args0 " in
2995 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2996 esac
2997 ;;
2998 -* ) ac_must_keep_next=true ;;
2999 esac
3000 fi
3001 as_fn_append ac_configure_args " '$ac_arg'"
3002 ;;
3003 esac
3004 done
3005 done
3006 { ac_configure_args0=; unset ac_configure_args0;}
3007 { ac_configure_args1=; unset ac_configure_args1;}
3008
3009 # When interrupted or exit'd, cleanup temporary files, and complete
3010 # config.log. We remove comments because anyway the quotes in there
3011 # would cause problems or look ugly.
3012 # WARNING: Use '\'' to represent an apostrophe within the trap.
3013 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3014 trap 'exit_status=$?
3015 # Save into config.log some information that might help in debugging.
3016 {
3017 echo
3018
3019 cat <<\_ASBOX
3020 ## ---------------- ##
3021 ## Cache variables. ##
3022 ## ---------------- ##
3023 _ASBOX
3024 echo
3025 # The following way of writing the cache mishandles newlines in values,
3026 (
3027 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3028 eval ac_val=\$$ac_var
3029 case $ac_val in #(
3030 *${as_nl}*)
3031 case $ac_var in #(
3032 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3033 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3034 esac
3035 case $ac_var in #(
3036 _ | IFS | as_nl) ;; #(
3037 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3038 *) { eval $ac_var=; unset $ac_var;} ;;
3039 esac ;;
3040 esac
3041 done
3042 (set) 2>&1 |
3043 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3044 *${as_nl}ac_space=\ *)
3045 sed -n \
3046 "s/'\''/'\''\\\\'\'''\''/g;
3047 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3048 ;; #(
3049 *)
3050 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3051 ;;
3052 esac |
3053 sort
3054 )
3055 echo
3056
3057 cat <<\_ASBOX
3058 ## ----------------- ##
3059 ## Output variables. ##
3060 ## ----------------- ##
3061 _ASBOX
3062 echo
3063 for ac_var in $ac_subst_vars
3064 do
3065 eval ac_val=\$$ac_var
3066 case $ac_val in
3067 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3068 esac
3069 $as_echo "$ac_var='\''$ac_val'\''"
3070 done | sort
3071 echo
3072
3073 if test -n "$ac_subst_files"; then
3074 cat <<\_ASBOX
3075 ## ------------------- ##
3076 ## File substitutions. ##
3077 ## ------------------- ##
3078 _ASBOX
3079 echo
3080 for ac_var in $ac_subst_files
3081 do
3082 eval ac_val=\$$ac_var
3083 case $ac_val in
3084 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3085 esac
3086 $as_echo "$ac_var='\''$ac_val'\''"
3087 done | sort
3088 echo
3089 fi
3090
3091 if test -s confdefs.h; then
3092 cat <<\_ASBOX
3093 ## ----------- ##
3094 ## confdefs.h. ##
3095 ## ----------- ##
3096 _ASBOX
3097 echo
3098 cat confdefs.h
3099 echo
3100 fi
3101 test "$ac_signal" != 0 &&
3102 $as_echo "$as_me: caught signal $ac_signal"
3103 $as_echo "$as_me: exit $exit_status"
3104 } >&5
3105 rm -f core *.core core.conftest.* &&
3106 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3107 exit $exit_status
3108 ' 0
3109 for ac_signal in 1 2 13 15; do
3110 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3111 done
3112 ac_signal=0
3113
3114 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3115 rm -f -r conftest* confdefs.h
3116
3117 $as_echo "/* confdefs.h */" > confdefs.h
3118
3119 # Predefined preprocessor variables.
3120
3121 cat >>confdefs.h <<_ACEOF
3122 #define PACKAGE_NAME "$PACKAGE_NAME"
3123 _ACEOF
3124
3125 cat >>confdefs.h <<_ACEOF
3126 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3127 _ACEOF
3128
3129 cat >>confdefs.h <<_ACEOF
3130 #define PACKAGE_VERSION "$PACKAGE_VERSION"
3131 _ACEOF
3132
3133 cat >>confdefs.h <<_ACEOF
3134 #define PACKAGE_STRING "$PACKAGE_STRING"
3135 _ACEOF
3136
3137 cat >>confdefs.h <<_ACEOF
3138 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3139 _ACEOF
3140
3141 cat >>confdefs.h <<_ACEOF
3142 #define PACKAGE_URL "$PACKAGE_URL"
3143 _ACEOF
3144
3145
3146 # Let the site file select an alternate cache file if it wants to.
3147 # Prefer an explicitly selected file to automatically selected ones.
3148 ac_site_file1=NONE
3149 ac_site_file2=NONE
3150 if test -n "$CONFIG_SITE"; then
3151 ac_site_file1=$CONFIG_SITE
3152 elif test "x$prefix" != xNONE; then
3153 ac_site_file1=$prefix/share/config.site
3154 ac_site_file2=$prefix/etc/config.site
3155 else
3156 ac_site_file1=$ac_default_prefix/share/config.site
3157 ac_site_file2=$ac_default_prefix/etc/config.site
3158 fi
3159 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3160 do
3161 test "x$ac_site_file" = xNONE && continue
3162 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3163 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3164 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
3165 sed 's/^/| /' "$ac_site_file" >&5
3166 . "$ac_site_file"
3167 fi
3168 done
3169
3170 if test -r "$cache_file"; then
3171 # Some versions of bash will fail to source /dev/null (special files
3172 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
3173 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3174 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3175 $as_echo "$as_me: loading cache $cache_file" >&6;}
3176 case $cache_file in
3177 [\\/]* | ?:[\\/]* ) . "$cache_file";;
3178 *) . "./$cache_file";;
3179 esac
3180 fi
3181 else
3182 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3183 $as_echo "$as_me: creating cache $cache_file" >&6;}
3184 >$cache_file
3185 fi
3186
3187 as_fn_append ac_header_list " linux/version.h"
3188 as_fn_append ac_header_list " sys/systeminfo.h"
3189 as_fn_append ac_header_list " stdio_ext.h"
3190 as_fn_append ac_header_list " fcntl.h"
3191 as_fn_append ac_header_list " coff.h"
3192 as_fn_append ac_header_list " pty.h"
3193 as_fn_append ac_header_list " sys/vlimit.h"
3194 as_fn_append ac_header_list " sys/resource.h"
3195 as_fn_append ac_header_list " sys/utsname.h"
3196 as_fn_append ac_header_list " pwd.h"
3197 as_fn_append ac_header_list " utmp.h"
3198 as_fn_append ac_header_list " dirent.h"
3199 as_fn_append ac_header_list " util.h"
3200 as_fn_append ac_header_list " sys/socket.h"
3201 as_fn_append ac_header_list " stdlib.h"
3202 as_fn_append ac_header_list " unistd.h"
3203 as_fn_append ac_header_list " sys/param.h"
3204 as_fn_append ac_header_list " pthread.h"
3205 as_fn_append ac_header_list " malloc/malloc.h"
3206 as_fn_append ac_header_list " maillock.h"
3207 as_fn_append ac_header_list " sys/un.h"
3208 as_fn_append ac_func_list " tzset"
3209 as_fn_append ac_func_list " readlinkat"
3210 as_fn_append ac_header_list " execinfo.h"
3211 gl_getopt_required=GNU
3212 as_fn_append ac_header_list " getopt.h"
3213 as_fn_append ac_func_list " gettimeofday"
3214 as_fn_append ac_func_list " nanotime"
3215 as_fn_append ac_header_list " sys/time.h"
3216 as_fn_append ac_header_list " wchar.h"
3217 as_fn_append ac_header_list " stdint.h"
3218 as_fn_append ac_header_list " inttypes.h"
3219 as_fn_append ac_func_list " lstat"
3220 as_fn_append ac_func_list " alarm"
3221 as_fn_append ac_header_list " sys/select.h"
3222 as_fn_append ac_func_list " pselect"
3223 as_fn_append ac_func_list " pthread_sigmask"
3224 as_fn_append ac_func_list " readlink"
3225 as_fn_append ac_func_list " strtoimax"
3226 as_fn_append ac_func_list " strtoumax"
3227 as_fn_append ac_func_list " symlink"
3228 as_fn_append ac_header_list " sys/stat.h"
3229 as_fn_append ac_func_list " localtime_r"
3230 as_fn_append ac_header_list " utime.h"
3231 as_fn_append ac_func_list " futimes"
3232 as_fn_append ac_func_list " futimesat"
3233 as_fn_append ac_func_list " futimens"
3234 as_fn_append ac_func_list " utimensat"
3235 as_fn_append ac_func_list " lutimes"
3236 # Check that the precious variables saved in the cache have kept the same
3237 # value.
3238 ac_cache_corrupted=false
3239 for ac_var in $ac_precious_vars; do
3240 eval ac_old_set=\$ac_cv_env_${ac_var}_set
3241 eval ac_new_set=\$ac_env_${ac_var}_set
3242 eval ac_old_val=\$ac_cv_env_${ac_var}_value
3243 eval ac_new_val=\$ac_env_${ac_var}_value
3244 case $ac_old_set,$ac_new_set in
3245 set,)
3246 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3247 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3248 ac_cache_corrupted=: ;;
3249 ,set)
3250 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3251 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3252 ac_cache_corrupted=: ;;
3253 ,);;
3254 *)
3255 if test "x$ac_old_val" != "x$ac_new_val"; then
3256 # differences in whitespace do not lead to failure.
3257 ac_old_val_w=`echo x $ac_old_val`
3258 ac_new_val_w=`echo x $ac_new_val`
3259 if test "$ac_old_val_w" != "$ac_new_val_w"; then
3260 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3261 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3262 ac_cache_corrupted=:
3263 else
3264 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3265 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3266 eval $ac_var=\$ac_old_val
3267 fi
3268 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
3269 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
3270 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
3271 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
3272 fi;;
3273 esac
3274 # Pass precious variables to config.status.
3275 if test "$ac_new_set" = set; then
3276 case $ac_new_val in
3277 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3278 *) ac_arg=$ac_var=$ac_new_val ;;
3279 esac
3280 case " $ac_configure_args " in
3281 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
3282 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3283 esac
3284 fi
3285 done
3286 if $ac_cache_corrupted; then
3287 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3288 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3289 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3290 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3291 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3292 fi
3293 ## -------------------- ##
3294 ## Main body of script. ##
3295 ## -------------------- ##
3296
3297 ac_ext=c
3298 ac_cpp='$CPP $CPPFLAGS'
3299 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3300 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3301 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3302
3303
3304 ac_config_headers="$ac_config_headers src/config.h:src/config.in"
3305
3306
3307 ac_aux_dir=
3308 for ac_dir in build-aux "$srcdir"/build-aux; do
3309 for ac_t in install-sh install.sh shtool; do
3310 if test -f "$ac_dir/$ac_t"; then
3311 ac_aux_dir=$ac_dir
3312 ac_install_sh="$ac_aux_dir/$ac_t -c"
3313 break 2
3314 fi
3315 done
3316 done
3317 if test -z "$ac_aux_dir"; then
3318 as_fn_error "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
3319 fi
3320
3321 # These three variables are undocumented and unsupported,
3322 # and are intended to be withdrawn in a future Autoconf release.
3323 # They can cause serious problems if a builder's source tree is in a directory
3324 # whose full name contains unusual characters.
3325 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
3326 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
3327 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
3328
3329
3330 am__api_version='1.11'
3331
3332 # Find a good install program. We prefer a C program (faster),
3333 # so one script is as good as another. But avoid the broken or
3334 # incompatible versions:
3335 # SysV /etc/install, /usr/sbin/install
3336 # SunOS /usr/etc/install
3337 # IRIX /sbin/install
3338 # AIX /bin/install
3339 # AmigaOS /C/install, which installs bootblocks on floppy discs
3340 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3341 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3342 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3343 # OS/2's system install, which has a completely different semantic
3344 # ./install, which can be erroneously created by make from ./install.sh.
3345 # Reject install programs that cannot install multiple files.
3346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
3347 $as_echo_n "checking for a BSD-compatible install... " >&6; }
3348 if test -z "$INSTALL"; then
3349 if test "${ac_cv_path_install+set}" = set; then :
3350 $as_echo_n "(cached) " >&6
3351 else
3352 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3353 for as_dir in $PATH
3354 do
3355 IFS=$as_save_IFS
3356 test -z "$as_dir" && as_dir=.
3357 # Account for people who put trailing slashes in PATH elements.
3358 case $as_dir/ in #((
3359 ./ | .// | /[cC]/* | \
3360 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3361 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
3362 /usr/ucb/* ) ;;
3363 *)
3364 # OSF1 and SCO ODT 3.0 have their own names for install.
3365 # Don't use installbsd from OSF since it installs stuff as root
3366 # by default.
3367 for ac_prog in ginstall scoinst install; do
3368 for ac_exec_ext in '' $ac_executable_extensions; do
3369 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
3370 if test $ac_prog = install &&
3371 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3372 # AIX install. It has an incompatible calling convention.
3373 :
3374 elif test $ac_prog = install &&
3375 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3376 # program-specific install script used by HP pwplus--don't use.
3377 :
3378 else
3379 rm -rf conftest.one conftest.two conftest.dir
3380 echo one > conftest.one
3381 echo two > conftest.two
3382 mkdir conftest.dir
3383 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
3384 test -s conftest.one && test -s conftest.two &&
3385 test -s conftest.dir/conftest.one &&
3386 test -s conftest.dir/conftest.two
3387 then
3388 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3389 break 3
3390 fi
3391 fi
3392 fi
3393 done
3394 done
3395 ;;
3396 esac
3397
3398 done
3399 IFS=$as_save_IFS
3400
3401 rm -rf conftest.one conftest.two conftest.dir
3402
3403 fi
3404 if test "${ac_cv_path_install+set}" = set; then
3405 INSTALL=$ac_cv_path_install
3406 else
3407 # As a last resort, use the slow shell script. Don't cache a
3408 # value for INSTALL within a source directory, because that will
3409 # break other packages using the cache if that directory is
3410 # removed, or if the value is a relative name.
3411 INSTALL=$ac_install_sh
3412 fi
3413 fi
3414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
3415 $as_echo "$INSTALL" >&6; }
3416
3417 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3418 # It thinks the first close brace ends the variable substitution.
3419 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3420
3421 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3422
3423 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3424
3425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
3426 $as_echo_n "checking whether build environment is sane... " >&6; }
3427 # Just in case
3428 sleep 1
3429 echo timestamp > conftest.file
3430 # Reject unsafe characters in $srcdir or the absolute working directory
3431 # name. Accept space and tab only in the latter.
3432 am_lf='
3433 '
3434 case `pwd` in
3435 *[\\\"\#\$\&\'\`$am_lf]*)
3436 as_fn_error "unsafe absolute working directory name" "$LINENO" 5;;
3437 esac
3438 case $srcdir in
3439 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
3440 as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
3441 esac
3442
3443 # Do `set' in a subshell so we don't clobber the current shell's
3444 # arguments. Must try -L first in case configure is actually a
3445 # symlink; some systems play weird games with the mod time of symlinks
3446 # (eg FreeBSD returns the mod time of the symlink's containing
3447 # directory).
3448 if (
3449 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
3450 if test "$*" = "X"; then
3451 # -L didn't work.
3452 set X `ls -t "$srcdir/configure" conftest.file`
3453 fi
3454 rm -f conftest.file
3455 if test "$*" != "X $srcdir/configure conftest.file" \
3456 && test "$*" != "X conftest.file $srcdir/configure"; then
3457
3458 # If neither matched, then we have a broken ls. This can happen
3459 # if, for instance, CONFIG_SHELL is bash and it inherits a
3460 # broken ls alias from the environment. This has actually
3461 # happened. Such a system could not be considered "sane".
3462 as_fn_error "ls -t appears to fail. Make sure there is not a broken
3463 alias in your environment" "$LINENO" 5
3464 fi
3465
3466 test "$2" = conftest.file
3467 )
3468 then
3469 # Ok.
3470 :
3471 else
3472 as_fn_error "newly created file is older than distributed files!
3473 Check your system clock" "$LINENO" 5
3474 fi
3475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3476 $as_echo "yes" >&6; }
3477 test "$program_prefix" != NONE &&
3478 program_transform_name="s&^&$program_prefix&;$program_transform_name"
3479 # Use a double $ so make ignores it.
3480 test "$program_suffix" != NONE &&
3481 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
3482 # Double any \ or $.
3483 # By default was `s,x,x', remove it if useless.
3484 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
3485 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
3486
3487 # expand $ac_aux_dir to an absolute path
3488 am_aux_dir=`cd $ac_aux_dir && pwd`
3489
3490 if test x"${MISSING+set}" != xset; then
3491 case $am_aux_dir in
3492 *\ * | *\ *)
3493 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
3494 *)
3495 MISSING="\${SHELL} $am_aux_dir/missing" ;;
3496 esac
3497 fi
3498 # Use eval to expand $SHELL
3499 if eval "$MISSING --run true"; then
3500 am_missing_run="$MISSING --run "
3501 else
3502 am_missing_run=
3503 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
3504 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
3505 fi
3506
3507 if test x"${install_sh}" != xset; then
3508 case $am_aux_dir in
3509 *\ * | *\ *)
3510 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
3511 *)
3512 install_sh="\${SHELL} $am_aux_dir/install-sh"
3513 esac
3514 fi
3515
3516 # Installed binaries are usually stripped using `strip' when the user
3517 # run `make install-strip'. However `strip' might not be the right
3518 # tool to use in cross-compilation environments, therefore Automake
3519 # will honor the `STRIP' environment variable to overrule this program.
3520 if test "$cross_compiling" != no; then
3521 if test -n "$ac_tool_prefix"; then
3522 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
3523 set dummy ${ac_tool_prefix}strip; ac_word=$2
3524 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3525 $as_echo_n "checking for $ac_word... " >&6; }
3526 if test "${ac_cv_prog_STRIP+set}" = set; then :
3527 $as_echo_n "(cached) " >&6
3528 else
3529 if test -n "$STRIP"; then
3530 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
3531 else
3532 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3533 for as_dir in $PATH
3534 do
3535 IFS=$as_save_IFS
3536 test -z "$as_dir" && as_dir=.
3537 for ac_exec_ext in '' $ac_executable_extensions; do
3538 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3539 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
3540 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3541 break 2
3542 fi
3543 done
3544 done
3545 IFS=$as_save_IFS
3546
3547 fi
3548 fi
3549 STRIP=$ac_cv_prog_STRIP
3550 if test -n "$STRIP"; then
3551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
3552 $as_echo "$STRIP" >&6; }
3553 else
3554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3555 $as_echo "no" >&6; }
3556 fi
3557
3558
3559 fi
3560 if test -z "$ac_cv_prog_STRIP"; then
3561 ac_ct_STRIP=$STRIP
3562 # Extract the first word of "strip", so it can be a program name with args.
3563 set dummy strip; ac_word=$2
3564 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3565 $as_echo_n "checking for $ac_word... " >&6; }
3566 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
3567 $as_echo_n "(cached) " >&6
3568 else
3569 if test -n "$ac_ct_STRIP"; then
3570 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
3571 else
3572 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3573 for as_dir in $PATH
3574 do
3575 IFS=$as_save_IFS
3576 test -z "$as_dir" && as_dir=.
3577 for ac_exec_ext in '' $ac_executable_extensions; do
3578 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3579 ac_cv_prog_ac_ct_STRIP="strip"
3580 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3581 break 2
3582 fi
3583 done
3584 done
3585 IFS=$as_save_IFS
3586
3587 fi
3588 fi
3589 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
3590 if test -n "$ac_ct_STRIP"; then
3591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
3592 $as_echo "$ac_ct_STRIP" >&6; }
3593 else
3594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3595 $as_echo "no" >&6; }
3596 fi
3597
3598 if test "x$ac_ct_STRIP" = x; then
3599 STRIP=":"
3600 else
3601 case $cross_compiling:$ac_tool_warned in
3602 yes:)
3603 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3604 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3605 ac_tool_warned=yes ;;
3606 esac
3607 STRIP=$ac_ct_STRIP
3608 fi
3609 else
3610 STRIP="$ac_cv_prog_STRIP"
3611 fi
3612
3613 fi
3614 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
3615
3616 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
3617 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
3618 if test -z "$MKDIR_P"; then
3619 if test "${ac_cv_path_mkdir+set}" = set; then :
3620 $as_echo_n "(cached) " >&6
3621 else
3622 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3623 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
3624 do
3625 IFS=$as_save_IFS
3626 test -z "$as_dir" && as_dir=.
3627 for ac_prog in mkdir gmkdir; do
3628 for ac_exec_ext in '' $ac_executable_extensions; do
3629 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
3630 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
3631 'mkdir (GNU coreutils) '* | \
3632 'mkdir (coreutils) '* | \
3633 'mkdir (fileutils) '4.1*)
3634 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
3635 break 3;;
3636 esac
3637 done
3638 done
3639 done
3640 IFS=$as_save_IFS
3641
3642 fi
3643
3644 test -d ./--version && rmdir ./--version
3645 if test "${ac_cv_path_mkdir+set}" = set; then
3646 MKDIR_P="$ac_cv_path_mkdir -p"
3647 else
3648 # As a last resort, use the slow shell script. Don't cache a
3649 # value for MKDIR_P within a source directory, because that will
3650 # break other packages using the cache if that directory is
3651 # removed, or if the value is a relative name.
3652 MKDIR_P="$ac_install_sh -d"
3653 fi
3654 fi
3655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
3656 $as_echo "$MKDIR_P" >&6; }
3657
3658
3659 mkdir_p="$MKDIR_P"
3660 case $mkdir_p in
3661 [\\/$]* | ?:[\\/]*) ;;
3662 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
3663 esac
3664
3665 for ac_prog in gawk mawk nawk awk
3666 do
3667 # Extract the first word of "$ac_prog", so it can be a program name with args.
3668 set dummy $ac_prog; ac_word=$2
3669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3670 $as_echo_n "checking for $ac_word... " >&6; }
3671 if test "${ac_cv_prog_AWK+set}" = set; then :
3672 $as_echo_n "(cached) " >&6
3673 else
3674 if test -n "$AWK"; then
3675 ac_cv_prog_AWK="$AWK" # Let the user override the test.
3676 else
3677 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3678 for as_dir in $PATH
3679 do
3680 IFS=$as_save_IFS
3681 test -z "$as_dir" && as_dir=.
3682 for ac_exec_ext in '' $ac_executable_extensions; do
3683 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3684 ac_cv_prog_AWK="$ac_prog"
3685 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3686 break 2
3687 fi
3688 done
3689 done
3690 IFS=$as_save_IFS
3691
3692 fi
3693 fi
3694 AWK=$ac_cv_prog_AWK
3695 if test -n "$AWK"; then
3696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
3697 $as_echo "$AWK" >&6; }
3698 else
3699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3700 $as_echo "no" >&6; }
3701 fi
3702
3703
3704 test -n "$AWK" && break
3705 done
3706
3707 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3708 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
3709 set x ${MAKE-make}
3710 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
3711 if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
3712 $as_echo_n "(cached) " >&6
3713 else
3714 cat >conftest.make <<\_ACEOF
3715 SHELL = /bin/sh
3716 all:
3717 @echo '@@@%%%=$(MAKE)=@@@%%%'
3718 _ACEOF
3719 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3720 case `${MAKE-make} -f conftest.make 2>/dev/null` in
3721 *@@@%%%=?*=@@@%%%*)
3722 eval ac_cv_prog_make_${ac_make}_set=yes;;
3723 *)
3724 eval ac_cv_prog_make_${ac_make}_set=no;;
3725 esac
3726 rm -f conftest.make
3727 fi
3728 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3730 $as_echo "yes" >&6; }
3731 SET_MAKE=
3732 else
3733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3734 $as_echo "no" >&6; }
3735 SET_MAKE="MAKE=${MAKE-make}"
3736 fi
3737
3738 rm -rf .tst 2>/dev/null
3739 mkdir .tst 2>/dev/null
3740 if test -d .tst; then
3741 am__leading_dot=.
3742 else
3743 am__leading_dot=_
3744 fi
3745 rmdir .tst 2>/dev/null
3746
3747 if test "`cd $srcdir && pwd`" != "`pwd`"; then
3748 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
3749 # is not polluted with repeated "-I."
3750 am__isrc=' -I$(srcdir)'
3751 # test to see if srcdir already configured
3752 if test -f $srcdir/config.status; then
3753 as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
3754 fi
3755 fi
3756
3757 # test whether we have cygpath
3758 if test -z "$CYGPATH_W"; then
3759 if (cygpath --version) >/dev/null 2>/dev/null; then
3760 CYGPATH_W='cygpath -w'
3761 else
3762 CYGPATH_W=echo
3763 fi
3764 fi
3765
3766
3767 # Define the identity of the package.
3768 PACKAGE='emacs'
3769 VERSION='24.2.93'
3770
3771
3772 cat >>confdefs.h <<_ACEOF
3773 #define PACKAGE "$PACKAGE"
3774 _ACEOF
3775
3776
3777 cat >>confdefs.h <<_ACEOF
3778 #define VERSION "$VERSION"
3779 _ACEOF
3780
3781 # Some tools Automake needs.
3782
3783 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
3784
3785
3786 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
3787
3788
3789 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
3790
3791
3792 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
3793
3794
3795 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
3796
3797 # We need awk for the "check" target. The system "awk" is bad on
3798 # some platforms.
3799 # Always define AMTAR for backward compatibility.
3800
3801 AMTAR=${AMTAR-"${am_missing_run}tar"}
3802
3803 am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
3804
3805
3806
3807
3808
3809
3810
3811
3812 lispdir='${datadir}/emacs/${version}/lisp'
3813 leimdir='${datadir}/emacs/${version}/leim'
3814 standardlisppath='${lispdir}:${leimdir}'
3815 locallisppath='${datadir}/emacs/${version}/site-lisp:'\
3816 '${datadir}/emacs/site-lisp'
3817 lisppath='${locallisppath}:${standardlisppath}'
3818 etcdir='${datadir}/emacs/${version}/etc'
3819 archlibdir='${libexecdir}/emacs/${version}/${configuration}'
3820 docdir='${datadir}/emacs/${version}/etc'
3821 gamedir='${localstatedir}/games/emacs'
3822
3823
3824 # Check whether --with-all was given.
3825 if test "${with_all+set}" = set; then :
3826 withval=$with_all; with_features=$withval
3827 else
3828 with_features=yes
3829 fi
3830
3831
3832
3833
3834
3835 # Check whether --with-pop was given.
3836 if test "${with_pop+set}" = set; then :
3837 withval=$with_pop;
3838 else
3839 with_pop=$with_features
3840 fi
3841
3842 if test "$with_pop" = yes; then
3843 $as_echo "#define MAIL_USE_POP 1" >>confdefs.h
3844
3845 fi
3846
3847
3848 # Check whether --with-kerberos was given.
3849 if test "${with_kerberos+set}" = set; then :
3850 withval=$with_kerberos;
3851 else
3852 with_kerberos=no
3853 fi
3854
3855 if test "$with_kerberos" != no; then
3856 $as_echo "#define KERBEROS 1" >>confdefs.h
3857
3858 fi
3859
3860
3861 # Check whether --with-kerberos5 was given.
3862 if test "${with_kerberos5+set}" = set; then :
3863 withval=$with_kerberos5;
3864 else
3865 with_kerberos5=no
3866 fi
3867
3868 if test "${with_kerberos5}" != no; then
3869 if test "${with_kerberos}" = no; then
3870 with_kerberos=yes
3871 $as_echo "#define KERBEROS 1" >>confdefs.h
3872
3873 fi
3874
3875 $as_echo "#define KERBEROS5 1" >>confdefs.h
3876
3877 fi
3878
3879
3880 # Check whether --with-hesiod was given.
3881 if test "${with_hesiod+set}" = set; then :
3882 withval=$with_hesiod;
3883 else
3884 with_hesiod=no
3885 fi
3886
3887 if test "$with_hesiod" != no; then
3888
3889 $as_echo "#define HESIOD 1" >>confdefs.h
3890
3891 fi
3892
3893
3894 # Check whether --with-mmdf was given.
3895 if test "${with_mmdf+set}" = set; then :
3896 withval=$with_mmdf;
3897 else
3898 with_mmdf=no
3899 fi
3900
3901 if test "$with_mmdf" != no; then
3902
3903 $as_echo "#define MAIL_USE_MMDF 1" >>confdefs.h
3904
3905 fi
3906
3907
3908 # Check whether --with-mail-unlink was given.
3909 if test "${with_mail_unlink+set}" = set; then :
3910 withval=$with_mail_unlink;
3911 else
3912 with_mail_unlink=no
3913 fi
3914
3915 if test "$with_mail_unlink" != no; then
3916
3917 $as_echo "#define MAIL_UNLINK_SPOOL 1" >>confdefs.h
3918
3919 fi
3920
3921
3922 # Check whether --with-mailhost was given.
3923 if test "${with_mailhost+set}" = set; then :
3924 withval=$with_mailhost;
3925 cat >>confdefs.h <<_ACEOF
3926 #define MAILHOST "$withval"
3927 _ACEOF
3928
3929 fi
3930
3931
3932
3933 # Check whether --with-sound was given.
3934 if test "${with_sound+set}" = set; then :
3935 withval=$with_sound;
3936 else
3937 with_sound=$with_features
3938 fi
3939
3940
3941
3942 # Check whether --with-x-toolkit was given.
3943 if test "${with_x_toolkit+set}" = set; then :
3944 withval=$with_x_toolkit; case "${withval}" in
3945 y | ye | yes ) val=gtk ;;
3946 n | no ) val=no ;;
3947 l | lu | luc | luci | lucid ) val=lucid ;;
3948 a | at | ath | athe | athen | athena ) val=athena ;;
3949 m | mo | mot | moti | motif ) val=motif ;;
3950 g | gt | gtk ) val=gtk ;;
3951 gtk2 ) val=gtk2 ;;
3952 gtk3 ) val=gtk3 ;;
3953 * )
3954 as_fn_error "\`--with-x-toolkit=$withval' is invalid;
3955 this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif', \`gtk',
3956 \`gtk2' or \`gtk3'. \`yes' and \`gtk' are synonyms.
3957 \`athena' and \`lucid' are synonyms." "$LINENO" 5
3958 ;;
3959 esac
3960 with_x_toolkit=$val
3961
3962 fi
3963
3964
3965
3966 # Check whether --with-wide-int was given.
3967 if test "${with_wide_int+set}" = set; then :
3968 withval=$with_wide_int;
3969 else
3970 with_wide_int=no
3971 fi
3972
3973 if test "$with_wide_int" = yes; then
3974
3975 $as_echo "#define WIDE_EMACS_INT 1" >>confdefs.h
3976
3977 fi
3978
3979
3980 # Check whether --with-xpm was given.
3981 if test "${with_xpm+set}" = set; then :
3982 withval=$with_xpm;
3983 else
3984 with_xpm=$with_features
3985 fi
3986
3987
3988 # Check whether --with-jpeg was given.
3989 if test "${with_jpeg+set}" = set; then :
3990 withval=$with_jpeg;
3991 else
3992 with_jpeg=$with_features
3993 fi
3994
3995
3996 # Check whether --with-tiff was given.
3997 if test "${with_tiff+set}" = set; then :
3998 withval=$with_tiff;
3999 else
4000 with_tiff=$with_features
4001 fi
4002
4003
4004 # Check whether --with-gif was given.
4005 if test "${with_gif+set}" = set; then :
4006 withval=$with_gif;
4007 else
4008 with_gif=$with_features
4009 fi
4010
4011
4012 # Check whether --with-png was given.
4013 if test "${with_png+set}" = set; then :
4014 withval=$with_png;
4015 else
4016 with_png=$with_features
4017 fi
4018
4019
4020 # Check whether --with-rsvg was given.
4021 if test "${with_rsvg+set}" = set; then :
4022 withval=$with_rsvg;
4023 else
4024 with_rsvg=$with_features
4025 fi
4026
4027
4028 # Check whether --with-xml2 was given.
4029 if test "${with_xml2+set}" = set; then :
4030 withval=$with_xml2;
4031 else
4032 with_xml2=$with_features
4033 fi
4034
4035
4036 # Check whether --with-imagemagick was given.
4037 if test "${with_imagemagick+set}" = set; then :
4038 withval=$with_imagemagick;
4039 else
4040 with_imagemagick=$with_features
4041 fi
4042
4043
4044
4045 # Check whether --with-xft was given.
4046 if test "${with_xft+set}" = set; then :
4047 withval=$with_xft;
4048 else
4049 with_xft=$with_features
4050 fi
4051
4052
4053 # Check whether --with-libotf was given.
4054 if test "${with_libotf+set}" = set; then :
4055 withval=$with_libotf;
4056 else
4057 with_libotf=$with_features
4058 fi
4059
4060
4061 # Check whether --with-m17n-flt was given.
4062 if test "${with_m17n_flt+set}" = set; then :
4063 withval=$with_m17n_flt;
4064 else
4065 with_m17n_flt=$with_features
4066 fi
4067
4068
4069
4070 # Check whether --with-toolkit-scroll-bars was given.
4071 if test "${with_toolkit_scroll_bars+set}" = set; then :
4072 withval=$with_toolkit_scroll_bars;
4073 else
4074 with_toolkit_scroll_bars=$with_features
4075 fi
4076
4077
4078 # Check whether --with-xaw3d was given.
4079 if test "${with_xaw3d+set}" = set; then :
4080 withval=$with_xaw3d;
4081 else
4082 with_xaw3d=$with_features
4083 fi
4084
4085
4086 # Check whether --with-xim was given.
4087 if test "${with_xim+set}" = set; then :
4088 withval=$with_xim;
4089 else
4090 with_xim=$with_features
4091 fi
4092
4093
4094 # Check whether --with-ns was given.
4095 if test "${with_ns+set}" = set; then :
4096 withval=$with_ns;
4097 else
4098 with_ns=no
4099 fi
4100
4101
4102 # Check whether --with-w32 was given.
4103 if test "${with_w32+set}" = set; then :
4104 withval=$with_w32;
4105 else
4106 with_w32=no
4107 fi
4108
4109
4110
4111 # Check whether --with-gpm was given.
4112 if test "${with_gpm+set}" = set; then :
4113 withval=$with_gpm;
4114 else
4115 with_gpm=$with_features
4116 fi
4117
4118
4119 # Check whether --with-dbus was given.
4120 if test "${with_dbus+set}" = set; then :
4121 withval=$with_dbus;
4122 else
4123 with_dbus=$with_features
4124 fi
4125
4126
4127 # Check whether --with-gconf was given.
4128 if test "${with_gconf+set}" = set; then :
4129 withval=$with_gconf;
4130 else
4131 with_gconf=$with_features
4132 fi
4133
4134
4135 # Check whether --with-gsettings was given.
4136 if test "${with_gsettings+set}" = set; then :
4137 withval=$with_gsettings;
4138 else
4139 with_gsettings=$with_features
4140 fi
4141
4142
4143 # Check whether --with-selinux was given.
4144 if test "${with_selinux+set}" = set; then :
4145 withval=$with_selinux;
4146 else
4147 with_selinux=$with_features
4148 fi
4149
4150
4151 # Check whether --with-gnutls was given.
4152 if test "${with_gnutls+set}" = set; then :
4153 withval=$with_gnutls;
4154 else
4155 with_gnutls=$with_features
4156 fi
4157
4158
4159 ## For the times when you want to build Emacs but don't have
4160 ## a suitable makeinfo, and can live without the manuals.
4161
4162 # Check whether --with-makeinfo was given.
4163 if test "${with_makeinfo+set}" = set; then :
4164 withval=$with_makeinfo;
4165 else
4166 with_makeinfo=$with_features
4167 fi
4168
4169
4170 ## Makefile.in needs the cache file name.
4171
4172
4173 ## This is an option because I do not know if all info/man support
4174 ## compressed files, nor how to test if they do so.
4175
4176 # Check whether --with-compress-info was given.
4177 if test "${with_compress_info+set}" = set; then :
4178 withval=$with_compress_info;
4179 else
4180 with_compress_info=$with_features
4181 fi
4182
4183 if test $with_compress_info = yes; then
4184 GZIP_INFO=yes
4185 else
4186 GZIP_INFO=
4187 fi
4188
4189
4190
4191 # Check whether --with-pkg-config-prog was given.
4192 if test "${with_pkg_config_prog+set}" = set; then :
4193 withval=$with_pkg_config_prog;
4194 fi
4195
4196 if test "X${with_pkg_config_prog}" != X; then
4197 if test "${with_pkg_config_prog}" != yes; then
4198 PKG_CONFIG="${with_pkg_config_prog}"
4199 fi
4200 fi
4201
4202 CRT_DIR=
4203
4204 # Check whether --with-crt-dir was given.
4205 if test "${with_crt_dir+set}" = set; then :
4206 withval=$with_crt_dir;
4207 fi
4208
4209 CRT_DIR="${with_crt_dir}"
4210
4211
4212 # Check whether --with-gameuser was given.
4213 if test "${with_gameuser+set}" = set; then :
4214 withval=$with_gameuser;
4215 fi
4216
4217 test "X${with_gameuser}" != X && test "${with_gameuser}" != yes \
4218 && gameuser="${with_gameuser}"
4219 test "X$gameuser" = X && gameuser=games
4220
4221
4222 # Check whether --with-gnustep-conf was given.
4223 if test "${with_gnustep_conf+set}" = set; then :
4224 withval=$with_gnustep_conf;
4225 fi
4226
4227 test "X${with_gnustep_conf}" != X && test "${with_gnustep_conf}" != yes && \
4228 GNUSTEP_CONFIG_FILE="${with_gnustep_conf}"
4229 test "X$GNUSTEP_CONFIG_FILE" = "X" && \
4230 GNUSTEP_CONFIG_FILE=/etc/GNUstep/GNUstep.conf
4231
4232 # Check whether --enable-ns-self-contained was given.
4233 if test "${enable_ns_self_contained+set}" = set; then :
4234 enableval=$enable_ns_self_contained; EN_NS_SELF_CONTAINED=$enableval
4235 else
4236 EN_NS_SELF_CONTAINED=yes
4237 fi
4238
4239
4240 # Check whether --enable-locallisppath was given.
4241 if test "${enable_locallisppath+set}" = set; then :
4242 enableval=$enable_locallisppath; if test "${enableval}" = "no"; then
4243 locallisppath=
4244 elif test "${enableval}" != "yes"; then
4245 locallisppath=${enableval}
4246 fi
4247 fi
4248
4249
4250 # Check whether --enable-checking was given.
4251 if test "${enable_checking+set}" = set; then :
4252 enableval=$enable_checking; ac_checking_flags="${enableval}"
4253 fi
4254
4255 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
4256 for check in $ac_checking_flags
4257 do
4258 case $check in
4259 # these set all the flags to specific states
4260 yes) ac_enable_checking=1 ;;
4261 no) ac_enable_checking= ;
4262 ac_gc_check_stringbytes= ;
4263 ac_gc_check_string_overrun= ;
4264 ac_gc_check_string_free_list= ;
4265 ac_xmalloc_overrun= ;
4266 ac_gc_check_cons_list= ;
4267 ac_glyphs_debug= ;;
4268 all) ac_enable_checking=1 ;
4269 ac_gc_check_stringbytes=1 ;
4270 ac_gc_check_string_overrun=1 ;
4271 ac_gc_check_string_free_list=1 ;
4272 ac_xmalloc_overrun=1 ;
4273 ac_gc_check_cons_list=1 ;
4274 ac_glyphs_debug=1 ;;
4275 # these enable particular checks
4276 stringbytes) ac_gc_check_stringbytes=1 ;;
4277 stringoverrun) ac_gc_check_string_overrun=1 ;;
4278 stringfreelist) ac_gc_check_string_free_list=1 ;;
4279 xmallocoverrun) ac_xmalloc_overrun=1 ;;
4280 conslist) ac_gc_check_cons_list=1 ;;
4281 glyphs) ac_glyphs_debug=1 ;;
4282 *) as_fn_error "unknown check category $check" "$LINENO" 5 ;;
4283 esac
4284 done
4285 IFS="$ac_save_IFS"
4286
4287 if test x$ac_enable_checking != x ; then
4288
4289 $as_echo "#define ENABLE_CHECKING 1" >>confdefs.h
4290
4291 fi
4292 if test x$ac_gc_check_stringbytes != x ; then
4293
4294 $as_echo "#define GC_CHECK_STRING_BYTES 1" >>confdefs.h
4295
4296 fi
4297 if test x$ac_gc_check_string_overrun != x ; then
4298
4299 $as_echo "#define GC_CHECK_STRING_OVERRUN 1" >>confdefs.h
4300
4301 fi
4302 if test x$ac_gc_check_string_free_list != x ; then
4303
4304 $as_echo "#define GC_CHECK_STRING_FREE_LIST 1" >>confdefs.h
4305
4306 fi
4307 if test x$ac_xmalloc_overrun != x ; then
4308
4309 $as_echo "#define XMALLOC_OVERRUN_CHECK 1" >>confdefs.h
4310
4311 fi
4312 if test x$ac_gc_check_cons_list != x ; then
4313
4314 $as_echo "#define GC_CHECK_CONS_LIST 1" >>confdefs.h
4315
4316 fi
4317 if test x$ac_glyphs_debug != x ; then
4318
4319 $as_echo "#define GLYPH_DEBUG 1" >>confdefs.h
4320
4321 fi
4322
4323 # Check whether --enable-check-lisp-object-type was given.
4324 if test "${enable_check_lisp_object_type+set}" = set; then :
4325 enableval=$enable_check_lisp_object_type; if test "${enableval}" != "no"; then
4326
4327 $as_echo "#define CHECK_LISP_OBJECT_TYPE 1" >>confdefs.h
4328
4329 fi
4330 fi
4331
4332
4333
4334 # Check whether --enable-profiling was given.
4335 if test "${enable_profiling+set}" = set; then :
4336 enableval=$enable_profiling; ac_enable_profiling="${enableval}"
4337 fi
4338
4339 if test x$ac_enable_profiling != x ; then
4340 PROFILING_CFLAGS="-DPROFILING=1 -pg"
4341 else
4342 PROFILING_CFLAGS=
4343 fi
4344
4345
4346 # Check whether --enable-autodepend was given.
4347 if test "${enable_autodepend+set}" = set; then :
4348 enableval=$enable_autodepend; ac_enable_autodepend="${enableval}"
4349 else
4350 ac_enable_autodepend=yes
4351 fi
4352
4353
4354 #### Make srcdir absolute, if it isn't already. It's important to
4355 #### avoid running the path through pwd unnecessarily, since pwd can
4356 #### give you automounter prefixes, which can go away. We do all this
4357 #### so Emacs can find its files when run uninstalled.
4358 ## Make sure CDPATH doesn't affect cd (in case PWD is relative).
4359 unset CDPATH
4360 case "${srcdir}" in
4361 /* ) ;;
4362 . )
4363 ## We may be able to use the $PWD environment variable to make this
4364 ## absolute. But sometimes PWD is inaccurate.
4365 ## Note: we used to use ${PWD} at the end instead of `pwd`,
4366 ## but that tested only for a well-formed and valid PWD,
4367 ## it did not object when PWD was well-formed and valid but just wrong.
4368 if test ".${PWD}" != "." && test ".`(cd ${PWD} ; sh -c pwd)`" = ".`pwd`" ;
4369 then
4370 srcdir="$PWD"
4371 else
4372 srcdir="`(cd ${srcdir}; pwd)`"
4373 fi
4374 ;;
4375 * ) srcdir="`(cd ${srcdir}; pwd)`" ;;
4376 esac
4377
4378 ### Canonicalize the configuration name.
4379
4380 # Make sure we can run config.sub.
4381 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
4382 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
4383
4384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4385 $as_echo_n "checking build system type... " >&6; }
4386 if test "${ac_cv_build+set}" = set; then :
4387 $as_echo_n "(cached) " >&6
4388 else
4389 ac_build_alias=$build_alias
4390 test "x$ac_build_alias" = x &&
4391 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4392 test "x$ac_build_alias" = x &&
4393 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
4394 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
4395 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
4396
4397 fi
4398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4399 $as_echo "$ac_cv_build" >&6; }
4400 case $ac_cv_build in
4401 *-*-*) ;;
4402 *) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
4403 esac
4404 build=$ac_cv_build
4405 ac_save_IFS=$IFS; IFS='-'
4406 set x $ac_cv_build
4407 shift
4408 build_cpu=$1
4409 build_vendor=$2
4410 shift; shift
4411 # Remember, the first character of IFS is used to create $*,
4412 # except with old shells:
4413 build_os=$*
4414 IFS=$ac_save_IFS
4415 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
4416
4417
4418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4419 $as_echo_n "checking host system type... " >&6; }
4420 if test "${ac_cv_host+set}" = set; then :
4421 $as_echo_n "(cached) " >&6
4422 else
4423 if test "x$host_alias" = x; then
4424 ac_cv_host=$ac_cv_build
4425 else
4426 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
4427 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
4428 fi
4429
4430 fi
4431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4432 $as_echo "$ac_cv_host" >&6; }
4433 case $ac_cv_host in
4434 *-*-*) ;;
4435 *) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
4436 esac
4437 host=$ac_cv_host
4438 ac_save_IFS=$IFS; IFS='-'
4439 set x $ac_cv_host
4440 shift
4441 host_cpu=$1
4442 host_vendor=$2
4443 shift; shift
4444 # Remember, the first character of IFS is used to create $*,
4445 # except with old shells:
4446 host_os=$*
4447 IFS=$ac_save_IFS
4448 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
4449
4450
4451 canonical=$host
4452 configuration=${host_alias-${build_alias-$host}}
4453
4454
4455
4456 ### If you add support for a new configuration, add code to this
4457 ### switch statement to recognize your configuration name and select
4458 ### the appropriate operating system file.
4459
4460 ### You would hope that you could choose an s/*.h
4461 ### file based on the operating system portion. However, it turns out
4462 ### that each s/*.h file is pretty manufacturer-specific.
4463 ### So we basically have to have a special case for each
4464 ### configuration name.
4465 ###
4466 ### As far as handling version numbers on operating systems is
4467 ### concerned, make sure things will fail in a fixable way. If
4468 ### /etc/MACHINES doesn't say anything about version numbers, be
4469 ### prepared to handle anything reasonably. If version numbers
4470 ### matter, be sure /etc/MACHINES says something about it.
4471
4472 opsys='' unported=no
4473 case "${canonical}" in
4474
4475 ## GNU/Linux and similar ports
4476 *-*-linux* )
4477 opsys=gnu-linux
4478 ;;
4479
4480 ## FreeBSD ports
4481 *-*-freebsd* )
4482 opsys=freebsd
4483 ;;
4484
4485 ## FreeBSD kernel + glibc based userland
4486 *-*-kfreebsd*gnu* )
4487 opsys=gnu-kfreebsd
4488 ;;
4489
4490 ## NetBSD ports
4491 *-*-netbsd* )
4492 opsys=netbsd
4493 ;;
4494
4495 ## OpenBSD ports
4496 *-*-openbsd* )
4497 opsys=openbsd
4498 ;;
4499
4500 ## Apple Darwin / Mac OS X
4501 *-apple-darwin* )
4502 case "${canonical}" in
4503 i[3456]86-* ) ;;
4504 powerpc-* ) ;;
4505 x86_64-* ) ;;
4506 * ) unported=yes ;;
4507 esac
4508 opsys=darwin
4509 ## Use fink packages if available.
4510 ## FIXME find a better way to do this: http://debbugs.gnu.org/11507
4511 ## if test -d /sw/include && test -d /sw/lib; then
4512 ## GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib"
4513 ## NON_GCC_TEST_OPTIONS=${GCC_TEST_OPTIONS}
4514 ## fi
4515 ;;
4516
4517 ## HP 9000 series 700 and 800, running HP/UX
4518 hppa*-hp-hpux10.2* )
4519 opsys=hpux10-20
4520 ;;
4521 hppa*-hp-hpux1[1-9]* )
4522 opsys=hpux11
4523 CFLAGS="-D_INCLUDE__STDC_A1_SOURCE $CFLAGS"
4524 ;;
4525
4526 ## IBM machines
4527 rs6000-ibm-aix4.[23]* )
4528 opsys=aix4-2
4529 ;;
4530 powerpc-ibm-aix4.[23]* )
4531 opsys=aix4-2
4532 ;;
4533 rs6000-ibm-aix[56]* )
4534 opsys=aix4-2
4535 ;;
4536 powerpc-ibm-aix[56]* )
4537 opsys=aix4-2
4538 ;;
4539
4540 ## Silicon Graphics machines
4541 ## Iris 4D
4542 mips-sgi-irix6.5 )
4543 opsys=irix6-5
4544 # Without defining _LANGUAGE_C, things get masked out in the headers
4545 # so that, for instance, grepping for `free' in stdlib.h fails and
4546 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
4547 NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
4548 ;;
4549
4550 ## Suns
4551 *-sun-solaris* \
4552 | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* \
4553 | x86_64-*-solaris2* | x86_64-*-sunos5*)
4554 case "${canonical}" in
4555 i[3456]86-*-* ) ;;
4556 amd64-*-*|x86_64-*-*) ;;
4557 sparc* ) ;;
4558 * ) unported=yes ;;
4559 esac
4560 case "${canonical}" in
4561 *-sunos5.6* | *-solaris2.6* )
4562 opsys=sol2-6
4563 RANLIB="ar -ts"
4564 ;;
4565 *-sunos5.[7-9]* | *-solaris2.[7-9]* )
4566 opsys=sol2-6
4567 emacs_check_sunpro_c=yes
4568 ;;
4569 *-sunos5* | *-solaris* )
4570 opsys=sol2-10
4571 emacs_check_sunpro_c=yes
4572 ;;
4573 esac
4574 ## Watch out for a compiler that we know will not work.
4575 case "${canonical}" in
4576 *-solaris* | *-sunos5* )
4577 if [ "x$CC" = x/usr/ucb/cc ]; then
4578 ## /usr/ucb/cc doesn't work;
4579 ## we should find some other compiler that does work.
4580 unset CC
4581 fi
4582 ;;
4583 *) ;;
4584 esac
4585 ;;
4586
4587 ## Intel 386 machines where we don't care about the manufacturer.
4588 i[3456]86-*-* )
4589 case "${canonical}" in
4590 *-cygwin ) opsys=cygwin ;;
4591 *-darwin* ) opsys=darwin ;;
4592 *-sysv4.2uw* ) opsys=unixware ;;
4593 *-sysv5uw* ) opsys=unixware ;;
4594 *-sysv5OpenUNIX* ) opsys=unixware ;;
4595 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
4596 esac
4597 ;;
4598
4599 * )
4600 unported=yes
4601 ;;
4602 esac
4603
4604 ### If the code above didn't choose an operating system, just choose
4605 ### an operating system based on the configuration name. You really
4606 ### only want to use this when you have no idea what the right
4607 ### operating system is; if you know what operating systems a machine
4608 ### runs, it's cleaner to make it explicit in the case statement
4609 ### above.
4610 if test x"${opsys}" = x; then
4611 case "${canonical}" in
4612 *-gnu* ) opsys=gnu ;;
4613 * )
4614 unported=yes
4615 ;;
4616 esac
4617 fi
4618
4619
4620
4621 if test $unported = yes; then
4622 as_fn_error "Emacs hasn't been ported to \`${canonical}' systems.
4623 Check \`etc/MACHINES' for recognized configuration names." "$LINENO" 5
4624 fi
4625
4626
4627 #### Choose a compiler.
4628
4629 ac_ext=c
4630 ac_cpp='$CPP $CPPFLAGS'
4631 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4632 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4633 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4634 if test -n "$ac_tool_prefix"; then
4635 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4636 set dummy ${ac_tool_prefix}gcc; ac_word=$2
4637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4638 $as_echo_n "checking for $ac_word... " >&6; }
4639 if test "${ac_cv_prog_CC+set}" = set; then :
4640 $as_echo_n "(cached) " >&6
4641 else
4642 if test -n "$CC"; then
4643 ac_cv_prog_CC="$CC" # Let the user override the test.
4644 else
4645 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4646 for as_dir in $PATH
4647 do
4648 IFS=$as_save_IFS
4649 test -z "$as_dir" && as_dir=.
4650 for ac_exec_ext in '' $ac_executable_extensions; do
4651 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4652 ac_cv_prog_CC="${ac_tool_prefix}gcc"
4653 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4654 break 2
4655 fi
4656 done
4657 done
4658 IFS=$as_save_IFS
4659
4660 fi
4661 fi
4662 CC=$ac_cv_prog_CC
4663 if test -n "$CC"; then
4664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4665 $as_echo "$CC" >&6; }
4666 else
4667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4668 $as_echo "no" >&6; }
4669 fi
4670
4671
4672 fi
4673 if test -z "$ac_cv_prog_CC"; then
4674 ac_ct_CC=$CC
4675 # Extract the first word of "gcc", so it can be a program name with args.
4676 set dummy gcc; ac_word=$2
4677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4678 $as_echo_n "checking for $ac_word... " >&6; }
4679 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
4680 $as_echo_n "(cached) " >&6
4681 else
4682 if test -n "$ac_ct_CC"; then
4683 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4684 else
4685 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4686 for as_dir in $PATH
4687 do
4688 IFS=$as_save_IFS
4689 test -z "$as_dir" && as_dir=.
4690 for ac_exec_ext in '' $ac_executable_extensions; do
4691 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4692 ac_cv_prog_ac_ct_CC="gcc"
4693 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4694 break 2
4695 fi
4696 done
4697 done
4698 IFS=$as_save_IFS
4699
4700 fi
4701 fi
4702 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4703 if test -n "$ac_ct_CC"; then
4704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4705 $as_echo "$ac_ct_CC" >&6; }
4706 else
4707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4708 $as_echo "no" >&6; }
4709 fi
4710
4711 if test "x$ac_ct_CC" = x; then
4712 CC=""
4713 else
4714 case $cross_compiling:$ac_tool_warned in
4715 yes:)
4716 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4717 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4718 ac_tool_warned=yes ;;
4719 esac
4720 CC=$ac_ct_CC
4721 fi
4722 else
4723 CC="$ac_cv_prog_CC"
4724 fi
4725
4726 if test -z "$CC"; then
4727 if test -n "$ac_tool_prefix"; then
4728 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4729 set dummy ${ac_tool_prefix}cc; ac_word=$2
4730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4731 $as_echo_n "checking for $ac_word... " >&6; }
4732 if test "${ac_cv_prog_CC+set}" = set; then :
4733 $as_echo_n "(cached) " >&6
4734 else
4735 if test -n "$CC"; then
4736 ac_cv_prog_CC="$CC" # Let the user override the test.
4737 else
4738 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4739 for as_dir in $PATH
4740 do
4741 IFS=$as_save_IFS
4742 test -z "$as_dir" && as_dir=.
4743 for ac_exec_ext in '' $ac_executable_extensions; do
4744 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4745 ac_cv_prog_CC="${ac_tool_prefix}cc"
4746 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4747 break 2
4748 fi
4749 done
4750 done
4751 IFS=$as_save_IFS
4752
4753 fi
4754 fi
4755 CC=$ac_cv_prog_CC
4756 if test -n "$CC"; then
4757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4758 $as_echo "$CC" >&6; }
4759 else
4760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4761 $as_echo "no" >&6; }
4762 fi
4763
4764
4765 fi
4766 fi
4767 if test -z "$CC"; then
4768 # Extract the first word of "cc", so it can be a program name with args.
4769 set dummy cc; ac_word=$2
4770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4771 $as_echo_n "checking for $ac_word... " >&6; }
4772 if test "${ac_cv_prog_CC+set}" = set; then :
4773 $as_echo_n "(cached) " >&6
4774 else
4775 if test -n "$CC"; then
4776 ac_cv_prog_CC="$CC" # Let the user override the test.
4777 else
4778 ac_prog_rejected=no
4779 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4780 for as_dir in $PATH
4781 do
4782 IFS=$as_save_IFS
4783 test -z "$as_dir" && as_dir=.
4784 for ac_exec_ext in '' $ac_executable_extensions; do
4785 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4786 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4787 ac_prog_rejected=yes
4788 continue
4789 fi
4790 ac_cv_prog_CC="cc"
4791 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4792 break 2
4793 fi
4794 done
4795 done
4796 IFS=$as_save_IFS
4797
4798 if test $ac_prog_rejected = yes; then
4799 # We found a bogon in the path, so make sure we never use it.
4800 set dummy $ac_cv_prog_CC
4801 shift
4802 if test $# != 0; then
4803 # We chose a different compiler from the bogus one.
4804 # However, it has the same basename, so the bogon will be chosen
4805 # first if we set CC to just the basename; use the full file name.
4806 shift
4807 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
4808 fi
4809 fi
4810 fi
4811 fi
4812 CC=$ac_cv_prog_CC
4813 if test -n "$CC"; then
4814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4815 $as_echo "$CC" >&6; }
4816 else
4817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4818 $as_echo "no" >&6; }
4819 fi
4820
4821
4822 fi
4823 if test -z "$CC"; then
4824 if test -n "$ac_tool_prefix"; then
4825 for ac_prog in cl.exe
4826 do
4827 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4828 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4829 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4830 $as_echo_n "checking for $ac_word... " >&6; }
4831 if test "${ac_cv_prog_CC+set}" = set; then :
4832 $as_echo_n "(cached) " >&6
4833 else
4834 if test -n "$CC"; then
4835 ac_cv_prog_CC="$CC" # Let the user override the test.
4836 else
4837 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4838 for as_dir in $PATH
4839 do
4840 IFS=$as_save_IFS
4841 test -z "$as_dir" && as_dir=.
4842 for ac_exec_ext in '' $ac_executable_extensions; do
4843 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4844 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4845 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4846 break 2
4847 fi
4848 done
4849 done
4850 IFS=$as_save_IFS
4851
4852 fi
4853 fi
4854 CC=$ac_cv_prog_CC
4855 if test -n "$CC"; then
4856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4857 $as_echo "$CC" >&6; }
4858 else
4859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4860 $as_echo "no" >&6; }
4861 fi
4862
4863
4864 test -n "$CC" && break
4865 done
4866 fi
4867 if test -z "$CC"; then
4868 ac_ct_CC=$CC
4869 for ac_prog in cl.exe
4870 do
4871 # Extract the first word of "$ac_prog", so it can be a program name with args.
4872 set dummy $ac_prog; ac_word=$2
4873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4874 $as_echo_n "checking for $ac_word... " >&6; }
4875 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
4876 $as_echo_n "(cached) " >&6
4877 else
4878 if test -n "$ac_ct_CC"; then
4879 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4880 else
4881 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4882 for as_dir in $PATH
4883 do
4884 IFS=$as_save_IFS
4885 test -z "$as_dir" && as_dir=.
4886 for ac_exec_ext in '' $ac_executable_extensions; do
4887 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4888 ac_cv_prog_ac_ct_CC="$ac_prog"
4889 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4890 break 2
4891 fi
4892 done
4893 done
4894 IFS=$as_save_IFS
4895
4896 fi
4897 fi
4898 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4899 if test -n "$ac_ct_CC"; then
4900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4901 $as_echo "$ac_ct_CC" >&6; }
4902 else
4903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4904 $as_echo "no" >&6; }
4905 fi
4906
4907
4908 test -n "$ac_ct_CC" && break
4909 done
4910
4911 if test "x$ac_ct_CC" = x; then
4912 CC=""
4913 else
4914 case $cross_compiling:$ac_tool_warned in
4915 yes:)
4916 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4917 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4918 ac_tool_warned=yes ;;
4919 esac
4920 CC=$ac_ct_CC
4921 fi
4922 fi
4923
4924 fi
4925
4926
4927 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4928 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4929 as_fn_error "no acceptable C compiler found in \$PATH
4930 See \`config.log' for more details." "$LINENO" 5; }
4931
4932 # Provide some information about the compiler.
4933 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4934 set X $ac_compile
4935 ac_compiler=$2
4936 for ac_option in --version -v -V -qversion; do
4937 { { ac_try="$ac_compiler $ac_option >&5"
4938 case "(($ac_try" in
4939 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4940 *) ac_try_echo=$ac_try;;
4941 esac
4942 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4943 $as_echo "$ac_try_echo"; } >&5
4944 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4945 ac_status=$?
4946 if test -s conftest.err; then
4947 sed '10a\
4948 ... rest of stderr output deleted ...
4949 10q' conftest.err >conftest.er1
4950 cat conftest.er1 >&5
4951 fi
4952 rm -f conftest.er1 conftest.err
4953 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4954 test $ac_status = 0; }
4955 done
4956
4957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4958 /* end confdefs.h. */
4959
4960 int
4961 main ()
4962 {
4963
4964 ;
4965 return 0;
4966 }
4967 _ACEOF
4968 ac_clean_files_save=$ac_clean_files
4969 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
4970 # Try to create an executable without -o first, disregard a.out.
4971 # It will help us diagnose broken compilers, and finding out an intuition
4972 # of exeext.
4973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4974 $as_echo_n "checking whether the C compiler works... " >&6; }
4975 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4976
4977 # The possible output files:
4978 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4979
4980 ac_rmfiles=
4981 for ac_file in $ac_files
4982 do
4983 case $ac_file in
4984 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4985 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4986 esac
4987 done
4988 rm -f $ac_rmfiles
4989
4990 if { { ac_try="$ac_link_default"
4991 case "(($ac_try" in
4992 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4993 *) ac_try_echo=$ac_try;;
4994 esac
4995 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4996 $as_echo "$ac_try_echo"; } >&5
4997 (eval "$ac_link_default") 2>&5
4998 ac_status=$?
4999 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5000 test $ac_status = 0; }; then :
5001 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
5002 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
5003 # in a Makefile. We should not override ac_cv_exeext if it was cached,
5004 # so that the user can short-circuit this test for compilers unknown to
5005 # Autoconf.
5006 for ac_file in $ac_files ''
5007 do
5008 test -f "$ac_file" || continue
5009 case $ac_file in
5010 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
5011 ;;
5012 [ab].out )
5013 # We found the default executable, but exeext='' is most
5014 # certainly right.
5015 break;;
5016 *.* )
5017 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
5018 then :; else
5019 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
5020 fi
5021 # We set ac_cv_exeext here because the later test for it is not
5022 # safe: cross compilers may not add the suffix if given an `-o'
5023 # argument, so we may need to know it at that point already.
5024 # Even if this section looks crufty: it has the advantage of
5025 # actually working.
5026 break;;
5027 * )
5028 break;;
5029 esac
5030 done
5031 test "$ac_cv_exeext" = no && ac_cv_exeext=
5032
5033 else
5034 ac_file=''
5035 fi
5036 if test -z "$ac_file"; then :
5037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5038 $as_echo "no" >&6; }
5039 $as_echo "$as_me: failed program was:" >&5
5040 sed 's/^/| /' conftest.$ac_ext >&5
5041
5042 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5043 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5044 { as_fn_set_status 77
5045 as_fn_error "C compiler cannot create executables
5046 See \`config.log' for more details." "$LINENO" 5; }; }
5047 else
5048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5049 $as_echo "yes" >&6; }
5050 fi
5051 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
5052 $as_echo_n "checking for C compiler default output file name... " >&6; }
5053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
5054 $as_echo "$ac_file" >&6; }
5055 ac_exeext=$ac_cv_exeext
5056
5057 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
5058 ac_clean_files=$ac_clean_files_save
5059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
5060 $as_echo_n "checking for suffix of executables... " >&6; }
5061 if { { ac_try="$ac_link"
5062 case "(($ac_try" in
5063 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5064 *) ac_try_echo=$ac_try;;
5065 esac
5066 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5067 $as_echo "$ac_try_echo"; } >&5
5068 (eval "$ac_link") 2>&5
5069 ac_status=$?
5070 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5071 test $ac_status = 0; }; then :
5072 # If both `conftest.exe' and `conftest' are `present' (well, observable)
5073 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
5074 # work properly (i.e., refer to `conftest.exe'), while it won't with
5075 # `rm'.
5076 for ac_file in conftest.exe conftest conftest.*; do
5077 test -f "$ac_file" || continue
5078 case $ac_file in
5079 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
5080 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
5081 break;;
5082 * ) break;;
5083 esac
5084 done
5085 else
5086 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5087 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5088 as_fn_error "cannot compute suffix of executables: cannot compile and link
5089 See \`config.log' for more details." "$LINENO" 5; }
5090 fi
5091 rm -f conftest conftest$ac_cv_exeext
5092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
5093 $as_echo "$ac_cv_exeext" >&6; }
5094
5095 rm -f conftest.$ac_ext
5096 EXEEXT=$ac_cv_exeext
5097 ac_exeext=$EXEEXT
5098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5099 /* end confdefs.h. */
5100 #include <stdio.h>
5101 int
5102 main ()
5103 {
5104 FILE *f = fopen ("conftest.out", "w");
5105 return ferror (f) || fclose (f) != 0;
5106
5107 ;
5108 return 0;
5109 }
5110 _ACEOF
5111 ac_clean_files="$ac_clean_files conftest.out"
5112 # Check that the compiler produces executables we can run. If not, either
5113 # the compiler is broken, or we cross compile.
5114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
5115 $as_echo_n "checking whether we are cross compiling... " >&6; }
5116 if test "$cross_compiling" != yes; then
5117 { { ac_try="$ac_link"
5118 case "(($ac_try" in
5119 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5120 *) ac_try_echo=$ac_try;;
5121 esac
5122 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5123 $as_echo "$ac_try_echo"; } >&5
5124 (eval "$ac_link") 2>&5
5125 ac_status=$?
5126 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5127 test $ac_status = 0; }
5128 if { ac_try='./conftest$ac_cv_exeext'
5129 { { case "(($ac_try" in
5130 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5131 *) ac_try_echo=$ac_try;;
5132 esac
5133 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5134 $as_echo "$ac_try_echo"; } >&5
5135 (eval "$ac_try") 2>&5
5136 ac_status=$?
5137 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5138 test $ac_status = 0; }; }; then
5139 cross_compiling=no
5140 else
5141 if test "$cross_compiling" = maybe; then
5142 cross_compiling=yes
5143 else
5144 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5145 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5146 as_fn_error "cannot run C compiled programs.
5147 If you meant to cross compile, use \`--host'.
5148 See \`config.log' for more details." "$LINENO" 5; }
5149 fi
5150 fi
5151 fi
5152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
5153 $as_echo "$cross_compiling" >&6; }
5154
5155 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
5156 ac_clean_files=$ac_clean_files_save
5157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
5158 $as_echo_n "checking for suffix of object files... " >&6; }
5159 if test "${ac_cv_objext+set}" = set; then :
5160 $as_echo_n "(cached) " >&6
5161 else
5162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5163 /* end confdefs.h. */
5164
5165 int
5166 main ()
5167 {
5168
5169 ;
5170 return 0;
5171 }
5172 _ACEOF
5173 rm -f conftest.o conftest.obj
5174 if { { ac_try="$ac_compile"
5175 case "(($ac_try" in
5176 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5177 *) ac_try_echo=$ac_try;;
5178 esac
5179 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5180 $as_echo "$ac_try_echo"; } >&5
5181 (eval "$ac_compile") 2>&5
5182 ac_status=$?
5183 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5184 test $ac_status = 0; }; then :
5185 for ac_file in conftest.o conftest.obj conftest.*; do
5186 test -f "$ac_file" || continue;
5187 case $ac_file in
5188 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
5189 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
5190 break;;
5191 esac
5192 done
5193 else
5194 $as_echo "$as_me: failed program was:" >&5
5195 sed 's/^/| /' conftest.$ac_ext >&5
5196
5197 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5198 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5199 as_fn_error "cannot compute suffix of object files: cannot compile
5200 See \`config.log' for more details." "$LINENO" 5; }
5201 fi
5202 rm -f conftest.$ac_cv_objext conftest.$ac_ext
5203 fi
5204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
5205 $as_echo "$ac_cv_objext" >&6; }
5206 OBJEXT=$ac_cv_objext
5207 ac_objext=$OBJEXT
5208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
5209 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
5210 if test "${ac_cv_c_compiler_gnu+set}" = set; then :
5211 $as_echo_n "(cached) " >&6
5212 else
5213 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5214 /* end confdefs.h. */
5215
5216 int
5217 main ()
5218 {
5219 #ifndef __GNUC__
5220 choke me
5221 #endif
5222
5223 ;
5224 return 0;
5225 }
5226 _ACEOF
5227 if ac_fn_c_try_compile "$LINENO"; then :
5228 ac_compiler_gnu=yes
5229 else
5230 ac_compiler_gnu=no
5231 fi
5232 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5233 ac_cv_c_compiler_gnu=$ac_compiler_gnu
5234
5235 fi
5236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
5237 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
5238 if test $ac_compiler_gnu = yes; then
5239 GCC=yes
5240 else
5241 GCC=
5242 fi
5243 ac_test_CFLAGS=${CFLAGS+set}
5244 ac_save_CFLAGS=$CFLAGS
5245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
5246 $as_echo_n "checking whether $CC accepts -g... " >&6; }
5247 if test "${ac_cv_prog_cc_g+set}" = set; then :
5248 $as_echo_n "(cached) " >&6
5249 else
5250 ac_save_c_werror_flag=$ac_c_werror_flag
5251 ac_c_werror_flag=yes
5252 ac_cv_prog_cc_g=no
5253 CFLAGS="-g"
5254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5255 /* end confdefs.h. */
5256
5257 int
5258 main ()
5259 {
5260
5261 ;
5262 return 0;
5263 }
5264 _ACEOF
5265 if ac_fn_c_try_compile "$LINENO"; then :
5266 ac_cv_prog_cc_g=yes
5267 else
5268 CFLAGS=""
5269 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5270 /* end confdefs.h. */
5271
5272 int
5273 main ()
5274 {
5275
5276 ;
5277 return 0;
5278 }
5279 _ACEOF
5280 if ac_fn_c_try_compile "$LINENO"; then :
5281
5282 else
5283 ac_c_werror_flag=$ac_save_c_werror_flag
5284 CFLAGS="-g"
5285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5286 /* end confdefs.h. */
5287
5288 int
5289 main ()
5290 {
5291
5292 ;
5293 return 0;
5294 }
5295 _ACEOF
5296 if ac_fn_c_try_compile "$LINENO"; then :
5297 ac_cv_prog_cc_g=yes
5298 fi
5299 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5300 fi
5301 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5302 fi
5303 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5304 ac_c_werror_flag=$ac_save_c_werror_flag
5305 fi
5306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
5307 $as_echo "$ac_cv_prog_cc_g" >&6; }
5308 if test "$ac_test_CFLAGS" = set; then
5309 CFLAGS=$ac_save_CFLAGS
5310 elif test $ac_cv_prog_cc_g = yes; then
5311 if test "$GCC" = yes; then
5312 CFLAGS="-g -O2"
5313 else
5314 CFLAGS="-g"
5315 fi
5316 else
5317 if test "$GCC" = yes; then
5318 CFLAGS="-O2"
5319 else
5320 CFLAGS=
5321 fi
5322 fi
5323 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
5324 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
5325 if test "${ac_cv_prog_cc_c89+set}" = set; then :
5326 $as_echo_n "(cached) " >&6
5327 else
5328 ac_cv_prog_cc_c89=no
5329 ac_save_CC=$CC
5330 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5331 /* end confdefs.h. */
5332 #include <stdarg.h>
5333 #include <stdio.h>
5334 #include <sys/types.h>
5335 #include <sys/stat.h>
5336 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
5337 struct buf { int x; };
5338 FILE * (*rcsopen) (struct buf *, struct stat *, int);
5339 static char *e (p, i)
5340 char **p;
5341 int i;
5342 {
5343 return p[i];
5344 }
5345 static char *f (char * (*g) (char **, int), char **p, ...)
5346 {
5347 char *s;
5348 va_list v;
5349 va_start (v,p);
5350 s = g (p, va_arg (v,int));
5351 va_end (v);
5352 return s;
5353 }
5354
5355 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
5356 function prototypes and stuff, but not '\xHH' hex character constants.
5357 These don't provoke an error unfortunately, instead are silently treated
5358 as 'x'. The following induces an error, until -std is added to get
5359 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
5360 array size at least. It's necessary to write '\x00'==0 to get something
5361 that's true only with -std. */
5362 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5363
5364 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5365 inside strings and character constants. */
5366 #define FOO(x) 'x'
5367 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5368
5369 int test (int i, double x);
5370 struct s1 {int (*f) (int a);};
5371 struct s2 {int (*f) (double a);};
5372 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5373 int argc;
5374 char **argv;
5375 int
5376 main ()
5377 {
5378 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
5379 ;
5380 return 0;
5381 }
5382 _ACEOF
5383 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5384 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5385 do
5386 CC="$ac_save_CC $ac_arg"
5387 if ac_fn_c_try_compile "$LINENO"; then :
5388 ac_cv_prog_cc_c89=$ac_arg
5389 fi
5390 rm -f core conftest.err conftest.$ac_objext
5391 test "x$ac_cv_prog_cc_c89" != "xno" && break
5392 done
5393 rm -f conftest.$ac_ext
5394 CC=$ac_save_CC
5395
5396 fi
5397 # AC_CACHE_VAL
5398 case "x$ac_cv_prog_cc_c89" in
5399 x)
5400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5401 $as_echo "none needed" >&6; } ;;
5402 xno)
5403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5404 $as_echo "unsupported" >&6; } ;;
5405 *)
5406 CC="$CC $ac_cv_prog_cc_c89"
5407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5408 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
5409 esac
5410 if test "x$ac_cv_prog_cc_c89" != xno; then :
5411
5412 fi
5413
5414 ac_ext=c
5415 ac_cpp='$CPP $CPPFLAGS'
5416 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5417 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5418 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5419 DEPDIR="${am__leading_dot}deps"
5420
5421 ac_config_commands="$ac_config_commands depfiles"
5422
5423
5424 am_make=${MAKE-make}
5425 cat > confinc << 'END'
5426 am__doit:
5427 @echo this is the am__doit target
5428 .PHONY: am__doit
5429 END
5430 # If we don't find an include directive, just comment out the code.
5431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
5432 $as_echo_n "checking for style of include used by $am_make... " >&6; }
5433 am__include="#"
5434 am__quote=
5435 _am_result=none
5436 # First try GNU make style include.
5437 echo "include confinc" > confmf
5438 # Ignore all kinds of additional output from `make'.
5439 case `$am_make -s -f confmf 2> /dev/null` in #(
5440 *the\ am__doit\ target*)
5441 am__include=include
5442 am__quote=
5443 _am_result=GNU
5444 ;;
5445 esac
5446 # Now try BSD make style include.
5447 if test "$am__include" = "#"; then
5448 echo '.include "confinc"' > confmf
5449 case `$am_make -s -f confmf 2> /dev/null` in #(
5450 *the\ am__doit\ target*)
5451 am__include=.include
5452 am__quote="\""
5453 _am_result=BSD
5454 ;;
5455 esac
5456 fi
5457
5458
5459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
5460 $as_echo "$_am_result" >&6; }
5461 rm -f confinc confmf
5462
5463 # Check whether --enable-dependency-tracking was given.
5464 if test "${enable_dependency_tracking+set}" = set; then :
5465 enableval=$enable_dependency_tracking;
5466 fi
5467
5468 if test "x$enable_dependency_tracking" != xno; then
5469 am_depcomp="$ac_aux_dir/depcomp"
5470 AMDEPBACKSLASH='\'
5471 fi
5472 if test "x$enable_dependency_tracking" != xno; then
5473 AMDEP_TRUE=
5474 AMDEP_FALSE='#'
5475 else
5476 AMDEP_TRUE='#'
5477 AMDEP_FALSE=
5478 fi
5479
5480
5481
5482 depcc="$CC" am_compiler_list=
5483
5484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
5485 $as_echo_n "checking dependency style of $depcc... " >&6; }
5486 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
5487 $as_echo_n "(cached) " >&6
5488 else
5489 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
5490 # We make a subdir and do the tests there. Otherwise we can end up
5491 # making bogus files that we don't know about and never remove. For
5492 # instance it was reported that on HP-UX the gcc test will end up
5493 # making a dummy file named `D' -- because `-MD' means `put the output
5494 # in D'.
5495 mkdir conftest.dir
5496 # Copy depcomp to subdir because otherwise we won't find it if we're
5497 # using a relative directory.
5498 cp "$am_depcomp" conftest.dir
5499 cd conftest.dir
5500 # We will build objects and dependencies in a subdirectory because
5501 # it helps to detect inapplicable dependency modes. For instance
5502 # both Tru64's cc and ICC support -MD to output dependencies as a
5503 # side effect of compilation, but ICC will put the dependencies in
5504 # the current directory while Tru64 will put them in the object
5505 # directory.
5506 mkdir sub
5507
5508 am_cv_CC_dependencies_compiler_type=none
5509 if test "$am_compiler_list" = ""; then
5510 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5511 fi
5512 am__universal=false
5513 case " $depcc " in #(
5514 *\ -arch\ *\ -arch\ *) am__universal=true ;;
5515 esac
5516
5517 for depmode in $am_compiler_list; do
5518 # Setup a source with many dependencies, because some compilers
5519 # like to wrap large dependency lists on column 80 (with \), and
5520 # we should not choose a depcomp mode which is confused by this.
5521 #
5522 # We need to recreate these files for each test, as the compiler may
5523 # overwrite some of them when testing with obscure command lines.
5524 # This happens at least with the AIX C compiler.
5525 : > sub/conftest.c
5526 for i in 1 2 3 4 5 6; do
5527 echo '#include "conftst'$i'.h"' >> sub/conftest.c
5528 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
5529 # Solaris 8's {/usr,}/bin/sh.
5530 touch sub/conftst$i.h
5531 done
5532 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
5533
5534 # We check with `-c' and `-o' for the sake of the "dashmstdout"
5535 # mode. It turns out that the SunPro C++ compiler does not properly
5536 # handle `-M -o', and we need to detect this. Also, some Intel
5537 # versions had trouble with output in subdirs
5538 am__obj=sub/conftest.${OBJEXT-o}
5539 am__minus_obj="-o $am__obj"
5540 case $depmode in
5541 gcc)
5542 # This depmode causes a compiler race in universal mode.
5543 test "$am__universal" = false || continue
5544 ;;
5545 nosideeffect)
5546 # after this tag, mechanisms are not by side-effect, so they'll
5547 # only be used when explicitly requested
5548 if test "x$enable_dependency_tracking" = xyes; then
5549 continue
5550 else
5551 break
5552 fi
5553 ;;
5554 msvisualcpp | msvcmsys)
5555 # This compiler won't grok `-c -o', but also, the minuso test has
5556 # not run yet. These depmodes are late enough in the game, and
5557 # so weak that their functioning should not be impacted.
5558 am__obj=conftest.${OBJEXT-o}
5559 am__minus_obj=
5560 ;;
5561 none) break ;;
5562 esac
5563 if depmode=$depmode \
5564 source=sub/conftest.c object=$am__obj \
5565 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
5566 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
5567 >/dev/null 2>conftest.err &&
5568 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
5569 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
5570 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
5571 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
5572 # icc doesn't choke on unknown options, it will just issue warnings
5573 # or remarks (even with -Werror). So we grep stderr for any message
5574 # that says an option was ignored or not supported.
5575 # When given -MP, icc 7.0 and 7.1 complain thusly:
5576 # icc: Command line warning: ignoring option '-M'; no argument required
5577 # The diagnosis changed in icc 8.0:
5578 # icc: Command line remark: option '-MP' not supported
5579 if (grep 'ignoring option' conftest.err ||
5580 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
5581 am_cv_CC_dependencies_compiler_type=$depmode
5582 break
5583 fi
5584 fi
5585 done
5586
5587 cd ..
5588 rm -rf conftest.dir
5589 else
5590 am_cv_CC_dependencies_compiler_type=none
5591 fi
5592
5593 fi
5594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
5595 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
5596 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
5597
5598 if
5599 test "x$enable_dependency_tracking" != xno \
5600 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
5601 am__fastdepCC_TRUE=
5602 am__fastdepCC_FALSE='#'
5603 else
5604 am__fastdepCC_TRUE='#'
5605 am__fastdepCC_FALSE=
5606 fi
5607
5608
5609 if test "x$CC" != xcc; then
5610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5
5611 $as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
5612 else
5613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5
5614 $as_echo_n "checking whether cc understands -c and -o together... " >&6; }
5615 fi
5616 set dummy $CC; ac_cc=`$as_echo "$2" |
5617 sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
5618 if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then :
5619 $as_echo_n "(cached) " >&6
5620 else
5621 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5622 /* end confdefs.h. */
5623
5624 int
5625 main ()
5626 {
5627
5628 ;
5629 return 0;
5630 }
5631 _ACEOF
5632 # Make sure it works both with $CC and with simple cc.
5633 # We do the test twice because some compilers refuse to overwrite an
5634 # existing .o file with -o, though they will create one.
5635 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
5636 rm -f conftest2.*
5637 if { { case "(($ac_try" in
5638 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5639 *) ac_try_echo=$ac_try;;
5640 esac
5641 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5642 $as_echo "$ac_try_echo"; } >&5
5643 (eval "$ac_try") 2>&5
5644 ac_status=$?
5645 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5646 test $ac_status = 0; } &&
5647 test -f conftest2.$ac_objext && { { case "(($ac_try" in
5648 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5649 *) ac_try_echo=$ac_try;;
5650 esac
5651 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5652 $as_echo "$ac_try_echo"; } >&5
5653 (eval "$ac_try") 2>&5
5654 ac_status=$?
5655 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5656 test $ac_status = 0; };
5657 then
5658 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
5659 if test "x$CC" != xcc; then
5660 # Test first that cc exists at all.
5661 if { ac_try='cc -c conftest.$ac_ext >&5'
5662 { { case "(($ac_try" in
5663 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5664 *) ac_try_echo=$ac_try;;
5665 esac
5666 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5667 $as_echo "$ac_try_echo"; } >&5
5668 (eval "$ac_try") 2>&5
5669 ac_status=$?
5670 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5671 test $ac_status = 0; }; }; then
5672 ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
5673 rm -f conftest2.*
5674 if { { case "(($ac_try" in
5675 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5676 *) ac_try_echo=$ac_try;;
5677 esac
5678 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5679 $as_echo "$ac_try_echo"; } >&5
5680 (eval "$ac_try") 2>&5
5681 ac_status=$?
5682 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5683 test $ac_status = 0; } &&
5684 test -f conftest2.$ac_objext && { { case "(($ac_try" in
5685 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5686 *) ac_try_echo=$ac_try;;
5687 esac
5688 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5689 $as_echo "$ac_try_echo"; } >&5
5690 (eval "$ac_try") 2>&5
5691 ac_status=$?
5692 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5693 test $ac_status = 0; };
5694 then
5695 # cc works too.
5696 :
5697 else
5698 # cc exists but doesn't like -o.
5699 eval ac_cv_prog_cc_${ac_cc}_c_o=no
5700 fi
5701 fi
5702 fi
5703 else
5704 eval ac_cv_prog_cc_${ac_cc}_c_o=no
5705 fi
5706 rm -f core conftest*
5707
5708 fi
5709 if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
5710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5711 $as_echo "yes" >&6; }
5712 else
5713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5714 $as_echo "no" >&6; }
5715
5716 $as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h
5717
5718 fi
5719
5720 # FIXME: we rely on the cache variable name because
5721 # there is no other way.
5722 set dummy $CC
5723 am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
5724 eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
5725 if test "$am_t" != yes; then
5726 # Losing compiler, so override with the script.
5727 # FIXME: It is wrong to rewrite CC.
5728 # But if we don't then we get into trouble of one sort or another.
5729 # A longer-term fix would be to have automake use am__CC in this case,
5730 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
5731 CC="$am_aux_dir/compile $CC"
5732 fi
5733
5734
5735
5736 if test x$GCC = xyes; then
5737 test "x$GCC_TEST_OPTIONS" != x && CC="$CC $GCC_TEST_OPTIONS"
5738 else
5739 test "x$NON_GCC_TEST_OPTIONS" != x && CC="$CC $NON_GCC_TEST_OPTIONS"
5740 fi
5741
5742 # Avoid gnulib's threadlib module, as we do threads our own way.
5743
5744
5745 # Initialize gnulib right after choosing the compiler.
5746
5747 ac_ext=c
5748 ac_cpp='$CPP $CPPFLAGS'
5749 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5750 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5751 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5752 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
5753 $as_echo_n "checking how to run the C preprocessor... " >&6; }
5754 # On Suns, sometimes $CPP names a directory.
5755 if test -n "$CPP" && test -d "$CPP"; then
5756 CPP=
5757 fi
5758 if test -z "$CPP"; then
5759 if test "${ac_cv_prog_CPP+set}" = set; then :
5760 $as_echo_n "(cached) " >&6
5761 else
5762 # Double quotes because CPP needs to be expanded
5763 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
5764 do
5765 ac_preproc_ok=false
5766 for ac_c_preproc_warn_flag in '' yes
5767 do
5768 # Use a header file that comes with gcc, so configuring glibc
5769 # with a fresh cross-compiler works.
5770 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5771 # <limits.h> exists even on freestanding compilers.
5772 # On the NeXT, cc -E runs the code through the compiler's parser,
5773 # not just through cpp. "Syntax error" is here to catch this case.
5774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5775 /* end confdefs.h. */
5776 #ifdef __STDC__
5777 # include <limits.h>
5778 #else
5779 # include <assert.h>
5780 #endif
5781 Syntax error
5782 _ACEOF
5783 if ac_fn_c_try_cpp "$LINENO"; then :
5784
5785 else
5786 # Broken: fails on valid input.
5787 continue
5788 fi
5789 rm -f conftest.err conftest.$ac_ext
5790
5791 # OK, works on sane cases. Now check whether nonexistent headers
5792 # can be detected and how.
5793 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5794 /* end confdefs.h. */
5795 #include <ac_nonexistent.h>
5796 _ACEOF
5797 if ac_fn_c_try_cpp "$LINENO"; then :
5798 # Broken: success on invalid input.
5799 continue
5800 else
5801 # Passes both tests.
5802 ac_preproc_ok=:
5803 break
5804 fi
5805 rm -f conftest.err conftest.$ac_ext
5806
5807 done
5808 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5809 rm -f conftest.err conftest.$ac_ext
5810 if $ac_preproc_ok; then :
5811 break
5812 fi
5813
5814 done
5815 ac_cv_prog_CPP=$CPP
5816
5817 fi
5818 CPP=$ac_cv_prog_CPP
5819 else
5820 ac_cv_prog_CPP=$CPP
5821 fi
5822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
5823 $as_echo "$CPP" >&6; }
5824 ac_preproc_ok=false
5825 for ac_c_preproc_warn_flag in '' yes
5826 do
5827 # Use a header file that comes with gcc, so configuring glibc
5828 # with a fresh cross-compiler works.
5829 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5830 # <limits.h> exists even on freestanding compilers.
5831 # On the NeXT, cc -E runs the code through the compiler's parser,
5832 # not just through cpp. "Syntax error" is here to catch this case.
5833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5834 /* end confdefs.h. */
5835 #ifdef __STDC__
5836 # include <limits.h>
5837 #else
5838 # include <assert.h>
5839 #endif
5840 Syntax error
5841 _ACEOF
5842 if ac_fn_c_try_cpp "$LINENO"; then :
5843
5844 else
5845 # Broken: fails on valid input.
5846 continue
5847 fi
5848 rm -f conftest.err conftest.$ac_ext
5849
5850 # OK, works on sane cases. Now check whether nonexistent headers
5851 # can be detected and how.
5852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5853 /* end confdefs.h. */
5854 #include <ac_nonexistent.h>
5855 _ACEOF
5856 if ac_fn_c_try_cpp "$LINENO"; then :
5857 # Broken: success on invalid input.
5858 continue
5859 else
5860 # Passes both tests.
5861 ac_preproc_ok=:
5862 break
5863 fi
5864 rm -f conftest.err conftest.$ac_ext
5865
5866 done
5867 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5868 rm -f conftest.err conftest.$ac_ext
5869 if $ac_preproc_ok; then :
5870
5871 else
5872 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5873 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5874 as_fn_error "C preprocessor \"$CPP\" fails sanity check
5875 See \`config.log' for more details." "$LINENO" 5; }
5876 fi
5877
5878 ac_ext=c
5879 ac_cpp='$CPP $CPPFLAGS'
5880 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5881 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5882 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5883
5884
5885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5886 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5887 if test "${ac_cv_path_GREP+set}" = set; then :
5888 $as_echo_n "(cached) " >&6
5889 else
5890 if test -z "$GREP"; then
5891 ac_path_GREP_found=false
5892 # Loop through the user's path and test for each of PROGNAME-LIST
5893 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5894 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5895 do
5896 IFS=$as_save_IFS
5897 test -z "$as_dir" && as_dir=.
5898 for ac_prog in grep ggrep; do
5899 for ac_exec_ext in '' $ac_executable_extensions; do
5900 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5901 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
5902 # Check for GNU ac_path_GREP and select it if it is found.
5903 # Check for GNU $ac_path_GREP
5904 case `"$ac_path_GREP" --version 2>&1` in
5905 *GNU*)
5906 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5907 *)
5908 ac_count=0
5909 $as_echo_n 0123456789 >"conftest.in"
5910 while :
5911 do
5912 cat "conftest.in" "conftest.in" >"conftest.tmp"
5913 mv "conftest.tmp" "conftest.in"
5914 cp "conftest.in" "conftest.nl"
5915 $as_echo 'GREP' >> "conftest.nl"
5916 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5917 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5918 as_fn_arith $ac_count + 1 && ac_count=$as_val
5919 if test $ac_count -gt ${ac_path_GREP_max-0}; then
5920 # Best one so far, save it but keep looking for a better one
5921 ac_cv_path_GREP="$ac_path_GREP"
5922 ac_path_GREP_max=$ac_count
5923 fi
5924 # 10*(2^10) chars as input seems more than enough
5925 test $ac_count -gt 10 && break
5926 done
5927 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5928 esac
5929
5930 $ac_path_GREP_found && break 3
5931 done
5932 done
5933 done
5934 IFS=$as_save_IFS
5935 if test -z "$ac_cv_path_GREP"; then
5936 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5937 fi
5938 else
5939 ac_cv_path_GREP=$GREP
5940 fi
5941
5942 fi
5943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5944 $as_echo "$ac_cv_path_GREP" >&6; }
5945 GREP="$ac_cv_path_GREP"
5946
5947
5948 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5949 $as_echo_n "checking for egrep... " >&6; }
5950 if test "${ac_cv_path_EGREP+set}" = set; then :
5951 $as_echo_n "(cached) " >&6
5952 else
5953 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5954 then ac_cv_path_EGREP="$GREP -E"
5955 else
5956 if test -z "$EGREP"; then
5957 ac_path_EGREP_found=false
5958 # Loop through the user's path and test for each of PROGNAME-LIST
5959 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5960 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5961 do
5962 IFS=$as_save_IFS
5963 test -z "$as_dir" && as_dir=.
5964 for ac_prog in egrep; do
5965 for ac_exec_ext in '' $ac_executable_extensions; do
5966 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5967 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
5968 # Check for GNU ac_path_EGREP and select it if it is found.
5969 # Check for GNU $ac_path_EGREP
5970 case `"$ac_path_EGREP" --version 2>&1` in
5971 *GNU*)
5972 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5973 *)
5974 ac_count=0
5975 $as_echo_n 0123456789 >"conftest.in"
5976 while :
5977 do
5978 cat "conftest.in" "conftest.in" >"conftest.tmp"
5979 mv "conftest.tmp" "conftest.in"
5980 cp "conftest.in" "conftest.nl"
5981 $as_echo 'EGREP' >> "conftest.nl"
5982 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5983 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5984 as_fn_arith $ac_count + 1 && ac_count=$as_val
5985 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5986 # Best one so far, save it but keep looking for a better one
5987 ac_cv_path_EGREP="$ac_path_EGREP"
5988 ac_path_EGREP_max=$ac_count
5989 fi
5990 # 10*(2^10) chars as input seems more than enough
5991 test $ac_count -gt 10 && break
5992 done
5993 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5994 esac
5995
5996 $ac_path_EGREP_found && break 3
5997 done
5998 done
5999 done
6000 IFS=$as_save_IFS
6001 if test -z "$ac_cv_path_EGREP"; then
6002 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6003 fi
6004 else
6005 ac_cv_path_EGREP=$EGREP
6006 fi
6007
6008 fi
6009 fi
6010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6011 $as_echo "$ac_cv_path_EGREP" >&6; }
6012 EGREP="$ac_cv_path_EGREP"
6013
6014
6015
6016
6017 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
6018 $as_echo_n "checking for Minix Amsterdam compiler... " >&6; }
6019 if test "${gl_cv_c_amsterdam_compiler+set}" = set; then :
6020 $as_echo_n "(cached) " >&6
6021 else
6022
6023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6024 /* end confdefs.h. */
6025
6026 #ifdef __ACK__
6027 Amsterdam
6028 #endif
6029
6030 _ACEOF
6031 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6032 $EGREP "Amsterdam" >/dev/null 2>&1; then :
6033 gl_cv_c_amsterdam_compiler=yes
6034 else
6035 gl_cv_c_amsterdam_compiler=no
6036 fi
6037 rm -f conftest*
6038
6039
6040 fi
6041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
6042 $as_echo "$gl_cv_c_amsterdam_compiler" >&6; }
6043 if test -z "$AR"; then
6044 if test $gl_cv_c_amsterdam_compiler = yes; then
6045 AR='cc -c.a'
6046 if test -z "$ARFLAGS"; then
6047 ARFLAGS='-o'
6048 fi
6049 else
6050 if test -n "$ac_tool_prefix"; then
6051 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6052 set dummy ${ac_tool_prefix}ar; ac_word=$2
6053 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6054 $as_echo_n "checking for $ac_word... " >&6; }
6055 if test "${ac_cv_prog_AR+set}" = set; then :
6056 $as_echo_n "(cached) " >&6
6057 else
6058 if test -n "$AR"; then
6059 ac_cv_prog_AR="$AR" # Let the user override the test.
6060 else
6061 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6062 for as_dir in $PATH
6063 do
6064 IFS=$as_save_IFS
6065 test -z "$as_dir" && as_dir=.
6066 for ac_exec_ext in '' $ac_executable_extensions; do
6067 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6068 ac_cv_prog_AR="${ac_tool_prefix}ar"
6069 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6070 break 2
6071 fi
6072 done
6073 done
6074 IFS=$as_save_IFS
6075
6076 fi
6077 fi
6078 AR=$ac_cv_prog_AR
6079 if test -n "$AR"; then
6080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6081 $as_echo "$AR" >&6; }
6082 else
6083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6084 $as_echo "no" >&6; }
6085 fi
6086
6087
6088 fi
6089 if test -z "$ac_cv_prog_AR"; then
6090 ac_ct_AR=$AR
6091 # Extract the first word of "ar", so it can be a program name with args.
6092 set dummy ar; ac_word=$2
6093 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6094 $as_echo_n "checking for $ac_word... " >&6; }
6095 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
6096 $as_echo_n "(cached) " >&6
6097 else
6098 if test -n "$ac_ct_AR"; then
6099 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6100 else
6101 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6102 for as_dir in $PATH
6103 do
6104 IFS=$as_save_IFS
6105 test -z "$as_dir" && as_dir=.
6106 for ac_exec_ext in '' $ac_executable_extensions; do
6107 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6108 ac_cv_prog_ac_ct_AR="ar"
6109 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6110 break 2
6111 fi
6112 done
6113 done
6114 IFS=$as_save_IFS
6115
6116 fi
6117 fi
6118 ac_ct_AR=$ac_cv_prog_ac_ct_AR
6119 if test -n "$ac_ct_AR"; then
6120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6121 $as_echo "$ac_ct_AR" >&6; }
6122 else
6123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6124 $as_echo "no" >&6; }
6125 fi
6126
6127 if test "x$ac_ct_AR" = x; then
6128 AR="ar"
6129 else
6130 case $cross_compiling:$ac_tool_warned in
6131 yes:)
6132 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6133 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6134 ac_tool_warned=yes ;;
6135 esac
6136 AR=$ac_ct_AR
6137 fi
6138 else
6139 AR="$ac_cv_prog_AR"
6140 fi
6141
6142 if test -z "$ARFLAGS"; then
6143 ARFLAGS='cru'
6144 fi
6145 fi
6146 else
6147 if test -z "$ARFLAGS"; then
6148 ARFLAGS='cru'
6149 fi
6150 fi
6151
6152
6153 if test -z "$RANLIB"; then
6154 if test $gl_cv_c_amsterdam_compiler = yes; then
6155 RANLIB=':'
6156 else
6157 if test -n "$ac_tool_prefix"; then
6158 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6159 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6160 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6161 $as_echo_n "checking for $ac_word... " >&6; }
6162 if test "${ac_cv_prog_RANLIB+set}" = set; then :
6163 $as_echo_n "(cached) " >&6
6164 else
6165 if test -n "$RANLIB"; then
6166 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6167 else
6168 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6169 for as_dir in $PATH
6170 do
6171 IFS=$as_save_IFS
6172 test -z "$as_dir" && as_dir=.
6173 for ac_exec_ext in '' $ac_executable_extensions; do
6174 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6175 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6176 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6177 break 2
6178 fi
6179 done
6180 done
6181 IFS=$as_save_IFS
6182
6183 fi
6184 fi
6185 RANLIB=$ac_cv_prog_RANLIB
6186 if test -n "$RANLIB"; then
6187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6188 $as_echo "$RANLIB" >&6; }
6189 else
6190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6191 $as_echo "no" >&6; }
6192 fi
6193
6194
6195 fi
6196 if test -z "$ac_cv_prog_RANLIB"; then
6197 ac_ct_RANLIB=$RANLIB
6198 # Extract the first word of "ranlib", so it can be a program name with args.
6199 set dummy ranlib; ac_word=$2
6200 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6201 $as_echo_n "checking for $ac_word... " >&6; }
6202 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
6203 $as_echo_n "(cached) " >&6
6204 else
6205 if test -n "$ac_ct_RANLIB"; then
6206 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6207 else
6208 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6209 for as_dir in $PATH
6210 do
6211 IFS=$as_save_IFS
6212 test -z "$as_dir" && as_dir=.
6213 for ac_exec_ext in '' $ac_executable_extensions; do
6214 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6215 ac_cv_prog_ac_ct_RANLIB="ranlib"
6216 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6217 break 2
6218 fi
6219 done
6220 done
6221 IFS=$as_save_IFS
6222
6223 fi
6224 fi
6225 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6226 if test -n "$ac_ct_RANLIB"; then
6227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6228 $as_echo "$ac_ct_RANLIB" >&6; }
6229 else
6230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6231 $as_echo "no" >&6; }
6232 fi
6233
6234 if test "x$ac_ct_RANLIB" = x; then
6235 RANLIB=":"
6236 else
6237 case $cross_compiling:$ac_tool_warned in
6238 yes:)
6239 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6240 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6241 ac_tool_warned=yes ;;
6242 esac
6243 RANLIB=$ac_ct_RANLIB
6244 fi
6245 else
6246 RANLIB="$ac_cv_prog_RANLIB"
6247 fi
6248
6249 fi
6250 fi
6251
6252
6253 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6254 $as_echo_n "checking for ANSI C header files... " >&6; }
6255 if test "${ac_cv_header_stdc+set}" = set; then :
6256 $as_echo_n "(cached) " >&6
6257 else
6258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6259 /* end confdefs.h. */
6260 #include <stdlib.h>
6261 #include <stdarg.h>
6262 #include <string.h>
6263 #include <float.h>
6264
6265 int
6266 main ()
6267 {
6268
6269 ;
6270 return 0;
6271 }
6272 _ACEOF
6273 if ac_fn_c_try_compile "$LINENO"; then :
6274 ac_cv_header_stdc=yes
6275 else
6276 ac_cv_header_stdc=no
6277 fi
6278 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6279
6280 if test $ac_cv_header_stdc = yes; then
6281 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6283 /* end confdefs.h. */
6284 #include <string.h>
6285
6286 _ACEOF
6287 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6288 $EGREP "memchr" >/dev/null 2>&1; then :
6289
6290 else
6291 ac_cv_header_stdc=no
6292 fi
6293 rm -f conftest*
6294
6295 fi
6296
6297 if test $ac_cv_header_stdc = yes; then
6298 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6300 /* end confdefs.h. */
6301 #include <stdlib.h>
6302
6303 _ACEOF
6304 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6305 $EGREP "free" >/dev/null 2>&1; then :
6306
6307 else
6308 ac_cv_header_stdc=no
6309 fi
6310 rm -f conftest*
6311
6312 fi
6313
6314 if test $ac_cv_header_stdc = yes; then
6315 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6316 if test "$cross_compiling" = yes; then :
6317 :
6318 else
6319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6320 /* end confdefs.h. */
6321 #include <ctype.h>
6322 #include <stdlib.h>
6323 #if ((' ' & 0x0FF) == 0x020)
6324 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6325 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6326 #else
6327 # define ISLOWER(c) \
6328 (('a' <= (c) && (c) <= 'i') \
6329 || ('j' <= (c) && (c) <= 'r') \
6330 || ('s' <= (c) && (c) <= 'z'))
6331 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6332 #endif
6333
6334 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6335 int
6336 main ()
6337 {
6338 int i;
6339 for (i = 0; i < 256; i++)
6340 if (XOR (islower (i), ISLOWER (i))
6341 || toupper (i) != TOUPPER (i))
6342 return 2;
6343 return 0;
6344 }
6345 _ACEOF
6346 if ac_fn_c_try_run "$LINENO"; then :
6347
6348 else
6349 ac_cv_header_stdc=no
6350 fi
6351 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6352 conftest.$ac_objext conftest.beam conftest.$ac_ext
6353 fi
6354
6355 fi
6356 fi
6357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6358 $as_echo "$ac_cv_header_stdc" >&6; }
6359 if test $ac_cv_header_stdc = yes; then
6360
6361 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
6362
6363 fi
6364
6365 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
6366 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
6367 inttypes.h stdint.h unistd.h
6368 do :
6369 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6370 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
6371 "
6372 eval as_val=\$$as_ac_Header
6373 if test "x$as_val" = x""yes; then :
6374 cat >>confdefs.h <<_ACEOF
6375 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6376 _ACEOF
6377
6378 fi
6379
6380 done
6381
6382
6383
6384
6385
6386 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
6387 if test "x$ac_cv_header_minix_config_h" = x""yes; then :
6388 MINIX=yes
6389 else
6390 MINIX=
6391 fi
6392
6393
6394 if test "$MINIX" = yes; then
6395
6396 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
6397
6398
6399 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
6400
6401
6402 $as_echo "#define _MINIX 1" >>confdefs.h
6403
6404 fi
6405
6406 case "$host_os" in
6407 hpux*)
6408
6409 $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
6410
6411 ;;
6412 esac
6413
6414
6415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
6416 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
6417 if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
6418 $as_echo_n "(cached) " >&6
6419 else
6420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6421 /* end confdefs.h. */
6422
6423 # define __EXTENSIONS__ 1
6424 $ac_includes_default
6425 int
6426 main ()
6427 {
6428
6429 ;
6430 return 0;
6431 }
6432 _ACEOF
6433 if ac_fn_c_try_compile "$LINENO"; then :
6434 ac_cv_safe_to_define___extensions__=yes
6435 else
6436 ac_cv_safe_to_define___extensions__=no
6437 fi
6438 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6439 fi
6440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
6441 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
6442 test $ac_cv_safe_to_define___extensions__ = yes &&
6443 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
6444
6445 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
6446
6447 $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
6448
6449 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
6450
6451 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
6452
6453 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
6454
6455
6456
6457
6458
6459
6460
6461
6462 # Check whether --enable-largefile was given.
6463 if test "${enable_largefile+set}" = set; then :
6464 enableval=$enable_largefile;
6465 fi
6466
6467 if test "$enable_largefile" != no; then
6468
6469 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
6470 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
6471 if test "${ac_cv_sys_largefile_CC+set}" = set; then :
6472 $as_echo_n "(cached) " >&6
6473 else
6474 ac_cv_sys_largefile_CC=no
6475 if test "$GCC" != yes; then
6476 ac_save_CC=$CC
6477 while :; do
6478 # IRIX 6.2 and later do not support large files by default,
6479 # so use the C compiler's -n32 option if that helps.
6480 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6481 /* end confdefs.h. */
6482 #include <sys/types.h>
6483 /* Check that off_t can represent 2**63 - 1 correctly.
6484 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6485 since some C++ compilers masquerading as C compilers
6486 incorrectly reject 9223372036854775807. */
6487 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6488 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6489 && LARGE_OFF_T % 2147483647 == 1)
6490 ? 1 : -1];
6491 int
6492 main ()
6493 {
6494
6495 ;
6496 return 0;
6497 }
6498 _ACEOF
6499 if ac_fn_c_try_compile "$LINENO"; then :
6500 break
6501 fi
6502 rm -f core conftest.err conftest.$ac_objext
6503 CC="$CC -n32"
6504 if ac_fn_c_try_compile "$LINENO"; then :
6505 ac_cv_sys_largefile_CC=' -n32'; break
6506 fi
6507 rm -f core conftest.err conftest.$ac_objext
6508 break
6509 done
6510 CC=$ac_save_CC
6511 rm -f conftest.$ac_ext
6512 fi
6513 fi
6514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
6515 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
6516 if test "$ac_cv_sys_largefile_CC" != no; then
6517 CC=$CC$ac_cv_sys_largefile_CC
6518 fi
6519
6520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
6521 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
6522 if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
6523 $as_echo_n "(cached) " >&6
6524 else
6525 while :; do
6526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6527 /* end confdefs.h. */
6528 #include <sys/types.h>
6529 /* Check that off_t can represent 2**63 - 1 correctly.
6530 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6531 since some C++ compilers masquerading as C compilers
6532 incorrectly reject 9223372036854775807. */
6533 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6534 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6535 && LARGE_OFF_T % 2147483647 == 1)
6536 ? 1 : -1];
6537 int
6538 main ()
6539 {
6540
6541 ;
6542 return 0;
6543 }
6544 _ACEOF
6545 if ac_fn_c_try_compile "$LINENO"; then :
6546 ac_cv_sys_file_offset_bits=no; break
6547 fi
6548 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6549 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6550 /* end confdefs.h. */
6551 #define _FILE_OFFSET_BITS 64
6552 #include <sys/types.h>
6553 /* Check that off_t can represent 2**63 - 1 correctly.
6554 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6555 since some C++ compilers masquerading as C compilers
6556 incorrectly reject 9223372036854775807. */
6557 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6558 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6559 && LARGE_OFF_T % 2147483647 == 1)
6560 ? 1 : -1];
6561 int
6562 main ()
6563 {
6564
6565 ;
6566 return 0;
6567 }
6568 _ACEOF
6569 if ac_fn_c_try_compile "$LINENO"; then :
6570 ac_cv_sys_file_offset_bits=64; break
6571 fi
6572 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6573 ac_cv_sys_file_offset_bits=unknown
6574 break
6575 done
6576 fi
6577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
6578 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
6579 case $ac_cv_sys_file_offset_bits in #(
6580 no | unknown) ;;
6581 *)
6582 cat >>confdefs.h <<_ACEOF
6583 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
6584 _ACEOF
6585 ;;
6586 esac
6587 rm -rf conftest*
6588 if test $ac_cv_sys_file_offset_bits = unknown; then
6589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
6590 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
6591 if test "${ac_cv_sys_large_files+set}" = set; then :
6592 $as_echo_n "(cached) " >&6
6593 else
6594 while :; do
6595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6596 /* end confdefs.h. */
6597 #include <sys/types.h>
6598 /* Check that off_t can represent 2**63 - 1 correctly.
6599 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6600 since some C++ compilers masquerading as C compilers
6601 incorrectly reject 9223372036854775807. */
6602 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6603 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6604 && LARGE_OFF_T % 2147483647 == 1)
6605 ? 1 : -1];
6606 int
6607 main ()
6608 {
6609
6610 ;
6611 return 0;
6612 }
6613 _ACEOF
6614 if ac_fn_c_try_compile "$LINENO"; then :
6615 ac_cv_sys_large_files=no; break
6616 fi
6617 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6619 /* end confdefs.h. */
6620 #define _LARGE_FILES 1
6621 #include <sys/types.h>
6622 /* Check that off_t can represent 2**63 - 1 correctly.
6623 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6624 since some C++ compilers masquerading as C compilers
6625 incorrectly reject 9223372036854775807. */
6626 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6627 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6628 && LARGE_OFF_T % 2147483647 == 1)
6629 ? 1 : -1];
6630 int
6631 main ()
6632 {
6633
6634 ;
6635 return 0;
6636 }
6637 _ACEOF
6638 if ac_fn_c_try_compile "$LINENO"; then :
6639 ac_cv_sys_large_files=1; break
6640 fi
6641 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6642 ac_cv_sys_large_files=unknown
6643 break
6644 done
6645 fi
6646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
6647 $as_echo "$ac_cv_sys_large_files" >&6; }
6648 case $ac_cv_sys_large_files in #(
6649 no | unknown) ;;
6650 *)
6651 cat >>confdefs.h <<_ACEOF
6652 #define _LARGE_FILES $ac_cv_sys_large_files
6653 _ACEOF
6654 ;;
6655 esac
6656 rm -rf conftest*
6657 fi
6658
6659
6660 fi
6661
6662 case $ac_cv_prog_cc_stdc in #(
6663 no) :
6664 ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; #(
6665 *) :
6666 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
6667 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
6668 if test "${ac_cv_prog_cc_c99+set}" = set; then :
6669 $as_echo_n "(cached) " >&6
6670 else
6671 ac_cv_prog_cc_c99=no
6672 ac_save_CC=$CC
6673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6674 /* end confdefs.h. */
6675 #include <stdarg.h>
6676 #include <stdbool.h>
6677 #include <stdlib.h>
6678 #include <wchar.h>
6679 #include <stdio.h>
6680
6681 // Check varargs macros. These examples are taken from C99 6.10.3.5.
6682 #define debug(...) fprintf (stderr, __VA_ARGS__)
6683 #define showlist(...) puts (#__VA_ARGS__)
6684 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
6685 static void
6686 test_varargs_macros (void)
6687 {
6688 int x = 1234;
6689 int y = 5678;
6690 debug ("Flag");
6691 debug ("X = %d\n", x);
6692 showlist (The first, second, and third items.);
6693 report (x>y, "x is %d but y is %d", x, y);
6694 }
6695
6696 // Check long long types.
6697 #define BIG64 18446744073709551615ull
6698 #define BIG32 4294967295ul
6699 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
6700 #if !BIG_OK
6701 your preprocessor is broken;
6702 #endif
6703 #if BIG_OK
6704 #else
6705 your preprocessor is broken;
6706 #endif
6707 static long long int bignum = -9223372036854775807LL;
6708 static unsigned long long int ubignum = BIG64;
6709
6710 struct incomplete_array
6711 {
6712 int datasize;
6713 double data[];
6714 };
6715
6716 struct named_init {
6717 int number;
6718 const wchar_t *name;
6719 double average;
6720 };
6721
6722 typedef const char *ccp;
6723
6724 static inline int
6725 test_restrict (ccp restrict text)
6726 {
6727 // See if C++-style comments work.
6728 // Iterate through items via the restricted pointer.
6729 // Also check for declarations in for loops.
6730 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
6731 continue;
6732 return 0;
6733 }
6734
6735 // Check varargs and va_copy.
6736 static void
6737 test_varargs (const char *format, ...)
6738 {
6739 va_list args;
6740 va_start (args, format);
6741 va_list args_copy;
6742 va_copy (args_copy, args);
6743
6744 const char *str;
6745 int number;
6746 float fnumber;
6747
6748 while (*format)
6749 {
6750 switch (*format++)
6751 {
6752 case 's': // string
6753 str = va_arg (args_copy, const char *);
6754 break;
6755 case 'd': // int
6756 number = va_arg (args_copy, int);
6757 break;
6758 case 'f': // float
6759 fnumber = va_arg (args_copy, double);
6760 break;
6761 default:
6762 break;
6763 }
6764 }
6765 va_end (args_copy);
6766 va_end (args);
6767 }
6768
6769 int
6770 main ()
6771 {
6772
6773 // Check bool.
6774 _Bool success = false;
6775
6776 // Check restrict.
6777 if (test_restrict ("String literal") == 0)
6778 success = true;
6779 char *restrict newvar = "Another string";
6780
6781 // Check varargs.
6782 test_varargs ("s, d' f .", "string", 65, 34.234);
6783 test_varargs_macros ();
6784
6785 // Check flexible array members.
6786 struct incomplete_array *ia =
6787 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
6788 ia->datasize = 10;
6789 for (int i = 0; i < ia->datasize; ++i)
6790 ia->data[i] = i * 1.234;
6791
6792 // Check named initializers.
6793 struct named_init ni = {
6794 .number = 34,
6795 .name = L"Test wide string",
6796 .average = 543.34343,
6797 };
6798
6799 ni.number = 58;
6800
6801 int dynamic_array[ni.number];
6802 dynamic_array[ni.number - 1] = 543;
6803
6804 // work around unused variable warnings
6805 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
6806 || dynamic_array[ni.number - 1] != 543);
6807
6808 ;
6809 return 0;
6810 }
6811 _ACEOF
6812 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99
6813 do
6814 CC="$ac_save_CC $ac_arg"
6815 if ac_fn_c_try_compile "$LINENO"; then :
6816 ac_cv_prog_cc_c99=$ac_arg
6817 fi
6818 rm -f core conftest.err conftest.$ac_objext
6819 test "x$ac_cv_prog_cc_c99" != "xno" && break
6820 done
6821 rm -f conftest.$ac_ext
6822 CC=$ac_save_CC
6823
6824 fi
6825 # AC_CACHE_VAL
6826 case "x$ac_cv_prog_cc_c99" in
6827 x)
6828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6829 $as_echo "none needed" >&6; } ;;
6830 xno)
6831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6832 $as_echo "unsupported" >&6; } ;;
6833 *)
6834 CC="$CC $ac_cv_prog_cc_c99"
6835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
6836 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
6837 esac
6838 if test "x$ac_cv_prog_cc_c99" != xno; then :
6839 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
6840 else
6841 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
6842 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
6843 if test "${ac_cv_prog_cc_c89+set}" = set; then :
6844 $as_echo_n "(cached) " >&6
6845 else
6846 ac_cv_prog_cc_c89=no
6847 ac_save_CC=$CC
6848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6849 /* end confdefs.h. */
6850 #include <stdarg.h>
6851 #include <stdio.h>
6852 #include <sys/types.h>
6853 #include <sys/stat.h>
6854 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
6855 struct buf { int x; };
6856 FILE * (*rcsopen) (struct buf *, struct stat *, int);
6857 static char *e (p, i)
6858 char **p;
6859 int i;
6860 {
6861 return p[i];
6862 }
6863 static char *f (char * (*g) (char **, int), char **p, ...)
6864 {
6865 char *s;
6866 va_list v;
6867 va_start (v,p);
6868 s = g (p, va_arg (v,int));
6869 va_end (v);
6870 return s;
6871 }
6872
6873 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
6874 function prototypes and stuff, but not '\xHH' hex character constants.
6875 These don't provoke an error unfortunately, instead are silently treated
6876 as 'x'. The following induces an error, until -std is added to get
6877 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
6878 array size at least. It's necessary to write '\x00'==0 to get something
6879 that's true only with -std. */
6880 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
6881
6882 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
6883 inside strings and character constants. */
6884 #define FOO(x) 'x'
6885 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
6886
6887 int test (int i, double x);
6888 struct s1 {int (*f) (int a);};
6889 struct s2 {int (*f) (double a);};
6890 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
6891 int argc;
6892 char **argv;
6893 int
6894 main ()
6895 {
6896 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
6897 ;
6898 return 0;
6899 }
6900 _ACEOF
6901 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
6902 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
6903 do
6904 CC="$ac_save_CC $ac_arg"
6905 if ac_fn_c_try_compile "$LINENO"; then :
6906 ac_cv_prog_cc_c89=$ac_arg
6907 fi
6908 rm -f core conftest.err conftest.$ac_objext
6909 test "x$ac_cv_prog_cc_c89" != "xno" && break
6910 done
6911 rm -f conftest.$ac_ext
6912 CC=$ac_save_CC
6913
6914 fi
6915 # AC_CACHE_VAL
6916 case "x$ac_cv_prog_cc_c89" in
6917 x)
6918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6919 $as_echo "none needed" >&6; } ;;
6920 xno)
6921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6922 $as_echo "unsupported" >&6; } ;;
6923 *)
6924 CC="$CC $ac_cv_prog_cc_c89"
6925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
6926 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
6927 esac
6928 if test "x$ac_cv_prog_cc_c89" != xno; then :
6929 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
6930 else
6931 ac_cv_prog_cc_stdc=no
6932 fi
6933
6934 fi
6935 ;;
6936 esac
6937 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5
6938 $as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; }
6939 if test "${ac_cv_prog_cc_stdc+set}" = set; then :
6940 $as_echo_n "(cached) " >&6
6941 fi
6942
6943 case $ac_cv_prog_cc_stdc in #(
6944 no) :
6945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6946 $as_echo "unsupported" >&6; } ;; #(
6947 '') :
6948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6949 $as_echo "none needed" >&6; } ;; #(
6950 *) :
6951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_stdc" >&5
6952 $as_echo "$ac_cv_prog_cc_stdc" >&6; } ;;
6953 esac
6954
6955
6956
6957 # Code from module alloca-opt:
6958 # Code from module allocator:
6959 # Code from module c-ctype:
6960 # Code from module c-strcase:
6961 # Code from module careadlinkat:
6962 # Code from module clock-time:
6963 # Code from module crypto/md5:
6964 # Code from module crypto/sha1:
6965 # Code from module crypto/sha256:
6966 # Code from module crypto/sha512:
6967 # Code from module dosname:
6968 # Code from module dtoastr:
6969 # Code from module dtotimespec:
6970 # Code from module dup2:
6971 # Code from module environ:
6972 # Code from module execinfo:
6973 # Code from module extensions:
6974
6975 # Code from module extern-inline:
6976 # Code from module filemode:
6977 # Code from module getloadavg:
6978 # Code from module getopt-gnu:
6979 # Code from module getopt-posix:
6980 # Code from module gettext-h:
6981 # Code from module gettime:
6982 # Code from module gettimeofday:
6983 # Code from module ignore-value:
6984 # Code from module include_next:
6985 # Code from module intprops:
6986 # Code from module inttypes-incomplete:
6987 # Code from module largefile:
6988
6989 # Code from module lstat:
6990 # Code from module manywarnings:
6991 # Code from module mktime:
6992 # Code from module multiarch:
6993 # Code from module nocrash:
6994 # Code from module pathmax:
6995 # Code from module pselect:
6996 # Code from module pthread_sigmask:
6997 # Code from module readlink:
6998 # Code from module signal-h:
6999 # Code from module snippet/_Noreturn:
7000 # Code from module snippet/arg-nonnull:
7001 # Code from module snippet/c++defs:
7002 # Code from module snippet/warn-on-use:
7003 # Code from module socklen:
7004 # Code from module ssize_t:
7005 # Code from module stat:
7006 # Code from module stat-time:
7007 # Code from module stdalign:
7008 # Code from module stdarg:
7009
7010
7011
7012 # Code from module stdbool:
7013 # Code from module stddef:
7014 # Code from module stdint:
7015 # Code from module stdio:
7016 # Code from module stdlib:
7017 # Code from module strftime:
7018 # Code from module strtoimax:
7019 # Code from module strtoll:
7020 # Code from module strtoull:
7021 # Code from module strtoumax:
7022 # Code from module symlink:
7023 # Code from module sys_select:
7024 # Code from module sys_stat:
7025 # Code from module sys_time:
7026 # Code from module time:
7027 # Code from module time_r:
7028 # Code from module timer-time:
7029 # Code from module timespec:
7030 # Code from module timespec-add:
7031 # Code from module timespec-sub:
7032 # Code from module u64:
7033 # Code from module unistd:
7034 # Code from module utimens:
7035 # Code from module verify:
7036 # Code from module warnings:
7037
7038
7039 # It's helpful to have C macros available to GDB, so prefer -g3 to -g
7040 # if -g3 works and the user does not specify CFLAGS.
7041 # This test must follow gl_EARLY; otherwise AC_LINK_IFELSE complains.
7042 if test "$ac_test_CFLAGS" != set; then
7043 case $CFLAGS in
7044 '-g')
7045 emacs_g3_CFLAGS='-g3';;
7046 '-g -O2')
7047 emacs_g3_CFLAGS='-g3 -O2';;
7048 *)
7049 emacs_g3_CFLAGS='';;
7050 esac
7051 if test -n "$emacs_g3_CFLAGS"; then
7052 emacs_save_CFLAGS=$CFLAGS
7053 CFLAGS=$emacs_g3_CFLAGS
7054 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts $emacs_g3_CFLAGS" >&5
7055 $as_echo_n "checking whether $CC accepts $emacs_g3_CFLAGS... " >&6; }
7056 if test "${emacs_cv_prog_cc_g3+set}" = set; then :
7057 $as_echo_n "(cached) " >&6
7058 else
7059 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7060 /* end confdefs.h. */
7061
7062 int
7063 main ()
7064 {
7065
7066 ;
7067 return 0;
7068 }
7069 _ACEOF
7070 if ac_fn_c_try_link "$LINENO"; then :
7071 emacs_cv_prog_cc_g3=yes
7072 else
7073 emacs_cv_prog_cc_g3=no
7074 fi
7075 rm -f core conftest.err conftest.$ac_objext \
7076 conftest$ac_exeext conftest.$ac_ext
7077 fi
7078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_prog_cc_g3" >&5
7079 $as_echo "$emacs_cv_prog_cc_g3" >&6; }
7080 if test $emacs_cv_prog_cc_g3 = yes; then
7081 CFLAGS=$emacs_g3_CFLAGS
7082 else
7083 CFLAGS=$emacs_save_CFLAGS
7084 fi
7085 fi
7086 fi
7087
7088 # Check whether --enable-gcc-warnings was given.
7089 if test "${enable_gcc_warnings+set}" = set; then :
7090 enableval=$enable_gcc_warnings; case $enableval in
7091 yes|no) ;;
7092 *) as_fn_error "bad value $enableval for gcc-warnings option" "$LINENO" 5 ;;
7093 esac
7094 gl_gcc_warnings=$enableval
7095 else
7096 gl_gcc_warnings=no
7097
7098 fi
7099
7100
7101 # Check whether --enable-link-time-optimization was given.
7102 if test "${enable_link_time_optimization+set}" = set; then :
7103 enableval=$enable_link_time_optimization; if test "${enableval}" != "no"; then
7104 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether link-time optimization is supported" >&5
7105 $as_echo_n "checking whether link-time optimization is supported... " >&6; }
7106 ac_lto_supported=no
7107 if test x$GCC = xyes; then
7108 CPUS=`getconf _NPROCESSORS_ONLN 2>/dev/null`
7109 if test x$CPUS != x; then
7110 LTO="-flto=$CPUS"
7111 else
7112 LTO="-flto"
7113 fi
7114 old_CFLAGS=$CFLAGS
7115 CFLAGS="$CFLAGS $LTO"
7116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7117 /* end confdefs.h. */
7118
7119 int
7120 main ()
7121 {
7122
7123 ;
7124 return 0;
7125 }
7126 _ACEOF
7127 if ac_fn_c_try_compile "$LINENO"; then :
7128 ac_lto_supported=yes
7129 else
7130 ac_lto_supported=no
7131 fi
7132 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7133 CFLAGS="$old_CFLAGS"
7134 fi
7135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_lto_supported" >&5
7136 $as_echo "$ac_lto_supported" >&6; }
7137 if test "$ac_lto_supported" = "yes"; then
7138 CFLAGS="$CFLAGS $LTO"
7139 fi
7140 fi
7141 fi
7142
7143
7144 # gl_GCC_VERSION_IFELSE([major], [minor], [run-if-found], [run-if-not-found])
7145 # ------------------------------------------------
7146 # If $CPP is gcc-MAJOR.MINOR or newer, then run RUN-IF-FOUND.
7147 # Otherwise, run RUN-IF-NOT-FOUND.
7148
7149
7150 # When compiling with GCC, prefer -isystem to -I when including system
7151 # include files, to avoid generating useless diagnostics for the files.
7152 if test "$gl_gcc_warnings" != yes; then
7153 isystem='-I'
7154 else
7155 isystem='-isystem '
7156
7157 # This, $nw, is the list of warnings we disable.
7158 nw=
7159
7160 case $with_x_toolkit in
7161 lucid | athena | motif)
7162 # Old toolkits mishandle 'const'.
7163 nw="$nw -Wwrite-strings"
7164 ;;
7165 *)
7166 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror" >&5
7167 $as_echo_n "checking whether C compiler handles -Werror... " >&6; }
7168 if test "${gl_cv_warn_c__Werror+set}" = set; then :
7169 $as_echo_n "(cached) " >&6
7170 else
7171
7172 gl_save_compiler_FLAGS="$CFLAGS"
7173 as_fn_append CFLAGS " -Werror"
7174 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7175 /* end confdefs.h. */
7176
7177 int
7178 main ()
7179 {
7180
7181 ;
7182 return 0;
7183 }
7184 _ACEOF
7185 if ac_fn_c_try_compile "$LINENO"; then :
7186 gl_cv_warn_c__Werror=yes
7187 else
7188 gl_cv_warn_c__Werror=no
7189 fi
7190 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7191 CFLAGS="$gl_save_compiler_FLAGS"
7192
7193 fi
7194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror" >&5
7195 $as_echo "$gl_cv_warn_c__Werror" >&6; }
7196 if test "x$gl_cv_warn_c__Werror" = x""yes; then :
7197 as_fn_append WERROR_CFLAGS " -Werror"
7198 fi
7199
7200
7201 ;;
7202 esac
7203
7204
7205 nw="$nw -Waggregate-return" # anachronistic
7206 nw="$nw -Wlong-long" # C90 is anachronistic
7207 nw="$nw -Wc++-compat" # We don't care about C++ compilers
7208 nw="$nw -Wundef" # Warns on '#if GNULIB_FOO' etc in gnulib
7209 nw="$nw -Wtraditional" # Warns on #elif which we use often
7210 nw="$nw -Wcast-qual" # Too many warnings for now
7211 nw="$nw -Wconversion" # Too many warnings for now
7212 nw="$nw -Wsystem-headers" # Don't let system headers trigger warnings
7213 nw="$nw -Wsign-conversion" # Too many warnings for now
7214 nw="$nw -Woverlength-strings" # Not a problem these days
7215 nw="$nw -Wtraditional-conversion" # Too many warnings for now
7216 nw="$nw -Wunreachable-code" # so buggy that it's now silently ignored
7217 nw="$nw -Wpadded" # Our structs are not padded
7218 nw="$nw -Wredundant-decls" # we regularly (re)declare functions
7219 nw="$nw -Wlogical-op" # any use of fwrite provokes this
7220 nw="$nw -Wformat-nonliteral" # we do this a lot
7221 nw="$nw -Wvla" # warnings in gettext.h
7222 nw="$nw -Wnested-externs" # use of XARGMATCH/verify_function__
7223 nw="$nw -Wswitch-enum" # Too many warnings for now
7224 nw="$nw -Wswitch-default" # Too many warnings for now
7225 nw="$nw -Wfloat-equal" # warns about high-quality code
7226 nw="$nw -Winline" # OK to ignore 'inline'
7227 nw="$nw -Wjump-misses-init" # We sometimes safely jump over init.
7228 nw="$nw -Wsync-nand" # irrelevant here, and provokes ObjC warning
7229 nw="$nw -Wunsafe-loop-optimizations" # OK to suppress unsafe optimizations
7230
7231 # Emacs doesn't care about shadowing; see
7232 # <http://lists.gnu.org/archive/html/emacs-diffs/2011-11/msg00265.html>.
7233 nw="$nw -Wshadow"
7234
7235 # The following lines should be removable at some point.
7236 nw="$nw -Wstack-protector"
7237 nw="$nw -Wstrict-overflow"
7238 nw="$nw -Wsuggest-attribute=pure"
7239
7240
7241
7242 if test -n "$GCC"; then
7243
7244 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is supported" >&5
7245 $as_echo_n "checking whether -Wno-missing-field-initializers is supported... " >&6; }
7246 if test "${gl_cv_cc_nomfi_supported+set}" = set; then :
7247 $as_echo_n "(cached) " >&6
7248 else
7249
7250 gl_save_CFLAGS="$CFLAGS"
7251 CFLAGS="$CFLAGS -W -Werror -Wno-missing-field-initializers"
7252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7253 /* end confdefs.h. */
7254
7255 int
7256 main ()
7257 {
7258
7259 ;
7260 return 0;
7261 }
7262 _ACEOF
7263 if ac_fn_c_try_compile "$LINENO"; then :
7264 gl_cv_cc_nomfi_supported=yes
7265 else
7266 gl_cv_cc_nomfi_supported=no
7267 fi
7268 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7269 CFLAGS="$gl_save_CFLAGS"
7270 fi
7271
7272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_supported" >&5
7273 $as_echo "$gl_cv_cc_nomfi_supported" >&6; }
7274
7275 if test "$gl_cv_cc_nomfi_supported" = yes; then
7276 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is needed" >&5
7277 $as_echo_n "checking whether -Wno-missing-field-initializers is needed... " >&6; }
7278 if test "${gl_cv_cc_nomfi_needed+set}" = set; then :
7279 $as_echo_n "(cached) " >&6
7280 else
7281
7282 gl_save_CFLAGS="$CFLAGS"
7283 CFLAGS="$CFLAGS -W -Werror"
7284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7285 /* end confdefs.h. */
7286 void f (void)
7287 {
7288 typedef struct { int a; int b; } s_t;
7289 s_t s1 = { 0, };
7290 }
7291
7292 int
7293 main ()
7294 {
7295
7296 ;
7297 return 0;
7298 }
7299 _ACEOF
7300 if ac_fn_c_try_compile "$LINENO"; then :
7301 gl_cv_cc_nomfi_needed=no
7302 else
7303 gl_cv_cc_nomfi_needed=yes
7304 fi
7305 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7306 CFLAGS="$gl_save_CFLAGS"
7307
7308 fi
7309
7310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_needed" >&5
7311 $as_echo "$gl_cv_cc_nomfi_needed" >&6; }
7312 fi
7313
7314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wuninitialized is supported" >&5
7315 $as_echo_n "checking whether -Wuninitialized is supported... " >&6; }
7316 if test "${gl_cv_cc_uninitialized_supported+set}" = set; then :
7317 $as_echo_n "(cached) " >&6
7318 else
7319
7320 gl_save_CFLAGS="$CFLAGS"
7321 CFLAGS="$CFLAGS -Werror -Wuninitialized"
7322 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7323 /* end confdefs.h. */
7324
7325 int
7326 main ()
7327 {
7328
7329 ;
7330 return 0;
7331 }
7332 _ACEOF
7333 if ac_fn_c_try_compile "$LINENO"; then :
7334 gl_cv_cc_uninitialized_supported=yes
7335 else
7336 gl_cv_cc_uninitialized_supported=no
7337 fi
7338 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7339 CFLAGS="$gl_save_CFLAGS"
7340 fi
7341
7342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_uninitialized_supported" >&5
7343 $as_echo "$gl_cv_cc_uninitialized_supported" >&6; }
7344
7345 fi
7346
7347 # List all gcc warning categories.
7348 gl_manywarn_set=
7349 for gl_manywarn_item in \
7350 -W \
7351 -Wabi \
7352 -Waddress \
7353 -Wall \
7354 -Warray-bounds \
7355 -Wattributes \
7356 -Wbad-function-cast \
7357 -Wbuiltin-macro-redefined \
7358 -Wcast-align \
7359 -Wchar-subscripts \
7360 -Wclobbered \
7361 -Wcomment \
7362 -Wcomments \
7363 -Wcoverage-mismatch \
7364 -Wcpp \
7365 -Wdeprecated \
7366 -Wdeprecated-declarations \
7367 -Wdisabled-optimization \
7368 -Wdiv-by-zero \
7369 -Wdouble-promotion \
7370 -Wempty-body \
7371 -Wendif-labels \
7372 -Wenum-compare \
7373 -Wextra \
7374 -Wformat-contains-nul \
7375 -Wformat-extra-args \
7376 -Wformat-nonliteral \
7377 -Wformat-security \
7378 -Wformat-y2k \
7379 -Wformat-zero-length \
7380 -Wformat=2 \
7381 -Wfree-nonheap-object \
7382 -Wignored-qualifiers \
7383 -Wimplicit \
7384 -Wimplicit-function-declaration \
7385 -Wimplicit-int \
7386 -Winit-self \
7387 -Winline \
7388 -Wint-to-pointer-cast \
7389 -Winvalid-memory-model \
7390 -Winvalid-pch \
7391 -Wjump-misses-init \
7392 -Wlogical-op \
7393 -Wmain \
7394 -Wmaybe-uninitialized \
7395 -Wmissing-braces \
7396 -Wmissing-declarations \
7397 -Wmissing-field-initializers \
7398 -Wmissing-format-attribute \
7399 -Wmissing-include-dirs \
7400 -Wmissing-noreturn \
7401 -Wmissing-parameter-type \
7402 -Wmissing-prototypes \
7403 -Wmudflap \
7404 -Wmultichar \
7405 -Wnarrowing \
7406 -Wnested-externs \
7407 -Wnonnull \
7408 -Wnormalized=nfc \
7409 -Wold-style-declaration \
7410 -Wold-style-definition \
7411 -Woverflow \
7412 -Woverlength-strings \
7413 -Woverride-init \
7414 -Wpacked \
7415 -Wpacked-bitfield-compat \
7416 -Wparentheses \
7417 -Wpointer-arith \
7418 -Wpointer-sign \
7419 -Wpointer-to-int-cast \
7420 -Wpragmas \
7421 -Wreturn-type \
7422 -Wsequence-point \
7423 -Wshadow \
7424 -Wsizeof-pointer-memaccess \
7425 -Wstack-protector \
7426 -Wstrict-aliasing \
7427 -Wstrict-overflow \
7428 -Wstrict-prototypes \
7429 -Wsuggest-attribute=const \
7430 -Wsuggest-attribute=format \
7431 -Wsuggest-attribute=noreturn \
7432 -Wsuggest-attribute=pure \
7433 -Wswitch \
7434 -Wswitch-default \
7435 -Wsync-nand \
7436 -Wsystem-headers \
7437 -Wtrampolines \
7438 -Wtrigraphs \
7439 -Wtype-limits \
7440 -Wuninitialized \
7441 -Wunknown-pragmas \
7442 -Wunreachable-code \
7443 -Wunsafe-loop-optimizations \
7444 -Wunused \
7445 -Wunused-but-set-parameter \
7446 -Wunused-but-set-variable \
7447 -Wunused-function \
7448 -Wunused-label \
7449 -Wunused-local-typedefs \
7450 -Wunused-macros \
7451 -Wunused-parameter \
7452 -Wunused-result \
7453 -Wunused-value \
7454 -Wunused-variable \
7455 -Wvarargs \
7456 -Wvariadic-macros \
7457 -Wvector-operation-performance \
7458 -Wvla \
7459 -Wvolatile-register-var \
7460 -Wwrite-strings \
7461 \
7462 ; do
7463 gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
7464 done
7465
7466 # Disable specific options as needed.
7467 if test "$gl_cv_cc_nomfi_needed" = yes; then
7468 gl_manywarn_set="$gl_manywarn_set -Wno-missing-field-initializers"
7469 fi
7470
7471 if test "$gl_cv_cc_uninitialized_supported" = no; then
7472 gl_manywarn_set="$gl_manywarn_set -Wno-uninitialized"
7473 fi
7474
7475 ws=$gl_manywarn_set
7476
7477
7478 gl_warn_set=
7479 set x $ws; shift
7480 for gl_warn_item
7481 do
7482 case " $nw " in
7483 *" $gl_warn_item "*)
7484 ;;
7485 *)
7486 gl_warn_set="$gl_warn_set $gl_warn_item"
7487 ;;
7488 esac
7489 done
7490 ws=$gl_warn_set
7491
7492 for w in $ws; do
7493 as_gl_Warn=`$as_echo "gl_cv_warn_c_$w" | $as_tr_sh`
7494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles $w" >&5
7495 $as_echo_n "checking whether C compiler handles $w... " >&6; }
7496 if { as_var=$as_gl_Warn; eval "test \"\${$as_var+set}\" = set"; }; then :
7497 $as_echo_n "(cached) " >&6
7498 else
7499
7500 gl_save_compiler_FLAGS="$CFLAGS"
7501 as_fn_append CFLAGS " $w"
7502 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7503 /* end confdefs.h. */
7504
7505 int
7506 main ()
7507 {
7508
7509 ;
7510 return 0;
7511 }
7512 _ACEOF
7513 if ac_fn_c_try_compile "$LINENO"; then :
7514 eval "$as_gl_Warn=yes"
7515 else
7516 eval "$as_gl_Warn=no"
7517 fi
7518 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7519 CFLAGS="$gl_save_compiler_FLAGS"
7520
7521 fi
7522 eval ac_res=\$$as_gl_Warn
7523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7524 $as_echo "$ac_res" >&6; }
7525 eval as_val=\$$as_gl_Warn
7526 if test "x$as_val" = x""yes; then :
7527 as_fn_append WARN_CFLAGS " $w"
7528 fi
7529
7530
7531 done
7532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-missing-field-initializers" >&5
7533 $as_echo_n "checking whether C compiler handles -Wno-missing-field-initializers... " >&6; }
7534 if test "${gl_cv_warn_c__Wno_missing_field_initializers+set}" = set; then :
7535 $as_echo_n "(cached) " >&6
7536 else
7537
7538 gl_save_compiler_FLAGS="$CFLAGS"
7539 as_fn_append CFLAGS " -Wno-missing-field-initializers"
7540 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7541 /* end confdefs.h. */
7542
7543 int
7544 main ()
7545 {
7546
7547 ;
7548 return 0;
7549 }
7550 _ACEOF
7551 if ac_fn_c_try_compile "$LINENO"; then :
7552 gl_cv_warn_c__Wno_missing_field_initializers=yes
7553 else
7554 gl_cv_warn_c__Wno_missing_field_initializers=no
7555 fi
7556 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7557 CFLAGS="$gl_save_compiler_FLAGS"
7558
7559 fi
7560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_missing_field_initializers" >&5
7561 $as_echo "$gl_cv_warn_c__Wno_missing_field_initializers" >&6; }
7562 if test "x$gl_cv_warn_c__Wno_missing_field_initializers" = x""yes; then :
7563 as_fn_append WARN_CFLAGS " -Wno-missing-field-initializers"
7564 fi
7565
7566 # We need this one
7567 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-sign-compare" >&5
7568 $as_echo_n "checking whether C compiler handles -Wno-sign-compare... " >&6; }
7569 if test "${gl_cv_warn_c__Wno_sign_compare+set}" = set; then :
7570 $as_echo_n "(cached) " >&6
7571 else
7572
7573 gl_save_compiler_FLAGS="$CFLAGS"
7574 as_fn_append CFLAGS " -Wno-sign-compare"
7575 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7576 /* end confdefs.h. */
7577
7578 int
7579 main ()
7580 {
7581
7582 ;
7583 return 0;
7584 }
7585 _ACEOF
7586 if ac_fn_c_try_compile "$LINENO"; then :
7587 gl_cv_warn_c__Wno_sign_compare=yes
7588 else
7589 gl_cv_warn_c__Wno_sign_compare=no
7590 fi
7591 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7592 CFLAGS="$gl_save_compiler_FLAGS"
7593
7594 fi
7595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_sign_compare" >&5
7596 $as_echo "$gl_cv_warn_c__Wno_sign_compare" >&6; }
7597 if test "x$gl_cv_warn_c__Wno_sign_compare" = x""yes; then :
7598 as_fn_append WARN_CFLAGS " -Wno-sign-compare"
7599 fi
7600
7601 # Too many warnings for now
7602 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-type-limits" >&5
7603 $as_echo_n "checking whether C compiler handles -Wno-type-limits... " >&6; }
7604 if test "${gl_cv_warn_c__Wno_type_limits+set}" = set; then :
7605 $as_echo_n "(cached) " >&6
7606 else
7607
7608 gl_save_compiler_FLAGS="$CFLAGS"
7609 as_fn_append CFLAGS " -Wno-type-limits"
7610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7611 /* end confdefs.h. */
7612
7613 int
7614 main ()
7615 {
7616
7617 ;
7618 return 0;
7619 }
7620 _ACEOF
7621 if ac_fn_c_try_compile "$LINENO"; then :
7622 gl_cv_warn_c__Wno_type_limits=yes
7623 else
7624 gl_cv_warn_c__Wno_type_limits=no
7625 fi
7626 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7627 CFLAGS="$gl_save_compiler_FLAGS"
7628
7629 fi
7630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_type_limits" >&5
7631 $as_echo "$gl_cv_warn_c__Wno_type_limits" >&6; }
7632 if test "x$gl_cv_warn_c__Wno_type_limits" = x""yes; then :
7633 as_fn_append WARN_CFLAGS " -Wno-type-limits"
7634 fi
7635
7636 # Too many warnings for now
7637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-switch" >&5
7638 $as_echo_n "checking whether C compiler handles -Wno-switch... " >&6; }
7639 if test "${gl_cv_warn_c__Wno_switch+set}" = set; then :
7640 $as_echo_n "(cached) " >&6
7641 else
7642
7643 gl_save_compiler_FLAGS="$CFLAGS"
7644 as_fn_append CFLAGS " -Wno-switch"
7645 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7646 /* end confdefs.h. */
7647
7648 int
7649 main ()
7650 {
7651
7652 ;
7653 return 0;
7654 }
7655 _ACEOF
7656 if ac_fn_c_try_compile "$LINENO"; then :
7657 gl_cv_warn_c__Wno_switch=yes
7658 else
7659 gl_cv_warn_c__Wno_switch=no
7660 fi
7661 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7662 CFLAGS="$gl_save_compiler_FLAGS"
7663
7664 fi
7665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_switch" >&5
7666 $as_echo "$gl_cv_warn_c__Wno_switch" >&6; }
7667 if test "x$gl_cv_warn_c__Wno_switch" = x""yes; then :
7668 as_fn_append WARN_CFLAGS " -Wno-switch"
7669 fi
7670
7671 # Too many warnings for now
7672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-parameter" >&5
7673 $as_echo_n "checking whether C compiler handles -Wno-unused-parameter... " >&6; }
7674 if test "${gl_cv_warn_c__Wno_unused_parameter+set}" = set; then :
7675 $as_echo_n "(cached) " >&6
7676 else
7677
7678 gl_save_compiler_FLAGS="$CFLAGS"
7679 as_fn_append CFLAGS " -Wno-unused-parameter"
7680 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7681 /* end confdefs.h. */
7682
7683 int
7684 main ()
7685 {
7686
7687 ;
7688 return 0;
7689 }
7690 _ACEOF
7691 if ac_fn_c_try_compile "$LINENO"; then :
7692 gl_cv_warn_c__Wno_unused_parameter=yes
7693 else
7694 gl_cv_warn_c__Wno_unused_parameter=no
7695 fi
7696 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7697 CFLAGS="$gl_save_compiler_FLAGS"
7698
7699 fi
7700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_parameter" >&5
7701 $as_echo "$gl_cv_warn_c__Wno_unused_parameter" >&6; }
7702 if test "x$gl_cv_warn_c__Wno_unused_parameter" = x""yes; then :
7703 as_fn_append WARN_CFLAGS " -Wno-unused-parameter"
7704 fi
7705
7706 # Too many warnings for now
7707 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-format-nonliteral" >&5
7708 $as_echo_n "checking whether C compiler handles -Wno-format-nonliteral... " >&6; }
7709 if test "${gl_cv_warn_c__Wno_format_nonliteral+set}" = set; then :
7710 $as_echo_n "(cached) " >&6
7711 else
7712
7713 gl_save_compiler_FLAGS="$CFLAGS"
7714 as_fn_append CFLAGS " -Wno-format-nonliteral"
7715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7716 /* end confdefs.h. */
7717
7718 int
7719 main ()
7720 {
7721
7722 ;
7723 return 0;
7724 }
7725 _ACEOF
7726 if ac_fn_c_try_compile "$LINENO"; then :
7727 gl_cv_warn_c__Wno_format_nonliteral=yes
7728 else
7729 gl_cv_warn_c__Wno_format_nonliteral=no
7730 fi
7731 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7732 CFLAGS="$gl_save_compiler_FLAGS"
7733
7734 fi
7735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_format_nonliteral" >&5
7736 $as_echo "$gl_cv_warn_c__Wno_format_nonliteral" >&6; }
7737 if test "x$gl_cv_warn_c__Wno_format_nonliteral" = x""yes; then :
7738 as_fn_append WARN_CFLAGS " -Wno-format-nonliteral"
7739 fi
7740
7741
7742
7743 # In spite of excluding -Wlogical-op above, it is enabled, as of
7744 # gcc 4.5.0 20090517.
7745 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-logical-op" >&5
7746 $as_echo_n "checking whether C compiler handles -Wno-logical-op... " >&6; }
7747 if test "${gl_cv_warn_c__Wno_logical_op+set}" = set; then :
7748 $as_echo_n "(cached) " >&6
7749 else
7750
7751 gl_save_compiler_FLAGS="$CFLAGS"
7752 as_fn_append CFLAGS " -Wno-logical-op"
7753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7754 /* end confdefs.h. */
7755
7756 int
7757 main ()
7758 {
7759
7760 ;
7761 return 0;
7762 }
7763 _ACEOF
7764 if ac_fn_c_try_compile "$LINENO"; then :
7765 gl_cv_warn_c__Wno_logical_op=yes
7766 else
7767 gl_cv_warn_c__Wno_logical_op=no
7768 fi
7769 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7770 CFLAGS="$gl_save_compiler_FLAGS"
7771
7772 fi
7773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_logical_op" >&5
7774 $as_echo "$gl_cv_warn_c__Wno_logical_op" >&6; }
7775 if test "x$gl_cv_warn_c__Wno_logical_op" = x""yes; then :
7776 as_fn_append WARN_CFLAGS " -Wno-logical-op"
7777 fi
7778
7779
7780
7781 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fdiagnostics-show-option" >&5
7782 $as_echo_n "checking whether C compiler handles -fdiagnostics-show-option... " >&6; }
7783 if test "${gl_cv_warn_c__fdiagnostics_show_option+set}" = set; then :
7784 $as_echo_n "(cached) " >&6
7785 else
7786
7787 gl_save_compiler_FLAGS="$CFLAGS"
7788 as_fn_append CFLAGS " -fdiagnostics-show-option"
7789 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7790 /* end confdefs.h. */
7791
7792 int
7793 main ()
7794 {
7795
7796 ;
7797 return 0;
7798 }
7799 _ACEOF
7800 if ac_fn_c_try_compile "$LINENO"; then :
7801 gl_cv_warn_c__fdiagnostics_show_option=yes
7802 else
7803 gl_cv_warn_c__fdiagnostics_show_option=no
7804 fi
7805 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7806 CFLAGS="$gl_save_compiler_FLAGS"
7807
7808 fi
7809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fdiagnostics_show_option" >&5
7810 $as_echo "$gl_cv_warn_c__fdiagnostics_show_option" >&6; }
7811 if test "x$gl_cv_warn_c__fdiagnostics_show_option" = x""yes; then :
7812 as_fn_append WARN_CFLAGS " -fdiagnostics-show-option"
7813 fi
7814
7815
7816 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -funit-at-a-time" >&5
7817 $as_echo_n "checking whether C compiler handles -funit-at-a-time... " >&6; }
7818 if test "${gl_cv_warn_c__funit_at_a_time+set}" = set; then :
7819 $as_echo_n "(cached) " >&6
7820 else
7821
7822 gl_save_compiler_FLAGS="$CFLAGS"
7823 as_fn_append CFLAGS " -funit-at-a-time"
7824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7825 /* end confdefs.h. */
7826
7827 int
7828 main ()
7829 {
7830
7831 ;
7832 return 0;
7833 }
7834 _ACEOF
7835 if ac_fn_c_try_compile "$LINENO"; then :
7836 gl_cv_warn_c__funit_at_a_time=yes
7837 else
7838 gl_cv_warn_c__funit_at_a_time=no
7839 fi
7840 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7841 CFLAGS="$gl_save_compiler_FLAGS"
7842
7843 fi
7844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__funit_at_a_time" >&5
7845 $as_echo "$gl_cv_warn_c__funit_at_a_time" >&6; }
7846 if test "x$gl_cv_warn_c__funit_at_a_time" = x""yes; then :
7847 as_fn_append WARN_CFLAGS " -funit-at-a-time"
7848 fi
7849
7850
7851
7852
7853 $as_echo "#define lint 1" >>confdefs.h
7854
7855
7856
7857 $as_echo "#define GNULIB_PORTCHECK 1" >>confdefs.h
7858
7859
7860 # We use a slightly smaller set of warning options for lib/.
7861 # Remove the following and save the result in GNULIB_WARN_CFLAGS.
7862 nw=
7863 nw="$nw -Wunused-macros"
7864
7865
7866 gl_warn_set=
7867 set x $WARN_CFLAGS; shift
7868 for gl_warn_item
7869 do
7870 case " $nw " in
7871 *" $gl_warn_item "*)
7872 ;;
7873 *)
7874 gl_warn_set="$gl_warn_set $gl_warn_item"
7875 ;;
7876 esac
7877 done
7878 GNULIB_WARN_CFLAGS=$gl_warn_set
7879
7880
7881 fi
7882
7883
7884
7885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7886 $as_echo_n "checking whether ln -s works... " >&6; }
7887 LN_S=$as_ln_s
7888 if test "$LN_S" = "ln -s"; then
7889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7890 $as_echo "yes" >&6; }
7891 else
7892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7893 $as_echo "no, using $LN_S" >&6; }
7894 fi
7895
7896
7897 # Extract the first word of "install-info", so it can be a program name with args.
7898 set dummy install-info; ac_word=$2
7899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7900 $as_echo_n "checking for $ac_word... " >&6; }
7901 if test "${ac_cv_path_INSTALL_INFO+set}" = set; then :
7902 $as_echo_n "(cached) " >&6
7903 else
7904 case $INSTALL_INFO in
7905 [\\/]* | ?:[\\/]*)
7906 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
7907 ;;
7908 *)
7909 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7910 for as_dir in $PATH$PATH_SEPARATOR/usr/sbin$PATH_SEPARATOR/sbin
7911 do
7912 IFS=$as_save_IFS
7913 test -z "$as_dir" && as_dir=.
7914 for ac_exec_ext in '' $ac_executable_extensions; do
7915 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7916 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
7917 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7918 break 2
7919 fi
7920 done
7921 done
7922 IFS=$as_save_IFS
7923
7924 test -z "$ac_cv_path_INSTALL_INFO" && ac_cv_path_INSTALL_INFO=":"
7925 ;;
7926 esac
7927 fi
7928 INSTALL_INFO=$ac_cv_path_INSTALL_INFO
7929 if test -n "$INSTALL_INFO"; then
7930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_INFO" >&5
7931 $as_echo "$INSTALL_INFO" >&6; }
7932 else
7933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7934 $as_echo "no" >&6; }
7935 fi
7936
7937
7938 # Extract the first word of "gzip", so it can be a program name with args.
7939 set dummy gzip; ac_word=$2
7940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7941 $as_echo_n "checking for $ac_word... " >&6; }
7942 if test "${ac_cv_path_GZIP_PROG+set}" = set; then :
7943 $as_echo_n "(cached) " >&6
7944 else
7945 case $GZIP_PROG in
7946 [\\/]* | ?:[\\/]*)
7947 ac_cv_path_GZIP_PROG="$GZIP_PROG" # Let the user override the test with a path.
7948 ;;
7949 *)
7950 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7951 for as_dir in $PATH
7952 do
7953 IFS=$as_save_IFS
7954 test -z "$as_dir" && as_dir=.
7955 for ac_exec_ext in '' $ac_executable_extensions; do
7956 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7957 ac_cv_path_GZIP_PROG="$as_dir/$ac_word$ac_exec_ext"
7958 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7959 break 2
7960 fi
7961 done
7962 done
7963 IFS=$as_save_IFS
7964
7965 ;;
7966 esac
7967 fi
7968 GZIP_PROG=$ac_cv_path_GZIP_PROG
7969 if test -n "$GZIP_PROG"; then
7970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP_PROG" >&5
7971 $as_echo "$GZIP_PROG" >&6; }
7972 else
7973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7974 $as_echo "no" >&6; }
7975 fi
7976
7977
7978
7979 if test $opsys = gnu-linux; then
7980 # Extract the first word of "paxctl", so it can be a program name with args.
7981 set dummy paxctl; ac_word=$2
7982 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7983 $as_echo_n "checking for $ac_word... " >&6; }
7984 if test "${ac_cv_path_PAXCTL+set}" = set; then :
7985 $as_echo_n "(cached) " >&6
7986 else
7987 case $PAXCTL in
7988 [\\/]* | ?:[\\/]*)
7989 ac_cv_path_PAXCTL="$PAXCTL" # Let the user override the test with a path.
7990 ;;
7991 *)
7992 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7993 for as_dir in $PATH$PATH_SEPARATOR/sbin$PATH_SEPARATOR/usr/sbin
7994 do
7995 IFS=$as_save_IFS
7996 test -z "$as_dir" && as_dir=.
7997 for ac_exec_ext in '' $ac_executable_extensions; do
7998 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7999 ac_cv_path_PAXCTL="$as_dir/$ac_word$ac_exec_ext"
8000 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8001 break 2
8002 fi
8003 done
8004 done
8005 IFS=$as_save_IFS
8006
8007 ;;
8008 esac
8009 fi
8010 PAXCTL=$ac_cv_path_PAXCTL
8011 if test -n "$PAXCTL"; then
8012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PAXCTL" >&5
8013 $as_echo "$PAXCTL" >&6; }
8014 else
8015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8016 $as_echo "no" >&6; }
8017 fi
8018
8019
8020 if test "X$PAXCTL" != X; then
8021 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether binaries have a PT_PAX_FLAGS header" >&5
8022 $as_echo_n "checking whether binaries have a PT_PAX_FLAGS header... " >&6; }
8023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8024 /* end confdefs.h. */
8025
8026 int
8027 main ()
8028 {
8029
8030 ;
8031 return 0;
8032 }
8033 _ACEOF
8034 if ac_fn_c_try_link "$LINENO"; then :
8035 if $PAXCTL -v conftest$EXEEXT >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8036 $as_echo "yes" >&6; }
8037 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8038 $as_echo "no" >&6; }; PAXCTL=""; fi
8039 fi
8040 rm -f core conftest.err conftest.$ac_objext \
8041 conftest$ac_exeext conftest.$ac_ext
8042 fi
8043 fi
8044
8045 ## Need makeinfo >= 4.7 (?) to build the manuals.
8046 # Extract the first word of "makeinfo", so it can be a program name with args.
8047 set dummy makeinfo; ac_word=$2
8048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8049 $as_echo_n "checking for $ac_word... " >&6; }
8050 if test "${ac_cv_path_MAKEINFO+set}" = set; then :
8051 $as_echo_n "(cached) " >&6
8052 else
8053 case $MAKEINFO in
8054 [\\/]* | ?:[\\/]*)
8055 ac_cv_path_MAKEINFO="$MAKEINFO" # Let the user override the test with a path.
8056 ;;
8057 *)
8058 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8059 for as_dir in $PATH
8060 do
8061 IFS=$as_save_IFS
8062 test -z "$as_dir" && as_dir=.
8063 for ac_exec_ext in '' $ac_executable_extensions; do
8064 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8065 ac_cv_path_MAKEINFO="$as_dir/$ac_word$ac_exec_ext"
8066 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8067 break 2
8068 fi
8069 done
8070 done
8071 IFS=$as_save_IFS
8072
8073 test -z "$ac_cv_path_MAKEINFO" && ac_cv_path_MAKEINFO="no"
8074 ;;
8075 esac
8076 fi
8077 MAKEINFO=$ac_cv_path_MAKEINFO
8078 if test -n "$MAKEINFO"; then
8079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKEINFO" >&5
8080 $as_echo "$MAKEINFO" >&6; }
8081 else
8082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8083 $as_echo "no" >&6; }
8084 fi
8085
8086
8087 if test "$MAKEINFO" != "no" && \
8088 test x"`$MAKEINFO --version 2> /dev/null | $EGREP 'texinfo[^0-9]*([1-4][0-9]+|[5-9]|4\.[7-9]|4\.[1-6][0-9]+)'`" = x; then
8089 MAKEINFO=no
8090 fi
8091
8092 ## Makeinfo is unusual. For a released Emacs, the manuals are
8093 ## pre-built, and not deleted by the normal clean rules. makeinfo is
8094 ## therefore in the category of "special tools" not normally required, which
8095 ## configure does not have to check for (eg autoconf itself).
8096 ## In a Bazaar checkout on the other hand, the manuals are not included.
8097 ## So makeinfo is a requirement to build from Bazaar, and configure
8098 ## should test for it as it does for any other build requirement.
8099 ## We use the presence of $srcdir/info/emacs to distinguish a release,
8100 ## with pre-built manuals, from a Bazaar checkout.
8101 HAVE_MAKEINFO=yes
8102
8103 if test "$MAKEINFO" = "no"; then
8104 MAKEINFO=makeinfo
8105 if test "x${with_makeinfo}" = "xno"; then
8106 HAVE_MAKEINFO=no
8107 elif test ! -e $srcdir/info/emacs && test ! -e $srcdir/info/emacs.info; then
8108 as_fn_error "You do not seem to have makeinfo >= 4.7, and your
8109 source tree does not seem to have pre-built manuals in the \`info' directory.
8110 Either install a suitable version of makeinfo, or re-run configure
8111 with the \`--without-makeinfo' option to build without the manuals. " "$LINENO" 5
8112 fi
8113 fi
8114
8115
8116 INFO_EXT=.info
8117 INFO_OPTS=--no-split
8118
8119
8120
8121
8122 if test x$GCC = xyes; then
8123 test "x$GCC_LINK_TEST_OPTIONS" != x && \
8124 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
8125 else
8126 test "x$NON_GCC_LINK_TEST_OPTIONS" != x && \
8127 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
8128 fi
8129
8130
8131 late_LDFLAGS=$LDFLAGS
8132 if test x$GCC = xyes; then
8133 LDFLAGS="$LDFLAGS -Wl,-znocombreloc"
8134 else
8135 LDFLAGS="$LDFLAGS -znocombreloc"
8136 fi
8137
8138 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -znocombreloc" >&5
8139 $as_echo_n "checking for -znocombreloc... " >&6; }
8140 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8141 /* end confdefs.h. */
8142
8143 int
8144 main ()
8145 {
8146
8147 ;
8148 return 0;
8149 }
8150 _ACEOF
8151 if ac_fn_c_try_link "$LINENO"; then :
8152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8153 $as_echo "yes" >&6; }
8154 else
8155 LDFLAGS=$late_LDFLAGS
8156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8157 $as_echo "no" >&6; }
8158 fi
8159 rm -f core conftest.err conftest.$ac_objext \
8160 conftest$ac_exeext conftest.$ac_ext
8161
8162
8163 test "x$CANNOT_DUMP" = "x" && CANNOT_DUMP=no
8164 case "$opsys" in
8165 your-opsys-here) CANNOT_DUMP=yes ;;
8166 esac
8167
8168 test "$CANNOT_DUMP" = "yes" && \
8169
8170 $as_echo "#define CANNOT_DUMP 1" >>confdefs.h
8171
8172
8173
8174
8175
8176 UNEXEC_OBJ=unexelf.o
8177 case "$opsys" in
8178 # MSDOS uses unexcoff.o
8179 # MSWindows uses unexw32.o
8180 aix4-2)
8181 UNEXEC_OBJ=unexaix.o
8182 ;;
8183 cygwin)
8184 UNEXEC_OBJ=unexcw.o
8185 ;;
8186 darwin)
8187 UNEXEC_OBJ=unexmacosx.o
8188 ;;
8189 hpux10-20 | hpux11)
8190 UNEXEC_OBJ=unexhp9k800.o
8191 ;;
8192 sol2-10)
8193 # Use the Solaris dldump() function, called from unexsol.c, to dump
8194 # emacs, instead of the generic ELF dump code found in unexelf.c.
8195 # The resulting binary has a complete symbol table, and is better
8196 # for debugging and other observability tools (debuggers, pstack, etc).
8197 #
8198 # If you encounter a problem using dldump(), please consider sending
8199 # a message to the OpenSolaris tools-linking mailing list:
8200 # http://mail.opensolaris.org/mailman/listinfo/tools-linking
8201 #
8202 # It is likely that dldump() works with older Solaris too, but this has
8203 # not been tested, so for now this change is for Solaris 10 or newer.
8204 UNEXEC_OBJ=unexsol.o
8205 ;;
8206 esac
8207
8208 LD_SWITCH_SYSTEM=
8209 case "$opsys" in
8210 freebsd)
8211 ## Let `ld' find image libs and similar things in /usr/local/lib.
8212 ## The system compiler, GCC, has apparently been modified to not
8213 ## look there, contrary to what a stock GCC would do.
8214 ### It's not our place to do this. See bug#10313#17.
8215 ### LD_SWITCH_SYSTEM=-L/usr/local/lib
8216 :
8217 ;;
8218
8219 gnu-linux)
8220 ## cpp test was "ifdef __mips__", but presumably this is equivalent...
8221 case $host_cpu in mips*) LD_SWITCH_SYSTEM="-G 0";; esac
8222 ;;
8223
8224 netbsd)
8225 ### It's not our place to do this. See bug#10313#17.
8226 ### LD_SWITCH_SYSTEM="-Wl,-rpath,/usr/pkg/lib -L/usr/pkg/lib -Wl,-rpath,/usr/local/lib -L/usr/local/lib"
8227 :
8228 ;;
8229
8230 openbsd)
8231 ## Han Boetes <han@mijncomputer.nl> says this is necessary,
8232 ## otherwise Emacs dumps core on elf systems.
8233 LD_SWITCH_SYSTEM="-Z"
8234 ;;
8235 esac
8236
8237
8238 ac_link="$ac_link $LD_SWITCH_SYSTEM"
8239
8240 ## This setting of LD_SWITCH_SYSTEM references LD_SWITCH_X_SITE_RPATH,
8241 ## which has not been defined yet. When this was handled with cpp,
8242 ## it was expanded to null when configure sourced the s/*.h file.
8243 ## Thus LD_SWITCH_SYSTEM had different values in configure and the Makefiles.
8244 ## FIXME it would be cleaner to put this in LD_SWITCH_SYSTEM_TEMACS
8245 ## (or somesuch), but because it is supposed to go at the _front_
8246 ## of LD_SWITCH_SYSTEM, we cannot do that in exactly the same way.
8247 ## Compare with the gnu-linux case below, which added to the end
8248 ## of LD_SWITCH_SYSTEM, and so can instead go at the front of
8249 ## LD_SWITCH_SYSTEM_TEMACS.
8250 case "$opsys" in
8251 netbsd|openbsd)
8252 LD_SWITCH_SYSTEM="\$(LD_SWITCH_X_SITE_RPATH) $LD_SWITCH_SYSTEM" ;;
8253 esac
8254
8255
8256 C_SWITCH_MACHINE=
8257 case $canonical in
8258 alpha*)
8259 ac_fn_c_check_decl "$LINENO" "__ELF__" "ac_cv_have_decl___ELF__" "$ac_includes_default"
8260 if test "x$ac_cv_have_decl___ELF__" = x""yes; then :
8261
8262 fi
8263
8264 if test "$ac_cv_have_decl___ELF__" = "yes"; then
8265 ## With ELF, make sure that all common symbols get allocated to in the
8266 ## data section. Otherwise, the dump of temacs may miss variables in
8267 ## the shared library that have been initialized. For example, with
8268 ## GNU libc, __malloc_initialized would normally be resolved to the
8269 ## shared library's .bss section, which is fatal.
8270 if test "x$GCC" = "xyes"; then
8271 C_SWITCH_MACHINE="-fno-common"
8272 else
8273 as_fn_error "What gives? Fix me if DEC Unix supports ELF now." "$LINENO" 5
8274 fi
8275 else
8276 UNEXEC_OBJ=unexalpha.o
8277 fi
8278 ;;
8279 esac
8280
8281
8282
8283
8284 C_SWITCH_SYSTEM=
8285 ## Some programs in src produce warnings saying certain subprograms
8286 ## are too complex and need a MAXMEM value greater than 2000 for
8287 ## additional optimization. --nils@exp-math.uni-essen.de
8288 test "$opsys" = "aix4.2" && test "x$GCC" != "xyes" && \
8289 C_SWITCH_SYSTEM="-ma -qmaxmem=4000"
8290 ## gnu-linux might need -D_BSD_SOURCE on old libc5 systems.
8291 ## It is redundant in glibc2, since we define _GNU_SOURCE.
8292
8293
8294
8295 LIBS_SYSTEM=
8296 case "$opsys" in
8297 ## IBM's X11R5 uses -lIM and -liconv in AIX 3.2.2.
8298 aix4-2) LIBS_SYSTEM="-lrts -lIM -liconv" ;;
8299
8300 freebsd) LIBS_SYSTEM="-lutil" ;;
8301
8302 hpux*) LIBS_SYSTEM="-l:libdld.sl" ;;
8303
8304 sol2*) LIBS_SYSTEM="-lsocket -lnsl" ;;
8305
8306 ## Motif needs -lgen.
8307 unixware) LIBS_SYSTEM="-lsocket -lnsl -lelf -lgen" ;;
8308 esac
8309
8310
8311
8312 ### Make sure subsequent tests use flags consistent with the build flags.
8313
8314 if test x"${OVERRIDE_CPPFLAGS}" != x; then
8315 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
8316 else
8317 CPPFLAGS="$C_SWITCH_SYSTEM $C_SWITCH_MACHINE $CPPFLAGS"
8318 fi
8319
8320 # Suppress obsolescent Autoconf test for size_t; Emacs assumes C89 or better.
8321
8322 # Likewise for obsolescent test for uid_t, gid_t; Emacs assumes them.
8323
8324
8325
8326 LIB_MATH=-lm
8327 LIB_STANDARD=
8328 START_FILES=
8329 SYSTEM_TYPE=`echo $opsys | sed -e 's/[0-9].*//' -e 's|-|/|'`
8330
8331 case $opsys in
8332 cygwin )
8333 LIB_MATH=
8334 START_FILES='pre-crt0.o'
8335 ;;
8336 darwin )
8337 ## Adding -lm confuses the dynamic linker, so omit it.
8338 LIB_MATH=
8339 START_FILES='pre-crt0.o'
8340 ;;
8341 freebsd )
8342 LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtn.o'
8343 START_FILES='pre-crt0.o $(CRT_DIR)/crt1.o $(CRT_DIR)/crti.o'
8344 SYSTEM_TYPE=berkeley-unix
8345 ;;
8346 gnu-linux | gnu-kfreebsd )
8347 LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtn.o'
8348 START_FILES='pre-crt0.o $(CRT_DIR)/crt1.o $(CRT_DIR)/crti.o'
8349 ;;
8350 hpux10-20 | hpux11 )
8351 LIB_STANDARD=-lc
8352 START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o'
8353 ;;
8354 netbsd | openbsd )
8355 LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o'
8356 START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o $(CRT_DIR)/crtbegin.o'
8357 SYSTEM_TYPE=berkeley-unix
8358 ;;
8359
8360 sol2* | unixware )
8361 SYSTEM_TYPE=usg-unix-v
8362 ;;
8363
8364 esac
8365
8366
8367
8368
8369 cat >>confdefs.h <<_ACEOF
8370 #define SYSTEM_TYPE "$SYSTEM_TYPE"
8371 _ACEOF
8372
8373
8374 crt_files=
8375
8376 for file in x $LIB_STANDARD $START_FILES; do
8377 case "$file" in
8378 *CRT_DIR*) crt_files="$crt_files `echo $file | sed -e 's|.*/||'`" ;;
8379 esac
8380 done
8381
8382 if test "x$crt_files" != x; then
8383
8384 ## If user specified a crt-dir, use that unconditionally.
8385 crt_gcc=no
8386
8387 if test "X$CRT_DIR" = "X"; then
8388
8389 CRT_DIR=/usr/lib # default
8390
8391 case "$canonical" in
8392 x86_64-*-linux-gnu* | s390x-*-linux-gnu*)
8393 ## On x86-64 and s390x GNU/Linux distributions, the standard library
8394 ## can be in a variety of places. We only try /usr/lib64 and /usr/lib.
8395 ## For anything else (eg /usr/lib32), it is up the user to specify
8396 ## the location (bug#5655).
8397 ## Test for crtn.o, not just the directory, because sometimes the
8398 ## directory exists but does not have the relevant files (bug#1287).
8399 ## FIXME better to test for binary compatibility somehow.
8400 test -e /usr/lib64/crtn.o && CRT_DIR=/usr/lib64
8401 ;;
8402
8403 powerpc64-*-linux-gnu* | sparc64-*-linux-gnu*) CRT_DIR=/usr/lib64 ;;
8404 esac
8405
8406 case "$opsys" in
8407 hpux10-20) CRT_DIR=/lib ;;
8408 esac
8409
8410 test "x${GCC}" = xyes && crt_gcc=yes
8411
8412 fi # CRT_DIR = ""
8413
8414 crt_missing=
8415
8416 for file in $crt_files; do
8417
8418 ## If we're using gcc, try to determine it automatically by asking
8419 ## gcc. [If this doesn't work, CRT_DIR will remain at the
8420 ## system-dependent default from above.]
8421 if test $crt_gcc = yes && test ! -e $CRT_DIR/$file; then
8422
8423 crt_file=`$CC --print-file-name=$file 2>/dev/null`
8424 case "$crt_file" in
8425 */*)
8426 CRT_DIR=`$as_dirname -- "$crt_file" ||
8427 $as_expr X"$crt_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
8428 X"$crt_file" : 'X\(//\)[^/]' \| \
8429 X"$crt_file" : 'X\(//\)$' \| \
8430 X"$crt_file" : 'X\(/\)' \| . 2>/dev/null ||
8431 $as_echo X"$crt_file" |
8432 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
8433 s//\1/
8434 q
8435 }
8436 /^X\(\/\/\)[^/].*/{
8437 s//\1/
8438 q
8439 }
8440 /^X\(\/\/\)$/{
8441 s//\1/
8442 q
8443 }
8444 /^X\(\/\).*/{
8445 s//\1/
8446 q
8447 }
8448 s/.*/./; q'`
8449 ;;
8450 esac
8451 fi
8452
8453 crt_gcc=no
8454
8455 test -e $CRT_DIR/$file || crt_missing="$crt_missing $file"
8456 done # $crt_files
8457
8458 test "x$crt_missing" = x || \
8459 as_fn_error "Required file(s) not found:$crt_missing
8460 Try using the --with-crt-dir option." "$LINENO" 5
8461
8462 fi # crt_files != ""
8463
8464
8465
8466 case $opsys in
8467 netbsd | openbsd )
8468 if test -f $CRT_DIR/crti.o; then
8469
8470 test -f $CRT_DIR/crtn.o || \
8471 as_fn_error "Required file not found: crtn.o" "$LINENO" 5
8472
8473 LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o $(CRT_DIR)/crtn.o'
8474 START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o $(CRT_DIR)/crti.o $(CRT_DIR)/crtbegin.o'
8475 fi
8476 ;;
8477 esac
8478
8479
8480 pre_PKG_CONFIG_CFLAGS=$CFLAGS
8481 pre_PKG_CONFIG_LIBS=$LIBS
8482
8483 # Extract the first word of "pkg-config", so it can be a program name with args.
8484 set dummy pkg-config; ac_word=$2
8485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8486 $as_echo_n "checking for $ac_word... " >&6; }
8487 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
8488 $as_echo_n "(cached) " >&6
8489 else
8490 case $PKG_CONFIG in
8491 [\\/]* | ?:[\\/]*)
8492 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8493 ;;
8494 *)
8495 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8496 for as_dir in $PATH
8497 do
8498 IFS=$as_save_IFS
8499 test -z "$as_dir" && as_dir=.
8500 for ac_exec_ext in '' $ac_executable_extensions; do
8501 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8502 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8503 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8504 break 2
8505 fi
8506 done
8507 done
8508 IFS=$as_save_IFS
8509
8510 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
8511 ;;
8512 esac
8513 fi
8514 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8515 if test -n "$PKG_CONFIG"; then
8516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8517 $as_echo "$PKG_CONFIG" >&6; }
8518 else
8519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8520 $as_echo "no" >&6; }
8521 fi
8522
8523
8524
8525
8526
8527
8528 if test "${with_sound}" != "no"; then
8529 # Sound support for GNU/Linux and the free BSDs.
8530 for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h
8531 do :
8532 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8533 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8534 eval as_val=\$$as_ac_Header
8535 if test "x$as_val" = x""yes; then :
8536 cat >>confdefs.h <<_ACEOF
8537 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8538 _ACEOF
8539 have_sound_header=yes
8540 fi
8541
8542 done
8543
8544 # Emulation library used on NetBSD.
8545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _oss_ioctl in -lossaudio" >&5
8546 $as_echo_n "checking for _oss_ioctl in -lossaudio... " >&6; }
8547 if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then :
8548 $as_echo_n "(cached) " >&6
8549 else
8550 ac_check_lib_save_LIBS=$LIBS
8551 LIBS="-lossaudio $LIBS"
8552 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8553 /* end confdefs.h. */
8554
8555 /* Override any GCC internal prototype to avoid an error.
8556 Use char because int might match the return type of a GCC
8557 builtin and then its argument prototype would still apply. */
8558 #ifdef __cplusplus
8559 extern "C"
8560 #endif
8561 char _oss_ioctl ();
8562 int
8563 main ()
8564 {
8565 return _oss_ioctl ();
8566 ;
8567 return 0;
8568 }
8569 _ACEOF
8570 if ac_fn_c_try_link "$LINENO"; then :
8571 ac_cv_lib_ossaudio__oss_ioctl=yes
8572 else
8573 ac_cv_lib_ossaudio__oss_ioctl=no
8574 fi
8575 rm -f core conftest.err conftest.$ac_objext \
8576 conftest$ac_exeext conftest.$ac_ext
8577 LIBS=$ac_check_lib_save_LIBS
8578 fi
8579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5
8580 $as_echo "$ac_cv_lib_ossaudio__oss_ioctl" >&6; }
8581 if test "x$ac_cv_lib_ossaudio__oss_ioctl" = x""yes; then :
8582 LIBSOUND=-lossaudio
8583 else
8584 LIBSOUND=
8585 fi
8586
8587
8588
8589 ALSA_REQUIRED=1.0.0
8590 ALSA_MODULES="alsa >= $ALSA_REQUIRED"
8591
8592 succeeded=no
8593
8594 if test "$PKG_CONFIG" = "no" ; then
8595 HAVE_ALSA=no
8596 else
8597 PKG_CONFIG_MIN_VERSION=0.9.0
8598 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
8599 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ALSA_MODULES" >&5
8600 $as_echo_n "checking for $ALSA_MODULES... " >&6; }
8601
8602 if $PKG_CONFIG --exists "$ALSA_MODULES" 2>&5 &&
8603 ALSA_CFLAGS=`$PKG_CONFIG --cflags "$ALSA_MODULES" 2>&5` &&
8604 ALSA_LIBS=`$PKG_CONFIG --libs "$ALSA_MODULES" 2>&5`; then
8605 edit_cflags="
8606 s,///*,/,g
8607 s/^/ /
8608 s/ -I/ $isystem/g
8609 s/^ //
8610 "
8611 ALSA_CFLAGS=`$as_echo "$ALSA_CFLAGS" | sed -e "$edit_cflags"`
8612 ALSA_LIBS=`$as_echo "$ALSA_LIBS" | sed -e 's,///*,/,g'`
8613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$ALSA_CFLAGS' LIBS='$ALSA_LIBS'" >&5
8614 $as_echo "yes CFLAGS='$ALSA_CFLAGS' LIBS='$ALSA_LIBS'" >&6; }
8615 succeeded=yes
8616 else
8617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8618 $as_echo "no" >&6; }
8619 ALSA_CFLAGS=""
8620 ALSA_LIBS=""
8621 ## If we have a custom action on failure, don't print errors, but
8622 ## do set a variable so people can do so. Do it in a subshell
8623 ## to capture any diagnostics in invoking pkg-config.
8624 ALSA_PKG_ERRORS=`($PKG_CONFIG --print-errors "$ALSA_MODULES") 2>&1`
8625
8626 fi
8627
8628
8629
8630 else
8631 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
8632 echo "*** See http://www.freedesktop.org/software/pkgconfig"
8633 fi
8634 fi
8635
8636 if test $succeeded = yes; then
8637 HAVE_ALSA=yes
8638 else
8639 HAVE_ALSA=no
8640 fi
8641
8642 if test $HAVE_ALSA = yes; then
8643 SAVE_CFLAGS="$CFLAGS"
8644 SAVE_LIBS="$LIBS"
8645 CFLAGS="$ALSA_CFLAGS $CFLAGS"
8646 LIBS="$ALSA_LIBS $LIBS"
8647 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8648 /* end confdefs.h. */
8649 #include <asoundlib.h>
8650 int
8651 main ()
8652 {
8653 snd_lib_error_set_handler (0);
8654 ;
8655 return 0;
8656 }
8657 _ACEOF
8658 if ac_fn_c_try_compile "$LINENO"; then :
8659 emacs_alsa_normal=yes
8660 else
8661 emacs_alsa_normal=no
8662 fi
8663 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8664 if test "$emacs_alsa_normal" != yes; then
8665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8666 /* end confdefs.h. */
8667 #include <alsa/asoundlib.h>
8668 int
8669 main ()
8670 {
8671 snd_lib_error_set_handler (0);
8672 ;
8673 return 0;
8674 }
8675 _ACEOF
8676 if ac_fn_c_try_compile "$LINENO"; then :
8677 emacs_alsa_subdir=yes
8678 else
8679 emacs_alsa_subdir=no
8680 fi
8681 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8682 if test "$emacs_alsa_subdir" != yes; then
8683 as_fn_error "pkg-config found alsa, but it does not compile. See config.log for error messages." "$LINENO" 5
8684 fi
8685 ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE"
8686 fi
8687
8688 CFLAGS="$SAVE_CFLAGS"
8689 LIBS="$SAVE_LIBS"
8690 LIBSOUND="$LIBSOUND $ALSA_LIBS"
8691 CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS"
8692
8693 $as_echo "#define HAVE_ALSA 1" >>confdefs.h
8694
8695 fi
8696
8697 if test x$have_sound_header = xyes || test $HAVE_ALSA = yes; then
8698 case "$opsys" in
8699 gnu-linux|freebsd|netbsd)
8700
8701 $as_echo "#define HAVE_SOUND 1" >>confdefs.h
8702
8703 ;;
8704 esac
8705 fi
8706
8707
8708 fi
8709
8710
8711
8712
8713 for ac_header in $ac_header_list
8714 do :
8715 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8716 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
8717 "
8718 eval as_val=\$$as_ac_Header
8719 if test "x$as_val" = x""yes; then :
8720 cat >>confdefs.h <<_ACEOF
8721 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8722 _ACEOF
8723
8724 fi
8725
8726 done
8727
8728
8729
8730
8731
8732
8733
8734
8735
8736
8737
8738
8739
8740
8741
8742
8743
8744
8745
8746
8747
8748
8749
8750
8751
8752
8753
8754
8755
8756 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if personality LINUX32 can be set" >&5
8757 $as_echo_n "checking if personality LINUX32 can be set... " >&6; }
8758 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8759 /* end confdefs.h. */
8760 #include <sys/personality.h>
8761 int
8762 main ()
8763 {
8764 personality (PER_LINUX32)
8765 ;
8766 return 0;
8767 }
8768 _ACEOF
8769 if ac_fn_c_try_compile "$LINENO"; then :
8770 emacs_cv_personality_linux32=yes
8771 else
8772 emacs_cv_personality_linux32=no
8773 fi
8774 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_personality_linux32" >&5
8776 $as_echo "$emacs_cv_personality_linux32" >&6; }
8777
8778 if test $emacs_cv_personality_linux32 = yes; then
8779
8780 $as_echo "#define HAVE_PERSONALITY_LINUX32 1" >>confdefs.h
8781
8782 fi
8783
8784 for ac_header in term.h
8785 do :
8786 ac_fn_c_check_header_preproc "$LINENO" "term.h" "ac_cv_header_term_h"
8787 if test "x$ac_cv_header_term_h" = x""yes; then :
8788 cat >>confdefs.h <<_ACEOF
8789 #define HAVE_TERM_H 1
8790 _ACEOF
8791
8792 fi
8793
8794 done
8795
8796 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
8797 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
8798 if test "${ac_cv_header_time+set}" = set; then :
8799 $as_echo_n "(cached) " >&6
8800 else
8801 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8802 /* end confdefs.h. */
8803 #include <sys/types.h>
8804 #include <sys/time.h>
8805 #include <time.h>
8806
8807 int
8808 main ()
8809 {
8810 if ((struct tm *) 0)
8811 return 0;
8812 ;
8813 return 0;
8814 }
8815 _ACEOF
8816 if ac_fn_c_try_compile "$LINENO"; then :
8817 ac_cv_header_time=yes
8818 else
8819 ac_cv_header_time=no
8820 fi
8821 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8822 fi
8823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
8824 $as_echo "$ac_cv_header_time" >&6; }
8825 if test $ac_cv_header_time = yes; then
8826
8827 $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
8828
8829 fi
8830
8831 ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "#include <signal.h>
8832
8833 "
8834 if test "x$ac_cv_have_decl_sys_siglist" = x""yes; then :
8835 ac_have_decl=1
8836 else
8837 ac_have_decl=0
8838 fi
8839
8840 cat >>confdefs.h <<_ACEOF
8841 #define HAVE_DECL_SYS_SIGLIST $ac_have_decl
8842 _ACEOF
8843
8844 if test $ac_cv_have_decl_sys_siglist != yes; then
8845 # For Tru64, at least:
8846 ac_fn_c_check_decl "$LINENO" "__sys_siglist" "ac_cv_have_decl___sys_siglist" "#include <signal.h>
8847
8848 "
8849 if test "x$ac_cv_have_decl___sys_siglist" = x""yes; then :
8850 ac_have_decl=1
8851 else
8852 ac_have_decl=0
8853 fi
8854
8855 cat >>confdefs.h <<_ACEOF
8856 #define HAVE_DECL___SYS_SIGLIST $ac_have_decl
8857 _ACEOF
8858
8859 if test $ac_cv_have_decl___sys_siglist = yes; then
8860
8861 $as_echo "#define sys_siglist __sys_siglist" >>confdefs.h
8862
8863 fi
8864 fi
8865 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
8866 $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
8867 if test "${ac_cv_header_sys_wait_h+set}" = set; then :
8868 $as_echo_n "(cached) " >&6
8869 else
8870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8871 /* end confdefs.h. */
8872 #include <sys/types.h>
8873 #include <sys/wait.h>
8874 #ifndef WEXITSTATUS
8875 # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
8876 #endif
8877 #ifndef WIFEXITED
8878 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8879 #endif
8880
8881 int
8882 main ()
8883 {
8884 int s;
8885 wait (&s);
8886 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8887 ;
8888 return 0;
8889 }
8890 _ACEOF
8891 if ac_fn_c_try_compile "$LINENO"; then :
8892 ac_cv_header_sys_wait_h=yes
8893 else
8894 ac_cv_header_sys_wait_h=no
8895 fi
8896 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8897 fi
8898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
8899 $as_echo "$ac_cv_header_sys_wait_h" >&6; }
8900 if test $ac_cv_header_sys_wait_h = yes; then
8901
8902 $as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
8903
8904 fi
8905
8906
8907 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for speed_t" >&5
8908 $as_echo_n "checking for speed_t... " >&6; }
8909 if test "${emacs_cv_speed_t+set}" = set; then :
8910 $as_echo_n "(cached) " >&6
8911 else
8912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8913 /* end confdefs.h. */
8914 #include <termios.h>
8915 int
8916 main ()
8917 {
8918 speed_t x = 1;
8919 ;
8920 return 0;
8921 }
8922 _ACEOF
8923 if ac_fn_c_try_compile "$LINENO"; then :
8924 emacs_cv_speed_t=yes
8925 else
8926 emacs_cv_speed_t=no
8927 fi
8928 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8929 fi
8930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_speed_t" >&5
8931 $as_echo "$emacs_cv_speed_t" >&6; }
8932 if test $emacs_cv_speed_t = yes; then
8933
8934 $as_echo "#define HAVE_SPEED_T 1" >>confdefs.h
8935
8936 fi
8937
8938
8939
8940
8941 for ac_header in net/if.h
8942 do :
8943 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
8944 #if HAVE_SYS_SOCKET_H
8945 #include <sys/socket.h>
8946 #endif
8947 "
8948 if test "x$ac_cv_header_net_if_h" = x""yes; then :
8949 cat >>confdefs.h <<_ACEOF
8950 #define HAVE_NET_IF_H 1
8951 _ACEOF
8952
8953 fi
8954
8955 done
8956
8957 for ac_header in ifaddrs.h
8958 do :
8959 ac_fn_c_check_header_compile "$LINENO" "ifaddrs.h" "ac_cv_header_ifaddrs_h" "$ac_includes_default
8960 #if HAVE_SYS_SOCKET_H
8961 #include <sys/socket.h>
8962 #endif
8963 "
8964 if test "x$ac_cv_header_ifaddrs_h" = x""yes; then :
8965 cat >>confdefs.h <<_ACEOF
8966 #define HAVE_IFADDRS_H 1
8967 _ACEOF
8968
8969 fi
8970
8971 done
8972
8973 for ac_header in net/if_dl.h
8974 do :
8975 ac_fn_c_check_header_compile "$LINENO" "net/if_dl.h" "ac_cv_header_net_if_dl_h" "$ac_includes_default
8976 #if HAVE_SYS_SOCKET_H
8977 #include <sys/socket.h>
8978 #endif
8979 "
8980 if test "x$ac_cv_header_net_if_dl_h" = x""yes; then :
8981 cat >>confdefs.h <<_ACEOF
8982 #define HAVE_NET_IF_DL_H 1
8983 _ACEOF
8984
8985 fi
8986
8987 done
8988
8989
8990 ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_flags" "ac_cv_member_struct_ifreq_ifr_flags" "$ac_includes_default
8991 #if HAVE_SYS_SOCKET_H
8992 #include <sys/socket.h>
8993 #endif
8994 #if HAVE_NET_IF_H
8995 #include <net/if.h>
8996 #endif
8997 "
8998 if test "x$ac_cv_member_struct_ifreq_ifr_flags" = x""yes; then :
8999
9000 cat >>confdefs.h <<_ACEOF
9001 #define HAVE_STRUCT_IFREQ_IFR_FLAGS 1
9002 _ACEOF
9003
9004
9005 fi
9006 ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_hwaddr" "ac_cv_member_struct_ifreq_ifr_hwaddr" "$ac_includes_default
9007 #if HAVE_SYS_SOCKET_H
9008 #include <sys/socket.h>
9009 #endif
9010 #if HAVE_NET_IF_H
9011 #include <net/if.h>
9012 #endif
9013 "
9014 if test "x$ac_cv_member_struct_ifreq_ifr_hwaddr" = x""yes; then :
9015
9016 cat >>confdefs.h <<_ACEOF
9017 #define HAVE_STRUCT_IFREQ_IFR_HWADDR 1
9018 _ACEOF
9019
9020
9021 fi
9022 ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_netmask" "ac_cv_member_struct_ifreq_ifr_netmask" "$ac_includes_default
9023 #if HAVE_SYS_SOCKET_H
9024 #include <sys/socket.h>
9025 #endif
9026 #if HAVE_NET_IF_H
9027 #include <net/if.h>
9028 #endif
9029 "
9030 if test "x$ac_cv_member_struct_ifreq_ifr_netmask" = x""yes; then :
9031
9032 cat >>confdefs.h <<_ACEOF
9033 #define HAVE_STRUCT_IFREQ_IFR_NETMASK 1
9034 _ACEOF
9035
9036
9037 fi
9038 ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_broadaddr" "ac_cv_member_struct_ifreq_ifr_broadaddr" "$ac_includes_default
9039 #if HAVE_SYS_SOCKET_H
9040 #include <sys/socket.h>
9041 #endif
9042 #if HAVE_NET_IF_H
9043 #include <net/if.h>
9044 #endif
9045 "
9046 if test "x$ac_cv_member_struct_ifreq_ifr_broadaddr" = x""yes; then :
9047
9048 cat >>confdefs.h <<_ACEOF
9049 #define HAVE_STRUCT_IFREQ_IFR_BROADADDR 1
9050 _ACEOF
9051
9052
9053 fi
9054 ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_addr" "ac_cv_member_struct_ifreq_ifr_addr" "$ac_includes_default
9055 #if HAVE_SYS_SOCKET_H
9056 #include <sys/socket.h>
9057 #endif
9058 #if HAVE_NET_IF_H
9059 #include <net/if.h>
9060 #endif
9061 "
9062 if test "x$ac_cv_member_struct_ifreq_ifr_addr" = x""yes; then :
9063
9064 cat >>confdefs.h <<_ACEOF
9065 #define HAVE_STRUCT_IFREQ_IFR_ADDR 1
9066 _ACEOF
9067
9068
9069 fi
9070 ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_addr.sa_len" "ac_cv_member_struct_ifreq_ifr_addr_sa_len" "$ac_includes_default
9071 #if HAVE_SYS_SOCKET_H
9072 #include <sys/socket.h>
9073 #endif
9074 #if HAVE_NET_IF_H
9075 #include <net/if.h>
9076 #endif
9077 "
9078 if test "x$ac_cv_member_struct_ifreq_ifr_addr_sa_len" = x""yes; then :
9079
9080 cat >>confdefs.h <<_ACEOF
9081 #define HAVE_STRUCT_IFREQ_IFR_ADDR_SA_LEN 1
9082 _ACEOF
9083
9084
9085 fi
9086
9087
9088
9089
9090 DEPFLAGS=
9091 MKDEPDIR=":"
9092 deps_frag=deps.mk
9093 if test "$GCC" = yes && test "$ac_enable_autodepend" = yes; then
9094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using GNU Make" >&5
9095 $as_echo_n "checking whether we are using GNU Make... " >&6; }
9096 HAVE_GNU_MAKE=no
9097 testval=`${MAKE-make} --version 2>/dev/null | grep 'GNU Make'`
9098 if test "x$testval" != x; then
9099 HAVE_GNU_MAKE=yes
9100 else
9101 ac_enable_autodepend=no
9102 fi
9103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_GNU_MAKE" >&5
9104 $as_echo "$HAVE_GNU_MAKE" >&6; }
9105 if test $HAVE_GNU_MAKE = yes; then
9106 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -MMD -MF" >&5
9107 $as_echo_n "checking whether gcc understands -MMD -MF... " >&6; }
9108 SAVE_CFLAGS="$CFLAGS"
9109 CFLAGS="$CFLAGS -MMD -MF deps.d -MP"
9110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9111 /* end confdefs.h. */
9112
9113 int
9114 main ()
9115 {
9116
9117 ;
9118 return 0;
9119 }
9120 _ACEOF
9121 if ac_fn_c_try_compile "$LINENO"; then :
9122
9123 else
9124 ac_enable_autodepend=no
9125 fi
9126 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9127 CFLAGS="$SAVE_CFLAGS"
9128 test -f deps.d || ac_enable_autodepend=no
9129 rm -rf deps.d
9130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_autodepend" >&5
9131 $as_echo "$ac_enable_autodepend" >&6; }
9132 fi
9133 if test $ac_enable_autodepend = yes; then
9134 DEPFLAGS='-MMD -MF ${DEPDIR}/$*.d -MP'
9135 ## MKDIR_P is documented (see AC_PROG_MKDIR_P) to be parallel-safe.
9136 MKDEPDIR='${MKDIR_P} ${DEPDIR}'
9137 deps_frag=autodeps.mk
9138 fi
9139 fi
9140 deps_frag=$srcdir/src/$deps_frag
9141
9142
9143
9144
9145
9146 lisp_frag=$srcdir/src/lisp.mk
9147
9148
9149
9150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long file names" >&5
9151 $as_echo_n "checking for long file names... " >&6; }
9152 if test "${ac_cv_sys_long_file_names+set}" = set; then :
9153 $as_echo_n "(cached) " >&6
9154 else
9155 ac_cv_sys_long_file_names=yes
9156 # Test for long file names in all the places we know might matter:
9157 # . the current directory, where building will happen
9158 # $prefix/lib where we will be installing things
9159 # $exec_prefix/lib likewise
9160 # $TMPDIR if set, where it might want to write temporary files
9161 # /tmp where it might want to write temporary files
9162 # /var/tmp likewise
9163 # /usr/tmp likewise
9164 for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do
9165 # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib
9166 # in the usual case where exec_prefix is '${prefix}'.
9167 case $ac_dir in #(
9168 . | /* | ?:[\\/]*) ;; #(
9169 *) continue;;
9170 esac
9171 test -w "$ac_dir/." || continue # It is less confusing to not echo anything here.
9172 ac_xdir=$ac_dir/cf$$
9173 (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
9174 ac_tf1=$ac_xdir/conftest9012345
9175 ac_tf2=$ac_xdir/conftest9012346
9176 touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" ||
9177 ac_cv_sys_long_file_names=no
9178 rm -f -r "$ac_xdir" 2>/dev/null
9179 test $ac_cv_sys_long_file_names = no && break
9180 done
9181 fi
9182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_long_file_names" >&5
9183 $as_echo "$ac_cv_sys_long_file_names" >&6; }
9184 if test $ac_cv_sys_long_file_names = yes; then
9185
9186 $as_echo "#define HAVE_LONG_FILE_NAMES 1" >>confdefs.h
9187
9188 fi
9189
9190
9191 #### Choose a window system.
9192
9193 ## We leave window_system equal to none if
9194 ## we end up building without one. Any new window system should
9195 ## set window_system to an appropriate value and add objects to
9196 ## window-system-specific substs.
9197
9198 window_system=none
9199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
9200 $as_echo_n "checking for X... " >&6; }
9201
9202
9203 # Check whether --with-x was given.
9204 if test "${with_x+set}" = set; then :
9205 withval=$with_x;
9206 fi
9207
9208 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
9209 if test "x$with_x" = xno; then
9210 # The user explicitly disabled X.
9211 have_x=disabled
9212 else
9213 case $x_includes,$x_libraries in #(
9214 *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
9215 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
9216 $as_echo_n "(cached) " >&6
9217 else
9218 # One or both of the vars are not set, and there is no cached value.
9219 ac_x_includes=no ac_x_libraries=no
9220 rm -f -r conftest.dir
9221 if mkdir conftest.dir; then
9222 cd conftest.dir
9223 cat >Imakefile <<'_ACEOF'
9224 incroot:
9225 @echo incroot='${INCROOT}'
9226 usrlibdir:
9227 @echo usrlibdir='${USRLIBDIR}'
9228 libdir:
9229 @echo libdir='${LIBDIR}'
9230 _ACEOF
9231 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
9232 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
9233 for ac_var in incroot usrlibdir libdir; do
9234 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
9235 done
9236 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
9237 for ac_extension in a so sl dylib la dll; do
9238 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
9239 test -f "$ac_im_libdir/libX11.$ac_extension"; then
9240 ac_im_usrlibdir=$ac_im_libdir; break
9241 fi
9242 done
9243 # Screen out bogus values from the imake configuration. They are
9244 # bogus both because they are the default anyway, and because
9245 # using them would break gcc on systems where it needs fixed includes.
9246 case $ac_im_incroot in
9247 /usr/include) ac_x_includes= ;;
9248 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
9249 esac
9250 case $ac_im_usrlibdir in
9251 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
9252 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
9253 esac
9254 fi
9255 cd ..
9256 rm -f -r conftest.dir
9257 fi
9258
9259 # Standard set of common directories for X headers.
9260 # Check X11 before X11Rn because it is often a symlink to the current release.
9261 ac_x_header_dirs='
9262 /usr/X11/include
9263 /usr/X11R7/include
9264 /usr/X11R6/include
9265 /usr/X11R5/include
9266 /usr/X11R4/include
9267
9268 /usr/include/X11
9269 /usr/include/X11R7
9270 /usr/include/X11R6
9271 /usr/include/X11R5
9272 /usr/include/X11R4
9273
9274 /usr/local/X11/include
9275 /usr/local/X11R7/include
9276 /usr/local/X11R6/include
9277 /usr/local/X11R5/include
9278 /usr/local/X11R4/include
9279
9280 /usr/local/include/X11
9281 /usr/local/include/X11R7
9282 /usr/local/include/X11R6
9283 /usr/local/include/X11R5
9284 /usr/local/include/X11R4
9285
9286 /usr/X386/include
9287 /usr/x386/include
9288 /usr/XFree86/include/X11
9289
9290 /usr/include
9291 /usr/local/include
9292 /usr/unsupported/include
9293 /usr/athena/include
9294 /usr/local/x11r5/include
9295 /usr/lpp/Xamples/include
9296
9297 /usr/openwin/include
9298 /usr/openwin/share/include'
9299
9300 if test "$ac_x_includes" = no; then
9301 # Guess where to find include files, by looking for Xlib.h.
9302 # First, try using that file with no special directory specified.
9303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9304 /* end confdefs.h. */
9305 #include <X11/Xlib.h>
9306 _ACEOF
9307 if ac_fn_c_try_cpp "$LINENO"; then :
9308 # We can compile using X headers with no special include directory.
9309 ac_x_includes=
9310 else
9311 for ac_dir in $ac_x_header_dirs; do
9312 if test -r "$ac_dir/X11/Xlib.h"; then
9313 ac_x_includes=$ac_dir
9314 break
9315 fi
9316 done
9317 fi
9318 rm -f conftest.err conftest.$ac_ext
9319 fi # $ac_x_includes = no
9320
9321 if test "$ac_x_libraries" = no; then
9322 # Check for the libraries.
9323 # See if we find them without any special options.
9324 # Don't add to $LIBS permanently.
9325 ac_save_LIBS=$LIBS
9326 LIBS="-lX11 $LIBS"
9327 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9328 /* end confdefs.h. */
9329 #include <X11/Xlib.h>
9330 int
9331 main ()
9332 {
9333 XrmInitialize ()
9334 ;
9335 return 0;
9336 }
9337 _ACEOF
9338 if ac_fn_c_try_link "$LINENO"; then :
9339 LIBS=$ac_save_LIBS
9340 # We can link X programs with no special library path.
9341 ac_x_libraries=
9342 else
9343 LIBS=$ac_save_LIBS
9344 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
9345 do
9346 # Don't even attempt the hair of trying to link an X program!
9347 for ac_extension in a so sl dylib la dll; do
9348 if test -r "$ac_dir/libX11.$ac_extension"; then
9349 ac_x_libraries=$ac_dir
9350 break 2
9351 fi
9352 done
9353 done
9354 fi
9355 rm -f core conftest.err conftest.$ac_objext \
9356 conftest$ac_exeext conftest.$ac_ext
9357 fi # $ac_x_libraries = no
9358
9359 case $ac_x_includes,$ac_x_libraries in #(
9360 no,* | *,no | *\'*)
9361 # Didn't find X, or a directory has "'" in its name.
9362 ac_cv_have_x="have_x=no";; #(
9363 *)
9364 # Record where we found X for the cache.
9365 ac_cv_have_x="have_x=yes\
9366 ac_x_includes='$ac_x_includes'\
9367 ac_x_libraries='$ac_x_libraries'"
9368 esac
9369 fi
9370 ;; #(
9371 *) have_x=yes;;
9372 esac
9373 eval "$ac_cv_have_x"
9374 fi # $with_x != no
9375
9376 if test "$have_x" != yes; then
9377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
9378 $as_echo "$have_x" >&6; }
9379 no_x=yes
9380 else
9381 # If each of the values was on the command line, it overrides each guess.
9382 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
9383 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
9384 # Update the cache value to reflect the command line values.
9385 ac_cv_have_x="have_x=yes\
9386 ac_x_includes='$x_includes'\
9387 ac_x_libraries='$x_libraries'"
9388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
9389 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
9390 fi
9391
9392 if test "$no_x" != yes; then
9393 window_system=x11
9394 fi
9395
9396 LD_SWITCH_X_SITE_RPATH=
9397 if test "${x_libraries}" != NONE; then
9398 if test -n "${x_libraries}"; then
9399 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
9400 LD_SWITCH_X_SITE_RPATH=-Wl,-rpath,`echo ${x_libraries} | sed -e "s/:/ -Wl,-rpath,/g"`
9401 fi
9402 x_default_search_path=""
9403 x_search_path=${x_libraries}
9404 if test -z "${x_search_path}"; then
9405 x_search_path=/usr/lib
9406 fi
9407 for x_library in `echo ${x_search_path}: | \
9408 sed -e "s/:/ /g" -e p -e "s:/lib[^ /]* :/share :g"`; do
9409 x_search_path="\
9410 ${x_library}/X11/%L/%T/%N%C%S:\
9411 ${x_library}/X11/%l/%T/%N%C%S:\
9412 ${x_library}/X11/%T/%N%C%S:\
9413 ${x_library}/X11/%L/%T/%N%S:\
9414 ${x_library}/X11/%l/%T/%N%S:\
9415 ${x_library}/X11/%T/%N%S"
9416 if test x"${x_default_search_path}" = x; then
9417 x_default_search_path=${x_search_path}
9418 else
9419 x_default_search_path="${x_search_path}:${x_default_search_path}"
9420 fi
9421 done
9422 fi
9423
9424
9425 if test "${x_includes}" != NONE && test -n "${x_includes}"; then
9426 C_SWITCH_X_SITE="$isystem"`echo ${x_includes} | sed -e "s/:/ $isystem/g"`
9427 fi
9428
9429 if test x"${x_includes}" = x; then
9430 bitmapdir=/usr/include/X11/bitmaps
9431 else
9432 # accumulate include directories that have X11 bitmap subdirectories
9433 bmd_acc="dummyval"
9434 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
9435 if test -d "${bmd}/X11/bitmaps"; then
9436 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
9437 fi
9438 if test -d "${bmd}/bitmaps"; then
9439 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
9440 fi
9441 done
9442 if test ${bmd_acc} != "dummyval"; then
9443 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
9444 fi
9445 fi
9446
9447 HAVE_NS=no
9448 NS_IMPL_COCOA=no
9449 NS_IMPL_GNUSTEP=no
9450 tmp_CPPFLAGS="$CPPFLAGS"
9451 tmp_CFLAGS="$CFLAGS"
9452 CPPFLAGS="$CPPFLAGS -x objective-c"
9453 CFLAGS="$CFLAGS -x objective-c"
9454 GNU_OBJC_CFLAGS=
9455 LIBS_GNUSTEP=
9456 if test "${with_ns}" != no; then
9457 if test "${opsys}" = darwin; then
9458 NS_IMPL_COCOA=yes
9459 ns_appdir=`pwd`/nextstep/Emacs.app
9460 ns_appbindir=${ns_appdir}/Contents/MacOS
9461 ns_appresdir=${ns_appdir}/Contents/Resources
9462 ns_appsrc=Cocoa/Emacs.base
9463 elif test -f $GNUSTEP_CONFIG_FILE; then
9464 NS_IMPL_GNUSTEP=yes
9465 ns_appdir=`pwd`/nextstep/Emacs.app
9466 ns_appbindir=${ns_appdir}
9467 ns_appresdir=${ns_appdir}/Resources
9468 ns_appsrc=GNUstep/Emacs.base
9469 GNUSTEP_SYSTEM_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_HEADERS)"
9470 GNUSTEP_SYSTEM_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_LIBRARIES)"
9471 GNUSTEP_LOCAL_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_HEADERS)"
9472 GNUSTEP_LOCAL_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_LIBRARIES)"
9473 test "x${GNUSTEP_LOCAL_HEADERS}" != "x" && \
9474 GNUSTEP_LOCAL_HEADERS="-I${GNUSTEP_LOCAL_HEADERS}"
9475 test "x${GNUSTEP_LOCAL_LIBRARIES}" != "x" && \
9476 GNUSTEP_LOCAL_LIBRARIES="-L${GNUSTEP_LOCAL_LIBRARIES}"
9477 CPPFLAGS="$CPPFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
9478 CFLAGS="$CFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
9479 LDFLAGS="$LDFLAGS -L${GNUSTEP_SYSTEM_LIBRARIES} ${GNUSTEP_LOCAL_LIBRARIES}"
9480 LIBS_GNUSTEP="-lgnustep-gui -lgnustep-base -lobjc -lpthread"
9481 LIB_STANDARD=
9482 START_FILES=
9483 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if GNUstep defines BASE_NATIVE_OBJC_EXCEPTIONS" >&5
9484 $as_echo_n "checking if GNUstep defines BASE_NATIVE_OBJC_EXCEPTIONS... " >&6; }
9485 if test "${emacs_cv_objc_exceptions+set}" = set; then :
9486 $as_echo_n "(cached) " >&6
9487 else
9488 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9489 /* end confdefs.h. */
9490 #include <GNUstepBase/GSConfig.h>
9491 int
9492 main ()
9493 {
9494 #if defined BASE_NATIVE_OBJC_EXCEPTIONS && BASE_NATIVE_OBJC_EXCEPTIONS > 0
9495 1;
9496 #else
9497 fail;
9498 #endif
9499 ;
9500 return 0;
9501 }
9502 _ACEOF
9503 if ac_fn_c_try_compile "$LINENO"; then :
9504 emacs_cv_objc_exceptions=yes
9505 else
9506 emacs_cv_objc_exceptions=no
9507 fi
9508 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9509 fi
9510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_objc_exceptions" >&5
9511 $as_echo "$emacs_cv_objc_exceptions" >&6; }
9512 if test $emacs_cv_objc_exceptions = yes; then
9513
9514 $as_echo "#define _NATIVE_OBJC_EXCEPTIONS 1" >>confdefs.h
9515
9516 GNU_OBJC_CFLAGS="-fobjc-exceptions"
9517 fi
9518 fi
9519
9520 CFLAGS="$CFLAGS $GNU_OBJC_CFLAGS"
9521
9522 ac_fn_c_check_header_mongrel "$LINENO" "AppKit/AppKit.h" "ac_cv_header_AppKit_AppKit_h" "$ac_includes_default"
9523 if test "x$ac_cv_header_AppKit_AppKit_h" = x""yes; then :
9524 HAVE_NS=yes
9525 else
9526 as_fn_error "\`--with-ns' was specified, but the include
9527 files are missing or cannot be compiled." "$LINENO" 5
9528 fi
9529
9530
9531
9532 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9533 /* end confdefs.h. */
9534 #include <AppKit/AppKit.h>
9535 int
9536 main ()
9537 {
9538
9539 #ifdef MAC_OS_X_VERSION_MAX_ALLOWED
9540 #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1040
9541 ; /* OK */
9542 #else
9543 #error "OSX 10.4 or newer required"
9544 #endif
9545 #endif
9546
9547 ;
9548 return 0;
9549 }
9550 _ACEOF
9551 if ac_fn_c_try_compile "$LINENO"; then :
9552 ns_osx_have_104=yes
9553 else
9554 ns_osx_have_104=no
9555 fi
9556 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9557 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9558 /* end confdefs.h. */
9559 #include <Foundation/NSObjCRuntime.h>
9560 int
9561 main ()
9562 {
9563 NSInteger i;
9564 ;
9565 return 0;
9566 }
9567 _ACEOF
9568 if ac_fn_c_try_compile "$LINENO"; then :
9569 ns_have_nsinteger=yes
9570 else
9571 ns_have_nsinteger=no
9572 fi
9573 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9574 if test $ns_osx_have_104 = no; then
9575 as_fn_error "\`OSX 10.4 or newer is required'" "$LINENO" 5;
9576 fi
9577 if test $ns_have_nsinteger = yes; then
9578
9579 $as_echo "#define NS_HAVE_NSINTEGER 1" >>confdefs.h
9580
9581 fi
9582 fi
9583
9584
9585
9586 INSTALL_ARCH_INDEP_EXTRA=install-etc
9587 ns_self_contained=no
9588 NS_OBJ=
9589 NS_OBJC_OBJ=
9590 if test "${HAVE_NS}" = yes; then
9591 if test "$with_toolkit_scroll_bars" = "no"; then
9592 as_fn_error "Non-toolkit scroll bars are not implemented for Nextstep." "$LINENO" 5
9593 fi
9594
9595 window_system=nextstep
9596 # set up packaging dirs
9597 if test "${EN_NS_SELF_CONTAINED}" = yes; then
9598 ns_self_contained=yes
9599 prefix=${ns_appresdir}
9600 exec_prefix=${ns_appbindir}
9601 libexecdir="\${ns_appbindir}/libexec"
9602 archlibdir="\${ns_appbindir}/libexec"
9603 docdir="\${ns_appresdir}/etc"
9604 etcdir="\${ns_appresdir}/etc"
9605 infodir="\${ns_appresdir}/info"
9606 mandir="\${ns_appresdir}/man"
9607 lispdir="\${ns_appresdir}/lisp"
9608 leimdir="\${ns_appresdir}/leim"
9609 INSTALL_ARCH_INDEP_EXTRA=
9610 fi
9611 NS_OBJC_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o"
9612 fi
9613 CFLAGS="$tmp_CFLAGS"
9614 CPPFLAGS="$tmp_CPPFLAGS"
9615
9616
9617
9618
9619
9620
9621 HAVE_W32=no
9622 W32_OBJ=
9623 W32_LIBS=
9624 if test "${with_w32}" != no; then
9625 if test "${opsys}" != "cygwin"; then
9626 as_fn_error "Using w32 with an autotools build is only supported for Cygwin." "$LINENO" 5
9627 fi
9628 ac_fn_c_check_header_mongrel "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default"
9629 if test "x$ac_cv_header_windows_h" = x""yes; then :
9630 HAVE_W32=yes
9631 else
9632 as_fn_error "\`--with-w32' was specified, but windows.h
9633 cannot be found." "$LINENO" 5
9634 fi
9635
9636
9637
9638 $as_echo "#define HAVE_NTGUI 1" >>confdefs.h
9639
9640 W32_OBJ="w32fns.o w32menu.o w32reg.o w32font.o w32term.o"
9641 W32_OBJ="$W32_OBJ w32xfns.o w32select.o w32uniscribe.o"
9642 W32_LIBS="$W32_LIBS -lkernel32 -luser32 -lgdi32 -lole32 -lcomdlg32"
9643 W32_LIBS="$W32_LIBS -lusp10 -lcomctl32 -lwinspool"
9644 fi
9645
9646
9647
9648 if test "${HAVE_W32}" = "yes"; then
9649 window_system=w32
9650 with_xft=no
9651 fi
9652
9653 ## $window_system is now set to the window system we will
9654 ## ultimately use.
9655
9656 term_header=
9657 HAVE_X_WINDOWS=no
9658 HAVE_X11=no
9659 USE_X_TOOLKIT=none
9660
9661 case "${window_system}" in
9662 x11 )
9663 HAVE_X_WINDOWS=yes
9664 HAVE_X11=yes
9665 term_header=xterm.h
9666 case "${with_x_toolkit}" in
9667 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
9668 motif ) USE_X_TOOLKIT=MOTIF ;;
9669 gtk ) with_gtk=yes
9670 term_header=gtkutil.h
9671 USE_X_TOOLKIT=none ;;
9672 gtk2 ) with_gtk2=yes
9673 term_header=gtkutil.h
9674 USE_X_TOOLKIT=none ;;
9675 gtk3 ) with_gtk3=yes
9676 term_header=gtkutil.h
9677 USE_X_TOOLKIT=none ;;
9678 no ) USE_X_TOOLKIT=none ;;
9679 * ) USE_X_TOOLKIT=maybe ;;
9680 esac
9681 ;;
9682 nextstep )
9683 term_header=nsterm.h
9684 ;;
9685 w32 )
9686 term_header=w32term.h
9687 ;;
9688 esac
9689
9690 if test -n "${term_header}"; then
9691
9692 cat >>confdefs.h <<_ACEOF
9693 #define TERM_HEADER "${term_header}"
9694 _ACEOF
9695
9696 fi
9697
9698 if test "$window_system" = none && test "X$with_x" != "Xno"; then
9699 # Extract the first word of "X", so it can be a program name with args.
9700 set dummy X; ac_word=$2
9701 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9702 $as_echo_n "checking for $ac_word... " >&6; }
9703 if test "${ac_cv_prog_HAVE_XSERVER+set}" = set; then :
9704 $as_echo_n "(cached) " >&6
9705 else
9706 if test -n "$HAVE_XSERVER"; then
9707 ac_cv_prog_HAVE_XSERVER="$HAVE_XSERVER" # Let the user override the test.
9708 else
9709 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9710 for as_dir in $PATH
9711 do
9712 IFS=$as_save_IFS
9713 test -z "$as_dir" && as_dir=.
9714 for ac_exec_ext in '' $ac_executable_extensions; do
9715 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9716 ac_cv_prog_HAVE_XSERVER="true"
9717 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9718 break 2
9719 fi
9720 done
9721 done
9722 IFS=$as_save_IFS
9723
9724 test -z "$ac_cv_prog_HAVE_XSERVER" && ac_cv_prog_HAVE_XSERVER="false"
9725 fi
9726 fi
9727 HAVE_XSERVER=$ac_cv_prog_HAVE_XSERVER
9728 if test -n "$HAVE_XSERVER"; then
9729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_XSERVER" >&5
9730 $as_echo "$HAVE_XSERVER" >&6; }
9731 else
9732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9733 $as_echo "no" >&6; }
9734 fi
9735
9736
9737 if test "$HAVE_XSERVER" = true ||
9738 test -n "$DISPLAY" ||
9739 test "`echo /usr/lib/libX11.*`" != "/usr/lib/libX11.*"; then
9740 as_fn_error "You seem to be running X, but no X development libraries
9741 were found. You should install the relevant development files for X
9742 and for the toolkit you want, such as Gtk+, Lesstif or Motif. Also make
9743 sure you have development files for image handling, i.e.
9744 tiff, gif, jpeg, png and xpm.
9745 If you are sure you want Emacs compiled without X window support, pass
9746 --without-x
9747 to configure." "$LINENO" 5
9748 fi
9749 fi
9750
9751 ### If we're using X11, we should use the X menu package.
9752 HAVE_MENUS=no
9753 case ${HAVE_X11} in
9754 yes ) HAVE_MENUS=yes ;;
9755 esac
9756
9757 # Does the opsystem file prohibit the use of the GNU malloc?
9758 # Assume not, until told otherwise.
9759 GNU_MALLOC=yes
9760
9761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc is Doug Lea style" >&5
9762 $as_echo_n "checking whether malloc is Doug Lea style... " >&6; }
9763 if test "${emacs_cv_var_doug_lea_malloc+set}" = set; then :
9764 $as_echo_n "(cached) " >&6
9765 else
9766 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9767 /* end confdefs.h. */
9768 #include <malloc.h>
9769 static void hook (void) {}
9770 int
9771 main ()
9772 {
9773 malloc_set_state (malloc_get_state ());
9774 __after_morecore_hook = hook;
9775 __malloc_initialize_hook = hook;
9776 ;
9777 return 0;
9778 }
9779 _ACEOF
9780 if ac_fn_c_try_link "$LINENO"; then :
9781 emacs_cv_var_doug_lea_malloc=yes
9782 else
9783 emacs_cv_var_doug_lea_malloc=no
9784 fi
9785 rm -f core conftest.err conftest.$ac_objext \
9786 conftest$ac_exeext conftest.$ac_ext
9787 fi
9788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_var_doug_lea_malloc" >&5
9789 $as_echo "$emacs_cv_var_doug_lea_malloc" >&6; }
9790 doug_lea_malloc=$emacs_cv_var_doug_lea_malloc
9791
9792
9793 system_malloc=no
9794 case "$opsys" in
9795 ## darwin ld insists on the use of malloc routines in the System framework.
9796 darwin|sol2-10) system_malloc=yes ;;
9797 esac
9798
9799 if test "${system_malloc}" = "yes"; then
9800
9801 $as_echo "#define SYSTEM_MALLOC 1" >>confdefs.h
9802
9803 GNU_MALLOC=no
9804 GNU_MALLOC_reason="
9805 (The GNU allocators don't work with this system configuration.)"
9806 GMALLOC_OBJ=
9807 VMLIMIT_OBJ=
9808 else
9809 test "$doug_lea_malloc" != "yes" && GMALLOC_OBJ=gmalloc.o
9810 VMLIMIT_OBJ=vm-limit.o
9811 fi
9812
9813
9814
9815 if test "$doug_lea_malloc" = "yes" ; then
9816 if test "$GNU_MALLOC" = yes ; then
9817 GNU_MALLOC_reason="
9818 (Using Doug Lea's new malloc from the GNU C Library.)"
9819 fi
9820
9821 $as_echo "#define DOUG_LEA_MALLOC 1" >>confdefs.h
9822
9823
9824 ## Use mmap directly for allocating larger buffers.
9825 ## FIXME this comes from src/s/{gnu,gnu-linux}.h:
9826 ## #ifdef DOUG_LEA_MALLOC; #undef REL_ALLOC; #endif
9827 ## Does the AC_FUNC_MMAP test below make this check unnecessary?
9828 case "$opsys" in
9829 gnu*) REL_ALLOC=no ;;
9830 esac
9831 fi
9832
9833 if test x"${REL_ALLOC}" = x; then
9834 REL_ALLOC=${GNU_MALLOC}
9835 fi
9836
9837 use_mmap_for_buffers=no
9838 case "$opsys" in
9839 cygwin|freebsd|irix6-5) use_mmap_for_buffers=yes ;;
9840 esac
9841
9842
9843
9844
9845
9846
9847
9848
9849 for ac_func in getpagesize
9850 do :
9851 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
9852 if test "x$ac_cv_func_getpagesize" = x""yes; then :
9853 cat >>confdefs.h <<_ACEOF
9854 #define HAVE_GETPAGESIZE 1
9855 _ACEOF
9856
9857 fi
9858 done
9859
9860 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
9861 $as_echo_n "checking for working mmap... " >&6; }
9862 if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
9863 $as_echo_n "(cached) " >&6
9864 else
9865 if test "$cross_compiling" = yes; then :
9866 ac_cv_func_mmap_fixed_mapped=no
9867 else
9868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9869 /* end confdefs.h. */
9870 $ac_includes_default
9871 /* malloc might have been renamed as rpl_malloc. */
9872 #undef malloc
9873
9874 /* Thanks to Mike Haertel and Jim Avera for this test.
9875 Here is a matrix of mmap possibilities:
9876 mmap private not fixed
9877 mmap private fixed at somewhere currently unmapped
9878 mmap private fixed at somewhere already mapped
9879 mmap shared not fixed
9880 mmap shared fixed at somewhere currently unmapped
9881 mmap shared fixed at somewhere already mapped
9882 For private mappings, we should verify that changes cannot be read()
9883 back from the file, nor mmap's back from the file at a different
9884 address. (There have been systems where private was not correctly
9885 implemented like the infamous i386 svr4.0, and systems where the
9886 VM page cache was not coherent with the file system buffer cache
9887 like early versions of FreeBSD and possibly contemporary NetBSD.)
9888 For shared mappings, we should conversely verify that changes get
9889 propagated back to all the places they're supposed to be.
9890
9891 Grep wants private fixed already mapped.
9892 The main things grep needs to know about mmap are:
9893 * does it exist and is it safe to write into the mmap'd area
9894 * how to use it (BSD variants) */
9895
9896 #include <fcntl.h>
9897 #include <sys/mman.h>
9898
9899 #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
9900 char *malloc ();
9901 #endif
9902
9903 /* This mess was copied from the GNU getpagesize.h. */
9904 #ifndef HAVE_GETPAGESIZE
9905 # ifdef _SC_PAGESIZE
9906 # define getpagesize() sysconf(_SC_PAGESIZE)
9907 # else /* no _SC_PAGESIZE */
9908 # ifdef HAVE_SYS_PARAM_H
9909 # include <sys/param.h>
9910 # ifdef EXEC_PAGESIZE
9911 # define getpagesize() EXEC_PAGESIZE
9912 # else /* no EXEC_PAGESIZE */
9913 # ifdef NBPG
9914 # define getpagesize() NBPG * CLSIZE
9915 # ifndef CLSIZE
9916 # define CLSIZE 1
9917 # endif /* no CLSIZE */
9918 # else /* no NBPG */
9919 # ifdef NBPC
9920 # define getpagesize() NBPC
9921 # else /* no NBPC */
9922 # ifdef PAGESIZE
9923 # define getpagesize() PAGESIZE
9924 # endif /* PAGESIZE */
9925 # endif /* no NBPC */
9926 # endif /* no NBPG */
9927 # endif /* no EXEC_PAGESIZE */
9928 # else /* no HAVE_SYS_PARAM_H */
9929 # define getpagesize() 8192 /* punt totally */
9930 # endif /* no HAVE_SYS_PARAM_H */
9931 # endif /* no _SC_PAGESIZE */
9932
9933 #endif /* no HAVE_GETPAGESIZE */
9934
9935 int
9936 main ()
9937 {
9938 char *data, *data2, *data3;
9939 const char *cdata2;
9940 int i, pagesize;
9941 int fd, fd2;
9942
9943 pagesize = getpagesize ();
9944
9945 /* First, make a file with some known garbage in it. */
9946 data = (char *) malloc (pagesize);
9947 if (!data)
9948 return 1;
9949 for (i = 0; i < pagesize; ++i)
9950 *(data + i) = rand ();
9951 umask (0);
9952 fd = creat ("conftest.mmap", 0600);
9953 if (fd < 0)
9954 return 2;
9955 if (write (fd, data, pagesize) != pagesize)
9956 return 3;
9957 close (fd);
9958
9959 /* Next, check that the tail of a page is zero-filled. File must have
9960 non-zero length, otherwise we risk SIGBUS for entire page. */
9961 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
9962 if (fd2 < 0)
9963 return 4;
9964 cdata2 = "";
9965 if (write (fd2, cdata2, 1) != 1)
9966 return 5;
9967 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
9968 if (data2 == MAP_FAILED)
9969 return 6;
9970 for (i = 0; i < pagesize; ++i)
9971 if (*(data2 + i))
9972 return 7;
9973 close (fd2);
9974 if (munmap (data2, pagesize))
9975 return 8;
9976
9977 /* Next, try to mmap the file at a fixed address which already has
9978 something else allocated at it. If we can, also make sure that
9979 we see the same garbage. */
9980 fd = open ("conftest.mmap", O_RDWR);
9981 if (fd < 0)
9982 return 9;
9983 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
9984 MAP_PRIVATE | MAP_FIXED, fd, 0L))
9985 return 10;
9986 for (i = 0; i < pagesize; ++i)
9987 if (*(data + i) != *(data2 + i))
9988 return 11;
9989
9990 /* Finally, make sure that changes to the mapped area do not
9991 percolate back to the file as seen by read(). (This is a bug on
9992 some variants of i386 svr4.0.) */
9993 for (i = 0; i < pagesize; ++i)
9994 *(data2 + i) = *(data2 + i) + 1;
9995 data3 = (char *) malloc (pagesize);
9996 if (!data3)
9997 return 12;
9998 if (read (fd, data3, pagesize) != pagesize)
9999 return 13;
10000 for (i = 0; i < pagesize; ++i)
10001 if (*(data + i) != *(data3 + i))
10002 return 14;
10003 close (fd);
10004 return 0;
10005 }
10006 _ACEOF
10007 if ac_fn_c_try_run "$LINENO"; then :
10008 ac_cv_func_mmap_fixed_mapped=yes
10009 else
10010 ac_cv_func_mmap_fixed_mapped=no
10011 fi
10012 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10013 conftest.$ac_objext conftest.beam conftest.$ac_ext
10014 fi
10015
10016 fi
10017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
10018 $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
10019 if test $ac_cv_func_mmap_fixed_mapped = yes; then
10020
10021 $as_echo "#define HAVE_MMAP 1" >>confdefs.h
10022
10023 fi
10024 rm -f conftest.mmap conftest.txt
10025
10026 if test $use_mmap_for_buffers = yes; then
10027
10028 $as_echo "#define USE_MMAP_FOR_BUFFERS 1" >>confdefs.h
10029
10030 REL_ALLOC=no
10031 fi
10032
10033 LIBS="$LIBS_SYSTEM $LIBS"
10034
10035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
10036 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
10037 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then :
10038 $as_echo_n "(cached) " >&6
10039 else
10040 ac_check_lib_save_LIBS=$LIBS
10041 LIBS="-ldnet $LIBS"
10042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10043 /* end confdefs.h. */
10044
10045 /* Override any GCC internal prototype to avoid an error.
10046 Use char because int might match the return type of a GCC
10047 builtin and then its argument prototype would still apply. */
10048 #ifdef __cplusplus
10049 extern "C"
10050 #endif
10051 char dnet_ntoa ();
10052 int
10053 main ()
10054 {
10055 return dnet_ntoa ();
10056 ;
10057 return 0;
10058 }
10059 _ACEOF
10060 if ac_fn_c_try_link "$LINENO"; then :
10061 ac_cv_lib_dnet_dnet_ntoa=yes
10062 else
10063 ac_cv_lib_dnet_dnet_ntoa=no
10064 fi
10065 rm -f core conftest.err conftest.$ac_objext \
10066 conftest$ac_exeext conftest.$ac_ext
10067 LIBS=$ac_check_lib_save_LIBS
10068 fi
10069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
10070 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
10071 if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then :
10072 cat >>confdefs.h <<_ACEOF
10073 #define HAVE_LIBDNET 1
10074 _ACEOF
10075
10076 LIBS="-ldnet $LIBS"
10077
10078 fi
10079
10080
10081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lXbsd" >&5
10082 $as_echo_n "checking for main in -lXbsd... " >&6; }
10083 if test "${ac_cv_lib_Xbsd_main+set}" = set; then :
10084 $as_echo_n "(cached) " >&6
10085 else
10086 ac_check_lib_save_LIBS=$LIBS
10087 LIBS="-lXbsd $LIBS"
10088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10089 /* end confdefs.h. */
10090
10091
10092 int
10093 main ()
10094 {
10095 return main ();
10096 ;
10097 return 0;
10098 }
10099 _ACEOF
10100 if ac_fn_c_try_link "$LINENO"; then :
10101 ac_cv_lib_Xbsd_main=yes
10102 else
10103 ac_cv_lib_Xbsd_main=no
10104 fi
10105 rm -f core conftest.err conftest.$ac_objext \
10106 conftest$ac_exeext conftest.$ac_ext
10107 LIBS=$ac_check_lib_save_LIBS
10108 fi
10109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xbsd_main" >&5
10110 $as_echo "$ac_cv_lib_Xbsd_main" >&6; }
10111 if test "x$ac_cv_lib_Xbsd_main" = x""yes; then :
10112 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
10113 fi
10114
10115
10116 LIB_PTHREAD=
10117
10118
10119
10120 if test "$ac_cv_header_pthread_h"; then
10121 if test "$GMALLOC_OBJ" = gmalloc.o; then
10122 emacs_pthread_function=pthread_atfork
10123 else
10124 emacs_pthread_function=pthread_self
10125 fi
10126 as_ac_Lib=`$as_echo "ac_cv_lib_pthread_$emacs_pthread_function" | $as_tr_sh`
10127 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $emacs_pthread_function in -lpthread" >&5
10128 $as_echo_n "checking for $emacs_pthread_function in -lpthread... " >&6; }
10129 if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
10130 $as_echo_n "(cached) " >&6
10131 else
10132 ac_check_lib_save_LIBS=$LIBS
10133 LIBS="-lpthread $LIBS"
10134 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10135 /* end confdefs.h. */
10136
10137 /* Override any GCC internal prototype to avoid an error.
10138 Use char because int might match the return type of a GCC
10139 builtin and then its argument prototype would still apply. */
10140 #ifdef __cplusplus
10141 extern "C"
10142 #endif
10143 char $emacs_pthread_function ();
10144 int
10145 main ()
10146 {
10147 return $emacs_pthread_function ();
10148 ;
10149 return 0;
10150 }
10151 _ACEOF
10152 if ac_fn_c_try_link "$LINENO"; then :
10153 eval "$as_ac_Lib=yes"
10154 else
10155 eval "$as_ac_Lib=no"
10156 fi
10157 rm -f core conftest.err conftest.$ac_objext \
10158 conftest$ac_exeext conftest.$ac_ext
10159 LIBS=$ac_check_lib_save_LIBS
10160 fi
10161 eval ac_res=\$$as_ac_Lib
10162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10163 $as_echo "$ac_res" >&6; }
10164 eval as_val=\$$as_ac_Lib
10165 if test "x$as_val" = x""yes; then :
10166 HAVE_PTHREAD=yes
10167 fi
10168
10169 fi
10170 if test "$HAVE_PTHREAD" = yes; then
10171 case "${canonical}" in
10172 *-hpux*) ;;
10173 *) LIB_PTHREAD="-lpthread"
10174 LIBS="$LIB_PTHREAD $LIBS" ;;
10175 esac
10176
10177 $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
10178
10179 fi
10180
10181
10182 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cma_open in -lpthreads" >&5
10183 $as_echo_n "checking for cma_open in -lpthreads... " >&6; }
10184 if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then :
10185 $as_echo_n "(cached) " >&6
10186 else
10187 ac_check_lib_save_LIBS=$LIBS
10188 LIBS="-lpthreads $LIBS"
10189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10190 /* end confdefs.h. */
10191
10192 /* Override any GCC internal prototype to avoid an error.
10193 Use char because int might match the return type of a GCC
10194 builtin and then its argument prototype would still apply. */
10195 #ifdef __cplusplus
10196 extern "C"
10197 #endif
10198 char cma_open ();
10199 int
10200 main ()
10201 {
10202 return cma_open ();
10203 ;
10204 return 0;
10205 }
10206 _ACEOF
10207 if ac_fn_c_try_link "$LINENO"; then :
10208 ac_cv_lib_pthreads_cma_open=yes
10209 else
10210 ac_cv_lib_pthreads_cma_open=no
10211 fi
10212 rm -f core conftest.err conftest.$ac_objext \
10213 conftest$ac_exeext conftest.$ac_ext
10214 LIBS=$ac_check_lib_save_LIBS
10215 fi
10216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_cma_open" >&5
10217 $as_echo "$ac_cv_lib_pthreads_cma_open" >&6; }
10218 if test "x$ac_cv_lib_pthreads_cma_open" = x""yes; then :
10219 cat >>confdefs.h <<_ACEOF
10220 #define HAVE_LIBPTHREADS 1
10221 _ACEOF
10222
10223 LIBS="-lpthreads $LIBS"
10224
10225 fi
10226
10227
10228 ## Note: when using cpp in s/aix4.2.h, this definition depended on
10229 ## HAVE_LIBPTHREADS. That was not defined earlier in configure when
10230 ## the system file was sourced. Hence the value of LIBS_SYSTEM
10231 ## added to LIBS in configure would never contain the pthreads part,
10232 ## but the value used in Makefiles might. FIXME?
10233 ##
10234 ## -lpthreads seems to be necessary for Xlib in X11R6, and should
10235 ## be harmless on older versions of X where it happens to exist.
10236 test "$opsys" = "aix4-2" && \
10237 test $ac_cv_lib_pthreads_cma_open = yes && \
10238 LIBS_SYSTEM="$LIBS_SYSTEM -lpthreads"
10239
10240
10241 case ${host_os} in
10242 aix*)
10243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
10244 $as_echo_n "checking for -bbigtoc option... " >&6; }
10245 if test "${gdb_cv_bigtoc+set}" = set; then :
10246 $as_echo_n "(cached) " >&6
10247 else
10248
10249 case $GCC in
10250 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
10251 *) gdb_cv_bigtoc=-bbigtoc ;;
10252 esac
10253
10254 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
10255 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10256 /* end confdefs.h. */
10257
10258 int
10259 main ()
10260 {
10261 int i;
10262 ;
10263 return 0;
10264 }
10265 _ACEOF
10266 if ac_fn_c_try_link "$LINENO"; then :
10267
10268 else
10269 gdb_cv_bigtoc=
10270 fi
10271 rm -f core conftest.err conftest.$ac_objext \
10272 conftest$ac_exeext conftest.$ac_ext
10273
10274 fi
10275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
10276 $as_echo "$gdb_cv_bigtoc" >&6; }
10277 ;;
10278 esac
10279
10280 # Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets
10281 # used for the tests that follow. We set them back to REAL_CFLAGS and
10282 # REAL_CPPFLAGS later on.
10283
10284 REAL_CFLAGS="$CFLAGS"
10285 REAL_CPPFLAGS="$CPPFLAGS"
10286
10287 if test "${HAVE_X11}" = "yes"; then
10288 DEFS="$C_SWITCH_X_SITE $DEFS"
10289 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
10290 LIBS="-lX11 $LIBS"
10291 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
10292 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
10293
10294 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
10295 # This is handled by LD_SWITCH_X_SITE_RPATH during the real build,
10296 # but it's more convenient here to set LD_RUN_PATH since this
10297 # also works on hosts that don't understand LD_SWITCH_X_SITE_RPATH.
10298 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
10299 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
10300 export LD_RUN_PATH
10301 fi
10302
10303 if test "${opsys}" = "gnu-linux"; then
10304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether X on GNU/Linux needs -b to link" >&5
10305 $as_echo_n "checking whether X on GNU/Linux needs -b to link... " >&6; }
10306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10307 /* end confdefs.h. */
10308
10309 int
10310 main ()
10311 {
10312 XOpenDisplay ("foo");
10313 ;
10314 return 0;
10315 }
10316 _ACEOF
10317 if ac_fn_c_try_link "$LINENO"; then :
10318 xgnu_linux_first_failure=no
10319 else
10320 xgnu_linux_first_failure=yes
10321 fi
10322 rm -f core conftest.err conftest.$ac_objext \
10323 conftest$ac_exeext conftest.$ac_ext
10324 if test "${xgnu_linux_first_failure}" = "yes"; then
10325 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
10326 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
10327 OLD_CPPFLAGS="$CPPFLAGS"
10328 OLD_LIBS="$LIBS"
10329 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
10330 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
10331 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
10332 LIBS="$LIBS -b i486-linuxaout"
10333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10334 /* end confdefs.h. */
10335
10336 int
10337 main ()
10338 {
10339 XOpenDisplay ("foo");
10340 ;
10341 return 0;
10342 }
10343 _ACEOF
10344 if ac_fn_c_try_link "$LINENO"; then :
10345 xgnu_linux_second_failure=no
10346 else
10347 xgnu_linux_second_failure=yes
10348 fi
10349 rm -f core conftest.err conftest.$ac_objext \
10350 conftest$ac_exeext conftest.$ac_ext
10351 if test "${xgnu_linux_second_failure}" = "yes"; then
10352 # If we get the same failure with -b, there is no use adding -b.
10353 # So take it out. This plays safe.
10354 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
10355 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
10356 CPPFLAGS="$OLD_CPPFLAGS"
10357 LIBS="$OLD_LIBS"
10358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10359 $as_echo "no" >&6; }
10360 else
10361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10362 $as_echo "yes" >&6; }
10363 fi
10364 else
10365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10366 $as_echo "no" >&6; }
10367 fi
10368 fi
10369
10370 # Reportedly, some broken Solaris systems have XKBlib.h but are missing
10371 # header files included from there.
10372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Xkb" >&5
10373 $as_echo_n "checking for Xkb... " >&6; }
10374 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10375 /* end confdefs.h. */
10376 #include <X11/Xlib.h>
10377 #include <X11/XKBlib.h>
10378 int
10379 main ()
10380 {
10381 XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);
10382 ;
10383 return 0;
10384 }
10385 _ACEOF
10386 if ac_fn_c_try_link "$LINENO"; then :
10387 emacs_xkb=yes
10388 else
10389 emacs_xkb=no
10390 fi
10391 rm -f core conftest.err conftest.$ac_objext \
10392 conftest$ac_exeext conftest.$ac_ext
10393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_xkb" >&5
10394 $as_echo "$emacs_xkb" >&6; }
10395 if test $emacs_xkb = yes; then
10396
10397 $as_echo "#define HAVE_XKBGETKEYBOARD 1" >>confdefs.h
10398
10399 fi
10400
10401 for ac_func in XrmSetDatabase XScreenResourceString \
10402 XScreenNumberOfScreen
10403 do :
10404 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10405 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10406 eval as_val=\$$as_ac_var
10407 if test "x$as_val" = x""yes; then :
10408 cat >>confdefs.h <<_ACEOF
10409 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10410 _ACEOF
10411
10412 fi
10413 done
10414
10415 fi
10416
10417 if test "${window_system}" = "x11"; then
10418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 version 6" >&5
10419 $as_echo_n "checking X11 version 6... " >&6; }
10420 if test "${emacs_cv_x11_version_6+set}" = set; then :
10421 $as_echo_n "(cached) " >&6
10422 else
10423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10424 /* end confdefs.h. */
10425 #include <X11/Xlib.h>
10426 int
10427 main ()
10428 {
10429 #if XlibSpecificationRelease < 6
10430 fail;
10431 #endif
10432
10433 ;
10434 return 0;
10435 }
10436 _ACEOF
10437 if ac_fn_c_try_link "$LINENO"; then :
10438 emacs_cv_x11_version_6=yes
10439 else
10440 emacs_cv_x11_version_6=no
10441 fi
10442 rm -f core conftest.err conftest.$ac_objext \
10443 conftest$ac_exeext conftest.$ac_ext
10444 fi
10445
10446 if test $emacs_cv_x11_version_6 = yes; then
10447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5
10448 $as_echo "6 or newer" >&6; }
10449
10450 $as_echo "#define HAVE_X11R6 1" >>confdefs.h
10451
10452
10453 $as_echo "#define HAVE_X_I18N 1" >>confdefs.h
10454
10455 ## inoue@ainet.or.jp says Solaris has a bug related to X11R6-style
10456 ## XIM support.
10457 case "$opsys" in
10458 sol2-*) : ;;
10459 *)
10460 $as_echo "#define HAVE_X11R6_XIM 1" >>confdefs.h
10461
10462 ;;
10463 esac
10464 else
10465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5
10466 $as_echo "before 6" >&6; }
10467 fi
10468 fi
10469
10470
10471 ### Use -lrsvg-2 if available, unless `--with-rsvg=no' is specified.
10472 HAVE_RSVG=no
10473 if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes"; then
10474 if test "${with_rsvg}" != "no"; then
10475 RSVG_REQUIRED=2.11.0
10476 RSVG_MODULE="librsvg-2.0 >= $RSVG_REQUIRED"
10477
10478
10479 succeeded=no
10480
10481 if test "$PKG_CONFIG" = "no" ; then
10482 :
10483 else
10484 PKG_CONFIG_MIN_VERSION=0.9.0
10485 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
10486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $RSVG_MODULE" >&5
10487 $as_echo_n "checking for $RSVG_MODULE... " >&6; }
10488
10489 if $PKG_CONFIG --exists "$RSVG_MODULE" 2>&5 &&
10490 RSVG_CFLAGS=`$PKG_CONFIG --cflags "$RSVG_MODULE" 2>&5` &&
10491 RSVG_LIBS=`$PKG_CONFIG --libs "$RSVG_MODULE" 2>&5`; then
10492 edit_cflags="
10493 s,///*,/,g
10494 s/^/ /
10495 s/ -I/ $isystem/g
10496 s/^ //
10497 "
10498 RSVG_CFLAGS=`$as_echo "$RSVG_CFLAGS" | sed -e "$edit_cflags"`
10499 RSVG_LIBS=`$as_echo "$RSVG_LIBS" | sed -e 's,///*,/,g'`
10500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$RSVG_CFLAGS' LIBS='$RSVG_LIBS'" >&5
10501 $as_echo "yes CFLAGS='$RSVG_CFLAGS' LIBS='$RSVG_LIBS'" >&6; }
10502 succeeded=yes
10503 else
10504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10505 $as_echo "no" >&6; }
10506 RSVG_CFLAGS=""
10507 RSVG_LIBS=""
10508 ## If we have a custom action on failure, don't print errors, but
10509 ## do set a variable so people can do so. Do it in a subshell
10510 ## to capture any diagnostics in invoking pkg-config.
10511 RSVG_PKG_ERRORS=`($PKG_CONFIG --print-errors "$RSVG_MODULE") 2>&1`
10512
10513 fi
10514
10515
10516
10517 else
10518 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10519 echo "*** See http://www.freedesktop.org/software/pkgconfig"
10520 fi
10521 fi
10522
10523 if test $succeeded = yes; then
10524 HAVE_RSVG=yes
10525 else
10526 :
10527 fi
10528
10529
10530
10531
10532 if test $HAVE_RSVG = yes; then
10533
10534 $as_echo "#define HAVE_RSVG 1" >>confdefs.h
10535
10536 CFLAGS="$CFLAGS $RSVG_CFLAGS"
10537 LIBS="$RSVG_LIBS $LIBS"
10538 fi
10539 fi
10540 fi
10541
10542 HAVE_IMAGEMAGICK=no
10543 if test "${HAVE_X11}" = "yes"; then
10544 if test "${with_imagemagick}" != "no"; then
10545 ## 6.2.8 is the earliest version known to work, but earlier versions
10546 ## might work - let us know if you find one.
10547 ## 6.0.7 does not work. See bug#7955.
10548 IMAGEMAGICK_MODULE="Wand >= 6.2.8"
10549
10550 succeeded=no
10551
10552 if test "$PKG_CONFIG" = "no" ; then
10553 :
10554 else
10555 PKG_CONFIG_MIN_VERSION=0.9.0
10556 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
10557 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $IMAGEMAGICK_MODULE" >&5
10558 $as_echo_n "checking for $IMAGEMAGICK_MODULE... " >&6; }
10559
10560 if $PKG_CONFIG --exists "$IMAGEMAGICK_MODULE" 2>&5 &&
10561 IMAGEMAGICK_CFLAGS=`$PKG_CONFIG --cflags "$IMAGEMAGICK_MODULE" 2>&5` &&
10562 IMAGEMAGICK_LIBS=`$PKG_CONFIG --libs "$IMAGEMAGICK_MODULE" 2>&5`; then
10563 edit_cflags="
10564 s,///*,/,g
10565 s/^/ /
10566 s/ -I/ $isystem/g
10567 s/^ //
10568 "
10569 IMAGEMAGICK_CFLAGS=`$as_echo "$IMAGEMAGICK_CFLAGS" | sed -e "$edit_cflags"`
10570 IMAGEMAGICK_LIBS=`$as_echo "$IMAGEMAGICK_LIBS" | sed -e 's,///*,/,g'`
10571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$IMAGEMAGICK_CFLAGS' LIBS='$IMAGEMAGICK_LIBS'" >&5
10572 $as_echo "yes CFLAGS='$IMAGEMAGICK_CFLAGS' LIBS='$IMAGEMAGICK_LIBS'" >&6; }
10573 succeeded=yes
10574 else
10575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10576 $as_echo "no" >&6; }
10577 IMAGEMAGICK_CFLAGS=""
10578 IMAGEMAGICK_LIBS=""
10579 ## If we have a custom action on failure, don't print errors, but
10580 ## do set a variable so people can do so. Do it in a subshell
10581 ## to capture any diagnostics in invoking pkg-config.
10582 IMAGEMAGICK_PKG_ERRORS=`($PKG_CONFIG --print-errors "$IMAGEMAGICK_MODULE") 2>&1`
10583
10584 fi
10585
10586
10587
10588 else
10589 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10590 echo "*** See http://www.freedesktop.org/software/pkgconfig"
10591 fi
10592 fi
10593
10594 if test $succeeded = yes; then
10595 HAVE_IMAGEMAGICK=yes
10596 else
10597 :
10598 fi
10599
10600
10601
10602
10603 if test $HAVE_IMAGEMAGICK = yes; then
10604
10605 $as_echo "#define HAVE_IMAGEMAGICK 1" >>confdefs.h
10606
10607 CFLAGS="$CFLAGS $IMAGEMAGICK_CFLAGS"
10608 LIBS="$IMAGEMAGICK_LIBS $LIBS"
10609 for ac_func in MagickExportImagePixels MagickMergeImageLayers
10610 do :
10611 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10612 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10613 eval as_val=\$$as_ac_var
10614 if test "x$as_val" = x""yes; then :
10615 cat >>confdefs.h <<_ACEOF
10616 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10617 _ACEOF
10618
10619 fi
10620 done
10621
10622 fi
10623 fi
10624 fi
10625
10626
10627 HAVE_GTK=no
10628 GTK_OBJ=
10629 check_gtk2=no
10630 gtk3_pkg_errors=
10631 if test "${with_gtk3}" = "yes" || test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "maybe"; then
10632 GLIB_REQUIRED=2.28
10633 GTK_REQUIRED=3.0
10634 GTK_MODULES="gtk+-3.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
10635
10636
10637 succeeded=no
10638
10639 if test "$PKG_CONFIG" = "no" ; then
10640 pkg_check_gtk=no
10641 else
10642 PKG_CONFIG_MIN_VERSION=0.9.0
10643 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
10644 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5
10645 $as_echo_n "checking for $GTK_MODULES... " >&6; }
10646
10647 if $PKG_CONFIG --exists "$GTK_MODULES" 2>&5 &&
10648 GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES" 2>&5` &&
10649 GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES" 2>&5`; then
10650 edit_cflags="
10651 s,///*,/,g
10652 s/^/ /
10653 s/ -I/ $isystem/g
10654 s/^ //
10655 "
10656 GTK_CFLAGS=`$as_echo "$GTK_CFLAGS" | sed -e "$edit_cflags"`
10657 GTK_LIBS=`$as_echo "$GTK_LIBS" | sed -e 's,///*,/,g'`
10658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&5
10659 $as_echo "yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&6; }
10660 succeeded=yes
10661 else
10662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10663 $as_echo "no" >&6; }
10664 GTK_CFLAGS=""
10665 GTK_LIBS=""
10666 ## If we have a custom action on failure, don't print errors, but
10667 ## do set a variable so people can do so. Do it in a subshell
10668 ## to capture any diagnostics in invoking pkg-config.
10669 GTK_PKG_ERRORS=`($PKG_CONFIG --print-errors "$GTK_MODULES") 2>&1`
10670
10671 fi
10672
10673
10674
10675 else
10676 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10677 echo "*** See http://www.freedesktop.org/software/pkgconfig"
10678 fi
10679 fi
10680
10681 if test $succeeded = yes; then
10682 pkg_check_gtk=yes
10683 else
10684 pkg_check_gtk=no
10685 fi
10686
10687 if test "$pkg_check_gtk" = "no" && test "$with_gtk3" = "yes"; then
10688 as_fn_error "$GTK_PKG_ERRORS" "$LINENO" 5
10689 fi
10690 if test "$pkg_check_gtk" = "yes"; then
10691
10692 $as_echo "#define HAVE_GTK3 1" >>confdefs.h
10693
10694 GTK_OBJ=emacsgtkfixed.o
10695 term_header=gtkutil.h
10696 USE_GTK_TOOLKIT="GTK3"
10697 else
10698 check_gtk2=yes
10699 gtk3_pkg_errors="$GTK_PKG_ERRORS "
10700 fi
10701 fi
10702
10703 if test "${with_gtk2}" = "yes" || test "$check_gtk2" = "yes"; then
10704 GLIB_REQUIRED=2.10
10705 GTK_REQUIRED=2.10
10706 GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
10707
10708
10709 succeeded=no
10710
10711 if test "$PKG_CONFIG" = "no" ; then
10712 pkg_check_gtk=no
10713 else
10714 PKG_CONFIG_MIN_VERSION=0.9.0
10715 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
10716 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5
10717 $as_echo_n "checking for $GTK_MODULES... " >&6; }
10718
10719 if $PKG_CONFIG --exists "$GTK_MODULES" 2>&5 &&
10720 GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES" 2>&5` &&
10721 GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES" 2>&5`; then
10722 edit_cflags="
10723 s,///*,/,g
10724 s/^/ /
10725 s/ -I/ $isystem/g
10726 s/^ //
10727 "
10728 GTK_CFLAGS=`$as_echo "$GTK_CFLAGS" | sed -e "$edit_cflags"`
10729 GTK_LIBS=`$as_echo "$GTK_LIBS" | sed -e 's,///*,/,g'`
10730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&5
10731 $as_echo "yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&6; }
10732 succeeded=yes
10733 else
10734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10735 $as_echo "no" >&6; }
10736 GTK_CFLAGS=""
10737 GTK_LIBS=""
10738 ## If we have a custom action on failure, don't print errors, but
10739 ## do set a variable so people can do so. Do it in a subshell
10740 ## to capture any diagnostics in invoking pkg-config.
10741 GTK_PKG_ERRORS=`($PKG_CONFIG --print-errors "$GTK_MODULES") 2>&1`
10742
10743 fi
10744
10745
10746
10747 else
10748 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10749 echo "*** See http://www.freedesktop.org/software/pkgconfig"
10750 fi
10751 fi
10752
10753 if test $succeeded = yes; then
10754 pkg_check_gtk=yes
10755 else
10756 pkg_check_gtk=no
10757 fi
10758
10759 if test "$pkg_check_gtk" = "no" &&
10760 { test "$with_gtk" = yes || test "$with_gtk2" = "yes"; }
10761 then
10762 as_fn_error "$gtk3_pkg_errors$GTK_PKG_ERRORS" "$LINENO" 5
10763 fi
10764 test "$pkg_check_gtk" = "yes" && USE_GTK_TOOLKIT="GTK2"
10765 fi
10766
10767 if test x"$pkg_check_gtk" = xyes; then
10768
10769
10770
10771 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS"
10772 CFLAGS="$CFLAGS $GTK_CFLAGS"
10773 LIBS="$GTK_LIBS $LIBS"
10774 GTK_COMPILES=no
10775 for ac_func in gtk_main
10776 do :
10777 ac_fn_c_check_func "$LINENO" "gtk_main" "ac_cv_func_gtk_main"
10778 if test "x$ac_cv_func_gtk_main" = x""yes; then :
10779 cat >>confdefs.h <<_ACEOF
10780 #define HAVE_GTK_MAIN 1
10781 _ACEOF
10782 GTK_COMPILES=yes
10783 fi
10784 done
10785
10786 if test "${GTK_COMPILES}" != "yes"; then
10787 if test "$USE_X_TOOLKIT" != "maybe"; then
10788 as_fn_error "Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" "$LINENO" 5;
10789 fi
10790 else
10791 HAVE_GTK=yes
10792
10793 $as_echo "#define USE_GTK 1" >>confdefs.h
10794
10795 GTK_OBJ="gtkutil.o $GTK_OBJ"
10796 USE_X_TOOLKIT=none
10797 if $PKG_CONFIG --atleast-version=2.10 gtk+-2.0; then
10798 :
10799 else
10800 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your version of Gtk+ will have problems with
10801 closing open displays. This is no problem if you just use
10802 one display, but if you use more than one and close one of them
10803 Emacs may crash." >&5
10804 $as_echo "$as_me: WARNING: Your version of Gtk+ will have problems with
10805 closing open displays. This is no problem if you just use
10806 one display, but if you use more than one and close one of them
10807 Emacs may crash." >&2;}
10808 sleep 3
10809 fi
10810 fi
10811
10812 fi
10813
10814
10815
10816 if test "${HAVE_GTK}" = "yes"; then
10817
10818 if test "$with_toolkit_scroll_bars" != no; then
10819 with_toolkit_scroll_bars=yes
10820 fi
10821
10822 HAVE_GTK_FILE_SELECTION=no
10823 ac_fn_c_check_decl "$LINENO" "GTK_TYPE_FILE_SELECTION" "ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" "$ac_includes_default
10824 #include <gtk/gtk.h>
10825 "
10826 if test "x$ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" = x""yes; then :
10827 HAVE_GTK_FILE_SELECTION=yes
10828 else
10829 HAVE_GTK_FILE_SELECTION=no
10830 fi
10831
10832 if test "$HAVE_GTK_FILE_SELECTION" = yes; then
10833 for ac_func in gtk_file_selection_new
10834 do :
10835 ac_fn_c_check_func "$LINENO" "gtk_file_selection_new" "ac_cv_func_gtk_file_selection_new"
10836 if test "x$ac_cv_func_gtk_file_selection_new" = x""yes; then :
10837 cat >>confdefs.h <<_ACEOF
10838 #define HAVE_GTK_FILE_SELECTION_NEW 1
10839 _ACEOF
10840
10841 fi
10842 done
10843
10844 fi
10845
10846
10847 for ac_func in gtk_widget_get_window gtk_widget_set_has_window \
10848 gtk_dialog_get_action_area gtk_widget_get_sensitive \
10849 gtk_widget_get_mapped gtk_adjustment_get_page_size \
10850 gtk_orientable_set_orientation \
10851 gtk_window_set_has_resize_grip
10852 do :
10853 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10854 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10855 eval as_val=\$$as_ac_var
10856 if test "x$as_val" = x""yes; then :
10857 cat >>confdefs.h <<_ACEOF
10858 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10859 _ACEOF
10860
10861 fi
10862 done
10863
10864
10865 term_header=gtkutil.h
10866 fi
10867
10868 HAVE_DBUS=no
10869 DBUS_OBJ=
10870 if test "${with_dbus}" = "yes"; then
10871
10872 succeeded=no
10873
10874 if test "$PKG_CONFIG" = "no" ; then
10875 HAVE_DBUS=no
10876 else
10877 PKG_CONFIG_MIN_VERSION=0.9.0
10878 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
10879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbus-1 >= 1.0" >&5
10880 $as_echo_n "checking for dbus-1 >= 1.0... " >&6; }
10881
10882 if $PKG_CONFIG --exists "dbus-1 >= 1.0" 2>&5 &&
10883 DBUS_CFLAGS=`$PKG_CONFIG --cflags "dbus-1 >= 1.0" 2>&5` &&
10884 DBUS_LIBS=`$PKG_CONFIG --libs "dbus-1 >= 1.0" 2>&5`; then
10885 edit_cflags="
10886 s,///*,/,g
10887 s/^/ /
10888 s/ -I/ $isystem/g
10889 s/^ //
10890 "
10891 DBUS_CFLAGS=`$as_echo "$DBUS_CFLAGS" | sed -e "$edit_cflags"`
10892 DBUS_LIBS=`$as_echo "$DBUS_LIBS" | sed -e 's,///*,/,g'`
10893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$DBUS_CFLAGS' LIBS='$DBUS_LIBS'" >&5
10894 $as_echo "yes CFLAGS='$DBUS_CFLAGS' LIBS='$DBUS_LIBS'" >&6; }
10895 succeeded=yes
10896 else
10897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10898 $as_echo "no" >&6; }
10899 DBUS_CFLAGS=""
10900 DBUS_LIBS=""
10901 ## If we have a custom action on failure, don't print errors, but
10902 ## do set a variable so people can do so. Do it in a subshell
10903 ## to capture any diagnostics in invoking pkg-config.
10904 DBUS_PKG_ERRORS=`($PKG_CONFIG --print-errors "dbus-1 >= 1.0") 2>&1`
10905
10906 fi
10907
10908
10909
10910 else
10911 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10912 echo "*** See http://www.freedesktop.org/software/pkgconfig"
10913 fi
10914 fi
10915
10916 if test $succeeded = yes; then
10917 HAVE_DBUS=yes
10918 else
10919 HAVE_DBUS=no
10920 fi
10921
10922 if test "$HAVE_DBUS" = yes; then
10923 LIBS="$LIBS $DBUS_LIBS"
10924
10925 $as_echo "#define HAVE_DBUS 1" >>confdefs.h
10926
10927 for ac_func in dbus_watch_get_unix_fd \
10928 dbus_type_is_valid \
10929 dbus_validate_bus_name \
10930 dbus_validate_path \
10931 dbus_validate_interface \
10932 dbus_validate_member
10933 do :
10934 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10935 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10936 eval as_val=\$$as_ac_var
10937 if test "x$as_val" = x""yes; then :
10938 cat >>confdefs.h <<_ACEOF
10939 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10940 _ACEOF
10941
10942 fi
10943 done
10944
10945 DBUS_OBJ=dbusbind.o
10946 fi
10947 fi
10948
10949
10950 HAVE_GSETTINGS=no
10951 if test "${HAVE_X11}" = "yes" && test "${with_gsettings}" = "yes"; then
10952
10953 succeeded=no
10954
10955 if test "$PKG_CONFIG" = "no" ; then
10956 HAVE_GSETTINGS=no
10957 else
10958 PKG_CONFIG_MIN_VERSION=0.9.0
10959 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
10960 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gio-2.0 >= 2.26" >&5
10961 $as_echo_n "checking for gio-2.0 >= 2.26... " >&6; }
10962
10963 if $PKG_CONFIG --exists "gio-2.0 >= 2.26" 2>&5 &&
10964 GSETTINGS_CFLAGS=`$PKG_CONFIG --cflags "gio-2.0 >= 2.26" 2>&5` &&
10965 GSETTINGS_LIBS=`$PKG_CONFIG --libs "gio-2.0 >= 2.26" 2>&5`; then
10966 edit_cflags="
10967 s,///*,/,g
10968 s/^/ /
10969 s/ -I/ $isystem/g
10970 s/^ //
10971 "
10972 GSETTINGS_CFLAGS=`$as_echo "$GSETTINGS_CFLAGS" | sed -e "$edit_cflags"`
10973 GSETTINGS_LIBS=`$as_echo "$GSETTINGS_LIBS" | sed -e 's,///*,/,g'`
10974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GSETTINGS_CFLAGS' LIBS='$GSETTINGS_LIBS'" >&5
10975 $as_echo "yes CFLAGS='$GSETTINGS_CFLAGS' LIBS='$GSETTINGS_LIBS'" >&6; }
10976 succeeded=yes
10977 else
10978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10979 $as_echo "no" >&6; }
10980 GSETTINGS_CFLAGS=""
10981 GSETTINGS_LIBS=""
10982 ## If we have a custom action on failure, don't print errors, but
10983 ## do set a variable so people can do so. Do it in a subshell
10984 ## to capture any diagnostics in invoking pkg-config.
10985 GSETTINGS_PKG_ERRORS=`($PKG_CONFIG --print-errors "gio-2.0 >= 2.26") 2>&1`
10986
10987 fi
10988
10989
10990
10991 else
10992 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10993 echo "*** See http://www.freedesktop.org/software/pkgconfig"
10994 fi
10995 fi
10996
10997 if test $succeeded = yes; then
10998 HAVE_GSETTINGS=yes
10999 else
11000 HAVE_GSETTINGS=no
11001 fi
11002
11003 if test "$HAVE_GSETTINGS" = "yes"; then
11004
11005 $as_echo "#define HAVE_GSETTINGS 1" >>confdefs.h
11006
11007 SETTINGS_CFLAGS="$GSETTINGS_CFLAGS"
11008 SETTINGS_LIBS="$GSETTINGS_LIBS"
11009 fi
11010 fi
11011
11012 HAVE_GCONF=no
11013 if test "${HAVE_X11}" = "yes" && test "${with_gconf}" = "yes"; then
11014
11015 succeeded=no
11016
11017 if test "$PKG_CONFIG" = "no" ; then
11018 HAVE_GCONF=no
11019 else
11020 PKG_CONFIG_MIN_VERSION=0.9.0
11021 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11022 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gconf-2.0 >= 2.13" >&5
11023 $as_echo_n "checking for gconf-2.0 >= 2.13... " >&6; }
11024
11025 if $PKG_CONFIG --exists "gconf-2.0 >= 2.13" 2>&5 &&
11026 GCONF_CFLAGS=`$PKG_CONFIG --cflags "gconf-2.0 >= 2.13" 2>&5` &&
11027 GCONF_LIBS=`$PKG_CONFIG --libs "gconf-2.0 >= 2.13" 2>&5`; then
11028 edit_cflags="
11029 s,///*,/,g
11030 s/^/ /
11031 s/ -I/ $isystem/g
11032 s/^ //
11033 "
11034 GCONF_CFLAGS=`$as_echo "$GCONF_CFLAGS" | sed -e "$edit_cflags"`
11035 GCONF_LIBS=`$as_echo "$GCONF_LIBS" | sed -e 's,///*,/,g'`
11036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GCONF_CFLAGS' LIBS='$GCONF_LIBS'" >&5
11037 $as_echo "yes CFLAGS='$GCONF_CFLAGS' LIBS='$GCONF_LIBS'" >&6; }
11038 succeeded=yes
11039 else
11040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11041 $as_echo "no" >&6; }
11042 GCONF_CFLAGS=""
11043 GCONF_LIBS=""
11044 ## If we have a custom action on failure, don't print errors, but
11045 ## do set a variable so people can do so. Do it in a subshell
11046 ## to capture any diagnostics in invoking pkg-config.
11047 GCONF_PKG_ERRORS=`($PKG_CONFIG --print-errors "gconf-2.0 >= 2.13") 2>&1`
11048
11049 fi
11050
11051
11052
11053 else
11054 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11055 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11056 fi
11057 fi
11058
11059 if test $succeeded = yes; then
11060 HAVE_GCONF=yes
11061 else
11062 HAVE_GCONF=no
11063 fi
11064
11065 if test "$HAVE_GCONF" = yes; then
11066
11067 $as_echo "#define HAVE_GCONF 1" >>confdefs.h
11068
11069 SETTINGS_CFLAGS="$SETTINGS_CFLAGS $GCONF_CFLAGS"
11070 SETTINGS_LIBS="$SETTINGS_LIBS $GCONF_LIBS"
11071 fi
11072 fi
11073
11074 if test "$HAVE_GSETTINGS" = "yes" || test "$HAVE_GCONF" = "yes"; then
11075
11076 succeeded=no
11077
11078 if test "$PKG_CONFIG" = "no" ; then
11079 HAVE_GOBJECT=no
11080 else
11081 PKG_CONFIG_MIN_VERSION=0.9.0
11082 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gobject-2.0 >= 2.0" >&5
11084 $as_echo_n "checking for gobject-2.0 >= 2.0... " >&6; }
11085
11086 if $PKG_CONFIG --exists "gobject-2.0 >= 2.0" 2>&5 &&
11087 GOBJECT_CFLAGS=`$PKG_CONFIG --cflags "gobject-2.0 >= 2.0" 2>&5` &&
11088 GOBJECT_LIBS=`$PKG_CONFIG --libs "gobject-2.0 >= 2.0" 2>&5`; then
11089 edit_cflags="
11090 s,///*,/,g
11091 s/^/ /
11092 s/ -I/ $isystem/g
11093 s/^ //
11094 "
11095 GOBJECT_CFLAGS=`$as_echo "$GOBJECT_CFLAGS" | sed -e "$edit_cflags"`
11096 GOBJECT_LIBS=`$as_echo "$GOBJECT_LIBS" | sed -e 's,///*,/,g'`
11097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GOBJECT_CFLAGS' LIBS='$GOBJECT_LIBS'" >&5
11098 $as_echo "yes CFLAGS='$GOBJECT_CFLAGS' LIBS='$GOBJECT_LIBS'" >&6; }
11099 succeeded=yes
11100 else
11101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11102 $as_echo "no" >&6; }
11103 GOBJECT_CFLAGS=""
11104 GOBJECT_LIBS=""
11105 ## If we have a custom action on failure, don't print errors, but
11106 ## do set a variable so people can do so. Do it in a subshell
11107 ## to capture any diagnostics in invoking pkg-config.
11108 GOBJECT_PKG_ERRORS=`($PKG_CONFIG --print-errors "gobject-2.0 >= 2.0") 2>&1`
11109
11110 fi
11111
11112
11113
11114 else
11115 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11116 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11117 fi
11118 fi
11119
11120 if test $succeeded = yes; then
11121 HAVE_GOBJECT=yes
11122 else
11123 HAVE_GOBJECT=no
11124 fi
11125
11126 if test "$HAVE_GOBJECT" = "yes"; then
11127 SETTINGS_CFLAGS="$SETTINGS_CFLAGS $GOBJECT_CFLAGS"
11128 SETTINGS_LIBS="$SETTINGS_LIBS $GOBJECT_LIBS"
11129 fi
11130 SAVE_CFLAGS="$CFLAGS"
11131 SAVE_LIBS="$LIBS"
11132 CFLAGS="$SETTINGS_CFLAGS $CFLAGS"
11133 LIBS="$SETTINGS_LIBS $LIBS"
11134 for ac_func in g_type_init
11135 do :
11136 ac_fn_c_check_func "$LINENO" "g_type_init" "ac_cv_func_g_type_init"
11137 if test "x$ac_cv_func_g_type_init" = x""yes; then :
11138 cat >>confdefs.h <<_ACEOF
11139 #define HAVE_G_TYPE_INIT 1
11140 _ACEOF
11141
11142 fi
11143 done
11144
11145 CFLAGS="$SAVE_CFLAGS"
11146 LIBS="$SAVE_LIBS"
11147 fi
11148
11149
11150
11151
11152 HAVE_LIBSELINUX=no
11153 LIBSELINUX_LIBS=
11154 if test "${with_selinux}" = "yes"; then
11155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lgetfilecon in -lselinux" >&5
11156 $as_echo_n "checking for lgetfilecon in -lselinux... " >&6; }
11157 if test "${ac_cv_lib_selinux_lgetfilecon+set}" = set; then :
11158 $as_echo_n "(cached) " >&6
11159 else
11160 ac_check_lib_save_LIBS=$LIBS
11161 LIBS="-lselinux $LIBS"
11162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11163 /* end confdefs.h. */
11164
11165 /* Override any GCC internal prototype to avoid an error.
11166 Use char because int might match the return type of a GCC
11167 builtin and then its argument prototype would still apply. */
11168 #ifdef __cplusplus
11169 extern "C"
11170 #endif
11171 char lgetfilecon ();
11172 int
11173 main ()
11174 {
11175 return lgetfilecon ();
11176 ;
11177 return 0;
11178 }
11179 _ACEOF
11180 if ac_fn_c_try_link "$LINENO"; then :
11181 ac_cv_lib_selinux_lgetfilecon=yes
11182 else
11183 ac_cv_lib_selinux_lgetfilecon=no
11184 fi
11185 rm -f core conftest.err conftest.$ac_objext \
11186 conftest$ac_exeext conftest.$ac_ext
11187 LIBS=$ac_check_lib_save_LIBS
11188 fi
11189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_lgetfilecon" >&5
11190 $as_echo "$ac_cv_lib_selinux_lgetfilecon" >&6; }
11191 if test "x$ac_cv_lib_selinux_lgetfilecon" = x""yes; then :
11192 HAVE_LIBSELINUX=yes
11193 else
11194 HAVE_LIBSELINUX=no
11195 fi
11196
11197 if test "$HAVE_LIBSELINUX" = yes; then
11198
11199 $as_echo "#define HAVE_LIBSELINUX 1" >>confdefs.h
11200
11201 LIBSELINUX_LIBS=-lselinux
11202 fi
11203 fi
11204
11205
11206 HAVE_GNUTLS=no
11207 HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY=no
11208 if test "${with_gnutls}" = "yes" ; then
11209
11210 succeeded=no
11211
11212 if test "$PKG_CONFIG" = "no" ; then
11213 HAVE_GNUTLS=no
11214 else
11215 PKG_CONFIG_MIN_VERSION=0.9.0
11216 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11217 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gnutls >= 2.6.6" >&5
11218 $as_echo_n "checking for gnutls >= 2.6.6... " >&6; }
11219
11220 if $PKG_CONFIG --exists "gnutls >= 2.6.6" 2>&5 &&
11221 LIBGNUTLS_CFLAGS=`$PKG_CONFIG --cflags "gnutls >= 2.6.6" 2>&5` &&
11222 LIBGNUTLS_LIBS=`$PKG_CONFIG --libs "gnutls >= 2.6.6" 2>&5`; then
11223 edit_cflags="
11224 s,///*,/,g
11225 s/^/ /
11226 s/ -I/ $isystem/g
11227 s/^ //
11228 "
11229 LIBGNUTLS_CFLAGS=`$as_echo "$LIBGNUTLS_CFLAGS" | sed -e "$edit_cflags"`
11230 LIBGNUTLS_LIBS=`$as_echo "$LIBGNUTLS_LIBS" | sed -e 's,///*,/,g'`
11231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBGNUTLS_CFLAGS' LIBS='$LIBGNUTLS_LIBS'" >&5
11232 $as_echo "yes CFLAGS='$LIBGNUTLS_CFLAGS' LIBS='$LIBGNUTLS_LIBS'" >&6; }
11233 succeeded=yes
11234 else
11235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11236 $as_echo "no" >&6; }
11237 LIBGNUTLS_CFLAGS=""
11238 LIBGNUTLS_LIBS=""
11239 ## If we have a custom action on failure, don't print errors, but
11240 ## do set a variable so people can do so. Do it in a subshell
11241 ## to capture any diagnostics in invoking pkg-config.
11242 LIBGNUTLS_PKG_ERRORS=`($PKG_CONFIG --print-errors "gnutls >= 2.6.6") 2>&1`
11243
11244 fi
11245
11246
11247
11248 else
11249 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11250 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11251 fi
11252 fi
11253
11254 if test $succeeded = yes; then
11255 HAVE_GNUTLS=yes
11256 else
11257 HAVE_GNUTLS=no
11258 fi
11259
11260 if test "${HAVE_GNUTLS}" = "yes"; then
11261
11262 $as_echo "#define HAVE_GNUTLS 1" >>confdefs.h
11263
11264 fi
11265
11266 CFLAGS="$CFLAGS $LIBGNUTLS_CFLAGS"
11267 LIBS="$LIBGNUTLS_LIBS $LIBS"
11268 for ac_func in gnutls_certificate_set_verify_function
11269 do :
11270 ac_fn_c_check_func "$LINENO" "gnutls_certificate_set_verify_function" "ac_cv_func_gnutls_certificate_set_verify_function"
11271 if test "x$ac_cv_func_gnutls_certificate_set_verify_function" = x""yes; then :
11272 cat >>confdefs.h <<_ACEOF
11273 #define HAVE_GNUTLS_CERTIFICATE_SET_VERIFY_FUNCTION 1
11274 _ACEOF
11275 HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY=yes
11276 fi
11277 done
11278
11279
11280 if test "${HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY}" = "yes"; then
11281
11282 $as_echo "#define HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY 1" >>confdefs.h
11283
11284 fi
11285 fi
11286
11287
11288
11289
11290 HAVE_XAW3D=no
11291 LUCID_LIBW=
11292 if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then
11293 if test "$with_xaw3d" != no; then
11294 if test "${emacs_cv_xaw3d+set}" = set; then :
11295 $as_echo_n "(cached) " >&6
11296 else
11297 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11298 /* end confdefs.h. */
11299
11300 #include <X11/Intrinsic.h>
11301 #include <X11/Xaw3d/Simple.h>
11302 int
11303 main ()
11304 {
11305
11306 ;
11307 return 0;
11308 }
11309 _ACEOF
11310 if ac_fn_c_try_link "$LINENO"; then :
11311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XawScrollbarSetThumb in -lXaw3d" >&5
11312 $as_echo_n "checking for XawScrollbarSetThumb in -lXaw3d... " >&6; }
11313 if test "${ac_cv_lib_Xaw3d_XawScrollbarSetThumb+set}" = set; then :
11314 $as_echo_n "(cached) " >&6
11315 else
11316 ac_check_lib_save_LIBS=$LIBS
11317 LIBS="-lXaw3d $LIBS"
11318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11319 /* end confdefs.h. */
11320
11321 /* Override any GCC internal prototype to avoid an error.
11322 Use char because int might match the return type of a GCC
11323 builtin and then its argument prototype would still apply. */
11324 #ifdef __cplusplus
11325 extern "C"
11326 #endif
11327 char XawScrollbarSetThumb ();
11328 int
11329 main ()
11330 {
11331 return XawScrollbarSetThumb ();
11332 ;
11333 return 0;
11334 }
11335 _ACEOF
11336 if ac_fn_c_try_link "$LINENO"; then :
11337 ac_cv_lib_Xaw3d_XawScrollbarSetThumb=yes
11338 else
11339 ac_cv_lib_Xaw3d_XawScrollbarSetThumb=no
11340 fi
11341 rm -f core conftest.err conftest.$ac_objext \
11342 conftest$ac_exeext conftest.$ac_ext
11343 LIBS=$ac_check_lib_save_LIBS
11344 fi
11345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&5
11346 $as_echo "$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&6; }
11347 if test "x$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" = x""yes; then :
11348 emacs_cv_xaw3d=yes
11349 else
11350 emacs_cv_xaw3d=no
11351 fi
11352
11353 else
11354 emacs_cv_xaw3d=no
11355 fi
11356 rm -f core conftest.err conftest.$ac_objext \
11357 conftest$ac_exeext conftest.$ac_ext
11358 fi
11359
11360 else
11361 emacs_cv_xaw3d=no
11362 fi
11363 if test $emacs_cv_xaw3d = yes; then
11364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xaw3d" >&5
11365 $as_echo_n "checking for xaw3d... " >&6; }
11366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5
11367 $as_echo "yes; using Lucid toolkit" >&6; }
11368 USE_X_TOOLKIT=LUCID
11369 HAVE_XAW3D=yes
11370 LUCID_LIBW=-lXaw3d
11371
11372 $as_echo "#define HAVE_XAW3D 1" >>confdefs.h
11373
11374 else
11375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xaw3d" >&5
11376 $as_echo_n "checking for xaw3d... " >&6; }
11377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11378 $as_echo "no" >&6; }
11379 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libXaw" >&5
11380 $as_echo_n "checking for libXaw... " >&6; }
11381 if test "${emacs_cv_xaw+set}" = set; then :
11382 $as_echo_n "(cached) " >&6
11383 else
11384 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11385 /* end confdefs.h. */
11386
11387 #include <X11/Intrinsic.h>
11388 #include <X11/Xaw/Simple.h>
11389 int
11390 main ()
11391 {
11392
11393 ;
11394 return 0;
11395 }
11396 _ACEOF
11397 if ac_fn_c_try_link "$LINENO"; then :
11398 emacs_cv_xaw=yes
11399 else
11400 emacs_cv_xaw=no
11401 fi
11402 rm -f core conftest.err conftest.$ac_objext \
11403 conftest$ac_exeext conftest.$ac_ext
11404 fi
11405
11406 if test $emacs_cv_xaw = yes; then
11407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5
11408 $as_echo "yes; using Lucid toolkit" >&6; }
11409 USE_X_TOOLKIT=LUCID
11410 LUCID_LIBW=-lXaw
11411 elif test x"${USE_X_TOOLKIT}" = xLUCID; then
11412 as_fn_error "Lucid toolkit requires X11/Xaw include files" "$LINENO" 5
11413 else
11414 as_fn_error "No X toolkit could be found.
11415 If you are sure you want Emacs compiled without an X toolkit, pass
11416 --with-x-toolkit=no
11417 to configure. Otherwise, install the development libraries for the toolkit
11418 that you want to use (e.g. Gtk+) and re-run configure." "$LINENO" 5
11419 fi
11420 fi
11421 fi
11422
11423 X_TOOLKIT_TYPE=$USE_X_TOOLKIT
11424
11425 LIBXTR6=
11426 if test "${USE_X_TOOLKIT}" != "none"; then
11427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 toolkit version" >&5
11428 $as_echo_n "checking X11 toolkit version... " >&6; }
11429 if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then :
11430 $as_echo_n "(cached) " >&6
11431 else
11432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11433 /* end confdefs.h. */
11434 #include <X11/Intrinsic.h>
11435 int
11436 main ()
11437 {
11438 #if XtSpecificationRelease < 6
11439 fail;
11440 #endif
11441
11442 ;
11443 return 0;
11444 }
11445 _ACEOF
11446 if ac_fn_c_try_link "$LINENO"; then :
11447 emacs_cv_x11_toolkit_version_6=yes
11448 else
11449 emacs_cv_x11_toolkit_version_6=no
11450 fi
11451 rm -f core conftest.err conftest.$ac_objext \
11452 conftest$ac_exeext conftest.$ac_ext
11453 fi
11454
11455 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
11456 if test $emacs_cv_x11_toolkit_version_6 = yes; then
11457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5
11458 $as_echo "6 or newer" >&6; }
11459
11460 $as_echo "#define HAVE_X11XTR6 1" >>confdefs.h
11461
11462 LIBXTR6="-lSM -lICE"
11463 case "$opsys" in
11464 ## Use libw.a along with X11R6 Xt.
11465 unixware) LIBXTR6="$LIBXTR6 -lw" ;;
11466 esac
11467 else
11468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5
11469 $as_echo "before 6" >&6; }
11470 fi
11471
11472 OLDLIBS="$LIBS"
11473 if test x$HAVE_X11XTR6 = xyes; then
11474 LIBS="-lXt -lSM -lICE $LIBS"
11475 else
11476 LIBS="-lXt $LIBS"
11477 fi
11478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XmuConvertStandardSelection in -lXmu" >&5
11479 $as_echo_n "checking for XmuConvertStandardSelection in -lXmu... " >&6; }
11480 if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then :
11481 $as_echo_n "(cached) " >&6
11482 else
11483 ac_check_lib_save_LIBS=$LIBS
11484 LIBS="-lXmu $LIBS"
11485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11486 /* end confdefs.h. */
11487
11488 /* Override any GCC internal prototype to avoid an error.
11489 Use char because int might match the return type of a GCC
11490 builtin and then its argument prototype would still apply. */
11491 #ifdef __cplusplus
11492 extern "C"
11493 #endif
11494 char XmuConvertStandardSelection ();
11495 int
11496 main ()
11497 {
11498 return XmuConvertStandardSelection ();
11499 ;
11500 return 0;
11501 }
11502 _ACEOF
11503 if ac_fn_c_try_link "$LINENO"; then :
11504 ac_cv_lib_Xmu_XmuConvertStandardSelection=yes
11505 else
11506 ac_cv_lib_Xmu_XmuConvertStandardSelection=no
11507 fi
11508 rm -f core conftest.err conftest.$ac_objext \
11509 conftest$ac_exeext conftest.$ac_ext
11510 LIBS=$ac_check_lib_save_LIBS
11511 fi
11512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5
11513 $as_echo "$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6; }
11514 if test "x$ac_cv_lib_Xmu_XmuConvertStandardSelection" = x""yes; then :
11515 cat >>confdefs.h <<_ACEOF
11516 #define HAVE_LIBXMU 1
11517 _ACEOF
11518
11519 LIBS="-lXmu $LIBS"
11520
11521 fi
11522
11523 test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
11524 fi
11525
11526
11527 LIBXMU=-lXmu
11528 case $opsys in
11529 ## These systems don't supply Xmu.
11530 hpux* | aix4-2 )
11531 test "X$ac_cv_lib_Xmu_XmuConvertStandardSelection" != "Xyes" && LIBXMU=
11532 ;;
11533 esac
11534
11535
11536 # On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
11537 if test "${HAVE_X11}" = "yes"; then
11538 if test "${USE_X_TOOLKIT}" != "none"; then
11539 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XShapeQueryExtension in -lXext" >&5
11540 $as_echo_n "checking for XShapeQueryExtension in -lXext... " >&6; }
11541 if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then :
11542 $as_echo_n "(cached) " >&6
11543 else
11544 ac_check_lib_save_LIBS=$LIBS
11545 LIBS="-lXext $LIBS"
11546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11547 /* end confdefs.h. */
11548
11549 /* Override any GCC internal prototype to avoid an error.
11550 Use char because int might match the return type of a GCC
11551 builtin and then its argument prototype would still apply. */
11552 #ifdef __cplusplus
11553 extern "C"
11554 #endif
11555 char XShapeQueryExtension ();
11556 int
11557 main ()
11558 {
11559 return XShapeQueryExtension ();
11560 ;
11561 return 0;
11562 }
11563 _ACEOF
11564 if ac_fn_c_try_link "$LINENO"; then :
11565 ac_cv_lib_Xext_XShapeQueryExtension=yes
11566 else
11567 ac_cv_lib_Xext_XShapeQueryExtension=no
11568 fi
11569 rm -f core conftest.err conftest.$ac_objext \
11570 conftest$ac_exeext conftest.$ac_ext
11571 LIBS=$ac_check_lib_save_LIBS
11572 fi
11573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
11574 $as_echo "$ac_cv_lib_Xext_XShapeQueryExtension" >&6; }
11575 if test "x$ac_cv_lib_Xext_XShapeQueryExtension" = x""yes; then :
11576 cat >>confdefs.h <<_ACEOF
11577 #define HAVE_LIBXEXT 1
11578 _ACEOF
11579
11580 LIBS="-lXext $LIBS"
11581
11582 fi
11583
11584 fi
11585 fi
11586
11587 LIBXP=
11588 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
11589 # OpenMotif may be installed in such a way on some GNU/Linux systems.
11590 if test -d /usr/include/openmotif; then
11591 CPPFLAGS="-I/usr/include/openmotif $CPPFLAGS"
11592 emacs_cv_openmotif=yes
11593 case "$canonical" in
11594 x86_64-*-linux-gnu* | powerpc64-*-linux-gnu* | sparc64-*-linux-gnu*)
11595 test -d /usr/lib64/openmotif && LDFLAGS="-L/usr/lib64/openmotif $LDFLAGS"
11596 ;;
11597 *)
11598 test -d /usr/lib/openmotif && LDFLAGS="-L/usr/lib/openmotif $LDFLAGS"
11599 esac
11600 else
11601 emacs_cv_openmotif=no
11602 fi
11603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for (Open)Motif version 2.1" >&5
11604 $as_echo_n "checking for (Open)Motif version 2.1... " >&6; }
11605 if test "${emacs_cv_motif_version_2_1+set}" = set; then :
11606 $as_echo_n "(cached) " >&6
11607 else
11608 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11609 /* end confdefs.h. */
11610 #include <Xm/Xm.h>
11611 int
11612 main ()
11613 {
11614 #if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
11615 int x = 5;
11616 #else
11617 Motif version prior to 2.1.
11618 #endif
11619 ;
11620 return 0;
11621 }
11622 _ACEOF
11623 if ac_fn_c_try_compile "$LINENO"; then :
11624 emacs_cv_motif_version_2_1=yes
11625 else
11626 emacs_cv_motif_version_2_1=no
11627 fi
11628 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11629 fi
11630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_motif_version_2_1" >&5
11631 $as_echo "$emacs_cv_motif_version_2_1" >&6; }
11632 if test $emacs_cv_motif_version_2_1 = yes; then
11633 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpCreateContext in -lXp" >&5
11634 $as_echo_n "checking for XpCreateContext in -lXp... " >&6; }
11635 if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then :
11636 $as_echo_n "(cached) " >&6
11637 else
11638 ac_check_lib_save_LIBS=$LIBS
11639 LIBS="-lXp $LIBS"
11640 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11641 /* end confdefs.h. */
11642
11643 /* Override any GCC internal prototype to avoid an error.
11644 Use char because int might match the return type of a GCC
11645 builtin and then its argument prototype would still apply. */
11646 #ifdef __cplusplus
11647 extern "C"
11648 #endif
11649 char XpCreateContext ();
11650 int
11651 main ()
11652 {
11653 return XpCreateContext ();
11654 ;
11655 return 0;
11656 }
11657 _ACEOF
11658 if ac_fn_c_try_link "$LINENO"; then :
11659 ac_cv_lib_Xp_XpCreateContext=yes
11660 else
11661 ac_cv_lib_Xp_XpCreateContext=no
11662 fi
11663 rm -f core conftest.err conftest.$ac_objext \
11664 conftest$ac_exeext conftest.$ac_ext
11665 LIBS=$ac_check_lib_save_LIBS
11666 fi
11667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xp_XpCreateContext" >&5
11668 $as_echo "$ac_cv_lib_Xp_XpCreateContext" >&6; }
11669 if test "x$ac_cv_lib_Xp_XpCreateContext" = x""yes; then :
11670 LIBXP=-lXp
11671 fi
11672
11673 if test x$emacs_cv_openmotif = xyes; then
11674 REAL_CPPFLAGS="-I/usr/include/openmotif $REAL_CPPFLAGS"
11675 fi
11676 else
11677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LessTif where some systems put it" >&5
11678 $as_echo_n "checking for LessTif where some systems put it... " >&6; }
11679 if test "${emacs_cv_lesstif+set}" = set; then :
11680 $as_echo_n "(cached) " >&6
11681 else
11682 # We put this in CFLAGS temporarily to precede other -I options
11683 # that might be in CFLAGS temporarily.
11684 # We put this in CPPFLAGS where it precedes the other -I options.
11685 OLD_CPPFLAGS=$CPPFLAGS
11686 OLD_CFLAGS=$CFLAGS
11687 CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS"
11688 CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS"
11689 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11690 /* end confdefs.h. */
11691 #include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h>
11692 int
11693 main ()
11694 {
11695 int x = 5;
11696 ;
11697 return 0;
11698 }
11699 _ACEOF
11700 if ac_fn_c_try_compile "$LINENO"; then :
11701 emacs_cv_lesstif=yes
11702 else
11703 emacs_cv_lesstif=no
11704 fi
11705 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11706 fi
11707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_lesstif" >&5
11708 $as_echo "$emacs_cv_lesstif" >&6; }
11709 if test $emacs_cv_lesstif = yes; then
11710 # Make sure this -I option remains in CPPFLAGS after it is set
11711 # back to REAL_CPPFLAGS.
11712 # There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not
11713 # have those other -I options anyway. Ultimately, having this
11714 # directory ultimately in CPPFLAGS will be enough.
11715 REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS"
11716 LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS"
11717 else
11718 CFLAGS=$OLD_CFLAGS
11719 CPPFLAGS=$OLD_CPPFLAGS
11720 fi
11721 fi
11722 ac_fn_c_check_header_mongrel "$LINENO" "Xm/BulletinB.h" "ac_cv_header_Xm_BulletinB_h" "$ac_includes_default"
11723 if test "x$ac_cv_header_Xm_BulletinB_h" = x""yes; then :
11724
11725 else
11726 as_fn_error "Motif toolkit requested but requirements not found." "$LINENO" 5
11727 fi
11728
11729
11730 fi
11731
11732
11733 USE_TOOLKIT_SCROLL_BARS=no
11734 if test "${with_toolkit_scroll_bars}" != "no"; then
11735 if test "${USE_X_TOOLKIT}" != "none"; then
11736 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
11737 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
11738
11739 HAVE_XAW3D=no
11740 USE_TOOLKIT_SCROLL_BARS=yes
11741 elif test "${HAVE_XAW3D}" = "yes" || test "${USE_X_TOOLKIT}" = "LUCID"; then
11742 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
11743
11744 USE_TOOLKIT_SCROLL_BARS=yes
11745 fi
11746 elif test "${HAVE_GTK}" = "yes"; then
11747 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
11748
11749 USE_TOOLKIT_SCROLL_BARS=yes
11750 elif test "${HAVE_NS}" = "yes"; then
11751 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
11752
11753 USE_TOOLKIT_SCROLL_BARS=yes
11754 elif test "${HAVE_W32}" = "yes"; then
11755 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
11756
11757 USE_TOOLKIT_SCROLL_BARS=yes
11758 fi
11759 fi
11760
11761 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11762 /* end confdefs.h. */
11763
11764 #include <X11/Xlib.h>
11765 #include <X11/Xresource.h>
11766 int
11767 main ()
11768 {
11769 XIMProc callback;
11770 ;
11771 return 0;
11772 }
11773 _ACEOF
11774 if ac_fn_c_try_compile "$LINENO"; then :
11775 HAVE_XIM=yes
11776
11777 $as_echo "#define HAVE_XIM 1" >>confdefs.h
11778
11779 else
11780 HAVE_XIM=no
11781 fi
11782 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11783
11784
11785 if test "${with_xim}" != "no"; then
11786
11787 $as_echo "#define USE_XIM 1" >>confdefs.h
11788
11789 fi
11790
11791
11792 if test "${HAVE_XIM}" != "no"; then
11793 late_CFLAGS=$CFLAGS
11794 if test "$GCC" = yes; then
11795 CFLAGS="$CFLAGS --pedantic-errors"
11796 fi
11797 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11798 /* end confdefs.h. */
11799
11800 #include <X11/Xlib.h>
11801 #include <X11/Xresource.h>
11802 int
11803 main ()
11804 {
11805 Display *display;
11806 XrmDatabase db;
11807 char *res_name;
11808 char *res_class;
11809 XIMProc callback;
11810 XPointer *client_data;
11811 #ifndef __GNUC__
11812 /* If we're not using GCC, it's probably not XFree86, and this is
11813 probably right, but we can't use something like --pedantic-errors. */
11814 extern Bool XRegisterIMInstantiateCallback(Display*, XrmDatabase, char*,
11815 char*, XIMProc, XPointer*);
11816 #endif
11817 (void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, callback,
11818 client_data);
11819 ;
11820 return 0;
11821 }
11822 _ACEOF
11823 if ac_fn_c_try_compile "$LINENO"; then :
11824 emacs_cv_arg6_star=yes
11825 fi
11826 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11827 if test "$emacs_cv_arg6_star" = yes; then
11828 $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer*" >>confdefs.h
11829
11830 else
11831 $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer" >>confdefs.h
11832
11833 fi
11834 CFLAGS=$late_CFLAGS
11835 fi
11836
11837 ### Start of font-backend (under any platform) section.
11838 # (nothing here yet -- this is a placeholder)
11839 ### End of font-backend (under any platform) section.
11840
11841 ### Start of font-backend (under X11) section.
11842 if test "${HAVE_X11}" = "yes"; then
11843
11844 succeeded=no
11845
11846 if test "$PKG_CONFIG" = "no" ; then
11847 HAVE_FC=no
11848 else
11849 PKG_CONFIG_MIN_VERSION=0.9.0
11850 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11851 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fontconfig >= 2.2.0" >&5
11852 $as_echo_n "checking for fontconfig >= 2.2.0... " >&6; }
11853
11854 if $PKG_CONFIG --exists "fontconfig >= 2.2.0" 2>&5 &&
11855 FONTCONFIG_CFLAGS=`$PKG_CONFIG --cflags "fontconfig >= 2.2.0" 2>&5` &&
11856 FONTCONFIG_LIBS=`$PKG_CONFIG --libs "fontconfig >= 2.2.0" 2>&5`; then
11857 edit_cflags="
11858 s,///*,/,g
11859 s/^/ /
11860 s/ -I/ $isystem/g
11861 s/^ //
11862 "
11863 FONTCONFIG_CFLAGS=`$as_echo "$FONTCONFIG_CFLAGS" | sed -e "$edit_cflags"`
11864 FONTCONFIG_LIBS=`$as_echo "$FONTCONFIG_LIBS" | sed -e 's,///*,/,g'`
11865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$FONTCONFIG_CFLAGS' LIBS='$FONTCONFIG_LIBS'" >&5
11866 $as_echo "yes CFLAGS='$FONTCONFIG_CFLAGS' LIBS='$FONTCONFIG_LIBS'" >&6; }
11867 succeeded=yes
11868 else
11869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11870 $as_echo "no" >&6; }
11871 FONTCONFIG_CFLAGS=""
11872 FONTCONFIG_LIBS=""
11873 ## If we have a custom action on failure, don't print errors, but
11874 ## do set a variable so people can do so. Do it in a subshell
11875 ## to capture any diagnostics in invoking pkg-config.
11876 FONTCONFIG_PKG_ERRORS=`($PKG_CONFIG --print-errors "fontconfig >= 2.2.0") 2>&1`
11877
11878 fi
11879
11880
11881
11882 else
11883 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11884 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11885 fi
11886 fi
11887
11888 if test $succeeded = yes; then
11889 HAVE_FC=yes
11890 else
11891 HAVE_FC=no
11892 fi
11893
11894
11895 ## Use -lXft if available, unless `--with-xft=no'.
11896 HAVE_XFT=maybe
11897 if test "${HAVE_FC}" = "no" || test "x${with_x}" = "xno"; then
11898 with_xft="no";
11899 fi
11900 if test "x${with_xft}" != "xno"; then
11901
11902
11903 succeeded=no
11904
11905 if test "$PKG_CONFIG" = "no" ; then
11906 HAVE_XFT=no
11907 else
11908 PKG_CONFIG_MIN_VERSION=0.9.0
11909 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11910 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xft >= 0.13.0" >&5
11911 $as_echo_n "checking for xft >= 0.13.0... " >&6; }
11912
11913 if $PKG_CONFIG --exists "xft >= 0.13.0" 2>&5 &&
11914 XFT_CFLAGS=`$PKG_CONFIG --cflags "xft >= 0.13.0" 2>&5` &&
11915 XFT_LIBS=`$PKG_CONFIG --libs "xft >= 0.13.0" 2>&5`; then
11916 edit_cflags="
11917 s,///*,/,g
11918 s/^/ /
11919 s/ -I/ $isystem/g
11920 s/^ //
11921 "
11922 XFT_CFLAGS=`$as_echo "$XFT_CFLAGS" | sed -e "$edit_cflags"`
11923 XFT_LIBS=`$as_echo "$XFT_LIBS" | sed -e 's,///*,/,g'`
11924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$XFT_CFLAGS' LIBS='$XFT_LIBS'" >&5
11925 $as_echo "yes CFLAGS='$XFT_CFLAGS' LIBS='$XFT_LIBS'" >&6; }
11926 succeeded=yes
11927 else
11928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11929 $as_echo "no" >&6; }
11930 XFT_CFLAGS=""
11931 XFT_LIBS=""
11932 ## If we have a custom action on failure, don't print errors, but
11933 ## do set a variable so people can do so. Do it in a subshell
11934 ## to capture any diagnostics in invoking pkg-config.
11935 XFT_PKG_ERRORS=`($PKG_CONFIG --print-errors "xft >= 0.13.0") 2>&1`
11936
11937 fi
11938
11939
11940
11941 else
11942 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11943 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11944 fi
11945 fi
11946
11947 if test $succeeded = yes; then
11948 :
11949 else
11950 HAVE_XFT=no
11951 fi
11952
11953 ## Because xftfont.c uses XRenderQueryExtension, we also
11954 ## need to link to -lXrender.
11955 HAVE_XRENDER=no
11956 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRenderQueryExtension in -lXrender" >&5
11957 $as_echo_n "checking for XRenderQueryExtension in -lXrender... " >&6; }
11958 if test "${ac_cv_lib_Xrender_XRenderQueryExtension+set}" = set; then :
11959 $as_echo_n "(cached) " >&6
11960 else
11961 ac_check_lib_save_LIBS=$LIBS
11962 LIBS="-lXrender $LIBS"
11963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11964 /* end confdefs.h. */
11965
11966 /* Override any GCC internal prototype to avoid an error.
11967 Use char because int might match the return type of a GCC
11968 builtin and then its argument prototype would still apply. */
11969 #ifdef __cplusplus
11970 extern "C"
11971 #endif
11972 char XRenderQueryExtension ();
11973 int
11974 main ()
11975 {
11976 return XRenderQueryExtension ();
11977 ;
11978 return 0;
11979 }
11980 _ACEOF
11981 if ac_fn_c_try_link "$LINENO"; then :
11982 ac_cv_lib_Xrender_XRenderQueryExtension=yes
11983 else
11984 ac_cv_lib_Xrender_XRenderQueryExtension=no
11985 fi
11986 rm -f core conftest.err conftest.$ac_objext \
11987 conftest$ac_exeext conftest.$ac_ext
11988 LIBS=$ac_check_lib_save_LIBS
11989 fi
11990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrender_XRenderQueryExtension" >&5
11991 $as_echo "$ac_cv_lib_Xrender_XRenderQueryExtension" >&6; }
11992 if test "x$ac_cv_lib_Xrender_XRenderQueryExtension" = x""yes; then :
11993 HAVE_XRENDER=yes
11994 fi
11995
11996 if test "$HAVE_XFT" != no && test "$HAVE_XRENDER" != no; then
11997 OLD_CPPFLAGS="$CPPFLAGS"
11998 OLD_CFLAGS="$CFLAGS"
11999 OLD_LIBS="$LIBS"
12000 CPPFLAGS="$CPPFLAGS $XFT_CFLAGS"
12001 CFLAGS="$CFLAGS $XFT_CFLAGS"
12002 XFT_LIBS="-lXrender $XFT_LIBS"
12003 LIBS="$XFT_LIBS $LIBS"
12004 ac_fn_c_check_header_mongrel "$LINENO" "X11/Xft/Xft.h" "ac_cv_header_X11_Xft_Xft_h" "$ac_includes_default"
12005 if test "x$ac_cv_header_X11_Xft_Xft_h" = x""yes; then :
12006 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XftFontOpen in -lXft" >&5
12007 $as_echo_n "checking for XftFontOpen in -lXft... " >&6; }
12008 if test "${ac_cv_lib_Xft_XftFontOpen+set}" = set; then :
12009 $as_echo_n "(cached) " >&6
12010 else
12011 ac_check_lib_save_LIBS=$LIBS
12012 LIBS="-lXft $XFT_LIBS $LIBS"
12013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12014 /* end confdefs.h. */
12015
12016 /* Override any GCC internal prototype to avoid an error.
12017 Use char because int might match the return type of a GCC
12018 builtin and then its argument prototype would still apply. */
12019 #ifdef __cplusplus
12020 extern "C"
12021 #endif
12022 char XftFontOpen ();
12023 int
12024 main ()
12025 {
12026 return XftFontOpen ();
12027 ;
12028 return 0;
12029 }
12030 _ACEOF
12031 if ac_fn_c_try_link "$LINENO"; then :
12032 ac_cv_lib_Xft_XftFontOpen=yes
12033 else
12034 ac_cv_lib_Xft_XftFontOpen=no
12035 fi
12036 rm -f core conftest.err conftest.$ac_objext \
12037 conftest$ac_exeext conftest.$ac_ext
12038 LIBS=$ac_check_lib_save_LIBS
12039 fi
12040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xft_XftFontOpen" >&5
12041 $as_echo "$ac_cv_lib_Xft_XftFontOpen" >&6; }
12042 if test "x$ac_cv_lib_Xft_XftFontOpen" = x""yes; then :
12043 HAVE_XFT=yes
12044 fi
12045
12046 fi
12047
12048
12049
12050 if test "${HAVE_XFT}" = "yes"; then
12051
12052 $as_echo "#define HAVE_XFT 1" >>confdefs.h
12053
12054
12055 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $XFT_CFLAGS"
12056 else
12057 CPPFLAGS="$OLD_CPPFLAGS"
12058 CFLAGS="$OLD_CFLAGS"
12059 LIBS="$OLD_LIBS"
12060 fi # "${HAVE_XFT}" = "yes"
12061 fi # "$HAVE_XFT" != no
12062 fi # "x${with_xft}" != "xno"
12063
12064 ## We used to allow building with FreeType and without Xft.
12065 ## However, the ftx font backend driver is not in good shape.
12066 if test "$HAVE_XFT" != "yes"; then
12067 HAVE_XFT=no
12068 HAVE_FREETYPE=no
12069 else
12070
12071 succeeded=no
12072
12073 if test "$PKG_CONFIG" = "no" ; then
12074 HAVE_FREETYPE=no
12075 else
12076 PKG_CONFIG_MIN_VERSION=0.9.0
12077 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
12078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype2" >&5
12079 $as_echo_n "checking for freetype2... " >&6; }
12080
12081 if $PKG_CONFIG --exists "freetype2" 2>&5 &&
12082 FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>&5` &&
12083 FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>&5`; then
12084 edit_cflags="
12085 s,///*,/,g
12086 s/^/ /
12087 s/ -I/ $isystem/g
12088 s/^ //
12089 "
12090 FREETYPE_CFLAGS=`$as_echo "$FREETYPE_CFLAGS" | sed -e "$edit_cflags"`
12091 FREETYPE_LIBS=`$as_echo "$FREETYPE_LIBS" | sed -e 's,///*,/,g'`
12092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$FREETYPE_CFLAGS' LIBS='$FREETYPE_LIBS'" >&5
12093 $as_echo "yes CFLAGS='$FREETYPE_CFLAGS' LIBS='$FREETYPE_LIBS'" >&6; }
12094 succeeded=yes
12095 else
12096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12097 $as_echo "no" >&6; }
12098 FREETYPE_CFLAGS=""
12099 FREETYPE_LIBS=""
12100 ## If we have a custom action on failure, don't print errors, but
12101 ## do set a variable so people can do so. Do it in a subshell
12102 ## to capture any diagnostics in invoking pkg-config.
12103 FREETYPE_PKG_ERRORS=`($PKG_CONFIG --print-errors "freetype2") 2>&1`
12104
12105 fi
12106
12107
12108
12109 else
12110 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12111 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12112 fi
12113 fi
12114
12115 if test $succeeded = yes; then
12116 HAVE_FREETYPE=yes
12117 else
12118 HAVE_FREETYPE=no
12119 fi
12120
12121
12122 test "$HAVE_FREETYPE" = "no" && as_fn_error "libxft requires libfreetype" "$LINENO" 5
12123 fi
12124
12125 HAVE_LIBOTF=no
12126 if test "${HAVE_FREETYPE}" = "yes"; then
12127
12128 $as_echo "#define HAVE_FREETYPE 1" >>confdefs.h
12129
12130 if test "${with_libotf}" != "no"; then
12131
12132 succeeded=no
12133
12134 if test "$PKG_CONFIG" = "no" ; then
12135 HAVE_LIBOTF=no
12136 else
12137 PKG_CONFIG_MIN_VERSION=0.9.0
12138 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
12139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libotf" >&5
12140 $as_echo_n "checking for libotf... " >&6; }
12141
12142 if $PKG_CONFIG --exists "libotf" 2>&5 &&
12143 LIBOTF_CFLAGS=`$PKG_CONFIG --cflags "libotf" 2>&5` &&
12144 LIBOTF_LIBS=`$PKG_CONFIG --libs "libotf" 2>&5`; then
12145 edit_cflags="
12146 s,///*,/,g
12147 s/^/ /
12148 s/ -I/ $isystem/g
12149 s/^ //
12150 "
12151 LIBOTF_CFLAGS=`$as_echo "$LIBOTF_CFLAGS" | sed -e "$edit_cflags"`
12152 LIBOTF_LIBS=`$as_echo "$LIBOTF_LIBS" | sed -e 's,///*,/,g'`
12153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBOTF_CFLAGS' LIBS='$LIBOTF_LIBS'" >&5
12154 $as_echo "yes CFLAGS='$LIBOTF_CFLAGS' LIBS='$LIBOTF_LIBS'" >&6; }
12155 succeeded=yes
12156 else
12157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12158 $as_echo "no" >&6; }
12159 LIBOTF_CFLAGS=""
12160 LIBOTF_LIBS=""
12161 ## If we have a custom action on failure, don't print errors, but
12162 ## do set a variable so people can do so. Do it in a subshell
12163 ## to capture any diagnostics in invoking pkg-config.
12164 LIBOTF_PKG_ERRORS=`($PKG_CONFIG --print-errors "libotf") 2>&1`
12165
12166 fi
12167
12168
12169
12170 else
12171 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12172 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12173 fi
12174 fi
12175
12176 if test $succeeded = yes; then
12177 HAVE_LIBOTF=yes
12178 else
12179 HAVE_LIBOTF=no
12180 fi
12181
12182 if test "$HAVE_LIBOTF" = "yes"; then
12183
12184 $as_echo "#define HAVE_LIBOTF 1" >>confdefs.h
12185
12186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTF_get_variation_glyphs in -lotf" >&5
12187 $as_echo_n "checking for OTF_get_variation_glyphs in -lotf... " >&6; }
12188 if test "${ac_cv_lib_otf_OTF_get_variation_glyphs+set}" = set; then :
12189 $as_echo_n "(cached) " >&6
12190 else
12191 ac_check_lib_save_LIBS=$LIBS
12192 LIBS="-lotf $LIBS"
12193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12194 /* end confdefs.h. */
12195
12196 /* Override any GCC internal prototype to avoid an error.
12197 Use char because int might match the return type of a GCC
12198 builtin and then its argument prototype would still apply. */
12199 #ifdef __cplusplus
12200 extern "C"
12201 #endif
12202 char OTF_get_variation_glyphs ();
12203 int
12204 main ()
12205 {
12206 return OTF_get_variation_glyphs ();
12207 ;
12208 return 0;
12209 }
12210 _ACEOF
12211 if ac_fn_c_try_link "$LINENO"; then :
12212 ac_cv_lib_otf_OTF_get_variation_glyphs=yes
12213 else
12214 ac_cv_lib_otf_OTF_get_variation_glyphs=no
12215 fi
12216 rm -f core conftest.err conftest.$ac_objext \
12217 conftest$ac_exeext conftest.$ac_ext
12218 LIBS=$ac_check_lib_save_LIBS
12219 fi
12220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_otf_OTF_get_variation_glyphs" >&5
12221 $as_echo "$ac_cv_lib_otf_OTF_get_variation_glyphs" >&6; }
12222 if test "x$ac_cv_lib_otf_OTF_get_variation_glyphs" = x""yes; then :
12223 HAVE_OTF_GET_VARIATION_GLYPHS=yes
12224 else
12225 HAVE_OTF_GET_VARIATION_GLYPHS=no
12226 fi
12227
12228 if test "${HAVE_OTF_GET_VARIATION_GLYPHS}" = "yes"; then
12229
12230 $as_echo "#define HAVE_OTF_GET_VARIATION_GLYPHS 1" >>confdefs.h
12231
12232 fi
12233 fi
12234 fi
12235 fi
12236
12237 HAVE_M17N_FLT=no
12238 if test "${HAVE_LIBOTF}" = yes; then
12239 if test "${with_m17n_flt}" != "no"; then
12240
12241 succeeded=no
12242
12243 if test "$PKG_CONFIG" = "no" ; then
12244 HAVE_M17N_FLT=no
12245 else
12246 PKG_CONFIG_MIN_VERSION=0.9.0
12247 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
12248 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for m17n-flt" >&5
12249 $as_echo_n "checking for m17n-flt... " >&6; }
12250
12251 if $PKG_CONFIG --exists "m17n-flt" 2>&5 &&
12252 M17N_FLT_CFLAGS=`$PKG_CONFIG --cflags "m17n-flt" 2>&5` &&
12253 M17N_FLT_LIBS=`$PKG_CONFIG --libs "m17n-flt" 2>&5`; then
12254 edit_cflags="
12255 s,///*,/,g
12256 s/^/ /
12257 s/ -I/ $isystem/g
12258 s/^ //
12259 "
12260 M17N_FLT_CFLAGS=`$as_echo "$M17N_FLT_CFLAGS" | sed -e "$edit_cflags"`
12261 M17N_FLT_LIBS=`$as_echo "$M17N_FLT_LIBS" | sed -e 's,///*,/,g'`
12262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$M17N_FLT_CFLAGS' LIBS='$M17N_FLT_LIBS'" >&5
12263 $as_echo "yes CFLAGS='$M17N_FLT_CFLAGS' LIBS='$M17N_FLT_LIBS'" >&6; }
12264 succeeded=yes
12265 else
12266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12267 $as_echo "no" >&6; }
12268 M17N_FLT_CFLAGS=""
12269 M17N_FLT_LIBS=""
12270 ## If we have a custom action on failure, don't print errors, but
12271 ## do set a variable so people can do so. Do it in a subshell
12272 ## to capture any diagnostics in invoking pkg-config.
12273 M17N_FLT_PKG_ERRORS=`($PKG_CONFIG --print-errors "m17n-flt") 2>&1`
12274
12275 fi
12276
12277
12278
12279 else
12280 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12281 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12282 fi
12283 fi
12284
12285 if test $succeeded = yes; then
12286 HAVE_M17N_FLT=yes
12287 else
12288 HAVE_M17N_FLT=no
12289 fi
12290
12291 if test "$HAVE_M17N_FLT" = "yes"; then
12292
12293 $as_echo "#define HAVE_M17N_FLT 1" >>confdefs.h
12294
12295 fi
12296 fi
12297 fi
12298 else
12299 HAVE_XFT=no
12300 HAVE_FREETYPE=no
12301 HAVE_LIBOTF=no
12302 HAVE_M17N_FLT=no
12303 fi
12304
12305 ### End of font-backend (under X11) section.
12306
12307
12308
12309
12310
12311
12312
12313
12314
12315
12316 ### Use -lXpm if available, unless `--with-xpm=no'.
12317 HAVE_XPM=no
12318 LIBXPM=
12319
12320 if test "${HAVE_W32}" = "yes"; then
12321 if test "${with_xpm}" != "no"; then
12322 SAVE_CPPFLAGS="$CPPFLAGS"
12323 SAVE_LDFLAGS="$LDFLAGS"
12324 CPPFLAGS="$CPPFLAGS -I/usr/include/noX"
12325 LDFLAGS="$LDFLAGS -L/usr/lib/noX"
12326 ac_fn_c_check_header_mongrel "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "$ac_includes_default"
12327 if test "x$ac_cv_header_X11_xpm_h" = x""yes; then :
12328 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReadFileToImage in -lXpm" >&5
12329 $as_echo_n "checking for XpmReadFileToImage in -lXpm... " >&6; }
12330 if test "${ac_cv_lib_Xpm_XpmReadFileToImage+set}" = set; then :
12331 $as_echo_n "(cached) " >&6
12332 else
12333 ac_check_lib_save_LIBS=$LIBS
12334 LIBS="-lXpm $LIBS"
12335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12336 /* end confdefs.h. */
12337
12338 /* Override any GCC internal prototype to avoid an error.
12339 Use char because int might match the return type of a GCC
12340 builtin and then its argument prototype would still apply. */
12341 #ifdef __cplusplus
12342 extern "C"
12343 #endif
12344 char XpmReadFileToImage ();
12345 int
12346 main ()
12347 {
12348 return XpmReadFileToImage ();
12349 ;
12350 return 0;
12351 }
12352 _ACEOF
12353 if ac_fn_c_try_link "$LINENO"; then :
12354 ac_cv_lib_Xpm_XpmReadFileToImage=yes
12355 else
12356 ac_cv_lib_Xpm_XpmReadFileToImage=no
12357 fi
12358 rm -f core conftest.err conftest.$ac_objext \
12359 conftest$ac_exeext conftest.$ac_ext
12360 LIBS=$ac_check_lib_save_LIBS
12361 fi
12362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmReadFileToImage" >&5
12363 $as_echo "$ac_cv_lib_Xpm_XpmReadFileToImage" >&6; }
12364 if test "x$ac_cv_lib_Xpm_XpmReadFileToImage" = x""yes; then :
12365 HAVE_XPM=yes
12366 fi
12367
12368 fi
12369
12370
12371 if test "${HAVE_XPM}" = "yes"; then
12372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReturnAllocPixels preprocessor define" >&5
12373 $as_echo_n "checking for XpmReturnAllocPixels preprocessor define... " >&6; }
12374 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12375 /* end confdefs.h. */
12376 #include "X11/xpm.h"
12377 #ifndef XpmReturnAllocPixels
12378 no_return_alloc_pixels
12379 #endif
12380
12381 _ACEOF
12382 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12383 $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then :
12384 HAVE_XPM=no
12385 else
12386 HAVE_XPM=yes
12387 fi
12388 rm -f conftest*
12389
12390
12391 if test "${HAVE_XPM}" = "yes"; then
12392 REAL_CPPFLAGS="$REAL_CPPFLAGS -I/usr/include/noX"
12393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12394 $as_echo "yes" >&6; }
12395 else
12396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12397 $as_echo "no" >&6; }
12398 CPPFLAGS="$SAVE_CPPFLAGS"
12399 LDFLAGS="$SAVE_LDFLAGS"
12400 fi
12401 fi
12402 fi
12403
12404 if test "${HAVE_XPM}" = "yes"; then
12405
12406 $as_echo "#define HAVE_XPM 1" >>confdefs.h
12407
12408 LIBXPM=-lXpm
12409 fi
12410 fi
12411
12412 if test "${HAVE_X11}" = "yes"; then
12413 if test "${with_xpm}" != "no"; then
12414 ac_fn_c_check_header_mongrel "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "$ac_includes_default"
12415 if test "x$ac_cv_header_X11_xpm_h" = x""yes; then :
12416 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReadFileToPixmap in -lXpm" >&5
12417 $as_echo_n "checking for XpmReadFileToPixmap in -lXpm... " >&6; }
12418 if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then :
12419 $as_echo_n "(cached) " >&6
12420 else
12421 ac_check_lib_save_LIBS=$LIBS
12422 LIBS="-lXpm -lX11 $LIBS"
12423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12424 /* end confdefs.h. */
12425
12426 /* Override any GCC internal prototype to avoid an error.
12427 Use char because int might match the return type of a GCC
12428 builtin and then its argument prototype would still apply. */
12429 #ifdef __cplusplus
12430 extern "C"
12431 #endif
12432 char XpmReadFileToPixmap ();
12433 int
12434 main ()
12435 {
12436 return XpmReadFileToPixmap ();
12437 ;
12438 return 0;
12439 }
12440 _ACEOF
12441 if ac_fn_c_try_link "$LINENO"; then :
12442 ac_cv_lib_Xpm_XpmReadFileToPixmap=yes
12443 else
12444 ac_cv_lib_Xpm_XpmReadFileToPixmap=no
12445 fi
12446 rm -f core conftest.err conftest.$ac_objext \
12447 conftest$ac_exeext conftest.$ac_ext
12448 LIBS=$ac_check_lib_save_LIBS
12449 fi
12450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5
12451 $as_echo "$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6; }
12452 if test "x$ac_cv_lib_Xpm_XpmReadFileToPixmap" = x""yes; then :
12453 HAVE_XPM=yes
12454 fi
12455
12456 fi
12457
12458
12459 if test "${HAVE_XPM}" = "yes"; then
12460 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReturnAllocPixels preprocessor define" >&5
12461 $as_echo_n "checking for XpmReturnAllocPixels preprocessor define... " >&6; }
12462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12463 /* end confdefs.h. */
12464 #include "X11/xpm.h"
12465 #ifndef XpmReturnAllocPixels
12466 no_return_alloc_pixels
12467 #endif
12468
12469 _ACEOF
12470 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12471 $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then :
12472 HAVE_XPM=no
12473 else
12474 HAVE_XPM=yes
12475 fi
12476 rm -f conftest*
12477
12478
12479 if test "${HAVE_XPM}" = "yes"; then
12480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12481 $as_echo "yes" >&6; }
12482 else
12483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12484 $as_echo "no" >&6; }
12485 fi
12486 fi
12487 fi
12488
12489 if test "${HAVE_XPM}" = "yes"; then
12490
12491 $as_echo "#define HAVE_XPM 1" >>confdefs.h
12492
12493 LIBXPM=-lXpm
12494 fi
12495 fi
12496
12497
12498
12499 ### Use -ljpeg if available, unless `--with-jpeg=no'.
12500 HAVE_JPEG=no
12501 LIBJPEG=
12502 if test "${HAVE_X11}" = "yes" || test "${HAVE_W32}" = "yes"; then
12503 if test "${with_jpeg}" != "no"; then
12504 ac_fn_c_check_header_mongrel "$LINENO" "jerror.h" "ac_cv_header_jerror_h" "$ac_includes_default"
12505 if test "x$ac_cv_header_jerror_h" = x""yes; then :
12506 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_destroy_compress in -ljpeg" >&5
12507 $as_echo_n "checking for jpeg_destroy_compress in -ljpeg... " >&6; }
12508 if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then :
12509 $as_echo_n "(cached) " >&6
12510 else
12511 ac_check_lib_save_LIBS=$LIBS
12512 LIBS="-ljpeg $LIBS"
12513 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12514 /* end confdefs.h. */
12515
12516 /* Override any GCC internal prototype to avoid an error.
12517 Use char because int might match the return type of a GCC
12518 builtin and then its argument prototype would still apply. */
12519 #ifdef __cplusplus
12520 extern "C"
12521 #endif
12522 char jpeg_destroy_compress ();
12523 int
12524 main ()
12525 {
12526 return jpeg_destroy_compress ();
12527 ;
12528 return 0;
12529 }
12530 _ACEOF
12531 if ac_fn_c_try_link "$LINENO"; then :
12532 ac_cv_lib_jpeg_jpeg_destroy_compress=yes
12533 else
12534 ac_cv_lib_jpeg_jpeg_destroy_compress=no
12535 fi
12536 rm -f core conftest.err conftest.$ac_objext \
12537 conftest$ac_exeext conftest.$ac_ext
12538 LIBS=$ac_check_lib_save_LIBS
12539 fi
12540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5
12541 $as_echo "$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6; }
12542 if test "x$ac_cv_lib_jpeg_jpeg_destroy_compress" = x""yes; then :
12543 HAVE_JPEG=yes
12544 fi
12545
12546 fi
12547
12548
12549 fi
12550
12551 if test "${HAVE_JPEG}" = "yes"; then
12552 $as_echo "#define HAVE_JPEG 1" >>confdefs.h
12553
12554 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12555 /* end confdefs.h. */
12556 #include <jpeglib.h>
12557 version=JPEG_LIB_VERSION
12558
12559 _ACEOF
12560 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12561 $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then :
12562 $as_echo "#define HAVE_JPEG 1" >>confdefs.h
12563
12564 else
12565 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libjpeg found, but not version 6b or later" >&5
12566 $as_echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;}
12567 HAVE_JPEG=no
12568 fi
12569 rm -f conftest*
12570
12571 fi
12572 if test "${HAVE_JPEG}" = "yes"; then
12573 LIBJPEG=-ljpeg
12574 fi
12575 fi
12576
12577
12578 ### Use -lpng if available, unless `--with-png=no'.
12579 HAVE_PNG=no
12580 LIBPNG=
12581 if test "${HAVE_X11}" = "yes" || test "${HAVE_W32}" = "yes"; then
12582 if test "${with_png}" != "no"; then
12583 # Debian unstable as of July 2003 has multiple libpngs, and puts png.h
12584 # in /usr/include/libpng.
12585 for ac_header in png.h libpng/png.h
12586 do :
12587 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12588 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12589 eval as_val=\$$as_ac_Header
12590 if test "x$as_val" = x""yes; then :
12591 cat >>confdefs.h <<_ACEOF
12592 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12593 _ACEOF
12594 break
12595 fi
12596
12597 done
12598
12599 if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then
12600 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_get_channels in -lpng" >&5
12601 $as_echo_n "checking for png_get_channels in -lpng... " >&6; }
12602 if test "${ac_cv_lib_png_png_get_channels+set}" = set; then :
12603 $as_echo_n "(cached) " >&6
12604 else
12605 ac_check_lib_save_LIBS=$LIBS
12606 LIBS="-lpng -lz -lm $LIBS"
12607 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12608 /* end confdefs.h. */
12609
12610 /* Override any GCC internal prototype to avoid an error.
12611 Use char because int might match the return type of a GCC
12612 builtin and then its argument prototype would still apply. */
12613 #ifdef __cplusplus
12614 extern "C"
12615 #endif
12616 char png_get_channels ();
12617 int
12618 main ()
12619 {
12620 return png_get_channels ();
12621 ;
12622 return 0;
12623 }
12624 _ACEOF
12625 if ac_fn_c_try_link "$LINENO"; then :
12626 ac_cv_lib_png_png_get_channels=yes
12627 else
12628 ac_cv_lib_png_png_get_channels=no
12629 fi
12630 rm -f core conftest.err conftest.$ac_objext \
12631 conftest$ac_exeext conftest.$ac_ext
12632 LIBS=$ac_check_lib_save_LIBS
12633 fi
12634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_png_png_get_channels" >&5
12635 $as_echo "$ac_cv_lib_png_png_get_channels" >&6; }
12636 if test "x$ac_cv_lib_png_png_get_channels" = x""yes; then :
12637 HAVE_PNG=yes
12638 fi
12639
12640 fi
12641 fi
12642
12643 if test "${HAVE_PNG}" = "yes"; then
12644
12645 $as_echo "#define HAVE_PNG 1" >>confdefs.h
12646
12647 LIBPNG="-lpng -lz -lm"
12648
12649 ac_fn_c_check_decl "$LINENO" "png_longjmp" "ac_cv_have_decl_png_longjmp" "#ifdef HAVE_LIBPNG_PNG_H
12650 # include <libpng/png.h>
12651 #else
12652 # include <png.h>
12653 #endif
12654
12655 "
12656 if test "x$ac_cv_have_decl_png_longjmp" = x""yes; then :
12657
12658 else
12659
12660 $as_echo "#define PNG_DEPSTRUCT /**/" >>confdefs.h
12661
12662 fi
12663
12664 fi
12665 fi
12666
12667
12668 ### Use -ltiff if available, unless `--with-tiff=no'.
12669 HAVE_TIFF=no
12670 LIBTIFF=
12671 if test "${HAVE_X11}" = "yes" || test "${HAVE_W32}" = "yes"; then
12672 if test "${with_tiff}" != "no"; then
12673 ac_fn_c_check_header_mongrel "$LINENO" "tiffio.h" "ac_cv_header_tiffio_h" "$ac_includes_default"
12674 if test "x$ac_cv_header_tiffio_h" = x""yes; then :
12675 tifflibs="-lz -lm"
12676 # At least one tiff package requires the jpeg library.
12677 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
12678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIFFGetVersion in -ltiff" >&5
12679 $as_echo_n "checking for TIFFGetVersion in -ltiff... " >&6; }
12680 if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then :
12681 $as_echo_n "(cached) " >&6
12682 else
12683 ac_check_lib_save_LIBS=$LIBS
12684 LIBS="-ltiff $tifflibs $LIBS"
12685 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12686 /* end confdefs.h. */
12687
12688 /* Override any GCC internal prototype to avoid an error.
12689 Use char because int might match the return type of a GCC
12690 builtin and then its argument prototype would still apply. */
12691 #ifdef __cplusplus
12692 extern "C"
12693 #endif
12694 char TIFFGetVersion ();
12695 int
12696 main ()
12697 {
12698 return TIFFGetVersion ();
12699 ;
12700 return 0;
12701 }
12702 _ACEOF
12703 if ac_fn_c_try_link "$LINENO"; then :
12704 ac_cv_lib_tiff_TIFFGetVersion=yes
12705 else
12706 ac_cv_lib_tiff_TIFFGetVersion=no
12707 fi
12708 rm -f core conftest.err conftest.$ac_objext \
12709 conftest$ac_exeext conftest.$ac_ext
12710 LIBS=$ac_check_lib_save_LIBS
12711 fi
12712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5
12713 $as_echo "$ac_cv_lib_tiff_TIFFGetVersion" >&6; }
12714 if test "x$ac_cv_lib_tiff_TIFFGetVersion" = x""yes; then :
12715 HAVE_TIFF=yes
12716 fi
12717
12718 fi
12719
12720
12721 fi
12722
12723 if test "${HAVE_TIFF}" = "yes"; then
12724
12725 $as_echo "#define HAVE_TIFF 1" >>confdefs.h
12726
12727 LIBTIFF=-ltiff
12728 fi
12729 fi
12730
12731
12732 ### Use -lgif or -lungif if available, unless `--with-gif=no'.
12733 HAVE_GIF=no
12734 LIBGIF=
12735 if test "${HAVE_X11}" = "yes" && test "${with_gif}" != "no" \
12736 || test "${HAVE_W32}" = "yes"; then
12737 ac_fn_c_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
12738 if test "x$ac_cv_header_gif_lib_h" = x""yes; then :
12739 # EGifPutExtensionLast only exists from version libungif-4.1.0b1.
12740 # Earlier versions can crash Emacs.
12741 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lgif" >&5
12742 $as_echo_n "checking for EGifPutExtensionLast in -lgif... " >&6; }
12743 if test "${ac_cv_lib_gif_EGifPutExtensionLast+set}" = set; then :
12744 $as_echo_n "(cached) " >&6
12745 else
12746 ac_check_lib_save_LIBS=$LIBS
12747 LIBS="-lgif $LIBS"
12748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12749 /* end confdefs.h. */
12750
12751 /* Override any GCC internal prototype to avoid an error.
12752 Use char because int might match the return type of a GCC
12753 builtin and then its argument prototype would still apply. */
12754 #ifdef __cplusplus
12755 extern "C"
12756 #endif
12757 char EGifPutExtensionLast ();
12758 int
12759 main ()
12760 {
12761 return EGifPutExtensionLast ();
12762 ;
12763 return 0;
12764 }
12765 _ACEOF
12766 if ac_fn_c_try_link "$LINENO"; then :
12767 ac_cv_lib_gif_EGifPutExtensionLast=yes
12768 else
12769 ac_cv_lib_gif_EGifPutExtensionLast=no
12770 fi
12771 rm -f core conftest.err conftest.$ac_objext \
12772 conftest$ac_exeext conftest.$ac_ext
12773 LIBS=$ac_check_lib_save_LIBS
12774 fi
12775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_EGifPutExtensionLast" >&5
12776 $as_echo "$ac_cv_lib_gif_EGifPutExtensionLast" >&6; }
12777 if test "x$ac_cv_lib_gif_EGifPutExtensionLast" = x""yes; then :
12778 HAVE_GIF=yes
12779 else
12780 HAVE_GIF=maybe
12781 fi
12782
12783 fi
12784
12785
12786
12787 if test "$HAVE_GIF" = yes; then
12788 LIBGIF=-lgif
12789 elif test "$HAVE_GIF" = maybe; then
12790 # If gif_lib.h but no libgif, try libungif.
12791 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lungif" >&5
12792 $as_echo_n "checking for EGifPutExtensionLast in -lungif... " >&6; }
12793 if test "${ac_cv_lib_ungif_EGifPutExtensionLast+set}" = set; then :
12794 $as_echo_n "(cached) " >&6
12795 else
12796 ac_check_lib_save_LIBS=$LIBS
12797 LIBS="-lungif $LIBS"
12798 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12799 /* end confdefs.h. */
12800
12801 /* Override any GCC internal prototype to avoid an error.
12802 Use char because int might match the return type of a GCC
12803 builtin and then its argument prototype would still apply. */
12804 #ifdef __cplusplus
12805 extern "C"
12806 #endif
12807 char EGifPutExtensionLast ();
12808 int
12809 main ()
12810 {
12811 return EGifPutExtensionLast ();
12812 ;
12813 return 0;
12814 }
12815 _ACEOF
12816 if ac_fn_c_try_link "$LINENO"; then :
12817 ac_cv_lib_ungif_EGifPutExtensionLast=yes
12818 else
12819 ac_cv_lib_ungif_EGifPutExtensionLast=no
12820 fi
12821 rm -f core conftest.err conftest.$ac_objext \
12822 conftest$ac_exeext conftest.$ac_ext
12823 LIBS=$ac_check_lib_save_LIBS
12824 fi
12825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5
12826 $as_echo "$ac_cv_lib_ungif_EGifPutExtensionLast" >&6; }
12827 if test "x$ac_cv_lib_ungif_EGifPutExtensionLast" = x""yes; then :
12828 HAVE_GIF=yes
12829 else
12830 HAVE_GIF=no
12831 fi
12832
12833 test "$HAVE_GIF" = yes && LIBGIF=-lungif
12834 fi
12835
12836 if test "${HAVE_GIF}" = "yes"; then
12837
12838 $as_echo "#define HAVE_GIF 1" >>confdefs.h
12839
12840 fi
12841 fi
12842
12843
12844 if test "${HAVE_X11}" = "yes"; then
12845 MISSING=""
12846 WITH_NO=""
12847 test "${with_xpm}" != "no" && test "${HAVE_XPM}" != "yes" &&
12848 MISSING="libXpm" && WITH_NO="--with-xpm=no"
12849 test "${with_jpeg}" != "no" && test "${HAVE_JPEG}" != "yes" &&
12850 MISSING="$MISSING libjpeg" && WITH_NO="$WITH_NO --with-jpeg=no"
12851 test "${with_png}" != "no" && test "${HAVE_PNG}" != "yes" &&
12852 MISSING="$MISSING libpng" && WITH_NO="$WITH_NO --with-png=no"
12853 test "${with_gif}" != "no" && test "${HAVE_GIF}" != "yes" &&
12854 MISSING="$MISSING libgif/libungif" && WITH_NO="$WITH_NO --with-gif=no"
12855 test "${with_tiff}" != "no" && test "${HAVE_TIFF}" != "yes" &&
12856 MISSING="$MISSING libtiff" && WITH_NO="$WITH_NO --with-tiff=no"
12857
12858 if test "X${MISSING}" != X; then
12859 as_fn_error "The following required libraries were not found:
12860 $MISSING
12861 Maybe some development libraries/packages are missing?
12862 If you don't want to link with them give
12863 $WITH_NO
12864 as options to configure" "$LINENO" 5
12865 fi
12866 fi
12867
12868 ### Use -lgpm if available, unless `--with-gpm=no'.
12869 HAVE_GPM=no
12870 LIBGPM=
12871 if test "${with_gpm}" != "no"; then
12872 ac_fn_c_check_header_mongrel "$LINENO" "gpm.h" "ac_cv_header_gpm_h" "$ac_includes_default"
12873 if test "x$ac_cv_header_gpm_h" = x""yes; then :
12874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Gpm_Open in -lgpm" >&5
12875 $as_echo_n "checking for Gpm_Open in -lgpm... " >&6; }
12876 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then :
12877 $as_echo_n "(cached) " >&6
12878 else
12879 ac_check_lib_save_LIBS=$LIBS
12880 LIBS="-lgpm $LIBS"
12881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12882 /* end confdefs.h. */
12883
12884 /* Override any GCC internal prototype to avoid an error.
12885 Use char because int might match the return type of a GCC
12886 builtin and then its argument prototype would still apply. */
12887 #ifdef __cplusplus
12888 extern "C"
12889 #endif
12890 char Gpm_Open ();
12891 int
12892 main ()
12893 {
12894 return Gpm_Open ();
12895 ;
12896 return 0;
12897 }
12898 _ACEOF
12899 if ac_fn_c_try_link "$LINENO"; then :
12900 ac_cv_lib_gpm_Gpm_Open=yes
12901 else
12902 ac_cv_lib_gpm_Gpm_Open=no
12903 fi
12904 rm -f core conftest.err conftest.$ac_objext \
12905 conftest$ac_exeext conftest.$ac_ext
12906 LIBS=$ac_check_lib_save_LIBS
12907 fi
12908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gpm_Gpm_Open" >&5
12909 $as_echo "$ac_cv_lib_gpm_Gpm_Open" >&6; }
12910 if test "x$ac_cv_lib_gpm_Gpm_Open" = x""yes; then :
12911 HAVE_GPM=yes
12912 fi
12913
12914 fi
12915
12916
12917
12918 if test "${HAVE_GPM}" = "yes"; then
12919
12920 $as_echo "#define HAVE_GPM 1" >>confdefs.h
12921
12922 LIBGPM=-lgpm
12923 fi
12924 fi
12925
12926
12927
12928
12929
12930
12931 GNUSTEP_CFLAGS=
12932 ### Use NeXTstep API to implement GUI.
12933 if test "${HAVE_NS}" = "yes"; then
12934
12935 $as_echo "#define HAVE_NS 1" >>confdefs.h
12936
12937 if test "${NS_IMPL_COCOA}" = "yes"; then
12938
12939 $as_echo "#define NS_IMPL_COCOA 1" >>confdefs.h
12940
12941 fi
12942 if test "${NS_IMPL_GNUSTEP}" = "yes"; then
12943
12944 $as_echo "#define NS_IMPL_GNUSTEP 1" >>confdefs.h
12945
12946 # See also .m.o rule in Makefile.in */
12947 # FIXME: are all these flags really needed? Document here why. */
12948 GNUSTEP_CFLAGS="-D_REENTRANT -fPIC -fno-strict-aliasing -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
12949 ## Extra CFLAGS applied to src/*.m files.
12950 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"
12951 fi
12952 # We also have mouse menus.
12953 HAVE_MENUS=yes
12954 OTHER_FILES=ns-app
12955 fi
12956
12957 if test "${HAVE_W32}" = "yes"; then
12958 HAVE_MENUS=yes
12959 fi
12960
12961 ### Use session management (-lSM -lICE) if available
12962 HAVE_X_SM=no
12963 LIBXSM=
12964 if test "${HAVE_X11}" = "yes"; then
12965 ac_fn_c_check_header_mongrel "$LINENO" "X11/SM/SMlib.h" "ac_cv_header_X11_SM_SMlib_h" "$ac_includes_default"
12966 if test "x$ac_cv_header_X11_SM_SMlib_h" = x""yes; then :
12967 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SmcOpenConnection in -lSM" >&5
12968 $as_echo_n "checking for SmcOpenConnection in -lSM... " >&6; }
12969 if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then :
12970 $as_echo_n "(cached) " >&6
12971 else
12972 ac_check_lib_save_LIBS=$LIBS
12973 LIBS="-lSM -lICE $LIBS"
12974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12975 /* end confdefs.h. */
12976
12977 /* Override any GCC internal prototype to avoid an error.
12978 Use char because int might match the return type of a GCC
12979 builtin and then its argument prototype would still apply. */
12980 #ifdef __cplusplus
12981 extern "C"
12982 #endif
12983 char SmcOpenConnection ();
12984 int
12985 main ()
12986 {
12987 return SmcOpenConnection ();
12988 ;
12989 return 0;
12990 }
12991 _ACEOF
12992 if ac_fn_c_try_link "$LINENO"; then :
12993 ac_cv_lib_SM_SmcOpenConnection=yes
12994 else
12995 ac_cv_lib_SM_SmcOpenConnection=no
12996 fi
12997 rm -f core conftest.err conftest.$ac_objext \
12998 conftest$ac_exeext conftest.$ac_ext
12999 LIBS=$ac_check_lib_save_LIBS
13000 fi
13001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_SM_SmcOpenConnection" >&5
13002 $as_echo "$ac_cv_lib_SM_SmcOpenConnection" >&6; }
13003 if test "x$ac_cv_lib_SM_SmcOpenConnection" = x""yes; then :
13004 HAVE_X_SM=yes
13005 fi
13006
13007 fi
13008
13009
13010
13011 if test "${HAVE_X_SM}" = "yes"; then
13012
13013 $as_echo "#define HAVE_X_SM 1" >>confdefs.h
13014
13015 LIBXSM="-lSM -lICE"
13016 case "$LIBS" in
13017 *-lSM*) ;;
13018 *) LIBS="$LIBXSM $LIBS" ;;
13019 esac
13020 fi
13021 fi
13022
13023
13024 ### Use libxml (-lxml2) if available
13025 HAVE_LIBXML2=no
13026 if test "${with_xml2}" != "no"; then
13027 ### I'm not sure what the version number should be, so I just guessed.
13028
13029 succeeded=no
13030
13031 if test "$PKG_CONFIG" = "no" ; then
13032 HAVE_LIBXML2=no
13033 else
13034 PKG_CONFIG_MIN_VERSION=0.9.0
13035 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
13036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxml-2.0 > 2.6.17" >&5
13037 $as_echo_n "checking for libxml-2.0 > 2.6.17... " >&6; }
13038
13039 if $PKG_CONFIG --exists "libxml-2.0 > 2.6.17" 2>&5 &&
13040 LIBXML2_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0 > 2.6.17" 2>&5` &&
13041 LIBXML2_LIBS=`$PKG_CONFIG --libs "libxml-2.0 > 2.6.17" 2>&5`; then
13042 edit_cflags="
13043 s,///*,/,g
13044 s/^/ /
13045 s/ -I/ $isystem/g
13046 s/^ //
13047 "
13048 LIBXML2_CFLAGS=`$as_echo "$LIBXML2_CFLAGS" | sed -e "$edit_cflags"`
13049 LIBXML2_LIBS=`$as_echo "$LIBXML2_LIBS" | sed -e 's,///*,/,g'`
13050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBXML2_CFLAGS' LIBS='$LIBXML2_LIBS'" >&5
13051 $as_echo "yes CFLAGS='$LIBXML2_CFLAGS' LIBS='$LIBXML2_LIBS'" >&6; }
13052 succeeded=yes
13053 else
13054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13055 $as_echo "no" >&6; }
13056 LIBXML2_CFLAGS=""
13057 LIBXML2_LIBS=""
13058 ## If we have a custom action on failure, don't print errors, but
13059 ## do set a variable so people can do so. Do it in a subshell
13060 ## to capture any diagnostics in invoking pkg-config.
13061 LIBXML2_PKG_ERRORS=`($PKG_CONFIG --print-errors "libxml-2.0 > 2.6.17") 2>&1`
13062
13063 fi
13064
13065
13066
13067 else
13068 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
13069 echo "*** See http://www.freedesktop.org/software/pkgconfig"
13070 fi
13071 fi
13072
13073 if test $succeeded = yes; then
13074 HAVE_LIBXML2=yes
13075 else
13076 HAVE_LIBXML2=no
13077 fi
13078
13079 if test "${HAVE_LIBXML2}" = "yes"; then
13080 LIBS="$LIBXML2_LIBS $LIBS"
13081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for htmlReadMemory in -lxml2" >&5
13082 $as_echo_n "checking for htmlReadMemory in -lxml2... " >&6; }
13083 if test "${ac_cv_lib_xml2_htmlReadMemory+set}" = set; then :
13084 $as_echo_n "(cached) " >&6
13085 else
13086 ac_check_lib_save_LIBS=$LIBS
13087 LIBS="-lxml2 $LIBS"
13088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13089 /* end confdefs.h. */
13090
13091 /* Override any GCC internal prototype to avoid an error.
13092 Use char because int might match the return type of a GCC
13093 builtin and then its argument prototype would still apply. */
13094 #ifdef __cplusplus
13095 extern "C"
13096 #endif
13097 char htmlReadMemory ();
13098 int
13099 main ()
13100 {
13101 return htmlReadMemory ();
13102 ;
13103 return 0;
13104 }
13105 _ACEOF
13106 if ac_fn_c_try_link "$LINENO"; then :
13107 ac_cv_lib_xml2_htmlReadMemory=yes
13108 else
13109 ac_cv_lib_xml2_htmlReadMemory=no
13110 fi
13111 rm -f core conftest.err conftest.$ac_objext \
13112 conftest$ac_exeext conftest.$ac_ext
13113 LIBS=$ac_check_lib_save_LIBS
13114 fi
13115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_htmlReadMemory" >&5
13116 $as_echo "$ac_cv_lib_xml2_htmlReadMemory" >&6; }
13117 if test "x$ac_cv_lib_xml2_htmlReadMemory" = x""yes; then :
13118 HAVE_LIBXML2=yes
13119 else
13120 HAVE_LIBXML2=no
13121 fi
13122
13123 if test "${HAVE_LIBXML2}" = "yes"; then
13124
13125 $as_echo "#define HAVE_LIBXML2 1" >>confdefs.h
13126
13127 else
13128 LIBXML2_LIBS=""
13129 LIBXML2_CFLAGS=""
13130 fi
13131 fi
13132 fi
13133
13134
13135
13136 # If netdb.h doesn't declare h_errno, we must declare it by hand.
13137 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether netdb declares h_errno" >&5
13138 $as_echo_n "checking whether netdb declares h_errno... " >&6; }
13139 if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then :
13140 $as_echo_n "(cached) " >&6
13141 else
13142 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13143 /* end confdefs.h. */
13144 #include <netdb.h>
13145 int
13146 main ()
13147 {
13148 return h_errno;
13149 ;
13150 return 0;
13151 }
13152 _ACEOF
13153 if ac_fn_c_try_link "$LINENO"; then :
13154 emacs_cv_netdb_declares_h_errno=yes
13155 else
13156 emacs_cv_netdb_declares_h_errno=no
13157 fi
13158 rm -f core conftest.err conftest.$ac_objext \
13159 conftest$ac_exeext conftest.$ac_ext
13160 fi
13161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_netdb_declares_h_errno" >&5
13162 $as_echo "$emacs_cv_netdb_declares_h_errno" >&6; }
13163 if test $emacs_cv_netdb_declares_h_errno = yes; then
13164
13165 $as_echo "#define HAVE_H_ERRNO 1" >>confdefs.h
13166
13167 fi
13168
13169 # sqrt and other floating-point functions such as fmod and frexp
13170 # are found in -lm on most systems.
13171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5
13172 $as_echo_n "checking for sqrt in -lm... " >&6; }
13173 if test "${ac_cv_lib_m_sqrt+set}" = set; then :
13174 $as_echo_n "(cached) " >&6
13175 else
13176 ac_check_lib_save_LIBS=$LIBS
13177 LIBS="-lm $LIBS"
13178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13179 /* end confdefs.h. */
13180
13181 /* Override any GCC internal prototype to avoid an error.
13182 Use char because int might match the return type of a GCC
13183 builtin and then its argument prototype would still apply. */
13184 #ifdef __cplusplus
13185 extern "C"
13186 #endif
13187 char sqrt ();
13188 int
13189 main ()
13190 {
13191 return sqrt ();
13192 ;
13193 return 0;
13194 }
13195 _ACEOF
13196 if ac_fn_c_try_link "$LINENO"; then :
13197 ac_cv_lib_m_sqrt=yes
13198 else
13199 ac_cv_lib_m_sqrt=no
13200 fi
13201 rm -f core conftest.err conftest.$ac_objext \
13202 conftest$ac_exeext conftest.$ac_ext
13203 LIBS=$ac_check_lib_save_LIBS
13204 fi
13205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sqrt" >&5
13206 $as_echo "$ac_cv_lib_m_sqrt" >&6; }
13207 if test "x$ac_cv_lib_m_sqrt" = x""yes; then :
13208 cat >>confdefs.h <<_ACEOF
13209 #define HAVE_LIBM 1
13210 _ACEOF
13211
13212 LIBS="-lm $LIBS"
13213
13214 fi
13215
13216
13217 # Check for mail-locking functions in a "mail" library. Probably this should
13218 # have the same check as for liblockfile below.
13219 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -lmail" >&5
13220 $as_echo_n "checking for maillock in -lmail... " >&6; }
13221 if test "${ac_cv_lib_mail_maillock+set}" = set; then :
13222 $as_echo_n "(cached) " >&6
13223 else
13224 ac_check_lib_save_LIBS=$LIBS
13225 LIBS="-lmail $LIBS"
13226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13227 /* end confdefs.h. */
13228
13229 /* Override any GCC internal prototype to avoid an error.
13230 Use char because int might match the return type of a GCC
13231 builtin and then its argument prototype would still apply. */
13232 #ifdef __cplusplus
13233 extern "C"
13234 #endif
13235 char maillock ();
13236 int
13237 main ()
13238 {
13239 return maillock ();
13240 ;
13241 return 0;
13242 }
13243 _ACEOF
13244 if ac_fn_c_try_link "$LINENO"; then :
13245 ac_cv_lib_mail_maillock=yes
13246 else
13247 ac_cv_lib_mail_maillock=no
13248 fi
13249 rm -f core conftest.err conftest.$ac_objext \
13250 conftest$ac_exeext conftest.$ac_ext
13251 LIBS=$ac_check_lib_save_LIBS
13252 fi
13253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mail_maillock" >&5
13254 $as_echo "$ac_cv_lib_mail_maillock" >&6; }
13255 if test "x$ac_cv_lib_mail_maillock" = x""yes; then :
13256 have_mail=yes
13257 else
13258 have_mail=no
13259 fi
13260
13261 if test $have_mail = yes; then
13262 LIBS_MAIL=-lmail
13263 LIBS="$LIBS_MAIL $LIBS"
13264
13265 $as_echo "#define HAVE_LIBMAIL 1" >>confdefs.h
13266
13267 else
13268 LIBS_MAIL=
13269 fi
13270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -llockfile" >&5
13271 $as_echo_n "checking for maillock in -llockfile... " >&6; }
13272 if test "${ac_cv_lib_lockfile_maillock+set}" = set; then :
13273 $as_echo_n "(cached) " >&6
13274 else
13275 ac_check_lib_save_LIBS=$LIBS
13276 LIBS="-llockfile $LIBS"
13277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13278 /* end confdefs.h. */
13279
13280 /* Override any GCC internal prototype to avoid an error.
13281 Use char because int might match the return type of a GCC
13282 builtin and then its argument prototype would still apply. */
13283 #ifdef __cplusplus
13284 extern "C"
13285 #endif
13286 char maillock ();
13287 int
13288 main ()
13289 {
13290 return maillock ();
13291 ;
13292 return 0;
13293 }
13294 _ACEOF
13295 if ac_fn_c_try_link "$LINENO"; then :
13296 ac_cv_lib_lockfile_maillock=yes
13297 else
13298 ac_cv_lib_lockfile_maillock=no
13299 fi
13300 rm -f core conftest.err conftest.$ac_objext \
13301 conftest$ac_exeext conftest.$ac_ext
13302 LIBS=$ac_check_lib_save_LIBS
13303 fi
13304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lockfile_maillock" >&5
13305 $as_echo "$ac_cv_lib_lockfile_maillock" >&6; }
13306 if test "x$ac_cv_lib_lockfile_maillock" = x""yes; then :
13307 have_lockfile=yes
13308 else
13309 have_lockfile=no
13310 fi
13311
13312 if test $have_lockfile = yes; then
13313 LIBS_MAIL=-llockfile
13314 LIBS="$LIBS_MAIL $LIBS"
13315
13316 $as_echo "#define HAVE_LIBLOCKFILE 1" >>confdefs.h
13317
13318 else
13319 # If we have the shared liblockfile, assume we must use it for mail
13320 # locking (e.g. Debian). If we couldn't link against liblockfile
13321 # (no liblockfile.a installed), ensure that we don't need to.
13322 # Extract the first word of "liblockfile.so", so it can be a program name with args.
13323 set dummy liblockfile.so; ac_word=$2
13324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13325 $as_echo_n "checking for $ac_word... " >&6; }
13326 if test "${ac_cv_prog_liblockfile+set}" = set; then :
13327 $as_echo_n "(cached) " >&6
13328 else
13329 if test -n "$liblockfile"; then
13330 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
13331 else
13332 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13333 as_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
13334 for as_dir in $as_dummy
13335 do
13336 IFS=$as_save_IFS
13337 test -z "$as_dir" && as_dir=.
13338 for ac_exec_ext in '' $ac_executable_extensions; do
13339 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
13340 ac_cv_prog_liblockfile="yes"
13341 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13342 break 2
13343 fi
13344 done
13345 done
13346 IFS=$as_save_IFS
13347
13348 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
13349 fi
13350 fi
13351 liblockfile=$ac_cv_prog_liblockfile
13352 if test -n "$liblockfile"; then
13353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $liblockfile" >&5
13354 $as_echo "$liblockfile" >&6; }
13355 else
13356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13357 $as_echo "no" >&6; }
13358 fi
13359
13360
13361 if test $ac_cv_prog_liblockfile = yes; then
13362 as_fn_error "Shared liblockfile found but can't link against it.
13363 This probably means that movemail could lose mail.
13364 There may be a \`development' package to install containing liblockfile." "$LINENO" 5
13365 fi
13366 fi
13367
13368
13369
13370
13371
13372 ## Define MAIL_USE_FLOCK (or LOCKF) if the mailer uses flock (or lockf) to
13373 ## interlock access to the mail spool. The alternative is a lock file named
13374 ## /usr/spool/mail/$USER.lock.
13375 mail_lock=no
13376 case "$opsys" in
13377 aix4-2) mail_lock="lockf" ;;
13378
13379 gnu|freebsd|netbsd|openbsd|darwin|irix6-5) mail_lock="flock" ;;
13380
13381 ## On GNU/Linux systems, both methods are used by various mail programs.
13382 ## I assume most people are using newer mailers that have heard of flock.
13383 ## Change this if you need to.
13384 ## Debian contains a patch which says: ``On Debian/GNU/Linux systems,
13385 ## configure gets the right answers, and that means *NOT* using flock.
13386 ## Using flock is guaranteed to be the wrong thing. See Debian Policy
13387 ## for details.'' and then uses `#ifdef DEBIAN'. Unfortunately the
13388 ## Debian maintainer hasn't provided a clean fix for Emacs.
13389 ## movemail.c will use `maillock' when MAILDIR, HAVE_LIBMAIL and
13390 ## HAVE_MAILLOCK_H are defined, so the following appears to be the
13391 ## correct logic. -- fx
13392 ## We must check for HAVE_LIBLOCKFILE too, as movemail does.
13393 ## liblockfile is a Free Software replacement for libmail, used on
13394 ## Debian systems and elsewhere. -rfr.
13395 gnu-*)
13396 mail_lock="flock"
13397 if test $have_mail = yes || test $have_lockfile = yes; then
13398 test $ac_cv_header_maillock_h = yes && mail_lock=no
13399 fi
13400 ;;
13401 esac
13402
13403 BLESSMAIL_TARGET=
13404 case "$mail_lock" in
13405 flock)
13406 $as_echo "#define MAIL_USE_FLOCK 1" >>confdefs.h
13407 ;;
13408
13409 lockf)
13410 $as_echo "#define MAIL_USE_LOCKF 1" >>confdefs.h
13411 ;;
13412
13413 *) BLESSMAIL_TARGET="need-blessmail" ;;
13414 esac
13415
13416
13417
13418 for ac_func in gethostname \
13419 closedir getrusage get_current_dir_name \
13420 lrand48 setsid \
13421 fpathconf select euidaccess getpagesize setlocale \
13422 utimes getrlimit setrlimit setpgid getcwd shutdown getaddrinfo \
13423 __fpending strsignal setitimer \
13424 sendto recvfrom getsockname getpeername getifaddrs freeifaddrs \
13425 gai_strerror mkstemp getline getdelim fsync sync \
13426 difftime posix_memalign \
13427 getpwent endpwent getgrent endgrent \
13428 touchlock \
13429 cfmakeraw cfsetspeed copysign __executable_start
13430 do :
13431 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13432 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13433 eval as_val=\$$as_ac_var
13434 if test "x$as_val" = x""yes; then :
13435 cat >>confdefs.h <<_ACEOF
13436 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13437 _ACEOF
13438
13439 fi
13440 done
13441
13442
13443 if test $opsys = unixware; then
13444
13445 $as_echo "#define BROKEN_GETWD 1" >>confdefs.h
13446
13447 else
13448 for ac_func in getwd
13449 do :
13450 ac_fn_c_check_func "$LINENO" "getwd" "ac_cv_func_getwd"
13451 if test "x$ac_cv_func_getwd" = x""yes; then :
13452 cat >>confdefs.h <<_ACEOF
13453 #define HAVE_GETWD 1
13454 _ACEOF
13455
13456 fi
13457 done
13458
13459 fi
13460
13461 ## Eric Backus <ericb@lsid.hp.com> says, HP-UX 9.x on HP 700 machines
13462 ## has a broken `rint' in some library versions including math library
13463 ## version number A.09.05.
13464 ## You can fix the math library by installing patch number PHSS_4630.
13465 ## But we can fix it more reliably for Emacs by just not using rint.
13466 ## We also skip HAVE_RANDOM - see comments in src/conf_post.h.
13467 case $opsys in
13468 hpux*) : ;;
13469 *) for ac_func in random rint
13470 do :
13471 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13472 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13473 eval as_val=\$$as_ac_var
13474 if test "x$as_val" = x""yes; then :
13475 cat >>confdefs.h <<_ACEOF
13476 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13477 _ACEOF
13478
13479 fi
13480 done
13481 ;;
13482 esac
13483
13484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unwind_init" >&5
13485 $as_echo_n "checking for __builtin_unwind_init... " >&6; }
13486 if test "${emacs_cv_func___builtin_unwind_init+set}" = set; then :
13487 $as_echo_n "(cached) " >&6
13488 else
13489 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13490 /* end confdefs.h. */
13491
13492 int
13493 main ()
13494 {
13495 __builtin_unwind_init ();
13496 ;
13497 return 0;
13498 }
13499 _ACEOF
13500 if ac_fn_c_try_link "$LINENO"; then :
13501 emacs_cv_func___builtin_unwind_init=yes
13502 else
13503 emacs_cv_func___builtin_unwind_init=no
13504 fi
13505 rm -f core conftest.err conftest.$ac_objext \
13506 conftest$ac_exeext conftest.$ac_ext
13507 fi
13508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_func___builtin_unwind_init" >&5
13509 $as_echo "$emacs_cv_func___builtin_unwind_init" >&6; }
13510 if test $emacs_cv_func___builtin_unwind_init = yes; then
13511
13512 $as_echo "#define HAVE___BUILTIN_UNWIND_INIT 1" >>confdefs.h
13513
13514 fi
13515
13516
13517
13518
13519
13520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
13521 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
13522 if test "${ac_cv_sys_largefile_source+set}" = set; then :
13523 $as_echo_n "(cached) " >&6
13524 else
13525 while :; do
13526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13527 /* end confdefs.h. */
13528 #include <sys/types.h> /* for off_t */
13529 #include <stdio.h>
13530 int
13531 main ()
13532 {
13533 int (*fp) (FILE *, off_t, int) = fseeko;
13534 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
13535 ;
13536 return 0;
13537 }
13538 _ACEOF
13539 if ac_fn_c_try_link "$LINENO"; then :
13540 ac_cv_sys_largefile_source=no; break
13541 fi
13542 rm -f core conftest.err conftest.$ac_objext \
13543 conftest$ac_exeext conftest.$ac_ext
13544 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13545 /* end confdefs.h. */
13546 #define _LARGEFILE_SOURCE 1
13547 #include <sys/types.h> /* for off_t */
13548 #include <stdio.h>
13549 int
13550 main ()
13551 {
13552 int (*fp) (FILE *, off_t, int) = fseeko;
13553 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
13554 ;
13555 return 0;
13556 }
13557 _ACEOF
13558 if ac_fn_c_try_link "$LINENO"; then :
13559 ac_cv_sys_largefile_source=1; break
13560 fi
13561 rm -f core conftest.err conftest.$ac_objext \
13562 conftest$ac_exeext conftest.$ac_ext
13563 ac_cv_sys_largefile_source=unknown
13564 break
13565 done
13566 fi
13567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
13568 $as_echo "$ac_cv_sys_largefile_source" >&6; }
13569 case $ac_cv_sys_largefile_source in #(
13570 no | unknown) ;;
13571 *)
13572 cat >>confdefs.h <<_ACEOF
13573 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
13574 _ACEOF
13575 ;;
13576 esac
13577 rm -rf conftest*
13578
13579 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
13580 # in glibc 2.1.3, but that breaks too many other things.
13581 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
13582 if test $ac_cv_sys_largefile_source != unknown; then
13583
13584 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
13585
13586 fi
13587
13588
13589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getpgrp requires zero arguments" >&5
13590 $as_echo_n "checking whether getpgrp requires zero arguments... " >&6; }
13591 if test "${ac_cv_func_getpgrp_void+set}" = set; then :
13592 $as_echo_n "(cached) " >&6
13593 else
13594 # Use it with a single arg.
13595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13596 /* end confdefs.h. */
13597 $ac_includes_default
13598 int
13599 main ()
13600 {
13601 getpgrp (0);
13602 ;
13603 return 0;
13604 }
13605 _ACEOF
13606 if ac_fn_c_try_compile "$LINENO"; then :
13607 ac_cv_func_getpgrp_void=no
13608 else
13609 ac_cv_func_getpgrp_void=yes
13610 fi
13611 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13612
13613 fi
13614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getpgrp_void" >&5
13615 $as_echo "$ac_cv_func_getpgrp_void" >&6; }
13616 if test $ac_cv_func_getpgrp_void = yes; then
13617
13618 $as_echo "#define GETPGRP_VOID 1" >>confdefs.h
13619
13620 fi
13621
13622
13623 # UNIX98 PTYs.
13624 for ac_func in grantpt
13625 do :
13626 ac_fn_c_check_func "$LINENO" "grantpt" "ac_cv_func_grantpt"
13627 if test "x$ac_cv_func_grantpt" = x""yes; then :
13628 cat >>confdefs.h <<_ACEOF
13629 #define HAVE_GRANTPT 1
13630 _ACEOF
13631
13632 fi
13633 done
13634
13635
13636 # PTY-related GNU extensions.
13637 for ac_func in getpt posix_openpt
13638 do :
13639 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13640 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13641 eval as_val=\$$as_ac_var
13642 if test "x$as_val" = x""yes; then :
13643 cat >>confdefs.h <<_ACEOF
13644 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13645 _ACEOF
13646
13647 fi
13648 done
13649
13650
13651 # Check this now, so that we will NOT find the above functions in ncurses.
13652 # That is because we have not set up to link ncurses in lib-src.
13653 # It's better to believe a function is not available
13654 # than to expect to find it in ncurses.
13655 # Also we need tputs and friends to be able to build at all.
13656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tputs" >&5
13657 $as_echo_n "checking for library containing tputs... " >&6; }
13658 # Run a test program that contains a call to tputs, a call that is
13659 # never executed. This tests whether a pre-'main' dynamic linker
13660 # works with the library. It's too much trouble to actually call
13661 # tputs in the test program, due to portability hassles. When
13662 # cross-compiling, assume the test program will run if it links.
13663
13664 # Maybe curses should be tried earlier?
13665 # See http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9736#35
13666 for tputs_library in '' tinfo ncurses terminfo termcap curses; do
13667 OLIBS=$LIBS
13668 if test -z "$tputs_library"; then
13669 LIBS_TERMCAP=
13670 msg='none required'
13671 else
13672 LIBS_TERMCAP=-l$tputs_library
13673 msg=$LIBS_TERMCAP
13674 LIBS="$LIBS_TERMCAP $LIBS"
13675 fi
13676 if test "$cross_compiling" = yes; then :
13677 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13678 /* end confdefs.h. */
13679
13680 extern void tputs (const char *, int, int (*)(int));
13681 int main (int argc, char **argv)
13682 {
13683 if (argc == 10000)
13684 tputs (argv[0], 0, 0);
13685 return 0;
13686 }
13687
13688 _ACEOF
13689 if ac_fn_c_try_link "$LINENO"; then :
13690
13691 else
13692 msg=no
13693 fi
13694 rm -f core conftest.err conftest.$ac_objext \
13695 conftest$ac_exeext conftest.$ac_ext
13696 else
13697 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13698 /* end confdefs.h. */
13699
13700 extern void tputs (const char *, int, int (*)(int));
13701 int main (int argc, char **argv)
13702 {
13703 if (argc == 10000)
13704 tputs (argv[0], 0, 0);
13705 return 0;
13706 }
13707
13708 _ACEOF
13709 if ac_fn_c_try_run "$LINENO"; then :
13710
13711 else
13712 msg=no
13713 fi
13714 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13715 conftest.$ac_objext conftest.beam conftest.$ac_ext
13716 fi
13717
13718 LIBS=$OLIBS
13719 if test "X$msg" != Xno; then
13720 break
13721 fi
13722 done
13723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $msg" >&5
13724 $as_echo "$msg" >&6; }
13725 if test "X$msg" = Xno; then
13726 as_fn_error "The required function \`tputs' was not found in any library.
13727 The following libraries were tried (in order):
13728 libtinfo, libncurses, libterminfo, libtermcap, libcurses
13729 Please try installing whichever of these libraries is most appropriate
13730 for your system, together with its header files.
13731 For example, a libncurses-dev(el) or similar package." "$LINENO" 5
13732 fi
13733
13734 ## Use termcap instead of terminfo?
13735 ## Only true for: freebsd < 40000, ms-w32, msdos, netbsd < 599002500.
13736 TERMINFO=yes
13737 ## FIXME? In the cases below where we unconditionally set
13738 ## LIBS_TERMCAP="-lncurses", this overrides LIBS_TERMCAP = -ltinfo,
13739 ## if that was found above to have tputs.
13740 ## Should we use the gnu* logic everywhere?
13741 case "$opsys" in
13742 ## darwin: Prevents crashes when running Emacs in Terminal.app under 10.2.
13743 ## The ncurses library has been moved out of the System framework in
13744 ## Mac OS X 10.2. So if configure detects it, set the command-line
13745 ## option to use it.
13746 darwin) LIBS_TERMCAP="-lncurses" ;;
13747
13748 gnu*) test -z "$LIBS_TERMCAP" && LIBS_TERMCAP="-lncurses" ;;
13749
13750 freebsd)
13751 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether FreeBSD is new enough to use terminfo" >&5
13752 $as_echo_n "checking whether FreeBSD is new enough to use terminfo... " >&6; }
13753 if test "${emacs_cv_freebsd_terminfo+set}" = set; then :
13754 $as_echo_n "(cached) " >&6
13755 else
13756 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13757 /* end confdefs.h. */
13758 #include <osreldate.h>
13759 int
13760 main ()
13761 {
13762 #if __FreeBSD_version < 400000
13763 fail;
13764 #endif
13765
13766 ;
13767 return 0;
13768 }
13769 _ACEOF
13770 if ac_fn_c_try_link "$LINENO"; then :
13771 emacs_cv_freebsd_terminfo=yes
13772 else
13773 emacs_cv_freebsd_terminfo=no
13774 fi
13775 rm -f core conftest.err conftest.$ac_objext \
13776 conftest$ac_exeext conftest.$ac_ext
13777 fi
13778
13779
13780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_freebsd_terminfo" >&5
13781 $as_echo "$emacs_cv_freebsd_terminfo" >&6; }
13782
13783 if test $emacs_cv_freebsd_terminfo = yes; then
13784 LIBS_TERMCAP="-lncurses"
13785 else
13786 TERMINFO=no
13787 LIBS_TERMCAP="-ltermcap"
13788 fi
13789 ;;
13790
13791 netbsd)
13792 if test "x$LIBS_TERMCAP" != "x-lterminfo"; then
13793 TERMINFO=no
13794 LIBS_TERMCAP="-ltermcap"
13795 fi
13796 ;;
13797
13798 openbsd) LIBS_TERMCAP="-lncurses" ;;
13799
13800 ## hpux: Make sure we get select from libc rather than from libcurses
13801 ## because libcurses on HPUX 10.10 has a broken version of select.
13802 ## We used to use -lc -lcurses, but this may be cleaner.
13803 ## FIXME? But TERMINFO = yes on hpux (it used to be explicitly
13804 # set that way, now it uses the default). Isn't this a contradiction?
13805 hpux*) LIBS_TERMCAP="-ltermcap" ;;
13806
13807 esac
13808
13809 TERMCAP_OBJ=tparam.o
13810 if test $TERMINFO = yes; then
13811
13812 $as_echo "#define TERMINFO 1" >>confdefs.h
13813
13814 TERMCAP_OBJ=terminfo.o
13815 fi
13816
13817
13818
13819
13820 # Do we have res_init, for detecting changes in /etc/resolv.conf?
13821 # On Darwin, res_init appears not to be useful: see bug#562 and
13822 # http://lists.gnu.org/archive/html/emacs-devel/2007-11/msg01467.html
13823 resolv=no
13824
13825 if test $opsys != darwin; then
13826
13827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13828 /* end confdefs.h. */
13829 #include <netinet/in.h>
13830 #include <arpa/nameser.h>
13831 #include <resolv.h>
13832 int
13833 main ()
13834 {
13835 return res_init();
13836 ;
13837 return 0;
13838 }
13839 _ACEOF
13840 if ac_fn_c_try_link "$LINENO"; then :
13841 have_res_init=yes
13842 else
13843 have_res_init=no
13844 fi
13845 rm -f core conftest.err conftest.$ac_objext \
13846 conftest$ac_exeext conftest.$ac_ext
13847 if test "$have_res_init" = no; then
13848 OLIBS="$LIBS"
13849 LIBS="$LIBS -lresolv"
13850 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_init with -lresolv" >&5
13851 $as_echo_n "checking for res_init with -lresolv... " >&6; }
13852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13853 /* end confdefs.h. */
13854 #include <netinet/in.h>
13855 #include <arpa/nameser.h>
13856 #include <resolv.h>
13857 int
13858 main ()
13859 {
13860 return res_init();
13861 ;
13862 return 0;
13863 }
13864 _ACEOF
13865 if ac_fn_c_try_link "$LINENO"; then :
13866 have_res_init=yes
13867 else
13868 have_res_init=no
13869 fi
13870 rm -f core conftest.err conftest.$ac_objext \
13871 conftest$ac_exeext conftest.$ac_ext
13872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_res_init" >&5
13873 $as_echo "$have_res_init" >&6; }
13874 if test "$have_res_init" = yes ; then
13875 resolv=yes
13876 fi
13877 LIBS="$OLIBS"
13878 fi
13879
13880 if test "$have_res_init" = yes; then
13881
13882 $as_echo "#define HAVE_RES_INIT 1" >>confdefs.h
13883
13884 fi
13885 fi
13886 # Do we need the Hesiod library to provide the support routines?
13887 LIBHESIOD=
13888 if test "$with_hesiod" != no ; then
13889 # Don't set $LIBS here -- see comments above. FIXME which comments?
13890 ac_fn_c_check_func "$LINENO" "res_send" "ac_cv_func_res_send"
13891 if test "x$ac_cv_func_res_send" = x""yes; then :
13892
13893 else
13894 ac_fn_c_check_func "$LINENO" "__res_send" "ac_cv_func___res_send"
13895 if test "x$ac_cv_func___res_send" = x""yes; then :
13896
13897 else
13898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_send in -lresolv" >&5
13899 $as_echo_n "checking for res_send in -lresolv... " >&6; }
13900 if test "${ac_cv_lib_resolv_res_send+set}" = set; then :
13901 $as_echo_n "(cached) " >&6
13902 else
13903 ac_check_lib_save_LIBS=$LIBS
13904 LIBS="-lresolv $LIBS"
13905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13906 /* end confdefs.h. */
13907
13908 /* Override any GCC internal prototype to avoid an error.
13909 Use char because int might match the return type of a GCC
13910 builtin and then its argument prototype would still apply. */
13911 #ifdef __cplusplus
13912 extern "C"
13913 #endif
13914 char res_send ();
13915 int
13916 main ()
13917 {
13918 return res_send ();
13919 ;
13920 return 0;
13921 }
13922 _ACEOF
13923 if ac_fn_c_try_link "$LINENO"; then :
13924 ac_cv_lib_resolv_res_send=yes
13925 else
13926 ac_cv_lib_resolv_res_send=no
13927 fi
13928 rm -f core conftest.err conftest.$ac_objext \
13929 conftest$ac_exeext conftest.$ac_ext
13930 LIBS=$ac_check_lib_save_LIBS
13931 fi
13932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_send" >&5
13933 $as_echo "$ac_cv_lib_resolv_res_send" >&6; }
13934 if test "x$ac_cv_lib_resolv_res_send" = x""yes; then :
13935 resolv=yes
13936 else
13937 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __res_send in -lresolv" >&5
13938 $as_echo_n "checking for __res_send in -lresolv... " >&6; }
13939 if test "${ac_cv_lib_resolv___res_send+set}" = set; then :
13940 $as_echo_n "(cached) " >&6
13941 else
13942 ac_check_lib_save_LIBS=$LIBS
13943 LIBS="-lresolv $LIBS"
13944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13945 /* end confdefs.h. */
13946
13947 /* Override any GCC internal prototype to avoid an error.
13948 Use char because int might match the return type of a GCC
13949 builtin and then its argument prototype would still apply. */
13950 #ifdef __cplusplus
13951 extern "C"
13952 #endif
13953 char __res_send ();
13954 int
13955 main ()
13956 {
13957 return __res_send ();
13958 ;
13959 return 0;
13960 }
13961 _ACEOF
13962 if ac_fn_c_try_link "$LINENO"; then :
13963 ac_cv_lib_resolv___res_send=yes
13964 else
13965 ac_cv_lib_resolv___res_send=no
13966 fi
13967 rm -f core conftest.err conftest.$ac_objext \
13968 conftest$ac_exeext conftest.$ac_ext
13969 LIBS=$ac_check_lib_save_LIBS
13970 fi
13971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv___res_send" >&5
13972 $as_echo "$ac_cv_lib_resolv___res_send" >&6; }
13973 if test "x$ac_cv_lib_resolv___res_send" = x""yes; then :
13974 resolv=yes
13975 fi
13976
13977 fi
13978
13979 fi
13980
13981 fi
13982
13983 if test "$resolv" = yes ; then
13984 RESOLVLIB=-lresolv
13985 else
13986 RESOLVLIB=
13987 fi
13988 ac_fn_c_check_func "$LINENO" "hes_getmailhost" "ac_cv_func_hes_getmailhost"
13989 if test "x$ac_cv_func_hes_getmailhost" = x""yes; then :
13990
13991 else
13992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hes_getmailhost in -lhesiod" >&5
13993 $as_echo_n "checking for hes_getmailhost in -lhesiod... " >&6; }
13994 if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then :
13995 $as_echo_n "(cached) " >&6
13996 else
13997 ac_check_lib_save_LIBS=$LIBS
13998 LIBS="-lhesiod $RESOLVLIB $LIBS"
13999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14000 /* end confdefs.h. */
14001
14002 /* Override any GCC internal prototype to avoid an error.
14003 Use char because int might match the return type of a GCC
14004 builtin and then its argument prototype would still apply. */
14005 #ifdef __cplusplus
14006 extern "C"
14007 #endif
14008 char hes_getmailhost ();
14009 int
14010 main ()
14011 {
14012 return hes_getmailhost ();
14013 ;
14014 return 0;
14015 }
14016 _ACEOF
14017 if ac_fn_c_try_link "$LINENO"; then :
14018 ac_cv_lib_hesiod_hes_getmailhost=yes
14019 else
14020 ac_cv_lib_hesiod_hes_getmailhost=no
14021 fi
14022 rm -f core conftest.err conftest.$ac_objext \
14023 conftest$ac_exeext conftest.$ac_ext
14024 LIBS=$ac_check_lib_save_LIBS
14025 fi
14026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5
14027 $as_echo "$ac_cv_lib_hesiod_hes_getmailhost" >&6; }
14028 if test "x$ac_cv_lib_hesiod_hes_getmailhost" = x""yes; then :
14029 hesiod=yes
14030 else
14031 :
14032 fi
14033
14034 fi
14035
14036
14037 if test x"$hesiod" = xyes; then
14038
14039 $as_echo "#define HAVE_LIBHESIOD 1" >>confdefs.h
14040
14041 LIBHESIOD=-lhesiod
14042 fi
14043 fi
14044
14045
14046 # Do we need libresolv (due to res_init or Hesiod)?
14047 if test "$resolv" = yes && test $opsys != darwin; then
14048
14049 $as_echo "#define HAVE_LIBRESOLV 1" >>confdefs.h
14050
14051 LIBRESOLV=-lresolv
14052 else
14053 LIBRESOLV=
14054 fi
14055
14056
14057 # These tell us which Kerberos-related libraries to use.
14058 COM_ERRLIB=
14059 CRYPTOLIB=
14060 KRB5LIB=
14061 DESLIB=
14062 KRB4LIB=
14063
14064 if test "${with_kerberos}" != no; then
14065 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for com_err in -lcom_err" >&5
14066 $as_echo_n "checking for com_err in -lcom_err... " >&6; }
14067 if test "${ac_cv_lib_com_err_com_err+set}" = set; then :
14068 $as_echo_n "(cached) " >&6
14069 else
14070 ac_check_lib_save_LIBS=$LIBS
14071 LIBS="-lcom_err $LIBS"
14072 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14073 /* end confdefs.h. */
14074
14075 /* Override any GCC internal prototype to avoid an error.
14076 Use char because int might match the return type of a GCC
14077 builtin and then its argument prototype would still apply. */
14078 #ifdef __cplusplus
14079 extern "C"
14080 #endif
14081 char com_err ();
14082 int
14083 main ()
14084 {
14085 return com_err ();
14086 ;
14087 return 0;
14088 }
14089 _ACEOF
14090 if ac_fn_c_try_link "$LINENO"; then :
14091 ac_cv_lib_com_err_com_err=yes
14092 else
14093 ac_cv_lib_com_err_com_err=no
14094 fi
14095 rm -f core conftest.err conftest.$ac_objext \
14096 conftest$ac_exeext conftest.$ac_ext
14097 LIBS=$ac_check_lib_save_LIBS
14098 fi
14099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_com_err_com_err" >&5
14100 $as_echo "$ac_cv_lib_com_err_com_err" >&6; }
14101 if test "x$ac_cv_lib_com_err_com_err" = x""yes; then :
14102 have_com_err=yes
14103 else
14104 have_com_err=no
14105 fi
14106
14107 if test $have_com_err = yes; then
14108 COM_ERRLIB=-lcom_err
14109 LIBS="$COM_ERRLIB $LIBS"
14110
14111 $as_echo "#define HAVE_LIBCOM_ERR 1" >>confdefs.h
14112
14113 fi
14114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lcrypto" >&5
14115 $as_echo_n "checking for mit_des_cbc_encrypt in -lcrypto... " >&6; }
14116 if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then :
14117 $as_echo_n "(cached) " >&6
14118 else
14119 ac_check_lib_save_LIBS=$LIBS
14120 LIBS="-lcrypto $LIBS"
14121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14122 /* end confdefs.h. */
14123
14124 /* Override any GCC internal prototype to avoid an error.
14125 Use char because int might match the return type of a GCC
14126 builtin and then its argument prototype would still apply. */
14127 #ifdef __cplusplus
14128 extern "C"
14129 #endif
14130 char mit_des_cbc_encrypt ();
14131 int
14132 main ()
14133 {
14134 return mit_des_cbc_encrypt ();
14135 ;
14136 return 0;
14137 }
14138 _ACEOF
14139 if ac_fn_c_try_link "$LINENO"; then :
14140 ac_cv_lib_crypto_mit_des_cbc_encrypt=yes
14141 else
14142 ac_cv_lib_crypto_mit_des_cbc_encrypt=no
14143 fi
14144 rm -f core conftest.err conftest.$ac_objext \
14145 conftest$ac_exeext conftest.$ac_ext
14146 LIBS=$ac_check_lib_save_LIBS
14147 fi
14148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5
14149 $as_echo "$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6; }
14150 if test "x$ac_cv_lib_crypto_mit_des_cbc_encrypt" = x""yes; then :
14151 have_crypto=yes
14152 else
14153 have_crypto=no
14154 fi
14155
14156 if test $have_crypto = yes; then
14157 CRYPTOLIB=-lcrypto
14158 LIBS="$CRYPTOLIB $LIBS"
14159
14160 $as_echo "#define HAVE_LIBCRYPTO 1" >>confdefs.h
14161
14162 fi
14163 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
14164 $as_echo_n "checking for mit_des_cbc_encrypt in -lk5crypto... " >&6; }
14165 if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then :
14166 $as_echo_n "(cached) " >&6
14167 else
14168 ac_check_lib_save_LIBS=$LIBS
14169 LIBS="-lk5crypto $LIBS"
14170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14171 /* end confdefs.h. */
14172
14173 /* Override any GCC internal prototype to avoid an error.
14174 Use char because int might match the return type of a GCC
14175 builtin and then its argument prototype would still apply. */
14176 #ifdef __cplusplus
14177 extern "C"
14178 #endif
14179 char mit_des_cbc_encrypt ();
14180 int
14181 main ()
14182 {
14183 return mit_des_cbc_encrypt ();
14184 ;
14185 return 0;
14186 }
14187 _ACEOF
14188 if ac_fn_c_try_link "$LINENO"; then :
14189 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes
14190 else
14191 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no
14192 fi
14193 rm -f core conftest.err conftest.$ac_objext \
14194 conftest$ac_exeext conftest.$ac_ext
14195 LIBS=$ac_check_lib_save_LIBS
14196 fi
14197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5
14198 $as_echo "$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6; }
14199 if test "x$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" = x""yes; then :
14200 have_k5crypto=yes
14201 else
14202 have_k5crypto=no
14203 fi
14204
14205 if test $have_k5crypto = yes; then
14206 CRYPTOLIB=-lk5crypto
14207 LIBS="$CRYPTOLIB $LIBS"
14208
14209 $as_echo "#define HAVE_LIBK5CRYPTO 1" >>confdefs.h
14210
14211 fi
14212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5_init_context in -lkrb5" >&5
14213 $as_echo_n "checking for krb5_init_context in -lkrb5... " >&6; }
14214 if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then :
14215 $as_echo_n "(cached) " >&6
14216 else
14217 ac_check_lib_save_LIBS=$LIBS
14218 LIBS="-lkrb5 $LIBS"
14219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14220 /* end confdefs.h. */
14221
14222 /* Override any GCC internal prototype to avoid an error.
14223 Use char because int might match the return type of a GCC
14224 builtin and then its argument prototype would still apply. */
14225 #ifdef __cplusplus
14226 extern "C"
14227 #endif
14228 char krb5_init_context ();
14229 int
14230 main ()
14231 {
14232 return krb5_init_context ();
14233 ;
14234 return 0;
14235 }
14236 _ACEOF
14237 if ac_fn_c_try_link "$LINENO"; then :
14238 ac_cv_lib_krb5_krb5_init_context=yes
14239 else
14240 ac_cv_lib_krb5_krb5_init_context=no
14241 fi
14242 rm -f core conftest.err conftest.$ac_objext \
14243 conftest$ac_exeext conftest.$ac_ext
14244 LIBS=$ac_check_lib_save_LIBS
14245 fi
14246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb5_krb5_init_context" >&5
14247 $as_echo "$ac_cv_lib_krb5_krb5_init_context" >&6; }
14248 if test "x$ac_cv_lib_krb5_krb5_init_context" = x""yes; then :
14249 have_krb5=yes
14250 else
14251 have_krb5=no
14252 fi
14253
14254 if test $have_krb5=yes; then
14255 KRB5LIB=-lkrb5
14256 LIBS="$KRB5LIB $LIBS"
14257
14258 $as_echo "#define HAVE_LIBKRB5 1" >>confdefs.h
14259
14260 fi
14261 if test "${with_kerberos5}" = no; then
14262 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes425" >&5
14263 $as_echo_n "checking for des_cbc_encrypt in -ldes425... " >&6; }
14264 if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then :
14265 $as_echo_n "(cached) " >&6
14266 else
14267 ac_check_lib_save_LIBS=$LIBS
14268 LIBS="-ldes425 $LIBS"
14269 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14270 /* end confdefs.h. */
14271
14272 /* Override any GCC internal prototype to avoid an error.
14273 Use char because int might match the return type of a GCC
14274 builtin and then its argument prototype would still apply. */
14275 #ifdef __cplusplus
14276 extern "C"
14277 #endif
14278 char des_cbc_encrypt ();
14279 int
14280 main ()
14281 {
14282 return des_cbc_encrypt ();
14283 ;
14284 return 0;
14285 }
14286 _ACEOF
14287 if ac_fn_c_try_link "$LINENO"; then :
14288 ac_cv_lib_des425_des_cbc_encrypt=yes
14289 else
14290 ac_cv_lib_des425_des_cbc_encrypt=no
14291 fi
14292 rm -f core conftest.err conftest.$ac_objext \
14293 conftest$ac_exeext conftest.$ac_ext
14294 LIBS=$ac_check_lib_save_LIBS
14295 fi
14296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
14297 $as_echo "$ac_cv_lib_des425_des_cbc_encrypt" >&6; }
14298 if test "x$ac_cv_lib_des425_des_cbc_encrypt" = x""yes; then :
14299 have_des425=yes
14300 else
14301 have_des425=no
14302 fi
14303
14304 if test $have_des425 = yes; then
14305 DESLIB=-ldes425
14306 LIBS="$DESLIB $LIBS"
14307
14308 $as_echo "#define HAVE_LIBDES425 1" >>confdefs.h
14309
14310 else
14311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes" >&5
14312 $as_echo_n "checking for des_cbc_encrypt in -ldes... " >&6; }
14313 if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then :
14314 $as_echo_n "(cached) " >&6
14315 else
14316 ac_check_lib_save_LIBS=$LIBS
14317 LIBS="-ldes $LIBS"
14318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14319 /* end confdefs.h. */
14320
14321 /* Override any GCC internal prototype to avoid an error.
14322 Use char because int might match the return type of a GCC
14323 builtin and then its argument prototype would still apply. */
14324 #ifdef __cplusplus
14325 extern "C"
14326 #endif
14327 char des_cbc_encrypt ();
14328 int
14329 main ()
14330 {
14331 return des_cbc_encrypt ();
14332 ;
14333 return 0;
14334 }
14335 _ACEOF
14336 if ac_fn_c_try_link "$LINENO"; then :
14337 ac_cv_lib_des_des_cbc_encrypt=yes
14338 else
14339 ac_cv_lib_des_des_cbc_encrypt=no
14340 fi
14341 rm -f core conftest.err conftest.$ac_objext \
14342 conftest$ac_exeext conftest.$ac_ext
14343 LIBS=$ac_check_lib_save_LIBS
14344 fi
14345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
14346 $as_echo "$ac_cv_lib_des_des_cbc_encrypt" >&6; }
14347 if test "x$ac_cv_lib_des_des_cbc_encrypt" = x""yes; then :
14348 have_des=yes
14349 else
14350 have_des=no
14351 fi
14352
14353 if test $have_des = yes; then
14354 DESLIB=-ldes
14355 LIBS="$DESLIB $LIBS"
14356
14357 $as_echo "#define HAVE_LIBDES 1" >>confdefs.h
14358
14359 fi
14360 fi
14361 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb4" >&5
14362 $as_echo_n "checking for krb_get_cred in -lkrb4... " >&6; }
14363 if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then :
14364 $as_echo_n "(cached) " >&6
14365 else
14366 ac_check_lib_save_LIBS=$LIBS
14367 LIBS="-lkrb4 $LIBS"
14368 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14369 /* end confdefs.h. */
14370
14371 /* Override any GCC internal prototype to avoid an error.
14372 Use char because int might match the return type of a GCC
14373 builtin and then its argument prototype would still apply. */
14374 #ifdef __cplusplus
14375 extern "C"
14376 #endif
14377 char krb_get_cred ();
14378 int
14379 main ()
14380 {
14381 return krb_get_cred ();
14382 ;
14383 return 0;
14384 }
14385 _ACEOF
14386 if ac_fn_c_try_link "$LINENO"; then :
14387 ac_cv_lib_krb4_krb_get_cred=yes
14388 else
14389 ac_cv_lib_krb4_krb_get_cred=no
14390 fi
14391 rm -f core conftest.err conftest.$ac_objext \
14392 conftest$ac_exeext conftest.$ac_ext
14393 LIBS=$ac_check_lib_save_LIBS
14394 fi
14395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb4_krb_get_cred" >&5
14396 $as_echo "$ac_cv_lib_krb4_krb_get_cred" >&6; }
14397 if test "x$ac_cv_lib_krb4_krb_get_cred" = x""yes; then :
14398 have_krb4=yes
14399 else
14400 have_krb4=no
14401 fi
14402
14403 if test $have_krb4 = yes; then
14404 KRB4LIB=-lkrb4
14405 LIBS="$KRB4LIB $LIBS"
14406
14407 $as_echo "#define HAVE_LIBKRB4 1" >>confdefs.h
14408
14409 else
14410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb" >&5
14411 $as_echo_n "checking for krb_get_cred in -lkrb... " >&6; }
14412 if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then :
14413 $as_echo_n "(cached) " >&6
14414 else
14415 ac_check_lib_save_LIBS=$LIBS
14416 LIBS="-lkrb $LIBS"
14417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14418 /* end confdefs.h. */
14419
14420 /* Override any GCC internal prototype to avoid an error.
14421 Use char because int might match the return type of a GCC
14422 builtin and then its argument prototype would still apply. */
14423 #ifdef __cplusplus
14424 extern "C"
14425 #endif
14426 char krb_get_cred ();
14427 int
14428 main ()
14429 {
14430 return krb_get_cred ();
14431 ;
14432 return 0;
14433 }
14434 _ACEOF
14435 if ac_fn_c_try_link "$LINENO"; then :
14436 ac_cv_lib_krb_krb_get_cred=yes
14437 else
14438 ac_cv_lib_krb_krb_get_cred=no
14439 fi
14440 rm -f core conftest.err conftest.$ac_objext \
14441 conftest$ac_exeext conftest.$ac_ext
14442 LIBS=$ac_check_lib_save_LIBS
14443 fi
14444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb_krb_get_cred" >&5
14445 $as_echo "$ac_cv_lib_krb_krb_get_cred" >&6; }
14446 if test "x$ac_cv_lib_krb_krb_get_cred" = x""yes; then :
14447 have_krb=yes
14448 else
14449 have_krb=no
14450 fi
14451
14452 if test $have_krb = yes; then
14453 KRB4LIB=-lkrb
14454 LIBS="$KRB4LIB $LIBS"
14455
14456 $as_echo "#define HAVE_LIBKRB 1" >>confdefs.h
14457
14458 fi
14459 fi
14460 fi
14461
14462 if test "${with_kerberos5}" != no; then
14463 for ac_header in krb5.h
14464 do :
14465 ac_fn_c_check_header_mongrel "$LINENO" "krb5.h" "ac_cv_header_krb5_h" "$ac_includes_default"
14466 if test "x$ac_cv_header_krb5_h" = x""yes; then :
14467 cat >>confdefs.h <<_ACEOF
14468 #define HAVE_KRB5_H 1
14469 _ACEOF
14470 ac_fn_c_check_member "$LINENO" "krb5_error" "text" "ac_cv_member_krb5_error_text" "#include <krb5.h>
14471 "
14472 if test "x$ac_cv_member_krb5_error_text" = x""yes; then :
14473
14474 cat >>confdefs.h <<_ACEOF
14475 #define HAVE_KRB5_ERROR_TEXT 1
14476 _ACEOF
14477
14478
14479 fi
14480 ac_fn_c_check_member "$LINENO" "krb5_error" "e_text" "ac_cv_member_krb5_error_e_text" "#include <krb5.h>
14481 "
14482 if test "x$ac_cv_member_krb5_error_e_text" = x""yes; then :
14483
14484 cat >>confdefs.h <<_ACEOF
14485 #define HAVE_KRB5_ERROR_E_TEXT 1
14486 _ACEOF
14487
14488
14489 fi
14490
14491 fi
14492
14493 done
14494
14495 else
14496 for ac_header in des.h
14497 do :
14498 ac_fn_c_check_header_mongrel "$LINENO" "des.h" "ac_cv_header_des_h" "$ac_includes_default"
14499 if test "x$ac_cv_header_des_h" = x""yes; then :
14500 cat >>confdefs.h <<_ACEOF
14501 #define HAVE_DES_H 1
14502 _ACEOF
14503
14504 else
14505 for ac_header in kerberosIV/des.h
14506 do :
14507 ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/des.h" "ac_cv_header_kerberosIV_des_h" "$ac_includes_default"
14508 if test "x$ac_cv_header_kerberosIV_des_h" = x""yes; then :
14509 cat >>confdefs.h <<_ACEOF
14510 #define HAVE_KERBEROSIV_DES_H 1
14511 _ACEOF
14512
14513 else
14514 for ac_header in kerberos/des.h
14515 do :
14516 ac_fn_c_check_header_mongrel "$LINENO" "kerberos/des.h" "ac_cv_header_kerberos_des_h" "$ac_includes_default"
14517 if test "x$ac_cv_header_kerberos_des_h" = x""yes; then :
14518 cat >>confdefs.h <<_ACEOF
14519 #define HAVE_KERBEROS_DES_H 1
14520 _ACEOF
14521
14522 fi
14523
14524 done
14525
14526 fi
14527
14528 done
14529
14530 fi
14531
14532 done
14533
14534 for ac_header in krb.h
14535 do :
14536 ac_fn_c_check_header_mongrel "$LINENO" "krb.h" "ac_cv_header_krb_h" "$ac_includes_default"
14537 if test "x$ac_cv_header_krb_h" = x""yes; then :
14538 cat >>confdefs.h <<_ACEOF
14539 #define HAVE_KRB_H 1
14540 _ACEOF
14541
14542 else
14543 for ac_header in kerberosIV/krb.h
14544 do :
14545 ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/krb.h" "ac_cv_header_kerberosIV_krb_h" "$ac_includes_default"
14546 if test "x$ac_cv_header_kerberosIV_krb_h" = x""yes; then :
14547 cat >>confdefs.h <<_ACEOF
14548 #define HAVE_KERBEROSIV_KRB_H 1
14549 _ACEOF
14550
14551 else
14552 for ac_header in kerberos/krb.h
14553 do :
14554 ac_fn_c_check_header_mongrel "$LINENO" "kerberos/krb.h" "ac_cv_header_kerberos_krb_h" "$ac_includes_default"
14555 if test "x$ac_cv_header_kerberos_krb_h" = x""yes; then :
14556 cat >>confdefs.h <<_ACEOF
14557 #define HAVE_KERBEROS_KRB_H 1
14558 _ACEOF
14559
14560 fi
14561
14562 done
14563
14564 fi
14565
14566 done
14567
14568 fi
14569
14570 done
14571
14572 fi
14573 for ac_header in com_err.h
14574 do :
14575 ac_fn_c_check_header_mongrel "$LINENO" "com_err.h" "ac_cv_header_com_err_h" "$ac_includes_default"
14576 if test "x$ac_cv_header_com_err_h" = x""yes; then :
14577 cat >>confdefs.h <<_ACEOF
14578 #define HAVE_COM_ERR_H 1
14579 _ACEOF
14580
14581 fi
14582
14583 done
14584
14585 fi
14586
14587
14588
14589
14590
14591
14592
14593
14594
14595
14596 for ac_func in $ac_func_list
14597 do :
14598 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14599 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14600 eval as_val=\$$as_ac_var
14601 if test "x$as_val" = x""yes; then :
14602 cat >>confdefs.h <<_ACEOF
14603 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14604 _ACEOF
14605
14606 fi
14607 done
14608
14609
14610
14611
14612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime caches TZ" >&5
14613 $as_echo_n "checking whether localtime caches TZ... " >&6; }
14614 if test "${emacs_cv_localtime_cache+set}" = set; then :
14615 $as_echo_n "(cached) " >&6
14616 else
14617 if test x$ac_cv_func_tzset = xyes; then
14618 if test "$cross_compiling" = yes; then :
14619 # If we have tzset, assume the worst when cross-compiling.
14620 emacs_cv_localtime_cache=yes
14621 else
14622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14623 /* end confdefs.h. */
14624 #include <time.h>
14625 char TZ_GMT0[] = "TZ=GMT0";
14626 char TZ_PST8[] = "TZ=PST8";
14627 main()
14628 {
14629 time_t now = time ((time_t *) 0);
14630 int hour_GMT0, hour_unset;
14631 if (putenv (TZ_GMT0) != 0)
14632 exit (1);
14633 hour_GMT0 = localtime (&now)->tm_hour;
14634 unsetenv("TZ");
14635 hour_unset = localtime (&now)->tm_hour;
14636 if (putenv (TZ_PST8) != 0)
14637 exit (1);
14638 if (localtime (&now)->tm_hour == hour_GMT0)
14639 exit (1);
14640 unsetenv("TZ");
14641 if (localtime (&now)->tm_hour != hour_unset)
14642 exit (1);
14643 exit (0);
14644 }
14645 _ACEOF
14646 if ac_fn_c_try_run "$LINENO"; then :
14647 emacs_cv_localtime_cache=no
14648 else
14649 emacs_cv_localtime_cache=yes
14650 fi
14651 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14652 conftest.$ac_objext conftest.beam conftest.$ac_ext
14653 fi
14654
14655 else
14656 # If we lack tzset, report that localtime does not cache TZ,
14657 # since we can't invalidate the cache if we don't have tzset.
14658 emacs_cv_localtime_cache=no
14659 fi
14660 fi
14661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_localtime_cache" >&5
14662 $as_echo "$emacs_cv_localtime_cache" >&6; }
14663 if test $emacs_cv_localtime_cache = yes; then
14664
14665 $as_echo "#define LOCALTIME_CACHE 1" >>confdefs.h
14666
14667 fi
14668
14669 ok_so_far=yes
14670 ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket"
14671 if test "x$ac_cv_func_socket" = x""yes; then :
14672
14673 else
14674 ok_so_far=no
14675 fi
14676
14677 if test $ok_so_far = yes; then
14678 ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
14679 if test "x$ac_cv_header_netinet_in_h" = x""yes; then :
14680
14681 else
14682 ok_so_far=no
14683 fi
14684
14685
14686 fi
14687 if test $ok_so_far = yes; then
14688 ac_fn_c_check_header_mongrel "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default"
14689 if test "x$ac_cv_header_arpa_inet_h" = x""yes; then :
14690
14691 else
14692 ok_so_far=no
14693 fi
14694
14695
14696 fi
14697 if test $ok_so_far = yes; then
14698
14699 $as_echo "#define HAVE_INET_SOCKETS 1" >>confdefs.h
14700
14701 fi
14702
14703 if test -f /usr/lpp/X11/bin/smt.exp; then
14704
14705 $as_echo "#define HAVE_AIX_SMT_EXP 1" >>confdefs.h
14706
14707 fi
14708
14709 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system supports dynamic ptys" >&5
14710 $as_echo_n "checking whether system supports dynamic ptys... " >&6; }
14711 if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
14712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14713 $as_echo "yes" >&6; }
14714
14715 $as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
14716
14717 else
14718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14719 $as_echo "no" >&6; }
14720 fi
14721
14722 case $canonical in
14723 *-solaris2.4 | *-solaris2.4.*)
14724 : ${ac_cv_func_vfork_works=no};;
14725 esac
14726
14727 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
14728 if test "x$ac_cv_type_pid_t" = x""yes; then :
14729
14730 else
14731
14732 cat >>confdefs.h <<_ACEOF
14733 #define pid_t int
14734 _ACEOF
14735
14736 fi
14737
14738 for ac_header in vfork.h
14739 do :
14740 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
14741 if test "x$ac_cv_header_vfork_h" = x""yes; then :
14742 cat >>confdefs.h <<_ACEOF
14743 #define HAVE_VFORK_H 1
14744 _ACEOF
14745
14746 fi
14747
14748 done
14749
14750 for ac_func in fork vfork
14751 do :
14752 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14753 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14754 eval as_val=\$$as_ac_var
14755 if test "x$as_val" = x""yes; then :
14756 cat >>confdefs.h <<_ACEOF
14757 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14758 _ACEOF
14759
14760 fi
14761 done
14762
14763 if test "x$ac_cv_func_fork" = xyes; then
14764 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
14765 $as_echo_n "checking for working fork... " >&6; }
14766 if test "${ac_cv_func_fork_works+set}" = set; then :
14767 $as_echo_n "(cached) " >&6
14768 else
14769 if test "$cross_compiling" = yes; then :
14770 ac_cv_func_fork_works=cross
14771 else
14772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14773 /* end confdefs.h. */
14774 $ac_includes_default
14775 int
14776 main ()
14777 {
14778
14779 /* By Ruediger Kuhlmann. */
14780 return fork () < 0;
14781
14782 ;
14783 return 0;
14784 }
14785 _ACEOF
14786 if ac_fn_c_try_run "$LINENO"; then :
14787 ac_cv_func_fork_works=yes
14788 else
14789 ac_cv_func_fork_works=no
14790 fi
14791 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14792 conftest.$ac_objext conftest.beam conftest.$ac_ext
14793 fi
14794
14795 fi
14796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
14797 $as_echo "$ac_cv_func_fork_works" >&6; }
14798
14799 else
14800 ac_cv_func_fork_works=$ac_cv_func_fork
14801 fi
14802 if test "x$ac_cv_func_fork_works" = xcross; then
14803 case $host in
14804 *-*-amigaos* | *-*-msdosdjgpp*)
14805 # Override, as these systems have only a dummy fork() stub
14806 ac_cv_func_fork_works=no
14807 ;;
14808 *)
14809 ac_cv_func_fork_works=yes
14810 ;;
14811 esac
14812 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
14813 $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
14814 fi
14815 ac_cv_func_vfork_works=$ac_cv_func_vfork
14816 if test "x$ac_cv_func_vfork" = xyes; then
14817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
14818 $as_echo_n "checking for working vfork... " >&6; }
14819 if test "${ac_cv_func_vfork_works+set}" = set; then :
14820 $as_echo_n "(cached) " >&6
14821 else
14822 if test "$cross_compiling" = yes; then :
14823 ac_cv_func_vfork_works=cross
14824 else
14825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14826 /* end confdefs.h. */
14827 /* Thanks to Paul Eggert for this test. */
14828 $ac_includes_default
14829 #include <sys/wait.h>
14830 #ifdef HAVE_VFORK_H
14831 # include <vfork.h>
14832 #endif
14833 /* On some sparc systems, changes by the child to local and incoming
14834 argument registers are propagated back to the parent. The compiler
14835 is told about this with #include <vfork.h>, but some compilers
14836 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
14837 static variable whose address is put into a register that is
14838 clobbered by the vfork. */
14839 static void
14840 #ifdef __cplusplus
14841 sparc_address_test (int arg)
14842 # else
14843 sparc_address_test (arg) int arg;
14844 #endif
14845 {
14846 static pid_t child;
14847 if (!child) {
14848 child = vfork ();
14849 if (child < 0) {
14850 perror ("vfork");
14851 _exit(2);
14852 }
14853 if (!child) {
14854 arg = getpid();
14855 write(-1, "", 0);
14856 _exit (arg);
14857 }
14858 }
14859 }
14860
14861 int
14862 main ()
14863 {
14864 pid_t parent = getpid ();
14865 pid_t child;
14866
14867 sparc_address_test (0);
14868
14869 child = vfork ();
14870
14871 if (child == 0) {
14872 /* Here is another test for sparc vfork register problems. This
14873 test uses lots of local variables, at least as many local
14874 variables as main has allocated so far including compiler
14875 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
14876 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
14877 reuse the register of parent for one of the local variables,
14878 since it will think that parent can't possibly be used any more
14879 in this routine. Assigning to the local variable will thus
14880 munge parent in the parent process. */
14881 pid_t
14882 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
14883 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
14884 /* Convince the compiler that p..p7 are live; otherwise, it might
14885 use the same hardware register for all 8 local variables. */
14886 if (p != p1 || p != p2 || p != p3 || p != p4
14887 || p != p5 || p != p6 || p != p7)
14888 _exit(1);
14889
14890 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
14891 from child file descriptors. If the child closes a descriptor
14892 before it execs or exits, this munges the parent's descriptor
14893 as well. Test for this by closing stdout in the child. */
14894 _exit(close(fileno(stdout)) != 0);
14895 } else {
14896 int status;
14897 struct stat st;
14898
14899 while (wait(&status) != child)
14900 ;
14901 return (
14902 /* Was there some problem with vforking? */
14903 child < 0
14904
14905 /* Did the child fail? (This shouldn't happen.) */
14906 || status
14907
14908 /* Did the vfork/compiler bug occur? */
14909 || parent != getpid()
14910
14911 /* Did the file descriptor bug occur? */
14912 || fstat(fileno(stdout), &st) != 0
14913 );
14914 }
14915 }
14916 _ACEOF
14917 if ac_fn_c_try_run "$LINENO"; then :
14918 ac_cv_func_vfork_works=yes
14919 else
14920 ac_cv_func_vfork_works=no
14921 fi
14922 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14923 conftest.$ac_objext conftest.beam conftest.$ac_ext
14924 fi
14925
14926 fi
14927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
14928 $as_echo "$ac_cv_func_vfork_works" >&6; }
14929
14930 fi;
14931 if test "x$ac_cv_func_fork_works" = xcross; then
14932 ac_cv_func_vfork_works=$ac_cv_func_vfork
14933 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
14934 $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
14935 fi
14936
14937 if test "x$ac_cv_func_vfork_works" = xyes; then
14938
14939 $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
14940
14941 else
14942
14943 $as_echo "#define vfork fork" >>confdefs.h
14944
14945 fi
14946 if test "x$ac_cv_func_fork_works" = xyes; then
14947
14948 $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
14949
14950 fi
14951
14952
14953 for ac_func in snprintf
14954 do :
14955 ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
14956 if test "x$ac_cv_func_snprintf" = x""yes; then :
14957 cat >>confdefs.h <<_ACEOF
14958 #define HAVE_SNPRINTF 1
14959 _ACEOF
14960
14961 fi
14962 done
14963
14964
14965 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
14966 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
14967 if test "${emacs_cv_langinfo_codeset+set}" = set; then :
14968 $as_echo_n "(cached) " >&6
14969 else
14970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14971 /* end confdefs.h. */
14972 #include <langinfo.h>
14973 int
14974 main ()
14975 {
14976 char* cs = nl_langinfo(CODESET);
14977 ;
14978 return 0;
14979 }
14980 _ACEOF
14981 if ac_fn_c_try_link "$LINENO"; then :
14982 emacs_cv_langinfo_codeset=yes
14983 else
14984 emacs_cv_langinfo_codeset=no
14985 fi
14986 rm -f core conftest.err conftest.$ac_objext \
14987 conftest$ac_exeext conftest.$ac_ext
14988
14989 fi
14990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_langinfo_codeset" >&5
14991 $as_echo "$emacs_cv_langinfo_codeset" >&6; }
14992 if test $emacs_cv_langinfo_codeset = yes; then
14993
14994 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
14995
14996 fi
14997
14998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
14999 $as_echo_n "checking for mbstate_t... " >&6; }
15000 if test "${ac_cv_type_mbstate_t+set}" = set; then :
15001 $as_echo_n "(cached) " >&6
15002 else
15003 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15004 /* end confdefs.h. */
15005 $ac_includes_default
15006 # include <wchar.h>
15007 int
15008 main ()
15009 {
15010 mbstate_t x; return sizeof x;
15011 ;
15012 return 0;
15013 }
15014 _ACEOF
15015 if ac_fn_c_try_compile "$LINENO"; then :
15016 ac_cv_type_mbstate_t=yes
15017 else
15018 ac_cv_type_mbstate_t=no
15019 fi
15020 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15021 fi
15022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
15023 $as_echo "$ac_cv_type_mbstate_t" >&6; }
15024 if test $ac_cv_type_mbstate_t = yes; then
15025
15026 $as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
15027
15028 else
15029
15030 $as_echo "#define mbstate_t int" >>confdefs.h
15031
15032 fi
15033
15034 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C restricted array declarations" >&5
15035 $as_echo_n "checking for C restricted array declarations... " >&6; }
15036 if test "${emacs_cv_c_restrict_arr+set}" = set; then :
15037 $as_echo_n "(cached) " >&6
15038 else
15039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15040 /* end confdefs.h. */
15041 void fred (int x[__restrict]);
15042 int
15043 main ()
15044 {
15045
15046 ;
15047 return 0;
15048 }
15049 _ACEOF
15050 if ac_fn_c_try_compile "$LINENO"; then :
15051 emacs_cv_c_restrict_arr=yes
15052 else
15053 emacs_cv_c_restrict_arr=no
15054 fi
15055 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15056 fi
15057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_c_restrict_arr" >&5
15058 $as_echo "$emacs_cv_c_restrict_arr" >&6; }
15059 if test "$emacs_cv_c_restrict_arr" = yes; then
15060
15061 $as_echo "#define __restrict_arr __restrict" >>confdefs.h
15062
15063 fi
15064
15065
15066
15067 $as_echo "#define AMPERSAND_FULL_NAME 1" >>confdefs.h
15068
15069
15070
15071 $as_echo "#define CLASH_DETECTION 1" >>confdefs.h
15072
15073
15074 ## Note: PTYs are broken on darwin <6. Use at your own risk.
15075
15076 $as_echo "#define HAVE_PTYS 1" >>confdefs.h
15077
15078
15079
15080 $as_echo "#define HAVE_SOCKETS 1" >>confdefs.h
15081
15082
15083
15084
15085
15086 $as_echo "#define NULL_DEVICE \"/dev/null\"" >>confdefs.h
15087
15088
15089
15090 $as_echo "#define SEPCHAR ':'" >>confdefs.h
15091
15092
15093
15094 $as_echo "#define subprocesses 1" >>confdefs.h
15095
15096
15097
15098 $as_echo "#define USER_FULL_NAME pw->pw_gecos" >>confdefs.h
15099
15100
15101
15102
15103 $as_echo "#define DIRECTORY_SEP '/'" >>confdefs.h
15104
15105
15106
15107
15108
15109 $as_echo "#define IS_DEVICE_SEP(_c_) 0" >>confdefs.h
15110
15111
15112
15113 $as_echo "#define IS_DIRECTORY_SEP(_c_) ((_c_) == DIRECTORY_SEP)" >>confdefs.h
15114
15115
15116
15117 $as_echo "#define IS_ANY_SEP(_c_) (IS_DIRECTORY_SEP (_c_))" >>confdefs.h
15118
15119
15120
15121
15122
15123 case $opsys in
15124 aix4-2)
15125 if test x$ac_cv_lib_Xmu_XmuConvertStandardSelection != xyes; then
15126 $as_echo "#define NO_EDITRES 1" >>confdefs.h
15127
15128 fi
15129 ;;
15130
15131 hpux*)
15132 $as_echo "#define NO_EDITRES 1" >>confdefs.h
15133
15134 ;;
15135 esac
15136
15137
15138 case $opsys in
15139 irix6-5 | sol2* | unixware )
15140
15141 $as_echo "#define NSIG_MINIMUM 32" >>confdefs.h
15142
15143 ;;
15144 esac
15145
15146 emacs_broken_SIGIO=no
15147
15148 case $opsys in
15149 hpux* | irix6-5 | openbsd | sol2* | unixware )
15150 emacs_broken_SIGIO=yes
15151 ;;
15152
15153 aix4-2)
15154
15155 $as_echo "#define BROKEN_GET_CURRENT_DIR_NAME 1" >>confdefs.h
15156
15157 ;;
15158
15159 freebsd)
15160
15161 $as_echo "#define BROKEN_PTY_READ_AFTER_EAGAIN 1" >>confdefs.h
15162
15163 ;;
15164 esac
15165
15166 case $opsys in
15167 gnu-* | sol2-10 )
15168
15169 $as_echo "#define HAVE_PROCFS 1" >>confdefs.h
15170
15171 ;;
15172 esac
15173
15174 case $opsys in
15175 darwin | freebsd | netbsd | openbsd )
15176
15177 $as_echo "#define DONT_REOPEN_PTY 1" >>confdefs.h
15178
15179 ;;
15180 esac
15181
15182 case $opsys in
15183 netbsd | openbsd) sound_device="/dev/audio" ;;
15184 *) sound_device="/dev/dsp" ;;
15185 esac
15186
15187
15188 cat >>confdefs.h <<_ACEOF
15189 #define DEFAULT_SOUND_DEVICE "$sound_device"
15190 _ACEOF
15191
15192
15193
15194 case $opsys in
15195 darwin | gnu-linux | gnu-kfreebsd )
15196
15197 $as_echo "#define INTERRUPT_INPUT 1" >>confdefs.h
15198
15199 ;;
15200 esac
15201
15202
15203 case $opsys in
15204 cygwin|gnu|gnu-linux|gnu-kfreebsd|irix6-5|freebsd|netbsd|openbsd)
15205
15206 $as_echo "#define NARROWPROTO 1" >>confdefs.h
15207
15208 ;;
15209 esac
15210
15211
15212
15213
15214
15215
15216
15217
15218 case $opsys in
15219 aix4-2 )
15220 $as_echo "#define PTY_ITERATION int c; for (c = 0; !c ; c++)" >>confdefs.h
15221
15222 $as_echo "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptc\");" >>confdefs.h
15223
15224 $as_echo "#define PTY_TTY_NAME_SPRINTF strcpy (pty_name, ttyname (fd));" >>confdefs.h
15225
15226 ;;
15227
15228 cygwin )
15229 $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++)" >>confdefs.h
15230
15231 $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
15232
15233 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
15234
15235 $as_echo "#define PTY_TTY_NAME_SPRINTF /**/" >>confdefs.h
15236
15237 ;;
15238
15239 darwin )
15240 $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++)" >>confdefs.h
15241
15242 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
15243
15244 $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
15245
15246 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
15247
15248 $as_echo "#define PTY_TTY_NAME_SPRINTF /**/" >>confdefs.h
15249
15250 ;;
15251
15252 gnu | openbsd )
15253 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
15254
15255 ;;
15256
15257 gnu-linux | gnu-kfreebsd | freebsd | netbsd )
15258 if test "x$ac_cv_func_grantpt" = xyes; then
15259
15260 $as_echo "#define UNIX98_PTYS 1" >>confdefs.h
15261
15262 $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++)" >>confdefs.h
15263
15264 $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
15265
15266 if test "x$ac_cv_func_posix_openpt" = xyes; then
15267 $as_echo "#define PTY_OPEN fd = posix_openpt (O_RDWR | O_NOCTTY)" >>confdefs.h
15268
15269 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
15270
15271 elif test "x$ac_cv_func_getpt" = xyes; then
15272 $as_echo "#define PTY_OPEN fd = getpt ()" >>confdefs.h
15273
15274 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
15275
15276 else
15277 $as_echo "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptmx\");" >>confdefs.h
15278
15279 fi
15280 else
15281 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
15282
15283 fi
15284 ;;
15285
15286 hpux*)
15287 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
15288
15289 $as_echo "#define PTY_NAME_SPRINTF sprintf (pty_name, \"/dev/ptym/pty%c%x\", c, i);" >>confdefs.h
15290
15291 $as_echo "#define PTY_TTY_NAME_SPRINTF sprintf (pty_name, \"/dev/pty/tty%c%x\", c, i);" >>confdefs.h
15292
15293 ;;
15294
15295 irix6-5 )
15296 $as_echo "#define PTY_ITERATION /**/" >>confdefs.h
15297
15298 $as_echo "#define FIRST_PTY_LETTER 'q'" >>confdefs.h
15299
15300 $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(SIGCLD, &cstat, &ocstat); name = _getpty (&fd, O_RDWR | O_NDELAY, 0600, 0); sigaction(SIGCLD, &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
15301
15302 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
15303
15304 $as_echo "#define PTY_TTY_NAME_SPRINTF /**/" >>confdefs.h
15305
15306 ;;
15307
15308 sol2* )
15309 $as_echo "#define PTY_TTY_NAME_SPRINTF { char *ptsname (int), *ptyname; int grantpt_result; sigset_t blocked; sigemptyset (&blocked); sigaddset (&blocked, SIGCLD); 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
15310
15311 ;;
15312
15313 unixware )
15314 $as_echo "#define PTY_TTY_NAME_SPRINTF { char *ptsname (int), *ptyname; int grantpt_result; sigset_t blocked; sigemptyset (&blocked); sigaddset (&blocked, SIGCLD); 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
15315
15316 ;;
15317 esac
15318
15319
15320 case $opsys in
15321 sol2* | unixware )
15322 $as_echo "#define FIRST_PTY_LETTER 'z'" >>confdefs.h
15323
15324 $as_echo "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptmx\");" >>confdefs.h
15325
15326
15327 $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
15328
15329 ;;
15330 esac
15331
15332
15333
15334
15335 case $opsys in
15336 aix4-2 | cygwin | gnu | irix6-5 | freebsd | netbsd | openbsd | darwin )
15337 $as_echo "#define SIGNALS_VIA_CHARACTERS 1" >>confdefs.h
15338
15339 ;;
15340
15341 gnu-linux | gnu-kfreebsd )
15342
15343 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signals via characters" >&5
15344 $as_echo_n "checking for signals via characters... " >&6; }
15345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15346 /* end confdefs.h. */
15347
15348 #include <linux/version.h>
15349 #if LINUX_VERSION_CODE < 0x20400
15350 # error "Linux version too old"
15351 #endif
15352
15353 int
15354 main ()
15355 {
15356
15357 ;
15358 return 0;
15359 }
15360 _ACEOF
15361 if ac_fn_c_try_cpp "$LINENO"; then :
15362 emacs_signals_via_chars=yes
15363 else
15364 emacs_signals_via_chars=no
15365 fi
15366 rm -f conftest.err conftest.$ac_ext
15367
15368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_signals_via_chars" >&5
15369 $as_echo "$emacs_signals_via_chars" >&6; }
15370 test $emacs_signals_via_chars = yes && $as_echo "#define SIGNALS_VIA_CHARACTERS 1" >>confdefs.h
15371
15372 ;;
15373 esac
15374
15375
15376
15377
15378 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C library" >&5
15379 $as_echo_n "checking whether we are using the GNU C library... " >&6; }
15380 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15381 /* end confdefs.h. */
15382
15383 #include <features.h>
15384 #ifndef __GNU_LIBRARY__
15385 # error "this is not the GNU C library"
15386 #endif
15387
15388 int
15389 main ()
15390 {
15391
15392 ;
15393 return 0;
15394 }
15395 _ACEOF
15396 if ac_fn_c_try_cpp "$LINENO"; then :
15397 emacs_glibc=yes
15398 else
15399 emacs_glibc=no
15400 fi
15401 rm -f conftest.err conftest.$ac_ext
15402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_glibc" >&5
15403 $as_echo "$emacs_glibc" >&6; }
15404
15405 if test $emacs_glibc = yes; then
15406
15407 emacs_pending_output=unknown
15408
15409 case $opsys in
15410 gnu | gnu-linux | gnu-kfreebsd )
15411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of pending output formalism" >&5
15412 $as_echo_n "checking for style of pending output formalism... " >&6; }
15413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15414 /* end confdefs.h. */
15415
15416 #include <stdio.h>
15417 #if !defined (_IO_STDIO_H) && !defined (_STDIO_USES_IOSTREAM)
15418 # error "stdio definitions not found"
15419 #endif
15420
15421 int
15422 main ()
15423 {
15424
15425 ;
15426 return 0;
15427 }
15428 _ACEOF
15429 if ac_fn_c_try_cpp "$LINENO"; then :
15430 emacs_pending_output=new
15431 fi
15432 rm -f conftest.err conftest.$ac_ext
15433
15434 if test $emacs_pending_output = unknown; then
15435 case $opsys in
15436 gnu-linux | gnu-kfreebsd)
15437 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15438 /* end confdefs.h. */
15439
15440 #include <stdio.h>
15441 #ifndef __UCLIBC__
15442 # error "not using uclibc"
15443 #endif
15444
15445 int
15446 main ()
15447 {
15448
15449 ;
15450 return 0;
15451 }
15452 _ACEOF
15453 if ac_fn_c_try_cpp "$LINENO"; then :
15454 emacs_pending_output=uclibc
15455 else
15456 emacs_pending_output=old
15457 fi
15458 rm -f conftest.err conftest.$ac_ext
15459 ;;
15460 esac
15461 fi
15462
15463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_pending_output" >&5
15464 $as_echo "$emacs_pending_output" >&6; }
15465
15466 case $emacs_pending_output in
15467 new)
15468 $as_echo "#define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_IO_write_ptr - (FILE)->_IO_write_base)" >>confdefs.h
15469
15470 ;;
15471 uclibc)
15472 $as_echo "#define PENDING_OUTPUT_COUNT(FILE) ((FILE)->__bufpos - (FILE)->__bufstart)" >>confdefs.h
15473
15474 ;;
15475 old)
15476 $as_echo "#define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_pptr - (FILE)->_pbase)" >>confdefs.h
15477
15478 ;;
15479 esac
15480 ;;
15481 esac
15482 if test $emacs_pending_output = unknown; then
15483 $as_echo "#define PENDING_OUTPUT_COUNT(FILE) ((FILE)->__bufp - (FILE)->__buffer)" >>confdefs.h
15484
15485 fi
15486
15487 else
15488 case $opsys in
15489 cygwin | darwin | freebsd | netbsd | openbsd )
15490 $as_echo "#define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_p - (FILE)->_bf._base)" >>confdefs.h
15491
15492 ;;
15493
15494 unixware)
15495 $as_echo "#define PENDING_OUTPUT_COUNT(FILE) ((FILE)->__ptr - (FILE)->__base)" >>confdefs.h
15496
15497 ;;
15498
15499 *)
15500 if test x$ac_cv_header_stdio_ext_h = xyes && \
15501 test x$ac_cv_func___fpending = xyes; then
15502 $as_echo "#define PENDING_OUTPUT_COUNT(FILE) __fpending (FILE)" >>confdefs.h
15503
15504
15505 $as_echo "#define DISPNEW_NEEDS_STDIO_EXT 1" >>confdefs.h
15506
15507 else
15508 $as_echo "#define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_ptr - (FILE)->_base)" >>confdefs.h
15509
15510 fi
15511 ;;
15512 esac
15513 fi
15514
15515
15516
15517
15518 case $opsys in
15519 gnu)
15520 $as_echo "#define DATA_START ({ extern int data_start; (char *) &data_start; })" >>confdefs.h
15521
15522 ;;
15523
15524 hpux*)
15525 $as_echo "#define DATA_START 0x40000000" >>confdefs.h
15526
15527 $as_echo "#define DATA_SEG_BITS 0x40000000" >>confdefs.h
15528
15529 ;;
15530 irix6-5)
15531 $as_echo "#define DATA_START 0x10000000" >>confdefs.h
15532
15533 $as_echo "#define DATA_SEG_BITS 0x10000000" >>confdefs.h
15534
15535 ;;
15536 esac
15537
15538
15539
15540
15541
15542 case $opsys in
15543 darwin) $as_echo "#define TAB3 OXTABS" >>confdefs.h
15544 ;;
15545
15546 gnu | freebsd | netbsd | openbsd )
15547
15548 $as_echo "#define TABDLY OXTABS" >>confdefs.h
15549
15550 $as_echo "#define TAB3 OXTABS" >>confdefs.h
15551
15552 ;;
15553
15554 gnu-linux | gnu-kfreebsd )
15555 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15556 /* end confdefs.h. */
15557
15558 #ifndef __i386__
15559 # error "not i386"
15560 #endif
15561
15562 int
15563 main ()
15564 {
15565
15566 ;
15567 return 0;
15568 }
15569 _ACEOF
15570 if ac_fn_c_try_cpp "$LINENO"; then :
15571 $as_echo "#define ULIMIT_BREAK_VALUE (32*1024*1024)" >>confdefs.h
15572
15573 fi
15574 rm -f conftest.err conftest.$ac_ext
15575
15576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15577 /* end confdefs.h. */
15578
15579 #ifndef __ia64__
15580 # error "not ia64"
15581 #endif
15582
15583 int
15584 main ()
15585 {
15586
15587 ;
15588 return 0;
15589 }
15590 _ACEOF
15591 if ac_fn_c_try_cpp "$LINENO"; then :
15592
15593 $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
15594
15595 fi
15596 rm -f conftest.err conftest.$ac_ext
15597 ;;
15598
15599 hpux*)
15600
15601 $as_echo "#define RUN_TIME_REMAP 1" >>confdefs.h
15602
15603 ;;
15604
15605 irix6-5)
15606 $as_echo "#define ULIMIT_BREAK_VALUE 0x14000000" >>confdefs.h
15607
15608 ;;
15609 esac
15610
15611
15612
15613
15614
15615
15616
15617 case $opsys in
15618 aix4-2 | hpux* | unixware)
15619 $as_echo "#define GC_MARK_STACK GC_USE_GCPROS_AS_BEFORE" >>confdefs.h
15620
15621 ;;
15622
15623 gnu-linux | gnu-kfreebsd )
15624 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15625 /* end confdefs.h. */
15626
15627 #if defined __i386__ || defined __sparc__ || defined __mc68000__ \
15628 || defined __alpha__ || defined __mips__ || defined __s390__ \
15629 || defined __arm__ || defined __powerpc__ || defined __amd64__ \
15630 || defined __ia64__ || defined __sh__
15631 /* ok */
15632 #else
15633 # error "setjmp not known to work on this arch"
15634 #endif
15635
15636 int
15637 main ()
15638 {
15639
15640 ;
15641 return 0;
15642 }
15643 _ACEOF
15644 if ac_fn_c_try_cpp "$LINENO"; then :
15645 $as_echo "#define GC_SETJMP_WORKS 1" >>confdefs.h
15646
15647 else
15648 $as_echo "#define GC_MARK_STACK GC_USE_GCPROS_AS_BEFORE" >>confdefs.h
15649
15650 fi
15651 rm -f conftest.err conftest.$ac_ext
15652 ;;
15653 esac
15654
15655
15656 if test x$GCC = xyes; then
15657 $as_echo "#define GC_SETJMP_WORKS 1" >>confdefs.h
15658
15659 else
15660 case $opsys in
15661 freebsd | netbsd | openbsd | irix6-5 | sol2* )
15662 $as_echo "#define GC_SETJMP_WORKS 1" >>confdefs.h
15663
15664 ;;
15665 esac
15666 fi
15667 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _setjmp" >&5
15668 $as_echo_n "checking for _setjmp... " >&6; }
15669 if test "${emacs_cv_func__setjmp+set}" = set; then :
15670 $as_echo_n "(cached) " >&6
15671 else
15672 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15673 /* end confdefs.h. */
15674 #include <setjmp.h>
15675
15676 int
15677 main ()
15678 {
15679 jmp_buf j;
15680 if (! _setjmp (j))
15681 _longjmp (j, 1);
15682 ;
15683 return 0;
15684 }
15685 _ACEOF
15686 if ac_fn_c_try_link "$LINENO"; then :
15687 emacs_cv_func__setjmp=yes
15688 else
15689 emacs_cv_func__setjmp=no
15690 fi
15691 rm -f core conftest.err conftest.$ac_objext \
15692 conftest$ac_exeext conftest.$ac_ext
15693 fi
15694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_func__setjmp" >&5
15695 $as_echo "$emacs_cv_func__setjmp" >&6; }
15696 if test $emacs_cv_func__setjmp = yes; then
15697
15698 $as_echo "#define HAVE__SETJMP 1" >>confdefs.h
15699
15700 else
15701 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
15702 $as_echo_n "checking for sigsetjmp... " >&6; }
15703 if test "${emacs_cv_func_sigsetjmp+set}" = set; then :
15704 $as_echo_n "(cached) " >&6
15705 else
15706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15707 /* end confdefs.h. */
15708 #include <setjmp.h>
15709
15710 int
15711 main ()
15712 {
15713 sigjmp_buf j;
15714 if (! sigsetjmp (j, 1))
15715 siglongjmp (j, 1);
15716 ;
15717 return 0;
15718 }
15719 _ACEOF
15720 if ac_fn_c_try_link "$LINENO"; then :
15721 emacs_cv_func_sigsetjmp=yes
15722 else
15723 emacs_cv_func_sigsetjmp=no
15724 fi
15725 rm -f core conftest.err conftest.$ac_objext \
15726 conftest$ac_exeext conftest.$ac_ext
15727 fi
15728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_func_sigsetjmp" >&5
15729 $as_echo "$emacs_cv_func_sigsetjmp" >&6; }
15730 if test $emacs_cv_func_sigsetjmp = yes; then
15731
15732 $as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
15733
15734 fi
15735 fi
15736
15737 case $opsys in
15738 sol2* | unixware )
15739
15740 $as_echo "#define TIOCSIGSEND TIOCSIGNAL" >>confdefs.h
15741
15742 ;;
15743 esac
15744
15745
15746 case $opsys in
15747 hpux* | sol2* )
15748
15749 $as_echo "#define XOS_NEEDS_TIME_H 1" >>confdefs.h
15750
15751 ;;
15752 esac
15753
15754
15755
15756
15757
15758
15759
15760
15761
15762
15763 case $opsys in
15764 aix4-2)
15765 $as_echo "#define USG /**/" >>confdefs.h
15766
15767 $as_echo "#define USG5 /**/" >>confdefs.h
15768
15769 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15770 /* end confdefs.h. */
15771
15772 #ifndef _AIX
15773 # error "_AIX not defined"
15774 #endif
15775
15776 int
15777 main ()
15778 {
15779
15780 ;
15781 return 0;
15782 }
15783 _ACEOF
15784 if ac_fn_c_try_cpp "$LINENO"; then :
15785
15786 else
15787
15788 $as_echo "#define _AIX /**/" >>confdefs.h
15789
15790 fi
15791 rm -f conftest.err conftest.$ac_ext
15792 ;;
15793
15794 cygwin)
15795
15796 $as_echo "#define CYGWIN 1" >>confdefs.h
15797
15798 ;;
15799
15800 darwin)
15801 $as_echo "#define BSD4_2 /**/" >>confdefs.h
15802
15803 $as_echo "#define BSD_SYSTEM /**/" >>confdefs.h
15804
15805
15806 $as_echo "#define DARWIN_OS /**/" >>confdefs.h
15807
15808 ;;
15809
15810 freebsd)
15811 $as_echo "#define BSD4_2 /**/" >>confdefs.h
15812
15813
15814 $as_echo "#define BSD_SYSTEM_AHB 1" >>confdefs.h
15815
15816 ;;
15817
15818 gnu | netbsd | openbsd )
15819 $as_echo "#define BSD4_2 /**/" >>confdefs.h
15820
15821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15822 /* end confdefs.h. */
15823
15824 #ifndef BSD_SYSTEM
15825 # error "BSD_SYSTEM not defined"
15826 #endif
15827
15828 int
15829 main ()
15830 {
15831
15832 ;
15833 return 0;
15834 }
15835 _ACEOF
15836 if ac_fn_c_try_cpp "$LINENO"; then :
15837
15838 else
15839 $as_echo "#define BSD_SYSTEM 43" >>confdefs.h
15840
15841 fi
15842 rm -f conftest.err conftest.$ac_ext
15843 ;;
15844
15845 gnu-linux | gnu-kfreebsd )
15846 $as_echo "#define USG /**/" >>confdefs.h
15847
15848
15849 $as_echo "#define GNU_LINUX /**/" >>confdefs.h
15850
15851 ;;
15852
15853 hpux*)
15854 $as_echo "#define USG /**/" >>confdefs.h
15855
15856 $as_echo "#define USG5 /**/" >>confdefs.h
15857
15858
15859 $as_echo "#define HPUX /**/" >>confdefs.h
15860
15861 ;;
15862
15863 irix6-5)
15864 $as_echo "#define USG /**/" >>confdefs.h
15865
15866 $as_echo "#define USG5 /**/" >>confdefs.h
15867
15868 $as_echo "#define USG5_4 /**/" >>confdefs.h
15869
15870
15871 $as_echo "#define IRIX6_5 /**/" >>confdefs.h
15872
15873 ;;
15874
15875 sol2*)
15876 $as_echo "#define USG /**/" >>confdefs.h
15877
15878 $as_echo "#define USG5 /**/" >>confdefs.h
15879
15880 $as_echo "#define USG5_4 /**/" >>confdefs.h
15881
15882
15883 $as_echo "#define SOLARIS2 /**/" >>confdefs.h
15884
15885 ;;
15886
15887 unixware)
15888 $as_echo "#define USG /**/" >>confdefs.h
15889
15890 $as_echo "#define USG5 /**/" >>confdefs.h
15891
15892 $as_echo "#define USG5_4 /**/" >>confdefs.h
15893
15894 ;;
15895 esac
15896
15897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable FIONREAD" >&5
15898 $as_echo_n "checking for usable FIONREAD... " >&6; }
15899 if test "${emacs_cv_usable_FIONREAD+set}" = set; then :
15900 $as_echo_n "(cached) " >&6
15901 else
15902 case $opsys in
15903 aix4-2)
15904 emacs_cv_usable_FIONREAD=no
15905 ;;
15906
15907 *)
15908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15909 /* end confdefs.h. */
15910 #include <sys/types.h>
15911 #include <sys/ioctl.h>
15912 #ifdef USG5_4
15913 # include <sys/filio.h>
15914 #endif
15915
15916 int
15917 main ()
15918 {
15919 int foo = ioctl (0, FIONREAD, &foo);
15920 ;
15921 return 0;
15922 }
15923 _ACEOF
15924 if ac_fn_c_try_compile "$LINENO"; then :
15925 emacs_cv_usable_FIONREAD=yes
15926 else
15927 emacs_cv_usable_FIONREAD=no
15928 fi
15929 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15930 ;;
15931 esac
15932 fi
15933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_usable_FIONREAD" >&5
15934 $as_echo "$emacs_cv_usable_FIONREAD" >&6; }
15935 if test $emacs_cv_usable_FIONREAD = yes; then
15936
15937 $as_echo "#define USABLE_FIONREAD 1" >>confdefs.h
15938
15939
15940 if test $emacs_broken_SIGIO = no; then
15941 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable SIGIO" >&5
15942 $as_echo_n "checking for usable SIGIO... " >&6; }
15943 if test "${emacs_cv_usable_SIGIO+set}" = set; then :
15944 $as_echo_n "(cached) " >&6
15945 else
15946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15947 /* end confdefs.h. */
15948 #include <fcntl.h>
15949 #include <signal.h>
15950
15951 int
15952 main ()
15953 {
15954 int foo = SIGIO | F_SETFL | FASYNC;
15955 ;
15956 return 0;
15957 }
15958 _ACEOF
15959 if ac_fn_c_try_compile "$LINENO"; then :
15960 emacs_cv_usable_SIGIO=yes
15961 else
15962 emacs_cv_usable_SIGIO=no
15963 fi
15964 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15965 fi
15966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_usable_SIGIO" >&5
15967 $as_echo "$emacs_cv_usable_SIGIO" >&6; }
15968 if test $emacs_cv_usable_SIGIO = yes; then
15969
15970 $as_echo "#define USABLE_SIGIO 1" >>confdefs.h
15971
15972 fi
15973 fi
15974 fi
15975
15976
15977 case $opsys in
15978 cygwin)
15979
15980 $as_echo "#define G_SLICE_ALWAYS_MALLOC 1" >>confdefs.h
15981
15982 ;;
15983
15984 hpux11)
15985
15986 $as_echo "#define USG_SUBTTY_WORKS 1" >>confdefs.h
15987
15988 ;;
15989
15990 irix6-5)
15991
15992 $as_echo "#define PREFER_VSUSP 1" >>confdefs.h
15993
15994
15995 $as_echo "#define SETPGRP_RELEASES_CTTY 1" >>confdefs.h
15996
15997 ;;
15998
15999 sol2-10)
16000
16001 $as_echo "#define _STRUCTURED_PROC 1" >>confdefs.h
16002
16003 ;;
16004 esac
16005
16006 # Set up the CFLAGS for real compilation, so we can substitute it.
16007 CFLAGS="$REAL_CFLAGS"
16008 CPPFLAGS="$REAL_CPPFLAGS"
16009
16010 ## Hack to detect a buggy GCC version.
16011 if test "x$GCC" = xyes \
16012 && test x"`$CC --version 2> /dev/null | grep 'gcc.* 4.5.0'`" != x \
16013 && test x"`echo $CFLAGS | grep '\-O[23]'`" != x \
16014 && test x"`echo $CFLAGS | grep '\-fno-optimize-sibling-calls'`" = x; then
16015 as_fn_error "GCC 4.5.0 has problems compiling Emacs; see etc/PROBLEMS'." "$LINENO" 5
16016 fi
16017
16018 version=$PACKAGE_VERSION
16019
16020 copyright="Copyright (C) 2013 Free Software Foundation, Inc."
16021
16022 cat >>confdefs.h <<_ACEOF
16023 #define COPYRIGHT "$copyright"
16024 _ACEOF
16025
16026
16027
16028 ### Specify what sort of things we'll be editing into Makefile and config.h.
16029 ### Use configuration here uncanonicalized to avoid exceeding size limits.
16030
16031
16032 ## Unused?
16033
16034
16035
16036
16037
16038
16039
16040
16041
16042
16043
16044
16045
16046
16047
16048
16049
16050
16051
16052
16053
16054
16055 ## FIXME? Nothing uses @LD_SWITCH_X_SITE@.
16056 ## src/Makefile.in did add LD_SWITCH_X_SITE (as a cpp define) to the
16057 ## end of LIBX_BASE, but nothing ever set it.
16058
16059
16060
16061
16062 ## Used in lwlib/Makefile.in.
16063
16064
16065
16066
16067
16068
16069
16070
16071 if test -n "${term_header}"; then
16072
16073 cat >>confdefs.h <<_ACEOF
16074 #define TERM_HEADER "${term_header}"
16075 _ACEOF
16076
16077 fi
16078
16079
16080 cat >>confdefs.h <<_ACEOF
16081 #define EMACS_CONFIGURATION "${canonical}"
16082 _ACEOF
16083
16084
16085 cat >>confdefs.h <<_ACEOF
16086 #define EMACS_CONFIG_OPTIONS "${ac_configure_args}"
16087 _ACEOF
16088
16089
16090
16091 XMENU_OBJ=
16092 XOBJ=
16093 FONT_OBJ=
16094 if test "${HAVE_X_WINDOWS}" = "yes" ; then
16095
16096 $as_echo "#define HAVE_X_WINDOWS 1" >>confdefs.h
16097
16098 XMENU_OBJ=xmenu.o
16099 XOBJ="xterm.o xfns.o xselect.o xrdb.o xsmfns.o xsettings.o xgselect.o"
16100 FONT_OBJ=xfont.o
16101 if test "$HAVE_XFT" = "yes"; then
16102 FONT_OBJ="$FONT_OBJ ftfont.o xftfont.o ftxfont.o"
16103 elif test "$HAVE_FREETYPE" = "yes"; then
16104 FONT_OBJ="$FONT_OBJ ftfont.o ftxfont.o"
16105 fi
16106
16107 fi
16108
16109
16110
16111
16112 WIDGET_OBJ=
16113 MOTIF_LIBW=
16114 if test "${USE_X_TOOLKIT}" != "none" ; then
16115 WIDGET_OBJ=widget.o
16116
16117 $as_echo "#define USE_X_TOOLKIT 1" >>confdefs.h
16118
16119 if test "${USE_X_TOOLKIT}" = "LUCID"; then
16120
16121 $as_echo "#define USE_LUCID 1" >>confdefs.h
16122
16123 elif test "${USE_X_TOOLKIT}" = "MOTIF"; then
16124
16125 $as_echo "#define USE_MOTIF 1" >>confdefs.h
16126
16127 MOTIF_LIBW=-lXm
16128 case "$opsys" in
16129 gnu-linux)
16130 ## Paul Abrahams <abrahams at equinox.shaysnet.com> says this is needed.
16131 MOTIF_LIBW="$MOTIF_LIBW -lXpm"
16132 ;;
16133
16134 unixware)
16135 ## Richard Anthony Ryan <ryanr at ellingtn.ftc.nrcs.usda.gov>
16136 ## says -lXimp is needed in UNIX_SV ... 4.2 1.1.2.
16137 MOTIF_LIBW="MOTIF_LIBW -lXimp"
16138 ;;
16139
16140 aix4-2)
16141 ## olson@mcs.anl.gov says -li18n is needed by -lXm.
16142 MOTIF_LIBW="$MOTIF_LIBW -li18n"
16143 ;;
16144 esac
16145 MOTIF_LIBW="$MOTIF_LIBW $LIBXP"
16146 fi
16147 fi
16148
16149
16150 TOOLKIT_LIBW=
16151 case "$USE_X_TOOLKIT" in
16152 MOTIF) TOOLKIT_LIBW="$MOTIF_LIBW" ;;
16153 LUCID) TOOLKIT_LIBW="$LUCID_LIBW" ;;
16154 none) test "x$HAVE_GTK" = "xyes" && TOOLKIT_LIBW="$GTK_LIBS" ;;
16155 esac
16156
16157
16158 if test "$USE_X_TOOLKIT" = "none"; then
16159 LIBXT_OTHER="\$(LIBXSM)"
16160 OLDXMENU_TARGET="really-oldXMenu"
16161 else
16162 LIBXT_OTHER="\$(LIBXMU) -lXt \$(LIBXTR6) -lXext"
16163 OLDXMENU_TARGET="really-lwlib"
16164 fi
16165
16166
16167 ## The X Menu stuff is present in the X10 distribution, but missing
16168 ## from X11. If we have X10, just use the installed library;
16169 ## otherwise, use our own copy.
16170 if test "${HAVE_X11}" = "yes" ; then
16171
16172 $as_echo "#define HAVE_X11 1" >>confdefs.h
16173
16174
16175 if test "$USE_X_TOOLKIT" = "none"; then
16176 OLDXMENU="\${oldXMenudir}/libXMenu11.a"
16177 else
16178 OLDXMENU="\${lwlibdir}/liblw.a"
16179 fi
16180 LIBXMENU="\$(OLDXMENU)"
16181 LIBX_OTHER="\$(LIBXT) \$(LIBX_EXTRA)"
16182 OLDXMENU_DEPS="\${OLDXMENU} ../src/\${OLDXMENU}"
16183 else
16184 ## For a syntactically valid Makefile; not actually used for anything.
16185 ## See comments in src/Makefile.in.
16186 OLDXMENU=nothing
16187 ## FIXME This case (!HAVE_X11 && HAVE_X_WINDOWS) is no longer possible(?).
16188 if test "${HAVE_X_WINDOWS}" = "yes"; then
16189 LIBXMENU="-lXMenu"
16190 else
16191 LIBXMENU=
16192 fi
16193 LIBX_OTHER=
16194 OLDXMENU_DEPS=
16195 fi
16196
16197 if test "$HAVE_GTK" = "yes" || test "$HAVE_MENUS" != "yes"; then
16198 OLDXMENU_TARGET=
16199 OLDXMENU=nothing
16200 LIBXMENU=
16201 OLDXMENU_DEPS=
16202 fi
16203
16204
16205
16206
16207
16208
16209
16210 if test "${HAVE_MENUS}" = "yes" ; then
16211
16212 $as_echo "#define HAVE_MENUS 1" >>confdefs.h
16213
16214 fi
16215
16216 if test "${GNU_MALLOC}" = "yes" ; then
16217
16218 $as_echo "#define GNU_MALLOC 1" >>confdefs.h
16219
16220 fi
16221
16222 RALLOC_OBJ=
16223 if test "${REL_ALLOC}" = "yes" ; then
16224
16225 $as_echo "#define REL_ALLOC 1" >>confdefs.h
16226
16227
16228 test "$system_malloc" != "yes" && RALLOC_OBJ=ralloc.o
16229 fi
16230
16231
16232 if test "$opsys" = "cygwin"; then
16233 CYGWIN_OBJ="sheap.o cygw32.o"
16234 ## Cygwin differs because of its unexec().
16235 PRE_ALLOC_OBJ=
16236 POST_ALLOC_OBJ=lastfile.o
16237 else
16238 CYGWIN_OBJ=
16239 PRE_ALLOC_OBJ=lastfile.o
16240 POST_ALLOC_OBJ=
16241 fi
16242
16243
16244
16245
16246 # Configure gnulib. Although this does not affect CFLAGS or LIBS permanently.
16247 # it temporarily reverts them to their pre-pkg-config values,
16248 # because gnulib needs to work with both src (which uses the
16249 # pkg-config stuff) and lib-src (which does not). For example, gnulib
16250 # may need to determine whether LIB_CLOCK_GETTIME should contain -lrt,
16251 # and it therefore needs to run in an environment where LIBS does not
16252 # already contain -lrt merely because 'pkg-config --libs' printed '-lrt'
16253 # for some package unrelated to lib-src.
16254 SAVE_CFLAGS=$CFLAGS
16255 SAVE_LIBS=$LIBS
16256 CFLAGS=$pre_PKG_CONFIG_CFLAGS
16257 LIBS="$LIB_PTHREAD $pre_PKG_CONFIG_LIBS"
16258
16259
16260
16261
16262
16263
16264
16265
16266
16267
16268
16269 LIBC_FATAL_STDERR_=1
16270 export LIBC_FATAL_STDERR_
16271
16272 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
16273 # for constant arguments. Useless!
16274 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
16275 $as_echo_n "checking for working alloca.h... " >&6; }
16276 if test "${ac_cv_working_alloca_h+set}" = set; then :
16277 $as_echo_n "(cached) " >&6
16278 else
16279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16280 /* end confdefs.h. */
16281 #include <alloca.h>
16282 int
16283 main ()
16284 {
16285 char *p = (char *) alloca (2 * sizeof (int));
16286 if (p) return 0;
16287 ;
16288 return 0;
16289 }
16290 _ACEOF
16291 if ac_fn_c_try_link "$LINENO"; then :
16292 ac_cv_working_alloca_h=yes
16293 else
16294 ac_cv_working_alloca_h=no
16295 fi
16296 rm -f core conftest.err conftest.$ac_objext \
16297 conftest$ac_exeext conftest.$ac_ext
16298 fi
16299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
16300 $as_echo "$ac_cv_working_alloca_h" >&6; }
16301 if test $ac_cv_working_alloca_h = yes; then
16302
16303 $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
16304
16305 fi
16306
16307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
16308 $as_echo_n "checking for alloca... " >&6; }
16309 if test "${ac_cv_func_alloca_works+set}" = set; then :
16310 $as_echo_n "(cached) " >&6
16311 else
16312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16313 /* end confdefs.h. */
16314 #ifdef __GNUC__
16315 # define alloca __builtin_alloca
16316 #else
16317 # ifdef _MSC_VER
16318 # include <malloc.h>
16319 # define alloca _alloca
16320 # else
16321 # ifdef HAVE_ALLOCA_H
16322 # include <alloca.h>
16323 # else
16324 # ifdef _AIX
16325 #pragma alloca
16326 # else
16327 # ifndef alloca /* predefined by HP cc +Olibcalls */
16328 char *alloca ();
16329 # endif
16330 # endif
16331 # endif
16332 # endif
16333 #endif
16334
16335 int
16336 main ()
16337 {
16338 char *p = (char *) alloca (1);
16339 if (p) return 0;
16340 ;
16341 return 0;
16342 }
16343 _ACEOF
16344 if ac_fn_c_try_link "$LINENO"; then :
16345 ac_cv_func_alloca_works=yes
16346 else
16347 ac_cv_func_alloca_works=no
16348 fi
16349 rm -f core conftest.err conftest.$ac_objext \
16350 conftest$ac_exeext conftest.$ac_ext
16351 fi
16352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
16353 $as_echo "$ac_cv_func_alloca_works" >&6; }
16354
16355 if test $ac_cv_func_alloca_works = yes; then
16356
16357 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
16358
16359 else
16360 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
16361 # that cause trouble. Some versions do not even contain alloca or
16362 # contain a buggy version. If you still want to use their alloca,
16363 # use ar to extract alloca.o from them instead of compiling alloca.c.
16364
16365
16366
16367
16368
16369 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
16370
16371 $as_echo "#define C_ALLOCA 1" >>confdefs.h
16372
16373
16374 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether 'alloca.c' needs Cray hooks" >&5
16375 $as_echo_n "checking whether 'alloca.c' needs Cray hooks... " >&6; }
16376 if test "${ac_cv_os_cray+set}" = set; then :
16377 $as_echo_n "(cached) " >&6
16378 else
16379 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16380 /* end confdefs.h. */
16381 #if defined CRAY && ! defined CRAY2
16382 webecray
16383 #else
16384 wenotbecray
16385 #endif
16386
16387 _ACEOF
16388 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16389 $EGREP "webecray" >/dev/null 2>&1; then :
16390 ac_cv_os_cray=yes
16391 else
16392 ac_cv_os_cray=no
16393 fi
16394 rm -f conftest*
16395
16396 fi
16397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
16398 $as_echo "$ac_cv_os_cray" >&6; }
16399 if test $ac_cv_os_cray = yes; then
16400 for ac_func in _getb67 GETB67 getb67; do
16401 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16402 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16403 eval as_val=\$$as_ac_var
16404 if test "x$as_val" = x""yes; then :
16405
16406 cat >>confdefs.h <<_ACEOF
16407 #define CRAY_STACKSEG_END $ac_func
16408 _ACEOF
16409
16410 break
16411 fi
16412
16413 done
16414 fi
16415
16416 { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
16417 $as_echo_n "checking stack direction for C alloca... " >&6; }
16418 if test "${ac_cv_c_stack_direction+set}" = set; then :
16419 $as_echo_n "(cached) " >&6
16420 else
16421 if test "$cross_compiling" = yes; then :
16422 ac_cv_c_stack_direction=0
16423 else
16424 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16425 /* end confdefs.h. */
16426 $ac_includes_default
16427 int
16428 find_stack_direction (int *addr, int depth)
16429 {
16430 int dir, dummy = 0;
16431 if (! addr)
16432 addr = &dummy;
16433 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
16434 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
16435 return dir + dummy;
16436 }
16437
16438 int
16439 main (int argc, char **argv)
16440 {
16441 return find_stack_direction (0, argc + !argv + 20) < 0;
16442 }
16443 _ACEOF
16444 if ac_fn_c_try_run "$LINENO"; then :
16445 ac_cv_c_stack_direction=1
16446 else
16447 ac_cv_c_stack_direction=-1
16448 fi
16449 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16450 conftest.$ac_objext conftest.beam conftest.$ac_ext
16451 fi
16452
16453 fi
16454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
16455 $as_echo "$ac_cv_c_stack_direction" >&6; }
16456 cat >>confdefs.h <<_ACEOF
16457 #define STACK_DIRECTION $ac_cv_c_stack_direction
16458 _ACEOF
16459
16460
16461 fi
16462
16463
16464
16465
16466 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
16467 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
16468 if test "${ac_cv_c_bigendian+set}" = set; then :
16469 $as_echo_n "(cached) " >&6
16470 else
16471 ac_cv_c_bigendian=unknown
16472 # See if we're dealing with a universal compiler.
16473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16474 /* end confdefs.h. */
16475 #ifndef __APPLE_CC__
16476 not a universal capable compiler
16477 #endif
16478 typedef int dummy;
16479
16480 _ACEOF
16481 if ac_fn_c_try_compile "$LINENO"; then :
16482
16483 # Check for potential -arch flags. It is not universal unless
16484 # there are at least two -arch flags with different values.
16485 ac_arch=
16486 ac_prev=
16487 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
16488 if test -n "$ac_prev"; then
16489 case $ac_word in
16490 i?86 | x86_64 | ppc | ppc64)
16491 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
16492 ac_arch=$ac_word
16493 else
16494 ac_cv_c_bigendian=universal
16495 break
16496 fi
16497 ;;
16498 esac
16499 ac_prev=
16500 elif test "x$ac_word" = "x-arch"; then
16501 ac_prev=arch
16502 fi
16503 done
16504 fi
16505 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16506 if test $ac_cv_c_bigendian = unknown; then
16507 # See if sys/param.h defines the BYTE_ORDER macro.
16508 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16509 /* end confdefs.h. */
16510 #include <sys/types.h>
16511 #include <sys/param.h>
16512
16513 int
16514 main ()
16515 {
16516 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
16517 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
16518 && LITTLE_ENDIAN)
16519 bogus endian macros
16520 #endif
16521
16522 ;
16523 return 0;
16524 }
16525 _ACEOF
16526 if ac_fn_c_try_compile "$LINENO"; then :
16527 # It does; now see whether it defined to BIG_ENDIAN or not.
16528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16529 /* end confdefs.h. */
16530 #include <sys/types.h>
16531 #include <sys/param.h>
16532
16533 int
16534 main ()
16535 {
16536 #if BYTE_ORDER != BIG_ENDIAN
16537 not big endian
16538 #endif
16539
16540 ;
16541 return 0;
16542 }
16543 _ACEOF
16544 if ac_fn_c_try_compile "$LINENO"; then :
16545 ac_cv_c_bigendian=yes
16546 else
16547 ac_cv_c_bigendian=no
16548 fi
16549 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16550 fi
16551 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16552 fi
16553 if test $ac_cv_c_bigendian = unknown; then
16554 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
16555 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16556 /* end confdefs.h. */
16557 #include <limits.h>
16558
16559 int
16560 main ()
16561 {
16562 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
16563 bogus endian macros
16564 #endif
16565
16566 ;
16567 return 0;
16568 }
16569 _ACEOF
16570 if ac_fn_c_try_compile "$LINENO"; then :
16571 # It does; now see whether it defined to _BIG_ENDIAN or not.
16572 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16573 /* end confdefs.h. */
16574 #include <limits.h>
16575
16576 int
16577 main ()
16578 {
16579 #ifndef _BIG_ENDIAN
16580 not big endian
16581 #endif
16582
16583 ;
16584 return 0;
16585 }
16586 _ACEOF
16587 if ac_fn_c_try_compile "$LINENO"; then :
16588 ac_cv_c_bigendian=yes
16589 else
16590 ac_cv_c_bigendian=no
16591 fi
16592 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16593 fi
16594 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16595 fi
16596 if test $ac_cv_c_bigendian = unknown; then
16597 # Compile a test program.
16598 if test "$cross_compiling" = yes; then :
16599 # Try to guess by grepping values from an object file.
16600 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16601 /* end confdefs.h. */
16602 short int ascii_mm[] =
16603 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
16604 short int ascii_ii[] =
16605 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
16606 int use_ascii (int i) {
16607 return ascii_mm[i] + ascii_ii[i];
16608 }
16609 short int ebcdic_ii[] =
16610 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
16611 short int ebcdic_mm[] =
16612 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
16613 int use_ebcdic (int i) {
16614 return ebcdic_mm[i] + ebcdic_ii[i];
16615 }
16616 extern int foo;
16617
16618 int
16619 main ()
16620 {
16621 return use_ascii (foo) == use_ebcdic (foo);
16622 ;
16623 return 0;
16624 }
16625 _ACEOF
16626 if ac_fn_c_try_compile "$LINENO"; then :
16627 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
16628 ac_cv_c_bigendian=yes
16629 fi
16630 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
16631 if test "$ac_cv_c_bigendian" = unknown; then
16632 ac_cv_c_bigendian=no
16633 else
16634 # finding both strings is unlikely to happen, but who knows?
16635 ac_cv_c_bigendian=unknown
16636 fi
16637 fi
16638 fi
16639 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16640 else
16641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16642 /* end confdefs.h. */
16643 $ac_includes_default
16644 int
16645 main ()
16646 {
16647
16648 /* Are we little or big endian? From Harbison&Steele. */
16649 union
16650 {
16651 long int l;
16652 char c[sizeof (long int)];
16653 } u;
16654 u.l = 1;
16655 return u.c[sizeof (long int) - 1] == 1;
16656
16657 ;
16658 return 0;
16659 }
16660 _ACEOF
16661 if ac_fn_c_try_run "$LINENO"; then :
16662 ac_cv_c_bigendian=no
16663 else
16664 ac_cv_c_bigendian=yes
16665 fi
16666 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16667 conftest.$ac_objext conftest.beam conftest.$ac_ext
16668 fi
16669
16670 fi
16671 fi
16672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
16673 $as_echo "$ac_cv_c_bigendian" >&6; }
16674 case $ac_cv_c_bigendian in #(
16675 yes)
16676 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
16677 ;; #(
16678 no)
16679 ;; #(
16680 universal)
16681
16682 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
16683
16684 ;; #(
16685 *)
16686 as_fn_error "unknown endianness
16687 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
16688 esac
16689
16690
16691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
16692 $as_echo_n "checking for inline... " >&6; }
16693 if test "${ac_cv_c_inline+set}" = set; then :
16694 $as_echo_n "(cached) " >&6
16695 else
16696 ac_cv_c_inline=no
16697 for ac_kw in inline __inline__ __inline; do
16698 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16699 /* end confdefs.h. */
16700 #ifndef __cplusplus
16701 typedef int foo_t;
16702 static $ac_kw foo_t static_foo () {return 0; }
16703 $ac_kw foo_t foo () {return 0; }
16704 #endif
16705
16706 _ACEOF
16707 if ac_fn_c_try_compile "$LINENO"; then :
16708 ac_cv_c_inline=$ac_kw
16709 fi
16710 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16711 test "$ac_cv_c_inline" != no && break
16712 done
16713
16714 fi
16715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
16716 $as_echo "$ac_cv_c_inline" >&6; }
16717
16718 case $ac_cv_c_inline in
16719 inline | yes) ;;
16720 *)
16721 case $ac_cv_c_inline in
16722 no) ac_val=;;
16723 *) ac_val=$ac_cv_c_inline;;
16724 esac
16725 cat >>confdefs.h <<_ACEOF
16726 #ifndef __cplusplus
16727 #define inline $ac_val
16728 #endif
16729 _ACEOF
16730 ;;
16731 esac
16732
16733
16734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtold conforms to C99" >&5
16735 $as_echo_n "checking whether strtold conforms to C99... " >&6; }
16736 if test "${gl_cv_func_c99_strtold+set}" = set; then :
16737 $as_echo_n "(cached) " >&6
16738 else
16739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16740 /* end confdefs.h. */
16741 /* On HP-UX before 11.23, strtold returns a struct instead of
16742 long double. Reject implementations like that, by requiring
16743 compatibility with the C99 prototype. */
16744 #include <stdlib.h>
16745 static long double (*p) (char const *, char **) = strtold;
16746 static long double
16747 test (char const *nptr, char **endptr)
16748 {
16749 long double r;
16750 r = strtold (nptr, endptr);
16751 return r;
16752 }
16753 int
16754 main ()
16755 {
16756 return test ("1.0", NULL) != 1 || p ("1.0", NULL) != 1;
16757 ;
16758 return 0;
16759 }
16760 _ACEOF
16761 if ac_fn_c_try_link "$LINENO"; then :
16762 gl_cv_func_c99_strtold=yes
16763 else
16764 gl_cv_func_c99_strtold=no
16765 fi
16766 rm -f core conftest.err conftest.$ac_objext \
16767 conftest$ac_exeext conftest.$ac_ext
16768 fi
16769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_c99_strtold" >&5
16770 $as_echo "$gl_cv_func_c99_strtold" >&6; }
16771 if test $gl_cv_func_c99_strtold = yes; then
16772
16773 $as_echo "#define HAVE_C99_STRTOLD 1" >>confdefs.h
16774
16775 fi
16776
16777
16778 GNULIB_CHDIR=0;
16779 GNULIB_CHOWN=0;
16780 GNULIB_CLOSE=0;
16781 GNULIB_DUP=0;
16782 GNULIB_DUP2=0;
16783 GNULIB_DUP3=0;
16784 GNULIB_ENVIRON=0;
16785 GNULIB_EUIDACCESS=0;
16786 GNULIB_FACCESSAT=0;
16787 GNULIB_FCHDIR=0;
16788 GNULIB_FCHOWNAT=0;
16789 GNULIB_FDATASYNC=0;
16790 GNULIB_FSYNC=0;
16791 GNULIB_FTRUNCATE=0;
16792 GNULIB_GETCWD=0;
16793 GNULIB_GETDOMAINNAME=0;
16794 GNULIB_GETDTABLESIZE=0;
16795 GNULIB_GETGROUPS=0;
16796 GNULIB_GETHOSTNAME=0;
16797 GNULIB_GETLOGIN=0;
16798 GNULIB_GETLOGIN_R=0;
16799 GNULIB_GETPAGESIZE=0;
16800 GNULIB_GETUSERSHELL=0;
16801 GNULIB_GROUP_MEMBER=0;
16802 GNULIB_ISATTY=0;
16803 GNULIB_LCHOWN=0;
16804 GNULIB_LINK=0;
16805 GNULIB_LINKAT=0;
16806 GNULIB_LSEEK=0;
16807 GNULIB_PIPE=0;
16808 GNULIB_PIPE2=0;
16809 GNULIB_PREAD=0;
16810 GNULIB_PWRITE=0;
16811 GNULIB_READ=0;
16812 GNULIB_READLINK=0;
16813 GNULIB_READLINKAT=0;
16814 GNULIB_RMDIR=0;
16815 GNULIB_SETHOSTNAME=0;
16816 GNULIB_SLEEP=0;
16817 GNULIB_SYMLINK=0;
16818 GNULIB_SYMLINKAT=0;
16819 GNULIB_TTYNAME_R=0;
16820 GNULIB_UNISTD_H_NONBLOCKING=0;
16821 GNULIB_UNISTD_H_SIGPIPE=0;
16822 GNULIB_UNLINK=0;
16823 GNULIB_UNLINKAT=0;
16824 GNULIB_USLEEP=0;
16825 GNULIB_WRITE=0;
16826 HAVE_CHOWN=1;
16827 HAVE_DUP2=1;
16828 HAVE_DUP3=1;
16829 HAVE_EUIDACCESS=1;
16830 HAVE_FACCESSAT=1;
16831 HAVE_FCHDIR=1;
16832 HAVE_FCHOWNAT=1;
16833 HAVE_FDATASYNC=1;
16834 HAVE_FSYNC=1;
16835 HAVE_FTRUNCATE=1;
16836 HAVE_GETDTABLESIZE=1;
16837 HAVE_GETGROUPS=1;
16838 HAVE_GETHOSTNAME=1;
16839 HAVE_GETLOGIN=1;
16840 HAVE_GETPAGESIZE=1;
16841 HAVE_GROUP_MEMBER=1;
16842 HAVE_LCHOWN=1;
16843 HAVE_LINK=1;
16844 HAVE_LINKAT=1;
16845 HAVE_PIPE=1;
16846 HAVE_PIPE2=1;
16847 HAVE_PREAD=1;
16848 HAVE_PWRITE=1;
16849 HAVE_READLINK=1;
16850 HAVE_READLINKAT=1;
16851 HAVE_SETHOSTNAME=1;
16852 HAVE_SLEEP=1;
16853 HAVE_SYMLINK=1;
16854 HAVE_SYMLINKAT=1;
16855 HAVE_UNLINKAT=1;
16856 HAVE_USLEEP=1;
16857 HAVE_DECL_ENVIRON=1;
16858 HAVE_DECL_FCHDIR=1;
16859 HAVE_DECL_FDATASYNC=1;
16860 HAVE_DECL_GETDOMAINNAME=1;
16861 HAVE_DECL_GETLOGIN_R=1;
16862 HAVE_DECL_GETPAGESIZE=1;
16863 HAVE_DECL_GETUSERSHELL=1;
16864 HAVE_DECL_SETHOSTNAME=1;
16865 HAVE_DECL_TTYNAME_R=1;
16866 HAVE_OS_H=0;
16867 HAVE_SYS_PARAM_H=0;
16868 REPLACE_CHOWN=0;
16869 REPLACE_CLOSE=0;
16870 REPLACE_DUP=0;
16871 REPLACE_DUP2=0;
16872 REPLACE_FCHOWNAT=0;
16873 REPLACE_FTRUNCATE=0;
16874 REPLACE_GETCWD=0;
16875 REPLACE_GETDOMAINNAME=0;
16876 REPLACE_GETLOGIN_R=0;
16877 REPLACE_GETGROUPS=0;
16878 REPLACE_GETPAGESIZE=0;
16879 REPLACE_ISATTY=0;
16880 REPLACE_LCHOWN=0;
16881 REPLACE_LINK=0;
16882 REPLACE_LINKAT=0;
16883 REPLACE_LSEEK=0;
16884 REPLACE_PREAD=0;
16885 REPLACE_PWRITE=0;
16886 REPLACE_READ=0;
16887 REPLACE_READLINK=0;
16888 REPLACE_RMDIR=0;
16889 REPLACE_SLEEP=0;
16890 REPLACE_SYMLINK=0;
16891 REPLACE_TTYNAME_R=0;
16892 REPLACE_UNLINK=0;
16893 REPLACE_UNLINKAT=0;
16894 REPLACE_USLEEP=0;
16895 REPLACE_WRITE=0;
16896 UNISTD_H_HAVE_WINSOCK2_H=0;
16897 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
16898
16899
16900
16901
16902
16903
16904
16905
16906
16907 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
16908 $as_echo_n "checking if environ is properly declared... " >&6; }
16909 if test "${gt_cv_var_environ_declaration+set}" = set; then :
16910 $as_echo_n "(cached) " >&6
16911 else
16912
16913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16914 /* end confdefs.h. */
16915 #if HAVE_UNISTD_H
16916 #include <unistd.h>
16917 #endif
16918 /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>. */
16919 #include <stdlib.h>
16920
16921 extern struct { int foo; } environ;
16922 int
16923 main ()
16924 {
16925 environ.foo = 1;
16926 ;
16927 return 0;
16928 }
16929 _ACEOF
16930 if ac_fn_c_try_compile "$LINENO"; then :
16931 gt_cv_var_environ_declaration=no
16932 else
16933 gt_cv_var_environ_declaration=yes
16934 fi
16935 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16936 fi
16937
16938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
16939 $as_echo "$gt_cv_var_environ_declaration" >&6; }
16940 if test $gt_cv_var_environ_declaration = yes; then
16941
16942 $as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
16943
16944 fi
16945
16946
16947 if test $gt_cv_var_environ_declaration != yes; then
16948 HAVE_DECL_ENVIRON=0
16949 fi
16950
16951
16952
16953
16954
16955
16956
16957 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for st_dm_mode in struct stat" >&5
16958 $as_echo_n "checking for st_dm_mode in struct stat... " >&6; }
16959 if test "${ac_cv_struct_st_dm_mode+set}" = set; then :
16960 $as_echo_n "(cached) " >&6
16961 else
16962 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16963 /* end confdefs.h. */
16964
16965 #include <sys/types.h>
16966 #include <sys/stat.h>
16967 int
16968 main ()
16969 {
16970 struct stat s; s.st_dm_mode;
16971 ;
16972 return 0;
16973 }
16974 _ACEOF
16975 if ac_fn_c_try_compile "$LINENO"; then :
16976 ac_cv_struct_st_dm_mode=yes
16977 else
16978 ac_cv_struct_st_dm_mode=no
16979 fi
16980 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16981 fi
16982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_st_dm_mode" >&5
16983 $as_echo "$ac_cv_struct_st_dm_mode" >&6; }
16984
16985 if test $ac_cv_struct_st_dm_mode = yes; then
16986
16987 $as_echo "#define HAVE_ST_DM_MODE 1" >>confdefs.h
16988
16989 fi
16990
16991
16992 ac_fn_c_check_decl "$LINENO" "strmode" "ac_cv_have_decl_strmode" "$ac_includes_default"
16993 if test "x$ac_cv_have_decl_strmode" = x""yes; then :
16994 ac_have_decl=1
16995 else
16996 ac_have_decl=0
16997 fi
16998
16999 cat >>confdefs.h <<_ACEOF
17000 #define HAVE_DECL_STRMODE $ac_have_decl
17001 _ACEOF
17002
17003
17004 GNULIB__EXIT=0;
17005 GNULIB_ATOLL=0;
17006 GNULIB_CALLOC_POSIX=0;
17007 GNULIB_CANONICALIZE_FILE_NAME=0;
17008 GNULIB_GETLOADAVG=0;
17009 GNULIB_GETSUBOPT=0;
17010 GNULIB_GRANTPT=0;
17011 GNULIB_MALLOC_POSIX=0;
17012 GNULIB_MBTOWC=0;
17013 GNULIB_MKDTEMP=0;
17014 GNULIB_MKOSTEMP=0;
17015 GNULIB_MKOSTEMPS=0;
17016 GNULIB_MKSTEMP=0;
17017 GNULIB_MKSTEMPS=0;
17018 GNULIB_POSIX_OPENPT=0;
17019 GNULIB_PTSNAME=0;
17020 GNULIB_PTSNAME_R=0;
17021 GNULIB_PUTENV=0;
17022 GNULIB_RANDOM=0;
17023 GNULIB_RANDOM_R=0;
17024 GNULIB_REALLOC_POSIX=0;
17025 GNULIB_REALPATH=0;
17026 GNULIB_RPMATCH=0;
17027 GNULIB_SETENV=0;
17028 GNULIB_STRTOD=0;
17029 GNULIB_STRTOLL=0;
17030 GNULIB_STRTOULL=0;
17031 GNULIB_SYSTEM_POSIX=0;
17032 GNULIB_UNLOCKPT=0;
17033 GNULIB_UNSETENV=0;
17034 GNULIB_WCTOMB=0;
17035 HAVE__EXIT=1;
17036 HAVE_ATOLL=1;
17037 HAVE_CANONICALIZE_FILE_NAME=1;
17038 HAVE_DECL_GETLOADAVG=1;
17039 HAVE_GETSUBOPT=1;
17040 HAVE_GRANTPT=1;
17041 HAVE_MKDTEMP=1;
17042 HAVE_MKOSTEMP=1;
17043 HAVE_MKOSTEMPS=1;
17044 HAVE_MKSTEMP=1;
17045 HAVE_MKSTEMPS=1;
17046 HAVE_POSIX_OPENPT=1;
17047 HAVE_PTSNAME=1;
17048 HAVE_PTSNAME_R=1;
17049 HAVE_RANDOM=1;
17050 HAVE_RANDOM_H=1;
17051 HAVE_RANDOM_R=1;
17052 HAVE_REALPATH=1;
17053 HAVE_RPMATCH=1;
17054 HAVE_SETENV=1;
17055 HAVE_DECL_SETENV=1;
17056 HAVE_STRTOD=1;
17057 HAVE_STRTOLL=1;
17058 HAVE_STRTOULL=1;
17059 HAVE_STRUCT_RANDOM_DATA=1;
17060 HAVE_SYS_LOADAVG_H=0;
17061 HAVE_UNLOCKPT=1;
17062 HAVE_DECL_UNSETENV=1;
17063 REPLACE_CALLOC=0;
17064 REPLACE_CANONICALIZE_FILE_NAME=0;
17065 REPLACE_MALLOC=0;
17066 REPLACE_MBTOWC=0;
17067 REPLACE_MKSTEMP=0;
17068 REPLACE_PTSNAME=0;
17069 REPLACE_PTSNAME_R=0;
17070 REPLACE_PUTENV=0;
17071 REPLACE_RANDOM_R=0;
17072 REPLACE_REALLOC=0;
17073 REPLACE_REALPATH=0;
17074 REPLACE_SETENV=0;
17075 REPLACE_STRTOD=0;
17076 REPLACE_UNSETENV=0;
17077 REPLACE_WCTOMB=0;
17078
17079
17080
17081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
17082 $as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
17083 if test "${gl_cv_have_include_next+set}" = set; then :
17084 $as_echo_n "(cached) " >&6
17085 else
17086 rm -rf conftestd1a conftestd1b conftestd2
17087 mkdir conftestd1a conftestd1b conftestd2
17088 cat <<EOF > conftestd1a/conftest.h
17089 #define DEFINED_IN_CONFTESTD1
17090 #include_next <conftest.h>
17091 #ifdef DEFINED_IN_CONFTESTD2
17092 int foo;
17093 #else
17094 #error "include_next doesn't work"
17095 #endif
17096 EOF
17097 cat <<EOF > conftestd1b/conftest.h
17098 #define DEFINED_IN_CONFTESTD1
17099 #include <stdio.h>
17100 #include_next <conftest.h>
17101 #ifdef DEFINED_IN_CONFTESTD2
17102 int foo;
17103 #else
17104 #error "include_next doesn't work"
17105 #endif
17106 EOF
17107 cat <<EOF > conftestd2/conftest.h
17108 #ifndef DEFINED_IN_CONFTESTD1
17109 #error "include_next test doesn't work"
17110 #endif
17111 #define DEFINED_IN_CONFTESTD2
17112 EOF
17113 gl_save_CPPFLAGS="$CPPFLAGS"
17114 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
17115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17116 /* end confdefs.h. */
17117 #include <conftest.h>
17118 _ACEOF
17119 if ac_fn_c_try_compile "$LINENO"; then :
17120 gl_cv_have_include_next=yes
17121 else
17122 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
17123 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17124 /* end confdefs.h. */
17125 #include <conftest.h>
17126 _ACEOF
17127 if ac_fn_c_try_compile "$LINENO"; then :
17128 gl_cv_have_include_next=buggy
17129 else
17130 gl_cv_have_include_next=no
17131 fi
17132 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17133
17134 fi
17135 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17136 CPPFLAGS="$gl_save_CPPFLAGS"
17137 rm -rf conftestd1a conftestd1b conftestd2
17138
17139 fi
17140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
17141 $as_echo "$gl_cv_have_include_next" >&6; }
17142 PRAGMA_SYSTEM_HEADER=
17143 if test $gl_cv_have_include_next = yes; then
17144 INCLUDE_NEXT=include_next
17145 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
17146 if test -n "$GCC"; then
17147 PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
17148 fi
17149 else
17150 if test $gl_cv_have_include_next = buggy; then
17151 INCLUDE_NEXT=include
17152 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
17153 else
17154 INCLUDE_NEXT=include
17155 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
17156 fi
17157 fi
17158
17159
17160
17161 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5
17162 $as_echo_n "checking whether system header files limit the line length... " >&6; }
17163 if test "${gl_cv_pragma_columns+set}" = set; then :
17164 $as_echo_n "(cached) " >&6
17165 else
17166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17167 /* end confdefs.h. */
17168
17169 #ifdef __TANDEM
17170 choke me
17171 #endif
17172
17173 _ACEOF
17174 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17175 $EGREP "choke me" >/dev/null 2>&1; then :
17176 gl_cv_pragma_columns=yes
17177 else
17178 gl_cv_pragma_columns=no
17179 fi
17180 rm -f conftest*
17181
17182
17183 fi
17184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5
17185 $as_echo "$gl_cv_pragma_columns" >&6; }
17186 if test $gl_cv_pragma_columns = yes; then
17187 PRAGMA_COLUMNS="#pragma COLUMNS 10000"
17188 else
17189 PRAGMA_COLUMNS=
17190 fi
17191
17192
17193
17194
17195
17196
17197
17198
17199
17200
17201
17202
17203
17204
17205
17206
17207
17208 if test $gl_cv_have_include_next = yes; then
17209 gl_cv_next_getopt_h='<'getopt.h'>'
17210 else
17211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <getopt.h>" >&5
17212 $as_echo_n "checking absolute name of <getopt.h>... " >&6; }
17213 if test "${gl_cv_next_getopt_h+set}" = set; then :
17214 $as_echo_n "(cached) " >&6
17215 else
17216
17217 if test $ac_cv_header_getopt_h = yes; then
17218
17219
17220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17221 /* end confdefs.h. */
17222 #include <getopt.h>
17223
17224 _ACEOF
17225 case "$host_os" in
17226 aix*) gl_absname_cpp="$ac_cpp -C" ;;
17227 *) gl_absname_cpp="$ac_cpp" ;;
17228 esac
17229
17230 case "$host_os" in
17231 mingw*)
17232 gl_dirsep_regex='[/\\]'
17233 ;;
17234 *)
17235 gl_dirsep_regex='\/'
17236 ;;
17237 esac
17238 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17239
17240 gl_header_literal_regex=`echo 'getopt.h' \
17241 | sed -e "$gl_make_literal_regex_sed"`
17242 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17243 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17244 s|^/[^/]|//&|
17245 p
17246 q
17247 }'
17248 gl_cv_next_getopt_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17249 sed -n "$gl_absolute_header_sed"`'"'
17250 else
17251 gl_cv_next_getopt_h='<'getopt.h'>'
17252 fi
17253
17254
17255 fi
17256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5
17257 $as_echo "$gl_cv_next_getopt_h" >&6; }
17258 fi
17259 NEXT_GETOPT_H=$gl_cv_next_getopt_h
17260
17261 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17262 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17263 gl_next_as_first_directive='<'getopt.h'>'
17264 else
17265 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17266 gl_next_as_first_directive=$gl_cv_next_getopt_h
17267 fi
17268 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive
17269
17270
17271
17272
17273 if test $ac_cv_header_getopt_h = yes; then
17274 HAVE_GETOPT_H=1
17275 else
17276 HAVE_GETOPT_H=0
17277 fi
17278
17279
17280 gl_replace_getopt=
17281
17282 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
17283 for ac_header in getopt.h
17284 do :
17285 ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
17286 if test "x$ac_cv_header_getopt_h" = x""yes; then :
17287 cat >>confdefs.h <<_ACEOF
17288 #define HAVE_GETOPT_H 1
17289 _ACEOF
17290
17291 else
17292 gl_replace_getopt=yes
17293 fi
17294
17295 done
17296
17297 fi
17298
17299 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
17300 for ac_func in getopt_long_only
17301 do :
17302 ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only"
17303 if test "x$ac_cv_func_getopt_long_only" = x""yes; then :
17304 cat >>confdefs.h <<_ACEOF
17305 #define HAVE_GETOPT_LONG_ONLY 1
17306 _ACEOF
17307
17308 else
17309 gl_replace_getopt=yes
17310 fi
17311 done
17312
17313 fi
17314
17315 if test -z "$gl_replace_getopt"; then
17316 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5
17317 $as_echo_n "checking whether getopt is POSIX compatible... " >&6; }
17318 if test "${gl_cv_func_getopt_posix+set}" = set; then :
17319 $as_echo_n "(cached) " >&6
17320 else
17321
17322 if test $cross_compiling = no; then
17323 if test "$cross_compiling" = yes; then :
17324 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17325 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17326 as_fn_error "cannot run test program while cross compiling
17327 See \`config.log' for more details." "$LINENO" 5; }
17328 else
17329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17330 /* end confdefs.h. */
17331
17332 #include <unistd.h>
17333 #include <stdlib.h>
17334 #include <string.h>
17335
17336 int
17337 main ()
17338 {
17339 static char program[] = "program";
17340 static char a[] = "-a";
17341 static char foo[] = "foo";
17342 static char bar[] = "bar";
17343 char *argv[] = { program, a, foo, bar, NULL };
17344 int c;
17345
17346 c = getopt (4, argv, "ab");
17347 if (!(c == 'a'))
17348 return 1;
17349 c = getopt (4, argv, "ab");
17350 if (!(c == -1))
17351 return 2;
17352 if (!(optind == 2))
17353 return 3;
17354 return 0;
17355 }
17356
17357 _ACEOF
17358 if ac_fn_c_try_run "$LINENO"; then :
17359 gl_cv_func_getopt_posix=maybe
17360 else
17361 gl_cv_func_getopt_posix=no
17362 fi
17363 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17364 conftest.$ac_objext conftest.beam conftest.$ac_ext
17365 fi
17366
17367 if test $gl_cv_func_getopt_posix = maybe; then
17368 if test "$cross_compiling" = yes; then :
17369 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17370 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17371 as_fn_error "cannot run test program while cross compiling
17372 See \`config.log' for more details." "$LINENO" 5; }
17373 else
17374 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17375 /* end confdefs.h. */
17376
17377 #include <unistd.h>
17378 #include <stdlib.h>
17379 #include <string.h>
17380
17381 int
17382 main ()
17383 {
17384 static char program[] = "program";
17385 static char donald[] = "donald";
17386 static char p[] = "-p";
17387 static char billy[] = "billy";
17388 static char duck[] = "duck";
17389 static char a[] = "-a";
17390 static char bar[] = "bar";
17391 char *argv[] = { program, donald, p, billy, duck, a, bar, NULL };
17392 int c;
17393
17394 c = getopt (7, argv, "+abp:q:");
17395 if (!(c == -1))
17396 return 4;
17397 if (!(strcmp (argv[0], "program") == 0))
17398 return 5;
17399 if (!(strcmp (argv[1], "donald") == 0))
17400 return 6;
17401 if (!(strcmp (argv[2], "-p") == 0))
17402 return 7;
17403 if (!(strcmp (argv[3], "billy") == 0))
17404 return 8;
17405 if (!(strcmp (argv[4], "duck") == 0))
17406 return 9;
17407 if (!(strcmp (argv[5], "-a") == 0))
17408 return 10;
17409 if (!(strcmp (argv[6], "bar") == 0))
17410 return 11;
17411 if (!(optind == 1))
17412 return 12;
17413 return 0;
17414 }
17415
17416 _ACEOF
17417 if ac_fn_c_try_run "$LINENO"; then :
17418 gl_cv_func_getopt_posix=maybe
17419 else
17420 gl_cv_func_getopt_posix=no
17421 fi
17422 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17423 conftest.$ac_objext conftest.beam conftest.$ac_ext
17424 fi
17425
17426 fi
17427 if test $gl_cv_func_getopt_posix = maybe; then
17428 if test "$cross_compiling" = yes; then :
17429 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17430 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17431 as_fn_error "cannot run test program while cross compiling
17432 See \`config.log' for more details." "$LINENO" 5; }
17433 else
17434 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17435 /* end confdefs.h. */
17436
17437 #include <unistd.h>
17438 #include <stdlib.h>
17439 #include <string.h>
17440
17441 int
17442 main ()
17443 {
17444 static char program[] = "program";
17445 static char ab[] = "-ab";
17446 char *argv[3] = { program, ab, NULL };
17447 if (getopt (2, argv, "ab:") != 'a')
17448 return 13;
17449 if (getopt (2, argv, "ab:") != '?')
17450 return 14;
17451 if (optopt != 'b')
17452 return 15;
17453 if (optind != 2)
17454 return 16;
17455 return 0;
17456 }
17457
17458 _ACEOF
17459 if ac_fn_c_try_run "$LINENO"; then :
17460 gl_cv_func_getopt_posix=yes
17461 else
17462 gl_cv_func_getopt_posix=no
17463 fi
17464 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17465 conftest.$ac_objext conftest.beam conftest.$ac_ext
17466 fi
17467
17468 fi
17469 else
17470 case "$host_os" in
17471 darwin* | aix* | mingw*) gl_cv_func_getopt_posix="guessing no";;
17472 *) gl_cv_func_getopt_posix="guessing yes";;
17473 esac
17474 fi
17475
17476 fi
17477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5
17478 $as_echo "$gl_cv_func_getopt_posix" >&6; }
17479 case "$gl_cv_func_getopt_posix" in
17480 *no) gl_replace_getopt=yes ;;
17481 esac
17482 fi
17483
17484 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
17485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5
17486 $as_echo_n "checking for working GNU getopt function... " >&6; }
17487 if test "${gl_cv_func_getopt_gnu+set}" = set; then :
17488 $as_echo_n "(cached) " >&6
17489 else
17490 # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the
17491 # optstring is necessary for programs like m4 that have POSIX-mandated
17492 # semantics for supporting options interspersed with files.
17493 # Also, since getopt_long is a GNU extension, we require optind=0.
17494 # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT;
17495 # so take care to revert to the correct (non-)export state.
17496 gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }'
17497 case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in
17498 xx) gl_had_POSIXLY_CORRECT=exported ;;
17499 x) gl_had_POSIXLY_CORRECT=yes ;;
17500 *) gl_had_POSIXLY_CORRECT= ;;
17501 esac
17502 POSIXLY_CORRECT=1
17503 export POSIXLY_CORRECT
17504 if test "$cross_compiling" = yes; then :
17505 gl_cv_func_getopt_gnu="guessing no"
17506
17507 else
17508 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17509 /* end confdefs.h. */
17510 #include <getopt.h>
17511 #include <stddef.h>
17512 #include <string.h>
17513
17514 #include <stdlib.h>
17515 #if defined __MACH__ && defined __APPLE__
17516 /* Avoid a crash on Mac OS X. */
17517 #include <mach/mach.h>
17518 #include <mach/mach_error.h>
17519 #include <mach/thread_status.h>
17520 #include <mach/exception.h>
17521 #include <mach/task.h>
17522 #include <pthread.h>
17523 /* The exception port on which our thread listens. */
17524 static mach_port_t our_exception_port;
17525 /* The main function of the thread listening for exceptions of type
17526 EXC_BAD_ACCESS. */
17527 static void *
17528 mach_exception_thread (void *arg)
17529 {
17530 /* Buffer for a message to be received. */
17531 struct {
17532 mach_msg_header_t head;
17533 mach_msg_body_t msgh_body;
17534 char data[1024];
17535 } msg;
17536 mach_msg_return_t retval;
17537 /* Wait for a message on the exception port. */
17538 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
17539 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
17540 if (retval != MACH_MSG_SUCCESS)
17541 abort ();
17542 exit (1);
17543 }
17544 static void
17545 nocrash_init (void)
17546 {
17547 mach_port_t self = mach_task_self ();
17548 /* Allocate a port on which the thread shall listen for exceptions. */
17549 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
17550 == KERN_SUCCESS) {
17551 /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
17552 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
17553 MACH_MSG_TYPE_MAKE_SEND)
17554 == KERN_SUCCESS) {
17555 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
17556 for us. */
17557 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
17558 /* Create the thread listening on the exception port. */
17559 pthread_attr_t attr;
17560 pthread_t thread;
17561 if (pthread_attr_init (&attr) == 0
17562 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
17563 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
17564 pthread_attr_destroy (&attr);
17565 /* Replace the exception port info for these exceptions with our own.
17566 Note that we replace the exception port for the entire task, not only
17567 for a particular thread. This has the effect that when our exception
17568 port gets the message, the thread specific exception port has already
17569 been asked, and we don't need to bother about it.
17570 See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
17571 task_set_exception_ports (self, mask, our_exception_port,
17572 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
17573 }
17574 }
17575 }
17576 }
17577 #elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
17578 /* Avoid a crash on native Windows. */
17579 #define WIN32_LEAN_AND_MEAN
17580 #include <windows.h>
17581 #include <winerror.h>
17582 static LONG WINAPI
17583 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
17584 {
17585 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
17586 {
17587 case EXCEPTION_ACCESS_VIOLATION:
17588 case EXCEPTION_IN_PAGE_ERROR:
17589 case EXCEPTION_STACK_OVERFLOW:
17590 case EXCEPTION_GUARD_PAGE:
17591 case EXCEPTION_PRIV_INSTRUCTION:
17592 case EXCEPTION_ILLEGAL_INSTRUCTION:
17593 case EXCEPTION_DATATYPE_MISALIGNMENT:
17594 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
17595 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
17596 exit (1);
17597 }
17598 return EXCEPTION_CONTINUE_SEARCH;
17599 }
17600 static void
17601 nocrash_init (void)
17602 {
17603 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
17604 }
17605 #else
17606 /* Avoid a crash on POSIX systems. */
17607 #include <signal.h>
17608 /* A POSIX signal handler. */
17609 static void
17610 exception_handler (int sig)
17611 {
17612 exit (1);
17613 }
17614 static void
17615 nocrash_init (void)
17616 {
17617 #ifdef SIGSEGV
17618 signal (SIGSEGV, exception_handler);
17619 #endif
17620 #ifdef SIGBUS
17621 signal (SIGBUS, exception_handler);
17622 #endif
17623 }
17624 #endif
17625
17626
17627 int
17628 main ()
17629 {
17630
17631 int result = 0;
17632
17633 nocrash_init();
17634
17635 /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
17636 and fails on Mac OS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
17637 OSF/1 5.1, Solaris 10. */
17638 {
17639 static char conftest[] = "conftest";
17640 static char plus[] = "-+";
17641 char *argv[3] = { conftest, plus, NULL };
17642 opterr = 0;
17643 if (getopt (2, argv, "+a") != '?')
17644 result |= 1;
17645 }
17646 /* This code succeeds on glibc 2.8, mingw,
17647 and fails on Mac OS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
17648 IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */
17649 {
17650 static char program[] = "program";
17651 static char p[] = "-p";
17652 static char foo[] = "foo";
17653 static char bar[] = "bar";
17654 char *argv[] = { program, p, foo, bar, NULL };
17655
17656 optind = 1;
17657 if (getopt (4, argv, "p::") != 'p')
17658 result |= 2;
17659 else if (optarg != NULL)
17660 result |= 4;
17661 else if (getopt (4, argv, "p::") != -1)
17662 result |= 6;
17663 else if (optind != 2)
17664 result |= 8;
17665 }
17666 /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */
17667 {
17668 static char program[] = "program";
17669 static char foo[] = "foo";
17670 static char p[] = "-p";
17671 char *argv[] = { program, foo, p, NULL };
17672 optind = 0;
17673 if (getopt (3, argv, "-p") != 1)
17674 result |= 16;
17675 else if (getopt (3, argv, "-p") != 'p')
17676 result |= 16;
17677 }
17678 /* This code fails on glibc 2.11. */
17679 {
17680 static char program[] = "program";
17681 static char b[] = "-b";
17682 static char a[] = "-a";
17683 char *argv[] = { program, b, a, NULL };
17684 optind = opterr = 0;
17685 if (getopt (3, argv, "+:a:b") != 'b')
17686 result |= 32;
17687 else if (getopt (3, argv, "+:a:b") != ':')
17688 result |= 32;
17689 }
17690 /* This code dumps core on glibc 2.14. */
17691 {
17692 static char program[] = "program";
17693 static char w[] = "-W";
17694 static char dummy[] = "dummy";
17695 char *argv[] = { program, w, dummy, NULL };
17696 optind = opterr = 1;
17697 if (getopt (3, argv, "W;") != 'W')
17698 result |= 64;
17699 }
17700 return result;
17701
17702 ;
17703 return 0;
17704 }
17705 _ACEOF
17706 if ac_fn_c_try_run "$LINENO"; then :
17707 gl_cv_func_getopt_gnu=yes
17708 else
17709 gl_cv_func_getopt_gnu=no
17710 fi
17711 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17712 conftest.$ac_objext conftest.beam conftest.$ac_ext
17713 fi
17714
17715 case $gl_had_POSIXLY_CORRECT in
17716 exported) ;;
17717 yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;;
17718 *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;;
17719 esac
17720
17721 fi
17722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5
17723 $as_echo "$gl_cv_func_getopt_gnu" >&6; }
17724 if test "$gl_cv_func_getopt_gnu" != yes; then
17725 gl_replace_getopt=yes
17726 else
17727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt_long function" >&5
17728 $as_echo_n "checking for working GNU getopt_long function... " >&6; }
17729 if test "${gl_cv_func_getopt_long_gnu+set}" = set; then :
17730 $as_echo_n "(cached) " >&6
17731 else
17732 if test "$cross_compiling" = yes; then :
17733 case "$host_os" in
17734 openbsd*) gl_cv_func_getopt_long_gnu="guessing no";;
17735 *) gl_cv_func_getopt_long_gnu="guessing yes";;
17736 esac
17737
17738 else
17739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17740 /* end confdefs.h. */
17741 #include <getopt.h>
17742 #include <stddef.h>
17743 #include <string.h>
17744
17745 int
17746 main ()
17747 {
17748 static const struct option long_options[] =
17749 {
17750 { "xtremely-",no_argument, NULL, 1003 },
17751 { "xtra", no_argument, NULL, 1001 },
17752 { "xtreme", no_argument, NULL, 1002 },
17753 { "xtremely", no_argument, NULL, 1003 },
17754 { NULL, 0, NULL, 0 }
17755 };
17756 /* This code fails on OpenBSD 5.0. */
17757 {
17758 static char program[] = "program";
17759 static char xtremel[] = "--xtremel";
17760 char *argv[] = { program, xtremel, NULL };
17761 int option_index;
17762 optind = 1; opterr = 0;
17763 if (getopt_long (2, argv, "", long_options, &option_index) != 1003)
17764 return 1;
17765 }
17766 return 0;
17767
17768 ;
17769 return 0;
17770 }
17771 _ACEOF
17772 if ac_fn_c_try_run "$LINENO"; then :
17773 gl_cv_func_getopt_long_gnu=yes
17774 else
17775 gl_cv_func_getopt_long_gnu=no
17776 fi
17777 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17778 conftest.$ac_objext conftest.beam conftest.$ac_ext
17779 fi
17780
17781
17782 fi
17783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_long_gnu" >&5
17784 $as_echo "$gl_cv_func_getopt_long_gnu" >&6; }
17785 case "$gl_cv_func_getopt_long_gnu" in
17786 *yes) ;;
17787 *) gl_replace_getopt=yes ;;
17788 esac
17789 fi
17790 fi
17791
17792
17793
17794
17795
17796
17797 REPLACE_GETOPT=0
17798 if test -n "$gl_replace_getopt"; then
17799 REPLACE_GETOPT=1
17800 fi
17801
17802 if test $REPLACE_GETOPT = 1; then
17803
17804 GETOPT_H=getopt.h
17805
17806 $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
17807
17808
17809
17810 fi
17811
17812 ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default"
17813 if test "x$ac_cv_have_decl_getenv" = x""yes; then :
17814 ac_have_decl=1
17815 else
17816 ac_have_decl=0
17817 fi
17818
17819 cat >>confdefs.h <<_ACEOF
17820 #define HAVE_DECL_GETENV $ac_have_decl
17821 _ACEOF
17822
17823 :
17824
17825
17826
17827
17828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
17829 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
17830 if test "${ac_cv_c_restrict+set}" = set; then :
17831 $as_echo_n "(cached) " >&6
17832 else
17833 ac_cv_c_restrict=no
17834 # The order here caters to the fact that C++ does not require restrict.
17835 for ac_kw in __restrict __restrict__ _Restrict restrict; do
17836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17837 /* end confdefs.h. */
17838 typedef int * int_ptr;
17839 int foo (int_ptr $ac_kw ip) {
17840 return ip[0];
17841 }
17842 int
17843 main ()
17844 {
17845 int s[1];
17846 int * $ac_kw t = s;
17847 t[0] = 0;
17848 return foo(t)
17849 ;
17850 return 0;
17851 }
17852 _ACEOF
17853 if ac_fn_c_try_compile "$LINENO"; then :
17854 ac_cv_c_restrict=$ac_kw
17855 fi
17856 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17857 test "$ac_cv_c_restrict" != no && break
17858 done
17859
17860 fi
17861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
17862 $as_echo "$ac_cv_c_restrict" >&6; }
17863
17864 case $ac_cv_c_restrict in
17865 restrict) ;;
17866 no) $as_echo "#define restrict /**/" >>confdefs.h
17867 ;;
17868 *) cat >>confdefs.h <<_ACEOF
17869 #define restrict $ac_cv_c_restrict
17870 _ACEOF
17871 ;;
17872 esac
17873
17874
17875 GNULIB_GETTIMEOFDAY=0;
17876 HAVE_GETTIMEOFDAY=1;
17877 HAVE_STRUCT_TIMEVAL=1;
17878 HAVE_SYS_TIME_H=1;
17879 REPLACE_GETTIMEOFDAY=0;
17880 REPLACE_STRUCT_TIMEVAL=0;
17881
17882
17883
17884
17885
17886
17887
17888
17889
17890
17891
17892
17893
17894
17895
17896
17897 if test $gl_cv_have_include_next = yes; then
17898 gl_cv_next_sys_time_h='<'sys/time.h'>'
17899 else
17900 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
17901 $as_echo_n "checking absolute name of <sys/time.h>... " >&6; }
17902 if test "${gl_cv_next_sys_time_h+set}" = set; then :
17903 $as_echo_n "(cached) " >&6
17904 else
17905
17906 if test $ac_cv_header_sys_time_h = yes; then
17907
17908
17909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17910 /* end confdefs.h. */
17911 #include <sys/time.h>
17912
17913 _ACEOF
17914 case "$host_os" in
17915 aix*) gl_absname_cpp="$ac_cpp -C" ;;
17916 *) gl_absname_cpp="$ac_cpp" ;;
17917 esac
17918
17919 case "$host_os" in
17920 mingw*)
17921 gl_dirsep_regex='[/\\]'
17922 ;;
17923 *)
17924 gl_dirsep_regex='\/'
17925 ;;
17926 esac
17927 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17928
17929 gl_header_literal_regex=`echo 'sys/time.h' \
17930 | sed -e "$gl_make_literal_regex_sed"`
17931 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17932 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17933 s|^/[^/]|//&|
17934 p
17935 q
17936 }'
17937 gl_cv_next_sys_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17938 sed -n "$gl_absolute_header_sed"`'"'
17939 else
17940 gl_cv_next_sys_time_h='<'sys/time.h'>'
17941 fi
17942
17943
17944 fi
17945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
17946 $as_echo "$gl_cv_next_sys_time_h" >&6; }
17947 fi
17948 NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
17949
17950 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17951 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17952 gl_next_as_first_directive='<'sys/time.h'>'
17953 else
17954 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17955 gl_next_as_first_directive=$gl_cv_next_sys_time_h
17956 fi
17957 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
17958
17959
17960
17961
17962
17963 if test $ac_cv_header_sys_time_h != yes; then
17964 HAVE_SYS_TIME_H=0
17965 fi
17966
17967
17968
17969
17970
17971 if test $ac_cv_header_sys_socket_h != yes; then
17972 for ac_header in winsock2.h
17973 do :
17974 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
17975 if test "x$ac_cv_header_winsock2_h" = x""yes; then :
17976 cat >>confdefs.h <<_ACEOF
17977 #define HAVE_WINSOCK2_H 1
17978 _ACEOF
17979
17980 fi
17981
17982 done
17983
17984 fi
17985 if test "$ac_cv_header_winsock2_h" = yes; then
17986 HAVE_WINSOCK2_H=1
17987 UNISTD_H_HAVE_WINSOCK2_H=1
17988 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
17989 else
17990 HAVE_WINSOCK2_H=0
17991 fi
17992
17993
17994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
17995 $as_echo_n "checking for struct timeval... " >&6; }
17996 if test "${gl_cv_sys_struct_timeval+set}" = set; then :
17997 $as_echo_n "(cached) " >&6
17998 else
17999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18000 /* end confdefs.h. */
18001 #if HAVE_SYS_TIME_H
18002 #include <sys/time.h>
18003 #endif
18004 #include <time.h>
18005 #if HAVE_WINSOCK2_H
18006 # include <winsock2.h>
18007 #endif
18008
18009 int
18010 main ()
18011 {
18012 static struct timeval x; x.tv_sec = x.tv_usec;
18013 ;
18014 return 0;
18015 }
18016 _ACEOF
18017 if ac_fn_c_try_compile "$LINENO"; then :
18018 gl_cv_sys_struct_timeval=yes
18019 else
18020 gl_cv_sys_struct_timeval=no
18021 fi
18022 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18023
18024 fi
18025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
18026 $as_echo "$gl_cv_sys_struct_timeval" >&6; }
18027 if test $gl_cv_sys_struct_timeval != yes; then
18028 HAVE_STRUCT_TIMEVAL=0
18029 else
18030 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
18031 $as_echo_n "checking for wide-enough struct timeval.tv_sec member... " >&6; }
18032 if test "${gl_cv_sys_struct_timeval_tv_sec+set}" = set; then :
18033 $as_echo_n "(cached) " >&6
18034 else
18035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18036 /* end confdefs.h. */
18037 #if HAVE_SYS_TIME_H
18038 #include <sys/time.h>
18039 #endif
18040 #include <time.h>
18041 #if HAVE_WINSOCK2_H
18042 # include <winsock2.h>
18043 #endif
18044
18045 int
18046 main ()
18047 {
18048 static struct timeval x;
18049 typedef int verify_tv_sec_type[
18050 sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
18051 ];
18052
18053 ;
18054 return 0;
18055 }
18056 _ACEOF
18057 if ac_fn_c_try_compile "$LINENO"; then :
18058 gl_cv_sys_struct_timeval_tv_sec=yes
18059 else
18060 gl_cv_sys_struct_timeval_tv_sec=no
18061 fi
18062 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18063
18064 fi
18065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
18066 $as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
18067 if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
18068 REPLACE_STRUCT_TIMEVAL=1
18069 fi
18070 fi
18071
18072
18073
18074
18075
18076
18077
18078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
18079 $as_echo_n "checking for unsigned long long int... " >&6; }
18080 if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then :
18081 $as_echo_n "(cached) " >&6
18082 else
18083 ac_cv_type_unsigned_long_long_int=yes
18084 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
18085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18086 /* end confdefs.h. */
18087
18088 /* For now, do not test the preprocessor; as of 2007 there are too many
18089 implementations with broken preprocessors. Perhaps this can
18090 be revisited in 2012. In the meantime, code should not expect
18091 #if to work with literals wider than 32 bits. */
18092 /* Test literals. */
18093 long long int ll = 9223372036854775807ll;
18094 long long int nll = -9223372036854775807LL;
18095 unsigned long long int ull = 18446744073709551615ULL;
18096 /* Test constant expressions. */
18097 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
18098 ? 1 : -1)];
18099 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
18100 ? 1 : -1)];
18101 int i = 63;
18102 int
18103 main ()
18104 {
18105 /* Test availability of runtime routines for shift and division. */
18106 long long int llmax = 9223372036854775807ll;
18107 unsigned long long int ullmax = 18446744073709551615ull;
18108 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
18109 | (llmax / ll) | (llmax % ll)
18110 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
18111 | (ullmax / ull) | (ullmax % ull));
18112 ;
18113 return 0;
18114 }
18115
18116 _ACEOF
18117 if ac_fn_c_try_link "$LINENO"; then :
18118
18119 else
18120 ac_cv_type_unsigned_long_long_int=no
18121 fi
18122 rm -f core conftest.err conftest.$ac_objext \
18123 conftest$ac_exeext conftest.$ac_ext
18124 fi
18125 fi
18126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
18127 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
18128 if test $ac_cv_type_unsigned_long_long_int = yes; then
18129
18130 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
18131
18132 fi
18133
18134
18135
18136 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
18137 $as_echo_n "checking for long long int... " >&6; }
18138 if test "${ac_cv_type_long_long_int+set}" = set; then :
18139 $as_echo_n "(cached) " >&6
18140 else
18141 ac_cv_type_long_long_int=yes
18142 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
18143 ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
18144 if test $ac_cv_type_long_long_int = yes; then
18145 if test "$cross_compiling" = yes; then :
18146 :
18147 else
18148 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18149 /* end confdefs.h. */
18150 #include <limits.h>
18151 #ifndef LLONG_MAX
18152 # define HALF \
18153 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
18154 # define LLONG_MAX (HALF - 1 + HALF)
18155 #endif
18156 int
18157 main ()
18158 {
18159 long long int n = 1;
18160 int i;
18161 for (i = 0; ; i++)
18162 {
18163 long long int m = n << i;
18164 if (m >> i != n)
18165 return 1;
18166 if (LLONG_MAX / 2 < m)
18167 break;
18168 }
18169 return 0;
18170 ;
18171 return 0;
18172 }
18173 _ACEOF
18174 if ac_fn_c_try_run "$LINENO"; then :
18175
18176 else
18177 ac_cv_type_long_long_int=no
18178 fi
18179 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18180 conftest.$ac_objext conftest.beam conftest.$ac_ext
18181 fi
18182
18183 fi
18184 fi
18185 fi
18186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
18187 $as_echo "$ac_cv_type_long_long_int" >&6; }
18188 if test $ac_cv_type_long_long_int = yes; then
18189
18190 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
18191
18192 fi
18193
18194
18195
18196
18197
18198
18199 gl_cv_c_multiarch=no
18200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18201 /* end confdefs.h. */
18202 #ifndef __APPLE_CC__
18203 not a universal capable compiler
18204 #endif
18205 typedef int dummy;
18206
18207 _ACEOF
18208 if ac_fn_c_try_compile "$LINENO"; then :
18209
18210 arch=
18211 prev=
18212 for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
18213 if test -n "$prev"; then
18214 case $word in
18215 i?86 | x86_64 | ppc | ppc64)
18216 if test -z "$arch" || test "$arch" = "$word"; then
18217 arch="$word"
18218 else
18219 gl_cv_c_multiarch=yes
18220 fi
18221 ;;
18222 esac
18223 prev=
18224 else
18225 if test "x$word" = "x-arch"; then
18226 prev=arch
18227 fi
18228 fi
18229 done
18230
18231 fi
18232 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18233 if test $gl_cv_c_multiarch = yes; then
18234 APPLE_UNIVERSAL_BUILD=1
18235 else
18236 APPLE_UNIVERSAL_BUILD=0
18237 fi
18238
18239
18240
18241
18242
18243 if test $ac_cv_type_long_long_int = yes; then
18244 HAVE_LONG_LONG_INT=1
18245 else
18246 HAVE_LONG_LONG_INT=0
18247 fi
18248
18249
18250 if test $ac_cv_type_unsigned_long_long_int = yes; then
18251 HAVE_UNSIGNED_LONG_LONG_INT=1
18252 else
18253 HAVE_UNSIGNED_LONG_LONG_INT=0
18254 fi
18255
18256
18257
18258 if test $ac_cv_header_wchar_h = yes; then
18259 HAVE_WCHAR_H=1
18260 else
18261 HAVE_WCHAR_H=0
18262 fi
18263
18264
18265 if test $ac_cv_header_inttypes_h = yes; then
18266 HAVE_INTTYPES_H=1
18267 else
18268 HAVE_INTTYPES_H=0
18269 fi
18270
18271
18272 if test $ac_cv_header_sys_types_h = yes; then
18273 HAVE_SYS_TYPES_H=1
18274 else
18275 HAVE_SYS_TYPES_H=0
18276 fi
18277
18278
18279
18280
18281
18282
18283
18284
18285
18286
18287
18288 if test $gl_cv_have_include_next = yes; then
18289 gl_cv_next_stdint_h='<'stdint.h'>'
18290 else
18291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
18292 $as_echo_n "checking absolute name of <stdint.h>... " >&6; }
18293 if test "${gl_cv_next_stdint_h+set}" = set; then :
18294 $as_echo_n "(cached) " >&6
18295 else
18296
18297 if test $ac_cv_header_stdint_h = yes; then
18298
18299
18300 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18301 /* end confdefs.h. */
18302 #include <stdint.h>
18303
18304 _ACEOF
18305 case "$host_os" in
18306 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18307 *) gl_absname_cpp="$ac_cpp" ;;
18308 esac
18309
18310 case "$host_os" in
18311 mingw*)
18312 gl_dirsep_regex='[/\\]'
18313 ;;
18314 *)
18315 gl_dirsep_regex='\/'
18316 ;;
18317 esac
18318 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18319
18320 gl_header_literal_regex=`echo 'stdint.h' \
18321 | sed -e "$gl_make_literal_regex_sed"`
18322 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18323 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18324 s|^/[^/]|//&|
18325 p
18326 q
18327 }'
18328 gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18329 sed -n "$gl_absolute_header_sed"`'"'
18330 else
18331 gl_cv_next_stdint_h='<'stdint.h'>'
18332 fi
18333
18334
18335 fi
18336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
18337 $as_echo "$gl_cv_next_stdint_h" >&6; }
18338 fi
18339 NEXT_STDINT_H=$gl_cv_next_stdint_h
18340
18341 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18342 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18343 gl_next_as_first_directive='<'stdint.h'>'
18344 else
18345 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18346 gl_next_as_first_directive=$gl_cv_next_stdint_h
18347 fi
18348 NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
18349
18350
18351
18352
18353 if test $ac_cv_header_stdint_h = yes; then
18354 HAVE_STDINT_H=1
18355 else
18356 HAVE_STDINT_H=0
18357 fi
18358
18359
18360 if test $ac_cv_header_stdint_h = yes; then
18361 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
18362 $as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
18363 if test "${gl_cv_header_working_stdint_h+set}" = set; then :
18364 $as_echo_n "(cached) " >&6
18365 else
18366 gl_cv_header_working_stdint_h=no
18367 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18368 /* end confdefs.h. */
18369
18370
18371 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
18372 #include <stdint.h>
18373 /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
18374 #if !(defined WCHAR_MIN && defined WCHAR_MAX)
18375 #error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
18376 #endif
18377
18378
18379 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18380 included before <wchar.h>. */
18381 #include <stddef.h>
18382 #include <signal.h>
18383 #if HAVE_WCHAR_H
18384 # include <stdio.h>
18385 # include <time.h>
18386 # include <wchar.h>
18387 #endif
18388
18389
18390 #ifdef INT8_MAX
18391 int8_t a1 = INT8_MAX;
18392 int8_t a1min = INT8_MIN;
18393 #endif
18394 #ifdef INT16_MAX
18395 int16_t a2 = INT16_MAX;
18396 int16_t a2min = INT16_MIN;
18397 #endif
18398 #ifdef INT32_MAX
18399 int32_t a3 = INT32_MAX;
18400 int32_t a3min = INT32_MIN;
18401 #endif
18402 #ifdef INT64_MAX
18403 int64_t a4 = INT64_MAX;
18404 int64_t a4min = INT64_MIN;
18405 #endif
18406 #ifdef UINT8_MAX
18407 uint8_t b1 = UINT8_MAX;
18408 #else
18409 typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
18410 #endif
18411 #ifdef UINT16_MAX
18412 uint16_t b2 = UINT16_MAX;
18413 #endif
18414 #ifdef UINT32_MAX
18415 uint32_t b3 = UINT32_MAX;
18416 #endif
18417 #ifdef UINT64_MAX
18418 uint64_t b4 = UINT64_MAX;
18419 #endif
18420 int_least8_t c1 = INT8_C (0x7f);
18421 int_least8_t c1max = INT_LEAST8_MAX;
18422 int_least8_t c1min = INT_LEAST8_MIN;
18423 int_least16_t c2 = INT16_C (0x7fff);
18424 int_least16_t c2max = INT_LEAST16_MAX;
18425 int_least16_t c2min = INT_LEAST16_MIN;
18426 int_least32_t c3 = INT32_C (0x7fffffff);
18427 int_least32_t c3max = INT_LEAST32_MAX;
18428 int_least32_t c3min = INT_LEAST32_MIN;
18429 int_least64_t c4 = INT64_C (0x7fffffffffffffff);
18430 int_least64_t c4max = INT_LEAST64_MAX;
18431 int_least64_t c4min = INT_LEAST64_MIN;
18432 uint_least8_t d1 = UINT8_C (0xff);
18433 uint_least8_t d1max = UINT_LEAST8_MAX;
18434 uint_least16_t d2 = UINT16_C (0xffff);
18435 uint_least16_t d2max = UINT_LEAST16_MAX;
18436 uint_least32_t d3 = UINT32_C (0xffffffff);
18437 uint_least32_t d3max = UINT_LEAST32_MAX;
18438 uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
18439 uint_least64_t d4max = UINT_LEAST64_MAX;
18440 int_fast8_t e1 = INT_FAST8_MAX;
18441 int_fast8_t e1min = INT_FAST8_MIN;
18442 int_fast16_t e2 = INT_FAST16_MAX;
18443 int_fast16_t e2min = INT_FAST16_MIN;
18444 int_fast32_t e3 = INT_FAST32_MAX;
18445 int_fast32_t e3min = INT_FAST32_MIN;
18446 int_fast64_t e4 = INT_FAST64_MAX;
18447 int_fast64_t e4min = INT_FAST64_MIN;
18448 uint_fast8_t f1 = UINT_FAST8_MAX;
18449 uint_fast16_t f2 = UINT_FAST16_MAX;
18450 uint_fast32_t f3 = UINT_FAST32_MAX;
18451 uint_fast64_t f4 = UINT_FAST64_MAX;
18452 #ifdef INTPTR_MAX
18453 intptr_t g = INTPTR_MAX;
18454 intptr_t gmin = INTPTR_MIN;
18455 #endif
18456 #ifdef UINTPTR_MAX
18457 uintptr_t h = UINTPTR_MAX;
18458 #endif
18459 intmax_t i = INTMAX_MAX;
18460 uintmax_t j = UINTMAX_MAX;
18461
18462 #include <limits.h> /* for CHAR_BIT */
18463 #define TYPE_MINIMUM(t) \
18464 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
18465 #define TYPE_MAXIMUM(t) \
18466 ((t) ((t) 0 < (t) -1 \
18467 ? (t) -1 \
18468 : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
18469 struct s {
18470 int check_PTRDIFF:
18471 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
18472 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
18473 ? 1 : -1;
18474 /* Detect bug in FreeBSD 6.0 / ia64. */
18475 int check_SIG_ATOMIC:
18476 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
18477 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
18478 ? 1 : -1;
18479 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
18480 int check_WCHAR:
18481 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
18482 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
18483 ? 1 : -1;
18484 /* Detect bug in mingw. */
18485 int check_WINT:
18486 WINT_MIN == TYPE_MINIMUM (wint_t)
18487 && WINT_MAX == TYPE_MAXIMUM (wint_t)
18488 ? 1 : -1;
18489
18490 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
18491 int check_UINT8_C:
18492 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
18493 int check_UINT16_C:
18494 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
18495
18496 /* Detect bugs in OpenBSD 3.9 stdint.h. */
18497 #ifdef UINT8_MAX
18498 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
18499 #endif
18500 #ifdef UINT16_MAX
18501 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
18502 #endif
18503 #ifdef UINT32_MAX
18504 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
18505 #endif
18506 #ifdef UINT64_MAX
18507 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
18508 #endif
18509 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
18510 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
18511 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
18512 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
18513 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
18514 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
18515 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
18516 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
18517 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
18518 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
18519 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
18520 };
18521
18522 int
18523 main ()
18524 {
18525
18526 ;
18527 return 0;
18528 }
18529 _ACEOF
18530 if ac_fn_c_try_compile "$LINENO"; then :
18531 if test "$cross_compiling" = yes; then :
18532 gl_cv_header_working_stdint_h=yes
18533
18534 else
18535 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18536 /* end confdefs.h. */
18537
18538
18539 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
18540 #include <stdint.h>
18541
18542
18543 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18544 included before <wchar.h>. */
18545 #include <stddef.h>
18546 #include <signal.h>
18547 #if HAVE_WCHAR_H
18548 # include <stdio.h>
18549 # include <time.h>
18550 # include <wchar.h>
18551 #endif
18552
18553
18554 #include <stdio.h>
18555 #include <string.h>
18556 #define MVAL(macro) MVAL1(macro)
18557 #define MVAL1(expression) #expression
18558 static const char *macro_values[] =
18559 {
18560 #ifdef INT8_MAX
18561 MVAL (INT8_MAX),
18562 #endif
18563 #ifdef INT16_MAX
18564 MVAL (INT16_MAX),
18565 #endif
18566 #ifdef INT32_MAX
18567 MVAL (INT32_MAX),
18568 #endif
18569 #ifdef INT64_MAX
18570 MVAL (INT64_MAX),
18571 #endif
18572 #ifdef UINT8_MAX
18573 MVAL (UINT8_MAX),
18574 #endif
18575 #ifdef UINT16_MAX
18576 MVAL (UINT16_MAX),
18577 #endif
18578 #ifdef UINT32_MAX
18579 MVAL (UINT32_MAX),
18580 #endif
18581 #ifdef UINT64_MAX
18582 MVAL (UINT64_MAX),
18583 #endif
18584 NULL
18585 };
18586
18587 int
18588 main ()
18589 {
18590
18591 const char **mv;
18592 for (mv = macro_values; *mv != NULL; mv++)
18593 {
18594 const char *value = *mv;
18595 /* Test whether it looks like a cast expression. */
18596 if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
18597 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
18598 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
18599 || strncmp (value, "((int)"/*)*/, 6) == 0
18600 || strncmp (value, "((signed short)"/*)*/, 15) == 0
18601 || strncmp (value, "((signed char)"/*)*/, 14) == 0)
18602 return mv - macro_values + 1;
18603 }
18604 return 0;
18605
18606 ;
18607 return 0;
18608 }
18609 _ACEOF
18610 if ac_fn_c_try_run "$LINENO"; then :
18611 gl_cv_header_working_stdint_h=yes
18612 fi
18613 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18614 conftest.$ac_objext conftest.beam conftest.$ac_ext
18615 fi
18616
18617
18618 fi
18619 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18620
18621 fi
18622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
18623 $as_echo "$gl_cv_header_working_stdint_h" >&6; }
18624 fi
18625 if test "$gl_cv_header_working_stdint_h" = yes; then
18626 STDINT_H=
18627 else
18628 for ac_header in sys/inttypes.h sys/bitypes.h
18629 do :
18630 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
18631 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
18632 eval as_val=\$$as_ac_Header
18633 if test "x$as_val" = x""yes; then :
18634 cat >>confdefs.h <<_ACEOF
18635 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
18636 _ACEOF
18637
18638 fi
18639
18640 done
18641
18642 if test $ac_cv_header_sys_inttypes_h = yes; then
18643 HAVE_SYS_INTTYPES_H=1
18644 else
18645 HAVE_SYS_INTTYPES_H=0
18646 fi
18647
18648 if test $ac_cv_header_sys_bitypes_h = yes; then
18649 HAVE_SYS_BITYPES_H=1
18650 else
18651 HAVE_SYS_BITYPES_H=0
18652 fi
18653
18654
18655
18656
18657 if test $APPLE_UNIVERSAL_BUILD = 0; then
18658
18659
18660 for gltype in ptrdiff_t size_t ; do
18661 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
18662 $as_echo_n "checking for bit size of $gltype... " >&6; }
18663 if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
18664 $as_echo_n "(cached) " >&6
18665 else
18666 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
18667 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18668 included before <wchar.h>. */
18669 #include <stddef.h>
18670 #include <signal.h>
18671 #if HAVE_WCHAR_H
18672 # include <stdio.h>
18673 # include <time.h>
18674 # include <wchar.h>
18675 #endif
18676
18677 #include <limits.h>"; then :
18678
18679 else
18680 result=unknown
18681 fi
18682
18683 eval gl_cv_bitsizeof_${gltype}=\$result
18684
18685 fi
18686 eval ac_res=\$gl_cv_bitsizeof_${gltype}
18687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18688 $as_echo "$ac_res" >&6; }
18689 eval result=\$gl_cv_bitsizeof_${gltype}
18690 if test $result = unknown; then
18691 result=0
18692 fi
18693 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
18694 cat >>confdefs.h <<_ACEOF
18695 #define BITSIZEOF_${GLTYPE} $result
18696 _ACEOF
18697
18698 eval BITSIZEOF_${GLTYPE}=\$result
18699 done
18700
18701
18702 fi
18703
18704
18705 for gltype in sig_atomic_t wchar_t wint_t ; do
18706 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
18707 $as_echo_n "checking for bit size of $gltype... " >&6; }
18708 if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
18709 $as_echo_n "(cached) " >&6
18710 else
18711 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
18712 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18713 included before <wchar.h>. */
18714 #include <stddef.h>
18715 #include <signal.h>
18716 #if HAVE_WCHAR_H
18717 # include <stdio.h>
18718 # include <time.h>
18719 # include <wchar.h>
18720 #endif
18721
18722 #include <limits.h>"; then :
18723
18724 else
18725 result=unknown
18726 fi
18727
18728 eval gl_cv_bitsizeof_${gltype}=\$result
18729
18730 fi
18731 eval ac_res=\$gl_cv_bitsizeof_${gltype}
18732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18733 $as_echo "$ac_res" >&6; }
18734 eval result=\$gl_cv_bitsizeof_${gltype}
18735 if test $result = unknown; then
18736 result=0
18737 fi
18738 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
18739 cat >>confdefs.h <<_ACEOF
18740 #define BITSIZEOF_${GLTYPE} $result
18741 _ACEOF
18742
18743 eval BITSIZEOF_${GLTYPE}=\$result
18744 done
18745
18746
18747
18748
18749 for gltype in sig_atomic_t wchar_t wint_t ; do
18750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
18751 $as_echo_n "checking whether $gltype is signed... " >&6; }
18752 if { as_var=gl_cv_type_${gltype}_signed; eval "test \"\${$as_var+set}\" = set"; }; then :
18753 $as_echo_n "(cached) " >&6
18754 else
18755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18756 /* end confdefs.h. */
18757
18758 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18759 included before <wchar.h>. */
18760 #include <stddef.h>
18761 #include <signal.h>
18762 #if HAVE_WCHAR_H
18763 # include <stdio.h>
18764 # include <time.h>
18765 # include <wchar.h>
18766 #endif
18767
18768 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
18769 int
18770 main ()
18771 {
18772
18773 ;
18774 return 0;
18775 }
18776 _ACEOF
18777 if ac_fn_c_try_compile "$LINENO"; then :
18778 result=yes
18779 else
18780 result=no
18781 fi
18782 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18783 eval gl_cv_type_${gltype}_signed=\$result
18784
18785 fi
18786 eval ac_res=\$gl_cv_type_${gltype}_signed
18787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18788 $as_echo "$ac_res" >&6; }
18789 eval result=\$gl_cv_type_${gltype}_signed
18790 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
18791 if test "$result" = yes; then
18792 cat >>confdefs.h <<_ACEOF
18793 #define HAVE_SIGNED_${GLTYPE} 1
18794 _ACEOF
18795
18796 eval HAVE_SIGNED_${GLTYPE}=1
18797 else
18798 eval HAVE_SIGNED_${GLTYPE}=0
18799 fi
18800 done
18801
18802
18803 gl_cv_type_ptrdiff_t_signed=yes
18804 gl_cv_type_size_t_signed=no
18805 if test $APPLE_UNIVERSAL_BUILD = 0; then
18806
18807
18808 for gltype in ptrdiff_t size_t ; do
18809 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
18810 $as_echo_n "checking for $gltype integer literal suffix... " >&6; }
18811 if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
18812 $as_echo_n "(cached) " >&6
18813 else
18814 eval gl_cv_type_${gltype}_suffix=no
18815 eval result=\$gl_cv_type_${gltype}_signed
18816 if test "$result" = yes; then
18817 glsufu=
18818 else
18819 glsufu=u
18820 fi
18821 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
18822 case $glsuf in
18823 '') gltype1='int';;
18824 l) gltype1='long int';;
18825 ll) gltype1='long long int';;
18826 i64) gltype1='__int64';;
18827 u) gltype1='unsigned int';;
18828 ul) gltype1='unsigned long int';;
18829 ull) gltype1='unsigned long long int';;
18830 ui64)gltype1='unsigned __int64';;
18831 esac
18832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18833 /* end confdefs.h. */
18834
18835 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18836 included before <wchar.h>. */
18837 #include <stddef.h>
18838 #include <signal.h>
18839 #if HAVE_WCHAR_H
18840 # include <stdio.h>
18841 # include <time.h>
18842 # include <wchar.h>
18843 #endif
18844
18845 extern $gltype foo;
18846 extern $gltype1 foo;
18847 int
18848 main ()
18849 {
18850
18851 ;
18852 return 0;
18853 }
18854 _ACEOF
18855 if ac_fn_c_try_compile "$LINENO"; then :
18856 eval gl_cv_type_${gltype}_suffix=\$glsuf
18857 fi
18858 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18859 eval result=\$gl_cv_type_${gltype}_suffix
18860 test "$result" != no && break
18861 done
18862 fi
18863 eval ac_res=\$gl_cv_type_${gltype}_suffix
18864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18865 $as_echo "$ac_res" >&6; }
18866 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
18867 eval result=\$gl_cv_type_${gltype}_suffix
18868 test "$result" = no && result=
18869 eval ${GLTYPE}_SUFFIX=\$result
18870 cat >>confdefs.h <<_ACEOF
18871 #define ${GLTYPE}_SUFFIX $result
18872 _ACEOF
18873
18874 done
18875
18876
18877 fi
18878
18879
18880 for gltype in sig_atomic_t wchar_t wint_t ; do
18881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
18882 $as_echo_n "checking for $gltype integer literal suffix... " >&6; }
18883 if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
18884 $as_echo_n "(cached) " >&6
18885 else
18886 eval gl_cv_type_${gltype}_suffix=no
18887 eval result=\$gl_cv_type_${gltype}_signed
18888 if test "$result" = yes; then
18889 glsufu=
18890 else
18891 glsufu=u
18892 fi
18893 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
18894 case $glsuf in
18895 '') gltype1='int';;
18896 l) gltype1='long int';;
18897 ll) gltype1='long long int';;
18898 i64) gltype1='__int64';;
18899 u) gltype1='unsigned int';;
18900 ul) gltype1='unsigned long int';;
18901 ull) gltype1='unsigned long long int';;
18902 ui64)gltype1='unsigned __int64';;
18903 esac
18904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18905 /* end confdefs.h. */
18906
18907 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18908 included before <wchar.h>. */
18909 #include <stddef.h>
18910 #include <signal.h>
18911 #if HAVE_WCHAR_H
18912 # include <stdio.h>
18913 # include <time.h>
18914 # include <wchar.h>
18915 #endif
18916
18917 extern $gltype foo;
18918 extern $gltype1 foo;
18919 int
18920 main ()
18921 {
18922
18923 ;
18924 return 0;
18925 }
18926 _ACEOF
18927 if ac_fn_c_try_compile "$LINENO"; then :
18928 eval gl_cv_type_${gltype}_suffix=\$glsuf
18929 fi
18930 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18931 eval result=\$gl_cv_type_${gltype}_suffix
18932 test "$result" != no && break
18933 done
18934 fi
18935 eval ac_res=\$gl_cv_type_${gltype}_suffix
18936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18937 $as_echo "$ac_res" >&6; }
18938 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
18939 eval result=\$gl_cv_type_${gltype}_suffix
18940 test "$result" = no && result=
18941 eval ${GLTYPE}_SUFFIX=\$result
18942 cat >>confdefs.h <<_ACEOF
18943 #define ${GLTYPE}_SUFFIX $result
18944 _ACEOF
18945
18946 done
18947
18948
18949
18950 if test $BITSIZEOF_WINT_T -lt 32; then
18951 BITSIZEOF_WINT_T=32
18952 fi
18953
18954 STDINT_H=stdint.h
18955 fi
18956
18957 if test -n "$STDINT_H"; then
18958 GL_GENERATE_STDINT_H_TRUE=
18959 GL_GENERATE_STDINT_H_FALSE='#'
18960 else
18961 GL_GENERATE_STDINT_H_TRUE='#'
18962 GL_GENERATE_STDINT_H_FALSE=
18963 fi
18964
18965
18966
18967
18968
18969 GNULIB_IMAXABS=0;
18970 GNULIB_IMAXDIV=0;
18971 GNULIB_STRTOIMAX=0;
18972 GNULIB_STRTOUMAX=0;
18973 HAVE_DECL_IMAXABS=1;
18974 HAVE_DECL_IMAXDIV=1;
18975 HAVE_DECL_STRTOIMAX=1;
18976 HAVE_DECL_STRTOUMAX=1;
18977 REPLACE_STRTOIMAX=0;
18978 INT32_MAX_LT_INTMAX_MAX=1;
18979 INT64_MAX_EQ_LONG_MAX='defined _LP64';
18980 PRI_MACROS_BROKEN=0;
18981 PRIPTR_PREFIX=__PRIPTR_PREFIX;
18982 UINT32_MAX_LT_UINTMAX_MAX=1;
18983 UINT64_MAX_EQ_ULONG_MAX='defined _LP64';
18984
18985
18986
18987
18988
18989
18990
18991
18992
18993
18994
18995
18996
18997
18998
18999 if test $gl_cv_have_include_next = yes; then
19000 gl_cv_next_inttypes_h='<'inttypes.h'>'
19001 else
19002 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
19003 $as_echo_n "checking absolute name of <inttypes.h>... " >&6; }
19004 if test "${gl_cv_next_inttypes_h+set}" = set; then :
19005 $as_echo_n "(cached) " >&6
19006 else
19007
19008 if test $ac_cv_header_inttypes_h = yes; then
19009
19010
19011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19012 /* end confdefs.h. */
19013 #include <inttypes.h>
19014
19015 _ACEOF
19016 case "$host_os" in
19017 aix*) gl_absname_cpp="$ac_cpp -C" ;;
19018 *) gl_absname_cpp="$ac_cpp" ;;
19019 esac
19020
19021 case "$host_os" in
19022 mingw*)
19023 gl_dirsep_regex='[/\\]'
19024 ;;
19025 *)
19026 gl_dirsep_regex='\/'
19027 ;;
19028 esac
19029 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
19030
19031 gl_header_literal_regex=`echo 'inttypes.h' \
19032 | sed -e "$gl_make_literal_regex_sed"`
19033 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19034 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19035 s|^/[^/]|//&|
19036 p
19037 q
19038 }'
19039 gl_cv_next_inttypes_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19040 sed -n "$gl_absolute_header_sed"`'"'
19041 else
19042 gl_cv_next_inttypes_h='<'inttypes.h'>'
19043 fi
19044
19045
19046 fi
19047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
19048 $as_echo "$gl_cv_next_inttypes_h" >&6; }
19049 fi
19050 NEXT_INTTYPES_H=$gl_cv_next_inttypes_h
19051
19052 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19053 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19054 gl_next_as_first_directive='<'inttypes.h'>'
19055 else
19056 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19057 gl_next_as_first_directive=$gl_cv_next_inttypes_h
19058 fi
19059 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
19060
19061
19062
19063
19064
19065
19066
19067
19068
19069
19070
19071 case "$host_os" in
19072 mingw*)
19073 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
19074 $as_echo_n "checking for 64-bit off_t... " >&6; }
19075 if test "${gl_cv_type_off_t_64+set}" = set; then :
19076 $as_echo_n "(cached) " >&6
19077 else
19078 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19079 /* end confdefs.h. */
19080 #include <sys/types.h>
19081 int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
19082
19083 int
19084 main ()
19085 {
19086
19087 ;
19088 return 0;
19089 }
19090 _ACEOF
19091 if ac_fn_c_try_compile "$LINENO"; then :
19092 gl_cv_type_off_t_64=yes
19093 else
19094 gl_cv_type_off_t_64=no
19095 fi
19096 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19097
19098 fi
19099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
19100 $as_echo "$gl_cv_type_off_t_64" >&6; }
19101 if test $gl_cv_type_off_t_64 = no; then
19102 WINDOWS_64_BIT_OFF_T=1
19103 else
19104 WINDOWS_64_BIT_OFF_T=0
19105 fi
19106 WINDOWS_64_BIT_ST_SIZE=1
19107 ;;
19108 *)
19109 WINDOWS_64_BIT_OFF_T=0
19110 WINDOWS_64_BIT_ST_SIZE=0
19111 ;;
19112 esac
19113
19114
19115 GNULIB_FCHMODAT=0;
19116 GNULIB_FSTAT=0;
19117 GNULIB_FSTATAT=0;
19118 GNULIB_FUTIMENS=0;
19119 GNULIB_LCHMOD=0;
19120 GNULIB_LSTAT=0;
19121 GNULIB_MKDIRAT=0;
19122 GNULIB_MKFIFO=0;
19123 GNULIB_MKFIFOAT=0;
19124 GNULIB_MKNOD=0;
19125 GNULIB_MKNODAT=0;
19126 GNULIB_STAT=0;
19127 GNULIB_UTIMENSAT=0;
19128 HAVE_FCHMODAT=1;
19129 HAVE_FSTATAT=1;
19130 HAVE_FUTIMENS=1;
19131 HAVE_LCHMOD=1;
19132 HAVE_LSTAT=1;
19133 HAVE_MKDIRAT=1;
19134 HAVE_MKFIFO=1;
19135 HAVE_MKFIFOAT=1;
19136 HAVE_MKNOD=1;
19137 HAVE_MKNODAT=1;
19138 HAVE_UTIMENSAT=1;
19139 REPLACE_FSTAT=0;
19140 REPLACE_FSTATAT=0;
19141 REPLACE_FUTIMENS=0;
19142 REPLACE_LSTAT=0;
19143 REPLACE_MKDIR=0;
19144 REPLACE_MKFIFO=0;
19145 REPLACE_MKNOD=0;
19146 REPLACE_STAT=0;
19147 REPLACE_UTIMENSAT=0;
19148
19149
19150
19151
19152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
19153 $as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
19154 if test "${gl_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then :
19155 $as_echo_n "(cached) " >&6
19156 else
19157 rm -f conftest.sym conftest.file
19158 echo >conftest.file
19159 if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then
19160 if test "$cross_compiling" = yes; then :
19161 case "$host_os" in
19162 # Guess yes on glibc systems.
19163 *-gnu*) gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
19164 # If we don't know, assume the worst.
19165 *) gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
19166 esac
19167
19168 else
19169 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19170 /* end confdefs.h. */
19171 $ac_includes_default
19172 int
19173 main ()
19174 {
19175 struct stat sbuf;
19176 /* Linux will dereference the symlink and fail, as required by
19177 POSIX. That is better in the sense that it means we will not
19178 have to compile and use the lstat wrapper. */
19179 return lstat ("conftest.sym/", &sbuf) == 0;
19180
19181 ;
19182 return 0;
19183 }
19184 _ACEOF
19185 if ac_fn_c_try_run "$LINENO"; then :
19186 gl_cv_func_lstat_dereferences_slashed_symlink=yes
19187 else
19188 gl_cv_func_lstat_dereferences_slashed_symlink=no
19189 fi
19190 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19191 conftest.$ac_objext conftest.beam conftest.$ac_ext
19192 fi
19193
19194 else
19195 # If the 'ln -s' command failed, then we probably don't even
19196 # have an lstat function.
19197 gl_cv_func_lstat_dereferences_slashed_symlink="guessing no"
19198 fi
19199 rm -f conftest.sym conftest.file
19200
19201 fi
19202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
19203 $as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
19204 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
19205 *yes)
19206
19207 cat >>confdefs.h <<_ACEOF
19208 #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
19209 _ACEOF
19210
19211 ;;
19212 esac
19213
19214
19215 GNULIB_MKTIME=0;
19216 GNULIB_NANOSLEEP=0;
19217 GNULIB_STRPTIME=0;
19218 GNULIB_TIMEGM=0;
19219 GNULIB_TIME_R=0;
19220 HAVE_DECL_LOCALTIME_R=1;
19221 HAVE_NANOSLEEP=1;
19222 HAVE_STRPTIME=1;
19223 HAVE_TIMEGM=1;
19224 REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
19225 REPLACE_MKTIME=GNULIB_PORTCHECK;
19226 REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
19227 REPLACE_TIMEGM=GNULIB_PORTCHECK;
19228
19229
19230
19231
19232 GNULIB_PSELECT=0;
19233 GNULIB_SELECT=0;
19234 HAVE_PSELECT=1;
19235 REPLACE_PSELECT=0;
19236 REPLACE_SELECT=0;
19237
19238
19239
19240
19241
19242
19243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/select.h> is self-contained" >&5
19244 $as_echo_n "checking whether <sys/select.h> is self-contained... " >&6; }
19245 if test "${gl_cv_header_sys_select_h_selfcontained+set}" = set; then :
19246 $as_echo_n "(cached) " >&6
19247 else
19248
19249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19250 /* end confdefs.h. */
19251 #include <sys/select.h>
19252 int
19253 main ()
19254 {
19255 struct timeval b;
19256 ;
19257 return 0;
19258 }
19259 _ACEOF
19260 if ac_fn_c_try_compile "$LINENO"; then :
19261 gl_cv_header_sys_select_h_selfcontained=yes
19262 else
19263 gl_cv_header_sys_select_h_selfcontained=no
19264 fi
19265 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19266 if test $gl_cv_header_sys_select_h_selfcontained = yes; then
19267 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19268 /* end confdefs.h. */
19269 #include <sys/select.h>
19270 int
19271 main ()
19272 {
19273 int memset; int bzero;
19274 ;
19275 return 0;
19276 }
19277
19278 _ACEOF
19279 if ac_fn_c_try_compile "$LINENO"; then :
19280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19281 /* end confdefs.h. */
19282 #include <sys/select.h>
19283 int
19284 main ()
19285 {
19286
19287 #undef memset
19288 #define memset nonexistent_memset
19289 extern
19290 #ifdef __cplusplus
19291 "C"
19292 #endif
19293 void *memset (void *, int, unsigned long);
19294 #undef bzero
19295 #define bzero nonexistent_bzero
19296 extern
19297 #ifdef __cplusplus
19298 "C"
19299 #endif
19300 void bzero (void *, unsigned long);
19301 fd_set fds;
19302 FD_ZERO (&fds);
19303
19304 ;
19305 return 0;
19306 }
19307
19308 _ACEOF
19309 if ac_fn_c_try_link "$LINENO"; then :
19310
19311 else
19312 gl_cv_header_sys_select_h_selfcontained=no
19313 fi
19314 rm -f core conftest.err conftest.$ac_objext \
19315 conftest$ac_exeext conftest.$ac_ext
19316
19317 fi
19318 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19319 fi
19320
19321 fi
19322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_select_h_selfcontained" >&5
19323 $as_echo "$gl_cv_header_sys_select_h_selfcontained" >&6; }
19324
19325
19326
19327
19328
19329
19330
19331
19332
19333 if test $gl_cv_have_include_next = yes; then
19334 gl_cv_next_sys_select_h='<'sys/select.h'>'
19335 else
19336 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/select.h>" >&5
19337 $as_echo_n "checking absolute name of <sys/select.h>... " >&6; }
19338 if test "${gl_cv_next_sys_select_h+set}" = set; then :
19339 $as_echo_n "(cached) " >&6
19340 else
19341
19342 if test $ac_cv_header_sys_select_h = yes; then
19343
19344
19345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19346 /* end confdefs.h. */
19347 #include <sys/select.h>
19348
19349 _ACEOF
19350 case "$host_os" in
19351 aix*) gl_absname_cpp="$ac_cpp -C" ;;
19352 *) gl_absname_cpp="$ac_cpp" ;;
19353 esac
19354
19355 case "$host_os" in
19356 mingw*)
19357 gl_dirsep_regex='[/\\]'
19358 ;;
19359 *)
19360 gl_dirsep_regex='\/'
19361 ;;
19362 esac
19363 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
19364
19365 gl_header_literal_regex=`echo 'sys/select.h' \
19366 | sed -e "$gl_make_literal_regex_sed"`
19367 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19368 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19369 s|^/[^/]|//&|
19370 p
19371 q
19372 }'
19373 gl_cv_next_sys_select_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19374 sed -n "$gl_absolute_header_sed"`'"'
19375 else
19376 gl_cv_next_sys_select_h='<'sys/select.h'>'
19377 fi
19378
19379
19380 fi
19381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_select_h" >&5
19382 $as_echo "$gl_cv_next_sys_select_h" >&6; }
19383 fi
19384 NEXT_SYS_SELECT_H=$gl_cv_next_sys_select_h
19385
19386 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19387 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19388 gl_next_as_first_directive='<'sys/select.h'>'
19389 else
19390 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19391 gl_next_as_first_directive=$gl_cv_next_sys_select_h
19392 fi
19393 NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H=$gl_next_as_first_directive
19394
19395
19396
19397
19398 if test $ac_cv_header_sys_select_h = yes; then
19399 HAVE_SYS_SELECT_H=1
19400 else
19401 HAVE_SYS_SELECT_H=0
19402 fi
19403
19404
19405
19406
19407
19408 if test $ac_cv_header_sys_socket_h != yes; then
19409 for ac_header in winsock2.h
19410 do :
19411 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
19412 if test "x$ac_cv_header_winsock2_h" = x""yes; then :
19413 cat >>confdefs.h <<_ACEOF
19414 #define HAVE_WINSOCK2_H 1
19415 _ACEOF
19416
19417 fi
19418
19419 done
19420
19421 fi
19422 if test "$ac_cv_header_winsock2_h" = yes; then
19423 HAVE_WINSOCK2_H=1
19424 UNISTD_H_HAVE_WINSOCK2_H=1
19425 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
19426 else
19427 HAVE_WINSOCK2_H=0
19428 fi
19429
19430
19431
19432
19433
19434
19435
19436
19437 GNULIB_PTHREAD_SIGMASK=0;
19438 GNULIB_RAISE=0;
19439 GNULIB_SIGNAL_H_SIGPIPE=0;
19440 GNULIB_SIGPROCMASK=0;
19441 GNULIB_SIGACTION=0;
19442 HAVE_POSIX_SIGNALBLOCKING=1;
19443 HAVE_PTHREAD_SIGMASK=1;
19444 HAVE_RAISE=1;
19445 HAVE_SIGSET_T=1;
19446 HAVE_SIGINFO_T=1;
19447 HAVE_SIGACTION=1;
19448 HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
19449
19450 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
19451
19452 HAVE_SIGHANDLER_T=1;
19453 REPLACE_PTHREAD_SIGMASK=0;
19454 REPLACE_RAISE=0;
19455
19456
19457
19458
19459
19460
19461
19462 ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
19463 #include <signal.h>
19464 /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
19465 #include <sys/types.h>
19466
19467 "
19468 if test "x$ac_cv_type_sigset_t" = x""yes; then :
19469
19470 cat >>confdefs.h <<_ACEOF
19471 #define HAVE_SIGSET_T 1
19472 _ACEOF
19473
19474 gl_cv_type_sigset_t=yes
19475 else
19476 gl_cv_type_sigset_t=no
19477 fi
19478
19479 if test $gl_cv_type_sigset_t != yes; then
19480 HAVE_SIGSET_T=0
19481 fi
19482
19483
19484
19485 if test $ac_cv_header_sys_socket_h = no; then
19486 for ac_header in ws2tcpip.h
19487 do :
19488 ac_fn_c_check_header_mongrel "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default"
19489 if test "x$ac_cv_header_ws2tcpip_h" = x""yes; then :
19490 cat >>confdefs.h <<_ACEOF
19491 #define HAVE_WS2TCPIP_H 1
19492 _ACEOF
19493
19494 fi
19495
19496 done
19497
19498 fi
19499
19500 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
19501 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
19502 if test "${ac_cv_header_stdbool_h+set}" = set; then :
19503 $as_echo_n "(cached) " >&6
19504 else
19505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19506 /* end confdefs.h. */
19507
19508 #include <stdbool.h>
19509 #ifndef bool
19510 "error: bool is not defined"
19511 #endif
19512 #ifndef false
19513 "error: false is not defined"
19514 #endif
19515 #if false
19516 "error: false is not 0"
19517 #endif
19518 #ifndef true
19519 "error: true is not defined"
19520 #endif
19521 #if true != 1
19522 "error: true is not 1"
19523 #endif
19524 #ifndef __bool_true_false_are_defined
19525 "error: __bool_true_false_are_defined is not defined"
19526 #endif
19527
19528 struct s { _Bool s: 1; _Bool t; } s;
19529
19530 char a[true == 1 ? 1 : -1];
19531 char b[false == 0 ? 1 : -1];
19532 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
19533 char d[(bool) 0.5 == true ? 1 : -1];
19534 /* See body of main program for 'e'. */
19535 char f[(_Bool) 0.0 == false ? 1 : -1];
19536 char g[true];
19537 char h[sizeof (_Bool)];
19538 char i[sizeof s.t];
19539 enum { j = false, k = true, l = false * true, m = true * 256 };
19540 /* The following fails for
19541 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
19542 _Bool n[m];
19543 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
19544 char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
19545 /* Catch a bug in an HP-UX C compiler. See
19546 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
19547 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
19548 */
19549 _Bool q = true;
19550 _Bool *pq = &q;
19551
19552 int
19553 main ()
19554 {
19555
19556 bool e = &s;
19557 *pq |= q;
19558 *pq |= ! q;
19559 /* Refer to every declared value, to avoid compiler optimizations. */
19560 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
19561 + !m + !n + !o + !p + !q + !pq);
19562
19563 ;
19564 return 0;
19565 }
19566 _ACEOF
19567 if ac_fn_c_try_compile "$LINENO"; then :
19568 ac_cv_header_stdbool_h=yes
19569 else
19570 ac_cv_header_stdbool_h=no
19571 fi
19572 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19573 fi
19574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
19575 $as_echo "$ac_cv_header_stdbool_h" >&6; }
19576 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
19577 if test "x$ac_cv_type__Bool" = x""yes; then :
19578
19579 cat >>confdefs.h <<_ACEOF
19580 #define HAVE__BOOL 1
19581 _ACEOF
19582
19583
19584 fi
19585
19586
19587
19588 REPLACE_NULL=0;
19589 HAVE_WCHAR_T=1;
19590
19591
19592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
19593 $as_echo_n "checking for wchar_t... " >&6; }
19594 if test "${gt_cv_c_wchar_t+set}" = set; then :
19595 $as_echo_n "(cached) " >&6
19596 else
19597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19598 /* end confdefs.h. */
19599 #include <stddef.h>
19600 wchar_t foo = (wchar_t)'\0';
19601 int
19602 main ()
19603 {
19604
19605 ;
19606 return 0;
19607 }
19608 _ACEOF
19609 if ac_fn_c_try_compile "$LINENO"; then :
19610 gt_cv_c_wchar_t=yes
19611 else
19612 gt_cv_c_wchar_t=no
19613 fi
19614 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19615 fi
19616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
19617 $as_echo "$gt_cv_c_wchar_t" >&6; }
19618 if test $gt_cv_c_wchar_t = yes; then
19619
19620 $as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
19621
19622 fi
19623
19624
19625 GNULIB_DPRINTF=0;
19626 GNULIB_FCLOSE=0;
19627 GNULIB_FDOPEN=0;
19628 GNULIB_FFLUSH=0;
19629 GNULIB_FGETC=0;
19630 GNULIB_FGETS=0;
19631 GNULIB_FOPEN=0;
19632 GNULIB_FPRINTF=0;
19633 GNULIB_FPRINTF_POSIX=0;
19634 GNULIB_FPURGE=0;
19635 GNULIB_FPUTC=0;
19636 GNULIB_FPUTS=0;
19637 GNULIB_FREAD=0;
19638 GNULIB_FREOPEN=0;
19639 GNULIB_FSCANF=0;
19640 GNULIB_FSEEK=0;
19641 GNULIB_FSEEKO=0;
19642 GNULIB_FTELL=0;
19643 GNULIB_FTELLO=0;
19644 GNULIB_FWRITE=0;
19645 GNULIB_GETC=0;
19646 GNULIB_GETCHAR=0;
19647 GNULIB_GETDELIM=0;
19648 GNULIB_GETLINE=0;
19649 GNULIB_OBSTACK_PRINTF=0;
19650 GNULIB_OBSTACK_PRINTF_POSIX=0;
19651 GNULIB_PCLOSE=0;
19652 GNULIB_PERROR=0;
19653 GNULIB_POPEN=0;
19654 GNULIB_PRINTF=0;
19655 GNULIB_PRINTF_POSIX=0;
19656 GNULIB_PUTC=0;
19657 GNULIB_PUTCHAR=0;
19658 GNULIB_PUTS=0;
19659 GNULIB_REMOVE=0;
19660 GNULIB_RENAME=0;
19661 GNULIB_RENAMEAT=0;
19662 GNULIB_SCANF=0;
19663 GNULIB_SNPRINTF=0;
19664 GNULIB_SPRINTF_POSIX=0;
19665 GNULIB_STDIO_H_NONBLOCKING=0;
19666 GNULIB_STDIO_H_SIGPIPE=0;
19667 GNULIB_TMPFILE=0;
19668 GNULIB_VASPRINTF=0;
19669 GNULIB_VFSCANF=0;
19670 GNULIB_VSCANF=0;
19671 GNULIB_VDPRINTF=0;
19672 GNULIB_VFPRINTF=0;
19673 GNULIB_VFPRINTF_POSIX=0;
19674 GNULIB_VPRINTF=0;
19675 GNULIB_VPRINTF_POSIX=0;
19676 GNULIB_VSNPRINTF=0;
19677 GNULIB_VSPRINTF_POSIX=0;
19678 HAVE_DECL_FPURGE=1;
19679 HAVE_DECL_FSEEKO=1;
19680 HAVE_DECL_FTELLO=1;
19681 HAVE_DECL_GETDELIM=1;
19682 HAVE_DECL_GETLINE=1;
19683 HAVE_DECL_OBSTACK_PRINTF=1;
19684 HAVE_DECL_SNPRINTF=1;
19685 HAVE_DECL_VSNPRINTF=1;
19686 HAVE_DPRINTF=1;
19687 HAVE_FSEEKO=1;
19688 HAVE_FTELLO=1;
19689 HAVE_PCLOSE=1;
19690 HAVE_POPEN=1;
19691 HAVE_RENAMEAT=1;
19692 HAVE_VASPRINTF=1;
19693 HAVE_VDPRINTF=1;
19694 REPLACE_DPRINTF=0;
19695 REPLACE_FCLOSE=0;
19696 REPLACE_FDOPEN=0;
19697 REPLACE_FFLUSH=0;
19698 REPLACE_FOPEN=0;
19699 REPLACE_FPRINTF=0;
19700 REPLACE_FPURGE=0;
19701 REPLACE_FREOPEN=0;
19702 REPLACE_FSEEK=0;
19703 REPLACE_FSEEKO=0;
19704 REPLACE_FTELL=0;
19705 REPLACE_FTELLO=0;
19706 REPLACE_GETDELIM=0;
19707 REPLACE_GETLINE=0;
19708 REPLACE_OBSTACK_PRINTF=0;
19709 REPLACE_PERROR=0;
19710 REPLACE_POPEN=0;
19711 REPLACE_PRINTF=0;
19712 REPLACE_REMOVE=0;
19713 REPLACE_RENAME=0;
19714 REPLACE_RENAMEAT=0;
19715 REPLACE_SNPRINTF=0;
19716 REPLACE_SPRINTF=0;
19717 REPLACE_STDIO_READ_FUNCS=0;
19718 REPLACE_STDIO_WRITE_FUNCS=0;
19719 REPLACE_TMPFILE=0;
19720 REPLACE_VASPRINTF=0;
19721 REPLACE_VDPRINTF=0;
19722 REPLACE_VFPRINTF=0;
19723 REPLACE_VPRINTF=0;
19724 REPLACE_VSNPRINTF=0;
19725 REPLACE_VSPRINTF=0;
19726
19727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
19728 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
19729 if test "${ac_cv_struct_tm+set}" = set; then :
19730 $as_echo_n "(cached) " >&6
19731 else
19732 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19733 /* end confdefs.h. */
19734 #include <sys/types.h>
19735 #include <time.h>
19736
19737 int
19738 main ()
19739 {
19740 struct tm tm;
19741 int *p = &tm.tm_sec;
19742 return !p;
19743 ;
19744 return 0;
19745 }
19746 _ACEOF
19747 if ac_fn_c_try_compile "$LINENO"; then :
19748 ac_cv_struct_tm=time.h
19749 else
19750 ac_cv_struct_tm=sys/time.h
19751 fi
19752 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19753 fi
19754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
19755 $as_echo "$ac_cv_struct_tm" >&6; }
19756 if test $ac_cv_struct_tm = sys/time.h; then
19757
19758 $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
19759
19760 fi
19761
19762 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
19763 #include <$ac_cv_struct_tm>
19764
19765 "
19766 if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
19767
19768 cat >>confdefs.h <<_ACEOF
19769 #define HAVE_STRUCT_TM_TM_ZONE 1
19770 _ACEOF
19771
19772
19773 fi
19774
19775 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
19776
19777 $as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
19778
19779 else
19780 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
19781 "
19782 if test "x$ac_cv_have_decl_tzname" = x""yes; then :
19783 ac_have_decl=1
19784 else
19785 ac_have_decl=0
19786 fi
19787
19788 cat >>confdefs.h <<_ACEOF
19789 #define HAVE_DECL_TZNAME $ac_have_decl
19790 _ACEOF
19791
19792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
19793 $as_echo_n "checking for tzname... " >&6; }
19794 if test "${ac_cv_var_tzname+set}" = set; then :
19795 $as_echo_n "(cached) " >&6
19796 else
19797 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19798 /* end confdefs.h. */
19799 #include <time.h>
19800 #if !HAVE_DECL_TZNAME
19801 extern char *tzname[];
19802 #endif
19803
19804 int
19805 main ()
19806 {
19807 return tzname[0][0];
19808 ;
19809 return 0;
19810 }
19811 _ACEOF
19812 if ac_fn_c_try_link "$LINENO"; then :
19813 ac_cv_var_tzname=yes
19814 else
19815 ac_cv_var_tzname=no
19816 fi
19817 rm -f core conftest.err conftest.$ac_objext \
19818 conftest$ac_exeext conftest.$ac_ext
19819 fi
19820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
19821 $as_echo "$ac_cv_var_tzname" >&6; }
19822 if test $ac_cv_var_tzname = yes; then
19823
19824 $as_echo "#define HAVE_TZNAME 1" >>confdefs.h
19825
19826 fi
19827 fi
19828
19829
19830 ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include <time.h>
19831 "
19832 if test "x$ac_cv_member_struct_tm_tm_gmtoff" = x""yes; then :
19833
19834 $as_echo "#define HAVE_TM_GMTOFF 1" >>confdefs.h
19835
19836 fi
19837
19838
19839
19840
19841 ac_fn_c_check_decl "$LINENO" "strtoimax" "ac_cv_have_decl_strtoimax" "$ac_includes_default"
19842 if test "x$ac_cv_have_decl_strtoimax" = x""yes; then :
19843 ac_have_decl=1
19844 else
19845 ac_have_decl=0
19846 fi
19847
19848 cat >>confdefs.h <<_ACEOF
19849 #define HAVE_DECL_STRTOIMAX $ac_have_decl
19850 _ACEOF
19851
19852
19853
19854 ac_fn_c_check_decl "$LINENO" "strtoumax" "ac_cv_have_decl_strtoumax" "$ac_includes_default"
19855 if test "x$ac_cv_have_decl_strtoumax" = x""yes; then :
19856 ac_have_decl=1
19857 else
19858 ac_have_decl=0
19859 fi
19860
19861 cat >>confdefs.h <<_ACEOF
19862 #define HAVE_DECL_STRTOUMAX $ac_have_decl
19863 _ACEOF
19864
19865
19866
19867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
19868 $as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
19869 if test "${ac_cv_header_stat_broken+set}" = set; then :
19870 $as_echo_n "(cached) " >&6
19871 else
19872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19873 /* end confdefs.h. */
19874 #include <sys/types.h>
19875 #include <sys/stat.h>
19876
19877 #if defined S_ISBLK && defined S_IFDIR
19878 extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
19879 #endif
19880
19881 #if defined S_ISBLK && defined S_IFCHR
19882 extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
19883 #endif
19884
19885 #if defined S_ISLNK && defined S_IFREG
19886 extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
19887 #endif
19888
19889 #if defined S_ISSOCK && defined S_IFREG
19890 extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
19891 #endif
19892
19893 _ACEOF
19894 if ac_fn_c_try_compile "$LINENO"; then :
19895 ac_cv_header_stat_broken=no
19896 else
19897 ac_cv_header_stat_broken=yes
19898 fi
19899 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19900 fi
19901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
19902 $as_echo "$ac_cv_header_stat_broken" >&6; }
19903 if test $ac_cv_header_stat_broken = yes; then
19904
19905 $as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
19906
19907 fi
19908
19909
19910
19911 ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
19912 if test "x$ac_cv_type_mode_t" = x""yes; then :
19913
19914 else
19915
19916 cat >>confdefs.h <<_ACEOF
19917 #define mode_t int
19918 _ACEOF
19919
19920 fi
19921
19922
19923
19924 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
19925 $as_echo_n "checking for struct timespec in <time.h>... " >&6; }
19926 if test "${gl_cv_sys_struct_timespec_in_time_h+set}" = set; then :
19927 $as_echo_n "(cached) " >&6
19928 else
19929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19930 /* end confdefs.h. */
19931 #include <time.h>
19932
19933 int
19934 main ()
19935 {
19936 static struct timespec x; x.tv_sec = x.tv_nsec;
19937 ;
19938 return 0;
19939 }
19940 _ACEOF
19941 if ac_fn_c_try_compile "$LINENO"; then :
19942 gl_cv_sys_struct_timespec_in_time_h=yes
19943 else
19944 gl_cv_sys_struct_timespec_in_time_h=no
19945 fi
19946 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19947 fi
19948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
19949 $as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
19950
19951 TIME_H_DEFINES_STRUCT_TIMESPEC=0
19952 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
19953 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
19954 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
19955 TIME_H_DEFINES_STRUCT_TIMESPEC=1
19956 else
19957 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
19958 $as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
19959 if test "${gl_cv_sys_struct_timespec_in_sys_time_h+set}" = set; then :
19960 $as_echo_n "(cached) " >&6
19961 else
19962 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19963 /* end confdefs.h. */
19964 #include <sys/time.h>
19965
19966 int
19967 main ()
19968 {
19969 static struct timespec x; x.tv_sec = x.tv_nsec;
19970 ;
19971 return 0;
19972 }
19973 _ACEOF
19974 if ac_fn_c_try_compile "$LINENO"; then :
19975 gl_cv_sys_struct_timespec_in_sys_time_h=yes
19976 else
19977 gl_cv_sys_struct_timespec_in_sys_time_h=no
19978 fi
19979 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19980 fi
19981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
19982 $as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
19983 if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
19984 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
19985 else
19986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
19987 $as_echo_n "checking for struct timespec in <pthread.h>... " >&6; }
19988 if test "${gl_cv_sys_struct_timespec_in_pthread_h+set}" = set; then :
19989 $as_echo_n "(cached) " >&6
19990 else
19991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19992 /* end confdefs.h. */
19993 #include <pthread.h>
19994
19995 int
19996 main ()
19997 {
19998 static struct timespec x; x.tv_sec = x.tv_nsec;
19999 ;
20000 return 0;
20001 }
20002 _ACEOF
20003 if ac_fn_c_try_compile "$LINENO"; then :
20004 gl_cv_sys_struct_timespec_in_pthread_h=yes
20005 else
20006 gl_cv_sys_struct_timespec_in_pthread_h=no
20007 fi
20008 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20009 fi
20010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
20011 $as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
20012 if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
20013 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
20014 fi
20015 fi
20016 fi
20017
20018
20019
20020
20021
20022
20023
20024
20025
20026
20027
20028
20029
20030
20031
20032 if test $gl_cv_have_include_next = yes; then
20033 gl_cv_next_time_h='<'time.h'>'
20034 else
20035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
20036 $as_echo_n "checking absolute name of <time.h>... " >&6; }
20037 if test "${gl_cv_next_time_h+set}" = set; then :
20038 $as_echo_n "(cached) " >&6
20039 else
20040
20041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20042 /* end confdefs.h. */
20043 #include <time.h>
20044
20045 _ACEOF
20046 case "$host_os" in
20047 aix*) gl_absname_cpp="$ac_cpp -C" ;;
20048 *) gl_absname_cpp="$ac_cpp" ;;
20049 esac
20050
20051 case "$host_os" in
20052 mingw*)
20053 gl_dirsep_regex='[/\\]'
20054 ;;
20055 *)
20056 gl_dirsep_regex='\/'
20057 ;;
20058 esac
20059 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
20060
20061 gl_header_literal_regex=`echo 'time.h' \
20062 | sed -e "$gl_make_literal_regex_sed"`
20063 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20064 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20065 s|^/[^/]|//&|
20066 p
20067 q
20068 }'
20069 gl_cv_next_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20070 sed -n "$gl_absolute_header_sed"`'"'
20071
20072
20073 fi
20074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
20075 $as_echo "$gl_cv_next_time_h" >&6; }
20076 fi
20077 NEXT_TIME_H=$gl_cv_next_time_h
20078
20079 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20080 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20081 gl_next_as_first_directive='<'time.h'>'
20082 else
20083 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20084 gl_next_as_first_directive=$gl_cv_next_time_h
20085 fi
20086 NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
20087
20088
20089
20090
20091
20092
20093
20094
20095
20096
20097
20098
20099
20100
20101
20102 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the utimes function works" >&5
20103 $as_echo_n "checking whether the utimes function works... " >&6; }
20104 if test "${gl_cv_func_working_utimes+set}" = set; then :
20105 $as_echo_n "(cached) " >&6
20106 else
20107
20108 if test "$cross_compiling" = yes; then :
20109 gl_cv_func_working_utimes=no
20110 else
20111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20112 /* end confdefs.h. */
20113
20114 #include <sys/types.h>
20115 #include <sys/stat.h>
20116 #include <fcntl.h>
20117 #include <sys/time.h>
20118 #include <time.h>
20119 #include <unistd.h>
20120 #include <stdlib.h>
20121 #include <stdio.h>
20122 #include <utime.h>
20123
20124 static int
20125 inorder (time_t a, time_t b, time_t c)
20126 {
20127 return a <= b && b <= c;
20128 }
20129
20130 int
20131 main ()
20132 {
20133 int result = 0;
20134 char const *file = "conftest.utimes";
20135 static struct timeval timeval[2] = {{9, 10}, {999999, 999999}};
20136
20137 /* Test whether utimes() essentially works. */
20138 {
20139 struct stat sbuf;
20140 FILE *f = fopen (file, "w");
20141 if (f == NULL)
20142 result |= 1;
20143 else if (fclose (f) != 0)
20144 result |= 1;
20145 else if (utimes (file, timeval) != 0)
20146 result |= 2;
20147 else if (lstat (file, &sbuf) != 0)
20148 result |= 1;
20149 else if (!(sbuf.st_atime == timeval[0].tv_sec
20150 && sbuf.st_mtime == timeval[1].tv_sec))
20151 result |= 4;
20152 if (unlink (file) != 0)
20153 result |= 1;
20154 }
20155
20156 /* Test whether utimes() with a NULL argument sets the file's timestamp
20157 to the current time. Use 'fstat' as well as 'time' to
20158 determine the "current" time, to accommodate NFS file systems
20159 if there is a time skew between the host and the NFS server. */
20160 {
20161 int fd = open (file, O_WRONLY|O_CREAT, 0644);
20162 if (fd < 0)
20163 result |= 1;
20164 else
20165 {
20166 time_t t0, t2;
20167 struct stat st0, st1, st2;
20168 if (time (&t0) == (time_t) -1)
20169 result |= 1;
20170 else if (fstat (fd, &st0) != 0)
20171 result |= 1;
20172 else if (utimes (file, timeval) != 0)
20173 result |= 2;
20174 else if (utimes (file, NULL) != 0)
20175 result |= 8;
20176 else if (fstat (fd, &st1) != 0)
20177 result |= 1;
20178 else if (write (fd, "\n", 1) != 1)
20179 result |= 1;
20180 else if (fstat (fd, &st2) != 0)
20181 result |= 1;
20182 else if (time (&t2) == (time_t) -1)
20183 result |= 1;
20184 else
20185 {
20186 int m_ok_POSIX = inorder (t0, st1.st_mtime, t2);
20187 int m_ok_NFS = inorder (st0.st_mtime, st1.st_mtime, st2.st_mtime);
20188 if (! (st1.st_atime == st1.st_mtime))
20189 result |= 16;
20190 if (! (m_ok_POSIX || m_ok_NFS))
20191 result |= 32;
20192 }
20193 if (close (fd) != 0)
20194 result |= 1;
20195 }
20196 if (unlink (file) != 0)
20197 result |= 1;
20198 }
20199
20200 /* Test whether utimes() with a NULL argument works on read-only files. */
20201 {
20202 int fd = open (file, O_WRONLY|O_CREAT, 0444);
20203 if (fd < 0)
20204 result |= 1;
20205 else if (close (fd) != 0)
20206 result |= 1;
20207 else if (utimes (file, NULL) != 0)
20208 result |= 64;
20209 if (unlink (file) != 0)
20210 result |= 1;
20211 }
20212
20213 return result;
20214 }
20215
20216 _ACEOF
20217 if ac_fn_c_try_run "$LINENO"; then :
20218 gl_cv_func_working_utimes=yes
20219 else
20220 gl_cv_func_working_utimes=no
20221 fi
20222 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20223 conftest.$ac_objext conftest.beam conftest.$ac_ext
20224 fi
20225
20226 fi
20227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_utimes" >&5
20228 $as_echo "$gl_cv_func_working_utimes" >&6; }
20229
20230 if test $gl_cv_func_working_utimes = yes; then
20231
20232 $as_echo "#define HAVE_WORKING_UTIMES 1" >>confdefs.h
20233
20234 fi
20235
20236
20237
20238
20239
20240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct utimbuf" >&5
20241 $as_echo_n "checking for struct utimbuf... " >&6; }
20242 if test "${gl_cv_sys_struct_utimbuf+set}" = set; then :
20243 $as_echo_n "(cached) " >&6
20244 else
20245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20246 /* end confdefs.h. */
20247 #if HAVE_SYS_TIME_H
20248 #include <sys/time.h>
20249 #endif
20250 #include <time.h>
20251 #ifdef HAVE_UTIME_H
20252 #include <utime.h>
20253 #endif
20254
20255 int
20256 main ()
20257 {
20258 static struct utimbuf x; x.actime = x.modtime;
20259 ;
20260 return 0;
20261 }
20262 _ACEOF
20263 if ac_fn_c_try_compile "$LINENO"; then :
20264 gl_cv_sys_struct_utimbuf=yes
20265 else
20266 gl_cv_sys_struct_utimbuf=no
20267 fi
20268 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20269 fi
20270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_utimbuf" >&5
20271 $as_echo "$gl_cv_sys_struct_utimbuf" >&6; }
20272
20273 if test $gl_cv_sys_struct_utimbuf = yes; then
20274
20275 $as_echo "#define HAVE_STRUCT_UTIMBUF 1" >>confdefs.h
20276
20277 fi
20278
20279
20280
20281
20282
20283
20284
20285
20286
20287
20288
20289
20290 if false; then
20291 GL_COND_LIBTOOL_TRUE=
20292 GL_COND_LIBTOOL_FALSE='#'
20293 else
20294 GL_COND_LIBTOOL_TRUE='#'
20295 GL_COND_LIBTOOL_FALSE=
20296 fi
20297
20298 gl_cond_libtool=false
20299 gl_libdeps=
20300 gl_ltlibdeps=
20301 gl_m4_base='m4'
20302
20303
20304
20305
20306
20307
20308
20309
20310
20311 gl_source_base='lib'
20312
20313
20314 if test $ac_cv_func_alloca_works = no; then
20315 :
20316 fi
20317
20318 # Define an additional variable used in the Makefile substitution.
20319 if test $ac_cv_working_alloca_h = yes; then
20320 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
20321 $as_echo_n "checking for alloca as a compiler built-in... " >&6; }
20322 if test "${gl_cv_rpl_alloca+set}" = set; then :
20323 $as_echo_n "(cached) " >&6
20324 else
20325
20326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20327 /* end confdefs.h. */
20328
20329 #if defined __GNUC__ || defined _AIX || defined _MSC_VER
20330 Need own alloca
20331 #endif
20332
20333 _ACEOF
20334 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20335 $EGREP "Need own alloca" >/dev/null 2>&1; then :
20336 gl_cv_rpl_alloca=yes
20337 else
20338 gl_cv_rpl_alloca=no
20339 fi
20340 rm -f conftest*
20341
20342
20343 fi
20344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
20345 $as_echo "$gl_cv_rpl_alloca" >&6; }
20346 if test $gl_cv_rpl_alloca = yes; then
20347
20348 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
20349
20350 ALLOCA_H=alloca.h
20351 else
20352 ALLOCA_H=
20353 fi
20354 else
20355 ALLOCA_H=alloca.h
20356 fi
20357
20358 if test -n "$ALLOCA_H"; then
20359 GL_GENERATE_ALLOCA_H_TRUE=
20360 GL_GENERATE_ALLOCA_H_FALSE='#'
20361 else
20362 GL_GENERATE_ALLOCA_H_TRUE='#'
20363 GL_GENERATE_ALLOCA_H_FALSE=
20364 fi
20365
20366
20367
20368
20369
20370
20371 # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
20372 # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
20373
20374 # Save and restore LIBS so e.g., -lrt, isn't added to it. Otherwise, *all*
20375 # programs in the package would end up linked with that potentially-shared
20376 # library, inducing unnecessary run-time overhead.
20377 LIB_CLOCK_GETTIME=
20378
20379 gl_saved_libs=$LIBS
20380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
20381 $as_echo_n "checking for library containing clock_gettime... " >&6; }
20382 if test "${ac_cv_search_clock_gettime+set}" = set; then :
20383 $as_echo_n "(cached) " >&6
20384 else
20385 ac_func_search_save_LIBS=$LIBS
20386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20387 /* end confdefs.h. */
20388
20389 /* Override any GCC internal prototype to avoid an error.
20390 Use char because int might match the return type of a GCC
20391 builtin and then its argument prototype would still apply. */
20392 #ifdef __cplusplus
20393 extern "C"
20394 #endif
20395 char clock_gettime ();
20396 int
20397 main ()
20398 {
20399 return clock_gettime ();
20400 ;
20401 return 0;
20402 }
20403 _ACEOF
20404 for ac_lib in '' rt posix4; do
20405 if test -z "$ac_lib"; then
20406 ac_res="none required"
20407 else
20408 ac_res=-l$ac_lib
20409 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
20410 fi
20411 if ac_fn_c_try_link "$LINENO"; then :
20412 ac_cv_search_clock_gettime=$ac_res
20413 fi
20414 rm -f core conftest.err conftest.$ac_objext \
20415 conftest$ac_exeext
20416 if test "${ac_cv_search_clock_gettime+set}" = set; then :
20417 break
20418 fi
20419 done
20420 if test "${ac_cv_search_clock_gettime+set}" = set; then :
20421
20422 else
20423 ac_cv_search_clock_gettime=no
20424 fi
20425 rm conftest.$ac_ext
20426 LIBS=$ac_func_search_save_LIBS
20427 fi
20428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
20429 $as_echo "$ac_cv_search_clock_gettime" >&6; }
20430 ac_res=$ac_cv_search_clock_gettime
20431 if test "$ac_res" != no; then :
20432 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20433 test "$ac_cv_search_clock_gettime" = "none required" ||
20434 LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime
20435 fi
20436
20437 for ac_func in clock_gettime clock_settime
20438 do :
20439 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
20440 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
20441 eval as_val=\$$as_ac_var
20442 if test "x$as_val" = x""yes; then :
20443 cat >>confdefs.h <<_ACEOF
20444 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
20445 _ACEOF
20446
20447 fi
20448 done
20449
20450 LIBS=$gl_saved_libs
20451
20452
20453
20454
20455 :
20456
20457
20458
20459
20460 :
20461
20462
20463
20464
20465
20466
20467
20468
20469
20470
20471
20472
20473
20474
20475
20476 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
20477
20478
20479 if test $HAVE_DUP2 = 1; then
20480 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
20481 $as_echo_n "checking whether dup2 works... " >&6; }
20482 if test "${gl_cv_func_dup2_works+set}" = set; then :
20483 $as_echo_n "(cached) " >&6
20484 else
20485 if test "$cross_compiling" = yes; then :
20486 case "$host_os" in
20487 mingw*) # on this platform, dup2 always returns 0 for success
20488 gl_cv_func_dup2_works="guessing no" ;;
20489 cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
20490 gl_cv_func_dup2_works="guessing no" ;;
20491 linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a
20492 # closed fd may yield -EBADF instead of -1 / errno=EBADF.
20493 gl_cv_func_dup2_works="guessing no" ;;
20494 freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF.
20495 gl_cv_func_dup2_works="guessing no" ;;
20496 haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
20497 gl_cv_func_dup2_works="guessing no" ;;
20498 *) gl_cv_func_dup2_works="guessing yes" ;;
20499 esac
20500 else
20501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20502 /* end confdefs.h. */
20503
20504 #include <unistd.h>
20505 #include <fcntl.h>
20506 #include <errno.h>
20507 int
20508 main ()
20509 {
20510 int result = 0;
20511 #ifdef FD_CLOEXEC
20512 if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
20513 result |= 1;
20514 #endif
20515 if (dup2 (1, 1) == 0)
20516 result |= 2;
20517 #ifdef FD_CLOEXEC
20518 if (fcntl (1, F_GETFD) != FD_CLOEXEC)
20519 result |= 4;
20520 #endif
20521 close (0);
20522 if (dup2 (0, 0) != -1)
20523 result |= 8;
20524 /* Many gnulib modules require POSIX conformance of EBADF. */
20525 if (dup2 (2, 1000000) == -1 && errno != EBADF)
20526 result |= 16;
20527 return result;
20528
20529 ;
20530 return 0;
20531 }
20532
20533 _ACEOF
20534 if ac_fn_c_try_run "$LINENO"; then :
20535 gl_cv_func_dup2_works=yes
20536 else
20537 gl_cv_func_dup2_works=no
20538 fi
20539 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20540 conftest.$ac_objext conftest.beam conftest.$ac_ext
20541 fi
20542
20543
20544 fi
20545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
20546 $as_echo "$gl_cv_func_dup2_works" >&6; }
20547 case "$gl_cv_func_dup2_works" in
20548 *yes) ;;
20549 *)
20550 REPLACE_DUP2=1
20551 ;;
20552 esac
20553 fi
20554
20555
20556 if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
20557
20558
20559
20560
20561
20562
20563
20564
20565 gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
20566
20567
20568 fi
20569
20570
20571
20572
20573
20574 GNULIB_DUP2=1
20575
20576
20577
20578
20579
20580
20581
20582
20583
20584
20585
20586 GNULIB_ENVIRON=1
20587
20588
20589
20590
20591
20592
20593
20594
20595 LIB_EXECINFO=''
20596 EXECINFO_H='execinfo.h'
20597
20598 if test $ac_cv_header_execinfo_h = yes; then
20599 gl_saved_libs=$LIBS
20600 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing backtrace_symbols_fd" >&5
20601 $as_echo_n "checking for library containing backtrace_symbols_fd... " >&6; }
20602 if test "${ac_cv_search_backtrace_symbols_fd+set}" = set; then :
20603 $as_echo_n "(cached) " >&6
20604 else
20605 ac_func_search_save_LIBS=$LIBS
20606 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20607 /* end confdefs.h. */
20608
20609 /* Override any GCC internal prototype to avoid an error.
20610 Use char because int might match the return type of a GCC
20611 builtin and then its argument prototype would still apply. */
20612 #ifdef __cplusplus
20613 extern "C"
20614 #endif
20615 char backtrace_symbols_fd ();
20616 int
20617 main ()
20618 {
20619 return backtrace_symbols_fd ();
20620 ;
20621 return 0;
20622 }
20623 _ACEOF
20624 for ac_lib in '' execinfo; do
20625 if test -z "$ac_lib"; then
20626 ac_res="none required"
20627 else
20628 ac_res=-l$ac_lib
20629 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
20630 fi
20631 if ac_fn_c_try_link "$LINENO"; then :
20632 ac_cv_search_backtrace_symbols_fd=$ac_res
20633 fi
20634 rm -f core conftest.err conftest.$ac_objext \
20635 conftest$ac_exeext
20636 if test "${ac_cv_search_backtrace_symbols_fd+set}" = set; then :
20637 break
20638 fi
20639 done
20640 if test "${ac_cv_search_backtrace_symbols_fd+set}" = set; then :
20641
20642 else
20643 ac_cv_search_backtrace_symbols_fd=no
20644 fi
20645 rm conftest.$ac_ext
20646 LIBS=$ac_func_search_save_LIBS
20647 fi
20648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_backtrace_symbols_fd" >&5
20649 $as_echo "$ac_cv_search_backtrace_symbols_fd" >&6; }
20650 ac_res=$ac_cv_search_backtrace_symbols_fd
20651 if test "$ac_res" != no; then :
20652 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20653 test "$ac_cv_search_backtrace_symbols_fd" = "none required" ||
20654 LIB_EXECINFO=$ac_cv_search_backtrace_symbols_fd
20655 fi
20656
20657 LIBS=$gl_saved_libs
20658 test "$ac_cv_search_backtrace_symbols_fd" = no || EXECINFO_H=''
20659 fi
20660
20661 if test -n "$EXECINFO_H"; then
20662
20663
20664
20665
20666
20667
20668
20669
20670 gl_LIBOBJS="$gl_LIBOBJS execinfo.$ac_objext"
20671
20672 fi
20673
20674
20675
20676 if test -n "$EXECINFO_H"; then
20677 GL_GENERATE_EXECINFO_H_TRUE=
20678 GL_GENERATE_EXECINFO_H_FALSE='#'
20679 else
20680 GL_GENERATE_EXECINFO_H_TRUE='#'
20681 GL_GENERATE_EXECINFO_H_FALSE=
20682 fi
20683
20684
20685
20686
20687
20688
20689
20690
20691
20692 # Persuade glibc <stdlib.h> to declare getloadavg().
20693
20694
20695 gl_save_LIBS=$LIBS
20696
20697 # getloadvg is present in libc on glibc >= 2.2, Mac OS X, FreeBSD >= 2.0,
20698 # NetBSD >= 0.9, OpenBSD >= 2.0, Solaris >= 7.
20699 HAVE_GETLOADAVG=1
20700 ac_fn_c_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg"
20701 if test "x$ac_cv_func_getloadavg" = x""yes; then :
20702
20703 else
20704 gl_func_getloadavg_done=no
20705
20706 # Some systems with -lutil have (and need) -lkvm as well, some do not.
20707 # On Solaris, -lkvm requires nlist from -lelf, so check that first
20708 # to get the right answer into the cache.
20709 # For kstat on solaris, we need to test for libelf and libkvm to force the
20710 # definition of SVR4 below.
20711 if test $gl_func_getloadavg_done = no; then
20712 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_begin in -lelf" >&5
20713 $as_echo_n "checking for elf_begin in -lelf... " >&6; }
20714 if test "${ac_cv_lib_elf_elf_begin+set}" = set; then :
20715 $as_echo_n "(cached) " >&6
20716 else
20717 ac_check_lib_save_LIBS=$LIBS
20718 LIBS="-lelf $LIBS"
20719 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20720 /* end confdefs.h. */
20721
20722 /* Override any GCC internal prototype to avoid an error.
20723 Use char because int might match the return type of a GCC
20724 builtin and then its argument prototype would still apply. */
20725 #ifdef __cplusplus
20726 extern "C"
20727 #endif
20728 char elf_begin ();
20729 int
20730 main ()
20731 {
20732 return elf_begin ();
20733 ;
20734 return 0;
20735 }
20736 _ACEOF
20737 if ac_fn_c_try_link "$LINENO"; then :
20738 ac_cv_lib_elf_elf_begin=yes
20739 else
20740 ac_cv_lib_elf_elf_begin=no
20741 fi
20742 rm -f core conftest.err conftest.$ac_objext \
20743 conftest$ac_exeext conftest.$ac_ext
20744 LIBS=$ac_check_lib_save_LIBS
20745 fi
20746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_elf_elf_begin" >&5
20747 $as_echo "$ac_cv_lib_elf_elf_begin" >&6; }
20748 if test "x$ac_cv_lib_elf_elf_begin" = x""yes; then :
20749 LIBS="-lelf $LIBS"
20750 fi
20751
20752 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kvm_open in -lkvm" >&5
20753 $as_echo_n "checking for kvm_open in -lkvm... " >&6; }
20754 if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then :
20755 $as_echo_n "(cached) " >&6
20756 else
20757 ac_check_lib_save_LIBS=$LIBS
20758 LIBS="-lkvm $LIBS"
20759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20760 /* end confdefs.h. */
20761
20762 /* Override any GCC internal prototype to avoid an error.
20763 Use char because int might match the return type of a GCC
20764 builtin and then its argument prototype would still apply. */
20765 #ifdef __cplusplus
20766 extern "C"
20767 #endif
20768 char kvm_open ();
20769 int
20770 main ()
20771 {
20772 return kvm_open ();
20773 ;
20774 return 0;
20775 }
20776 _ACEOF
20777 if ac_fn_c_try_link "$LINENO"; then :
20778 ac_cv_lib_kvm_kvm_open=yes
20779 else
20780 ac_cv_lib_kvm_kvm_open=no
20781 fi
20782 rm -f core conftest.err conftest.$ac_objext \
20783 conftest$ac_exeext conftest.$ac_ext
20784 LIBS=$ac_check_lib_save_LIBS
20785 fi
20786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kvm_kvm_open" >&5
20787 $as_echo "$ac_cv_lib_kvm_kvm_open" >&6; }
20788 if test "x$ac_cv_lib_kvm_kvm_open" = x""yes; then :
20789 LIBS="-lkvm $LIBS"
20790 fi
20791
20792 # Check for the 4.4BSD definition of getloadavg.
20793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lutil" >&5
20794 $as_echo_n "checking for getloadavg in -lutil... " >&6; }
20795 if test "${ac_cv_lib_util_getloadavg+set}" = set; then :
20796 $as_echo_n "(cached) " >&6
20797 else
20798 ac_check_lib_save_LIBS=$LIBS
20799 LIBS="-lutil $LIBS"
20800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20801 /* end confdefs.h. */
20802
20803 /* Override any GCC internal prototype to avoid an error.
20804 Use char because int might match the return type of a GCC
20805 builtin and then its argument prototype would still apply. */
20806 #ifdef __cplusplus
20807 extern "C"
20808 #endif
20809 char getloadavg ();
20810 int
20811 main ()
20812 {
20813 return getloadavg ();
20814 ;
20815 return 0;
20816 }
20817 _ACEOF
20818 if ac_fn_c_try_link "$LINENO"; then :
20819 ac_cv_lib_util_getloadavg=yes
20820 else
20821 ac_cv_lib_util_getloadavg=no
20822 fi
20823 rm -f core conftest.err conftest.$ac_objext \
20824 conftest$ac_exeext conftest.$ac_ext
20825 LIBS=$ac_check_lib_save_LIBS
20826 fi
20827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_getloadavg" >&5
20828 $as_echo "$ac_cv_lib_util_getloadavg" >&6; }
20829 if test "x$ac_cv_lib_util_getloadavg" = x""yes; then :
20830 LIBS="-lutil $LIBS" gl_func_getloadavg_done=yes
20831 fi
20832
20833 fi
20834
20835 if test $gl_func_getloadavg_done = no; then
20836 # There is a commonly available library for RS/6000 AIX.
20837 # Since it is not a standard part of AIX, it might be installed locally.
20838 gl_getloadavg_LIBS=$LIBS
20839 LIBS="-L/usr/local/lib $LIBS"
20840 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lgetloadavg" >&5
20841 $as_echo_n "checking for getloadavg in -lgetloadavg... " >&6; }
20842 if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then :
20843 $as_echo_n "(cached) " >&6
20844 else
20845 ac_check_lib_save_LIBS=$LIBS
20846 LIBS="-lgetloadavg $LIBS"
20847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20848 /* end confdefs.h. */
20849
20850 /* Override any GCC internal prototype to avoid an error.
20851 Use char because int might match the return type of a GCC
20852 builtin and then its argument prototype would still apply. */
20853 #ifdef __cplusplus
20854 extern "C"
20855 #endif
20856 char getloadavg ();
20857 int
20858 main ()
20859 {
20860 return getloadavg ();
20861 ;
20862 return 0;
20863 }
20864 _ACEOF
20865 if ac_fn_c_try_link "$LINENO"; then :
20866 ac_cv_lib_getloadavg_getloadavg=yes
20867 else
20868 ac_cv_lib_getloadavg_getloadavg=no
20869 fi
20870 rm -f core conftest.err conftest.$ac_objext \
20871 conftest$ac_exeext conftest.$ac_ext
20872 LIBS=$ac_check_lib_save_LIBS
20873 fi
20874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_getloadavg_getloadavg" >&5
20875 $as_echo "$ac_cv_lib_getloadavg_getloadavg" >&6; }
20876 if test "x$ac_cv_lib_getloadavg_getloadavg" = x""yes; then :
20877 LIBS="-lgetloadavg $LIBS" gl_func_getloadavg_done=yes
20878 else
20879 LIBS=$gl_getloadavg_LIBS
20880 fi
20881
20882 fi
20883
20884 # Set up the replacement function if necessary.
20885 if test $gl_func_getloadavg_done = no; then
20886 HAVE_GETLOADAVG=0
20887
20888 # Solaris has libkstat which does not require root.
20889 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kstat_open in -lkstat" >&5
20890 $as_echo_n "checking for kstat_open in -lkstat... " >&6; }
20891 if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then :
20892 $as_echo_n "(cached) " >&6
20893 else
20894 ac_check_lib_save_LIBS=$LIBS
20895 LIBS="-lkstat $LIBS"
20896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20897 /* end confdefs.h. */
20898
20899 /* Override any GCC internal prototype to avoid an error.
20900 Use char because int might match the return type of a GCC
20901 builtin and then its argument prototype would still apply. */
20902 #ifdef __cplusplus
20903 extern "C"
20904 #endif
20905 char kstat_open ();
20906 int
20907 main ()
20908 {
20909 return kstat_open ();
20910 ;
20911 return 0;
20912 }
20913 _ACEOF
20914 if ac_fn_c_try_link "$LINENO"; then :
20915 ac_cv_lib_kstat_kstat_open=yes
20916 else
20917 ac_cv_lib_kstat_kstat_open=no
20918 fi
20919 rm -f core conftest.err conftest.$ac_objext \
20920 conftest$ac_exeext conftest.$ac_ext
20921 LIBS=$ac_check_lib_save_LIBS
20922 fi
20923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kstat_kstat_open" >&5
20924 $as_echo "$ac_cv_lib_kstat_kstat_open" >&6; }
20925 if test "x$ac_cv_lib_kstat_kstat_open" = x""yes; then :
20926 cat >>confdefs.h <<_ACEOF
20927 #define HAVE_LIBKSTAT 1
20928 _ACEOF
20929
20930 LIBS="-lkstat $LIBS"
20931
20932 fi
20933
20934 test $ac_cv_lib_kstat_kstat_open = yes && gl_func_getloadavg_done=yes
20935
20936 # AIX has libperfstat which does not require root
20937 if test $gl_func_getloadavg_done = no; then
20938 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for perfstat_cpu_total in -lperfstat" >&5
20939 $as_echo_n "checking for perfstat_cpu_total in -lperfstat... " >&6; }
20940 if test "${ac_cv_lib_perfstat_perfstat_cpu_total+set}" = set; then :
20941 $as_echo_n "(cached) " >&6
20942 else
20943 ac_check_lib_save_LIBS=$LIBS
20944 LIBS="-lperfstat $LIBS"
20945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20946 /* end confdefs.h. */
20947
20948 /* Override any GCC internal prototype to avoid an error.
20949 Use char because int might match the return type of a GCC
20950 builtin and then its argument prototype would still apply. */
20951 #ifdef __cplusplus
20952 extern "C"
20953 #endif
20954 char perfstat_cpu_total ();
20955 int
20956 main ()
20957 {
20958 return perfstat_cpu_total ();
20959 ;
20960 return 0;
20961 }
20962 _ACEOF
20963 if ac_fn_c_try_link "$LINENO"; then :
20964 ac_cv_lib_perfstat_perfstat_cpu_total=yes
20965 else
20966 ac_cv_lib_perfstat_perfstat_cpu_total=no
20967 fi
20968 rm -f core conftest.err conftest.$ac_objext \
20969 conftest$ac_exeext conftest.$ac_ext
20970 LIBS=$ac_check_lib_save_LIBS
20971 fi
20972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_perfstat_perfstat_cpu_total" >&5
20973 $as_echo "$ac_cv_lib_perfstat_perfstat_cpu_total" >&6; }
20974 if test "x$ac_cv_lib_perfstat_perfstat_cpu_total" = x""yes; then :
20975 cat >>confdefs.h <<_ACEOF
20976 #define HAVE_LIBPERFSTAT 1
20977 _ACEOF
20978
20979 LIBS="-lperfstat $LIBS"
20980
20981 fi
20982
20983 test $ac_cv_lib_perfstat_perfstat_cpu_total = yes && gl_func_getloadavg_done=yes
20984 fi
20985
20986 if test $gl_func_getloadavg_done = no; then
20987 ac_fn_c_check_header_mongrel "$LINENO" "sys/dg_sys_info.h" "ac_cv_header_sys_dg_sys_info_h" "$ac_includes_default"
20988 if test "x$ac_cv_header_sys_dg_sys_info_h" = x""yes; then :
20989 gl_func_getloadavg_done=yes
20990
20991 $as_echo "#define DGUX 1" >>confdefs.h
20992
20993 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dg_sys_info in -ldgc" >&5
20994 $as_echo_n "checking for dg_sys_info in -ldgc... " >&6; }
20995 if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then :
20996 $as_echo_n "(cached) " >&6
20997 else
20998 ac_check_lib_save_LIBS=$LIBS
20999 LIBS="-ldgc $LIBS"
21000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21001 /* end confdefs.h. */
21002
21003 /* Override any GCC internal prototype to avoid an error.
21004 Use char because int might match the return type of a GCC
21005 builtin and then its argument prototype would still apply. */
21006 #ifdef __cplusplus
21007 extern "C"
21008 #endif
21009 char dg_sys_info ();
21010 int
21011 main ()
21012 {
21013 return dg_sys_info ();
21014 ;
21015 return 0;
21016 }
21017 _ACEOF
21018 if ac_fn_c_try_link "$LINENO"; then :
21019 ac_cv_lib_dgc_dg_sys_info=yes
21020 else
21021 ac_cv_lib_dgc_dg_sys_info=no
21022 fi
21023 rm -f core conftest.err conftest.$ac_objext \
21024 conftest$ac_exeext conftest.$ac_ext
21025 LIBS=$ac_check_lib_save_LIBS
21026 fi
21027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dgc_dg_sys_info" >&5
21028 $as_echo "$ac_cv_lib_dgc_dg_sys_info" >&6; }
21029 if test "x$ac_cv_lib_dgc_dg_sys_info" = x""yes; then :
21030 cat >>confdefs.h <<_ACEOF
21031 #define HAVE_LIBDGC 1
21032 _ACEOF
21033
21034 LIBS="-ldgc $LIBS"
21035
21036 fi
21037
21038 fi
21039
21040
21041 fi
21042 fi
21043 fi
21044
21045
21046 if test "x$gl_save_LIBS" = x; then
21047 GETLOADAVG_LIBS=$LIBS
21048 else
21049 GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$gl_save_LIBS!!"`
21050 fi
21051 LIBS=$gl_save_LIBS
21052
21053
21054 # Test whether the system declares getloadavg. Solaris has the function
21055 # but declares it in <sys/loadavg.h>, not <stdlib.h>.
21056 for ac_header in sys/loadavg.h
21057 do :
21058 ac_fn_c_check_header_mongrel "$LINENO" "sys/loadavg.h" "ac_cv_header_sys_loadavg_h" "$ac_includes_default"
21059 if test "x$ac_cv_header_sys_loadavg_h" = x""yes; then :
21060 cat >>confdefs.h <<_ACEOF
21061 #define HAVE_SYS_LOADAVG_H 1
21062 _ACEOF
21063
21064 fi
21065
21066 done
21067
21068 if test $ac_cv_header_sys_loadavg_h = yes; then
21069 HAVE_SYS_LOADAVG_H=1
21070 else
21071 HAVE_SYS_LOADAVG_H=0
21072 fi
21073 ac_fn_c_check_decl "$LINENO" "getloadavg" "ac_cv_have_decl_getloadavg" "#if HAVE_SYS_LOADAVG_H
21074 # include <sys/loadavg.h>
21075 #endif
21076 #include <stdlib.h>
21077 "
21078 if test "x$ac_cv_have_decl_getloadavg" = x""yes; then :
21079
21080 else
21081 HAVE_DECL_GETLOADAVG=0
21082 fi
21083
21084
21085 if test $HAVE_GETLOADAVG = 0; then
21086
21087
21088
21089
21090
21091
21092
21093
21094 gl_LIBOBJS="$gl_LIBOBJS getloadavg.$ac_objext"
21095
21096
21097 # Figure out what our getloadavg.c needs.
21098
21099
21100
21101 # On HPUX9, an unprivileged user can get load averages this way.
21102 if test $gl_func_getloadavg_done = no; then
21103 for ac_func in pstat_getdynamic
21104 do :
21105 ac_fn_c_check_func "$LINENO" "pstat_getdynamic" "ac_cv_func_pstat_getdynamic"
21106 if test "x$ac_cv_func_pstat_getdynamic" = x""yes; then :
21107 cat >>confdefs.h <<_ACEOF
21108 #define HAVE_PSTAT_GETDYNAMIC 1
21109 _ACEOF
21110 gl_func_getloadavg_done=yes
21111 fi
21112 done
21113
21114 fi
21115
21116 # We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
21117 # uses stabs), but it is still SVR4. We cannot check for <elf.h> because
21118 # Irix 4.0.5F has the header but not the library.
21119 if test $gl_func_getloadavg_done = no && test "$ac_cv_lib_elf_elf_begin" = yes \
21120 && test "$ac_cv_lib_kvm_kvm_open" = yes; then
21121 gl_func_getloadavg_done=yes
21122
21123 $as_echo "#define SVR4 1" >>confdefs.h
21124
21125 fi
21126
21127 if test $gl_func_getloadavg_done = no; then
21128 ac_fn_c_check_header_mongrel "$LINENO" "inq_stats/cpustats.h" "ac_cv_header_inq_stats_cpustats_h" "$ac_includes_default"
21129 if test "x$ac_cv_header_inq_stats_cpustats_h" = x""yes; then :
21130 gl_func_getloadavg_done=yes
21131
21132 $as_echo "#define UMAX 1" >>confdefs.h
21133
21134
21135 $as_echo "#define UMAX4_3 1" >>confdefs.h
21136
21137 fi
21138
21139
21140 fi
21141
21142 if test $gl_func_getloadavg_done = no; then
21143 ac_fn_c_check_header_mongrel "$LINENO" "sys/cpustats.h" "ac_cv_header_sys_cpustats_h" "$ac_includes_default"
21144 if test "x$ac_cv_header_sys_cpustats_h" = x""yes; then :
21145 gl_func_getloadavg_done=yes; $as_echo "#define UMAX 1" >>confdefs.h
21146
21147 fi
21148
21149
21150 fi
21151
21152 if test $gl_func_getloadavg_done = no; then
21153 for ac_header in mach/mach.h
21154 do :
21155 ac_fn_c_check_header_mongrel "$LINENO" "mach/mach.h" "ac_cv_header_mach_mach_h" "$ac_includes_default"
21156 if test "x$ac_cv_header_mach_mach_h" = x""yes; then :
21157 cat >>confdefs.h <<_ACEOF
21158 #define HAVE_MACH_MACH_H 1
21159 _ACEOF
21160
21161 fi
21162
21163 done
21164
21165 fi
21166
21167 for ac_header in nlist.h
21168 do :
21169 ac_fn_c_check_header_mongrel "$LINENO" "nlist.h" "ac_cv_header_nlist_h" "$ac_includes_default"
21170 if test "x$ac_cv_header_nlist_h" = x""yes; then :
21171 cat >>confdefs.h <<_ACEOF
21172 #define HAVE_NLIST_H 1
21173 _ACEOF
21174 ac_fn_c_check_member "$LINENO" "struct nlist" "n_un.n_name" "ac_cv_member_struct_nlist_n_un_n_name" "#include <nlist.h>
21175 "
21176 if test "x$ac_cv_member_struct_nlist_n_un_n_name" = x""yes; then :
21177
21178 cat >>confdefs.h <<_ACEOF
21179 #define HAVE_STRUCT_NLIST_N_UN_N_NAME 1
21180 _ACEOF
21181
21182
21183 fi
21184
21185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21186 /* end confdefs.h. */
21187 #include <nlist.h>
21188 int
21189 main ()
21190 {
21191 struct nlist x;
21192 #ifdef HAVE_STRUCT_NLIST_N_UN_N_NAME
21193 x.n_un.n_name = "";
21194 #else
21195 x.n_name = "";
21196 #endif
21197 ;
21198 return 0;
21199 }
21200 _ACEOF
21201 if ac_fn_c_try_link "$LINENO"; then :
21202
21203 $as_echo "#define N_NAME_POINTER 1" >>confdefs.h
21204
21205 fi
21206 rm -f core conftest.err conftest.$ac_objext \
21207 conftest$ac_exeext conftest.$ac_ext
21208
21209 fi
21210
21211 done
21212
21213 fi
21214
21215
21216
21217
21218
21219 GNULIB_GETLOADAVG=1
21220
21221
21222
21223
21224
21225
21226
21227
21228
21229
21230 if test $REPLACE_GETOPT = 1; then
21231
21232
21233
21234
21235
21236
21237
21238
21239 gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
21240
21241
21242
21243
21244
21245
21246
21247
21248
21249 gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
21250
21251
21252
21253
21254 GNULIB_GL_UNISTD_H_GETOPT=1
21255 fi
21256
21257
21258
21259
21260
21261
21262
21263 REPLACE_GETOPT=0
21264 if test -n "$gl_replace_getopt"; then
21265 REPLACE_GETOPT=1
21266 fi
21267
21268 if test $REPLACE_GETOPT = 1; then
21269
21270 GETOPT_H=getopt.h
21271
21272 $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
21273
21274
21275
21276 fi
21277
21278 if test $REPLACE_GETOPT = 1; then
21279
21280
21281
21282
21283
21284
21285
21286
21287 gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
21288
21289
21290
21291
21292
21293
21294
21295
21296
21297 gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
21298
21299
21300
21301
21302 GNULIB_GL_UNISTD_H_GETOPT=1
21303 fi
21304
21305
21306
21307
21308
21309
21310
21311
21312
21313
21314
21315
21316 gl_gettimeofday_timezone=void
21317 if test $ac_cv_func_gettimeofday != yes; then
21318 HAVE_GETTIMEOFDAY=0
21319 else
21320
21321
21322
21323 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5
21324 $as_echo_n "checking whether gettimeofday clobbers localtime buffer... " >&6; }
21325 if test "${gl_cv_func_gettimeofday_clobber+set}" = set; then :
21326 $as_echo_n "(cached) " >&6
21327 else
21328 if test "$cross_compiling" = yes; then :
21329 # When cross-compiling:
21330 case "$host_os" in
21331 # Guess all is fine on glibc systems.
21332 *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
21333 # If we don't know, assume the worst.
21334 *) gl_cv_func_gettimeofday_clobber="guessing yes" ;;
21335 esac
21336
21337 else
21338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21339 /* end confdefs.h. */
21340 #include <string.h>
21341 #include <sys/time.h>
21342 #include <time.h>
21343 #include <stdlib.h>
21344
21345 int
21346 main ()
21347 {
21348
21349 time_t t = 0;
21350 struct tm *lt;
21351 struct tm saved_lt;
21352 struct timeval tv;
21353 lt = localtime (&t);
21354 saved_lt = *lt;
21355 gettimeofday (&tv, NULL);
21356 return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
21357
21358 ;
21359 return 0;
21360 }
21361 _ACEOF
21362 if ac_fn_c_try_run "$LINENO"; then :
21363 gl_cv_func_gettimeofday_clobber=no
21364 else
21365 gl_cv_func_gettimeofday_clobber=yes
21366 fi
21367 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21368 conftest.$ac_objext conftest.beam conftest.$ac_ext
21369 fi
21370
21371 fi
21372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5
21373 $as_echo "$gl_cv_func_gettimeofday_clobber" >&6; }
21374
21375 case "$gl_cv_func_gettimeofday_clobber" in
21376 *yes)
21377 REPLACE_GETTIMEOFDAY=1
21378
21379
21380 $as_echo "#define gmtime rpl_gmtime" >>confdefs.h
21381
21382
21383 $as_echo "#define localtime rpl_localtime" >>confdefs.h
21384
21385
21386
21387 $as_echo "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h
21388
21389 ;;
21390 esac
21391
21392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
21393 $as_echo_n "checking for gettimeofday with POSIX signature... " >&6; }
21394 if test "${gl_cv_func_gettimeofday_posix_signature+set}" = set; then :
21395 $as_echo_n "(cached) " >&6
21396 else
21397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21398 /* end confdefs.h. */
21399 #include <sys/time.h>
21400 struct timeval c;
21401 int gettimeofday (struct timeval *restrict, void *restrict);
21402
21403 int
21404 main ()
21405 {
21406 /* glibc uses struct timezone * rather than the POSIX void *
21407 if _GNU_SOURCE is defined. However, since the only portable
21408 use of gettimeofday uses NULL as the second parameter, and
21409 since the glibc definition is actually more typesafe, it is
21410 not worth wrapping this to get a compliant signature. */
21411 int (*f) (struct timeval *restrict, void *restrict)
21412 = gettimeofday;
21413 int x = f (&c, 0);
21414 return !(x | c.tv_sec | c.tv_usec);
21415
21416 ;
21417 return 0;
21418 }
21419 _ACEOF
21420 if ac_fn_c_try_compile "$LINENO"; then :
21421 gl_cv_func_gettimeofday_posix_signature=yes
21422 else
21423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21424 /* end confdefs.h. */
21425 #include <sys/time.h>
21426 int gettimeofday (struct timeval *restrict, struct timezone *restrict);
21427
21428 int
21429 main ()
21430 {
21431
21432 ;
21433 return 0;
21434 }
21435 _ACEOF
21436 if ac_fn_c_try_compile "$LINENO"; then :
21437 gl_cv_func_gettimeofday_posix_signature=almost
21438 else
21439 gl_cv_func_gettimeofday_posix_signature=no
21440 fi
21441 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21442 fi
21443 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21444 fi
21445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
21446 $as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; }
21447 if test $gl_cv_func_gettimeofday_posix_signature = almost; then
21448 gl_gettimeofday_timezone='struct timezone'
21449 elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
21450 REPLACE_GETTIMEOFDAY=1
21451 fi
21452 if test $REPLACE_STRUCT_TIMEVAL = 1; then
21453 REPLACE_GETTIMEOFDAY=1
21454 fi
21455
21456 fi
21457
21458 cat >>confdefs.h <<_ACEOF
21459 #define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone
21460 _ACEOF
21461
21462
21463 if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
21464
21465
21466
21467
21468
21469
21470
21471
21472 gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
21473
21474
21475 for ac_header in sys/timeb.h
21476 do :
21477 ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
21478 if test "x$ac_cv_header_sys_timeb_h" = x""yes; then :
21479 cat >>confdefs.h <<_ACEOF
21480 #define HAVE_SYS_TIMEB_H 1
21481 _ACEOF
21482
21483 fi
21484
21485 done
21486
21487 for ac_func in _ftime
21488 do :
21489 ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
21490 if test "x$ac_cv_func__ftime" = x""yes; then :
21491 cat >>confdefs.h <<_ACEOF
21492 #define HAVE__FTIME 1
21493 _ACEOF
21494
21495 fi
21496 done
21497
21498
21499 fi
21500
21501
21502
21503
21504
21505 GNULIB_GETTIMEOFDAY=1
21506
21507
21508
21509
21510
21511
21512
21513
21514
21515
21516 if test $ac_cv_func_lstat = yes; then
21517
21518 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
21519 *no)
21520 REPLACE_LSTAT=1
21521 ;;
21522 esac
21523 else
21524 HAVE_LSTAT=0
21525 fi
21526
21527 if test $REPLACE_LSTAT = 1; then
21528
21529
21530
21531
21532
21533
21534
21535
21536 gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
21537
21538
21539
21540 :
21541
21542 fi
21543
21544
21545
21546
21547
21548 GNULIB_LSTAT=1
21549
21550
21551
21552
21553
21554
21555
21556
21557
21558
21559
21560 if test $APPLE_UNIVERSAL_BUILD = 1; then
21561 # A universal build on Apple Mac OS X platforms.
21562 # The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode.
21563 # But we need a configuration result that is valid in both modes.
21564 gl_cv_func_working_mktime=no
21565 fi
21566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5
21567 $as_echo_n "checking for working mktime... " >&6; }
21568 if test "${gl_cv_func_working_mktime+set}" = set; then :
21569 $as_echo_n "(cached) " >&6
21570 else
21571 if test "$cross_compiling" = yes; then :
21572 gl_cv_func_working_mktime=no
21573 else
21574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21575 /* end confdefs.h. */
21576 /* Test program from Paul Eggert and Tony Leneis. */
21577 #include <limits.h>
21578 #include <stdlib.h>
21579 #include <time.h>
21580
21581 #ifdef HAVE_UNISTD_H
21582 # include <unistd.h>
21583 #endif
21584
21585 #ifndef HAVE_ALARM
21586 # define alarm(X) /* empty */
21587 #endif
21588
21589 /* Work around redefinition to rpl_putenv by other config tests. */
21590 #undef putenv
21591
21592 static time_t time_t_max;
21593 static time_t time_t_min;
21594
21595 /* Values we'll use to set the TZ environment variable. */
21596 static char *tz_strings[] = {
21597 (char *) 0, "TZ=GMT0", "TZ=JST-9",
21598 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
21599 };
21600 #define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
21601
21602 /* Return 0 if mktime fails to convert a date in the spring-forward gap.
21603 Based on a problem report from Andreas Jaeger. */
21604 static int
21605 spring_forward_gap ()
21606 {
21607 /* glibc (up to about 1998-10-07) failed this test. */
21608 struct tm tm;
21609
21610 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
21611 instead of "TZ=America/Vancouver" in order to detect the bug even
21612 on systems that don't support the Olson extension, or don't have the
21613 full zoneinfo tables installed. */
21614 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
21615
21616 tm.tm_year = 98;
21617 tm.tm_mon = 3;
21618 tm.tm_mday = 5;
21619 tm.tm_hour = 2;
21620 tm.tm_min = 0;
21621 tm.tm_sec = 0;
21622 tm.tm_isdst = -1;
21623 return mktime (&tm) != (time_t) -1;
21624 }
21625
21626 static int
21627 mktime_test1 (time_t now)
21628 {
21629 struct tm *lt;
21630 return ! (lt = localtime (&now)) || mktime (lt) == now;
21631 }
21632
21633 static int
21634 mktime_test (time_t now)
21635 {
21636 return (mktime_test1 (now)
21637 && mktime_test1 ((time_t) (time_t_max - now))
21638 && mktime_test1 ((time_t) (time_t_min + now)));
21639 }
21640
21641 static int
21642 irix_6_4_bug ()
21643 {
21644 /* Based on code from Ariel Faigon. */
21645 struct tm tm;
21646 tm.tm_year = 96;
21647 tm.tm_mon = 3;
21648 tm.tm_mday = 0;
21649 tm.tm_hour = 0;
21650 tm.tm_min = 0;
21651 tm.tm_sec = 0;
21652 tm.tm_isdst = -1;
21653 mktime (&tm);
21654 return tm.tm_mon == 2 && tm.tm_mday == 31;
21655 }
21656
21657 static int
21658 bigtime_test (int j)
21659 {
21660 struct tm tm;
21661 time_t now;
21662 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
21663 now = mktime (&tm);
21664 if (now != (time_t) -1)
21665 {
21666 struct tm *lt = localtime (&now);
21667 if (! (lt
21668 && lt->tm_year == tm.tm_year
21669 && lt->tm_mon == tm.tm_mon
21670 && lt->tm_mday == tm.tm_mday
21671 && lt->tm_hour == tm.tm_hour
21672 && lt->tm_min == tm.tm_min
21673 && lt->tm_sec == tm.tm_sec
21674 && lt->tm_yday == tm.tm_yday
21675 && lt->tm_wday == tm.tm_wday
21676 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
21677 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
21678 return 0;
21679 }
21680 return 1;
21681 }
21682
21683 static int
21684 year_2050_test ()
21685 {
21686 /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
21687 ignoring leap seconds. */
21688 unsigned long int answer = 2527315200UL;
21689
21690 struct tm tm;
21691 time_t t;
21692 tm.tm_year = 2050 - 1900;
21693 tm.tm_mon = 2 - 1;
21694 tm.tm_mday = 1;
21695 tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
21696 tm.tm_isdst = -1;
21697
21698 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
21699 instead of "TZ=America/Vancouver" in order to detect the bug even
21700 on systems that don't support the Olson extension, or don't have the
21701 full zoneinfo tables installed. */
21702 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
21703
21704 t = mktime (&tm);
21705
21706 /* Check that the result is either a failure, or close enough
21707 to the correct answer that we can assume the discrepancy is
21708 due to leap seconds. */
21709 return (t == (time_t) -1
21710 || (0 < t && answer - 120 <= t && t <= answer + 120));
21711 }
21712
21713 int
21714 main ()
21715 {
21716 int result = 0;
21717 time_t t, delta;
21718 int i, j;
21719 int time_t_signed_magnitude = (time_t) ~ (time_t) 0 < (time_t) -1;
21720 int time_t_signed = ! ((time_t) 0 < (time_t) -1);
21721
21722 /* This test makes some buggy mktime implementations loop.
21723 Give up after 60 seconds; a mktime slower than that
21724 isn't worth using anyway. */
21725 alarm (60);
21726
21727 time_t_max = (! time_t_signed
21728 ? (time_t) -1
21729 : ((((time_t) 1 << (sizeof (time_t) * CHAR_BIT - 2)) - 1)
21730 * 2 + 1));
21731 time_t_min = (! time_t_signed
21732 ? (time_t) 0
21733 : time_t_signed_magnitude
21734 ? ~ (time_t) 0
21735 : ~ time_t_max);
21736
21737 delta = time_t_max / 997; /* a suitable prime number */
21738 for (i = 0; i < N_STRINGS; i++)
21739 {
21740 if (tz_strings[i])
21741 putenv (tz_strings[i]);
21742
21743 for (t = 0; t <= time_t_max - delta && (result & 1) == 0; t += delta)
21744 if (! mktime_test (t))
21745 result |= 1;
21746 if ((result & 2) == 0
21747 && ! (mktime_test ((time_t) 1)
21748 && mktime_test ((time_t) (60 * 60))
21749 && mktime_test ((time_t) (60 * 60 * 24))))
21750 result |= 2;
21751
21752 for (j = 1; (result & 4) == 0; j <<= 1)
21753 {
21754 if (! bigtime_test (j))
21755 result |= 4;
21756 if (INT_MAX / 2 < j)
21757 break;
21758 }
21759 if ((result & 8) == 0 && ! bigtime_test (INT_MAX))
21760 result |= 8;
21761 }
21762 if (! irix_6_4_bug ())
21763 result |= 16;
21764 if (! spring_forward_gap ())
21765 result |= 32;
21766 if (! year_2050_test ())
21767 result |= 64;
21768 return result;
21769 }
21770 _ACEOF
21771 if ac_fn_c_try_run "$LINENO"; then :
21772 gl_cv_func_working_mktime=yes
21773 else
21774 gl_cv_func_working_mktime=no
21775 fi
21776 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21777 conftest.$ac_objext conftest.beam conftest.$ac_ext
21778 fi
21779
21780
21781 fi
21782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_mktime" >&5
21783 $as_echo "$gl_cv_func_working_mktime" >&6; }
21784
21785 if test $gl_cv_func_working_mktime = no; then
21786 REPLACE_MKTIME=1
21787 else
21788 REPLACE_MKTIME=0
21789 fi
21790
21791 if test $REPLACE_MKTIME = 1; then
21792
21793
21794
21795
21796
21797
21798
21799
21800 gl_LIBOBJS="$gl_LIBOBJS mktime.$ac_objext"
21801
21802 :
21803 fi
21804
21805
21806
21807
21808
21809 GNULIB_MKTIME=1
21810
21811
21812
21813
21814
21815
21816
21817
21818
21819
21820
21821 if test $ac_cv_func_pselect = yes; then
21822 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether signature of pselect conforms to POSIX" >&5
21823 $as_echo_n "checking whether signature of pselect conforms to POSIX... " >&6; }
21824 if test "${gl_cv_sig_pselect+set}" = set; then :
21825 $as_echo_n "(cached) " >&6
21826 else
21827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21828 /* end confdefs.h. */
21829 #include <sys/select.h>
21830
21831 int
21832 main ()
21833 {
21834 int (*p) (int, fd_set *, fd_set *, fd_set *restrict,
21835 struct timespec const *restrict,
21836 sigset_t const *restrict) = pselect;
21837 return !p;
21838 ;
21839 return 0;
21840 }
21841 _ACEOF
21842 if ac_fn_c_try_link "$LINENO"; then :
21843 gl_cv_sig_pselect=yes
21844 else
21845 gl_cv_sig_pselect=no
21846 fi
21847 rm -f core conftest.err conftest.$ac_objext \
21848 conftest$ac_exeext conftest.$ac_ext
21849 fi
21850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sig_pselect" >&5
21851 $as_echo "$gl_cv_sig_pselect" >&6; }
21852
21853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pselect detects invalid fds" >&5
21854 $as_echo_n "checking whether pselect detects invalid fds... " >&6; }
21855 if test "${gl_cv_func_pselect_detects_ebadf+set}" = set; then :
21856 $as_echo_n "(cached) " >&6
21857 else
21858
21859 if test "$cross_compiling" = yes; then :
21860
21861 case "$host_os" in
21862 # Guess yes on glibc systems.
21863 *-gnu*) gl_cv_func_pselect_detects_ebadf="guessing yes" ;;
21864 # If we don't know, assume the worst.
21865 *) gl_cv_func_pselect_detects_ebadf="guessing no" ;;
21866 esac
21867
21868 else
21869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21870 /* end confdefs.h. */
21871
21872 #include <sys/types.h>
21873 #include <sys/time.h>
21874 #if HAVE_SYS_SELECT_H
21875 # include <sys/select.h>
21876 #endif
21877 #include <unistd.h>
21878 #include <errno.h>
21879
21880 int
21881 main ()
21882 {
21883
21884 fd_set set;
21885 dup2(0, 16);
21886 FD_ZERO(&set);
21887 FD_SET(16, &set);
21888 close(16);
21889 struct timespec timeout;
21890 timeout.tv_sec = 0;
21891 timeout.tv_nsec = 5000;
21892 return pselect (17, &set, NULL, NULL, &timeout, NULL) != -1 || errno != EBADF;
21893
21894 ;
21895 return 0;
21896 }
21897 _ACEOF
21898 if ac_fn_c_try_run "$LINENO"; then :
21899 gl_cv_func_pselect_detects_ebadf=yes
21900 else
21901 gl_cv_func_pselect_detects_ebadf=no
21902 fi
21903 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21904 conftest.$ac_objext conftest.beam conftest.$ac_ext
21905 fi
21906
21907
21908 fi
21909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pselect_detects_ebadf" >&5
21910 $as_echo "$gl_cv_func_pselect_detects_ebadf" >&6; }
21911 case $gl_cv_func_pselect_detects_ebadf in
21912 *yes) ;;
21913 *) REPLACE_PSELECT=1 ;;
21914 esac
21915 fi
21916
21917 if test $ac_cv_func_pselect = no || test $gl_cv_sig_pselect = no; then
21918 REPLACE_PSELECT=1
21919 fi
21920
21921 if test $HAVE_PSELECT = 0 || test $REPLACE_PSELECT = 1; then
21922
21923
21924
21925
21926
21927
21928
21929
21930 gl_LIBOBJS="$gl_LIBOBJS pselect.$ac_objext"
21931
21932 fi
21933
21934
21935
21936
21937
21938 GNULIB_PSELECT=1
21939
21940
21941
21942
21943
21944
21945
21946
21947
21948 LIB_PTHREAD_SIGMASK=
21949
21950
21951
21952
21953 if test "$gl_threads_api" = posix; then
21954 if test $ac_cv_func_pthread_sigmask = yes; then
21955 :
21956 else
21957 if test -n "$LIBMULTITHREAD"; then
21958 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_sigmask in $LIBMULTITHREAD" >&5
21959 $as_echo_n "checking for pthread_sigmask in $LIBMULTITHREAD... " >&6; }
21960 if test "${gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD+set}" = set; then :
21961 $as_echo_n "(cached) " >&6
21962 else
21963 gl_save_LIBS="$LIBS"
21964 LIBS="$LIBS $LIBMULTITHREAD"
21965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21966 /* end confdefs.h. */
21967 #include <pthread.h>
21968 #include <signal.h>
21969
21970 int
21971 main ()
21972 {
21973 return pthread_sigmask (0, (sigset_t *) 0, (sigset_t *) 0);
21974 ;
21975 return 0;
21976 }
21977
21978 _ACEOF
21979 if ac_fn_c_try_link "$LINENO"; then :
21980 gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD=yes
21981 else
21982 gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD=no
21983 fi
21984 rm -f core conftest.err conftest.$ac_objext \
21985 conftest$ac_exeext conftest.$ac_ext
21986 LIBS="$gl_save_LIBS"
21987
21988 fi
21989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD" >&5
21990 $as_echo "$gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD" >&6; }
21991 if test $gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD = yes; then
21992 LIB_PTHREAD_SIGMASK="$LIBMULTITHREAD"
21993 else
21994 HAVE_PTHREAD_SIGMASK=0
21995 fi
21996 else
21997 HAVE_PTHREAD_SIGMASK=0
21998 fi
21999 fi
22000 else
22001 if test $ac_cv_func_pthread_sigmask = yes; then
22002 REPLACE_PTHREAD_SIGMASK=1
22003 else
22004 HAVE_PTHREAD_SIGMASK=0
22005 fi
22006 fi
22007
22008
22009
22010
22011 if test $HAVE_PTHREAD_SIGMASK = 1; then
22012
22013
22014 if test -z "$LIB_PTHREAD_SIGMASK"; then
22015 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask works without -lpthread" >&5
22016 $as_echo_n "checking whether pthread_sigmask works without -lpthread... " >&6; }
22017 if test "${gl_cv_func_pthread_sigmask_in_libc_works+set}" = set; then :
22018 $as_echo_n "(cached) " >&6
22019 else
22020
22021 if test "$cross_compiling" = yes; then :
22022
22023 case "$host_os" in
22024 freebsd* | hpux* | solaris | solaris2.[2-9]*)
22025 gl_cv_func_pthread_sigmask_in_libc_works="guessing no";;
22026 *)
22027 gl_cv_func_pthread_sigmask_in_libc_works="guessing yes";;
22028 esac
22029
22030 else
22031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22032 /* end confdefs.h. */
22033
22034 #include <pthread.h>
22035 #include <signal.h>
22036 #include <stddef.h>
22037 int main ()
22038 {
22039 sigset_t set;
22040 sigemptyset (&set);
22041 return pthread_sigmask (1729, &set, NULL) != 0;
22042 }
22043 _ACEOF
22044 if ac_fn_c_try_run "$LINENO"; then :
22045 gl_cv_func_pthread_sigmask_in_libc_works=no
22046 else
22047 gl_cv_func_pthread_sigmask_in_libc_works=yes
22048 fi
22049 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22050 conftest.$ac_objext conftest.beam conftest.$ac_ext
22051 fi
22052
22053
22054 fi
22055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_in_libc_works" >&5
22056 $as_echo "$gl_cv_func_pthread_sigmask_in_libc_works" >&6; }
22057 case "$gl_cv_func_pthread_sigmask_in_libc_works" in
22058 *no)
22059 REPLACE_PTHREAD_SIGMASK=1
22060
22061 $as_echo "#define PTHREAD_SIGMASK_INEFFECTIVE 1" >>confdefs.h
22062
22063 ;;
22064 esac
22065 fi
22066
22067 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask returns error numbers" >&5
22068 $as_echo_n "checking whether pthread_sigmask returns error numbers... " >&6; }
22069 if test "${gl_cv_func_pthread_sigmask_return_works+set}" = set; then :
22070 $as_echo_n "(cached) " >&6
22071 else
22072
22073 gl_save_LIBS="$LIBS"
22074 LIBS="$LIBS $LIB_PTHREAD_SIGMASK"
22075 if test "$cross_compiling" = yes; then :
22076 case "$host_os" in
22077 cygwin*)
22078 gl_cv_func_pthread_sigmask_return_works="guessing no";;
22079 *)
22080 gl_cv_func_pthread_sigmask_return_works="guessing yes";;
22081 esac
22082
22083 else
22084 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22085 /* end confdefs.h. */
22086
22087 #include <pthread.h>
22088 #include <signal.h>
22089 #include <stddef.h>
22090 int main ()
22091 {
22092 sigset_t set;
22093 sigemptyset (&set);
22094 if (pthread_sigmask (1729, &set, NULL) == -1)
22095 return 1;
22096 return 0;
22097 }
22098 _ACEOF
22099 if ac_fn_c_try_run "$LINENO"; then :
22100 gl_cv_func_pthread_sigmask_return_works=yes
22101 else
22102 gl_cv_func_pthread_sigmask_return_works=no
22103 fi
22104 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22105 conftest.$ac_objext conftest.beam conftest.$ac_ext
22106 fi
22107
22108 LIBS="$gl_save_LIBS"
22109
22110 fi
22111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_return_works" >&5
22112 $as_echo "$gl_cv_func_pthread_sigmask_return_works" >&6; }
22113 case "$gl_cv_func_pthread_sigmask_return_works" in
22114 *no)
22115 REPLACE_PTHREAD_SIGMASK=1
22116
22117 $as_echo "#define PTHREAD_SIGMASK_FAILS_WITH_ERRNO 1" >>confdefs.h
22118
22119 ;;
22120 esac
22121
22122 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask unblocks signals correctly" >&5
22123 $as_echo_n "checking whether pthread_sigmask unblocks signals correctly... " >&6; }
22124 if test "${gl_cv_func_pthread_sigmask_unblock_works+set}" = set; then :
22125 $as_echo_n "(cached) " >&6
22126 else
22127
22128 case "$host_os" in
22129 irix*)
22130 gl_cv_func_pthread_sigmask_unblock_works="guessing no";;
22131 *)
22132 gl_cv_func_pthread_sigmask_unblock_works="guessing yes";;
22133 esac
22134 gl_save_LIBS="$LIBS"
22135 LIBS="$LIBS $LIBMULTITHREAD"
22136 if test "$cross_compiling" = yes; then :
22137 :
22138 else
22139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22140 /* end confdefs.h. */
22141
22142 #include <pthread.h>
22143 #include <signal.h>
22144 #include <stdio.h>
22145 #include <stdlib.h>
22146 #include <unistd.h>
22147 static volatile int sigint_occurred;
22148 static void
22149 sigint_handler (int sig)
22150 {
22151 sigint_occurred++;
22152 }
22153 int main ()
22154 {
22155 sigset_t set;
22156 int pid = getpid ();
22157 char command[80];
22158 signal (SIGINT, sigint_handler);
22159 sigemptyset (&set);
22160 sigaddset (&set, SIGINT);
22161 if (!(pthread_sigmask (SIG_BLOCK, &set, NULL) == 0))
22162 return 1;
22163 sprintf (command, "sh -c 'sleep 1; kill -%d %d' &", SIGINT, pid);
22164 if (!(system (command) == 0))
22165 return 2;
22166 sleep (2);
22167 if (!(sigint_occurred == 0))
22168 return 3;
22169 if (!(pthread_sigmask (SIG_UNBLOCK, &set, NULL) == 0))
22170 return 4;
22171 if (!(sigint_occurred == 1)) /* This fails on IRIX. */
22172 return 5;
22173 return 0;
22174 }
22175 _ACEOF
22176 if ac_fn_c_try_run "$LINENO"; then :
22177 :
22178 else
22179 gl_cv_func_pthread_sigmask_unblock_works=no
22180 fi
22181 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22182 conftest.$ac_objext conftest.beam conftest.$ac_ext
22183 fi
22184
22185 LIBS="$gl_save_LIBS"
22186
22187 fi
22188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_unblock_works" >&5
22189 $as_echo "$gl_cv_func_pthread_sigmask_unblock_works" >&6; }
22190 case "$gl_cv_func_pthread_sigmask_unblock_works" in
22191 *no)
22192 REPLACE_PTHREAD_SIGMASK=1
22193
22194 $as_echo "#define PTHREAD_SIGMASK_UNBLOCK_BUG 1" >>confdefs.h
22195
22196 ;;
22197 esac
22198 fi
22199
22200 if test $HAVE_PTHREAD_SIGMASK = 0 || test $REPLACE_PTHREAD_SIGMASK = 1; then
22201
22202
22203
22204
22205
22206
22207
22208
22209 gl_LIBOBJS="$gl_LIBOBJS pthread_sigmask.$ac_objext"
22210
22211
22212 if test $HAVE_PTHREAD_SIGMASK = 1; then
22213
22214 $as_echo "#define HAVE_PTHREAD_SIGMASK 1" >>confdefs.h
22215
22216 fi
22217
22218 fi
22219
22220
22221
22222
22223
22224 GNULIB_PTHREAD_SIGMASK=1
22225
22226
22227
22228
22229
22230
22231
22232
22233 if test $ac_cv_func_readlink = no; then
22234 HAVE_READLINK=0
22235 else
22236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
22237 $as_echo_n "checking whether readlink signature is correct... " >&6; }
22238 if test "${gl_cv_decl_readlink_works+set}" = set; then :
22239 $as_echo_n "(cached) " >&6
22240 else
22241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22242 /* end confdefs.h. */
22243 #include <unistd.h>
22244 /* Cause compilation failure if original declaration has wrong type. */
22245 ssize_t readlink (const char *, char *, size_t);
22246 int
22247 main ()
22248 {
22249
22250 ;
22251 return 0;
22252 }
22253 _ACEOF
22254 if ac_fn_c_try_compile "$LINENO"; then :
22255 gl_cv_decl_readlink_works=yes
22256 else
22257 gl_cv_decl_readlink_works=no
22258 fi
22259 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22260 fi
22261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5
22262 $as_echo "$gl_cv_decl_readlink_works" >&6; }
22263 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
22264 $as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; }
22265 if test "${gl_cv_func_readlink_works+set}" = set; then :
22266 $as_echo_n "(cached) " >&6
22267 else
22268 # We have readlink, so assume ln -s works.
22269 ln -s conftest.no-such conftest.link
22270 ln -s conftest.link conftest.lnk2
22271 if test "$cross_compiling" = yes; then :
22272 case "$host_os" in
22273 # Guess yes on glibc systems.
22274 *-gnu*) gl_cv_func_readlink_works="guessing yes" ;;
22275 # If we don't know, assume the worst.
22276 *) gl_cv_func_readlink_works="guessing no" ;;
22277 esac
22278
22279 else
22280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22281 /* end confdefs.h. */
22282 #include <unistd.h>
22283
22284 int
22285 main ()
22286 {
22287 char buf[20];
22288 return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;
22289 ;
22290 return 0;
22291 }
22292 _ACEOF
22293 if ac_fn_c_try_run "$LINENO"; then :
22294 gl_cv_func_readlink_works=yes
22295 else
22296 gl_cv_func_readlink_works=no
22297 fi
22298 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22299 conftest.$ac_objext conftest.beam conftest.$ac_ext
22300 fi
22301
22302 rm -f conftest.link conftest.lnk2
22303 fi
22304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_works" >&5
22305 $as_echo "$gl_cv_func_readlink_works" >&6; }
22306 case "$gl_cv_func_readlink_works" in
22307 *yes)
22308 if test "$gl_cv_decl_readlink_works" != yes; then
22309 REPLACE_READLINK=1
22310 fi
22311 ;;
22312 *)
22313
22314 $as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
22315
22316 REPLACE_READLINK=1
22317 ;;
22318 esac
22319 fi
22320
22321 if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
22322
22323
22324
22325
22326
22327
22328
22329
22330 gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext"
22331
22332
22333 :
22334
22335 fi
22336
22337
22338
22339
22340
22341 GNULIB_READLINK=1
22342
22343
22344
22345
22346
22347
22348
22349
22350
22351
22352
22353
22354
22355
22356
22357
22358 if test $gl_cv_have_include_next = yes; then
22359 gl_cv_next_signal_h='<'signal.h'>'
22360 else
22361 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
22362 $as_echo_n "checking absolute name of <signal.h>... " >&6; }
22363 if test "${gl_cv_next_signal_h+set}" = set; then :
22364 $as_echo_n "(cached) " >&6
22365 else
22366
22367 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22368 /* end confdefs.h. */
22369 #include <signal.h>
22370
22371 _ACEOF
22372 case "$host_os" in
22373 aix*) gl_absname_cpp="$ac_cpp -C" ;;
22374 *) gl_absname_cpp="$ac_cpp" ;;
22375 esac
22376
22377 case "$host_os" in
22378 mingw*)
22379 gl_dirsep_regex='[/\\]'
22380 ;;
22381 *)
22382 gl_dirsep_regex='\/'
22383 ;;
22384 esac
22385 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22386
22387 gl_header_literal_regex=`echo 'signal.h' \
22388 | sed -e "$gl_make_literal_regex_sed"`
22389 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22390 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22391 s|^/[^/]|//&|
22392 p
22393 q
22394 }'
22395 gl_cv_next_signal_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22396 sed -n "$gl_absolute_header_sed"`'"'
22397
22398
22399 fi
22400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
22401 $as_echo "$gl_cv_next_signal_h" >&6; }
22402 fi
22403 NEXT_SIGNAL_H=$gl_cv_next_signal_h
22404
22405 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22406 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22407 gl_next_as_first_directive='<'signal.h'>'
22408 else
22409 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22410 gl_next_as_first_directive=$gl_cv_next_signal_h
22411 fi
22412 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
22413
22414
22415
22416
22417
22418 # AIX declares sig_atomic_t to already include volatile, and C89 compilers
22419 # then choke on 'volatile sig_atomic_t'. C99 requires that it compile.
22420 ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
22421 #include <signal.h>
22422
22423 "
22424 if test "x$ac_cv_type_volatile_sig_atomic_t" = x""yes; then :
22425
22426 else
22427 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
22428 fi
22429
22430
22431
22432
22433
22434
22435
22436 ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
22437 #include <signal.h>
22438
22439 "
22440 if test "x$ac_cv_type_sighandler_t" = x""yes; then :
22441
22442 else
22443 HAVE_SIGHANDLER_T=0
22444 fi
22445
22446
22447
22448
22449 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
22450 /* <sys/types.h> is not needed according to POSIX, but the
22451 <sys/socket.h> in i386-unknown-freebsd4.10 and
22452 powerpc-apple-darwin5.5 required it. */
22453 #include <sys/types.h>
22454 #if HAVE_SYS_SOCKET_H
22455 # include <sys/socket.h>
22456 #elif HAVE_WS2TCPIP_H
22457 # include <ws2tcpip.h>
22458 #endif
22459
22460 "
22461 if test "x$ac_cv_type_socklen_t" = x""yes; then :
22462
22463 else
22464 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5
22465 $as_echo_n "checking for socklen_t equivalent... " >&6; }
22466 if test "${gl_cv_socklen_t_equiv+set}" = set; then :
22467 $as_echo_n "(cached) " >&6
22468 else
22469 # Systems have either "struct sockaddr *" or
22470 # "void *" as the second argument to getpeername
22471 gl_cv_socklen_t_equiv=
22472 for arg2 in "struct sockaddr" void; do
22473 for t in int size_t "unsigned int" "long int" "unsigned long int"; do
22474 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22475 /* end confdefs.h. */
22476 #include <sys/types.h>
22477 #include <sys/socket.h>
22478
22479 int getpeername (int, $arg2 *, $t *);
22480 int
22481 main ()
22482 {
22483 $t len;
22484 getpeername (0, 0, &len);
22485 ;
22486 return 0;
22487 }
22488 _ACEOF
22489 if ac_fn_c_try_compile "$LINENO"; then :
22490 gl_cv_socklen_t_equiv="$t"
22491 fi
22492 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22493 test "$gl_cv_socklen_t_equiv" != "" && break
22494 done
22495 test "$gl_cv_socklen_t_equiv" != "" && break
22496 done
22497
22498 fi
22499
22500 if test "$gl_cv_socklen_t_equiv" = ""; then
22501 as_fn_error "Cannot find a type to use in place of socklen_t" "$LINENO" 5
22502 fi
22503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socklen_t_equiv" >&5
22504 $as_echo "$gl_cv_socklen_t_equiv" >&6; }
22505
22506 cat >>confdefs.h <<_ACEOF
22507 #define socklen_t $gl_cv_socklen_t_equiv
22508 _ACEOF
22509
22510 fi
22511
22512
22513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
22514 $as_echo_n "checking for ssize_t... " >&6; }
22515 if test "${gt_cv_ssize_t+set}" = set; then :
22516 $as_echo_n "(cached) " >&6
22517 else
22518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22519 /* end confdefs.h. */
22520 #include <sys/types.h>
22521 int
22522 main ()
22523 {
22524 int x = sizeof (ssize_t *) + sizeof (ssize_t);
22525 return !x;
22526 ;
22527 return 0;
22528 }
22529 _ACEOF
22530 if ac_fn_c_try_compile "$LINENO"; then :
22531 gt_cv_ssize_t=yes
22532 else
22533 gt_cv_ssize_t=no
22534 fi
22535 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22536 fi
22537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
22538 $as_echo "$gt_cv_ssize_t" >&6; }
22539 if test $gt_cv_ssize_t = no; then
22540
22541 $as_echo "#define ssize_t int" >>confdefs.h
22542
22543 fi
22544
22545
22546
22547
22548
22549 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>
22550 #include <sys/stat.h>
22551 "
22552 if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = x""yes; then :
22553
22554 cat >>confdefs.h <<_ACEOF
22555 #define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1
22556 _ACEOF
22557
22558 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5
22559 $as_echo_n "checking whether struct stat.st_atim is of type struct timespec... " >&6; }
22560 if test "${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+set}" = set; then :
22561 $as_echo_n "(cached) " >&6
22562 else
22563 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22564 /* end confdefs.h. */
22565
22566 #include <sys/types.h>
22567 #include <sys/stat.h>
22568 #if HAVE_SYS_TIME_H
22569 # include <sys/time.h>
22570 #endif
22571 #include <time.h>
22572 struct timespec ts;
22573 struct stat st;
22574
22575 int
22576 main ()
22577 {
22578
22579 st.st_atim = ts;
22580
22581 ;
22582 return 0;
22583 }
22584 _ACEOF
22585 if ac_fn_c_try_compile "$LINENO"; then :
22586 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes
22587 else
22588 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no
22589 fi
22590 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22591 fi
22592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5
22593 $as_echo "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; }
22594 if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
22595
22596 $as_echo "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h
22597
22598 fi
22599 else
22600 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>
22601 #include <sys/stat.h>
22602 "
22603 if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = x""yes; then :
22604
22605 cat >>confdefs.h <<_ACEOF
22606 #define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1
22607 _ACEOF
22608
22609
22610 else
22611 ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h>
22612 #include <sys/stat.h>
22613 "
22614 if test "x$ac_cv_member_struct_stat_st_atimensec" = x""yes; then :
22615
22616 cat >>confdefs.h <<_ACEOF
22617 #define HAVE_STRUCT_STAT_ST_ATIMENSEC 1
22618 _ACEOF
22619
22620
22621 else
22622 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>
22623 #include <sys/stat.h>
22624 "
22625 if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = x""yes; then :
22626
22627 cat >>confdefs.h <<_ACEOF
22628 #define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1
22629 _ACEOF
22630
22631
22632 fi
22633
22634 fi
22635
22636 fi
22637
22638 fi
22639
22640
22641
22642
22643
22644 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>
22645 #include <sys/stat.h>
22646 "
22647 if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = x""yes; then :
22648
22649 cat >>confdefs.h <<_ACEOF
22650 #define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1
22651 _ACEOF
22652
22653
22654 else
22655 ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include <sys/types.h>
22656 #include <sys/stat.h>
22657 "
22658 if test "x$ac_cv_member_struct_stat_st_birthtimensec" = x""yes; then :
22659
22660 cat >>confdefs.h <<_ACEOF
22661 #define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1
22662 _ACEOF
22663
22664
22665 else
22666 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>
22667 #include <sys/stat.h>
22668 "
22669 if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = x""yes; then :
22670
22671 cat >>confdefs.h <<_ACEOF
22672 #define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1
22673 _ACEOF
22674
22675
22676 fi
22677
22678 fi
22679
22680 fi
22681
22682
22683
22684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working stdalign.h" >&5
22685 $as_echo_n "checking for working stdalign.h... " >&6; }
22686 if test "${gl_cv_header_working_stdalign_h+set}" = set; then :
22687 $as_echo_n "(cached) " >&6
22688 else
22689 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22690 /* end confdefs.h. */
22691 #include <stdalign.h>
22692 #include <stddef.h>
22693
22694 /* Test that alignof yields a result consistent with offsetof.
22695 This catches GCC bug 52023
22696 <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. */
22697 #ifdef __cplusplus
22698 template <class t> struct alignof_helper { char a; t b; };
22699 # define ao(type) offsetof (alignof_helper<type>, b)
22700 #else
22701 # define ao(type) offsetof (struct { char a; type b; }, b)
22702 #endif
22703 char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1];
22704 char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1];
22705 char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1];
22706
22707 /* Test _Alignas only on platforms where gnulib can help. */
22708 #if \
22709 (__GNUC__ || __IBMC__ || __IBMCPP__ \
22710 || 0x5110 <= __SUNPRO_C || 1300 <= _MSC_VER)
22711 int alignas (8) alignas_int = 1;
22712 char test_alignas[_Alignof (alignas_int) == 8 ? 1 : -1];
22713 #endif
22714
22715 int
22716 main ()
22717 {
22718
22719 ;
22720 return 0;
22721 }
22722 _ACEOF
22723 if ac_fn_c_try_compile "$LINENO"; then :
22724 gl_cv_header_working_stdalign_h=yes
22725 else
22726 gl_cv_header_working_stdalign_h=no
22727 fi
22728 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22729 fi
22730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdalign_h" >&5
22731 $as_echo "$gl_cv_header_working_stdalign_h" >&6; }
22732
22733 if test $gl_cv_header_working_stdalign_h = yes; then
22734 STDALIGN_H=''
22735 else
22736 STDALIGN_H='stdalign.h'
22737 fi
22738
22739
22740 if test -n "$STDALIGN_H"; then
22741 GL_GENERATE_STDALIGN_H_TRUE=
22742 GL_GENERATE_STDALIGN_H_FALSE='#'
22743 else
22744 GL_GENERATE_STDALIGN_H_TRUE='#'
22745 GL_GENERATE_STDALIGN_H_FALSE=
22746 fi
22747
22748
22749
22750 STDARG_H=''
22751 NEXT_STDARG_H='<stdarg.h>'
22752 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5
22753 $as_echo_n "checking for va_copy... " >&6; }
22754 if test "${gl_cv_func_va_copy+set}" = set; then :
22755 $as_echo_n "(cached) " >&6
22756 else
22757
22758 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22759 /* end confdefs.h. */
22760 #include <stdarg.h>
22761 int
22762 main ()
22763 {
22764
22765 #ifndef va_copy
22766 void (*func) (va_list, va_list) = va_copy;
22767 #endif
22768
22769 ;
22770 return 0;
22771 }
22772 _ACEOF
22773 if ac_fn_c_try_compile "$LINENO"; then :
22774 gl_cv_func_va_copy=yes
22775 else
22776 gl_cv_func_va_copy=no
22777 fi
22778 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22779 fi
22780
22781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_va_copy" >&5
22782 $as_echo "$gl_cv_func_va_copy" >&6; }
22783 if test $gl_cv_func_va_copy = no; then
22784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22785 /* end confdefs.h. */
22786 #if defined _AIX && !defined __GNUC__
22787 AIX vaccine
22788 #endif
22789
22790 _ACEOF
22791 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22792 $EGREP "vaccine" >/dev/null 2>&1; then :
22793 gl_aixcc=yes
22794 else
22795 gl_aixcc=no
22796 fi
22797 rm -f conftest*
22798
22799 if test $gl_aixcc = yes; then
22800 STDARG_H=stdarg.h
22801
22802
22803
22804
22805
22806
22807
22808
22809 if test $gl_cv_have_include_next = yes; then
22810 gl_cv_next_stdarg_h='<'stdarg.h'>'
22811 else
22812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdarg.h>" >&5
22813 $as_echo_n "checking absolute name of <stdarg.h>... " >&6; }
22814 if test "${gl_cv_next_stdarg_h+set}" = set; then :
22815 $as_echo_n "(cached) " >&6
22816 else
22817
22818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22819 /* end confdefs.h. */
22820 #include <stdarg.h>
22821
22822 _ACEOF
22823 case "$host_os" in
22824 aix*) gl_absname_cpp="$ac_cpp -C" ;;
22825 *) gl_absname_cpp="$ac_cpp" ;;
22826 esac
22827
22828 case "$host_os" in
22829 mingw*)
22830 gl_dirsep_regex='[/\\]'
22831 ;;
22832 *)
22833 gl_dirsep_regex='\/'
22834 ;;
22835 esac
22836 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22837
22838 gl_header_literal_regex=`echo 'stdarg.h' \
22839 | sed -e "$gl_make_literal_regex_sed"`
22840 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22841 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22842 s|^/[^/]|//&|
22843 p
22844 q
22845 }'
22846 gl_cv_next_stdarg_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22847 sed -n "$gl_absolute_header_sed"`'"'
22848
22849
22850 fi
22851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdarg_h" >&5
22852 $as_echo "$gl_cv_next_stdarg_h" >&6; }
22853 fi
22854 NEXT_STDARG_H=$gl_cv_next_stdarg_h
22855
22856 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22857 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22858 gl_next_as_first_directive='<'stdarg.h'>'
22859 else
22860 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22861 gl_next_as_first_directive=$gl_cv_next_stdarg_h
22862 fi
22863 NEXT_AS_FIRST_DIRECTIVE_STDARG_H=$gl_next_as_first_directive
22864
22865
22866
22867
22868 if test "$gl_cv_next_stdarg_h" = '""'; then
22869 gl_cv_next_stdarg_h='"///usr/include/stdarg.h"'
22870 NEXT_STDARG_H="$gl_cv_next_stdarg_h"
22871 fi
22872 else
22873
22874 saved_as_echo_n="$as_echo_n"
22875 as_echo_n=':'
22876 if test "${gl_cv_func___va_copy+set}" = set; then :
22877 $as_echo_n "(cached) " >&6
22878 else
22879
22880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22881 /* end confdefs.h. */
22882 #include <stdarg.h>
22883 int
22884 main ()
22885 {
22886
22887 #ifndef __va_copy
22888 error, bail out
22889 #endif
22890
22891 ;
22892 return 0;
22893 }
22894 _ACEOF
22895 if ac_fn_c_try_compile "$LINENO"; then :
22896 gl_cv_func___va_copy=yes
22897 else
22898 gl_cv_func___va_copy=no
22899 fi
22900 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22901 fi
22902
22903 as_echo_n="$saved_as_echo_n"
22904
22905 if test $gl_cv_func___va_copy = yes; then
22906
22907 $as_echo "#define va_copy __va_copy" >>confdefs.h
22908
22909 else
22910
22911
22912 $as_echo "#define va_copy gl_va_copy" >>confdefs.h
22913
22914 fi
22915 fi
22916 fi
22917
22918 if test -n "$STDARG_H"; then
22919 GL_GENERATE_STDARG_H_TRUE=
22920 GL_GENERATE_STDARG_H_FALSE='#'
22921 else
22922 GL_GENERATE_STDARG_H_TRUE='#'
22923 GL_GENERATE_STDARG_H_FALSE=
22924 fi
22925
22926
22927
22928
22929
22930
22931 # Define two additional variables used in the Makefile substitution.
22932
22933 if test "$ac_cv_header_stdbool_h" = yes; then
22934 STDBOOL_H=''
22935 else
22936 STDBOOL_H='stdbool.h'
22937 fi
22938
22939 if test -n "$STDBOOL_H"; then
22940 GL_GENERATE_STDBOOL_H_TRUE=
22941 GL_GENERATE_STDBOOL_H_FALSE='#'
22942 else
22943 GL_GENERATE_STDBOOL_H_TRUE='#'
22944 GL_GENERATE_STDBOOL_H_FALSE=
22945 fi
22946
22947
22948 if test "$ac_cv_type__Bool" = yes; then
22949 HAVE__BOOL=1
22950 else
22951 HAVE__BOOL=0
22952 fi
22953
22954
22955
22956
22957
22958 STDDEF_H=
22959 if test $gt_cv_c_wchar_t = no; then
22960 HAVE_WCHAR_T=0
22961 STDDEF_H=stddef.h
22962 fi
22963 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
22964 $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
22965 if test "${gl_cv_decl_null_works+set}" = set; then :
22966 $as_echo_n "(cached) " >&6
22967 else
22968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22969 /* end confdefs.h. */
22970 #include <stddef.h>
22971 int test[2 * (sizeof NULL == sizeof (void *)) -1];
22972
22973 int
22974 main ()
22975 {
22976
22977 ;
22978 return 0;
22979 }
22980 _ACEOF
22981 if ac_fn_c_try_compile "$LINENO"; then :
22982 gl_cv_decl_null_works=yes
22983 else
22984 gl_cv_decl_null_works=no
22985 fi
22986 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22987 fi
22988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
22989 $as_echo "$gl_cv_decl_null_works" >&6; }
22990 if test $gl_cv_decl_null_works = no; then
22991 REPLACE_NULL=1
22992 STDDEF_H=stddef.h
22993 fi
22994
22995 if test -n "$STDDEF_H"; then
22996 GL_GENERATE_STDDEF_H_TRUE=
22997 GL_GENERATE_STDDEF_H_FALSE='#'
22998 else
22999 GL_GENERATE_STDDEF_H_TRUE='#'
23000 GL_GENERATE_STDDEF_H_FALSE=
23001 fi
23002
23003 if test -n "$STDDEF_H"; then
23004
23005
23006
23007
23008
23009
23010
23011
23012 if test $gl_cv_have_include_next = yes; then
23013 gl_cv_next_stddef_h='<'stddef.h'>'
23014 else
23015 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
23016 $as_echo_n "checking absolute name of <stddef.h>... " >&6; }
23017 if test "${gl_cv_next_stddef_h+set}" = set; then :
23018 $as_echo_n "(cached) " >&6
23019 else
23020
23021 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23022 /* end confdefs.h. */
23023 #include <stddef.h>
23024
23025 _ACEOF
23026 case "$host_os" in
23027 aix*) gl_absname_cpp="$ac_cpp -C" ;;
23028 *) gl_absname_cpp="$ac_cpp" ;;
23029 esac
23030
23031 case "$host_os" in
23032 mingw*)
23033 gl_dirsep_regex='[/\\]'
23034 ;;
23035 *)
23036 gl_dirsep_regex='\/'
23037 ;;
23038 esac
23039 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23040
23041 gl_header_literal_regex=`echo 'stddef.h' \
23042 | sed -e "$gl_make_literal_regex_sed"`
23043 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23044 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23045 s|^/[^/]|//&|
23046 p
23047 q
23048 }'
23049 gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23050 sed -n "$gl_absolute_header_sed"`'"'
23051
23052
23053 fi
23054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
23055 $as_echo "$gl_cv_next_stddef_h" >&6; }
23056 fi
23057 NEXT_STDDEF_H=$gl_cv_next_stddef_h
23058
23059 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23060 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23061 gl_next_as_first_directive='<'stddef.h'>'
23062 else
23063 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23064 gl_next_as_first_directive=$gl_cv_next_stddef_h
23065 fi
23066 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
23067
23068
23069
23070
23071 fi
23072
23073
23074
23075
23076
23077
23078
23079
23080
23081
23082
23083
23084
23085 if test $gl_cv_have_include_next = yes; then
23086 gl_cv_next_stdio_h='<'stdio.h'>'
23087 else
23088 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
23089 $as_echo_n "checking absolute name of <stdio.h>... " >&6; }
23090 if test "${gl_cv_next_stdio_h+set}" = set; then :
23091 $as_echo_n "(cached) " >&6
23092 else
23093
23094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23095 /* end confdefs.h. */
23096 #include <stdio.h>
23097
23098 _ACEOF
23099 case "$host_os" in
23100 aix*) gl_absname_cpp="$ac_cpp -C" ;;
23101 *) gl_absname_cpp="$ac_cpp" ;;
23102 esac
23103
23104 case "$host_os" in
23105 mingw*)
23106 gl_dirsep_regex='[/\\]'
23107 ;;
23108 *)
23109 gl_dirsep_regex='\/'
23110 ;;
23111 esac
23112 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23113
23114 gl_header_literal_regex=`echo 'stdio.h' \
23115 | sed -e "$gl_make_literal_regex_sed"`
23116 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23117 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23118 s|^/[^/]|//&|
23119 p
23120 q
23121 }'
23122 gl_cv_next_stdio_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23123 sed -n "$gl_absolute_header_sed"`'"'
23124
23125
23126 fi
23127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
23128 $as_echo "$gl_cv_next_stdio_h" >&6; }
23129 fi
23130 NEXT_STDIO_H=$gl_cv_next_stdio_h
23131
23132 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23133 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23134 gl_next_as_first_directive='<'stdio.h'>'
23135 else
23136 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23137 gl_next_as_first_directive=$gl_cv_next_stdio_h
23138 fi
23139 NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
23140
23141
23142
23143
23144
23145 GNULIB_FSCANF=1
23146
23147
23148 cat >>confdefs.h <<_ACEOF
23149 #define GNULIB_FSCANF 1
23150 _ACEOF
23151
23152
23153 GNULIB_SCANF=1
23154
23155
23156 cat >>confdefs.h <<_ACEOF
23157 #define GNULIB_SCANF 1
23158 _ACEOF
23159
23160
23161 GNULIB_FGETC=1
23162 GNULIB_GETC=1
23163 GNULIB_GETCHAR=1
23164 GNULIB_FGETS=1
23165 GNULIB_FREAD=1
23166
23167
23168 GNULIB_FPRINTF=1
23169 GNULIB_PRINTF=1
23170 GNULIB_VFPRINTF=1
23171 GNULIB_VPRINTF=1
23172 GNULIB_FPUTC=1
23173 GNULIB_PUTC=1
23174 GNULIB_PUTCHAR=1
23175 GNULIB_FPUTS=1
23176 GNULIB_PUTS=1
23177 GNULIB_FWRITE=1
23178
23179
23180
23181
23182
23183
23184
23185
23186
23187
23188
23189
23190
23191
23192
23193 if test $gl_cv_have_include_next = yes; then
23194 gl_cv_next_stdlib_h='<'stdlib.h'>'
23195 else
23196 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
23197 $as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
23198 if test "${gl_cv_next_stdlib_h+set}" = set; then :
23199 $as_echo_n "(cached) " >&6
23200 else
23201
23202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23203 /* end confdefs.h. */
23204 #include <stdlib.h>
23205
23206 _ACEOF
23207 case "$host_os" in
23208 aix*) gl_absname_cpp="$ac_cpp -C" ;;
23209 *) gl_absname_cpp="$ac_cpp" ;;
23210 esac
23211
23212 case "$host_os" in
23213 mingw*)
23214 gl_dirsep_regex='[/\\]'
23215 ;;
23216 *)
23217 gl_dirsep_regex='\/'
23218 ;;
23219 esac
23220 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23221
23222 gl_header_literal_regex=`echo 'stdlib.h' \
23223 | sed -e "$gl_make_literal_regex_sed"`
23224 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23225 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23226 s|^/[^/]|//&|
23227 p
23228 q
23229 }'
23230 gl_cv_next_stdlib_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23231 sed -n "$gl_absolute_header_sed"`'"'
23232
23233
23234 fi
23235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
23236 $as_echo "$gl_cv_next_stdlib_h" >&6; }
23237 fi
23238 NEXT_STDLIB_H=$gl_cv_next_stdlib_h
23239
23240 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23241 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23242 gl_next_as_first_directive='<'stdlib.h'>'
23243 else
23244 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23245 gl_next_as_first_directive=$gl_cv_next_stdlib_h
23246 fi
23247 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
23248
23249
23250
23251
23252
23253
23254
23255
23256
23257 # This defines (or not) HAVE_TZNAME and HAVE_TM_ZONE.
23258
23259
23260
23261
23262
23263
23264
23265 $as_echo "#define my_strftime nstrftime" >>confdefs.h
23266
23267
23268
23269
23270
23271
23272
23273
23274 if test "$ac_cv_have_decl_strtoimax" != yes; then
23275 HAVE_DECL_STRTOIMAX=0
23276 fi
23277
23278 if test $ac_cv_func_strtoimax = yes; then
23279 HAVE_STRTOIMAX=1
23280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtoimax works" >&5
23281 $as_echo_n "checking whether strtoimax works... " >&6; }
23282 if test "${gl_cv_func_strtoimax+set}" = set; then :
23283 $as_echo_n "(cached) " >&6
23284 else
23285 if test "$cross_compiling" = yes; then :
23286 case "$host_os" in
23287 # Guess no on AIX 5.
23288 aix5*) gl_cv_func_strtoimax="guessing no" ;;
23289 # Guess yes otherwise.
23290 *) gl_cv_func_strtoimax="guessing yes" ;;
23291 esac
23292
23293 else
23294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23295 /* end confdefs.h. */
23296
23297 #include <errno.h>
23298 #include <string.h>
23299 #include <inttypes.h>
23300 int main ()
23301 {
23302 if (sizeof (intmax_t) > sizeof (int))
23303 {
23304 const char *s = "4294967295";
23305 char *p;
23306 intmax_t res;
23307 errno = 0;
23308 res = strtoimax (s, &p, 10);
23309 if (p != s + strlen (s))
23310 return 1;
23311 if (errno != 0)
23312 return 2;
23313 if (res != (intmax_t) 65535 * (intmax_t) 65537)
23314 return 3;
23315 }
23316 else
23317 {
23318 const char *s = "2147483647";
23319 char *p;
23320 intmax_t res;
23321 errno = 0;
23322 res = strtoimax (s, &p, 10);
23323 if (p != s + strlen (s))
23324 return 1;
23325 if (errno != 0)
23326 return 2;
23327 if (res != 2147483647)
23328 return 3;
23329 }
23330 return 0;
23331 }
23332
23333 _ACEOF
23334 if ac_fn_c_try_run "$LINENO"; then :
23335 gl_cv_func_strtoimax=yes
23336 else
23337 gl_cv_func_strtoimax=no
23338 fi
23339 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23340 conftest.$ac_objext conftest.beam conftest.$ac_ext
23341 fi
23342
23343
23344 fi
23345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtoimax" >&5
23346 $as_echo "$gl_cv_func_strtoimax" >&6; }
23347 case "$gl_cv_func_strtoimax" in
23348 *no) REPLACE_STRTOIMAX=1 ;;
23349 esac
23350 else
23351 HAVE_STRTOIMAX=0
23352 fi
23353
23354 if test $HAVE_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; then
23355
23356
23357
23358
23359
23360
23361
23362
23363 gl_LIBOBJS="$gl_LIBOBJS strtoimax.$ac_objext"
23364
23365
23366 ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
23367 if test "x$ac_cv_have_decl_strtoll" = x""yes; then :
23368 ac_have_decl=1
23369 else
23370 ac_have_decl=0
23371 fi
23372
23373 cat >>confdefs.h <<_ACEOF
23374 #define HAVE_DECL_STRTOLL $ac_have_decl
23375 _ACEOF
23376
23377
23378
23379 fi
23380
23381
23382
23383
23384
23385 GNULIB_STRTOIMAX=1
23386
23387
23388
23389
23390
23391
23392
23393
23394
23395 if test "$ac_cv_have_decl_strtoumax" != yes; then
23396 HAVE_DECL_STRTOUMAX=0
23397 fi
23398
23399 if test $ac_cv_func_strtoumax = no; then
23400
23401
23402
23403
23404
23405
23406
23407
23408 gl_LIBOBJS="$gl_LIBOBJS strtoumax.$ac_objext"
23409
23410
23411 ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
23412 if test "x$ac_cv_have_decl_strtoull" = x""yes; then :
23413 ac_have_decl=1
23414 else
23415 ac_have_decl=0
23416 fi
23417
23418 cat >>confdefs.h <<_ACEOF
23419 #define HAVE_DECL_STRTOULL $ac_have_decl
23420 _ACEOF
23421
23422
23423
23424 fi
23425
23426
23427
23428
23429
23430 GNULIB_STRTOUMAX=1
23431
23432
23433
23434
23435
23436
23437
23438 if test $ac_cv_func_symlink = no; then
23439 HAVE_SYMLINK=0
23440 else
23441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether symlink handles trailing slash correctly" >&5
23442 $as_echo_n "checking whether symlink handles trailing slash correctly... " >&6; }
23443 if test "${gl_cv_func_symlink_works+set}" = set; then :
23444 $as_echo_n "(cached) " >&6
23445 else
23446 if test "$cross_compiling" = yes; then :
23447 case "$host_os" in
23448 # Guess yes on glibc systems.
23449 *-gnu*) gl_cv_func_symlink_works="guessing yes" ;;
23450 # If we don't know, assume the worst.
23451 *) gl_cv_func_symlink_works="guessing no" ;;
23452 esac
23453
23454 else
23455 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23456 /* end confdefs.h. */
23457 #include <unistd.h>
23458
23459 int
23460 main ()
23461 {
23462 int result = 0;
23463 if (!symlink ("a", "conftest.link/"))
23464 result |= 1;
23465 if (symlink ("conftest.f", "conftest.lnk2"))
23466 result |= 2;
23467 else if (!symlink ("a", "conftest.lnk2/"))
23468 result |= 4;
23469 return result;
23470
23471 ;
23472 return 0;
23473 }
23474 _ACEOF
23475 if ac_fn_c_try_run "$LINENO"; then :
23476 gl_cv_func_symlink_works=yes
23477 else
23478 gl_cv_func_symlink_works=no
23479 fi
23480 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23481 conftest.$ac_objext conftest.beam conftest.$ac_ext
23482 fi
23483
23484 rm -f conftest.f conftest.link conftest.lnk2
23485 fi
23486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_symlink_works" >&5
23487 $as_echo "$gl_cv_func_symlink_works" >&6; }
23488 case "$gl_cv_func_symlink_works" in
23489 *yes) ;;
23490 *)
23491 REPLACE_SYMLINK=1
23492 ;;
23493 esac
23494 fi
23495
23496 if test $HAVE_SYMLINK = 0 || test $REPLACE_SYMLINK = 1; then
23497
23498
23499
23500
23501
23502
23503
23504
23505 gl_LIBOBJS="$gl_LIBOBJS symlink.$ac_objext"
23506
23507 fi
23508
23509
23510
23511
23512
23513 GNULIB_SYMLINK=1
23514
23515
23516
23517
23518
23519
23520
23521
23522 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/select.h> is self-contained" >&5
23523 $as_echo_n "checking whether <sys/select.h> is self-contained... " >&6; }
23524 if test "${gl_cv_header_sys_select_h_selfcontained+set}" = set; then :
23525 $as_echo_n "(cached) " >&6
23526 else
23527
23528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23529 /* end confdefs.h. */
23530 #include <sys/select.h>
23531 int
23532 main ()
23533 {
23534 struct timeval b;
23535 ;
23536 return 0;
23537 }
23538 _ACEOF
23539 if ac_fn_c_try_compile "$LINENO"; then :
23540 gl_cv_header_sys_select_h_selfcontained=yes
23541 else
23542 gl_cv_header_sys_select_h_selfcontained=no
23543 fi
23544 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23545 if test $gl_cv_header_sys_select_h_selfcontained = yes; then
23546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23547 /* end confdefs.h. */
23548 #include <sys/select.h>
23549 int
23550 main ()
23551 {
23552 int memset; int bzero;
23553 ;
23554 return 0;
23555 }
23556
23557 _ACEOF
23558 if ac_fn_c_try_compile "$LINENO"; then :
23559 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23560 /* end confdefs.h. */
23561 #include <sys/select.h>
23562 int
23563 main ()
23564 {
23565
23566 #undef memset
23567 #define memset nonexistent_memset
23568 extern
23569 #ifdef __cplusplus
23570 "C"
23571 #endif
23572 void *memset (void *, int, unsigned long);
23573 #undef bzero
23574 #define bzero nonexistent_bzero
23575 extern
23576 #ifdef __cplusplus
23577 "C"
23578 #endif
23579 void bzero (void *, unsigned long);
23580 fd_set fds;
23581 FD_ZERO (&fds);
23582
23583 ;
23584 return 0;
23585 }
23586
23587 _ACEOF
23588 if ac_fn_c_try_link "$LINENO"; then :
23589
23590 else
23591 gl_cv_header_sys_select_h_selfcontained=no
23592 fi
23593 rm -f core conftest.err conftest.$ac_objext \
23594 conftest$ac_exeext conftest.$ac_ext
23595
23596 fi
23597 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23598 fi
23599
23600 fi
23601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_select_h_selfcontained" >&5
23602 $as_echo "$gl_cv_header_sys_select_h_selfcontained" >&6; }
23603
23604
23605
23606
23607
23608
23609
23610
23611
23612 if test $gl_cv_have_include_next = yes; then
23613 gl_cv_next_sys_select_h='<'sys/select.h'>'
23614 else
23615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/select.h>" >&5
23616 $as_echo_n "checking absolute name of <sys/select.h>... " >&6; }
23617 if test "${gl_cv_next_sys_select_h+set}" = set; then :
23618 $as_echo_n "(cached) " >&6
23619 else
23620
23621 if test $ac_cv_header_sys_select_h = yes; then
23622
23623
23624 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23625 /* end confdefs.h. */
23626 #include <sys/select.h>
23627
23628 _ACEOF
23629 case "$host_os" in
23630 aix*) gl_absname_cpp="$ac_cpp -C" ;;
23631 *) gl_absname_cpp="$ac_cpp" ;;
23632 esac
23633
23634 case "$host_os" in
23635 mingw*)
23636 gl_dirsep_regex='[/\\]'
23637 ;;
23638 *)
23639 gl_dirsep_regex='\/'
23640 ;;
23641 esac
23642 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23643
23644 gl_header_literal_regex=`echo 'sys/select.h' \
23645 | sed -e "$gl_make_literal_regex_sed"`
23646 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23647 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23648 s|^/[^/]|//&|
23649 p
23650 q
23651 }'
23652 gl_cv_next_sys_select_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23653 sed -n "$gl_absolute_header_sed"`'"'
23654 else
23655 gl_cv_next_sys_select_h='<'sys/select.h'>'
23656 fi
23657
23658
23659 fi
23660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_select_h" >&5
23661 $as_echo "$gl_cv_next_sys_select_h" >&6; }
23662 fi
23663 NEXT_SYS_SELECT_H=$gl_cv_next_sys_select_h
23664
23665 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23666 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23667 gl_next_as_first_directive='<'sys/select.h'>'
23668 else
23669 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23670 gl_next_as_first_directive=$gl_cv_next_sys_select_h
23671 fi
23672 NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H=$gl_next_as_first_directive
23673
23674
23675
23676
23677 if test $ac_cv_header_sys_select_h = yes; then
23678 HAVE_SYS_SELECT_H=1
23679 else
23680 HAVE_SYS_SELECT_H=0
23681 fi
23682
23683
23684
23685
23686
23687 if test $ac_cv_header_sys_socket_h != yes; then
23688 for ac_header in winsock2.h
23689 do :
23690 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
23691 if test "x$ac_cv_header_winsock2_h" = x""yes; then :
23692 cat >>confdefs.h <<_ACEOF
23693 #define HAVE_WINSOCK2_H 1
23694 _ACEOF
23695
23696 fi
23697
23698 done
23699
23700 fi
23701 if test "$ac_cv_header_winsock2_h" = yes; then
23702 HAVE_WINSOCK2_H=1
23703 UNISTD_H_HAVE_WINSOCK2_H=1
23704 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
23705 else
23706 HAVE_WINSOCK2_H=0
23707 fi
23708
23709
23710
23711
23712
23713
23714
23715
23716
23717
23718
23719
23720
23721
23722
23723
23724
23725
23726
23727
23728
23729
23730 if test $gl_cv_have_include_next = yes; then
23731 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
23732 else
23733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
23734 $as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
23735 if test "${gl_cv_next_sys_stat_h+set}" = set; then :
23736 $as_echo_n "(cached) " >&6
23737 else
23738
23739 if test $ac_cv_header_sys_stat_h = yes; then
23740
23741
23742 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23743 /* end confdefs.h. */
23744 #include <sys/stat.h>
23745
23746 _ACEOF
23747 case "$host_os" in
23748 aix*) gl_absname_cpp="$ac_cpp -C" ;;
23749 *) gl_absname_cpp="$ac_cpp" ;;
23750 esac
23751
23752 case "$host_os" in
23753 mingw*)
23754 gl_dirsep_regex='[/\\]'
23755 ;;
23756 *)
23757 gl_dirsep_regex='\/'
23758 ;;
23759 esac
23760 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23761
23762 gl_header_literal_regex=`echo 'sys/stat.h' \
23763 | sed -e "$gl_make_literal_regex_sed"`
23764 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23765 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23766 s|^/[^/]|//&|
23767 p
23768 q
23769 }'
23770 gl_cv_next_sys_stat_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23771 sed -n "$gl_absolute_header_sed"`'"'
23772 else
23773 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
23774 fi
23775
23776
23777 fi
23778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
23779 $as_echo "$gl_cv_next_sys_stat_h" >&6; }
23780 fi
23781 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
23782
23783 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23784 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23785 gl_next_as_first_directive='<'sys/stat.h'>'
23786 else
23787 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23788 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
23789 fi
23790 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
23791
23792
23793
23794
23795
23796
23797
23798
23799
23800
23801
23802 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
23803
23804 $as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
23805
23806 fi
23807
23808 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
23809 #include <sys/stat.h>
23810 "
23811 if test "x$ac_cv_type_nlink_t" = x""yes; then :
23812
23813 else
23814
23815 $as_echo "#define nlink_t int" >>confdefs.h
23816
23817 fi
23818
23819
23820
23821
23822
23823
23824
23825
23826
23827
23828
23829
23830
23831
23832
23833
23834
23835
23836 ac_fn_c_check_decl "$LINENO" "localtime_r" "ac_cv_have_decl_localtime_r" "#include <time.h>
23837 "
23838 if test "x$ac_cv_have_decl_localtime_r" = x""yes; then :
23839 ac_have_decl=1
23840 else
23841 ac_have_decl=0
23842 fi
23843
23844 cat >>confdefs.h <<_ACEOF
23845 #define HAVE_DECL_LOCALTIME_R $ac_have_decl
23846 _ACEOF
23847
23848 if test $ac_cv_have_decl_localtime_r = no; then
23849 HAVE_DECL_LOCALTIME_R=0
23850 fi
23851
23852
23853 if test $ac_cv_func_localtime_r = yes; then
23854 HAVE_LOCALTIME_R=1
23855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime_r is compatible with its POSIX signature" >&5
23856 $as_echo_n "checking whether localtime_r is compatible with its POSIX signature... " >&6; }
23857 if test "${gl_cv_time_r_posix+set}" = set; then :
23858 $as_echo_n "(cached) " >&6
23859 else
23860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23861 /* end confdefs.h. */
23862 #include <time.h>
23863 int
23864 main ()
23865 {
23866 /* We don't need to append 'restrict's to the argument types,
23867 even though the POSIX signature has the 'restrict's,
23868 since C99 says they can't affect type compatibility. */
23869 struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r;
23870 if (ptr) return 0;
23871 /* Check the return type is a pointer.
23872 On HP-UX 10 it is 'int'. */
23873 *localtime_r (0, 0);
23874 ;
23875 return 0;
23876 }
23877
23878 _ACEOF
23879 if ac_fn_c_try_compile "$LINENO"; then :
23880 gl_cv_time_r_posix=yes
23881 else
23882 gl_cv_time_r_posix=no
23883 fi
23884 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23885
23886 fi
23887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_r_posix" >&5
23888 $as_echo "$gl_cv_time_r_posix" >&6; }
23889 if test $gl_cv_time_r_posix = yes; then
23890 REPLACE_LOCALTIME_R=0
23891 else
23892 REPLACE_LOCALTIME_R=1
23893 fi
23894 else
23895 HAVE_LOCALTIME_R=0
23896 fi
23897
23898 if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then
23899
23900
23901
23902
23903
23904
23905
23906
23907 gl_LIBOBJS="$gl_LIBOBJS time_r.$ac_objext"
23908
23909
23910 :
23911
23912 fi
23913
23914
23915
23916
23917
23918 GNULIB_TIME_R=1
23919
23920
23921
23922
23923
23924
23925
23926
23927
23928
23929 LIB_TIMER_TIME=
23930
23931 gl_saved_libs=$LIBS
23932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing timer_settime" >&5
23933 $as_echo_n "checking for library containing timer_settime... " >&6; }
23934 if test "${ac_cv_search_timer_settime+set}" = set; then :
23935 $as_echo_n "(cached) " >&6
23936 else
23937 ac_func_search_save_LIBS=$LIBS
23938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23939 /* end confdefs.h. */
23940
23941 /* Override any GCC internal prototype to avoid an error.
23942 Use char because int might match the return type of a GCC
23943 builtin and then its argument prototype would still apply. */
23944 #ifdef __cplusplus
23945 extern "C"
23946 #endif
23947 char timer_settime ();
23948 int
23949 main ()
23950 {
23951 return timer_settime ();
23952 ;
23953 return 0;
23954 }
23955 _ACEOF
23956 for ac_lib in '' rt posix4; do
23957 if test -z "$ac_lib"; then
23958 ac_res="none required"
23959 else
23960 ac_res=-l$ac_lib
23961 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
23962 fi
23963 if ac_fn_c_try_link "$LINENO"; then :
23964 ac_cv_search_timer_settime=$ac_res
23965 fi
23966 rm -f core conftest.err conftest.$ac_objext \
23967 conftest$ac_exeext
23968 if test "${ac_cv_search_timer_settime+set}" = set; then :
23969 break
23970 fi
23971 done
23972 if test "${ac_cv_search_timer_settime+set}" = set; then :
23973
23974 else
23975 ac_cv_search_timer_settime=no
23976 fi
23977 rm conftest.$ac_ext
23978 LIBS=$ac_func_search_save_LIBS
23979 fi
23980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_timer_settime" >&5
23981 $as_echo "$ac_cv_search_timer_settime" >&6; }
23982 ac_res=$ac_cv_search_timer_settime
23983 if test "$ac_res" != no; then :
23984 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
23985 test "$ac_cv_search_timer_settime" = "none required" ||
23986 LIB_TIMER_TIME=$ac_cv_search_timer_settime
23987 fi
23988
23989 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23990 /* end confdefs.h. */
23991
23992 #include <features.h>
23993 #ifdef __GNU_LIBRARY__
23994 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || (__GLIBC__ > 2)) \
23995 && !defined __UCLIBC__
23996 Thread emulation available
23997 #endif
23998 #endif
23999
24000 _ACEOF
24001 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
24002 $EGREP "Thread" >/dev/null 2>&1; then :
24003 LIB_TIMER_TIME="$LIB_TIMER_TIME $LIBMULTITHREAD"
24004 fi
24005 rm -f conftest*
24006
24007 for ac_func in timer_settime
24008 do :
24009 ac_fn_c_check_func "$LINENO" "timer_settime" "ac_cv_func_timer_settime"
24010 if test "x$ac_cv_func_timer_settime" = x""yes; then :
24011 cat >>confdefs.h <<_ACEOF
24012 #define HAVE_TIMER_SETTIME 1
24013 _ACEOF
24014
24015 fi
24016 done
24017
24018 LIBS=$gl_saved_libs
24019
24020 :
24021
24022
24023
24024
24025
24026
24027
24028
24029
24030
24031
24032
24033
24034 if test $gl_cv_have_include_next = yes; then
24035 gl_cv_next_unistd_h='<'unistd.h'>'
24036 else
24037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
24038 $as_echo_n "checking absolute name of <unistd.h>... " >&6; }
24039 if test "${gl_cv_next_unistd_h+set}" = set; then :
24040 $as_echo_n "(cached) " >&6
24041 else
24042
24043 if test $ac_cv_header_unistd_h = yes; then
24044
24045
24046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24047 /* end confdefs.h. */
24048 #include <unistd.h>
24049
24050 _ACEOF
24051 case "$host_os" in
24052 aix*) gl_absname_cpp="$ac_cpp -C" ;;
24053 *) gl_absname_cpp="$ac_cpp" ;;
24054 esac
24055
24056 case "$host_os" in
24057 mingw*)
24058 gl_dirsep_regex='[/\\]'
24059 ;;
24060 *)
24061 gl_dirsep_regex='\/'
24062 ;;
24063 esac
24064 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
24065
24066 gl_header_literal_regex=`echo 'unistd.h' \
24067 | sed -e "$gl_make_literal_regex_sed"`
24068 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
24069 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
24070 s|^/[^/]|//&|
24071 p
24072 q
24073 }'
24074 gl_cv_next_unistd_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24075 sed -n "$gl_absolute_header_sed"`'"'
24076 else
24077 gl_cv_next_unistd_h='<'unistd.h'>'
24078 fi
24079
24080
24081 fi
24082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
24083 $as_echo "$gl_cv_next_unistd_h" >&6; }
24084 fi
24085 NEXT_UNISTD_H=$gl_cv_next_unistd_h
24086
24087 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24088 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
24089 gl_next_as_first_directive='<'unistd.h'>'
24090 else
24091 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
24092 gl_next_as_first_directive=$gl_cv_next_unistd_h
24093 fi
24094 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
24095
24096
24097
24098
24099 if test $ac_cv_header_unistd_h = yes; then
24100 HAVE_UNISTD_H=1
24101 else
24102 HAVE_UNISTD_H=0
24103 fi
24104
24105
24106
24107
24108
24109
24110
24111
24112
24113
24114
24115
24116
24117
24118 if test $ac_cv_func_futimens = no && test $ac_cv_func_futimesat = yes; then
24119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether futimesat handles NULL file" >&5
24120 $as_echo_n "checking whether futimesat handles NULL file... " >&6; }
24121 if test "${gl_cv_func_futimesat_works+set}" = set; then :
24122 $as_echo_n "(cached) " >&6
24123 else
24124 touch conftest.file
24125 if test "$cross_compiling" = yes; then :
24126 case "$host_os" in
24127 # Guess yes on glibc systems.
24128 *-gnu*) gl_cv_func_futimesat_works="guessing yes" ;;
24129 # If we don't know, assume the worst.
24130 *) gl_cv_func_futimesat_works="guessing no" ;;
24131 esac
24132
24133 else
24134 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24135 /* end confdefs.h. */
24136
24137 #include <stddef.h>
24138 #include <sys/times.h>
24139 #include <fcntl.h>
24140
24141 int
24142 main ()
24143 {
24144 int fd = open ("conftest.file", O_RDWR);
24145 if (fd < 0) return 1;
24146 if (futimesat (fd, NULL, NULL)) return 2;
24147
24148 ;
24149 return 0;
24150 }
24151 _ACEOF
24152 if ac_fn_c_try_run "$LINENO"; then :
24153 gl_cv_func_futimesat_works=yes
24154 else
24155 gl_cv_func_futimesat_works=no
24156 fi
24157 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24158 conftest.$ac_objext conftest.beam conftest.$ac_ext
24159 fi
24160
24161 rm -f conftest.file
24162 fi
24163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_futimesat_works" >&5
24164 $as_echo "$gl_cv_func_futimesat_works" >&6; }
24165 case "$gl_cv_func_futimesat_works" in
24166 *yes) ;;
24167 *)
24168
24169 $as_echo "#define FUTIMESAT_NULL_BUG 1" >>confdefs.h
24170
24171 ;;
24172 esac
24173 fi
24174
24175 gl_gnulib_enabled_dosname=false
24176 gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=false
24177 gl_gnulib_enabled_pathmax=false
24178 gl_gnulib_enabled_stat=false
24179 gl_gnulib_enabled_strtoll=false
24180 gl_gnulib_enabled_strtoull=false
24181 gl_gnulib_enabled_verify=false
24182 func_gl_gnulib_m4code_dosname ()
24183 {
24184 if ! $gl_gnulib_enabled_dosname; then
24185 gl_gnulib_enabled_dosname=true
24186 fi
24187 }
24188 func_gl_gnulib_m4code_be453cec5eecf5731a274f2de7f2db36 ()
24189 {
24190 if ! $gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36; then
24191
24192
24193 gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=true
24194 fi
24195 }
24196 func_gl_gnulib_m4code_pathmax ()
24197 {
24198 if ! $gl_gnulib_enabled_pathmax; then
24199
24200
24201
24202 gl_gnulib_enabled_pathmax=true
24203 fi
24204 }
24205 func_gl_gnulib_m4code_stat ()
24206 {
24207 if ! $gl_gnulib_enabled_stat; then
24208
24209
24210
24211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5
24212 $as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; }
24213 if test "${gl_cv_func_stat_dir_slash+set}" = set; then :
24214 $as_echo_n "(cached) " >&6
24215 else
24216 if test "$cross_compiling" = yes; then :
24217 case $host_os in
24218 mingw*) gl_cv_func_stat_dir_slash="guessing no";;
24219 *) gl_cv_func_stat_dir_slash="guessing yes";;
24220 esac
24221 else
24222 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24223 /* end confdefs.h. */
24224 #include <sys/stat.h>
24225
24226 int
24227 main ()
24228 {
24229 struct stat st; return stat (".", &st) != stat ("./", &st);
24230 ;
24231 return 0;
24232 }
24233 _ACEOF
24234 if ac_fn_c_try_run "$LINENO"; then :
24235 gl_cv_func_stat_dir_slash=yes
24236 else
24237 gl_cv_func_stat_dir_slash=no
24238 fi
24239 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24240 conftest.$ac_objext conftest.beam conftest.$ac_ext
24241 fi
24242
24243 fi
24244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5
24245 $as_echo "$gl_cv_func_stat_dir_slash" >&6; }
24246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
24247 $as_echo_n "checking whether stat handles trailing slashes on files... " >&6; }
24248 if test "${gl_cv_func_stat_file_slash+set}" = set; then :
24249 $as_echo_n "(cached) " >&6
24250 else
24251 touch conftest.tmp
24252 # Assume that if we have lstat, we can also check symlinks.
24253 if test $ac_cv_func_lstat = yes; then
24254 ln -s conftest.tmp conftest.lnk
24255 fi
24256 if test "$cross_compiling" = yes; then :
24257 case "$host_os" in
24258 # Guess yes on glibc systems.
24259 *-gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
24260 # If we don't know, assume the worst.
24261 *) gl_cv_func_stat_file_slash="guessing no" ;;
24262 esac
24263
24264 else
24265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24266 /* end confdefs.h. */
24267 #include <sys/stat.h>
24268
24269 int
24270 main ()
24271 {
24272 int result = 0;
24273 struct stat st;
24274 if (!stat ("conftest.tmp/", &st))
24275 result |= 1;
24276 #if HAVE_LSTAT
24277 if (!stat ("conftest.lnk/", &st))
24278 result |= 2;
24279 #endif
24280 return result;
24281
24282 ;
24283 return 0;
24284 }
24285 _ACEOF
24286 if ac_fn_c_try_run "$LINENO"; then :
24287 gl_cv_func_stat_file_slash=yes
24288 else
24289 gl_cv_func_stat_file_slash=no
24290 fi
24291 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24292 conftest.$ac_objext conftest.beam conftest.$ac_ext
24293 fi
24294
24295 rm -f conftest.tmp conftest.lnk
24296 fi
24297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
24298 $as_echo "$gl_cv_func_stat_file_slash" >&6; }
24299 case $gl_cv_func_stat_dir_slash in
24300 *no) REPLACE_STAT=1
24301
24302 $as_echo "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h
24303 ;;
24304 esac
24305 case $gl_cv_func_stat_file_slash in
24306 *no) REPLACE_STAT=1
24307
24308 $as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
24309 ;;
24310 esac
24311
24312 if test $REPLACE_STAT = 1; then
24313
24314
24315
24316
24317
24318
24319
24320
24321 gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
24322
24323
24324
24325 :
24326
24327 fi
24328
24329
24330
24331
24332
24333 GNULIB_STAT=1
24334
24335
24336
24337
24338
24339 gl_gnulib_enabled_stat=true
24340 if test $REPLACE_STAT = 1; then
24341 func_gl_gnulib_m4code_dosname
24342 fi
24343 if test $REPLACE_STAT = 1; then
24344 func_gl_gnulib_m4code_pathmax
24345 fi
24346 if test $REPLACE_STAT = 1; then
24347 func_gl_gnulib_m4code_verify
24348 fi
24349 fi
24350 }
24351 func_gl_gnulib_m4code_strtoll ()
24352 {
24353 if ! $gl_gnulib_enabled_strtoll; then
24354
24355
24356
24357 if test "$ac_cv_type_long_long_int" = yes; then
24358 for ac_func in strtoll
24359 do :
24360 ac_fn_c_check_func "$LINENO" "strtoll" "ac_cv_func_strtoll"
24361 if test "x$ac_cv_func_strtoll" = x""yes; then :
24362 cat >>confdefs.h <<_ACEOF
24363 #define HAVE_STRTOLL 1
24364 _ACEOF
24365
24366 fi
24367 done
24368
24369 if test $ac_cv_func_strtoll = no; then
24370 HAVE_STRTOLL=0
24371 fi
24372 fi
24373
24374 if test $HAVE_STRTOLL = 0; then
24375
24376
24377
24378
24379
24380
24381
24382
24383 gl_LIBOBJS="$gl_LIBOBJS strtoll.$ac_objext"
24384
24385
24386 :
24387
24388 fi
24389
24390
24391
24392
24393
24394 GNULIB_STRTOLL=1
24395
24396
24397
24398
24399
24400 gl_gnulib_enabled_strtoll=true
24401 fi
24402 }
24403 func_gl_gnulib_m4code_strtoull ()
24404 {
24405 if ! $gl_gnulib_enabled_strtoull; then
24406
24407
24408
24409 if test "$ac_cv_type_unsigned_long_long_int" = yes; then
24410 for ac_func in strtoull
24411 do :
24412 ac_fn_c_check_func "$LINENO" "strtoull" "ac_cv_func_strtoull"
24413 if test "x$ac_cv_func_strtoull" = x""yes; then :
24414 cat >>confdefs.h <<_ACEOF
24415 #define HAVE_STRTOULL 1
24416 _ACEOF
24417
24418 fi
24419 done
24420
24421 if test $ac_cv_func_strtoull = no; then
24422 HAVE_STRTOULL=0
24423 fi
24424 fi
24425
24426 if test $HAVE_STRTOULL = 0; then
24427
24428
24429
24430
24431
24432
24433
24434
24435 gl_LIBOBJS="$gl_LIBOBJS strtoull.$ac_objext"
24436
24437
24438 :
24439
24440 fi
24441
24442
24443
24444
24445
24446 GNULIB_STRTOULL=1
24447
24448
24449
24450
24451
24452 gl_gnulib_enabled_strtoull=true
24453 fi
24454 }
24455 func_gl_gnulib_m4code_verify ()
24456 {
24457 if ! $gl_gnulib_enabled_verify; then
24458 gl_gnulib_enabled_verify=true
24459 fi
24460 }
24461 if test $REPLACE_GETOPT = 1; then
24462 func_gl_gnulib_m4code_be453cec5eecf5731a274f2de7f2db36
24463 fi
24464 if test $REPLACE_LSTAT = 1; then
24465 func_gl_gnulib_m4code_dosname
24466 fi
24467 if test $REPLACE_LSTAT = 1; then
24468 func_gl_gnulib_m4code_stat
24469 fi
24470 if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
24471 func_gl_gnulib_m4code_stat
24472 fi
24473 if { test $HAVE_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; } && test $ac_cv_type_long_long_int = yes; then
24474 func_gl_gnulib_m4code_strtoll
24475 fi
24476 if test $HAVE_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; then
24477 func_gl_gnulib_m4code_verify
24478 fi
24479 if test $ac_cv_func_strtoumax = no && test $ac_cv_type_unsigned_long_long_int = yes; then
24480 func_gl_gnulib_m4code_strtoull
24481 fi
24482 if test $ac_cv_func_strtoumax = no; then
24483 func_gl_gnulib_m4code_verify
24484 fi
24485
24486 if $gl_gnulib_enabled_dosname; then
24487 gl_GNULIB_ENABLED_dosname_TRUE=
24488 gl_GNULIB_ENABLED_dosname_FALSE='#'
24489 else
24490 gl_GNULIB_ENABLED_dosname_TRUE='#'
24491 gl_GNULIB_ENABLED_dosname_FALSE=
24492 fi
24493
24494 if $gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36; then
24495 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE=
24496 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE='#'
24497 else
24498 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE='#'
24499 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE=
24500 fi
24501
24502 if $gl_gnulib_enabled_pathmax; then
24503 gl_GNULIB_ENABLED_pathmax_TRUE=
24504 gl_GNULIB_ENABLED_pathmax_FALSE='#'
24505 else
24506 gl_GNULIB_ENABLED_pathmax_TRUE='#'
24507 gl_GNULIB_ENABLED_pathmax_FALSE=
24508 fi
24509
24510 if $gl_gnulib_enabled_stat; then
24511 gl_GNULIB_ENABLED_stat_TRUE=
24512 gl_GNULIB_ENABLED_stat_FALSE='#'
24513 else
24514 gl_GNULIB_ENABLED_stat_TRUE='#'
24515 gl_GNULIB_ENABLED_stat_FALSE=
24516 fi
24517
24518 if $gl_gnulib_enabled_strtoll; then
24519 gl_GNULIB_ENABLED_strtoll_TRUE=
24520 gl_GNULIB_ENABLED_strtoll_FALSE='#'
24521 else
24522 gl_GNULIB_ENABLED_strtoll_TRUE='#'
24523 gl_GNULIB_ENABLED_strtoll_FALSE=
24524 fi
24525
24526 if $gl_gnulib_enabled_strtoull; then
24527 gl_GNULIB_ENABLED_strtoull_TRUE=
24528 gl_GNULIB_ENABLED_strtoull_FALSE='#'
24529 else
24530 gl_GNULIB_ENABLED_strtoull_TRUE='#'
24531 gl_GNULIB_ENABLED_strtoull_FALSE=
24532 fi
24533
24534 if $gl_gnulib_enabled_verify; then
24535 gl_GNULIB_ENABLED_verify_TRUE=
24536 gl_GNULIB_ENABLED_verify_FALSE='#'
24537 else
24538 gl_GNULIB_ENABLED_verify_TRUE='#'
24539 gl_GNULIB_ENABLED_verify_FALSE=
24540 fi
24541
24542 # End of code from modules
24543
24544
24545
24546
24547
24548
24549
24550
24551
24552 gltests_libdeps=
24553 gltests_ltlibdeps=
24554
24555
24556
24557
24558
24559
24560
24561
24562
24563 gl_source_base='tests'
24564 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
24565
24566 gl_module_indicator_condition=$gltests_WITNESS
24567
24568
24569
24570
24571
24572
24573
24574
24575
24576
24577 LIBGNU_LIBDEPS="$gl_libdeps"
24578
24579 LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
24580
24581
24582 CFLAGS=$SAVE_CFLAGS
24583 LIBS=$SAVE_LIBS
24584
24585 case "$opsys" in
24586 aix4-2) LD_SWITCH_SYSTEM_TEMACS="-Wl,-bnodelcsect" ;;
24587
24588 darwin)
24589 ## The -headerpad option tells ld (see man page) to leave room at the
24590 ## end of the header for adding load commands. Needed for dumping.
24591 ## 0x690 is the total size of 30 segment load commands (at 56
24592 ## each); under Cocoa 31 commands are required.
24593 if test "$HAVE_NS" = "yes"; then
24594 libs_nsgui="-framework AppKit"
24595 headerpad_extra=6C8
24596 else
24597 libs_nsgui=
24598 headerpad_extra=690
24599 fi
24600 LD_SWITCH_SYSTEM_TEMACS="-fno-pie -prebind $libs_nsgui -Xlinker -headerpad -Xlinker $headerpad_extra"
24601
24602 ## This is here because src/Makefile.in did some extra fiddling around
24603 ## with LD_SWITCH_SYSTEM. The cpp logic was:
24604 ## #ifndef LD_SWITCH_SYSTEM
24605 ## #if !defined (__GNUC__) && ((defined (BSD_SYSTEM) && !defined (COFF)))
24606 ## Since all the *bsds define LD_SWITCH_SYSTEM, this simplifies to:
24607 ## not using gcc, darwin.
24608 ## Because this was done in src/Makefile.in, the resulting part of
24609 ## LD_SWITCH_SYSTEM was not used in configure (ie, in ac_link).
24610 ## It therefore seems cleaner to put this in LD_SWITCH_SYSTEM_TEMACS,
24611 ## rather than LD_SWITCH_SYSTEM.
24612 test "x$LD_SWITCH_SYSTEM" = "x" && test "x$GCC" != "xyes" && \
24613 LD_SWITCH_SYSTEM_TEMACS="-X $LD_SWITCH_SYSTEM_TEMACS"
24614 ;;
24615
24616 ## LD_SWITCH_X_SITE_RPATH is a -rpath option saying where to
24617 ## find X at run-time.
24618 ## When handled by cpp, this was in LD_SWITCH_SYSTEM. However, at the
24619 ## point where configure sourced the s/*.h file, LD_SWITCH_X_SITE_RPATH
24620 ## had not yet been defined and was expanded to null. Hence LD_SWITCH_SYSTEM
24621 ## had different values in configure (in ac_link) and src/Makefile.in.
24622 ## It seems clearer therefore to put this piece in LD_SWITCH_SYSTEM_TEMACS.
24623 gnu*) LD_SWITCH_SYSTEM_TEMACS="\$(LD_SWITCH_X_SITE_RPATH)" ;;
24624
24625 *) LD_SWITCH_SYSTEM_TEMACS= ;;
24626 esac
24627
24628
24629
24630
24631 LD_FIRSTFLAG=
24632 ORDINARY_LINK=
24633 case "$opsys" in
24634 ## gnu: GNU needs its own crt0.
24635 aix4-2|cygwin|darwin|gnu|hpux*|irix6-5|sol2*|unixware) ORDINARY_LINK=yes ;;
24636
24637 ## On post 1.3 releases of NetBSD, gcc -nostdlib also clears the
24638 ## library search parth, i.e. it won't search /usr/lib for libc and
24639 ## friends. Using -nostartfiles instead avoids this problem, and
24640 ## will also work on earlier NetBSD releases.
24641 netbsd|openbsd) LD_FIRSTFLAG="-nostartfiles" ;;
24642
24643 ## powerpc*: NAKAJI Hiroyuki <nakaji@tutrp.tut.ac.jp> says
24644 ## MkLinux/LinuxPPC needs this.
24645 ## s390x-* only supports opsys = gnu-linux so it can be added here.
24646 gnu-*)
24647 case "$canonical" in
24648 powerpc*|s390x-*) LD_FIRSTFLAG="-nostdlib" ;;
24649 esac
24650 ;;
24651 esac
24652
24653
24654 if test "x$ORDINARY_LINK" = "xyes"; then
24655
24656 LD_FIRSTFLAG=""
24657
24658 $as_echo "#define ORDINARY_LINK 1" >>confdefs.h
24659
24660
24661 ## The system files defining neither ORDINARY_LINK nor LD_FIRSTFLAG are:
24662 ## freebsd, gnu-* not on powerpc*|s390x*.
24663 elif test "x$GCC" = "xyes" && test "x$LD_FIRSTFLAG" = "x"; then
24664
24665 ## Versions of GCC >= 2.0 put their library, libgcc.a, in obscure
24666 ## places that are difficult to figure out at make time. Fortunately,
24667 ## these same versions allow you to pass arbitrary flags on to the
24668 ## linker, so there is no reason not to use it as a linker.
24669 ##
24670 ## Well, it is not quite perfect. The "-nostdlib" keeps GCC from
24671 ## searching for libraries in its internal directories, so we have to
24672 ## ask GCC explicitly where to find libgcc.a (LIB_GCC below).
24673 LD_FIRSTFLAG="-nostdlib"
24674 fi
24675
24676 ## FIXME? What setting of EDIT_LDFLAGS should this have?
24677 test "$NS_IMPL_GNUSTEP" = "yes" && LD_FIRSTFLAG="-rdynamic"
24678
24679
24680
24681
24682 ## FIXME? The logic here is not precisely the same as that above.
24683 ## There is no check here for a pre-defined LD_FIRSTFLAG.
24684 ## Should we only be setting LIB_GCC if LD ~ -nostdlib?
24685 LIB_GCC=
24686 if test "x$GCC" = "xyes" && test "x$ORDINARY_LINK" != "xyes"; then
24687
24688 case "$opsys" in
24689 freebsd|netbsd|openbsd) LIB_GCC= ;;
24690
24691 gnu-*)
24692 ## armin76@gentoo.org reported that the lgcc_s flag is necessary to
24693 ## build on ARM EABI under GNU/Linux. (Bug#5518)
24694 case $host_cpu in
24695 arm*)
24696 LIB_GCC="-lgcc_s"
24697 ;;
24698 *)
24699 ## FIXME? s/gnu-linux.h used to define LIB_GCC as below, then
24700 ## immediately undefine it again and redefine it to empty.
24701 ## Was the C_SWITCH_X_SITE part really necessary?
24702 ## LIB_GCC=`$CC $C_SWITCH_X_SITE -print-libgcc-file-name`
24703 LIB_GCC=
24704 ;;
24705 esac
24706 ;;
24707
24708 ## Ask GCC where to find libgcc.a.
24709 *) LIB_GCC=`$CC -print-libgcc-file-name 2> /dev/null` ;;
24710 esac
24711 fi
24712
24713 ## Common for all window systems
24714 if test "$window_system" != "none"; then
24715
24716 $as_echo "#define HAVE_WINDOW_SYSTEM 1" >>confdefs.h
24717
24718
24719 $as_echo "#define HAVE_MOUSE 1" >>confdefs.h
24720
24721 WINDOW_SYSTEM_OBJ="fontset.o fringe.o image.o"
24722 fi
24723
24724
24725
24726
24727
24728 #### Report on what we decided to do.
24729 #### Report GTK as a toolkit, even if it doesn't use Xt.
24730 #### It makes printing result more understandable as using GTK sets
24731 #### toolkit_scroll_bars to yes by default.
24732 if test "${HAVE_GTK}" = "yes"; then
24733 USE_X_TOOLKIT="$USE_GTK_TOOLKIT"
24734 fi
24735
24736 echo "
24737 Configured for \`${canonical}'.
24738
24739 Where should the build process find the source code? ${srcdir}
24740 What compiler should emacs be built with? ${CC} ${CFLAGS}
24741 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
24742 Should Emacs use a relocating allocator for buffers? ${REL_ALLOC}
24743 Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers
24744 What window system should Emacs use? ${window_system}
24745 What toolkit should Emacs use? ${USE_X_TOOLKIT}"
24746
24747 if test -n "${x_includes}"; then
24748 echo " Where do we find X Windows header files? ${x_includes}"
24749 else
24750 echo " Where do we find X Windows header files? Standard dirs"
24751 fi
24752 if test -n "${x_libraries}"; then
24753 echo " Where do we find X Windows libraries? ${x_libraries}"
24754 else
24755 echo " Where do we find X Windows libraries? Standard dirs"
24756 fi
24757
24758 echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}"
24759 echo " Does Emacs use -lXpm? ${HAVE_XPM}"
24760 echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
24761 echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
24762 echo " Does Emacs use a gif library? ${HAVE_GIF} $LIBGIF"
24763 echo " Does Emacs use -lpng? ${HAVE_PNG}"
24764 echo " Does Emacs use -lrsvg-2? ${HAVE_RSVG}"
24765 echo " Does Emacs use imagemagick? ${HAVE_IMAGEMAGICK}"
24766
24767 echo " Does Emacs use -lgpm? ${HAVE_GPM}"
24768 echo " Does Emacs use -ldbus? ${HAVE_DBUS}"
24769 echo " Does Emacs use -lgconf? ${HAVE_GCONF}"
24770 echo " Does Emacs use GSettings? ${HAVE_GSETTINGS}"
24771 echo " Does Emacs use -lselinux? ${HAVE_LIBSELINUX}"
24772 echo " Does Emacs use -lgnutls? ${HAVE_GNUTLS}"
24773 echo " Does Emacs use -lxml2? ${HAVE_LIBXML2}"
24774
24775 echo " Does Emacs use -lfreetype? ${HAVE_FREETYPE}"
24776 echo " Does Emacs use -lm17n-flt? ${HAVE_M17N_FLT}"
24777 echo " Does Emacs use -lotf? ${HAVE_LIBOTF}"
24778 echo " Does Emacs use -lxft? ${HAVE_XFT}"
24779
24780 echo " Does Emacs use toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
24781 echo
24782
24783 if test -n "${EMACSDATA}"; then
24784 echo " Environment variable EMACSDATA set to: $EMACSDATA"
24785 fi
24786 if test -n "${EMACSDOC}"; then
24787 echo " Environment variable EMACSDOC set to: $EMACSDOC"
24788 fi
24789
24790 echo
24791
24792 if test "$HAVE_NS" = "yes"; then
24793 echo
24794 echo "You must run \"${MAKE-make} install\" in order to test the built application.
24795 The installed application will go to nextstep/Emacs.app and can be
24796 run or moved from there."
24797 if test "$EN_NS_SELF_CONTAINED" = "yes"; then
24798 echo "The application will be fully self-contained."
24799 else
24800 echo "The lisp resources for the application will be installed under ${prefix}.
24801 You may need to run \"${MAKE-make} install\" with sudo. The application will fail
24802 to run if these resources are not installed."
24803 fi
24804 echo
24805 fi
24806
24807 if test "${opsys}" = "cygwin"; then
24808 case `uname -r` in
24809 1.5.*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: building Emacs on Cygwin 1.5 is not supported." >&5
24810 $as_echo "$as_me: WARNING: building Emacs on Cygwin 1.5 is not supported." >&2;}
24811 echo
24812 ;;
24813 esac
24814 fi
24815
24816 # Remove any trailing slashes in these variables.
24817 test "${prefix}" != NONE &&
24818 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
24819 test "${exec_prefix}" != NONE &&
24820 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
24821
24822 if test "$HAVE_NS" = "yes"; then
24823 if test "$NS_IMPL_GNUSTEP" = yes; then
24824 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"
24825
24826 else
24827 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"
24828
24829 fi
24830 fi
24831
24832 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"
24833
24834 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"
24835
24836
24837 opt_makefile=test/automated/Makefile
24838
24839 if test -f $srcdir/${opt_makefile}.in; then
24840 SUBDIR_MAKEFILES="$SUBDIR_MAKEFILES $opt_makefile"
24841 ac_config_files="$ac_config_files test/automated/Makefile"
24842
24843 fi
24844
24845
24846 opt_makefile=admin/unidata/Makefile
24847
24848 if test -f $srcdir/${opt_makefile}.in; then
24849 SUBDIR_MAKEFILES="$SUBDIR_MAKEFILES $opt_makefile"
24850 ac_config_files="$ac_config_files admin/unidata/Makefile"
24851
24852 fi
24853
24854
24855 SUBDIR_MAKEFILES_IN=`echo " ${SUBDIR_MAKEFILES}" | sed -e 's| | $(srcdir)/|g' -e 's|Makefile|Makefile.in|g'`
24856
24857
24858
24859 ac_config_commands="$ac_config_commands mkdirs"
24860
24861
24862 ac_config_commands="$ac_config_commands epaths"
24863
24864
24865 ac_config_commands="$ac_config_commands gdbinit"
24866
24867
24868 cat >confcache <<\_ACEOF
24869 # This file is a shell script that caches the results of configure
24870 # tests run on this system so they can be shared between configure
24871 # scripts and configure runs, see configure's option --config-cache.
24872 # It is not useful on other systems. If it contains results you don't
24873 # want to keep, you may remove or edit it.
24874 #
24875 # config.status only pays attention to the cache file if you give it
24876 # the --recheck option to rerun configure.
24877 #
24878 # `ac_cv_env_foo' variables (set or unset) will be overridden when
24879 # loading this file, other *unset* `ac_cv_foo' will be assigned the
24880 # following values.
24881
24882 _ACEOF
24883
24884 # The following way of writing the cache mishandles newlines in values,
24885 # but we know of no workaround that is simple, portable, and efficient.
24886 # So, we kill variables containing newlines.
24887 # Ultrix sh set writes to stderr and can't be redirected directly,
24888 # and sets the high bit in the cache file unless we assign to the vars.
24889 (
24890 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
24891 eval ac_val=\$$ac_var
24892 case $ac_val in #(
24893 *${as_nl}*)
24894 case $ac_var in #(
24895 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
24896 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
24897 esac
24898 case $ac_var in #(
24899 _ | IFS | as_nl) ;; #(
24900 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
24901 *) { eval $ac_var=; unset $ac_var;} ;;
24902 esac ;;
24903 esac
24904 done
24905
24906 (set) 2>&1 |
24907 case $as_nl`(ac_space=' '; set) 2>&1` in #(
24908 *${as_nl}ac_space=\ *)
24909 # `set' does not quote correctly, so add quotes: double-quote
24910 # substitution turns \\\\ into \\, and sed turns \\ into \.
24911 sed -n \
24912 "s/'/'\\\\''/g;
24913 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
24914 ;; #(
24915 *)
24916 # `set' quotes correctly as required by POSIX, so do not add quotes.
24917 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
24918 ;;
24919 esac |
24920 sort
24921 ) |
24922 sed '
24923 /^ac_cv_env_/b end
24924 t clear
24925 :clear
24926 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
24927 t end
24928 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
24929 :end' >>confcache
24930 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
24931 if test -w "$cache_file"; then
24932 test "x$cache_file" != "x/dev/null" &&
24933 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
24934 $as_echo "$as_me: updating cache $cache_file" >&6;}
24935 cat confcache >$cache_file
24936 else
24937 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
24938 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
24939 fi
24940 fi
24941 rm -f confcache
24942
24943 test "x$prefix" = xNONE && prefix=$ac_default_prefix
24944 # Let make expand exec_prefix.
24945 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
24946
24947 DEFS=-DHAVE_CONFIG_H
24948
24949 ac_libobjs=
24950 ac_ltlibobjs=
24951 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
24952 # 1. Remove the extension, and $U if already installed.
24953 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
24954 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
24955 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
24956 # will be set to the directory where LIBOBJS objects are built.
24957 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
24958 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
24959 done
24960 LIBOBJS=$ac_libobjs
24961
24962 LTLIBOBJS=$ac_ltlibobjs
24963
24964
24965 if test -n "$EXEEXT"; then
24966 am__EXEEXT_TRUE=
24967 am__EXEEXT_FALSE='#'
24968 else
24969 am__EXEEXT_TRUE='#'
24970 am__EXEEXT_FALSE=
24971 fi
24972
24973 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
24974 as_fn_error "conditional \"AMDEP\" was never defined.
24975 Usually this means the macro was only invoked conditionally." "$LINENO" 5
24976 fi
24977 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
24978 as_fn_error "conditional \"am__fastdepCC\" was never defined.
24979 Usually this means the macro was only invoked conditionally." "$LINENO" 5
24980 fi
24981 if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
24982 as_fn_error "conditional \"GL_COND_LIBTOOL\" was never defined.
24983 Usually this means the macro was only invoked conditionally." "$LINENO" 5
24984 fi
24985 if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
24986 as_fn_error "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
24987 Usually this means the macro was only invoked conditionally." "$LINENO" 5
24988 fi
24989
24990 if test -z "${GL_GENERATE_EXECINFO_H_TRUE}" && test -z "${GL_GENERATE_EXECINFO_H_FALSE}"; then
24991 as_fn_error "conditional \"GL_GENERATE_EXECINFO_H\" was never defined.
24992 Usually this means the macro was only invoked conditionally." "$LINENO" 5
24993 fi
24994 if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
24995 as_fn_error "conditional \"GL_GENERATE_STDINT_H\" was never defined.
24996 Usually this means the macro was only invoked conditionally." "$LINENO" 5
24997 fi
24998 if test -z "${GL_GENERATE_STDALIGN_H_TRUE}" && test -z "${GL_GENERATE_STDALIGN_H_FALSE}"; then
24999 as_fn_error "conditional \"GL_GENERATE_STDALIGN_H\" was never defined.
25000 Usually this means the macro was only invoked conditionally." "$LINENO" 5
25001 fi
25002 if test -z "${GL_GENERATE_STDARG_H_TRUE}" && test -z "${GL_GENERATE_STDARG_H_FALSE}"; then
25003 as_fn_error "conditional \"GL_GENERATE_STDARG_H\" was never defined.
25004 Usually this means the macro was only invoked conditionally." "$LINENO" 5
25005 fi
25006 if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
25007 as_fn_error "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
25008 Usually this means the macro was only invoked conditionally." "$LINENO" 5
25009 fi
25010 if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
25011 as_fn_error "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
25012 Usually this means the macro was only invoked conditionally." "$LINENO" 5
25013 fi
25014 if test -z "${gl_GNULIB_ENABLED_dosname_TRUE}" && test -z "${gl_GNULIB_ENABLED_dosname_FALSE}"; then
25015 as_fn_error "conditional \"gl_GNULIB_ENABLED_dosname\" was never defined.
25016 Usually this means the macro was only invoked conditionally." "$LINENO" 5
25017 fi
25018 if test -z "${gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE}" && test -z "${gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE}"; then
25019 as_fn_error "conditional \"gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36\" was never defined.
25020 Usually this means the macro was only invoked conditionally." "$LINENO" 5
25021 fi
25022 if test -z "${gl_GNULIB_ENABLED_pathmax_TRUE}" && test -z "${gl_GNULIB_ENABLED_pathmax_FALSE}"; then
25023 as_fn_error "conditional \"gl_GNULIB_ENABLED_pathmax\" was never defined.
25024 Usually this means the macro was only invoked conditionally." "$LINENO" 5
25025 fi
25026 if test -z "${gl_GNULIB_ENABLED_stat_TRUE}" && test -z "${gl_GNULIB_ENABLED_stat_FALSE}"; then
25027 as_fn_error "conditional \"gl_GNULIB_ENABLED_stat\" was never defined.
25028 Usually this means the macro was only invoked conditionally." "$LINENO" 5
25029 fi
25030 if test -z "${gl_GNULIB_ENABLED_strtoll_TRUE}" && test -z "${gl_GNULIB_ENABLED_strtoll_FALSE}"; then
25031 as_fn_error "conditional \"gl_GNULIB_ENABLED_strtoll\" was never defined.
25032 Usually this means the macro was only invoked conditionally." "$LINENO" 5
25033 fi
25034 if test -z "${gl_GNULIB_ENABLED_strtoull_TRUE}" && test -z "${gl_GNULIB_ENABLED_strtoull_FALSE}"; then
25035 as_fn_error "conditional \"gl_GNULIB_ENABLED_strtoull\" was never defined.
25036 Usually this means the macro was only invoked conditionally." "$LINENO" 5
25037 fi
25038 if test -z "${gl_GNULIB_ENABLED_verify_TRUE}" && test -z "${gl_GNULIB_ENABLED_verify_FALSE}"; then
25039 as_fn_error "conditional \"gl_GNULIB_ENABLED_verify\" was never defined.
25040 Usually this means the macro was only invoked conditionally." "$LINENO" 5
25041 fi
25042
25043 gl_libobjs=
25044 gl_ltlibobjs=
25045 if test -n "$gl_LIBOBJS"; then
25046 # Remove the extension.
25047 sed_drop_objext='s/\.o$//;s/\.obj$//'
25048 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
25049 gl_libobjs="$gl_libobjs $i.$ac_objext"
25050 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
25051 done
25052 fi
25053 gl_LIBOBJS=$gl_libobjs
25054
25055 gl_LTLIBOBJS=$gl_ltlibobjs
25056
25057
25058
25059 gltests_libobjs=
25060 gltests_ltlibobjs=
25061 if test -n "$gltests_LIBOBJS"; then
25062 # Remove the extension.
25063 sed_drop_objext='s/\.o$//;s/\.obj$//'
25064 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
25065 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
25066 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
25067 done
25068 fi
25069 gltests_LIBOBJS=$gltests_libobjs
25070
25071 gltests_LTLIBOBJS=$gltests_ltlibobjs
25072
25073
25074
25075 : ${CONFIG_STATUS=./config.status}
25076 ac_write_fail=0
25077 ac_clean_files_save=$ac_clean_files
25078 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
25079 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
25080 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
25081 as_write_fail=0
25082 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
25083 #! $SHELL
25084 # Generated by $as_me.
25085 # Run this file to recreate the current configuration.
25086 # Compiler output produced by configure, useful for debugging
25087 # configure, is in config.log if it exists.
25088
25089 debug=false
25090 ac_cs_recheck=false
25091 ac_cs_silent=false
25092
25093 SHELL=\${CONFIG_SHELL-$SHELL}
25094 export SHELL
25095 _ASEOF
25096 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
25097 ## -------------------- ##
25098 ## M4sh Initialization. ##
25099 ## -------------------- ##
25100
25101 # Be more Bourne compatible
25102 DUALCASE=1; export DUALCASE # for MKS sh
25103 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
25104 emulate sh
25105 NULLCMD=:
25106 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
25107 # is contrary to our usage. Disable this feature.
25108 alias -g '${1+"$@"}'='"$@"'
25109 setopt NO_GLOB_SUBST
25110 else
25111 case `(set -o) 2>/dev/null` in #(
25112 *posix*) :
25113 set -o posix ;; #(
25114 *) :
25115 ;;
25116 esac
25117 fi
25118
25119
25120 as_nl='
25121 '
25122 export as_nl
25123 # Printing a long string crashes Solaris 7 /usr/bin/printf.
25124 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
25125 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
25126 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
25127 # Prefer a ksh shell builtin over an external printf program on Solaris,
25128 # but without wasting forks for bash or zsh.
25129 if test -z "$BASH_VERSION$ZSH_VERSION" \
25130 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
25131 as_echo='print -r --'
25132 as_echo_n='print -rn --'
25133 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
25134 as_echo='printf %s\n'
25135 as_echo_n='printf %s'
25136 else
25137 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
25138 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
25139 as_echo_n='/usr/ucb/echo -n'
25140 else
25141 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
25142 as_echo_n_body='eval
25143 arg=$1;
25144 case $arg in #(
25145 *"$as_nl"*)
25146 expr "X$arg" : "X\\(.*\\)$as_nl";
25147 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
25148 esac;
25149 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
25150 '
25151 export as_echo_n_body
25152 as_echo_n='sh -c $as_echo_n_body as_echo'
25153 fi
25154 export as_echo_body
25155 as_echo='sh -c $as_echo_body as_echo'
25156 fi
25157
25158 # The user is always right.
25159 if test "${PATH_SEPARATOR+set}" != set; then
25160 PATH_SEPARATOR=:
25161 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
25162 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
25163 PATH_SEPARATOR=';'
25164 }
25165 fi
25166
25167
25168 # IFS
25169 # We need space, tab and new line, in precisely that order. Quoting is
25170 # there to prevent editors from complaining about space-tab.
25171 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
25172 # splitting by setting IFS to empty value.)
25173 IFS=" "" $as_nl"
25174
25175 # Find who we are. Look in the path if we contain no directory separator.
25176 case $0 in #((
25177 *[\\/]* ) as_myself=$0 ;;
25178 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25179 for as_dir in $PATH
25180 do
25181 IFS=$as_save_IFS
25182 test -z "$as_dir" && as_dir=.
25183 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
25184 done
25185 IFS=$as_save_IFS
25186
25187 ;;
25188 esac
25189 # We did not find ourselves, most probably we were run as `sh COMMAND'
25190 # in which case we are not to be found in the path.
25191 if test "x$as_myself" = x; then
25192 as_myself=$0
25193 fi
25194 if test ! -f "$as_myself"; then
25195 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
25196 exit 1
25197 fi
25198
25199 # Unset variables that we do not need and which cause bugs (e.g. in
25200 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
25201 # suppresses any "Segmentation fault" message there. '((' could
25202 # trigger a bug in pdksh 5.2.14.
25203 for as_var in BASH_ENV ENV MAIL MAILPATH
25204 do eval test x\${$as_var+set} = xset \
25205 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
25206 done
25207 PS1='$ '
25208 PS2='> '
25209 PS4='+ '
25210
25211 # NLS nuisances.
25212 LC_ALL=C
25213 export LC_ALL
25214 LANGUAGE=C
25215 export LANGUAGE
25216
25217 # CDPATH.
25218 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
25219
25220
25221 # as_fn_error ERROR [LINENO LOG_FD]
25222 # ---------------------------------
25223 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
25224 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
25225 # script with status $?, using 1 if that was 0.
25226 as_fn_error ()
25227 {
25228 as_status=$?; test $as_status -eq 0 && as_status=1
25229 if test "$3"; then
25230 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
25231 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
25232 fi
25233 $as_echo "$as_me: error: $1" >&2
25234 as_fn_exit $as_status
25235 } # as_fn_error
25236
25237
25238 # as_fn_set_status STATUS
25239 # -----------------------
25240 # Set $? to STATUS, without forking.
25241 as_fn_set_status ()
25242 {
25243 return $1
25244 } # as_fn_set_status
25245
25246 # as_fn_exit STATUS
25247 # -----------------
25248 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
25249 as_fn_exit ()
25250 {
25251 set +e
25252 as_fn_set_status $1
25253 exit $1
25254 } # as_fn_exit
25255
25256 # as_fn_unset VAR
25257 # ---------------
25258 # Portably unset VAR.
25259 as_fn_unset ()
25260 {
25261 { eval $1=; unset $1;}
25262 }
25263 as_unset=as_fn_unset
25264 # as_fn_append VAR VALUE
25265 # ----------------------
25266 # Append the text in VALUE to the end of the definition contained in VAR. Take
25267 # advantage of any shell optimizations that allow amortized linear growth over
25268 # repeated appends, instead of the typical quadratic growth present in naive
25269 # implementations.
25270 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
25271 eval 'as_fn_append ()
25272 {
25273 eval $1+=\$2
25274 }'
25275 else
25276 as_fn_append ()
25277 {
25278 eval $1=\$$1\$2
25279 }
25280 fi # as_fn_append
25281
25282 # as_fn_arith ARG...
25283 # ------------------
25284 # Perform arithmetic evaluation on the ARGs, and store the result in the
25285 # global $as_val. Take advantage of shells that can avoid forks. The arguments
25286 # must be portable across $(()) and expr.
25287 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
25288 eval 'as_fn_arith ()
25289 {
25290 as_val=$(( $* ))
25291 }'
25292 else
25293 as_fn_arith ()
25294 {
25295 as_val=`expr "$@" || test $? -eq 1`
25296 }
25297 fi # as_fn_arith
25298
25299
25300 if expr a : '\(a\)' >/dev/null 2>&1 &&
25301 test "X`expr 00001 : '.*\(...\)'`" = X001; then
25302 as_expr=expr
25303 else
25304 as_expr=false
25305 fi
25306
25307 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
25308 as_basename=basename
25309 else
25310 as_basename=false
25311 fi
25312
25313 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
25314 as_dirname=dirname
25315 else
25316 as_dirname=false
25317 fi
25318
25319 as_me=`$as_basename -- "$0" ||
25320 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
25321 X"$0" : 'X\(//\)$' \| \
25322 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
25323 $as_echo X/"$0" |
25324 sed '/^.*\/\([^/][^/]*\)\/*$/{
25325 s//\1/
25326 q
25327 }
25328 /^X\/\(\/\/\)$/{
25329 s//\1/
25330 q
25331 }
25332 /^X\/\(\/\).*/{
25333 s//\1/
25334 q
25335 }
25336 s/.*/./; q'`
25337
25338 # Avoid depending upon Character Ranges.
25339 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
25340 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
25341 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
25342 as_cr_digits='0123456789'
25343 as_cr_alnum=$as_cr_Letters$as_cr_digits
25344
25345 ECHO_C= ECHO_N= ECHO_T=
25346 case `echo -n x` in #(((((
25347 -n*)
25348 case `echo 'xy\c'` in
25349 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
25350 xy) ECHO_C='\c';;
25351 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
25352 ECHO_T=' ';;
25353 esac;;
25354 *)
25355 ECHO_N='-n';;
25356 esac
25357
25358 rm -f conf$$ conf$$.exe conf$$.file
25359 if test -d conf$$.dir; then
25360 rm -f conf$$.dir/conf$$.file
25361 else
25362 rm -f conf$$.dir
25363 mkdir conf$$.dir 2>/dev/null
25364 fi
25365 if (echo >conf$$.file) 2>/dev/null; then
25366 if ln -s conf$$.file conf$$ 2>/dev/null; then
25367 as_ln_s='ln -s'
25368 # ... but there are two gotchas:
25369 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
25370 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
25371 # In both cases, we have to default to `cp -p'.
25372 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
25373 as_ln_s='cp -p'
25374 elif ln conf$$.file conf$$ 2>/dev/null; then
25375 as_ln_s=ln
25376 else
25377 as_ln_s='cp -p'
25378 fi
25379 else
25380 as_ln_s='cp -p'
25381 fi
25382 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
25383 rmdir conf$$.dir 2>/dev/null
25384
25385
25386 # as_fn_mkdir_p
25387 # -------------
25388 # Create "$as_dir" as a directory, including parents if necessary.
25389 as_fn_mkdir_p ()
25390 {
25391
25392 case $as_dir in #(
25393 -*) as_dir=./$as_dir;;
25394 esac
25395 test -d "$as_dir" || eval $as_mkdir_p || {
25396 as_dirs=
25397 while :; do
25398 case $as_dir in #(
25399 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
25400 *) as_qdir=$as_dir;;
25401 esac
25402 as_dirs="'$as_qdir' $as_dirs"
25403 as_dir=`$as_dirname -- "$as_dir" ||
25404 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25405 X"$as_dir" : 'X\(//\)[^/]' \| \
25406 X"$as_dir" : 'X\(//\)$' \| \
25407 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
25408 $as_echo X"$as_dir" |
25409 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25410 s//\1/
25411 q
25412 }
25413 /^X\(\/\/\)[^/].*/{
25414 s//\1/
25415 q
25416 }
25417 /^X\(\/\/\)$/{
25418 s//\1/
25419 q
25420 }
25421 /^X\(\/\).*/{
25422 s//\1/
25423 q
25424 }
25425 s/.*/./; q'`
25426 test -d "$as_dir" && break
25427 done
25428 test -z "$as_dirs" || eval "mkdir $as_dirs"
25429 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
25430
25431
25432 } # as_fn_mkdir_p
25433 if mkdir -p . 2>/dev/null; then
25434 as_mkdir_p='mkdir -p "$as_dir"'
25435 else
25436 test -d ./-p && rmdir ./-p
25437 as_mkdir_p=false
25438 fi
25439
25440 if test -x / >/dev/null 2>&1; then
25441 as_test_x='test -x'
25442 else
25443 if ls -dL / >/dev/null 2>&1; then
25444 as_ls_L_option=L
25445 else
25446 as_ls_L_option=
25447 fi
25448 as_test_x='
25449 eval sh -c '\''
25450 if test -d "$1"; then
25451 test -d "$1/.";
25452 else
25453 case $1 in #(
25454 -*)set "./$1";;
25455 esac;
25456 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
25457 ???[sx]*):;;*)false;;esac;fi
25458 '\'' sh
25459 '
25460 fi
25461 as_executable_p=$as_test_x
25462
25463 # Sed expression to map a string onto a valid CPP name.
25464 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
25465
25466 # Sed expression to map a string onto a valid variable name.
25467 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
25468
25469
25470 exec 6>&1
25471 ## ----------------------------------- ##
25472 ## Main body of $CONFIG_STATUS script. ##
25473 ## ----------------------------------- ##
25474 _ASEOF
25475 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
25476
25477 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25478 # Save the log message, to keep $0 and so on meaningful, and to
25479 # report actual input values of CONFIG_FILES etc. instead of their
25480 # values after options handling.
25481 ac_log="
25482 This file was extended by emacs $as_me 24.2.93, which was
25483 generated by GNU Autoconf 2.65. Invocation command line was
25484
25485 CONFIG_FILES = $CONFIG_FILES
25486 CONFIG_HEADERS = $CONFIG_HEADERS
25487 CONFIG_LINKS = $CONFIG_LINKS
25488 CONFIG_COMMANDS = $CONFIG_COMMANDS
25489 $ $0 $@
25490
25491 on `(hostname || uname -n) 2>/dev/null | sed 1q`
25492 "
25493
25494 _ACEOF
25495
25496 case $ac_config_files in *"
25497 "*) set x $ac_config_files; shift; ac_config_files=$*;;
25498 esac
25499
25500 case $ac_config_headers in *"
25501 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
25502 esac
25503
25504
25505 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25506 # Files that config.status was made for.
25507 config_files="$ac_config_files"
25508 config_headers="$ac_config_headers"
25509 config_commands="$ac_config_commands"
25510
25511 _ACEOF
25512
25513 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25514 ac_cs_usage="\
25515 \`$as_me' instantiates files and other configuration actions
25516 from templates according to the current configuration. Unless the files
25517 and actions are specified as TAGs, all are instantiated by default.
25518
25519 Usage: $0 [OPTION]... [TAG]...
25520
25521 -h, --help print this help, then exit
25522 -V, --version print version number and configuration settings, then exit
25523 --config print configuration, then exit
25524 -q, --quiet, --silent
25525 do not print progress messages
25526 -d, --debug don't remove temporary files
25527 --recheck update $as_me by reconfiguring in the same conditions
25528 --file=FILE[:TEMPLATE]
25529 instantiate the configuration file FILE
25530 --header=FILE[:TEMPLATE]
25531 instantiate the configuration header FILE
25532
25533 Configuration files:
25534 $config_files
25535
25536 Configuration headers:
25537 $config_headers
25538
25539 Configuration commands:
25540 $config_commands
25541
25542 Report bugs to the package provider."
25543
25544 _ACEOF
25545 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25546 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
25547 ac_cs_version="\\
25548 emacs config.status 24.2.93
25549 configured by $0, generated by GNU Autoconf 2.65,
25550 with options \\"\$ac_cs_config\\"
25551
25552 Copyright (C) 2009 Free Software Foundation, Inc.
25553 This config.status script is free software; the Free Software Foundation
25554 gives unlimited permission to copy, distribute and modify it."
25555
25556 ac_pwd='$ac_pwd'
25557 srcdir='$srcdir'
25558 INSTALL='$INSTALL'
25559 MKDIR_P='$MKDIR_P'
25560 AWK='$AWK'
25561 test -n "\$AWK" || AWK=awk
25562 _ACEOF
25563
25564 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25565 # The default lists apply if the user does not specify any file.
25566 ac_need_defaults=:
25567 while test $# != 0
25568 do
25569 case $1 in
25570 --*=*)
25571 ac_option=`expr "X$1" : 'X\([^=]*\)='`
25572 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
25573 ac_shift=:
25574 ;;
25575 *)
25576 ac_option=$1
25577 ac_optarg=$2
25578 ac_shift=shift
25579 ;;
25580 esac
25581
25582 case $ac_option in
25583 # Handling of the options.
25584 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
25585 ac_cs_recheck=: ;;
25586 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
25587 $as_echo "$ac_cs_version"; exit ;;
25588 --config | --confi | --conf | --con | --co | --c )
25589 $as_echo "$ac_cs_config"; exit ;;
25590 --debug | --debu | --deb | --de | --d | -d )
25591 debug=: ;;
25592 --file | --fil | --fi | --f )
25593 $ac_shift
25594 case $ac_optarg in
25595 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
25596 esac
25597 as_fn_append CONFIG_FILES " '$ac_optarg'"
25598 ac_need_defaults=false;;
25599 --header | --heade | --head | --hea )
25600 $ac_shift
25601 case $ac_optarg in
25602 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
25603 esac
25604 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
25605 ac_need_defaults=false;;
25606 --he | --h)
25607 # Conflict between --help and --header
25608 as_fn_error "ambiguous option: \`$1'
25609 Try \`$0 --help' for more information.";;
25610 --help | --hel | -h )
25611 $as_echo "$ac_cs_usage"; exit ;;
25612 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
25613 | -silent | --silent | --silen | --sile | --sil | --si | --s)
25614 ac_cs_silent=: ;;
25615
25616 # This is an error.
25617 -*) as_fn_error "unrecognized option: \`$1'
25618 Try \`$0 --help' for more information." ;;
25619
25620 *) as_fn_append ac_config_targets " $1"
25621 ac_need_defaults=false ;;
25622
25623 esac
25624 shift
25625 done
25626
25627 ac_configure_extra_args=
25628
25629 if $ac_cs_silent; then
25630 exec 6>/dev/null
25631 ac_configure_extra_args="$ac_configure_extra_args --silent"
25632 fi
25633
25634 _ACEOF
25635 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25636 if \$ac_cs_recheck; then
25637 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
25638 shift
25639 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
25640 CONFIG_SHELL='$SHELL'
25641 export CONFIG_SHELL
25642 exec "\$@"
25643 fi
25644
25645 _ACEOF
25646 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25647 exec 5>>config.log
25648 {
25649 echo
25650 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
25651 ## Running $as_me. ##
25652 _ASBOX
25653 $as_echo "$ac_log"
25654 } >&5
25655
25656 _ACEOF
25657 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25658 #
25659 # INIT-COMMANDS
25660 #
25661 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
25662 GCC="$GCC" CPPFLAGS="$CPPFLAGS"
25663
25664 _ACEOF
25665
25666 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25667
25668 # Handling of arguments.
25669 for ac_config_target in $ac_config_targets
25670 do
25671 case $ac_config_target in
25672 "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:src/config.in" ;;
25673 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
25674 "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" ;;
25675 "nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop") CONFIG_FILES="$CONFIG_FILES nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop:nextstep/templates/Emacs.desktop.in" ;;
25676 "nextstep/Cocoa/Emacs.base/Contents/Info.plist") CONFIG_FILES="$CONFIG_FILES nextstep/Cocoa/Emacs.base/Contents/Info.plist:nextstep/templates/Info.plist.in" ;;
25677 "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" ;;
25678 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
25679 "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
25680 "lib-src/Makefile") CONFIG_FILES="$CONFIG_FILES lib-src/Makefile" ;;
25681 "oldXMenu/Makefile") CONFIG_FILES="$CONFIG_FILES oldXMenu/Makefile" ;;
25682 "doc/emacs/Makefile") CONFIG_FILES="$CONFIG_FILES doc/emacs/Makefile" ;;
25683 "doc/misc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/misc/Makefile" ;;
25684 "doc/lispintro/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispintro/Makefile" ;;
25685 "doc/lispref/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispref/Makefile" ;;
25686 "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
25687 "lwlib/Makefile") CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;;
25688 "lisp/Makefile") CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;;
25689 "leim/Makefile") CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;;
25690 "nextstep/Makefile") CONFIG_FILES="$CONFIG_FILES nextstep/Makefile" ;;
25691 "test/automated/Makefile") CONFIG_FILES="$CONFIG_FILES test/automated/Makefile" ;;
25692 "admin/unidata/Makefile") CONFIG_FILES="$CONFIG_FILES admin/unidata/Makefile" ;;
25693 "mkdirs") CONFIG_COMMANDS="$CONFIG_COMMANDS mkdirs" ;;
25694 "epaths") CONFIG_COMMANDS="$CONFIG_COMMANDS epaths" ;;
25695 "gdbinit") CONFIG_COMMANDS="$CONFIG_COMMANDS gdbinit" ;;
25696
25697 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
25698 esac
25699 done
25700
25701
25702 # If the user did not use the arguments to specify the items to instantiate,
25703 # then the envvar interface is used. Set only those that are not.
25704 # We use the long form for the default assignment because of an extremely
25705 # bizarre bug on SunOS 4.1.3.
25706 if $ac_need_defaults; then
25707 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
25708 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
25709 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
25710 fi
25711
25712 # Have a temporary directory for convenience. Make it in the build tree
25713 # simply because there is no reason against having it here, and in addition,
25714 # creating and moving files from /tmp can sometimes cause problems.
25715 # Hook for its removal unless debugging.
25716 # Note that there is a small window in which the directory will not be cleaned:
25717 # after its creation but before its name has been assigned to `$tmp'.
25718 $debug ||
25719 {
25720 tmp=
25721 trap 'exit_status=$?
25722 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
25723 ' 0
25724 trap 'as_fn_exit 1' 1 2 13 15
25725 }
25726 # Create a (secure) tmp directory for tmp files.
25727
25728 {
25729 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
25730 test -n "$tmp" && test -d "$tmp"
25731 } ||
25732 {
25733 tmp=./conf$$-$RANDOM
25734 (umask 077 && mkdir "$tmp")
25735 } || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
25736
25737 # Set up the scripts for CONFIG_FILES section.
25738 # No need to generate them if there are no CONFIG_FILES.
25739 # This happens for instance with `./config.status config.h'.
25740 if test -n "$CONFIG_FILES"; then
25741
25742 if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
25743 ac_cs_awk_getline=:
25744 ac_cs_awk_pipe_init=
25745 ac_cs_awk_read_file='
25746 while ((getline aline < (F[key])) > 0)
25747 print(aline)
25748 close(F[key])'
25749 ac_cs_awk_pipe_fini=
25750 else
25751 ac_cs_awk_getline=false
25752 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
25753 ac_cs_awk_read_file='
25754 print "|#_!!_#|"
25755 print "cat " F[key] " &&"
25756 '$ac_cs_awk_pipe_init
25757 # The final `:' finishes the AND list.
25758 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
25759 fi
25760 ac_cr=`echo X | tr X '\015'`
25761 # On cygwin, bash can eat \r inside `` if the user requested igncr.
25762 # But we know of no other shell where ac_cr would be empty at this
25763 # point, so we can use a bashism as a fallback.
25764 if test "x$ac_cr" = x; then
25765 eval ac_cr=\$\'\\r\'
25766 fi
25767 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
25768 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
25769 ac_cs_awk_cr='\r'
25770 else
25771 ac_cs_awk_cr=$ac_cr
25772 fi
25773
25774 echo 'BEGIN {' >"$tmp/subs1.awk" &&
25775 _ACEOF
25776
25777 # Create commands to substitute file output variables.
25778 {
25779 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
25780 echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
25781 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
25782 echo "_ACAWK" &&
25783 echo "_ACEOF"
25784 } >conf$$files.sh &&
25785 . ./conf$$files.sh ||
25786 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
25787 rm -f conf$$files.sh
25788
25789 {
25790 echo "cat >conf$$subs.awk <<_ACEOF" &&
25791 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
25792 echo "_ACEOF"
25793 } >conf$$subs.sh ||
25794 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
25795 ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
25796 ac_delim='%!_!# '
25797 for ac_last_try in false false false false false :; do
25798 . ./conf$$subs.sh ||
25799 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
25800
25801 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
25802 if test $ac_delim_n = $ac_delim_num; then
25803 break
25804 elif $ac_last_try; then
25805 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
25806 else
25807 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
25808 fi
25809 done
25810 rm -f conf$$subs.sh
25811
25812 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25813 cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
25814 _ACEOF
25815 sed -n '
25816 h
25817 s/^/S["/; s/!.*/"]=/
25818 p
25819 g
25820 s/^[^!]*!//
25821 :repl
25822 t repl
25823 s/'"$ac_delim"'$//
25824 t delim
25825 :nl
25826 h
25827 s/\(.\{148\}\)..*/\1/
25828 t more1
25829 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
25830 p
25831 n
25832 b repl
25833 :more1
25834 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
25835 p
25836 g
25837 s/.\{148\}//
25838 t nl
25839 :delim
25840 h
25841 s/\(.\{148\}\)..*/\1/
25842 t more2
25843 s/["\\]/\\&/g; s/^/"/; s/$/"/
25844 p
25845 b
25846 :more2
25847 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
25848 p
25849 g
25850 s/.\{148\}//
25851 t delim
25852 ' <conf$$subs.awk | sed '
25853 /^[^""]/{
25854 N
25855 s/\n//
25856 }
25857 ' >>$CONFIG_STATUS || ac_write_fail=1
25858 rm -f conf$$subs.awk
25859 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25860 _ACAWK
25861 cat >>"\$tmp/subs1.awk" <<_ACAWK &&
25862 for (key in S) S_is_set[key] = 1
25863 FS = "\a"
25864 \$ac_cs_awk_pipe_init
25865 }
25866 {
25867 line = $ 0
25868 nfields = split(line, field, "@")
25869 substed = 0
25870 len = length(field[1])
25871 for (i = 2; i < nfields; i++) {
25872 key = field[i]
25873 keylen = length(key)
25874 if (S_is_set[key]) {
25875 value = S[key]
25876 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
25877 len += length(value) + length(field[++i])
25878 substed = 1
25879 } else
25880 len += 1 + keylen
25881 }
25882 if (nfields == 3 && !substed) {
25883 key = field[2]
25884 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
25885 \$ac_cs_awk_read_file
25886 next
25887 }
25888 }
25889 print line
25890 }
25891 \$ac_cs_awk_pipe_fini
25892 _ACAWK
25893 _ACEOF
25894 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25895 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
25896 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
25897 else
25898 cat
25899 fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
25900 || as_fn_error "could not setup config files machinery" "$LINENO" 5
25901 _ACEOF
25902
25903 # VPATH may cause trouble with some makes, so we remove $(srcdir),
25904 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
25905 # trailing colons and then remove the whole line if VPATH becomes empty
25906 # (actually we leave an empty line to preserve line numbers).
25907 if test "x$srcdir" = x.; then
25908 ac_vpsub='/^[ ]*VPATH[ ]*=/{
25909 s/:*\$(srcdir):*/:/
25910 s/:*\${srcdir}:*/:/
25911 s/:*@srcdir@:*/:/
25912 s/^\([^=]*=[ ]*\):*/\1/
25913 s/:*$//
25914 s/^[^=]*=[ ]*$//
25915 }'
25916 fi
25917
25918 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25919 fi # test -n "$CONFIG_FILES"
25920
25921 # Set up the scripts for CONFIG_HEADERS section.
25922 # No need to generate them if there are no CONFIG_HEADERS.
25923 # This happens for instance with `./config.status Makefile'.
25924 if test -n "$CONFIG_HEADERS"; then
25925 cat >"$tmp/defines.awk" <<\_ACAWK ||
25926 BEGIN {
25927 _ACEOF
25928
25929 # Transform confdefs.h into an awk script `defines.awk', embedded as
25930 # here-document in config.status, that substitutes the proper values into
25931 # config.h.in to produce config.h.
25932
25933 # Create a delimiter string that does not exist in confdefs.h, to ease
25934 # handling of long lines.
25935 ac_delim='%!_!# '
25936 for ac_last_try in false false :; do
25937 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
25938 if test -z "$ac_t"; then
25939 break
25940 elif $ac_last_try; then
25941 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
25942 else
25943 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
25944 fi
25945 done
25946
25947 # For the awk script, D is an array of macro values keyed by name,
25948 # likewise P contains macro parameters if any. Preserve backslash
25949 # newline sequences.
25950
25951 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
25952 sed -n '
25953 s/.\{148\}/&'"$ac_delim"'/g
25954 t rset
25955 :rset
25956 s/^[ ]*#[ ]*define[ ][ ]*/ /
25957 t def
25958 d
25959 :def
25960 s/\\$//
25961 t bsnl
25962 s/["\\]/\\&/g
25963 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
25964 D["\1"]=" \3"/p
25965 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
25966 d
25967 :bsnl
25968 s/["\\]/\\&/g
25969 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
25970 D["\1"]=" \3\\\\\\n"\\/p
25971 t cont
25972 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
25973 t cont
25974 d
25975 :cont
25976 n
25977 s/.\{148\}/&'"$ac_delim"'/g
25978 t clear
25979 :clear
25980 s/\\$//
25981 t bsnlc
25982 s/["\\]/\\&/g; s/^/"/; s/$/"/p
25983 d
25984 :bsnlc
25985 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
25986 b cont
25987 ' <confdefs.h | sed '
25988 s/'"$ac_delim"'/"\\\
25989 "/g' >>$CONFIG_STATUS || ac_write_fail=1
25990
25991 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25992 for (key in D) D_is_set[key] = 1
25993 FS = "\a"
25994 }
25995 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
25996 line = \$ 0
25997 split(line, arg, " ")
25998 if (arg[1] == "#") {
25999 defundef = arg[2]
26000 mac1 = arg[3]
26001 } else {
26002 defundef = substr(arg[1], 2)
26003 mac1 = arg[2]
26004 }
26005 split(mac1, mac2, "(") #)
26006 macro = mac2[1]
26007 prefix = substr(line, 1, index(line, defundef) - 1)
26008 if (D_is_set[macro]) {
26009 # Preserve the white space surrounding the "#".
26010 print prefix "define", macro P[macro] D[macro]
26011 next
26012 } else {
26013 # Replace #undef with comments. This is necessary, for example,
26014 # in the case of _POSIX_SOURCE, which is predefined and required
26015 # on some systems where configure will not decide to define it.
26016 if (defundef == "undef") {
26017 print "/*", prefix defundef, macro, "*/"
26018 next
26019 }
26020 }
26021 }
26022 { print }
26023 _ACAWK
26024 _ACEOF
26025 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26026 as_fn_error "could not setup config headers machinery" "$LINENO" 5
26027 fi # test -n "$CONFIG_HEADERS"
26028
26029
26030 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
26031 shift
26032 for ac_tag
26033 do
26034 case $ac_tag in
26035 :[FHLC]) ac_mode=$ac_tag; continue;;
26036 esac
26037 case $ac_mode$ac_tag in
26038 :[FHL]*:*);;
26039 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
26040 :[FH]-) ac_tag=-:-;;
26041 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
26042 esac
26043 ac_save_IFS=$IFS
26044 IFS=:
26045 set x $ac_tag
26046 IFS=$ac_save_IFS
26047 shift
26048 ac_file=$1
26049 shift
26050
26051 case $ac_mode in
26052 :L) ac_source=$1;;
26053 :[FH])
26054 ac_file_inputs=
26055 for ac_f
26056 do
26057 case $ac_f in
26058 -) ac_f="$tmp/stdin";;
26059 *) # Look for the file first in the build tree, then in the source tree
26060 # (if the path is not absolute). The absolute path cannot be DOS-style,
26061 # because $ac_f cannot contain `:'.
26062 test -f "$ac_f" ||
26063 case $ac_f in
26064 [\\/$]*) false;;
26065 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
26066 esac ||
26067 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
26068 esac
26069 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
26070 as_fn_append ac_file_inputs " '$ac_f'"
26071 done
26072
26073 # Let's still pretend it is `configure' which instantiates (i.e., don't
26074 # use $as_me), people would be surprised to read:
26075 # /* config.h. Generated by config.status. */
26076 configure_input='Generated from '`
26077 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
26078 `' by configure.'
26079 if test x"$ac_file" != x-; then
26080 configure_input="$ac_file. $configure_input"
26081 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
26082 $as_echo "$as_me: creating $ac_file" >&6;}
26083 fi
26084 # Neutralize special characters interpreted by sed in replacement strings.
26085 case $configure_input in #(
26086 *\&* | *\|* | *\\* )
26087 ac_sed_conf_input=`$as_echo "$configure_input" |
26088 sed 's/[\\\\&|]/\\\\&/g'`;; #(
26089 *) ac_sed_conf_input=$configure_input;;
26090 esac
26091
26092 case $ac_tag in
26093 *:-:* | *:-) cat >"$tmp/stdin" \
26094 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
26095 esac
26096 ;;
26097 esac
26098
26099 ac_dir=`$as_dirname -- "$ac_file" ||
26100 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
26101 X"$ac_file" : 'X\(//\)[^/]' \| \
26102 X"$ac_file" : 'X\(//\)$' \| \
26103 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
26104 $as_echo X"$ac_file" |
26105 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26106 s//\1/
26107 q
26108 }
26109 /^X\(\/\/\)[^/].*/{
26110 s//\1/
26111 q
26112 }
26113 /^X\(\/\/\)$/{
26114 s//\1/
26115 q
26116 }
26117 /^X\(\/\).*/{
26118 s//\1/
26119 q
26120 }
26121 s/.*/./; q'`
26122 as_dir="$ac_dir"; as_fn_mkdir_p
26123 ac_builddir=.
26124
26125 case "$ac_dir" in
26126 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
26127 *)
26128 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
26129 # A ".." for each directory in $ac_dir_suffix.
26130 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
26131 case $ac_top_builddir_sub in
26132 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
26133 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
26134 esac ;;
26135 esac
26136 ac_abs_top_builddir=$ac_pwd
26137 ac_abs_builddir=$ac_pwd$ac_dir_suffix
26138 # for backward compatibility:
26139 ac_top_builddir=$ac_top_build_prefix
26140
26141 case $srcdir in
26142 .) # We are building in place.
26143 ac_srcdir=.
26144 ac_top_srcdir=$ac_top_builddir_sub
26145 ac_abs_top_srcdir=$ac_pwd ;;
26146 [\\/]* | ?:[\\/]* ) # Absolute name.
26147 ac_srcdir=$srcdir$ac_dir_suffix;
26148 ac_top_srcdir=$srcdir
26149 ac_abs_top_srcdir=$srcdir ;;
26150 *) # Relative name.
26151 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
26152 ac_top_srcdir=$ac_top_build_prefix$srcdir
26153 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
26154 esac
26155 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
26156
26157
26158 case $ac_mode in
26159 :F)
26160 #
26161 # CONFIG_FILE
26162 #
26163
26164 case $INSTALL in
26165 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
26166 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
26167 esac
26168 ac_MKDIR_P=$MKDIR_P
26169 case $MKDIR_P in
26170 [\\/$]* | ?:[\\/]* ) ;;
26171 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
26172 esac
26173 _ACEOF
26174
26175 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26176 # If the template does not know about datarootdir, expand it.
26177 # FIXME: This hack should be removed a few years after 2.60.
26178 ac_datarootdir_hack=; ac_datarootdir_seen=
26179 ac_sed_dataroot='
26180 /datarootdir/ {
26181 p
26182 q
26183 }
26184 /@datadir@/p
26185 /@docdir@/p
26186 /@infodir@/p
26187 /@localedir@/p
26188 /@mandir@/p'
26189 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
26190 *datarootdir*) ac_datarootdir_seen=yes;;
26191 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
26192 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
26193 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
26194 _ACEOF
26195 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26196 ac_datarootdir_hack='
26197 s&@datadir@&$datadir&g
26198 s&@docdir@&$docdir&g
26199 s&@infodir@&$infodir&g
26200 s&@localedir@&$localedir&g
26201 s&@mandir@&$mandir&g
26202 s&\\\${datarootdir}&$datarootdir&g' ;;
26203 esac
26204 _ACEOF
26205
26206 # Neutralize VPATH when `$srcdir' = `.'.
26207 # Shell code in configure.ac might set extrasub.
26208 # FIXME: do we really want to maintain this feature?
26209 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26210 ac_sed_extra="$ac_vpsub
26211 $extrasub
26212 _ACEOF
26213 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26214 :t
26215 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
26216 s|@configure_input@|$ac_sed_conf_input|;t t
26217 s&@top_builddir@&$ac_top_builddir_sub&;t t
26218 s&@top_build_prefix@&$ac_top_build_prefix&;t t
26219 s&@srcdir@&$ac_srcdir&;t t
26220 s&@abs_srcdir@&$ac_abs_srcdir&;t t
26221 s&@top_srcdir@&$ac_top_srcdir&;t t
26222 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
26223 s&@builddir@&$ac_builddir&;t t
26224 s&@abs_builddir@&$ac_abs_builddir&;t t
26225 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
26226 s&@INSTALL@&$ac_INSTALL&;t t
26227 s&@MKDIR_P@&$ac_MKDIR_P&;t t
26228 $ac_datarootdir_hack
26229 "
26230 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
26231 if $ac_cs_awk_getline; then
26232 $AWK -f "$tmp/subs.awk"
26233 else
26234 $AWK -f "$tmp/subs.awk" | $SHELL
26235 fi >$tmp/out \
26236 || as_fn_error "could not create $ac_file" "$LINENO" 5
26237
26238 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
26239 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
26240 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
26241 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
26242 which seems to be undefined. Please make sure it is defined." >&5
26243 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
26244 which seems to be undefined. Please make sure it is defined." >&2;}
26245
26246 rm -f "$tmp/stdin"
26247 case $ac_file in
26248 -) cat "$tmp/out" && rm -f "$tmp/out";;
26249 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
26250 esac \
26251 || as_fn_error "could not create $ac_file" "$LINENO" 5
26252 ;;
26253 :H)
26254 #
26255 # CONFIG_HEADER
26256 #
26257 if test x"$ac_file" != x-; then
26258 {
26259 $as_echo "/* $configure_input */" \
26260 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
26261 } >"$tmp/config.h" \
26262 || as_fn_error "could not create $ac_file" "$LINENO" 5
26263 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
26264 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
26265 $as_echo "$as_me: $ac_file is unchanged" >&6;}
26266 else
26267 rm -f "$ac_file"
26268 mv "$tmp/config.h" "$ac_file" \
26269 || as_fn_error "could not create $ac_file" "$LINENO" 5
26270 fi
26271 else
26272 $as_echo "/* $configure_input */" \
26273 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
26274 || as_fn_error "could not create -" "$LINENO" 5
26275 fi
26276 # Compute "$ac_file"'s index in $config_headers.
26277 _am_arg="$ac_file"
26278 _am_stamp_count=1
26279 for _am_header in $config_headers :; do
26280 case $_am_header in
26281 $_am_arg | $_am_arg:* )
26282 break ;;
26283 * )
26284 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
26285 esac
26286 done
26287 echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
26288 $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
26289 X"$_am_arg" : 'X\(//\)[^/]' \| \
26290 X"$_am_arg" : 'X\(//\)$' \| \
26291 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
26292 $as_echo X"$_am_arg" |
26293 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26294 s//\1/
26295 q
26296 }
26297 /^X\(\/\/\)[^/].*/{
26298 s//\1/
26299 q
26300 }
26301 /^X\(\/\/\)$/{
26302 s//\1/
26303 q
26304 }
26305 /^X\(\/\).*/{
26306 s//\1/
26307 q
26308 }
26309 s/.*/./; q'`/stamp-h$_am_stamp_count
26310 ;;
26311
26312 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
26313 $as_echo "$as_me: executing $ac_file commands" >&6;}
26314 ;;
26315 esac
26316
26317
26318 case $ac_file$ac_mode in
26319 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
26320 # Autoconf 2.62 quotes --file arguments for eval, but not when files
26321 # are listed without --file. Let's play safe and only enable the eval
26322 # if we detect the quoting.
26323 case $CONFIG_FILES in
26324 *\'*) eval set x "$CONFIG_FILES" ;;
26325 *) set x $CONFIG_FILES ;;
26326 esac
26327 shift
26328 for mf
26329 do
26330 # Strip MF so we end up with the name of the file.
26331 mf=`echo "$mf" | sed -e 's/:.*$//'`
26332 # Check whether this is an Automake generated Makefile or not.
26333 # We used to match only the files named `Makefile.in', but
26334 # some people rename them; so instead we look at the file content.
26335 # Grep'ing the first line is not enough: some people post-process
26336 # each Makefile.in and add a new line on top of each file to say so.
26337 # Grep'ing the whole file is not good either: AIX grep has a line
26338 # limit of 2048, but all sed's we know have understand at least 4000.
26339 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
26340 dirpart=`$as_dirname -- "$mf" ||
26341 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
26342 X"$mf" : 'X\(//\)[^/]' \| \
26343 X"$mf" : 'X\(//\)$' \| \
26344 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
26345 $as_echo X"$mf" |
26346 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26347 s//\1/
26348 q
26349 }
26350 /^X\(\/\/\)[^/].*/{
26351 s//\1/
26352 q
26353 }
26354 /^X\(\/\/\)$/{
26355 s//\1/
26356 q
26357 }
26358 /^X\(\/\).*/{
26359 s//\1/
26360 q
26361 }
26362 s/.*/./; q'`
26363 else
26364 continue
26365 fi
26366 # Extract the definition of DEPDIR, am__include, and am__quote
26367 # from the Makefile without running `make'.
26368 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
26369 test -z "$DEPDIR" && continue
26370 am__include=`sed -n 's/^am__include = //p' < "$mf"`
26371 test -z "am__include" && continue
26372 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
26373 # When using ansi2knr, U may be empty or an underscore; expand it
26374 U=`sed -n 's/^U = //p' < "$mf"`
26375 # Find all dependency output files, they are included files with
26376 # $(DEPDIR) in their names. We invoke sed twice because it is the
26377 # simplest approach to changing $(DEPDIR) to its actual value in the
26378 # expansion.
26379 for file in `sed -n "
26380 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
26381 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
26382 # Make sure the directory exists.
26383 test -f "$dirpart/$file" && continue
26384 fdir=`$as_dirname -- "$file" ||
26385 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
26386 X"$file" : 'X\(//\)[^/]' \| \
26387 X"$file" : 'X\(//\)$' \| \
26388 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
26389 $as_echo X"$file" |
26390 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26391 s//\1/
26392 q
26393 }
26394 /^X\(\/\/\)[^/].*/{
26395 s//\1/
26396 q
26397 }
26398 /^X\(\/\/\)$/{
26399 s//\1/
26400 q
26401 }
26402 /^X\(\/\).*/{
26403 s//\1/
26404 q
26405 }
26406 s/.*/./; q'`
26407 as_dir=$dirpart/$fdir; as_fn_mkdir_p
26408 # echo "creating $dirpart/$file"
26409 echo '# dummy' > "$dirpart/$file"
26410 done
26411 done
26412 }
26413 ;;
26414 "mkdirs":C)
26415 for dir in etc lisp ; do
26416 test -d ${dir} || mkdir ${dir}
26417 done
26418 ;;
26419 "epaths":C)
26420 echo creating src/epaths.h
26421 ${MAKE-make} MAKEFILE_NAME=do-not-make-Makefile epaths-force
26422 ;;
26423 "gdbinit":C)
26424 if test ! -f src/.gdbinit && test -f $srcdir/src/.gdbinit; then
26425 echo creating src/.gdbinit
26426 echo source $srcdir/src/.gdbinit > src/.gdbinit
26427 fi
26428 ;;
26429
26430 esac
26431 done # for ac_tag
26432
26433
26434 as_fn_exit 0
26435 _ACEOF
26436 ac_clean_files=$ac_clean_files_save
26437
26438 test $ac_write_fail = 0 ||
26439 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
26440
26441
26442 # configure is writing to config.log, and then calls config.status.
26443 # config.status does its own redirection, appending to config.log.
26444 # Unfortunately, on DOS this fails, as config.log is still kept open
26445 # by configure, so config.status won't be able to write to it; its
26446 # output is simply discarded. So we exec the FD to /dev/null,
26447 # effectively closing config.log, so it can be properly (re)opened and
26448 # appended to by config.status. When coming back to configure, we
26449 # need to make the FD available again.
26450 if test "$no_create" != yes; then
26451 ac_cs_success=:
26452 ac_config_status_args=
26453 test "$silent" = yes &&
26454 ac_config_status_args="$ac_config_status_args --quiet"
26455 exec 5>/dev/null
26456 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
26457 exec 5>>config.log
26458 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
26459 # would make configure fail if this is the last instruction.
26460 $ac_cs_success || as_fn_exit $?
26461 fi
26462 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
26463 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
26464 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
26465 fi
26466