Auto-commit of generated files.
[bpt/emacs.git] / autogen / configure
CommitLineData
067d23c9
KY
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
c574bc34 3# Generated by GNU Autoconf 2.65 for emacs 24.3.50.
067d23c9
KY
4#
5#
6# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
a9bec17c
GM
7# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
8# Inc.
067d23c9
KY
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
18DUALCASE=1; export DUALCASE # for MKS sh
19if 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
26else
27 case `(set -o) 2>/dev/null` in #(
28 *posix*) :
29 set -o posix ;; #(
30 *) :
31 ;;
32esac
33fi
34
35
36as_nl='
37'
38export as_nl
39# Printing a long string crashes Solaris 7 /usr/bin/printf.
40as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42as_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.
45if 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 --'
49elif (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'
52else
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'
72fi
73
74# The user is always right.
75if 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 }
81fi
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.)
89IFS=" "" $as_nl"
90
91# Find who we are. Look in the path if we contain no directory separator.
92case $0 in #((
93 *[\\/]* ) as_myself=$0 ;;
94 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
95for as_dir in $PATH
96do
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
101IFS=$as_save_IFS
102
103 ;;
104esac
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.
107if test "x$as_myself" = x; then
108 as_myself=$0
109fi
110if test ! -f "$as_myself"; then
111 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
112 exit 1
113fi
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.
119for as_var in BASH_ENV ENV MAIL MAILPATH
120do eval test x\${$as_var+set} = xset \
121 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
122done
123PS1='$ '
124PS2='> '
125PS4='+ '
126
127# NLS nuisances.
128LC_ALL=C
129export LC_ALL
130LANGUAGE=C
131export LANGUAGE
132
133# CDPATH.
134(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
135
136if 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
144else
145 case \`(set -o) 2>/dev/null\` in #(
146 *posix*) :
147 set -o posix ;; #(
148 *) :
149 ;;
150esac
151fi
152"
153 as_required="as_fn_return () { (exit \$1); }
154as_fn_success () { as_fn_return 0; }
155as_fn_failure () { as_fn_return 1; }
156as_fn_ret_success () { return 0; }
157as_fn_ret_failure () { return 1; }
158
159exitcode=0
160as_fn_success || { exitcode=1; echo as_fn_success failed.; }
161as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
162as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
163as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
164if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
165
166else
167 exitcode=1; echo positional parameters were not saved.
168fi
169test 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
174test \$(( 1 + 1 )) = 2 || exit 1"
175 if (eval "$as_required") 2>/dev/null; then :
176 as_have_required=yes
177else
178 as_have_required=no
179fi
180 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
181
182else
183 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
184as_found=false
185for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
186do
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
200fi
201fi
202 done;;
203 esac
204 as_found=false
205done
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
209fi; }
210IFS=$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
a9bec17c 221 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
067d23c9
KY
222fi
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
237fi
238fi
239fi
240SHELL=${CONFIG_SHELL-/bin/sh}
241export SHELL
242# Unset more variables known to interfere with behavior of common tools.
243CLICOLOR_FORCE= GREP_OPTIONS=
244unset CLICOLOR_FORCE GREP_OPTIONS
245
246## --------------------- ##
247## M4sh Shell Functions. ##
248## --------------------- ##
249# as_fn_unset VAR
250# ---------------
251# Portably unset VAR.
252as_fn_unset ()
253{
254 { eval $1=; unset $1;}
255}
256as_unset=as_fn_unset
257
258# as_fn_set_status STATUS
259# -----------------------
260# Set $? to STATUS, without forking.
261as_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.
269as_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.
279as_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"
a9bec17c 319 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
067d23c9
KY
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.
329if (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 }'
334else
335 as_fn_append ()
336 {
337 eval $1=\$$1\$2
338 }
339fi # 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.
346if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
347 eval 'as_fn_arith ()
348 {
349 as_val=$(( $* ))
350 }'
351else
352 as_fn_arith ()
353 {
354 as_val=`expr "$@" || test $? -eq 1`
355 }
356fi # as_fn_arith
357
358
a9bec17c
GM
359# as_fn_error ERROR [LINENO LOG_FD]
360# ---------------------------------
067d23c9
KY
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
a9bec17c 363# script with status $?, using 1 if that was 0.
067d23c9
KY
364as_fn_error ()
365{
a9bec17c
GM
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
067d23c9 370 fi
a9bec17c 371 $as_echo "$as_me: error: $1" >&2
067d23c9
KY
372 as_fn_exit $as_status
373} # as_fn_error
374
375if expr a : '\(a\)' >/dev/null 2>&1 &&
376 test "X`expr 00001 : '.*\(...\)'`" = X001; then
377 as_expr=expr
378else
379 as_expr=false
380fi
381
382if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
383 as_basename=basename
384else
385 as_basename=false
386fi
387
388if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
389 as_dirname=dirname
390else
391 as_dirname=false
392fi
393
394as_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.
414as_cr_letters='abcdefghijklmnopqrstuvwxyz'
415as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
416as_cr_Letters=$as_cr_letters$as_cr_LETTERS
417as_cr_digits='0123456789'
418as_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
452ECHO_C= ECHO_N= ECHO_T=
453case `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';;
463esac
464
465rm -f conf$$ conf$$.exe conf$$.file
466if test -d conf$$.dir; then
467 rm -f conf$$.dir/conf$$.file
468else
469 rm -f conf$$.dir
470 mkdir conf$$.dir 2>/dev/null
471fi
472if (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
486else
487 as_ln_s='cp -p'
488fi
489rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
490rmdir conf$$.dir 2>/dev/null
491
492if mkdir -p . 2>/dev/null; then
493 as_mkdir_p='mkdir -p "$as_dir"'
494else
495 test -d ./-p && rmdir ./-p
496 as_mkdir_p=false
497fi
498
499if test -x / >/dev/null 2>&1; then
500 as_test_x='test -x'
501else
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 '
519fi
520as_executable_p=$as_test_x
521
522# Sed expression to map a string onto a valid CPP name.
523as_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.
526as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
527
528
529test -n "$DJDIR" || exec 7<&0 </dev/null
530exec 6>&1
531
532# Name of the host.
a9bec17c 533# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
067d23c9
KY
534# so uname gets run too.
535ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
536
537#
538# Initializations.
539#
540ac_default_prefix=/usr/local
541ac_clean_files=
542ac_config_libobj_dir=.
543LIBOBJS=
544cross_compiling=no
545subdirs=
546MFLAGS=
547MAKEFLAGS=
548
549# Identity of this package.
550PACKAGE_NAME='emacs'
551PACKAGE_TARNAME='emacs'
c574bc34
GM
552PACKAGE_VERSION='24.3.50'
553PACKAGE_STRING='emacs 24.3.50'
067d23c9
KY
554PACKAGE_BUGREPORT=''
555PACKAGE_URL=''
556
557ac_unique_file="src/lisp.h"
558# Factoring default headers for most tests.
559ac_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
f199cab1 594ac_header_list=
5476a9a4 595ac_func_list=
e275c824 596gl_getopt_required=POSIX
7e723570 597gl_getopt_required=POSIX
743c80a7
PE
598ac_subst_vars='gltests_LTLIBOBJS
599gltests_LIBOBJS
600gl_LTLIBOBJS
601gl_LIBOBJS
602am__EXEEXT_FALSE
603am__EXEEXT_TRUE
604LTLIBOBJS
1f5d53eb 605LIBOBJS
73b78882 606SUBDIR_MAKEFILES_IN
42dcba54 607WINDOW_SYSTEM_OBJ
067d23c9 608LD_SWITCH_SYSTEM_TEMACS
743c80a7
PE
609LIBGNU_LTLIBDEPS
610LIBGNU_LIBDEPS
611gltests_WITNESS
710f5812
GM
612gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_FALSE
613gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_TRUE
6d153f56
GM
614gl_GNULIB_ENABLED_verify_FALSE
615gl_GNULIB_ENABLED_verify_TRUE
616gl_GNULIB_ENABLED_strtoull_FALSE
617gl_GNULIB_ENABLED_strtoull_TRUE
3e0be4ab
GM
618gl_GNULIB_ENABLED_strtoll_FALSE
619gl_GNULIB_ENABLED_strtoll_TRUE
6d153f56
GM
620gl_GNULIB_ENABLED_stat_FALSE
621gl_GNULIB_ENABLED_stat_TRUE
710f5812
GM
622gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_FALSE
623gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_TRUE
a0a61e58
GM
624gl_GNULIB_ENABLED_pathmax_FALSE
625gl_GNULIB_ENABLED_pathmax_TRUE
d7ad186c
GM
626gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_FALSE
627gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_TRUE
710f5812
GM
628gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_FALSE
629gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_TRUE
6d153f56
GM
630gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE
631gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE
710f5812
GM
632gl_GNULIB_ENABLED_getgroups_FALSE
633gl_GNULIB_ENABLED_getgroups_TRUE
634gl_GNULIB_ENABLED_euidaccess_FALSE
635gl_GNULIB_ENABLED_euidaccess_TRUE
6d153f56
GM
636gl_GNULIB_ENABLED_dosname_FALSE
637gl_GNULIB_ENABLED_dosname_TRUE
d7ad186c
GM
638gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_FALSE
639gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_TRUE
6d153f56
GM
640LTLIBINTL
641LIBINTL
710f5812 642LIB_EACCESS
f199cab1 643WINDOWS_64_BIT_OFF_T
e275c824
PE
644HAVE_UNISTD_H
645NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
646NEXT_UNISTD_H
f077f61d 647LIB_TIMER_TIME
1fd182f0
PE
648PTHREAD_H_DEFINES_STRUCT_TIMESPEC
649SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
650TIME_H_DEFINES_STRUCT_TIMESPEC
651NEXT_AS_FIRST_DIRECTIVE_TIME_H
652NEXT_TIME_H
0eb775a3 653WINDOWS_64_BIT_ST_SIZE
5fa4ac76
PE
654NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
655NEXT_SYS_STAT_H
283c7aed
GM
656NEXT_AS_FIRST_DIRECTIVE_STRING_H
657NEXT_STRING_H
1f5d53eb
PE
658NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
659NEXT_STDLIB_H
6ad6792b
GM
660NEXT_AS_FIRST_DIRECTIVE_STDIO_H
661NEXT_STDIO_H
662REPLACE_VSPRINTF
663REPLACE_VSNPRINTF
664REPLACE_VPRINTF
665REPLACE_VFPRINTF
666REPLACE_VDPRINTF
667REPLACE_VASPRINTF
668REPLACE_TMPFILE
669REPLACE_STDIO_WRITE_FUNCS
ca36e0ff 670REPLACE_STDIO_READ_FUNCS
6ad6792b
GM
671REPLACE_SPRINTF
672REPLACE_SNPRINTF
673REPLACE_RENAMEAT
674REPLACE_RENAME
675REPLACE_REMOVE
676REPLACE_PRINTF
677REPLACE_POPEN
678REPLACE_PERROR
679REPLACE_OBSTACK_PRINTF
680REPLACE_GETLINE
681REPLACE_GETDELIM
682REPLACE_FTELLO
683REPLACE_FTELL
684REPLACE_FSEEKO
685REPLACE_FSEEK
686REPLACE_FREOPEN
687REPLACE_FPURGE
688REPLACE_FPRINTF
689REPLACE_FOPEN
690REPLACE_FFLUSH
2b1928b8 691REPLACE_FDOPEN
6ad6792b
GM
692REPLACE_FCLOSE
693REPLACE_DPRINTF
694HAVE_VDPRINTF
695HAVE_VASPRINTF
696HAVE_RENAMEAT
2b1928b8
GM
697HAVE_POPEN
698HAVE_PCLOSE
6ad6792b
GM
699HAVE_FTELLO
700HAVE_FSEEKO
701HAVE_DPRINTF
702HAVE_DECL_VSNPRINTF
703HAVE_DECL_SNPRINTF
704HAVE_DECL_OBSTACK_PRINTF
705HAVE_DECL_GETLINE
706HAVE_DECL_GETDELIM
707HAVE_DECL_FTELLO
708HAVE_DECL_FSEEKO
709HAVE_DECL_FPURGE
710GNULIB_VSPRINTF_POSIX
711GNULIB_VSNPRINTF
712GNULIB_VPRINTF_POSIX
713GNULIB_VPRINTF
714GNULIB_VFPRINTF_POSIX
715GNULIB_VFPRINTF
716GNULIB_VDPRINTF
ca36e0ff
GM
717GNULIB_VSCANF
718GNULIB_VFSCANF
6ad6792b
GM
719GNULIB_VASPRINTF
720GNULIB_TMPFILE
721GNULIB_STDIO_H_SIGPIPE
ca36e0ff 722GNULIB_STDIO_H_NONBLOCKING
6ad6792b
GM
723GNULIB_SPRINTF_POSIX
724GNULIB_SNPRINTF
ca36e0ff 725GNULIB_SCANF
6ad6792b
GM
726GNULIB_RENAMEAT
727GNULIB_RENAME
728GNULIB_REMOVE
729GNULIB_PUTS
730GNULIB_PUTCHAR
731GNULIB_PUTC
732GNULIB_PRINTF_POSIX
733GNULIB_PRINTF
734GNULIB_POPEN
735GNULIB_PERROR
2b1928b8 736GNULIB_PCLOSE
6ad6792b
GM
737GNULIB_OBSTACK_PRINTF_POSIX
738GNULIB_OBSTACK_PRINTF
739GNULIB_GETLINE
740GNULIB_GETDELIM
ca36e0ff
GM
741GNULIB_GETCHAR
742GNULIB_GETC
6ad6792b
GM
743GNULIB_FWRITE
744GNULIB_FTELLO
745GNULIB_FTELL
746GNULIB_FSEEKO
747GNULIB_FSEEK
ca36e0ff 748GNULIB_FSCANF
6ad6792b 749GNULIB_FREOPEN
ca36e0ff 750GNULIB_FREAD
6ad6792b
GM
751GNULIB_FPUTS
752GNULIB_FPUTC
753GNULIB_FPURGE
754GNULIB_FPRINTF_POSIX
755GNULIB_FPRINTF
756GNULIB_FOPEN
ca36e0ff
GM
757GNULIB_FGETS
758GNULIB_FGETC
6ad6792b 759GNULIB_FFLUSH
2b1928b8 760GNULIB_FDOPEN
6ad6792b
GM
761GNULIB_FCLOSE
762GNULIB_DPRINTF
1fd182f0
PE
763NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
764NEXT_STDDEF_H
6c051bab
GM
765GL_GENERATE_STDDEF_H_FALSE
766GL_GENERATE_STDDEF_H_TRUE
1fd182f0
PE
767STDDEF_H
768HAVE_WCHAR_T
769REPLACE_NULL
16c3e636 770HAVE__BOOL
6c051bab
GM
771GL_GENERATE_STDBOOL_H_FALSE
772GL_GENERATE_STDBOOL_H_TRUE
16c3e636 773STDBOOL_H
6d153f56
GM
774GL_GENERATE_STDARG_H_FALSE
775GL_GENERATE_STDARG_H_TRUE
776STDARG_H
777NEXT_AS_FIRST_DIRECTIVE_STDARG_H
778NEXT_STDARG_H
0eb775a3
GM
779GL_GENERATE_STDALIGN_H_FALSE
780GL_GENERATE_STDALIGN_H_TRUE
781STDALIGN_H
3e0be4ab
GM
782NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H
783NEXT_SIGNAL_H
3a019ab4
GM
784USE_ACL
785LIB_ACL
0eb775a3 786LIB_PTHREAD_SIGMASK
2b1928b8 787REPLACE_RAISE
3e0be4ab
GM
788REPLACE_PTHREAD_SIGMASK
789HAVE_SIGHANDLER_T
790HAVE_TYPE_VOLATILE_SIG_ATOMIC_T
791HAVE_STRUCT_SIGACTION_SA_SIGACTION
792HAVE_SIGACTION
793HAVE_SIGINFO_T
794HAVE_SIGSET_T
2b1928b8 795HAVE_RAISE
3e0be4ab
GM
796HAVE_PTHREAD_SIGMASK
797HAVE_POSIX_SIGNALBLOCKING
798GNULIB_SIGACTION
799GNULIB_SIGPROCMASK
800GNULIB_SIGNAL_H_SIGPIPE
2b1928b8 801GNULIB_RAISE
3e0be4ab 802GNULIB_PTHREAD_SIGMASK
f199cab1
GM
803HAVE_SYS_SELECT_H
804NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H
805NEXT_SYS_SELECT_H
806REPLACE_SELECT
807REPLACE_PSELECT
808HAVE_PSELECT
809GNULIB_SELECT
810GNULIB_PSELECT
1fd182f0
PE
811REPLACE_TIMEGM
812REPLACE_NANOSLEEP
813REPLACE_MKTIME
814REPLACE_LOCALTIME_R
815HAVE_TIMEGM
816HAVE_STRPTIME
817HAVE_NANOSLEEP
818HAVE_DECL_LOCALTIME_R
819GNULIB_TIME_R
820GNULIB_TIMEGM
821GNULIB_STRPTIME
822GNULIB_NANOSLEEP
823GNULIB_MKTIME
283c7aed
GM
824UNDEFINE_STRTOK_R
825REPLACE_STRTOK_R
826REPLACE_STRSIGNAL
827REPLACE_STRNLEN
828REPLACE_STRNDUP
829REPLACE_STRNCAT
830REPLACE_STRERROR_R
831REPLACE_STRERROR
832REPLACE_STRCHRNUL
833REPLACE_STRCASESTR
834REPLACE_STRSTR
835REPLACE_STRDUP
836REPLACE_STPNCPY
837REPLACE_MEMMEM
838REPLACE_MEMCHR
839HAVE_STRVERSCMP
840HAVE_DECL_STRSIGNAL
841HAVE_DECL_STRERROR_R
842HAVE_DECL_STRTOK_R
843HAVE_STRCASESTR
844HAVE_STRSEP
845HAVE_STRPBRK
846HAVE_DECL_STRNLEN
847HAVE_DECL_STRNDUP
848HAVE_DECL_STRDUP
849HAVE_STRCHRNUL
850HAVE_STPNCPY
851HAVE_STPCPY
852HAVE_RAWMEMCHR
853HAVE_DECL_MEMRCHR
854HAVE_MEMPCPY
855HAVE_DECL_MEMMEM
856HAVE_MEMCHR
857HAVE_FFSLL
858HAVE_FFSL
859HAVE_MBSLEN
860GNULIB_STRVERSCMP
861GNULIB_STRSIGNAL
862GNULIB_STRERROR_R
863GNULIB_STRERROR
864GNULIB_MBSTOK_R
865GNULIB_MBSSEP
866GNULIB_MBSSPN
867GNULIB_MBSPBRK
868GNULIB_MBSCSPN
869GNULIB_MBSCASESTR
870GNULIB_MBSPCASECMP
871GNULIB_MBSNCASECMP
872GNULIB_MBSCASECMP
873GNULIB_MBSSTR
874GNULIB_MBSRCHR
875GNULIB_MBSCHR
876GNULIB_MBSNLEN
877GNULIB_MBSLEN
878GNULIB_STRTOK_R
879GNULIB_STRCASESTR
880GNULIB_STRSTR
881GNULIB_STRSEP
882GNULIB_STRPBRK
883GNULIB_STRNLEN
884GNULIB_STRNDUP
885GNULIB_STRNCAT
886GNULIB_STRDUP
887GNULIB_STRCHRNUL
888GNULIB_STPNCPY
889GNULIB_STPCPY
890GNULIB_RAWMEMCHR
891GNULIB_MEMRCHR
892GNULIB_MEMPCPY
893GNULIB_MEMMEM
894GNULIB_MEMCHR
895GNULIB_FFSLL
896GNULIB_FFSL
4fda9c95
GM
897NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H
898NEXT_INTTYPES_H
899UINT64_MAX_EQ_ULONG_MAX
900UINT32_MAX_LT_UINTMAX_MAX
901PRIPTR_PREFIX
902PRI_MACROS_BROKEN
903INT64_MAX_EQ_LONG_MAX
904INT32_MAX_LT_INTMAX_MAX
0eb775a3 905REPLACE_STRTOIMAX
4fda9c95
GM
906HAVE_DECL_STRTOUMAX
907HAVE_DECL_STRTOIMAX
908HAVE_DECL_IMAXDIV
909HAVE_DECL_IMAXABS
910GNULIB_STRTOUMAX
911GNULIB_STRTOIMAX
912GNULIB_IMAXDIV
913GNULIB_IMAXABS
914GL_GENERATE_STDINT_H_FALSE
915GL_GENERATE_STDINT_H_TRUE
916STDINT_H
917WINT_T_SUFFIX
918WCHAR_T_SUFFIX
919SIG_ATOMIC_T_SUFFIX
920SIZE_T_SUFFIX
921PTRDIFF_T_SUFFIX
922HAVE_SIGNED_WINT_T
923HAVE_SIGNED_WCHAR_T
924HAVE_SIGNED_SIG_ATOMIC_T
925BITSIZEOF_WINT_T
926BITSIZEOF_WCHAR_T
927BITSIZEOF_SIG_ATOMIC_T
928BITSIZEOF_SIZE_T
929BITSIZEOF_PTRDIFF_T
930APPLE_UNIVERSAL_BUILD
931HAVE_SYS_BITYPES_H
932HAVE_SYS_INTTYPES_H
933HAVE_STDINT_H
934NEXT_AS_FIRST_DIRECTIVE_STDINT_H
935NEXT_STDINT_H
936HAVE_SYS_TYPES_H
937HAVE_INTTYPES_H
938HAVE_WCHAR_H
939HAVE_UNSIGNED_LONG_LONG_INT
940HAVE_LONG_LONG_INT
f199cab1
GM
941HAVE_WINSOCK2_H
942NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
943NEXT_SYS_TIME_H
944REPLACE_STRUCT_TIMEVAL
945REPLACE_GETTIMEOFDAY
946HAVE_SYS_TIME_H
947HAVE_STRUCT_TIMEVAL
948HAVE_GETTIMEOFDAY
949GNULIB_GETTIMEOFDAY
0eb775a3 950GNULIB_GL_UNISTD_H_GETOPT
e275c824
PE
951GETOPT_H
952HAVE_GETOPT_H
953NEXT_AS_FIRST_DIRECTIVE_GETOPT_H
954NEXT_GETOPT_H
7d2a1c5e
GM
955GETLOADAVG_LIBS
956REPLACE_WCTOMB
957REPLACE_UNSETENV
958REPLACE_STRTOD
959REPLACE_SETENV
960REPLACE_REALPATH
961REPLACE_REALLOC
0eb775a3 962REPLACE_RANDOM_R
7d2a1c5e 963REPLACE_PUTENV
0eb775a3 964REPLACE_PTSNAME_R
b6c9d18d 965REPLACE_PTSNAME
7d2a1c5e
GM
966REPLACE_MKSTEMP
967REPLACE_MBTOWC
968REPLACE_MALLOC
969REPLACE_CANONICALIZE_FILE_NAME
970REPLACE_CALLOC
971HAVE_DECL_UNSETENV
972HAVE_UNLOCKPT
973HAVE_SYS_LOADAVG_H
974HAVE_STRUCT_RANDOM_DATA
975HAVE_STRTOULL
976HAVE_STRTOLL
977HAVE_STRTOD
978HAVE_DECL_SETENV
979HAVE_SETENV
2cdd55fc 980HAVE_SECURE_GETENV
7d2a1c5e
GM
981HAVE_RPMATCH
982HAVE_REALPATH
983HAVE_RANDOM_R
984HAVE_RANDOM_H
0eb775a3
GM
985HAVE_RANDOM
986HAVE_PTSNAME_R
7d2a1c5e 987HAVE_PTSNAME
0eb775a3 988HAVE_POSIX_OPENPT
7d2a1c5e
GM
989HAVE_MKSTEMPS
990HAVE_MKSTEMP
991HAVE_MKOSTEMPS
992HAVE_MKOSTEMP
993HAVE_MKDTEMP
994HAVE_GRANTPT
995HAVE_GETSUBOPT
996HAVE_DECL_GETLOADAVG
997HAVE_CANONICALIZE_FILE_NAME
998HAVE_ATOLL
999HAVE__EXIT
1000GNULIB_WCTOMB
1001GNULIB_UNSETENV
1002GNULIB_UNLOCKPT
1003GNULIB_SYSTEM_POSIX
1004GNULIB_STRTOULL
1005GNULIB_STRTOLL
1006GNULIB_STRTOD
1007GNULIB_SETENV
2cdd55fc 1008GNULIB_SECURE_GETENV
7d2a1c5e
GM
1009GNULIB_RPMATCH
1010GNULIB_REALPATH
1011GNULIB_REALLOC_POSIX
1012GNULIB_RANDOM_R
0eb775a3 1013GNULIB_RANDOM
7d2a1c5e 1014GNULIB_PUTENV
0eb775a3 1015GNULIB_PTSNAME_R
7d2a1c5e 1016GNULIB_PTSNAME
0eb775a3 1017GNULIB_POSIX_OPENPT
7d2a1c5e
GM
1018GNULIB_MKSTEMPS
1019GNULIB_MKSTEMP
1020GNULIB_MKOSTEMPS
1021GNULIB_MKOSTEMP
1022GNULIB_MKDTEMP
1023GNULIB_MBTOWC
1024GNULIB_MALLOC_POSIX
1025GNULIB_GRANTPT
1026GNULIB_GETSUBOPT
1027GNULIB_GETLOADAVG
1028GNULIB_CANONICALIZE_FILE_NAME
1029GNULIB_CALLOC_POSIX
1030GNULIB_ATOLL
1031GNULIB__EXIT
d7ad186c
GM
1032REPLACE_UTIMENSAT
1033REPLACE_STAT
1034REPLACE_MKNOD
1035REPLACE_MKFIFO
1036REPLACE_MKDIR
1037REPLACE_LSTAT
1038REPLACE_FUTIMENS
1039REPLACE_FSTATAT
1040REPLACE_FSTAT
1041HAVE_UTIMENSAT
1042HAVE_MKNODAT
1043HAVE_MKNOD
1044HAVE_MKFIFOAT
1045HAVE_MKFIFO
1046HAVE_MKDIRAT
1047HAVE_LSTAT
1048HAVE_LCHMOD
1049HAVE_FUTIMENS
1050HAVE_FSTATAT
1051HAVE_FCHMODAT
1052GNULIB_UTIMENSAT
1053GNULIB_STAT
1054GNULIB_MKNODAT
1055GNULIB_MKNOD
1056GNULIB_MKFIFOAT
1057GNULIB_MKFIFO
1058GNULIB_MKDIRAT
1059GNULIB_LSTAT
1060GNULIB_LCHMOD
1061GNULIB_FUTIMENS
1062GNULIB_FSTATAT
1063GNULIB_FSTAT
1064GNULIB_FCHMODAT
2407788f 1065LIB_FDATASYNC
710f5812
GM
1066NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
1067NEXT_FCNTL_H
710f5812
GM
1068REPLACE_OPENAT
1069REPLACE_OPEN
1070REPLACE_FCNTL
1071HAVE_OPENAT
1072HAVE_FCNTL
1073GNULIB_OPENAT
1074GNULIB_OPEN
1075GNULIB_NONBLOCKING
1076GNULIB_FCNTL
8966cbff
GM
1077GL_GENERATE_EXECINFO_H_FALSE
1078GL_GENERATE_EXECINFO_H_TRUE
1079LIB_EXECINFO
1080EXECINFO_H
3a019ab4
GM
1081EOVERFLOW_VALUE
1082EOVERFLOW_HIDDEN
1083ENOLINK_VALUE
1084ENOLINK_HIDDEN
1085EMULTIHOP_VALUE
1086EMULTIHOP_HIDDEN
1087GL_GENERATE_ERRNO_H_FALSE
1088GL_GENERATE_ERRNO_H_TRUE
1089ERRNO_H
1090NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
1091NEXT_ERRNO_H
d7ad186c
GM
1092HAVE_DIRENT_H
1093NEXT_AS_FIRST_DIRECTIVE_DIRENT_H
1094NEXT_DIRENT_H
1095PRAGMA_COLUMNS
1096PRAGMA_SYSTEM_HEADER
1097INCLUDE_NEXT_AS_FIRST_DIRECTIVE
1098INCLUDE_NEXT
1099REPLACE_FDOPENDIR
1100REPLACE_DIRFD
1101REPLACE_CLOSEDIR
1102REPLACE_OPENDIR
1103HAVE_ALPHASORT
1104HAVE_SCANDIR
1105HAVE_FDOPENDIR
1106HAVE_DECL_FDOPENDIR
1107HAVE_DECL_DIRFD
1108HAVE_CLOSEDIR
1109HAVE_REWINDDIR
1110HAVE_READDIR
1111HAVE_OPENDIR
1112GNULIB_ALPHASORT
1113GNULIB_SCANDIR
1114GNULIB_FDOPENDIR
1115GNULIB_DIRFD
1116GNULIB_CLOSEDIR
1117GNULIB_REWINDDIR
1118GNULIB_READDIR
1119GNULIB_OPENDIR
e275c824
PE
1120UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1121UNISTD_H_HAVE_WINSOCK2_H
1122REPLACE_WRITE
1123REPLACE_USLEEP
1124REPLACE_UNLINKAT
1125REPLACE_UNLINK
1126REPLACE_TTYNAME_R
1127REPLACE_SYMLINK
1128REPLACE_SLEEP
1129REPLACE_RMDIR
1130REPLACE_READLINK
ca36e0ff 1131REPLACE_READ
e275c824
PE
1132REPLACE_PWRITE
1133REPLACE_PREAD
1134REPLACE_LSEEK
1135REPLACE_LINKAT
1136REPLACE_LINK
1137REPLACE_LCHOWN
0eb775a3 1138REPLACE_ISATTY
e275c824
PE
1139REPLACE_GETPAGESIZE
1140REPLACE_GETGROUPS
1141REPLACE_GETLOGIN_R
1142REPLACE_GETDOMAINNAME
1143REPLACE_GETCWD
0eb775a3 1144REPLACE_FTRUNCATE
e275c824
PE
1145REPLACE_FCHOWNAT
1146REPLACE_DUP2
1147REPLACE_DUP
1148REPLACE_CLOSE
1149REPLACE_CHOWN
1150HAVE_SYS_PARAM_H
1151HAVE_OS_H
1152HAVE_DECL_TTYNAME_R
0eb775a3 1153HAVE_DECL_SETHOSTNAME
e275c824
PE
1154HAVE_DECL_GETUSERSHELL
1155HAVE_DECL_GETPAGESIZE
1156HAVE_DECL_GETLOGIN_R
1157HAVE_DECL_GETDOMAINNAME
2b1928b8 1158HAVE_DECL_FDATASYNC
e275c824
PE
1159HAVE_DECL_FCHDIR
1160HAVE_DECL_ENVIRON
1161HAVE_USLEEP
1162HAVE_UNLINKAT
1163HAVE_SYMLINKAT
1164HAVE_SYMLINK
1165HAVE_SLEEP
0eb775a3 1166HAVE_SETHOSTNAME
e275c824
PE
1167HAVE_READLINKAT
1168HAVE_READLINK
1169HAVE_PWRITE
1170HAVE_PREAD
1171HAVE_PIPE2
1172HAVE_PIPE
1173HAVE_LINKAT
1174HAVE_LINK
1175HAVE_LCHOWN
da6c8463 1176HAVE_GROUP_MEMBER
e275c824
PE
1177HAVE_GETPAGESIZE
1178HAVE_GETLOGIN
1179HAVE_GETHOSTNAME
1180HAVE_GETGROUPS
1181HAVE_GETDTABLESIZE
1182HAVE_FTRUNCATE
1183HAVE_FSYNC
2b1928b8 1184HAVE_FDATASYNC
e275c824
PE
1185HAVE_FCHOWNAT
1186HAVE_FCHDIR
1187HAVE_FACCESSAT
1188HAVE_EUIDACCESS
1189HAVE_DUP3
1190HAVE_DUP2
1191HAVE_CHOWN
1192GNULIB_WRITE
1193GNULIB_USLEEP
1194GNULIB_UNLINKAT
1195GNULIB_UNLINK
1196GNULIB_UNISTD_H_SIGPIPE
ca36e0ff 1197GNULIB_UNISTD_H_NONBLOCKING
e275c824
PE
1198GNULIB_TTYNAME_R
1199GNULIB_SYMLINKAT
1200GNULIB_SYMLINK
1201GNULIB_SLEEP
0eb775a3 1202GNULIB_SETHOSTNAME
e275c824
PE
1203GNULIB_RMDIR
1204GNULIB_READLINKAT
1205GNULIB_READLINK
ca36e0ff 1206GNULIB_READ
e275c824
PE
1207GNULIB_PWRITE
1208GNULIB_PREAD
1209GNULIB_PIPE2
1210GNULIB_PIPE
1211GNULIB_LSEEK
1212GNULIB_LINKAT
1213GNULIB_LINK
1214GNULIB_LCHOWN
0eb775a3 1215GNULIB_ISATTY
da6c8463 1216GNULIB_GROUP_MEMBER
e275c824
PE
1217GNULIB_GETUSERSHELL
1218GNULIB_GETPAGESIZE
1219GNULIB_GETLOGIN_R
1220GNULIB_GETLOGIN
1221GNULIB_GETHOSTNAME
1222GNULIB_GETGROUPS
1223GNULIB_GETDTABLESIZE
1224GNULIB_GETDOMAINNAME
1225GNULIB_GETCWD
1226GNULIB_FTRUNCATE
1227GNULIB_FSYNC
2b1928b8 1228GNULIB_FDATASYNC
e275c824
PE
1229GNULIB_FCHOWNAT
1230GNULIB_FCHDIR
1231GNULIB_FACCESSAT
1232GNULIB_EUIDACCESS
1233GNULIB_ENVIRON
1234GNULIB_DUP3
1235GNULIB_DUP2
2b1928b8 1236GNULIB_DUP
e275c824
PE
1237GNULIB_CLOSE
1238GNULIB_CHOWN
2b1928b8 1239GNULIB_CHDIR
f199cab1 1240LIB_CLOCK_GETTIME
4fc2b746
GM
1241GL_GENERATE_ALLOCA_H_FALSE
1242GL_GENERATE_ALLOCA_H_TRUE
1243ALLOCA_H
1244ALLOCA
743c80a7
PE
1245GL_COND_LIBTOOL_FALSE
1246GL_COND_LIBTOOL_TRUE
5476a9a4
GM
1247POST_ALLOC_OBJ
1248PRE_ALLOC_OBJ
1249CYGWIN_OBJ
1250RALLOC_OBJ
1251OLDXMENU_DEPS
1252LIBX_OTHER
1253LIBXMENU
1254OLDXMENU
1255OLDXMENU_TARGET
1256LIBXT_OTHER
1257TOOLKIT_LIBW
1258WIDGET_OBJ
1259XOBJ
1260XMENU_OBJ
1261FONT_OBJ
1262OTHER_FILES
1263GNU_OBJC_CFLAGS
1264ns_appsrc
1265ns_appresdir
1266ns_appbindir
1267ns_appdir
5476a9a4
GM
1268X_TOOLKIT_TYPE
1269GNUSTEP_CFLAGS
1270C_SWITCH_X_SITE
1271LD_SWITCH_X_SITE
1272gameuser
1273gamedir
1274bitmapdir
1275archlibdir
1276etcdir
1277x_default_search_path
1278lisppath
1279locallisppath
1280standardlisppath
1281leimdir
1282lispdir
1283srcdir
1284canonical
1285configuration
1286version
bb7dce39 1287copyright
5476a9a4
GM
1288KRB4LIB
1289DESLIB
1290KRB5LIB
1291CRYPTOLIB
1292COM_ERRLIB
1293LIBRESOLV
1294LIBHESIOD
1295TERMCAP_OBJ
1296LIBS_TERMCAP
1297BLESSMAIL_TARGET
1298LIBS_MAIL
1299liblockfile
1300LIBXML2_LIBS
1301LIBXML2_CFLAGS
910833ae
GM
1302XINERAMA_LIBS
1303XINERAMA_CFLAGS
1304XRANDR_LIBS
1305XRANDR_CFLAGS
5476a9a4
GM
1306LIBXSM
1307LIBGPM
1308LIBGIF
1309LIBTIFF
1310LIBPNG
1311LIBJPEG
1312LIBXPM
1313M17N_FLT_LIBS
1314M17N_FLT_CFLAGS
1315LIBOTF_LIBS
1316LIBOTF_CFLAGS
1317FREETYPE_LIBS
1318FREETYPE_CFLAGS
1319XFT_LIBS
1320XFT_CFLAGS
1321FONTCONFIG_LIBS
1322FONTCONFIG_CFLAGS
1323LIBXMU
1324LIBXTR6
1325LIBGNUTLS_LIBS
1326LIBGNUTLS_CFLAGS
1327LIBSELINUX_LIBS
1328SETTINGS_LIBS
1329SETTINGS_CFLAGS
dcde497f
GM
1330GOBJECT_LIBS
1331GOBJECT_CFLAGS
5476a9a4
GM
1332GCONF_LIBS
1333GCONF_CFLAGS
1334GSETTINGS_LIBS
1335GSETTINGS_CFLAGS
1336DBUS_OBJ
1337DBUS_LIBS
1338DBUS_CFLAGS
1339GTK_OBJ
1340GTK_LIBS
1341GTK_CFLAGS
1342IMAGEMAGICK_LIBS
1343IMAGEMAGICK_CFLAGS
1344RSVG_LIBS
1345RSVG_CFLAGS
1346LIB_PTHREAD
1347VMLIMIT_OBJ
1348GMALLOC_OBJ
1349HAVE_XSERVER
b5eb356a
GM
1350W32_RES_LINK
1351W32_RES
5c0255d9
GM
1352W32_LIBS
1353W32_OBJ
b5eb356a 1354WINDRES
5476a9a4
GM
1355NS_OBJC_OBJ
1356NS_OBJ
1357ns_self_contained
1358INSTALL_ARCH_INDEP_EXTRA
4efe5ef9 1359LIBS_GNUSTEP
5476a9a4
GM
1360LD_SWITCH_X_SITE_RPATH
1361XMKMF
1362DEPFLAGS
1363MKDEPDIR
1364CFLAGS_SOUND
1365ALSA_LIBS
1366ALSA_CFLAGS
1367LIBSOUND
1368PKG_CONFIG
067d23c9 1369LIB_MATH
067d23c9
KY
1370LIBS_SYSTEM
1371C_SWITCH_SYSTEM
1372UNEXEC_OBJ
1373C_SWITCH_MACHINE
1374LD_SWITCH_SYSTEM
1375CANNOT_DUMP
141d074d
GM
1376INFO_OPTS
1377INFO_EXT
96f129d5 1378HAVE_MAKEINFO
9c29597b 1379PAXCTL
067d23c9
KY
1380GZIP_PROG
1381INSTALL_INFO
4c5f4270 1382LN_S_FILEONLY
a6b92a4a 1383GNULIB_WARN_CFLAGS
0eb775a3 1384WARN_CFLAGS
a6b92a4a 1385WERROR_CFLAGS
369e19fc
PE
1386RANLIB
1387ARFLAGS
1388AR
067d23c9
KY
1389EGREP
1390GREP
1391CPP
743c80a7
PE
1392am__fastdepCC_FALSE
1393am__fastdepCC_TRUE
1394CCDEPMODE
1395AMDEPBACKSLASH
1396AMDEP_FALSE
1397AMDEP_TRUE
1398am__quote
1399am__include
1400DEPDIR
067d23c9
KY
1401OBJEXT
1402EXEEXT
1403ac_ct_CC
1404CPPFLAGS
1405LDFLAGS
1406CFLAGS
1407CC
1408host_os
1409host_vendor
1410host_cpu
1411host
1412build_os
1413build_vendor
1414build_cpu
1415build
1416PROFILING_CFLAGS
067d23c9 1417GZIP_INFO
c3a461a5 1418cache_file
743c80a7
PE
1419am__untar
1420am__tar
1421AMTAR
1422am__leading_dot
1423SET_MAKE
1424AWK
1425mkdir_p
1426MKDIR_P
1427INSTALL_STRIP_PROGRAM
1428STRIP
1429install_sh
1430MAKEINFO
1431AUTOHEADER
1432AUTOMAKE
1433AUTOCONF
1434ACLOCAL
1435VERSION
1436PACKAGE
1437CYGPATH_W
1438am__isrc
1439INSTALL_DATA
1440INSTALL_SCRIPT
1441INSTALL_PROGRAM
067d23c9
KY
1442target_alias
1443host_alias
1444build_alias
1445LIBS
1446ECHO_T
1447ECHO_N
1448ECHO_C
1449DEFS
1450mandir
1451localedir
1452libdir
1453psdir
1454pdfdir
1455dvidir
1456htmldir
1457infodir
1458docdir
1459oldincludedir
1460includedir
1461localstatedir
1462sharedstatedir
1463sysconfdir
1464datadir
1465datarootdir
1466libexecdir
1467sbindir
1468bindir
1469program_transform_name
1470prefix
1471exec_prefix
1472PACKAGE_URL
1473PACKAGE_BUGREPORT
1474PACKAGE_STRING
1475PACKAGE_VERSION
1476PACKAGE_TARNAME
1477PACKAGE_NAME
1478PATH_SEPARATOR
1479SHELL'
1480ac_subst_files='deps_frag
bb7dce39 1481lisp_frag'
067d23c9
KY
1482ac_user_opts='
1483enable_option_checking
ee77919d 1484with_all
067d23c9
KY
1485with_pop
1486with_kerberos
1487with_kerberos5
1488with_hesiod
1489with_mmdf
1490with_mail_unlink
1491with_mailhost
1492with_sound
067d23c9 1493with_x_toolkit
0442dc7f 1494with_wide_int
067d23c9
KY
1495with_xpm
1496with_jpeg
1497with_tiff
1498with_gif
1499with_png
1500with_rsvg
1501with_xml2
1502with_imagemagick
1503with_xft
1504with_libotf
1505with_m17n_flt
1506with_toolkit_scroll_bars
1507with_xaw3d
1508with_xim
1509with_ns
5c0255d9 1510with_w32
067d23c9
KY
1511with_gpm
1512with_dbus
1513with_gconf
f527bd02 1514with_gsettings
067d23c9
KY
1515with_selinux
1516with_gnutls
b5eb356a 1517with_inotify
067d23c9
KY
1518with_makeinfo
1519with_compress_info
1520with_pkg_config_prog
4fc5868a 1521with_gameuser
067d23c9
KY
1522with_gnustep_conf
1523enable_ns_self_contained
067d23c9
KY
1524enable_locallisppath
1525enable_checking
afd07e01 1526enable_check_lisp_object_type
067d23c9
KY
1527enable_profiling
1528enable_autodepend
4efe5ef9 1529enable_gtk_deprecation_warnings
743c80a7 1530enable_dependency_tracking
067d23c9 1531enable_largefile
a6b92a4a 1532enable_gcc_warnings
e4d35030 1533enable_link_time_optimization
067d23c9 1534with_x
3a019ab4 1535enable_acl
067d23c9
KY
1536'
1537 ac_precious_vars='build_alias
1538host_alias
1539target_alias
1540CC
1541CFLAGS
1542LDFLAGS
1543LIBS
1544CPPFLAGS
1545CPP
1546XMKMF'
1547
1548
1549# Initialize some variables set by options.
1550ac_init_help=
1551ac_init_version=false
1552ac_unrecognized_opts=
1553ac_unrecognized_sep=
1554# The variables have the same names as the options, with
1555# dashes changed to underlines.
1556cache_file=/dev/null
1557exec_prefix=NONE
1558no_create=
1559no_recursion=
1560prefix=NONE
1561program_prefix=NONE
1562program_suffix=NONE
1563program_transform_name=s,x,x,
1564silent=
1565site=
1566srcdir=
1567verbose=
1568x_includes=NONE
1569x_libraries=NONE
1570
1571# Installation directory options.
1572# These are left unexpanded so users can "make install exec_prefix=/foo"
1573# and all the variables that are supposed to be based on exec_prefix
1574# by default will actually change.
1575# Use braces instead of parens because sh, perl, etc. also accept them.
1576# (The list follows the same order as the GNU Coding Standards.)
1577bindir='${exec_prefix}/bin'
1578sbindir='${exec_prefix}/sbin'
1579libexecdir='${exec_prefix}/libexec'
1580datarootdir='${prefix}/share'
1581datadir='${datarootdir}'
1582sysconfdir='${prefix}/etc'
1583sharedstatedir='${prefix}/com'
1584localstatedir='${prefix}/var'
1585includedir='${prefix}/include'
1586oldincludedir='/usr/include'
1587docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1588infodir='${datarootdir}/info'
1589htmldir='${docdir}'
1590dvidir='${docdir}'
1591pdfdir='${docdir}'
1592psdir='${docdir}'
1593libdir='${exec_prefix}/lib'
1594localedir='${datarootdir}/locale'
1595mandir='${datarootdir}/man'
1596
1597ac_prev=
1598ac_dashdash=
1599for ac_option
1600do
1601 # If the previous option needs an argument, assign it.
1602 if test -n "$ac_prev"; then
1603 eval $ac_prev=\$ac_option
1604 ac_prev=
1605 continue
1606 fi
1607
1608 case $ac_option in
a9bec17c
GM
1609 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1610 *) ac_optarg=yes ;;
067d23c9
KY
1611 esac
1612
1613 # Accept the important Cygnus configure options, so we can diagnose typos.
1614
1615 case $ac_dashdash$ac_option in
1616 --)
1617 ac_dashdash=yes ;;
1618
1619 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1620 ac_prev=bindir ;;
1621 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1622 bindir=$ac_optarg ;;
1623
1624 -build | --build | --buil | --bui | --bu)
1625 ac_prev=build_alias ;;
1626 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1627 build_alias=$ac_optarg ;;
1628
1629 -cache-file | --cache-file | --cache-fil | --cache-fi \
1630 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1631 ac_prev=cache_file ;;
1632 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1633 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1634 cache_file=$ac_optarg ;;
1635
1636 --config-cache | -C)
1637 cache_file=config.cache ;;
1638
1639 -datadir | --datadir | --datadi | --datad)
1640 ac_prev=datadir ;;
1641 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1642 datadir=$ac_optarg ;;
1643
1644 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1645 | --dataroo | --dataro | --datar)
1646 ac_prev=datarootdir ;;
1647 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1648 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1649 datarootdir=$ac_optarg ;;
1650
1651 -disable-* | --disable-*)
1652 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1653 # Reject names that are not valid shell variable names.
1654 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
a9bec17c 1655 as_fn_error "invalid feature name: $ac_useropt"
067d23c9
KY
1656 ac_useropt_orig=$ac_useropt
1657 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1658 case $ac_user_opts in
1659 *"
1660"enable_$ac_useropt"
1661"*) ;;
1662 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1663 ac_unrecognized_sep=', ';;
1664 esac
1665 eval enable_$ac_useropt=no ;;
1666
1667 -docdir | --docdir | --docdi | --doc | --do)
1668 ac_prev=docdir ;;
1669 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1670 docdir=$ac_optarg ;;
1671
1672 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1673 ac_prev=dvidir ;;
1674 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1675 dvidir=$ac_optarg ;;
1676
1677 -enable-* | --enable-*)
1678 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1679 # Reject names that are not valid shell variable names.
1680 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
a9bec17c 1681 as_fn_error "invalid feature name: $ac_useropt"
067d23c9
KY
1682 ac_useropt_orig=$ac_useropt
1683 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1684 case $ac_user_opts in
1685 *"
1686"enable_$ac_useropt"
1687"*) ;;
1688 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1689 ac_unrecognized_sep=', ';;
1690 esac
1691 eval enable_$ac_useropt=\$ac_optarg ;;
1692
1693 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1694 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1695 | --exec | --exe | --ex)
1696 ac_prev=exec_prefix ;;
1697 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1698 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1699 | --exec=* | --exe=* | --ex=*)
1700 exec_prefix=$ac_optarg ;;
1701
1702 -gas | --gas | --ga | --g)
1703 # Obsolete; use --with-gas.
1704 with_gas=yes ;;
1705
1706 -help | --help | --hel | --he | -h)
1707 ac_init_help=long ;;
1708 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1709 ac_init_help=recursive ;;
1710 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1711 ac_init_help=short ;;
1712
1713 -host | --host | --hos | --ho)
1714 ac_prev=host_alias ;;
1715 -host=* | --host=* | --hos=* | --ho=*)
1716 host_alias=$ac_optarg ;;
1717
1718 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1719 ac_prev=htmldir ;;
1720 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1721 | --ht=*)
1722 htmldir=$ac_optarg ;;
1723
1724 -includedir | --includedir | --includedi | --included | --include \
1725 | --includ | --inclu | --incl | --inc)
1726 ac_prev=includedir ;;
1727 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1728 | --includ=* | --inclu=* | --incl=* | --inc=*)
1729 includedir=$ac_optarg ;;
1730
1731 -infodir | --infodir | --infodi | --infod | --info | --inf)
1732 ac_prev=infodir ;;
1733 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1734 infodir=$ac_optarg ;;
1735
1736 -libdir | --libdir | --libdi | --libd)
1737 ac_prev=libdir ;;
1738 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1739 libdir=$ac_optarg ;;
1740
1741 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1742 | --libexe | --libex | --libe)
1743 ac_prev=libexecdir ;;
1744 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1745 | --libexe=* | --libex=* | --libe=*)
1746 libexecdir=$ac_optarg ;;
1747
1748 -localedir | --localedir | --localedi | --localed | --locale)
1749 ac_prev=localedir ;;
1750 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1751 localedir=$ac_optarg ;;
1752
1753 -localstatedir | --localstatedir | --localstatedi | --localstated \
1754 | --localstate | --localstat | --localsta | --localst | --locals)
1755 ac_prev=localstatedir ;;
1756 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1757 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1758 localstatedir=$ac_optarg ;;
1759
1760 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1761 ac_prev=mandir ;;
1762 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1763 mandir=$ac_optarg ;;
1764
1765 -nfp | --nfp | --nf)
1766 # Obsolete; use --without-fp.
1767 with_fp=no ;;
1768
1769 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1770 | --no-cr | --no-c | -n)
1771 no_create=yes ;;
1772
1773 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1774 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1775 no_recursion=yes ;;
1776
1777 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1778 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1779 | --oldin | --oldi | --old | --ol | --o)
1780 ac_prev=oldincludedir ;;
1781 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1782 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1783 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1784 oldincludedir=$ac_optarg ;;
1785
1786 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1787 ac_prev=prefix ;;
1788 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1789 prefix=$ac_optarg ;;
1790
1791 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1792 | --program-pre | --program-pr | --program-p)
1793 ac_prev=program_prefix ;;
1794 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1795 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1796 program_prefix=$ac_optarg ;;
1797
1798 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1799 | --program-suf | --program-su | --program-s)
1800 ac_prev=program_suffix ;;
1801 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1802 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1803 program_suffix=$ac_optarg ;;
1804
1805 -program-transform-name | --program-transform-name \
1806 | --program-transform-nam | --program-transform-na \
1807 | --program-transform-n | --program-transform- \
1808 | --program-transform | --program-transfor \
1809 | --program-transfo | --program-transf \
1810 | --program-trans | --program-tran \
1811 | --progr-tra | --program-tr | --program-t)
1812 ac_prev=program_transform_name ;;
1813 -program-transform-name=* | --program-transform-name=* \
1814 | --program-transform-nam=* | --program-transform-na=* \
1815 | --program-transform-n=* | --program-transform-=* \
1816 | --program-transform=* | --program-transfor=* \
1817 | --program-transfo=* | --program-transf=* \
1818 | --program-trans=* | --program-tran=* \
1819 | --progr-tra=* | --program-tr=* | --program-t=*)
1820 program_transform_name=$ac_optarg ;;
1821
1822 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1823 ac_prev=pdfdir ;;
1824 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1825 pdfdir=$ac_optarg ;;
1826
1827 -psdir | --psdir | --psdi | --psd | --ps)
1828 ac_prev=psdir ;;
1829 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1830 psdir=$ac_optarg ;;
1831
1832 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1833 | -silent | --silent | --silen | --sile | --sil)
1834 silent=yes ;;
1835
1836 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1837 ac_prev=sbindir ;;
1838 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1839 | --sbi=* | --sb=*)
1840 sbindir=$ac_optarg ;;
1841
1842 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1843 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1844 | --sharedst | --shareds | --shared | --share | --shar \
1845 | --sha | --sh)
1846 ac_prev=sharedstatedir ;;
1847 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1848 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1849 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1850 | --sha=* | --sh=*)
1851 sharedstatedir=$ac_optarg ;;
1852
1853 -site | --site | --sit)
1854 ac_prev=site ;;
1855 -site=* | --site=* | --sit=*)
1856 site=$ac_optarg ;;
1857
1858 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1859 ac_prev=srcdir ;;
1860 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1861 srcdir=$ac_optarg ;;
1862
1863 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1864 | --syscon | --sysco | --sysc | --sys | --sy)
1865 ac_prev=sysconfdir ;;
1866 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1867 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1868 sysconfdir=$ac_optarg ;;
1869
1870 -target | --target | --targe | --targ | --tar | --ta | --t)
1871 ac_prev=target_alias ;;
1872 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1873 target_alias=$ac_optarg ;;
1874
1875 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1876 verbose=yes ;;
1877
1878 -version | --version | --versio | --versi | --vers | -V)
1879 ac_init_version=: ;;
1880
1881 -with-* | --with-*)
1882 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1883 # Reject names that are not valid shell variable names.
1884 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
a9bec17c 1885 as_fn_error "invalid package name: $ac_useropt"
067d23c9
KY
1886 ac_useropt_orig=$ac_useropt
1887 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1888 case $ac_user_opts in
1889 *"
1890"with_$ac_useropt"
1891"*) ;;
1892 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1893 ac_unrecognized_sep=', ';;
1894 esac
1895 eval with_$ac_useropt=\$ac_optarg ;;
1896
1897 -without-* | --without-*)
1898 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1899 # Reject names that are not valid shell variable names.
1900 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
a9bec17c 1901 as_fn_error "invalid package name: $ac_useropt"
067d23c9
KY
1902 ac_useropt_orig=$ac_useropt
1903 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1904 case $ac_user_opts in
1905 *"
1906"with_$ac_useropt"
1907"*) ;;
1908 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1909 ac_unrecognized_sep=', ';;
1910 esac
1911 eval with_$ac_useropt=no ;;
1912
1913 --x)
1914 # Obsolete; use --with-x.
1915 with_x=yes ;;
1916
1917 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1918 | --x-incl | --x-inc | --x-in | --x-i)
1919 ac_prev=x_includes ;;
1920 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1921 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1922 x_includes=$ac_optarg ;;
1923
1924 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1925 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1926 ac_prev=x_libraries ;;
1927 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1928 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1929 x_libraries=$ac_optarg ;;
1930
a9bec17c
GM
1931 -*) as_fn_error "unrecognized option: \`$ac_option'
1932Try \`$0 --help' for more information."
067d23c9
KY
1933 ;;
1934
1935 *=*)
1936 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1937 # Reject names that are not valid shell variable names.
1938 case $ac_envvar in #(
1939 '' | [0-9]* | *[!_$as_cr_alnum]* )
a9bec17c 1940 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
067d23c9
KY
1941 esac
1942 eval $ac_envvar=\$ac_optarg
1943 export $ac_envvar ;;
1944
1945 *)
1946 # FIXME: should be removed in autoconf 3.0.
1947 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1948 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1949 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
a9bec17c 1950 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
067d23c9
KY
1951 ;;
1952
1953 esac
1954done
1955
1956if test -n "$ac_prev"; then
1957 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
a9bec17c 1958 as_fn_error "missing argument to $ac_option"
067d23c9
KY
1959fi
1960
1961if test -n "$ac_unrecognized_opts"; then
1962 case $enable_option_checking in
1963 no) ;;
a9bec17c 1964 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
067d23c9
KY
1965 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1966 esac
1967fi
1968
1969# Check all directory arguments for consistency.
1970for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1971 datadir sysconfdir sharedstatedir localstatedir includedir \
1972 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1973 libdir localedir mandir
1974do
1975 eval ac_val=\$$ac_var
1976 # Remove trailing slashes.
1977 case $ac_val in
1978 */ )
1979 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1980 eval $ac_var=\$ac_val;;
1981 esac
1982 # Be sure to have absolute directory names.
1983 case $ac_val in
1984 [\\/$]* | ?:[\\/]* ) continue;;
1985 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1986 esac
a9bec17c 1987 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
067d23c9
KY
1988done
1989
1990# There might be people who depend on the old broken behavior: `$host'
1991# used to hold the argument of --host etc.
1992# FIXME: To remove some day.
1993build=$build_alias
1994host=$host_alias
1995target=$target_alias
1996
1997# FIXME: To remove some day.
1998if test "x$host_alias" != x; then
1999 if test "x$build_alias" = x; then
2000 cross_compiling=maybe
a9bec17c
GM
2001 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
2002 If a cross compiler is detected then cross compile mode will be used." >&2
067d23c9
KY
2003 elif test "x$build_alias" != "x$host_alias"; then
2004 cross_compiling=yes
2005 fi
2006fi
2007
2008ac_tool_prefix=
2009test -n "$host_alias" && ac_tool_prefix=$host_alias-
2010
2011test "$silent" = yes && exec 6>/dev/null
2012
2013
2014ac_pwd=`pwd` && test -n "$ac_pwd" &&
2015ac_ls_di=`ls -di .` &&
2016ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
a9bec17c 2017 as_fn_error "working directory cannot be determined"
067d23c9 2018test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
a9bec17c 2019 as_fn_error "pwd does not report name of working directory"
067d23c9
KY
2020
2021
2022# Find the source files, if location was not specified.
2023if test -z "$srcdir"; then
2024 ac_srcdir_defaulted=yes
2025 # Try the directory containing this script, then the parent directory.
2026 ac_confdir=`$as_dirname -- "$as_myself" ||
2027$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
2028 X"$as_myself" : 'X\(//\)[^/]' \| \
2029 X"$as_myself" : 'X\(//\)$' \| \
2030 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
2031$as_echo X"$as_myself" |
2032 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
2033 s//\1/
2034 q
2035 }
2036 /^X\(\/\/\)[^/].*/{
2037 s//\1/
2038 q
2039 }
2040 /^X\(\/\/\)$/{
2041 s//\1/
2042 q
2043 }
2044 /^X\(\/\).*/{
2045 s//\1/
2046 q
2047 }
2048 s/.*/./; q'`
2049 srcdir=$ac_confdir
2050 if test ! -r "$srcdir/$ac_unique_file"; then
2051 srcdir=..
2052 fi
2053else
2054 ac_srcdir_defaulted=no
2055fi
2056if test ! -r "$srcdir/$ac_unique_file"; then
2057 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
a9bec17c 2058 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
067d23c9
KY
2059fi
2060ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
2061ac_abs_confdir=`(
a9bec17c 2062 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
067d23c9
KY
2063 pwd)`
2064# When building in place, set srcdir=.
2065if test "$ac_abs_confdir" = "$ac_pwd"; then
2066 srcdir=.
2067fi
2068# Remove unnecessary trailing slashes from srcdir.
2069# Double slashes in file names in object file debugging info
2070# mess up M-x gdb in Emacs.
2071case $srcdir in
2072*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
2073esac
2074for ac_var in $ac_precious_vars; do
2075 eval ac_env_${ac_var}_set=\${${ac_var}+set}
2076 eval ac_env_${ac_var}_value=\$${ac_var}
2077 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
2078 eval ac_cv_env_${ac_var}_value=\$${ac_var}
2079done
2080
2081#
2082# Report the --help message.
2083#
2084if test "$ac_init_help" = "long"; then
2085 # Omit some internal or obsolete options to make the list less imposing.
2086 # This message is too long to be a string in the A/UX 3.1 sh.
2087 cat <<_ACEOF
c574bc34 2088\`configure' configures emacs 24.3.50 to adapt to many kinds of systems.
067d23c9
KY
2089
2090Usage: $0 [OPTION]... [VAR=VALUE]...
2091
2092To assign environment variables (e.g., CC, CFLAGS...), specify them as
2093VAR=VALUE. See below for descriptions of some of the useful variables.
2094
2095Defaults for the options are specified in brackets.
2096
2097Configuration:
2098 -h, --help display this help and exit
2099 --help=short display options specific to this package
2100 --help=recursive display the short help of all the included packages
2101 -V, --version display version information and exit
a9bec17c 2102 -q, --quiet, --silent do not print \`checking...' messages
067d23c9
KY
2103 --cache-file=FILE cache test results in FILE [disabled]
2104 -C, --config-cache alias for \`--cache-file=config.cache'
2105 -n, --no-create do not create output files
2106 --srcdir=DIR find the sources in DIR [configure dir or \`..']
2107
2108Installation directories:
2109 --prefix=PREFIX install architecture-independent files in PREFIX
2110 [$ac_default_prefix]
2111 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
2112 [PREFIX]
2113
2114By default, \`make install' will install all the files in
2115\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
2116an installation prefix other than \`$ac_default_prefix' using \`--prefix',
2117for instance \`--prefix=\$HOME'.
2118
2119For better control, use the options below.
2120
2121Fine tuning of the installation directories:
2122 --bindir=DIR user executables [EPREFIX/bin]
2123 --sbindir=DIR system admin executables [EPREFIX/sbin]
2124 --libexecdir=DIR program executables [EPREFIX/libexec]
2125 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
2126 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
2127 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
2128 --libdir=DIR object code libraries [EPREFIX/lib]
2129 --includedir=DIR C header files [PREFIX/include]
2130 --oldincludedir=DIR C header files for non-gcc [/usr/include]
2131 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
2132 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
2133 --infodir=DIR info documentation [DATAROOTDIR/info]
2134 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
2135 --mandir=DIR man documentation [DATAROOTDIR/man]
2136 --docdir=DIR documentation root [DATAROOTDIR/doc/emacs]
2137 --htmldir=DIR html documentation [DOCDIR]
2138 --dvidir=DIR dvi documentation [DOCDIR]
2139 --pdfdir=DIR pdf documentation [DOCDIR]
2140 --psdir=DIR ps documentation [DOCDIR]
2141_ACEOF
2142
2143 cat <<\_ACEOF
2144
2145Program names:
2146 --program-prefix=PREFIX prepend PREFIX to installed program names
2147 --program-suffix=SUFFIX append SUFFIX to installed program names
2148 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
2149
2150X features:
2151 --x-includes=DIR X include files are in DIR
2152 --x-libraries=DIR X library files are in DIR
2153
2154System types:
2155 --build=BUILD configure for building on BUILD [guessed]
2156 --host=HOST cross-compile to build programs to run on HOST [BUILD]
2157_ACEOF
2158fi
2159
2160if test -n "$ac_init_help"; then
2161 case $ac_init_help in
c574bc34 2162 short | recursive ) echo "Configuration of emacs 24.3.50:";;
067d23c9
KY
2163 esac
2164 cat <<\_ACEOF
2165
2166Optional Features:
2167 --disable-option-checking ignore unrecognized --enable/--with options
2168 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
2169 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
2170 --disable-ns-self-contained
2171 disable self contained build under NeXTstep
067d23c9
KY
2172 --enable-locallisppath=PATH
2173 directories Emacs should search for lisp files
2174 specific to this site
2175 --enable-checking[=LIST]
2176 enable expensive run-time checks. With LIST, enable
2177 only specific categories of checks. Categories are:
2178 all,yes,no. Flags are: stringbytes, stringoverrun,
7ee3791f 2179 stringfreelist, xmallocoverrun, conslist, glyphs
afd07e01
GM
2180 --enable-check-lisp-object-type
2181 enable compile time checks for the Lisp_Object data
2182 type. This is useful for development for catching
2183 certain types of bugs.
3dc00ee8
GM
2184 --enable-profiling build emacs with low-level, gprof profiling support.
2185 Mainly useful for debugging Emacs itself. May not
2186 work on all platforms. Stops profiler.el working.
067d23c9
KY
2187 --enable-autodepend automatically generate dependencies to .h-files.
2188 Requires GNU Make and Gcc. Enabled if GNU Make and
2189 Gcc is found
4efe5ef9
GM
2190 --enable-gtk-deprecation-warnings
2191 Show Gtk+/Gdk deprecation warnings for Gtk+ >= 3.0
743c80a7
PE
2192 --disable-dependency-tracking speeds up one-time build
2193 --enable-dependency-tracking do not reject slow dependency extractors
067d23c9 2194 --disable-largefile omit support for large files
ac924f35
GM
2195 --enable-gcc-warnings turn on lots of GCC warnings/errors. This is
2196 intended for developers, and may generate false
2197 alarms when used with older or non-GNU development
2198 tools.
e4d35030
GM
2199 --enable-link-time-optimization
2200 build emacs with link-time optimization. This is
2201 supported only for GCC since 4.5.0.
3a019ab4 2202 --disable-acl do not support ACLs
067d23c9
KY
2203
2204Optional Packages:
2205 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
2206 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
ee77919d
GM
2207 --without-all omit almost all features and build small executable
2208 with minimal dependencies
067d23c9
KY
2209 --without-pop don't support POP mail retrieval with movemail
2210 --with-kerberos support Kerberos-authenticated POP
2211 --with-kerberos5 support Kerberos version 5 authenticated POP
2212 --with-hesiod support Hesiod to get the POP server host
2213 --with-mmdf support MMDF mailboxes
2214 --with-mail-unlink unlink, rather than empty, mail spool after reading
2215 --with-mailhost=HOSTNAME
2216 string giving default POP mail host
2217 --without-sound don't compile with sound support
4fa92495
GM
2218 --with-x-toolkit=KIT use an X toolkit (KIT one of: yes or gtk, gtk2,
2219 gtk3, lucid or athena, motif, no)
0442dc7f 2220 --with-wide-int prefer wide Emacs integers (typically 62-bit)
067d23c9
KY
2221 --without-xpm don't compile with XPM image support
2222 --without-jpeg don't compile with JPEG image support
2223 --without-tiff don't compile with TIFF image support
2224 --without-gif don't compile with GIF image support
2225 --without-png don't compile with PNG image support
2226 --without-rsvg don't compile with SVG image support
2227 --without-xml2 don't compile with XML parsing support
2228 --without-imagemagick don't compile with ImageMagick image support
2229 --without-xft don't use XFT for anti aliased fonts
2230 --without-libotf don't use libotf for OpenType font support
2231 --without-m17n-flt don't use m17n-flt for text shaping
2232 --without-toolkit-scroll-bars
2233 don't use Motif or Xaw3d scroll bars
2234 --without-xaw3d don't use Xaw3d
2235 --without-xim don't use X11 XIM
7834125e 2236 --with-ns use NeXTstep (Cocoa or GNUstep) windowing system
bf05ed1f 2237 --with-w32 use native MS Windows GUI
067d23c9
KY
2238 --without-gpm don't use -lgpm for mouse support on a GNU/Linux
2239 console
2240 --without-dbus don't compile with D-Bus support
2241 --without-gconf don't compile with GConf support
f527bd02 2242 --without-gsettings don't compile with GSettings support
067d23c9
KY
2243 --without-selinux don't compile with SELinux support
2244 --without-gnutls don't use -lgnutls for SSL/TLS support
b5eb356a 2245 --without-inotify don't compile with inotify (file-watch) support
067d23c9
KY
2246 --without-makeinfo don't require makeinfo for building manuals
2247 --without-compress-info don't compress the installed Info pages
b5591ebb
GM
2248 --with-pkg-config-prog=FILENAME
2249 file name of pkg-config for finding GTK and librsvg
4fc5868a 2250 --with-gameuser=USER user for shared game score files
b5591ebb
GM
2251 --with-gnustep-conf=FILENAME
2252 name of GNUstep.conf; default $GNUSTEP_CONFIG_FILE,
067d23c9
KY
2253 or /etc/GNUstep/GNUstep.conf
2254 --with-x use the X Window System
2255
2256Some influential environment variables:
2257 CC C compiler command
2258 CFLAGS C compiler flags
2259 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
2260 nonstandard directory <lib dir>
2261 LIBS libraries to pass to the linker, e.g. -l<library>
2262 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2263 you have headers in a nonstandard directory <include dir>
2264 CPP C preprocessor
2265 XMKMF Path to xmkmf, Makefile generator for X Window System
2266
2267Use these variables to override the choices made by `configure' or to help
2268it to find libraries and programs with nonstandard names/locations.
2269
2270Report bugs to the package provider.
2271_ACEOF
2272ac_status=$?
2273fi
2274
2275if test "$ac_init_help" = "recursive"; then
2276 # If there are subdirs, report their specific --help.
2277 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2278 test -d "$ac_dir" ||
2279 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2280 continue
2281 ac_builddir=.
2282
2283case "$ac_dir" in
2284.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2285*)
2286 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2287 # A ".." for each directory in $ac_dir_suffix.
2288 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2289 case $ac_top_builddir_sub in
2290 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2291 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2292 esac ;;
2293esac
2294ac_abs_top_builddir=$ac_pwd
2295ac_abs_builddir=$ac_pwd$ac_dir_suffix
2296# for backward compatibility:
2297ac_top_builddir=$ac_top_build_prefix
2298
2299case $srcdir in
2300 .) # We are building in place.
2301 ac_srcdir=.
2302 ac_top_srcdir=$ac_top_builddir_sub
2303 ac_abs_top_srcdir=$ac_pwd ;;
2304 [\\/]* | ?:[\\/]* ) # Absolute name.
2305 ac_srcdir=$srcdir$ac_dir_suffix;
2306 ac_top_srcdir=$srcdir
2307 ac_abs_top_srcdir=$srcdir ;;
2308 *) # Relative name.
2309 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2310 ac_top_srcdir=$ac_top_build_prefix$srcdir
2311 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2312esac
2313ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2314
2315 cd "$ac_dir" || { ac_status=$?; continue; }
2316 # Check for guested configure.
2317 if test -f "$ac_srcdir/configure.gnu"; then
2318 echo &&
2319 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2320 elif test -f "$ac_srcdir/configure"; then
2321 echo &&
2322 $SHELL "$ac_srcdir/configure" --help=recursive
2323 else
2324 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2325 fi || ac_status=$?
2326 cd "$ac_pwd" || { ac_status=$?; break; }
2327 done
2328fi
2329
2330test -n "$ac_init_help" && exit $ac_status
2331if $ac_init_version; then
2332 cat <<\_ACEOF
c574bc34 2333emacs configure 24.3.50
a9bec17c 2334generated by GNU Autoconf 2.65
067d23c9 2335
a9bec17c 2336Copyright (C) 2009 Free Software Foundation, Inc.
067d23c9
KY
2337This configure script is free software; the Free Software Foundation
2338gives unlimited permission to copy, distribute and modify it.
2339_ACEOF
2340 exit
2341fi
2342
2343## ------------------------ ##
2344## Autoconf initialization. ##
2345## ------------------------ ##
2346
2347# ac_fn_c_try_compile LINENO
2348# --------------------------
2349# Try to compile conftest.$ac_ext, and return whether this succeeded.
2350ac_fn_c_try_compile ()
2351{
2352 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2353 rm -f conftest.$ac_objext
2354 if { { ac_try="$ac_compile"
2355case "(($ac_try" in
2356 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2357 *) ac_try_echo=$ac_try;;
2358esac
2359eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2360$as_echo "$ac_try_echo"; } >&5
2361 (eval "$ac_compile") 2>conftest.err
2362 ac_status=$?
2363 if test -s conftest.err; then
2364 grep -v '^ *+' conftest.err >conftest.er1
2365 cat conftest.er1 >&5
2366 mv -f conftest.er1 conftest.err
2367 fi
2368 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2369 test $ac_status = 0; } && {
2370 test -z "$ac_c_werror_flag" ||
2371 test ! -s conftest.err
2372 } && test -s conftest.$ac_objext; then :
2373 ac_retval=0
2374else
2375 $as_echo "$as_me: failed program was:" >&5
2376sed 's/^/| /' conftest.$ac_ext >&5
2377
2378 ac_retval=1
2379fi
a9bec17c 2380 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
067d23c9
KY
2381 as_fn_set_status $ac_retval
2382
2383} # ac_fn_c_try_compile
2384
067d23c9
KY
2385# ac_fn_c_try_cpp LINENO
2386# ----------------------
2387# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2388ac_fn_c_try_cpp ()
2389{
2390 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2391 if { { ac_try="$ac_cpp conftest.$ac_ext"
2392case "(($ac_try" in
2393 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2394 *) ac_try_echo=$ac_try;;
2395esac
2396eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2397$as_echo "$ac_try_echo"; } >&5
2398 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2399 ac_status=$?
2400 if test -s conftest.err; then
2401 grep -v '^ *+' conftest.err >conftest.er1
2402 cat conftest.er1 >&5
2403 mv -f conftest.er1 conftest.err
2404 fi
2405 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
a9bec17c 2406 test $ac_status = 0; } >/dev/null && {
067d23c9
KY
2407 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2408 test ! -s conftest.err
2409 }; then :
2410 ac_retval=0
2411else
2412 $as_echo "$as_me: failed program was:" >&5
2413sed 's/^/| /' conftest.$ac_ext >&5
2414
2415 ac_retval=1
2416fi
a9bec17c 2417 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
067d23c9
KY
2418 as_fn_set_status $ac_retval
2419
2420} # ac_fn_c_try_cpp
2421
2422# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
2423# -------------------------------------------------------
2424# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2425# the include files in INCLUDES and setting the cache variable VAR
2426# accordingly.
2427ac_fn_c_check_header_mongrel ()
2428{
2429 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
a9bec17c 2430 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
067d23c9
KY
2431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2432$as_echo_n "checking for $2... " >&6; }
a9bec17c 2433if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
067d23c9
KY
2434 $as_echo_n "(cached) " >&6
2435fi
2436eval ac_res=\$$3
2437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2438$as_echo "$ac_res" >&6; }
2439else
2440 # Is the header compilable?
2441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2442$as_echo_n "checking $2 usability... " >&6; }
2443cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2444/* end confdefs.h. */
2445$4
2446#include <$2>
2447_ACEOF
2448if ac_fn_c_try_compile "$LINENO"; then :
2449 ac_header_compiler=yes
2450else
2451 ac_header_compiler=no
2452fi
2453rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2454{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2455$as_echo "$ac_header_compiler" >&6; }
2456
2457# Is the header present?
2458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2459$as_echo_n "checking $2 presence... " >&6; }
2460cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2461/* end confdefs.h. */
2462#include <$2>
2463_ACEOF
2464if ac_fn_c_try_cpp "$LINENO"; then :
2465 ac_header_preproc=yes
2466else
2467 ac_header_preproc=no
2468fi
a9bec17c 2469rm -f conftest.err conftest.$ac_ext
067d23c9
KY
2470{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2471$as_echo "$ac_header_preproc" >&6; }
2472
2473# So? What about this header?
2474case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
2475 yes:no: )
2476 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2477$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2478 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2479$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2480 ;;
2481 no:yes:* )
2482 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2483$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2484 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
2485$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
2486 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2487$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2488 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
2489$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
2490 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2491$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2492 ;;
2493esac
2494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2495$as_echo_n "checking for $2... " >&6; }
a9bec17c 2496if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
067d23c9
KY
2497 $as_echo_n "(cached) " >&6
2498else
2499 eval "$3=\$ac_header_compiler"
2500fi
2501eval ac_res=\$$3
2502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2503$as_echo "$ac_res" >&6; }
2504fi
a9bec17c 2505 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
067d23c9
KY
2506
2507} # ac_fn_c_check_header_mongrel
2508
2509# ac_fn_c_try_run LINENO
2510# ----------------------
2511# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2512# that executables *can* be run.
2513ac_fn_c_try_run ()
2514{
2515 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2516 if { { ac_try="$ac_link"
2517case "(($ac_try" in
2518 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2519 *) ac_try_echo=$ac_try;;
2520esac
2521eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2522$as_echo "$ac_try_echo"; } >&5
2523 (eval "$ac_link") 2>&5
2524 ac_status=$?
2525 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2526 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2527 { { case "(($ac_try" in
2528 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2529 *) ac_try_echo=$ac_try;;
2530esac
2531eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2532$as_echo "$ac_try_echo"; } >&5
2533 (eval "$ac_try") 2>&5
2534 ac_status=$?
2535 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2536 test $ac_status = 0; }; }; then :
2537 ac_retval=0
2538else
2539 $as_echo "$as_me: program exited with status $ac_status" >&5
2540 $as_echo "$as_me: failed program was:" >&5
2541sed 's/^/| /' conftest.$ac_ext >&5
2542
2543 ac_retval=$ac_status
2544fi
2545 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
a9bec17c 2546 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
067d23c9
KY
2547 as_fn_set_status $ac_retval
2548
2549} # ac_fn_c_try_run
2550
2551# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2552# -------------------------------------------------------
2553# Tests whether HEADER exists and can be compiled using the include files in
2554# INCLUDES, setting the cache variable VAR accordingly.
2555ac_fn_c_check_header_compile ()
2556{
2557 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2558 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2559$as_echo_n "checking for $2... " >&6; }
a9bec17c 2560if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
067d23c9
KY
2561 $as_echo_n "(cached) " >&6
2562else
2563 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2564/* end confdefs.h. */
2565$4
2566#include <$2>
2567_ACEOF
2568if ac_fn_c_try_compile "$LINENO"; then :
2569 eval "$3=yes"
2570else
2571 eval "$3=no"
2572fi
2573rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2574fi
2575eval ac_res=\$$3
2576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2577$as_echo "$ac_res" >&6; }
a9bec17c 2578 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
067d23c9
KY
2579
2580} # ac_fn_c_check_header_compile
2581
1fd182f0
PE
2582# ac_fn_c_try_link LINENO
2583# -----------------------
2584# Try to link conftest.$ac_ext, and return whether this succeeded.
2585ac_fn_c_try_link ()
2586{
2587 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2588 rm -f conftest.$ac_objext conftest$ac_exeext
2589 if { { ac_try="$ac_link"
2590case "(($ac_try" in
2591 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2592 *) ac_try_echo=$ac_try;;
2593esac
2594eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2595$as_echo "$ac_try_echo"; } >&5
2596 (eval "$ac_link") 2>conftest.err
2597 ac_status=$?
2598 if test -s conftest.err; then
2599 grep -v '^ *+' conftest.err >conftest.er1
2600 cat conftest.er1 >&5
2601 mv -f conftest.er1 conftest.err
2602 fi
2603 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2604 test $ac_status = 0; } && {
2605 test -z "$ac_c_werror_flag" ||
2606 test ! -s conftest.err
2607 } && test -s conftest$ac_exeext && {
2608 test "$cross_compiling" = yes ||
2609 $as_test_x conftest$ac_exeext
2610 }; then :
2611 ac_retval=0
2612else
2613 $as_echo "$as_me: failed program was:" >&5
2614sed 's/^/| /' conftest.$ac_ext >&5
2615
2616 ac_retval=1
2617fi
2618 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2619 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2620 # interfere with the next link command; also delete a directory that is
2621 # left behind by Apple's compiler. We do this before executing the actions.
2622 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
a9bec17c 2623 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1fd182f0
PE
2624 as_fn_set_status $ac_retval
2625
2626} # ac_fn_c_try_link
2627
42bbbe8b
GM
2628# ac_fn_c_check_decl LINENO SYMBOL VAR
2629# ------------------------------------
2630# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2631ac_fn_c_check_decl ()
2632{
2633 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5
2635$as_echo_n "checking whether $2 is declared... " >&6; }
2636if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2637 $as_echo_n "(cached) " >&6
2638else
2639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2640/* end confdefs.h. */
2641$4
2642int
2643main ()
2644{
2645#ifndef $2
2646 (void) $2;
2647#endif
2648
2649 ;
2650 return 0;
2651}
2652_ACEOF
2653if ac_fn_c_try_compile "$LINENO"; then :
2654 eval "$3=yes"
2655else
2656 eval "$3=no"
2657fi
2658rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2659fi
2660eval ac_res=\$$3
2661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2662$as_echo "$ac_res" >&6; }
2663 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2664
2665} # ac_fn_c_check_decl
2666
5476a9a4
GM
2667# ac_fn_c_check_header_preproc LINENO HEADER VAR
2668# ----------------------------------------------
2669# Tests whether HEADER is present, setting the cache variable VAR accordingly.
2670ac_fn_c_check_header_preproc ()
067d23c9
KY
2671{
2672 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2674$as_echo_n "checking for $2... " >&6; }
a9bec17c 2675if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
067d23c9
KY
2676 $as_echo_n "(cached) " >&6
2677else
2678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2679/* end confdefs.h. */
5476a9a4
GM
2680#include <$2>
2681_ACEOF
2682if ac_fn_c_try_cpp "$LINENO"; then :
2683 eval "$3=yes"
2684else
2685 eval "$3=no"
2686fi
2687rm -f conftest.err conftest.$ac_ext
2688fi
2689eval ac_res=\$$3
2690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2691$as_echo "$ac_res" >&6; }
2692 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
067d23c9 2693
5476a9a4 2694} # ac_fn_c_check_header_preproc
067d23c9 2695
5476a9a4
GM
2696# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2697# ----------------------------------------------------
2698# Tries to find if the field MEMBER exists in type AGGR, after including
2699# INCLUDES, setting cache variable VAR accordingly.
2700ac_fn_c_check_member ()
2701{
2702 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2703 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2704$as_echo_n "checking for $2.$3... " >&6; }
2705if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2706 $as_echo_n "(cached) " >&6
2707else
2708 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2709/* end confdefs.h. */
2710$5
2711int
2712main ()
2713{
2714static $2 ac_aggr;
2715if (ac_aggr.$3)
2716return 0;
2717 ;
2718 return 0;
2719}
2720_ACEOF
2721if ac_fn_c_try_compile "$LINENO"; then :
2722 eval "$4=yes"
2723else
2724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2725/* end confdefs.h. */
2726$5
2727int
2728main ()
2729{
2730static $2 ac_aggr;
2731if (sizeof ac_aggr.$3)
2732return 0;
2733 ;
2734 return 0;
2735}
2736_ACEOF
2737if ac_fn_c_try_compile "$LINENO"; then :
2738 eval "$4=yes"
2739else
2740 eval "$4=no"
2741fi
2742rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2743fi
2744rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2745fi
2746eval ac_res=\$$4
2747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2748$as_echo "$ac_res" >&6; }
2749 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2750
2751} # ac_fn_c_check_member
2752
2753# ac_fn_c_check_func LINENO FUNC VAR
2754# ----------------------------------
2755# Tests whether FUNC exists, setting the cache variable VAR accordingly
2756ac_fn_c_check_func ()
2757{
2758 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2760$as_echo_n "checking for $2... " >&6; }
2761if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2762 $as_echo_n "(cached) " >&6
2763else
2764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2765/* end confdefs.h. */
2766/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2767 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2768#define $2 innocuous_$2
2769
2770/* System header to define __stub macros and hopefully few prototypes,
2771 which can conflict with char $2 (); below.
2772 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2773 <limits.h> exists even on freestanding compilers. */
2774
2775#ifdef __STDC__
067d23c9
KY
2776# include <limits.h>
2777#else
2778# include <assert.h>
2779#endif
2780
2781#undef $2
2782
2783/* Override any GCC internal prototype to avoid an error.
2784 Use char because int might match the return type of a GCC
2785 builtin and then its argument prototype would still apply. */
2786#ifdef __cplusplus
2787extern "C"
2788#endif
2789char $2 ();
2790/* The GNU C library defines this for functions which it implements
2791 to always fail with ENOSYS. Some functions are actually named
2792 something starting with __ and the normal name is an alias. */
2793#if defined __stub_$2 || defined __stub___$2
2794choke me
2795#endif
2796
2797int
2798main ()
2799{
2800return $2 ();
2801 ;
2802 return 0;
2803}
2804_ACEOF
2805if ac_fn_c_try_link "$LINENO"; then :
2806 eval "$3=yes"
2807else
2808 eval "$3=no"
2809fi
2810rm -f core conftest.err conftest.$ac_objext \
2811 conftest$ac_exeext conftest.$ac_ext
2812fi
2813eval ac_res=\$$3
2814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2815$as_echo "$ac_res" >&6; }
a9bec17c 2816 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
067d23c9
KY
2817
2818} # ac_fn_c_check_func
2819
5476a9a4
GM
2820# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2821# -------------------------------------------
2822# Tests whether TYPE exists after having included INCLUDES, setting cache
2823# variable VAR accordingly.
2824ac_fn_c_check_type ()
3e0be4ab
GM
2825{
2826 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
5476a9a4
GM
2827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2828$as_echo_n "checking for $2... " >&6; }
2829if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
3e0be4ab
GM
2830 $as_echo_n "(cached) " >&6
2831else
5476a9a4 2832 eval "$3=no"
3e0be4ab
GM
2833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2834/* end confdefs.h. */
5476a9a4 2835$4
3e0be4ab
GM
2836int
2837main ()
2838{
5476a9a4
GM
2839if (sizeof ($2))
2840 return 0;
3e0be4ab
GM
2841 ;
2842 return 0;
2843}
2844_ACEOF
2845if ac_fn_c_try_compile "$LINENO"; then :
2846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2847/* end confdefs.h. */
5476a9a4 2848$4
3e0be4ab
GM
2849int
2850main ()
2851{
5476a9a4
GM
2852if (sizeof (($2)))
2853 return 0;
3e0be4ab
GM
2854 ;
2855 return 0;
2856}
2857_ACEOF
2858if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4 2859
3e0be4ab 2860else
5476a9a4 2861 eval "$3=yes"
3e0be4ab
GM
2862fi
2863rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2864fi
2865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2866fi
5476a9a4 2867eval ac_res=\$$3
3e0be4ab
GM
2868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2869$as_echo "$ac_res" >&6; }
a9bec17c 2870 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
3e0be4ab 2871
5476a9a4 2872} # ac_fn_c_check_type
3e0be4ab 2873
5f90be1b
PE
2874# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2875# --------------------------------------------
2876# Tries to find the compile-time value of EXPR in a program that includes
2877# INCLUDES, setting VAR accordingly. Returns whether the value could be
2878# computed
2879ac_fn_c_compute_int ()
2880{
2881 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2882 if test "$cross_compiling" = yes; then
2883 # Depending upon the size, compute the lo and hi bounds.
2884cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2885/* end confdefs.h. */
2886$4
2887int
2888main ()
2889{
2890static int test_array [1 - 2 * !(($2) >= 0)];
2891test_array [0] = 0
2892
2893 ;
2894 return 0;
2895}
2896_ACEOF
2897if ac_fn_c_try_compile "$LINENO"; then :
2898 ac_lo=0 ac_mid=0
2899 while :; do
2900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2901/* end confdefs.h. */
2902$4
2903int
2904main ()
2905{
2906static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2907test_array [0] = 0
2908
2909 ;
2910 return 0;
2911}
2912_ACEOF
2913if ac_fn_c_try_compile "$LINENO"; then :
2914 ac_hi=$ac_mid; break
2915else
2916 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2917 if test $ac_lo -le $ac_mid; then
2918 ac_lo= ac_hi=
2919 break
2920 fi
2921 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2922fi
2923rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2924 done
2925else
2926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2927/* end confdefs.h. */
2928$4
2929int
2930main ()
2931{
2932static int test_array [1 - 2 * !(($2) < 0)];
2933test_array [0] = 0
2934
2935 ;
2936 return 0;
2937}
2938_ACEOF
2939if ac_fn_c_try_compile "$LINENO"; then :
2940 ac_hi=-1 ac_mid=-1
2941 while :; do
2942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2943/* end confdefs.h. */
2944$4
2945int
2946main ()
2947{
2948static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2949test_array [0] = 0
2950
2951 ;
2952 return 0;
2953}
2954_ACEOF
2955if ac_fn_c_try_compile "$LINENO"; then :
2956 ac_lo=$ac_mid; break
2957else
2958 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2959 if test $ac_mid -le $ac_hi; then
2960 ac_lo= ac_hi=
2961 break
2962 fi
2963 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2964fi
2965rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2966 done
2967else
2968 ac_lo= ac_hi=
2969fi
2970rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2971fi
2972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2973# Binary search between lo and hi bounds.
2974while test "x$ac_lo" != "x$ac_hi"; do
2975 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2977/* end confdefs.h. */
2978$4
2979int
2980main ()
2981{
2982static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2983test_array [0] = 0
2984
2985 ;
2986 return 0;
2987}
2988_ACEOF
2989if ac_fn_c_try_compile "$LINENO"; then :
2990 ac_hi=$ac_mid
2991else
2992 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2993fi
2994rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2995done
2996case $ac_lo in #((
2997?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2998'') ac_retval=1 ;;
2999esac
3000 else
3001 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3002/* end confdefs.h. */
3003$4
3004static long int longval () { return $2; }
3005static unsigned long int ulongval () { return $2; }
3006#include <stdio.h>
3007#include <stdlib.h>
3008int
3009main ()
3010{
3011
3012 FILE *f = fopen ("conftest.val", "w");
3013 if (! f)
3014 return 1;
3015 if (($2) < 0)
3016 {
3017 long int i = longval ();
3018 if (i != ($2))
3019 return 1;
3020 fprintf (f, "%ld", i);
3021 }
3022 else
3023 {
3024 unsigned long int i = ulongval ();
3025 if (i != ($2))
3026 return 1;
3027 fprintf (f, "%lu", i);
3028 }
3029 /* Do not output a trailing newline, as this causes \r\n confusion
3030 on some platforms. */
3031 return ferror (f) || fclose (f) != 0;
3032
3033 ;
3034 return 0;
3035}
3036_ACEOF
3037if ac_fn_c_try_run "$LINENO"; then :
3038 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
3039else
3040 ac_retval=1
3041fi
3042rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3043 conftest.$ac_objext conftest.beam conftest.$ac_ext
3044rm -f conftest.val
3045
3046 fi
a9bec17c 3047 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
5f90be1b
PE
3048 as_fn_set_status $ac_retval
3049
3050} # ac_fn_c_compute_int
067d23c9
KY
3051cat >config.log <<_ACEOF
3052This file contains any messages produced by compilers while
3053running configure, to aid debugging if configure makes a mistake.
3054
c574bc34 3055It was created by emacs $as_me 24.3.50, which was
a9bec17c 3056generated by GNU Autoconf 2.65. Invocation command line was
067d23c9
KY
3057
3058 $ $0 $@
3059
3060_ACEOF
3061exec 5>>config.log
3062{
3063cat <<_ASUNAME
3064## --------- ##
3065## Platform. ##
3066## --------- ##
3067
3068hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3069uname -m = `(uname -m) 2>/dev/null || echo unknown`
3070uname -r = `(uname -r) 2>/dev/null || echo unknown`
3071uname -s = `(uname -s) 2>/dev/null || echo unknown`
3072uname -v = `(uname -v) 2>/dev/null || echo unknown`
3073
3074/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3075/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
3076
3077/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
3078/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
3079/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3080/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
3081/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
3082/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
3083/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
3084
3085_ASUNAME
3086
3087as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3088for as_dir in $PATH
3089do
3090 IFS=$as_save_IFS
3091 test -z "$as_dir" && as_dir=.
3092 $as_echo "PATH: $as_dir"
3093 done
3094IFS=$as_save_IFS
3095
3096} >&5
3097
3098cat >&5 <<_ACEOF
3099
3100
3101## ----------- ##
3102## Core tests. ##
3103## ----------- ##
3104
3105_ACEOF
3106
3107
3108# Keep a trace of the command line.
3109# Strip out --no-create and --no-recursion so they do not pile up.
3110# Strip out --silent because we don't want to record it for future runs.
3111# Also quote any args containing shell meta-characters.
3112# Make two passes to allow for proper duplicate-argument suppression.
3113ac_configure_args=
3114ac_configure_args0=
3115ac_configure_args1=
3116ac_must_keep_next=false
3117for ac_pass in 1 2
3118do
3119 for ac_arg
3120 do
3121 case $ac_arg in
3122 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3123 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3124 | -silent | --silent | --silen | --sile | --sil)
3125 continue ;;
3126 *\'*)
3127 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3128 esac
3129 case $ac_pass in
3130 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3131 2)
3132 as_fn_append ac_configure_args1 " '$ac_arg'"
3133 if test $ac_must_keep_next = true; then
3134 ac_must_keep_next=false # Got value, back to normal.
3135 else
3136 case $ac_arg in
3137 *=* | --config-cache | -C | -disable-* | --disable-* \
3138 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3139 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3140 | -with-* | --with-* | -without-* | --without-* | --x)
3141 case "$ac_configure_args0 " in
3142 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3143 esac
3144 ;;
3145 -* ) ac_must_keep_next=true ;;
3146 esac
3147 fi
3148 as_fn_append ac_configure_args " '$ac_arg'"
3149 ;;
3150 esac
3151 done
3152done
3153{ ac_configure_args0=; unset ac_configure_args0;}
3154{ ac_configure_args1=; unset ac_configure_args1;}
3155
3156# When interrupted or exit'd, cleanup temporary files, and complete
3157# config.log. We remove comments because anyway the quotes in there
3158# would cause problems or look ugly.
3159# WARNING: Use '\'' to represent an apostrophe within the trap.
3160# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3161trap 'exit_status=$?
3162 # Save into config.log some information that might help in debugging.
3163 {
3164 echo
3165
a9bec17c
GM
3166 cat <<\_ASBOX
3167## ---------------- ##
067d23c9 3168## Cache variables. ##
a9bec17c
GM
3169## ---------------- ##
3170_ASBOX
067d23c9
KY
3171 echo
3172 # The following way of writing the cache mishandles newlines in values,
3173(
3174 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3175 eval ac_val=\$$ac_var
3176 case $ac_val in #(
3177 *${as_nl}*)
3178 case $ac_var in #(
3179 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3180$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3181 esac
3182 case $ac_var in #(
3183 _ | IFS | as_nl) ;; #(
3184 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3185 *) { eval $ac_var=; unset $ac_var;} ;;
3186 esac ;;
3187 esac
3188 done
3189 (set) 2>&1 |
3190 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3191 *${as_nl}ac_space=\ *)
3192 sed -n \
3193 "s/'\''/'\''\\\\'\'''\''/g;
3194 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3195 ;; #(
3196 *)
3197 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3198 ;;
3199 esac |
3200 sort
3201)
3202 echo
3203
a9bec17c
GM
3204 cat <<\_ASBOX
3205## ----------------- ##
067d23c9 3206## Output variables. ##
a9bec17c
GM
3207## ----------------- ##
3208_ASBOX
067d23c9
KY
3209 echo
3210 for ac_var in $ac_subst_vars
3211 do
3212 eval ac_val=\$$ac_var
3213 case $ac_val in
3214 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3215 esac
3216 $as_echo "$ac_var='\''$ac_val'\''"
3217 done | sort
3218 echo
3219
3220 if test -n "$ac_subst_files"; then
a9bec17c
GM
3221 cat <<\_ASBOX
3222## ------------------- ##
067d23c9 3223## File substitutions. ##
a9bec17c
GM
3224## ------------------- ##
3225_ASBOX
067d23c9
KY
3226 echo
3227 for ac_var in $ac_subst_files
3228 do
3229 eval ac_val=\$$ac_var
3230 case $ac_val in
3231 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3232 esac
3233 $as_echo "$ac_var='\''$ac_val'\''"
3234 done | sort
3235 echo
3236 fi
3237
3238 if test -s confdefs.h; then
a9bec17c
GM
3239 cat <<\_ASBOX
3240## ----------- ##
067d23c9 3241## confdefs.h. ##
a9bec17c
GM
3242## ----------- ##
3243_ASBOX
067d23c9
KY
3244 echo
3245 cat confdefs.h
3246 echo
3247 fi
3248 test "$ac_signal" != 0 &&
3249 $as_echo "$as_me: caught signal $ac_signal"
3250 $as_echo "$as_me: exit $exit_status"
3251 } >&5
3252 rm -f core *.core core.conftest.* &&
3253 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3254 exit $exit_status
3255' 0
3256for ac_signal in 1 2 13 15; do
3257 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3258done
3259ac_signal=0
3260
3261# confdefs.h avoids OS command line length limits that DEFS can exceed.
3262rm -f -r conftest* confdefs.h
3263
3264$as_echo "/* confdefs.h */" > confdefs.h
3265
3266# Predefined preprocessor variables.
3267
3268cat >>confdefs.h <<_ACEOF
3269#define PACKAGE_NAME "$PACKAGE_NAME"
3270_ACEOF
3271
3272cat >>confdefs.h <<_ACEOF
3273#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3274_ACEOF
3275
3276cat >>confdefs.h <<_ACEOF
3277#define PACKAGE_VERSION "$PACKAGE_VERSION"
3278_ACEOF
3279
3280cat >>confdefs.h <<_ACEOF
3281#define PACKAGE_STRING "$PACKAGE_STRING"
3282_ACEOF
3283
3284cat >>confdefs.h <<_ACEOF
3285#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3286_ACEOF
3287
3288cat >>confdefs.h <<_ACEOF
3289#define PACKAGE_URL "$PACKAGE_URL"
3290_ACEOF
3291
3292
3293# Let the site file select an alternate cache file if it wants to.
3294# Prefer an explicitly selected file to automatically selected ones.
3295ac_site_file1=NONE
3296ac_site_file2=NONE
3297if test -n "$CONFIG_SITE"; then
a9bec17c 3298 ac_site_file1=$CONFIG_SITE
067d23c9
KY
3299elif test "x$prefix" != xNONE; then
3300 ac_site_file1=$prefix/share/config.site
3301 ac_site_file2=$prefix/etc/config.site
3302else
3303 ac_site_file1=$ac_default_prefix/share/config.site
3304 ac_site_file2=$ac_default_prefix/etc/config.site
3305fi
3306for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3307do
3308 test "x$ac_site_file" = xNONE && continue
3309 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3310 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3311$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3312 sed 's/^/| /' "$ac_site_file" >&5
a9bec17c 3313 . "$ac_site_file"
067d23c9
KY
3314 fi
3315done
3316
3317if test -r "$cache_file"; then
3318 # Some versions of bash will fail to source /dev/null (special files
3319 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
3320 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3321 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3322$as_echo "$as_me: loading cache $cache_file" >&6;}
3323 case $cache_file in
3324 [\\/]* | ?:[\\/]* ) . "$cache_file";;
3325 *) . "./$cache_file";;
3326 esac
3327 fi
3328else
3329 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3330$as_echo "$as_me: creating cache $cache_file" >&6;}
3331 >$cache_file
3332fi
3333
5476a9a4
GM
3334as_fn_append ac_header_list " linux/version.h"
3335as_fn_append ac_header_list " sys/systeminfo.h"
5476a9a4
GM
3336as_fn_append ac_header_list " coff.h"
3337as_fn_append ac_header_list " pty.h"
5476a9a4
GM
3338as_fn_append ac_header_list " sys/resource.h"
3339as_fn_append ac_header_list " sys/utsname.h"
3340as_fn_append ac_header_list " pwd.h"
3341as_fn_append ac_header_list " utmp.h"
5476a9a4
GM
3342as_fn_append ac_header_list " util.h"
3343as_fn_append ac_header_list " sys/socket.h"
3344as_fn_append ac_header_list " stdlib.h"
3345as_fn_append ac_header_list " unistd.h"
7e723570 3346as_fn_append ac_header_list " sys/param.h"
5476a9a4
GM
3347as_fn_append ac_header_list " pthread.h"
3348as_fn_append ac_header_list " malloc/malloc.h"
3349as_fn_append ac_header_list " maillock.h"
3350as_fn_append ac_header_list " sys/un.h"
3351as_fn_append ac_func_list " tzset"
3352as_fn_append ac_func_list " readlinkat"
d7ad186c 3353as_fn_append ac_header_list " dirent.h"
8966cbff 3354as_fn_append ac_header_list " execinfo.h"
710f5812 3355as_fn_append ac_func_list " faccessat"
d7ad186c 3356as_fn_append ac_func_list " fdopendir"
eda33f78 3357as_fn_append ac_header_list " stdio_ext.h"
3bf26e96 3358as_fn_append ac_func_list " __fpending"
d7ad186c 3359as_fn_append ac_func_list " fstatat"
2407788f 3360as_fn_append ac_func_list " fsync"
f199cab1
GM
3361gl_getopt_required=GNU
3362as_fn_append ac_header_list " getopt.h"
3363as_fn_append ac_func_list " gettimeofday"
3364as_fn_append ac_func_list " nanotime"
e700232f 3365as_fn_append ac_header_list " sys/time.h"
f199cab1
GM
3366as_fn_append ac_header_list " wchar.h"
3367as_fn_append ac_header_list " stdint.h"
3368as_fn_append ac_header_list " inttypes.h"
3369as_fn_append ac_func_list " lstat"
f199cab1
GM
3370as_fn_append ac_header_list " sys/select.h"
3371as_fn_append ac_func_list " pselect"
3372as_fn_append ac_func_list " pthread_sigmask"
3373as_fn_append ac_func_list " readlink"
f199cab1
GM
3374as_fn_append ac_func_list " strtoimax"
3375as_fn_append ac_func_list " strtoumax"
3376as_fn_append ac_func_list " symlink"
3377as_fn_append ac_header_list " sys/stat.h"
3378as_fn_append ac_func_list " localtime_r"
e700232f 3379as_fn_append ac_header_list " utime.h"
f199cab1
GM
3380as_fn_append ac_func_list " futimes"
3381as_fn_append ac_func_list " futimesat"
3382as_fn_append ac_func_list " futimens"
3383as_fn_append ac_func_list " utimensat"
3384as_fn_append ac_func_list " lutimes"
067d23c9
KY
3385# Check that the precious variables saved in the cache have kept the same
3386# value.
3387ac_cache_corrupted=false
3388for ac_var in $ac_precious_vars; do
3389 eval ac_old_set=\$ac_cv_env_${ac_var}_set
3390 eval ac_new_set=\$ac_env_${ac_var}_set
3391 eval ac_old_val=\$ac_cv_env_${ac_var}_value
3392 eval ac_new_val=\$ac_env_${ac_var}_value
3393 case $ac_old_set,$ac_new_set in
3394 set,)
3395 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3396$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3397 ac_cache_corrupted=: ;;
3398 ,set)
3399 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3400$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3401 ac_cache_corrupted=: ;;
3402 ,);;
3403 *)
3404 if test "x$ac_old_val" != "x$ac_new_val"; then
3405 # differences in whitespace do not lead to failure.
3406 ac_old_val_w=`echo x $ac_old_val`
3407 ac_new_val_w=`echo x $ac_new_val`
3408 if test "$ac_old_val_w" != "$ac_new_val_w"; then
3409 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3410$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3411 ac_cache_corrupted=:
3412 else
3413 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3414$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3415 eval $ac_var=\$ac_old_val
3416 fi
3417 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
3418$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
3419 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
3420$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
3421 fi;;
3422 esac
3423 # Pass precious variables to config.status.
3424 if test "$ac_new_set" = set; then
3425 case $ac_new_val in
3426 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3427 *) ac_arg=$ac_var=$ac_new_val ;;
3428 esac
3429 case " $ac_configure_args " in
3430 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
3431 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3432 esac
3433 fi
3434done
3435if $ac_cache_corrupted; then
3436 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3437$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3438 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3439$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
a9bec17c 3440 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
067d23c9
KY
3441fi
3442## -------------------- ##
3443## Main body of script. ##
3444## -------------------- ##
3445
3446ac_ext=c
3447ac_cpp='$CPP $CPPFLAGS'
3448ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3449ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3450ac_compiler_gnu=$ac_cv_c_compiler_gnu
3451
3452
2f559cd2 3453
e25a10b7 3454emacs_config_options="$@"
2f559cd2
GM
3455## Add some environment variables, if they were passed via the environment
3456## rather than on the command-line.
3457for var in CFLAGS CPPFLAGS LDFLAGS; do
3458 case "$emacs_config_options" in
3459 *$var=*) continue ;;
3460 esac
3461 eval val="\$${var}"
3462 test x"$val" = x && continue
71b84316 3463 emacs_config_options="${emacs_config_options}${emacs_config_options:+ }$var=\"$val\""
2f559cd2
GM
3464done
3465
067d23c9
KY
3466ac_config_headers="$ac_config_headers src/config.h:src/config.in"
3467
3468
743c80a7 3469ac_aux_dir=
369e19fc 3470for ac_dir in build-aux "$srcdir"/build-aux; do
a9bec17c
GM
3471 for ac_t in install-sh install.sh shtool; do
3472 if test -f "$ac_dir/$ac_t"; then
3473 ac_aux_dir=$ac_dir
3474 ac_install_sh="$ac_aux_dir/$ac_t -c"
3475 break 2
3476 fi
3477 done
743c80a7
PE
3478done
3479if test -z "$ac_aux_dir"; then
a9bec17c 3480 as_fn_error "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
743c80a7 3481fi
067d23c9 3482
743c80a7
PE
3483# These three variables are undocumented and unsupported,
3484# and are intended to be withdrawn in a future Autoconf release.
3485# They can cause serious problems if a builder's source tree is in a directory
3486# whose full name contains unusual characters.
3487ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
3488ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
3489ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
067d23c9 3490
067d23c9 3491
369e19fc
PE
3492am__api_version='1.11'
3493
743c80a7
PE
3494# Find a good install program. We prefer a C program (faster),
3495# so one script is as good as another. But avoid the broken or
3496# incompatible versions:
3497# SysV /etc/install, /usr/sbin/install
3498# SunOS /usr/etc/install
3499# IRIX /sbin/install
3500# AIX /bin/install
3501# AmigaOS /C/install, which installs bootblocks on floppy discs
3502# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3503# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3504# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3505# OS/2's system install, which has a completely different semantic
3506# ./install, which can be erroneously created by make from ./install.sh.
3507# Reject install programs that cannot install multiple files.
3508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
3509$as_echo_n "checking for a BSD-compatible install... " >&6; }
3510if test -z "$INSTALL"; then
a9bec17c 3511if test "${ac_cv_path_install+set}" = set; then :
743c80a7
PE
3512 $as_echo_n "(cached) " >&6
3513else
3514 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3515for as_dir in $PATH
3516do
3517 IFS=$as_save_IFS
3518 test -z "$as_dir" && as_dir=.
3519 # Account for people who put trailing slashes in PATH elements.
3520case $as_dir/ in #((
3521 ./ | .// | /[cC]/* | \
3522 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3523 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
3524 /usr/ucb/* ) ;;
3525 *)
3526 # OSF1 and SCO ODT 3.0 have their own names for install.
3527 # Don't use installbsd from OSF since it installs stuff as root
3528 # by default.
3529 for ac_prog in ginstall scoinst install; do
3530 for ac_exec_ext in '' $ac_executable_extensions; do
3531 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
3532 if test $ac_prog = install &&
3533 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3534 # AIX install. It has an incompatible calling convention.
3535 :
3536 elif test $ac_prog = install &&
3537 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3538 # program-specific install script used by HP pwplus--don't use.
3539 :
3540 else
3541 rm -rf conftest.one conftest.two conftest.dir
3542 echo one > conftest.one
3543 echo two > conftest.two
3544 mkdir conftest.dir
3545 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
3546 test -s conftest.one && test -s conftest.two &&
3547 test -s conftest.dir/conftest.one &&
3548 test -s conftest.dir/conftest.two
3549 then
3550 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3551 break 3
3552 fi
3553 fi
3554 fi
3555 done
3556 done
3557 ;;
3558esac
067d23c9 3559
743c80a7
PE
3560 done
3561IFS=$as_save_IFS
067d23c9 3562
743c80a7 3563rm -rf conftest.one conftest.two conftest.dir
067d23c9 3564
067d23c9 3565fi
743c80a7
PE
3566 if test "${ac_cv_path_install+set}" = set; then
3567 INSTALL=$ac_cv_path_install
3568 else
3569 # As a last resort, use the slow shell script. Don't cache a
3570 # value for INSTALL within a source directory, because that will
3571 # break other packages using the cache if that directory is
3572 # removed, or if the value is a relative name.
3573 INSTALL=$ac_install_sh
3574 fi
067d23c9 3575fi
743c80a7
PE
3576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
3577$as_echo "$INSTALL" >&6; }
067d23c9 3578
743c80a7
PE
3579# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3580# It thinks the first close brace ends the variable substitution.
3581test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
067d23c9 3582
743c80a7 3583test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
067d23c9 3584
743c80a7 3585test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
067d23c9 3586
743c80a7
PE
3587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
3588$as_echo_n "checking whether build environment is sane... " >&6; }
3589# Just in case
3590sleep 1
3591echo timestamp > conftest.file
3592# Reject unsafe characters in $srcdir or the absolute working directory
3593# name. Accept space and tab only in the latter.
3594am_lf='
3595'
3596case `pwd` in
3597 *[\\\"\#\$\&\'\`$am_lf]*)
a9bec17c 3598 as_fn_error "unsafe absolute working directory name" "$LINENO" 5;;
743c80a7
PE
3599esac
3600case $srcdir in
3601 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
a9bec17c 3602 as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
743c80a7 3603esac
067d23c9 3604
743c80a7
PE
3605# Do `set' in a subshell so we don't clobber the current shell's
3606# arguments. Must try -L first in case configure is actually a
3607# symlink; some systems play weird games with the mod time of symlinks
3608# (eg FreeBSD returns the mod time of the symlink's containing
3609# directory).
3610if (
3611 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
3612 if test "$*" = "X"; then
3613 # -L didn't work.
3614 set X `ls -t "$srcdir/configure" conftest.file`
3615 fi
3616 rm -f conftest.file
3617 if test "$*" != "X $srcdir/configure conftest.file" \
3618 && test "$*" != "X conftest.file $srcdir/configure"; then
3619
3620 # If neither matched, then we have a broken ls. This can happen
3621 # if, for instance, CONFIG_SHELL is bash and it inherits a
3622 # broken ls alias from the environment. This has actually
3623 # happened. Such a system could not be considered "sane".
a9bec17c 3624 as_fn_error "ls -t appears to fail. Make sure there is not a broken
743c80a7
PE
3625alias in your environment" "$LINENO" 5
3626 fi
067d23c9 3627
743c80a7
PE
3628 test "$2" = conftest.file
3629 )
3630then
3631 # Ok.
3632 :
067d23c9 3633else
a9bec17c 3634 as_fn_error "newly created file is older than distributed files!
743c80a7 3635Check your system clock" "$LINENO" 5
067d23c9 3636fi
743c80a7
PE
3637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3638$as_echo "yes" >&6; }
3639test "$program_prefix" != NONE &&
3640 program_transform_name="s&^&$program_prefix&;$program_transform_name"
3641# Use a double $ so make ignores it.
3642test "$program_suffix" != NONE &&
3643 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
3644# Double any \ or $.
3645# By default was `s,x,x', remove it if useless.
3646ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
3647program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
067d23c9 3648
743c80a7
PE
3649# expand $ac_aux_dir to an absolute path
3650am_aux_dir=`cd $ac_aux_dir && pwd`
067d23c9 3651
743c80a7
PE
3652if test x"${MISSING+set}" != xset; then
3653 case $am_aux_dir in
3654 *\ * | *\ *)
3655 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
3656 *)
3657 MISSING="\${SHELL} $am_aux_dir/missing" ;;
3658 esac
067d23c9 3659fi
743c80a7
PE
3660# Use eval to expand $SHELL
3661if eval "$MISSING --run true"; then
3662 am_missing_run="$MISSING --run "
067d23c9 3663else
743c80a7
PE
3664 am_missing_run=
3665 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
3666$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
067d23c9
KY
3667fi
3668
743c80a7
PE
3669if test x"${install_sh}" != xset; then
3670 case $am_aux_dir in
3671 *\ * | *\ *)
3672 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
3673 *)
3674 install_sh="\${SHELL} $am_aux_dir/install-sh"
3675 esac
067d23c9
KY
3676fi
3677
743c80a7
PE
3678# Installed binaries are usually stripped using `strip' when the user
3679# run `make install-strip'. However `strip' might not be the right
3680# tool to use in cross-compilation environments, therefore Automake
3681# will honor the `STRIP' environment variable to overrule this program.
3682if test "$cross_compiling" != no; then
3683 if test -n "$ac_tool_prefix"; then
3684 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
3685set dummy ${ac_tool_prefix}strip; ac_word=$2
3686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3687$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 3688if test "${ac_cv_prog_STRIP+set}" = set; then :
743c80a7 3689 $as_echo_n "(cached) " >&6
067d23c9 3690else
743c80a7
PE
3691 if test -n "$STRIP"; then
3692 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
3693else
3694as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3695for as_dir in $PATH
3696do
3697 IFS=$as_save_IFS
3698 test -z "$as_dir" && as_dir=.
3699 for ac_exec_ext in '' $ac_executable_extensions; do
3700 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3701 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
3702 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3703 break 2
3704 fi
3705done
3706 done
3707IFS=$as_save_IFS
067d23c9
KY
3708
3709fi
067d23c9 3710fi
743c80a7
PE
3711STRIP=$ac_cv_prog_STRIP
3712if test -n "$STRIP"; then
3713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
3714$as_echo "$STRIP" >&6; }
3715else
3716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3717$as_echo "no" >&6; }
067d23c9
KY
3718fi
3719
3720
067d23c9 3721fi
743c80a7
PE
3722if test -z "$ac_cv_prog_STRIP"; then
3723 ac_ct_STRIP=$STRIP
3724 # Extract the first word of "strip", so it can be a program name with args.
3725set dummy strip; ac_word=$2
3726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3727$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 3728if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
743c80a7
PE
3729 $as_echo_n "(cached) " >&6
3730else
3731 if test -n "$ac_ct_STRIP"; then
3732 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
3733else
3734as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3735for as_dir in $PATH
3736do
3737 IFS=$as_save_IFS
3738 test -z "$as_dir" && as_dir=.
3739 for ac_exec_ext in '' $ac_executable_extensions; do
3740 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3741 ac_cv_prog_ac_ct_STRIP="strip"
3742 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3743 break 2
3744 fi
3745done
3746 done
3747IFS=$as_save_IFS
3748
3749fi
3750fi
3751ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
3752if test -n "$ac_ct_STRIP"; then
3753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
3754$as_echo "$ac_ct_STRIP" >&6; }
3755else
3756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3757$as_echo "no" >&6; }
3758fi
3759
3760 if test "x$ac_ct_STRIP" = x; then
3761 STRIP=":"
3762 else
3763 case $cross_compiling:$ac_tool_warned in
3764yes:)
3765{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3766$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3767ac_tool_warned=yes ;;
3768esac
3769 STRIP=$ac_ct_STRIP
3770 fi
3771else
3772 STRIP="$ac_cv_prog_STRIP"
3773fi
3774
3775fi
3776INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
3777
3778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
3779$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
3780if test -z "$MKDIR_P"; then
a9bec17c 3781 if test "${ac_cv_path_mkdir+set}" = set; then :
743c80a7
PE
3782 $as_echo_n "(cached) " >&6
3783else
3784 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3785for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
3786do
3787 IFS=$as_save_IFS
3788 test -z "$as_dir" && as_dir=.
3789 for ac_prog in mkdir gmkdir; do
3790 for ac_exec_ext in '' $ac_executable_extensions; do
3791 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
3792 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
3793 'mkdir (GNU coreutils) '* | \
3794 'mkdir (coreutils) '* | \
3795 'mkdir (fileutils) '4.1*)
3796 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
3797 break 3;;
3798 esac
3799 done
3800 done
3801 done
3802IFS=$as_save_IFS
3803
3804fi
3805
3806 test -d ./--version && rmdir ./--version
3807 if test "${ac_cv_path_mkdir+set}" = set; then
3808 MKDIR_P="$ac_cv_path_mkdir -p"
3809 else
3810 # As a last resort, use the slow shell script. Don't cache a
3811 # value for MKDIR_P within a source directory, because that will
3812 # break other packages using the cache if that directory is
3813 # removed, or if the value is a relative name.
3814 MKDIR_P="$ac_install_sh -d"
3815 fi
3816fi
3817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
3818$as_echo "$MKDIR_P" >&6; }
3819
3820mkdir_p="$MKDIR_P"
3821case $mkdir_p in
3822 [\\/$]* | ?:[\\/]*) ;;
3823 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
3824esac
3825
3826for ac_prog in gawk mawk nawk awk
3827do
3828 # Extract the first word of "$ac_prog", so it can be a program name with args.
3829set dummy $ac_prog; ac_word=$2
3830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3831$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 3832if test "${ac_cv_prog_AWK+set}" = set; then :
743c80a7
PE
3833 $as_echo_n "(cached) " >&6
3834else
3835 if test -n "$AWK"; then
3836 ac_cv_prog_AWK="$AWK" # Let the user override the test.
3837else
3838as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3839for as_dir in $PATH
3840do
3841 IFS=$as_save_IFS
3842 test -z "$as_dir" && as_dir=.
3843 for ac_exec_ext in '' $ac_executable_extensions; do
3844 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3845 ac_cv_prog_AWK="$ac_prog"
3846 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3847 break 2
3848 fi
3849done
3850 done
3851IFS=$as_save_IFS
3852
3853fi
3854fi
3855AWK=$ac_cv_prog_AWK
3856if test -n "$AWK"; then
3857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
3858$as_echo "$AWK" >&6; }
3859else
3860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3861$as_echo "no" >&6; }
3862fi
3863
3864
3865 test -n "$AWK" && break
3866done
3867
3868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3869$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
3870set x ${MAKE-make}
3871ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
a9bec17c 3872if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
743c80a7
PE
3873 $as_echo_n "(cached) " >&6
3874else
3875 cat >conftest.make <<\_ACEOF
3876SHELL = /bin/sh
3877all:
3878 @echo '@@@%%%=$(MAKE)=@@@%%%'
3879_ACEOF
a9bec17c 3880# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
743c80a7
PE
3881case `${MAKE-make} -f conftest.make 2>/dev/null` in
3882 *@@@%%%=?*=@@@%%%*)
3883 eval ac_cv_prog_make_${ac_make}_set=yes;;
3884 *)
3885 eval ac_cv_prog_make_${ac_make}_set=no;;
3886esac
3887rm -f conftest.make
3888fi
3889if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3891$as_echo "yes" >&6; }
3892 SET_MAKE=
3893else
3894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3895$as_echo "no" >&6; }
3896 SET_MAKE="MAKE=${MAKE-make}"
3897fi
3898
3899rm -rf .tst 2>/dev/null
3900mkdir .tst 2>/dev/null
3901if test -d .tst; then
3902 am__leading_dot=.
3903else
3904 am__leading_dot=_
3905fi
3906rmdir .tst 2>/dev/null
3907
3908if test "`cd $srcdir && pwd`" != "`pwd`"; then
3909 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
3910 # is not polluted with repeated "-I."
3911 am__isrc=' -I$(srcdir)'
3912 # test to see if srcdir already configured
3913 if test -f $srcdir/config.status; then
a9bec17c 3914 as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
743c80a7
PE
3915 fi
3916fi
3917
3918# test whether we have cygpath
3919if test -z "$CYGPATH_W"; then
3920 if (cygpath --version) >/dev/null 2>/dev/null; then
3921 CYGPATH_W='cygpath -w'
3922 else
3923 CYGPATH_W=echo
3924 fi
3925fi
3926
3927
3928# Define the identity of the package.
3929 PACKAGE='emacs'
c574bc34 3930 VERSION='24.3.50'
743c80a7
PE
3931
3932
3933cat >>confdefs.h <<_ACEOF
3934#define PACKAGE "$PACKAGE"
3935_ACEOF
3936
3937
3938cat >>confdefs.h <<_ACEOF
3939#define VERSION "$VERSION"
3940_ACEOF
3941
3942# Some tools Automake needs.
3943
3944ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
3945
3946
3947AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
3948
3949
3950AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
3951
3952
3953AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
3954
3955
3956MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
3957
3958# We need awk for the "check" target. The system "awk" is bad on
3959# some platforms.
3960# Always define AMTAR for backward compatibility.
3961
3962AMTAR=${AMTAR-"${am_missing_run}tar"}
3963
3964am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
3965
3966
3967
3968
3969
3970
3971
3972
3973lispdir='${datadir}/emacs/${version}/lisp'
e1939eb1 3974leimdir='${datadir}/emacs/${version}/leim'
397f7161 3975standardlisppath='${lispdir}:${leimdir}'
743c80a7
PE
3976locallisppath='${datadir}/emacs/${version}/site-lisp:'\
3977'${datadir}/emacs/site-lisp'
397f7161 3978lisppath='${locallisppath}:${standardlisppath}'
743c80a7
PE
3979etcdir='${datadir}/emacs/${version}/etc'
3980archlibdir='${libexecdir}/emacs/${version}/${configuration}'
3981docdir='${datadir}/emacs/${version}/etc'
3982gamedir='${localstatedir}/games/emacs'
3983
ee77919d
GM
3984
3985# Check whether --with-all was given.
3986if test "${with_all+set}" = set; then :
3987 withval=$with_all; with_features=$withval
c0528ebe 3988else
ee77919d 3989 with_features=yes
c0528ebe
GM
3990fi
3991
3992
743c80a7
PE
3993
3994
3995
3996# Check whether --with-pop was given.
3997if test "${with_pop+set}" = set; then :
3998 withval=$with_pop;
3999else
ee77919d 4000 with_pop=$with_features
743c80a7
PE
4001fi
4002
4003if test "$with_pop" = yes; then
4004 $as_echo "#define MAIL_USE_POP 1" >>confdefs.h
4005
4006fi
4007
4008
4009# Check whether --with-kerberos was given.
4010if test "${with_kerberos+set}" = set; then :
4011 withval=$with_kerberos;
4012else
4013 with_kerberos=no
4014fi
4015
4016if test "$with_kerberos" != no; then
4017 $as_echo "#define KERBEROS 1" >>confdefs.h
4018
4019fi
4020
4021
4022# Check whether --with-kerberos5 was given.
4023if test "${with_kerberos5+set}" = set; then :
4024 withval=$with_kerberos5;
4025else
4026 with_kerberos5=no
4027fi
4028
4029if test "${with_kerberos5}" != no; then
4030 if test "${with_kerberos}" = no; then
4031 with_kerberos=yes
4032 $as_echo "#define KERBEROS 1" >>confdefs.h
4033
4034 fi
4035
4036$as_echo "#define KERBEROS5 1" >>confdefs.h
4037
4038fi
4039
4040
4041# Check whether --with-hesiod was given.
4042if test "${with_hesiod+set}" = set; then :
4043 withval=$with_hesiod;
4044else
4045 with_hesiod=no
4046fi
4047
4048if test "$with_hesiod" != no; then
4049
4050$as_echo "#define HESIOD 1" >>confdefs.h
4051
4052fi
4053
4054
4055# Check whether --with-mmdf was given.
4056if test "${with_mmdf+set}" = set; then :
4057 withval=$with_mmdf;
4058else
4059 with_mmdf=no
4060fi
4061
4062if test "$with_mmdf" != no; then
4063
4064$as_echo "#define MAIL_USE_MMDF 1" >>confdefs.h
4065
4066fi
4067
4068
4069# Check whether --with-mail-unlink was given.
4070if test "${with_mail_unlink+set}" = set; then :
4071 withval=$with_mail_unlink;
4072else
4073 with_mail_unlink=no
4074fi
4075
4076if test "$with_mail_unlink" != no; then
4077
4078$as_echo "#define MAIL_UNLINK_SPOOL 1" >>confdefs.h
4079
4080fi
4081
4082
4083# Check whether --with-mailhost was given.
4084if test "${with_mailhost+set}" = set; then :
4085 withval=$with_mailhost;
4086cat >>confdefs.h <<_ACEOF
4087#define MAILHOST "$withval"
4088_ACEOF
4089
4090fi
4091
4092
4093
067d23c9
KY
4094# Check whether --with-sound was given.
4095if test "${with_sound+set}" = set; then :
4096 withval=$with_sound;
4097else
ee77919d 4098 with_sound=$with_features
067d23c9
KY
4099fi
4100
4101
4102
067d23c9
KY
4103# Check whether --with-x-toolkit was given.
4104if test "${with_x_toolkit+set}" = set; then :
4105 withval=$with_x_toolkit; case "${withval}" in
4106 y | ye | yes ) val=gtk ;;
4107 n | no ) val=no ;;
4108 l | lu | luc | luci | lucid ) val=lucid ;;
4109 a | at | ath | athe | athen | athena ) val=athena ;;
4110 m | mo | mot | moti | motif ) val=motif ;;
4111 g | gt | gtk ) val=gtk ;;
4fa92495 4112 gtk2 ) val=gtk2 ;;
067d23c9
KY
4113 gtk3 ) val=gtk3 ;;
4114 * )
a9bec17c 4115as_fn_error "\`--with-x-toolkit=$withval' is invalid;
4fa92495
GM
4116this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif', \`gtk',
4117\`gtk2' or \`gtk3'. \`yes' and \`gtk' are synonyms.
4118\`athena' and \`lucid' are synonyms." "$LINENO" 5
067d23c9
KY
4119 ;;
4120 esac
4121 with_x_toolkit=$val
4122
4123fi
4124
4125
4126
0442dc7f
GM
4127# Check whether --with-wide-int was given.
4128if test "${with_wide_int+set}" = set; then :
4129 withval=$with_wide_int;
4130else
4131 with_wide_int=no
4132fi
4133
4134if test "$with_wide_int" = yes; then
4135
4136$as_echo "#define WIDE_EMACS_INT 1" >>confdefs.h
4137
4138fi
4139
4140
067d23c9
KY
4141# Check whether --with-xpm was given.
4142if test "${with_xpm+set}" = set; then :
4143 withval=$with_xpm;
4144else
ee77919d 4145 with_xpm=$with_features
067d23c9
KY
4146fi
4147
4148
4149# Check whether --with-jpeg was given.
4150if test "${with_jpeg+set}" = set; then :
4151 withval=$with_jpeg;
4152else
ee77919d 4153 with_jpeg=$with_features
067d23c9
KY
4154fi
4155
4156
4157# Check whether --with-tiff was given.
4158if test "${with_tiff+set}" = set; then :
4159 withval=$with_tiff;
4160else
ee77919d 4161 with_tiff=$with_features
067d23c9
KY
4162fi
4163
4164
4165# Check whether --with-gif was given.
4166if test "${with_gif+set}" = set; then :
4167 withval=$with_gif;
4168else
ee77919d 4169 with_gif=$with_features
067d23c9
KY
4170fi
4171
4172
4173# Check whether --with-png was given.
4174if test "${with_png+set}" = set; then :
4175 withval=$with_png;
4176else
ee77919d 4177 with_png=$with_features
067d23c9
KY
4178fi
4179
4180
4181# Check whether --with-rsvg was given.
4182if test "${with_rsvg+set}" = set; then :
4183 withval=$with_rsvg;
4184else
ee77919d 4185 with_rsvg=$with_features
067d23c9
KY
4186fi
4187
4188
4189# Check whether --with-xml2 was given.
4190if test "${with_xml2+set}" = set; then :
4191 withval=$with_xml2;
4192else
ee77919d 4193 with_xml2=$with_features
067d23c9
KY
4194fi
4195
4196
4197# Check whether --with-imagemagick was given.
4198if test "${with_imagemagick+set}" = set; then :
4199 withval=$with_imagemagick;
4200else
ee77919d 4201 with_imagemagick=$with_features
067d23c9
KY
4202fi
4203
4204
4205
4206# Check whether --with-xft was given.
4207if test "${with_xft+set}" = set; then :
4208 withval=$with_xft;
4209else
ee77919d 4210 with_xft=$with_features
067d23c9
KY
4211fi
4212
4213
4214# Check whether --with-libotf was given.
4215if test "${with_libotf+set}" = set; then :
4216 withval=$with_libotf;
4217else
ee77919d 4218 with_libotf=$with_features
067d23c9
KY
4219fi
4220
4221
4222# Check whether --with-m17n-flt was given.
4223if test "${with_m17n_flt+set}" = set; then :
4224 withval=$with_m17n_flt;
4225else
ee77919d 4226 with_m17n_flt=$with_features
067d23c9
KY
4227fi
4228
4229
4230
4231# Check whether --with-toolkit-scroll-bars was given.
4232if test "${with_toolkit_scroll_bars+set}" = set; then :
4233 withval=$with_toolkit_scroll_bars;
4234else
ee77919d 4235 with_toolkit_scroll_bars=$with_features
067d23c9
KY
4236fi
4237
4238
4239# Check whether --with-xaw3d was given.
4240if test "${with_xaw3d+set}" = set; then :
4241 withval=$with_xaw3d;
4242else
ee77919d 4243 with_xaw3d=$with_features
067d23c9
KY
4244fi
4245
4246
4247# Check whether --with-xim was given.
4248if test "${with_xim+set}" = set; then :
4249 withval=$with_xim;
4250else
ee77919d 4251 with_xim=$with_features
067d23c9
KY
4252fi
4253
4254
4255# Check whether --with-ns was given.
4256if test "${with_ns+set}" = set; then :
4257 withval=$with_ns;
4258else
4259 with_ns=no
4260fi
4261
4262
5c0255d9
GM
4263# Check whether --with-w32 was given.
4264if test "${with_w32+set}" = set; then :
4265 withval=$with_w32;
4266else
4267 with_w32=no
4268fi
4269
4270
067d23c9
KY
4271
4272# Check whether --with-gpm was given.
4273if test "${with_gpm+set}" = set; then :
4274 withval=$with_gpm;
4275else
ee77919d 4276 with_gpm=$with_features
067d23c9
KY
4277fi
4278
4279
4280# Check whether --with-dbus was given.
4281if test "${with_dbus+set}" = set; then :
4282 withval=$with_dbus;
4283else
ee77919d 4284 with_dbus=$with_features
067d23c9
KY
4285fi
4286
4287
4288# Check whether --with-gconf was given.
4289if test "${with_gconf+set}" = set; then :
4290 withval=$with_gconf;
4291else
ee77919d 4292 with_gconf=$with_features
067d23c9
KY
4293fi
4294
4295
f527bd02
GM
4296# Check whether --with-gsettings was given.
4297if test "${with_gsettings+set}" = set; then :
4298 withval=$with_gsettings;
4299else
ee77919d 4300 with_gsettings=$with_features
f527bd02
GM
4301fi
4302
4303
067d23c9
KY
4304# Check whether --with-selinux was given.
4305if test "${with_selinux+set}" = set; then :
4306 withval=$with_selinux;
4307else
ee77919d 4308 with_selinux=$with_features
067d23c9
KY
4309fi
4310
4311
4312# Check whether --with-gnutls was given.
4313if test "${with_gnutls+set}" = set; then :
4314 withval=$with_gnutls;
4315else
ee77919d 4316 with_gnutls=$with_features
067d23c9
KY
4317fi
4318
4319
b5eb356a
GM
4320# Check whether --with-inotify was given.
4321if test "${with_inotify+set}" = set; then :
4322 withval=$with_inotify;
4323else
4324 with_inotify=$with_features
4325fi
4326
4327
067d23c9
KY
4328## For the times when you want to build Emacs but don't have
4329## a suitable makeinfo, and can live without the manuals.
4330
4331# Check whether --with-makeinfo was given.
4332if test "${with_makeinfo+set}" = set; then :
4333 withval=$with_makeinfo;
4334else
ee77919d 4335 with_makeinfo=$with_features
067d23c9
KY
4336fi
4337
4338
c3a461a5
GM
4339## Makefile.in needs the cache file name.
4340
4341
067d23c9
KY
4342## This is an option because I do not know if all info/man support
4343## compressed files, nor how to test if they do so.
4344
4345# Check whether --with-compress-info was given.
4346if test "${with_compress_info+set}" = set; then :
4347 withval=$with_compress_info;
4348else
ee77919d 4349 with_compress_info=$with_features
067d23c9
KY
4350fi
4351
4352if test $with_compress_info = yes; then
4353 GZIP_INFO=yes
4354else
4355 GZIP_INFO=
4356fi
4357
4358
4359
4360# Check whether --with-pkg-config-prog was given.
4361if test "${with_pkg_config_prog+set}" = set; then :
4362 withval=$with_pkg_config_prog;
4363fi
4364
4365if test "X${with_pkg_config_prog}" != X; then
4366 if test "${with_pkg_config_prog}" != yes; then
4367 PKG_CONFIG="${with_pkg_config_prog}"
4368 fi
4369fi
4370
067d23c9 4371
4fc5868a
UM
4372# Check whether --with-gameuser was given.
4373if test "${with_gameuser+set}" = set; then :
4374 withval=$with_gameuser;
4375fi
4376
4377test "X${with_gameuser}" != X && test "${with_gameuser}" != yes \
4378 && gameuser="${with_gameuser}"
4379test "X$gameuser" = X && gameuser=games
4380
4381
067d23c9
KY
4382# Check whether --with-gnustep-conf was given.
4383if test "${with_gnustep_conf+set}" = set; then :
4384 withval=$with_gnustep_conf;
4385fi
4386
4387test "X${with_gnustep_conf}" != X && test "${with_gnustep_conf}" != yes && \
4388 GNUSTEP_CONFIG_FILE="${with_gnustep_conf}"
4389test "X$GNUSTEP_CONFIG_FILE" = "X" && \
4390 GNUSTEP_CONFIG_FILE=/etc/GNUstep/GNUstep.conf
4391
4392# Check whether --enable-ns-self-contained was given.
4393if test "${enable_ns_self_contained+set}" = set; then :
4394 enableval=$enable_ns_self_contained; EN_NS_SELF_CONTAINED=$enableval
4395else
4396 EN_NS_SELF_CONTAINED=yes
4397fi
4398
4399
067d23c9
KY
4400# Check whether --enable-locallisppath was given.
4401if test "${enable_locallisppath+set}" = set; then :
4402 enableval=$enable_locallisppath; if test "${enableval}" = "no"; then
4403 locallisppath=
4404elif test "${enableval}" != "yes"; then
4405 locallisppath=${enableval}
4406fi
4407fi
4408
4409
4410# Check whether --enable-checking was given.
4411if test "${enable_checking+set}" = set; then :
4412 enableval=$enable_checking; ac_checking_flags="${enableval}"
4413fi
4414
4415IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
4416for check in $ac_checking_flags
4417do
4418 case $check in
4419 # these set all the flags to specific states
4420 yes) ac_enable_checking=1 ;;
4421 no) ac_enable_checking= ;
4422 ac_gc_check_stringbytes= ;
4423 ac_gc_check_string_overrun= ;
4424 ac_gc_check_string_free_list= ;
4425 ac_xmalloc_overrun= ;
7ee3791f 4426 ac_gc_check_cons_list= ;
e4d35030 4427 ac_glyphs_debug= ;;
067d23c9
KY
4428 all) ac_enable_checking=1 ;
4429 ac_gc_check_stringbytes=1 ;
4430 ac_gc_check_string_overrun=1 ;
4431 ac_gc_check_string_free_list=1 ;
4432 ac_xmalloc_overrun=1 ;
7ee3791f 4433 ac_gc_check_cons_list=1 ;
e4d35030 4434 ac_glyphs_debug=1 ;;
067d23c9
KY
4435 # these enable particular checks
4436 stringbytes) ac_gc_check_stringbytes=1 ;;
4437 stringoverrun) ac_gc_check_string_overrun=1 ;;
4438 stringfreelist) ac_gc_check_string_free_list=1 ;;
4439 xmallocoverrun) ac_xmalloc_overrun=1 ;;
4440 conslist) ac_gc_check_cons_list=1 ;;
e4d35030 4441 glyphs) ac_glyphs_debug=1 ;;
a9bec17c 4442 *) as_fn_error "unknown check category $check" "$LINENO" 5 ;;
067d23c9
KY
4443 esac
4444done
4445IFS="$ac_save_IFS"
4446
4447if test x$ac_enable_checking != x ; then
4448
4449$as_echo "#define ENABLE_CHECKING 1" >>confdefs.h
4450
4451fi
4452if test x$ac_gc_check_stringbytes != x ; then
4453
4454$as_echo "#define GC_CHECK_STRING_BYTES 1" >>confdefs.h
4455
4456fi
4fda9c95 4457if test x$ac_gc_check_string_overrun != x ; then
067d23c9
KY
4458
4459$as_echo "#define GC_CHECK_STRING_OVERRUN 1" >>confdefs.h
4460
4461fi
4462if test x$ac_gc_check_string_free_list != x ; then
4463
4464$as_echo "#define GC_CHECK_STRING_FREE_LIST 1" >>confdefs.h
4465
4466fi
4467if test x$ac_xmalloc_overrun != x ; then
4468
4469$as_echo "#define XMALLOC_OVERRUN_CHECK 1" >>confdefs.h
4470
4471fi
4472if test x$ac_gc_check_cons_list != x ; then
4473
4474$as_echo "#define GC_CHECK_CONS_LIST 1" >>confdefs.h
4475
7ee3791f 4476fi
e4d35030 4477if test x$ac_glyphs_debug != x ; then
7ee3791f
GM
4478
4479$as_echo "#define GLYPH_DEBUG 1" >>confdefs.h
4480
067d23c9
KY
4481fi
4482
afd07e01
GM
4483# Check whether --enable-check-lisp-object-type was given.
4484if test "${enable_check_lisp_object_type+set}" = set; then :
4485 enableval=$enable_check_lisp_object_type; if test "${enableval}" != "no"; then
067d23c9 4486
afd07e01 4487$as_echo "#define CHECK_LISP_OBJECT_TYPE 1" >>confdefs.h
067d23c9
KY
4488
4489fi
4490fi
4491
4492
4493
4494# Check whether --enable-profiling was given.
4495if test "${enable_profiling+set}" = set; then :
4496 enableval=$enable_profiling; ac_enable_profiling="${enableval}"
4497fi
4498
4499if test x$ac_enable_profiling != x ; then
4500 PROFILING_CFLAGS="-DPROFILING=1 -pg"
4501else
4502 PROFILING_CFLAGS=
4503fi
4504
4505
4506# Check whether --enable-autodepend was given.
4507if test "${enable_autodepend+set}" = set; then :
4508 enableval=$enable_autodepend; ac_enable_autodepend="${enableval}"
4509else
4510 ac_enable_autodepend=yes
4511fi
4512
4513
4efe5ef9
GM
4514# Check whether --enable-gtk-deprecation-warnings was given.
4515if test "${enable_gtk_deprecation_warnings+set}" = set; then :
4516 enableval=$enable_gtk_deprecation_warnings; ac_enable_gtk_deprecation_warnings="${enableval}"
4517fi
4518
4519
067d23c9 4520#### Make srcdir absolute, if it isn't already. It's important to
b5591ebb 4521#### avoid running the file name through pwd unnecessarily, since pwd can
067d23c9
KY
4522#### give you automounter prefixes, which can go away. We do all this
4523#### so Emacs can find its files when run uninstalled.
4524## Make sure CDPATH doesn't affect cd (in case PWD is relative).
4525unset CDPATH
4526case "${srcdir}" in
4527 /* ) ;;
4528 . )
4529 ## We may be able to use the $PWD environment variable to make this
4530 ## absolute. But sometimes PWD is inaccurate.
b5591ebb 4531 ## Note: we used to use $PWD at the end instead of `pwd`,
067d23c9
KY
4532 ## but that tested only for a well-formed and valid PWD,
4533 ## it did not object when PWD was well-formed and valid but just wrong.
b5591ebb 4534 if test ".$PWD" != "." && test ".`(cd "$PWD" ; sh -c pwd)`" = ".`pwd`" ;
067d23c9
KY
4535 then
4536 srcdir="$PWD"
4537 else
b5591ebb 4538 srcdir=`(cd "$srcdir"; pwd)`
067d23c9
KY
4539 fi
4540 ;;
b5591ebb 4541 * ) srcdir=`(cd "$srcdir"; pwd)` ;;
067d23c9
KY
4542esac
4543
067d23c9
KY
4544### Canonicalize the configuration name.
4545
067d23c9
KY
4546# Make sure we can run config.sub.
4547$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
a9bec17c 4548 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
067d23c9
KY
4549
4550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4551$as_echo_n "checking build system type... " >&6; }
a9bec17c 4552if test "${ac_cv_build+set}" = set; then :
067d23c9
KY
4553 $as_echo_n "(cached) " >&6
4554else
4555 ac_build_alias=$build_alias
4556test "x$ac_build_alias" = x &&
4557 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4558test "x$ac_build_alias" = x &&
a9bec17c 4559 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
067d23c9 4560ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
a9bec17c 4561 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
067d23c9
KY
4562
4563fi
4564{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4565$as_echo "$ac_cv_build" >&6; }
4566case $ac_cv_build in
4567*-*-*) ;;
a9bec17c 4568*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
067d23c9
KY
4569esac
4570build=$ac_cv_build
4571ac_save_IFS=$IFS; IFS='-'
4572set x $ac_cv_build
4573shift
4574build_cpu=$1
4575build_vendor=$2
4576shift; shift
4577# Remember, the first character of IFS is used to create $*,
4578# except with old shells:
4579build_os=$*
4580IFS=$ac_save_IFS
4581case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
4582
4583
4584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4585$as_echo_n "checking host system type... " >&6; }
a9bec17c 4586if test "${ac_cv_host+set}" = set; then :
067d23c9
KY
4587 $as_echo_n "(cached) " >&6
4588else
4589 if test "x$host_alias" = x; then
4590 ac_cv_host=$ac_cv_build
4591else
4592 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
a9bec17c 4593 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
067d23c9
KY
4594fi
4595
4596fi
4597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4598$as_echo "$ac_cv_host" >&6; }
4599case $ac_cv_host in
4600*-*-*) ;;
a9bec17c 4601*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
067d23c9
KY
4602esac
4603host=$ac_cv_host
4604ac_save_IFS=$IFS; IFS='-'
4605set x $ac_cv_host
4606shift
4607host_cpu=$1
4608host_vendor=$2
4609shift; shift
4610# Remember, the first character of IFS is used to create $*,
4611# except with old shells:
4612host_os=$*
4613IFS=$ac_save_IFS
4614case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
4615
4616
4617canonical=$host
4618configuration=${host_alias-${build_alias-$host}}
4619
4620
4621
4622### If you add support for a new configuration, add code to this
4623### switch statement to recognize your configuration name and select
42bbbe8b 4624### the appropriate operating system file.
067d23c9 4625
42bbbe8b 4626### You would hope that you could choose an s/*.h
067d23c9 4627### file based on the operating system portion. However, it turns out
42bbbe8b 4628### that each s/*.h file is pretty manufacturer-specific.
067d23c9
KY
4629### So we basically have to have a special case for each
4630### configuration name.
4631###
4632### As far as handling version numbers on operating systems is
4633### concerned, make sure things will fail in a fixable way. If
4634### /etc/MACHINES doesn't say anything about version numbers, be
4635### prepared to handle anything reasonably. If version numbers
4636### matter, be sure /etc/MACHINES says something about it.
4637
42bbbe8b 4638opsys='' unported=no
067d23c9
KY
4639case "${canonical}" in
4640
9b6e5515
GM
4641 ## GNU/Linux and similar ports
4642 *-*-linux* )
d6a003a8 4643 opsys=gnu-linux
d6a003a8
AS
4644 ;;
4645
067d23c9
KY
4646 ## FreeBSD ports
4647 *-*-freebsd* )
4648 opsys=freebsd
067d23c9
KY
4649 ;;
4650
87e1a811
GM
4651 ## DragonFly ports
4652 *-*-dragonfly* )
4653 opsys=dragonfly
4654 ;;
4655
067d23c9
KY
4656 ## FreeBSD kernel + glibc based userland
4657 *-*-kfreebsd*gnu* )
4658 opsys=gnu-kfreebsd
067d23c9
KY
4659 ;;
4660
4661 ## NetBSD ports
4662 *-*-netbsd* )
4663 opsys=netbsd
067d23c9
KY
4664 ;;
4665
4666 ## OpenBSD ports
4667 *-*-openbsd* )
4668 opsys=openbsd
067d23c9
KY
4669 ;;
4670
067d23c9
KY
4671 ## Apple Darwin / Mac OS X
4672 *-apple-darwin* )
4673 case "${canonical}" in
42bbbe8b
GM
4674 i[3456]86-* ) ;;
4675 powerpc-* ) ;;
4676 x86_64-* ) ;;
067d23c9
KY
4677 * ) unported=yes ;;
4678 esac
4679 opsys=darwin
adf4198e
GM
4680 ## Use fink packages if available.
4681 ## FIXME find a better way to do this: http://debbugs.gnu.org/11507
4682## if test -d /sw/include && test -d /sw/lib; then
4683## GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib"
4684## NON_GCC_TEST_OPTIONS=${GCC_TEST_OPTIONS}
4685## fi
067d23c9
KY
4686 ;;
4687
8c35e3c3
GM
4688 ## Cygwin ports
4689 *-*-cygwin )
4690 opsys=cygwin
4691 ;;
4692
067d23c9
KY
4693 ## HP 9000 series 700 and 800, running HP/UX
4694 hppa*-hp-hpux10.2* )
d6a003a8 4695 opsys=hpux10-20
067d23c9
KY
4696 ;;
4697 hppa*-hp-hpux1[1-9]* )
d6a003a8 4698 opsys=hpux11
067d23c9
KY
4699 CFLAGS="-D_INCLUDE__STDC_A1_SOURCE $CFLAGS"
4700 ;;
4701
067d23c9 4702 ## IBM machines
067d23c9 4703 rs6000-ibm-aix4.[23]* )
42bbbe8b 4704 opsys=aix4-2
067d23c9
KY
4705 ;;
4706 powerpc-ibm-aix4.[23]* )
42bbbe8b 4707 opsys=aix4-2
067d23c9
KY
4708 ;;
4709 rs6000-ibm-aix[56]* )
42bbbe8b 4710 opsys=aix4-2
067d23c9
KY
4711 ;;
4712 powerpc-ibm-aix[56]* )
42bbbe8b 4713 opsys=aix4-2
067d23c9
KY
4714 ;;
4715
067d23c9
KY
4716 ## Silicon Graphics machines
4717 ## Iris 4D
4718 mips-sgi-irix6.5 )
fd44db7f 4719 opsys=irix6-5
067d23c9
KY
4720 # Without defining _LANGUAGE_C, things get masked out in the headers
4721 # so that, for instance, grepping for `free' in stdlib.h fails and
4722 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
067d23c9
KY
4723 NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
4724 ;;
4725
4726 ## Suns
067d23c9
KY
4727 *-sun-solaris* \
4728 | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* \
4729 | x86_64-*-solaris2* | x86_64-*-sunos5*)
4730 case "${canonical}" in
42bbbe8b
GM
4731 i[3456]86-*-* ) ;;
4732 amd64-*-*|x86_64-*-*) ;;
4733 sparc* ) ;;
067d23c9
KY
4734 * ) unported=yes ;;
4735 esac
4736 case "${canonical}" in
4737 *-sunos5.6* | *-solaris2.6* )
4738 opsys=sol2-6
067d23c9
KY
4739 RANLIB="ar -ts"
4740 ;;
4741 *-sunos5.[7-9]* | *-solaris2.[7-9]* )
4742 opsys=sol2-6
4743 emacs_check_sunpro_c=yes
067d23c9
KY
4744 ;;
4745 *-sunos5* | *-solaris* )
4746 opsys=sol2-10
4747 emacs_check_sunpro_c=yes
067d23c9
KY
4748 ;;
4749 esac
4750 ## Watch out for a compiler that we know will not work.
4751 case "${canonical}" in
4752 *-solaris* | *-sunos5* )
4753 if [ "x$CC" = x/usr/ucb/cc ]; then
4754 ## /usr/ucb/cc doesn't work;
4755 ## we should find some other compiler that does work.
4756 unset CC
4757 fi
4758 ;;
4759 *) ;;
4760 esac
4761 ;;
4762
067d23c9
KY
4763 ## Intel 386 machines where we don't care about the manufacturer.
4764 i[3456]86-*-* )
067d23c9 4765 case "${canonical}" in
5ec54608
GM
4766 *-darwin* ) opsys=darwin ;;
4767 *-sysv4.2uw* ) opsys=unixware ;;
4768 *-sysv5uw* ) opsys=unixware ;;
4769 *-sysv5OpenUNIX* ) opsys=unixware ;;
067d23c9
KY
4770 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
4771 esac
4772 ;;
4773
067d23c9
KY
4774 * )
4775 unported=yes
4776 ;;
4777esac
4778
4779### If the code above didn't choose an operating system, just choose
4780### an operating system based on the configuration name. You really
4781### only want to use this when you have no idea what the right
4782### operating system is; if you know what operating systems a machine
4783### runs, it's cleaner to make it explicit in the case statement
4784### above.
4785if test x"${opsys}" = x; then
4786 case "${canonical}" in
4787 *-gnu* ) opsys=gnu ;;
4788 * )
4789 unported=yes
4790 ;;
4791 esac
4792fi
4793
4794
4795
4796if test $unported = yes; then
a9bec17c 4797 as_fn_error "Emacs hasn't been ported to \`${canonical}' systems.
067d23c9
KY
4798Check \`etc/MACHINES' for recognized configuration names." "$LINENO" 5
4799fi
4800
067d23c9
KY
4801
4802#### Choose a compiler.
067d23c9
KY
4803
4804ac_ext=c
4805ac_cpp='$CPP $CPPFLAGS'
4806ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4807ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4808ac_compiler_gnu=$ac_cv_c_compiler_gnu
4809if test -n "$ac_tool_prefix"; then
4810 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4811set dummy ${ac_tool_prefix}gcc; ac_word=$2
4812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4813$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 4814if test "${ac_cv_prog_CC+set}" = set; then :
067d23c9
KY
4815 $as_echo_n "(cached) " >&6
4816else
4817 if test -n "$CC"; then
4818 ac_cv_prog_CC="$CC" # Let the user override the test.
4819else
4820as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4821for as_dir in $PATH
4822do
4823 IFS=$as_save_IFS
4824 test -z "$as_dir" && as_dir=.
4825 for ac_exec_ext in '' $ac_executable_extensions; do
4826 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4827 ac_cv_prog_CC="${ac_tool_prefix}gcc"
4828 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4829 break 2
4830 fi
4831done
4832 done
4833IFS=$as_save_IFS
4834
4835fi
4836fi
4837CC=$ac_cv_prog_CC
4838if test -n "$CC"; then
4839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4840$as_echo "$CC" >&6; }
4841else
4842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4843$as_echo "no" >&6; }
4844fi
4845
4846
4847fi
4848if test -z "$ac_cv_prog_CC"; then
4849 ac_ct_CC=$CC
4850 # Extract the first word of "gcc", so it can be a program name with args.
4851set dummy gcc; ac_word=$2
4852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4853$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 4854if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
067d23c9
KY
4855 $as_echo_n "(cached) " >&6
4856else
4857 if test -n "$ac_ct_CC"; then
4858 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4859else
4860as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4861for as_dir in $PATH
4862do
4863 IFS=$as_save_IFS
4864 test -z "$as_dir" && as_dir=.
4865 for ac_exec_ext in '' $ac_executable_extensions; do
4866 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4867 ac_cv_prog_ac_ct_CC="gcc"
4868 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4869 break 2
4870 fi
4871done
4872 done
4873IFS=$as_save_IFS
4874
4875fi
4876fi
4877ac_ct_CC=$ac_cv_prog_ac_ct_CC
4878if test -n "$ac_ct_CC"; then
4879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4880$as_echo "$ac_ct_CC" >&6; }
4881else
4882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4883$as_echo "no" >&6; }
4884fi
4885
4886 if test "x$ac_ct_CC" = x; then
4887 CC=""
4888 else
4889 case $cross_compiling:$ac_tool_warned in
4890yes:)
4891{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4892$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4893ac_tool_warned=yes ;;
4894esac
4895 CC=$ac_ct_CC
4896 fi
4897else
4898 CC="$ac_cv_prog_CC"
4899fi
4900
4901if test -z "$CC"; then
4902 if test -n "$ac_tool_prefix"; then
4903 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4904set dummy ${ac_tool_prefix}cc; ac_word=$2
4905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4906$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 4907if test "${ac_cv_prog_CC+set}" = set; then :
067d23c9
KY
4908 $as_echo_n "(cached) " >&6
4909else
4910 if test -n "$CC"; then
4911 ac_cv_prog_CC="$CC" # Let the user override the test.
4912else
4913as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4914for as_dir in $PATH
4915do
4916 IFS=$as_save_IFS
4917 test -z "$as_dir" && as_dir=.
4918 for ac_exec_ext in '' $ac_executable_extensions; do
4919 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4920 ac_cv_prog_CC="${ac_tool_prefix}cc"
4921 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4922 break 2
4923 fi
4924done
4925 done
4926IFS=$as_save_IFS
4927
4928fi
4929fi
4930CC=$ac_cv_prog_CC
4931if test -n "$CC"; then
4932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4933$as_echo "$CC" >&6; }
4934else
4935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4936$as_echo "no" >&6; }
4937fi
4938
4939
4940 fi
4941fi
4942if test -z "$CC"; then
4943 # Extract the first word of "cc", so it can be a program name with args.
4944set dummy cc; ac_word=$2
4945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4946$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 4947if test "${ac_cv_prog_CC+set}" = set; then :
067d23c9
KY
4948 $as_echo_n "(cached) " >&6
4949else
4950 if test -n "$CC"; then
4951 ac_cv_prog_CC="$CC" # Let the user override the test.
4952else
4953 ac_prog_rejected=no
4954as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4955for as_dir in $PATH
4956do
4957 IFS=$as_save_IFS
4958 test -z "$as_dir" && as_dir=.
4959 for ac_exec_ext in '' $ac_executable_extensions; do
4960 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4961 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4962 ac_prog_rejected=yes
4963 continue
4964 fi
4965 ac_cv_prog_CC="cc"
4966 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4967 break 2
4968 fi
4969done
4970 done
4971IFS=$as_save_IFS
4972
4973if test $ac_prog_rejected = yes; then
4974 # We found a bogon in the path, so make sure we never use it.
4975 set dummy $ac_cv_prog_CC
4976 shift
4977 if test $# != 0; then
4978 # We chose a different compiler from the bogus one.
4979 # However, it has the same basename, so the bogon will be chosen
4980 # first if we set CC to just the basename; use the full file name.
4981 shift
4982 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
4983 fi
4984fi
4985fi
4986fi
4987CC=$ac_cv_prog_CC
4988if test -n "$CC"; then
4989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4990$as_echo "$CC" >&6; }
4991else
4992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4993$as_echo "no" >&6; }
4994fi
4995
4996
4997fi
4998if test -z "$CC"; then
4999 if test -n "$ac_tool_prefix"; then
5000 for ac_prog in cl.exe
5001 do
5002 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5003set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5005$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 5006if test "${ac_cv_prog_CC+set}" = set; then :
067d23c9
KY
5007 $as_echo_n "(cached) " >&6
5008else
5009 if test -n "$CC"; then
5010 ac_cv_prog_CC="$CC" # Let the user override the test.
5011else
5012as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5013for as_dir in $PATH
5014do
5015 IFS=$as_save_IFS
5016 test -z "$as_dir" && as_dir=.
5017 for ac_exec_ext in '' $ac_executable_extensions; do
5018 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5019 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
5020 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5021 break 2
5022 fi
5023done
5024 done
5025IFS=$as_save_IFS
5026
5027fi
5028fi
5029CC=$ac_cv_prog_CC
5030if test -n "$CC"; then
5031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5032$as_echo "$CC" >&6; }
5033else
5034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5035$as_echo "no" >&6; }
5036fi
5037
5038
5039 test -n "$CC" && break
5040 done
5041fi
5042if test -z "$CC"; then
5043 ac_ct_CC=$CC
5044 for ac_prog in cl.exe
5045do
5046 # Extract the first word of "$ac_prog", so it can be a program name with args.
5047set dummy $ac_prog; ac_word=$2
5048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5049$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 5050if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
067d23c9
KY
5051 $as_echo_n "(cached) " >&6
5052else
5053 if test -n "$ac_ct_CC"; then
5054 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5055else
5056as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5057for as_dir in $PATH
5058do
5059 IFS=$as_save_IFS
5060 test -z "$as_dir" && as_dir=.
5061 for ac_exec_ext in '' $ac_executable_extensions; do
5062 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5063 ac_cv_prog_ac_ct_CC="$ac_prog"
5064 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5065 break 2
5066 fi
5067done
5068 done
5069IFS=$as_save_IFS
5070
5071fi
5072fi
5073ac_ct_CC=$ac_cv_prog_ac_ct_CC
5074if test -n "$ac_ct_CC"; then
5075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5076$as_echo "$ac_ct_CC" >&6; }
5077else
5078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5079$as_echo "no" >&6; }
5080fi
5081
5082
5083 test -n "$ac_ct_CC" && break
5084done
5085
5086 if test "x$ac_ct_CC" = x; then
5087 CC=""
5088 else
5089 case $cross_compiling:$ac_tool_warned in
5090yes:)
5091{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5092$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5093ac_tool_warned=yes ;;
5094esac
5095 CC=$ac_ct_CC
5096 fi
5097fi
5098
5099fi
5100
5101
5102test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5103$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
a9bec17c
GM
5104as_fn_error "no acceptable C compiler found in \$PATH
5105See \`config.log' for more details." "$LINENO" 5; }
067d23c9
KY
5106
5107# Provide some information about the compiler.
5108$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
5109set X $ac_compile
5110ac_compiler=$2
5111for ac_option in --version -v -V -qversion; do
5112 { { ac_try="$ac_compiler $ac_option >&5"
5113case "(($ac_try" in
5114 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5115 *) ac_try_echo=$ac_try;;
5116esac
5117eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5118$as_echo "$ac_try_echo"; } >&5
5119 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
5120 ac_status=$?
5121 if test -s conftest.err; then
5122 sed '10a\
5123... rest of stderr output deleted ...
5124 10q' conftest.err >conftest.er1
5125 cat conftest.er1 >&5
5126 fi
5127 rm -f conftest.er1 conftest.err
5128 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5129 test $ac_status = 0; }
5130done
5131
5132cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5133/* end confdefs.h. */
5134
5135int
5136main ()
5137{
5138
5139 ;
5140 return 0;
5141}
5142_ACEOF
5143ac_clean_files_save=$ac_clean_files
5144ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
5145# Try to create an executable without -o first, disregard a.out.
5146# It will help us diagnose broken compilers, and finding out an intuition
5147# of exeext.
5148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
5149$as_echo_n "checking whether the C compiler works... " >&6; }
5150ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
5151
5152# The possible output files:
5153ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
5154
5155ac_rmfiles=
5156for ac_file in $ac_files
5157do
5158 case $ac_file in
5159 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
5160 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
5161 esac
5162done
5163rm -f $ac_rmfiles
5164
5165if { { ac_try="$ac_link_default"
5166case "(($ac_try" in
5167 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5168 *) ac_try_echo=$ac_try;;
5169esac
5170eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5171$as_echo "$ac_try_echo"; } >&5
5172 (eval "$ac_link_default") 2>&5
5173 ac_status=$?
5174 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5175 test $ac_status = 0; }; then :
5176 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
5177# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
5178# in a Makefile. We should not override ac_cv_exeext if it was cached,
5179# so that the user can short-circuit this test for compilers unknown to
5180# Autoconf.
5181for ac_file in $ac_files ''
5182do
5183 test -f "$ac_file" || continue
5184 case $ac_file in
5185 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
5186 ;;
5187 [ab].out )
5188 # We found the default executable, but exeext='' is most
5189 # certainly right.
5190 break;;
5191 *.* )
5192 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
5193 then :; else
5194 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
5195 fi
5196 # We set ac_cv_exeext here because the later test for it is not
5197 # safe: cross compilers may not add the suffix if given an `-o'
5198 # argument, so we may need to know it at that point already.
5199 # Even if this section looks crufty: it has the advantage of
5200 # actually working.
5201 break;;
5202 * )
5203 break;;
5204 esac
5205done
5206test "$ac_cv_exeext" = no && ac_cv_exeext=
5207
5208else
5209 ac_file=''
5210fi
5211if test -z "$ac_file"; then :
5212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5213$as_echo "no" >&6; }
5214$as_echo "$as_me: failed program was:" >&5
5215sed 's/^/| /' conftest.$ac_ext >&5
5216
5217{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5218$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
a9bec17c
GM
5219{ as_fn_set_status 77
5220as_fn_error "C compiler cannot create executables
5221See \`config.log' for more details." "$LINENO" 5; }; }
067d23c9
KY
5222else
5223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5224$as_echo "yes" >&6; }
5225fi
5226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
5227$as_echo_n "checking for C compiler default output file name... " >&6; }
5228{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
5229$as_echo "$ac_file" >&6; }
5230ac_exeext=$ac_cv_exeext
5231
5232rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
5233ac_clean_files=$ac_clean_files_save
5234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
5235$as_echo_n "checking for suffix of executables... " >&6; }
5236if { { ac_try="$ac_link"
5237case "(($ac_try" in
5238 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5239 *) ac_try_echo=$ac_try;;
5240esac
5241eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5242$as_echo "$ac_try_echo"; } >&5
5243 (eval "$ac_link") 2>&5
5244 ac_status=$?
5245 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5246 test $ac_status = 0; }; then :
5247 # If both `conftest.exe' and `conftest' are `present' (well, observable)
5248# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
5249# work properly (i.e., refer to `conftest.exe'), while it won't with
5250# `rm'.
5251for ac_file in conftest.exe conftest conftest.*; do
5252 test -f "$ac_file" || continue
5253 case $ac_file in
5254 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
5255 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
5256 break;;
5257 * ) break;;
5258 esac
5259done
5260else
5261 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5262$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
a9bec17c
GM
5263as_fn_error "cannot compute suffix of executables: cannot compile and link
5264See \`config.log' for more details." "$LINENO" 5; }
067d23c9
KY
5265fi
5266rm -f conftest conftest$ac_cv_exeext
5267{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
5268$as_echo "$ac_cv_exeext" >&6; }
5269
5270rm -f conftest.$ac_ext
5271EXEEXT=$ac_cv_exeext
5272ac_exeext=$EXEEXT
5273cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5274/* end confdefs.h. */
5275#include <stdio.h>
5276int
5277main ()
5278{
5279FILE *f = fopen ("conftest.out", "w");
5280 return ferror (f) || fclose (f) != 0;
5281
5282 ;
5283 return 0;
5284}
5285_ACEOF
5286ac_clean_files="$ac_clean_files conftest.out"
5287# Check that the compiler produces executables we can run. If not, either
5288# the compiler is broken, or we cross compile.
5289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
5290$as_echo_n "checking whether we are cross compiling... " >&6; }
5291if test "$cross_compiling" != yes; then
5292 { { ac_try="$ac_link"
5293case "(($ac_try" in
5294 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5295 *) ac_try_echo=$ac_try;;
5296esac
5297eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5298$as_echo "$ac_try_echo"; } >&5
5299 (eval "$ac_link") 2>&5
5300 ac_status=$?
5301 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5302 test $ac_status = 0; }
5303 if { ac_try='./conftest$ac_cv_exeext'
5304 { { case "(($ac_try" in
5305 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5306 *) ac_try_echo=$ac_try;;
5307esac
5308eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5309$as_echo "$ac_try_echo"; } >&5
5310 (eval "$ac_try") 2>&5
5311 ac_status=$?
5312 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5313 test $ac_status = 0; }; }; then
5314 cross_compiling=no
5315 else
5316 if test "$cross_compiling" = maybe; then
5317 cross_compiling=yes
5318 else
5319 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5320$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
a9bec17c 5321as_fn_error "cannot run C compiled programs.
067d23c9 5322If you meant to cross compile, use \`--host'.
a9bec17c 5323See \`config.log' for more details." "$LINENO" 5; }
067d23c9
KY
5324 fi
5325 fi
5326fi
5327{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
5328$as_echo "$cross_compiling" >&6; }
5329
5330rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
5331ac_clean_files=$ac_clean_files_save
5332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
5333$as_echo_n "checking for suffix of object files... " >&6; }
a9bec17c 5334if test "${ac_cv_objext+set}" = set; then :
067d23c9
KY
5335 $as_echo_n "(cached) " >&6
5336else
5337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5338/* end confdefs.h. */
5339
5340int
5341main ()
5342{
5343
5344 ;
5345 return 0;
5346}
5347_ACEOF
5348rm -f conftest.o conftest.obj
5349if { { ac_try="$ac_compile"
5350case "(($ac_try" in
5351 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5352 *) ac_try_echo=$ac_try;;
5353esac
5354eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5355$as_echo "$ac_try_echo"; } >&5
5356 (eval "$ac_compile") 2>&5
5357 ac_status=$?
5358 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5359 test $ac_status = 0; }; then :
5360 for ac_file in conftest.o conftest.obj conftest.*; do
5361 test -f "$ac_file" || continue;
5362 case $ac_file in
5363 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
5364 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
5365 break;;
5366 esac
5367done
5368else
5369 $as_echo "$as_me: failed program was:" >&5
5370sed 's/^/| /' conftest.$ac_ext >&5
5371
5372{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5373$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
a9bec17c
GM
5374as_fn_error "cannot compute suffix of object files: cannot compile
5375See \`config.log' for more details." "$LINENO" 5; }
067d23c9
KY
5376fi
5377rm -f conftest.$ac_cv_objext conftest.$ac_ext
5378fi
5379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
5380$as_echo "$ac_cv_objext" >&6; }
5381OBJEXT=$ac_cv_objext
5382ac_objext=$OBJEXT
5383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
5384$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
a9bec17c 5385if test "${ac_cv_c_compiler_gnu+set}" = set; then :
067d23c9
KY
5386 $as_echo_n "(cached) " >&6
5387else
5388 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5389/* end confdefs.h. */
5390
5391int
5392main ()
5393{
5394#ifndef __GNUC__
5395 choke me
5396#endif
5397
5398 ;
5399 return 0;
5400}
5401_ACEOF
5402if ac_fn_c_try_compile "$LINENO"; then :
5403 ac_compiler_gnu=yes
5404else
5405 ac_compiler_gnu=no
5406fi
5407rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5408ac_cv_c_compiler_gnu=$ac_compiler_gnu
5409
5410fi
5411{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
5412$as_echo "$ac_cv_c_compiler_gnu" >&6; }
5413if test $ac_compiler_gnu = yes; then
5414 GCC=yes
5415else
5416 GCC=
5417fi
5418ac_test_CFLAGS=${CFLAGS+set}
5419ac_save_CFLAGS=$CFLAGS
5420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
5421$as_echo_n "checking whether $CC accepts -g... " >&6; }
a9bec17c 5422if test "${ac_cv_prog_cc_g+set}" = set; then :
067d23c9
KY
5423 $as_echo_n "(cached) " >&6
5424else
5425 ac_save_c_werror_flag=$ac_c_werror_flag
5426 ac_c_werror_flag=yes
5427 ac_cv_prog_cc_g=no
5428 CFLAGS="-g"
5429 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5430/* end confdefs.h. */
5431
5432int
5433main ()
5434{
5435
5436 ;
5437 return 0;
5438}
5439_ACEOF
5440if ac_fn_c_try_compile "$LINENO"; then :
5441 ac_cv_prog_cc_g=yes
5442else
5443 CFLAGS=""
5444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5445/* end confdefs.h. */
5446
5447int
5448main ()
5449{
5450
5451 ;
5452 return 0;
5453}
5454_ACEOF
5455if ac_fn_c_try_compile "$LINENO"; then :
5456
5457else
5458 ac_c_werror_flag=$ac_save_c_werror_flag
5459 CFLAGS="-g"
5460 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5461/* end confdefs.h. */
5462
5463int
5464main ()
5465{
5466
5467 ;
5468 return 0;
5469}
5470_ACEOF
5471if ac_fn_c_try_compile "$LINENO"; then :
5472 ac_cv_prog_cc_g=yes
5473fi
5474rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5475fi
5476rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5477fi
5478rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5479 ac_c_werror_flag=$ac_save_c_werror_flag
5480fi
5481{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
5482$as_echo "$ac_cv_prog_cc_g" >&6; }
5483if test "$ac_test_CFLAGS" = set; then
5484 CFLAGS=$ac_save_CFLAGS
5485elif test $ac_cv_prog_cc_g = yes; then
5486 if test "$GCC" = yes; then
5487 CFLAGS="-g -O2"
5488 else
5489 CFLAGS="-g"
5490 fi
5491else
5492 if test "$GCC" = yes; then
5493 CFLAGS="-O2"
5494 else
5495 CFLAGS=
5496 fi
5497fi
5498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
5499$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
a9bec17c 5500if test "${ac_cv_prog_cc_c89+set}" = set; then :
067d23c9
KY
5501 $as_echo_n "(cached) " >&6
5502else
5503 ac_cv_prog_cc_c89=no
5504ac_save_CC=$CC
5505cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5506/* end confdefs.h. */
5507#include <stdarg.h>
5508#include <stdio.h>
5509#include <sys/types.h>
5510#include <sys/stat.h>
5511/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
5512struct buf { int x; };
5513FILE * (*rcsopen) (struct buf *, struct stat *, int);
5514static char *e (p, i)
5515 char **p;
5516 int i;
5517{
5518 return p[i];
5519}
5520static char *f (char * (*g) (char **, int), char **p, ...)
5521{
5522 char *s;
5523 va_list v;
5524 va_start (v,p);
5525 s = g (p, va_arg (v,int));
5526 va_end (v);
5527 return s;
5528}
5529
5530/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
5531 function prototypes and stuff, but not '\xHH' hex character constants.
5532 These don't provoke an error unfortunately, instead are silently treated
5533 as 'x'. The following induces an error, until -std is added to get
5534 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
5535 array size at least. It's necessary to write '\x00'==0 to get something
5536 that's true only with -std. */
5537int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5538
5539/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5540 inside strings and character constants. */
5541#define FOO(x) 'x'
5542int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5543
5544int test (int i, double x);
5545struct s1 {int (*f) (int a);};
5546struct s2 {int (*f) (double a);};
5547int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5548int argc;
5549char **argv;
5550int
5551main ()
5552{
5553return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
5554 ;
5555 return 0;
5556}
5557_ACEOF
5558for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5559 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5560do
5561 CC="$ac_save_CC $ac_arg"
5562 if ac_fn_c_try_compile "$LINENO"; then :
5563 ac_cv_prog_cc_c89=$ac_arg
5564fi
5565rm -f core conftest.err conftest.$ac_objext
5566 test "x$ac_cv_prog_cc_c89" != "xno" && break
5567done
743c80a7
PE
5568rm -f conftest.$ac_ext
5569CC=$ac_save_CC
5570
5571fi
5572# AC_CACHE_VAL
5573case "x$ac_cv_prog_cc_c89" in
5574 x)
5575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5576$as_echo "none needed" >&6; } ;;
5577 xno)
5578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5579$as_echo "unsupported" >&6; } ;;
5580 *)
5581 CC="$CC $ac_cv_prog_cc_c89"
5582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5583$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
5584esac
5585if test "x$ac_cv_prog_cc_c89" != xno; then :
5586
5587fi
5588
5589ac_ext=c
5590ac_cpp='$CPP $CPPFLAGS'
5591ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5592ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5593ac_compiler_gnu=$ac_cv_c_compiler_gnu
5594DEPDIR="${am__leading_dot}deps"
5595
5596ac_config_commands="$ac_config_commands depfiles"
5597
5598
5599am_make=${MAKE-make}
5600cat > confinc << 'END'
5601am__doit:
5602 @echo this is the am__doit target
5603.PHONY: am__doit
5604END
5605# If we don't find an include directive, just comment out the code.
5606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
5607$as_echo_n "checking for style of include used by $am_make... " >&6; }
5608am__include="#"
5609am__quote=
5610_am_result=none
5611# First try GNU make style include.
5612echo "include confinc" > confmf
5613# Ignore all kinds of additional output from `make'.
5614case `$am_make -s -f confmf 2> /dev/null` in #(
5615*the\ am__doit\ target*)
5616 am__include=include
5617 am__quote=
5618 _am_result=GNU
5619 ;;
5620esac
5621# Now try BSD make style include.
5622if test "$am__include" = "#"; then
5623 echo '.include "confinc"' > confmf
5624 case `$am_make -s -f confmf 2> /dev/null` in #(
5625 *the\ am__doit\ target*)
5626 am__include=.include
5627 am__quote="\""
5628 _am_result=BSD
5629 ;;
5630 esac
5631fi
5632
5633
5634{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
5635$as_echo "$_am_result" >&6; }
5636rm -f confinc confmf
5637
5638# Check whether --enable-dependency-tracking was given.
5639if test "${enable_dependency_tracking+set}" = set; then :
5640 enableval=$enable_dependency_tracking;
5641fi
5642
5643if test "x$enable_dependency_tracking" != xno; then
5644 am_depcomp="$ac_aux_dir/depcomp"
5645 AMDEPBACKSLASH='\'
5646fi
5647 if test "x$enable_dependency_tracking" != xno; then
5648 AMDEP_TRUE=
5649 AMDEP_FALSE='#'
5650else
5651 AMDEP_TRUE='#'
5652 AMDEP_FALSE=
5653fi
5654
5655
5656
5657depcc="$CC" am_compiler_list=
5658
5659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
5660$as_echo_n "checking dependency style of $depcc... " >&6; }
a9bec17c 5661if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
743c80a7
PE
5662 $as_echo_n "(cached) " >&6
5663else
5664 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
5665 # We make a subdir and do the tests there. Otherwise we can end up
5666 # making bogus files that we don't know about and never remove. For
5667 # instance it was reported that on HP-UX the gcc test will end up
5668 # making a dummy file named `D' -- because `-MD' means `put the output
5669 # in D'.
5670 mkdir conftest.dir
5671 # Copy depcomp to subdir because otherwise we won't find it if we're
5672 # using a relative directory.
5673 cp "$am_depcomp" conftest.dir
5674 cd conftest.dir
5675 # We will build objects and dependencies in a subdirectory because
5676 # it helps to detect inapplicable dependency modes. For instance
5677 # both Tru64's cc and ICC support -MD to output dependencies as a
5678 # side effect of compilation, but ICC will put the dependencies in
5679 # the current directory while Tru64 will put them in the object
5680 # directory.
5681 mkdir sub
5682
5683 am_cv_CC_dependencies_compiler_type=none
5684 if test "$am_compiler_list" = ""; then
5685 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5686 fi
5687 am__universal=false
5688 case " $depcc " in #(
5689 *\ -arch\ *\ -arch\ *) am__universal=true ;;
5690 esac
5691
5692 for depmode in $am_compiler_list; do
5693 # Setup a source with many dependencies, because some compilers
5694 # like to wrap large dependency lists on column 80 (with \), and
5695 # we should not choose a depcomp mode which is confused by this.
5696 #
5697 # We need to recreate these files for each test, as the compiler may
5698 # overwrite some of them when testing with obscure command lines.
5699 # This happens at least with the AIX C compiler.
5700 : > sub/conftest.c
5701 for i in 1 2 3 4 5 6; do
5702 echo '#include "conftst'$i'.h"' >> sub/conftest.c
5703 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
5704 # Solaris 8's {/usr,}/bin/sh.
5705 touch sub/conftst$i.h
5706 done
5707 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
5708
5709 # We check with `-c' and `-o' for the sake of the "dashmstdout"
5710 # mode. It turns out that the SunPro C++ compiler does not properly
5711 # handle `-M -o', and we need to detect this. Also, some Intel
5712 # versions had trouble with output in subdirs
5713 am__obj=sub/conftest.${OBJEXT-o}
5714 am__minus_obj="-o $am__obj"
5715 case $depmode in
5716 gcc)
5717 # This depmode causes a compiler race in universal mode.
5718 test "$am__universal" = false || continue
5719 ;;
5720 nosideeffect)
5721 # after this tag, mechanisms are not by side-effect, so they'll
5722 # only be used when explicitly requested
5723 if test "x$enable_dependency_tracking" = xyes; then
5724 continue
5725 else
5726 break
5727 fi
5728 ;;
5729 msvisualcpp | msvcmsys)
5730 # This compiler won't grok `-c -o', but also, the minuso test has
5731 # not run yet. These depmodes are late enough in the game, and
5732 # so weak that their functioning should not be impacted.
5733 am__obj=conftest.${OBJEXT-o}
5734 am__minus_obj=
5735 ;;
5736 none) break ;;
5737 esac
5738 if depmode=$depmode \
5739 source=sub/conftest.c object=$am__obj \
5740 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
5741 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
5742 >/dev/null 2>conftest.err &&
5743 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
5744 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
5745 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
5746 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
5747 # icc doesn't choke on unknown options, it will just issue warnings
5748 # or remarks (even with -Werror). So we grep stderr for any message
5749 # that says an option was ignored or not supported.
5750 # When given -MP, icc 7.0 and 7.1 complain thusly:
5751 # icc: Command line warning: ignoring option '-M'; no argument required
5752 # The diagnosis changed in icc 8.0:
5753 # icc: Command line remark: option '-MP' not supported
5754 if (grep 'ignoring option' conftest.err ||
5755 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
5756 am_cv_CC_dependencies_compiler_type=$depmode
5757 break
5758 fi
5759 fi
5760 done
5761
5762 cd ..
5763 rm -rf conftest.dir
5764else
5765 am_cv_CC_dependencies_compiler_type=none
5766fi
5767
5768fi
5769{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
5770$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
5771CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
5772
5773 if
5774 test "x$enable_dependency_tracking" != xno \
5775 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
5776 am__fastdepCC_TRUE=
5777 am__fastdepCC_FALSE='#'
5778else
5779 am__fastdepCC_TRUE='#'
5780 am__fastdepCC_FALSE=
5781fi
5782
5783
5784if test "x$CC" != xcc; then
5785 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5
5786$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
5787else
5788 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5
5789$as_echo_n "checking whether cc understands -c and -o together... " >&6; }
5790fi
5791set dummy $CC; ac_cc=`$as_echo "$2" |
5792 sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
a9bec17c 5793if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then :
743c80a7
PE
5794 $as_echo_n "(cached) " >&6
5795else
5796 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5797/* end confdefs.h. */
5798
5799int
5800main ()
5801{
5802
5803 ;
5804 return 0;
5805}
5806_ACEOF
5807# Make sure it works both with $CC and with simple cc.
5808# We do the test twice because some compilers refuse to overwrite an
5809# existing .o file with -o, though they will create one.
5810ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
5811rm -f conftest2.*
5812if { { case "(($ac_try" in
5813 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5814 *) ac_try_echo=$ac_try;;
5815esac
5816eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5817$as_echo "$ac_try_echo"; } >&5
5818 (eval "$ac_try") 2>&5
5819 ac_status=$?
5820 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5821 test $ac_status = 0; } &&
5822 test -f conftest2.$ac_objext && { { case "(($ac_try" in
5823 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5824 *) ac_try_echo=$ac_try;;
5825esac
5826eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5827$as_echo "$ac_try_echo"; } >&5
5828 (eval "$ac_try") 2>&5
5829 ac_status=$?
5830 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5831 test $ac_status = 0; };
5832then
5833 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
5834 if test "x$CC" != xcc; then
5835 # Test first that cc exists at all.
5836 if { ac_try='cc -c conftest.$ac_ext >&5'
5837 { { case "(($ac_try" in
5838 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5839 *) ac_try_echo=$ac_try;;
5840esac
5841eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5842$as_echo "$ac_try_echo"; } >&5
5843 (eval "$ac_try") 2>&5
5844 ac_status=$?
5845 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5846 test $ac_status = 0; }; }; then
5847 ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
5848 rm -f conftest2.*
5849 if { { case "(($ac_try" in
5850 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5851 *) ac_try_echo=$ac_try;;
5852esac
5853eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5854$as_echo "$ac_try_echo"; } >&5
5855 (eval "$ac_try") 2>&5
5856 ac_status=$?
5857 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5858 test $ac_status = 0; } &&
5859 test -f conftest2.$ac_objext && { { case "(($ac_try" in
5860 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5861 *) ac_try_echo=$ac_try;;
5862esac
5863eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5864$as_echo "$ac_try_echo"; } >&5
5865 (eval "$ac_try") 2>&5
5866 ac_status=$?
5867 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5868 test $ac_status = 0; };
5869 then
5870 # cc works too.
5871 :
5872 else
5873 # cc exists but doesn't like -o.
5874 eval ac_cv_prog_cc_${ac_cc}_c_o=no
5875 fi
5876 fi
5877 fi
5878else
5879 eval ac_cv_prog_cc_${ac_cc}_c_o=no
5880fi
5881rm -f core conftest*
5882
5883fi
5884if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
5885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5886$as_echo "yes" >&6; }
5887else
5888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5889$as_echo "no" >&6; }
5890
5891$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h
5892
5893fi
5894
5895# FIXME: we rely on the cache variable name because
5896# there is no other way.
5897set dummy $CC
5898am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
5899eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
5900if test "$am_t" != yes; then
5901 # Losing compiler, so override with the script.
5902 # FIXME: It is wrong to rewrite CC.
5903 # But if we don't then we get into trouble of one sort or another.
5904 # A longer-term fix would be to have automake use am__CC in this case,
5905 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
5906 CC="$am_aux_dir/compile $CC"
5907fi
5908
5909
5910
5ec54608
GM
5911if test x$GCC = xyes; then
5912 test "x$GCC_TEST_OPTIONS" != x && CC="$CC $GCC_TEST_OPTIONS"
5913else
5914 test "x$NON_GCC_TEST_OPTIONS" != x && CC="$CC $NON_GCC_TEST_OPTIONS"
5915fi
5916
34fd7a48
GM
5917# Avoid gnulib's tests for HAVE_WORKING_O_NOATIME and HAVE_WORKING_O_NOFOLLOW,
5918# as we don't use them.
710f5812 5919
f077f61d
GM
5920# Avoid gnulib's threadlib module, as we do threads our own way.
5921
5922
5ec54608 5923# Initialize gnulib right after choosing the compiler.
743c80a7 5924
067d23c9
KY
5925ac_ext=c
5926ac_cpp='$CPP $CPPFLAGS'
5927ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5928ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5929ac_compiler_gnu=$ac_cv_c_compiler_gnu
5930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
5931$as_echo_n "checking how to run the C preprocessor... " >&6; }
5932# On Suns, sometimes $CPP names a directory.
5933if test -n "$CPP" && test -d "$CPP"; then
5934 CPP=
5935fi
5936if test -z "$CPP"; then
a9bec17c 5937 if test "${ac_cv_prog_CPP+set}" = set; then :
067d23c9
KY
5938 $as_echo_n "(cached) " >&6
5939else
5940 # Double quotes because CPP needs to be expanded
5941 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
5942 do
5943 ac_preproc_ok=false
5944for ac_c_preproc_warn_flag in '' yes
5945do
5946 # Use a header file that comes with gcc, so configuring glibc
5947 # with a fresh cross-compiler works.
5948 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5949 # <limits.h> exists even on freestanding compilers.
5950 # On the NeXT, cc -E runs the code through the compiler's parser,
5951 # not just through cpp. "Syntax error" is here to catch this case.
5952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5953/* end confdefs.h. */
5954#ifdef __STDC__
5955# include <limits.h>
5956#else
5957# include <assert.h>
5958#endif
5959 Syntax error
5960_ACEOF
5961if ac_fn_c_try_cpp "$LINENO"; then :
5962
5963else
5964 # Broken: fails on valid input.
5965continue
5966fi
a9bec17c 5967rm -f conftest.err conftest.$ac_ext
067d23c9
KY
5968
5969 # OK, works on sane cases. Now check whether nonexistent headers
5970 # can be detected and how.
5971 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5972/* end confdefs.h. */
5973#include <ac_nonexistent.h>
5974_ACEOF
5975if ac_fn_c_try_cpp "$LINENO"; then :
5976 # Broken: success on invalid input.
5977continue
5978else
5979 # Passes both tests.
5980ac_preproc_ok=:
5981break
5982fi
a9bec17c 5983rm -f conftest.err conftest.$ac_ext
067d23c9
KY
5984
5985done
5986# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
a9bec17c 5987rm -f conftest.err conftest.$ac_ext
067d23c9
KY
5988if $ac_preproc_ok; then :
5989 break
5990fi
5991
5992 done
5993 ac_cv_prog_CPP=$CPP
5994
5995fi
5996 CPP=$ac_cv_prog_CPP
5997else
5998 ac_cv_prog_CPP=$CPP
5999fi
6000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
6001$as_echo "$CPP" >&6; }
6002ac_preproc_ok=false
6003for ac_c_preproc_warn_flag in '' yes
6004do
6005 # Use a header file that comes with gcc, so configuring glibc
6006 # with a fresh cross-compiler works.
6007 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6008 # <limits.h> exists even on freestanding compilers.
6009 # On the NeXT, cc -E runs the code through the compiler's parser,
6010 # not just through cpp. "Syntax error" is here to catch this case.
6011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6012/* end confdefs.h. */
6013#ifdef __STDC__
6014# include <limits.h>
6015#else
6016# include <assert.h>
6017#endif
6018 Syntax error
6019_ACEOF
6020if ac_fn_c_try_cpp "$LINENO"; then :
6021
6022else
6023 # Broken: fails on valid input.
6024continue
6025fi
a9bec17c 6026rm -f conftest.err conftest.$ac_ext
067d23c9
KY
6027
6028 # OK, works on sane cases. Now check whether nonexistent headers
6029 # can be detected and how.
6030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6031/* end confdefs.h. */
6032#include <ac_nonexistent.h>
6033_ACEOF
6034if ac_fn_c_try_cpp "$LINENO"; then :
6035 # Broken: success on invalid input.
6036continue
6037else
6038 # Passes both tests.
6039ac_preproc_ok=:
6040break
6041fi
a9bec17c 6042rm -f conftest.err conftest.$ac_ext
067d23c9
KY
6043
6044done
6045# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
a9bec17c 6046rm -f conftest.err conftest.$ac_ext
067d23c9
KY
6047if $ac_preproc_ok; then :
6048
6049else
6050 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6051$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
a9bec17c
GM
6052as_fn_error "C preprocessor \"$CPP\" fails sanity check
6053See \`config.log' for more details." "$LINENO" 5; }
067d23c9
KY
6054fi
6055
6056ac_ext=c
6057ac_cpp='$CPP $CPPFLAGS'
6058ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6059ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6060ac_compiler_gnu=$ac_cv_c_compiler_gnu
6061
6062
6063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6064$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
a9bec17c 6065if test "${ac_cv_path_GREP+set}" = set; then :
067d23c9
KY
6066 $as_echo_n "(cached) " >&6
6067else
6068 if test -z "$GREP"; then
6069 ac_path_GREP_found=false
6070 # Loop through the user's path and test for each of PROGNAME-LIST
6071 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6072for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6073do
6074 IFS=$as_save_IFS
6075 test -z "$as_dir" && as_dir=.
6076 for ac_prog in grep ggrep; do
6077 for ac_exec_ext in '' $ac_executable_extensions; do
6078 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6079 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
6080# Check for GNU ac_path_GREP and select it if it is found.
6081 # Check for GNU $ac_path_GREP
6082case `"$ac_path_GREP" --version 2>&1` in
6083*GNU*)
6084 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6085*)
6086 ac_count=0
6087 $as_echo_n 0123456789 >"conftest.in"
6088 while :
6089 do
6090 cat "conftest.in" "conftest.in" >"conftest.tmp"
6091 mv "conftest.tmp" "conftest.in"
6092 cp "conftest.in" "conftest.nl"
6093 $as_echo 'GREP' >> "conftest.nl"
6094 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6095 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6096 as_fn_arith $ac_count + 1 && ac_count=$as_val
6097 if test $ac_count -gt ${ac_path_GREP_max-0}; then
6098 # Best one so far, save it but keep looking for a better one
6099 ac_cv_path_GREP="$ac_path_GREP"
6100 ac_path_GREP_max=$ac_count
6101 fi
6102 # 10*(2^10) chars as input seems more than enough
6103 test $ac_count -gt 10 && break
6104 done
6105 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6106esac
6107
6108 $ac_path_GREP_found && break 3
6109 done
6110 done
6111 done
6112IFS=$as_save_IFS
6113 if test -z "$ac_cv_path_GREP"; then
a9bec17c 6114 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
067d23c9
KY
6115 fi
6116else
6117 ac_cv_path_GREP=$GREP
6118fi
6119
6120fi
6121{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6122$as_echo "$ac_cv_path_GREP" >&6; }
6123 GREP="$ac_cv_path_GREP"
6124
6125
6126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6127$as_echo_n "checking for egrep... " >&6; }
a9bec17c 6128if test "${ac_cv_path_EGREP+set}" = set; then :
067d23c9
KY
6129 $as_echo_n "(cached) " >&6
6130else
6131 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6132 then ac_cv_path_EGREP="$GREP -E"
6133 else
6134 if test -z "$EGREP"; then
6135 ac_path_EGREP_found=false
6136 # Loop through the user's path and test for each of PROGNAME-LIST
6137 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6138for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6139do
6140 IFS=$as_save_IFS
6141 test -z "$as_dir" && as_dir=.
6142 for ac_prog in egrep; do
6143 for ac_exec_ext in '' $ac_executable_extensions; do
6144 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6145 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
6146# Check for GNU ac_path_EGREP and select it if it is found.
6147 # Check for GNU $ac_path_EGREP
6148case `"$ac_path_EGREP" --version 2>&1` in
6149*GNU*)
6150 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6151*)
6152 ac_count=0
6153 $as_echo_n 0123456789 >"conftest.in"
6154 while :
6155 do
6156 cat "conftest.in" "conftest.in" >"conftest.tmp"
6157 mv "conftest.tmp" "conftest.in"
6158 cp "conftest.in" "conftest.nl"
6159 $as_echo 'EGREP' >> "conftest.nl"
6160 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6161 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6162 as_fn_arith $ac_count + 1 && ac_count=$as_val
6163 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6164 # Best one so far, save it but keep looking for a better one
6165 ac_cv_path_EGREP="$ac_path_EGREP"
6166 ac_path_EGREP_max=$ac_count
6167 fi
6168 # 10*(2^10) chars as input seems more than enough
6169 test $ac_count -gt 10 && break
6170 done
6171 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6172esac
6173
6174 $ac_path_EGREP_found && break 3
6175 done
6176 done
6177 done
6178IFS=$as_save_IFS
6179 if test -z "$ac_cv_path_EGREP"; then
a9bec17c 6180 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
067d23c9
KY
6181 fi
6182else
6183 ac_cv_path_EGREP=$EGREP
6184fi
6185
6186 fi
6187fi
6188{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6189$as_echo "$ac_cv_path_EGREP" >&6; }
6190 EGREP="$ac_cv_path_EGREP"
6191
6192
369e19fc
PE
6193
6194
6195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
6196$as_echo_n "checking for Minix Amsterdam compiler... " >&6; }
a9bec17c 6197if test "${gl_cv_c_amsterdam_compiler+set}" = set; then :
369e19fc
PE
6198 $as_echo_n "(cached) " >&6
6199else
6200
6201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6202/* end confdefs.h. */
6203
6204#ifdef __ACK__
6205Amsterdam
6206#endif
6207
6208_ACEOF
6209if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6210 $EGREP "Amsterdam" >/dev/null 2>&1; then :
6211 gl_cv_c_amsterdam_compiler=yes
6212else
6213 gl_cv_c_amsterdam_compiler=no
6214fi
6215rm -f conftest*
6216
6217
6218fi
6219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
6220$as_echo "$gl_cv_c_amsterdam_compiler" >&6; }
6221 if test -z "$AR"; then
6222 if test $gl_cv_c_amsterdam_compiler = yes; then
6223 AR='cc -c.a'
6224 if test -z "$ARFLAGS"; then
6225 ARFLAGS='-o'
6226 fi
6227 else
6228 if test -n "$ac_tool_prefix"; then
6229 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6230set dummy ${ac_tool_prefix}ar; ac_word=$2
6231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6232$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 6233if test "${ac_cv_prog_AR+set}" = set; then :
369e19fc
PE
6234 $as_echo_n "(cached) " >&6
6235else
6236 if test -n "$AR"; then
6237 ac_cv_prog_AR="$AR" # Let the user override the test.
6238else
6239as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6240for as_dir in $PATH
6241do
6242 IFS=$as_save_IFS
6243 test -z "$as_dir" && as_dir=.
6244 for ac_exec_ext in '' $ac_executable_extensions; do
6245 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6246 ac_cv_prog_AR="${ac_tool_prefix}ar"
6247 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6248 break 2
6249 fi
6250done
6251 done
6252IFS=$as_save_IFS
6253
6254fi
6255fi
6256AR=$ac_cv_prog_AR
6257if test -n "$AR"; then
6258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6259$as_echo "$AR" >&6; }
6260else
6261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6262$as_echo "no" >&6; }
6263fi
6264
6265
6266fi
6267if test -z "$ac_cv_prog_AR"; then
6268 ac_ct_AR=$AR
6269 # Extract the first word of "ar", so it can be a program name with args.
6270set dummy ar; ac_word=$2
6271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6272$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 6273if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
369e19fc
PE
6274 $as_echo_n "(cached) " >&6
6275else
6276 if test -n "$ac_ct_AR"; then
6277 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6278else
6279as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6280for as_dir in $PATH
6281do
6282 IFS=$as_save_IFS
6283 test -z "$as_dir" && as_dir=.
6284 for ac_exec_ext in '' $ac_executable_extensions; do
6285 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6286 ac_cv_prog_ac_ct_AR="ar"
6287 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6288 break 2
6289 fi
6290done
6291 done
6292IFS=$as_save_IFS
6293
6294fi
6295fi
6296ac_ct_AR=$ac_cv_prog_ac_ct_AR
6297if test -n "$ac_ct_AR"; then
6298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6299$as_echo "$ac_ct_AR" >&6; }
6300else
6301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6302$as_echo "no" >&6; }
6303fi
6304
6305 if test "x$ac_ct_AR" = x; then
6306 AR="ar"
6307 else
6308 case $cross_compiling:$ac_tool_warned in
6309yes:)
6310{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6311$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6312ac_tool_warned=yes ;;
6313esac
6314 AR=$ac_ct_AR
6315 fi
6316else
6317 AR="$ac_cv_prog_AR"
6318fi
6319
6320 if test -z "$ARFLAGS"; then
6321 ARFLAGS='cru'
6322 fi
6323 fi
6324 else
6325 if test -z "$ARFLAGS"; then
6326 ARFLAGS='cru'
6327 fi
6328 fi
6329
6330
6331 if test -z "$RANLIB"; then
6332 if test $gl_cv_c_amsterdam_compiler = yes; then
6333 RANLIB=':'
6334 else
6335 if test -n "$ac_tool_prefix"; then
6336 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6337set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6339$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 6340if test "${ac_cv_prog_RANLIB+set}" = set; then :
369e19fc
PE
6341 $as_echo_n "(cached) " >&6
6342else
6343 if test -n "$RANLIB"; then
6344 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6345else
6346as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6347for as_dir in $PATH
6348do
6349 IFS=$as_save_IFS
6350 test -z "$as_dir" && as_dir=.
6351 for ac_exec_ext in '' $ac_executable_extensions; do
6352 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6353 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6354 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6355 break 2
6356 fi
6357done
6358 done
6359IFS=$as_save_IFS
6360
6361fi
6362fi
6363RANLIB=$ac_cv_prog_RANLIB
6364if test -n "$RANLIB"; then
6365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6366$as_echo "$RANLIB" >&6; }
6367else
6368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6369$as_echo "no" >&6; }
6370fi
6371
6372
6373fi
6374if test -z "$ac_cv_prog_RANLIB"; then
6375 ac_ct_RANLIB=$RANLIB
6376 # Extract the first word of "ranlib", so it can be a program name with args.
6377set dummy ranlib; ac_word=$2
6378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6379$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 6380if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
369e19fc
PE
6381 $as_echo_n "(cached) " >&6
6382else
6383 if test -n "$ac_ct_RANLIB"; then
6384 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6385else
6386as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6387for as_dir in $PATH
6388do
6389 IFS=$as_save_IFS
6390 test -z "$as_dir" && as_dir=.
6391 for ac_exec_ext in '' $ac_executable_extensions; do
6392 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6393 ac_cv_prog_ac_ct_RANLIB="ranlib"
6394 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6395 break 2
6396 fi
6397done
6398 done
6399IFS=$as_save_IFS
6400
6401fi
6402fi
6403ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6404if test -n "$ac_ct_RANLIB"; then
6405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6406$as_echo "$ac_ct_RANLIB" >&6; }
6407else
6408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6409$as_echo "no" >&6; }
6410fi
6411
6412 if test "x$ac_ct_RANLIB" = x; then
6413 RANLIB=":"
6414 else
6415 case $cross_compiling:$ac_tool_warned in
6416yes:)
6417{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6418$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6419ac_tool_warned=yes ;;
6420esac
6421 RANLIB=$ac_ct_RANLIB
6422 fi
6423else
6424 RANLIB="$ac_cv_prog_RANLIB"
6425fi
6426
6427 fi
6428 fi
6429
6430
067d23c9
KY
6431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6432$as_echo_n "checking for ANSI C header files... " >&6; }
a9bec17c 6433if test "${ac_cv_header_stdc+set}" = set; then :
067d23c9
KY
6434 $as_echo_n "(cached) " >&6
6435else
6436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6437/* end confdefs.h. */
6438#include <stdlib.h>
6439#include <stdarg.h>
6440#include <string.h>
6441#include <float.h>
6442
6443int
6444main ()
6445{
6446
6447 ;
6448 return 0;
6449}
6450_ACEOF
6451if ac_fn_c_try_compile "$LINENO"; then :
6452 ac_cv_header_stdc=yes
6453else
6454 ac_cv_header_stdc=no
6455fi
6456rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6457
6458if test $ac_cv_header_stdc = yes; then
6459 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6460 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6461/* end confdefs.h. */
6462#include <string.h>
6463
6464_ACEOF
6465if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6466 $EGREP "memchr" >/dev/null 2>&1; then :
6467
6468else
6469 ac_cv_header_stdc=no
6470fi
6471rm -f conftest*
6472
6473fi
6474
6475if test $ac_cv_header_stdc = yes; then
6476 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6478/* end confdefs.h. */
6479#include <stdlib.h>
6480
6481_ACEOF
6482if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6483 $EGREP "free" >/dev/null 2>&1; then :
6484
6485else
6486 ac_cv_header_stdc=no
6487fi
6488rm -f conftest*
6489
6490fi
6491
6492if test $ac_cv_header_stdc = yes; then
6493 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6494 if test "$cross_compiling" = yes; then :
6495 :
6496else
6497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6498/* end confdefs.h. */
6499#include <ctype.h>
6500#include <stdlib.h>
6501#if ((' ' & 0x0FF) == 0x020)
6502# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6503# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6504#else
6505# define ISLOWER(c) \
6506 (('a' <= (c) && (c) <= 'i') \
6507 || ('j' <= (c) && (c) <= 'r') \
6508 || ('s' <= (c) && (c) <= 'z'))
6509# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6510#endif
6511
6512#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6513int
6514main ()
6515{
6516 int i;
6517 for (i = 0; i < 256; i++)
6518 if (XOR (islower (i), ISLOWER (i))
6519 || toupper (i) != TOUPPER (i))
6520 return 2;
6521 return 0;
6522}
6523_ACEOF
6524if ac_fn_c_try_run "$LINENO"; then :
6525
6526else
6527 ac_cv_header_stdc=no
6528fi
6529rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6530 conftest.$ac_objext conftest.beam conftest.$ac_ext
6531fi
6532
6533fi
6534fi
6535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6536$as_echo "$ac_cv_header_stdc" >&6; }
6537if test $ac_cv_header_stdc = yes; then
6538
6539$as_echo "#define STDC_HEADERS 1" >>confdefs.h
6540
6541fi
6542
6543# On IRIX 5.3, sys/types and inttypes.h are conflicting.
6544for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
6545 inttypes.h stdint.h unistd.h
6546do :
6547 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6548ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
6549"
a9bec17c
GM
6550eval as_val=\$$as_ac_Header
6551 if test "x$as_val" = x""yes; then :
067d23c9
KY
6552 cat >>confdefs.h <<_ACEOF
6553#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6554_ACEOF
6555
6556fi
6557
6558done
6559
6560
6561
6562 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
a9bec17c 6563if test "x$ac_cv_header_minix_config_h" = x""yes; then :
067d23c9
KY
6564 MINIX=yes
6565else
6566 MINIX=
6567fi
6568
6569
6570 if test "$MINIX" = yes; then
6571
6572$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
6573
6574
6575$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
6576
6577
6578$as_echo "#define _MINIX 1" >>confdefs.h
6579
1fd182f0 6580
2cdd55fc 6581$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
1fd182f0 6582
2cdd55fc 6583 fi
1fd182f0 6584
067d23c9
KY
6585
6586 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
6587$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
a9bec17c 6588if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
067d23c9
KY
6589 $as_echo_n "(cached) " >&6
6590else
6591 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6592/* end confdefs.h. */
369e19fc
PE
6593
6594# define __EXTENSIONS__ 1
6595 $ac_includes_default
6596int
6597main ()
6598{
6599
6600 ;
6601 return 0;
6602}
6603_ACEOF
6604if ac_fn_c_try_compile "$LINENO"; then :
6605 ac_cv_safe_to_define___extensions__=yes
6606else
6607 ac_cv_safe_to_define___extensions__=no
6608fi
6609rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6610fi
6611{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
6612$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
6613 test $ac_cv_safe_to_define___extensions__ = yes &&
6614 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
6615
6616 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
6617
6618 $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
6619
6620 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
6621
6622 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
6623
6624 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
6625
2cdd55fc
GM
6626 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
6627$as_echo_n "checking whether _XOPEN_SOURCE should be defined... " >&6; }
6628if test "${ac_cv_should_define__xopen_source+set}" = set; then :
6629 $as_echo_n "(cached) " >&6
6630else
6631 ac_cv_should_define__xopen_source=no
6632 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6633/* end confdefs.h. */
6634
6635 #include <wchar.h>
6636 mbstate_t x;
6637int
6638main ()
6639{
6640
6641 ;
6642 return 0;
6643}
6644_ACEOF
6645if ac_fn_c_try_compile "$LINENO"; then :
6646
6647else
6648 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6649/* end confdefs.h. */
6650
6651 #define _XOPEN_SOURCE 500
6652 #include <wchar.h>
6653 mbstate_t x;
6654int
6655main ()
6656{
6657
6658 ;
6659 return 0;
6660}
6661_ACEOF
6662if ac_fn_c_try_compile "$LINENO"; then :
6663 ac_cv_should_define__xopen_source=yes
6664fi
6665rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6666fi
6667rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6668fi
6669{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
6670$as_echo "$ac_cv_should_define__xopen_source" >&6; }
6671 test $ac_cv_should_define__xopen_source = yes &&
6672 $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
6673
369e19fc
PE
6674
6675
6676
6677
6678
6679
6680
6681# Check whether --enable-largefile was given.
6682if test "${enable_largefile+set}" = set; then :
6683 enableval=$enable_largefile;
6684fi
6685
6686if test "$enable_largefile" != no; then
6687
6688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
6689$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
a9bec17c 6690if test "${ac_cv_sys_largefile_CC+set}" = set; then :
369e19fc
PE
6691 $as_echo_n "(cached) " >&6
6692else
6693 ac_cv_sys_largefile_CC=no
6694 if test "$GCC" != yes; then
6695 ac_save_CC=$CC
6696 while :; do
6697 # IRIX 6.2 and later do not support large files by default,
6698 # so use the C compiler's -n32 option if that helps.
6699 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6700/* end confdefs.h. */
6701#include <sys/types.h>
6702 /* Check that off_t can represent 2**63 - 1 correctly.
6703 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6704 since some C++ compilers masquerading as C compilers
6705 incorrectly reject 9223372036854775807. */
6706#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6707 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6708 && LARGE_OFF_T % 2147483647 == 1)
6709 ? 1 : -1];
6710int
6711main ()
6712{
6713
6714 ;
6715 return 0;
6716}
6717_ACEOF
6718 if ac_fn_c_try_compile "$LINENO"; then :
6719 break
6720fi
6721rm -f core conftest.err conftest.$ac_objext
6722 CC="$CC -n32"
6723 if ac_fn_c_try_compile "$LINENO"; then :
6724 ac_cv_sys_largefile_CC=' -n32'; break
6725fi
6726rm -f core conftest.err conftest.$ac_objext
6727 break
6728 done
6729 CC=$ac_save_CC
6730 rm -f conftest.$ac_ext
6731 fi
6732fi
6733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
6734$as_echo "$ac_cv_sys_largefile_CC" >&6; }
6735 if test "$ac_cv_sys_largefile_CC" != no; then
6736 CC=$CC$ac_cv_sys_largefile_CC
6737 fi
6738
6739 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
6740$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
a9bec17c 6741if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
369e19fc
PE
6742 $as_echo_n "(cached) " >&6
6743else
6744 while :; do
6745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6746/* end confdefs.h. */
6747#include <sys/types.h>
6748 /* Check that off_t can represent 2**63 - 1 correctly.
6749 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6750 since some C++ compilers masquerading as C compilers
6751 incorrectly reject 9223372036854775807. */
6752#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6753 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6754 && LARGE_OFF_T % 2147483647 == 1)
6755 ? 1 : -1];
6756int
6757main ()
6758{
6759
6760 ;
6761 return 0;
6762}
6763_ACEOF
6764if ac_fn_c_try_compile "$LINENO"; then :
6765 ac_cv_sys_file_offset_bits=no; break
6766fi
6767rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6769/* end confdefs.h. */
6770#define _FILE_OFFSET_BITS 64
6771#include <sys/types.h>
6772 /* Check that off_t can represent 2**63 - 1 correctly.
6773 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6774 since some C++ compilers masquerading as C compilers
6775 incorrectly reject 9223372036854775807. */
6776#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6777 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6778 && LARGE_OFF_T % 2147483647 == 1)
6779 ? 1 : -1];
6780int
6781main ()
6782{
6783
6784 ;
6785 return 0;
6786}
6787_ACEOF
6788if ac_fn_c_try_compile "$LINENO"; then :
6789 ac_cv_sys_file_offset_bits=64; break
6790fi
6791rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6792 ac_cv_sys_file_offset_bits=unknown
6793 break
6794done
6795fi
6796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
6797$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
6798case $ac_cv_sys_file_offset_bits in #(
6799 no | unknown) ;;
6800 *)
6801cat >>confdefs.h <<_ACEOF
6802#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
6803_ACEOF
6804;;
6805esac
6806rm -rf conftest*
6807 if test $ac_cv_sys_file_offset_bits = unknown; then
6808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
6809$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
a9bec17c 6810if test "${ac_cv_sys_large_files+set}" = set; then :
369e19fc
PE
6811 $as_echo_n "(cached) " >&6
6812else
6813 while :; do
6814 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6815/* end confdefs.h. */
6816#include <sys/types.h>
6817 /* Check that off_t can represent 2**63 - 1 correctly.
6818 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6819 since some C++ compilers masquerading as C compilers
6820 incorrectly reject 9223372036854775807. */
6821#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6822 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6823 && LARGE_OFF_T % 2147483647 == 1)
6824 ? 1 : -1];
6825int
6826main ()
6827{
6828
6829 ;
6830 return 0;
6831}
6832_ACEOF
6833if ac_fn_c_try_compile "$LINENO"; then :
6834 ac_cv_sys_large_files=no; break
6835fi
6836rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6837 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6838/* end confdefs.h. */
6839#define _LARGE_FILES 1
6840#include <sys/types.h>
6841 /* Check that off_t can represent 2**63 - 1 correctly.
6842 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6843 since some C++ compilers masquerading as C compilers
6844 incorrectly reject 9223372036854775807. */
6845#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6846 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6847 && LARGE_OFF_T % 2147483647 == 1)
6848 ? 1 : -1];
067d23c9
KY
6849int
6850main ()
6851{
6852
6853 ;
6854 return 0;
6855}
6856_ACEOF
6857if ac_fn_c_try_compile "$LINENO"; then :
369e19fc 6858 ac_cv_sys_large_files=1; break
067d23c9
KY
6859fi
6860rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
369e19fc
PE
6861 ac_cv_sys_large_files=unknown
6862 break
6863done
067d23c9 6864fi
369e19fc
PE
6865{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
6866$as_echo "$ac_cv_sys_large_files" >&6; }
6867case $ac_cv_sys_large_files in #(
6868 no | unknown) ;;
6869 *)
6870cat >>confdefs.h <<_ACEOF
6871#define _LARGE_FILES $ac_cv_sys_large_files
6872_ACEOF
6873;;
6874esac
6875rm -rf conftest*
6876 fi
1fd182f0
PE
6877
6878
858c7150
GM
6879$as_echo "#define _DARWIN_USE_64_BIT_INODE 1" >>confdefs.h
6880
369e19fc 6881fi
1fd182f0 6882
6d153f56
GM
6883 case $ac_cv_prog_cc_stdc in #(
6884 no) :
6885 ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; #(
6886 *) :
6887 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
6888$as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
a9bec17c 6889if test "${ac_cv_prog_cc_c99+set}" = set; then :
6d153f56
GM
6890 $as_echo_n "(cached) " >&6
6891else
6892 ac_cv_prog_cc_c99=no
6893ac_save_CC=$CC
6894cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6895/* end confdefs.h. */
6896#include <stdarg.h>
6897#include <stdbool.h>
6898#include <stdlib.h>
6899#include <wchar.h>
6900#include <stdio.h>
6901
6902// Check varargs macros. These examples are taken from C99 6.10.3.5.
6903#define debug(...) fprintf (stderr, __VA_ARGS__)
6904#define showlist(...) puts (#__VA_ARGS__)
6905#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
6906static void
6907test_varargs_macros (void)
6908{
6909 int x = 1234;
6910 int y = 5678;
6911 debug ("Flag");
6912 debug ("X = %d\n", x);
6913 showlist (The first, second, and third items.);
6914 report (x>y, "x is %d but y is %d", x, y);
6915}
6916
6917// Check long long types.
6918#define BIG64 18446744073709551615ull
6919#define BIG32 4294967295ul
6920#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
6921#if !BIG_OK
6922 your preprocessor is broken;
6923#endif
6924#if BIG_OK
6925#else
6926 your preprocessor is broken;
6927#endif
6928static long long int bignum = -9223372036854775807LL;
6929static unsigned long long int ubignum = BIG64;
6930
6931struct incomplete_array
6932{
6933 int datasize;
6934 double data[];
6935};
6936
6937struct named_init {
6938 int number;
6939 const wchar_t *name;
6940 double average;
6941};
6942
6943typedef const char *ccp;
6944
6945static inline int
6946test_restrict (ccp restrict text)
6947{
6948 // See if C++-style comments work.
6949 // Iterate through items via the restricted pointer.
6950 // Also check for declarations in for loops.
6951 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
6952 continue;
6953 return 0;
6954}
6955
6956// Check varargs and va_copy.
6957static void
6958test_varargs (const char *format, ...)
6959{
6960 va_list args;
6961 va_start (args, format);
6962 va_list args_copy;
6963 va_copy (args_copy, args);
6964
6965 const char *str;
6966 int number;
6967 float fnumber;
6968
6969 while (*format)
6970 {
6971 switch (*format++)
6972 {
6973 case 's': // string
6974 str = va_arg (args_copy, const char *);
6975 break;
6976 case 'd': // int
6977 number = va_arg (args_copy, int);
6978 break;
6979 case 'f': // float
6980 fnumber = va_arg (args_copy, double);
6981 break;
6982 default:
6983 break;
6984 }
6985 }
6986 va_end (args_copy);
6987 va_end (args);
6988}
6989
6990int
6991main ()
6992{
6993
6994 // Check bool.
6995 _Bool success = false;
6996
6997 // Check restrict.
6998 if (test_restrict ("String literal") == 0)
6999 success = true;
7000 char *restrict newvar = "Another string";
7001
7002 // Check varargs.
7003 test_varargs ("s, d' f .", "string", 65, 34.234);
7004 test_varargs_macros ();
7005
7006 // Check flexible array members.
7007 struct incomplete_array *ia =
7008 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
7009 ia->datasize = 10;
7010 for (int i = 0; i < ia->datasize; ++i)
7011 ia->data[i] = i * 1.234;
7012
7013 // Check named initializers.
7014 struct named_init ni = {
7015 .number = 34,
7016 .name = L"Test wide string",
7017 .average = 543.34343,
7018 };
7019
7020 ni.number = 58;
7021
7022 int dynamic_array[ni.number];
7023 dynamic_array[ni.number - 1] = 543;
7024
7025 // work around unused variable warnings
7026 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
7027 || dynamic_array[ni.number - 1] != 543);
7028
7029 ;
7030 return 0;
7031}
7032_ACEOF
7033for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99
7034do
7035 CC="$ac_save_CC $ac_arg"
7036 if ac_fn_c_try_compile "$LINENO"; then :
7037 ac_cv_prog_cc_c99=$ac_arg
7038fi
7039rm -f core conftest.err conftest.$ac_objext
7040 test "x$ac_cv_prog_cc_c99" != "xno" && break
7041done
7042rm -f conftest.$ac_ext
7043CC=$ac_save_CC
7044
7045fi
7046# AC_CACHE_VAL
7047case "x$ac_cv_prog_cc_c99" in
7048 x)
7049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
7050$as_echo "none needed" >&6; } ;;
7051 xno)
7052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
7053$as_echo "unsupported" >&6; } ;;
7054 *)
7055 CC="$CC $ac_cv_prog_cc_c99"
7056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
7057$as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
7058esac
7059if test "x$ac_cv_prog_cc_c99" != xno; then :
7060 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
7061else
7062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
7063$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
a9bec17c 7064if test "${ac_cv_prog_cc_c89+set}" = set; then :
6d153f56
GM
7065 $as_echo_n "(cached) " >&6
7066else
7067 ac_cv_prog_cc_c89=no
7068ac_save_CC=$CC
7069cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7070/* end confdefs.h. */
7071#include <stdarg.h>
7072#include <stdio.h>
7073#include <sys/types.h>
7074#include <sys/stat.h>
7075/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
7076struct buf { int x; };
7077FILE * (*rcsopen) (struct buf *, struct stat *, int);
7078static char *e (p, i)
7079 char **p;
7080 int i;
7081{
7082 return p[i];
7083}
7084static char *f (char * (*g) (char **, int), char **p, ...)
7085{
7086 char *s;
7087 va_list v;
7088 va_start (v,p);
7089 s = g (p, va_arg (v,int));
7090 va_end (v);
7091 return s;
7092}
7093
7094/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
7095 function prototypes and stuff, but not '\xHH' hex character constants.
7096 These don't provoke an error unfortunately, instead are silently treated
7097 as 'x'. The following induces an error, until -std is added to get
7098 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
7099 array size at least. It's necessary to write '\x00'==0 to get something
7100 that's true only with -std. */
7101int osf4_cc_array ['\x00' == 0 ? 1 : -1];
7102
7103/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
7104 inside strings and character constants. */
7105#define FOO(x) 'x'
7106int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
7107
7108int test (int i, double x);
7109struct s1 {int (*f) (int a);};
7110struct s2 {int (*f) (double a);};
7111int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
7112int argc;
7113char **argv;
7114int
7115main ()
7116{
7117return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
7118 ;
7119 return 0;
7120}
7121_ACEOF
7122for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
7123 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
7124do
7125 CC="$ac_save_CC $ac_arg"
7126 if ac_fn_c_try_compile "$LINENO"; then :
7127 ac_cv_prog_cc_c89=$ac_arg
7128fi
7129rm -f core conftest.err conftest.$ac_objext
7130 test "x$ac_cv_prog_cc_c89" != "xno" && break
7131done
7132rm -f conftest.$ac_ext
7133CC=$ac_save_CC
7134
7135fi
7136# AC_CACHE_VAL
7137case "x$ac_cv_prog_cc_c89" in
7138 x)
7139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
7140$as_echo "none needed" >&6; } ;;
7141 xno)
7142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
7143$as_echo "unsupported" >&6; } ;;
7144 *)
7145 CC="$CC $ac_cv_prog_cc_c89"
7146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
7147$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
7148esac
7149if test "x$ac_cv_prog_cc_c89" != xno; then :
7150 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
7151else
7152 ac_cv_prog_cc_stdc=no
7153fi
7154
7155fi
7156 ;;
7157esac
7158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5
7159$as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; }
a9bec17c 7160 if test "${ac_cv_prog_cc_stdc+set}" = set; then :
6d153f56
GM
7161 $as_echo_n "(cached) " >&6
7162fi
7163
7164 case $ac_cv_prog_cc_stdc in #(
7165 no) :
7166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
7167$as_echo "unsupported" >&6; } ;; #(
7168 '') :
7169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
7170$as_echo "none needed" >&6; } ;; #(
7171 *) :
7172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_stdc" >&5
7173$as_echo "$ac_cv_prog_cc_stdc" >&6; } ;;
7174esac
7175
1fd182f0
PE
7176
7177
4fc2b746 7178 # Code from module alloca-opt:
8d8af66d 7179 # Code from module allocator:
d7ad186c 7180 # Code from module at-internal:
938a4ef9
GM
7181 # Code from module c-ctype:
7182 # Code from module c-strcase:
6c051bab 7183 # Code from module careadlinkat:
f199cab1 7184 # Code from module clock-time:
3bf26e96 7185 # Code from module close-stream:
942f733f 7186 # Code from module crypto/md5:
40e27e7f 7187 # Code from module crypto/sha1:
d87ffdb7
GM
7188 # Code from module crypto/sha256:
7189 # Code from module crypto/sha512:
d7ad186c 7190 # Code from module dirent:
36f13e16 7191 # Code from module dosname:
f737437b 7192 # Code from module dtoastr:
f199cab1 7193 # Code from module dtotimespec:
7d2a1c5e 7194 # Code from module dup2:
93131e11 7195 # Code from module environ:
3a019ab4 7196 # Code from module errno:
710f5812 7197 # Code from module euidaccess:
8966cbff 7198 # Code from module execinfo:
1fd182f0
PE
7199 # Code from module extensions:
7200
7cd2ed2c 7201 # Code from module extern-inline:
710f5812
GM
7202 # Code from module faccessat:
7203 # Code from module fcntl-h:
2407788f 7204 # Code from module fdatasync:
d7ad186c 7205 # Code from module fdopendir:
5fa4ac76 7206 # Code from module filemode:
3bf26e96 7207 # Code from module fpending:
d7ad186c 7208 # Code from module fstatat:
2407788f 7209 # Code from module fsync:
710f5812 7210 # Code from module getgroups:
1f5d53eb 7211 # Code from module getloadavg:
e275c824
PE
7212 # Code from module getopt-gnu:
7213 # Code from module getopt-posix:
7214 # Code from module gettext-h:
f199cab1
GM
7215 # Code from module gettime:
7216 # Code from module gettimeofday:
710f5812 7217 # Code from module group-member:
67342916 7218 # Code from module ignore-value:
1fd182f0
PE
7219 # Code from module include_next:
7220 # Code from module intprops:
4fda9c95 7221 # Code from module inttypes-incomplete:
369e19fc
PE
7222 # Code from module largefile:
7223
ae0d7250 7224 # Code from module lstat:
ac1ca7e9 7225 # Code from module manywarnings:
283c7aed 7226 # Code from module memrchr:
1fd182f0
PE
7227 # Code from module mktime:
7228 # Code from module multiarch:
369e19fc 7229 # Code from module nocrash:
d7ad186c 7230 # Code from module openat-h:
a0a61e58 7231 # Code from module pathmax:
f199cab1 7232 # Code from module pselect:
3e0be4ab 7233 # Code from module pthread_sigmask:
b5591ebb 7234 # Code from module putenv:
3a019ab4 7235 # Code from module qacl:
ae0d7250 7236 # Code from module readlink:
d7ad186c 7237 # Code from module readlinkat:
710f5812 7238 # Code from module root-uid:
e4184a20 7239 # Code from module sig2str:
2b1928b8 7240 # Code from module signal-h:
369e19fc
PE
7241 # Code from module snippet/_Noreturn:
7242 # Code from module snippet/arg-nonnull:
7243 # Code from module snippet/c++defs:
7244 # Code from module snippet/warn-on-use:
6ad6792b 7245 # Code from module socklen:
6c051bab 7246 # Code from module ssize_t:
ae0d7250 7247 # Code from module stat:
f199cab1 7248 # Code from module stat-time:
0eb775a3 7249 # Code from module stdalign:
6d153f56
GM
7250 # Code from module stdarg:
7251
8c069cc7
GM
7252
7253
16c3e636 7254 # Code from module stdbool:
1fd182f0 7255 # Code from module stddef:
5f90be1b 7256 # Code from module stdint:
6ad6792b 7257 # Code from module stdio:
1f5d53eb 7258 # Code from module stdlib:
16c3e636 7259 # Code from module strftime:
283c7aed 7260 # Code from module string:
3e0be4ab
GM
7261 # Code from module strtoimax:
7262 # Code from module strtoll:
4fda9c95
GM
7263 # Code from module strtoull:
7264 # Code from module strtoumax:
ae0d7250 7265 # Code from module symlink:
f199cab1 7266 # Code from module sys_select:
5fa4ac76 7267 # Code from module sys_stat:
f199cab1 7268 # Code from module sys_time:
1fd182f0
PE
7269 # Code from module time:
7270 # Code from module time_r:
f077f61d 7271 # Code from module timer-time:
f199cab1
GM
7272 # Code from module timespec:
7273 # Code from module timespec-add:
7274 # Code from module timespec-sub:
d87ffdb7 7275 # Code from module u64:
e275c824 7276 # Code from module unistd:
b5591ebb 7277 # Code from module unsetenv:
f199cab1 7278 # Code from module utimens:
4fda9c95 7279 # Code from module verify:
ac1ca7e9 7280 # Code from module warnings:
710f5812 7281 # Code from module xalloc-oversized:
1fd182f0
PE
7282
7283
6bd1cda5 7284if test "$ac_test_CFLAGS" != set; then
8beecaed
GM
7285 # It's helpful to have C macros available to GDB, so prefer -g3 to -g
7286 # if -g3 works and the user does not specify CFLAGS.
7287 # This test must follow gl_EARLY; otherwise AC_LINK_IFELSE complains.
6bd1cda5
GM
7288 case $CFLAGS in
7289 '-g')
7290 emacs_g3_CFLAGS='-g3';;
7291 '-g -O2')
7292 emacs_g3_CFLAGS='-g3 -O2';;
7293 *)
7294 emacs_g3_CFLAGS='';;
7295 esac
7296 if test -n "$emacs_g3_CFLAGS"; then
7297 emacs_save_CFLAGS=$CFLAGS
7298 CFLAGS=$emacs_g3_CFLAGS
7299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts $emacs_g3_CFLAGS" >&5
7300$as_echo_n "checking whether $CC accepts $emacs_g3_CFLAGS... " >&6; }
7301if test "${emacs_cv_prog_cc_g3+set}" = set; then :
7302 $as_echo_n "(cached) " >&6
7303else
7304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7305/* end confdefs.h. */
7306
7307int
7308main ()
7309{
7310
7311 ;
7312 return 0;
7313}
7314_ACEOF
7315if ac_fn_c_try_link "$LINENO"; then :
7316 emacs_cv_prog_cc_g3=yes
7317else
7318 emacs_cv_prog_cc_g3=no
7319fi
7320rm -f core conftest.err conftest.$ac_objext \
7321 conftest$ac_exeext conftest.$ac_ext
7322fi
7323{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_prog_cc_g3" >&5
7324$as_echo "$emacs_cv_prog_cc_g3" >&6; }
8beecaed 7325 if test $emacs_cv_prog_cc_g3 != yes; then
6bd1cda5
GM
7326 CFLAGS=$emacs_save_CFLAGS
7327 fi
7328 fi
8beecaed
GM
7329
7330 case $CFLAGS in
7331 *-O*) ;;
7332 *)
7333 # No optimization flag was inferred for this non-GCC compiler.
7334 # Try -O. This is needed for xlc on AIX; see Bug#14258.
7335 emacs_save_CFLAGS=$CFLAGS
7336 test -z "$CFLAGS" || CFLAGS="$CFLAGS "
7337 CFLAGS=${CFLAGS}-O
7338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -O" >&5
7339$as_echo_n "checking whether $CC accepts -O... " >&6; }
7340if test "${emacs_cv_prog_cc_o+set}" = set; then :
7341 $as_echo_n "(cached) " >&6
7342else
7343 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7344/* end confdefs.h. */
7345
7346int
7347main ()
7348{
7349
7350 ;
7351 return 0;
7352}
7353_ACEOF
7354if ac_fn_c_try_link "$LINENO"; then :
7355 emacs_cv_prog_cc_o=yes
7356else
7357 emacs_cv_prog_cc_o=no
7358fi
7359rm -f core conftest.err conftest.$ac_objext \
7360 conftest$ac_exeext conftest.$ac_ext
7361fi
7362{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_prog_cc_o" >&5
7363$as_echo "$emacs_cv_prog_cc_o" >&6; }
7364 if test $emacs_cv_prog_cc_o != yes; then
7365 CFLAGS=$emacs_save_CFLAGS
7366 fi ;;
7367 esac
6bd1cda5
GM
7368fi
7369
a6b92a4a
GM
7370# Check whether --enable-gcc-warnings was given.
7371if test "${enable_gcc_warnings+set}" = set; then :
7372 enableval=$enable_gcc_warnings; case $enableval in
7373 yes|no) ;;
7374 *) as_fn_error "bad value $enableval for gcc-warnings option" "$LINENO" 5 ;;
7375 esac
7376 gl_gcc_warnings=$enableval
7377else
7378 gl_gcc_warnings=no
7379
7380fi
7381
7382
e4d35030
GM
7383# Check whether --enable-link-time-optimization was given.
7384if test "${enable_link_time_optimization+set}" = set; then :
7385 enableval=$enable_link_time_optimization; if test "${enableval}" != "no"; then
7386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether link-time optimization is supported" >&5
7387$as_echo_n "checking whether link-time optimization is supported... " >&6; }
7388 ac_lto_supported=no
7389 if test x$GCC = xyes; then
7390 CPUS=`getconf _NPROCESSORS_ONLN 2>/dev/null`
7391 if test x$CPUS != x; then
7392 LTO="-flto=$CPUS"
7393 else
7394 LTO="-flto"
7395 fi
7396 old_CFLAGS=$CFLAGS
7397 CFLAGS="$CFLAGS $LTO"
7398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7399/* end confdefs.h. */
7400
7401int
7402main ()
7403{
7404
7405 ;
7406 return 0;
7407}
7408_ACEOF
7409if ac_fn_c_try_compile "$LINENO"; then :
7410 ac_lto_supported=yes
7411else
7412 ac_lto_supported=no
7413fi
7414rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7415 CFLAGS="$old_CFLAGS"
7416 fi
7417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_lto_supported" >&5
7418$as_echo "$ac_lto_supported" >&6; }
7419 if test "$ac_lto_supported" = "yes"; then
7420 CFLAGS="$CFLAGS $LTO"
7421 fi
7422fi
7423fi
7424
7425
a6b92a4a
GM
7426# gl_GCC_VERSION_IFELSE([major], [minor], [run-if-found], [run-if-not-found])
7427# ------------------------------------------------
7428# If $CPP is gcc-MAJOR.MINOR or newer, then run RUN-IF-FOUND.
7429# Otherwise, run RUN-IF-NOT-FOUND.
7430
7431
7432# When compiling with GCC, prefer -isystem to -I when including system
7433# include files, to avoid generating useless diagnostics for the files.
7434if test "$gl_gcc_warnings" != yes; then
7435 isystem='-I'
7436else
7437 isystem='-isystem '
7438
7439 # This, $nw, is the list of warnings we disable.
7440 nw=
7441
7442 case $with_x_toolkit in
7443 lucid | athena | motif)
7444 # Old toolkits mishandle 'const'.
7445 nw="$nw -Wwrite-strings"
7446 ;;
7447 *)
7448 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror" >&5
7449$as_echo_n "checking whether C compiler handles -Werror... " >&6; }
7450if test "${gl_cv_warn_c__Werror+set}" = set; then :
7451 $as_echo_n "(cached) " >&6
7452else
7453
7454 gl_save_compiler_FLAGS="$CFLAGS"
0eb775a3 7455 as_fn_append CFLAGS " -Werror"
a6b92a4a 7456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
7457/* end confdefs.h. */
7458
7459int
7460main ()
7461{
7462
7463 ;
7464 return 0;
7465}
7466_ACEOF
7467if ac_fn_c_try_compile "$LINENO"; then :
a6b92a4a 7468 gl_cv_warn_c__Werror=yes
067d23c9 7469else
a6b92a4a 7470 gl_cv_warn_c__Werror=no
067d23c9
KY
7471fi
7472rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a6b92a4a
GM
7473 CFLAGS="$gl_save_compiler_FLAGS"
7474
7475fi
7476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror" >&5
7477$as_echo "$gl_cv_warn_c__Werror" >&6; }
7478if test "x$gl_cv_warn_c__Werror" = x""yes; then :
7479 as_fn_append WERROR_CFLAGS " -Werror"
7480fi
7481
0eb775a3 7482
a6b92a4a
GM
7483 ;;
7484 esac
7485
7486
7487 nw="$nw -Waggregate-return" # anachronistic
ca0294bb 7488 nw="$nw -Wlong-long" # C90 is anachronistic
a6b92a4a
GM
7489 nw="$nw -Wc++-compat" # We don't care about C++ compilers
7490 nw="$nw -Wundef" # Warns on '#if GNULIB_FOO' etc in gnulib
7491 nw="$nw -Wtraditional" # Warns on #elif which we use often
7492 nw="$nw -Wcast-qual" # Too many warnings for now
7493 nw="$nw -Wconversion" # Too many warnings for now
7494 nw="$nw -Wsystem-headers" # Don't let system headers trigger warnings
7495 nw="$nw -Wsign-conversion" # Too many warnings for now
7496 nw="$nw -Woverlength-strings" # Not a problem these days
7497 nw="$nw -Wtraditional-conversion" # Too many warnings for now
fd9d2a9d 7498 nw="$nw -Wunreachable-code" # so buggy that it's now silently ignored
a6b92a4a 7499 nw="$nw -Wpadded" # Our structs are not padded
fd9d2a9d 7500 nw="$nw -Wredundant-decls" # we regularly (re)declare functions
a6b92a4a 7501 nw="$nw -Wlogical-op" # any use of fwrite provokes this
fd9d2a9d 7502 nw="$nw -Wformat-nonliteral" # we do this a lot
a6b92a4a
GM
7503 nw="$nw -Wvla" # warnings in gettext.h
7504 nw="$nw -Wnested-externs" # use of XARGMATCH/verify_function__
7505 nw="$nw -Wswitch-enum" # Too many warnings for now
7506 nw="$nw -Wswitch-default" # Too many warnings for now
fd9d2a9d
GM
7507 nw="$nw -Wfloat-equal" # warns about high-quality code
7508 nw="$nw -Winline" # OK to ignore 'inline'
6ec9a5a7 7509 nw="$nw -Wjump-misses-init" # We sometimes safely jump over init.
da8ed5ba
GM
7510 nw="$nw -Wstrict-overflow" # OK to optimize assuming that
7511 # signed overflow has undefined behavior
fd9d2a9d
GM
7512 nw="$nw -Wsync-nand" # irrelevant here, and provokes ObjC warning
7513 nw="$nw -Wunsafe-loop-optimizations" # OK to suppress unsafe optimizations
a6b92a4a
GM
7514
7515 # Emacs doesn't care about shadowing; see
7516 # <http://lists.gnu.org/archive/html/emacs-diffs/2011-11/msg00265.html>.
7517 nw="$nw -Wshadow"
7518
ad33cb00
GM
7519 # Emacs's use of alloca inhibits protecting the stack.
7520 nw="$nw -Wstack-protector"
7521
da8ed5ba 7522 # The following line should be removable at some point.
a6b92a4a
GM
7523 nw="$nw -Wsuggest-attribute=pure"
7524
7525
7526
7527 if test -n "$GCC"; then
7528
7529 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is supported" >&5
7530$as_echo_n "checking whether -Wno-missing-field-initializers is supported... " >&6; }
7531 if test "${gl_cv_cc_nomfi_supported+set}" = set; then :
7532 $as_echo_n "(cached) " >&6
7533else
7534
7535 gl_save_CFLAGS="$CFLAGS"
7536 CFLAGS="$CFLAGS -W -Werror -Wno-missing-field-initializers"
7537 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
7538/* end confdefs.h. */
7539
7540int
7541main ()
7542{
7543
7544 ;
7545 return 0;
7546}
7547_ACEOF
7548if ac_fn_c_try_compile "$LINENO"; then :
a6b92a4a 7549 gl_cv_cc_nomfi_supported=yes
067d23c9 7550else
a6b92a4a 7551 gl_cv_cc_nomfi_supported=no
067d23c9
KY
7552fi
7553rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a6b92a4a
GM
7554 CFLAGS="$gl_save_CFLAGS"
7555fi
7556
7557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_supported" >&5
7558$as_echo "$gl_cv_cc_nomfi_supported" >&6; }
7559
7560 if test "$gl_cv_cc_nomfi_supported" = yes; then
7561 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is needed" >&5
7562$as_echo_n "checking whether -Wno-missing-field-initializers is needed... " >&6; }
7563 if test "${gl_cv_cc_nomfi_needed+set}" = set; then :
7564 $as_echo_n "(cached) " >&6
7565else
7566
7567 gl_save_CFLAGS="$CFLAGS"
7568 CFLAGS="$CFLAGS -W -Werror"
7569 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7570/* end confdefs.h. */
7571void f (void)
7572 {
7573 typedef struct { int a; int b; } s_t;
7574 s_t s1 = { 0, };
7575 }
7576
7577int
7578main ()
7579{
7580
7581 ;
7582 return 0;
7583}
7584_ACEOF
7585if ac_fn_c_try_compile "$LINENO"; then :
7586 gl_cv_cc_nomfi_needed=no
7587else
7588 gl_cv_cc_nomfi_needed=yes
7589fi
7590rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7591 CFLAGS="$gl_save_CFLAGS"
7592
7593fi
7594
7595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_needed" >&5
7596$as_echo "$gl_cv_cc_nomfi_needed" >&6; }
7597 fi
b6c9d18d
GM
7598
7599 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wuninitialized is supported" >&5
7600$as_echo_n "checking whether -Wuninitialized is supported... " >&6; }
7601 if test "${gl_cv_cc_uninitialized_supported+set}" = set; then :
7602 $as_echo_n "(cached) " >&6
7603else
7604
7605 gl_save_CFLAGS="$CFLAGS"
7606 CFLAGS="$CFLAGS -Werror -Wuninitialized"
7607 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7608/* end confdefs.h. */
7609
7610int
7611main ()
7612{
7613
7614 ;
7615 return 0;
7616}
7617_ACEOF
7618if ac_fn_c_try_compile "$LINENO"; then :
7619 gl_cv_cc_uninitialized_supported=yes
7620else
7621 gl_cv_cc_uninitialized_supported=no
7622fi
7623rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7624 CFLAGS="$gl_save_CFLAGS"
7625fi
7626
7627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_uninitialized_supported" >&5
7628$as_echo "$gl_cv_cc_uninitialized_supported" >&6; }
7629
a6b92a4a
GM
7630 fi
7631
b6c9d18d 7632 # List all gcc warning categories.
a6b92a4a
GM
7633 gl_manywarn_set=
7634 for gl_manywarn_item in \
a6b92a4a 7635 -W \
dcde497f
GM
7636 -Wabi \
7637 -Waddress \
7638 -Wall \
7639 -Warray-bounds \
7640 -Wattributes \
a6b92a4a 7641 -Wbad-function-cast \
a6b92a4a 7642 -Wbuiltin-macro-redefined \
dcde497f
GM
7643 -Wcast-align \
7644 -Wchar-subscripts \
7645 -Wclobbered \
7646 -Wcomment \
7647 -Wcomments \
a6b92a4a 7648 -Wcoverage-mismatch \
a6b92a4a
GM
7649 -Wcpp \
7650 -Wdeprecated \
7651 -Wdeprecated-declarations \
dcde497f 7652 -Wdisabled-optimization \
a6b92a4a
GM
7653 -Wdiv-by-zero \
7654 -Wdouble-promotion \
dcde497f 7655 -Wempty-body \
a6b92a4a 7656 -Wendif-labels \
dcde497f 7657 -Wenum-compare \
a6b92a4a
GM
7658 -Wextra \
7659 -Wformat-contains-nul \
7660 -Wformat-extra-args \
dcde497f
GM
7661 -Wformat-nonliteral \
7662 -Wformat-security \
7663 -Wformat-y2k \
a6b92a4a
GM
7664 -Wformat-zero-length \
7665 -Wformat=2 \
dcde497f
GM
7666 -Wfree-nonheap-object \
7667 -Wignored-qualifiers \
7668 -Wimplicit \
7669 -Wimplicit-function-declaration \
7670 -Wimplicit-int \
7671 -Winit-self \
7672 -Winline \
7673 -Wint-to-pointer-cast \
7674 -Winvalid-memory-model \
7675 -Winvalid-pch \
7676 -Wjump-misses-init \
7677 -Wlogical-op \
7678 -Wmain \
7679 -Wmaybe-uninitialized \
7680 -Wmissing-braces \
7681 -Wmissing-declarations \
7682 -Wmissing-field-initializers \
7683 -Wmissing-format-attribute \
7684 -Wmissing-include-dirs \
7685 -Wmissing-noreturn \
7686 -Wmissing-parameter-type \
7687 -Wmissing-prototypes \
7688 -Wmudflap \
a6b92a4a 7689 -Wmultichar \
dcde497f
GM
7690 -Wnarrowing \
7691 -Wnested-externs \
7692 -Wnonnull \
a6b92a4a 7693 -Wnormalized=nfc \
dcde497f
GM
7694 -Wold-style-declaration \
7695 -Wold-style-definition \
a6b92a4a 7696 -Woverflow \
dcde497f
GM
7697 -Woverlength-strings \
7698 -Woverride-init \
7699 -Wpacked \
7700 -Wpacked-bitfield-compat \
7701 -Wparentheses \
7702 -Wpointer-arith \
7703 -Wpointer-sign \
a6b92a4a
GM
7704 -Wpointer-to-int-cast \
7705 -Wpragmas \
dcde497f
GM
7706 -Wreturn-type \
7707 -Wsequence-point \
7708 -Wshadow \
7709 -Wsizeof-pointer-memaccess \
7710 -Wstack-protector \
7711 -Wstrict-aliasing \
7712 -Wstrict-overflow \
7713 -Wstrict-prototypes \
a6b92a4a 7714 -Wsuggest-attribute=const \
dcde497f 7715 -Wsuggest-attribute=format \
a6b92a4a
GM
7716 -Wsuggest-attribute=noreturn \
7717 -Wsuggest-attribute=pure \
dcde497f
GM
7718 -Wswitch \
7719 -Wswitch-default \
7720 -Wsync-nand \
7721 -Wsystem-headers \
a6b92a4a 7722 -Wtrampolines \
dcde497f
GM
7723 -Wtrigraphs \
7724 -Wtype-limits \
7725 -Wuninitialized \
7726 -Wunknown-pragmas \
7727 -Wunreachable-code \
7728 -Wunsafe-loop-optimizations \
7729 -Wunused \
7730 -Wunused-but-set-parameter \
7731 -Wunused-but-set-variable \
7732 -Wunused-function \
7733 -Wunused-label \
7734 -Wunused-local-typedefs \
7735 -Wunused-macros \
7736 -Wunused-parameter \
7737 -Wunused-result \
7738 -Wunused-value \
7739 -Wunused-variable \
7740 -Wvarargs \
7741 -Wvariadic-macros \
7742 -Wvector-operation-performance \
7743 -Wvla \
7744 -Wvolatile-register-var \
7745 -Wwrite-strings \
7746 \
a6b92a4a
GM
7747 ; do
7748 gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
7749 done
7750
b6c9d18d 7751 # Disable specific options as needed.
a6b92a4a
GM
7752 if test "$gl_cv_cc_nomfi_needed" = yes; then
7753 gl_manywarn_set="$gl_manywarn_set -Wno-missing-field-initializers"
7754 fi
7755
b6c9d18d
GM
7756 if test "$gl_cv_cc_uninitialized_supported" = no; then
7757 gl_manywarn_set="$gl_manywarn_set -Wno-uninitialized"
7758 fi
7759
a6b92a4a
GM
7760 ws=$gl_manywarn_set
7761
7762
7763 gl_warn_set=
7764 set x $ws; shift
7765 for gl_warn_item
7766 do
7767 case " $nw " in
7768 *" $gl_warn_item "*)
7769 ;;
7770 *)
7771 gl_warn_set="$gl_warn_set $gl_warn_item"
7772 ;;
7773 esac
7774 done
7775 ws=$gl_warn_set
7776
7777 for w in $ws; do
7778 as_gl_Warn=`$as_echo "gl_cv_warn_c_$w" | $as_tr_sh`
7779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles $w" >&5
7780$as_echo_n "checking whether C compiler handles $w... " >&6; }
7781if { as_var=$as_gl_Warn; eval "test \"\${$as_var+set}\" = set"; }; then :
7782 $as_echo_n "(cached) " >&6
7783else
7784
7785 gl_save_compiler_FLAGS="$CFLAGS"
0eb775a3 7786 as_fn_append CFLAGS " $w"
a6b92a4a
GM
7787 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7788/* end confdefs.h. */
7789
7790int
7791main ()
7792{
7793
7794 ;
7795 return 0;
7796}
7797_ACEOF
7798if ac_fn_c_try_compile "$LINENO"; then :
7799 eval "$as_gl_Warn=yes"
7800else
7801 eval "$as_gl_Warn=no"
7802fi
7803rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7804 CFLAGS="$gl_save_compiler_FLAGS"
7805
7806fi
7807eval ac_res=\$$as_gl_Warn
7808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7809$as_echo "$ac_res" >&6; }
7810eval as_val=\$$as_gl_Warn
7811 if test "x$as_val" = x""yes; then :
7812 as_fn_append WARN_CFLAGS " $w"
7813fi
7814
0eb775a3 7815
a6b92a4a
GM
7816 done
7817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-missing-field-initializers" >&5
7818$as_echo_n "checking whether C compiler handles -Wno-missing-field-initializers... " >&6; }
7819if test "${gl_cv_warn_c__Wno_missing_field_initializers+set}" = set; then :
7820 $as_echo_n "(cached) " >&6
7821else
7822
7823 gl_save_compiler_FLAGS="$CFLAGS"
0eb775a3 7824 as_fn_append CFLAGS " -Wno-missing-field-initializers"
a6b92a4a
GM
7825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7826/* end confdefs.h. */
7827
7828int
7829main ()
7830{
7831
7832 ;
7833 return 0;
7834}
7835_ACEOF
7836if ac_fn_c_try_compile "$LINENO"; then :
7837 gl_cv_warn_c__Wno_missing_field_initializers=yes
7838else
7839 gl_cv_warn_c__Wno_missing_field_initializers=no
7840fi
7841rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7842 CFLAGS="$gl_save_compiler_FLAGS"
7843
7844fi
7845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_missing_field_initializers" >&5
7846$as_echo "$gl_cv_warn_c__Wno_missing_field_initializers" >&6; }
7847if test "x$gl_cv_warn_c__Wno_missing_field_initializers" = x""yes; then :
7848 as_fn_append WARN_CFLAGS " -Wno-missing-field-initializers"
7849fi
0eb775a3 7850
a6b92a4a
GM
7851 # We need this one
7852 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-sign-compare" >&5
7853$as_echo_n "checking whether C compiler handles -Wno-sign-compare... " >&6; }
7854if test "${gl_cv_warn_c__Wno_sign_compare+set}" = set; then :
7855 $as_echo_n "(cached) " >&6
7856else
7857
7858 gl_save_compiler_FLAGS="$CFLAGS"
0eb775a3 7859 as_fn_append CFLAGS " -Wno-sign-compare"
a6b92a4a
GM
7860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7861/* end confdefs.h. */
7862
7863int
7864main ()
7865{
7866
7867 ;
7868 return 0;
7869}
7870_ACEOF
7871if ac_fn_c_try_compile "$LINENO"; then :
7872 gl_cv_warn_c__Wno_sign_compare=yes
7873else
7874 gl_cv_warn_c__Wno_sign_compare=no
7875fi
7876rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7877 CFLAGS="$gl_save_compiler_FLAGS"
7878
7879fi
7880{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_sign_compare" >&5
7881$as_echo "$gl_cv_warn_c__Wno_sign_compare" >&6; }
7882if test "x$gl_cv_warn_c__Wno_sign_compare" = x""yes; then :
7883 as_fn_append WARN_CFLAGS " -Wno-sign-compare"
7884fi
0eb775a3 7885
a6b92a4a
GM
7886 # Too many warnings for now
7887 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-type-limits" >&5
7888$as_echo_n "checking whether C compiler handles -Wno-type-limits... " >&6; }
7889if test "${gl_cv_warn_c__Wno_type_limits+set}" = set; then :
7890 $as_echo_n "(cached) " >&6
7891else
7892
7893 gl_save_compiler_FLAGS="$CFLAGS"
0eb775a3 7894 as_fn_append CFLAGS " -Wno-type-limits"
a6b92a4a
GM
7895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7896/* end confdefs.h. */
7897
7898int
7899main ()
7900{
7901
7902 ;
7903 return 0;
7904}
7905_ACEOF
7906if ac_fn_c_try_compile "$LINENO"; then :
7907 gl_cv_warn_c__Wno_type_limits=yes
7908else
7909 gl_cv_warn_c__Wno_type_limits=no
7910fi
7911rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7912 CFLAGS="$gl_save_compiler_FLAGS"
7913
7914fi
7915{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_type_limits" >&5
7916$as_echo "$gl_cv_warn_c__Wno_type_limits" >&6; }
7917if test "x$gl_cv_warn_c__Wno_type_limits" = x""yes; then :
7918 as_fn_append WARN_CFLAGS " -Wno-type-limits"
7919fi
0eb775a3 7920
a6b92a4a
GM
7921 # Too many warnings for now
7922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-switch" >&5
7923$as_echo_n "checking whether C compiler handles -Wno-switch... " >&6; }
7924if test "${gl_cv_warn_c__Wno_switch+set}" = set; then :
7925 $as_echo_n "(cached) " >&6
7926else
7927
7928 gl_save_compiler_FLAGS="$CFLAGS"
0eb775a3 7929 as_fn_append CFLAGS " -Wno-switch"
a6b92a4a
GM
7930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7931/* end confdefs.h. */
7932
7933int
7934main ()
7935{
7936
7937 ;
7938 return 0;
7939}
7940_ACEOF
7941if ac_fn_c_try_compile "$LINENO"; then :
7942 gl_cv_warn_c__Wno_switch=yes
7943else
7944 gl_cv_warn_c__Wno_switch=no
7945fi
7946rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7947 CFLAGS="$gl_save_compiler_FLAGS"
7948
7949fi
7950{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_switch" >&5
7951$as_echo "$gl_cv_warn_c__Wno_switch" >&6; }
7952if test "x$gl_cv_warn_c__Wno_switch" = x""yes; then :
7953 as_fn_append WARN_CFLAGS " -Wno-switch"
7954fi
0eb775a3 7955
a6b92a4a
GM
7956 # Too many warnings for now
7957 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-parameter" >&5
7958$as_echo_n "checking whether C compiler handles -Wno-unused-parameter... " >&6; }
7959if test "${gl_cv_warn_c__Wno_unused_parameter+set}" = set; then :
7960 $as_echo_n "(cached) " >&6
7961else
7962
7963 gl_save_compiler_FLAGS="$CFLAGS"
0eb775a3 7964 as_fn_append CFLAGS " -Wno-unused-parameter"
a6b92a4a
GM
7965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7966/* end confdefs.h. */
7967
7968int
7969main ()
7970{
7971
7972 ;
7973 return 0;
7974}
7975_ACEOF
7976if ac_fn_c_try_compile "$LINENO"; then :
7977 gl_cv_warn_c__Wno_unused_parameter=yes
7978else
7979 gl_cv_warn_c__Wno_unused_parameter=no
7980fi
7981rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7982 CFLAGS="$gl_save_compiler_FLAGS"
7983
7984fi
7985{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_parameter" >&5
7986$as_echo "$gl_cv_warn_c__Wno_unused_parameter" >&6; }
7987if test "x$gl_cv_warn_c__Wno_unused_parameter" = x""yes; then :
7988 as_fn_append WARN_CFLAGS " -Wno-unused-parameter"
7989fi
0eb775a3 7990
a6b92a4a
GM
7991 # Too many warnings for now
7992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-format-nonliteral" >&5
7993$as_echo_n "checking whether C compiler handles -Wno-format-nonliteral... " >&6; }
7994if test "${gl_cv_warn_c__Wno_format_nonliteral+set}" = set; then :
7995 $as_echo_n "(cached) " >&6
7996else
7997
7998 gl_save_compiler_FLAGS="$CFLAGS"
0eb775a3 7999 as_fn_append CFLAGS " -Wno-format-nonliteral"
a6b92a4a
GM
8000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8001/* end confdefs.h. */
8002
8003int
8004main ()
8005{
8006
8007 ;
8008 return 0;
8009}
8010_ACEOF
8011if ac_fn_c_try_compile "$LINENO"; then :
8012 gl_cv_warn_c__Wno_format_nonliteral=yes
8013else
8014 gl_cv_warn_c__Wno_format_nonliteral=no
8015fi
8016rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8017 CFLAGS="$gl_save_compiler_FLAGS"
8018
8019fi
8020{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_format_nonliteral" >&5
8021$as_echo "$gl_cv_warn_c__Wno_format_nonliteral" >&6; }
8022if test "x$gl_cv_warn_c__Wno_format_nonliteral" = x""yes; then :
8023 as_fn_append WARN_CFLAGS " -Wno-format-nonliteral"
8024fi
8025
8026
0eb775a3 8027
a6b92a4a
GM
8028 # In spite of excluding -Wlogical-op above, it is enabled, as of
8029 # gcc 4.5.0 20090517.
8030 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-logical-op" >&5
8031$as_echo_n "checking whether C compiler handles -Wno-logical-op... " >&6; }
8032if test "${gl_cv_warn_c__Wno_logical_op+set}" = set; then :
8033 $as_echo_n "(cached) " >&6
8034else
8035
8036 gl_save_compiler_FLAGS="$CFLAGS"
0eb775a3 8037 as_fn_append CFLAGS " -Wno-logical-op"
a6b92a4a
GM
8038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8039/* end confdefs.h. */
8040
8041int
8042main ()
8043{
8044
8045 ;
8046 return 0;
8047}
8048_ACEOF
8049if ac_fn_c_try_compile "$LINENO"; then :
8050 gl_cv_warn_c__Wno_logical_op=yes
8051else
8052 gl_cv_warn_c__Wno_logical_op=no
8053fi
8054rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8055 CFLAGS="$gl_save_compiler_FLAGS"
8056
8057fi
8058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_logical_op" >&5
8059$as_echo "$gl_cv_warn_c__Wno_logical_op" >&6; }
8060if test "x$gl_cv_warn_c__Wno_logical_op" = x""yes; then :
8061 as_fn_append WARN_CFLAGS " -Wno-logical-op"
8062fi
8063
8064
0eb775a3 8065
a6b92a4a
GM
8066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fdiagnostics-show-option" >&5
8067$as_echo_n "checking whether C compiler handles -fdiagnostics-show-option... " >&6; }
8068if test "${gl_cv_warn_c__fdiagnostics_show_option+set}" = set; then :
8069 $as_echo_n "(cached) " >&6
8070else
8071
8072 gl_save_compiler_FLAGS="$CFLAGS"
0eb775a3 8073 as_fn_append CFLAGS " -fdiagnostics-show-option"
a6b92a4a 8074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
8075/* end confdefs.h. */
8076
8077int
8078main ()
8079{
8080
8081 ;
8082 return 0;
8083}
8084_ACEOF
8085if ac_fn_c_try_compile "$LINENO"; then :
a6b92a4a 8086 gl_cv_warn_c__fdiagnostics_show_option=yes
067d23c9 8087else
a6b92a4a 8088 gl_cv_warn_c__fdiagnostics_show_option=no
067d23c9
KY
8089fi
8090rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a6b92a4a
GM
8091 CFLAGS="$gl_save_compiler_FLAGS"
8092
8093fi
8094{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fdiagnostics_show_option" >&5
8095$as_echo "$gl_cv_warn_c__fdiagnostics_show_option" >&6; }
8096if test "x$gl_cv_warn_c__fdiagnostics_show_option" = x""yes; then :
8097 as_fn_append WARN_CFLAGS " -fdiagnostics-show-option"
067d23c9 8098fi
067d23c9 8099
0eb775a3 8100
a6b92a4a
GM
8101 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -funit-at-a-time" >&5
8102$as_echo_n "checking whether C compiler handles -funit-at-a-time... " >&6; }
8103if test "${gl_cv_warn_c__funit_at_a_time+set}" = set; then :
8104 $as_echo_n "(cached) " >&6
8105else
8106
8107 gl_save_compiler_FLAGS="$CFLAGS"
0eb775a3 8108 as_fn_append CFLAGS " -funit-at-a-time"
a6b92a4a
GM
8109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8110/* end confdefs.h. */
8111
8112int
8113main ()
8114{
8115
8116 ;
8117 return 0;
8118}
8119_ACEOF
8120if ac_fn_c_try_compile "$LINENO"; then :
8121 gl_cv_warn_c__funit_at_a_time=yes
8122else
8123 gl_cv_warn_c__funit_at_a_time=no
8124fi
8125rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8126 CFLAGS="$gl_save_compiler_FLAGS"
8127
8128fi
8129{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__funit_at_a_time" >&5
8130$as_echo "$gl_cv_warn_c__funit_at_a_time" >&6; }
8131if test "x$gl_cv_warn_c__funit_at_a_time" = x""yes; then :
8132 as_fn_append WARN_CFLAGS " -funit-at-a-time"
8133fi
8134
8135
8136
0eb775a3 8137
a6b92a4a
GM
8138$as_echo "#define lint 1" >>confdefs.h
8139
8140
a6b92a4a
GM
8141
8142$as_echo "#define GNULIB_PORTCHECK 1" >>confdefs.h
8143
8144
8145 # We use a slightly smaller set of warning options for lib/.
8146 # Remove the following and save the result in GNULIB_WARN_CFLAGS.
8147 nw=
8148 nw="$nw -Wunused-macros"
8149
8150
8151 gl_warn_set=
8152 set x $WARN_CFLAGS; shift
8153 for gl_warn_item
8154 do
8155 case " $nw " in
8156 *" $gl_warn_item "*)
8157 ;;
8158 *)
8159 gl_warn_set="$gl_warn_set $gl_warn_item"
8160 ;;
8161 esac
8162 done
8163 GNULIB_WARN_CFLAGS=$gl_warn_set
8164
8165
8166fi
067d23c9
KY
8167
8168
8169
4c5f4270
GM
8170
8171
8172
8173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works for files in the same directory" >&5
8174$as_echo_n "checking whether ln -s works for files in the same directory... " >&6; }
8175rm -f conf$$ conf$$.file
8176
8177LN_S_FILEONLY='cp -p'
8178
8179if (echo >conf$$.file) 2>/dev/null; then
8180 if ln -s conf$$.file conf$$ 2>/dev/null; then
8181 LN_S_FILEONLY='ln -s'
8182 elif ln conf$$.file conf$$ 2>/dev/null; then
8183 LN_S_FILEONLY=ln
8184 fi
8185fi
8186
8187rm -f conf$$ conf$$.file
8188
8189if test "$LN_S_FILEONLY" = "ln -s"; then
8190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
0e733db9
GM
8191$as_echo "yes" >&6; }
8192else
4c5f4270
GM
8193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S_FILEONLY" >&5
8194$as_echo "no, using $LN_S_FILEONLY" >&6; }
0e733db9
GM
8195fi
8196
067d23c9 8197
4c5f4270
GM
8198
8199
067d23c9
KY
8200# Extract the first word of "install-info", so it can be a program name with args.
8201set dummy install-info; ac_word=$2
8202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8203$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 8204if test "${ac_cv_path_INSTALL_INFO+set}" = set; then :
067d23c9
KY
8205 $as_echo_n "(cached) " >&6
8206else
8207 case $INSTALL_INFO in
8208 [\\/]* | ?:[\\/]*)
8209 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
8210 ;;
8211 *)
8212 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
e700232f 8213for as_dir in $PATH$PATH_SEPARATOR/usr/sbin$PATH_SEPARATOR/sbin
067d23c9
KY
8214do
8215 IFS=$as_save_IFS
8216 test -z "$as_dir" && as_dir=.
8217 for ac_exec_ext in '' $ac_executable_extensions; do
8218 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8219 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
8220 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8221 break 2
8222 fi
8223done
8224 done
8225IFS=$as_save_IFS
8226
8227 test -z "$ac_cv_path_INSTALL_INFO" && ac_cv_path_INSTALL_INFO=":"
8228 ;;
8229esac
8230fi
8231INSTALL_INFO=$ac_cv_path_INSTALL_INFO
8232if test -n "$INSTALL_INFO"; then
8233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_INFO" >&5
8234$as_echo "$INSTALL_INFO" >&6; }
8235else
8236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8237$as_echo "no" >&6; }
8238fi
8239
8240
8241# Extract the first word of "gzip", so it can be a program name with args.
8242set dummy gzip; ac_word=$2
8243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8244$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 8245if test "${ac_cv_path_GZIP_PROG+set}" = set; then :
067d23c9
KY
8246 $as_echo_n "(cached) " >&6
8247else
8248 case $GZIP_PROG in
8249 [\\/]* | ?:[\\/]*)
8250 ac_cv_path_GZIP_PROG="$GZIP_PROG" # Let the user override the test with a path.
8251 ;;
8252 *)
8253 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8254for as_dir in $PATH
8255do
8256 IFS=$as_save_IFS
8257 test -z "$as_dir" && as_dir=.
8258 for ac_exec_ext in '' $ac_executable_extensions; do
8259 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8260 ac_cv_path_GZIP_PROG="$as_dir/$ac_word$ac_exec_ext"
8261 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8262 break 2
8263 fi
8264done
8265 done
8266IFS=$as_save_IFS
8267
8268 ;;
8269esac
8270fi
8271GZIP_PROG=$ac_cv_path_GZIP_PROG
8272if test -n "$GZIP_PROG"; then
8273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP_PROG" >&5
8274$as_echo "$GZIP_PROG" >&6; }
8275else
8276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8277$as_echo "no" >&6; }
8278fi
8279
8280
7ee3791f
GM
8281
8282if test $opsys = gnu-linux; then
8283 # Extract the first word of "paxctl", so it can be a program name with args.
9c29597b
GM
8284set dummy paxctl; ac_word=$2
8285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8286$as_echo_n "checking for $ac_word... " >&6; }
8287if test "${ac_cv_path_PAXCTL+set}" = set; then :
8288 $as_echo_n "(cached) " >&6
8289else
8290 case $PAXCTL in
8291 [\\/]* | ?:[\\/]*)
8292 ac_cv_path_PAXCTL="$PAXCTL" # Let the user override the test with a path.
8293 ;;
8294 *)
8295 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8296for as_dir in $PATH$PATH_SEPARATOR/sbin$PATH_SEPARATOR/usr/sbin
8297do
8298 IFS=$as_save_IFS
8299 test -z "$as_dir" && as_dir=.
8300 for ac_exec_ext in '' $ac_executable_extensions; do
8301 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8302 ac_cv_path_PAXCTL="$as_dir/$ac_word$ac_exec_ext"
8303 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8304 break 2
8305 fi
8306done
8307 done
8308IFS=$as_save_IFS
8309
8310 ;;
8311esac
8312fi
8313PAXCTL=$ac_cv_path_PAXCTL
8314if test -n "$PAXCTL"; then
8315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PAXCTL" >&5
8316$as_echo "$PAXCTL" >&6; }
8317else
8318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8319$as_echo "no" >&6; }
8320fi
8321
8322
685e57ea
GM
8323 if test "X$PAXCTL" != X; then
8324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether binaries have a PT_PAX_FLAGS header" >&5
8325$as_echo_n "checking whether binaries have a PT_PAX_FLAGS header... " >&6; }
8326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8327/* end confdefs.h. */
8328
8329int
8330main ()
8331{
8332
8333 ;
8334 return 0;
8335}
8336_ACEOF
8337if ac_fn_c_try_link "$LINENO"; then :
8338 if $PAXCTL -v conftest$EXEEXT >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8339$as_echo "yes" >&6; }
8340 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8341$as_echo "no" >&6; }; PAXCTL=""; fi
8342fi
8343rm -f core conftest.err conftest.$ac_objext \
8344 conftest$ac_exeext conftest.$ac_ext
8345 fi
7ee3791f 8346fi
067d23c9 8347
9e40dda4 8348## Need makeinfo >= 4.7 (?) to build the manuals.
067d23c9
KY
8349# Extract the first word of "makeinfo", so it can be a program name with args.
8350set dummy makeinfo; ac_word=$2
8351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8352$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 8353if test "${ac_cv_path_MAKEINFO+set}" = set; then :
067d23c9
KY
8354 $as_echo_n "(cached) " >&6
8355else
8356 case $MAKEINFO in
8357 [\\/]* | ?:[\\/]*)
8358 ac_cv_path_MAKEINFO="$MAKEINFO" # Let the user override the test with a path.
8359 ;;
8360 *)
8361 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8362for as_dir in $PATH
8363do
8364 IFS=$as_save_IFS
8365 test -z "$as_dir" && as_dir=.
8366 for ac_exec_ext in '' $ac_executable_extensions; do
8367 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8368 ac_cv_path_MAKEINFO="$as_dir/$ac_word$ac_exec_ext"
8369 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8370 break 2
8371 fi
8372done
8373 done
8374IFS=$as_save_IFS
8375
8376 test -z "$ac_cv_path_MAKEINFO" && ac_cv_path_MAKEINFO="no"
8377 ;;
8378esac
8379fi
8380MAKEINFO=$ac_cv_path_MAKEINFO
8381if test -n "$MAKEINFO"; then
8382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKEINFO" >&5
8383$as_echo "$MAKEINFO" >&6; }
8384else
8385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8386$as_echo "no" >&6; }
8387fi
8388
8389
b5591ebb
GM
8390if test "$MAKEINFO" != "no"; then
8391 case `
8392 $MAKEINFO --version 2> /dev/null |
8393 $EGREP 'texinfo[^0-9]*([1-4][0-9]+|[5-9]|4\.[7-9]|4\.[1-6][0-9]+)'
8394 ` in
8395 '') MAKEINFO=no;;
8396 esac
067d23c9
KY
8397fi
8398
8399## Makeinfo is unusual. For a released Emacs, the manuals are
8400## pre-built, and not deleted by the normal clean rules. makeinfo is
8401## therefore in the category of "special tools" not normally required, which
8402## configure does not have to check for (eg autoconf itself).
8403## In a Bazaar checkout on the other hand, the manuals are not included.
8404## So makeinfo is a requirement to build from Bazaar, and configure
8405## should test for it as it does for any other build requirement.
8406## We use the presence of $srcdir/info/emacs to distinguish a release,
8407## with pre-built manuals, from a Bazaar checkout.
96f129d5
GM
8408HAVE_MAKEINFO=yes
8409
067d23c9 8410if test "$MAKEINFO" = "no"; then
96f129d5 8411 MAKEINFO=makeinfo
067d23c9 8412 if test "x${with_makeinfo}" = "xno"; then
96f129d5 8413 HAVE_MAKEINFO=no
b5591ebb 8414 elif test ! -e "$srcdir/info/emacs" && test ! -e "$srcdir/info/emacs.info"; then
9e40dda4 8415 as_fn_error "You do not seem to have makeinfo >= 4.7, and your
067d23c9
KY
8416source tree does not seem to have pre-built manuals in the \`info' directory.
8417Either install a suitable version of makeinfo, or re-run configure
8418with the \`--without-makeinfo' option to build without the manuals. " "$LINENO" 5
8419 fi
8420fi
8421
8422
141d074d
GM
8423INFO_EXT=.info
8424INFO_OPTS=--no-split
8425
8426
8427
96f129d5 8428
067d23c9
KY
8429if test x$GCC = xyes; then
8430 test "x$GCC_LINK_TEST_OPTIONS" != x && \
8431 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
8432else
8433 test "x$NON_GCC_LINK_TEST_OPTIONS" != x && \
8434 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
8435fi
8436
8437
8438late_LDFLAGS=$LDFLAGS
8439if test x$GCC = xyes; then
8440 LDFLAGS="$LDFLAGS -Wl,-znocombreloc"
8441else
8442 LDFLAGS="$LDFLAGS -znocombreloc"
8443fi
8444
8445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -znocombreloc" >&5
8446$as_echo_n "checking for -znocombreloc... " >&6; }
8447cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8448/* end confdefs.h. */
8449
8450int
8451main ()
8452{
8453
8454 ;
8455 return 0;
8456}
8457_ACEOF
8458if ac_fn_c_try_link "$LINENO"; then :
8459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8460$as_echo "yes" >&6; }
8461else
8462 LDFLAGS=$late_LDFLAGS
8463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8464$as_echo "no" >&6; }
8465fi
8466rm -f core conftest.err conftest.$ac_objext \
8467 conftest$ac_exeext conftest.$ac_ext
8468
8469
125c3718 8470test "x$CANNOT_DUMP" = "x" && CANNOT_DUMP=no
067d23c9 8471case "$opsys" in
125c3718
PE
8472 your-opsys-here) CANNOT_DUMP=yes ;;
8473esac
8474
8475test "$CANNOT_DUMP" = "yes" && \
067d23c9
KY
8476
8477$as_echo "#define CANNOT_DUMP 1" >>confdefs.h
8478
125c3718 8479
067d23c9
KY
8480
8481
8482
8483UNEXEC_OBJ=unexelf.o
8484case "$opsys" in
8485 # MSDOS uses unexcoff.o
8486 # MSWindows uses unexw32.o
8487 aix4-2)
8488 UNEXEC_OBJ=unexaix.o
8489 ;;
8490 cygwin)
8491 UNEXEC_OBJ=unexcw.o
8492 ;;
8493 darwin)
8494 UNEXEC_OBJ=unexmacosx.o
8495 ;;
8496 hpux10-20 | hpux11)
8497 UNEXEC_OBJ=unexhp9k800.o
8498 ;;
8499 sol2-10)
8500 # Use the Solaris dldump() function, called from unexsol.c, to dump
8501 # emacs, instead of the generic ELF dump code found in unexelf.c.
8502 # The resulting binary has a complete symbol table, and is better
8503 # for debugging and other observability tools (debuggers, pstack, etc).
8504 #
8505 # If you encounter a problem using dldump(), please consider sending
8506 # a message to the OpenSolaris tools-linking mailing list:
8507 # http://mail.opensolaris.org/mailman/listinfo/tools-linking
8508 #
8509 # It is likely that dldump() works with older Solaris too, but this has
8510 # not been tested, so for now this change is for Solaris 10 or newer.
8511 UNEXEC_OBJ=unexsol.o
8512 ;;
8513esac
8514
8515LD_SWITCH_SYSTEM=
8516case "$opsys" in
87e1a811 8517 freebsd|dragonfly)
067d23c9
KY
8518 ## Let `ld' find image libs and similar things in /usr/local/lib.
8519 ## The system compiler, GCC, has apparently been modified to not
8520 ## look there, contrary to what a stock GCC would do.
a7479549
GM
8521### It's not our place to do this. See bug#10313#17.
8522### LD_SWITCH_SYSTEM=-L/usr/local/lib
8523 :
067d23c9
KY
8524 ;;
8525
8526 gnu-linux)
8527 ## cpp test was "ifdef __mips__", but presumably this is equivalent...
d6a003a8 8528 case $host_cpu in mips*) LD_SWITCH_SYSTEM="-G 0";; esac
067d23c9
KY
8529 ;;
8530
8531 netbsd)
a7479549
GM
8532### It's not our place to do this. See bug#10313#17.
8533### LD_SWITCH_SYSTEM="-Wl,-rpath,/usr/pkg/lib -L/usr/pkg/lib -Wl,-rpath,/usr/local/lib -L/usr/local/lib"
8534 :
067d23c9
KY
8535 ;;
8536
8537 openbsd)
8538 ## Han Boetes <han@mijncomputer.nl> says this is necessary,
8539 ## otherwise Emacs dumps core on elf systems.
8540 LD_SWITCH_SYSTEM="-Z"
8541 ;;
8542esac
8543
8544
8545ac_link="$ac_link $LD_SWITCH_SYSTEM"
8546
ae629dae 8547## This setting of LD_SWITCH_SYSTEM references LD_SWITCH_X_SITE_RPATH,
067d23c9
KY
8548## which has not been defined yet. When this was handled with cpp,
8549## it was expanded to null when configure sourced the s/*.h file.
8550## Thus LD_SWITCH_SYSTEM had different values in configure and the Makefiles.
8551## FIXME it would be cleaner to put this in LD_SWITCH_SYSTEM_TEMACS
8552## (or somesuch), but because it is supposed to go at the _front_
8553## of LD_SWITCH_SYSTEM, we cannot do that in exactly the same way.
8554## Compare with the gnu-linux case below, which added to the end
8555## of LD_SWITCH_SYSTEM, and so can instead go at the front of
8556## LD_SWITCH_SYSTEM_TEMACS.
8557case "$opsys" in
8558 netbsd|openbsd)
ae629dae 8559 LD_SWITCH_SYSTEM="\$(LD_SWITCH_X_SITE_RPATH) $LD_SWITCH_SYSTEM" ;;
067d23c9
KY
8560esac
8561
8562
8563C_SWITCH_MACHINE=
42bbbe8b
GM
8564case $canonical in
8565 alpha*)
067d23c9 8566 ac_fn_c_check_decl "$LINENO" "__ELF__" "ac_cv_have_decl___ELF__" "$ac_includes_default"
a9bec17c 8567if test "x$ac_cv_have_decl___ELF__" = x""yes; then :
067d23c9
KY
8568
8569fi
8570
8571 if test "$ac_cv_have_decl___ELF__" = "yes"; then
8572 ## With ELF, make sure that all common symbols get allocated to in the
8573 ## data section. Otherwise, the dump of temacs may miss variables in
8574 ## the shared library that have been initialized. For example, with
8575 ## GNU libc, __malloc_initialized would normally be resolved to the
8576 ## shared library's .bss section, which is fatal.
8577 if test "x$GCC" = "xyes"; then
8578 C_SWITCH_MACHINE="-fno-common"
8579 else
a9bec17c 8580 as_fn_error "What gives? Fix me if DEC Unix supports ELF now." "$LINENO" 5
067d23c9
KY
8581 fi
8582 else
8583 UNEXEC_OBJ=unexalpha.o
8584 fi
42bbbe8b
GM
8585 ;;
8586esac
067d23c9
KY
8587
8588
8589
8590
8591C_SWITCH_SYSTEM=
8592## Some programs in src produce warnings saying certain subprograms
8593## are too complex and need a MAXMEM value greater than 2000 for
8594## additional optimization. --nils@exp-math.uni-essen.de
8595test "$opsys" = "aix4.2" && test "x$GCC" != "xyes" && \
8596 C_SWITCH_SYSTEM="-ma -qmaxmem=4000"
8597## gnu-linux might need -D_BSD_SOURCE on old libc5 systems.
8598## It is redundant in glibc2, since we define _GNU_SOURCE.
8599
8600
8601
8602LIBS_SYSTEM=
8603case "$opsys" in
8604 ## IBM's X11R5 uses -lIM and -liconv in AIX 3.2.2.
8605 aix4-2) LIBS_SYSTEM="-lrts -lIM -liconv" ;;
8606
87e1a811 8607 freebsd|dragonfly) LIBS_SYSTEM="-lutil" ;;
067d23c9
KY
8608
8609 hpux*) LIBS_SYSTEM="-l:libdld.sl" ;;
8610
1f5d53eb 8611 sol2*) LIBS_SYSTEM="-lsocket -lnsl" ;;
067d23c9
KY
8612
8613 ## Motif needs -lgen.
8614 unixware) LIBS_SYSTEM="-lsocket -lnsl -lelf -lgen" ;;
8615esac
8616
8617
8618
8619### Make sure subsequent tests use flags consistent with the build flags.
8620
8621if test x"${OVERRIDE_CPPFLAGS}" != x; then
8622 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
8623else
8624 CPPFLAGS="$C_SWITCH_SYSTEM $C_SWITCH_MACHINE $CPPFLAGS"
8625fi
8626
4fda9c95
GM
8627# Suppress obsolescent Autoconf test for size_t; Emacs assumes C89 or better.
8628
3e0be4ab
GM
8629# Likewise for obsolescent test for uid_t, gid_t; Emacs assumes them.
8630
4fda9c95 8631
067d23c9 8632
067d23c9 8633LIB_MATH=-lm
4717915f 8634SYSTEM_TYPE=`echo $opsys | sed -e 's/[0-9].*//' -e 's|-|/|'`
067d23c9
KY
8635
8636case $opsys in
8637 cygwin )
8638 LIB_MATH=
067d23c9
KY
8639 ;;
8640 darwin )
8641 ## Adding -lm confuses the dynamic linker, so omit it.
8642 LIB_MATH=
067d23c9 8643 ;;
87e1a811 8644 freebsd | dragonfly )
15f79fcd 8645 SYSTEM_TYPE=berkeley-unix
067d23c9
KY
8646 ;;
8647 gnu-linux | gnu-kfreebsd )
067d23c9
KY
8648 ;;
8649 hpux10-20 | hpux11 )
067d23c9 8650 ;;
bb72ce91 8651 netbsd | openbsd )
15f79fcd 8652 SYSTEM_TYPE=berkeley-unix
067d23c9 8653 ;;
15f79fcd
GM
8654
8655 sol2* | unixware )
8656 SYSTEM_TYPE=usg-unix-v
8657 ;;
8658
067d23c9
KY
8659esac
8660
8661
8662
15f79fcd
GM
8663cat >>confdefs.h <<_ACEOF
8664#define SYSTEM_TYPE "$SYSTEM_TYPE"
8665_ACEOF
8666
8667
130f1dac 8668
5476a9a4
GM
8669pre_PKG_CONFIG_CFLAGS=$CFLAGS
8670pre_PKG_CONFIG_LIBS=$LIBS
067d23c9 8671
5476a9a4
GM
8672# Extract the first word of "pkg-config", so it can be a program name with args.
8673set dummy pkg-config; ac_word=$2
8674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8675$as_echo_n "checking for $ac_word... " >&6; }
8676if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
8677 $as_echo_n "(cached) " >&6
8678else
8679 case $PKG_CONFIG in
8680 [\\/]* | ?:[\\/]*)
8681 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8682 ;;
8683 *)
8684 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8685for as_dir in $PATH
8686do
8687 IFS=$as_save_IFS
8688 test -z "$as_dir" && as_dir=.
8689 for ac_exec_ext in '' $ac_executable_extensions; do
8690 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8691 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8692 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8693 break 2
8694 fi
8695done
8696 done
8697IFS=$as_save_IFS
8698
8699 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
8700 ;;
8701esac
8702fi
8703PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8704if test -n "$PKG_CONFIG"; then
8705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8706$as_echo "$PKG_CONFIG" >&6; }
8707else
8708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8709$as_echo "no" >&6; }
8710fi
f199cab1
GM
8711
8712
f199cab1 8713
5476a9a4
GM
8714
8715
8716
8717if test "${with_sound}" != "no"; then
8718 # Sound support for GNU/Linux and the free BSDs.
8719 for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h
8720do :
8721 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8722ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8723eval as_val=\$$as_ac_Header
8724 if test "x$as_val" = x""yes; then :
8725 cat >>confdefs.h <<_ACEOF
8726#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8727_ACEOF
8728 have_sound_header=yes
8729fi
8730
8731done
8732
8733 # Emulation library used on NetBSD.
8734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _oss_ioctl in -lossaudio" >&5
8735$as_echo_n "checking for _oss_ioctl in -lossaudio... " >&6; }
8736if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then :
067d23c9
KY
8737 $as_echo_n "(cached) " >&6
8738else
5476a9a4
GM
8739 ac_check_lib_save_LIBS=$LIBS
8740LIBS="-lossaudio $LIBS"
8741cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 8742/* end confdefs.h. */
5476a9a4
GM
8743
8744/* Override any GCC internal prototype to avoid an error.
8745 Use char because int might match the return type of a GCC
8746 builtin and then its argument prototype would still apply. */
8747#ifdef __cplusplus
8748extern "C"
8749#endif
8750char _oss_ioctl ();
067d23c9
KY
8751int
8752main ()
8753{
5476a9a4 8754return _oss_ioctl ();
067d23c9
KY
8755 ;
8756 return 0;
8757}
8758_ACEOF
8759if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 8760 ac_cv_lib_ossaudio__oss_ioctl=yes
067d23c9 8761else
5476a9a4 8762 ac_cv_lib_ossaudio__oss_ioctl=no
067d23c9
KY
8763fi
8764rm -f core conftest.err conftest.$ac_objext \
8765 conftest$ac_exeext conftest.$ac_ext
5476a9a4
GM
8766LIBS=$ac_check_lib_save_LIBS
8767fi
8768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5
8769$as_echo "$ac_cv_lib_ossaudio__oss_ioctl" >&6; }
8770if test "x$ac_cv_lib_ossaudio__oss_ioctl" = x""yes; then :
8771 LIBSOUND=-lossaudio
8772else
8773 LIBSOUND=
067d23c9
KY
8774fi
8775
8776
8777
5476a9a4
GM
8778 ALSA_REQUIRED=1.0.0
8779 ALSA_MODULES="alsa >= $ALSA_REQUIRED"
8780
8781 succeeded=no
8782
8783 if test "$PKG_CONFIG" = "no" ; then
8784 HAVE_ALSA=no
8785 else
8786 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 8787 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
8788 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ALSA_MODULES" >&5
8789$as_echo_n "checking for $ALSA_MODULES... " >&6; }
8790
b5591ebb
GM
8791 if "$PKG_CONFIG" --exists "$ALSA_MODULES" 2>&5 &&
8792 ALSA_CFLAGS=`"$PKG_CONFIG" --cflags "$ALSA_MODULES" 2>&5` &&
8793 ALSA_LIBS=`"$PKG_CONFIG" --libs "$ALSA_MODULES" 2>&5`; then
5476a9a4
GM
8794 edit_cflags="
8795 s,///*,/,g
8796 s/^/ /
8797 s/ -I/ $isystem/g
8798 s/^ //
8799 "
8800 ALSA_CFLAGS=`$as_echo "$ALSA_CFLAGS" | sed -e "$edit_cflags"`
8801 ALSA_LIBS=`$as_echo "$ALSA_LIBS" | sed -e 's,///*,/,g'`
8802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$ALSA_CFLAGS' LIBS='$ALSA_LIBS'" >&5
8803$as_echo "yes CFLAGS='$ALSA_CFLAGS' LIBS='$ALSA_LIBS'" >&6; }
8804 succeeded=yes
8805 else
8806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8807$as_echo "no" >&6; }
8808 ALSA_CFLAGS=""
8809 ALSA_LIBS=""
8810 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
8811 ## do set a variable so people can do so. Do it in a subshell
8812 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 8813 ALSA_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$ALSA_MODULES") 2>&1`
5476a9a4
GM
8814
8815 fi
8816
8817
8818
8819 else
8820 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
8821 echo "*** See http://www.freedesktop.org/software/pkgconfig"
8822 fi
8823 fi
8824
8825 if test $succeeded = yes; then
8826 HAVE_ALSA=yes
8827 else
8828 HAVE_ALSA=no
8829 fi
f199cab1 8830
5476a9a4
GM
8831 if test $HAVE_ALSA = yes; then
8832 SAVE_CFLAGS="$CFLAGS"
8833 SAVE_LIBS="$LIBS"
8834 CFLAGS="$ALSA_CFLAGS $CFLAGS"
8835 LIBS="$ALSA_LIBS $LIBS"
8836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8837/* end confdefs.h. */
8838#include <asoundlib.h>
067d23c9
KY
8839int
8840main ()
8841{
5476a9a4 8842snd_lib_error_set_handler (0);
067d23c9
KY
8843 ;
8844 return 0;
8845}
8846_ACEOF
5476a9a4
GM
8847if ac_fn_c_try_compile "$LINENO"; then :
8848 emacs_alsa_normal=yes
067d23c9 8849else
5476a9a4 8850 emacs_alsa_normal=no
067d23c9 8851fi
5476a9a4
GM
8852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8853 if test "$emacs_alsa_normal" != yes; then
8854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8855/* end confdefs.h. */
8856#include <alsa/asoundlib.h>
8857int
8858main ()
8859{
8860snd_lib_error_set_handler (0);
8861 ;
8862 return 0;
8863}
8864_ACEOF
8865if ac_fn_c_try_compile "$LINENO"; then :
8866 emacs_alsa_subdir=yes
8867else
8868 emacs_alsa_subdir=no
f199cab1 8869fi
5476a9a4
GM
8870rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8871 if test "$emacs_alsa_subdir" != yes; then
8872 as_fn_error "pkg-config found alsa, but it does not compile. See config.log for error messages." "$LINENO" 5
8873 fi
8874 ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE"
8875 fi
067d23c9 8876
5476a9a4
GM
8877 CFLAGS="$SAVE_CFLAGS"
8878 LIBS="$SAVE_LIBS"
8879 LIBSOUND="$LIBSOUND $ALSA_LIBS"
8880 CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS"
067d23c9 8881
5476a9a4 8882$as_echo "#define HAVE_ALSA 1" >>confdefs.h
067d23c9 8883
5476a9a4 8884 fi
067d23c9 8885
5476a9a4
GM
8886 if test x$have_sound_header = xyes || test $HAVE_ALSA = yes; then
8887 case "$opsys" in
8888 gnu-linux|freebsd|netbsd)
067d23c9 8889
5476a9a4 8890$as_echo "#define HAVE_SOUND 1" >>confdefs.h
067d23c9 8891
5476a9a4
GM
8892 ;;
8893 esac
8894 fi
067d23c9
KY
8895
8896
5476a9a4 8897fi
067d23c9 8898
e700232f
GM
8899
8900
8901
5476a9a4
GM
8902 for ac_header in $ac_header_list
8903do :
8904 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8905ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
8906"
8907eval as_val=\$$as_ac_Header
8908 if test "x$as_val" = x""yes; then :
8909 cat >>confdefs.h <<_ACEOF
8910#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
067d23c9
KY
8911_ACEOF
8912
f199cab1 8913fi
e700232f 8914
5476a9a4
GM
8915done
8916
8917
e700232f
GM
8918
8919
8920
f199cab1 8921
067d23c9 8922
067d23c9 8923
067d23c9 8924
067d23c9 8925
f199cab1
GM
8926
8927
8928
067d23c9 8929
067d23c9 8930
f199cab1
GM
8931
8932
8933
5476a9a4
GM
8934
8935
8936
8937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if personality LINUX32 can be set" >&5
8938$as_echo_n "checking if personality LINUX32 can be set... " >&6; }
8939cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8940/* end confdefs.h. */
8941#include <sys/personality.h>
067d23c9
KY
8942int
8943main ()
8944{
5476a9a4 8945personality (PER_LINUX32)
067d23c9
KY
8946 ;
8947 return 0;
8948}
8949_ACEOF
8950if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4 8951 emacs_cv_personality_linux32=yes
067d23c9 8952else
5476a9a4 8953 emacs_cv_personality_linux32=no
067d23c9 8954fi
f199cab1 8955rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5476a9a4
GM
8956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_personality_linux32" >&5
8957$as_echo "$emacs_cv_personality_linux32" >&6; }
f199cab1 8958
5476a9a4 8959if test $emacs_cv_personality_linux32 = yes; then
f199cab1 8960
5476a9a4
GM
8961$as_echo "#define HAVE_PERSONALITY_LINUX32 1" >>confdefs.h
8962
8963fi
8964
8965for ac_header in term.h
8966do :
8967 ac_fn_c_check_header_preproc "$LINENO" "term.h" "ac_cv_header_term_h"
8968if test "x$ac_cv_header_term_h" = x""yes; then :
8969 cat >>confdefs.h <<_ACEOF
8970#define HAVE_TERM_H 1
067d23c9 8971_ACEOF
5476a9a4
GM
8972
8973fi
8974
8975done
8976
8977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
8978$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
8979if test "${ac_cv_header_time+set}" = set; then :
8980 $as_echo_n "(cached) " >&6
8981else
8982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 8983/* end confdefs.h. */
5476a9a4
GM
8984#include <sys/types.h>
8985#include <sys/time.h>
8986#include <time.h>
f199cab1 8987
067d23c9
KY
8988int
8989main ()
8990{
5476a9a4
GM
8991if ((struct tm *) 0)
8992return 0;
067d23c9
KY
8993 ;
8994 return 0;
8995}
8996_ACEOF
8997if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4 8998 ac_cv_header_time=yes
067d23c9 8999else
5476a9a4 9000 ac_cv_header_time=no
067d23c9
KY
9001fi
9002rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9003fi
5476a9a4
GM
9004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
9005$as_echo "$ac_cv_header_time" >&6; }
9006if test $ac_cv_header_time = yes; then
f199cab1 9007
5476a9a4
GM
9008$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
9009
9010fi
9011
dc67e786
GM
9012ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "#include <signal.h>
9013
9014"
5476a9a4
GM
9015if test "x$ac_cv_have_decl_sys_siglist" = x""yes; then :
9016 ac_have_decl=1
9017else
9018 ac_have_decl=0
9019fi
9020
9021cat >>confdefs.h <<_ACEOF
9022#define HAVE_DECL_SYS_SIGLIST $ac_have_decl
067d23c9 9023_ACEOF
5476a9a4
GM
9024
9025if test $ac_cv_have_decl_sys_siglist != yes; then
9026 # For Tru64, at least:
dc67e786
GM
9027 ac_fn_c_check_decl "$LINENO" "__sys_siglist" "ac_cv_have_decl___sys_siglist" "#include <signal.h>
9028
9029"
5476a9a4
GM
9030if test "x$ac_cv_have_decl___sys_siglist" = x""yes; then :
9031 ac_have_decl=1
9032else
9033 ac_have_decl=0
067d23c9 9034fi
5476a9a4
GM
9035
9036cat >>confdefs.h <<_ACEOF
9037#define HAVE_DECL___SYS_SIGLIST $ac_have_decl
9038_ACEOF
9039
9040 if test $ac_cv_have_decl___sys_siglist = yes; then
9041
9042$as_echo "#define sys_siglist __sys_siglist" >>confdefs.h
9043
9044 fi
9045fi
9046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
9047$as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
9048if test "${ac_cv_header_sys_wait_h+set}" = set; then :
9049 $as_echo_n "(cached) " >&6
067d23c9
KY
9050else
9051 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9052/* end confdefs.h. */
5476a9a4
GM
9053#include <sys/types.h>
9054#include <sys/wait.h>
9055#ifndef WEXITSTATUS
9056# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
9057#endif
9058#ifndef WIFEXITED
9059# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
9060#endif
9061
067d23c9
KY
9062int
9063main ()
9064{
5476a9a4
GM
9065 int s;
9066 wait (&s);
9067 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
067d23c9
KY
9068 ;
9069 return 0;
9070}
9071_ACEOF
5476a9a4
GM
9072if ac_fn_c_try_compile "$LINENO"; then :
9073 ac_cv_header_sys_wait_h=yes
067d23c9 9074else
5476a9a4 9075 ac_cv_header_sys_wait_h=no
067d23c9 9076fi
5476a9a4 9077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
067d23c9 9078fi
5476a9a4
GM
9079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
9080$as_echo "$ac_cv_header_sys_wait_h" >&6; }
9081if test $ac_cv_header_sys_wait_h = yes; then
067d23c9 9082
5476a9a4 9083$as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
7417b37c 9084
5476a9a4 9085fi
7417b37c 9086
7417b37c 9087
5476a9a4
GM
9088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for speed_t" >&5
9089$as_echo_n "checking for speed_t... " >&6; }
9090if test "${emacs_cv_speed_t+set}" = set; then :
f199cab1
GM
9091 $as_echo_n "(cached) " >&6
9092else
f199cab1
GM
9093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9094/* end confdefs.h. */
5476a9a4
GM
9095#include <termios.h>
9096int
9097main ()
9098{
9099speed_t x = 1;
9100 ;
9101 return 0;
9102}
7417b37c 9103_ACEOF
f199cab1 9104if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4
GM
9105 emacs_cv_speed_t=yes
9106else
9107 emacs_cv_speed_t=no
7417b37c 9108fi
f199cab1 9109rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7417b37c 9110fi
5476a9a4
GM
9111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_speed_t" >&5
9112$as_echo "$emacs_cv_speed_t" >&6; }
9113if test $emacs_cv_speed_t = yes; then
7417b37c 9114
5476a9a4 9115$as_echo "#define HAVE_SPEED_T 1" >>confdefs.h
067d23c9 9116
5476a9a4 9117fi
067d23c9 9118
067d23c9
KY
9119
9120
e700232f 9121
5476a9a4
GM
9122for ac_header in net/if.h
9123do :
9124 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
9125#if HAVE_SYS_SOCKET_H
9126#include <sys/socket.h>
9127#endif
9128"
9129if test "x$ac_cv_header_net_if_h" = x""yes; then :
9130 cat >>confdefs.h <<_ACEOF
9131#define HAVE_NET_IF_H 1
067d23c9 9132_ACEOF
7cae64b4 9133
067d23c9 9134fi
067d23c9 9135
5476a9a4 9136done
4d4b75e8 9137
5476a9a4
GM
9138for ac_header in ifaddrs.h
9139do :
9140 ac_fn_c_check_header_compile "$LINENO" "ifaddrs.h" "ac_cv_header_ifaddrs_h" "$ac_includes_default
9141#if HAVE_SYS_SOCKET_H
9142#include <sys/socket.h>
9143#endif
9144"
9145if test "x$ac_cv_header_ifaddrs_h" = x""yes; then :
9146 cat >>confdefs.h <<_ACEOF
9147#define HAVE_IFADDRS_H 1
9148_ACEOF
4d4b75e8 9149
5476a9a4 9150fi
4d4b75e8 9151
5476a9a4 9152done
7e723570 9153
5476a9a4 9154for ac_header in net/if_dl.h
7e723570 9155do :
5476a9a4
GM
9156 ac_fn_c_check_header_compile "$LINENO" "net/if_dl.h" "ac_cv_header_net_if_dl_h" "$ac_includes_default
9157#if HAVE_SYS_SOCKET_H
9158#include <sys/socket.h>
9159#endif
7e723570 9160"
5476a9a4 9161if test "x$ac_cv_header_net_if_dl_h" = x""yes; then :
7e723570 9162 cat >>confdefs.h <<_ACEOF
5476a9a4 9163#define HAVE_NET_IF_DL_H 1
7e723570
GM
9164_ACEOF
9165
9166fi
9167
9168done
9169
9170
5476a9a4
GM
9171ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_flags" "ac_cv_member_struct_ifreq_ifr_flags" "$ac_includes_default
9172#if HAVE_SYS_SOCKET_H
9173#include <sys/socket.h>
9174#endif
9175#if HAVE_NET_IF_H
9176#include <net/if.h>
9177#endif
9178"
9179if test "x$ac_cv_member_struct_ifreq_ifr_flags" = x""yes; then :
7e723570 9180
5476a9a4
GM
9181cat >>confdefs.h <<_ACEOF
9182#define HAVE_STRUCT_IFREQ_IFR_FLAGS 1
9183_ACEOF
7e723570
GM
9184
9185
5476a9a4
GM
9186fi
9187ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_hwaddr" "ac_cv_member_struct_ifreq_ifr_hwaddr" "$ac_includes_default
9188#if HAVE_SYS_SOCKET_H
9189#include <sys/socket.h>
f199cab1 9190#endif
5476a9a4
GM
9191#if HAVE_NET_IF_H
9192#include <net/if.h>
f199cab1 9193#endif
5476a9a4
GM
9194"
9195if test "x$ac_cv_member_struct_ifreq_ifr_hwaddr" = x""yes; then :
9196
9197cat >>confdefs.h <<_ACEOF
9198#define HAVE_STRUCT_IFREQ_IFR_HWADDR 1
9199_ACEOF
9200
9201
9202fi
9203ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_netmask" "ac_cv_member_struct_ifreq_ifr_netmask" "$ac_includes_default
9204#if HAVE_SYS_SOCKET_H
9205#include <sys/socket.h>
f199cab1 9206#endif
5476a9a4
GM
9207#if HAVE_NET_IF_H
9208#include <net/if.h>
9209#endif
9210"
9211if test "x$ac_cv_member_struct_ifreq_ifr_netmask" = x""yes; then :
9212
9213cat >>confdefs.h <<_ACEOF
9214#define HAVE_STRUCT_IFREQ_IFR_NETMASK 1
f199cab1 9215_ACEOF
5476a9a4
GM
9216
9217
9218fi
9219ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_broadaddr" "ac_cv_member_struct_ifreq_ifr_broadaddr" "$ac_includes_default
9220#if HAVE_SYS_SOCKET_H
9221#include <sys/socket.h>
9222#endif
9223#if HAVE_NET_IF_H
9224#include <net/if.h>
9225#endif
9226"
9227if test "x$ac_cv_member_struct_ifreq_ifr_broadaddr" = x""yes; then :
9228
9229cat >>confdefs.h <<_ACEOF
9230#define HAVE_STRUCT_IFREQ_IFR_BROADADDR 1
f199cab1 9231_ACEOF
5476a9a4
GM
9232
9233
067d23c9 9234fi
5476a9a4
GM
9235ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_addr" "ac_cv_member_struct_ifreq_ifr_addr" "$ac_includes_default
9236#if HAVE_SYS_SOCKET_H
9237#include <sys/socket.h>
9238#endif
9239#if HAVE_NET_IF_H
9240#include <net/if.h>
9241#endif
9242"
9243if test "x$ac_cv_member_struct_ifreq_ifr_addr" = x""yes; then :
9244
9245cat >>confdefs.h <<_ACEOF
9246#define HAVE_STRUCT_IFREQ_IFR_ADDR 1
9247_ACEOF
9248
067d23c9 9249
f199cab1 9250fi
5476a9a4
GM
9251ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_addr.sa_len" "ac_cv_member_struct_ifreq_ifr_addr_sa_len" "$ac_includes_default
9252#if HAVE_SYS_SOCKET_H
9253#include <sys/socket.h>
9254#endif
9255#if HAVE_NET_IF_H
9256#include <net/if.h>
9257#endif
9258"
9259if test "x$ac_cv_member_struct_ifreq_ifr_addr_sa_len" = x""yes; then :
9260
9261cat >>confdefs.h <<_ACEOF
9262#define HAVE_STRUCT_IFREQ_IFR_ADDR_SA_LEN 1
9263_ACEOF
9264
067d23c9
KY
9265
9266fi
9267
9268
067d23c9 9269
f199cab1 9270
5476a9a4
GM
9271DEPFLAGS=
9272MKDEPDIR=":"
9273deps_frag=deps.mk
9274if test "$GCC" = yes && test "$ac_enable_autodepend" = yes; then
9275 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using GNU Make" >&5
9276$as_echo_n "checking whether we are using GNU Make... " >&6; }
9277 HAVE_GNU_MAKE=no
9278 testval=`${MAKE-make} --version 2>/dev/null | grep 'GNU Make'`
9279 if test "x$testval" != x; then
9280 HAVE_GNU_MAKE=yes
9281 else
9282 ac_enable_autodepend=no
9283 fi
9284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_GNU_MAKE" >&5
9285$as_echo "$HAVE_GNU_MAKE" >&6; }
9286 if test $HAVE_GNU_MAKE = yes; then
9287 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -MMD -MF" >&5
9288$as_echo_n "checking whether gcc understands -MMD -MF... " >&6; }
9289 SAVE_CFLAGS="$CFLAGS"
9290 CFLAGS="$CFLAGS -MMD -MF deps.d -MP"
9291 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9292/* end confdefs.h. */
f199cab1 9293
5476a9a4
GM
9294int
9295main ()
9296{
f199cab1 9297
5476a9a4
GM
9298 ;
9299 return 0;
9300}
9301_ACEOF
9302if ac_fn_c_try_compile "$LINENO"; then :
f199cab1 9303
5476a9a4
GM
9304else
9305 ac_enable_autodepend=no
9306fi
9307rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9308 CFLAGS="$SAVE_CFLAGS"
9309 test -f deps.d || ac_enable_autodepend=no
9310 rm -rf deps.d
9311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_autodepend" >&5
9312$as_echo "$ac_enable_autodepend" >&6; }
9313 fi
9314 if test $ac_enable_autodepend = yes; then
9315 DEPFLAGS='-MMD -MF ${DEPDIR}/$*.d -MP'
9316 ## MKDIR_P is documented (see AC_PROG_MKDIR_P) to be parallel-safe.
9317 MKDEPDIR='${MKDIR_P} ${DEPDIR}'
9318 deps_frag=autodeps.mk
9319 fi
9320fi
9321deps_frag=$srcdir/src/$deps_frag
f199cab1
GM
9322
9323
9324
9325
9326
5476a9a4 9327lisp_frag=$srcdir/src/lisp.mk
f199cab1
GM
9328
9329
9330
5476a9a4
GM
9331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long file names" >&5
9332$as_echo_n "checking for long file names... " >&6; }
9333if test "${ac_cv_sys_long_file_names+set}" = set; then :
9334 $as_echo_n "(cached) " >&6
9335else
9336 ac_cv_sys_long_file_names=yes
9337# Test for long file names in all the places we know might matter:
9338# . the current directory, where building will happen
9339# $prefix/lib where we will be installing things
9340# $exec_prefix/lib likewise
9341# $TMPDIR if set, where it might want to write temporary files
9342# /tmp where it might want to write temporary files
9343# /var/tmp likewise
9344# /usr/tmp likewise
9345for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do
9346 # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib
9347 # in the usual case where exec_prefix is '${prefix}'.
9348 case $ac_dir in #(
9349 . | /* | ?:[\\/]*) ;; #(
9350 *) continue;;
9351 esac
9352 test -w "$ac_dir/." || continue # It is less confusing to not echo anything here.
9353 ac_xdir=$ac_dir/cf$$
9354 (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
9355 ac_tf1=$ac_xdir/conftest9012345
9356 ac_tf2=$ac_xdir/conftest9012346
9357 touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" ||
9358 ac_cv_sys_long_file_names=no
9359 rm -f -r "$ac_xdir" 2>/dev/null
9360 test $ac_cv_sys_long_file_names = no && break
9361done
9362fi
9363{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_long_file_names" >&5
9364$as_echo "$ac_cv_sys_long_file_names" >&6; }
9365if test $ac_cv_sys_long_file_names = yes; then
f199cab1 9366
5476a9a4 9367$as_echo "#define HAVE_LONG_FILE_NAMES 1" >>confdefs.h
f199cab1 9368
5476a9a4 9369fi
f199cab1 9370
f199cab1 9371
5476a9a4 9372#### Choose a window system.
f199cab1 9373
42dcba54
GM
9374## We leave window_system equal to none if
9375## we end up building without one. Any new window system should
9376## set window_system to an appropriate value and add objects to
9377## window-system-specific substs.
9378
9379window_system=none
5476a9a4
GM
9380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
9381$as_echo_n "checking for X... " >&6; }
f199cab1 9382
f199cab1 9383
5476a9a4
GM
9384# Check whether --with-x was given.
9385if test "${with_x+set}" = set; then :
9386 withval=$with_x;
9387fi
f199cab1 9388
5476a9a4
GM
9389# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
9390if test "x$with_x" = xno; then
9391 # The user explicitly disabled X.
9392 have_x=disabled
9393else
9394 case $x_includes,$x_libraries in #(
9395 *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
9396 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
9397 $as_echo_n "(cached) " >&6
9398else
9399 # One or both of the vars are not set, and there is no cached value.
9400ac_x_includes=no ac_x_libraries=no
9401rm -f -r conftest.dir
9402if mkdir conftest.dir; then
9403 cd conftest.dir
9404 cat >Imakefile <<'_ACEOF'
9405incroot:
9406 @echo incroot='${INCROOT}'
9407usrlibdir:
9408 @echo usrlibdir='${USRLIBDIR}'
9409libdir:
9410 @echo libdir='${LIBDIR}'
9411_ACEOF
9412 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
9413 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
9414 for ac_var in incroot usrlibdir libdir; do
9415 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
9416 done
9417 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
9418 for ac_extension in a so sl dylib la dll; do
9419 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
9420 test -f "$ac_im_libdir/libX11.$ac_extension"; then
9421 ac_im_usrlibdir=$ac_im_libdir; break
9422 fi
9423 done
9424 # Screen out bogus values from the imake configuration. They are
9425 # bogus both because they are the default anyway, and because
9426 # using them would break gcc on systems where it needs fixed includes.
9427 case $ac_im_incroot in
9428 /usr/include) ac_x_includes= ;;
9429 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
9430 esac
9431 case $ac_im_usrlibdir in
9432 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
9433 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
9434 esac
9435 fi
9436 cd ..
9437 rm -f -r conftest.dir
067d23c9
KY
9438fi
9439
5476a9a4
GM
9440# Standard set of common directories for X headers.
9441# Check X11 before X11Rn because it is often a symlink to the current release.
9442ac_x_header_dirs='
9443/usr/X11/include
9444/usr/X11R7/include
9445/usr/X11R6/include
9446/usr/X11R5/include
9447/usr/X11R4/include
067d23c9 9448
5476a9a4
GM
9449/usr/include/X11
9450/usr/include/X11R7
9451/usr/include/X11R6
9452/usr/include/X11R5
9453/usr/include/X11R4
067d23c9 9454
5476a9a4
GM
9455/usr/local/X11/include
9456/usr/local/X11R7/include
9457/usr/local/X11R6/include
9458/usr/local/X11R5/include
9459/usr/local/X11R4/include
067d23c9 9460
5476a9a4
GM
9461/usr/local/include/X11
9462/usr/local/include/X11R7
9463/usr/local/include/X11R6
9464/usr/local/include/X11R5
9465/usr/local/include/X11R4
067d23c9 9466
5476a9a4
GM
9467/usr/X386/include
9468/usr/x386/include
9469/usr/XFree86/include/X11
067d23c9 9470
5476a9a4
GM
9471/usr/include
9472/usr/local/include
9473/usr/unsupported/include
9474/usr/athena/include
9475/usr/local/x11r5/include
9476/usr/lpp/Xamples/include
067d23c9 9477
5476a9a4
GM
9478/usr/openwin/include
9479/usr/openwin/share/include'
067d23c9 9480
5476a9a4
GM
9481if test "$ac_x_includes" = no; then
9482 # Guess where to find include files, by looking for Xlib.h.
9483 # First, try using that file with no special directory specified.
9484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9485/* end confdefs.h. */
9486#include <X11/Xlib.h>
067d23c9 9487_ACEOF
5476a9a4
GM
9488if ac_fn_c_try_cpp "$LINENO"; then :
9489 # We can compile using X headers with no special include directory.
9490ac_x_includes=
067d23c9 9491else
5476a9a4
GM
9492 for ac_dir in $ac_x_header_dirs; do
9493 if test -r "$ac_dir/X11/Xlib.h"; then
9494 ac_x_includes=$ac_dir
9495 break
f199cab1 9496 fi
f199cab1 9497done
5476a9a4
GM
9498fi
9499rm -f conftest.err conftest.$ac_ext
9500fi # $ac_x_includes = no
067d23c9 9501
5476a9a4
GM
9502if test "$ac_x_libraries" = no; then
9503 # Check for the libraries.
9504 # See if we find them without any special options.
9505 # Don't add to $LIBS permanently.
9506 ac_save_LIBS=$LIBS
9507 LIBS="-lX11 $LIBS"
7ee3791f 9508 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 9509/* end confdefs.h. */
5476a9a4 9510#include <X11/Xlib.h>
067d23c9
KY
9511int
9512main ()
9513{
5476a9a4
GM
9514XrmInitialize ()
9515 ;
067d23c9
KY
9516 return 0;
9517}
9518_ACEOF
5476a9a4
GM
9519if ac_fn_c_try_link "$LINENO"; then :
9520 LIBS=$ac_save_LIBS
9521# We can link X programs with no special library path.
9522ac_x_libraries=
7ee3791f 9523else
5476a9a4
GM
9524 LIBS=$ac_save_LIBS
9525for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
9526do
9527 # Don't even attempt the hair of trying to link an X program!
9528 for ac_extension in a so sl dylib la dll; do
9529 if test -r "$ac_dir/libX11.$ac_extension"; then
9530 ac_x_libraries=$ac_dir
9531 break 2
9532 fi
9533 done
9534done
7ee3791f 9535fi
5476a9a4
GM
9536rm -f core conftest.err conftest.$ac_objext \
9537 conftest$ac_exeext conftest.$ac_ext
9538fi # $ac_x_libraries = no
7ee3791f 9539
5476a9a4
GM
9540case $ac_x_includes,$ac_x_libraries in #(
9541 no,* | *,no | *\'*)
9542 # Didn't find X, or a directory has "'" in its name.
9543 ac_cv_have_x="have_x=no";; #(
9544 *)
9545 # Record where we found X for the cache.
9546 ac_cv_have_x="have_x=yes\
9547 ac_x_includes='$ac_x_includes'\
9548 ac_x_libraries='$ac_x_libraries'"
9549esac
9550fi
9551;; #(
9552 *) have_x=yes;;
9553 esac
9554 eval "$ac_cv_have_x"
9555fi # $with_x != no
9556
9557if test "$have_x" != yes; then
9558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
9559$as_echo "$have_x" >&6; }
9560 no_x=yes
9561else
9562 # If each of the values was on the command line, it overrides each guess.
9563 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
9564 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
9565 # Update the cache value to reflect the command line values.
9566 ac_cv_have_x="have_x=yes\
9567 ac_x_includes='$x_includes'\
9568 ac_x_libraries='$x_libraries'"
9569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
9570$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
9571fi
9572
42dcba54 9573if test "$no_x" != yes; then
5476a9a4
GM
9574 window_system=x11
9575fi
9576
9577LD_SWITCH_X_SITE_RPATH=
9578if test "${x_libraries}" != NONE; then
9579 if test -n "${x_libraries}"; then
9580 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
9581 LD_SWITCH_X_SITE_RPATH=-Wl,-rpath,`echo ${x_libraries} | sed -e "s/:/ -Wl,-rpath,/g"`
9582 fi
9583 x_default_search_path=""
9584 x_search_path=${x_libraries}
9585 if test -z "${x_search_path}"; then
9586 x_search_path=/usr/lib
9587 fi
9588 for x_library in `echo ${x_search_path}: | \
9589 sed -e "s/:/ /g" -e p -e "s:/lib[^ /]* :/share :g"`; do
9590 x_search_path="\
9591${x_library}/X11/%L/%T/%N%C%S:\
9592${x_library}/X11/%l/%T/%N%C%S:\
9593${x_library}/X11/%T/%N%C%S:\
9594${x_library}/X11/%L/%T/%N%S:\
9595${x_library}/X11/%l/%T/%N%S:\
9596${x_library}/X11/%T/%N%S"
9597 if test x"${x_default_search_path}" = x; then
9598 x_default_search_path=${x_search_path}
9599 else
9600 x_default_search_path="${x_search_path}:${x_default_search_path}"
9601 fi
9602 done
9603fi
9604
9605
9606if test "${x_includes}" != NONE && test -n "${x_includes}"; then
9607 C_SWITCH_X_SITE="$isystem"`echo ${x_includes} | sed -e "s/:/ $isystem/g"`
9608fi
9609
9610if test x"${x_includes}" = x; then
9611 bitmapdir=/usr/include/X11/bitmaps
9612else
9613 # accumulate include directories that have X11 bitmap subdirectories
9614 bmd_acc="dummyval"
9615 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
9616 if test -d "${bmd}/X11/bitmaps"; then
9617 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
9618 fi
9619 if test -d "${bmd}/bitmaps"; then
9620 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
9621 fi
9622 done
9623 if test ${bmd_acc} != "dummyval"; then
9624 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
9625 fi
9626fi
7ee3791f 9627
5476a9a4
GM
9628HAVE_NS=no
9629NS_IMPL_COCOA=no
9630NS_IMPL_GNUSTEP=no
9631tmp_CPPFLAGS="$CPPFLAGS"
9632tmp_CFLAGS="$CFLAGS"
9633CPPFLAGS="$CPPFLAGS -x objective-c"
9634CFLAGS="$CFLAGS -x objective-c"
5476a9a4 9635GNU_OBJC_CFLAGS=
4efe5ef9 9636LIBS_GNUSTEP=
5476a9a4
GM
9637if test "${with_ns}" != no; then
9638 if test "${opsys}" = darwin; then
9639 NS_IMPL_COCOA=yes
9640 ns_appdir=`pwd`/nextstep/Emacs.app
9641 ns_appbindir=${ns_appdir}/Contents/MacOS
9642 ns_appresdir=${ns_appdir}/Contents/Resources
bb7dce39 9643 ns_appsrc=Cocoa/Emacs.base
5476a9a4
GM
9644 elif test -f $GNUSTEP_CONFIG_FILE; then
9645 NS_IMPL_GNUSTEP=yes
9646 ns_appdir=`pwd`/nextstep/Emacs.app
9647 ns_appbindir=${ns_appdir}
9648 ns_appresdir=${ns_appdir}/Resources
bb7dce39 9649 ns_appsrc=GNUstep/Emacs.base
5476a9a4
GM
9650 GNUSTEP_SYSTEM_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_HEADERS)"
9651 GNUSTEP_SYSTEM_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_LIBRARIES)"
9652 GNUSTEP_LOCAL_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_HEADERS)"
9653 GNUSTEP_LOCAL_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_LIBRARIES)"
9654 test "x${GNUSTEP_LOCAL_HEADERS}" != "x" && \
9655 GNUSTEP_LOCAL_HEADERS="-I${GNUSTEP_LOCAL_HEADERS}"
9656 test "x${GNUSTEP_LOCAL_LIBRARIES}" != "x" && \
9657 GNUSTEP_LOCAL_LIBRARIES="-L${GNUSTEP_LOCAL_LIBRARIES}"
9658 CPPFLAGS="$CPPFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
9659 CFLAGS="$CFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
9660 LDFLAGS="$LDFLAGS -L${GNUSTEP_SYSTEM_LIBRARIES} ${GNUSTEP_LOCAL_LIBRARIES}"
4efe5ef9 9661 LIBS_GNUSTEP="-lgnustep-gui -lgnustep-base -lobjc -lpthread"
5476a9a4
GM
9662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if GNUstep defines BASE_NATIVE_OBJC_EXCEPTIONS" >&5
9663$as_echo_n "checking if GNUstep defines BASE_NATIVE_OBJC_EXCEPTIONS... " >&6; }
9664if test "${emacs_cv_objc_exceptions+set}" = set; then :
9665 $as_echo_n "(cached) " >&6
9666else
9667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9668/* end confdefs.h. */
9669#include <GNUstepBase/GSConfig.h>
39b3d70b
GM
9670int
9671main ()
9672{
5476a9a4
GM
9673#if defined BASE_NATIVE_OBJC_EXCEPTIONS && BASE_NATIVE_OBJC_EXCEPTIONS > 0
96741;
9675#else
9676fail;
9677#endif
9678 ;
39b3d70b
GM
9679 return 0;
9680}
9681_ACEOF
5476a9a4
GM
9682if ac_fn_c_try_compile "$LINENO"; then :
9683 emacs_cv_objc_exceptions=yes
39b3d70b 9684else
5476a9a4 9685 emacs_cv_objc_exceptions=no
39b3d70b 9686fi
5476a9a4 9687rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
39b3d70b 9688fi
5476a9a4
GM
9689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_objc_exceptions" >&5
9690$as_echo "$emacs_cv_objc_exceptions" >&6; }
9691 if test $emacs_cv_objc_exceptions = yes; then
39b3d70b 9692
5476a9a4
GM
9693$as_echo "#define _NATIVE_OBJC_EXCEPTIONS 1" >>confdefs.h
9694
9695 GNU_OBJC_CFLAGS="-fobjc-exceptions"
9696 fi
9697 fi
9698
9699 CFLAGS="$CFLAGS $GNU_OBJC_CFLAGS"
9700
9701 ac_fn_c_check_header_mongrel "$LINENO" "AppKit/AppKit.h" "ac_cv_header_AppKit_AppKit_h" "$ac_includes_default"
9702if test "x$ac_cv_header_AppKit_AppKit_h" = x""yes; then :
9703 HAVE_NS=yes
067d23c9 9704else
5476a9a4
GM
9705 as_fn_error "\`--with-ns' was specified, but the include
9706 files are missing or cannot be compiled." "$LINENO" 5
9707fi
f199cab1 9708
f199cab1 9709
dc67e786
GM
9710
9711 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9712/* end confdefs.h. */
9713#include <AppKit/AppKit.h>
9714int
9715main ()
9716{
9717
9718#ifdef MAC_OS_X_VERSION_MAX_ALLOWED
9719#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1040
9720 ; /* OK */
9721#else
9722#error "OSX 10.4 or newer required"
9723#endif
9724#endif
9725
9726 ;
9727 return 0;
9728}
9729_ACEOF
9730if ac_fn_c_try_compile "$LINENO"; then :
9731 ns_osx_have_104=yes
9732else
9733 ns_osx_have_104=no
9734fi
9735rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5476a9a4
GM
9736 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9737/* end confdefs.h. */
9738#include <Foundation/NSObjCRuntime.h>
067d23c9
KY
9739int
9740main ()
9741{
5476a9a4
GM
9742NSInteger i;
9743 ;
067d23c9
KY
9744 return 0;
9745}
9746_ACEOF
5476a9a4
GM
9747if ac_fn_c_try_compile "$LINENO"; then :
9748 ns_have_nsinteger=yes
067d23c9 9749else
5476a9a4 9750 ns_have_nsinteger=no
067d23c9 9751fi
5476a9a4 9752rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
dc67e786
GM
9753 if test $ns_osx_have_104 = no; then
9754 as_fn_error "\`OSX 10.4 or newer is required'" "$LINENO" 5;
9755 fi
5476a9a4 9756 if test $ns_have_nsinteger = yes; then
067d23c9 9757
5476a9a4 9758$as_echo "#define NS_HAVE_NSINTEGER 1" >>confdefs.h
067d23c9 9759
067d23c9 9760 fi
5476a9a4 9761fi
067d23c9 9762
5476a9a4 9763
5c0255d9 9764
5476a9a4
GM
9765INSTALL_ARCH_INDEP_EXTRA=install-etc
9766ns_self_contained=no
5476a9a4
GM
9767NS_OBJ=
9768NS_OBJC_OBJ=
9769if test "${HAVE_NS}" = yes; then
9770 if test "$with_toolkit_scroll_bars" = "no"; then
9771 as_fn_error "Non-toolkit scroll bars are not implemented for Nextstep." "$LINENO" 5
9772 fi
9773
9774 window_system=nextstep
5476a9a4
GM
9775 # set up packaging dirs
9776 if test "${EN_NS_SELF_CONTAINED}" = yes; then
9777 ns_self_contained=yes
9778 prefix=${ns_appresdir}
9779 exec_prefix=${ns_appbindir}
9780 libexecdir="\${ns_appbindir}/libexec"
9781 archlibdir="\${ns_appbindir}/libexec"
9782 docdir="\${ns_appresdir}/etc"
9783 etcdir="\${ns_appresdir}/etc"
9784 infodir="\${ns_appresdir}/info"
9785 mandir="\${ns_appresdir}/man"
9786 lispdir="\${ns_appresdir}/lisp"
9787 leimdir="\${ns_appresdir}/leim"
9788 INSTALL_ARCH_INDEP_EXTRA=
9789 fi
5476a9a4
GM
9790 NS_OBJC_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o"
9791fi
9792CFLAGS="$tmp_CFLAGS"
9793CPPFLAGS="$tmp_CPPFLAGS"
9794
9795
9796
9797
9798
5c0255d9
GM
9799HAVE_W32=no
9800W32_OBJ=
9801W32_LIBS=
b5eb356a
GM
9802W32_RES=
9803W32_RES_LINK=
5c0255d9
GM
9804if test "${with_w32}" != no; then
9805 if test "${opsys}" != "cygwin"; then
9806 as_fn_error "Using w32 with an autotools build is only supported for Cygwin." "$LINENO" 5
9807 fi
9808 ac_fn_c_check_header_mongrel "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default"
9809if test "x$ac_cv_header_windows_h" = x""yes; then :
9810 HAVE_W32=yes
9811else
9812 as_fn_error "\`--with-w32' was specified, but windows.h
9813 cannot be found." "$LINENO" 5
9814fi
9815
9816
9817
9818$as_echo "#define HAVE_NTGUI 1" >>confdefs.h
9819
b5eb356a
GM
9820 if test -n "$ac_tool_prefix"; then
9821 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
9822set dummy ${ac_tool_prefix}windres; ac_word=$2
9823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9824$as_echo_n "checking for $ac_word... " >&6; }
9825if test "${ac_cv_prog_WINDRES+set}" = set; then :
9826 $as_echo_n "(cached) " >&6
9827else
9828 if test -n "$WINDRES"; then
9829 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
9830else
9831as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9832for as_dir in $PATH
9833do
9834 IFS=$as_save_IFS
9835 test -z "$as_dir" && as_dir=.
9836 for ac_exec_ext in '' $ac_executable_extensions; do
9837 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9838 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
9839 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9840 break 2
9841 fi
9842done
9843 done
9844IFS=$as_save_IFS
9845
9846fi
9847fi
9848WINDRES=$ac_cv_prog_WINDRES
9849if test -n "$WINDRES"; then
9850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
9851$as_echo "$WINDRES" >&6; }
9852else
9853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9854$as_echo "no" >&6; }
9855fi
9856
9857
9858fi
9859if test -z "$ac_cv_prog_WINDRES"; then
9860 ac_ct_WINDRES=$WINDRES
9861 # Extract the first word of "windres", so it can be a program name with args.
9862set dummy windres; ac_word=$2
9863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9864$as_echo_n "checking for $ac_word... " >&6; }
9865if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then :
9866 $as_echo_n "(cached) " >&6
9867else
9868 if test -n "$ac_ct_WINDRES"; then
9869 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
9870else
9871as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9872for as_dir in $PATH
9873do
9874 IFS=$as_save_IFS
9875 test -z "$as_dir" && as_dir=.
9876 for ac_exec_ext in '' $ac_executable_extensions; do
9877 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9878 ac_cv_prog_ac_ct_WINDRES="windres"
9879 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9880 break 2
9881 fi
9882done
9883 done
9884IFS=$as_save_IFS
9885
9886fi
9887fi
9888ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
9889if test -n "$ac_ct_WINDRES"; then
9890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
9891$as_echo "$ac_ct_WINDRES" >&6; }
9892else
9893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9894$as_echo "no" >&6; }
9895fi
9896
9897 if test "x$ac_ct_WINDRES" = x; then
9898 WINDRES="as_fn_error "No resource compiler found." "$LINENO" 5"
9899 else
9900 case $cross_compiling:$ac_tool_warned in
9901yes:)
9902{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9903$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9904ac_tool_warned=yes ;;
9905esac
9906 WINDRES=$ac_ct_WINDRES
9907 fi
9908else
9909 WINDRES="$ac_cv_prog_WINDRES"
9910fi
9911
5c0255d9
GM
9912 W32_OBJ="w32fns.o w32menu.o w32reg.o w32font.o w32term.o"
9913 W32_OBJ="$W32_OBJ w32xfns.o w32select.o w32uniscribe.o"
9914 W32_LIBS="$W32_LIBS -lkernel32 -luser32 -lgdi32 -lole32 -lcomdlg32"
9915 W32_LIBS="$W32_LIBS -lusp10 -lcomctl32 -lwinspool"
b5eb356a
GM
9916 W32_RES="emacs.res"
9917 # Tell the linker that emacs.res is an object (which we compile from
9918 # the rc file), not a linker script.
d14b1e48 9919 W32_RES_LINK="-Wl,emacs.res"
5c0255d9
GM
9920fi
9921
9922
9923
b5eb356a
GM
9924
9925
5c0255d9
GM
9926if test "${HAVE_W32}" = "yes"; then
9927 window_system=w32
9928 with_xft=no
9929fi
9930
42dcba54
GM
9931## $window_system is now set to the window system we will
9932## ultimately use.
9933
9934term_header=
9935HAVE_X_WINDOWS=no
9936HAVE_X11=no
9937USE_X_TOOLKIT=none
9938
5476a9a4
GM
9939case "${window_system}" in
9940 x11 )
9941 HAVE_X_WINDOWS=yes
9942 HAVE_X11=yes
42dcba54 9943 term_header=xterm.h
5476a9a4
GM
9944 case "${with_x_toolkit}" in
9945 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
9946 motif ) USE_X_TOOLKIT=MOTIF ;;
9947 gtk ) with_gtk=yes
42dcba54 9948 term_header=gtkutil.h
5476a9a4 9949 USE_X_TOOLKIT=none ;;
4fa92495
GM
9950 gtk2 ) with_gtk2=yes
9951 term_header=gtkutil.h
9952 USE_X_TOOLKIT=none ;;
5476a9a4 9953 gtk3 ) with_gtk3=yes
42dcba54 9954 term_header=gtkutil.h
5476a9a4
GM
9955 USE_X_TOOLKIT=none ;;
9956 no ) USE_X_TOOLKIT=none ;;
9957 * ) USE_X_TOOLKIT=maybe ;;
9958 esac
9959 ;;
42dcba54
GM
9960 nextstep )
9961 term_header=nsterm.h
5476a9a4 9962 ;;
5c0255d9
GM
9963 w32 )
9964 term_header=w32term.h
9965 ;;
5476a9a4
GM
9966esac
9967
9968if test "$window_system" = none && test "X$with_x" != "Xno"; then
9969 # Extract the first word of "X", so it can be a program name with args.
9970set dummy X; ac_word=$2
9971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9972$as_echo_n "checking for $ac_word... " >&6; }
9973if test "${ac_cv_prog_HAVE_XSERVER+set}" = set; then :
9974 $as_echo_n "(cached) " >&6
9975else
9976 if test -n "$HAVE_XSERVER"; then
9977 ac_cv_prog_HAVE_XSERVER="$HAVE_XSERVER" # Let the user override the test.
9978else
9979as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9980for as_dir in $PATH
9981do
9982 IFS=$as_save_IFS
9983 test -z "$as_dir" && as_dir=.
9984 for ac_exec_ext in '' $ac_executable_extensions; do
9985 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9986 ac_cv_prog_HAVE_XSERVER="true"
9987 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9988 break 2
9989 fi
9990done
9991 done
9992IFS=$as_save_IFS
9993
9994 test -z "$ac_cv_prog_HAVE_XSERVER" && ac_cv_prog_HAVE_XSERVER="false"
9995fi
9996fi
9997HAVE_XSERVER=$ac_cv_prog_HAVE_XSERVER
9998if test -n "$HAVE_XSERVER"; then
9999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_XSERVER" >&5
10000$as_echo "$HAVE_XSERVER" >&6; }
10001else
10002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10003$as_echo "no" >&6; }
10004fi
10005
10006
10007 if test "$HAVE_XSERVER" = true ||
10008 test -n "$DISPLAY" ||
10009 test "`echo /usr/lib/libX11.*`" != "/usr/lib/libX11.*"; then
10010 as_fn_error "You seem to be running X, but no X development libraries
10011were found. You should install the relevant development files for X
10012and for the toolkit you want, such as Gtk+, Lesstif or Motif. Also make
10013sure you have development files for image handling, i.e.
10014tiff, gif, jpeg, png and xpm.
10015If you are sure you want Emacs compiled without X window support, pass
10016 --without-x
10017to configure." "$LINENO" 5
10018 fi
10019fi
10020
10021### If we're using X11, we should use the X menu package.
10022HAVE_MENUS=no
10023case ${HAVE_X11} in
10024 yes ) HAVE_MENUS=yes ;;
10025esac
10026
10027# Does the opsystem file prohibit the use of the GNU malloc?
10028# Assume not, until told otherwise.
10029GNU_MALLOC=yes
10030
10031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc is Doug Lea style" >&5
10032$as_echo_n "checking whether malloc is Doug Lea style... " >&6; }
10033if test "${emacs_cv_var_doug_lea_malloc+set}" = set; then :
067d23c9
KY
10034 $as_echo_n "(cached) " >&6
10035else
5476a9a4
GM
10036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10037/* end confdefs.h. */
10038#include <malloc.h>
10039 static void hook (void) {}
10040int
10041main ()
10042{
10043malloc_set_state (malloc_get_state ());
10044 __after_morecore_hook = hook;
10045 __malloc_initialize_hook = hook;
10046 ;
10047 return 0;
10048}
10049_ACEOF
10050if ac_fn_c_try_link "$LINENO"; then :
10051 emacs_cv_var_doug_lea_malloc=yes
10052else
10053 emacs_cv_var_doug_lea_malloc=no
10054fi
10055rm -f core conftest.err conftest.$ac_objext \
10056 conftest$ac_exeext conftest.$ac_ext
10057fi
10058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_var_doug_lea_malloc" >&5
10059$as_echo "$emacs_cv_var_doug_lea_malloc" >&6; }
10060doug_lea_malloc=$emacs_cv_var_doug_lea_malloc
10061
10062
10063system_malloc=no
10064case "$opsys" in
10065 ## darwin ld insists on the use of malloc routines in the System framework.
10066 darwin|sol2-10) system_malloc=yes ;;
10067esac
10068
10069if test "${system_malloc}" = "yes"; then
10070
10071$as_echo "#define SYSTEM_MALLOC 1" >>confdefs.h
10072
10073 GNU_MALLOC=no
10074 GNU_MALLOC_reason="
10075 (The GNU allocators don't work with this system configuration.)"
10076 GMALLOC_OBJ=
10077 VMLIMIT_OBJ=
10078else
10079 test "$doug_lea_malloc" != "yes" && GMALLOC_OBJ=gmalloc.o
10080 VMLIMIT_OBJ=vm-limit.o
ce9ae7ca
GM
10081
10082 for ac_header in sys/vlimit.h
10083do :
10084 ac_fn_c_check_header_mongrel "$LINENO" "sys/vlimit.h" "ac_cv_header_sys_vlimit_h" "$ac_includes_default"
10085if test "x$ac_cv_header_sys_vlimit_h" = x""yes; then :
10086 cat >>confdefs.h <<_ACEOF
10087#define HAVE_SYS_VLIMIT_H 1
10088_ACEOF
10089
10090fi
10091
10092done
10093
10094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for data_start" >&5
10095$as_echo_n "checking for data_start... " >&6; }
10096if test "${emacs_cv_data_start+set}" = set; then :
10097 $as_echo_n "(cached) " >&6
10098else
10099 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10100/* end confdefs.h. */
10101extern char data_start[]; char ch;
10102int
10103main ()
10104{
71e41a46 10105return data_start < &ch;
ce9ae7ca
GM
10106 ;
10107 return 0;
10108}
10109_ACEOF
10110if ac_fn_c_try_link "$LINENO"; then :
10111 emacs_cv_data_start=yes
10112else
10113 emacs_cv_data_start=no
10114fi
10115rm -f core conftest.err conftest.$ac_objext \
10116 conftest$ac_exeext conftest.$ac_ext
10117fi
10118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_data_start" >&5
10119$as_echo "$emacs_cv_data_start" >&6; }
10120 if test $emacs_cv_data_start = yes; then
10121
10122$as_echo "#define HAVE_DATA_START 1" >>confdefs.h
10123
10124 fi
5476a9a4
GM
10125fi
10126
10127
10128
10129if test "$doug_lea_malloc" = "yes" ; then
10130 if test "$GNU_MALLOC" = yes ; then
10131 GNU_MALLOC_reason="
10132 (Using Doug Lea's new malloc from the GNU C Library.)"
10133 fi
10134
10135$as_echo "#define DOUG_LEA_MALLOC 1" >>confdefs.h
10136
10137
10138 ## Use mmap directly for allocating larger buffers.
10139 ## FIXME this comes from src/s/{gnu,gnu-linux}.h:
10140 ## #ifdef DOUG_LEA_MALLOC; #undef REL_ALLOC; #endif
10141 ## Does the AC_FUNC_MMAP test below make this check unnecessary?
10142 case "$opsys" in
10143 gnu*) REL_ALLOC=no ;;
10144 esac
10145fi
10146
10147if test x"${REL_ALLOC}" = x; then
10148 REL_ALLOC=${GNU_MALLOC}
10149fi
10150
10151use_mmap_for_buffers=no
10152case "$opsys" in
10153 cygwin|freebsd|irix6-5) use_mmap_for_buffers=yes ;;
10154esac
10155
10156
10157
10158
10159
10160
10161
10162
10163for ac_func in getpagesize
10164do :
10165 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
10166if test "x$ac_cv_func_getpagesize" = x""yes; then :
10167 cat >>confdefs.h <<_ACEOF
10168#define HAVE_GETPAGESIZE 1
10169_ACEOF
10170
10171fi
10172done
10173
10174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
10175$as_echo_n "checking for working mmap... " >&6; }
10176if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
10177 $as_echo_n "(cached) " >&6
10178else
10179 if test "$cross_compiling" = yes; then :
10180 ac_cv_func_mmap_fixed_mapped=no
10181else
10182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10183/* end confdefs.h. */
10184$ac_includes_default
10185/* malloc might have been renamed as rpl_malloc. */
10186#undef malloc
10187
10188/* Thanks to Mike Haertel and Jim Avera for this test.
10189 Here is a matrix of mmap possibilities:
10190 mmap private not fixed
10191 mmap private fixed at somewhere currently unmapped
10192 mmap private fixed at somewhere already mapped
10193 mmap shared not fixed
10194 mmap shared fixed at somewhere currently unmapped
10195 mmap shared fixed at somewhere already mapped
10196 For private mappings, we should verify that changes cannot be read()
10197 back from the file, nor mmap's back from the file at a different
10198 address. (There have been systems where private was not correctly
10199 implemented like the infamous i386 svr4.0, and systems where the
10200 VM page cache was not coherent with the file system buffer cache
10201 like early versions of FreeBSD and possibly contemporary NetBSD.)
10202 For shared mappings, we should conversely verify that changes get
10203 propagated back to all the places they're supposed to be.
10204
10205 Grep wants private fixed already mapped.
10206 The main things grep needs to know about mmap are:
10207 * does it exist and is it safe to write into the mmap'd area
10208 * how to use it (BSD variants) */
10209
10210#include <fcntl.h>
10211#include <sys/mman.h>
10212
10213#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
10214char *malloc ();
10215#endif
10216
10217/* This mess was copied from the GNU getpagesize.h. */
10218#ifndef HAVE_GETPAGESIZE
10219# ifdef _SC_PAGESIZE
10220# define getpagesize() sysconf(_SC_PAGESIZE)
10221# else /* no _SC_PAGESIZE */
10222# ifdef HAVE_SYS_PARAM_H
10223# include <sys/param.h>
10224# ifdef EXEC_PAGESIZE
10225# define getpagesize() EXEC_PAGESIZE
10226# else /* no EXEC_PAGESIZE */
10227# ifdef NBPG
10228# define getpagesize() NBPG * CLSIZE
10229# ifndef CLSIZE
10230# define CLSIZE 1
10231# endif /* no CLSIZE */
10232# else /* no NBPG */
10233# ifdef NBPC
10234# define getpagesize() NBPC
10235# else /* no NBPC */
10236# ifdef PAGESIZE
10237# define getpagesize() PAGESIZE
10238# endif /* PAGESIZE */
10239# endif /* no NBPC */
10240# endif /* no NBPG */
10241# endif /* no EXEC_PAGESIZE */
10242# else /* no HAVE_SYS_PARAM_H */
10243# define getpagesize() 8192 /* punt totally */
10244# endif /* no HAVE_SYS_PARAM_H */
10245# endif /* no _SC_PAGESIZE */
10246
10247#endif /* no HAVE_GETPAGESIZE */
10248
10249int
10250main ()
10251{
10252 char *data, *data2, *data3;
10253 const char *cdata2;
10254 int i, pagesize;
10255 int fd, fd2;
10256
10257 pagesize = getpagesize ();
10258
10259 /* First, make a file with some known garbage in it. */
10260 data = (char *) malloc (pagesize);
10261 if (!data)
10262 return 1;
10263 for (i = 0; i < pagesize; ++i)
10264 *(data + i) = rand ();
10265 umask (0);
10266 fd = creat ("conftest.mmap", 0600);
10267 if (fd < 0)
10268 return 2;
10269 if (write (fd, data, pagesize) != pagesize)
10270 return 3;
10271 close (fd);
10272
10273 /* Next, check that the tail of a page is zero-filled. File must have
10274 non-zero length, otherwise we risk SIGBUS for entire page. */
10275 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
10276 if (fd2 < 0)
10277 return 4;
10278 cdata2 = "";
10279 if (write (fd2, cdata2, 1) != 1)
10280 return 5;
10281 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
10282 if (data2 == MAP_FAILED)
10283 return 6;
10284 for (i = 0; i < pagesize; ++i)
10285 if (*(data2 + i))
10286 return 7;
10287 close (fd2);
10288 if (munmap (data2, pagesize))
10289 return 8;
10290
10291 /* Next, try to mmap the file at a fixed address which already has
10292 something else allocated at it. If we can, also make sure that
10293 we see the same garbage. */
10294 fd = open ("conftest.mmap", O_RDWR);
10295 if (fd < 0)
10296 return 9;
10297 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
10298 MAP_PRIVATE | MAP_FIXED, fd, 0L))
10299 return 10;
10300 for (i = 0; i < pagesize; ++i)
10301 if (*(data + i) != *(data2 + i))
10302 return 11;
10303
10304 /* Finally, make sure that changes to the mapped area do not
10305 percolate back to the file as seen by read(). (This is a bug on
10306 some variants of i386 svr4.0.) */
10307 for (i = 0; i < pagesize; ++i)
10308 *(data2 + i) = *(data2 + i) + 1;
10309 data3 = (char *) malloc (pagesize);
10310 if (!data3)
10311 return 12;
10312 if (read (fd, data3, pagesize) != pagesize)
10313 return 13;
10314 for (i = 0; i < pagesize; ++i)
10315 if (*(data + i) != *(data3 + i))
10316 return 14;
10317 close (fd);
10318 return 0;
10319}
10320_ACEOF
10321if ac_fn_c_try_run "$LINENO"; then :
10322 ac_cv_func_mmap_fixed_mapped=yes
10323else
10324 ac_cv_func_mmap_fixed_mapped=no
10325fi
10326rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10327 conftest.$ac_objext conftest.beam conftest.$ac_ext
10328fi
10329
10330fi
10331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
10332$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
10333if test $ac_cv_func_mmap_fixed_mapped = yes; then
10334
10335$as_echo "#define HAVE_MMAP 1" >>confdefs.h
10336
10337fi
10338rm -f conftest.mmap conftest.txt
10339
10340if test $use_mmap_for_buffers = yes; then
f199cab1 10341
5476a9a4
GM
10342$as_echo "#define USE_MMAP_FOR_BUFFERS 1" >>confdefs.h
10343
10344 REL_ALLOC=no
10345fi
10346
10347LIBS="$LIBS_SYSTEM $LIBS"
10348
10349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
10350$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
10351if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then :
10352 $as_echo_n "(cached) " >&6
067d23c9 10353else
5476a9a4
GM
10354 ac_check_lib_save_LIBS=$LIBS
10355LIBS="-ldnet $LIBS"
10356cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 10357/* end confdefs.h. */
067d23c9 10358
5476a9a4
GM
10359/* Override any GCC internal prototype to avoid an error.
10360 Use char because int might match the return type of a GCC
10361 builtin and then its argument prototype would still apply. */
10362#ifdef __cplusplus
10363extern "C"
10364#endif
10365char dnet_ntoa ();
10366int
10367main ()
f199cab1 10368{
5476a9a4
GM
10369return dnet_ntoa ();
10370 ;
10371 return 0;
f199cab1 10372}
5476a9a4
GM
10373_ACEOF
10374if ac_fn_c_try_link "$LINENO"; then :
10375 ac_cv_lib_dnet_dnet_ntoa=yes
10376else
10377 ac_cv_lib_dnet_dnet_ntoa=no
10378fi
10379rm -f core conftest.err conftest.$ac_objext \
10380 conftest$ac_exeext conftest.$ac_ext
10381LIBS=$ac_check_lib_save_LIBS
10382fi
10383{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
10384$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
10385if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then :
10386 cat >>confdefs.h <<_ACEOF
10387#define HAVE_LIBDNET 1
10388_ACEOF
10389
10390 LIBS="-ldnet $LIBS"
10391
10392fi
10393
10394
10395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lXbsd" >&5
10396$as_echo_n "checking for main in -lXbsd... " >&6; }
10397if test "${ac_cv_lib_Xbsd_main+set}" = set; then :
10398 $as_echo_n "(cached) " >&6
10399else
10400 ac_check_lib_save_LIBS=$LIBS
10401LIBS="-lXbsd $LIBS"
10402cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10403/* end confdefs.h. */
10404
10405
10406int
10407main ()
f199cab1 10408{
5476a9a4
GM
10409return main ();
10410 ;
10411 return 0;
f199cab1 10412}
5476a9a4
GM
10413_ACEOF
10414if ac_fn_c_try_link "$LINENO"; then :
10415 ac_cv_lib_Xbsd_main=yes
10416else
10417 ac_cv_lib_Xbsd_main=no
10418fi
10419rm -f core conftest.err conftest.$ac_objext \
10420 conftest$ac_exeext conftest.$ac_ext
10421LIBS=$ac_check_lib_save_LIBS
10422fi
10423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xbsd_main" >&5
10424$as_echo "$ac_cv_lib_Xbsd_main" >&6; }
10425if test "x$ac_cv_lib_Xbsd_main" = x""yes; then :
10426 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
10427fi
10428
10429
10430LIB_PTHREAD=
10431
10432
10433
10434if test "$ac_cv_header_pthread_h"; then
10435 if test "$GMALLOC_OBJ" = gmalloc.o; then
10436 emacs_pthread_function=pthread_atfork
10437 else
10438 emacs_pthread_function=pthread_self
10439 fi
10440 as_ac_Lib=`$as_echo "ac_cv_lib_pthread_$emacs_pthread_function" | $as_tr_sh`
10441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $emacs_pthread_function in -lpthread" >&5
10442$as_echo_n "checking for $emacs_pthread_function in -lpthread... " >&6; }
10443if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
10444 $as_echo_n "(cached) " >&6
10445else
10446 ac_check_lib_save_LIBS=$LIBS
10447LIBS="-lpthread $LIBS"
10448cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10449/* end confdefs.h. */
10450
10451/* Override any GCC internal prototype to avoid an error.
10452 Use char because int might match the return type of a GCC
10453 builtin and then its argument prototype would still apply. */
10454#ifdef __cplusplus
10455extern "C"
10456#endif
10457char $emacs_pthread_function ();
10458int
10459main ()
f199cab1 10460{
5476a9a4
GM
10461return $emacs_pthread_function ();
10462 ;
10463 return 0;
f199cab1 10464}
5476a9a4
GM
10465_ACEOF
10466if ac_fn_c_try_link "$LINENO"; then :
10467 eval "$as_ac_Lib=yes"
10468else
10469 eval "$as_ac_Lib=no"
10470fi
10471rm -f core conftest.err conftest.$ac_objext \
10472 conftest$ac_exeext conftest.$ac_ext
10473LIBS=$ac_check_lib_save_LIBS
10474fi
10475eval ac_res=\$$as_ac_Lib
10476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10477$as_echo "$ac_res" >&6; }
10478eval as_val=\$$as_ac_Lib
10479 if test "x$as_val" = x""yes; then :
10480 HAVE_PTHREAD=yes
10481fi
10482
10483fi
10484if test "$HAVE_PTHREAD" = yes; then
10485 case "${canonical}" in
10486 *-hpux*) ;;
10487 *) LIB_PTHREAD="-lpthread"
10488 LIBS="$LIB_PTHREAD $LIBS" ;;
10489 esac
10490
10491$as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
10492
10493fi
10494
10495
10496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cma_open in -lpthreads" >&5
10497$as_echo_n "checking for cma_open in -lpthreads... " >&6; }
10498if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then :
10499 $as_echo_n "(cached) " >&6
10500else
10501 ac_check_lib_save_LIBS=$LIBS
10502LIBS="-lpthreads $LIBS"
10503cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10504/* end confdefs.h. */
10505
10506/* Override any GCC internal prototype to avoid an error.
10507 Use char because int might match the return type of a GCC
10508 builtin and then its argument prototype would still apply. */
10509#ifdef __cplusplus
10510extern "C"
f199cab1 10511#endif
5476a9a4
GM
10512char cma_open ();
10513int
10514main ()
10515{
10516return cma_open ();
10517 ;
10518 return 0;
f199cab1 10519}
5476a9a4
GM
10520_ACEOF
10521if ac_fn_c_try_link "$LINENO"; then :
10522 ac_cv_lib_pthreads_cma_open=yes
10523else
10524 ac_cv_lib_pthreads_cma_open=no
10525fi
10526rm -f core conftest.err conftest.$ac_objext \
10527 conftest$ac_exeext conftest.$ac_ext
10528LIBS=$ac_check_lib_save_LIBS
10529fi
10530{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_cma_open" >&5
10531$as_echo "$ac_cv_lib_pthreads_cma_open" >&6; }
10532if test "x$ac_cv_lib_pthreads_cma_open" = x""yes; then :
10533 cat >>confdefs.h <<_ACEOF
10534#define HAVE_LIBPTHREADS 1
10535_ACEOF
10536
10537 LIBS="-lpthreads $LIBS"
10538
10539fi
10540
10541
10542## Note: when using cpp in s/aix4.2.h, this definition depended on
10543## HAVE_LIBPTHREADS. That was not defined earlier in configure when
10544## the system file was sourced. Hence the value of LIBS_SYSTEM
10545## added to LIBS in configure would never contain the pthreads part,
10546## but the value used in Makefiles might. FIXME?
10547##
10548## -lpthreads seems to be necessary for Xlib in X11R6, and should
10549## be harmless on older versions of X where it happens to exist.
10550test "$opsys" = "aix4-2" && \
10551 test $ac_cv_lib_pthreads_cma_open = yes && \
10552 LIBS_SYSTEM="$LIBS_SYSTEM -lpthreads"
10553
10554
10555case ${host_os} in
10556aix*)
10557 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
10558$as_echo_n "checking for -bbigtoc option... " >&6; }
10559if test "${gdb_cv_bigtoc+set}" = set; then :
10560 $as_echo_n "(cached) " >&6
10561else
10562
10563 case $GCC in
10564 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
10565 *) gdb_cv_bigtoc=-bbigtoc ;;
10566 esac
067d23c9 10567
5476a9a4
GM
10568 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
10569 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10570/* end confdefs.h. */
067d23c9
KY
10571
10572int
10573main ()
10574{
5476a9a4
GM
10575int i;
10576 ;
10577 return 0;
10578}
10579_ACEOF
10580if ac_fn_c_try_link "$LINENO"; then :
067d23c9 10581
5476a9a4
GM
10582else
10583 gdb_cv_bigtoc=
10584fi
10585rm -f core conftest.err conftest.$ac_objext \
10586 conftest$ac_exeext conftest.$ac_ext
067d23c9 10587
5476a9a4
GM
10588fi
10589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
10590$as_echo "$gdb_cv_bigtoc" >&6; }
10591 ;;
10592esac
067d23c9 10593
5476a9a4
GM
10594# Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets
10595# used for the tests that follow. We set them back to REAL_CFLAGS and
10596# REAL_CPPFLAGS later on.
067d23c9 10597
5476a9a4
GM
10598REAL_CFLAGS="$CFLAGS"
10599REAL_CPPFLAGS="$CPPFLAGS"
10600
10601if test "${HAVE_X11}" = "yes"; then
10602 DEFS="$C_SWITCH_X_SITE $DEFS"
10603 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
10604 LIBS="-lX11 $LIBS"
10605 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
10606 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
10607
10608 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
10609 # This is handled by LD_SWITCH_X_SITE_RPATH during the real build,
10610 # but it's more convenient here to set LD_RUN_PATH since this
10611 # also works on hosts that don't understand LD_SWITCH_X_SITE_RPATH.
10612 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
10613 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
10614 export LD_RUN_PATH
10615 fi
10616
10617 if test "${opsys}" = "gnu-linux"; then
10618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether X on GNU/Linux needs -b to link" >&5
10619$as_echo_n "checking whether X on GNU/Linux needs -b to link... " >&6; }
10620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10621/* end confdefs.h. */
067d23c9 10622
5476a9a4
GM
10623int
10624main ()
10625{
10626XOpenDisplay ("foo");
f199cab1 10627 ;
067d23c9
KY
10628 return 0;
10629}
10630_ACEOF
5476a9a4
GM
10631if ac_fn_c_try_link "$LINENO"; then :
10632 xgnu_linux_first_failure=no
067d23c9 10633else
5476a9a4 10634 xgnu_linux_first_failure=yes
067d23c9 10635fi
5476a9a4
GM
10636rm -f core conftest.err conftest.$ac_objext \
10637 conftest$ac_exeext conftest.$ac_ext
10638 if test "${xgnu_linux_first_failure}" = "yes"; then
10639 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
10640 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
10641 OLD_CPPFLAGS="$CPPFLAGS"
10642 OLD_LIBS="$LIBS"
10643 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
10644 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
10645 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
10646 LIBS="$LIBS -b i486-linuxaout"
10647 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10648/* end confdefs.h. */
067d23c9 10649
5476a9a4
GM
10650int
10651main ()
10652{
10653XOpenDisplay ("foo");
10654 ;
10655 return 0;
10656}
10657_ACEOF
10658if ac_fn_c_try_link "$LINENO"; then :
10659 xgnu_linux_second_failure=no
10660else
10661 xgnu_linux_second_failure=yes
067d23c9 10662fi
5476a9a4
GM
10663rm -f core conftest.err conftest.$ac_objext \
10664 conftest$ac_exeext conftest.$ac_ext
10665 if test "${xgnu_linux_second_failure}" = "yes"; then
10666 # If we get the same failure with -b, there is no use adding -b.
10667 # So take it out. This plays safe.
10668 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
10669 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
10670 CPPFLAGS="$OLD_CPPFLAGS"
10671 LIBS="$OLD_LIBS"
10672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10673$as_echo "no" >&6; }
10674 else
10675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10676$as_echo "yes" >&6; }
10677 fi
0eb4e0df 10678 else
5476a9a4
GM
10679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10680$as_echo "no" >&6; }
10681 fi
10682 fi
0eb4e0df 10683
5476a9a4
GM
10684 # Reportedly, some broken Solaris systems have XKBlib.h but are missing
10685 # header files included from there.
10686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Xkb" >&5
10687$as_echo_n "checking for Xkb... " >&6; }
0eb4e0df
GM
10688 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10689/* end confdefs.h. */
5476a9a4
GM
10690#include <X11/Xlib.h>
10691#include <X11/XKBlib.h>
0eb4e0df
GM
10692int
10693main ()
10694{
5476a9a4 10695XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);
0eb4e0df
GM
10696 ;
10697 return 0;
10698}
10699_ACEOF
5476a9a4
GM
10700if ac_fn_c_try_link "$LINENO"; then :
10701 emacs_xkb=yes
0eb4e0df 10702else
5476a9a4 10703 emacs_xkb=no
0eb4e0df 10704fi
5476a9a4
GM
10705rm -f core conftest.err conftest.$ac_objext \
10706 conftest$ac_exeext conftest.$ac_ext
10707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_xkb" >&5
10708$as_echo "$emacs_xkb" >&6; }
10709 if test $emacs_xkb = yes; then
1abfdc54 10710
f46ba47d
GM
10711$as_echo "#define HAVE_XKB 1" >>confdefs.h
10712
e1fefc61 10713 fi
1abfdc54 10714
5476a9a4
GM
10715 for ac_func in XrmSetDatabase XScreenResourceString \
10716XScreenNumberOfScreen
10717do :
10718 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10719ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10720eval as_val=\$$as_ac_var
10721 if test "x$as_val" = x""yes; then :
10722 cat >>confdefs.h <<_ACEOF
10723#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
f199cab1 10724_ACEOF
1abfdc54 10725
5476a9a4
GM
10726fi
10727done
1abfdc54 10728
5476a9a4 10729fi
1abfdc54 10730
5476a9a4
GM
10731if test "${window_system}" = "x11"; then
10732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 version 6" >&5
10733$as_echo_n "checking X11 version 6... " >&6; }
10734 if test "${emacs_cv_x11_version_6+set}" = set; then :
067d23c9
KY
10735 $as_echo_n "(cached) " >&6
10736else
5476a9a4 10737 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 10738/* end confdefs.h. */
5476a9a4 10739#include <X11/Xlib.h>
067d23c9
KY
10740int
10741main ()
10742{
5476a9a4
GM
10743#if XlibSpecificationRelease < 6
10744fail;
10745#endif
10746
067d23c9
KY
10747 ;
10748 return 0;
10749}
10750_ACEOF
5476a9a4
GM
10751if ac_fn_c_try_link "$LINENO"; then :
10752 emacs_cv_x11_version_6=yes
10753else
10754 emacs_cv_x11_version_6=no
10755fi
10756rm -f core conftest.err conftest.$ac_objext \
10757 conftest$ac_exeext conftest.$ac_ext
067d23c9 10758fi
f199cab1 10759
5476a9a4
GM
10760 if test $emacs_cv_x11_version_6 = yes; then
10761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5
10762$as_echo "6 or newer" >&6; }
f199cab1 10763
5476a9a4 10764$as_echo "#define HAVE_X11R6 1" >>confdefs.h
f199cab1
GM
10765
10766
5476a9a4 10767$as_echo "#define HAVE_X_I18N 1" >>confdefs.h
f199cab1 10768
5476a9a4
GM
10769 ## inoue@ainet.or.jp says Solaris has a bug related to X11R6-style
10770 ## XIM support.
10771 case "$opsys" in
10772 sol2-*) : ;;
10773 *)
10774$as_echo "#define HAVE_X11R6_XIM 1" >>confdefs.h
f199cab1 10775
5476a9a4
GM
10776 ;;
10777 esac
10778 else
10779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5
10780$as_echo "before 6" >&6; }
10781 fi
10782fi
f199cab1 10783
067d23c9 10784
5476a9a4
GM
10785### Use -lrsvg-2 if available, unless `--with-rsvg=no' is specified.
10786HAVE_RSVG=no
10787if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes"; then
10788 if test "${with_rsvg}" != "no"; then
10789 RSVG_REQUIRED=2.11.0
10790 RSVG_MODULE="librsvg-2.0 >= $RSVG_REQUIRED"
067d23c9 10791
f199cab1 10792
5476a9a4 10793 succeeded=no
067d23c9 10794
5476a9a4
GM
10795 if test "$PKG_CONFIG" = "no" ; then
10796 :
10797 else
10798 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 10799 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
10800 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $RSVG_MODULE" >&5
10801$as_echo_n "checking for $RSVG_MODULE... " >&6; }
f199cab1 10802
b5591ebb
GM
10803 if "$PKG_CONFIG" --exists "$RSVG_MODULE" 2>&5 &&
10804 RSVG_CFLAGS=`"$PKG_CONFIG" --cflags "$RSVG_MODULE" 2>&5` &&
10805 RSVG_LIBS=`"$PKG_CONFIG" --libs "$RSVG_MODULE" 2>&5`; then
5476a9a4
GM
10806 edit_cflags="
10807 s,///*,/,g
10808 s/^/ /
10809 s/ -I/ $isystem/g
10810 s/^ //
10811 "
10812 RSVG_CFLAGS=`$as_echo "$RSVG_CFLAGS" | sed -e "$edit_cflags"`
10813 RSVG_LIBS=`$as_echo "$RSVG_LIBS" | sed -e 's,///*,/,g'`
10814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$RSVG_CFLAGS' LIBS='$RSVG_LIBS'" >&5
10815$as_echo "yes CFLAGS='$RSVG_CFLAGS' LIBS='$RSVG_LIBS'" >&6; }
10816 succeeded=yes
10817 else
10818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10819$as_echo "no" >&6; }
10820 RSVG_CFLAGS=""
10821 RSVG_LIBS=""
10822 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
10823 ## do set a variable so people can do so. Do it in a subshell
10824 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 10825 RSVG_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$RSVG_MODULE") 2>&1`
f199cab1 10826
5476a9a4 10827 fi
067d23c9 10828
067d23c9 10829
067d23c9 10830
f199cab1 10831 else
5476a9a4
GM
10832 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10833 echo "*** See http://www.freedesktop.org/software/pkgconfig"
f199cab1 10834 fi
5476a9a4
GM
10835 fi
10836
10837 if test $succeeded = yes; then
10838 HAVE_RSVG=yes
10839 else
10840 :
10841 fi
067d23c9 10842
067d23c9 10843
067d23c9 10844
f199cab1 10845
5476a9a4 10846 if test $HAVE_RSVG = yes; then
f199cab1 10847
5476a9a4
GM
10848$as_echo "#define HAVE_RSVG 1" >>confdefs.h
10849
10850 CFLAGS="$CFLAGS $RSVG_CFLAGS"
10851 LIBS="$RSVG_LIBS $LIBS"
10852 fi
f199cab1 10853 fi
5476a9a4 10854fi
f199cab1 10855
5476a9a4
GM
10856HAVE_IMAGEMAGICK=no
10857if test "${HAVE_X11}" = "yes"; then
10858 if test "${with_imagemagick}" != "no"; then
10859 ## 6.2.8 is the earliest version known to work, but earlier versions
10860 ## might work - let us know if you find one.
10861 ## 6.0.7 does not work. See bug#7955.
0cb77136
GM
10862 ## 6.8.2 makes Emacs crash; see Bug#13867.
10863 IMAGEMAGICK_MODULE="Wand >= 6.2.8 Wand != 6.8.2"
f199cab1 10864
5476a9a4 10865 succeeded=no
f199cab1 10866
5476a9a4
GM
10867 if test "$PKG_CONFIG" = "no" ; then
10868 :
10869 else
10870 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 10871 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
10872 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $IMAGEMAGICK_MODULE" >&5
10873$as_echo_n "checking for $IMAGEMAGICK_MODULE... " >&6; }
f199cab1 10874
b5591ebb
GM
10875 if "$PKG_CONFIG" --exists "$IMAGEMAGICK_MODULE" 2>&5 &&
10876 IMAGEMAGICK_CFLAGS=`"$PKG_CONFIG" --cflags "$IMAGEMAGICK_MODULE" 2>&5` &&
10877 IMAGEMAGICK_LIBS=`"$PKG_CONFIG" --libs "$IMAGEMAGICK_MODULE" 2>&5`; then
5476a9a4
GM
10878 edit_cflags="
10879 s,///*,/,g
10880 s/^/ /
10881 s/ -I/ $isystem/g
10882 s/^ //
10883 "
10884 IMAGEMAGICK_CFLAGS=`$as_echo "$IMAGEMAGICK_CFLAGS" | sed -e "$edit_cflags"`
10885 IMAGEMAGICK_LIBS=`$as_echo "$IMAGEMAGICK_LIBS" | sed -e 's,///*,/,g'`
10886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$IMAGEMAGICK_CFLAGS' LIBS='$IMAGEMAGICK_LIBS'" >&5
10887$as_echo "yes CFLAGS='$IMAGEMAGICK_CFLAGS' LIBS='$IMAGEMAGICK_LIBS'" >&6; }
10888 succeeded=yes
10889 else
10890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10891$as_echo "no" >&6; }
10892 IMAGEMAGICK_CFLAGS=""
10893 IMAGEMAGICK_LIBS=""
10894 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
10895 ## do set a variable so people can do so. Do it in a subshell
10896 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 10897 IMAGEMAGICK_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$IMAGEMAGICK_MODULE") 2>&1`
f199cab1 10898
5476a9a4 10899 fi
f199cab1 10900
f199cab1 10901
f199cab1 10902
5476a9a4
GM
10903 else
10904 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10905 echo "*** See http://www.freedesktop.org/software/pkgconfig"
10906 fi
f199cab1 10907 fi
5476a9a4
GM
10908
10909 if test $succeeded = yes; then
10910 HAVE_IMAGEMAGICK=yes
f199cab1 10911 else
5476a9a4 10912 :
067d23c9
KY
10913 fi
10914
f199cab1 10915
067d23c9 10916
f199cab1 10917
5476a9a4 10918 if test $HAVE_IMAGEMAGICK = yes; then
067d23c9 10919
5476a9a4 10920$as_echo "#define HAVE_IMAGEMAGICK 1" >>confdefs.h
f199cab1 10921
5476a9a4
GM
10922 CFLAGS="$CFLAGS $IMAGEMAGICK_CFLAGS"
10923 LIBS="$IMAGEMAGICK_LIBS $LIBS"
10924 for ac_func in MagickExportImagePixels MagickMergeImageLayers
10925do :
10926 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10927ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10928eval as_val=\$$as_ac_var
10929 if test "x$as_val" = x""yes; then :
10930 cat >>confdefs.h <<_ACEOF
10931#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
067d23c9 10932_ACEOF
f199cab1
GM
10933
10934fi
5476a9a4
GM
10935done
10936
067d23c9
KY
10937 fi
10938 fi
5476a9a4 10939fi
067d23c9 10940
f199cab1 10941
5476a9a4
GM
10942HAVE_GTK=no
10943GTK_OBJ=
4fa92495
GM
10944check_gtk2=no
10945gtk3_pkg_errors=
10946if test "${with_gtk3}" = "yes" || test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "maybe"; then
5476a9a4
GM
10947 GLIB_REQUIRED=2.28
10948 GTK_REQUIRED=3.0
10949 GTK_MODULES="gtk+-3.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
f199cab1
GM
10950
10951
5476a9a4 10952 succeeded=no
f199cab1 10953
5476a9a4
GM
10954 if test "$PKG_CONFIG" = "no" ; then
10955 pkg_check_gtk=no
10956 else
10957 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 10958 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
10959 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5
10960$as_echo_n "checking for $GTK_MODULES... " >&6; }
f199cab1 10961
b5591ebb
GM
10962 if "$PKG_CONFIG" --exists "$GTK_MODULES" 2>&5 &&
10963 GTK_CFLAGS=`"$PKG_CONFIG" --cflags "$GTK_MODULES" 2>&5` &&
10964 GTK_LIBS=`"$PKG_CONFIG" --libs "$GTK_MODULES" 2>&5`; then
5476a9a4
GM
10965 edit_cflags="
10966 s,///*,/,g
10967 s/^/ /
10968 s/ -I/ $isystem/g
10969 s/^ //
10970 "
10971 GTK_CFLAGS=`$as_echo "$GTK_CFLAGS" | sed -e "$edit_cflags"`
10972 GTK_LIBS=`$as_echo "$GTK_LIBS" | sed -e 's,///*,/,g'`
10973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&5
10974$as_echo "yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&6; }
10975 succeeded=yes
10976 else
10977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10978$as_echo "no" >&6; }
10979 GTK_CFLAGS=""
10980 GTK_LIBS=""
10981 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
10982 ## do set a variable so people can do so. Do it in a subshell
10983 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 10984 GTK_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$GTK_MODULES") 2>&1`
f199cab1 10985
5476a9a4 10986 fi
f199cab1 10987
f199cab1 10988
f199cab1 10989
5476a9a4
GM
10990 else
10991 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10992 echo "*** See http://www.freedesktop.org/software/pkgconfig"
f199cab1 10993 fi
5476a9a4 10994 fi
067d23c9 10995
5476a9a4
GM
10996 if test $succeeded = yes; then
10997 pkg_check_gtk=yes
10998 else
10999 pkg_check_gtk=no
11000 fi
067d23c9 11001
4fa92495 11002 if test "$pkg_check_gtk" = "no" && test "$with_gtk3" = "yes"; then
5476a9a4 11003 as_fn_error "$GTK_PKG_ERRORS" "$LINENO" 5
067d23c9 11004 fi
4fa92495 11005 if test "$pkg_check_gtk" = "yes"; then
067d23c9 11006
5476a9a4 11007$as_echo "#define HAVE_GTK3 1" >>confdefs.h
067d23c9 11008
4fa92495
GM
11009 GTK_OBJ=emacsgtkfixed.o
11010 term_header=gtkutil.h
a732eace 11011 USE_GTK_TOOLKIT="GTK3"
4efe5ef9
GM
11012 if test "x$ac_enable_gtk_deprecation_warnings" = x; then
11013 GTK_CFLAGS="$GTK_CFLAGS -DGDK_DISABLE_DEPRECATION_WARNINGS"
11014 fi
4fa92495
GM
11015 else
11016 check_gtk2=yes
11017 gtk3_pkg_errors="$GTK_PKG_ERRORS "
11018 fi
5476a9a4 11019fi
067d23c9 11020
4fa92495 11021if test "${with_gtk2}" = "yes" || test "$check_gtk2" = "yes"; then
5476a9a4
GM
11022 GLIB_REQUIRED=2.10
11023 GTK_REQUIRED=2.10
11024 GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
f199cab1 11025
5476a9a4
GM
11026
11027 succeeded=no
11028
11029 if test "$PKG_CONFIG" = "no" ; then
11030 pkg_check_gtk=no
11031 else
11032 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 11033 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
11034 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5
11035$as_echo_n "checking for $GTK_MODULES... " >&6; }
11036
b5591ebb
GM
11037 if "$PKG_CONFIG" --exists "$GTK_MODULES" 2>&5 &&
11038 GTK_CFLAGS=`"$PKG_CONFIG" --cflags "$GTK_MODULES" 2>&5` &&
11039 GTK_LIBS=`"$PKG_CONFIG" --libs "$GTK_MODULES" 2>&5`; then
5476a9a4
GM
11040 edit_cflags="
11041 s,///*,/,g
11042 s/^/ /
11043 s/ -I/ $isystem/g
11044 s/^ //
11045 "
11046 GTK_CFLAGS=`$as_echo "$GTK_CFLAGS" | sed -e "$edit_cflags"`
11047 GTK_LIBS=`$as_echo "$GTK_LIBS" | sed -e 's,///*,/,g'`
11048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&5
11049$as_echo "yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&6; }
11050 succeeded=yes
11051 else
11052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11053$as_echo "no" >&6; }
11054 GTK_CFLAGS=""
11055 GTK_LIBS=""
11056 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
11057 ## do set a variable so people can do so. Do it in a subshell
11058 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 11059 GTK_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$GTK_MODULES") 2>&1`
5476a9a4
GM
11060
11061 fi
11062
11063
11064
11065 else
11066 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11067 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11068 fi
11069 fi
11070
11071 if test $succeeded = yes; then
11072 pkg_check_gtk=yes
11073 else
11074 pkg_check_gtk=no
11075 fi
11076
e2d8f316
GM
11077 if test "$pkg_check_gtk" = "no" &&
11078 { test "$with_gtk" = yes || test "$with_gtk2" = "yes"; }
11079 then
11080 as_fn_error "$gtk3_pkg_errors$GTK_PKG_ERRORS" "$LINENO" 5
5476a9a4 11081 fi
a732eace 11082 test "$pkg_check_gtk" = "yes" && USE_GTK_TOOLKIT="GTK2"
067d23c9 11083fi
067d23c9 11084
5476a9a4
GM
11085if test x"$pkg_check_gtk" = xyes; then
11086
11087
11088
11089 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS"
11090 CFLAGS="$CFLAGS $GTK_CFLAGS"
11091 LIBS="$GTK_LIBS $LIBS"
11092 GTK_COMPILES=no
11093 for ac_func in gtk_main
11094do :
11095 ac_fn_c_check_func "$LINENO" "gtk_main" "ac_cv_func_gtk_main"
11096if test "x$ac_cv_func_gtk_main" = x""yes; then :
11097 cat >>confdefs.h <<_ACEOF
11098#define HAVE_GTK_MAIN 1
11099_ACEOF
11100 GTK_COMPILES=yes
f199cab1 11101fi
5476a9a4 11102done
067d23c9 11103
5476a9a4
GM
11104 if test "${GTK_COMPILES}" != "yes"; then
11105 if test "$USE_X_TOOLKIT" != "maybe"; then
11106 as_fn_error "Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" "$LINENO" 5;
11107 fi
11108 else
11109 HAVE_GTK=yes
11110
11111$as_echo "#define USE_GTK 1" >>confdefs.h
067d23c9 11112
5476a9a4
GM
11113 GTK_OBJ="gtkutil.o $GTK_OBJ"
11114 USE_X_TOOLKIT=none
b5591ebb 11115 if "$PKG_CONFIG" --atleast-version=2.10 gtk+-2.0; then
5476a9a4
GM
11116 :
11117 else
11118 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your version of Gtk+ will have problems with
11119 closing open displays. This is no problem if you just use
11120 one display, but if you use more than one and close one of them
11121 Emacs may crash." >&5
11122$as_echo "$as_me: WARNING: Your version of Gtk+ will have problems with
11123 closing open displays. This is no problem if you just use
11124 one display, but if you use more than one and close one of them
11125 Emacs may crash." >&2;}
11126 sleep 3
11127 fi
067d23c9
KY
11128 fi
11129
5476a9a4 11130fi
067d23c9
KY
11131
11132
11133
5476a9a4 11134if test "${HAVE_GTK}" = "yes"; then
067d23c9 11135
5476a9a4
GM
11136 if test "$with_toolkit_scroll_bars" != no; then
11137 with_toolkit_scroll_bars=yes
11138 fi
067d23c9 11139
5476a9a4
GM
11140 HAVE_GTK_FILE_SELECTION=no
11141 ac_fn_c_check_decl "$LINENO" "GTK_TYPE_FILE_SELECTION" "ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" "$ac_includes_default
11142#include <gtk/gtk.h>
11143"
11144if test "x$ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" = x""yes; then :
11145 HAVE_GTK_FILE_SELECTION=yes
11146else
11147 HAVE_GTK_FILE_SELECTION=no
11148fi
067d23c9 11149
5476a9a4
GM
11150 if test "$HAVE_GTK_FILE_SELECTION" = yes; then
11151 for ac_func in gtk_file_selection_new
11152do :
11153 ac_fn_c_check_func "$LINENO" "gtk_file_selection_new" "ac_cv_func_gtk_file_selection_new"
11154if test "x$ac_cv_func_gtk_file_selection_new" = x""yes; then :
11155 cat >>confdefs.h <<_ACEOF
11156#define HAVE_GTK_FILE_SELECTION_NEW 1
f199cab1 11157_ACEOF
067d23c9 11158
f199cab1 11159fi
5476a9a4
GM
11160done
11161
f199cab1 11162 fi
067d23c9 11163
4efe5ef9
GM
11164 HAVE_GTK_HANDLE_BOX=no
11165 ac_fn_c_check_decl "$LINENO" "GTK_TYPE_HANDLE_BOX" "ac_cv_have_decl_GTK_TYPE_HANDLE_BOX" "$ac_includes_default
11166#include <gtk/gtk.h>
11167"
11168if test "x$ac_cv_have_decl_GTK_TYPE_HANDLE_BOX" = x""yes; then :
11169 HAVE_GTK_HANDLE_BOX=yes
11170else
11171 HAVE_GTK_HANDLE_BOX=no
11172fi
11173
11174 if test "$HAVE_GTK_HANDLE_BOX" = yes; then
11175 for ac_func in gtk_handle_box_new
11176do :
11177 ac_fn_c_check_func "$LINENO" "gtk_handle_box_new" "ac_cv_func_gtk_handle_box_new"
11178if test "x$ac_cv_func_gtk_handle_box_new" = x""yes; then :
11179 cat >>confdefs.h <<_ACEOF
11180#define HAVE_GTK_HANDLE_BOX_NEW 1
11181_ACEOF
11182
11183fi
11184done
11185
11186 fi
11187
11188 HAVE_GTK_TEAROFF_MENU_ITEM=no
11189 ac_fn_c_check_decl "$LINENO" "GTK_TYPE_TEAROFF_MENU_ITEM" "ac_cv_have_decl_GTK_TYPE_TEAROFF_MENU_ITEM" "$ac_includes_default
11190#include <gtk/gtk.h>
11191"
11192if test "x$ac_cv_have_decl_GTK_TYPE_TEAROFF_MENU_ITEM" = x""yes; then :
11193 HAVE_GTK_TEAROFF_MENU_ITEM=yes
11194else
11195 HAVE_GTK_TEAROFF_MENU_ITEM=no
11196fi
11197
11198 if test "$HAVE_GTK_TEAROFF_MENU_ITEM" = yes; then
11199 for ac_func in gtk_tearoff_menu_item_new
11200do :
11201 ac_fn_c_check_func "$LINENO" "gtk_tearoff_menu_item_new" "ac_cv_func_gtk_tearoff_menu_item_new"
11202if test "x$ac_cv_func_gtk_tearoff_menu_item_new" = x""yes; then :
11203 cat >>confdefs.h <<_ACEOF
11204#define HAVE_GTK_TEAROFF_MENU_ITEM_NEW 1
11205_ACEOF
11206
11207fi
11208done
11209
11210 fi
067d23c9 11211
5476a9a4
GM
11212 for ac_func in gtk_widget_get_window gtk_widget_set_has_window \
11213 gtk_dialog_get_action_area gtk_widget_get_sensitive \
11214 gtk_widget_get_mapped gtk_adjustment_get_page_size \
11215 gtk_orientable_set_orientation \
11216 gtk_window_set_has_resize_grip
11217do :
11218 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11219ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11220eval as_val=\$$as_ac_var
11221 if test "x$as_val" = x""yes; then :
11222 cat >>confdefs.h <<_ACEOF
11223#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11224_ACEOF
067d23c9 11225
5476a9a4
GM
11226fi
11227done
067d23c9 11228
42dcba54
GM
11229
11230 term_header=gtkutil.h
5476a9a4 11231fi
067d23c9 11232
5476a9a4
GM
11233HAVE_DBUS=no
11234DBUS_OBJ=
11235if test "${with_dbus}" = "yes"; then
067d23c9 11236
5476a9a4 11237 succeeded=no
067d23c9 11238
5476a9a4
GM
11239 if test "$PKG_CONFIG" = "no" ; then
11240 HAVE_DBUS=no
f199cab1 11241 else
5476a9a4 11242 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 11243 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
11244 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbus-1 >= 1.0" >&5
11245$as_echo_n "checking for dbus-1 >= 1.0... " >&6; }
067d23c9 11246
b5591ebb
GM
11247 if "$PKG_CONFIG" --exists "dbus-1 >= 1.0" 2>&5 &&
11248 DBUS_CFLAGS=`"$PKG_CONFIG" --cflags "dbus-1 >= 1.0" 2>&5` &&
11249 DBUS_LIBS=`"$PKG_CONFIG" --libs "dbus-1 >= 1.0" 2>&5`; then
5476a9a4
GM
11250 edit_cflags="
11251 s,///*,/,g
11252 s/^/ /
11253 s/ -I/ $isystem/g
11254 s/^ //
11255 "
11256 DBUS_CFLAGS=`$as_echo "$DBUS_CFLAGS" | sed -e "$edit_cflags"`
11257 DBUS_LIBS=`$as_echo "$DBUS_LIBS" | sed -e 's,///*,/,g'`
11258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$DBUS_CFLAGS' LIBS='$DBUS_LIBS'" >&5
11259$as_echo "yes CFLAGS='$DBUS_CFLAGS' LIBS='$DBUS_LIBS'" >&6; }
11260 succeeded=yes
11261 else
11262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11263$as_echo "no" >&6; }
11264 DBUS_CFLAGS=""
11265 DBUS_LIBS=""
11266 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
11267 ## do set a variable so people can do so. Do it in a subshell
11268 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 11269 DBUS_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "dbus-1 >= 1.0") 2>&1`
067d23c9 11270
5476a9a4 11271 fi
067d23c9 11272
15f79fcd 11273
067d23c9 11274
5476a9a4
GM
11275 else
11276 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11277 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11278 fi
067d23c9 11279 fi
067d23c9 11280
5476a9a4
GM
11281 if test $succeeded = yes; then
11282 HAVE_DBUS=yes
f199cab1 11283 else
5476a9a4 11284 HAVE_DBUS=no
f199cab1 11285 fi
067d23c9 11286
5476a9a4
GM
11287 if test "$HAVE_DBUS" = yes; then
11288 LIBS="$LIBS $DBUS_LIBS"
067d23c9 11289
5476a9a4 11290$as_echo "#define HAVE_DBUS 1" >>confdefs.h
067d23c9 11291
5476a9a4
GM
11292 for ac_func in dbus_watch_get_unix_fd \
11293 dbus_type_is_valid \
11294 dbus_validate_bus_name \
11295 dbus_validate_path \
11296 dbus_validate_interface \
11297 dbus_validate_member
11298do :
11299 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11300ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11301eval as_val=\$$as_ac_var
11302 if test "x$as_val" = x""yes; then :
11303 cat >>confdefs.h <<_ACEOF
11304#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11305_ACEOF
067d23c9 11306
5476a9a4
GM
11307fi
11308done
067d23c9 11309
5476a9a4
GM
11310 DBUS_OBJ=dbusbind.o
11311 fi
11312fi
067d23c9
KY
11313
11314
5476a9a4
GM
11315HAVE_GSETTINGS=no
11316if test "${HAVE_X11}" = "yes" && test "${with_gsettings}" = "yes"; then
067d23c9 11317
5476a9a4 11318 succeeded=no
067d23c9 11319
5476a9a4
GM
11320 if test "$PKG_CONFIG" = "no" ; then
11321 HAVE_GSETTINGS=no
11322 else
11323 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 11324 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
11325 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gio-2.0 >= 2.26" >&5
11326$as_echo_n "checking for gio-2.0 >= 2.26... " >&6; }
0afb4571 11327
b5591ebb
GM
11328 if "$PKG_CONFIG" --exists "gio-2.0 >= 2.26" 2>&5 &&
11329 GSETTINGS_CFLAGS=`"$PKG_CONFIG" --cflags "gio-2.0 >= 2.26" 2>&5` &&
11330 GSETTINGS_LIBS=`"$PKG_CONFIG" --libs "gio-2.0 >= 2.26" 2>&5`; then
5476a9a4
GM
11331 edit_cflags="
11332 s,///*,/,g
11333 s/^/ /
11334 s/ -I/ $isystem/g
11335 s/^ //
11336 "
11337 GSETTINGS_CFLAGS=`$as_echo "$GSETTINGS_CFLAGS" | sed -e "$edit_cflags"`
11338 GSETTINGS_LIBS=`$as_echo "$GSETTINGS_LIBS" | sed -e 's,///*,/,g'`
11339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GSETTINGS_CFLAGS' LIBS='$GSETTINGS_LIBS'" >&5
11340$as_echo "yes CFLAGS='$GSETTINGS_CFLAGS' LIBS='$GSETTINGS_LIBS'" >&6; }
11341 succeeded=yes
11342 else
11343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11344$as_echo "no" >&6; }
11345 GSETTINGS_CFLAGS=""
11346 GSETTINGS_LIBS=""
11347 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
11348 ## do set a variable so people can do so. Do it in a subshell
11349 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 11350 GSETTINGS_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "gio-2.0 >= 2.26") 2>&1`
0afb4571 11351
5476a9a4 11352 fi
067d23c9
KY
11353
11354
11355
11356 else
5476a9a4
GM
11357 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11358 echo "*** See http://www.freedesktop.org/software/pkgconfig"
067d23c9 11359 fi
5476a9a4 11360 fi
067d23c9 11361
5476a9a4
GM
11362 if test $succeeded = yes; then
11363 HAVE_GSETTINGS=yes
11364 else
11365 HAVE_GSETTINGS=no
11366 fi
f199cab1 11367
5476a9a4 11368 if test "$HAVE_GSETTINGS" = "yes"; then
f199cab1 11369
5476a9a4 11370$as_echo "#define HAVE_GSETTINGS 1" >>confdefs.h
f199cab1 11371
5476a9a4
GM
11372 SETTINGS_CFLAGS="$GSETTINGS_CFLAGS"
11373 SETTINGS_LIBS="$GSETTINGS_LIBS"
11374 fi
11375fi
067d23c9 11376
5476a9a4
GM
11377HAVE_GCONF=no
11378if test "${HAVE_X11}" = "yes" && test "${with_gconf}" = "yes"; then
067d23c9 11379
5476a9a4 11380 succeeded=no
067d23c9 11381
5476a9a4
GM
11382 if test "$PKG_CONFIG" = "no" ; then
11383 HAVE_GCONF=no
11384 else
11385 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 11386 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
11387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gconf-2.0 >= 2.13" >&5
11388$as_echo_n "checking for gconf-2.0 >= 2.13... " >&6; }
067d23c9 11389
b5591ebb
GM
11390 if "$PKG_CONFIG" --exists "gconf-2.0 >= 2.13" 2>&5 &&
11391 GCONF_CFLAGS=`"$PKG_CONFIG" --cflags "gconf-2.0 >= 2.13" 2>&5` &&
11392 GCONF_LIBS=`"$PKG_CONFIG" --libs "gconf-2.0 >= 2.13" 2>&5`; then
5476a9a4
GM
11393 edit_cflags="
11394 s,///*,/,g
11395 s/^/ /
11396 s/ -I/ $isystem/g
11397 s/^ //
11398 "
11399 GCONF_CFLAGS=`$as_echo "$GCONF_CFLAGS" | sed -e "$edit_cflags"`
11400 GCONF_LIBS=`$as_echo "$GCONF_LIBS" | sed -e 's,///*,/,g'`
11401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GCONF_CFLAGS' LIBS='$GCONF_LIBS'" >&5
11402$as_echo "yes CFLAGS='$GCONF_CFLAGS' LIBS='$GCONF_LIBS'" >&6; }
11403 succeeded=yes
11404 else
11405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11406$as_echo "no" >&6; }
11407 GCONF_CFLAGS=""
11408 GCONF_LIBS=""
11409 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
11410 ## do set a variable so people can do so. Do it in a subshell
11411 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 11412 GCONF_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "gconf-2.0 >= 2.13") 2>&1`
067d23c9 11413
5476a9a4 11414 fi
f199cab1 11415
f199cab1
GM
11416
11417
5476a9a4
GM
11418 else
11419 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11420 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11421 fi
11422 fi
f199cab1 11423
5476a9a4
GM
11424 if test $succeeded = yes; then
11425 HAVE_GCONF=yes
11426 else
11427 HAVE_GCONF=no
11428 fi
f199cab1 11429
5476a9a4 11430 if test "$HAVE_GCONF" = yes; then
f199cab1 11431
5476a9a4 11432$as_echo "#define HAVE_GCONF 1" >>confdefs.h
f199cab1 11433
5476a9a4
GM
11434 SETTINGS_CFLAGS="$SETTINGS_CFLAGS $GCONF_CFLAGS"
11435 SETTINGS_LIBS="$SETTINGS_LIBS $GCONF_LIBS"
11436 fi
11437fi
f199cab1 11438
5476a9a4 11439if test "$HAVE_GSETTINGS" = "yes" || test "$HAVE_GCONF" = "yes"; then
dcde497f
GM
11440
11441 succeeded=no
11442
11443 if test "$PKG_CONFIG" = "no" ; then
11444 HAVE_GOBJECT=no
11445 else
11446 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 11447 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
dcde497f
GM
11448 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gobject-2.0 >= 2.0" >&5
11449$as_echo_n "checking for gobject-2.0 >= 2.0... " >&6; }
11450
b5591ebb
GM
11451 if "$PKG_CONFIG" --exists "gobject-2.0 >= 2.0" 2>&5 &&
11452 GOBJECT_CFLAGS=`"$PKG_CONFIG" --cflags "gobject-2.0 >= 2.0" 2>&5` &&
11453 GOBJECT_LIBS=`"$PKG_CONFIG" --libs "gobject-2.0 >= 2.0" 2>&5`; then
dcde497f
GM
11454 edit_cflags="
11455 s,///*,/,g
11456 s/^/ /
11457 s/ -I/ $isystem/g
11458 s/^ //
11459 "
11460 GOBJECT_CFLAGS=`$as_echo "$GOBJECT_CFLAGS" | sed -e "$edit_cflags"`
11461 GOBJECT_LIBS=`$as_echo "$GOBJECT_LIBS" | sed -e 's,///*,/,g'`
11462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GOBJECT_CFLAGS' LIBS='$GOBJECT_LIBS'" >&5
11463$as_echo "yes CFLAGS='$GOBJECT_CFLAGS' LIBS='$GOBJECT_LIBS'" >&6; }
11464 succeeded=yes
11465 else
11466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11467$as_echo "no" >&6; }
11468 GOBJECT_CFLAGS=""
11469 GOBJECT_LIBS=""
11470 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
11471 ## do set a variable so people can do so. Do it in a subshell
11472 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 11473 GOBJECT_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "gobject-2.0 >= 2.0") 2>&1`
dcde497f
GM
11474
11475 fi
11476
11477
11478
11479 else
11480 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11481 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11482 fi
11483 fi
11484
11485 if test $succeeded = yes; then
11486 HAVE_GOBJECT=yes
11487 else
11488 HAVE_GOBJECT=no
11489 fi
11490
11491 if test "$HAVE_GOBJECT" = "yes"; then
11492 SETTINGS_CFLAGS="$SETTINGS_CFLAGS $GOBJECT_CFLAGS"
11493 SETTINGS_LIBS="$SETTINGS_LIBS $GOBJECT_LIBS"
11494 fi
5476a9a4
GM
11495 SAVE_CFLAGS="$CFLAGS"
11496 SAVE_LIBS="$LIBS"
11497 CFLAGS="$SETTINGS_CFLAGS $CFLAGS"
11498 LIBS="$SETTINGS_LIBS $LIBS"
11499 for ac_func in g_type_init
11500do :
11501 ac_fn_c_check_func "$LINENO" "g_type_init" "ac_cv_func_g_type_init"
11502if test "x$ac_cv_func_g_type_init" = x""yes; then :
11503 cat >>confdefs.h <<_ACEOF
11504#define HAVE_G_TYPE_INIT 1
067d23c9 11505_ACEOF
067d23c9 11506
5476a9a4
GM
11507fi
11508done
067d23c9 11509
5476a9a4
GM
11510 CFLAGS="$SAVE_CFLAGS"
11511 LIBS="$SAVE_LIBS"
11512fi
067d23c9 11513
067d23c9 11514
f199cab1 11515
067d23c9 11516
5476a9a4
GM
11517HAVE_LIBSELINUX=no
11518LIBSELINUX_LIBS=
11519if test "${with_selinux}" = "yes"; then
11520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lgetfilecon in -lselinux" >&5
11521$as_echo_n "checking for lgetfilecon in -lselinux... " >&6; }
11522if test "${ac_cv_lib_selinux_lgetfilecon+set}" = set; then :
11523 $as_echo_n "(cached) " >&6
11524else
11525 ac_check_lib_save_LIBS=$LIBS
11526LIBS="-lselinux $LIBS"
11527cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11528/* end confdefs.h. */
067d23c9 11529
5476a9a4
GM
11530/* Override any GCC internal prototype to avoid an error.
11531 Use char because int might match the return type of a GCC
11532 builtin and then its argument prototype would still apply. */
11533#ifdef __cplusplus
11534extern "C"
f199cab1 11535#endif
5476a9a4 11536char lgetfilecon ();
f199cab1
GM
11537int
11538main ()
11539{
5476a9a4 11540return lgetfilecon ();
f199cab1
GM
11541 ;
11542 return 0;
11543}
11544_ACEOF
5476a9a4
GM
11545if ac_fn_c_try_link "$LINENO"; then :
11546 ac_cv_lib_selinux_lgetfilecon=yes
11547else
11548 ac_cv_lib_selinux_lgetfilecon=no
f199cab1 11549fi
5476a9a4
GM
11550rm -f core conftest.err conftest.$ac_objext \
11551 conftest$ac_exeext conftest.$ac_ext
11552LIBS=$ac_check_lib_save_LIBS
11553fi
11554{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_lgetfilecon" >&5
11555$as_echo "$ac_cv_lib_selinux_lgetfilecon" >&6; }
11556if test "x$ac_cv_lib_selinux_lgetfilecon" = x""yes; then :
11557 HAVE_LIBSELINUX=yes
11558else
11559 HAVE_LIBSELINUX=no
067d23c9
KY
11560fi
11561
5476a9a4 11562 if test "$HAVE_LIBSELINUX" = yes; then
067d23c9 11563
5476a9a4 11564$as_echo "#define HAVE_LIBSELINUX 1" >>confdefs.h
067d23c9 11565
5476a9a4
GM
11566 LIBSELINUX_LIBS=-lselinux
11567 fi
f199cab1 11568fi
067d23c9 11569
067d23c9 11570
5476a9a4
GM
11571HAVE_GNUTLS=no
11572HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY=no
11573if test "${with_gnutls}" = "yes" ; then
067d23c9 11574
5476a9a4 11575 succeeded=no
067d23c9 11576
5476a9a4
GM
11577 if test "$PKG_CONFIG" = "no" ; then
11578 HAVE_GNUTLS=no
11579 else
11580 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 11581 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
11582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gnutls >= 2.6.6" >&5
11583$as_echo_n "checking for gnutls >= 2.6.6... " >&6; }
067d23c9 11584
b5591ebb
GM
11585 if "$PKG_CONFIG" --exists "gnutls >= 2.6.6" 2>&5 &&
11586 LIBGNUTLS_CFLAGS=`"$PKG_CONFIG" --cflags "gnutls >= 2.6.6" 2>&5` &&
11587 LIBGNUTLS_LIBS=`"$PKG_CONFIG" --libs "gnutls >= 2.6.6" 2>&5`; then
5476a9a4
GM
11588 edit_cflags="
11589 s,///*,/,g
11590 s/^/ /
11591 s/ -I/ $isystem/g
11592 s/^ //
11593 "
11594 LIBGNUTLS_CFLAGS=`$as_echo "$LIBGNUTLS_CFLAGS" | sed -e "$edit_cflags"`
11595 LIBGNUTLS_LIBS=`$as_echo "$LIBGNUTLS_LIBS" | sed -e 's,///*,/,g'`
11596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBGNUTLS_CFLAGS' LIBS='$LIBGNUTLS_LIBS'" >&5
11597$as_echo "yes CFLAGS='$LIBGNUTLS_CFLAGS' LIBS='$LIBGNUTLS_LIBS'" >&6; }
11598 succeeded=yes
11599 else
11600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11601$as_echo "no" >&6; }
11602 LIBGNUTLS_CFLAGS=""
11603 LIBGNUTLS_LIBS=""
11604 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
11605 ## do set a variable so people can do so. Do it in a subshell
11606 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 11607 LIBGNUTLS_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "gnutls >= 2.6.6") 2>&1`
067d23c9 11608
5476a9a4 11609 fi
067d23c9 11610
067d23c9 11611
067d23c9 11612
5476a9a4
GM
11613 else
11614 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11615 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11616 fi
11617 fi
067d23c9 11618
5476a9a4
GM
11619 if test $succeeded = yes; then
11620 HAVE_GNUTLS=yes
11621 else
11622 HAVE_GNUTLS=no
11623 fi
067d23c9 11624
5476a9a4 11625 if test "${HAVE_GNUTLS}" = "yes"; then
067d23c9 11626
5476a9a4 11627$as_echo "#define HAVE_GNUTLS 1" >>confdefs.h
067d23c9 11628
5476a9a4 11629 fi
f199cab1 11630
5476a9a4
GM
11631 CFLAGS="$CFLAGS $LIBGNUTLS_CFLAGS"
11632 LIBS="$LIBGNUTLS_LIBS $LIBS"
11633 for ac_func in gnutls_certificate_set_verify_function
11634do :
11635 ac_fn_c_check_func "$LINENO" "gnutls_certificate_set_verify_function" "ac_cv_func_gnutls_certificate_set_verify_function"
11636if test "x$ac_cv_func_gnutls_certificate_set_verify_function" = x""yes; then :
11637 cat >>confdefs.h <<_ACEOF
11638#define HAVE_GNUTLS_CERTIFICATE_SET_VERIFY_FUNCTION 1
f199cab1 11639_ACEOF
5476a9a4
GM
11640 HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY=yes
11641fi
11642done
067d23c9
KY
11643
11644
5476a9a4
GM
11645 if test "${HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY}" = "yes"; then
11646
11647$as_echo "#define HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY 1" >>confdefs.h
f527bd02 11648
f199cab1 11649 fi
5476a9a4 11650fi
f527bd02 11651
f527bd02 11652
5476a9a4
GM
11653
11654
b5eb356a
GM
11655if test "${with_inotify}" = "yes"; then
11656 for ac_header in sys/inotify.h
11657do :
11658 ac_fn_c_check_header_mongrel "$LINENO" "sys/inotify.h" "ac_cv_header_sys_inotify_h" "$ac_includes_default"
11659if test "x$ac_cv_header_sys_inotify_h" = x""yes; then :
11660 cat >>confdefs.h <<_ACEOF
11661#define HAVE_SYS_INOTIFY_H 1
11662_ACEOF
11663
11664fi
11665
11666done
11667
11668 if test "$ac_cv_header_sys_inotify_h" = yes ; then
11669 ac_fn_c_check_func "$LINENO" "inotify_init1" "ac_cv_func_inotify_init1"
11670if test "x$ac_cv_func_inotify_init1" = x""yes; then :
11671
11672fi
11673
11674 fi
11675fi
11676if test "$ac_cv_func_inotify_init1" = yes; then
11677
11678$as_echo "#define HAVE_INOTIFY 1" >>confdefs.h
11679
11680fi
11681
5476a9a4
GM
11682HAVE_XAW3D=no
11683LUCID_LIBW=
11684if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then
11685 if test "$with_xaw3d" != no; then
5476a9a4 11686 if test "${emacs_cv_xaw3d+set}" = set; then :
f199cab1
GM
11687 $as_echo_n "(cached) " >&6
11688else
5476a9a4
GM
11689 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11690/* end confdefs.h. */
f527bd02 11691
5476a9a4
GM
11692#include <X11/Intrinsic.h>
11693#include <X11/Xaw3d/Simple.h>
11694int
11695main ()
11696{
11697
11698 ;
11699 return 0;
11700}
11701_ACEOF
11702if ac_fn_c_try_link "$LINENO"; then :
11703 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XawScrollbarSetThumb in -lXaw3d" >&5
11704$as_echo_n "checking for XawScrollbarSetThumb in -lXaw3d... " >&6; }
11705if test "${ac_cv_lib_Xaw3d_XawScrollbarSetThumb+set}" = set; then :
11706 $as_echo_n "(cached) " >&6
11707else
11708 ac_check_lib_save_LIBS=$LIBS
11709LIBS="-lXaw3d $LIBS"
11710cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11711/* end confdefs.h. */
f527bd02 11712
5476a9a4
GM
11713/* Override any GCC internal prototype to avoid an error.
11714 Use char because int might match the return type of a GCC
11715 builtin and then its argument prototype would still apply. */
11716#ifdef __cplusplus
11717extern "C"
11718#endif
11719char XawScrollbarSetThumb ();
11720int
11721main ()
11722{
11723return XawScrollbarSetThumb ();
11724 ;
11725 return 0;
11726}
11727_ACEOF
11728if ac_fn_c_try_link "$LINENO"; then :
11729 ac_cv_lib_Xaw3d_XawScrollbarSetThumb=yes
f199cab1 11730else
5476a9a4 11731 ac_cv_lib_Xaw3d_XawScrollbarSetThumb=no
f199cab1 11732fi
5476a9a4
GM
11733rm -f core conftest.err conftest.$ac_objext \
11734 conftest$ac_exeext conftest.$ac_ext
11735LIBS=$ac_check_lib_save_LIBS
11736fi
11737{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&5
11738$as_echo "$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&6; }
11739if test "x$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" = x""yes; then :
11740 emacs_cv_xaw3d=yes
11741else
11742 emacs_cv_xaw3d=no
f199cab1 11743fi
f527bd02 11744
5476a9a4
GM
11745else
11746 emacs_cv_xaw3d=no
11747fi
11748rm -f core conftest.err conftest.$ac_objext \
11749 conftest$ac_exeext conftest.$ac_ext
11750fi
f527bd02 11751
5476a9a4
GM
11752 else
11753 emacs_cv_xaw3d=no
11754 fi
11755 if test $emacs_cv_xaw3d = yes; then
4fa92495
GM
11756 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xaw3d" >&5
11757$as_echo_n "checking for xaw3d... " >&6; }
5476a9a4
GM
11758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5
11759$as_echo "yes; using Lucid toolkit" >&6; }
11760 USE_X_TOOLKIT=LUCID
11761 HAVE_XAW3D=yes
11762 LUCID_LIBW=-lXaw3d
f527bd02 11763
5476a9a4 11764$as_echo "#define HAVE_XAW3D 1" >>confdefs.h
f527bd02 11765
5476a9a4 11766 else
4fa92495
GM
11767 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xaw3d" >&5
11768$as_echo_n "checking for xaw3d... " >&6; }
5476a9a4
GM
11769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11770$as_echo "no" >&6; }
11771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libXaw" >&5
11772$as_echo_n "checking for libXaw... " >&6; }
11773 if test "${emacs_cv_xaw+set}" = set; then :
f199cab1
GM
11774 $as_echo_n "(cached) " >&6
11775else
11776 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11777/* end confdefs.h. */
067d23c9 11778
5476a9a4
GM
11779#include <X11/Intrinsic.h>
11780#include <X11/Xaw/Simple.h>
f199cab1
GM
11781int
11782main ()
11783{
067d23c9 11784
f199cab1
GM
11785 ;
11786 return 0;
11787}
11788_ACEOF
5476a9a4
GM
11789if ac_fn_c_try_link "$LINENO"; then :
11790 emacs_cv_xaw=yes
f199cab1 11791else
5476a9a4 11792 emacs_cv_xaw=no
f199cab1 11793fi
5476a9a4
GM
11794rm -f core conftest.err conftest.$ac_objext \
11795 conftest$ac_exeext conftest.$ac_ext
f199cab1 11796fi
067d23c9 11797
5476a9a4
GM
11798 if test $emacs_cv_xaw = yes; then
11799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5
11800$as_echo "yes; using Lucid toolkit" >&6; }
11801 USE_X_TOOLKIT=LUCID
11802 LUCID_LIBW=-lXaw
11803 elif test x"${USE_X_TOOLKIT}" = xLUCID; then
11804 as_fn_error "Lucid toolkit requires X11/Xaw include files" "$LINENO" 5
f199cab1 11805 else
5476a9a4
GM
11806 as_fn_error "No X toolkit could be found.
11807If you are sure you want Emacs compiled without an X toolkit, pass
11808 --with-x-toolkit=no
11809to configure. Otherwise, install the development libraries for the toolkit
11810that you want to use (e.g. Gtk+) and re-run configure." "$LINENO" 5
f199cab1 11811 fi
5476a9a4
GM
11812 fi
11813fi
067d23c9 11814
5476a9a4 11815X_TOOLKIT_TYPE=$USE_X_TOOLKIT
067d23c9 11816
5476a9a4
GM
11817LIBXTR6=
11818if test "${USE_X_TOOLKIT}" != "none"; then
11819 { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 toolkit version" >&5
11820$as_echo_n "checking X11 toolkit version... " >&6; }
11821 if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then :
f199cab1
GM
11822 $as_echo_n "(cached) " >&6
11823else
5476a9a4 11824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 11825/* end confdefs.h. */
5476a9a4 11826#include <X11/Intrinsic.h>
f199cab1
GM
11827int
11828main ()
11829{
5476a9a4
GM
11830#if XtSpecificationRelease < 6
11831fail;
11832#endif
f527bd02 11833
f199cab1
GM
11834 ;
11835 return 0;
11836}
067d23c9 11837_ACEOF
5476a9a4
GM
11838if ac_fn_c_try_link "$LINENO"; then :
11839 emacs_cv_x11_toolkit_version_6=yes
11840else
11841 emacs_cv_x11_toolkit_version_6=no
067d23c9 11842fi
5476a9a4
GM
11843rm -f core conftest.err conftest.$ac_objext \
11844 conftest$ac_exeext conftest.$ac_ext
067d23c9
KY
11845fi
11846
5476a9a4
GM
11847 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
11848 if test $emacs_cv_x11_toolkit_version_6 = yes; then
11849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5
11850$as_echo "6 or newer" >&6; }
f527bd02 11851
5476a9a4 11852$as_echo "#define HAVE_X11XTR6 1" >>confdefs.h
f527bd02 11853
5476a9a4
GM
11854 LIBXTR6="-lSM -lICE"
11855 case "$opsys" in
11856 ## Use libw.a along with X11R6 Xt.
11857 unixware) LIBXTR6="$LIBXTR6 -lw" ;;
11858 esac
11859 else
11860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5
11861$as_echo "before 6" >&6; }
f199cab1 11862 fi
f527bd02 11863
5476a9a4
GM
11864 OLDLIBS="$LIBS"
11865 if test x$HAVE_X11XTR6 = xyes; then
11866 LIBS="-lXt -lSM -lICE $LIBS"
11867 else
11868 LIBS="-lXt $LIBS"
11869 fi
11870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XmuConvertStandardSelection in -lXmu" >&5
11871$as_echo_n "checking for XmuConvertStandardSelection in -lXmu... " >&6; }
11872if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then :
11873 $as_echo_n "(cached) " >&6
11874else
11875 ac_check_lib_save_LIBS=$LIBS
11876LIBS="-lXmu $LIBS"
11877cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11878/* end confdefs.h. */
f199cab1 11879
5476a9a4
GM
11880/* Override any GCC internal prototype to avoid an error.
11881 Use char because int might match the return type of a GCC
11882 builtin and then its argument prototype would still apply. */
11883#ifdef __cplusplus
11884extern "C"
11885#endif
11886char XmuConvertStandardSelection ();
067d23c9
KY
11887int
11888main ()
11889{
5476a9a4 11890return XmuConvertStandardSelection ();
067d23c9
KY
11891 ;
11892 return 0;
11893}
11894_ACEOF
5476a9a4
GM
11895if ac_fn_c_try_link "$LINENO"; then :
11896 ac_cv_lib_Xmu_XmuConvertStandardSelection=yes
11897else
11898 ac_cv_lib_Xmu_XmuConvertStandardSelection=no
067d23c9 11899fi
5476a9a4
GM
11900rm -f core conftest.err conftest.$ac_objext \
11901 conftest$ac_exeext conftest.$ac_ext
11902LIBS=$ac_check_lib_save_LIBS
067d23c9 11903fi
5476a9a4
GM
11904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5
11905$as_echo "$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6; }
11906if test "x$ac_cv_lib_Xmu_XmuConvertStandardSelection" = x""yes; then :
11907 cat >>confdefs.h <<_ACEOF
11908#define HAVE_LIBXMU 1
f199cab1
GM
11909_ACEOF
11910
5476a9a4 11911 LIBS="-lXmu $LIBS"
f199cab1 11912
067d23c9
KY
11913fi
11914
5476a9a4
GM
11915 test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
11916 fi
067d23c9 11917
067d23c9 11918
5476a9a4
GM
11919LIBXMU=-lXmu
11920case $opsys in
11921 ## These systems don't supply Xmu.
11922 hpux* | aix4-2 )
11923 test "X$ac_cv_lib_Xmu_XmuConvertStandardSelection" != "Xyes" && LIBXMU=
11924 ;;
11925esac
067d23c9
KY
11926
11927
5476a9a4
GM
11928# On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
11929if test "${HAVE_X11}" = "yes"; then
11930 if test "${USE_X_TOOLKIT}" != "none"; then
11931 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XShapeQueryExtension in -lXext" >&5
11932$as_echo_n "checking for XShapeQueryExtension in -lXext... " >&6; }
11933if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then :
f199cab1
GM
11934 $as_echo_n "(cached) " >&6
11935else
5476a9a4
GM
11936 ac_check_lib_save_LIBS=$LIBS
11937LIBS="-lXext $LIBS"
11938cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 11939/* end confdefs.h. */
f199cab1 11940
5476a9a4
GM
11941/* Override any GCC internal prototype to avoid an error.
11942 Use char because int might match the return type of a GCC
11943 builtin and then its argument prototype would still apply. */
11944#ifdef __cplusplus
11945extern "C"
11946#endif
11947char XShapeQueryExtension ();
11948int
11949main ()
11950{
11951return XShapeQueryExtension ();
11952 ;
11953 return 0;
11954}
e7d4e61f 11955_ACEOF
5476a9a4
GM
11956if ac_fn_c_try_link "$LINENO"; then :
11957 ac_cv_lib_Xext_XShapeQueryExtension=yes
11958else
11959 ac_cv_lib_Xext_XShapeQueryExtension=no
067d23c9 11960fi
5476a9a4
GM
11961rm -f core conftest.err conftest.$ac_objext \
11962 conftest$ac_exeext conftest.$ac_ext
11963LIBS=$ac_check_lib_save_LIBS
11964fi
11965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
11966$as_echo "$ac_cv_lib_Xext_XShapeQueryExtension" >&6; }
11967if test "x$ac_cv_lib_Xext_XShapeQueryExtension" = x""yes; then :
11968 cat >>confdefs.h <<_ACEOF
11969#define HAVE_LIBXEXT 1
11970_ACEOF
f199cab1 11971
5476a9a4 11972 LIBS="-lXext $LIBS"
f199cab1 11973
5476a9a4 11974fi
f199cab1 11975
5476a9a4
GM
11976 fi
11977fi
f199cab1 11978
5476a9a4
GM
11979LIBXP=
11980if test "${USE_X_TOOLKIT}" = "MOTIF"; then
8ad96b1d
GM
11981 # OpenMotif may be installed in such a way on some GNU/Linux systems.
11982 if test -d /usr/include/openmotif; then
11983 CPPFLAGS="-I/usr/include/openmotif $CPPFLAGS"
11984 emacs_cv_openmotif=yes
11985 case "$canonical" in
11986 x86_64-*-linux-gnu* | powerpc64-*-linux-gnu* | sparc64-*-linux-gnu*)
11987 test -d /usr/lib64/openmotif && LDFLAGS="-L/usr/lib64/openmotif $LDFLAGS"
11988 ;;
11989 *)
11990 test -d /usr/lib/openmotif && LDFLAGS="-L/usr/lib/openmotif $LDFLAGS"
11991 esac
11992 else
11993 emacs_cv_openmotif=no
11994 fi
11995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for (Open)Motif version 2.1" >&5
11996$as_echo_n "checking for (Open)Motif version 2.1... " >&6; }
5476a9a4 11997if test "${emacs_cv_motif_version_2_1+set}" = set; then :
ae1362a3
AS
11998 $as_echo_n "(cached) " >&6
11999else
f199cab1
GM
12000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12001/* end confdefs.h. */
5476a9a4
GM
12002#include <Xm/Xm.h>
12003int
12004main ()
12005{
12006#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
12007int x = 5;
12008#else
12009Motif version prior to 2.1.
12010#endif
12011 ;
12012 return 0;
12013}
12014_ACEOF
12015if ac_fn_c_try_compile "$LINENO"; then :
12016 emacs_cv_motif_version_2_1=yes
12017else
12018 emacs_cv_motif_version_2_1=no
12019fi
12020rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12021fi
12022{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_motif_version_2_1" >&5
12023$as_echo "$emacs_cv_motif_version_2_1" >&6; }
12024 if test $emacs_cv_motif_version_2_1 = yes; then
12025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpCreateContext in -lXp" >&5
12026$as_echo_n "checking for XpCreateContext in -lXp... " >&6; }
12027if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then :
12028 $as_echo_n "(cached) " >&6
12029else
12030 ac_check_lib_save_LIBS=$LIBS
12031LIBS="-lXp $LIBS"
12032cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12033/* end confdefs.h. */
f199cab1 12034
5476a9a4
GM
12035/* Override any GCC internal prototype to avoid an error.
12036 Use char because int might match the return type of a GCC
12037 builtin and then its argument prototype would still apply. */
12038#ifdef __cplusplus
12039extern "C"
12040#endif
12041char XpCreateContext ();
ae1362a3
AS
12042int
12043main ()
12044{
5476a9a4 12045return XpCreateContext ();
ae1362a3
AS
12046 ;
12047 return 0;
12048}
12049_ACEOF
5476a9a4
GM
12050if ac_fn_c_try_link "$LINENO"; then :
12051 ac_cv_lib_Xp_XpCreateContext=yes
067d23c9 12052else
5476a9a4 12053 ac_cv_lib_Xp_XpCreateContext=no
067d23c9 12054fi
5476a9a4
GM
12055rm -f core conftest.err conftest.$ac_objext \
12056 conftest$ac_exeext conftest.$ac_ext
12057LIBS=$ac_check_lib_save_LIBS
12058fi
12059{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xp_XpCreateContext" >&5
12060$as_echo "$ac_cv_lib_Xp_XpCreateContext" >&6; }
12061if test "x$ac_cv_lib_Xp_XpCreateContext" = x""yes; then :
12062 LIBXP=-lXp
067d23c9 12063fi
f199cab1 12064
8ad96b1d
GM
12065 if test x$emacs_cv_openmotif = xyes; then
12066 REAL_CPPFLAGS="-I/usr/include/openmotif $REAL_CPPFLAGS"
12067 fi
5476a9a4
GM
12068 else
12069 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LessTif where some systems put it" >&5
12070$as_echo_n "checking for LessTif where some systems put it... " >&6; }
12071if test "${emacs_cv_lesstif+set}" = set; then :
067d23c9 12072 $as_echo_n "(cached) " >&6
f199cab1 12073else
5476a9a4
GM
12074 # We put this in CFLAGS temporarily to precede other -I options
12075 # that might be in CFLAGS temporarily.
12076 # We put this in CPPFLAGS where it precedes the other -I options.
12077 OLD_CPPFLAGS=$CPPFLAGS
12078 OLD_CFLAGS=$CFLAGS
12079 CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS"
12080 CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS"
12081 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 12082/* end confdefs.h. */
5476a9a4 12083#include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h>
067d23c9
KY
12084int
12085main ()
12086{
5476a9a4 12087int x = 5;
067d23c9
KY
12088 ;
12089 return 0;
12090}
12091_ACEOF
5476a9a4
GM
12092if ac_fn_c_try_compile "$LINENO"; then :
12093 emacs_cv_lesstif=yes
067d23c9 12094else
5476a9a4 12095 emacs_cv_lesstif=no
067d23c9 12096fi
5476a9a4 12097rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
067d23c9 12098fi
5476a9a4
GM
12099{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_lesstif" >&5
12100$as_echo "$emacs_cv_lesstif" >&6; }
12101 if test $emacs_cv_lesstif = yes; then
12102 # Make sure this -I option remains in CPPFLAGS after it is set
12103 # back to REAL_CPPFLAGS.
12104 # There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not
12105 # have those other -I options anyway. Ultimately, having this
12106 # directory ultimately in CPPFLAGS will be enough.
12107 REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS"
12108 LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS"
12109 else
12110 CFLAGS=$OLD_CFLAGS
12111 CPPFLAGS=$OLD_CPPFLAGS
12112 fi
12113 fi
12114 ac_fn_c_check_header_mongrel "$LINENO" "Xm/BulletinB.h" "ac_cv_header_Xm_BulletinB_h" "$ac_includes_default"
12115if test "x$ac_cv_header_Xm_BulletinB_h" = x""yes; then :
067d23c9 12116
5476a9a4
GM
12117else
12118 as_fn_error "Motif toolkit requested but requirements not found." "$LINENO" 5
067d23c9 12119fi
f199cab1
GM
12120
12121
5476a9a4 12122fi
f199cab1
GM
12123
12124
5476a9a4
GM
12125USE_TOOLKIT_SCROLL_BARS=no
12126if test "${with_toolkit_scroll_bars}" != "no"; then
12127 if test "${USE_X_TOOLKIT}" != "none"; then
12128 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
12129 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
f199cab1 12130
5476a9a4
GM
12131 HAVE_XAW3D=no
12132 USE_TOOLKIT_SCROLL_BARS=yes
12133 elif test "${HAVE_XAW3D}" = "yes" || test "${USE_X_TOOLKIT}" = "LUCID"; then
12134 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
f199cab1 12135
5476a9a4
GM
12136 USE_TOOLKIT_SCROLL_BARS=yes
12137 fi
12138 elif test "${HAVE_GTK}" = "yes"; then
12139 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
f199cab1 12140
5476a9a4
GM
12141 USE_TOOLKIT_SCROLL_BARS=yes
12142 elif test "${HAVE_NS}" = "yes"; then
12143 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
f199cab1 12144
5c0255d9
GM
12145 USE_TOOLKIT_SCROLL_BARS=yes
12146 elif test "${HAVE_W32}" = "yes"; then
12147 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
12148
5476a9a4
GM
12149 USE_TOOLKIT_SCROLL_BARS=yes
12150 fi
12151fi
f199cab1 12152
5476a9a4 12153cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 12154/* end confdefs.h. */
5476a9a4
GM
12155
12156 #include <X11/Xlib.h>
12157 #include <X11/Xresource.h>
067d23c9
KY
12158int
12159main ()
12160{
5476a9a4 12161XIMProc callback;
067d23c9
KY
12162 ;
12163 return 0;
12164}
12165_ACEOF
f199cab1 12166if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4
GM
12167 HAVE_XIM=yes
12168
12169$as_echo "#define HAVE_XIM 1" >>confdefs.h
12170
067d23c9 12171else
5476a9a4 12172 HAVE_XIM=no
067d23c9 12173fi
f199cab1 12174rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 12175
f199cab1 12176
5476a9a4
GM
12177if test "${with_xim}" != "no"; then
12178
12179$as_echo "#define USE_XIM 1" >>confdefs.h
12180
12181fi
12182
12183
12184if test "${HAVE_XIM}" != "no"; then
12185 late_CFLAGS=$CFLAGS
12186 if test "$GCC" = yes; then
12187 CFLAGS="$CFLAGS --pedantic-errors"
12188 fi
12189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12190/* end confdefs.h. */
f199cab1 12191
5476a9a4
GM
12192#include <X11/Xlib.h>
12193#include <X11/Xresource.h>
12194int
12195main ()
12196{
12197Display *display;
12198XrmDatabase db;
12199char *res_name;
12200char *res_class;
12201XIMProc callback;
12202XPointer *client_data;
12203#ifndef __GNUC__
12204/* If we're not using GCC, it's probably not XFree86, and this is
12205 probably right, but we can't use something like --pedantic-errors. */
12206extern Bool XRegisterIMInstantiateCallback(Display*, XrmDatabase, char*,
12207 char*, XIMProc, XPointer*);
12208#endif
12209(void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, callback,
12210 client_data);
067d23c9
KY
12211 ;
12212 return 0;
12213}
12214_ACEOF
5476a9a4
GM
12215if ac_fn_c_try_compile "$LINENO"; then :
12216 emacs_cv_arg6_star=yes
067d23c9 12217fi
f199cab1 12218rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5476a9a4
GM
12219 if test "$emacs_cv_arg6_star" = yes; then
12220 $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer*" >>confdefs.h
12221
12222 else
12223 $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer" >>confdefs.h
067d23c9 12224
5476a9a4
GM
12225 fi
12226 CFLAGS=$late_CFLAGS
067d23c9
KY
12227fi
12228
5476a9a4
GM
12229### Start of font-backend (under any platform) section.
12230# (nothing here yet -- this is a placeholder)
12231### End of font-backend (under any platform) section.
067d23c9 12232
5476a9a4
GM
12233### Start of font-backend (under X11) section.
12234if test "${HAVE_X11}" = "yes"; then
067d23c9 12235
5476a9a4 12236 succeeded=no
067d23c9 12237
5476a9a4
GM
12238 if test "$PKG_CONFIG" = "no" ; then
12239 HAVE_FC=no
12240 else
12241 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 12242 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
12243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fontconfig >= 2.2.0" >&5
12244$as_echo_n "checking for fontconfig >= 2.2.0... " >&6; }
f199cab1 12245
b5591ebb
GM
12246 if "$PKG_CONFIG" --exists "fontconfig >= 2.2.0" 2>&5 &&
12247 FONTCONFIG_CFLAGS=`"$PKG_CONFIG" --cflags "fontconfig >= 2.2.0" 2>&5` &&
12248 FONTCONFIG_LIBS=`"$PKG_CONFIG" --libs "fontconfig >= 2.2.0" 2>&5`; then
5476a9a4
GM
12249 edit_cflags="
12250 s,///*,/,g
12251 s/^/ /
12252 s/ -I/ $isystem/g
12253 s/^ //
12254 "
12255 FONTCONFIG_CFLAGS=`$as_echo "$FONTCONFIG_CFLAGS" | sed -e "$edit_cflags"`
12256 FONTCONFIG_LIBS=`$as_echo "$FONTCONFIG_LIBS" | sed -e 's,///*,/,g'`
12257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$FONTCONFIG_CFLAGS' LIBS='$FONTCONFIG_LIBS'" >&5
12258$as_echo "yes CFLAGS='$FONTCONFIG_CFLAGS' LIBS='$FONTCONFIG_LIBS'" >&6; }
12259 succeeded=yes
12260 else
12261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12262$as_echo "no" >&6; }
12263 FONTCONFIG_CFLAGS=""
12264 FONTCONFIG_LIBS=""
12265 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
12266 ## do set a variable so people can do so. Do it in a subshell
12267 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 12268 FONTCONFIG_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "fontconfig >= 2.2.0") 2>&1`
f199cab1 12269
5476a9a4 12270 fi
f199cab1
GM
12271
12272
12273
f199cab1 12274 else
5476a9a4
GM
12275 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12276 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12277 fi
12278 fi
f199cab1 12279
5476a9a4
GM
12280 if test $succeeded = yes; then
12281 HAVE_FC=yes
12282 else
12283 HAVE_FC=no
12284 fi
f199cab1 12285
067d23c9 12286
5476a9a4
GM
12287 ## Use -lXft if available, unless `--with-xft=no'.
12288 HAVE_XFT=maybe
12289 if test "${HAVE_FC}" = "no" || test "x${with_x}" = "xno"; then
12290 with_xft="no";
12291 fi
12292 if test "x${with_xft}" != "xno"; then
f199cab1 12293
f199cab1 12294
5476a9a4 12295 succeeded=no
f199cab1 12296
5476a9a4
GM
12297 if test "$PKG_CONFIG" = "no" ; then
12298 HAVE_XFT=no
12299 else
12300 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 12301 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
12302 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xft >= 0.13.0" >&5
12303$as_echo_n "checking for xft >= 0.13.0... " >&6; }
f199cab1 12304
b5591ebb
GM
12305 if "$PKG_CONFIG" --exists "xft >= 0.13.0" 2>&5 &&
12306 XFT_CFLAGS=`"$PKG_CONFIG" --cflags "xft >= 0.13.0" 2>&5` &&
12307 XFT_LIBS=`"$PKG_CONFIG" --libs "xft >= 0.13.0" 2>&5`; then
5476a9a4
GM
12308 edit_cflags="
12309 s,///*,/,g
12310 s/^/ /
12311 s/ -I/ $isystem/g
12312 s/^ //
12313 "
12314 XFT_CFLAGS=`$as_echo "$XFT_CFLAGS" | sed -e "$edit_cflags"`
12315 XFT_LIBS=`$as_echo "$XFT_LIBS" | sed -e 's,///*,/,g'`
12316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$XFT_CFLAGS' LIBS='$XFT_LIBS'" >&5
12317$as_echo "yes CFLAGS='$XFT_CFLAGS' LIBS='$XFT_LIBS'" >&6; }
12318 succeeded=yes
12319 else
12320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12321$as_echo "no" >&6; }
12322 XFT_CFLAGS=""
12323 XFT_LIBS=""
12324 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
12325 ## do set a variable so people can do so. Do it in a subshell
12326 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 12327 XFT_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "xft >= 0.13.0") 2>&1`
f199cab1 12328
5476a9a4 12329 fi
f199cab1
GM
12330
12331
12332
5476a9a4
GM
12333 else
12334 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12335 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12336 fi
12337 fi
f199cab1 12338
5476a9a4
GM
12339 if test $succeeded = yes; then
12340 :
f199cab1 12341 else
5476a9a4 12342 HAVE_XFT=no
f199cab1
GM
12343 fi
12344
5476a9a4
GM
12345 ## Because xftfont.c uses XRenderQueryExtension, we also
12346 ## need to link to -lXrender.
12347 HAVE_XRENDER=no
12348 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRenderQueryExtension in -lXrender" >&5
12349$as_echo_n "checking for XRenderQueryExtension in -lXrender... " >&6; }
12350if test "${ac_cv_lib_Xrender_XRenderQueryExtension+set}" = set; then :
12351 $as_echo_n "(cached) " >&6
12352else
12353 ac_check_lib_save_LIBS=$LIBS
12354LIBS="-lXrender $LIBS"
12355cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12356/* end confdefs.h. */
f199cab1 12357
5476a9a4
GM
12358/* Override any GCC internal prototype to avoid an error.
12359 Use char because int might match the return type of a GCC
12360 builtin and then its argument prototype would still apply. */
12361#ifdef __cplusplus
12362extern "C"
12363#endif
12364char XRenderQueryExtension ();
12365int
12366main ()
12367{
12368return XRenderQueryExtension ();
12369 ;
12370 return 0;
12371}
12372_ACEOF
12373if ac_fn_c_try_link "$LINENO"; then :
12374 ac_cv_lib_Xrender_XRenderQueryExtension=yes
12375else
12376 ac_cv_lib_Xrender_XRenderQueryExtension=no
12377fi
12378rm -f core conftest.err conftest.$ac_objext \
12379 conftest$ac_exeext conftest.$ac_ext
12380LIBS=$ac_check_lib_save_LIBS
12381fi
12382{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrender_XRenderQueryExtension" >&5
12383$as_echo "$ac_cv_lib_Xrender_XRenderQueryExtension" >&6; }
12384if test "x$ac_cv_lib_Xrender_XRenderQueryExtension" = x""yes; then :
12385 HAVE_XRENDER=yes
12386fi
f199cab1 12387
5476a9a4
GM
12388 if test "$HAVE_XFT" != no && test "$HAVE_XRENDER" != no; then
12389 OLD_CPPFLAGS="$CPPFLAGS"
12390 OLD_CFLAGS="$CFLAGS"
12391 OLD_LIBS="$LIBS"
12392 CPPFLAGS="$CPPFLAGS $XFT_CFLAGS"
12393 CFLAGS="$CFLAGS $XFT_CFLAGS"
12394 XFT_LIBS="-lXrender $XFT_LIBS"
12395 LIBS="$XFT_LIBS $LIBS"
12396 ac_fn_c_check_header_mongrel "$LINENO" "X11/Xft/Xft.h" "ac_cv_header_X11_Xft_Xft_h" "$ac_includes_default"
12397if test "x$ac_cv_header_X11_Xft_Xft_h" = x""yes; then :
12398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XftFontOpen in -lXft" >&5
12399$as_echo_n "checking for XftFontOpen in -lXft... " >&6; }
12400if test "${ac_cv_lib_Xft_XftFontOpen+set}" = set; then :
12401 $as_echo_n "(cached) " >&6
12402else
12403 ac_check_lib_save_LIBS=$LIBS
12404LIBS="-lXft $XFT_LIBS $LIBS"
12405cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12406/* end confdefs.h. */
f199cab1 12407
5476a9a4
GM
12408/* Override any GCC internal prototype to avoid an error.
12409 Use char because int might match the return type of a GCC
12410 builtin and then its argument prototype would still apply. */
12411#ifdef __cplusplus
12412extern "C"
12413#endif
12414char XftFontOpen ();
12415int
12416main ()
12417{
12418return XftFontOpen ();
12419 ;
12420 return 0;
12421}
067d23c9 12422_ACEOF
5476a9a4
GM
12423if ac_fn_c_try_link "$LINENO"; then :
12424 ac_cv_lib_Xft_XftFontOpen=yes
12425else
12426 ac_cv_lib_Xft_XftFontOpen=no
12427fi
12428rm -f core conftest.err conftest.$ac_objext \
12429 conftest$ac_exeext conftest.$ac_ext
12430LIBS=$ac_check_lib_save_LIBS
12431fi
12432{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xft_XftFontOpen" >&5
12433$as_echo "$ac_cv_lib_Xft_XftFontOpen" >&6; }
12434if test "x$ac_cv_lib_Xft_XftFontOpen" = x""yes; then :
12435 HAVE_XFT=yes
f199cab1
GM
12436fi
12437
5476a9a4 12438fi
f199cab1
GM
12439
12440
f199cab1 12441
5476a9a4 12442 if test "${HAVE_XFT}" = "yes"; then
f199cab1 12443
5476a9a4 12444$as_echo "#define HAVE_XFT 1" >>confdefs.h
f199cab1 12445
067d23c9 12446
5476a9a4
GM
12447 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $XFT_CFLAGS"
12448 else
12449 CPPFLAGS="$OLD_CPPFLAGS"
12450 CFLAGS="$OLD_CFLAGS"
12451 LIBS="$OLD_LIBS"
12452 fi # "${HAVE_XFT}" = "yes"
12453 fi # "$HAVE_XFT" != no
12454 fi # "x${with_xft}" != "xno"
f199cab1 12455
5476a9a4
GM
12456 ## We used to allow building with FreeType and without Xft.
12457 ## However, the ftx font backend driver is not in good shape.
12458 if test "$HAVE_XFT" != "yes"; then
12459 HAVE_XFT=no
12460 HAVE_FREETYPE=no
12461 else
f199cab1 12462
5476a9a4 12463 succeeded=no
f199cab1 12464
5476a9a4
GM
12465 if test "$PKG_CONFIG" = "no" ; then
12466 HAVE_FREETYPE=no
12467 else
12468 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 12469 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
12470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype2" >&5
12471$as_echo_n "checking for freetype2... " >&6; }
f199cab1 12472
b5591ebb
GM
12473 if "$PKG_CONFIG" --exists "freetype2" 2>&5 &&
12474 FREETYPE_CFLAGS=`"$PKG_CONFIG" --cflags "freetype2" 2>&5` &&
12475 FREETYPE_LIBS=`"$PKG_CONFIG" --libs "freetype2" 2>&5`; then
5476a9a4
GM
12476 edit_cflags="
12477 s,///*,/,g
12478 s/^/ /
12479 s/ -I/ $isystem/g
12480 s/^ //
12481 "
12482 FREETYPE_CFLAGS=`$as_echo "$FREETYPE_CFLAGS" | sed -e "$edit_cflags"`
12483 FREETYPE_LIBS=`$as_echo "$FREETYPE_LIBS" | sed -e 's,///*,/,g'`
12484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$FREETYPE_CFLAGS' LIBS='$FREETYPE_LIBS'" >&5
12485$as_echo "yes CFLAGS='$FREETYPE_CFLAGS' LIBS='$FREETYPE_LIBS'" >&6; }
12486 succeeded=yes
12487 else
12488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12489$as_echo "no" >&6; }
12490 FREETYPE_CFLAGS=""
12491 FREETYPE_LIBS=""
12492 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
12493 ## do set a variable so people can do so. Do it in a subshell
12494 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 12495 FREETYPE_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "freetype2") 2>&1`
f199cab1 12496
5476a9a4 12497 fi
f199cab1 12498
f199cab1 12499
067d23c9 12500
5476a9a4
GM
12501 else
12502 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12503 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12504 fi
067d23c9 12505 fi
f199cab1 12506
5476a9a4
GM
12507 if test $succeeded = yes; then
12508 HAVE_FREETYPE=yes
12509 else
12510 HAVE_FREETYPE=no
12511 fi
f199cab1 12512
f199cab1 12513
5476a9a4
GM
12514 test "$HAVE_FREETYPE" = "no" && as_fn_error "libxft requires libfreetype" "$LINENO" 5
12515 fi
f199cab1 12516
5476a9a4
GM
12517 HAVE_LIBOTF=no
12518 if test "${HAVE_FREETYPE}" = "yes"; then
f199cab1 12519
5476a9a4 12520$as_echo "#define HAVE_FREETYPE 1" >>confdefs.h
f199cab1 12521
5476a9a4 12522 if test "${with_libotf}" != "no"; then
f199cab1 12523
5476a9a4 12524 succeeded=no
f199cab1 12525
5476a9a4
GM
12526 if test "$PKG_CONFIG" = "no" ; then
12527 HAVE_LIBOTF=no
12528 else
12529 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 12530 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
12531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libotf" >&5
12532$as_echo_n "checking for libotf... " >&6; }
f199cab1 12533
b5591ebb
GM
12534 if "$PKG_CONFIG" --exists "libotf" 2>&5 &&
12535 LIBOTF_CFLAGS=`"$PKG_CONFIG" --cflags "libotf" 2>&5` &&
12536 LIBOTF_LIBS=`"$PKG_CONFIG" --libs "libotf" 2>&5`; then
5476a9a4
GM
12537 edit_cflags="
12538 s,///*,/,g
12539 s/^/ /
12540 s/ -I/ $isystem/g
12541 s/^ //
12542 "
12543 LIBOTF_CFLAGS=`$as_echo "$LIBOTF_CFLAGS" | sed -e "$edit_cflags"`
12544 LIBOTF_LIBS=`$as_echo "$LIBOTF_LIBS" | sed -e 's,///*,/,g'`
12545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBOTF_CFLAGS' LIBS='$LIBOTF_LIBS'" >&5
12546$as_echo "yes CFLAGS='$LIBOTF_CFLAGS' LIBS='$LIBOTF_LIBS'" >&6; }
12547 succeeded=yes
12548 else
12549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12550$as_echo "no" >&6; }
12551 LIBOTF_CFLAGS=""
12552 LIBOTF_LIBS=""
12553 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
12554 ## do set a variable so people can do so. Do it in a subshell
12555 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 12556 LIBOTF_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "libotf") 2>&1`
067d23c9 12557
5476a9a4 12558 fi
f199cab1
GM
12559
12560
067d23c9 12561
5476a9a4
GM
12562 else
12563 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12564 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12565 fi
12566 fi
f199cab1 12567
5476a9a4
GM
12568 if test $succeeded = yes; then
12569 HAVE_LIBOTF=yes
12570 else
12571 HAVE_LIBOTF=no
12572 fi
f199cab1 12573
5476a9a4 12574 if test "$HAVE_LIBOTF" = "yes"; then
f199cab1 12575
5476a9a4 12576$as_echo "#define HAVE_LIBOTF 1" >>confdefs.h
f199cab1 12577
5476a9a4
GM
12578 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTF_get_variation_glyphs in -lotf" >&5
12579$as_echo_n "checking for OTF_get_variation_glyphs in -lotf... " >&6; }
12580if test "${ac_cv_lib_otf_OTF_get_variation_glyphs+set}" = set; then :
067d23c9
KY
12581 $as_echo_n "(cached) " >&6
12582else
5476a9a4
GM
12583 ac_check_lib_save_LIBS=$LIBS
12584LIBS="-lotf $LIBS"
12585cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 12586/* end confdefs.h. */
5476a9a4
GM
12587
12588/* Override any GCC internal prototype to avoid an error.
12589 Use char because int might match the return type of a GCC
12590 builtin and then its argument prototype would still apply. */
12591#ifdef __cplusplus
12592extern "C"
12593#endif
12594char OTF_get_variation_glyphs ();
067d23c9
KY
12595int
12596main ()
12597{
5476a9a4 12598return OTF_get_variation_glyphs ();
067d23c9
KY
12599 ;
12600 return 0;
12601}
12602_ACEOF
5476a9a4
GM
12603if ac_fn_c_try_link "$LINENO"; then :
12604 ac_cv_lib_otf_OTF_get_variation_glyphs=yes
067d23c9 12605else
5476a9a4 12606 ac_cv_lib_otf_OTF_get_variation_glyphs=no
067d23c9 12607fi
5476a9a4
GM
12608rm -f core conftest.err conftest.$ac_objext \
12609 conftest$ac_exeext conftest.$ac_ext
12610LIBS=$ac_check_lib_save_LIBS
12611fi
12612{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_otf_OTF_get_variation_glyphs" >&5
12613$as_echo "$ac_cv_lib_otf_OTF_get_variation_glyphs" >&6; }
12614if test "x$ac_cv_lib_otf_OTF_get_variation_glyphs" = x""yes; then :
12615 HAVE_OTF_GET_VARIATION_GLYPHS=yes
12616else
12617 HAVE_OTF_GET_VARIATION_GLYPHS=no
067d23c9 12618fi
067d23c9 12619
5476a9a4
GM
12620 if test "${HAVE_OTF_GET_VARIATION_GLYPHS}" = "yes"; then
12621
12622$as_echo "#define HAVE_OTF_GET_VARIATION_GLYPHS 1" >>confdefs.h
12623
12624 fi
12625 fi
12626 fi
12627 fi
12628
12629 HAVE_M17N_FLT=no
12630 if test "${HAVE_LIBOTF}" = yes; then
12631 if test "${with_m17n_flt}" != "no"; then
12632
12633 succeeded=no
12634
12635 if test "$PKG_CONFIG" = "no" ; then
12636 HAVE_M17N_FLT=no
12637 else
12638 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 12639 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
12640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for m17n-flt" >&5
12641$as_echo_n "checking for m17n-flt... " >&6; }
12642
b5591ebb
GM
12643 if "$PKG_CONFIG" --exists "m17n-flt" 2>&5 &&
12644 M17N_FLT_CFLAGS=`"$PKG_CONFIG" --cflags "m17n-flt" 2>&5` &&
12645 M17N_FLT_LIBS=`"$PKG_CONFIG" --libs "m17n-flt" 2>&5`; then
5476a9a4
GM
12646 edit_cflags="
12647 s,///*,/,g
12648 s/^/ /
12649 s/ -I/ $isystem/g
12650 s/^ //
12651 "
12652 M17N_FLT_CFLAGS=`$as_echo "$M17N_FLT_CFLAGS" | sed -e "$edit_cflags"`
12653 M17N_FLT_LIBS=`$as_echo "$M17N_FLT_LIBS" | sed -e 's,///*,/,g'`
12654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$M17N_FLT_CFLAGS' LIBS='$M17N_FLT_LIBS'" >&5
12655$as_echo "yes CFLAGS='$M17N_FLT_CFLAGS' LIBS='$M17N_FLT_LIBS'" >&6; }
12656 succeeded=yes
12657 else
12658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12659$as_echo "no" >&6; }
12660 M17N_FLT_CFLAGS=""
12661 M17N_FLT_LIBS=""
12662 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
12663 ## do set a variable so people can do so. Do it in a subshell
12664 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 12665 M17N_FLT_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "m17n-flt") 2>&1`
5476a9a4
GM
12666
12667 fi
12668
12669
067d23c9 12670
5476a9a4
GM
12671 else
12672 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12673 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12674 fi
f199cab1 12675 fi
067d23c9 12676
5476a9a4
GM
12677 if test $succeeded = yes; then
12678 HAVE_M17N_FLT=yes
12679 else
12680 HAVE_M17N_FLT=no
12681 fi
12682
12683 if test "$HAVE_M17N_FLT" = "yes"; then
12684
12685$as_echo "#define HAVE_M17N_FLT 1" >>confdefs.h
12686
12687 fi
12688 fi
12689 fi
12690else
12691 HAVE_XFT=no
12692 HAVE_FREETYPE=no
12693 HAVE_LIBOTF=no
12694 HAVE_M17N_FLT=no
12695fi
12696
12697### End of font-backend (under X11) section.
12698
12699
067d23c9 12700
067d23c9 12701
5476a9a4
GM
12702
12703
12704
12705
12706
12707
12708### Use -lXpm if available, unless `--with-xpm=no'.
12709HAVE_XPM=no
12710LIBXPM=
5c0255d9
GM
12711
12712if test "${HAVE_W32}" = "yes"; then
12713 if test "${with_xpm}" != "no"; then
12714 SAVE_CPPFLAGS="$CPPFLAGS"
12715 SAVE_LDFLAGS="$LDFLAGS"
12716 CPPFLAGS="$CPPFLAGS -I/usr/include/noX"
12717 LDFLAGS="$LDFLAGS -L/usr/lib/noX"
12718 ac_fn_c_check_header_mongrel "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "$ac_includes_default"
12719if test "x$ac_cv_header_X11_xpm_h" = x""yes; then :
12720 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReadFileToImage in -lXpm" >&5
12721$as_echo_n "checking for XpmReadFileToImage in -lXpm... " >&6; }
12722if test "${ac_cv_lib_Xpm_XpmReadFileToImage+set}" = set; then :
12723 $as_echo_n "(cached) " >&6
12724else
12725 ac_check_lib_save_LIBS=$LIBS
12726LIBS="-lXpm $LIBS"
12727cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12728/* end confdefs.h. */
12729
12730/* Override any GCC internal prototype to avoid an error.
12731 Use char because int might match the return type of a GCC
12732 builtin and then its argument prototype would still apply. */
12733#ifdef __cplusplus
12734extern "C"
12735#endif
12736char XpmReadFileToImage ();
12737int
12738main ()
12739{
12740return XpmReadFileToImage ();
12741 ;
12742 return 0;
12743}
12744_ACEOF
12745if ac_fn_c_try_link "$LINENO"; then :
12746 ac_cv_lib_Xpm_XpmReadFileToImage=yes
12747else
12748 ac_cv_lib_Xpm_XpmReadFileToImage=no
12749fi
12750rm -f core conftest.err conftest.$ac_objext \
12751 conftest$ac_exeext conftest.$ac_ext
12752LIBS=$ac_check_lib_save_LIBS
12753fi
12754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmReadFileToImage" >&5
12755$as_echo "$ac_cv_lib_Xpm_XpmReadFileToImage" >&6; }
12756if test "x$ac_cv_lib_Xpm_XpmReadFileToImage" = x""yes; then :
12757 HAVE_XPM=yes
12758fi
12759
12760fi
12761
12762
12763 if test "${HAVE_XPM}" = "yes"; then
12764 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReturnAllocPixels preprocessor define" >&5
12765$as_echo_n "checking for XpmReturnAllocPixels preprocessor define... " >&6; }
12766 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12767/* end confdefs.h. */
12768#include "X11/xpm.h"
12769#ifndef XpmReturnAllocPixels
12770no_return_alloc_pixels
12771#endif
12772
12773_ACEOF
12774if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12775 $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then :
12776 HAVE_XPM=no
12777else
12778 HAVE_XPM=yes
12779fi
12780rm -f conftest*
12781
12782
12783 if test "${HAVE_XPM}" = "yes"; then
12784 REAL_CPPFLAGS="$REAL_CPPFLAGS -I/usr/include/noX"
12785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12786$as_echo "yes" >&6; }
12787 else
12788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12789$as_echo "no" >&6; }
12790 CPPFLAGS="$SAVE_CPPFLAGS"
12791 LDFLAGS="$SAVE_LDFLAGS"
12792 fi
12793 fi
12794 fi
12795
12796 if test "${HAVE_XPM}" = "yes"; then
12797
12798$as_echo "#define HAVE_XPM 1" >>confdefs.h
12799
12800 LIBXPM=-lXpm
12801 fi
12802fi
12803
5476a9a4
GM
12804if test "${HAVE_X11}" = "yes"; then
12805 if test "${with_xpm}" != "no"; then
12806 ac_fn_c_check_header_mongrel "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "$ac_includes_default"
12807if test "x$ac_cv_header_X11_xpm_h" = x""yes; then :
12808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReadFileToPixmap in -lXpm" >&5
12809$as_echo_n "checking for XpmReadFileToPixmap in -lXpm... " >&6; }
12810if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then :
f199cab1
GM
12811 $as_echo_n "(cached) " >&6
12812else
5476a9a4
GM
12813 ac_check_lib_save_LIBS=$LIBS
12814LIBS="-lXpm -lX11 $LIBS"
12815cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
12816/* end confdefs.h. */
12817
5476a9a4
GM
12818/* Override any GCC internal prototype to avoid an error.
12819 Use char because int might match the return type of a GCC
12820 builtin and then its argument prototype would still apply. */
12821#ifdef __cplusplus
12822extern "C"
12823#endif
12824char XpmReadFileToPixmap ();
067d23c9
KY
12825int
12826main ()
12827{
5476a9a4 12828return XpmReadFileToPixmap ();
067d23c9
KY
12829 ;
12830 return 0;
12831}
12832_ACEOF
5476a9a4
GM
12833if ac_fn_c_try_link "$LINENO"; then :
12834 ac_cv_lib_Xpm_XpmReadFileToPixmap=yes
067d23c9 12835else
5476a9a4 12836 ac_cv_lib_Xpm_XpmReadFileToPixmap=no
067d23c9 12837fi
5476a9a4
GM
12838rm -f core conftest.err conftest.$ac_objext \
12839 conftest$ac_exeext conftest.$ac_ext
12840LIBS=$ac_check_lib_save_LIBS
12841fi
12842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5
12843$as_echo "$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6; }
12844if test "x$ac_cv_lib_Xpm_XpmReadFileToPixmap" = x""yes; then :
12845 HAVE_XPM=yes
f199cab1 12846fi
067d23c9
KY
12847
12848fi
12849
12850
5476a9a4
GM
12851 if test "${HAVE_XPM}" = "yes"; then
12852 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReturnAllocPixels preprocessor define" >&5
12853$as_echo_n "checking for XpmReturnAllocPixels preprocessor define... " >&6; }
12854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12855/* end confdefs.h. */
12856#include "X11/xpm.h"
12857#ifndef XpmReturnAllocPixels
12858no_return_alloc_pixels
12859#endif
067d23c9 12860
067d23c9 12861_ACEOF
5476a9a4
GM
12862if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12863 $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then :
12864 HAVE_XPM=no
12865else
12866 HAVE_XPM=yes
12867fi
12868rm -f conftest*
067d23c9 12869
067d23c9 12870
5476a9a4
GM
12871 if test "${HAVE_XPM}" = "yes"; then
12872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12873$as_echo "yes" >&6; }
12874 else
12875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12876$as_echo "no" >&6; }
12877 fi
12878 fi
12879 fi
067d23c9 12880
5476a9a4 12881 if test "${HAVE_XPM}" = "yes"; then
067d23c9 12882
5476a9a4 12883$as_echo "#define HAVE_XPM 1" >>confdefs.h
067d23c9 12884
5476a9a4
GM
12885 LIBXPM=-lXpm
12886 fi
067d23c9
KY
12887fi
12888
f199cab1 12889
5c0255d9 12890
5476a9a4
GM
12891### Use -ljpeg if available, unless `--with-jpeg=no'.
12892HAVE_JPEG=no
12893LIBJPEG=
5c0255d9 12894if test "${HAVE_X11}" = "yes" || test "${HAVE_W32}" = "yes"; then
5476a9a4
GM
12895 if test "${with_jpeg}" != "no"; then
12896 ac_fn_c_check_header_mongrel "$LINENO" "jerror.h" "ac_cv_header_jerror_h" "$ac_includes_default"
12897if test "x$ac_cv_header_jerror_h" = x""yes; then :
12898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_destroy_compress in -ljpeg" >&5
12899$as_echo_n "checking for jpeg_destroy_compress in -ljpeg... " >&6; }
12900if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then :
067d23c9
KY
12901 $as_echo_n "(cached) " >&6
12902else
5476a9a4
GM
12903 ac_check_lib_save_LIBS=$LIBS
12904LIBS="-ljpeg $LIBS"
12905cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 12906/* end confdefs.h. */
f199cab1 12907
5476a9a4
GM
12908/* Override any GCC internal prototype to avoid an error.
12909 Use char because int might match the return type of a GCC
12910 builtin and then its argument prototype would still apply. */
12911#ifdef __cplusplus
12912extern "C"
12913#endif
12914char jpeg_destroy_compress ();
067d23c9
KY
12915int
12916main ()
12917{
5476a9a4 12918return jpeg_destroy_compress ();
067d23c9
KY
12919 ;
12920 return 0;
12921}
12922_ACEOF
12923if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 12924 ac_cv_lib_jpeg_jpeg_destroy_compress=yes
067d23c9 12925else
5476a9a4 12926 ac_cv_lib_jpeg_jpeg_destroy_compress=no
067d23c9
KY
12927fi
12928rm -f core conftest.err conftest.$ac_objext \
12929 conftest$ac_exeext conftest.$ac_ext
5476a9a4
GM
12930LIBS=$ac_check_lib_save_LIBS
12931fi
12932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5
12933$as_echo "$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6; }
12934if test "x$ac_cv_lib_jpeg_jpeg_destroy_compress" = x""yes; then :
12935 HAVE_JPEG=yes
12936fi
12937
067d23c9 12938fi
f199cab1 12939
f199cab1
GM
12940
12941 fi
067d23c9 12942
5476a9a4
GM
12943 if test "${HAVE_JPEG}" = "yes"; then
12944 $as_echo "#define HAVE_JPEG 1" >>confdefs.h
f199cab1 12945
5476a9a4
GM
12946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12947/* end confdefs.h. */
12948#include <jpeglib.h>
12949 version=JPEG_LIB_VERSION
f199cab1 12950
5476a9a4
GM
12951_ACEOF
12952if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12953 $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then :
12954 $as_echo "#define HAVE_JPEG 1" >>confdefs.h
f199cab1 12955
5476a9a4
GM
12956else
12957 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libjpeg found, but not version 6b or later" >&5
12958$as_echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;}
12959 HAVE_JPEG=no
067d23c9 12960fi
5476a9a4 12961rm -f conftest*
067d23c9 12962
5476a9a4
GM
12963 fi
12964 if test "${HAVE_JPEG}" = "yes"; then
12965 LIBJPEG=-ljpeg
12966 fi
12967fi
067d23c9
KY
12968
12969
5476a9a4
GM
12970### Use -lpng if available, unless `--with-png=no'.
12971HAVE_PNG=no
12972LIBPNG=
5c0255d9 12973if test "${HAVE_X11}" = "yes" || test "${HAVE_W32}" = "yes"; then
5476a9a4
GM
12974 if test "${with_png}" != "no"; then
12975 # Debian unstable as of July 2003 has multiple libpngs, and puts png.h
12976 # in /usr/include/libpng.
12977 for ac_header in png.h libpng/png.h
12978do :
12979 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12980ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12981eval as_val=\$$as_ac_Header
12982 if test "x$as_val" = x""yes; then :
12983 cat >>confdefs.h <<_ACEOF
12984#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12985_ACEOF
12986 break
12987fi
067d23c9 12988
5476a9a4 12989done
067d23c9 12990
5476a9a4
GM
12991 if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then
12992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_get_channels in -lpng" >&5
12993$as_echo_n "checking for png_get_channels in -lpng... " >&6; }
12994if test "${ac_cv_lib_png_png_get_channels+set}" = set; then :
12995 $as_echo_n "(cached) " >&6
12996else
12997 ac_check_lib_save_LIBS=$LIBS
12998LIBS="-lpng -lz -lm $LIBS"
12999cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13000/* end confdefs.h. */
067d23c9 13001
5476a9a4
GM
13002/* Override any GCC internal prototype to avoid an error.
13003 Use char because int might match the return type of a GCC
13004 builtin and then its argument prototype would still apply. */
13005#ifdef __cplusplus
13006extern "C"
13007#endif
13008char png_get_channels ();
13009int
13010main ()
13011{
13012return png_get_channels ();
13013 ;
13014 return 0;
13015}
13016_ACEOF
13017if ac_fn_c_try_link "$LINENO"; then :
13018 ac_cv_lib_png_png_get_channels=yes
f199cab1 13019else
5476a9a4
GM
13020 ac_cv_lib_png_png_get_channels=no
13021fi
13022rm -f core conftest.err conftest.$ac_objext \
13023 conftest$ac_exeext conftest.$ac_ext
13024LIBS=$ac_check_lib_save_LIBS
13025fi
13026{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_png_png_get_channels" >&5
13027$as_echo "$ac_cv_lib_png_png_get_channels" >&6; }
13028if test "x$ac_cv_lib_png_png_get_channels" = x""yes; then :
13029 HAVE_PNG=yes
f199cab1 13030fi
067d23c9 13031
5476a9a4
GM
13032 fi
13033 fi
7834125e 13034
5476a9a4
GM
13035 if test "${HAVE_PNG}" = "yes"; then
13036
13037$as_echo "#define HAVE_PNG 1" >>confdefs.h
13038
13039 LIBPNG="-lpng -lz -lm"
13040
13041 ac_fn_c_check_decl "$LINENO" "png_longjmp" "ac_cv_have_decl_png_longjmp" "#ifdef HAVE_LIBPNG_PNG_H
13042 # include <libpng/png.h>
13043 #else
13044 # include <png.h>
13045 #endif
13046
13047"
13048if test "x$ac_cv_have_decl_png_longjmp" = x""yes; then :
13049
13050else
7834125e 13051
5476a9a4 13052$as_echo "#define PNG_DEPSTRUCT /**/" >>confdefs.h
7834125e 13053
f199cab1 13054fi
7834125e 13055
5476a9a4
GM
13056 fi
13057fi
7834125e
GM
13058
13059
5476a9a4
GM
13060### Use -ltiff if available, unless `--with-tiff=no'.
13061HAVE_TIFF=no
13062LIBTIFF=
5c0255d9 13063if test "${HAVE_X11}" = "yes" || test "${HAVE_W32}" = "yes"; then
5476a9a4
GM
13064 if test "${with_tiff}" != "no"; then
13065 ac_fn_c_check_header_mongrel "$LINENO" "tiffio.h" "ac_cv_header_tiffio_h" "$ac_includes_default"
13066if test "x$ac_cv_header_tiffio_h" = x""yes; then :
13067 tifflibs="-lz -lm"
13068 # At least one tiff package requires the jpeg library.
13069 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
13070 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIFFGetVersion in -ltiff" >&5
13071$as_echo_n "checking for TIFFGetVersion in -ltiff... " >&6; }
13072if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then :
f199cab1
GM
13073 $as_echo_n "(cached) " >&6
13074else
5476a9a4
GM
13075 ac_check_lib_save_LIBS=$LIBS
13076LIBS="-ltiff $tifflibs $LIBS"
13077cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 13078/* end confdefs.h. */
067d23c9 13079
5476a9a4
GM
13080/* Override any GCC internal prototype to avoid an error.
13081 Use char because int might match the return type of a GCC
13082 builtin and then its argument prototype would still apply. */
13083#ifdef __cplusplus
13084extern "C"
f199cab1 13085#endif
5476a9a4
GM
13086char TIFFGetVersion ();
13087int
13088main ()
13089{
13090return TIFFGetVersion ();
13091 ;
13092 return 0;
13093}
f199cab1 13094_ACEOF
5476a9a4
GM
13095if ac_fn_c_try_link "$LINENO"; then :
13096 ac_cv_lib_tiff_TIFFGetVersion=yes
f199cab1 13097else
5476a9a4 13098 ac_cv_lib_tiff_TIFFGetVersion=no
f199cab1 13099fi
5476a9a4
GM
13100rm -f core conftest.err conftest.$ac_objext \
13101 conftest$ac_exeext conftest.$ac_ext
13102LIBS=$ac_check_lib_save_LIBS
f199cab1 13103fi
5476a9a4
GM
13104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5
13105$as_echo "$ac_cv_lib_tiff_TIFFGetVersion" >&6; }
13106if test "x$ac_cv_lib_tiff_TIFFGetVersion" = x""yes; then :
13107 HAVE_TIFF=yes
f199cab1 13108fi
067d23c9 13109
5476a9a4 13110fi
067d23c9 13111
067d23c9 13112
5476a9a4 13113 fi
f199cab1 13114
5476a9a4 13115 if test "${HAVE_TIFF}" = "yes"; then
067d23c9 13116
5476a9a4 13117$as_echo "#define HAVE_TIFF 1" >>confdefs.h
067d23c9 13118
5476a9a4
GM
13119 LIBTIFF=-ltiff
13120 fi
f199cab1 13121fi
067d23c9 13122
067d23c9 13123
5476a9a4
GM
13124### Use -lgif or -lungif if available, unless `--with-gif=no'.
13125HAVE_GIF=no
13126LIBGIF=
5c0255d9
GM
13127if test "${HAVE_X11}" = "yes" && test "${with_gif}" != "no" \
13128 || test "${HAVE_W32}" = "yes"; then
5476a9a4
GM
13129 ac_fn_c_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
13130if test "x$ac_cv_header_gif_lib_h" = x""yes; then :
13131 # EGifPutExtensionLast only exists from version libungif-4.1.0b1.
13132# Earlier versions can crash Emacs.
13133 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lgif" >&5
13134$as_echo_n "checking for EGifPutExtensionLast in -lgif... " >&6; }
13135if test "${ac_cv_lib_gif_EGifPutExtensionLast+set}" = set; then :
f199cab1
GM
13136 $as_echo_n "(cached) " >&6
13137else
5476a9a4
GM
13138 ac_check_lib_save_LIBS=$LIBS
13139LIBS="-lgif $LIBS"
13140cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 13141/* end confdefs.h. */
067d23c9 13142
5476a9a4
GM
13143/* Override any GCC internal prototype to avoid an error.
13144 Use char because int might match the return type of a GCC
13145 builtin and then its argument prototype would still apply. */
13146#ifdef __cplusplus
13147extern "C"
13148#endif
13149char EGifPutExtensionLast ();
f199cab1
GM
13150int
13151main ()
13152{
5476a9a4 13153return EGifPutExtensionLast ();
f199cab1
GM
13154 ;
13155 return 0;
13156}
13157_ACEOF
5476a9a4
GM
13158if ac_fn_c_try_link "$LINENO"; then :
13159 ac_cv_lib_gif_EGifPutExtensionLast=yes
f199cab1 13160else
5476a9a4 13161 ac_cv_lib_gif_EGifPutExtensionLast=no
f199cab1 13162fi
5476a9a4
GM
13163rm -f core conftest.err conftest.$ac_objext \
13164 conftest$ac_exeext conftest.$ac_ext
13165LIBS=$ac_check_lib_save_LIBS
13166fi
13167{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_EGifPutExtensionLast" >&5
13168$as_echo "$ac_cv_lib_gif_EGifPutExtensionLast" >&6; }
13169if test "x$ac_cv_lib_gif_EGifPutExtensionLast" = x""yes; then :
13170 HAVE_GIF=yes
13171else
13172 HAVE_GIF=maybe
f199cab1 13173fi
067d23c9 13174
5476a9a4
GM
13175fi
13176
13177
13178
13179 if test "$HAVE_GIF" = yes; then
13180 LIBGIF=-lgif
13181 elif test "$HAVE_GIF" = maybe; then
13182# If gif_lib.h but no libgif, try libungif.
13183 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lungif" >&5
13184$as_echo_n "checking for EGifPutExtensionLast in -lungif... " >&6; }
13185if test "${ac_cv_lib_ungif_EGifPutExtensionLast+set}" = set; then :
f199cab1
GM
13186 $as_echo_n "(cached) " >&6
13187else
5476a9a4
GM
13188 ac_check_lib_save_LIBS=$LIBS
13189LIBS="-lungif $LIBS"
13190cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 13191/* end confdefs.h. */
f199cab1 13192
5476a9a4
GM
13193/* Override any GCC internal prototype to avoid an error.
13194 Use char because int might match the return type of a GCC
13195 builtin and then its argument prototype would still apply. */
13196#ifdef __cplusplus
13197extern "C"
13198#endif
13199char EGifPutExtensionLast ();
f199cab1
GM
13200int
13201main ()
13202{
5476a9a4 13203return EGifPutExtensionLast ();
f199cab1
GM
13204 ;
13205 return 0;
13206}
13207_ACEOF
5476a9a4
GM
13208if ac_fn_c_try_link "$LINENO"; then :
13209 ac_cv_lib_ungif_EGifPutExtensionLast=yes
f199cab1 13210else
5476a9a4 13211 ac_cv_lib_ungif_EGifPutExtensionLast=no
f199cab1 13212fi
5476a9a4
GM
13213rm -f core conftest.err conftest.$ac_objext \
13214 conftest$ac_exeext conftest.$ac_ext
13215LIBS=$ac_check_lib_save_LIBS
f199cab1 13216fi
5476a9a4
GM
13217{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5
13218$as_echo "$ac_cv_lib_ungif_EGifPutExtensionLast" >&6; }
13219if test "x$ac_cv_lib_ungif_EGifPutExtensionLast" = x""yes; then :
13220 HAVE_GIF=yes
13221else
13222 HAVE_GIF=no
13223fi
13224
13225 test "$HAVE_GIF" = yes && LIBGIF=-lungif
13226 fi
13227
13228 if test "${HAVE_GIF}" = "yes"; then
13229
13230$as_echo "#define HAVE_GIF 1" >>confdefs.h
13231
13232 fi
13233fi
13234
13235
13236if test "${HAVE_X11}" = "yes"; then
13237 MISSING=""
13238 WITH_NO=""
13239 test "${with_xpm}" != "no" && test "${HAVE_XPM}" != "yes" &&
13240 MISSING="libXpm" && WITH_NO="--with-xpm=no"
13241 test "${with_jpeg}" != "no" && test "${HAVE_JPEG}" != "yes" &&
13242 MISSING="$MISSING libjpeg" && WITH_NO="$WITH_NO --with-jpeg=no"
13243 test "${with_png}" != "no" && test "${HAVE_PNG}" != "yes" &&
13244 MISSING="$MISSING libpng" && WITH_NO="$WITH_NO --with-png=no"
13245 test "${with_gif}" != "no" && test "${HAVE_GIF}" != "yes" &&
13246 MISSING="$MISSING libgif/libungif" && WITH_NO="$WITH_NO --with-gif=no"
13247 test "${with_tiff}" != "no" && test "${HAVE_TIFF}" != "yes" &&
13248 MISSING="$MISSING libtiff" && WITH_NO="$WITH_NO --with-tiff=no"
13249
13250 if test "X${MISSING}" != X; then
13251 as_fn_error "The following required libraries were not found:
13252 $MISSING
13253Maybe some development libraries/packages are missing?
13254If you don't want to link with them give
13255 $WITH_NO
13256as options to configure" "$LINENO" 5
13257 fi
13258fi
13259
13260### Use -lgpm if available, unless `--with-gpm=no'.
13261HAVE_GPM=no
13262LIBGPM=
13263if test "${with_gpm}" != "no"; then
13264 ac_fn_c_check_header_mongrel "$LINENO" "gpm.h" "ac_cv_header_gpm_h" "$ac_includes_default"
13265if test "x$ac_cv_header_gpm_h" = x""yes; then :
13266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Gpm_Open in -lgpm" >&5
13267$as_echo_n "checking for Gpm_Open in -lgpm... " >&6; }
13268if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then :
067d23c9
KY
13269 $as_echo_n "(cached) " >&6
13270else
5476a9a4
GM
13271 ac_check_lib_save_LIBS=$LIBS
13272LIBS="-lgpm $LIBS"
13273cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
13274/* end confdefs.h. */
13275
5476a9a4
GM
13276/* Override any GCC internal prototype to avoid an error.
13277 Use char because int might match the return type of a GCC
13278 builtin and then its argument prototype would still apply. */
13279#ifdef __cplusplus
13280extern "C"
13281#endif
13282char Gpm_Open ();
067d23c9
KY
13283int
13284main ()
13285{
5476a9a4 13286return Gpm_Open ();
067d23c9
KY
13287 ;
13288 return 0;
13289}
13290_ACEOF
5476a9a4
GM
13291if ac_fn_c_try_link "$LINENO"; then :
13292 ac_cv_lib_gpm_Gpm_Open=yes
067d23c9 13293else
5476a9a4 13294 ac_cv_lib_gpm_Gpm_Open=no
067d23c9 13295fi
5476a9a4
GM
13296rm -f core conftest.err conftest.$ac_objext \
13297 conftest$ac_exeext conftest.$ac_ext
13298LIBS=$ac_check_lib_save_LIBS
13299fi
13300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gpm_Gpm_Open" >&5
13301$as_echo "$ac_cv_lib_gpm_Gpm_Open" >&6; }
13302if test "x$ac_cv_lib_gpm_Gpm_Open" = x""yes; then :
13303 HAVE_GPM=yes
067d23c9 13304fi
f199cab1 13305
5476a9a4 13306fi
f199cab1 13307
f199cab1 13308
f199cab1 13309
5476a9a4 13310 if test "${HAVE_GPM}" = "yes"; then
f199cab1 13311
5476a9a4 13312$as_echo "#define HAVE_GPM 1" >>confdefs.h
f199cab1 13313
5476a9a4
GM
13314 LIBGPM=-lgpm
13315 fi
067d23c9 13316fi
067d23c9
KY
13317
13318
13319
13320
13321
13322
5476a9a4
GM
13323GNUSTEP_CFLAGS=
13324### Use NeXTstep API to implement GUI.
13325if test "${HAVE_NS}" = "yes"; then
067d23c9 13326
5476a9a4 13327$as_echo "#define HAVE_NS 1" >>confdefs.h
067d23c9 13328
5476a9a4 13329 if test "${NS_IMPL_COCOA}" = "yes"; then
067d23c9 13330
5476a9a4 13331$as_echo "#define NS_IMPL_COCOA 1" >>confdefs.h
f199cab1 13332
5476a9a4
GM
13333 fi
13334 if test "${NS_IMPL_GNUSTEP}" = "yes"; then
f199cab1 13335
5476a9a4 13336$as_echo "#define NS_IMPL_GNUSTEP 1" >>confdefs.h
f199cab1 13337
5476a9a4
GM
13338 # See also .m.o rule in Makefile.in */
13339 # FIXME: are all these flags really needed? Document here why. */
13340 GNUSTEP_CFLAGS="-D_REENTRANT -fPIC -fno-strict-aliasing -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
13341 ## Extra CFLAGS applied to src/*.m files.
13342 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"
13343 fi
13344 # We also have mouse menus.
13345 HAVE_MENUS=yes
13346 OTHER_FILES=ns-app
13347fi
f199cab1 13348
5c0255d9
GM
13349if test "${HAVE_W32}" = "yes"; then
13350 HAVE_MENUS=yes
13351fi
f199cab1 13352
5476a9a4
GM
13353### Use session management (-lSM -lICE) if available
13354HAVE_X_SM=no
13355LIBXSM=
13356if test "${HAVE_X11}" = "yes"; then
13357 ac_fn_c_check_header_mongrel "$LINENO" "X11/SM/SMlib.h" "ac_cv_header_X11_SM_SMlib_h" "$ac_includes_default"
13358if test "x$ac_cv_header_X11_SM_SMlib_h" = x""yes; then :
13359 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SmcOpenConnection in -lSM" >&5
13360$as_echo_n "checking for SmcOpenConnection in -lSM... " >&6; }
13361if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then :
067d23c9
KY
13362 $as_echo_n "(cached) " >&6
13363else
5476a9a4
GM
13364 ac_check_lib_save_LIBS=$LIBS
13365LIBS="-lSM -lICE $LIBS"
13366cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
13367/* end confdefs.h. */
13368
5476a9a4
GM
13369/* Override any GCC internal prototype to avoid an error.
13370 Use char because int might match the return type of a GCC
13371 builtin and then its argument prototype would still apply. */
13372#ifdef __cplusplus
13373extern "C"
13374#endif
13375char SmcOpenConnection ();
f199cab1
GM
13376int
13377main ()
13378{
5476a9a4
GM
13379return SmcOpenConnection ();
13380 ;
13381 return 0;
f199cab1 13382}
067d23c9 13383_ACEOF
5476a9a4
GM
13384if ac_fn_c_try_link "$LINENO"; then :
13385 ac_cv_lib_SM_SmcOpenConnection=yes
067d23c9 13386else
5476a9a4 13387 ac_cv_lib_SM_SmcOpenConnection=no
f199cab1 13388fi
5476a9a4
GM
13389rm -f core conftest.err conftest.$ac_objext \
13390 conftest$ac_exeext conftest.$ac_ext
13391LIBS=$ac_check_lib_save_LIBS
13392fi
13393{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_SM_SmcOpenConnection" >&5
13394$as_echo "$ac_cv_lib_SM_SmcOpenConnection" >&6; }
13395if test "x$ac_cv_lib_SM_SmcOpenConnection" = x""yes; then :
13396 HAVE_X_SM=yes
067d23c9 13397fi
067d23c9 13398
f199cab1 13399fi
f199cab1 13400
f199cab1 13401
067d23c9 13402
5476a9a4
GM
13403 if test "${HAVE_X_SM}" = "yes"; then
13404
13405$as_echo "#define HAVE_X_SM 1" >>confdefs.h
13406
13407 LIBXSM="-lSM -lICE"
13408 case "$LIBS" in
13409 *-lSM*) ;;
13410 *) LIBS="$LIBXSM $LIBS" ;;
13411 esac
067d23c9 13412 fi
5476a9a4 13413fi
067d23c9 13414
067d23c9 13415
910833ae
GM
13416### Use XRandr (-lXrandr) if available
13417HAVE_XRANDR=no
13418if test "${HAVE_X11}" = "yes"; then
13419 XRANDR_REQUIRED=1.2.2
13420 XRANDR_MODULES="xrandr >= $XRANDR_REQUIRED"
13421
13422 succeeded=no
13423
13424 if test "$PKG_CONFIG" = "no" ; then
13425 HAVE_XRANDR=no
13426 else
13427 PKG_CONFIG_MIN_VERSION=0.9.0
13428 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
13429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $XRANDR_MODULES" >&5
13430$as_echo_n "checking for $XRANDR_MODULES... " >&6; }
13431
13432 if "$PKG_CONFIG" --exists "$XRANDR_MODULES" 2>&5 &&
13433 XRANDR_CFLAGS=`"$PKG_CONFIG" --cflags "$XRANDR_MODULES" 2>&5` &&
13434 XRANDR_LIBS=`"$PKG_CONFIG" --libs "$XRANDR_MODULES" 2>&5`; then
13435 edit_cflags="
13436 s,///*,/,g
13437 s/^/ /
13438 s/ -I/ $isystem/g
13439 s/^ //
13440 "
13441 XRANDR_CFLAGS=`$as_echo "$XRANDR_CFLAGS" | sed -e "$edit_cflags"`
13442 XRANDR_LIBS=`$as_echo "$XRANDR_LIBS" | sed -e 's,///*,/,g'`
13443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$XRANDR_CFLAGS' LIBS='$XRANDR_LIBS'" >&5
13444$as_echo "yes CFLAGS='$XRANDR_CFLAGS' LIBS='$XRANDR_LIBS'" >&6; }
13445 succeeded=yes
13446 else
13447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13448$as_echo "no" >&6; }
13449 XRANDR_CFLAGS=""
13450 XRANDR_LIBS=""
13451 ## If we have a custom action on failure, don't print errors, but
13452 ## do set a variable so people can do so. Do it in a subshell
13453 ## to capture any diagnostics in invoking pkg-config.
13454 XRANDR_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$XRANDR_MODULES") 2>&1`
13455
13456 fi
13457
13458
13459
13460 else
13461 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
13462 echo "*** See http://www.freedesktop.org/software/pkgconfig"
13463 fi
13464 fi
13465
13466 if test $succeeded = yes; then
13467 HAVE_XRANDR=yes
13468 else
13469 HAVE_XRANDR=no
13470 fi
13471
13472 if test $HAVE_XRANDR = no; then
13473 # Test old way in case pkg-config doesn't have it (older machines).
13474 ac_fn_c_check_header_mongrel "$LINENO" "X11/extensions/Xrandr.h" "ac_cv_header_X11_extensions_Xrandr_h" "$ac_includes_default"
13475if test "x$ac_cv_header_X11_extensions_Xrandr_h" = x""yes; then :
13476 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRRQueryExtension in -lXrandr" >&5
13477$as_echo_n "checking for XRRQueryExtension in -lXrandr... " >&6; }
13478if test "${ac_cv_lib_Xrandr_XRRQueryExtension+set}" = set; then :
13479 $as_echo_n "(cached) " >&6
13480else
13481 ac_check_lib_save_LIBS=$LIBS
13482LIBS="-lXrandr $LIBS"
13483cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13484/* end confdefs.h. */
13485
13486/* Override any GCC internal prototype to avoid an error.
13487 Use char because int might match the return type of a GCC
13488 builtin and then its argument prototype would still apply. */
13489#ifdef __cplusplus
13490extern "C"
13491#endif
13492char XRRQueryExtension ();
13493int
13494main ()
13495{
13496return XRRQueryExtension ();
13497 ;
13498 return 0;
13499}
13500_ACEOF
13501if ac_fn_c_try_link "$LINENO"; then :
13502 ac_cv_lib_Xrandr_XRRQueryExtension=yes
13503else
13504 ac_cv_lib_Xrandr_XRRQueryExtension=no
13505fi
13506rm -f core conftest.err conftest.$ac_objext \
13507 conftest$ac_exeext conftest.$ac_ext
13508LIBS=$ac_check_lib_save_LIBS
13509fi
13510{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrandr_XRRQueryExtension" >&5
13511$as_echo "$ac_cv_lib_Xrandr_XRRQueryExtension" >&6; }
13512if test "x$ac_cv_lib_Xrandr_XRRQueryExtension" = x""yes; then :
13513 HAVE_XRANDR=yes
13514fi
13515
13516fi
13517
13518
13519 if test $HAVE_XRANDR = yes; then
13520 XRANDR_LIBS=-lXrandr
13521
13522 fi
13523 fi
13524 if test $HAVE_XRANDR = yes; then
13525 SAVE_CFLAGS="$CFLAGS"
13526 SAVE_LIBS="$LIBS"
13527 CFLAGS="$XRANDR_CFLAGS $CFLAGS"
13528 LIBS="$XRANDR_LIBS $LIBS"
13529 for ac_func in XRRGetOutputPrimary XRRGetScreenResourcesCurrent
13530do :
13531 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13532ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13533eval as_val=\$$as_ac_var
13534 if test "x$as_val" = x""yes; then :
13535 cat >>confdefs.h <<_ACEOF
13536#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13537_ACEOF
13538
13539fi
13540done
13541
13542 CFLAGS="$SAVE_CFLAGS"
13543 LIBS="$SAVE_LIBS"
13544
13545
13546$as_echo "#define HAVE_XRANDR 1" >>confdefs.h
13547
13548 fi
13549fi
13550
13551### Use Xinerama (-lXinerama) if available
13552HAVE_XINERAMA=no
13553if test "${HAVE_X11}" = "yes"; then
13554 XINERAMA_REQUIRED=1.0.2
13555 XINERAMA_MODULES="xinerama >= $XINERAMA_REQUIRED"
13556
13557 succeeded=no
13558
13559 if test "$PKG_CONFIG" = "no" ; then
13560 HAVE_XINERAMA=no
13561 else
13562 PKG_CONFIG_MIN_VERSION=0.9.0
13563 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
13564 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $XINERAMA_MODULES" >&5
13565$as_echo_n "checking for $XINERAMA_MODULES... " >&6; }
13566
13567 if "$PKG_CONFIG" --exists "$XINERAMA_MODULES" 2>&5 &&
13568 XINERAMA_CFLAGS=`"$PKG_CONFIG" --cflags "$XINERAMA_MODULES" 2>&5` &&
13569 XINERAMA_LIBS=`"$PKG_CONFIG" --libs "$XINERAMA_MODULES" 2>&5`; then
13570 edit_cflags="
13571 s,///*,/,g
13572 s/^/ /
13573 s/ -I/ $isystem/g
13574 s/^ //
13575 "
13576 XINERAMA_CFLAGS=`$as_echo "$XINERAMA_CFLAGS" | sed -e "$edit_cflags"`
13577 XINERAMA_LIBS=`$as_echo "$XINERAMA_LIBS" | sed -e 's,///*,/,g'`
13578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$XINERAMA_CFLAGS' LIBS='$XINERAMA_LIBS'" >&5
13579$as_echo "yes CFLAGS='$XINERAMA_CFLAGS' LIBS='$XINERAMA_LIBS'" >&6; }
13580 succeeded=yes
13581 else
13582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13583$as_echo "no" >&6; }
13584 XINERAMA_CFLAGS=""
13585 XINERAMA_LIBS=""
13586 ## If we have a custom action on failure, don't print errors, but
13587 ## do set a variable so people can do so. Do it in a subshell
13588 ## to capture any diagnostics in invoking pkg-config.
13589 XINERAMA_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$XINERAMA_MODULES") 2>&1`
13590
13591 fi
13592
13593
13594
13595 else
13596 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
13597 echo "*** See http://www.freedesktop.org/software/pkgconfig"
13598 fi
13599 fi
13600
13601 if test $succeeded = yes; then
13602 HAVE_XINERAMA=yes
13603 else
13604 HAVE_XINERAMA=no
13605 fi
13606
13607 if test $HAVE_XINERAMA = no; then
13608 # Test old way in case pkg-config doesn't have it (older machines).
13609 ac_fn_c_check_header_mongrel "$LINENO" "X11/extensions/Xinerama.h" "ac_cv_header_X11_extensions_Xinerama_h" "$ac_includes_default"
13610if test "x$ac_cv_header_X11_extensions_Xinerama_h" = x""yes; then :
13611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XineramaQueryExtension in -lXinerama" >&5
13612$as_echo_n "checking for XineramaQueryExtension in -lXinerama... " >&6; }
13613if test "${ac_cv_lib_Xinerama_XineramaQueryExtension+set}" = set; then :
13614 $as_echo_n "(cached) " >&6
13615else
13616 ac_check_lib_save_LIBS=$LIBS
13617LIBS="-lXinerama $LIBS"
13618cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13619/* end confdefs.h. */
13620
13621/* Override any GCC internal prototype to avoid an error.
13622 Use char because int might match the return type of a GCC
13623 builtin and then its argument prototype would still apply. */
13624#ifdef __cplusplus
13625extern "C"
13626#endif
13627char XineramaQueryExtension ();
13628int
13629main ()
13630{
13631return XineramaQueryExtension ();
13632 ;
13633 return 0;
13634}
13635_ACEOF
13636if ac_fn_c_try_link "$LINENO"; then :
13637 ac_cv_lib_Xinerama_XineramaQueryExtension=yes
13638else
13639 ac_cv_lib_Xinerama_XineramaQueryExtension=no
13640fi
13641rm -f core conftest.err conftest.$ac_objext \
13642 conftest$ac_exeext conftest.$ac_ext
13643LIBS=$ac_check_lib_save_LIBS
13644fi
13645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xinerama_XineramaQueryExtension" >&5
13646$as_echo "$ac_cv_lib_Xinerama_XineramaQueryExtension" >&6; }
13647if test "x$ac_cv_lib_Xinerama_XineramaQueryExtension" = x""yes; then :
13648 HAVE_XINERAMA=yes
13649fi
13650
13651fi
13652
13653
13654 if test $HAVE_XINERAMA = yes; then
13655 XINERAMA_LIBS=-lXinerama
13656
13657 fi
13658 fi
13659 if test $HAVE_XINERAMA = yes; then
13660
13661$as_echo "#define HAVE_XINERAMA 1" >>confdefs.h
13662
13663 fi
13664fi
13665
13666
5476a9a4
GM
13667### Use libxml (-lxml2) if available
13668HAVE_LIBXML2=no
13669if test "${with_xml2}" != "no"; then
13670 ### I'm not sure what the version number should be, so I just guessed.
067d23c9 13671
5476a9a4 13672 succeeded=no
067d23c9 13673
5476a9a4
GM
13674 if test "$PKG_CONFIG" = "no" ; then
13675 HAVE_LIBXML2=no
13676 else
13677 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 13678 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
13679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxml-2.0 > 2.6.17" >&5
13680$as_echo_n "checking for libxml-2.0 > 2.6.17... " >&6; }
067d23c9 13681
b5591ebb
GM
13682 if "$PKG_CONFIG" --exists "libxml-2.0 > 2.6.17" 2>&5 &&
13683 LIBXML2_CFLAGS=`"$PKG_CONFIG" --cflags "libxml-2.0 > 2.6.17" 2>&5` &&
13684 LIBXML2_LIBS=`"$PKG_CONFIG" --libs "libxml-2.0 > 2.6.17" 2>&5`; then
5476a9a4
GM
13685 edit_cflags="
13686 s,///*,/,g
13687 s/^/ /
13688 s/ -I/ $isystem/g
13689 s/^ //
13690 "
13691 LIBXML2_CFLAGS=`$as_echo "$LIBXML2_CFLAGS" | sed -e "$edit_cflags"`
13692 LIBXML2_LIBS=`$as_echo "$LIBXML2_LIBS" | sed -e 's,///*,/,g'`
13693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBXML2_CFLAGS' LIBS='$LIBXML2_LIBS'" >&5
13694$as_echo "yes CFLAGS='$LIBXML2_CFLAGS' LIBS='$LIBXML2_LIBS'" >&6; }
13695 succeeded=yes
13696 else
13697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13698$as_echo "no" >&6; }
13699 LIBXML2_CFLAGS=""
13700 LIBXML2_LIBS=""
13701 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
13702 ## do set a variable so people can do so. Do it in a subshell
13703 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 13704 LIBXML2_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "libxml-2.0 > 2.6.17") 2>&1`
5476a9a4
GM
13705
13706 fi
13707
13708
13709
13710 else
13711 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
13712 echo "*** See http://www.freedesktop.org/software/pkgconfig"
13713 fi
13714 fi
13715
13716 if test $succeeded = yes; then
13717 HAVE_LIBXML2=yes
13718 else
13719 HAVE_LIBXML2=no
13720 fi
13721
13722 if test "${HAVE_LIBXML2}" = "yes"; then
13723 LIBS="$LIBXML2_LIBS $LIBS"
13724 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for htmlReadMemory in -lxml2" >&5
13725$as_echo_n "checking for htmlReadMemory in -lxml2... " >&6; }
13726if test "${ac_cv_lib_xml2_htmlReadMemory+set}" = set; then :
067d23c9
KY
13727 $as_echo_n "(cached) " >&6
13728else
5476a9a4
GM
13729 ac_check_lib_save_LIBS=$LIBS
13730LIBS="-lxml2 $LIBS"
13731cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
13732/* end confdefs.h. */
13733
5476a9a4
GM
13734/* Override any GCC internal prototype to avoid an error.
13735 Use char because int might match the return type of a GCC
13736 builtin and then its argument prototype would still apply. */
13737#ifdef __cplusplus
13738extern "C"
13739#endif
13740char htmlReadMemory ();
067d23c9
KY
13741int
13742main ()
13743{
5476a9a4 13744return htmlReadMemory ();
067d23c9
KY
13745 ;
13746 return 0;
13747}
13748_ACEOF
5476a9a4
GM
13749if ac_fn_c_try_link "$LINENO"; then :
13750 ac_cv_lib_xml2_htmlReadMemory=yes
067d23c9 13751else
5476a9a4 13752 ac_cv_lib_xml2_htmlReadMemory=no
067d23c9 13753fi
5476a9a4
GM
13754rm -f core conftest.err conftest.$ac_objext \
13755 conftest$ac_exeext conftest.$ac_ext
13756LIBS=$ac_check_lib_save_LIBS
13757fi
13758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_htmlReadMemory" >&5
13759$as_echo "$ac_cv_lib_xml2_htmlReadMemory" >&6; }
13760if test "x$ac_cv_lib_xml2_htmlReadMemory" = x""yes; then :
13761 HAVE_LIBXML2=yes
13762else
13763 HAVE_LIBXML2=no
067d23c9
KY
13764fi
13765
5476a9a4 13766 if test "${HAVE_LIBXML2}" = "yes"; then
067d23c9 13767
5476a9a4 13768$as_echo "#define HAVE_LIBXML2 1" >>confdefs.h
067d23c9 13769
5476a9a4
GM
13770 else
13771 LIBXML2_LIBS=""
13772 LIBXML2_CFLAGS=""
13773 fi
067d23c9 13774 fi
5476a9a4 13775fi
067d23c9 13776
067d23c9 13777
067d23c9 13778
5476a9a4
GM
13779# If netdb.h doesn't declare h_errno, we must declare it by hand.
13780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether netdb declares h_errno" >&5
13781$as_echo_n "checking whether netdb declares h_errno... " >&6; }
13782if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then :
13783 $as_echo_n "(cached) " >&6
067d23c9 13784else
5476a9a4
GM
13785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13786/* end confdefs.h. */
13787#include <netdb.h>
13788int
13789main ()
13790{
13791return h_errno;
13792 ;
13793 return 0;
13794}
13795_ACEOF
13796if ac_fn_c_try_link "$LINENO"; then :
13797 emacs_cv_netdb_declares_h_errno=yes
13798else
13799 emacs_cv_netdb_declares_h_errno=no
067d23c9 13800fi
5476a9a4
GM
13801rm -f core conftest.err conftest.$ac_objext \
13802 conftest$ac_exeext conftest.$ac_ext
13803fi
13804{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_netdb_declares_h_errno" >&5
13805$as_echo "$emacs_cv_netdb_declares_h_errno" >&6; }
13806if test $emacs_cv_netdb_declares_h_errno = yes; then
067d23c9 13807
5476a9a4 13808$as_echo "#define HAVE_H_ERRNO 1" >>confdefs.h
f199cab1 13809
5476a9a4 13810fi
f199cab1 13811
2c98a625
GM
13812# sqrt and other floating-point functions such as fmod and frexp
13813# are found in -lm on most systems.
5476a9a4
GM
13814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5
13815$as_echo_n "checking for sqrt in -lm... " >&6; }
13816if test "${ac_cv_lib_m_sqrt+set}" = set; then :
13817 $as_echo_n "(cached) " >&6
13818else
13819 ac_check_lib_save_LIBS=$LIBS
13820LIBS="-lm $LIBS"
13821cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13822/* end confdefs.h. */
f199cab1 13823
5476a9a4
GM
13824/* Override any GCC internal prototype to avoid an error.
13825 Use char because int might match the return type of a GCC
13826 builtin and then its argument prototype would still apply. */
13827#ifdef __cplusplus
13828extern "C"
13829#endif
13830char sqrt ();
13831int
13832main ()
13833{
13834return sqrt ();
13835 ;
13836 return 0;
13837}
13838_ACEOF
13839if ac_fn_c_try_link "$LINENO"; then :
13840 ac_cv_lib_m_sqrt=yes
13841else
13842 ac_cv_lib_m_sqrt=no
13843fi
13844rm -f core conftest.err conftest.$ac_objext \
13845 conftest$ac_exeext conftest.$ac_ext
13846LIBS=$ac_check_lib_save_LIBS
13847fi
13848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sqrt" >&5
13849$as_echo "$ac_cv_lib_m_sqrt" >&6; }
13850if test "x$ac_cv_lib_m_sqrt" = x""yes; then :
13851 cat >>confdefs.h <<_ACEOF
13852#define HAVE_LIBM 1
13853_ACEOF
f199cab1 13854
5476a9a4 13855 LIBS="-lm $LIBS"
f199cab1 13856
5476a9a4 13857fi
f199cab1 13858
f199cab1 13859
5476a9a4
GM
13860# Check for mail-locking functions in a "mail" library. Probably this should
13861# have the same check as for liblockfile below.
13862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -lmail" >&5
13863$as_echo_n "checking for maillock in -lmail... " >&6; }
13864if test "${ac_cv_lib_mail_maillock+set}" = set; then :
067d23c9
KY
13865 $as_echo_n "(cached) " >&6
13866else
5476a9a4
GM
13867 ac_check_lib_save_LIBS=$LIBS
13868LIBS="-lmail $LIBS"
13869cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
13870/* end confdefs.h. */
13871
5476a9a4
GM
13872/* Override any GCC internal prototype to avoid an error.
13873 Use char because int might match the return type of a GCC
13874 builtin and then its argument prototype would still apply. */
13875#ifdef __cplusplus
13876extern "C"
067d23c9 13877#endif
5476a9a4
GM
13878char maillock ();
13879int
13880main ()
13881{
13882return maillock ();
13883 ;
13884 return 0;
13885}
067d23c9 13886_ACEOF
5476a9a4
GM
13887if ac_fn_c_try_link "$LINENO"; then :
13888 ac_cv_lib_mail_maillock=yes
067d23c9 13889else
5476a9a4 13890 ac_cv_lib_mail_maillock=no
067d23c9 13891fi
5476a9a4
GM
13892rm -f core conftest.err conftest.$ac_objext \
13893 conftest$ac_exeext conftest.$ac_ext
13894LIBS=$ac_check_lib_save_LIBS
067d23c9 13895fi
5476a9a4
GM
13896{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mail_maillock" >&5
13897$as_echo "$ac_cv_lib_mail_maillock" >&6; }
13898if test "x$ac_cv_lib_mail_maillock" = x""yes; then :
13899 have_mail=yes
f199cab1 13900else
5476a9a4 13901 have_mail=no
067d23c9
KY
13902fi
13903
5476a9a4
GM
13904if test $have_mail = yes; then
13905 LIBS_MAIL=-lmail
13906 LIBS="$LIBS_MAIL $LIBS"
067d23c9 13907
5476a9a4 13908$as_echo "#define HAVE_LIBMAIL 1" >>confdefs.h
067d23c9 13909
5476a9a4
GM
13910else
13911 LIBS_MAIL=
13912fi
13913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -llockfile" >&5
13914$as_echo_n "checking for maillock in -llockfile... " >&6; }
13915if test "${ac_cv_lib_lockfile_maillock+set}" = set; then :
067d23c9
KY
13916 $as_echo_n "(cached) " >&6
13917else
5476a9a4
GM
13918 ac_check_lib_save_LIBS=$LIBS
13919LIBS="-llockfile $LIBS"
067d23c9
KY
13920cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13921/* end confdefs.h. */
13922
13923/* Override any GCC internal prototype to avoid an error.
13924 Use char because int might match the return type of a GCC
13925 builtin and then its argument prototype would still apply. */
13926#ifdef __cplusplus
13927extern "C"
13928#endif
5476a9a4 13929char maillock ();
067d23c9
KY
13930int
13931main ()
13932{
5476a9a4 13933return maillock ();
067d23c9
KY
13934 ;
13935 return 0;
13936}
13937_ACEOF
5476a9a4
GM
13938if ac_fn_c_try_link "$LINENO"; then :
13939 ac_cv_lib_lockfile_maillock=yes
13940else
13941 ac_cv_lib_lockfile_maillock=no
067d23c9
KY
13942fi
13943rm -f core conftest.err conftest.$ac_objext \
5476a9a4
GM
13944 conftest$ac_exeext conftest.$ac_ext
13945LIBS=$ac_check_lib_save_LIBS
067d23c9 13946fi
5476a9a4
GM
13947{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lockfile_maillock" >&5
13948$as_echo "$ac_cv_lib_lockfile_maillock" >&6; }
13949if test "x$ac_cv_lib_lockfile_maillock" = x""yes; then :
13950 have_lockfile=yes
067d23c9 13951else
5476a9a4 13952 have_lockfile=no
f199cab1
GM
13953fi
13954
5476a9a4
GM
13955if test $have_lockfile = yes; then
13956 LIBS_MAIL=-llockfile
13957 LIBS="$LIBS_MAIL $LIBS"
067d23c9 13958
5476a9a4 13959$as_echo "#define HAVE_LIBLOCKFILE 1" >>confdefs.h
067d23c9 13960
5476a9a4
GM
13961else
13962# If we have the shared liblockfile, assume we must use it for mail
13963# locking (e.g. Debian). If we couldn't link against liblockfile
13964# (no liblockfile.a installed), ensure that we don't need to.
13965 # Extract the first word of "liblockfile.so", so it can be a program name with args.
13966set dummy liblockfile.so; ac_word=$2
13967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13968$as_echo_n "checking for $ac_word... " >&6; }
13969if test "${ac_cv_prog_liblockfile+set}" = set; then :
13970 $as_echo_n "(cached) " >&6
13971else
13972 if test -n "$liblockfile"; then
13973 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
13974else
13975as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13976as_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
13977for as_dir in $as_dummy
13978do
13979 IFS=$as_save_IFS
13980 test -z "$as_dir" && as_dir=.
13981 for ac_exec_ext in '' $ac_executable_extensions; do
13982 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
13983 ac_cv_prog_liblockfile="yes"
13984 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13985 break 2
13986 fi
13987done
13988 done
13989IFS=$as_save_IFS
067d23c9 13990
5476a9a4
GM
13991 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
13992fi
13993fi
13994liblockfile=$ac_cv_prog_liblockfile
13995if test -n "$liblockfile"; then
13996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $liblockfile" >&5
13997$as_echo "$liblockfile" >&6; }
13998else
13999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14000$as_echo "no" >&6; }
14001fi
067d23c9 14002
067d23c9 14003
5476a9a4
GM
14004 if test $ac_cv_prog_liblockfile = yes; then
14005 as_fn_error "Shared liblockfile found but can't link against it.
14006This probably means that movemail could lose mail.
14007There may be a \`development' package to install containing liblockfile." "$LINENO" 5
14008 fi
14009fi
067d23c9 14010
067d23c9 14011
067d23c9 14012
067d23c9
KY
14013
14014
5476a9a4
GM
14015## Define MAIL_USE_FLOCK (or LOCKF) if the mailer uses flock (or lockf) to
14016## interlock access to the mail spool. The alternative is a lock file named
14017## /usr/spool/mail/$USER.lock.
14018mail_lock=no
14019case "$opsys" in
14020 aix4-2) mail_lock="lockf" ;;
067d23c9 14021
87e1a811 14022 gnu|freebsd|dragonfly|netbsd|openbsd|darwin|irix6-5) mail_lock="flock" ;;
067d23c9 14023
5476a9a4
GM
14024 ## On GNU/Linux systems, both methods are used by various mail programs.
14025 ## I assume most people are using newer mailers that have heard of flock.
14026 ## Change this if you need to.
14027 ## Debian contains a patch which says: ``On Debian/GNU/Linux systems,
14028 ## configure gets the right answers, and that means *NOT* using flock.
14029 ## Using flock is guaranteed to be the wrong thing. See Debian Policy
14030 ## for details.'' and then uses `#ifdef DEBIAN'. Unfortunately the
14031 ## Debian maintainer hasn't provided a clean fix for Emacs.
14032 ## movemail.c will use `maillock' when MAILDIR, HAVE_LIBMAIL and
14033 ## HAVE_MAILLOCK_H are defined, so the following appears to be the
14034 ## correct logic. -- fx
14035 ## We must check for HAVE_LIBLOCKFILE too, as movemail does.
14036 ## liblockfile is a Free Software replacement for libmail, used on
14037 ## Debian systems and elsewhere. -rfr.
14038 gnu-*)
14039 mail_lock="flock"
14040 if test $have_mail = yes || test $have_lockfile = yes; then
14041 test $ac_cv_header_maillock_h = yes && mail_lock=no
14042 fi
14043 ;;
14044esac
f199cab1 14045
5476a9a4
GM
14046BLESSMAIL_TARGET=
14047case "$mail_lock" in
14048 flock)
14049$as_echo "#define MAIL_USE_FLOCK 1" >>confdefs.h
14050 ;;
f199cab1 14051
5476a9a4
GM
14052 lockf)
14053$as_echo "#define MAIL_USE_LOCKF 1" >>confdefs.h
14054 ;;
f199cab1 14055
5476a9a4
GM
14056 *) BLESSMAIL_TARGET="need-blessmail" ;;
14057esac
f199cab1
GM
14058
14059
14060
5476a9a4 14061for ac_func in gethostname \
e7d0e5ee 14062getrusage get_current_dir_name \
eda33f78 14063lrand48 \
a455a5ce 14064select getpagesize setlocale \
aa8715fb 14065utimes getrlimit setrlimit shutdown getaddrinfo \
eda33f78 14066strsignal setitimer \
5476a9a4 14067sendto recvfrom getsockname getpeername getifaddrs freeifaddrs \
2407788f 14068gai_strerror mkstemp getline getdelim sync \
5476a9a4
GM
14069difftime posix_memalign \
14070getpwent endpwent getgrent endgrent \
14071touchlock \
14072cfmakeraw cfsetspeed copysign __executable_start
14073do :
14074 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14075ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14076eval as_val=\$$as_ac_var
14077 if test "x$as_val" = x""yes; then :
14078 cat >>confdefs.h <<_ACEOF
14079#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14080_ACEOF
f199cab1 14081
5476a9a4
GM
14082fi
14083done
f199cab1
GM
14084
14085
5476a9a4
GM
14086## Eric Backus <ericb@lsid.hp.com> says, HP-UX 9.x on HP 700 machines
14087## has a broken `rint' in some library versions including math library
14088## version number A.09.05.
14089## You can fix the math library by installing patch number PHSS_4630.
14090## But we can fix it more reliably for Emacs by just not using rint.
8ad96b1d 14091## We also skip HAVE_RANDOM - see comments in src/conf_post.h.
5476a9a4
GM
14092case $opsys in
14093 hpux*) : ;;
14094 *) for ac_func in random rint
14095do :
14096 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14097ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14098eval as_val=\$$as_ac_var
14099 if test "x$as_val" = x""yes; then :
14100 cat >>confdefs.h <<_ACEOF
14101#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14102_ACEOF
f199cab1 14103
5476a9a4
GM
14104fi
14105done
14106 ;;
14107esac
f199cab1 14108
5476a9a4
GM
14109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unwind_init" >&5
14110$as_echo_n "checking for __builtin_unwind_init... " >&6; }
14111if test "${emacs_cv_func___builtin_unwind_init+set}" = set; then :
067d23c9 14112 $as_echo_n "(cached) " >&6
f199cab1
GM
14113else
14114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
14115/* end confdefs.h. */
14116
067d23c9
KY
14117int
14118main ()
14119{
5476a9a4 14120__builtin_unwind_init ();
067d23c9
KY
14121 ;
14122 return 0;
14123}
14124_ACEOF
5476a9a4
GM
14125if ac_fn_c_try_link "$LINENO"; then :
14126 emacs_cv_func___builtin_unwind_init=yes
067d23c9 14127else
5476a9a4 14128 emacs_cv_func___builtin_unwind_init=no
067d23c9 14129fi
5476a9a4
GM
14130rm -f core conftest.err conftest.$ac_objext \
14131 conftest$ac_exeext conftest.$ac_ext
067d23c9 14132fi
5476a9a4
GM
14133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_func___builtin_unwind_init" >&5
14134$as_echo "$emacs_cv_func___builtin_unwind_init" >&6; }
14135if test $emacs_cv_func___builtin_unwind_init = yes; then
067d23c9 14136
5476a9a4 14137$as_echo "#define HAVE___BUILTIN_UNWIND_INIT 1" >>confdefs.h
f199cab1 14138
067d23c9 14139fi
067d23c9 14140
f199cab1
GM
14141
14142
14143
14144
5476a9a4
GM
14145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
14146$as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
14147if test "${ac_cv_sys_largefile_source+set}" = set; then :
14148 $as_echo_n "(cached) " >&6
14149else
14150 while :; do
14151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14152/* end confdefs.h. */
14153#include <sys/types.h> /* for off_t */
14154 #include <stdio.h>
14155int
14156main ()
14157{
14158int (*fp) (FILE *, off_t, int) = fseeko;
14159 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
14160 ;
14161 return 0;
14162}
14163_ACEOF
14164if ac_fn_c_try_link "$LINENO"; then :
14165 ac_cv_sys_largefile_source=no; break
067d23c9 14166fi
5476a9a4
GM
14167rm -f core conftest.err conftest.$ac_objext \
14168 conftest$ac_exeext conftest.$ac_ext
14169 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14170/* end confdefs.h. */
14171#define _LARGEFILE_SOURCE 1
14172#include <sys/types.h> /* for off_t */
14173 #include <stdio.h>
14174int
14175main ()
14176{
14177int (*fp) (FILE *, off_t, int) = fseeko;
14178 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
14179 ;
14180 return 0;
14181}
14182_ACEOF
14183if ac_fn_c_try_link "$LINENO"; then :
14184 ac_cv_sys_largefile_source=1; break
14185fi
14186rm -f core conftest.err conftest.$ac_objext \
14187 conftest$ac_exeext conftest.$ac_ext
14188 ac_cv_sys_largefile_source=unknown
14189 break
14190done
14191fi
14192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
14193$as_echo "$ac_cv_sys_largefile_source" >&6; }
14194case $ac_cv_sys_largefile_source in #(
14195 no | unknown) ;;
14196 *)
14197cat >>confdefs.h <<_ACEOF
14198#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
14199_ACEOF
14200;;
14201esac
14202rm -rf conftest*
067d23c9 14203
5476a9a4
GM
14204# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
14205# in glibc 2.1.3, but that breaks too many other things.
14206# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
14207if test $ac_cv_sys_largefile_source != unknown; then
067d23c9 14208
5476a9a4 14209$as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
067d23c9 14210
5476a9a4 14211fi
067d23c9
KY
14212
14213
5476a9a4
GM
14214# UNIX98 PTYs.
14215for ac_func in grantpt
14216do :
14217 ac_fn_c_check_func "$LINENO" "grantpt" "ac_cv_func_grantpt"
14218if test "x$ac_cv_func_grantpt" = x""yes; then :
14219 cat >>confdefs.h <<_ACEOF
14220#define HAVE_GRANTPT 1
14221_ACEOF
f199cab1 14222
5476a9a4
GM
14223fi
14224done
f199cab1 14225
f199cab1 14226
5476a9a4 14227# PTY-related GNU extensions.
1146da8d 14228for ac_func in getpt posix_openpt
5476a9a4 14229do :
1146da8d
GM
14230 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14231ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14232eval as_val=\$$as_ac_var
14233 if test "x$as_val" = x""yes; then :
5476a9a4 14234 cat >>confdefs.h <<_ACEOF
1146da8d 14235#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
5476a9a4 14236_ACEOF
f199cab1 14237
5476a9a4
GM
14238fi
14239done
f199cab1 14240
f199cab1 14241
5476a9a4
GM
14242# Check this now, so that we will NOT find the above functions in ncurses.
14243# That is because we have not set up to link ncurses in lib-src.
14244# It's better to believe a function is not available
14245# than to expect to find it in ncurses.
14246# Also we need tputs and friends to be able to build at all.
14247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tputs" >&5
14248$as_echo_n "checking for library containing tputs... " >&6; }
14249# Run a test program that contains a call to tputs, a call that is
14250# never executed. This tests whether a pre-'main' dynamic linker
14251# works with the library. It's too much trouble to actually call
14252# tputs in the test program, due to portability hassles. When
14253# cross-compiling, assume the test program will run if it links.
f199cab1 14254
5476a9a4
GM
14255# Maybe curses should be tried earlier?
14256# See http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9736#35
14257for tputs_library in '' tinfo ncurses terminfo termcap curses; do
14258 OLIBS=$LIBS
14259 if test -z "$tputs_library"; then
14260 LIBS_TERMCAP=
14261 msg='none required'
14262 else
14263 LIBS_TERMCAP=-l$tputs_library
14264 msg=$LIBS_TERMCAP
14265 LIBS="$LIBS_TERMCAP $LIBS"
14266 fi
14267 if test "$cross_compiling" = yes; then :
14268 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
14269/* end confdefs.h. */
14270
5476a9a4
GM
14271 extern void tputs (const char *, int, int (*)(int));
14272 int main (int argc, char **argv)
14273 {
14274 if (argc == 10000)
14275 tputs (argv[0], 0, 0);
14276 return 0;
14277 }
14278
067d23c9
KY
14279_ACEOF
14280if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 14281
067d23c9 14282else
5476a9a4 14283 msg=no
067d23c9
KY
14284fi
14285rm -f core conftest.err conftest.$ac_objext \
14286 conftest$ac_exeext conftest.$ac_ext
067d23c9 14287else
5476a9a4 14288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
14289/* end confdefs.h. */
14290
5476a9a4
GM
14291 extern void tputs (const char *, int, int (*)(int));
14292 int main (int argc, char **argv)
14293 {
14294 if (argc == 10000)
14295 tputs (argv[0], 0, 0);
14296 return 0;
14297 }
14298
067d23c9 14299_ACEOF
5476a9a4
GM
14300if ac_fn_c_try_run "$LINENO"; then :
14301
067d23c9 14302else
5476a9a4 14303 msg=no
067d23c9 14304fi
5476a9a4
GM
14305rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14306 conftest.$ac_objext conftest.beam conftest.$ac_ext
067d23c9 14307fi
5476a9a4
GM
14308
14309 LIBS=$OLIBS
14310 if test "X$msg" != Xno; then
14311 break
14312 fi
14313done
14314{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $msg" >&5
14315$as_echo "$msg" >&6; }
14316if test "X$msg" = Xno; then
14317 as_fn_error "The required function \`tputs' was not found in any library.
14318The following libraries were tried (in order):
14319 libtinfo, libncurses, libterminfo, libtermcap, libcurses
14320Please try installing whichever of these libraries is most appropriate
14321for your system, together with its header files.
14322For example, a libncurses-dev(el) or similar package." "$LINENO" 5
067d23c9
KY
14323fi
14324
5476a9a4
GM
14325## Use termcap instead of terminfo?
14326## Only true for: freebsd < 40000, ms-w32, msdos, netbsd < 599002500.
14327TERMINFO=yes
14328## FIXME? In the cases below where we unconditionally set
14329## LIBS_TERMCAP="-lncurses", this overrides LIBS_TERMCAP = -ltinfo,
14330## if that was found above to have tputs.
14331## Should we use the gnu* logic everywhere?
14332case "$opsys" in
14333 ## darwin: Prevents crashes when running Emacs in Terminal.app under 10.2.
14334 ## The ncurses library has been moved out of the System framework in
14335 ## Mac OS X 10.2. So if configure detects it, set the command-line
14336 ## option to use it.
14337 darwin) LIBS_TERMCAP="-lncurses" ;;
14338
14339 gnu*) test -z "$LIBS_TERMCAP" && LIBS_TERMCAP="-lncurses" ;;
14340
14341 freebsd)
14342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether FreeBSD is new enough to use terminfo" >&5
14343$as_echo_n "checking whether FreeBSD is new enough to use terminfo... " >&6; }
14344 if test "${emacs_cv_freebsd_terminfo+set}" = set; then :
067d23c9
KY
14345 $as_echo_n "(cached) " >&6
14346else
5476a9a4 14347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 14348/* end confdefs.h. */
5476a9a4 14349#include <osreldate.h>
067d23c9
KY
14350int
14351main ()
14352{
5476a9a4
GM
14353#if __FreeBSD_version < 400000
14354fail;
14355#endif
14356
067d23c9
KY
14357 ;
14358 return 0;
14359}
14360_ACEOF
14361if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 14362 emacs_cv_freebsd_terminfo=yes
067d23c9 14363else
5476a9a4 14364 emacs_cv_freebsd_terminfo=no
067d23c9
KY
14365fi
14366rm -f core conftest.err conftest.$ac_objext \
14367 conftest$ac_exeext conftest.$ac_ext
14368fi
5476a9a4
GM
14369
14370
14371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_freebsd_terminfo" >&5
14372$as_echo "$emacs_cv_freebsd_terminfo" >&6; }
14373
14374 if test $emacs_cv_freebsd_terminfo = yes; then
14375 LIBS_TERMCAP="-lncurses"
14376 else
14377 TERMINFO=no
14378 LIBS_TERMCAP="-ltermcap"
14379 fi
14380 ;;
14381
14382 netbsd)
14383 if test "x$LIBS_TERMCAP" != "x-lterminfo"; then
14384 TERMINFO=no
14385 LIBS_TERMCAP="-ltermcap"
14386 fi
14387 ;;
14388
87e1a811 14389 openbsd | dragonfly) LIBS_TERMCAP="-lncurses" ;;
5476a9a4
GM
14390
14391 ## hpux: Make sure we get select from libc rather than from libcurses
14392 ## because libcurses on HPUX 10.10 has a broken version of select.
14393 ## We used to use -lc -lcurses, but this may be cleaner.
14394 ## FIXME? But TERMINFO = yes on hpux (it used to be explicitly
14395 # set that way, now it uses the default). Isn't this a contradiction?
14396 hpux*) LIBS_TERMCAP="-ltermcap" ;;
14397
14398esac
14399
14400TERMCAP_OBJ=tparam.o
14401if test $TERMINFO = yes; then
14402
14403$as_echo "#define TERMINFO 1" >>confdefs.h
14404
14405 TERMCAP_OBJ=terminfo.o
067d23c9
KY
14406fi
14407
f199cab1 14408
067d23c9 14409
5476a9a4
GM
14410
14411# Do we have res_init, for detecting changes in /etc/resolv.conf?
14412# On Darwin, res_init appears not to be useful: see bug#562 and
14413# http://lists.gnu.org/archive/html/emacs-devel/2007-11/msg01467.html
14414resolv=no
14415
14416if test $opsys != darwin; then
14417
14418 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14419/* end confdefs.h. */
14420#include <netinet/in.h>
14421#include <arpa/nameser.h>
14422#include <resolv.h>
067d23c9
KY
14423int
14424main ()
14425{
5476a9a4 14426return res_init();
067d23c9
KY
14427 ;
14428 return 0;
14429}
14430_ACEOF
14431if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 14432 have_res_init=yes
067d23c9 14433else
5476a9a4 14434 have_res_init=no
067d23c9
KY
14435fi
14436rm -f core conftest.err conftest.$ac_objext \
14437 conftest$ac_exeext conftest.$ac_ext
5476a9a4
GM
14438 if test "$have_res_init" = no; then
14439 OLIBS="$LIBS"
14440 LIBS="$LIBS -lresolv"
14441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_init with -lresolv" >&5
14442$as_echo_n "checking for res_init with -lresolv... " >&6; }
14443 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 14444/* end confdefs.h. */
5476a9a4
GM
14445#include <netinet/in.h>
14446#include <arpa/nameser.h>
14447#include <resolv.h>
067d23c9
KY
14448int
14449main ()
14450{
5476a9a4 14451return res_init();
067d23c9
KY
14452 ;
14453 return 0;
14454}
14455_ACEOF
14456if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 14457 have_res_init=yes
067d23c9 14458else
5476a9a4 14459 have_res_init=no
067d23c9
KY
14460fi
14461rm -f core conftest.err conftest.$ac_objext \
14462 conftest$ac_exeext conftest.$ac_ext
5476a9a4
GM
14463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_res_init" >&5
14464$as_echo "$have_res_init" >&6; }
14465 if test "$have_res_init" = yes ; then
14466 resolv=yes
14467 fi
14468 LIBS="$OLIBS"
14469 fi
067d23c9 14470
5476a9a4
GM
14471 if test "$have_res_init" = yes; then
14472
14473$as_echo "#define HAVE_RES_INIT 1" >>confdefs.h
067d23c9 14474
5476a9a4 14475 fi
067d23c9 14476fi
5476a9a4
GM
14477# Do we need the Hesiod library to provide the support routines?
14478LIBHESIOD=
14479if test "$with_hesiod" != no ; then
14480 # Don't set $LIBS here -- see comments above. FIXME which comments?
14481 ac_fn_c_check_func "$LINENO" "res_send" "ac_cv_func_res_send"
14482if test "x$ac_cv_func_res_send" = x""yes; then :
f199cab1 14483
5476a9a4
GM
14484else
14485 ac_fn_c_check_func "$LINENO" "__res_send" "ac_cv_func___res_send"
14486if test "x$ac_cv_func___res_send" = x""yes; then :
f199cab1 14487
5476a9a4
GM
14488else
14489 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_send in -lresolv" >&5
14490$as_echo_n "checking for res_send in -lresolv... " >&6; }
14491if test "${ac_cv_lib_resolv_res_send+set}" = set; then :
067d23c9
KY
14492 $as_echo_n "(cached) " >&6
14493else
14494 ac_check_lib_save_LIBS=$LIBS
5476a9a4 14495LIBS="-lresolv $LIBS"
067d23c9
KY
14496cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14497/* end confdefs.h. */
14498
14499/* Override any GCC internal prototype to avoid an error.
14500 Use char because int might match the return type of a GCC
14501 builtin and then its argument prototype would still apply. */
14502#ifdef __cplusplus
14503extern "C"
14504#endif
5476a9a4 14505char res_send ();
067d23c9
KY
14506int
14507main ()
14508{
5476a9a4 14509return res_send ();
067d23c9
KY
14510 ;
14511 return 0;
14512}
14513_ACEOF
14514if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 14515 ac_cv_lib_resolv_res_send=yes
067d23c9 14516else
5476a9a4 14517 ac_cv_lib_resolv_res_send=no
067d23c9
KY
14518fi
14519rm -f core conftest.err conftest.$ac_objext \
f199cab1
GM
14520 conftest$ac_exeext conftest.$ac_ext
14521LIBS=$ac_check_lib_save_LIBS
14522fi
5476a9a4
GM
14523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_send" >&5
14524$as_echo "$ac_cv_lib_resolv_res_send" >&6; }
14525if test "x$ac_cv_lib_resolv_res_send" = x""yes; then :
14526 resolv=yes
14527else
14528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __res_send in -lresolv" >&5
14529$as_echo_n "checking for __res_send in -lresolv... " >&6; }
14530if test "${ac_cv_lib_resolv___res_send+set}" = set; then :
f199cab1
GM
14531 $as_echo_n "(cached) " >&6
14532else
14533 ac_check_lib_save_LIBS=$LIBS
5476a9a4 14534LIBS="-lresolv $LIBS"
f199cab1
GM
14535cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14536/* end confdefs.h. */
4717915f 14537
f199cab1
GM
14538/* Override any GCC internal prototype to avoid an error.
14539 Use char because int might match the return type of a GCC
14540 builtin and then its argument prototype would still apply. */
14541#ifdef __cplusplus
14542extern "C"
14543#endif
5476a9a4 14544char __res_send ();
f199cab1
GM
14545int
14546main ()
14547{
5476a9a4 14548return __res_send ();
f199cab1
GM
14549 ;
14550 return 0;
14551}
14552_ACEOF
14553if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 14554 ac_cv_lib_resolv___res_send=yes
f199cab1 14555else
5476a9a4 14556 ac_cv_lib_resolv___res_send=no
f199cab1
GM
14557fi
14558rm -f core conftest.err conftest.$ac_objext \
14559 conftest$ac_exeext conftest.$ac_ext
14560LIBS=$ac_check_lib_save_LIBS
14561fi
5476a9a4
GM
14562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv___res_send" >&5
14563$as_echo "$ac_cv_lib_resolv___res_send" >&6; }
14564if test "x$ac_cv_lib_resolv___res_send" = x""yes; then :
14565 resolv=yes
067d23c9 14566fi
f199cab1 14567
5476a9a4 14568fi
1f5d53eb 14569
5476a9a4 14570fi
067d23c9 14571
067d23c9
KY
14572fi
14573
5476a9a4
GM
14574 if test "$resolv" = yes ; then
14575 RESOLVLIB=-lresolv
14576 else
14577 RESOLVLIB=
14578 fi
14579 ac_fn_c_check_func "$LINENO" "hes_getmailhost" "ac_cv_func_hes_getmailhost"
14580if test "x$ac_cv_func_hes_getmailhost" = x""yes; then :
14581
14582else
14583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hes_getmailhost in -lhesiod" >&5
14584$as_echo_n "checking for hes_getmailhost in -lhesiod... " >&6; }
14585if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then :
14586 $as_echo_n "(cached) " >&6
14587else
14588 ac_check_lib_save_LIBS=$LIBS
14589LIBS="-lhesiod $RESOLVLIB $LIBS"
14590cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 14591/* end confdefs.h. */
5476a9a4
GM
14592
14593/* Override any GCC internal prototype to avoid an error.
14594 Use char because int might match the return type of a GCC
14595 builtin and then its argument prototype would still apply. */
14596#ifdef __cplusplus
14597extern "C"
14598#endif
14599char hes_getmailhost ();
067d23c9
KY
14600int
14601main ()
14602{
5476a9a4 14603return hes_getmailhost ();
067d23c9
KY
14604 ;
14605 return 0;
14606}
14607_ACEOF
f199cab1 14608if ac_fn_c_try_link "$LINENO"; then :
5476a9a4
GM
14609 ac_cv_lib_hesiod_hes_getmailhost=yes
14610else
14611 ac_cv_lib_hesiod_hes_getmailhost=no
067d23c9 14612fi
f199cab1
GM
14613rm -f core conftest.err conftest.$ac_objext \
14614 conftest$ac_exeext conftest.$ac_ext
5476a9a4 14615LIBS=$ac_check_lib_save_LIBS
067d23c9 14616fi
5476a9a4
GM
14617{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5
14618$as_echo "$ac_cv_lib_hesiod_hes_getmailhost" >&6; }
14619if test "x$ac_cv_lib_hesiod_hes_getmailhost" = x""yes; then :
14620 hesiod=yes
14621else
14622 :
067d23c9
KY
14623fi
14624
c5a68906 14625fi
f199cab1
GM
14626
14627
5476a9a4 14628 if test x"$hesiod" = xyes; then
f199cab1 14629
5476a9a4 14630$as_echo "#define HAVE_LIBHESIOD 1" >>confdefs.h
f199cab1 14631
5476a9a4 14632 LIBHESIOD=-lhesiod
c5a68906 14633 fi
5476a9a4 14634fi
4fc2b746 14635
4fc2b746 14636
5476a9a4
GM
14637# Do we need libresolv (due to res_init or Hesiod)?
14638if test "$resolv" = yes && test $opsys != darwin; then
4fc2b746 14639
5476a9a4 14640$as_echo "#define HAVE_LIBRESOLV 1" >>confdefs.h
4fc2b746 14641
5476a9a4
GM
14642 LIBRESOLV=-lresolv
14643else
14644 LIBRESOLV=
14645fi
4fc2b746 14646
4fc2b746 14647
5476a9a4
GM
14648# These tell us which Kerberos-related libraries to use.
14649COM_ERRLIB=
14650CRYPTOLIB=
14651KRB5LIB=
14652DESLIB=
14653KRB4LIB=
4fc2b746 14654
5476a9a4
GM
14655if test "${with_kerberos}" != no; then
14656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for com_err in -lcom_err" >&5
14657$as_echo_n "checking for com_err in -lcom_err... " >&6; }
14658if test "${ac_cv_lib_com_err_com_err+set}" = set; then :
14659 $as_echo_n "(cached) " >&6
14660else
14661 ac_check_lib_save_LIBS=$LIBS
14662LIBS="-lcom_err $LIBS"
14663cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14664/* end confdefs.h. */
4fc2b746 14665
5476a9a4
GM
14666/* Override any GCC internal prototype to avoid an error.
14667 Use char because int might match the return type of a GCC
14668 builtin and then its argument prototype would still apply. */
14669#ifdef __cplusplus
14670extern "C"
14671#endif
14672char com_err ();
14673int
14674main ()
14675{
14676return com_err ();
14677 ;
14678 return 0;
14679}
14680_ACEOF
14681if ac_fn_c_try_link "$LINENO"; then :
14682 ac_cv_lib_com_err_com_err=yes
14683else
14684 ac_cv_lib_com_err_com_err=no
14685fi
14686rm -f core conftest.err conftest.$ac_objext \
14687 conftest$ac_exeext conftest.$ac_ext
14688LIBS=$ac_check_lib_save_LIBS
14689fi
14690{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_com_err_com_err" >&5
14691$as_echo "$ac_cv_lib_com_err_com_err" >&6; }
14692if test "x$ac_cv_lib_com_err_com_err" = x""yes; then :
14693 have_com_err=yes
14694else
14695 have_com_err=no
14696fi
f199cab1 14697
5476a9a4
GM
14698 if test $have_com_err = yes; then
14699 COM_ERRLIB=-lcom_err
14700 LIBS="$COM_ERRLIB $LIBS"
f199cab1 14701
5476a9a4 14702$as_echo "#define HAVE_LIBCOM_ERR 1" >>confdefs.h
f199cab1 14703
5476a9a4
GM
14704 fi
14705 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lcrypto" >&5
14706$as_echo_n "checking for mit_des_cbc_encrypt in -lcrypto... " >&6; }
14707if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then :
14708 $as_echo_n "(cached) " >&6
14709else
14710 ac_check_lib_save_LIBS=$LIBS
14711LIBS="-lcrypto $LIBS"
14712cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14713/* end confdefs.h. */
f199cab1 14714
5476a9a4
GM
14715/* Override any GCC internal prototype to avoid an error.
14716 Use char because int might match the return type of a GCC
14717 builtin and then its argument prototype would still apply. */
14718#ifdef __cplusplus
14719extern "C"
14720#endif
14721char mit_des_cbc_encrypt ();
14722int
14723main ()
14724{
14725return mit_des_cbc_encrypt ();
14726 ;
14727 return 0;
14728}
14729_ACEOF
14730if ac_fn_c_try_link "$LINENO"; then :
14731 ac_cv_lib_crypto_mit_des_cbc_encrypt=yes
14732else
14733 ac_cv_lib_crypto_mit_des_cbc_encrypt=no
14734fi
14735rm -f core conftest.err conftest.$ac_objext \
14736 conftest$ac_exeext conftest.$ac_ext
14737LIBS=$ac_check_lib_save_LIBS
14738fi
14739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5
14740$as_echo "$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6; }
14741if test "x$ac_cv_lib_crypto_mit_des_cbc_encrypt" = x""yes; then :
14742 have_crypto=yes
14743else
14744 have_crypto=no
14745fi
f199cab1 14746
5476a9a4
GM
14747 if test $have_crypto = yes; then
14748 CRYPTOLIB=-lcrypto
14749 LIBS="$CRYPTOLIB $LIBS"
f199cab1 14750
5476a9a4 14751$as_echo "#define HAVE_LIBCRYPTO 1" >>confdefs.h
f199cab1 14752
5476a9a4
GM
14753 fi
14754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
14755$as_echo_n "checking for mit_des_cbc_encrypt in -lk5crypto... " >&6; }
14756if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then :
14757 $as_echo_n "(cached) " >&6
14758else
14759 ac_check_lib_save_LIBS=$LIBS
14760LIBS="-lk5crypto $LIBS"
14761cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14762/* end confdefs.h. */
f199cab1 14763
5476a9a4
GM
14764/* Override any GCC internal prototype to avoid an error.
14765 Use char because int might match the return type of a GCC
14766 builtin and then its argument prototype would still apply. */
14767#ifdef __cplusplus
14768extern "C"
14769#endif
14770char mit_des_cbc_encrypt ();
14771int
14772main ()
14773{
14774return mit_des_cbc_encrypt ();
14775 ;
14776 return 0;
14777}
14778_ACEOF
14779if ac_fn_c_try_link "$LINENO"; then :
14780 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes
14781else
14782 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no
14783fi
14784rm -f core conftest.err conftest.$ac_objext \
14785 conftest$ac_exeext conftest.$ac_ext
14786LIBS=$ac_check_lib_save_LIBS
14787fi
14788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5
14789$as_echo "$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6; }
14790if test "x$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" = x""yes; then :
14791 have_k5crypto=yes
14792else
14793 have_k5crypto=no
4fc2b746 14794fi
4fc2b746 14795
5476a9a4
GM
14796 if test $have_k5crypto = yes; then
14797 CRYPTOLIB=-lk5crypto
14798 LIBS="$CRYPTOLIB $LIBS"
4fc2b746 14799
5476a9a4 14800$as_echo "#define HAVE_LIBK5CRYPTO 1" >>confdefs.h
4fc2b746 14801
5476a9a4
GM
14802 fi
14803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5_init_context in -lkrb5" >&5
14804$as_echo_n "checking for krb5_init_context in -lkrb5... " >&6; }
14805if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then :
14806 $as_echo_n "(cached) " >&6
14807else
14808 ac_check_lib_save_LIBS=$LIBS
14809LIBS="-lkrb5 $LIBS"
14810cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14811/* end confdefs.h. */
4fc2b746 14812
5476a9a4
GM
14813/* Override any GCC internal prototype to avoid an error.
14814 Use char because int might match the return type of a GCC
14815 builtin and then its argument prototype would still apply. */
14816#ifdef __cplusplus
14817extern "C"
14818#endif
14819char krb5_init_context ();
14820int
14821main ()
14822{
14823return krb5_init_context ();
14824 ;
14825 return 0;
14826}
14827_ACEOF
14828if ac_fn_c_try_link "$LINENO"; then :
14829 ac_cv_lib_krb5_krb5_init_context=yes
14830else
14831 ac_cv_lib_krb5_krb5_init_context=no
14832fi
14833rm -f core conftest.err conftest.$ac_objext \
14834 conftest$ac_exeext conftest.$ac_ext
14835LIBS=$ac_check_lib_save_LIBS
14836fi
14837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb5_krb5_init_context" >&5
14838$as_echo "$ac_cv_lib_krb5_krb5_init_context" >&6; }
14839if test "x$ac_cv_lib_krb5_krb5_init_context" = x""yes; then :
14840 have_krb5=yes
14841else
14842 have_krb5=no
14843fi
f199cab1 14844
5476a9a4
GM
14845 if test $have_krb5=yes; then
14846 KRB5LIB=-lkrb5
14847 LIBS="$KRB5LIB $LIBS"
f199cab1 14848
5476a9a4 14849$as_echo "#define HAVE_LIBKRB5 1" >>confdefs.h
f199cab1 14850
5476a9a4
GM
14851 fi
14852 if test "${with_kerberos5}" = no; then
14853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes425" >&5
14854$as_echo_n "checking for des_cbc_encrypt in -ldes425... " >&6; }
14855if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then :
f199cab1
GM
14856 $as_echo_n "(cached) " >&6
14857else
5476a9a4
GM
14858 ac_check_lib_save_LIBS=$LIBS
14859LIBS="-ldes425 $LIBS"
14860cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3e0be4ab 14861/* end confdefs.h. */
f199cab1 14862
5476a9a4
GM
14863/* Override any GCC internal prototype to avoid an error.
14864 Use char because int might match the return type of a GCC
14865 builtin and then its argument prototype would still apply. */
14866#ifdef __cplusplus
14867extern "C"
14868#endif
14869char des_cbc_encrypt ();
3e0be4ab
GM
14870int
14871main ()
14872{
5476a9a4 14873return des_cbc_encrypt ();
3e0be4ab
GM
14874 ;
14875 return 0;
14876}
14877_ACEOF
5476a9a4
GM
14878if ac_fn_c_try_link "$LINENO"; then :
14879 ac_cv_lib_des425_des_cbc_encrypt=yes
3e0be4ab 14880else
5476a9a4 14881 ac_cv_lib_des425_des_cbc_encrypt=no
3e0be4ab 14882fi
5476a9a4
GM
14883rm -f core conftest.err conftest.$ac_objext \
14884 conftest$ac_exeext conftest.$ac_ext
14885LIBS=$ac_check_lib_save_LIBS
4fc2b746 14886fi
5476a9a4
GM
14887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
14888$as_echo "$ac_cv_lib_des425_des_cbc_encrypt" >&6; }
14889if test "x$ac_cv_lib_des425_des_cbc_encrypt" = x""yes; then :
14890 have_des425=yes
14891else
14892 have_des425=no
f199cab1 14893fi
6c051bab 14894
5476a9a4
GM
14895 if test $have_des425 = yes; then
14896 DESLIB=-ldes425
14897 LIBS="$DESLIB $LIBS"
6c051bab 14898
5476a9a4 14899$as_echo "#define HAVE_LIBDES425 1" >>confdefs.h
f199cab1 14900
5476a9a4
GM
14901 else
14902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes" >&5
14903$as_echo_n "checking for des_cbc_encrypt in -ldes... " >&6; }
14904if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then :
14905 $as_echo_n "(cached) " >&6
14906else
14907 ac_check_lib_save_LIBS=$LIBS
14908LIBS="-ldes $LIBS"
14909cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14910/* end confdefs.h. */
f199cab1 14911
5476a9a4
GM
14912/* Override any GCC internal prototype to avoid an error.
14913 Use char because int might match the return type of a GCC
14914 builtin and then its argument prototype would still apply. */
14915#ifdef __cplusplus
14916extern "C"
14917#endif
14918char des_cbc_encrypt ();
14919int
14920main ()
14921{
14922return des_cbc_encrypt ();
14923 ;
14924 return 0;
14925}
14926_ACEOF
14927if ac_fn_c_try_link "$LINENO"; then :
14928 ac_cv_lib_des_des_cbc_encrypt=yes
14929else
14930 ac_cv_lib_des_des_cbc_encrypt=no
14931fi
14932rm -f core conftest.err conftest.$ac_objext \
14933 conftest$ac_exeext conftest.$ac_ext
14934LIBS=$ac_check_lib_save_LIBS
14935fi
14936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
14937$as_echo "$ac_cv_lib_des_des_cbc_encrypt" >&6; }
14938if test "x$ac_cv_lib_des_des_cbc_encrypt" = x""yes; then :
14939 have_des=yes
14940else
14941 have_des=no
14942fi
f199cab1 14943
5476a9a4
GM
14944 if test $have_des = yes; then
14945 DESLIB=-ldes
14946 LIBS="$DESLIB $LIBS"
f199cab1 14947
5476a9a4 14948$as_echo "#define HAVE_LIBDES 1" >>confdefs.h
f199cab1 14949
5476a9a4
GM
14950 fi
14951 fi
14952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb4" >&5
14953$as_echo_n "checking for krb_get_cred in -lkrb4... " >&6; }
14954if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then :
942f733f
PE
14955 $as_echo_n "(cached) " >&6
14956else
5476a9a4
GM
14957 ac_check_lib_save_LIBS=$LIBS
14958LIBS="-lkrb4 $LIBS"
14959cat confdefs.h - <<_ACEOF >conftest.$ac_ext
942f733f 14960/* end confdefs.h. */
942f733f 14961
5476a9a4
GM
14962/* Override any GCC internal prototype to avoid an error.
14963 Use char because int might match the return type of a GCC
14964 builtin and then its argument prototype would still apply. */
14965#ifdef __cplusplus
14966extern "C"
14967#endif
14968char krb_get_cred ();
942f733f
PE
14969int
14970main ()
14971{
5476a9a4 14972return krb_get_cred ();
942f733f
PE
14973 ;
14974 return 0;
14975}
14976_ACEOF
5476a9a4
GM
14977if ac_fn_c_try_link "$LINENO"; then :
14978 ac_cv_lib_krb4_krb_get_cred=yes
14979else
14980 ac_cv_lib_krb4_krb_get_cred=no
14981fi
14982rm -f core conftest.err conftest.$ac_objext \
14983 conftest$ac_exeext conftest.$ac_ext
14984LIBS=$ac_check_lib_save_LIBS
14985fi
14986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb4_krb_get_cred" >&5
14987$as_echo "$ac_cv_lib_krb4_krb_get_cred" >&6; }
14988if test "x$ac_cv_lib_krb4_krb_get_cred" = x""yes; then :
14989 have_krb4=yes
14990else
14991 have_krb4=no
14992fi
14993
14994 if test $have_krb4 = yes; then
14995 KRB4LIB=-lkrb4
14996 LIBS="$KRB4LIB $LIBS"
14997
14998$as_echo "#define HAVE_LIBKRB4 1" >>confdefs.h
14999
15000 else
15001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb" >&5
15002$as_echo_n "checking for krb_get_cred in -lkrb... " >&6; }
15003if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then :
15004 $as_echo_n "(cached) " >&6
3e0be4ab 15005else
5476a9a4
GM
15006 ac_check_lib_save_LIBS=$LIBS
15007LIBS="-lkrb $LIBS"
15008cat confdefs.h - <<_ACEOF >conftest.$ac_ext
942f733f 15009/* end confdefs.h. */
942f733f 15010
5476a9a4
GM
15011/* Override any GCC internal prototype to avoid an error.
15012 Use char because int might match the return type of a GCC
15013 builtin and then its argument prototype would still apply. */
15014#ifdef __cplusplus
15015extern "C"
15016#endif
15017char krb_get_cred ();
942f733f
PE
15018int
15019main ()
15020{
5476a9a4 15021return krb_get_cred ();
942f733f
PE
15022 ;
15023 return 0;
15024}
15025_ACEOF
5476a9a4
GM
15026if ac_fn_c_try_link "$LINENO"; then :
15027 ac_cv_lib_krb_krb_get_cred=yes
942f733f 15028else
5476a9a4 15029 ac_cv_lib_krb_krb_get_cred=no
942f733f 15030fi
5476a9a4
GM
15031rm -f core conftest.err conftest.$ac_objext \
15032 conftest$ac_exeext conftest.$ac_ext
15033LIBS=$ac_check_lib_save_LIBS
3e0be4ab 15034fi
5476a9a4
GM
15035{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb_krb_get_cred" >&5
15036$as_echo "$ac_cv_lib_krb_krb_get_cred" >&6; }
15037if test "x$ac_cv_lib_krb_krb_get_cred" = x""yes; then :
15038 have_krb=yes
15039else
15040 have_krb=no
942f733f 15041fi
f199cab1 15042
5476a9a4
GM
15043 if test $have_krb = yes; then
15044 KRB4LIB=-lkrb
15045 LIBS="$KRB4LIB $LIBS"
15046
15047$as_echo "#define HAVE_LIBKRB 1" >>confdefs.h
15048
15049 fi
15050 fi
f199cab1
GM
15051 fi
15052
5476a9a4
GM
15053 if test "${with_kerberos5}" != no; then
15054 for ac_header in krb5.h
15055do :
15056 ac_fn_c_check_header_mongrel "$LINENO" "krb5.h" "ac_cv_header_krb5_h" "$ac_includes_default"
15057if test "x$ac_cv_header_krb5_h" = x""yes; then :
15058 cat >>confdefs.h <<_ACEOF
15059#define HAVE_KRB5_H 1
15060_ACEOF
15061 ac_fn_c_check_member "$LINENO" "krb5_error" "text" "ac_cv_member_krb5_error_text" "#include <krb5.h>
15062"
15063if test "x$ac_cv_member_krb5_error_text" = x""yes; then :
15064
f199cab1 15065cat >>confdefs.h <<_ACEOF
5476a9a4 15066#define HAVE_KRB5_ERROR_TEXT 1
f199cab1
GM
15067_ACEOF
15068
15069
5476a9a4
GM
15070fi
15071ac_fn_c_check_member "$LINENO" "krb5_error" "e_text" "ac_cv_member_krb5_error_e_text" "#include <krb5.h>
15072"
15073if test "x$ac_cv_member_krb5_error_e_text" = x""yes; then :
f199cab1 15074
5476a9a4
GM
15075cat >>confdefs.h <<_ACEOF
15076#define HAVE_KRB5_ERROR_E_TEXT 1
15077_ACEOF
f199cab1
GM
15078
15079
5476a9a4 15080fi
f199cab1 15081
5476a9a4 15082fi
f199cab1 15083
5476a9a4 15084done
f199cab1 15085
5476a9a4
GM
15086 else
15087 for ac_header in des.h
15088do :
15089 ac_fn_c_check_header_mongrel "$LINENO" "des.h" "ac_cv_header_des_h" "$ac_includes_default"
15090if test "x$ac_cv_header_des_h" = x""yes; then :
15091 cat >>confdefs.h <<_ACEOF
15092#define HAVE_DES_H 1
15093_ACEOF
f199cab1 15094
5476a9a4
GM
15095else
15096 for ac_header in kerberosIV/des.h
15097do :
15098 ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/des.h" "ac_cv_header_kerberosIV_des_h" "$ac_includes_default"
15099if test "x$ac_cv_header_kerberosIV_des_h" = x""yes; then :
15100 cat >>confdefs.h <<_ACEOF
15101#define HAVE_KERBEROSIV_DES_H 1
15102_ACEOF
f199cab1 15103
5476a9a4
GM
15104else
15105 for ac_header in kerberos/des.h
15106do :
15107 ac_fn_c_check_header_mongrel "$LINENO" "kerberos/des.h" "ac_cv_header_kerberos_des_h" "$ac_includes_default"
15108if test "x$ac_cv_header_kerberos_des_h" = x""yes; then :
15109 cat >>confdefs.h <<_ACEOF
15110#define HAVE_KERBEROS_DES_H 1
15111_ACEOF
f199cab1 15112
5476a9a4 15113fi
f199cab1 15114
5476a9a4
GM
15115done
15116
15117fi
15118
15119done
15120
15121fi
15122
15123done
15124
15125 for ac_header in krb.h
f199cab1 15126do :
5476a9a4
GM
15127 ac_fn_c_check_header_mongrel "$LINENO" "krb.h" "ac_cv_header_krb_h" "$ac_includes_default"
15128if test "x$ac_cv_header_krb_h" = x""yes; then :
f199cab1 15129 cat >>confdefs.h <<_ACEOF
5476a9a4
GM
15130#define HAVE_KRB_H 1
15131_ACEOF
15132
15133else
15134 for ac_header in kerberosIV/krb.h
15135do :
15136 ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/krb.h" "ac_cv_header_kerberosIV_krb_h" "$ac_includes_default"
15137if test "x$ac_cv_header_kerberosIV_krb_h" = x""yes; then :
15138 cat >>confdefs.h <<_ACEOF
15139#define HAVE_KERBEROSIV_KRB_H 1
15140_ACEOF
15141
15142else
15143 for ac_header in kerberos/krb.h
15144do :
15145 ac_fn_c_check_header_mongrel "$LINENO" "kerberos/krb.h" "ac_cv_header_kerberos_krb_h" "$ac_includes_default"
15146if test "x$ac_cv_header_kerberos_krb_h" = x""yes; then :
15147 cat >>confdefs.h <<_ACEOF
15148#define HAVE_KERBEROS_KRB_H 1
f199cab1 15149_ACEOF
942f733f 15150
3e0be4ab 15151fi
942f733f 15152
f199cab1
GM
15153done
15154
5476a9a4
GM
15155fi
15156
15157done
15158
15159fi
15160
15161done
15162
15163 fi
15164 for ac_header in com_err.h
f199cab1 15165do :
5476a9a4
GM
15166 ac_fn_c_check_header_mongrel "$LINENO" "com_err.h" "ac_cv_header_com_err_h" "$ac_includes_default"
15167if test "x$ac_cv_header_com_err_h" = x""yes; then :
f199cab1 15168 cat >>confdefs.h <<_ACEOF
5476a9a4 15169#define HAVE_COM_ERR_H 1
f199cab1
GM
15170_ACEOF
15171
3e0be4ab 15172fi
f199cab1 15173
5476a9a4 15174done
3e0be4ab
GM
15175
15176fi
15177
f199cab1
GM
15178
15179
15180
15181
f199cab1
GM
15182
15183
15184
15185
15186
5476a9a4
GM
15187 for ac_func in $ac_func_list
15188do :
15189 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15190ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15191eval as_val=\$$as_ac_var
15192 if test "x$as_val" = x""yes; then :
15193 cat >>confdefs.h <<_ACEOF
15194#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15195_ACEOF
15196
15197fi
15198done
15199
f199cab1
GM
15200
15201
15202
5476a9a4
GM
15203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime caches TZ" >&5
15204$as_echo_n "checking whether localtime caches TZ... " >&6; }
15205if test "${emacs_cv_localtime_cache+set}" = set; then :
15206 $as_echo_n "(cached) " >&6
15207else
15208 if test x$ac_cv_func_tzset = xyes; then
15209if test "$cross_compiling" = yes; then :
15210 # If we have tzset, assume the worst when cross-compiling.
15211emacs_cv_localtime_cache=yes
15212else
15213 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15214/* end confdefs.h. */
15215#include <time.h>
15216char TZ_GMT0[] = "TZ=GMT0";
15217char TZ_PST8[] = "TZ=PST8";
15218main()
15219{
15220 time_t now = time ((time_t *) 0);
15221 int hour_GMT0, hour_unset;
15222 if (putenv (TZ_GMT0) != 0)
15223 exit (1);
15224 hour_GMT0 = localtime (&now)->tm_hour;
15225 unsetenv("TZ");
15226 hour_unset = localtime (&now)->tm_hour;
15227 if (putenv (TZ_PST8) != 0)
15228 exit (1);
15229 if (localtime (&now)->tm_hour == hour_GMT0)
15230 exit (1);
15231 unsetenv("TZ");
15232 if (localtime (&now)->tm_hour != hour_unset)
15233 exit (1);
15234 exit (0);
15235}
15236_ACEOF
15237if ac_fn_c_try_run "$LINENO"; then :
15238 emacs_cv_localtime_cache=no
15239else
15240 emacs_cv_localtime_cache=yes
15241fi
15242rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15243 conftest.$ac_objext conftest.beam conftest.$ac_ext
15244fi
f199cab1 15245
5476a9a4
GM
15246else
15247 # If we lack tzset, report that localtime does not cache TZ,
15248 # since we can't invalidate the cache if we don't have tzset.
15249 emacs_cv_localtime_cache=no
15250fi
15251fi
15252{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_localtime_cache" >&5
15253$as_echo "$emacs_cv_localtime_cache" >&6; }
15254if test $emacs_cv_localtime_cache = yes; then
f199cab1 15255
5476a9a4 15256$as_echo "#define LOCALTIME_CACHE 1" >>confdefs.h
f199cab1 15257
5476a9a4 15258fi
f199cab1 15259
5476a9a4
GM
15260ok_so_far=yes
15261ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket"
15262if test "x$ac_cv_func_socket" = x""yes; then :
3e0be4ab 15263
5476a9a4
GM
15264else
15265 ok_so_far=no
15266fi
f199cab1 15267
5476a9a4
GM
15268if test $ok_so_far = yes; then
15269 ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
15270if test "x$ac_cv_header_netinet_in_h" = x""yes; then :
f199cab1 15271
5476a9a4
GM
15272else
15273 ok_so_far=no
15274fi
f199cab1
GM
15275
15276
5476a9a4
GM
15277fi
15278if test $ok_so_far = yes; then
15279 ac_fn_c_check_header_mongrel "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default"
15280if test "x$ac_cv_header_arpa_inet_h" = x""yes; then :
f199cab1 15281
5476a9a4
GM
15282else
15283 ok_so_far=no
15284fi
f199cab1
GM
15285
15286
5476a9a4
GM
15287fi
15288if test $ok_so_far = yes; then
f199cab1 15289
5476a9a4 15290$as_echo "#define HAVE_INET_SOCKETS 1" >>confdefs.h
f199cab1 15291
5476a9a4 15292fi
f199cab1 15293
5476a9a4 15294if test -f /usr/lpp/X11/bin/smt.exp; then
942f733f 15295
5476a9a4 15296$as_echo "#define HAVE_AIX_SMT_EXP 1" >>confdefs.h
942f733f 15297
942f733f 15298fi
3e0be4ab 15299
5476a9a4
GM
15300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system supports dynamic ptys" >&5
15301$as_echo_n "checking whether system supports dynamic ptys... " >&6; }
15302if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
15303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15304$as_echo "yes" >&6; }
15305
15306$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
3e0be4ab 15307
5476a9a4
GM
15308else
15309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15310$as_echo "no" >&6; }
15311fi
3e0be4ab 15312
bb7dce39
GM
15313case $canonical in
15314 *-solaris2.4 | *-solaris2.4.*)
15315 : ${ac_cv_func_vfork_works=no};;
15316esac
15317
5476a9a4
GM
15318ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
15319if test "x$ac_cv_type_pid_t" = x""yes; then :
3e0be4ab 15320
5476a9a4 15321else
3e0be4ab 15322
5476a9a4
GM
15323cat >>confdefs.h <<_ACEOF
15324#define pid_t int
15325_ACEOF
f199cab1 15326
5476a9a4 15327fi
f199cab1 15328
5476a9a4
GM
15329for ac_header in vfork.h
15330do :
15331 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
15332if test "x$ac_cv_header_vfork_h" = x""yes; then :
15333 cat >>confdefs.h <<_ACEOF
15334#define HAVE_VFORK_H 1
15335_ACEOF
f199cab1 15336
5476a9a4 15337fi
f199cab1 15338
5476a9a4 15339done
f199cab1 15340
5476a9a4
GM
15341for ac_func in fork vfork
15342do :
15343 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15344ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15345eval as_val=\$$as_ac_var
15346 if test "x$as_val" = x""yes; then :
15347 cat >>confdefs.h <<_ACEOF
15348#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15349_ACEOF
f199cab1 15350
5476a9a4
GM
15351fi
15352done
f199cab1 15353
5476a9a4
GM
15354if test "x$ac_cv_func_fork" = xyes; then
15355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
15356$as_echo_n "checking for working fork... " >&6; }
15357if test "${ac_cv_func_fork_works+set}" = set; then :
15358 $as_echo_n "(cached) " >&6
15359else
15360 if test "$cross_compiling" = yes; then :
15361 ac_cv_func_fork_works=cross
15362else
15363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15364/* end confdefs.h. */
15365$ac_includes_default
15366int
15367main ()
15368{
f199cab1 15369
5476a9a4
GM
15370 /* By Ruediger Kuhlmann. */
15371 return fork () < 0;
f199cab1 15372
5476a9a4
GM
15373 ;
15374 return 0;
15375}
15376_ACEOF
15377if ac_fn_c_try_run "$LINENO"; then :
15378 ac_cv_func_fork_works=yes
15379else
15380 ac_cv_func_fork_works=no
15381fi
15382rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15383 conftest.$ac_objext conftest.beam conftest.$ac_ext
15384fi
f199cab1 15385
5476a9a4
GM
15386fi
15387{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
15388$as_echo "$ac_cv_func_fork_works" >&6; }
f199cab1 15389
5476a9a4
GM
15390else
15391 ac_cv_func_fork_works=$ac_cv_func_fork
15392fi
15393if test "x$ac_cv_func_fork_works" = xcross; then
15394 case $host in
15395 *-*-amigaos* | *-*-msdosdjgpp*)
15396 # Override, as these systems have only a dummy fork() stub
15397 ac_cv_func_fork_works=no
15398 ;;
15399 *)
15400 ac_cv_func_fork_works=yes
15401 ;;
15402 esac
15403 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
15404$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
15405fi
15406ac_cv_func_vfork_works=$ac_cv_func_vfork
15407if test "x$ac_cv_func_vfork" = xyes; then
15408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
15409$as_echo_n "checking for working vfork... " >&6; }
15410if test "${ac_cv_func_vfork_works+set}" = set; then :
f199cab1
GM
15411 $as_echo_n "(cached) " >&6
15412else
15413 if test "$cross_compiling" = yes; then :
5476a9a4 15414 ac_cv_func_vfork_works=cross
f199cab1
GM
15415else
15416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15417/* end confdefs.h. */
5476a9a4
GM
15418/* Thanks to Paul Eggert for this test. */
15419$ac_includes_default
15420#include <sys/wait.h>
15421#ifdef HAVE_VFORK_H
15422# include <vfork.h>
f199cab1 15423#endif
5476a9a4
GM
15424/* On some sparc systems, changes by the child to local and incoming
15425 argument registers are propagated back to the parent. The compiler
15426 is told about this with #include <vfork.h>, but some compilers
15427 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
15428 static variable whose address is put into a register that is
15429 clobbered by the vfork. */
15430static void
15431#ifdef __cplusplus
15432sparc_address_test (int arg)
15433# else
15434sparc_address_test (arg) int arg;
f199cab1 15435#endif
5476a9a4
GM
15436{
15437 static pid_t child;
15438 if (!child) {
15439 child = vfork ();
15440 if (child < 0) {
15441 perror ("vfork");
15442 _exit(2);
15443 }
15444 if (!child) {
15445 arg = getpid();
15446 write(-1, "", 0);
15447 _exit (arg);
15448 }
15449 }
15450}
f199cab1 15451
5476a9a4
GM
15452int
15453main ()
15454{
15455 pid_t parent = getpid ();
15456 pid_t child;
f199cab1 15457
5476a9a4 15458 sparc_address_test (0);
f199cab1 15459
5476a9a4 15460 child = vfork ();
3e0be4ab 15461
5476a9a4
GM
15462 if (child == 0) {
15463 /* Here is another test for sparc vfork register problems. This
15464 test uses lots of local variables, at least as many local
15465 variables as main has allocated so far including compiler
15466 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
15467 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
15468 reuse the register of parent for one of the local variables,
15469 since it will think that parent can't possibly be used any more
15470 in this routine. Assigning to the local variable will thus
15471 munge parent in the parent process. */
15472 pid_t
15473 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
15474 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
15475 /* Convince the compiler that p..p7 are live; otherwise, it might
15476 use the same hardware register for all 8 local variables. */
15477 if (p != p1 || p != p2 || p != p3 || p != p4
15478 || p != p5 || p != p6 || p != p7)
15479 _exit(1);
3e0be4ab 15480
5476a9a4
GM
15481 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
15482 from child file descriptors. If the child closes a descriptor
15483 before it execs or exits, this munges the parent's descriptor
15484 as well. Test for this by closing stdout in the child. */
15485 _exit(close(fileno(stdout)) != 0);
15486 } else {
15487 int status;
15488 struct stat st;
3e0be4ab 15489
5476a9a4
GM
15490 while (wait(&status) != child)
15491 ;
15492 return (
15493 /* Was there some problem with vforking? */
15494 child < 0
3e0be4ab 15495
5476a9a4
GM
15496 /* Did the child fail? (This shouldn't happen.) */
15497 || status
15498
15499 /* Did the vfork/compiler bug occur? */
15500 || parent != getpid()
15501
15502 /* Did the file descriptor bug occur? */
15503 || fstat(fileno(stdout), &st) != 0
15504 );
15505 }
f199cab1 15506}
5476a9a4
GM
15507_ACEOF
15508if ac_fn_c_try_run "$LINENO"; then :
15509 ac_cv_func_vfork_works=yes
15510else
15511 ac_cv_func_vfork_works=no
15512fi
15513rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15514 conftest.$ac_objext conftest.beam conftest.$ac_ext
15515fi
15516
15517fi
15518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
15519$as_echo "$ac_cv_func_vfork_works" >&6; }
15520
15521fi;
15522if test "x$ac_cv_func_fork_works" = xcross; then
15523 ac_cv_func_vfork_works=$ac_cv_func_vfork
15524 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
15525$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
15526fi
15527
15528if test "x$ac_cv_func_vfork_works" = xyes; then
3e0be4ab 15529
5476a9a4 15530$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
3e0be4ab 15531
5476a9a4 15532else
3e0be4ab 15533
5476a9a4 15534$as_echo "#define vfork fork" >>confdefs.h
942f733f 15535
5476a9a4
GM
15536fi
15537if test "x$ac_cv_func_fork_works" = xyes; then
942f733f 15538
5476a9a4 15539$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
942f733f 15540
5476a9a4 15541fi
f199cab1 15542
f199cab1 15543
5476a9a4
GM
15544for ac_func in snprintf
15545do :
15546 ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
15547if test "x$ac_cv_func_snprintf" = x""yes; then :
15548 cat >>confdefs.h <<_ACEOF
15549#define HAVE_SNPRINTF 1
15550_ACEOF
15551
15552fi
15553done
15554
942f733f 15555
5476a9a4
GM
15556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
15557$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
15558if test "${emacs_cv_langinfo_codeset+set}" = set; then :
15559 $as_echo_n "(cached) " >&6
15560else
15561 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15562/* end confdefs.h. */
15563#include <langinfo.h>
3e0be4ab
GM
15564int
15565main ()
15566{
5476a9a4
GM
15567char* cs = nl_langinfo(CODESET);
15568 ;
15569 return 0;
15570}
15571_ACEOF
15572if ac_fn_c_try_link "$LINENO"; then :
15573 emacs_cv_langinfo_codeset=yes
15574else
15575 emacs_cv_langinfo_codeset=no
15576fi
15577rm -f core conftest.err conftest.$ac_objext \
15578 conftest$ac_exeext conftest.$ac_ext
f199cab1 15579
5476a9a4
GM
15580fi
15581{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_langinfo_codeset" >&5
15582$as_echo "$emacs_cv_langinfo_codeset" >&6; }
15583if test $emacs_cv_langinfo_codeset = yes; then
f199cab1 15584
5476a9a4 15585$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
f199cab1 15586
5476a9a4 15587fi
f199cab1 15588
5476a9a4
GM
15589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
15590$as_echo_n "checking for mbstate_t... " >&6; }
15591if test "${ac_cv_type_mbstate_t+set}" = set; then :
15592 $as_echo_n "(cached) " >&6
15593else
15594 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15595/* end confdefs.h. */
15596$ac_includes_default
15597# include <wchar.h>
15598int
15599main ()
15600{
15601mbstate_t x; return sizeof x;
15602 ;
15603 return 0;
3e0be4ab 15604}
942f733f 15605_ACEOF
5476a9a4
GM
15606if ac_fn_c_try_compile "$LINENO"; then :
15607 ac_cv_type_mbstate_t=yes
3e0be4ab 15608else
5476a9a4 15609 ac_cv_type_mbstate_t=no
942f733f 15610fi
5476a9a4 15611rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3e0be4ab 15612fi
5476a9a4
GM
15613{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
15614$as_echo "$ac_cv_type_mbstate_t" >&6; }
15615 if test $ac_cv_type_mbstate_t = yes; then
f199cab1 15616
5476a9a4 15617$as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
f199cab1 15618
5476a9a4 15619 else
f199cab1 15620
5476a9a4 15621$as_echo "#define mbstate_t int" >>confdefs.h
f199cab1 15622
5476a9a4
GM
15623 fi
15624
15625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C restricted array declarations" >&5
15626$as_echo_n "checking for C restricted array declarations... " >&6; }
15627if test "${emacs_cv_c_restrict_arr+set}" = set; then :
15628 $as_echo_n "(cached) " >&6
15629else
15630 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15631/* end confdefs.h. */
15632void fred (int x[__restrict]);
15633int
15634main ()
15635{
15636
15637 ;
15638 return 0;
15639}
15640_ACEOF
15641if ac_fn_c_try_compile "$LINENO"; then :
15642 emacs_cv_c_restrict_arr=yes
15643else
15644 emacs_cv_c_restrict_arr=no
15645fi
15646rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15647fi
15648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_c_restrict_arr" >&5
15649$as_echo "$emacs_cv_c_restrict_arr" >&6; }
15650if test "$emacs_cv_c_restrict_arr" = yes; then
f199cab1 15651
5476a9a4 15652$as_echo "#define __restrict_arr __restrict" >>confdefs.h
f199cab1 15653
5476a9a4 15654fi
f199cab1
GM
15655
15656
15657
8ad96b1d
GM
15658$as_echo "#define AMPERSAND_FULL_NAME 1" >>confdefs.h
15659
15660
15661
5476a9a4 15662$as_echo "#define CLASH_DETECTION 1" >>confdefs.h
f199cab1
GM
15663
15664
5476a9a4 15665## Note: PTYs are broken on darwin <6. Use at your own risk.
f199cab1 15666
5476a9a4 15667$as_echo "#define HAVE_PTYS 1" >>confdefs.h
f199cab1
GM
15668
15669
15670
5476a9a4 15671$as_echo "#define HAVE_SOCKETS 1" >>confdefs.h
f199cab1 15672
942f733f 15673
942f733f 15674
6b10626d
GM
15675
15676
8ad96b1d
GM
15677$as_echo "#define NULL_DEVICE \"/dev/null\"" >>confdefs.h
15678
15679
15680
15681$as_echo "#define SEPCHAR ':'" >>confdefs.h
15682
15683
15684
15685$as_echo "#define subprocesses 1" >>confdefs.h
15686
15687
15688
15689$as_echo "#define USER_FULL_NAME pw->pw_gecos" >>confdefs.h
15690
15691
15692
942f733f 15693
9ff736dc
GM
15694$as_echo "#define DIRECTORY_SEP '/'" >>confdefs.h
15695
15696
15697
f199cab1 15698
6b10626d
GM
15699
15700$as_echo "#define IS_DEVICE_SEP(_c_) 0" >>confdefs.h
15701
15702
15703
15704$as_echo "#define IS_DIRECTORY_SEP(_c_) ((_c_) == DIRECTORY_SEP)" >>confdefs.h
15705
15706
15707
15708$as_echo "#define IS_ANY_SEP(_c_) (IS_DIRECTORY_SEP (_c_))" >>confdefs.h
15709
15710
15711
15712
15713
5476a9a4
GM
15714case $opsys in
15715 aix4-2)
15716 if test x$ac_cv_lib_Xmu_XmuConvertStandardSelection != xyes; then
15717 $as_echo "#define NO_EDITRES 1" >>confdefs.h
f199cab1 15718
5476a9a4
GM
15719 fi
15720 ;;
f199cab1 15721
5476a9a4
GM
15722 hpux*)
15723 $as_echo "#define NO_EDITRES 1" >>confdefs.h
f199cab1 15724
5476a9a4
GM
15725 ;;
15726esac
f199cab1
GM
15727
15728
5476a9a4 15729case $opsys in
5476a9a4 15730 irix6-5 | sol2* | unixware )
f199cab1 15731
5476a9a4 15732$as_echo "#define NSIG_MINIMUM 32" >>confdefs.h
f199cab1 15733
5476a9a4
GM
15734 ;;
15735esac
f199cab1 15736
4fa92495 15737emacs_broken_SIGIO=no
f199cab1 15738
5476a9a4
GM
15739case $opsys in
15740 hpux* | irix6-5 | openbsd | sol2* | unixware )
4fa92495 15741 emacs_broken_SIGIO=yes
5476a9a4 15742 ;;
f199cab1 15743
5476a9a4 15744 aix4-2)
f199cab1 15745
5476a9a4 15746$as_echo "#define BROKEN_GET_CURRENT_DIR_NAME 1" >>confdefs.h
067d23c9 15747
5476a9a4 15748 ;;
067d23c9 15749
5476a9a4 15750 freebsd)
f199cab1 15751
5476a9a4 15752$as_echo "#define BROKEN_PTY_READ_AFTER_EAGAIN 1" >>confdefs.h
f199cab1 15753
5476a9a4 15754 ;;
5476a9a4 15755esac
f199cab1 15756
5476a9a4
GM
15757case $opsys in
15758 gnu-* | sol2-10 )
f199cab1 15759
5476a9a4 15760$as_echo "#define HAVE_PROCFS 1" >>confdefs.h
f199cab1 15761
5476a9a4
GM
15762 ;;
15763esac
f199cab1 15764
5476a9a4 15765case $opsys in
87e1a811 15766 darwin | dragonfly | freebsd | netbsd | openbsd )
f199cab1 15767
5476a9a4 15768$as_echo "#define DONT_REOPEN_PTY 1" >>confdefs.h
f199cab1 15769
5476a9a4
GM
15770 ;;
15771esac
f199cab1 15772
5476a9a4
GM
15773case $opsys in
15774 netbsd | openbsd) sound_device="/dev/audio" ;;
15775 *) sound_device="/dev/dsp" ;;
15776esac
f199cab1 15777
f199cab1 15778
5476a9a4
GM
15779cat >>confdefs.h <<_ACEOF
15780#define DEFAULT_SOUND_DEVICE "$sound_device"
15781_ACEOF
f199cab1
GM
15782
15783
15784
5476a9a4
GM
15785case $opsys in
15786 darwin | gnu-linux | gnu-kfreebsd )
f199cab1 15787
5476a9a4 15788$as_echo "#define INTERRUPT_INPUT 1" >>confdefs.h
f199cab1 15789
5476a9a4
GM
15790 ;;
15791esac
f199cab1 15792
f199cab1 15793
5476a9a4
GM
15794case $opsys in
15795 cygwin|gnu|gnu-linux|gnu-kfreebsd|irix6-5|freebsd|netbsd|openbsd)
f199cab1 15796
5476a9a4 15797$as_echo "#define NARROWPROTO 1" >>confdefs.h
067d23c9 15798
5476a9a4
GM
15799 ;;
15800esac
f199cab1
GM
15801
15802
067d23c9 15803
1f5d53eb
PE
15804
15805
f199cab1 15806
f199cab1 15807
7d2a1c5e 15808
5476a9a4
GM
15809case $opsys in
15810 aix4-2 )
a09508f2 15811 $as_echo "#define PTY_ITERATION int c; for (c = 0; !c ; c++)" >>confdefs.h
f199cab1 15812
a09508f2 15813 $as_echo "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptc\");" >>confdefs.h
f199cab1 15814
a09508f2 15815 $as_echo "#define PTY_TTY_NAME_SPRINTF strcpy (pty_name, ttyname (fd));" >>confdefs.h
7d2a1c5e 15816
5476a9a4 15817 ;;
7d2a1c5e 15818
5476a9a4 15819 cygwin )
a09508f2 15820 $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++)" >>confdefs.h
7d2a1c5e 15821
843f2634 15822 $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
f199cab1 15823
a09508f2 15824 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
7d2a1c5e 15825
a09508f2 15826 $as_echo "#define PTY_TTY_NAME_SPRINTF /**/" >>confdefs.h
f199cab1 15827
5476a9a4 15828 ;;
f199cab1 15829
1146da8d 15830 darwin )
a09508f2 15831 $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++)" >>confdefs.h
7d2a1c5e 15832
5476a9a4 15833 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
7d2a1c5e 15834
a09508f2 15835 $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
7d2a1c5e 15836
a09508f2 15837 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
f199cab1 15838
a09508f2 15839 $as_echo "#define PTY_TTY_NAME_SPRINTF /**/" >>confdefs.h
f199cab1 15840
5476a9a4 15841 ;;
f199cab1 15842
1146da8d 15843 gnu | openbsd )
5476a9a4 15844 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
f199cab1 15845
5476a9a4 15846 ;;
f199cab1 15847
87e1a811 15848 gnu-linux | gnu-kfreebsd | dragonfly | freebsd | netbsd )
5476a9a4 15849 if test "x$ac_cv_func_grantpt" = xyes; then
f199cab1 15850
5476a9a4 15851$as_echo "#define UNIX98_PTYS 1" >>confdefs.h
f199cab1 15852
a09508f2 15853 $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++)" >>confdefs.h
f199cab1 15854
843f2634 15855 $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
f199cab1 15856
1146da8d
GM
15857 if test "x$ac_cv_func_posix_openpt" = xyes; then
15858 $as_echo "#define PTY_OPEN fd = posix_openpt (O_RDWR | O_NOCTTY)" >>confdefs.h
15859
15860 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
15861
15862 elif test "x$ac_cv_func_getpt" = xyes; then
5476a9a4 15863 $as_echo "#define PTY_OPEN fd = getpt ()" >>confdefs.h
f199cab1 15864
a09508f2 15865 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
f199cab1 15866
5476a9a4 15867 else
a09508f2 15868 $as_echo "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptmx\");" >>confdefs.h
f199cab1 15869
5476a9a4
GM
15870 fi
15871 else
15872 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
f199cab1 15873
5476a9a4
GM
15874 fi
15875 ;;
f199cab1 15876
5476a9a4
GM
15877 hpux*)
15878 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
f199cab1 15879
a09508f2 15880 $as_echo "#define PTY_NAME_SPRINTF sprintf (pty_name, \"/dev/ptym/pty%c%x\", c, i);" >>confdefs.h
f199cab1 15881
a09508f2 15882 $as_echo "#define PTY_TTY_NAME_SPRINTF sprintf (pty_name, \"/dev/pty/tty%c%x\", c, i);" >>confdefs.h
f199cab1 15883
5476a9a4 15884 ;;
f199cab1 15885
5476a9a4
GM
15886 irix6-5 )
15887 $as_echo "#define PTY_ITERATION /**/" >>confdefs.h
f199cab1 15888
5476a9a4 15889 $as_echo "#define FIRST_PTY_LETTER 'q'" >>confdefs.h
f199cab1 15890
e4184a20 15891 $as_echo "#define PTY_OPEN { struct sigaction ocstat, cstat; struct stat stb; char * name; sigemptyset(&cstat.sa_mask); cstat.sa_handler = SIG_DFL; cstat.sa_flags = 0; sigaction(SIGCHLD, &cstat, &ocstat); name = _getpty (&fd, O_RDWR | O_NDELAY, 0600, 0); sigaction(SIGCHLD, &ocstat, (struct sigaction *)0); if (name == 0) return -1; if (fd < 0) return -1; if (fstat (fd, &stb) < 0) return -1; strcpy (pty_name, name); }" >>confdefs.h
f199cab1 15892
a09508f2 15893 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
f199cab1 15894
a09508f2 15895 $as_echo "#define PTY_TTY_NAME_SPRINTF /**/" >>confdefs.h
f199cab1 15896
5476a9a4 15897 ;;
f199cab1 15898
5476a9a4 15899 sol2* )
e4184a20 15900 $as_echo "#define PTY_TTY_NAME_SPRINTF { char *ptsname (int), *ptyname; int grantpt_result; sigset_t blocked; sigemptyset (&blocked); sigaddset (&blocked, SIGCHLD); pthread_sigmask (SIG_BLOCK, &blocked, 0); grantpt_result = grantpt (fd); pthread_sigmask (SIG_UNBLOCK, &blocked, 0); if (grantpt_result == -1 || unlockpt (fd) == -1 || !(ptyname = ptsname (fd))) { emacs_close (fd); return -1; } snprintf (pty_name, sizeof pty_name, \"%s\", ptyname); }" >>confdefs.h
f199cab1 15901
5476a9a4 15902 ;;
f199cab1 15903
5476a9a4 15904 unixware )
e4184a20 15905 $as_echo "#define PTY_TTY_NAME_SPRINTF { char *ptsname (int), *ptyname; int grantpt_result; sigset_t blocked; sigemptyset (&blocked); sigaddset (&blocked, SIGCHLD); pthread_sigmask (SIG_BLOCK, &blocked, 0); grantpt_result = grantpt (fd); pthread_sigmask (SIG_UNBLOCK, &blocked, 0); if (grantpt_result == -1) fatal(\"could not grant slave pty\"); if (unlockpt(fd) == -1) fatal(\"could not unlock slave pty\"); if (!(ptyname = ptsname(fd))) fatal (\"could not enable slave pty\"); snprintf (pty_name, sizeof pty_name, \"%s\", ptyname); }" >>confdefs.h
5476a9a4
GM
15906
15907 ;;
15908esac
15909
15910
15911case $opsys in
15912 sol2* | unixware )
15913 $as_echo "#define FIRST_PTY_LETTER 'z'" >>confdefs.h
15914
a09508f2 15915 $as_echo "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptmx\");" >>confdefs.h
5476a9a4
GM
15916
15917
15918$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
15919
15920 ;;
15921esac
15922
15923
15924
15925
15926case $opsys in
87e1a811 15927 aix4-2 | cygwin | gnu | irix6-5 | dragonfly | freebsd | netbsd | openbsd | darwin )
5476a9a4
GM
15928 $as_echo "#define SIGNALS_VIA_CHARACTERS 1" >>confdefs.h
15929
15930 ;;
15931
15932 gnu-linux | gnu-kfreebsd )
15933
15934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signals via characters" >&5
15935$as_echo_n "checking for signals via characters... " >&6; }
15936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1f5d53eb 15937/* end confdefs.h. */
5476a9a4
GM
15938
15939#include <linux/version.h>
15940#if LINUX_VERSION_CODE < 0x20400
15941# error "Linux version too old"
15942#endif
15943
3e0be4ab
GM
15944int
15945main ()
15946{
f199cab1 15947
3e0be4ab
GM
15948 ;
15949 return 0;
15950}
067d23c9 15951_ACEOF
5476a9a4
GM
15952if ac_fn_c_try_cpp "$LINENO"; then :
15953 emacs_signals_via_chars=yes
1f5d53eb 15954else
5476a9a4 15955 emacs_signals_via_chars=no
067d23c9 15956fi
5476a9a4 15957rm -f conftest.err conftest.$ac_ext
067d23c9 15958
5476a9a4
GM
15959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_signals_via_chars" >&5
15960$as_echo "$emacs_signals_via_chars" >&6; }
15961 test $emacs_signals_via_chars = yes && $as_echo "#define SIGNALS_VIA_CHARACTERS 1" >>confdefs.h
15962
15963 ;;
15964esac
15965
15966
15967
15968
5476a9a4 15969case $opsys in
0f63df79 15970 aix*)
ce9ae7ca 15971 $as_echo "#define DATA_SEG_BITS 0x20000000" >>confdefs.h
0f63df79
GM
15972
15973 ;;
5476a9a4 15974 hpux*)
ce9ae7ca 15975 $as_echo "#define DATA_SEG_BITS 0x40000000" >>confdefs.h
067d23c9 15976
5476a9a4
GM
15977 ;;
15978 irix6-5)
5476a9a4 15979 $as_echo "#define DATA_SEG_BITS 0x10000000" >>confdefs.h
067d23c9 15980
5476a9a4
GM
15981 ;;
15982esac
067d23c9 15983
1f5d53eb 15984
1f5d53eb 15985
067d23c9 15986
5476a9a4
GM
15987case $opsys in
15988 darwin) $as_echo "#define TAB3 OXTABS" >>confdefs.h
15989 ;;
f199cab1 15990
87e1a811 15991 gnu | dragonfly | freebsd | netbsd | openbsd )
f199cab1 15992
5476a9a4 15993$as_echo "#define TABDLY OXTABS" >>confdefs.h
f199cab1 15994
5476a9a4 15995 $as_echo "#define TAB3 OXTABS" >>confdefs.h
f199cab1 15996
5476a9a4 15997 ;;
f199cab1 15998
5476a9a4 15999 gnu-linux | gnu-kfreebsd )
5476a9a4
GM
16000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16001/* end confdefs.h. */
3e0be4ab 16002
5476a9a4
GM
16003#ifndef __ia64__
16004# error "not ia64"
16005#endif
067d23c9 16006
5476a9a4
GM
16007int
16008main ()
16009{
3e0be4ab 16010
5476a9a4
GM
16011 ;
16012 return 0;
16013}
16014_ACEOF
16015if ac_fn_c_try_cpp "$LINENO"; then :
f199cab1 16016
5476a9a4 16017$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
067d23c9 16018
3e0be4ab 16019fi
5476a9a4
GM
16020rm -f conftest.err conftest.$ac_ext
16021 ;;
067d23c9 16022
5476a9a4 16023 hpux*)
3e0be4ab 16024
5476a9a4 16025$as_echo "#define RUN_TIME_REMAP 1" >>confdefs.h
3e0be4ab 16026
5476a9a4 16027 ;;
5476a9a4 16028esac
3e0be4ab
GM
16029
16030
f199cab1 16031
e700232f
GM
16032
16033
5476a9a4 16034case $opsys in
5476a9a4
GM
16035 gnu-linux | gnu-kfreebsd )
16036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1fd182f0 16037/* end confdefs.h. */
f199cab1 16038
5476a9a4
GM
16039#if defined __i386__ || defined __sparc__ || defined __mc68000__ \
16040 || defined __alpha__ || defined __mips__ || defined __s390__ \
16041 || defined __arm__ || defined __powerpc__ || defined __amd64__ \
16042 || defined __ia64__ || defined __sh__
16043/* ok */
16044#else
16045# error "setjmp not known to work on this arch"
16046#endif
16047
f199cab1
GM
16048int
16049main ()
1fd182f0 16050{
5476a9a4 16051
f199cab1
GM
16052 ;
16053 return 0;
1fd182f0
PE
16054}
16055_ACEOF
5476a9a4
GM
16056if ac_fn_c_try_cpp "$LINENO"; then :
16057 $as_echo "#define GC_SETJMP_WORKS 1" >>confdefs.h
f199cab1 16058
1f5d53eb 16059fi
5476a9a4
GM
16060rm -f conftest.err conftest.$ac_ext
16061 ;;
16062esac
1fd182f0 16063
f199cab1 16064
5476a9a4
GM
16065if test x$GCC = xyes; then
16066 $as_echo "#define GC_SETJMP_WORKS 1" >>confdefs.h
16067
1fd182f0 16068else
5476a9a4 16069 case $opsys in
87e1a811 16070 dragonfly | freebsd | netbsd | openbsd | irix6-5 | sol2* )
5476a9a4 16071 $as_echo "#define GC_SETJMP_WORKS 1" >>confdefs.h
1fd182f0 16072
5476a9a4
GM
16073 ;;
16074 esac
16075fi
6ec9a5a7
GM
16076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _setjmp" >&5
16077$as_echo_n "checking for _setjmp... " >&6; }
16078if test "${emacs_cv_func__setjmp+set}" = set; then :
16079 $as_echo_n "(cached) " >&6
16080else
16081 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16082/* end confdefs.h. */
16083#include <setjmp.h>
1fd182f0 16084
6ec9a5a7
GM
16085int
16086main ()
16087{
16088jmp_buf j;
16089 if (! _setjmp (j))
16090 _longjmp (j, 1);
16091 ;
16092 return 0;
16093}
16094_ACEOF
16095if ac_fn_c_try_link "$LINENO"; then :
16096 emacs_cv_func__setjmp=yes
16097else
16098 emacs_cv_func__setjmp=no
16099fi
16100rm -f core conftest.err conftest.$ac_objext \
16101 conftest$ac_exeext conftest.$ac_ext
16102fi
16103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_func__setjmp" >&5
16104$as_echo "$emacs_cv_func__setjmp" >&6; }
e2d8f316 16105if test $emacs_cv_func__setjmp = yes; then
906debc3 16106
e2d8f316 16107$as_echo "#define HAVE__SETJMP 1" >>confdefs.h
906debc3 16108
e2d8f316
GM
16109else
16110 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
16111$as_echo_n "checking for sigsetjmp... " >&6; }
16112if test "${emacs_cv_func_sigsetjmp+set}" = set; then :
16113 $as_echo_n "(cached) " >&6
16114else
16115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16116/* end confdefs.h. */
16117#include <setjmp.h>
16118
16119int
16120main ()
16121{
16122sigjmp_buf j;
16123 if (! sigsetjmp (j, 1))
16124 siglongjmp (j, 1);
16125 ;
16126 return 0;
16127}
16128_ACEOF
16129if ac_fn_c_try_link "$LINENO"; then :
16130 emacs_cv_func_sigsetjmp=yes
16131else
16132 emacs_cv_func_sigsetjmp=no
16133fi
16134rm -f core conftest.err conftest.$ac_objext \
16135 conftest$ac_exeext conftest.$ac_ext
16136fi
16137{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_func_sigsetjmp" >&5
16138$as_echo "$emacs_cv_func_sigsetjmp" >&6; }
16139 if test $emacs_cv_func_sigsetjmp = yes; then
906debc3 16140
e2d8f316 16141$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
906debc3 16142
e2d8f316 16143 fi
6ec9a5a7
GM
16144fi
16145
16146case $opsys in
16147 sol2* | unixware )
906debc3
GM
16148
16149$as_echo "#define TIOCSIGSEND TIOCSIGNAL" >>confdefs.h
16150
16151 ;;
16152esac
16153
906debc3 16154
5476a9a4
GM
16155case $opsys in
16156 hpux* | sol2* )
1f5d53eb 16157
5476a9a4 16158$as_echo "#define XOS_NEEDS_TIME_H 1" >>confdefs.h
1f5d53eb 16159
5476a9a4
GM
16160 ;;
16161esac
1f5d53eb 16162
1f5d53eb 16163
4fda9c95 16164
3e0be4ab 16165
4fda9c95 16166
4fda9c95 16167
f199cab1 16168
906debc3 16169
5476a9a4
GM
16170case $opsys in
16171 aix4-2)
16172 $as_echo "#define USG /**/" >>confdefs.h
16173
16174 $as_echo "#define USG5 /**/" >>confdefs.h
16175
16176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16177/* end confdefs.h. */
16178
16179#ifndef _AIX
16180# error "_AIX not defined"
16181#endif
f199cab1 16182
4fda9c95
GM
16183int
16184main ()
16185{
3e0be4ab 16186
4fda9c95
GM
16187 ;
16188 return 0;
16189}
16190_ACEOF
5476a9a4 16191if ac_fn_c_try_cpp "$LINENO"; then :
4fda9c95 16192
3e0be4ab 16193else
4fda9c95 16194
5476a9a4 16195$as_echo "#define _AIX /**/" >>confdefs.h
3e0be4ab 16196
5476a9a4
GM
16197fi
16198rm -f conftest.err conftest.$ac_ext
16199 ;;
4fda9c95 16200
5476a9a4 16201 cygwin)
3e0be4ab 16202
5476a9a4 16203$as_echo "#define CYGWIN 1" >>confdefs.h
f199cab1 16204
5476a9a4 16205 ;;
f199cab1 16206
5476a9a4 16207 darwin)
f199cab1 16208
5476a9a4 16209$as_echo "#define DARWIN_OS /**/" >>confdefs.h
f199cab1 16210
5476a9a4 16211 ;;
4fda9c95 16212
5476a9a4
GM
16213 gnu-linux | gnu-kfreebsd )
16214 $as_echo "#define USG /**/" >>confdefs.h
4fda9c95 16215
f199cab1 16216
5476a9a4 16217$as_echo "#define GNU_LINUX /**/" >>confdefs.h
4fda9c95 16218
5476a9a4 16219 ;;
4fda9c95 16220
5476a9a4
GM
16221 hpux*)
16222 $as_echo "#define USG /**/" >>confdefs.h
4fda9c95 16223
5476a9a4 16224 $as_echo "#define USG5 /**/" >>confdefs.h
697210c4 16225
4717915f 16226
5476a9a4 16227$as_echo "#define HPUX /**/" >>confdefs.h
697210c4 16228
5476a9a4 16229 ;;
697210c4 16230
5476a9a4
GM
16231 irix6-5)
16232 $as_echo "#define USG /**/" >>confdefs.h
f199cab1 16233
5476a9a4 16234 $as_echo "#define USG5 /**/" >>confdefs.h
f199cab1 16235
906debc3
GM
16236 $as_echo "#define USG5_4 /**/" >>confdefs.h
16237
f199cab1 16238
5476a9a4 16239$as_echo "#define IRIX6_5 /**/" >>confdefs.h
f199cab1 16240
5476a9a4 16241 ;;
f199cab1 16242
5476a9a4
GM
16243 sol2*)
16244 $as_echo "#define USG /**/" >>confdefs.h
4fda9c95 16245
5476a9a4 16246 $as_echo "#define USG5 /**/" >>confdefs.h
4fda9c95 16247
906debc3
GM
16248 $as_echo "#define USG5_4 /**/" >>confdefs.h
16249
4fda9c95 16250
5476a9a4 16251$as_echo "#define SOLARIS2 /**/" >>confdefs.h
f199cab1 16252
5476a9a4 16253 ;;
f199cab1 16254
5476a9a4
GM
16255 unixware)
16256 $as_echo "#define USG /**/" >>confdefs.h
f199cab1 16257
5476a9a4 16258 $as_echo "#define USG5 /**/" >>confdefs.h
f199cab1 16259
906debc3
GM
16260 $as_echo "#define USG5_4 /**/" >>confdefs.h
16261
5476a9a4
GM
16262 ;;
16263esac
f199cab1 16264
4fa92495
GM
16265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable FIONREAD" >&5
16266$as_echo_n "checking for usable FIONREAD... " >&6; }
16267if test "${emacs_cv_usable_FIONREAD+set}" = set; then :
16268 $as_echo_n "(cached) " >&6
16269else
16270 case $opsys in
16271 aix4-2)
16272 emacs_cv_usable_FIONREAD=no
16273 ;;
16274
16275 *)
16276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16277/* end confdefs.h. */
16278#include <sys/types.h>
16279 #include <sys/ioctl.h>
16280 #ifdef USG5_4
16281 # include <sys/filio.h>
16282 #endif
16283
16284int
16285main ()
16286{
16287int foo = ioctl (0, FIONREAD, &foo);
16288 ;
16289 return 0;
16290}
16291_ACEOF
16292if ac_fn_c_try_compile "$LINENO"; then :
16293 emacs_cv_usable_FIONREAD=yes
16294else
16295 emacs_cv_usable_FIONREAD=no
16296fi
16297rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16298 ;;
16299 esac
16300fi
16301{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_usable_FIONREAD" >&5
16302$as_echo "$emacs_cv_usable_FIONREAD" >&6; }
16303if test $emacs_cv_usable_FIONREAD = yes; then
16304
16305$as_echo "#define USABLE_FIONREAD 1" >>confdefs.h
16306
16307
16308 if test $emacs_broken_SIGIO = no; then
16309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable SIGIO" >&5
16310$as_echo_n "checking for usable SIGIO... " >&6; }
16311if test "${emacs_cv_usable_SIGIO+set}" = set; then :
16312 $as_echo_n "(cached) " >&6
16313else
16314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16315/* end confdefs.h. */
16316#include <fcntl.h>
16317 #include <signal.h>
16318
16319int
16320main ()
16321{
16322int foo = SIGIO | F_SETFL | FASYNC;
16323 ;
16324 return 0;
16325}
16326_ACEOF
16327if ac_fn_c_try_compile "$LINENO"; then :
16328 emacs_cv_usable_SIGIO=yes
16329else
16330 emacs_cv_usable_SIGIO=no
16331fi
16332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16333fi
16334{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_usable_SIGIO" >&5
16335$as_echo "$emacs_cv_usable_SIGIO" >&6; }
16336 if test $emacs_cv_usable_SIGIO = yes; then
16337
16338$as_echo "#define USABLE_SIGIO 1" >>confdefs.h
16339
16340 fi
16341 fi
16342fi
16343
4fda9c95 16344
5476a9a4
GM
16345case $opsys in
16346 cygwin)
4fda9c95 16347
5476a9a4 16348$as_echo "#define G_SLICE_ALWAYS_MALLOC 1" >>confdefs.h
4fda9c95 16349
5476a9a4 16350 ;;
4fda9c95 16351
5476a9a4 16352 hpux11)
f199cab1 16353
5476a9a4 16354$as_echo "#define USG_SUBTTY_WORKS 1" >>confdefs.h
f199cab1 16355
5476a9a4 16356 ;;
f199cab1 16357
5476a9a4 16358 irix6-5)
f199cab1 16359
5476a9a4 16360$as_echo "#define PREFER_VSUSP 1" >>confdefs.h
f199cab1 16361
5476a9a4 16362 ;;
f199cab1 16363
5476a9a4 16364 sol2-10)
f199cab1 16365
5476a9a4 16366$as_echo "#define _STRUCTURED_PROC 1" >>confdefs.h
f199cab1 16367
5476a9a4
GM
16368 ;;
16369esac
f199cab1 16370
5476a9a4
GM
16371# Set up the CFLAGS for real compilation, so we can substitute it.
16372CFLAGS="$REAL_CFLAGS"
16373CPPFLAGS="$REAL_CPPFLAGS"
f199cab1 16374
5476a9a4
GM
16375## Hack to detect a buggy GCC version.
16376if test "x$GCC" = xyes \
16377 && test x"`$CC --version 2> /dev/null | grep 'gcc.* 4.5.0'`" != x \
16378 && test x"`echo $CFLAGS | grep '\-O[23]'`" != x \
16379 && test x"`echo $CFLAGS | grep '\-fno-optimize-sibling-calls'`" = x; then
16380 as_fn_error "GCC 4.5.0 has problems compiling Emacs; see etc/PROBLEMS'." "$LINENO" 5
16381fi
f199cab1 16382
5476a9a4 16383version=$PACKAGE_VERSION
f199cab1 16384
0778f6f0 16385copyright="Copyright (C) 2013 Free Software Foundation, Inc."
bb7dce39
GM
16386
16387cat >>confdefs.h <<_ACEOF
16388#define COPYRIGHT "$copyright"
16389_ACEOF
16390
16391
16392
5476a9a4
GM
16393### Specify what sort of things we'll be editing into Makefile and config.h.
16394### Use configuration here uncanonicalized to avoid exceeding size limits.
4fda9c95 16395
f199cab1 16396
5476a9a4 16397## Unused?
4fda9c95
GM
16398
16399
16400
16401
4717915f 16402
4717915f 16403
4717915f 16404
4717915f 16405
4717915f 16406
4717915f 16407
4717915f 16408
4717915f 16409
4717915f 16410
4717915f 16411
4717915f 16412
4717915f
GM
16413
16414
4717915f
GM
16415
16416
4717915f 16417
4717915f 16418
4717915f 16419
5476a9a4
GM
16420## FIXME? Nothing uses @LD_SWITCH_X_SITE@.
16421## src/Makefile.in did add LD_SWITCH_X_SITE (as a cpp define) to the
16422## end of LIBX_BASE, but nothing ever set it.
4717915f 16423
4717915f 16424
4fda9c95 16425
4fda9c95 16426
5476a9a4
GM
16427## Used in lwlib/Makefile.in.
16428
4fda9c95 16429
4fda9c95 16430
4fda9c95
GM
16431
16432
16433
16434
4fda9c95 16435
42dcba54
GM
16436if test -n "${term_header}"; then
16437
16438cat >>confdefs.h <<_ACEOF
16439#define TERM_HEADER "${term_header}"
16440_ACEOF
16441
16442fi
16443
4fda9c95 16444
5476a9a4
GM
16445cat >>confdefs.h <<_ACEOF
16446#define EMACS_CONFIGURATION "${canonical}"
16447_ACEOF
4fda9c95 16448
1e8a045a 16449emacs_config_options=`echo "$emacs_config_options " | sed -e 's/--no-create //' -e 's/--no-recursion //' -e 's/ *$//' -e "s/\"/'/g"`
4fda9c95 16450
5476a9a4 16451cat >>confdefs.h <<_ACEOF
e25a10b7 16452#define EMACS_CONFIG_OPTIONS "${emacs_config_options}"
5476a9a4
GM
16453_ACEOF
16454
5476a9a4 16455
4fda9c95 16456
5476a9a4
GM
16457XMENU_OBJ=
16458XOBJ=
16459FONT_OBJ=
16460if test "${HAVE_X_WINDOWS}" = "yes" ; then
16461
16462$as_echo "#define HAVE_X_WINDOWS 1" >>confdefs.h
4fda9c95 16463
5476a9a4 16464 XMENU_OBJ=xmenu.o
42dcba54 16465 XOBJ="xterm.o xfns.o xselect.o xrdb.o xsmfns.o xsettings.o xgselect.o"
5476a9a4
GM
16466 FONT_OBJ=xfont.o
16467 if test "$HAVE_XFT" = "yes"; then
16468 FONT_OBJ="$FONT_OBJ ftfont.o xftfont.o ftxfont.o"
16469 elif test "$HAVE_FREETYPE" = "yes"; then
16470 FONT_OBJ="$FONT_OBJ ftfont.o ftxfont.o"
16471 fi
4fda9c95 16472
f199cab1 16473fi
4fda9c95 16474
4fda9c95 16475
4fda9c95 16476
4fda9c95 16477
5476a9a4
GM
16478WIDGET_OBJ=
16479MOTIF_LIBW=
16480if test "${USE_X_TOOLKIT}" != "none" ; then
16481 WIDGET_OBJ=widget.o
16482
16483$as_echo "#define USE_X_TOOLKIT 1" >>confdefs.h
16484
16485 if test "${USE_X_TOOLKIT}" = "LUCID"; then
16486
16487$as_echo "#define USE_LUCID 1" >>confdefs.h
e1939eb1 16488
5476a9a4 16489 elif test "${USE_X_TOOLKIT}" = "MOTIF"; then
4fda9c95 16490
5476a9a4 16491$as_echo "#define USE_MOTIF 1" >>confdefs.h
3e0be4ab 16492
5476a9a4
GM
16493 MOTIF_LIBW=-lXm
16494 case "$opsys" in
16495 gnu-linux)
16496 ## Paul Abrahams <abrahams at equinox.shaysnet.com> says this is needed.
16497 MOTIF_LIBW="$MOTIF_LIBW -lXpm"
16498 ;;
3e0be4ab 16499
5476a9a4
GM
16500 unixware)
16501 ## Richard Anthony Ryan <ryanr at ellingtn.ftc.nrcs.usda.gov>
16502 ## says -lXimp is needed in UNIX_SV ... 4.2 1.1.2.
16503 MOTIF_LIBW="MOTIF_LIBW -lXimp"
16504 ;;
3e0be4ab 16505
5476a9a4
GM
16506 aix4-2)
16507 ## olson@mcs.anl.gov says -li18n is needed by -lXm.
16508 MOTIF_LIBW="$MOTIF_LIBW -li18n"
16509 ;;
16510 esac
16511 MOTIF_LIBW="$MOTIF_LIBW $LIBXP"
16512 fi
16513fi
4fda9c95 16514
3e0be4ab 16515
5476a9a4
GM
16516TOOLKIT_LIBW=
16517case "$USE_X_TOOLKIT" in
16518 MOTIF) TOOLKIT_LIBW="$MOTIF_LIBW" ;;
16519 LUCID) TOOLKIT_LIBW="$LUCID_LIBW" ;;
16520 none) test "x$HAVE_GTK" = "xyes" && TOOLKIT_LIBW="$GTK_LIBS" ;;
16521esac
4fda9c95
GM
16522
16523
5476a9a4
GM
16524if test "$USE_X_TOOLKIT" = "none"; then
16525 LIBXT_OTHER="\$(LIBXSM)"
16526 OLDXMENU_TARGET="really-oldXMenu"
16527else
16528 LIBXT_OTHER="\$(LIBXMU) -lXt \$(LIBXTR6) -lXext"
16529 OLDXMENU_TARGET="really-lwlib"
16530fi
4fda9c95
GM
16531
16532
5476a9a4
GM
16533## The X Menu stuff is present in the X10 distribution, but missing
16534## from X11. If we have X10, just use the installed library;
16535## otherwise, use our own copy.
16536if test "${HAVE_X11}" = "yes" ; then
4fda9c95 16537
5476a9a4 16538$as_echo "#define HAVE_X11 1" >>confdefs.h
4fda9c95 16539
4fda9c95 16540
5476a9a4
GM
16541 if test "$USE_X_TOOLKIT" = "none"; then
16542 OLDXMENU="\${oldXMenudir}/libXMenu11.a"
16543 else
16544 OLDXMENU="\${lwlibdir}/liblw.a"
16545 fi
16546 LIBXMENU="\$(OLDXMENU)"
16547 LIBX_OTHER="\$(LIBXT) \$(LIBX_EXTRA)"
16548 OLDXMENU_DEPS="\${OLDXMENU} ../src/\${OLDXMENU}"
f199cab1 16549else
5476a9a4
GM
16550 ## For a syntactically valid Makefile; not actually used for anything.
16551 ## See comments in src/Makefile.in.
16552 OLDXMENU=nothing
16553 ## FIXME This case (!HAVE_X11 && HAVE_X_WINDOWS) is no longer possible(?).
16554 if test "${HAVE_X_WINDOWS}" = "yes"; then
16555 LIBXMENU="-lXMenu"
16556 else
16557 LIBXMENU=
16558 fi
16559 LIBX_OTHER=
16560 OLDXMENU_DEPS=
16561fi
4fda9c95 16562
5476a9a4
GM
16563if test "$HAVE_GTK" = "yes" || test "$HAVE_MENUS" != "yes"; then
16564 OLDXMENU_TARGET=
16565 OLDXMENU=nothing
16566 LIBXMENU=
16567 OLDXMENU_DEPS=
16568fi
4fda9c95 16569
4fda9c95
GM
16570
16571
3e0be4ab 16572
4fda9c95 16573
3e0be4ab 16574
3e0be4ab 16575
5476a9a4 16576if test "${HAVE_MENUS}" = "yes" ; then
3e0be4ab 16577
5476a9a4 16578$as_echo "#define HAVE_MENUS 1" >>confdefs.h
4fda9c95 16579
5476a9a4 16580fi
4fda9c95 16581
5476a9a4 16582if test "${GNU_MALLOC}" = "yes" ; then
4fda9c95 16583
5476a9a4 16584$as_echo "#define GNU_MALLOC 1" >>confdefs.h
4fda9c95 16585
5476a9a4 16586fi
3e0be4ab 16587
5476a9a4
GM
16588RALLOC_OBJ=
16589if test "${REL_ALLOC}" = "yes" ; then
16590
16591$as_echo "#define REL_ALLOC 1" >>confdefs.h
4fda9c95
GM
16592
16593
5476a9a4
GM
16594 test "$system_malloc" != "yes" && RALLOC_OBJ=ralloc.o
16595fi
4fda9c95 16596
4fda9c95 16597
5476a9a4 16598if test "$opsys" = "cygwin"; then
5c0255d9 16599 CYGWIN_OBJ="sheap.o cygw32.o"
5476a9a4
GM
16600 ## Cygwin differs because of its unexec().
16601 PRE_ALLOC_OBJ=
16602 POST_ALLOC_OBJ=lastfile.o
16603else
16604 CYGWIN_OBJ=
16605 PRE_ALLOC_OBJ=lastfile.o
16606 POST_ALLOC_OBJ=
16607fi
4fda9c95 16608
3e0be4ab 16609
3e0be4ab 16610
3e0be4ab 16611
5476a9a4
GM
16612# Configure gnulib. Although this does not affect CFLAGS or LIBS permanently.
16613# it temporarily reverts them to their pre-pkg-config values,
16614# because gnulib needs to work with both src (which uses the
16615# pkg-config stuff) and lib-src (which does not). For example, gnulib
16616# may need to determine whether LIB_CLOCK_GETTIME should contain -lrt,
16617# and it therefore needs to run in an environment where LIBS does not
16618# already contain -lrt merely because 'pkg-config --libs' printed '-lrt'
16619# for some package unrelated to lib-src.
16620SAVE_CFLAGS=$CFLAGS
16621SAVE_LIBS=$LIBS
16622CFLAGS=$pre_PKG_CONFIG_CFLAGS
16623LIBS="$LIB_PTHREAD $pre_PKG_CONFIG_LIBS"
3e0be4ab 16624
3e0be4ab
GM
16625
16626
4fda9c95 16627
4fda9c95 16628
3e0be4ab 16629
3e0be4ab
GM
16630
16631
4fda9c95 16632
3e0be4ab
GM
16633
16634
5476a9a4
GM
16635 LIBC_FATAL_STDERR_=1
16636 export LIBC_FATAL_STDERR_
3e0be4ab 16637
5476a9a4
GM
16638# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
16639# for constant arguments. Useless!
16640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
16641$as_echo_n "checking for working alloca.h... " >&6; }
16642if test "${ac_cv_working_alloca_h+set}" = set; then :
16643 $as_echo_n "(cached) " >&6
16644else
16645 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16646/* end confdefs.h. */
16647#include <alloca.h>
16648int
16649main ()
16650{
16651char *p = (char *) alloca (2 * sizeof (int));
16652 if (p) return 0;
16653 ;
16654 return 0;
16655}
16656_ACEOF
16657if ac_fn_c_try_link "$LINENO"; then :
16658 ac_cv_working_alloca_h=yes
16659else
16660 ac_cv_working_alloca_h=no
16661fi
16662rm -f core conftest.err conftest.$ac_objext \
16663 conftest$ac_exeext conftest.$ac_ext
16664fi
16665{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
16666$as_echo "$ac_cv_working_alloca_h" >&6; }
16667if test $ac_cv_working_alloca_h = yes; then
3e0be4ab 16668
5476a9a4 16669$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
3e0be4ab 16670
5476a9a4 16671fi
3e0be4ab 16672
5476a9a4
GM
16673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
16674$as_echo_n "checking for alloca... " >&6; }
16675if test "${ac_cv_func_alloca_works+set}" = set; then :
f199cab1
GM
16676 $as_echo_n "(cached) " >&6
16677else
5476a9a4 16678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 16679/* end confdefs.h. */
5476a9a4
GM
16680#ifdef __GNUC__
16681# define alloca __builtin_alloca
16682#else
16683# ifdef _MSC_VER
16684# include <malloc.h>
16685# define alloca _alloca
16686# else
16687# ifdef HAVE_ALLOCA_H
16688# include <alloca.h>
16689# else
16690# ifdef _AIX
16691 #pragma alloca
16692# else
16693# ifndef alloca /* predefined by HP cc +Olibcalls */
16694char *alloca ();
16695# endif
16696# endif
16697# endif
16698# endif
16699#endif
16700
16701int
16702main ()
16703{
16704char *p = (char *) alloca (1);
16705 if (p) return 0;
16706 ;
16707 return 0;
16708}
16709_ACEOF
16710if ac_fn_c_try_link "$LINENO"; then :
16711 ac_cv_func_alloca_works=yes
16712else
16713 ac_cv_func_alloca_works=no
16714fi
16715rm -f core conftest.err conftest.$ac_objext \
16716 conftest$ac_exeext conftest.$ac_ext
16717fi
16718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
16719$as_echo "$ac_cv_func_alloca_works" >&6; }
16720
16721if test $ac_cv_func_alloca_works = yes; then
16722
16723$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
16724
16725else
16726 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
16727# that cause trouble. Some versions do not even contain alloca or
16728# contain a buggy version. If you still want to use their alloca,
16729# use ar to extract alloca.o from them instead of compiling alloca.c.
3e0be4ab 16730
4fda9c95 16731
4fda9c95 16732
4fda9c95
GM
16733
16734
5476a9a4 16735ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
4fda9c95 16736
5476a9a4 16737$as_echo "#define C_ALLOCA 1" >>confdefs.h
4fda9c95 16738
4fda9c95 16739
5476a9a4
GM
16740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether 'alloca.c' needs Cray hooks" >&5
16741$as_echo_n "checking whether 'alloca.c' needs Cray hooks... " >&6; }
16742if test "${ac_cv_os_cray+set}" = set; then :
16743 $as_echo_n "(cached) " >&6
16744else
16745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16746/* end confdefs.h. */
16747#if defined CRAY && ! defined CRAY2
16748webecray
16749#else
16750wenotbecray
16751#endif
4fda9c95 16752
5476a9a4
GM
16753_ACEOF
16754if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16755 $EGREP "webecray" >/dev/null 2>&1; then :
16756 ac_cv_os_cray=yes
16757else
16758 ac_cv_os_cray=no
16759fi
16760rm -f conftest*
4fda9c95 16761
5476a9a4
GM
16762fi
16763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
16764$as_echo "$ac_cv_os_cray" >&6; }
16765if test $ac_cv_os_cray = yes; then
16766 for ac_func in _getb67 GETB67 getb67; do
16767 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16768ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16769eval as_val=\$$as_ac_var
16770 if test "x$as_val" = x""yes; then :
4fda9c95 16771
5476a9a4
GM
16772cat >>confdefs.h <<_ACEOF
16773#define CRAY_STACKSEG_END $ac_func
16774_ACEOF
4fda9c95 16775
5476a9a4
GM
16776 break
16777fi
4fda9c95 16778
5476a9a4
GM
16779 done
16780fi
4fda9c95 16781
5476a9a4
GM
16782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
16783$as_echo_n "checking stack direction for C alloca... " >&6; }
16784if test "${ac_cv_c_stack_direction+set}" = set; then :
16785 $as_echo_n "(cached) " >&6
16786else
16787 if test "$cross_compiling" = yes; then :
16788 ac_cv_c_stack_direction=0
16789else
16790 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16791/* end confdefs.h. */
16792$ac_includes_default
16793int
16794find_stack_direction (int *addr, int depth)
16795{
16796 int dir, dummy = 0;
16797 if (! addr)
16798 addr = &dummy;
16799 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
16800 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
16801 return dir + dummy;
16802}
4fda9c95 16803
5476a9a4
GM
16804int
16805main (int argc, char **argv)
16806{
16807 return find_stack_direction (0, argc + !argv + 20) < 0;
16808}
16809_ACEOF
16810if ac_fn_c_try_run "$LINENO"; then :
16811 ac_cv_c_stack_direction=1
16812else
16813 ac_cv_c_stack_direction=-1
16814fi
16815rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16816 conftest.$ac_objext conftest.beam conftest.$ac_ext
16817fi
4fda9c95 16818
5476a9a4
GM
16819fi
16820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
16821$as_echo "$ac_cv_c_stack_direction" >&6; }
16822cat >>confdefs.h <<_ACEOF
16823#define STACK_DIRECTION $ac_cv_c_stack_direction
16824_ACEOF
3e0be4ab
GM
16825
16826
5476a9a4 16827fi
3e0be4ab
GM
16828
16829
16830
16831
5476a9a4
GM
16832 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
16833$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
16834if test "${ac_cv_c_bigendian+set}" = set; then :
16835 $as_echo_n "(cached) " >&6
16836else
16837 ac_cv_c_bigendian=unknown
16838 # See if we're dealing with a universal compiler.
16839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16840/* end confdefs.h. */
16841#ifndef __APPLE_CC__
16842 not a universal capable compiler
16843 #endif
16844 typedef int dummy;
16845
16846_ACEOF
16847if ac_fn_c_try_compile "$LINENO"; then :
3e0be4ab 16848
5476a9a4
GM
16849 # Check for potential -arch flags. It is not universal unless
16850 # there are at least two -arch flags with different values.
16851 ac_arch=
16852 ac_prev=
16853 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
16854 if test -n "$ac_prev"; then
16855 case $ac_word in
16856 i?86 | x86_64 | ppc | ppc64)
16857 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
16858 ac_arch=$ac_word
16859 else
16860 ac_cv_c_bigendian=universal
16861 break
16862 fi
16863 ;;
16864 esac
16865 ac_prev=
16866 elif test "x$ac_word" = "x-arch"; then
16867 ac_prev=arch
16868 fi
16869 done
16870fi
16871rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16872 if test $ac_cv_c_bigendian = unknown; then
16873 # See if sys/param.h defines the BYTE_ORDER macro.
16874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16875/* end confdefs.h. */
16876#include <sys/types.h>
16877 #include <sys/param.h>
3e0be4ab 16878
5476a9a4
GM
16879int
16880main ()
16881{
16882#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
16883 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
16884 && LITTLE_ENDIAN)
16885 bogus endian macros
16886 #endif
3e0be4ab 16887
5476a9a4
GM
16888 ;
16889 return 0;
16890}
16891_ACEOF
16892if ac_fn_c_try_compile "$LINENO"; then :
16893 # It does; now see whether it defined to BIG_ENDIAN or not.
16894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16895/* end confdefs.h. */
16896#include <sys/types.h>
16897 #include <sys/param.h>
369e19fc 16898
5476a9a4
GM
16899int
16900main ()
16901{
16902#if BYTE_ORDER != BIG_ENDIAN
16903 not big endian
16904 #endif
3e0be4ab 16905
5476a9a4
GM
16906 ;
16907 return 0;
16908}
16909_ACEOF
16910if ac_fn_c_try_compile "$LINENO"; then :
16911 ac_cv_c_bigendian=yes
16912else
16913 ac_cv_c_bigendian=no
16914fi
16915rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16916fi
16917rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16918 fi
16919 if test $ac_cv_c_bigendian = unknown; then
16920 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
16921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16922/* end confdefs.h. */
16923#include <limits.h>
4fda9c95 16924
5476a9a4
GM
16925int
16926main ()
16927{
16928#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
16929 bogus endian macros
16930 #endif
4fda9c95 16931
5476a9a4
GM
16932 ;
16933 return 0;
16934}
16935_ACEOF
16936if ac_fn_c_try_compile "$LINENO"; then :
16937 # It does; now see whether it defined to _BIG_ENDIAN or not.
16938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16939/* end confdefs.h. */
16940#include <limits.h>
4fda9c95 16941
5476a9a4
GM
16942int
16943main ()
16944{
16945#ifndef _BIG_ENDIAN
16946 not big endian
16947 #endif
f199cab1 16948
5476a9a4
GM
16949 ;
16950 return 0;
16951}
16952_ACEOF
16953if ac_fn_c_try_compile "$LINENO"; then :
16954 ac_cv_c_bigendian=yes
f199cab1 16955else
5476a9a4
GM
16956 ac_cv_c_bigendian=no
16957fi
16958rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16959fi
16960rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16961 fi
16962 if test $ac_cv_c_bigendian = unknown; then
16963 # Compile a test program.
16964 if test "$cross_compiling" = yes; then :
16965 # Try to guess by grepping values from an object file.
16966 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16967/* end confdefs.h. */
16968short int ascii_mm[] =
16969 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
16970 short int ascii_ii[] =
16971 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
16972 int use_ascii (int i) {
16973 return ascii_mm[i] + ascii_ii[i];
16974 }
16975 short int ebcdic_ii[] =
16976 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
16977 short int ebcdic_mm[] =
16978 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
16979 int use_ebcdic (int i) {
16980 return ebcdic_mm[i] + ebcdic_ii[i];
16981 }
16982 extern int foo;
f199cab1 16983
5476a9a4
GM
16984int
16985main ()
16986{
16987return use_ascii (foo) == use_ebcdic (foo);
16988 ;
16989 return 0;
16990}
16991_ACEOF
16992if ac_fn_c_try_compile "$LINENO"; then :
16993 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
16994 ac_cv_c_bigendian=yes
16995 fi
16996 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
16997 if test "$ac_cv_c_bigendian" = unknown; then
16998 ac_cv_c_bigendian=no
16999 else
17000 # finding both strings is unlikely to happen, but who knows?
17001 ac_cv_c_bigendian=unknown
17002 fi
17003 fi
17004fi
17005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4fda9c95 17006else
3e0be4ab 17007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4fda9c95 17008/* end confdefs.h. */
5476a9a4
GM
17009$ac_includes_default
17010int
17011main ()
4fda9c95 17012{
5476a9a4
GM
17013
17014 /* Are we little or big endian? From Harbison&Steele. */
17015 union
17016 {
17017 long int l;
17018 char c[sizeof (long int)];
17019 } u;
17020 u.l = 1;
17021 return u.c[sizeof (long int) - 1] == 1;
17022
17023 ;
4fda9c95
GM
17024 return 0;
17025}
17026_ACEOF
f199cab1 17027if ac_fn_c_try_run "$LINENO"; then :
5476a9a4 17028 ac_cv_c_bigendian=no
3e0be4ab 17029else
5476a9a4 17030 ac_cv_c_bigendian=yes
4fda9c95 17031fi
f199cab1
GM
17032rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17033 conftest.$ac_objext conftest.beam conftest.$ac_ext
4fda9c95 17034fi
4fda9c95 17035
5476a9a4 17036 fi
f199cab1 17037fi
5476a9a4
GM
17038{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
17039$as_echo "$ac_cv_c_bigendian" >&6; }
17040 case $ac_cv_c_bigendian in #(
17041 yes)
17042 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
17043;; #(
17044 no)
17045 ;; #(
17046 universal)
3e0be4ab 17047
5476a9a4 17048$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
3e0be4ab 17049
5476a9a4
GM
17050 ;; #(
17051 *)
17052 as_fn_error "unknown endianness
17053 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
17054 esac
4fda9c95 17055
4fda9c95 17056
da6c8463 17057
5476a9a4
GM
17058 GNULIB_CHDIR=0;
17059 GNULIB_CHOWN=0;
17060 GNULIB_CLOSE=0;
17061 GNULIB_DUP=0;
17062 GNULIB_DUP2=0;
17063 GNULIB_DUP3=0;
17064 GNULIB_ENVIRON=0;
17065 GNULIB_EUIDACCESS=0;
17066 GNULIB_FACCESSAT=0;
17067 GNULIB_FCHDIR=0;
17068 GNULIB_FCHOWNAT=0;
17069 GNULIB_FDATASYNC=0;
17070 GNULIB_FSYNC=0;
17071 GNULIB_FTRUNCATE=0;
17072 GNULIB_GETCWD=0;
17073 GNULIB_GETDOMAINNAME=0;
17074 GNULIB_GETDTABLESIZE=0;
17075 GNULIB_GETGROUPS=0;
17076 GNULIB_GETHOSTNAME=0;
17077 GNULIB_GETLOGIN=0;
17078 GNULIB_GETLOGIN_R=0;
17079 GNULIB_GETPAGESIZE=0;
17080 GNULIB_GETUSERSHELL=0;
17081 GNULIB_GROUP_MEMBER=0;
17082 GNULIB_ISATTY=0;
17083 GNULIB_LCHOWN=0;
17084 GNULIB_LINK=0;
17085 GNULIB_LINKAT=0;
17086 GNULIB_LSEEK=0;
17087 GNULIB_PIPE=0;
17088 GNULIB_PIPE2=0;
17089 GNULIB_PREAD=0;
17090 GNULIB_PWRITE=0;
17091 GNULIB_READ=0;
17092 GNULIB_READLINK=0;
17093 GNULIB_READLINKAT=0;
17094 GNULIB_RMDIR=0;
17095 GNULIB_SETHOSTNAME=0;
17096 GNULIB_SLEEP=0;
17097 GNULIB_SYMLINK=0;
17098 GNULIB_SYMLINKAT=0;
17099 GNULIB_TTYNAME_R=0;
17100 GNULIB_UNISTD_H_NONBLOCKING=0;
17101 GNULIB_UNISTD_H_SIGPIPE=0;
17102 GNULIB_UNLINK=0;
17103 GNULIB_UNLINKAT=0;
17104 GNULIB_USLEEP=0;
17105 GNULIB_WRITE=0;
17106 HAVE_CHOWN=1;
17107 HAVE_DUP2=1;
17108 HAVE_DUP3=1;
17109 HAVE_EUIDACCESS=1;
17110 HAVE_FACCESSAT=1;
17111 HAVE_FCHDIR=1;
17112 HAVE_FCHOWNAT=1;
17113 HAVE_FDATASYNC=1;
17114 HAVE_FSYNC=1;
17115 HAVE_FTRUNCATE=1;
17116 HAVE_GETDTABLESIZE=1;
17117 HAVE_GETGROUPS=1;
17118 HAVE_GETHOSTNAME=1;
17119 HAVE_GETLOGIN=1;
17120 HAVE_GETPAGESIZE=1;
17121 HAVE_GROUP_MEMBER=1;
17122 HAVE_LCHOWN=1;
17123 HAVE_LINK=1;
17124 HAVE_LINKAT=1;
17125 HAVE_PIPE=1;
17126 HAVE_PIPE2=1;
17127 HAVE_PREAD=1;
17128 HAVE_PWRITE=1;
17129 HAVE_READLINK=1;
17130 HAVE_READLINKAT=1;
17131 HAVE_SETHOSTNAME=1;
17132 HAVE_SLEEP=1;
17133 HAVE_SYMLINK=1;
17134 HAVE_SYMLINKAT=1;
17135 HAVE_UNLINKAT=1;
17136 HAVE_USLEEP=1;
17137 HAVE_DECL_ENVIRON=1;
17138 HAVE_DECL_FCHDIR=1;
17139 HAVE_DECL_FDATASYNC=1;
17140 HAVE_DECL_GETDOMAINNAME=1;
17141 HAVE_DECL_GETLOGIN_R=1;
17142 HAVE_DECL_GETPAGESIZE=1;
17143 HAVE_DECL_GETUSERSHELL=1;
17144 HAVE_DECL_SETHOSTNAME=1;
17145 HAVE_DECL_TTYNAME_R=1;
17146 HAVE_OS_H=0;
17147 HAVE_SYS_PARAM_H=0;
17148 REPLACE_CHOWN=0;
17149 REPLACE_CLOSE=0;
17150 REPLACE_DUP=0;
17151 REPLACE_DUP2=0;
17152 REPLACE_FCHOWNAT=0;
17153 REPLACE_FTRUNCATE=0;
17154 REPLACE_GETCWD=0;
17155 REPLACE_GETDOMAINNAME=0;
17156 REPLACE_GETLOGIN_R=0;
17157 REPLACE_GETGROUPS=0;
17158 REPLACE_GETPAGESIZE=0;
17159 REPLACE_ISATTY=0;
17160 REPLACE_LCHOWN=0;
17161 REPLACE_LINK=0;
17162 REPLACE_LINKAT=0;
17163 REPLACE_LSEEK=0;
17164 REPLACE_PREAD=0;
17165 REPLACE_PWRITE=0;
17166 REPLACE_READ=0;
17167 REPLACE_READLINK=0;
17168 REPLACE_RMDIR=0;
17169 REPLACE_SLEEP=0;
17170 REPLACE_SYMLINK=0;
17171 REPLACE_TTYNAME_R=0;
17172 REPLACE_UNLINK=0;
17173 REPLACE_UNLINKAT=0;
17174 REPLACE_USLEEP=0;
17175 REPLACE_WRITE=0;
17176 UNISTD_H_HAVE_WINSOCK2_H=0;
17177 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
f199cab1
GM
17178
17179
93131e11 17180
d7ad186c
GM
17181 GNULIB_OPENDIR=0;
17182 GNULIB_READDIR=0;
17183 GNULIB_REWINDDIR=0;
17184 GNULIB_CLOSEDIR=0;
17185 GNULIB_DIRFD=0;
17186 GNULIB_FDOPENDIR=0;
17187 GNULIB_SCANDIR=0;
17188 GNULIB_ALPHASORT=0;
17189 HAVE_OPENDIR=1;
17190 HAVE_READDIR=1;
17191 HAVE_REWINDDIR=1;
17192 HAVE_CLOSEDIR=1;
17193 HAVE_DECL_DIRFD=1;
17194 HAVE_DECL_FDOPENDIR=1;
17195 HAVE_FDOPENDIR=1;
17196 HAVE_SCANDIR=1;
17197 HAVE_ALPHASORT=1;
17198 REPLACE_OPENDIR=0;
17199 REPLACE_CLOSEDIR=0;
17200 REPLACE_DIRFD=0;
17201 REPLACE_FDOPENDIR=0;
710f5812
GM
17202
17203
17204
17205 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
17206$as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
17207if test "${gl_cv_have_include_next+set}" = set; then :
17208 $as_echo_n "(cached) " >&6
17209else
17210 rm -rf conftestd1a conftestd1b conftestd2
17211 mkdir conftestd1a conftestd1b conftestd2
17212 cat <<EOF > conftestd1a/conftest.h
17213#define DEFINED_IN_CONFTESTD1
17214#include_next <conftest.h>
17215#ifdef DEFINED_IN_CONFTESTD2
17216int foo;
17217#else
17218#error "include_next doesn't work"
17219#endif
17220EOF
17221 cat <<EOF > conftestd1b/conftest.h
17222#define DEFINED_IN_CONFTESTD1
17223#include <stdio.h>
17224#include_next <conftest.h>
17225#ifdef DEFINED_IN_CONFTESTD2
17226int foo;
17227#else
17228#error "include_next doesn't work"
17229#endif
17230EOF
17231 cat <<EOF > conftestd2/conftest.h
17232#ifndef DEFINED_IN_CONFTESTD1
17233#error "include_next test doesn't work"
17234#endif
17235#define DEFINED_IN_CONFTESTD2
17236EOF
17237 gl_save_CPPFLAGS="$CPPFLAGS"
17238 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
17239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17240/* end confdefs.h. */
17241#include <conftest.h>
17242_ACEOF
17243if ac_fn_c_try_compile "$LINENO"; then :
17244 gl_cv_have_include_next=yes
17245else
17246 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
17247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17248/* end confdefs.h. */
17249#include <conftest.h>
17250_ACEOF
17251if ac_fn_c_try_compile "$LINENO"; then :
17252 gl_cv_have_include_next=buggy
17253else
17254 gl_cv_have_include_next=no
17255fi
17256rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17257
17258fi
17259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17260 CPPFLAGS="$gl_save_CPPFLAGS"
17261 rm -rf conftestd1a conftestd1b conftestd2
17262
17263fi
17264{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
17265$as_echo "$gl_cv_have_include_next" >&6; }
17266 PRAGMA_SYSTEM_HEADER=
17267 if test $gl_cv_have_include_next = yes; then
17268 INCLUDE_NEXT=include_next
17269 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
17270 if test -n "$GCC"; then
17271 PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
17272 fi
17273 else
17274 if test $gl_cv_have_include_next = buggy; then
17275 INCLUDE_NEXT=include
17276 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
17277 else
17278 INCLUDE_NEXT=include
17279 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
17280 fi
17281 fi
17282
17283
17284
17285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5
17286$as_echo_n "checking whether system header files limit the line length... " >&6; }
17287if test "${gl_cv_pragma_columns+set}" = set; then :
17288 $as_echo_n "(cached) " >&6
17289else
17290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17291/* end confdefs.h. */
17292
17293#ifdef __TANDEM
17294choke me
17295#endif
17296
17297_ACEOF
17298if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17299 $EGREP "choke me" >/dev/null 2>&1; then :
17300 gl_cv_pragma_columns=yes
17301else
17302 gl_cv_pragma_columns=no
17303fi
17304rm -f conftest*
17305
17306
17307fi
17308{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5
17309$as_echo "$gl_cv_pragma_columns" >&6; }
17310 if test $gl_cv_pragma_columns = yes; then
17311 PRAGMA_COLUMNS="#pragma COLUMNS 10000"
17312 else
17313 PRAGMA_COLUMNS=
17314 fi
17315
17316
710f5812 17317
710f5812 17318
710f5812 17319
d7ad186c
GM
17320 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtold conforms to C99" >&5
17321$as_echo_n "checking whether strtold conforms to C99... " >&6; }
17322if test "${gl_cv_func_c99_strtold+set}" = set; then :
f199cab1 17323 $as_echo_n "(cached) " >&6
ae0d7250 17324else
f199cab1 17325 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3e0be4ab 17326/* end confdefs.h. */
d7ad186c
GM
17327/* On HP-UX before 11.23, strtold returns a struct instead of
17328 long double. Reject implementations like that, by requiring
17329 compatibility with the C99 prototype. */
17330 #include <stdlib.h>
17331 static long double (*p) (char const *, char **) = strtold;
17332 static long double
17333 test (char const *nptr, char **endptr)
17334 {
17335 long double r;
17336 r = strtold (nptr, endptr);
17337 return r;
17338 }
3e0be4ab
GM
17339int
17340main ()
17341{
d7ad186c 17342return test ("1.0", NULL) != 1 || p ("1.0", NULL) != 1;
3e0be4ab
GM
17343 ;
17344 return 0;
17345}
6ad6792b 17346_ACEOF
d7ad186c
GM
17347if ac_fn_c_try_link "$LINENO"; then :
17348 gl_cv_func_c99_strtold=yes
f199cab1 17349else
d7ad186c 17350 gl_cv_func_c99_strtold=no
f199cab1 17351fi
d7ad186c
GM
17352rm -f core conftest.err conftest.$ac_objext \
17353 conftest$ac_exeext conftest.$ac_ext
f199cab1 17354fi
d7ad186c
GM
17355{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_c99_strtold" >&5
17356$as_echo "$gl_cv_func_c99_strtold" >&6; }
17357 if test $gl_cv_func_c99_strtold = yes; then
f199cab1 17358
d7ad186c 17359$as_echo "#define HAVE_C99_STRTOLD 1" >>confdefs.h
f199cab1 17360
5476a9a4 17361 fi
f199cab1 17362
f199cab1 17363
f199cab1
GM
17364
17365
4fda9c95 17366
3bf26e96
GM
17367
17368
eda33f78 17369
d7ad186c
GM
17370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
17371$as_echo_n "checking if environ is properly declared... " >&6; }
17372 if test "${gt_cv_var_environ_declaration+set}" = set; then :
17373 $as_echo_n "(cached) " >&6
17374else
eda33f78 17375
d7ad186c
GM
17376 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17377/* end confdefs.h. */
17378#if HAVE_UNISTD_H
17379 #include <unistd.h>
17380 #endif
17381 /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>. */
17382 #include <stdlib.h>
17383
17384 extern struct { int foo; } environ;
17385int
17386main ()
17387{
17388environ.foo = 1;
17389 ;
17390 return 0;
17391}
17392_ACEOF
17393if ac_fn_c_try_compile "$LINENO"; then :
17394 gt_cv_var_environ_declaration=no
17395else
17396 gt_cv_var_environ_declaration=yes
17397fi
17398rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17399fi
17400
17401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
17402$as_echo "$gt_cv_var_environ_declaration" >&6; }
17403 if test $gt_cv_var_environ_declaration = yes; then
17404
17405$as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
17406
17407 fi
17408
17409
17410 if test $gt_cv_var_environ_declaration != yes; then
17411 HAVE_DECL_ENVIRON=0
17412 fi
17413
17414
17415
3a019ab4
GM
17416 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
17417$as_echo_n "checking for complete errno.h... " >&6; }
17418if test "${gl_cv_header_errno_h_complete+set}" = set; then :
17419 $as_echo_n "(cached) " >&6
17420else
17421
17422 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17423/* end confdefs.h. */
17424
17425#include <errno.h>
17426#if !defined ETXTBSY
17427booboo
17428#endif
17429#if !defined ENOMSG
17430booboo
17431#endif
17432#if !defined EIDRM
17433booboo
17434#endif
17435#if !defined ENOLINK
17436booboo
17437#endif
17438#if !defined EPROTO
17439booboo
17440#endif
17441#if !defined EMULTIHOP
17442booboo
17443#endif
17444#if !defined EBADMSG
17445booboo
17446#endif
17447#if !defined EOVERFLOW
17448booboo
17449#endif
17450#if !defined ENOTSUP
17451booboo
17452#endif
17453#if !defined ENETRESET
17454booboo
17455#endif
17456#if !defined ECONNABORTED
17457booboo
17458#endif
17459#if !defined ESTALE
17460booboo
17461#endif
17462#if !defined EDQUOT
17463booboo
17464#endif
17465#if !defined ECANCELED
17466booboo
17467#endif
17468#if !defined EOWNERDEAD
17469booboo
17470#endif
17471#if !defined ENOTRECOVERABLE
17472booboo
17473#endif
17474#if !defined EILSEQ
17475booboo
17476#endif
17477
17478_ACEOF
17479if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17480 $EGREP "booboo" >/dev/null 2>&1; then :
17481 gl_cv_header_errno_h_complete=no
17482else
17483 gl_cv_header_errno_h_complete=yes
17484fi
17485rm -f conftest*
17486
d7ad186c 17487
3a019ab4
GM
17488fi
17489{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
17490$as_echo "$gl_cv_header_errno_h_complete" >&6; }
17491 if test $gl_cv_header_errno_h_complete = yes; then
17492 ERRNO_H=''
17493 else
d7ad186c
GM
17494
17495
17496
17497
17498
d7ad186c
GM
17499
17500
d7ad186c 17501
3a019ab4
GM
17502 if test $gl_cv_have_include_next = yes; then
17503 gl_cv_next_errno_h='<'errno.h'>'
17504 else
17505 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
17506$as_echo_n "checking absolute name of <errno.h>... " >&6; }
17507if test "${gl_cv_next_errno_h+set}" = set; then :
17508 $as_echo_n "(cached) " >&6
d7ad186c
GM
17509else
17510
3a019ab4
GM
17511 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17512/* end confdefs.h. */
17513#include <errno.h>
17514
d7ad186c 17515_ACEOF
3a019ab4
GM
17516 case "$host_os" in
17517 aix*) gl_absname_cpp="$ac_cpp -C" ;;
17518 *) gl_absname_cpp="$ac_cpp" ;;
17519 esac
17520
17521 case "$host_os" in
17522 mingw*)
17523 gl_dirsep_regex='[/\\]'
17524 ;;
17525 *)
17526 gl_dirsep_regex='\/'
17527 ;;
17528 esac
17529 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17530
17531 gl_header_literal_regex=`echo 'errno.h' \
17532 | sed -e "$gl_make_literal_regex_sed"`
17533 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17534 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17535 s|^/[^/]|//&|
17536 p
17537 q
17538 }'
17539 gl_cv_next_errno_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17540 sed -n "$gl_absolute_header_sed"`'"'
d7ad186c 17541
d7ad186c 17542
2407788f 17543fi
3a019ab4
GM
17544{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
17545$as_echo "$gl_cv_next_errno_h" >&6; }
17546 fi
17547 NEXT_ERRNO_H=$gl_cv_next_errno_h
2407788f 17548
3a019ab4
GM
17549 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17550 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17551 gl_next_as_first_directive='<'errno.h'>'
17552 else
17553 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17554 gl_next_as_first_directive=$gl_cv_next_errno_h
17555 fi
17556 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
2407788f 17557
d7ad186c
GM
17558
17559
d7ad186c 17560
3a019ab4
GM
17561 ERRNO_H='errno.h'
17562 fi
17563
17564 if test -n "$ERRNO_H"; then
17565 GL_GENERATE_ERRNO_H_TRUE=
17566 GL_GENERATE_ERRNO_H_FALSE='#'
d7ad186c 17567else
3a019ab4
GM
17568 GL_GENERATE_ERRNO_H_TRUE='#'
17569 GL_GENERATE_ERRNO_H_FALSE=
d7ad186c 17570fi
d7ad186c 17571
d7ad186c 17572
3a019ab4
GM
17573 if test -n "$ERRNO_H"; then
17574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
17575$as_echo_n "checking for EMULTIHOP value... " >&6; }
17576if test "${gl_cv_header_errno_h_EMULTIHOP+set}" = set; then :
17577 $as_echo_n "(cached) " >&6
17578else
d7ad186c 17579
3a019ab4
GM
17580 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17581/* end confdefs.h. */
d7ad186c 17582
3a019ab4
GM
17583#include <errno.h>
17584#ifdef EMULTIHOP
17585yes
17586#endif
d7ad186c 17587
3a019ab4
GM
17588_ACEOF
17589if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17590 $EGREP "yes" >/dev/null 2>&1; then :
17591 gl_cv_header_errno_h_EMULTIHOP=yes
d7ad186c 17592else
3a019ab4 17593 gl_cv_header_errno_h_EMULTIHOP=no
d7ad186c 17594fi
3a019ab4
GM
17595rm -f conftest*
17596
17597 if test $gl_cv_header_errno_h_EMULTIHOP = no; then
17598 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17599/* end confdefs.h. */
17600
17601#define _XOPEN_SOURCE_EXTENDED 1
17602#include <errno.h>
17603#ifdef EMULTIHOP
17604yes
17605#endif
d7ad186c 17606
d7ad186c 17607_ACEOF
3a019ab4
GM
17608if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17609 $EGREP "yes" >/dev/null 2>&1; then :
17610 gl_cv_header_errno_h_EMULTIHOP=hidden
17611fi
17612rm -f conftest*
d7ad186c 17613
3a019ab4
GM
17614 if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
17615 if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP" "
17616#define _XOPEN_SOURCE_EXTENDED 1
17617#include <errno.h>
17618/* The following two lines are a workaround against an autoconf-2.52 bug. */
17619#include <stdio.h>
17620#include <stdlib.h>
17621"; then :
d7ad186c 17622
3a019ab4 17623fi
d7ad186c 17624
3a019ab4
GM
17625 fi
17626 fi
d7ad186c 17627
3a019ab4
GM
17628fi
17629{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
17630$as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
17631 case $gl_cv_header_errno_h_EMULTIHOP in
17632 yes | no)
17633 EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
17634 ;;
17635 *)
17636 EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
17637 ;;
17638 esac
d7ad186c
GM
17639
17640
3a019ab4 17641 fi
d7ad186c
GM
17642
17643
3a019ab4
GM
17644 if test -n "$ERRNO_H"; then
17645 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
17646$as_echo_n "checking for ENOLINK value... " >&6; }
17647if test "${gl_cv_header_errno_h_ENOLINK+set}" = set; then :
d7ad186c
GM
17648 $as_echo_n "(cached) " >&6
17649else
d7ad186c 17650
3a019ab4 17651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d7ad186c 17652/* end confdefs.h. */
3a019ab4
GM
17653
17654#include <errno.h>
17655#ifdef ENOLINK
17656yes
17657#endif
17658
17659_ACEOF
17660if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17661 $EGREP "yes" >/dev/null 2>&1; then :
17662 gl_cv_header_errno_h_ENOLINK=yes
17663else
17664 gl_cv_header_errno_h_ENOLINK=no
17665fi
17666rm -f conftest*
17667
17668 if test $gl_cv_header_errno_h_ENOLINK = no; then
17669 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17670/* end confdefs.h. */
17671
17672#define _XOPEN_SOURCE_EXTENDED 1
17673#include <errno.h>
17674#ifdef ENOLINK
17675yes
17676#endif
17677
17678_ACEOF
17679if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17680 $EGREP "yes" >/dev/null 2>&1; then :
17681 gl_cv_header_errno_h_ENOLINK=hidden
17682fi
17683rm -f conftest*
17684
17685 if test $gl_cv_header_errno_h_ENOLINK = hidden; then
17686 if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK" "
17687#define _XOPEN_SOURCE_EXTENDED 1
17688#include <errno.h>
17689/* The following two lines are a workaround against an autoconf-2.52 bug. */
17690#include <stdio.h>
17691#include <stdlib.h>
17692"; then :
17693
17694fi
17695
17696 fi
17697 fi
17698
17699fi
17700{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
17701$as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; }
17702 case $gl_cv_header_errno_h_ENOLINK in
17703 yes | no)
17704 ENOLINK_HIDDEN=0; ENOLINK_VALUE=
17705 ;;
17706 *)
17707 ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
17708 ;;
17709 esac
17710
17711
17712 fi
17713
17714
17715 if test -n "$ERRNO_H"; then
17716 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
17717$as_echo_n "checking for EOVERFLOW value... " >&6; }
17718if test "${gl_cv_header_errno_h_EOVERFLOW+set}" = set; then :
17719 $as_echo_n "(cached) " >&6
17720else
17721
17722 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17723/* end confdefs.h. */
17724
17725#include <errno.h>
17726#ifdef EOVERFLOW
17727yes
17728#endif
17729
17730_ACEOF
17731if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17732 $EGREP "yes" >/dev/null 2>&1; then :
17733 gl_cv_header_errno_h_EOVERFLOW=yes
17734else
17735 gl_cv_header_errno_h_EOVERFLOW=no
17736fi
17737rm -f conftest*
17738
17739 if test $gl_cv_header_errno_h_EOVERFLOW = no; then
17740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17741/* end confdefs.h. */
17742
17743#define _XOPEN_SOURCE_EXTENDED 1
17744#include <errno.h>
17745#ifdef EOVERFLOW
17746yes
17747#endif
17748
17749_ACEOF
17750if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17751 $EGREP "yes" >/dev/null 2>&1; then :
17752 gl_cv_header_errno_h_EOVERFLOW=hidden
17753fi
17754rm -f conftest*
17755
17756 if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
17757 if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW" "
17758#define _XOPEN_SOURCE_EXTENDED 1
17759#include <errno.h>
17760/* The following two lines are a workaround against an autoconf-2.52 bug. */
17761#include <stdio.h>
17762#include <stdlib.h>
17763"; then :
17764
17765fi
17766
17767 fi
17768 fi
17769
17770fi
17771{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
17772$as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
17773 case $gl_cv_header_errno_h_EOVERFLOW in
17774 yes | no)
17775 EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
17776 ;;
17777 *)
17778 EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
17779 ;;
17780 esac
17781
17782
17783 fi
17784
17785
17786
17787
17788
17789
17790
17791
17792
17793
17794 GNULIB_FCNTL=0;
17795 GNULIB_NONBLOCKING=0;
17796 GNULIB_OPEN=0;
17797 GNULIB_OPENAT=0;
17798 HAVE_FCNTL=1;
17799 HAVE_OPENAT=1;
17800 REPLACE_FCNTL=0;
17801 REPLACE_OPEN=0;
17802 REPLACE_OPENAT=0;
17803
17804
17805ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
17806if test "x$ac_cv_type_mode_t" = x""yes; then :
17807
17808else
17809
17810cat >>confdefs.h <<_ACEOF
17811#define mode_t int
17812_ACEOF
17813
17814fi
17815
17816ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "$ac_includes_default"
17817if test "x$ac_cv_have_decl_fdatasync" = x""yes; then :
17818 ac_have_decl=1
17819else
17820 ac_have_decl=0
17821fi
17822
17823cat >>confdefs.h <<_ACEOF
17824#define HAVE_DECL_FDATASYNC $ac_have_decl
17825_ACEOF
17826
17827
17828
17829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for st_dm_mode in struct stat" >&5
17830$as_echo_n "checking for st_dm_mode in struct stat... " >&6; }
17831if test "${ac_cv_struct_st_dm_mode+set}" = set; then :
17832 $as_echo_n "(cached) " >&6
17833else
17834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17835/* end confdefs.h. */
17836
17837#include <sys/types.h>
17838#include <sys/stat.h>
17839int
17840main ()
17841{
17842struct stat s; s.st_dm_mode;
17843 ;
17844 return 0;
17845}
17846_ACEOF
17847if ac_fn_c_try_compile "$LINENO"; then :
17848 ac_cv_struct_st_dm_mode=yes
17849else
17850 ac_cv_struct_st_dm_mode=no
17851fi
17852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17853fi
17854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_st_dm_mode" >&5
17855$as_echo "$ac_cv_struct_st_dm_mode" >&6; }
17856
17857 if test $ac_cv_struct_st_dm_mode = yes; then
17858
17859$as_echo "#define HAVE_ST_DM_MODE 1" >>confdefs.h
17860
17861 fi
17862
17863
17864ac_fn_c_check_decl "$LINENO" "strmode" "ac_cv_have_decl_strmode" "$ac_includes_default"
17865if test "x$ac_cv_have_decl_strmode" = x""yes; then :
17866 ac_have_decl=1
17867else
17868 ac_have_decl=0
17869fi
17870
17871cat >>confdefs.h <<_ACEOF
17872#define HAVE_DECL_STRMODE $ac_have_decl
17873_ACEOF
17874
17875
17876
17877
17878
17879
17880 GNULIB_FCHMODAT=0;
17881 GNULIB_FSTAT=0;
17882 GNULIB_FSTATAT=0;
17883 GNULIB_FUTIMENS=0;
17884 GNULIB_LCHMOD=0;
17885 GNULIB_LSTAT=0;
17886 GNULIB_MKDIRAT=0;
17887 GNULIB_MKFIFO=0;
17888 GNULIB_MKFIFOAT=0;
17889 GNULIB_MKNOD=0;
17890 GNULIB_MKNODAT=0;
17891 GNULIB_STAT=0;
17892 GNULIB_UTIMENSAT=0;
17893 HAVE_FCHMODAT=1;
17894 HAVE_FSTATAT=1;
17895 HAVE_FUTIMENS=1;
17896 HAVE_LCHMOD=1;
17897 HAVE_LSTAT=1;
17898 HAVE_MKDIRAT=1;
17899 HAVE_MKFIFO=1;
17900 HAVE_MKFIFOAT=1;
17901 HAVE_MKNOD=1;
17902 HAVE_MKNODAT=1;
17903 HAVE_UTIMENSAT=1;
17904 REPLACE_FSTAT=0;
17905 REPLACE_FSTATAT=0;
17906 REPLACE_FUTIMENS=0;
17907 REPLACE_LSTAT=0;
17908 REPLACE_MKDIR=0;
17909 REPLACE_MKFIFO=0;
17910 REPLACE_MKNOD=0;
17911 REPLACE_STAT=0;
17912 REPLACE_UTIMENSAT=0;
17913
17914
17915 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
17916$as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
17917if test "${gl_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then :
17918 $as_echo_n "(cached) " >&6
17919else
17920 rm -f conftest.sym conftest.file
17921 echo >conftest.file
17922 if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then
17923 if test "$cross_compiling" = yes; then :
17924 case "$host_os" in
17925 # Guess yes on glibc systems.
17926 *-gnu*) gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
17927 # If we don't know, assume the worst.
17928 *) gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
17929 esac
17930
17931else
17932 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17933/* end confdefs.h. */
17934$ac_includes_default
17935int
17936main ()
17937{
17938struct stat sbuf;
17939 /* Linux will dereference the symlink and fail, as required by
d7ad186c
GM
17940 POSIX. That is better in the sense that it means we will not
17941 have to compile and use the lstat wrapper. */
17942 return lstat ("conftest.sym/", &sbuf) == 0;
17943
17944 ;
17945 return 0;
17946}
17947_ACEOF
17948if ac_fn_c_try_run "$LINENO"; then :
17949 gl_cv_func_lstat_dereferences_slashed_symlink=yes
17950else
17951 gl_cv_func_lstat_dereferences_slashed_symlink=no
17952fi
17953rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17954 conftest.$ac_objext conftest.beam conftest.$ac_ext
17955fi
17956
17957 else
17958 # If the 'ln -s' command failed, then we probably don't even
17959 # have an lstat function.
17960 gl_cv_func_lstat_dereferences_slashed_symlink="guessing no"
17961 fi
17962 rm -f conftest.sym conftest.file
17963
17964fi
17965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
17966$as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
17967 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
17968 *yes)
17969
17970cat >>confdefs.h <<_ACEOF
17971#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
17972_ACEOF
17973
17974 ;;
17975 esac
17976
17977
17978
17979
2407788f
GM
17980
17981
d7ad186c
GM
17982 GNULIB__EXIT=0;
17983 GNULIB_ATOLL=0;
17984 GNULIB_CALLOC_POSIX=0;
17985 GNULIB_CANONICALIZE_FILE_NAME=0;
17986 GNULIB_GETLOADAVG=0;
17987 GNULIB_GETSUBOPT=0;
17988 GNULIB_GRANTPT=0;
5476a9a4
GM
17989 GNULIB_MALLOC_POSIX=0;
17990 GNULIB_MBTOWC=0;
17991 GNULIB_MKDTEMP=0;
17992 GNULIB_MKOSTEMP=0;
17993 GNULIB_MKOSTEMPS=0;
17994 GNULIB_MKSTEMP=0;
17995 GNULIB_MKSTEMPS=0;
17996 GNULIB_POSIX_OPENPT=0;
17997 GNULIB_PTSNAME=0;
17998 GNULIB_PTSNAME_R=0;
17999 GNULIB_PUTENV=0;
18000 GNULIB_RANDOM=0;
18001 GNULIB_RANDOM_R=0;
18002 GNULIB_REALLOC_POSIX=0;
18003 GNULIB_REALPATH=0;
18004 GNULIB_RPMATCH=0;
2cdd55fc 18005 GNULIB_SECURE_GETENV=0;
5476a9a4
GM
18006 GNULIB_SETENV=0;
18007 GNULIB_STRTOD=0;
18008 GNULIB_STRTOLL=0;
18009 GNULIB_STRTOULL=0;
18010 GNULIB_SYSTEM_POSIX=0;
18011 GNULIB_UNLOCKPT=0;
18012 GNULIB_UNSETENV=0;
18013 GNULIB_WCTOMB=0;
18014 HAVE__EXIT=1;
18015 HAVE_ATOLL=1;
18016 HAVE_CANONICALIZE_FILE_NAME=1;
18017 HAVE_DECL_GETLOADAVG=1;
18018 HAVE_GETSUBOPT=1;
18019 HAVE_GRANTPT=1;
18020 HAVE_MKDTEMP=1;
18021 HAVE_MKOSTEMP=1;
18022 HAVE_MKOSTEMPS=1;
18023 HAVE_MKSTEMP=1;
18024 HAVE_MKSTEMPS=1;
18025 HAVE_POSIX_OPENPT=1;
18026 HAVE_PTSNAME=1;
18027 HAVE_PTSNAME_R=1;
18028 HAVE_RANDOM=1;
18029 HAVE_RANDOM_H=1;
18030 HAVE_RANDOM_R=1;
18031 HAVE_REALPATH=1;
18032 HAVE_RPMATCH=1;
2cdd55fc 18033 HAVE_SECURE_GETENV=1;
5476a9a4
GM
18034 HAVE_SETENV=1;
18035 HAVE_DECL_SETENV=1;
18036 HAVE_STRTOD=1;
18037 HAVE_STRTOLL=1;
18038 HAVE_STRTOULL=1;
18039 HAVE_STRUCT_RANDOM_DATA=1;
18040 HAVE_SYS_LOADAVG_H=0;
18041 HAVE_UNLOCKPT=1;
18042 HAVE_DECL_UNSETENV=1;
18043 REPLACE_CALLOC=0;
18044 REPLACE_CANONICALIZE_FILE_NAME=0;
18045 REPLACE_MALLOC=0;
18046 REPLACE_MBTOWC=0;
18047 REPLACE_MKSTEMP=0;
b6c9d18d 18048 REPLACE_PTSNAME=0;
5476a9a4
GM
18049 REPLACE_PTSNAME_R=0;
18050 REPLACE_PUTENV=0;
18051 REPLACE_RANDOM_R=0;
18052 REPLACE_REALLOC=0;
18053 REPLACE_REALPATH=0;
18054 REPLACE_SETENV=0;
18055 REPLACE_STRTOD=0;
18056 REPLACE_UNSETENV=0;
18057 REPLACE_WCTOMB=0;
f199cab1
GM
18058
18059
18060
f199cab1
GM
18061
18062
18063
18064
18065
18066
18067
18068
18069
18070
5f90be1b 18071
f199cab1
GM
18072
18073
18074 if test $gl_cv_have_include_next = yes; then
5476a9a4 18075 gl_cv_next_getopt_h='<'getopt.h'>'
f199cab1 18076 else
5476a9a4
GM
18077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <getopt.h>" >&5
18078$as_echo_n "checking absolute name of <getopt.h>... " >&6; }
18079if test "${gl_cv_next_getopt_h+set}" = set; then :
5f90be1b 18080 $as_echo_n "(cached) " >&6
5f90be1b 18081else
f199cab1 18082
5476a9a4 18083 if test $ac_cv_header_getopt_h = yes; then
f199cab1
GM
18084
18085
18086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5f90be1b 18087/* end confdefs.h. */
5476a9a4 18088#include <getopt.h>
4fda9c95 18089
5f90be1b 18090_ACEOF
f199cab1
GM
18091 case "$host_os" in
18092 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18093 *) gl_absname_cpp="$ac_cpp" ;;
18094 esac
5f90be1b 18095
f199cab1
GM
18096 case "$host_os" in
18097 mingw*)
18098 gl_dirsep_regex='[/\\]'
18099 ;;
18100 *)
18101 gl_dirsep_regex='\/'
18102 ;;
18103 esac
18104 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
5f90be1b 18105
5476a9a4 18106 gl_header_literal_regex=`echo 'getopt.h' \
f199cab1
GM
18107 | sed -e "$gl_make_literal_regex_sed"`
18108 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18109 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18110 s|^/[^/]|//&|
18111 p
18112 q
18113 }'
5476a9a4 18114 gl_cv_next_getopt_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
f199cab1
GM
18115 sed -n "$gl_absolute_header_sed"`'"'
18116 else
5476a9a4 18117 gl_cv_next_getopt_h='<'getopt.h'>'
f199cab1 18118 fi
5f90be1b
PE
18119
18120
3e0be4ab 18121fi
5476a9a4
GM
18122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5
18123$as_echo "$gl_cv_next_getopt_h" >&6; }
f199cab1 18124 fi
5476a9a4 18125 NEXT_GETOPT_H=$gl_cv_next_getopt_h
3e0be4ab 18126
f199cab1
GM
18127 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18128 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
5476a9a4 18129 gl_next_as_first_directive='<'getopt.h'>'
f199cab1
GM
18130 else
18131 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
5476a9a4 18132 gl_next_as_first_directive=$gl_cv_next_getopt_h
f199cab1 18133 fi
5476a9a4 18134 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive
f199cab1
GM
18135
18136
f199cab1 18137
f199cab1 18138
5476a9a4
GM
18139 if test $ac_cv_header_getopt_h = yes; then
18140 HAVE_GETOPT_H=1
18141 else
18142 HAVE_GETOPT_H=0
f199cab1
GM
18143 fi
18144
f199cab1 18145
5476a9a4 18146 gl_replace_getopt=
f199cab1 18147
5476a9a4
GM
18148 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
18149 for ac_header in getopt.h
18150do :
18151 ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
18152if test "x$ac_cv_header_getopt_h" = x""yes; then :
18153 cat >>confdefs.h <<_ACEOF
18154#define HAVE_GETOPT_H 1
18155_ACEOF
f199cab1 18156
5476a9a4
GM
18157else
18158 gl_replace_getopt=yes
3e0be4ab 18159fi
3e0be4ab 18160
5476a9a4 18161done
3e0be4ab 18162
5476a9a4 18163 fi
3e0be4ab 18164
5476a9a4
GM
18165 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
18166 for ac_func in getopt_long_only
18167do :
18168 ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only"
18169if test "x$ac_cv_func_getopt_long_only" = x""yes; then :
18170 cat >>confdefs.h <<_ACEOF
18171#define HAVE_GETOPT_LONG_ONLY 1
18172_ACEOF
3e0be4ab 18173
3e0be4ab 18174else
5476a9a4 18175 gl_replace_getopt=yes
3e0be4ab 18176fi
5476a9a4 18177done
3e0be4ab 18178
f199cab1 18179 fi
3e0be4ab 18180
5476a9a4
GM
18181 if test -z "$gl_replace_getopt"; then
18182 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5
18183$as_echo_n "checking whether getopt is POSIX compatible... " >&6; }
18184if test "${gl_cv_func_getopt_posix+set}" = set; then :
3e0be4ab 18185 $as_echo_n "(cached) " >&6
5476a9a4
GM
18186else
18187
18188 if test $cross_compiling = no; then
18189 if test "$cross_compiling" = yes; then :
18190 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18191$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18192as_fn_error "cannot run test program while cross compiling
18193See \`config.log' for more details." "$LINENO" 5; }
3e0be4ab 18194else
f199cab1 18195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3e0be4ab 18196/* end confdefs.h. */
5476a9a4
GM
18197
18198#include <unistd.h>
18199#include <stdlib.h>
18200#include <string.h>
18201
f199cab1
GM
18202int
18203main ()
18204{
5476a9a4
GM
18205 static char program[] = "program";
18206 static char a[] = "-a";
18207 static char foo[] = "foo";
18208 static char bar[] = "bar";
18209 char *argv[] = { program, a, foo, bar, NULL };
18210 int c;
18211
18212 c = getopt (4, argv, "ab");
18213 if (!(c == 'a'))
18214 return 1;
18215 c = getopt (4, argv, "ab");
18216 if (!(c == -1))
18217 return 2;
18218 if (!(optind == 2))
18219 return 3;
f199cab1
GM
18220 return 0;
18221}
18222
3e0be4ab 18223_ACEOF
5476a9a4
GM
18224if ac_fn_c_try_run "$LINENO"; then :
18225 gl_cv_func_getopt_posix=maybe
3e0be4ab 18226else
5476a9a4 18227 gl_cv_func_getopt_posix=no
3e0be4ab 18228fi
5476a9a4
GM
18229rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18230 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1
GM
18231fi
18232
5476a9a4
GM
18233 if test $gl_cv_func_getopt_posix = maybe; then
18234 if test "$cross_compiling" = yes; then :
18235 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18236$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18237as_fn_error "cannot run test program while cross compiling
18238See \`config.log' for more details." "$LINENO" 5; }
3e0be4ab 18239else
5476a9a4
GM
18240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18241/* end confdefs.h. */
3e0be4ab 18242
5476a9a4
GM
18243#include <unistd.h>
18244#include <stdlib.h>
18245#include <string.h>
3e0be4ab 18246
5476a9a4
GM
18247int
18248main ()
18249{
18250 static char program[] = "program";
18251 static char donald[] = "donald";
18252 static char p[] = "-p";
18253 static char billy[] = "billy";
18254 static char duck[] = "duck";
18255 static char a[] = "-a";
18256 static char bar[] = "bar";
18257 char *argv[] = { program, donald, p, billy, duck, a, bar, NULL };
18258 int c;
3e0be4ab 18259
5476a9a4
GM
18260 c = getopt (7, argv, "+abp:q:");
18261 if (!(c == -1))
18262 return 4;
18263 if (!(strcmp (argv[0], "program") == 0))
18264 return 5;
18265 if (!(strcmp (argv[1], "donald") == 0))
18266 return 6;
18267 if (!(strcmp (argv[2], "-p") == 0))
18268 return 7;
18269 if (!(strcmp (argv[3], "billy") == 0))
18270 return 8;
18271 if (!(strcmp (argv[4], "duck") == 0))
18272 return 9;
18273 if (!(strcmp (argv[5], "-a") == 0))
18274 return 10;
18275 if (!(strcmp (argv[6], "bar") == 0))
18276 return 11;
18277 if (!(optind == 1))
18278 return 12;
18279 return 0;
18280}
3e0be4ab
GM
18281
18282_ACEOF
5476a9a4
GM
18283if ac_fn_c_try_run "$LINENO"; then :
18284 gl_cv_func_getopt_posix=maybe
18285else
18286 gl_cv_func_getopt_posix=no
18287fi
18288rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18289 conftest.$ac_objext conftest.beam conftest.$ac_ext
18290fi
b0415a03 18291
5476a9a4
GM
18292 fi
18293 if test $gl_cv_func_getopt_posix = maybe; then
18294 if test "$cross_compiling" = yes; then :
18295 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18296$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18297as_fn_error "cannot run test program while cross compiling
18298See \`config.log' for more details." "$LINENO" 5; }
18299else
18300 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18301/* end confdefs.h. */
b0415a03 18302
5476a9a4
GM
18303#include <unistd.h>
18304#include <stdlib.h>
18305#include <string.h>
3e0be4ab 18306
5476a9a4
GM
18307int
18308main ()
18309{
18310 static char program[] = "program";
18311 static char ab[] = "-ab";
18312 char *argv[3] = { program, ab, NULL };
18313 if (getopt (2, argv, "ab:") != 'a')
18314 return 13;
18315 if (getopt (2, argv, "ab:") != '?')
18316 return 14;
18317 if (optopt != 'b')
18318 return 15;
18319 if (optind != 2)
18320 return 16;
18321 return 0;
18322}
3e0be4ab 18323
5476a9a4
GM
18324_ACEOF
18325if ac_fn_c_try_run "$LINENO"; then :
18326 gl_cv_func_getopt_posix=yes
18327else
18328 gl_cv_func_getopt_posix=no
18329fi
18330rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18331 conftest.$ac_objext conftest.beam conftest.$ac_ext
3e0be4ab 18332fi
3e0be4ab 18333
5476a9a4
GM
18334 fi
18335 else
18336 case "$host_os" in
18337 darwin* | aix* | mingw*) gl_cv_func_getopt_posix="guessing no";;
18338 *) gl_cv_func_getopt_posix="guessing yes";;
18339 esac
18340 fi
3e0be4ab 18341
5476a9a4
GM
18342fi
18343{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5
18344$as_echo "$gl_cv_func_getopt_posix" >&6; }
18345 case "$gl_cv_func_getopt_posix" in
18346 *no) gl_replace_getopt=yes ;;
18347 esac
3e0be4ab
GM
18348 fi
18349
5476a9a4
GM
18350 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
18351 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5
18352$as_echo_n "checking for working GNU getopt function... " >&6; }
18353if test "${gl_cv_func_getopt_gnu+set}" = set; then :
18354 $as_echo_n "(cached) " >&6
18355else
18356 # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the
18357 # optstring is necessary for programs like m4 that have POSIX-mandated
18358 # semantics for supporting options interspersed with files.
18359 # Also, since getopt_long is a GNU extension, we require optind=0.
18360 # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT;
18361 # so take care to revert to the correct (non-)export state.
18362 gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }'
18363 case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in
18364 xx) gl_had_POSIXLY_CORRECT=exported ;;
18365 x) gl_had_POSIXLY_CORRECT=yes ;;
18366 *) gl_had_POSIXLY_CORRECT= ;;
18367 esac
18368 POSIXLY_CORRECT=1
18369 export POSIXLY_CORRECT
18370 if test "$cross_compiling" = yes; then :
18371 gl_cv_func_getopt_gnu="guessing no"
3e0be4ab 18372
5476a9a4
GM
18373else
18374 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18375/* end confdefs.h. */
18376#include <getopt.h>
18377 #include <stddef.h>
18378 #include <string.h>
3e0be4ab 18379
5476a9a4
GM
18380#include <stdlib.h>
18381#if defined __MACH__ && defined __APPLE__
18382/* Avoid a crash on Mac OS X. */
18383#include <mach/mach.h>
18384#include <mach/mach_error.h>
18385#include <mach/thread_status.h>
18386#include <mach/exception.h>
18387#include <mach/task.h>
18388#include <pthread.h>
18389/* The exception port on which our thread listens. */
18390static mach_port_t our_exception_port;
18391/* The main function of the thread listening for exceptions of type
18392 EXC_BAD_ACCESS. */
18393static void *
18394mach_exception_thread (void *arg)
18395{
18396 /* Buffer for a message to be received. */
18397 struct {
18398 mach_msg_header_t head;
18399 mach_msg_body_t msgh_body;
18400 char data[1024];
18401 } msg;
18402 mach_msg_return_t retval;
18403 /* Wait for a message on the exception port. */
18404 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
18405 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
18406 if (retval != MACH_MSG_SUCCESS)
18407 abort ();
18408 exit (1);
18409}
18410static void
18411nocrash_init (void)
18412{
18413 mach_port_t self = mach_task_self ();
18414 /* Allocate a port on which the thread shall listen for exceptions. */
18415 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
18416 == KERN_SUCCESS) {
18417 /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
18418 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
18419 MACH_MSG_TYPE_MAKE_SEND)
18420 == KERN_SUCCESS) {
18421 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
18422 for us. */
18423 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
18424 /* Create the thread listening on the exception port. */
18425 pthread_attr_t attr;
18426 pthread_t thread;
18427 if (pthread_attr_init (&attr) == 0
18428 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
18429 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
18430 pthread_attr_destroy (&attr);
18431 /* Replace the exception port info for these exceptions with our own.
18432 Note that we replace the exception port for the entire task, not only
18433 for a particular thread. This has the effect that when our exception
18434 port gets the message, the thread specific exception port has already
18435 been asked, and we don't need to bother about it.
18436 See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
18437 task_set_exception_ports (self, mask, our_exception_port,
18438 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
18439 }
18440 }
18441 }
18442}
18443#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
18444/* Avoid a crash on native Windows. */
18445#define WIN32_LEAN_AND_MEAN
18446#include <windows.h>
18447#include <winerror.h>
18448static LONG WINAPI
18449exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
18450{
18451 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
18452 {
18453 case EXCEPTION_ACCESS_VIOLATION:
18454 case EXCEPTION_IN_PAGE_ERROR:
18455 case EXCEPTION_STACK_OVERFLOW:
18456 case EXCEPTION_GUARD_PAGE:
18457 case EXCEPTION_PRIV_INSTRUCTION:
18458 case EXCEPTION_ILLEGAL_INSTRUCTION:
18459 case EXCEPTION_DATATYPE_MISALIGNMENT:
18460 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
18461 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
18462 exit (1);
18463 }
18464 return EXCEPTION_CONTINUE_SEARCH;
18465}
18466static void
18467nocrash_init (void)
18468{
18469 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
18470}
18471#else
18472/* Avoid a crash on POSIX systems. */
18473#include <signal.h>
18474/* A POSIX signal handler. */
18475static void
18476exception_handler (int sig)
18477{
18478 exit (1);
18479}
18480static void
18481nocrash_init (void)
18482{
18483#ifdef SIGSEGV
18484 signal (SIGSEGV, exception_handler);
18485#endif
18486#ifdef SIGBUS
18487 signal (SIGBUS, exception_handler);
18488#endif
18489}
18490#endif
3e0be4ab 18491
3e0be4ab 18492
5476a9a4
GM
18493int
18494main ()
18495{
3e0be4ab 18496
5476a9a4 18497 int result = 0;
3e0be4ab 18498
5476a9a4 18499 nocrash_init();
3e0be4ab 18500
5476a9a4
GM
18501 /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
18502 and fails on Mac OS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
18503 OSF/1 5.1, Solaris 10. */
18504 {
18505 static char conftest[] = "conftest";
18506 static char plus[] = "-+";
18507 char *argv[3] = { conftest, plus, NULL };
18508 opterr = 0;
18509 if (getopt (2, argv, "+a") != '?')
18510 result |= 1;
18511 }
18512 /* This code succeeds on glibc 2.8, mingw,
18513 and fails on Mac OS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
18514 IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */
18515 {
18516 static char program[] = "program";
18517 static char p[] = "-p";
18518 static char foo[] = "foo";
18519 static char bar[] = "bar";
18520 char *argv[] = { program, p, foo, bar, NULL };
3e0be4ab 18521
5476a9a4
GM
18522 optind = 1;
18523 if (getopt (4, argv, "p::") != 'p')
18524 result |= 2;
18525 else if (optarg != NULL)
18526 result |= 4;
18527 else if (getopt (4, argv, "p::") != -1)
18528 result |= 6;
18529 else if (optind != 2)
18530 result |= 8;
18531 }
18532 /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */
18533 {
18534 static char program[] = "program";
18535 static char foo[] = "foo";
18536 static char p[] = "-p";
18537 char *argv[] = { program, foo, p, NULL };
18538 optind = 0;
18539 if (getopt (3, argv, "-p") != 1)
18540 result |= 16;
18541 else if (getopt (3, argv, "-p") != 'p')
18542 result |= 16;
18543 }
18544 /* This code fails on glibc 2.11. */
18545 {
18546 static char program[] = "program";
18547 static char b[] = "-b";
18548 static char a[] = "-a";
18549 char *argv[] = { program, b, a, NULL };
18550 optind = opterr = 0;
18551 if (getopt (3, argv, "+:a:b") != 'b')
18552 result |= 32;
18553 else if (getopt (3, argv, "+:a:b") != ':')
18554 result |= 32;
18555 }
18556 /* This code dumps core on glibc 2.14. */
18557 {
18558 static char program[] = "program";
18559 static char w[] = "-W";
18560 static char dummy[] = "dummy";
18561 char *argv[] = { program, w, dummy, NULL };
18562 optind = opterr = 1;
18563 if (getopt (3, argv, "W;") != 'W')
18564 result |= 64;
18565 }
18566 return result;
3e0be4ab 18567
5476a9a4
GM
18568 ;
18569 return 0;
18570}
18571_ACEOF
18572if ac_fn_c_try_run "$LINENO"; then :
18573 gl_cv_func_getopt_gnu=yes
18574else
18575 gl_cv_func_getopt_gnu=no
18576fi
18577rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18578 conftest.$ac_objext conftest.beam conftest.$ac_ext
18579fi
3e0be4ab 18580
5476a9a4
GM
18581 case $gl_had_POSIXLY_CORRECT in
18582 exported) ;;
18583 yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;;
18584 *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;;
18585 esac
3e0be4ab 18586
5476a9a4
GM
18587fi
18588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5
18589$as_echo "$gl_cv_func_getopt_gnu" >&6; }
18590 if test "$gl_cv_func_getopt_gnu" != yes; then
18591 gl_replace_getopt=yes
18592 else
18593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt_long function" >&5
18594$as_echo_n "checking for working GNU getopt_long function... " >&6; }
18595if test "${gl_cv_func_getopt_long_gnu+set}" = set; then :
f199cab1
GM
18596 $as_echo_n "(cached) " >&6
18597else
5476a9a4
GM
18598 if test "$cross_compiling" = yes; then :
18599 case "$host_os" in
18600 openbsd*) gl_cv_func_getopt_long_gnu="guessing no";;
18601 *) gl_cv_func_getopt_long_gnu="guessing yes";;
18602 esac
3e0be4ab
GM
18603
18604else
18605 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18606/* end confdefs.h. */
5476a9a4
GM
18607#include <getopt.h>
18608 #include <stddef.h>
18609 #include <string.h>
f199cab1
GM
18610
18611int
18612main ()
369e19fc 18613{
5476a9a4
GM
18614static const struct option long_options[] =
18615 {
18616 { "xtremely-",no_argument, NULL, 1003 },
18617 { "xtra", no_argument, NULL, 1001 },
18618 { "xtreme", no_argument, NULL, 1002 },
18619 { "xtremely", no_argument, NULL, 1003 },
18620 { NULL, 0, NULL, 0 }
18621 };
18622 /* This code fails on OpenBSD 5.0. */
18623 {
18624 static char program[] = "program";
18625 static char xtremel[] = "--xtremel";
18626 char *argv[] = { program, xtremel, NULL };
18627 int option_index;
18628 optind = 1; opterr = 0;
18629 if (getopt_long (2, argv, "", long_options, &option_index) != 1003)
18630 return 1;
18631 }
18632 return 0;
f199cab1
GM
18633
18634 ;
18635 return 0;
369e19fc 18636}
f199cab1
GM
18637_ACEOF
18638if ac_fn_c_try_run "$LINENO"; then :
5476a9a4 18639 gl_cv_func_getopt_long_gnu=yes
f199cab1 18640else
5476a9a4 18641 gl_cv_func_getopt_long_gnu=no
f199cab1
GM
18642fi
18643rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18644 conftest.$ac_objext conftest.beam conftest.$ac_ext
18645fi
18646
5476a9a4 18647
f199cab1 18648fi
5476a9a4
GM
18649{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_long_gnu" >&5
18650$as_echo "$gl_cv_func_getopt_long_gnu" >&6; }
18651 case "$gl_cv_func_getopt_long_gnu" in
18652 *yes) ;;
18653 *) gl_replace_getopt=yes ;;
18654 esac
18655 fi
18656 fi
f199cab1 18657
f199cab1 18658
f199cab1 18659
369e19fc
PE
18660
18661
5476a9a4
GM
18662
18663 REPLACE_GETOPT=0
18664 if test -n "$gl_replace_getopt"; then
18665 REPLACE_GETOPT=1
f199cab1 18666 fi
3e0be4ab 18667
5476a9a4 18668 if test $REPLACE_GETOPT = 1; then
369e19fc 18669
5476a9a4 18670 GETOPT_H=getopt.h
369e19fc 18671
5476a9a4 18672$as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
6ad6792b
GM
18673
18674
f199cab1 18675
5476a9a4 18676 fi
f199cab1 18677
5476a9a4
GM
18678ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default"
18679if test "x$ac_cv_have_decl_getenv" = x""yes; then :
18680 ac_have_decl=1
3e0be4ab 18681else
5476a9a4 18682 ac_have_decl=0
3e0be4ab 18683fi
e275c824 18684
5476a9a4
GM
18685cat >>confdefs.h <<_ACEOF
18686#define HAVE_DECL_GETENV $ac_have_decl
18687_ACEOF
18688
a6342fc8 18689:
f199cab1 18690
5476a9a4
GM
18691
18692
18693
18694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
18695$as_echo_n "checking for C/C++ restrict keyword... " >&6; }
18696if test "${ac_cv_c_restrict+set}" = set; then :
18697 $as_echo_n "(cached) " >&6
f199cab1 18698else
5476a9a4
GM
18699 ac_cv_c_restrict=no
18700 # The order here caters to the fact that C++ does not require restrict.
18701 for ac_kw in __restrict __restrict__ _Restrict restrict; do
18702 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 18703/* end confdefs.h. */
5476a9a4
GM
18704typedef int * int_ptr;
18705 int foo (int_ptr $ac_kw ip) {
18706 return ip[0];
18707 }
f199cab1
GM
18708int
18709main ()
18710{
5476a9a4
GM
18711int s[1];
18712 int * $ac_kw t = s;
18713 t[0] = 0;
18714 return foo(t)
f199cab1
GM
18715 ;
18716 return 0;
18717}
18718_ACEOF
5476a9a4
GM
18719if ac_fn_c_try_compile "$LINENO"; then :
18720 ac_cv_c_restrict=$ac_kw
f199cab1 18721fi
5476a9a4
GM
18722rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18723 test "$ac_cv_c_restrict" != no && break
18724 done
f199cab1 18725
f199cab1 18726fi
5476a9a4
GM
18727{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
18728$as_echo "$ac_cv_c_restrict" >&6; }
f199cab1 18729
5476a9a4
GM
18730 case $ac_cv_c_restrict in
18731 restrict) ;;
18732 no) $as_echo "#define restrict /**/" >>confdefs.h
18733 ;;
18734 *) cat >>confdefs.h <<_ACEOF
18735#define restrict $ac_cv_c_restrict
18736_ACEOF
18737 ;;
18738 esac
f199cab1 18739
f199cab1 18740
5476a9a4
GM
18741 GNULIB_GETTIMEOFDAY=0;
18742 HAVE_GETTIMEOFDAY=1;
18743 HAVE_STRUCT_TIMEVAL=1;
18744 HAVE_SYS_TIME_H=1;
18745 REPLACE_GETTIMEOFDAY=0;
18746 REPLACE_STRUCT_TIMEVAL=0;
e275c824 18747
e275c824 18748
e275c824 18749
e275c824 18750
4fda9c95 18751
5fa4ac76 18752
5fa4ac76 18753
5fa4ac76 18754
f199cab1
GM
18755
18756
18757
5fa4ac76 18758
5fa4ac76 18759
5fa4ac76 18760
5fa4ac76 18761
5fa4ac76 18762
5476a9a4
GM
18763 if test $gl_cv_have_include_next = yes; then
18764 gl_cv_next_sys_time_h='<'sys/time.h'>'
18765 else
18766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
18767$as_echo_n "checking absolute name of <sys/time.h>... " >&6; }
18768if test "${gl_cv_next_sys_time_h+set}" = set; then :
18769 $as_echo_n "(cached) " >&6
18770else
5fa4ac76 18771
5476a9a4 18772 if test $ac_cv_header_sys_time_h = yes; then
5fa4ac76
PE
18773
18774
5476a9a4
GM
18775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18776/* end confdefs.h. */
18777#include <sys/time.h>
5fa4ac76 18778
5476a9a4
GM
18779_ACEOF
18780 case "$host_os" in
18781 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18782 *) gl_absname_cpp="$ac_cpp" ;;
18783 esac
1f5d53eb 18784
5476a9a4
GM
18785 case "$host_os" in
18786 mingw*)
18787 gl_dirsep_regex='[/\\]'
18788 ;;
18789 *)
18790 gl_dirsep_regex='\/'
18791 ;;
18792 esac
18793 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
1f5d53eb 18794
5476a9a4
GM
18795 gl_header_literal_regex=`echo 'sys/time.h' \
18796 | sed -e "$gl_make_literal_regex_sed"`
18797 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18798 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18799 s|^/[^/]|//&|
18800 p
18801 q
18802 }'
18803 gl_cv_next_sys_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18804 sed -n "$gl_absolute_header_sed"`'"'
18805 else
18806 gl_cv_next_sys_time_h='<'sys/time.h'>'
18807 fi
1f5d53eb 18808
1f5d53eb 18809
5476a9a4
GM
18810fi
18811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
18812$as_echo "$gl_cv_next_sys_time_h" >&6; }
18813 fi
18814 NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
3e0be4ab 18815
5476a9a4
GM
18816 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18817 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18818 gl_next_as_first_directive='<'sys/time.h'>'
18819 else
18820 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18821 gl_next_as_first_directive=$gl_cv_next_sys_time_h
18822 fi
18823 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
3e0be4ab 18824
e275c824 18825
3e0be4ab 18826
f199cab1
GM
18827
18828
5476a9a4
GM
18829 if test $ac_cv_header_sys_time_h != yes; then
18830 HAVE_SYS_TIME_H=0
18831 fi
f199cab1
GM
18832
18833
18834
18835
18836
5476a9a4
GM
18837 if test $ac_cv_header_sys_socket_h != yes; then
18838 for ac_header in winsock2.h
18839do :
18840 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
18841if test "x$ac_cv_header_winsock2_h" = x""yes; then :
18842 cat >>confdefs.h <<_ACEOF
18843#define HAVE_WINSOCK2_H 1
18844_ACEOF
f199cab1 18845
5476a9a4 18846fi
3e0be4ab 18847
5476a9a4 18848done
3e0be4ab 18849
5476a9a4
GM
18850 fi
18851 if test "$ac_cv_header_winsock2_h" = yes; then
18852 HAVE_WINSOCK2_H=1
18853 UNISTD_H_HAVE_WINSOCK2_H=1
18854 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
18855 else
18856 HAVE_WINSOCK2_H=0
18857 fi
18858
18859
18860 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
18861$as_echo_n "checking for struct timeval... " >&6; }
18862if test "${gl_cv_sys_struct_timeval+set}" = set; then :
18863 $as_echo_n "(cached) " >&6
18864else
18865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18866/* end confdefs.h. */
18867#if HAVE_SYS_TIME_H
18868 #include <sys/time.h>
18869 #endif
18870 #include <time.h>
18871 #if HAVE_WINSOCK2_H
18872 # include <winsock2.h>
18873 #endif
f199cab1 18874
5476a9a4
GM
18875int
18876main ()
18877{
18878static struct timeval x; x.tv_sec = x.tv_usec;
18879 ;
18880 return 0;
18881}
18882_ACEOF
18883if ac_fn_c_try_compile "$LINENO"; then :
18884 gl_cv_sys_struct_timeval=yes
18885else
18886 gl_cv_sys_struct_timeval=no
f199cab1 18887fi
5476a9a4 18888rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 18889
5476a9a4
GM
18890fi
18891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
18892$as_echo "$gl_cv_sys_struct_timeval" >&6; }
18893 if test $gl_cv_sys_struct_timeval != yes; then
18894 HAVE_STRUCT_TIMEVAL=0
18895 else
18896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
18897$as_echo_n "checking for wide-enough struct timeval.tv_sec member... " >&6; }
18898if test "${gl_cv_sys_struct_timeval_tv_sec+set}" = set; then :
18899 $as_echo_n "(cached) " >&6
18900else
18901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18902/* end confdefs.h. */
18903#if HAVE_SYS_TIME_H
18904 #include <sys/time.h>
18905 #endif
18906 #include <time.h>
18907 #if HAVE_WINSOCK2_H
18908 # include <winsock2.h>
18909 #endif
f199cab1 18910
5476a9a4
GM
18911int
18912main ()
18913{
18914static struct timeval x;
18915 typedef int verify_tv_sec_type[
18916 sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
18917 ];
f199cab1 18918
5476a9a4
GM
18919 ;
18920 return 0;
18921}
18922_ACEOF
18923if ac_fn_c_try_compile "$LINENO"; then :
18924 gl_cv_sys_struct_timeval_tv_sec=yes
18925else
18926 gl_cv_sys_struct_timeval_tv_sec=no
18927fi
18928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 18929
5476a9a4
GM
18930fi
18931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
18932$as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
18933 if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
18934 REPLACE_STRUCT_TIMEVAL=1
18935 fi
18936 fi
f199cab1 18937
f199cab1
GM
18938
18939
18940
18941
18942
f199cab1 18943
5476a9a4
GM
18944 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
18945$as_echo_n "checking for unsigned long long int... " >&6; }
18946if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then :
18947 $as_echo_n "(cached) " >&6
18948else
18949 ac_cv_type_unsigned_long_long_int=yes
18950 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
18951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18952/* end confdefs.h. */
f199cab1 18953
5476a9a4
GM
18954 /* For now, do not test the preprocessor; as of 2007 there are too many
18955 implementations with broken preprocessors. Perhaps this can
18956 be revisited in 2012. In the meantime, code should not expect
18957 #if to work with literals wider than 32 bits. */
18958 /* Test literals. */
18959 long long int ll = 9223372036854775807ll;
18960 long long int nll = -9223372036854775807LL;
18961 unsigned long long int ull = 18446744073709551615ULL;
18962 /* Test constant expressions. */
18963 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
18964 ? 1 : -1)];
18965 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
18966 ? 1 : -1)];
18967 int i = 63;
18968int
18969main ()
18970{
18971/* Test availability of runtime routines for shift and division. */
18972 long long int llmax = 9223372036854775807ll;
18973 unsigned long long int ullmax = 18446744073709551615ull;
18974 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
18975 | (llmax / ll) | (llmax % ll)
18976 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
18977 | (ullmax / ull) | (ullmax % ull));
18978 ;
18979 return 0;
18980}
f199cab1 18981
e275c824 18982_ACEOF
5476a9a4 18983if ac_fn_c_try_link "$LINENO"; then :
3e0be4ab 18984
5476a9a4
GM
18985else
18986 ac_cv_type_unsigned_long_long_int=no
e275c824 18987fi
5476a9a4
GM
18988rm -f core conftest.err conftest.$ac_objext \
18989 conftest$ac_exeext conftest.$ac_ext
18990 fi
18991fi
18992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
18993$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
18994 if test $ac_cv_type_unsigned_long_long_int = yes; then
e275c824 18995
5476a9a4 18996$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
e275c824 18997
5476a9a4 18998 fi
e275c824
PE
18999
19000
f199cab1 19001
5476a9a4
GM
19002 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
19003$as_echo_n "checking for long long int... " >&6; }
19004if test "${ac_cv_type_long_long_int+set}" = set; then :
19005 $as_echo_n "(cached) " >&6
19006else
19007 ac_cv_type_long_long_int=yes
19008 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
19009 ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
19010 if test $ac_cv_type_long_long_int = yes; then
19011 if test "$cross_compiling" = yes; then :
f199cab1 19012 :
5476a9a4
GM
19013else
19014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19015/* end confdefs.h. */
19016#include <limits.h>
19017 #ifndef LLONG_MAX
19018 # define HALF \
19019 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
19020 # define LLONG_MAX (HALF - 1 + HALF)
19021 #endif
19022int
19023main ()
19024{
19025long long int n = 1;
19026 int i;
19027 for (i = 0; ; i++)
19028 {
19029 long long int m = n << i;
19030 if (m >> i != n)
19031 return 1;
19032 if (LLONG_MAX / 2 < m)
19033 break;
19034 }
19035 return 0;
19036 ;
19037 return 0;
19038}
19039_ACEOF
19040if ac_fn_c_try_run "$LINENO"; then :
19041
19042else
19043 ac_cv_type_long_long_int=no
19044fi
19045rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19046 conftest.$ac_objext conftest.beam conftest.$ac_ext
19047fi
e275c824 19048
5476a9a4
GM
19049 fi
19050 fi
1f5d53eb 19051fi
5476a9a4
GM
19052{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
19053$as_echo "$ac_cv_type_long_long_int" >&6; }
19054 if test $ac_cv_type_long_long_int = yes; then
e275c824 19055
5476a9a4 19056$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
e275c824 19057
5476a9a4 19058 fi
e275c824
PE
19059
19060
e275c824
PE
19061
19062
19063
19064
5476a9a4
GM
19065 gl_cv_c_multiarch=no
19066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19067/* end confdefs.h. */
19068#ifndef __APPLE_CC__
19069 not a universal capable compiler
19070 #endif
19071 typedef int dummy;
e275c824 19072
5476a9a4
GM
19073_ACEOF
19074if ac_fn_c_try_compile "$LINENO"; then :
e275c824 19075
5476a9a4
GM
19076 arch=
19077 prev=
19078 for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
19079 if test -n "$prev"; then
19080 case $word in
19081 i?86 | x86_64 | ppc | ppc64)
19082 if test -z "$arch" || test "$arch" = "$word"; then
19083 arch="$word"
19084 else
19085 gl_cv_c_multiarch=yes
19086 fi
19087 ;;
19088 esac
19089 prev=
19090 else
19091 if test "x$word" = "x-arch"; then
19092 prev=arch
19093 fi
19094 fi
19095 done
f199cab1 19096
f199cab1 19097fi
5476a9a4
GM
19098rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19099 if test $gl_cv_c_multiarch = yes; then
19100 APPLE_UNIVERSAL_BUILD=1
19101 else
19102 APPLE_UNIVERSAL_BUILD=0
19103 fi
e275c824
PE
19104
19105
67342916 19106
67342916 19107
67342916 19108
5476a9a4
GM
19109 if test $ac_cv_type_long_long_int = yes; then
19110 HAVE_LONG_LONG_INT=1
19111 else
19112 HAVE_LONG_LONG_INT=0
19113 fi
e275c824 19114
e275c824 19115
5476a9a4
GM
19116 if test $ac_cv_type_unsigned_long_long_int = yes; then
19117 HAVE_UNSIGNED_LONG_LONG_INT=1
19118 else
19119 HAVE_UNSIGNED_LONG_LONG_INT=0
19120 fi
e275c824
PE
19121
19122
19123
5476a9a4
GM
19124 if test $ac_cv_header_wchar_h = yes; then
19125 HAVE_WCHAR_H=1
19126 else
19127 HAVE_WCHAR_H=0
19128 fi
e275c824 19129
e275c824 19130
5476a9a4
GM
19131 if test $ac_cv_header_inttypes_h = yes; then
19132 HAVE_INTTYPES_H=1
19133 else
19134 HAVE_INTTYPES_H=0
19135 fi
6c051bab 19136
942f733f 19137
5476a9a4
GM
19138 if test $ac_cv_header_sys_types_h = yes; then
19139 HAVE_SYS_TYPES_H=1
19140 else
19141 HAVE_SYS_TYPES_H=0
19142 fi
4fc2b746 19143
4fc2b746 19144
f199cab1
GM
19145
19146
19147
19148
19149
19150
19151
19152
19153
5476a9a4
GM
19154 if test $gl_cv_have_include_next = yes; then
19155 gl_cv_next_stdint_h='<'stdint.h'>'
19156 else
19157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
19158$as_echo_n "checking absolute name of <stdint.h>... " >&6; }
19159if test "${gl_cv_next_stdint_h+set}" = set; then :
19160 $as_echo_n "(cached) " >&6
19161else
f199cab1 19162
5476a9a4 19163 if test $ac_cv_header_stdint_h = yes; then
f199cab1
GM
19164
19165
5476a9a4
GM
19166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19167/* end confdefs.h. */
19168#include <stdint.h>
f199cab1 19169
5476a9a4
GM
19170_ACEOF
19171 case "$host_os" in
19172 aix*) gl_absname_cpp="$ac_cpp -C" ;;
19173 *) gl_absname_cpp="$ac_cpp" ;;
19174 esac
f199cab1 19175
5476a9a4
GM
19176 case "$host_os" in
19177 mingw*)
19178 gl_dirsep_regex='[/\\]'
19179 ;;
19180 *)
19181 gl_dirsep_regex='\/'
19182 ;;
19183 esac
19184 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
4fc2b746 19185
5476a9a4
GM
19186 gl_header_literal_regex=`echo 'stdint.h' \
19187 | sed -e "$gl_make_literal_regex_sed"`
19188 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19189 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19190 s|^/[^/]|//&|
19191 p
19192 q
19193 }'
19194 gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19195 sed -n "$gl_absolute_header_sed"`'"'
19196 else
19197 gl_cv_next_stdint_h='<'stdint.h'>'
19198 fi
4fc2b746 19199
4fc2b746 19200
5476a9a4
GM
19201fi
19202{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
19203$as_echo "$gl_cv_next_stdint_h" >&6; }
19204 fi
19205 NEXT_STDINT_H=$gl_cv_next_stdint_h
b0415a03 19206
5476a9a4
GM
19207 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19208 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19209 gl_next_as_first_directive='<'stdint.h'>'
19210 else
19211 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19212 gl_next_as_first_directive=$gl_cv_next_stdint_h
19213 fi
19214 NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
b0415a03 19215
4fc2b746 19216
f199cab1 19217
f199cab1 19218
5476a9a4
GM
19219 if test $ac_cv_header_stdint_h = yes; then
19220 HAVE_STDINT_H=1
19221 else
19222 HAVE_STDINT_H=0
19223 fi
f199cab1
GM
19224
19225
5476a9a4
GM
19226 if test $ac_cv_header_stdint_h = yes; then
19227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
19228$as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
19229if test "${gl_cv_header_working_stdint_h+set}" = set; then :
f199cab1
GM
19230 $as_echo_n "(cached) " >&6
19231else
5476a9a4
GM
19232 gl_cv_header_working_stdint_h=no
19233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19234/* end confdefs.h. */
4fc2b746
GM
19235
19236
5476a9a4
GM
19237#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
19238#include <stdint.h>
19239/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
19240#if !(defined WCHAR_MIN && defined WCHAR_MAX)
19241#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
19242#endif
4fc2b746 19243
942f733f 19244
5476a9a4
GM
19245 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19246 included before <wchar.h>. */
19247 #include <stddef.h>
19248 #include <signal.h>
19249 #if HAVE_WCHAR_H
19250 # include <stdio.h>
19251 # include <time.h>
19252 # include <wchar.h>
19253 #endif
e275c824 19254
f199cab1 19255
5476a9a4
GM
19256#ifdef INT8_MAX
19257int8_t a1 = INT8_MAX;
19258int8_t a1min = INT8_MIN;
19259#endif
19260#ifdef INT16_MAX
19261int16_t a2 = INT16_MAX;
19262int16_t a2min = INT16_MIN;
19263#endif
19264#ifdef INT32_MAX
19265int32_t a3 = INT32_MAX;
19266int32_t a3min = INT32_MIN;
19267#endif
19268#ifdef INT64_MAX
19269int64_t a4 = INT64_MAX;
19270int64_t a4min = INT64_MIN;
19271#endif
19272#ifdef UINT8_MAX
19273uint8_t b1 = UINT8_MAX;
19274#else
19275typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
19276#endif
19277#ifdef UINT16_MAX
19278uint16_t b2 = UINT16_MAX;
19279#endif
19280#ifdef UINT32_MAX
19281uint32_t b3 = UINT32_MAX;
19282#endif
19283#ifdef UINT64_MAX
19284uint64_t b4 = UINT64_MAX;
19285#endif
19286int_least8_t c1 = INT8_C (0x7f);
19287int_least8_t c1max = INT_LEAST8_MAX;
19288int_least8_t c1min = INT_LEAST8_MIN;
19289int_least16_t c2 = INT16_C (0x7fff);
19290int_least16_t c2max = INT_LEAST16_MAX;
19291int_least16_t c2min = INT_LEAST16_MIN;
19292int_least32_t c3 = INT32_C (0x7fffffff);
19293int_least32_t c3max = INT_LEAST32_MAX;
19294int_least32_t c3min = INT_LEAST32_MIN;
19295int_least64_t c4 = INT64_C (0x7fffffffffffffff);
19296int_least64_t c4max = INT_LEAST64_MAX;
19297int_least64_t c4min = INT_LEAST64_MIN;
19298uint_least8_t d1 = UINT8_C (0xff);
19299uint_least8_t d1max = UINT_LEAST8_MAX;
19300uint_least16_t d2 = UINT16_C (0xffff);
19301uint_least16_t d2max = UINT_LEAST16_MAX;
19302uint_least32_t d3 = UINT32_C (0xffffffff);
19303uint_least32_t d3max = UINT_LEAST32_MAX;
19304uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
19305uint_least64_t d4max = UINT_LEAST64_MAX;
19306int_fast8_t e1 = INT_FAST8_MAX;
19307int_fast8_t e1min = INT_FAST8_MIN;
19308int_fast16_t e2 = INT_FAST16_MAX;
19309int_fast16_t e2min = INT_FAST16_MIN;
19310int_fast32_t e3 = INT_FAST32_MAX;
19311int_fast32_t e3min = INT_FAST32_MIN;
19312int_fast64_t e4 = INT_FAST64_MAX;
19313int_fast64_t e4min = INT_FAST64_MIN;
19314uint_fast8_t f1 = UINT_FAST8_MAX;
19315uint_fast16_t f2 = UINT_FAST16_MAX;
19316uint_fast32_t f3 = UINT_FAST32_MAX;
19317uint_fast64_t f4 = UINT_FAST64_MAX;
19318#ifdef INTPTR_MAX
19319intptr_t g = INTPTR_MAX;
19320intptr_t gmin = INTPTR_MIN;
19321#endif
19322#ifdef UINTPTR_MAX
19323uintptr_t h = UINTPTR_MAX;
19324#endif
19325intmax_t i = INTMAX_MAX;
19326uintmax_t j = UINTMAX_MAX;
5fa4ac76 19327
5476a9a4
GM
19328#include <limits.h> /* for CHAR_BIT */
19329#define TYPE_MINIMUM(t) \
19330 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
19331#define TYPE_MAXIMUM(t) \
19332 ((t) ((t) 0 < (t) -1 \
19333 ? (t) -1 \
19334 : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
19335struct s {
19336 int check_PTRDIFF:
19337 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
19338 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
19339 ? 1 : -1;
19340 /* Detect bug in FreeBSD 6.0 / ia64. */
19341 int check_SIG_ATOMIC:
19342 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
19343 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
19344 ? 1 : -1;
19345 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
19346 int check_WCHAR:
19347 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
19348 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
19349 ? 1 : -1;
19350 /* Detect bug in mingw. */
19351 int check_WINT:
19352 WINT_MIN == TYPE_MINIMUM (wint_t)
19353 && WINT_MAX == TYPE_MAXIMUM (wint_t)
19354 ? 1 : -1;
5fa4ac76 19355
5476a9a4
GM
19356 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
19357 int check_UINT8_C:
19358 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
19359 int check_UINT16_C:
19360 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
19361
19362 /* Detect bugs in OpenBSD 3.9 stdint.h. */
19363#ifdef UINT8_MAX
19364 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
3e0be4ab 19365#endif
5476a9a4
GM
19366#ifdef UINT16_MAX
19367 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
19368#endif
19369#ifdef UINT32_MAX
19370 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
19371#endif
19372#ifdef UINT64_MAX
19373 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
19374#endif
19375 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
19376 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
19377 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
19378 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
19379 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
19380 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
19381 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
19382 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
19383 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
19384 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
19385 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
19386};
19387
f199cab1
GM
19388int
19389main ()
19390{
5476a9a4 19391
f199cab1
GM
19392 ;
19393 return 0;
19394}
19395_ACEOF
5476a9a4
GM
19396if ac_fn_c_try_compile "$LINENO"; then :
19397 if test "$cross_compiling" = yes; then :
19398 gl_cv_header_working_stdint_h=yes
40e27e7f 19399
5476a9a4
GM
19400else
19401 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19402/* end confdefs.h. */
40e27e7f 19403
f199cab1 19404
5476a9a4
GM
19405#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
19406#include <stdint.h>
f199cab1
GM
19407
19408
5476a9a4
GM
19409 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19410 included before <wchar.h>. */
19411 #include <stddef.h>
19412 #include <signal.h>
19413 #if HAVE_WCHAR_H
19414 # include <stdio.h>
19415 # include <time.h>
19416 # include <wchar.h>
19417 #endif
f199cab1 19418
d87ffdb7 19419
5476a9a4
GM
19420#include <stdio.h>
19421#include <string.h>
19422#define MVAL(macro) MVAL1(macro)
19423#define MVAL1(expression) #expression
19424static const char *macro_values[] =
19425 {
19426#ifdef INT8_MAX
19427 MVAL (INT8_MAX),
19428#endif
19429#ifdef INT16_MAX
19430 MVAL (INT16_MAX),
19431#endif
19432#ifdef INT32_MAX
19433 MVAL (INT32_MAX),
19434#endif
19435#ifdef INT64_MAX
19436 MVAL (INT64_MAX),
19437#endif
19438#ifdef UINT8_MAX
19439 MVAL (UINT8_MAX),
19440#endif
19441#ifdef UINT16_MAX
19442 MVAL (UINT16_MAX),
19443#endif
19444#ifdef UINT32_MAX
19445 MVAL (UINT32_MAX),
19446#endif
19447#ifdef UINT64_MAX
19448 MVAL (UINT64_MAX),
19449#endif
19450 NULL
19451 };
f199cab1 19452
3e0be4ab
GM
19453int
19454main ()
19455{
5476a9a4
GM
19456
19457 const char **mv;
19458 for (mv = macro_values; *mv != NULL; mv++)
19459 {
19460 const char *value = *mv;
19461 /* Test whether it looks like a cast expression. */
19462 if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
19463 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
19464 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
19465 || strncmp (value, "((int)"/*)*/, 6) == 0
19466 || strncmp (value, "((signed short)"/*)*/, 15) == 0
19467 || strncmp (value, "((signed char)"/*)*/, 14) == 0)
19468 return mv - macro_values + 1;
19469 }
3e0be4ab 19470 return 0;
5476a9a4 19471
f199cab1
GM
19472 ;
19473 return 0;
19474}
19475_ACEOF
5476a9a4
GM
19476if ac_fn_c_try_run "$LINENO"; then :
19477 gl_cv_header_working_stdint_h=yes
f199cab1 19478fi
5476a9a4
GM
19479rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19480 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1
GM
19481fi
19482
d87ffdb7 19483
5476a9a4
GM
19484fi
19485rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d87ffdb7 19486
5476a9a4
GM
19487fi
19488{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
19489$as_echo "$gl_cv_header_working_stdint_h" >&6; }
19490 fi
19491 if test "$gl_cv_header_working_stdint_h" = yes; then
19492 STDINT_H=
19493 else
19494 for ac_header in sys/inttypes.h sys/bitypes.h
19495do :
19496 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
19497ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
19498eval as_val=\$$as_ac_Header
19499 if test "x$as_val" = x""yes; then :
19500 cat >>confdefs.h <<_ACEOF
19501#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
19502_ACEOF
d87ffdb7 19503
5476a9a4 19504fi
d87ffdb7 19505
5476a9a4 19506done
7d2a1c5e 19507
5476a9a4
GM
19508 if test $ac_cv_header_sys_inttypes_h = yes; then
19509 HAVE_SYS_INTTYPES_H=1
19510 else
19511 HAVE_SYS_INTTYPES_H=0
19512 fi
7d2a1c5e 19513
5476a9a4
GM
19514 if test $ac_cv_header_sys_bitypes_h = yes; then
19515 HAVE_SYS_BITYPES_H=1
19516 else
19517 HAVE_SYS_BITYPES_H=0
19518 fi
7d2a1c5e 19519
f199cab1
GM
19520
19521
19522
5476a9a4 19523 if test $APPLE_UNIVERSAL_BUILD = 0; then
f199cab1
GM
19524
19525
5476a9a4
GM
19526 for gltype in ptrdiff_t size_t ; do
19527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
19528$as_echo_n "checking for bit size of $gltype... " >&6; }
19529if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
19530 $as_echo_n "(cached) " >&6
19531else
19532 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
19533 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19534 included before <wchar.h>. */
19535 #include <stddef.h>
19536 #include <signal.h>
19537 #if HAVE_WCHAR_H
19538 # include <stdio.h>
19539 # include <time.h>
19540 # include <wchar.h>
19541 #endif
f199cab1 19542
5476a9a4 19543#include <limits.h>"; then :
f199cab1 19544
5476a9a4
GM
19545else
19546 result=unknown
19547fi
f199cab1 19548
5476a9a4 19549 eval gl_cv_bitsizeof_${gltype}=\$result
f199cab1 19550
5476a9a4
GM
19551fi
19552eval ac_res=\$gl_cv_bitsizeof_${gltype}
19553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
19554$as_echo "$ac_res" >&6; }
19555 eval result=\$gl_cv_bitsizeof_${gltype}
19556 if test $result = unknown; then
19557 result=0
19558 fi
19559 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
19560 cat >>confdefs.h <<_ACEOF
19561#define BITSIZEOF_${GLTYPE} $result
19562_ACEOF
f199cab1 19563
5476a9a4
GM
19564 eval BITSIZEOF_${GLTYPE}=\$result
19565 done
f199cab1
GM
19566
19567
5476a9a4 19568 fi
f199cab1
GM
19569
19570
5476a9a4
GM
19571 for gltype in sig_atomic_t wchar_t wint_t ; do
19572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
19573$as_echo_n "checking for bit size of $gltype... " >&6; }
19574if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
19575 $as_echo_n "(cached) " >&6
19576else
19577 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
19578 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19579 included before <wchar.h>. */
19580 #include <stddef.h>
19581 #include <signal.h>
19582 #if HAVE_WCHAR_H
19583 # include <stdio.h>
19584 # include <time.h>
19585 # include <wchar.h>
19586 #endif
f199cab1 19587
5476a9a4 19588#include <limits.h>"; then :
f199cab1 19589
f199cab1 19590else
5476a9a4 19591 result=unknown
7d2a1c5e 19592fi
7d2a1c5e 19593
5476a9a4 19594 eval gl_cv_bitsizeof_${gltype}=\$result
7d2a1c5e 19595
3e0be4ab 19596fi
5476a9a4
GM
19597eval ac_res=\$gl_cv_bitsizeof_${gltype}
19598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
19599$as_echo "$ac_res" >&6; }
19600 eval result=\$gl_cv_bitsizeof_${gltype}
19601 if test $result = unknown; then
19602 result=0
19603 fi
19604 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
19605 cat >>confdefs.h <<_ACEOF
19606#define BITSIZEOF_${GLTYPE} $result
3e0be4ab 19607_ACEOF
7d2a1c5e 19608
5476a9a4
GM
19609 eval BITSIZEOF_${GLTYPE}=\$result
19610 done
7d2a1c5e
GM
19611
19612
5476a9a4
GM
19613
19614
19615 for gltype in sig_atomic_t wchar_t wint_t ; do
19616 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
19617$as_echo_n "checking whether $gltype is signed... " >&6; }
19618if { as_var=gl_cv_type_${gltype}_signed; eval "test \"\${$as_var+set}\" = set"; }; then :
3e0be4ab
GM
19619 $as_echo_n "(cached) " >&6
19620else
f199cab1
GM
19621 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19622/* end confdefs.h. */
f199cab1 19623
5476a9a4
GM
19624 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19625 included before <wchar.h>. */
19626 #include <stddef.h>
19627 #include <signal.h>
19628 #if HAVE_WCHAR_H
19629 # include <stdio.h>
19630 # include <time.h>
19631 # include <wchar.h>
19632 #endif
19633
19634 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
f199cab1
GM
19635int
19636main ()
19637{
5476a9a4 19638
f199cab1
GM
19639 ;
19640 return 0;
19641}
19642_ACEOF
19643if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4 19644 result=yes
f199cab1 19645else
5476a9a4 19646 result=no
f199cab1
GM
19647fi
19648rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5476a9a4 19649 eval gl_cv_type_${gltype}_signed=\$result
7d2a1c5e 19650
3e0be4ab 19651fi
5476a9a4
GM
19652eval ac_res=\$gl_cv_type_${gltype}_signed
19653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
19654$as_echo "$ac_res" >&6; }
19655 eval result=\$gl_cv_type_${gltype}_signed
19656 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
19657 if test "$result" = yes; then
19658 cat >>confdefs.h <<_ACEOF
19659#define HAVE_SIGNED_${GLTYPE} 1
f199cab1 19660_ACEOF
d87ffdb7 19661
5476a9a4
GM
19662 eval HAVE_SIGNED_${GLTYPE}=1
19663 else
19664 eval HAVE_SIGNED_${GLTYPE}=0
19665 fi
19666 done
f199cab1 19667
e275c824 19668
5476a9a4
GM
19669 gl_cv_type_ptrdiff_t_signed=yes
19670 gl_cv_type_size_t_signed=no
19671 if test $APPLE_UNIVERSAL_BUILD = 0; then
e275c824 19672
e275c824 19673
5476a9a4
GM
19674 for gltype in ptrdiff_t size_t ; do
19675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
19676$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
19677if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
16c3e636
PE
19678 $as_echo_n "(cached) " >&6
19679else
5476a9a4
GM
19680 eval gl_cv_type_${gltype}_suffix=no
19681 eval result=\$gl_cv_type_${gltype}_signed
19682 if test "$result" = yes; then
19683 glsufu=
19684 else
19685 glsufu=u
19686 fi
19687 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
19688 case $glsuf in
19689 '') gltype1='int';;
19690 l) gltype1='long int';;
19691 ll) gltype1='long long int';;
19692 i64) gltype1='__int64';;
19693 u) gltype1='unsigned int';;
19694 ul) gltype1='unsigned long int';;
19695 ull) gltype1='unsigned long long int';;
19696 ui64)gltype1='unsigned __int64';;
19697 esac
19698 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 19699/* end confdefs.h. */
16c3e636 19700
5476a9a4
GM
19701 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19702 included before <wchar.h>. */
19703 #include <stddef.h>
19704 #include <signal.h>
19705 #if HAVE_WCHAR_H
19706 # include <stdio.h>
19707 # include <time.h>
19708 # include <wchar.h>
19709 #endif
1f5d53eb 19710
5476a9a4
GM
19711 extern $gltype foo;
19712 extern $gltype1 foo;
f199cab1
GM
19713int
19714main ()
19715{
5476a9a4 19716
f199cab1
GM
19717 ;
19718 return 0;
19719}
19720_ACEOF
19721if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4 19722 eval gl_cv_type_${gltype}_suffix=\$glsuf
f199cab1
GM
19723fi
19724rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5476a9a4
GM
19725 eval result=\$gl_cv_type_${gltype}_suffix
19726 test "$result" != no && break
19727 done
f199cab1 19728fi
5476a9a4
GM
19729eval ac_res=\$gl_cv_type_${gltype}_suffix
19730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
19731$as_echo "$ac_res" >&6; }
19732 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
19733 eval result=\$gl_cv_type_${gltype}_suffix
19734 test "$result" = no && result=
19735 eval ${GLTYPE}_SUFFIX=\$result
19736 cat >>confdefs.h <<_ACEOF
19737#define ${GLTYPE}_SUFFIX $result
19738_ACEOF
16c3e636 19739
5476a9a4 19740 done
16c3e636 19741
3e0be4ab 19742
5476a9a4
GM
19743 fi
19744
19745
19746 for gltype in sig_atomic_t wchar_t wint_t ; do
19747 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
19748$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
19749if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
1fd182f0
PE
19750 $as_echo_n "(cached) " >&6
19751else
5476a9a4
GM
19752 eval gl_cv_type_${gltype}_suffix=no
19753 eval result=\$gl_cv_type_${gltype}_signed
19754 if test "$result" = yes; then
19755 glsufu=
19756 else
19757 glsufu=u
19758 fi
19759 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
19760 case $glsuf in
19761 '') gltype1='int';;
19762 l) gltype1='long int';;
19763 ll) gltype1='long long int';;
19764 i64) gltype1='__int64';;
19765 u) gltype1='unsigned int';;
19766 ul) gltype1='unsigned long int';;
19767 ull) gltype1='unsigned long long int';;
19768 ui64)gltype1='unsigned __int64';;
19769 esac
19770 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1fd182f0 19771/* end confdefs.h. */
5476a9a4
GM
19772
19773 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19774 included before <wchar.h>. */
19775 #include <stddef.h>
19776 #include <signal.h>
19777 #if HAVE_WCHAR_H
19778 # include <stdio.h>
19779 # include <time.h>
19780 # include <wchar.h>
19781 #endif
19782
19783 extern $gltype foo;
19784 extern $gltype1 foo;
1fd182f0
PE
19785int
19786main ()
19787{
5476a9a4 19788
1fd182f0
PE
19789 ;
19790 return 0;
19791}
19792_ACEOF
3e0be4ab 19793if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4 19794 eval gl_cv_type_${gltype}_suffix=\$glsuf
1f5d53eb 19795fi
3e0be4ab 19796rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5476a9a4
GM
19797 eval result=\$gl_cv_type_${gltype}_suffix
19798 test "$result" != no && break
19799 done
f199cab1 19800fi
5476a9a4
GM
19801eval ac_res=\$gl_cv_type_${gltype}_suffix
19802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
19803$as_echo "$ac_res" >&6; }
19804 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
19805 eval result=\$gl_cv_type_${gltype}_suffix
19806 test "$result" = no && result=
19807 eval ${GLTYPE}_SUFFIX=\$result
19808 cat >>confdefs.h <<_ACEOF
19809#define ${GLTYPE}_SUFFIX $result
f199cab1
GM
19810_ACEOF
19811
5476a9a4 19812 done
f199cab1 19813
f199cab1 19814
f199cab1 19815
5476a9a4
GM
19816 if test $BITSIZEOF_WINT_T -lt 32; then
19817 BITSIZEOF_WINT_T=32
19818 fi
f199cab1 19819
5476a9a4
GM
19820 STDINT_H=stdint.h
19821 fi
f199cab1 19822
5476a9a4
GM
19823 if test -n "$STDINT_H"; then
19824 GL_GENERATE_STDINT_H_TRUE=
19825 GL_GENERATE_STDINT_H_FALSE='#'
19826else
19827 GL_GENERATE_STDINT_H_TRUE='#'
19828 GL_GENERATE_STDINT_H_FALSE=
f199cab1
GM
19829fi
19830
f199cab1 19831
f199cab1 19832
3e0be4ab 19833
f199cab1 19834
5476a9a4
GM
19835 GNULIB_IMAXABS=0;
19836 GNULIB_IMAXDIV=0;
19837 GNULIB_STRTOIMAX=0;
19838 GNULIB_STRTOUMAX=0;
19839 HAVE_DECL_IMAXABS=1;
19840 HAVE_DECL_IMAXDIV=1;
19841 HAVE_DECL_STRTOIMAX=1;
19842 HAVE_DECL_STRTOUMAX=1;
19843 REPLACE_STRTOIMAX=0;
19844 INT32_MAX_LT_INTMAX_MAX=1;
19845 INT64_MAX_EQ_LONG_MAX='defined _LP64';
19846 PRI_MACROS_BROKEN=0;
19847 PRIPTR_PREFIX=__PRIPTR_PREFIX;
19848 UINT32_MAX_LT_UINTMAX_MAX=1;
19849 UINT64_MAX_EQ_ULONG_MAX='defined _LP64';
1fd182f0 19850
1fd182f0 19851
1f5d53eb 19852
3e0be4ab
GM
19853
19854
1fd182f0 19855
3e0be4ab 19856
3e0be4ab 19857
f199cab1 19858
1fd182f0 19859
1f5d53eb 19860
1f5d53eb 19861
1f5d53eb 19862
3e0be4ab 19863
3e0be4ab 19864
5476a9a4
GM
19865 if test $gl_cv_have_include_next = yes; then
19866 gl_cv_next_inttypes_h='<'inttypes.h'>'
19867 else
19868 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
19869$as_echo_n "checking absolute name of <inttypes.h>... " >&6; }
19870if test "${gl_cv_next_inttypes_h+set}" = set; then :
19871 $as_echo_n "(cached) " >&6
f199cab1 19872else
2b1928b8 19873
5476a9a4 19874 if test $ac_cv_header_inttypes_h = yes; then
3e0be4ab
GM
19875
19876
5476a9a4 19877 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 19878/* end confdefs.h. */
5476a9a4 19879#include <inttypes.h>
3e0be4ab 19880
f199cab1 19881_ACEOF
5476a9a4
GM
19882 case "$host_os" in
19883 aix*) gl_absname_cpp="$ac_cpp -C" ;;
19884 *) gl_absname_cpp="$ac_cpp" ;;
19885 esac
1fd182f0 19886
5476a9a4
GM
19887 case "$host_os" in
19888 mingw*)
19889 gl_dirsep_regex='[/\\]'
19890 ;;
19891 *)
19892 gl_dirsep_regex='\/'
19893 ;;
19894 esac
19895 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
1fd182f0 19896
5476a9a4
GM
19897 gl_header_literal_regex=`echo 'inttypes.h' \
19898 | sed -e "$gl_make_literal_regex_sed"`
19899 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19900 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19901 s|^/[^/]|//&|
19902 p
19903 q
19904 }'
19905 gl_cv_next_inttypes_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19906 sed -n "$gl_absolute_header_sed"`'"'
19907 else
19908 gl_cv_next_inttypes_h='<'inttypes.h'>'
19909 fi
1fd182f0
PE
19910
19911
5476a9a4
GM
19912fi
19913{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
19914$as_echo "$gl_cv_next_inttypes_h" >&6; }
19915 fi
19916 NEXT_INTTYPES_H=$gl_cv_next_inttypes_h
1fd182f0 19917
5476a9a4
GM
19918 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19919 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19920 gl_next_as_first_directive='<'inttypes.h'>'
19921 else
19922 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19923 gl_next_as_first_directive=$gl_cv_next_inttypes_h
19924 fi
19925 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
34119902
GM
19926
19927
3e0be4ab 19928
34119902 19929
3e0be4ab 19930
34119902 19931
b0415a03 19932
b0415a03 19933
3e0be4ab 19934
34119902 19935
34119902 19936
5476a9a4
GM
19937 case "$host_os" in
19938 mingw*)
19939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
19940$as_echo_n "checking for 64-bit off_t... " >&6; }
19941if test "${gl_cv_type_off_t_64+set}" = set; then :
f199cab1
GM
19942 $as_echo_n "(cached) " >&6
19943else
5476a9a4
GM
19944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19945/* end confdefs.h. */
19946#include <sys/types.h>
19947 int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
19948
19949int
19950main ()
19951{
19952
19953 ;
19954 return 0;
19955}
f199cab1 19956_ACEOF
5476a9a4
GM
19957if ac_fn_c_try_compile "$LINENO"; then :
19958 gl_cv_type_off_t_64=yes
19959else
19960 gl_cv_type_off_t_64=no
f199cab1 19961fi
5476a9a4 19962rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34119902 19963
5476a9a4
GM
19964fi
19965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
19966$as_echo "$gl_cv_type_off_t_64" >&6; }
19967 if test $gl_cv_type_off_t_64 = no; then
19968 WINDOWS_64_BIT_OFF_T=1
19969 else
19970 WINDOWS_64_BIT_OFF_T=0
19971 fi
19972 WINDOWS_64_BIT_ST_SIZE=1
19973 ;;
19974 *)
19975 WINDOWS_64_BIT_OFF_T=0
19976 WINDOWS_64_BIT_ST_SIZE=0
19977 ;;
19978 esac
34119902
GM
19979
19980
34119902
GM
19981
19982
283c7aed
GM
19983 GNULIB_FFSL=0;
19984 GNULIB_FFSLL=0;
19985 GNULIB_MEMCHR=0;
19986 GNULIB_MEMMEM=0;
19987 GNULIB_MEMPCPY=0;
19988 GNULIB_MEMRCHR=0;
19989 GNULIB_RAWMEMCHR=0;
19990 GNULIB_STPCPY=0;
19991 GNULIB_STPNCPY=0;
19992 GNULIB_STRCHRNUL=0;
19993 GNULIB_STRDUP=0;
19994 GNULIB_STRNCAT=0;
19995 GNULIB_STRNDUP=0;
19996 GNULIB_STRNLEN=0;
19997 GNULIB_STRPBRK=0;
19998 GNULIB_STRSEP=0;
19999 GNULIB_STRSTR=0;
20000 GNULIB_STRCASESTR=0;
20001 GNULIB_STRTOK_R=0;
20002 GNULIB_MBSLEN=0;
20003 GNULIB_MBSNLEN=0;
20004 GNULIB_MBSCHR=0;
20005 GNULIB_MBSRCHR=0;
20006 GNULIB_MBSSTR=0;
20007 GNULIB_MBSCASECMP=0;
20008 GNULIB_MBSNCASECMP=0;
20009 GNULIB_MBSPCASECMP=0;
20010 GNULIB_MBSCASESTR=0;
20011 GNULIB_MBSCSPN=0;
20012 GNULIB_MBSPBRK=0;
20013 GNULIB_MBSSPN=0;
20014 GNULIB_MBSSEP=0;
20015 GNULIB_MBSTOK_R=0;
20016 GNULIB_STRERROR=0;
20017 GNULIB_STRERROR_R=0;
20018 GNULIB_STRSIGNAL=0;
20019 GNULIB_STRVERSCMP=0;
20020 HAVE_MBSLEN=0;
20021 HAVE_FFSL=1;
20022 HAVE_FFSLL=1;
20023 HAVE_MEMCHR=1;
20024 HAVE_DECL_MEMMEM=1;
20025 HAVE_MEMPCPY=1;
20026 HAVE_DECL_MEMRCHR=1;
20027 HAVE_RAWMEMCHR=1;
20028 HAVE_STPCPY=1;
20029 HAVE_STPNCPY=1;
20030 HAVE_STRCHRNUL=1;
20031 HAVE_DECL_STRDUP=1;
20032 HAVE_DECL_STRNDUP=1;
20033 HAVE_DECL_STRNLEN=1;
20034 HAVE_STRPBRK=1;
20035 HAVE_STRSEP=1;
20036 HAVE_STRCASESTR=1;
20037 HAVE_DECL_STRTOK_R=1;
20038 HAVE_DECL_STRERROR_R=1;
20039 HAVE_DECL_STRSIGNAL=1;
20040 HAVE_STRVERSCMP=1;
20041 REPLACE_MEMCHR=0;
20042 REPLACE_MEMMEM=0;
20043 REPLACE_STPNCPY=0;
20044 REPLACE_STRDUP=0;
20045 REPLACE_STRSTR=0;
20046 REPLACE_STRCASESTR=0;
20047 REPLACE_STRCHRNUL=0;
20048 REPLACE_STRERROR=0;
20049 REPLACE_STRERROR_R=0;
20050 REPLACE_STRNCAT=0;
20051 REPLACE_STRNDUP=0;
20052 REPLACE_STRNLEN=0;
20053 REPLACE_STRSIGNAL=0;
20054 REPLACE_STRTOK_R=0;
20055 UNDEFINE_STRTOK_R=0;
20056
20057ac_fn_c_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default"
20058if test "x$ac_cv_have_decl_memrchr" = x""yes; then :
20059 ac_have_decl=1
20060else
20061 ac_have_decl=0
20062fi
20063
20064cat >>confdefs.h <<_ACEOF
20065#define HAVE_DECL_MEMRCHR $ac_have_decl
20066_ACEOF
20067
20068
5476a9a4
GM
20069 GNULIB_MKTIME=0;
20070 GNULIB_NANOSLEEP=0;
20071 GNULIB_STRPTIME=0;
20072 GNULIB_TIMEGM=0;
20073 GNULIB_TIME_R=0;
20074 HAVE_DECL_LOCALTIME_R=1;
20075 HAVE_NANOSLEEP=1;
20076 HAVE_STRPTIME=1;
20077 HAVE_TIMEGM=1;
20078 REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
20079 REPLACE_MKTIME=GNULIB_PORTCHECK;
20080 REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
20081 REPLACE_TIMEGM=GNULIB_PORTCHECK;
34119902 20082
2393bc74
GM
20083ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default"
20084if test "x$ac_cv_have_decl_alarm" = x""yes; then :
20085 ac_have_decl=1
20086else
20087 ac_have_decl=0
20088fi
3e0be4ab 20089
2393bc74
GM
20090cat >>confdefs.h <<_ACEOF
20091#define HAVE_DECL_ALARM $ac_have_decl
20092_ACEOF
3e0be4ab
GM
20093
20094
5476a9a4
GM
20095 GNULIB_PSELECT=0;
20096 GNULIB_SELECT=0;
20097 HAVE_PSELECT=1;
20098 REPLACE_PSELECT=0;
20099 REPLACE_SELECT=0;
20100
20101
3e0be4ab 20102
5476a9a4
GM
20103
20104
20105
20106 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/select.h> is self-contained" >&5
20107$as_echo_n "checking whether <sys/select.h> is self-contained... " >&6; }
20108if test "${gl_cv_header_sys_select_h_selfcontained+set}" = set; then :
f199cab1 20109 $as_echo_n "(cached) " >&6
3e0be4ab 20110else
5476a9a4
GM
20111
20112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3e0be4ab 20113/* end confdefs.h. */
5476a9a4 20114#include <sys/select.h>
3e0be4ab
GM
20115int
20116main ()
20117{
5476a9a4 20118struct timeval b;
3e0be4ab
GM
20119 ;
20120 return 0;
20121}
34119902 20122_ACEOF
f199cab1 20123if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4 20124 gl_cv_header_sys_select_h_selfcontained=yes
3e0be4ab 20125else
5476a9a4 20126 gl_cv_header_sys_select_h_selfcontained=no
3e0be4ab 20127fi
f199cab1 20128rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5476a9a4
GM
20129 if test $gl_cv_header_sys_select_h_selfcontained = yes; then
20130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20131/* end confdefs.h. */
20132#include <sys/select.h>
20133int
20134main ()
20135{
20136int memset; int bzero;
20137 ;
20138 return 0;
20139}
3e0be4ab 20140
5476a9a4
GM
20141_ACEOF
20142if ac_fn_c_try_compile "$LINENO"; then :
f199cab1
GM
20143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20144/* end confdefs.h. */
5476a9a4 20145#include <sys/select.h>
f199cab1
GM
20146int
20147main ()
20148{
5476a9a4
GM
20149
20150 #undef memset
20151 #define memset nonexistent_memset
20152 extern
20153 #ifdef __cplusplus
20154 "C"
20155 #endif
20156 void *memset (void *, int, unsigned long);
20157 #undef bzero
20158 #define bzero nonexistent_bzero
20159 extern
20160 #ifdef __cplusplus
20161 "C"
20162 #endif
20163 void bzero (void *, unsigned long);
20164 fd_set fds;
20165 FD_ZERO (&fds);
20166
f199cab1
GM
20167 ;
20168 return 0;
20169}
5476a9a4 20170
f199cab1 20171_ACEOF
5476a9a4
GM
20172if ac_fn_c_try_link "$LINENO"; then :
20173
f199cab1 20174else
5476a9a4 20175 gl_cv_header_sys_select_h_selfcontained=no
f199cab1 20176fi
5476a9a4
GM
20177rm -f core conftest.err conftest.$ac_objext \
20178 conftest$ac_exeext conftest.$ac_ext
1fd182f0 20179
f199cab1 20180fi
5476a9a4
GM
20181rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20182 fi
1fd182f0 20183
f199cab1 20184fi
5476a9a4
GM
20185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_select_h_selfcontained" >&5
20186$as_echo "$gl_cv_header_sys_select_h_selfcontained" >&6; }
1fd182f0
PE
20187
20188
b06b1098 20189
0eb775a3
GM
20190
20191
b06b1098 20192
1fd182f0 20193
1fd182f0 20194
5476a9a4
GM
20195
20196 if test $gl_cv_have_include_next = yes; then
20197 gl_cv_next_sys_select_h='<'sys/select.h'>'
20198 else
20199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/select.h>" >&5
20200$as_echo_n "checking absolute name of <sys/select.h>... " >&6; }
20201if test "${gl_cv_next_sys_select_h+set}" = set; then :
f199cab1 20202 $as_echo_n "(cached) " >&6
3e0be4ab 20203else
1fd182f0 20204
5476a9a4
GM
20205 if test $ac_cv_header_sys_select_h = yes; then
20206
20207
20208 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20209/* end confdefs.h. */
20210#include <sys/select.h>
20211
20212_ACEOF
20213 case "$host_os" in
20214 aix*) gl_absname_cpp="$ac_cpp -C" ;;
20215 *) gl_absname_cpp="$ac_cpp" ;;
20216 esac
20217
20218 case "$host_os" in
20219 mingw*)
20220 gl_dirsep_regex='[/\\]'
20221 ;;
20222 *)
20223 gl_dirsep_regex='\/'
20224 ;;
20225 esac
20226 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
20227
20228 gl_header_literal_regex=`echo 'sys/select.h' \
20229 | sed -e "$gl_make_literal_regex_sed"`
20230 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20231 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20232 s|^/[^/]|//&|
20233 p
20234 q
20235 }'
20236 gl_cv_next_sys_select_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20237 sed -n "$gl_absolute_header_sed"`'"'
20238 else
20239 gl_cv_next_sys_select_h='<'sys/select.h'>'
20240 fi
1fd182f0 20241
3e0be4ab 20242
1f5d53eb 20243fi
5476a9a4
GM
20244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_select_h" >&5
20245$as_echo "$gl_cv_next_sys_select_h" >&6; }
20246 fi
20247 NEXT_SYS_SELECT_H=$gl_cv_next_sys_select_h
1fd182f0 20248
5476a9a4
GM
20249 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20250 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20251 gl_next_as_first_directive='<'sys/select.h'>'
20252 else
20253 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20254 gl_next_as_first_directive=$gl_cv_next_sys_select_h
20255 fi
20256 NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H=$gl_next_as_first_directive
1fd182f0
PE
20257
20258
5476a9a4
GM
20259
20260
20261 if test $ac_cv_header_sys_select_h = yes; then
20262 HAVE_SYS_SELECT_H=1
20263 else
20264 HAVE_SYS_SELECT_H=0
20265 fi
20266
20267
20268
20269
20270
20271 if test $ac_cv_header_sys_socket_h != yes; then
20272 for ac_header in winsock2.h
20273do :
20274 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
20275if test "x$ac_cv_header_winsock2_h" = x""yes; then :
20276 cat >>confdefs.h <<_ACEOF
20277#define HAVE_WINSOCK2_H 1
f199cab1 20278_ACEOF
5476a9a4 20279
f199cab1 20280fi
3e0be4ab 20281
5476a9a4 20282done
3e0be4ab 20283
5476a9a4
GM
20284 fi
20285 if test "$ac_cv_header_winsock2_h" = yes; then
20286 HAVE_WINSOCK2_H=1
20287 UNISTD_H_HAVE_WINSOCK2_H=1
20288 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
20289 else
20290 HAVE_WINSOCK2_H=0
20291 fi
f199cab1 20292
f199cab1 20293
f199cab1 20294
f199cab1 20295
3e0be4ab 20296
3e0be4ab 20297
3e0be4ab 20298
3e0be4ab 20299
5476a9a4
GM
20300 GNULIB_PTHREAD_SIGMASK=0;
20301 GNULIB_RAISE=0;
20302 GNULIB_SIGNAL_H_SIGPIPE=0;
20303 GNULIB_SIGPROCMASK=0;
20304 GNULIB_SIGACTION=0;
20305 HAVE_POSIX_SIGNALBLOCKING=1;
20306 HAVE_PTHREAD_SIGMASK=1;
20307 HAVE_RAISE=1;
20308 HAVE_SIGSET_T=1;
20309 HAVE_SIGINFO_T=1;
20310 HAVE_SIGACTION=1;
20311 HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
20312
20313 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
f199cab1 20314
5476a9a4
GM
20315 HAVE_SIGHANDLER_T=1;
20316 REPLACE_PTHREAD_SIGMASK=0;
20317 REPLACE_RAISE=0;
1f5d53eb 20318
1fd182f0 20319
b06b1098 20320
1fd182f0 20321
3e0be4ab
GM
20322
20323
f077f61d 20324
5476a9a4
GM
20325 ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
20326 #include <signal.h>
20327 /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
20328 #include <sys/types.h>
20329
20330"
20331if test "x$ac_cv_type_sigset_t" = x""yes; then :
20332
20333cat >>confdefs.h <<_ACEOF
20334#define HAVE_SIGSET_T 1
f199cab1 20335_ACEOF
3e0be4ab 20336
5476a9a4
GM
20337gl_cv_type_sigset_t=yes
20338else
20339 gl_cv_type_sigset_t=no
f199cab1 20340fi
3e0be4ab 20341
5476a9a4
GM
20342 if test $gl_cv_type_sigset_t != yes; then
20343 HAVE_SIGSET_T=0
20344 fi
3e0be4ab 20345
1f5d53eb 20346
3e0be4ab 20347
5476a9a4
GM
20348 if test $ac_cv_header_sys_socket_h = no; then
20349 for ac_header in ws2tcpip.h
20350do :
20351 ac_fn_c_check_header_mongrel "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default"
20352if test "x$ac_cv_header_ws2tcpip_h" = x""yes; then :
20353 cat >>confdefs.h <<_ACEOF
20354#define HAVE_WS2TCPIP_H 1
20355_ACEOF
3e0be4ab 20356
5476a9a4 20357fi
3e0be4ab 20358
5476a9a4
GM
20359done
20360
20361 fi
20362
20363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
20364$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
20365if test "${ac_cv_header_stdbool_h+set}" = set; then :
20366 $as_echo_n "(cached) " >&6
20367else
20368 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20369/* end confdefs.h. */
1f5d53eb 20370
5476a9a4
GM
20371 #include <stdbool.h>
20372 #ifndef bool
20373 "error: bool is not defined"
20374 #endif
20375 #ifndef false
20376 "error: false is not defined"
20377 #endif
20378 #if false
20379 "error: false is not 0"
20380 #endif
20381 #ifndef true
20382 "error: true is not defined"
20383 #endif
20384 #if true != 1
20385 "error: true is not 1"
20386 #endif
20387 #ifndef __bool_true_false_are_defined
20388 "error: __bool_true_false_are_defined is not defined"
20389 #endif
20390
20391 struct s { _Bool s: 1; _Bool t; } s;
20392
20393 char a[true == 1 ? 1 : -1];
20394 char b[false == 0 ? 1 : -1];
20395 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
20396 char d[(bool) 0.5 == true ? 1 : -1];
20397 /* See body of main program for 'e'. */
20398 char f[(_Bool) 0.0 == false ? 1 : -1];
20399 char g[true];
20400 char h[sizeof (_Bool)];
20401 char i[sizeof s.t];
20402 enum { j = false, k = true, l = false * true, m = true * 256 };
20403 /* The following fails for
20404 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
20405 _Bool n[m];
20406 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
20407 char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
20408 /* Catch a bug in an HP-UX C compiler. See
20409 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
20410 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
20411 */
20412 _Bool q = true;
20413 _Bool *pq = &q;
1ebc9c87
GM
20414
20415int
20416main ()
20417{
f199cab1 20418
5476a9a4
GM
20419 bool e = &s;
20420 *pq |= q;
20421 *pq |= ! q;
20422 /* Refer to every declared value, to avoid compiler optimizations. */
20423 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
20424 + !m + !n + !o + !p + !q + !pq);
f199cab1 20425
5476a9a4 20426 ;
1ebc9c87
GM
20427 return 0;
20428}
20429_ACEOF
5476a9a4
GM
20430if ac_fn_c_try_compile "$LINENO"; then :
20431 ac_cv_header_stdbool_h=yes
1ebc9c87 20432else
5476a9a4 20433 ac_cv_header_stdbool_h=no
1ebc9c87 20434fi
5476a9a4 20435rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1ebc9c87 20436fi
5476a9a4
GM
20437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
20438$as_echo "$ac_cv_header_stdbool_h" >&6; }
20439 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
20440if test "x$ac_cv_type__Bool" = x""yes; then :
1ebc9c87 20441
5476a9a4
GM
20442cat >>confdefs.h <<_ACEOF
20443#define HAVE__BOOL 1
20444_ACEOF
1ebc9c87 20445
1ebc9c87
GM
20446
20447fi
20448
1ebc9c87 20449
1ebc9c87 20450
5476a9a4
GM
20451 REPLACE_NULL=0;
20452 HAVE_WCHAR_T=1;
20453
20454
20455 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
20456$as_echo_n "checking for wchar_t... " >&6; }
20457if test "${gt_cv_c_wchar_t+set}" = set; then :
20458 $as_echo_n "(cached) " >&6
20459else
20460 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20461/* end confdefs.h. */
20462#include <stddef.h>
20463 wchar_t foo = (wchar_t)'\0';
20464int
20465main ()
20466{
20467
20468 ;
20469 return 0;
20470}
20471_ACEOF
20472if ac_fn_c_try_compile "$LINENO"; then :
20473 gt_cv_c_wchar_t=yes
20474else
20475 gt_cv_c_wchar_t=no
20476fi
20477rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1ebc9c87 20478fi
5476a9a4
GM
20479{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
20480$as_echo "$gt_cv_c_wchar_t" >&6; }
20481 if test $gt_cv_c_wchar_t = yes; then
1ebc9c87 20482
5476a9a4
GM
20483$as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
20484
20485 fi
20486
20487
20488 GNULIB_DPRINTF=0;
20489 GNULIB_FCLOSE=0;
20490 GNULIB_FDOPEN=0;
20491 GNULIB_FFLUSH=0;
20492 GNULIB_FGETC=0;
20493 GNULIB_FGETS=0;
20494 GNULIB_FOPEN=0;
20495 GNULIB_FPRINTF=0;
20496 GNULIB_FPRINTF_POSIX=0;
20497 GNULIB_FPURGE=0;
20498 GNULIB_FPUTC=0;
20499 GNULIB_FPUTS=0;
20500 GNULIB_FREAD=0;
20501 GNULIB_FREOPEN=0;
20502 GNULIB_FSCANF=0;
20503 GNULIB_FSEEK=0;
20504 GNULIB_FSEEKO=0;
20505 GNULIB_FTELL=0;
20506 GNULIB_FTELLO=0;
20507 GNULIB_FWRITE=0;
20508 GNULIB_GETC=0;
20509 GNULIB_GETCHAR=0;
20510 GNULIB_GETDELIM=0;
20511 GNULIB_GETLINE=0;
20512 GNULIB_OBSTACK_PRINTF=0;
20513 GNULIB_OBSTACK_PRINTF_POSIX=0;
20514 GNULIB_PCLOSE=0;
20515 GNULIB_PERROR=0;
20516 GNULIB_POPEN=0;
20517 GNULIB_PRINTF=0;
20518 GNULIB_PRINTF_POSIX=0;
20519 GNULIB_PUTC=0;
20520 GNULIB_PUTCHAR=0;
20521 GNULIB_PUTS=0;
20522 GNULIB_REMOVE=0;
20523 GNULIB_RENAME=0;
20524 GNULIB_RENAMEAT=0;
20525 GNULIB_SCANF=0;
20526 GNULIB_SNPRINTF=0;
20527 GNULIB_SPRINTF_POSIX=0;
20528 GNULIB_STDIO_H_NONBLOCKING=0;
20529 GNULIB_STDIO_H_SIGPIPE=0;
20530 GNULIB_TMPFILE=0;
20531 GNULIB_VASPRINTF=0;
20532 GNULIB_VFSCANF=0;
20533 GNULIB_VSCANF=0;
20534 GNULIB_VDPRINTF=0;
20535 GNULIB_VFPRINTF=0;
20536 GNULIB_VFPRINTF_POSIX=0;
20537 GNULIB_VPRINTF=0;
20538 GNULIB_VPRINTF_POSIX=0;
20539 GNULIB_VSNPRINTF=0;
20540 GNULIB_VSPRINTF_POSIX=0;
20541 HAVE_DECL_FPURGE=1;
20542 HAVE_DECL_FSEEKO=1;
20543 HAVE_DECL_FTELLO=1;
20544 HAVE_DECL_GETDELIM=1;
20545 HAVE_DECL_GETLINE=1;
20546 HAVE_DECL_OBSTACK_PRINTF=1;
20547 HAVE_DECL_SNPRINTF=1;
20548 HAVE_DECL_VSNPRINTF=1;
20549 HAVE_DPRINTF=1;
20550 HAVE_FSEEKO=1;
20551 HAVE_FTELLO=1;
20552 HAVE_PCLOSE=1;
20553 HAVE_POPEN=1;
20554 HAVE_RENAMEAT=1;
20555 HAVE_VASPRINTF=1;
20556 HAVE_VDPRINTF=1;
20557 REPLACE_DPRINTF=0;
20558 REPLACE_FCLOSE=0;
20559 REPLACE_FDOPEN=0;
20560 REPLACE_FFLUSH=0;
20561 REPLACE_FOPEN=0;
20562 REPLACE_FPRINTF=0;
20563 REPLACE_FPURGE=0;
20564 REPLACE_FREOPEN=0;
20565 REPLACE_FSEEK=0;
20566 REPLACE_FSEEKO=0;
20567 REPLACE_FTELL=0;
20568 REPLACE_FTELLO=0;
20569 REPLACE_GETDELIM=0;
20570 REPLACE_GETLINE=0;
20571 REPLACE_OBSTACK_PRINTF=0;
20572 REPLACE_PERROR=0;
20573 REPLACE_POPEN=0;
20574 REPLACE_PRINTF=0;
20575 REPLACE_REMOVE=0;
20576 REPLACE_RENAME=0;
20577 REPLACE_RENAMEAT=0;
20578 REPLACE_SNPRINTF=0;
20579 REPLACE_SPRINTF=0;
20580 REPLACE_STDIO_READ_FUNCS=0;
20581 REPLACE_STDIO_WRITE_FUNCS=0;
20582 REPLACE_TMPFILE=0;
20583 REPLACE_VASPRINTF=0;
20584 REPLACE_VDPRINTF=0;
20585 REPLACE_VFPRINTF=0;
20586 REPLACE_VPRINTF=0;
20587 REPLACE_VSNPRINTF=0;
20588 REPLACE_VSPRINTF=0;
1ebc9c87 20589
5476a9a4
GM
20590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
20591$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
20592if test "${ac_cv_struct_tm+set}" = set; then :
1ebc9c87
GM
20593 $as_echo_n "(cached) " >&6
20594else
5476a9a4 20595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1ebc9c87 20596/* end confdefs.h. */
5476a9a4
GM
20597#include <sys/types.h>
20598#include <time.h>
1ebc9c87
GM
20599
20600int
20601main ()
20602{
5476a9a4
GM
20603struct tm tm;
20604 int *p = &tm.tm_sec;
20605 return !p;
1ebc9c87
GM
20606 ;
20607 return 0;
20608}
20609_ACEOF
5476a9a4
GM
20610if ac_fn_c_try_compile "$LINENO"; then :
20611 ac_cv_struct_tm=time.h
1ebc9c87 20612else
5476a9a4 20613 ac_cv_struct_tm=sys/time.h
1ebc9c87 20614fi
5476a9a4 20615rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1ebc9c87 20616fi
5476a9a4
GM
20617{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
20618$as_echo "$ac_cv_struct_tm" >&6; }
20619if test $ac_cv_struct_tm = sys/time.h; then
1ebc9c87 20620
5476a9a4 20621$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
1ebc9c87 20622
1ebc9c87
GM
20623fi
20624
5476a9a4
GM
20625ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
20626#include <$ac_cv_struct_tm>
1fd182f0 20627
5476a9a4
GM
20628"
20629if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
1fd182f0 20630
5476a9a4
GM
20631cat >>confdefs.h <<_ACEOF
20632#define HAVE_STRUCT_TM_TM_ZONE 1
f199cab1 20633_ACEOF
5476a9a4
GM
20634
20635
1f5d53eb 20636fi
1fd182f0 20637
5476a9a4 20638if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
1f5d53eb 20639
5476a9a4 20640$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
1fd182f0 20641
5476a9a4
GM
20642else
20643 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
20644"
20645if test "x$ac_cv_have_decl_tzname" = x""yes; then :
20646 ac_have_decl=1
20647else
20648 ac_have_decl=0
20649fi
1fd182f0 20650
5476a9a4
GM
20651cat >>confdefs.h <<_ACEOF
20652#define HAVE_DECL_TZNAME $ac_have_decl
20653_ACEOF
f199cab1 20654
5476a9a4
GM
20655 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
20656$as_echo_n "checking for tzname... " >&6; }
20657if test "${ac_cv_var_tzname+set}" = set; then :
f199cab1 20658 $as_echo_n "(cached) " >&6
3e0be4ab 20659else
5476a9a4 20660 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 20661/* end confdefs.h. */
5476a9a4
GM
20662#include <time.h>
20663#if !HAVE_DECL_TZNAME
20664extern char *tzname[];
f199cab1 20665#endif
5476a9a4 20666
f199cab1
GM
20667int
20668main ()
20669{
5476a9a4 20670return tzname[0][0];
f199cab1
GM
20671 ;
20672 return 0;
20673}
3e0be4ab 20674_ACEOF
f199cab1 20675if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 20676 ac_cv_var_tzname=yes
3e0be4ab 20677else
5476a9a4 20678 ac_cv_var_tzname=no
f199cab1
GM
20679fi
20680rm -f core conftest.err conftest.$ac_objext \
20681 conftest$ac_exeext conftest.$ac_ext
f199cab1 20682fi
5476a9a4
GM
20683{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
20684$as_echo "$ac_cv_var_tzname" >&6; }
20685 if test $ac_cv_var_tzname = yes; then
20686
20687$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
f199cab1 20688
5476a9a4 20689 fi
3e0be4ab 20690fi
cc322c06 20691
5476a9a4
GM
20692
20693 ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include <time.h>
20694"
20695if test "x$ac_cv_member_struct_tm_tm_gmtoff" = x""yes; then :
20696
20697$as_echo "#define HAVE_TM_GMTOFF 1" >>confdefs.h
cc322c06 20698
f199cab1 20699fi
cc322c06 20700
1f5d53eb 20701
e275c824 20702
5476a9a4 20703
283c7aed
GM
20704
20705
20706
20707
20708
20709
20710
20711
20712
20713 if test $gl_cv_have_include_next = yes; then
20714 gl_cv_next_string_h='<'string.h'>'
20715 else
20716 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
20717$as_echo_n "checking absolute name of <string.h>... " >&6; }
20718if test "${gl_cv_next_string_h+set}" = set; then :
20719 $as_echo_n "(cached) " >&6
20720else
20721
20722 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20723/* end confdefs.h. */
20724#include <string.h>
20725
20726_ACEOF
20727 case "$host_os" in
20728 aix*) gl_absname_cpp="$ac_cpp -C" ;;
20729 *) gl_absname_cpp="$ac_cpp" ;;
20730 esac
20731
20732 case "$host_os" in
20733 mingw*)
20734 gl_dirsep_regex='[/\\]'
20735 ;;
20736 *)
20737 gl_dirsep_regex='\/'
20738 ;;
20739 esac
20740 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
20741
20742 gl_header_literal_regex=`echo 'string.h' \
20743 | sed -e "$gl_make_literal_regex_sed"`
20744 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20745 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20746 s|^/[^/]|//&|
20747 p
20748 q
20749 }'
20750 gl_cv_next_string_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20751 sed -n "$gl_absolute_header_sed"`'"'
20752
20753
20754fi
20755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
20756$as_echo "$gl_cv_next_string_h" >&6; }
20757 fi
20758 NEXT_STRING_H=$gl_cv_next_string_h
20759
20760 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20761 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20762 gl_next_as_first_directive='<'string.h'>'
20763 else
20764 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20765 gl_next_as_first_directive=$gl_cv_next_string_h
20766 fi
20767 NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
20768
20769
20770
20771
20772
20773
20774
20775
20776
5476a9a4
GM
20777ac_fn_c_check_decl "$LINENO" "strtoimax" "ac_cv_have_decl_strtoimax" "$ac_includes_default"
20778if test "x$ac_cv_have_decl_strtoimax" = x""yes; then :
20779 ac_have_decl=1
3e0be4ab 20780else
5476a9a4 20781 ac_have_decl=0
3e0be4ab 20782fi
5476a9a4
GM
20783
20784cat >>confdefs.h <<_ACEOF
20785#define HAVE_DECL_STRTOIMAX $ac_have_decl
f199cab1 20786_ACEOF
e275c824
PE
20787
20788
5476a9a4
GM
20789
20790ac_fn_c_check_decl "$LINENO" "strtoumax" "ac_cv_have_decl_strtoumax" "$ac_includes_default"
20791if test "x$ac_cv_have_decl_strtoumax" = x""yes; then :
20792 ac_have_decl=1
20793else
20794 ac_have_decl=0
3e0be4ab 20795fi
e275c824 20796
5476a9a4
GM
20797cat >>confdefs.h <<_ACEOF
20798#define HAVE_DECL_STRTOUMAX $ac_have_decl
20799_ACEOF
e275c824
PE
20800
20801
2b1928b8 20802
5476a9a4
GM
20803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
20804$as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
20805if test "${ac_cv_header_stat_broken+set}" = set; then :
f199cab1 20806 $as_echo_n "(cached) " >&6
2b1928b8 20807else
5476a9a4
GM
20808 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20809/* end confdefs.h. */
20810#include <sys/types.h>
20811#include <sys/stat.h>
2b1928b8 20812
5476a9a4
GM
20813#if defined S_ISBLK && defined S_IFDIR
20814extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
20815#endif
2b1928b8 20816
5476a9a4
GM
20817#if defined S_ISBLK && defined S_IFCHR
20818extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
20819#endif
0eb775a3 20820
5476a9a4
GM
20821#if defined S_ISLNK && defined S_IFREG
20822extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
20823#endif
20824
20825#if defined S_ISSOCK && defined S_IFREG
20826extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
20827#endif
0eb775a3 20828
5476a9a4
GM
20829_ACEOF
20830if ac_fn_c_try_compile "$LINENO"; then :
20831 ac_cv_header_stat_broken=no
f199cab1 20832else
5476a9a4 20833 ac_cv_header_stat_broken=yes
f199cab1 20834fi
5476a9a4 20835rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 20836fi
5476a9a4
GM
20837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
20838$as_echo "$ac_cv_header_stat_broken" >&6; }
20839if test $ac_cv_header_stat_broken = yes; then
0eb775a3 20840
5476a9a4 20841$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
0eb775a3 20842
5476a9a4 20843fi
0eb775a3
GM
20844
20845
20846
5476a9a4
GM
20847
20848
20849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
20850$as_echo_n "checking for struct timespec in <time.h>... " >&6; }
20851if test "${gl_cv_sys_struct_timespec_in_time_h+set}" = set; then :
20852 $as_echo_n "(cached) " >&6
20853else
20854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3e0be4ab 20855/* end confdefs.h. */
5476a9a4 20856#include <time.h>
52724a05 20857
3e0be4ab
GM
20858int
20859main ()
20860{
5476a9a4 20861static struct timespec x; x.tv_sec = x.tv_nsec;
3e0be4ab
GM
20862 ;
20863 return 0;
20864}
20865_ACEOF
5476a9a4
GM
20866if ac_fn_c_try_compile "$LINENO"; then :
20867 gl_cv_sys_struct_timespec_in_time_h=yes
3e0be4ab 20868else
5476a9a4 20869 gl_cv_sys_struct_timespec_in_time_h=no
3e0be4ab 20870fi
5476a9a4
GM
20871rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20872fi
20873{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
20874$as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
52724a05 20875
5476a9a4
GM
20876 TIME_H_DEFINES_STRUCT_TIMESPEC=0
20877 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
20878 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
20879 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
20880 TIME_H_DEFINES_STRUCT_TIMESPEC=1
20881 else
20882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
20883$as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
20884if test "${gl_cv_sys_struct_timespec_in_sys_time_h+set}" = set; then :
20885 $as_echo_n "(cached) " >&6
20886else
3e0be4ab
GM
20887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20888/* end confdefs.h. */
5476a9a4
GM
20889#include <sys/time.h>
20890
3e0be4ab
GM
20891int
20892main ()
20893{
5476a9a4 20894static struct timespec x; x.tv_sec = x.tv_nsec;
3e0be4ab
GM
20895 ;
20896 return 0;
20897}
20898_ACEOF
5476a9a4
GM
20899if ac_fn_c_try_compile "$LINENO"; then :
20900 gl_cv_sys_struct_timespec_in_sys_time_h=yes
3e0be4ab 20901else
5476a9a4 20902 gl_cv_sys_struct_timespec_in_sys_time_h=no
3e0be4ab 20903fi
5476a9a4 20904rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 20905fi
5476a9a4
GM
20906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
20907$as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
20908 if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
20909 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
20910 else
20911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
20912$as_echo_n "checking for struct timespec in <pthread.h>... " >&6; }
20913if test "${gl_cv_sys_struct_timespec_in_pthread_h+set}" = set; then :
3e0be4ab
GM
20914 $as_echo_n "(cached) " >&6
20915else
20916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20917/* end confdefs.h. */
5476a9a4
GM
20918#include <pthread.h>
20919
3e0be4ab
GM
20920int
20921main ()
20922{
5476a9a4 20923static struct timespec x; x.tv_sec = x.tv_nsec;
3e0be4ab
GM
20924 ;
20925 return 0;
20926}
20927_ACEOF
5476a9a4
GM
20928if ac_fn_c_try_compile "$LINENO"; then :
20929 gl_cv_sys_struct_timespec_in_pthread_h=yes
3e0be4ab 20930else
5476a9a4 20931 gl_cv_sys_struct_timespec_in_pthread_h=no
3e0be4ab 20932fi
5476a9a4 20933rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3e0be4ab 20934fi
5476a9a4
GM
20935{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
20936$as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
20937 if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
20938 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
20939 fi
20940 fi
f199cab1 20941 fi
e275c824
PE
20942
20943
b0415a03 20944
b0415a03 20945
e275c824 20946
e275c824
PE
20947
20948
f199cab1 20949
e275c824
PE
20950
20951
20952
20953
20954
20955
20956
5476a9a4
GM
20957 if test $gl_cv_have_include_next = yes; then
20958 gl_cv_next_time_h='<'time.h'>'
20959 else
20960 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
20961$as_echo_n "checking absolute name of <time.h>... " >&6; }
20962if test "${gl_cv_next_time_h+set}" = set; then :
20963 $as_echo_n "(cached) " >&6
20964else
e275c824 20965
5476a9a4
GM
20966 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20967/* end confdefs.h. */
20968#include <time.h>
e275c824 20969
5476a9a4
GM
20970_ACEOF
20971 case "$host_os" in
20972 aix*) gl_absname_cpp="$ac_cpp -C" ;;
20973 *) gl_absname_cpp="$ac_cpp" ;;
20974 esac
e275c824 20975
5476a9a4
GM
20976 case "$host_os" in
20977 mingw*)
20978 gl_dirsep_regex='[/\\]'
20979 ;;
20980 *)
20981 gl_dirsep_regex='\/'
20982 ;;
20983 esac
20984 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
e275c824 20985
5476a9a4
GM
20986 gl_header_literal_regex=`echo 'time.h' \
20987 | sed -e "$gl_make_literal_regex_sed"`
20988 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20989 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20990 s|^/[^/]|//&|
20991 p
20992 q
20993 }'
20994 gl_cv_next_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20995 sed -n "$gl_absolute_header_sed"`'"'
e275c824
PE
20996
20997
5476a9a4
GM
20998fi
20999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
21000$as_echo "$gl_cv_next_time_h" >&6; }
21001 fi
21002 NEXT_TIME_H=$gl_cv_next_time_h
67342916 21003
5476a9a4
GM
21004 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21005 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21006 gl_next_as_first_directive='<'time.h'>'
f199cab1 21007 else
5476a9a4
GM
21008 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21009 gl_next_as_first_directive=$gl_cv_next_time_h
f199cab1 21010 fi
5476a9a4 21011 NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
4fda9c95
GM
21012
21013
52724a05
GM
21014
21015
21016
21017
21018
21019
21020
ae0d7250
PE
21021
21022
21023
cc322c06 21024
f199cab1 21025
b5591ebb
GM
21026ac_fn_c_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default"
21027if test "x$ac_cv_have_decl_unsetenv" = x""yes; then :
21028 ac_have_decl=1
21029else
21030 ac_have_decl=0
21031fi
21032
21033cat >>confdefs.h <<_ACEOF
21034#define HAVE_DECL_UNSETENV $ac_have_decl
21035_ACEOF
21036
cc322c06 21037
5476a9a4
GM
21038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the utimes function works" >&5
21039$as_echo_n "checking whether the utimes function works... " >&6; }
21040if test "${gl_cv_func_working_utimes+set}" = set; then :
21041 $as_echo_n "(cached) " >&6
21042else
1fd182f0 21043
5476a9a4
GM
21044 if test "$cross_compiling" = yes; then :
21045 gl_cv_func_working_utimes=no
21046else
21047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21048/* end confdefs.h. */
21049
21050#include <sys/types.h>
21051#include <sys/stat.h>
21052#include <fcntl.h>
21053#include <sys/time.h>
21054#include <time.h>
21055#include <unistd.h>
21056#include <stdlib.h>
21057#include <stdio.h>
21058#include <utime.h>
1fd182f0 21059
5476a9a4
GM
21060static int
21061inorder (time_t a, time_t b, time_t c)
21062{
21063 return a <= b && b <= c;
21064}
1fd182f0 21065
5476a9a4
GM
21066int
21067main ()
21068{
21069 int result = 0;
21070 char const *file = "conftest.utimes";
21071 static struct timeval timeval[2] = {{9, 10}, {999999, 999999}};
1fd182f0 21072
5476a9a4
GM
21073 /* Test whether utimes() essentially works. */
21074 {
21075 struct stat sbuf;
21076 FILE *f = fopen (file, "w");
21077 if (f == NULL)
21078 result |= 1;
21079 else if (fclose (f) != 0)
21080 result |= 1;
21081 else if (utimes (file, timeval) != 0)
21082 result |= 2;
21083 else if (lstat (file, &sbuf) != 0)
21084 result |= 1;
21085 else if (!(sbuf.st_atime == timeval[0].tv_sec
21086 && sbuf.st_mtime == timeval[1].tv_sec))
21087 result |= 4;
21088 if (unlink (file) != 0)
21089 result |= 1;
21090 }
1fd182f0 21091
5476a9a4
GM
21092 /* Test whether utimes() with a NULL argument sets the file's timestamp
21093 to the current time. Use 'fstat' as well as 'time' to
21094 determine the "current" time, to accommodate NFS file systems
21095 if there is a time skew between the host and the NFS server. */
21096 {
21097 int fd = open (file, O_WRONLY|O_CREAT, 0644);
21098 if (fd < 0)
21099 result |= 1;
21100 else
21101 {
21102 time_t t0, t2;
21103 struct stat st0, st1, st2;
21104 if (time (&t0) == (time_t) -1)
21105 result |= 1;
21106 else if (fstat (fd, &st0) != 0)
21107 result |= 1;
21108 else if (utimes (file, timeval) != 0)
21109 result |= 2;
21110 else if (utimes (file, NULL) != 0)
21111 result |= 8;
21112 else if (fstat (fd, &st1) != 0)
21113 result |= 1;
21114 else if (write (fd, "\n", 1) != 1)
21115 result |= 1;
21116 else if (fstat (fd, &st2) != 0)
21117 result |= 1;
21118 else if (time (&t2) == (time_t) -1)
21119 result |= 1;
21120 else
21121 {
21122 int m_ok_POSIX = inorder (t0, st1.st_mtime, t2);
21123 int m_ok_NFS = inorder (st0.st_mtime, st1.st_mtime, st2.st_mtime);
21124 if (! (st1.st_atime == st1.st_mtime))
21125 result |= 16;
21126 if (! (m_ok_POSIX || m_ok_NFS))
21127 result |= 32;
21128 }
21129 if (close (fd) != 0)
21130 result |= 1;
21131 }
21132 if (unlink (file) != 0)
21133 result |= 1;
21134 }
52724a05 21135
5476a9a4
GM
21136 /* Test whether utimes() with a NULL argument works on read-only files. */
21137 {
21138 int fd = open (file, O_WRONLY|O_CREAT, 0444);
21139 if (fd < 0)
21140 result |= 1;
21141 else if (close (fd) != 0)
21142 result |= 1;
21143 else if (utimes (file, NULL) != 0)
21144 result |= 64;
21145 if (unlink (file) != 0)
21146 result |= 1;
21147 }
1fd182f0 21148
5476a9a4
GM
21149 return result;
21150}
1fd182f0 21151
5476a9a4
GM
21152_ACEOF
21153if ac_fn_c_try_run "$LINENO"; then :
21154 gl_cv_func_working_utimes=yes
21155else
21156 gl_cv_func_working_utimes=no
21157fi
21158rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21159 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1 21160fi
1fd182f0 21161
5476a9a4
GM
21162fi
21163{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_utimes" >&5
21164$as_echo "$gl_cv_func_working_utimes" >&6; }
1fd182f0 21165
5476a9a4 21166 if test $gl_cv_func_working_utimes = yes; then
1fd182f0 21167
5476a9a4 21168$as_echo "#define HAVE_WORKING_UTIMES 1" >>confdefs.h
1fd182f0 21169
5476a9a4 21170 fi
1fd182f0 21171
1fd182f0 21172
1fd182f0 21173
1fd182f0 21174
1fd182f0 21175
5476a9a4
GM
21176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct utimbuf" >&5
21177$as_echo_n "checking for struct utimbuf... " >&6; }
21178if test "${gl_cv_sys_struct_utimbuf+set}" = set; then :
21179 $as_echo_n "(cached) " >&6
21180else
21181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21182/* end confdefs.h. */
21183#if HAVE_SYS_TIME_H
21184 #include <sys/time.h>
21185 #endif
21186 #include <time.h>
21187 #ifdef HAVE_UTIME_H
21188 #include <utime.h>
21189 #endif
1fd182f0 21190
5476a9a4
GM
21191int
21192main ()
21193{
21194static struct utimbuf x; x.actime = x.modtime;
21195 ;
21196 return 0;
21197}
21198_ACEOF
21199if ac_fn_c_try_compile "$LINENO"; then :
21200 gl_cv_sys_struct_utimbuf=yes
21201else
21202 gl_cv_sys_struct_utimbuf=no
f199cab1 21203fi
5476a9a4 21204rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 21205fi
5476a9a4
GM
21206{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_utimbuf" >&5
21207$as_echo "$gl_cv_sys_struct_utimbuf" >&6; }
1fd182f0 21208
5476a9a4 21209 if test $gl_cv_sys_struct_utimbuf = yes; then
1fd182f0 21210
5476a9a4 21211$as_echo "#define HAVE_STRUCT_UTIMBUF 1" >>confdefs.h
1fd182f0 21212
5476a9a4 21213 fi
1fd182f0 21214
1fd182f0 21215
1fd182f0 21216
1fd182f0 21217
1fd182f0 21218
1fd182f0 21219
1fd182f0 21220
3e0be4ab 21221
f199cab1 21222
f199cab1 21223
067d23c9 21224
710f5812
GM
21225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking type of array argument to getgroups" >&5
21226$as_echo_n "checking type of array argument to getgroups... " >&6; }
21227if test "${ac_cv_type_getgroups+set}" = set; then :
21228 $as_echo_n "(cached) " >&6
21229else
21230 if test "$cross_compiling" = yes; then :
21231 ac_cv_type_getgroups=cross
21232else
21233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21234/* end confdefs.h. */
21235/* Thanks to Mike Rendell for this test. */
21236$ac_includes_default
21237#define NGID 256
21238#undef MAX
21239#define MAX(x, y) ((x) > (y) ? (x) : (y))
21240
21241int
21242main ()
21243{
21244 gid_t gidset[NGID];
21245 int i, n;
21246 union { gid_t gval; long int lval; } val;
21247
21248 val.lval = -1;
21249 for (i = 0; i < NGID; i++)
21250 gidset[i] = val.gval;
21251 n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
21252 gidset);
21253 /* Exit non-zero if getgroups seems to require an array of ints. This
21254 happens when gid_t is short int but getgroups modifies an array
21255 of ints. */
21256 return n > 0 && gidset[n] != val.gval;
21257}
21258_ACEOF
21259if ac_fn_c_try_run "$LINENO"; then :
21260 ac_cv_type_getgroups=gid_t
21261else
21262 ac_cv_type_getgroups=int
21263fi
21264rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21265 conftest.$ac_objext conftest.beam conftest.$ac_ext
21266fi
21267
21268if test $ac_cv_type_getgroups = cross; then
21269 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21270/* end confdefs.h. */
21271#include <unistd.h>
21272
21273_ACEOF
21274if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21275 $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then :
21276 ac_cv_type_getgroups=gid_t
21277else
21278 ac_cv_type_getgroups=int
21279fi
21280rm -f conftest*
21281
21282fi
21283fi
21284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_getgroups" >&5
21285$as_echo "$ac_cv_type_getgroups" >&6; }
21286
21287cat >>confdefs.h <<_ACEOF
21288#define GETGROUPS_T $ac_cv_type_getgroups
21289_ACEOF
21290
21291
21292
067d23c9 21293
5476a9a4
GM
21294 if false; then
21295 GL_COND_LIBTOOL_TRUE=
21296 GL_COND_LIBTOOL_FALSE='#'
21297else
21298 GL_COND_LIBTOOL_TRUE='#'
21299 GL_COND_LIBTOOL_FALSE=
1fd182f0 21300fi
067d23c9 21301
5476a9a4
GM
21302 gl_cond_libtool=false
21303 gl_libdeps=
21304 gl_ltlibdeps=
21305 gl_m4_base='m4'
067d23c9 21306
f199cab1 21307
f199cab1 21308
f199cab1 21309
067d23c9 21310
f199cab1 21311
f199cab1 21312
f199cab1 21313
067d23c9 21314
5476a9a4 21315 gl_source_base='lib'
cc322c06
GM
21316
21317
5476a9a4
GM
21318 if test $ac_cv_func_alloca_works = no; then
21319 :
f199cab1 21320 fi
cc322c06 21321
5476a9a4
GM
21322 # Define an additional variable used in the Makefile substitution.
21323 if test $ac_cv_working_alloca_h = yes; then
21324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
21325$as_echo_n "checking for alloca as a compiler built-in... " >&6; }
21326if test "${gl_cv_rpl_alloca+set}" = set; then :
21327 $as_echo_n "(cached) " >&6
21328else
cc322c06 21329
5476a9a4
GM
21330 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21331/* end confdefs.h. */
067d23c9 21332
5476a9a4
GM
21333#if defined __GNUC__ || defined _AIX || defined _MSC_VER
21334 Need own alloca
21335#endif
067d23c9 21336
f199cab1 21337_ACEOF
5476a9a4
GM
21338if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21339 $EGREP "Need own alloca" >/dev/null 2>&1; then :
21340 gl_cv_rpl_alloca=yes
21341else
21342 gl_cv_rpl_alloca=no
369e19fc 21343fi
5476a9a4 21344rm -f conftest*
067d23c9 21345
ae0d7250 21346
5476a9a4
GM
21347fi
21348{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
21349$as_echo "$gl_cv_rpl_alloca" >&6; }
21350 if test $gl_cv_rpl_alloca = yes; then
52724a05 21351
5476a9a4 21352$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
ae0d7250 21353
5476a9a4
GM
21354 ALLOCA_H=alloca.h
21355 else
21356 ALLOCA_H=
21357 fi
f199cab1 21358 else
5476a9a4
GM
21359 ALLOCA_H=alloca.h
21360 fi
ae0d7250 21361
5476a9a4
GM
21362 if test -n "$ALLOCA_H"; then
21363 GL_GENERATE_ALLOCA_H_TRUE=
21364 GL_GENERATE_ALLOCA_H_FALSE='#'
21365else
21366 GL_GENERATE_ALLOCA_H_TRUE='#'
21367 GL_GENERATE_ALLOCA_H_FALSE=
21368fi
f199cab1 21369
ae0d7250
PE
21370
21371
21372
21373
21374
5476a9a4
GM
21375 # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
21376 # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
ae0d7250 21377
5476a9a4
GM
21378 # Save and restore LIBS so e.g., -lrt, isn't added to it. Otherwise, *all*
21379 # programs in the package would end up linked with that potentially-shared
21380 # library, inducing unnecessary run-time overhead.
21381 LIB_CLOCK_GETTIME=
ae0d7250 21382
5476a9a4
GM
21383 gl_saved_libs=$LIBS
21384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
21385$as_echo_n "checking for library containing clock_gettime... " >&6; }
21386if test "${ac_cv_search_clock_gettime+set}" = set; then :
21387 $as_echo_n "(cached) " >&6
21388else
21389 ac_func_search_save_LIBS=$LIBS
21390cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21391/* end confdefs.h. */
21392
21393/* Override any GCC internal prototype to avoid an error.
21394 Use char because int might match the return type of a GCC
21395 builtin and then its argument prototype would still apply. */
21396#ifdef __cplusplus
21397extern "C"
21398#endif
21399char clock_gettime ();
21400int
21401main ()
21402{
21403return clock_gettime ();
21404 ;
21405 return 0;
21406}
21407_ACEOF
21408for ac_lib in '' rt posix4; do
21409 if test -z "$ac_lib"; then
21410 ac_res="none required"
21411 else
21412 ac_res=-l$ac_lib
21413 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
21414 fi
21415 if ac_fn_c_try_link "$LINENO"; then :
21416 ac_cv_search_clock_gettime=$ac_res
f199cab1 21417fi
5476a9a4
GM
21418rm -f core conftest.err conftest.$ac_objext \
21419 conftest$ac_exeext
21420 if test "${ac_cv_search_clock_gettime+set}" = set; then :
21421 break
21422fi
21423done
21424if test "${ac_cv_search_clock_gettime+set}" = set; then :
ae0d7250 21425
5476a9a4
GM
21426else
21427 ac_cv_search_clock_gettime=no
21428fi
21429rm conftest.$ac_ext
21430LIBS=$ac_func_search_save_LIBS
21431fi
21432{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
21433$as_echo "$ac_cv_search_clock_gettime" >&6; }
21434ac_res=$ac_cv_search_clock_gettime
21435if test "$ac_res" != no; then :
21436 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
21437 test "$ac_cv_search_clock_gettime" = "none required" ||
21438 LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime
21439fi
ae0d7250 21440
5476a9a4
GM
21441 for ac_func in clock_gettime clock_settime
21442do :
21443 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
21444ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
21445eval as_val=\$$as_ac_var
21446 if test "x$as_val" = x""yes; then :
21447 cat >>confdefs.h <<_ACEOF
21448#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
21449_ACEOF
ae0d7250 21450
d7ad186c
GM
21451fi
21452done
21453
21454 LIBS=$gl_saved_libs
21455
21456
21457 :
21458
21459
21460
21461cat >>confdefs.h <<_ACEOF
21462#define GNULIB_CLOSE_STREAM 1
21463_ACEOF
21464
21465
21466
21467
21468 :
21469
21470
21471
21472 :
21473
21474
21475
21476
21477
21478
21479
21480
21481
21482
21483
21484
21485
21486
21487
21488
21489
ae0d7250 21490
3e0be4ab 21491
d7ad186c
GM
21492 if test $gl_cv_have_include_next = yes; then
21493 gl_cv_next_dirent_h='<'dirent.h'>'
21494 else
21495 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5
21496$as_echo_n "checking absolute name of <dirent.h>... " >&6; }
21497if test "${gl_cv_next_dirent_h+set}" = set; then :
21498 $as_echo_n "(cached) " >&6
21499else
3e0be4ab 21500
d7ad186c 21501 if test $ac_cv_header_dirent_h = yes; then
3bf26e96
GM
21502
21503
d7ad186c
GM
21504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21505/* end confdefs.h. */
21506#include <dirent.h>
3bf26e96 21507
3bf26e96 21508_ACEOF
d7ad186c
GM
21509 case "$host_os" in
21510 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21511 *) gl_absname_cpp="$ac_cpp" ;;
21512 esac
3bf26e96 21513
d7ad186c
GM
21514 case "$host_os" in
21515 mingw*)
21516 gl_dirsep_regex='[/\\]'
21517 ;;
21518 *)
21519 gl_dirsep_regex='\/'
21520 ;;
21521 esac
21522 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
3bf26e96 21523
d7ad186c
GM
21524 gl_header_literal_regex=`echo 'dirent.h' \
21525 | sed -e "$gl_make_literal_regex_sed"`
21526 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21527 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21528 s|^/[^/]|//&|
21529 p
21530 q
21531 }'
21532 gl_cv_next_dirent_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21533 sed -n "$gl_absolute_header_sed"`'"'
21534 else
21535 gl_cv_next_dirent_h='<'dirent.h'>'
21536 fi
3bf26e96 21537
3e0be4ab 21538
d7ad186c
GM
21539fi
21540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5
21541$as_echo "$gl_cv_next_dirent_h" >&6; }
21542 fi
21543 NEXT_DIRENT_H=$gl_cv_next_dirent_h
f199cab1 21544
d7ad186c
GM
21545 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21546 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21547 gl_next_as_first_directive='<'dirent.h'>'
21548 else
21549 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21550 gl_next_as_first_directive=$gl_cv_next_dirent_h
21551 fi
21552 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive
f199cab1 21553
3e0be4ab 21554
f199cab1 21555
f199cab1 21556
d7ad186c
GM
21557 if test $ac_cv_header_dirent_h = yes; then
21558 HAVE_DIRENT_H=1
21559 else
21560 HAVE_DIRENT_H=0
21561 fi
3e0be4ab 21562
f199cab1
GM
21563
21564
21565
5476a9a4
GM
21566
21567
21568
21569
21570
21571
5476a9a4
GM
21572$as_echo "#define HAVE_DUP2 1" >>confdefs.h
21573
21574
21575 if test $HAVE_DUP2 = 1; then
21576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
21577$as_echo_n "checking whether dup2 works... " >&6; }
21578if test "${gl_cv_func_dup2_works+set}" = set; then :
3e0be4ab
GM
21579 $as_echo_n "(cached) " >&6
21580else
5476a9a4
GM
21581 if test "$cross_compiling" = yes; then :
21582 case "$host_os" in
21583 mingw*) # on this platform, dup2 always returns 0 for success
21584 gl_cv_func_dup2_works="guessing no" ;;
21585 cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
21586 gl_cv_func_dup2_works="guessing no" ;;
21587 linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a
21588 # closed fd may yield -EBADF instead of -1 / errno=EBADF.
21589 gl_cv_func_dup2_works="guessing no" ;;
21590 freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF.
21591 gl_cv_func_dup2_works="guessing no" ;;
21592 haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
21593 gl_cv_func_dup2_works="guessing no" ;;
21594 *) gl_cv_func_dup2_works="guessing yes" ;;
21595 esac
21596else
21597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3e0be4ab 21598/* end confdefs.h. */
ae0d7250 21599
5476a9a4
GM
21600 #include <unistd.h>
21601#include <fcntl.h>
21602#include <errno.h>
3e0be4ab
GM
21603int
21604main ()
21605{
5476a9a4
GM
21606int result = 0;
21607#ifdef FD_CLOEXEC
21608 if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
21609 result |= 1;
21610#endif
21611 if (dup2 (1, 1) == 0)
21612 result |= 2;
21613#ifdef FD_CLOEXEC
21614 if (fcntl (1, F_GETFD) != FD_CLOEXEC)
21615 result |= 4;
21616#endif
21617 close (0);
21618 if (dup2 (0, 0) != -1)
21619 result |= 8;
21620 /* Many gnulib modules require POSIX conformance of EBADF. */
21621 if (dup2 (2, 1000000) == -1 && errno != EBADF)
21622 result |= 16;
0d1f53ad
GM
21623 /* Flush out a cygwin core dump. */
21624 if (dup2 (2, -1) != -1 || errno != EBADF)
21625 result |= 32;
5476a9a4
GM
21626 return result;
21627
ae0d7250
PE
21628 ;
21629 return 0;
21630}
5476a9a4 21631
ae0d7250 21632_ACEOF
5476a9a4
GM
21633if ac_fn_c_try_run "$LINENO"; then :
21634 gl_cv_func_dup2_works=yes
ae0d7250 21635else
5476a9a4 21636 gl_cv_func_dup2_works=no
ae0d7250 21637fi
5476a9a4
GM
21638rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21639 conftest.$ac_objext conftest.beam conftest.$ac_ext
ae0d7250 21640fi
5476a9a4
GM
21641
21642
3e0be4ab 21643fi
5476a9a4
GM
21644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
21645$as_echo "$gl_cv_func_dup2_works" >&6; }
21646 case "$gl_cv_func_dup2_works" in
21647 *yes) ;;
21648 *)
21649 REPLACE_DUP2=1
21650 ;;
21651 esac
21652 fi
3e0be4ab 21653
3e0be4ab 21654
a6342fc8 21655 if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
f199cab1 21656
f199cab1
GM
21657
21658
f199cab1 21659
f199cab1 21660
f199cab1 21661
f199cab1 21662
f199cab1 21663
5476a9a4 21664 gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
f199cab1
GM
21665
21666
a6342fc8 21667 fi
f199cab1 21668
f199cab1 21669
f199cab1 21670
f199cab1 21671
f199cab1 21672
5476a9a4 21673 GNULIB_DUP2=1
f199cab1
GM
21674
21675
f199cab1 21676
f199cab1 21677
3e0be4ab 21678
3e0be4ab 21679
f199cab1
GM
21680
21681
ae0d7250 21682
ae0d7250 21683
5476a9a4 21684
93131e11
GM
21685 GNULIB_ENVIRON=1
21686
21687
21688
21689
21690
21691
21692
21693
3a019ab4 21694
8966cbff
GM
21695 LIB_EXECINFO=''
21696 EXECINFO_H='execinfo.h'
21697
21698 if test $ac_cv_header_execinfo_h = yes; then
21699 gl_saved_libs=$LIBS
21700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing backtrace_symbols_fd" >&5
21701$as_echo_n "checking for library containing backtrace_symbols_fd... " >&6; }
21702if test "${ac_cv_search_backtrace_symbols_fd+set}" = set; then :
21703 $as_echo_n "(cached) " >&6
21704else
21705 ac_func_search_save_LIBS=$LIBS
21706cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21707/* end confdefs.h. */
21708
21709/* Override any GCC internal prototype to avoid an error.
21710 Use char because int might match the return type of a GCC
21711 builtin and then its argument prototype would still apply. */
21712#ifdef __cplusplus
21713extern "C"
21714#endif
21715char backtrace_symbols_fd ();
21716int
21717main ()
21718{
21719return backtrace_symbols_fd ();
21720 ;
21721 return 0;
21722}
21723_ACEOF
21724for ac_lib in '' execinfo; do
21725 if test -z "$ac_lib"; then
21726 ac_res="none required"
21727 else
21728 ac_res=-l$ac_lib
21729 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
21730 fi
21731 if ac_fn_c_try_link "$LINENO"; then :
21732 ac_cv_search_backtrace_symbols_fd=$ac_res
21733fi
21734rm -f core conftest.err conftest.$ac_objext \
21735 conftest$ac_exeext
21736 if test "${ac_cv_search_backtrace_symbols_fd+set}" = set; then :
21737 break
21738fi
21739done
21740if test "${ac_cv_search_backtrace_symbols_fd+set}" = set; then :
21741
21742else
21743 ac_cv_search_backtrace_symbols_fd=no
21744fi
21745rm conftest.$ac_ext
21746LIBS=$ac_func_search_save_LIBS
21747fi
21748{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_backtrace_symbols_fd" >&5
21749$as_echo "$ac_cv_search_backtrace_symbols_fd" >&6; }
21750ac_res=$ac_cv_search_backtrace_symbols_fd
21751if test "$ac_res" != no; then :
21752 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
21753 test "$ac_cv_search_backtrace_symbols_fd" = "none required" ||
21754 LIB_EXECINFO=$ac_cv_search_backtrace_symbols_fd
21755fi
21756
21757 LIBS=$gl_saved_libs
21758 test "$ac_cv_search_backtrace_symbols_fd" = no || EXECINFO_H=''
21759 fi
21760
21761 if test -n "$EXECINFO_H"; then
21762
21763
21764
21765
21766
21767
21768
21769
21770 gl_LIBOBJS="$gl_LIBOBJS execinfo.$ac_objext"
21771
21772 fi
21773
21774
21775
21776 if test -n "$EXECINFO_H"; then
21777 GL_GENERATE_EXECINFO_H_TRUE=
21778 GL_GENERATE_EXECINFO_H_FALSE='#'
21779else
21780 GL_GENERATE_EXECINFO_H_TRUE='#'
21781 GL_GENERATE_EXECINFO_H_FALSE=
21782fi
21783
21784
21785
21786
21787
93131e11
GM
21788
21789
21790
7cd2ed2c 21791
710f5812
GM
21792 if test $ac_cv_func_faccessat = no; then
21793 HAVE_FACCESSAT=0
21794 fi
21795
21796 if test $HAVE_FACCESSAT = 0; then
21797
21798
21799
21800
21801
21802
21803
21804
21805 gl_LIBOBJS="$gl_LIBOBJS faccessat.$ac_objext"
21806
21807
21808 for ac_func in access
21809do :
21810 ac_fn_c_check_func "$LINENO" "access" "ac_cv_func_access"
21811if test "x$ac_cv_func_access" = x""yes; then :
21812 cat >>confdefs.h <<_ACEOF
21813#define HAVE_ACCESS 1
21814_ACEOF
21815
21816fi
21817done
21818
21819
21820 fi
21821
21822
21823cat >>confdefs.h <<_ACEOF
21824#define GNULIB_FACCESSAT 1
21825_ACEOF
21826
21827
21828
21829
21830
21831
21832
21833 GNULIB_FACCESSAT=1
21834
21835
21836
21837
21838
21839
21840
21841
21842
21843
21844
21845
21846
21847
21848
21849
21850 if test $gl_cv_have_include_next = yes; then
21851 gl_cv_next_fcntl_h='<'fcntl.h'>'
21852 else
21853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
21854$as_echo_n "checking absolute name of <fcntl.h>... " >&6; }
21855if test "${gl_cv_next_fcntl_h+set}" = set; then :
21856 $as_echo_n "(cached) " >&6
21857else
21858
21859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21860/* end confdefs.h. */
21861#include <fcntl.h>
21862
21863_ACEOF
21864 case "$host_os" in
21865 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21866 *) gl_absname_cpp="$ac_cpp" ;;
21867 esac
21868
21869 case "$host_os" in
21870 mingw*)
21871 gl_dirsep_regex='[/\\]'
21872 ;;
21873 *)
21874 gl_dirsep_regex='\/'
21875 ;;
21876 esac
21877 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21878
21879 gl_header_literal_regex=`echo 'fcntl.h' \
21880 | sed -e "$gl_make_literal_regex_sed"`
21881 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21882 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21883 s|^/[^/]|//&|
21884 p
21885 q
21886 }'
21887 gl_cv_next_fcntl_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21888 sed -n "$gl_absolute_header_sed"`'"'
21889
21890
21891fi
21892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
21893$as_echo "$gl_cv_next_fcntl_h" >&6; }
21894 fi
21895 NEXT_FCNTL_H=$gl_cv_next_fcntl_h
21896
21897 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21898 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21899 gl_next_as_first_directive='<'fcntl.h'>'
21900 else
21901 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21902 gl_next_as_first_directive=$gl_cv_next_fcntl_h
21903 fi
21904 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
21905
21906
21907
21908
21909
21910
21911
21912
21913
21914
21915
21916
21917
21918
21919
2407788f
GM
21920 LIB_FDATASYNC=
21921
21922
21923 if test $ac_cv_have_decl_fdatasync = no; then
21924 HAVE_DECL_FDATASYNC=0
21925 for ac_func in fdatasync
21926do :
21927 ac_fn_c_check_func "$LINENO" "fdatasync" "ac_cv_func_fdatasync"
21928if test "x$ac_cv_func_fdatasync" = x""yes; then :
21929 cat >>confdefs.h <<_ACEOF
21930#define HAVE_FDATASYNC 1
21931_ACEOF
21932
21933fi
21934done
21935
21936 if test $ac_cv_func_fdatasync = no; then
21937 HAVE_FDATASYNC=0
21938 fi
21939 else
21940 gl_saved_libs=$LIBS
21941 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5
21942$as_echo_n "checking for library containing fdatasync... " >&6; }
21943if test "${ac_cv_search_fdatasync+set}" = set; then :
21944 $as_echo_n "(cached) " >&6
21945else
21946 ac_func_search_save_LIBS=$LIBS
21947cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21948/* end confdefs.h. */
21949
21950/* Override any GCC internal prototype to avoid an error.
21951 Use char because int might match the return type of a GCC
21952 builtin and then its argument prototype would still apply. */
21953#ifdef __cplusplus
21954extern "C"
21955#endif
21956char fdatasync ();
21957int
21958main ()
21959{
21960return fdatasync ();
21961 ;
21962 return 0;
21963}
21964_ACEOF
21965for ac_lib in '' rt posix4; do
21966 if test -z "$ac_lib"; then
21967 ac_res="none required"
21968 else
21969 ac_res=-l$ac_lib
21970 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
21971 fi
21972 if ac_fn_c_try_link "$LINENO"; then :
21973 ac_cv_search_fdatasync=$ac_res
21974fi
21975rm -f core conftest.err conftest.$ac_objext \
21976 conftest$ac_exeext
21977 if test "${ac_cv_search_fdatasync+set}" = set; then :
21978 break
21979fi
21980done
21981if test "${ac_cv_search_fdatasync+set}" = set; then :
21982
21983else
21984 ac_cv_search_fdatasync=no
21985fi
21986rm conftest.$ac_ext
21987LIBS=$ac_func_search_save_LIBS
21988fi
21989{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fdatasync" >&5
21990$as_echo "$ac_cv_search_fdatasync" >&6; }
21991ac_res=$ac_cv_search_fdatasync
21992if test "$ac_res" != no; then :
21993 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
21994 test "$ac_cv_search_fdatasync" = "none required" ||
21995 LIB_FDATASYNC=$ac_cv_search_fdatasync
21996fi
21997
21998 LIBS=$gl_saved_libs
21999 fi
22000
22001 if test $HAVE_FDATASYNC = 0; then
22002
22003
22004
22005
22006
22007
22008
22009
22010 gl_LIBOBJS="$gl_LIBOBJS fdatasync.$ac_objext"
22011
22012 fi
22013
22014
22015
22016
22017
22018 GNULIB_FDATASYNC=1
22019
22020
22021
22022
22023
22024
22025
22026
22027
710f5812 22028
d7ad186c
GM
22029 ac_fn_c_check_decl "$LINENO" "fdopendir" "ac_cv_have_decl_fdopendir" "
22030#include <dirent.h>
22031
22032"
22033if test "x$ac_cv_have_decl_fdopendir" = x""yes; then :
22034 ac_have_decl=1
22035else
22036 ac_have_decl=0
22037fi
22038
22039cat >>confdefs.h <<_ACEOF
22040#define HAVE_DECL_FDOPENDIR $ac_have_decl
22041_ACEOF
22042if test $ac_have_decl = 1; then :
22043
22044else
22045 HAVE_DECL_FDOPENDIR=0
22046fi
22047
22048
22049 if test $ac_cv_func_fdopendir = no; then
22050 HAVE_FDOPENDIR=0
22051 else
22052 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fdopendir works" >&5
22053$as_echo_n "checking whether fdopendir works... " >&6; }
22054if test "${gl_cv_func_fdopendir_works+set}" = set; then :
22055 $as_echo_n "(cached) " >&6
22056else
22057 if test "$cross_compiling" = yes; then :
22058 case "$host_os" in
22059 # Guess yes on glibc systems.
22060 *-gnu*) gl_cv_func_fdopendir_works="guessing yes" ;;
22061 # If we don't know, assume the worst.
22062 *) gl_cv_func_fdopendir_works="guessing no" ;;
22063 esac
22064
22065else
22066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22067/* end confdefs.h. */
22068
22069#include <dirent.h>
22070#include <fcntl.h>
22071#include <unistd.h>
22072#if !HAVE_DECL_FDOPENDIR
22073extern
22074# ifdef __cplusplus
22075"C"
22076# endif
22077DIR *fdopendir (int);
22078#endif
22079
22080int
22081main ()
22082{
22083int result = 0;
22084 int fd = open ("conftest.c", O_RDONLY);
22085 if (fd < 0) result |= 1;
22086 if (fdopendir (fd)) result |= 2;
22087 if (close (fd)) result |= 4;
22088 return result;
22089 ;
22090 return 0;
22091}
22092_ACEOF
22093if ac_fn_c_try_run "$LINENO"; then :
22094 gl_cv_func_fdopendir_works=yes
22095else
22096 gl_cv_func_fdopendir_works=no
22097fi
22098rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22099 conftest.$ac_objext conftest.beam conftest.$ac_ext
22100fi
22101
22102fi
22103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopendir_works" >&5
22104$as_echo "$gl_cv_func_fdopendir_works" >&6; }
22105 case "$gl_cv_func_fdopendir_works" in
22106 *yes) ;;
22107 *)
22108 REPLACE_FDOPENDIR=1
22109 ;;
22110 esac
22111 fi
22112
22113 if test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1; then
22114
22115
22116
22117
22118
22119
22120
22121
22122 gl_LIBOBJS="$gl_LIBOBJS fdopendir.$ac_objext"
22123
22124 fi
22125
22126
22127
22128
22129
22130 GNULIB_FDOPENDIR=1
22131
22132
22133
22134
22135
22136
22137
22138cat >>confdefs.h <<_ACEOF
22139#define GNULIB_FDOPENDIR 1
22140_ACEOF
22141
22142
22143
22144
22145
22146
22147
710f5812 22148
3bf26e96
GM
22149
22150 fp_headers='
22151# include <stdio.h>
22152# if HAVE_STDIO_EXT_H
22153# include <stdio_ext.h>
22154# endif
22155'
22156 ac_fn_c_check_decl "$LINENO" "__fpending" "ac_cv_have_decl___fpending" "$fp_headers
22157"
22158if test "x$ac_cv_have_decl___fpending" = x""yes; then :
22159 ac_have_decl=1
22160else
22161 ac_have_decl=0
22162fi
22163
22164cat >>confdefs.h <<_ACEOF
22165#define HAVE_DECL___FPENDING $ac_have_decl
22166_ACEOF
22167
22168
22169 if test $ac_cv_func___fpending = no; then
22170
22171
22172
22173
22174
22175
22176
22177
22178 gl_LIBOBJS="$gl_LIBOBJS fpending.$ac_objext"
22179
22180
22181 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to determine the number of pending output bytes on a stream" >&5
22182$as_echo_n "checking how to determine the number of pending output bytes on a stream... " >&6; }
22183if test "${ac_cv_sys_pending_output_n_bytes+set}" = set; then :
22184 $as_echo_n "(cached) " >&6
22185else
22186
22187 for ac_expr in \
22188 \
22189 '# glibc2' \
22190 'fp->_IO_write_ptr - fp->_IO_write_base' \
22191 \
22192 '# traditional Unix' \
22193 'fp->_ptr - fp->_base' \
22194 \
22195 '# BSD' \
22196 'fp->_p - fp->_bf._base' \
22197 \
22198 '# SCO, Unixware' \
22199 '(fp->__ptr ? fp->__ptr - fp->__base : 0)' \
22200 \
22201 '# QNX' \
22202 '(fp->_Mode & 0x2000 /*_MWRITE*/ ? fp->_Next - fp->_Buf : 0)' \
22203 \
22204 '# old glibc?' \
22205 'fp->__bufp - fp->__buffer' \
22206 \
22207 '# old glibc iostream?' \
22208 'fp->_pptr - fp->_pbase' \
22209 \
22210 '# emx+gcc' \
22211 'fp->_ptr - fp->_buffer' \
22212 \
22213 '# Minix' \
22214 'fp->_ptr - fp->_buf' \
22215 \
22216 '# Plan9' \
22217 'fp->wp - fp->buf' \
22218 \
22219 '# VMS' \
22220 '(*fp)->_ptr - (*fp)->_base' \
22221 \
22222 '# e.g., DGUX R4.11; the info is not available' \
22223 1 \
22224 ; do
22225
22226 # Skip each embedded comment.
22227 case "$ac_expr" in '#'*) continue;; esac
22228
22229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22230/* end confdefs.h. */
22231#include <stdio.h>
22232int
22233main ()
22234{
22235FILE *fp = stdin; (void) ($ac_expr);
22236 ;
22237 return 0;
22238}
22239_ACEOF
22240if ac_fn_c_try_compile "$LINENO"; then :
22241 fp_done=yes
22242
22243fi
22244rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22245 test "$fp_done" = yes && break
22246 done
22247
22248 ac_cv_sys_pending_output_n_bytes=$ac_expr
22249
22250
22251fi
22252{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_pending_output_n_bytes" >&5
22253$as_echo "$ac_cv_sys_pending_output_n_bytes" >&6; }
22254
22255cat >>confdefs.h <<_ACEOF
22256#define PENDING_OUTPUT_N_BYTES $ac_cv_sys_pending_output_n_bytes
22257_ACEOF
22258
22259
22260 fi
22261
22262
d7ad186c
GM
22263
22264
22265
22266
22267 if test $ac_cv_func_fstatat = no; then
22268 HAVE_FSTATAT=0
22269 else
22270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fstatat (..., 0) works" >&5
22271$as_echo_n "checking whether fstatat (..., 0) works... " >&6; }
22272if test "${gl_cv_func_fstatat_zero_flag+set}" = set; then :
22273 $as_echo_n "(cached) " >&6
22274else
22275 if test "$cross_compiling" = yes; then :
22276 case "$host_os" in
22277 aix*) gl_cv_func_fstatat_zero_flag="guessing no";;
22278 *) gl_cv_func_fstatat_zero_flag="guessing yes";;
22279 esac
22280
22281else
22282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22283/* end confdefs.h. */
22284
22285 #include <fcntl.h>
22286 #include <sys/stat.h>
22287 int
22288 main (void)
22289 {
22290 struct stat a;
22291 return fstatat (AT_FDCWD, ".", &a, 0) != 0;
22292 }
22293
22294_ACEOF
22295if ac_fn_c_try_run "$LINENO"; then :
22296 gl_cv_func_fstatat_zero_flag=yes
22297else
22298 gl_cv_func_fstatat_zero_flag=no
22299fi
22300rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22301 conftest.$ac_objext conftest.beam conftest.$ac_ext
22302fi
22303
22304
22305fi
22306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fstatat_zero_flag" >&5
22307$as_echo "$gl_cv_func_fstatat_zero_flag" >&6; }
22308
22309 case $gl_cv_func_fstatat_zero_flag+$gl_cv_func_lstat_dereferences_slashed_symlink in
22310 *yes+*yes) ;;
22311 *) REPLACE_FSTATAT=1
22312 case $gl_cv_func_fstatat_zero_flag in
22313 *yes)
22314
22315$as_echo "#define HAVE_WORKING_FSTATAT_ZERO_FLAG 1" >>confdefs.h
22316
22317 ;;
22318 esac
22319 ;;
22320 esac
22321 fi
22322
22323 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
22324
22325
22326
22327
22328
22329
22330
22331
22332 gl_LIBOBJS="$gl_LIBOBJS fstatat.$ac_objext"
22333
22334 fi
22335
22336
22337
22338
22339
22340 GNULIB_FSTATAT=1
22341
22342
22343
22344
22345
22346
22347
2407788f
GM
22348
22349 if test $ac_cv_func_fsync = no; then
22350 HAVE_FSYNC=0
22351 fi
22352
22353 if test $HAVE_FSYNC = 0; then
22354
22355
22356
22357
22358
22359
22360
22361
22362 gl_LIBOBJS="$gl_LIBOBJS fsync.$ac_objext"
22363
22364 :
22365 fi
22366
22367
22368
22369
22370
22371 GNULIB_FSYNC=1
22372
22373
22374
22375
22376
22377
22378
5476a9a4
GM
22379# Persuade glibc <stdlib.h> to declare getloadavg().
22380
22381
22382gl_save_LIBS=$LIBS
22383
22384# getloadvg is present in libc on glibc >= 2.2, Mac OS X, FreeBSD >= 2.0,
22385# NetBSD >= 0.9, OpenBSD >= 2.0, Solaris >= 7.
22386HAVE_GETLOADAVG=1
22387ac_fn_c_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg"
22388if test "x$ac_cv_func_getloadavg" = x""yes; then :
22389
22390else
22391 gl_func_getloadavg_done=no
22392
22393 # Some systems with -lutil have (and need) -lkvm as well, some do not.
22394 # On Solaris, -lkvm requires nlist from -lelf, so check that first
22395 # to get the right answer into the cache.
22396 # For kstat on solaris, we need to test for libelf and libkvm to force the
22397 # definition of SVR4 below.
22398 if test $gl_func_getloadavg_done = no; then
22399 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_begin in -lelf" >&5
22400$as_echo_n "checking for elf_begin in -lelf... " >&6; }
22401if test "${ac_cv_lib_elf_elf_begin+set}" = set; then :
6ad6792b
GM
22402 $as_echo_n "(cached) " >&6
22403else
3e0be4ab 22404 ac_check_lib_save_LIBS=$LIBS
5476a9a4 22405LIBS="-lelf $LIBS"
3e0be4ab 22406cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6ad6792b 22407/* end confdefs.h. */
6ad6792b 22408
3e0be4ab
GM
22409/* Override any GCC internal prototype to avoid an error.
22410 Use char because int might match the return type of a GCC
22411 builtin and then its argument prototype would still apply. */
22412#ifdef __cplusplus
22413extern "C"
22414#endif
5476a9a4 22415char elf_begin ();
6ad6792b
GM
22416int
22417main ()
22418{
5476a9a4 22419return elf_begin ();
6ad6792b
GM
22420 ;
22421 return 0;
22422}
22423_ACEOF
3e0be4ab 22424if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 22425 ac_cv_lib_elf_elf_begin=yes
3e0be4ab 22426else
5476a9a4 22427 ac_cv_lib_elf_elf_begin=no
6ad6792b 22428fi
3e0be4ab
GM
22429rm -f core conftest.err conftest.$ac_objext \
22430 conftest$ac_exeext conftest.$ac_ext
22431LIBS=$ac_check_lib_save_LIBS
6ad6792b 22432fi
5476a9a4
GM
22433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_elf_elf_begin" >&5
22434$as_echo "$ac_cv_lib_elf_elf_begin" >&6; }
22435if test "x$ac_cv_lib_elf_elf_begin" = x""yes; then :
22436 LIBS="-lelf $LIBS"
6ad6792b
GM
22437fi
22438
5476a9a4
GM
22439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kvm_open in -lkvm" >&5
22440$as_echo_n "checking for kvm_open in -lkvm... " >&6; }
22441if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then :
6c051bab
GM
22442 $as_echo_n "(cached) " >&6
22443else
5476a9a4
GM
22444 ac_check_lib_save_LIBS=$LIBS
22445LIBS="-lkvm $LIBS"
22446cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c051bab 22447/* end confdefs.h. */
3e0be4ab 22448
5476a9a4
GM
22449/* Override any GCC internal prototype to avoid an error.
22450 Use char because int might match the return type of a GCC
22451 builtin and then its argument prototype would still apply. */
22452#ifdef __cplusplus
22453extern "C"
22454#endif
22455char kvm_open ();
6c051bab
GM
22456int
22457main ()
22458{
5476a9a4 22459return kvm_open ();
6c051bab
GM
22460 ;
22461 return 0;
22462}
22463_ACEOF
3e0be4ab 22464if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 22465 ac_cv_lib_kvm_kvm_open=yes
6c051bab 22466else
5476a9a4 22467 ac_cv_lib_kvm_kvm_open=no
6c051bab 22468fi
3e0be4ab
GM
22469rm -f core conftest.err conftest.$ac_objext \
22470 conftest$ac_exeext conftest.$ac_ext
5476a9a4 22471LIBS=$ac_check_lib_save_LIBS
6c051bab 22472fi
5476a9a4
GM
22473{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kvm_kvm_open" >&5
22474$as_echo "$ac_cv_lib_kvm_kvm_open" >&6; }
22475if test "x$ac_cv_lib_kvm_kvm_open" = x""yes; then :
22476 LIBS="-lkvm $LIBS"
3e0be4ab 22477fi
6c051bab 22478
5476a9a4
GM
22479 # Check for the 4.4BSD definition of getloadavg.
22480 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lutil" >&5
22481$as_echo_n "checking for getloadavg in -lutil... " >&6; }
22482if test "${ac_cv_lib_util_getloadavg+set}" = set; then :
ae0d7250
PE
22483 $as_echo_n "(cached) " >&6
22484else
5476a9a4
GM
22485 ac_check_lib_save_LIBS=$LIBS
22486LIBS="-lutil $LIBS"
22487cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6d153f56 22488/* end confdefs.h. */
5476a9a4
GM
22489
22490/* Override any GCC internal prototype to avoid an error.
22491 Use char because int might match the return type of a GCC
22492 builtin and then its argument prototype would still apply. */
22493#ifdef __cplusplus
22494extern "C"
22495#endif
22496char getloadavg ();
ae0d7250
PE
22497int
22498main ()
22499{
5476a9a4 22500return getloadavg ();
ae0d7250
PE
22501 ;
22502 return 0;
22503}
22504_ACEOF
3e0be4ab 22505if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 22506 ac_cv_lib_util_getloadavg=yes
ae0d7250 22507else
5476a9a4 22508 ac_cv_lib_util_getloadavg=no
ae0d7250 22509fi
3e0be4ab
GM
22510rm -f core conftest.err conftest.$ac_objext \
22511 conftest$ac_exeext conftest.$ac_ext
5476a9a4
GM
22512LIBS=$ac_check_lib_save_LIBS
22513fi
22514{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_getloadavg" >&5
22515$as_echo "$ac_cv_lib_util_getloadavg" >&6; }
22516if test "x$ac_cv_lib_util_getloadavg" = x""yes; then :
22517 LIBS="-lutil $LIBS" gl_func_getloadavg_done=yes
3e0be4ab 22518fi
6d153f56 22519
5476a9a4 22520 fi
6d153f56 22521
5476a9a4
GM
22522 if test $gl_func_getloadavg_done = no; then
22523 # There is a commonly available library for RS/6000 AIX.
22524 # Since it is not a standard part of AIX, it might be installed locally.
22525 gl_getloadavg_LIBS=$LIBS
22526 LIBS="-L/usr/local/lib $LIBS"
22527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lgetloadavg" >&5
22528$as_echo_n "checking for getloadavg in -lgetloadavg... " >&6; }
22529if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then :
f199cab1 22530 $as_echo_n "(cached) " >&6
3e0be4ab 22531else
f199cab1 22532 ac_check_lib_save_LIBS=$LIBS
5476a9a4 22533LIBS="-lgetloadavg $LIBS"
f199cab1
GM
22534cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22535/* end confdefs.h. */
3e0be4ab 22536
f199cab1
GM
22537/* Override any GCC internal prototype to avoid an error.
22538 Use char because int might match the return type of a GCC
22539 builtin and then its argument prototype would still apply. */
22540#ifdef __cplusplus
22541extern "C"
22542#endif
5476a9a4 22543char getloadavg ();
f199cab1
GM
22544int
22545main ()
22546{
5476a9a4 22547return getloadavg ();
f199cab1
GM
22548 ;
22549 return 0;
22550}
ae0d7250 22551_ACEOF
f199cab1 22552if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 22553 ac_cv_lib_getloadavg_getloadavg=yes
f199cab1 22554else
5476a9a4 22555 ac_cv_lib_getloadavg_getloadavg=no
ae0d7250 22556fi
f199cab1
GM
22557rm -f core conftest.err conftest.$ac_objext \
22558 conftest$ac_exeext conftest.$ac_ext
22559LIBS=$ac_check_lib_save_LIBS
3e0be4ab 22560fi
5476a9a4
GM
22561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_getloadavg_getloadavg" >&5
22562$as_echo "$ac_cv_lib_getloadavg_getloadavg" >&6; }
22563if test "x$ac_cv_lib_getloadavg_getloadavg" = x""yes; then :
22564 LIBS="-lgetloadavg $LIBS" gl_func_getloadavg_done=yes
22565else
22566 LIBS=$gl_getloadavg_LIBS
6d153f56 22567fi
ae0d7250 22568
5476a9a4 22569 fi
16c3e636 22570
5476a9a4
GM
22571 # Set up the replacement function if necessary.
22572 if test $gl_func_getloadavg_done = no; then
22573 HAVE_GETLOADAVG=0
16c3e636 22574
5476a9a4
GM
22575 # Solaris has libkstat which does not require root.
22576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kstat_open in -lkstat" >&5
22577$as_echo_n "checking for kstat_open in -lkstat... " >&6; }
22578if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then :
f199cab1
GM
22579 $as_echo_n "(cached) " >&6
22580else
22581 ac_check_lib_save_LIBS=$LIBS
5476a9a4 22582LIBS="-lkstat $LIBS"
f199cab1
GM
22583cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22584/* end confdefs.h. */
5f90be1b 22585
f199cab1
GM
22586/* Override any GCC internal prototype to avoid an error.
22587 Use char because int might match the return type of a GCC
22588 builtin and then its argument prototype would still apply. */
22589#ifdef __cplusplus
22590extern "C"
22591#endif
5476a9a4 22592char kstat_open ();
f199cab1
GM
22593int
22594main ()
22595{
5476a9a4 22596return kstat_open ();
f199cab1
GM
22597 ;
22598 return 0;
22599}
3e0be4ab 22600_ACEOF
f199cab1 22601if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 22602 ac_cv_lib_kstat_kstat_open=yes
f199cab1 22603else
5476a9a4 22604 ac_cv_lib_kstat_kstat_open=no
5f90be1b 22605fi
f199cab1
GM
22606rm -f core conftest.err conftest.$ac_objext \
22607 conftest$ac_exeext conftest.$ac_ext
22608LIBS=$ac_check_lib_save_LIBS
3e0be4ab 22609fi
5476a9a4
GM
22610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kstat_kstat_open" >&5
22611$as_echo "$ac_cv_lib_kstat_kstat_open" >&6; }
22612if test "x$ac_cv_lib_kstat_kstat_open" = x""yes; then :
3e0be4ab 22613 cat >>confdefs.h <<_ACEOF
5476a9a4 22614#define HAVE_LIBKSTAT 1
3e0be4ab 22615_ACEOF
5f90be1b 22616
5476a9a4 22617 LIBS="-lkstat $LIBS"
5f90be1b 22618
f199cab1 22619fi
5f90be1b 22620
5476a9a4 22621 test $ac_cv_lib_kstat_kstat_open = yes && gl_func_getloadavg_done=yes
da6c8463 22622
5476a9a4
GM
22623 # AIX has libperfstat which does not require root
22624 if test $gl_func_getloadavg_done = no; then
22625 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for perfstat_cpu_total in -lperfstat" >&5
22626$as_echo_n "checking for perfstat_cpu_total in -lperfstat... " >&6; }
22627if test "${ac_cv_lib_perfstat_perfstat_cpu_total+set}" = set; then :
f199cab1
GM
22628 $as_echo_n "(cached) " >&6
22629else
5476a9a4
GM
22630 ac_check_lib_save_LIBS=$LIBS
22631LIBS="-lperfstat $LIBS"
22632cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5f90be1b 22633/* end confdefs.h. */
5476a9a4
GM
22634
22635/* Override any GCC internal prototype to avoid an error.
22636 Use char because int might match the return type of a GCC
22637 builtin and then its argument prototype would still apply. */
22638#ifdef __cplusplus
22639extern "C"
22640#endif
22641char perfstat_cpu_total ();
5f90be1b
PE
22642int
22643main ()
22644{
5476a9a4 22645return perfstat_cpu_total ();
5f90be1b
PE
22646 ;
22647 return 0;
22648}
22649_ACEOF
5476a9a4
GM
22650if ac_fn_c_try_link "$LINENO"; then :
22651 ac_cv_lib_perfstat_perfstat_cpu_total=yes
f199cab1 22652else
5476a9a4 22653 ac_cv_lib_perfstat_perfstat_cpu_total=no
f199cab1 22654fi
5476a9a4
GM
22655rm -f core conftest.err conftest.$ac_objext \
22656 conftest$ac_exeext conftest.$ac_ext
22657LIBS=$ac_check_lib_save_LIBS
f199cab1 22658fi
5476a9a4
GM
22659{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_perfstat_perfstat_cpu_total" >&5
22660$as_echo "$ac_cv_lib_perfstat_perfstat_cpu_total" >&6; }
22661if test "x$ac_cv_lib_perfstat_perfstat_cpu_total" = x""yes; then :
22662 cat >>confdefs.h <<_ACEOF
22663#define HAVE_LIBPERFSTAT 1
22664_ACEOF
22665
22666 LIBS="-lperfstat $LIBS"
22667
22668fi
22669
22670 test $ac_cv_lib_perfstat_perfstat_cpu_total = yes && gl_func_getloadavg_done=yes
22671 fi
22672
22673 if test $gl_func_getloadavg_done = no; then
22674 ac_fn_c_check_header_mongrel "$LINENO" "sys/dg_sys_info.h" "ac_cv_header_sys_dg_sys_info_h" "$ac_includes_default"
22675if test "x$ac_cv_header_sys_dg_sys_info_h" = x""yes; then :
22676 gl_func_getloadavg_done=yes
22677
22678$as_echo "#define DGUX 1" >>confdefs.h
22679
22680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dg_sys_info in -ldgc" >&5
22681$as_echo_n "checking for dg_sys_info in -ldgc... " >&6; }
22682if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then :
f199cab1
GM
22683 $as_echo_n "(cached) " >&6
22684else
22685 ac_check_lib_save_LIBS=$LIBS
5476a9a4 22686LIBS="-ldgc $LIBS"
f199cab1
GM
22687cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22688/* end confdefs.h. */
3e0be4ab 22689
f199cab1
GM
22690/* Override any GCC internal prototype to avoid an error.
22691 Use char because int might match the return type of a GCC
22692 builtin and then its argument prototype would still apply. */
22693#ifdef __cplusplus
22694extern "C"
22695#endif
5476a9a4 22696char dg_sys_info ();
f199cab1
GM
22697int
22698main ()
22699{
5476a9a4 22700return dg_sys_info ();
f199cab1
GM
22701 ;
22702 return 0;
22703}
22704_ACEOF
22705if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 22706 ac_cv_lib_dgc_dg_sys_info=yes
f199cab1 22707else
5476a9a4 22708 ac_cv_lib_dgc_dg_sys_info=no
5f90be1b 22709fi
3e0be4ab
GM
22710rm -f core conftest.err conftest.$ac_objext \
22711 conftest$ac_exeext conftest.$ac_ext
f199cab1 22712LIBS=$ac_check_lib_save_LIBS
5f90be1b 22713fi
5476a9a4
GM
22714{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dgc_dg_sys_info" >&5
22715$as_echo "$ac_cv_lib_dgc_dg_sys_info" >&6; }
22716if test "x$ac_cv_lib_dgc_dg_sys_info" = x""yes; then :
22717 cat >>confdefs.h <<_ACEOF
22718#define HAVE_LIBDGC 1
22719_ACEOF
22720
22721 LIBS="-ldgc $LIBS"
22722
da6c8463
GM
22723fi
22724
5476a9a4
GM
22725fi
22726
22727
22728 fi
22729 fi
22730fi
22731
22732
22733if test "x$gl_save_LIBS" = x; then
22734 GETLOADAVG_LIBS=$LIBS
f199cab1 22735else
5476a9a4
GM
22736 GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$gl_save_LIBS!!"`
22737fi
22738LIBS=$gl_save_LIBS
22739
22740
22741# Test whether the system declares getloadavg. Solaris has the function
22742# but declares it in <sys/loadavg.h>, not <stdlib.h>.
22743for ac_header in sys/loadavg.h
22744do :
22745 ac_fn_c_check_header_mongrel "$LINENO" "sys/loadavg.h" "ac_cv_header_sys_loadavg_h" "$ac_includes_default"
22746if test "x$ac_cv_header_sys_loadavg_h" = x""yes; then :
22747 cat >>confdefs.h <<_ACEOF
22748#define HAVE_SYS_LOADAVG_H 1
f199cab1 22749_ACEOF
5476a9a4 22750
f199cab1 22751fi
5476a9a4
GM
22752
22753done
22754
22755if test $ac_cv_header_sys_loadavg_h = yes; then
22756 HAVE_SYS_LOADAVG_H=1
22757else
22758 HAVE_SYS_LOADAVG_H=0
f199cab1 22759fi
5476a9a4
GM
22760ac_fn_c_check_decl "$LINENO" "getloadavg" "ac_cv_have_decl_getloadavg" "#if HAVE_SYS_LOADAVG_H
22761 # include <sys/loadavg.h>
22762 #endif
22763 #include <stdlib.h>
22764"
22765if test "x$ac_cv_have_decl_getloadavg" = x""yes; then :
5f90be1b 22766
f199cab1 22767else
5476a9a4 22768 HAVE_DECL_GETLOADAVG=0
f199cab1 22769fi
5f90be1b 22770
5f90be1b 22771
a6342fc8 22772 if test $HAVE_GETLOADAVG = 0; then
5476a9a4
GM
22773
22774
22775
22776
22777
22778
22779
22780
22781 gl_LIBOBJS="$gl_LIBOBJS getloadavg.$ac_objext"
22782
22783
22784# Figure out what our getloadavg.c needs.
22785
22786
22787
22788# On HPUX9, an unprivileged user can get load averages this way.
22789if test $gl_func_getloadavg_done = no; then
22790 for ac_func in pstat_getdynamic
22791do :
22792 ac_fn_c_check_func "$LINENO" "pstat_getdynamic" "ac_cv_func_pstat_getdynamic"
22793if test "x$ac_cv_func_pstat_getdynamic" = x""yes; then :
22794 cat >>confdefs.h <<_ACEOF
22795#define HAVE_PSTAT_GETDYNAMIC 1
22796_ACEOF
22797 gl_func_getloadavg_done=yes
3e0be4ab 22798fi
5476a9a4 22799done
6ad6792b 22800
5476a9a4 22801fi
6ad6792b 22802
5476a9a4
GM
22803# We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
22804# uses stabs), but it is still SVR4. We cannot check for <elf.h> because
22805# Irix 4.0.5F has the header but not the library.
22806if test $gl_func_getloadavg_done = no && test "$ac_cv_lib_elf_elf_begin" = yes \
22807 && test "$ac_cv_lib_kvm_kvm_open" = yes; then
22808 gl_func_getloadavg_done=yes
6ad6792b 22809
5476a9a4 22810$as_echo "#define SVR4 1" >>confdefs.h
6ad6792b 22811
5476a9a4
GM
22812fi
22813
22814if test $gl_func_getloadavg_done = no; then
22815 ac_fn_c_check_header_mongrel "$LINENO" "inq_stats/cpustats.h" "ac_cv_header_inq_stats_cpustats_h" "$ac_includes_default"
22816if test "x$ac_cv_header_inq_stats_cpustats_h" = x""yes; then :
22817 gl_func_getloadavg_done=yes
22818
22819$as_echo "#define UMAX 1" >>confdefs.h
22820
22821
22822$as_echo "#define UMAX4_3 1" >>confdefs.h
22823
22824fi
22825
22826
22827fi
22828
22829if test $gl_func_getloadavg_done = no; then
22830 ac_fn_c_check_header_mongrel "$LINENO" "sys/cpustats.h" "ac_cv_header_sys_cpustats_h" "$ac_includes_default"
22831if test "x$ac_cv_header_sys_cpustats_h" = x""yes; then :
22832 gl_func_getloadavg_done=yes; $as_echo "#define UMAX 1" >>confdefs.h
22833
22834fi
22835
22836
22837fi
22838
22839if test $gl_func_getloadavg_done = no; then
22840 for ac_header in mach/mach.h
22841do :
22842 ac_fn_c_check_header_mongrel "$LINENO" "mach/mach.h" "ac_cv_header_mach_mach_h" "$ac_includes_default"
22843if test "x$ac_cv_header_mach_mach_h" = x""yes; then :
22844 cat >>confdefs.h <<_ACEOF
22845#define HAVE_MACH_MACH_H 1
22846_ACEOF
22847
22848fi
22849
22850done
22851
22852fi
22853
22854for ac_header in nlist.h
22855do :
22856 ac_fn_c_check_header_mongrel "$LINENO" "nlist.h" "ac_cv_header_nlist_h" "$ac_includes_default"
22857if test "x$ac_cv_header_nlist_h" = x""yes; then :
22858 cat >>confdefs.h <<_ACEOF
22859#define HAVE_NLIST_H 1
22860_ACEOF
22861 ac_fn_c_check_member "$LINENO" "struct nlist" "n_un.n_name" "ac_cv_member_struct_nlist_n_un_n_name" "#include <nlist.h>
22862"
22863if test "x$ac_cv_member_struct_nlist_n_un_n_name" = x""yes; then :
22864
22865cat >>confdefs.h <<_ACEOF
22866#define HAVE_STRUCT_NLIST_N_UN_N_NAME 1
22867_ACEOF
6ad6792b 22868
0eb775a3 22869
f199cab1 22870fi
3e0be4ab 22871
5476a9a4 22872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 22873/* end confdefs.h. */
5476a9a4 22874#include <nlist.h>
f199cab1
GM
22875int
22876main ()
22877{
5476a9a4
GM
22878struct nlist x;
22879 #ifdef HAVE_STRUCT_NLIST_N_UN_N_NAME
22880 x.n_un.n_name = "";
22881 #else
22882 x.n_name = "";
22883 #endif
f199cab1
GM
22884 ;
22885 return 0;
22886}
22887_ACEOF
5476a9a4 22888if ac_fn_c_try_link "$LINENO"; then :
6ad6792b 22889
5476a9a4 22890$as_echo "#define N_NAME_POINTER 1" >>confdefs.h
6ad6792b
GM
22891
22892fi
5476a9a4
GM
22893rm -f core conftest.err conftest.$ac_objext \
22894 conftest$ac_exeext conftest.$ac_ext
6ad6792b 22895
5476a9a4 22896fi
6ad6792b 22897
5476a9a4 22898done
6ad6792b 22899
a6342fc8 22900 fi
ca36e0ff 22901
ca36e0ff
GM
22902
22903
1f5d53eb
PE
22904
22905
5476a9a4 22906 GNULIB_GETLOADAVG=1
1f5d53eb
PE
22907
22908
22909
22910
22911
22912
22913
1f5d53eb 22914
1f5d53eb 22915
3e0be4ab 22916
a6342fc8 22917 if test $REPLACE_GETOPT = 1; then
3e0be4ab 22918
1f5d53eb
PE
22919
22920
1f5d53eb 22921
1f5d53eb
PE
22922
22923
22924
22925
5476a9a4 22926 gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
0eb775a3
GM
22927
22928
1f5d53eb
PE
22929
22930
16c3e636 22931
5476a9a4
GM
22932
22933
22934
22935
22936 gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
22937
22938
22939
22940
a6342fc8
GM
22941 GNULIB_GL_UNISTD_H_GETOPT=1
22942 fi
16c3e636
PE
22943
22944
22945
4fda9c95
GM
22946
22947
22948
22949
5476a9a4
GM
22950 REPLACE_GETOPT=0
22951 if test -n "$gl_replace_getopt"; then
22952 REPLACE_GETOPT=1
22953 fi
22954
22955 if test $REPLACE_GETOPT = 1; then
22956
22957 GETOPT_H=getopt.h
22958
22959$as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
22960
22961
22962
22963 fi
22964
a6342fc8 22965 if test $REPLACE_GETOPT = 1; then
5476a9a4
GM
22966
22967
22968
22969
22970
22971
22972
22973
22974 gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
22975
22976
22977
22978
22979
22980
22981
22982
22983
22984 gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
4fda9c95
GM
22985
22986
22987
22988
a6342fc8
GM
22989 GNULIB_GL_UNISTD_H_GETOPT=1
22990 fi
4fda9c95
GM
22991
22992
22993
22994
4fda9c95 22995
4fda9c95 22996
4fda9c95 22997
5476a9a4
GM
22998
22999
23000
23001
23002
23003 gl_gettimeofday_timezone=void
23004 if test $ac_cv_func_gettimeofday != yes; then
23005 HAVE_GETTIMEOFDAY=0
f199cab1 23006 else
4fda9c95
GM
23007
23008
3e0be4ab 23009
5476a9a4
GM
23010 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5
23011$as_echo_n "checking whether gettimeofday clobbers localtime buffer... " >&6; }
23012if test "${gl_cv_func_gettimeofday_clobber+set}" = set; then :
23013 $as_echo_n "(cached) " >&6
23014else
23015 if test "$cross_compiling" = yes; then :
23016 # When cross-compiling:
23017 case "$host_os" in
23018 # Guess all is fine on glibc systems.
23019 *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
23020 # If we don't know, assume the worst.
23021 *) gl_cv_func_gettimeofday_clobber="guessing yes" ;;
23022 esac
4fda9c95 23023
5476a9a4
GM
23024else
23025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23026/* end confdefs.h. */
23027#include <string.h>
23028 #include <sys/time.h>
23029 #include <time.h>
23030 #include <stdlib.h>
4fda9c95 23031
5476a9a4
GM
23032int
23033main ()
23034{
4fda9c95 23035
5476a9a4
GM
23036 time_t t = 0;
23037 struct tm *lt;
23038 struct tm saved_lt;
23039 struct timeval tv;
23040 lt = localtime (&t);
23041 saved_lt = *lt;
23042 gettimeofday (&tv, NULL);
23043 return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
cc322c06 23044
5476a9a4
GM
23045 ;
23046 return 0;
23047}
23048_ACEOF
23049if ac_fn_c_try_run "$LINENO"; then :
23050 gl_cv_func_gettimeofday_clobber=no
23051else
23052 gl_cv_func_gettimeofday_clobber=yes
23053fi
23054rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23055 conftest.$ac_objext conftest.beam conftest.$ac_ext
23056fi
cc322c06 23057
5476a9a4
GM
23058fi
23059{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5
23060$as_echo "$gl_cv_func_gettimeofday_clobber" >&6; }
cc322c06 23061
5476a9a4
GM
23062 case "$gl_cv_func_gettimeofday_clobber" in
23063 *yes)
23064 REPLACE_GETTIMEOFDAY=1
cc322c06 23065
4fda9c95 23066
5476a9a4 23067$as_echo "#define gmtime rpl_gmtime" >>confdefs.h
4fda9c95 23068
ae0d7250 23069
5476a9a4 23070$as_echo "#define localtime rpl_localtime" >>confdefs.h
ae0d7250
PE
23071
23072
ae0d7250 23073
5476a9a4
GM
23074$as_echo "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h
23075
23076 ;;
23077 esac
23078
23079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
23080$as_echo_n "checking for gettimeofday with POSIX signature... " >&6; }
23081if test "${gl_cv_func_gettimeofday_posix_signature+set}" = set; then :
f199cab1
GM
23082 $as_echo_n "(cached) " >&6
23083else
5476a9a4
GM
23084 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23085/* end confdefs.h. */
23086#include <sys/time.h>
23087 struct timeval c;
23088 int gettimeofday (struct timeval *restrict, void *restrict);
23089
23090int
23091main ()
23092{
23093/* glibc uses struct timezone * rather than the POSIX void *
23094 if _GNU_SOURCE is defined. However, since the only portable
23095 use of gettimeofday uses NULL as the second parameter, and
23096 since the glibc definition is actually more typesafe, it is
23097 not worth wrapping this to get a compliant signature. */
23098 int (*f) (struct timeval *restrict, void *restrict)
23099 = gettimeofday;
23100 int x = f (&c, 0);
23101 return !(x | c.tv_sec | c.tv_usec);
23102
23103 ;
23104 return 0;
23105}
23106_ACEOF
23107if ac_fn_c_try_compile "$LINENO"; then :
23108 gl_cv_func_gettimeofday_posix_signature=yes
23109else
23110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 23111/* end confdefs.h. */
5476a9a4
GM
23112#include <sys/time.h>
23113int gettimeofday (struct timeval *restrict, struct timezone *restrict);
ae0d7250 23114
f199cab1
GM
23115int
23116main ()
23117{
5476a9a4 23118
f199cab1
GM
23119 ;
23120 return 0;
ae0d7250
PE
23121}
23122_ACEOF
5476a9a4
GM
23123if ac_fn_c_try_compile "$LINENO"; then :
23124 gl_cv_func_gettimeofday_posix_signature=almost
ae0d7250 23125else
5476a9a4 23126 gl_cv_func_gettimeofday_posix_signature=no
ae0d7250 23127fi
5476a9a4 23128rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ae0d7250 23129fi
5476a9a4 23130rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52724a05 23131fi
5476a9a4
GM
23132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
23133$as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; }
23134 if test $gl_cv_func_gettimeofday_posix_signature = almost; then
23135 gl_gettimeofday_timezone='struct timezone'
23136 elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
23137 REPLACE_GETTIMEOFDAY=1
23138 fi
23139 if test $REPLACE_STRUCT_TIMEVAL = 1; then
23140 REPLACE_GETTIMEOFDAY=1
23141 fi
3e0be4ab 23142
5476a9a4 23143 fi
ae0d7250 23144
5476a9a4
GM
23145cat >>confdefs.h <<_ACEOF
23146#define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone
23147_ACEOF
f199cab1 23148
ae0d7250 23149
a6342fc8 23150 if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
ae0d7250 23151
cc322c06
GM
23152
23153
cc322c06
GM
23154
23155
ae0d7250
PE
23156
23157
23158
5476a9a4 23159 gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
5fa4ac76
PE
23160
23161
5476a9a4
GM
23162 for ac_header in sys/timeb.h
23163do :
23164 ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
23165if test "x$ac_cv_header_sys_timeb_h" = x""yes; then :
23166 cat >>confdefs.h <<_ACEOF
23167#define HAVE_SYS_TIMEB_H 1
23168_ACEOF
5fa4ac76 23169
3e0be4ab 23170fi
5fa4ac76 23171
5476a9a4 23172done
f199cab1 23173
5476a9a4
GM
23174 for ac_func in _ftime
23175do :
23176 ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
23177if test "x$ac_cv_func__ftime" = x""yes; then :
23178 cat >>confdefs.h <<_ACEOF
23179#define HAVE__FTIME 1
23180_ACEOF
5fa4ac76 23181
5476a9a4
GM
23182fi
23183done
5fa4ac76
PE
23184
23185
a6342fc8 23186 fi
5fa4ac76
PE
23187
23188
23189
23190
23191
5476a9a4 23192 GNULIB_GETTIMEOFDAY=1
5fa4ac76
PE
23193
23194
23195
23196
0eb775a3
GM
23197
23198
369e19fc
PE
23199
23200
369e19fc
PE
23201
23202
5476a9a4
GM
23203 if test $ac_cv_func_lstat = yes; then
23204
23205 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
23206 *no)
23207 REPLACE_LSTAT=1
23208 ;;
23209 esac
23210 else
23211 HAVE_LSTAT=0
f199cab1 23212 fi
369e19fc 23213
a6342fc8 23214 if test $REPLACE_LSTAT = 1; then
369e19fc 23215
5fa4ac76 23216
369e19fc 23217
369e19fc 23218
369e19fc 23219
369e19fc 23220
369e19fc 23221
369e19fc 23222
5476a9a4 23223 gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
f199cab1 23224
45d4966b 23225 :
a6342fc8 23226 fi
369e19fc 23227
369e19fc 23228
369e19fc 23229
5fa4ac76
PE
23230
23231
5476a9a4 23232 GNULIB_LSTAT=1
5fa4ac76 23233
5fa4ac76 23234
27505cf5 23235
27505cf5 23236
27505cf5 23237
27505cf5 23238
27505cf5 23239
27505cf5 23240
5fa4ac76
PE
23241
23242
283c7aed
GM
23243 if test $ac_cv_have_decl_memrchr = no; then
23244 HAVE_DECL_MEMRCHR=0
23245 fi
23246
23247 for ac_func in memrchr
23248do :
23249 ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr"
23250if test "x$ac_cv_func_memrchr" = x""yes; then :
23251 cat >>confdefs.h <<_ACEOF
23252#define HAVE_MEMRCHR 1
23253_ACEOF
23254
23255fi
23256done
23257
23258
23259 if test $ac_cv_func_memrchr = no; then
23260
23261
23262
23263
23264
23265
23266
23267
23268 gl_LIBOBJS="$gl_LIBOBJS memrchr.$ac_objext"
23269
23270 :
23271 fi
23272
23273
23274
23275
23276
23277 GNULIB_MEMRCHR=1
23278
23279
23280
23281
23282
23283
23284
23285
23286
23287
5476a9a4
GM
23288
23289 if test $APPLE_UNIVERSAL_BUILD = 1; then
23290 # A universal build on Apple Mac OS X platforms.
23291 # The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode.
23292 # But we need a configuration result that is valid in both modes.
23293 gl_cv_func_working_mktime=no
23294 fi
23295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5
23296$as_echo_n "checking for working mktime... " >&6; }
23297if test "${gl_cv_func_working_mktime+set}" = set; then :
f199cab1
GM
23298 $as_echo_n "(cached) " >&6
23299else
5476a9a4
GM
23300 if test "$cross_compiling" = yes; then :
23301 gl_cv_func_working_mktime=no
23302else
23303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 23304/* end confdefs.h. */
5476a9a4
GM
23305/* Test program from Paul Eggert and Tony Leneis. */
23306#include <limits.h>
23307#include <stdlib.h>
23308#include <time.h>
5fa4ac76 23309
5476a9a4
GM
23310#ifdef HAVE_UNISTD_H
23311# include <unistd.h>
f199cab1 23312#endif
5476a9a4 23313
2393bc74
GM
23314#if HAVE_DECL_ALARM
23315# include <signal.h>
5476a9a4
GM
23316#endif
23317
23318/* Work around redefinition to rpl_putenv by other config tests. */
23319#undef putenv
23320
23321static time_t time_t_max;
23322static time_t time_t_min;
23323
23324/* Values we'll use to set the TZ environment variable. */
23325static char *tz_strings[] = {
23326 (char *) 0, "TZ=GMT0", "TZ=JST-9",
23327 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
23328};
23329#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
23330
23331/* Return 0 if mktime fails to convert a date in the spring-forward gap.
23332 Based on a problem report from Andreas Jaeger. */
23333static int
23334spring_forward_gap ()
f199cab1 23335{
5476a9a4
GM
23336 /* glibc (up to about 1998-10-07) failed this test. */
23337 struct tm tm;
23338
23339 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
23340 instead of "TZ=America/Vancouver" in order to detect the bug even
23341 on systems that don't support the Olson extension, or don't have the
23342 full zoneinfo tables installed. */
23343 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
23344
23345 tm.tm_year = 98;
23346 tm.tm_mon = 3;
23347 tm.tm_mday = 5;
23348 tm.tm_hour = 2;
23349 tm.tm_min = 0;
23350 tm.tm_sec = 0;
23351 tm.tm_isdst = -1;
23352 return mktime (&tm) != (time_t) -1;
f199cab1 23353}
5fa4ac76 23354
5476a9a4
GM
23355static int
23356mktime_test1 (time_t now)
23357{
23358 struct tm *lt;
23359 return ! (lt = localtime (&now)) || mktime (lt) == now;
23360}
5fa4ac76 23361
5476a9a4
GM
23362static int
23363mktime_test (time_t now)
23364{
23365 return (mktime_test1 (now)
23366 && mktime_test1 ((time_t) (time_t_max - now))
23367 && mktime_test1 ((time_t) (time_t_min + now)));
23368}
067d23c9 23369
5476a9a4
GM
23370static int
23371irix_6_4_bug ()
23372{
23373 /* Based on code from Ariel Faigon. */
23374 struct tm tm;
23375 tm.tm_year = 96;
23376 tm.tm_mon = 3;
23377 tm.tm_mday = 0;
23378 tm.tm_hour = 0;
23379 tm.tm_min = 0;
23380 tm.tm_sec = 0;
23381 tm.tm_isdst = -1;
23382 mktime (&tm);
23383 return tm.tm_mon == 2 && tm.tm_mday == 31;
23384}
23385
23386static int
23387bigtime_test (int j)
23388{
23389 struct tm tm;
23390 time_t now;
23391 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
23392 now = mktime (&tm);
23393 if (now != (time_t) -1)
23394 {
23395 struct tm *lt = localtime (&now);
23396 if (! (lt
23397 && lt->tm_year == tm.tm_year
23398 && lt->tm_mon == tm.tm_mon
23399 && lt->tm_mday == tm.tm_mday
23400 && lt->tm_hour == tm.tm_hour
23401 && lt->tm_min == tm.tm_min
23402 && lt->tm_sec == tm.tm_sec
23403 && lt->tm_yday == tm.tm_yday
23404 && lt->tm_wday == tm.tm_wday
23405 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
23406 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
23407 return 0;
23408 }
23409 return 1;
23410}
369e19fc 23411
5476a9a4
GM
23412static int
23413year_2050_test ()
23414{
23415 /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
23416 ignoring leap seconds. */
23417 unsigned long int answer = 2527315200UL;
369e19fc 23418
5476a9a4
GM
23419 struct tm tm;
23420 time_t t;
23421 tm.tm_year = 2050 - 1900;
23422 tm.tm_mon = 2 - 1;
23423 tm.tm_mday = 1;
23424 tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
23425 tm.tm_isdst = -1;
369e19fc 23426
5476a9a4
GM
23427 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
23428 instead of "TZ=America/Vancouver" in order to detect the bug even
23429 on systems that don't support the Olson extension, or don't have the
23430 full zoneinfo tables installed. */
23431 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
067d23c9 23432
5476a9a4 23433 t = mktime (&tm);
067d23c9 23434
5476a9a4
GM
23435 /* Check that the result is either a failure, or close enough
23436 to the correct answer that we can assume the discrepancy is
23437 due to leap seconds. */
23438 return (t == (time_t) -1
23439 || (0 < t && answer - 120 <= t && t <= answer + 120));
23440}
067d23c9 23441
f199cab1
GM
23442int
23443main ()
23444{
5476a9a4
GM
23445 int result = 0;
23446 time_t t, delta;
23447 int i, j;
23448 int time_t_signed_magnitude = (time_t) ~ (time_t) 0 < (time_t) -1;
23449 int time_t_signed = ! ((time_t) 0 < (time_t) -1);
067d23c9 23450
2393bc74 23451#if HAVE_DECL_ALARM
5476a9a4
GM
23452 /* This test makes some buggy mktime implementations loop.
23453 Give up after 60 seconds; a mktime slower than that
23454 isn't worth using anyway. */
2393bc74 23455 signal (SIGALRM, SIG_DFL);
5476a9a4 23456 alarm (60);
2393bc74 23457#endif
067d23c9 23458
5476a9a4
GM
23459 time_t_max = (! time_t_signed
23460 ? (time_t) -1
23461 : ((((time_t) 1 << (sizeof (time_t) * CHAR_BIT - 2)) - 1)
23462 * 2 + 1));
23463 time_t_min = (! time_t_signed
23464 ? (time_t) 0
23465 : time_t_signed_magnitude
23466 ? ~ (time_t) 0
23467 : ~ time_t_max);
3e0be4ab 23468
5476a9a4
GM
23469 delta = time_t_max / 997; /* a suitable prime number */
23470 for (i = 0; i < N_STRINGS; i++)
23471 {
23472 if (tz_strings[i])
23473 putenv (tz_strings[i]);
3e0be4ab 23474
5476a9a4
GM
23475 for (t = 0; t <= time_t_max - delta && (result & 1) == 0; t += delta)
23476 if (! mktime_test (t))
23477 result |= 1;
23478 if ((result & 2) == 0
23479 && ! (mktime_test ((time_t) 1)
23480 && mktime_test ((time_t) (60 * 60))
23481 && mktime_test ((time_t) (60 * 60 * 24))))
23482 result |= 2;
f199cab1 23483
5476a9a4
GM
23484 for (j = 1; (result & 4) == 0; j <<= 1)
23485 {
23486 if (! bigtime_test (j))
23487 result |= 4;
23488 if (INT_MAX / 2 < j)
23489 break;
23490 }
23491 if ((result & 8) == 0 && ! bigtime_test (INT_MAX))
23492 result |= 8;
23493 }
23494 if (! irix_6_4_bug ())
23495 result |= 16;
23496 if (! spring_forward_gap ())
23497 result |= 32;
23498 if (! year_2050_test ())
23499 result |= 64;
23500 return result;
067d23c9
KY
23501}
23502_ACEOF
5476a9a4
GM
23503if ac_fn_c_try_run "$LINENO"; then :
23504 gl_cv_func_working_mktime=yes
067d23c9 23505else
5476a9a4 23506 gl_cv_func_working_mktime=no
3e0be4ab 23507fi
5476a9a4
GM
23508rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23509 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1
GM
23510fi
23511
f199cab1 23512
5476a9a4
GM
23513fi
23514{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_mktime" >&5
23515$as_echo "$gl_cv_func_working_mktime" >&6; }
f199cab1 23516
5476a9a4
GM
23517 if test $gl_cv_func_working_mktime = no; then
23518 REPLACE_MKTIME=1
23519 else
23520 REPLACE_MKTIME=0
f199cab1 23521 fi
f199cab1 23522
a6342fc8 23523 if test $REPLACE_MKTIME = 1; then
f199cab1 23524
f199cab1 23525
0eb775a3 23526
067d23c9 23527
a451f14b 23528
a451f14b 23529
743c80a7
PE
23530
23531
5476a9a4
GM
23532 gl_LIBOBJS="$gl_LIBOBJS mktime.$ac_objext"
23533
a6342fc8
GM
23534 :
23535 fi
a451f14b
PE
23536
23537
23538
e275c824
PE
23539
23540
5476a9a4 23541 GNULIB_MKTIME=1
e275c824
PE
23542
23543
23544
23545
23546
23547
23548
23549
d87ffdb7 23550
5476a9a4
GM
23551
23552
23553 if test $ac_cv_func_pselect = yes; then
23554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether signature of pselect conforms to POSIX" >&5
23555$as_echo_n "checking whether signature of pselect conforms to POSIX... " >&6; }
23556if test "${gl_cv_sig_pselect+set}" = set; then :
e275c824
PE
23557 $as_echo_n "(cached) " >&6
23558else
5476a9a4 23559 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
e275c824 23560/* end confdefs.h. */
5476a9a4 23561#include <sys/select.h>
e275c824 23562
f199cab1
GM
23563int
23564main ()
23565{
5476a9a4
GM
23566int (*p) (int, fd_set *, fd_set *, fd_set *restrict,
23567 struct timespec const *restrict,
23568 sigset_t const *restrict) = pselect;
23569 return !p;
f199cab1
GM
23570 ;
23571 return 0;
23572}
e275c824 23573_ACEOF
f199cab1 23574if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 23575 gl_cv_sig_pselect=yes
3e0be4ab 23576else
5476a9a4 23577 gl_cv_sig_pselect=no
f199cab1
GM
23578fi
23579rm -f core conftest.err conftest.$ac_objext \
23580 conftest$ac_exeext conftest.$ac_ext
3e0be4ab 23581fi
5476a9a4
GM
23582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sig_pselect" >&5
23583$as_echo "$gl_cv_sig_pselect" >&6; }
b6c9d18d
GM
23584
23585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pselect detects invalid fds" >&5
23586$as_echo_n "checking whether pselect detects invalid fds... " >&6; }
23587if test "${gl_cv_func_pselect_detects_ebadf+set}" = set; then :
23588 $as_echo_n "(cached) " >&6
23589else
23590
23591 if test "$cross_compiling" = yes; then :
23592
23593 case "$host_os" in
23594 # Guess yes on glibc systems.
23595 *-gnu*) gl_cv_func_pselect_detects_ebadf="guessing yes" ;;
23596 # If we don't know, assume the worst.
23597 *) gl_cv_func_pselect_detects_ebadf="guessing no" ;;
23598 esac
23599
23600else
23601 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23602/* end confdefs.h. */
23603
23604#include <sys/types.h>
23605#include <sys/time.h>
23606#if HAVE_SYS_SELECT_H
23607# include <sys/select.h>
23608#endif
23609#include <unistd.h>
23610#include <errno.h>
23611
23612int
23613main ()
23614{
23615
23616 fd_set set;
23617 dup2(0, 16);
23618 FD_ZERO(&set);
23619 FD_SET(16, &set);
23620 close(16);
23621 struct timespec timeout;
23622 timeout.tv_sec = 0;
23623 timeout.tv_nsec = 5000;
23624 return pselect (17, &set, NULL, NULL, &timeout, NULL) != -1 || errno != EBADF;
23625
23626 ;
23627 return 0;
23628}
23629_ACEOF
23630if ac_fn_c_try_run "$LINENO"; then :
23631 gl_cv_func_pselect_detects_ebadf=yes
23632else
23633 gl_cv_func_pselect_detects_ebadf=no
23634fi
23635rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23636 conftest.$ac_objext conftest.beam conftest.$ac_ext
23637fi
23638
23639
23640fi
23641{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pselect_detects_ebadf" >&5
23642$as_echo "$gl_cv_func_pselect_detects_ebadf" >&6; }
23643 case $gl_cv_func_pselect_detects_ebadf in
23644 *yes) ;;
23645 *) REPLACE_PSELECT=1 ;;
23646 esac
5476a9a4 23647 fi
3e0be4ab 23648
5476a9a4
GM
23649 if test $ac_cv_func_pselect = no || test $gl_cv_sig_pselect = no; then
23650 REPLACE_PSELECT=1
23651 fi
3e0be4ab 23652
a6342fc8 23653 if test $HAVE_PSELECT = 0 || test $REPLACE_PSELECT = 1; then
3e0be4ab
GM
23654
23655
3e0be4ab 23656
3e0be4ab 23657
3e0be4ab 23658
3e0be4ab 23659
3e0be4ab 23660
3e0be4ab 23661
5476a9a4 23662 gl_LIBOBJS="$gl_LIBOBJS pselect.$ac_objext"
3e0be4ab 23663
a6342fc8 23664 fi
3e0be4ab
GM
23665
23666
f199cab1 23667
f199cab1 23668
f199cab1 23669
5476a9a4 23670 GNULIB_PSELECT=1
f199cab1 23671
6d153f56 23672
f199cab1 23673
3e0be4ab 23674
3e0be4ab
GM
23675
23676
f199cab1 23677
0eb775a3
GM
23678
23679
5476a9a4 23680 LIB_PTHREAD_SIGMASK=
0eb775a3 23681
f199cab1 23682
f077f61d
GM
23683
23684
23685 if test "$gl_threads_api" = posix; then
23686 if test $ac_cv_func_pthread_sigmask = yes; then
23687 :
23688 else
23689 if test -n "$LIBMULTITHREAD"; then
23690 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_sigmask in $LIBMULTITHREAD" >&5
23691$as_echo_n "checking for pthread_sigmask in $LIBMULTITHREAD... " >&6; }
23692if test "${gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD+set}" = set; then :
23693 $as_echo_n "(cached) " >&6
23694else
23695 gl_save_LIBS="$LIBS"
23696 LIBS="$LIBS $LIBMULTITHREAD"
23697 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23698/* end confdefs.h. */
23699#include <pthread.h>
23700 #include <signal.h>
23701
23702int
23703main ()
23704{
23705return pthread_sigmask (0, (sigset_t *) 0, (sigset_t *) 0);
23706 ;
23707 return 0;
23708}
23709
23710_ACEOF
23711if ac_fn_c_try_link "$LINENO"; then :
23712 gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD=yes
23713else
23714 gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD=no
23715fi
23716rm -f core conftest.err conftest.$ac_objext \
23717 conftest$ac_exeext conftest.$ac_ext
23718 LIBS="$gl_save_LIBS"
23719
23720fi
23721{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD" >&5
23722$as_echo "$gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD" >&6; }
23723 if test $gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD = yes; then
23724 LIB_PTHREAD_SIGMASK="$LIBMULTITHREAD"
23725 else
23726 HAVE_PTHREAD_SIGMASK=0
23727 fi
23728 else
23729 HAVE_PTHREAD_SIGMASK=0
23730 fi
23731 fi
5476a9a4 23732 else
f077f61d
GM
23733 if test $ac_cv_func_pthread_sigmask = yes; then
23734 REPLACE_PTHREAD_SIGMASK=1
23735 else
23736 HAVE_PTHREAD_SIGMASK=0
23737 fi
5476a9a4 23738 fi
6d153f56 23739
52724a05 23740
6d153f56
GM
23741
23742
5476a9a4
GM
23743 if test $HAVE_PTHREAD_SIGMASK = 1; then
23744
23745
23746 if test -z "$LIB_PTHREAD_SIGMASK"; then
23747 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask works without -lpthread" >&5
23748$as_echo_n "checking whether pthread_sigmask works without -lpthread... " >&6; }
23749if test "${gl_cv_func_pthread_sigmask_in_libc_works+set}" = set; then :
f199cab1
GM
23750 $as_echo_n "(cached) " >&6
23751else
5476a9a4
GM
23752
23753 if test "$cross_compiling" = yes; then :
23754
23755 case "$host_os" in
23756 freebsd* | hpux* | solaris | solaris2.[2-9]*)
23757 gl_cv_func_pthread_sigmask_in_libc_works="guessing no";;
23758 *)
23759 gl_cv_func_pthread_sigmask_in_libc_works="guessing yes";;
23760 esac
23761
23762else
23763 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 23764/* end confdefs.h. */
6d153f56 23765
5476a9a4
GM
23766#include <pthread.h>
23767#include <signal.h>
23768#include <stddef.h>
23769int main ()
f199cab1 23770{
5476a9a4
GM
23771 sigset_t set;
23772 sigemptyset (&set);
23773 return pthread_sigmask (1729, &set, NULL) != 0;
f199cab1
GM
23774}
23775_ACEOF
5476a9a4
GM
23776if ac_fn_c_try_run "$LINENO"; then :
23777 gl_cv_func_pthread_sigmask_in_libc_works=no
f199cab1 23778else
5476a9a4 23779 gl_cv_func_pthread_sigmask_in_libc_works=yes
f199cab1 23780fi
5476a9a4
GM
23781rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23782 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1 23783fi
5476a9a4
GM
23784
23785
f199cab1 23786fi
5476a9a4
GM
23787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_in_libc_works" >&5
23788$as_echo "$gl_cv_func_pthread_sigmask_in_libc_works" >&6; }
23789 case "$gl_cv_func_pthread_sigmask_in_libc_works" in
23790 *no)
23791 REPLACE_PTHREAD_SIGMASK=1
cc322c06 23792
5476a9a4 23793$as_echo "#define PTHREAD_SIGMASK_INEFFECTIVE 1" >>confdefs.h
cc322c06 23794
5476a9a4
GM
23795 ;;
23796 esac
23797 fi
3e0be4ab 23798
5476a9a4
GM
23799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask returns error numbers" >&5
23800$as_echo_n "checking whether pthread_sigmask returns error numbers... " >&6; }
23801if test "${gl_cv_func_pthread_sigmask_return_works+set}" = set; then :
3e0be4ab
GM
23802 $as_echo_n "(cached) " >&6
23803else
5476a9a4
GM
23804
23805 gl_save_LIBS="$LIBS"
23806 LIBS="$LIBS $LIB_PTHREAD_SIGMASK"
23807 if test "$cross_compiling" = yes; then :
23808 case "$host_os" in
23809 cygwin*)
23810 gl_cv_func_pthread_sigmask_return_works="guessing no";;
23811 *)
23812 gl_cv_func_pthread_sigmask_return_works="guessing yes";;
23813 esac
23814
23815else
23816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3e0be4ab 23817/* end confdefs.h. */
f199cab1 23818
5476a9a4
GM
23819#include <pthread.h>
23820#include <signal.h>
23821#include <stddef.h>
23822int main ()
3e0be4ab 23823{
5476a9a4
GM
23824 sigset_t set;
23825 sigemptyset (&set);
23826 if (pthread_sigmask (1729, &set, NULL) == -1)
23827 return 1;
3e0be4ab
GM
23828 return 0;
23829}
6d153f56 23830_ACEOF
5476a9a4
GM
23831if ac_fn_c_try_run "$LINENO"; then :
23832 gl_cv_func_pthread_sigmask_return_works=yes
3e0be4ab 23833else
5476a9a4 23834 gl_cv_func_pthread_sigmask_return_works=no
6d153f56 23835fi
5476a9a4
GM
23836rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23837 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1 23838fi
5476a9a4
GM
23839
23840 LIBS="$gl_save_LIBS"
23841
52724a05 23842fi
5476a9a4
GM
23843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_return_works" >&5
23844$as_echo "$gl_cv_func_pthread_sigmask_return_works" >&6; }
23845 case "$gl_cv_func_pthread_sigmask_return_works" in
23846 *no)
23847 REPLACE_PTHREAD_SIGMASK=1
6d153f56 23848
5476a9a4 23849$as_echo "#define PTHREAD_SIGMASK_FAILS_WITH_ERRNO 1" >>confdefs.h
6d153f56 23850
5476a9a4
GM
23851 ;;
23852 esac
cc322c06 23853
5476a9a4
GM
23854 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask unblocks signals correctly" >&5
23855$as_echo_n "checking whether pthread_sigmask unblocks signals correctly... " >&6; }
23856if test "${gl_cv_func_pthread_sigmask_unblock_works+set}" = set; then :
f199cab1
GM
23857 $as_echo_n "(cached) " >&6
23858else
5476a9a4
GM
23859
23860 case "$host_os" in
23861 irix*)
23862 gl_cv_func_pthread_sigmask_unblock_works="guessing no";;
23863 *)
23864 gl_cv_func_pthread_sigmask_unblock_works="guessing yes";;
23865 esac
23866 gl_save_LIBS="$LIBS"
23867 LIBS="$LIBS $LIBMULTITHREAD"
23868 if test "$cross_compiling" = yes; then :
23869 :
f199cab1 23870else
5476a9a4
GM
23871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23872/* end confdefs.h. */
6d153f56 23873
5476a9a4
GM
23874#include <pthread.h>
23875#include <signal.h>
23876#include <stdio.h>
23877#include <stdlib.h>
23878#include <unistd.h>
23879static volatile int sigint_occurred;
23880static void
23881sigint_handler (int sig)
23882{
23883 sigint_occurred++;
23884}
23885int main ()
23886{
23887 sigset_t set;
23888 int pid = getpid ();
23889 char command[80];
23890 signal (SIGINT, sigint_handler);
23891 sigemptyset (&set);
23892 sigaddset (&set, SIGINT);
23893 if (!(pthread_sigmask (SIG_BLOCK, &set, NULL) == 0))
23894 return 1;
23895 sprintf (command, "sh -c 'sleep 1; kill -%d %d' &", SIGINT, pid);
23896 if (!(system (command) == 0))
23897 return 2;
23898 sleep (2);
23899 if (!(sigint_occurred == 0))
23900 return 3;
23901 if (!(pthread_sigmask (SIG_UNBLOCK, &set, NULL) == 0))
23902 return 4;
23903 if (!(sigint_occurred == 1)) /* This fails on IRIX. */
23904 return 5;
23905 return 0;
23906}
23907_ACEOF
23908if ac_fn_c_try_run "$LINENO"; then :
23909 :
23910else
23911 gl_cv_func_pthread_sigmask_unblock_works=no
f199cab1 23912fi
5476a9a4
GM
23913rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23914 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1 23915fi
5476a9a4
GM
23916
23917 LIBS="$gl_save_LIBS"
23918
f199cab1 23919fi
5476a9a4
GM
23920{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_unblock_works" >&5
23921$as_echo "$gl_cv_func_pthread_sigmask_unblock_works" >&6; }
23922 case "$gl_cv_func_pthread_sigmask_unblock_works" in
23923 *no)
23924 REPLACE_PTHREAD_SIGMASK=1
6d153f56 23925
5476a9a4 23926$as_echo "#define PTHREAD_SIGMASK_UNBLOCK_BUG 1" >>confdefs.h
6d153f56 23927
5476a9a4
GM
23928 ;;
23929 esac
6d153f56 23930 fi
6d153f56 23931
a6342fc8 23932 if test $HAVE_PTHREAD_SIGMASK = 0 || test $REPLACE_PTHREAD_SIGMASK = 1; then
a451f14b 23933
a451f14b 23934
743c80a7
PE
23935
23936
23937
23938
23939
f199cab1 23940
5476a9a4 23941 gl_LIBOBJS="$gl_LIBOBJS pthread_sigmask.$ac_objext"
743c80a7
PE
23942
23943
5476a9a4 23944 if test $HAVE_PTHREAD_SIGMASK = 1; then
743c80a7 23945
5476a9a4 23946$as_echo "#define HAVE_PTHREAD_SIGMASK 1" >>confdefs.h
743c80a7 23947
5476a9a4 23948 fi
743c80a7 23949
a6342fc8 23950 fi
938a4ef9 23951
938a4ef9 23952
938a4ef9 23953
938a4ef9 23954
938a4ef9 23955
5476a9a4 23956 GNULIB_PTHREAD_SIGMASK=1
a451f14b 23957
a451f14b 23958
743c80a7
PE
23959
23960
23961
23962
23963
b5591ebb
GM
23964 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for putenv compatible with GNU and SVID" >&5
23965$as_echo_n "checking for putenv compatible with GNU and SVID... " >&6; }
23966if test "${gl_cv_func_svid_putenv+set}" = set; then :
23967 $as_echo_n "(cached) " >&6
23968else
23969 if test "$cross_compiling" = yes; then :
23970 case "$host_os" in
23971 # Guess yes on glibc systems.
23972 *-gnu*) gl_cv_func_svid_putenv="guessing yes" ;;
23973 # If we don't know, assume the worst.
23974 *) gl_cv_func_svid_putenv="guessing no" ;;
23975 esac
23976
23977else
23978 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23979/* end confdefs.h. */
23980$ac_includes_default
23981int
23982main ()
23983{
23984
23985 /* Put it in env. */
23986 if (putenv ("CONFTEST_putenv=val"))
23987 return 1;
23988
23989 /* Try to remove it. */
23990 if (putenv ("CONFTEST_putenv"))
23991 return 2;
23992
23993 /* Make sure it was deleted. */
23994 if (getenv ("CONFTEST_putenv") != 0)
23995 return 3;
23996
23997 return 0;
23998
23999 ;
24000 return 0;
24001}
24002_ACEOF
24003if ac_fn_c_try_run "$LINENO"; then :
24004 gl_cv_func_svid_putenv=yes
24005else
24006 gl_cv_func_svid_putenv=no
24007fi
24008rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24009 conftest.$ac_objext conftest.beam conftest.$ac_ext
24010fi
24011
24012
24013fi
24014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_svid_putenv" >&5
24015$as_echo "$gl_cv_func_svid_putenv" >&6; }
24016 case "$gl_cv_func_svid_putenv" in
24017 *yes) ;;
24018 *)
24019 REPLACE_PUTENV=1
24020 ;;
24021 esac
24022
24023 if test $REPLACE_PUTENV = 1; then
24024
24025
24026
24027
24028
24029
24030
24031
24032 gl_LIBOBJS="$gl_LIBOBJS putenv.$ac_objext"
24033
c175d440 24034
2393bc74
GM
24035 ac_fn_c_check_decl "$LINENO" "_putenv" "ac_cv_have_decl__putenv" "$ac_includes_default"
24036if test "x$ac_cv_have_decl__putenv" = x""yes; then :
24037 ac_have_decl=1
24038else
24039 ac_have_decl=0
c175d440 24040fi
2393bc74
GM
24041
24042cat >>confdefs.h <<_ACEOF
24043#define HAVE_DECL__PUTENV $ac_have_decl
24044_ACEOF
c175d440
GM
24045
24046
b5591ebb
GM
24047 fi
24048
24049
24050
24051
24052
24053 GNULIB_PUTENV=1
24054
24055
24056
24057
24058
24059
3a019ab4
GM
24060 # Check whether --enable-acl was given.
24061if test "${enable_acl+set}" = set; then :
24062 enableval=$enable_acl;
24063else
24064 enable_acl=auto
24065fi
b5591ebb 24066
743c80a7 24067
3a019ab4
GM
24068 LIB_ACL=
24069 use_acl=0
24070 if test "x$enable_acl" != "xno"; then
24071 for ac_header in sys/acl.h
24072do :
24073 ac_fn_c_check_header_mongrel "$LINENO" "sys/acl.h" "ac_cv_header_sys_acl_h" "$ac_includes_default"
24074if test "x$ac_cv_header_sys_acl_h" = x""yes; then :
24075 cat >>confdefs.h <<_ACEOF
24076#define HAVE_SYS_ACL_H 1
24077_ACEOF
24078
24079fi
24080
24081done
24082
24083 if test $ac_cv_header_sys_acl_h = yes; then
24084 ac_save_LIBS=$LIBS
24085
24086 if test $use_acl = 0; then
24087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing acl_get_file" >&5
24088$as_echo_n "checking for library containing acl_get_file... " >&6; }
24089if test "${ac_cv_search_acl_get_file+set}" = set; then :
24090 $as_echo_n "(cached) " >&6
24091else
24092 ac_func_search_save_LIBS=$LIBS
24093cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24094/* end confdefs.h. */
24095
24096/* Override any GCC internal prototype to avoid an error.
24097 Use char because int might match the return type of a GCC
24098 builtin and then its argument prototype would still apply. */
24099#ifdef __cplusplus
24100extern "C"
24101#endif
24102char acl_get_file ();
24103int
24104main ()
24105{
24106return acl_get_file ();
24107 ;
24108 return 0;
24109}
24110_ACEOF
24111for ac_lib in '' acl pacl; do
24112 if test -z "$ac_lib"; then
24113 ac_res="none required"
24114 else
24115 ac_res=-l$ac_lib
24116 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
24117 fi
24118 if ac_fn_c_try_link "$LINENO"; then :
24119 ac_cv_search_acl_get_file=$ac_res
24120fi
24121rm -f core conftest.err conftest.$ac_objext \
24122 conftest$ac_exeext
24123 if test "${ac_cv_search_acl_get_file+set}" = set; then :
24124 break
24125fi
24126done
24127if test "${ac_cv_search_acl_get_file+set}" = set; then :
24128
24129else
24130 ac_cv_search_acl_get_file=no
24131fi
24132rm conftest.$ac_ext
24133LIBS=$ac_func_search_save_LIBS
24134fi
24135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_acl_get_file" >&5
24136$as_echo "$ac_cv_search_acl_get_file" >&6; }
24137ac_res=$ac_cv_search_acl_get_file
24138if test "$ac_res" != no; then :
24139 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
24140 if test "$ac_cv_search_acl_get_file" != "none required"; then
24141 LIB_ACL=$ac_cv_search_acl_get_file
24142 fi
24143 for ac_func in acl_get_file acl_get_fd acl_set_file acl_set_fd \
24144 acl_free acl_from_mode acl_from_text \
24145 acl_delete_def_file acl_extended_file \
24146 acl_delete_fd_np acl_delete_file_np \
24147 acl_copy_ext_native acl_create_entry_np \
24148 acl_to_short_text acl_free_text
24149do :
24150 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
24151ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
24152eval as_val=\$$as_ac_var
24153 if test "x$as_val" = x""yes; then :
24154 cat >>confdefs.h <<_ACEOF
24155#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
24156_ACEOF
24157
24158fi
24159done
24160
24161 # If the acl_get_file bug is detected, don't enable the ACL support.
24162
24163 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working acl_get_file" >&5
24164$as_echo_n "checking for working acl_get_file... " >&6; }
24165if test "${gl_cv_func_working_acl_get_file+set}" = set; then :
24166 $as_echo_n "(cached) " >&6
24167else
24168 if test "$cross_compiling" = yes; then :
24169 gl_cv_func_working_acl_get_file=cross-compiling
24170else
24171 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24172/* end confdefs.h. */
24173#include <sys/types.h>
24174 #include <sys/acl.h>
24175 #include <errno.h>
24176
24177int
24178main ()
24179{
24180if (!acl_get_file (".", ACL_TYPE_ACCESS) && errno == ENOENT)
24181 return 1;
24182 return 0;
24183
24184 ;
24185 return 0;
24186}
24187_ACEOF
24188if ac_fn_c_try_run "$LINENO"; then :
24189 gl_cv_func_working_acl_get_file=yes
24190else
24191 gl_cv_func_working_acl_get_file=no
24192fi
24193rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24194 conftest.$ac_objext conftest.beam conftest.$ac_ext
24195fi
24196
24197fi
24198{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_acl_get_file" >&5
24199$as_echo "$gl_cv_func_working_acl_get_file" >&6; }
24200
24201 if test $gl_cv_func_working_acl_get_file = yes; then :
24202 use_acl=1
24203fi
24204
24205 if test $use_acl = 1; then
24206 for ac_header in acl/libacl.h
24207do :
24208 ac_fn_c_check_header_mongrel "$LINENO" "acl/libacl.h" "ac_cv_header_acl_libacl_h" "$ac_includes_default"
24209if test "x$ac_cv_header_acl_libacl_h" = x""yes; then :
24210 cat >>confdefs.h <<_ACEOF
24211#define HAVE_ACL_LIBACL_H 1
24212_ACEOF
24213
24214fi
24215
24216done
24217
24218
24219
24220
24221
24222
24223
24224
24225
24226 for ac_func in acl_entries
24227do :
24228 ac_fn_c_check_func "$LINENO" "acl_entries" "ac_cv_func_acl_entries"
24229if test "x$ac_cv_func_acl_entries" = x""yes; then :
24230 cat >>confdefs.h <<_ACEOF
24231#define HAVE_ACL_ENTRIES 1
24232_ACEOF
24233
24234else
24235
24236 gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
24237
24238fi
24239done
24240
24241
24242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ACL_FIRST_ENTRY" >&5
24243$as_echo_n "checking for ACL_FIRST_ENTRY... " >&6; }
24244if test "${gl_cv_acl_ACL_FIRST_ENTRY+set}" = set; then :
24245 $as_echo_n "(cached) " >&6
24246else
24247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24248/* end confdefs.h. */
24249#include <sys/types.h>
24250#include <sys/acl.h>
24251int type = ACL_FIRST_ENTRY;
24252int
24253main ()
24254{
24255
24256 ;
24257 return 0;
24258}
24259_ACEOF
24260if ac_fn_c_try_compile "$LINENO"; then :
24261 gl_cv_acl_ACL_FIRST_ENTRY=yes
24262else
24263 gl_cv_acl_ACL_FIRST_ENTRY=no
24264fi
24265rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24266fi
24267{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_acl_ACL_FIRST_ENTRY" >&5
24268$as_echo "$gl_cv_acl_ACL_FIRST_ENTRY" >&6; }
24269 if test $gl_cv_acl_ACL_FIRST_ENTRY = yes; then
24270
24271$as_echo "#define HAVE_ACL_FIRST_ENTRY 1" >>confdefs.h
24272
24273 fi
24274 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ACL_TYPE_EXTENDED" >&5
24275$as_echo_n "checking for ACL_TYPE_EXTENDED... " >&6; }
24276if test "${gl_cv_acl_ACL_TYPE_EXTENDED+set}" = set; then :
24277 $as_echo_n "(cached) " >&6
24278else
24279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24280/* end confdefs.h. */
24281#include <sys/types.h>
24282#include <sys/acl.h>
24283int type = ACL_TYPE_EXTENDED;
24284int
24285main ()
24286{
24287
24288 ;
24289 return 0;
24290}
24291_ACEOF
24292if ac_fn_c_try_compile "$LINENO"; then :
24293 gl_cv_acl_ACL_TYPE_EXTENDED=yes
24294else
24295 gl_cv_acl_ACL_TYPE_EXTENDED=no
24296fi
24297rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24298fi
24299{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_acl_ACL_TYPE_EXTENDED" >&5
24300$as_echo "$gl_cv_acl_ACL_TYPE_EXTENDED" >&6; }
24301 if test $gl_cv_acl_ACL_TYPE_EXTENDED = yes; then
24302
24303$as_echo "#define HAVE_ACL_TYPE_EXTENDED 1" >>confdefs.h
24304
24305 fi
24306 else
24307 LIB_ACL=
24308 fi
24309
24310fi
24311
24312 fi
24313
24314 if test $use_acl = 0; then
24315 for ac_func in facl
24316do :
24317 ac_fn_c_check_func "$LINENO" "facl" "ac_cv_func_facl"
24318if test "x$ac_cv_func_facl" = x""yes; then :
24319 cat >>confdefs.h <<_ACEOF
24320#define HAVE_FACL 1
24321_ACEOF
24322
24323fi
24324done
24325
24326 if test $ac_cv_func_facl = yes; then
24327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing acl_trivial" >&5
24328$as_echo_n "checking for library containing acl_trivial... " >&6; }
24329if test "${ac_cv_search_acl_trivial+set}" = set; then :
24330 $as_echo_n "(cached) " >&6
24331else
24332 ac_func_search_save_LIBS=$LIBS
24333cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24334/* end confdefs.h. */
24335
24336/* Override any GCC internal prototype to avoid an error.
24337 Use char because int might match the return type of a GCC
24338 builtin and then its argument prototype would still apply. */
24339#ifdef __cplusplus
24340extern "C"
24341#endif
24342char acl_trivial ();
24343int
24344main ()
24345{
24346return acl_trivial ();
24347 ;
24348 return 0;
24349}
24350_ACEOF
24351for ac_lib in '' sec; do
24352 if test -z "$ac_lib"; then
24353 ac_res="none required"
24354 else
24355 ac_res=-l$ac_lib
24356 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
24357 fi
24358 if ac_fn_c_try_link "$LINENO"; then :
24359 ac_cv_search_acl_trivial=$ac_res
24360fi
24361rm -f core conftest.err conftest.$ac_objext \
24362 conftest$ac_exeext
24363 if test "${ac_cv_search_acl_trivial+set}" = set; then :
24364 break
24365fi
24366done
24367if test "${ac_cv_search_acl_trivial+set}" = set; then :
24368
24369else
24370 ac_cv_search_acl_trivial=no
24371fi
24372rm conftest.$ac_ext
24373LIBS=$ac_func_search_save_LIBS
24374fi
24375{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_acl_trivial" >&5
24376$as_echo "$ac_cv_search_acl_trivial" >&6; }
24377ac_res=$ac_cv_search_acl_trivial
24378if test "$ac_res" != no; then :
24379 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
24380 if test "$ac_cv_search_acl_trivial" != "none required"; then
24381 LIB_ACL=$ac_cv_search_acl_trivial
24382 fi
24383
24384fi
24385
24386 for ac_func in acl_trivial
24387do :
24388 ac_fn_c_check_func "$LINENO" "acl_trivial" "ac_cv_func_acl_trivial"
24389if test "x$ac_cv_func_acl_trivial" = x""yes; then :
24390 cat >>confdefs.h <<_ACEOF
24391#define HAVE_ACL_TRIVIAL 1
24392_ACEOF
24393
24394fi
24395done
24396
24397 use_acl=1
24398 fi
24399 fi
24400
24401 if test $use_acl = 0; then
24402 for ac_func in getacl
24403do :
24404 ac_fn_c_check_func "$LINENO" "getacl" "ac_cv_func_getacl"
24405if test "x$ac_cv_func_getacl" = x""yes; then :
24406 cat >>confdefs.h <<_ACEOF
24407#define HAVE_GETACL 1
24408_ACEOF
24409
24410fi
24411done
24412
24413 if test $ac_cv_func_getacl = yes; then
24414 use_acl=1
24415 fi
24416 for ac_header in aclv.h
24417do :
24418 ac_fn_c_check_header_compile "$LINENO" "aclv.h" "ac_cv_header_aclv_h" "#include <sys/types.h>
24419"
24420if test "x$ac_cv_header_aclv_h" = x""yes; then :
24421 cat >>confdefs.h <<_ACEOF
24422#define HAVE_ACLV_H 1
24423_ACEOF
24424
24425fi
24426
24427done
24428
24429 fi
24430
24431 if test $use_acl = 0; then
24432 for ac_func in aclx_get
24433do :
24434 ac_fn_c_check_func "$LINENO" "aclx_get" "ac_cv_func_aclx_get"
24435if test "x$ac_cv_func_aclx_get" = x""yes; then :
24436 cat >>confdefs.h <<_ACEOF
24437#define HAVE_ACLX_GET 1
24438_ACEOF
24439
24440fi
24441done
24442
24443 if test $ac_cv_func_aclx_get = yes; then
24444 use_acl=1
24445 fi
24446 fi
24447
24448 if test $use_acl = 0 || test "$ac_cv_func_aclx_get" = yes; then
24449 for ac_func in statacl
24450do :
24451 ac_fn_c_check_func "$LINENO" "statacl" "ac_cv_func_statacl"
24452if test "x$ac_cv_func_statacl" = x""yes; then :
24453 cat >>confdefs.h <<_ACEOF
24454#define HAVE_STATACL 1
24455_ACEOF
24456
24457fi
24458done
24459
24460 if test $ac_cv_func_statacl = yes; then
24461 use_acl=1
24462 fi
24463 fi
24464
24465 if test $use_acl = 0; then
24466 for ac_func in aclsort
24467do :
24468 ac_fn_c_check_func "$LINENO" "aclsort" "ac_cv_func_aclsort"
24469if test "x$ac_cv_func_aclsort" = x""yes; then :
24470 cat >>confdefs.h <<_ACEOF
24471#define HAVE_ACLSORT 1
24472_ACEOF
24473
24474fi
24475done
24476
24477 if test $ac_cv_func_aclsort = yes; then
24478 use_acl=1
24479 fi
24480 fi
24481
24482 LIBS=$ac_save_LIBS
24483 fi
24484 if test "x$enable_acl$use_acl" = "xyes0"; then
24485 as_fn_error "ACLs enabled but support not detected" "$LINENO" 5
24486 elif test "x$enable_acl$use_acl" = "xauto0"; then
24487 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libacl development library was not found or not usable." >&5
24488$as_echo "$as_me: WARNING: libacl development library was not found or not usable." >&2;}
24489 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: emacs will be built without ACL support." >&5
24490$as_echo "$as_me: WARNING: emacs will be built without ACL support." >&2;}
24491 fi
24492 fi
24493
24494
24495cat >>confdefs.h <<_ACEOF
24496#define USE_ACL $use_acl
24497_ACEOF
24498
24499 USE_ACL=$use_acl
24500
24501
24502
24503
24504
24505 if test $ac_cv_func_readlink = no; then
24506 HAVE_READLINK=0
24507 else
24508 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
24509$as_echo_n "checking whether readlink signature is correct... " >&6; }
24510if test "${gl_cv_decl_readlink_works+set}" = set; then :
24511 $as_echo_n "(cached) " >&6
24512else
24513 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24514/* end confdefs.h. */
24515#include <unistd.h>
24516 /* Cause compilation failure if original declaration has wrong type. */
24517 ssize_t readlink (const char *, char *, size_t);
24518int
f199cab1
GM
24519main ()
24520{
5476a9a4 24521
f199cab1
GM
24522 ;
24523 return 0;
24524}
3e0be4ab 24525_ACEOF
5476a9a4
GM
24526if ac_fn_c_try_compile "$LINENO"; then :
24527 gl_cv_decl_readlink_works=yes
24528else
24529 gl_cv_decl_readlink_works=no
3e0be4ab 24530fi
5476a9a4
GM
24531rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24532fi
24533{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5
24534$as_echo "$gl_cv_decl_readlink_works" >&6; }
24535 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
24536$as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; }
24537if test "${gl_cv_func_readlink_works+set}" = set; then :
24538 $as_echo_n "(cached) " >&6
24539else
24540 # We have readlink, so assume ln -s works.
24541 ln -s conftest.no-such conftest.link
24542 ln -s conftest.link conftest.lnk2
24543 if test "$cross_compiling" = yes; then :
24544 case "$host_os" in
24545 # Guess yes on glibc systems.
24546 *-gnu*) gl_cv_func_readlink_works="guessing yes" ;;
24547 # If we don't know, assume the worst.
24548 *) gl_cv_func_readlink_works="guessing no" ;;
24549 esac
24550
24551else
f199cab1 24552 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 24553/* end confdefs.h. */
5476a9a4
GM
24554#include <unistd.h>
24555
f199cab1
GM
24556int
24557main ()
24558{
5476a9a4
GM
24559char buf[20];
24560 return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;
f199cab1
GM
24561 ;
24562 return 0;
24563}
067d23c9 24564_ACEOF
5476a9a4
GM
24565if ac_fn_c_try_run "$LINENO"; then :
24566 gl_cv_func_readlink_works=yes
24567else
24568 gl_cv_func_readlink_works=no
067d23c9 24569fi
5476a9a4
GM
24570rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24571 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1 24572fi
067d23c9 24573
5476a9a4 24574 rm -f conftest.link conftest.lnk2
f199cab1 24575fi
5476a9a4
GM
24576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_works" >&5
24577$as_echo "$gl_cv_func_readlink_works" >&6; }
24578 case "$gl_cv_func_readlink_works" in
24579 *yes)
24580 if test "$gl_cv_decl_readlink_works" != yes; then
24581 REPLACE_READLINK=1
24582 fi
24583 ;;
24584 *)
067d23c9 24585
5476a9a4 24586$as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
067d23c9 24587
5476a9a4
GM
24588 REPLACE_READLINK=1
24589 ;;
24590 esac
24591 fi
3e0be4ab 24592
a6342fc8 24593 if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
3e0be4ab
GM
24594
24595
24596
24597
3e0be4ab
GM
24598
24599
5476a9a4
GM
24600
24601
24602 gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext"
24603
24604
24605 :
3e0be4ab 24606
a6342fc8 24607 fi
3e0be4ab 24608
067d23c9 24609
067d23c9 24610
067d23c9 24611
067d23c9 24612
5476a9a4 24613 GNULIB_READLINK=1
067d23c9 24614
067d23c9 24615
067d23c9 24616
067d23c9
KY
24617
24618
067d23c9 24619
d7ad186c
GM
24620
24621
24622
24623 if test $ac_cv_func_readlinkat = no; then
24624 HAVE_READLINKAT=0
24625 fi
24626
24627 if test $HAVE_READLINKAT = 0; then
24628
24629
24630
24631
24632
24633
24634
24635
24636 gl_LIBOBJS="$gl_LIBOBJS readlinkat.$ac_objext"
24637
24638 fi
24639
24640
24641
24642
24643
24644 GNULIB_READLINKAT=1
24645
24646
24647
24648
24649
24650
e4184a20
GM
24651 for ac_func in sig2str
24652do :
24653 ac_fn_c_check_func "$LINENO" "sig2str" "ac_cv_func_sig2str"
24654if test "x$ac_cv_func_sig2str" = x""yes; then :
24655 cat >>confdefs.h <<_ACEOF
24656#define HAVE_SIG2STR 1
24657_ACEOF
24658
24659fi
24660done
24661
24662
24663 if test $ac_cv_func_sig2str = no; then
24664
24665
24666
24667
24668
24669
24670
24671
24672 gl_LIBOBJS="$gl_LIBOBJS sig2str.$ac_objext"
24673
24674
24675 :
24676
24677 fi
24678
369e19fc 24679
067d23c9 24680
5476a9a4
GM
24681
24682
24683
24684
24685
24686
24687
24688
24689 if test $gl_cv_have_include_next = yes; then
24690 gl_cv_next_signal_h='<'signal.h'>'
24691 else
24692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
24693$as_echo_n "checking absolute name of <signal.h>... " >&6; }
24694if test "${gl_cv_next_signal_h+set}" = set; then :
0eb775a3 24695 $as_echo_n "(cached) " >&6
0eb775a3 24696else
5476a9a4
GM
24697
24698 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0eb775a3 24699/* end confdefs.h. */
5476a9a4 24700#include <signal.h>
f199cab1 24701
0eb775a3 24702_ACEOF
5476a9a4
GM
24703 case "$host_os" in
24704 aix*) gl_absname_cpp="$ac_cpp -C" ;;
24705 *) gl_absname_cpp="$ac_cpp" ;;
24706 esac
0eb775a3 24707
5476a9a4
GM
24708 case "$host_os" in
24709 mingw*)
24710 gl_dirsep_regex='[/\\]'
24711 ;;
24712 *)
24713 gl_dirsep_regex='\/'
24714 ;;
24715 esac
24716 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
0eb775a3 24717
5476a9a4
GM
24718 gl_header_literal_regex=`echo 'signal.h' \
24719 | sed -e "$gl_make_literal_regex_sed"`
24720 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
24721 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
24722 s|^/[^/]|//&|
24723 p
24724 q
24725 }'
24726 gl_cv_next_signal_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24727 sed -n "$gl_absolute_header_sed"`'"'
0eb775a3 24728
f199cab1 24729
5476a9a4
GM
24730fi
24731{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
24732$as_echo "$gl_cv_next_signal_h" >&6; }
24733 fi
24734 NEXT_SIGNAL_H=$gl_cv_next_signal_h
067d23c9 24735
5476a9a4
GM
24736 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24737 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
24738 gl_next_as_first_directive='<'signal.h'>'
24739 else
24740 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
24741 gl_next_as_first_directive=$gl_cv_next_signal_h
24742 fi
24743 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
067d23c9 24744
067d23c9
KY
24745
24746
067d23c9 24747
067d23c9 24748
5476a9a4
GM
24749# AIX declares sig_atomic_t to already include volatile, and C89 compilers
24750# then choke on 'volatile sig_atomic_t'. C99 requires that it compile.
24751 ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
24752#include <signal.h>
24753
24754"
24755if test "x$ac_cv_type_volatile_sig_atomic_t" = x""yes; then :
24756
24757else
24758 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
f199cab1 24759fi
067d23c9 24760
067d23c9 24761
067d23c9 24762
067d23c9 24763
938a4ef9 24764
938a4ef9 24765
5476a9a4
GM
24766
24767 ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
24768#include <signal.h>
24769
24770"
24771if test "x$ac_cv_type_sighandler_t" = x""yes; then :
24772
24773else
24774 HAVE_SIGHANDLER_T=0
24775fi
24776
24777
24778
24779
a6342fc8 24780 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
5476a9a4
GM
24781/* <sys/types.h> is not needed according to POSIX, but the
24782 <sys/socket.h> in i386-unknown-freebsd4.10 and
24783 powerpc-apple-darwin5.5 required it. */
24784#include <sys/types.h>
24785#if HAVE_SYS_SOCKET_H
24786# include <sys/socket.h>
24787#elif HAVE_WS2TCPIP_H
24788# include <ws2tcpip.h>
24789#endif
24790
24791"
24792if test "x$ac_cv_type_socklen_t" = x""yes; then :
24793
067d23c9 24794else
5476a9a4
GM
24795 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5
24796$as_echo_n "checking for socklen_t equivalent... " >&6; }
24797 if test "${gl_cv_socklen_t_equiv+set}" = set; then :
24798 $as_echo_n "(cached) " >&6
24799else
24800 # Systems have either "struct sockaddr *" or
24801 # "void *" as the second argument to getpeername
24802 gl_cv_socklen_t_equiv=
24803 for arg2 in "struct sockaddr" void; do
24804 for t in int size_t "unsigned int" "long int" "unsigned long int"; do
24805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 24806/* end confdefs.h. */
5476a9a4
GM
24807#include <sys/types.h>
24808 #include <sys/socket.h>
24809
24810 int getpeername (int, $arg2 *, $t *);
f199cab1
GM
24811int
24812main ()
24813{
5476a9a4
GM
24814$t len;
24815 getpeername (0, 0, &len);
f199cab1
GM
24816 ;
24817 return 0;
24818}
3e0be4ab 24819_ACEOF
5476a9a4
GM
24820if ac_fn_c_try_compile "$LINENO"; then :
24821 gl_cv_socklen_t_equiv="$t"
067d23c9 24822fi
5476a9a4
GM
24823rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24824 test "$gl_cv_socklen_t_equiv" != "" && break
24825 done
24826 test "$gl_cv_socklen_t_equiv" != "" && break
24827 done
067d23c9 24828
5476a9a4 24829fi
067d23c9 24830
5476a9a4
GM
24831 if test "$gl_cv_socklen_t_equiv" = ""; then
24832 as_fn_error "Cannot find a type to use in place of socklen_t" "$LINENO" 5
24833 fi
24834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socklen_t_equiv" >&5
24835$as_echo "$gl_cv_socklen_t_equiv" >&6; }
24836
24837cat >>confdefs.h <<_ACEOF
24838#define socklen_t $gl_cv_socklen_t_equiv
24839_ACEOF
067d23c9 24840
f199cab1 24841fi
3e0be4ab 24842
3e0be4ab 24843
5476a9a4
GM
24844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
24845$as_echo_n "checking for ssize_t... " >&6; }
24846if test "${gt_cv_ssize_t+set}" = set; then :
f199cab1
GM
24847 $as_echo_n "(cached) " >&6
24848else
5476a9a4 24849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 24850/* end confdefs.h. */
5476a9a4 24851#include <sys/types.h>
f199cab1
GM
24852int
24853main ()
24854{
5476a9a4
GM
24855int x = sizeof (ssize_t *) + sizeof (ssize_t);
24856 return !x;
f199cab1
GM
24857 ;
24858 return 0;
24859}
24860_ACEOF
5476a9a4
GM
24861if ac_fn_c_try_compile "$LINENO"; then :
24862 gt_cv_ssize_t=yes
067d23c9 24863else
5476a9a4 24864 gt_cv_ssize_t=no
f199cab1 24865fi
5476a9a4 24866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
067d23c9 24867fi
5476a9a4
GM
24868{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
24869$as_echo "$gt_cv_ssize_t" >&6; }
24870 if test $gt_cv_ssize_t = no; then
24871
24872$as_echo "#define ssize_t int" >>confdefs.h
24873
24874 fi
24875
24876
24877
24878
24879
5476a9a4
GM
24880 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>
24881 #include <sys/stat.h>
24882"
24883if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = x""yes; then :
24884
24885cat >>confdefs.h <<_ACEOF
24886#define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1
24887_ACEOF
24888
24889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5
24890$as_echo_n "checking whether struct stat.st_atim is of type struct timespec... " >&6; }
24891if test "${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+set}" = set; then :
f199cab1
GM
24892 $as_echo_n "(cached) " >&6
24893else
5476a9a4 24894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 24895/* end confdefs.h. */
3e0be4ab 24896
5476a9a4
GM
24897 #include <sys/types.h>
24898 #include <sys/stat.h>
24899 #if HAVE_SYS_TIME_H
24900 # include <sys/time.h>
24901 #endif
24902 #include <time.h>
24903 struct timespec ts;
24904 struct stat st;
24905
f199cab1
GM
24906int
24907main ()
24908{
5476a9a4
GM
24909
24910 st.st_atim = ts;
24911
f199cab1
GM
24912 ;
24913 return 0;
24914}
3e0be4ab 24915_ACEOF
5476a9a4
GM
24916if ac_fn_c_try_compile "$LINENO"; then :
24917 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes
f199cab1 24918else
5476a9a4 24919 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no
f199cab1 24920fi
5476a9a4 24921rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
067d23c9 24922fi
5476a9a4
GM
24923{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5
24924$as_echo "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; }
24925 if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
067d23c9 24926
5476a9a4 24927$as_echo "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h
067d23c9 24928
5476a9a4
GM
24929 fi
24930else
24931 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>
24932 #include <sys/stat.h>
24933"
24934if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = x""yes; then :
067d23c9 24935
5476a9a4
GM
24936cat >>confdefs.h <<_ACEOF
24937#define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1
24938_ACEOF
3e0be4ab 24939
0eb775a3 24940
3e0be4ab 24941else
5476a9a4
GM
24942 ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h>
24943 #include <sys/stat.h>
24944"
24945if test "x$ac_cv_member_struct_stat_st_atimensec" = x""yes; then :
24946
24947cat >>confdefs.h <<_ACEOF
24948#define HAVE_STRUCT_STAT_ST_ATIMENSEC 1
067d23c9 24949_ACEOF
5476a9a4
GM
24950
24951
067d23c9 24952else
5476a9a4
GM
24953 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>
24954 #include <sys/stat.h>
24955"
24956if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = x""yes; then :
24957
24958cat >>confdefs.h <<_ACEOF
24959#define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1
24960_ACEOF
24961
24962
3e0be4ab 24963fi
5476a9a4 24964
067d23c9 24965fi
5476a9a4 24966
067d23c9 24967fi
067d23c9
KY
24968
24969fi
24970
067d23c9 24971
067d23c9 24972
067d23c9 24973
067d23c9 24974
5476a9a4
GM
24975 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>
24976 #include <sys/stat.h>
24977"
24978if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = x""yes; then :
24979
24980cat >>confdefs.h <<_ACEOF
24981#define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1
24982_ACEOF
067d23c9
KY
24983
24984
f199cab1 24985else
5476a9a4
GM
24986 ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include <sys/types.h>
24987 #include <sys/stat.h>
24988"
24989if test "x$ac_cv_member_struct_stat_st_birthtimensec" = x""yes; then :
067d23c9 24990
5476a9a4
GM
24991cat >>confdefs.h <<_ACEOF
24992#define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1
24993_ACEOF
067d23c9 24994
3e0be4ab 24995
067d23c9 24996else
5476a9a4
GM
24997 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>
24998 #include <sys/stat.h>
24999"
25000if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = x""yes; then :
067d23c9 25001
5476a9a4
GM
25002cat >>confdefs.h <<_ACEOF
25003#define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1
067d23c9 25004_ACEOF
5476a9a4
GM
25005
25006
f199cab1 25007fi
5476a9a4 25008
f199cab1 25009fi
5476a9a4 25010
067d23c9 25011fi
0eb775a3 25012
0eb775a3 25013
0eb775a3 25014
5476a9a4
GM
25015 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working stdalign.h" >&5
25016$as_echo_n "checking for working stdalign.h... " >&6; }
25017if test "${gl_cv_header_working_stdalign_h+set}" = set; then :
f199cab1 25018 $as_echo_n "(cached) " >&6
067d23c9 25019else
5476a9a4 25020 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 25021/* end confdefs.h. */
5476a9a4
GM
25022#include <stdalign.h>
25023 #include <stddef.h>
25024
25025 /* Test that alignof yields a result consistent with offsetof.
25026 This catches GCC bug 52023
25027 <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. */
25028 #ifdef __cplusplus
25029 template <class t> struct alignof_helper { char a; t b; };
25030 # define ao(type) offsetof (alignof_helper<type>, b)
25031 #else
25032 # define ao(type) offsetof (struct { char a; type b; }, b)
25033 #endif
25034 char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1];
25035 char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1];
25036 char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1];
25037
25038 /* Test _Alignas only on platforms where gnulib can help. */
25039 #if \
25040 (__GNUC__ || __IBMC__ || __IBMCPP__ \
25041 || 0x5110 <= __SUNPRO_C || 1300 <= _MSC_VER)
6ea3f01e
GM
25042 struct alignas_test { char c; char alignas (8) alignas_8; };
25043 char test_alignas[offsetof (struct alignas_test, alignas_8) == 8
25044 ? 1 : -1];
5476a9a4 25045 #endif
067d23c9 25046
f199cab1
GM
25047int
25048main ()
25049{
5476a9a4 25050
f199cab1
GM
25051 ;
25052 return 0;
25053}
25054_ACEOF
5476a9a4
GM
25055if ac_fn_c_try_compile "$LINENO"; then :
25056 gl_cv_header_working_stdalign_h=yes
f199cab1 25057else
5476a9a4 25058 gl_cv_header_working_stdalign_h=no
f199cab1 25059fi
5476a9a4 25060rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
067d23c9 25061fi
5476a9a4
GM
25062{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdalign_h" >&5
25063$as_echo "$gl_cv_header_working_stdalign_h" >&6; }
067d23c9 25064
5476a9a4
GM
25065 if test $gl_cv_header_working_stdalign_h = yes; then
25066 STDALIGN_H=''
25067 else
25068 STDALIGN_H='stdalign.h'
f199cab1 25069 fi
0eb775a3 25070
5476a9a4
GM
25071
25072 if test -n "$STDALIGN_H"; then
25073 GL_GENERATE_STDALIGN_H_TRUE=
25074 GL_GENERATE_STDALIGN_H_FALSE='#'
f199cab1 25075else
5476a9a4
GM
25076 GL_GENERATE_STDALIGN_H_TRUE='#'
25077 GL_GENERATE_STDALIGN_H_FALSE=
0eb775a3 25078fi
0eb775a3
GM
25079
25080
25081
5476a9a4
GM
25082 STDARG_H=''
25083 NEXT_STDARG_H='<stdarg.h>'
25084 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5
25085$as_echo_n "checking for va_copy... " >&6; }
25086 if test "${gl_cv_func_va_copy+set}" = set; then :
f199cab1 25087 $as_echo_n "(cached) " >&6
5476a9a4
GM
25088else
25089
25090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25091/* end confdefs.h. */
25092#include <stdarg.h>
f199cab1
GM
25093int
25094main ()
25095{
5476a9a4
GM
25096
25097#ifndef va_copy
25098void (*func) (va_list, va_list) = va_copy;
25099#endif
25100
f199cab1
GM
25101 ;
25102 return 0;
25103}
25104_ACEOF
5476a9a4
GM
25105if ac_fn_c_try_compile "$LINENO"; then :
25106 gl_cv_func_va_copy=yes
f199cab1 25107else
5476a9a4 25108 gl_cv_func_va_copy=no
f199cab1 25109fi
5476a9a4 25110rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 25111fi
5476a9a4
GM
25112
25113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_va_copy" >&5
25114$as_echo "$gl_cv_func_va_copy" >&6; }
25115 if test $gl_cv_func_va_copy = no; then
25116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25117/* end confdefs.h. */
25118#if defined _AIX && !defined __GNUC__
25119 AIX vaccine
25120 #endif
25121
25122_ACEOF
25123if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25124 $EGREP "vaccine" >/dev/null 2>&1; then :
25125 gl_aixcc=yes
f199cab1 25126else
5476a9a4 25127 gl_aixcc=no
f199cab1 25128fi
5476a9a4 25129rm -f conftest*
0eb775a3 25130
5476a9a4
GM
25131 if test $gl_aixcc = yes; then
25132 STDARG_H=stdarg.h
0eb775a3
GM
25133
25134
5476a9a4
GM
25135
25136
25137
25138
25139
25140
25141 if test $gl_cv_have_include_next = yes; then
25142 gl_cv_next_stdarg_h='<'stdarg.h'>'
25143 else
25144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdarg.h>" >&5
25145$as_echo_n "checking absolute name of <stdarg.h>... " >&6; }
25146if test "${gl_cv_next_stdarg_h+set}" = set; then :
f199cab1
GM
25147 $as_echo_n "(cached) " >&6
25148else
5476a9a4
GM
25149
25150 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 25151/* end confdefs.h. */
5476a9a4 25152#include <stdarg.h>
0eb775a3 25153
f199cab1 25154_ACEOF
5476a9a4
GM
25155 case "$host_os" in
25156 aix*) gl_absname_cpp="$ac_cpp -C" ;;
25157 *) gl_absname_cpp="$ac_cpp" ;;
25158 esac
25159
25160 case "$host_os" in
25161 mingw*)
25162 gl_dirsep_regex='[/\\]'
25163 ;;
25164 *)
25165 gl_dirsep_regex='\/'
25166 ;;
25167 esac
25168 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25169
25170 gl_header_literal_regex=`echo 'stdarg.h' \
25171 | sed -e "$gl_make_literal_regex_sed"`
25172 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25173 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25174 s|^/[^/]|//&|
25175 p
25176 q
25177 }'
25178 gl_cv_next_stdarg_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25179 sed -n "$gl_absolute_header_sed"`'"'
25180
25181
f199cab1 25182fi
5476a9a4
GM
25183{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdarg_h" >&5
25184$as_echo "$gl_cv_next_stdarg_h" >&6; }
25185 fi
25186 NEXT_STDARG_H=$gl_cv_next_stdarg_h
25187
25188 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25189 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25190 gl_next_as_first_directive='<'stdarg.h'>'
25191 else
25192 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25193 gl_next_as_first_directive=$gl_cv_next_stdarg_h
25194 fi
25195 NEXT_AS_FIRST_DIRECTIVE_STDARG_H=$gl_next_as_first_directive
0eb775a3
GM
25196
25197
25198
5476a9a4
GM
25199
25200 if test "$gl_cv_next_stdarg_h" = '""'; then
25201 gl_cv_next_stdarg_h='"///usr/include/stdarg.h"'
25202 NEXT_STDARG_H="$gl_cv_next_stdarg_h"
25203 fi
f199cab1 25204 else
5476a9a4
GM
25205
25206 saved_as_echo_n="$as_echo_n"
25207 as_echo_n=':'
25208 if test "${gl_cv_func___va_copy+set}" = set; then :
f199cab1
GM
25209 $as_echo_n "(cached) " >&6
25210else
0eb775a3 25211
5476a9a4
GM
25212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25213/* end confdefs.h. */
25214#include <stdarg.h>
f199cab1
GM
25215int
25216main ()
25217{
5476a9a4
GM
25218
25219#ifndef __va_copy
25220error, bail out
25221#endif
25222
f199cab1
GM
25223 ;
25224 return 0;
25225}
25226_ACEOF
5476a9a4
GM
25227if ac_fn_c_try_compile "$LINENO"; then :
25228 gl_cv_func___va_copy=yes
f199cab1 25229else
5476a9a4 25230 gl_cv_func___va_copy=no
f199cab1 25231fi
5476a9a4 25232rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 25233fi
0eb775a3 25234
5476a9a4
GM
25235 as_echo_n="$saved_as_echo_n"
25236
25237 if test $gl_cv_func___va_copy = yes; then
25238
25239$as_echo "#define va_copy __va_copy" >>confdefs.h
25240
25241 else
0eb775a3 25242
5476a9a4
GM
25243
25244$as_echo "#define va_copy gl_va_copy" >>confdefs.h
0eb775a3 25245
f199cab1
GM
25246 fi
25247 fi
5476a9a4
GM
25248 fi
25249
25250 if test -n "$STDARG_H"; then
25251 GL_GENERATE_STDARG_H_TRUE=
25252 GL_GENERATE_STDARG_H_FALSE='#'
25253else
25254 GL_GENERATE_STDARG_H_TRUE='#'
25255 GL_GENERATE_STDARG_H_FALSE=
25256fi
25257
25258
25259
25260
25261
25262
25263 # Define two additional variables used in the Makefile substitution.
25264
25265 if test "$ac_cv_header_stdbool_h" = yes; then
25266 STDBOOL_H=''
25267 else
25268 STDBOOL_H='stdbool.h'
25269 fi
25270
25271 if test -n "$STDBOOL_H"; then
25272 GL_GENERATE_STDBOOL_H_TRUE=
25273 GL_GENERATE_STDBOOL_H_FALSE='#'
25274else
25275 GL_GENERATE_STDBOOL_H_TRUE='#'
25276 GL_GENERATE_STDBOOL_H_FALSE=
25277fi
25278
25279
25280 if test "$ac_cv_type__Bool" = yes; then
25281 HAVE__BOOL=1
25282 else
25283 HAVE__BOOL=0
25284 fi
25285
25286
25287
25288
25289
25290 STDDEF_H=
25291 if test $gt_cv_c_wchar_t = no; then
25292 HAVE_WCHAR_T=0
25293 STDDEF_H=stddef.h
25294 fi
25295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
25296$as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
25297if test "${gl_cv_decl_null_works+set}" = set; then :
f199cab1
GM
25298 $as_echo_n "(cached) " >&6
25299else
5476a9a4 25300 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 25301/* end confdefs.h. */
5476a9a4
GM
25302#include <stddef.h>
25303 int test[2 * (sizeof NULL == sizeof (void *)) -1];
3e0be4ab 25304
f199cab1
GM
25305int
25306main ()
25307{
5476a9a4 25308
f199cab1
GM
25309 ;
25310 return 0;
25311}
25312_ACEOF
5476a9a4
GM
25313if ac_fn_c_try_compile "$LINENO"; then :
25314 gl_cv_decl_null_works=yes
f199cab1 25315else
5476a9a4 25316 gl_cv_decl_null_works=no
f199cab1 25317fi
5476a9a4 25318rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 25319fi
5476a9a4
GM
25320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
25321$as_echo "$gl_cv_decl_null_works" >&6; }
25322 if test $gl_cv_decl_null_works = no; then
25323 REPLACE_NULL=1
25324 STDDEF_H=stddef.h
25325 fi
25326
25327 if test -n "$STDDEF_H"; then
25328 GL_GENERATE_STDDEF_H_TRUE=
25329 GL_GENERATE_STDDEF_H_FALSE='#'
f199cab1 25330else
5476a9a4
GM
25331 GL_GENERATE_STDDEF_H_TRUE='#'
25332 GL_GENERATE_STDDEF_H_FALSE=
f199cab1 25333fi
3e0be4ab 25334
5476a9a4 25335 if test -n "$STDDEF_H"; then
3e0be4ab
GM
25336
25337
5476a9a4
GM
25338
25339
25340
25341
25342
25343
25344 if test $gl_cv_have_include_next = yes; then
25345 gl_cv_next_stddef_h='<'stddef.h'>'
25346 else
25347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
25348$as_echo_n "checking absolute name of <stddef.h>... " >&6; }
25349if test "${gl_cv_next_stddef_h+set}" = set; then :
067d23c9
KY
25350 $as_echo_n "(cached) " >&6
25351else
5476a9a4
GM
25352
25353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 25354/* end confdefs.h. */
5476a9a4 25355#include <stddef.h>
f199cab1 25356
067d23c9 25357_ACEOF
5476a9a4
GM
25358 case "$host_os" in
25359 aix*) gl_absname_cpp="$ac_cpp -C" ;;
25360 *) gl_absname_cpp="$ac_cpp" ;;
25361 esac
25362
25363 case "$host_os" in
25364 mingw*)
25365 gl_dirsep_regex='[/\\]'
25366 ;;
25367 *)
25368 gl_dirsep_regex='\/'
25369 ;;
25370 esac
25371 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25372
25373 gl_header_literal_regex=`echo 'stddef.h' \
25374 | sed -e "$gl_make_literal_regex_sed"`
25375 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25376 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25377 s|^/[^/]|//&|
25378 p
25379 q
25380 }'
25381 gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25382 sed -n "$gl_absolute_header_sed"`'"'
25383
25384
f199cab1 25385fi
5476a9a4
GM
25386{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
25387$as_echo "$gl_cv_next_stddef_h" >&6; }
25388 fi
25389 NEXT_STDDEF_H=$gl_cv_next_stddef_h
25390
25391 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25392 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25393 gl_next_as_first_directive='<'stddef.h'>'
25394 else
25395 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25396 gl_next_as_first_directive=$gl_cv_next_stddef_h
25397 fi
25398 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
25399
f199cab1 25400
f199cab1 25401
f199cab1 25402
067d23c9 25403 fi
067d23c9 25404
f199cab1 25405
067d23c9 25406
067d23c9 25407
067d23c9 25408
067d23c9
KY
25409
25410
067d23c9 25411
067d23c9
KY
25412
25413
067d23c9 25414
3e0be4ab 25415
5476a9a4
GM
25416 if test $gl_cv_have_include_next = yes; then
25417 gl_cv_next_stdio_h='<'stdio.h'>'
25418 else
25419 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
25420$as_echo_n "checking absolute name of <stdio.h>... " >&6; }
25421if test "${gl_cv_next_stdio_h+set}" = set; then :
25422 $as_echo_n "(cached) " >&6
f199cab1 25423else
5476a9a4
GM
25424
25425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25426/* end confdefs.h. */
25427#include <stdio.h>
25428
f199cab1 25429_ACEOF
5476a9a4
GM
25430 case "$host_os" in
25431 aix*) gl_absname_cpp="$ac_cpp -C" ;;
25432 *) gl_absname_cpp="$ac_cpp" ;;
25433 esac
067d23c9 25434
5476a9a4
GM
25435 case "$host_os" in
25436 mingw*)
25437 gl_dirsep_regex='[/\\]'
25438 ;;
25439 *)
25440 gl_dirsep_regex='\/'
25441 ;;
25442 esac
25443 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25444
25445 gl_header_literal_regex=`echo 'stdio.h' \
25446 | sed -e "$gl_make_literal_regex_sed"`
25447 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25448 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25449 s|^/[^/]|//&|
25450 p
25451 q
25452 }'
25453 gl_cv_next_stdio_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25454 sed -n "$gl_absolute_header_sed"`'"'
067d23c9 25455
067d23c9 25456
f199cab1 25457fi
5476a9a4
GM
25458{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
25459$as_echo "$gl_cv_next_stdio_h" >&6; }
25460 fi
25461 NEXT_STDIO_H=$gl_cv_next_stdio_h
067d23c9 25462
5476a9a4
GM
25463 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25464 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25465 gl_next_as_first_directive='<'stdio.h'>'
25466 else
25467 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25468 gl_next_as_first_directive=$gl_cv_next_stdio_h
25469 fi
25470 NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
25471
25472
25473
25474
25475
25476 GNULIB_FSCANF=1
25477
25478
25479cat >>confdefs.h <<_ACEOF
25480#define GNULIB_FSCANF 1
25481_ACEOF
067d23c9 25482
067d23c9 25483
5476a9a4 25484 GNULIB_SCANF=1
f199cab1 25485
f199cab1 25486
5476a9a4
GM
25487cat >>confdefs.h <<_ACEOF
25488#define GNULIB_SCANF 1
f199cab1
GM
25489_ACEOF
25490
067d23c9 25491
5476a9a4
GM
25492 GNULIB_FGETC=1
25493 GNULIB_GETC=1
25494 GNULIB_GETCHAR=1
25495 GNULIB_FGETS=1
25496 GNULIB_FREAD=1
067d23c9 25497
067d23c9 25498
5476a9a4
GM
25499 GNULIB_FPRINTF=1
25500 GNULIB_PRINTF=1
25501 GNULIB_VFPRINTF=1
25502 GNULIB_VPRINTF=1
25503 GNULIB_FPUTC=1
25504 GNULIB_PUTC=1
25505 GNULIB_PUTCHAR=1
25506 GNULIB_FPUTS=1
25507 GNULIB_PUTS=1
25508 GNULIB_FWRITE=1
067d23c9 25509
067d23c9 25510
067d23c9 25511
067d23c9 25512
067d23c9 25513
067d23c9 25514
067d23c9 25515
067d23c9 25516
3e0be4ab
GM
25517
25518
25519
25520
25521
25522
3e0be4ab 25523
5476a9a4
GM
25524 if test $gl_cv_have_include_next = yes; then
25525 gl_cv_next_stdlib_h='<'stdlib.h'>'
25526 else
25527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
25528$as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
25529if test "${gl_cv_next_stdlib_h+set}" = set; then :
067d23c9
KY
25530 $as_echo_n "(cached) " >&6
25531else
5476a9a4
GM
25532
25533 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 25534/* end confdefs.h. */
5476a9a4
GM
25535#include <stdlib.h>
25536
f199cab1 25537_ACEOF
5476a9a4
GM
25538 case "$host_os" in
25539 aix*) gl_absname_cpp="$ac_cpp -C" ;;
25540 *) gl_absname_cpp="$ac_cpp" ;;
25541 esac
067d23c9 25542
5476a9a4
GM
25543 case "$host_os" in
25544 mingw*)
25545 gl_dirsep_regex='[/\\]'
25546 ;;
25547 *)
25548 gl_dirsep_regex='\/'
25549 ;;
25550 esac
25551 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25552
25553 gl_header_literal_regex=`echo 'stdlib.h' \
25554 | sed -e "$gl_make_literal_regex_sed"`
25555 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25556 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25557 s|^/[^/]|//&|
25558 p
25559 q
25560 }'
25561 gl_cv_next_stdlib_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25562 sed -n "$gl_absolute_header_sed"`'"'
3e0be4ab 25563
067d23c9 25564
f199cab1 25565fi
5476a9a4
GM
25566{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
25567$as_echo "$gl_cv_next_stdlib_h" >&6; }
25568 fi
25569 NEXT_STDLIB_H=$gl_cv_next_stdlib_h
b0415a03 25570
5476a9a4
GM
25571 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25572 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25573 gl_next_as_first_directive='<'stdlib.h'>'
25574 else
25575 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25576 gl_next_as_first_directive=$gl_cv_next_stdlib_h
25577 fi
25578 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
b0415a03 25579
067d23c9 25580
067d23c9 25581
067d23c9 25582
067d23c9 25583
067d23c9 25584
067d23c9 25585
067d23c9 25586
067d23c9 25587
5476a9a4 25588 # This defines (or not) HAVE_TZNAME and HAVE_TM_ZONE.
067d23c9 25589
067d23c9 25590
067d23c9 25591
b0415a03
GM
25592
25593
ac1ca7e9 25594
0eb775a3 25595
5476a9a4 25596$as_echo "#define my_strftime nstrftime" >>confdefs.h
067d23c9 25597
067d23c9 25598
a0a61e58
GM
25599
25600
25601
3e0be4ab 25602
5476a9a4
GM
25603
25604
283c7aed
GM
25605
25606
25607
5476a9a4
GM
25608 if test "$ac_cv_have_decl_strtoimax" != yes; then
25609 HAVE_DECL_STRTOIMAX=0
25610 fi
25611
25612 if test $ac_cv_func_strtoimax = yes; then
25613 HAVE_STRTOIMAX=1
25614 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtoimax works" >&5
25615$as_echo_n "checking whether strtoimax works... " >&6; }
25616if test "${gl_cv_func_strtoimax+set}" = set; then :
f199cab1
GM
25617 $as_echo_n "(cached) " >&6
25618else
25619 if test "$cross_compiling" = yes; then :
5476a9a4
GM
25620 case "$host_os" in
25621 # Guess no on AIX 5.
25622 aix5*) gl_cv_func_strtoimax="guessing no" ;;
25623 # Guess yes otherwise.
25624 *) gl_cv_func_strtoimax="guessing yes" ;;
25625 esac
25626
f199cab1
GM
25627else
25628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25629/* end confdefs.h. */
3e0be4ab 25630
5476a9a4
GM
25631#include <errno.h>
25632#include <string.h>
25633#include <inttypes.h>
25634int main ()
25635{
25636 if (sizeof (intmax_t) > sizeof (int))
25637 {
25638 const char *s = "4294967295";
25639 char *p;
25640 intmax_t res;
25641 errno = 0;
25642 res = strtoimax (s, &p, 10);
25643 if (p != s + strlen (s))
25644 return 1;
25645 if (errno != 0)
25646 return 2;
25647 if (res != (intmax_t) 65535 * (intmax_t) 65537)
25648 return 3;
25649 }
25650 else
25651 {
25652 const char *s = "2147483647";
25653 char *p;
25654 intmax_t res;
25655 errno = 0;
25656 res = strtoimax (s, &p, 10);
25657 if (p != s + strlen (s))
25658 return 1;
25659 if (errno != 0)
25660 return 2;
25661 if (res != 2147483647)
25662 return 3;
25663 }
f199cab1
GM
25664 return 0;
25665}
5476a9a4 25666
f199cab1
GM
25667_ACEOF
25668if ac_fn_c_try_run "$LINENO"; then :
5476a9a4 25669 gl_cv_func_strtoimax=yes
f199cab1 25670else
5476a9a4 25671 gl_cv_func_strtoimax=no
f199cab1
GM
25672fi
25673rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25674 conftest.$ac_objext conftest.beam conftest.$ac_ext
067d23c9
KY
25675fi
25676
3e0be4ab 25677
f199cab1 25678fi
5476a9a4
GM
25679{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtoimax" >&5
25680$as_echo "$gl_cv_func_strtoimax" >&6; }
25681 case "$gl_cv_func_strtoimax" in
25682 *no) REPLACE_STRTOIMAX=1 ;;
25683 esac
25684 else
25685 HAVE_STRTOIMAX=0
25686 fi
067d23c9 25687
a6342fc8 25688 if test $HAVE_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; then
067d23c9 25689
067d23c9 25690
067d23c9 25691
067d23c9 25692
067d23c9 25693
3e0be4ab 25694
2b1928b8
GM
25695
25696
5476a9a4
GM
25697 gl_LIBOBJS="$gl_LIBOBJS strtoimax.$ac_objext"
25698
25699
25700 ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
25701if test "x$ac_cv_have_decl_strtoll" = x""yes; then :
25702 ac_have_decl=1
f199cab1 25703else
5476a9a4 25704 ac_have_decl=0
f199cab1 25705fi
2b1928b8 25706
5476a9a4
GM
25707cat >>confdefs.h <<_ACEOF
25708#define HAVE_DECL_STRTOLL $ac_have_decl
25709_ACEOF
25710
25711
067d23c9 25712
a6342fc8 25713 fi
067d23c9 25714
3e0be4ab
GM
25715
25716
25717
3e0be4ab 25718
5476a9a4 25719 GNULIB_STRTOIMAX=1
3e0be4ab
GM
25720
25721
25722
25723
3e0be4ab
GM
25724
25725
25726
f199cab1 25727
f199cab1 25728
5476a9a4
GM
25729 if test "$ac_cv_have_decl_strtoumax" != yes; then
25730 HAVE_DECL_STRTOUMAX=0
25731 fi
067d23c9 25732
a6342fc8 25733 if test $ac_cv_func_strtoumax = no; then
0eb775a3 25734
5476a9a4
GM
25735
25736
25737
25738
25739
25740
25741
25742 gl_LIBOBJS="$gl_LIBOBJS strtoumax.$ac_objext"
25743
25744
25745 ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
25746if test "x$ac_cv_have_decl_strtoull" = x""yes; then :
25747 ac_have_decl=1
067d23c9 25748else
5476a9a4 25749 ac_have_decl=0
067d23c9 25750fi
5476a9a4
GM
25751
25752cat >>confdefs.h <<_ACEOF
25753#define HAVE_DECL_STRTOULL $ac_have_decl
25754_ACEOF
25755
25756
25757
a6342fc8 25758 fi
067d23c9 25759
067d23c9 25760
067d23c9 25761
067d23c9 25762
067d23c9 25763
5476a9a4
GM
25764 GNULIB_STRTOUMAX=1
25765
25766
25767
25768
25769
25770
25771
25772 if test $ac_cv_func_symlink = no; then
25773 HAVE_SYMLINK=0
25774 else
25775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether symlink handles trailing slash correctly" >&5
25776$as_echo_n "checking whether symlink handles trailing slash correctly... " >&6; }
25777if test "${gl_cv_func_symlink_works+set}" = set; then :
f199cab1 25778 $as_echo_n "(cached) " >&6
5476a9a4
GM
25779else
25780 if test "$cross_compiling" = yes; then :
25781 case "$host_os" in
25782 # Guess yes on glibc systems.
25783 *-gnu*) gl_cv_func_symlink_works="guessing yes" ;;
25784 # If we don't know, assume the worst.
25785 *) gl_cv_func_symlink_works="guessing no" ;;
25786 esac
25787
f199cab1
GM
25788else
25789 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25790/* end confdefs.h. */
5476a9a4
GM
25791#include <unistd.h>
25792
f199cab1
GM
25793int
25794main ()
25795{
5476a9a4
GM
25796int result = 0;
25797 if (!symlink ("a", "conftest.link/"))
25798 result |= 1;
25799 if (symlink ("conftest.f", "conftest.lnk2"))
25800 result |= 2;
25801 else if (!symlink ("a", "conftest.lnk2/"))
25802 result |= 4;
25803 return result;
067d23c9 25804
f199cab1
GM
25805 ;
25806 return 0;
25807}
25808_ACEOF
5476a9a4
GM
25809if ac_fn_c_try_run "$LINENO"; then :
25810 gl_cv_func_symlink_works=yes
f199cab1 25811else
5476a9a4 25812 gl_cv_func_symlink_works=no
f199cab1 25813fi
5476a9a4
GM
25814rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25815 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1 25816fi
067d23c9 25817
5476a9a4 25818 rm -f conftest.f conftest.link conftest.lnk2
f199cab1 25819fi
5476a9a4
GM
25820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_symlink_works" >&5
25821$as_echo "$gl_cv_func_symlink_works" >&6; }
25822 case "$gl_cv_func_symlink_works" in
25823 *yes) ;;
25824 *)
25825 REPLACE_SYMLINK=1
25826 ;;
25827 esac
25828 fi
067d23c9 25829
a6342fc8 25830 if test $HAVE_SYMLINK = 0 || test $REPLACE_SYMLINK = 1; then
067d23c9 25831
7e723570 25832
7e723570
GM
25833
25834
dd0d840e 25835
dd0d840e
GM
25836
25837
25838
5476a9a4 25839 gl_LIBOBJS="$gl_LIBOBJS symlink.$ac_objext"
dd0d840e 25840
a6342fc8 25841 fi
dd0d840e
GM
25842
25843
d3127c14
GM
25844
25845
d3127c14 25846
5476a9a4 25847 GNULIB_SYMLINK=1
d3127c14 25848
d3127c14 25849
d3127c14
GM
25850
25851
067d23c9 25852
067d23c9 25853
d3127c14 25854
d3127c14 25855
5476a9a4
GM
25856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/select.h> is self-contained" >&5
25857$as_echo_n "checking whether <sys/select.h> is self-contained... " >&6; }
25858if test "${gl_cv_header_sys_select_h_selfcontained+set}" = set; then :
25859 $as_echo_n "(cached) " >&6
25860else
d3127c14 25861
5476a9a4
GM
25862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25863/* end confdefs.h. */
25864#include <sys/select.h>
25865int
25866main ()
25867{
25868struct timeval b;
25869 ;
25870 return 0;
25871}
25872_ACEOF
25873if ac_fn_c_try_compile "$LINENO"; then :
25874 gl_cv_header_sys_select_h_selfcontained=yes
25875else
25876 gl_cv_header_sys_select_h_selfcontained=no
25877fi
25878rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25879 if test $gl_cv_header_sys_select_h_selfcontained = yes; then
25880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25881/* end confdefs.h. */
25882#include <sys/select.h>
25883int
25884main ()
25885{
25886int memset; int bzero;
25887 ;
25888 return 0;
25889}
3e0be4ab 25890
5476a9a4
GM
25891_ACEOF
25892if ac_fn_c_try_compile "$LINENO"; then :
25893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25894/* end confdefs.h. */
25895#include <sys/select.h>
25896int
25897main ()
25898{
dd0d840e 25899
5476a9a4
GM
25900 #undef memset
25901 #define memset nonexistent_memset
25902 extern
25903 #ifdef __cplusplus
25904 "C"
25905 #endif
25906 void *memset (void *, int, unsigned long);
25907 #undef bzero
25908 #define bzero nonexistent_bzero
25909 extern
25910 #ifdef __cplusplus
25911 "C"
25912 #endif
25913 void bzero (void *, unsigned long);
25914 fd_set fds;
25915 FD_ZERO (&fds);
3e0be4ab 25916
5476a9a4
GM
25917 ;
25918 return 0;
25919}
067d23c9 25920
5476a9a4
GM
25921_ACEOF
25922if ac_fn_c_try_link "$LINENO"; then :
dd0d840e 25923
5476a9a4
GM
25924else
25925 gl_cv_header_sys_select_h_selfcontained=no
25926fi
25927rm -f core conftest.err conftest.$ac_objext \
25928 conftest$ac_exeext conftest.$ac_ext
dd0d840e 25929
5476a9a4
GM
25930fi
25931rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25932 fi
dd0d840e 25933
5476a9a4
GM
25934fi
25935{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_select_h_selfcontained" >&5
25936$as_echo "$gl_cv_header_sys_select_h_selfcontained" >&6; }
dd0d840e 25937
dd0d840e
GM
25938
25939
dd0d840e
GM
25940
25941
dd0d840e
GM
25942
25943
25944
dd0d840e 25945
5476a9a4
GM
25946 if test $gl_cv_have_include_next = yes; then
25947 gl_cv_next_sys_select_h='<'sys/select.h'>'
25948 else
25949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/select.h>" >&5
25950$as_echo_n "checking absolute name of <sys/select.h>... " >&6; }
25951if test "${gl_cv_next_sys_select_h+set}" = set; then :
25952 $as_echo_n "(cached) " >&6
25953else
dd0d840e 25954
5476a9a4 25955 if test $ac_cv_header_sys_select_h = yes; then
dd0d840e 25956
dd0d840e 25957
5476a9a4
GM
25958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25959/* end confdefs.h. */
25960#include <sys/select.h>
dd0d840e 25961
5476a9a4
GM
25962_ACEOF
25963 case "$host_os" in
25964 aix*) gl_absname_cpp="$ac_cpp -C" ;;
25965 *) gl_absname_cpp="$ac_cpp" ;;
25966 esac
dd0d840e 25967
5476a9a4
GM
25968 case "$host_os" in
25969 mingw*)
25970 gl_dirsep_regex='[/\\]'
25971 ;;
25972 *)
25973 gl_dirsep_regex='\/'
25974 ;;
25975 esac
25976 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
dd0d840e 25977
5476a9a4
GM
25978 gl_header_literal_regex=`echo 'sys/select.h' \
25979 | sed -e "$gl_make_literal_regex_sed"`
25980 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25981 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25982 s|^/[^/]|//&|
25983 p
25984 q
25985 }'
25986 gl_cv_next_sys_select_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25987 sed -n "$gl_absolute_header_sed"`'"'
25988 else
25989 gl_cv_next_sys_select_h='<'sys/select.h'>'
25990 fi
067d23c9 25991
067d23c9 25992
5476a9a4
GM
25993fi
25994{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_select_h" >&5
25995$as_echo "$gl_cv_next_sys_select_h" >&6; }
25996 fi
25997 NEXT_SYS_SELECT_H=$gl_cv_next_sys_select_h
25998
25999 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26000 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26001 gl_next_as_first_directive='<'sys/select.h'>'
26002 else
26003 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26004 gl_next_as_first_directive=$gl_cv_next_sys_select_h
26005 fi
26006 NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H=$gl_next_as_first_directive
26007
26008
26009
26010
26011 if test $ac_cv_header_sys_select_h = yes; then
26012 HAVE_SYS_SELECT_H=1
26013 else
26014 HAVE_SYS_SELECT_H=0
26015 fi
067d23c9
KY
26016
26017
7e723570 26018
7e723570 26019
7e723570 26020
5476a9a4
GM
26021 if test $ac_cv_header_sys_socket_h != yes; then
26022 for ac_header in winsock2.h
26023do :
26024 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
26025if test "x$ac_cv_header_winsock2_h" = x""yes; then :
26026 cat >>confdefs.h <<_ACEOF
26027#define HAVE_WINSOCK2_H 1
26028_ACEOF
7e723570 26029
5476a9a4 26030fi
7e723570 26031
5476a9a4 26032done
7e723570 26033
5476a9a4
GM
26034 fi
26035 if test "$ac_cv_header_winsock2_h" = yes; then
26036 HAVE_WINSOCK2_H=1
26037 UNISTD_H_HAVE_WINSOCK2_H=1
26038 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
26039 else
26040 HAVE_WINSOCK2_H=0
26041 fi
7e723570
GM
26042
26043
dd0d840e 26044
dd0d840e 26045
dd0d840e
GM
26046
26047
dd0d840e 26048
dd0d840e 26049
dd0d840e
GM
26050
26051
26052
26053
26054
26055
26056
26057
dd0d840e 26058
dd0d840e 26059
dd0d840e 26060
dd0d840e 26061
5476a9a4
GM
26062 if test $gl_cv_have_include_next = yes; then
26063 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
26064 else
26065 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
26066$as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
26067if test "${gl_cv_next_sys_stat_h+set}" = set; then :
26068 $as_echo_n "(cached) " >&6
26069else
dd0d840e 26070
5476a9a4 26071 if test $ac_cv_header_sys_stat_h = yes; then
dd0d840e 26072
dd0d840e 26073
5476a9a4
GM
26074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26075/* end confdefs.h. */
26076#include <sys/stat.h>
dd0d840e 26077
5476a9a4
GM
26078_ACEOF
26079 case "$host_os" in
26080 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26081 *) gl_absname_cpp="$ac_cpp" ;;
26082 esac
dd0d840e 26083
5476a9a4
GM
26084 case "$host_os" in
26085 mingw*)
26086 gl_dirsep_regex='[/\\]'
26087 ;;
26088 *)
26089 gl_dirsep_regex='\/'
26090 ;;
26091 esac
26092 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
dd0d840e 26093
5476a9a4
GM
26094 gl_header_literal_regex=`echo 'sys/stat.h' \
26095 | sed -e "$gl_make_literal_regex_sed"`
26096 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26097 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26098 s|^/[^/]|//&|
26099 p
26100 q
26101 }'
26102 gl_cv_next_sys_stat_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26103 sed -n "$gl_absolute_header_sed"`'"'
26104 else
26105 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
26106 fi
dd0d840e 26107
dd0d840e 26108
5476a9a4
GM
26109fi
26110{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
26111$as_echo "$gl_cv_next_sys_stat_h" >&6; }
26112 fi
26113 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
dd0d840e 26114
5476a9a4
GM
26115 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26116 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26117 gl_next_as_first_directive='<'sys/stat.h'>'
26118 else
26119 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26120 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
26121 fi
26122 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
dd0d840e 26123
dd0d840e 26124
d3127c14 26125
d3127c14 26126
dd0d840e 26127
dd0d840e 26128
dd0d840e 26129
dd0d840e 26130
dd0d840e 26131
dd0d840e 26132
dd0d840e 26133
5476a9a4 26134 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
dd0d840e 26135
5476a9a4 26136$as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
dd0d840e 26137
5476a9a4 26138 fi
dd0d840e 26139
5476a9a4
GM
26140 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
26141 #include <sys/stat.h>
26142"
26143if test "x$ac_cv_type_nlink_t" = x""yes; then :
dd0d840e 26144
5476a9a4 26145else
dd0d840e 26146
5476a9a4 26147$as_echo "#define nlink_t int" >>confdefs.h
dd0d840e 26148
5476a9a4 26149fi
dd0d840e 26150
dd0d840e 26151
dd0d840e 26152
dd0d840e 26153
dd0d840e 26154
dd0d840e 26155
dd0d840e 26156
c9ca3f76 26157
dd0d840e 26158
dd0d840e 26159
dd0d840e 26160
c9ca3f76 26161
dd0d840e 26162
dd0d840e
GM
26163
26164
7e723570
GM
26165
26166
7e723570 26167
5476a9a4
GM
26168 ac_fn_c_check_decl "$LINENO" "localtime_r" "ac_cv_have_decl_localtime_r" "#include <time.h>
26169"
26170if test "x$ac_cv_have_decl_localtime_r" = x""yes; then :
26171 ac_have_decl=1
26172else
26173 ac_have_decl=0
26174fi
7e723570 26175
5476a9a4
GM
26176cat >>confdefs.h <<_ACEOF
26177#define HAVE_DECL_LOCALTIME_R $ac_have_decl
26178_ACEOF
7e723570 26179
5476a9a4
GM
26180 if test $ac_cv_have_decl_localtime_r = no; then
26181 HAVE_DECL_LOCALTIME_R=0
26182 fi
7e723570 26183
7e723570 26184
5476a9a4
GM
26185 if test $ac_cv_func_localtime_r = yes; then
26186 HAVE_LOCALTIME_R=1
26187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime_r is compatible with its POSIX signature" >&5
26188$as_echo_n "checking whether localtime_r is compatible with its POSIX signature... " >&6; }
26189if test "${gl_cv_time_r_posix+set}" = set; then :
26190 $as_echo_n "(cached) " >&6
26191else
26192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26193/* end confdefs.h. */
26194#include <time.h>
7e723570
GM
26195int
26196main ()
26197{
5476a9a4
GM
26198/* We don't need to append 'restrict's to the argument types,
26199 even though the POSIX signature has the 'restrict's,
26200 since C99 says they can't affect type compatibility. */
26201 struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r;
26202 if (ptr) return 0;
26203 /* Check the return type is a pointer.
26204 On HP-UX 10 it is 'int'. */
26205 *localtime_r (0, 0);
7e723570
GM
26206 ;
26207 return 0;
26208}
5476a9a4 26209
7e723570 26210_ACEOF
5476a9a4
GM
26211if ac_fn_c_try_compile "$LINENO"; then :
26212 gl_cv_time_r_posix=yes
7e723570 26213else
5476a9a4 26214 gl_cv_time_r_posix=no
7e723570 26215fi
5476a9a4 26216rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
02bd7257 26217
5476a9a4
GM
26218fi
26219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_r_posix" >&5
26220$as_echo "$gl_cv_time_r_posix" >&6; }
26221 if test $gl_cv_time_r_posix = yes; then
26222 REPLACE_LOCALTIME_R=0
26223 else
26224 REPLACE_LOCALTIME_R=1
26225 fi
26226 else
26227 HAVE_LOCALTIME_R=0
26228 fi
02bd7257 26229
a6342fc8 26230 if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then
02bd7257
GM
26231
26232
02bd7257 26233
02bd7257 26234
02bd7257 26235
02bd7257 26236
7e723570 26237
7e723570 26238
5476a9a4
GM
26239 gl_LIBOBJS="$gl_LIBOBJS time_r.$ac_objext"
26240
26241
26242 :
7e723570 26243
a6342fc8 26244 fi
7e723570 26245
7e723570 26246
7e723570 26247
7e723570 26248
7e723570 26249
5476a9a4 26250 GNULIB_TIME_R=1
7e723570 26251
7e723570 26252
7e723570 26253
7e723570 26254
7e723570 26255
f077f61d
GM
26256
26257
26258
26259
26260
26261 LIB_TIMER_TIME=
26262
26263 gl_saved_libs=$LIBS
26264 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing timer_settime" >&5
26265$as_echo_n "checking for library containing timer_settime... " >&6; }
26266if test "${ac_cv_search_timer_settime+set}" = set; then :
26267 $as_echo_n "(cached) " >&6
26268else
26269 ac_func_search_save_LIBS=$LIBS
26270cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26271/* end confdefs.h. */
26272
26273/* Override any GCC internal prototype to avoid an error.
26274 Use char because int might match the return type of a GCC
26275 builtin and then its argument prototype would still apply. */
26276#ifdef __cplusplus
26277extern "C"
26278#endif
26279char timer_settime ();
26280int
26281main ()
26282{
26283return timer_settime ();
26284 ;
26285 return 0;
26286}
26287_ACEOF
26288for ac_lib in '' rt posix4; do
26289 if test -z "$ac_lib"; then
26290 ac_res="none required"
26291 else
26292 ac_res=-l$ac_lib
26293 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
26294 fi
26295 if ac_fn_c_try_link "$LINENO"; then :
26296 ac_cv_search_timer_settime=$ac_res
26297fi
26298rm -f core conftest.err conftest.$ac_objext \
26299 conftest$ac_exeext
26300 if test "${ac_cv_search_timer_settime+set}" = set; then :
26301 break
26302fi
26303done
26304if test "${ac_cv_search_timer_settime+set}" = set; then :
26305
26306else
26307 ac_cv_search_timer_settime=no
26308fi
26309rm conftest.$ac_ext
26310LIBS=$ac_func_search_save_LIBS
26311fi
26312{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_timer_settime" >&5
26313$as_echo "$ac_cv_search_timer_settime" >&6; }
26314ac_res=$ac_cv_search_timer_settime
26315if test "$ac_res" != no; then :
26316 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
26317 test "$ac_cv_search_timer_settime" = "none required" ||
26318 LIB_TIMER_TIME=$ac_cv_search_timer_settime
26319fi
26320
26321 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26322/* end confdefs.h. */
26323
26324#include <features.h>
26325#ifdef __GNU_LIBRARY__
26326 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || (__GLIBC__ > 2)) \
26327 && !defined __UCLIBC__
26328 Thread emulation available
26329 #endif
26330#endif
26331
26332_ACEOF
26333if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26334 $EGREP "Thread" >/dev/null 2>&1; then :
26335 LIB_TIMER_TIME="$LIB_TIMER_TIME $LIBMULTITHREAD"
26336fi
26337rm -f conftest*
26338
26339 for ac_func in timer_settime
26340do :
26341 ac_fn_c_check_func "$LINENO" "timer_settime" "ac_cv_func_timer_settime"
26342if test "x$ac_cv_func_timer_settime" = x""yes; then :
26343 cat >>confdefs.h <<_ACEOF
26344#define HAVE_TIMER_SETTIME 1
26345_ACEOF
26346
26347fi
26348done
26349
26350 LIBS=$gl_saved_libs
26351
a6342fc8 26352 :
7e723570 26353
02bd7257 26354
02bd7257 26355
02bd7257 26356
02bd7257 26357
02bd7257 26358
02bd7257 26359
02bd7257 26360
dd0d840e
GM
26361
26362
26363
dd0d840e 26364
5476a9a4
GM
26365 if test $gl_cv_have_include_next = yes; then
26366 gl_cv_next_unistd_h='<'unistd.h'>'
26367 else
26368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
26369$as_echo_n "checking absolute name of <unistd.h>... " >&6; }
26370if test "${gl_cv_next_unistd_h+set}" = set; then :
26371 $as_echo_n "(cached) " >&6
26372else
dd0d840e 26373
5476a9a4 26374 if test $ac_cv_header_unistd_h = yes; then
dd0d840e 26375
dd0d840e 26376
5476a9a4 26377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d3127c14 26378/* end confdefs.h. */
5476a9a4 26379#include <unistd.h>
d3127c14 26380
5476a9a4
GM
26381_ACEOF
26382 case "$host_os" in
26383 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26384 *) gl_absname_cpp="$ac_cpp" ;;
26385 esac
d3127c14 26386
5476a9a4
GM
26387 case "$host_os" in
26388 mingw*)
26389 gl_dirsep_regex='[/\\]'
26390 ;;
26391 *)
26392 gl_dirsep_regex='\/'
26393 ;;
26394 esac
26395 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26396
26397 gl_header_literal_regex=`echo 'unistd.h' \
26398 | sed -e "$gl_make_literal_regex_sed"`
26399 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26400 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26401 s|^/[^/]|//&|
26402 p
26403 q
26404 }'
26405 gl_cv_next_unistd_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26406 sed -n "$gl_absolute_header_sed"`'"'
26407 else
26408 gl_cv_next_unistd_h='<'unistd.h'>'
26409 fi
d3127c14 26410
d3127c14 26411
c9ca3f76 26412fi
5476a9a4
GM
26413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
26414$as_echo "$gl_cv_next_unistd_h" >&6; }
26415 fi
26416 NEXT_UNISTD_H=$gl_cv_next_unistd_h
c9ca3f76 26417
5476a9a4
GM
26418 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26419 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26420 gl_next_as_first_directive='<'unistd.h'>'
26421 else
26422 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26423 gl_next_as_first_directive=$gl_cv_next_unistd_h
26424 fi
26425 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
c9ca3f76 26426
c9ca3f76 26427
c9ca3f76 26428
c9ca3f76 26429
5476a9a4
GM
26430 if test $ac_cv_header_unistd_h = yes; then
26431 HAVE_UNISTD_H=1
26432 else
26433 HAVE_UNISTD_H=0
26434 fi
c9ca3f76 26435
d3127c14 26436
dd0d840e 26437
dd0d840e 26438
d3127c14 26439
d3127c14 26440
dd0d840e
GM
26441
26442
c9ca3f76
GM
26443
26444
26445
b5591ebb
GM
26446 if test $ac_cv_have_decl_unsetenv = no; then
26447 HAVE_DECL_UNSETENV=0
26448 fi
26449 for ac_func in unsetenv
26450do :
26451 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
26452if test "x$ac_cv_func_unsetenv" = x""yes; then :
26453 cat >>confdefs.h <<_ACEOF
26454#define HAVE_UNSETENV 1
26455_ACEOF
26456
26457fi
26458done
26459
26460 if test $ac_cv_func_unsetenv = no; then
26461 HAVE_UNSETENV=0
26462 else
26463 HAVE_UNSETENV=1
26464 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5
26465$as_echo_n "checking for unsetenv() return type... " >&6; }
26466if test "${gt_cv_func_unsetenv_ret+set}" = set; then :
26467 $as_echo_n "(cached) " >&6
26468else
26469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26470/* end confdefs.h. */
26471
26472#undef _BSD
26473#define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */
26474#include <stdlib.h>
26475extern
26476#ifdef __cplusplus
26477"C"
26478#endif
26479int unsetenv (const char *name);
26480
26481int
26482main ()
26483{
26484
26485 ;
26486 return 0;
26487}
26488_ACEOF
26489if ac_fn_c_try_compile "$LINENO"; then :
26490 gt_cv_func_unsetenv_ret='int'
26491else
26492 gt_cv_func_unsetenv_ret='void'
26493fi
26494rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26495fi
26496{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5
26497$as_echo "$gt_cv_func_unsetenv_ret" >&6; }
26498 if test $gt_cv_func_unsetenv_ret = 'void'; then
26499
26500$as_echo "#define VOID_UNSETENV 1" >>confdefs.h
26501
26502 REPLACE_UNSETENV=1
26503 fi
26504
26505 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5
26506$as_echo_n "checking whether unsetenv obeys POSIX... " >&6; }
26507if test "${gl_cv_func_unsetenv_works+set}" = set; then :
26508 $as_echo_n "(cached) " >&6
26509else
26510 if test "$cross_compiling" = yes; then :
26511 case "$host_os" in
26512 # Guess yes on glibc systems.
26513 *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
26514 # If we don't know, assume the worst.
26515 *) gl_cv_func_unsetenv_works="guessing no" ;;
26516 esac
26517
26518else
26519 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26520/* end confdefs.h. */
26521
26522 #include <stdlib.h>
26523 #include <errno.h>
26524 extern char **environ;
26525
26526int
26527main ()
26528{
26529
26530 char entry1[] = "a=1";
26531 char entry2[] = "b=2";
26532 char *env[] = { entry1, entry2, NULL };
26533 if (putenv ((char *) "a=1")) return 1;
26534 if (putenv (entry2)) return 2;
26535 entry2[0] = 'a';
26536 unsetenv ("a");
26537 if (getenv ("a")) return 3;
26538 if (!unsetenv ("") || errno != EINVAL) return 4;
26539 entry2[0] = 'b';
26540 environ = env;
26541 if (!getenv ("a")) return 5;
26542 entry2[0] = 'a';
26543 unsetenv ("a");
26544 if (getenv ("a")) return 6;
26545
26546 ;
26547 return 0;
26548}
26549_ACEOF
26550if ac_fn_c_try_run "$LINENO"; then :
26551 gl_cv_func_unsetenv_works=yes
26552else
26553 gl_cv_func_unsetenv_works=no
26554fi
26555rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26556 conftest.$ac_objext conftest.beam conftest.$ac_ext
26557fi
26558
26559fi
26560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5
26561$as_echo "$gl_cv_func_unsetenv_works" >&6; }
26562 case "$gl_cv_func_unsetenv_works" in
26563 *yes) ;;
26564 *)
26565 REPLACE_UNSETENV=1
26566 ;;
26567 esac
26568 fi
26569
26570 if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
26571
26572
26573
26574
26575
26576
26577
26578
26579 gl_LIBOBJS="$gl_LIBOBJS unsetenv.$ac_objext"
26580
26581
26582
26583
26584
26585 fi
26586
26587
26588
26589
26590
26591 GNULIB_UNSETENV=1
26592
26593
26594
26595
26596
26597
26598
26599
c9ca3f76
GM
26600
26601
c9ca3f76 26602
5476a9a4
GM
26603 if test $ac_cv_func_futimens = no && test $ac_cv_func_futimesat = yes; then
26604 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether futimesat handles NULL file" >&5
26605$as_echo_n "checking whether futimesat handles NULL file... " >&6; }
26606if test "${gl_cv_func_futimesat_works+set}" = set; then :
26607 $as_echo_n "(cached) " >&6
26608else
26609 touch conftest.file
26610 if test "$cross_compiling" = yes; then :
26611 case "$host_os" in
26612 # Guess yes on glibc systems.
26613 *-gnu*) gl_cv_func_futimesat_works="guessing yes" ;;
26614 # If we don't know, assume the worst.
26615 *) gl_cv_func_futimesat_works="guessing no" ;;
26616 esac
c9ca3f76 26617
5476a9a4
GM
26618else
26619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c9ca3f76
GM
26620/* end confdefs.h. */
26621
5476a9a4
GM
26622#include <stddef.h>
26623#include <sys/times.h>
26624#include <fcntl.h>
c9ca3f76
GM
26625
26626int
26627main ()
26628{
5476a9a4
GM
26629 int fd = open ("conftest.file", O_RDWR);
26630 if (fd < 0) return 1;
26631 if (futimesat (fd, NULL, NULL)) return 2;
c9ca3f76
GM
26632
26633 ;
26634 return 0;
26635}
26636_ACEOF
5476a9a4
GM
26637if ac_fn_c_try_run "$LINENO"; then :
26638 gl_cv_func_futimesat_works=yes
c9ca3f76 26639else
5476a9a4 26640 gl_cv_func_futimesat_works=no
c9ca3f76 26641fi
5476a9a4
GM
26642rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26643 conftest.$ac_objext conftest.beam conftest.$ac_ext
c9ca3f76
GM
26644fi
26645
5476a9a4
GM
26646 rm -f conftest.file
26647fi
26648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_futimesat_works" >&5
26649$as_echo "$gl_cv_func_futimesat_works" >&6; }
26650 case "$gl_cv_func_futimesat_works" in
26651 *yes) ;;
26652 *)
7e723570 26653
5476a9a4 26654$as_echo "#define FUTIMESAT_NULL_BUG 1" >>confdefs.h
067d23c9 26655
5476a9a4
GM
26656 ;;
26657 esac
26658 fi
dd0d840e 26659
d7ad186c 26660 gl_gnulib_enabled_260941c0e5dc67ec9e87d1fb321c300b=false
5476a9a4 26661 gl_gnulib_enabled_dosname=false
710f5812
GM
26662 gl_gnulib_enabled_euidaccess=false
26663 gl_gnulib_enabled_getgroups=false
5476a9a4 26664 gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=false
710f5812 26665 gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1=false
d7ad186c 26666 gl_gnulib_enabled_03e0aaad4cb89ca757653bd367a6ccb7=false
5476a9a4 26667 gl_gnulib_enabled_pathmax=false
710f5812 26668 gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c=false
5476a9a4
GM
26669 gl_gnulib_enabled_stat=false
26670 gl_gnulib_enabled_strtoll=false
26671 gl_gnulib_enabled_strtoull=false
26672 gl_gnulib_enabled_verify=false
710f5812 26673 gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec=false
d7ad186c
GM
26674 func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b ()
26675 {
26676 if ! $gl_gnulib_enabled_260941c0e5dc67ec9e87d1fb321c300b; then
26677
26678
26679
26680
26681
26682
26683
26684
26685 gl_LIBOBJS="$gl_LIBOBJS openat-proc.$ac_objext"
26686
26687 gl_gnulib_enabled_260941c0e5dc67ec9e87d1fb321c300b=true
26688 fi
26689 }
5476a9a4
GM
26690 func_gl_gnulib_m4code_dosname ()
26691 {
26692 if ! $gl_gnulib_enabled_dosname; then
26693 gl_gnulib_enabled_dosname=true
26694 fi
26695 }
710f5812 26696 func_gl_gnulib_m4code_euidaccess ()
5476a9a4 26697 {
710f5812 26698 if ! $gl_gnulib_enabled_euidaccess; then
dd0d840e 26699
d3127c14
GM
26700
26701
26702
26703
710f5812
GM
26704 for ac_func in euidaccess
26705do :
26706 ac_fn_c_check_func "$LINENO" "euidaccess" "ac_cv_func_euidaccess"
26707if test "x$ac_cv_func_euidaccess" = x""yes; then :
26708 cat >>confdefs.h <<_ACEOF
26709#define HAVE_EUIDACCESS 1
26710_ACEOF
d3127c14 26711
710f5812
GM
26712fi
26713done
d3127c14 26714
710f5812
GM
26715 if test $ac_cv_func_euidaccess = no; then
26716 HAVE_EUIDACCESS=0
26717 fi
d3127c14 26718
710f5812
GM
26719 if test $HAVE_EUIDACCESS = 0; then
26720
26721
26722
26723
26724
26725
26726
26727
26728 gl_LIBOBJS="$gl_LIBOBJS euidaccess.$ac_objext"
26729
26730
26731
26732 for ac_header in libgen.h
26733do :
26734 ac_fn_c_check_header_mongrel "$LINENO" "libgen.h" "ac_cv_header_libgen_h" "$ac_includes_default"
26735if test "x$ac_cv_header_libgen_h" = x""yes; then :
26736 cat >>confdefs.h <<_ACEOF
26737#define HAVE_LIBGEN_H 1
26738_ACEOF
26739
26740fi
26741
26742done
26743
26744
26745 ac_fn_c_check_func "$LINENO" "getgroups" "ac_cv_func_getgroups"
26746if test "x$ac_cv_func_getgroups" = x""yes; then :
26747
26748fi
26749
26750
26751 # If we don't yet have getgroups, see if it's in -lbsd.
26752 # This is reported to be necessary on an ITOS 3000WS running SEIUX 3.1.
26753 ac_save_LIBS=$LIBS
26754 if test $ac_cv_func_getgroups = no; then
26755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getgroups in -lbsd" >&5
26756$as_echo_n "checking for getgroups in -lbsd... " >&6; }
26757if test "${ac_cv_lib_bsd_getgroups+set}" = set; then :
5476a9a4
GM
26758 $as_echo_n "(cached) " >&6
26759else
710f5812
GM
26760 ac_check_lib_save_LIBS=$LIBS
26761LIBS="-lbsd $LIBS"
26762cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d3127c14 26763/* end confdefs.h. */
d3127c14 26764
710f5812
GM
26765/* Override any GCC internal prototype to avoid an error.
26766 Use char because int might match the return type of a GCC
26767 builtin and then its argument prototype would still apply. */
26768#ifdef __cplusplus
26769extern "C"
26770#endif
26771char getgroups ();
d3127c14
GM
26772int
26773main ()
26774{
710f5812 26775return getgroups ();
d3127c14
GM
26776 ;
26777 return 0;
26778}
26779_ACEOF
710f5812
GM
26780if ac_fn_c_try_link "$LINENO"; then :
26781 ac_cv_lib_bsd_getgroups=yes
d3127c14 26782else
710f5812 26783 ac_cv_lib_bsd_getgroups=no
5476a9a4 26784fi
710f5812
GM
26785rm -f core conftest.err conftest.$ac_objext \
26786 conftest$ac_exeext conftest.$ac_ext
26787LIBS=$ac_check_lib_save_LIBS
d3127c14 26788fi
710f5812
GM
26789{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_getgroups" >&5
26790$as_echo "$ac_cv_lib_bsd_getgroups" >&6; }
26791if test "x$ac_cv_lib_bsd_getgroups" = x""yes; then :
26792 GETGROUPS_LIB=-lbsd
5476a9a4 26793fi
710f5812
GM
26794
26795 fi
26796
26797 # Run the program to test the functionality of the system-supplied
26798 # getgroups function only if there is such a function.
26799 if test $ac_cv_func_getgroups = yes; then
26800 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getgroups" >&5
26801$as_echo_n "checking for working getgroups... " >&6; }
26802if test "${ac_cv_func_getgroups_works+set}" = set; then :
5476a9a4
GM
26803 $as_echo_n "(cached) " >&6
26804else
710f5812
GM
26805 if test "$cross_compiling" = yes; then :
26806 case "$host_os" in # ((
5476a9a4 26807 # Guess yes on glibc systems.
710f5812 26808 *-gnu*) ac_cv_func_getgroups_works="guessing yes" ;;
5476a9a4 26809 # If we don't know, assume the worst.
710f5812 26810 *) ac_cv_func_getgroups_works="guessing no" ;;
5476a9a4 26811 esac
d3127c14 26812
5476a9a4
GM
26813else
26814 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d3127c14 26815/* end confdefs.h. */
710f5812 26816$ac_includes_default
d3127c14
GM
26817int
26818main ()
26819{
710f5812
GM
26820/* On Ultrix 4.3, getgroups (0, 0) always fails. */
26821 return getgroups (0, 0) == -1;
26822 ;
26823 return 0;
26824}
26825
26826_ACEOF
26827if ac_fn_c_try_run "$LINENO"; then :
26828 ac_cv_func_getgroups_works=yes
26829else
26830 ac_cv_func_getgroups_works=no
26831fi
26832rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26833 conftest.$ac_objext conftest.beam conftest.$ac_ext
26834fi
26835
26836
26837fi
26838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getgroups_works" >&5
26839$as_echo "$ac_cv_func_getgroups_works" >&6; }
26840 else
26841 ac_cv_func_getgroups_works=no
26842 fi
26843 case "$ac_cv_func_getgroups_works" in
26844 *yes)
26845
26846$as_echo "#define HAVE_GETGROUPS 1" >>confdefs.h
26847
26848 ;;
26849 esac
26850 LIBS=$ac_save_LIBS
26851
26852
26853 # Solaris 9 and 10 need -lgen to get the eaccess function.
26854 # Save and restore LIBS so -lgen isn't added to it. Otherwise, *all*
26855 # programs in the package would end up linked with that potentially-shared
26856 # library, inducing unnecessary run-time overhead.
26857 LIB_EACCESS=
26858
26859 gl_saved_libs=$LIBS
26860 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing eaccess" >&5
26861$as_echo_n "checking for library containing eaccess... " >&6; }
26862if test "${ac_cv_search_eaccess+set}" = set; then :
26863 $as_echo_n "(cached) " >&6
26864else
26865 ac_func_search_save_LIBS=$LIBS
26866cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26867/* end confdefs.h. */
26868
26869/* Override any GCC internal prototype to avoid an error.
26870 Use char because int might match the return type of a GCC
26871 builtin and then its argument prototype would still apply. */
26872#ifdef __cplusplus
26873extern "C"
26874#endif
26875char eaccess ();
26876int
26877main ()
26878{
26879return eaccess ();
26880 ;
26881 return 0;
26882}
26883_ACEOF
26884for ac_lib in '' gen; do
26885 if test -z "$ac_lib"; then
26886 ac_res="none required"
26887 else
26888 ac_res=-l$ac_lib
26889 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
26890 fi
26891 if ac_fn_c_try_link "$LINENO"; then :
26892 ac_cv_search_eaccess=$ac_res
26893fi
26894rm -f core conftest.err conftest.$ac_objext \
26895 conftest$ac_exeext
26896 if test "${ac_cv_search_eaccess+set}" = set; then :
26897 break
26898fi
26899done
26900if test "${ac_cv_search_eaccess+set}" = set; then :
26901
26902else
26903 ac_cv_search_eaccess=no
26904fi
26905rm conftest.$ac_ext
26906LIBS=$ac_func_search_save_LIBS
26907fi
26908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_eaccess" >&5
26909$as_echo "$ac_cv_search_eaccess" >&6; }
26910ac_res=$ac_cv_search_eaccess
26911if test "$ac_res" != no; then :
26912 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
26913 test "$ac_cv_search_eaccess" = "none required" ||
26914 LIB_EACCESS=$ac_cv_search_eaccess
26915fi
26916
26917 for ac_func in eaccess
26918do :
26919 ac_fn_c_check_func "$LINENO" "eaccess" "ac_cv_func_eaccess"
26920if test "x$ac_cv_func_eaccess" = x""yes; then :
26921 cat >>confdefs.h <<_ACEOF
26922#define HAVE_EACCESS 1
26923_ACEOF
26924
26925fi
26926done
26927
26928 LIBS=$gl_saved_libs
26929
26930 fi
26931
26932
26933
26934
26935
26936 GNULIB_EUIDACCESS=1
26937
26938
26939
26940
26941
26942 gl_gnulib_enabled_euidaccess=true
26943 if test $HAVE_EUIDACCESS = 0; then
26944 func_gl_gnulib_m4code_a9786850e999ae65a836a6041e8e5ed1
26945 fi
26946 func_gl_gnulib_m4code_6099e9737f757db36c47fa9d9f02e88c
26947 if test $HAVE_EUIDACCESS = 0; then
26948 func_gl_gnulib_m4code_stat
26949 fi
26950 fi
26951 }
26952 func_gl_gnulib_m4code_getgroups ()
26953 {
26954 if ! $gl_gnulib_enabled_getgroups; then
26955
26956
26957
26958
26959
26960 ac_fn_c_check_func "$LINENO" "getgroups" "ac_cv_func_getgroups"
26961if test "x$ac_cv_func_getgroups" = x""yes; then :
26962
26963fi
26964
26965
26966 # If we don't yet have getgroups, see if it's in -lbsd.
26967 # This is reported to be necessary on an ITOS 3000WS running SEIUX 3.1.
26968 ac_save_LIBS=$LIBS
26969 if test $ac_cv_func_getgroups = no; then
26970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getgroups in -lbsd" >&5
26971$as_echo_n "checking for getgroups in -lbsd... " >&6; }
26972if test "${ac_cv_lib_bsd_getgroups+set}" = set; then :
26973 $as_echo_n "(cached) " >&6
26974else
26975 ac_check_lib_save_LIBS=$LIBS
26976LIBS="-lbsd $LIBS"
26977cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26978/* end confdefs.h. */
26979
26980/* Override any GCC internal prototype to avoid an error.
26981 Use char because int might match the return type of a GCC
26982 builtin and then its argument prototype would still apply. */
26983#ifdef __cplusplus
26984extern "C"
26985#endif
26986char getgroups ();
26987int
26988main ()
26989{
26990return getgroups ();
26991 ;
26992 return 0;
26993}
26994_ACEOF
26995if ac_fn_c_try_link "$LINENO"; then :
26996 ac_cv_lib_bsd_getgroups=yes
26997else
26998 ac_cv_lib_bsd_getgroups=no
26999fi
27000rm -f core conftest.err conftest.$ac_objext \
27001 conftest$ac_exeext conftest.$ac_ext
27002LIBS=$ac_check_lib_save_LIBS
27003fi
27004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_getgroups" >&5
27005$as_echo "$ac_cv_lib_bsd_getgroups" >&6; }
27006if test "x$ac_cv_lib_bsd_getgroups" = x""yes; then :
27007 GETGROUPS_LIB=-lbsd
27008fi
27009
27010 fi
27011
27012 # Run the program to test the functionality of the system-supplied
27013 # getgroups function only if there is such a function.
27014 if test $ac_cv_func_getgroups = yes; then
27015 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getgroups" >&5
27016$as_echo_n "checking for working getgroups... " >&6; }
27017if test "${ac_cv_func_getgroups_works+set}" = set; then :
27018 $as_echo_n "(cached) " >&6
27019else
27020 if test "$cross_compiling" = yes; then :
27021 case "$host_os" in # ((
27022 # Guess yes on glibc systems.
27023 *-gnu*) ac_cv_func_getgroups_works="guessing yes" ;;
27024 # If we don't know, assume the worst.
27025 *) ac_cv_func_getgroups_works="guessing no" ;;
27026 esac
27027
27028else
27029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27030/* end confdefs.h. */
27031$ac_includes_default
27032int
27033main ()
27034{
27035/* On Ultrix 4.3, getgroups (0, 0) always fails. */
27036 return getgroups (0, 0) == -1;
27037 ;
27038 return 0;
27039}
27040
27041_ACEOF
27042if ac_fn_c_try_run "$LINENO"; then :
27043 ac_cv_func_getgroups_works=yes
27044else
27045 ac_cv_func_getgroups_works=no
27046fi
27047rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27048 conftest.$ac_objext conftest.beam conftest.$ac_ext
27049fi
27050
27051
27052fi
27053{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getgroups_works" >&5
27054$as_echo "$ac_cv_func_getgroups_works" >&6; }
27055 else
27056 ac_cv_func_getgroups_works=no
27057 fi
27058 case "$ac_cv_func_getgroups_works" in
27059 *yes)
27060
27061$as_echo "#define HAVE_GETGROUPS 1" >>confdefs.h
27062
27063 ;;
27064 esac
27065 LIBS=$ac_save_LIBS
27066
27067 if test $ac_cv_func_getgroups != yes; then
27068 HAVE_GETGROUPS=0
27069 else
27070 if test "$ac_cv_type_getgroups" != gid_t \
27071 || { case "$ac_cv_func_getgroups_works" in
27072 *yes) false;;
27073 *) true;;
27074 esac
27075 }; then
27076 REPLACE_GETGROUPS=1
27077
27078$as_echo "#define GETGROUPS_ZERO_BUG 1" >>confdefs.h
27079
27080 else
27081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getgroups handles negative values" >&5
27082$as_echo_n "checking whether getgroups handles negative values... " >&6; }
27083if test "${gl_cv_func_getgroups_works+set}" = set; then :
27084 $as_echo_n "(cached) " >&6
27085else
27086 if test "$cross_compiling" = yes; then :
27087 case "$host_os" in
27088 # Guess yes on glibc systems.
27089 *-gnu*) gl_cv_func_getgroups_works="guessing yes" ;;
27090 # If we don't know, assume the worst.
27091 *) gl_cv_func_getgroups_works="guessing no" ;;
27092 esac
27093
27094else
27095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27096/* end confdefs.h. */
27097$ac_includes_default
27098int
27099main ()
27100{
27101int size = getgroups (0, 0);
27102 gid_t *list = malloc (size * sizeof *list);
27103 return getgroups (-1, list) != -1;
27104 ;
27105 return 0;
27106}
27107_ACEOF
27108if ac_fn_c_try_run "$LINENO"; then :
27109 gl_cv_func_getgroups_works=yes
27110else
27111 gl_cv_func_getgroups_works=no
27112fi
27113rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27114 conftest.$ac_objext conftest.beam conftest.$ac_ext
27115fi
27116
27117fi
27118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getgroups_works" >&5
27119$as_echo "$gl_cv_func_getgroups_works" >&6; }
27120 case "$gl_cv_func_getgroups_works" in
27121 *yes) ;;
27122 *) REPLACE_GETGROUPS=1 ;;
27123 esac
27124 fi
27125 fi
27126 test -n "$GETGROUPS_LIB" && LIBS="$GETGROUPS_LIB $LIBS"
27127
27128 if test $HAVE_GETGROUPS = 0 || test $REPLACE_GETGROUPS = 1; then
27129
27130
27131
27132
27133
27134
27135
27136
27137 gl_LIBOBJS="$gl_LIBOBJS getgroups.$ac_objext"
27138
27139 fi
27140
27141
27142
27143
27144
27145 GNULIB_GETGROUPS=1
27146
27147
27148
27149
27150
27151 gl_gnulib_enabled_getgroups=true
27152 fi
27153 }
27154 func_gl_gnulib_m4code_be453cec5eecf5731a274f2de7f2db36 ()
27155 {
27156 if ! $gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36; then
27157
27158
27159 gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=true
27160 fi
27161 }
27162 func_gl_gnulib_m4code_a9786850e999ae65a836a6041e8e5ed1 ()
27163 {
27164 if ! $gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1; then
27165
27166
27167
27168
27169
27170 ac_fn_c_check_func "$LINENO" "group_member" "ac_cv_func_group_member"
27171if test "x$ac_cv_func_group_member" = x""yes; then :
27172
27173else
27174
27175 HAVE_GROUP_MEMBER=0
27176
27177fi
27178
27179
27180 if test $HAVE_GROUP_MEMBER = 0; then
27181
27182
27183
27184
27185
27186
27187
27188
27189 gl_LIBOBJS="$gl_LIBOBJS group-member.$ac_objext"
27190
27191
27192
27193
27194 fi
27195
27196
27197
27198
27199
27200 GNULIB_GROUP_MEMBER=1
27201
27202
27203
27204
27205
27206 gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1=true
27207 if test $HAVE_GROUP_MEMBER = 0; then
27208 func_gl_gnulib_m4code_getgroups
27209 fi
27210 if test $HAVE_GROUP_MEMBER = 0; then
27211 func_gl_gnulib_m4code_682e609604ccaac6be382e4ee3a4eaec
27212 fi
27213 fi
27214 }
d7ad186c
GM
27215 func_gl_gnulib_m4code_03e0aaad4cb89ca757653bd367a6ccb7 ()
27216 {
27217 if ! $gl_gnulib_enabled_03e0aaad4cb89ca757653bd367a6ccb7; then
27218 gl_gnulib_enabled_03e0aaad4cb89ca757653bd367a6ccb7=true
27219 fi
27220 }
710f5812
GM
27221 func_gl_gnulib_m4code_pathmax ()
27222 {
27223 if ! $gl_gnulib_enabled_pathmax; then
27224
27225
27226
27227 gl_gnulib_enabled_pathmax=true
27228 fi
27229 }
27230 func_gl_gnulib_m4code_6099e9737f757db36c47fa9d9f02e88c ()
27231 {
27232 if ! $gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c; then
27233 gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c=true
27234 fi
27235 }
27236 func_gl_gnulib_m4code_stat ()
27237 {
27238 if ! $gl_gnulib_enabled_stat; then
27239
27240
27241
27242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5
27243$as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; }
27244if test "${gl_cv_func_stat_dir_slash+set}" = set; then :
27245 $as_echo_n "(cached) " >&6
27246else
27247 if test "$cross_compiling" = yes; then :
27248 case $host_os in
27249 mingw*) gl_cv_func_stat_dir_slash="guessing no";;
27250 *) gl_cv_func_stat_dir_slash="guessing yes";;
27251 esac
27252else
27253 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27254/* end confdefs.h. */
27255#include <sys/stat.h>
27256
27257int
27258main ()
27259{
27260struct stat st; return stat (".", &st) != stat ("./", &st);
27261 ;
27262 return 0;
27263}
27264_ACEOF
27265if ac_fn_c_try_run "$LINENO"; then :
27266 gl_cv_func_stat_dir_slash=yes
27267else
27268 gl_cv_func_stat_dir_slash=no
27269fi
27270rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27271 conftest.$ac_objext conftest.beam conftest.$ac_ext
27272fi
27273
27274fi
27275{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5
27276$as_echo "$gl_cv_func_stat_dir_slash" >&6; }
27277 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
27278$as_echo_n "checking whether stat handles trailing slashes on files... " >&6; }
27279if test "${gl_cv_func_stat_file_slash+set}" = set; then :
27280 $as_echo_n "(cached) " >&6
27281else
27282 touch conftest.tmp
27283 # Assume that if we have lstat, we can also check symlinks.
27284 if test $ac_cv_func_lstat = yes; then
27285 ln -s conftest.tmp conftest.lnk
27286 fi
27287 if test "$cross_compiling" = yes; then :
27288 case "$host_os" in
27289 # Guess yes on glibc systems.
27290 *-gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
27291 # If we don't know, assume the worst.
27292 *) gl_cv_func_stat_file_slash="guessing no" ;;
27293 esac
27294
27295else
27296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27297/* end confdefs.h. */
27298#include <sys/stat.h>
27299
27300int
27301main ()
27302{
27303int result = 0;
27304 struct stat st;
27305 if (!stat ("conftest.tmp/", &st))
27306 result |= 1;
27307#if HAVE_LSTAT
27308 if (!stat ("conftest.lnk/", &st))
5476a9a4
GM
27309 result |= 2;
27310#endif
27311 return result;
d3127c14
GM
27312
27313 ;
27314 return 0;
27315}
27316_ACEOF
5476a9a4
GM
27317if ac_fn_c_try_run "$LINENO"; then :
27318 gl_cv_func_stat_file_slash=yes
d3127c14 27319else
5476a9a4
GM
27320 gl_cv_func_stat_file_slash=no
27321fi
27322rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27323 conftest.$ac_objext conftest.beam conftest.$ac_ext
d3127c14 27324fi
d3127c14 27325
5476a9a4
GM
27326 rm -f conftest.tmp conftest.lnk
27327fi
27328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
27329$as_echo "$gl_cv_func_stat_file_slash" >&6; }
27330 case $gl_cv_func_stat_dir_slash in
27331 *no) REPLACE_STAT=1
d3127c14 27332
5476a9a4
GM
27333$as_echo "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h
27334;;
27335 esac
27336 case $gl_cv_func_stat_file_slash in
27337 *no) REPLACE_STAT=1
d3127c14 27338
5476a9a4
GM
27339$as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
27340;;
27341 esac
d3127c14 27342
a6342fc8 27343 if test $REPLACE_STAT = 1; then
d3127c14 27344
dd0d840e 27345
dd0d840e 27346
dd0d840e 27347
dd0d840e 27348
dd0d840e 27349
067d23c9
KY
27350
27351
5476a9a4 27352 gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
067d23c9 27353
45d4966b 27354 :
a6342fc8 27355 fi
067d23c9 27356
dd0d840e
GM
27357
27358
dd0d840e 27359
dd0d840e 27360
5476a9a4 27361 GNULIB_STAT=1
dd0d840e 27362
067d23c9
KY
27363
27364
27365
27366
5476a9a4
GM
27367 gl_gnulib_enabled_stat=true
27368 if test $REPLACE_STAT = 1; then
27369 func_gl_gnulib_m4code_dosname
27370 fi
27371 if test $REPLACE_STAT = 1; then
27372 func_gl_gnulib_m4code_pathmax
27373 fi
27374 if test $REPLACE_STAT = 1; then
27375 func_gl_gnulib_m4code_verify
27376 fi
27377 fi
27378 }
27379 func_gl_gnulib_m4code_strtoll ()
27380 {
27381 if ! $gl_gnulib_enabled_strtoll; then
067d23c9
KY
27382
27383
27384
5476a9a4
GM
27385 if test "$ac_cv_type_long_long_int" = yes; then
27386 for ac_func in strtoll
27387do :
27388 ac_fn_c_check_func "$LINENO" "strtoll" "ac_cv_func_strtoll"
27389if test "x$ac_cv_func_strtoll" = x""yes; then :
27390 cat >>confdefs.h <<_ACEOF
27391#define HAVE_STRTOLL 1
27392_ACEOF
067d23c9 27393
5476a9a4
GM
27394fi
27395done
067d23c9 27396
5476a9a4
GM
27397 if test $ac_cv_func_strtoll = no; then
27398 HAVE_STRTOLL=0
27399 fi
27400 fi
067d23c9 27401
a6342fc8 27402 if test $HAVE_STRTOLL = 0; then
067d23c9
KY
27403
27404
27405
067d23c9
KY
27406
27407
27408
27409
27410
5476a9a4 27411 gl_LIBOBJS="$gl_LIBOBJS strtoll.$ac_objext"
067d23c9
KY
27412
27413
5476a9a4 27414 :
067d23c9 27415
a6342fc8 27416 fi
067d23c9
KY
27417
27418
27419
067d23c9 27420
067d23c9 27421
5476a9a4 27422 GNULIB_STRTOLL=1
067d23c9 27423
397f7161 27424
067d23c9
KY
27425
27426
067d23c9 27427
5476a9a4
GM
27428 gl_gnulib_enabled_strtoll=true
27429 fi
27430 }
27431 func_gl_gnulib_m4code_strtoull ()
27432 {
27433 if ! $gl_gnulib_enabled_strtoull; then
067d23c9 27434
067d23c9 27435
067d23c9 27436
5476a9a4
GM
27437 if test "$ac_cv_type_unsigned_long_long_int" = yes; then
27438 for ac_func in strtoull
27439do :
27440 ac_fn_c_check_func "$LINENO" "strtoull" "ac_cv_func_strtoull"
27441if test "x$ac_cv_func_strtoull" = x""yes; then :
27442 cat >>confdefs.h <<_ACEOF
27443#define HAVE_STRTOULL 1
27444_ACEOF
067d23c9 27445
f199cab1 27446fi
5476a9a4 27447done
067d23c9 27448
5476a9a4
GM
27449 if test $ac_cv_func_strtoull = no; then
27450 HAVE_STRTOULL=0
27451 fi
27452 fi
067d23c9 27453
a6342fc8 27454 if test $HAVE_STRTOULL = 0; then
067d23c9
KY
27455
27456
067d23c9 27457
067d23c9 27458
067d23c9 27459
067d23c9 27460
067d23c9 27461
067d23c9 27462
5476a9a4 27463 gl_LIBOBJS="$gl_LIBOBJS strtoull.$ac_objext"
067d23c9 27464
067d23c9 27465
5476a9a4 27466 :
067d23c9 27467
a6342fc8 27468 fi
067d23c9
KY
27469
27470
3e0be4ab 27471
3e0be4ab 27472
067d23c9 27473
5476a9a4 27474 GNULIB_STRTOULL=1
067d23c9 27475
a0a61e58 27476
067d23c9 27477
067d23c9
KY
27478
27479
5476a9a4
GM
27480 gl_gnulib_enabled_strtoull=true
27481 fi
27482 }
27483 func_gl_gnulib_m4code_verify ()
27484 {
27485 if ! $gl_gnulib_enabled_verify; then
27486 gl_gnulib_enabled_verify=true
27487 fi
27488 }
710f5812
GM
27489 func_gl_gnulib_m4code_682e609604ccaac6be382e4ee3a4eaec ()
27490 {
27491 if ! $gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec; then
27492 gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec=true
27493 fi
27494 }
d7ad186c
GM
27495 if test $HAVE_FACCESSAT = 0; then
27496 func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b
27497 fi
710f5812
GM
27498 if test $HAVE_FACCESSAT = 0; then
27499 func_gl_gnulib_m4code_dosname
27500 fi
27501 if test $HAVE_FACCESSAT = 0; then
27502 func_gl_gnulib_m4code_euidaccess
27503 fi
d7ad186c
GM
27504 if test $HAVE_FACCESSAT = 0; then
27505 func_gl_gnulib_m4code_03e0aaad4cb89ca757653bd367a6ccb7
27506 fi
27507 if test $HAVE_FDOPENDIR = 0; then
27508 func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b
27509 fi
27510 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
27511 func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b
27512 fi
27513 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
27514 func_gl_gnulib_m4code_dosname
27515 fi
27516 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
27517 func_gl_gnulib_m4code_03e0aaad4cb89ca757653bd367a6ccb7
27518 fi
5476a9a4
GM
27519 if test $REPLACE_GETOPT = 1; then
27520 func_gl_gnulib_m4code_be453cec5eecf5731a274f2de7f2db36
27521 fi
27522 if test $REPLACE_LSTAT = 1; then
27523 func_gl_gnulib_m4code_dosname
27524 fi
27525 if test $REPLACE_LSTAT = 1; then
27526 func_gl_gnulib_m4code_stat
27527 fi
27528 if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
27529 func_gl_gnulib_m4code_stat
27530 fi
d7ad186c
GM
27531 if test $HAVE_READLINKAT = 0; then
27532 func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b
27533 fi
27534 if test $HAVE_READLINKAT = 0; then
27535 func_gl_gnulib_m4code_dosname
27536 fi
27537 if test $HAVE_READLINKAT = 0; then
27538 func_gl_gnulib_m4code_03e0aaad4cb89ca757653bd367a6ccb7
27539 fi
5476a9a4
GM
27540 if { test $HAVE_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; } && test $ac_cv_type_long_long_int = yes; then
27541 func_gl_gnulib_m4code_strtoll
27542 fi
27543 if test $HAVE_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; then
27544 func_gl_gnulib_m4code_verify
27545 fi
27546 if test $ac_cv_func_strtoumax = no && test $ac_cv_type_unsigned_long_long_int = yes; then
27547 func_gl_gnulib_m4code_strtoull
27548 fi
27549 if test $ac_cv_func_strtoumax = no; then
27550 func_gl_gnulib_m4code_verify
27551 fi
067d23c9 27552
d7ad186c
GM
27553 if $gl_gnulib_enabled_260941c0e5dc67ec9e87d1fb321c300b; then
27554 gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_TRUE=
27555 gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_FALSE='#'
27556else
27557 gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_TRUE='#'
27558 gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_FALSE=
27559fi
27560
5476a9a4
GM
27561 if $gl_gnulib_enabled_dosname; then
27562 gl_GNULIB_ENABLED_dosname_TRUE=
27563 gl_GNULIB_ENABLED_dosname_FALSE='#'
27564else
27565 gl_GNULIB_ENABLED_dosname_TRUE='#'
27566 gl_GNULIB_ENABLED_dosname_FALSE=
27567fi
067d23c9 27568
710f5812
GM
27569 if $gl_gnulib_enabled_euidaccess; then
27570 gl_GNULIB_ENABLED_euidaccess_TRUE=
27571 gl_GNULIB_ENABLED_euidaccess_FALSE='#'
27572else
27573 gl_GNULIB_ENABLED_euidaccess_TRUE='#'
27574 gl_GNULIB_ENABLED_euidaccess_FALSE=
27575fi
27576
27577 if $gl_gnulib_enabled_getgroups; then
27578 gl_GNULIB_ENABLED_getgroups_TRUE=
27579 gl_GNULIB_ENABLED_getgroups_FALSE='#'
27580else
27581 gl_GNULIB_ENABLED_getgroups_TRUE='#'
27582 gl_GNULIB_ENABLED_getgroups_FALSE=
27583fi
27584
5476a9a4
GM
27585 if $gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36; then
27586 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE=
27587 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE='#'
27588else
27589 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE='#'
27590 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE=
27591fi
067d23c9 27592
710f5812
GM
27593 if $gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1; then
27594 gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_TRUE=
27595 gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_FALSE='#'
27596else
27597 gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_TRUE='#'
27598 gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_FALSE=
27599fi
27600
d7ad186c
GM
27601 if $gl_gnulib_enabled_03e0aaad4cb89ca757653bd367a6ccb7; then
27602 gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_TRUE=
27603 gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_FALSE='#'
27604else
27605 gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_TRUE='#'
27606 gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_FALSE=
27607fi
27608
5476a9a4
GM
27609 if $gl_gnulib_enabled_pathmax; then
27610 gl_GNULIB_ENABLED_pathmax_TRUE=
27611 gl_GNULIB_ENABLED_pathmax_FALSE='#'
27612else
27613 gl_GNULIB_ENABLED_pathmax_TRUE='#'
27614 gl_GNULIB_ENABLED_pathmax_FALSE=
27615fi
067d23c9 27616
710f5812
GM
27617 if $gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c; then
27618 gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_TRUE=
27619 gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_FALSE='#'
27620else
27621 gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_TRUE='#'
27622 gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_FALSE=
27623fi
27624
5476a9a4
GM
27625 if $gl_gnulib_enabled_stat; then
27626 gl_GNULIB_ENABLED_stat_TRUE=
27627 gl_GNULIB_ENABLED_stat_FALSE='#'
27628else
27629 gl_GNULIB_ENABLED_stat_TRUE='#'
27630 gl_GNULIB_ENABLED_stat_FALSE=
27631fi
067d23c9 27632
5476a9a4
GM
27633 if $gl_gnulib_enabled_strtoll; then
27634 gl_GNULIB_ENABLED_strtoll_TRUE=
27635 gl_GNULIB_ENABLED_strtoll_FALSE='#'
27636else
27637 gl_GNULIB_ENABLED_strtoll_TRUE='#'
27638 gl_GNULIB_ENABLED_strtoll_FALSE=
27639fi
067d23c9 27640
5476a9a4
GM
27641 if $gl_gnulib_enabled_strtoull; then
27642 gl_GNULIB_ENABLED_strtoull_TRUE=
27643 gl_GNULIB_ENABLED_strtoull_FALSE='#'
27644else
27645 gl_GNULIB_ENABLED_strtoull_TRUE='#'
27646 gl_GNULIB_ENABLED_strtoull_FALSE=
f199cab1 27647fi
067d23c9 27648
5476a9a4
GM
27649 if $gl_gnulib_enabled_verify; then
27650 gl_GNULIB_ENABLED_verify_TRUE=
27651 gl_GNULIB_ENABLED_verify_FALSE='#'
27652else
27653 gl_GNULIB_ENABLED_verify_TRUE='#'
27654 gl_GNULIB_ENABLED_verify_FALSE=
27655fi
067d23c9 27656
710f5812
GM
27657 if $gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec; then
27658 gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_TRUE=
27659 gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_FALSE='#'
27660else
27661 gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_TRUE='#'
27662 gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_FALSE=
27663fi
27664
5476a9a4 27665 # End of code from modules
067d23c9 27666
067d23c9 27667
067d23c9 27668
067d23c9 27669
f199cab1 27670
f199cab1
GM
27671
27672
067d23c9 27673
5476a9a4
GM
27674
27675 gltests_libdeps=
27676 gltests_ltlibdeps=
067d23c9 27677
067d23c9 27678
067d23c9
KY
27679
27680
067d23c9
KY
27681
27682
3e0be4ab 27683
3e0be4ab 27684
3e0be4ab 27685
5476a9a4
GM
27686 gl_source_base='tests'
27687 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
3e0be4ab 27688
5476a9a4 27689 gl_module_indicator_condition=$gltests_WITNESS
3e0be4ab
GM
27690
27691
27692
27693
27694
067d23c9
KY
27695
27696
27697
3e0be4ab 27698
3e0be4ab 27699
5476a9a4
GM
27700 LIBGNU_LIBDEPS="$gl_libdeps"
27701
27702 LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
27703
067d23c9 27704
5476a9a4
GM
27705CFLAGS=$SAVE_CFLAGS
27706LIBS=$SAVE_LIBS
067d23c9
KY
27707
27708case "$opsys" in
27709 aix4-2) LD_SWITCH_SYSTEM_TEMACS="-Wl,-bnodelcsect" ;;
27710
27711 darwin)
27712 ## The -headerpad option tells ld (see man page) to leave room at the
27713 ## end of the header for adding load commands. Needed for dumping.
27714 ## 0x690 is the total size of 30 segment load commands (at 56
27715 ## each); under Cocoa 31 commands are required.
27716 if test "$HAVE_NS" = "yes"; then
27717 libs_nsgui="-framework AppKit"
27718 headerpad_extra=6C8
27719 else
27720 libs_nsgui=
27721 headerpad_extra=690
27722 fi
85cf5029 27723 LD_SWITCH_SYSTEM_TEMACS="-fno-pie -prebind $libs_nsgui -Xlinker -headerpad -Xlinker $headerpad_extra"
067d23c9
KY
27724
27725 ## This is here because src/Makefile.in did some extra fiddling around
2407788f
GM
27726 ## with LD_SWITCH_SYSTEM. It seems cleaner to put this in
27727 ## LD_SWITCH_SYSTEM_TEMACS instead,
067d23c9
KY
27728 test "x$LD_SWITCH_SYSTEM" = "x" && test "x$GCC" != "xyes" && \
27729 LD_SWITCH_SYSTEM_TEMACS="-X $LD_SWITCH_SYSTEM_TEMACS"
27730 ;;
27731
ae629dae
GM
27732 ## LD_SWITCH_X_SITE_RPATH is a -rpath option saying where to
27733 ## find X at run-time.
27734 ## When handled by cpp, this was in LD_SWITCH_SYSTEM. However, at the
27735 ## point where configure sourced the s/*.h file, LD_SWITCH_X_SITE_RPATH
067d23c9
KY
27736 ## had not yet been defined and was expanded to null. Hence LD_SWITCH_SYSTEM
27737 ## had different values in configure (in ac_link) and src/Makefile.in.
27738 ## It seems clearer therefore to put this piece in LD_SWITCH_SYSTEM_TEMACS.
ae629dae 27739 gnu*) LD_SWITCH_SYSTEM_TEMACS="\$(LD_SWITCH_X_SITE_RPATH)" ;;
067d23c9
KY
27740
27741 *) LD_SWITCH_SYSTEM_TEMACS= ;;
27742esac
27743
26256684
GM
27744if test x$ac_enable_profiling != x ; then
27745 case $opsys in
27746 *freebsd | gnu-linux) ;;
27747 *) LD_SWITCH_SYSTEM_TEMACS="$LD_SWITCH_SYSTEM_TEMACS -pg" ;;
27748 esac
27749fi
27750
067d23c9
KY
27751
27752
42dcba54
GM
27753## Common for all window systems
27754if test "$window_system" != "none"; then
067d23c9
KY
27755
27756$as_echo "#define HAVE_WINDOW_SYSTEM 1" >>confdefs.h
27757
42dcba54 27758 WINDOW_SYSTEM_OBJ="fontset.o fringe.o image.o"
067d23c9
KY
27759fi
27760
27761
27762
27763
42dcba54 27764
067d23c9
KY
27765#### Report on what we decided to do.
27766#### Report GTK as a toolkit, even if it doesn't use Xt.
27767#### It makes printing result more understandable as using GTK sets
27768#### toolkit_scroll_bars to yes by default.
27769if test "${HAVE_GTK}" = "yes"; then
a732eace 27770 USE_X_TOOLKIT="$USE_GTK_TOOLKIT"
067d23c9
KY
27771fi
27772
27773echo "
27774Configured for \`${canonical}'.
27775
27776 Where should the build process find the source code? ${srcdir}
067d23c9
KY
27777 What compiler should emacs be built with? ${CC} ${CFLAGS}
27778 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
27779 Should Emacs use a relocating allocator for buffers? ${REL_ALLOC}
27780 Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers
27781 What window system should Emacs use? ${window_system}
27782 What toolkit should Emacs use? ${USE_X_TOOLKIT}"
27783
27784if test -n "${x_includes}"; then
27785echo " Where do we find X Windows header files? ${x_includes}"
27786else
27787echo " Where do we find X Windows header files? Standard dirs"
27788fi
27789if test -n "${x_libraries}"; then
27790echo " Where do we find X Windows libraries? ${x_libraries}"
27791else
27792echo " Where do we find X Windows libraries? Standard dirs"
27793fi
27794
27795echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}"
27796echo " Does Emacs use -lXpm? ${HAVE_XPM}"
27797echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
27798echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
27799echo " Does Emacs use a gif library? ${HAVE_GIF} $LIBGIF"
27800echo " Does Emacs use -lpng? ${HAVE_PNG}"
27801echo " Does Emacs use -lrsvg-2? ${HAVE_RSVG}"
27802echo " Does Emacs use imagemagick? ${HAVE_IMAGEMAGICK}"
27803
27804echo " Does Emacs use -lgpm? ${HAVE_GPM}"
27805echo " Does Emacs use -ldbus? ${HAVE_DBUS}"
27806echo " Does Emacs use -lgconf? ${HAVE_GCONF}"
f527bd02 27807echo " Does Emacs use GSettings? ${HAVE_GSETTINGS}"
067d23c9 27808echo " Does Emacs use -lselinux? ${HAVE_LIBSELINUX}"
27f5a136 27809echo " Does Emacs use -lgnutls? ${HAVE_GNUTLS}"
067d23c9
KY
27810echo " Does Emacs use -lxml2? ${HAVE_LIBXML2}"
27811
27812echo " Does Emacs use -lfreetype? ${HAVE_FREETYPE}"
27813echo " Does Emacs use -lm17n-flt? ${HAVE_M17N_FLT}"
27814echo " Does Emacs use -lotf? ${HAVE_LIBOTF}"
27815echo " Does Emacs use -lxft? ${HAVE_XFT}"
27816
27817echo " Does Emacs use toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
27818echo
27819
eb39a72d
GM
27820if test -n "${EMACSDATA}"; then
27821 echo " Environment variable EMACSDATA set to: $EMACSDATA"
27822fi
27823if test -n "${EMACSDOC}"; then
27824 echo " Environment variable EMACSDOC set to: $EMACSDOC"
27825fi
27826
067d23c9
KY
27827echo
27828
27829if test "$HAVE_NS" = "yes"; then
27830 echo
3d0788a9 27831 echo "You must run \"${MAKE-make} install\" in order to test the built application.
067d23c9
KY
27832The installed application will go to nextstep/Emacs.app and can be
27833run or moved from there."
27834 if test "$EN_NS_SELF_CONTAINED" = "yes"; then
27835 echo "The application will be fully self-contained."
27836 else
27837 echo "The lisp resources for the application will be installed under ${prefix}.
3d0788a9 27838You may need to run \"${MAKE-make} install\" with sudo. The application will fail
067d23c9
KY
27839to run if these resources are not installed."
27840 fi
27841 echo
27842fi
27843
031fabfc
GM
27844if test "${opsys}" = "cygwin"; then
27845 case `uname -r` in
27846 1.5.*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: building Emacs on Cygwin 1.5 is not supported." >&5
27847$as_echo "$as_me: WARNING: building Emacs on Cygwin 1.5 is not supported." >&2;}
27848 echo
27849 ;;
27850 esac
27851fi
067d23c9
KY
27852
27853# Remove any trailing slashes in these variables.
27854test "${prefix}" != NONE &&
27855 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
27856test "${exec_prefix}" != NONE &&
27857 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
27858
bb7dce39
GM
27859if test "$HAVE_NS" = "yes"; then
27860 if test "$NS_IMPL_GNUSTEP" = yes; then
27861 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"
27862
27863 else
27864 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"
27865
27866 fi
27867fi
27868
27869SUBDIR_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"
56ade35c 27870
bb7dce39 27871ac_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"
56ade35c 27872
a877df06 27873
73b78882 27874opt_makefile=test/automated/Makefile
a877df06 27875
b5591ebb 27876if test -f "$srcdir/$opt_makefile.in"; then
73b78882 27877 SUBDIR_MAKEFILES="$SUBDIR_MAKEFILES $opt_makefile"
56ade35c 27878 ac_config_files="$ac_config_files test/automated/Makefile"
a877df06 27879
56ade35c 27880fi
73b78882 27881
40b65096
GM
27882
27883opt_makefile=admin/unidata/Makefile
27884
b5591ebb 27885if test -f "$srcdir/$opt_makefile.in"; then
40b65096
GM
27886 SUBDIR_MAKEFILES="$SUBDIR_MAKEFILES $opt_makefile"
27887 ac_config_files="$ac_config_files admin/unidata/Makefile"
27888
27889fi
27890
27891
56ade35c 27892SUBDIR_MAKEFILES_IN=`echo " ${SUBDIR_MAKEFILES}" | sed -e 's| | $(srcdir)/|g' -e 's|Makefile|Makefile.in|g'`
73b78882 27893
067d23c9 27894
9411886d
PE
27895
27896ac_config_commands="$ac_config_commands mkdirs"
27897
27898
27899ac_config_commands="$ac_config_commands epaths"
27900
27901
27902ac_config_commands="$ac_config_commands gdbinit"
27903
067d23c9
KY
27904
27905cat >confcache <<\_ACEOF
27906# This file is a shell script that caches the results of configure
27907# tests run on this system so they can be shared between configure
27908# scripts and configure runs, see configure's option --config-cache.
27909# It is not useful on other systems. If it contains results you don't
27910# want to keep, you may remove or edit it.
27911#
27912# config.status only pays attention to the cache file if you give it
27913# the --recheck option to rerun configure.
27914#
27915# `ac_cv_env_foo' variables (set or unset) will be overridden when
27916# loading this file, other *unset* `ac_cv_foo' will be assigned the
27917# following values.
27918
27919_ACEOF
27920
27921# The following way of writing the cache mishandles newlines in values,
27922# but we know of no workaround that is simple, portable, and efficient.
27923# So, we kill variables containing newlines.
27924# Ultrix sh set writes to stderr and can't be redirected directly,
27925# and sets the high bit in the cache file unless we assign to the vars.
27926(
27927 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
27928 eval ac_val=\$$ac_var
27929 case $ac_val in #(
27930 *${as_nl}*)
27931 case $ac_var in #(
27932 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
27933$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
27934 esac
27935 case $ac_var in #(
27936 _ | IFS | as_nl) ;; #(
27937 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
27938 *) { eval $ac_var=; unset $ac_var;} ;;
27939 esac ;;
27940 esac
27941 done
27942
27943 (set) 2>&1 |
27944 case $as_nl`(ac_space=' '; set) 2>&1` in #(
27945 *${as_nl}ac_space=\ *)
27946 # `set' does not quote correctly, so add quotes: double-quote
27947 # substitution turns \\\\ into \\, and sed turns \\ into \.
27948 sed -n \
27949 "s/'/'\\\\''/g;
27950 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
27951 ;; #(
27952 *)
27953 # `set' quotes correctly as required by POSIX, so do not add quotes.
27954 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
27955 ;;
27956 esac |
27957 sort
27958) |
27959 sed '
27960 /^ac_cv_env_/b end
27961 t clear
27962 :clear
27963 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
27964 t end
27965 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
27966 :end' >>confcache
27967if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
27968 if test -w "$cache_file"; then
a9bec17c 27969 test "x$cache_file" != "x/dev/null" &&
067d23c9
KY
27970 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
27971$as_echo "$as_me: updating cache $cache_file" >&6;}
a9bec17c 27972 cat confcache >$cache_file
067d23c9
KY
27973 else
27974 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
27975$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
27976 fi
27977fi
27978rm -f confcache
27979
27980test "x$prefix" = xNONE && prefix=$ac_default_prefix
27981# Let make expand exec_prefix.
27982test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
27983
27984DEFS=-DHAVE_CONFIG_H
27985
27986ac_libobjs=
27987ac_ltlibobjs=
27988for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
27989 # 1. Remove the extension, and $U if already installed.
27990 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
27991 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
27992 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
27993 # will be set to the directory where LIBOBJS objects are built.
27994 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
27995 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
27996done
27997LIBOBJS=$ac_libobjs
27998
27999LTLIBOBJS=$ac_ltlibobjs
28000
28001
743c80a7
PE
28002 if test -n "$EXEEXT"; then
28003 am__EXEEXT_TRUE=
28004 am__EXEEXT_FALSE='#'
28005else
28006 am__EXEEXT_TRUE='#'
28007 am__EXEEXT_FALSE=
28008fi
28009
28010if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
a9bec17c 28011 as_fn_error "conditional \"AMDEP\" was never defined.
743c80a7
PE
28012Usually this means the macro was only invoked conditionally." "$LINENO" 5
28013fi
28014if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
a9bec17c 28015 as_fn_error "conditional \"am__fastdepCC\" was never defined.
743c80a7
PE
28016Usually this means the macro was only invoked conditionally." "$LINENO" 5
28017fi
743c80a7 28018if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
a9bec17c 28019 as_fn_error "conditional \"GL_COND_LIBTOOL\" was never defined.
743c80a7
PE
28020Usually this means the macro was only invoked conditionally." "$LINENO" 5
28021fi
4fc2b746 28022if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
a9bec17c 28023 as_fn_error "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
4fc2b746
GM
28024Usually this means the macro was only invoked conditionally." "$LINENO" 5
28025fi
743c80a7 28026
3a019ab4
GM
28027if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then
28028 as_fn_error "conditional \"GL_GENERATE_ERRNO_H\" was never defined.
28029Usually this means the macro was only invoked conditionally." "$LINENO" 5
28030fi
8966cbff
GM
28031if test -z "${GL_GENERATE_EXECINFO_H_TRUE}" && test -z "${GL_GENERATE_EXECINFO_H_FALSE}"; then
28032 as_fn_error "conditional \"GL_GENERATE_EXECINFO_H\" was never defined.
28033Usually this means the macro was only invoked conditionally." "$LINENO" 5
28034fi
4fda9c95 28035if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
a9bec17c 28036 as_fn_error "conditional \"GL_GENERATE_STDINT_H\" was never defined.
4fda9c95
GM
28037Usually this means the macro was only invoked conditionally." "$LINENO" 5
28038fi
0eb775a3
GM
28039if test -z "${GL_GENERATE_STDALIGN_H_TRUE}" && test -z "${GL_GENERATE_STDALIGN_H_FALSE}"; then
28040 as_fn_error "conditional \"GL_GENERATE_STDALIGN_H\" was never defined.
28041Usually this means the macro was only invoked conditionally." "$LINENO" 5
28042fi
6d153f56 28043if test -z "${GL_GENERATE_STDARG_H_TRUE}" && test -z "${GL_GENERATE_STDARG_H_FALSE}"; then
a9bec17c 28044 as_fn_error "conditional \"GL_GENERATE_STDARG_H\" was never defined.
6d153f56
GM
28045Usually this means the macro was only invoked conditionally." "$LINENO" 5
28046fi
6c051bab 28047if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
a9bec17c 28048 as_fn_error "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
6c051bab
GM
28049Usually this means the macro was only invoked conditionally." "$LINENO" 5
28050fi
28051if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
a9bec17c 28052 as_fn_error "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
6c051bab
GM
28053Usually this means the macro was only invoked conditionally." "$LINENO" 5
28054fi
d7ad186c
GM
28055if test -z "${gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_TRUE}" && test -z "${gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_FALSE}"; then
28056 as_fn_error "conditional \"gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b\" was never defined.
28057Usually this means the macro was only invoked conditionally." "$LINENO" 5
28058fi
6d153f56 28059if test -z "${gl_GNULIB_ENABLED_dosname_TRUE}" && test -z "${gl_GNULIB_ENABLED_dosname_FALSE}"; then
a9bec17c 28060 as_fn_error "conditional \"gl_GNULIB_ENABLED_dosname\" was never defined.
6d153f56
GM
28061Usually this means the macro was only invoked conditionally." "$LINENO" 5
28062fi
710f5812
GM
28063if test -z "${gl_GNULIB_ENABLED_euidaccess_TRUE}" && test -z "${gl_GNULIB_ENABLED_euidaccess_FALSE}"; then
28064 as_fn_error "conditional \"gl_GNULIB_ENABLED_euidaccess\" was never defined.
28065Usually this means the macro was only invoked conditionally." "$LINENO" 5
28066fi
28067if test -z "${gl_GNULIB_ENABLED_getgroups_TRUE}" && test -z "${gl_GNULIB_ENABLED_getgroups_FALSE}"; then
28068 as_fn_error "conditional \"gl_GNULIB_ENABLED_getgroups\" was never defined.
28069Usually this means the macro was only invoked conditionally." "$LINENO" 5
28070fi
6d153f56 28071if test -z "${gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE}" && test -z "${gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE}"; then
a9bec17c 28072 as_fn_error "conditional \"gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36\" was never defined.
6d153f56
GM
28073Usually this means the macro was only invoked conditionally." "$LINENO" 5
28074fi
710f5812
GM
28075if test -z "${gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_TRUE}" && test -z "${gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_FALSE}"; then
28076 as_fn_error "conditional \"gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1\" was never defined.
28077Usually this means the macro was only invoked conditionally." "$LINENO" 5
28078fi
d7ad186c
GM
28079if test -z "${gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_TRUE}" && test -z "${gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_FALSE}"; then
28080 as_fn_error "conditional \"gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7\" was never defined.
28081Usually this means the macro was only invoked conditionally." "$LINENO" 5
28082fi
a0a61e58
GM
28083if test -z "${gl_GNULIB_ENABLED_pathmax_TRUE}" && test -z "${gl_GNULIB_ENABLED_pathmax_FALSE}"; then
28084 as_fn_error "conditional \"gl_GNULIB_ENABLED_pathmax\" was never defined.
28085Usually this means the macro was only invoked conditionally." "$LINENO" 5
28086fi
710f5812
GM
28087if test -z "${gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_TRUE}" && test -z "${gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_FALSE}"; then
28088 as_fn_error "conditional \"gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c\" was never defined.
28089Usually this means the macro was only invoked conditionally." "$LINENO" 5
28090fi
6d153f56 28091if test -z "${gl_GNULIB_ENABLED_stat_TRUE}" && test -z "${gl_GNULIB_ENABLED_stat_FALSE}"; then
a9bec17c 28092 as_fn_error "conditional \"gl_GNULIB_ENABLED_stat\" was never defined.
6d153f56
GM
28093Usually this means the macro was only invoked conditionally." "$LINENO" 5
28094fi
3e0be4ab 28095if test -z "${gl_GNULIB_ENABLED_strtoll_TRUE}" && test -z "${gl_GNULIB_ENABLED_strtoll_FALSE}"; then
a9bec17c 28096 as_fn_error "conditional \"gl_GNULIB_ENABLED_strtoll\" was never defined.
3e0be4ab
GM
28097Usually this means the macro was only invoked conditionally." "$LINENO" 5
28098fi
6d153f56 28099if test -z "${gl_GNULIB_ENABLED_strtoull_TRUE}" && test -z "${gl_GNULIB_ENABLED_strtoull_FALSE}"; then
a9bec17c 28100 as_fn_error "conditional \"gl_GNULIB_ENABLED_strtoull\" was never defined.
6d153f56
GM
28101Usually this means the macro was only invoked conditionally." "$LINENO" 5
28102fi
28103if test -z "${gl_GNULIB_ENABLED_verify_TRUE}" && test -z "${gl_GNULIB_ENABLED_verify_FALSE}"; then
a9bec17c 28104 as_fn_error "conditional \"gl_GNULIB_ENABLED_verify\" was never defined.
6d153f56 28105Usually this means the macro was only invoked conditionally." "$LINENO" 5
710f5812
GM
28106fi
28107if test -z "${gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_TRUE}" && test -z "${gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_FALSE}"; then
28108 as_fn_error "conditional \"gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec\" was never defined.
28109Usually this means the macro was only invoked conditionally." "$LINENO" 5
6c051bab 28110fi
942f733f 28111
743c80a7
PE
28112 gl_libobjs=
28113 gl_ltlibobjs=
28114 if test -n "$gl_LIBOBJS"; then
28115 # Remove the extension.
28116 sed_drop_objext='s/\.o$//;s/\.obj$//'
28117 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
28118 gl_libobjs="$gl_libobjs $i.$ac_objext"
28119 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
28120 done
28121 fi
28122 gl_LIBOBJS=$gl_libobjs
28123
28124 gl_LTLIBOBJS=$gl_ltlibobjs
28125
28126
28127
28128 gltests_libobjs=
28129 gltests_ltlibobjs=
28130 if test -n "$gltests_LIBOBJS"; then
28131 # Remove the extension.
28132 sed_drop_objext='s/\.o$//;s/\.obj$//'
28133 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
28134 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
28135 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
28136 done
28137 fi
28138 gltests_LIBOBJS=$gltests_libobjs
28139
28140 gltests_LTLIBOBJS=$gltests_ltlibobjs
28141
067d23c9
KY
28142
28143
a9bec17c 28144: ${CONFIG_STATUS=./config.status}
067d23c9
KY
28145ac_write_fail=0
28146ac_clean_files_save=$ac_clean_files
28147ac_clean_files="$ac_clean_files $CONFIG_STATUS"
28148{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
28149$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
28150as_write_fail=0
28151cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
28152#! $SHELL
28153# Generated by $as_me.
28154# Run this file to recreate the current configuration.
28155# Compiler output produced by configure, useful for debugging
28156# configure, is in config.log if it exists.
28157
28158debug=false
28159ac_cs_recheck=false
28160ac_cs_silent=false
28161
28162SHELL=\${CONFIG_SHELL-$SHELL}
28163export SHELL
28164_ASEOF
28165cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
28166## -------------------- ##
28167## M4sh Initialization. ##
28168## -------------------- ##
28169
28170# Be more Bourne compatible
28171DUALCASE=1; export DUALCASE # for MKS sh
28172if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
28173 emulate sh
28174 NULLCMD=:
28175 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
28176 # is contrary to our usage. Disable this feature.
28177 alias -g '${1+"$@"}'='"$@"'
28178 setopt NO_GLOB_SUBST
28179else
28180 case `(set -o) 2>/dev/null` in #(
28181 *posix*) :
28182 set -o posix ;; #(
28183 *) :
28184 ;;
28185esac
28186fi
28187
28188
28189as_nl='
28190'
28191export as_nl
28192# Printing a long string crashes Solaris 7 /usr/bin/printf.
28193as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
28194as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
28195as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
28196# Prefer a ksh shell builtin over an external printf program on Solaris,
28197# but without wasting forks for bash or zsh.
28198if test -z "$BASH_VERSION$ZSH_VERSION" \
28199 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
28200 as_echo='print -r --'
28201 as_echo_n='print -rn --'
28202elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
28203 as_echo='printf %s\n'
28204 as_echo_n='printf %s'
28205else
28206 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
28207 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
28208 as_echo_n='/usr/ucb/echo -n'
28209 else
28210 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
28211 as_echo_n_body='eval
28212 arg=$1;
28213 case $arg in #(
28214 *"$as_nl"*)
28215 expr "X$arg" : "X\\(.*\\)$as_nl";
28216 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
28217 esac;
28218 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
28219 '
28220 export as_echo_n_body
28221 as_echo_n='sh -c $as_echo_n_body as_echo'
28222 fi
28223 export as_echo_body
28224 as_echo='sh -c $as_echo_body as_echo'
28225fi
28226
28227# The user is always right.
28228if test "${PATH_SEPARATOR+set}" != set; then
28229 PATH_SEPARATOR=:
28230 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
28231 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
28232 PATH_SEPARATOR=';'
28233 }
28234fi
28235
28236
28237# IFS
28238# We need space, tab and new line, in precisely that order. Quoting is
28239# there to prevent editors from complaining about space-tab.
28240# (If _AS_PATH_WALK were called with IFS unset, it would disable word
28241# splitting by setting IFS to empty value.)
28242IFS=" "" $as_nl"
28243
28244# Find who we are. Look in the path if we contain no directory separator.
28245case $0 in #((
28246 *[\\/]* ) as_myself=$0 ;;
28247 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28248for as_dir in $PATH
28249do
28250 IFS=$as_save_IFS
28251 test -z "$as_dir" && as_dir=.
28252 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
28253 done
28254IFS=$as_save_IFS
28255
28256 ;;
28257esac
28258# We did not find ourselves, most probably we were run as `sh COMMAND'
28259# in which case we are not to be found in the path.
28260if test "x$as_myself" = x; then
28261 as_myself=$0
28262fi
28263if test ! -f "$as_myself"; then
28264 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
28265 exit 1
28266fi
28267
28268# Unset variables that we do not need and which cause bugs (e.g. in
28269# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
28270# suppresses any "Segmentation fault" message there. '((' could
28271# trigger a bug in pdksh 5.2.14.
28272for as_var in BASH_ENV ENV MAIL MAILPATH
28273do eval test x\${$as_var+set} = xset \
28274 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
28275done
28276PS1='$ '
28277PS2='> '
28278PS4='+ '
28279
28280# NLS nuisances.
28281LC_ALL=C
28282export LC_ALL
28283LANGUAGE=C
28284export LANGUAGE
28285
28286# CDPATH.
28287(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
28288
28289
a9bec17c
GM
28290# as_fn_error ERROR [LINENO LOG_FD]
28291# ---------------------------------
067d23c9
KY
28292# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
28293# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
a9bec17c 28294# script with status $?, using 1 if that was 0.
067d23c9
KY
28295as_fn_error ()
28296{
a9bec17c
GM
28297 as_status=$?; test $as_status -eq 0 && as_status=1
28298 if test "$3"; then
28299 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
28300 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
067d23c9 28301 fi
a9bec17c 28302 $as_echo "$as_me: error: $1" >&2
067d23c9
KY
28303 as_fn_exit $as_status
28304} # as_fn_error
28305
28306
28307# as_fn_set_status STATUS
28308# -----------------------
28309# Set $? to STATUS, without forking.
28310as_fn_set_status ()
28311{
28312 return $1
28313} # as_fn_set_status
28314
28315# as_fn_exit STATUS
28316# -----------------
28317# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
28318as_fn_exit ()
28319{
28320 set +e
28321 as_fn_set_status $1
28322 exit $1
28323} # as_fn_exit
28324
28325# as_fn_unset VAR
28326# ---------------
28327# Portably unset VAR.
28328as_fn_unset ()
28329{
28330 { eval $1=; unset $1;}
28331}
28332as_unset=as_fn_unset
28333# as_fn_append VAR VALUE
28334# ----------------------
28335# Append the text in VALUE to the end of the definition contained in VAR. Take
28336# advantage of any shell optimizations that allow amortized linear growth over
28337# repeated appends, instead of the typical quadratic growth present in naive
28338# implementations.
28339if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
28340 eval 'as_fn_append ()
28341 {
28342 eval $1+=\$2
28343 }'
28344else
28345 as_fn_append ()
28346 {
28347 eval $1=\$$1\$2
28348 }
28349fi # as_fn_append
28350
28351# as_fn_arith ARG...
28352# ------------------
28353# Perform arithmetic evaluation on the ARGs, and store the result in the
28354# global $as_val. Take advantage of shells that can avoid forks. The arguments
28355# must be portable across $(()) and expr.
28356if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
28357 eval 'as_fn_arith ()
28358 {
28359 as_val=$(( $* ))
28360 }'
28361else
28362 as_fn_arith ()
28363 {
28364 as_val=`expr "$@" || test $? -eq 1`
28365 }
28366fi # as_fn_arith
28367
28368
28369if expr a : '\(a\)' >/dev/null 2>&1 &&
28370 test "X`expr 00001 : '.*\(...\)'`" = X001; then
28371 as_expr=expr
28372else
28373 as_expr=false
28374fi
28375
28376if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
28377 as_basename=basename
28378else
28379 as_basename=false
28380fi
28381
28382if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
28383 as_dirname=dirname
28384else
28385 as_dirname=false
28386fi
28387
28388as_me=`$as_basename -- "$0" ||
28389$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
28390 X"$0" : 'X\(//\)$' \| \
28391 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
28392$as_echo X/"$0" |
28393 sed '/^.*\/\([^/][^/]*\)\/*$/{
28394 s//\1/
28395 q
28396 }
28397 /^X\/\(\/\/\)$/{
28398 s//\1/
28399 q
28400 }
28401 /^X\/\(\/\).*/{
28402 s//\1/
28403 q
28404 }
28405 s/.*/./; q'`
28406
28407# Avoid depending upon Character Ranges.
28408as_cr_letters='abcdefghijklmnopqrstuvwxyz'
28409as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
28410as_cr_Letters=$as_cr_letters$as_cr_LETTERS
28411as_cr_digits='0123456789'
28412as_cr_alnum=$as_cr_Letters$as_cr_digits
28413
28414ECHO_C= ECHO_N= ECHO_T=
28415case `echo -n x` in #(((((
28416-n*)
28417 case `echo 'xy\c'` in
28418 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
28419 xy) ECHO_C='\c';;
28420 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
28421 ECHO_T=' ';;
28422 esac;;
28423*)
28424 ECHO_N='-n';;
28425esac
28426
28427rm -f conf$$ conf$$.exe conf$$.file
28428if test -d conf$$.dir; then
28429 rm -f conf$$.dir/conf$$.file
28430else
28431 rm -f conf$$.dir
28432 mkdir conf$$.dir 2>/dev/null
28433fi
28434if (echo >conf$$.file) 2>/dev/null; then
28435 if ln -s conf$$.file conf$$ 2>/dev/null; then
28436 as_ln_s='ln -s'
28437 # ... but there are two gotchas:
28438 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
28439 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
28440 # In both cases, we have to default to `cp -p'.
28441 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
28442 as_ln_s='cp -p'
28443 elif ln conf$$.file conf$$ 2>/dev/null; then
28444 as_ln_s=ln
28445 else
28446 as_ln_s='cp -p'
28447 fi
28448else
28449 as_ln_s='cp -p'
28450fi
28451rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
28452rmdir conf$$.dir 2>/dev/null
28453
28454
28455# as_fn_mkdir_p
28456# -------------
28457# Create "$as_dir" as a directory, including parents if necessary.
28458as_fn_mkdir_p ()
28459{
28460
28461 case $as_dir in #(
28462 -*) as_dir=./$as_dir;;
28463 esac
28464 test -d "$as_dir" || eval $as_mkdir_p || {
28465 as_dirs=
28466 while :; do
28467 case $as_dir in #(
28468 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
28469 *) as_qdir=$as_dir;;
28470 esac
28471 as_dirs="'$as_qdir' $as_dirs"
28472 as_dir=`$as_dirname -- "$as_dir" ||
28473$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
28474 X"$as_dir" : 'X\(//\)[^/]' \| \
28475 X"$as_dir" : 'X\(//\)$' \| \
28476 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
28477$as_echo X"$as_dir" |
28478 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28479 s//\1/
28480 q
28481 }
28482 /^X\(\/\/\)[^/].*/{
28483 s//\1/
28484 q
28485 }
28486 /^X\(\/\/\)$/{
28487 s//\1/
28488 q
28489 }
28490 /^X\(\/\).*/{
28491 s//\1/
28492 q
28493 }
28494 s/.*/./; q'`
28495 test -d "$as_dir" && break
28496 done
28497 test -z "$as_dirs" || eval "mkdir $as_dirs"
a9bec17c 28498 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
067d23c9
KY
28499
28500
28501} # as_fn_mkdir_p
28502if mkdir -p . 2>/dev/null; then
28503 as_mkdir_p='mkdir -p "$as_dir"'
28504else
28505 test -d ./-p && rmdir ./-p
28506 as_mkdir_p=false
28507fi
28508
28509if test -x / >/dev/null 2>&1; then
28510 as_test_x='test -x'
28511else
28512 if ls -dL / >/dev/null 2>&1; then
28513 as_ls_L_option=L
28514 else
28515 as_ls_L_option=
28516 fi
28517 as_test_x='
28518 eval sh -c '\''
28519 if test -d "$1"; then
28520 test -d "$1/.";
28521 else
28522 case $1 in #(
28523 -*)set "./$1";;
28524 esac;
28525 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
28526 ???[sx]*):;;*)false;;esac;fi
28527 '\'' sh
28528 '
28529fi
28530as_executable_p=$as_test_x
28531
28532# Sed expression to map a string onto a valid CPP name.
28533as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
28534
28535# Sed expression to map a string onto a valid variable name.
28536as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
28537
28538
28539exec 6>&1
28540## ----------------------------------- ##
28541## Main body of $CONFIG_STATUS script. ##
28542## ----------------------------------- ##
28543_ASEOF
28544test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
28545
28546cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
28547# Save the log message, to keep $0 and so on meaningful, and to
28548# report actual input values of CONFIG_FILES etc. instead of their
28549# values after options handling.
28550ac_log="
c574bc34 28551This file was extended by emacs $as_me 24.3.50, which was
a9bec17c 28552generated by GNU Autoconf 2.65. Invocation command line was
067d23c9
KY
28553
28554 CONFIG_FILES = $CONFIG_FILES
28555 CONFIG_HEADERS = $CONFIG_HEADERS
28556 CONFIG_LINKS = $CONFIG_LINKS
28557 CONFIG_COMMANDS = $CONFIG_COMMANDS
28558 $ $0 $@
28559
28560on `(hostname || uname -n) 2>/dev/null | sed 1q`
28561"
28562
28563_ACEOF
28564
28565case $ac_config_files in *"
28566"*) set x $ac_config_files; shift; ac_config_files=$*;;
28567esac
28568
28569case $ac_config_headers in *"
28570"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
28571esac
28572
28573
28574cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
28575# Files that config.status was made for.
28576config_files="$ac_config_files"
28577config_headers="$ac_config_headers"
28578config_commands="$ac_config_commands"
28579
28580_ACEOF
28581
28582cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
28583ac_cs_usage="\
28584\`$as_me' instantiates files and other configuration actions
28585from templates according to the current configuration. Unless the files
28586and actions are specified as TAGs, all are instantiated by default.
28587
28588Usage: $0 [OPTION]... [TAG]...
28589
28590 -h, --help print this help, then exit
28591 -V, --version print version number and configuration settings, then exit
28592 --config print configuration, then exit
28593 -q, --quiet, --silent
28594 do not print progress messages
28595 -d, --debug don't remove temporary files
28596 --recheck update $as_me by reconfiguring in the same conditions
28597 --file=FILE[:TEMPLATE]
28598 instantiate the configuration file FILE
28599 --header=FILE[:TEMPLATE]
28600 instantiate the configuration header FILE
28601
28602Configuration files:
28603$config_files
28604
28605Configuration headers:
28606$config_headers
28607
28608Configuration commands:
28609$config_commands
28610
28611Report bugs to the package provider."
28612
28613_ACEOF
28614cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
28615ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
28616ac_cs_version="\\
c574bc34 28617emacs config.status 24.3.50
a9bec17c 28618configured by $0, generated by GNU Autoconf 2.65,
067d23c9
KY
28619 with options \\"\$ac_cs_config\\"
28620
a9bec17c 28621Copyright (C) 2009 Free Software Foundation, Inc.
067d23c9
KY
28622This config.status script is free software; the Free Software Foundation
28623gives unlimited permission to copy, distribute and modify it."
28624
28625ac_pwd='$ac_pwd'
28626srcdir='$srcdir'
28627INSTALL='$INSTALL'
743c80a7
PE
28628MKDIR_P='$MKDIR_P'
28629AWK='$AWK'
067d23c9
KY
28630test -n "\$AWK" || AWK=awk
28631_ACEOF
28632
28633cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
28634# The default lists apply if the user does not specify any file.
28635ac_need_defaults=:
28636while test $# != 0
28637do
28638 case $1 in
a9bec17c 28639 --*=*)
067d23c9
KY
28640 ac_option=`expr "X$1" : 'X\([^=]*\)='`
28641 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
28642 ac_shift=:
28643 ;;
28644 *)
28645 ac_option=$1
28646 ac_optarg=$2
28647 ac_shift=shift
28648 ;;
28649 esac
28650
28651 case $ac_option in
28652 # Handling of the options.
28653 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
28654 ac_cs_recheck=: ;;
28655 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
28656 $as_echo "$ac_cs_version"; exit ;;
28657 --config | --confi | --conf | --con | --co | --c )
28658 $as_echo "$ac_cs_config"; exit ;;
28659 --debug | --debu | --deb | --de | --d | -d )
28660 debug=: ;;
28661 --file | --fil | --fi | --f )
28662 $ac_shift
28663 case $ac_optarg in
28664 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
28665 esac
28666 as_fn_append CONFIG_FILES " '$ac_optarg'"
28667 ac_need_defaults=false;;
28668 --header | --heade | --head | --hea )
28669 $ac_shift
28670 case $ac_optarg in
28671 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
28672 esac
28673 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
28674 ac_need_defaults=false;;
28675 --he | --h)
28676 # Conflict between --help and --header
a9bec17c 28677 as_fn_error "ambiguous option: \`$1'
067d23c9
KY
28678Try \`$0 --help' for more information.";;
28679 --help | --hel | -h )
28680 $as_echo "$ac_cs_usage"; exit ;;
28681 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
28682 | -silent | --silent | --silen | --sile | --sil | --si | --s)
28683 ac_cs_silent=: ;;
28684
28685 # This is an error.
a9bec17c 28686 -*) as_fn_error "unrecognized option: \`$1'
067d23c9
KY
28687Try \`$0 --help' for more information." ;;
28688
28689 *) as_fn_append ac_config_targets " $1"
28690 ac_need_defaults=false ;;
28691
28692 esac
28693 shift
28694done
28695
28696ac_configure_extra_args=
28697
28698if $ac_cs_silent; then
28699 exec 6>/dev/null
28700 ac_configure_extra_args="$ac_configure_extra_args --silent"
28701fi
28702
28703_ACEOF
28704cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
28705if \$ac_cs_recheck; then
28706 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
28707 shift
28708 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
28709 CONFIG_SHELL='$SHELL'
28710 export CONFIG_SHELL
28711 exec "\$@"
28712fi
28713
28714_ACEOF
28715cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
28716exec 5>>config.log
28717{
28718 echo
28719 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
28720## Running $as_me. ##
28721_ASBOX
28722 $as_echo "$ac_log"
28723} >&5
28724
28725_ACEOF
28726cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
28727#
28728# INIT-COMMANDS
28729#
743c80a7 28730AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
5ec54608 28731GCC="$GCC" CPPFLAGS="$CPPFLAGS"
067d23c9
KY
28732
28733_ACEOF
28734
28735cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
28736
28737# Handling of arguments.
28738for ac_config_target in $ac_config_targets
28739do
28740 case $ac_config_target in
28741 "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:src/config.in" ;;
743c80a7 28742 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
bb7dce39
GM
28743 "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" ;;
28744 "nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop") CONFIG_FILES="$CONFIG_FILES nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop:nextstep/templates/Emacs.desktop.in" ;;
28745 "nextstep/Cocoa/Emacs.base/Contents/Info.plist") CONFIG_FILES="$CONFIG_FILES nextstep/Cocoa/Emacs.base/Contents/Info.plist:nextstep/templates/Info.plist.in" ;;
28746 "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" ;;
067d23c9 28747 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
743c80a7 28748 "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
56ade35c
GM
28749 "lib-src/Makefile") CONFIG_FILES="$CONFIG_FILES lib-src/Makefile" ;;
28750 "oldXMenu/Makefile") CONFIG_FILES="$CONFIG_FILES oldXMenu/Makefile" ;;
28751 "doc/emacs/Makefile") CONFIG_FILES="$CONFIG_FILES doc/emacs/Makefile" ;;
28752 "doc/misc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/misc/Makefile" ;;
28753 "doc/lispintro/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispintro/Makefile" ;;
28754 "doc/lispref/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispref/Makefile" ;;
28755 "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
28756 "lwlib/Makefile") CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;;
28757 "lisp/Makefile") CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;;
28758 "leim/Makefile") CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;;
bb7dce39 28759 "nextstep/Makefile") CONFIG_FILES="$CONFIG_FILES nextstep/Makefile" ;;
56ade35c 28760 "test/automated/Makefile") CONFIG_FILES="$CONFIG_FILES test/automated/Makefile" ;;
40b65096 28761 "admin/unidata/Makefile") CONFIG_FILES="$CONFIG_FILES admin/unidata/Makefile" ;;
9411886d
PE
28762 "mkdirs") CONFIG_COMMANDS="$CONFIG_COMMANDS mkdirs" ;;
28763 "epaths") CONFIG_COMMANDS="$CONFIG_COMMANDS epaths" ;;
28764 "gdbinit") CONFIG_COMMANDS="$CONFIG_COMMANDS gdbinit" ;;
067d23c9 28765
a9bec17c 28766 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
067d23c9
KY
28767 esac
28768done
28769
28770
28771# If the user did not use the arguments to specify the items to instantiate,
28772# then the envvar interface is used. Set only those that are not.
28773# We use the long form for the default assignment because of an extremely
28774# bizarre bug on SunOS 4.1.3.
28775if $ac_need_defaults; then
28776 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
28777 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
28778 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
28779fi
28780
28781# Have a temporary directory for convenience. Make it in the build tree
28782# simply because there is no reason against having it here, and in addition,
28783# creating and moving files from /tmp can sometimes cause problems.
28784# Hook for its removal unless debugging.
28785# Note that there is a small window in which the directory will not be cleaned:
28786# after its creation but before its name has been assigned to `$tmp'.
28787$debug ||
28788{
a9bec17c 28789 tmp=
067d23c9 28790 trap 'exit_status=$?
a9bec17c 28791 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
067d23c9
KY
28792' 0
28793 trap 'as_fn_exit 1' 1 2 13 15
28794}
28795# Create a (secure) tmp directory for tmp files.
28796
28797{
28798 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
a9bec17c 28799 test -n "$tmp" && test -d "$tmp"
067d23c9
KY
28800} ||
28801{
28802 tmp=./conf$$-$RANDOM
28803 (umask 077 && mkdir "$tmp")
a9bec17c 28804} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
067d23c9
KY
28805
28806# Set up the scripts for CONFIG_FILES section.
28807# No need to generate them if there are no CONFIG_FILES.
28808# This happens for instance with `./config.status config.h'.
28809if test -n "$CONFIG_FILES"; then
28810
28811if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
28812 ac_cs_awk_getline=:
28813 ac_cs_awk_pipe_init=
28814 ac_cs_awk_read_file='
28815 while ((getline aline < (F[key])) > 0)
28816 print(aline)
28817 close(F[key])'
28818 ac_cs_awk_pipe_fini=
28819else
28820 ac_cs_awk_getline=false
28821 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
28822 ac_cs_awk_read_file='
28823 print "|#_!!_#|"
28824 print "cat " F[key] " &&"
28825 '$ac_cs_awk_pipe_init
28826 # The final `:' finishes the AND list.
28827 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
28828fi
28829ac_cr=`echo X | tr X '\015'`
28830# On cygwin, bash can eat \r inside `` if the user requested igncr.
28831# But we know of no other shell where ac_cr would be empty at this
28832# point, so we can use a bashism as a fallback.
28833if test "x$ac_cr" = x; then
28834 eval ac_cr=\$\'\\r\'
28835fi
28836ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
28837if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
a9bec17c 28838 ac_cs_awk_cr='\r'
067d23c9
KY
28839else
28840 ac_cs_awk_cr=$ac_cr
28841fi
28842
a9bec17c 28843echo 'BEGIN {' >"$tmp/subs1.awk" &&
067d23c9
KY
28844_ACEOF
28845
28846# Create commands to substitute file output variables.
28847{
28848 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
a9bec17c 28849 echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
067d23c9
KY
28850 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
28851 echo "_ACAWK" &&
28852 echo "_ACEOF"
28853} >conf$$files.sh &&
28854. ./conf$$files.sh ||
a9bec17c 28855 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
067d23c9
KY
28856rm -f conf$$files.sh
28857
28858{
28859 echo "cat >conf$$subs.awk <<_ACEOF" &&
28860 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
28861 echo "_ACEOF"
28862} >conf$$subs.sh ||
a9bec17c
GM
28863 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
28864ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
067d23c9
KY
28865ac_delim='%!_!# '
28866for ac_last_try in false false false false false :; do
28867 . ./conf$$subs.sh ||
a9bec17c 28868 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
067d23c9
KY
28869
28870 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
28871 if test $ac_delim_n = $ac_delim_num; then
28872 break
28873 elif $ac_last_try; then
a9bec17c 28874 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
067d23c9
KY
28875 else
28876 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
28877 fi
28878done
28879rm -f conf$$subs.sh
28880
28881cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
a9bec17c 28882cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
067d23c9
KY
28883_ACEOF
28884sed -n '
28885h
28886s/^/S["/; s/!.*/"]=/
28887p
28888g
28889s/^[^!]*!//
28890:repl
28891t repl
28892s/'"$ac_delim"'$//
28893t delim
28894:nl
28895h
28896s/\(.\{148\}\)..*/\1/
28897t more1
28898s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
28899p
28900n
28901b repl
28902:more1
28903s/["\\]/\\&/g; s/^/"/; s/$/"\\/
28904p
28905g
28906s/.\{148\}//
28907t nl
28908:delim
28909h
28910s/\(.\{148\}\)..*/\1/
28911t more2
28912s/["\\]/\\&/g; s/^/"/; s/$/"/
28913p
28914b
28915:more2
28916s/["\\]/\\&/g; s/^/"/; s/$/"\\/
28917p
28918g
28919s/.\{148\}//
28920t delim
28921' <conf$$subs.awk | sed '
28922/^[^""]/{
28923 N
28924 s/\n//
28925}
28926' >>$CONFIG_STATUS || ac_write_fail=1
28927rm -f conf$$subs.awk
28928cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
28929_ACAWK
a9bec17c 28930cat >>"\$tmp/subs1.awk" <<_ACAWK &&
067d23c9
KY
28931 for (key in S) S_is_set[key] = 1
28932 FS = "\a"
28933 \$ac_cs_awk_pipe_init
28934}
28935{
28936 line = $ 0
28937 nfields = split(line, field, "@")
28938 substed = 0
28939 len = length(field[1])
28940 for (i = 2; i < nfields; i++) {
28941 key = field[i]
28942 keylen = length(key)
28943 if (S_is_set[key]) {
28944 value = S[key]
28945 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
28946 len += length(value) + length(field[++i])
28947 substed = 1
28948 } else
28949 len += 1 + keylen
28950 }
28951 if (nfields == 3 && !substed) {
28952 key = field[2]
28953 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
28954 \$ac_cs_awk_read_file
28955 next
28956 }
28957 }
28958 print line
28959}
28960\$ac_cs_awk_pipe_fini
28961_ACAWK
28962_ACEOF
28963cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
28964if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
28965 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
28966else
28967 cat
a9bec17c
GM
28968fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
28969 || as_fn_error "could not setup config files machinery" "$LINENO" 5
067d23c9
KY
28970_ACEOF
28971
a9bec17c
GM
28972# VPATH may cause trouble with some makes, so we remove $(srcdir),
28973# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
067d23c9
KY
28974# trailing colons and then remove the whole line if VPATH becomes empty
28975# (actually we leave an empty line to preserve line numbers).
28976if test "x$srcdir" = x.; then
a9bec17c
GM
28977 ac_vpsub='/^[ ]*VPATH[ ]*=/{
28978s/:*\$(srcdir):*/:/
28979s/:*\${srcdir}:*/:/
28980s/:*@srcdir@:*/:/
28981s/^\([^=]*=[ ]*\):*/\1/
067d23c9
KY
28982s/:*$//
28983s/^[^=]*=[ ]*$//
28984}'
28985fi
28986
28987cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
28988fi # test -n "$CONFIG_FILES"
28989
28990# Set up the scripts for CONFIG_HEADERS section.
28991# No need to generate them if there are no CONFIG_HEADERS.
28992# This happens for instance with `./config.status Makefile'.
28993if test -n "$CONFIG_HEADERS"; then
a9bec17c 28994cat >"$tmp/defines.awk" <<\_ACAWK ||
067d23c9
KY
28995BEGIN {
28996_ACEOF
28997
28998# Transform confdefs.h into an awk script `defines.awk', embedded as
28999# here-document in config.status, that substitutes the proper values into
29000# config.h.in to produce config.h.
29001
29002# Create a delimiter string that does not exist in confdefs.h, to ease
29003# handling of long lines.
29004ac_delim='%!_!# '
29005for ac_last_try in false false :; do
a9bec17c
GM
29006 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
29007 if test -z "$ac_t"; then
067d23c9
KY
29008 break
29009 elif $ac_last_try; then
a9bec17c 29010 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
067d23c9
KY
29011 else
29012 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
29013 fi
29014done
29015
29016# For the awk script, D is an array of macro values keyed by name,
29017# likewise P contains macro parameters if any. Preserve backslash
29018# newline sequences.
29019
29020ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
29021sed -n '
29022s/.\{148\}/&'"$ac_delim"'/g
29023t rset
29024:rset
29025s/^[ ]*#[ ]*define[ ][ ]*/ /
29026t def
29027d
29028:def
29029s/\\$//
29030t bsnl
29031s/["\\]/\\&/g
29032s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
29033D["\1"]=" \3"/p
29034s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
29035d
29036:bsnl
29037s/["\\]/\\&/g
29038s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
29039D["\1"]=" \3\\\\\\n"\\/p
29040t cont
29041s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
29042t cont
29043d
29044:cont
29045n
29046s/.\{148\}/&'"$ac_delim"'/g
29047t clear
29048:clear
29049s/\\$//
29050t bsnlc
29051s/["\\]/\\&/g; s/^/"/; s/$/"/p
29052d
29053:bsnlc
29054s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
29055b cont
29056' <confdefs.h | sed '
29057s/'"$ac_delim"'/"\\\
29058"/g' >>$CONFIG_STATUS || ac_write_fail=1
29059
29060cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29061 for (key in D) D_is_set[key] = 1
29062 FS = "\a"
29063}
29064/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
29065 line = \$ 0
29066 split(line, arg, " ")
29067 if (arg[1] == "#") {
29068 defundef = arg[2]
29069 mac1 = arg[3]
29070 } else {
29071 defundef = substr(arg[1], 2)
29072 mac1 = arg[2]
29073 }
29074 split(mac1, mac2, "(") #)
29075 macro = mac2[1]
29076 prefix = substr(line, 1, index(line, defundef) - 1)
29077 if (D_is_set[macro]) {
29078 # Preserve the white space surrounding the "#".
29079 print prefix "define", macro P[macro] D[macro]
29080 next
29081 } else {
29082 # Replace #undef with comments. This is necessary, for example,
29083 # in the case of _POSIX_SOURCE, which is predefined and required
29084 # on some systems where configure will not decide to define it.
29085 if (defundef == "undef") {
29086 print "/*", prefix defundef, macro, "*/"
29087 next
29088 }
29089 }
29090}
29091{ print }
29092_ACAWK
29093_ACEOF
29094cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
a9bec17c 29095 as_fn_error "could not setup config headers machinery" "$LINENO" 5
067d23c9
KY
29096fi # test -n "$CONFIG_HEADERS"
29097
29098
29099eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
29100shift
29101for ac_tag
29102do
29103 case $ac_tag in
29104 :[FHLC]) ac_mode=$ac_tag; continue;;
29105 esac
29106 case $ac_mode$ac_tag in
29107 :[FHL]*:*);;
a9bec17c 29108 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
067d23c9
KY
29109 :[FH]-) ac_tag=-:-;;
29110 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
29111 esac
29112 ac_save_IFS=$IFS
29113 IFS=:
29114 set x $ac_tag
29115 IFS=$ac_save_IFS
29116 shift
29117 ac_file=$1
29118 shift
29119
29120 case $ac_mode in
29121 :L) ac_source=$1;;
29122 :[FH])
29123 ac_file_inputs=
29124 for ac_f
29125 do
29126 case $ac_f in
a9bec17c 29127 -) ac_f="$tmp/stdin";;
067d23c9
KY
29128 *) # Look for the file first in the build tree, then in the source tree
29129 # (if the path is not absolute). The absolute path cannot be DOS-style,
29130 # because $ac_f cannot contain `:'.
29131 test -f "$ac_f" ||
29132 case $ac_f in
29133 [\\/$]*) false;;
29134 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
29135 esac ||
a9bec17c 29136 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
067d23c9
KY
29137 esac
29138 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
29139 as_fn_append ac_file_inputs " '$ac_f'"
29140 done
29141
29142 # Let's still pretend it is `configure' which instantiates (i.e., don't
29143 # use $as_me), people would be surprised to read:
29144 # /* config.h. Generated by config.status. */
29145 configure_input='Generated from '`
29146 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
29147 `' by configure.'
29148 if test x"$ac_file" != x-; then
29149 configure_input="$ac_file. $configure_input"
29150 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
29151$as_echo "$as_me: creating $ac_file" >&6;}
29152 fi
29153 # Neutralize special characters interpreted by sed in replacement strings.
29154 case $configure_input in #(
29155 *\&* | *\|* | *\\* )
29156 ac_sed_conf_input=`$as_echo "$configure_input" |
29157 sed 's/[\\\\&|]/\\\\&/g'`;; #(
29158 *) ac_sed_conf_input=$configure_input;;
29159 esac
29160
29161 case $ac_tag in
a9bec17c
GM
29162 *:-:* | *:-) cat >"$tmp/stdin" \
29163 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
067d23c9
KY
29164 esac
29165 ;;
29166 esac
29167
29168 ac_dir=`$as_dirname -- "$ac_file" ||
29169$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
29170 X"$ac_file" : 'X\(//\)[^/]' \| \
29171 X"$ac_file" : 'X\(//\)$' \| \
29172 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
29173$as_echo X"$ac_file" |
29174 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
29175 s//\1/
29176 q
29177 }
29178 /^X\(\/\/\)[^/].*/{
29179 s//\1/
29180 q
29181 }
29182 /^X\(\/\/\)$/{
29183 s//\1/
29184 q
29185 }
29186 /^X\(\/\).*/{
29187 s//\1/
29188 q
29189 }
29190 s/.*/./; q'`
29191 as_dir="$ac_dir"; as_fn_mkdir_p
29192 ac_builddir=.
29193
29194case "$ac_dir" in
29195.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
29196*)
29197 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
29198 # A ".." for each directory in $ac_dir_suffix.
29199 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
29200 case $ac_top_builddir_sub in
29201 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
29202 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
29203 esac ;;
29204esac
29205ac_abs_top_builddir=$ac_pwd
29206ac_abs_builddir=$ac_pwd$ac_dir_suffix
29207# for backward compatibility:
29208ac_top_builddir=$ac_top_build_prefix
29209
29210case $srcdir in
29211 .) # We are building in place.
29212 ac_srcdir=.
29213 ac_top_srcdir=$ac_top_builddir_sub
29214 ac_abs_top_srcdir=$ac_pwd ;;
29215 [\\/]* | ?:[\\/]* ) # Absolute name.
29216 ac_srcdir=$srcdir$ac_dir_suffix;
29217 ac_top_srcdir=$srcdir
29218 ac_abs_top_srcdir=$srcdir ;;
29219 *) # Relative name.
29220 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
29221 ac_top_srcdir=$ac_top_build_prefix$srcdir
29222 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
29223esac
29224ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
29225
29226
29227 case $ac_mode in
29228 :F)
29229 #
29230 # CONFIG_FILE
29231 #
29232
29233 case $INSTALL in
29234 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
29235 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
29236 esac
743c80a7
PE
29237 ac_MKDIR_P=$MKDIR_P
29238 case $MKDIR_P in
29239 [\\/$]* | ?:[\\/]* ) ;;
29240 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
29241 esac
067d23c9
KY
29242_ACEOF
29243
29244cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29245# If the template does not know about datarootdir, expand it.
29246# FIXME: This hack should be removed a few years after 2.60.
29247ac_datarootdir_hack=; ac_datarootdir_seen=
29248ac_sed_dataroot='
29249/datarootdir/ {
29250 p
29251 q
29252}
29253/@datadir@/p
29254/@docdir@/p
29255/@infodir@/p
29256/@localedir@/p
29257/@mandir@/p'
29258case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
29259*datarootdir*) ac_datarootdir_seen=yes;;
29260*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
29261 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
29262$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
29263_ACEOF
29264cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29265 ac_datarootdir_hack='
29266 s&@datadir@&$datadir&g
29267 s&@docdir@&$docdir&g
29268 s&@infodir@&$infodir&g
29269 s&@localedir@&$localedir&g
29270 s&@mandir@&$mandir&g
29271 s&\\\${datarootdir}&$datarootdir&g' ;;
29272esac
29273_ACEOF
29274
29275# Neutralize VPATH when `$srcdir' = `.'.
29276# Shell code in configure.ac might set extrasub.
29277# FIXME: do we really want to maintain this feature?
29278cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29279ac_sed_extra="$ac_vpsub
29280$extrasub
29281_ACEOF
29282cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29283:t
29284/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
29285s|@configure_input@|$ac_sed_conf_input|;t t
29286s&@top_builddir@&$ac_top_builddir_sub&;t t
29287s&@top_build_prefix@&$ac_top_build_prefix&;t t
29288s&@srcdir@&$ac_srcdir&;t t
29289s&@abs_srcdir@&$ac_abs_srcdir&;t t
29290s&@top_srcdir@&$ac_top_srcdir&;t t
29291s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
29292s&@builddir@&$ac_builddir&;t t
29293s&@abs_builddir@&$ac_abs_builddir&;t t
29294s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
29295s&@INSTALL@&$ac_INSTALL&;t t
743c80a7 29296s&@MKDIR_P@&$ac_MKDIR_P&;t t
067d23c9
KY
29297$ac_datarootdir_hack
29298"
29299eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
29300if $ac_cs_awk_getline; then
a9bec17c 29301 $AWK -f "$tmp/subs.awk"
067d23c9 29302else
a9bec17c
GM
29303 $AWK -f "$tmp/subs.awk" | $SHELL
29304fi >$tmp/out \
29305 || as_fn_error "could not create $ac_file" "$LINENO" 5
067d23c9
KY
29306
29307test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
a9bec17c
GM
29308 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
29309 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
067d23c9 29310 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
a9bec17c 29311which seems to be undefined. Please make sure it is defined." >&5
067d23c9 29312$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
a9bec17c 29313which seems to be undefined. Please make sure it is defined." >&2;}
067d23c9 29314
a9bec17c 29315 rm -f "$tmp/stdin"
067d23c9 29316 case $ac_file in
a9bec17c
GM
29317 -) cat "$tmp/out" && rm -f "$tmp/out";;
29318 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
067d23c9 29319 esac \
a9bec17c 29320 || as_fn_error "could not create $ac_file" "$LINENO" 5
067d23c9
KY
29321 ;;
29322 :H)
29323 #
29324 # CONFIG_HEADER
29325 #
29326 if test x"$ac_file" != x-; then
29327 {
29328 $as_echo "/* $configure_input */" \
a9bec17c
GM
29329 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
29330 } >"$tmp/config.h" \
29331 || as_fn_error "could not create $ac_file" "$LINENO" 5
29332 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
067d23c9
KY
29333 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
29334$as_echo "$as_me: $ac_file is unchanged" >&6;}
29335 else
29336 rm -f "$ac_file"
a9bec17c
GM
29337 mv "$tmp/config.h" "$ac_file" \
29338 || as_fn_error "could not create $ac_file" "$LINENO" 5
067d23c9
KY
29339 fi
29340 else
29341 $as_echo "/* $configure_input */" \
a9bec17c
GM
29342 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
29343 || as_fn_error "could not create -" "$LINENO" 5
067d23c9 29344 fi
743c80a7
PE
29345# Compute "$ac_file"'s index in $config_headers.
29346_am_arg="$ac_file"
29347_am_stamp_count=1
29348for _am_header in $config_headers :; do
29349 case $_am_header in
29350 $_am_arg | $_am_arg:* )
29351 break ;;
29352 * )
29353 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
29354 esac
29355done
29356echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
29357$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
29358 X"$_am_arg" : 'X\(//\)[^/]' \| \
29359 X"$_am_arg" : 'X\(//\)$' \| \
29360 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
29361$as_echo X"$_am_arg" |
29362 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
29363 s//\1/
29364 q
29365 }
29366 /^X\(\/\/\)[^/].*/{
29367 s//\1/
29368 q
29369 }
29370 /^X\(\/\/\)$/{
29371 s//\1/
29372 q
29373 }
29374 /^X\(\/\).*/{
29375 s//\1/
29376 q
29377 }
29378 s/.*/./; q'`/stamp-h$_am_stamp_count
067d23c9
KY
29379 ;;
29380
29381 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
29382$as_echo "$as_me: executing $ac_file commands" >&6;}
29383 ;;
29384 esac
29385
29386
29387 case $ac_file$ac_mode in
743c80a7
PE
29388 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
29389 # Autoconf 2.62 quotes --file arguments for eval, but not when files
29390 # are listed without --file. Let's play safe and only enable the eval
29391 # if we detect the quoting.
29392 case $CONFIG_FILES in
29393 *\'*) eval set x "$CONFIG_FILES" ;;
29394 *) set x $CONFIG_FILES ;;
29395 esac
29396 shift
29397 for mf
29398 do
29399 # Strip MF so we end up with the name of the file.
29400 mf=`echo "$mf" | sed -e 's/:.*$//'`
29401 # Check whether this is an Automake generated Makefile or not.
29402 # We used to match only the files named `Makefile.in', but
29403 # some people rename them; so instead we look at the file content.
29404 # Grep'ing the first line is not enough: some people post-process
29405 # each Makefile.in and add a new line on top of each file to say so.
29406 # Grep'ing the whole file is not good either: AIX grep has a line
29407 # limit of 2048, but all sed's we know have understand at least 4000.
29408 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
29409 dirpart=`$as_dirname -- "$mf" ||
29410$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
29411 X"$mf" : 'X\(//\)[^/]' \| \
29412 X"$mf" : 'X\(//\)$' \| \
29413 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
29414$as_echo X"$mf" |
29415 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
29416 s//\1/
29417 q
29418 }
29419 /^X\(\/\/\)[^/].*/{
29420 s//\1/
29421 q
29422 }
29423 /^X\(\/\/\)$/{
29424 s//\1/
29425 q
29426 }
29427 /^X\(\/\).*/{
29428 s//\1/
29429 q
29430 }
29431 s/.*/./; q'`
29432 else
29433 continue
29434 fi
29435 # Extract the definition of DEPDIR, am__include, and am__quote
29436 # from the Makefile without running `make'.
29437 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
29438 test -z "$DEPDIR" && continue
29439 am__include=`sed -n 's/^am__include = //p' < "$mf"`
29440 test -z "am__include" && continue
29441 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
29442 # When using ansi2knr, U may be empty or an underscore; expand it
29443 U=`sed -n 's/^U = //p' < "$mf"`
29444 # Find all dependency output files, they are included files with
29445 # $(DEPDIR) in their names. We invoke sed twice because it is the
29446 # simplest approach to changing $(DEPDIR) to its actual value in the
29447 # expansion.
29448 for file in `sed -n "
29449 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
29450 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
29451 # Make sure the directory exists.
29452 test -f "$dirpart/$file" && continue
29453 fdir=`$as_dirname -- "$file" ||
29454$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
29455 X"$file" : 'X\(//\)[^/]' \| \
29456 X"$file" : 'X\(//\)$' \| \
29457 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
29458$as_echo X"$file" |
29459 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
29460 s//\1/
29461 q
29462 }
29463 /^X\(\/\/\)[^/].*/{
29464 s//\1/
29465 q
29466 }
29467 /^X\(\/\/\)$/{
29468 s//\1/
29469 q
29470 }
29471 /^X\(\/\).*/{
29472 s//\1/
29473 q
29474 }
29475 s/.*/./; q'`
29476 as_dir=$dirpart/$fdir; as_fn_mkdir_p
29477 # echo "creating $dirpart/$file"
29478 echo '# dummy' > "$dirpart/$file"
29479 done
29480 done
29481}
29482 ;;
9411886d 29483 "mkdirs":C)
067d23c9
KY
29484for dir in etc lisp ; do
29485 test -d ${dir} || mkdir ${dir}
29486done
9411886d
PE
29487 ;;
29488 "epaths":C)
067d23c9 29489echo creating src/epaths.h
906debc3 29490${MAKE-make} MAKEFILE_NAME=do-not-make-Makefile epaths-force
9411886d
PE
29491 ;;
29492 "gdbinit":C)
b5591ebb 29493if test ! -f src/.gdbinit && test -f "$srcdir/src/.gdbinit"; then
067d23c9 29494 echo creating src/.gdbinit
b5591ebb 29495 echo "source $srcdir/src/.gdbinit" > src/.gdbinit
067d23c9 29496fi
067d23c9
KY
29497 ;;
29498
29499 esac
29500done # for ac_tag
29501
29502
29503as_fn_exit 0
29504_ACEOF
29505ac_clean_files=$ac_clean_files_save
29506
29507test $ac_write_fail = 0 ||
a9bec17c 29508 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
067d23c9
KY
29509
29510
29511# configure is writing to config.log, and then calls config.status.
29512# config.status does its own redirection, appending to config.log.
29513# Unfortunately, on DOS this fails, as config.log is still kept open
29514# by configure, so config.status won't be able to write to it; its
29515# output is simply discarded. So we exec the FD to /dev/null,
29516# effectively closing config.log, so it can be properly (re)opened and
29517# appended to by config.status. When coming back to configure, we
29518# need to make the FD available again.
29519if test "$no_create" != yes; then
29520 ac_cs_success=:
29521 ac_config_status_args=
29522 test "$silent" = yes &&
29523 ac_config_status_args="$ac_config_status_args --quiet"
29524 exec 5>/dev/null
29525 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
29526 exec 5>>config.log
29527 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
29528 # would make configure fail if this is the last instruction.
a9bec17c 29529 $ac_cs_success || as_fn_exit $?
067d23c9
KY
29530fi
29531if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
29532 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
29533$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
29534fi
29535