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
0eb775a3 784LIB_PTHREAD_SIGMASK
2b1928b8 785REPLACE_RAISE
3e0be4ab
GM
786REPLACE_PTHREAD_SIGMASK
787HAVE_SIGHANDLER_T
788HAVE_TYPE_VOLATILE_SIG_ATOMIC_T
789HAVE_STRUCT_SIGACTION_SA_SIGACTION
790HAVE_SIGACTION
791HAVE_SIGINFO_T
792HAVE_SIGSET_T
2b1928b8 793HAVE_RAISE
3e0be4ab
GM
794HAVE_PTHREAD_SIGMASK
795HAVE_POSIX_SIGNALBLOCKING
796GNULIB_SIGACTION
797GNULIB_SIGPROCMASK
798GNULIB_SIGNAL_H_SIGPIPE
2b1928b8 799GNULIB_RAISE
3e0be4ab 800GNULIB_PTHREAD_SIGMASK
f199cab1
GM
801HAVE_SYS_SELECT_H
802NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H
803NEXT_SYS_SELECT_H
804REPLACE_SELECT
805REPLACE_PSELECT
806HAVE_PSELECT
807GNULIB_SELECT
808GNULIB_PSELECT
1fd182f0
PE
809REPLACE_TIMEGM
810REPLACE_NANOSLEEP
811REPLACE_MKTIME
812REPLACE_LOCALTIME_R
813HAVE_TIMEGM
814HAVE_STRPTIME
815HAVE_NANOSLEEP
816HAVE_DECL_LOCALTIME_R
817GNULIB_TIME_R
818GNULIB_TIMEGM
819GNULIB_STRPTIME
820GNULIB_NANOSLEEP
821GNULIB_MKTIME
283c7aed
GM
822UNDEFINE_STRTOK_R
823REPLACE_STRTOK_R
824REPLACE_STRSIGNAL
825REPLACE_STRNLEN
826REPLACE_STRNDUP
827REPLACE_STRNCAT
828REPLACE_STRERROR_R
829REPLACE_STRERROR
830REPLACE_STRCHRNUL
831REPLACE_STRCASESTR
832REPLACE_STRSTR
833REPLACE_STRDUP
834REPLACE_STPNCPY
835REPLACE_MEMMEM
836REPLACE_MEMCHR
837HAVE_STRVERSCMP
838HAVE_DECL_STRSIGNAL
839HAVE_DECL_STRERROR_R
840HAVE_DECL_STRTOK_R
841HAVE_STRCASESTR
842HAVE_STRSEP
843HAVE_STRPBRK
844HAVE_DECL_STRNLEN
845HAVE_DECL_STRNDUP
846HAVE_DECL_STRDUP
847HAVE_STRCHRNUL
848HAVE_STPNCPY
849HAVE_STPCPY
850HAVE_RAWMEMCHR
851HAVE_DECL_MEMRCHR
852HAVE_MEMPCPY
853HAVE_DECL_MEMMEM
854HAVE_MEMCHR
855HAVE_FFSLL
856HAVE_FFSL
857HAVE_MBSLEN
858GNULIB_STRVERSCMP
859GNULIB_STRSIGNAL
860GNULIB_STRERROR_R
861GNULIB_STRERROR
862GNULIB_MBSTOK_R
863GNULIB_MBSSEP
864GNULIB_MBSSPN
865GNULIB_MBSPBRK
866GNULIB_MBSCSPN
867GNULIB_MBSCASESTR
868GNULIB_MBSPCASECMP
869GNULIB_MBSNCASECMP
870GNULIB_MBSCASECMP
871GNULIB_MBSSTR
872GNULIB_MBSRCHR
873GNULIB_MBSCHR
874GNULIB_MBSNLEN
875GNULIB_MBSLEN
876GNULIB_STRTOK_R
877GNULIB_STRCASESTR
878GNULIB_STRSTR
879GNULIB_STRSEP
880GNULIB_STRPBRK
881GNULIB_STRNLEN
882GNULIB_STRNDUP
883GNULIB_STRNCAT
884GNULIB_STRDUP
885GNULIB_STRCHRNUL
886GNULIB_STPNCPY
887GNULIB_STPCPY
888GNULIB_RAWMEMCHR
889GNULIB_MEMRCHR
890GNULIB_MEMPCPY
891GNULIB_MEMMEM
892GNULIB_MEMCHR
893GNULIB_FFSLL
894GNULIB_FFSL
4fda9c95
GM
895NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H
896NEXT_INTTYPES_H
897UINT64_MAX_EQ_ULONG_MAX
898UINT32_MAX_LT_UINTMAX_MAX
899PRIPTR_PREFIX
900PRI_MACROS_BROKEN
901INT64_MAX_EQ_LONG_MAX
902INT32_MAX_LT_INTMAX_MAX
0eb775a3 903REPLACE_STRTOIMAX
4fda9c95
GM
904HAVE_DECL_STRTOUMAX
905HAVE_DECL_STRTOIMAX
906HAVE_DECL_IMAXDIV
907HAVE_DECL_IMAXABS
908GNULIB_STRTOUMAX
909GNULIB_STRTOIMAX
910GNULIB_IMAXDIV
911GNULIB_IMAXABS
912GL_GENERATE_STDINT_H_FALSE
913GL_GENERATE_STDINT_H_TRUE
914STDINT_H
915WINT_T_SUFFIX
916WCHAR_T_SUFFIX
917SIG_ATOMIC_T_SUFFIX
918SIZE_T_SUFFIX
919PTRDIFF_T_SUFFIX
920HAVE_SIGNED_WINT_T
921HAVE_SIGNED_WCHAR_T
922HAVE_SIGNED_SIG_ATOMIC_T
923BITSIZEOF_WINT_T
924BITSIZEOF_WCHAR_T
925BITSIZEOF_SIG_ATOMIC_T
926BITSIZEOF_SIZE_T
927BITSIZEOF_PTRDIFF_T
928APPLE_UNIVERSAL_BUILD
929HAVE_SYS_BITYPES_H
930HAVE_SYS_INTTYPES_H
931HAVE_STDINT_H
932NEXT_AS_FIRST_DIRECTIVE_STDINT_H
933NEXT_STDINT_H
934HAVE_SYS_TYPES_H
935HAVE_INTTYPES_H
936HAVE_WCHAR_H
937HAVE_UNSIGNED_LONG_LONG_INT
938HAVE_LONG_LONG_INT
f199cab1
GM
939HAVE_WINSOCK2_H
940NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
941NEXT_SYS_TIME_H
942REPLACE_STRUCT_TIMEVAL
943REPLACE_GETTIMEOFDAY
944HAVE_SYS_TIME_H
945HAVE_STRUCT_TIMEVAL
946HAVE_GETTIMEOFDAY
947GNULIB_GETTIMEOFDAY
0eb775a3 948GNULIB_GL_UNISTD_H_GETOPT
e275c824
PE
949GETOPT_H
950HAVE_GETOPT_H
951NEXT_AS_FIRST_DIRECTIVE_GETOPT_H
952NEXT_GETOPT_H
7d2a1c5e
GM
953GETLOADAVG_LIBS
954REPLACE_WCTOMB
955REPLACE_UNSETENV
956REPLACE_STRTOD
957REPLACE_SETENV
958REPLACE_REALPATH
959REPLACE_REALLOC
0eb775a3 960REPLACE_RANDOM_R
7d2a1c5e 961REPLACE_PUTENV
0eb775a3 962REPLACE_PTSNAME_R
b6c9d18d 963REPLACE_PTSNAME
7d2a1c5e
GM
964REPLACE_MKSTEMP
965REPLACE_MBTOWC
966REPLACE_MALLOC
967REPLACE_CANONICALIZE_FILE_NAME
968REPLACE_CALLOC
969HAVE_DECL_UNSETENV
970HAVE_UNLOCKPT
971HAVE_SYS_LOADAVG_H
972HAVE_STRUCT_RANDOM_DATA
973HAVE_STRTOULL
974HAVE_STRTOLL
975HAVE_STRTOD
976HAVE_DECL_SETENV
977HAVE_SETENV
2cdd55fc 978HAVE_SECURE_GETENV
7d2a1c5e
GM
979HAVE_RPMATCH
980HAVE_REALPATH
981HAVE_RANDOM_R
982HAVE_RANDOM_H
0eb775a3
GM
983HAVE_RANDOM
984HAVE_PTSNAME_R
7d2a1c5e 985HAVE_PTSNAME
0eb775a3 986HAVE_POSIX_OPENPT
7d2a1c5e
GM
987HAVE_MKSTEMPS
988HAVE_MKSTEMP
989HAVE_MKOSTEMPS
990HAVE_MKOSTEMP
991HAVE_MKDTEMP
992HAVE_GRANTPT
993HAVE_GETSUBOPT
994HAVE_DECL_GETLOADAVG
995HAVE_CANONICALIZE_FILE_NAME
996HAVE_ATOLL
997HAVE__EXIT
998GNULIB_WCTOMB
999GNULIB_UNSETENV
1000GNULIB_UNLOCKPT
1001GNULIB_SYSTEM_POSIX
1002GNULIB_STRTOULL
1003GNULIB_STRTOLL
1004GNULIB_STRTOD
1005GNULIB_SETENV
2cdd55fc 1006GNULIB_SECURE_GETENV
7d2a1c5e
GM
1007GNULIB_RPMATCH
1008GNULIB_REALPATH
1009GNULIB_REALLOC_POSIX
1010GNULIB_RANDOM_R
0eb775a3 1011GNULIB_RANDOM
7d2a1c5e 1012GNULIB_PUTENV
0eb775a3 1013GNULIB_PTSNAME_R
7d2a1c5e 1014GNULIB_PTSNAME
0eb775a3 1015GNULIB_POSIX_OPENPT
7d2a1c5e
GM
1016GNULIB_MKSTEMPS
1017GNULIB_MKSTEMP
1018GNULIB_MKOSTEMPS
1019GNULIB_MKOSTEMP
1020GNULIB_MKDTEMP
1021GNULIB_MBTOWC
1022GNULIB_MALLOC_POSIX
1023GNULIB_GRANTPT
1024GNULIB_GETSUBOPT
1025GNULIB_GETLOADAVG
1026GNULIB_CANONICALIZE_FILE_NAME
1027GNULIB_CALLOC_POSIX
1028GNULIB_ATOLL
1029GNULIB__EXIT
d7ad186c
GM
1030REPLACE_UTIMENSAT
1031REPLACE_STAT
1032REPLACE_MKNOD
1033REPLACE_MKFIFO
1034REPLACE_MKDIR
1035REPLACE_LSTAT
1036REPLACE_FUTIMENS
1037REPLACE_FSTATAT
1038REPLACE_FSTAT
1039HAVE_UTIMENSAT
1040HAVE_MKNODAT
1041HAVE_MKNOD
1042HAVE_MKFIFOAT
1043HAVE_MKFIFO
1044HAVE_MKDIRAT
1045HAVE_LSTAT
1046HAVE_LCHMOD
1047HAVE_FUTIMENS
1048HAVE_FSTATAT
1049HAVE_FCHMODAT
1050GNULIB_UTIMENSAT
1051GNULIB_STAT
1052GNULIB_MKNODAT
1053GNULIB_MKNOD
1054GNULIB_MKFIFOAT
1055GNULIB_MKFIFO
1056GNULIB_MKDIRAT
1057GNULIB_LSTAT
1058GNULIB_LCHMOD
1059GNULIB_FUTIMENS
1060GNULIB_FSTATAT
1061GNULIB_FSTAT
1062GNULIB_FCHMODAT
2407788f 1063LIB_FDATASYNC
710f5812
GM
1064NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
1065NEXT_FCNTL_H
710f5812
GM
1066REPLACE_OPENAT
1067REPLACE_OPEN
1068REPLACE_FCNTL
1069HAVE_OPENAT
1070HAVE_FCNTL
1071GNULIB_OPENAT
1072GNULIB_OPEN
1073GNULIB_NONBLOCKING
1074GNULIB_FCNTL
8966cbff
GM
1075GL_GENERATE_EXECINFO_H_FALSE
1076GL_GENERATE_EXECINFO_H_TRUE
1077LIB_EXECINFO
1078EXECINFO_H
d7ad186c
GM
1079HAVE_DIRENT_H
1080NEXT_AS_FIRST_DIRECTIVE_DIRENT_H
1081NEXT_DIRENT_H
1082PRAGMA_COLUMNS
1083PRAGMA_SYSTEM_HEADER
1084INCLUDE_NEXT_AS_FIRST_DIRECTIVE
1085INCLUDE_NEXT
1086REPLACE_FDOPENDIR
1087REPLACE_DIRFD
1088REPLACE_CLOSEDIR
1089REPLACE_OPENDIR
1090HAVE_ALPHASORT
1091HAVE_SCANDIR
1092HAVE_FDOPENDIR
1093HAVE_DECL_FDOPENDIR
1094HAVE_DECL_DIRFD
1095HAVE_CLOSEDIR
1096HAVE_REWINDDIR
1097HAVE_READDIR
1098HAVE_OPENDIR
1099GNULIB_ALPHASORT
1100GNULIB_SCANDIR
1101GNULIB_FDOPENDIR
1102GNULIB_DIRFD
1103GNULIB_CLOSEDIR
1104GNULIB_REWINDDIR
1105GNULIB_READDIR
1106GNULIB_OPENDIR
e275c824
PE
1107UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1108UNISTD_H_HAVE_WINSOCK2_H
1109REPLACE_WRITE
1110REPLACE_USLEEP
1111REPLACE_UNLINKAT
1112REPLACE_UNLINK
1113REPLACE_TTYNAME_R
1114REPLACE_SYMLINK
1115REPLACE_SLEEP
1116REPLACE_RMDIR
1117REPLACE_READLINK
ca36e0ff 1118REPLACE_READ
e275c824
PE
1119REPLACE_PWRITE
1120REPLACE_PREAD
1121REPLACE_LSEEK
1122REPLACE_LINKAT
1123REPLACE_LINK
1124REPLACE_LCHOWN
0eb775a3 1125REPLACE_ISATTY
e275c824
PE
1126REPLACE_GETPAGESIZE
1127REPLACE_GETGROUPS
1128REPLACE_GETLOGIN_R
1129REPLACE_GETDOMAINNAME
1130REPLACE_GETCWD
0eb775a3 1131REPLACE_FTRUNCATE
e275c824
PE
1132REPLACE_FCHOWNAT
1133REPLACE_DUP2
1134REPLACE_DUP
1135REPLACE_CLOSE
1136REPLACE_CHOWN
1137HAVE_SYS_PARAM_H
1138HAVE_OS_H
1139HAVE_DECL_TTYNAME_R
0eb775a3 1140HAVE_DECL_SETHOSTNAME
e275c824
PE
1141HAVE_DECL_GETUSERSHELL
1142HAVE_DECL_GETPAGESIZE
1143HAVE_DECL_GETLOGIN_R
1144HAVE_DECL_GETDOMAINNAME
2b1928b8 1145HAVE_DECL_FDATASYNC
e275c824
PE
1146HAVE_DECL_FCHDIR
1147HAVE_DECL_ENVIRON
1148HAVE_USLEEP
1149HAVE_UNLINKAT
1150HAVE_SYMLINKAT
1151HAVE_SYMLINK
1152HAVE_SLEEP
0eb775a3 1153HAVE_SETHOSTNAME
e275c824
PE
1154HAVE_READLINKAT
1155HAVE_READLINK
1156HAVE_PWRITE
1157HAVE_PREAD
1158HAVE_PIPE2
1159HAVE_PIPE
1160HAVE_LINKAT
1161HAVE_LINK
1162HAVE_LCHOWN
da6c8463 1163HAVE_GROUP_MEMBER
e275c824
PE
1164HAVE_GETPAGESIZE
1165HAVE_GETLOGIN
1166HAVE_GETHOSTNAME
1167HAVE_GETGROUPS
1168HAVE_GETDTABLESIZE
1169HAVE_FTRUNCATE
1170HAVE_FSYNC
2b1928b8 1171HAVE_FDATASYNC
e275c824
PE
1172HAVE_FCHOWNAT
1173HAVE_FCHDIR
1174HAVE_FACCESSAT
1175HAVE_EUIDACCESS
1176HAVE_DUP3
1177HAVE_DUP2
1178HAVE_CHOWN
1179GNULIB_WRITE
1180GNULIB_USLEEP
1181GNULIB_UNLINKAT
1182GNULIB_UNLINK
1183GNULIB_UNISTD_H_SIGPIPE
ca36e0ff 1184GNULIB_UNISTD_H_NONBLOCKING
e275c824
PE
1185GNULIB_TTYNAME_R
1186GNULIB_SYMLINKAT
1187GNULIB_SYMLINK
1188GNULIB_SLEEP
0eb775a3 1189GNULIB_SETHOSTNAME
e275c824
PE
1190GNULIB_RMDIR
1191GNULIB_READLINKAT
1192GNULIB_READLINK
ca36e0ff 1193GNULIB_READ
e275c824
PE
1194GNULIB_PWRITE
1195GNULIB_PREAD
1196GNULIB_PIPE2
1197GNULIB_PIPE
1198GNULIB_LSEEK
1199GNULIB_LINKAT
1200GNULIB_LINK
1201GNULIB_LCHOWN
0eb775a3 1202GNULIB_ISATTY
da6c8463 1203GNULIB_GROUP_MEMBER
e275c824
PE
1204GNULIB_GETUSERSHELL
1205GNULIB_GETPAGESIZE
1206GNULIB_GETLOGIN_R
1207GNULIB_GETLOGIN
1208GNULIB_GETHOSTNAME
1209GNULIB_GETGROUPS
1210GNULIB_GETDTABLESIZE
1211GNULIB_GETDOMAINNAME
1212GNULIB_GETCWD
1213GNULIB_FTRUNCATE
1214GNULIB_FSYNC
2b1928b8 1215GNULIB_FDATASYNC
e275c824
PE
1216GNULIB_FCHOWNAT
1217GNULIB_FCHDIR
1218GNULIB_FACCESSAT
1219GNULIB_EUIDACCESS
1220GNULIB_ENVIRON
1221GNULIB_DUP3
1222GNULIB_DUP2
2b1928b8 1223GNULIB_DUP
e275c824
PE
1224GNULIB_CLOSE
1225GNULIB_CHOWN
2b1928b8 1226GNULIB_CHDIR
f199cab1 1227LIB_CLOCK_GETTIME
4fc2b746
GM
1228GL_GENERATE_ALLOCA_H_FALSE
1229GL_GENERATE_ALLOCA_H_TRUE
1230ALLOCA_H
1231ALLOCA
743c80a7
PE
1232GL_COND_LIBTOOL_FALSE
1233GL_COND_LIBTOOL_TRUE
5476a9a4
GM
1234POST_ALLOC_OBJ
1235PRE_ALLOC_OBJ
1236CYGWIN_OBJ
1237RALLOC_OBJ
1238OLDXMENU_DEPS
1239LIBX_OTHER
1240LIBXMENU
1241OLDXMENU
1242OLDXMENU_TARGET
1243LIBXT_OTHER
1244TOOLKIT_LIBW
1245WIDGET_OBJ
1246XOBJ
1247XMENU_OBJ
1248FONT_OBJ
1249OTHER_FILES
1250GNU_OBJC_CFLAGS
1251ns_appsrc
1252ns_appresdir
1253ns_appbindir
1254ns_appdir
5476a9a4
GM
1255X_TOOLKIT_TYPE
1256GNUSTEP_CFLAGS
1257C_SWITCH_X_SITE
1258LD_SWITCH_X_SITE
1259gameuser
1260gamedir
1261bitmapdir
1262archlibdir
1263etcdir
1264x_default_search_path
1265lisppath
1266locallisppath
1267standardlisppath
1268leimdir
1269lispdir
1270srcdir
1271canonical
1272configuration
1273version
bb7dce39 1274copyright
5476a9a4
GM
1275KRB4LIB
1276DESLIB
1277KRB5LIB
1278CRYPTOLIB
1279COM_ERRLIB
1280LIBRESOLV
1281LIBHESIOD
1282TERMCAP_OBJ
1283LIBS_TERMCAP
1284BLESSMAIL_TARGET
1285LIBS_MAIL
1286liblockfile
1287LIBXML2_LIBS
1288LIBXML2_CFLAGS
1289LIBXSM
1290LIBGPM
1291LIBGIF
1292LIBTIFF
1293LIBPNG
1294LIBJPEG
1295LIBXPM
1296M17N_FLT_LIBS
1297M17N_FLT_CFLAGS
1298LIBOTF_LIBS
1299LIBOTF_CFLAGS
1300FREETYPE_LIBS
1301FREETYPE_CFLAGS
1302XFT_LIBS
1303XFT_CFLAGS
1304FONTCONFIG_LIBS
1305FONTCONFIG_CFLAGS
1306LIBXMU
1307LIBXTR6
4cc63c81 1308LIBACL_LIBS
5476a9a4
GM
1309LIBGNUTLS_LIBS
1310LIBGNUTLS_CFLAGS
1311LIBSELINUX_LIBS
1312SETTINGS_LIBS
1313SETTINGS_CFLAGS
dcde497f
GM
1314GOBJECT_LIBS
1315GOBJECT_CFLAGS
5476a9a4
GM
1316GCONF_LIBS
1317GCONF_CFLAGS
1318GSETTINGS_LIBS
1319GSETTINGS_CFLAGS
1320DBUS_OBJ
1321DBUS_LIBS
1322DBUS_CFLAGS
1323GTK_OBJ
1324GTK_LIBS
1325GTK_CFLAGS
1326IMAGEMAGICK_LIBS
1327IMAGEMAGICK_CFLAGS
1328RSVG_LIBS
1329RSVG_CFLAGS
1330LIB_PTHREAD
1331VMLIMIT_OBJ
1332GMALLOC_OBJ
1333HAVE_XSERVER
b5eb356a
GM
1334W32_RES_LINK
1335W32_RES
5c0255d9
GM
1336W32_LIBS
1337W32_OBJ
b5eb356a 1338WINDRES
5476a9a4
GM
1339NS_OBJC_OBJ
1340NS_OBJ
1341ns_self_contained
1342INSTALL_ARCH_INDEP_EXTRA
4efe5ef9 1343LIBS_GNUSTEP
5476a9a4
GM
1344LD_SWITCH_X_SITE_RPATH
1345XMKMF
1346DEPFLAGS
1347MKDEPDIR
1348CFLAGS_SOUND
1349ALSA_LIBS
1350ALSA_CFLAGS
1351LIBSOUND
1352PKG_CONFIG
067d23c9 1353LIB_MATH
067d23c9
KY
1354LIBS_SYSTEM
1355C_SWITCH_SYSTEM
1356UNEXEC_OBJ
1357C_SWITCH_MACHINE
1358LD_SWITCH_SYSTEM
1359CANNOT_DUMP
141d074d
GM
1360INFO_OPTS
1361INFO_EXT
96f129d5 1362HAVE_MAKEINFO
9c29597b 1363PAXCTL
067d23c9
KY
1364GZIP_PROG
1365INSTALL_INFO
0e733db9 1366LN_S
a6b92a4a 1367GNULIB_WARN_CFLAGS
0eb775a3 1368WARN_CFLAGS
a6b92a4a 1369WERROR_CFLAGS
369e19fc
PE
1370RANLIB
1371ARFLAGS
1372AR
067d23c9
KY
1373EGREP
1374GREP
1375CPP
743c80a7
PE
1376am__fastdepCC_FALSE
1377am__fastdepCC_TRUE
1378CCDEPMODE
1379AMDEPBACKSLASH
1380AMDEP_FALSE
1381AMDEP_TRUE
1382am__quote
1383am__include
1384DEPDIR
067d23c9
KY
1385OBJEXT
1386EXEEXT
1387ac_ct_CC
1388CPPFLAGS
1389LDFLAGS
1390CFLAGS
1391CC
1392host_os
1393host_vendor
1394host_cpu
1395host
1396build_os
1397build_vendor
1398build_cpu
1399build
1400PROFILING_CFLAGS
067d23c9 1401GZIP_INFO
c3a461a5 1402cache_file
743c80a7
PE
1403am__untar
1404am__tar
1405AMTAR
1406am__leading_dot
1407SET_MAKE
1408AWK
1409mkdir_p
1410MKDIR_P
1411INSTALL_STRIP_PROGRAM
1412STRIP
1413install_sh
1414MAKEINFO
1415AUTOHEADER
1416AUTOMAKE
1417AUTOCONF
1418ACLOCAL
1419VERSION
1420PACKAGE
1421CYGPATH_W
1422am__isrc
1423INSTALL_DATA
1424INSTALL_SCRIPT
1425INSTALL_PROGRAM
067d23c9
KY
1426target_alias
1427host_alias
1428build_alias
1429LIBS
1430ECHO_T
1431ECHO_N
1432ECHO_C
1433DEFS
1434mandir
1435localedir
1436libdir
1437psdir
1438pdfdir
1439dvidir
1440htmldir
1441infodir
1442docdir
1443oldincludedir
1444includedir
1445localstatedir
1446sharedstatedir
1447sysconfdir
1448datadir
1449datarootdir
1450libexecdir
1451sbindir
1452bindir
1453program_transform_name
1454prefix
1455exec_prefix
1456PACKAGE_URL
1457PACKAGE_BUGREPORT
1458PACKAGE_STRING
1459PACKAGE_VERSION
1460PACKAGE_TARNAME
1461PACKAGE_NAME
1462PATH_SEPARATOR
1463SHELL'
1464ac_subst_files='deps_frag
bb7dce39 1465lisp_frag'
067d23c9
KY
1466ac_user_opts='
1467enable_option_checking
ee77919d 1468with_all
067d23c9
KY
1469with_pop
1470with_kerberos
1471with_kerberos5
1472with_hesiod
1473with_mmdf
1474with_mail_unlink
1475with_mailhost
1476with_sound
067d23c9 1477with_x_toolkit
0442dc7f 1478with_wide_int
067d23c9
KY
1479with_xpm
1480with_jpeg
1481with_tiff
1482with_gif
1483with_png
1484with_rsvg
1485with_xml2
1486with_imagemagick
1487with_xft
1488with_libotf
1489with_m17n_flt
1490with_toolkit_scroll_bars
1491with_xaw3d
1492with_xim
1493with_ns
5c0255d9 1494with_w32
067d23c9
KY
1495with_gpm
1496with_dbus
1497with_gconf
f527bd02 1498with_gsettings
067d23c9 1499with_selinux
4cc63c81 1500with_acl
067d23c9 1501with_gnutls
b5eb356a 1502with_inotify
067d23c9
KY
1503with_makeinfo
1504with_compress_info
1505with_pkg_config_prog
4fc5868a 1506with_gameuser
067d23c9
KY
1507with_gnustep_conf
1508enable_ns_self_contained
067d23c9
KY
1509enable_locallisppath
1510enable_checking
afd07e01 1511enable_check_lisp_object_type
067d23c9
KY
1512enable_profiling
1513enable_autodepend
4efe5ef9 1514enable_gtk_deprecation_warnings
743c80a7 1515enable_dependency_tracking
067d23c9 1516enable_largefile
a6b92a4a 1517enable_gcc_warnings
e4d35030 1518enable_link_time_optimization
067d23c9
KY
1519with_x
1520'
1521 ac_precious_vars='build_alias
1522host_alias
1523target_alias
1524CC
1525CFLAGS
1526LDFLAGS
1527LIBS
1528CPPFLAGS
1529CPP
1530XMKMF'
1531
1532
1533# Initialize some variables set by options.
1534ac_init_help=
1535ac_init_version=false
1536ac_unrecognized_opts=
1537ac_unrecognized_sep=
1538# The variables have the same names as the options, with
1539# dashes changed to underlines.
1540cache_file=/dev/null
1541exec_prefix=NONE
1542no_create=
1543no_recursion=
1544prefix=NONE
1545program_prefix=NONE
1546program_suffix=NONE
1547program_transform_name=s,x,x,
1548silent=
1549site=
1550srcdir=
1551verbose=
1552x_includes=NONE
1553x_libraries=NONE
1554
1555# Installation directory options.
1556# These are left unexpanded so users can "make install exec_prefix=/foo"
1557# and all the variables that are supposed to be based on exec_prefix
1558# by default will actually change.
1559# Use braces instead of parens because sh, perl, etc. also accept them.
1560# (The list follows the same order as the GNU Coding Standards.)
1561bindir='${exec_prefix}/bin'
1562sbindir='${exec_prefix}/sbin'
1563libexecdir='${exec_prefix}/libexec'
1564datarootdir='${prefix}/share'
1565datadir='${datarootdir}'
1566sysconfdir='${prefix}/etc'
1567sharedstatedir='${prefix}/com'
1568localstatedir='${prefix}/var'
1569includedir='${prefix}/include'
1570oldincludedir='/usr/include'
1571docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1572infodir='${datarootdir}/info'
1573htmldir='${docdir}'
1574dvidir='${docdir}'
1575pdfdir='${docdir}'
1576psdir='${docdir}'
1577libdir='${exec_prefix}/lib'
1578localedir='${datarootdir}/locale'
1579mandir='${datarootdir}/man'
1580
1581ac_prev=
1582ac_dashdash=
1583for ac_option
1584do
1585 # If the previous option needs an argument, assign it.
1586 if test -n "$ac_prev"; then
1587 eval $ac_prev=\$ac_option
1588 ac_prev=
1589 continue
1590 fi
1591
1592 case $ac_option in
a9bec17c
GM
1593 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1594 *) ac_optarg=yes ;;
067d23c9
KY
1595 esac
1596
1597 # Accept the important Cygnus configure options, so we can diagnose typos.
1598
1599 case $ac_dashdash$ac_option in
1600 --)
1601 ac_dashdash=yes ;;
1602
1603 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1604 ac_prev=bindir ;;
1605 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1606 bindir=$ac_optarg ;;
1607
1608 -build | --build | --buil | --bui | --bu)
1609 ac_prev=build_alias ;;
1610 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1611 build_alias=$ac_optarg ;;
1612
1613 -cache-file | --cache-file | --cache-fil | --cache-fi \
1614 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1615 ac_prev=cache_file ;;
1616 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1617 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1618 cache_file=$ac_optarg ;;
1619
1620 --config-cache | -C)
1621 cache_file=config.cache ;;
1622
1623 -datadir | --datadir | --datadi | --datad)
1624 ac_prev=datadir ;;
1625 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1626 datadir=$ac_optarg ;;
1627
1628 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1629 | --dataroo | --dataro | --datar)
1630 ac_prev=datarootdir ;;
1631 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1632 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1633 datarootdir=$ac_optarg ;;
1634
1635 -disable-* | --disable-*)
1636 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1637 # Reject names that are not valid shell variable names.
1638 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
a9bec17c 1639 as_fn_error "invalid feature name: $ac_useropt"
067d23c9
KY
1640 ac_useropt_orig=$ac_useropt
1641 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1642 case $ac_user_opts in
1643 *"
1644"enable_$ac_useropt"
1645"*) ;;
1646 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1647 ac_unrecognized_sep=', ';;
1648 esac
1649 eval enable_$ac_useropt=no ;;
1650
1651 -docdir | --docdir | --docdi | --doc | --do)
1652 ac_prev=docdir ;;
1653 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1654 docdir=$ac_optarg ;;
1655
1656 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1657 ac_prev=dvidir ;;
1658 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1659 dvidir=$ac_optarg ;;
1660
1661 -enable-* | --enable-*)
1662 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1663 # Reject names that are not valid shell variable names.
1664 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
a9bec17c 1665 as_fn_error "invalid feature name: $ac_useropt"
067d23c9
KY
1666 ac_useropt_orig=$ac_useropt
1667 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1668 case $ac_user_opts in
1669 *"
1670"enable_$ac_useropt"
1671"*) ;;
1672 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1673 ac_unrecognized_sep=', ';;
1674 esac
1675 eval enable_$ac_useropt=\$ac_optarg ;;
1676
1677 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1678 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1679 | --exec | --exe | --ex)
1680 ac_prev=exec_prefix ;;
1681 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1682 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1683 | --exec=* | --exe=* | --ex=*)
1684 exec_prefix=$ac_optarg ;;
1685
1686 -gas | --gas | --ga | --g)
1687 # Obsolete; use --with-gas.
1688 with_gas=yes ;;
1689
1690 -help | --help | --hel | --he | -h)
1691 ac_init_help=long ;;
1692 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1693 ac_init_help=recursive ;;
1694 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1695 ac_init_help=short ;;
1696
1697 -host | --host | --hos | --ho)
1698 ac_prev=host_alias ;;
1699 -host=* | --host=* | --hos=* | --ho=*)
1700 host_alias=$ac_optarg ;;
1701
1702 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1703 ac_prev=htmldir ;;
1704 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1705 | --ht=*)
1706 htmldir=$ac_optarg ;;
1707
1708 -includedir | --includedir | --includedi | --included | --include \
1709 | --includ | --inclu | --incl | --inc)
1710 ac_prev=includedir ;;
1711 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1712 | --includ=* | --inclu=* | --incl=* | --inc=*)
1713 includedir=$ac_optarg ;;
1714
1715 -infodir | --infodir | --infodi | --infod | --info | --inf)
1716 ac_prev=infodir ;;
1717 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1718 infodir=$ac_optarg ;;
1719
1720 -libdir | --libdir | --libdi | --libd)
1721 ac_prev=libdir ;;
1722 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1723 libdir=$ac_optarg ;;
1724
1725 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1726 | --libexe | --libex | --libe)
1727 ac_prev=libexecdir ;;
1728 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1729 | --libexe=* | --libex=* | --libe=*)
1730 libexecdir=$ac_optarg ;;
1731
1732 -localedir | --localedir | --localedi | --localed | --locale)
1733 ac_prev=localedir ;;
1734 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1735 localedir=$ac_optarg ;;
1736
1737 -localstatedir | --localstatedir | --localstatedi | --localstated \
1738 | --localstate | --localstat | --localsta | --localst | --locals)
1739 ac_prev=localstatedir ;;
1740 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1741 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1742 localstatedir=$ac_optarg ;;
1743
1744 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1745 ac_prev=mandir ;;
1746 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1747 mandir=$ac_optarg ;;
1748
1749 -nfp | --nfp | --nf)
1750 # Obsolete; use --without-fp.
1751 with_fp=no ;;
1752
1753 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1754 | --no-cr | --no-c | -n)
1755 no_create=yes ;;
1756
1757 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1758 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1759 no_recursion=yes ;;
1760
1761 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1762 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1763 | --oldin | --oldi | --old | --ol | --o)
1764 ac_prev=oldincludedir ;;
1765 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1766 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1767 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1768 oldincludedir=$ac_optarg ;;
1769
1770 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1771 ac_prev=prefix ;;
1772 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1773 prefix=$ac_optarg ;;
1774
1775 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1776 | --program-pre | --program-pr | --program-p)
1777 ac_prev=program_prefix ;;
1778 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1779 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1780 program_prefix=$ac_optarg ;;
1781
1782 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1783 | --program-suf | --program-su | --program-s)
1784 ac_prev=program_suffix ;;
1785 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1786 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1787 program_suffix=$ac_optarg ;;
1788
1789 -program-transform-name | --program-transform-name \
1790 | --program-transform-nam | --program-transform-na \
1791 | --program-transform-n | --program-transform- \
1792 | --program-transform | --program-transfor \
1793 | --program-transfo | --program-transf \
1794 | --program-trans | --program-tran \
1795 | --progr-tra | --program-tr | --program-t)
1796 ac_prev=program_transform_name ;;
1797 -program-transform-name=* | --program-transform-name=* \
1798 | --program-transform-nam=* | --program-transform-na=* \
1799 | --program-transform-n=* | --program-transform-=* \
1800 | --program-transform=* | --program-transfor=* \
1801 | --program-transfo=* | --program-transf=* \
1802 | --program-trans=* | --program-tran=* \
1803 | --progr-tra=* | --program-tr=* | --program-t=*)
1804 program_transform_name=$ac_optarg ;;
1805
1806 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1807 ac_prev=pdfdir ;;
1808 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1809 pdfdir=$ac_optarg ;;
1810
1811 -psdir | --psdir | --psdi | --psd | --ps)
1812 ac_prev=psdir ;;
1813 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1814 psdir=$ac_optarg ;;
1815
1816 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1817 | -silent | --silent | --silen | --sile | --sil)
1818 silent=yes ;;
1819
1820 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1821 ac_prev=sbindir ;;
1822 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1823 | --sbi=* | --sb=*)
1824 sbindir=$ac_optarg ;;
1825
1826 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1827 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1828 | --sharedst | --shareds | --shared | --share | --shar \
1829 | --sha | --sh)
1830 ac_prev=sharedstatedir ;;
1831 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1832 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1833 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1834 | --sha=* | --sh=*)
1835 sharedstatedir=$ac_optarg ;;
1836
1837 -site | --site | --sit)
1838 ac_prev=site ;;
1839 -site=* | --site=* | --sit=*)
1840 site=$ac_optarg ;;
1841
1842 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1843 ac_prev=srcdir ;;
1844 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1845 srcdir=$ac_optarg ;;
1846
1847 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1848 | --syscon | --sysco | --sysc | --sys | --sy)
1849 ac_prev=sysconfdir ;;
1850 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1851 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1852 sysconfdir=$ac_optarg ;;
1853
1854 -target | --target | --targe | --targ | --tar | --ta | --t)
1855 ac_prev=target_alias ;;
1856 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1857 target_alias=$ac_optarg ;;
1858
1859 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1860 verbose=yes ;;
1861
1862 -version | --version | --versio | --versi | --vers | -V)
1863 ac_init_version=: ;;
1864
1865 -with-* | --with-*)
1866 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1867 # Reject names that are not valid shell variable names.
1868 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
a9bec17c 1869 as_fn_error "invalid package name: $ac_useropt"
067d23c9
KY
1870 ac_useropt_orig=$ac_useropt
1871 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1872 case $ac_user_opts in
1873 *"
1874"with_$ac_useropt"
1875"*) ;;
1876 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1877 ac_unrecognized_sep=', ';;
1878 esac
1879 eval with_$ac_useropt=\$ac_optarg ;;
1880
1881 -without-* | --without-*)
1882 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
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--without-$ac_useropt_orig"
1893 ac_unrecognized_sep=', ';;
1894 esac
1895 eval with_$ac_useropt=no ;;
1896
1897 --x)
1898 # Obsolete; use --with-x.
1899 with_x=yes ;;
1900
1901 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1902 | --x-incl | --x-inc | --x-in | --x-i)
1903 ac_prev=x_includes ;;
1904 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1905 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1906 x_includes=$ac_optarg ;;
1907
1908 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1909 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1910 ac_prev=x_libraries ;;
1911 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1912 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1913 x_libraries=$ac_optarg ;;
1914
a9bec17c
GM
1915 -*) as_fn_error "unrecognized option: \`$ac_option'
1916Try \`$0 --help' for more information."
067d23c9
KY
1917 ;;
1918
1919 *=*)
1920 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1921 # Reject names that are not valid shell variable names.
1922 case $ac_envvar in #(
1923 '' | [0-9]* | *[!_$as_cr_alnum]* )
a9bec17c 1924 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
067d23c9
KY
1925 esac
1926 eval $ac_envvar=\$ac_optarg
1927 export $ac_envvar ;;
1928
1929 *)
1930 # FIXME: should be removed in autoconf 3.0.
1931 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1932 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1933 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
a9bec17c 1934 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
067d23c9
KY
1935 ;;
1936
1937 esac
1938done
1939
1940if test -n "$ac_prev"; then
1941 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
a9bec17c 1942 as_fn_error "missing argument to $ac_option"
067d23c9
KY
1943fi
1944
1945if test -n "$ac_unrecognized_opts"; then
1946 case $enable_option_checking in
1947 no) ;;
a9bec17c 1948 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
067d23c9
KY
1949 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1950 esac
1951fi
1952
1953# Check all directory arguments for consistency.
1954for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1955 datadir sysconfdir sharedstatedir localstatedir includedir \
1956 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1957 libdir localedir mandir
1958do
1959 eval ac_val=\$$ac_var
1960 # Remove trailing slashes.
1961 case $ac_val in
1962 */ )
1963 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1964 eval $ac_var=\$ac_val;;
1965 esac
1966 # Be sure to have absolute directory names.
1967 case $ac_val in
1968 [\\/$]* | ?:[\\/]* ) continue;;
1969 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1970 esac
a9bec17c 1971 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
067d23c9
KY
1972done
1973
1974# There might be people who depend on the old broken behavior: `$host'
1975# used to hold the argument of --host etc.
1976# FIXME: To remove some day.
1977build=$build_alias
1978host=$host_alias
1979target=$target_alias
1980
1981# FIXME: To remove some day.
1982if test "x$host_alias" != x; then
1983 if test "x$build_alias" = x; then
1984 cross_compiling=maybe
a9bec17c
GM
1985 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1986 If a cross compiler is detected then cross compile mode will be used." >&2
067d23c9
KY
1987 elif test "x$build_alias" != "x$host_alias"; then
1988 cross_compiling=yes
1989 fi
1990fi
1991
1992ac_tool_prefix=
1993test -n "$host_alias" && ac_tool_prefix=$host_alias-
1994
1995test "$silent" = yes && exec 6>/dev/null
1996
1997
1998ac_pwd=`pwd` && test -n "$ac_pwd" &&
1999ac_ls_di=`ls -di .` &&
2000ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
a9bec17c 2001 as_fn_error "working directory cannot be determined"
067d23c9 2002test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
a9bec17c 2003 as_fn_error "pwd does not report name of working directory"
067d23c9
KY
2004
2005
2006# Find the source files, if location was not specified.
2007if test -z "$srcdir"; then
2008 ac_srcdir_defaulted=yes
2009 # Try the directory containing this script, then the parent directory.
2010 ac_confdir=`$as_dirname -- "$as_myself" ||
2011$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
2012 X"$as_myself" : 'X\(//\)[^/]' \| \
2013 X"$as_myself" : 'X\(//\)$' \| \
2014 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
2015$as_echo X"$as_myself" |
2016 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
2017 s//\1/
2018 q
2019 }
2020 /^X\(\/\/\)[^/].*/{
2021 s//\1/
2022 q
2023 }
2024 /^X\(\/\/\)$/{
2025 s//\1/
2026 q
2027 }
2028 /^X\(\/\).*/{
2029 s//\1/
2030 q
2031 }
2032 s/.*/./; q'`
2033 srcdir=$ac_confdir
2034 if test ! -r "$srcdir/$ac_unique_file"; then
2035 srcdir=..
2036 fi
2037else
2038 ac_srcdir_defaulted=no
2039fi
2040if test ! -r "$srcdir/$ac_unique_file"; then
2041 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
a9bec17c 2042 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
067d23c9
KY
2043fi
2044ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
2045ac_abs_confdir=`(
a9bec17c 2046 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
067d23c9
KY
2047 pwd)`
2048# When building in place, set srcdir=.
2049if test "$ac_abs_confdir" = "$ac_pwd"; then
2050 srcdir=.
2051fi
2052# Remove unnecessary trailing slashes from srcdir.
2053# Double slashes in file names in object file debugging info
2054# mess up M-x gdb in Emacs.
2055case $srcdir in
2056*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
2057esac
2058for ac_var in $ac_precious_vars; do
2059 eval ac_env_${ac_var}_set=\${${ac_var}+set}
2060 eval ac_env_${ac_var}_value=\$${ac_var}
2061 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
2062 eval ac_cv_env_${ac_var}_value=\$${ac_var}
2063done
2064
2065#
2066# Report the --help message.
2067#
2068if test "$ac_init_help" = "long"; then
2069 # Omit some internal or obsolete options to make the list less imposing.
2070 # This message is too long to be a string in the A/UX 3.1 sh.
2071 cat <<_ACEOF
c574bc34 2072\`configure' configures emacs 24.3.50 to adapt to many kinds of systems.
067d23c9
KY
2073
2074Usage: $0 [OPTION]... [VAR=VALUE]...
2075
2076To assign environment variables (e.g., CC, CFLAGS...), specify them as
2077VAR=VALUE. See below for descriptions of some of the useful variables.
2078
2079Defaults for the options are specified in brackets.
2080
2081Configuration:
2082 -h, --help display this help and exit
2083 --help=short display options specific to this package
2084 --help=recursive display the short help of all the included packages
2085 -V, --version display version information and exit
a9bec17c 2086 -q, --quiet, --silent do not print \`checking...' messages
067d23c9
KY
2087 --cache-file=FILE cache test results in FILE [disabled]
2088 -C, --config-cache alias for \`--cache-file=config.cache'
2089 -n, --no-create do not create output files
2090 --srcdir=DIR find the sources in DIR [configure dir or \`..']
2091
2092Installation directories:
2093 --prefix=PREFIX install architecture-independent files in PREFIX
2094 [$ac_default_prefix]
2095 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
2096 [PREFIX]
2097
2098By default, \`make install' will install all the files in
2099\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
2100an installation prefix other than \`$ac_default_prefix' using \`--prefix',
2101for instance \`--prefix=\$HOME'.
2102
2103For better control, use the options below.
2104
2105Fine tuning of the installation directories:
2106 --bindir=DIR user executables [EPREFIX/bin]
2107 --sbindir=DIR system admin executables [EPREFIX/sbin]
2108 --libexecdir=DIR program executables [EPREFIX/libexec]
2109 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
2110 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
2111 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
2112 --libdir=DIR object code libraries [EPREFIX/lib]
2113 --includedir=DIR C header files [PREFIX/include]
2114 --oldincludedir=DIR C header files for non-gcc [/usr/include]
2115 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
2116 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
2117 --infodir=DIR info documentation [DATAROOTDIR/info]
2118 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
2119 --mandir=DIR man documentation [DATAROOTDIR/man]
2120 --docdir=DIR documentation root [DATAROOTDIR/doc/emacs]
2121 --htmldir=DIR html documentation [DOCDIR]
2122 --dvidir=DIR dvi documentation [DOCDIR]
2123 --pdfdir=DIR pdf documentation [DOCDIR]
2124 --psdir=DIR ps documentation [DOCDIR]
2125_ACEOF
2126
2127 cat <<\_ACEOF
2128
2129Program names:
2130 --program-prefix=PREFIX prepend PREFIX to installed program names
2131 --program-suffix=SUFFIX append SUFFIX to installed program names
2132 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
2133
2134X features:
2135 --x-includes=DIR X include files are in DIR
2136 --x-libraries=DIR X library files are in DIR
2137
2138System types:
2139 --build=BUILD configure for building on BUILD [guessed]
2140 --host=HOST cross-compile to build programs to run on HOST [BUILD]
2141_ACEOF
2142fi
2143
2144if test -n "$ac_init_help"; then
2145 case $ac_init_help in
c574bc34 2146 short | recursive ) echo "Configuration of emacs 24.3.50:";;
067d23c9
KY
2147 esac
2148 cat <<\_ACEOF
2149
2150Optional Features:
2151 --disable-option-checking ignore unrecognized --enable/--with options
2152 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
2153 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
2154 --disable-ns-self-contained
2155 disable self contained build under NeXTstep
067d23c9
KY
2156 --enable-locallisppath=PATH
2157 directories Emacs should search for lisp files
2158 specific to this site
2159 --enable-checking[=LIST]
2160 enable expensive run-time checks. With LIST, enable
2161 only specific categories of checks. Categories are:
2162 all,yes,no. Flags are: stringbytes, stringoverrun,
7ee3791f 2163 stringfreelist, xmallocoverrun, conslist, glyphs
afd07e01
GM
2164 --enable-check-lisp-object-type
2165 enable compile time checks for the Lisp_Object data
2166 type. This is useful for development for catching
2167 certain types of bugs.
3dc00ee8
GM
2168 --enable-profiling build emacs with low-level, gprof profiling support.
2169 Mainly useful for debugging Emacs itself. May not
2170 work on all platforms. Stops profiler.el working.
067d23c9
KY
2171 --enable-autodepend automatically generate dependencies to .h-files.
2172 Requires GNU Make and Gcc. Enabled if GNU Make and
2173 Gcc is found
4efe5ef9
GM
2174 --enable-gtk-deprecation-warnings
2175 Show Gtk+/Gdk deprecation warnings for Gtk+ >= 3.0
743c80a7
PE
2176 --disable-dependency-tracking speeds up one-time build
2177 --enable-dependency-tracking do not reject slow dependency extractors
067d23c9 2178 --disable-largefile omit support for large files
ac924f35
GM
2179 --enable-gcc-warnings turn on lots of GCC warnings/errors. This is
2180 intended for developers, and may generate false
2181 alarms when used with older or non-GNU development
2182 tools.
e4d35030
GM
2183 --enable-link-time-optimization
2184 build emacs with link-time optimization. This is
2185 supported only for GCC since 4.5.0.
067d23c9
KY
2186
2187Optional Packages:
2188 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
2189 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
ee77919d
GM
2190 --without-all omit almost all features and build small executable
2191 with minimal dependencies
067d23c9
KY
2192 --without-pop don't support POP mail retrieval with movemail
2193 --with-kerberos support Kerberos-authenticated POP
2194 --with-kerberos5 support Kerberos version 5 authenticated POP
2195 --with-hesiod support Hesiod to get the POP server host
2196 --with-mmdf support MMDF mailboxes
2197 --with-mail-unlink unlink, rather than empty, mail spool after reading
2198 --with-mailhost=HOSTNAME
2199 string giving default POP mail host
2200 --without-sound don't compile with sound support
4fa92495
GM
2201 --with-x-toolkit=KIT use an X toolkit (KIT one of: yes or gtk, gtk2,
2202 gtk3, lucid or athena, motif, no)
0442dc7f 2203 --with-wide-int prefer wide Emacs integers (typically 62-bit)
067d23c9
KY
2204 --without-xpm don't compile with XPM image support
2205 --without-jpeg don't compile with JPEG image support
2206 --without-tiff don't compile with TIFF image support
2207 --without-gif don't compile with GIF image support
2208 --without-png don't compile with PNG image support
2209 --without-rsvg don't compile with SVG image support
2210 --without-xml2 don't compile with XML parsing support
2211 --without-imagemagick don't compile with ImageMagick image support
2212 --without-xft don't use XFT for anti aliased fonts
2213 --without-libotf don't use libotf for OpenType font support
2214 --without-m17n-flt don't use m17n-flt for text shaping
2215 --without-toolkit-scroll-bars
2216 don't use Motif or Xaw3d scroll bars
2217 --without-xaw3d don't use Xaw3d
2218 --without-xim don't use X11 XIM
7834125e 2219 --with-ns use NeXTstep (Cocoa or GNUstep) windowing system
bf05ed1f 2220 --with-w32 use native MS Windows GUI
067d23c9
KY
2221 --without-gpm don't use -lgpm for mouse support on a GNU/Linux
2222 console
2223 --without-dbus don't compile with D-Bus support
2224 --without-gconf don't compile with GConf support
f527bd02 2225 --without-gsettings don't compile with GSettings support
067d23c9 2226 --without-selinux don't compile with SELinux support
4cc63c81 2227 --without-acl don't compile with ACL support
067d23c9 2228 --without-gnutls don't use -lgnutls for SSL/TLS support
b5eb356a 2229 --without-inotify don't compile with inotify (file-watch) support
067d23c9
KY
2230 --without-makeinfo don't require makeinfo for building manuals
2231 --without-compress-info don't compress the installed Info pages
b5591ebb
GM
2232 --with-pkg-config-prog=FILENAME
2233 file name of pkg-config for finding GTK and librsvg
4fc5868a 2234 --with-gameuser=USER user for shared game score files
b5591ebb
GM
2235 --with-gnustep-conf=FILENAME
2236 name of GNUstep.conf; default $GNUSTEP_CONFIG_FILE,
067d23c9
KY
2237 or /etc/GNUstep/GNUstep.conf
2238 --with-x use the X Window System
2239
2240Some influential environment variables:
2241 CC C compiler command
2242 CFLAGS C compiler flags
2243 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
2244 nonstandard directory <lib dir>
2245 LIBS libraries to pass to the linker, e.g. -l<library>
2246 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2247 you have headers in a nonstandard directory <include dir>
2248 CPP C preprocessor
2249 XMKMF Path to xmkmf, Makefile generator for X Window System
2250
2251Use these variables to override the choices made by `configure' or to help
2252it to find libraries and programs with nonstandard names/locations.
2253
2254Report bugs to the package provider.
2255_ACEOF
2256ac_status=$?
2257fi
2258
2259if test "$ac_init_help" = "recursive"; then
2260 # If there are subdirs, report their specific --help.
2261 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2262 test -d "$ac_dir" ||
2263 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2264 continue
2265 ac_builddir=.
2266
2267case "$ac_dir" in
2268.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2269*)
2270 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2271 # A ".." for each directory in $ac_dir_suffix.
2272 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2273 case $ac_top_builddir_sub in
2274 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2275 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2276 esac ;;
2277esac
2278ac_abs_top_builddir=$ac_pwd
2279ac_abs_builddir=$ac_pwd$ac_dir_suffix
2280# for backward compatibility:
2281ac_top_builddir=$ac_top_build_prefix
2282
2283case $srcdir in
2284 .) # We are building in place.
2285 ac_srcdir=.
2286 ac_top_srcdir=$ac_top_builddir_sub
2287 ac_abs_top_srcdir=$ac_pwd ;;
2288 [\\/]* | ?:[\\/]* ) # Absolute name.
2289 ac_srcdir=$srcdir$ac_dir_suffix;
2290 ac_top_srcdir=$srcdir
2291 ac_abs_top_srcdir=$srcdir ;;
2292 *) # Relative name.
2293 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2294 ac_top_srcdir=$ac_top_build_prefix$srcdir
2295 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2296esac
2297ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2298
2299 cd "$ac_dir" || { ac_status=$?; continue; }
2300 # Check for guested configure.
2301 if test -f "$ac_srcdir/configure.gnu"; then
2302 echo &&
2303 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2304 elif test -f "$ac_srcdir/configure"; then
2305 echo &&
2306 $SHELL "$ac_srcdir/configure" --help=recursive
2307 else
2308 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2309 fi || ac_status=$?
2310 cd "$ac_pwd" || { ac_status=$?; break; }
2311 done
2312fi
2313
2314test -n "$ac_init_help" && exit $ac_status
2315if $ac_init_version; then
2316 cat <<\_ACEOF
c574bc34 2317emacs configure 24.3.50
a9bec17c 2318generated by GNU Autoconf 2.65
067d23c9 2319
a9bec17c 2320Copyright (C) 2009 Free Software Foundation, Inc.
067d23c9
KY
2321This configure script is free software; the Free Software Foundation
2322gives unlimited permission to copy, distribute and modify it.
2323_ACEOF
2324 exit
2325fi
2326
2327## ------------------------ ##
2328## Autoconf initialization. ##
2329## ------------------------ ##
2330
2331# ac_fn_c_try_compile LINENO
2332# --------------------------
2333# Try to compile conftest.$ac_ext, and return whether this succeeded.
2334ac_fn_c_try_compile ()
2335{
2336 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2337 rm -f conftest.$ac_objext
2338 if { { ac_try="$ac_compile"
2339case "(($ac_try" in
2340 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2341 *) ac_try_echo=$ac_try;;
2342esac
2343eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2344$as_echo "$ac_try_echo"; } >&5
2345 (eval "$ac_compile") 2>conftest.err
2346 ac_status=$?
2347 if test -s conftest.err; then
2348 grep -v '^ *+' conftest.err >conftest.er1
2349 cat conftest.er1 >&5
2350 mv -f conftest.er1 conftest.err
2351 fi
2352 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2353 test $ac_status = 0; } && {
2354 test -z "$ac_c_werror_flag" ||
2355 test ! -s conftest.err
2356 } && test -s conftest.$ac_objext; then :
2357 ac_retval=0
2358else
2359 $as_echo "$as_me: failed program was:" >&5
2360sed 's/^/| /' conftest.$ac_ext >&5
2361
2362 ac_retval=1
2363fi
a9bec17c 2364 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
067d23c9
KY
2365 as_fn_set_status $ac_retval
2366
2367} # ac_fn_c_try_compile
2368
067d23c9
KY
2369# ac_fn_c_try_cpp LINENO
2370# ----------------------
2371# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2372ac_fn_c_try_cpp ()
2373{
2374 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2375 if { { ac_try="$ac_cpp conftest.$ac_ext"
2376case "(($ac_try" in
2377 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2378 *) ac_try_echo=$ac_try;;
2379esac
2380eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2381$as_echo "$ac_try_echo"; } >&5
2382 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2383 ac_status=$?
2384 if test -s conftest.err; then
2385 grep -v '^ *+' conftest.err >conftest.er1
2386 cat conftest.er1 >&5
2387 mv -f conftest.er1 conftest.err
2388 fi
2389 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
a9bec17c 2390 test $ac_status = 0; } >/dev/null && {
067d23c9
KY
2391 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2392 test ! -s conftest.err
2393 }; then :
2394 ac_retval=0
2395else
2396 $as_echo "$as_me: failed program was:" >&5
2397sed 's/^/| /' conftest.$ac_ext >&5
2398
2399 ac_retval=1
2400fi
a9bec17c 2401 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
067d23c9
KY
2402 as_fn_set_status $ac_retval
2403
2404} # ac_fn_c_try_cpp
2405
2406# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
2407# -------------------------------------------------------
2408# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2409# the include files in INCLUDES and setting the cache variable VAR
2410# accordingly.
2411ac_fn_c_check_header_mongrel ()
2412{
2413 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
a9bec17c 2414 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
067d23c9
KY
2415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2416$as_echo_n "checking for $2... " >&6; }
a9bec17c 2417if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
067d23c9
KY
2418 $as_echo_n "(cached) " >&6
2419fi
2420eval ac_res=\$$3
2421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2422$as_echo "$ac_res" >&6; }
2423else
2424 # Is the header compilable?
2425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2426$as_echo_n "checking $2 usability... " >&6; }
2427cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2428/* end confdefs.h. */
2429$4
2430#include <$2>
2431_ACEOF
2432if ac_fn_c_try_compile "$LINENO"; then :
2433 ac_header_compiler=yes
2434else
2435 ac_header_compiler=no
2436fi
2437rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2438{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2439$as_echo "$ac_header_compiler" >&6; }
2440
2441# Is the header present?
2442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2443$as_echo_n "checking $2 presence... " >&6; }
2444cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2445/* end confdefs.h. */
2446#include <$2>
2447_ACEOF
2448if ac_fn_c_try_cpp "$LINENO"; then :
2449 ac_header_preproc=yes
2450else
2451 ac_header_preproc=no
2452fi
a9bec17c 2453rm -f conftest.err conftest.$ac_ext
067d23c9
KY
2454{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2455$as_echo "$ac_header_preproc" >&6; }
2456
2457# So? What about this header?
2458case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
2459 yes:no: )
2460 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2461$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2462 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2463$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2464 ;;
2465 no:yes:* )
2466 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2467$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2468 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
2469$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
2470 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2471$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2472 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
2473$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
2474 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2475$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2476 ;;
2477esac
2478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2479$as_echo_n "checking for $2... " >&6; }
a9bec17c 2480if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
067d23c9
KY
2481 $as_echo_n "(cached) " >&6
2482else
2483 eval "$3=\$ac_header_compiler"
2484fi
2485eval ac_res=\$$3
2486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2487$as_echo "$ac_res" >&6; }
2488fi
a9bec17c 2489 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
067d23c9
KY
2490
2491} # ac_fn_c_check_header_mongrel
2492
2493# ac_fn_c_try_run LINENO
2494# ----------------------
2495# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2496# that executables *can* be run.
2497ac_fn_c_try_run ()
2498{
2499 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2500 if { { ac_try="$ac_link"
2501case "(($ac_try" in
2502 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2503 *) ac_try_echo=$ac_try;;
2504esac
2505eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2506$as_echo "$ac_try_echo"; } >&5
2507 (eval "$ac_link") 2>&5
2508 ac_status=$?
2509 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2510 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2511 { { case "(($ac_try" in
2512 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2513 *) ac_try_echo=$ac_try;;
2514esac
2515eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2516$as_echo "$ac_try_echo"; } >&5
2517 (eval "$ac_try") 2>&5
2518 ac_status=$?
2519 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2520 test $ac_status = 0; }; }; then :
2521 ac_retval=0
2522else
2523 $as_echo "$as_me: program exited with status $ac_status" >&5
2524 $as_echo "$as_me: failed program was:" >&5
2525sed 's/^/| /' conftest.$ac_ext >&5
2526
2527 ac_retval=$ac_status
2528fi
2529 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
a9bec17c 2530 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
067d23c9
KY
2531 as_fn_set_status $ac_retval
2532
2533} # ac_fn_c_try_run
2534
2535# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2536# -------------------------------------------------------
2537# Tests whether HEADER exists and can be compiled using the include files in
2538# INCLUDES, setting the cache variable VAR accordingly.
2539ac_fn_c_check_header_compile ()
2540{
2541 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2542 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2543$as_echo_n "checking for $2... " >&6; }
a9bec17c 2544if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
067d23c9
KY
2545 $as_echo_n "(cached) " >&6
2546else
2547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2548/* end confdefs.h. */
2549$4
2550#include <$2>
2551_ACEOF
2552if ac_fn_c_try_compile "$LINENO"; then :
2553 eval "$3=yes"
2554else
2555 eval "$3=no"
2556fi
2557rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2558fi
2559eval ac_res=\$$3
2560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2561$as_echo "$ac_res" >&6; }
a9bec17c 2562 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
067d23c9
KY
2563
2564} # ac_fn_c_check_header_compile
2565
1fd182f0
PE
2566# ac_fn_c_try_link LINENO
2567# -----------------------
2568# Try to link conftest.$ac_ext, and return whether this succeeded.
2569ac_fn_c_try_link ()
2570{
2571 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2572 rm -f conftest.$ac_objext conftest$ac_exeext
2573 if { { ac_try="$ac_link"
2574case "(($ac_try" in
2575 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2576 *) ac_try_echo=$ac_try;;
2577esac
2578eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2579$as_echo "$ac_try_echo"; } >&5
2580 (eval "$ac_link") 2>conftest.err
2581 ac_status=$?
2582 if test -s conftest.err; then
2583 grep -v '^ *+' conftest.err >conftest.er1
2584 cat conftest.er1 >&5
2585 mv -f conftest.er1 conftest.err
2586 fi
2587 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2588 test $ac_status = 0; } && {
2589 test -z "$ac_c_werror_flag" ||
2590 test ! -s conftest.err
2591 } && test -s conftest$ac_exeext && {
2592 test "$cross_compiling" = yes ||
2593 $as_test_x conftest$ac_exeext
2594 }; then :
2595 ac_retval=0
2596else
2597 $as_echo "$as_me: failed program was:" >&5
2598sed 's/^/| /' conftest.$ac_ext >&5
2599
2600 ac_retval=1
2601fi
2602 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2603 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2604 # interfere with the next link command; also delete a directory that is
2605 # left behind by Apple's compiler. We do this before executing the actions.
2606 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
a9bec17c 2607 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1fd182f0
PE
2608 as_fn_set_status $ac_retval
2609
2610} # ac_fn_c_try_link
2611
42bbbe8b
GM
2612# ac_fn_c_check_decl LINENO SYMBOL VAR
2613# ------------------------------------
2614# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2615ac_fn_c_check_decl ()
2616{
2617 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5
2619$as_echo_n "checking whether $2 is declared... " >&6; }
2620if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2621 $as_echo_n "(cached) " >&6
2622else
2623 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2624/* end confdefs.h. */
2625$4
2626int
2627main ()
2628{
2629#ifndef $2
2630 (void) $2;
2631#endif
2632
2633 ;
2634 return 0;
2635}
2636_ACEOF
2637if ac_fn_c_try_compile "$LINENO"; then :
2638 eval "$3=yes"
2639else
2640 eval "$3=no"
2641fi
2642rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2643fi
2644eval ac_res=\$$3
2645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2646$as_echo "$ac_res" >&6; }
2647 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2648
2649} # ac_fn_c_check_decl
2650
5476a9a4
GM
2651# ac_fn_c_check_header_preproc LINENO HEADER VAR
2652# ----------------------------------------------
2653# Tests whether HEADER is present, setting the cache variable VAR accordingly.
2654ac_fn_c_check_header_preproc ()
067d23c9
KY
2655{
2656 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2658$as_echo_n "checking for $2... " >&6; }
a9bec17c 2659if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
067d23c9
KY
2660 $as_echo_n "(cached) " >&6
2661else
2662 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2663/* end confdefs.h. */
5476a9a4
GM
2664#include <$2>
2665_ACEOF
2666if ac_fn_c_try_cpp "$LINENO"; then :
2667 eval "$3=yes"
2668else
2669 eval "$3=no"
2670fi
2671rm -f conftest.err conftest.$ac_ext
2672fi
2673eval ac_res=\$$3
2674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2675$as_echo "$ac_res" >&6; }
2676 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
067d23c9 2677
5476a9a4 2678} # ac_fn_c_check_header_preproc
067d23c9 2679
5476a9a4
GM
2680# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2681# ----------------------------------------------------
2682# Tries to find if the field MEMBER exists in type AGGR, after including
2683# INCLUDES, setting cache variable VAR accordingly.
2684ac_fn_c_check_member ()
2685{
2686 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2688$as_echo_n "checking for $2.$3... " >&6; }
2689if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2690 $as_echo_n "(cached) " >&6
2691else
2692 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2693/* end confdefs.h. */
2694$5
2695int
2696main ()
2697{
2698static $2 ac_aggr;
2699if (ac_aggr.$3)
2700return 0;
2701 ;
2702 return 0;
2703}
2704_ACEOF
2705if ac_fn_c_try_compile "$LINENO"; then :
2706 eval "$4=yes"
2707else
2708 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2709/* end confdefs.h. */
2710$5
2711int
2712main ()
2713{
2714static $2 ac_aggr;
2715if (sizeof 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 eval "$4=no"
2725fi
2726rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2727fi
2728rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2729fi
2730eval ac_res=\$$4
2731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2732$as_echo "$ac_res" >&6; }
2733 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2734
2735} # ac_fn_c_check_member
2736
2737# ac_fn_c_check_func LINENO FUNC VAR
2738# ----------------------------------
2739# Tests whether FUNC exists, setting the cache variable VAR accordingly
2740ac_fn_c_check_func ()
2741{
2742 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2744$as_echo_n "checking for $2... " >&6; }
2745if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2746 $as_echo_n "(cached) " >&6
2747else
2748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2749/* end confdefs.h. */
2750/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2751 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2752#define $2 innocuous_$2
2753
2754/* System header to define __stub macros and hopefully few prototypes,
2755 which can conflict with char $2 (); below.
2756 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2757 <limits.h> exists even on freestanding compilers. */
2758
2759#ifdef __STDC__
067d23c9
KY
2760# include <limits.h>
2761#else
2762# include <assert.h>
2763#endif
2764
2765#undef $2
2766
2767/* Override any GCC internal prototype to avoid an error.
2768 Use char because int might match the return type of a GCC
2769 builtin and then its argument prototype would still apply. */
2770#ifdef __cplusplus
2771extern "C"
2772#endif
2773char $2 ();
2774/* The GNU C library defines this for functions which it implements
2775 to always fail with ENOSYS. Some functions are actually named
2776 something starting with __ and the normal name is an alias. */
2777#if defined __stub_$2 || defined __stub___$2
2778choke me
2779#endif
2780
2781int
2782main ()
2783{
2784return $2 ();
2785 ;
2786 return 0;
2787}
2788_ACEOF
2789if ac_fn_c_try_link "$LINENO"; then :
2790 eval "$3=yes"
2791else
2792 eval "$3=no"
2793fi
2794rm -f core conftest.err conftest.$ac_objext \
2795 conftest$ac_exeext conftest.$ac_ext
2796fi
2797eval ac_res=\$$3
2798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2799$as_echo "$ac_res" >&6; }
a9bec17c 2800 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
067d23c9
KY
2801
2802} # ac_fn_c_check_func
2803
5476a9a4
GM
2804# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2805# -------------------------------------------
2806# Tests whether TYPE exists after having included INCLUDES, setting cache
2807# variable VAR accordingly.
2808ac_fn_c_check_type ()
3e0be4ab
GM
2809{
2810 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
5476a9a4
GM
2811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2812$as_echo_n "checking for $2... " >&6; }
2813if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
3e0be4ab
GM
2814 $as_echo_n "(cached) " >&6
2815else
5476a9a4 2816 eval "$3=no"
3e0be4ab
GM
2817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2818/* end confdefs.h. */
5476a9a4 2819$4
3e0be4ab
GM
2820int
2821main ()
2822{
5476a9a4
GM
2823if (sizeof ($2))
2824 return 0;
3e0be4ab
GM
2825 ;
2826 return 0;
2827}
2828_ACEOF
2829if ac_fn_c_try_compile "$LINENO"; then :
2830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2831/* end confdefs.h. */
5476a9a4 2832$4
3e0be4ab
GM
2833int
2834main ()
2835{
5476a9a4
GM
2836if (sizeof (($2)))
2837 return 0;
3e0be4ab
GM
2838 ;
2839 return 0;
2840}
2841_ACEOF
2842if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4 2843
3e0be4ab 2844else
5476a9a4 2845 eval "$3=yes"
3e0be4ab
GM
2846fi
2847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2848fi
2849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2850fi
5476a9a4 2851eval ac_res=\$$3
3e0be4ab
GM
2852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2853$as_echo "$ac_res" >&6; }
a9bec17c 2854 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
3e0be4ab 2855
5476a9a4 2856} # ac_fn_c_check_type
3e0be4ab 2857
5f90be1b
PE
2858# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2859# --------------------------------------------
2860# Tries to find the compile-time value of EXPR in a program that includes
2861# INCLUDES, setting VAR accordingly. Returns whether the value could be
2862# computed
2863ac_fn_c_compute_int ()
2864{
2865 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2866 if test "$cross_compiling" = yes; then
2867 # Depending upon the size, compute the lo and hi bounds.
2868cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2869/* end confdefs.h. */
2870$4
2871int
2872main ()
2873{
2874static int test_array [1 - 2 * !(($2) >= 0)];
2875test_array [0] = 0
2876
2877 ;
2878 return 0;
2879}
2880_ACEOF
2881if ac_fn_c_try_compile "$LINENO"; then :
2882 ac_lo=0 ac_mid=0
2883 while :; do
2884 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2885/* end confdefs.h. */
2886$4
2887int
2888main ()
2889{
2890static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2891test_array [0] = 0
2892
2893 ;
2894 return 0;
2895}
2896_ACEOF
2897if ac_fn_c_try_compile "$LINENO"; then :
2898 ac_hi=$ac_mid; break
2899else
2900 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2901 if test $ac_lo -le $ac_mid; then
2902 ac_lo= ac_hi=
2903 break
2904 fi
2905 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2906fi
2907rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2908 done
2909else
2910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2911/* end confdefs.h. */
2912$4
2913int
2914main ()
2915{
2916static int test_array [1 - 2 * !(($2) < 0)];
2917test_array [0] = 0
2918
2919 ;
2920 return 0;
2921}
2922_ACEOF
2923if ac_fn_c_try_compile "$LINENO"; then :
2924 ac_hi=-1 ac_mid=-1
2925 while :; do
2926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2927/* end confdefs.h. */
2928$4
2929int
2930main ()
2931{
2932static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2933test_array [0] = 0
2934
2935 ;
2936 return 0;
2937}
2938_ACEOF
2939if ac_fn_c_try_compile "$LINENO"; then :
2940 ac_lo=$ac_mid; break
2941else
2942 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2943 if test $ac_mid -le $ac_hi; then
2944 ac_lo= ac_hi=
2945 break
2946 fi
2947 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2948fi
2949rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2950 done
2951else
2952 ac_lo= ac_hi=
2953fi
2954rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2955fi
2956rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2957# Binary search between lo and hi bounds.
2958while test "x$ac_lo" != "x$ac_hi"; do
2959 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2961/* end confdefs.h. */
2962$4
2963int
2964main ()
2965{
2966static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2967test_array [0] = 0
2968
2969 ;
2970 return 0;
2971}
2972_ACEOF
2973if ac_fn_c_try_compile "$LINENO"; then :
2974 ac_hi=$ac_mid
2975else
2976 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2977fi
2978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2979done
2980case $ac_lo in #((
2981?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2982'') ac_retval=1 ;;
2983esac
2984 else
2985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2986/* end confdefs.h. */
2987$4
2988static long int longval () { return $2; }
2989static unsigned long int ulongval () { return $2; }
2990#include <stdio.h>
2991#include <stdlib.h>
2992int
2993main ()
2994{
2995
2996 FILE *f = fopen ("conftest.val", "w");
2997 if (! f)
2998 return 1;
2999 if (($2) < 0)
3000 {
3001 long int i = longval ();
3002 if (i != ($2))
3003 return 1;
3004 fprintf (f, "%ld", i);
3005 }
3006 else
3007 {
3008 unsigned long int i = ulongval ();
3009 if (i != ($2))
3010 return 1;
3011 fprintf (f, "%lu", i);
3012 }
3013 /* Do not output a trailing newline, as this causes \r\n confusion
3014 on some platforms. */
3015 return ferror (f) || fclose (f) != 0;
3016
3017 ;
3018 return 0;
3019}
3020_ACEOF
3021if ac_fn_c_try_run "$LINENO"; then :
3022 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
3023else
3024 ac_retval=1
3025fi
3026rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3027 conftest.$ac_objext conftest.beam conftest.$ac_ext
3028rm -f conftest.val
3029
3030 fi
a9bec17c 3031 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
5f90be1b
PE
3032 as_fn_set_status $ac_retval
3033
3034} # ac_fn_c_compute_int
067d23c9
KY
3035cat >config.log <<_ACEOF
3036This file contains any messages produced by compilers while
3037running configure, to aid debugging if configure makes a mistake.
3038
c574bc34 3039It was created by emacs $as_me 24.3.50, which was
a9bec17c 3040generated by GNU Autoconf 2.65. Invocation command line was
067d23c9
KY
3041
3042 $ $0 $@
3043
3044_ACEOF
3045exec 5>>config.log
3046{
3047cat <<_ASUNAME
3048## --------- ##
3049## Platform. ##
3050## --------- ##
3051
3052hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3053uname -m = `(uname -m) 2>/dev/null || echo unknown`
3054uname -r = `(uname -r) 2>/dev/null || echo unknown`
3055uname -s = `(uname -s) 2>/dev/null || echo unknown`
3056uname -v = `(uname -v) 2>/dev/null || echo unknown`
3057
3058/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3059/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
3060
3061/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
3062/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
3063/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3064/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
3065/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
3066/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
3067/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
3068
3069_ASUNAME
3070
3071as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3072for as_dir in $PATH
3073do
3074 IFS=$as_save_IFS
3075 test -z "$as_dir" && as_dir=.
3076 $as_echo "PATH: $as_dir"
3077 done
3078IFS=$as_save_IFS
3079
3080} >&5
3081
3082cat >&5 <<_ACEOF
3083
3084
3085## ----------- ##
3086## Core tests. ##
3087## ----------- ##
3088
3089_ACEOF
3090
3091
3092# Keep a trace of the command line.
3093# Strip out --no-create and --no-recursion so they do not pile up.
3094# Strip out --silent because we don't want to record it for future runs.
3095# Also quote any args containing shell meta-characters.
3096# Make two passes to allow for proper duplicate-argument suppression.
3097ac_configure_args=
3098ac_configure_args0=
3099ac_configure_args1=
3100ac_must_keep_next=false
3101for ac_pass in 1 2
3102do
3103 for ac_arg
3104 do
3105 case $ac_arg in
3106 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3107 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3108 | -silent | --silent | --silen | --sile | --sil)
3109 continue ;;
3110 *\'*)
3111 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3112 esac
3113 case $ac_pass in
3114 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3115 2)
3116 as_fn_append ac_configure_args1 " '$ac_arg'"
3117 if test $ac_must_keep_next = true; then
3118 ac_must_keep_next=false # Got value, back to normal.
3119 else
3120 case $ac_arg in
3121 *=* | --config-cache | -C | -disable-* | --disable-* \
3122 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3123 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3124 | -with-* | --with-* | -without-* | --without-* | --x)
3125 case "$ac_configure_args0 " in
3126 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3127 esac
3128 ;;
3129 -* ) ac_must_keep_next=true ;;
3130 esac
3131 fi
3132 as_fn_append ac_configure_args " '$ac_arg'"
3133 ;;
3134 esac
3135 done
3136done
3137{ ac_configure_args0=; unset ac_configure_args0;}
3138{ ac_configure_args1=; unset ac_configure_args1;}
3139
3140# When interrupted or exit'd, cleanup temporary files, and complete
3141# config.log. We remove comments because anyway the quotes in there
3142# would cause problems or look ugly.
3143# WARNING: Use '\'' to represent an apostrophe within the trap.
3144# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3145trap 'exit_status=$?
3146 # Save into config.log some information that might help in debugging.
3147 {
3148 echo
3149
a9bec17c
GM
3150 cat <<\_ASBOX
3151## ---------------- ##
067d23c9 3152## Cache variables. ##
a9bec17c
GM
3153## ---------------- ##
3154_ASBOX
067d23c9
KY
3155 echo
3156 # The following way of writing the cache mishandles newlines in values,
3157(
3158 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3159 eval ac_val=\$$ac_var
3160 case $ac_val in #(
3161 *${as_nl}*)
3162 case $ac_var in #(
3163 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3164$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3165 esac
3166 case $ac_var in #(
3167 _ | IFS | as_nl) ;; #(
3168 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3169 *) { eval $ac_var=; unset $ac_var;} ;;
3170 esac ;;
3171 esac
3172 done
3173 (set) 2>&1 |
3174 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3175 *${as_nl}ac_space=\ *)
3176 sed -n \
3177 "s/'\''/'\''\\\\'\'''\''/g;
3178 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3179 ;; #(
3180 *)
3181 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3182 ;;
3183 esac |
3184 sort
3185)
3186 echo
3187
a9bec17c
GM
3188 cat <<\_ASBOX
3189## ----------------- ##
067d23c9 3190## Output variables. ##
a9bec17c
GM
3191## ----------------- ##
3192_ASBOX
067d23c9
KY
3193 echo
3194 for ac_var in $ac_subst_vars
3195 do
3196 eval ac_val=\$$ac_var
3197 case $ac_val in
3198 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3199 esac
3200 $as_echo "$ac_var='\''$ac_val'\''"
3201 done | sort
3202 echo
3203
3204 if test -n "$ac_subst_files"; then
a9bec17c
GM
3205 cat <<\_ASBOX
3206## ------------------- ##
067d23c9 3207## File substitutions. ##
a9bec17c
GM
3208## ------------------- ##
3209_ASBOX
067d23c9
KY
3210 echo
3211 for ac_var in $ac_subst_files
3212 do
3213 eval ac_val=\$$ac_var
3214 case $ac_val in
3215 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3216 esac
3217 $as_echo "$ac_var='\''$ac_val'\''"
3218 done | sort
3219 echo
3220 fi
3221
3222 if test -s confdefs.h; then
a9bec17c
GM
3223 cat <<\_ASBOX
3224## ----------- ##
067d23c9 3225## confdefs.h. ##
a9bec17c
GM
3226## ----------- ##
3227_ASBOX
067d23c9
KY
3228 echo
3229 cat confdefs.h
3230 echo
3231 fi
3232 test "$ac_signal" != 0 &&
3233 $as_echo "$as_me: caught signal $ac_signal"
3234 $as_echo "$as_me: exit $exit_status"
3235 } >&5
3236 rm -f core *.core core.conftest.* &&
3237 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3238 exit $exit_status
3239' 0
3240for ac_signal in 1 2 13 15; do
3241 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3242done
3243ac_signal=0
3244
3245# confdefs.h avoids OS command line length limits that DEFS can exceed.
3246rm -f -r conftest* confdefs.h
3247
3248$as_echo "/* confdefs.h */" > confdefs.h
3249
3250# Predefined preprocessor variables.
3251
3252cat >>confdefs.h <<_ACEOF
3253#define PACKAGE_NAME "$PACKAGE_NAME"
3254_ACEOF
3255
3256cat >>confdefs.h <<_ACEOF
3257#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3258_ACEOF
3259
3260cat >>confdefs.h <<_ACEOF
3261#define PACKAGE_VERSION "$PACKAGE_VERSION"
3262_ACEOF
3263
3264cat >>confdefs.h <<_ACEOF
3265#define PACKAGE_STRING "$PACKAGE_STRING"
3266_ACEOF
3267
3268cat >>confdefs.h <<_ACEOF
3269#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3270_ACEOF
3271
3272cat >>confdefs.h <<_ACEOF
3273#define PACKAGE_URL "$PACKAGE_URL"
3274_ACEOF
3275
3276
3277# Let the site file select an alternate cache file if it wants to.
3278# Prefer an explicitly selected file to automatically selected ones.
3279ac_site_file1=NONE
3280ac_site_file2=NONE
3281if test -n "$CONFIG_SITE"; then
a9bec17c 3282 ac_site_file1=$CONFIG_SITE
067d23c9
KY
3283elif test "x$prefix" != xNONE; then
3284 ac_site_file1=$prefix/share/config.site
3285 ac_site_file2=$prefix/etc/config.site
3286else
3287 ac_site_file1=$ac_default_prefix/share/config.site
3288 ac_site_file2=$ac_default_prefix/etc/config.site
3289fi
3290for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3291do
3292 test "x$ac_site_file" = xNONE && continue
3293 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3294 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3295$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3296 sed 's/^/| /' "$ac_site_file" >&5
a9bec17c 3297 . "$ac_site_file"
067d23c9
KY
3298 fi
3299done
3300
3301if test -r "$cache_file"; then
3302 # Some versions of bash will fail to source /dev/null (special files
3303 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
3304 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3305 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3306$as_echo "$as_me: loading cache $cache_file" >&6;}
3307 case $cache_file in
3308 [\\/]* | ?:[\\/]* ) . "$cache_file";;
3309 *) . "./$cache_file";;
3310 esac
3311 fi
3312else
3313 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3314$as_echo "$as_me: creating cache $cache_file" >&6;}
3315 >$cache_file
3316fi
3317
5476a9a4
GM
3318as_fn_append ac_header_list " linux/version.h"
3319as_fn_append ac_header_list " sys/systeminfo.h"
5476a9a4
GM
3320as_fn_append ac_header_list " coff.h"
3321as_fn_append ac_header_list " pty.h"
5476a9a4
GM
3322as_fn_append ac_header_list " sys/resource.h"
3323as_fn_append ac_header_list " sys/utsname.h"
3324as_fn_append ac_header_list " pwd.h"
3325as_fn_append ac_header_list " utmp.h"
5476a9a4
GM
3326as_fn_append ac_header_list " util.h"
3327as_fn_append ac_header_list " sys/socket.h"
3328as_fn_append ac_header_list " stdlib.h"
3329as_fn_append ac_header_list " unistd.h"
7e723570 3330as_fn_append ac_header_list " sys/param.h"
5476a9a4
GM
3331as_fn_append ac_header_list " pthread.h"
3332as_fn_append ac_header_list " malloc/malloc.h"
3333as_fn_append ac_header_list " maillock.h"
3334as_fn_append ac_header_list " sys/un.h"
3335as_fn_append ac_func_list " tzset"
3336as_fn_append ac_func_list " readlinkat"
d7ad186c 3337as_fn_append ac_header_list " dirent.h"
8966cbff 3338as_fn_append ac_header_list " execinfo.h"
710f5812 3339as_fn_append ac_func_list " faccessat"
d7ad186c 3340as_fn_append ac_func_list " fdopendir"
eda33f78 3341as_fn_append ac_header_list " stdio_ext.h"
3bf26e96 3342as_fn_append ac_func_list " __fpending"
d7ad186c 3343as_fn_append ac_func_list " fstatat"
2407788f 3344as_fn_append ac_func_list " fsync"
f199cab1
GM
3345gl_getopt_required=GNU
3346as_fn_append ac_header_list " getopt.h"
3347as_fn_append ac_func_list " gettimeofday"
3348as_fn_append ac_func_list " nanotime"
e700232f 3349as_fn_append ac_header_list " sys/time.h"
f199cab1
GM
3350as_fn_append ac_header_list " wchar.h"
3351as_fn_append ac_header_list " stdint.h"
3352as_fn_append ac_header_list " inttypes.h"
3353as_fn_append ac_func_list " lstat"
f199cab1
GM
3354as_fn_append ac_header_list " sys/select.h"
3355as_fn_append ac_func_list " pselect"
3356as_fn_append ac_func_list " pthread_sigmask"
3357as_fn_append ac_func_list " readlink"
f199cab1
GM
3358as_fn_append ac_func_list " strtoimax"
3359as_fn_append ac_func_list " strtoumax"
3360as_fn_append ac_func_list " symlink"
3361as_fn_append ac_header_list " sys/stat.h"
3362as_fn_append ac_func_list " localtime_r"
e700232f 3363as_fn_append ac_header_list " utime.h"
f199cab1
GM
3364as_fn_append ac_func_list " futimes"
3365as_fn_append ac_func_list " futimesat"
3366as_fn_append ac_func_list " futimens"
3367as_fn_append ac_func_list " utimensat"
3368as_fn_append ac_func_list " lutimes"
067d23c9
KY
3369# Check that the precious variables saved in the cache have kept the same
3370# value.
3371ac_cache_corrupted=false
3372for ac_var in $ac_precious_vars; do
3373 eval ac_old_set=\$ac_cv_env_${ac_var}_set
3374 eval ac_new_set=\$ac_env_${ac_var}_set
3375 eval ac_old_val=\$ac_cv_env_${ac_var}_value
3376 eval ac_new_val=\$ac_env_${ac_var}_value
3377 case $ac_old_set,$ac_new_set in
3378 set,)
3379 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3380$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3381 ac_cache_corrupted=: ;;
3382 ,set)
3383 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3384$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3385 ac_cache_corrupted=: ;;
3386 ,);;
3387 *)
3388 if test "x$ac_old_val" != "x$ac_new_val"; then
3389 # differences in whitespace do not lead to failure.
3390 ac_old_val_w=`echo x $ac_old_val`
3391 ac_new_val_w=`echo x $ac_new_val`
3392 if test "$ac_old_val_w" != "$ac_new_val_w"; then
3393 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3394$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3395 ac_cache_corrupted=:
3396 else
3397 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3398$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3399 eval $ac_var=\$ac_old_val
3400 fi
3401 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
3402$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
3403 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
3404$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
3405 fi;;
3406 esac
3407 # Pass precious variables to config.status.
3408 if test "$ac_new_set" = set; then
3409 case $ac_new_val in
3410 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3411 *) ac_arg=$ac_var=$ac_new_val ;;
3412 esac
3413 case " $ac_configure_args " in
3414 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
3415 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3416 esac
3417 fi
3418done
3419if $ac_cache_corrupted; then
3420 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3421$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3422 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3423$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
a9bec17c 3424 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
067d23c9
KY
3425fi
3426## -------------------- ##
3427## Main body of script. ##
3428## -------------------- ##
3429
3430ac_ext=c
3431ac_cpp='$CPP $CPPFLAGS'
3432ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3433ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3434ac_compiler_gnu=$ac_cv_c_compiler_gnu
3435
3436
2f559cd2 3437
e25a10b7 3438emacs_config_options="$@"
2f559cd2
GM
3439## Add some environment variables, if they were passed via the environment
3440## rather than on the command-line.
3441for var in CFLAGS CPPFLAGS LDFLAGS; do
3442 case "$emacs_config_options" in
3443 *$var=*) continue ;;
3444 esac
3445 eval val="\$${var}"
3446 test x"$val" = x && continue
71b84316 3447 emacs_config_options="${emacs_config_options}${emacs_config_options:+ }$var=\"$val\""
2f559cd2
GM
3448done
3449
067d23c9
KY
3450ac_config_headers="$ac_config_headers src/config.h:src/config.in"
3451
3452
743c80a7 3453ac_aux_dir=
369e19fc 3454for ac_dir in build-aux "$srcdir"/build-aux; do
a9bec17c
GM
3455 for ac_t in install-sh install.sh shtool; do
3456 if test -f "$ac_dir/$ac_t"; then
3457 ac_aux_dir=$ac_dir
3458 ac_install_sh="$ac_aux_dir/$ac_t -c"
3459 break 2
3460 fi
3461 done
743c80a7
PE
3462done
3463if test -z "$ac_aux_dir"; then
a9bec17c 3464 as_fn_error "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
743c80a7 3465fi
067d23c9 3466
743c80a7
PE
3467# These three variables are undocumented and unsupported,
3468# and are intended to be withdrawn in a future Autoconf release.
3469# They can cause serious problems if a builder's source tree is in a directory
3470# whose full name contains unusual characters.
3471ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
3472ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
3473ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
067d23c9 3474
067d23c9 3475
369e19fc
PE
3476am__api_version='1.11'
3477
743c80a7
PE
3478# Find a good install program. We prefer a C program (faster),
3479# so one script is as good as another. But avoid the broken or
3480# incompatible versions:
3481# SysV /etc/install, /usr/sbin/install
3482# SunOS /usr/etc/install
3483# IRIX /sbin/install
3484# AIX /bin/install
3485# AmigaOS /C/install, which installs bootblocks on floppy discs
3486# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3487# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3488# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3489# OS/2's system install, which has a completely different semantic
3490# ./install, which can be erroneously created by make from ./install.sh.
3491# Reject install programs that cannot install multiple files.
3492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
3493$as_echo_n "checking for a BSD-compatible install... " >&6; }
3494if test -z "$INSTALL"; then
a9bec17c 3495if test "${ac_cv_path_install+set}" = set; then :
743c80a7
PE
3496 $as_echo_n "(cached) " >&6
3497else
3498 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3499for as_dir in $PATH
3500do
3501 IFS=$as_save_IFS
3502 test -z "$as_dir" && as_dir=.
3503 # Account for people who put trailing slashes in PATH elements.
3504case $as_dir/ in #((
3505 ./ | .// | /[cC]/* | \
3506 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3507 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
3508 /usr/ucb/* ) ;;
3509 *)
3510 # OSF1 and SCO ODT 3.0 have their own names for install.
3511 # Don't use installbsd from OSF since it installs stuff as root
3512 # by default.
3513 for ac_prog in ginstall scoinst install; do
3514 for ac_exec_ext in '' $ac_executable_extensions; do
3515 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
3516 if test $ac_prog = install &&
3517 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3518 # AIX install. It has an incompatible calling convention.
3519 :
3520 elif test $ac_prog = install &&
3521 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3522 # program-specific install script used by HP pwplus--don't use.
3523 :
3524 else
3525 rm -rf conftest.one conftest.two conftest.dir
3526 echo one > conftest.one
3527 echo two > conftest.two
3528 mkdir conftest.dir
3529 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
3530 test -s conftest.one && test -s conftest.two &&
3531 test -s conftest.dir/conftest.one &&
3532 test -s conftest.dir/conftest.two
3533 then
3534 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3535 break 3
3536 fi
3537 fi
3538 fi
3539 done
3540 done
3541 ;;
3542esac
067d23c9 3543
743c80a7
PE
3544 done
3545IFS=$as_save_IFS
067d23c9 3546
743c80a7 3547rm -rf conftest.one conftest.two conftest.dir
067d23c9 3548
067d23c9 3549fi
743c80a7
PE
3550 if test "${ac_cv_path_install+set}" = set; then
3551 INSTALL=$ac_cv_path_install
3552 else
3553 # As a last resort, use the slow shell script. Don't cache a
3554 # value for INSTALL within a source directory, because that will
3555 # break other packages using the cache if that directory is
3556 # removed, or if the value is a relative name.
3557 INSTALL=$ac_install_sh
3558 fi
067d23c9 3559fi
743c80a7
PE
3560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
3561$as_echo "$INSTALL" >&6; }
067d23c9 3562
743c80a7
PE
3563# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3564# It thinks the first close brace ends the variable substitution.
3565test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
067d23c9 3566
743c80a7 3567test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
067d23c9 3568
743c80a7 3569test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
067d23c9 3570
743c80a7
PE
3571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
3572$as_echo_n "checking whether build environment is sane... " >&6; }
3573# Just in case
3574sleep 1
3575echo timestamp > conftest.file
3576# Reject unsafe characters in $srcdir or the absolute working directory
3577# name. Accept space and tab only in the latter.
3578am_lf='
3579'
3580case `pwd` in
3581 *[\\\"\#\$\&\'\`$am_lf]*)
a9bec17c 3582 as_fn_error "unsafe absolute working directory name" "$LINENO" 5;;
743c80a7
PE
3583esac
3584case $srcdir in
3585 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
a9bec17c 3586 as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
743c80a7 3587esac
067d23c9 3588
743c80a7
PE
3589# Do `set' in a subshell so we don't clobber the current shell's
3590# arguments. Must try -L first in case configure is actually a
3591# symlink; some systems play weird games with the mod time of symlinks
3592# (eg FreeBSD returns the mod time of the symlink's containing
3593# directory).
3594if (
3595 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
3596 if test "$*" = "X"; then
3597 # -L didn't work.
3598 set X `ls -t "$srcdir/configure" conftest.file`
3599 fi
3600 rm -f conftest.file
3601 if test "$*" != "X $srcdir/configure conftest.file" \
3602 && test "$*" != "X conftest.file $srcdir/configure"; then
3603
3604 # If neither matched, then we have a broken ls. This can happen
3605 # if, for instance, CONFIG_SHELL is bash and it inherits a
3606 # broken ls alias from the environment. This has actually
3607 # happened. Such a system could not be considered "sane".
a9bec17c 3608 as_fn_error "ls -t appears to fail. Make sure there is not a broken
743c80a7
PE
3609alias in your environment" "$LINENO" 5
3610 fi
067d23c9 3611
743c80a7
PE
3612 test "$2" = conftest.file
3613 )
3614then
3615 # Ok.
3616 :
067d23c9 3617else
a9bec17c 3618 as_fn_error "newly created file is older than distributed files!
743c80a7 3619Check your system clock" "$LINENO" 5
067d23c9 3620fi
743c80a7
PE
3621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3622$as_echo "yes" >&6; }
3623test "$program_prefix" != NONE &&
3624 program_transform_name="s&^&$program_prefix&;$program_transform_name"
3625# Use a double $ so make ignores it.
3626test "$program_suffix" != NONE &&
3627 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
3628# Double any \ or $.
3629# By default was `s,x,x', remove it if useless.
3630ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
3631program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
067d23c9 3632
743c80a7
PE
3633# expand $ac_aux_dir to an absolute path
3634am_aux_dir=`cd $ac_aux_dir && pwd`
067d23c9 3635
743c80a7
PE
3636if test x"${MISSING+set}" != xset; then
3637 case $am_aux_dir in
3638 *\ * | *\ *)
3639 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
3640 *)
3641 MISSING="\${SHELL} $am_aux_dir/missing" ;;
3642 esac
067d23c9 3643fi
743c80a7
PE
3644# Use eval to expand $SHELL
3645if eval "$MISSING --run true"; then
3646 am_missing_run="$MISSING --run "
067d23c9 3647else
743c80a7
PE
3648 am_missing_run=
3649 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
3650$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
067d23c9
KY
3651fi
3652
743c80a7
PE
3653if test x"${install_sh}" != xset; then
3654 case $am_aux_dir in
3655 *\ * | *\ *)
3656 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
3657 *)
3658 install_sh="\${SHELL} $am_aux_dir/install-sh"
3659 esac
067d23c9
KY
3660fi
3661
743c80a7
PE
3662# Installed binaries are usually stripped using `strip' when the user
3663# run `make install-strip'. However `strip' might not be the right
3664# tool to use in cross-compilation environments, therefore Automake
3665# will honor the `STRIP' environment variable to overrule this program.
3666if test "$cross_compiling" != no; then
3667 if test -n "$ac_tool_prefix"; then
3668 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
3669set dummy ${ac_tool_prefix}strip; ac_word=$2
3670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3671$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 3672if test "${ac_cv_prog_STRIP+set}" = set; then :
743c80a7 3673 $as_echo_n "(cached) " >&6
067d23c9 3674else
743c80a7
PE
3675 if test -n "$STRIP"; then
3676 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
3677else
3678as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3679for as_dir in $PATH
3680do
3681 IFS=$as_save_IFS
3682 test -z "$as_dir" && as_dir=.
3683 for ac_exec_ext in '' $ac_executable_extensions; do
3684 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3685 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
3686 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3687 break 2
3688 fi
3689done
3690 done
3691IFS=$as_save_IFS
067d23c9
KY
3692
3693fi
067d23c9 3694fi
743c80a7
PE
3695STRIP=$ac_cv_prog_STRIP
3696if test -n "$STRIP"; then
3697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
3698$as_echo "$STRIP" >&6; }
3699else
3700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3701$as_echo "no" >&6; }
067d23c9
KY
3702fi
3703
3704
067d23c9 3705fi
743c80a7
PE
3706if test -z "$ac_cv_prog_STRIP"; then
3707 ac_ct_STRIP=$STRIP
3708 # Extract the first word of "strip", so it can be a program name with args.
3709set dummy strip; ac_word=$2
3710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3711$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 3712if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
743c80a7
PE
3713 $as_echo_n "(cached) " >&6
3714else
3715 if test -n "$ac_ct_STRIP"; then
3716 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
3717else
3718as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3719for as_dir in $PATH
3720do
3721 IFS=$as_save_IFS
3722 test -z "$as_dir" && as_dir=.
3723 for ac_exec_ext in '' $ac_executable_extensions; do
3724 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3725 ac_cv_prog_ac_ct_STRIP="strip"
3726 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3727 break 2
3728 fi
3729done
3730 done
3731IFS=$as_save_IFS
3732
3733fi
3734fi
3735ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
3736if test -n "$ac_ct_STRIP"; then
3737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
3738$as_echo "$ac_ct_STRIP" >&6; }
3739else
3740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3741$as_echo "no" >&6; }
3742fi
3743
3744 if test "x$ac_ct_STRIP" = x; then
3745 STRIP=":"
3746 else
3747 case $cross_compiling:$ac_tool_warned in
3748yes:)
3749{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3750$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3751ac_tool_warned=yes ;;
3752esac
3753 STRIP=$ac_ct_STRIP
3754 fi
3755else
3756 STRIP="$ac_cv_prog_STRIP"
3757fi
3758
3759fi
3760INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
3761
3762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
3763$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
3764if test -z "$MKDIR_P"; then
a9bec17c 3765 if test "${ac_cv_path_mkdir+set}" = set; then :
743c80a7
PE
3766 $as_echo_n "(cached) " >&6
3767else
3768 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3769for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
3770do
3771 IFS=$as_save_IFS
3772 test -z "$as_dir" && as_dir=.
3773 for ac_prog in mkdir gmkdir; do
3774 for ac_exec_ext in '' $ac_executable_extensions; do
3775 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
3776 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
3777 'mkdir (GNU coreutils) '* | \
3778 'mkdir (coreutils) '* | \
3779 'mkdir (fileutils) '4.1*)
3780 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
3781 break 3;;
3782 esac
3783 done
3784 done
3785 done
3786IFS=$as_save_IFS
3787
3788fi
3789
3790 test -d ./--version && rmdir ./--version
3791 if test "${ac_cv_path_mkdir+set}" = set; then
3792 MKDIR_P="$ac_cv_path_mkdir -p"
3793 else
3794 # As a last resort, use the slow shell script. Don't cache a
3795 # value for MKDIR_P within a source directory, because that will
3796 # break other packages using the cache if that directory is
3797 # removed, or if the value is a relative name.
3798 MKDIR_P="$ac_install_sh -d"
3799 fi
3800fi
3801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
3802$as_echo "$MKDIR_P" >&6; }
3803
3804mkdir_p="$MKDIR_P"
3805case $mkdir_p in
3806 [\\/$]* | ?:[\\/]*) ;;
3807 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
3808esac
3809
3810for ac_prog in gawk mawk nawk awk
3811do
3812 # Extract the first word of "$ac_prog", so it can be a program name with args.
3813set dummy $ac_prog; ac_word=$2
3814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3815$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 3816if test "${ac_cv_prog_AWK+set}" = set; then :
743c80a7
PE
3817 $as_echo_n "(cached) " >&6
3818else
3819 if test -n "$AWK"; then
3820 ac_cv_prog_AWK="$AWK" # Let the user override the test.
3821else
3822as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3823for as_dir in $PATH
3824do
3825 IFS=$as_save_IFS
3826 test -z "$as_dir" && as_dir=.
3827 for ac_exec_ext in '' $ac_executable_extensions; do
3828 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3829 ac_cv_prog_AWK="$ac_prog"
3830 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3831 break 2
3832 fi
3833done
3834 done
3835IFS=$as_save_IFS
3836
3837fi
3838fi
3839AWK=$ac_cv_prog_AWK
3840if test -n "$AWK"; then
3841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
3842$as_echo "$AWK" >&6; }
3843else
3844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3845$as_echo "no" >&6; }
3846fi
3847
3848
3849 test -n "$AWK" && break
3850done
3851
3852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3853$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
3854set x ${MAKE-make}
3855ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
a9bec17c 3856if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
743c80a7
PE
3857 $as_echo_n "(cached) " >&6
3858else
3859 cat >conftest.make <<\_ACEOF
3860SHELL = /bin/sh
3861all:
3862 @echo '@@@%%%=$(MAKE)=@@@%%%'
3863_ACEOF
a9bec17c 3864# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
743c80a7
PE
3865case `${MAKE-make} -f conftest.make 2>/dev/null` in
3866 *@@@%%%=?*=@@@%%%*)
3867 eval ac_cv_prog_make_${ac_make}_set=yes;;
3868 *)
3869 eval ac_cv_prog_make_${ac_make}_set=no;;
3870esac
3871rm -f conftest.make
3872fi
3873if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3875$as_echo "yes" >&6; }
3876 SET_MAKE=
3877else
3878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3879$as_echo "no" >&6; }
3880 SET_MAKE="MAKE=${MAKE-make}"
3881fi
3882
3883rm -rf .tst 2>/dev/null
3884mkdir .tst 2>/dev/null
3885if test -d .tst; then
3886 am__leading_dot=.
3887else
3888 am__leading_dot=_
3889fi
3890rmdir .tst 2>/dev/null
3891
3892if test "`cd $srcdir && pwd`" != "`pwd`"; then
3893 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
3894 # is not polluted with repeated "-I."
3895 am__isrc=' -I$(srcdir)'
3896 # test to see if srcdir already configured
3897 if test -f $srcdir/config.status; then
a9bec17c 3898 as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
743c80a7
PE
3899 fi
3900fi
3901
3902# test whether we have cygpath
3903if test -z "$CYGPATH_W"; then
3904 if (cygpath --version) >/dev/null 2>/dev/null; then
3905 CYGPATH_W='cygpath -w'
3906 else
3907 CYGPATH_W=echo
3908 fi
3909fi
3910
3911
3912# Define the identity of the package.
3913 PACKAGE='emacs'
c574bc34 3914 VERSION='24.3.50'
743c80a7
PE
3915
3916
3917cat >>confdefs.h <<_ACEOF
3918#define PACKAGE "$PACKAGE"
3919_ACEOF
3920
3921
3922cat >>confdefs.h <<_ACEOF
3923#define VERSION "$VERSION"
3924_ACEOF
3925
3926# Some tools Automake needs.
3927
3928ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
3929
3930
3931AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
3932
3933
3934AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
3935
3936
3937AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
3938
3939
3940MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
3941
3942# We need awk for the "check" target. The system "awk" is bad on
3943# some platforms.
3944# Always define AMTAR for backward compatibility.
3945
3946AMTAR=${AMTAR-"${am_missing_run}tar"}
3947
3948am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
3949
3950
3951
3952
3953
3954
3955
3956
3957lispdir='${datadir}/emacs/${version}/lisp'
e1939eb1 3958leimdir='${datadir}/emacs/${version}/leim'
397f7161 3959standardlisppath='${lispdir}:${leimdir}'
743c80a7
PE
3960locallisppath='${datadir}/emacs/${version}/site-lisp:'\
3961'${datadir}/emacs/site-lisp'
397f7161 3962lisppath='${locallisppath}:${standardlisppath}'
743c80a7
PE
3963etcdir='${datadir}/emacs/${version}/etc'
3964archlibdir='${libexecdir}/emacs/${version}/${configuration}'
3965docdir='${datadir}/emacs/${version}/etc'
3966gamedir='${localstatedir}/games/emacs'
3967
ee77919d
GM
3968
3969# Check whether --with-all was given.
3970if test "${with_all+set}" = set; then :
3971 withval=$with_all; with_features=$withval
c0528ebe 3972else
ee77919d 3973 with_features=yes
c0528ebe
GM
3974fi
3975
3976
743c80a7
PE
3977
3978
3979
3980# Check whether --with-pop was given.
3981if test "${with_pop+set}" = set; then :
3982 withval=$with_pop;
3983else
ee77919d 3984 with_pop=$with_features
743c80a7
PE
3985fi
3986
3987if test "$with_pop" = yes; then
3988 $as_echo "#define MAIL_USE_POP 1" >>confdefs.h
3989
3990fi
3991
3992
3993# Check whether --with-kerberos was given.
3994if test "${with_kerberos+set}" = set; then :
3995 withval=$with_kerberos;
3996else
3997 with_kerberos=no
3998fi
3999
4000if test "$with_kerberos" != no; then
4001 $as_echo "#define KERBEROS 1" >>confdefs.h
4002
4003fi
4004
4005
4006# Check whether --with-kerberos5 was given.
4007if test "${with_kerberos5+set}" = set; then :
4008 withval=$with_kerberos5;
4009else
4010 with_kerberos5=no
4011fi
4012
4013if test "${with_kerberos5}" != no; then
4014 if test "${with_kerberos}" = no; then
4015 with_kerberos=yes
4016 $as_echo "#define KERBEROS 1" >>confdefs.h
4017
4018 fi
4019
4020$as_echo "#define KERBEROS5 1" >>confdefs.h
4021
4022fi
4023
4024
4025# Check whether --with-hesiod was given.
4026if test "${with_hesiod+set}" = set; then :
4027 withval=$with_hesiod;
4028else
4029 with_hesiod=no
4030fi
4031
4032if test "$with_hesiod" != no; then
4033
4034$as_echo "#define HESIOD 1" >>confdefs.h
4035
4036fi
4037
4038
4039# Check whether --with-mmdf was given.
4040if test "${with_mmdf+set}" = set; then :
4041 withval=$with_mmdf;
4042else
4043 with_mmdf=no
4044fi
4045
4046if test "$with_mmdf" != no; then
4047
4048$as_echo "#define MAIL_USE_MMDF 1" >>confdefs.h
4049
4050fi
4051
4052
4053# Check whether --with-mail-unlink was given.
4054if test "${with_mail_unlink+set}" = set; then :
4055 withval=$with_mail_unlink;
4056else
4057 with_mail_unlink=no
4058fi
4059
4060if test "$with_mail_unlink" != no; then
4061
4062$as_echo "#define MAIL_UNLINK_SPOOL 1" >>confdefs.h
4063
4064fi
4065
4066
4067# Check whether --with-mailhost was given.
4068if test "${with_mailhost+set}" = set; then :
4069 withval=$with_mailhost;
4070cat >>confdefs.h <<_ACEOF
4071#define MAILHOST "$withval"
4072_ACEOF
4073
4074fi
4075
4076
4077
067d23c9
KY
4078# Check whether --with-sound was given.
4079if test "${with_sound+set}" = set; then :
4080 withval=$with_sound;
4081else
ee77919d 4082 with_sound=$with_features
067d23c9
KY
4083fi
4084
4085
4086
067d23c9
KY
4087# Check whether --with-x-toolkit was given.
4088if test "${with_x_toolkit+set}" = set; then :
4089 withval=$with_x_toolkit; case "${withval}" in
4090 y | ye | yes ) val=gtk ;;
4091 n | no ) val=no ;;
4092 l | lu | luc | luci | lucid ) val=lucid ;;
4093 a | at | ath | athe | athen | athena ) val=athena ;;
4094 m | mo | mot | moti | motif ) val=motif ;;
4095 g | gt | gtk ) val=gtk ;;
4fa92495 4096 gtk2 ) val=gtk2 ;;
067d23c9
KY
4097 gtk3 ) val=gtk3 ;;
4098 * )
a9bec17c 4099as_fn_error "\`--with-x-toolkit=$withval' is invalid;
4fa92495
GM
4100this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif', \`gtk',
4101\`gtk2' or \`gtk3'. \`yes' and \`gtk' are synonyms.
4102\`athena' and \`lucid' are synonyms." "$LINENO" 5
067d23c9
KY
4103 ;;
4104 esac
4105 with_x_toolkit=$val
4106
4107fi
4108
4109
4110
0442dc7f
GM
4111# Check whether --with-wide-int was given.
4112if test "${with_wide_int+set}" = set; then :
4113 withval=$with_wide_int;
4114else
4115 with_wide_int=no
4116fi
4117
4118if test "$with_wide_int" = yes; then
4119
4120$as_echo "#define WIDE_EMACS_INT 1" >>confdefs.h
4121
4122fi
4123
4124
067d23c9
KY
4125# Check whether --with-xpm was given.
4126if test "${with_xpm+set}" = set; then :
4127 withval=$with_xpm;
4128else
ee77919d 4129 with_xpm=$with_features
067d23c9
KY
4130fi
4131
4132
4133# Check whether --with-jpeg was given.
4134if test "${with_jpeg+set}" = set; then :
4135 withval=$with_jpeg;
4136else
ee77919d 4137 with_jpeg=$with_features
067d23c9
KY
4138fi
4139
4140
4141# Check whether --with-tiff was given.
4142if test "${with_tiff+set}" = set; then :
4143 withval=$with_tiff;
4144else
ee77919d 4145 with_tiff=$with_features
067d23c9
KY
4146fi
4147
4148
4149# Check whether --with-gif was given.
4150if test "${with_gif+set}" = set; then :
4151 withval=$with_gif;
4152else
ee77919d 4153 with_gif=$with_features
067d23c9
KY
4154fi
4155
4156
4157# Check whether --with-png was given.
4158if test "${with_png+set}" = set; then :
4159 withval=$with_png;
4160else
ee77919d 4161 with_png=$with_features
067d23c9
KY
4162fi
4163
4164
4165# Check whether --with-rsvg was given.
4166if test "${with_rsvg+set}" = set; then :
4167 withval=$with_rsvg;
4168else
ee77919d 4169 with_rsvg=$with_features
067d23c9
KY
4170fi
4171
4172
4173# Check whether --with-xml2 was given.
4174if test "${with_xml2+set}" = set; then :
4175 withval=$with_xml2;
4176else
ee77919d 4177 with_xml2=$with_features
067d23c9
KY
4178fi
4179
4180
4181# Check whether --with-imagemagick was given.
4182if test "${with_imagemagick+set}" = set; then :
4183 withval=$with_imagemagick;
4184else
ee77919d 4185 with_imagemagick=$with_features
067d23c9
KY
4186fi
4187
4188
4189
4190# Check whether --with-xft was given.
4191if test "${with_xft+set}" = set; then :
4192 withval=$with_xft;
4193else
ee77919d 4194 with_xft=$with_features
067d23c9
KY
4195fi
4196
4197
4198# Check whether --with-libotf was given.
4199if test "${with_libotf+set}" = set; then :
4200 withval=$with_libotf;
4201else
ee77919d 4202 with_libotf=$with_features
067d23c9
KY
4203fi
4204
4205
4206# Check whether --with-m17n-flt was given.
4207if test "${with_m17n_flt+set}" = set; then :
4208 withval=$with_m17n_flt;
4209else
ee77919d 4210 with_m17n_flt=$with_features
067d23c9
KY
4211fi
4212
4213
4214
4215# Check whether --with-toolkit-scroll-bars was given.
4216if test "${with_toolkit_scroll_bars+set}" = set; then :
4217 withval=$with_toolkit_scroll_bars;
4218else
ee77919d 4219 with_toolkit_scroll_bars=$with_features
067d23c9
KY
4220fi
4221
4222
4223# Check whether --with-xaw3d was given.
4224if test "${with_xaw3d+set}" = set; then :
4225 withval=$with_xaw3d;
4226else
ee77919d 4227 with_xaw3d=$with_features
067d23c9
KY
4228fi
4229
4230
4231# Check whether --with-xim was given.
4232if test "${with_xim+set}" = set; then :
4233 withval=$with_xim;
4234else
ee77919d 4235 with_xim=$with_features
067d23c9
KY
4236fi
4237
4238
4239# Check whether --with-ns was given.
4240if test "${with_ns+set}" = set; then :
4241 withval=$with_ns;
4242else
4243 with_ns=no
4244fi
4245
4246
5c0255d9
GM
4247# Check whether --with-w32 was given.
4248if test "${with_w32+set}" = set; then :
4249 withval=$with_w32;
4250else
4251 with_w32=no
4252fi
4253
4254
067d23c9
KY
4255
4256# Check whether --with-gpm was given.
4257if test "${with_gpm+set}" = set; then :
4258 withval=$with_gpm;
4259else
ee77919d 4260 with_gpm=$with_features
067d23c9
KY
4261fi
4262
4263
4264# Check whether --with-dbus was given.
4265if test "${with_dbus+set}" = set; then :
4266 withval=$with_dbus;
4267else
ee77919d 4268 with_dbus=$with_features
067d23c9
KY
4269fi
4270
4271
4272# Check whether --with-gconf was given.
4273if test "${with_gconf+set}" = set; then :
4274 withval=$with_gconf;
4275else
ee77919d 4276 with_gconf=$with_features
067d23c9
KY
4277fi
4278
4279
f527bd02
GM
4280# Check whether --with-gsettings was given.
4281if test "${with_gsettings+set}" = set; then :
4282 withval=$with_gsettings;
4283else
ee77919d 4284 with_gsettings=$with_features
f527bd02
GM
4285fi
4286
4287
067d23c9
KY
4288# Check whether --with-selinux was given.
4289if test "${with_selinux+set}" = set; then :
4290 withval=$with_selinux;
4291else
ee77919d 4292 with_selinux=$with_features
067d23c9
KY
4293fi
4294
4295
4cc63c81
GM
4296# Check whether --with-acl was given.
4297if test "${with_acl+set}" = set; then :
4298 withval=$with_acl;
4299else
4300 with_acl=$with_features
4301fi
4302
4303
067d23c9
KY
4304# Check whether --with-gnutls was given.
4305if test "${with_gnutls+set}" = set; then :
4306 withval=$with_gnutls;
4307else
ee77919d 4308 with_gnutls=$with_features
067d23c9
KY
4309fi
4310
4311
b5eb356a
GM
4312# Check whether --with-inotify was given.
4313if test "${with_inotify+set}" = set; then :
4314 withval=$with_inotify;
4315else
4316 with_inotify=$with_features
4317fi
4318
4319
067d23c9
KY
4320## For the times when you want to build Emacs but don't have
4321## a suitable makeinfo, and can live without the manuals.
4322
4323# Check whether --with-makeinfo was given.
4324if test "${with_makeinfo+set}" = set; then :
4325 withval=$with_makeinfo;
4326else
ee77919d 4327 with_makeinfo=$with_features
067d23c9
KY
4328fi
4329
4330
c3a461a5
GM
4331## Makefile.in needs the cache file name.
4332
4333
067d23c9
KY
4334## This is an option because I do not know if all info/man support
4335## compressed files, nor how to test if they do so.
4336
4337# Check whether --with-compress-info was given.
4338if test "${with_compress_info+set}" = set; then :
4339 withval=$with_compress_info;
4340else
ee77919d 4341 with_compress_info=$with_features
067d23c9
KY
4342fi
4343
4344if test $with_compress_info = yes; then
4345 GZIP_INFO=yes
4346else
4347 GZIP_INFO=
4348fi
4349
4350
4351
4352# Check whether --with-pkg-config-prog was given.
4353if test "${with_pkg_config_prog+set}" = set; then :
4354 withval=$with_pkg_config_prog;
4355fi
4356
4357if test "X${with_pkg_config_prog}" != X; then
4358 if test "${with_pkg_config_prog}" != yes; then
4359 PKG_CONFIG="${with_pkg_config_prog}"
4360 fi
4361fi
4362
067d23c9 4363
4fc5868a
UM
4364# Check whether --with-gameuser was given.
4365if test "${with_gameuser+set}" = set; then :
4366 withval=$with_gameuser;
4367fi
4368
4369test "X${with_gameuser}" != X && test "${with_gameuser}" != yes \
4370 && gameuser="${with_gameuser}"
4371test "X$gameuser" = X && gameuser=games
4372
4373
067d23c9
KY
4374# Check whether --with-gnustep-conf was given.
4375if test "${with_gnustep_conf+set}" = set; then :
4376 withval=$with_gnustep_conf;
4377fi
4378
4379test "X${with_gnustep_conf}" != X && test "${with_gnustep_conf}" != yes && \
4380 GNUSTEP_CONFIG_FILE="${with_gnustep_conf}"
4381test "X$GNUSTEP_CONFIG_FILE" = "X" && \
4382 GNUSTEP_CONFIG_FILE=/etc/GNUstep/GNUstep.conf
4383
4384# Check whether --enable-ns-self-contained was given.
4385if test "${enable_ns_self_contained+set}" = set; then :
4386 enableval=$enable_ns_self_contained; EN_NS_SELF_CONTAINED=$enableval
4387else
4388 EN_NS_SELF_CONTAINED=yes
4389fi
4390
4391
067d23c9
KY
4392# Check whether --enable-locallisppath was given.
4393if test "${enable_locallisppath+set}" = set; then :
4394 enableval=$enable_locallisppath; if test "${enableval}" = "no"; then
4395 locallisppath=
4396elif test "${enableval}" != "yes"; then
4397 locallisppath=${enableval}
4398fi
4399fi
4400
4401
4402# Check whether --enable-checking was given.
4403if test "${enable_checking+set}" = set; then :
4404 enableval=$enable_checking; ac_checking_flags="${enableval}"
4405fi
4406
4407IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
4408for check in $ac_checking_flags
4409do
4410 case $check in
4411 # these set all the flags to specific states
4412 yes) ac_enable_checking=1 ;;
4413 no) ac_enable_checking= ;
4414 ac_gc_check_stringbytes= ;
4415 ac_gc_check_string_overrun= ;
4416 ac_gc_check_string_free_list= ;
4417 ac_xmalloc_overrun= ;
7ee3791f 4418 ac_gc_check_cons_list= ;
e4d35030 4419 ac_glyphs_debug= ;;
067d23c9
KY
4420 all) ac_enable_checking=1 ;
4421 ac_gc_check_stringbytes=1 ;
4422 ac_gc_check_string_overrun=1 ;
4423 ac_gc_check_string_free_list=1 ;
4424 ac_xmalloc_overrun=1 ;
7ee3791f 4425 ac_gc_check_cons_list=1 ;
e4d35030 4426 ac_glyphs_debug=1 ;;
067d23c9
KY
4427 # these enable particular checks
4428 stringbytes) ac_gc_check_stringbytes=1 ;;
4429 stringoverrun) ac_gc_check_string_overrun=1 ;;
4430 stringfreelist) ac_gc_check_string_free_list=1 ;;
4431 xmallocoverrun) ac_xmalloc_overrun=1 ;;
4432 conslist) ac_gc_check_cons_list=1 ;;
e4d35030 4433 glyphs) ac_glyphs_debug=1 ;;
a9bec17c 4434 *) as_fn_error "unknown check category $check" "$LINENO" 5 ;;
067d23c9
KY
4435 esac
4436done
4437IFS="$ac_save_IFS"
4438
4439if test x$ac_enable_checking != x ; then
4440
4441$as_echo "#define ENABLE_CHECKING 1" >>confdefs.h
4442
4443fi
4444if test x$ac_gc_check_stringbytes != x ; then
4445
4446$as_echo "#define GC_CHECK_STRING_BYTES 1" >>confdefs.h
4447
4448fi
4fda9c95 4449if test x$ac_gc_check_string_overrun != x ; then
067d23c9
KY
4450
4451$as_echo "#define GC_CHECK_STRING_OVERRUN 1" >>confdefs.h
4452
4453fi
4454if test x$ac_gc_check_string_free_list != x ; then
4455
4456$as_echo "#define GC_CHECK_STRING_FREE_LIST 1" >>confdefs.h
4457
4458fi
4459if test x$ac_xmalloc_overrun != x ; then
4460
4461$as_echo "#define XMALLOC_OVERRUN_CHECK 1" >>confdefs.h
4462
4463fi
4464if test x$ac_gc_check_cons_list != x ; then
4465
4466$as_echo "#define GC_CHECK_CONS_LIST 1" >>confdefs.h
4467
7ee3791f 4468fi
e4d35030 4469if test x$ac_glyphs_debug != x ; then
7ee3791f
GM
4470
4471$as_echo "#define GLYPH_DEBUG 1" >>confdefs.h
4472
067d23c9
KY
4473fi
4474
afd07e01
GM
4475# Check whether --enable-check-lisp-object-type was given.
4476if test "${enable_check_lisp_object_type+set}" = set; then :
4477 enableval=$enable_check_lisp_object_type; if test "${enableval}" != "no"; then
067d23c9 4478
afd07e01 4479$as_echo "#define CHECK_LISP_OBJECT_TYPE 1" >>confdefs.h
067d23c9
KY
4480
4481fi
4482fi
4483
4484
4485
4486# Check whether --enable-profiling was given.
4487if test "${enable_profiling+set}" = set; then :
4488 enableval=$enable_profiling; ac_enable_profiling="${enableval}"
4489fi
4490
4491if test x$ac_enable_profiling != x ; then
4492 PROFILING_CFLAGS="-DPROFILING=1 -pg"
4493else
4494 PROFILING_CFLAGS=
4495fi
4496
4497
4498# Check whether --enable-autodepend was given.
4499if test "${enable_autodepend+set}" = set; then :
4500 enableval=$enable_autodepend; ac_enable_autodepend="${enableval}"
4501else
4502 ac_enable_autodepend=yes
4503fi
4504
4505
4efe5ef9
GM
4506# Check whether --enable-gtk-deprecation-warnings was given.
4507if test "${enable_gtk_deprecation_warnings+set}" = set; then :
4508 enableval=$enable_gtk_deprecation_warnings; ac_enable_gtk_deprecation_warnings="${enableval}"
4509fi
4510
4511
067d23c9 4512#### Make srcdir absolute, if it isn't already. It's important to
b5591ebb 4513#### avoid running the file name through pwd unnecessarily, since pwd can
067d23c9
KY
4514#### give you automounter prefixes, which can go away. We do all this
4515#### so Emacs can find its files when run uninstalled.
4516## Make sure CDPATH doesn't affect cd (in case PWD is relative).
4517unset CDPATH
4518case "${srcdir}" in
4519 /* ) ;;
4520 . )
4521 ## We may be able to use the $PWD environment variable to make this
4522 ## absolute. But sometimes PWD is inaccurate.
b5591ebb 4523 ## Note: we used to use $PWD at the end instead of `pwd`,
067d23c9
KY
4524 ## but that tested only for a well-formed and valid PWD,
4525 ## it did not object when PWD was well-formed and valid but just wrong.
b5591ebb 4526 if test ".$PWD" != "." && test ".`(cd "$PWD" ; sh -c pwd)`" = ".`pwd`" ;
067d23c9
KY
4527 then
4528 srcdir="$PWD"
4529 else
b5591ebb 4530 srcdir=`(cd "$srcdir"; pwd)`
067d23c9
KY
4531 fi
4532 ;;
b5591ebb 4533 * ) srcdir=`(cd "$srcdir"; pwd)` ;;
067d23c9
KY
4534esac
4535
067d23c9
KY
4536### Canonicalize the configuration name.
4537
067d23c9
KY
4538# Make sure we can run config.sub.
4539$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
a9bec17c 4540 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
067d23c9
KY
4541
4542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4543$as_echo_n "checking build system type... " >&6; }
a9bec17c 4544if test "${ac_cv_build+set}" = set; then :
067d23c9
KY
4545 $as_echo_n "(cached) " >&6
4546else
4547 ac_build_alias=$build_alias
4548test "x$ac_build_alias" = x &&
4549 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4550test "x$ac_build_alias" = x &&
a9bec17c 4551 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
067d23c9 4552ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
a9bec17c 4553 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
067d23c9
KY
4554
4555fi
4556{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4557$as_echo "$ac_cv_build" >&6; }
4558case $ac_cv_build in
4559*-*-*) ;;
a9bec17c 4560*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
067d23c9
KY
4561esac
4562build=$ac_cv_build
4563ac_save_IFS=$IFS; IFS='-'
4564set x $ac_cv_build
4565shift
4566build_cpu=$1
4567build_vendor=$2
4568shift; shift
4569# Remember, the first character of IFS is used to create $*,
4570# except with old shells:
4571build_os=$*
4572IFS=$ac_save_IFS
4573case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
4574
4575
4576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4577$as_echo_n "checking host system type... " >&6; }
a9bec17c 4578if test "${ac_cv_host+set}" = set; then :
067d23c9
KY
4579 $as_echo_n "(cached) " >&6
4580else
4581 if test "x$host_alias" = x; then
4582 ac_cv_host=$ac_cv_build
4583else
4584 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
a9bec17c 4585 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
067d23c9
KY
4586fi
4587
4588fi
4589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4590$as_echo "$ac_cv_host" >&6; }
4591case $ac_cv_host in
4592*-*-*) ;;
a9bec17c 4593*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
067d23c9
KY
4594esac
4595host=$ac_cv_host
4596ac_save_IFS=$IFS; IFS='-'
4597set x $ac_cv_host
4598shift
4599host_cpu=$1
4600host_vendor=$2
4601shift; shift
4602# Remember, the first character of IFS is used to create $*,
4603# except with old shells:
4604host_os=$*
4605IFS=$ac_save_IFS
4606case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
4607
4608
4609canonical=$host
4610configuration=${host_alias-${build_alias-$host}}
4611
4612
4613
4614### If you add support for a new configuration, add code to this
4615### switch statement to recognize your configuration name and select
42bbbe8b 4616### the appropriate operating system file.
067d23c9 4617
42bbbe8b 4618### You would hope that you could choose an s/*.h
067d23c9 4619### file based on the operating system portion. However, it turns out
42bbbe8b 4620### that each s/*.h file is pretty manufacturer-specific.
067d23c9
KY
4621### So we basically have to have a special case for each
4622### configuration name.
4623###
4624### As far as handling version numbers on operating systems is
4625### concerned, make sure things will fail in a fixable way. If
4626### /etc/MACHINES doesn't say anything about version numbers, be
4627### prepared to handle anything reasonably. If version numbers
4628### matter, be sure /etc/MACHINES says something about it.
4629
42bbbe8b 4630opsys='' unported=no
067d23c9
KY
4631case "${canonical}" in
4632
9b6e5515
GM
4633 ## GNU/Linux and similar ports
4634 *-*-linux* )
d6a003a8 4635 opsys=gnu-linux
d6a003a8
AS
4636 ;;
4637
067d23c9
KY
4638 ## FreeBSD ports
4639 *-*-freebsd* )
4640 opsys=freebsd
067d23c9
KY
4641 ;;
4642
4643 ## FreeBSD kernel + glibc based userland
4644 *-*-kfreebsd*gnu* )
4645 opsys=gnu-kfreebsd
067d23c9
KY
4646 ;;
4647
4648 ## NetBSD ports
4649 *-*-netbsd* )
4650 opsys=netbsd
067d23c9
KY
4651 ;;
4652
4653 ## OpenBSD ports
4654 *-*-openbsd* )
4655 opsys=openbsd
067d23c9
KY
4656 ;;
4657
067d23c9
KY
4658 ## Apple Darwin / Mac OS X
4659 *-apple-darwin* )
4660 case "${canonical}" in
42bbbe8b
GM
4661 i[3456]86-* ) ;;
4662 powerpc-* ) ;;
4663 x86_64-* ) ;;
067d23c9
KY
4664 * ) unported=yes ;;
4665 esac
4666 opsys=darwin
adf4198e
GM
4667 ## Use fink packages if available.
4668 ## FIXME find a better way to do this: http://debbugs.gnu.org/11507
4669## if test -d /sw/include && test -d /sw/lib; then
4670## GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib"
4671## NON_GCC_TEST_OPTIONS=${GCC_TEST_OPTIONS}
4672## fi
067d23c9
KY
4673 ;;
4674
4675 ## HP 9000 series 700 and 800, running HP/UX
4676 hppa*-hp-hpux10.2* )
d6a003a8 4677 opsys=hpux10-20
067d23c9
KY
4678 ;;
4679 hppa*-hp-hpux1[1-9]* )
d6a003a8 4680 opsys=hpux11
067d23c9
KY
4681 CFLAGS="-D_INCLUDE__STDC_A1_SOURCE $CFLAGS"
4682 ;;
4683
067d23c9 4684 ## IBM machines
067d23c9 4685 rs6000-ibm-aix4.[23]* )
42bbbe8b 4686 opsys=aix4-2
067d23c9
KY
4687 ;;
4688 powerpc-ibm-aix4.[23]* )
42bbbe8b 4689 opsys=aix4-2
067d23c9
KY
4690 ;;
4691 rs6000-ibm-aix[56]* )
42bbbe8b 4692 opsys=aix4-2
067d23c9
KY
4693 ;;
4694 powerpc-ibm-aix[56]* )
42bbbe8b 4695 opsys=aix4-2
067d23c9
KY
4696 ;;
4697
067d23c9
KY
4698 ## Silicon Graphics machines
4699 ## Iris 4D
4700 mips-sgi-irix6.5 )
fd44db7f 4701 opsys=irix6-5
067d23c9
KY
4702 # Without defining _LANGUAGE_C, things get masked out in the headers
4703 # so that, for instance, grepping for `free' in stdlib.h fails and
4704 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
067d23c9
KY
4705 NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
4706 ;;
4707
4708 ## Suns
067d23c9
KY
4709 *-sun-solaris* \
4710 | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* \
4711 | x86_64-*-solaris2* | x86_64-*-sunos5*)
4712 case "${canonical}" in
42bbbe8b
GM
4713 i[3456]86-*-* ) ;;
4714 amd64-*-*|x86_64-*-*) ;;
4715 sparc* ) ;;
067d23c9
KY
4716 * ) unported=yes ;;
4717 esac
4718 case "${canonical}" in
4719 *-sunos5.6* | *-solaris2.6* )
4720 opsys=sol2-6
067d23c9
KY
4721 RANLIB="ar -ts"
4722 ;;
4723 *-sunos5.[7-9]* | *-solaris2.[7-9]* )
4724 opsys=sol2-6
4725 emacs_check_sunpro_c=yes
067d23c9
KY
4726 ;;
4727 *-sunos5* | *-solaris* )
4728 opsys=sol2-10
4729 emacs_check_sunpro_c=yes
067d23c9
KY
4730 ;;
4731 esac
4732 ## Watch out for a compiler that we know will not work.
4733 case "${canonical}" in
4734 *-solaris* | *-sunos5* )
4735 if [ "x$CC" = x/usr/ucb/cc ]; then
4736 ## /usr/ucb/cc doesn't work;
4737 ## we should find some other compiler that does work.
4738 unset CC
4739 fi
4740 ;;
4741 *) ;;
4742 esac
4743 ;;
4744
067d23c9
KY
4745 ## Intel 386 machines where we don't care about the manufacturer.
4746 i[3456]86-*-* )
067d23c9
KY
4747 case "${canonical}" in
4748 *-cygwin ) opsys=cygwin ;;
5ec54608
GM
4749 *-darwin* ) opsys=darwin ;;
4750 *-sysv4.2uw* ) opsys=unixware ;;
4751 *-sysv5uw* ) opsys=unixware ;;
4752 *-sysv5OpenUNIX* ) opsys=unixware ;;
067d23c9
KY
4753 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
4754 esac
4755 ;;
4756
067d23c9
KY
4757 * )
4758 unported=yes
4759 ;;
4760esac
4761
4762### If the code above didn't choose an operating system, just choose
4763### an operating system based on the configuration name. You really
4764### only want to use this when you have no idea what the right
4765### operating system is; if you know what operating systems a machine
4766### runs, it's cleaner to make it explicit in the case statement
4767### above.
4768if test x"${opsys}" = x; then
4769 case "${canonical}" in
4770 *-gnu* ) opsys=gnu ;;
4771 * )
4772 unported=yes
4773 ;;
4774 esac
4775fi
4776
4777
4778
4779if test $unported = yes; then
a9bec17c 4780 as_fn_error "Emacs hasn't been ported to \`${canonical}' systems.
067d23c9
KY
4781Check \`etc/MACHINES' for recognized configuration names." "$LINENO" 5
4782fi
4783
067d23c9
KY
4784
4785#### Choose a compiler.
067d23c9
KY
4786
4787ac_ext=c
4788ac_cpp='$CPP $CPPFLAGS'
4789ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4790ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4791ac_compiler_gnu=$ac_cv_c_compiler_gnu
4792if test -n "$ac_tool_prefix"; then
4793 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4794set dummy ${ac_tool_prefix}gcc; ac_word=$2
4795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4796$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 4797if test "${ac_cv_prog_CC+set}" = set; then :
067d23c9
KY
4798 $as_echo_n "(cached) " >&6
4799else
4800 if test -n "$CC"; then
4801 ac_cv_prog_CC="$CC" # Let the user override the test.
4802else
4803as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4804for as_dir in $PATH
4805do
4806 IFS=$as_save_IFS
4807 test -z "$as_dir" && as_dir=.
4808 for ac_exec_ext in '' $ac_executable_extensions; do
4809 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4810 ac_cv_prog_CC="${ac_tool_prefix}gcc"
4811 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4812 break 2
4813 fi
4814done
4815 done
4816IFS=$as_save_IFS
4817
4818fi
4819fi
4820CC=$ac_cv_prog_CC
4821if test -n "$CC"; then
4822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4823$as_echo "$CC" >&6; }
4824else
4825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4826$as_echo "no" >&6; }
4827fi
4828
4829
4830fi
4831if test -z "$ac_cv_prog_CC"; then
4832 ac_ct_CC=$CC
4833 # Extract the first word of "gcc", so it can be a program name with args.
4834set dummy gcc; ac_word=$2
4835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4836$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 4837if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
067d23c9
KY
4838 $as_echo_n "(cached) " >&6
4839else
4840 if test -n "$ac_ct_CC"; then
4841 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4842else
4843as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4844for as_dir in $PATH
4845do
4846 IFS=$as_save_IFS
4847 test -z "$as_dir" && as_dir=.
4848 for ac_exec_ext in '' $ac_executable_extensions; do
4849 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4850 ac_cv_prog_ac_ct_CC="gcc"
4851 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4852 break 2
4853 fi
4854done
4855 done
4856IFS=$as_save_IFS
4857
4858fi
4859fi
4860ac_ct_CC=$ac_cv_prog_ac_ct_CC
4861if test -n "$ac_ct_CC"; then
4862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4863$as_echo "$ac_ct_CC" >&6; }
4864else
4865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4866$as_echo "no" >&6; }
4867fi
4868
4869 if test "x$ac_ct_CC" = x; then
4870 CC=""
4871 else
4872 case $cross_compiling:$ac_tool_warned in
4873yes:)
4874{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4875$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4876ac_tool_warned=yes ;;
4877esac
4878 CC=$ac_ct_CC
4879 fi
4880else
4881 CC="$ac_cv_prog_CC"
4882fi
4883
4884if test -z "$CC"; then
4885 if test -n "$ac_tool_prefix"; then
4886 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4887set dummy ${ac_tool_prefix}cc; ac_word=$2
4888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4889$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 4890if test "${ac_cv_prog_CC+set}" = set; then :
067d23c9
KY
4891 $as_echo_n "(cached) " >&6
4892else
4893 if test -n "$CC"; then
4894 ac_cv_prog_CC="$CC" # Let the user override the test.
4895else
4896as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4897for as_dir in $PATH
4898do
4899 IFS=$as_save_IFS
4900 test -z "$as_dir" && as_dir=.
4901 for ac_exec_ext in '' $ac_executable_extensions; do
4902 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4903 ac_cv_prog_CC="${ac_tool_prefix}cc"
4904 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4905 break 2
4906 fi
4907done
4908 done
4909IFS=$as_save_IFS
4910
4911fi
4912fi
4913CC=$ac_cv_prog_CC
4914if test -n "$CC"; then
4915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4916$as_echo "$CC" >&6; }
4917else
4918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4919$as_echo "no" >&6; }
4920fi
4921
4922
4923 fi
4924fi
4925if test -z "$CC"; then
4926 # Extract the first word of "cc", so it can be a program name with args.
4927set dummy cc; ac_word=$2
4928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4929$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 4930if test "${ac_cv_prog_CC+set}" = set; then :
067d23c9
KY
4931 $as_echo_n "(cached) " >&6
4932else
4933 if test -n "$CC"; then
4934 ac_cv_prog_CC="$CC" # Let the user override the test.
4935else
4936 ac_prog_rejected=no
4937as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4938for as_dir in $PATH
4939do
4940 IFS=$as_save_IFS
4941 test -z "$as_dir" && as_dir=.
4942 for ac_exec_ext in '' $ac_executable_extensions; do
4943 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4944 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4945 ac_prog_rejected=yes
4946 continue
4947 fi
4948 ac_cv_prog_CC="cc"
4949 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4950 break 2
4951 fi
4952done
4953 done
4954IFS=$as_save_IFS
4955
4956if test $ac_prog_rejected = yes; then
4957 # We found a bogon in the path, so make sure we never use it.
4958 set dummy $ac_cv_prog_CC
4959 shift
4960 if test $# != 0; then
4961 # We chose a different compiler from the bogus one.
4962 # However, it has the same basename, so the bogon will be chosen
4963 # first if we set CC to just the basename; use the full file name.
4964 shift
4965 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
4966 fi
4967fi
4968fi
4969fi
4970CC=$ac_cv_prog_CC
4971if test -n "$CC"; then
4972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4973$as_echo "$CC" >&6; }
4974else
4975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4976$as_echo "no" >&6; }
4977fi
4978
4979
4980fi
4981if test -z "$CC"; then
4982 if test -n "$ac_tool_prefix"; then
4983 for ac_prog in cl.exe
4984 do
4985 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4986set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4988$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 4989if test "${ac_cv_prog_CC+set}" = set; then :
067d23c9
KY
4990 $as_echo_n "(cached) " >&6
4991else
4992 if test -n "$CC"; then
4993 ac_cv_prog_CC="$CC" # Let the user override the test.
4994else
4995as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4996for as_dir in $PATH
4997do
4998 IFS=$as_save_IFS
4999 test -z "$as_dir" && as_dir=.
5000 for ac_exec_ext in '' $ac_executable_extensions; do
5001 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5002 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
5003 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5004 break 2
5005 fi
5006done
5007 done
5008IFS=$as_save_IFS
5009
5010fi
5011fi
5012CC=$ac_cv_prog_CC
5013if test -n "$CC"; then
5014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5015$as_echo "$CC" >&6; }
5016else
5017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5018$as_echo "no" >&6; }
5019fi
5020
5021
5022 test -n "$CC" && break
5023 done
5024fi
5025if test -z "$CC"; then
5026 ac_ct_CC=$CC
5027 for ac_prog in cl.exe
5028do
5029 # Extract the first word of "$ac_prog", so it can be a program name with args.
5030set dummy $ac_prog; ac_word=$2
5031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5032$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 5033if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
067d23c9
KY
5034 $as_echo_n "(cached) " >&6
5035else
5036 if test -n "$ac_ct_CC"; then
5037 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5038else
5039as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5040for as_dir in $PATH
5041do
5042 IFS=$as_save_IFS
5043 test -z "$as_dir" && as_dir=.
5044 for ac_exec_ext in '' $ac_executable_extensions; do
5045 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5046 ac_cv_prog_ac_ct_CC="$ac_prog"
5047 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5048 break 2
5049 fi
5050done
5051 done
5052IFS=$as_save_IFS
5053
5054fi
5055fi
5056ac_ct_CC=$ac_cv_prog_ac_ct_CC
5057if test -n "$ac_ct_CC"; then
5058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5059$as_echo "$ac_ct_CC" >&6; }
5060else
5061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5062$as_echo "no" >&6; }
5063fi
5064
5065
5066 test -n "$ac_ct_CC" && break
5067done
5068
5069 if test "x$ac_ct_CC" = x; then
5070 CC=""
5071 else
5072 case $cross_compiling:$ac_tool_warned in
5073yes:)
5074{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5075$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5076ac_tool_warned=yes ;;
5077esac
5078 CC=$ac_ct_CC
5079 fi
5080fi
5081
5082fi
5083
5084
5085test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5086$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
a9bec17c
GM
5087as_fn_error "no acceptable C compiler found in \$PATH
5088See \`config.log' for more details." "$LINENO" 5; }
067d23c9
KY
5089
5090# Provide some information about the compiler.
5091$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
5092set X $ac_compile
5093ac_compiler=$2
5094for ac_option in --version -v -V -qversion; do
5095 { { ac_try="$ac_compiler $ac_option >&5"
5096case "(($ac_try" in
5097 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5098 *) ac_try_echo=$ac_try;;
5099esac
5100eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5101$as_echo "$ac_try_echo"; } >&5
5102 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
5103 ac_status=$?
5104 if test -s conftest.err; then
5105 sed '10a\
5106... rest of stderr output deleted ...
5107 10q' conftest.err >conftest.er1
5108 cat conftest.er1 >&5
5109 fi
5110 rm -f conftest.er1 conftest.err
5111 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5112 test $ac_status = 0; }
5113done
5114
5115cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5116/* end confdefs.h. */
5117
5118int
5119main ()
5120{
5121
5122 ;
5123 return 0;
5124}
5125_ACEOF
5126ac_clean_files_save=$ac_clean_files
5127ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
5128# Try to create an executable without -o first, disregard a.out.
5129# It will help us diagnose broken compilers, and finding out an intuition
5130# of exeext.
5131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
5132$as_echo_n "checking whether the C compiler works... " >&6; }
5133ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
5134
5135# The possible output files:
5136ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
5137
5138ac_rmfiles=
5139for ac_file in $ac_files
5140do
5141 case $ac_file in
5142 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
5143 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
5144 esac
5145done
5146rm -f $ac_rmfiles
5147
5148if { { ac_try="$ac_link_default"
5149case "(($ac_try" in
5150 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5151 *) ac_try_echo=$ac_try;;
5152esac
5153eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5154$as_echo "$ac_try_echo"; } >&5
5155 (eval "$ac_link_default") 2>&5
5156 ac_status=$?
5157 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5158 test $ac_status = 0; }; then :
5159 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
5160# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
5161# in a Makefile. We should not override ac_cv_exeext if it was cached,
5162# so that the user can short-circuit this test for compilers unknown to
5163# Autoconf.
5164for ac_file in $ac_files ''
5165do
5166 test -f "$ac_file" || continue
5167 case $ac_file in
5168 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
5169 ;;
5170 [ab].out )
5171 # We found the default executable, but exeext='' is most
5172 # certainly right.
5173 break;;
5174 *.* )
5175 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
5176 then :; else
5177 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
5178 fi
5179 # We set ac_cv_exeext here because the later test for it is not
5180 # safe: cross compilers may not add the suffix if given an `-o'
5181 # argument, so we may need to know it at that point already.
5182 # Even if this section looks crufty: it has the advantage of
5183 # actually working.
5184 break;;
5185 * )
5186 break;;
5187 esac
5188done
5189test "$ac_cv_exeext" = no && ac_cv_exeext=
5190
5191else
5192 ac_file=''
5193fi
5194if test -z "$ac_file"; then :
5195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5196$as_echo "no" >&6; }
5197$as_echo "$as_me: failed program was:" >&5
5198sed 's/^/| /' conftest.$ac_ext >&5
5199
5200{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5201$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
a9bec17c
GM
5202{ as_fn_set_status 77
5203as_fn_error "C compiler cannot create executables
5204See \`config.log' for more details." "$LINENO" 5; }; }
067d23c9
KY
5205else
5206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5207$as_echo "yes" >&6; }
5208fi
5209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
5210$as_echo_n "checking for C compiler default output file name... " >&6; }
5211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
5212$as_echo "$ac_file" >&6; }
5213ac_exeext=$ac_cv_exeext
5214
5215rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
5216ac_clean_files=$ac_clean_files_save
5217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
5218$as_echo_n "checking for suffix of executables... " >&6; }
5219if { { ac_try="$ac_link"
5220case "(($ac_try" in
5221 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5222 *) ac_try_echo=$ac_try;;
5223esac
5224eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5225$as_echo "$ac_try_echo"; } >&5
5226 (eval "$ac_link") 2>&5
5227 ac_status=$?
5228 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5229 test $ac_status = 0; }; then :
5230 # If both `conftest.exe' and `conftest' are `present' (well, observable)
5231# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
5232# work properly (i.e., refer to `conftest.exe'), while it won't with
5233# `rm'.
5234for ac_file in conftest.exe conftest conftest.*; do
5235 test -f "$ac_file" || continue
5236 case $ac_file in
5237 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
5238 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
5239 break;;
5240 * ) break;;
5241 esac
5242done
5243else
5244 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5245$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
a9bec17c
GM
5246as_fn_error "cannot compute suffix of executables: cannot compile and link
5247See \`config.log' for more details." "$LINENO" 5; }
067d23c9
KY
5248fi
5249rm -f conftest conftest$ac_cv_exeext
5250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
5251$as_echo "$ac_cv_exeext" >&6; }
5252
5253rm -f conftest.$ac_ext
5254EXEEXT=$ac_cv_exeext
5255ac_exeext=$EXEEXT
5256cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5257/* end confdefs.h. */
5258#include <stdio.h>
5259int
5260main ()
5261{
5262FILE *f = fopen ("conftest.out", "w");
5263 return ferror (f) || fclose (f) != 0;
5264
5265 ;
5266 return 0;
5267}
5268_ACEOF
5269ac_clean_files="$ac_clean_files conftest.out"
5270# Check that the compiler produces executables we can run. If not, either
5271# the compiler is broken, or we cross compile.
5272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
5273$as_echo_n "checking whether we are cross compiling... " >&6; }
5274if test "$cross_compiling" != yes; then
5275 { { ac_try="$ac_link"
5276case "(($ac_try" in
5277 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5278 *) ac_try_echo=$ac_try;;
5279esac
5280eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5281$as_echo "$ac_try_echo"; } >&5
5282 (eval "$ac_link") 2>&5
5283 ac_status=$?
5284 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5285 test $ac_status = 0; }
5286 if { ac_try='./conftest$ac_cv_exeext'
5287 { { case "(($ac_try" in
5288 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5289 *) ac_try_echo=$ac_try;;
5290esac
5291eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5292$as_echo "$ac_try_echo"; } >&5
5293 (eval "$ac_try") 2>&5
5294 ac_status=$?
5295 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5296 test $ac_status = 0; }; }; then
5297 cross_compiling=no
5298 else
5299 if test "$cross_compiling" = maybe; then
5300 cross_compiling=yes
5301 else
5302 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5303$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
a9bec17c 5304as_fn_error "cannot run C compiled programs.
067d23c9 5305If you meant to cross compile, use \`--host'.
a9bec17c 5306See \`config.log' for more details." "$LINENO" 5; }
067d23c9
KY
5307 fi
5308 fi
5309fi
5310{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
5311$as_echo "$cross_compiling" >&6; }
5312
5313rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
5314ac_clean_files=$ac_clean_files_save
5315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
5316$as_echo_n "checking for suffix of object files... " >&6; }
a9bec17c 5317if test "${ac_cv_objext+set}" = set; then :
067d23c9
KY
5318 $as_echo_n "(cached) " >&6
5319else
5320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5321/* end confdefs.h. */
5322
5323int
5324main ()
5325{
5326
5327 ;
5328 return 0;
5329}
5330_ACEOF
5331rm -f conftest.o conftest.obj
5332if { { ac_try="$ac_compile"
5333case "(($ac_try" in
5334 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5335 *) ac_try_echo=$ac_try;;
5336esac
5337eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5338$as_echo "$ac_try_echo"; } >&5
5339 (eval "$ac_compile") 2>&5
5340 ac_status=$?
5341 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5342 test $ac_status = 0; }; then :
5343 for ac_file in conftest.o conftest.obj conftest.*; do
5344 test -f "$ac_file" || continue;
5345 case $ac_file in
5346 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
5347 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
5348 break;;
5349 esac
5350done
5351else
5352 $as_echo "$as_me: failed program was:" >&5
5353sed 's/^/| /' conftest.$ac_ext >&5
5354
5355{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5356$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
a9bec17c
GM
5357as_fn_error "cannot compute suffix of object files: cannot compile
5358See \`config.log' for more details." "$LINENO" 5; }
067d23c9
KY
5359fi
5360rm -f conftest.$ac_cv_objext conftest.$ac_ext
5361fi
5362{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
5363$as_echo "$ac_cv_objext" >&6; }
5364OBJEXT=$ac_cv_objext
5365ac_objext=$OBJEXT
5366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
5367$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
a9bec17c 5368if test "${ac_cv_c_compiler_gnu+set}" = set; then :
067d23c9
KY
5369 $as_echo_n "(cached) " >&6
5370else
5371 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5372/* end confdefs.h. */
5373
5374int
5375main ()
5376{
5377#ifndef __GNUC__
5378 choke me
5379#endif
5380
5381 ;
5382 return 0;
5383}
5384_ACEOF
5385if ac_fn_c_try_compile "$LINENO"; then :
5386 ac_compiler_gnu=yes
5387else
5388 ac_compiler_gnu=no
5389fi
5390rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5391ac_cv_c_compiler_gnu=$ac_compiler_gnu
5392
5393fi
5394{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
5395$as_echo "$ac_cv_c_compiler_gnu" >&6; }
5396if test $ac_compiler_gnu = yes; then
5397 GCC=yes
5398else
5399 GCC=
5400fi
5401ac_test_CFLAGS=${CFLAGS+set}
5402ac_save_CFLAGS=$CFLAGS
5403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
5404$as_echo_n "checking whether $CC accepts -g... " >&6; }
a9bec17c 5405if test "${ac_cv_prog_cc_g+set}" = set; then :
067d23c9
KY
5406 $as_echo_n "(cached) " >&6
5407else
5408 ac_save_c_werror_flag=$ac_c_werror_flag
5409 ac_c_werror_flag=yes
5410 ac_cv_prog_cc_g=no
5411 CFLAGS="-g"
5412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5413/* end confdefs.h. */
5414
5415int
5416main ()
5417{
5418
5419 ;
5420 return 0;
5421}
5422_ACEOF
5423if ac_fn_c_try_compile "$LINENO"; then :
5424 ac_cv_prog_cc_g=yes
5425else
5426 CFLAGS=""
5427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5428/* end confdefs.h. */
5429
5430int
5431main ()
5432{
5433
5434 ;
5435 return 0;
5436}
5437_ACEOF
5438if ac_fn_c_try_compile "$LINENO"; then :
5439
5440else
5441 ac_c_werror_flag=$ac_save_c_werror_flag
5442 CFLAGS="-g"
5443 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5444/* end confdefs.h. */
5445
5446int
5447main ()
5448{
5449
5450 ;
5451 return 0;
5452}
5453_ACEOF
5454if ac_fn_c_try_compile "$LINENO"; then :
5455 ac_cv_prog_cc_g=yes
5456fi
5457rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5458fi
5459rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5460fi
5461rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5462 ac_c_werror_flag=$ac_save_c_werror_flag
5463fi
5464{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
5465$as_echo "$ac_cv_prog_cc_g" >&6; }
5466if test "$ac_test_CFLAGS" = set; then
5467 CFLAGS=$ac_save_CFLAGS
5468elif test $ac_cv_prog_cc_g = yes; then
5469 if test "$GCC" = yes; then
5470 CFLAGS="-g -O2"
5471 else
5472 CFLAGS="-g"
5473 fi
5474else
5475 if test "$GCC" = yes; then
5476 CFLAGS="-O2"
5477 else
5478 CFLAGS=
5479 fi
5480fi
5481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
5482$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
a9bec17c 5483if test "${ac_cv_prog_cc_c89+set}" = set; then :
067d23c9
KY
5484 $as_echo_n "(cached) " >&6
5485else
5486 ac_cv_prog_cc_c89=no
5487ac_save_CC=$CC
5488cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5489/* end confdefs.h. */
5490#include <stdarg.h>
5491#include <stdio.h>
5492#include <sys/types.h>
5493#include <sys/stat.h>
5494/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
5495struct buf { int x; };
5496FILE * (*rcsopen) (struct buf *, struct stat *, int);
5497static char *e (p, i)
5498 char **p;
5499 int i;
5500{
5501 return p[i];
5502}
5503static char *f (char * (*g) (char **, int), char **p, ...)
5504{
5505 char *s;
5506 va_list v;
5507 va_start (v,p);
5508 s = g (p, va_arg (v,int));
5509 va_end (v);
5510 return s;
5511}
5512
5513/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
5514 function prototypes and stuff, but not '\xHH' hex character constants.
5515 These don't provoke an error unfortunately, instead are silently treated
5516 as 'x'. The following induces an error, until -std is added to get
5517 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
5518 array size at least. It's necessary to write '\x00'==0 to get something
5519 that's true only with -std. */
5520int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5521
5522/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5523 inside strings and character constants. */
5524#define FOO(x) 'x'
5525int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5526
5527int test (int i, double x);
5528struct s1 {int (*f) (int a);};
5529struct s2 {int (*f) (double a);};
5530int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5531int argc;
5532char **argv;
5533int
5534main ()
5535{
5536return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
5537 ;
5538 return 0;
5539}
5540_ACEOF
5541for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5542 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5543do
5544 CC="$ac_save_CC $ac_arg"
5545 if ac_fn_c_try_compile "$LINENO"; then :
5546 ac_cv_prog_cc_c89=$ac_arg
5547fi
5548rm -f core conftest.err conftest.$ac_objext
5549 test "x$ac_cv_prog_cc_c89" != "xno" && break
5550done
743c80a7
PE
5551rm -f conftest.$ac_ext
5552CC=$ac_save_CC
5553
5554fi
5555# AC_CACHE_VAL
5556case "x$ac_cv_prog_cc_c89" in
5557 x)
5558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5559$as_echo "none needed" >&6; } ;;
5560 xno)
5561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5562$as_echo "unsupported" >&6; } ;;
5563 *)
5564 CC="$CC $ac_cv_prog_cc_c89"
5565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5566$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
5567esac
5568if test "x$ac_cv_prog_cc_c89" != xno; then :
5569
5570fi
5571
5572ac_ext=c
5573ac_cpp='$CPP $CPPFLAGS'
5574ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5575ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5576ac_compiler_gnu=$ac_cv_c_compiler_gnu
5577DEPDIR="${am__leading_dot}deps"
5578
5579ac_config_commands="$ac_config_commands depfiles"
5580
5581
5582am_make=${MAKE-make}
5583cat > confinc << 'END'
5584am__doit:
5585 @echo this is the am__doit target
5586.PHONY: am__doit
5587END
5588# If we don't find an include directive, just comment out the code.
5589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
5590$as_echo_n "checking for style of include used by $am_make... " >&6; }
5591am__include="#"
5592am__quote=
5593_am_result=none
5594# First try GNU make style include.
5595echo "include confinc" > confmf
5596# Ignore all kinds of additional output from `make'.
5597case `$am_make -s -f confmf 2> /dev/null` in #(
5598*the\ am__doit\ target*)
5599 am__include=include
5600 am__quote=
5601 _am_result=GNU
5602 ;;
5603esac
5604# Now try BSD make style include.
5605if test "$am__include" = "#"; then
5606 echo '.include "confinc"' > confmf
5607 case `$am_make -s -f confmf 2> /dev/null` in #(
5608 *the\ am__doit\ target*)
5609 am__include=.include
5610 am__quote="\""
5611 _am_result=BSD
5612 ;;
5613 esac
5614fi
5615
5616
5617{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
5618$as_echo "$_am_result" >&6; }
5619rm -f confinc confmf
5620
5621# Check whether --enable-dependency-tracking was given.
5622if test "${enable_dependency_tracking+set}" = set; then :
5623 enableval=$enable_dependency_tracking;
5624fi
5625
5626if test "x$enable_dependency_tracking" != xno; then
5627 am_depcomp="$ac_aux_dir/depcomp"
5628 AMDEPBACKSLASH='\'
5629fi
5630 if test "x$enable_dependency_tracking" != xno; then
5631 AMDEP_TRUE=
5632 AMDEP_FALSE='#'
5633else
5634 AMDEP_TRUE='#'
5635 AMDEP_FALSE=
5636fi
5637
5638
5639
5640depcc="$CC" am_compiler_list=
5641
5642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
5643$as_echo_n "checking dependency style of $depcc... " >&6; }
a9bec17c 5644if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
743c80a7
PE
5645 $as_echo_n "(cached) " >&6
5646else
5647 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
5648 # We make a subdir and do the tests there. Otherwise we can end up
5649 # making bogus files that we don't know about and never remove. For
5650 # instance it was reported that on HP-UX the gcc test will end up
5651 # making a dummy file named `D' -- because `-MD' means `put the output
5652 # in D'.
5653 mkdir conftest.dir
5654 # Copy depcomp to subdir because otherwise we won't find it if we're
5655 # using a relative directory.
5656 cp "$am_depcomp" conftest.dir
5657 cd conftest.dir
5658 # We will build objects and dependencies in a subdirectory because
5659 # it helps to detect inapplicable dependency modes. For instance
5660 # both Tru64's cc and ICC support -MD to output dependencies as a
5661 # side effect of compilation, but ICC will put the dependencies in
5662 # the current directory while Tru64 will put them in the object
5663 # directory.
5664 mkdir sub
5665
5666 am_cv_CC_dependencies_compiler_type=none
5667 if test "$am_compiler_list" = ""; then
5668 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5669 fi
5670 am__universal=false
5671 case " $depcc " in #(
5672 *\ -arch\ *\ -arch\ *) am__universal=true ;;
5673 esac
5674
5675 for depmode in $am_compiler_list; do
5676 # Setup a source with many dependencies, because some compilers
5677 # like to wrap large dependency lists on column 80 (with \), and
5678 # we should not choose a depcomp mode which is confused by this.
5679 #
5680 # We need to recreate these files for each test, as the compiler may
5681 # overwrite some of them when testing with obscure command lines.
5682 # This happens at least with the AIX C compiler.
5683 : > sub/conftest.c
5684 for i in 1 2 3 4 5 6; do
5685 echo '#include "conftst'$i'.h"' >> sub/conftest.c
5686 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
5687 # Solaris 8's {/usr,}/bin/sh.
5688 touch sub/conftst$i.h
5689 done
5690 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
5691
5692 # We check with `-c' and `-o' for the sake of the "dashmstdout"
5693 # mode. It turns out that the SunPro C++ compiler does not properly
5694 # handle `-M -o', and we need to detect this. Also, some Intel
5695 # versions had trouble with output in subdirs
5696 am__obj=sub/conftest.${OBJEXT-o}
5697 am__minus_obj="-o $am__obj"
5698 case $depmode in
5699 gcc)
5700 # This depmode causes a compiler race in universal mode.
5701 test "$am__universal" = false || continue
5702 ;;
5703 nosideeffect)
5704 # after this tag, mechanisms are not by side-effect, so they'll
5705 # only be used when explicitly requested
5706 if test "x$enable_dependency_tracking" = xyes; then
5707 continue
5708 else
5709 break
5710 fi
5711 ;;
5712 msvisualcpp | msvcmsys)
5713 # This compiler won't grok `-c -o', but also, the minuso test has
5714 # not run yet. These depmodes are late enough in the game, and
5715 # so weak that their functioning should not be impacted.
5716 am__obj=conftest.${OBJEXT-o}
5717 am__minus_obj=
5718 ;;
5719 none) break ;;
5720 esac
5721 if depmode=$depmode \
5722 source=sub/conftest.c object=$am__obj \
5723 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
5724 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
5725 >/dev/null 2>conftest.err &&
5726 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
5727 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
5728 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
5729 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
5730 # icc doesn't choke on unknown options, it will just issue warnings
5731 # or remarks (even with -Werror). So we grep stderr for any message
5732 # that says an option was ignored or not supported.
5733 # When given -MP, icc 7.0 and 7.1 complain thusly:
5734 # icc: Command line warning: ignoring option '-M'; no argument required
5735 # The diagnosis changed in icc 8.0:
5736 # icc: Command line remark: option '-MP' not supported
5737 if (grep 'ignoring option' conftest.err ||
5738 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
5739 am_cv_CC_dependencies_compiler_type=$depmode
5740 break
5741 fi
5742 fi
5743 done
5744
5745 cd ..
5746 rm -rf conftest.dir
5747else
5748 am_cv_CC_dependencies_compiler_type=none
5749fi
5750
5751fi
5752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
5753$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
5754CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
5755
5756 if
5757 test "x$enable_dependency_tracking" != xno \
5758 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
5759 am__fastdepCC_TRUE=
5760 am__fastdepCC_FALSE='#'
5761else
5762 am__fastdepCC_TRUE='#'
5763 am__fastdepCC_FALSE=
5764fi
5765
5766
5767if test "x$CC" != xcc; then
5768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5
5769$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
5770else
5771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5
5772$as_echo_n "checking whether cc understands -c and -o together... " >&6; }
5773fi
5774set dummy $CC; ac_cc=`$as_echo "$2" |
5775 sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
a9bec17c 5776if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then :
743c80a7
PE
5777 $as_echo_n "(cached) " >&6
5778else
5779 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5780/* end confdefs.h. */
5781
5782int
5783main ()
5784{
5785
5786 ;
5787 return 0;
5788}
5789_ACEOF
5790# Make sure it works both with $CC and with simple cc.
5791# We do the test twice because some compilers refuse to overwrite an
5792# existing .o file with -o, though they will create one.
5793ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
5794rm -f conftest2.*
5795if { { case "(($ac_try" in
5796 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5797 *) ac_try_echo=$ac_try;;
5798esac
5799eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5800$as_echo "$ac_try_echo"; } >&5
5801 (eval "$ac_try") 2>&5
5802 ac_status=$?
5803 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5804 test $ac_status = 0; } &&
5805 test -f conftest2.$ac_objext && { { case "(($ac_try" in
5806 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5807 *) ac_try_echo=$ac_try;;
5808esac
5809eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5810$as_echo "$ac_try_echo"; } >&5
5811 (eval "$ac_try") 2>&5
5812 ac_status=$?
5813 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5814 test $ac_status = 0; };
5815then
5816 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
5817 if test "x$CC" != xcc; then
5818 # Test first that cc exists at all.
5819 if { ac_try='cc -c conftest.$ac_ext >&5'
5820 { { case "(($ac_try" in
5821 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5822 *) ac_try_echo=$ac_try;;
5823esac
5824eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5825$as_echo "$ac_try_echo"; } >&5
5826 (eval "$ac_try") 2>&5
5827 ac_status=$?
5828 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5829 test $ac_status = 0; }; }; then
5830 ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
5831 rm -f conftest2.*
5832 if { { case "(($ac_try" in
5833 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5834 *) ac_try_echo=$ac_try;;
5835esac
5836eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5837$as_echo "$ac_try_echo"; } >&5
5838 (eval "$ac_try") 2>&5
5839 ac_status=$?
5840 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5841 test $ac_status = 0; } &&
5842 test -f conftest2.$ac_objext && { { case "(($ac_try" in
5843 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5844 *) ac_try_echo=$ac_try;;
5845esac
5846eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5847$as_echo "$ac_try_echo"; } >&5
5848 (eval "$ac_try") 2>&5
5849 ac_status=$?
5850 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5851 test $ac_status = 0; };
5852 then
5853 # cc works too.
5854 :
5855 else
5856 # cc exists but doesn't like -o.
5857 eval ac_cv_prog_cc_${ac_cc}_c_o=no
5858 fi
5859 fi
5860 fi
5861else
5862 eval ac_cv_prog_cc_${ac_cc}_c_o=no
5863fi
5864rm -f core conftest*
5865
5866fi
5867if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
5868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5869$as_echo "yes" >&6; }
5870else
5871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5872$as_echo "no" >&6; }
5873
5874$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h
5875
5876fi
5877
5878# FIXME: we rely on the cache variable name because
5879# there is no other way.
5880set dummy $CC
5881am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
5882eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
5883if test "$am_t" != yes; then
5884 # Losing compiler, so override with the script.
5885 # FIXME: It is wrong to rewrite CC.
5886 # But if we don't then we get into trouble of one sort or another.
5887 # A longer-term fix would be to have automake use am__CC in this case,
5888 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
5889 CC="$am_aux_dir/compile $CC"
5890fi
5891
5892
5893
5ec54608
GM
5894if test x$GCC = xyes; then
5895 test "x$GCC_TEST_OPTIONS" != x && CC="$CC $GCC_TEST_OPTIONS"
5896else
5897 test "x$NON_GCC_TEST_OPTIONS" != x && CC="$CC $NON_GCC_TEST_OPTIONS"
5898fi
5899
34fd7a48
GM
5900# Avoid gnulib's tests for HAVE_WORKING_O_NOATIME and HAVE_WORKING_O_NOFOLLOW,
5901# as we don't use them.
710f5812 5902
f077f61d
GM
5903# Avoid gnulib's threadlib module, as we do threads our own way.
5904
5905
5ec54608 5906# Initialize gnulib right after choosing the compiler.
743c80a7 5907
067d23c9
KY
5908ac_ext=c
5909ac_cpp='$CPP $CPPFLAGS'
5910ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5911ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5912ac_compiler_gnu=$ac_cv_c_compiler_gnu
5913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
5914$as_echo_n "checking how to run the C preprocessor... " >&6; }
5915# On Suns, sometimes $CPP names a directory.
5916if test -n "$CPP" && test -d "$CPP"; then
5917 CPP=
5918fi
5919if test -z "$CPP"; then
a9bec17c 5920 if test "${ac_cv_prog_CPP+set}" = set; then :
067d23c9
KY
5921 $as_echo_n "(cached) " >&6
5922else
5923 # Double quotes because CPP needs to be expanded
5924 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
5925 do
5926 ac_preproc_ok=false
5927for ac_c_preproc_warn_flag in '' yes
5928do
5929 # Use a header file that comes with gcc, so configuring glibc
5930 # with a fresh cross-compiler works.
5931 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5932 # <limits.h> exists even on freestanding compilers.
5933 # On the NeXT, cc -E runs the code through the compiler's parser,
5934 # not just through cpp. "Syntax error" is here to catch this case.
5935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5936/* end confdefs.h. */
5937#ifdef __STDC__
5938# include <limits.h>
5939#else
5940# include <assert.h>
5941#endif
5942 Syntax error
5943_ACEOF
5944if ac_fn_c_try_cpp "$LINENO"; then :
5945
5946else
5947 # Broken: fails on valid input.
5948continue
5949fi
a9bec17c 5950rm -f conftest.err conftest.$ac_ext
067d23c9
KY
5951
5952 # OK, works on sane cases. Now check whether nonexistent headers
5953 # can be detected and how.
5954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5955/* end confdefs.h. */
5956#include <ac_nonexistent.h>
5957_ACEOF
5958if ac_fn_c_try_cpp "$LINENO"; then :
5959 # Broken: success on invalid input.
5960continue
5961else
5962 # Passes both tests.
5963ac_preproc_ok=:
5964break
5965fi
a9bec17c 5966rm -f conftest.err conftest.$ac_ext
067d23c9
KY
5967
5968done
5969# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
a9bec17c 5970rm -f conftest.err conftest.$ac_ext
067d23c9
KY
5971if $ac_preproc_ok; then :
5972 break
5973fi
5974
5975 done
5976 ac_cv_prog_CPP=$CPP
5977
5978fi
5979 CPP=$ac_cv_prog_CPP
5980else
5981 ac_cv_prog_CPP=$CPP
5982fi
5983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
5984$as_echo "$CPP" >&6; }
5985ac_preproc_ok=false
5986for ac_c_preproc_warn_flag in '' yes
5987do
5988 # Use a header file that comes with gcc, so configuring glibc
5989 # with a fresh cross-compiler works.
5990 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5991 # <limits.h> exists even on freestanding compilers.
5992 # On the NeXT, cc -E runs the code through the compiler's parser,
5993 # not just through cpp. "Syntax error" is here to catch this case.
5994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5995/* end confdefs.h. */
5996#ifdef __STDC__
5997# include <limits.h>
5998#else
5999# include <assert.h>
6000#endif
6001 Syntax error
6002_ACEOF
6003if ac_fn_c_try_cpp "$LINENO"; then :
6004
6005else
6006 # Broken: fails on valid input.
6007continue
6008fi
a9bec17c 6009rm -f conftest.err conftest.$ac_ext
067d23c9
KY
6010
6011 # OK, works on sane cases. Now check whether nonexistent headers
6012 # can be detected and how.
6013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6014/* end confdefs.h. */
6015#include <ac_nonexistent.h>
6016_ACEOF
6017if ac_fn_c_try_cpp "$LINENO"; then :
6018 # Broken: success on invalid input.
6019continue
6020else
6021 # Passes both tests.
6022ac_preproc_ok=:
6023break
6024fi
a9bec17c 6025rm -f conftest.err conftest.$ac_ext
067d23c9
KY
6026
6027done
6028# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
a9bec17c 6029rm -f conftest.err conftest.$ac_ext
067d23c9
KY
6030if $ac_preproc_ok; then :
6031
6032else
6033 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6034$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
a9bec17c
GM
6035as_fn_error "C preprocessor \"$CPP\" fails sanity check
6036See \`config.log' for more details." "$LINENO" 5; }
067d23c9
KY
6037fi
6038
6039ac_ext=c
6040ac_cpp='$CPP $CPPFLAGS'
6041ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6042ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6043ac_compiler_gnu=$ac_cv_c_compiler_gnu
6044
6045
6046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6047$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
a9bec17c 6048if test "${ac_cv_path_GREP+set}" = set; then :
067d23c9
KY
6049 $as_echo_n "(cached) " >&6
6050else
6051 if test -z "$GREP"; then
6052 ac_path_GREP_found=false
6053 # Loop through the user's path and test for each of PROGNAME-LIST
6054 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6055for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6056do
6057 IFS=$as_save_IFS
6058 test -z "$as_dir" && as_dir=.
6059 for ac_prog in grep ggrep; do
6060 for ac_exec_ext in '' $ac_executable_extensions; do
6061 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6062 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
6063# Check for GNU ac_path_GREP and select it if it is found.
6064 # Check for GNU $ac_path_GREP
6065case `"$ac_path_GREP" --version 2>&1` in
6066*GNU*)
6067 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6068*)
6069 ac_count=0
6070 $as_echo_n 0123456789 >"conftest.in"
6071 while :
6072 do
6073 cat "conftest.in" "conftest.in" >"conftest.tmp"
6074 mv "conftest.tmp" "conftest.in"
6075 cp "conftest.in" "conftest.nl"
6076 $as_echo 'GREP' >> "conftest.nl"
6077 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6078 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6079 as_fn_arith $ac_count + 1 && ac_count=$as_val
6080 if test $ac_count -gt ${ac_path_GREP_max-0}; then
6081 # Best one so far, save it but keep looking for a better one
6082 ac_cv_path_GREP="$ac_path_GREP"
6083 ac_path_GREP_max=$ac_count
6084 fi
6085 # 10*(2^10) chars as input seems more than enough
6086 test $ac_count -gt 10 && break
6087 done
6088 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6089esac
6090
6091 $ac_path_GREP_found && break 3
6092 done
6093 done
6094 done
6095IFS=$as_save_IFS
6096 if test -z "$ac_cv_path_GREP"; then
a9bec17c 6097 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
067d23c9
KY
6098 fi
6099else
6100 ac_cv_path_GREP=$GREP
6101fi
6102
6103fi
6104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6105$as_echo "$ac_cv_path_GREP" >&6; }
6106 GREP="$ac_cv_path_GREP"
6107
6108
6109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6110$as_echo_n "checking for egrep... " >&6; }
a9bec17c 6111if test "${ac_cv_path_EGREP+set}" = set; then :
067d23c9
KY
6112 $as_echo_n "(cached) " >&6
6113else
6114 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6115 then ac_cv_path_EGREP="$GREP -E"
6116 else
6117 if test -z "$EGREP"; then
6118 ac_path_EGREP_found=false
6119 # Loop through the user's path and test for each of PROGNAME-LIST
6120 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6121for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6122do
6123 IFS=$as_save_IFS
6124 test -z "$as_dir" && as_dir=.
6125 for ac_prog in egrep; do
6126 for ac_exec_ext in '' $ac_executable_extensions; do
6127 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6128 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
6129# Check for GNU ac_path_EGREP and select it if it is found.
6130 # Check for GNU $ac_path_EGREP
6131case `"$ac_path_EGREP" --version 2>&1` in
6132*GNU*)
6133 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6134*)
6135 ac_count=0
6136 $as_echo_n 0123456789 >"conftest.in"
6137 while :
6138 do
6139 cat "conftest.in" "conftest.in" >"conftest.tmp"
6140 mv "conftest.tmp" "conftest.in"
6141 cp "conftest.in" "conftest.nl"
6142 $as_echo 'EGREP' >> "conftest.nl"
6143 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6144 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6145 as_fn_arith $ac_count + 1 && ac_count=$as_val
6146 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6147 # Best one so far, save it but keep looking for a better one
6148 ac_cv_path_EGREP="$ac_path_EGREP"
6149 ac_path_EGREP_max=$ac_count
6150 fi
6151 # 10*(2^10) chars as input seems more than enough
6152 test $ac_count -gt 10 && break
6153 done
6154 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6155esac
6156
6157 $ac_path_EGREP_found && break 3
6158 done
6159 done
6160 done
6161IFS=$as_save_IFS
6162 if test -z "$ac_cv_path_EGREP"; then
a9bec17c 6163 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
067d23c9
KY
6164 fi
6165else
6166 ac_cv_path_EGREP=$EGREP
6167fi
6168
6169 fi
6170fi
6171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6172$as_echo "$ac_cv_path_EGREP" >&6; }
6173 EGREP="$ac_cv_path_EGREP"
6174
6175
369e19fc
PE
6176
6177
6178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
6179$as_echo_n "checking for Minix Amsterdam compiler... " >&6; }
a9bec17c 6180if test "${gl_cv_c_amsterdam_compiler+set}" = set; then :
369e19fc
PE
6181 $as_echo_n "(cached) " >&6
6182else
6183
6184 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6185/* end confdefs.h. */
6186
6187#ifdef __ACK__
6188Amsterdam
6189#endif
6190
6191_ACEOF
6192if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6193 $EGREP "Amsterdam" >/dev/null 2>&1; then :
6194 gl_cv_c_amsterdam_compiler=yes
6195else
6196 gl_cv_c_amsterdam_compiler=no
6197fi
6198rm -f conftest*
6199
6200
6201fi
6202{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
6203$as_echo "$gl_cv_c_amsterdam_compiler" >&6; }
6204 if test -z "$AR"; then
6205 if test $gl_cv_c_amsterdam_compiler = yes; then
6206 AR='cc -c.a'
6207 if test -z "$ARFLAGS"; then
6208 ARFLAGS='-o'
6209 fi
6210 else
6211 if test -n "$ac_tool_prefix"; then
6212 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6213set dummy ${ac_tool_prefix}ar; ac_word=$2
6214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6215$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 6216if test "${ac_cv_prog_AR+set}" = set; then :
369e19fc
PE
6217 $as_echo_n "(cached) " >&6
6218else
6219 if test -n "$AR"; then
6220 ac_cv_prog_AR="$AR" # Let the user override the test.
6221else
6222as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6223for as_dir in $PATH
6224do
6225 IFS=$as_save_IFS
6226 test -z "$as_dir" && as_dir=.
6227 for ac_exec_ext in '' $ac_executable_extensions; do
6228 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6229 ac_cv_prog_AR="${ac_tool_prefix}ar"
6230 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6231 break 2
6232 fi
6233done
6234 done
6235IFS=$as_save_IFS
6236
6237fi
6238fi
6239AR=$ac_cv_prog_AR
6240if test -n "$AR"; then
6241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6242$as_echo "$AR" >&6; }
6243else
6244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6245$as_echo "no" >&6; }
6246fi
6247
6248
6249fi
6250if test -z "$ac_cv_prog_AR"; then
6251 ac_ct_AR=$AR
6252 # Extract the first word of "ar", so it can be a program name with args.
6253set dummy ar; ac_word=$2
6254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6255$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 6256if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
369e19fc
PE
6257 $as_echo_n "(cached) " >&6
6258else
6259 if test -n "$ac_ct_AR"; then
6260 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6261else
6262as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6263for as_dir in $PATH
6264do
6265 IFS=$as_save_IFS
6266 test -z "$as_dir" && as_dir=.
6267 for ac_exec_ext in '' $ac_executable_extensions; do
6268 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6269 ac_cv_prog_ac_ct_AR="ar"
6270 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6271 break 2
6272 fi
6273done
6274 done
6275IFS=$as_save_IFS
6276
6277fi
6278fi
6279ac_ct_AR=$ac_cv_prog_ac_ct_AR
6280if test -n "$ac_ct_AR"; then
6281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6282$as_echo "$ac_ct_AR" >&6; }
6283else
6284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6285$as_echo "no" >&6; }
6286fi
6287
6288 if test "x$ac_ct_AR" = x; then
6289 AR="ar"
6290 else
6291 case $cross_compiling:$ac_tool_warned in
6292yes:)
6293{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6294$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6295ac_tool_warned=yes ;;
6296esac
6297 AR=$ac_ct_AR
6298 fi
6299else
6300 AR="$ac_cv_prog_AR"
6301fi
6302
6303 if test -z "$ARFLAGS"; then
6304 ARFLAGS='cru'
6305 fi
6306 fi
6307 else
6308 if test -z "$ARFLAGS"; then
6309 ARFLAGS='cru'
6310 fi
6311 fi
6312
6313
6314 if test -z "$RANLIB"; then
6315 if test $gl_cv_c_amsterdam_compiler = yes; then
6316 RANLIB=':'
6317 else
6318 if test -n "$ac_tool_prefix"; then
6319 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6320set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6322$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 6323if test "${ac_cv_prog_RANLIB+set}" = set; then :
369e19fc
PE
6324 $as_echo_n "(cached) " >&6
6325else
6326 if test -n "$RANLIB"; then
6327 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6328else
6329as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6330for as_dir in $PATH
6331do
6332 IFS=$as_save_IFS
6333 test -z "$as_dir" && as_dir=.
6334 for ac_exec_ext in '' $ac_executable_extensions; do
6335 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6336 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6337 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6338 break 2
6339 fi
6340done
6341 done
6342IFS=$as_save_IFS
6343
6344fi
6345fi
6346RANLIB=$ac_cv_prog_RANLIB
6347if test -n "$RANLIB"; then
6348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6349$as_echo "$RANLIB" >&6; }
6350else
6351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6352$as_echo "no" >&6; }
6353fi
6354
6355
6356fi
6357if test -z "$ac_cv_prog_RANLIB"; then
6358 ac_ct_RANLIB=$RANLIB
6359 # Extract the first word of "ranlib", so it can be a program name with args.
6360set dummy ranlib; ac_word=$2
6361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6362$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 6363if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
369e19fc
PE
6364 $as_echo_n "(cached) " >&6
6365else
6366 if test -n "$ac_ct_RANLIB"; then
6367 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6368else
6369as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6370for as_dir in $PATH
6371do
6372 IFS=$as_save_IFS
6373 test -z "$as_dir" && as_dir=.
6374 for ac_exec_ext in '' $ac_executable_extensions; do
6375 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6376 ac_cv_prog_ac_ct_RANLIB="ranlib"
6377 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6378 break 2
6379 fi
6380done
6381 done
6382IFS=$as_save_IFS
6383
6384fi
6385fi
6386ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6387if test -n "$ac_ct_RANLIB"; then
6388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6389$as_echo "$ac_ct_RANLIB" >&6; }
6390else
6391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6392$as_echo "no" >&6; }
6393fi
6394
6395 if test "x$ac_ct_RANLIB" = x; then
6396 RANLIB=":"
6397 else
6398 case $cross_compiling:$ac_tool_warned in
6399yes:)
6400{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6401$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6402ac_tool_warned=yes ;;
6403esac
6404 RANLIB=$ac_ct_RANLIB
6405 fi
6406else
6407 RANLIB="$ac_cv_prog_RANLIB"
6408fi
6409
6410 fi
6411 fi
6412
6413
067d23c9
KY
6414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6415$as_echo_n "checking for ANSI C header files... " >&6; }
a9bec17c 6416if test "${ac_cv_header_stdc+set}" = set; then :
067d23c9
KY
6417 $as_echo_n "(cached) " >&6
6418else
6419 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6420/* end confdefs.h. */
6421#include <stdlib.h>
6422#include <stdarg.h>
6423#include <string.h>
6424#include <float.h>
6425
6426int
6427main ()
6428{
6429
6430 ;
6431 return 0;
6432}
6433_ACEOF
6434if ac_fn_c_try_compile "$LINENO"; then :
6435 ac_cv_header_stdc=yes
6436else
6437 ac_cv_header_stdc=no
6438fi
6439rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6440
6441if test $ac_cv_header_stdc = yes; then
6442 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6443 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6444/* end confdefs.h. */
6445#include <string.h>
6446
6447_ACEOF
6448if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6449 $EGREP "memchr" >/dev/null 2>&1; then :
6450
6451else
6452 ac_cv_header_stdc=no
6453fi
6454rm -f conftest*
6455
6456fi
6457
6458if test $ac_cv_header_stdc = yes; then
6459 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6460 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6461/* end confdefs.h. */
6462#include <stdlib.h>
6463
6464_ACEOF
6465if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6466 $EGREP "free" >/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 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6477 if test "$cross_compiling" = yes; then :
6478 :
6479else
6480 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6481/* end confdefs.h. */
6482#include <ctype.h>
6483#include <stdlib.h>
6484#if ((' ' & 0x0FF) == 0x020)
6485# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6486# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6487#else
6488# define ISLOWER(c) \
6489 (('a' <= (c) && (c) <= 'i') \
6490 || ('j' <= (c) && (c) <= 'r') \
6491 || ('s' <= (c) && (c) <= 'z'))
6492# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6493#endif
6494
6495#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6496int
6497main ()
6498{
6499 int i;
6500 for (i = 0; i < 256; i++)
6501 if (XOR (islower (i), ISLOWER (i))
6502 || toupper (i) != TOUPPER (i))
6503 return 2;
6504 return 0;
6505}
6506_ACEOF
6507if ac_fn_c_try_run "$LINENO"; then :
6508
6509else
6510 ac_cv_header_stdc=no
6511fi
6512rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6513 conftest.$ac_objext conftest.beam conftest.$ac_ext
6514fi
6515
6516fi
6517fi
6518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6519$as_echo "$ac_cv_header_stdc" >&6; }
6520if test $ac_cv_header_stdc = yes; then
6521
6522$as_echo "#define STDC_HEADERS 1" >>confdefs.h
6523
6524fi
6525
6526# On IRIX 5.3, sys/types and inttypes.h are conflicting.
6527for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
6528 inttypes.h stdint.h unistd.h
6529do :
6530 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6531ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
6532"
a9bec17c
GM
6533eval as_val=\$$as_ac_Header
6534 if test "x$as_val" = x""yes; then :
067d23c9
KY
6535 cat >>confdefs.h <<_ACEOF
6536#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6537_ACEOF
6538
6539fi
6540
6541done
6542
6543
6544
6545 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
a9bec17c 6546if test "x$ac_cv_header_minix_config_h" = x""yes; then :
067d23c9
KY
6547 MINIX=yes
6548else
6549 MINIX=
6550fi
6551
6552
6553 if test "$MINIX" = yes; then
6554
6555$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
6556
6557
6558$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
6559
6560
6561$as_echo "#define _MINIX 1" >>confdefs.h
6562
1fd182f0 6563
2cdd55fc 6564$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
1fd182f0 6565
2cdd55fc 6566 fi
1fd182f0 6567
067d23c9
KY
6568
6569 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
6570$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
a9bec17c 6571if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
067d23c9
KY
6572 $as_echo_n "(cached) " >&6
6573else
6574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6575/* end confdefs.h. */
369e19fc
PE
6576
6577# define __EXTENSIONS__ 1
6578 $ac_includes_default
6579int
6580main ()
6581{
6582
6583 ;
6584 return 0;
6585}
6586_ACEOF
6587if ac_fn_c_try_compile "$LINENO"; then :
6588 ac_cv_safe_to_define___extensions__=yes
6589else
6590 ac_cv_safe_to_define___extensions__=no
6591fi
6592rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6593fi
6594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
6595$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
6596 test $ac_cv_safe_to_define___extensions__ = yes &&
6597 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
6598
6599 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
6600
6601 $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
6602
6603 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
6604
6605 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
6606
6607 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
6608
2cdd55fc
GM
6609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
6610$as_echo_n "checking whether _XOPEN_SOURCE should be defined... " >&6; }
6611if test "${ac_cv_should_define__xopen_source+set}" = set; then :
6612 $as_echo_n "(cached) " >&6
6613else
6614 ac_cv_should_define__xopen_source=no
6615 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6616/* end confdefs.h. */
6617
6618 #include <wchar.h>
6619 mbstate_t x;
6620int
6621main ()
6622{
6623
6624 ;
6625 return 0;
6626}
6627_ACEOF
6628if ac_fn_c_try_compile "$LINENO"; then :
6629
6630else
6631 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6632/* end confdefs.h. */
6633
6634 #define _XOPEN_SOURCE 500
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 ac_cv_should_define__xopen_source=yes
6647fi
6648rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6649fi
6650rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6651fi
6652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
6653$as_echo "$ac_cv_should_define__xopen_source" >&6; }
6654 test $ac_cv_should_define__xopen_source = yes &&
6655 $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
6656
369e19fc
PE
6657
6658
6659
6660
6661
6662
6663
6664# Check whether --enable-largefile was given.
6665if test "${enable_largefile+set}" = set; then :
6666 enableval=$enable_largefile;
6667fi
6668
6669if test "$enable_largefile" != no; then
6670
6671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
6672$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
a9bec17c 6673if test "${ac_cv_sys_largefile_CC+set}" = set; then :
369e19fc
PE
6674 $as_echo_n "(cached) " >&6
6675else
6676 ac_cv_sys_largefile_CC=no
6677 if test "$GCC" != yes; then
6678 ac_save_CC=$CC
6679 while :; do
6680 # IRIX 6.2 and later do not support large files by default,
6681 # so use the C compiler's -n32 option if that helps.
6682 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6683/* end confdefs.h. */
6684#include <sys/types.h>
6685 /* Check that off_t can represent 2**63 - 1 correctly.
6686 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6687 since some C++ compilers masquerading as C compilers
6688 incorrectly reject 9223372036854775807. */
6689#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6690 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6691 && LARGE_OFF_T % 2147483647 == 1)
6692 ? 1 : -1];
6693int
6694main ()
6695{
6696
6697 ;
6698 return 0;
6699}
6700_ACEOF
6701 if ac_fn_c_try_compile "$LINENO"; then :
6702 break
6703fi
6704rm -f core conftest.err conftest.$ac_objext
6705 CC="$CC -n32"
6706 if ac_fn_c_try_compile "$LINENO"; then :
6707 ac_cv_sys_largefile_CC=' -n32'; break
6708fi
6709rm -f core conftest.err conftest.$ac_objext
6710 break
6711 done
6712 CC=$ac_save_CC
6713 rm -f conftest.$ac_ext
6714 fi
6715fi
6716{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
6717$as_echo "$ac_cv_sys_largefile_CC" >&6; }
6718 if test "$ac_cv_sys_largefile_CC" != no; then
6719 CC=$CC$ac_cv_sys_largefile_CC
6720 fi
6721
6722 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
6723$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
a9bec17c 6724if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
369e19fc
PE
6725 $as_echo_n "(cached) " >&6
6726else
6727 while :; do
6728 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6729/* end confdefs.h. */
6730#include <sys/types.h>
6731 /* Check that off_t can represent 2**63 - 1 correctly.
6732 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6733 since some C++ compilers masquerading as C compilers
6734 incorrectly reject 9223372036854775807. */
6735#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6736 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6737 && LARGE_OFF_T % 2147483647 == 1)
6738 ? 1 : -1];
6739int
6740main ()
6741{
6742
6743 ;
6744 return 0;
6745}
6746_ACEOF
6747if ac_fn_c_try_compile "$LINENO"; then :
6748 ac_cv_sys_file_offset_bits=no; break
6749fi
6750rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6752/* end confdefs.h. */
6753#define _FILE_OFFSET_BITS 64
6754#include <sys/types.h>
6755 /* Check that off_t can represent 2**63 - 1 correctly.
6756 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6757 since some C++ compilers masquerading as C compilers
6758 incorrectly reject 9223372036854775807. */
6759#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6760 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6761 && LARGE_OFF_T % 2147483647 == 1)
6762 ? 1 : -1];
6763int
6764main ()
6765{
6766
6767 ;
6768 return 0;
6769}
6770_ACEOF
6771if ac_fn_c_try_compile "$LINENO"; then :
6772 ac_cv_sys_file_offset_bits=64; break
6773fi
6774rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6775 ac_cv_sys_file_offset_bits=unknown
6776 break
6777done
6778fi
6779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
6780$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
6781case $ac_cv_sys_file_offset_bits in #(
6782 no | unknown) ;;
6783 *)
6784cat >>confdefs.h <<_ACEOF
6785#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
6786_ACEOF
6787;;
6788esac
6789rm -rf conftest*
6790 if test $ac_cv_sys_file_offset_bits = unknown; then
6791 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
6792$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
a9bec17c 6793if test "${ac_cv_sys_large_files+set}" = set; then :
369e19fc
PE
6794 $as_echo_n "(cached) " >&6
6795else
6796 while :; do
6797 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6798/* end confdefs.h. */
6799#include <sys/types.h>
6800 /* Check that off_t can represent 2**63 - 1 correctly.
6801 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6802 since some C++ compilers masquerading as C compilers
6803 incorrectly reject 9223372036854775807. */
6804#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6805 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6806 && LARGE_OFF_T % 2147483647 == 1)
6807 ? 1 : -1];
6808int
6809main ()
6810{
6811
6812 ;
6813 return 0;
6814}
6815_ACEOF
6816if ac_fn_c_try_compile "$LINENO"; then :
6817 ac_cv_sys_large_files=no; break
6818fi
6819rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6821/* end confdefs.h. */
6822#define _LARGE_FILES 1
6823#include <sys/types.h>
6824 /* Check that off_t can represent 2**63 - 1 correctly.
6825 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6826 since some C++ compilers masquerading as C compilers
6827 incorrectly reject 9223372036854775807. */
6828#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6829 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6830 && LARGE_OFF_T % 2147483647 == 1)
6831 ? 1 : -1];
067d23c9
KY
6832int
6833main ()
6834{
6835
6836 ;
6837 return 0;
6838}
6839_ACEOF
6840if ac_fn_c_try_compile "$LINENO"; then :
369e19fc 6841 ac_cv_sys_large_files=1; break
067d23c9
KY
6842fi
6843rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
369e19fc
PE
6844 ac_cv_sys_large_files=unknown
6845 break
6846done
067d23c9 6847fi
369e19fc
PE
6848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
6849$as_echo "$ac_cv_sys_large_files" >&6; }
6850case $ac_cv_sys_large_files in #(
6851 no | unknown) ;;
6852 *)
6853cat >>confdefs.h <<_ACEOF
6854#define _LARGE_FILES $ac_cv_sys_large_files
6855_ACEOF
6856;;
6857esac
6858rm -rf conftest*
6859 fi
1fd182f0
PE
6860
6861
858c7150
GM
6862$as_echo "#define _DARWIN_USE_64_BIT_INODE 1" >>confdefs.h
6863
369e19fc 6864fi
1fd182f0 6865
6d153f56
GM
6866 case $ac_cv_prog_cc_stdc in #(
6867 no) :
6868 ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; #(
6869 *) :
6870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
6871$as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
a9bec17c 6872if test "${ac_cv_prog_cc_c99+set}" = set; then :
6d153f56
GM
6873 $as_echo_n "(cached) " >&6
6874else
6875 ac_cv_prog_cc_c99=no
6876ac_save_CC=$CC
6877cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6878/* end confdefs.h. */
6879#include <stdarg.h>
6880#include <stdbool.h>
6881#include <stdlib.h>
6882#include <wchar.h>
6883#include <stdio.h>
6884
6885// Check varargs macros. These examples are taken from C99 6.10.3.5.
6886#define debug(...) fprintf (stderr, __VA_ARGS__)
6887#define showlist(...) puts (#__VA_ARGS__)
6888#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
6889static void
6890test_varargs_macros (void)
6891{
6892 int x = 1234;
6893 int y = 5678;
6894 debug ("Flag");
6895 debug ("X = %d\n", x);
6896 showlist (The first, second, and third items.);
6897 report (x>y, "x is %d but y is %d", x, y);
6898}
6899
6900// Check long long types.
6901#define BIG64 18446744073709551615ull
6902#define BIG32 4294967295ul
6903#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
6904#if !BIG_OK
6905 your preprocessor is broken;
6906#endif
6907#if BIG_OK
6908#else
6909 your preprocessor is broken;
6910#endif
6911static long long int bignum = -9223372036854775807LL;
6912static unsigned long long int ubignum = BIG64;
6913
6914struct incomplete_array
6915{
6916 int datasize;
6917 double data[];
6918};
6919
6920struct named_init {
6921 int number;
6922 const wchar_t *name;
6923 double average;
6924};
6925
6926typedef const char *ccp;
6927
6928static inline int
6929test_restrict (ccp restrict text)
6930{
6931 // See if C++-style comments work.
6932 // Iterate through items via the restricted pointer.
6933 // Also check for declarations in for loops.
6934 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
6935 continue;
6936 return 0;
6937}
6938
6939// Check varargs and va_copy.
6940static void
6941test_varargs (const char *format, ...)
6942{
6943 va_list args;
6944 va_start (args, format);
6945 va_list args_copy;
6946 va_copy (args_copy, args);
6947
6948 const char *str;
6949 int number;
6950 float fnumber;
6951
6952 while (*format)
6953 {
6954 switch (*format++)
6955 {
6956 case 's': // string
6957 str = va_arg (args_copy, const char *);
6958 break;
6959 case 'd': // int
6960 number = va_arg (args_copy, int);
6961 break;
6962 case 'f': // float
6963 fnumber = va_arg (args_copy, double);
6964 break;
6965 default:
6966 break;
6967 }
6968 }
6969 va_end (args_copy);
6970 va_end (args);
6971}
6972
6973int
6974main ()
6975{
6976
6977 // Check bool.
6978 _Bool success = false;
6979
6980 // Check restrict.
6981 if (test_restrict ("String literal") == 0)
6982 success = true;
6983 char *restrict newvar = "Another string";
6984
6985 // Check varargs.
6986 test_varargs ("s, d' f .", "string", 65, 34.234);
6987 test_varargs_macros ();
6988
6989 // Check flexible array members.
6990 struct incomplete_array *ia =
6991 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
6992 ia->datasize = 10;
6993 for (int i = 0; i < ia->datasize; ++i)
6994 ia->data[i] = i * 1.234;
6995
6996 // Check named initializers.
6997 struct named_init ni = {
6998 .number = 34,
6999 .name = L"Test wide string",
7000 .average = 543.34343,
7001 };
7002
7003 ni.number = 58;
7004
7005 int dynamic_array[ni.number];
7006 dynamic_array[ni.number - 1] = 543;
7007
7008 // work around unused variable warnings
7009 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
7010 || dynamic_array[ni.number - 1] != 543);
7011
7012 ;
7013 return 0;
7014}
7015_ACEOF
7016for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99
7017do
7018 CC="$ac_save_CC $ac_arg"
7019 if ac_fn_c_try_compile "$LINENO"; then :
7020 ac_cv_prog_cc_c99=$ac_arg
7021fi
7022rm -f core conftest.err conftest.$ac_objext
7023 test "x$ac_cv_prog_cc_c99" != "xno" && break
7024done
7025rm -f conftest.$ac_ext
7026CC=$ac_save_CC
7027
7028fi
7029# AC_CACHE_VAL
7030case "x$ac_cv_prog_cc_c99" in
7031 x)
7032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
7033$as_echo "none needed" >&6; } ;;
7034 xno)
7035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
7036$as_echo "unsupported" >&6; } ;;
7037 *)
7038 CC="$CC $ac_cv_prog_cc_c99"
7039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
7040$as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
7041esac
7042if test "x$ac_cv_prog_cc_c99" != xno; then :
7043 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
7044else
7045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
7046$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
a9bec17c 7047if test "${ac_cv_prog_cc_c89+set}" = set; then :
6d153f56
GM
7048 $as_echo_n "(cached) " >&6
7049else
7050 ac_cv_prog_cc_c89=no
7051ac_save_CC=$CC
7052cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7053/* end confdefs.h. */
7054#include <stdarg.h>
7055#include <stdio.h>
7056#include <sys/types.h>
7057#include <sys/stat.h>
7058/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
7059struct buf { int x; };
7060FILE * (*rcsopen) (struct buf *, struct stat *, int);
7061static char *e (p, i)
7062 char **p;
7063 int i;
7064{
7065 return p[i];
7066}
7067static char *f (char * (*g) (char **, int), char **p, ...)
7068{
7069 char *s;
7070 va_list v;
7071 va_start (v,p);
7072 s = g (p, va_arg (v,int));
7073 va_end (v);
7074 return s;
7075}
7076
7077/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
7078 function prototypes and stuff, but not '\xHH' hex character constants.
7079 These don't provoke an error unfortunately, instead are silently treated
7080 as 'x'. The following induces an error, until -std is added to get
7081 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
7082 array size at least. It's necessary to write '\x00'==0 to get something
7083 that's true only with -std. */
7084int osf4_cc_array ['\x00' == 0 ? 1 : -1];
7085
7086/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
7087 inside strings and character constants. */
7088#define FOO(x) 'x'
7089int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
7090
7091int test (int i, double x);
7092struct s1 {int (*f) (int a);};
7093struct s2 {int (*f) (double a);};
7094int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
7095int argc;
7096char **argv;
7097int
7098main ()
7099{
7100return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
7101 ;
7102 return 0;
7103}
7104_ACEOF
7105for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
7106 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
7107do
7108 CC="$ac_save_CC $ac_arg"
7109 if ac_fn_c_try_compile "$LINENO"; then :
7110 ac_cv_prog_cc_c89=$ac_arg
7111fi
7112rm -f core conftest.err conftest.$ac_objext
7113 test "x$ac_cv_prog_cc_c89" != "xno" && break
7114done
7115rm -f conftest.$ac_ext
7116CC=$ac_save_CC
7117
7118fi
7119# AC_CACHE_VAL
7120case "x$ac_cv_prog_cc_c89" in
7121 x)
7122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
7123$as_echo "none needed" >&6; } ;;
7124 xno)
7125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
7126$as_echo "unsupported" >&6; } ;;
7127 *)
7128 CC="$CC $ac_cv_prog_cc_c89"
7129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
7130$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
7131esac
7132if test "x$ac_cv_prog_cc_c89" != xno; then :
7133 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
7134else
7135 ac_cv_prog_cc_stdc=no
7136fi
7137
7138fi
7139 ;;
7140esac
7141 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5
7142$as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; }
a9bec17c 7143 if test "${ac_cv_prog_cc_stdc+set}" = set; then :
6d153f56
GM
7144 $as_echo_n "(cached) " >&6
7145fi
7146
7147 case $ac_cv_prog_cc_stdc in #(
7148 no) :
7149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
7150$as_echo "unsupported" >&6; } ;; #(
7151 '') :
7152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
7153$as_echo "none needed" >&6; } ;; #(
7154 *) :
7155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_stdc" >&5
7156$as_echo "$ac_cv_prog_cc_stdc" >&6; } ;;
7157esac
7158
1fd182f0
PE
7159
7160
4fc2b746 7161 # Code from module alloca-opt:
8d8af66d 7162 # Code from module allocator:
d7ad186c 7163 # Code from module at-internal:
938a4ef9
GM
7164 # Code from module c-ctype:
7165 # Code from module c-strcase:
6c051bab 7166 # Code from module careadlinkat:
f199cab1 7167 # Code from module clock-time:
3bf26e96 7168 # Code from module close-stream:
942f733f 7169 # Code from module crypto/md5:
40e27e7f 7170 # Code from module crypto/sha1:
d87ffdb7
GM
7171 # Code from module crypto/sha256:
7172 # Code from module crypto/sha512:
d7ad186c 7173 # Code from module dirent:
36f13e16 7174 # Code from module dosname:
f737437b 7175 # Code from module dtoastr:
f199cab1 7176 # Code from module dtotimespec:
7d2a1c5e 7177 # Code from module dup2:
93131e11 7178 # Code from module environ:
710f5812 7179 # Code from module euidaccess:
8966cbff 7180 # Code from module execinfo:
1fd182f0
PE
7181 # Code from module extensions:
7182
7cd2ed2c 7183 # Code from module extern-inline:
710f5812
GM
7184 # Code from module faccessat:
7185 # Code from module fcntl-h:
2407788f 7186 # Code from module fdatasync:
d7ad186c 7187 # Code from module fdopendir:
5fa4ac76 7188 # Code from module filemode:
3bf26e96 7189 # Code from module fpending:
d7ad186c 7190 # Code from module fstatat:
2407788f 7191 # Code from module fsync:
710f5812 7192 # Code from module getgroups:
1f5d53eb 7193 # Code from module getloadavg:
e275c824
PE
7194 # Code from module getopt-gnu:
7195 # Code from module getopt-posix:
7196 # Code from module gettext-h:
f199cab1
GM
7197 # Code from module gettime:
7198 # Code from module gettimeofday:
710f5812 7199 # Code from module group-member:
67342916 7200 # Code from module ignore-value:
1fd182f0
PE
7201 # Code from module include_next:
7202 # Code from module intprops:
4fda9c95 7203 # Code from module inttypes-incomplete:
369e19fc
PE
7204 # Code from module largefile:
7205
ae0d7250 7206 # Code from module lstat:
ac1ca7e9 7207 # Code from module manywarnings:
283c7aed 7208 # Code from module memrchr:
1fd182f0
PE
7209 # Code from module mktime:
7210 # Code from module multiarch:
369e19fc 7211 # Code from module nocrash:
d7ad186c 7212 # Code from module openat-h:
a0a61e58 7213 # Code from module pathmax:
f199cab1 7214 # Code from module pselect:
3e0be4ab 7215 # Code from module pthread_sigmask:
b5591ebb 7216 # Code from module putenv:
ae0d7250 7217 # Code from module readlink:
d7ad186c 7218 # Code from module readlinkat:
710f5812 7219 # Code from module root-uid:
e4184a20 7220 # Code from module sig2str:
2b1928b8 7221 # Code from module signal-h:
369e19fc
PE
7222 # Code from module snippet/_Noreturn:
7223 # Code from module snippet/arg-nonnull:
7224 # Code from module snippet/c++defs:
7225 # Code from module snippet/warn-on-use:
6ad6792b 7226 # Code from module socklen:
6c051bab 7227 # Code from module ssize_t:
ae0d7250 7228 # Code from module stat:
f199cab1 7229 # Code from module stat-time:
0eb775a3 7230 # Code from module stdalign:
6d153f56
GM
7231 # Code from module stdarg:
7232
8c069cc7
GM
7233
7234
16c3e636 7235 # Code from module stdbool:
1fd182f0 7236 # Code from module stddef:
5f90be1b 7237 # Code from module stdint:
6ad6792b 7238 # Code from module stdio:
1f5d53eb 7239 # Code from module stdlib:
16c3e636 7240 # Code from module strftime:
283c7aed 7241 # Code from module string:
3e0be4ab
GM
7242 # Code from module strtoimax:
7243 # Code from module strtoll:
4fda9c95
GM
7244 # Code from module strtoull:
7245 # Code from module strtoumax:
ae0d7250 7246 # Code from module symlink:
f199cab1 7247 # Code from module sys_select:
5fa4ac76 7248 # Code from module sys_stat:
f199cab1 7249 # Code from module sys_time:
1fd182f0
PE
7250 # Code from module time:
7251 # Code from module time_r:
f077f61d 7252 # Code from module timer-time:
f199cab1
GM
7253 # Code from module timespec:
7254 # Code from module timespec-add:
7255 # Code from module timespec-sub:
d87ffdb7 7256 # Code from module u64:
e275c824 7257 # Code from module unistd:
b5591ebb 7258 # Code from module unsetenv:
f199cab1 7259 # Code from module utimens:
4fda9c95 7260 # Code from module verify:
ac1ca7e9 7261 # Code from module warnings:
710f5812 7262 # Code from module xalloc-oversized:
1fd182f0
PE
7263
7264
6bd1cda5
GM
7265# It's helpful to have C macros available to GDB, so prefer -g3 to -g
7266# if -g3 works and the user does not specify CFLAGS.
7267# This test must follow gl_EARLY; otherwise AC_LINK_IFELSE complains.
7268if test "$ac_test_CFLAGS" != set; then
7269 case $CFLAGS in
7270 '-g')
7271 emacs_g3_CFLAGS='-g3';;
7272 '-g -O2')
7273 emacs_g3_CFLAGS='-g3 -O2';;
7274 *)
7275 emacs_g3_CFLAGS='';;
7276 esac
7277 if test -n "$emacs_g3_CFLAGS"; then
7278 emacs_save_CFLAGS=$CFLAGS
7279 CFLAGS=$emacs_g3_CFLAGS
7280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts $emacs_g3_CFLAGS" >&5
7281$as_echo_n "checking whether $CC accepts $emacs_g3_CFLAGS... " >&6; }
7282if test "${emacs_cv_prog_cc_g3+set}" = set; then :
7283 $as_echo_n "(cached) " >&6
7284else
7285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7286/* end confdefs.h. */
7287
7288int
7289main ()
7290{
7291
7292 ;
7293 return 0;
7294}
7295_ACEOF
7296if ac_fn_c_try_link "$LINENO"; then :
7297 emacs_cv_prog_cc_g3=yes
7298else
7299 emacs_cv_prog_cc_g3=no
7300fi
7301rm -f core conftest.err conftest.$ac_objext \
7302 conftest$ac_exeext conftest.$ac_ext
7303fi
7304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_prog_cc_g3" >&5
7305$as_echo "$emacs_cv_prog_cc_g3" >&6; }
7306 if test $emacs_cv_prog_cc_g3 = yes; then
7307 CFLAGS=$emacs_g3_CFLAGS
7308 else
7309 CFLAGS=$emacs_save_CFLAGS
7310 fi
7311 fi
7312fi
7313
a6b92a4a
GM
7314# Check whether --enable-gcc-warnings was given.
7315if test "${enable_gcc_warnings+set}" = set; then :
7316 enableval=$enable_gcc_warnings; case $enableval in
7317 yes|no) ;;
7318 *) as_fn_error "bad value $enableval for gcc-warnings option" "$LINENO" 5 ;;
7319 esac
7320 gl_gcc_warnings=$enableval
7321else
7322 gl_gcc_warnings=no
7323
7324fi
7325
7326
e4d35030
GM
7327# Check whether --enable-link-time-optimization was given.
7328if test "${enable_link_time_optimization+set}" = set; then :
7329 enableval=$enable_link_time_optimization; if test "${enableval}" != "no"; then
7330 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether link-time optimization is supported" >&5
7331$as_echo_n "checking whether link-time optimization is supported... " >&6; }
7332 ac_lto_supported=no
7333 if test x$GCC = xyes; then
7334 CPUS=`getconf _NPROCESSORS_ONLN 2>/dev/null`
7335 if test x$CPUS != x; then
7336 LTO="-flto=$CPUS"
7337 else
7338 LTO="-flto"
7339 fi
7340 old_CFLAGS=$CFLAGS
7341 CFLAGS="$CFLAGS $LTO"
7342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7343/* end confdefs.h. */
7344
7345int
7346main ()
7347{
7348
7349 ;
7350 return 0;
7351}
7352_ACEOF
7353if ac_fn_c_try_compile "$LINENO"; then :
7354 ac_lto_supported=yes
7355else
7356 ac_lto_supported=no
7357fi
7358rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7359 CFLAGS="$old_CFLAGS"
7360 fi
7361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_lto_supported" >&5
7362$as_echo "$ac_lto_supported" >&6; }
7363 if test "$ac_lto_supported" = "yes"; then
7364 CFLAGS="$CFLAGS $LTO"
7365 fi
7366fi
7367fi
7368
7369
a6b92a4a
GM
7370# gl_GCC_VERSION_IFELSE([major], [minor], [run-if-found], [run-if-not-found])
7371# ------------------------------------------------
7372# If $CPP is gcc-MAJOR.MINOR or newer, then run RUN-IF-FOUND.
7373# Otherwise, run RUN-IF-NOT-FOUND.
7374
7375
7376# When compiling with GCC, prefer -isystem to -I when including system
7377# include files, to avoid generating useless diagnostics for the files.
7378if test "$gl_gcc_warnings" != yes; then
7379 isystem='-I'
7380else
7381 isystem='-isystem '
7382
7383 # This, $nw, is the list of warnings we disable.
7384 nw=
7385
7386 case $with_x_toolkit in
7387 lucid | athena | motif)
7388 # Old toolkits mishandle 'const'.
7389 nw="$nw -Wwrite-strings"
7390 ;;
7391 *)
7392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror" >&5
7393$as_echo_n "checking whether C compiler handles -Werror... " >&6; }
7394if test "${gl_cv_warn_c__Werror+set}" = set; then :
7395 $as_echo_n "(cached) " >&6
7396else
7397
7398 gl_save_compiler_FLAGS="$CFLAGS"
0eb775a3 7399 as_fn_append CFLAGS " -Werror"
a6b92a4a 7400 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
7401/* end confdefs.h. */
7402
7403int
7404main ()
7405{
7406
7407 ;
7408 return 0;
7409}
7410_ACEOF
7411if ac_fn_c_try_compile "$LINENO"; then :
a6b92a4a 7412 gl_cv_warn_c__Werror=yes
067d23c9 7413else
a6b92a4a 7414 gl_cv_warn_c__Werror=no
067d23c9
KY
7415fi
7416rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a6b92a4a
GM
7417 CFLAGS="$gl_save_compiler_FLAGS"
7418
7419fi
7420{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror" >&5
7421$as_echo "$gl_cv_warn_c__Werror" >&6; }
7422if test "x$gl_cv_warn_c__Werror" = x""yes; then :
7423 as_fn_append WERROR_CFLAGS " -Werror"
7424fi
7425
0eb775a3 7426
a6b92a4a
GM
7427 ;;
7428 esac
7429
7430
7431 nw="$nw -Waggregate-return" # anachronistic
ca0294bb 7432 nw="$nw -Wlong-long" # C90 is anachronistic
a6b92a4a
GM
7433 nw="$nw -Wc++-compat" # We don't care about C++ compilers
7434 nw="$nw -Wundef" # Warns on '#if GNULIB_FOO' etc in gnulib
7435 nw="$nw -Wtraditional" # Warns on #elif which we use often
7436 nw="$nw -Wcast-qual" # Too many warnings for now
7437 nw="$nw -Wconversion" # Too many warnings for now
7438 nw="$nw -Wsystem-headers" # Don't let system headers trigger warnings
7439 nw="$nw -Wsign-conversion" # Too many warnings for now
7440 nw="$nw -Woverlength-strings" # Not a problem these days
7441 nw="$nw -Wtraditional-conversion" # Too many warnings for now
fd9d2a9d 7442 nw="$nw -Wunreachable-code" # so buggy that it's now silently ignored
a6b92a4a 7443 nw="$nw -Wpadded" # Our structs are not padded
fd9d2a9d 7444 nw="$nw -Wredundant-decls" # we regularly (re)declare functions
a6b92a4a 7445 nw="$nw -Wlogical-op" # any use of fwrite provokes this
fd9d2a9d 7446 nw="$nw -Wformat-nonliteral" # we do this a lot
a6b92a4a
GM
7447 nw="$nw -Wvla" # warnings in gettext.h
7448 nw="$nw -Wnested-externs" # use of XARGMATCH/verify_function__
7449 nw="$nw -Wswitch-enum" # Too many warnings for now
7450 nw="$nw -Wswitch-default" # Too many warnings for now
fd9d2a9d
GM
7451 nw="$nw -Wfloat-equal" # warns about high-quality code
7452 nw="$nw -Winline" # OK to ignore 'inline'
6ec9a5a7 7453 nw="$nw -Wjump-misses-init" # We sometimes safely jump over init.
da8ed5ba
GM
7454 nw="$nw -Wstrict-overflow" # OK to optimize assuming that
7455 # signed overflow has undefined behavior
fd9d2a9d
GM
7456 nw="$nw -Wsync-nand" # irrelevant here, and provokes ObjC warning
7457 nw="$nw -Wunsafe-loop-optimizations" # OK to suppress unsafe optimizations
a6b92a4a
GM
7458
7459 # Emacs doesn't care about shadowing; see
7460 # <http://lists.gnu.org/archive/html/emacs-diffs/2011-11/msg00265.html>.
7461 nw="$nw -Wshadow"
7462
ad33cb00
GM
7463 # Emacs's use of alloca inhibits protecting the stack.
7464 nw="$nw -Wstack-protector"
7465
da8ed5ba 7466 # The following line should be removable at some point.
a6b92a4a
GM
7467 nw="$nw -Wsuggest-attribute=pure"
7468
7469
7470
7471 if test -n "$GCC"; then
7472
7473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is supported" >&5
7474$as_echo_n "checking whether -Wno-missing-field-initializers is supported... " >&6; }
7475 if test "${gl_cv_cc_nomfi_supported+set}" = set; then :
7476 $as_echo_n "(cached) " >&6
7477else
7478
7479 gl_save_CFLAGS="$CFLAGS"
7480 CFLAGS="$CFLAGS -W -Werror -Wno-missing-field-initializers"
7481 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
7482/* end confdefs.h. */
7483
7484int
7485main ()
7486{
7487
7488 ;
7489 return 0;
7490}
7491_ACEOF
7492if ac_fn_c_try_compile "$LINENO"; then :
a6b92a4a 7493 gl_cv_cc_nomfi_supported=yes
067d23c9 7494else
a6b92a4a 7495 gl_cv_cc_nomfi_supported=no
067d23c9
KY
7496fi
7497rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a6b92a4a
GM
7498 CFLAGS="$gl_save_CFLAGS"
7499fi
7500
7501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_supported" >&5
7502$as_echo "$gl_cv_cc_nomfi_supported" >&6; }
7503
7504 if test "$gl_cv_cc_nomfi_supported" = yes; then
7505 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is needed" >&5
7506$as_echo_n "checking whether -Wno-missing-field-initializers is needed... " >&6; }
7507 if test "${gl_cv_cc_nomfi_needed+set}" = set; then :
7508 $as_echo_n "(cached) " >&6
7509else
7510
7511 gl_save_CFLAGS="$CFLAGS"
7512 CFLAGS="$CFLAGS -W -Werror"
7513 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7514/* end confdefs.h. */
7515void f (void)
7516 {
7517 typedef struct { int a; int b; } s_t;
7518 s_t s1 = { 0, };
7519 }
7520
7521int
7522main ()
7523{
7524
7525 ;
7526 return 0;
7527}
7528_ACEOF
7529if ac_fn_c_try_compile "$LINENO"; then :
7530 gl_cv_cc_nomfi_needed=no
7531else
7532 gl_cv_cc_nomfi_needed=yes
7533fi
7534rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7535 CFLAGS="$gl_save_CFLAGS"
7536
7537fi
7538
7539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_needed" >&5
7540$as_echo "$gl_cv_cc_nomfi_needed" >&6; }
7541 fi
b6c9d18d
GM
7542
7543 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wuninitialized is supported" >&5
7544$as_echo_n "checking whether -Wuninitialized is supported... " >&6; }
7545 if test "${gl_cv_cc_uninitialized_supported+set}" = set; then :
7546 $as_echo_n "(cached) " >&6
7547else
7548
7549 gl_save_CFLAGS="$CFLAGS"
7550 CFLAGS="$CFLAGS -Werror -Wuninitialized"
7551 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7552/* end confdefs.h. */
7553
7554int
7555main ()
7556{
7557
7558 ;
7559 return 0;
7560}
7561_ACEOF
7562if ac_fn_c_try_compile "$LINENO"; then :
7563 gl_cv_cc_uninitialized_supported=yes
7564else
7565 gl_cv_cc_uninitialized_supported=no
7566fi
7567rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7568 CFLAGS="$gl_save_CFLAGS"
7569fi
7570
7571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_uninitialized_supported" >&5
7572$as_echo "$gl_cv_cc_uninitialized_supported" >&6; }
7573
a6b92a4a
GM
7574 fi
7575
b6c9d18d 7576 # List all gcc warning categories.
a6b92a4a
GM
7577 gl_manywarn_set=
7578 for gl_manywarn_item in \
a6b92a4a 7579 -W \
dcde497f
GM
7580 -Wabi \
7581 -Waddress \
7582 -Wall \
7583 -Warray-bounds \
7584 -Wattributes \
a6b92a4a 7585 -Wbad-function-cast \
a6b92a4a 7586 -Wbuiltin-macro-redefined \
dcde497f
GM
7587 -Wcast-align \
7588 -Wchar-subscripts \
7589 -Wclobbered \
7590 -Wcomment \
7591 -Wcomments \
a6b92a4a 7592 -Wcoverage-mismatch \
a6b92a4a
GM
7593 -Wcpp \
7594 -Wdeprecated \
7595 -Wdeprecated-declarations \
dcde497f 7596 -Wdisabled-optimization \
a6b92a4a
GM
7597 -Wdiv-by-zero \
7598 -Wdouble-promotion \
dcde497f 7599 -Wempty-body \
a6b92a4a 7600 -Wendif-labels \
dcde497f 7601 -Wenum-compare \
a6b92a4a
GM
7602 -Wextra \
7603 -Wformat-contains-nul \
7604 -Wformat-extra-args \
dcde497f
GM
7605 -Wformat-nonliteral \
7606 -Wformat-security \
7607 -Wformat-y2k \
a6b92a4a
GM
7608 -Wformat-zero-length \
7609 -Wformat=2 \
dcde497f
GM
7610 -Wfree-nonheap-object \
7611 -Wignored-qualifiers \
7612 -Wimplicit \
7613 -Wimplicit-function-declaration \
7614 -Wimplicit-int \
7615 -Winit-self \
7616 -Winline \
7617 -Wint-to-pointer-cast \
7618 -Winvalid-memory-model \
7619 -Winvalid-pch \
7620 -Wjump-misses-init \
7621 -Wlogical-op \
7622 -Wmain \
7623 -Wmaybe-uninitialized \
7624 -Wmissing-braces \
7625 -Wmissing-declarations \
7626 -Wmissing-field-initializers \
7627 -Wmissing-format-attribute \
7628 -Wmissing-include-dirs \
7629 -Wmissing-noreturn \
7630 -Wmissing-parameter-type \
7631 -Wmissing-prototypes \
7632 -Wmudflap \
a6b92a4a 7633 -Wmultichar \
dcde497f
GM
7634 -Wnarrowing \
7635 -Wnested-externs \
7636 -Wnonnull \
a6b92a4a 7637 -Wnormalized=nfc \
dcde497f
GM
7638 -Wold-style-declaration \
7639 -Wold-style-definition \
a6b92a4a 7640 -Woverflow \
dcde497f
GM
7641 -Woverlength-strings \
7642 -Woverride-init \
7643 -Wpacked \
7644 -Wpacked-bitfield-compat \
7645 -Wparentheses \
7646 -Wpointer-arith \
7647 -Wpointer-sign \
a6b92a4a
GM
7648 -Wpointer-to-int-cast \
7649 -Wpragmas \
dcde497f
GM
7650 -Wreturn-type \
7651 -Wsequence-point \
7652 -Wshadow \
7653 -Wsizeof-pointer-memaccess \
7654 -Wstack-protector \
7655 -Wstrict-aliasing \
7656 -Wstrict-overflow \
7657 -Wstrict-prototypes \
a6b92a4a 7658 -Wsuggest-attribute=const \
dcde497f 7659 -Wsuggest-attribute=format \
a6b92a4a
GM
7660 -Wsuggest-attribute=noreturn \
7661 -Wsuggest-attribute=pure \
dcde497f
GM
7662 -Wswitch \
7663 -Wswitch-default \
7664 -Wsync-nand \
7665 -Wsystem-headers \
a6b92a4a 7666 -Wtrampolines \
dcde497f
GM
7667 -Wtrigraphs \
7668 -Wtype-limits \
7669 -Wuninitialized \
7670 -Wunknown-pragmas \
7671 -Wunreachable-code \
7672 -Wunsafe-loop-optimizations \
7673 -Wunused \
7674 -Wunused-but-set-parameter \
7675 -Wunused-but-set-variable \
7676 -Wunused-function \
7677 -Wunused-label \
7678 -Wunused-local-typedefs \
7679 -Wunused-macros \
7680 -Wunused-parameter \
7681 -Wunused-result \
7682 -Wunused-value \
7683 -Wunused-variable \
7684 -Wvarargs \
7685 -Wvariadic-macros \
7686 -Wvector-operation-performance \
7687 -Wvla \
7688 -Wvolatile-register-var \
7689 -Wwrite-strings \
7690 \
a6b92a4a
GM
7691 ; do
7692 gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
7693 done
7694
b6c9d18d 7695 # Disable specific options as needed.
a6b92a4a
GM
7696 if test "$gl_cv_cc_nomfi_needed" = yes; then
7697 gl_manywarn_set="$gl_manywarn_set -Wno-missing-field-initializers"
7698 fi
7699
b6c9d18d
GM
7700 if test "$gl_cv_cc_uninitialized_supported" = no; then
7701 gl_manywarn_set="$gl_manywarn_set -Wno-uninitialized"
7702 fi
7703
a6b92a4a
GM
7704 ws=$gl_manywarn_set
7705
7706
7707 gl_warn_set=
7708 set x $ws; shift
7709 for gl_warn_item
7710 do
7711 case " $nw " in
7712 *" $gl_warn_item "*)
7713 ;;
7714 *)
7715 gl_warn_set="$gl_warn_set $gl_warn_item"
7716 ;;
7717 esac
7718 done
7719 ws=$gl_warn_set
7720
7721 for w in $ws; do
7722 as_gl_Warn=`$as_echo "gl_cv_warn_c_$w" | $as_tr_sh`
7723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles $w" >&5
7724$as_echo_n "checking whether C compiler handles $w... " >&6; }
7725if { as_var=$as_gl_Warn; eval "test \"\${$as_var+set}\" = set"; }; then :
7726 $as_echo_n "(cached) " >&6
7727else
7728
7729 gl_save_compiler_FLAGS="$CFLAGS"
0eb775a3 7730 as_fn_append CFLAGS " $w"
a6b92a4a
GM
7731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7732/* end confdefs.h. */
7733
7734int
7735main ()
7736{
7737
7738 ;
7739 return 0;
7740}
7741_ACEOF
7742if ac_fn_c_try_compile "$LINENO"; then :
7743 eval "$as_gl_Warn=yes"
7744else
7745 eval "$as_gl_Warn=no"
7746fi
7747rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7748 CFLAGS="$gl_save_compiler_FLAGS"
7749
7750fi
7751eval ac_res=\$$as_gl_Warn
7752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7753$as_echo "$ac_res" >&6; }
7754eval as_val=\$$as_gl_Warn
7755 if test "x$as_val" = x""yes; then :
7756 as_fn_append WARN_CFLAGS " $w"
7757fi
7758
0eb775a3 7759
a6b92a4a
GM
7760 done
7761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-missing-field-initializers" >&5
7762$as_echo_n "checking whether C compiler handles -Wno-missing-field-initializers... " >&6; }
7763if test "${gl_cv_warn_c__Wno_missing_field_initializers+set}" = set; then :
7764 $as_echo_n "(cached) " >&6
7765else
7766
7767 gl_save_compiler_FLAGS="$CFLAGS"
0eb775a3 7768 as_fn_append CFLAGS " -Wno-missing-field-initializers"
a6b92a4a
GM
7769 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7770/* end confdefs.h. */
7771
7772int
7773main ()
7774{
7775
7776 ;
7777 return 0;
7778}
7779_ACEOF
7780if ac_fn_c_try_compile "$LINENO"; then :
7781 gl_cv_warn_c__Wno_missing_field_initializers=yes
7782else
7783 gl_cv_warn_c__Wno_missing_field_initializers=no
7784fi
7785rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7786 CFLAGS="$gl_save_compiler_FLAGS"
7787
7788fi
7789{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_missing_field_initializers" >&5
7790$as_echo "$gl_cv_warn_c__Wno_missing_field_initializers" >&6; }
7791if test "x$gl_cv_warn_c__Wno_missing_field_initializers" = x""yes; then :
7792 as_fn_append WARN_CFLAGS " -Wno-missing-field-initializers"
7793fi
0eb775a3 7794
a6b92a4a
GM
7795 # We need this one
7796 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-sign-compare" >&5
7797$as_echo_n "checking whether C compiler handles -Wno-sign-compare... " >&6; }
7798if test "${gl_cv_warn_c__Wno_sign_compare+set}" = set; then :
7799 $as_echo_n "(cached) " >&6
7800else
7801
7802 gl_save_compiler_FLAGS="$CFLAGS"
0eb775a3 7803 as_fn_append CFLAGS " -Wno-sign-compare"
a6b92a4a
GM
7804 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7805/* end confdefs.h. */
7806
7807int
7808main ()
7809{
7810
7811 ;
7812 return 0;
7813}
7814_ACEOF
7815if ac_fn_c_try_compile "$LINENO"; then :
7816 gl_cv_warn_c__Wno_sign_compare=yes
7817else
7818 gl_cv_warn_c__Wno_sign_compare=no
7819fi
7820rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7821 CFLAGS="$gl_save_compiler_FLAGS"
7822
7823fi
7824{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_sign_compare" >&5
7825$as_echo "$gl_cv_warn_c__Wno_sign_compare" >&6; }
7826if test "x$gl_cv_warn_c__Wno_sign_compare" = x""yes; then :
7827 as_fn_append WARN_CFLAGS " -Wno-sign-compare"
7828fi
0eb775a3 7829
a6b92a4a
GM
7830 # Too many warnings for now
7831 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-type-limits" >&5
7832$as_echo_n "checking whether C compiler handles -Wno-type-limits... " >&6; }
7833if test "${gl_cv_warn_c__Wno_type_limits+set}" = set; then :
7834 $as_echo_n "(cached) " >&6
7835else
7836
7837 gl_save_compiler_FLAGS="$CFLAGS"
0eb775a3 7838 as_fn_append CFLAGS " -Wno-type-limits"
a6b92a4a
GM
7839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7840/* end confdefs.h. */
7841
7842int
7843main ()
7844{
7845
7846 ;
7847 return 0;
7848}
7849_ACEOF
7850if ac_fn_c_try_compile "$LINENO"; then :
7851 gl_cv_warn_c__Wno_type_limits=yes
7852else
7853 gl_cv_warn_c__Wno_type_limits=no
7854fi
7855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7856 CFLAGS="$gl_save_compiler_FLAGS"
7857
7858fi
7859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_type_limits" >&5
7860$as_echo "$gl_cv_warn_c__Wno_type_limits" >&6; }
7861if test "x$gl_cv_warn_c__Wno_type_limits" = x""yes; then :
7862 as_fn_append WARN_CFLAGS " -Wno-type-limits"
7863fi
0eb775a3 7864
a6b92a4a
GM
7865 # Too many warnings for now
7866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-switch" >&5
7867$as_echo_n "checking whether C compiler handles -Wno-switch... " >&6; }
7868if test "${gl_cv_warn_c__Wno_switch+set}" = set; then :
7869 $as_echo_n "(cached) " >&6
7870else
7871
7872 gl_save_compiler_FLAGS="$CFLAGS"
0eb775a3 7873 as_fn_append CFLAGS " -Wno-switch"
a6b92a4a
GM
7874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7875/* end confdefs.h. */
7876
7877int
7878main ()
7879{
7880
7881 ;
7882 return 0;
7883}
7884_ACEOF
7885if ac_fn_c_try_compile "$LINENO"; then :
7886 gl_cv_warn_c__Wno_switch=yes
7887else
7888 gl_cv_warn_c__Wno_switch=no
7889fi
7890rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7891 CFLAGS="$gl_save_compiler_FLAGS"
7892
7893fi
7894{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_switch" >&5
7895$as_echo "$gl_cv_warn_c__Wno_switch" >&6; }
7896if test "x$gl_cv_warn_c__Wno_switch" = x""yes; then :
7897 as_fn_append WARN_CFLAGS " -Wno-switch"
7898fi
0eb775a3 7899
a6b92a4a
GM
7900 # Too many warnings for now
7901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-parameter" >&5
7902$as_echo_n "checking whether C compiler handles -Wno-unused-parameter... " >&6; }
7903if test "${gl_cv_warn_c__Wno_unused_parameter+set}" = set; then :
7904 $as_echo_n "(cached) " >&6
7905else
7906
7907 gl_save_compiler_FLAGS="$CFLAGS"
0eb775a3 7908 as_fn_append CFLAGS " -Wno-unused-parameter"
a6b92a4a
GM
7909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7910/* end confdefs.h. */
7911
7912int
7913main ()
7914{
7915
7916 ;
7917 return 0;
7918}
7919_ACEOF
7920if ac_fn_c_try_compile "$LINENO"; then :
7921 gl_cv_warn_c__Wno_unused_parameter=yes
7922else
7923 gl_cv_warn_c__Wno_unused_parameter=no
7924fi
7925rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7926 CFLAGS="$gl_save_compiler_FLAGS"
7927
7928fi
7929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_parameter" >&5
7930$as_echo "$gl_cv_warn_c__Wno_unused_parameter" >&6; }
7931if test "x$gl_cv_warn_c__Wno_unused_parameter" = x""yes; then :
7932 as_fn_append WARN_CFLAGS " -Wno-unused-parameter"
7933fi
0eb775a3 7934
a6b92a4a
GM
7935 # Too many warnings for now
7936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-format-nonliteral" >&5
7937$as_echo_n "checking whether C compiler handles -Wno-format-nonliteral... " >&6; }
7938if test "${gl_cv_warn_c__Wno_format_nonliteral+set}" = set; then :
7939 $as_echo_n "(cached) " >&6
7940else
7941
7942 gl_save_compiler_FLAGS="$CFLAGS"
0eb775a3 7943 as_fn_append CFLAGS " -Wno-format-nonliteral"
a6b92a4a
GM
7944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7945/* end confdefs.h. */
7946
7947int
7948main ()
7949{
7950
7951 ;
7952 return 0;
7953}
7954_ACEOF
7955if ac_fn_c_try_compile "$LINENO"; then :
7956 gl_cv_warn_c__Wno_format_nonliteral=yes
7957else
7958 gl_cv_warn_c__Wno_format_nonliteral=no
7959fi
7960rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7961 CFLAGS="$gl_save_compiler_FLAGS"
7962
7963fi
7964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_format_nonliteral" >&5
7965$as_echo "$gl_cv_warn_c__Wno_format_nonliteral" >&6; }
7966if test "x$gl_cv_warn_c__Wno_format_nonliteral" = x""yes; then :
7967 as_fn_append WARN_CFLAGS " -Wno-format-nonliteral"
7968fi
7969
7970
0eb775a3 7971
a6b92a4a
GM
7972 # In spite of excluding -Wlogical-op above, it is enabled, as of
7973 # gcc 4.5.0 20090517.
7974 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-logical-op" >&5
7975$as_echo_n "checking whether C compiler handles -Wno-logical-op... " >&6; }
7976if test "${gl_cv_warn_c__Wno_logical_op+set}" = set; then :
7977 $as_echo_n "(cached) " >&6
7978else
7979
7980 gl_save_compiler_FLAGS="$CFLAGS"
0eb775a3 7981 as_fn_append CFLAGS " -Wno-logical-op"
a6b92a4a
GM
7982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7983/* end confdefs.h. */
7984
7985int
7986main ()
7987{
7988
7989 ;
7990 return 0;
7991}
7992_ACEOF
7993if ac_fn_c_try_compile "$LINENO"; then :
7994 gl_cv_warn_c__Wno_logical_op=yes
7995else
7996 gl_cv_warn_c__Wno_logical_op=no
7997fi
7998rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7999 CFLAGS="$gl_save_compiler_FLAGS"
8000
8001fi
8002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_logical_op" >&5
8003$as_echo "$gl_cv_warn_c__Wno_logical_op" >&6; }
8004if test "x$gl_cv_warn_c__Wno_logical_op" = x""yes; then :
8005 as_fn_append WARN_CFLAGS " -Wno-logical-op"
8006fi
8007
8008
0eb775a3 8009
a6b92a4a
GM
8010 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fdiagnostics-show-option" >&5
8011$as_echo_n "checking whether C compiler handles -fdiagnostics-show-option... " >&6; }
8012if test "${gl_cv_warn_c__fdiagnostics_show_option+set}" = set; then :
8013 $as_echo_n "(cached) " >&6
8014else
8015
8016 gl_save_compiler_FLAGS="$CFLAGS"
0eb775a3 8017 as_fn_append CFLAGS " -fdiagnostics-show-option"
a6b92a4a 8018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
8019/* end confdefs.h. */
8020
8021int
8022main ()
8023{
8024
8025 ;
8026 return 0;
8027}
8028_ACEOF
8029if ac_fn_c_try_compile "$LINENO"; then :
a6b92a4a 8030 gl_cv_warn_c__fdiagnostics_show_option=yes
067d23c9 8031else
a6b92a4a 8032 gl_cv_warn_c__fdiagnostics_show_option=no
067d23c9
KY
8033fi
8034rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a6b92a4a
GM
8035 CFLAGS="$gl_save_compiler_FLAGS"
8036
8037fi
8038{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fdiagnostics_show_option" >&5
8039$as_echo "$gl_cv_warn_c__fdiagnostics_show_option" >&6; }
8040if test "x$gl_cv_warn_c__fdiagnostics_show_option" = x""yes; then :
8041 as_fn_append WARN_CFLAGS " -fdiagnostics-show-option"
067d23c9 8042fi
067d23c9 8043
0eb775a3 8044
a6b92a4a
GM
8045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -funit-at-a-time" >&5
8046$as_echo_n "checking whether C compiler handles -funit-at-a-time... " >&6; }
8047if test "${gl_cv_warn_c__funit_at_a_time+set}" = set; then :
8048 $as_echo_n "(cached) " >&6
8049else
8050
8051 gl_save_compiler_FLAGS="$CFLAGS"
0eb775a3 8052 as_fn_append CFLAGS " -funit-at-a-time"
a6b92a4a
GM
8053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8054/* end confdefs.h. */
8055
8056int
8057main ()
8058{
8059
8060 ;
8061 return 0;
8062}
8063_ACEOF
8064if ac_fn_c_try_compile "$LINENO"; then :
8065 gl_cv_warn_c__funit_at_a_time=yes
8066else
8067 gl_cv_warn_c__funit_at_a_time=no
8068fi
8069rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8070 CFLAGS="$gl_save_compiler_FLAGS"
8071
8072fi
8073{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__funit_at_a_time" >&5
8074$as_echo "$gl_cv_warn_c__funit_at_a_time" >&6; }
8075if test "x$gl_cv_warn_c__funit_at_a_time" = x""yes; then :
8076 as_fn_append WARN_CFLAGS " -funit-at-a-time"
8077fi
8078
8079
8080
0eb775a3 8081
a6b92a4a
GM
8082$as_echo "#define lint 1" >>confdefs.h
8083
8084
a6b92a4a
GM
8085
8086$as_echo "#define GNULIB_PORTCHECK 1" >>confdefs.h
8087
8088
8089 # We use a slightly smaller set of warning options for lib/.
8090 # Remove the following and save the result in GNULIB_WARN_CFLAGS.
8091 nw=
8092 nw="$nw -Wunused-macros"
8093
8094
8095 gl_warn_set=
8096 set x $WARN_CFLAGS; shift
8097 for gl_warn_item
8098 do
8099 case " $nw " in
8100 *" $gl_warn_item "*)
8101 ;;
8102 *)
8103 gl_warn_set="$gl_warn_set $gl_warn_item"
8104 ;;
8105 esac
8106 done
8107 GNULIB_WARN_CFLAGS=$gl_warn_set
8108
8109
8110fi
067d23c9
KY
8111
8112
8113
0e733db9
GM
8114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
8115$as_echo_n "checking whether ln -s works... " >&6; }
8116LN_S=$as_ln_s
8117if test "$LN_S" = "ln -s"; then
8118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8119$as_echo "yes" >&6; }
8120else
8121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
8122$as_echo "no, using $LN_S" >&6; }
8123fi
8124
067d23c9 8125
067d23c9
KY
8126# Extract the first word of "install-info", so it can be a program name with args.
8127set dummy install-info; ac_word=$2
8128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8129$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 8130if test "${ac_cv_path_INSTALL_INFO+set}" = set; then :
067d23c9
KY
8131 $as_echo_n "(cached) " >&6
8132else
8133 case $INSTALL_INFO in
8134 [\\/]* | ?:[\\/]*)
8135 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
8136 ;;
8137 *)
8138 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
e700232f 8139for as_dir in $PATH$PATH_SEPARATOR/usr/sbin$PATH_SEPARATOR/sbin
067d23c9
KY
8140do
8141 IFS=$as_save_IFS
8142 test -z "$as_dir" && as_dir=.
8143 for ac_exec_ext in '' $ac_executable_extensions; do
8144 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8145 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
8146 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8147 break 2
8148 fi
8149done
8150 done
8151IFS=$as_save_IFS
8152
8153 test -z "$ac_cv_path_INSTALL_INFO" && ac_cv_path_INSTALL_INFO=":"
8154 ;;
8155esac
8156fi
8157INSTALL_INFO=$ac_cv_path_INSTALL_INFO
8158if test -n "$INSTALL_INFO"; then
8159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_INFO" >&5
8160$as_echo "$INSTALL_INFO" >&6; }
8161else
8162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8163$as_echo "no" >&6; }
8164fi
8165
8166
8167# Extract the first word of "gzip", so it can be a program name with args.
8168set dummy gzip; ac_word=$2
8169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8170$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 8171if test "${ac_cv_path_GZIP_PROG+set}" = set; then :
067d23c9
KY
8172 $as_echo_n "(cached) " >&6
8173else
8174 case $GZIP_PROG in
8175 [\\/]* | ?:[\\/]*)
8176 ac_cv_path_GZIP_PROG="$GZIP_PROG" # Let the user override the test with a path.
8177 ;;
8178 *)
8179 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8180for as_dir in $PATH
8181do
8182 IFS=$as_save_IFS
8183 test -z "$as_dir" && as_dir=.
8184 for ac_exec_ext in '' $ac_executable_extensions; do
8185 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8186 ac_cv_path_GZIP_PROG="$as_dir/$ac_word$ac_exec_ext"
8187 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8188 break 2
8189 fi
8190done
8191 done
8192IFS=$as_save_IFS
8193
8194 ;;
8195esac
8196fi
8197GZIP_PROG=$ac_cv_path_GZIP_PROG
8198if test -n "$GZIP_PROG"; then
8199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP_PROG" >&5
8200$as_echo "$GZIP_PROG" >&6; }
8201else
8202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8203$as_echo "no" >&6; }
8204fi
8205
8206
7ee3791f
GM
8207
8208if test $opsys = gnu-linux; then
8209 # Extract the first word of "paxctl", so it can be a program name with args.
9c29597b
GM
8210set dummy paxctl; ac_word=$2
8211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8212$as_echo_n "checking for $ac_word... " >&6; }
8213if test "${ac_cv_path_PAXCTL+set}" = set; then :
8214 $as_echo_n "(cached) " >&6
8215else
8216 case $PAXCTL in
8217 [\\/]* | ?:[\\/]*)
8218 ac_cv_path_PAXCTL="$PAXCTL" # Let the user override the test with a path.
8219 ;;
8220 *)
8221 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8222for as_dir in $PATH$PATH_SEPARATOR/sbin$PATH_SEPARATOR/usr/sbin
8223do
8224 IFS=$as_save_IFS
8225 test -z "$as_dir" && as_dir=.
8226 for ac_exec_ext in '' $ac_executable_extensions; do
8227 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8228 ac_cv_path_PAXCTL="$as_dir/$ac_word$ac_exec_ext"
8229 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8230 break 2
8231 fi
8232done
8233 done
8234IFS=$as_save_IFS
8235
8236 ;;
8237esac
8238fi
8239PAXCTL=$ac_cv_path_PAXCTL
8240if test -n "$PAXCTL"; then
8241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PAXCTL" >&5
8242$as_echo "$PAXCTL" >&6; }
8243else
8244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8245$as_echo "no" >&6; }
8246fi
8247
8248
685e57ea
GM
8249 if test "X$PAXCTL" != X; then
8250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether binaries have a PT_PAX_FLAGS header" >&5
8251$as_echo_n "checking whether binaries have a PT_PAX_FLAGS header... " >&6; }
8252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8253/* end confdefs.h. */
8254
8255int
8256main ()
8257{
8258
8259 ;
8260 return 0;
8261}
8262_ACEOF
8263if ac_fn_c_try_link "$LINENO"; then :
8264 if $PAXCTL -v conftest$EXEEXT >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8265$as_echo "yes" >&6; }
8266 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8267$as_echo "no" >&6; }; PAXCTL=""; fi
8268fi
8269rm -f core conftest.err conftest.$ac_objext \
8270 conftest$ac_exeext conftest.$ac_ext
8271 fi
7ee3791f 8272fi
067d23c9 8273
9e40dda4 8274## Need makeinfo >= 4.7 (?) to build the manuals.
067d23c9
KY
8275# Extract the first word of "makeinfo", so it can be a program name with args.
8276set dummy makeinfo; ac_word=$2
8277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8278$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 8279if test "${ac_cv_path_MAKEINFO+set}" = set; then :
067d23c9
KY
8280 $as_echo_n "(cached) " >&6
8281else
8282 case $MAKEINFO in
8283 [\\/]* | ?:[\\/]*)
8284 ac_cv_path_MAKEINFO="$MAKEINFO" # Let the user override the test with a path.
8285 ;;
8286 *)
8287 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8288for as_dir in $PATH
8289do
8290 IFS=$as_save_IFS
8291 test -z "$as_dir" && as_dir=.
8292 for ac_exec_ext in '' $ac_executable_extensions; do
8293 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8294 ac_cv_path_MAKEINFO="$as_dir/$ac_word$ac_exec_ext"
8295 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8296 break 2
8297 fi
8298done
8299 done
8300IFS=$as_save_IFS
8301
8302 test -z "$ac_cv_path_MAKEINFO" && ac_cv_path_MAKEINFO="no"
8303 ;;
8304esac
8305fi
8306MAKEINFO=$ac_cv_path_MAKEINFO
8307if test -n "$MAKEINFO"; then
8308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKEINFO" >&5
8309$as_echo "$MAKEINFO" >&6; }
8310else
8311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8312$as_echo "no" >&6; }
8313fi
8314
8315
b5591ebb
GM
8316if test "$MAKEINFO" != "no"; then
8317 case `
8318 $MAKEINFO --version 2> /dev/null |
8319 $EGREP 'texinfo[^0-9]*([1-4][0-9]+|[5-9]|4\.[7-9]|4\.[1-6][0-9]+)'
8320 ` in
8321 '') MAKEINFO=no;;
8322 esac
067d23c9
KY
8323fi
8324
8325## Makeinfo is unusual. For a released Emacs, the manuals are
8326## pre-built, and not deleted by the normal clean rules. makeinfo is
8327## therefore in the category of "special tools" not normally required, which
8328## configure does not have to check for (eg autoconf itself).
8329## In a Bazaar checkout on the other hand, the manuals are not included.
8330## So makeinfo is a requirement to build from Bazaar, and configure
8331## should test for it as it does for any other build requirement.
8332## We use the presence of $srcdir/info/emacs to distinguish a release,
8333## with pre-built manuals, from a Bazaar checkout.
96f129d5
GM
8334HAVE_MAKEINFO=yes
8335
067d23c9 8336if test "$MAKEINFO" = "no"; then
96f129d5 8337 MAKEINFO=makeinfo
067d23c9 8338 if test "x${with_makeinfo}" = "xno"; then
96f129d5 8339 HAVE_MAKEINFO=no
b5591ebb 8340 elif test ! -e "$srcdir/info/emacs" && test ! -e "$srcdir/info/emacs.info"; then
9e40dda4 8341 as_fn_error "You do not seem to have makeinfo >= 4.7, and your
067d23c9
KY
8342source tree does not seem to have pre-built manuals in the \`info' directory.
8343Either install a suitable version of makeinfo, or re-run configure
8344with the \`--without-makeinfo' option to build without the manuals. " "$LINENO" 5
8345 fi
8346fi
8347
8348
141d074d
GM
8349INFO_EXT=.info
8350INFO_OPTS=--no-split
8351
8352
8353
96f129d5 8354
067d23c9
KY
8355if test x$GCC = xyes; then
8356 test "x$GCC_LINK_TEST_OPTIONS" != x && \
8357 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
8358else
8359 test "x$NON_GCC_LINK_TEST_OPTIONS" != x && \
8360 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
8361fi
8362
8363
8364late_LDFLAGS=$LDFLAGS
8365if test x$GCC = xyes; then
8366 LDFLAGS="$LDFLAGS -Wl,-znocombreloc"
8367else
8368 LDFLAGS="$LDFLAGS -znocombreloc"
8369fi
8370
8371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -znocombreloc" >&5
8372$as_echo_n "checking for -znocombreloc... " >&6; }
8373cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8374/* end confdefs.h. */
8375
8376int
8377main ()
8378{
8379
8380 ;
8381 return 0;
8382}
8383_ACEOF
8384if ac_fn_c_try_link "$LINENO"; then :
8385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8386$as_echo "yes" >&6; }
8387else
8388 LDFLAGS=$late_LDFLAGS
8389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8390$as_echo "no" >&6; }
8391fi
8392rm -f core conftest.err conftest.$ac_objext \
8393 conftest$ac_exeext conftest.$ac_ext
8394
8395
125c3718 8396test "x$CANNOT_DUMP" = "x" && CANNOT_DUMP=no
067d23c9 8397case "$opsys" in
125c3718
PE
8398 your-opsys-here) CANNOT_DUMP=yes ;;
8399esac
8400
8401test "$CANNOT_DUMP" = "yes" && \
067d23c9
KY
8402
8403$as_echo "#define CANNOT_DUMP 1" >>confdefs.h
8404
125c3718 8405
067d23c9
KY
8406
8407
8408
8409UNEXEC_OBJ=unexelf.o
8410case "$opsys" in
8411 # MSDOS uses unexcoff.o
8412 # MSWindows uses unexw32.o
8413 aix4-2)
8414 UNEXEC_OBJ=unexaix.o
8415 ;;
8416 cygwin)
8417 UNEXEC_OBJ=unexcw.o
8418 ;;
8419 darwin)
8420 UNEXEC_OBJ=unexmacosx.o
8421 ;;
8422 hpux10-20 | hpux11)
8423 UNEXEC_OBJ=unexhp9k800.o
8424 ;;
8425 sol2-10)
8426 # Use the Solaris dldump() function, called from unexsol.c, to dump
8427 # emacs, instead of the generic ELF dump code found in unexelf.c.
8428 # The resulting binary has a complete symbol table, and is better
8429 # for debugging and other observability tools (debuggers, pstack, etc).
8430 #
8431 # If you encounter a problem using dldump(), please consider sending
8432 # a message to the OpenSolaris tools-linking mailing list:
8433 # http://mail.opensolaris.org/mailman/listinfo/tools-linking
8434 #
8435 # It is likely that dldump() works with older Solaris too, but this has
8436 # not been tested, so for now this change is for Solaris 10 or newer.
8437 UNEXEC_OBJ=unexsol.o
8438 ;;
8439esac
8440
8441LD_SWITCH_SYSTEM=
8442case "$opsys" in
8443 freebsd)
8444 ## Let `ld' find image libs and similar things in /usr/local/lib.
8445 ## The system compiler, GCC, has apparently been modified to not
8446 ## look there, contrary to what a stock GCC would do.
a7479549
GM
8447### It's not our place to do this. See bug#10313#17.
8448### LD_SWITCH_SYSTEM=-L/usr/local/lib
8449 :
067d23c9
KY
8450 ;;
8451
8452 gnu-linux)
8453 ## cpp test was "ifdef __mips__", but presumably this is equivalent...
d6a003a8 8454 case $host_cpu in mips*) LD_SWITCH_SYSTEM="-G 0";; esac
067d23c9
KY
8455 ;;
8456
8457 netbsd)
a7479549
GM
8458### It's not our place to do this. See bug#10313#17.
8459### LD_SWITCH_SYSTEM="-Wl,-rpath,/usr/pkg/lib -L/usr/pkg/lib -Wl,-rpath,/usr/local/lib -L/usr/local/lib"
8460 :
067d23c9
KY
8461 ;;
8462
8463 openbsd)
8464 ## Han Boetes <han@mijncomputer.nl> says this is necessary,
8465 ## otherwise Emacs dumps core on elf systems.
8466 LD_SWITCH_SYSTEM="-Z"
8467 ;;
8468esac
8469
8470
8471ac_link="$ac_link $LD_SWITCH_SYSTEM"
8472
ae629dae 8473## This setting of LD_SWITCH_SYSTEM references LD_SWITCH_X_SITE_RPATH,
067d23c9
KY
8474## which has not been defined yet. When this was handled with cpp,
8475## it was expanded to null when configure sourced the s/*.h file.
8476## Thus LD_SWITCH_SYSTEM had different values in configure and the Makefiles.
8477## FIXME it would be cleaner to put this in LD_SWITCH_SYSTEM_TEMACS
8478## (or somesuch), but because it is supposed to go at the _front_
8479## of LD_SWITCH_SYSTEM, we cannot do that in exactly the same way.
8480## Compare with the gnu-linux case below, which added to the end
8481## of LD_SWITCH_SYSTEM, and so can instead go at the front of
8482## LD_SWITCH_SYSTEM_TEMACS.
8483case "$opsys" in
8484 netbsd|openbsd)
ae629dae 8485 LD_SWITCH_SYSTEM="\$(LD_SWITCH_X_SITE_RPATH) $LD_SWITCH_SYSTEM" ;;
067d23c9
KY
8486esac
8487
8488
8489C_SWITCH_MACHINE=
42bbbe8b
GM
8490case $canonical in
8491 alpha*)
067d23c9 8492 ac_fn_c_check_decl "$LINENO" "__ELF__" "ac_cv_have_decl___ELF__" "$ac_includes_default"
a9bec17c 8493if test "x$ac_cv_have_decl___ELF__" = x""yes; then :
067d23c9
KY
8494
8495fi
8496
8497 if test "$ac_cv_have_decl___ELF__" = "yes"; then
8498 ## With ELF, make sure that all common symbols get allocated to in the
8499 ## data section. Otherwise, the dump of temacs may miss variables in
8500 ## the shared library that have been initialized. For example, with
8501 ## GNU libc, __malloc_initialized would normally be resolved to the
8502 ## shared library's .bss section, which is fatal.
8503 if test "x$GCC" = "xyes"; then
8504 C_SWITCH_MACHINE="-fno-common"
8505 else
a9bec17c 8506 as_fn_error "What gives? Fix me if DEC Unix supports ELF now." "$LINENO" 5
067d23c9
KY
8507 fi
8508 else
8509 UNEXEC_OBJ=unexalpha.o
8510 fi
42bbbe8b
GM
8511 ;;
8512esac
067d23c9
KY
8513
8514
8515
8516
8517C_SWITCH_SYSTEM=
8518## Some programs in src produce warnings saying certain subprograms
8519## are too complex and need a MAXMEM value greater than 2000 for
8520## additional optimization. --nils@exp-math.uni-essen.de
8521test "$opsys" = "aix4.2" && test "x$GCC" != "xyes" && \
8522 C_SWITCH_SYSTEM="-ma -qmaxmem=4000"
8523## gnu-linux might need -D_BSD_SOURCE on old libc5 systems.
8524## It is redundant in glibc2, since we define _GNU_SOURCE.
8525
8526
8527
8528LIBS_SYSTEM=
8529case "$opsys" in
8530 ## IBM's X11R5 uses -lIM and -liconv in AIX 3.2.2.
8531 aix4-2) LIBS_SYSTEM="-lrts -lIM -liconv" ;;
8532
8533 freebsd) LIBS_SYSTEM="-lutil" ;;
8534
8535 hpux*) LIBS_SYSTEM="-l:libdld.sl" ;;
8536
1f5d53eb 8537 sol2*) LIBS_SYSTEM="-lsocket -lnsl" ;;
067d23c9
KY
8538
8539 ## Motif needs -lgen.
8540 unixware) LIBS_SYSTEM="-lsocket -lnsl -lelf -lgen" ;;
8541esac
8542
8543
8544
8545### Make sure subsequent tests use flags consistent with the build flags.
8546
8547if test x"${OVERRIDE_CPPFLAGS}" != x; then
8548 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
8549else
8550 CPPFLAGS="$C_SWITCH_SYSTEM $C_SWITCH_MACHINE $CPPFLAGS"
8551fi
8552
4fda9c95
GM
8553# Suppress obsolescent Autoconf test for size_t; Emacs assumes C89 or better.
8554
3e0be4ab
GM
8555# Likewise for obsolescent test for uid_t, gid_t; Emacs assumes them.
8556
4fda9c95 8557
067d23c9 8558
067d23c9 8559LIB_MATH=-lm
4717915f 8560SYSTEM_TYPE=`echo $opsys | sed -e 's/[0-9].*//' -e 's|-|/|'`
067d23c9
KY
8561
8562case $opsys in
8563 cygwin )
8564 LIB_MATH=
067d23c9
KY
8565 ;;
8566 darwin )
8567 ## Adding -lm confuses the dynamic linker, so omit it.
8568 LIB_MATH=
067d23c9
KY
8569 ;;
8570 freebsd )
15f79fcd 8571 SYSTEM_TYPE=berkeley-unix
067d23c9
KY
8572 ;;
8573 gnu-linux | gnu-kfreebsd )
067d23c9
KY
8574 ;;
8575 hpux10-20 | hpux11 )
067d23c9 8576 ;;
bb72ce91 8577 netbsd | openbsd )
15f79fcd 8578 SYSTEM_TYPE=berkeley-unix
067d23c9 8579 ;;
15f79fcd
GM
8580
8581 sol2* | unixware )
8582 SYSTEM_TYPE=usg-unix-v
8583 ;;
8584
067d23c9
KY
8585esac
8586
8587
8588
15f79fcd
GM
8589cat >>confdefs.h <<_ACEOF
8590#define SYSTEM_TYPE "$SYSTEM_TYPE"
8591_ACEOF
8592
8593
130f1dac 8594
5476a9a4
GM
8595pre_PKG_CONFIG_CFLAGS=$CFLAGS
8596pre_PKG_CONFIG_LIBS=$LIBS
067d23c9 8597
5476a9a4
GM
8598# Extract the first word of "pkg-config", so it can be a program name with args.
8599set dummy pkg-config; ac_word=$2
8600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8601$as_echo_n "checking for $ac_word... " >&6; }
8602if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
8603 $as_echo_n "(cached) " >&6
8604else
8605 case $PKG_CONFIG in
8606 [\\/]* | ?:[\\/]*)
8607 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8608 ;;
8609 *)
8610 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8611for as_dir in $PATH
8612do
8613 IFS=$as_save_IFS
8614 test -z "$as_dir" && as_dir=.
8615 for ac_exec_ext in '' $ac_executable_extensions; do
8616 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8617 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8618 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8619 break 2
8620 fi
8621done
8622 done
8623IFS=$as_save_IFS
8624
8625 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
8626 ;;
8627esac
8628fi
8629PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8630if test -n "$PKG_CONFIG"; then
8631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8632$as_echo "$PKG_CONFIG" >&6; }
8633else
8634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8635$as_echo "no" >&6; }
8636fi
f199cab1
GM
8637
8638
f199cab1 8639
5476a9a4
GM
8640
8641
8642
8643if test "${with_sound}" != "no"; then
8644 # Sound support for GNU/Linux and the free BSDs.
8645 for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h
8646do :
8647 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8648ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8649eval as_val=\$$as_ac_Header
8650 if test "x$as_val" = x""yes; then :
8651 cat >>confdefs.h <<_ACEOF
8652#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8653_ACEOF
8654 have_sound_header=yes
8655fi
8656
8657done
8658
8659 # Emulation library used on NetBSD.
8660 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _oss_ioctl in -lossaudio" >&5
8661$as_echo_n "checking for _oss_ioctl in -lossaudio... " >&6; }
8662if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then :
067d23c9
KY
8663 $as_echo_n "(cached) " >&6
8664else
5476a9a4
GM
8665 ac_check_lib_save_LIBS=$LIBS
8666LIBS="-lossaudio $LIBS"
8667cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 8668/* end confdefs.h. */
5476a9a4
GM
8669
8670/* Override any GCC internal prototype to avoid an error.
8671 Use char because int might match the return type of a GCC
8672 builtin and then its argument prototype would still apply. */
8673#ifdef __cplusplus
8674extern "C"
8675#endif
8676char _oss_ioctl ();
067d23c9
KY
8677int
8678main ()
8679{
5476a9a4 8680return _oss_ioctl ();
067d23c9
KY
8681 ;
8682 return 0;
8683}
8684_ACEOF
8685if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 8686 ac_cv_lib_ossaudio__oss_ioctl=yes
067d23c9 8687else
5476a9a4 8688 ac_cv_lib_ossaudio__oss_ioctl=no
067d23c9
KY
8689fi
8690rm -f core conftest.err conftest.$ac_objext \
8691 conftest$ac_exeext conftest.$ac_ext
5476a9a4
GM
8692LIBS=$ac_check_lib_save_LIBS
8693fi
8694{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5
8695$as_echo "$ac_cv_lib_ossaudio__oss_ioctl" >&6; }
8696if test "x$ac_cv_lib_ossaudio__oss_ioctl" = x""yes; then :
8697 LIBSOUND=-lossaudio
8698else
8699 LIBSOUND=
067d23c9
KY
8700fi
8701
8702
8703
5476a9a4
GM
8704 ALSA_REQUIRED=1.0.0
8705 ALSA_MODULES="alsa >= $ALSA_REQUIRED"
8706
8707 succeeded=no
8708
8709 if test "$PKG_CONFIG" = "no" ; then
8710 HAVE_ALSA=no
8711 else
8712 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 8713 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
8714 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ALSA_MODULES" >&5
8715$as_echo_n "checking for $ALSA_MODULES... " >&6; }
8716
b5591ebb
GM
8717 if "$PKG_CONFIG" --exists "$ALSA_MODULES" 2>&5 &&
8718 ALSA_CFLAGS=`"$PKG_CONFIG" --cflags "$ALSA_MODULES" 2>&5` &&
8719 ALSA_LIBS=`"$PKG_CONFIG" --libs "$ALSA_MODULES" 2>&5`; then
5476a9a4
GM
8720 edit_cflags="
8721 s,///*,/,g
8722 s/^/ /
8723 s/ -I/ $isystem/g
8724 s/^ //
8725 "
8726 ALSA_CFLAGS=`$as_echo "$ALSA_CFLAGS" | sed -e "$edit_cflags"`
8727 ALSA_LIBS=`$as_echo "$ALSA_LIBS" | sed -e 's,///*,/,g'`
8728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$ALSA_CFLAGS' LIBS='$ALSA_LIBS'" >&5
8729$as_echo "yes CFLAGS='$ALSA_CFLAGS' LIBS='$ALSA_LIBS'" >&6; }
8730 succeeded=yes
8731 else
8732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8733$as_echo "no" >&6; }
8734 ALSA_CFLAGS=""
8735 ALSA_LIBS=""
8736 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
8737 ## do set a variable so people can do so. Do it in a subshell
8738 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 8739 ALSA_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$ALSA_MODULES") 2>&1`
5476a9a4
GM
8740
8741 fi
8742
8743
8744
8745 else
8746 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
8747 echo "*** See http://www.freedesktop.org/software/pkgconfig"
8748 fi
8749 fi
8750
8751 if test $succeeded = yes; then
8752 HAVE_ALSA=yes
8753 else
8754 HAVE_ALSA=no
8755 fi
f199cab1 8756
5476a9a4
GM
8757 if test $HAVE_ALSA = yes; then
8758 SAVE_CFLAGS="$CFLAGS"
8759 SAVE_LIBS="$LIBS"
8760 CFLAGS="$ALSA_CFLAGS $CFLAGS"
8761 LIBS="$ALSA_LIBS $LIBS"
8762 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8763/* end confdefs.h. */
8764#include <asoundlib.h>
067d23c9
KY
8765int
8766main ()
8767{
5476a9a4 8768snd_lib_error_set_handler (0);
067d23c9
KY
8769 ;
8770 return 0;
8771}
8772_ACEOF
5476a9a4
GM
8773if ac_fn_c_try_compile "$LINENO"; then :
8774 emacs_alsa_normal=yes
067d23c9 8775else
5476a9a4 8776 emacs_alsa_normal=no
067d23c9 8777fi
5476a9a4
GM
8778rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8779 if test "$emacs_alsa_normal" != yes; then
8780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8781/* end confdefs.h. */
8782#include <alsa/asoundlib.h>
8783int
8784main ()
8785{
8786snd_lib_error_set_handler (0);
8787 ;
8788 return 0;
8789}
8790_ACEOF
8791if ac_fn_c_try_compile "$LINENO"; then :
8792 emacs_alsa_subdir=yes
8793else
8794 emacs_alsa_subdir=no
f199cab1 8795fi
5476a9a4
GM
8796rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8797 if test "$emacs_alsa_subdir" != yes; then
8798 as_fn_error "pkg-config found alsa, but it does not compile. See config.log for error messages." "$LINENO" 5
8799 fi
8800 ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE"
8801 fi
067d23c9 8802
5476a9a4
GM
8803 CFLAGS="$SAVE_CFLAGS"
8804 LIBS="$SAVE_LIBS"
8805 LIBSOUND="$LIBSOUND $ALSA_LIBS"
8806 CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS"
067d23c9 8807
5476a9a4 8808$as_echo "#define HAVE_ALSA 1" >>confdefs.h
067d23c9 8809
5476a9a4 8810 fi
067d23c9 8811
5476a9a4
GM
8812 if test x$have_sound_header = xyes || test $HAVE_ALSA = yes; then
8813 case "$opsys" in
8814 gnu-linux|freebsd|netbsd)
067d23c9 8815
5476a9a4 8816$as_echo "#define HAVE_SOUND 1" >>confdefs.h
067d23c9 8817
5476a9a4
GM
8818 ;;
8819 esac
8820 fi
067d23c9
KY
8821
8822
5476a9a4 8823fi
067d23c9 8824
e700232f
GM
8825
8826
8827
5476a9a4
GM
8828 for ac_header in $ac_header_list
8829do :
8830 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8831ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
8832"
8833eval as_val=\$$as_ac_Header
8834 if test "x$as_val" = x""yes; then :
8835 cat >>confdefs.h <<_ACEOF
8836#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
067d23c9
KY
8837_ACEOF
8838
f199cab1 8839fi
e700232f 8840
5476a9a4
GM
8841done
8842
8843
e700232f
GM
8844
8845
8846
f199cab1 8847
067d23c9 8848
067d23c9 8849
067d23c9 8850
067d23c9 8851
f199cab1
GM
8852
8853
8854
067d23c9 8855
067d23c9 8856
f199cab1
GM
8857
8858
8859
5476a9a4
GM
8860
8861
8862
8863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if personality LINUX32 can be set" >&5
8864$as_echo_n "checking if personality LINUX32 can be set... " >&6; }
8865cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8866/* end confdefs.h. */
8867#include <sys/personality.h>
067d23c9
KY
8868int
8869main ()
8870{
5476a9a4 8871personality (PER_LINUX32)
067d23c9
KY
8872 ;
8873 return 0;
8874}
8875_ACEOF
8876if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4 8877 emacs_cv_personality_linux32=yes
067d23c9 8878else
5476a9a4 8879 emacs_cv_personality_linux32=no
067d23c9 8880fi
f199cab1 8881rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5476a9a4
GM
8882{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_personality_linux32" >&5
8883$as_echo "$emacs_cv_personality_linux32" >&6; }
f199cab1 8884
5476a9a4 8885if test $emacs_cv_personality_linux32 = yes; then
f199cab1 8886
5476a9a4
GM
8887$as_echo "#define HAVE_PERSONALITY_LINUX32 1" >>confdefs.h
8888
8889fi
8890
8891for ac_header in term.h
8892do :
8893 ac_fn_c_check_header_preproc "$LINENO" "term.h" "ac_cv_header_term_h"
8894if test "x$ac_cv_header_term_h" = x""yes; then :
8895 cat >>confdefs.h <<_ACEOF
8896#define HAVE_TERM_H 1
067d23c9 8897_ACEOF
5476a9a4
GM
8898
8899fi
8900
8901done
8902
8903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
8904$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
8905if test "${ac_cv_header_time+set}" = set; then :
8906 $as_echo_n "(cached) " >&6
8907else
8908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 8909/* end confdefs.h. */
5476a9a4
GM
8910#include <sys/types.h>
8911#include <sys/time.h>
8912#include <time.h>
f199cab1 8913
067d23c9
KY
8914int
8915main ()
8916{
5476a9a4
GM
8917if ((struct tm *) 0)
8918return 0;
067d23c9
KY
8919 ;
8920 return 0;
8921}
8922_ACEOF
8923if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4 8924 ac_cv_header_time=yes
067d23c9 8925else
5476a9a4 8926 ac_cv_header_time=no
067d23c9
KY
8927fi
8928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8929fi
5476a9a4
GM
8930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
8931$as_echo "$ac_cv_header_time" >&6; }
8932if test $ac_cv_header_time = yes; then
f199cab1 8933
5476a9a4
GM
8934$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
8935
8936fi
8937
dc67e786
GM
8938ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "#include <signal.h>
8939
8940"
5476a9a4
GM
8941if test "x$ac_cv_have_decl_sys_siglist" = x""yes; then :
8942 ac_have_decl=1
8943else
8944 ac_have_decl=0
8945fi
8946
8947cat >>confdefs.h <<_ACEOF
8948#define HAVE_DECL_SYS_SIGLIST $ac_have_decl
067d23c9 8949_ACEOF
5476a9a4
GM
8950
8951if test $ac_cv_have_decl_sys_siglist != yes; then
8952 # For Tru64, at least:
dc67e786
GM
8953 ac_fn_c_check_decl "$LINENO" "__sys_siglist" "ac_cv_have_decl___sys_siglist" "#include <signal.h>
8954
8955"
5476a9a4
GM
8956if test "x$ac_cv_have_decl___sys_siglist" = x""yes; then :
8957 ac_have_decl=1
8958else
8959 ac_have_decl=0
067d23c9 8960fi
5476a9a4
GM
8961
8962cat >>confdefs.h <<_ACEOF
8963#define HAVE_DECL___SYS_SIGLIST $ac_have_decl
8964_ACEOF
8965
8966 if test $ac_cv_have_decl___sys_siglist = yes; then
8967
8968$as_echo "#define sys_siglist __sys_siglist" >>confdefs.h
8969
8970 fi
8971fi
8972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
8973$as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
8974if test "${ac_cv_header_sys_wait_h+set}" = set; then :
8975 $as_echo_n "(cached) " >&6
067d23c9
KY
8976else
8977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8978/* end confdefs.h. */
5476a9a4
GM
8979#include <sys/types.h>
8980#include <sys/wait.h>
8981#ifndef WEXITSTATUS
8982# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
8983#endif
8984#ifndef WIFEXITED
8985# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8986#endif
8987
067d23c9
KY
8988int
8989main ()
8990{
5476a9a4
GM
8991 int s;
8992 wait (&s);
8993 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
067d23c9
KY
8994 ;
8995 return 0;
8996}
8997_ACEOF
5476a9a4
GM
8998if ac_fn_c_try_compile "$LINENO"; then :
8999 ac_cv_header_sys_wait_h=yes
067d23c9 9000else
5476a9a4 9001 ac_cv_header_sys_wait_h=no
067d23c9 9002fi
5476a9a4 9003rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
067d23c9 9004fi
5476a9a4
GM
9005{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
9006$as_echo "$ac_cv_header_sys_wait_h" >&6; }
9007if test $ac_cv_header_sys_wait_h = yes; then
067d23c9 9008
5476a9a4 9009$as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
7417b37c 9010
5476a9a4 9011fi
7417b37c 9012
7417b37c 9013
5476a9a4
GM
9014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for speed_t" >&5
9015$as_echo_n "checking for speed_t... " >&6; }
9016if test "${emacs_cv_speed_t+set}" = set; then :
f199cab1
GM
9017 $as_echo_n "(cached) " >&6
9018else
f199cab1
GM
9019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9020/* end confdefs.h. */
5476a9a4
GM
9021#include <termios.h>
9022int
9023main ()
9024{
9025speed_t x = 1;
9026 ;
9027 return 0;
9028}
7417b37c 9029_ACEOF
f199cab1 9030if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4
GM
9031 emacs_cv_speed_t=yes
9032else
9033 emacs_cv_speed_t=no
7417b37c 9034fi
f199cab1 9035rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7417b37c 9036fi
5476a9a4
GM
9037{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_speed_t" >&5
9038$as_echo "$emacs_cv_speed_t" >&6; }
9039if test $emacs_cv_speed_t = yes; then
7417b37c 9040
5476a9a4 9041$as_echo "#define HAVE_SPEED_T 1" >>confdefs.h
067d23c9 9042
5476a9a4 9043fi
067d23c9 9044
067d23c9
KY
9045
9046
e700232f 9047
5476a9a4
GM
9048for ac_header in net/if.h
9049do :
9050 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
9051#if HAVE_SYS_SOCKET_H
9052#include <sys/socket.h>
9053#endif
9054"
9055if test "x$ac_cv_header_net_if_h" = x""yes; then :
9056 cat >>confdefs.h <<_ACEOF
9057#define HAVE_NET_IF_H 1
067d23c9 9058_ACEOF
7cae64b4 9059
067d23c9 9060fi
067d23c9 9061
5476a9a4 9062done
4d4b75e8 9063
5476a9a4
GM
9064for ac_header in ifaddrs.h
9065do :
9066 ac_fn_c_check_header_compile "$LINENO" "ifaddrs.h" "ac_cv_header_ifaddrs_h" "$ac_includes_default
9067#if HAVE_SYS_SOCKET_H
9068#include <sys/socket.h>
9069#endif
9070"
9071if test "x$ac_cv_header_ifaddrs_h" = x""yes; then :
9072 cat >>confdefs.h <<_ACEOF
9073#define HAVE_IFADDRS_H 1
9074_ACEOF
4d4b75e8 9075
5476a9a4 9076fi
4d4b75e8 9077
5476a9a4 9078done
7e723570 9079
5476a9a4 9080for ac_header in net/if_dl.h
7e723570 9081do :
5476a9a4
GM
9082 ac_fn_c_check_header_compile "$LINENO" "net/if_dl.h" "ac_cv_header_net_if_dl_h" "$ac_includes_default
9083#if HAVE_SYS_SOCKET_H
9084#include <sys/socket.h>
9085#endif
7e723570 9086"
5476a9a4 9087if test "x$ac_cv_header_net_if_dl_h" = x""yes; then :
7e723570 9088 cat >>confdefs.h <<_ACEOF
5476a9a4 9089#define HAVE_NET_IF_DL_H 1
7e723570
GM
9090_ACEOF
9091
9092fi
9093
9094done
9095
9096
5476a9a4
GM
9097ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_flags" "ac_cv_member_struct_ifreq_ifr_flags" "$ac_includes_default
9098#if HAVE_SYS_SOCKET_H
9099#include <sys/socket.h>
9100#endif
9101#if HAVE_NET_IF_H
9102#include <net/if.h>
9103#endif
9104"
9105if test "x$ac_cv_member_struct_ifreq_ifr_flags" = x""yes; then :
7e723570 9106
5476a9a4
GM
9107cat >>confdefs.h <<_ACEOF
9108#define HAVE_STRUCT_IFREQ_IFR_FLAGS 1
9109_ACEOF
7e723570
GM
9110
9111
5476a9a4
GM
9112fi
9113ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_hwaddr" "ac_cv_member_struct_ifreq_ifr_hwaddr" "$ac_includes_default
9114#if HAVE_SYS_SOCKET_H
9115#include <sys/socket.h>
f199cab1 9116#endif
5476a9a4
GM
9117#if HAVE_NET_IF_H
9118#include <net/if.h>
f199cab1 9119#endif
5476a9a4
GM
9120"
9121if test "x$ac_cv_member_struct_ifreq_ifr_hwaddr" = x""yes; then :
9122
9123cat >>confdefs.h <<_ACEOF
9124#define HAVE_STRUCT_IFREQ_IFR_HWADDR 1
9125_ACEOF
9126
9127
9128fi
9129ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_netmask" "ac_cv_member_struct_ifreq_ifr_netmask" "$ac_includes_default
9130#if HAVE_SYS_SOCKET_H
9131#include <sys/socket.h>
f199cab1 9132#endif
5476a9a4
GM
9133#if HAVE_NET_IF_H
9134#include <net/if.h>
9135#endif
9136"
9137if test "x$ac_cv_member_struct_ifreq_ifr_netmask" = x""yes; then :
9138
9139cat >>confdefs.h <<_ACEOF
9140#define HAVE_STRUCT_IFREQ_IFR_NETMASK 1
f199cab1 9141_ACEOF
5476a9a4
GM
9142
9143
9144fi
9145ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_broadaddr" "ac_cv_member_struct_ifreq_ifr_broadaddr" "$ac_includes_default
9146#if HAVE_SYS_SOCKET_H
9147#include <sys/socket.h>
9148#endif
9149#if HAVE_NET_IF_H
9150#include <net/if.h>
9151#endif
9152"
9153if test "x$ac_cv_member_struct_ifreq_ifr_broadaddr" = x""yes; then :
9154
9155cat >>confdefs.h <<_ACEOF
9156#define HAVE_STRUCT_IFREQ_IFR_BROADADDR 1
f199cab1 9157_ACEOF
5476a9a4
GM
9158
9159
067d23c9 9160fi
5476a9a4
GM
9161ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_addr" "ac_cv_member_struct_ifreq_ifr_addr" "$ac_includes_default
9162#if HAVE_SYS_SOCKET_H
9163#include <sys/socket.h>
9164#endif
9165#if HAVE_NET_IF_H
9166#include <net/if.h>
9167#endif
9168"
9169if test "x$ac_cv_member_struct_ifreq_ifr_addr" = x""yes; then :
9170
9171cat >>confdefs.h <<_ACEOF
9172#define HAVE_STRUCT_IFREQ_IFR_ADDR 1
9173_ACEOF
9174
067d23c9 9175
f199cab1 9176fi
5476a9a4
GM
9177ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_addr.sa_len" "ac_cv_member_struct_ifreq_ifr_addr_sa_len" "$ac_includes_default
9178#if HAVE_SYS_SOCKET_H
9179#include <sys/socket.h>
9180#endif
9181#if HAVE_NET_IF_H
9182#include <net/if.h>
9183#endif
9184"
9185if test "x$ac_cv_member_struct_ifreq_ifr_addr_sa_len" = x""yes; then :
9186
9187cat >>confdefs.h <<_ACEOF
9188#define HAVE_STRUCT_IFREQ_IFR_ADDR_SA_LEN 1
9189_ACEOF
9190
067d23c9
KY
9191
9192fi
9193
9194
067d23c9 9195
f199cab1 9196
5476a9a4
GM
9197DEPFLAGS=
9198MKDEPDIR=":"
9199deps_frag=deps.mk
9200if test "$GCC" = yes && test "$ac_enable_autodepend" = yes; then
9201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using GNU Make" >&5
9202$as_echo_n "checking whether we are using GNU Make... " >&6; }
9203 HAVE_GNU_MAKE=no
9204 testval=`${MAKE-make} --version 2>/dev/null | grep 'GNU Make'`
9205 if test "x$testval" != x; then
9206 HAVE_GNU_MAKE=yes
9207 else
9208 ac_enable_autodepend=no
9209 fi
9210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_GNU_MAKE" >&5
9211$as_echo "$HAVE_GNU_MAKE" >&6; }
9212 if test $HAVE_GNU_MAKE = yes; then
9213 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -MMD -MF" >&5
9214$as_echo_n "checking whether gcc understands -MMD -MF... " >&6; }
9215 SAVE_CFLAGS="$CFLAGS"
9216 CFLAGS="$CFLAGS -MMD -MF deps.d -MP"
9217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9218/* end confdefs.h. */
f199cab1 9219
5476a9a4
GM
9220int
9221main ()
9222{
f199cab1 9223
5476a9a4
GM
9224 ;
9225 return 0;
9226}
9227_ACEOF
9228if ac_fn_c_try_compile "$LINENO"; then :
f199cab1 9229
5476a9a4
GM
9230else
9231 ac_enable_autodepend=no
9232fi
9233rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9234 CFLAGS="$SAVE_CFLAGS"
9235 test -f deps.d || ac_enable_autodepend=no
9236 rm -rf deps.d
9237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_autodepend" >&5
9238$as_echo "$ac_enable_autodepend" >&6; }
9239 fi
9240 if test $ac_enable_autodepend = yes; then
9241 DEPFLAGS='-MMD -MF ${DEPDIR}/$*.d -MP'
9242 ## MKDIR_P is documented (see AC_PROG_MKDIR_P) to be parallel-safe.
9243 MKDEPDIR='${MKDIR_P} ${DEPDIR}'
9244 deps_frag=autodeps.mk
9245 fi
9246fi
9247deps_frag=$srcdir/src/$deps_frag
f199cab1
GM
9248
9249
9250
9251
9252
5476a9a4 9253lisp_frag=$srcdir/src/lisp.mk
f199cab1
GM
9254
9255
9256
5476a9a4
GM
9257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long file names" >&5
9258$as_echo_n "checking for long file names... " >&6; }
9259if test "${ac_cv_sys_long_file_names+set}" = set; then :
9260 $as_echo_n "(cached) " >&6
9261else
9262 ac_cv_sys_long_file_names=yes
9263# Test for long file names in all the places we know might matter:
9264# . the current directory, where building will happen
9265# $prefix/lib where we will be installing things
9266# $exec_prefix/lib likewise
9267# $TMPDIR if set, where it might want to write temporary files
9268# /tmp where it might want to write temporary files
9269# /var/tmp likewise
9270# /usr/tmp likewise
9271for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do
9272 # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib
9273 # in the usual case where exec_prefix is '${prefix}'.
9274 case $ac_dir in #(
9275 . | /* | ?:[\\/]*) ;; #(
9276 *) continue;;
9277 esac
9278 test -w "$ac_dir/." || continue # It is less confusing to not echo anything here.
9279 ac_xdir=$ac_dir/cf$$
9280 (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
9281 ac_tf1=$ac_xdir/conftest9012345
9282 ac_tf2=$ac_xdir/conftest9012346
9283 touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" ||
9284 ac_cv_sys_long_file_names=no
9285 rm -f -r "$ac_xdir" 2>/dev/null
9286 test $ac_cv_sys_long_file_names = no && break
9287done
9288fi
9289{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_long_file_names" >&5
9290$as_echo "$ac_cv_sys_long_file_names" >&6; }
9291if test $ac_cv_sys_long_file_names = yes; then
f199cab1 9292
5476a9a4 9293$as_echo "#define HAVE_LONG_FILE_NAMES 1" >>confdefs.h
f199cab1 9294
5476a9a4 9295fi
f199cab1 9296
f199cab1 9297
5476a9a4 9298#### Choose a window system.
f199cab1 9299
42dcba54
GM
9300## We leave window_system equal to none if
9301## we end up building without one. Any new window system should
9302## set window_system to an appropriate value and add objects to
9303## window-system-specific substs.
9304
9305window_system=none
5476a9a4
GM
9306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
9307$as_echo_n "checking for X... " >&6; }
f199cab1 9308
f199cab1 9309
5476a9a4
GM
9310# Check whether --with-x was given.
9311if test "${with_x+set}" = set; then :
9312 withval=$with_x;
9313fi
f199cab1 9314
5476a9a4
GM
9315# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
9316if test "x$with_x" = xno; then
9317 # The user explicitly disabled X.
9318 have_x=disabled
9319else
9320 case $x_includes,$x_libraries in #(
9321 *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
9322 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
9323 $as_echo_n "(cached) " >&6
9324else
9325 # One or both of the vars are not set, and there is no cached value.
9326ac_x_includes=no ac_x_libraries=no
9327rm -f -r conftest.dir
9328if mkdir conftest.dir; then
9329 cd conftest.dir
9330 cat >Imakefile <<'_ACEOF'
9331incroot:
9332 @echo incroot='${INCROOT}'
9333usrlibdir:
9334 @echo usrlibdir='${USRLIBDIR}'
9335libdir:
9336 @echo libdir='${LIBDIR}'
9337_ACEOF
9338 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
9339 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
9340 for ac_var in incroot usrlibdir libdir; do
9341 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
9342 done
9343 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
9344 for ac_extension in a so sl dylib la dll; do
9345 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
9346 test -f "$ac_im_libdir/libX11.$ac_extension"; then
9347 ac_im_usrlibdir=$ac_im_libdir; break
9348 fi
9349 done
9350 # Screen out bogus values from the imake configuration. They are
9351 # bogus both because they are the default anyway, and because
9352 # using them would break gcc on systems where it needs fixed includes.
9353 case $ac_im_incroot in
9354 /usr/include) ac_x_includes= ;;
9355 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
9356 esac
9357 case $ac_im_usrlibdir in
9358 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
9359 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
9360 esac
9361 fi
9362 cd ..
9363 rm -f -r conftest.dir
067d23c9
KY
9364fi
9365
5476a9a4
GM
9366# Standard set of common directories for X headers.
9367# Check X11 before X11Rn because it is often a symlink to the current release.
9368ac_x_header_dirs='
9369/usr/X11/include
9370/usr/X11R7/include
9371/usr/X11R6/include
9372/usr/X11R5/include
9373/usr/X11R4/include
067d23c9 9374
5476a9a4
GM
9375/usr/include/X11
9376/usr/include/X11R7
9377/usr/include/X11R6
9378/usr/include/X11R5
9379/usr/include/X11R4
067d23c9 9380
5476a9a4
GM
9381/usr/local/X11/include
9382/usr/local/X11R7/include
9383/usr/local/X11R6/include
9384/usr/local/X11R5/include
9385/usr/local/X11R4/include
067d23c9 9386
5476a9a4
GM
9387/usr/local/include/X11
9388/usr/local/include/X11R7
9389/usr/local/include/X11R6
9390/usr/local/include/X11R5
9391/usr/local/include/X11R4
067d23c9 9392
5476a9a4
GM
9393/usr/X386/include
9394/usr/x386/include
9395/usr/XFree86/include/X11
067d23c9 9396
5476a9a4
GM
9397/usr/include
9398/usr/local/include
9399/usr/unsupported/include
9400/usr/athena/include
9401/usr/local/x11r5/include
9402/usr/lpp/Xamples/include
067d23c9 9403
5476a9a4
GM
9404/usr/openwin/include
9405/usr/openwin/share/include'
067d23c9 9406
5476a9a4
GM
9407if test "$ac_x_includes" = no; then
9408 # Guess where to find include files, by looking for Xlib.h.
9409 # First, try using that file with no special directory specified.
9410 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9411/* end confdefs.h. */
9412#include <X11/Xlib.h>
067d23c9 9413_ACEOF
5476a9a4
GM
9414if ac_fn_c_try_cpp "$LINENO"; then :
9415 # We can compile using X headers with no special include directory.
9416ac_x_includes=
067d23c9 9417else
5476a9a4
GM
9418 for ac_dir in $ac_x_header_dirs; do
9419 if test -r "$ac_dir/X11/Xlib.h"; then
9420 ac_x_includes=$ac_dir
9421 break
f199cab1 9422 fi
f199cab1 9423done
5476a9a4
GM
9424fi
9425rm -f conftest.err conftest.$ac_ext
9426fi # $ac_x_includes = no
067d23c9 9427
5476a9a4
GM
9428if test "$ac_x_libraries" = no; then
9429 # Check for the libraries.
9430 # See if we find them without any special options.
9431 # Don't add to $LIBS permanently.
9432 ac_save_LIBS=$LIBS
9433 LIBS="-lX11 $LIBS"
7ee3791f 9434 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 9435/* end confdefs.h. */
5476a9a4 9436#include <X11/Xlib.h>
067d23c9
KY
9437int
9438main ()
9439{
5476a9a4
GM
9440XrmInitialize ()
9441 ;
067d23c9
KY
9442 return 0;
9443}
9444_ACEOF
5476a9a4
GM
9445if ac_fn_c_try_link "$LINENO"; then :
9446 LIBS=$ac_save_LIBS
9447# We can link X programs with no special library path.
9448ac_x_libraries=
7ee3791f 9449else
5476a9a4
GM
9450 LIBS=$ac_save_LIBS
9451for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
9452do
9453 # Don't even attempt the hair of trying to link an X program!
9454 for ac_extension in a so sl dylib la dll; do
9455 if test -r "$ac_dir/libX11.$ac_extension"; then
9456 ac_x_libraries=$ac_dir
9457 break 2
9458 fi
9459 done
9460done
7ee3791f 9461fi
5476a9a4
GM
9462rm -f core conftest.err conftest.$ac_objext \
9463 conftest$ac_exeext conftest.$ac_ext
9464fi # $ac_x_libraries = no
7ee3791f 9465
5476a9a4
GM
9466case $ac_x_includes,$ac_x_libraries in #(
9467 no,* | *,no | *\'*)
9468 # Didn't find X, or a directory has "'" in its name.
9469 ac_cv_have_x="have_x=no";; #(
9470 *)
9471 # Record where we found X for the cache.
9472 ac_cv_have_x="have_x=yes\
9473 ac_x_includes='$ac_x_includes'\
9474 ac_x_libraries='$ac_x_libraries'"
9475esac
9476fi
9477;; #(
9478 *) have_x=yes;;
9479 esac
9480 eval "$ac_cv_have_x"
9481fi # $with_x != no
9482
9483if test "$have_x" != yes; then
9484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
9485$as_echo "$have_x" >&6; }
9486 no_x=yes
9487else
9488 # If each of the values was on the command line, it overrides each guess.
9489 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
9490 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
9491 # Update the cache value to reflect the command line values.
9492 ac_cv_have_x="have_x=yes\
9493 ac_x_includes='$x_includes'\
9494 ac_x_libraries='$x_libraries'"
9495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
9496$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
9497fi
9498
42dcba54 9499if test "$no_x" != yes; then
5476a9a4
GM
9500 window_system=x11
9501fi
9502
9503LD_SWITCH_X_SITE_RPATH=
9504if test "${x_libraries}" != NONE; then
9505 if test -n "${x_libraries}"; then
9506 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
9507 LD_SWITCH_X_SITE_RPATH=-Wl,-rpath,`echo ${x_libraries} | sed -e "s/:/ -Wl,-rpath,/g"`
9508 fi
9509 x_default_search_path=""
9510 x_search_path=${x_libraries}
9511 if test -z "${x_search_path}"; then
9512 x_search_path=/usr/lib
9513 fi
9514 for x_library in `echo ${x_search_path}: | \
9515 sed -e "s/:/ /g" -e p -e "s:/lib[^ /]* :/share :g"`; do
9516 x_search_path="\
9517${x_library}/X11/%L/%T/%N%C%S:\
9518${x_library}/X11/%l/%T/%N%C%S:\
9519${x_library}/X11/%T/%N%C%S:\
9520${x_library}/X11/%L/%T/%N%S:\
9521${x_library}/X11/%l/%T/%N%S:\
9522${x_library}/X11/%T/%N%S"
9523 if test x"${x_default_search_path}" = x; then
9524 x_default_search_path=${x_search_path}
9525 else
9526 x_default_search_path="${x_search_path}:${x_default_search_path}"
9527 fi
9528 done
9529fi
9530
9531
9532if test "${x_includes}" != NONE && test -n "${x_includes}"; then
9533 C_SWITCH_X_SITE="$isystem"`echo ${x_includes} | sed -e "s/:/ $isystem/g"`
9534fi
9535
9536if test x"${x_includes}" = x; then
9537 bitmapdir=/usr/include/X11/bitmaps
9538else
9539 # accumulate include directories that have X11 bitmap subdirectories
9540 bmd_acc="dummyval"
9541 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
9542 if test -d "${bmd}/X11/bitmaps"; then
9543 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
9544 fi
9545 if test -d "${bmd}/bitmaps"; then
9546 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
9547 fi
9548 done
9549 if test ${bmd_acc} != "dummyval"; then
9550 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
9551 fi
9552fi
7ee3791f 9553
5476a9a4
GM
9554HAVE_NS=no
9555NS_IMPL_COCOA=no
9556NS_IMPL_GNUSTEP=no
9557tmp_CPPFLAGS="$CPPFLAGS"
9558tmp_CFLAGS="$CFLAGS"
9559CPPFLAGS="$CPPFLAGS -x objective-c"
9560CFLAGS="$CFLAGS -x objective-c"
5476a9a4 9561GNU_OBJC_CFLAGS=
4efe5ef9 9562LIBS_GNUSTEP=
5476a9a4
GM
9563if test "${with_ns}" != no; then
9564 if test "${opsys}" = darwin; then
9565 NS_IMPL_COCOA=yes
9566 ns_appdir=`pwd`/nextstep/Emacs.app
9567 ns_appbindir=${ns_appdir}/Contents/MacOS
9568 ns_appresdir=${ns_appdir}/Contents/Resources
bb7dce39 9569 ns_appsrc=Cocoa/Emacs.base
5476a9a4
GM
9570 elif test -f $GNUSTEP_CONFIG_FILE; then
9571 NS_IMPL_GNUSTEP=yes
9572 ns_appdir=`pwd`/nextstep/Emacs.app
9573 ns_appbindir=${ns_appdir}
9574 ns_appresdir=${ns_appdir}/Resources
bb7dce39 9575 ns_appsrc=GNUstep/Emacs.base
5476a9a4
GM
9576 GNUSTEP_SYSTEM_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_HEADERS)"
9577 GNUSTEP_SYSTEM_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_LIBRARIES)"
9578 GNUSTEP_LOCAL_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_HEADERS)"
9579 GNUSTEP_LOCAL_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_LIBRARIES)"
9580 test "x${GNUSTEP_LOCAL_HEADERS}" != "x" && \
9581 GNUSTEP_LOCAL_HEADERS="-I${GNUSTEP_LOCAL_HEADERS}"
9582 test "x${GNUSTEP_LOCAL_LIBRARIES}" != "x" && \
9583 GNUSTEP_LOCAL_LIBRARIES="-L${GNUSTEP_LOCAL_LIBRARIES}"
9584 CPPFLAGS="$CPPFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
9585 CFLAGS="$CFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
9586 LDFLAGS="$LDFLAGS -L${GNUSTEP_SYSTEM_LIBRARIES} ${GNUSTEP_LOCAL_LIBRARIES}"
4efe5ef9 9587 LIBS_GNUSTEP="-lgnustep-gui -lgnustep-base -lobjc -lpthread"
5476a9a4
GM
9588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if GNUstep defines BASE_NATIVE_OBJC_EXCEPTIONS" >&5
9589$as_echo_n "checking if GNUstep defines BASE_NATIVE_OBJC_EXCEPTIONS... " >&6; }
9590if test "${emacs_cv_objc_exceptions+set}" = set; then :
9591 $as_echo_n "(cached) " >&6
9592else
9593 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9594/* end confdefs.h. */
9595#include <GNUstepBase/GSConfig.h>
39b3d70b
GM
9596int
9597main ()
9598{
5476a9a4
GM
9599#if defined BASE_NATIVE_OBJC_EXCEPTIONS && BASE_NATIVE_OBJC_EXCEPTIONS > 0
96001;
9601#else
9602fail;
9603#endif
9604 ;
39b3d70b
GM
9605 return 0;
9606}
9607_ACEOF
5476a9a4
GM
9608if ac_fn_c_try_compile "$LINENO"; then :
9609 emacs_cv_objc_exceptions=yes
39b3d70b 9610else
5476a9a4 9611 emacs_cv_objc_exceptions=no
39b3d70b 9612fi
5476a9a4 9613rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
39b3d70b 9614fi
5476a9a4
GM
9615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_objc_exceptions" >&5
9616$as_echo "$emacs_cv_objc_exceptions" >&6; }
9617 if test $emacs_cv_objc_exceptions = yes; then
39b3d70b 9618
5476a9a4
GM
9619$as_echo "#define _NATIVE_OBJC_EXCEPTIONS 1" >>confdefs.h
9620
9621 GNU_OBJC_CFLAGS="-fobjc-exceptions"
9622 fi
9623 fi
9624
9625 CFLAGS="$CFLAGS $GNU_OBJC_CFLAGS"
9626
9627 ac_fn_c_check_header_mongrel "$LINENO" "AppKit/AppKit.h" "ac_cv_header_AppKit_AppKit_h" "$ac_includes_default"
9628if test "x$ac_cv_header_AppKit_AppKit_h" = x""yes; then :
9629 HAVE_NS=yes
067d23c9 9630else
5476a9a4
GM
9631 as_fn_error "\`--with-ns' was specified, but the include
9632 files are missing or cannot be compiled." "$LINENO" 5
9633fi
f199cab1 9634
f199cab1 9635
dc67e786
GM
9636
9637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9638/* end confdefs.h. */
9639#include <AppKit/AppKit.h>
9640int
9641main ()
9642{
9643
9644#ifdef MAC_OS_X_VERSION_MAX_ALLOWED
9645#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1040
9646 ; /* OK */
9647#else
9648#error "OSX 10.4 or newer required"
9649#endif
9650#endif
9651
9652 ;
9653 return 0;
9654}
9655_ACEOF
9656if ac_fn_c_try_compile "$LINENO"; then :
9657 ns_osx_have_104=yes
9658else
9659 ns_osx_have_104=no
9660fi
9661rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5476a9a4
GM
9662 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9663/* end confdefs.h. */
9664#include <Foundation/NSObjCRuntime.h>
067d23c9
KY
9665int
9666main ()
9667{
5476a9a4
GM
9668NSInteger i;
9669 ;
067d23c9
KY
9670 return 0;
9671}
9672_ACEOF
5476a9a4
GM
9673if ac_fn_c_try_compile "$LINENO"; then :
9674 ns_have_nsinteger=yes
067d23c9 9675else
5476a9a4 9676 ns_have_nsinteger=no
067d23c9 9677fi
5476a9a4 9678rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
dc67e786
GM
9679 if test $ns_osx_have_104 = no; then
9680 as_fn_error "\`OSX 10.4 or newer is required'" "$LINENO" 5;
9681 fi
5476a9a4 9682 if test $ns_have_nsinteger = yes; then
067d23c9 9683
5476a9a4 9684$as_echo "#define NS_HAVE_NSINTEGER 1" >>confdefs.h
067d23c9 9685
067d23c9 9686 fi
5476a9a4 9687fi
067d23c9 9688
5476a9a4 9689
5c0255d9 9690
5476a9a4
GM
9691INSTALL_ARCH_INDEP_EXTRA=install-etc
9692ns_self_contained=no
5476a9a4
GM
9693NS_OBJ=
9694NS_OBJC_OBJ=
9695if test "${HAVE_NS}" = yes; then
9696 if test "$with_toolkit_scroll_bars" = "no"; then
9697 as_fn_error "Non-toolkit scroll bars are not implemented for Nextstep." "$LINENO" 5
9698 fi
9699
9700 window_system=nextstep
5476a9a4
GM
9701 # set up packaging dirs
9702 if test "${EN_NS_SELF_CONTAINED}" = yes; then
9703 ns_self_contained=yes
9704 prefix=${ns_appresdir}
9705 exec_prefix=${ns_appbindir}
9706 libexecdir="\${ns_appbindir}/libexec"
9707 archlibdir="\${ns_appbindir}/libexec"
9708 docdir="\${ns_appresdir}/etc"
9709 etcdir="\${ns_appresdir}/etc"
9710 infodir="\${ns_appresdir}/info"
9711 mandir="\${ns_appresdir}/man"
9712 lispdir="\${ns_appresdir}/lisp"
9713 leimdir="\${ns_appresdir}/leim"
9714 INSTALL_ARCH_INDEP_EXTRA=
9715 fi
5476a9a4
GM
9716 NS_OBJC_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o"
9717fi
9718CFLAGS="$tmp_CFLAGS"
9719CPPFLAGS="$tmp_CPPFLAGS"
9720
9721
9722
9723
9724
5c0255d9
GM
9725HAVE_W32=no
9726W32_OBJ=
9727W32_LIBS=
b5eb356a
GM
9728W32_RES=
9729W32_RES_LINK=
5c0255d9
GM
9730if test "${with_w32}" != no; then
9731 if test "${opsys}" != "cygwin"; then
9732 as_fn_error "Using w32 with an autotools build is only supported for Cygwin." "$LINENO" 5
9733 fi
9734 ac_fn_c_check_header_mongrel "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default"
9735if test "x$ac_cv_header_windows_h" = x""yes; then :
9736 HAVE_W32=yes
9737else
9738 as_fn_error "\`--with-w32' was specified, but windows.h
9739 cannot be found." "$LINENO" 5
9740fi
9741
9742
9743
9744$as_echo "#define HAVE_NTGUI 1" >>confdefs.h
9745
b5eb356a
GM
9746 if test -n "$ac_tool_prefix"; then
9747 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
9748set dummy ${ac_tool_prefix}windres; ac_word=$2
9749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9750$as_echo_n "checking for $ac_word... " >&6; }
9751if test "${ac_cv_prog_WINDRES+set}" = set; then :
9752 $as_echo_n "(cached) " >&6
9753else
9754 if test -n "$WINDRES"; then
9755 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
9756else
9757as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9758for as_dir in $PATH
9759do
9760 IFS=$as_save_IFS
9761 test -z "$as_dir" && as_dir=.
9762 for ac_exec_ext in '' $ac_executable_extensions; do
9763 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9764 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
9765 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9766 break 2
9767 fi
9768done
9769 done
9770IFS=$as_save_IFS
9771
9772fi
9773fi
9774WINDRES=$ac_cv_prog_WINDRES
9775if test -n "$WINDRES"; then
9776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
9777$as_echo "$WINDRES" >&6; }
9778else
9779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9780$as_echo "no" >&6; }
9781fi
9782
9783
9784fi
9785if test -z "$ac_cv_prog_WINDRES"; then
9786 ac_ct_WINDRES=$WINDRES
9787 # Extract the first word of "windres", so it can be a program name with args.
9788set dummy windres; ac_word=$2
9789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9790$as_echo_n "checking for $ac_word... " >&6; }
9791if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then :
9792 $as_echo_n "(cached) " >&6
9793else
9794 if test -n "$ac_ct_WINDRES"; then
9795 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
9796else
9797as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9798for as_dir in $PATH
9799do
9800 IFS=$as_save_IFS
9801 test -z "$as_dir" && as_dir=.
9802 for ac_exec_ext in '' $ac_executable_extensions; do
9803 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9804 ac_cv_prog_ac_ct_WINDRES="windres"
9805 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9806 break 2
9807 fi
9808done
9809 done
9810IFS=$as_save_IFS
9811
9812fi
9813fi
9814ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
9815if test -n "$ac_ct_WINDRES"; then
9816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
9817$as_echo "$ac_ct_WINDRES" >&6; }
9818else
9819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9820$as_echo "no" >&6; }
9821fi
9822
9823 if test "x$ac_ct_WINDRES" = x; then
9824 WINDRES="as_fn_error "No resource compiler found." "$LINENO" 5"
9825 else
9826 case $cross_compiling:$ac_tool_warned in
9827yes:)
9828{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9829$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9830ac_tool_warned=yes ;;
9831esac
9832 WINDRES=$ac_ct_WINDRES
9833 fi
9834else
9835 WINDRES="$ac_cv_prog_WINDRES"
9836fi
9837
5c0255d9
GM
9838 W32_OBJ="w32fns.o w32menu.o w32reg.o w32font.o w32term.o"
9839 W32_OBJ="$W32_OBJ w32xfns.o w32select.o w32uniscribe.o"
9840 W32_LIBS="$W32_LIBS -lkernel32 -luser32 -lgdi32 -lole32 -lcomdlg32"
9841 W32_LIBS="$W32_LIBS -lusp10 -lcomctl32 -lwinspool"
b5eb356a
GM
9842 W32_RES="emacs.res"
9843 # Tell the linker that emacs.res is an object (which we compile from
9844 # the rc file), not a linker script.
9845 W32_RES_LINK="-Wl,-bpe-i386 -Wl,emacs.res"
5c0255d9
GM
9846fi
9847
9848
9849
b5eb356a
GM
9850
9851
5c0255d9
GM
9852if test "${HAVE_W32}" = "yes"; then
9853 window_system=w32
9854 with_xft=no
9855fi
9856
42dcba54
GM
9857## $window_system is now set to the window system we will
9858## ultimately use.
9859
9860term_header=
9861HAVE_X_WINDOWS=no
9862HAVE_X11=no
9863USE_X_TOOLKIT=none
9864
5476a9a4
GM
9865case "${window_system}" in
9866 x11 )
9867 HAVE_X_WINDOWS=yes
9868 HAVE_X11=yes
42dcba54 9869 term_header=xterm.h
5476a9a4
GM
9870 case "${with_x_toolkit}" in
9871 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
9872 motif ) USE_X_TOOLKIT=MOTIF ;;
9873 gtk ) with_gtk=yes
42dcba54 9874 term_header=gtkutil.h
5476a9a4 9875 USE_X_TOOLKIT=none ;;
4fa92495
GM
9876 gtk2 ) with_gtk2=yes
9877 term_header=gtkutil.h
9878 USE_X_TOOLKIT=none ;;
5476a9a4 9879 gtk3 ) with_gtk3=yes
42dcba54 9880 term_header=gtkutil.h
5476a9a4
GM
9881 USE_X_TOOLKIT=none ;;
9882 no ) USE_X_TOOLKIT=none ;;
9883 * ) USE_X_TOOLKIT=maybe ;;
9884 esac
9885 ;;
42dcba54
GM
9886 nextstep )
9887 term_header=nsterm.h
5476a9a4 9888 ;;
5c0255d9
GM
9889 w32 )
9890 term_header=w32term.h
9891 ;;
5476a9a4
GM
9892esac
9893
9894if test "$window_system" = none && test "X$with_x" != "Xno"; then
9895 # Extract the first word of "X", so it can be a program name with args.
9896set dummy X; ac_word=$2
9897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9898$as_echo_n "checking for $ac_word... " >&6; }
9899if test "${ac_cv_prog_HAVE_XSERVER+set}" = set; then :
9900 $as_echo_n "(cached) " >&6
9901else
9902 if test -n "$HAVE_XSERVER"; then
9903 ac_cv_prog_HAVE_XSERVER="$HAVE_XSERVER" # Let the user override the test.
9904else
9905as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9906for as_dir in $PATH
9907do
9908 IFS=$as_save_IFS
9909 test -z "$as_dir" && as_dir=.
9910 for ac_exec_ext in '' $ac_executable_extensions; do
9911 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9912 ac_cv_prog_HAVE_XSERVER="true"
9913 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9914 break 2
9915 fi
9916done
9917 done
9918IFS=$as_save_IFS
9919
9920 test -z "$ac_cv_prog_HAVE_XSERVER" && ac_cv_prog_HAVE_XSERVER="false"
9921fi
9922fi
9923HAVE_XSERVER=$ac_cv_prog_HAVE_XSERVER
9924if test -n "$HAVE_XSERVER"; then
9925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_XSERVER" >&5
9926$as_echo "$HAVE_XSERVER" >&6; }
9927else
9928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9929$as_echo "no" >&6; }
9930fi
9931
9932
9933 if test "$HAVE_XSERVER" = true ||
9934 test -n "$DISPLAY" ||
9935 test "`echo /usr/lib/libX11.*`" != "/usr/lib/libX11.*"; then
9936 as_fn_error "You seem to be running X, but no X development libraries
9937were found. You should install the relevant development files for X
9938and for the toolkit you want, such as Gtk+, Lesstif or Motif. Also make
9939sure you have development files for image handling, i.e.
9940tiff, gif, jpeg, png and xpm.
9941If you are sure you want Emacs compiled without X window support, pass
9942 --without-x
9943to configure." "$LINENO" 5
9944 fi
9945fi
9946
9947### If we're using X11, we should use the X menu package.
9948HAVE_MENUS=no
9949case ${HAVE_X11} in
9950 yes ) HAVE_MENUS=yes ;;
9951esac
9952
9953# Does the opsystem file prohibit the use of the GNU malloc?
9954# Assume not, until told otherwise.
9955GNU_MALLOC=yes
9956
9957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc is Doug Lea style" >&5
9958$as_echo_n "checking whether malloc is Doug Lea style... " >&6; }
9959if test "${emacs_cv_var_doug_lea_malloc+set}" = set; then :
067d23c9
KY
9960 $as_echo_n "(cached) " >&6
9961else
5476a9a4
GM
9962 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9963/* end confdefs.h. */
9964#include <malloc.h>
9965 static void hook (void) {}
9966int
9967main ()
9968{
9969malloc_set_state (malloc_get_state ());
9970 __after_morecore_hook = hook;
9971 __malloc_initialize_hook = hook;
9972 ;
9973 return 0;
9974}
9975_ACEOF
9976if ac_fn_c_try_link "$LINENO"; then :
9977 emacs_cv_var_doug_lea_malloc=yes
9978else
9979 emacs_cv_var_doug_lea_malloc=no
9980fi
9981rm -f core conftest.err conftest.$ac_objext \
9982 conftest$ac_exeext conftest.$ac_ext
9983fi
9984{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_var_doug_lea_malloc" >&5
9985$as_echo "$emacs_cv_var_doug_lea_malloc" >&6; }
9986doug_lea_malloc=$emacs_cv_var_doug_lea_malloc
9987
9988
9989system_malloc=no
9990case "$opsys" in
9991 ## darwin ld insists on the use of malloc routines in the System framework.
9992 darwin|sol2-10) system_malloc=yes ;;
9993esac
9994
9995if test "${system_malloc}" = "yes"; then
9996
9997$as_echo "#define SYSTEM_MALLOC 1" >>confdefs.h
9998
9999 GNU_MALLOC=no
10000 GNU_MALLOC_reason="
10001 (The GNU allocators don't work with this system configuration.)"
10002 GMALLOC_OBJ=
10003 VMLIMIT_OBJ=
10004else
10005 test "$doug_lea_malloc" != "yes" && GMALLOC_OBJ=gmalloc.o
10006 VMLIMIT_OBJ=vm-limit.o
ce9ae7ca
GM
10007
10008 for ac_header in sys/vlimit.h
10009do :
10010 ac_fn_c_check_header_mongrel "$LINENO" "sys/vlimit.h" "ac_cv_header_sys_vlimit_h" "$ac_includes_default"
10011if test "x$ac_cv_header_sys_vlimit_h" = x""yes; then :
10012 cat >>confdefs.h <<_ACEOF
10013#define HAVE_SYS_VLIMIT_H 1
10014_ACEOF
10015
10016fi
10017
10018done
10019
10020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for data_start" >&5
10021$as_echo_n "checking for data_start... " >&6; }
10022if test "${emacs_cv_data_start+set}" = set; then :
10023 $as_echo_n "(cached) " >&6
10024else
10025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10026/* end confdefs.h. */
10027extern char data_start[]; char ch;
10028int
10029main ()
10030{
71e41a46 10031return data_start < &ch;
ce9ae7ca
GM
10032 ;
10033 return 0;
10034}
10035_ACEOF
10036if ac_fn_c_try_link "$LINENO"; then :
10037 emacs_cv_data_start=yes
10038else
10039 emacs_cv_data_start=no
10040fi
10041rm -f core conftest.err conftest.$ac_objext \
10042 conftest$ac_exeext conftest.$ac_ext
10043fi
10044{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_data_start" >&5
10045$as_echo "$emacs_cv_data_start" >&6; }
10046 if test $emacs_cv_data_start = yes; then
10047
10048$as_echo "#define HAVE_DATA_START 1" >>confdefs.h
10049
10050 fi
5476a9a4
GM
10051fi
10052
10053
10054
10055if test "$doug_lea_malloc" = "yes" ; then
10056 if test "$GNU_MALLOC" = yes ; then
10057 GNU_MALLOC_reason="
10058 (Using Doug Lea's new malloc from the GNU C Library.)"
10059 fi
10060
10061$as_echo "#define DOUG_LEA_MALLOC 1" >>confdefs.h
10062
10063
10064 ## Use mmap directly for allocating larger buffers.
10065 ## FIXME this comes from src/s/{gnu,gnu-linux}.h:
10066 ## #ifdef DOUG_LEA_MALLOC; #undef REL_ALLOC; #endif
10067 ## Does the AC_FUNC_MMAP test below make this check unnecessary?
10068 case "$opsys" in
10069 gnu*) REL_ALLOC=no ;;
10070 esac
10071fi
10072
10073if test x"${REL_ALLOC}" = x; then
10074 REL_ALLOC=${GNU_MALLOC}
10075fi
10076
10077use_mmap_for_buffers=no
10078case "$opsys" in
10079 cygwin|freebsd|irix6-5) use_mmap_for_buffers=yes ;;
10080esac
10081
10082
10083
10084
10085
10086
10087
10088
10089for ac_func in getpagesize
10090do :
10091 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
10092if test "x$ac_cv_func_getpagesize" = x""yes; then :
10093 cat >>confdefs.h <<_ACEOF
10094#define HAVE_GETPAGESIZE 1
10095_ACEOF
10096
10097fi
10098done
10099
10100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
10101$as_echo_n "checking for working mmap... " >&6; }
10102if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
10103 $as_echo_n "(cached) " >&6
10104else
10105 if test "$cross_compiling" = yes; then :
10106 ac_cv_func_mmap_fixed_mapped=no
10107else
10108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10109/* end confdefs.h. */
10110$ac_includes_default
10111/* malloc might have been renamed as rpl_malloc. */
10112#undef malloc
10113
10114/* Thanks to Mike Haertel and Jim Avera for this test.
10115 Here is a matrix of mmap possibilities:
10116 mmap private not fixed
10117 mmap private fixed at somewhere currently unmapped
10118 mmap private fixed at somewhere already mapped
10119 mmap shared not fixed
10120 mmap shared fixed at somewhere currently unmapped
10121 mmap shared fixed at somewhere already mapped
10122 For private mappings, we should verify that changes cannot be read()
10123 back from the file, nor mmap's back from the file at a different
10124 address. (There have been systems where private was not correctly
10125 implemented like the infamous i386 svr4.0, and systems where the
10126 VM page cache was not coherent with the file system buffer cache
10127 like early versions of FreeBSD and possibly contemporary NetBSD.)
10128 For shared mappings, we should conversely verify that changes get
10129 propagated back to all the places they're supposed to be.
10130
10131 Grep wants private fixed already mapped.
10132 The main things grep needs to know about mmap are:
10133 * does it exist and is it safe to write into the mmap'd area
10134 * how to use it (BSD variants) */
10135
10136#include <fcntl.h>
10137#include <sys/mman.h>
10138
10139#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
10140char *malloc ();
10141#endif
10142
10143/* This mess was copied from the GNU getpagesize.h. */
10144#ifndef HAVE_GETPAGESIZE
10145# ifdef _SC_PAGESIZE
10146# define getpagesize() sysconf(_SC_PAGESIZE)
10147# else /* no _SC_PAGESIZE */
10148# ifdef HAVE_SYS_PARAM_H
10149# include <sys/param.h>
10150# ifdef EXEC_PAGESIZE
10151# define getpagesize() EXEC_PAGESIZE
10152# else /* no EXEC_PAGESIZE */
10153# ifdef NBPG
10154# define getpagesize() NBPG * CLSIZE
10155# ifndef CLSIZE
10156# define CLSIZE 1
10157# endif /* no CLSIZE */
10158# else /* no NBPG */
10159# ifdef NBPC
10160# define getpagesize() NBPC
10161# else /* no NBPC */
10162# ifdef PAGESIZE
10163# define getpagesize() PAGESIZE
10164# endif /* PAGESIZE */
10165# endif /* no NBPC */
10166# endif /* no NBPG */
10167# endif /* no EXEC_PAGESIZE */
10168# else /* no HAVE_SYS_PARAM_H */
10169# define getpagesize() 8192 /* punt totally */
10170# endif /* no HAVE_SYS_PARAM_H */
10171# endif /* no _SC_PAGESIZE */
10172
10173#endif /* no HAVE_GETPAGESIZE */
10174
10175int
10176main ()
10177{
10178 char *data, *data2, *data3;
10179 const char *cdata2;
10180 int i, pagesize;
10181 int fd, fd2;
10182
10183 pagesize = getpagesize ();
10184
10185 /* First, make a file with some known garbage in it. */
10186 data = (char *) malloc (pagesize);
10187 if (!data)
10188 return 1;
10189 for (i = 0; i < pagesize; ++i)
10190 *(data + i) = rand ();
10191 umask (0);
10192 fd = creat ("conftest.mmap", 0600);
10193 if (fd < 0)
10194 return 2;
10195 if (write (fd, data, pagesize) != pagesize)
10196 return 3;
10197 close (fd);
10198
10199 /* Next, check that the tail of a page is zero-filled. File must have
10200 non-zero length, otherwise we risk SIGBUS for entire page. */
10201 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
10202 if (fd2 < 0)
10203 return 4;
10204 cdata2 = "";
10205 if (write (fd2, cdata2, 1) != 1)
10206 return 5;
10207 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
10208 if (data2 == MAP_FAILED)
10209 return 6;
10210 for (i = 0; i < pagesize; ++i)
10211 if (*(data2 + i))
10212 return 7;
10213 close (fd2);
10214 if (munmap (data2, pagesize))
10215 return 8;
10216
10217 /* Next, try to mmap the file at a fixed address which already has
10218 something else allocated at it. If we can, also make sure that
10219 we see the same garbage. */
10220 fd = open ("conftest.mmap", O_RDWR);
10221 if (fd < 0)
10222 return 9;
10223 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
10224 MAP_PRIVATE | MAP_FIXED, fd, 0L))
10225 return 10;
10226 for (i = 0; i < pagesize; ++i)
10227 if (*(data + i) != *(data2 + i))
10228 return 11;
10229
10230 /* Finally, make sure that changes to the mapped area do not
10231 percolate back to the file as seen by read(). (This is a bug on
10232 some variants of i386 svr4.0.) */
10233 for (i = 0; i < pagesize; ++i)
10234 *(data2 + i) = *(data2 + i) + 1;
10235 data3 = (char *) malloc (pagesize);
10236 if (!data3)
10237 return 12;
10238 if (read (fd, data3, pagesize) != pagesize)
10239 return 13;
10240 for (i = 0; i < pagesize; ++i)
10241 if (*(data + i) != *(data3 + i))
10242 return 14;
10243 close (fd);
10244 return 0;
10245}
10246_ACEOF
10247if ac_fn_c_try_run "$LINENO"; then :
10248 ac_cv_func_mmap_fixed_mapped=yes
10249else
10250 ac_cv_func_mmap_fixed_mapped=no
10251fi
10252rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10253 conftest.$ac_objext conftest.beam conftest.$ac_ext
10254fi
10255
10256fi
10257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
10258$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
10259if test $ac_cv_func_mmap_fixed_mapped = yes; then
10260
10261$as_echo "#define HAVE_MMAP 1" >>confdefs.h
10262
10263fi
10264rm -f conftest.mmap conftest.txt
10265
10266if test $use_mmap_for_buffers = yes; then
f199cab1 10267
5476a9a4
GM
10268$as_echo "#define USE_MMAP_FOR_BUFFERS 1" >>confdefs.h
10269
10270 REL_ALLOC=no
10271fi
10272
10273LIBS="$LIBS_SYSTEM $LIBS"
10274
10275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
10276$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
10277if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then :
10278 $as_echo_n "(cached) " >&6
067d23c9 10279else
5476a9a4
GM
10280 ac_check_lib_save_LIBS=$LIBS
10281LIBS="-ldnet $LIBS"
10282cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 10283/* end confdefs.h. */
067d23c9 10284
5476a9a4
GM
10285/* Override any GCC internal prototype to avoid an error.
10286 Use char because int might match the return type of a GCC
10287 builtin and then its argument prototype would still apply. */
10288#ifdef __cplusplus
10289extern "C"
10290#endif
10291char dnet_ntoa ();
10292int
10293main ()
f199cab1 10294{
5476a9a4
GM
10295return dnet_ntoa ();
10296 ;
10297 return 0;
f199cab1 10298}
5476a9a4
GM
10299_ACEOF
10300if ac_fn_c_try_link "$LINENO"; then :
10301 ac_cv_lib_dnet_dnet_ntoa=yes
10302else
10303 ac_cv_lib_dnet_dnet_ntoa=no
10304fi
10305rm -f core conftest.err conftest.$ac_objext \
10306 conftest$ac_exeext conftest.$ac_ext
10307LIBS=$ac_check_lib_save_LIBS
10308fi
10309{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
10310$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
10311if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then :
10312 cat >>confdefs.h <<_ACEOF
10313#define HAVE_LIBDNET 1
10314_ACEOF
10315
10316 LIBS="-ldnet $LIBS"
10317
10318fi
10319
10320
10321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lXbsd" >&5
10322$as_echo_n "checking for main in -lXbsd... " >&6; }
10323if test "${ac_cv_lib_Xbsd_main+set}" = set; then :
10324 $as_echo_n "(cached) " >&6
10325else
10326 ac_check_lib_save_LIBS=$LIBS
10327LIBS="-lXbsd $LIBS"
10328cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10329/* end confdefs.h. */
10330
10331
10332int
10333main ()
f199cab1 10334{
5476a9a4
GM
10335return main ();
10336 ;
10337 return 0;
f199cab1 10338}
5476a9a4
GM
10339_ACEOF
10340if ac_fn_c_try_link "$LINENO"; then :
10341 ac_cv_lib_Xbsd_main=yes
10342else
10343 ac_cv_lib_Xbsd_main=no
10344fi
10345rm -f core conftest.err conftest.$ac_objext \
10346 conftest$ac_exeext conftest.$ac_ext
10347LIBS=$ac_check_lib_save_LIBS
10348fi
10349{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xbsd_main" >&5
10350$as_echo "$ac_cv_lib_Xbsd_main" >&6; }
10351if test "x$ac_cv_lib_Xbsd_main" = x""yes; then :
10352 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
10353fi
10354
10355
10356LIB_PTHREAD=
10357
10358
10359
10360if test "$ac_cv_header_pthread_h"; then
10361 if test "$GMALLOC_OBJ" = gmalloc.o; then
10362 emacs_pthread_function=pthread_atfork
10363 else
10364 emacs_pthread_function=pthread_self
10365 fi
10366 as_ac_Lib=`$as_echo "ac_cv_lib_pthread_$emacs_pthread_function" | $as_tr_sh`
10367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $emacs_pthread_function in -lpthread" >&5
10368$as_echo_n "checking for $emacs_pthread_function in -lpthread... " >&6; }
10369if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
10370 $as_echo_n "(cached) " >&6
10371else
10372 ac_check_lib_save_LIBS=$LIBS
10373LIBS="-lpthread $LIBS"
10374cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10375/* end confdefs.h. */
10376
10377/* Override any GCC internal prototype to avoid an error.
10378 Use char because int might match the return type of a GCC
10379 builtin and then its argument prototype would still apply. */
10380#ifdef __cplusplus
10381extern "C"
10382#endif
10383char $emacs_pthread_function ();
10384int
10385main ()
f199cab1 10386{
5476a9a4
GM
10387return $emacs_pthread_function ();
10388 ;
10389 return 0;
f199cab1 10390}
5476a9a4
GM
10391_ACEOF
10392if ac_fn_c_try_link "$LINENO"; then :
10393 eval "$as_ac_Lib=yes"
10394else
10395 eval "$as_ac_Lib=no"
10396fi
10397rm -f core conftest.err conftest.$ac_objext \
10398 conftest$ac_exeext conftest.$ac_ext
10399LIBS=$ac_check_lib_save_LIBS
10400fi
10401eval ac_res=\$$as_ac_Lib
10402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10403$as_echo "$ac_res" >&6; }
10404eval as_val=\$$as_ac_Lib
10405 if test "x$as_val" = x""yes; then :
10406 HAVE_PTHREAD=yes
10407fi
10408
10409fi
10410if test "$HAVE_PTHREAD" = yes; then
10411 case "${canonical}" in
10412 *-hpux*) ;;
10413 *) LIB_PTHREAD="-lpthread"
10414 LIBS="$LIB_PTHREAD $LIBS" ;;
10415 esac
10416
10417$as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
10418
10419fi
10420
10421
10422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cma_open in -lpthreads" >&5
10423$as_echo_n "checking for cma_open in -lpthreads... " >&6; }
10424if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then :
10425 $as_echo_n "(cached) " >&6
10426else
10427 ac_check_lib_save_LIBS=$LIBS
10428LIBS="-lpthreads $LIBS"
10429cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10430/* end confdefs.h. */
10431
10432/* Override any GCC internal prototype to avoid an error.
10433 Use char because int might match the return type of a GCC
10434 builtin and then its argument prototype would still apply. */
10435#ifdef __cplusplus
10436extern "C"
f199cab1 10437#endif
5476a9a4
GM
10438char cma_open ();
10439int
10440main ()
10441{
10442return cma_open ();
10443 ;
10444 return 0;
f199cab1 10445}
5476a9a4
GM
10446_ACEOF
10447if ac_fn_c_try_link "$LINENO"; then :
10448 ac_cv_lib_pthreads_cma_open=yes
10449else
10450 ac_cv_lib_pthreads_cma_open=no
10451fi
10452rm -f core conftest.err conftest.$ac_objext \
10453 conftest$ac_exeext conftest.$ac_ext
10454LIBS=$ac_check_lib_save_LIBS
10455fi
10456{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_cma_open" >&5
10457$as_echo "$ac_cv_lib_pthreads_cma_open" >&6; }
10458if test "x$ac_cv_lib_pthreads_cma_open" = x""yes; then :
10459 cat >>confdefs.h <<_ACEOF
10460#define HAVE_LIBPTHREADS 1
10461_ACEOF
10462
10463 LIBS="-lpthreads $LIBS"
10464
10465fi
10466
10467
10468## Note: when using cpp in s/aix4.2.h, this definition depended on
10469## HAVE_LIBPTHREADS. That was not defined earlier in configure when
10470## the system file was sourced. Hence the value of LIBS_SYSTEM
10471## added to LIBS in configure would never contain the pthreads part,
10472## but the value used in Makefiles might. FIXME?
10473##
10474## -lpthreads seems to be necessary for Xlib in X11R6, and should
10475## be harmless on older versions of X where it happens to exist.
10476test "$opsys" = "aix4-2" && \
10477 test $ac_cv_lib_pthreads_cma_open = yes && \
10478 LIBS_SYSTEM="$LIBS_SYSTEM -lpthreads"
10479
10480
10481case ${host_os} in
10482aix*)
10483 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
10484$as_echo_n "checking for -bbigtoc option... " >&6; }
10485if test "${gdb_cv_bigtoc+set}" = set; then :
10486 $as_echo_n "(cached) " >&6
10487else
10488
10489 case $GCC in
10490 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
10491 *) gdb_cv_bigtoc=-bbigtoc ;;
10492 esac
067d23c9 10493
5476a9a4
GM
10494 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
10495 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10496/* end confdefs.h. */
067d23c9
KY
10497
10498int
10499main ()
10500{
5476a9a4
GM
10501int i;
10502 ;
10503 return 0;
10504}
10505_ACEOF
10506if ac_fn_c_try_link "$LINENO"; then :
067d23c9 10507
5476a9a4
GM
10508else
10509 gdb_cv_bigtoc=
10510fi
10511rm -f core conftest.err conftest.$ac_objext \
10512 conftest$ac_exeext conftest.$ac_ext
067d23c9 10513
5476a9a4
GM
10514fi
10515{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
10516$as_echo "$gdb_cv_bigtoc" >&6; }
10517 ;;
10518esac
067d23c9 10519
5476a9a4
GM
10520# Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets
10521# used for the tests that follow. We set them back to REAL_CFLAGS and
10522# REAL_CPPFLAGS later on.
067d23c9 10523
5476a9a4
GM
10524REAL_CFLAGS="$CFLAGS"
10525REAL_CPPFLAGS="$CPPFLAGS"
10526
10527if test "${HAVE_X11}" = "yes"; then
10528 DEFS="$C_SWITCH_X_SITE $DEFS"
10529 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
10530 LIBS="-lX11 $LIBS"
10531 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
10532 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
10533
10534 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
10535 # This is handled by LD_SWITCH_X_SITE_RPATH during the real build,
10536 # but it's more convenient here to set LD_RUN_PATH since this
10537 # also works on hosts that don't understand LD_SWITCH_X_SITE_RPATH.
10538 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
10539 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
10540 export LD_RUN_PATH
10541 fi
10542
10543 if test "${opsys}" = "gnu-linux"; then
10544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether X on GNU/Linux needs -b to link" >&5
10545$as_echo_n "checking whether X on GNU/Linux needs -b to link... " >&6; }
10546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10547/* end confdefs.h. */
067d23c9 10548
5476a9a4
GM
10549int
10550main ()
10551{
10552XOpenDisplay ("foo");
f199cab1 10553 ;
067d23c9
KY
10554 return 0;
10555}
10556_ACEOF
5476a9a4
GM
10557if ac_fn_c_try_link "$LINENO"; then :
10558 xgnu_linux_first_failure=no
067d23c9 10559else
5476a9a4 10560 xgnu_linux_first_failure=yes
067d23c9 10561fi
5476a9a4
GM
10562rm -f core conftest.err conftest.$ac_objext \
10563 conftest$ac_exeext conftest.$ac_ext
10564 if test "${xgnu_linux_first_failure}" = "yes"; then
10565 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
10566 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
10567 OLD_CPPFLAGS="$CPPFLAGS"
10568 OLD_LIBS="$LIBS"
10569 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
10570 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
10571 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
10572 LIBS="$LIBS -b i486-linuxaout"
10573 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10574/* end confdefs.h. */
067d23c9 10575
5476a9a4
GM
10576int
10577main ()
10578{
10579XOpenDisplay ("foo");
10580 ;
10581 return 0;
10582}
10583_ACEOF
10584if ac_fn_c_try_link "$LINENO"; then :
10585 xgnu_linux_second_failure=no
10586else
10587 xgnu_linux_second_failure=yes
067d23c9 10588fi
5476a9a4
GM
10589rm -f core conftest.err conftest.$ac_objext \
10590 conftest$ac_exeext conftest.$ac_ext
10591 if test "${xgnu_linux_second_failure}" = "yes"; then
10592 # If we get the same failure with -b, there is no use adding -b.
10593 # So take it out. This plays safe.
10594 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
10595 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
10596 CPPFLAGS="$OLD_CPPFLAGS"
10597 LIBS="$OLD_LIBS"
10598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10599$as_echo "no" >&6; }
10600 else
10601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10602$as_echo "yes" >&6; }
10603 fi
0eb4e0df 10604 else
5476a9a4
GM
10605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10606$as_echo "no" >&6; }
10607 fi
10608 fi
0eb4e0df 10609
5476a9a4
GM
10610 # Reportedly, some broken Solaris systems have XKBlib.h but are missing
10611 # header files included from there.
10612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Xkb" >&5
10613$as_echo_n "checking for Xkb... " >&6; }
0eb4e0df
GM
10614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10615/* end confdefs.h. */
5476a9a4
GM
10616#include <X11/Xlib.h>
10617#include <X11/XKBlib.h>
0eb4e0df
GM
10618int
10619main ()
10620{
5476a9a4 10621XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);
0eb4e0df
GM
10622 ;
10623 return 0;
10624}
10625_ACEOF
5476a9a4
GM
10626if ac_fn_c_try_link "$LINENO"; then :
10627 emacs_xkb=yes
0eb4e0df 10628else
5476a9a4 10629 emacs_xkb=no
0eb4e0df 10630fi
5476a9a4
GM
10631rm -f core conftest.err conftest.$ac_objext \
10632 conftest$ac_exeext conftest.$ac_ext
10633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_xkb" >&5
10634$as_echo "$emacs_xkb" >&6; }
10635 if test $emacs_xkb = yes; then
1abfdc54 10636
5476a9a4 10637$as_echo "#define HAVE_XKBGETKEYBOARD 1" >>confdefs.h
1abfdc54 10638
e1fefc61 10639 fi
1abfdc54 10640
5476a9a4
GM
10641 for ac_func in XrmSetDatabase XScreenResourceString \
10642XScreenNumberOfScreen
10643do :
10644 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10645ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10646eval as_val=\$$as_ac_var
10647 if test "x$as_val" = x""yes; then :
10648 cat >>confdefs.h <<_ACEOF
10649#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
f199cab1 10650_ACEOF
1abfdc54 10651
5476a9a4
GM
10652fi
10653done
1abfdc54 10654
5476a9a4 10655fi
1abfdc54 10656
5476a9a4
GM
10657if test "${window_system}" = "x11"; then
10658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 version 6" >&5
10659$as_echo_n "checking X11 version 6... " >&6; }
10660 if test "${emacs_cv_x11_version_6+set}" = set; then :
067d23c9
KY
10661 $as_echo_n "(cached) " >&6
10662else
5476a9a4 10663 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 10664/* end confdefs.h. */
5476a9a4 10665#include <X11/Xlib.h>
067d23c9
KY
10666int
10667main ()
10668{
5476a9a4
GM
10669#if XlibSpecificationRelease < 6
10670fail;
10671#endif
10672
067d23c9
KY
10673 ;
10674 return 0;
10675}
10676_ACEOF
5476a9a4
GM
10677if ac_fn_c_try_link "$LINENO"; then :
10678 emacs_cv_x11_version_6=yes
10679else
10680 emacs_cv_x11_version_6=no
10681fi
10682rm -f core conftest.err conftest.$ac_objext \
10683 conftest$ac_exeext conftest.$ac_ext
067d23c9 10684fi
f199cab1 10685
5476a9a4
GM
10686 if test $emacs_cv_x11_version_6 = yes; then
10687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5
10688$as_echo "6 or newer" >&6; }
f199cab1 10689
5476a9a4 10690$as_echo "#define HAVE_X11R6 1" >>confdefs.h
f199cab1
GM
10691
10692
5476a9a4 10693$as_echo "#define HAVE_X_I18N 1" >>confdefs.h
f199cab1 10694
5476a9a4
GM
10695 ## inoue@ainet.or.jp says Solaris has a bug related to X11R6-style
10696 ## XIM support.
10697 case "$opsys" in
10698 sol2-*) : ;;
10699 *)
10700$as_echo "#define HAVE_X11R6_XIM 1" >>confdefs.h
f199cab1 10701
5476a9a4
GM
10702 ;;
10703 esac
10704 else
10705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5
10706$as_echo "before 6" >&6; }
10707 fi
10708fi
f199cab1 10709
067d23c9 10710
5476a9a4
GM
10711### Use -lrsvg-2 if available, unless `--with-rsvg=no' is specified.
10712HAVE_RSVG=no
10713if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes"; then
10714 if test "${with_rsvg}" != "no"; then
10715 RSVG_REQUIRED=2.11.0
10716 RSVG_MODULE="librsvg-2.0 >= $RSVG_REQUIRED"
067d23c9 10717
f199cab1 10718
5476a9a4 10719 succeeded=no
067d23c9 10720
5476a9a4
GM
10721 if test "$PKG_CONFIG" = "no" ; then
10722 :
10723 else
10724 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 10725 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
10726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $RSVG_MODULE" >&5
10727$as_echo_n "checking for $RSVG_MODULE... " >&6; }
f199cab1 10728
b5591ebb
GM
10729 if "$PKG_CONFIG" --exists "$RSVG_MODULE" 2>&5 &&
10730 RSVG_CFLAGS=`"$PKG_CONFIG" --cflags "$RSVG_MODULE" 2>&5` &&
10731 RSVG_LIBS=`"$PKG_CONFIG" --libs "$RSVG_MODULE" 2>&5`; then
5476a9a4
GM
10732 edit_cflags="
10733 s,///*,/,g
10734 s/^/ /
10735 s/ -I/ $isystem/g
10736 s/^ //
10737 "
10738 RSVG_CFLAGS=`$as_echo "$RSVG_CFLAGS" | sed -e "$edit_cflags"`
10739 RSVG_LIBS=`$as_echo "$RSVG_LIBS" | sed -e 's,///*,/,g'`
10740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$RSVG_CFLAGS' LIBS='$RSVG_LIBS'" >&5
10741$as_echo "yes CFLAGS='$RSVG_CFLAGS' LIBS='$RSVG_LIBS'" >&6; }
10742 succeeded=yes
10743 else
10744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10745$as_echo "no" >&6; }
10746 RSVG_CFLAGS=""
10747 RSVG_LIBS=""
10748 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
10749 ## do set a variable so people can do so. Do it in a subshell
10750 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 10751 RSVG_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$RSVG_MODULE") 2>&1`
f199cab1 10752
5476a9a4 10753 fi
067d23c9 10754
067d23c9 10755
067d23c9 10756
f199cab1 10757 else
5476a9a4
GM
10758 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10759 echo "*** See http://www.freedesktop.org/software/pkgconfig"
f199cab1 10760 fi
5476a9a4
GM
10761 fi
10762
10763 if test $succeeded = yes; then
10764 HAVE_RSVG=yes
10765 else
10766 :
10767 fi
067d23c9 10768
067d23c9 10769
067d23c9 10770
f199cab1 10771
5476a9a4 10772 if test $HAVE_RSVG = yes; then
f199cab1 10773
5476a9a4
GM
10774$as_echo "#define HAVE_RSVG 1" >>confdefs.h
10775
10776 CFLAGS="$CFLAGS $RSVG_CFLAGS"
10777 LIBS="$RSVG_LIBS $LIBS"
10778 fi
f199cab1 10779 fi
5476a9a4 10780fi
f199cab1 10781
5476a9a4
GM
10782HAVE_IMAGEMAGICK=no
10783if test "${HAVE_X11}" = "yes"; then
10784 if test "${with_imagemagick}" != "no"; then
10785 ## 6.2.8 is the earliest version known to work, but earlier versions
10786 ## might work - let us know if you find one.
10787 ## 6.0.7 does not work. See bug#7955.
0cb77136
GM
10788 ## 6.8.2 makes Emacs crash; see Bug#13867.
10789 IMAGEMAGICK_MODULE="Wand >= 6.2.8 Wand != 6.8.2"
f199cab1 10790
5476a9a4 10791 succeeded=no
f199cab1 10792
5476a9a4
GM
10793 if test "$PKG_CONFIG" = "no" ; then
10794 :
10795 else
10796 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 10797 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
10798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $IMAGEMAGICK_MODULE" >&5
10799$as_echo_n "checking for $IMAGEMAGICK_MODULE... " >&6; }
f199cab1 10800
b5591ebb
GM
10801 if "$PKG_CONFIG" --exists "$IMAGEMAGICK_MODULE" 2>&5 &&
10802 IMAGEMAGICK_CFLAGS=`"$PKG_CONFIG" --cflags "$IMAGEMAGICK_MODULE" 2>&5` &&
10803 IMAGEMAGICK_LIBS=`"$PKG_CONFIG" --libs "$IMAGEMAGICK_MODULE" 2>&5`; then
5476a9a4
GM
10804 edit_cflags="
10805 s,///*,/,g
10806 s/^/ /
10807 s/ -I/ $isystem/g
10808 s/^ //
10809 "
10810 IMAGEMAGICK_CFLAGS=`$as_echo "$IMAGEMAGICK_CFLAGS" | sed -e "$edit_cflags"`
10811 IMAGEMAGICK_LIBS=`$as_echo "$IMAGEMAGICK_LIBS" | sed -e 's,///*,/,g'`
10812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$IMAGEMAGICK_CFLAGS' LIBS='$IMAGEMAGICK_LIBS'" >&5
10813$as_echo "yes CFLAGS='$IMAGEMAGICK_CFLAGS' LIBS='$IMAGEMAGICK_LIBS'" >&6; }
10814 succeeded=yes
10815 else
10816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10817$as_echo "no" >&6; }
10818 IMAGEMAGICK_CFLAGS=""
10819 IMAGEMAGICK_LIBS=""
10820 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
10821 ## do set a variable so people can do so. Do it in a subshell
10822 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 10823 IMAGEMAGICK_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$IMAGEMAGICK_MODULE") 2>&1`
f199cab1 10824
5476a9a4 10825 fi
f199cab1 10826
f199cab1 10827
f199cab1 10828
5476a9a4
GM
10829 else
10830 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10831 echo "*** See http://www.freedesktop.org/software/pkgconfig"
10832 fi
f199cab1 10833 fi
5476a9a4
GM
10834
10835 if test $succeeded = yes; then
10836 HAVE_IMAGEMAGICK=yes
f199cab1 10837 else
5476a9a4 10838 :
067d23c9
KY
10839 fi
10840
f199cab1 10841
067d23c9 10842
f199cab1 10843
5476a9a4 10844 if test $HAVE_IMAGEMAGICK = yes; then
067d23c9 10845
5476a9a4 10846$as_echo "#define HAVE_IMAGEMAGICK 1" >>confdefs.h
f199cab1 10847
5476a9a4
GM
10848 CFLAGS="$CFLAGS $IMAGEMAGICK_CFLAGS"
10849 LIBS="$IMAGEMAGICK_LIBS $LIBS"
10850 for ac_func in MagickExportImagePixels MagickMergeImageLayers
10851do :
10852 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10853ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10854eval as_val=\$$as_ac_var
10855 if test "x$as_val" = x""yes; then :
10856 cat >>confdefs.h <<_ACEOF
10857#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
067d23c9 10858_ACEOF
f199cab1
GM
10859
10860fi
5476a9a4
GM
10861done
10862
067d23c9
KY
10863 fi
10864 fi
5476a9a4 10865fi
067d23c9 10866
f199cab1 10867
5476a9a4
GM
10868HAVE_GTK=no
10869GTK_OBJ=
4fa92495
GM
10870check_gtk2=no
10871gtk3_pkg_errors=
10872if test "${with_gtk3}" = "yes" || test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "maybe"; then
5476a9a4
GM
10873 GLIB_REQUIRED=2.28
10874 GTK_REQUIRED=3.0
10875 GTK_MODULES="gtk+-3.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
f199cab1
GM
10876
10877
5476a9a4 10878 succeeded=no
f199cab1 10879
5476a9a4
GM
10880 if test "$PKG_CONFIG" = "no" ; then
10881 pkg_check_gtk=no
10882 else
10883 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 10884 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
10885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5
10886$as_echo_n "checking for $GTK_MODULES... " >&6; }
f199cab1 10887
b5591ebb
GM
10888 if "$PKG_CONFIG" --exists "$GTK_MODULES" 2>&5 &&
10889 GTK_CFLAGS=`"$PKG_CONFIG" --cflags "$GTK_MODULES" 2>&5` &&
10890 GTK_LIBS=`"$PKG_CONFIG" --libs "$GTK_MODULES" 2>&5`; then
5476a9a4
GM
10891 edit_cflags="
10892 s,///*,/,g
10893 s/^/ /
10894 s/ -I/ $isystem/g
10895 s/^ //
10896 "
10897 GTK_CFLAGS=`$as_echo "$GTK_CFLAGS" | sed -e "$edit_cflags"`
10898 GTK_LIBS=`$as_echo "$GTK_LIBS" | sed -e 's,///*,/,g'`
10899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&5
10900$as_echo "yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&6; }
10901 succeeded=yes
10902 else
10903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10904$as_echo "no" >&6; }
10905 GTK_CFLAGS=""
10906 GTK_LIBS=""
10907 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
10908 ## do set a variable so people can do so. Do it in a subshell
10909 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 10910 GTK_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$GTK_MODULES") 2>&1`
f199cab1 10911
5476a9a4 10912 fi
f199cab1 10913
f199cab1 10914
f199cab1 10915
5476a9a4
GM
10916 else
10917 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10918 echo "*** See http://www.freedesktop.org/software/pkgconfig"
f199cab1 10919 fi
5476a9a4 10920 fi
067d23c9 10921
5476a9a4
GM
10922 if test $succeeded = yes; then
10923 pkg_check_gtk=yes
10924 else
10925 pkg_check_gtk=no
10926 fi
067d23c9 10927
4fa92495 10928 if test "$pkg_check_gtk" = "no" && test "$with_gtk3" = "yes"; then
5476a9a4 10929 as_fn_error "$GTK_PKG_ERRORS" "$LINENO" 5
067d23c9 10930 fi
4fa92495 10931 if test "$pkg_check_gtk" = "yes"; then
067d23c9 10932
5476a9a4 10933$as_echo "#define HAVE_GTK3 1" >>confdefs.h
067d23c9 10934
4fa92495
GM
10935 GTK_OBJ=emacsgtkfixed.o
10936 term_header=gtkutil.h
a732eace 10937 USE_GTK_TOOLKIT="GTK3"
4efe5ef9
GM
10938 if test "x$ac_enable_gtk_deprecation_warnings" = x; then
10939 GTK_CFLAGS="$GTK_CFLAGS -DGDK_DISABLE_DEPRECATION_WARNINGS"
10940 fi
4fa92495
GM
10941 else
10942 check_gtk2=yes
10943 gtk3_pkg_errors="$GTK_PKG_ERRORS "
10944 fi
5476a9a4 10945fi
067d23c9 10946
4fa92495 10947if test "${with_gtk2}" = "yes" || test "$check_gtk2" = "yes"; then
5476a9a4
GM
10948 GLIB_REQUIRED=2.10
10949 GTK_REQUIRED=2.10
10950 GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
f199cab1 10951
5476a9a4
GM
10952
10953 succeeded=no
10954
10955 if test "$PKG_CONFIG" = "no" ; then
10956 pkg_check_gtk=no
10957 else
10958 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 10959 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
10960 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5
10961$as_echo_n "checking for $GTK_MODULES... " >&6; }
10962
b5591ebb
GM
10963 if "$PKG_CONFIG" --exists "$GTK_MODULES" 2>&5 &&
10964 GTK_CFLAGS=`"$PKG_CONFIG" --cflags "$GTK_MODULES" 2>&5` &&
10965 GTK_LIBS=`"$PKG_CONFIG" --libs "$GTK_MODULES" 2>&5`; then
5476a9a4
GM
10966 edit_cflags="
10967 s,///*,/,g
10968 s/^/ /
10969 s/ -I/ $isystem/g
10970 s/^ //
10971 "
10972 GTK_CFLAGS=`$as_echo "$GTK_CFLAGS" | sed -e "$edit_cflags"`
10973 GTK_LIBS=`$as_echo "$GTK_LIBS" | sed -e 's,///*,/,g'`
10974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&5
10975$as_echo "yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&6; }
10976 succeeded=yes
10977 else
10978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10979$as_echo "no" >&6; }
10980 GTK_CFLAGS=""
10981 GTK_LIBS=""
10982 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
10983 ## do set a variable so people can do so. Do it in a subshell
10984 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 10985 GTK_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$GTK_MODULES") 2>&1`
5476a9a4
GM
10986
10987 fi
10988
10989
10990
10991 else
10992 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10993 echo "*** See http://www.freedesktop.org/software/pkgconfig"
10994 fi
10995 fi
10996
10997 if test $succeeded = yes; then
10998 pkg_check_gtk=yes
10999 else
11000 pkg_check_gtk=no
11001 fi
11002
e2d8f316
GM
11003 if test "$pkg_check_gtk" = "no" &&
11004 { test "$with_gtk" = yes || test "$with_gtk2" = "yes"; }
11005 then
11006 as_fn_error "$gtk3_pkg_errors$GTK_PKG_ERRORS" "$LINENO" 5
5476a9a4 11007 fi
a732eace 11008 test "$pkg_check_gtk" = "yes" && USE_GTK_TOOLKIT="GTK2"
067d23c9 11009fi
067d23c9 11010
5476a9a4
GM
11011if test x"$pkg_check_gtk" = xyes; then
11012
11013
11014
11015 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS"
11016 CFLAGS="$CFLAGS $GTK_CFLAGS"
11017 LIBS="$GTK_LIBS $LIBS"
11018 GTK_COMPILES=no
11019 for ac_func in gtk_main
11020do :
11021 ac_fn_c_check_func "$LINENO" "gtk_main" "ac_cv_func_gtk_main"
11022if test "x$ac_cv_func_gtk_main" = x""yes; then :
11023 cat >>confdefs.h <<_ACEOF
11024#define HAVE_GTK_MAIN 1
11025_ACEOF
11026 GTK_COMPILES=yes
f199cab1 11027fi
5476a9a4 11028done
067d23c9 11029
5476a9a4
GM
11030 if test "${GTK_COMPILES}" != "yes"; then
11031 if test "$USE_X_TOOLKIT" != "maybe"; then
11032 as_fn_error "Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" "$LINENO" 5;
11033 fi
11034 else
11035 HAVE_GTK=yes
11036
11037$as_echo "#define USE_GTK 1" >>confdefs.h
067d23c9 11038
5476a9a4
GM
11039 GTK_OBJ="gtkutil.o $GTK_OBJ"
11040 USE_X_TOOLKIT=none
b5591ebb 11041 if "$PKG_CONFIG" --atleast-version=2.10 gtk+-2.0; then
5476a9a4
GM
11042 :
11043 else
11044 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your version of Gtk+ will have problems with
11045 closing open displays. This is no problem if you just use
11046 one display, but if you use more than one and close one of them
11047 Emacs may crash." >&5
11048$as_echo "$as_me: WARNING: Your version of Gtk+ will have problems with
11049 closing open displays. This is no problem if you just use
11050 one display, but if you use more than one and close one of them
11051 Emacs may crash." >&2;}
11052 sleep 3
11053 fi
067d23c9
KY
11054 fi
11055
5476a9a4 11056fi
067d23c9
KY
11057
11058
11059
5476a9a4 11060if test "${HAVE_GTK}" = "yes"; then
067d23c9 11061
5476a9a4
GM
11062 if test "$with_toolkit_scroll_bars" != no; then
11063 with_toolkit_scroll_bars=yes
11064 fi
067d23c9 11065
5476a9a4
GM
11066 HAVE_GTK_FILE_SELECTION=no
11067 ac_fn_c_check_decl "$LINENO" "GTK_TYPE_FILE_SELECTION" "ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" "$ac_includes_default
11068#include <gtk/gtk.h>
11069"
11070if test "x$ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" = x""yes; then :
11071 HAVE_GTK_FILE_SELECTION=yes
11072else
11073 HAVE_GTK_FILE_SELECTION=no
11074fi
067d23c9 11075
5476a9a4
GM
11076 if test "$HAVE_GTK_FILE_SELECTION" = yes; then
11077 for ac_func in gtk_file_selection_new
11078do :
11079 ac_fn_c_check_func "$LINENO" "gtk_file_selection_new" "ac_cv_func_gtk_file_selection_new"
11080if test "x$ac_cv_func_gtk_file_selection_new" = x""yes; then :
11081 cat >>confdefs.h <<_ACEOF
11082#define HAVE_GTK_FILE_SELECTION_NEW 1
f199cab1 11083_ACEOF
067d23c9 11084
f199cab1 11085fi
5476a9a4
GM
11086done
11087
f199cab1 11088 fi
067d23c9 11089
4efe5ef9
GM
11090 HAVE_GTK_HANDLE_BOX=no
11091 ac_fn_c_check_decl "$LINENO" "GTK_TYPE_HANDLE_BOX" "ac_cv_have_decl_GTK_TYPE_HANDLE_BOX" "$ac_includes_default
11092#include <gtk/gtk.h>
11093"
11094if test "x$ac_cv_have_decl_GTK_TYPE_HANDLE_BOX" = x""yes; then :
11095 HAVE_GTK_HANDLE_BOX=yes
11096else
11097 HAVE_GTK_HANDLE_BOX=no
11098fi
11099
11100 if test "$HAVE_GTK_HANDLE_BOX" = yes; then
11101 for ac_func in gtk_handle_box_new
11102do :
11103 ac_fn_c_check_func "$LINENO" "gtk_handle_box_new" "ac_cv_func_gtk_handle_box_new"
11104if test "x$ac_cv_func_gtk_handle_box_new" = x""yes; then :
11105 cat >>confdefs.h <<_ACEOF
11106#define HAVE_GTK_HANDLE_BOX_NEW 1
11107_ACEOF
11108
11109fi
11110done
11111
11112 fi
11113
11114 HAVE_GTK_TEAROFF_MENU_ITEM=no
11115 ac_fn_c_check_decl "$LINENO" "GTK_TYPE_TEAROFF_MENU_ITEM" "ac_cv_have_decl_GTK_TYPE_TEAROFF_MENU_ITEM" "$ac_includes_default
11116#include <gtk/gtk.h>
11117"
11118if test "x$ac_cv_have_decl_GTK_TYPE_TEAROFF_MENU_ITEM" = x""yes; then :
11119 HAVE_GTK_TEAROFF_MENU_ITEM=yes
11120else
11121 HAVE_GTK_TEAROFF_MENU_ITEM=no
11122fi
11123
11124 if test "$HAVE_GTK_TEAROFF_MENU_ITEM" = yes; then
11125 for ac_func in gtk_tearoff_menu_item_new
11126do :
11127 ac_fn_c_check_func "$LINENO" "gtk_tearoff_menu_item_new" "ac_cv_func_gtk_tearoff_menu_item_new"
11128if test "x$ac_cv_func_gtk_tearoff_menu_item_new" = x""yes; then :
11129 cat >>confdefs.h <<_ACEOF
11130#define HAVE_GTK_TEAROFF_MENU_ITEM_NEW 1
11131_ACEOF
11132
11133fi
11134done
11135
11136 fi
067d23c9 11137
5476a9a4
GM
11138 for ac_func in gtk_widget_get_window gtk_widget_set_has_window \
11139 gtk_dialog_get_action_area gtk_widget_get_sensitive \
11140 gtk_widget_get_mapped gtk_adjustment_get_page_size \
11141 gtk_orientable_set_orientation \
11142 gtk_window_set_has_resize_grip
11143do :
11144 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11145ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11146eval as_val=\$$as_ac_var
11147 if test "x$as_val" = x""yes; then :
11148 cat >>confdefs.h <<_ACEOF
11149#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11150_ACEOF
067d23c9 11151
5476a9a4
GM
11152fi
11153done
067d23c9 11154
42dcba54
GM
11155
11156 term_header=gtkutil.h
5476a9a4 11157fi
067d23c9 11158
5476a9a4
GM
11159HAVE_DBUS=no
11160DBUS_OBJ=
11161if test "${with_dbus}" = "yes"; then
067d23c9 11162
5476a9a4 11163 succeeded=no
067d23c9 11164
5476a9a4
GM
11165 if test "$PKG_CONFIG" = "no" ; then
11166 HAVE_DBUS=no
f199cab1 11167 else
5476a9a4 11168 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 11169 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
11170 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbus-1 >= 1.0" >&5
11171$as_echo_n "checking for dbus-1 >= 1.0... " >&6; }
067d23c9 11172
b5591ebb
GM
11173 if "$PKG_CONFIG" --exists "dbus-1 >= 1.0" 2>&5 &&
11174 DBUS_CFLAGS=`"$PKG_CONFIG" --cflags "dbus-1 >= 1.0" 2>&5` &&
11175 DBUS_LIBS=`"$PKG_CONFIG" --libs "dbus-1 >= 1.0" 2>&5`; then
5476a9a4
GM
11176 edit_cflags="
11177 s,///*,/,g
11178 s/^/ /
11179 s/ -I/ $isystem/g
11180 s/^ //
11181 "
11182 DBUS_CFLAGS=`$as_echo "$DBUS_CFLAGS" | sed -e "$edit_cflags"`
11183 DBUS_LIBS=`$as_echo "$DBUS_LIBS" | sed -e 's,///*,/,g'`
11184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$DBUS_CFLAGS' LIBS='$DBUS_LIBS'" >&5
11185$as_echo "yes CFLAGS='$DBUS_CFLAGS' LIBS='$DBUS_LIBS'" >&6; }
11186 succeeded=yes
11187 else
11188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11189$as_echo "no" >&6; }
11190 DBUS_CFLAGS=""
11191 DBUS_LIBS=""
11192 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
11193 ## do set a variable so people can do so. Do it in a subshell
11194 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 11195 DBUS_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "dbus-1 >= 1.0") 2>&1`
067d23c9 11196
5476a9a4 11197 fi
067d23c9 11198
15f79fcd 11199
067d23c9 11200
5476a9a4
GM
11201 else
11202 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11203 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11204 fi
067d23c9 11205 fi
067d23c9 11206
5476a9a4
GM
11207 if test $succeeded = yes; then
11208 HAVE_DBUS=yes
f199cab1 11209 else
5476a9a4 11210 HAVE_DBUS=no
f199cab1 11211 fi
067d23c9 11212
5476a9a4
GM
11213 if test "$HAVE_DBUS" = yes; then
11214 LIBS="$LIBS $DBUS_LIBS"
067d23c9 11215
5476a9a4 11216$as_echo "#define HAVE_DBUS 1" >>confdefs.h
067d23c9 11217
5476a9a4
GM
11218 for ac_func in dbus_watch_get_unix_fd \
11219 dbus_type_is_valid \
11220 dbus_validate_bus_name \
11221 dbus_validate_path \
11222 dbus_validate_interface \
11223 dbus_validate_member
11224do :
11225 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11226ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11227eval as_val=\$$as_ac_var
11228 if test "x$as_val" = x""yes; then :
11229 cat >>confdefs.h <<_ACEOF
11230#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11231_ACEOF
067d23c9 11232
5476a9a4
GM
11233fi
11234done
067d23c9 11235
5476a9a4
GM
11236 DBUS_OBJ=dbusbind.o
11237 fi
11238fi
067d23c9
KY
11239
11240
5476a9a4
GM
11241HAVE_GSETTINGS=no
11242if test "${HAVE_X11}" = "yes" && test "${with_gsettings}" = "yes"; then
067d23c9 11243
5476a9a4 11244 succeeded=no
067d23c9 11245
5476a9a4
GM
11246 if test "$PKG_CONFIG" = "no" ; then
11247 HAVE_GSETTINGS=no
11248 else
11249 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 11250 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
11251 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gio-2.0 >= 2.26" >&5
11252$as_echo_n "checking for gio-2.0 >= 2.26... " >&6; }
0afb4571 11253
b5591ebb
GM
11254 if "$PKG_CONFIG" --exists "gio-2.0 >= 2.26" 2>&5 &&
11255 GSETTINGS_CFLAGS=`"$PKG_CONFIG" --cflags "gio-2.0 >= 2.26" 2>&5` &&
11256 GSETTINGS_LIBS=`"$PKG_CONFIG" --libs "gio-2.0 >= 2.26" 2>&5`; then
5476a9a4
GM
11257 edit_cflags="
11258 s,///*,/,g
11259 s/^/ /
11260 s/ -I/ $isystem/g
11261 s/^ //
11262 "
11263 GSETTINGS_CFLAGS=`$as_echo "$GSETTINGS_CFLAGS" | sed -e "$edit_cflags"`
11264 GSETTINGS_LIBS=`$as_echo "$GSETTINGS_LIBS" | sed -e 's,///*,/,g'`
11265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GSETTINGS_CFLAGS' LIBS='$GSETTINGS_LIBS'" >&5
11266$as_echo "yes CFLAGS='$GSETTINGS_CFLAGS' LIBS='$GSETTINGS_LIBS'" >&6; }
11267 succeeded=yes
11268 else
11269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11270$as_echo "no" >&6; }
11271 GSETTINGS_CFLAGS=""
11272 GSETTINGS_LIBS=""
11273 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
11274 ## do set a variable so people can do so. Do it in a subshell
11275 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 11276 GSETTINGS_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "gio-2.0 >= 2.26") 2>&1`
0afb4571 11277
5476a9a4 11278 fi
067d23c9
KY
11279
11280
11281
11282 else
5476a9a4
GM
11283 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11284 echo "*** See http://www.freedesktop.org/software/pkgconfig"
067d23c9 11285 fi
5476a9a4 11286 fi
067d23c9 11287
5476a9a4
GM
11288 if test $succeeded = yes; then
11289 HAVE_GSETTINGS=yes
11290 else
11291 HAVE_GSETTINGS=no
11292 fi
f199cab1 11293
5476a9a4 11294 if test "$HAVE_GSETTINGS" = "yes"; then
f199cab1 11295
5476a9a4 11296$as_echo "#define HAVE_GSETTINGS 1" >>confdefs.h
f199cab1 11297
5476a9a4
GM
11298 SETTINGS_CFLAGS="$GSETTINGS_CFLAGS"
11299 SETTINGS_LIBS="$GSETTINGS_LIBS"
11300 fi
11301fi
067d23c9 11302
5476a9a4
GM
11303HAVE_GCONF=no
11304if test "${HAVE_X11}" = "yes" && test "${with_gconf}" = "yes"; then
067d23c9 11305
5476a9a4 11306 succeeded=no
067d23c9 11307
5476a9a4
GM
11308 if test "$PKG_CONFIG" = "no" ; then
11309 HAVE_GCONF=no
11310 else
11311 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 11312 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
11313 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gconf-2.0 >= 2.13" >&5
11314$as_echo_n "checking for gconf-2.0 >= 2.13... " >&6; }
067d23c9 11315
b5591ebb
GM
11316 if "$PKG_CONFIG" --exists "gconf-2.0 >= 2.13" 2>&5 &&
11317 GCONF_CFLAGS=`"$PKG_CONFIG" --cflags "gconf-2.0 >= 2.13" 2>&5` &&
11318 GCONF_LIBS=`"$PKG_CONFIG" --libs "gconf-2.0 >= 2.13" 2>&5`; then
5476a9a4
GM
11319 edit_cflags="
11320 s,///*,/,g
11321 s/^/ /
11322 s/ -I/ $isystem/g
11323 s/^ //
11324 "
11325 GCONF_CFLAGS=`$as_echo "$GCONF_CFLAGS" | sed -e "$edit_cflags"`
11326 GCONF_LIBS=`$as_echo "$GCONF_LIBS" | sed -e 's,///*,/,g'`
11327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GCONF_CFLAGS' LIBS='$GCONF_LIBS'" >&5
11328$as_echo "yes CFLAGS='$GCONF_CFLAGS' LIBS='$GCONF_LIBS'" >&6; }
11329 succeeded=yes
11330 else
11331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11332$as_echo "no" >&6; }
11333 GCONF_CFLAGS=""
11334 GCONF_LIBS=""
11335 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
11336 ## do set a variable so people can do so. Do it in a subshell
11337 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 11338 GCONF_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "gconf-2.0 >= 2.13") 2>&1`
067d23c9 11339
5476a9a4 11340 fi
f199cab1 11341
f199cab1
GM
11342
11343
5476a9a4
GM
11344 else
11345 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11346 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11347 fi
11348 fi
f199cab1 11349
5476a9a4
GM
11350 if test $succeeded = yes; then
11351 HAVE_GCONF=yes
11352 else
11353 HAVE_GCONF=no
11354 fi
f199cab1 11355
5476a9a4 11356 if test "$HAVE_GCONF" = yes; then
f199cab1 11357
5476a9a4 11358$as_echo "#define HAVE_GCONF 1" >>confdefs.h
f199cab1 11359
5476a9a4
GM
11360 SETTINGS_CFLAGS="$SETTINGS_CFLAGS $GCONF_CFLAGS"
11361 SETTINGS_LIBS="$SETTINGS_LIBS $GCONF_LIBS"
11362 fi
11363fi
f199cab1 11364
5476a9a4 11365if test "$HAVE_GSETTINGS" = "yes" || test "$HAVE_GCONF" = "yes"; then
dcde497f
GM
11366
11367 succeeded=no
11368
11369 if test "$PKG_CONFIG" = "no" ; then
11370 HAVE_GOBJECT=no
11371 else
11372 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 11373 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
dcde497f
GM
11374 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gobject-2.0 >= 2.0" >&5
11375$as_echo_n "checking for gobject-2.0 >= 2.0... " >&6; }
11376
b5591ebb
GM
11377 if "$PKG_CONFIG" --exists "gobject-2.0 >= 2.0" 2>&5 &&
11378 GOBJECT_CFLAGS=`"$PKG_CONFIG" --cflags "gobject-2.0 >= 2.0" 2>&5` &&
11379 GOBJECT_LIBS=`"$PKG_CONFIG" --libs "gobject-2.0 >= 2.0" 2>&5`; then
dcde497f
GM
11380 edit_cflags="
11381 s,///*,/,g
11382 s/^/ /
11383 s/ -I/ $isystem/g
11384 s/^ //
11385 "
11386 GOBJECT_CFLAGS=`$as_echo "$GOBJECT_CFLAGS" | sed -e "$edit_cflags"`
11387 GOBJECT_LIBS=`$as_echo "$GOBJECT_LIBS" | sed -e 's,///*,/,g'`
11388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GOBJECT_CFLAGS' LIBS='$GOBJECT_LIBS'" >&5
11389$as_echo "yes CFLAGS='$GOBJECT_CFLAGS' LIBS='$GOBJECT_LIBS'" >&6; }
11390 succeeded=yes
11391 else
11392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11393$as_echo "no" >&6; }
11394 GOBJECT_CFLAGS=""
11395 GOBJECT_LIBS=""
11396 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
11397 ## do set a variable so people can do so. Do it in a subshell
11398 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 11399 GOBJECT_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "gobject-2.0 >= 2.0") 2>&1`
dcde497f
GM
11400
11401 fi
11402
11403
11404
11405 else
11406 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11407 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11408 fi
11409 fi
11410
11411 if test $succeeded = yes; then
11412 HAVE_GOBJECT=yes
11413 else
11414 HAVE_GOBJECT=no
11415 fi
11416
11417 if test "$HAVE_GOBJECT" = "yes"; then
11418 SETTINGS_CFLAGS="$SETTINGS_CFLAGS $GOBJECT_CFLAGS"
11419 SETTINGS_LIBS="$SETTINGS_LIBS $GOBJECT_LIBS"
11420 fi
5476a9a4
GM
11421 SAVE_CFLAGS="$CFLAGS"
11422 SAVE_LIBS="$LIBS"
11423 CFLAGS="$SETTINGS_CFLAGS $CFLAGS"
11424 LIBS="$SETTINGS_LIBS $LIBS"
11425 for ac_func in g_type_init
11426do :
11427 ac_fn_c_check_func "$LINENO" "g_type_init" "ac_cv_func_g_type_init"
11428if test "x$ac_cv_func_g_type_init" = x""yes; then :
11429 cat >>confdefs.h <<_ACEOF
11430#define HAVE_G_TYPE_INIT 1
067d23c9 11431_ACEOF
067d23c9 11432
5476a9a4
GM
11433fi
11434done
067d23c9 11435
5476a9a4
GM
11436 CFLAGS="$SAVE_CFLAGS"
11437 LIBS="$SAVE_LIBS"
11438fi
067d23c9 11439
067d23c9 11440
f199cab1 11441
067d23c9 11442
5476a9a4
GM
11443HAVE_LIBSELINUX=no
11444LIBSELINUX_LIBS=
11445if test "${with_selinux}" = "yes"; then
11446 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lgetfilecon in -lselinux" >&5
11447$as_echo_n "checking for lgetfilecon in -lselinux... " >&6; }
11448if test "${ac_cv_lib_selinux_lgetfilecon+set}" = set; then :
11449 $as_echo_n "(cached) " >&6
11450else
11451 ac_check_lib_save_LIBS=$LIBS
11452LIBS="-lselinux $LIBS"
11453cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11454/* end confdefs.h. */
067d23c9 11455
5476a9a4
GM
11456/* Override any GCC internal prototype to avoid an error.
11457 Use char because int might match the return type of a GCC
11458 builtin and then its argument prototype would still apply. */
11459#ifdef __cplusplus
11460extern "C"
f199cab1 11461#endif
5476a9a4 11462char lgetfilecon ();
f199cab1
GM
11463int
11464main ()
11465{
5476a9a4 11466return lgetfilecon ();
f199cab1
GM
11467 ;
11468 return 0;
11469}
11470_ACEOF
5476a9a4
GM
11471if ac_fn_c_try_link "$LINENO"; then :
11472 ac_cv_lib_selinux_lgetfilecon=yes
11473else
11474 ac_cv_lib_selinux_lgetfilecon=no
f199cab1 11475fi
5476a9a4
GM
11476rm -f core conftest.err conftest.$ac_objext \
11477 conftest$ac_exeext conftest.$ac_ext
11478LIBS=$ac_check_lib_save_LIBS
11479fi
11480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_lgetfilecon" >&5
11481$as_echo "$ac_cv_lib_selinux_lgetfilecon" >&6; }
11482if test "x$ac_cv_lib_selinux_lgetfilecon" = x""yes; then :
11483 HAVE_LIBSELINUX=yes
11484else
11485 HAVE_LIBSELINUX=no
067d23c9
KY
11486fi
11487
5476a9a4 11488 if test "$HAVE_LIBSELINUX" = yes; then
067d23c9 11489
5476a9a4 11490$as_echo "#define HAVE_LIBSELINUX 1" >>confdefs.h
067d23c9 11491
5476a9a4
GM
11492 LIBSELINUX_LIBS=-lselinux
11493 fi
f199cab1 11494fi
067d23c9 11495
067d23c9 11496
5476a9a4
GM
11497HAVE_GNUTLS=no
11498HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY=no
11499if test "${with_gnutls}" = "yes" ; then
067d23c9 11500
5476a9a4 11501 succeeded=no
067d23c9 11502
5476a9a4
GM
11503 if test "$PKG_CONFIG" = "no" ; then
11504 HAVE_GNUTLS=no
11505 else
11506 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 11507 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
11508 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gnutls >= 2.6.6" >&5
11509$as_echo_n "checking for gnutls >= 2.6.6... " >&6; }
067d23c9 11510
b5591ebb
GM
11511 if "$PKG_CONFIG" --exists "gnutls >= 2.6.6" 2>&5 &&
11512 LIBGNUTLS_CFLAGS=`"$PKG_CONFIG" --cflags "gnutls >= 2.6.6" 2>&5` &&
11513 LIBGNUTLS_LIBS=`"$PKG_CONFIG" --libs "gnutls >= 2.6.6" 2>&5`; then
5476a9a4
GM
11514 edit_cflags="
11515 s,///*,/,g
11516 s/^/ /
11517 s/ -I/ $isystem/g
11518 s/^ //
11519 "
11520 LIBGNUTLS_CFLAGS=`$as_echo "$LIBGNUTLS_CFLAGS" | sed -e "$edit_cflags"`
11521 LIBGNUTLS_LIBS=`$as_echo "$LIBGNUTLS_LIBS" | sed -e 's,///*,/,g'`
11522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBGNUTLS_CFLAGS' LIBS='$LIBGNUTLS_LIBS'" >&5
11523$as_echo "yes CFLAGS='$LIBGNUTLS_CFLAGS' LIBS='$LIBGNUTLS_LIBS'" >&6; }
11524 succeeded=yes
11525 else
11526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11527$as_echo "no" >&6; }
11528 LIBGNUTLS_CFLAGS=""
11529 LIBGNUTLS_LIBS=""
11530 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
11531 ## do set a variable so people can do so. Do it in a subshell
11532 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 11533 LIBGNUTLS_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "gnutls >= 2.6.6") 2>&1`
067d23c9 11534
5476a9a4 11535 fi
067d23c9 11536
067d23c9 11537
067d23c9 11538
5476a9a4
GM
11539 else
11540 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11541 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11542 fi
11543 fi
067d23c9 11544
5476a9a4
GM
11545 if test $succeeded = yes; then
11546 HAVE_GNUTLS=yes
11547 else
11548 HAVE_GNUTLS=no
11549 fi
067d23c9 11550
5476a9a4 11551 if test "${HAVE_GNUTLS}" = "yes"; then
067d23c9 11552
5476a9a4 11553$as_echo "#define HAVE_GNUTLS 1" >>confdefs.h
067d23c9 11554
5476a9a4 11555 fi
f199cab1 11556
5476a9a4
GM
11557 CFLAGS="$CFLAGS $LIBGNUTLS_CFLAGS"
11558 LIBS="$LIBGNUTLS_LIBS $LIBS"
11559 for ac_func in gnutls_certificate_set_verify_function
11560do :
11561 ac_fn_c_check_func "$LINENO" "gnutls_certificate_set_verify_function" "ac_cv_func_gnutls_certificate_set_verify_function"
11562if test "x$ac_cv_func_gnutls_certificate_set_verify_function" = x""yes; then :
11563 cat >>confdefs.h <<_ACEOF
11564#define HAVE_GNUTLS_CERTIFICATE_SET_VERIFY_FUNCTION 1
f199cab1 11565_ACEOF
5476a9a4
GM
11566 HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY=yes
11567fi
11568done
067d23c9
KY
11569
11570
5476a9a4
GM
11571 if test "${HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY}" = "yes"; then
11572
11573$as_echo "#define HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY 1" >>confdefs.h
f527bd02 11574
f199cab1 11575 fi
5476a9a4 11576fi
f527bd02 11577
f527bd02 11578
5476a9a4
GM
11579
11580
b5eb356a
GM
11581if test "${with_inotify}" = "yes"; then
11582 for ac_header in sys/inotify.h
11583do :
11584 ac_fn_c_check_header_mongrel "$LINENO" "sys/inotify.h" "ac_cv_header_sys_inotify_h" "$ac_includes_default"
11585if test "x$ac_cv_header_sys_inotify_h" = x""yes; then :
11586 cat >>confdefs.h <<_ACEOF
11587#define HAVE_SYS_INOTIFY_H 1
11588_ACEOF
11589
11590fi
11591
11592done
11593
11594 if test "$ac_cv_header_sys_inotify_h" = yes ; then
11595 ac_fn_c_check_func "$LINENO" "inotify_init1" "ac_cv_func_inotify_init1"
11596if test "x$ac_cv_func_inotify_init1" = x""yes; then :
11597
11598fi
11599
11600 fi
11601fi
11602if test "$ac_cv_func_inotify_init1" = yes; then
11603
11604$as_echo "#define HAVE_INOTIFY 1" >>confdefs.h
11605
11606fi
11607
4cc63c81
GM
11608HAVE_POSIX_ACL=no
11609LIBACL_LIBS=
11610if test "${with_acl}" = "yes"; then
11611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for acl_set_file in -lacl" >&5
11612$as_echo_n "checking for acl_set_file in -lacl... " >&6; }
11613if test "${ac_cv_lib_acl_acl_set_file+set}" = set; then :
11614 $as_echo_n "(cached) " >&6
11615else
11616 ac_check_lib_save_LIBS=$LIBS
11617LIBS="-lacl $LIBS"
11618cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11619/* end confdefs.h. */
11620
11621/* Override any GCC internal prototype to avoid an error.
11622 Use char because int might match the return type of a GCC
11623 builtin and then its argument prototype would still apply. */
11624#ifdef __cplusplus
11625extern "C"
11626#endif
11627char acl_set_file ();
11628int
11629main ()
11630{
11631return acl_set_file ();
11632 ;
11633 return 0;
11634}
11635_ACEOF
11636if ac_fn_c_try_link "$LINENO"; then :
11637 ac_cv_lib_acl_acl_set_file=yes
11638else
11639 ac_cv_lib_acl_acl_set_file=no
11640fi
11641rm -f core conftest.err conftest.$ac_objext \
11642 conftest$ac_exeext conftest.$ac_ext
11643LIBS=$ac_check_lib_save_LIBS
11644fi
11645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_acl_acl_set_file" >&5
11646$as_echo "$ac_cv_lib_acl_acl_set_file" >&6; }
11647if test "x$ac_cv_lib_acl_acl_set_file" = x""yes; then :
11648 HAVE_POSIX_ACL=yes
11649else
11650 HAVE_POSIX_ACL=no
11651fi
11652
11653 if test "$HAVE_POSIX_ACL" = yes; then
11654
11655$as_echo "#define HAVE_POSIX_ACL 1" >>confdefs.h
11656
11657 LIBACL_LIBS=-lacl
11658 else
11659 ac_fn_c_check_func "$LINENO" "acl_set_file" "ac_cv_func_acl_set_file"
11660if test "x$ac_cv_func_acl_set_file" = x""yes; then :
11661 HAVE_POSIX_ACL=yes
11662else
11663 HAVE_POSIX_ACL=no
11664fi
11665
11666 if test "$HAVE_POSIX_ACL" = yes; then
11667
11668$as_echo "#define HAVE_POSIX_ACL 1" >>confdefs.h
11669
11670 fi
11671 fi
11672fi
11673
11674
5476a9a4
GM
11675HAVE_XAW3D=no
11676LUCID_LIBW=
11677if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then
11678 if test "$with_xaw3d" != no; then
5476a9a4 11679 if test "${emacs_cv_xaw3d+set}" = set; then :
f199cab1
GM
11680 $as_echo_n "(cached) " >&6
11681else
5476a9a4
GM
11682 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11683/* end confdefs.h. */
f527bd02 11684
5476a9a4
GM
11685#include <X11/Intrinsic.h>
11686#include <X11/Xaw3d/Simple.h>
11687int
11688main ()
11689{
11690
11691 ;
11692 return 0;
11693}
11694_ACEOF
11695if ac_fn_c_try_link "$LINENO"; then :
11696 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XawScrollbarSetThumb in -lXaw3d" >&5
11697$as_echo_n "checking for XawScrollbarSetThumb in -lXaw3d... " >&6; }
11698if test "${ac_cv_lib_Xaw3d_XawScrollbarSetThumb+set}" = set; then :
11699 $as_echo_n "(cached) " >&6
11700else
11701 ac_check_lib_save_LIBS=$LIBS
11702LIBS="-lXaw3d $LIBS"
11703cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11704/* end confdefs.h. */
f527bd02 11705
5476a9a4
GM
11706/* Override any GCC internal prototype to avoid an error.
11707 Use char because int might match the return type of a GCC
11708 builtin and then its argument prototype would still apply. */
11709#ifdef __cplusplus
11710extern "C"
11711#endif
11712char XawScrollbarSetThumb ();
11713int
11714main ()
11715{
11716return XawScrollbarSetThumb ();
11717 ;
11718 return 0;
11719}
11720_ACEOF
11721if ac_fn_c_try_link "$LINENO"; then :
11722 ac_cv_lib_Xaw3d_XawScrollbarSetThumb=yes
f199cab1 11723else
5476a9a4 11724 ac_cv_lib_Xaw3d_XawScrollbarSetThumb=no
f199cab1 11725fi
5476a9a4
GM
11726rm -f core conftest.err conftest.$ac_objext \
11727 conftest$ac_exeext conftest.$ac_ext
11728LIBS=$ac_check_lib_save_LIBS
11729fi
11730{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&5
11731$as_echo "$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&6; }
11732if test "x$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" = x""yes; then :
11733 emacs_cv_xaw3d=yes
11734else
11735 emacs_cv_xaw3d=no
f199cab1 11736fi
f527bd02 11737
5476a9a4
GM
11738else
11739 emacs_cv_xaw3d=no
11740fi
11741rm -f core conftest.err conftest.$ac_objext \
11742 conftest$ac_exeext conftest.$ac_ext
11743fi
f527bd02 11744
5476a9a4
GM
11745 else
11746 emacs_cv_xaw3d=no
11747 fi
11748 if test $emacs_cv_xaw3d = yes; then
4fa92495
GM
11749 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xaw3d" >&5
11750$as_echo_n "checking for xaw3d... " >&6; }
5476a9a4
GM
11751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5
11752$as_echo "yes; using Lucid toolkit" >&6; }
11753 USE_X_TOOLKIT=LUCID
11754 HAVE_XAW3D=yes
11755 LUCID_LIBW=-lXaw3d
f527bd02 11756
5476a9a4 11757$as_echo "#define HAVE_XAW3D 1" >>confdefs.h
f527bd02 11758
5476a9a4 11759 else
4fa92495
GM
11760 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xaw3d" >&5
11761$as_echo_n "checking for xaw3d... " >&6; }
5476a9a4
GM
11762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11763$as_echo "no" >&6; }
11764 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libXaw" >&5
11765$as_echo_n "checking for libXaw... " >&6; }
11766 if test "${emacs_cv_xaw+set}" = set; then :
f199cab1
GM
11767 $as_echo_n "(cached) " >&6
11768else
11769 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11770/* end confdefs.h. */
067d23c9 11771
5476a9a4
GM
11772#include <X11/Intrinsic.h>
11773#include <X11/Xaw/Simple.h>
f199cab1
GM
11774int
11775main ()
11776{
067d23c9 11777
f199cab1
GM
11778 ;
11779 return 0;
11780}
11781_ACEOF
5476a9a4
GM
11782if ac_fn_c_try_link "$LINENO"; then :
11783 emacs_cv_xaw=yes
f199cab1 11784else
5476a9a4 11785 emacs_cv_xaw=no
f199cab1 11786fi
5476a9a4
GM
11787rm -f core conftest.err conftest.$ac_objext \
11788 conftest$ac_exeext conftest.$ac_ext
f199cab1 11789fi
067d23c9 11790
5476a9a4
GM
11791 if test $emacs_cv_xaw = yes; then
11792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5
11793$as_echo "yes; using Lucid toolkit" >&6; }
11794 USE_X_TOOLKIT=LUCID
11795 LUCID_LIBW=-lXaw
11796 elif test x"${USE_X_TOOLKIT}" = xLUCID; then
11797 as_fn_error "Lucid toolkit requires X11/Xaw include files" "$LINENO" 5
f199cab1 11798 else
5476a9a4
GM
11799 as_fn_error "No X toolkit could be found.
11800If you are sure you want Emacs compiled without an X toolkit, pass
11801 --with-x-toolkit=no
11802to configure. Otherwise, install the development libraries for the toolkit
11803that you want to use (e.g. Gtk+) and re-run configure." "$LINENO" 5
f199cab1 11804 fi
5476a9a4
GM
11805 fi
11806fi
067d23c9 11807
5476a9a4 11808X_TOOLKIT_TYPE=$USE_X_TOOLKIT
067d23c9 11809
5476a9a4
GM
11810LIBXTR6=
11811if test "${USE_X_TOOLKIT}" != "none"; then
11812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 toolkit version" >&5
11813$as_echo_n "checking X11 toolkit version... " >&6; }
11814 if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then :
f199cab1
GM
11815 $as_echo_n "(cached) " >&6
11816else
5476a9a4 11817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 11818/* end confdefs.h. */
5476a9a4 11819#include <X11/Intrinsic.h>
f199cab1
GM
11820int
11821main ()
11822{
5476a9a4
GM
11823#if XtSpecificationRelease < 6
11824fail;
11825#endif
f527bd02 11826
f199cab1
GM
11827 ;
11828 return 0;
11829}
067d23c9 11830_ACEOF
5476a9a4
GM
11831if ac_fn_c_try_link "$LINENO"; then :
11832 emacs_cv_x11_toolkit_version_6=yes
11833else
11834 emacs_cv_x11_toolkit_version_6=no
067d23c9 11835fi
5476a9a4
GM
11836rm -f core conftest.err conftest.$ac_objext \
11837 conftest$ac_exeext conftest.$ac_ext
067d23c9
KY
11838fi
11839
5476a9a4
GM
11840 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
11841 if test $emacs_cv_x11_toolkit_version_6 = yes; then
11842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5
11843$as_echo "6 or newer" >&6; }
f527bd02 11844
5476a9a4 11845$as_echo "#define HAVE_X11XTR6 1" >>confdefs.h
f527bd02 11846
5476a9a4
GM
11847 LIBXTR6="-lSM -lICE"
11848 case "$opsys" in
11849 ## Use libw.a along with X11R6 Xt.
11850 unixware) LIBXTR6="$LIBXTR6 -lw" ;;
11851 esac
11852 else
11853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5
11854$as_echo "before 6" >&6; }
f199cab1 11855 fi
f527bd02 11856
5476a9a4
GM
11857 OLDLIBS="$LIBS"
11858 if test x$HAVE_X11XTR6 = xyes; then
11859 LIBS="-lXt -lSM -lICE $LIBS"
11860 else
11861 LIBS="-lXt $LIBS"
11862 fi
11863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XmuConvertStandardSelection in -lXmu" >&5
11864$as_echo_n "checking for XmuConvertStandardSelection in -lXmu... " >&6; }
11865if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then :
11866 $as_echo_n "(cached) " >&6
11867else
11868 ac_check_lib_save_LIBS=$LIBS
11869LIBS="-lXmu $LIBS"
11870cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11871/* end confdefs.h. */
f199cab1 11872
5476a9a4
GM
11873/* Override any GCC internal prototype to avoid an error.
11874 Use char because int might match the return type of a GCC
11875 builtin and then its argument prototype would still apply. */
11876#ifdef __cplusplus
11877extern "C"
11878#endif
11879char XmuConvertStandardSelection ();
067d23c9
KY
11880int
11881main ()
11882{
5476a9a4 11883return XmuConvertStandardSelection ();
067d23c9
KY
11884 ;
11885 return 0;
11886}
11887_ACEOF
5476a9a4
GM
11888if ac_fn_c_try_link "$LINENO"; then :
11889 ac_cv_lib_Xmu_XmuConvertStandardSelection=yes
11890else
11891 ac_cv_lib_Xmu_XmuConvertStandardSelection=no
067d23c9 11892fi
5476a9a4
GM
11893rm -f core conftest.err conftest.$ac_objext \
11894 conftest$ac_exeext conftest.$ac_ext
11895LIBS=$ac_check_lib_save_LIBS
067d23c9 11896fi
5476a9a4
GM
11897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5
11898$as_echo "$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6; }
11899if test "x$ac_cv_lib_Xmu_XmuConvertStandardSelection" = x""yes; then :
11900 cat >>confdefs.h <<_ACEOF
11901#define HAVE_LIBXMU 1
f199cab1
GM
11902_ACEOF
11903
5476a9a4 11904 LIBS="-lXmu $LIBS"
f199cab1 11905
067d23c9
KY
11906fi
11907
5476a9a4
GM
11908 test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
11909 fi
067d23c9 11910
067d23c9 11911
5476a9a4
GM
11912LIBXMU=-lXmu
11913case $opsys in
11914 ## These systems don't supply Xmu.
11915 hpux* | aix4-2 )
11916 test "X$ac_cv_lib_Xmu_XmuConvertStandardSelection" != "Xyes" && LIBXMU=
11917 ;;
11918esac
067d23c9
KY
11919
11920
5476a9a4
GM
11921# On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
11922if test "${HAVE_X11}" = "yes"; then
11923 if test "${USE_X_TOOLKIT}" != "none"; then
11924 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XShapeQueryExtension in -lXext" >&5
11925$as_echo_n "checking for XShapeQueryExtension in -lXext... " >&6; }
11926if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then :
f199cab1
GM
11927 $as_echo_n "(cached) " >&6
11928else
5476a9a4
GM
11929 ac_check_lib_save_LIBS=$LIBS
11930LIBS="-lXext $LIBS"
11931cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 11932/* end confdefs.h. */
f199cab1 11933
5476a9a4
GM
11934/* Override any GCC internal prototype to avoid an error.
11935 Use char because int might match the return type of a GCC
11936 builtin and then its argument prototype would still apply. */
11937#ifdef __cplusplus
11938extern "C"
11939#endif
11940char XShapeQueryExtension ();
11941int
11942main ()
11943{
11944return XShapeQueryExtension ();
11945 ;
11946 return 0;
11947}
e7d4e61f 11948_ACEOF
5476a9a4
GM
11949if ac_fn_c_try_link "$LINENO"; then :
11950 ac_cv_lib_Xext_XShapeQueryExtension=yes
11951else
11952 ac_cv_lib_Xext_XShapeQueryExtension=no
067d23c9 11953fi
5476a9a4
GM
11954rm -f core conftest.err conftest.$ac_objext \
11955 conftest$ac_exeext conftest.$ac_ext
11956LIBS=$ac_check_lib_save_LIBS
11957fi
11958{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
11959$as_echo "$ac_cv_lib_Xext_XShapeQueryExtension" >&6; }
11960if test "x$ac_cv_lib_Xext_XShapeQueryExtension" = x""yes; then :
11961 cat >>confdefs.h <<_ACEOF
11962#define HAVE_LIBXEXT 1
11963_ACEOF
f199cab1 11964
5476a9a4 11965 LIBS="-lXext $LIBS"
f199cab1 11966
5476a9a4 11967fi
f199cab1 11968
5476a9a4
GM
11969 fi
11970fi
f199cab1 11971
5476a9a4
GM
11972LIBXP=
11973if test "${USE_X_TOOLKIT}" = "MOTIF"; then
8ad96b1d
GM
11974 # OpenMotif may be installed in such a way on some GNU/Linux systems.
11975 if test -d /usr/include/openmotif; then
11976 CPPFLAGS="-I/usr/include/openmotif $CPPFLAGS"
11977 emacs_cv_openmotif=yes
11978 case "$canonical" in
11979 x86_64-*-linux-gnu* | powerpc64-*-linux-gnu* | sparc64-*-linux-gnu*)
11980 test -d /usr/lib64/openmotif && LDFLAGS="-L/usr/lib64/openmotif $LDFLAGS"
11981 ;;
11982 *)
11983 test -d /usr/lib/openmotif && LDFLAGS="-L/usr/lib/openmotif $LDFLAGS"
11984 esac
11985 else
11986 emacs_cv_openmotif=no
11987 fi
11988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for (Open)Motif version 2.1" >&5
11989$as_echo_n "checking for (Open)Motif version 2.1... " >&6; }
5476a9a4 11990if test "${emacs_cv_motif_version_2_1+set}" = set; then :
ae1362a3
AS
11991 $as_echo_n "(cached) " >&6
11992else
f199cab1
GM
11993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11994/* end confdefs.h. */
5476a9a4
GM
11995#include <Xm/Xm.h>
11996int
11997main ()
11998{
11999#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
12000int x = 5;
12001#else
12002Motif version prior to 2.1.
12003#endif
12004 ;
12005 return 0;
12006}
12007_ACEOF
12008if ac_fn_c_try_compile "$LINENO"; then :
12009 emacs_cv_motif_version_2_1=yes
12010else
12011 emacs_cv_motif_version_2_1=no
12012fi
12013rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12014fi
12015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_motif_version_2_1" >&5
12016$as_echo "$emacs_cv_motif_version_2_1" >&6; }
12017 if test $emacs_cv_motif_version_2_1 = yes; then
12018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpCreateContext in -lXp" >&5
12019$as_echo_n "checking for XpCreateContext in -lXp... " >&6; }
12020if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then :
12021 $as_echo_n "(cached) " >&6
12022else
12023 ac_check_lib_save_LIBS=$LIBS
12024LIBS="-lXp $LIBS"
12025cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12026/* end confdefs.h. */
f199cab1 12027
5476a9a4
GM
12028/* Override any GCC internal prototype to avoid an error.
12029 Use char because int might match the return type of a GCC
12030 builtin and then its argument prototype would still apply. */
12031#ifdef __cplusplus
12032extern "C"
12033#endif
12034char XpCreateContext ();
ae1362a3
AS
12035int
12036main ()
12037{
5476a9a4 12038return XpCreateContext ();
ae1362a3
AS
12039 ;
12040 return 0;
12041}
12042_ACEOF
5476a9a4
GM
12043if ac_fn_c_try_link "$LINENO"; then :
12044 ac_cv_lib_Xp_XpCreateContext=yes
067d23c9 12045else
5476a9a4 12046 ac_cv_lib_Xp_XpCreateContext=no
067d23c9 12047fi
5476a9a4
GM
12048rm -f core conftest.err conftest.$ac_objext \
12049 conftest$ac_exeext conftest.$ac_ext
12050LIBS=$ac_check_lib_save_LIBS
12051fi
12052{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xp_XpCreateContext" >&5
12053$as_echo "$ac_cv_lib_Xp_XpCreateContext" >&6; }
12054if test "x$ac_cv_lib_Xp_XpCreateContext" = x""yes; then :
12055 LIBXP=-lXp
067d23c9 12056fi
f199cab1 12057
8ad96b1d
GM
12058 if test x$emacs_cv_openmotif = xyes; then
12059 REAL_CPPFLAGS="-I/usr/include/openmotif $REAL_CPPFLAGS"
12060 fi
5476a9a4
GM
12061 else
12062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LessTif where some systems put it" >&5
12063$as_echo_n "checking for LessTif where some systems put it... " >&6; }
12064if test "${emacs_cv_lesstif+set}" = set; then :
067d23c9 12065 $as_echo_n "(cached) " >&6
f199cab1 12066else
5476a9a4
GM
12067 # We put this in CFLAGS temporarily to precede other -I options
12068 # that might be in CFLAGS temporarily.
12069 # We put this in CPPFLAGS where it precedes the other -I options.
12070 OLD_CPPFLAGS=$CPPFLAGS
12071 OLD_CFLAGS=$CFLAGS
12072 CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS"
12073 CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS"
12074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 12075/* end confdefs.h. */
5476a9a4 12076#include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h>
067d23c9
KY
12077int
12078main ()
12079{
5476a9a4 12080int x = 5;
067d23c9
KY
12081 ;
12082 return 0;
12083}
12084_ACEOF
5476a9a4
GM
12085if ac_fn_c_try_compile "$LINENO"; then :
12086 emacs_cv_lesstif=yes
067d23c9 12087else
5476a9a4 12088 emacs_cv_lesstif=no
067d23c9 12089fi
5476a9a4 12090rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
067d23c9 12091fi
5476a9a4
GM
12092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_lesstif" >&5
12093$as_echo "$emacs_cv_lesstif" >&6; }
12094 if test $emacs_cv_lesstif = yes; then
12095 # Make sure this -I option remains in CPPFLAGS after it is set
12096 # back to REAL_CPPFLAGS.
12097 # There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not
12098 # have those other -I options anyway. Ultimately, having this
12099 # directory ultimately in CPPFLAGS will be enough.
12100 REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS"
12101 LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS"
12102 else
12103 CFLAGS=$OLD_CFLAGS
12104 CPPFLAGS=$OLD_CPPFLAGS
12105 fi
12106 fi
12107 ac_fn_c_check_header_mongrel "$LINENO" "Xm/BulletinB.h" "ac_cv_header_Xm_BulletinB_h" "$ac_includes_default"
12108if test "x$ac_cv_header_Xm_BulletinB_h" = x""yes; then :
067d23c9 12109
5476a9a4
GM
12110else
12111 as_fn_error "Motif toolkit requested but requirements not found." "$LINENO" 5
067d23c9 12112fi
f199cab1
GM
12113
12114
5476a9a4 12115fi
f199cab1
GM
12116
12117
5476a9a4
GM
12118USE_TOOLKIT_SCROLL_BARS=no
12119if test "${with_toolkit_scroll_bars}" != "no"; then
12120 if test "${USE_X_TOOLKIT}" != "none"; then
12121 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
12122 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
f199cab1 12123
5476a9a4
GM
12124 HAVE_XAW3D=no
12125 USE_TOOLKIT_SCROLL_BARS=yes
12126 elif test "${HAVE_XAW3D}" = "yes" || test "${USE_X_TOOLKIT}" = "LUCID"; then
12127 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
f199cab1 12128
5476a9a4
GM
12129 USE_TOOLKIT_SCROLL_BARS=yes
12130 fi
12131 elif test "${HAVE_GTK}" = "yes"; then
12132 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
f199cab1 12133
5476a9a4
GM
12134 USE_TOOLKIT_SCROLL_BARS=yes
12135 elif test "${HAVE_NS}" = "yes"; then
12136 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
f199cab1 12137
5c0255d9
GM
12138 USE_TOOLKIT_SCROLL_BARS=yes
12139 elif test "${HAVE_W32}" = "yes"; then
12140 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
12141
5476a9a4
GM
12142 USE_TOOLKIT_SCROLL_BARS=yes
12143 fi
12144fi
f199cab1 12145
5476a9a4 12146cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 12147/* end confdefs.h. */
5476a9a4
GM
12148
12149 #include <X11/Xlib.h>
12150 #include <X11/Xresource.h>
067d23c9
KY
12151int
12152main ()
12153{
5476a9a4 12154XIMProc callback;
067d23c9
KY
12155 ;
12156 return 0;
12157}
12158_ACEOF
f199cab1 12159if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4
GM
12160 HAVE_XIM=yes
12161
12162$as_echo "#define HAVE_XIM 1" >>confdefs.h
12163
067d23c9 12164else
5476a9a4 12165 HAVE_XIM=no
067d23c9 12166fi
f199cab1 12167rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 12168
f199cab1 12169
5476a9a4
GM
12170if test "${with_xim}" != "no"; then
12171
12172$as_echo "#define USE_XIM 1" >>confdefs.h
12173
12174fi
12175
12176
12177if test "${HAVE_XIM}" != "no"; then
12178 late_CFLAGS=$CFLAGS
12179 if test "$GCC" = yes; then
12180 CFLAGS="$CFLAGS --pedantic-errors"
12181 fi
12182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12183/* end confdefs.h. */
f199cab1 12184
5476a9a4
GM
12185#include <X11/Xlib.h>
12186#include <X11/Xresource.h>
12187int
12188main ()
12189{
12190Display *display;
12191XrmDatabase db;
12192char *res_name;
12193char *res_class;
12194XIMProc callback;
12195XPointer *client_data;
12196#ifndef __GNUC__
12197/* If we're not using GCC, it's probably not XFree86, and this is
12198 probably right, but we can't use something like --pedantic-errors. */
12199extern Bool XRegisterIMInstantiateCallback(Display*, XrmDatabase, char*,
12200 char*, XIMProc, XPointer*);
12201#endif
12202(void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, callback,
12203 client_data);
067d23c9
KY
12204 ;
12205 return 0;
12206}
12207_ACEOF
5476a9a4
GM
12208if ac_fn_c_try_compile "$LINENO"; then :
12209 emacs_cv_arg6_star=yes
067d23c9 12210fi
f199cab1 12211rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5476a9a4
GM
12212 if test "$emacs_cv_arg6_star" = yes; then
12213 $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer*" >>confdefs.h
12214
12215 else
12216 $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer" >>confdefs.h
067d23c9 12217
5476a9a4
GM
12218 fi
12219 CFLAGS=$late_CFLAGS
067d23c9
KY
12220fi
12221
5476a9a4
GM
12222### Start of font-backend (under any platform) section.
12223# (nothing here yet -- this is a placeholder)
12224### End of font-backend (under any platform) section.
067d23c9 12225
5476a9a4
GM
12226### Start of font-backend (under X11) section.
12227if test "${HAVE_X11}" = "yes"; then
067d23c9 12228
5476a9a4 12229 succeeded=no
067d23c9 12230
5476a9a4
GM
12231 if test "$PKG_CONFIG" = "no" ; then
12232 HAVE_FC=no
12233 else
12234 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 12235 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
12236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fontconfig >= 2.2.0" >&5
12237$as_echo_n "checking for fontconfig >= 2.2.0... " >&6; }
f199cab1 12238
b5591ebb
GM
12239 if "$PKG_CONFIG" --exists "fontconfig >= 2.2.0" 2>&5 &&
12240 FONTCONFIG_CFLAGS=`"$PKG_CONFIG" --cflags "fontconfig >= 2.2.0" 2>&5` &&
12241 FONTCONFIG_LIBS=`"$PKG_CONFIG" --libs "fontconfig >= 2.2.0" 2>&5`; then
5476a9a4
GM
12242 edit_cflags="
12243 s,///*,/,g
12244 s/^/ /
12245 s/ -I/ $isystem/g
12246 s/^ //
12247 "
12248 FONTCONFIG_CFLAGS=`$as_echo "$FONTCONFIG_CFLAGS" | sed -e "$edit_cflags"`
12249 FONTCONFIG_LIBS=`$as_echo "$FONTCONFIG_LIBS" | sed -e 's,///*,/,g'`
12250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$FONTCONFIG_CFLAGS' LIBS='$FONTCONFIG_LIBS'" >&5
12251$as_echo "yes CFLAGS='$FONTCONFIG_CFLAGS' LIBS='$FONTCONFIG_LIBS'" >&6; }
12252 succeeded=yes
12253 else
12254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12255$as_echo "no" >&6; }
12256 FONTCONFIG_CFLAGS=""
12257 FONTCONFIG_LIBS=""
12258 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
12259 ## do set a variable so people can do so. Do it in a subshell
12260 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 12261 FONTCONFIG_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "fontconfig >= 2.2.0") 2>&1`
f199cab1 12262
5476a9a4 12263 fi
f199cab1
GM
12264
12265
12266
f199cab1 12267 else
5476a9a4
GM
12268 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12269 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12270 fi
12271 fi
f199cab1 12272
5476a9a4
GM
12273 if test $succeeded = yes; then
12274 HAVE_FC=yes
12275 else
12276 HAVE_FC=no
12277 fi
f199cab1 12278
067d23c9 12279
5476a9a4
GM
12280 ## Use -lXft if available, unless `--with-xft=no'.
12281 HAVE_XFT=maybe
12282 if test "${HAVE_FC}" = "no" || test "x${with_x}" = "xno"; then
12283 with_xft="no";
12284 fi
12285 if test "x${with_xft}" != "xno"; then
f199cab1 12286
f199cab1 12287
5476a9a4 12288 succeeded=no
f199cab1 12289
5476a9a4
GM
12290 if test "$PKG_CONFIG" = "no" ; then
12291 HAVE_XFT=no
12292 else
12293 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 12294 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
12295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xft >= 0.13.0" >&5
12296$as_echo_n "checking for xft >= 0.13.0... " >&6; }
f199cab1 12297
b5591ebb
GM
12298 if "$PKG_CONFIG" --exists "xft >= 0.13.0" 2>&5 &&
12299 XFT_CFLAGS=`"$PKG_CONFIG" --cflags "xft >= 0.13.0" 2>&5` &&
12300 XFT_LIBS=`"$PKG_CONFIG" --libs "xft >= 0.13.0" 2>&5`; then
5476a9a4
GM
12301 edit_cflags="
12302 s,///*,/,g
12303 s/^/ /
12304 s/ -I/ $isystem/g
12305 s/^ //
12306 "
12307 XFT_CFLAGS=`$as_echo "$XFT_CFLAGS" | sed -e "$edit_cflags"`
12308 XFT_LIBS=`$as_echo "$XFT_LIBS" | sed -e 's,///*,/,g'`
12309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$XFT_CFLAGS' LIBS='$XFT_LIBS'" >&5
12310$as_echo "yes CFLAGS='$XFT_CFLAGS' LIBS='$XFT_LIBS'" >&6; }
12311 succeeded=yes
12312 else
12313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12314$as_echo "no" >&6; }
12315 XFT_CFLAGS=""
12316 XFT_LIBS=""
12317 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
12318 ## do set a variable so people can do so. Do it in a subshell
12319 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 12320 XFT_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "xft >= 0.13.0") 2>&1`
f199cab1 12321
5476a9a4 12322 fi
f199cab1
GM
12323
12324
12325
5476a9a4
GM
12326 else
12327 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12328 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12329 fi
12330 fi
f199cab1 12331
5476a9a4
GM
12332 if test $succeeded = yes; then
12333 :
f199cab1 12334 else
5476a9a4 12335 HAVE_XFT=no
f199cab1
GM
12336 fi
12337
5476a9a4
GM
12338 ## Because xftfont.c uses XRenderQueryExtension, we also
12339 ## need to link to -lXrender.
12340 HAVE_XRENDER=no
12341 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRenderQueryExtension in -lXrender" >&5
12342$as_echo_n "checking for XRenderQueryExtension in -lXrender... " >&6; }
12343if test "${ac_cv_lib_Xrender_XRenderQueryExtension+set}" = set; then :
12344 $as_echo_n "(cached) " >&6
12345else
12346 ac_check_lib_save_LIBS=$LIBS
12347LIBS="-lXrender $LIBS"
12348cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12349/* end confdefs.h. */
f199cab1 12350
5476a9a4
GM
12351/* Override any GCC internal prototype to avoid an error.
12352 Use char because int might match the return type of a GCC
12353 builtin and then its argument prototype would still apply. */
12354#ifdef __cplusplus
12355extern "C"
12356#endif
12357char XRenderQueryExtension ();
12358int
12359main ()
12360{
12361return XRenderQueryExtension ();
12362 ;
12363 return 0;
12364}
12365_ACEOF
12366if ac_fn_c_try_link "$LINENO"; then :
12367 ac_cv_lib_Xrender_XRenderQueryExtension=yes
12368else
12369 ac_cv_lib_Xrender_XRenderQueryExtension=no
12370fi
12371rm -f core conftest.err conftest.$ac_objext \
12372 conftest$ac_exeext conftest.$ac_ext
12373LIBS=$ac_check_lib_save_LIBS
12374fi
12375{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrender_XRenderQueryExtension" >&5
12376$as_echo "$ac_cv_lib_Xrender_XRenderQueryExtension" >&6; }
12377if test "x$ac_cv_lib_Xrender_XRenderQueryExtension" = x""yes; then :
12378 HAVE_XRENDER=yes
12379fi
f199cab1 12380
5476a9a4
GM
12381 if test "$HAVE_XFT" != no && test "$HAVE_XRENDER" != no; then
12382 OLD_CPPFLAGS="$CPPFLAGS"
12383 OLD_CFLAGS="$CFLAGS"
12384 OLD_LIBS="$LIBS"
12385 CPPFLAGS="$CPPFLAGS $XFT_CFLAGS"
12386 CFLAGS="$CFLAGS $XFT_CFLAGS"
12387 XFT_LIBS="-lXrender $XFT_LIBS"
12388 LIBS="$XFT_LIBS $LIBS"
12389 ac_fn_c_check_header_mongrel "$LINENO" "X11/Xft/Xft.h" "ac_cv_header_X11_Xft_Xft_h" "$ac_includes_default"
12390if test "x$ac_cv_header_X11_Xft_Xft_h" = x""yes; then :
12391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XftFontOpen in -lXft" >&5
12392$as_echo_n "checking for XftFontOpen in -lXft... " >&6; }
12393if test "${ac_cv_lib_Xft_XftFontOpen+set}" = set; then :
12394 $as_echo_n "(cached) " >&6
12395else
12396 ac_check_lib_save_LIBS=$LIBS
12397LIBS="-lXft $XFT_LIBS $LIBS"
12398cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12399/* end confdefs.h. */
f199cab1 12400
5476a9a4
GM
12401/* Override any GCC internal prototype to avoid an error.
12402 Use char because int might match the return type of a GCC
12403 builtin and then its argument prototype would still apply. */
12404#ifdef __cplusplus
12405extern "C"
12406#endif
12407char XftFontOpen ();
12408int
12409main ()
12410{
12411return XftFontOpen ();
12412 ;
12413 return 0;
12414}
067d23c9 12415_ACEOF
5476a9a4
GM
12416if ac_fn_c_try_link "$LINENO"; then :
12417 ac_cv_lib_Xft_XftFontOpen=yes
12418else
12419 ac_cv_lib_Xft_XftFontOpen=no
12420fi
12421rm -f core conftest.err conftest.$ac_objext \
12422 conftest$ac_exeext conftest.$ac_ext
12423LIBS=$ac_check_lib_save_LIBS
12424fi
12425{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xft_XftFontOpen" >&5
12426$as_echo "$ac_cv_lib_Xft_XftFontOpen" >&6; }
12427if test "x$ac_cv_lib_Xft_XftFontOpen" = x""yes; then :
12428 HAVE_XFT=yes
f199cab1
GM
12429fi
12430
5476a9a4 12431fi
f199cab1
GM
12432
12433
f199cab1 12434
5476a9a4 12435 if test "${HAVE_XFT}" = "yes"; then
f199cab1 12436
5476a9a4 12437$as_echo "#define HAVE_XFT 1" >>confdefs.h
f199cab1 12438
067d23c9 12439
5476a9a4
GM
12440 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $XFT_CFLAGS"
12441 else
12442 CPPFLAGS="$OLD_CPPFLAGS"
12443 CFLAGS="$OLD_CFLAGS"
12444 LIBS="$OLD_LIBS"
12445 fi # "${HAVE_XFT}" = "yes"
12446 fi # "$HAVE_XFT" != no
12447 fi # "x${with_xft}" != "xno"
f199cab1 12448
5476a9a4
GM
12449 ## We used to allow building with FreeType and without Xft.
12450 ## However, the ftx font backend driver is not in good shape.
12451 if test "$HAVE_XFT" != "yes"; then
12452 HAVE_XFT=no
12453 HAVE_FREETYPE=no
12454 else
f199cab1 12455
5476a9a4 12456 succeeded=no
f199cab1 12457
5476a9a4
GM
12458 if test "$PKG_CONFIG" = "no" ; then
12459 HAVE_FREETYPE=no
12460 else
12461 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 12462 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
12463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype2" >&5
12464$as_echo_n "checking for freetype2... " >&6; }
f199cab1 12465
b5591ebb
GM
12466 if "$PKG_CONFIG" --exists "freetype2" 2>&5 &&
12467 FREETYPE_CFLAGS=`"$PKG_CONFIG" --cflags "freetype2" 2>&5` &&
12468 FREETYPE_LIBS=`"$PKG_CONFIG" --libs "freetype2" 2>&5`; then
5476a9a4
GM
12469 edit_cflags="
12470 s,///*,/,g
12471 s/^/ /
12472 s/ -I/ $isystem/g
12473 s/^ //
12474 "
12475 FREETYPE_CFLAGS=`$as_echo "$FREETYPE_CFLAGS" | sed -e "$edit_cflags"`
12476 FREETYPE_LIBS=`$as_echo "$FREETYPE_LIBS" | sed -e 's,///*,/,g'`
12477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$FREETYPE_CFLAGS' LIBS='$FREETYPE_LIBS'" >&5
12478$as_echo "yes CFLAGS='$FREETYPE_CFLAGS' LIBS='$FREETYPE_LIBS'" >&6; }
12479 succeeded=yes
12480 else
12481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12482$as_echo "no" >&6; }
12483 FREETYPE_CFLAGS=""
12484 FREETYPE_LIBS=""
12485 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
12486 ## do set a variable so people can do so. Do it in a subshell
12487 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 12488 FREETYPE_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "freetype2") 2>&1`
f199cab1 12489
5476a9a4 12490 fi
f199cab1 12491
f199cab1 12492
067d23c9 12493
5476a9a4
GM
12494 else
12495 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12496 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12497 fi
067d23c9 12498 fi
f199cab1 12499
5476a9a4
GM
12500 if test $succeeded = yes; then
12501 HAVE_FREETYPE=yes
12502 else
12503 HAVE_FREETYPE=no
12504 fi
f199cab1 12505
f199cab1 12506
5476a9a4
GM
12507 test "$HAVE_FREETYPE" = "no" && as_fn_error "libxft requires libfreetype" "$LINENO" 5
12508 fi
f199cab1 12509
5476a9a4
GM
12510 HAVE_LIBOTF=no
12511 if test "${HAVE_FREETYPE}" = "yes"; then
f199cab1 12512
5476a9a4 12513$as_echo "#define HAVE_FREETYPE 1" >>confdefs.h
f199cab1 12514
5476a9a4 12515 if test "${with_libotf}" != "no"; then
f199cab1 12516
5476a9a4 12517 succeeded=no
f199cab1 12518
5476a9a4
GM
12519 if test "$PKG_CONFIG" = "no" ; then
12520 HAVE_LIBOTF=no
12521 else
12522 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 12523 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
12524 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libotf" >&5
12525$as_echo_n "checking for libotf... " >&6; }
f199cab1 12526
b5591ebb
GM
12527 if "$PKG_CONFIG" --exists "libotf" 2>&5 &&
12528 LIBOTF_CFLAGS=`"$PKG_CONFIG" --cflags "libotf" 2>&5` &&
12529 LIBOTF_LIBS=`"$PKG_CONFIG" --libs "libotf" 2>&5`; then
5476a9a4
GM
12530 edit_cflags="
12531 s,///*,/,g
12532 s/^/ /
12533 s/ -I/ $isystem/g
12534 s/^ //
12535 "
12536 LIBOTF_CFLAGS=`$as_echo "$LIBOTF_CFLAGS" | sed -e "$edit_cflags"`
12537 LIBOTF_LIBS=`$as_echo "$LIBOTF_LIBS" | sed -e 's,///*,/,g'`
12538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBOTF_CFLAGS' LIBS='$LIBOTF_LIBS'" >&5
12539$as_echo "yes CFLAGS='$LIBOTF_CFLAGS' LIBS='$LIBOTF_LIBS'" >&6; }
12540 succeeded=yes
12541 else
12542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12543$as_echo "no" >&6; }
12544 LIBOTF_CFLAGS=""
12545 LIBOTF_LIBS=""
12546 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
12547 ## do set a variable so people can do so. Do it in a subshell
12548 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 12549 LIBOTF_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "libotf") 2>&1`
067d23c9 12550
5476a9a4 12551 fi
f199cab1
GM
12552
12553
067d23c9 12554
5476a9a4
GM
12555 else
12556 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12557 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12558 fi
12559 fi
f199cab1 12560
5476a9a4
GM
12561 if test $succeeded = yes; then
12562 HAVE_LIBOTF=yes
12563 else
12564 HAVE_LIBOTF=no
12565 fi
f199cab1 12566
5476a9a4 12567 if test "$HAVE_LIBOTF" = "yes"; then
f199cab1 12568
5476a9a4 12569$as_echo "#define HAVE_LIBOTF 1" >>confdefs.h
f199cab1 12570
5476a9a4
GM
12571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTF_get_variation_glyphs in -lotf" >&5
12572$as_echo_n "checking for OTF_get_variation_glyphs in -lotf... " >&6; }
12573if test "${ac_cv_lib_otf_OTF_get_variation_glyphs+set}" = set; then :
067d23c9
KY
12574 $as_echo_n "(cached) " >&6
12575else
5476a9a4
GM
12576 ac_check_lib_save_LIBS=$LIBS
12577LIBS="-lotf $LIBS"
12578cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 12579/* end confdefs.h. */
5476a9a4
GM
12580
12581/* Override any GCC internal prototype to avoid an error.
12582 Use char because int might match the return type of a GCC
12583 builtin and then its argument prototype would still apply. */
12584#ifdef __cplusplus
12585extern "C"
12586#endif
12587char OTF_get_variation_glyphs ();
067d23c9
KY
12588int
12589main ()
12590{
5476a9a4 12591return OTF_get_variation_glyphs ();
067d23c9
KY
12592 ;
12593 return 0;
12594}
12595_ACEOF
5476a9a4
GM
12596if ac_fn_c_try_link "$LINENO"; then :
12597 ac_cv_lib_otf_OTF_get_variation_glyphs=yes
067d23c9 12598else
5476a9a4 12599 ac_cv_lib_otf_OTF_get_variation_glyphs=no
067d23c9 12600fi
5476a9a4
GM
12601rm -f core conftest.err conftest.$ac_objext \
12602 conftest$ac_exeext conftest.$ac_ext
12603LIBS=$ac_check_lib_save_LIBS
12604fi
12605{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_otf_OTF_get_variation_glyphs" >&5
12606$as_echo "$ac_cv_lib_otf_OTF_get_variation_glyphs" >&6; }
12607if test "x$ac_cv_lib_otf_OTF_get_variation_glyphs" = x""yes; then :
12608 HAVE_OTF_GET_VARIATION_GLYPHS=yes
12609else
12610 HAVE_OTF_GET_VARIATION_GLYPHS=no
067d23c9 12611fi
067d23c9 12612
5476a9a4
GM
12613 if test "${HAVE_OTF_GET_VARIATION_GLYPHS}" = "yes"; then
12614
12615$as_echo "#define HAVE_OTF_GET_VARIATION_GLYPHS 1" >>confdefs.h
12616
12617 fi
12618 fi
12619 fi
12620 fi
12621
12622 HAVE_M17N_FLT=no
12623 if test "${HAVE_LIBOTF}" = yes; then
12624 if test "${with_m17n_flt}" != "no"; then
12625
12626 succeeded=no
12627
12628 if test "$PKG_CONFIG" = "no" ; then
12629 HAVE_M17N_FLT=no
12630 else
12631 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 12632 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
12633 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for m17n-flt" >&5
12634$as_echo_n "checking for m17n-flt... " >&6; }
12635
b5591ebb
GM
12636 if "$PKG_CONFIG" --exists "m17n-flt" 2>&5 &&
12637 M17N_FLT_CFLAGS=`"$PKG_CONFIG" --cflags "m17n-flt" 2>&5` &&
12638 M17N_FLT_LIBS=`"$PKG_CONFIG" --libs "m17n-flt" 2>&5`; then
5476a9a4
GM
12639 edit_cflags="
12640 s,///*,/,g
12641 s/^/ /
12642 s/ -I/ $isystem/g
12643 s/^ //
12644 "
12645 M17N_FLT_CFLAGS=`$as_echo "$M17N_FLT_CFLAGS" | sed -e "$edit_cflags"`
12646 M17N_FLT_LIBS=`$as_echo "$M17N_FLT_LIBS" | sed -e 's,///*,/,g'`
12647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$M17N_FLT_CFLAGS' LIBS='$M17N_FLT_LIBS'" >&5
12648$as_echo "yes CFLAGS='$M17N_FLT_CFLAGS' LIBS='$M17N_FLT_LIBS'" >&6; }
12649 succeeded=yes
12650 else
12651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12652$as_echo "no" >&6; }
12653 M17N_FLT_CFLAGS=""
12654 M17N_FLT_LIBS=""
12655 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
12656 ## do set a variable so people can do so. Do it in a subshell
12657 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 12658 M17N_FLT_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "m17n-flt") 2>&1`
5476a9a4
GM
12659
12660 fi
12661
12662
067d23c9 12663
5476a9a4
GM
12664 else
12665 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12666 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12667 fi
f199cab1 12668 fi
067d23c9 12669
5476a9a4
GM
12670 if test $succeeded = yes; then
12671 HAVE_M17N_FLT=yes
12672 else
12673 HAVE_M17N_FLT=no
12674 fi
12675
12676 if test "$HAVE_M17N_FLT" = "yes"; then
12677
12678$as_echo "#define HAVE_M17N_FLT 1" >>confdefs.h
12679
12680 fi
12681 fi
12682 fi
12683else
12684 HAVE_XFT=no
12685 HAVE_FREETYPE=no
12686 HAVE_LIBOTF=no
12687 HAVE_M17N_FLT=no
12688fi
12689
12690### End of font-backend (under X11) section.
12691
12692
067d23c9 12693
067d23c9 12694
5476a9a4
GM
12695
12696
12697
12698
12699
12700
12701### Use -lXpm if available, unless `--with-xpm=no'.
12702HAVE_XPM=no
12703LIBXPM=
5c0255d9
GM
12704
12705if test "${HAVE_W32}" = "yes"; then
12706 if test "${with_xpm}" != "no"; then
12707 SAVE_CPPFLAGS="$CPPFLAGS"
12708 SAVE_LDFLAGS="$LDFLAGS"
12709 CPPFLAGS="$CPPFLAGS -I/usr/include/noX"
12710 LDFLAGS="$LDFLAGS -L/usr/lib/noX"
12711 ac_fn_c_check_header_mongrel "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "$ac_includes_default"
12712if test "x$ac_cv_header_X11_xpm_h" = x""yes; then :
12713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReadFileToImage in -lXpm" >&5
12714$as_echo_n "checking for XpmReadFileToImage in -lXpm... " >&6; }
12715if test "${ac_cv_lib_Xpm_XpmReadFileToImage+set}" = set; then :
12716 $as_echo_n "(cached) " >&6
12717else
12718 ac_check_lib_save_LIBS=$LIBS
12719LIBS="-lXpm $LIBS"
12720cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12721/* end confdefs.h. */
12722
12723/* Override any GCC internal prototype to avoid an error.
12724 Use char because int might match the return type of a GCC
12725 builtin and then its argument prototype would still apply. */
12726#ifdef __cplusplus
12727extern "C"
12728#endif
12729char XpmReadFileToImage ();
12730int
12731main ()
12732{
12733return XpmReadFileToImage ();
12734 ;
12735 return 0;
12736}
12737_ACEOF
12738if ac_fn_c_try_link "$LINENO"; then :
12739 ac_cv_lib_Xpm_XpmReadFileToImage=yes
12740else
12741 ac_cv_lib_Xpm_XpmReadFileToImage=no
12742fi
12743rm -f core conftest.err conftest.$ac_objext \
12744 conftest$ac_exeext conftest.$ac_ext
12745LIBS=$ac_check_lib_save_LIBS
12746fi
12747{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmReadFileToImage" >&5
12748$as_echo "$ac_cv_lib_Xpm_XpmReadFileToImage" >&6; }
12749if test "x$ac_cv_lib_Xpm_XpmReadFileToImage" = x""yes; then :
12750 HAVE_XPM=yes
12751fi
12752
12753fi
12754
12755
12756 if test "${HAVE_XPM}" = "yes"; then
12757 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReturnAllocPixels preprocessor define" >&5
12758$as_echo_n "checking for XpmReturnAllocPixels preprocessor define... " >&6; }
12759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12760/* end confdefs.h. */
12761#include "X11/xpm.h"
12762#ifndef XpmReturnAllocPixels
12763no_return_alloc_pixels
12764#endif
12765
12766_ACEOF
12767if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12768 $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then :
12769 HAVE_XPM=no
12770else
12771 HAVE_XPM=yes
12772fi
12773rm -f conftest*
12774
12775
12776 if test "${HAVE_XPM}" = "yes"; then
12777 REAL_CPPFLAGS="$REAL_CPPFLAGS -I/usr/include/noX"
12778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12779$as_echo "yes" >&6; }
12780 else
12781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12782$as_echo "no" >&6; }
12783 CPPFLAGS="$SAVE_CPPFLAGS"
12784 LDFLAGS="$SAVE_LDFLAGS"
12785 fi
12786 fi
12787 fi
12788
12789 if test "${HAVE_XPM}" = "yes"; then
12790
12791$as_echo "#define HAVE_XPM 1" >>confdefs.h
12792
12793 LIBXPM=-lXpm
12794 fi
12795fi
12796
5476a9a4
GM
12797if test "${HAVE_X11}" = "yes"; then
12798 if test "${with_xpm}" != "no"; then
12799 ac_fn_c_check_header_mongrel "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "$ac_includes_default"
12800if test "x$ac_cv_header_X11_xpm_h" = x""yes; then :
12801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReadFileToPixmap in -lXpm" >&5
12802$as_echo_n "checking for XpmReadFileToPixmap in -lXpm... " >&6; }
12803if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then :
f199cab1
GM
12804 $as_echo_n "(cached) " >&6
12805else
5476a9a4
GM
12806 ac_check_lib_save_LIBS=$LIBS
12807LIBS="-lXpm -lX11 $LIBS"
12808cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
12809/* end confdefs.h. */
12810
5476a9a4
GM
12811/* Override any GCC internal prototype to avoid an error.
12812 Use char because int might match the return type of a GCC
12813 builtin and then its argument prototype would still apply. */
12814#ifdef __cplusplus
12815extern "C"
12816#endif
12817char XpmReadFileToPixmap ();
067d23c9
KY
12818int
12819main ()
12820{
5476a9a4 12821return XpmReadFileToPixmap ();
067d23c9
KY
12822 ;
12823 return 0;
12824}
12825_ACEOF
5476a9a4
GM
12826if ac_fn_c_try_link "$LINENO"; then :
12827 ac_cv_lib_Xpm_XpmReadFileToPixmap=yes
067d23c9 12828else
5476a9a4 12829 ac_cv_lib_Xpm_XpmReadFileToPixmap=no
067d23c9 12830fi
5476a9a4
GM
12831rm -f core conftest.err conftest.$ac_objext \
12832 conftest$ac_exeext conftest.$ac_ext
12833LIBS=$ac_check_lib_save_LIBS
12834fi
12835{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5
12836$as_echo "$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6; }
12837if test "x$ac_cv_lib_Xpm_XpmReadFileToPixmap" = x""yes; then :
12838 HAVE_XPM=yes
f199cab1 12839fi
067d23c9
KY
12840
12841fi
12842
12843
5476a9a4
GM
12844 if test "${HAVE_XPM}" = "yes"; then
12845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReturnAllocPixels preprocessor define" >&5
12846$as_echo_n "checking for XpmReturnAllocPixels preprocessor define... " >&6; }
12847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12848/* end confdefs.h. */
12849#include "X11/xpm.h"
12850#ifndef XpmReturnAllocPixels
12851no_return_alloc_pixels
12852#endif
067d23c9 12853
067d23c9 12854_ACEOF
5476a9a4
GM
12855if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12856 $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then :
12857 HAVE_XPM=no
12858else
12859 HAVE_XPM=yes
12860fi
12861rm -f conftest*
067d23c9 12862
067d23c9 12863
5476a9a4
GM
12864 if test "${HAVE_XPM}" = "yes"; then
12865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12866$as_echo "yes" >&6; }
12867 else
12868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12869$as_echo "no" >&6; }
12870 fi
12871 fi
12872 fi
067d23c9 12873
5476a9a4 12874 if test "${HAVE_XPM}" = "yes"; then
067d23c9 12875
5476a9a4 12876$as_echo "#define HAVE_XPM 1" >>confdefs.h
067d23c9 12877
5476a9a4
GM
12878 LIBXPM=-lXpm
12879 fi
067d23c9
KY
12880fi
12881
f199cab1 12882
5c0255d9 12883
5476a9a4
GM
12884### Use -ljpeg if available, unless `--with-jpeg=no'.
12885HAVE_JPEG=no
12886LIBJPEG=
5c0255d9 12887if test "${HAVE_X11}" = "yes" || test "${HAVE_W32}" = "yes"; then
5476a9a4
GM
12888 if test "${with_jpeg}" != "no"; then
12889 ac_fn_c_check_header_mongrel "$LINENO" "jerror.h" "ac_cv_header_jerror_h" "$ac_includes_default"
12890if test "x$ac_cv_header_jerror_h" = x""yes; then :
12891 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_destroy_compress in -ljpeg" >&5
12892$as_echo_n "checking for jpeg_destroy_compress in -ljpeg... " >&6; }
12893if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then :
067d23c9
KY
12894 $as_echo_n "(cached) " >&6
12895else
5476a9a4
GM
12896 ac_check_lib_save_LIBS=$LIBS
12897LIBS="-ljpeg $LIBS"
12898cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 12899/* end confdefs.h. */
f199cab1 12900
5476a9a4
GM
12901/* Override any GCC internal prototype to avoid an error.
12902 Use char because int might match the return type of a GCC
12903 builtin and then its argument prototype would still apply. */
12904#ifdef __cplusplus
12905extern "C"
12906#endif
12907char jpeg_destroy_compress ();
067d23c9
KY
12908int
12909main ()
12910{
5476a9a4 12911return jpeg_destroy_compress ();
067d23c9
KY
12912 ;
12913 return 0;
12914}
12915_ACEOF
12916if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 12917 ac_cv_lib_jpeg_jpeg_destroy_compress=yes
067d23c9 12918else
5476a9a4 12919 ac_cv_lib_jpeg_jpeg_destroy_compress=no
067d23c9
KY
12920fi
12921rm -f core conftest.err conftest.$ac_objext \
12922 conftest$ac_exeext conftest.$ac_ext
5476a9a4
GM
12923LIBS=$ac_check_lib_save_LIBS
12924fi
12925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5
12926$as_echo "$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6; }
12927if test "x$ac_cv_lib_jpeg_jpeg_destroy_compress" = x""yes; then :
12928 HAVE_JPEG=yes
12929fi
12930
067d23c9 12931fi
f199cab1 12932
f199cab1
GM
12933
12934 fi
067d23c9 12935
5476a9a4
GM
12936 if test "${HAVE_JPEG}" = "yes"; then
12937 $as_echo "#define HAVE_JPEG 1" >>confdefs.h
f199cab1 12938
5476a9a4
GM
12939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12940/* end confdefs.h. */
12941#include <jpeglib.h>
12942 version=JPEG_LIB_VERSION
f199cab1 12943
5476a9a4
GM
12944_ACEOF
12945if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12946 $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then :
12947 $as_echo "#define HAVE_JPEG 1" >>confdefs.h
f199cab1 12948
5476a9a4
GM
12949else
12950 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libjpeg found, but not version 6b or later" >&5
12951$as_echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;}
12952 HAVE_JPEG=no
067d23c9 12953fi
5476a9a4 12954rm -f conftest*
067d23c9 12955
5476a9a4
GM
12956 fi
12957 if test "${HAVE_JPEG}" = "yes"; then
12958 LIBJPEG=-ljpeg
12959 fi
12960fi
067d23c9
KY
12961
12962
5476a9a4
GM
12963### Use -lpng if available, unless `--with-png=no'.
12964HAVE_PNG=no
12965LIBPNG=
5c0255d9 12966if test "${HAVE_X11}" = "yes" || test "${HAVE_W32}" = "yes"; then
5476a9a4
GM
12967 if test "${with_png}" != "no"; then
12968 # Debian unstable as of July 2003 has multiple libpngs, and puts png.h
12969 # in /usr/include/libpng.
12970 for ac_header in png.h libpng/png.h
12971do :
12972 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12973ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12974eval as_val=\$$as_ac_Header
12975 if test "x$as_val" = x""yes; then :
12976 cat >>confdefs.h <<_ACEOF
12977#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12978_ACEOF
12979 break
12980fi
067d23c9 12981
5476a9a4 12982done
067d23c9 12983
5476a9a4
GM
12984 if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then
12985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_get_channels in -lpng" >&5
12986$as_echo_n "checking for png_get_channels in -lpng... " >&6; }
12987if test "${ac_cv_lib_png_png_get_channels+set}" = set; then :
12988 $as_echo_n "(cached) " >&6
12989else
12990 ac_check_lib_save_LIBS=$LIBS
12991LIBS="-lpng -lz -lm $LIBS"
12992cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12993/* end confdefs.h. */
067d23c9 12994
5476a9a4
GM
12995/* Override any GCC internal prototype to avoid an error.
12996 Use char because int might match the return type of a GCC
12997 builtin and then its argument prototype would still apply. */
12998#ifdef __cplusplus
12999extern "C"
13000#endif
13001char png_get_channels ();
13002int
13003main ()
13004{
13005return png_get_channels ();
13006 ;
13007 return 0;
13008}
13009_ACEOF
13010if ac_fn_c_try_link "$LINENO"; then :
13011 ac_cv_lib_png_png_get_channels=yes
f199cab1 13012else
5476a9a4
GM
13013 ac_cv_lib_png_png_get_channels=no
13014fi
13015rm -f core conftest.err conftest.$ac_objext \
13016 conftest$ac_exeext conftest.$ac_ext
13017LIBS=$ac_check_lib_save_LIBS
13018fi
13019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_png_png_get_channels" >&5
13020$as_echo "$ac_cv_lib_png_png_get_channels" >&6; }
13021if test "x$ac_cv_lib_png_png_get_channels" = x""yes; then :
13022 HAVE_PNG=yes
f199cab1 13023fi
067d23c9 13024
5476a9a4
GM
13025 fi
13026 fi
7834125e 13027
5476a9a4
GM
13028 if test "${HAVE_PNG}" = "yes"; then
13029
13030$as_echo "#define HAVE_PNG 1" >>confdefs.h
13031
13032 LIBPNG="-lpng -lz -lm"
13033
13034 ac_fn_c_check_decl "$LINENO" "png_longjmp" "ac_cv_have_decl_png_longjmp" "#ifdef HAVE_LIBPNG_PNG_H
13035 # include <libpng/png.h>
13036 #else
13037 # include <png.h>
13038 #endif
13039
13040"
13041if test "x$ac_cv_have_decl_png_longjmp" = x""yes; then :
13042
13043else
7834125e 13044
5476a9a4 13045$as_echo "#define PNG_DEPSTRUCT /**/" >>confdefs.h
7834125e 13046
f199cab1 13047fi
7834125e 13048
5476a9a4
GM
13049 fi
13050fi
7834125e
GM
13051
13052
5476a9a4
GM
13053### Use -ltiff if available, unless `--with-tiff=no'.
13054HAVE_TIFF=no
13055LIBTIFF=
5c0255d9 13056if test "${HAVE_X11}" = "yes" || test "${HAVE_W32}" = "yes"; then
5476a9a4
GM
13057 if test "${with_tiff}" != "no"; then
13058 ac_fn_c_check_header_mongrel "$LINENO" "tiffio.h" "ac_cv_header_tiffio_h" "$ac_includes_default"
13059if test "x$ac_cv_header_tiffio_h" = x""yes; then :
13060 tifflibs="-lz -lm"
13061 # At least one tiff package requires the jpeg library.
13062 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
13063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIFFGetVersion in -ltiff" >&5
13064$as_echo_n "checking for TIFFGetVersion in -ltiff... " >&6; }
13065if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then :
f199cab1
GM
13066 $as_echo_n "(cached) " >&6
13067else
5476a9a4
GM
13068 ac_check_lib_save_LIBS=$LIBS
13069LIBS="-ltiff $tifflibs $LIBS"
13070cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 13071/* end confdefs.h. */
067d23c9 13072
5476a9a4
GM
13073/* Override any GCC internal prototype to avoid an error.
13074 Use char because int might match the return type of a GCC
13075 builtin and then its argument prototype would still apply. */
13076#ifdef __cplusplus
13077extern "C"
f199cab1 13078#endif
5476a9a4
GM
13079char TIFFGetVersion ();
13080int
13081main ()
13082{
13083return TIFFGetVersion ();
13084 ;
13085 return 0;
13086}
f199cab1 13087_ACEOF
5476a9a4
GM
13088if ac_fn_c_try_link "$LINENO"; then :
13089 ac_cv_lib_tiff_TIFFGetVersion=yes
f199cab1 13090else
5476a9a4 13091 ac_cv_lib_tiff_TIFFGetVersion=no
f199cab1 13092fi
5476a9a4
GM
13093rm -f core conftest.err conftest.$ac_objext \
13094 conftest$ac_exeext conftest.$ac_ext
13095LIBS=$ac_check_lib_save_LIBS
f199cab1 13096fi
5476a9a4
GM
13097{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5
13098$as_echo "$ac_cv_lib_tiff_TIFFGetVersion" >&6; }
13099if test "x$ac_cv_lib_tiff_TIFFGetVersion" = x""yes; then :
13100 HAVE_TIFF=yes
f199cab1 13101fi
067d23c9 13102
5476a9a4 13103fi
067d23c9 13104
067d23c9 13105
5476a9a4 13106 fi
f199cab1 13107
5476a9a4 13108 if test "${HAVE_TIFF}" = "yes"; then
067d23c9 13109
5476a9a4 13110$as_echo "#define HAVE_TIFF 1" >>confdefs.h
067d23c9 13111
5476a9a4
GM
13112 LIBTIFF=-ltiff
13113 fi
f199cab1 13114fi
067d23c9 13115
067d23c9 13116
5476a9a4
GM
13117### Use -lgif or -lungif if available, unless `--with-gif=no'.
13118HAVE_GIF=no
13119LIBGIF=
5c0255d9
GM
13120if test "${HAVE_X11}" = "yes" && test "${with_gif}" != "no" \
13121 || test "${HAVE_W32}" = "yes"; then
5476a9a4
GM
13122 ac_fn_c_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
13123if test "x$ac_cv_header_gif_lib_h" = x""yes; then :
13124 # EGifPutExtensionLast only exists from version libungif-4.1.0b1.
13125# Earlier versions can crash Emacs.
13126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lgif" >&5
13127$as_echo_n "checking for EGifPutExtensionLast in -lgif... " >&6; }
13128if test "${ac_cv_lib_gif_EGifPutExtensionLast+set}" = set; then :
f199cab1
GM
13129 $as_echo_n "(cached) " >&6
13130else
5476a9a4
GM
13131 ac_check_lib_save_LIBS=$LIBS
13132LIBS="-lgif $LIBS"
13133cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 13134/* end confdefs.h. */
067d23c9 13135
5476a9a4
GM
13136/* Override any GCC internal prototype to avoid an error.
13137 Use char because int might match the return type of a GCC
13138 builtin and then its argument prototype would still apply. */
13139#ifdef __cplusplus
13140extern "C"
13141#endif
13142char EGifPutExtensionLast ();
f199cab1
GM
13143int
13144main ()
13145{
5476a9a4 13146return EGifPutExtensionLast ();
f199cab1
GM
13147 ;
13148 return 0;
13149}
13150_ACEOF
5476a9a4
GM
13151if ac_fn_c_try_link "$LINENO"; then :
13152 ac_cv_lib_gif_EGifPutExtensionLast=yes
f199cab1 13153else
5476a9a4 13154 ac_cv_lib_gif_EGifPutExtensionLast=no
f199cab1 13155fi
5476a9a4
GM
13156rm -f core conftest.err conftest.$ac_objext \
13157 conftest$ac_exeext conftest.$ac_ext
13158LIBS=$ac_check_lib_save_LIBS
13159fi
13160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_EGifPutExtensionLast" >&5
13161$as_echo "$ac_cv_lib_gif_EGifPutExtensionLast" >&6; }
13162if test "x$ac_cv_lib_gif_EGifPutExtensionLast" = x""yes; then :
13163 HAVE_GIF=yes
13164else
13165 HAVE_GIF=maybe
f199cab1 13166fi
067d23c9 13167
5476a9a4
GM
13168fi
13169
13170
13171
13172 if test "$HAVE_GIF" = yes; then
13173 LIBGIF=-lgif
13174 elif test "$HAVE_GIF" = maybe; then
13175# If gif_lib.h but no libgif, try libungif.
13176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lungif" >&5
13177$as_echo_n "checking for EGifPutExtensionLast in -lungif... " >&6; }
13178if test "${ac_cv_lib_ungif_EGifPutExtensionLast+set}" = set; then :
f199cab1
GM
13179 $as_echo_n "(cached) " >&6
13180else
5476a9a4
GM
13181 ac_check_lib_save_LIBS=$LIBS
13182LIBS="-lungif $LIBS"
13183cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 13184/* end confdefs.h. */
f199cab1 13185
5476a9a4
GM
13186/* Override any GCC internal prototype to avoid an error.
13187 Use char because int might match the return type of a GCC
13188 builtin and then its argument prototype would still apply. */
13189#ifdef __cplusplus
13190extern "C"
13191#endif
13192char EGifPutExtensionLast ();
f199cab1
GM
13193int
13194main ()
13195{
5476a9a4 13196return EGifPutExtensionLast ();
f199cab1
GM
13197 ;
13198 return 0;
13199}
13200_ACEOF
5476a9a4
GM
13201if ac_fn_c_try_link "$LINENO"; then :
13202 ac_cv_lib_ungif_EGifPutExtensionLast=yes
f199cab1 13203else
5476a9a4 13204 ac_cv_lib_ungif_EGifPutExtensionLast=no
f199cab1 13205fi
5476a9a4
GM
13206rm -f core conftest.err conftest.$ac_objext \
13207 conftest$ac_exeext conftest.$ac_ext
13208LIBS=$ac_check_lib_save_LIBS
f199cab1 13209fi
5476a9a4
GM
13210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5
13211$as_echo "$ac_cv_lib_ungif_EGifPutExtensionLast" >&6; }
13212if test "x$ac_cv_lib_ungif_EGifPutExtensionLast" = x""yes; then :
13213 HAVE_GIF=yes
13214else
13215 HAVE_GIF=no
13216fi
13217
13218 test "$HAVE_GIF" = yes && LIBGIF=-lungif
13219 fi
13220
13221 if test "${HAVE_GIF}" = "yes"; then
13222
13223$as_echo "#define HAVE_GIF 1" >>confdefs.h
13224
13225 fi
13226fi
13227
13228
13229if test "${HAVE_X11}" = "yes"; then
13230 MISSING=""
13231 WITH_NO=""
13232 test "${with_xpm}" != "no" && test "${HAVE_XPM}" != "yes" &&
13233 MISSING="libXpm" && WITH_NO="--with-xpm=no"
13234 test "${with_jpeg}" != "no" && test "${HAVE_JPEG}" != "yes" &&
13235 MISSING="$MISSING libjpeg" && WITH_NO="$WITH_NO --with-jpeg=no"
13236 test "${with_png}" != "no" && test "${HAVE_PNG}" != "yes" &&
13237 MISSING="$MISSING libpng" && WITH_NO="$WITH_NO --with-png=no"
13238 test "${with_gif}" != "no" && test "${HAVE_GIF}" != "yes" &&
13239 MISSING="$MISSING libgif/libungif" && WITH_NO="$WITH_NO --with-gif=no"
13240 test "${with_tiff}" != "no" && test "${HAVE_TIFF}" != "yes" &&
13241 MISSING="$MISSING libtiff" && WITH_NO="$WITH_NO --with-tiff=no"
13242
13243 if test "X${MISSING}" != X; then
13244 as_fn_error "The following required libraries were not found:
13245 $MISSING
13246Maybe some development libraries/packages are missing?
13247If you don't want to link with them give
13248 $WITH_NO
13249as options to configure" "$LINENO" 5
13250 fi
13251fi
13252
13253### Use -lgpm if available, unless `--with-gpm=no'.
13254HAVE_GPM=no
13255LIBGPM=
13256if test "${with_gpm}" != "no"; then
13257 ac_fn_c_check_header_mongrel "$LINENO" "gpm.h" "ac_cv_header_gpm_h" "$ac_includes_default"
13258if test "x$ac_cv_header_gpm_h" = x""yes; then :
13259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Gpm_Open in -lgpm" >&5
13260$as_echo_n "checking for Gpm_Open in -lgpm... " >&6; }
13261if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then :
067d23c9
KY
13262 $as_echo_n "(cached) " >&6
13263else
5476a9a4
GM
13264 ac_check_lib_save_LIBS=$LIBS
13265LIBS="-lgpm $LIBS"
13266cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
13267/* end confdefs.h. */
13268
5476a9a4
GM
13269/* Override any GCC internal prototype to avoid an error.
13270 Use char because int might match the return type of a GCC
13271 builtin and then its argument prototype would still apply. */
13272#ifdef __cplusplus
13273extern "C"
13274#endif
13275char Gpm_Open ();
067d23c9
KY
13276int
13277main ()
13278{
5476a9a4 13279return Gpm_Open ();
067d23c9
KY
13280 ;
13281 return 0;
13282}
13283_ACEOF
5476a9a4
GM
13284if ac_fn_c_try_link "$LINENO"; then :
13285 ac_cv_lib_gpm_Gpm_Open=yes
067d23c9 13286else
5476a9a4 13287 ac_cv_lib_gpm_Gpm_Open=no
067d23c9 13288fi
5476a9a4
GM
13289rm -f core conftest.err conftest.$ac_objext \
13290 conftest$ac_exeext conftest.$ac_ext
13291LIBS=$ac_check_lib_save_LIBS
13292fi
13293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gpm_Gpm_Open" >&5
13294$as_echo "$ac_cv_lib_gpm_Gpm_Open" >&6; }
13295if test "x$ac_cv_lib_gpm_Gpm_Open" = x""yes; then :
13296 HAVE_GPM=yes
067d23c9 13297fi
f199cab1 13298
5476a9a4 13299fi
f199cab1 13300
f199cab1 13301
f199cab1 13302
5476a9a4 13303 if test "${HAVE_GPM}" = "yes"; then
f199cab1 13304
5476a9a4 13305$as_echo "#define HAVE_GPM 1" >>confdefs.h
f199cab1 13306
5476a9a4
GM
13307 LIBGPM=-lgpm
13308 fi
067d23c9 13309fi
067d23c9
KY
13310
13311
13312
13313
13314
13315
5476a9a4
GM
13316GNUSTEP_CFLAGS=
13317### Use NeXTstep API to implement GUI.
13318if test "${HAVE_NS}" = "yes"; then
067d23c9 13319
5476a9a4 13320$as_echo "#define HAVE_NS 1" >>confdefs.h
067d23c9 13321
5476a9a4 13322 if test "${NS_IMPL_COCOA}" = "yes"; then
067d23c9 13323
5476a9a4 13324$as_echo "#define NS_IMPL_COCOA 1" >>confdefs.h
f199cab1 13325
5476a9a4
GM
13326 fi
13327 if test "${NS_IMPL_GNUSTEP}" = "yes"; then
f199cab1 13328
5476a9a4 13329$as_echo "#define NS_IMPL_GNUSTEP 1" >>confdefs.h
f199cab1 13330
5476a9a4
GM
13331 # See also .m.o rule in Makefile.in */
13332 # FIXME: are all these flags really needed? Document here why. */
13333 GNUSTEP_CFLAGS="-D_REENTRANT -fPIC -fno-strict-aliasing -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
13334 ## Extra CFLAGS applied to src/*.m files.
13335 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"
13336 fi
13337 # We also have mouse menus.
13338 HAVE_MENUS=yes
13339 OTHER_FILES=ns-app
13340fi
f199cab1 13341
5c0255d9
GM
13342if test "${HAVE_W32}" = "yes"; then
13343 HAVE_MENUS=yes
13344fi
f199cab1 13345
5476a9a4
GM
13346### Use session management (-lSM -lICE) if available
13347HAVE_X_SM=no
13348LIBXSM=
13349if test "${HAVE_X11}" = "yes"; then
13350 ac_fn_c_check_header_mongrel "$LINENO" "X11/SM/SMlib.h" "ac_cv_header_X11_SM_SMlib_h" "$ac_includes_default"
13351if test "x$ac_cv_header_X11_SM_SMlib_h" = x""yes; then :
13352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SmcOpenConnection in -lSM" >&5
13353$as_echo_n "checking for SmcOpenConnection in -lSM... " >&6; }
13354if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then :
067d23c9
KY
13355 $as_echo_n "(cached) " >&6
13356else
5476a9a4
GM
13357 ac_check_lib_save_LIBS=$LIBS
13358LIBS="-lSM -lICE $LIBS"
13359cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
13360/* end confdefs.h. */
13361
5476a9a4
GM
13362/* Override any GCC internal prototype to avoid an error.
13363 Use char because int might match the return type of a GCC
13364 builtin and then its argument prototype would still apply. */
13365#ifdef __cplusplus
13366extern "C"
13367#endif
13368char SmcOpenConnection ();
f199cab1
GM
13369int
13370main ()
13371{
5476a9a4
GM
13372return SmcOpenConnection ();
13373 ;
13374 return 0;
f199cab1 13375}
067d23c9 13376_ACEOF
5476a9a4
GM
13377if ac_fn_c_try_link "$LINENO"; then :
13378 ac_cv_lib_SM_SmcOpenConnection=yes
067d23c9 13379else
5476a9a4 13380 ac_cv_lib_SM_SmcOpenConnection=no
f199cab1 13381fi
5476a9a4
GM
13382rm -f core conftest.err conftest.$ac_objext \
13383 conftest$ac_exeext conftest.$ac_ext
13384LIBS=$ac_check_lib_save_LIBS
13385fi
13386{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_SM_SmcOpenConnection" >&5
13387$as_echo "$ac_cv_lib_SM_SmcOpenConnection" >&6; }
13388if test "x$ac_cv_lib_SM_SmcOpenConnection" = x""yes; then :
13389 HAVE_X_SM=yes
067d23c9 13390fi
067d23c9 13391
f199cab1 13392fi
f199cab1 13393
f199cab1 13394
067d23c9 13395
5476a9a4
GM
13396 if test "${HAVE_X_SM}" = "yes"; then
13397
13398$as_echo "#define HAVE_X_SM 1" >>confdefs.h
13399
13400 LIBXSM="-lSM -lICE"
13401 case "$LIBS" in
13402 *-lSM*) ;;
13403 *) LIBS="$LIBXSM $LIBS" ;;
13404 esac
067d23c9 13405 fi
5476a9a4 13406fi
067d23c9 13407
067d23c9 13408
5476a9a4
GM
13409### Use libxml (-lxml2) if available
13410HAVE_LIBXML2=no
13411if test "${with_xml2}" != "no"; then
13412 ### I'm not sure what the version number should be, so I just guessed.
067d23c9 13413
5476a9a4 13414 succeeded=no
067d23c9 13415
5476a9a4
GM
13416 if test "$PKG_CONFIG" = "no" ; then
13417 HAVE_LIBXML2=no
13418 else
13419 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 13420 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
13421 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxml-2.0 > 2.6.17" >&5
13422$as_echo_n "checking for libxml-2.0 > 2.6.17... " >&6; }
067d23c9 13423
b5591ebb
GM
13424 if "$PKG_CONFIG" --exists "libxml-2.0 > 2.6.17" 2>&5 &&
13425 LIBXML2_CFLAGS=`"$PKG_CONFIG" --cflags "libxml-2.0 > 2.6.17" 2>&5` &&
13426 LIBXML2_LIBS=`"$PKG_CONFIG" --libs "libxml-2.0 > 2.6.17" 2>&5`; then
5476a9a4
GM
13427 edit_cflags="
13428 s,///*,/,g
13429 s/^/ /
13430 s/ -I/ $isystem/g
13431 s/^ //
13432 "
13433 LIBXML2_CFLAGS=`$as_echo "$LIBXML2_CFLAGS" | sed -e "$edit_cflags"`
13434 LIBXML2_LIBS=`$as_echo "$LIBXML2_LIBS" | sed -e 's,///*,/,g'`
13435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBXML2_CFLAGS' LIBS='$LIBXML2_LIBS'" >&5
13436$as_echo "yes CFLAGS='$LIBXML2_CFLAGS' LIBS='$LIBXML2_LIBS'" >&6; }
13437 succeeded=yes
13438 else
13439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13440$as_echo "no" >&6; }
13441 LIBXML2_CFLAGS=""
13442 LIBXML2_LIBS=""
13443 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
13444 ## do set a variable so people can do so. Do it in a subshell
13445 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 13446 LIBXML2_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "libxml-2.0 > 2.6.17") 2>&1`
5476a9a4
GM
13447
13448 fi
13449
13450
13451
13452 else
13453 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
13454 echo "*** See http://www.freedesktop.org/software/pkgconfig"
13455 fi
13456 fi
13457
13458 if test $succeeded = yes; then
13459 HAVE_LIBXML2=yes
13460 else
13461 HAVE_LIBXML2=no
13462 fi
13463
13464 if test "${HAVE_LIBXML2}" = "yes"; then
13465 LIBS="$LIBXML2_LIBS $LIBS"
13466 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for htmlReadMemory in -lxml2" >&5
13467$as_echo_n "checking for htmlReadMemory in -lxml2... " >&6; }
13468if test "${ac_cv_lib_xml2_htmlReadMemory+set}" = set; then :
067d23c9
KY
13469 $as_echo_n "(cached) " >&6
13470else
5476a9a4
GM
13471 ac_check_lib_save_LIBS=$LIBS
13472LIBS="-lxml2 $LIBS"
13473cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
13474/* end confdefs.h. */
13475
5476a9a4
GM
13476/* Override any GCC internal prototype to avoid an error.
13477 Use char because int might match the return type of a GCC
13478 builtin and then its argument prototype would still apply. */
13479#ifdef __cplusplus
13480extern "C"
13481#endif
13482char htmlReadMemory ();
067d23c9
KY
13483int
13484main ()
13485{
5476a9a4 13486return htmlReadMemory ();
067d23c9
KY
13487 ;
13488 return 0;
13489}
13490_ACEOF
5476a9a4
GM
13491if ac_fn_c_try_link "$LINENO"; then :
13492 ac_cv_lib_xml2_htmlReadMemory=yes
067d23c9 13493else
5476a9a4 13494 ac_cv_lib_xml2_htmlReadMemory=no
067d23c9 13495fi
5476a9a4
GM
13496rm -f core conftest.err conftest.$ac_objext \
13497 conftest$ac_exeext conftest.$ac_ext
13498LIBS=$ac_check_lib_save_LIBS
13499fi
13500{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_htmlReadMemory" >&5
13501$as_echo "$ac_cv_lib_xml2_htmlReadMemory" >&6; }
13502if test "x$ac_cv_lib_xml2_htmlReadMemory" = x""yes; then :
13503 HAVE_LIBXML2=yes
13504else
13505 HAVE_LIBXML2=no
067d23c9
KY
13506fi
13507
5476a9a4 13508 if test "${HAVE_LIBXML2}" = "yes"; then
067d23c9 13509
5476a9a4 13510$as_echo "#define HAVE_LIBXML2 1" >>confdefs.h
067d23c9 13511
5476a9a4
GM
13512 else
13513 LIBXML2_LIBS=""
13514 LIBXML2_CFLAGS=""
13515 fi
067d23c9 13516 fi
5476a9a4 13517fi
067d23c9 13518
067d23c9 13519
067d23c9 13520
5476a9a4
GM
13521# If netdb.h doesn't declare h_errno, we must declare it by hand.
13522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether netdb declares h_errno" >&5
13523$as_echo_n "checking whether netdb declares h_errno... " >&6; }
13524if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then :
13525 $as_echo_n "(cached) " >&6
067d23c9 13526else
5476a9a4
GM
13527 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13528/* end confdefs.h. */
13529#include <netdb.h>
13530int
13531main ()
13532{
13533return h_errno;
13534 ;
13535 return 0;
13536}
13537_ACEOF
13538if ac_fn_c_try_link "$LINENO"; then :
13539 emacs_cv_netdb_declares_h_errno=yes
13540else
13541 emacs_cv_netdb_declares_h_errno=no
067d23c9 13542fi
5476a9a4
GM
13543rm -f core conftest.err conftest.$ac_objext \
13544 conftest$ac_exeext conftest.$ac_ext
13545fi
13546{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_netdb_declares_h_errno" >&5
13547$as_echo "$emacs_cv_netdb_declares_h_errno" >&6; }
13548if test $emacs_cv_netdb_declares_h_errno = yes; then
067d23c9 13549
5476a9a4 13550$as_echo "#define HAVE_H_ERRNO 1" >>confdefs.h
f199cab1 13551
5476a9a4 13552fi
f199cab1 13553
2c98a625
GM
13554# sqrt and other floating-point functions such as fmod and frexp
13555# are found in -lm on most systems.
5476a9a4
GM
13556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5
13557$as_echo_n "checking for sqrt in -lm... " >&6; }
13558if test "${ac_cv_lib_m_sqrt+set}" = set; then :
13559 $as_echo_n "(cached) " >&6
13560else
13561 ac_check_lib_save_LIBS=$LIBS
13562LIBS="-lm $LIBS"
13563cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13564/* end confdefs.h. */
f199cab1 13565
5476a9a4
GM
13566/* Override any GCC internal prototype to avoid an error.
13567 Use char because int might match the return type of a GCC
13568 builtin and then its argument prototype would still apply. */
13569#ifdef __cplusplus
13570extern "C"
13571#endif
13572char sqrt ();
13573int
13574main ()
13575{
13576return sqrt ();
13577 ;
13578 return 0;
13579}
13580_ACEOF
13581if ac_fn_c_try_link "$LINENO"; then :
13582 ac_cv_lib_m_sqrt=yes
13583else
13584 ac_cv_lib_m_sqrt=no
13585fi
13586rm -f core conftest.err conftest.$ac_objext \
13587 conftest$ac_exeext conftest.$ac_ext
13588LIBS=$ac_check_lib_save_LIBS
13589fi
13590{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sqrt" >&5
13591$as_echo "$ac_cv_lib_m_sqrt" >&6; }
13592if test "x$ac_cv_lib_m_sqrt" = x""yes; then :
13593 cat >>confdefs.h <<_ACEOF
13594#define HAVE_LIBM 1
13595_ACEOF
f199cab1 13596
5476a9a4 13597 LIBS="-lm $LIBS"
f199cab1 13598
5476a9a4 13599fi
f199cab1 13600
f199cab1 13601
5476a9a4
GM
13602# Check for mail-locking functions in a "mail" library. Probably this should
13603# have the same check as for liblockfile below.
13604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -lmail" >&5
13605$as_echo_n "checking for maillock in -lmail... " >&6; }
13606if test "${ac_cv_lib_mail_maillock+set}" = set; then :
067d23c9
KY
13607 $as_echo_n "(cached) " >&6
13608else
5476a9a4
GM
13609 ac_check_lib_save_LIBS=$LIBS
13610LIBS="-lmail $LIBS"
13611cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
13612/* end confdefs.h. */
13613
5476a9a4
GM
13614/* Override any GCC internal prototype to avoid an error.
13615 Use char because int might match the return type of a GCC
13616 builtin and then its argument prototype would still apply. */
13617#ifdef __cplusplus
13618extern "C"
067d23c9 13619#endif
5476a9a4
GM
13620char maillock ();
13621int
13622main ()
13623{
13624return maillock ();
13625 ;
13626 return 0;
13627}
067d23c9 13628_ACEOF
5476a9a4
GM
13629if ac_fn_c_try_link "$LINENO"; then :
13630 ac_cv_lib_mail_maillock=yes
067d23c9 13631else
5476a9a4 13632 ac_cv_lib_mail_maillock=no
067d23c9 13633fi
5476a9a4
GM
13634rm -f core conftest.err conftest.$ac_objext \
13635 conftest$ac_exeext conftest.$ac_ext
13636LIBS=$ac_check_lib_save_LIBS
067d23c9 13637fi
5476a9a4
GM
13638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mail_maillock" >&5
13639$as_echo "$ac_cv_lib_mail_maillock" >&6; }
13640if test "x$ac_cv_lib_mail_maillock" = x""yes; then :
13641 have_mail=yes
f199cab1 13642else
5476a9a4 13643 have_mail=no
067d23c9
KY
13644fi
13645
5476a9a4
GM
13646if test $have_mail = yes; then
13647 LIBS_MAIL=-lmail
13648 LIBS="$LIBS_MAIL $LIBS"
067d23c9 13649
5476a9a4 13650$as_echo "#define HAVE_LIBMAIL 1" >>confdefs.h
067d23c9 13651
5476a9a4
GM
13652else
13653 LIBS_MAIL=
13654fi
13655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -llockfile" >&5
13656$as_echo_n "checking for maillock in -llockfile... " >&6; }
13657if test "${ac_cv_lib_lockfile_maillock+set}" = set; then :
067d23c9
KY
13658 $as_echo_n "(cached) " >&6
13659else
5476a9a4
GM
13660 ac_check_lib_save_LIBS=$LIBS
13661LIBS="-llockfile $LIBS"
067d23c9
KY
13662cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13663/* end confdefs.h. */
13664
13665/* Override any GCC internal prototype to avoid an error.
13666 Use char because int might match the return type of a GCC
13667 builtin and then its argument prototype would still apply. */
13668#ifdef __cplusplus
13669extern "C"
13670#endif
5476a9a4 13671char maillock ();
067d23c9
KY
13672int
13673main ()
13674{
5476a9a4 13675return maillock ();
067d23c9
KY
13676 ;
13677 return 0;
13678}
13679_ACEOF
5476a9a4
GM
13680if ac_fn_c_try_link "$LINENO"; then :
13681 ac_cv_lib_lockfile_maillock=yes
13682else
13683 ac_cv_lib_lockfile_maillock=no
067d23c9
KY
13684fi
13685rm -f core conftest.err conftest.$ac_objext \
5476a9a4
GM
13686 conftest$ac_exeext conftest.$ac_ext
13687LIBS=$ac_check_lib_save_LIBS
067d23c9 13688fi
5476a9a4
GM
13689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lockfile_maillock" >&5
13690$as_echo "$ac_cv_lib_lockfile_maillock" >&6; }
13691if test "x$ac_cv_lib_lockfile_maillock" = x""yes; then :
13692 have_lockfile=yes
067d23c9 13693else
5476a9a4 13694 have_lockfile=no
f199cab1
GM
13695fi
13696
5476a9a4
GM
13697if test $have_lockfile = yes; then
13698 LIBS_MAIL=-llockfile
13699 LIBS="$LIBS_MAIL $LIBS"
067d23c9 13700
5476a9a4 13701$as_echo "#define HAVE_LIBLOCKFILE 1" >>confdefs.h
067d23c9 13702
5476a9a4
GM
13703else
13704# If we have the shared liblockfile, assume we must use it for mail
13705# locking (e.g. Debian). If we couldn't link against liblockfile
13706# (no liblockfile.a installed), ensure that we don't need to.
13707 # Extract the first word of "liblockfile.so", so it can be a program name with args.
13708set dummy liblockfile.so; ac_word=$2
13709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13710$as_echo_n "checking for $ac_word... " >&6; }
13711if test "${ac_cv_prog_liblockfile+set}" = set; then :
13712 $as_echo_n "(cached) " >&6
13713else
13714 if test -n "$liblockfile"; then
13715 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
13716else
13717as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13718as_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
13719for as_dir in $as_dummy
13720do
13721 IFS=$as_save_IFS
13722 test -z "$as_dir" && as_dir=.
13723 for ac_exec_ext in '' $ac_executable_extensions; do
13724 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
13725 ac_cv_prog_liblockfile="yes"
13726 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13727 break 2
13728 fi
13729done
13730 done
13731IFS=$as_save_IFS
067d23c9 13732
5476a9a4
GM
13733 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
13734fi
13735fi
13736liblockfile=$ac_cv_prog_liblockfile
13737if test -n "$liblockfile"; then
13738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $liblockfile" >&5
13739$as_echo "$liblockfile" >&6; }
13740else
13741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13742$as_echo "no" >&6; }
13743fi
067d23c9 13744
067d23c9 13745
5476a9a4
GM
13746 if test $ac_cv_prog_liblockfile = yes; then
13747 as_fn_error "Shared liblockfile found but can't link against it.
13748This probably means that movemail could lose mail.
13749There may be a \`development' package to install containing liblockfile." "$LINENO" 5
13750 fi
13751fi
067d23c9 13752
067d23c9 13753
067d23c9 13754
067d23c9
KY
13755
13756
5476a9a4
GM
13757## Define MAIL_USE_FLOCK (or LOCKF) if the mailer uses flock (or lockf) to
13758## interlock access to the mail spool. The alternative is a lock file named
13759## /usr/spool/mail/$USER.lock.
13760mail_lock=no
13761case "$opsys" in
13762 aix4-2) mail_lock="lockf" ;;
067d23c9 13763
5476a9a4 13764 gnu|freebsd|netbsd|openbsd|darwin|irix6-5) mail_lock="flock" ;;
067d23c9 13765
5476a9a4
GM
13766 ## On GNU/Linux systems, both methods are used by various mail programs.
13767 ## I assume most people are using newer mailers that have heard of flock.
13768 ## Change this if you need to.
13769 ## Debian contains a patch which says: ``On Debian/GNU/Linux systems,
13770 ## configure gets the right answers, and that means *NOT* using flock.
13771 ## Using flock is guaranteed to be the wrong thing. See Debian Policy
13772 ## for details.'' and then uses `#ifdef DEBIAN'. Unfortunately the
13773 ## Debian maintainer hasn't provided a clean fix for Emacs.
13774 ## movemail.c will use `maillock' when MAILDIR, HAVE_LIBMAIL and
13775 ## HAVE_MAILLOCK_H are defined, so the following appears to be the
13776 ## correct logic. -- fx
13777 ## We must check for HAVE_LIBLOCKFILE too, as movemail does.
13778 ## liblockfile is a Free Software replacement for libmail, used on
13779 ## Debian systems and elsewhere. -rfr.
13780 gnu-*)
13781 mail_lock="flock"
13782 if test $have_mail = yes || test $have_lockfile = yes; then
13783 test $ac_cv_header_maillock_h = yes && mail_lock=no
13784 fi
13785 ;;
13786esac
f199cab1 13787
5476a9a4
GM
13788BLESSMAIL_TARGET=
13789case "$mail_lock" in
13790 flock)
13791$as_echo "#define MAIL_USE_FLOCK 1" >>confdefs.h
13792 ;;
f199cab1 13793
5476a9a4
GM
13794 lockf)
13795$as_echo "#define MAIL_USE_LOCKF 1" >>confdefs.h
13796 ;;
f199cab1 13797
5476a9a4
GM
13798 *) BLESSMAIL_TARGET="need-blessmail" ;;
13799esac
f199cab1
GM
13800
13801
13802
5476a9a4 13803for ac_func in gethostname \
e7d0e5ee 13804getrusage get_current_dir_name \
eda33f78 13805lrand48 \
a455a5ce 13806select getpagesize setlocale \
aa8715fb 13807utimes getrlimit setrlimit shutdown getaddrinfo \
eda33f78 13808strsignal setitimer \
5476a9a4 13809sendto recvfrom getsockname getpeername getifaddrs freeifaddrs \
2407788f 13810gai_strerror mkstemp getline getdelim sync \
5476a9a4
GM
13811difftime posix_memalign \
13812getpwent endpwent getgrent endgrent \
13813touchlock \
13814cfmakeraw cfsetspeed copysign __executable_start
13815do :
13816 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13817ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13818eval as_val=\$$as_ac_var
13819 if test "x$as_val" = x""yes; then :
13820 cat >>confdefs.h <<_ACEOF
13821#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13822_ACEOF
f199cab1 13823
5476a9a4
GM
13824fi
13825done
f199cab1
GM
13826
13827
5476a9a4
GM
13828## Eric Backus <ericb@lsid.hp.com> says, HP-UX 9.x on HP 700 machines
13829## has a broken `rint' in some library versions including math library
13830## version number A.09.05.
13831## You can fix the math library by installing patch number PHSS_4630.
13832## But we can fix it more reliably for Emacs by just not using rint.
8ad96b1d 13833## We also skip HAVE_RANDOM - see comments in src/conf_post.h.
5476a9a4
GM
13834case $opsys in
13835 hpux*) : ;;
13836 *) for ac_func in random rint
13837do :
13838 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13839ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13840eval as_val=\$$as_ac_var
13841 if test "x$as_val" = x""yes; then :
13842 cat >>confdefs.h <<_ACEOF
13843#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13844_ACEOF
f199cab1 13845
5476a9a4
GM
13846fi
13847done
13848 ;;
13849esac
f199cab1 13850
5476a9a4
GM
13851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unwind_init" >&5
13852$as_echo_n "checking for __builtin_unwind_init... " >&6; }
13853if test "${emacs_cv_func___builtin_unwind_init+set}" = set; then :
067d23c9 13854 $as_echo_n "(cached) " >&6
f199cab1
GM
13855else
13856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
13857/* end confdefs.h. */
13858
067d23c9
KY
13859int
13860main ()
13861{
5476a9a4 13862__builtin_unwind_init ();
067d23c9
KY
13863 ;
13864 return 0;
13865}
13866_ACEOF
5476a9a4
GM
13867if ac_fn_c_try_link "$LINENO"; then :
13868 emacs_cv_func___builtin_unwind_init=yes
067d23c9 13869else
5476a9a4 13870 emacs_cv_func___builtin_unwind_init=no
067d23c9 13871fi
5476a9a4
GM
13872rm -f core conftest.err conftest.$ac_objext \
13873 conftest$ac_exeext conftest.$ac_ext
067d23c9 13874fi
5476a9a4
GM
13875{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_func___builtin_unwind_init" >&5
13876$as_echo "$emacs_cv_func___builtin_unwind_init" >&6; }
13877if test $emacs_cv_func___builtin_unwind_init = yes; then
067d23c9 13878
5476a9a4 13879$as_echo "#define HAVE___BUILTIN_UNWIND_INIT 1" >>confdefs.h
f199cab1 13880
067d23c9 13881fi
067d23c9 13882
f199cab1
GM
13883
13884
13885
13886
5476a9a4
GM
13887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
13888$as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
13889if test "${ac_cv_sys_largefile_source+set}" = set; then :
13890 $as_echo_n "(cached) " >&6
13891else
13892 while :; do
13893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13894/* end confdefs.h. */
13895#include <sys/types.h> /* for off_t */
13896 #include <stdio.h>
13897int
13898main ()
13899{
13900int (*fp) (FILE *, off_t, int) = fseeko;
13901 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
13902 ;
13903 return 0;
13904}
13905_ACEOF
13906if ac_fn_c_try_link "$LINENO"; then :
13907 ac_cv_sys_largefile_source=no; break
067d23c9 13908fi
5476a9a4
GM
13909rm -f core conftest.err conftest.$ac_objext \
13910 conftest$ac_exeext conftest.$ac_ext
13911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13912/* end confdefs.h. */
13913#define _LARGEFILE_SOURCE 1
13914#include <sys/types.h> /* for off_t */
13915 #include <stdio.h>
13916int
13917main ()
13918{
13919int (*fp) (FILE *, off_t, int) = fseeko;
13920 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
13921 ;
13922 return 0;
13923}
13924_ACEOF
13925if ac_fn_c_try_link "$LINENO"; then :
13926 ac_cv_sys_largefile_source=1; break
13927fi
13928rm -f core conftest.err conftest.$ac_objext \
13929 conftest$ac_exeext conftest.$ac_ext
13930 ac_cv_sys_largefile_source=unknown
13931 break
13932done
13933fi
13934{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
13935$as_echo "$ac_cv_sys_largefile_source" >&6; }
13936case $ac_cv_sys_largefile_source in #(
13937 no | unknown) ;;
13938 *)
13939cat >>confdefs.h <<_ACEOF
13940#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
13941_ACEOF
13942;;
13943esac
13944rm -rf conftest*
067d23c9 13945
5476a9a4
GM
13946# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
13947# in glibc 2.1.3, but that breaks too many other things.
13948# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
13949if test $ac_cv_sys_largefile_source != unknown; then
067d23c9 13950
5476a9a4 13951$as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
067d23c9 13952
5476a9a4 13953fi
067d23c9
KY
13954
13955
5476a9a4
GM
13956# UNIX98 PTYs.
13957for ac_func in grantpt
13958do :
13959 ac_fn_c_check_func "$LINENO" "grantpt" "ac_cv_func_grantpt"
13960if test "x$ac_cv_func_grantpt" = x""yes; then :
13961 cat >>confdefs.h <<_ACEOF
13962#define HAVE_GRANTPT 1
13963_ACEOF
f199cab1 13964
5476a9a4
GM
13965fi
13966done
f199cab1 13967
f199cab1 13968
5476a9a4 13969# PTY-related GNU extensions.
1146da8d 13970for ac_func in getpt posix_openpt
5476a9a4 13971do :
1146da8d
GM
13972 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13973ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13974eval as_val=\$$as_ac_var
13975 if test "x$as_val" = x""yes; then :
5476a9a4 13976 cat >>confdefs.h <<_ACEOF
1146da8d 13977#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
5476a9a4 13978_ACEOF
f199cab1 13979
5476a9a4
GM
13980fi
13981done
f199cab1 13982
f199cab1 13983
5476a9a4
GM
13984# Check this now, so that we will NOT find the above functions in ncurses.
13985# That is because we have not set up to link ncurses in lib-src.
13986# It's better to believe a function is not available
13987# than to expect to find it in ncurses.
13988# Also we need tputs and friends to be able to build at all.
13989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tputs" >&5
13990$as_echo_n "checking for library containing tputs... " >&6; }
13991# Run a test program that contains a call to tputs, a call that is
13992# never executed. This tests whether a pre-'main' dynamic linker
13993# works with the library. It's too much trouble to actually call
13994# tputs in the test program, due to portability hassles. When
13995# cross-compiling, assume the test program will run if it links.
f199cab1 13996
5476a9a4
GM
13997# Maybe curses should be tried earlier?
13998# See http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9736#35
13999for tputs_library in '' tinfo ncurses terminfo termcap curses; do
14000 OLIBS=$LIBS
14001 if test -z "$tputs_library"; then
14002 LIBS_TERMCAP=
14003 msg='none required'
14004 else
14005 LIBS_TERMCAP=-l$tputs_library
14006 msg=$LIBS_TERMCAP
14007 LIBS="$LIBS_TERMCAP $LIBS"
14008 fi
14009 if test "$cross_compiling" = yes; then :
14010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
14011/* end confdefs.h. */
14012
5476a9a4
GM
14013 extern void tputs (const char *, int, int (*)(int));
14014 int main (int argc, char **argv)
14015 {
14016 if (argc == 10000)
14017 tputs (argv[0], 0, 0);
14018 return 0;
14019 }
14020
067d23c9
KY
14021_ACEOF
14022if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 14023
067d23c9 14024else
5476a9a4 14025 msg=no
067d23c9
KY
14026fi
14027rm -f core conftest.err conftest.$ac_objext \
14028 conftest$ac_exeext conftest.$ac_ext
067d23c9 14029else
5476a9a4 14030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
14031/* end confdefs.h. */
14032
5476a9a4
GM
14033 extern void tputs (const char *, int, int (*)(int));
14034 int main (int argc, char **argv)
14035 {
14036 if (argc == 10000)
14037 tputs (argv[0], 0, 0);
14038 return 0;
14039 }
14040
067d23c9 14041_ACEOF
5476a9a4
GM
14042if ac_fn_c_try_run "$LINENO"; then :
14043
067d23c9 14044else
5476a9a4 14045 msg=no
067d23c9 14046fi
5476a9a4
GM
14047rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14048 conftest.$ac_objext conftest.beam conftest.$ac_ext
067d23c9 14049fi
5476a9a4
GM
14050
14051 LIBS=$OLIBS
14052 if test "X$msg" != Xno; then
14053 break
14054 fi
14055done
14056{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $msg" >&5
14057$as_echo "$msg" >&6; }
14058if test "X$msg" = Xno; then
14059 as_fn_error "The required function \`tputs' was not found in any library.
14060The following libraries were tried (in order):
14061 libtinfo, libncurses, libterminfo, libtermcap, libcurses
14062Please try installing whichever of these libraries is most appropriate
14063for your system, together with its header files.
14064For example, a libncurses-dev(el) or similar package." "$LINENO" 5
067d23c9
KY
14065fi
14066
5476a9a4
GM
14067## Use termcap instead of terminfo?
14068## Only true for: freebsd < 40000, ms-w32, msdos, netbsd < 599002500.
14069TERMINFO=yes
14070## FIXME? In the cases below where we unconditionally set
14071## LIBS_TERMCAP="-lncurses", this overrides LIBS_TERMCAP = -ltinfo,
14072## if that was found above to have tputs.
14073## Should we use the gnu* logic everywhere?
14074case "$opsys" in
14075 ## darwin: Prevents crashes when running Emacs in Terminal.app under 10.2.
14076 ## The ncurses library has been moved out of the System framework in
14077 ## Mac OS X 10.2. So if configure detects it, set the command-line
14078 ## option to use it.
14079 darwin) LIBS_TERMCAP="-lncurses" ;;
14080
14081 gnu*) test -z "$LIBS_TERMCAP" && LIBS_TERMCAP="-lncurses" ;;
14082
14083 freebsd)
14084 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether FreeBSD is new enough to use terminfo" >&5
14085$as_echo_n "checking whether FreeBSD is new enough to use terminfo... " >&6; }
14086 if test "${emacs_cv_freebsd_terminfo+set}" = set; then :
067d23c9
KY
14087 $as_echo_n "(cached) " >&6
14088else
5476a9a4 14089 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 14090/* end confdefs.h. */
5476a9a4 14091#include <osreldate.h>
067d23c9
KY
14092int
14093main ()
14094{
5476a9a4
GM
14095#if __FreeBSD_version < 400000
14096fail;
14097#endif
14098
067d23c9
KY
14099 ;
14100 return 0;
14101}
14102_ACEOF
14103if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 14104 emacs_cv_freebsd_terminfo=yes
067d23c9 14105else
5476a9a4 14106 emacs_cv_freebsd_terminfo=no
067d23c9
KY
14107fi
14108rm -f core conftest.err conftest.$ac_objext \
14109 conftest$ac_exeext conftest.$ac_ext
14110fi
5476a9a4
GM
14111
14112
14113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_freebsd_terminfo" >&5
14114$as_echo "$emacs_cv_freebsd_terminfo" >&6; }
14115
14116 if test $emacs_cv_freebsd_terminfo = yes; then
14117 LIBS_TERMCAP="-lncurses"
14118 else
14119 TERMINFO=no
14120 LIBS_TERMCAP="-ltermcap"
14121 fi
14122 ;;
14123
14124 netbsd)
14125 if test "x$LIBS_TERMCAP" != "x-lterminfo"; then
14126 TERMINFO=no
14127 LIBS_TERMCAP="-ltermcap"
14128 fi
14129 ;;
14130
14131 openbsd) LIBS_TERMCAP="-lncurses" ;;
14132
14133 ## hpux: Make sure we get select from libc rather than from libcurses
14134 ## because libcurses on HPUX 10.10 has a broken version of select.
14135 ## We used to use -lc -lcurses, but this may be cleaner.
14136 ## FIXME? But TERMINFO = yes on hpux (it used to be explicitly
14137 # set that way, now it uses the default). Isn't this a contradiction?
14138 hpux*) LIBS_TERMCAP="-ltermcap" ;;
14139
14140esac
14141
14142TERMCAP_OBJ=tparam.o
14143if test $TERMINFO = yes; then
14144
14145$as_echo "#define TERMINFO 1" >>confdefs.h
14146
14147 TERMCAP_OBJ=terminfo.o
067d23c9
KY
14148fi
14149
f199cab1 14150
067d23c9 14151
5476a9a4
GM
14152
14153# Do we have res_init, for detecting changes in /etc/resolv.conf?
14154# On Darwin, res_init appears not to be useful: see bug#562 and
14155# http://lists.gnu.org/archive/html/emacs-devel/2007-11/msg01467.html
14156resolv=no
14157
14158if test $opsys != darwin; then
14159
14160 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14161/* end confdefs.h. */
14162#include <netinet/in.h>
14163#include <arpa/nameser.h>
14164#include <resolv.h>
067d23c9
KY
14165int
14166main ()
14167{
5476a9a4 14168return res_init();
067d23c9
KY
14169 ;
14170 return 0;
14171}
14172_ACEOF
14173if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 14174 have_res_init=yes
067d23c9 14175else
5476a9a4 14176 have_res_init=no
067d23c9
KY
14177fi
14178rm -f core conftest.err conftest.$ac_objext \
14179 conftest$ac_exeext conftest.$ac_ext
5476a9a4
GM
14180 if test "$have_res_init" = no; then
14181 OLIBS="$LIBS"
14182 LIBS="$LIBS -lresolv"
14183 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_init with -lresolv" >&5
14184$as_echo_n "checking for res_init with -lresolv... " >&6; }
14185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 14186/* end confdefs.h. */
5476a9a4
GM
14187#include <netinet/in.h>
14188#include <arpa/nameser.h>
14189#include <resolv.h>
067d23c9
KY
14190int
14191main ()
14192{
5476a9a4 14193return res_init();
067d23c9
KY
14194 ;
14195 return 0;
14196}
14197_ACEOF
14198if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 14199 have_res_init=yes
067d23c9 14200else
5476a9a4 14201 have_res_init=no
067d23c9
KY
14202fi
14203rm -f core conftest.err conftest.$ac_objext \
14204 conftest$ac_exeext conftest.$ac_ext
5476a9a4
GM
14205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_res_init" >&5
14206$as_echo "$have_res_init" >&6; }
14207 if test "$have_res_init" = yes ; then
14208 resolv=yes
14209 fi
14210 LIBS="$OLIBS"
14211 fi
067d23c9 14212
5476a9a4
GM
14213 if test "$have_res_init" = yes; then
14214
14215$as_echo "#define HAVE_RES_INIT 1" >>confdefs.h
067d23c9 14216
5476a9a4 14217 fi
067d23c9 14218fi
5476a9a4
GM
14219# Do we need the Hesiod library to provide the support routines?
14220LIBHESIOD=
14221if test "$with_hesiod" != no ; then
14222 # Don't set $LIBS here -- see comments above. FIXME which comments?
14223 ac_fn_c_check_func "$LINENO" "res_send" "ac_cv_func_res_send"
14224if test "x$ac_cv_func_res_send" = x""yes; then :
f199cab1 14225
5476a9a4
GM
14226else
14227 ac_fn_c_check_func "$LINENO" "__res_send" "ac_cv_func___res_send"
14228if test "x$ac_cv_func___res_send" = x""yes; then :
f199cab1 14229
5476a9a4
GM
14230else
14231 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_send in -lresolv" >&5
14232$as_echo_n "checking for res_send in -lresolv... " >&6; }
14233if test "${ac_cv_lib_resolv_res_send+set}" = set; then :
067d23c9
KY
14234 $as_echo_n "(cached) " >&6
14235else
14236 ac_check_lib_save_LIBS=$LIBS
5476a9a4 14237LIBS="-lresolv $LIBS"
067d23c9
KY
14238cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14239/* end confdefs.h. */
14240
14241/* Override any GCC internal prototype to avoid an error.
14242 Use char because int might match the return type of a GCC
14243 builtin and then its argument prototype would still apply. */
14244#ifdef __cplusplus
14245extern "C"
14246#endif
5476a9a4 14247char res_send ();
067d23c9
KY
14248int
14249main ()
14250{
5476a9a4 14251return res_send ();
067d23c9
KY
14252 ;
14253 return 0;
14254}
14255_ACEOF
14256if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 14257 ac_cv_lib_resolv_res_send=yes
067d23c9 14258else
5476a9a4 14259 ac_cv_lib_resolv_res_send=no
067d23c9
KY
14260fi
14261rm -f core conftest.err conftest.$ac_objext \
f199cab1
GM
14262 conftest$ac_exeext conftest.$ac_ext
14263LIBS=$ac_check_lib_save_LIBS
14264fi
5476a9a4
GM
14265{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_send" >&5
14266$as_echo "$ac_cv_lib_resolv_res_send" >&6; }
14267if test "x$ac_cv_lib_resolv_res_send" = x""yes; then :
14268 resolv=yes
14269else
14270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __res_send in -lresolv" >&5
14271$as_echo_n "checking for __res_send in -lresolv... " >&6; }
14272if test "${ac_cv_lib_resolv___res_send+set}" = set; then :
f199cab1
GM
14273 $as_echo_n "(cached) " >&6
14274else
14275 ac_check_lib_save_LIBS=$LIBS
5476a9a4 14276LIBS="-lresolv $LIBS"
f199cab1
GM
14277cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14278/* end confdefs.h. */
4717915f 14279
f199cab1
GM
14280/* Override any GCC internal prototype to avoid an error.
14281 Use char because int might match the return type of a GCC
14282 builtin and then its argument prototype would still apply. */
14283#ifdef __cplusplus
14284extern "C"
14285#endif
5476a9a4 14286char __res_send ();
f199cab1
GM
14287int
14288main ()
14289{
5476a9a4 14290return __res_send ();
f199cab1
GM
14291 ;
14292 return 0;
14293}
14294_ACEOF
14295if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 14296 ac_cv_lib_resolv___res_send=yes
f199cab1 14297else
5476a9a4 14298 ac_cv_lib_resolv___res_send=no
f199cab1
GM
14299fi
14300rm -f core conftest.err conftest.$ac_objext \
14301 conftest$ac_exeext conftest.$ac_ext
14302LIBS=$ac_check_lib_save_LIBS
14303fi
5476a9a4
GM
14304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv___res_send" >&5
14305$as_echo "$ac_cv_lib_resolv___res_send" >&6; }
14306if test "x$ac_cv_lib_resolv___res_send" = x""yes; then :
14307 resolv=yes
067d23c9 14308fi
f199cab1 14309
5476a9a4 14310fi
1f5d53eb 14311
5476a9a4 14312fi
067d23c9 14313
067d23c9
KY
14314fi
14315
5476a9a4
GM
14316 if test "$resolv" = yes ; then
14317 RESOLVLIB=-lresolv
14318 else
14319 RESOLVLIB=
14320 fi
14321 ac_fn_c_check_func "$LINENO" "hes_getmailhost" "ac_cv_func_hes_getmailhost"
14322if test "x$ac_cv_func_hes_getmailhost" = x""yes; then :
14323
14324else
14325 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hes_getmailhost in -lhesiod" >&5
14326$as_echo_n "checking for hes_getmailhost in -lhesiod... " >&6; }
14327if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then :
14328 $as_echo_n "(cached) " >&6
14329else
14330 ac_check_lib_save_LIBS=$LIBS
14331LIBS="-lhesiod $RESOLVLIB $LIBS"
14332cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 14333/* end confdefs.h. */
5476a9a4
GM
14334
14335/* Override any GCC internal prototype to avoid an error.
14336 Use char because int might match the return type of a GCC
14337 builtin and then its argument prototype would still apply. */
14338#ifdef __cplusplus
14339extern "C"
14340#endif
14341char hes_getmailhost ();
067d23c9
KY
14342int
14343main ()
14344{
5476a9a4 14345return hes_getmailhost ();
067d23c9
KY
14346 ;
14347 return 0;
14348}
14349_ACEOF
f199cab1 14350if ac_fn_c_try_link "$LINENO"; then :
5476a9a4
GM
14351 ac_cv_lib_hesiod_hes_getmailhost=yes
14352else
14353 ac_cv_lib_hesiod_hes_getmailhost=no
067d23c9 14354fi
f199cab1
GM
14355rm -f core conftest.err conftest.$ac_objext \
14356 conftest$ac_exeext conftest.$ac_ext
5476a9a4 14357LIBS=$ac_check_lib_save_LIBS
067d23c9 14358fi
5476a9a4
GM
14359{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5
14360$as_echo "$ac_cv_lib_hesiod_hes_getmailhost" >&6; }
14361if test "x$ac_cv_lib_hesiod_hes_getmailhost" = x""yes; then :
14362 hesiod=yes
14363else
14364 :
067d23c9
KY
14365fi
14366
c5a68906 14367fi
f199cab1
GM
14368
14369
5476a9a4 14370 if test x"$hesiod" = xyes; then
f199cab1 14371
5476a9a4 14372$as_echo "#define HAVE_LIBHESIOD 1" >>confdefs.h
f199cab1 14373
5476a9a4 14374 LIBHESIOD=-lhesiod
c5a68906 14375 fi
5476a9a4 14376fi
4fc2b746 14377
4fc2b746 14378
5476a9a4
GM
14379# Do we need libresolv (due to res_init or Hesiod)?
14380if test "$resolv" = yes && test $opsys != darwin; then
4fc2b746 14381
5476a9a4 14382$as_echo "#define HAVE_LIBRESOLV 1" >>confdefs.h
4fc2b746 14383
5476a9a4
GM
14384 LIBRESOLV=-lresolv
14385else
14386 LIBRESOLV=
14387fi
4fc2b746 14388
4fc2b746 14389
5476a9a4
GM
14390# These tell us which Kerberos-related libraries to use.
14391COM_ERRLIB=
14392CRYPTOLIB=
14393KRB5LIB=
14394DESLIB=
14395KRB4LIB=
4fc2b746 14396
5476a9a4
GM
14397if test "${with_kerberos}" != no; then
14398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for com_err in -lcom_err" >&5
14399$as_echo_n "checking for com_err in -lcom_err... " >&6; }
14400if test "${ac_cv_lib_com_err_com_err+set}" = set; then :
14401 $as_echo_n "(cached) " >&6
14402else
14403 ac_check_lib_save_LIBS=$LIBS
14404LIBS="-lcom_err $LIBS"
14405cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14406/* end confdefs.h. */
4fc2b746 14407
5476a9a4
GM
14408/* Override any GCC internal prototype to avoid an error.
14409 Use char because int might match the return type of a GCC
14410 builtin and then its argument prototype would still apply. */
14411#ifdef __cplusplus
14412extern "C"
14413#endif
14414char com_err ();
14415int
14416main ()
14417{
14418return com_err ();
14419 ;
14420 return 0;
14421}
14422_ACEOF
14423if ac_fn_c_try_link "$LINENO"; then :
14424 ac_cv_lib_com_err_com_err=yes
14425else
14426 ac_cv_lib_com_err_com_err=no
14427fi
14428rm -f core conftest.err conftest.$ac_objext \
14429 conftest$ac_exeext conftest.$ac_ext
14430LIBS=$ac_check_lib_save_LIBS
14431fi
14432{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_com_err_com_err" >&5
14433$as_echo "$ac_cv_lib_com_err_com_err" >&6; }
14434if test "x$ac_cv_lib_com_err_com_err" = x""yes; then :
14435 have_com_err=yes
14436else
14437 have_com_err=no
14438fi
f199cab1 14439
5476a9a4
GM
14440 if test $have_com_err = yes; then
14441 COM_ERRLIB=-lcom_err
14442 LIBS="$COM_ERRLIB $LIBS"
f199cab1 14443
5476a9a4 14444$as_echo "#define HAVE_LIBCOM_ERR 1" >>confdefs.h
f199cab1 14445
5476a9a4
GM
14446 fi
14447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lcrypto" >&5
14448$as_echo_n "checking for mit_des_cbc_encrypt in -lcrypto... " >&6; }
14449if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then :
14450 $as_echo_n "(cached) " >&6
14451else
14452 ac_check_lib_save_LIBS=$LIBS
14453LIBS="-lcrypto $LIBS"
14454cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14455/* end confdefs.h. */
f199cab1 14456
5476a9a4
GM
14457/* Override any GCC internal prototype to avoid an error.
14458 Use char because int might match the return type of a GCC
14459 builtin and then its argument prototype would still apply. */
14460#ifdef __cplusplus
14461extern "C"
14462#endif
14463char mit_des_cbc_encrypt ();
14464int
14465main ()
14466{
14467return mit_des_cbc_encrypt ();
14468 ;
14469 return 0;
14470}
14471_ACEOF
14472if ac_fn_c_try_link "$LINENO"; then :
14473 ac_cv_lib_crypto_mit_des_cbc_encrypt=yes
14474else
14475 ac_cv_lib_crypto_mit_des_cbc_encrypt=no
14476fi
14477rm -f core conftest.err conftest.$ac_objext \
14478 conftest$ac_exeext conftest.$ac_ext
14479LIBS=$ac_check_lib_save_LIBS
14480fi
14481{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5
14482$as_echo "$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6; }
14483if test "x$ac_cv_lib_crypto_mit_des_cbc_encrypt" = x""yes; then :
14484 have_crypto=yes
14485else
14486 have_crypto=no
14487fi
f199cab1 14488
5476a9a4
GM
14489 if test $have_crypto = yes; then
14490 CRYPTOLIB=-lcrypto
14491 LIBS="$CRYPTOLIB $LIBS"
f199cab1 14492
5476a9a4 14493$as_echo "#define HAVE_LIBCRYPTO 1" >>confdefs.h
f199cab1 14494
5476a9a4
GM
14495 fi
14496 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
14497$as_echo_n "checking for mit_des_cbc_encrypt in -lk5crypto... " >&6; }
14498if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then :
14499 $as_echo_n "(cached) " >&6
14500else
14501 ac_check_lib_save_LIBS=$LIBS
14502LIBS="-lk5crypto $LIBS"
14503cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14504/* end confdefs.h. */
f199cab1 14505
5476a9a4
GM
14506/* Override any GCC internal prototype to avoid an error.
14507 Use char because int might match the return type of a GCC
14508 builtin and then its argument prototype would still apply. */
14509#ifdef __cplusplus
14510extern "C"
14511#endif
14512char mit_des_cbc_encrypt ();
14513int
14514main ()
14515{
14516return mit_des_cbc_encrypt ();
14517 ;
14518 return 0;
14519}
14520_ACEOF
14521if ac_fn_c_try_link "$LINENO"; then :
14522 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes
14523else
14524 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no
14525fi
14526rm -f core conftest.err conftest.$ac_objext \
14527 conftest$ac_exeext conftest.$ac_ext
14528LIBS=$ac_check_lib_save_LIBS
14529fi
14530{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5
14531$as_echo "$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6; }
14532if test "x$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" = x""yes; then :
14533 have_k5crypto=yes
14534else
14535 have_k5crypto=no
4fc2b746 14536fi
4fc2b746 14537
5476a9a4
GM
14538 if test $have_k5crypto = yes; then
14539 CRYPTOLIB=-lk5crypto
14540 LIBS="$CRYPTOLIB $LIBS"
4fc2b746 14541
5476a9a4 14542$as_echo "#define HAVE_LIBK5CRYPTO 1" >>confdefs.h
4fc2b746 14543
5476a9a4
GM
14544 fi
14545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5_init_context in -lkrb5" >&5
14546$as_echo_n "checking for krb5_init_context in -lkrb5... " >&6; }
14547if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then :
14548 $as_echo_n "(cached) " >&6
14549else
14550 ac_check_lib_save_LIBS=$LIBS
14551LIBS="-lkrb5 $LIBS"
14552cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14553/* end confdefs.h. */
4fc2b746 14554
5476a9a4
GM
14555/* Override any GCC internal prototype to avoid an error.
14556 Use char because int might match the return type of a GCC
14557 builtin and then its argument prototype would still apply. */
14558#ifdef __cplusplus
14559extern "C"
14560#endif
14561char krb5_init_context ();
14562int
14563main ()
14564{
14565return krb5_init_context ();
14566 ;
14567 return 0;
14568}
14569_ACEOF
14570if ac_fn_c_try_link "$LINENO"; then :
14571 ac_cv_lib_krb5_krb5_init_context=yes
14572else
14573 ac_cv_lib_krb5_krb5_init_context=no
14574fi
14575rm -f core conftest.err conftest.$ac_objext \
14576 conftest$ac_exeext conftest.$ac_ext
14577LIBS=$ac_check_lib_save_LIBS
14578fi
14579{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb5_krb5_init_context" >&5
14580$as_echo "$ac_cv_lib_krb5_krb5_init_context" >&6; }
14581if test "x$ac_cv_lib_krb5_krb5_init_context" = x""yes; then :
14582 have_krb5=yes
14583else
14584 have_krb5=no
14585fi
f199cab1 14586
5476a9a4
GM
14587 if test $have_krb5=yes; then
14588 KRB5LIB=-lkrb5
14589 LIBS="$KRB5LIB $LIBS"
f199cab1 14590
5476a9a4 14591$as_echo "#define HAVE_LIBKRB5 1" >>confdefs.h
f199cab1 14592
5476a9a4
GM
14593 fi
14594 if test "${with_kerberos5}" = no; then
14595 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes425" >&5
14596$as_echo_n "checking for des_cbc_encrypt in -ldes425... " >&6; }
14597if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then :
f199cab1
GM
14598 $as_echo_n "(cached) " >&6
14599else
5476a9a4
GM
14600 ac_check_lib_save_LIBS=$LIBS
14601LIBS="-ldes425 $LIBS"
14602cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3e0be4ab 14603/* end confdefs.h. */
f199cab1 14604
5476a9a4
GM
14605/* Override any GCC internal prototype to avoid an error.
14606 Use char because int might match the return type of a GCC
14607 builtin and then its argument prototype would still apply. */
14608#ifdef __cplusplus
14609extern "C"
14610#endif
14611char des_cbc_encrypt ();
3e0be4ab
GM
14612int
14613main ()
14614{
5476a9a4 14615return des_cbc_encrypt ();
3e0be4ab
GM
14616 ;
14617 return 0;
14618}
14619_ACEOF
5476a9a4
GM
14620if ac_fn_c_try_link "$LINENO"; then :
14621 ac_cv_lib_des425_des_cbc_encrypt=yes
3e0be4ab 14622else
5476a9a4 14623 ac_cv_lib_des425_des_cbc_encrypt=no
3e0be4ab 14624fi
5476a9a4
GM
14625rm -f core conftest.err conftest.$ac_objext \
14626 conftest$ac_exeext conftest.$ac_ext
14627LIBS=$ac_check_lib_save_LIBS
4fc2b746 14628fi
5476a9a4
GM
14629{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
14630$as_echo "$ac_cv_lib_des425_des_cbc_encrypt" >&6; }
14631if test "x$ac_cv_lib_des425_des_cbc_encrypt" = x""yes; then :
14632 have_des425=yes
14633else
14634 have_des425=no
f199cab1 14635fi
6c051bab 14636
5476a9a4
GM
14637 if test $have_des425 = yes; then
14638 DESLIB=-ldes425
14639 LIBS="$DESLIB $LIBS"
6c051bab 14640
5476a9a4 14641$as_echo "#define HAVE_LIBDES425 1" >>confdefs.h
f199cab1 14642
5476a9a4
GM
14643 else
14644 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes" >&5
14645$as_echo_n "checking for des_cbc_encrypt in -ldes... " >&6; }
14646if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then :
14647 $as_echo_n "(cached) " >&6
14648else
14649 ac_check_lib_save_LIBS=$LIBS
14650LIBS="-ldes $LIBS"
14651cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14652/* end confdefs.h. */
f199cab1 14653
5476a9a4
GM
14654/* Override any GCC internal prototype to avoid an error.
14655 Use char because int might match the return type of a GCC
14656 builtin and then its argument prototype would still apply. */
14657#ifdef __cplusplus
14658extern "C"
14659#endif
14660char des_cbc_encrypt ();
14661int
14662main ()
14663{
14664return des_cbc_encrypt ();
14665 ;
14666 return 0;
14667}
14668_ACEOF
14669if ac_fn_c_try_link "$LINENO"; then :
14670 ac_cv_lib_des_des_cbc_encrypt=yes
14671else
14672 ac_cv_lib_des_des_cbc_encrypt=no
14673fi
14674rm -f core conftest.err conftest.$ac_objext \
14675 conftest$ac_exeext conftest.$ac_ext
14676LIBS=$ac_check_lib_save_LIBS
14677fi
14678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
14679$as_echo "$ac_cv_lib_des_des_cbc_encrypt" >&6; }
14680if test "x$ac_cv_lib_des_des_cbc_encrypt" = x""yes; then :
14681 have_des=yes
14682else
14683 have_des=no
14684fi
f199cab1 14685
5476a9a4
GM
14686 if test $have_des = yes; then
14687 DESLIB=-ldes
14688 LIBS="$DESLIB $LIBS"
f199cab1 14689
5476a9a4 14690$as_echo "#define HAVE_LIBDES 1" >>confdefs.h
f199cab1 14691
5476a9a4
GM
14692 fi
14693 fi
14694 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb4" >&5
14695$as_echo_n "checking for krb_get_cred in -lkrb4... " >&6; }
14696if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then :
942f733f
PE
14697 $as_echo_n "(cached) " >&6
14698else
5476a9a4
GM
14699 ac_check_lib_save_LIBS=$LIBS
14700LIBS="-lkrb4 $LIBS"
14701cat confdefs.h - <<_ACEOF >conftest.$ac_ext
942f733f 14702/* end confdefs.h. */
942f733f 14703
5476a9a4
GM
14704/* Override any GCC internal prototype to avoid an error.
14705 Use char because int might match the return type of a GCC
14706 builtin and then its argument prototype would still apply. */
14707#ifdef __cplusplus
14708extern "C"
14709#endif
14710char krb_get_cred ();
942f733f
PE
14711int
14712main ()
14713{
5476a9a4 14714return krb_get_cred ();
942f733f
PE
14715 ;
14716 return 0;
14717}
14718_ACEOF
5476a9a4
GM
14719if ac_fn_c_try_link "$LINENO"; then :
14720 ac_cv_lib_krb4_krb_get_cred=yes
14721else
14722 ac_cv_lib_krb4_krb_get_cred=no
14723fi
14724rm -f core conftest.err conftest.$ac_objext \
14725 conftest$ac_exeext conftest.$ac_ext
14726LIBS=$ac_check_lib_save_LIBS
14727fi
14728{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb4_krb_get_cred" >&5
14729$as_echo "$ac_cv_lib_krb4_krb_get_cred" >&6; }
14730if test "x$ac_cv_lib_krb4_krb_get_cred" = x""yes; then :
14731 have_krb4=yes
14732else
14733 have_krb4=no
14734fi
14735
14736 if test $have_krb4 = yes; then
14737 KRB4LIB=-lkrb4
14738 LIBS="$KRB4LIB $LIBS"
14739
14740$as_echo "#define HAVE_LIBKRB4 1" >>confdefs.h
14741
14742 else
14743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb" >&5
14744$as_echo_n "checking for krb_get_cred in -lkrb... " >&6; }
14745if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then :
14746 $as_echo_n "(cached) " >&6
3e0be4ab 14747else
5476a9a4
GM
14748 ac_check_lib_save_LIBS=$LIBS
14749LIBS="-lkrb $LIBS"
14750cat confdefs.h - <<_ACEOF >conftest.$ac_ext
942f733f 14751/* end confdefs.h. */
942f733f 14752
5476a9a4
GM
14753/* Override any GCC internal prototype to avoid an error.
14754 Use char because int might match the return type of a GCC
14755 builtin and then its argument prototype would still apply. */
14756#ifdef __cplusplus
14757extern "C"
14758#endif
14759char krb_get_cred ();
942f733f
PE
14760int
14761main ()
14762{
5476a9a4 14763return krb_get_cred ();
942f733f
PE
14764 ;
14765 return 0;
14766}
14767_ACEOF
5476a9a4
GM
14768if ac_fn_c_try_link "$LINENO"; then :
14769 ac_cv_lib_krb_krb_get_cred=yes
942f733f 14770else
5476a9a4 14771 ac_cv_lib_krb_krb_get_cred=no
942f733f 14772fi
5476a9a4
GM
14773rm -f core conftest.err conftest.$ac_objext \
14774 conftest$ac_exeext conftest.$ac_ext
14775LIBS=$ac_check_lib_save_LIBS
3e0be4ab 14776fi
5476a9a4
GM
14777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb_krb_get_cred" >&5
14778$as_echo "$ac_cv_lib_krb_krb_get_cred" >&6; }
14779if test "x$ac_cv_lib_krb_krb_get_cred" = x""yes; then :
14780 have_krb=yes
14781else
14782 have_krb=no
942f733f 14783fi
f199cab1 14784
5476a9a4
GM
14785 if test $have_krb = yes; then
14786 KRB4LIB=-lkrb
14787 LIBS="$KRB4LIB $LIBS"
14788
14789$as_echo "#define HAVE_LIBKRB 1" >>confdefs.h
14790
14791 fi
14792 fi
f199cab1
GM
14793 fi
14794
5476a9a4
GM
14795 if test "${with_kerberos5}" != no; then
14796 for ac_header in krb5.h
14797do :
14798 ac_fn_c_check_header_mongrel "$LINENO" "krb5.h" "ac_cv_header_krb5_h" "$ac_includes_default"
14799if test "x$ac_cv_header_krb5_h" = x""yes; then :
14800 cat >>confdefs.h <<_ACEOF
14801#define HAVE_KRB5_H 1
14802_ACEOF
14803 ac_fn_c_check_member "$LINENO" "krb5_error" "text" "ac_cv_member_krb5_error_text" "#include <krb5.h>
14804"
14805if test "x$ac_cv_member_krb5_error_text" = x""yes; then :
14806
f199cab1 14807cat >>confdefs.h <<_ACEOF
5476a9a4 14808#define HAVE_KRB5_ERROR_TEXT 1
f199cab1
GM
14809_ACEOF
14810
14811
5476a9a4
GM
14812fi
14813ac_fn_c_check_member "$LINENO" "krb5_error" "e_text" "ac_cv_member_krb5_error_e_text" "#include <krb5.h>
14814"
14815if test "x$ac_cv_member_krb5_error_e_text" = x""yes; then :
f199cab1 14816
5476a9a4
GM
14817cat >>confdefs.h <<_ACEOF
14818#define HAVE_KRB5_ERROR_E_TEXT 1
14819_ACEOF
f199cab1
GM
14820
14821
5476a9a4 14822fi
f199cab1 14823
5476a9a4 14824fi
f199cab1 14825
5476a9a4 14826done
f199cab1 14827
5476a9a4
GM
14828 else
14829 for ac_header in des.h
14830do :
14831 ac_fn_c_check_header_mongrel "$LINENO" "des.h" "ac_cv_header_des_h" "$ac_includes_default"
14832if test "x$ac_cv_header_des_h" = x""yes; then :
14833 cat >>confdefs.h <<_ACEOF
14834#define HAVE_DES_H 1
14835_ACEOF
f199cab1 14836
5476a9a4
GM
14837else
14838 for ac_header in kerberosIV/des.h
14839do :
14840 ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/des.h" "ac_cv_header_kerberosIV_des_h" "$ac_includes_default"
14841if test "x$ac_cv_header_kerberosIV_des_h" = x""yes; then :
14842 cat >>confdefs.h <<_ACEOF
14843#define HAVE_KERBEROSIV_DES_H 1
14844_ACEOF
f199cab1 14845
5476a9a4
GM
14846else
14847 for ac_header in kerberos/des.h
14848do :
14849 ac_fn_c_check_header_mongrel "$LINENO" "kerberos/des.h" "ac_cv_header_kerberos_des_h" "$ac_includes_default"
14850if test "x$ac_cv_header_kerberos_des_h" = x""yes; then :
14851 cat >>confdefs.h <<_ACEOF
14852#define HAVE_KERBEROS_DES_H 1
14853_ACEOF
f199cab1 14854
5476a9a4 14855fi
f199cab1 14856
5476a9a4
GM
14857done
14858
14859fi
14860
14861done
14862
14863fi
14864
14865done
14866
14867 for ac_header in krb.h
f199cab1 14868do :
5476a9a4
GM
14869 ac_fn_c_check_header_mongrel "$LINENO" "krb.h" "ac_cv_header_krb_h" "$ac_includes_default"
14870if test "x$ac_cv_header_krb_h" = x""yes; then :
f199cab1 14871 cat >>confdefs.h <<_ACEOF
5476a9a4
GM
14872#define HAVE_KRB_H 1
14873_ACEOF
14874
14875else
14876 for ac_header in kerberosIV/krb.h
14877do :
14878 ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/krb.h" "ac_cv_header_kerberosIV_krb_h" "$ac_includes_default"
14879if test "x$ac_cv_header_kerberosIV_krb_h" = x""yes; then :
14880 cat >>confdefs.h <<_ACEOF
14881#define HAVE_KERBEROSIV_KRB_H 1
14882_ACEOF
14883
14884else
14885 for ac_header in kerberos/krb.h
14886do :
14887 ac_fn_c_check_header_mongrel "$LINENO" "kerberos/krb.h" "ac_cv_header_kerberos_krb_h" "$ac_includes_default"
14888if test "x$ac_cv_header_kerberos_krb_h" = x""yes; then :
14889 cat >>confdefs.h <<_ACEOF
14890#define HAVE_KERBEROS_KRB_H 1
f199cab1 14891_ACEOF
942f733f 14892
3e0be4ab 14893fi
942f733f 14894
f199cab1
GM
14895done
14896
5476a9a4
GM
14897fi
14898
14899done
14900
14901fi
14902
14903done
14904
14905 fi
14906 for ac_header in com_err.h
f199cab1 14907do :
5476a9a4
GM
14908 ac_fn_c_check_header_mongrel "$LINENO" "com_err.h" "ac_cv_header_com_err_h" "$ac_includes_default"
14909if test "x$ac_cv_header_com_err_h" = x""yes; then :
f199cab1 14910 cat >>confdefs.h <<_ACEOF
5476a9a4 14911#define HAVE_COM_ERR_H 1
f199cab1
GM
14912_ACEOF
14913
3e0be4ab 14914fi
f199cab1 14915
5476a9a4 14916done
3e0be4ab
GM
14917
14918fi
14919
f199cab1
GM
14920
14921
14922
14923
f199cab1
GM
14924
14925
14926
14927
14928
5476a9a4
GM
14929 for ac_func in $ac_func_list
14930do :
14931 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14932ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14933eval as_val=\$$as_ac_var
14934 if test "x$as_val" = x""yes; then :
14935 cat >>confdefs.h <<_ACEOF
14936#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14937_ACEOF
14938
14939fi
14940done
14941
f199cab1
GM
14942
14943
14944
5476a9a4
GM
14945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime caches TZ" >&5
14946$as_echo_n "checking whether localtime caches TZ... " >&6; }
14947if test "${emacs_cv_localtime_cache+set}" = set; then :
14948 $as_echo_n "(cached) " >&6
14949else
14950 if test x$ac_cv_func_tzset = xyes; then
14951if test "$cross_compiling" = yes; then :
14952 # If we have tzset, assume the worst when cross-compiling.
14953emacs_cv_localtime_cache=yes
14954else
14955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14956/* end confdefs.h. */
14957#include <time.h>
14958char TZ_GMT0[] = "TZ=GMT0";
14959char TZ_PST8[] = "TZ=PST8";
14960main()
14961{
14962 time_t now = time ((time_t *) 0);
14963 int hour_GMT0, hour_unset;
14964 if (putenv (TZ_GMT0) != 0)
14965 exit (1);
14966 hour_GMT0 = localtime (&now)->tm_hour;
14967 unsetenv("TZ");
14968 hour_unset = localtime (&now)->tm_hour;
14969 if (putenv (TZ_PST8) != 0)
14970 exit (1);
14971 if (localtime (&now)->tm_hour == hour_GMT0)
14972 exit (1);
14973 unsetenv("TZ");
14974 if (localtime (&now)->tm_hour != hour_unset)
14975 exit (1);
14976 exit (0);
14977}
14978_ACEOF
14979if ac_fn_c_try_run "$LINENO"; then :
14980 emacs_cv_localtime_cache=no
14981else
14982 emacs_cv_localtime_cache=yes
14983fi
14984rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14985 conftest.$ac_objext conftest.beam conftest.$ac_ext
14986fi
f199cab1 14987
5476a9a4
GM
14988else
14989 # If we lack tzset, report that localtime does not cache TZ,
14990 # since we can't invalidate the cache if we don't have tzset.
14991 emacs_cv_localtime_cache=no
14992fi
14993fi
14994{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_localtime_cache" >&5
14995$as_echo "$emacs_cv_localtime_cache" >&6; }
14996if test $emacs_cv_localtime_cache = yes; then
f199cab1 14997
5476a9a4 14998$as_echo "#define LOCALTIME_CACHE 1" >>confdefs.h
f199cab1 14999
5476a9a4 15000fi
f199cab1 15001
5476a9a4
GM
15002ok_so_far=yes
15003ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket"
15004if test "x$ac_cv_func_socket" = x""yes; then :
3e0be4ab 15005
5476a9a4
GM
15006else
15007 ok_so_far=no
15008fi
f199cab1 15009
5476a9a4
GM
15010if test $ok_so_far = yes; then
15011 ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
15012if test "x$ac_cv_header_netinet_in_h" = x""yes; then :
f199cab1 15013
5476a9a4
GM
15014else
15015 ok_so_far=no
15016fi
f199cab1
GM
15017
15018
5476a9a4
GM
15019fi
15020if test $ok_so_far = yes; then
15021 ac_fn_c_check_header_mongrel "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default"
15022if test "x$ac_cv_header_arpa_inet_h" = x""yes; then :
f199cab1 15023
5476a9a4
GM
15024else
15025 ok_so_far=no
15026fi
f199cab1
GM
15027
15028
5476a9a4
GM
15029fi
15030if test $ok_so_far = yes; then
f199cab1 15031
5476a9a4 15032$as_echo "#define HAVE_INET_SOCKETS 1" >>confdefs.h
f199cab1 15033
5476a9a4 15034fi
f199cab1 15035
5476a9a4 15036if test -f /usr/lpp/X11/bin/smt.exp; then
942f733f 15037
5476a9a4 15038$as_echo "#define HAVE_AIX_SMT_EXP 1" >>confdefs.h
942f733f 15039
942f733f 15040fi
3e0be4ab 15041
5476a9a4
GM
15042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system supports dynamic ptys" >&5
15043$as_echo_n "checking whether system supports dynamic ptys... " >&6; }
15044if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
15045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15046$as_echo "yes" >&6; }
15047
15048$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
3e0be4ab 15049
5476a9a4
GM
15050else
15051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15052$as_echo "no" >&6; }
15053fi
3e0be4ab 15054
bb7dce39
GM
15055case $canonical in
15056 *-solaris2.4 | *-solaris2.4.*)
15057 : ${ac_cv_func_vfork_works=no};;
15058esac
15059
5476a9a4
GM
15060ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
15061if test "x$ac_cv_type_pid_t" = x""yes; then :
3e0be4ab 15062
5476a9a4 15063else
3e0be4ab 15064
5476a9a4
GM
15065cat >>confdefs.h <<_ACEOF
15066#define pid_t int
15067_ACEOF
f199cab1 15068
5476a9a4 15069fi
f199cab1 15070
5476a9a4
GM
15071for ac_header in vfork.h
15072do :
15073 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
15074if test "x$ac_cv_header_vfork_h" = x""yes; then :
15075 cat >>confdefs.h <<_ACEOF
15076#define HAVE_VFORK_H 1
15077_ACEOF
f199cab1 15078
5476a9a4 15079fi
f199cab1 15080
5476a9a4 15081done
f199cab1 15082
5476a9a4
GM
15083for ac_func in fork vfork
15084do :
15085 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15086ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15087eval as_val=\$$as_ac_var
15088 if test "x$as_val" = x""yes; then :
15089 cat >>confdefs.h <<_ACEOF
15090#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15091_ACEOF
f199cab1 15092
5476a9a4
GM
15093fi
15094done
f199cab1 15095
5476a9a4
GM
15096if test "x$ac_cv_func_fork" = xyes; then
15097 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
15098$as_echo_n "checking for working fork... " >&6; }
15099if test "${ac_cv_func_fork_works+set}" = set; then :
15100 $as_echo_n "(cached) " >&6
15101else
15102 if test "$cross_compiling" = yes; then :
15103 ac_cv_func_fork_works=cross
15104else
15105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15106/* end confdefs.h. */
15107$ac_includes_default
15108int
15109main ()
15110{
f199cab1 15111
5476a9a4
GM
15112 /* By Ruediger Kuhlmann. */
15113 return fork () < 0;
f199cab1 15114
5476a9a4
GM
15115 ;
15116 return 0;
15117}
15118_ACEOF
15119if ac_fn_c_try_run "$LINENO"; then :
15120 ac_cv_func_fork_works=yes
15121else
15122 ac_cv_func_fork_works=no
15123fi
15124rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15125 conftest.$ac_objext conftest.beam conftest.$ac_ext
15126fi
f199cab1 15127
5476a9a4
GM
15128fi
15129{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
15130$as_echo "$ac_cv_func_fork_works" >&6; }
f199cab1 15131
5476a9a4
GM
15132else
15133 ac_cv_func_fork_works=$ac_cv_func_fork
15134fi
15135if test "x$ac_cv_func_fork_works" = xcross; then
15136 case $host in
15137 *-*-amigaos* | *-*-msdosdjgpp*)
15138 # Override, as these systems have only a dummy fork() stub
15139 ac_cv_func_fork_works=no
15140 ;;
15141 *)
15142 ac_cv_func_fork_works=yes
15143 ;;
15144 esac
15145 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
15146$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
15147fi
15148ac_cv_func_vfork_works=$ac_cv_func_vfork
15149if test "x$ac_cv_func_vfork" = xyes; then
15150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
15151$as_echo_n "checking for working vfork... " >&6; }
15152if test "${ac_cv_func_vfork_works+set}" = set; then :
f199cab1
GM
15153 $as_echo_n "(cached) " >&6
15154else
15155 if test "$cross_compiling" = yes; then :
5476a9a4 15156 ac_cv_func_vfork_works=cross
f199cab1
GM
15157else
15158 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15159/* end confdefs.h. */
5476a9a4
GM
15160/* Thanks to Paul Eggert for this test. */
15161$ac_includes_default
15162#include <sys/wait.h>
15163#ifdef HAVE_VFORK_H
15164# include <vfork.h>
f199cab1 15165#endif
5476a9a4
GM
15166/* On some sparc systems, changes by the child to local and incoming
15167 argument registers are propagated back to the parent. The compiler
15168 is told about this with #include <vfork.h>, but some compilers
15169 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
15170 static variable whose address is put into a register that is
15171 clobbered by the vfork. */
15172static void
15173#ifdef __cplusplus
15174sparc_address_test (int arg)
15175# else
15176sparc_address_test (arg) int arg;
f199cab1 15177#endif
5476a9a4
GM
15178{
15179 static pid_t child;
15180 if (!child) {
15181 child = vfork ();
15182 if (child < 0) {
15183 perror ("vfork");
15184 _exit(2);
15185 }
15186 if (!child) {
15187 arg = getpid();
15188 write(-1, "", 0);
15189 _exit (arg);
15190 }
15191 }
15192}
f199cab1 15193
5476a9a4
GM
15194int
15195main ()
15196{
15197 pid_t parent = getpid ();
15198 pid_t child;
f199cab1 15199
5476a9a4 15200 sparc_address_test (0);
f199cab1 15201
5476a9a4 15202 child = vfork ();
3e0be4ab 15203
5476a9a4
GM
15204 if (child == 0) {
15205 /* Here is another test for sparc vfork register problems. This
15206 test uses lots of local variables, at least as many local
15207 variables as main has allocated so far including compiler
15208 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
15209 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
15210 reuse the register of parent for one of the local variables,
15211 since it will think that parent can't possibly be used any more
15212 in this routine. Assigning to the local variable will thus
15213 munge parent in the parent process. */
15214 pid_t
15215 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
15216 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
15217 /* Convince the compiler that p..p7 are live; otherwise, it might
15218 use the same hardware register for all 8 local variables. */
15219 if (p != p1 || p != p2 || p != p3 || p != p4
15220 || p != p5 || p != p6 || p != p7)
15221 _exit(1);
3e0be4ab 15222
5476a9a4
GM
15223 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
15224 from child file descriptors. If the child closes a descriptor
15225 before it execs or exits, this munges the parent's descriptor
15226 as well. Test for this by closing stdout in the child. */
15227 _exit(close(fileno(stdout)) != 0);
15228 } else {
15229 int status;
15230 struct stat st;
3e0be4ab 15231
5476a9a4
GM
15232 while (wait(&status) != child)
15233 ;
15234 return (
15235 /* Was there some problem with vforking? */
15236 child < 0
3e0be4ab 15237
5476a9a4
GM
15238 /* Did the child fail? (This shouldn't happen.) */
15239 || status
15240
15241 /* Did the vfork/compiler bug occur? */
15242 || parent != getpid()
15243
15244 /* Did the file descriptor bug occur? */
15245 || fstat(fileno(stdout), &st) != 0
15246 );
15247 }
f199cab1 15248}
5476a9a4
GM
15249_ACEOF
15250if ac_fn_c_try_run "$LINENO"; then :
15251 ac_cv_func_vfork_works=yes
15252else
15253 ac_cv_func_vfork_works=no
15254fi
15255rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15256 conftest.$ac_objext conftest.beam conftest.$ac_ext
15257fi
15258
15259fi
15260{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
15261$as_echo "$ac_cv_func_vfork_works" >&6; }
15262
15263fi;
15264if test "x$ac_cv_func_fork_works" = xcross; then
15265 ac_cv_func_vfork_works=$ac_cv_func_vfork
15266 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
15267$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
15268fi
15269
15270if test "x$ac_cv_func_vfork_works" = xyes; then
3e0be4ab 15271
5476a9a4 15272$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
3e0be4ab 15273
5476a9a4 15274else
3e0be4ab 15275
5476a9a4 15276$as_echo "#define vfork fork" >>confdefs.h
942f733f 15277
5476a9a4
GM
15278fi
15279if test "x$ac_cv_func_fork_works" = xyes; then
942f733f 15280
5476a9a4 15281$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
942f733f 15282
5476a9a4 15283fi
f199cab1 15284
f199cab1 15285
5476a9a4
GM
15286for ac_func in snprintf
15287do :
15288 ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
15289if test "x$ac_cv_func_snprintf" = x""yes; then :
15290 cat >>confdefs.h <<_ACEOF
15291#define HAVE_SNPRINTF 1
15292_ACEOF
15293
15294fi
15295done
15296
942f733f 15297
5476a9a4
GM
15298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
15299$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
15300if test "${emacs_cv_langinfo_codeset+set}" = set; then :
15301 $as_echo_n "(cached) " >&6
15302else
15303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15304/* end confdefs.h. */
15305#include <langinfo.h>
3e0be4ab
GM
15306int
15307main ()
15308{
5476a9a4
GM
15309char* cs = nl_langinfo(CODESET);
15310 ;
15311 return 0;
15312}
15313_ACEOF
15314if ac_fn_c_try_link "$LINENO"; then :
15315 emacs_cv_langinfo_codeset=yes
15316else
15317 emacs_cv_langinfo_codeset=no
15318fi
15319rm -f core conftest.err conftest.$ac_objext \
15320 conftest$ac_exeext conftest.$ac_ext
f199cab1 15321
5476a9a4
GM
15322fi
15323{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_langinfo_codeset" >&5
15324$as_echo "$emacs_cv_langinfo_codeset" >&6; }
15325if test $emacs_cv_langinfo_codeset = yes; then
f199cab1 15326
5476a9a4 15327$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
f199cab1 15328
5476a9a4 15329fi
f199cab1 15330
5476a9a4
GM
15331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
15332$as_echo_n "checking for mbstate_t... " >&6; }
15333if test "${ac_cv_type_mbstate_t+set}" = set; then :
15334 $as_echo_n "(cached) " >&6
15335else
15336 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15337/* end confdefs.h. */
15338$ac_includes_default
15339# include <wchar.h>
15340int
15341main ()
15342{
15343mbstate_t x; return sizeof x;
15344 ;
15345 return 0;
3e0be4ab 15346}
942f733f 15347_ACEOF
5476a9a4
GM
15348if ac_fn_c_try_compile "$LINENO"; then :
15349 ac_cv_type_mbstate_t=yes
3e0be4ab 15350else
5476a9a4 15351 ac_cv_type_mbstate_t=no
942f733f 15352fi
5476a9a4 15353rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3e0be4ab 15354fi
5476a9a4
GM
15355{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
15356$as_echo "$ac_cv_type_mbstate_t" >&6; }
15357 if test $ac_cv_type_mbstate_t = yes; then
f199cab1 15358
5476a9a4 15359$as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
f199cab1 15360
5476a9a4 15361 else
f199cab1 15362
5476a9a4 15363$as_echo "#define mbstate_t int" >>confdefs.h
f199cab1 15364
5476a9a4
GM
15365 fi
15366
15367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C restricted array declarations" >&5
15368$as_echo_n "checking for C restricted array declarations... " >&6; }
15369if test "${emacs_cv_c_restrict_arr+set}" = set; then :
15370 $as_echo_n "(cached) " >&6
15371else
15372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15373/* end confdefs.h. */
15374void fred (int x[__restrict]);
15375int
15376main ()
15377{
15378
15379 ;
15380 return 0;
15381}
15382_ACEOF
15383if ac_fn_c_try_compile "$LINENO"; then :
15384 emacs_cv_c_restrict_arr=yes
15385else
15386 emacs_cv_c_restrict_arr=no
15387fi
15388rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15389fi
15390{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_c_restrict_arr" >&5
15391$as_echo "$emacs_cv_c_restrict_arr" >&6; }
15392if test "$emacs_cv_c_restrict_arr" = yes; then
f199cab1 15393
5476a9a4 15394$as_echo "#define __restrict_arr __restrict" >>confdefs.h
f199cab1 15395
5476a9a4 15396fi
f199cab1
GM
15397
15398
15399
8ad96b1d
GM
15400$as_echo "#define AMPERSAND_FULL_NAME 1" >>confdefs.h
15401
15402
15403
5476a9a4 15404$as_echo "#define CLASH_DETECTION 1" >>confdefs.h
f199cab1
GM
15405
15406
5476a9a4 15407## Note: PTYs are broken on darwin <6. Use at your own risk.
f199cab1 15408
5476a9a4 15409$as_echo "#define HAVE_PTYS 1" >>confdefs.h
f199cab1
GM
15410
15411
15412
5476a9a4 15413$as_echo "#define HAVE_SOCKETS 1" >>confdefs.h
f199cab1 15414
942f733f 15415
942f733f 15416
6b10626d
GM
15417
15418
8ad96b1d
GM
15419$as_echo "#define NULL_DEVICE \"/dev/null\"" >>confdefs.h
15420
15421
15422
15423$as_echo "#define SEPCHAR ':'" >>confdefs.h
15424
15425
15426
15427$as_echo "#define subprocesses 1" >>confdefs.h
15428
15429
15430
15431$as_echo "#define USER_FULL_NAME pw->pw_gecos" >>confdefs.h
15432
15433
15434
942f733f 15435
9ff736dc
GM
15436$as_echo "#define DIRECTORY_SEP '/'" >>confdefs.h
15437
15438
15439
f199cab1 15440
6b10626d
GM
15441
15442$as_echo "#define IS_DEVICE_SEP(_c_) 0" >>confdefs.h
15443
15444
15445
15446$as_echo "#define IS_DIRECTORY_SEP(_c_) ((_c_) == DIRECTORY_SEP)" >>confdefs.h
15447
15448
15449
15450$as_echo "#define IS_ANY_SEP(_c_) (IS_DIRECTORY_SEP (_c_))" >>confdefs.h
15451
15452
15453
15454
15455
5476a9a4
GM
15456case $opsys in
15457 aix4-2)
15458 if test x$ac_cv_lib_Xmu_XmuConvertStandardSelection != xyes; then
15459 $as_echo "#define NO_EDITRES 1" >>confdefs.h
f199cab1 15460
5476a9a4
GM
15461 fi
15462 ;;
f199cab1 15463
5476a9a4
GM
15464 hpux*)
15465 $as_echo "#define NO_EDITRES 1" >>confdefs.h
f199cab1 15466
5476a9a4
GM
15467 ;;
15468esac
f199cab1
GM
15469
15470
5476a9a4 15471case $opsys in
5476a9a4 15472 irix6-5 | sol2* | unixware )
f199cab1 15473
5476a9a4 15474$as_echo "#define NSIG_MINIMUM 32" >>confdefs.h
f199cab1 15475
5476a9a4
GM
15476 ;;
15477esac
f199cab1 15478
4fa92495 15479emacs_broken_SIGIO=no
f199cab1 15480
5476a9a4
GM
15481case $opsys in
15482 hpux* | irix6-5 | openbsd | sol2* | unixware )
4fa92495 15483 emacs_broken_SIGIO=yes
5476a9a4 15484 ;;
f199cab1 15485
5476a9a4 15486 aix4-2)
f199cab1 15487
5476a9a4 15488$as_echo "#define BROKEN_GET_CURRENT_DIR_NAME 1" >>confdefs.h
067d23c9 15489
5476a9a4 15490 ;;
067d23c9 15491
5476a9a4 15492 freebsd)
f199cab1 15493
5476a9a4 15494$as_echo "#define BROKEN_PTY_READ_AFTER_EAGAIN 1" >>confdefs.h
f199cab1 15495
5476a9a4 15496 ;;
5476a9a4 15497esac
f199cab1 15498
5476a9a4
GM
15499case $opsys in
15500 gnu-* | sol2-10 )
f199cab1 15501
5476a9a4 15502$as_echo "#define HAVE_PROCFS 1" >>confdefs.h
f199cab1 15503
5476a9a4
GM
15504 ;;
15505esac
f199cab1 15506
5476a9a4
GM
15507case $opsys in
15508 darwin | freebsd | netbsd | openbsd )
f199cab1 15509
5476a9a4 15510$as_echo "#define DONT_REOPEN_PTY 1" >>confdefs.h
f199cab1 15511
5476a9a4
GM
15512 ;;
15513esac
f199cab1 15514
5476a9a4
GM
15515case $opsys in
15516 netbsd | openbsd) sound_device="/dev/audio" ;;
15517 *) sound_device="/dev/dsp" ;;
15518esac
f199cab1 15519
f199cab1 15520
5476a9a4
GM
15521cat >>confdefs.h <<_ACEOF
15522#define DEFAULT_SOUND_DEVICE "$sound_device"
15523_ACEOF
f199cab1
GM
15524
15525
15526
5476a9a4
GM
15527case $opsys in
15528 darwin | gnu-linux | gnu-kfreebsd )
f199cab1 15529
5476a9a4 15530$as_echo "#define INTERRUPT_INPUT 1" >>confdefs.h
f199cab1 15531
5476a9a4
GM
15532 ;;
15533esac
f199cab1 15534
f199cab1 15535
5476a9a4
GM
15536case $opsys in
15537 cygwin|gnu|gnu-linux|gnu-kfreebsd|irix6-5|freebsd|netbsd|openbsd)
f199cab1 15538
5476a9a4 15539$as_echo "#define NARROWPROTO 1" >>confdefs.h
067d23c9 15540
5476a9a4
GM
15541 ;;
15542esac
f199cab1
GM
15543
15544
067d23c9 15545
1f5d53eb
PE
15546
15547
f199cab1 15548
f199cab1 15549
7d2a1c5e 15550
5476a9a4
GM
15551case $opsys in
15552 aix4-2 )
a09508f2 15553 $as_echo "#define PTY_ITERATION int c; for (c = 0; !c ; c++)" >>confdefs.h
f199cab1 15554
a09508f2 15555 $as_echo "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptc\");" >>confdefs.h
f199cab1 15556
a09508f2 15557 $as_echo "#define PTY_TTY_NAME_SPRINTF strcpy (pty_name, ttyname (fd));" >>confdefs.h
7d2a1c5e 15558
5476a9a4 15559 ;;
7d2a1c5e 15560
5476a9a4 15561 cygwin )
a09508f2 15562 $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++)" >>confdefs.h
7d2a1c5e 15563
843f2634 15564 $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 15565
a09508f2 15566 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
7d2a1c5e 15567
a09508f2 15568 $as_echo "#define PTY_TTY_NAME_SPRINTF /**/" >>confdefs.h
f199cab1 15569
5476a9a4 15570 ;;
f199cab1 15571
1146da8d 15572 darwin )
a09508f2 15573 $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++)" >>confdefs.h
7d2a1c5e 15574
5476a9a4 15575 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
7d2a1c5e 15576
a09508f2 15577 $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 15578
a09508f2 15579 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
f199cab1 15580
a09508f2 15581 $as_echo "#define PTY_TTY_NAME_SPRINTF /**/" >>confdefs.h
f199cab1 15582
5476a9a4 15583 ;;
f199cab1 15584
1146da8d 15585 gnu | openbsd )
5476a9a4 15586 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
f199cab1 15587
5476a9a4 15588 ;;
f199cab1 15589
1146da8d 15590 gnu-linux | gnu-kfreebsd | freebsd | netbsd )
5476a9a4 15591 if test "x$ac_cv_func_grantpt" = xyes; then
f199cab1 15592
5476a9a4 15593$as_echo "#define UNIX98_PTYS 1" >>confdefs.h
f199cab1 15594
a09508f2 15595 $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++)" >>confdefs.h
f199cab1 15596
843f2634 15597 $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 15598
1146da8d
GM
15599 if test "x$ac_cv_func_posix_openpt" = xyes; then
15600 $as_echo "#define PTY_OPEN fd = posix_openpt (O_RDWR | O_NOCTTY)" >>confdefs.h
15601
15602 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
15603
15604 elif test "x$ac_cv_func_getpt" = xyes; then
5476a9a4 15605 $as_echo "#define PTY_OPEN fd = getpt ()" >>confdefs.h
f199cab1 15606
a09508f2 15607 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
f199cab1 15608
5476a9a4 15609 else
a09508f2 15610 $as_echo "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptmx\");" >>confdefs.h
f199cab1 15611
5476a9a4
GM
15612 fi
15613 else
15614 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
f199cab1 15615
5476a9a4
GM
15616 fi
15617 ;;
f199cab1 15618
5476a9a4
GM
15619 hpux*)
15620 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
f199cab1 15621
a09508f2 15622 $as_echo "#define PTY_NAME_SPRINTF sprintf (pty_name, \"/dev/ptym/pty%c%x\", c, i);" >>confdefs.h
f199cab1 15623
a09508f2 15624 $as_echo "#define PTY_TTY_NAME_SPRINTF sprintf (pty_name, \"/dev/pty/tty%c%x\", c, i);" >>confdefs.h
f199cab1 15625
5476a9a4 15626 ;;
f199cab1 15627
5476a9a4
GM
15628 irix6-5 )
15629 $as_echo "#define PTY_ITERATION /**/" >>confdefs.h
f199cab1 15630
5476a9a4 15631 $as_echo "#define FIRST_PTY_LETTER 'q'" >>confdefs.h
f199cab1 15632
e4184a20 15633 $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 15634
a09508f2 15635 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
f199cab1 15636
a09508f2 15637 $as_echo "#define PTY_TTY_NAME_SPRINTF /**/" >>confdefs.h
f199cab1 15638
5476a9a4 15639 ;;
f199cab1 15640
5476a9a4 15641 sol2* )
e4184a20 15642 $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 15643
5476a9a4 15644 ;;
f199cab1 15645
5476a9a4 15646 unixware )
e4184a20 15647 $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
15648
15649 ;;
15650esac
15651
15652
15653case $opsys in
15654 sol2* | unixware )
15655 $as_echo "#define FIRST_PTY_LETTER 'z'" >>confdefs.h
15656
a09508f2 15657 $as_echo "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptmx\");" >>confdefs.h
5476a9a4
GM
15658
15659
15660$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
15661
15662 ;;
15663esac
15664
15665
15666
15667
15668case $opsys in
c396a953 15669 aix4-2 | cygwin | gnu | irix6-5 | freebsd | netbsd | openbsd | darwin )
5476a9a4
GM
15670 $as_echo "#define SIGNALS_VIA_CHARACTERS 1" >>confdefs.h
15671
15672 ;;
15673
15674 gnu-linux | gnu-kfreebsd )
15675
15676 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signals via characters" >&5
15677$as_echo_n "checking for signals via characters... " >&6; }
15678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1f5d53eb 15679/* end confdefs.h. */
5476a9a4
GM
15680
15681#include <linux/version.h>
15682#if LINUX_VERSION_CODE < 0x20400
15683# error "Linux version too old"
15684#endif
15685
3e0be4ab
GM
15686int
15687main ()
15688{
f199cab1 15689
3e0be4ab
GM
15690 ;
15691 return 0;
15692}
067d23c9 15693_ACEOF
5476a9a4
GM
15694if ac_fn_c_try_cpp "$LINENO"; then :
15695 emacs_signals_via_chars=yes
1f5d53eb 15696else
5476a9a4 15697 emacs_signals_via_chars=no
067d23c9 15698fi
5476a9a4 15699rm -f conftest.err conftest.$ac_ext
067d23c9 15700
5476a9a4
GM
15701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_signals_via_chars" >&5
15702$as_echo "$emacs_signals_via_chars" >&6; }
15703 test $emacs_signals_via_chars = yes && $as_echo "#define SIGNALS_VIA_CHARACTERS 1" >>confdefs.h
15704
15705 ;;
15706esac
15707
15708
15709
15710
5476a9a4 15711case $opsys in
0f63df79 15712 aix*)
ce9ae7ca 15713 $as_echo "#define DATA_SEG_BITS 0x20000000" >>confdefs.h
0f63df79
GM
15714
15715 ;;
5476a9a4 15716 hpux*)
ce9ae7ca 15717 $as_echo "#define DATA_SEG_BITS 0x40000000" >>confdefs.h
067d23c9 15718
5476a9a4
GM
15719 ;;
15720 irix6-5)
5476a9a4 15721 $as_echo "#define DATA_SEG_BITS 0x10000000" >>confdefs.h
067d23c9 15722
5476a9a4
GM
15723 ;;
15724esac
067d23c9 15725
1f5d53eb 15726
1f5d53eb 15727
067d23c9 15728
5476a9a4
GM
15729case $opsys in
15730 darwin) $as_echo "#define TAB3 OXTABS" >>confdefs.h
15731 ;;
f199cab1 15732
5476a9a4 15733 gnu | freebsd | netbsd | openbsd )
f199cab1 15734
5476a9a4 15735$as_echo "#define TABDLY OXTABS" >>confdefs.h
f199cab1 15736
5476a9a4 15737 $as_echo "#define TAB3 OXTABS" >>confdefs.h
f199cab1 15738
5476a9a4 15739 ;;
f199cab1 15740
5476a9a4 15741 gnu-linux | gnu-kfreebsd )
5476a9a4
GM
15742 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15743/* end confdefs.h. */
3e0be4ab 15744
5476a9a4
GM
15745#ifndef __ia64__
15746# error "not ia64"
15747#endif
067d23c9 15748
5476a9a4
GM
15749int
15750main ()
15751{
3e0be4ab 15752
5476a9a4
GM
15753 ;
15754 return 0;
15755}
15756_ACEOF
15757if ac_fn_c_try_cpp "$LINENO"; then :
f199cab1 15758
5476a9a4 15759$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 15760
3e0be4ab 15761fi
5476a9a4
GM
15762rm -f conftest.err conftest.$ac_ext
15763 ;;
067d23c9 15764
5476a9a4 15765 hpux*)
3e0be4ab 15766
5476a9a4 15767$as_echo "#define RUN_TIME_REMAP 1" >>confdefs.h
3e0be4ab 15768
5476a9a4 15769 ;;
5476a9a4 15770esac
3e0be4ab
GM
15771
15772
f199cab1 15773
e700232f
GM
15774
15775
5476a9a4 15776case $opsys in
5476a9a4
GM
15777 gnu-linux | gnu-kfreebsd )
15778 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1fd182f0 15779/* end confdefs.h. */
f199cab1 15780
5476a9a4
GM
15781#if defined __i386__ || defined __sparc__ || defined __mc68000__ \
15782 || defined __alpha__ || defined __mips__ || defined __s390__ \
15783 || defined __arm__ || defined __powerpc__ || defined __amd64__ \
15784 || defined __ia64__ || defined __sh__
15785/* ok */
15786#else
15787# error "setjmp not known to work on this arch"
15788#endif
15789
f199cab1
GM
15790int
15791main ()
1fd182f0 15792{
5476a9a4 15793
f199cab1
GM
15794 ;
15795 return 0;
1fd182f0
PE
15796}
15797_ACEOF
5476a9a4
GM
15798if ac_fn_c_try_cpp "$LINENO"; then :
15799 $as_echo "#define GC_SETJMP_WORKS 1" >>confdefs.h
f199cab1 15800
1f5d53eb 15801fi
5476a9a4
GM
15802rm -f conftest.err conftest.$ac_ext
15803 ;;
15804esac
1fd182f0 15805
f199cab1 15806
5476a9a4
GM
15807if test x$GCC = xyes; then
15808 $as_echo "#define GC_SETJMP_WORKS 1" >>confdefs.h
15809
1fd182f0 15810else
5476a9a4
GM
15811 case $opsys in
15812 freebsd | netbsd | openbsd | irix6-5 | sol2* )
15813 $as_echo "#define GC_SETJMP_WORKS 1" >>confdefs.h
1fd182f0 15814
5476a9a4
GM
15815 ;;
15816 esac
15817fi
6ec9a5a7
GM
15818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _setjmp" >&5
15819$as_echo_n "checking for _setjmp... " >&6; }
15820if test "${emacs_cv_func__setjmp+set}" = set; then :
15821 $as_echo_n "(cached) " >&6
15822else
15823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15824/* end confdefs.h. */
15825#include <setjmp.h>
1fd182f0 15826
6ec9a5a7
GM
15827int
15828main ()
15829{
15830jmp_buf j;
15831 if (! _setjmp (j))
15832 _longjmp (j, 1);
15833 ;
15834 return 0;
15835}
15836_ACEOF
15837if ac_fn_c_try_link "$LINENO"; then :
15838 emacs_cv_func__setjmp=yes
15839else
15840 emacs_cv_func__setjmp=no
15841fi
15842rm -f core conftest.err conftest.$ac_objext \
15843 conftest$ac_exeext conftest.$ac_ext
15844fi
15845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_func__setjmp" >&5
15846$as_echo "$emacs_cv_func__setjmp" >&6; }
e2d8f316 15847if test $emacs_cv_func__setjmp = yes; then
906debc3 15848
e2d8f316 15849$as_echo "#define HAVE__SETJMP 1" >>confdefs.h
906debc3 15850
e2d8f316
GM
15851else
15852 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
15853$as_echo_n "checking for sigsetjmp... " >&6; }
15854if test "${emacs_cv_func_sigsetjmp+set}" = set; then :
15855 $as_echo_n "(cached) " >&6
15856else
15857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15858/* end confdefs.h. */
15859#include <setjmp.h>
15860
15861int
15862main ()
15863{
15864sigjmp_buf j;
15865 if (! sigsetjmp (j, 1))
15866 siglongjmp (j, 1);
15867 ;
15868 return 0;
15869}
15870_ACEOF
15871if ac_fn_c_try_link "$LINENO"; then :
15872 emacs_cv_func_sigsetjmp=yes
15873else
15874 emacs_cv_func_sigsetjmp=no
15875fi
15876rm -f core conftest.err conftest.$ac_objext \
15877 conftest$ac_exeext conftest.$ac_ext
15878fi
15879{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_func_sigsetjmp" >&5
15880$as_echo "$emacs_cv_func_sigsetjmp" >&6; }
15881 if test $emacs_cv_func_sigsetjmp = yes; then
906debc3 15882
e2d8f316 15883$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
906debc3 15884
e2d8f316 15885 fi
6ec9a5a7
GM
15886fi
15887
15888case $opsys in
15889 sol2* | unixware )
906debc3
GM
15890
15891$as_echo "#define TIOCSIGSEND TIOCSIGNAL" >>confdefs.h
15892
15893 ;;
15894esac
15895
906debc3 15896
5476a9a4
GM
15897case $opsys in
15898 hpux* | sol2* )
1f5d53eb 15899
5476a9a4 15900$as_echo "#define XOS_NEEDS_TIME_H 1" >>confdefs.h
1f5d53eb 15901
5476a9a4
GM
15902 ;;
15903esac
1f5d53eb 15904
1f5d53eb 15905
4fda9c95 15906
3e0be4ab 15907
4fda9c95 15908
4fda9c95 15909
f199cab1 15910
906debc3 15911
5476a9a4
GM
15912case $opsys in
15913 aix4-2)
15914 $as_echo "#define USG /**/" >>confdefs.h
15915
15916 $as_echo "#define USG5 /**/" >>confdefs.h
15917
15918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15919/* end confdefs.h. */
15920
15921#ifndef _AIX
15922# error "_AIX not defined"
15923#endif
f199cab1 15924
4fda9c95
GM
15925int
15926main ()
15927{
3e0be4ab 15928
4fda9c95
GM
15929 ;
15930 return 0;
15931}
15932_ACEOF
5476a9a4 15933if ac_fn_c_try_cpp "$LINENO"; then :
4fda9c95 15934
3e0be4ab 15935else
4fda9c95 15936
5476a9a4 15937$as_echo "#define _AIX /**/" >>confdefs.h
3e0be4ab 15938
5476a9a4
GM
15939fi
15940rm -f conftest.err conftest.$ac_ext
15941 ;;
4fda9c95 15942
5476a9a4 15943 cygwin)
3e0be4ab 15944
5476a9a4 15945$as_echo "#define CYGWIN 1" >>confdefs.h
f199cab1 15946
5476a9a4 15947 ;;
f199cab1 15948
5476a9a4 15949 darwin)
f199cab1 15950
5476a9a4 15951$as_echo "#define DARWIN_OS /**/" >>confdefs.h
f199cab1 15952
5476a9a4 15953 ;;
4fda9c95 15954
5476a9a4
GM
15955 gnu-linux | gnu-kfreebsd )
15956 $as_echo "#define USG /**/" >>confdefs.h
4fda9c95 15957
f199cab1 15958
5476a9a4 15959$as_echo "#define GNU_LINUX /**/" >>confdefs.h
4fda9c95 15960
5476a9a4 15961 ;;
4fda9c95 15962
5476a9a4
GM
15963 hpux*)
15964 $as_echo "#define USG /**/" >>confdefs.h
4fda9c95 15965
5476a9a4 15966 $as_echo "#define USG5 /**/" >>confdefs.h
697210c4 15967
4717915f 15968
5476a9a4 15969$as_echo "#define HPUX /**/" >>confdefs.h
697210c4 15970
5476a9a4 15971 ;;
697210c4 15972
5476a9a4
GM
15973 irix6-5)
15974 $as_echo "#define USG /**/" >>confdefs.h
f199cab1 15975
5476a9a4 15976 $as_echo "#define USG5 /**/" >>confdefs.h
f199cab1 15977
906debc3
GM
15978 $as_echo "#define USG5_4 /**/" >>confdefs.h
15979
f199cab1 15980
5476a9a4 15981$as_echo "#define IRIX6_5 /**/" >>confdefs.h
f199cab1 15982
5476a9a4 15983 ;;
f199cab1 15984
5476a9a4
GM
15985 sol2*)
15986 $as_echo "#define USG /**/" >>confdefs.h
4fda9c95 15987
5476a9a4 15988 $as_echo "#define USG5 /**/" >>confdefs.h
4fda9c95 15989
906debc3
GM
15990 $as_echo "#define USG5_4 /**/" >>confdefs.h
15991
4fda9c95 15992
5476a9a4 15993$as_echo "#define SOLARIS2 /**/" >>confdefs.h
f199cab1 15994
5476a9a4 15995 ;;
f199cab1 15996
5476a9a4
GM
15997 unixware)
15998 $as_echo "#define USG /**/" >>confdefs.h
f199cab1 15999
5476a9a4 16000 $as_echo "#define USG5 /**/" >>confdefs.h
f199cab1 16001
906debc3
GM
16002 $as_echo "#define USG5_4 /**/" >>confdefs.h
16003
5476a9a4
GM
16004 ;;
16005esac
f199cab1 16006
4fa92495
GM
16007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable FIONREAD" >&5
16008$as_echo_n "checking for usable FIONREAD... " >&6; }
16009if test "${emacs_cv_usable_FIONREAD+set}" = set; then :
16010 $as_echo_n "(cached) " >&6
16011else
16012 case $opsys in
16013 aix4-2)
16014 emacs_cv_usable_FIONREAD=no
16015 ;;
16016
16017 *)
16018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16019/* end confdefs.h. */
16020#include <sys/types.h>
16021 #include <sys/ioctl.h>
16022 #ifdef USG5_4
16023 # include <sys/filio.h>
16024 #endif
16025
16026int
16027main ()
16028{
16029int foo = ioctl (0, FIONREAD, &foo);
16030 ;
16031 return 0;
16032}
16033_ACEOF
16034if ac_fn_c_try_compile "$LINENO"; then :
16035 emacs_cv_usable_FIONREAD=yes
16036else
16037 emacs_cv_usable_FIONREAD=no
16038fi
16039rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16040 ;;
16041 esac
16042fi
16043{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_usable_FIONREAD" >&5
16044$as_echo "$emacs_cv_usable_FIONREAD" >&6; }
16045if test $emacs_cv_usable_FIONREAD = yes; then
16046
16047$as_echo "#define USABLE_FIONREAD 1" >>confdefs.h
16048
16049
16050 if test $emacs_broken_SIGIO = no; then
16051 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable SIGIO" >&5
16052$as_echo_n "checking for usable SIGIO... " >&6; }
16053if test "${emacs_cv_usable_SIGIO+set}" = set; then :
16054 $as_echo_n "(cached) " >&6
16055else
16056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16057/* end confdefs.h. */
16058#include <fcntl.h>
16059 #include <signal.h>
16060
16061int
16062main ()
16063{
16064int foo = SIGIO | F_SETFL | FASYNC;
16065 ;
16066 return 0;
16067}
16068_ACEOF
16069if ac_fn_c_try_compile "$LINENO"; then :
16070 emacs_cv_usable_SIGIO=yes
16071else
16072 emacs_cv_usable_SIGIO=no
16073fi
16074rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16075fi
16076{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_usable_SIGIO" >&5
16077$as_echo "$emacs_cv_usable_SIGIO" >&6; }
16078 if test $emacs_cv_usable_SIGIO = yes; then
16079
16080$as_echo "#define USABLE_SIGIO 1" >>confdefs.h
16081
16082 fi
16083 fi
16084fi
16085
4fda9c95 16086
5476a9a4
GM
16087case $opsys in
16088 cygwin)
4fda9c95 16089
5476a9a4 16090$as_echo "#define G_SLICE_ALWAYS_MALLOC 1" >>confdefs.h
4fda9c95 16091
5476a9a4 16092 ;;
4fda9c95 16093
5476a9a4 16094 hpux11)
f199cab1 16095
5476a9a4 16096$as_echo "#define USG_SUBTTY_WORKS 1" >>confdefs.h
f199cab1 16097
5476a9a4 16098 ;;
f199cab1 16099
5476a9a4 16100 irix6-5)
f199cab1 16101
5476a9a4 16102$as_echo "#define PREFER_VSUSP 1" >>confdefs.h
f199cab1 16103
5476a9a4 16104 ;;
f199cab1 16105
5476a9a4 16106 sol2-10)
f199cab1 16107
5476a9a4 16108$as_echo "#define _STRUCTURED_PROC 1" >>confdefs.h
f199cab1 16109
5476a9a4
GM
16110 ;;
16111esac
f199cab1 16112
5476a9a4
GM
16113# Set up the CFLAGS for real compilation, so we can substitute it.
16114CFLAGS="$REAL_CFLAGS"
16115CPPFLAGS="$REAL_CPPFLAGS"
f199cab1 16116
5476a9a4
GM
16117## Hack to detect a buggy GCC version.
16118if test "x$GCC" = xyes \
16119 && test x"`$CC --version 2> /dev/null | grep 'gcc.* 4.5.0'`" != x \
16120 && test x"`echo $CFLAGS | grep '\-O[23]'`" != x \
16121 && test x"`echo $CFLAGS | grep '\-fno-optimize-sibling-calls'`" = x; then
16122 as_fn_error "GCC 4.5.0 has problems compiling Emacs; see etc/PROBLEMS'." "$LINENO" 5
16123fi
f199cab1 16124
5476a9a4 16125version=$PACKAGE_VERSION
f199cab1 16126
0778f6f0 16127copyright="Copyright (C) 2013 Free Software Foundation, Inc."
bb7dce39
GM
16128
16129cat >>confdefs.h <<_ACEOF
16130#define COPYRIGHT "$copyright"
16131_ACEOF
16132
16133
16134
5476a9a4
GM
16135### Specify what sort of things we'll be editing into Makefile and config.h.
16136### Use configuration here uncanonicalized to avoid exceeding size limits.
4fda9c95 16137
f199cab1 16138
5476a9a4 16139## Unused?
4fda9c95
GM
16140
16141
16142
16143
4717915f 16144
4717915f 16145
4717915f 16146
4717915f 16147
4717915f 16148
4717915f 16149
4717915f 16150
4717915f 16151
4717915f 16152
4717915f 16153
4717915f 16154
4717915f
GM
16155
16156
4717915f
GM
16157
16158
4717915f 16159
4717915f 16160
4717915f 16161
5476a9a4
GM
16162## FIXME? Nothing uses @LD_SWITCH_X_SITE@.
16163## src/Makefile.in did add LD_SWITCH_X_SITE (as a cpp define) to the
16164## end of LIBX_BASE, but nothing ever set it.
4717915f 16165
4717915f 16166
4fda9c95 16167
4fda9c95 16168
5476a9a4
GM
16169## Used in lwlib/Makefile.in.
16170
4fda9c95 16171
4fda9c95 16172
4fda9c95
GM
16173
16174
16175
16176
4fda9c95 16177
42dcba54
GM
16178if test -n "${term_header}"; then
16179
16180cat >>confdefs.h <<_ACEOF
16181#define TERM_HEADER "${term_header}"
16182_ACEOF
16183
16184fi
16185
4fda9c95 16186
5476a9a4
GM
16187cat >>confdefs.h <<_ACEOF
16188#define EMACS_CONFIGURATION "${canonical}"
16189_ACEOF
4fda9c95 16190
1e8a045a 16191emacs_config_options=`echo "$emacs_config_options " | sed -e 's/--no-create //' -e 's/--no-recursion //' -e 's/ *$//' -e "s/\"/'/g"`
4fda9c95 16192
5476a9a4 16193cat >>confdefs.h <<_ACEOF
e25a10b7 16194#define EMACS_CONFIG_OPTIONS "${emacs_config_options}"
5476a9a4
GM
16195_ACEOF
16196
5476a9a4 16197
4fda9c95 16198
5476a9a4
GM
16199XMENU_OBJ=
16200XOBJ=
16201FONT_OBJ=
16202if test "${HAVE_X_WINDOWS}" = "yes" ; then
16203
16204$as_echo "#define HAVE_X_WINDOWS 1" >>confdefs.h
4fda9c95 16205
5476a9a4 16206 XMENU_OBJ=xmenu.o
42dcba54 16207 XOBJ="xterm.o xfns.o xselect.o xrdb.o xsmfns.o xsettings.o xgselect.o"
5476a9a4
GM
16208 FONT_OBJ=xfont.o
16209 if test "$HAVE_XFT" = "yes"; then
16210 FONT_OBJ="$FONT_OBJ ftfont.o xftfont.o ftxfont.o"
16211 elif test "$HAVE_FREETYPE" = "yes"; then
16212 FONT_OBJ="$FONT_OBJ ftfont.o ftxfont.o"
16213 fi
4fda9c95 16214
f199cab1 16215fi
4fda9c95 16216
4fda9c95 16217
4fda9c95 16218
4fda9c95 16219
5476a9a4
GM
16220WIDGET_OBJ=
16221MOTIF_LIBW=
16222if test "${USE_X_TOOLKIT}" != "none" ; then
16223 WIDGET_OBJ=widget.o
16224
16225$as_echo "#define USE_X_TOOLKIT 1" >>confdefs.h
16226
16227 if test "${USE_X_TOOLKIT}" = "LUCID"; then
16228
16229$as_echo "#define USE_LUCID 1" >>confdefs.h
e1939eb1 16230
5476a9a4 16231 elif test "${USE_X_TOOLKIT}" = "MOTIF"; then
4fda9c95 16232
5476a9a4 16233$as_echo "#define USE_MOTIF 1" >>confdefs.h
3e0be4ab 16234
5476a9a4
GM
16235 MOTIF_LIBW=-lXm
16236 case "$opsys" in
16237 gnu-linux)
16238 ## Paul Abrahams <abrahams at equinox.shaysnet.com> says this is needed.
16239 MOTIF_LIBW="$MOTIF_LIBW -lXpm"
16240 ;;
3e0be4ab 16241
5476a9a4
GM
16242 unixware)
16243 ## Richard Anthony Ryan <ryanr at ellingtn.ftc.nrcs.usda.gov>
16244 ## says -lXimp is needed in UNIX_SV ... 4.2 1.1.2.
16245 MOTIF_LIBW="MOTIF_LIBW -lXimp"
16246 ;;
3e0be4ab 16247
5476a9a4
GM
16248 aix4-2)
16249 ## olson@mcs.anl.gov says -li18n is needed by -lXm.
16250 MOTIF_LIBW="$MOTIF_LIBW -li18n"
16251 ;;
16252 esac
16253 MOTIF_LIBW="$MOTIF_LIBW $LIBXP"
16254 fi
16255fi
4fda9c95 16256
3e0be4ab 16257
5476a9a4
GM
16258TOOLKIT_LIBW=
16259case "$USE_X_TOOLKIT" in
16260 MOTIF) TOOLKIT_LIBW="$MOTIF_LIBW" ;;
16261 LUCID) TOOLKIT_LIBW="$LUCID_LIBW" ;;
16262 none) test "x$HAVE_GTK" = "xyes" && TOOLKIT_LIBW="$GTK_LIBS" ;;
16263esac
4fda9c95
GM
16264
16265
5476a9a4
GM
16266if test "$USE_X_TOOLKIT" = "none"; then
16267 LIBXT_OTHER="\$(LIBXSM)"
16268 OLDXMENU_TARGET="really-oldXMenu"
16269else
16270 LIBXT_OTHER="\$(LIBXMU) -lXt \$(LIBXTR6) -lXext"
16271 OLDXMENU_TARGET="really-lwlib"
16272fi
4fda9c95
GM
16273
16274
5476a9a4
GM
16275## The X Menu stuff is present in the X10 distribution, but missing
16276## from X11. If we have X10, just use the installed library;
16277## otherwise, use our own copy.
16278if test "${HAVE_X11}" = "yes" ; then
4fda9c95 16279
5476a9a4 16280$as_echo "#define HAVE_X11 1" >>confdefs.h
4fda9c95 16281
4fda9c95 16282
5476a9a4
GM
16283 if test "$USE_X_TOOLKIT" = "none"; then
16284 OLDXMENU="\${oldXMenudir}/libXMenu11.a"
16285 else
16286 OLDXMENU="\${lwlibdir}/liblw.a"
16287 fi
16288 LIBXMENU="\$(OLDXMENU)"
16289 LIBX_OTHER="\$(LIBXT) \$(LIBX_EXTRA)"
16290 OLDXMENU_DEPS="\${OLDXMENU} ../src/\${OLDXMENU}"
f199cab1 16291else
5476a9a4
GM
16292 ## For a syntactically valid Makefile; not actually used for anything.
16293 ## See comments in src/Makefile.in.
16294 OLDXMENU=nothing
16295 ## FIXME This case (!HAVE_X11 && HAVE_X_WINDOWS) is no longer possible(?).
16296 if test "${HAVE_X_WINDOWS}" = "yes"; then
16297 LIBXMENU="-lXMenu"
16298 else
16299 LIBXMENU=
16300 fi
16301 LIBX_OTHER=
16302 OLDXMENU_DEPS=
16303fi
4fda9c95 16304
5476a9a4
GM
16305if test "$HAVE_GTK" = "yes" || test "$HAVE_MENUS" != "yes"; then
16306 OLDXMENU_TARGET=
16307 OLDXMENU=nothing
16308 LIBXMENU=
16309 OLDXMENU_DEPS=
16310fi
4fda9c95 16311
4fda9c95
GM
16312
16313
3e0be4ab 16314
4fda9c95 16315
3e0be4ab 16316
3e0be4ab 16317
5476a9a4 16318if test "${HAVE_MENUS}" = "yes" ; then
3e0be4ab 16319
5476a9a4 16320$as_echo "#define HAVE_MENUS 1" >>confdefs.h
4fda9c95 16321
5476a9a4 16322fi
4fda9c95 16323
5476a9a4 16324if test "${GNU_MALLOC}" = "yes" ; then
4fda9c95 16325
5476a9a4 16326$as_echo "#define GNU_MALLOC 1" >>confdefs.h
4fda9c95 16327
5476a9a4 16328fi
3e0be4ab 16329
5476a9a4
GM
16330RALLOC_OBJ=
16331if test "${REL_ALLOC}" = "yes" ; then
16332
16333$as_echo "#define REL_ALLOC 1" >>confdefs.h
4fda9c95
GM
16334
16335
5476a9a4
GM
16336 test "$system_malloc" != "yes" && RALLOC_OBJ=ralloc.o
16337fi
4fda9c95 16338
4fda9c95 16339
5476a9a4 16340if test "$opsys" = "cygwin"; then
5c0255d9 16341 CYGWIN_OBJ="sheap.o cygw32.o"
5476a9a4
GM
16342 ## Cygwin differs because of its unexec().
16343 PRE_ALLOC_OBJ=
16344 POST_ALLOC_OBJ=lastfile.o
16345else
16346 CYGWIN_OBJ=
16347 PRE_ALLOC_OBJ=lastfile.o
16348 POST_ALLOC_OBJ=
16349fi
4fda9c95 16350
3e0be4ab 16351
3e0be4ab 16352
3e0be4ab 16353
5476a9a4
GM
16354# Configure gnulib. Although this does not affect CFLAGS or LIBS permanently.
16355# it temporarily reverts them to their pre-pkg-config values,
16356# because gnulib needs to work with both src (which uses the
16357# pkg-config stuff) and lib-src (which does not). For example, gnulib
16358# may need to determine whether LIB_CLOCK_GETTIME should contain -lrt,
16359# and it therefore needs to run in an environment where LIBS does not
16360# already contain -lrt merely because 'pkg-config --libs' printed '-lrt'
16361# for some package unrelated to lib-src.
16362SAVE_CFLAGS=$CFLAGS
16363SAVE_LIBS=$LIBS
16364CFLAGS=$pre_PKG_CONFIG_CFLAGS
16365LIBS="$LIB_PTHREAD $pre_PKG_CONFIG_LIBS"
3e0be4ab 16366
3e0be4ab
GM
16367
16368
4fda9c95 16369
4fda9c95 16370
3e0be4ab 16371
3e0be4ab
GM
16372
16373
4fda9c95 16374
3e0be4ab
GM
16375
16376
5476a9a4
GM
16377 LIBC_FATAL_STDERR_=1
16378 export LIBC_FATAL_STDERR_
3e0be4ab 16379
5476a9a4
GM
16380# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
16381# for constant arguments. Useless!
16382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
16383$as_echo_n "checking for working alloca.h... " >&6; }
16384if test "${ac_cv_working_alloca_h+set}" = set; then :
16385 $as_echo_n "(cached) " >&6
16386else
16387 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16388/* end confdefs.h. */
16389#include <alloca.h>
16390int
16391main ()
16392{
16393char *p = (char *) alloca (2 * sizeof (int));
16394 if (p) return 0;
16395 ;
16396 return 0;
16397}
16398_ACEOF
16399if ac_fn_c_try_link "$LINENO"; then :
16400 ac_cv_working_alloca_h=yes
16401else
16402 ac_cv_working_alloca_h=no
16403fi
16404rm -f core conftest.err conftest.$ac_objext \
16405 conftest$ac_exeext conftest.$ac_ext
16406fi
16407{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
16408$as_echo "$ac_cv_working_alloca_h" >&6; }
16409if test $ac_cv_working_alloca_h = yes; then
3e0be4ab 16410
5476a9a4 16411$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
3e0be4ab 16412
5476a9a4 16413fi
3e0be4ab 16414
5476a9a4
GM
16415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
16416$as_echo_n "checking for alloca... " >&6; }
16417if test "${ac_cv_func_alloca_works+set}" = set; then :
f199cab1
GM
16418 $as_echo_n "(cached) " >&6
16419else
5476a9a4 16420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 16421/* end confdefs.h. */
5476a9a4
GM
16422#ifdef __GNUC__
16423# define alloca __builtin_alloca
16424#else
16425# ifdef _MSC_VER
16426# include <malloc.h>
16427# define alloca _alloca
16428# else
16429# ifdef HAVE_ALLOCA_H
16430# include <alloca.h>
16431# else
16432# ifdef _AIX
16433 #pragma alloca
16434# else
16435# ifndef alloca /* predefined by HP cc +Olibcalls */
16436char *alloca ();
16437# endif
16438# endif
16439# endif
16440# endif
16441#endif
16442
16443int
16444main ()
16445{
16446char *p = (char *) alloca (1);
16447 if (p) return 0;
16448 ;
16449 return 0;
16450}
16451_ACEOF
16452if ac_fn_c_try_link "$LINENO"; then :
16453 ac_cv_func_alloca_works=yes
16454else
16455 ac_cv_func_alloca_works=no
16456fi
16457rm -f core conftest.err conftest.$ac_objext \
16458 conftest$ac_exeext conftest.$ac_ext
16459fi
16460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
16461$as_echo "$ac_cv_func_alloca_works" >&6; }
16462
16463if test $ac_cv_func_alloca_works = yes; then
16464
16465$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
16466
16467else
16468 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
16469# that cause trouble. Some versions do not even contain alloca or
16470# contain a buggy version. If you still want to use their alloca,
16471# use ar to extract alloca.o from them instead of compiling alloca.c.
3e0be4ab 16472
4fda9c95 16473
4fda9c95 16474
4fda9c95
GM
16475
16476
5476a9a4 16477ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
4fda9c95 16478
5476a9a4 16479$as_echo "#define C_ALLOCA 1" >>confdefs.h
4fda9c95 16480
4fda9c95 16481
5476a9a4
GM
16482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether 'alloca.c' needs Cray hooks" >&5
16483$as_echo_n "checking whether 'alloca.c' needs Cray hooks... " >&6; }
16484if test "${ac_cv_os_cray+set}" = set; then :
16485 $as_echo_n "(cached) " >&6
16486else
16487 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16488/* end confdefs.h. */
16489#if defined CRAY && ! defined CRAY2
16490webecray
16491#else
16492wenotbecray
16493#endif
4fda9c95 16494
5476a9a4
GM
16495_ACEOF
16496if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16497 $EGREP "webecray" >/dev/null 2>&1; then :
16498 ac_cv_os_cray=yes
16499else
16500 ac_cv_os_cray=no
16501fi
16502rm -f conftest*
4fda9c95 16503
5476a9a4
GM
16504fi
16505{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
16506$as_echo "$ac_cv_os_cray" >&6; }
16507if test $ac_cv_os_cray = yes; then
16508 for ac_func in _getb67 GETB67 getb67; do
16509 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16510ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16511eval as_val=\$$as_ac_var
16512 if test "x$as_val" = x""yes; then :
4fda9c95 16513
5476a9a4
GM
16514cat >>confdefs.h <<_ACEOF
16515#define CRAY_STACKSEG_END $ac_func
16516_ACEOF
4fda9c95 16517
5476a9a4
GM
16518 break
16519fi
4fda9c95 16520
5476a9a4
GM
16521 done
16522fi
4fda9c95 16523
5476a9a4
GM
16524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
16525$as_echo_n "checking stack direction for C alloca... " >&6; }
16526if test "${ac_cv_c_stack_direction+set}" = set; then :
16527 $as_echo_n "(cached) " >&6
16528else
16529 if test "$cross_compiling" = yes; then :
16530 ac_cv_c_stack_direction=0
16531else
16532 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16533/* end confdefs.h. */
16534$ac_includes_default
16535int
16536find_stack_direction (int *addr, int depth)
16537{
16538 int dir, dummy = 0;
16539 if (! addr)
16540 addr = &dummy;
16541 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
16542 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
16543 return dir + dummy;
16544}
4fda9c95 16545
5476a9a4
GM
16546int
16547main (int argc, char **argv)
16548{
16549 return find_stack_direction (0, argc + !argv + 20) < 0;
16550}
16551_ACEOF
16552if ac_fn_c_try_run "$LINENO"; then :
16553 ac_cv_c_stack_direction=1
16554else
16555 ac_cv_c_stack_direction=-1
16556fi
16557rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16558 conftest.$ac_objext conftest.beam conftest.$ac_ext
16559fi
4fda9c95 16560
5476a9a4
GM
16561fi
16562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
16563$as_echo "$ac_cv_c_stack_direction" >&6; }
16564cat >>confdefs.h <<_ACEOF
16565#define STACK_DIRECTION $ac_cv_c_stack_direction
16566_ACEOF
3e0be4ab
GM
16567
16568
5476a9a4 16569fi
3e0be4ab
GM
16570
16571
16572
16573
5476a9a4
GM
16574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
16575$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
16576if test "${ac_cv_c_bigendian+set}" = set; then :
16577 $as_echo_n "(cached) " >&6
16578else
16579 ac_cv_c_bigendian=unknown
16580 # See if we're dealing with a universal compiler.
16581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16582/* end confdefs.h. */
16583#ifndef __APPLE_CC__
16584 not a universal capable compiler
16585 #endif
16586 typedef int dummy;
16587
16588_ACEOF
16589if ac_fn_c_try_compile "$LINENO"; then :
3e0be4ab 16590
5476a9a4
GM
16591 # Check for potential -arch flags. It is not universal unless
16592 # there are at least two -arch flags with different values.
16593 ac_arch=
16594 ac_prev=
16595 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
16596 if test -n "$ac_prev"; then
16597 case $ac_word in
16598 i?86 | x86_64 | ppc | ppc64)
16599 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
16600 ac_arch=$ac_word
16601 else
16602 ac_cv_c_bigendian=universal
16603 break
16604 fi
16605 ;;
16606 esac
16607 ac_prev=
16608 elif test "x$ac_word" = "x-arch"; then
16609 ac_prev=arch
16610 fi
16611 done
16612fi
16613rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16614 if test $ac_cv_c_bigendian = unknown; then
16615 # See if sys/param.h defines the BYTE_ORDER macro.
16616 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16617/* end confdefs.h. */
16618#include <sys/types.h>
16619 #include <sys/param.h>
3e0be4ab 16620
5476a9a4
GM
16621int
16622main ()
16623{
16624#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
16625 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
16626 && LITTLE_ENDIAN)
16627 bogus endian macros
16628 #endif
3e0be4ab 16629
5476a9a4
GM
16630 ;
16631 return 0;
16632}
16633_ACEOF
16634if ac_fn_c_try_compile "$LINENO"; then :
16635 # It does; now see whether it defined to BIG_ENDIAN or not.
16636 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16637/* end confdefs.h. */
16638#include <sys/types.h>
16639 #include <sys/param.h>
369e19fc 16640
5476a9a4
GM
16641int
16642main ()
16643{
16644#if BYTE_ORDER != BIG_ENDIAN
16645 not big endian
16646 #endif
3e0be4ab 16647
5476a9a4
GM
16648 ;
16649 return 0;
16650}
16651_ACEOF
16652if ac_fn_c_try_compile "$LINENO"; then :
16653 ac_cv_c_bigendian=yes
16654else
16655 ac_cv_c_bigendian=no
16656fi
16657rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16658fi
16659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16660 fi
16661 if test $ac_cv_c_bigendian = unknown; then
16662 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
16663 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16664/* end confdefs.h. */
16665#include <limits.h>
4fda9c95 16666
5476a9a4
GM
16667int
16668main ()
16669{
16670#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
16671 bogus endian macros
16672 #endif
4fda9c95 16673
5476a9a4
GM
16674 ;
16675 return 0;
16676}
16677_ACEOF
16678if ac_fn_c_try_compile "$LINENO"; then :
16679 # It does; now see whether it defined to _BIG_ENDIAN or not.
16680 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16681/* end confdefs.h. */
16682#include <limits.h>
4fda9c95 16683
5476a9a4
GM
16684int
16685main ()
16686{
16687#ifndef _BIG_ENDIAN
16688 not big endian
16689 #endif
f199cab1 16690
5476a9a4
GM
16691 ;
16692 return 0;
16693}
16694_ACEOF
16695if ac_fn_c_try_compile "$LINENO"; then :
16696 ac_cv_c_bigendian=yes
f199cab1 16697else
5476a9a4
GM
16698 ac_cv_c_bigendian=no
16699fi
16700rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16701fi
16702rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16703 fi
16704 if test $ac_cv_c_bigendian = unknown; then
16705 # Compile a test program.
16706 if test "$cross_compiling" = yes; then :
16707 # Try to guess by grepping values from an object file.
16708 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16709/* end confdefs.h. */
16710short int ascii_mm[] =
16711 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
16712 short int ascii_ii[] =
16713 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
16714 int use_ascii (int i) {
16715 return ascii_mm[i] + ascii_ii[i];
16716 }
16717 short int ebcdic_ii[] =
16718 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
16719 short int ebcdic_mm[] =
16720 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
16721 int use_ebcdic (int i) {
16722 return ebcdic_mm[i] + ebcdic_ii[i];
16723 }
16724 extern int foo;
f199cab1 16725
5476a9a4
GM
16726int
16727main ()
16728{
16729return use_ascii (foo) == use_ebcdic (foo);
16730 ;
16731 return 0;
16732}
16733_ACEOF
16734if ac_fn_c_try_compile "$LINENO"; then :
16735 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
16736 ac_cv_c_bigendian=yes
16737 fi
16738 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
16739 if test "$ac_cv_c_bigendian" = unknown; then
16740 ac_cv_c_bigendian=no
16741 else
16742 # finding both strings is unlikely to happen, but who knows?
16743 ac_cv_c_bigendian=unknown
16744 fi
16745 fi
16746fi
16747rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4fda9c95 16748else
3e0be4ab 16749 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4fda9c95 16750/* end confdefs.h. */
5476a9a4
GM
16751$ac_includes_default
16752int
16753main ()
4fda9c95 16754{
5476a9a4
GM
16755
16756 /* Are we little or big endian? From Harbison&Steele. */
16757 union
16758 {
16759 long int l;
16760 char c[sizeof (long int)];
16761 } u;
16762 u.l = 1;
16763 return u.c[sizeof (long int) - 1] == 1;
16764
16765 ;
4fda9c95
GM
16766 return 0;
16767}
16768_ACEOF
f199cab1 16769if ac_fn_c_try_run "$LINENO"; then :
5476a9a4 16770 ac_cv_c_bigendian=no
3e0be4ab 16771else
5476a9a4 16772 ac_cv_c_bigendian=yes
4fda9c95 16773fi
f199cab1
GM
16774rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16775 conftest.$ac_objext conftest.beam conftest.$ac_ext
4fda9c95 16776fi
4fda9c95 16777
5476a9a4 16778 fi
f199cab1 16779fi
5476a9a4
GM
16780{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
16781$as_echo "$ac_cv_c_bigendian" >&6; }
16782 case $ac_cv_c_bigendian in #(
16783 yes)
16784 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
16785;; #(
16786 no)
16787 ;; #(
16788 universal)
3e0be4ab 16789
5476a9a4 16790$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
3e0be4ab 16791
5476a9a4
GM
16792 ;; #(
16793 *)
16794 as_fn_error "unknown endianness
16795 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
16796 esac
4fda9c95 16797
4fda9c95 16798
da6c8463 16799
5476a9a4
GM
16800 GNULIB_CHDIR=0;
16801 GNULIB_CHOWN=0;
16802 GNULIB_CLOSE=0;
16803 GNULIB_DUP=0;
16804 GNULIB_DUP2=0;
16805 GNULIB_DUP3=0;
16806 GNULIB_ENVIRON=0;
16807 GNULIB_EUIDACCESS=0;
16808 GNULIB_FACCESSAT=0;
16809 GNULIB_FCHDIR=0;
16810 GNULIB_FCHOWNAT=0;
16811 GNULIB_FDATASYNC=0;
16812 GNULIB_FSYNC=0;
16813 GNULIB_FTRUNCATE=0;
16814 GNULIB_GETCWD=0;
16815 GNULIB_GETDOMAINNAME=0;
16816 GNULIB_GETDTABLESIZE=0;
16817 GNULIB_GETGROUPS=0;
16818 GNULIB_GETHOSTNAME=0;
16819 GNULIB_GETLOGIN=0;
16820 GNULIB_GETLOGIN_R=0;
16821 GNULIB_GETPAGESIZE=0;
16822 GNULIB_GETUSERSHELL=0;
16823 GNULIB_GROUP_MEMBER=0;
16824 GNULIB_ISATTY=0;
16825 GNULIB_LCHOWN=0;
16826 GNULIB_LINK=0;
16827 GNULIB_LINKAT=0;
16828 GNULIB_LSEEK=0;
16829 GNULIB_PIPE=0;
16830 GNULIB_PIPE2=0;
16831 GNULIB_PREAD=0;
16832 GNULIB_PWRITE=0;
16833 GNULIB_READ=0;
16834 GNULIB_READLINK=0;
16835 GNULIB_READLINKAT=0;
16836 GNULIB_RMDIR=0;
16837 GNULIB_SETHOSTNAME=0;
16838 GNULIB_SLEEP=0;
16839 GNULIB_SYMLINK=0;
16840 GNULIB_SYMLINKAT=0;
16841 GNULIB_TTYNAME_R=0;
16842 GNULIB_UNISTD_H_NONBLOCKING=0;
16843 GNULIB_UNISTD_H_SIGPIPE=0;
16844 GNULIB_UNLINK=0;
16845 GNULIB_UNLINKAT=0;
16846 GNULIB_USLEEP=0;
16847 GNULIB_WRITE=0;
16848 HAVE_CHOWN=1;
16849 HAVE_DUP2=1;
16850 HAVE_DUP3=1;
16851 HAVE_EUIDACCESS=1;
16852 HAVE_FACCESSAT=1;
16853 HAVE_FCHDIR=1;
16854 HAVE_FCHOWNAT=1;
16855 HAVE_FDATASYNC=1;
16856 HAVE_FSYNC=1;
16857 HAVE_FTRUNCATE=1;
16858 HAVE_GETDTABLESIZE=1;
16859 HAVE_GETGROUPS=1;
16860 HAVE_GETHOSTNAME=1;
16861 HAVE_GETLOGIN=1;
16862 HAVE_GETPAGESIZE=1;
16863 HAVE_GROUP_MEMBER=1;
16864 HAVE_LCHOWN=1;
16865 HAVE_LINK=1;
16866 HAVE_LINKAT=1;
16867 HAVE_PIPE=1;
16868 HAVE_PIPE2=1;
16869 HAVE_PREAD=1;
16870 HAVE_PWRITE=1;
16871 HAVE_READLINK=1;
16872 HAVE_READLINKAT=1;
16873 HAVE_SETHOSTNAME=1;
16874 HAVE_SLEEP=1;
16875 HAVE_SYMLINK=1;
16876 HAVE_SYMLINKAT=1;
16877 HAVE_UNLINKAT=1;
16878 HAVE_USLEEP=1;
16879 HAVE_DECL_ENVIRON=1;
16880 HAVE_DECL_FCHDIR=1;
16881 HAVE_DECL_FDATASYNC=1;
16882 HAVE_DECL_GETDOMAINNAME=1;
16883 HAVE_DECL_GETLOGIN_R=1;
16884 HAVE_DECL_GETPAGESIZE=1;
16885 HAVE_DECL_GETUSERSHELL=1;
16886 HAVE_DECL_SETHOSTNAME=1;
16887 HAVE_DECL_TTYNAME_R=1;
16888 HAVE_OS_H=0;
16889 HAVE_SYS_PARAM_H=0;
16890 REPLACE_CHOWN=0;
16891 REPLACE_CLOSE=0;
16892 REPLACE_DUP=0;
16893 REPLACE_DUP2=0;
16894 REPLACE_FCHOWNAT=0;
16895 REPLACE_FTRUNCATE=0;
16896 REPLACE_GETCWD=0;
16897 REPLACE_GETDOMAINNAME=0;
16898 REPLACE_GETLOGIN_R=0;
16899 REPLACE_GETGROUPS=0;
16900 REPLACE_GETPAGESIZE=0;
16901 REPLACE_ISATTY=0;
16902 REPLACE_LCHOWN=0;
16903 REPLACE_LINK=0;
16904 REPLACE_LINKAT=0;
16905 REPLACE_LSEEK=0;
16906 REPLACE_PREAD=0;
16907 REPLACE_PWRITE=0;
16908 REPLACE_READ=0;
16909 REPLACE_READLINK=0;
16910 REPLACE_RMDIR=0;
16911 REPLACE_SLEEP=0;
16912 REPLACE_SYMLINK=0;
16913 REPLACE_TTYNAME_R=0;
16914 REPLACE_UNLINK=0;
16915 REPLACE_UNLINKAT=0;
16916 REPLACE_USLEEP=0;
16917 REPLACE_WRITE=0;
16918 UNISTD_H_HAVE_WINSOCK2_H=0;
16919 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
f199cab1
GM
16920
16921
93131e11 16922
d7ad186c
GM
16923 GNULIB_OPENDIR=0;
16924 GNULIB_READDIR=0;
16925 GNULIB_REWINDDIR=0;
16926 GNULIB_CLOSEDIR=0;
16927 GNULIB_DIRFD=0;
16928 GNULIB_FDOPENDIR=0;
16929 GNULIB_SCANDIR=0;
16930 GNULIB_ALPHASORT=0;
16931 HAVE_OPENDIR=1;
16932 HAVE_READDIR=1;
16933 HAVE_REWINDDIR=1;
16934 HAVE_CLOSEDIR=1;
16935 HAVE_DECL_DIRFD=1;
16936 HAVE_DECL_FDOPENDIR=1;
16937 HAVE_FDOPENDIR=1;
16938 HAVE_SCANDIR=1;
16939 HAVE_ALPHASORT=1;
16940 REPLACE_OPENDIR=0;
16941 REPLACE_CLOSEDIR=0;
16942 REPLACE_DIRFD=0;
16943 REPLACE_FDOPENDIR=0;
710f5812
GM
16944
16945
16946
16947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
16948$as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
16949if test "${gl_cv_have_include_next+set}" = set; then :
16950 $as_echo_n "(cached) " >&6
16951else
16952 rm -rf conftestd1a conftestd1b conftestd2
16953 mkdir conftestd1a conftestd1b conftestd2
16954 cat <<EOF > conftestd1a/conftest.h
16955#define DEFINED_IN_CONFTESTD1
16956#include_next <conftest.h>
16957#ifdef DEFINED_IN_CONFTESTD2
16958int foo;
16959#else
16960#error "include_next doesn't work"
16961#endif
16962EOF
16963 cat <<EOF > conftestd1b/conftest.h
16964#define DEFINED_IN_CONFTESTD1
16965#include <stdio.h>
16966#include_next <conftest.h>
16967#ifdef DEFINED_IN_CONFTESTD2
16968int foo;
16969#else
16970#error "include_next doesn't work"
16971#endif
16972EOF
16973 cat <<EOF > conftestd2/conftest.h
16974#ifndef DEFINED_IN_CONFTESTD1
16975#error "include_next test doesn't work"
16976#endif
16977#define DEFINED_IN_CONFTESTD2
16978EOF
16979 gl_save_CPPFLAGS="$CPPFLAGS"
16980 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
16981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16982/* end confdefs.h. */
16983#include <conftest.h>
16984_ACEOF
16985if ac_fn_c_try_compile "$LINENO"; then :
16986 gl_cv_have_include_next=yes
16987else
16988 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
16989 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16990/* end confdefs.h. */
16991#include <conftest.h>
16992_ACEOF
16993if ac_fn_c_try_compile "$LINENO"; then :
16994 gl_cv_have_include_next=buggy
16995else
16996 gl_cv_have_include_next=no
16997fi
16998rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16999
17000fi
17001rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17002 CPPFLAGS="$gl_save_CPPFLAGS"
17003 rm -rf conftestd1a conftestd1b conftestd2
17004
17005fi
17006{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
17007$as_echo "$gl_cv_have_include_next" >&6; }
17008 PRAGMA_SYSTEM_HEADER=
17009 if test $gl_cv_have_include_next = yes; then
17010 INCLUDE_NEXT=include_next
17011 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
17012 if test -n "$GCC"; then
17013 PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
17014 fi
17015 else
17016 if test $gl_cv_have_include_next = buggy; then
17017 INCLUDE_NEXT=include
17018 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
17019 else
17020 INCLUDE_NEXT=include
17021 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
17022 fi
17023 fi
17024
17025
17026
17027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5
17028$as_echo_n "checking whether system header files limit the line length... " >&6; }
17029if test "${gl_cv_pragma_columns+set}" = set; then :
17030 $as_echo_n "(cached) " >&6
17031else
17032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17033/* end confdefs.h. */
17034
17035#ifdef __TANDEM
17036choke me
17037#endif
17038
17039_ACEOF
17040if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17041 $EGREP "choke me" >/dev/null 2>&1; then :
17042 gl_cv_pragma_columns=yes
17043else
17044 gl_cv_pragma_columns=no
17045fi
17046rm -f conftest*
17047
17048
17049fi
17050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5
17051$as_echo "$gl_cv_pragma_columns" >&6; }
17052 if test $gl_cv_pragma_columns = yes; then
17053 PRAGMA_COLUMNS="#pragma COLUMNS 10000"
17054 else
17055 PRAGMA_COLUMNS=
17056 fi
17057
17058
710f5812 17059
710f5812 17060
710f5812 17061
d7ad186c
GM
17062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtold conforms to C99" >&5
17063$as_echo_n "checking whether strtold conforms to C99... " >&6; }
17064if test "${gl_cv_func_c99_strtold+set}" = set; then :
f199cab1 17065 $as_echo_n "(cached) " >&6
ae0d7250 17066else
f199cab1 17067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3e0be4ab 17068/* end confdefs.h. */
d7ad186c
GM
17069/* On HP-UX before 11.23, strtold returns a struct instead of
17070 long double. Reject implementations like that, by requiring
17071 compatibility with the C99 prototype. */
17072 #include <stdlib.h>
17073 static long double (*p) (char const *, char **) = strtold;
17074 static long double
17075 test (char const *nptr, char **endptr)
17076 {
17077 long double r;
17078 r = strtold (nptr, endptr);
17079 return r;
17080 }
3e0be4ab
GM
17081int
17082main ()
17083{
d7ad186c 17084return test ("1.0", NULL) != 1 || p ("1.0", NULL) != 1;
3e0be4ab
GM
17085 ;
17086 return 0;
17087}
6ad6792b 17088_ACEOF
d7ad186c
GM
17089if ac_fn_c_try_link "$LINENO"; then :
17090 gl_cv_func_c99_strtold=yes
f199cab1 17091else
d7ad186c 17092 gl_cv_func_c99_strtold=no
f199cab1 17093fi
d7ad186c
GM
17094rm -f core conftest.err conftest.$ac_objext \
17095 conftest$ac_exeext conftest.$ac_ext
f199cab1 17096fi
d7ad186c
GM
17097{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_c99_strtold" >&5
17098$as_echo "$gl_cv_func_c99_strtold" >&6; }
17099 if test $gl_cv_func_c99_strtold = yes; then
f199cab1 17100
d7ad186c 17101$as_echo "#define HAVE_C99_STRTOLD 1" >>confdefs.h
f199cab1 17102
5476a9a4 17103 fi
f199cab1 17104
f199cab1 17105
f199cab1
GM
17106
17107
4fda9c95 17108
3bf26e96
GM
17109
17110
eda33f78 17111
d7ad186c
GM
17112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
17113$as_echo_n "checking if environ is properly declared... " >&6; }
17114 if test "${gt_cv_var_environ_declaration+set}" = set; then :
17115 $as_echo_n "(cached) " >&6
17116else
eda33f78 17117
d7ad186c
GM
17118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17119/* end confdefs.h. */
17120#if HAVE_UNISTD_H
17121 #include <unistd.h>
17122 #endif
17123 /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>. */
17124 #include <stdlib.h>
17125
17126 extern struct { int foo; } environ;
17127int
17128main ()
17129{
17130environ.foo = 1;
17131 ;
17132 return 0;
17133}
17134_ACEOF
17135if ac_fn_c_try_compile "$LINENO"; then :
17136 gt_cv_var_environ_declaration=no
17137else
17138 gt_cv_var_environ_declaration=yes
17139fi
17140rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17141fi
17142
17143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
17144$as_echo "$gt_cv_var_environ_declaration" >&6; }
17145 if test $gt_cv_var_environ_declaration = yes; then
17146
17147$as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
17148
17149 fi
17150
17151
17152 if test $gt_cv_var_environ_declaration != yes; then
17153 HAVE_DECL_ENVIRON=0
17154 fi
17155
17156
17157
17158
17159
17160
17161
17162
17163
17164 GNULIB_FCNTL=0;
17165 GNULIB_NONBLOCKING=0;
17166 GNULIB_OPEN=0;
17167 GNULIB_OPENAT=0;
17168 HAVE_FCNTL=1;
17169 HAVE_OPENAT=1;
17170 REPLACE_FCNTL=0;
17171 REPLACE_OPEN=0;
17172 REPLACE_OPENAT=0;
17173
17174
17175ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
17176if test "x$ac_cv_type_mode_t" = x""yes; then :
17177
17178else
17179
17180cat >>confdefs.h <<_ACEOF
17181#define mode_t int
17182_ACEOF
17183
17184fi
17185
2407788f
GM
17186ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "$ac_includes_default"
17187if test "x$ac_cv_have_decl_fdatasync" = x""yes; then :
17188 ac_have_decl=1
17189else
17190 ac_have_decl=0
17191fi
17192
17193cat >>confdefs.h <<_ACEOF
17194#define HAVE_DECL_FDATASYNC $ac_have_decl
17195_ACEOF
17196
d7ad186c
GM
17197
17198
17199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for st_dm_mode in struct stat" >&5
17200$as_echo_n "checking for st_dm_mode in struct stat... " >&6; }
17201if test "${ac_cv_struct_st_dm_mode+set}" = set; then :
17202 $as_echo_n "(cached) " >&6
17203else
17204 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17205/* end confdefs.h. */
17206
17207#include <sys/types.h>
17208#include <sys/stat.h>
17209int
17210main ()
17211{
17212struct stat s; s.st_dm_mode;
17213 ;
17214 return 0;
17215}
17216_ACEOF
17217if ac_fn_c_try_compile "$LINENO"; then :
17218 ac_cv_struct_st_dm_mode=yes
17219else
17220 ac_cv_struct_st_dm_mode=no
17221fi
17222rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17223fi
17224{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_st_dm_mode" >&5
17225$as_echo "$ac_cv_struct_st_dm_mode" >&6; }
17226
17227 if test $ac_cv_struct_st_dm_mode = yes; then
17228
17229$as_echo "#define HAVE_ST_DM_MODE 1" >>confdefs.h
17230
17231 fi
17232
17233
17234ac_fn_c_check_decl "$LINENO" "strmode" "ac_cv_have_decl_strmode" "$ac_includes_default"
17235if test "x$ac_cv_have_decl_strmode" = x""yes; then :
17236 ac_have_decl=1
17237else
17238 ac_have_decl=0
17239fi
17240
17241cat >>confdefs.h <<_ACEOF
17242#define HAVE_DECL_STRMODE $ac_have_decl
17243_ACEOF
17244
17245
17246
17247
17248
17249
17250 GNULIB_FCHMODAT=0;
17251 GNULIB_FSTAT=0;
17252 GNULIB_FSTATAT=0;
17253 GNULIB_FUTIMENS=0;
17254 GNULIB_LCHMOD=0;
17255 GNULIB_LSTAT=0;
17256 GNULIB_MKDIRAT=0;
17257 GNULIB_MKFIFO=0;
17258 GNULIB_MKFIFOAT=0;
17259 GNULIB_MKNOD=0;
17260 GNULIB_MKNODAT=0;
17261 GNULIB_STAT=0;
17262 GNULIB_UTIMENSAT=0;
17263 HAVE_FCHMODAT=1;
17264 HAVE_FSTATAT=1;
17265 HAVE_FUTIMENS=1;
17266 HAVE_LCHMOD=1;
17267 HAVE_LSTAT=1;
17268 HAVE_MKDIRAT=1;
17269 HAVE_MKFIFO=1;
17270 HAVE_MKFIFOAT=1;
17271 HAVE_MKNOD=1;
17272 HAVE_MKNODAT=1;
17273 HAVE_UTIMENSAT=1;
17274 REPLACE_FSTAT=0;
17275 REPLACE_FSTATAT=0;
17276 REPLACE_FUTIMENS=0;
17277 REPLACE_LSTAT=0;
17278 REPLACE_MKDIR=0;
17279 REPLACE_MKFIFO=0;
17280 REPLACE_MKNOD=0;
17281 REPLACE_STAT=0;
17282 REPLACE_UTIMENSAT=0;
17283
17284
17285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
17286$as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
17287if test "${gl_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then :
17288 $as_echo_n "(cached) " >&6
17289else
17290 rm -f conftest.sym conftest.file
17291 echo >conftest.file
17292 if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then
17293 if test "$cross_compiling" = yes; then :
17294 case "$host_os" in
17295 # Guess yes on glibc systems.
17296 *-gnu*) gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
17297 # If we don't know, assume the worst.
17298 *) gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
17299 esac
17300
17301else
17302 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17303/* end confdefs.h. */
17304$ac_includes_default
17305int
17306main ()
17307{
17308struct stat sbuf;
17309 /* Linux will dereference the symlink and fail, as required by
17310 POSIX. That is better in the sense that it means we will not
17311 have to compile and use the lstat wrapper. */
17312 return lstat ("conftest.sym/", &sbuf) == 0;
17313
17314 ;
17315 return 0;
17316}
17317_ACEOF
17318if ac_fn_c_try_run "$LINENO"; then :
17319 gl_cv_func_lstat_dereferences_slashed_symlink=yes
17320else
17321 gl_cv_func_lstat_dereferences_slashed_symlink=no
17322fi
17323rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17324 conftest.$ac_objext conftest.beam conftest.$ac_ext
17325fi
17326
17327 else
17328 # If the 'ln -s' command failed, then we probably don't even
17329 # have an lstat function.
17330 gl_cv_func_lstat_dereferences_slashed_symlink="guessing no"
17331 fi
17332 rm -f conftest.sym conftest.file
17333
17334fi
17335{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
17336$as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
17337 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
17338 *yes)
17339
17340cat >>confdefs.h <<_ACEOF
17341#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
17342_ACEOF
17343
17344 ;;
17345 esac
17346
17347
17348
17349
2407788f
GM
17350
17351
d7ad186c
GM
17352 GNULIB__EXIT=0;
17353 GNULIB_ATOLL=0;
17354 GNULIB_CALLOC_POSIX=0;
17355 GNULIB_CANONICALIZE_FILE_NAME=0;
17356 GNULIB_GETLOADAVG=0;
17357 GNULIB_GETSUBOPT=0;
17358 GNULIB_GRANTPT=0;
5476a9a4
GM
17359 GNULIB_MALLOC_POSIX=0;
17360 GNULIB_MBTOWC=0;
17361 GNULIB_MKDTEMP=0;
17362 GNULIB_MKOSTEMP=0;
17363 GNULIB_MKOSTEMPS=0;
17364 GNULIB_MKSTEMP=0;
17365 GNULIB_MKSTEMPS=0;
17366 GNULIB_POSIX_OPENPT=0;
17367 GNULIB_PTSNAME=0;
17368 GNULIB_PTSNAME_R=0;
17369 GNULIB_PUTENV=0;
17370 GNULIB_RANDOM=0;
17371 GNULIB_RANDOM_R=0;
17372 GNULIB_REALLOC_POSIX=0;
17373 GNULIB_REALPATH=0;
17374 GNULIB_RPMATCH=0;
2cdd55fc 17375 GNULIB_SECURE_GETENV=0;
5476a9a4
GM
17376 GNULIB_SETENV=0;
17377 GNULIB_STRTOD=0;
17378 GNULIB_STRTOLL=0;
17379 GNULIB_STRTOULL=0;
17380 GNULIB_SYSTEM_POSIX=0;
17381 GNULIB_UNLOCKPT=0;
17382 GNULIB_UNSETENV=0;
17383 GNULIB_WCTOMB=0;
17384 HAVE__EXIT=1;
17385 HAVE_ATOLL=1;
17386 HAVE_CANONICALIZE_FILE_NAME=1;
17387 HAVE_DECL_GETLOADAVG=1;
17388 HAVE_GETSUBOPT=1;
17389 HAVE_GRANTPT=1;
17390 HAVE_MKDTEMP=1;
17391 HAVE_MKOSTEMP=1;
17392 HAVE_MKOSTEMPS=1;
17393 HAVE_MKSTEMP=1;
17394 HAVE_MKSTEMPS=1;
17395 HAVE_POSIX_OPENPT=1;
17396 HAVE_PTSNAME=1;
17397 HAVE_PTSNAME_R=1;
17398 HAVE_RANDOM=1;
17399 HAVE_RANDOM_H=1;
17400 HAVE_RANDOM_R=1;
17401 HAVE_REALPATH=1;
17402 HAVE_RPMATCH=1;
2cdd55fc 17403 HAVE_SECURE_GETENV=1;
5476a9a4
GM
17404 HAVE_SETENV=1;
17405 HAVE_DECL_SETENV=1;
17406 HAVE_STRTOD=1;
17407 HAVE_STRTOLL=1;
17408 HAVE_STRTOULL=1;
17409 HAVE_STRUCT_RANDOM_DATA=1;
17410 HAVE_SYS_LOADAVG_H=0;
17411 HAVE_UNLOCKPT=1;
17412 HAVE_DECL_UNSETENV=1;
17413 REPLACE_CALLOC=0;
17414 REPLACE_CANONICALIZE_FILE_NAME=0;
17415 REPLACE_MALLOC=0;
17416 REPLACE_MBTOWC=0;
17417 REPLACE_MKSTEMP=0;
b6c9d18d 17418 REPLACE_PTSNAME=0;
5476a9a4
GM
17419 REPLACE_PTSNAME_R=0;
17420 REPLACE_PUTENV=0;
17421 REPLACE_RANDOM_R=0;
17422 REPLACE_REALLOC=0;
17423 REPLACE_REALPATH=0;
17424 REPLACE_SETENV=0;
17425 REPLACE_STRTOD=0;
17426 REPLACE_UNSETENV=0;
17427 REPLACE_WCTOMB=0;
f199cab1
GM
17428
17429
17430
f199cab1
GM
17431
17432
17433
17434
17435
17436
17437
17438
17439
17440
5f90be1b 17441
f199cab1
GM
17442
17443
17444 if test $gl_cv_have_include_next = yes; then
5476a9a4 17445 gl_cv_next_getopt_h='<'getopt.h'>'
f199cab1 17446 else
5476a9a4
GM
17447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <getopt.h>" >&5
17448$as_echo_n "checking absolute name of <getopt.h>... " >&6; }
17449if test "${gl_cv_next_getopt_h+set}" = set; then :
5f90be1b 17450 $as_echo_n "(cached) " >&6
5f90be1b 17451else
f199cab1 17452
5476a9a4 17453 if test $ac_cv_header_getopt_h = yes; then
f199cab1
GM
17454
17455
17456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5f90be1b 17457/* end confdefs.h. */
5476a9a4 17458#include <getopt.h>
4fda9c95 17459
5f90be1b 17460_ACEOF
f199cab1
GM
17461 case "$host_os" in
17462 aix*) gl_absname_cpp="$ac_cpp -C" ;;
17463 *) gl_absname_cpp="$ac_cpp" ;;
17464 esac
5f90be1b 17465
f199cab1
GM
17466 case "$host_os" in
17467 mingw*)
17468 gl_dirsep_regex='[/\\]'
17469 ;;
17470 *)
17471 gl_dirsep_regex='\/'
17472 ;;
17473 esac
17474 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
5f90be1b 17475
5476a9a4 17476 gl_header_literal_regex=`echo 'getopt.h' \
f199cab1
GM
17477 | sed -e "$gl_make_literal_regex_sed"`
17478 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17479 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17480 s|^/[^/]|//&|
17481 p
17482 q
17483 }'
5476a9a4 17484 gl_cv_next_getopt_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
f199cab1
GM
17485 sed -n "$gl_absolute_header_sed"`'"'
17486 else
5476a9a4 17487 gl_cv_next_getopt_h='<'getopt.h'>'
f199cab1 17488 fi
5f90be1b
PE
17489
17490
3e0be4ab 17491fi
5476a9a4
GM
17492{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5
17493$as_echo "$gl_cv_next_getopt_h" >&6; }
f199cab1 17494 fi
5476a9a4 17495 NEXT_GETOPT_H=$gl_cv_next_getopt_h
3e0be4ab 17496
f199cab1
GM
17497 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17498 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
5476a9a4 17499 gl_next_as_first_directive='<'getopt.h'>'
f199cab1
GM
17500 else
17501 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
5476a9a4 17502 gl_next_as_first_directive=$gl_cv_next_getopt_h
f199cab1 17503 fi
5476a9a4 17504 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive
f199cab1
GM
17505
17506
f199cab1 17507
f199cab1 17508
5476a9a4
GM
17509 if test $ac_cv_header_getopt_h = yes; then
17510 HAVE_GETOPT_H=1
17511 else
17512 HAVE_GETOPT_H=0
f199cab1
GM
17513 fi
17514
f199cab1 17515
5476a9a4 17516 gl_replace_getopt=
f199cab1 17517
5476a9a4
GM
17518 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
17519 for ac_header in getopt.h
17520do :
17521 ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
17522if test "x$ac_cv_header_getopt_h" = x""yes; then :
17523 cat >>confdefs.h <<_ACEOF
17524#define HAVE_GETOPT_H 1
17525_ACEOF
f199cab1 17526
5476a9a4
GM
17527else
17528 gl_replace_getopt=yes
3e0be4ab 17529fi
3e0be4ab 17530
5476a9a4 17531done
3e0be4ab 17532
5476a9a4 17533 fi
3e0be4ab 17534
5476a9a4
GM
17535 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
17536 for ac_func in getopt_long_only
17537do :
17538 ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only"
17539if test "x$ac_cv_func_getopt_long_only" = x""yes; then :
17540 cat >>confdefs.h <<_ACEOF
17541#define HAVE_GETOPT_LONG_ONLY 1
17542_ACEOF
3e0be4ab 17543
3e0be4ab 17544else
5476a9a4 17545 gl_replace_getopt=yes
3e0be4ab 17546fi
5476a9a4 17547done
3e0be4ab 17548
f199cab1 17549 fi
3e0be4ab 17550
5476a9a4
GM
17551 if test -z "$gl_replace_getopt"; then
17552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5
17553$as_echo_n "checking whether getopt is POSIX compatible... " >&6; }
17554if test "${gl_cv_func_getopt_posix+set}" = set; then :
3e0be4ab 17555 $as_echo_n "(cached) " >&6
5476a9a4
GM
17556else
17557
17558 if test $cross_compiling = no; then
17559 if test "$cross_compiling" = yes; then :
17560 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17561$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17562as_fn_error "cannot run test program while cross compiling
17563See \`config.log' for more details." "$LINENO" 5; }
3e0be4ab 17564else
f199cab1 17565 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3e0be4ab 17566/* end confdefs.h. */
5476a9a4
GM
17567
17568#include <unistd.h>
17569#include <stdlib.h>
17570#include <string.h>
17571
f199cab1
GM
17572int
17573main ()
17574{
5476a9a4
GM
17575 static char program[] = "program";
17576 static char a[] = "-a";
17577 static char foo[] = "foo";
17578 static char bar[] = "bar";
17579 char *argv[] = { program, a, foo, bar, NULL };
17580 int c;
17581
17582 c = getopt (4, argv, "ab");
17583 if (!(c == 'a'))
17584 return 1;
17585 c = getopt (4, argv, "ab");
17586 if (!(c == -1))
17587 return 2;
17588 if (!(optind == 2))
17589 return 3;
f199cab1
GM
17590 return 0;
17591}
17592
3e0be4ab 17593_ACEOF
5476a9a4
GM
17594if ac_fn_c_try_run "$LINENO"; then :
17595 gl_cv_func_getopt_posix=maybe
3e0be4ab 17596else
5476a9a4 17597 gl_cv_func_getopt_posix=no
3e0be4ab 17598fi
5476a9a4
GM
17599rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17600 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1
GM
17601fi
17602
5476a9a4
GM
17603 if test $gl_cv_func_getopt_posix = maybe; then
17604 if test "$cross_compiling" = yes; then :
17605 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17606$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17607as_fn_error "cannot run test program while cross compiling
17608See \`config.log' for more details." "$LINENO" 5; }
3e0be4ab 17609else
5476a9a4
GM
17610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17611/* end confdefs.h. */
3e0be4ab 17612
5476a9a4
GM
17613#include <unistd.h>
17614#include <stdlib.h>
17615#include <string.h>
3e0be4ab 17616
5476a9a4
GM
17617int
17618main ()
17619{
17620 static char program[] = "program";
17621 static char donald[] = "donald";
17622 static char p[] = "-p";
17623 static char billy[] = "billy";
17624 static char duck[] = "duck";
17625 static char a[] = "-a";
17626 static char bar[] = "bar";
17627 char *argv[] = { program, donald, p, billy, duck, a, bar, NULL };
17628 int c;
3e0be4ab 17629
5476a9a4
GM
17630 c = getopt (7, argv, "+abp:q:");
17631 if (!(c == -1))
17632 return 4;
17633 if (!(strcmp (argv[0], "program") == 0))
17634 return 5;
17635 if (!(strcmp (argv[1], "donald") == 0))
17636 return 6;
17637 if (!(strcmp (argv[2], "-p") == 0))
17638 return 7;
17639 if (!(strcmp (argv[3], "billy") == 0))
17640 return 8;
17641 if (!(strcmp (argv[4], "duck") == 0))
17642 return 9;
17643 if (!(strcmp (argv[5], "-a") == 0))
17644 return 10;
17645 if (!(strcmp (argv[6], "bar") == 0))
17646 return 11;
17647 if (!(optind == 1))
17648 return 12;
17649 return 0;
17650}
3e0be4ab
GM
17651
17652_ACEOF
5476a9a4
GM
17653if ac_fn_c_try_run "$LINENO"; then :
17654 gl_cv_func_getopt_posix=maybe
17655else
17656 gl_cv_func_getopt_posix=no
17657fi
17658rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17659 conftest.$ac_objext conftest.beam conftest.$ac_ext
17660fi
b0415a03 17661
5476a9a4
GM
17662 fi
17663 if test $gl_cv_func_getopt_posix = maybe; then
17664 if test "$cross_compiling" = yes; then :
17665 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17666$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17667as_fn_error "cannot run test program while cross compiling
17668See \`config.log' for more details." "$LINENO" 5; }
17669else
17670 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17671/* end confdefs.h. */
b0415a03 17672
5476a9a4
GM
17673#include <unistd.h>
17674#include <stdlib.h>
17675#include <string.h>
3e0be4ab 17676
5476a9a4
GM
17677int
17678main ()
17679{
17680 static char program[] = "program";
17681 static char ab[] = "-ab";
17682 char *argv[3] = { program, ab, NULL };
17683 if (getopt (2, argv, "ab:") != 'a')
17684 return 13;
17685 if (getopt (2, argv, "ab:") != '?')
17686 return 14;
17687 if (optopt != 'b')
17688 return 15;
17689 if (optind != 2)
17690 return 16;
17691 return 0;
17692}
3e0be4ab 17693
5476a9a4
GM
17694_ACEOF
17695if ac_fn_c_try_run "$LINENO"; then :
17696 gl_cv_func_getopt_posix=yes
17697else
17698 gl_cv_func_getopt_posix=no
17699fi
17700rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17701 conftest.$ac_objext conftest.beam conftest.$ac_ext
3e0be4ab 17702fi
3e0be4ab 17703
5476a9a4
GM
17704 fi
17705 else
17706 case "$host_os" in
17707 darwin* | aix* | mingw*) gl_cv_func_getopt_posix="guessing no";;
17708 *) gl_cv_func_getopt_posix="guessing yes";;
17709 esac
17710 fi
3e0be4ab 17711
5476a9a4
GM
17712fi
17713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5
17714$as_echo "$gl_cv_func_getopt_posix" >&6; }
17715 case "$gl_cv_func_getopt_posix" in
17716 *no) gl_replace_getopt=yes ;;
17717 esac
3e0be4ab
GM
17718 fi
17719
5476a9a4
GM
17720 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
17721 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5
17722$as_echo_n "checking for working GNU getopt function... " >&6; }
17723if test "${gl_cv_func_getopt_gnu+set}" = set; then :
17724 $as_echo_n "(cached) " >&6
17725else
17726 # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the
17727 # optstring is necessary for programs like m4 that have POSIX-mandated
17728 # semantics for supporting options interspersed with files.
17729 # Also, since getopt_long is a GNU extension, we require optind=0.
17730 # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT;
17731 # so take care to revert to the correct (non-)export state.
17732 gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }'
17733 case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in
17734 xx) gl_had_POSIXLY_CORRECT=exported ;;
17735 x) gl_had_POSIXLY_CORRECT=yes ;;
17736 *) gl_had_POSIXLY_CORRECT= ;;
17737 esac
17738 POSIXLY_CORRECT=1
17739 export POSIXLY_CORRECT
17740 if test "$cross_compiling" = yes; then :
17741 gl_cv_func_getopt_gnu="guessing no"
3e0be4ab 17742
5476a9a4
GM
17743else
17744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17745/* end confdefs.h. */
17746#include <getopt.h>
17747 #include <stddef.h>
17748 #include <string.h>
3e0be4ab 17749
5476a9a4
GM
17750#include <stdlib.h>
17751#if defined __MACH__ && defined __APPLE__
17752/* Avoid a crash on Mac OS X. */
17753#include <mach/mach.h>
17754#include <mach/mach_error.h>
17755#include <mach/thread_status.h>
17756#include <mach/exception.h>
17757#include <mach/task.h>
17758#include <pthread.h>
17759/* The exception port on which our thread listens. */
17760static mach_port_t our_exception_port;
17761/* The main function of the thread listening for exceptions of type
17762 EXC_BAD_ACCESS. */
17763static void *
17764mach_exception_thread (void *arg)
17765{
17766 /* Buffer for a message to be received. */
17767 struct {
17768 mach_msg_header_t head;
17769 mach_msg_body_t msgh_body;
17770 char data[1024];
17771 } msg;
17772 mach_msg_return_t retval;
17773 /* Wait for a message on the exception port. */
17774 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
17775 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
17776 if (retval != MACH_MSG_SUCCESS)
17777 abort ();
17778 exit (1);
17779}
17780static void
17781nocrash_init (void)
17782{
17783 mach_port_t self = mach_task_self ();
17784 /* Allocate a port on which the thread shall listen for exceptions. */
17785 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
17786 == KERN_SUCCESS) {
17787 /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
17788 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
17789 MACH_MSG_TYPE_MAKE_SEND)
17790 == KERN_SUCCESS) {
17791 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
17792 for us. */
17793 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
17794 /* Create the thread listening on the exception port. */
17795 pthread_attr_t attr;
17796 pthread_t thread;
17797 if (pthread_attr_init (&attr) == 0
17798 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
17799 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
17800 pthread_attr_destroy (&attr);
17801 /* Replace the exception port info for these exceptions with our own.
17802 Note that we replace the exception port for the entire task, not only
17803 for a particular thread. This has the effect that when our exception
17804 port gets the message, the thread specific exception port has already
17805 been asked, and we don't need to bother about it.
17806 See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
17807 task_set_exception_ports (self, mask, our_exception_port,
17808 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
17809 }
17810 }
17811 }
17812}
17813#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
17814/* Avoid a crash on native Windows. */
17815#define WIN32_LEAN_AND_MEAN
17816#include <windows.h>
17817#include <winerror.h>
17818static LONG WINAPI
17819exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
17820{
17821 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
17822 {
17823 case EXCEPTION_ACCESS_VIOLATION:
17824 case EXCEPTION_IN_PAGE_ERROR:
17825 case EXCEPTION_STACK_OVERFLOW:
17826 case EXCEPTION_GUARD_PAGE:
17827 case EXCEPTION_PRIV_INSTRUCTION:
17828 case EXCEPTION_ILLEGAL_INSTRUCTION:
17829 case EXCEPTION_DATATYPE_MISALIGNMENT:
17830 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
17831 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
17832 exit (1);
17833 }
17834 return EXCEPTION_CONTINUE_SEARCH;
17835}
17836static void
17837nocrash_init (void)
17838{
17839 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
17840}
17841#else
17842/* Avoid a crash on POSIX systems. */
17843#include <signal.h>
17844/* A POSIX signal handler. */
17845static void
17846exception_handler (int sig)
17847{
17848 exit (1);
17849}
17850static void
17851nocrash_init (void)
17852{
17853#ifdef SIGSEGV
17854 signal (SIGSEGV, exception_handler);
17855#endif
17856#ifdef SIGBUS
17857 signal (SIGBUS, exception_handler);
17858#endif
17859}
17860#endif
3e0be4ab 17861
3e0be4ab 17862
5476a9a4
GM
17863int
17864main ()
17865{
3e0be4ab 17866
5476a9a4 17867 int result = 0;
3e0be4ab 17868
5476a9a4 17869 nocrash_init();
3e0be4ab 17870
5476a9a4
GM
17871 /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
17872 and fails on Mac OS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
17873 OSF/1 5.1, Solaris 10. */
17874 {
17875 static char conftest[] = "conftest";
17876 static char plus[] = "-+";
17877 char *argv[3] = { conftest, plus, NULL };
17878 opterr = 0;
17879 if (getopt (2, argv, "+a") != '?')
17880 result |= 1;
17881 }
17882 /* This code succeeds on glibc 2.8, mingw,
17883 and fails on Mac OS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
17884 IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */
17885 {
17886 static char program[] = "program";
17887 static char p[] = "-p";
17888 static char foo[] = "foo";
17889 static char bar[] = "bar";
17890 char *argv[] = { program, p, foo, bar, NULL };
3e0be4ab 17891
5476a9a4
GM
17892 optind = 1;
17893 if (getopt (4, argv, "p::") != 'p')
17894 result |= 2;
17895 else if (optarg != NULL)
17896 result |= 4;
17897 else if (getopt (4, argv, "p::") != -1)
17898 result |= 6;
17899 else if (optind != 2)
17900 result |= 8;
17901 }
17902 /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */
17903 {
17904 static char program[] = "program";
17905 static char foo[] = "foo";
17906 static char p[] = "-p";
17907 char *argv[] = { program, foo, p, NULL };
17908 optind = 0;
17909 if (getopt (3, argv, "-p") != 1)
17910 result |= 16;
17911 else if (getopt (3, argv, "-p") != 'p')
17912 result |= 16;
17913 }
17914 /* This code fails on glibc 2.11. */
17915 {
17916 static char program[] = "program";
17917 static char b[] = "-b";
17918 static char a[] = "-a";
17919 char *argv[] = { program, b, a, NULL };
17920 optind = opterr = 0;
17921 if (getopt (3, argv, "+:a:b") != 'b')
17922 result |= 32;
17923 else if (getopt (3, argv, "+:a:b") != ':')
17924 result |= 32;
17925 }
17926 /* This code dumps core on glibc 2.14. */
17927 {
17928 static char program[] = "program";
17929 static char w[] = "-W";
17930 static char dummy[] = "dummy";
17931 char *argv[] = { program, w, dummy, NULL };
17932 optind = opterr = 1;
17933 if (getopt (3, argv, "W;") != 'W')
17934 result |= 64;
17935 }
17936 return result;
3e0be4ab 17937
5476a9a4
GM
17938 ;
17939 return 0;
17940}
17941_ACEOF
17942if ac_fn_c_try_run "$LINENO"; then :
17943 gl_cv_func_getopt_gnu=yes
17944else
17945 gl_cv_func_getopt_gnu=no
17946fi
17947rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17948 conftest.$ac_objext conftest.beam conftest.$ac_ext
17949fi
3e0be4ab 17950
5476a9a4
GM
17951 case $gl_had_POSIXLY_CORRECT in
17952 exported) ;;
17953 yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;;
17954 *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;;
17955 esac
3e0be4ab 17956
5476a9a4
GM
17957fi
17958{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5
17959$as_echo "$gl_cv_func_getopt_gnu" >&6; }
17960 if test "$gl_cv_func_getopt_gnu" != yes; then
17961 gl_replace_getopt=yes
17962 else
17963 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt_long function" >&5
17964$as_echo_n "checking for working GNU getopt_long function... " >&6; }
17965if test "${gl_cv_func_getopt_long_gnu+set}" = set; then :
f199cab1
GM
17966 $as_echo_n "(cached) " >&6
17967else
5476a9a4
GM
17968 if test "$cross_compiling" = yes; then :
17969 case "$host_os" in
17970 openbsd*) gl_cv_func_getopt_long_gnu="guessing no";;
17971 *) gl_cv_func_getopt_long_gnu="guessing yes";;
17972 esac
3e0be4ab
GM
17973
17974else
17975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17976/* end confdefs.h. */
5476a9a4
GM
17977#include <getopt.h>
17978 #include <stddef.h>
17979 #include <string.h>
f199cab1
GM
17980
17981int
17982main ()
369e19fc 17983{
5476a9a4
GM
17984static const struct option long_options[] =
17985 {
17986 { "xtremely-",no_argument, NULL, 1003 },
17987 { "xtra", no_argument, NULL, 1001 },
17988 { "xtreme", no_argument, NULL, 1002 },
17989 { "xtremely", no_argument, NULL, 1003 },
17990 { NULL, 0, NULL, 0 }
17991 };
17992 /* This code fails on OpenBSD 5.0. */
17993 {
17994 static char program[] = "program";
17995 static char xtremel[] = "--xtremel";
17996 char *argv[] = { program, xtremel, NULL };
17997 int option_index;
17998 optind = 1; opterr = 0;
17999 if (getopt_long (2, argv, "", long_options, &option_index) != 1003)
18000 return 1;
18001 }
18002 return 0;
f199cab1
GM
18003
18004 ;
18005 return 0;
369e19fc 18006}
f199cab1
GM
18007_ACEOF
18008if ac_fn_c_try_run "$LINENO"; then :
5476a9a4 18009 gl_cv_func_getopt_long_gnu=yes
f199cab1 18010else
5476a9a4 18011 gl_cv_func_getopt_long_gnu=no
f199cab1
GM
18012fi
18013rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18014 conftest.$ac_objext conftest.beam conftest.$ac_ext
18015fi
18016
5476a9a4 18017
f199cab1 18018fi
5476a9a4
GM
18019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_long_gnu" >&5
18020$as_echo "$gl_cv_func_getopt_long_gnu" >&6; }
18021 case "$gl_cv_func_getopt_long_gnu" in
18022 *yes) ;;
18023 *) gl_replace_getopt=yes ;;
18024 esac
18025 fi
18026 fi
f199cab1 18027
f199cab1 18028
f199cab1 18029
369e19fc
PE
18030
18031
5476a9a4
GM
18032
18033 REPLACE_GETOPT=0
18034 if test -n "$gl_replace_getopt"; then
18035 REPLACE_GETOPT=1
f199cab1 18036 fi
3e0be4ab 18037
5476a9a4 18038 if test $REPLACE_GETOPT = 1; then
369e19fc 18039
5476a9a4 18040 GETOPT_H=getopt.h
369e19fc 18041
5476a9a4 18042$as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
6ad6792b
GM
18043
18044
f199cab1 18045
5476a9a4 18046 fi
f199cab1 18047
5476a9a4
GM
18048ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default"
18049if test "x$ac_cv_have_decl_getenv" = x""yes; then :
18050 ac_have_decl=1
3e0be4ab 18051else
5476a9a4 18052 ac_have_decl=0
3e0be4ab 18053fi
e275c824 18054
5476a9a4
GM
18055cat >>confdefs.h <<_ACEOF
18056#define HAVE_DECL_GETENV $ac_have_decl
18057_ACEOF
18058
a6342fc8 18059:
f199cab1 18060
5476a9a4
GM
18061
18062
18063
18064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
18065$as_echo_n "checking for C/C++ restrict keyword... " >&6; }
18066if test "${ac_cv_c_restrict+set}" = set; then :
18067 $as_echo_n "(cached) " >&6
f199cab1 18068else
5476a9a4
GM
18069 ac_cv_c_restrict=no
18070 # The order here caters to the fact that C++ does not require restrict.
18071 for ac_kw in __restrict __restrict__ _Restrict restrict; do
18072 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 18073/* end confdefs.h. */
5476a9a4
GM
18074typedef int * int_ptr;
18075 int foo (int_ptr $ac_kw ip) {
18076 return ip[0];
18077 }
f199cab1
GM
18078int
18079main ()
18080{
5476a9a4
GM
18081int s[1];
18082 int * $ac_kw t = s;
18083 t[0] = 0;
18084 return foo(t)
f199cab1
GM
18085 ;
18086 return 0;
18087}
18088_ACEOF
5476a9a4
GM
18089if ac_fn_c_try_compile "$LINENO"; then :
18090 ac_cv_c_restrict=$ac_kw
f199cab1 18091fi
5476a9a4
GM
18092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18093 test "$ac_cv_c_restrict" != no && break
18094 done
f199cab1 18095
f199cab1 18096fi
5476a9a4
GM
18097{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
18098$as_echo "$ac_cv_c_restrict" >&6; }
f199cab1 18099
5476a9a4
GM
18100 case $ac_cv_c_restrict in
18101 restrict) ;;
18102 no) $as_echo "#define restrict /**/" >>confdefs.h
18103 ;;
18104 *) cat >>confdefs.h <<_ACEOF
18105#define restrict $ac_cv_c_restrict
18106_ACEOF
18107 ;;
18108 esac
f199cab1 18109
f199cab1 18110
5476a9a4
GM
18111 GNULIB_GETTIMEOFDAY=0;
18112 HAVE_GETTIMEOFDAY=1;
18113 HAVE_STRUCT_TIMEVAL=1;
18114 HAVE_SYS_TIME_H=1;
18115 REPLACE_GETTIMEOFDAY=0;
18116 REPLACE_STRUCT_TIMEVAL=0;
e275c824 18117
e275c824 18118
e275c824 18119
e275c824 18120
4fda9c95 18121
5fa4ac76 18122
5fa4ac76 18123
5fa4ac76 18124
f199cab1
GM
18125
18126
18127
5fa4ac76 18128
5fa4ac76 18129
5fa4ac76 18130
5fa4ac76 18131
5fa4ac76 18132
5476a9a4
GM
18133 if test $gl_cv_have_include_next = yes; then
18134 gl_cv_next_sys_time_h='<'sys/time.h'>'
18135 else
18136 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
18137$as_echo_n "checking absolute name of <sys/time.h>... " >&6; }
18138if test "${gl_cv_next_sys_time_h+set}" = set; then :
18139 $as_echo_n "(cached) " >&6
18140else
5fa4ac76 18141
5476a9a4 18142 if test $ac_cv_header_sys_time_h = yes; then
5fa4ac76
PE
18143
18144
5476a9a4
GM
18145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18146/* end confdefs.h. */
18147#include <sys/time.h>
5fa4ac76 18148
5476a9a4
GM
18149_ACEOF
18150 case "$host_os" in
18151 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18152 *) gl_absname_cpp="$ac_cpp" ;;
18153 esac
1f5d53eb 18154
5476a9a4
GM
18155 case "$host_os" in
18156 mingw*)
18157 gl_dirsep_regex='[/\\]'
18158 ;;
18159 *)
18160 gl_dirsep_regex='\/'
18161 ;;
18162 esac
18163 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
1f5d53eb 18164
5476a9a4
GM
18165 gl_header_literal_regex=`echo 'sys/time.h' \
18166 | sed -e "$gl_make_literal_regex_sed"`
18167 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18168 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18169 s|^/[^/]|//&|
18170 p
18171 q
18172 }'
18173 gl_cv_next_sys_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18174 sed -n "$gl_absolute_header_sed"`'"'
18175 else
18176 gl_cv_next_sys_time_h='<'sys/time.h'>'
18177 fi
1f5d53eb 18178
1f5d53eb 18179
5476a9a4
GM
18180fi
18181{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
18182$as_echo "$gl_cv_next_sys_time_h" >&6; }
18183 fi
18184 NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
3e0be4ab 18185
5476a9a4
GM
18186 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18187 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18188 gl_next_as_first_directive='<'sys/time.h'>'
18189 else
18190 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18191 gl_next_as_first_directive=$gl_cv_next_sys_time_h
18192 fi
18193 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
3e0be4ab 18194
e275c824 18195
3e0be4ab 18196
f199cab1
GM
18197
18198
5476a9a4
GM
18199 if test $ac_cv_header_sys_time_h != yes; then
18200 HAVE_SYS_TIME_H=0
18201 fi
f199cab1
GM
18202
18203
18204
18205
18206
5476a9a4
GM
18207 if test $ac_cv_header_sys_socket_h != yes; then
18208 for ac_header in winsock2.h
18209do :
18210 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
18211if test "x$ac_cv_header_winsock2_h" = x""yes; then :
18212 cat >>confdefs.h <<_ACEOF
18213#define HAVE_WINSOCK2_H 1
18214_ACEOF
f199cab1 18215
5476a9a4 18216fi
3e0be4ab 18217
5476a9a4 18218done
3e0be4ab 18219
5476a9a4
GM
18220 fi
18221 if test "$ac_cv_header_winsock2_h" = yes; then
18222 HAVE_WINSOCK2_H=1
18223 UNISTD_H_HAVE_WINSOCK2_H=1
18224 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
18225 else
18226 HAVE_WINSOCK2_H=0
18227 fi
18228
18229
18230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
18231$as_echo_n "checking for struct timeval... " >&6; }
18232if test "${gl_cv_sys_struct_timeval+set}" = set; then :
18233 $as_echo_n "(cached) " >&6
18234else
18235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18236/* end confdefs.h. */
18237#if HAVE_SYS_TIME_H
18238 #include <sys/time.h>
18239 #endif
18240 #include <time.h>
18241 #if HAVE_WINSOCK2_H
18242 # include <winsock2.h>
18243 #endif
f199cab1 18244
5476a9a4
GM
18245int
18246main ()
18247{
18248static struct timeval x; x.tv_sec = x.tv_usec;
18249 ;
18250 return 0;
18251}
18252_ACEOF
18253if ac_fn_c_try_compile "$LINENO"; then :
18254 gl_cv_sys_struct_timeval=yes
18255else
18256 gl_cv_sys_struct_timeval=no
f199cab1 18257fi
5476a9a4 18258rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 18259
5476a9a4
GM
18260fi
18261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
18262$as_echo "$gl_cv_sys_struct_timeval" >&6; }
18263 if test $gl_cv_sys_struct_timeval != yes; then
18264 HAVE_STRUCT_TIMEVAL=0
18265 else
18266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
18267$as_echo_n "checking for wide-enough struct timeval.tv_sec member... " >&6; }
18268if test "${gl_cv_sys_struct_timeval_tv_sec+set}" = set; then :
18269 $as_echo_n "(cached) " >&6
18270else
18271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18272/* end confdefs.h. */
18273#if HAVE_SYS_TIME_H
18274 #include <sys/time.h>
18275 #endif
18276 #include <time.h>
18277 #if HAVE_WINSOCK2_H
18278 # include <winsock2.h>
18279 #endif
f199cab1 18280
5476a9a4
GM
18281int
18282main ()
18283{
18284static struct timeval x;
18285 typedef int verify_tv_sec_type[
18286 sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
18287 ];
f199cab1 18288
5476a9a4
GM
18289 ;
18290 return 0;
18291}
18292_ACEOF
18293if ac_fn_c_try_compile "$LINENO"; then :
18294 gl_cv_sys_struct_timeval_tv_sec=yes
18295else
18296 gl_cv_sys_struct_timeval_tv_sec=no
18297fi
18298rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 18299
5476a9a4
GM
18300fi
18301{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
18302$as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
18303 if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
18304 REPLACE_STRUCT_TIMEVAL=1
18305 fi
18306 fi
f199cab1 18307
f199cab1
GM
18308
18309
18310
18311
18312
f199cab1 18313
5476a9a4
GM
18314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
18315$as_echo_n "checking for unsigned long long int... " >&6; }
18316if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then :
18317 $as_echo_n "(cached) " >&6
18318else
18319 ac_cv_type_unsigned_long_long_int=yes
18320 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
18321 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18322/* end confdefs.h. */
f199cab1 18323
5476a9a4
GM
18324 /* For now, do not test the preprocessor; as of 2007 there are too many
18325 implementations with broken preprocessors. Perhaps this can
18326 be revisited in 2012. In the meantime, code should not expect
18327 #if to work with literals wider than 32 bits. */
18328 /* Test literals. */
18329 long long int ll = 9223372036854775807ll;
18330 long long int nll = -9223372036854775807LL;
18331 unsigned long long int ull = 18446744073709551615ULL;
18332 /* Test constant expressions. */
18333 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
18334 ? 1 : -1)];
18335 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
18336 ? 1 : -1)];
18337 int i = 63;
18338int
18339main ()
18340{
18341/* Test availability of runtime routines for shift and division. */
18342 long long int llmax = 9223372036854775807ll;
18343 unsigned long long int ullmax = 18446744073709551615ull;
18344 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
18345 | (llmax / ll) | (llmax % ll)
18346 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
18347 | (ullmax / ull) | (ullmax % ull));
18348 ;
18349 return 0;
18350}
f199cab1 18351
e275c824 18352_ACEOF
5476a9a4 18353if ac_fn_c_try_link "$LINENO"; then :
3e0be4ab 18354
5476a9a4
GM
18355else
18356 ac_cv_type_unsigned_long_long_int=no
e275c824 18357fi
5476a9a4
GM
18358rm -f core conftest.err conftest.$ac_objext \
18359 conftest$ac_exeext conftest.$ac_ext
18360 fi
18361fi
18362{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
18363$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
18364 if test $ac_cv_type_unsigned_long_long_int = yes; then
e275c824 18365
5476a9a4 18366$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
e275c824 18367
5476a9a4 18368 fi
e275c824
PE
18369
18370
f199cab1 18371
5476a9a4
GM
18372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
18373$as_echo_n "checking for long long int... " >&6; }
18374if test "${ac_cv_type_long_long_int+set}" = set; then :
18375 $as_echo_n "(cached) " >&6
18376else
18377 ac_cv_type_long_long_int=yes
18378 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
18379 ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
18380 if test $ac_cv_type_long_long_int = yes; then
18381 if test "$cross_compiling" = yes; then :
f199cab1 18382 :
5476a9a4
GM
18383else
18384 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18385/* end confdefs.h. */
18386#include <limits.h>
18387 #ifndef LLONG_MAX
18388 # define HALF \
18389 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
18390 # define LLONG_MAX (HALF - 1 + HALF)
18391 #endif
18392int
18393main ()
18394{
18395long long int n = 1;
18396 int i;
18397 for (i = 0; ; i++)
18398 {
18399 long long int m = n << i;
18400 if (m >> i != n)
18401 return 1;
18402 if (LLONG_MAX / 2 < m)
18403 break;
18404 }
18405 return 0;
18406 ;
18407 return 0;
18408}
18409_ACEOF
18410if ac_fn_c_try_run "$LINENO"; then :
18411
18412else
18413 ac_cv_type_long_long_int=no
18414fi
18415rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18416 conftest.$ac_objext conftest.beam conftest.$ac_ext
18417fi
e275c824 18418
5476a9a4
GM
18419 fi
18420 fi
1f5d53eb 18421fi
5476a9a4
GM
18422{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
18423$as_echo "$ac_cv_type_long_long_int" >&6; }
18424 if test $ac_cv_type_long_long_int = yes; then
e275c824 18425
5476a9a4 18426$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
e275c824 18427
5476a9a4 18428 fi
e275c824
PE
18429
18430
e275c824
PE
18431
18432
18433
18434
5476a9a4
GM
18435 gl_cv_c_multiarch=no
18436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18437/* end confdefs.h. */
18438#ifndef __APPLE_CC__
18439 not a universal capable compiler
18440 #endif
18441 typedef int dummy;
e275c824 18442
5476a9a4
GM
18443_ACEOF
18444if ac_fn_c_try_compile "$LINENO"; then :
e275c824 18445
5476a9a4
GM
18446 arch=
18447 prev=
18448 for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
18449 if test -n "$prev"; then
18450 case $word in
18451 i?86 | x86_64 | ppc | ppc64)
18452 if test -z "$arch" || test "$arch" = "$word"; then
18453 arch="$word"
18454 else
18455 gl_cv_c_multiarch=yes
18456 fi
18457 ;;
18458 esac
18459 prev=
18460 else
18461 if test "x$word" = "x-arch"; then
18462 prev=arch
18463 fi
18464 fi
18465 done
f199cab1 18466
f199cab1 18467fi
5476a9a4
GM
18468rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18469 if test $gl_cv_c_multiarch = yes; then
18470 APPLE_UNIVERSAL_BUILD=1
18471 else
18472 APPLE_UNIVERSAL_BUILD=0
18473 fi
e275c824
PE
18474
18475
67342916 18476
67342916 18477
67342916 18478
5476a9a4
GM
18479 if test $ac_cv_type_long_long_int = yes; then
18480 HAVE_LONG_LONG_INT=1
18481 else
18482 HAVE_LONG_LONG_INT=0
18483 fi
e275c824 18484
e275c824 18485
5476a9a4
GM
18486 if test $ac_cv_type_unsigned_long_long_int = yes; then
18487 HAVE_UNSIGNED_LONG_LONG_INT=1
18488 else
18489 HAVE_UNSIGNED_LONG_LONG_INT=0
18490 fi
e275c824
PE
18491
18492
18493
5476a9a4
GM
18494 if test $ac_cv_header_wchar_h = yes; then
18495 HAVE_WCHAR_H=1
18496 else
18497 HAVE_WCHAR_H=0
18498 fi
e275c824 18499
e275c824 18500
5476a9a4
GM
18501 if test $ac_cv_header_inttypes_h = yes; then
18502 HAVE_INTTYPES_H=1
18503 else
18504 HAVE_INTTYPES_H=0
18505 fi
6c051bab 18506
942f733f 18507
5476a9a4
GM
18508 if test $ac_cv_header_sys_types_h = yes; then
18509 HAVE_SYS_TYPES_H=1
18510 else
18511 HAVE_SYS_TYPES_H=0
18512 fi
4fc2b746 18513
4fc2b746 18514
f199cab1
GM
18515
18516
18517
18518
18519
18520
18521
18522
18523
5476a9a4
GM
18524 if test $gl_cv_have_include_next = yes; then
18525 gl_cv_next_stdint_h='<'stdint.h'>'
18526 else
18527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
18528$as_echo_n "checking absolute name of <stdint.h>... " >&6; }
18529if test "${gl_cv_next_stdint_h+set}" = set; then :
18530 $as_echo_n "(cached) " >&6
18531else
f199cab1 18532
5476a9a4 18533 if test $ac_cv_header_stdint_h = yes; then
f199cab1
GM
18534
18535
5476a9a4
GM
18536 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18537/* end confdefs.h. */
18538#include <stdint.h>
f199cab1 18539
5476a9a4
GM
18540_ACEOF
18541 case "$host_os" in
18542 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18543 *) gl_absname_cpp="$ac_cpp" ;;
18544 esac
f199cab1 18545
5476a9a4
GM
18546 case "$host_os" in
18547 mingw*)
18548 gl_dirsep_regex='[/\\]'
18549 ;;
18550 *)
18551 gl_dirsep_regex='\/'
18552 ;;
18553 esac
18554 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
4fc2b746 18555
5476a9a4
GM
18556 gl_header_literal_regex=`echo 'stdint.h' \
18557 | sed -e "$gl_make_literal_regex_sed"`
18558 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18559 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18560 s|^/[^/]|//&|
18561 p
18562 q
18563 }'
18564 gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18565 sed -n "$gl_absolute_header_sed"`'"'
18566 else
18567 gl_cv_next_stdint_h='<'stdint.h'>'
18568 fi
4fc2b746 18569
4fc2b746 18570
5476a9a4
GM
18571fi
18572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
18573$as_echo "$gl_cv_next_stdint_h" >&6; }
18574 fi
18575 NEXT_STDINT_H=$gl_cv_next_stdint_h
b0415a03 18576
5476a9a4
GM
18577 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18578 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18579 gl_next_as_first_directive='<'stdint.h'>'
18580 else
18581 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18582 gl_next_as_first_directive=$gl_cv_next_stdint_h
18583 fi
18584 NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
b0415a03 18585
4fc2b746 18586
f199cab1 18587
f199cab1 18588
5476a9a4
GM
18589 if test $ac_cv_header_stdint_h = yes; then
18590 HAVE_STDINT_H=1
18591 else
18592 HAVE_STDINT_H=0
18593 fi
f199cab1
GM
18594
18595
5476a9a4
GM
18596 if test $ac_cv_header_stdint_h = yes; then
18597 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
18598$as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
18599if test "${gl_cv_header_working_stdint_h+set}" = set; then :
f199cab1
GM
18600 $as_echo_n "(cached) " >&6
18601else
5476a9a4
GM
18602 gl_cv_header_working_stdint_h=no
18603 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18604/* end confdefs.h. */
4fc2b746
GM
18605
18606
5476a9a4
GM
18607#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
18608#include <stdint.h>
18609/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
18610#if !(defined WCHAR_MIN && defined WCHAR_MAX)
18611#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
18612#endif
4fc2b746 18613
942f733f 18614
5476a9a4
GM
18615 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18616 included before <wchar.h>. */
18617 #include <stddef.h>
18618 #include <signal.h>
18619 #if HAVE_WCHAR_H
18620 # include <stdio.h>
18621 # include <time.h>
18622 # include <wchar.h>
18623 #endif
e275c824 18624
f199cab1 18625
5476a9a4
GM
18626#ifdef INT8_MAX
18627int8_t a1 = INT8_MAX;
18628int8_t a1min = INT8_MIN;
18629#endif
18630#ifdef INT16_MAX
18631int16_t a2 = INT16_MAX;
18632int16_t a2min = INT16_MIN;
18633#endif
18634#ifdef INT32_MAX
18635int32_t a3 = INT32_MAX;
18636int32_t a3min = INT32_MIN;
18637#endif
18638#ifdef INT64_MAX
18639int64_t a4 = INT64_MAX;
18640int64_t a4min = INT64_MIN;
18641#endif
18642#ifdef UINT8_MAX
18643uint8_t b1 = UINT8_MAX;
18644#else
18645typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
18646#endif
18647#ifdef UINT16_MAX
18648uint16_t b2 = UINT16_MAX;
18649#endif
18650#ifdef UINT32_MAX
18651uint32_t b3 = UINT32_MAX;
18652#endif
18653#ifdef UINT64_MAX
18654uint64_t b4 = UINT64_MAX;
18655#endif
18656int_least8_t c1 = INT8_C (0x7f);
18657int_least8_t c1max = INT_LEAST8_MAX;
18658int_least8_t c1min = INT_LEAST8_MIN;
18659int_least16_t c2 = INT16_C (0x7fff);
18660int_least16_t c2max = INT_LEAST16_MAX;
18661int_least16_t c2min = INT_LEAST16_MIN;
18662int_least32_t c3 = INT32_C (0x7fffffff);
18663int_least32_t c3max = INT_LEAST32_MAX;
18664int_least32_t c3min = INT_LEAST32_MIN;
18665int_least64_t c4 = INT64_C (0x7fffffffffffffff);
18666int_least64_t c4max = INT_LEAST64_MAX;
18667int_least64_t c4min = INT_LEAST64_MIN;
18668uint_least8_t d1 = UINT8_C (0xff);
18669uint_least8_t d1max = UINT_LEAST8_MAX;
18670uint_least16_t d2 = UINT16_C (0xffff);
18671uint_least16_t d2max = UINT_LEAST16_MAX;
18672uint_least32_t d3 = UINT32_C (0xffffffff);
18673uint_least32_t d3max = UINT_LEAST32_MAX;
18674uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
18675uint_least64_t d4max = UINT_LEAST64_MAX;
18676int_fast8_t e1 = INT_FAST8_MAX;
18677int_fast8_t e1min = INT_FAST8_MIN;
18678int_fast16_t e2 = INT_FAST16_MAX;
18679int_fast16_t e2min = INT_FAST16_MIN;
18680int_fast32_t e3 = INT_FAST32_MAX;
18681int_fast32_t e3min = INT_FAST32_MIN;
18682int_fast64_t e4 = INT_FAST64_MAX;
18683int_fast64_t e4min = INT_FAST64_MIN;
18684uint_fast8_t f1 = UINT_FAST8_MAX;
18685uint_fast16_t f2 = UINT_FAST16_MAX;
18686uint_fast32_t f3 = UINT_FAST32_MAX;
18687uint_fast64_t f4 = UINT_FAST64_MAX;
18688#ifdef INTPTR_MAX
18689intptr_t g = INTPTR_MAX;
18690intptr_t gmin = INTPTR_MIN;
18691#endif
18692#ifdef UINTPTR_MAX
18693uintptr_t h = UINTPTR_MAX;
18694#endif
18695intmax_t i = INTMAX_MAX;
18696uintmax_t j = UINTMAX_MAX;
5fa4ac76 18697
5476a9a4
GM
18698#include <limits.h> /* for CHAR_BIT */
18699#define TYPE_MINIMUM(t) \
18700 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
18701#define TYPE_MAXIMUM(t) \
18702 ((t) ((t) 0 < (t) -1 \
18703 ? (t) -1 \
18704 : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
18705struct s {
18706 int check_PTRDIFF:
18707 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
18708 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
18709 ? 1 : -1;
18710 /* Detect bug in FreeBSD 6.0 / ia64. */
18711 int check_SIG_ATOMIC:
18712 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
18713 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
18714 ? 1 : -1;
18715 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
18716 int check_WCHAR:
18717 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
18718 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
18719 ? 1 : -1;
18720 /* Detect bug in mingw. */
18721 int check_WINT:
18722 WINT_MIN == TYPE_MINIMUM (wint_t)
18723 && WINT_MAX == TYPE_MAXIMUM (wint_t)
18724 ? 1 : -1;
5fa4ac76 18725
5476a9a4
GM
18726 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
18727 int check_UINT8_C:
18728 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
18729 int check_UINT16_C:
18730 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
18731
18732 /* Detect bugs in OpenBSD 3.9 stdint.h. */
18733#ifdef UINT8_MAX
18734 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
3e0be4ab 18735#endif
5476a9a4
GM
18736#ifdef UINT16_MAX
18737 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
18738#endif
18739#ifdef UINT32_MAX
18740 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
18741#endif
18742#ifdef UINT64_MAX
18743 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
18744#endif
18745 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
18746 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
18747 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
18748 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
18749 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
18750 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
18751 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
18752 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
18753 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
18754 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
18755 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
18756};
18757
f199cab1
GM
18758int
18759main ()
18760{
5476a9a4 18761
f199cab1
GM
18762 ;
18763 return 0;
18764}
18765_ACEOF
5476a9a4
GM
18766if ac_fn_c_try_compile "$LINENO"; then :
18767 if test "$cross_compiling" = yes; then :
18768 gl_cv_header_working_stdint_h=yes
40e27e7f 18769
5476a9a4
GM
18770else
18771 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18772/* end confdefs.h. */
40e27e7f 18773
f199cab1 18774
5476a9a4
GM
18775#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
18776#include <stdint.h>
f199cab1
GM
18777
18778
5476a9a4
GM
18779 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18780 included before <wchar.h>. */
18781 #include <stddef.h>
18782 #include <signal.h>
18783 #if HAVE_WCHAR_H
18784 # include <stdio.h>
18785 # include <time.h>
18786 # include <wchar.h>
18787 #endif
f199cab1 18788
d87ffdb7 18789
5476a9a4
GM
18790#include <stdio.h>
18791#include <string.h>
18792#define MVAL(macro) MVAL1(macro)
18793#define MVAL1(expression) #expression
18794static const char *macro_values[] =
18795 {
18796#ifdef INT8_MAX
18797 MVAL (INT8_MAX),
18798#endif
18799#ifdef INT16_MAX
18800 MVAL (INT16_MAX),
18801#endif
18802#ifdef INT32_MAX
18803 MVAL (INT32_MAX),
18804#endif
18805#ifdef INT64_MAX
18806 MVAL (INT64_MAX),
18807#endif
18808#ifdef UINT8_MAX
18809 MVAL (UINT8_MAX),
18810#endif
18811#ifdef UINT16_MAX
18812 MVAL (UINT16_MAX),
18813#endif
18814#ifdef UINT32_MAX
18815 MVAL (UINT32_MAX),
18816#endif
18817#ifdef UINT64_MAX
18818 MVAL (UINT64_MAX),
18819#endif
18820 NULL
18821 };
f199cab1 18822
3e0be4ab
GM
18823int
18824main ()
18825{
5476a9a4
GM
18826
18827 const char **mv;
18828 for (mv = macro_values; *mv != NULL; mv++)
18829 {
18830 const char *value = *mv;
18831 /* Test whether it looks like a cast expression. */
18832 if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
18833 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
18834 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
18835 || strncmp (value, "((int)"/*)*/, 6) == 0
18836 || strncmp (value, "((signed short)"/*)*/, 15) == 0
18837 || strncmp (value, "((signed char)"/*)*/, 14) == 0)
18838 return mv - macro_values + 1;
18839 }
3e0be4ab 18840 return 0;
5476a9a4 18841
f199cab1
GM
18842 ;
18843 return 0;
18844}
18845_ACEOF
5476a9a4
GM
18846if ac_fn_c_try_run "$LINENO"; then :
18847 gl_cv_header_working_stdint_h=yes
f199cab1 18848fi
5476a9a4
GM
18849rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18850 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1
GM
18851fi
18852
d87ffdb7 18853
5476a9a4
GM
18854fi
18855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d87ffdb7 18856
5476a9a4
GM
18857fi
18858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
18859$as_echo "$gl_cv_header_working_stdint_h" >&6; }
18860 fi
18861 if test "$gl_cv_header_working_stdint_h" = yes; then
18862 STDINT_H=
18863 else
18864 for ac_header in sys/inttypes.h sys/bitypes.h
18865do :
18866 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
18867ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
18868eval as_val=\$$as_ac_Header
18869 if test "x$as_val" = x""yes; then :
18870 cat >>confdefs.h <<_ACEOF
18871#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
18872_ACEOF
d87ffdb7 18873
5476a9a4 18874fi
d87ffdb7 18875
5476a9a4 18876done
7d2a1c5e 18877
5476a9a4
GM
18878 if test $ac_cv_header_sys_inttypes_h = yes; then
18879 HAVE_SYS_INTTYPES_H=1
18880 else
18881 HAVE_SYS_INTTYPES_H=0
18882 fi
7d2a1c5e 18883
5476a9a4
GM
18884 if test $ac_cv_header_sys_bitypes_h = yes; then
18885 HAVE_SYS_BITYPES_H=1
18886 else
18887 HAVE_SYS_BITYPES_H=0
18888 fi
7d2a1c5e 18889
f199cab1
GM
18890
18891
18892
5476a9a4 18893 if test $APPLE_UNIVERSAL_BUILD = 0; then
f199cab1
GM
18894
18895
5476a9a4
GM
18896 for gltype in ptrdiff_t size_t ; do
18897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
18898$as_echo_n "checking for bit size of $gltype... " >&6; }
18899if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
18900 $as_echo_n "(cached) " >&6
18901else
18902 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
18903 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18904 included before <wchar.h>. */
18905 #include <stddef.h>
18906 #include <signal.h>
18907 #if HAVE_WCHAR_H
18908 # include <stdio.h>
18909 # include <time.h>
18910 # include <wchar.h>
18911 #endif
f199cab1 18912
5476a9a4 18913#include <limits.h>"; then :
f199cab1 18914
5476a9a4
GM
18915else
18916 result=unknown
18917fi
f199cab1 18918
5476a9a4 18919 eval gl_cv_bitsizeof_${gltype}=\$result
f199cab1 18920
5476a9a4
GM
18921fi
18922eval ac_res=\$gl_cv_bitsizeof_${gltype}
18923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18924$as_echo "$ac_res" >&6; }
18925 eval result=\$gl_cv_bitsizeof_${gltype}
18926 if test $result = unknown; then
18927 result=0
18928 fi
18929 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
18930 cat >>confdefs.h <<_ACEOF
18931#define BITSIZEOF_${GLTYPE} $result
18932_ACEOF
f199cab1 18933
5476a9a4
GM
18934 eval BITSIZEOF_${GLTYPE}=\$result
18935 done
f199cab1
GM
18936
18937
5476a9a4 18938 fi
f199cab1
GM
18939
18940
5476a9a4
GM
18941 for gltype in sig_atomic_t wchar_t wint_t ; do
18942 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
18943$as_echo_n "checking for bit size of $gltype... " >&6; }
18944if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
18945 $as_echo_n "(cached) " >&6
18946else
18947 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
18948 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18949 included before <wchar.h>. */
18950 #include <stddef.h>
18951 #include <signal.h>
18952 #if HAVE_WCHAR_H
18953 # include <stdio.h>
18954 # include <time.h>
18955 # include <wchar.h>
18956 #endif
f199cab1 18957
5476a9a4 18958#include <limits.h>"; then :
f199cab1 18959
f199cab1 18960else
5476a9a4 18961 result=unknown
7d2a1c5e 18962fi
7d2a1c5e 18963
5476a9a4 18964 eval gl_cv_bitsizeof_${gltype}=\$result
7d2a1c5e 18965
3e0be4ab 18966fi
5476a9a4
GM
18967eval ac_res=\$gl_cv_bitsizeof_${gltype}
18968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18969$as_echo "$ac_res" >&6; }
18970 eval result=\$gl_cv_bitsizeof_${gltype}
18971 if test $result = unknown; then
18972 result=0
18973 fi
18974 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
18975 cat >>confdefs.h <<_ACEOF
18976#define BITSIZEOF_${GLTYPE} $result
3e0be4ab 18977_ACEOF
7d2a1c5e 18978
5476a9a4
GM
18979 eval BITSIZEOF_${GLTYPE}=\$result
18980 done
7d2a1c5e
GM
18981
18982
5476a9a4
GM
18983
18984
18985 for gltype in sig_atomic_t wchar_t wint_t ; do
18986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
18987$as_echo_n "checking whether $gltype is signed... " >&6; }
18988if { as_var=gl_cv_type_${gltype}_signed; eval "test \"\${$as_var+set}\" = set"; }; then :
3e0be4ab
GM
18989 $as_echo_n "(cached) " >&6
18990else
f199cab1
GM
18991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18992/* end confdefs.h. */
f199cab1 18993
5476a9a4
GM
18994 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18995 included before <wchar.h>. */
18996 #include <stddef.h>
18997 #include <signal.h>
18998 #if HAVE_WCHAR_H
18999 # include <stdio.h>
19000 # include <time.h>
19001 # include <wchar.h>
19002 #endif
19003
19004 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
f199cab1
GM
19005int
19006main ()
19007{
5476a9a4 19008
f199cab1
GM
19009 ;
19010 return 0;
19011}
19012_ACEOF
19013if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4 19014 result=yes
f199cab1 19015else
5476a9a4 19016 result=no
f199cab1
GM
19017fi
19018rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5476a9a4 19019 eval gl_cv_type_${gltype}_signed=\$result
7d2a1c5e 19020
3e0be4ab 19021fi
5476a9a4
GM
19022eval ac_res=\$gl_cv_type_${gltype}_signed
19023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
19024$as_echo "$ac_res" >&6; }
19025 eval result=\$gl_cv_type_${gltype}_signed
19026 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
19027 if test "$result" = yes; then
19028 cat >>confdefs.h <<_ACEOF
19029#define HAVE_SIGNED_${GLTYPE} 1
f199cab1 19030_ACEOF
d87ffdb7 19031
5476a9a4
GM
19032 eval HAVE_SIGNED_${GLTYPE}=1
19033 else
19034 eval HAVE_SIGNED_${GLTYPE}=0
19035 fi
19036 done
f199cab1 19037
e275c824 19038
5476a9a4
GM
19039 gl_cv_type_ptrdiff_t_signed=yes
19040 gl_cv_type_size_t_signed=no
19041 if test $APPLE_UNIVERSAL_BUILD = 0; then
e275c824 19042
e275c824 19043
5476a9a4
GM
19044 for gltype in ptrdiff_t size_t ; do
19045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
19046$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
19047if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
16c3e636
PE
19048 $as_echo_n "(cached) " >&6
19049else
5476a9a4
GM
19050 eval gl_cv_type_${gltype}_suffix=no
19051 eval result=\$gl_cv_type_${gltype}_signed
19052 if test "$result" = yes; then
19053 glsufu=
19054 else
19055 glsufu=u
19056 fi
19057 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
19058 case $glsuf in
19059 '') gltype1='int';;
19060 l) gltype1='long int';;
19061 ll) gltype1='long long int';;
19062 i64) gltype1='__int64';;
19063 u) gltype1='unsigned int';;
19064 ul) gltype1='unsigned long int';;
19065 ull) gltype1='unsigned long long int';;
19066 ui64)gltype1='unsigned __int64';;
19067 esac
19068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 19069/* end confdefs.h. */
16c3e636 19070
5476a9a4
GM
19071 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19072 included before <wchar.h>. */
19073 #include <stddef.h>
19074 #include <signal.h>
19075 #if HAVE_WCHAR_H
19076 # include <stdio.h>
19077 # include <time.h>
19078 # include <wchar.h>
19079 #endif
1f5d53eb 19080
5476a9a4
GM
19081 extern $gltype foo;
19082 extern $gltype1 foo;
f199cab1
GM
19083int
19084main ()
19085{
5476a9a4 19086
f199cab1
GM
19087 ;
19088 return 0;
19089}
19090_ACEOF
19091if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4 19092 eval gl_cv_type_${gltype}_suffix=\$glsuf
f199cab1
GM
19093fi
19094rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5476a9a4
GM
19095 eval result=\$gl_cv_type_${gltype}_suffix
19096 test "$result" != no && break
19097 done
f199cab1 19098fi
5476a9a4
GM
19099eval ac_res=\$gl_cv_type_${gltype}_suffix
19100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
19101$as_echo "$ac_res" >&6; }
19102 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
19103 eval result=\$gl_cv_type_${gltype}_suffix
19104 test "$result" = no && result=
19105 eval ${GLTYPE}_SUFFIX=\$result
19106 cat >>confdefs.h <<_ACEOF
19107#define ${GLTYPE}_SUFFIX $result
19108_ACEOF
16c3e636 19109
5476a9a4 19110 done
16c3e636 19111
3e0be4ab 19112
5476a9a4
GM
19113 fi
19114
19115
19116 for gltype in sig_atomic_t wchar_t wint_t ; do
19117 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
19118$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
19119if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
1fd182f0
PE
19120 $as_echo_n "(cached) " >&6
19121else
5476a9a4
GM
19122 eval gl_cv_type_${gltype}_suffix=no
19123 eval result=\$gl_cv_type_${gltype}_signed
19124 if test "$result" = yes; then
19125 glsufu=
19126 else
19127 glsufu=u
19128 fi
19129 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
19130 case $glsuf in
19131 '') gltype1='int';;
19132 l) gltype1='long int';;
19133 ll) gltype1='long long int';;
19134 i64) gltype1='__int64';;
19135 u) gltype1='unsigned int';;
19136 ul) gltype1='unsigned long int';;
19137 ull) gltype1='unsigned long long int';;
19138 ui64)gltype1='unsigned __int64';;
19139 esac
19140 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1fd182f0 19141/* end confdefs.h. */
5476a9a4
GM
19142
19143 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19144 included before <wchar.h>. */
19145 #include <stddef.h>
19146 #include <signal.h>
19147 #if HAVE_WCHAR_H
19148 # include <stdio.h>
19149 # include <time.h>
19150 # include <wchar.h>
19151 #endif
19152
19153 extern $gltype foo;
19154 extern $gltype1 foo;
1fd182f0
PE
19155int
19156main ()
19157{
5476a9a4 19158
1fd182f0
PE
19159 ;
19160 return 0;
19161}
19162_ACEOF
3e0be4ab 19163if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4 19164 eval gl_cv_type_${gltype}_suffix=\$glsuf
1f5d53eb 19165fi
3e0be4ab 19166rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5476a9a4
GM
19167 eval result=\$gl_cv_type_${gltype}_suffix
19168 test "$result" != no && break
19169 done
f199cab1 19170fi
5476a9a4
GM
19171eval ac_res=\$gl_cv_type_${gltype}_suffix
19172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
19173$as_echo "$ac_res" >&6; }
19174 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
19175 eval result=\$gl_cv_type_${gltype}_suffix
19176 test "$result" = no && result=
19177 eval ${GLTYPE}_SUFFIX=\$result
19178 cat >>confdefs.h <<_ACEOF
19179#define ${GLTYPE}_SUFFIX $result
f199cab1
GM
19180_ACEOF
19181
5476a9a4 19182 done
f199cab1 19183
f199cab1 19184
f199cab1 19185
5476a9a4
GM
19186 if test $BITSIZEOF_WINT_T -lt 32; then
19187 BITSIZEOF_WINT_T=32
19188 fi
f199cab1 19189
5476a9a4
GM
19190 STDINT_H=stdint.h
19191 fi
f199cab1 19192
5476a9a4
GM
19193 if test -n "$STDINT_H"; then
19194 GL_GENERATE_STDINT_H_TRUE=
19195 GL_GENERATE_STDINT_H_FALSE='#'
19196else
19197 GL_GENERATE_STDINT_H_TRUE='#'
19198 GL_GENERATE_STDINT_H_FALSE=
f199cab1
GM
19199fi
19200
f199cab1 19201
f199cab1 19202
3e0be4ab 19203
f199cab1 19204
5476a9a4
GM
19205 GNULIB_IMAXABS=0;
19206 GNULIB_IMAXDIV=0;
19207 GNULIB_STRTOIMAX=0;
19208 GNULIB_STRTOUMAX=0;
19209 HAVE_DECL_IMAXABS=1;
19210 HAVE_DECL_IMAXDIV=1;
19211 HAVE_DECL_STRTOIMAX=1;
19212 HAVE_DECL_STRTOUMAX=1;
19213 REPLACE_STRTOIMAX=0;
19214 INT32_MAX_LT_INTMAX_MAX=1;
19215 INT64_MAX_EQ_LONG_MAX='defined _LP64';
19216 PRI_MACROS_BROKEN=0;
19217 PRIPTR_PREFIX=__PRIPTR_PREFIX;
19218 UINT32_MAX_LT_UINTMAX_MAX=1;
19219 UINT64_MAX_EQ_ULONG_MAX='defined _LP64';
1fd182f0 19220
1fd182f0 19221
1f5d53eb 19222
3e0be4ab
GM
19223
19224
1fd182f0 19225
3e0be4ab 19226
3e0be4ab 19227
f199cab1 19228
1fd182f0 19229
1f5d53eb 19230
1f5d53eb 19231
1f5d53eb 19232
3e0be4ab 19233
3e0be4ab 19234
5476a9a4
GM
19235 if test $gl_cv_have_include_next = yes; then
19236 gl_cv_next_inttypes_h='<'inttypes.h'>'
19237 else
19238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
19239$as_echo_n "checking absolute name of <inttypes.h>... " >&6; }
19240if test "${gl_cv_next_inttypes_h+set}" = set; then :
19241 $as_echo_n "(cached) " >&6
f199cab1 19242else
2b1928b8 19243
5476a9a4 19244 if test $ac_cv_header_inttypes_h = yes; then
3e0be4ab
GM
19245
19246
5476a9a4 19247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 19248/* end confdefs.h. */
5476a9a4 19249#include <inttypes.h>
3e0be4ab 19250
f199cab1 19251_ACEOF
5476a9a4
GM
19252 case "$host_os" in
19253 aix*) gl_absname_cpp="$ac_cpp -C" ;;
19254 *) gl_absname_cpp="$ac_cpp" ;;
19255 esac
1fd182f0 19256
5476a9a4
GM
19257 case "$host_os" in
19258 mingw*)
19259 gl_dirsep_regex='[/\\]'
19260 ;;
19261 *)
19262 gl_dirsep_regex='\/'
19263 ;;
19264 esac
19265 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
1fd182f0 19266
5476a9a4
GM
19267 gl_header_literal_regex=`echo 'inttypes.h' \
19268 | sed -e "$gl_make_literal_regex_sed"`
19269 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19270 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19271 s|^/[^/]|//&|
19272 p
19273 q
19274 }'
19275 gl_cv_next_inttypes_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19276 sed -n "$gl_absolute_header_sed"`'"'
19277 else
19278 gl_cv_next_inttypes_h='<'inttypes.h'>'
19279 fi
1fd182f0
PE
19280
19281
5476a9a4
GM
19282fi
19283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
19284$as_echo "$gl_cv_next_inttypes_h" >&6; }
19285 fi
19286 NEXT_INTTYPES_H=$gl_cv_next_inttypes_h
1fd182f0 19287
5476a9a4
GM
19288 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19289 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19290 gl_next_as_first_directive='<'inttypes.h'>'
19291 else
19292 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19293 gl_next_as_first_directive=$gl_cv_next_inttypes_h
19294 fi
19295 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
34119902
GM
19296
19297
3e0be4ab 19298
34119902 19299
3e0be4ab 19300
34119902 19301
b0415a03 19302
b0415a03 19303
3e0be4ab 19304
34119902 19305
34119902 19306
5476a9a4
GM
19307 case "$host_os" in
19308 mingw*)
19309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
19310$as_echo_n "checking for 64-bit off_t... " >&6; }
19311if test "${gl_cv_type_off_t_64+set}" = set; then :
f199cab1
GM
19312 $as_echo_n "(cached) " >&6
19313else
5476a9a4
GM
19314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19315/* end confdefs.h. */
19316#include <sys/types.h>
19317 int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
19318
19319int
19320main ()
19321{
19322
19323 ;
19324 return 0;
19325}
f199cab1 19326_ACEOF
5476a9a4
GM
19327if ac_fn_c_try_compile "$LINENO"; then :
19328 gl_cv_type_off_t_64=yes
19329else
19330 gl_cv_type_off_t_64=no
f199cab1 19331fi
5476a9a4 19332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34119902 19333
5476a9a4
GM
19334fi
19335{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
19336$as_echo "$gl_cv_type_off_t_64" >&6; }
19337 if test $gl_cv_type_off_t_64 = no; then
19338 WINDOWS_64_BIT_OFF_T=1
19339 else
19340 WINDOWS_64_BIT_OFF_T=0
19341 fi
19342 WINDOWS_64_BIT_ST_SIZE=1
19343 ;;
19344 *)
19345 WINDOWS_64_BIT_OFF_T=0
19346 WINDOWS_64_BIT_ST_SIZE=0
19347 ;;
19348 esac
34119902
GM
19349
19350
34119902
GM
19351
19352
283c7aed
GM
19353 GNULIB_FFSL=0;
19354 GNULIB_FFSLL=0;
19355 GNULIB_MEMCHR=0;
19356 GNULIB_MEMMEM=0;
19357 GNULIB_MEMPCPY=0;
19358 GNULIB_MEMRCHR=0;
19359 GNULIB_RAWMEMCHR=0;
19360 GNULIB_STPCPY=0;
19361 GNULIB_STPNCPY=0;
19362 GNULIB_STRCHRNUL=0;
19363 GNULIB_STRDUP=0;
19364 GNULIB_STRNCAT=0;
19365 GNULIB_STRNDUP=0;
19366 GNULIB_STRNLEN=0;
19367 GNULIB_STRPBRK=0;
19368 GNULIB_STRSEP=0;
19369 GNULIB_STRSTR=0;
19370 GNULIB_STRCASESTR=0;
19371 GNULIB_STRTOK_R=0;
19372 GNULIB_MBSLEN=0;
19373 GNULIB_MBSNLEN=0;
19374 GNULIB_MBSCHR=0;
19375 GNULIB_MBSRCHR=0;
19376 GNULIB_MBSSTR=0;
19377 GNULIB_MBSCASECMP=0;
19378 GNULIB_MBSNCASECMP=0;
19379 GNULIB_MBSPCASECMP=0;
19380 GNULIB_MBSCASESTR=0;
19381 GNULIB_MBSCSPN=0;
19382 GNULIB_MBSPBRK=0;
19383 GNULIB_MBSSPN=0;
19384 GNULIB_MBSSEP=0;
19385 GNULIB_MBSTOK_R=0;
19386 GNULIB_STRERROR=0;
19387 GNULIB_STRERROR_R=0;
19388 GNULIB_STRSIGNAL=0;
19389 GNULIB_STRVERSCMP=0;
19390 HAVE_MBSLEN=0;
19391 HAVE_FFSL=1;
19392 HAVE_FFSLL=1;
19393 HAVE_MEMCHR=1;
19394 HAVE_DECL_MEMMEM=1;
19395 HAVE_MEMPCPY=1;
19396 HAVE_DECL_MEMRCHR=1;
19397 HAVE_RAWMEMCHR=1;
19398 HAVE_STPCPY=1;
19399 HAVE_STPNCPY=1;
19400 HAVE_STRCHRNUL=1;
19401 HAVE_DECL_STRDUP=1;
19402 HAVE_DECL_STRNDUP=1;
19403 HAVE_DECL_STRNLEN=1;
19404 HAVE_STRPBRK=1;
19405 HAVE_STRSEP=1;
19406 HAVE_STRCASESTR=1;
19407 HAVE_DECL_STRTOK_R=1;
19408 HAVE_DECL_STRERROR_R=1;
19409 HAVE_DECL_STRSIGNAL=1;
19410 HAVE_STRVERSCMP=1;
19411 REPLACE_MEMCHR=0;
19412 REPLACE_MEMMEM=0;
19413 REPLACE_STPNCPY=0;
19414 REPLACE_STRDUP=0;
19415 REPLACE_STRSTR=0;
19416 REPLACE_STRCASESTR=0;
19417 REPLACE_STRCHRNUL=0;
19418 REPLACE_STRERROR=0;
19419 REPLACE_STRERROR_R=0;
19420 REPLACE_STRNCAT=0;
19421 REPLACE_STRNDUP=0;
19422 REPLACE_STRNLEN=0;
19423 REPLACE_STRSIGNAL=0;
19424 REPLACE_STRTOK_R=0;
19425 UNDEFINE_STRTOK_R=0;
19426
19427ac_fn_c_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default"
19428if test "x$ac_cv_have_decl_memrchr" = x""yes; then :
19429 ac_have_decl=1
19430else
19431 ac_have_decl=0
19432fi
19433
19434cat >>confdefs.h <<_ACEOF
19435#define HAVE_DECL_MEMRCHR $ac_have_decl
19436_ACEOF
19437
19438
5476a9a4
GM
19439 GNULIB_MKTIME=0;
19440 GNULIB_NANOSLEEP=0;
19441 GNULIB_STRPTIME=0;
19442 GNULIB_TIMEGM=0;
19443 GNULIB_TIME_R=0;
19444 HAVE_DECL_LOCALTIME_R=1;
19445 HAVE_NANOSLEEP=1;
19446 HAVE_STRPTIME=1;
19447 HAVE_TIMEGM=1;
19448 REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
19449 REPLACE_MKTIME=GNULIB_PORTCHECK;
19450 REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
19451 REPLACE_TIMEGM=GNULIB_PORTCHECK;
34119902 19452
2393bc74
GM
19453ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default"
19454if test "x$ac_cv_have_decl_alarm" = x""yes; then :
19455 ac_have_decl=1
19456else
19457 ac_have_decl=0
19458fi
3e0be4ab 19459
2393bc74
GM
19460cat >>confdefs.h <<_ACEOF
19461#define HAVE_DECL_ALARM $ac_have_decl
19462_ACEOF
3e0be4ab
GM
19463
19464
5476a9a4
GM
19465 GNULIB_PSELECT=0;
19466 GNULIB_SELECT=0;
19467 HAVE_PSELECT=1;
19468 REPLACE_PSELECT=0;
19469 REPLACE_SELECT=0;
19470
19471
3e0be4ab 19472
5476a9a4
GM
19473
19474
19475
19476 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/select.h> is self-contained" >&5
19477$as_echo_n "checking whether <sys/select.h> is self-contained... " >&6; }
19478if test "${gl_cv_header_sys_select_h_selfcontained+set}" = set; then :
f199cab1 19479 $as_echo_n "(cached) " >&6
3e0be4ab 19480else
5476a9a4
GM
19481
19482 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3e0be4ab 19483/* end confdefs.h. */
5476a9a4 19484#include <sys/select.h>
3e0be4ab
GM
19485int
19486main ()
19487{
5476a9a4 19488struct timeval b;
3e0be4ab
GM
19489 ;
19490 return 0;
19491}
34119902 19492_ACEOF
f199cab1 19493if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4 19494 gl_cv_header_sys_select_h_selfcontained=yes
3e0be4ab 19495else
5476a9a4 19496 gl_cv_header_sys_select_h_selfcontained=no
3e0be4ab 19497fi
f199cab1 19498rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5476a9a4
GM
19499 if test $gl_cv_header_sys_select_h_selfcontained = yes; then
19500 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19501/* end confdefs.h. */
19502#include <sys/select.h>
19503int
19504main ()
19505{
19506int memset; int bzero;
19507 ;
19508 return 0;
19509}
3e0be4ab 19510
5476a9a4
GM
19511_ACEOF
19512if ac_fn_c_try_compile "$LINENO"; then :
f199cab1
GM
19513 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19514/* end confdefs.h. */
5476a9a4 19515#include <sys/select.h>
f199cab1
GM
19516int
19517main ()
19518{
5476a9a4
GM
19519
19520 #undef memset
19521 #define memset nonexistent_memset
19522 extern
19523 #ifdef __cplusplus
19524 "C"
19525 #endif
19526 void *memset (void *, int, unsigned long);
19527 #undef bzero
19528 #define bzero nonexistent_bzero
19529 extern
19530 #ifdef __cplusplus
19531 "C"
19532 #endif
19533 void bzero (void *, unsigned long);
19534 fd_set fds;
19535 FD_ZERO (&fds);
19536
f199cab1
GM
19537 ;
19538 return 0;
19539}
5476a9a4 19540
f199cab1 19541_ACEOF
5476a9a4
GM
19542if ac_fn_c_try_link "$LINENO"; then :
19543
f199cab1 19544else
5476a9a4 19545 gl_cv_header_sys_select_h_selfcontained=no
f199cab1 19546fi
5476a9a4
GM
19547rm -f core conftest.err conftest.$ac_objext \
19548 conftest$ac_exeext conftest.$ac_ext
1fd182f0 19549
f199cab1 19550fi
5476a9a4
GM
19551rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19552 fi
1fd182f0 19553
f199cab1 19554fi
5476a9a4
GM
19555{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_select_h_selfcontained" >&5
19556$as_echo "$gl_cv_header_sys_select_h_selfcontained" >&6; }
1fd182f0
PE
19557
19558
b06b1098 19559
0eb775a3
GM
19560
19561
b06b1098 19562
1fd182f0 19563
1fd182f0 19564
5476a9a4
GM
19565
19566 if test $gl_cv_have_include_next = yes; then
19567 gl_cv_next_sys_select_h='<'sys/select.h'>'
19568 else
19569 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/select.h>" >&5
19570$as_echo_n "checking absolute name of <sys/select.h>... " >&6; }
19571if test "${gl_cv_next_sys_select_h+set}" = set; then :
f199cab1 19572 $as_echo_n "(cached) " >&6
3e0be4ab 19573else
1fd182f0 19574
5476a9a4
GM
19575 if test $ac_cv_header_sys_select_h = yes; then
19576
19577
19578 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19579/* end confdefs.h. */
19580#include <sys/select.h>
19581
19582_ACEOF
19583 case "$host_os" in
19584 aix*) gl_absname_cpp="$ac_cpp -C" ;;
19585 *) gl_absname_cpp="$ac_cpp" ;;
19586 esac
19587
19588 case "$host_os" in
19589 mingw*)
19590 gl_dirsep_regex='[/\\]'
19591 ;;
19592 *)
19593 gl_dirsep_regex='\/'
19594 ;;
19595 esac
19596 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
19597
19598 gl_header_literal_regex=`echo 'sys/select.h' \
19599 | sed -e "$gl_make_literal_regex_sed"`
19600 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19601 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19602 s|^/[^/]|//&|
19603 p
19604 q
19605 }'
19606 gl_cv_next_sys_select_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19607 sed -n "$gl_absolute_header_sed"`'"'
19608 else
19609 gl_cv_next_sys_select_h='<'sys/select.h'>'
19610 fi
1fd182f0 19611
3e0be4ab 19612
1f5d53eb 19613fi
5476a9a4
GM
19614{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_select_h" >&5
19615$as_echo "$gl_cv_next_sys_select_h" >&6; }
19616 fi
19617 NEXT_SYS_SELECT_H=$gl_cv_next_sys_select_h
1fd182f0 19618
5476a9a4
GM
19619 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19620 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19621 gl_next_as_first_directive='<'sys/select.h'>'
19622 else
19623 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19624 gl_next_as_first_directive=$gl_cv_next_sys_select_h
19625 fi
19626 NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H=$gl_next_as_first_directive
1fd182f0
PE
19627
19628
5476a9a4
GM
19629
19630
19631 if test $ac_cv_header_sys_select_h = yes; then
19632 HAVE_SYS_SELECT_H=1
19633 else
19634 HAVE_SYS_SELECT_H=0
19635 fi
19636
19637
19638
19639
19640
19641 if test $ac_cv_header_sys_socket_h != yes; then
19642 for ac_header in winsock2.h
19643do :
19644 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
19645if test "x$ac_cv_header_winsock2_h" = x""yes; then :
19646 cat >>confdefs.h <<_ACEOF
19647#define HAVE_WINSOCK2_H 1
f199cab1 19648_ACEOF
5476a9a4 19649
f199cab1 19650fi
3e0be4ab 19651
5476a9a4 19652done
3e0be4ab 19653
5476a9a4
GM
19654 fi
19655 if test "$ac_cv_header_winsock2_h" = yes; then
19656 HAVE_WINSOCK2_H=1
19657 UNISTD_H_HAVE_WINSOCK2_H=1
19658 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
19659 else
19660 HAVE_WINSOCK2_H=0
19661 fi
f199cab1 19662
f199cab1 19663
f199cab1 19664
f199cab1 19665
3e0be4ab 19666
3e0be4ab 19667
3e0be4ab 19668
3e0be4ab 19669
5476a9a4
GM
19670 GNULIB_PTHREAD_SIGMASK=0;
19671 GNULIB_RAISE=0;
19672 GNULIB_SIGNAL_H_SIGPIPE=0;
19673 GNULIB_SIGPROCMASK=0;
19674 GNULIB_SIGACTION=0;
19675 HAVE_POSIX_SIGNALBLOCKING=1;
19676 HAVE_PTHREAD_SIGMASK=1;
19677 HAVE_RAISE=1;
19678 HAVE_SIGSET_T=1;
19679 HAVE_SIGINFO_T=1;
19680 HAVE_SIGACTION=1;
19681 HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
19682
19683 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
f199cab1 19684
5476a9a4
GM
19685 HAVE_SIGHANDLER_T=1;
19686 REPLACE_PTHREAD_SIGMASK=0;
19687 REPLACE_RAISE=0;
1f5d53eb 19688
1fd182f0 19689
b06b1098 19690
1fd182f0 19691
3e0be4ab
GM
19692
19693
f077f61d 19694
5476a9a4
GM
19695 ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
19696 #include <signal.h>
19697 /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
19698 #include <sys/types.h>
19699
19700"
19701if test "x$ac_cv_type_sigset_t" = x""yes; then :
19702
19703cat >>confdefs.h <<_ACEOF
19704#define HAVE_SIGSET_T 1
f199cab1 19705_ACEOF
3e0be4ab 19706
5476a9a4
GM
19707gl_cv_type_sigset_t=yes
19708else
19709 gl_cv_type_sigset_t=no
f199cab1 19710fi
3e0be4ab 19711
5476a9a4
GM
19712 if test $gl_cv_type_sigset_t != yes; then
19713 HAVE_SIGSET_T=0
19714 fi
3e0be4ab 19715
1f5d53eb 19716
3e0be4ab 19717
5476a9a4
GM
19718 if test $ac_cv_header_sys_socket_h = no; then
19719 for ac_header in ws2tcpip.h
19720do :
19721 ac_fn_c_check_header_mongrel "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default"
19722if test "x$ac_cv_header_ws2tcpip_h" = x""yes; then :
19723 cat >>confdefs.h <<_ACEOF
19724#define HAVE_WS2TCPIP_H 1
19725_ACEOF
3e0be4ab 19726
5476a9a4 19727fi
3e0be4ab 19728
5476a9a4
GM
19729done
19730
19731 fi
19732
19733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
19734$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
19735if test "${ac_cv_header_stdbool_h+set}" = set; then :
19736 $as_echo_n "(cached) " >&6
19737else
19738 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19739/* end confdefs.h. */
1f5d53eb 19740
5476a9a4
GM
19741 #include <stdbool.h>
19742 #ifndef bool
19743 "error: bool is not defined"
19744 #endif
19745 #ifndef false
19746 "error: false is not defined"
19747 #endif
19748 #if false
19749 "error: false is not 0"
19750 #endif
19751 #ifndef true
19752 "error: true is not defined"
19753 #endif
19754 #if true != 1
19755 "error: true is not 1"
19756 #endif
19757 #ifndef __bool_true_false_are_defined
19758 "error: __bool_true_false_are_defined is not defined"
19759 #endif
19760
19761 struct s { _Bool s: 1; _Bool t; } s;
19762
19763 char a[true == 1 ? 1 : -1];
19764 char b[false == 0 ? 1 : -1];
19765 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
19766 char d[(bool) 0.5 == true ? 1 : -1];
19767 /* See body of main program for 'e'. */
19768 char f[(_Bool) 0.0 == false ? 1 : -1];
19769 char g[true];
19770 char h[sizeof (_Bool)];
19771 char i[sizeof s.t];
19772 enum { j = false, k = true, l = false * true, m = true * 256 };
19773 /* The following fails for
19774 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
19775 _Bool n[m];
19776 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
19777 char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
19778 /* Catch a bug in an HP-UX C compiler. See
19779 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
19780 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
19781 */
19782 _Bool q = true;
19783 _Bool *pq = &q;
1ebc9c87
GM
19784
19785int
19786main ()
19787{
f199cab1 19788
5476a9a4
GM
19789 bool e = &s;
19790 *pq |= q;
19791 *pq |= ! q;
19792 /* Refer to every declared value, to avoid compiler optimizations. */
19793 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
19794 + !m + !n + !o + !p + !q + !pq);
f199cab1 19795
5476a9a4 19796 ;
1ebc9c87
GM
19797 return 0;
19798}
19799_ACEOF
5476a9a4
GM
19800if ac_fn_c_try_compile "$LINENO"; then :
19801 ac_cv_header_stdbool_h=yes
1ebc9c87 19802else
5476a9a4 19803 ac_cv_header_stdbool_h=no
1ebc9c87 19804fi
5476a9a4 19805rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1ebc9c87 19806fi
5476a9a4
GM
19807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
19808$as_echo "$ac_cv_header_stdbool_h" >&6; }
19809 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
19810if test "x$ac_cv_type__Bool" = x""yes; then :
1ebc9c87 19811
5476a9a4
GM
19812cat >>confdefs.h <<_ACEOF
19813#define HAVE__BOOL 1
19814_ACEOF
1ebc9c87 19815
1ebc9c87
GM
19816
19817fi
19818
1ebc9c87 19819
1ebc9c87 19820
5476a9a4
GM
19821 REPLACE_NULL=0;
19822 HAVE_WCHAR_T=1;
19823
19824
19825 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
19826$as_echo_n "checking for wchar_t... " >&6; }
19827if test "${gt_cv_c_wchar_t+set}" = set; then :
19828 $as_echo_n "(cached) " >&6
19829else
19830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19831/* end confdefs.h. */
19832#include <stddef.h>
19833 wchar_t foo = (wchar_t)'\0';
19834int
19835main ()
19836{
19837
19838 ;
19839 return 0;
19840}
19841_ACEOF
19842if ac_fn_c_try_compile "$LINENO"; then :
19843 gt_cv_c_wchar_t=yes
19844else
19845 gt_cv_c_wchar_t=no
19846fi
19847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1ebc9c87 19848fi
5476a9a4
GM
19849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
19850$as_echo "$gt_cv_c_wchar_t" >&6; }
19851 if test $gt_cv_c_wchar_t = yes; then
1ebc9c87 19852
5476a9a4
GM
19853$as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
19854
19855 fi
19856
19857
19858 GNULIB_DPRINTF=0;
19859 GNULIB_FCLOSE=0;
19860 GNULIB_FDOPEN=0;
19861 GNULIB_FFLUSH=0;
19862 GNULIB_FGETC=0;
19863 GNULIB_FGETS=0;
19864 GNULIB_FOPEN=0;
19865 GNULIB_FPRINTF=0;
19866 GNULIB_FPRINTF_POSIX=0;
19867 GNULIB_FPURGE=0;
19868 GNULIB_FPUTC=0;
19869 GNULIB_FPUTS=0;
19870 GNULIB_FREAD=0;
19871 GNULIB_FREOPEN=0;
19872 GNULIB_FSCANF=0;
19873 GNULIB_FSEEK=0;
19874 GNULIB_FSEEKO=0;
19875 GNULIB_FTELL=0;
19876 GNULIB_FTELLO=0;
19877 GNULIB_FWRITE=0;
19878 GNULIB_GETC=0;
19879 GNULIB_GETCHAR=0;
19880 GNULIB_GETDELIM=0;
19881 GNULIB_GETLINE=0;
19882 GNULIB_OBSTACK_PRINTF=0;
19883 GNULIB_OBSTACK_PRINTF_POSIX=0;
19884 GNULIB_PCLOSE=0;
19885 GNULIB_PERROR=0;
19886 GNULIB_POPEN=0;
19887 GNULIB_PRINTF=0;
19888 GNULIB_PRINTF_POSIX=0;
19889 GNULIB_PUTC=0;
19890 GNULIB_PUTCHAR=0;
19891 GNULIB_PUTS=0;
19892 GNULIB_REMOVE=0;
19893 GNULIB_RENAME=0;
19894 GNULIB_RENAMEAT=0;
19895 GNULIB_SCANF=0;
19896 GNULIB_SNPRINTF=0;
19897 GNULIB_SPRINTF_POSIX=0;
19898 GNULIB_STDIO_H_NONBLOCKING=0;
19899 GNULIB_STDIO_H_SIGPIPE=0;
19900 GNULIB_TMPFILE=0;
19901 GNULIB_VASPRINTF=0;
19902 GNULIB_VFSCANF=0;
19903 GNULIB_VSCANF=0;
19904 GNULIB_VDPRINTF=0;
19905 GNULIB_VFPRINTF=0;
19906 GNULIB_VFPRINTF_POSIX=0;
19907 GNULIB_VPRINTF=0;
19908 GNULIB_VPRINTF_POSIX=0;
19909 GNULIB_VSNPRINTF=0;
19910 GNULIB_VSPRINTF_POSIX=0;
19911 HAVE_DECL_FPURGE=1;
19912 HAVE_DECL_FSEEKO=1;
19913 HAVE_DECL_FTELLO=1;
19914 HAVE_DECL_GETDELIM=1;
19915 HAVE_DECL_GETLINE=1;
19916 HAVE_DECL_OBSTACK_PRINTF=1;
19917 HAVE_DECL_SNPRINTF=1;
19918 HAVE_DECL_VSNPRINTF=1;
19919 HAVE_DPRINTF=1;
19920 HAVE_FSEEKO=1;
19921 HAVE_FTELLO=1;
19922 HAVE_PCLOSE=1;
19923 HAVE_POPEN=1;
19924 HAVE_RENAMEAT=1;
19925 HAVE_VASPRINTF=1;
19926 HAVE_VDPRINTF=1;
19927 REPLACE_DPRINTF=0;
19928 REPLACE_FCLOSE=0;
19929 REPLACE_FDOPEN=0;
19930 REPLACE_FFLUSH=0;
19931 REPLACE_FOPEN=0;
19932 REPLACE_FPRINTF=0;
19933 REPLACE_FPURGE=0;
19934 REPLACE_FREOPEN=0;
19935 REPLACE_FSEEK=0;
19936 REPLACE_FSEEKO=0;
19937 REPLACE_FTELL=0;
19938 REPLACE_FTELLO=0;
19939 REPLACE_GETDELIM=0;
19940 REPLACE_GETLINE=0;
19941 REPLACE_OBSTACK_PRINTF=0;
19942 REPLACE_PERROR=0;
19943 REPLACE_POPEN=0;
19944 REPLACE_PRINTF=0;
19945 REPLACE_REMOVE=0;
19946 REPLACE_RENAME=0;
19947 REPLACE_RENAMEAT=0;
19948 REPLACE_SNPRINTF=0;
19949 REPLACE_SPRINTF=0;
19950 REPLACE_STDIO_READ_FUNCS=0;
19951 REPLACE_STDIO_WRITE_FUNCS=0;
19952 REPLACE_TMPFILE=0;
19953 REPLACE_VASPRINTF=0;
19954 REPLACE_VDPRINTF=0;
19955 REPLACE_VFPRINTF=0;
19956 REPLACE_VPRINTF=0;
19957 REPLACE_VSNPRINTF=0;
19958 REPLACE_VSPRINTF=0;
1ebc9c87 19959
5476a9a4
GM
19960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
19961$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
19962if test "${ac_cv_struct_tm+set}" = set; then :
1ebc9c87
GM
19963 $as_echo_n "(cached) " >&6
19964else
5476a9a4 19965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1ebc9c87 19966/* end confdefs.h. */
5476a9a4
GM
19967#include <sys/types.h>
19968#include <time.h>
1ebc9c87
GM
19969
19970int
19971main ()
19972{
5476a9a4
GM
19973struct tm tm;
19974 int *p = &tm.tm_sec;
19975 return !p;
1ebc9c87
GM
19976 ;
19977 return 0;
19978}
19979_ACEOF
5476a9a4
GM
19980if ac_fn_c_try_compile "$LINENO"; then :
19981 ac_cv_struct_tm=time.h
1ebc9c87 19982else
5476a9a4 19983 ac_cv_struct_tm=sys/time.h
1ebc9c87 19984fi
5476a9a4 19985rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1ebc9c87 19986fi
5476a9a4
GM
19987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
19988$as_echo "$ac_cv_struct_tm" >&6; }
19989if test $ac_cv_struct_tm = sys/time.h; then
1ebc9c87 19990
5476a9a4 19991$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
1ebc9c87 19992
1ebc9c87
GM
19993fi
19994
5476a9a4
GM
19995ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
19996#include <$ac_cv_struct_tm>
1fd182f0 19997
5476a9a4
GM
19998"
19999if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
1fd182f0 20000
5476a9a4
GM
20001cat >>confdefs.h <<_ACEOF
20002#define HAVE_STRUCT_TM_TM_ZONE 1
f199cab1 20003_ACEOF
5476a9a4
GM
20004
20005
1f5d53eb 20006fi
1fd182f0 20007
5476a9a4 20008if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
1f5d53eb 20009
5476a9a4 20010$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
1fd182f0 20011
5476a9a4
GM
20012else
20013 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
20014"
20015if test "x$ac_cv_have_decl_tzname" = x""yes; then :
20016 ac_have_decl=1
20017else
20018 ac_have_decl=0
20019fi
1fd182f0 20020
5476a9a4
GM
20021cat >>confdefs.h <<_ACEOF
20022#define HAVE_DECL_TZNAME $ac_have_decl
20023_ACEOF
f199cab1 20024
5476a9a4
GM
20025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
20026$as_echo_n "checking for tzname... " >&6; }
20027if test "${ac_cv_var_tzname+set}" = set; then :
f199cab1 20028 $as_echo_n "(cached) " >&6
3e0be4ab 20029else
5476a9a4 20030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 20031/* end confdefs.h. */
5476a9a4
GM
20032#include <time.h>
20033#if !HAVE_DECL_TZNAME
20034extern char *tzname[];
f199cab1 20035#endif
5476a9a4 20036
f199cab1
GM
20037int
20038main ()
20039{
5476a9a4 20040return tzname[0][0];
f199cab1
GM
20041 ;
20042 return 0;
20043}
3e0be4ab 20044_ACEOF
f199cab1 20045if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 20046 ac_cv_var_tzname=yes
3e0be4ab 20047else
5476a9a4 20048 ac_cv_var_tzname=no
f199cab1
GM
20049fi
20050rm -f core conftest.err conftest.$ac_objext \
20051 conftest$ac_exeext conftest.$ac_ext
f199cab1 20052fi
5476a9a4
GM
20053{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
20054$as_echo "$ac_cv_var_tzname" >&6; }
20055 if test $ac_cv_var_tzname = yes; then
20056
20057$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
f199cab1 20058
5476a9a4 20059 fi
3e0be4ab 20060fi
cc322c06 20061
5476a9a4
GM
20062
20063 ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include <time.h>
20064"
20065if test "x$ac_cv_member_struct_tm_tm_gmtoff" = x""yes; then :
20066
20067$as_echo "#define HAVE_TM_GMTOFF 1" >>confdefs.h
cc322c06 20068
f199cab1 20069fi
cc322c06 20070
1f5d53eb 20071
e275c824 20072
5476a9a4 20073
283c7aed
GM
20074
20075
20076
20077
20078
20079
20080
20081
20082
20083 if test $gl_cv_have_include_next = yes; then
20084 gl_cv_next_string_h='<'string.h'>'
20085 else
20086 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
20087$as_echo_n "checking absolute name of <string.h>... " >&6; }
20088if test "${gl_cv_next_string_h+set}" = set; then :
20089 $as_echo_n "(cached) " >&6
20090else
20091
20092 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20093/* end confdefs.h. */
20094#include <string.h>
20095
20096_ACEOF
20097 case "$host_os" in
20098 aix*) gl_absname_cpp="$ac_cpp -C" ;;
20099 *) gl_absname_cpp="$ac_cpp" ;;
20100 esac
20101
20102 case "$host_os" in
20103 mingw*)
20104 gl_dirsep_regex='[/\\]'
20105 ;;
20106 *)
20107 gl_dirsep_regex='\/'
20108 ;;
20109 esac
20110 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
20111
20112 gl_header_literal_regex=`echo 'string.h' \
20113 | sed -e "$gl_make_literal_regex_sed"`
20114 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20115 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20116 s|^/[^/]|//&|
20117 p
20118 q
20119 }'
20120 gl_cv_next_string_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20121 sed -n "$gl_absolute_header_sed"`'"'
20122
20123
20124fi
20125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
20126$as_echo "$gl_cv_next_string_h" >&6; }
20127 fi
20128 NEXT_STRING_H=$gl_cv_next_string_h
20129
20130 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20131 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20132 gl_next_as_first_directive='<'string.h'>'
20133 else
20134 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20135 gl_next_as_first_directive=$gl_cv_next_string_h
20136 fi
20137 NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
20138
20139
20140
20141
20142
20143
20144
20145
20146
5476a9a4
GM
20147ac_fn_c_check_decl "$LINENO" "strtoimax" "ac_cv_have_decl_strtoimax" "$ac_includes_default"
20148if test "x$ac_cv_have_decl_strtoimax" = x""yes; then :
20149 ac_have_decl=1
3e0be4ab 20150else
5476a9a4 20151 ac_have_decl=0
3e0be4ab 20152fi
5476a9a4
GM
20153
20154cat >>confdefs.h <<_ACEOF
20155#define HAVE_DECL_STRTOIMAX $ac_have_decl
f199cab1 20156_ACEOF
e275c824
PE
20157
20158
5476a9a4
GM
20159
20160ac_fn_c_check_decl "$LINENO" "strtoumax" "ac_cv_have_decl_strtoumax" "$ac_includes_default"
20161if test "x$ac_cv_have_decl_strtoumax" = x""yes; then :
20162 ac_have_decl=1
20163else
20164 ac_have_decl=0
3e0be4ab 20165fi
e275c824 20166
5476a9a4
GM
20167cat >>confdefs.h <<_ACEOF
20168#define HAVE_DECL_STRTOUMAX $ac_have_decl
20169_ACEOF
e275c824
PE
20170
20171
2b1928b8 20172
5476a9a4
GM
20173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
20174$as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
20175if test "${ac_cv_header_stat_broken+set}" = set; then :
f199cab1 20176 $as_echo_n "(cached) " >&6
2b1928b8 20177else
5476a9a4
GM
20178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20179/* end confdefs.h. */
20180#include <sys/types.h>
20181#include <sys/stat.h>
2b1928b8 20182
5476a9a4
GM
20183#if defined S_ISBLK && defined S_IFDIR
20184extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
20185#endif
2b1928b8 20186
5476a9a4
GM
20187#if defined S_ISBLK && defined S_IFCHR
20188extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
20189#endif
0eb775a3 20190
5476a9a4
GM
20191#if defined S_ISLNK && defined S_IFREG
20192extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
20193#endif
20194
20195#if defined S_ISSOCK && defined S_IFREG
20196extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
20197#endif
0eb775a3 20198
5476a9a4
GM
20199_ACEOF
20200if ac_fn_c_try_compile "$LINENO"; then :
20201 ac_cv_header_stat_broken=no
f199cab1 20202else
5476a9a4 20203 ac_cv_header_stat_broken=yes
f199cab1 20204fi
5476a9a4 20205rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 20206fi
5476a9a4
GM
20207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
20208$as_echo "$ac_cv_header_stat_broken" >&6; }
20209if test $ac_cv_header_stat_broken = yes; then
0eb775a3 20210
5476a9a4 20211$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
0eb775a3 20212
5476a9a4 20213fi
0eb775a3
GM
20214
20215
20216
5476a9a4
GM
20217
20218
20219 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
20220$as_echo_n "checking for struct timespec in <time.h>... " >&6; }
20221if test "${gl_cv_sys_struct_timespec_in_time_h+set}" = set; then :
20222 $as_echo_n "(cached) " >&6
20223else
20224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3e0be4ab 20225/* end confdefs.h. */
5476a9a4 20226#include <time.h>
52724a05 20227
3e0be4ab
GM
20228int
20229main ()
20230{
5476a9a4 20231static struct timespec x; x.tv_sec = x.tv_nsec;
3e0be4ab
GM
20232 ;
20233 return 0;
20234}
20235_ACEOF
5476a9a4
GM
20236if ac_fn_c_try_compile "$LINENO"; then :
20237 gl_cv_sys_struct_timespec_in_time_h=yes
3e0be4ab 20238else
5476a9a4 20239 gl_cv_sys_struct_timespec_in_time_h=no
3e0be4ab 20240fi
5476a9a4
GM
20241rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20242fi
20243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
20244$as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
52724a05 20245
5476a9a4
GM
20246 TIME_H_DEFINES_STRUCT_TIMESPEC=0
20247 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
20248 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
20249 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
20250 TIME_H_DEFINES_STRUCT_TIMESPEC=1
20251 else
20252 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
20253$as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
20254if test "${gl_cv_sys_struct_timespec_in_sys_time_h+set}" = set; then :
20255 $as_echo_n "(cached) " >&6
20256else
3e0be4ab
GM
20257 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20258/* end confdefs.h. */
5476a9a4
GM
20259#include <sys/time.h>
20260
3e0be4ab
GM
20261int
20262main ()
20263{
5476a9a4 20264static struct timespec x; x.tv_sec = x.tv_nsec;
3e0be4ab
GM
20265 ;
20266 return 0;
20267}
20268_ACEOF
5476a9a4
GM
20269if ac_fn_c_try_compile "$LINENO"; then :
20270 gl_cv_sys_struct_timespec_in_sys_time_h=yes
3e0be4ab 20271else
5476a9a4 20272 gl_cv_sys_struct_timespec_in_sys_time_h=no
3e0be4ab 20273fi
5476a9a4 20274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 20275fi
5476a9a4
GM
20276{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
20277$as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
20278 if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
20279 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
20280 else
20281 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
20282$as_echo_n "checking for struct timespec in <pthread.h>... " >&6; }
20283if test "${gl_cv_sys_struct_timespec_in_pthread_h+set}" = set; then :
3e0be4ab
GM
20284 $as_echo_n "(cached) " >&6
20285else
20286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20287/* end confdefs.h. */
5476a9a4
GM
20288#include <pthread.h>
20289
3e0be4ab
GM
20290int
20291main ()
20292{
5476a9a4 20293static struct timespec x; x.tv_sec = x.tv_nsec;
3e0be4ab
GM
20294 ;
20295 return 0;
20296}
20297_ACEOF
5476a9a4
GM
20298if ac_fn_c_try_compile "$LINENO"; then :
20299 gl_cv_sys_struct_timespec_in_pthread_h=yes
3e0be4ab 20300else
5476a9a4 20301 gl_cv_sys_struct_timespec_in_pthread_h=no
3e0be4ab 20302fi
5476a9a4 20303rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3e0be4ab 20304fi
5476a9a4
GM
20305{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
20306$as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
20307 if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
20308 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
20309 fi
20310 fi
f199cab1 20311 fi
e275c824
PE
20312
20313
b0415a03 20314
b0415a03 20315
e275c824 20316
e275c824
PE
20317
20318
f199cab1 20319
e275c824
PE
20320
20321
20322
20323
20324
20325
20326
5476a9a4
GM
20327 if test $gl_cv_have_include_next = yes; then
20328 gl_cv_next_time_h='<'time.h'>'
20329 else
20330 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
20331$as_echo_n "checking absolute name of <time.h>... " >&6; }
20332if test "${gl_cv_next_time_h+set}" = set; then :
20333 $as_echo_n "(cached) " >&6
20334else
e275c824 20335
5476a9a4
GM
20336 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20337/* end confdefs.h. */
20338#include <time.h>
e275c824 20339
5476a9a4
GM
20340_ACEOF
20341 case "$host_os" in
20342 aix*) gl_absname_cpp="$ac_cpp -C" ;;
20343 *) gl_absname_cpp="$ac_cpp" ;;
20344 esac
e275c824 20345
5476a9a4
GM
20346 case "$host_os" in
20347 mingw*)
20348 gl_dirsep_regex='[/\\]'
20349 ;;
20350 *)
20351 gl_dirsep_regex='\/'
20352 ;;
20353 esac
20354 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
e275c824 20355
5476a9a4
GM
20356 gl_header_literal_regex=`echo 'time.h' \
20357 | sed -e "$gl_make_literal_regex_sed"`
20358 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20359 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20360 s|^/[^/]|//&|
20361 p
20362 q
20363 }'
20364 gl_cv_next_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20365 sed -n "$gl_absolute_header_sed"`'"'
e275c824
PE
20366
20367
5476a9a4
GM
20368fi
20369{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
20370$as_echo "$gl_cv_next_time_h" >&6; }
20371 fi
20372 NEXT_TIME_H=$gl_cv_next_time_h
67342916 20373
5476a9a4
GM
20374 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20375 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20376 gl_next_as_first_directive='<'time.h'>'
f199cab1 20377 else
5476a9a4
GM
20378 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20379 gl_next_as_first_directive=$gl_cv_next_time_h
f199cab1 20380 fi
5476a9a4 20381 NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
4fda9c95
GM
20382
20383
52724a05
GM
20384
20385
20386
20387
20388
20389
20390
ae0d7250
PE
20391
20392
20393
cc322c06 20394
f199cab1 20395
b5591ebb
GM
20396ac_fn_c_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default"
20397if test "x$ac_cv_have_decl_unsetenv" = x""yes; then :
20398 ac_have_decl=1
20399else
20400 ac_have_decl=0
20401fi
20402
20403cat >>confdefs.h <<_ACEOF
20404#define HAVE_DECL_UNSETENV $ac_have_decl
20405_ACEOF
20406
cc322c06 20407
5476a9a4
GM
20408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the utimes function works" >&5
20409$as_echo_n "checking whether the utimes function works... " >&6; }
20410if test "${gl_cv_func_working_utimes+set}" = set; then :
20411 $as_echo_n "(cached) " >&6
20412else
1fd182f0 20413
5476a9a4
GM
20414 if test "$cross_compiling" = yes; then :
20415 gl_cv_func_working_utimes=no
20416else
20417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20418/* end confdefs.h. */
20419
20420#include <sys/types.h>
20421#include <sys/stat.h>
20422#include <fcntl.h>
20423#include <sys/time.h>
20424#include <time.h>
20425#include <unistd.h>
20426#include <stdlib.h>
20427#include <stdio.h>
20428#include <utime.h>
1fd182f0 20429
5476a9a4
GM
20430static int
20431inorder (time_t a, time_t b, time_t c)
20432{
20433 return a <= b && b <= c;
20434}
1fd182f0 20435
5476a9a4
GM
20436int
20437main ()
20438{
20439 int result = 0;
20440 char const *file = "conftest.utimes";
20441 static struct timeval timeval[2] = {{9, 10}, {999999, 999999}};
1fd182f0 20442
5476a9a4
GM
20443 /* Test whether utimes() essentially works. */
20444 {
20445 struct stat sbuf;
20446 FILE *f = fopen (file, "w");
20447 if (f == NULL)
20448 result |= 1;
20449 else if (fclose (f) != 0)
20450 result |= 1;
20451 else if (utimes (file, timeval) != 0)
20452 result |= 2;
20453 else if (lstat (file, &sbuf) != 0)
20454 result |= 1;
20455 else if (!(sbuf.st_atime == timeval[0].tv_sec
20456 && sbuf.st_mtime == timeval[1].tv_sec))
20457 result |= 4;
20458 if (unlink (file) != 0)
20459 result |= 1;
20460 }
1fd182f0 20461
5476a9a4
GM
20462 /* Test whether utimes() with a NULL argument sets the file's timestamp
20463 to the current time. Use 'fstat' as well as 'time' to
20464 determine the "current" time, to accommodate NFS file systems
20465 if there is a time skew between the host and the NFS server. */
20466 {
20467 int fd = open (file, O_WRONLY|O_CREAT, 0644);
20468 if (fd < 0)
20469 result |= 1;
20470 else
20471 {
20472 time_t t0, t2;
20473 struct stat st0, st1, st2;
20474 if (time (&t0) == (time_t) -1)
20475 result |= 1;
20476 else if (fstat (fd, &st0) != 0)
20477 result |= 1;
20478 else if (utimes (file, timeval) != 0)
20479 result |= 2;
20480 else if (utimes (file, NULL) != 0)
20481 result |= 8;
20482 else if (fstat (fd, &st1) != 0)
20483 result |= 1;
20484 else if (write (fd, "\n", 1) != 1)
20485 result |= 1;
20486 else if (fstat (fd, &st2) != 0)
20487 result |= 1;
20488 else if (time (&t2) == (time_t) -1)
20489 result |= 1;
20490 else
20491 {
20492 int m_ok_POSIX = inorder (t0, st1.st_mtime, t2);
20493 int m_ok_NFS = inorder (st0.st_mtime, st1.st_mtime, st2.st_mtime);
20494 if (! (st1.st_atime == st1.st_mtime))
20495 result |= 16;
20496 if (! (m_ok_POSIX || m_ok_NFS))
20497 result |= 32;
20498 }
20499 if (close (fd) != 0)
20500 result |= 1;
20501 }
20502 if (unlink (file) != 0)
20503 result |= 1;
20504 }
52724a05 20505
5476a9a4
GM
20506 /* Test whether utimes() with a NULL argument works on read-only files. */
20507 {
20508 int fd = open (file, O_WRONLY|O_CREAT, 0444);
20509 if (fd < 0)
20510 result |= 1;
20511 else if (close (fd) != 0)
20512 result |= 1;
20513 else if (utimes (file, NULL) != 0)
20514 result |= 64;
20515 if (unlink (file) != 0)
20516 result |= 1;
20517 }
1fd182f0 20518
5476a9a4
GM
20519 return result;
20520}
1fd182f0 20521
5476a9a4
GM
20522_ACEOF
20523if ac_fn_c_try_run "$LINENO"; then :
20524 gl_cv_func_working_utimes=yes
20525else
20526 gl_cv_func_working_utimes=no
20527fi
20528rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20529 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1 20530fi
1fd182f0 20531
5476a9a4
GM
20532fi
20533{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_utimes" >&5
20534$as_echo "$gl_cv_func_working_utimes" >&6; }
1fd182f0 20535
5476a9a4 20536 if test $gl_cv_func_working_utimes = yes; then
1fd182f0 20537
5476a9a4 20538$as_echo "#define HAVE_WORKING_UTIMES 1" >>confdefs.h
1fd182f0 20539
5476a9a4 20540 fi
1fd182f0 20541
1fd182f0 20542
1fd182f0 20543
1fd182f0 20544
1fd182f0 20545
5476a9a4
GM
20546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct utimbuf" >&5
20547$as_echo_n "checking for struct utimbuf... " >&6; }
20548if test "${gl_cv_sys_struct_utimbuf+set}" = set; then :
20549 $as_echo_n "(cached) " >&6
20550else
20551 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20552/* end confdefs.h. */
20553#if HAVE_SYS_TIME_H
20554 #include <sys/time.h>
20555 #endif
20556 #include <time.h>
20557 #ifdef HAVE_UTIME_H
20558 #include <utime.h>
20559 #endif
1fd182f0 20560
5476a9a4
GM
20561int
20562main ()
20563{
20564static struct utimbuf x; x.actime = x.modtime;
20565 ;
20566 return 0;
20567}
20568_ACEOF
20569if ac_fn_c_try_compile "$LINENO"; then :
20570 gl_cv_sys_struct_utimbuf=yes
20571else
20572 gl_cv_sys_struct_utimbuf=no
f199cab1 20573fi
5476a9a4 20574rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 20575fi
5476a9a4
GM
20576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_utimbuf" >&5
20577$as_echo "$gl_cv_sys_struct_utimbuf" >&6; }
1fd182f0 20578
5476a9a4 20579 if test $gl_cv_sys_struct_utimbuf = yes; then
1fd182f0 20580
5476a9a4 20581$as_echo "#define HAVE_STRUCT_UTIMBUF 1" >>confdefs.h
1fd182f0 20582
5476a9a4 20583 fi
1fd182f0 20584
1fd182f0 20585
1fd182f0 20586
1fd182f0 20587
1fd182f0 20588
1fd182f0 20589
1fd182f0 20590
3e0be4ab 20591
f199cab1 20592
f199cab1 20593
067d23c9 20594
710f5812
GM
20595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking type of array argument to getgroups" >&5
20596$as_echo_n "checking type of array argument to getgroups... " >&6; }
20597if test "${ac_cv_type_getgroups+set}" = set; then :
20598 $as_echo_n "(cached) " >&6
20599else
20600 if test "$cross_compiling" = yes; then :
20601 ac_cv_type_getgroups=cross
20602else
20603 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20604/* end confdefs.h. */
20605/* Thanks to Mike Rendell for this test. */
20606$ac_includes_default
20607#define NGID 256
20608#undef MAX
20609#define MAX(x, y) ((x) > (y) ? (x) : (y))
20610
20611int
20612main ()
20613{
20614 gid_t gidset[NGID];
20615 int i, n;
20616 union { gid_t gval; long int lval; } val;
20617
20618 val.lval = -1;
20619 for (i = 0; i < NGID; i++)
20620 gidset[i] = val.gval;
20621 n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
20622 gidset);
20623 /* Exit non-zero if getgroups seems to require an array of ints. This
20624 happens when gid_t is short int but getgroups modifies an array
20625 of ints. */
20626 return n > 0 && gidset[n] != val.gval;
20627}
20628_ACEOF
20629if ac_fn_c_try_run "$LINENO"; then :
20630 ac_cv_type_getgroups=gid_t
20631else
20632 ac_cv_type_getgroups=int
20633fi
20634rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20635 conftest.$ac_objext conftest.beam conftest.$ac_ext
20636fi
20637
20638if test $ac_cv_type_getgroups = cross; then
20639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20640/* end confdefs.h. */
20641#include <unistd.h>
20642
20643_ACEOF
20644if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20645 $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then :
20646 ac_cv_type_getgroups=gid_t
20647else
20648 ac_cv_type_getgroups=int
20649fi
20650rm -f conftest*
20651
20652fi
20653fi
20654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_getgroups" >&5
20655$as_echo "$ac_cv_type_getgroups" >&6; }
20656
20657cat >>confdefs.h <<_ACEOF
20658#define GETGROUPS_T $ac_cv_type_getgroups
20659_ACEOF
20660
20661
20662
067d23c9 20663
5476a9a4
GM
20664 if false; then
20665 GL_COND_LIBTOOL_TRUE=
20666 GL_COND_LIBTOOL_FALSE='#'
20667else
20668 GL_COND_LIBTOOL_TRUE='#'
20669 GL_COND_LIBTOOL_FALSE=
1fd182f0 20670fi
067d23c9 20671
5476a9a4
GM
20672 gl_cond_libtool=false
20673 gl_libdeps=
20674 gl_ltlibdeps=
20675 gl_m4_base='m4'
067d23c9 20676
f199cab1 20677
f199cab1 20678
f199cab1 20679
067d23c9 20680
f199cab1 20681
f199cab1 20682
f199cab1 20683
067d23c9 20684
5476a9a4 20685 gl_source_base='lib'
cc322c06
GM
20686
20687
5476a9a4
GM
20688 if test $ac_cv_func_alloca_works = no; then
20689 :
f199cab1 20690 fi
cc322c06 20691
5476a9a4
GM
20692 # Define an additional variable used in the Makefile substitution.
20693 if test $ac_cv_working_alloca_h = yes; then
20694 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
20695$as_echo_n "checking for alloca as a compiler built-in... " >&6; }
20696if test "${gl_cv_rpl_alloca+set}" = set; then :
20697 $as_echo_n "(cached) " >&6
20698else
cc322c06 20699
5476a9a4
GM
20700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20701/* end confdefs.h. */
067d23c9 20702
5476a9a4
GM
20703#if defined __GNUC__ || defined _AIX || defined _MSC_VER
20704 Need own alloca
20705#endif
067d23c9 20706
f199cab1 20707_ACEOF
5476a9a4
GM
20708if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20709 $EGREP "Need own alloca" >/dev/null 2>&1; then :
20710 gl_cv_rpl_alloca=yes
20711else
20712 gl_cv_rpl_alloca=no
369e19fc 20713fi
5476a9a4 20714rm -f conftest*
067d23c9 20715
ae0d7250 20716
5476a9a4
GM
20717fi
20718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
20719$as_echo "$gl_cv_rpl_alloca" >&6; }
20720 if test $gl_cv_rpl_alloca = yes; then
52724a05 20721
5476a9a4 20722$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
ae0d7250 20723
5476a9a4
GM
20724 ALLOCA_H=alloca.h
20725 else
20726 ALLOCA_H=
20727 fi
f199cab1 20728 else
5476a9a4
GM
20729 ALLOCA_H=alloca.h
20730 fi
ae0d7250 20731
5476a9a4
GM
20732 if test -n "$ALLOCA_H"; then
20733 GL_GENERATE_ALLOCA_H_TRUE=
20734 GL_GENERATE_ALLOCA_H_FALSE='#'
20735else
20736 GL_GENERATE_ALLOCA_H_TRUE='#'
20737 GL_GENERATE_ALLOCA_H_FALSE=
20738fi
f199cab1 20739
ae0d7250
PE
20740
20741
20742
20743
20744
5476a9a4
GM
20745 # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
20746 # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
ae0d7250 20747
5476a9a4
GM
20748 # Save and restore LIBS so e.g., -lrt, isn't added to it. Otherwise, *all*
20749 # programs in the package would end up linked with that potentially-shared
20750 # library, inducing unnecessary run-time overhead.
20751 LIB_CLOCK_GETTIME=
ae0d7250 20752
5476a9a4
GM
20753 gl_saved_libs=$LIBS
20754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
20755$as_echo_n "checking for library containing clock_gettime... " >&6; }
20756if test "${ac_cv_search_clock_gettime+set}" = set; then :
20757 $as_echo_n "(cached) " >&6
20758else
20759 ac_func_search_save_LIBS=$LIBS
20760cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20761/* end confdefs.h. */
20762
20763/* Override any GCC internal prototype to avoid an error.
20764 Use char because int might match the return type of a GCC
20765 builtin and then its argument prototype would still apply. */
20766#ifdef __cplusplus
20767extern "C"
20768#endif
20769char clock_gettime ();
20770int
20771main ()
20772{
20773return clock_gettime ();
20774 ;
20775 return 0;
20776}
20777_ACEOF
20778for ac_lib in '' rt posix4; do
20779 if test -z "$ac_lib"; then
20780 ac_res="none required"
20781 else
20782 ac_res=-l$ac_lib
20783 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
20784 fi
20785 if ac_fn_c_try_link "$LINENO"; then :
20786 ac_cv_search_clock_gettime=$ac_res
f199cab1 20787fi
5476a9a4
GM
20788rm -f core conftest.err conftest.$ac_objext \
20789 conftest$ac_exeext
20790 if test "${ac_cv_search_clock_gettime+set}" = set; then :
20791 break
20792fi
20793done
20794if test "${ac_cv_search_clock_gettime+set}" = set; then :
ae0d7250 20795
5476a9a4
GM
20796else
20797 ac_cv_search_clock_gettime=no
20798fi
20799rm conftest.$ac_ext
20800LIBS=$ac_func_search_save_LIBS
20801fi
20802{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
20803$as_echo "$ac_cv_search_clock_gettime" >&6; }
20804ac_res=$ac_cv_search_clock_gettime
20805if test "$ac_res" != no; then :
20806 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20807 test "$ac_cv_search_clock_gettime" = "none required" ||
20808 LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime
20809fi
ae0d7250 20810
5476a9a4
GM
20811 for ac_func in clock_gettime clock_settime
20812do :
20813 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
20814ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
20815eval as_val=\$$as_ac_var
20816 if test "x$as_val" = x""yes; then :
20817 cat >>confdefs.h <<_ACEOF
20818#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
20819_ACEOF
ae0d7250 20820
d7ad186c
GM
20821fi
20822done
20823
20824 LIBS=$gl_saved_libs
20825
20826
20827 :
20828
20829
20830
20831cat >>confdefs.h <<_ACEOF
20832#define GNULIB_CLOSE_STREAM 1
20833_ACEOF
20834
20835
20836
20837
20838 :
20839
20840
20841
20842 :
20843
20844
20845
20846
20847
20848
20849
20850
20851
20852
20853
20854
20855
20856
20857
20858
20859
ae0d7250 20860
3e0be4ab 20861
d7ad186c
GM
20862 if test $gl_cv_have_include_next = yes; then
20863 gl_cv_next_dirent_h='<'dirent.h'>'
20864 else
20865 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5
20866$as_echo_n "checking absolute name of <dirent.h>... " >&6; }
20867if test "${gl_cv_next_dirent_h+set}" = set; then :
20868 $as_echo_n "(cached) " >&6
20869else
3e0be4ab 20870
d7ad186c 20871 if test $ac_cv_header_dirent_h = yes; then
3bf26e96
GM
20872
20873
d7ad186c
GM
20874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20875/* end confdefs.h. */
20876#include <dirent.h>
3bf26e96 20877
3bf26e96 20878_ACEOF
d7ad186c
GM
20879 case "$host_os" in
20880 aix*) gl_absname_cpp="$ac_cpp -C" ;;
20881 *) gl_absname_cpp="$ac_cpp" ;;
20882 esac
3bf26e96 20883
d7ad186c
GM
20884 case "$host_os" in
20885 mingw*)
20886 gl_dirsep_regex='[/\\]'
20887 ;;
20888 *)
20889 gl_dirsep_regex='\/'
20890 ;;
20891 esac
20892 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
3bf26e96 20893
d7ad186c
GM
20894 gl_header_literal_regex=`echo 'dirent.h' \
20895 | sed -e "$gl_make_literal_regex_sed"`
20896 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20897 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20898 s|^/[^/]|//&|
20899 p
20900 q
20901 }'
20902 gl_cv_next_dirent_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20903 sed -n "$gl_absolute_header_sed"`'"'
20904 else
20905 gl_cv_next_dirent_h='<'dirent.h'>'
20906 fi
3bf26e96 20907
3e0be4ab 20908
d7ad186c
GM
20909fi
20910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5
20911$as_echo "$gl_cv_next_dirent_h" >&6; }
20912 fi
20913 NEXT_DIRENT_H=$gl_cv_next_dirent_h
f199cab1 20914
d7ad186c
GM
20915 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20916 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20917 gl_next_as_first_directive='<'dirent.h'>'
20918 else
20919 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20920 gl_next_as_first_directive=$gl_cv_next_dirent_h
20921 fi
20922 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive
f199cab1 20923
3e0be4ab 20924
f199cab1 20925
f199cab1 20926
d7ad186c
GM
20927 if test $ac_cv_header_dirent_h = yes; then
20928 HAVE_DIRENT_H=1
20929 else
20930 HAVE_DIRENT_H=0
20931 fi
3e0be4ab 20932
f199cab1
GM
20933
20934
20935
5476a9a4
GM
20936
20937
20938
20939
20940
20941
5476a9a4
GM
20942$as_echo "#define HAVE_DUP2 1" >>confdefs.h
20943
20944
20945 if test $HAVE_DUP2 = 1; then
20946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
20947$as_echo_n "checking whether dup2 works... " >&6; }
20948if test "${gl_cv_func_dup2_works+set}" = set; then :
3e0be4ab
GM
20949 $as_echo_n "(cached) " >&6
20950else
5476a9a4
GM
20951 if test "$cross_compiling" = yes; then :
20952 case "$host_os" in
20953 mingw*) # on this platform, dup2 always returns 0 for success
20954 gl_cv_func_dup2_works="guessing no" ;;
20955 cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
20956 gl_cv_func_dup2_works="guessing no" ;;
20957 linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a
20958 # closed fd may yield -EBADF instead of -1 / errno=EBADF.
20959 gl_cv_func_dup2_works="guessing no" ;;
20960 freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF.
20961 gl_cv_func_dup2_works="guessing no" ;;
20962 haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
20963 gl_cv_func_dup2_works="guessing no" ;;
20964 *) gl_cv_func_dup2_works="guessing yes" ;;
20965 esac
20966else
20967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3e0be4ab 20968/* end confdefs.h. */
ae0d7250 20969
5476a9a4
GM
20970 #include <unistd.h>
20971#include <fcntl.h>
20972#include <errno.h>
3e0be4ab
GM
20973int
20974main ()
20975{
5476a9a4
GM
20976int result = 0;
20977#ifdef FD_CLOEXEC
20978 if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
20979 result |= 1;
20980#endif
20981 if (dup2 (1, 1) == 0)
20982 result |= 2;
20983#ifdef FD_CLOEXEC
20984 if (fcntl (1, F_GETFD) != FD_CLOEXEC)
20985 result |= 4;
20986#endif
20987 close (0);
20988 if (dup2 (0, 0) != -1)
20989 result |= 8;
20990 /* Many gnulib modules require POSIX conformance of EBADF. */
20991 if (dup2 (2, 1000000) == -1 && errno != EBADF)
20992 result |= 16;
0d1f53ad
GM
20993 /* Flush out a cygwin core dump. */
20994 if (dup2 (2, -1) != -1 || errno != EBADF)
20995 result |= 32;
5476a9a4
GM
20996 return result;
20997
ae0d7250
PE
20998 ;
20999 return 0;
21000}
5476a9a4 21001
ae0d7250 21002_ACEOF
5476a9a4
GM
21003if ac_fn_c_try_run "$LINENO"; then :
21004 gl_cv_func_dup2_works=yes
ae0d7250 21005else
5476a9a4 21006 gl_cv_func_dup2_works=no
ae0d7250 21007fi
5476a9a4
GM
21008rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21009 conftest.$ac_objext conftest.beam conftest.$ac_ext
ae0d7250 21010fi
5476a9a4
GM
21011
21012
3e0be4ab 21013fi
5476a9a4
GM
21014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
21015$as_echo "$gl_cv_func_dup2_works" >&6; }
21016 case "$gl_cv_func_dup2_works" in
21017 *yes) ;;
21018 *)
21019 REPLACE_DUP2=1
21020 ;;
21021 esac
21022 fi
3e0be4ab 21023
3e0be4ab 21024
a6342fc8 21025 if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
f199cab1 21026
f199cab1
GM
21027
21028
f199cab1 21029
f199cab1 21030
f199cab1 21031
f199cab1 21032
f199cab1 21033
5476a9a4 21034 gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
f199cab1
GM
21035
21036
a6342fc8 21037 fi
f199cab1 21038
f199cab1 21039
f199cab1 21040
f199cab1 21041
f199cab1 21042
5476a9a4 21043 GNULIB_DUP2=1
f199cab1
GM
21044
21045
f199cab1 21046
f199cab1 21047
3e0be4ab 21048
3e0be4ab 21049
f199cab1
GM
21050
21051
ae0d7250 21052
ae0d7250 21053
5476a9a4 21054
93131e11
GM
21055 GNULIB_ENVIRON=1
21056
21057
21058
21059
21060
21061
21062
21063
8966cbff
GM
21064 LIB_EXECINFO=''
21065 EXECINFO_H='execinfo.h'
21066
21067 if test $ac_cv_header_execinfo_h = yes; then
21068 gl_saved_libs=$LIBS
21069 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing backtrace_symbols_fd" >&5
21070$as_echo_n "checking for library containing backtrace_symbols_fd... " >&6; }
21071if test "${ac_cv_search_backtrace_symbols_fd+set}" = set; then :
21072 $as_echo_n "(cached) " >&6
21073else
21074 ac_func_search_save_LIBS=$LIBS
21075cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21076/* end confdefs.h. */
21077
21078/* Override any GCC internal prototype to avoid an error.
21079 Use char because int might match the return type of a GCC
21080 builtin and then its argument prototype would still apply. */
21081#ifdef __cplusplus
21082extern "C"
21083#endif
21084char backtrace_symbols_fd ();
21085int
21086main ()
21087{
21088return backtrace_symbols_fd ();
21089 ;
21090 return 0;
21091}
21092_ACEOF
21093for ac_lib in '' execinfo; do
21094 if test -z "$ac_lib"; then
21095 ac_res="none required"
21096 else
21097 ac_res=-l$ac_lib
21098 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
21099 fi
21100 if ac_fn_c_try_link "$LINENO"; then :
21101 ac_cv_search_backtrace_symbols_fd=$ac_res
21102fi
21103rm -f core conftest.err conftest.$ac_objext \
21104 conftest$ac_exeext
21105 if test "${ac_cv_search_backtrace_symbols_fd+set}" = set; then :
21106 break
21107fi
21108done
21109if test "${ac_cv_search_backtrace_symbols_fd+set}" = set; then :
21110
21111else
21112 ac_cv_search_backtrace_symbols_fd=no
21113fi
21114rm conftest.$ac_ext
21115LIBS=$ac_func_search_save_LIBS
21116fi
21117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_backtrace_symbols_fd" >&5
21118$as_echo "$ac_cv_search_backtrace_symbols_fd" >&6; }
21119ac_res=$ac_cv_search_backtrace_symbols_fd
21120if test "$ac_res" != no; then :
21121 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
21122 test "$ac_cv_search_backtrace_symbols_fd" = "none required" ||
21123 LIB_EXECINFO=$ac_cv_search_backtrace_symbols_fd
21124fi
21125
21126 LIBS=$gl_saved_libs
21127 test "$ac_cv_search_backtrace_symbols_fd" = no || EXECINFO_H=''
21128 fi
21129
21130 if test -n "$EXECINFO_H"; then
21131
21132
21133
21134
21135
21136
21137
21138
21139 gl_LIBOBJS="$gl_LIBOBJS execinfo.$ac_objext"
21140
21141 fi
21142
21143
21144
21145 if test -n "$EXECINFO_H"; then
21146 GL_GENERATE_EXECINFO_H_TRUE=
21147 GL_GENERATE_EXECINFO_H_FALSE='#'
21148else
21149 GL_GENERATE_EXECINFO_H_TRUE='#'
21150 GL_GENERATE_EXECINFO_H_FALSE=
21151fi
21152
21153
21154
21155
21156
93131e11
GM
21157
21158
21159
7cd2ed2c 21160
710f5812
GM
21161 if test $ac_cv_func_faccessat = no; then
21162 HAVE_FACCESSAT=0
21163 fi
21164
21165 if test $HAVE_FACCESSAT = 0; then
21166
21167
21168
21169
21170
21171
21172
21173
21174 gl_LIBOBJS="$gl_LIBOBJS faccessat.$ac_objext"
21175
21176
21177 for ac_func in access
21178do :
21179 ac_fn_c_check_func "$LINENO" "access" "ac_cv_func_access"
21180if test "x$ac_cv_func_access" = x""yes; then :
21181 cat >>confdefs.h <<_ACEOF
21182#define HAVE_ACCESS 1
21183_ACEOF
21184
21185fi
21186done
21187
21188
21189 fi
21190
21191
21192cat >>confdefs.h <<_ACEOF
21193#define GNULIB_FACCESSAT 1
21194_ACEOF
21195
21196
21197
21198
21199
21200
21201
21202 GNULIB_FACCESSAT=1
21203
21204
21205
21206
21207
21208
21209
21210
21211
21212
21213
21214
21215
21216
21217
21218
21219 if test $gl_cv_have_include_next = yes; then
21220 gl_cv_next_fcntl_h='<'fcntl.h'>'
21221 else
21222 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
21223$as_echo_n "checking absolute name of <fcntl.h>... " >&6; }
21224if test "${gl_cv_next_fcntl_h+set}" = set; then :
21225 $as_echo_n "(cached) " >&6
21226else
21227
21228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21229/* end confdefs.h. */
21230#include <fcntl.h>
21231
21232_ACEOF
21233 case "$host_os" in
21234 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21235 *) gl_absname_cpp="$ac_cpp" ;;
21236 esac
21237
21238 case "$host_os" in
21239 mingw*)
21240 gl_dirsep_regex='[/\\]'
21241 ;;
21242 *)
21243 gl_dirsep_regex='\/'
21244 ;;
21245 esac
21246 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21247
21248 gl_header_literal_regex=`echo 'fcntl.h' \
21249 | sed -e "$gl_make_literal_regex_sed"`
21250 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21251 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21252 s|^/[^/]|//&|
21253 p
21254 q
21255 }'
21256 gl_cv_next_fcntl_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21257 sed -n "$gl_absolute_header_sed"`'"'
21258
21259
21260fi
21261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
21262$as_echo "$gl_cv_next_fcntl_h" >&6; }
21263 fi
21264 NEXT_FCNTL_H=$gl_cv_next_fcntl_h
21265
21266 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21267 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21268 gl_next_as_first_directive='<'fcntl.h'>'
21269 else
21270 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21271 gl_next_as_first_directive=$gl_cv_next_fcntl_h
21272 fi
21273 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
21274
21275
21276
21277
21278
21279
21280
21281
21282
21283
21284
21285
21286
21287
21288
2407788f
GM
21289 LIB_FDATASYNC=
21290
21291
21292 if test $ac_cv_have_decl_fdatasync = no; then
21293 HAVE_DECL_FDATASYNC=0
21294 for ac_func in fdatasync
21295do :
21296 ac_fn_c_check_func "$LINENO" "fdatasync" "ac_cv_func_fdatasync"
21297if test "x$ac_cv_func_fdatasync" = x""yes; then :
21298 cat >>confdefs.h <<_ACEOF
21299#define HAVE_FDATASYNC 1
21300_ACEOF
21301
21302fi
21303done
21304
21305 if test $ac_cv_func_fdatasync = no; then
21306 HAVE_FDATASYNC=0
21307 fi
21308 else
21309 gl_saved_libs=$LIBS
21310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5
21311$as_echo_n "checking for library containing fdatasync... " >&6; }
21312if test "${ac_cv_search_fdatasync+set}" = set; then :
21313 $as_echo_n "(cached) " >&6
21314else
21315 ac_func_search_save_LIBS=$LIBS
21316cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21317/* end confdefs.h. */
21318
21319/* Override any GCC internal prototype to avoid an error.
21320 Use char because int might match the return type of a GCC
21321 builtin and then its argument prototype would still apply. */
21322#ifdef __cplusplus
21323extern "C"
21324#endif
21325char fdatasync ();
21326int
21327main ()
21328{
21329return fdatasync ();
21330 ;
21331 return 0;
21332}
21333_ACEOF
21334for ac_lib in '' rt posix4; do
21335 if test -z "$ac_lib"; then
21336 ac_res="none required"
21337 else
21338 ac_res=-l$ac_lib
21339 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
21340 fi
21341 if ac_fn_c_try_link "$LINENO"; then :
21342 ac_cv_search_fdatasync=$ac_res
21343fi
21344rm -f core conftest.err conftest.$ac_objext \
21345 conftest$ac_exeext
21346 if test "${ac_cv_search_fdatasync+set}" = set; then :
21347 break
21348fi
21349done
21350if test "${ac_cv_search_fdatasync+set}" = set; then :
21351
21352else
21353 ac_cv_search_fdatasync=no
21354fi
21355rm conftest.$ac_ext
21356LIBS=$ac_func_search_save_LIBS
21357fi
21358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fdatasync" >&5
21359$as_echo "$ac_cv_search_fdatasync" >&6; }
21360ac_res=$ac_cv_search_fdatasync
21361if test "$ac_res" != no; then :
21362 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
21363 test "$ac_cv_search_fdatasync" = "none required" ||
21364 LIB_FDATASYNC=$ac_cv_search_fdatasync
21365fi
21366
21367 LIBS=$gl_saved_libs
21368 fi
21369
21370 if test $HAVE_FDATASYNC = 0; then
21371
21372
21373
21374
21375
21376
21377
21378
21379 gl_LIBOBJS="$gl_LIBOBJS fdatasync.$ac_objext"
21380
21381 fi
21382
21383
21384
21385
21386
21387 GNULIB_FDATASYNC=1
21388
21389
21390
21391
21392
21393
21394
21395
21396
710f5812 21397
d7ad186c
GM
21398 ac_fn_c_check_decl "$LINENO" "fdopendir" "ac_cv_have_decl_fdopendir" "
21399#include <dirent.h>
21400
21401"
21402if test "x$ac_cv_have_decl_fdopendir" = x""yes; then :
21403 ac_have_decl=1
21404else
21405 ac_have_decl=0
21406fi
21407
21408cat >>confdefs.h <<_ACEOF
21409#define HAVE_DECL_FDOPENDIR $ac_have_decl
21410_ACEOF
21411if test $ac_have_decl = 1; then :
21412
21413else
21414 HAVE_DECL_FDOPENDIR=0
21415fi
21416
21417
21418 if test $ac_cv_func_fdopendir = no; then
21419 HAVE_FDOPENDIR=0
21420 else
21421 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fdopendir works" >&5
21422$as_echo_n "checking whether fdopendir works... " >&6; }
21423if test "${gl_cv_func_fdopendir_works+set}" = set; then :
21424 $as_echo_n "(cached) " >&6
21425else
21426 if test "$cross_compiling" = yes; then :
21427 case "$host_os" in
21428 # Guess yes on glibc systems.
21429 *-gnu*) gl_cv_func_fdopendir_works="guessing yes" ;;
21430 # If we don't know, assume the worst.
21431 *) gl_cv_func_fdopendir_works="guessing no" ;;
21432 esac
21433
21434else
21435 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21436/* end confdefs.h. */
21437
21438#include <dirent.h>
21439#include <fcntl.h>
21440#include <unistd.h>
21441#if !HAVE_DECL_FDOPENDIR
21442extern
21443# ifdef __cplusplus
21444"C"
21445# endif
21446DIR *fdopendir (int);
21447#endif
21448
21449int
21450main ()
21451{
21452int result = 0;
21453 int fd = open ("conftest.c", O_RDONLY);
21454 if (fd < 0) result |= 1;
21455 if (fdopendir (fd)) result |= 2;
21456 if (close (fd)) result |= 4;
21457 return result;
21458 ;
21459 return 0;
21460}
21461_ACEOF
21462if ac_fn_c_try_run "$LINENO"; then :
21463 gl_cv_func_fdopendir_works=yes
21464else
21465 gl_cv_func_fdopendir_works=no
21466fi
21467rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21468 conftest.$ac_objext conftest.beam conftest.$ac_ext
21469fi
21470
21471fi
21472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopendir_works" >&5
21473$as_echo "$gl_cv_func_fdopendir_works" >&6; }
21474 case "$gl_cv_func_fdopendir_works" in
21475 *yes) ;;
21476 *)
21477 REPLACE_FDOPENDIR=1
21478 ;;
21479 esac
21480 fi
21481
21482 if test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1; then
21483
21484
21485
21486
21487
21488
21489
21490
21491 gl_LIBOBJS="$gl_LIBOBJS fdopendir.$ac_objext"
21492
21493 fi
21494
21495
21496
21497
21498
21499 GNULIB_FDOPENDIR=1
21500
21501
21502
21503
21504
21505
21506
21507cat >>confdefs.h <<_ACEOF
21508#define GNULIB_FDOPENDIR 1
21509_ACEOF
21510
21511
21512
21513
21514
21515
21516
710f5812 21517
3bf26e96
GM
21518
21519 fp_headers='
21520# include <stdio.h>
21521# if HAVE_STDIO_EXT_H
21522# include <stdio_ext.h>
21523# endif
21524'
21525 ac_fn_c_check_decl "$LINENO" "__fpending" "ac_cv_have_decl___fpending" "$fp_headers
21526"
21527if test "x$ac_cv_have_decl___fpending" = x""yes; then :
21528 ac_have_decl=1
21529else
21530 ac_have_decl=0
21531fi
21532
21533cat >>confdefs.h <<_ACEOF
21534#define HAVE_DECL___FPENDING $ac_have_decl
21535_ACEOF
21536
21537
21538 if test $ac_cv_func___fpending = no; then
21539
21540
21541
21542
21543
21544
21545
21546
21547 gl_LIBOBJS="$gl_LIBOBJS fpending.$ac_objext"
21548
21549
21550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to determine the number of pending output bytes on a stream" >&5
21551$as_echo_n "checking how to determine the number of pending output bytes on a stream... " >&6; }
21552if test "${ac_cv_sys_pending_output_n_bytes+set}" = set; then :
21553 $as_echo_n "(cached) " >&6
21554else
21555
21556 for ac_expr in \
21557 \
21558 '# glibc2' \
21559 'fp->_IO_write_ptr - fp->_IO_write_base' \
21560 \
21561 '# traditional Unix' \
21562 'fp->_ptr - fp->_base' \
21563 \
21564 '# BSD' \
21565 'fp->_p - fp->_bf._base' \
21566 \
21567 '# SCO, Unixware' \
21568 '(fp->__ptr ? fp->__ptr - fp->__base : 0)' \
21569 \
21570 '# QNX' \
21571 '(fp->_Mode & 0x2000 /*_MWRITE*/ ? fp->_Next - fp->_Buf : 0)' \
21572 \
21573 '# old glibc?' \
21574 'fp->__bufp - fp->__buffer' \
21575 \
21576 '# old glibc iostream?' \
21577 'fp->_pptr - fp->_pbase' \
21578 \
21579 '# emx+gcc' \
21580 'fp->_ptr - fp->_buffer' \
21581 \
21582 '# Minix' \
21583 'fp->_ptr - fp->_buf' \
21584 \
21585 '# Plan9' \
21586 'fp->wp - fp->buf' \
21587 \
21588 '# VMS' \
21589 '(*fp)->_ptr - (*fp)->_base' \
21590 \
21591 '# e.g., DGUX R4.11; the info is not available' \
21592 1 \
21593 ; do
21594
21595 # Skip each embedded comment.
21596 case "$ac_expr" in '#'*) continue;; esac
21597
21598 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21599/* end confdefs.h. */
21600#include <stdio.h>
21601int
21602main ()
21603{
21604FILE *fp = stdin; (void) ($ac_expr);
21605 ;
21606 return 0;
21607}
21608_ACEOF
21609if ac_fn_c_try_compile "$LINENO"; then :
21610 fp_done=yes
21611
21612fi
21613rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21614 test "$fp_done" = yes && break
21615 done
21616
21617 ac_cv_sys_pending_output_n_bytes=$ac_expr
21618
21619
21620fi
21621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_pending_output_n_bytes" >&5
21622$as_echo "$ac_cv_sys_pending_output_n_bytes" >&6; }
21623
21624cat >>confdefs.h <<_ACEOF
21625#define PENDING_OUTPUT_N_BYTES $ac_cv_sys_pending_output_n_bytes
21626_ACEOF
21627
21628
21629 fi
21630
21631
d7ad186c
GM
21632
21633
21634
21635
21636 if test $ac_cv_func_fstatat = no; then
21637 HAVE_FSTATAT=0
21638 else
21639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fstatat (..., 0) works" >&5
21640$as_echo_n "checking whether fstatat (..., 0) works... " >&6; }
21641if test "${gl_cv_func_fstatat_zero_flag+set}" = set; then :
21642 $as_echo_n "(cached) " >&6
21643else
21644 if test "$cross_compiling" = yes; then :
21645 case "$host_os" in
21646 aix*) gl_cv_func_fstatat_zero_flag="guessing no";;
21647 *) gl_cv_func_fstatat_zero_flag="guessing yes";;
21648 esac
21649
21650else
21651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21652/* end confdefs.h. */
21653
21654 #include <fcntl.h>
21655 #include <sys/stat.h>
21656 int
21657 main (void)
21658 {
21659 struct stat a;
21660 return fstatat (AT_FDCWD, ".", &a, 0) != 0;
21661 }
21662
21663_ACEOF
21664if ac_fn_c_try_run "$LINENO"; then :
21665 gl_cv_func_fstatat_zero_flag=yes
21666else
21667 gl_cv_func_fstatat_zero_flag=no
21668fi
21669rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21670 conftest.$ac_objext conftest.beam conftest.$ac_ext
21671fi
21672
21673
21674fi
21675{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fstatat_zero_flag" >&5
21676$as_echo "$gl_cv_func_fstatat_zero_flag" >&6; }
21677
21678 case $gl_cv_func_fstatat_zero_flag+$gl_cv_func_lstat_dereferences_slashed_symlink in
21679 *yes+*yes) ;;
21680 *) REPLACE_FSTATAT=1
21681 case $gl_cv_func_fstatat_zero_flag in
21682 *yes)
21683
21684$as_echo "#define HAVE_WORKING_FSTATAT_ZERO_FLAG 1" >>confdefs.h
21685
21686 ;;
21687 esac
21688 ;;
21689 esac
21690 fi
21691
21692 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
21693
21694
21695
21696
21697
21698
21699
21700
21701 gl_LIBOBJS="$gl_LIBOBJS fstatat.$ac_objext"
21702
21703 fi
21704
21705
21706
21707
21708
21709 GNULIB_FSTATAT=1
21710
21711
21712
21713
21714
21715
21716
2407788f
GM
21717
21718 if test $ac_cv_func_fsync = no; then
21719 HAVE_FSYNC=0
21720 fi
21721
21722 if test $HAVE_FSYNC = 0; then
21723
21724
21725
21726
21727
21728
21729
21730
21731 gl_LIBOBJS="$gl_LIBOBJS fsync.$ac_objext"
21732
21733 :
21734 fi
21735
21736
21737
21738
21739
21740 GNULIB_FSYNC=1
21741
21742
21743
21744
21745
21746
21747
5476a9a4
GM
21748# Persuade glibc <stdlib.h> to declare getloadavg().
21749
21750
21751gl_save_LIBS=$LIBS
21752
21753# getloadvg is present in libc on glibc >= 2.2, Mac OS X, FreeBSD >= 2.0,
21754# NetBSD >= 0.9, OpenBSD >= 2.0, Solaris >= 7.
21755HAVE_GETLOADAVG=1
21756ac_fn_c_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg"
21757if test "x$ac_cv_func_getloadavg" = x""yes; then :
21758
21759else
21760 gl_func_getloadavg_done=no
21761
21762 # Some systems with -lutil have (and need) -lkvm as well, some do not.
21763 # On Solaris, -lkvm requires nlist from -lelf, so check that first
21764 # to get the right answer into the cache.
21765 # For kstat on solaris, we need to test for libelf and libkvm to force the
21766 # definition of SVR4 below.
21767 if test $gl_func_getloadavg_done = no; then
21768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_begin in -lelf" >&5
21769$as_echo_n "checking for elf_begin in -lelf... " >&6; }
21770if test "${ac_cv_lib_elf_elf_begin+set}" = set; then :
6ad6792b
GM
21771 $as_echo_n "(cached) " >&6
21772else
3e0be4ab 21773 ac_check_lib_save_LIBS=$LIBS
5476a9a4 21774LIBS="-lelf $LIBS"
3e0be4ab 21775cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6ad6792b 21776/* end confdefs.h. */
6ad6792b 21777
3e0be4ab
GM
21778/* Override any GCC internal prototype to avoid an error.
21779 Use char because int might match the return type of a GCC
21780 builtin and then its argument prototype would still apply. */
21781#ifdef __cplusplus
21782extern "C"
21783#endif
5476a9a4 21784char elf_begin ();
6ad6792b
GM
21785int
21786main ()
21787{
5476a9a4 21788return elf_begin ();
6ad6792b
GM
21789 ;
21790 return 0;
21791}
21792_ACEOF
3e0be4ab 21793if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 21794 ac_cv_lib_elf_elf_begin=yes
3e0be4ab 21795else
5476a9a4 21796 ac_cv_lib_elf_elf_begin=no
6ad6792b 21797fi
3e0be4ab
GM
21798rm -f core conftest.err conftest.$ac_objext \
21799 conftest$ac_exeext conftest.$ac_ext
21800LIBS=$ac_check_lib_save_LIBS
6ad6792b 21801fi
5476a9a4
GM
21802{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_elf_elf_begin" >&5
21803$as_echo "$ac_cv_lib_elf_elf_begin" >&6; }
21804if test "x$ac_cv_lib_elf_elf_begin" = x""yes; then :
21805 LIBS="-lelf $LIBS"
6ad6792b
GM
21806fi
21807
5476a9a4
GM
21808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kvm_open in -lkvm" >&5
21809$as_echo_n "checking for kvm_open in -lkvm... " >&6; }
21810if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then :
6c051bab
GM
21811 $as_echo_n "(cached) " >&6
21812else
5476a9a4
GM
21813 ac_check_lib_save_LIBS=$LIBS
21814LIBS="-lkvm $LIBS"
21815cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c051bab 21816/* end confdefs.h. */
3e0be4ab 21817
5476a9a4
GM
21818/* Override any GCC internal prototype to avoid an error.
21819 Use char because int might match the return type of a GCC
21820 builtin and then its argument prototype would still apply. */
21821#ifdef __cplusplus
21822extern "C"
21823#endif
21824char kvm_open ();
6c051bab
GM
21825int
21826main ()
21827{
5476a9a4 21828return kvm_open ();
6c051bab
GM
21829 ;
21830 return 0;
21831}
21832_ACEOF
3e0be4ab 21833if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 21834 ac_cv_lib_kvm_kvm_open=yes
6c051bab 21835else
5476a9a4 21836 ac_cv_lib_kvm_kvm_open=no
6c051bab 21837fi
3e0be4ab
GM
21838rm -f core conftest.err conftest.$ac_objext \
21839 conftest$ac_exeext conftest.$ac_ext
5476a9a4 21840LIBS=$ac_check_lib_save_LIBS
6c051bab 21841fi
5476a9a4
GM
21842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kvm_kvm_open" >&5
21843$as_echo "$ac_cv_lib_kvm_kvm_open" >&6; }
21844if test "x$ac_cv_lib_kvm_kvm_open" = x""yes; then :
21845 LIBS="-lkvm $LIBS"
3e0be4ab 21846fi
6c051bab 21847
5476a9a4
GM
21848 # Check for the 4.4BSD definition of getloadavg.
21849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lutil" >&5
21850$as_echo_n "checking for getloadavg in -lutil... " >&6; }
21851if test "${ac_cv_lib_util_getloadavg+set}" = set; then :
ae0d7250
PE
21852 $as_echo_n "(cached) " >&6
21853else
5476a9a4
GM
21854 ac_check_lib_save_LIBS=$LIBS
21855LIBS="-lutil $LIBS"
21856cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6d153f56 21857/* end confdefs.h. */
5476a9a4
GM
21858
21859/* Override any GCC internal prototype to avoid an error.
21860 Use char because int might match the return type of a GCC
21861 builtin and then its argument prototype would still apply. */
21862#ifdef __cplusplus
21863extern "C"
21864#endif
21865char getloadavg ();
ae0d7250
PE
21866int
21867main ()
21868{
5476a9a4 21869return getloadavg ();
ae0d7250
PE
21870 ;
21871 return 0;
21872}
21873_ACEOF
3e0be4ab 21874if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 21875 ac_cv_lib_util_getloadavg=yes
ae0d7250 21876else
5476a9a4 21877 ac_cv_lib_util_getloadavg=no
ae0d7250 21878fi
3e0be4ab
GM
21879rm -f core conftest.err conftest.$ac_objext \
21880 conftest$ac_exeext conftest.$ac_ext
5476a9a4
GM
21881LIBS=$ac_check_lib_save_LIBS
21882fi
21883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_getloadavg" >&5
21884$as_echo "$ac_cv_lib_util_getloadavg" >&6; }
21885if test "x$ac_cv_lib_util_getloadavg" = x""yes; then :
21886 LIBS="-lutil $LIBS" gl_func_getloadavg_done=yes
3e0be4ab 21887fi
6d153f56 21888
5476a9a4 21889 fi
6d153f56 21890
5476a9a4
GM
21891 if test $gl_func_getloadavg_done = no; then
21892 # There is a commonly available library for RS/6000 AIX.
21893 # Since it is not a standard part of AIX, it might be installed locally.
21894 gl_getloadavg_LIBS=$LIBS
21895 LIBS="-L/usr/local/lib $LIBS"
21896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lgetloadavg" >&5
21897$as_echo_n "checking for getloadavg in -lgetloadavg... " >&6; }
21898if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then :
f199cab1 21899 $as_echo_n "(cached) " >&6
3e0be4ab 21900else
f199cab1 21901 ac_check_lib_save_LIBS=$LIBS
5476a9a4 21902LIBS="-lgetloadavg $LIBS"
f199cab1
GM
21903cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21904/* end confdefs.h. */
3e0be4ab 21905
f199cab1
GM
21906/* Override any GCC internal prototype to avoid an error.
21907 Use char because int might match the return type of a GCC
21908 builtin and then its argument prototype would still apply. */
21909#ifdef __cplusplus
21910extern "C"
21911#endif
5476a9a4 21912char getloadavg ();
f199cab1
GM
21913int
21914main ()
21915{
5476a9a4 21916return getloadavg ();
f199cab1
GM
21917 ;
21918 return 0;
21919}
ae0d7250 21920_ACEOF
f199cab1 21921if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 21922 ac_cv_lib_getloadavg_getloadavg=yes
f199cab1 21923else
5476a9a4 21924 ac_cv_lib_getloadavg_getloadavg=no
ae0d7250 21925fi
f199cab1
GM
21926rm -f core conftest.err conftest.$ac_objext \
21927 conftest$ac_exeext conftest.$ac_ext
21928LIBS=$ac_check_lib_save_LIBS
3e0be4ab 21929fi
5476a9a4
GM
21930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_getloadavg_getloadavg" >&5
21931$as_echo "$ac_cv_lib_getloadavg_getloadavg" >&6; }
21932if test "x$ac_cv_lib_getloadavg_getloadavg" = x""yes; then :
21933 LIBS="-lgetloadavg $LIBS" gl_func_getloadavg_done=yes
21934else
21935 LIBS=$gl_getloadavg_LIBS
6d153f56 21936fi
ae0d7250 21937
5476a9a4 21938 fi
16c3e636 21939
5476a9a4
GM
21940 # Set up the replacement function if necessary.
21941 if test $gl_func_getloadavg_done = no; then
21942 HAVE_GETLOADAVG=0
16c3e636 21943
5476a9a4
GM
21944 # Solaris has libkstat which does not require root.
21945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kstat_open in -lkstat" >&5
21946$as_echo_n "checking for kstat_open in -lkstat... " >&6; }
21947if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then :
f199cab1
GM
21948 $as_echo_n "(cached) " >&6
21949else
21950 ac_check_lib_save_LIBS=$LIBS
5476a9a4 21951LIBS="-lkstat $LIBS"
f199cab1
GM
21952cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21953/* end confdefs.h. */
5f90be1b 21954
f199cab1
GM
21955/* Override any GCC internal prototype to avoid an error.
21956 Use char because int might match the return type of a GCC
21957 builtin and then its argument prototype would still apply. */
21958#ifdef __cplusplus
21959extern "C"
21960#endif
5476a9a4 21961char kstat_open ();
f199cab1
GM
21962int
21963main ()
21964{
5476a9a4 21965return kstat_open ();
f199cab1
GM
21966 ;
21967 return 0;
21968}
3e0be4ab 21969_ACEOF
f199cab1 21970if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 21971 ac_cv_lib_kstat_kstat_open=yes
f199cab1 21972else
5476a9a4 21973 ac_cv_lib_kstat_kstat_open=no
5f90be1b 21974fi
f199cab1
GM
21975rm -f core conftest.err conftest.$ac_objext \
21976 conftest$ac_exeext conftest.$ac_ext
21977LIBS=$ac_check_lib_save_LIBS
3e0be4ab 21978fi
5476a9a4
GM
21979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kstat_kstat_open" >&5
21980$as_echo "$ac_cv_lib_kstat_kstat_open" >&6; }
21981if test "x$ac_cv_lib_kstat_kstat_open" = x""yes; then :
3e0be4ab 21982 cat >>confdefs.h <<_ACEOF
5476a9a4 21983#define HAVE_LIBKSTAT 1
3e0be4ab 21984_ACEOF
5f90be1b 21985
5476a9a4 21986 LIBS="-lkstat $LIBS"
5f90be1b 21987
f199cab1 21988fi
5f90be1b 21989
5476a9a4 21990 test $ac_cv_lib_kstat_kstat_open = yes && gl_func_getloadavg_done=yes
da6c8463 21991
5476a9a4
GM
21992 # AIX has libperfstat which does not require root
21993 if test $gl_func_getloadavg_done = no; then
21994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for perfstat_cpu_total in -lperfstat" >&5
21995$as_echo_n "checking for perfstat_cpu_total in -lperfstat... " >&6; }
21996if test "${ac_cv_lib_perfstat_perfstat_cpu_total+set}" = set; then :
f199cab1
GM
21997 $as_echo_n "(cached) " >&6
21998else
5476a9a4
GM
21999 ac_check_lib_save_LIBS=$LIBS
22000LIBS="-lperfstat $LIBS"
22001cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5f90be1b 22002/* end confdefs.h. */
5476a9a4
GM
22003
22004/* Override any GCC internal prototype to avoid an error.
22005 Use char because int might match the return type of a GCC
22006 builtin and then its argument prototype would still apply. */
22007#ifdef __cplusplus
22008extern "C"
22009#endif
22010char perfstat_cpu_total ();
5f90be1b
PE
22011int
22012main ()
22013{
5476a9a4 22014return perfstat_cpu_total ();
5f90be1b
PE
22015 ;
22016 return 0;
22017}
22018_ACEOF
5476a9a4
GM
22019if ac_fn_c_try_link "$LINENO"; then :
22020 ac_cv_lib_perfstat_perfstat_cpu_total=yes
f199cab1 22021else
5476a9a4 22022 ac_cv_lib_perfstat_perfstat_cpu_total=no
f199cab1 22023fi
5476a9a4
GM
22024rm -f core conftest.err conftest.$ac_objext \
22025 conftest$ac_exeext conftest.$ac_ext
22026LIBS=$ac_check_lib_save_LIBS
f199cab1 22027fi
5476a9a4
GM
22028{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_perfstat_perfstat_cpu_total" >&5
22029$as_echo "$ac_cv_lib_perfstat_perfstat_cpu_total" >&6; }
22030if test "x$ac_cv_lib_perfstat_perfstat_cpu_total" = x""yes; then :
22031 cat >>confdefs.h <<_ACEOF
22032#define HAVE_LIBPERFSTAT 1
22033_ACEOF
22034
22035 LIBS="-lperfstat $LIBS"
22036
22037fi
22038
22039 test $ac_cv_lib_perfstat_perfstat_cpu_total = yes && gl_func_getloadavg_done=yes
22040 fi
22041
22042 if test $gl_func_getloadavg_done = no; then
22043 ac_fn_c_check_header_mongrel "$LINENO" "sys/dg_sys_info.h" "ac_cv_header_sys_dg_sys_info_h" "$ac_includes_default"
22044if test "x$ac_cv_header_sys_dg_sys_info_h" = x""yes; then :
22045 gl_func_getloadavg_done=yes
22046
22047$as_echo "#define DGUX 1" >>confdefs.h
22048
22049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dg_sys_info in -ldgc" >&5
22050$as_echo_n "checking for dg_sys_info in -ldgc... " >&6; }
22051if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then :
f199cab1
GM
22052 $as_echo_n "(cached) " >&6
22053else
22054 ac_check_lib_save_LIBS=$LIBS
5476a9a4 22055LIBS="-ldgc $LIBS"
f199cab1
GM
22056cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22057/* end confdefs.h. */
3e0be4ab 22058
f199cab1
GM
22059/* Override any GCC internal prototype to avoid an error.
22060 Use char because int might match the return type of a GCC
22061 builtin and then its argument prototype would still apply. */
22062#ifdef __cplusplus
22063extern "C"
22064#endif
5476a9a4 22065char dg_sys_info ();
f199cab1
GM
22066int
22067main ()
22068{
5476a9a4 22069return dg_sys_info ();
f199cab1
GM
22070 ;
22071 return 0;
22072}
22073_ACEOF
22074if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 22075 ac_cv_lib_dgc_dg_sys_info=yes
f199cab1 22076else
5476a9a4 22077 ac_cv_lib_dgc_dg_sys_info=no
5f90be1b 22078fi
3e0be4ab
GM
22079rm -f core conftest.err conftest.$ac_objext \
22080 conftest$ac_exeext conftest.$ac_ext
f199cab1 22081LIBS=$ac_check_lib_save_LIBS
5f90be1b 22082fi
5476a9a4
GM
22083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dgc_dg_sys_info" >&5
22084$as_echo "$ac_cv_lib_dgc_dg_sys_info" >&6; }
22085if test "x$ac_cv_lib_dgc_dg_sys_info" = x""yes; then :
22086 cat >>confdefs.h <<_ACEOF
22087#define HAVE_LIBDGC 1
22088_ACEOF
22089
22090 LIBS="-ldgc $LIBS"
22091
da6c8463
GM
22092fi
22093
5476a9a4
GM
22094fi
22095
22096
22097 fi
22098 fi
22099fi
22100
22101
22102if test "x$gl_save_LIBS" = x; then
22103 GETLOADAVG_LIBS=$LIBS
f199cab1 22104else
5476a9a4
GM
22105 GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$gl_save_LIBS!!"`
22106fi
22107LIBS=$gl_save_LIBS
22108
22109
22110# Test whether the system declares getloadavg. Solaris has the function
22111# but declares it in <sys/loadavg.h>, not <stdlib.h>.
22112for ac_header in sys/loadavg.h
22113do :
22114 ac_fn_c_check_header_mongrel "$LINENO" "sys/loadavg.h" "ac_cv_header_sys_loadavg_h" "$ac_includes_default"
22115if test "x$ac_cv_header_sys_loadavg_h" = x""yes; then :
22116 cat >>confdefs.h <<_ACEOF
22117#define HAVE_SYS_LOADAVG_H 1
f199cab1 22118_ACEOF
5476a9a4 22119
f199cab1 22120fi
5476a9a4
GM
22121
22122done
22123
22124if test $ac_cv_header_sys_loadavg_h = yes; then
22125 HAVE_SYS_LOADAVG_H=1
22126else
22127 HAVE_SYS_LOADAVG_H=0
f199cab1 22128fi
5476a9a4
GM
22129ac_fn_c_check_decl "$LINENO" "getloadavg" "ac_cv_have_decl_getloadavg" "#if HAVE_SYS_LOADAVG_H
22130 # include <sys/loadavg.h>
22131 #endif
22132 #include <stdlib.h>
22133"
22134if test "x$ac_cv_have_decl_getloadavg" = x""yes; then :
5f90be1b 22135
f199cab1 22136else
5476a9a4 22137 HAVE_DECL_GETLOADAVG=0
f199cab1 22138fi
5f90be1b 22139
5f90be1b 22140
a6342fc8 22141 if test $HAVE_GETLOADAVG = 0; then
5476a9a4
GM
22142
22143
22144
22145
22146
22147
22148
22149
22150 gl_LIBOBJS="$gl_LIBOBJS getloadavg.$ac_objext"
22151
22152
22153# Figure out what our getloadavg.c needs.
22154
22155
22156
22157# On HPUX9, an unprivileged user can get load averages this way.
22158if test $gl_func_getloadavg_done = no; then
22159 for ac_func in pstat_getdynamic
22160do :
22161 ac_fn_c_check_func "$LINENO" "pstat_getdynamic" "ac_cv_func_pstat_getdynamic"
22162if test "x$ac_cv_func_pstat_getdynamic" = x""yes; then :
22163 cat >>confdefs.h <<_ACEOF
22164#define HAVE_PSTAT_GETDYNAMIC 1
22165_ACEOF
22166 gl_func_getloadavg_done=yes
3e0be4ab 22167fi
5476a9a4 22168done
6ad6792b 22169
5476a9a4 22170fi
6ad6792b 22171
5476a9a4
GM
22172# We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
22173# uses stabs), but it is still SVR4. We cannot check for <elf.h> because
22174# Irix 4.0.5F has the header but not the library.
22175if test $gl_func_getloadavg_done = no && test "$ac_cv_lib_elf_elf_begin" = yes \
22176 && test "$ac_cv_lib_kvm_kvm_open" = yes; then
22177 gl_func_getloadavg_done=yes
6ad6792b 22178
5476a9a4 22179$as_echo "#define SVR4 1" >>confdefs.h
6ad6792b 22180
5476a9a4
GM
22181fi
22182
22183if test $gl_func_getloadavg_done = no; then
22184 ac_fn_c_check_header_mongrel "$LINENO" "inq_stats/cpustats.h" "ac_cv_header_inq_stats_cpustats_h" "$ac_includes_default"
22185if test "x$ac_cv_header_inq_stats_cpustats_h" = x""yes; then :
22186 gl_func_getloadavg_done=yes
22187
22188$as_echo "#define UMAX 1" >>confdefs.h
22189
22190
22191$as_echo "#define UMAX4_3 1" >>confdefs.h
22192
22193fi
22194
22195
22196fi
22197
22198if test $gl_func_getloadavg_done = no; then
22199 ac_fn_c_check_header_mongrel "$LINENO" "sys/cpustats.h" "ac_cv_header_sys_cpustats_h" "$ac_includes_default"
22200if test "x$ac_cv_header_sys_cpustats_h" = x""yes; then :
22201 gl_func_getloadavg_done=yes; $as_echo "#define UMAX 1" >>confdefs.h
22202
22203fi
22204
22205
22206fi
22207
22208if test $gl_func_getloadavg_done = no; then
22209 for ac_header in mach/mach.h
22210do :
22211 ac_fn_c_check_header_mongrel "$LINENO" "mach/mach.h" "ac_cv_header_mach_mach_h" "$ac_includes_default"
22212if test "x$ac_cv_header_mach_mach_h" = x""yes; then :
22213 cat >>confdefs.h <<_ACEOF
22214#define HAVE_MACH_MACH_H 1
22215_ACEOF
22216
22217fi
22218
22219done
22220
22221fi
22222
22223for ac_header in nlist.h
22224do :
22225 ac_fn_c_check_header_mongrel "$LINENO" "nlist.h" "ac_cv_header_nlist_h" "$ac_includes_default"
22226if test "x$ac_cv_header_nlist_h" = x""yes; then :
22227 cat >>confdefs.h <<_ACEOF
22228#define HAVE_NLIST_H 1
22229_ACEOF
22230 ac_fn_c_check_member "$LINENO" "struct nlist" "n_un.n_name" "ac_cv_member_struct_nlist_n_un_n_name" "#include <nlist.h>
22231"
22232if test "x$ac_cv_member_struct_nlist_n_un_n_name" = x""yes; then :
22233
22234cat >>confdefs.h <<_ACEOF
22235#define HAVE_STRUCT_NLIST_N_UN_N_NAME 1
22236_ACEOF
6ad6792b 22237
0eb775a3 22238
f199cab1 22239fi
3e0be4ab 22240
5476a9a4 22241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 22242/* end confdefs.h. */
5476a9a4 22243#include <nlist.h>
f199cab1
GM
22244int
22245main ()
22246{
5476a9a4
GM
22247struct nlist x;
22248 #ifdef HAVE_STRUCT_NLIST_N_UN_N_NAME
22249 x.n_un.n_name = "";
22250 #else
22251 x.n_name = "";
22252 #endif
f199cab1
GM
22253 ;
22254 return 0;
22255}
22256_ACEOF
5476a9a4 22257if ac_fn_c_try_link "$LINENO"; then :
6ad6792b 22258
5476a9a4 22259$as_echo "#define N_NAME_POINTER 1" >>confdefs.h
6ad6792b
GM
22260
22261fi
5476a9a4
GM
22262rm -f core conftest.err conftest.$ac_objext \
22263 conftest$ac_exeext conftest.$ac_ext
6ad6792b 22264
5476a9a4 22265fi
6ad6792b 22266
5476a9a4 22267done
6ad6792b 22268
a6342fc8 22269 fi
ca36e0ff 22270
ca36e0ff
GM
22271
22272
1f5d53eb
PE
22273
22274
5476a9a4 22275 GNULIB_GETLOADAVG=1
1f5d53eb
PE
22276
22277
22278
22279
22280
22281
22282
1f5d53eb 22283
1f5d53eb 22284
3e0be4ab 22285
a6342fc8 22286 if test $REPLACE_GETOPT = 1; then
3e0be4ab 22287
1f5d53eb
PE
22288
22289
1f5d53eb 22290
1f5d53eb
PE
22291
22292
22293
22294
5476a9a4 22295 gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
0eb775a3
GM
22296
22297
1f5d53eb
PE
22298
22299
16c3e636 22300
5476a9a4
GM
22301
22302
22303
22304
22305 gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
22306
22307
22308
22309
a6342fc8
GM
22310 GNULIB_GL_UNISTD_H_GETOPT=1
22311 fi
16c3e636
PE
22312
22313
22314
4fda9c95
GM
22315
22316
22317
22318
5476a9a4
GM
22319 REPLACE_GETOPT=0
22320 if test -n "$gl_replace_getopt"; then
22321 REPLACE_GETOPT=1
22322 fi
22323
22324 if test $REPLACE_GETOPT = 1; then
22325
22326 GETOPT_H=getopt.h
22327
22328$as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
22329
22330
22331
22332 fi
22333
a6342fc8 22334 if test $REPLACE_GETOPT = 1; then
5476a9a4
GM
22335
22336
22337
22338
22339
22340
22341
22342
22343 gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
22344
22345
22346
22347
22348
22349
22350
22351
22352
22353 gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
4fda9c95
GM
22354
22355
22356
22357
a6342fc8
GM
22358 GNULIB_GL_UNISTD_H_GETOPT=1
22359 fi
4fda9c95
GM
22360
22361
22362
22363
4fda9c95 22364
4fda9c95 22365
4fda9c95 22366
5476a9a4
GM
22367
22368
22369
22370
22371
22372 gl_gettimeofday_timezone=void
22373 if test $ac_cv_func_gettimeofday != yes; then
22374 HAVE_GETTIMEOFDAY=0
f199cab1 22375 else
4fda9c95
GM
22376
22377
3e0be4ab 22378
5476a9a4
GM
22379 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5
22380$as_echo_n "checking whether gettimeofday clobbers localtime buffer... " >&6; }
22381if test "${gl_cv_func_gettimeofday_clobber+set}" = set; then :
22382 $as_echo_n "(cached) " >&6
22383else
22384 if test "$cross_compiling" = yes; then :
22385 # When cross-compiling:
22386 case "$host_os" in
22387 # Guess all is fine on glibc systems.
22388 *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
22389 # If we don't know, assume the worst.
22390 *) gl_cv_func_gettimeofday_clobber="guessing yes" ;;
22391 esac
4fda9c95 22392
5476a9a4
GM
22393else
22394 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22395/* end confdefs.h. */
22396#include <string.h>
22397 #include <sys/time.h>
22398 #include <time.h>
22399 #include <stdlib.h>
4fda9c95 22400
5476a9a4
GM
22401int
22402main ()
22403{
4fda9c95 22404
5476a9a4
GM
22405 time_t t = 0;
22406 struct tm *lt;
22407 struct tm saved_lt;
22408 struct timeval tv;
22409 lt = localtime (&t);
22410 saved_lt = *lt;
22411 gettimeofday (&tv, NULL);
22412 return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
cc322c06 22413
5476a9a4
GM
22414 ;
22415 return 0;
22416}
22417_ACEOF
22418if ac_fn_c_try_run "$LINENO"; then :
22419 gl_cv_func_gettimeofday_clobber=no
22420else
22421 gl_cv_func_gettimeofday_clobber=yes
22422fi
22423rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22424 conftest.$ac_objext conftest.beam conftest.$ac_ext
22425fi
cc322c06 22426
5476a9a4
GM
22427fi
22428{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5
22429$as_echo "$gl_cv_func_gettimeofday_clobber" >&6; }
cc322c06 22430
5476a9a4
GM
22431 case "$gl_cv_func_gettimeofday_clobber" in
22432 *yes)
22433 REPLACE_GETTIMEOFDAY=1
cc322c06 22434
4fda9c95 22435
5476a9a4 22436$as_echo "#define gmtime rpl_gmtime" >>confdefs.h
4fda9c95 22437
ae0d7250 22438
5476a9a4 22439$as_echo "#define localtime rpl_localtime" >>confdefs.h
ae0d7250
PE
22440
22441
ae0d7250 22442
5476a9a4
GM
22443$as_echo "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h
22444
22445 ;;
22446 esac
22447
22448 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
22449$as_echo_n "checking for gettimeofday with POSIX signature... " >&6; }
22450if test "${gl_cv_func_gettimeofday_posix_signature+set}" = set; then :
f199cab1
GM
22451 $as_echo_n "(cached) " >&6
22452else
5476a9a4
GM
22453 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22454/* end confdefs.h. */
22455#include <sys/time.h>
22456 struct timeval c;
22457 int gettimeofday (struct timeval *restrict, void *restrict);
22458
22459int
22460main ()
22461{
22462/* glibc uses struct timezone * rather than the POSIX void *
22463 if _GNU_SOURCE is defined. However, since the only portable
22464 use of gettimeofday uses NULL as the second parameter, and
22465 since the glibc definition is actually more typesafe, it is
22466 not worth wrapping this to get a compliant signature. */
22467 int (*f) (struct timeval *restrict, void *restrict)
22468 = gettimeofday;
22469 int x = f (&c, 0);
22470 return !(x | c.tv_sec | c.tv_usec);
22471
22472 ;
22473 return 0;
22474}
22475_ACEOF
22476if ac_fn_c_try_compile "$LINENO"; then :
22477 gl_cv_func_gettimeofday_posix_signature=yes
22478else
22479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 22480/* end confdefs.h. */
5476a9a4
GM
22481#include <sys/time.h>
22482int gettimeofday (struct timeval *restrict, struct timezone *restrict);
ae0d7250 22483
f199cab1
GM
22484int
22485main ()
22486{
5476a9a4 22487
f199cab1
GM
22488 ;
22489 return 0;
ae0d7250
PE
22490}
22491_ACEOF
5476a9a4
GM
22492if ac_fn_c_try_compile "$LINENO"; then :
22493 gl_cv_func_gettimeofday_posix_signature=almost
ae0d7250 22494else
5476a9a4 22495 gl_cv_func_gettimeofday_posix_signature=no
ae0d7250 22496fi
5476a9a4 22497rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ae0d7250 22498fi
5476a9a4 22499rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52724a05 22500fi
5476a9a4
GM
22501{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
22502$as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; }
22503 if test $gl_cv_func_gettimeofday_posix_signature = almost; then
22504 gl_gettimeofday_timezone='struct timezone'
22505 elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
22506 REPLACE_GETTIMEOFDAY=1
22507 fi
22508 if test $REPLACE_STRUCT_TIMEVAL = 1; then
22509 REPLACE_GETTIMEOFDAY=1
22510 fi
3e0be4ab 22511
5476a9a4 22512 fi
ae0d7250 22513
5476a9a4
GM
22514cat >>confdefs.h <<_ACEOF
22515#define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone
22516_ACEOF
f199cab1 22517
ae0d7250 22518
a6342fc8 22519 if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
ae0d7250 22520
cc322c06
GM
22521
22522
cc322c06
GM
22523
22524
ae0d7250
PE
22525
22526
22527
5476a9a4 22528 gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
5fa4ac76
PE
22529
22530
5476a9a4
GM
22531 for ac_header in sys/timeb.h
22532do :
22533 ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
22534if test "x$ac_cv_header_sys_timeb_h" = x""yes; then :
22535 cat >>confdefs.h <<_ACEOF
22536#define HAVE_SYS_TIMEB_H 1
22537_ACEOF
5fa4ac76 22538
3e0be4ab 22539fi
5fa4ac76 22540
5476a9a4 22541done
f199cab1 22542
5476a9a4
GM
22543 for ac_func in _ftime
22544do :
22545 ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
22546if test "x$ac_cv_func__ftime" = x""yes; then :
22547 cat >>confdefs.h <<_ACEOF
22548#define HAVE__FTIME 1
22549_ACEOF
5fa4ac76 22550
5476a9a4
GM
22551fi
22552done
5fa4ac76
PE
22553
22554
a6342fc8 22555 fi
5fa4ac76
PE
22556
22557
22558
22559
22560
5476a9a4 22561 GNULIB_GETTIMEOFDAY=1
5fa4ac76
PE
22562
22563
22564
22565
0eb775a3
GM
22566
22567
369e19fc
PE
22568
22569
369e19fc
PE
22570
22571
5476a9a4
GM
22572 if test $ac_cv_func_lstat = yes; then
22573
22574 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
22575 *no)
22576 REPLACE_LSTAT=1
22577 ;;
22578 esac
22579 else
22580 HAVE_LSTAT=0
f199cab1 22581 fi
369e19fc 22582
a6342fc8 22583 if test $REPLACE_LSTAT = 1; then
369e19fc 22584
5fa4ac76 22585
369e19fc 22586
369e19fc 22587
369e19fc 22588
369e19fc 22589
369e19fc 22590
369e19fc 22591
5476a9a4 22592 gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
f199cab1 22593
45d4966b 22594 :
a6342fc8 22595 fi
369e19fc 22596
369e19fc 22597
369e19fc 22598
5fa4ac76
PE
22599
22600
5476a9a4 22601 GNULIB_LSTAT=1
5fa4ac76 22602
5fa4ac76 22603
27505cf5 22604
27505cf5 22605
27505cf5 22606
27505cf5 22607
27505cf5 22608
27505cf5 22609
5fa4ac76
PE
22610
22611
283c7aed
GM
22612 if test $ac_cv_have_decl_memrchr = no; then
22613 HAVE_DECL_MEMRCHR=0
22614 fi
22615
22616 for ac_func in memrchr
22617do :
22618 ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr"
22619if test "x$ac_cv_func_memrchr" = x""yes; then :
22620 cat >>confdefs.h <<_ACEOF
22621#define HAVE_MEMRCHR 1
22622_ACEOF
22623
22624fi
22625done
22626
22627
22628 if test $ac_cv_func_memrchr = no; then
22629
22630
22631
22632
22633
22634
22635
22636
22637 gl_LIBOBJS="$gl_LIBOBJS memrchr.$ac_objext"
22638
22639 :
22640 fi
22641
22642
22643
22644
22645
22646 GNULIB_MEMRCHR=1
22647
22648
22649
22650
22651
22652
22653
22654
22655
22656
5476a9a4
GM
22657
22658 if test $APPLE_UNIVERSAL_BUILD = 1; then
22659 # A universal build on Apple Mac OS X platforms.
22660 # The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode.
22661 # But we need a configuration result that is valid in both modes.
22662 gl_cv_func_working_mktime=no
22663 fi
22664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5
22665$as_echo_n "checking for working mktime... " >&6; }
22666if test "${gl_cv_func_working_mktime+set}" = set; then :
f199cab1
GM
22667 $as_echo_n "(cached) " >&6
22668else
5476a9a4
GM
22669 if test "$cross_compiling" = yes; then :
22670 gl_cv_func_working_mktime=no
22671else
22672 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 22673/* end confdefs.h. */
5476a9a4
GM
22674/* Test program from Paul Eggert and Tony Leneis. */
22675#include <limits.h>
22676#include <stdlib.h>
22677#include <time.h>
5fa4ac76 22678
5476a9a4
GM
22679#ifdef HAVE_UNISTD_H
22680# include <unistd.h>
f199cab1 22681#endif
5476a9a4 22682
2393bc74
GM
22683#if HAVE_DECL_ALARM
22684# include <signal.h>
5476a9a4
GM
22685#endif
22686
22687/* Work around redefinition to rpl_putenv by other config tests. */
22688#undef putenv
22689
22690static time_t time_t_max;
22691static time_t time_t_min;
22692
22693/* Values we'll use to set the TZ environment variable. */
22694static char *tz_strings[] = {
22695 (char *) 0, "TZ=GMT0", "TZ=JST-9",
22696 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
22697};
22698#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
22699
22700/* Return 0 if mktime fails to convert a date in the spring-forward gap.
22701 Based on a problem report from Andreas Jaeger. */
22702static int
22703spring_forward_gap ()
f199cab1 22704{
5476a9a4
GM
22705 /* glibc (up to about 1998-10-07) failed this test. */
22706 struct tm tm;
22707
22708 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
22709 instead of "TZ=America/Vancouver" in order to detect the bug even
22710 on systems that don't support the Olson extension, or don't have the
22711 full zoneinfo tables installed. */
22712 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
22713
22714 tm.tm_year = 98;
22715 tm.tm_mon = 3;
22716 tm.tm_mday = 5;
22717 tm.tm_hour = 2;
22718 tm.tm_min = 0;
22719 tm.tm_sec = 0;
22720 tm.tm_isdst = -1;
22721 return mktime (&tm) != (time_t) -1;
f199cab1 22722}
5fa4ac76 22723
5476a9a4
GM
22724static int
22725mktime_test1 (time_t now)
22726{
22727 struct tm *lt;
22728 return ! (lt = localtime (&now)) || mktime (lt) == now;
22729}
5fa4ac76 22730
5476a9a4
GM
22731static int
22732mktime_test (time_t now)
22733{
22734 return (mktime_test1 (now)
22735 && mktime_test1 ((time_t) (time_t_max - now))
22736 && mktime_test1 ((time_t) (time_t_min + now)));
22737}
067d23c9 22738
5476a9a4
GM
22739static int
22740irix_6_4_bug ()
22741{
22742 /* Based on code from Ariel Faigon. */
22743 struct tm tm;
22744 tm.tm_year = 96;
22745 tm.tm_mon = 3;
22746 tm.tm_mday = 0;
22747 tm.tm_hour = 0;
22748 tm.tm_min = 0;
22749 tm.tm_sec = 0;
22750 tm.tm_isdst = -1;
22751 mktime (&tm);
22752 return tm.tm_mon == 2 && tm.tm_mday == 31;
22753}
22754
22755static int
22756bigtime_test (int j)
22757{
22758 struct tm tm;
22759 time_t now;
22760 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
22761 now = mktime (&tm);
22762 if (now != (time_t) -1)
22763 {
22764 struct tm *lt = localtime (&now);
22765 if (! (lt
22766 && lt->tm_year == tm.tm_year
22767 && lt->tm_mon == tm.tm_mon
22768 && lt->tm_mday == tm.tm_mday
22769 && lt->tm_hour == tm.tm_hour
22770 && lt->tm_min == tm.tm_min
22771 && lt->tm_sec == tm.tm_sec
22772 && lt->tm_yday == tm.tm_yday
22773 && lt->tm_wday == tm.tm_wday
22774 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
22775 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
22776 return 0;
22777 }
22778 return 1;
22779}
369e19fc 22780
5476a9a4
GM
22781static int
22782year_2050_test ()
22783{
22784 /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
22785 ignoring leap seconds. */
22786 unsigned long int answer = 2527315200UL;
369e19fc 22787
5476a9a4
GM
22788 struct tm tm;
22789 time_t t;
22790 tm.tm_year = 2050 - 1900;
22791 tm.tm_mon = 2 - 1;
22792 tm.tm_mday = 1;
22793 tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
22794 tm.tm_isdst = -1;
369e19fc 22795
5476a9a4
GM
22796 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
22797 instead of "TZ=America/Vancouver" in order to detect the bug even
22798 on systems that don't support the Olson extension, or don't have the
22799 full zoneinfo tables installed. */
22800 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
067d23c9 22801
5476a9a4 22802 t = mktime (&tm);
067d23c9 22803
5476a9a4
GM
22804 /* Check that the result is either a failure, or close enough
22805 to the correct answer that we can assume the discrepancy is
22806 due to leap seconds. */
22807 return (t == (time_t) -1
22808 || (0 < t && answer - 120 <= t && t <= answer + 120));
22809}
067d23c9 22810
f199cab1
GM
22811int
22812main ()
22813{
5476a9a4
GM
22814 int result = 0;
22815 time_t t, delta;
22816 int i, j;
22817 int time_t_signed_magnitude = (time_t) ~ (time_t) 0 < (time_t) -1;
22818 int time_t_signed = ! ((time_t) 0 < (time_t) -1);
067d23c9 22819
2393bc74 22820#if HAVE_DECL_ALARM
5476a9a4
GM
22821 /* This test makes some buggy mktime implementations loop.
22822 Give up after 60 seconds; a mktime slower than that
22823 isn't worth using anyway. */
2393bc74 22824 signal (SIGALRM, SIG_DFL);
5476a9a4 22825 alarm (60);
2393bc74 22826#endif
067d23c9 22827
5476a9a4
GM
22828 time_t_max = (! time_t_signed
22829 ? (time_t) -1
22830 : ((((time_t) 1 << (sizeof (time_t) * CHAR_BIT - 2)) - 1)
22831 * 2 + 1));
22832 time_t_min = (! time_t_signed
22833 ? (time_t) 0
22834 : time_t_signed_magnitude
22835 ? ~ (time_t) 0
22836 : ~ time_t_max);
3e0be4ab 22837
5476a9a4
GM
22838 delta = time_t_max / 997; /* a suitable prime number */
22839 for (i = 0; i < N_STRINGS; i++)
22840 {
22841 if (tz_strings[i])
22842 putenv (tz_strings[i]);
3e0be4ab 22843
5476a9a4
GM
22844 for (t = 0; t <= time_t_max - delta && (result & 1) == 0; t += delta)
22845 if (! mktime_test (t))
22846 result |= 1;
22847 if ((result & 2) == 0
22848 && ! (mktime_test ((time_t) 1)
22849 && mktime_test ((time_t) (60 * 60))
22850 && mktime_test ((time_t) (60 * 60 * 24))))
22851 result |= 2;
f199cab1 22852
5476a9a4
GM
22853 for (j = 1; (result & 4) == 0; j <<= 1)
22854 {
22855 if (! bigtime_test (j))
22856 result |= 4;
22857 if (INT_MAX / 2 < j)
22858 break;
22859 }
22860 if ((result & 8) == 0 && ! bigtime_test (INT_MAX))
22861 result |= 8;
22862 }
22863 if (! irix_6_4_bug ())
22864 result |= 16;
22865 if (! spring_forward_gap ())
22866 result |= 32;
22867 if (! year_2050_test ())
22868 result |= 64;
22869 return result;
067d23c9
KY
22870}
22871_ACEOF
5476a9a4
GM
22872if ac_fn_c_try_run "$LINENO"; then :
22873 gl_cv_func_working_mktime=yes
067d23c9 22874else
5476a9a4 22875 gl_cv_func_working_mktime=no
3e0be4ab 22876fi
5476a9a4
GM
22877rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22878 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1
GM
22879fi
22880
f199cab1 22881
5476a9a4
GM
22882fi
22883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_mktime" >&5
22884$as_echo "$gl_cv_func_working_mktime" >&6; }
f199cab1 22885
5476a9a4
GM
22886 if test $gl_cv_func_working_mktime = no; then
22887 REPLACE_MKTIME=1
22888 else
22889 REPLACE_MKTIME=0
f199cab1 22890 fi
f199cab1 22891
a6342fc8 22892 if test $REPLACE_MKTIME = 1; then
f199cab1 22893
f199cab1 22894
0eb775a3 22895
067d23c9 22896
a451f14b 22897
a451f14b 22898
743c80a7
PE
22899
22900
5476a9a4
GM
22901 gl_LIBOBJS="$gl_LIBOBJS mktime.$ac_objext"
22902
a6342fc8
GM
22903 :
22904 fi
a451f14b
PE
22905
22906
22907
e275c824
PE
22908
22909
5476a9a4 22910 GNULIB_MKTIME=1
e275c824
PE
22911
22912
22913
22914
22915
22916
22917
22918
d87ffdb7 22919
5476a9a4
GM
22920
22921
22922 if test $ac_cv_func_pselect = yes; then
22923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether signature of pselect conforms to POSIX" >&5
22924$as_echo_n "checking whether signature of pselect conforms to POSIX... " >&6; }
22925if test "${gl_cv_sig_pselect+set}" = set; then :
e275c824
PE
22926 $as_echo_n "(cached) " >&6
22927else
5476a9a4 22928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
e275c824 22929/* end confdefs.h. */
5476a9a4 22930#include <sys/select.h>
e275c824 22931
f199cab1
GM
22932int
22933main ()
22934{
5476a9a4
GM
22935int (*p) (int, fd_set *, fd_set *, fd_set *restrict,
22936 struct timespec const *restrict,
22937 sigset_t const *restrict) = pselect;
22938 return !p;
f199cab1
GM
22939 ;
22940 return 0;
22941}
e275c824 22942_ACEOF
f199cab1 22943if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 22944 gl_cv_sig_pselect=yes
3e0be4ab 22945else
5476a9a4 22946 gl_cv_sig_pselect=no
f199cab1
GM
22947fi
22948rm -f core conftest.err conftest.$ac_objext \
22949 conftest$ac_exeext conftest.$ac_ext
3e0be4ab 22950fi
5476a9a4
GM
22951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sig_pselect" >&5
22952$as_echo "$gl_cv_sig_pselect" >&6; }
b6c9d18d
GM
22953
22954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pselect detects invalid fds" >&5
22955$as_echo_n "checking whether pselect detects invalid fds... " >&6; }
22956if test "${gl_cv_func_pselect_detects_ebadf+set}" = set; then :
22957 $as_echo_n "(cached) " >&6
22958else
22959
22960 if test "$cross_compiling" = yes; then :
22961
22962 case "$host_os" in
22963 # Guess yes on glibc systems.
22964 *-gnu*) gl_cv_func_pselect_detects_ebadf="guessing yes" ;;
22965 # If we don't know, assume the worst.
22966 *) gl_cv_func_pselect_detects_ebadf="guessing no" ;;
22967 esac
22968
22969else
22970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22971/* end confdefs.h. */
22972
22973#include <sys/types.h>
22974#include <sys/time.h>
22975#if HAVE_SYS_SELECT_H
22976# include <sys/select.h>
22977#endif
22978#include <unistd.h>
22979#include <errno.h>
22980
22981int
22982main ()
22983{
22984
22985 fd_set set;
22986 dup2(0, 16);
22987 FD_ZERO(&set);
22988 FD_SET(16, &set);
22989 close(16);
22990 struct timespec timeout;
22991 timeout.tv_sec = 0;
22992 timeout.tv_nsec = 5000;
22993 return pselect (17, &set, NULL, NULL, &timeout, NULL) != -1 || errno != EBADF;
22994
22995 ;
22996 return 0;
22997}
22998_ACEOF
22999if ac_fn_c_try_run "$LINENO"; then :
23000 gl_cv_func_pselect_detects_ebadf=yes
23001else
23002 gl_cv_func_pselect_detects_ebadf=no
23003fi
23004rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23005 conftest.$ac_objext conftest.beam conftest.$ac_ext
23006fi
23007
23008
23009fi
23010{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pselect_detects_ebadf" >&5
23011$as_echo "$gl_cv_func_pselect_detects_ebadf" >&6; }
23012 case $gl_cv_func_pselect_detects_ebadf in
23013 *yes) ;;
23014 *) REPLACE_PSELECT=1 ;;
23015 esac
5476a9a4 23016 fi
3e0be4ab 23017
5476a9a4
GM
23018 if test $ac_cv_func_pselect = no || test $gl_cv_sig_pselect = no; then
23019 REPLACE_PSELECT=1
23020 fi
3e0be4ab 23021
a6342fc8 23022 if test $HAVE_PSELECT = 0 || test $REPLACE_PSELECT = 1; then
3e0be4ab
GM
23023
23024
3e0be4ab 23025
3e0be4ab 23026
3e0be4ab 23027
3e0be4ab 23028
3e0be4ab 23029
3e0be4ab 23030
5476a9a4 23031 gl_LIBOBJS="$gl_LIBOBJS pselect.$ac_objext"
3e0be4ab 23032
a6342fc8 23033 fi
3e0be4ab
GM
23034
23035
f199cab1 23036
f199cab1 23037
f199cab1 23038
5476a9a4 23039 GNULIB_PSELECT=1
f199cab1 23040
6d153f56 23041
f199cab1 23042
3e0be4ab 23043
3e0be4ab
GM
23044
23045
f199cab1 23046
0eb775a3
GM
23047
23048
5476a9a4 23049 LIB_PTHREAD_SIGMASK=
0eb775a3 23050
f199cab1 23051
f077f61d
GM
23052
23053
23054 if test "$gl_threads_api" = posix; then
23055 if test $ac_cv_func_pthread_sigmask = yes; then
23056 :
23057 else
23058 if test -n "$LIBMULTITHREAD"; then
23059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_sigmask in $LIBMULTITHREAD" >&5
23060$as_echo_n "checking for pthread_sigmask in $LIBMULTITHREAD... " >&6; }
23061if test "${gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD+set}" = set; then :
23062 $as_echo_n "(cached) " >&6
23063else
23064 gl_save_LIBS="$LIBS"
23065 LIBS="$LIBS $LIBMULTITHREAD"
23066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23067/* end confdefs.h. */
23068#include <pthread.h>
23069 #include <signal.h>
23070
23071int
23072main ()
23073{
23074return pthread_sigmask (0, (sigset_t *) 0, (sigset_t *) 0);
23075 ;
23076 return 0;
23077}
23078
23079_ACEOF
23080if ac_fn_c_try_link "$LINENO"; then :
23081 gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD=yes
23082else
23083 gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD=no
23084fi
23085rm -f core conftest.err conftest.$ac_objext \
23086 conftest$ac_exeext conftest.$ac_ext
23087 LIBS="$gl_save_LIBS"
23088
23089fi
23090{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD" >&5
23091$as_echo "$gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD" >&6; }
23092 if test $gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD = yes; then
23093 LIB_PTHREAD_SIGMASK="$LIBMULTITHREAD"
23094 else
23095 HAVE_PTHREAD_SIGMASK=0
23096 fi
23097 else
23098 HAVE_PTHREAD_SIGMASK=0
23099 fi
23100 fi
5476a9a4 23101 else
f077f61d
GM
23102 if test $ac_cv_func_pthread_sigmask = yes; then
23103 REPLACE_PTHREAD_SIGMASK=1
23104 else
23105 HAVE_PTHREAD_SIGMASK=0
23106 fi
5476a9a4 23107 fi
6d153f56 23108
52724a05 23109
6d153f56
GM
23110
23111
5476a9a4
GM
23112 if test $HAVE_PTHREAD_SIGMASK = 1; then
23113
23114
23115 if test -z "$LIB_PTHREAD_SIGMASK"; then
23116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask works without -lpthread" >&5
23117$as_echo_n "checking whether pthread_sigmask works without -lpthread... " >&6; }
23118if test "${gl_cv_func_pthread_sigmask_in_libc_works+set}" = set; then :
f199cab1
GM
23119 $as_echo_n "(cached) " >&6
23120else
5476a9a4
GM
23121
23122 if test "$cross_compiling" = yes; then :
23123
23124 case "$host_os" in
23125 freebsd* | hpux* | solaris | solaris2.[2-9]*)
23126 gl_cv_func_pthread_sigmask_in_libc_works="guessing no";;
23127 *)
23128 gl_cv_func_pthread_sigmask_in_libc_works="guessing yes";;
23129 esac
23130
23131else
23132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 23133/* end confdefs.h. */
6d153f56 23134
5476a9a4
GM
23135#include <pthread.h>
23136#include <signal.h>
23137#include <stddef.h>
23138int main ()
f199cab1 23139{
5476a9a4
GM
23140 sigset_t set;
23141 sigemptyset (&set);
23142 return pthread_sigmask (1729, &set, NULL) != 0;
f199cab1
GM
23143}
23144_ACEOF
5476a9a4
GM
23145if ac_fn_c_try_run "$LINENO"; then :
23146 gl_cv_func_pthread_sigmask_in_libc_works=no
f199cab1 23147else
5476a9a4 23148 gl_cv_func_pthread_sigmask_in_libc_works=yes
f199cab1 23149fi
5476a9a4
GM
23150rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23151 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1 23152fi
5476a9a4
GM
23153
23154
f199cab1 23155fi
5476a9a4
GM
23156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_in_libc_works" >&5
23157$as_echo "$gl_cv_func_pthread_sigmask_in_libc_works" >&6; }
23158 case "$gl_cv_func_pthread_sigmask_in_libc_works" in
23159 *no)
23160 REPLACE_PTHREAD_SIGMASK=1
cc322c06 23161
5476a9a4 23162$as_echo "#define PTHREAD_SIGMASK_INEFFECTIVE 1" >>confdefs.h
cc322c06 23163
5476a9a4
GM
23164 ;;
23165 esac
23166 fi
3e0be4ab 23167
5476a9a4
GM
23168 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask returns error numbers" >&5
23169$as_echo_n "checking whether pthread_sigmask returns error numbers... " >&6; }
23170if test "${gl_cv_func_pthread_sigmask_return_works+set}" = set; then :
3e0be4ab
GM
23171 $as_echo_n "(cached) " >&6
23172else
5476a9a4
GM
23173
23174 gl_save_LIBS="$LIBS"
23175 LIBS="$LIBS $LIB_PTHREAD_SIGMASK"
23176 if test "$cross_compiling" = yes; then :
23177 case "$host_os" in
23178 cygwin*)
23179 gl_cv_func_pthread_sigmask_return_works="guessing no";;
23180 *)
23181 gl_cv_func_pthread_sigmask_return_works="guessing yes";;
23182 esac
23183
23184else
23185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3e0be4ab 23186/* end confdefs.h. */
f199cab1 23187
5476a9a4
GM
23188#include <pthread.h>
23189#include <signal.h>
23190#include <stddef.h>
23191int main ()
3e0be4ab 23192{
5476a9a4
GM
23193 sigset_t set;
23194 sigemptyset (&set);
23195 if (pthread_sigmask (1729, &set, NULL) == -1)
23196 return 1;
3e0be4ab
GM
23197 return 0;
23198}
6d153f56 23199_ACEOF
5476a9a4
GM
23200if ac_fn_c_try_run "$LINENO"; then :
23201 gl_cv_func_pthread_sigmask_return_works=yes
3e0be4ab 23202else
5476a9a4 23203 gl_cv_func_pthread_sigmask_return_works=no
6d153f56 23204fi
5476a9a4
GM
23205rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23206 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1 23207fi
5476a9a4
GM
23208
23209 LIBS="$gl_save_LIBS"
23210
52724a05 23211fi
5476a9a4
GM
23212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_return_works" >&5
23213$as_echo "$gl_cv_func_pthread_sigmask_return_works" >&6; }
23214 case "$gl_cv_func_pthread_sigmask_return_works" in
23215 *no)
23216 REPLACE_PTHREAD_SIGMASK=1
6d153f56 23217
5476a9a4 23218$as_echo "#define PTHREAD_SIGMASK_FAILS_WITH_ERRNO 1" >>confdefs.h
6d153f56 23219
5476a9a4
GM
23220 ;;
23221 esac
cc322c06 23222
5476a9a4
GM
23223 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask unblocks signals correctly" >&5
23224$as_echo_n "checking whether pthread_sigmask unblocks signals correctly... " >&6; }
23225if test "${gl_cv_func_pthread_sigmask_unblock_works+set}" = set; then :
f199cab1
GM
23226 $as_echo_n "(cached) " >&6
23227else
5476a9a4
GM
23228
23229 case "$host_os" in
23230 irix*)
23231 gl_cv_func_pthread_sigmask_unblock_works="guessing no";;
23232 *)
23233 gl_cv_func_pthread_sigmask_unblock_works="guessing yes";;
23234 esac
23235 gl_save_LIBS="$LIBS"
23236 LIBS="$LIBS $LIBMULTITHREAD"
23237 if test "$cross_compiling" = yes; then :
23238 :
f199cab1 23239else
5476a9a4
GM
23240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23241/* end confdefs.h. */
6d153f56 23242
5476a9a4
GM
23243#include <pthread.h>
23244#include <signal.h>
23245#include <stdio.h>
23246#include <stdlib.h>
23247#include <unistd.h>
23248static volatile int sigint_occurred;
23249static void
23250sigint_handler (int sig)
23251{
23252 sigint_occurred++;
23253}
23254int main ()
23255{
23256 sigset_t set;
23257 int pid = getpid ();
23258 char command[80];
23259 signal (SIGINT, sigint_handler);
23260 sigemptyset (&set);
23261 sigaddset (&set, SIGINT);
23262 if (!(pthread_sigmask (SIG_BLOCK, &set, NULL) == 0))
23263 return 1;
23264 sprintf (command, "sh -c 'sleep 1; kill -%d %d' &", SIGINT, pid);
23265 if (!(system (command) == 0))
23266 return 2;
23267 sleep (2);
23268 if (!(sigint_occurred == 0))
23269 return 3;
23270 if (!(pthread_sigmask (SIG_UNBLOCK, &set, NULL) == 0))
23271 return 4;
23272 if (!(sigint_occurred == 1)) /* This fails on IRIX. */
23273 return 5;
23274 return 0;
23275}
23276_ACEOF
23277if ac_fn_c_try_run "$LINENO"; then :
23278 :
23279else
23280 gl_cv_func_pthread_sigmask_unblock_works=no
f199cab1 23281fi
5476a9a4
GM
23282rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23283 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1 23284fi
5476a9a4
GM
23285
23286 LIBS="$gl_save_LIBS"
23287
f199cab1 23288fi
5476a9a4
GM
23289{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_unblock_works" >&5
23290$as_echo "$gl_cv_func_pthread_sigmask_unblock_works" >&6; }
23291 case "$gl_cv_func_pthread_sigmask_unblock_works" in
23292 *no)
23293 REPLACE_PTHREAD_SIGMASK=1
6d153f56 23294
5476a9a4 23295$as_echo "#define PTHREAD_SIGMASK_UNBLOCK_BUG 1" >>confdefs.h
6d153f56 23296
5476a9a4
GM
23297 ;;
23298 esac
6d153f56 23299 fi
6d153f56 23300
a6342fc8 23301 if test $HAVE_PTHREAD_SIGMASK = 0 || test $REPLACE_PTHREAD_SIGMASK = 1; then
a451f14b 23302
a451f14b 23303
743c80a7
PE
23304
23305
23306
23307
23308
f199cab1 23309
5476a9a4 23310 gl_LIBOBJS="$gl_LIBOBJS pthread_sigmask.$ac_objext"
743c80a7
PE
23311
23312
5476a9a4 23313 if test $HAVE_PTHREAD_SIGMASK = 1; then
743c80a7 23314
5476a9a4 23315$as_echo "#define HAVE_PTHREAD_SIGMASK 1" >>confdefs.h
743c80a7 23316
5476a9a4 23317 fi
743c80a7 23318
a6342fc8 23319 fi
938a4ef9 23320
938a4ef9 23321
938a4ef9 23322
938a4ef9 23323
938a4ef9 23324
5476a9a4 23325 GNULIB_PTHREAD_SIGMASK=1
a451f14b 23326
a451f14b 23327
743c80a7
PE
23328
23329
23330
23331
23332
b5591ebb
GM
23333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for putenv compatible with GNU and SVID" >&5
23334$as_echo_n "checking for putenv compatible with GNU and SVID... " >&6; }
23335if test "${gl_cv_func_svid_putenv+set}" = set; then :
23336 $as_echo_n "(cached) " >&6
23337else
23338 if test "$cross_compiling" = yes; then :
23339 case "$host_os" in
23340 # Guess yes on glibc systems.
23341 *-gnu*) gl_cv_func_svid_putenv="guessing yes" ;;
23342 # If we don't know, assume the worst.
23343 *) gl_cv_func_svid_putenv="guessing no" ;;
23344 esac
23345
23346else
23347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23348/* end confdefs.h. */
23349$ac_includes_default
23350int
23351main ()
23352{
23353
23354 /* Put it in env. */
23355 if (putenv ("CONFTEST_putenv=val"))
23356 return 1;
23357
23358 /* Try to remove it. */
23359 if (putenv ("CONFTEST_putenv"))
23360 return 2;
23361
23362 /* Make sure it was deleted. */
23363 if (getenv ("CONFTEST_putenv") != 0)
23364 return 3;
23365
23366 return 0;
23367
23368 ;
23369 return 0;
23370}
23371_ACEOF
23372if ac_fn_c_try_run "$LINENO"; then :
23373 gl_cv_func_svid_putenv=yes
23374else
23375 gl_cv_func_svid_putenv=no
23376fi
23377rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23378 conftest.$ac_objext conftest.beam conftest.$ac_ext
23379fi
23380
23381
23382fi
23383{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_svid_putenv" >&5
23384$as_echo "$gl_cv_func_svid_putenv" >&6; }
23385 case "$gl_cv_func_svid_putenv" in
23386 *yes) ;;
23387 *)
23388 REPLACE_PUTENV=1
23389 ;;
23390 esac
23391
23392 if test $REPLACE_PUTENV = 1; then
23393
23394
23395
23396
23397
23398
23399
23400
23401 gl_LIBOBJS="$gl_LIBOBJS putenv.$ac_objext"
23402
c175d440 23403
2393bc74
GM
23404 ac_fn_c_check_decl "$LINENO" "_putenv" "ac_cv_have_decl__putenv" "$ac_includes_default"
23405if test "x$ac_cv_have_decl__putenv" = x""yes; then :
23406 ac_have_decl=1
23407else
23408 ac_have_decl=0
c175d440 23409fi
2393bc74
GM
23410
23411cat >>confdefs.h <<_ACEOF
23412#define HAVE_DECL__PUTENV $ac_have_decl
23413_ACEOF
c175d440
GM
23414
23415
b5591ebb
GM
23416 fi
23417
23418
23419
23420
23421
23422 GNULIB_PUTENV=1
23423
23424
23425
23426
23427
23428
23429
743c80a7 23430
5476a9a4
GM
23431 if test $ac_cv_func_readlink = no; then
23432 HAVE_READLINK=0
23433 else
23434 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
23435$as_echo_n "checking whether readlink signature is correct... " >&6; }
23436if test "${gl_cv_decl_readlink_works+set}" = set; then :
3e0be4ab
GM
23437 $as_echo_n "(cached) " >&6
23438else
f199cab1 23439 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3e0be4ab 23440/* end confdefs.h. */
5476a9a4
GM
23441#include <unistd.h>
23442 /* Cause compilation failure if original declaration has wrong type. */
23443 ssize_t readlink (const char *, char *, size_t);
f199cab1
GM
23444int
23445main ()
23446{
5476a9a4 23447
f199cab1
GM
23448 ;
23449 return 0;
23450}
3e0be4ab 23451_ACEOF
5476a9a4
GM
23452if ac_fn_c_try_compile "$LINENO"; then :
23453 gl_cv_decl_readlink_works=yes
23454else
23455 gl_cv_decl_readlink_works=no
3e0be4ab 23456fi
5476a9a4
GM
23457rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23458fi
23459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5
23460$as_echo "$gl_cv_decl_readlink_works" >&6; }
23461 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
23462$as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; }
23463if test "${gl_cv_func_readlink_works+set}" = set; then :
23464 $as_echo_n "(cached) " >&6
23465else
23466 # We have readlink, so assume ln -s works.
23467 ln -s conftest.no-such conftest.link
23468 ln -s conftest.link conftest.lnk2
23469 if test "$cross_compiling" = yes; then :
23470 case "$host_os" in
23471 # Guess yes on glibc systems.
23472 *-gnu*) gl_cv_func_readlink_works="guessing yes" ;;
23473 # If we don't know, assume the worst.
23474 *) gl_cv_func_readlink_works="guessing no" ;;
23475 esac
23476
23477else
f199cab1 23478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 23479/* end confdefs.h. */
5476a9a4
GM
23480#include <unistd.h>
23481
f199cab1
GM
23482int
23483main ()
23484{
5476a9a4
GM
23485char buf[20];
23486 return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;
f199cab1
GM
23487 ;
23488 return 0;
23489}
067d23c9 23490_ACEOF
5476a9a4
GM
23491if ac_fn_c_try_run "$LINENO"; then :
23492 gl_cv_func_readlink_works=yes
23493else
23494 gl_cv_func_readlink_works=no
067d23c9 23495fi
5476a9a4
GM
23496rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23497 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1 23498fi
067d23c9 23499
5476a9a4 23500 rm -f conftest.link conftest.lnk2
f199cab1 23501fi
5476a9a4
GM
23502{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_works" >&5
23503$as_echo "$gl_cv_func_readlink_works" >&6; }
23504 case "$gl_cv_func_readlink_works" in
23505 *yes)
23506 if test "$gl_cv_decl_readlink_works" != yes; then
23507 REPLACE_READLINK=1
23508 fi
23509 ;;
23510 *)
067d23c9 23511
5476a9a4 23512$as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
067d23c9 23513
5476a9a4
GM
23514 REPLACE_READLINK=1
23515 ;;
23516 esac
23517 fi
3e0be4ab 23518
a6342fc8 23519 if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
3e0be4ab
GM
23520
23521
23522
23523
3e0be4ab
GM
23524
23525
5476a9a4
GM
23526
23527
23528 gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext"
23529
23530
23531 :
3e0be4ab 23532
a6342fc8 23533 fi
3e0be4ab 23534
067d23c9 23535
067d23c9 23536
067d23c9 23537
067d23c9 23538
5476a9a4 23539 GNULIB_READLINK=1
067d23c9 23540
067d23c9 23541
067d23c9 23542
067d23c9
KY
23543
23544
067d23c9 23545
d7ad186c
GM
23546
23547
23548
23549 if test $ac_cv_func_readlinkat = no; then
23550 HAVE_READLINKAT=0
23551 fi
23552
23553 if test $HAVE_READLINKAT = 0; then
23554
23555
23556
23557
23558
23559
23560
23561
23562 gl_LIBOBJS="$gl_LIBOBJS readlinkat.$ac_objext"
23563
23564 fi
23565
23566
23567
23568
23569
23570 GNULIB_READLINKAT=1
23571
23572
23573
23574
23575
23576
e4184a20
GM
23577 for ac_func in sig2str
23578do :
23579 ac_fn_c_check_func "$LINENO" "sig2str" "ac_cv_func_sig2str"
23580if test "x$ac_cv_func_sig2str" = x""yes; then :
23581 cat >>confdefs.h <<_ACEOF
23582#define HAVE_SIG2STR 1
23583_ACEOF
23584
23585fi
23586done
23587
23588
23589 if test $ac_cv_func_sig2str = no; then
23590
23591
23592
23593
23594
23595
23596
23597
23598 gl_LIBOBJS="$gl_LIBOBJS sig2str.$ac_objext"
23599
23600
23601 :
23602
23603 fi
23604
369e19fc 23605
067d23c9 23606
5476a9a4
GM
23607
23608
23609
23610
23611
23612
23613
23614
23615 if test $gl_cv_have_include_next = yes; then
23616 gl_cv_next_signal_h='<'signal.h'>'
23617 else
23618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
23619$as_echo_n "checking absolute name of <signal.h>... " >&6; }
23620if test "${gl_cv_next_signal_h+set}" = set; then :
0eb775a3 23621 $as_echo_n "(cached) " >&6
0eb775a3 23622else
5476a9a4
GM
23623
23624 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0eb775a3 23625/* end confdefs.h. */
5476a9a4 23626#include <signal.h>
f199cab1 23627
0eb775a3 23628_ACEOF
5476a9a4
GM
23629 case "$host_os" in
23630 aix*) gl_absname_cpp="$ac_cpp -C" ;;
23631 *) gl_absname_cpp="$ac_cpp" ;;
23632 esac
0eb775a3 23633
5476a9a4
GM
23634 case "$host_os" in
23635 mingw*)
23636 gl_dirsep_regex='[/\\]'
23637 ;;
23638 *)
23639 gl_dirsep_regex='\/'
23640 ;;
23641 esac
23642 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
0eb775a3 23643
5476a9a4
GM
23644 gl_header_literal_regex=`echo 'signal.h' \
23645 | sed -e "$gl_make_literal_regex_sed"`
23646 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23647 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23648 s|^/[^/]|//&|
23649 p
23650 q
23651 }'
23652 gl_cv_next_signal_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23653 sed -n "$gl_absolute_header_sed"`'"'
0eb775a3 23654
f199cab1 23655
5476a9a4
GM
23656fi
23657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
23658$as_echo "$gl_cv_next_signal_h" >&6; }
23659 fi
23660 NEXT_SIGNAL_H=$gl_cv_next_signal_h
067d23c9 23661
5476a9a4
GM
23662 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23663 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23664 gl_next_as_first_directive='<'signal.h'>'
23665 else
23666 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23667 gl_next_as_first_directive=$gl_cv_next_signal_h
23668 fi
23669 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
067d23c9 23670
067d23c9
KY
23671
23672
067d23c9 23673
067d23c9 23674
5476a9a4
GM
23675# AIX declares sig_atomic_t to already include volatile, and C89 compilers
23676# then choke on 'volatile sig_atomic_t'. C99 requires that it compile.
23677 ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
23678#include <signal.h>
23679
23680"
23681if test "x$ac_cv_type_volatile_sig_atomic_t" = x""yes; then :
23682
23683else
23684 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
f199cab1 23685fi
067d23c9 23686
067d23c9 23687
067d23c9 23688
067d23c9 23689
938a4ef9 23690
938a4ef9 23691
5476a9a4
GM
23692
23693 ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
23694#include <signal.h>
23695
23696"
23697if test "x$ac_cv_type_sighandler_t" = x""yes; then :
23698
23699else
23700 HAVE_SIGHANDLER_T=0
23701fi
23702
23703
23704
23705
a6342fc8 23706 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
5476a9a4
GM
23707/* <sys/types.h> is not needed according to POSIX, but the
23708 <sys/socket.h> in i386-unknown-freebsd4.10 and
23709 powerpc-apple-darwin5.5 required it. */
23710#include <sys/types.h>
23711#if HAVE_SYS_SOCKET_H
23712# include <sys/socket.h>
23713#elif HAVE_WS2TCPIP_H
23714# include <ws2tcpip.h>
23715#endif
23716
23717"
23718if test "x$ac_cv_type_socklen_t" = x""yes; then :
23719
067d23c9 23720else
5476a9a4
GM
23721 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5
23722$as_echo_n "checking for socklen_t equivalent... " >&6; }
23723 if test "${gl_cv_socklen_t_equiv+set}" = set; then :
23724 $as_echo_n "(cached) " >&6
23725else
23726 # Systems have either "struct sockaddr *" or
23727 # "void *" as the second argument to getpeername
23728 gl_cv_socklen_t_equiv=
23729 for arg2 in "struct sockaddr" void; do
23730 for t in int size_t "unsigned int" "long int" "unsigned long int"; do
23731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 23732/* end confdefs.h. */
5476a9a4
GM
23733#include <sys/types.h>
23734 #include <sys/socket.h>
23735
23736 int getpeername (int, $arg2 *, $t *);
f199cab1
GM
23737int
23738main ()
23739{
5476a9a4
GM
23740$t len;
23741 getpeername (0, 0, &len);
f199cab1
GM
23742 ;
23743 return 0;
23744}
3e0be4ab 23745_ACEOF
5476a9a4
GM
23746if ac_fn_c_try_compile "$LINENO"; then :
23747 gl_cv_socklen_t_equiv="$t"
067d23c9 23748fi
5476a9a4
GM
23749rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23750 test "$gl_cv_socklen_t_equiv" != "" && break
23751 done
23752 test "$gl_cv_socklen_t_equiv" != "" && break
23753 done
067d23c9 23754
5476a9a4 23755fi
067d23c9 23756
5476a9a4
GM
23757 if test "$gl_cv_socklen_t_equiv" = ""; then
23758 as_fn_error "Cannot find a type to use in place of socklen_t" "$LINENO" 5
23759 fi
23760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socklen_t_equiv" >&5
23761$as_echo "$gl_cv_socklen_t_equiv" >&6; }
23762
23763cat >>confdefs.h <<_ACEOF
23764#define socklen_t $gl_cv_socklen_t_equiv
23765_ACEOF
067d23c9 23766
f199cab1 23767fi
3e0be4ab 23768
3e0be4ab 23769
5476a9a4
GM
23770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
23771$as_echo_n "checking for ssize_t... " >&6; }
23772if test "${gt_cv_ssize_t+set}" = set; then :
f199cab1
GM
23773 $as_echo_n "(cached) " >&6
23774else
5476a9a4 23775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 23776/* end confdefs.h. */
5476a9a4 23777#include <sys/types.h>
f199cab1
GM
23778int
23779main ()
23780{
5476a9a4
GM
23781int x = sizeof (ssize_t *) + sizeof (ssize_t);
23782 return !x;
f199cab1
GM
23783 ;
23784 return 0;
23785}
23786_ACEOF
5476a9a4
GM
23787if ac_fn_c_try_compile "$LINENO"; then :
23788 gt_cv_ssize_t=yes
067d23c9 23789else
5476a9a4 23790 gt_cv_ssize_t=no
f199cab1 23791fi
5476a9a4 23792rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
067d23c9 23793fi
5476a9a4
GM
23794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
23795$as_echo "$gt_cv_ssize_t" >&6; }
23796 if test $gt_cv_ssize_t = no; then
23797
23798$as_echo "#define ssize_t int" >>confdefs.h
23799
23800 fi
23801
23802
23803
23804
23805
5476a9a4
GM
23806 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>
23807 #include <sys/stat.h>
23808"
23809if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = x""yes; then :
23810
23811cat >>confdefs.h <<_ACEOF
23812#define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1
23813_ACEOF
23814
23815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5
23816$as_echo_n "checking whether struct stat.st_atim is of type struct timespec... " >&6; }
23817if test "${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+set}" = set; then :
f199cab1
GM
23818 $as_echo_n "(cached) " >&6
23819else
5476a9a4 23820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 23821/* end confdefs.h. */
3e0be4ab 23822
5476a9a4
GM
23823 #include <sys/types.h>
23824 #include <sys/stat.h>
23825 #if HAVE_SYS_TIME_H
23826 # include <sys/time.h>
23827 #endif
23828 #include <time.h>
23829 struct timespec ts;
23830 struct stat st;
23831
f199cab1
GM
23832int
23833main ()
23834{
5476a9a4
GM
23835
23836 st.st_atim = ts;
23837
f199cab1
GM
23838 ;
23839 return 0;
23840}
3e0be4ab 23841_ACEOF
5476a9a4
GM
23842if ac_fn_c_try_compile "$LINENO"; then :
23843 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes
f199cab1 23844else
5476a9a4 23845 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no
f199cab1 23846fi
5476a9a4 23847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
067d23c9 23848fi
5476a9a4
GM
23849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5
23850$as_echo "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; }
23851 if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
067d23c9 23852
5476a9a4 23853$as_echo "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h
067d23c9 23854
5476a9a4
GM
23855 fi
23856else
23857 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>
23858 #include <sys/stat.h>
23859"
23860if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = x""yes; then :
067d23c9 23861
5476a9a4
GM
23862cat >>confdefs.h <<_ACEOF
23863#define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1
23864_ACEOF
3e0be4ab 23865
0eb775a3 23866
3e0be4ab 23867else
5476a9a4
GM
23868 ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h>
23869 #include <sys/stat.h>
23870"
23871if test "x$ac_cv_member_struct_stat_st_atimensec" = x""yes; then :
23872
23873cat >>confdefs.h <<_ACEOF
23874#define HAVE_STRUCT_STAT_ST_ATIMENSEC 1
067d23c9 23875_ACEOF
5476a9a4
GM
23876
23877
067d23c9 23878else
5476a9a4
GM
23879 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>
23880 #include <sys/stat.h>
23881"
23882if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = x""yes; then :
23883
23884cat >>confdefs.h <<_ACEOF
23885#define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1
23886_ACEOF
23887
23888
3e0be4ab 23889fi
5476a9a4 23890
067d23c9 23891fi
5476a9a4 23892
067d23c9 23893fi
067d23c9
KY
23894
23895fi
23896
067d23c9 23897
067d23c9 23898
067d23c9 23899
067d23c9 23900
5476a9a4
GM
23901 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>
23902 #include <sys/stat.h>
23903"
23904if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = x""yes; then :
23905
23906cat >>confdefs.h <<_ACEOF
23907#define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1
23908_ACEOF
067d23c9
KY
23909
23910
f199cab1 23911else
5476a9a4
GM
23912 ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include <sys/types.h>
23913 #include <sys/stat.h>
23914"
23915if test "x$ac_cv_member_struct_stat_st_birthtimensec" = x""yes; then :
067d23c9 23916
5476a9a4
GM
23917cat >>confdefs.h <<_ACEOF
23918#define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1
23919_ACEOF
067d23c9 23920
3e0be4ab 23921
067d23c9 23922else
5476a9a4
GM
23923 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>
23924 #include <sys/stat.h>
23925"
23926if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = x""yes; then :
067d23c9 23927
5476a9a4
GM
23928cat >>confdefs.h <<_ACEOF
23929#define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1
067d23c9 23930_ACEOF
5476a9a4
GM
23931
23932
f199cab1 23933fi
5476a9a4 23934
f199cab1 23935fi
5476a9a4 23936
067d23c9 23937fi
0eb775a3 23938
0eb775a3 23939
0eb775a3 23940
5476a9a4
GM
23941 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working stdalign.h" >&5
23942$as_echo_n "checking for working stdalign.h... " >&6; }
23943if test "${gl_cv_header_working_stdalign_h+set}" = set; then :
f199cab1 23944 $as_echo_n "(cached) " >&6
067d23c9 23945else
5476a9a4 23946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 23947/* end confdefs.h. */
5476a9a4
GM
23948#include <stdalign.h>
23949 #include <stddef.h>
23950
23951 /* Test that alignof yields a result consistent with offsetof.
23952 This catches GCC bug 52023
23953 <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. */
23954 #ifdef __cplusplus
23955 template <class t> struct alignof_helper { char a; t b; };
23956 # define ao(type) offsetof (alignof_helper<type>, b)
23957 #else
23958 # define ao(type) offsetof (struct { char a; type b; }, b)
23959 #endif
23960 char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1];
23961 char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1];
23962 char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1];
23963
23964 /* Test _Alignas only on platforms where gnulib can help. */
23965 #if \
23966 (__GNUC__ || __IBMC__ || __IBMCPP__ \
23967 || 0x5110 <= __SUNPRO_C || 1300 <= _MSC_VER)
23968 int alignas (8) alignas_int = 1;
23969 char test_alignas[_Alignof (alignas_int) == 8 ? 1 : -1];
23970 #endif
067d23c9 23971
f199cab1
GM
23972int
23973main ()
23974{
5476a9a4 23975
f199cab1
GM
23976 ;
23977 return 0;
23978}
23979_ACEOF
5476a9a4
GM
23980if ac_fn_c_try_compile "$LINENO"; then :
23981 gl_cv_header_working_stdalign_h=yes
f199cab1 23982else
5476a9a4 23983 gl_cv_header_working_stdalign_h=no
f199cab1 23984fi
5476a9a4 23985rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
067d23c9 23986fi
5476a9a4
GM
23987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdalign_h" >&5
23988$as_echo "$gl_cv_header_working_stdalign_h" >&6; }
067d23c9 23989
5476a9a4
GM
23990 if test $gl_cv_header_working_stdalign_h = yes; then
23991 STDALIGN_H=''
23992 else
23993 STDALIGN_H='stdalign.h'
f199cab1 23994 fi
0eb775a3 23995
5476a9a4
GM
23996
23997 if test -n "$STDALIGN_H"; then
23998 GL_GENERATE_STDALIGN_H_TRUE=
23999 GL_GENERATE_STDALIGN_H_FALSE='#'
f199cab1 24000else
5476a9a4
GM
24001 GL_GENERATE_STDALIGN_H_TRUE='#'
24002 GL_GENERATE_STDALIGN_H_FALSE=
0eb775a3 24003fi
0eb775a3
GM
24004
24005
24006
5476a9a4
GM
24007 STDARG_H=''
24008 NEXT_STDARG_H='<stdarg.h>'
24009 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5
24010$as_echo_n "checking for va_copy... " >&6; }
24011 if test "${gl_cv_func_va_copy+set}" = set; then :
f199cab1 24012 $as_echo_n "(cached) " >&6
5476a9a4
GM
24013else
24014
24015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24016/* end confdefs.h. */
24017#include <stdarg.h>
f199cab1
GM
24018int
24019main ()
24020{
5476a9a4
GM
24021
24022#ifndef va_copy
24023void (*func) (va_list, va_list) = va_copy;
24024#endif
24025
f199cab1
GM
24026 ;
24027 return 0;
24028}
24029_ACEOF
5476a9a4
GM
24030if ac_fn_c_try_compile "$LINENO"; then :
24031 gl_cv_func_va_copy=yes
f199cab1 24032else
5476a9a4 24033 gl_cv_func_va_copy=no
f199cab1 24034fi
5476a9a4 24035rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 24036fi
5476a9a4
GM
24037
24038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_va_copy" >&5
24039$as_echo "$gl_cv_func_va_copy" >&6; }
24040 if test $gl_cv_func_va_copy = no; then
24041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24042/* end confdefs.h. */
24043#if defined _AIX && !defined __GNUC__
24044 AIX vaccine
24045 #endif
24046
24047_ACEOF
24048if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
24049 $EGREP "vaccine" >/dev/null 2>&1; then :
24050 gl_aixcc=yes
f199cab1 24051else
5476a9a4 24052 gl_aixcc=no
f199cab1 24053fi
5476a9a4 24054rm -f conftest*
0eb775a3 24055
5476a9a4
GM
24056 if test $gl_aixcc = yes; then
24057 STDARG_H=stdarg.h
0eb775a3
GM
24058
24059
5476a9a4
GM
24060
24061
24062
24063
24064
24065
24066 if test $gl_cv_have_include_next = yes; then
24067 gl_cv_next_stdarg_h='<'stdarg.h'>'
24068 else
24069 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdarg.h>" >&5
24070$as_echo_n "checking absolute name of <stdarg.h>... " >&6; }
24071if test "${gl_cv_next_stdarg_h+set}" = set; then :
f199cab1
GM
24072 $as_echo_n "(cached) " >&6
24073else
5476a9a4
GM
24074
24075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 24076/* end confdefs.h. */
5476a9a4 24077#include <stdarg.h>
0eb775a3 24078
f199cab1 24079_ACEOF
5476a9a4
GM
24080 case "$host_os" in
24081 aix*) gl_absname_cpp="$ac_cpp -C" ;;
24082 *) gl_absname_cpp="$ac_cpp" ;;
24083 esac
24084
24085 case "$host_os" in
24086 mingw*)
24087 gl_dirsep_regex='[/\\]'
24088 ;;
24089 *)
24090 gl_dirsep_regex='\/'
24091 ;;
24092 esac
24093 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
24094
24095 gl_header_literal_regex=`echo 'stdarg.h' \
24096 | sed -e "$gl_make_literal_regex_sed"`
24097 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
24098 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
24099 s|^/[^/]|//&|
24100 p
24101 q
24102 }'
24103 gl_cv_next_stdarg_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24104 sed -n "$gl_absolute_header_sed"`'"'
24105
24106
f199cab1 24107fi
5476a9a4
GM
24108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdarg_h" >&5
24109$as_echo "$gl_cv_next_stdarg_h" >&6; }
24110 fi
24111 NEXT_STDARG_H=$gl_cv_next_stdarg_h
24112
24113 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24114 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
24115 gl_next_as_first_directive='<'stdarg.h'>'
24116 else
24117 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
24118 gl_next_as_first_directive=$gl_cv_next_stdarg_h
24119 fi
24120 NEXT_AS_FIRST_DIRECTIVE_STDARG_H=$gl_next_as_first_directive
0eb775a3
GM
24121
24122
24123
5476a9a4
GM
24124
24125 if test "$gl_cv_next_stdarg_h" = '""'; then
24126 gl_cv_next_stdarg_h='"///usr/include/stdarg.h"'
24127 NEXT_STDARG_H="$gl_cv_next_stdarg_h"
24128 fi
f199cab1 24129 else
5476a9a4
GM
24130
24131 saved_as_echo_n="$as_echo_n"
24132 as_echo_n=':'
24133 if test "${gl_cv_func___va_copy+set}" = set; then :
f199cab1
GM
24134 $as_echo_n "(cached) " >&6
24135else
0eb775a3 24136
5476a9a4
GM
24137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24138/* end confdefs.h. */
24139#include <stdarg.h>
f199cab1
GM
24140int
24141main ()
24142{
5476a9a4
GM
24143
24144#ifndef __va_copy
24145error, bail out
24146#endif
24147
f199cab1
GM
24148 ;
24149 return 0;
24150}
24151_ACEOF
5476a9a4
GM
24152if ac_fn_c_try_compile "$LINENO"; then :
24153 gl_cv_func___va_copy=yes
f199cab1 24154else
5476a9a4 24155 gl_cv_func___va_copy=no
f199cab1 24156fi
5476a9a4 24157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 24158fi
0eb775a3 24159
5476a9a4
GM
24160 as_echo_n="$saved_as_echo_n"
24161
24162 if test $gl_cv_func___va_copy = yes; then
24163
24164$as_echo "#define va_copy __va_copy" >>confdefs.h
24165
24166 else
0eb775a3 24167
5476a9a4
GM
24168
24169$as_echo "#define va_copy gl_va_copy" >>confdefs.h
0eb775a3 24170
f199cab1
GM
24171 fi
24172 fi
5476a9a4
GM
24173 fi
24174
24175 if test -n "$STDARG_H"; then
24176 GL_GENERATE_STDARG_H_TRUE=
24177 GL_GENERATE_STDARG_H_FALSE='#'
24178else
24179 GL_GENERATE_STDARG_H_TRUE='#'
24180 GL_GENERATE_STDARG_H_FALSE=
24181fi
24182
24183
24184
24185
24186
24187
24188 # Define two additional variables used in the Makefile substitution.
24189
24190 if test "$ac_cv_header_stdbool_h" = yes; then
24191 STDBOOL_H=''
24192 else
24193 STDBOOL_H='stdbool.h'
24194 fi
24195
24196 if test -n "$STDBOOL_H"; then
24197 GL_GENERATE_STDBOOL_H_TRUE=
24198 GL_GENERATE_STDBOOL_H_FALSE='#'
24199else
24200 GL_GENERATE_STDBOOL_H_TRUE='#'
24201 GL_GENERATE_STDBOOL_H_FALSE=
24202fi
24203
24204
24205 if test "$ac_cv_type__Bool" = yes; then
24206 HAVE__BOOL=1
24207 else
24208 HAVE__BOOL=0
24209 fi
24210
24211
24212
24213
24214
24215 STDDEF_H=
24216 if test $gt_cv_c_wchar_t = no; then
24217 HAVE_WCHAR_T=0
24218 STDDEF_H=stddef.h
24219 fi
24220 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
24221$as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
24222if test "${gl_cv_decl_null_works+set}" = set; then :
f199cab1
GM
24223 $as_echo_n "(cached) " >&6
24224else
5476a9a4 24225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 24226/* end confdefs.h. */
5476a9a4
GM
24227#include <stddef.h>
24228 int test[2 * (sizeof NULL == sizeof (void *)) -1];
3e0be4ab 24229
f199cab1
GM
24230int
24231main ()
24232{
5476a9a4 24233
f199cab1
GM
24234 ;
24235 return 0;
24236}
24237_ACEOF
5476a9a4
GM
24238if ac_fn_c_try_compile "$LINENO"; then :
24239 gl_cv_decl_null_works=yes
f199cab1 24240else
5476a9a4 24241 gl_cv_decl_null_works=no
f199cab1 24242fi
5476a9a4 24243rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 24244fi
5476a9a4
GM
24245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
24246$as_echo "$gl_cv_decl_null_works" >&6; }
24247 if test $gl_cv_decl_null_works = no; then
24248 REPLACE_NULL=1
24249 STDDEF_H=stddef.h
24250 fi
24251
24252 if test -n "$STDDEF_H"; then
24253 GL_GENERATE_STDDEF_H_TRUE=
24254 GL_GENERATE_STDDEF_H_FALSE='#'
f199cab1 24255else
5476a9a4
GM
24256 GL_GENERATE_STDDEF_H_TRUE='#'
24257 GL_GENERATE_STDDEF_H_FALSE=
f199cab1 24258fi
3e0be4ab 24259
5476a9a4 24260 if test -n "$STDDEF_H"; then
3e0be4ab
GM
24261
24262
5476a9a4
GM
24263
24264
24265
24266
24267
24268
24269 if test $gl_cv_have_include_next = yes; then
24270 gl_cv_next_stddef_h='<'stddef.h'>'
24271 else
24272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
24273$as_echo_n "checking absolute name of <stddef.h>... " >&6; }
24274if test "${gl_cv_next_stddef_h+set}" = set; then :
067d23c9
KY
24275 $as_echo_n "(cached) " >&6
24276else
5476a9a4
GM
24277
24278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 24279/* end confdefs.h. */
5476a9a4 24280#include <stddef.h>
f199cab1 24281
067d23c9 24282_ACEOF
5476a9a4
GM
24283 case "$host_os" in
24284 aix*) gl_absname_cpp="$ac_cpp -C" ;;
24285 *) gl_absname_cpp="$ac_cpp" ;;
24286 esac
24287
24288 case "$host_os" in
24289 mingw*)
24290 gl_dirsep_regex='[/\\]'
24291 ;;
24292 *)
24293 gl_dirsep_regex='\/'
24294 ;;
24295 esac
24296 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
24297
24298 gl_header_literal_regex=`echo 'stddef.h' \
24299 | sed -e "$gl_make_literal_regex_sed"`
24300 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
24301 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
24302 s|^/[^/]|//&|
24303 p
24304 q
24305 }'
24306 gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24307 sed -n "$gl_absolute_header_sed"`'"'
24308
24309
f199cab1 24310fi
5476a9a4
GM
24311{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
24312$as_echo "$gl_cv_next_stddef_h" >&6; }
24313 fi
24314 NEXT_STDDEF_H=$gl_cv_next_stddef_h
24315
24316 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24317 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
24318 gl_next_as_first_directive='<'stddef.h'>'
24319 else
24320 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
24321 gl_next_as_first_directive=$gl_cv_next_stddef_h
24322 fi
24323 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
24324
f199cab1 24325
f199cab1 24326
f199cab1 24327
067d23c9 24328 fi
067d23c9 24329
f199cab1 24330
067d23c9 24331
067d23c9 24332
067d23c9 24333
067d23c9
KY
24334
24335
067d23c9 24336
067d23c9
KY
24337
24338
067d23c9 24339
3e0be4ab 24340
5476a9a4
GM
24341 if test $gl_cv_have_include_next = yes; then
24342 gl_cv_next_stdio_h='<'stdio.h'>'
24343 else
24344 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
24345$as_echo_n "checking absolute name of <stdio.h>... " >&6; }
24346if test "${gl_cv_next_stdio_h+set}" = set; then :
24347 $as_echo_n "(cached) " >&6
f199cab1 24348else
5476a9a4
GM
24349
24350 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24351/* end confdefs.h. */
24352#include <stdio.h>
24353
f199cab1 24354_ACEOF
5476a9a4
GM
24355 case "$host_os" in
24356 aix*) gl_absname_cpp="$ac_cpp -C" ;;
24357 *) gl_absname_cpp="$ac_cpp" ;;
24358 esac
067d23c9 24359
5476a9a4
GM
24360 case "$host_os" in
24361 mingw*)
24362 gl_dirsep_regex='[/\\]'
24363 ;;
24364 *)
24365 gl_dirsep_regex='\/'
24366 ;;
24367 esac
24368 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
24369
24370 gl_header_literal_regex=`echo 'stdio.h' \
24371 | sed -e "$gl_make_literal_regex_sed"`
24372 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
24373 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
24374 s|^/[^/]|//&|
24375 p
24376 q
24377 }'
24378 gl_cv_next_stdio_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24379 sed -n "$gl_absolute_header_sed"`'"'
067d23c9 24380
067d23c9 24381
f199cab1 24382fi
5476a9a4
GM
24383{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
24384$as_echo "$gl_cv_next_stdio_h" >&6; }
24385 fi
24386 NEXT_STDIO_H=$gl_cv_next_stdio_h
067d23c9 24387
5476a9a4
GM
24388 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24389 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
24390 gl_next_as_first_directive='<'stdio.h'>'
24391 else
24392 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
24393 gl_next_as_first_directive=$gl_cv_next_stdio_h
24394 fi
24395 NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
24396
24397
24398
24399
24400
24401 GNULIB_FSCANF=1
24402
24403
24404cat >>confdefs.h <<_ACEOF
24405#define GNULIB_FSCANF 1
24406_ACEOF
067d23c9 24407
067d23c9 24408
5476a9a4 24409 GNULIB_SCANF=1
f199cab1 24410
f199cab1 24411
5476a9a4
GM
24412cat >>confdefs.h <<_ACEOF
24413#define GNULIB_SCANF 1
f199cab1
GM
24414_ACEOF
24415
067d23c9 24416
5476a9a4
GM
24417 GNULIB_FGETC=1
24418 GNULIB_GETC=1
24419 GNULIB_GETCHAR=1
24420 GNULIB_FGETS=1
24421 GNULIB_FREAD=1
067d23c9 24422
067d23c9 24423
5476a9a4
GM
24424 GNULIB_FPRINTF=1
24425 GNULIB_PRINTF=1
24426 GNULIB_VFPRINTF=1
24427 GNULIB_VPRINTF=1
24428 GNULIB_FPUTC=1
24429 GNULIB_PUTC=1
24430 GNULIB_PUTCHAR=1
24431 GNULIB_FPUTS=1
24432 GNULIB_PUTS=1
24433 GNULIB_FWRITE=1
067d23c9 24434
067d23c9 24435
067d23c9 24436
067d23c9 24437
067d23c9 24438
067d23c9 24439
067d23c9 24440
067d23c9 24441
3e0be4ab
GM
24442
24443
24444
24445
24446
24447
3e0be4ab 24448
5476a9a4
GM
24449 if test $gl_cv_have_include_next = yes; then
24450 gl_cv_next_stdlib_h='<'stdlib.h'>'
24451 else
24452 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
24453$as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
24454if test "${gl_cv_next_stdlib_h+set}" = set; then :
067d23c9
KY
24455 $as_echo_n "(cached) " >&6
24456else
5476a9a4
GM
24457
24458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 24459/* end confdefs.h. */
5476a9a4
GM
24460#include <stdlib.h>
24461
f199cab1 24462_ACEOF
5476a9a4
GM
24463 case "$host_os" in
24464 aix*) gl_absname_cpp="$ac_cpp -C" ;;
24465 *) gl_absname_cpp="$ac_cpp" ;;
24466 esac
067d23c9 24467
5476a9a4
GM
24468 case "$host_os" in
24469 mingw*)
24470 gl_dirsep_regex='[/\\]'
24471 ;;
24472 *)
24473 gl_dirsep_regex='\/'
24474 ;;
24475 esac
24476 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
24477
24478 gl_header_literal_regex=`echo 'stdlib.h' \
24479 | sed -e "$gl_make_literal_regex_sed"`
24480 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
24481 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
24482 s|^/[^/]|//&|
24483 p
24484 q
24485 }'
24486 gl_cv_next_stdlib_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24487 sed -n "$gl_absolute_header_sed"`'"'
3e0be4ab 24488
067d23c9 24489
f199cab1 24490fi
5476a9a4
GM
24491{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
24492$as_echo "$gl_cv_next_stdlib_h" >&6; }
24493 fi
24494 NEXT_STDLIB_H=$gl_cv_next_stdlib_h
b0415a03 24495
5476a9a4
GM
24496 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24497 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
24498 gl_next_as_first_directive='<'stdlib.h'>'
24499 else
24500 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
24501 gl_next_as_first_directive=$gl_cv_next_stdlib_h
24502 fi
24503 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
b0415a03 24504
067d23c9 24505
067d23c9 24506
067d23c9 24507
067d23c9 24508
067d23c9 24509
067d23c9 24510
067d23c9 24511
067d23c9 24512
5476a9a4 24513 # This defines (or not) HAVE_TZNAME and HAVE_TM_ZONE.
067d23c9 24514
067d23c9 24515
067d23c9 24516
b0415a03
GM
24517
24518
ac1ca7e9 24519
0eb775a3 24520
5476a9a4 24521$as_echo "#define my_strftime nstrftime" >>confdefs.h
067d23c9 24522
067d23c9 24523
a0a61e58
GM
24524
24525
24526
3e0be4ab 24527
5476a9a4
GM
24528
24529
283c7aed
GM
24530
24531
24532
5476a9a4
GM
24533 if test "$ac_cv_have_decl_strtoimax" != yes; then
24534 HAVE_DECL_STRTOIMAX=0
24535 fi
24536
24537 if test $ac_cv_func_strtoimax = yes; then
24538 HAVE_STRTOIMAX=1
24539 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtoimax works" >&5
24540$as_echo_n "checking whether strtoimax works... " >&6; }
24541if test "${gl_cv_func_strtoimax+set}" = set; then :
f199cab1
GM
24542 $as_echo_n "(cached) " >&6
24543else
24544 if test "$cross_compiling" = yes; then :
5476a9a4
GM
24545 case "$host_os" in
24546 # Guess no on AIX 5.
24547 aix5*) gl_cv_func_strtoimax="guessing no" ;;
24548 # Guess yes otherwise.
24549 *) gl_cv_func_strtoimax="guessing yes" ;;
24550 esac
24551
f199cab1
GM
24552else
24553 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24554/* end confdefs.h. */
3e0be4ab 24555
5476a9a4
GM
24556#include <errno.h>
24557#include <string.h>
24558#include <inttypes.h>
24559int main ()
24560{
24561 if (sizeof (intmax_t) > sizeof (int))
24562 {
24563 const char *s = "4294967295";
24564 char *p;
24565 intmax_t res;
24566 errno = 0;
24567 res = strtoimax (s, &p, 10);
24568 if (p != s + strlen (s))
24569 return 1;
24570 if (errno != 0)
24571 return 2;
24572 if (res != (intmax_t) 65535 * (intmax_t) 65537)
24573 return 3;
24574 }
24575 else
24576 {
24577 const char *s = "2147483647";
24578 char *p;
24579 intmax_t res;
24580 errno = 0;
24581 res = strtoimax (s, &p, 10);
24582 if (p != s + strlen (s))
24583 return 1;
24584 if (errno != 0)
24585 return 2;
24586 if (res != 2147483647)
24587 return 3;
24588 }
f199cab1
GM
24589 return 0;
24590}
5476a9a4 24591
f199cab1
GM
24592_ACEOF
24593if ac_fn_c_try_run "$LINENO"; then :
5476a9a4 24594 gl_cv_func_strtoimax=yes
f199cab1 24595else
5476a9a4 24596 gl_cv_func_strtoimax=no
f199cab1
GM
24597fi
24598rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24599 conftest.$ac_objext conftest.beam conftest.$ac_ext
067d23c9
KY
24600fi
24601
3e0be4ab 24602
f199cab1 24603fi
5476a9a4
GM
24604{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtoimax" >&5
24605$as_echo "$gl_cv_func_strtoimax" >&6; }
24606 case "$gl_cv_func_strtoimax" in
24607 *no) REPLACE_STRTOIMAX=1 ;;
24608 esac
24609 else
24610 HAVE_STRTOIMAX=0
24611 fi
067d23c9 24612
a6342fc8 24613 if test $HAVE_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; then
067d23c9 24614
067d23c9 24615
067d23c9 24616
067d23c9 24617
067d23c9 24618
3e0be4ab 24619
2b1928b8
GM
24620
24621
5476a9a4
GM
24622 gl_LIBOBJS="$gl_LIBOBJS strtoimax.$ac_objext"
24623
24624
24625 ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
24626if test "x$ac_cv_have_decl_strtoll" = x""yes; then :
24627 ac_have_decl=1
f199cab1 24628else
5476a9a4 24629 ac_have_decl=0
f199cab1 24630fi
2b1928b8 24631
5476a9a4
GM
24632cat >>confdefs.h <<_ACEOF
24633#define HAVE_DECL_STRTOLL $ac_have_decl
24634_ACEOF
24635
24636
067d23c9 24637
a6342fc8 24638 fi
067d23c9 24639
3e0be4ab
GM
24640
24641
24642
3e0be4ab 24643
5476a9a4 24644 GNULIB_STRTOIMAX=1
3e0be4ab
GM
24645
24646
24647
24648
3e0be4ab
GM
24649
24650
24651
f199cab1 24652
f199cab1 24653
5476a9a4
GM
24654 if test "$ac_cv_have_decl_strtoumax" != yes; then
24655 HAVE_DECL_STRTOUMAX=0
24656 fi
067d23c9 24657
a6342fc8 24658 if test $ac_cv_func_strtoumax = no; then
0eb775a3 24659
5476a9a4
GM
24660
24661
24662
24663
24664
24665
24666
24667 gl_LIBOBJS="$gl_LIBOBJS strtoumax.$ac_objext"
24668
24669
24670 ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
24671if test "x$ac_cv_have_decl_strtoull" = x""yes; then :
24672 ac_have_decl=1
067d23c9 24673else
5476a9a4 24674 ac_have_decl=0
067d23c9 24675fi
5476a9a4
GM
24676
24677cat >>confdefs.h <<_ACEOF
24678#define HAVE_DECL_STRTOULL $ac_have_decl
24679_ACEOF
24680
24681
24682
a6342fc8 24683 fi
067d23c9 24684
067d23c9 24685
067d23c9 24686
067d23c9 24687
067d23c9 24688
5476a9a4
GM
24689 GNULIB_STRTOUMAX=1
24690
24691
24692
24693
24694
24695
24696
24697 if test $ac_cv_func_symlink = no; then
24698 HAVE_SYMLINK=0
24699 else
24700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether symlink handles trailing slash correctly" >&5
24701$as_echo_n "checking whether symlink handles trailing slash correctly... " >&6; }
24702if test "${gl_cv_func_symlink_works+set}" = set; then :
f199cab1 24703 $as_echo_n "(cached) " >&6
5476a9a4
GM
24704else
24705 if test "$cross_compiling" = yes; then :
24706 case "$host_os" in
24707 # Guess yes on glibc systems.
24708 *-gnu*) gl_cv_func_symlink_works="guessing yes" ;;
24709 # If we don't know, assume the worst.
24710 *) gl_cv_func_symlink_works="guessing no" ;;
24711 esac
24712
f199cab1
GM
24713else
24714 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24715/* end confdefs.h. */
5476a9a4
GM
24716#include <unistd.h>
24717
f199cab1
GM
24718int
24719main ()
24720{
5476a9a4
GM
24721int result = 0;
24722 if (!symlink ("a", "conftest.link/"))
24723 result |= 1;
24724 if (symlink ("conftest.f", "conftest.lnk2"))
24725 result |= 2;
24726 else if (!symlink ("a", "conftest.lnk2/"))
24727 result |= 4;
24728 return result;
067d23c9 24729
f199cab1
GM
24730 ;
24731 return 0;
24732}
24733_ACEOF
5476a9a4
GM
24734if ac_fn_c_try_run "$LINENO"; then :
24735 gl_cv_func_symlink_works=yes
f199cab1 24736else
5476a9a4 24737 gl_cv_func_symlink_works=no
f199cab1 24738fi
5476a9a4
GM
24739rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24740 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1 24741fi
067d23c9 24742
5476a9a4 24743 rm -f conftest.f conftest.link conftest.lnk2
f199cab1 24744fi
5476a9a4
GM
24745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_symlink_works" >&5
24746$as_echo "$gl_cv_func_symlink_works" >&6; }
24747 case "$gl_cv_func_symlink_works" in
24748 *yes) ;;
24749 *)
24750 REPLACE_SYMLINK=1
24751 ;;
24752 esac
24753 fi
067d23c9 24754
a6342fc8 24755 if test $HAVE_SYMLINK = 0 || test $REPLACE_SYMLINK = 1; then
067d23c9 24756
7e723570 24757
7e723570
GM
24758
24759
dd0d840e 24760
dd0d840e
GM
24761
24762
24763
5476a9a4 24764 gl_LIBOBJS="$gl_LIBOBJS symlink.$ac_objext"
dd0d840e 24765
a6342fc8 24766 fi
dd0d840e
GM
24767
24768
d3127c14
GM
24769
24770
d3127c14 24771
5476a9a4 24772 GNULIB_SYMLINK=1
d3127c14 24773
d3127c14 24774
d3127c14
GM
24775
24776
067d23c9 24777
067d23c9 24778
d3127c14 24779
d3127c14 24780
5476a9a4
GM
24781 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/select.h> is self-contained" >&5
24782$as_echo_n "checking whether <sys/select.h> is self-contained... " >&6; }
24783if test "${gl_cv_header_sys_select_h_selfcontained+set}" = set; then :
24784 $as_echo_n "(cached) " >&6
24785else
d3127c14 24786
5476a9a4
GM
24787 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24788/* end confdefs.h. */
24789#include <sys/select.h>
24790int
24791main ()
24792{
24793struct timeval b;
24794 ;
24795 return 0;
24796}
24797_ACEOF
24798if ac_fn_c_try_compile "$LINENO"; then :
24799 gl_cv_header_sys_select_h_selfcontained=yes
24800else
24801 gl_cv_header_sys_select_h_selfcontained=no
24802fi
24803rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24804 if test $gl_cv_header_sys_select_h_selfcontained = yes; then
24805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24806/* end confdefs.h. */
24807#include <sys/select.h>
24808int
24809main ()
24810{
24811int memset; int bzero;
24812 ;
24813 return 0;
24814}
3e0be4ab 24815
5476a9a4
GM
24816_ACEOF
24817if ac_fn_c_try_compile "$LINENO"; then :
24818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24819/* end confdefs.h. */
24820#include <sys/select.h>
24821int
24822main ()
24823{
dd0d840e 24824
5476a9a4
GM
24825 #undef memset
24826 #define memset nonexistent_memset
24827 extern
24828 #ifdef __cplusplus
24829 "C"
24830 #endif
24831 void *memset (void *, int, unsigned long);
24832 #undef bzero
24833 #define bzero nonexistent_bzero
24834 extern
24835 #ifdef __cplusplus
24836 "C"
24837 #endif
24838 void bzero (void *, unsigned long);
24839 fd_set fds;
24840 FD_ZERO (&fds);
3e0be4ab 24841
5476a9a4
GM
24842 ;
24843 return 0;
24844}
067d23c9 24845
5476a9a4
GM
24846_ACEOF
24847if ac_fn_c_try_link "$LINENO"; then :
dd0d840e 24848
5476a9a4
GM
24849else
24850 gl_cv_header_sys_select_h_selfcontained=no
24851fi
24852rm -f core conftest.err conftest.$ac_objext \
24853 conftest$ac_exeext conftest.$ac_ext
dd0d840e 24854
5476a9a4
GM
24855fi
24856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24857 fi
dd0d840e 24858
5476a9a4
GM
24859fi
24860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_select_h_selfcontained" >&5
24861$as_echo "$gl_cv_header_sys_select_h_selfcontained" >&6; }
dd0d840e 24862
dd0d840e
GM
24863
24864
dd0d840e
GM
24865
24866
dd0d840e
GM
24867
24868
24869
dd0d840e 24870
5476a9a4
GM
24871 if test $gl_cv_have_include_next = yes; then
24872 gl_cv_next_sys_select_h='<'sys/select.h'>'
24873 else
24874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/select.h>" >&5
24875$as_echo_n "checking absolute name of <sys/select.h>... " >&6; }
24876if test "${gl_cv_next_sys_select_h+set}" = set; then :
24877 $as_echo_n "(cached) " >&6
24878else
dd0d840e 24879
5476a9a4 24880 if test $ac_cv_header_sys_select_h = yes; then
dd0d840e 24881
dd0d840e 24882
5476a9a4
GM
24883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24884/* end confdefs.h. */
24885#include <sys/select.h>
dd0d840e 24886
5476a9a4
GM
24887_ACEOF
24888 case "$host_os" in
24889 aix*) gl_absname_cpp="$ac_cpp -C" ;;
24890 *) gl_absname_cpp="$ac_cpp" ;;
24891 esac
dd0d840e 24892
5476a9a4
GM
24893 case "$host_os" in
24894 mingw*)
24895 gl_dirsep_regex='[/\\]'
24896 ;;
24897 *)
24898 gl_dirsep_regex='\/'
24899 ;;
24900 esac
24901 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
dd0d840e 24902
5476a9a4
GM
24903 gl_header_literal_regex=`echo 'sys/select.h' \
24904 | sed -e "$gl_make_literal_regex_sed"`
24905 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
24906 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
24907 s|^/[^/]|//&|
24908 p
24909 q
24910 }'
24911 gl_cv_next_sys_select_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24912 sed -n "$gl_absolute_header_sed"`'"'
24913 else
24914 gl_cv_next_sys_select_h='<'sys/select.h'>'
24915 fi
067d23c9 24916
067d23c9 24917
5476a9a4
GM
24918fi
24919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_select_h" >&5
24920$as_echo "$gl_cv_next_sys_select_h" >&6; }
24921 fi
24922 NEXT_SYS_SELECT_H=$gl_cv_next_sys_select_h
24923
24924 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24925 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
24926 gl_next_as_first_directive='<'sys/select.h'>'
24927 else
24928 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
24929 gl_next_as_first_directive=$gl_cv_next_sys_select_h
24930 fi
24931 NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H=$gl_next_as_first_directive
24932
24933
24934
24935
24936 if test $ac_cv_header_sys_select_h = yes; then
24937 HAVE_SYS_SELECT_H=1
24938 else
24939 HAVE_SYS_SELECT_H=0
24940 fi
067d23c9
KY
24941
24942
7e723570 24943
7e723570 24944
7e723570 24945
5476a9a4
GM
24946 if test $ac_cv_header_sys_socket_h != yes; then
24947 for ac_header in winsock2.h
24948do :
24949 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
24950if test "x$ac_cv_header_winsock2_h" = x""yes; then :
24951 cat >>confdefs.h <<_ACEOF
24952#define HAVE_WINSOCK2_H 1
24953_ACEOF
7e723570 24954
5476a9a4 24955fi
7e723570 24956
5476a9a4 24957done
7e723570 24958
5476a9a4
GM
24959 fi
24960 if test "$ac_cv_header_winsock2_h" = yes; then
24961 HAVE_WINSOCK2_H=1
24962 UNISTD_H_HAVE_WINSOCK2_H=1
24963 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
24964 else
24965 HAVE_WINSOCK2_H=0
24966 fi
7e723570
GM
24967
24968
dd0d840e 24969
dd0d840e 24970
dd0d840e
GM
24971
24972
dd0d840e 24973
dd0d840e 24974
dd0d840e
GM
24975
24976
24977
24978
24979
24980
24981
24982
dd0d840e 24983
dd0d840e 24984
dd0d840e 24985
dd0d840e 24986
5476a9a4
GM
24987 if test $gl_cv_have_include_next = yes; then
24988 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
24989 else
24990 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
24991$as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
24992if test "${gl_cv_next_sys_stat_h+set}" = set; then :
24993 $as_echo_n "(cached) " >&6
24994else
dd0d840e 24995
5476a9a4 24996 if test $ac_cv_header_sys_stat_h = yes; then
dd0d840e 24997
dd0d840e 24998
5476a9a4
GM
24999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25000/* end confdefs.h. */
25001#include <sys/stat.h>
dd0d840e 25002
5476a9a4
GM
25003_ACEOF
25004 case "$host_os" in
25005 aix*) gl_absname_cpp="$ac_cpp -C" ;;
25006 *) gl_absname_cpp="$ac_cpp" ;;
25007 esac
dd0d840e 25008
5476a9a4
GM
25009 case "$host_os" in
25010 mingw*)
25011 gl_dirsep_regex='[/\\]'
25012 ;;
25013 *)
25014 gl_dirsep_regex='\/'
25015 ;;
25016 esac
25017 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
dd0d840e 25018
5476a9a4
GM
25019 gl_header_literal_regex=`echo 'sys/stat.h' \
25020 | sed -e "$gl_make_literal_regex_sed"`
25021 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25022 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25023 s|^/[^/]|//&|
25024 p
25025 q
25026 }'
25027 gl_cv_next_sys_stat_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25028 sed -n "$gl_absolute_header_sed"`'"'
25029 else
25030 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
25031 fi
dd0d840e 25032
dd0d840e 25033
5476a9a4
GM
25034fi
25035{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
25036$as_echo "$gl_cv_next_sys_stat_h" >&6; }
25037 fi
25038 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
dd0d840e 25039
5476a9a4
GM
25040 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25041 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25042 gl_next_as_first_directive='<'sys/stat.h'>'
25043 else
25044 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25045 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
25046 fi
25047 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
dd0d840e 25048
dd0d840e 25049
d3127c14 25050
d3127c14 25051
dd0d840e 25052
dd0d840e 25053
dd0d840e 25054
dd0d840e 25055
dd0d840e 25056
dd0d840e 25057
dd0d840e 25058
5476a9a4 25059 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
dd0d840e 25060
5476a9a4 25061$as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
dd0d840e 25062
5476a9a4 25063 fi
dd0d840e 25064
5476a9a4
GM
25065 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
25066 #include <sys/stat.h>
25067"
25068if test "x$ac_cv_type_nlink_t" = x""yes; then :
dd0d840e 25069
5476a9a4 25070else
dd0d840e 25071
5476a9a4 25072$as_echo "#define nlink_t int" >>confdefs.h
dd0d840e 25073
5476a9a4 25074fi
dd0d840e 25075
dd0d840e 25076
dd0d840e 25077
dd0d840e 25078
dd0d840e 25079
dd0d840e 25080
dd0d840e 25081
c9ca3f76 25082
dd0d840e 25083
dd0d840e 25084
dd0d840e 25085
c9ca3f76 25086
dd0d840e 25087
dd0d840e
GM
25088
25089
7e723570
GM
25090
25091
7e723570 25092
5476a9a4
GM
25093 ac_fn_c_check_decl "$LINENO" "localtime_r" "ac_cv_have_decl_localtime_r" "#include <time.h>
25094"
25095if test "x$ac_cv_have_decl_localtime_r" = x""yes; then :
25096 ac_have_decl=1
25097else
25098 ac_have_decl=0
25099fi
7e723570 25100
5476a9a4
GM
25101cat >>confdefs.h <<_ACEOF
25102#define HAVE_DECL_LOCALTIME_R $ac_have_decl
25103_ACEOF
7e723570 25104
5476a9a4
GM
25105 if test $ac_cv_have_decl_localtime_r = no; then
25106 HAVE_DECL_LOCALTIME_R=0
25107 fi
7e723570 25108
7e723570 25109
5476a9a4
GM
25110 if test $ac_cv_func_localtime_r = yes; then
25111 HAVE_LOCALTIME_R=1
25112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime_r is compatible with its POSIX signature" >&5
25113$as_echo_n "checking whether localtime_r is compatible with its POSIX signature... " >&6; }
25114if test "${gl_cv_time_r_posix+set}" = set; then :
25115 $as_echo_n "(cached) " >&6
25116else
25117 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25118/* end confdefs.h. */
25119#include <time.h>
7e723570
GM
25120int
25121main ()
25122{
5476a9a4
GM
25123/* We don't need to append 'restrict's to the argument types,
25124 even though the POSIX signature has the 'restrict's,
25125 since C99 says they can't affect type compatibility. */
25126 struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r;
25127 if (ptr) return 0;
25128 /* Check the return type is a pointer.
25129 On HP-UX 10 it is 'int'. */
25130 *localtime_r (0, 0);
7e723570
GM
25131 ;
25132 return 0;
25133}
5476a9a4 25134
7e723570 25135_ACEOF
5476a9a4
GM
25136if ac_fn_c_try_compile "$LINENO"; then :
25137 gl_cv_time_r_posix=yes
7e723570 25138else
5476a9a4 25139 gl_cv_time_r_posix=no
7e723570 25140fi
5476a9a4 25141rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
02bd7257 25142
5476a9a4
GM
25143fi
25144{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_r_posix" >&5
25145$as_echo "$gl_cv_time_r_posix" >&6; }
25146 if test $gl_cv_time_r_posix = yes; then
25147 REPLACE_LOCALTIME_R=0
25148 else
25149 REPLACE_LOCALTIME_R=1
25150 fi
25151 else
25152 HAVE_LOCALTIME_R=0
25153 fi
02bd7257 25154
a6342fc8 25155 if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then
02bd7257
GM
25156
25157
02bd7257 25158
02bd7257 25159
02bd7257 25160
02bd7257 25161
7e723570 25162
7e723570 25163
5476a9a4
GM
25164 gl_LIBOBJS="$gl_LIBOBJS time_r.$ac_objext"
25165
25166
25167 :
7e723570 25168
a6342fc8 25169 fi
7e723570 25170
7e723570 25171
7e723570 25172
7e723570 25173
7e723570 25174
5476a9a4 25175 GNULIB_TIME_R=1
7e723570 25176
7e723570 25177
7e723570 25178
7e723570 25179
7e723570 25180
f077f61d
GM
25181
25182
25183
25184
25185
25186 LIB_TIMER_TIME=
25187
25188 gl_saved_libs=$LIBS
25189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing timer_settime" >&5
25190$as_echo_n "checking for library containing timer_settime... " >&6; }
25191if test "${ac_cv_search_timer_settime+set}" = set; then :
25192 $as_echo_n "(cached) " >&6
25193else
25194 ac_func_search_save_LIBS=$LIBS
25195cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25196/* end confdefs.h. */
25197
25198/* Override any GCC internal prototype to avoid an error.
25199 Use char because int might match the return type of a GCC
25200 builtin and then its argument prototype would still apply. */
25201#ifdef __cplusplus
25202extern "C"
25203#endif
25204char timer_settime ();
25205int
25206main ()
25207{
25208return timer_settime ();
25209 ;
25210 return 0;
25211}
25212_ACEOF
25213for ac_lib in '' rt posix4; do
25214 if test -z "$ac_lib"; then
25215 ac_res="none required"
25216 else
25217 ac_res=-l$ac_lib
25218 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
25219 fi
25220 if ac_fn_c_try_link "$LINENO"; then :
25221 ac_cv_search_timer_settime=$ac_res
25222fi
25223rm -f core conftest.err conftest.$ac_objext \
25224 conftest$ac_exeext
25225 if test "${ac_cv_search_timer_settime+set}" = set; then :
25226 break
25227fi
25228done
25229if test "${ac_cv_search_timer_settime+set}" = set; then :
25230
25231else
25232 ac_cv_search_timer_settime=no
25233fi
25234rm conftest.$ac_ext
25235LIBS=$ac_func_search_save_LIBS
25236fi
25237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_timer_settime" >&5
25238$as_echo "$ac_cv_search_timer_settime" >&6; }
25239ac_res=$ac_cv_search_timer_settime
25240if test "$ac_res" != no; then :
25241 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
25242 test "$ac_cv_search_timer_settime" = "none required" ||
25243 LIB_TIMER_TIME=$ac_cv_search_timer_settime
25244fi
25245
25246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25247/* end confdefs.h. */
25248
25249#include <features.h>
25250#ifdef __GNU_LIBRARY__
25251 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || (__GLIBC__ > 2)) \
25252 && !defined __UCLIBC__
25253 Thread emulation available
25254 #endif
25255#endif
25256
25257_ACEOF
25258if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25259 $EGREP "Thread" >/dev/null 2>&1; then :
25260 LIB_TIMER_TIME="$LIB_TIMER_TIME $LIBMULTITHREAD"
25261fi
25262rm -f conftest*
25263
25264 for ac_func in timer_settime
25265do :
25266 ac_fn_c_check_func "$LINENO" "timer_settime" "ac_cv_func_timer_settime"
25267if test "x$ac_cv_func_timer_settime" = x""yes; then :
25268 cat >>confdefs.h <<_ACEOF
25269#define HAVE_TIMER_SETTIME 1
25270_ACEOF
25271
25272fi
25273done
25274
25275 LIBS=$gl_saved_libs
25276
a6342fc8 25277 :
7e723570 25278
02bd7257 25279
02bd7257 25280
02bd7257 25281
02bd7257 25282
02bd7257 25283
02bd7257 25284
02bd7257 25285
dd0d840e
GM
25286
25287
25288
dd0d840e 25289
5476a9a4
GM
25290 if test $gl_cv_have_include_next = yes; then
25291 gl_cv_next_unistd_h='<'unistd.h'>'
25292 else
25293 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
25294$as_echo_n "checking absolute name of <unistd.h>... " >&6; }
25295if test "${gl_cv_next_unistd_h+set}" = set; then :
25296 $as_echo_n "(cached) " >&6
25297else
dd0d840e 25298
5476a9a4 25299 if test $ac_cv_header_unistd_h = yes; then
dd0d840e 25300
dd0d840e 25301
5476a9a4 25302 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d3127c14 25303/* end confdefs.h. */
5476a9a4 25304#include <unistd.h>
d3127c14 25305
5476a9a4
GM
25306_ACEOF
25307 case "$host_os" in
25308 aix*) gl_absname_cpp="$ac_cpp -C" ;;
25309 *) gl_absname_cpp="$ac_cpp" ;;
25310 esac
d3127c14 25311
5476a9a4
GM
25312 case "$host_os" in
25313 mingw*)
25314 gl_dirsep_regex='[/\\]'
25315 ;;
25316 *)
25317 gl_dirsep_regex='\/'
25318 ;;
25319 esac
25320 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25321
25322 gl_header_literal_regex=`echo 'unistd.h' \
25323 | sed -e "$gl_make_literal_regex_sed"`
25324 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25325 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25326 s|^/[^/]|//&|
25327 p
25328 q
25329 }'
25330 gl_cv_next_unistd_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25331 sed -n "$gl_absolute_header_sed"`'"'
25332 else
25333 gl_cv_next_unistd_h='<'unistd.h'>'
25334 fi
d3127c14 25335
d3127c14 25336
c9ca3f76 25337fi
5476a9a4
GM
25338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
25339$as_echo "$gl_cv_next_unistd_h" >&6; }
25340 fi
25341 NEXT_UNISTD_H=$gl_cv_next_unistd_h
c9ca3f76 25342
5476a9a4
GM
25343 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25344 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25345 gl_next_as_first_directive='<'unistd.h'>'
25346 else
25347 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25348 gl_next_as_first_directive=$gl_cv_next_unistd_h
25349 fi
25350 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
c9ca3f76 25351
c9ca3f76 25352
c9ca3f76 25353
c9ca3f76 25354
5476a9a4
GM
25355 if test $ac_cv_header_unistd_h = yes; then
25356 HAVE_UNISTD_H=1
25357 else
25358 HAVE_UNISTD_H=0
25359 fi
c9ca3f76 25360
d3127c14 25361
dd0d840e 25362
dd0d840e 25363
d3127c14 25364
d3127c14 25365
dd0d840e
GM
25366
25367
c9ca3f76
GM
25368
25369
25370
b5591ebb
GM
25371 if test $ac_cv_have_decl_unsetenv = no; then
25372 HAVE_DECL_UNSETENV=0
25373 fi
25374 for ac_func in unsetenv
25375do :
25376 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
25377if test "x$ac_cv_func_unsetenv" = x""yes; then :
25378 cat >>confdefs.h <<_ACEOF
25379#define HAVE_UNSETENV 1
25380_ACEOF
25381
25382fi
25383done
25384
25385 if test $ac_cv_func_unsetenv = no; then
25386 HAVE_UNSETENV=0
25387 else
25388 HAVE_UNSETENV=1
25389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5
25390$as_echo_n "checking for unsetenv() return type... " >&6; }
25391if test "${gt_cv_func_unsetenv_ret+set}" = set; then :
25392 $as_echo_n "(cached) " >&6
25393else
25394 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25395/* end confdefs.h. */
25396
25397#undef _BSD
25398#define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */
25399#include <stdlib.h>
25400extern
25401#ifdef __cplusplus
25402"C"
25403#endif
25404int unsetenv (const char *name);
25405
25406int
25407main ()
25408{
25409
25410 ;
25411 return 0;
25412}
25413_ACEOF
25414if ac_fn_c_try_compile "$LINENO"; then :
25415 gt_cv_func_unsetenv_ret='int'
25416else
25417 gt_cv_func_unsetenv_ret='void'
25418fi
25419rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25420fi
25421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5
25422$as_echo "$gt_cv_func_unsetenv_ret" >&6; }
25423 if test $gt_cv_func_unsetenv_ret = 'void'; then
25424
25425$as_echo "#define VOID_UNSETENV 1" >>confdefs.h
25426
25427 REPLACE_UNSETENV=1
25428 fi
25429
25430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5
25431$as_echo_n "checking whether unsetenv obeys POSIX... " >&6; }
25432if test "${gl_cv_func_unsetenv_works+set}" = set; then :
25433 $as_echo_n "(cached) " >&6
25434else
25435 if test "$cross_compiling" = yes; then :
25436 case "$host_os" in
25437 # Guess yes on glibc systems.
25438 *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
25439 # If we don't know, assume the worst.
25440 *) gl_cv_func_unsetenv_works="guessing no" ;;
25441 esac
25442
25443else
25444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25445/* end confdefs.h. */
25446
25447 #include <stdlib.h>
25448 #include <errno.h>
25449 extern char **environ;
25450
25451int
25452main ()
25453{
25454
25455 char entry1[] = "a=1";
25456 char entry2[] = "b=2";
25457 char *env[] = { entry1, entry2, NULL };
25458 if (putenv ((char *) "a=1")) return 1;
25459 if (putenv (entry2)) return 2;
25460 entry2[0] = 'a';
25461 unsetenv ("a");
25462 if (getenv ("a")) return 3;
25463 if (!unsetenv ("") || errno != EINVAL) return 4;
25464 entry2[0] = 'b';
25465 environ = env;
25466 if (!getenv ("a")) return 5;
25467 entry2[0] = 'a';
25468 unsetenv ("a");
25469 if (getenv ("a")) return 6;
25470
25471 ;
25472 return 0;
25473}
25474_ACEOF
25475if ac_fn_c_try_run "$LINENO"; then :
25476 gl_cv_func_unsetenv_works=yes
25477else
25478 gl_cv_func_unsetenv_works=no
25479fi
25480rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25481 conftest.$ac_objext conftest.beam conftest.$ac_ext
25482fi
25483
25484fi
25485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5
25486$as_echo "$gl_cv_func_unsetenv_works" >&6; }
25487 case "$gl_cv_func_unsetenv_works" in
25488 *yes) ;;
25489 *)
25490 REPLACE_UNSETENV=1
25491 ;;
25492 esac
25493 fi
25494
25495 if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
25496
25497
25498
25499
25500
25501
25502
25503
25504 gl_LIBOBJS="$gl_LIBOBJS unsetenv.$ac_objext"
25505
25506
25507
25508
25509
25510 fi
25511
25512
25513
25514
25515
25516 GNULIB_UNSETENV=1
25517
25518
25519
25520
25521
25522
25523
25524
c9ca3f76
GM
25525
25526
c9ca3f76 25527
5476a9a4
GM
25528 if test $ac_cv_func_futimens = no && test $ac_cv_func_futimesat = yes; then
25529 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether futimesat handles NULL file" >&5
25530$as_echo_n "checking whether futimesat handles NULL file... " >&6; }
25531if test "${gl_cv_func_futimesat_works+set}" = set; then :
25532 $as_echo_n "(cached) " >&6
25533else
25534 touch conftest.file
25535 if test "$cross_compiling" = yes; then :
25536 case "$host_os" in
25537 # Guess yes on glibc systems.
25538 *-gnu*) gl_cv_func_futimesat_works="guessing yes" ;;
25539 # If we don't know, assume the worst.
25540 *) gl_cv_func_futimesat_works="guessing no" ;;
25541 esac
c9ca3f76 25542
5476a9a4
GM
25543else
25544 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c9ca3f76
GM
25545/* end confdefs.h. */
25546
5476a9a4
GM
25547#include <stddef.h>
25548#include <sys/times.h>
25549#include <fcntl.h>
c9ca3f76
GM
25550
25551int
25552main ()
25553{
5476a9a4
GM
25554 int fd = open ("conftest.file", O_RDWR);
25555 if (fd < 0) return 1;
25556 if (futimesat (fd, NULL, NULL)) return 2;
c9ca3f76
GM
25557
25558 ;
25559 return 0;
25560}
25561_ACEOF
5476a9a4
GM
25562if ac_fn_c_try_run "$LINENO"; then :
25563 gl_cv_func_futimesat_works=yes
c9ca3f76 25564else
5476a9a4 25565 gl_cv_func_futimesat_works=no
c9ca3f76 25566fi
5476a9a4
GM
25567rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25568 conftest.$ac_objext conftest.beam conftest.$ac_ext
c9ca3f76
GM
25569fi
25570
5476a9a4
GM
25571 rm -f conftest.file
25572fi
25573{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_futimesat_works" >&5
25574$as_echo "$gl_cv_func_futimesat_works" >&6; }
25575 case "$gl_cv_func_futimesat_works" in
25576 *yes) ;;
25577 *)
7e723570 25578
5476a9a4 25579$as_echo "#define FUTIMESAT_NULL_BUG 1" >>confdefs.h
067d23c9 25580
5476a9a4
GM
25581 ;;
25582 esac
25583 fi
dd0d840e 25584
d7ad186c 25585 gl_gnulib_enabled_260941c0e5dc67ec9e87d1fb321c300b=false
5476a9a4 25586 gl_gnulib_enabled_dosname=false
710f5812
GM
25587 gl_gnulib_enabled_euidaccess=false
25588 gl_gnulib_enabled_getgroups=false
5476a9a4 25589 gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=false
710f5812 25590 gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1=false
d7ad186c 25591 gl_gnulib_enabled_03e0aaad4cb89ca757653bd367a6ccb7=false
5476a9a4 25592 gl_gnulib_enabled_pathmax=false
710f5812 25593 gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c=false
5476a9a4
GM
25594 gl_gnulib_enabled_stat=false
25595 gl_gnulib_enabled_strtoll=false
25596 gl_gnulib_enabled_strtoull=false
25597 gl_gnulib_enabled_verify=false
710f5812 25598 gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec=false
d7ad186c
GM
25599 func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b ()
25600 {
25601 if ! $gl_gnulib_enabled_260941c0e5dc67ec9e87d1fb321c300b; then
25602
25603
25604
25605
25606
25607
25608
25609
25610 gl_LIBOBJS="$gl_LIBOBJS openat-proc.$ac_objext"
25611
25612 gl_gnulib_enabled_260941c0e5dc67ec9e87d1fb321c300b=true
25613 fi
25614 }
5476a9a4
GM
25615 func_gl_gnulib_m4code_dosname ()
25616 {
25617 if ! $gl_gnulib_enabled_dosname; then
25618 gl_gnulib_enabled_dosname=true
25619 fi
25620 }
710f5812 25621 func_gl_gnulib_m4code_euidaccess ()
5476a9a4 25622 {
710f5812 25623 if ! $gl_gnulib_enabled_euidaccess; then
dd0d840e 25624
d3127c14
GM
25625
25626
25627
25628
710f5812
GM
25629 for ac_func in euidaccess
25630do :
25631 ac_fn_c_check_func "$LINENO" "euidaccess" "ac_cv_func_euidaccess"
25632if test "x$ac_cv_func_euidaccess" = x""yes; then :
25633 cat >>confdefs.h <<_ACEOF
25634#define HAVE_EUIDACCESS 1
25635_ACEOF
d3127c14 25636
710f5812
GM
25637fi
25638done
d3127c14 25639
710f5812
GM
25640 if test $ac_cv_func_euidaccess = no; then
25641 HAVE_EUIDACCESS=0
25642 fi
d3127c14 25643
710f5812
GM
25644 if test $HAVE_EUIDACCESS = 0; then
25645
25646
25647
25648
25649
25650
25651
25652
25653 gl_LIBOBJS="$gl_LIBOBJS euidaccess.$ac_objext"
25654
25655
25656
25657 for ac_header in libgen.h
25658do :
25659 ac_fn_c_check_header_mongrel "$LINENO" "libgen.h" "ac_cv_header_libgen_h" "$ac_includes_default"
25660if test "x$ac_cv_header_libgen_h" = x""yes; then :
25661 cat >>confdefs.h <<_ACEOF
25662#define HAVE_LIBGEN_H 1
25663_ACEOF
25664
25665fi
25666
25667done
25668
25669
25670 ac_fn_c_check_func "$LINENO" "getgroups" "ac_cv_func_getgroups"
25671if test "x$ac_cv_func_getgroups" = x""yes; then :
25672
25673fi
25674
25675
25676 # If we don't yet have getgroups, see if it's in -lbsd.
25677 # This is reported to be necessary on an ITOS 3000WS running SEIUX 3.1.
25678 ac_save_LIBS=$LIBS
25679 if test $ac_cv_func_getgroups = no; then
25680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getgroups in -lbsd" >&5
25681$as_echo_n "checking for getgroups in -lbsd... " >&6; }
25682if test "${ac_cv_lib_bsd_getgroups+set}" = set; then :
5476a9a4
GM
25683 $as_echo_n "(cached) " >&6
25684else
710f5812
GM
25685 ac_check_lib_save_LIBS=$LIBS
25686LIBS="-lbsd $LIBS"
25687cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d3127c14 25688/* end confdefs.h. */
d3127c14 25689
710f5812
GM
25690/* Override any GCC internal prototype to avoid an error.
25691 Use char because int might match the return type of a GCC
25692 builtin and then its argument prototype would still apply. */
25693#ifdef __cplusplus
25694extern "C"
25695#endif
25696char getgroups ();
d3127c14
GM
25697int
25698main ()
25699{
710f5812 25700return getgroups ();
d3127c14
GM
25701 ;
25702 return 0;
25703}
25704_ACEOF
710f5812
GM
25705if ac_fn_c_try_link "$LINENO"; then :
25706 ac_cv_lib_bsd_getgroups=yes
d3127c14 25707else
710f5812 25708 ac_cv_lib_bsd_getgroups=no
5476a9a4 25709fi
710f5812
GM
25710rm -f core conftest.err conftest.$ac_objext \
25711 conftest$ac_exeext conftest.$ac_ext
25712LIBS=$ac_check_lib_save_LIBS
d3127c14 25713fi
710f5812
GM
25714{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_getgroups" >&5
25715$as_echo "$ac_cv_lib_bsd_getgroups" >&6; }
25716if test "x$ac_cv_lib_bsd_getgroups" = x""yes; then :
25717 GETGROUPS_LIB=-lbsd
5476a9a4 25718fi
710f5812
GM
25719
25720 fi
25721
25722 # Run the program to test the functionality of the system-supplied
25723 # getgroups function only if there is such a function.
25724 if test $ac_cv_func_getgroups = yes; then
25725 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getgroups" >&5
25726$as_echo_n "checking for working getgroups... " >&6; }
25727if test "${ac_cv_func_getgroups_works+set}" = set; then :
5476a9a4
GM
25728 $as_echo_n "(cached) " >&6
25729else
710f5812
GM
25730 if test "$cross_compiling" = yes; then :
25731 case "$host_os" in # ((
5476a9a4 25732 # Guess yes on glibc systems.
710f5812 25733 *-gnu*) ac_cv_func_getgroups_works="guessing yes" ;;
5476a9a4 25734 # If we don't know, assume the worst.
710f5812 25735 *) ac_cv_func_getgroups_works="guessing no" ;;
5476a9a4 25736 esac
d3127c14 25737
5476a9a4
GM
25738else
25739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d3127c14 25740/* end confdefs.h. */
710f5812 25741$ac_includes_default
d3127c14
GM
25742int
25743main ()
25744{
710f5812
GM
25745/* On Ultrix 4.3, getgroups (0, 0) always fails. */
25746 return getgroups (0, 0) == -1;
25747 ;
25748 return 0;
25749}
25750
25751_ACEOF
25752if ac_fn_c_try_run "$LINENO"; then :
25753 ac_cv_func_getgroups_works=yes
25754else
25755 ac_cv_func_getgroups_works=no
25756fi
25757rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25758 conftest.$ac_objext conftest.beam conftest.$ac_ext
25759fi
25760
25761
25762fi
25763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getgroups_works" >&5
25764$as_echo "$ac_cv_func_getgroups_works" >&6; }
25765 else
25766 ac_cv_func_getgroups_works=no
25767 fi
25768 case "$ac_cv_func_getgroups_works" in
25769 *yes)
25770
25771$as_echo "#define HAVE_GETGROUPS 1" >>confdefs.h
25772
25773 ;;
25774 esac
25775 LIBS=$ac_save_LIBS
25776
25777
25778 # Solaris 9 and 10 need -lgen to get the eaccess function.
25779 # Save and restore LIBS so -lgen isn't added to it. Otherwise, *all*
25780 # programs in the package would end up linked with that potentially-shared
25781 # library, inducing unnecessary run-time overhead.
25782 LIB_EACCESS=
25783
25784 gl_saved_libs=$LIBS
25785 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing eaccess" >&5
25786$as_echo_n "checking for library containing eaccess... " >&6; }
25787if test "${ac_cv_search_eaccess+set}" = set; then :
25788 $as_echo_n "(cached) " >&6
25789else
25790 ac_func_search_save_LIBS=$LIBS
25791cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25792/* end confdefs.h. */
25793
25794/* Override any GCC internal prototype to avoid an error.
25795 Use char because int might match the return type of a GCC
25796 builtin and then its argument prototype would still apply. */
25797#ifdef __cplusplus
25798extern "C"
25799#endif
25800char eaccess ();
25801int
25802main ()
25803{
25804return eaccess ();
25805 ;
25806 return 0;
25807}
25808_ACEOF
25809for ac_lib in '' gen; do
25810 if test -z "$ac_lib"; then
25811 ac_res="none required"
25812 else
25813 ac_res=-l$ac_lib
25814 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
25815 fi
25816 if ac_fn_c_try_link "$LINENO"; then :
25817 ac_cv_search_eaccess=$ac_res
25818fi
25819rm -f core conftest.err conftest.$ac_objext \
25820 conftest$ac_exeext
25821 if test "${ac_cv_search_eaccess+set}" = set; then :
25822 break
25823fi
25824done
25825if test "${ac_cv_search_eaccess+set}" = set; then :
25826
25827else
25828 ac_cv_search_eaccess=no
25829fi
25830rm conftest.$ac_ext
25831LIBS=$ac_func_search_save_LIBS
25832fi
25833{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_eaccess" >&5
25834$as_echo "$ac_cv_search_eaccess" >&6; }
25835ac_res=$ac_cv_search_eaccess
25836if test "$ac_res" != no; then :
25837 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
25838 test "$ac_cv_search_eaccess" = "none required" ||
25839 LIB_EACCESS=$ac_cv_search_eaccess
25840fi
25841
25842 for ac_func in eaccess
25843do :
25844 ac_fn_c_check_func "$LINENO" "eaccess" "ac_cv_func_eaccess"
25845if test "x$ac_cv_func_eaccess" = x""yes; then :
25846 cat >>confdefs.h <<_ACEOF
25847#define HAVE_EACCESS 1
25848_ACEOF
25849
25850fi
25851done
25852
25853 LIBS=$gl_saved_libs
25854
25855 fi
25856
25857
25858
25859
25860
25861 GNULIB_EUIDACCESS=1
25862
25863
25864
25865
25866
25867 gl_gnulib_enabled_euidaccess=true
25868 if test $HAVE_EUIDACCESS = 0; then
25869 func_gl_gnulib_m4code_a9786850e999ae65a836a6041e8e5ed1
25870 fi
25871 func_gl_gnulib_m4code_6099e9737f757db36c47fa9d9f02e88c
25872 if test $HAVE_EUIDACCESS = 0; then
25873 func_gl_gnulib_m4code_stat
25874 fi
25875 fi
25876 }
25877 func_gl_gnulib_m4code_getgroups ()
25878 {
25879 if ! $gl_gnulib_enabled_getgroups; then
25880
25881
25882
25883
25884
25885 ac_fn_c_check_func "$LINENO" "getgroups" "ac_cv_func_getgroups"
25886if test "x$ac_cv_func_getgroups" = x""yes; then :
25887
25888fi
25889
25890
25891 # If we don't yet have getgroups, see if it's in -lbsd.
25892 # This is reported to be necessary on an ITOS 3000WS running SEIUX 3.1.
25893 ac_save_LIBS=$LIBS
25894 if test $ac_cv_func_getgroups = no; then
25895 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getgroups in -lbsd" >&5
25896$as_echo_n "checking for getgroups in -lbsd... " >&6; }
25897if test "${ac_cv_lib_bsd_getgroups+set}" = set; then :
25898 $as_echo_n "(cached) " >&6
25899else
25900 ac_check_lib_save_LIBS=$LIBS
25901LIBS="-lbsd $LIBS"
25902cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25903/* end confdefs.h. */
25904
25905/* Override any GCC internal prototype to avoid an error.
25906 Use char because int might match the return type of a GCC
25907 builtin and then its argument prototype would still apply. */
25908#ifdef __cplusplus
25909extern "C"
25910#endif
25911char getgroups ();
25912int
25913main ()
25914{
25915return getgroups ();
25916 ;
25917 return 0;
25918}
25919_ACEOF
25920if ac_fn_c_try_link "$LINENO"; then :
25921 ac_cv_lib_bsd_getgroups=yes
25922else
25923 ac_cv_lib_bsd_getgroups=no
25924fi
25925rm -f core conftest.err conftest.$ac_objext \
25926 conftest$ac_exeext conftest.$ac_ext
25927LIBS=$ac_check_lib_save_LIBS
25928fi
25929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_getgroups" >&5
25930$as_echo "$ac_cv_lib_bsd_getgroups" >&6; }
25931if test "x$ac_cv_lib_bsd_getgroups" = x""yes; then :
25932 GETGROUPS_LIB=-lbsd
25933fi
25934
25935 fi
25936
25937 # Run the program to test the functionality of the system-supplied
25938 # getgroups function only if there is such a function.
25939 if test $ac_cv_func_getgroups = yes; then
25940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getgroups" >&5
25941$as_echo_n "checking for working getgroups... " >&6; }
25942if test "${ac_cv_func_getgroups_works+set}" = set; then :
25943 $as_echo_n "(cached) " >&6
25944else
25945 if test "$cross_compiling" = yes; then :
25946 case "$host_os" in # ((
25947 # Guess yes on glibc systems.
25948 *-gnu*) ac_cv_func_getgroups_works="guessing yes" ;;
25949 # If we don't know, assume the worst.
25950 *) ac_cv_func_getgroups_works="guessing no" ;;
25951 esac
25952
25953else
25954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25955/* end confdefs.h. */
25956$ac_includes_default
25957int
25958main ()
25959{
25960/* On Ultrix 4.3, getgroups (0, 0) always fails. */
25961 return getgroups (0, 0) == -1;
25962 ;
25963 return 0;
25964}
25965
25966_ACEOF
25967if ac_fn_c_try_run "$LINENO"; then :
25968 ac_cv_func_getgroups_works=yes
25969else
25970 ac_cv_func_getgroups_works=no
25971fi
25972rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25973 conftest.$ac_objext conftest.beam conftest.$ac_ext
25974fi
25975
25976
25977fi
25978{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getgroups_works" >&5
25979$as_echo "$ac_cv_func_getgroups_works" >&6; }
25980 else
25981 ac_cv_func_getgroups_works=no
25982 fi
25983 case "$ac_cv_func_getgroups_works" in
25984 *yes)
25985
25986$as_echo "#define HAVE_GETGROUPS 1" >>confdefs.h
25987
25988 ;;
25989 esac
25990 LIBS=$ac_save_LIBS
25991
25992 if test $ac_cv_func_getgroups != yes; then
25993 HAVE_GETGROUPS=0
25994 else
25995 if test "$ac_cv_type_getgroups" != gid_t \
25996 || { case "$ac_cv_func_getgroups_works" in
25997 *yes) false;;
25998 *) true;;
25999 esac
26000 }; then
26001 REPLACE_GETGROUPS=1
26002
26003$as_echo "#define GETGROUPS_ZERO_BUG 1" >>confdefs.h
26004
26005 else
26006 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getgroups handles negative values" >&5
26007$as_echo_n "checking whether getgroups handles negative values... " >&6; }
26008if test "${gl_cv_func_getgroups_works+set}" = set; then :
26009 $as_echo_n "(cached) " >&6
26010else
26011 if test "$cross_compiling" = yes; then :
26012 case "$host_os" in
26013 # Guess yes on glibc systems.
26014 *-gnu*) gl_cv_func_getgroups_works="guessing yes" ;;
26015 # If we don't know, assume the worst.
26016 *) gl_cv_func_getgroups_works="guessing no" ;;
26017 esac
26018
26019else
26020 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26021/* end confdefs.h. */
26022$ac_includes_default
26023int
26024main ()
26025{
26026int size = getgroups (0, 0);
26027 gid_t *list = malloc (size * sizeof *list);
26028 return getgroups (-1, list) != -1;
26029 ;
26030 return 0;
26031}
26032_ACEOF
26033if ac_fn_c_try_run "$LINENO"; then :
26034 gl_cv_func_getgroups_works=yes
26035else
26036 gl_cv_func_getgroups_works=no
26037fi
26038rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26039 conftest.$ac_objext conftest.beam conftest.$ac_ext
26040fi
26041
26042fi
26043{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getgroups_works" >&5
26044$as_echo "$gl_cv_func_getgroups_works" >&6; }
26045 case "$gl_cv_func_getgroups_works" in
26046 *yes) ;;
26047 *) REPLACE_GETGROUPS=1 ;;
26048 esac
26049 fi
26050 fi
26051 test -n "$GETGROUPS_LIB" && LIBS="$GETGROUPS_LIB $LIBS"
26052
26053 if test $HAVE_GETGROUPS = 0 || test $REPLACE_GETGROUPS = 1; then
26054
26055
26056
26057
26058
26059
26060
26061
26062 gl_LIBOBJS="$gl_LIBOBJS getgroups.$ac_objext"
26063
26064 fi
26065
26066
26067
26068
26069
26070 GNULIB_GETGROUPS=1
26071
26072
26073
26074
26075
26076 gl_gnulib_enabled_getgroups=true
26077 fi
26078 }
26079 func_gl_gnulib_m4code_be453cec5eecf5731a274f2de7f2db36 ()
26080 {
26081 if ! $gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36; then
26082
26083
26084 gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=true
26085 fi
26086 }
26087 func_gl_gnulib_m4code_a9786850e999ae65a836a6041e8e5ed1 ()
26088 {
26089 if ! $gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1; then
26090
26091
26092
26093
26094
26095 ac_fn_c_check_func "$LINENO" "group_member" "ac_cv_func_group_member"
26096if test "x$ac_cv_func_group_member" = x""yes; then :
26097
26098else
26099
26100 HAVE_GROUP_MEMBER=0
26101
26102fi
26103
26104
26105 if test $HAVE_GROUP_MEMBER = 0; then
26106
26107
26108
26109
26110
26111
26112
26113
26114 gl_LIBOBJS="$gl_LIBOBJS group-member.$ac_objext"
26115
26116
26117
26118
26119 fi
26120
26121
26122
26123
26124
26125 GNULIB_GROUP_MEMBER=1
26126
26127
26128
26129
26130
26131 gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1=true
26132 if test $HAVE_GROUP_MEMBER = 0; then
26133 func_gl_gnulib_m4code_getgroups
26134 fi
26135 if test $HAVE_GROUP_MEMBER = 0; then
26136 func_gl_gnulib_m4code_682e609604ccaac6be382e4ee3a4eaec
26137 fi
26138 fi
26139 }
d7ad186c
GM
26140 func_gl_gnulib_m4code_03e0aaad4cb89ca757653bd367a6ccb7 ()
26141 {
26142 if ! $gl_gnulib_enabled_03e0aaad4cb89ca757653bd367a6ccb7; then
26143 gl_gnulib_enabled_03e0aaad4cb89ca757653bd367a6ccb7=true
26144 fi
26145 }
710f5812
GM
26146 func_gl_gnulib_m4code_pathmax ()
26147 {
26148 if ! $gl_gnulib_enabled_pathmax; then
26149
26150
26151
26152 gl_gnulib_enabled_pathmax=true
26153 fi
26154 }
26155 func_gl_gnulib_m4code_6099e9737f757db36c47fa9d9f02e88c ()
26156 {
26157 if ! $gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c; then
26158 gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c=true
26159 fi
26160 }
26161 func_gl_gnulib_m4code_stat ()
26162 {
26163 if ! $gl_gnulib_enabled_stat; then
26164
26165
26166
26167 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5
26168$as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; }
26169if test "${gl_cv_func_stat_dir_slash+set}" = set; then :
26170 $as_echo_n "(cached) " >&6
26171else
26172 if test "$cross_compiling" = yes; then :
26173 case $host_os in
26174 mingw*) gl_cv_func_stat_dir_slash="guessing no";;
26175 *) gl_cv_func_stat_dir_slash="guessing yes";;
26176 esac
26177else
26178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26179/* end confdefs.h. */
26180#include <sys/stat.h>
26181
26182int
26183main ()
26184{
26185struct stat st; return stat (".", &st) != stat ("./", &st);
26186 ;
26187 return 0;
26188}
26189_ACEOF
26190if ac_fn_c_try_run "$LINENO"; then :
26191 gl_cv_func_stat_dir_slash=yes
26192else
26193 gl_cv_func_stat_dir_slash=no
26194fi
26195rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26196 conftest.$ac_objext conftest.beam conftest.$ac_ext
26197fi
26198
26199fi
26200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5
26201$as_echo "$gl_cv_func_stat_dir_slash" >&6; }
26202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
26203$as_echo_n "checking whether stat handles trailing slashes on files... " >&6; }
26204if test "${gl_cv_func_stat_file_slash+set}" = set; then :
26205 $as_echo_n "(cached) " >&6
26206else
26207 touch conftest.tmp
26208 # Assume that if we have lstat, we can also check symlinks.
26209 if test $ac_cv_func_lstat = yes; then
26210 ln -s conftest.tmp conftest.lnk
26211 fi
26212 if test "$cross_compiling" = yes; then :
26213 case "$host_os" in
26214 # Guess yes on glibc systems.
26215 *-gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
26216 # If we don't know, assume the worst.
26217 *) gl_cv_func_stat_file_slash="guessing no" ;;
26218 esac
26219
26220else
26221 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26222/* end confdefs.h. */
26223#include <sys/stat.h>
26224
26225int
26226main ()
26227{
26228int result = 0;
26229 struct stat st;
26230 if (!stat ("conftest.tmp/", &st))
26231 result |= 1;
26232#if HAVE_LSTAT
26233 if (!stat ("conftest.lnk/", &st))
5476a9a4
GM
26234 result |= 2;
26235#endif
26236 return result;
d3127c14
GM
26237
26238 ;
26239 return 0;
26240}
26241_ACEOF
5476a9a4
GM
26242if ac_fn_c_try_run "$LINENO"; then :
26243 gl_cv_func_stat_file_slash=yes
d3127c14 26244else
5476a9a4
GM
26245 gl_cv_func_stat_file_slash=no
26246fi
26247rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26248 conftest.$ac_objext conftest.beam conftest.$ac_ext
d3127c14 26249fi
d3127c14 26250
5476a9a4
GM
26251 rm -f conftest.tmp conftest.lnk
26252fi
26253{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
26254$as_echo "$gl_cv_func_stat_file_slash" >&6; }
26255 case $gl_cv_func_stat_dir_slash in
26256 *no) REPLACE_STAT=1
d3127c14 26257
5476a9a4
GM
26258$as_echo "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h
26259;;
26260 esac
26261 case $gl_cv_func_stat_file_slash in
26262 *no) REPLACE_STAT=1
d3127c14 26263
5476a9a4
GM
26264$as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
26265;;
26266 esac
d3127c14 26267
a6342fc8 26268 if test $REPLACE_STAT = 1; then
d3127c14 26269
dd0d840e 26270
dd0d840e 26271
dd0d840e 26272
dd0d840e 26273
dd0d840e 26274
067d23c9
KY
26275
26276
5476a9a4 26277 gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
067d23c9 26278
45d4966b 26279 :
a6342fc8 26280 fi
067d23c9 26281
dd0d840e
GM
26282
26283
dd0d840e 26284
dd0d840e 26285
5476a9a4 26286 GNULIB_STAT=1
dd0d840e 26287
067d23c9
KY
26288
26289
26290
26291
5476a9a4
GM
26292 gl_gnulib_enabled_stat=true
26293 if test $REPLACE_STAT = 1; then
26294 func_gl_gnulib_m4code_dosname
26295 fi
26296 if test $REPLACE_STAT = 1; then
26297 func_gl_gnulib_m4code_pathmax
26298 fi
26299 if test $REPLACE_STAT = 1; then
26300 func_gl_gnulib_m4code_verify
26301 fi
26302 fi
26303 }
26304 func_gl_gnulib_m4code_strtoll ()
26305 {
26306 if ! $gl_gnulib_enabled_strtoll; then
067d23c9
KY
26307
26308
26309
5476a9a4
GM
26310 if test "$ac_cv_type_long_long_int" = yes; then
26311 for ac_func in strtoll
26312do :
26313 ac_fn_c_check_func "$LINENO" "strtoll" "ac_cv_func_strtoll"
26314if test "x$ac_cv_func_strtoll" = x""yes; then :
26315 cat >>confdefs.h <<_ACEOF
26316#define HAVE_STRTOLL 1
26317_ACEOF
067d23c9 26318
5476a9a4
GM
26319fi
26320done
067d23c9 26321
5476a9a4
GM
26322 if test $ac_cv_func_strtoll = no; then
26323 HAVE_STRTOLL=0
26324 fi
26325 fi
067d23c9 26326
a6342fc8 26327 if test $HAVE_STRTOLL = 0; then
067d23c9
KY
26328
26329
26330
067d23c9
KY
26331
26332
26333
26334
26335
5476a9a4 26336 gl_LIBOBJS="$gl_LIBOBJS strtoll.$ac_objext"
067d23c9
KY
26337
26338
5476a9a4 26339 :
067d23c9 26340
a6342fc8 26341 fi
067d23c9
KY
26342
26343
26344
067d23c9 26345
067d23c9 26346
5476a9a4 26347 GNULIB_STRTOLL=1
067d23c9 26348
397f7161 26349
067d23c9
KY
26350
26351
067d23c9 26352
5476a9a4
GM
26353 gl_gnulib_enabled_strtoll=true
26354 fi
26355 }
26356 func_gl_gnulib_m4code_strtoull ()
26357 {
26358 if ! $gl_gnulib_enabled_strtoull; then
067d23c9 26359
067d23c9 26360
067d23c9 26361
5476a9a4
GM
26362 if test "$ac_cv_type_unsigned_long_long_int" = yes; then
26363 for ac_func in strtoull
26364do :
26365 ac_fn_c_check_func "$LINENO" "strtoull" "ac_cv_func_strtoull"
26366if test "x$ac_cv_func_strtoull" = x""yes; then :
26367 cat >>confdefs.h <<_ACEOF
26368#define HAVE_STRTOULL 1
26369_ACEOF
067d23c9 26370
f199cab1 26371fi
5476a9a4 26372done
067d23c9 26373
5476a9a4
GM
26374 if test $ac_cv_func_strtoull = no; then
26375 HAVE_STRTOULL=0
26376 fi
26377 fi
067d23c9 26378
a6342fc8 26379 if test $HAVE_STRTOULL = 0; then
067d23c9
KY
26380
26381
067d23c9 26382
067d23c9 26383
067d23c9 26384
067d23c9 26385
067d23c9 26386
067d23c9 26387
5476a9a4 26388 gl_LIBOBJS="$gl_LIBOBJS strtoull.$ac_objext"
067d23c9 26389
067d23c9 26390
5476a9a4 26391 :
067d23c9 26392
a6342fc8 26393 fi
067d23c9
KY
26394
26395
3e0be4ab 26396
3e0be4ab 26397
067d23c9 26398
5476a9a4 26399 GNULIB_STRTOULL=1
067d23c9 26400
a0a61e58 26401
067d23c9 26402
067d23c9
KY
26403
26404
5476a9a4
GM
26405 gl_gnulib_enabled_strtoull=true
26406 fi
26407 }
26408 func_gl_gnulib_m4code_verify ()
26409 {
26410 if ! $gl_gnulib_enabled_verify; then
26411 gl_gnulib_enabled_verify=true
26412 fi
26413 }
710f5812
GM
26414 func_gl_gnulib_m4code_682e609604ccaac6be382e4ee3a4eaec ()
26415 {
26416 if ! $gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec; then
26417 gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec=true
26418 fi
26419 }
d7ad186c
GM
26420 if test $HAVE_FACCESSAT = 0; then
26421 func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b
26422 fi
710f5812
GM
26423 if test $HAVE_FACCESSAT = 0; then
26424 func_gl_gnulib_m4code_dosname
26425 fi
26426 if test $HAVE_FACCESSAT = 0; then
26427 func_gl_gnulib_m4code_euidaccess
26428 fi
d7ad186c
GM
26429 if test $HAVE_FACCESSAT = 0; then
26430 func_gl_gnulib_m4code_03e0aaad4cb89ca757653bd367a6ccb7
26431 fi
26432 if test $HAVE_FDOPENDIR = 0; then
26433 func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b
26434 fi
26435 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
26436 func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b
26437 fi
26438 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
26439 func_gl_gnulib_m4code_dosname
26440 fi
26441 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
26442 func_gl_gnulib_m4code_03e0aaad4cb89ca757653bd367a6ccb7
26443 fi
5476a9a4
GM
26444 if test $REPLACE_GETOPT = 1; then
26445 func_gl_gnulib_m4code_be453cec5eecf5731a274f2de7f2db36
26446 fi
26447 if test $REPLACE_LSTAT = 1; then
26448 func_gl_gnulib_m4code_dosname
26449 fi
26450 if test $REPLACE_LSTAT = 1; then
26451 func_gl_gnulib_m4code_stat
26452 fi
26453 if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
26454 func_gl_gnulib_m4code_stat
26455 fi
d7ad186c
GM
26456 if test $HAVE_READLINKAT = 0; then
26457 func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b
26458 fi
26459 if test $HAVE_READLINKAT = 0; then
26460 func_gl_gnulib_m4code_dosname
26461 fi
26462 if test $HAVE_READLINKAT = 0; then
26463 func_gl_gnulib_m4code_03e0aaad4cb89ca757653bd367a6ccb7
26464 fi
5476a9a4
GM
26465 if { test $HAVE_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; } && test $ac_cv_type_long_long_int = yes; then
26466 func_gl_gnulib_m4code_strtoll
26467 fi
26468 if test $HAVE_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; then
26469 func_gl_gnulib_m4code_verify
26470 fi
26471 if test $ac_cv_func_strtoumax = no && test $ac_cv_type_unsigned_long_long_int = yes; then
26472 func_gl_gnulib_m4code_strtoull
26473 fi
26474 if test $ac_cv_func_strtoumax = no; then
26475 func_gl_gnulib_m4code_verify
26476 fi
067d23c9 26477
d7ad186c
GM
26478 if $gl_gnulib_enabled_260941c0e5dc67ec9e87d1fb321c300b; then
26479 gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_TRUE=
26480 gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_FALSE='#'
26481else
26482 gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_TRUE='#'
26483 gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_FALSE=
26484fi
26485
5476a9a4
GM
26486 if $gl_gnulib_enabled_dosname; then
26487 gl_GNULIB_ENABLED_dosname_TRUE=
26488 gl_GNULIB_ENABLED_dosname_FALSE='#'
26489else
26490 gl_GNULIB_ENABLED_dosname_TRUE='#'
26491 gl_GNULIB_ENABLED_dosname_FALSE=
26492fi
067d23c9 26493
710f5812
GM
26494 if $gl_gnulib_enabled_euidaccess; then
26495 gl_GNULIB_ENABLED_euidaccess_TRUE=
26496 gl_GNULIB_ENABLED_euidaccess_FALSE='#'
26497else
26498 gl_GNULIB_ENABLED_euidaccess_TRUE='#'
26499 gl_GNULIB_ENABLED_euidaccess_FALSE=
26500fi
26501
26502 if $gl_gnulib_enabled_getgroups; then
26503 gl_GNULIB_ENABLED_getgroups_TRUE=
26504 gl_GNULIB_ENABLED_getgroups_FALSE='#'
26505else
26506 gl_GNULIB_ENABLED_getgroups_TRUE='#'
26507 gl_GNULIB_ENABLED_getgroups_FALSE=
26508fi
26509
5476a9a4
GM
26510 if $gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36; then
26511 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE=
26512 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE='#'
26513else
26514 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE='#'
26515 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE=
26516fi
067d23c9 26517
710f5812
GM
26518 if $gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1; then
26519 gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_TRUE=
26520 gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_FALSE='#'
26521else
26522 gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_TRUE='#'
26523 gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_FALSE=
26524fi
26525
d7ad186c
GM
26526 if $gl_gnulib_enabled_03e0aaad4cb89ca757653bd367a6ccb7; then
26527 gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_TRUE=
26528 gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_FALSE='#'
26529else
26530 gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_TRUE='#'
26531 gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_FALSE=
26532fi
26533
5476a9a4
GM
26534 if $gl_gnulib_enabled_pathmax; then
26535 gl_GNULIB_ENABLED_pathmax_TRUE=
26536 gl_GNULIB_ENABLED_pathmax_FALSE='#'
26537else
26538 gl_GNULIB_ENABLED_pathmax_TRUE='#'
26539 gl_GNULIB_ENABLED_pathmax_FALSE=
26540fi
067d23c9 26541
710f5812
GM
26542 if $gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c; then
26543 gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_TRUE=
26544 gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_FALSE='#'
26545else
26546 gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_TRUE='#'
26547 gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_FALSE=
26548fi
26549
5476a9a4
GM
26550 if $gl_gnulib_enabled_stat; then
26551 gl_GNULIB_ENABLED_stat_TRUE=
26552 gl_GNULIB_ENABLED_stat_FALSE='#'
26553else
26554 gl_GNULIB_ENABLED_stat_TRUE='#'
26555 gl_GNULIB_ENABLED_stat_FALSE=
26556fi
067d23c9 26557
5476a9a4
GM
26558 if $gl_gnulib_enabled_strtoll; then
26559 gl_GNULIB_ENABLED_strtoll_TRUE=
26560 gl_GNULIB_ENABLED_strtoll_FALSE='#'
26561else
26562 gl_GNULIB_ENABLED_strtoll_TRUE='#'
26563 gl_GNULIB_ENABLED_strtoll_FALSE=
26564fi
067d23c9 26565
5476a9a4
GM
26566 if $gl_gnulib_enabled_strtoull; then
26567 gl_GNULIB_ENABLED_strtoull_TRUE=
26568 gl_GNULIB_ENABLED_strtoull_FALSE='#'
26569else
26570 gl_GNULIB_ENABLED_strtoull_TRUE='#'
26571 gl_GNULIB_ENABLED_strtoull_FALSE=
f199cab1 26572fi
067d23c9 26573
5476a9a4
GM
26574 if $gl_gnulib_enabled_verify; then
26575 gl_GNULIB_ENABLED_verify_TRUE=
26576 gl_GNULIB_ENABLED_verify_FALSE='#'
26577else
26578 gl_GNULIB_ENABLED_verify_TRUE='#'
26579 gl_GNULIB_ENABLED_verify_FALSE=
26580fi
067d23c9 26581
710f5812
GM
26582 if $gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec; then
26583 gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_TRUE=
26584 gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_FALSE='#'
26585else
26586 gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_TRUE='#'
26587 gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_FALSE=
26588fi
26589
5476a9a4 26590 # End of code from modules
067d23c9 26591
067d23c9 26592
067d23c9 26593
067d23c9 26594
f199cab1 26595
f199cab1
GM
26596
26597
067d23c9 26598
5476a9a4
GM
26599
26600 gltests_libdeps=
26601 gltests_ltlibdeps=
067d23c9 26602
067d23c9 26603
067d23c9
KY
26604
26605
067d23c9
KY
26606
26607
3e0be4ab 26608
3e0be4ab 26609
3e0be4ab 26610
5476a9a4
GM
26611 gl_source_base='tests'
26612 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 26613
5476a9a4 26614 gl_module_indicator_condition=$gltests_WITNESS
3e0be4ab
GM
26615
26616
26617
26618
26619
067d23c9
KY
26620
26621
26622
3e0be4ab 26623
3e0be4ab 26624
5476a9a4
GM
26625 LIBGNU_LIBDEPS="$gl_libdeps"
26626
26627 LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
26628
067d23c9 26629
5476a9a4
GM
26630CFLAGS=$SAVE_CFLAGS
26631LIBS=$SAVE_LIBS
067d23c9
KY
26632
26633case "$opsys" in
26634 aix4-2) LD_SWITCH_SYSTEM_TEMACS="-Wl,-bnodelcsect" ;;
26635
26636 darwin)
26637 ## The -headerpad option tells ld (see man page) to leave room at the
26638 ## end of the header for adding load commands. Needed for dumping.
26639 ## 0x690 is the total size of 30 segment load commands (at 56
26640 ## each); under Cocoa 31 commands are required.
26641 if test "$HAVE_NS" = "yes"; then
26642 libs_nsgui="-framework AppKit"
26643 headerpad_extra=6C8
26644 else
26645 libs_nsgui=
26646 headerpad_extra=690
26647 fi
85cf5029 26648 LD_SWITCH_SYSTEM_TEMACS="-fno-pie -prebind $libs_nsgui -Xlinker -headerpad -Xlinker $headerpad_extra"
067d23c9
KY
26649
26650 ## This is here because src/Makefile.in did some extra fiddling around
2407788f
GM
26651 ## with LD_SWITCH_SYSTEM. It seems cleaner to put this in
26652 ## LD_SWITCH_SYSTEM_TEMACS instead,
067d23c9
KY
26653 test "x$LD_SWITCH_SYSTEM" = "x" && test "x$GCC" != "xyes" && \
26654 LD_SWITCH_SYSTEM_TEMACS="-X $LD_SWITCH_SYSTEM_TEMACS"
26655 ;;
26656
ae629dae
GM
26657 ## LD_SWITCH_X_SITE_RPATH is a -rpath option saying where to
26658 ## find X at run-time.
26659 ## When handled by cpp, this was in LD_SWITCH_SYSTEM. However, at the
26660 ## point where configure sourced the s/*.h file, LD_SWITCH_X_SITE_RPATH
067d23c9
KY
26661 ## had not yet been defined and was expanded to null. Hence LD_SWITCH_SYSTEM
26662 ## had different values in configure (in ac_link) and src/Makefile.in.
26663 ## It seems clearer therefore to put this piece in LD_SWITCH_SYSTEM_TEMACS.
ae629dae 26664 gnu*) LD_SWITCH_SYSTEM_TEMACS="\$(LD_SWITCH_X_SITE_RPATH)" ;;
067d23c9
KY
26665
26666 *) LD_SWITCH_SYSTEM_TEMACS= ;;
26667esac
26668
067d23c9
KY
26669
26670
42dcba54
GM
26671## Common for all window systems
26672if test "$window_system" != "none"; then
067d23c9
KY
26673
26674$as_echo "#define HAVE_WINDOW_SYSTEM 1" >>confdefs.h
26675
42dcba54 26676 WINDOW_SYSTEM_OBJ="fontset.o fringe.o image.o"
067d23c9
KY
26677fi
26678
26679
26680
26681
42dcba54 26682
067d23c9
KY
26683#### Report on what we decided to do.
26684#### Report GTK as a toolkit, even if it doesn't use Xt.
26685#### It makes printing result more understandable as using GTK sets
26686#### toolkit_scroll_bars to yes by default.
26687if test "${HAVE_GTK}" = "yes"; then
a732eace 26688 USE_X_TOOLKIT="$USE_GTK_TOOLKIT"
067d23c9
KY
26689fi
26690
26691echo "
26692Configured for \`${canonical}'.
26693
26694 Where should the build process find the source code? ${srcdir}
067d23c9
KY
26695 What compiler should emacs be built with? ${CC} ${CFLAGS}
26696 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
26697 Should Emacs use a relocating allocator for buffers? ${REL_ALLOC}
26698 Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers
26699 What window system should Emacs use? ${window_system}
26700 What toolkit should Emacs use? ${USE_X_TOOLKIT}"
26701
26702if test -n "${x_includes}"; then
26703echo " Where do we find X Windows header files? ${x_includes}"
26704else
26705echo " Where do we find X Windows header files? Standard dirs"
26706fi
26707if test -n "${x_libraries}"; then
26708echo " Where do we find X Windows libraries? ${x_libraries}"
26709else
26710echo " Where do we find X Windows libraries? Standard dirs"
26711fi
26712
26713echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}"
26714echo " Does Emacs use -lXpm? ${HAVE_XPM}"
26715echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
26716echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
26717echo " Does Emacs use a gif library? ${HAVE_GIF} $LIBGIF"
26718echo " Does Emacs use -lpng? ${HAVE_PNG}"
26719echo " Does Emacs use -lrsvg-2? ${HAVE_RSVG}"
26720echo " Does Emacs use imagemagick? ${HAVE_IMAGEMAGICK}"
26721
26722echo " Does Emacs use -lgpm? ${HAVE_GPM}"
26723echo " Does Emacs use -ldbus? ${HAVE_DBUS}"
26724echo " Does Emacs use -lgconf? ${HAVE_GCONF}"
f527bd02 26725echo " Does Emacs use GSettings? ${HAVE_GSETTINGS}"
067d23c9 26726echo " Does Emacs use -lselinux? ${HAVE_LIBSELINUX}"
27f5a136 26727echo " Does Emacs use -lgnutls? ${HAVE_GNUTLS}"
067d23c9
KY
26728echo " Does Emacs use -lxml2? ${HAVE_LIBXML2}"
26729
26730echo " Does Emacs use -lfreetype? ${HAVE_FREETYPE}"
26731echo " Does Emacs use -lm17n-flt? ${HAVE_M17N_FLT}"
26732echo " Does Emacs use -lotf? ${HAVE_LIBOTF}"
26733echo " Does Emacs use -lxft? ${HAVE_XFT}"
26734
26735echo " Does Emacs use toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
26736echo
26737
eb39a72d
GM
26738if test -n "${EMACSDATA}"; then
26739 echo " Environment variable EMACSDATA set to: $EMACSDATA"
26740fi
26741if test -n "${EMACSDOC}"; then
26742 echo " Environment variable EMACSDOC set to: $EMACSDOC"
26743fi
26744
067d23c9
KY
26745echo
26746
26747if test "$HAVE_NS" = "yes"; then
26748 echo
3d0788a9 26749 echo "You must run \"${MAKE-make} install\" in order to test the built application.
067d23c9
KY
26750The installed application will go to nextstep/Emacs.app and can be
26751run or moved from there."
26752 if test "$EN_NS_SELF_CONTAINED" = "yes"; then
26753 echo "The application will be fully self-contained."
26754 else
26755 echo "The lisp resources for the application will be installed under ${prefix}.
3d0788a9 26756You may need to run \"${MAKE-make} install\" with sudo. The application will fail
067d23c9
KY
26757to run if these resources are not installed."
26758 fi
26759 echo
26760fi
26761
031fabfc
GM
26762if test "${opsys}" = "cygwin"; then
26763 case `uname -r` in
26764 1.5.*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: building Emacs on Cygwin 1.5 is not supported." >&5
26765$as_echo "$as_me: WARNING: building Emacs on Cygwin 1.5 is not supported." >&2;}
26766 echo
26767 ;;
26768 esac
26769fi
067d23c9
KY
26770
26771# Remove any trailing slashes in these variables.
26772test "${prefix}" != NONE &&
26773 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
26774test "${exec_prefix}" != NONE &&
26775 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
26776
bb7dce39
GM
26777if test "$HAVE_NS" = "yes"; then
26778 if test "$NS_IMPL_GNUSTEP" = yes; then
26779 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"
26780
26781 else
26782 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"
26783
26784 fi
26785fi
26786
26787SUBDIR_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 26788
bb7dce39 26789ac_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 26790
a877df06 26791
73b78882 26792opt_makefile=test/automated/Makefile
a877df06 26793
b5591ebb 26794if test -f "$srcdir/$opt_makefile.in"; then
73b78882 26795 SUBDIR_MAKEFILES="$SUBDIR_MAKEFILES $opt_makefile"
56ade35c 26796 ac_config_files="$ac_config_files test/automated/Makefile"
a877df06 26797
56ade35c 26798fi
73b78882 26799
40b65096
GM
26800
26801opt_makefile=admin/unidata/Makefile
26802
b5591ebb 26803if test -f "$srcdir/$opt_makefile.in"; then
40b65096
GM
26804 SUBDIR_MAKEFILES="$SUBDIR_MAKEFILES $opt_makefile"
26805 ac_config_files="$ac_config_files admin/unidata/Makefile"
26806
26807fi
26808
26809
56ade35c 26810SUBDIR_MAKEFILES_IN=`echo " ${SUBDIR_MAKEFILES}" | sed -e 's| | $(srcdir)/|g' -e 's|Makefile|Makefile.in|g'`
73b78882 26811
067d23c9 26812
9411886d
PE
26813
26814ac_config_commands="$ac_config_commands mkdirs"
26815
26816
26817ac_config_commands="$ac_config_commands epaths"
26818
26819
26820ac_config_commands="$ac_config_commands gdbinit"
26821
067d23c9
KY
26822
26823cat >confcache <<\_ACEOF
26824# This file is a shell script that caches the results of configure
26825# tests run on this system so they can be shared between configure
26826# scripts and configure runs, see configure's option --config-cache.
26827# It is not useful on other systems. If it contains results you don't
26828# want to keep, you may remove or edit it.
26829#
26830# config.status only pays attention to the cache file if you give it
26831# the --recheck option to rerun configure.
26832#
26833# `ac_cv_env_foo' variables (set or unset) will be overridden when
26834# loading this file, other *unset* `ac_cv_foo' will be assigned the
26835# following values.
26836
26837_ACEOF
26838
26839# The following way of writing the cache mishandles newlines in values,
26840# but we know of no workaround that is simple, portable, and efficient.
26841# So, we kill variables containing newlines.
26842# Ultrix sh set writes to stderr and can't be redirected directly,
26843# and sets the high bit in the cache file unless we assign to the vars.
26844(
26845 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
26846 eval ac_val=\$$ac_var
26847 case $ac_val in #(
26848 *${as_nl}*)
26849 case $ac_var in #(
26850 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
26851$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
26852 esac
26853 case $ac_var in #(
26854 _ | IFS | as_nl) ;; #(
26855 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
26856 *) { eval $ac_var=; unset $ac_var;} ;;
26857 esac ;;
26858 esac
26859 done
26860
26861 (set) 2>&1 |
26862 case $as_nl`(ac_space=' '; set) 2>&1` in #(
26863 *${as_nl}ac_space=\ *)
26864 # `set' does not quote correctly, so add quotes: double-quote
26865 # substitution turns \\\\ into \\, and sed turns \\ into \.
26866 sed -n \
26867 "s/'/'\\\\''/g;
26868 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
26869 ;; #(
26870 *)
26871 # `set' quotes correctly as required by POSIX, so do not add quotes.
26872 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
26873 ;;
26874 esac |
26875 sort
26876) |
26877 sed '
26878 /^ac_cv_env_/b end
26879 t clear
26880 :clear
26881 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
26882 t end
26883 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
26884 :end' >>confcache
26885if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
26886 if test -w "$cache_file"; then
a9bec17c 26887 test "x$cache_file" != "x/dev/null" &&
067d23c9
KY
26888 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
26889$as_echo "$as_me: updating cache $cache_file" >&6;}
a9bec17c 26890 cat confcache >$cache_file
067d23c9
KY
26891 else
26892 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
26893$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
26894 fi
26895fi
26896rm -f confcache
26897
26898test "x$prefix" = xNONE && prefix=$ac_default_prefix
26899# Let make expand exec_prefix.
26900test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
26901
26902DEFS=-DHAVE_CONFIG_H
26903
26904ac_libobjs=
26905ac_ltlibobjs=
26906for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
26907 # 1. Remove the extension, and $U if already installed.
26908 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
26909 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
26910 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
26911 # will be set to the directory where LIBOBJS objects are built.
26912 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
26913 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
26914done
26915LIBOBJS=$ac_libobjs
26916
26917LTLIBOBJS=$ac_ltlibobjs
26918
26919
743c80a7
PE
26920 if test -n "$EXEEXT"; then
26921 am__EXEEXT_TRUE=
26922 am__EXEEXT_FALSE='#'
26923else
26924 am__EXEEXT_TRUE='#'
26925 am__EXEEXT_FALSE=
26926fi
26927
26928if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
a9bec17c 26929 as_fn_error "conditional \"AMDEP\" was never defined.
743c80a7
PE
26930Usually this means the macro was only invoked conditionally." "$LINENO" 5
26931fi
26932if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
a9bec17c 26933 as_fn_error "conditional \"am__fastdepCC\" was never defined.
743c80a7
PE
26934Usually this means the macro was only invoked conditionally." "$LINENO" 5
26935fi
743c80a7 26936if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
a9bec17c 26937 as_fn_error "conditional \"GL_COND_LIBTOOL\" was never defined.
743c80a7
PE
26938Usually this means the macro was only invoked conditionally." "$LINENO" 5
26939fi
4fc2b746 26940if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
a9bec17c 26941 as_fn_error "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
4fc2b746
GM
26942Usually this means the macro was only invoked conditionally." "$LINENO" 5
26943fi
743c80a7 26944
8966cbff
GM
26945if test -z "${GL_GENERATE_EXECINFO_H_TRUE}" && test -z "${GL_GENERATE_EXECINFO_H_FALSE}"; then
26946 as_fn_error "conditional \"GL_GENERATE_EXECINFO_H\" was never defined.
26947Usually this means the macro was only invoked conditionally." "$LINENO" 5
26948fi
4fda9c95 26949if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
a9bec17c 26950 as_fn_error "conditional \"GL_GENERATE_STDINT_H\" was never defined.
4fda9c95
GM
26951Usually this means the macro was only invoked conditionally." "$LINENO" 5
26952fi
0eb775a3
GM
26953if test -z "${GL_GENERATE_STDALIGN_H_TRUE}" && test -z "${GL_GENERATE_STDALIGN_H_FALSE}"; then
26954 as_fn_error "conditional \"GL_GENERATE_STDALIGN_H\" was never defined.
26955Usually this means the macro was only invoked conditionally." "$LINENO" 5
26956fi
6d153f56 26957if test -z "${GL_GENERATE_STDARG_H_TRUE}" && test -z "${GL_GENERATE_STDARG_H_FALSE}"; then
a9bec17c 26958 as_fn_error "conditional \"GL_GENERATE_STDARG_H\" was never defined.
6d153f56
GM
26959Usually this means the macro was only invoked conditionally." "$LINENO" 5
26960fi
6c051bab 26961if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
a9bec17c 26962 as_fn_error "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
6c051bab
GM
26963Usually this means the macro was only invoked conditionally." "$LINENO" 5
26964fi
26965if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
a9bec17c 26966 as_fn_error "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
6c051bab
GM
26967Usually this means the macro was only invoked conditionally." "$LINENO" 5
26968fi
d7ad186c
GM
26969if test -z "${gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_TRUE}" && test -z "${gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_FALSE}"; then
26970 as_fn_error "conditional \"gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b\" was never defined.
26971Usually this means the macro was only invoked conditionally." "$LINENO" 5
26972fi
6d153f56 26973if test -z "${gl_GNULIB_ENABLED_dosname_TRUE}" && test -z "${gl_GNULIB_ENABLED_dosname_FALSE}"; then
a9bec17c 26974 as_fn_error "conditional \"gl_GNULIB_ENABLED_dosname\" was never defined.
6d153f56
GM
26975Usually this means the macro was only invoked conditionally." "$LINENO" 5
26976fi
710f5812
GM
26977if test -z "${gl_GNULIB_ENABLED_euidaccess_TRUE}" && test -z "${gl_GNULIB_ENABLED_euidaccess_FALSE}"; then
26978 as_fn_error "conditional \"gl_GNULIB_ENABLED_euidaccess\" was never defined.
26979Usually this means the macro was only invoked conditionally." "$LINENO" 5
26980fi
26981if test -z "${gl_GNULIB_ENABLED_getgroups_TRUE}" && test -z "${gl_GNULIB_ENABLED_getgroups_FALSE}"; then
26982 as_fn_error "conditional \"gl_GNULIB_ENABLED_getgroups\" was never defined.
26983Usually this means the macro was only invoked conditionally." "$LINENO" 5
26984fi
6d153f56 26985if test -z "${gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE}" && test -z "${gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE}"; then
a9bec17c 26986 as_fn_error "conditional \"gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36\" was never defined.
6d153f56
GM
26987Usually this means the macro was only invoked conditionally." "$LINENO" 5
26988fi
710f5812
GM
26989if test -z "${gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_TRUE}" && test -z "${gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_FALSE}"; then
26990 as_fn_error "conditional \"gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1\" was never defined.
26991Usually this means the macro was only invoked conditionally." "$LINENO" 5
26992fi
d7ad186c
GM
26993if test -z "${gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_TRUE}" && test -z "${gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_FALSE}"; then
26994 as_fn_error "conditional \"gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7\" was never defined.
26995Usually this means the macro was only invoked conditionally." "$LINENO" 5
26996fi
a0a61e58
GM
26997if test -z "${gl_GNULIB_ENABLED_pathmax_TRUE}" && test -z "${gl_GNULIB_ENABLED_pathmax_FALSE}"; then
26998 as_fn_error "conditional \"gl_GNULIB_ENABLED_pathmax\" was never defined.
26999Usually this means the macro was only invoked conditionally." "$LINENO" 5
27000fi
710f5812
GM
27001if test -z "${gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_TRUE}" && test -z "${gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_FALSE}"; then
27002 as_fn_error "conditional \"gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c\" was never defined.
27003Usually this means the macro was only invoked conditionally." "$LINENO" 5
27004fi
6d153f56 27005if test -z "${gl_GNULIB_ENABLED_stat_TRUE}" && test -z "${gl_GNULIB_ENABLED_stat_FALSE}"; then
a9bec17c 27006 as_fn_error "conditional \"gl_GNULIB_ENABLED_stat\" was never defined.
6d153f56
GM
27007Usually this means the macro was only invoked conditionally." "$LINENO" 5
27008fi
3e0be4ab 27009if test -z "${gl_GNULIB_ENABLED_strtoll_TRUE}" && test -z "${gl_GNULIB_ENABLED_strtoll_FALSE}"; then
a9bec17c 27010 as_fn_error "conditional \"gl_GNULIB_ENABLED_strtoll\" was never defined.
3e0be4ab
GM
27011Usually this means the macro was only invoked conditionally." "$LINENO" 5
27012fi
6d153f56 27013if test -z "${gl_GNULIB_ENABLED_strtoull_TRUE}" && test -z "${gl_GNULIB_ENABLED_strtoull_FALSE}"; then
a9bec17c 27014 as_fn_error "conditional \"gl_GNULIB_ENABLED_strtoull\" was never defined.
6d153f56
GM
27015Usually this means the macro was only invoked conditionally." "$LINENO" 5
27016fi
27017if test -z "${gl_GNULIB_ENABLED_verify_TRUE}" && test -z "${gl_GNULIB_ENABLED_verify_FALSE}"; then
a9bec17c 27018 as_fn_error "conditional \"gl_GNULIB_ENABLED_verify\" was never defined.
6d153f56 27019Usually this means the macro was only invoked conditionally." "$LINENO" 5
710f5812
GM
27020fi
27021if test -z "${gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_TRUE}" && test -z "${gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_FALSE}"; then
27022 as_fn_error "conditional \"gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec\" was never defined.
27023Usually this means the macro was only invoked conditionally." "$LINENO" 5
6c051bab 27024fi
942f733f 27025
743c80a7
PE
27026 gl_libobjs=
27027 gl_ltlibobjs=
27028 if test -n "$gl_LIBOBJS"; then
27029 # Remove the extension.
27030 sed_drop_objext='s/\.o$//;s/\.obj$//'
27031 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
27032 gl_libobjs="$gl_libobjs $i.$ac_objext"
27033 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
27034 done
27035 fi
27036 gl_LIBOBJS=$gl_libobjs
27037
27038 gl_LTLIBOBJS=$gl_ltlibobjs
27039
27040
27041
27042 gltests_libobjs=
27043 gltests_ltlibobjs=
27044 if test -n "$gltests_LIBOBJS"; then
27045 # Remove the extension.
27046 sed_drop_objext='s/\.o$//;s/\.obj$//'
27047 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
27048 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
27049 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
27050 done
27051 fi
27052 gltests_LIBOBJS=$gltests_libobjs
27053
27054 gltests_LTLIBOBJS=$gltests_ltlibobjs
27055
067d23c9
KY
27056
27057
a9bec17c 27058: ${CONFIG_STATUS=./config.status}
067d23c9
KY
27059ac_write_fail=0
27060ac_clean_files_save=$ac_clean_files
27061ac_clean_files="$ac_clean_files $CONFIG_STATUS"
27062{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
27063$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
27064as_write_fail=0
27065cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
27066#! $SHELL
27067# Generated by $as_me.
27068# Run this file to recreate the current configuration.
27069# Compiler output produced by configure, useful for debugging
27070# configure, is in config.log if it exists.
27071
27072debug=false
27073ac_cs_recheck=false
27074ac_cs_silent=false
27075
27076SHELL=\${CONFIG_SHELL-$SHELL}
27077export SHELL
27078_ASEOF
27079cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
27080## -------------------- ##
27081## M4sh Initialization. ##
27082## -------------------- ##
27083
27084# Be more Bourne compatible
27085DUALCASE=1; export DUALCASE # for MKS sh
27086if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
27087 emulate sh
27088 NULLCMD=:
27089 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
27090 # is contrary to our usage. Disable this feature.
27091 alias -g '${1+"$@"}'='"$@"'
27092 setopt NO_GLOB_SUBST
27093else
27094 case `(set -o) 2>/dev/null` in #(
27095 *posix*) :
27096 set -o posix ;; #(
27097 *) :
27098 ;;
27099esac
27100fi
27101
27102
27103as_nl='
27104'
27105export as_nl
27106# Printing a long string crashes Solaris 7 /usr/bin/printf.
27107as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
27108as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
27109as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
27110# Prefer a ksh shell builtin over an external printf program on Solaris,
27111# but without wasting forks for bash or zsh.
27112if test -z "$BASH_VERSION$ZSH_VERSION" \
27113 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
27114 as_echo='print -r --'
27115 as_echo_n='print -rn --'
27116elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
27117 as_echo='printf %s\n'
27118 as_echo_n='printf %s'
27119else
27120 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
27121 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
27122 as_echo_n='/usr/ucb/echo -n'
27123 else
27124 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
27125 as_echo_n_body='eval
27126 arg=$1;
27127 case $arg in #(
27128 *"$as_nl"*)
27129 expr "X$arg" : "X\\(.*\\)$as_nl";
27130 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
27131 esac;
27132 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
27133 '
27134 export as_echo_n_body
27135 as_echo_n='sh -c $as_echo_n_body as_echo'
27136 fi
27137 export as_echo_body
27138 as_echo='sh -c $as_echo_body as_echo'
27139fi
27140
27141# The user is always right.
27142if test "${PATH_SEPARATOR+set}" != set; then
27143 PATH_SEPARATOR=:
27144 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
27145 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
27146 PATH_SEPARATOR=';'
27147 }
27148fi
27149
27150
27151# IFS
27152# We need space, tab and new line, in precisely that order. Quoting is
27153# there to prevent editors from complaining about space-tab.
27154# (If _AS_PATH_WALK were called with IFS unset, it would disable word
27155# splitting by setting IFS to empty value.)
27156IFS=" "" $as_nl"
27157
27158# Find who we are. Look in the path if we contain no directory separator.
27159case $0 in #((
27160 *[\\/]* ) as_myself=$0 ;;
27161 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27162for as_dir in $PATH
27163do
27164 IFS=$as_save_IFS
27165 test -z "$as_dir" && as_dir=.
27166 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
27167 done
27168IFS=$as_save_IFS
27169
27170 ;;
27171esac
27172# We did not find ourselves, most probably we were run as `sh COMMAND'
27173# in which case we are not to be found in the path.
27174if test "x$as_myself" = x; then
27175 as_myself=$0
27176fi
27177if test ! -f "$as_myself"; then
27178 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
27179 exit 1
27180fi
27181
27182# Unset variables that we do not need and which cause bugs (e.g. in
27183# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
27184# suppresses any "Segmentation fault" message there. '((' could
27185# trigger a bug in pdksh 5.2.14.
27186for as_var in BASH_ENV ENV MAIL MAILPATH
27187do eval test x\${$as_var+set} = xset \
27188 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
27189done
27190PS1='$ '
27191PS2='> '
27192PS4='+ '
27193
27194# NLS nuisances.
27195LC_ALL=C
27196export LC_ALL
27197LANGUAGE=C
27198export LANGUAGE
27199
27200# CDPATH.
27201(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
27202
27203
a9bec17c
GM
27204# as_fn_error ERROR [LINENO LOG_FD]
27205# ---------------------------------
067d23c9
KY
27206# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
27207# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
a9bec17c 27208# script with status $?, using 1 if that was 0.
067d23c9
KY
27209as_fn_error ()
27210{
a9bec17c
GM
27211 as_status=$?; test $as_status -eq 0 && as_status=1
27212 if test "$3"; then
27213 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
27214 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
067d23c9 27215 fi
a9bec17c 27216 $as_echo "$as_me: error: $1" >&2
067d23c9
KY
27217 as_fn_exit $as_status
27218} # as_fn_error
27219
27220
27221# as_fn_set_status STATUS
27222# -----------------------
27223# Set $? to STATUS, without forking.
27224as_fn_set_status ()
27225{
27226 return $1
27227} # as_fn_set_status
27228
27229# as_fn_exit STATUS
27230# -----------------
27231# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
27232as_fn_exit ()
27233{
27234 set +e
27235 as_fn_set_status $1
27236 exit $1
27237} # as_fn_exit
27238
27239# as_fn_unset VAR
27240# ---------------
27241# Portably unset VAR.
27242as_fn_unset ()
27243{
27244 { eval $1=; unset $1;}
27245}
27246as_unset=as_fn_unset
27247# as_fn_append VAR VALUE
27248# ----------------------
27249# Append the text in VALUE to the end of the definition contained in VAR. Take
27250# advantage of any shell optimizations that allow amortized linear growth over
27251# repeated appends, instead of the typical quadratic growth present in naive
27252# implementations.
27253if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
27254 eval 'as_fn_append ()
27255 {
27256 eval $1+=\$2
27257 }'
27258else
27259 as_fn_append ()
27260 {
27261 eval $1=\$$1\$2
27262 }
27263fi # as_fn_append
27264
27265# as_fn_arith ARG...
27266# ------------------
27267# Perform arithmetic evaluation on the ARGs, and store the result in the
27268# global $as_val. Take advantage of shells that can avoid forks. The arguments
27269# must be portable across $(()) and expr.
27270if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
27271 eval 'as_fn_arith ()
27272 {
27273 as_val=$(( $* ))
27274 }'
27275else
27276 as_fn_arith ()
27277 {
27278 as_val=`expr "$@" || test $? -eq 1`
27279 }
27280fi # as_fn_arith
27281
27282
27283if expr a : '\(a\)' >/dev/null 2>&1 &&
27284 test "X`expr 00001 : '.*\(...\)'`" = X001; then
27285 as_expr=expr
27286else
27287 as_expr=false
27288fi
27289
27290if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
27291 as_basename=basename
27292else
27293 as_basename=false
27294fi
27295
27296if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
27297 as_dirname=dirname
27298else
27299 as_dirname=false
27300fi
27301
27302as_me=`$as_basename -- "$0" ||
27303$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
27304 X"$0" : 'X\(//\)$' \| \
27305 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
27306$as_echo X/"$0" |
27307 sed '/^.*\/\([^/][^/]*\)\/*$/{
27308 s//\1/
27309 q
27310 }
27311 /^X\/\(\/\/\)$/{
27312 s//\1/
27313 q
27314 }
27315 /^X\/\(\/\).*/{
27316 s//\1/
27317 q
27318 }
27319 s/.*/./; q'`
27320
27321# Avoid depending upon Character Ranges.
27322as_cr_letters='abcdefghijklmnopqrstuvwxyz'
27323as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
27324as_cr_Letters=$as_cr_letters$as_cr_LETTERS
27325as_cr_digits='0123456789'
27326as_cr_alnum=$as_cr_Letters$as_cr_digits
27327
27328ECHO_C= ECHO_N= ECHO_T=
27329case `echo -n x` in #(((((
27330-n*)
27331 case `echo 'xy\c'` in
27332 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
27333 xy) ECHO_C='\c';;
27334 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
27335 ECHO_T=' ';;
27336 esac;;
27337*)
27338 ECHO_N='-n';;
27339esac
27340
27341rm -f conf$$ conf$$.exe conf$$.file
27342if test -d conf$$.dir; then
27343 rm -f conf$$.dir/conf$$.file
27344else
27345 rm -f conf$$.dir
27346 mkdir conf$$.dir 2>/dev/null
27347fi
27348if (echo >conf$$.file) 2>/dev/null; then
27349 if ln -s conf$$.file conf$$ 2>/dev/null; then
27350 as_ln_s='ln -s'
27351 # ... but there are two gotchas:
27352 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
27353 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
27354 # In both cases, we have to default to `cp -p'.
27355 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
27356 as_ln_s='cp -p'
27357 elif ln conf$$.file conf$$ 2>/dev/null; then
27358 as_ln_s=ln
27359 else
27360 as_ln_s='cp -p'
27361 fi
27362else
27363 as_ln_s='cp -p'
27364fi
27365rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
27366rmdir conf$$.dir 2>/dev/null
27367
27368
27369# as_fn_mkdir_p
27370# -------------
27371# Create "$as_dir" as a directory, including parents if necessary.
27372as_fn_mkdir_p ()
27373{
27374
27375 case $as_dir in #(
27376 -*) as_dir=./$as_dir;;
27377 esac
27378 test -d "$as_dir" || eval $as_mkdir_p || {
27379 as_dirs=
27380 while :; do
27381 case $as_dir in #(
27382 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
27383 *) as_qdir=$as_dir;;
27384 esac
27385 as_dirs="'$as_qdir' $as_dirs"
27386 as_dir=`$as_dirname -- "$as_dir" ||
27387$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
27388 X"$as_dir" : 'X\(//\)[^/]' \| \
27389 X"$as_dir" : 'X\(//\)$' \| \
27390 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
27391$as_echo X"$as_dir" |
27392 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
27393 s//\1/
27394 q
27395 }
27396 /^X\(\/\/\)[^/].*/{
27397 s//\1/
27398 q
27399 }
27400 /^X\(\/\/\)$/{
27401 s//\1/
27402 q
27403 }
27404 /^X\(\/\).*/{
27405 s//\1/
27406 q
27407 }
27408 s/.*/./; q'`
27409 test -d "$as_dir" && break
27410 done
27411 test -z "$as_dirs" || eval "mkdir $as_dirs"
a9bec17c 27412 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
067d23c9
KY
27413
27414
27415} # as_fn_mkdir_p
27416if mkdir -p . 2>/dev/null; then
27417 as_mkdir_p='mkdir -p "$as_dir"'
27418else
27419 test -d ./-p && rmdir ./-p
27420 as_mkdir_p=false
27421fi
27422
27423if test -x / >/dev/null 2>&1; then
27424 as_test_x='test -x'
27425else
27426 if ls -dL / >/dev/null 2>&1; then
27427 as_ls_L_option=L
27428 else
27429 as_ls_L_option=
27430 fi
27431 as_test_x='
27432 eval sh -c '\''
27433 if test -d "$1"; then
27434 test -d "$1/.";
27435 else
27436 case $1 in #(
27437 -*)set "./$1";;
27438 esac;
27439 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
27440 ???[sx]*):;;*)false;;esac;fi
27441 '\'' sh
27442 '
27443fi
27444as_executable_p=$as_test_x
27445
27446# Sed expression to map a string onto a valid CPP name.
27447as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
27448
27449# Sed expression to map a string onto a valid variable name.
27450as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
27451
27452
27453exec 6>&1
27454## ----------------------------------- ##
27455## Main body of $CONFIG_STATUS script. ##
27456## ----------------------------------- ##
27457_ASEOF
27458test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
27459
27460cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27461# Save the log message, to keep $0 and so on meaningful, and to
27462# report actual input values of CONFIG_FILES etc. instead of their
27463# values after options handling.
27464ac_log="
c574bc34 27465This file was extended by emacs $as_me 24.3.50, which was
a9bec17c 27466generated by GNU Autoconf 2.65. Invocation command line was
067d23c9
KY
27467
27468 CONFIG_FILES = $CONFIG_FILES
27469 CONFIG_HEADERS = $CONFIG_HEADERS
27470 CONFIG_LINKS = $CONFIG_LINKS
27471 CONFIG_COMMANDS = $CONFIG_COMMANDS
27472 $ $0 $@
27473
27474on `(hostname || uname -n) 2>/dev/null | sed 1q`
27475"
27476
27477_ACEOF
27478
27479case $ac_config_files in *"
27480"*) set x $ac_config_files; shift; ac_config_files=$*;;
27481esac
27482
27483case $ac_config_headers in *"
27484"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
27485esac
27486
27487
27488cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27489# Files that config.status was made for.
27490config_files="$ac_config_files"
27491config_headers="$ac_config_headers"
27492config_commands="$ac_config_commands"
27493
27494_ACEOF
27495
27496cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27497ac_cs_usage="\
27498\`$as_me' instantiates files and other configuration actions
27499from templates according to the current configuration. Unless the files
27500and actions are specified as TAGs, all are instantiated by default.
27501
27502Usage: $0 [OPTION]... [TAG]...
27503
27504 -h, --help print this help, then exit
27505 -V, --version print version number and configuration settings, then exit
27506 --config print configuration, then exit
27507 -q, --quiet, --silent
27508 do not print progress messages
27509 -d, --debug don't remove temporary files
27510 --recheck update $as_me by reconfiguring in the same conditions
27511 --file=FILE[:TEMPLATE]
27512 instantiate the configuration file FILE
27513 --header=FILE[:TEMPLATE]
27514 instantiate the configuration header FILE
27515
27516Configuration files:
27517$config_files
27518
27519Configuration headers:
27520$config_headers
27521
27522Configuration commands:
27523$config_commands
27524
27525Report bugs to the package provider."
27526
27527_ACEOF
27528cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27529ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
27530ac_cs_version="\\
c574bc34 27531emacs config.status 24.3.50
a9bec17c 27532configured by $0, generated by GNU Autoconf 2.65,
067d23c9
KY
27533 with options \\"\$ac_cs_config\\"
27534
a9bec17c 27535Copyright (C) 2009 Free Software Foundation, Inc.
067d23c9
KY
27536This config.status script is free software; the Free Software Foundation
27537gives unlimited permission to copy, distribute and modify it."
27538
27539ac_pwd='$ac_pwd'
27540srcdir='$srcdir'
27541INSTALL='$INSTALL'
743c80a7
PE
27542MKDIR_P='$MKDIR_P'
27543AWK='$AWK'
067d23c9
KY
27544test -n "\$AWK" || AWK=awk
27545_ACEOF
27546
27547cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27548# The default lists apply if the user does not specify any file.
27549ac_need_defaults=:
27550while test $# != 0
27551do
27552 case $1 in
a9bec17c 27553 --*=*)
067d23c9
KY
27554 ac_option=`expr "X$1" : 'X\([^=]*\)='`
27555 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
27556 ac_shift=:
27557 ;;
27558 *)
27559 ac_option=$1
27560 ac_optarg=$2
27561 ac_shift=shift
27562 ;;
27563 esac
27564
27565 case $ac_option in
27566 # Handling of the options.
27567 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
27568 ac_cs_recheck=: ;;
27569 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
27570 $as_echo "$ac_cs_version"; exit ;;
27571 --config | --confi | --conf | --con | --co | --c )
27572 $as_echo "$ac_cs_config"; exit ;;
27573 --debug | --debu | --deb | --de | --d | -d )
27574 debug=: ;;
27575 --file | --fil | --fi | --f )
27576 $ac_shift
27577 case $ac_optarg in
27578 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
27579 esac
27580 as_fn_append CONFIG_FILES " '$ac_optarg'"
27581 ac_need_defaults=false;;
27582 --header | --heade | --head | --hea )
27583 $ac_shift
27584 case $ac_optarg in
27585 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
27586 esac
27587 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
27588 ac_need_defaults=false;;
27589 --he | --h)
27590 # Conflict between --help and --header
a9bec17c 27591 as_fn_error "ambiguous option: \`$1'
067d23c9
KY
27592Try \`$0 --help' for more information.";;
27593 --help | --hel | -h )
27594 $as_echo "$ac_cs_usage"; exit ;;
27595 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
27596 | -silent | --silent | --silen | --sile | --sil | --si | --s)
27597 ac_cs_silent=: ;;
27598
27599 # This is an error.
a9bec17c 27600 -*) as_fn_error "unrecognized option: \`$1'
067d23c9
KY
27601Try \`$0 --help' for more information." ;;
27602
27603 *) as_fn_append ac_config_targets " $1"
27604 ac_need_defaults=false ;;
27605
27606 esac
27607 shift
27608done
27609
27610ac_configure_extra_args=
27611
27612if $ac_cs_silent; then
27613 exec 6>/dev/null
27614 ac_configure_extra_args="$ac_configure_extra_args --silent"
27615fi
27616
27617_ACEOF
27618cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27619if \$ac_cs_recheck; then
27620 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
27621 shift
27622 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
27623 CONFIG_SHELL='$SHELL'
27624 export CONFIG_SHELL
27625 exec "\$@"
27626fi
27627
27628_ACEOF
27629cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27630exec 5>>config.log
27631{
27632 echo
27633 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
27634## Running $as_me. ##
27635_ASBOX
27636 $as_echo "$ac_log"
27637} >&5
27638
27639_ACEOF
27640cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27641#
27642# INIT-COMMANDS
27643#
743c80a7 27644AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
5ec54608 27645GCC="$GCC" CPPFLAGS="$CPPFLAGS"
067d23c9
KY
27646
27647_ACEOF
27648
27649cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27650
27651# Handling of arguments.
27652for ac_config_target in $ac_config_targets
27653do
27654 case $ac_config_target in
27655 "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:src/config.in" ;;
743c80a7 27656 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
bb7dce39
GM
27657 "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" ;;
27658 "nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop") CONFIG_FILES="$CONFIG_FILES nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop:nextstep/templates/Emacs.desktop.in" ;;
27659 "nextstep/Cocoa/Emacs.base/Contents/Info.plist") CONFIG_FILES="$CONFIG_FILES nextstep/Cocoa/Emacs.base/Contents/Info.plist:nextstep/templates/Info.plist.in" ;;
27660 "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 27661 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
743c80a7 27662 "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
56ade35c
GM
27663 "lib-src/Makefile") CONFIG_FILES="$CONFIG_FILES lib-src/Makefile" ;;
27664 "oldXMenu/Makefile") CONFIG_FILES="$CONFIG_FILES oldXMenu/Makefile" ;;
27665 "doc/emacs/Makefile") CONFIG_FILES="$CONFIG_FILES doc/emacs/Makefile" ;;
27666 "doc/misc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/misc/Makefile" ;;
27667 "doc/lispintro/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispintro/Makefile" ;;
27668 "doc/lispref/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispref/Makefile" ;;
27669 "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
27670 "lwlib/Makefile") CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;;
27671 "lisp/Makefile") CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;;
27672 "leim/Makefile") CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;;
bb7dce39 27673 "nextstep/Makefile") CONFIG_FILES="$CONFIG_FILES nextstep/Makefile" ;;
56ade35c 27674 "test/automated/Makefile") CONFIG_FILES="$CONFIG_FILES test/automated/Makefile" ;;
40b65096 27675 "admin/unidata/Makefile") CONFIG_FILES="$CONFIG_FILES admin/unidata/Makefile" ;;
9411886d
PE
27676 "mkdirs") CONFIG_COMMANDS="$CONFIG_COMMANDS mkdirs" ;;
27677 "epaths") CONFIG_COMMANDS="$CONFIG_COMMANDS epaths" ;;
27678 "gdbinit") CONFIG_COMMANDS="$CONFIG_COMMANDS gdbinit" ;;
067d23c9 27679
a9bec17c 27680 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
067d23c9
KY
27681 esac
27682done
27683
27684
27685# If the user did not use the arguments to specify the items to instantiate,
27686# then the envvar interface is used. Set only those that are not.
27687# We use the long form for the default assignment because of an extremely
27688# bizarre bug on SunOS 4.1.3.
27689if $ac_need_defaults; then
27690 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
27691 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
27692 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
27693fi
27694
27695# Have a temporary directory for convenience. Make it in the build tree
27696# simply because there is no reason against having it here, and in addition,
27697# creating and moving files from /tmp can sometimes cause problems.
27698# Hook for its removal unless debugging.
27699# Note that there is a small window in which the directory will not be cleaned:
27700# after its creation but before its name has been assigned to `$tmp'.
27701$debug ||
27702{
a9bec17c 27703 tmp=
067d23c9 27704 trap 'exit_status=$?
a9bec17c 27705 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
067d23c9
KY
27706' 0
27707 trap 'as_fn_exit 1' 1 2 13 15
27708}
27709# Create a (secure) tmp directory for tmp files.
27710
27711{
27712 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
a9bec17c 27713 test -n "$tmp" && test -d "$tmp"
067d23c9
KY
27714} ||
27715{
27716 tmp=./conf$$-$RANDOM
27717 (umask 077 && mkdir "$tmp")
a9bec17c 27718} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
067d23c9
KY
27719
27720# Set up the scripts for CONFIG_FILES section.
27721# No need to generate them if there are no CONFIG_FILES.
27722# This happens for instance with `./config.status config.h'.
27723if test -n "$CONFIG_FILES"; then
27724
27725if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
27726 ac_cs_awk_getline=:
27727 ac_cs_awk_pipe_init=
27728 ac_cs_awk_read_file='
27729 while ((getline aline < (F[key])) > 0)
27730 print(aline)
27731 close(F[key])'
27732 ac_cs_awk_pipe_fini=
27733else
27734 ac_cs_awk_getline=false
27735 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
27736 ac_cs_awk_read_file='
27737 print "|#_!!_#|"
27738 print "cat " F[key] " &&"
27739 '$ac_cs_awk_pipe_init
27740 # The final `:' finishes the AND list.
27741 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
27742fi
27743ac_cr=`echo X | tr X '\015'`
27744# On cygwin, bash can eat \r inside `` if the user requested igncr.
27745# But we know of no other shell where ac_cr would be empty at this
27746# point, so we can use a bashism as a fallback.
27747if test "x$ac_cr" = x; then
27748 eval ac_cr=\$\'\\r\'
27749fi
27750ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
27751if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
a9bec17c 27752 ac_cs_awk_cr='\r'
067d23c9
KY
27753else
27754 ac_cs_awk_cr=$ac_cr
27755fi
27756
a9bec17c 27757echo 'BEGIN {' >"$tmp/subs1.awk" &&
067d23c9
KY
27758_ACEOF
27759
27760# Create commands to substitute file output variables.
27761{
27762 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
a9bec17c 27763 echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
067d23c9
KY
27764 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
27765 echo "_ACAWK" &&
27766 echo "_ACEOF"
27767} >conf$$files.sh &&
27768. ./conf$$files.sh ||
a9bec17c 27769 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
067d23c9
KY
27770rm -f conf$$files.sh
27771
27772{
27773 echo "cat >conf$$subs.awk <<_ACEOF" &&
27774 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
27775 echo "_ACEOF"
27776} >conf$$subs.sh ||
a9bec17c
GM
27777 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
27778ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
067d23c9
KY
27779ac_delim='%!_!# '
27780for ac_last_try in false false false false false :; do
27781 . ./conf$$subs.sh ||
a9bec17c 27782 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
067d23c9
KY
27783
27784 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
27785 if test $ac_delim_n = $ac_delim_num; then
27786 break
27787 elif $ac_last_try; then
a9bec17c 27788 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
067d23c9
KY
27789 else
27790 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
27791 fi
27792done
27793rm -f conf$$subs.sh
27794
27795cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
a9bec17c 27796cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
067d23c9
KY
27797_ACEOF
27798sed -n '
27799h
27800s/^/S["/; s/!.*/"]=/
27801p
27802g
27803s/^[^!]*!//
27804:repl
27805t repl
27806s/'"$ac_delim"'$//
27807t delim
27808:nl
27809h
27810s/\(.\{148\}\)..*/\1/
27811t more1
27812s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
27813p
27814n
27815b repl
27816:more1
27817s/["\\]/\\&/g; s/^/"/; s/$/"\\/
27818p
27819g
27820s/.\{148\}//
27821t nl
27822:delim
27823h
27824s/\(.\{148\}\)..*/\1/
27825t more2
27826s/["\\]/\\&/g; s/^/"/; s/$/"/
27827p
27828b
27829:more2
27830s/["\\]/\\&/g; s/^/"/; s/$/"\\/
27831p
27832g
27833s/.\{148\}//
27834t delim
27835' <conf$$subs.awk | sed '
27836/^[^""]/{
27837 N
27838 s/\n//
27839}
27840' >>$CONFIG_STATUS || ac_write_fail=1
27841rm -f conf$$subs.awk
27842cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27843_ACAWK
a9bec17c 27844cat >>"\$tmp/subs1.awk" <<_ACAWK &&
067d23c9
KY
27845 for (key in S) S_is_set[key] = 1
27846 FS = "\a"
27847 \$ac_cs_awk_pipe_init
27848}
27849{
27850 line = $ 0
27851 nfields = split(line, field, "@")
27852 substed = 0
27853 len = length(field[1])
27854 for (i = 2; i < nfields; i++) {
27855 key = field[i]
27856 keylen = length(key)
27857 if (S_is_set[key]) {
27858 value = S[key]
27859 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
27860 len += length(value) + length(field[++i])
27861 substed = 1
27862 } else
27863 len += 1 + keylen
27864 }
27865 if (nfields == 3 && !substed) {
27866 key = field[2]
27867 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
27868 \$ac_cs_awk_read_file
27869 next
27870 }
27871 }
27872 print line
27873}
27874\$ac_cs_awk_pipe_fini
27875_ACAWK
27876_ACEOF
27877cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27878if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
27879 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
27880else
27881 cat
a9bec17c
GM
27882fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
27883 || as_fn_error "could not setup config files machinery" "$LINENO" 5
067d23c9
KY
27884_ACEOF
27885
a9bec17c
GM
27886# VPATH may cause trouble with some makes, so we remove $(srcdir),
27887# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
067d23c9
KY
27888# trailing colons and then remove the whole line if VPATH becomes empty
27889# (actually we leave an empty line to preserve line numbers).
27890if test "x$srcdir" = x.; then
a9bec17c
GM
27891 ac_vpsub='/^[ ]*VPATH[ ]*=/{
27892s/:*\$(srcdir):*/:/
27893s/:*\${srcdir}:*/:/
27894s/:*@srcdir@:*/:/
27895s/^\([^=]*=[ ]*\):*/\1/
067d23c9
KY
27896s/:*$//
27897s/^[^=]*=[ ]*$//
27898}'
27899fi
27900
27901cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27902fi # test -n "$CONFIG_FILES"
27903
27904# Set up the scripts for CONFIG_HEADERS section.
27905# No need to generate them if there are no CONFIG_HEADERS.
27906# This happens for instance with `./config.status Makefile'.
27907if test -n "$CONFIG_HEADERS"; then
a9bec17c 27908cat >"$tmp/defines.awk" <<\_ACAWK ||
067d23c9
KY
27909BEGIN {
27910_ACEOF
27911
27912# Transform confdefs.h into an awk script `defines.awk', embedded as
27913# here-document in config.status, that substitutes the proper values into
27914# config.h.in to produce config.h.
27915
27916# Create a delimiter string that does not exist in confdefs.h, to ease
27917# handling of long lines.
27918ac_delim='%!_!# '
27919for ac_last_try in false false :; do
a9bec17c
GM
27920 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
27921 if test -z "$ac_t"; then
067d23c9
KY
27922 break
27923 elif $ac_last_try; then
a9bec17c 27924 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
067d23c9
KY
27925 else
27926 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
27927 fi
27928done
27929
27930# For the awk script, D is an array of macro values keyed by name,
27931# likewise P contains macro parameters if any. Preserve backslash
27932# newline sequences.
27933
27934ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
27935sed -n '
27936s/.\{148\}/&'"$ac_delim"'/g
27937t rset
27938:rset
27939s/^[ ]*#[ ]*define[ ][ ]*/ /
27940t def
27941d
27942:def
27943s/\\$//
27944t bsnl
27945s/["\\]/\\&/g
27946s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
27947D["\1"]=" \3"/p
27948s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
27949d
27950:bsnl
27951s/["\\]/\\&/g
27952s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
27953D["\1"]=" \3\\\\\\n"\\/p
27954t cont
27955s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
27956t cont
27957d
27958:cont
27959n
27960s/.\{148\}/&'"$ac_delim"'/g
27961t clear
27962:clear
27963s/\\$//
27964t bsnlc
27965s/["\\]/\\&/g; s/^/"/; s/$/"/p
27966d
27967:bsnlc
27968s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
27969b cont
27970' <confdefs.h | sed '
27971s/'"$ac_delim"'/"\\\
27972"/g' >>$CONFIG_STATUS || ac_write_fail=1
27973
27974cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27975 for (key in D) D_is_set[key] = 1
27976 FS = "\a"
27977}
27978/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
27979 line = \$ 0
27980 split(line, arg, " ")
27981 if (arg[1] == "#") {
27982 defundef = arg[2]
27983 mac1 = arg[3]
27984 } else {
27985 defundef = substr(arg[1], 2)
27986 mac1 = arg[2]
27987 }
27988 split(mac1, mac2, "(") #)
27989 macro = mac2[1]
27990 prefix = substr(line, 1, index(line, defundef) - 1)
27991 if (D_is_set[macro]) {
27992 # Preserve the white space surrounding the "#".
27993 print prefix "define", macro P[macro] D[macro]
27994 next
27995 } else {
27996 # Replace #undef with comments. This is necessary, for example,
27997 # in the case of _POSIX_SOURCE, which is predefined and required
27998 # on some systems where configure will not decide to define it.
27999 if (defundef == "undef") {
28000 print "/*", prefix defundef, macro, "*/"
28001 next
28002 }
28003 }
28004}
28005{ print }
28006_ACAWK
28007_ACEOF
28008cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
a9bec17c 28009 as_fn_error "could not setup config headers machinery" "$LINENO" 5
067d23c9
KY
28010fi # test -n "$CONFIG_HEADERS"
28011
28012
28013eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
28014shift
28015for ac_tag
28016do
28017 case $ac_tag in
28018 :[FHLC]) ac_mode=$ac_tag; continue;;
28019 esac
28020 case $ac_mode$ac_tag in
28021 :[FHL]*:*);;
a9bec17c 28022 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
067d23c9
KY
28023 :[FH]-) ac_tag=-:-;;
28024 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
28025 esac
28026 ac_save_IFS=$IFS
28027 IFS=:
28028 set x $ac_tag
28029 IFS=$ac_save_IFS
28030 shift
28031 ac_file=$1
28032 shift
28033
28034 case $ac_mode in
28035 :L) ac_source=$1;;
28036 :[FH])
28037 ac_file_inputs=
28038 for ac_f
28039 do
28040 case $ac_f in
a9bec17c 28041 -) ac_f="$tmp/stdin";;
067d23c9
KY
28042 *) # Look for the file first in the build tree, then in the source tree
28043 # (if the path is not absolute). The absolute path cannot be DOS-style,
28044 # because $ac_f cannot contain `:'.
28045 test -f "$ac_f" ||
28046 case $ac_f in
28047 [\\/$]*) false;;
28048 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
28049 esac ||
a9bec17c 28050 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
067d23c9
KY
28051 esac
28052 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
28053 as_fn_append ac_file_inputs " '$ac_f'"
28054 done
28055
28056 # Let's still pretend it is `configure' which instantiates (i.e., don't
28057 # use $as_me), people would be surprised to read:
28058 # /* config.h. Generated by config.status. */
28059 configure_input='Generated from '`
28060 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
28061 `' by configure.'
28062 if test x"$ac_file" != x-; then
28063 configure_input="$ac_file. $configure_input"
28064 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
28065$as_echo "$as_me: creating $ac_file" >&6;}
28066 fi
28067 # Neutralize special characters interpreted by sed in replacement strings.
28068 case $configure_input in #(
28069 *\&* | *\|* | *\\* )
28070 ac_sed_conf_input=`$as_echo "$configure_input" |
28071 sed 's/[\\\\&|]/\\\\&/g'`;; #(
28072 *) ac_sed_conf_input=$configure_input;;
28073 esac
28074
28075 case $ac_tag in
a9bec17c
GM
28076 *:-:* | *:-) cat >"$tmp/stdin" \
28077 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
067d23c9
KY
28078 esac
28079 ;;
28080 esac
28081
28082 ac_dir=`$as_dirname -- "$ac_file" ||
28083$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
28084 X"$ac_file" : 'X\(//\)[^/]' \| \
28085 X"$ac_file" : 'X\(//\)$' \| \
28086 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
28087$as_echo X"$ac_file" |
28088 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28089 s//\1/
28090 q
28091 }
28092 /^X\(\/\/\)[^/].*/{
28093 s//\1/
28094 q
28095 }
28096 /^X\(\/\/\)$/{
28097 s//\1/
28098 q
28099 }
28100 /^X\(\/\).*/{
28101 s//\1/
28102 q
28103 }
28104 s/.*/./; q'`
28105 as_dir="$ac_dir"; as_fn_mkdir_p
28106 ac_builddir=.
28107
28108case "$ac_dir" in
28109.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
28110*)
28111 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
28112 # A ".." for each directory in $ac_dir_suffix.
28113 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
28114 case $ac_top_builddir_sub in
28115 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
28116 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
28117 esac ;;
28118esac
28119ac_abs_top_builddir=$ac_pwd
28120ac_abs_builddir=$ac_pwd$ac_dir_suffix
28121# for backward compatibility:
28122ac_top_builddir=$ac_top_build_prefix
28123
28124case $srcdir in
28125 .) # We are building in place.
28126 ac_srcdir=.
28127 ac_top_srcdir=$ac_top_builddir_sub
28128 ac_abs_top_srcdir=$ac_pwd ;;
28129 [\\/]* | ?:[\\/]* ) # Absolute name.
28130 ac_srcdir=$srcdir$ac_dir_suffix;
28131 ac_top_srcdir=$srcdir
28132 ac_abs_top_srcdir=$srcdir ;;
28133 *) # Relative name.
28134 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
28135 ac_top_srcdir=$ac_top_build_prefix$srcdir
28136 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
28137esac
28138ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
28139
28140
28141 case $ac_mode in
28142 :F)
28143 #
28144 # CONFIG_FILE
28145 #
28146
28147 case $INSTALL in
28148 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
28149 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
28150 esac
743c80a7
PE
28151 ac_MKDIR_P=$MKDIR_P
28152 case $MKDIR_P in
28153 [\\/$]* | ?:[\\/]* ) ;;
28154 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
28155 esac
067d23c9
KY
28156_ACEOF
28157
28158cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
28159# If the template does not know about datarootdir, expand it.
28160# FIXME: This hack should be removed a few years after 2.60.
28161ac_datarootdir_hack=; ac_datarootdir_seen=
28162ac_sed_dataroot='
28163/datarootdir/ {
28164 p
28165 q
28166}
28167/@datadir@/p
28168/@docdir@/p
28169/@infodir@/p
28170/@localedir@/p
28171/@mandir@/p'
28172case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
28173*datarootdir*) ac_datarootdir_seen=yes;;
28174*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
28175 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
28176$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
28177_ACEOF
28178cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
28179 ac_datarootdir_hack='
28180 s&@datadir@&$datadir&g
28181 s&@docdir@&$docdir&g
28182 s&@infodir@&$infodir&g
28183 s&@localedir@&$localedir&g
28184 s&@mandir@&$mandir&g
28185 s&\\\${datarootdir}&$datarootdir&g' ;;
28186esac
28187_ACEOF
28188
28189# Neutralize VPATH when `$srcdir' = `.'.
28190# Shell code in configure.ac might set extrasub.
28191# FIXME: do we really want to maintain this feature?
28192cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
28193ac_sed_extra="$ac_vpsub
28194$extrasub
28195_ACEOF
28196cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
28197:t
28198/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
28199s|@configure_input@|$ac_sed_conf_input|;t t
28200s&@top_builddir@&$ac_top_builddir_sub&;t t
28201s&@top_build_prefix@&$ac_top_build_prefix&;t t
28202s&@srcdir@&$ac_srcdir&;t t
28203s&@abs_srcdir@&$ac_abs_srcdir&;t t
28204s&@top_srcdir@&$ac_top_srcdir&;t t
28205s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
28206s&@builddir@&$ac_builddir&;t t
28207s&@abs_builddir@&$ac_abs_builddir&;t t
28208s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
28209s&@INSTALL@&$ac_INSTALL&;t t
743c80a7 28210s&@MKDIR_P@&$ac_MKDIR_P&;t t
067d23c9
KY
28211$ac_datarootdir_hack
28212"
28213eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
28214if $ac_cs_awk_getline; then
a9bec17c 28215 $AWK -f "$tmp/subs.awk"
067d23c9 28216else
a9bec17c
GM
28217 $AWK -f "$tmp/subs.awk" | $SHELL
28218fi >$tmp/out \
28219 || as_fn_error "could not create $ac_file" "$LINENO" 5
067d23c9
KY
28220
28221test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
a9bec17c
GM
28222 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
28223 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
067d23c9 28224 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
a9bec17c 28225which seems to be undefined. Please make sure it is defined." >&5
067d23c9 28226$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
a9bec17c 28227which seems to be undefined. Please make sure it is defined." >&2;}
067d23c9 28228
a9bec17c 28229 rm -f "$tmp/stdin"
067d23c9 28230 case $ac_file in
a9bec17c
GM
28231 -) cat "$tmp/out" && rm -f "$tmp/out";;
28232 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
067d23c9 28233 esac \
a9bec17c 28234 || as_fn_error "could not create $ac_file" "$LINENO" 5
067d23c9
KY
28235 ;;
28236 :H)
28237 #
28238 # CONFIG_HEADER
28239 #
28240 if test x"$ac_file" != x-; then
28241 {
28242 $as_echo "/* $configure_input */" \
a9bec17c
GM
28243 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
28244 } >"$tmp/config.h" \
28245 || as_fn_error "could not create $ac_file" "$LINENO" 5
28246 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
067d23c9
KY
28247 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
28248$as_echo "$as_me: $ac_file is unchanged" >&6;}
28249 else
28250 rm -f "$ac_file"
a9bec17c
GM
28251 mv "$tmp/config.h" "$ac_file" \
28252 || as_fn_error "could not create $ac_file" "$LINENO" 5
067d23c9
KY
28253 fi
28254 else
28255 $as_echo "/* $configure_input */" \
a9bec17c
GM
28256 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
28257 || as_fn_error "could not create -" "$LINENO" 5
067d23c9 28258 fi
743c80a7
PE
28259# Compute "$ac_file"'s index in $config_headers.
28260_am_arg="$ac_file"
28261_am_stamp_count=1
28262for _am_header in $config_headers :; do
28263 case $_am_header in
28264 $_am_arg | $_am_arg:* )
28265 break ;;
28266 * )
28267 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
28268 esac
28269done
28270echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
28271$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
28272 X"$_am_arg" : 'X\(//\)[^/]' \| \
28273 X"$_am_arg" : 'X\(//\)$' \| \
28274 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
28275$as_echo X"$_am_arg" |
28276 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28277 s//\1/
28278 q
28279 }
28280 /^X\(\/\/\)[^/].*/{
28281 s//\1/
28282 q
28283 }
28284 /^X\(\/\/\)$/{
28285 s//\1/
28286 q
28287 }
28288 /^X\(\/\).*/{
28289 s//\1/
28290 q
28291 }
28292 s/.*/./; q'`/stamp-h$_am_stamp_count
067d23c9
KY
28293 ;;
28294
28295 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
28296$as_echo "$as_me: executing $ac_file commands" >&6;}
28297 ;;
28298 esac
28299
28300
28301 case $ac_file$ac_mode in
743c80a7
PE
28302 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
28303 # Autoconf 2.62 quotes --file arguments for eval, but not when files
28304 # are listed without --file. Let's play safe and only enable the eval
28305 # if we detect the quoting.
28306 case $CONFIG_FILES in
28307 *\'*) eval set x "$CONFIG_FILES" ;;
28308 *) set x $CONFIG_FILES ;;
28309 esac
28310 shift
28311 for mf
28312 do
28313 # Strip MF so we end up with the name of the file.
28314 mf=`echo "$mf" | sed -e 's/:.*$//'`
28315 # Check whether this is an Automake generated Makefile or not.
28316 # We used to match only the files named `Makefile.in', but
28317 # some people rename them; so instead we look at the file content.
28318 # Grep'ing the first line is not enough: some people post-process
28319 # each Makefile.in and add a new line on top of each file to say so.
28320 # Grep'ing the whole file is not good either: AIX grep has a line
28321 # limit of 2048, but all sed's we know have understand at least 4000.
28322 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
28323 dirpart=`$as_dirname -- "$mf" ||
28324$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
28325 X"$mf" : 'X\(//\)[^/]' \| \
28326 X"$mf" : 'X\(//\)$' \| \
28327 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
28328$as_echo X"$mf" |
28329 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28330 s//\1/
28331 q
28332 }
28333 /^X\(\/\/\)[^/].*/{
28334 s//\1/
28335 q
28336 }
28337 /^X\(\/\/\)$/{
28338 s//\1/
28339 q
28340 }
28341 /^X\(\/\).*/{
28342 s//\1/
28343 q
28344 }
28345 s/.*/./; q'`
28346 else
28347 continue
28348 fi
28349 # Extract the definition of DEPDIR, am__include, and am__quote
28350 # from the Makefile without running `make'.
28351 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
28352 test -z "$DEPDIR" && continue
28353 am__include=`sed -n 's/^am__include = //p' < "$mf"`
28354 test -z "am__include" && continue
28355 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
28356 # When using ansi2knr, U may be empty or an underscore; expand it
28357 U=`sed -n 's/^U = //p' < "$mf"`
28358 # Find all dependency output files, they are included files with
28359 # $(DEPDIR) in their names. We invoke sed twice because it is the
28360 # simplest approach to changing $(DEPDIR) to its actual value in the
28361 # expansion.
28362 for file in `sed -n "
28363 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
28364 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
28365 # Make sure the directory exists.
28366 test -f "$dirpart/$file" && continue
28367 fdir=`$as_dirname -- "$file" ||
28368$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
28369 X"$file" : 'X\(//\)[^/]' \| \
28370 X"$file" : 'X\(//\)$' \| \
28371 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
28372$as_echo X"$file" |
28373 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28374 s//\1/
28375 q
28376 }
28377 /^X\(\/\/\)[^/].*/{
28378 s//\1/
28379 q
28380 }
28381 /^X\(\/\/\)$/{
28382 s//\1/
28383 q
28384 }
28385 /^X\(\/\).*/{
28386 s//\1/
28387 q
28388 }
28389 s/.*/./; q'`
28390 as_dir=$dirpart/$fdir; as_fn_mkdir_p
28391 # echo "creating $dirpart/$file"
28392 echo '# dummy' > "$dirpart/$file"
28393 done
28394 done
28395}
28396 ;;
9411886d 28397 "mkdirs":C)
067d23c9
KY
28398for dir in etc lisp ; do
28399 test -d ${dir} || mkdir ${dir}
28400done
9411886d
PE
28401 ;;
28402 "epaths":C)
067d23c9 28403echo creating src/epaths.h
906debc3 28404${MAKE-make} MAKEFILE_NAME=do-not-make-Makefile epaths-force
9411886d
PE
28405 ;;
28406 "gdbinit":C)
b5591ebb 28407if test ! -f src/.gdbinit && test -f "$srcdir/src/.gdbinit"; then
067d23c9 28408 echo creating src/.gdbinit
b5591ebb 28409 echo "source $srcdir/src/.gdbinit" > src/.gdbinit
067d23c9 28410fi
067d23c9
KY
28411 ;;
28412
28413 esac
28414done # for ac_tag
28415
28416
28417as_fn_exit 0
28418_ACEOF
28419ac_clean_files=$ac_clean_files_save
28420
28421test $ac_write_fail = 0 ||
a9bec17c 28422 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
067d23c9
KY
28423
28424
28425# configure is writing to config.log, and then calls config.status.
28426# config.status does its own redirection, appending to config.log.
28427# Unfortunately, on DOS this fails, as config.log is still kept open
28428# by configure, so config.status won't be able to write to it; its
28429# output is simply discarded. So we exec the FD to /dev/null,
28430# effectively closing config.log, so it can be properly (re)opened and
28431# appended to by config.status. When coming back to configure, we
28432# need to make the FD available again.
28433if test "$no_create" != yes; then
28434 ac_cs_success=:
28435 ac_config_status_args=
28436 test "$silent" = yes &&
28437 ac_config_status_args="$ac_config_status_args --quiet"
28438 exec 5>/dev/null
28439 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
28440 exec 5>>config.log
28441 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
28442 # would make configure fail if this is the last instruction.
a9bec17c 28443 $ac_cs_success || as_fn_exit $?
067d23c9
KY
28444fi
28445if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
28446 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
28447$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
28448fi
28449