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
710f5812
GM
1063NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
1064NEXT_FCNTL_H
710f5812
GM
1065REPLACE_OPENAT
1066REPLACE_OPEN
1067REPLACE_FCNTL
1068HAVE_OPENAT
1069HAVE_FCNTL
1070GNULIB_OPENAT
1071GNULIB_OPEN
1072GNULIB_NONBLOCKING
1073GNULIB_FCNTL
8966cbff
GM
1074GL_GENERATE_EXECINFO_H_FALSE
1075GL_GENERATE_EXECINFO_H_TRUE
1076LIB_EXECINFO
1077EXECINFO_H
d7ad186c
GM
1078HAVE_DIRENT_H
1079NEXT_AS_FIRST_DIRECTIVE_DIRENT_H
1080NEXT_DIRENT_H
1081PRAGMA_COLUMNS
1082PRAGMA_SYSTEM_HEADER
1083INCLUDE_NEXT_AS_FIRST_DIRECTIVE
1084INCLUDE_NEXT
1085REPLACE_FDOPENDIR
1086REPLACE_DIRFD
1087REPLACE_CLOSEDIR
1088REPLACE_OPENDIR
1089HAVE_ALPHASORT
1090HAVE_SCANDIR
1091HAVE_FDOPENDIR
1092HAVE_DECL_FDOPENDIR
1093HAVE_DECL_DIRFD
1094HAVE_CLOSEDIR
1095HAVE_REWINDDIR
1096HAVE_READDIR
1097HAVE_OPENDIR
1098GNULIB_ALPHASORT
1099GNULIB_SCANDIR
1100GNULIB_FDOPENDIR
1101GNULIB_DIRFD
1102GNULIB_CLOSEDIR
1103GNULIB_REWINDDIR
1104GNULIB_READDIR
1105GNULIB_OPENDIR
e275c824
PE
1106UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1107UNISTD_H_HAVE_WINSOCK2_H
1108REPLACE_WRITE
1109REPLACE_USLEEP
1110REPLACE_UNLINKAT
1111REPLACE_UNLINK
1112REPLACE_TTYNAME_R
1113REPLACE_SYMLINK
1114REPLACE_SLEEP
1115REPLACE_RMDIR
1116REPLACE_READLINK
ca36e0ff 1117REPLACE_READ
e275c824
PE
1118REPLACE_PWRITE
1119REPLACE_PREAD
1120REPLACE_LSEEK
1121REPLACE_LINKAT
1122REPLACE_LINK
1123REPLACE_LCHOWN
0eb775a3 1124REPLACE_ISATTY
e275c824
PE
1125REPLACE_GETPAGESIZE
1126REPLACE_GETGROUPS
1127REPLACE_GETLOGIN_R
1128REPLACE_GETDOMAINNAME
1129REPLACE_GETCWD
0eb775a3 1130REPLACE_FTRUNCATE
e275c824
PE
1131REPLACE_FCHOWNAT
1132REPLACE_DUP2
1133REPLACE_DUP
1134REPLACE_CLOSE
1135REPLACE_CHOWN
1136HAVE_SYS_PARAM_H
1137HAVE_OS_H
1138HAVE_DECL_TTYNAME_R
0eb775a3 1139HAVE_DECL_SETHOSTNAME
e275c824
PE
1140HAVE_DECL_GETUSERSHELL
1141HAVE_DECL_GETPAGESIZE
1142HAVE_DECL_GETLOGIN_R
1143HAVE_DECL_GETDOMAINNAME
2b1928b8 1144HAVE_DECL_FDATASYNC
e275c824
PE
1145HAVE_DECL_FCHDIR
1146HAVE_DECL_ENVIRON
1147HAVE_USLEEP
1148HAVE_UNLINKAT
1149HAVE_SYMLINKAT
1150HAVE_SYMLINK
1151HAVE_SLEEP
0eb775a3 1152HAVE_SETHOSTNAME
e275c824
PE
1153HAVE_READLINKAT
1154HAVE_READLINK
1155HAVE_PWRITE
1156HAVE_PREAD
1157HAVE_PIPE2
1158HAVE_PIPE
1159HAVE_LINKAT
1160HAVE_LINK
1161HAVE_LCHOWN
da6c8463 1162HAVE_GROUP_MEMBER
e275c824
PE
1163HAVE_GETPAGESIZE
1164HAVE_GETLOGIN
1165HAVE_GETHOSTNAME
1166HAVE_GETGROUPS
1167HAVE_GETDTABLESIZE
1168HAVE_FTRUNCATE
1169HAVE_FSYNC
2b1928b8 1170HAVE_FDATASYNC
e275c824
PE
1171HAVE_FCHOWNAT
1172HAVE_FCHDIR
1173HAVE_FACCESSAT
1174HAVE_EUIDACCESS
1175HAVE_DUP3
1176HAVE_DUP2
1177HAVE_CHOWN
1178GNULIB_WRITE
1179GNULIB_USLEEP
1180GNULIB_UNLINKAT
1181GNULIB_UNLINK
1182GNULIB_UNISTD_H_SIGPIPE
ca36e0ff 1183GNULIB_UNISTD_H_NONBLOCKING
e275c824
PE
1184GNULIB_TTYNAME_R
1185GNULIB_SYMLINKAT
1186GNULIB_SYMLINK
1187GNULIB_SLEEP
0eb775a3 1188GNULIB_SETHOSTNAME
e275c824
PE
1189GNULIB_RMDIR
1190GNULIB_READLINKAT
1191GNULIB_READLINK
ca36e0ff 1192GNULIB_READ
e275c824
PE
1193GNULIB_PWRITE
1194GNULIB_PREAD
1195GNULIB_PIPE2
1196GNULIB_PIPE
1197GNULIB_LSEEK
1198GNULIB_LINKAT
1199GNULIB_LINK
1200GNULIB_LCHOWN
0eb775a3 1201GNULIB_ISATTY
da6c8463 1202GNULIB_GROUP_MEMBER
e275c824
PE
1203GNULIB_GETUSERSHELL
1204GNULIB_GETPAGESIZE
1205GNULIB_GETLOGIN_R
1206GNULIB_GETLOGIN
1207GNULIB_GETHOSTNAME
1208GNULIB_GETGROUPS
1209GNULIB_GETDTABLESIZE
1210GNULIB_GETDOMAINNAME
1211GNULIB_GETCWD
1212GNULIB_FTRUNCATE
1213GNULIB_FSYNC
2b1928b8 1214GNULIB_FDATASYNC
e275c824
PE
1215GNULIB_FCHOWNAT
1216GNULIB_FCHDIR
1217GNULIB_FACCESSAT
1218GNULIB_EUIDACCESS
1219GNULIB_ENVIRON
1220GNULIB_DUP3
1221GNULIB_DUP2
2b1928b8 1222GNULIB_DUP
e275c824
PE
1223GNULIB_CLOSE
1224GNULIB_CHOWN
2b1928b8 1225GNULIB_CHDIR
f199cab1 1226LIB_CLOCK_GETTIME
4fc2b746
GM
1227GL_GENERATE_ALLOCA_H_FALSE
1228GL_GENERATE_ALLOCA_H_TRUE
1229ALLOCA_H
1230ALLOCA
743c80a7
PE
1231GL_COND_LIBTOOL_FALSE
1232GL_COND_LIBTOOL_TRUE
5476a9a4
GM
1233POST_ALLOC_OBJ
1234PRE_ALLOC_OBJ
1235CYGWIN_OBJ
1236RALLOC_OBJ
1237OLDXMENU_DEPS
1238LIBX_OTHER
1239LIBXMENU
1240OLDXMENU
1241OLDXMENU_TARGET
1242LIBXT_OTHER
1243TOOLKIT_LIBW
1244WIDGET_OBJ
1245XOBJ
1246XMENU_OBJ
1247FONT_OBJ
1248OTHER_FILES
1249GNU_OBJC_CFLAGS
1250ns_appsrc
1251ns_appresdir
1252ns_appbindir
1253ns_appdir
5476a9a4
GM
1254X_TOOLKIT_TYPE
1255GNUSTEP_CFLAGS
1256C_SWITCH_X_SITE
1257LD_SWITCH_X_SITE
1258gameuser
1259gamedir
1260bitmapdir
1261archlibdir
1262etcdir
1263x_default_search_path
1264lisppath
1265locallisppath
1266standardlisppath
1267leimdir
1268lispdir
1269srcdir
1270canonical
1271configuration
1272version
bb7dce39 1273copyright
5476a9a4
GM
1274KRB4LIB
1275DESLIB
1276KRB5LIB
1277CRYPTOLIB
1278COM_ERRLIB
1279LIBRESOLV
1280LIBHESIOD
1281TERMCAP_OBJ
1282LIBS_TERMCAP
1283BLESSMAIL_TARGET
1284LIBS_MAIL
1285liblockfile
1286LIBXML2_LIBS
1287LIBXML2_CFLAGS
1288LIBXSM
1289LIBGPM
1290LIBGIF
1291LIBTIFF
1292LIBPNG
1293LIBJPEG
1294LIBXPM
1295M17N_FLT_LIBS
1296M17N_FLT_CFLAGS
1297LIBOTF_LIBS
1298LIBOTF_CFLAGS
1299FREETYPE_LIBS
1300FREETYPE_CFLAGS
1301XFT_LIBS
1302XFT_CFLAGS
1303FONTCONFIG_LIBS
1304FONTCONFIG_CFLAGS
1305LIBXMU
1306LIBXTR6
4cc63c81 1307LIBACL_LIBS
5476a9a4
GM
1308LIBGNUTLS_LIBS
1309LIBGNUTLS_CFLAGS
1310LIBSELINUX_LIBS
1311SETTINGS_LIBS
1312SETTINGS_CFLAGS
dcde497f
GM
1313GOBJECT_LIBS
1314GOBJECT_CFLAGS
5476a9a4
GM
1315GCONF_LIBS
1316GCONF_CFLAGS
1317GSETTINGS_LIBS
1318GSETTINGS_CFLAGS
1319DBUS_OBJ
1320DBUS_LIBS
1321DBUS_CFLAGS
1322GTK_OBJ
1323GTK_LIBS
1324GTK_CFLAGS
1325IMAGEMAGICK_LIBS
1326IMAGEMAGICK_CFLAGS
1327RSVG_LIBS
1328RSVG_CFLAGS
1329LIB_PTHREAD
1330VMLIMIT_OBJ
1331GMALLOC_OBJ
1332HAVE_XSERVER
b5eb356a
GM
1333W32_RES_LINK
1334W32_RES
5c0255d9
GM
1335W32_LIBS
1336W32_OBJ
b5eb356a 1337WINDRES
5476a9a4
GM
1338NS_OBJC_OBJ
1339NS_OBJ
1340ns_self_contained
1341INSTALL_ARCH_INDEP_EXTRA
4efe5ef9 1342LIBS_GNUSTEP
5476a9a4
GM
1343LD_SWITCH_X_SITE_RPATH
1344XMKMF
1345DEPFLAGS
1346MKDEPDIR
1347CFLAGS_SOUND
1348ALSA_LIBS
1349ALSA_CFLAGS
1350LIBSOUND
1351PKG_CONFIG
067d23c9 1352LIB_MATH
067d23c9
KY
1353LIBS_SYSTEM
1354C_SWITCH_SYSTEM
1355UNEXEC_OBJ
1356C_SWITCH_MACHINE
1357LD_SWITCH_SYSTEM
1358CANNOT_DUMP
141d074d
GM
1359INFO_OPTS
1360INFO_EXT
96f129d5 1361HAVE_MAKEINFO
9c29597b 1362PAXCTL
067d23c9
KY
1363GZIP_PROG
1364INSTALL_INFO
0e733db9 1365LN_S
a6b92a4a 1366GNULIB_WARN_CFLAGS
0eb775a3 1367WARN_CFLAGS
a6b92a4a 1368WERROR_CFLAGS
369e19fc
PE
1369RANLIB
1370ARFLAGS
1371AR
067d23c9
KY
1372EGREP
1373GREP
1374CPP
743c80a7
PE
1375am__fastdepCC_FALSE
1376am__fastdepCC_TRUE
1377CCDEPMODE
1378AMDEPBACKSLASH
1379AMDEP_FALSE
1380AMDEP_TRUE
1381am__quote
1382am__include
1383DEPDIR
067d23c9
KY
1384OBJEXT
1385EXEEXT
1386ac_ct_CC
1387CPPFLAGS
1388LDFLAGS
1389CFLAGS
1390CC
1391host_os
1392host_vendor
1393host_cpu
1394host
1395build_os
1396build_vendor
1397build_cpu
1398build
1399PROFILING_CFLAGS
067d23c9 1400GZIP_INFO
c3a461a5 1401cache_file
743c80a7
PE
1402am__untar
1403am__tar
1404AMTAR
1405am__leading_dot
1406SET_MAKE
1407AWK
1408mkdir_p
1409MKDIR_P
1410INSTALL_STRIP_PROGRAM
1411STRIP
1412install_sh
1413MAKEINFO
1414AUTOHEADER
1415AUTOMAKE
1416AUTOCONF
1417ACLOCAL
1418VERSION
1419PACKAGE
1420CYGPATH_W
1421am__isrc
1422INSTALL_DATA
1423INSTALL_SCRIPT
1424INSTALL_PROGRAM
067d23c9
KY
1425target_alias
1426host_alias
1427build_alias
1428LIBS
1429ECHO_T
1430ECHO_N
1431ECHO_C
1432DEFS
1433mandir
1434localedir
1435libdir
1436psdir
1437pdfdir
1438dvidir
1439htmldir
1440infodir
1441docdir
1442oldincludedir
1443includedir
1444localstatedir
1445sharedstatedir
1446sysconfdir
1447datadir
1448datarootdir
1449libexecdir
1450sbindir
1451bindir
1452program_transform_name
1453prefix
1454exec_prefix
1455PACKAGE_URL
1456PACKAGE_BUGREPORT
1457PACKAGE_STRING
1458PACKAGE_VERSION
1459PACKAGE_TARNAME
1460PACKAGE_NAME
1461PATH_SEPARATOR
1462SHELL'
1463ac_subst_files='deps_frag
bb7dce39 1464lisp_frag'
067d23c9
KY
1465ac_user_opts='
1466enable_option_checking
ee77919d 1467with_all
067d23c9
KY
1468with_pop
1469with_kerberos
1470with_kerberos5
1471with_hesiod
1472with_mmdf
1473with_mail_unlink
1474with_mailhost
1475with_sound
067d23c9 1476with_x_toolkit
0442dc7f 1477with_wide_int
067d23c9
KY
1478with_xpm
1479with_jpeg
1480with_tiff
1481with_gif
1482with_png
1483with_rsvg
1484with_xml2
1485with_imagemagick
1486with_xft
1487with_libotf
1488with_m17n_flt
1489with_toolkit_scroll_bars
1490with_xaw3d
1491with_xim
1492with_ns
5c0255d9 1493with_w32
067d23c9
KY
1494with_gpm
1495with_dbus
1496with_gconf
f527bd02 1497with_gsettings
067d23c9 1498with_selinux
4cc63c81 1499with_acl
067d23c9 1500with_gnutls
b5eb356a 1501with_inotify
067d23c9
KY
1502with_makeinfo
1503with_compress_info
1504with_pkg_config_prog
4fc5868a 1505with_gameuser
067d23c9
KY
1506with_gnustep_conf
1507enable_ns_self_contained
067d23c9
KY
1508enable_locallisppath
1509enable_checking
afd07e01 1510enable_check_lisp_object_type
067d23c9
KY
1511enable_profiling
1512enable_autodepend
4efe5ef9 1513enable_gtk_deprecation_warnings
743c80a7 1514enable_dependency_tracking
067d23c9 1515enable_largefile
a6b92a4a 1516enable_gcc_warnings
e4d35030 1517enable_link_time_optimization
067d23c9
KY
1518with_x
1519'
1520 ac_precious_vars='build_alias
1521host_alias
1522target_alias
1523CC
1524CFLAGS
1525LDFLAGS
1526LIBS
1527CPPFLAGS
1528CPP
1529XMKMF'
1530
1531
1532# Initialize some variables set by options.
1533ac_init_help=
1534ac_init_version=false
1535ac_unrecognized_opts=
1536ac_unrecognized_sep=
1537# The variables have the same names as the options, with
1538# dashes changed to underlines.
1539cache_file=/dev/null
1540exec_prefix=NONE
1541no_create=
1542no_recursion=
1543prefix=NONE
1544program_prefix=NONE
1545program_suffix=NONE
1546program_transform_name=s,x,x,
1547silent=
1548site=
1549srcdir=
1550verbose=
1551x_includes=NONE
1552x_libraries=NONE
1553
1554# Installation directory options.
1555# These are left unexpanded so users can "make install exec_prefix=/foo"
1556# and all the variables that are supposed to be based on exec_prefix
1557# by default will actually change.
1558# Use braces instead of parens because sh, perl, etc. also accept them.
1559# (The list follows the same order as the GNU Coding Standards.)
1560bindir='${exec_prefix}/bin'
1561sbindir='${exec_prefix}/sbin'
1562libexecdir='${exec_prefix}/libexec'
1563datarootdir='${prefix}/share'
1564datadir='${datarootdir}'
1565sysconfdir='${prefix}/etc'
1566sharedstatedir='${prefix}/com'
1567localstatedir='${prefix}/var'
1568includedir='${prefix}/include'
1569oldincludedir='/usr/include'
1570docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1571infodir='${datarootdir}/info'
1572htmldir='${docdir}'
1573dvidir='${docdir}'
1574pdfdir='${docdir}'
1575psdir='${docdir}'
1576libdir='${exec_prefix}/lib'
1577localedir='${datarootdir}/locale'
1578mandir='${datarootdir}/man'
1579
1580ac_prev=
1581ac_dashdash=
1582for ac_option
1583do
1584 # If the previous option needs an argument, assign it.
1585 if test -n "$ac_prev"; then
1586 eval $ac_prev=\$ac_option
1587 ac_prev=
1588 continue
1589 fi
1590
1591 case $ac_option in
a9bec17c
GM
1592 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1593 *) ac_optarg=yes ;;
067d23c9
KY
1594 esac
1595
1596 # Accept the important Cygnus configure options, so we can diagnose typos.
1597
1598 case $ac_dashdash$ac_option in
1599 --)
1600 ac_dashdash=yes ;;
1601
1602 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1603 ac_prev=bindir ;;
1604 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1605 bindir=$ac_optarg ;;
1606
1607 -build | --build | --buil | --bui | --bu)
1608 ac_prev=build_alias ;;
1609 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1610 build_alias=$ac_optarg ;;
1611
1612 -cache-file | --cache-file | --cache-fil | --cache-fi \
1613 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1614 ac_prev=cache_file ;;
1615 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1616 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1617 cache_file=$ac_optarg ;;
1618
1619 --config-cache | -C)
1620 cache_file=config.cache ;;
1621
1622 -datadir | --datadir | --datadi | --datad)
1623 ac_prev=datadir ;;
1624 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1625 datadir=$ac_optarg ;;
1626
1627 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1628 | --dataroo | --dataro | --datar)
1629 ac_prev=datarootdir ;;
1630 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1631 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1632 datarootdir=$ac_optarg ;;
1633
1634 -disable-* | --disable-*)
1635 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1636 # Reject names that are not valid shell variable names.
1637 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
a9bec17c 1638 as_fn_error "invalid feature name: $ac_useropt"
067d23c9
KY
1639 ac_useropt_orig=$ac_useropt
1640 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1641 case $ac_user_opts in
1642 *"
1643"enable_$ac_useropt"
1644"*) ;;
1645 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1646 ac_unrecognized_sep=', ';;
1647 esac
1648 eval enable_$ac_useropt=no ;;
1649
1650 -docdir | --docdir | --docdi | --doc | --do)
1651 ac_prev=docdir ;;
1652 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1653 docdir=$ac_optarg ;;
1654
1655 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1656 ac_prev=dvidir ;;
1657 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1658 dvidir=$ac_optarg ;;
1659
1660 -enable-* | --enable-*)
1661 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1662 # Reject names that are not valid shell variable names.
1663 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
a9bec17c 1664 as_fn_error "invalid feature name: $ac_useropt"
067d23c9
KY
1665 ac_useropt_orig=$ac_useropt
1666 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1667 case $ac_user_opts in
1668 *"
1669"enable_$ac_useropt"
1670"*) ;;
1671 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1672 ac_unrecognized_sep=', ';;
1673 esac
1674 eval enable_$ac_useropt=\$ac_optarg ;;
1675
1676 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1677 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1678 | --exec | --exe | --ex)
1679 ac_prev=exec_prefix ;;
1680 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1681 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1682 | --exec=* | --exe=* | --ex=*)
1683 exec_prefix=$ac_optarg ;;
1684
1685 -gas | --gas | --ga | --g)
1686 # Obsolete; use --with-gas.
1687 with_gas=yes ;;
1688
1689 -help | --help | --hel | --he | -h)
1690 ac_init_help=long ;;
1691 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1692 ac_init_help=recursive ;;
1693 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1694 ac_init_help=short ;;
1695
1696 -host | --host | --hos | --ho)
1697 ac_prev=host_alias ;;
1698 -host=* | --host=* | --hos=* | --ho=*)
1699 host_alias=$ac_optarg ;;
1700
1701 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1702 ac_prev=htmldir ;;
1703 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1704 | --ht=*)
1705 htmldir=$ac_optarg ;;
1706
1707 -includedir | --includedir | --includedi | --included | --include \
1708 | --includ | --inclu | --incl | --inc)
1709 ac_prev=includedir ;;
1710 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1711 | --includ=* | --inclu=* | --incl=* | --inc=*)
1712 includedir=$ac_optarg ;;
1713
1714 -infodir | --infodir | --infodi | --infod | --info | --inf)
1715 ac_prev=infodir ;;
1716 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1717 infodir=$ac_optarg ;;
1718
1719 -libdir | --libdir | --libdi | --libd)
1720 ac_prev=libdir ;;
1721 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1722 libdir=$ac_optarg ;;
1723
1724 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1725 | --libexe | --libex | --libe)
1726 ac_prev=libexecdir ;;
1727 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1728 | --libexe=* | --libex=* | --libe=*)
1729 libexecdir=$ac_optarg ;;
1730
1731 -localedir | --localedir | --localedi | --localed | --locale)
1732 ac_prev=localedir ;;
1733 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1734 localedir=$ac_optarg ;;
1735
1736 -localstatedir | --localstatedir | --localstatedi | --localstated \
1737 | --localstate | --localstat | --localsta | --localst | --locals)
1738 ac_prev=localstatedir ;;
1739 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1740 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1741 localstatedir=$ac_optarg ;;
1742
1743 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1744 ac_prev=mandir ;;
1745 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1746 mandir=$ac_optarg ;;
1747
1748 -nfp | --nfp | --nf)
1749 # Obsolete; use --without-fp.
1750 with_fp=no ;;
1751
1752 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1753 | --no-cr | --no-c | -n)
1754 no_create=yes ;;
1755
1756 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1757 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1758 no_recursion=yes ;;
1759
1760 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1761 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1762 | --oldin | --oldi | --old | --ol | --o)
1763 ac_prev=oldincludedir ;;
1764 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1765 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1766 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1767 oldincludedir=$ac_optarg ;;
1768
1769 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1770 ac_prev=prefix ;;
1771 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1772 prefix=$ac_optarg ;;
1773
1774 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1775 | --program-pre | --program-pr | --program-p)
1776 ac_prev=program_prefix ;;
1777 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1778 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1779 program_prefix=$ac_optarg ;;
1780
1781 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1782 | --program-suf | --program-su | --program-s)
1783 ac_prev=program_suffix ;;
1784 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1785 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1786 program_suffix=$ac_optarg ;;
1787
1788 -program-transform-name | --program-transform-name \
1789 | --program-transform-nam | --program-transform-na \
1790 | --program-transform-n | --program-transform- \
1791 | --program-transform | --program-transfor \
1792 | --program-transfo | --program-transf \
1793 | --program-trans | --program-tran \
1794 | --progr-tra | --program-tr | --program-t)
1795 ac_prev=program_transform_name ;;
1796 -program-transform-name=* | --program-transform-name=* \
1797 | --program-transform-nam=* | --program-transform-na=* \
1798 | --program-transform-n=* | --program-transform-=* \
1799 | --program-transform=* | --program-transfor=* \
1800 | --program-transfo=* | --program-transf=* \
1801 | --program-trans=* | --program-tran=* \
1802 | --progr-tra=* | --program-tr=* | --program-t=*)
1803 program_transform_name=$ac_optarg ;;
1804
1805 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1806 ac_prev=pdfdir ;;
1807 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1808 pdfdir=$ac_optarg ;;
1809
1810 -psdir | --psdir | --psdi | --psd | --ps)
1811 ac_prev=psdir ;;
1812 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1813 psdir=$ac_optarg ;;
1814
1815 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1816 | -silent | --silent | --silen | --sile | --sil)
1817 silent=yes ;;
1818
1819 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1820 ac_prev=sbindir ;;
1821 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1822 | --sbi=* | --sb=*)
1823 sbindir=$ac_optarg ;;
1824
1825 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1826 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1827 | --sharedst | --shareds | --shared | --share | --shar \
1828 | --sha | --sh)
1829 ac_prev=sharedstatedir ;;
1830 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1831 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1832 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1833 | --sha=* | --sh=*)
1834 sharedstatedir=$ac_optarg ;;
1835
1836 -site | --site | --sit)
1837 ac_prev=site ;;
1838 -site=* | --site=* | --sit=*)
1839 site=$ac_optarg ;;
1840
1841 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1842 ac_prev=srcdir ;;
1843 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1844 srcdir=$ac_optarg ;;
1845
1846 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1847 | --syscon | --sysco | --sysc | --sys | --sy)
1848 ac_prev=sysconfdir ;;
1849 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1850 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1851 sysconfdir=$ac_optarg ;;
1852
1853 -target | --target | --targe | --targ | --tar | --ta | --t)
1854 ac_prev=target_alias ;;
1855 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1856 target_alias=$ac_optarg ;;
1857
1858 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1859 verbose=yes ;;
1860
1861 -version | --version | --versio | --versi | --vers | -V)
1862 ac_init_version=: ;;
1863
1864 -with-* | --with-*)
1865 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1866 # Reject names that are not valid shell variable names.
1867 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
a9bec17c 1868 as_fn_error "invalid package name: $ac_useropt"
067d23c9
KY
1869 ac_useropt_orig=$ac_useropt
1870 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1871 case $ac_user_opts in
1872 *"
1873"with_$ac_useropt"
1874"*) ;;
1875 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1876 ac_unrecognized_sep=', ';;
1877 esac
1878 eval with_$ac_useropt=\$ac_optarg ;;
1879
1880 -without-* | --without-*)
1881 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1882 # Reject names that are not valid shell variable names.
1883 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
a9bec17c 1884 as_fn_error "invalid package name: $ac_useropt"
067d23c9
KY
1885 ac_useropt_orig=$ac_useropt
1886 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1887 case $ac_user_opts in
1888 *"
1889"with_$ac_useropt"
1890"*) ;;
1891 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1892 ac_unrecognized_sep=', ';;
1893 esac
1894 eval with_$ac_useropt=no ;;
1895
1896 --x)
1897 # Obsolete; use --with-x.
1898 with_x=yes ;;
1899
1900 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1901 | --x-incl | --x-inc | --x-in | --x-i)
1902 ac_prev=x_includes ;;
1903 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1904 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1905 x_includes=$ac_optarg ;;
1906
1907 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1908 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1909 ac_prev=x_libraries ;;
1910 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1911 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1912 x_libraries=$ac_optarg ;;
1913
a9bec17c
GM
1914 -*) as_fn_error "unrecognized option: \`$ac_option'
1915Try \`$0 --help' for more information."
067d23c9
KY
1916 ;;
1917
1918 *=*)
1919 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1920 # Reject names that are not valid shell variable names.
1921 case $ac_envvar in #(
1922 '' | [0-9]* | *[!_$as_cr_alnum]* )
a9bec17c 1923 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
067d23c9
KY
1924 esac
1925 eval $ac_envvar=\$ac_optarg
1926 export $ac_envvar ;;
1927
1928 *)
1929 # FIXME: should be removed in autoconf 3.0.
1930 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1931 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1932 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
a9bec17c 1933 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
067d23c9
KY
1934 ;;
1935
1936 esac
1937done
1938
1939if test -n "$ac_prev"; then
1940 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
a9bec17c 1941 as_fn_error "missing argument to $ac_option"
067d23c9
KY
1942fi
1943
1944if test -n "$ac_unrecognized_opts"; then
1945 case $enable_option_checking in
1946 no) ;;
a9bec17c 1947 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
067d23c9
KY
1948 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1949 esac
1950fi
1951
1952# Check all directory arguments for consistency.
1953for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1954 datadir sysconfdir sharedstatedir localstatedir includedir \
1955 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1956 libdir localedir mandir
1957do
1958 eval ac_val=\$$ac_var
1959 # Remove trailing slashes.
1960 case $ac_val in
1961 */ )
1962 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1963 eval $ac_var=\$ac_val;;
1964 esac
1965 # Be sure to have absolute directory names.
1966 case $ac_val in
1967 [\\/$]* | ?:[\\/]* ) continue;;
1968 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1969 esac
a9bec17c 1970 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
067d23c9
KY
1971done
1972
1973# There might be people who depend on the old broken behavior: `$host'
1974# used to hold the argument of --host etc.
1975# FIXME: To remove some day.
1976build=$build_alias
1977host=$host_alias
1978target=$target_alias
1979
1980# FIXME: To remove some day.
1981if test "x$host_alias" != x; then
1982 if test "x$build_alias" = x; then
1983 cross_compiling=maybe
a9bec17c
GM
1984 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1985 If a cross compiler is detected then cross compile mode will be used." >&2
067d23c9
KY
1986 elif test "x$build_alias" != "x$host_alias"; then
1987 cross_compiling=yes
1988 fi
1989fi
1990
1991ac_tool_prefix=
1992test -n "$host_alias" && ac_tool_prefix=$host_alias-
1993
1994test "$silent" = yes && exec 6>/dev/null
1995
1996
1997ac_pwd=`pwd` && test -n "$ac_pwd" &&
1998ac_ls_di=`ls -di .` &&
1999ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
a9bec17c 2000 as_fn_error "working directory cannot be determined"
067d23c9 2001test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
a9bec17c 2002 as_fn_error "pwd does not report name of working directory"
067d23c9
KY
2003
2004
2005# Find the source files, if location was not specified.
2006if test -z "$srcdir"; then
2007 ac_srcdir_defaulted=yes
2008 # Try the directory containing this script, then the parent directory.
2009 ac_confdir=`$as_dirname -- "$as_myself" ||
2010$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
2011 X"$as_myself" : 'X\(//\)[^/]' \| \
2012 X"$as_myself" : 'X\(//\)$' \| \
2013 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
2014$as_echo X"$as_myself" |
2015 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
2016 s//\1/
2017 q
2018 }
2019 /^X\(\/\/\)[^/].*/{
2020 s//\1/
2021 q
2022 }
2023 /^X\(\/\/\)$/{
2024 s//\1/
2025 q
2026 }
2027 /^X\(\/\).*/{
2028 s//\1/
2029 q
2030 }
2031 s/.*/./; q'`
2032 srcdir=$ac_confdir
2033 if test ! -r "$srcdir/$ac_unique_file"; then
2034 srcdir=..
2035 fi
2036else
2037 ac_srcdir_defaulted=no
2038fi
2039if test ! -r "$srcdir/$ac_unique_file"; then
2040 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
a9bec17c 2041 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
067d23c9
KY
2042fi
2043ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
2044ac_abs_confdir=`(
a9bec17c 2045 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
067d23c9
KY
2046 pwd)`
2047# When building in place, set srcdir=.
2048if test "$ac_abs_confdir" = "$ac_pwd"; then
2049 srcdir=.
2050fi
2051# Remove unnecessary trailing slashes from srcdir.
2052# Double slashes in file names in object file debugging info
2053# mess up M-x gdb in Emacs.
2054case $srcdir in
2055*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
2056esac
2057for ac_var in $ac_precious_vars; do
2058 eval ac_env_${ac_var}_set=\${${ac_var}+set}
2059 eval ac_env_${ac_var}_value=\$${ac_var}
2060 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
2061 eval ac_cv_env_${ac_var}_value=\$${ac_var}
2062done
2063
2064#
2065# Report the --help message.
2066#
2067if test "$ac_init_help" = "long"; then
2068 # Omit some internal or obsolete options to make the list less imposing.
2069 # This message is too long to be a string in the A/UX 3.1 sh.
2070 cat <<_ACEOF
c574bc34 2071\`configure' configures emacs 24.3.50 to adapt to many kinds of systems.
067d23c9
KY
2072
2073Usage: $0 [OPTION]... [VAR=VALUE]...
2074
2075To assign environment variables (e.g., CC, CFLAGS...), specify them as
2076VAR=VALUE. See below for descriptions of some of the useful variables.
2077
2078Defaults for the options are specified in brackets.
2079
2080Configuration:
2081 -h, --help display this help and exit
2082 --help=short display options specific to this package
2083 --help=recursive display the short help of all the included packages
2084 -V, --version display version information and exit
a9bec17c 2085 -q, --quiet, --silent do not print \`checking...' messages
067d23c9
KY
2086 --cache-file=FILE cache test results in FILE [disabled]
2087 -C, --config-cache alias for \`--cache-file=config.cache'
2088 -n, --no-create do not create output files
2089 --srcdir=DIR find the sources in DIR [configure dir or \`..']
2090
2091Installation directories:
2092 --prefix=PREFIX install architecture-independent files in PREFIX
2093 [$ac_default_prefix]
2094 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
2095 [PREFIX]
2096
2097By default, \`make install' will install all the files in
2098\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
2099an installation prefix other than \`$ac_default_prefix' using \`--prefix',
2100for instance \`--prefix=\$HOME'.
2101
2102For better control, use the options below.
2103
2104Fine tuning of the installation directories:
2105 --bindir=DIR user executables [EPREFIX/bin]
2106 --sbindir=DIR system admin executables [EPREFIX/sbin]
2107 --libexecdir=DIR program executables [EPREFIX/libexec]
2108 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
2109 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
2110 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
2111 --libdir=DIR object code libraries [EPREFIX/lib]
2112 --includedir=DIR C header files [PREFIX/include]
2113 --oldincludedir=DIR C header files for non-gcc [/usr/include]
2114 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
2115 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
2116 --infodir=DIR info documentation [DATAROOTDIR/info]
2117 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
2118 --mandir=DIR man documentation [DATAROOTDIR/man]
2119 --docdir=DIR documentation root [DATAROOTDIR/doc/emacs]
2120 --htmldir=DIR html documentation [DOCDIR]
2121 --dvidir=DIR dvi documentation [DOCDIR]
2122 --pdfdir=DIR pdf documentation [DOCDIR]
2123 --psdir=DIR ps documentation [DOCDIR]
2124_ACEOF
2125
2126 cat <<\_ACEOF
2127
2128Program names:
2129 --program-prefix=PREFIX prepend PREFIX to installed program names
2130 --program-suffix=SUFFIX append SUFFIX to installed program names
2131 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
2132
2133X features:
2134 --x-includes=DIR X include files are in DIR
2135 --x-libraries=DIR X library files are in DIR
2136
2137System types:
2138 --build=BUILD configure for building on BUILD [guessed]
2139 --host=HOST cross-compile to build programs to run on HOST [BUILD]
2140_ACEOF
2141fi
2142
2143if test -n "$ac_init_help"; then
2144 case $ac_init_help in
c574bc34 2145 short | recursive ) echo "Configuration of emacs 24.3.50:";;
067d23c9
KY
2146 esac
2147 cat <<\_ACEOF
2148
2149Optional Features:
2150 --disable-option-checking ignore unrecognized --enable/--with options
2151 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
2152 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
2153 --disable-ns-self-contained
2154 disable self contained build under NeXTstep
067d23c9
KY
2155 --enable-locallisppath=PATH
2156 directories Emacs should search for lisp files
2157 specific to this site
2158 --enable-checking[=LIST]
2159 enable expensive run-time checks. With LIST, enable
2160 only specific categories of checks. Categories are:
2161 all,yes,no. Flags are: stringbytes, stringoverrun,
7ee3791f 2162 stringfreelist, xmallocoverrun, conslist, glyphs
afd07e01
GM
2163 --enable-check-lisp-object-type
2164 enable compile time checks for the Lisp_Object data
2165 type. This is useful for development for catching
2166 certain types of bugs.
3dc00ee8
GM
2167 --enable-profiling build emacs with low-level, gprof profiling support.
2168 Mainly useful for debugging Emacs itself. May not
2169 work on all platforms. Stops profiler.el working.
067d23c9
KY
2170 --enable-autodepend automatically generate dependencies to .h-files.
2171 Requires GNU Make and Gcc. Enabled if GNU Make and
2172 Gcc is found
4efe5ef9
GM
2173 --enable-gtk-deprecation-warnings
2174 Show Gtk+/Gdk deprecation warnings for Gtk+ >= 3.0
743c80a7
PE
2175 --disable-dependency-tracking speeds up one-time build
2176 --enable-dependency-tracking do not reject slow dependency extractors
067d23c9 2177 --disable-largefile omit support for large files
ac924f35
GM
2178 --enable-gcc-warnings turn on lots of GCC warnings/errors. This is
2179 intended for developers, and may generate false
2180 alarms when used with older or non-GNU development
2181 tools.
e4d35030
GM
2182 --enable-link-time-optimization
2183 build emacs with link-time optimization. This is
2184 supported only for GCC since 4.5.0.
067d23c9
KY
2185
2186Optional Packages:
2187 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
2188 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
ee77919d
GM
2189 --without-all omit almost all features and build small executable
2190 with minimal dependencies
067d23c9
KY
2191 --without-pop don't support POP mail retrieval with movemail
2192 --with-kerberos support Kerberos-authenticated POP
2193 --with-kerberos5 support Kerberos version 5 authenticated POP
2194 --with-hesiod support Hesiod to get the POP server host
2195 --with-mmdf support MMDF mailboxes
2196 --with-mail-unlink unlink, rather than empty, mail spool after reading
2197 --with-mailhost=HOSTNAME
2198 string giving default POP mail host
2199 --without-sound don't compile with sound support
4fa92495
GM
2200 --with-x-toolkit=KIT use an X toolkit (KIT one of: yes or gtk, gtk2,
2201 gtk3, lucid or athena, motif, no)
0442dc7f 2202 --with-wide-int prefer wide Emacs integers (typically 62-bit)
067d23c9
KY
2203 --without-xpm don't compile with XPM image support
2204 --without-jpeg don't compile with JPEG image support
2205 --without-tiff don't compile with TIFF image support
2206 --without-gif don't compile with GIF image support
2207 --without-png don't compile with PNG image support
2208 --without-rsvg don't compile with SVG image support
2209 --without-xml2 don't compile with XML parsing support
2210 --without-imagemagick don't compile with ImageMagick image support
2211 --without-xft don't use XFT for anti aliased fonts
2212 --without-libotf don't use libotf for OpenType font support
2213 --without-m17n-flt don't use m17n-flt for text shaping
2214 --without-toolkit-scroll-bars
2215 don't use Motif or Xaw3d scroll bars
2216 --without-xaw3d don't use Xaw3d
2217 --without-xim don't use X11 XIM
7834125e 2218 --with-ns use NeXTstep (Cocoa or GNUstep) windowing system
bf05ed1f 2219 --with-w32 use native MS Windows GUI
067d23c9
KY
2220 --without-gpm don't use -lgpm for mouse support on a GNU/Linux
2221 console
2222 --without-dbus don't compile with D-Bus support
2223 --without-gconf don't compile with GConf support
f527bd02 2224 --without-gsettings don't compile with GSettings support
067d23c9 2225 --without-selinux don't compile with SELinux support
4cc63c81 2226 --without-acl don't compile with ACL support
067d23c9 2227 --without-gnutls don't use -lgnutls for SSL/TLS support
b5eb356a 2228 --without-inotify don't compile with inotify (file-watch) support
067d23c9
KY
2229 --without-makeinfo don't require makeinfo for building manuals
2230 --without-compress-info don't compress the installed Info pages
b5591ebb
GM
2231 --with-pkg-config-prog=FILENAME
2232 file name of pkg-config for finding GTK and librsvg
4fc5868a 2233 --with-gameuser=USER user for shared game score files
b5591ebb
GM
2234 --with-gnustep-conf=FILENAME
2235 name of GNUstep.conf; default $GNUSTEP_CONFIG_FILE,
067d23c9
KY
2236 or /etc/GNUstep/GNUstep.conf
2237 --with-x use the X Window System
2238
2239Some influential environment variables:
2240 CC C compiler command
2241 CFLAGS C compiler flags
2242 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
2243 nonstandard directory <lib dir>
2244 LIBS libraries to pass to the linker, e.g. -l<library>
2245 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2246 you have headers in a nonstandard directory <include dir>
2247 CPP C preprocessor
2248 XMKMF Path to xmkmf, Makefile generator for X Window System
2249
2250Use these variables to override the choices made by `configure' or to help
2251it to find libraries and programs with nonstandard names/locations.
2252
2253Report bugs to the package provider.
2254_ACEOF
2255ac_status=$?
2256fi
2257
2258if test "$ac_init_help" = "recursive"; then
2259 # If there are subdirs, report their specific --help.
2260 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2261 test -d "$ac_dir" ||
2262 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2263 continue
2264 ac_builddir=.
2265
2266case "$ac_dir" in
2267.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2268*)
2269 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2270 # A ".." for each directory in $ac_dir_suffix.
2271 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2272 case $ac_top_builddir_sub in
2273 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2274 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2275 esac ;;
2276esac
2277ac_abs_top_builddir=$ac_pwd
2278ac_abs_builddir=$ac_pwd$ac_dir_suffix
2279# for backward compatibility:
2280ac_top_builddir=$ac_top_build_prefix
2281
2282case $srcdir in
2283 .) # We are building in place.
2284 ac_srcdir=.
2285 ac_top_srcdir=$ac_top_builddir_sub
2286 ac_abs_top_srcdir=$ac_pwd ;;
2287 [\\/]* | ?:[\\/]* ) # Absolute name.
2288 ac_srcdir=$srcdir$ac_dir_suffix;
2289 ac_top_srcdir=$srcdir
2290 ac_abs_top_srcdir=$srcdir ;;
2291 *) # Relative name.
2292 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2293 ac_top_srcdir=$ac_top_build_prefix$srcdir
2294 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2295esac
2296ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2297
2298 cd "$ac_dir" || { ac_status=$?; continue; }
2299 # Check for guested configure.
2300 if test -f "$ac_srcdir/configure.gnu"; then
2301 echo &&
2302 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2303 elif test -f "$ac_srcdir/configure"; then
2304 echo &&
2305 $SHELL "$ac_srcdir/configure" --help=recursive
2306 else
2307 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2308 fi || ac_status=$?
2309 cd "$ac_pwd" || { ac_status=$?; break; }
2310 done
2311fi
2312
2313test -n "$ac_init_help" && exit $ac_status
2314if $ac_init_version; then
2315 cat <<\_ACEOF
c574bc34 2316emacs configure 24.3.50
a9bec17c 2317generated by GNU Autoconf 2.65
067d23c9 2318
a9bec17c 2319Copyright (C) 2009 Free Software Foundation, Inc.
067d23c9
KY
2320This configure script is free software; the Free Software Foundation
2321gives unlimited permission to copy, distribute and modify it.
2322_ACEOF
2323 exit
2324fi
2325
2326## ------------------------ ##
2327## Autoconf initialization. ##
2328## ------------------------ ##
2329
2330# ac_fn_c_try_compile LINENO
2331# --------------------------
2332# Try to compile conftest.$ac_ext, and return whether this succeeded.
2333ac_fn_c_try_compile ()
2334{
2335 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2336 rm -f conftest.$ac_objext
2337 if { { ac_try="$ac_compile"
2338case "(($ac_try" in
2339 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2340 *) ac_try_echo=$ac_try;;
2341esac
2342eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2343$as_echo "$ac_try_echo"; } >&5
2344 (eval "$ac_compile") 2>conftest.err
2345 ac_status=$?
2346 if test -s conftest.err; then
2347 grep -v '^ *+' conftest.err >conftest.er1
2348 cat conftest.er1 >&5
2349 mv -f conftest.er1 conftest.err
2350 fi
2351 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2352 test $ac_status = 0; } && {
2353 test -z "$ac_c_werror_flag" ||
2354 test ! -s conftest.err
2355 } && test -s conftest.$ac_objext; then :
2356 ac_retval=0
2357else
2358 $as_echo "$as_me: failed program was:" >&5
2359sed 's/^/| /' conftest.$ac_ext >&5
2360
2361 ac_retval=1
2362fi
a9bec17c 2363 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
067d23c9
KY
2364 as_fn_set_status $ac_retval
2365
2366} # ac_fn_c_try_compile
2367
067d23c9
KY
2368# ac_fn_c_try_cpp LINENO
2369# ----------------------
2370# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2371ac_fn_c_try_cpp ()
2372{
2373 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2374 if { { ac_try="$ac_cpp conftest.$ac_ext"
2375case "(($ac_try" in
2376 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2377 *) ac_try_echo=$ac_try;;
2378esac
2379eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2380$as_echo "$ac_try_echo"; } >&5
2381 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2382 ac_status=$?
2383 if test -s conftest.err; then
2384 grep -v '^ *+' conftest.err >conftest.er1
2385 cat conftest.er1 >&5
2386 mv -f conftest.er1 conftest.err
2387 fi
2388 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
a9bec17c 2389 test $ac_status = 0; } >/dev/null && {
067d23c9
KY
2390 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2391 test ! -s conftest.err
2392 }; then :
2393 ac_retval=0
2394else
2395 $as_echo "$as_me: failed program was:" >&5
2396sed 's/^/| /' conftest.$ac_ext >&5
2397
2398 ac_retval=1
2399fi
a9bec17c 2400 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
067d23c9
KY
2401 as_fn_set_status $ac_retval
2402
2403} # ac_fn_c_try_cpp
2404
2405# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
2406# -------------------------------------------------------
2407# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2408# the include files in INCLUDES and setting the cache variable VAR
2409# accordingly.
2410ac_fn_c_check_header_mongrel ()
2411{
2412 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
a9bec17c 2413 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
067d23c9
KY
2414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2415$as_echo_n "checking for $2... " >&6; }
a9bec17c 2416if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
067d23c9
KY
2417 $as_echo_n "(cached) " >&6
2418fi
2419eval ac_res=\$$3
2420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2421$as_echo "$ac_res" >&6; }
2422else
2423 # Is the header compilable?
2424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2425$as_echo_n "checking $2 usability... " >&6; }
2426cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2427/* end confdefs.h. */
2428$4
2429#include <$2>
2430_ACEOF
2431if ac_fn_c_try_compile "$LINENO"; then :
2432 ac_header_compiler=yes
2433else
2434 ac_header_compiler=no
2435fi
2436rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2438$as_echo "$ac_header_compiler" >&6; }
2439
2440# Is the header present?
2441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2442$as_echo_n "checking $2 presence... " >&6; }
2443cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2444/* end confdefs.h. */
2445#include <$2>
2446_ACEOF
2447if ac_fn_c_try_cpp "$LINENO"; then :
2448 ac_header_preproc=yes
2449else
2450 ac_header_preproc=no
2451fi
a9bec17c 2452rm -f conftest.err conftest.$ac_ext
067d23c9
KY
2453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2454$as_echo "$ac_header_preproc" >&6; }
2455
2456# So? What about this header?
2457case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
2458 yes:no: )
2459 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2460$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2461 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2462$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2463 ;;
2464 no:yes:* )
2465 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2466$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2467 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
2468$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
2469 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2470$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2471 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
2472$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
2473 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2474$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2475 ;;
2476esac
2477 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2478$as_echo_n "checking for $2... " >&6; }
a9bec17c 2479if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
067d23c9
KY
2480 $as_echo_n "(cached) " >&6
2481else
2482 eval "$3=\$ac_header_compiler"
2483fi
2484eval ac_res=\$$3
2485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2486$as_echo "$ac_res" >&6; }
2487fi
a9bec17c 2488 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
067d23c9
KY
2489
2490} # ac_fn_c_check_header_mongrel
2491
2492# ac_fn_c_try_run LINENO
2493# ----------------------
2494# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2495# that executables *can* be run.
2496ac_fn_c_try_run ()
2497{
2498 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2499 if { { ac_try="$ac_link"
2500case "(($ac_try" in
2501 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2502 *) ac_try_echo=$ac_try;;
2503esac
2504eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2505$as_echo "$ac_try_echo"; } >&5
2506 (eval "$ac_link") 2>&5
2507 ac_status=$?
2508 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2509 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2510 { { case "(($ac_try" in
2511 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2512 *) ac_try_echo=$ac_try;;
2513esac
2514eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2515$as_echo "$ac_try_echo"; } >&5
2516 (eval "$ac_try") 2>&5
2517 ac_status=$?
2518 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2519 test $ac_status = 0; }; }; then :
2520 ac_retval=0
2521else
2522 $as_echo "$as_me: program exited with status $ac_status" >&5
2523 $as_echo "$as_me: failed program was:" >&5
2524sed 's/^/| /' conftest.$ac_ext >&5
2525
2526 ac_retval=$ac_status
2527fi
2528 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
a9bec17c 2529 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
067d23c9
KY
2530 as_fn_set_status $ac_retval
2531
2532} # ac_fn_c_try_run
2533
2534# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2535# -------------------------------------------------------
2536# Tests whether HEADER exists and can be compiled using the include files in
2537# INCLUDES, setting the cache variable VAR accordingly.
2538ac_fn_c_check_header_compile ()
2539{
2540 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2541 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2542$as_echo_n "checking for $2... " >&6; }
a9bec17c 2543if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
067d23c9
KY
2544 $as_echo_n "(cached) " >&6
2545else
2546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2547/* end confdefs.h. */
2548$4
2549#include <$2>
2550_ACEOF
2551if ac_fn_c_try_compile "$LINENO"; then :
2552 eval "$3=yes"
2553else
2554 eval "$3=no"
2555fi
2556rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2557fi
2558eval ac_res=\$$3
2559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2560$as_echo "$ac_res" >&6; }
a9bec17c 2561 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
067d23c9
KY
2562
2563} # ac_fn_c_check_header_compile
2564
1fd182f0
PE
2565# ac_fn_c_try_link LINENO
2566# -----------------------
2567# Try to link conftest.$ac_ext, and return whether this succeeded.
2568ac_fn_c_try_link ()
2569{
2570 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2571 rm -f conftest.$ac_objext conftest$ac_exeext
2572 if { { ac_try="$ac_link"
2573case "(($ac_try" in
2574 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2575 *) ac_try_echo=$ac_try;;
2576esac
2577eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2578$as_echo "$ac_try_echo"; } >&5
2579 (eval "$ac_link") 2>conftest.err
2580 ac_status=$?
2581 if test -s conftest.err; then
2582 grep -v '^ *+' conftest.err >conftest.er1
2583 cat conftest.er1 >&5
2584 mv -f conftest.er1 conftest.err
2585 fi
2586 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2587 test $ac_status = 0; } && {
2588 test -z "$ac_c_werror_flag" ||
2589 test ! -s conftest.err
2590 } && test -s conftest$ac_exeext && {
2591 test "$cross_compiling" = yes ||
2592 $as_test_x conftest$ac_exeext
2593 }; then :
2594 ac_retval=0
2595else
2596 $as_echo "$as_me: failed program was:" >&5
2597sed 's/^/| /' conftest.$ac_ext >&5
2598
2599 ac_retval=1
2600fi
2601 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2602 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2603 # interfere with the next link command; also delete a directory that is
2604 # left behind by Apple's compiler. We do this before executing the actions.
2605 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
a9bec17c 2606 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1fd182f0
PE
2607 as_fn_set_status $ac_retval
2608
2609} # ac_fn_c_try_link
2610
42bbbe8b
GM
2611# ac_fn_c_check_decl LINENO SYMBOL VAR
2612# ------------------------------------
2613# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2614ac_fn_c_check_decl ()
2615{
2616 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5
2618$as_echo_n "checking whether $2 is declared... " >&6; }
2619if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2620 $as_echo_n "(cached) " >&6
2621else
2622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2623/* end confdefs.h. */
2624$4
2625int
2626main ()
2627{
2628#ifndef $2
2629 (void) $2;
2630#endif
2631
2632 ;
2633 return 0;
2634}
2635_ACEOF
2636if ac_fn_c_try_compile "$LINENO"; then :
2637 eval "$3=yes"
2638else
2639 eval "$3=no"
2640fi
2641rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2642fi
2643eval ac_res=\$$3
2644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2645$as_echo "$ac_res" >&6; }
2646 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2647
2648} # ac_fn_c_check_decl
2649
5476a9a4
GM
2650# ac_fn_c_check_header_preproc LINENO HEADER VAR
2651# ----------------------------------------------
2652# Tests whether HEADER is present, setting the cache variable VAR accordingly.
2653ac_fn_c_check_header_preproc ()
067d23c9
KY
2654{
2655 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2657$as_echo_n "checking for $2... " >&6; }
a9bec17c 2658if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
067d23c9
KY
2659 $as_echo_n "(cached) " >&6
2660else
2661 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2662/* end confdefs.h. */
5476a9a4
GM
2663#include <$2>
2664_ACEOF
2665if ac_fn_c_try_cpp "$LINENO"; then :
2666 eval "$3=yes"
2667else
2668 eval "$3=no"
2669fi
2670rm -f conftest.err conftest.$ac_ext
2671fi
2672eval ac_res=\$$3
2673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2674$as_echo "$ac_res" >&6; }
2675 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
067d23c9 2676
5476a9a4 2677} # ac_fn_c_check_header_preproc
067d23c9 2678
5476a9a4
GM
2679# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2680# ----------------------------------------------------
2681# Tries to find if the field MEMBER exists in type AGGR, after including
2682# INCLUDES, setting cache variable VAR accordingly.
2683ac_fn_c_check_member ()
2684{
2685 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2687$as_echo_n "checking for $2.$3... " >&6; }
2688if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2689 $as_echo_n "(cached) " >&6
2690else
2691 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2692/* end confdefs.h. */
2693$5
2694int
2695main ()
2696{
2697static $2 ac_aggr;
2698if (ac_aggr.$3)
2699return 0;
2700 ;
2701 return 0;
2702}
2703_ACEOF
2704if ac_fn_c_try_compile "$LINENO"; then :
2705 eval "$4=yes"
2706else
2707 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2708/* end confdefs.h. */
2709$5
2710int
2711main ()
2712{
2713static $2 ac_aggr;
2714if (sizeof ac_aggr.$3)
2715return 0;
2716 ;
2717 return 0;
2718}
2719_ACEOF
2720if ac_fn_c_try_compile "$LINENO"; then :
2721 eval "$4=yes"
2722else
2723 eval "$4=no"
2724fi
2725rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2726fi
2727rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2728fi
2729eval ac_res=\$$4
2730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2731$as_echo "$ac_res" >&6; }
2732 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2733
2734} # ac_fn_c_check_member
2735
2736# ac_fn_c_check_func LINENO FUNC VAR
2737# ----------------------------------
2738# Tests whether FUNC exists, setting the cache variable VAR accordingly
2739ac_fn_c_check_func ()
2740{
2741 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2743$as_echo_n "checking for $2... " >&6; }
2744if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2745 $as_echo_n "(cached) " >&6
2746else
2747 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2748/* end confdefs.h. */
2749/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2750 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2751#define $2 innocuous_$2
2752
2753/* System header to define __stub macros and hopefully few prototypes,
2754 which can conflict with char $2 (); below.
2755 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2756 <limits.h> exists even on freestanding compilers. */
2757
2758#ifdef __STDC__
067d23c9
KY
2759# include <limits.h>
2760#else
2761# include <assert.h>
2762#endif
2763
2764#undef $2
2765
2766/* Override any GCC internal prototype to avoid an error.
2767 Use char because int might match the return type of a GCC
2768 builtin and then its argument prototype would still apply. */
2769#ifdef __cplusplus
2770extern "C"
2771#endif
2772char $2 ();
2773/* The GNU C library defines this for functions which it implements
2774 to always fail with ENOSYS. Some functions are actually named
2775 something starting with __ and the normal name is an alias. */
2776#if defined __stub_$2 || defined __stub___$2
2777choke me
2778#endif
2779
2780int
2781main ()
2782{
2783return $2 ();
2784 ;
2785 return 0;
2786}
2787_ACEOF
2788if ac_fn_c_try_link "$LINENO"; then :
2789 eval "$3=yes"
2790else
2791 eval "$3=no"
2792fi
2793rm -f core conftest.err conftest.$ac_objext \
2794 conftest$ac_exeext conftest.$ac_ext
2795fi
2796eval ac_res=\$$3
2797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2798$as_echo "$ac_res" >&6; }
a9bec17c 2799 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
067d23c9
KY
2800
2801} # ac_fn_c_check_func
2802
5476a9a4
GM
2803# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2804# -------------------------------------------
2805# Tests whether TYPE exists after having included INCLUDES, setting cache
2806# variable VAR accordingly.
2807ac_fn_c_check_type ()
3e0be4ab
GM
2808{
2809 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
5476a9a4
GM
2810 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2811$as_echo_n "checking for $2... " >&6; }
2812if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
3e0be4ab
GM
2813 $as_echo_n "(cached) " >&6
2814else
5476a9a4 2815 eval "$3=no"
3e0be4ab
GM
2816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2817/* end confdefs.h. */
5476a9a4 2818$4
3e0be4ab
GM
2819int
2820main ()
2821{
5476a9a4
GM
2822if (sizeof ($2))
2823 return 0;
3e0be4ab
GM
2824 ;
2825 return 0;
2826}
2827_ACEOF
2828if ac_fn_c_try_compile "$LINENO"; then :
2829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2830/* end confdefs.h. */
5476a9a4 2831$4
3e0be4ab
GM
2832int
2833main ()
2834{
5476a9a4
GM
2835if (sizeof (($2)))
2836 return 0;
3e0be4ab
GM
2837 ;
2838 return 0;
2839}
2840_ACEOF
2841if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4 2842
3e0be4ab 2843else
5476a9a4 2844 eval "$3=yes"
3e0be4ab
GM
2845fi
2846rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2847fi
2848rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2849fi
5476a9a4 2850eval ac_res=\$$3
3e0be4ab
GM
2851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2852$as_echo "$ac_res" >&6; }
a9bec17c 2853 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
3e0be4ab 2854
5476a9a4 2855} # ac_fn_c_check_type
3e0be4ab 2856
5f90be1b
PE
2857# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2858# --------------------------------------------
2859# Tries to find the compile-time value of EXPR in a program that includes
2860# INCLUDES, setting VAR accordingly. Returns whether the value could be
2861# computed
2862ac_fn_c_compute_int ()
2863{
2864 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2865 if test "$cross_compiling" = yes; then
2866 # Depending upon the size, compute the lo and hi bounds.
2867cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2868/* end confdefs.h. */
2869$4
2870int
2871main ()
2872{
2873static int test_array [1 - 2 * !(($2) >= 0)];
2874test_array [0] = 0
2875
2876 ;
2877 return 0;
2878}
2879_ACEOF
2880if ac_fn_c_try_compile "$LINENO"; then :
2881 ac_lo=0 ac_mid=0
2882 while :; do
2883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2884/* end confdefs.h. */
2885$4
2886int
2887main ()
2888{
2889static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2890test_array [0] = 0
2891
2892 ;
2893 return 0;
2894}
2895_ACEOF
2896if ac_fn_c_try_compile "$LINENO"; then :
2897 ac_hi=$ac_mid; break
2898else
2899 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2900 if test $ac_lo -le $ac_mid; then
2901 ac_lo= ac_hi=
2902 break
2903 fi
2904 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2905fi
2906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2907 done
2908else
2909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2910/* end confdefs.h. */
2911$4
2912int
2913main ()
2914{
2915static int test_array [1 - 2 * !(($2) < 0)];
2916test_array [0] = 0
2917
2918 ;
2919 return 0;
2920}
2921_ACEOF
2922if ac_fn_c_try_compile "$LINENO"; then :
2923 ac_hi=-1 ac_mid=-1
2924 while :; do
2925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2926/* end confdefs.h. */
2927$4
2928int
2929main ()
2930{
2931static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2932test_array [0] = 0
2933
2934 ;
2935 return 0;
2936}
2937_ACEOF
2938if ac_fn_c_try_compile "$LINENO"; then :
2939 ac_lo=$ac_mid; break
2940else
2941 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2942 if test $ac_mid -le $ac_hi; then
2943 ac_lo= ac_hi=
2944 break
2945 fi
2946 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2947fi
2948rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2949 done
2950else
2951 ac_lo= ac_hi=
2952fi
2953rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2954fi
2955rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2956# Binary search between lo and hi bounds.
2957while test "x$ac_lo" != "x$ac_hi"; do
2958 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2960/* end confdefs.h. */
2961$4
2962int
2963main ()
2964{
2965static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2966test_array [0] = 0
2967
2968 ;
2969 return 0;
2970}
2971_ACEOF
2972if ac_fn_c_try_compile "$LINENO"; then :
2973 ac_hi=$ac_mid
2974else
2975 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2976fi
2977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2978done
2979case $ac_lo in #((
2980?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2981'') ac_retval=1 ;;
2982esac
2983 else
2984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2985/* end confdefs.h. */
2986$4
2987static long int longval () { return $2; }
2988static unsigned long int ulongval () { return $2; }
2989#include <stdio.h>
2990#include <stdlib.h>
2991int
2992main ()
2993{
2994
2995 FILE *f = fopen ("conftest.val", "w");
2996 if (! f)
2997 return 1;
2998 if (($2) < 0)
2999 {
3000 long int i = longval ();
3001 if (i != ($2))
3002 return 1;
3003 fprintf (f, "%ld", i);
3004 }
3005 else
3006 {
3007 unsigned long int i = ulongval ();
3008 if (i != ($2))
3009 return 1;
3010 fprintf (f, "%lu", i);
3011 }
3012 /* Do not output a trailing newline, as this causes \r\n confusion
3013 on some platforms. */
3014 return ferror (f) || fclose (f) != 0;
3015
3016 ;
3017 return 0;
3018}
3019_ACEOF
3020if ac_fn_c_try_run "$LINENO"; then :
3021 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
3022else
3023 ac_retval=1
3024fi
3025rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3026 conftest.$ac_objext conftest.beam conftest.$ac_ext
3027rm -f conftest.val
3028
3029 fi
a9bec17c 3030 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
5f90be1b
PE
3031 as_fn_set_status $ac_retval
3032
3033} # ac_fn_c_compute_int
067d23c9
KY
3034cat >config.log <<_ACEOF
3035This file contains any messages produced by compilers while
3036running configure, to aid debugging if configure makes a mistake.
3037
c574bc34 3038It was created by emacs $as_me 24.3.50, which was
a9bec17c 3039generated by GNU Autoconf 2.65. Invocation command line was
067d23c9
KY
3040
3041 $ $0 $@
3042
3043_ACEOF
3044exec 5>>config.log
3045{
3046cat <<_ASUNAME
3047## --------- ##
3048## Platform. ##
3049## --------- ##
3050
3051hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3052uname -m = `(uname -m) 2>/dev/null || echo unknown`
3053uname -r = `(uname -r) 2>/dev/null || echo unknown`
3054uname -s = `(uname -s) 2>/dev/null || echo unknown`
3055uname -v = `(uname -v) 2>/dev/null || echo unknown`
3056
3057/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3058/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
3059
3060/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
3061/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
3062/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3063/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
3064/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
3065/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
3066/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
3067
3068_ASUNAME
3069
3070as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3071for as_dir in $PATH
3072do
3073 IFS=$as_save_IFS
3074 test -z "$as_dir" && as_dir=.
3075 $as_echo "PATH: $as_dir"
3076 done
3077IFS=$as_save_IFS
3078
3079} >&5
3080
3081cat >&5 <<_ACEOF
3082
3083
3084## ----------- ##
3085## Core tests. ##
3086## ----------- ##
3087
3088_ACEOF
3089
3090
3091# Keep a trace of the command line.
3092# Strip out --no-create and --no-recursion so they do not pile up.
3093# Strip out --silent because we don't want to record it for future runs.
3094# Also quote any args containing shell meta-characters.
3095# Make two passes to allow for proper duplicate-argument suppression.
3096ac_configure_args=
3097ac_configure_args0=
3098ac_configure_args1=
3099ac_must_keep_next=false
3100for ac_pass in 1 2
3101do
3102 for ac_arg
3103 do
3104 case $ac_arg in
3105 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3106 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3107 | -silent | --silent | --silen | --sile | --sil)
3108 continue ;;
3109 *\'*)
3110 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3111 esac
3112 case $ac_pass in
3113 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3114 2)
3115 as_fn_append ac_configure_args1 " '$ac_arg'"
3116 if test $ac_must_keep_next = true; then
3117 ac_must_keep_next=false # Got value, back to normal.
3118 else
3119 case $ac_arg in
3120 *=* | --config-cache | -C | -disable-* | --disable-* \
3121 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3122 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3123 | -with-* | --with-* | -without-* | --without-* | --x)
3124 case "$ac_configure_args0 " in
3125 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3126 esac
3127 ;;
3128 -* ) ac_must_keep_next=true ;;
3129 esac
3130 fi
3131 as_fn_append ac_configure_args " '$ac_arg'"
3132 ;;
3133 esac
3134 done
3135done
3136{ ac_configure_args0=; unset ac_configure_args0;}
3137{ ac_configure_args1=; unset ac_configure_args1;}
3138
3139# When interrupted or exit'd, cleanup temporary files, and complete
3140# config.log. We remove comments because anyway the quotes in there
3141# would cause problems or look ugly.
3142# WARNING: Use '\'' to represent an apostrophe within the trap.
3143# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3144trap 'exit_status=$?
3145 # Save into config.log some information that might help in debugging.
3146 {
3147 echo
3148
a9bec17c
GM
3149 cat <<\_ASBOX
3150## ---------------- ##
067d23c9 3151## Cache variables. ##
a9bec17c
GM
3152## ---------------- ##
3153_ASBOX
067d23c9
KY
3154 echo
3155 # The following way of writing the cache mishandles newlines in values,
3156(
3157 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3158 eval ac_val=\$$ac_var
3159 case $ac_val in #(
3160 *${as_nl}*)
3161 case $ac_var in #(
3162 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3163$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3164 esac
3165 case $ac_var in #(
3166 _ | IFS | as_nl) ;; #(
3167 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3168 *) { eval $ac_var=; unset $ac_var;} ;;
3169 esac ;;
3170 esac
3171 done
3172 (set) 2>&1 |
3173 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3174 *${as_nl}ac_space=\ *)
3175 sed -n \
3176 "s/'\''/'\''\\\\'\'''\''/g;
3177 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3178 ;; #(
3179 *)
3180 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3181 ;;
3182 esac |
3183 sort
3184)
3185 echo
3186
a9bec17c
GM
3187 cat <<\_ASBOX
3188## ----------------- ##
067d23c9 3189## Output variables. ##
a9bec17c
GM
3190## ----------------- ##
3191_ASBOX
067d23c9
KY
3192 echo
3193 for ac_var in $ac_subst_vars
3194 do
3195 eval ac_val=\$$ac_var
3196 case $ac_val in
3197 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3198 esac
3199 $as_echo "$ac_var='\''$ac_val'\''"
3200 done | sort
3201 echo
3202
3203 if test -n "$ac_subst_files"; then
a9bec17c
GM
3204 cat <<\_ASBOX
3205## ------------------- ##
067d23c9 3206## File substitutions. ##
a9bec17c
GM
3207## ------------------- ##
3208_ASBOX
067d23c9
KY
3209 echo
3210 for ac_var in $ac_subst_files
3211 do
3212 eval ac_val=\$$ac_var
3213 case $ac_val in
3214 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3215 esac
3216 $as_echo "$ac_var='\''$ac_val'\''"
3217 done | sort
3218 echo
3219 fi
3220
3221 if test -s confdefs.h; then
a9bec17c
GM
3222 cat <<\_ASBOX
3223## ----------- ##
067d23c9 3224## confdefs.h. ##
a9bec17c
GM
3225## ----------- ##
3226_ASBOX
067d23c9
KY
3227 echo
3228 cat confdefs.h
3229 echo
3230 fi
3231 test "$ac_signal" != 0 &&
3232 $as_echo "$as_me: caught signal $ac_signal"
3233 $as_echo "$as_me: exit $exit_status"
3234 } >&5
3235 rm -f core *.core core.conftest.* &&
3236 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3237 exit $exit_status
3238' 0
3239for ac_signal in 1 2 13 15; do
3240 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3241done
3242ac_signal=0
3243
3244# confdefs.h avoids OS command line length limits that DEFS can exceed.
3245rm -f -r conftest* confdefs.h
3246
3247$as_echo "/* confdefs.h */" > confdefs.h
3248
3249# Predefined preprocessor variables.
3250
3251cat >>confdefs.h <<_ACEOF
3252#define PACKAGE_NAME "$PACKAGE_NAME"
3253_ACEOF
3254
3255cat >>confdefs.h <<_ACEOF
3256#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3257_ACEOF
3258
3259cat >>confdefs.h <<_ACEOF
3260#define PACKAGE_VERSION "$PACKAGE_VERSION"
3261_ACEOF
3262
3263cat >>confdefs.h <<_ACEOF
3264#define PACKAGE_STRING "$PACKAGE_STRING"
3265_ACEOF
3266
3267cat >>confdefs.h <<_ACEOF
3268#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3269_ACEOF
3270
3271cat >>confdefs.h <<_ACEOF
3272#define PACKAGE_URL "$PACKAGE_URL"
3273_ACEOF
3274
3275
3276# Let the site file select an alternate cache file if it wants to.
3277# Prefer an explicitly selected file to automatically selected ones.
3278ac_site_file1=NONE
3279ac_site_file2=NONE
3280if test -n "$CONFIG_SITE"; then
a9bec17c 3281 ac_site_file1=$CONFIG_SITE
067d23c9
KY
3282elif test "x$prefix" != xNONE; then
3283 ac_site_file1=$prefix/share/config.site
3284 ac_site_file2=$prefix/etc/config.site
3285else
3286 ac_site_file1=$ac_default_prefix/share/config.site
3287 ac_site_file2=$ac_default_prefix/etc/config.site
3288fi
3289for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3290do
3291 test "x$ac_site_file" = xNONE && continue
3292 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3293 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3294$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3295 sed 's/^/| /' "$ac_site_file" >&5
a9bec17c 3296 . "$ac_site_file"
067d23c9
KY
3297 fi
3298done
3299
3300if test -r "$cache_file"; then
3301 # Some versions of bash will fail to source /dev/null (special files
3302 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
3303 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3304 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3305$as_echo "$as_me: loading cache $cache_file" >&6;}
3306 case $cache_file in
3307 [\\/]* | ?:[\\/]* ) . "$cache_file";;
3308 *) . "./$cache_file";;
3309 esac
3310 fi
3311else
3312 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3313$as_echo "$as_me: creating cache $cache_file" >&6;}
3314 >$cache_file
3315fi
3316
5476a9a4
GM
3317as_fn_append ac_header_list " linux/version.h"
3318as_fn_append ac_header_list " sys/systeminfo.h"
5476a9a4
GM
3319as_fn_append ac_header_list " coff.h"
3320as_fn_append ac_header_list " pty.h"
5476a9a4
GM
3321as_fn_append ac_header_list " sys/resource.h"
3322as_fn_append ac_header_list " sys/utsname.h"
3323as_fn_append ac_header_list " pwd.h"
3324as_fn_append ac_header_list " utmp.h"
5476a9a4
GM
3325as_fn_append ac_header_list " util.h"
3326as_fn_append ac_header_list " sys/socket.h"
3327as_fn_append ac_header_list " stdlib.h"
3328as_fn_append ac_header_list " unistd.h"
7e723570 3329as_fn_append ac_header_list " sys/param.h"
5476a9a4
GM
3330as_fn_append ac_header_list " pthread.h"
3331as_fn_append ac_header_list " malloc/malloc.h"
3332as_fn_append ac_header_list " maillock.h"
3333as_fn_append ac_header_list " sys/un.h"
3334as_fn_append ac_func_list " tzset"
3335as_fn_append ac_func_list " readlinkat"
d7ad186c 3336as_fn_append ac_header_list " dirent.h"
8966cbff 3337as_fn_append ac_header_list " execinfo.h"
710f5812 3338as_fn_append ac_func_list " faccessat"
d7ad186c 3339as_fn_append ac_func_list " fdopendir"
eda33f78 3340as_fn_append ac_header_list " stdio_ext.h"
3bf26e96 3341as_fn_append ac_func_list " __fpending"
d7ad186c 3342as_fn_append ac_func_list " fstatat"
f199cab1
GM
3343gl_getopt_required=GNU
3344as_fn_append ac_header_list " getopt.h"
3345as_fn_append ac_func_list " gettimeofday"
3346as_fn_append ac_func_list " nanotime"
e700232f 3347as_fn_append ac_header_list " sys/time.h"
f199cab1
GM
3348as_fn_append ac_header_list " wchar.h"
3349as_fn_append ac_header_list " stdint.h"
3350as_fn_append ac_header_list " inttypes.h"
3351as_fn_append ac_func_list " lstat"
f199cab1
GM
3352as_fn_append ac_func_list " alarm"
3353as_fn_append ac_header_list " sys/select.h"
3354as_fn_append ac_func_list " pselect"
3355as_fn_append ac_func_list " pthread_sigmask"
3356as_fn_append ac_func_list " readlink"
f199cab1
GM
3357as_fn_append ac_func_list " strtoimax"
3358as_fn_append ac_func_list " strtoumax"
3359as_fn_append ac_func_list " symlink"
3360as_fn_append ac_header_list " sys/stat.h"
3361as_fn_append ac_func_list " localtime_r"
e700232f 3362as_fn_append ac_header_list " utime.h"
f199cab1
GM
3363as_fn_append ac_func_list " futimes"
3364as_fn_append ac_func_list " futimesat"
3365as_fn_append ac_func_list " futimens"
3366as_fn_append ac_func_list " utimensat"
3367as_fn_append ac_func_list " lutimes"
067d23c9
KY
3368# Check that the precious variables saved in the cache have kept the same
3369# value.
3370ac_cache_corrupted=false
3371for ac_var in $ac_precious_vars; do
3372 eval ac_old_set=\$ac_cv_env_${ac_var}_set
3373 eval ac_new_set=\$ac_env_${ac_var}_set
3374 eval ac_old_val=\$ac_cv_env_${ac_var}_value
3375 eval ac_new_val=\$ac_env_${ac_var}_value
3376 case $ac_old_set,$ac_new_set in
3377 set,)
3378 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3379$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3380 ac_cache_corrupted=: ;;
3381 ,set)
3382 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3383$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3384 ac_cache_corrupted=: ;;
3385 ,);;
3386 *)
3387 if test "x$ac_old_val" != "x$ac_new_val"; then
3388 # differences in whitespace do not lead to failure.
3389 ac_old_val_w=`echo x $ac_old_val`
3390 ac_new_val_w=`echo x $ac_new_val`
3391 if test "$ac_old_val_w" != "$ac_new_val_w"; then
3392 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3393$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3394 ac_cache_corrupted=:
3395 else
3396 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3397$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3398 eval $ac_var=\$ac_old_val
3399 fi
3400 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
3401$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
3402 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
3403$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
3404 fi;;
3405 esac
3406 # Pass precious variables to config.status.
3407 if test "$ac_new_set" = set; then
3408 case $ac_new_val in
3409 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3410 *) ac_arg=$ac_var=$ac_new_val ;;
3411 esac
3412 case " $ac_configure_args " in
3413 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
3414 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3415 esac
3416 fi
3417done
3418if $ac_cache_corrupted; then
3419 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3420$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3421 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3422$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
a9bec17c 3423 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
067d23c9
KY
3424fi
3425## -------------------- ##
3426## Main body of script. ##
3427## -------------------- ##
3428
3429ac_ext=c
3430ac_cpp='$CPP $CPPFLAGS'
3431ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3432ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3433ac_compiler_gnu=$ac_cv_c_compiler_gnu
3434
3435
2f559cd2 3436
e25a10b7 3437emacs_config_options="$@"
2f559cd2
GM
3438## Add some environment variables, if they were passed via the environment
3439## rather than on the command-line.
3440for var in CFLAGS CPPFLAGS LDFLAGS; do
3441 case "$emacs_config_options" in
3442 *$var=*) continue ;;
3443 esac
3444 eval val="\$${var}"
3445 test x"$val" = x && continue
71b84316 3446 emacs_config_options="${emacs_config_options}${emacs_config_options:+ }$var=\"$val\""
2f559cd2
GM
3447done
3448
067d23c9
KY
3449ac_config_headers="$ac_config_headers src/config.h:src/config.in"
3450
3451
743c80a7 3452ac_aux_dir=
369e19fc 3453for ac_dir in build-aux "$srcdir"/build-aux; do
a9bec17c
GM
3454 for ac_t in install-sh install.sh shtool; do
3455 if test -f "$ac_dir/$ac_t"; then
3456 ac_aux_dir=$ac_dir
3457 ac_install_sh="$ac_aux_dir/$ac_t -c"
3458 break 2
3459 fi
3460 done
743c80a7
PE
3461done
3462if test -z "$ac_aux_dir"; then
a9bec17c 3463 as_fn_error "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
743c80a7 3464fi
067d23c9 3465
743c80a7
PE
3466# These three variables are undocumented and unsupported,
3467# and are intended to be withdrawn in a future Autoconf release.
3468# They can cause serious problems if a builder's source tree is in a directory
3469# whose full name contains unusual characters.
3470ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
3471ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
3472ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
067d23c9 3473
067d23c9 3474
369e19fc
PE
3475am__api_version='1.11'
3476
743c80a7
PE
3477# Find a good install program. We prefer a C program (faster),
3478# so one script is as good as another. But avoid the broken or
3479# incompatible versions:
3480# SysV /etc/install, /usr/sbin/install
3481# SunOS /usr/etc/install
3482# IRIX /sbin/install
3483# AIX /bin/install
3484# AmigaOS /C/install, which installs bootblocks on floppy discs
3485# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3486# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3487# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3488# OS/2's system install, which has a completely different semantic
3489# ./install, which can be erroneously created by make from ./install.sh.
3490# Reject install programs that cannot install multiple files.
3491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
3492$as_echo_n "checking for a BSD-compatible install... " >&6; }
3493if test -z "$INSTALL"; then
a9bec17c 3494if test "${ac_cv_path_install+set}" = set; then :
743c80a7
PE
3495 $as_echo_n "(cached) " >&6
3496else
3497 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3498for as_dir in $PATH
3499do
3500 IFS=$as_save_IFS
3501 test -z "$as_dir" && as_dir=.
3502 # Account for people who put trailing slashes in PATH elements.
3503case $as_dir/ in #((
3504 ./ | .// | /[cC]/* | \
3505 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3506 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
3507 /usr/ucb/* ) ;;
3508 *)
3509 # OSF1 and SCO ODT 3.0 have their own names for install.
3510 # Don't use installbsd from OSF since it installs stuff as root
3511 # by default.
3512 for ac_prog in ginstall scoinst install; do
3513 for ac_exec_ext in '' $ac_executable_extensions; do
3514 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
3515 if test $ac_prog = install &&
3516 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3517 # AIX install. It has an incompatible calling convention.
3518 :
3519 elif test $ac_prog = install &&
3520 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3521 # program-specific install script used by HP pwplus--don't use.
3522 :
3523 else
3524 rm -rf conftest.one conftest.two conftest.dir
3525 echo one > conftest.one
3526 echo two > conftest.two
3527 mkdir conftest.dir
3528 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
3529 test -s conftest.one && test -s conftest.two &&
3530 test -s conftest.dir/conftest.one &&
3531 test -s conftest.dir/conftest.two
3532 then
3533 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3534 break 3
3535 fi
3536 fi
3537 fi
3538 done
3539 done
3540 ;;
3541esac
067d23c9 3542
743c80a7
PE
3543 done
3544IFS=$as_save_IFS
067d23c9 3545
743c80a7 3546rm -rf conftest.one conftest.two conftest.dir
067d23c9 3547
067d23c9 3548fi
743c80a7
PE
3549 if test "${ac_cv_path_install+set}" = set; then
3550 INSTALL=$ac_cv_path_install
3551 else
3552 # As a last resort, use the slow shell script. Don't cache a
3553 # value for INSTALL within a source directory, because that will
3554 # break other packages using the cache if that directory is
3555 # removed, or if the value is a relative name.
3556 INSTALL=$ac_install_sh
3557 fi
067d23c9 3558fi
743c80a7
PE
3559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
3560$as_echo "$INSTALL" >&6; }
067d23c9 3561
743c80a7
PE
3562# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3563# It thinks the first close brace ends the variable substitution.
3564test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
067d23c9 3565
743c80a7 3566test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
067d23c9 3567
743c80a7 3568test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
067d23c9 3569
743c80a7
PE
3570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
3571$as_echo_n "checking whether build environment is sane... " >&6; }
3572# Just in case
3573sleep 1
3574echo timestamp > conftest.file
3575# Reject unsafe characters in $srcdir or the absolute working directory
3576# name. Accept space and tab only in the latter.
3577am_lf='
3578'
3579case `pwd` in
3580 *[\\\"\#\$\&\'\`$am_lf]*)
a9bec17c 3581 as_fn_error "unsafe absolute working directory name" "$LINENO" 5;;
743c80a7
PE
3582esac
3583case $srcdir in
3584 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
a9bec17c 3585 as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
743c80a7 3586esac
067d23c9 3587
743c80a7
PE
3588# Do `set' in a subshell so we don't clobber the current shell's
3589# arguments. Must try -L first in case configure is actually a
3590# symlink; some systems play weird games with the mod time of symlinks
3591# (eg FreeBSD returns the mod time of the symlink's containing
3592# directory).
3593if (
3594 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
3595 if test "$*" = "X"; then
3596 # -L didn't work.
3597 set X `ls -t "$srcdir/configure" conftest.file`
3598 fi
3599 rm -f conftest.file
3600 if test "$*" != "X $srcdir/configure conftest.file" \
3601 && test "$*" != "X conftest.file $srcdir/configure"; then
3602
3603 # If neither matched, then we have a broken ls. This can happen
3604 # if, for instance, CONFIG_SHELL is bash and it inherits a
3605 # broken ls alias from the environment. This has actually
3606 # happened. Such a system could not be considered "sane".
a9bec17c 3607 as_fn_error "ls -t appears to fail. Make sure there is not a broken
743c80a7
PE
3608alias in your environment" "$LINENO" 5
3609 fi
067d23c9 3610
743c80a7
PE
3611 test "$2" = conftest.file
3612 )
3613then
3614 # Ok.
3615 :
067d23c9 3616else
a9bec17c 3617 as_fn_error "newly created file is older than distributed files!
743c80a7 3618Check your system clock" "$LINENO" 5
067d23c9 3619fi
743c80a7
PE
3620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3621$as_echo "yes" >&6; }
3622test "$program_prefix" != NONE &&
3623 program_transform_name="s&^&$program_prefix&;$program_transform_name"
3624# Use a double $ so make ignores it.
3625test "$program_suffix" != NONE &&
3626 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
3627# Double any \ or $.
3628# By default was `s,x,x', remove it if useless.
3629ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
3630program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
067d23c9 3631
743c80a7
PE
3632# expand $ac_aux_dir to an absolute path
3633am_aux_dir=`cd $ac_aux_dir && pwd`
067d23c9 3634
743c80a7
PE
3635if test x"${MISSING+set}" != xset; then
3636 case $am_aux_dir in
3637 *\ * | *\ *)
3638 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
3639 *)
3640 MISSING="\${SHELL} $am_aux_dir/missing" ;;
3641 esac
067d23c9 3642fi
743c80a7
PE
3643# Use eval to expand $SHELL
3644if eval "$MISSING --run true"; then
3645 am_missing_run="$MISSING --run "
067d23c9 3646else
743c80a7
PE
3647 am_missing_run=
3648 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
3649$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
067d23c9
KY
3650fi
3651
743c80a7
PE
3652if test x"${install_sh}" != xset; then
3653 case $am_aux_dir in
3654 *\ * | *\ *)
3655 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
3656 *)
3657 install_sh="\${SHELL} $am_aux_dir/install-sh"
3658 esac
067d23c9
KY
3659fi
3660
743c80a7
PE
3661# Installed binaries are usually stripped using `strip' when the user
3662# run `make install-strip'. However `strip' might not be the right
3663# tool to use in cross-compilation environments, therefore Automake
3664# will honor the `STRIP' environment variable to overrule this program.
3665if test "$cross_compiling" != no; then
3666 if test -n "$ac_tool_prefix"; then
3667 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
3668set dummy ${ac_tool_prefix}strip; ac_word=$2
3669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3670$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 3671if test "${ac_cv_prog_STRIP+set}" = set; then :
743c80a7 3672 $as_echo_n "(cached) " >&6
067d23c9 3673else
743c80a7
PE
3674 if test -n "$STRIP"; then
3675 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
3676else
3677as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3678for as_dir in $PATH
3679do
3680 IFS=$as_save_IFS
3681 test -z "$as_dir" && as_dir=.
3682 for ac_exec_ext in '' $ac_executable_extensions; do
3683 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3684 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
3685 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3686 break 2
3687 fi
3688done
3689 done
3690IFS=$as_save_IFS
067d23c9
KY
3691
3692fi
067d23c9 3693fi
743c80a7
PE
3694STRIP=$ac_cv_prog_STRIP
3695if test -n "$STRIP"; then
3696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
3697$as_echo "$STRIP" >&6; }
3698else
3699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3700$as_echo "no" >&6; }
067d23c9
KY
3701fi
3702
3703
067d23c9 3704fi
743c80a7
PE
3705if test -z "$ac_cv_prog_STRIP"; then
3706 ac_ct_STRIP=$STRIP
3707 # Extract the first word of "strip", so it can be a program name with args.
3708set dummy strip; ac_word=$2
3709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3710$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 3711if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
743c80a7
PE
3712 $as_echo_n "(cached) " >&6
3713else
3714 if test -n "$ac_ct_STRIP"; then
3715 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
3716else
3717as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3718for as_dir in $PATH
3719do
3720 IFS=$as_save_IFS
3721 test -z "$as_dir" && as_dir=.
3722 for ac_exec_ext in '' $ac_executable_extensions; do
3723 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3724 ac_cv_prog_ac_ct_STRIP="strip"
3725 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3726 break 2
3727 fi
3728done
3729 done
3730IFS=$as_save_IFS
3731
3732fi
3733fi
3734ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
3735if test -n "$ac_ct_STRIP"; then
3736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
3737$as_echo "$ac_ct_STRIP" >&6; }
3738else
3739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3740$as_echo "no" >&6; }
3741fi
3742
3743 if test "x$ac_ct_STRIP" = x; then
3744 STRIP=":"
3745 else
3746 case $cross_compiling:$ac_tool_warned in
3747yes:)
3748{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3749$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3750ac_tool_warned=yes ;;
3751esac
3752 STRIP=$ac_ct_STRIP
3753 fi
3754else
3755 STRIP="$ac_cv_prog_STRIP"
3756fi
3757
3758fi
3759INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
3760
3761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
3762$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
3763if test -z "$MKDIR_P"; then
a9bec17c 3764 if test "${ac_cv_path_mkdir+set}" = set; then :
743c80a7
PE
3765 $as_echo_n "(cached) " >&6
3766else
3767 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3768for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
3769do
3770 IFS=$as_save_IFS
3771 test -z "$as_dir" && as_dir=.
3772 for ac_prog in mkdir gmkdir; do
3773 for ac_exec_ext in '' $ac_executable_extensions; do
3774 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
3775 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
3776 'mkdir (GNU coreutils) '* | \
3777 'mkdir (coreutils) '* | \
3778 'mkdir (fileutils) '4.1*)
3779 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
3780 break 3;;
3781 esac
3782 done
3783 done
3784 done
3785IFS=$as_save_IFS
3786
3787fi
3788
3789 test -d ./--version && rmdir ./--version
3790 if test "${ac_cv_path_mkdir+set}" = set; then
3791 MKDIR_P="$ac_cv_path_mkdir -p"
3792 else
3793 # As a last resort, use the slow shell script. Don't cache a
3794 # value for MKDIR_P within a source directory, because that will
3795 # break other packages using the cache if that directory is
3796 # removed, or if the value is a relative name.
3797 MKDIR_P="$ac_install_sh -d"
3798 fi
3799fi
3800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
3801$as_echo "$MKDIR_P" >&6; }
3802
3803mkdir_p="$MKDIR_P"
3804case $mkdir_p in
3805 [\\/$]* | ?:[\\/]*) ;;
3806 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
3807esac
3808
3809for ac_prog in gawk mawk nawk awk
3810do
3811 # Extract the first word of "$ac_prog", so it can be a program name with args.
3812set dummy $ac_prog; ac_word=$2
3813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3814$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 3815if test "${ac_cv_prog_AWK+set}" = set; then :
743c80a7
PE
3816 $as_echo_n "(cached) " >&6
3817else
3818 if test -n "$AWK"; then
3819 ac_cv_prog_AWK="$AWK" # Let the user override the test.
3820else
3821as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3822for as_dir in $PATH
3823do
3824 IFS=$as_save_IFS
3825 test -z "$as_dir" && as_dir=.
3826 for ac_exec_ext in '' $ac_executable_extensions; do
3827 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3828 ac_cv_prog_AWK="$ac_prog"
3829 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3830 break 2
3831 fi
3832done
3833 done
3834IFS=$as_save_IFS
3835
3836fi
3837fi
3838AWK=$ac_cv_prog_AWK
3839if test -n "$AWK"; then
3840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
3841$as_echo "$AWK" >&6; }
3842else
3843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3844$as_echo "no" >&6; }
3845fi
3846
3847
3848 test -n "$AWK" && break
3849done
3850
3851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3852$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
3853set x ${MAKE-make}
3854ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
a9bec17c 3855if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
743c80a7
PE
3856 $as_echo_n "(cached) " >&6
3857else
3858 cat >conftest.make <<\_ACEOF
3859SHELL = /bin/sh
3860all:
3861 @echo '@@@%%%=$(MAKE)=@@@%%%'
3862_ACEOF
a9bec17c 3863# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
743c80a7
PE
3864case `${MAKE-make} -f conftest.make 2>/dev/null` in
3865 *@@@%%%=?*=@@@%%%*)
3866 eval ac_cv_prog_make_${ac_make}_set=yes;;
3867 *)
3868 eval ac_cv_prog_make_${ac_make}_set=no;;
3869esac
3870rm -f conftest.make
3871fi
3872if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3874$as_echo "yes" >&6; }
3875 SET_MAKE=
3876else
3877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3878$as_echo "no" >&6; }
3879 SET_MAKE="MAKE=${MAKE-make}"
3880fi
3881
3882rm -rf .tst 2>/dev/null
3883mkdir .tst 2>/dev/null
3884if test -d .tst; then
3885 am__leading_dot=.
3886else
3887 am__leading_dot=_
3888fi
3889rmdir .tst 2>/dev/null
3890
3891if test "`cd $srcdir && pwd`" != "`pwd`"; then
3892 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
3893 # is not polluted with repeated "-I."
3894 am__isrc=' -I$(srcdir)'
3895 # test to see if srcdir already configured
3896 if test -f $srcdir/config.status; then
a9bec17c 3897 as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
743c80a7
PE
3898 fi
3899fi
3900
3901# test whether we have cygpath
3902if test -z "$CYGPATH_W"; then
3903 if (cygpath --version) >/dev/null 2>/dev/null; then
3904 CYGPATH_W='cygpath -w'
3905 else
3906 CYGPATH_W=echo
3907 fi
3908fi
3909
3910
3911# Define the identity of the package.
3912 PACKAGE='emacs'
c574bc34 3913 VERSION='24.3.50'
743c80a7
PE
3914
3915
3916cat >>confdefs.h <<_ACEOF
3917#define PACKAGE "$PACKAGE"
3918_ACEOF
3919
3920
3921cat >>confdefs.h <<_ACEOF
3922#define VERSION "$VERSION"
3923_ACEOF
3924
3925# Some tools Automake needs.
3926
3927ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
3928
3929
3930AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
3931
3932
3933AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
3934
3935
3936AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
3937
3938
3939MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
3940
3941# We need awk for the "check" target. The system "awk" is bad on
3942# some platforms.
3943# Always define AMTAR for backward compatibility.
3944
3945AMTAR=${AMTAR-"${am_missing_run}tar"}
3946
3947am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
3948
3949
3950
3951
3952
3953
3954
3955
3956lispdir='${datadir}/emacs/${version}/lisp'
e1939eb1 3957leimdir='${datadir}/emacs/${version}/leim'
397f7161 3958standardlisppath='${lispdir}:${leimdir}'
743c80a7
PE
3959locallisppath='${datadir}/emacs/${version}/site-lisp:'\
3960'${datadir}/emacs/site-lisp'
397f7161 3961lisppath='${locallisppath}:${standardlisppath}'
743c80a7
PE
3962etcdir='${datadir}/emacs/${version}/etc'
3963archlibdir='${libexecdir}/emacs/${version}/${configuration}'
3964docdir='${datadir}/emacs/${version}/etc'
3965gamedir='${localstatedir}/games/emacs'
3966
ee77919d
GM
3967
3968# Check whether --with-all was given.
3969if test "${with_all+set}" = set; then :
3970 withval=$with_all; with_features=$withval
c0528ebe 3971else
ee77919d 3972 with_features=yes
c0528ebe
GM
3973fi
3974
3975
743c80a7
PE
3976
3977
3978
3979# Check whether --with-pop was given.
3980if test "${with_pop+set}" = set; then :
3981 withval=$with_pop;
3982else
ee77919d 3983 with_pop=$with_features
743c80a7
PE
3984fi
3985
3986if test "$with_pop" = yes; then
3987 $as_echo "#define MAIL_USE_POP 1" >>confdefs.h
3988
3989fi
3990
3991
3992# Check whether --with-kerberos was given.
3993if test "${with_kerberos+set}" = set; then :
3994 withval=$with_kerberos;
3995else
3996 with_kerberos=no
3997fi
3998
3999if test "$with_kerberos" != no; then
4000 $as_echo "#define KERBEROS 1" >>confdefs.h
4001
4002fi
4003
4004
4005# Check whether --with-kerberos5 was given.
4006if test "${with_kerberos5+set}" = set; then :
4007 withval=$with_kerberos5;
4008else
4009 with_kerberos5=no
4010fi
4011
4012if test "${with_kerberos5}" != no; then
4013 if test "${with_kerberos}" = no; then
4014 with_kerberos=yes
4015 $as_echo "#define KERBEROS 1" >>confdefs.h
4016
4017 fi
4018
4019$as_echo "#define KERBEROS5 1" >>confdefs.h
4020
4021fi
4022
4023
4024# Check whether --with-hesiod was given.
4025if test "${with_hesiod+set}" = set; then :
4026 withval=$with_hesiod;
4027else
4028 with_hesiod=no
4029fi
4030
4031if test "$with_hesiod" != no; then
4032
4033$as_echo "#define HESIOD 1" >>confdefs.h
4034
4035fi
4036
4037
4038# Check whether --with-mmdf was given.
4039if test "${with_mmdf+set}" = set; then :
4040 withval=$with_mmdf;
4041else
4042 with_mmdf=no
4043fi
4044
4045if test "$with_mmdf" != no; then
4046
4047$as_echo "#define MAIL_USE_MMDF 1" >>confdefs.h
4048
4049fi
4050
4051
4052# Check whether --with-mail-unlink was given.
4053if test "${with_mail_unlink+set}" = set; then :
4054 withval=$with_mail_unlink;
4055else
4056 with_mail_unlink=no
4057fi
4058
4059if test "$with_mail_unlink" != no; then
4060
4061$as_echo "#define MAIL_UNLINK_SPOOL 1" >>confdefs.h
4062
4063fi
4064
4065
4066# Check whether --with-mailhost was given.
4067if test "${with_mailhost+set}" = set; then :
4068 withval=$with_mailhost;
4069cat >>confdefs.h <<_ACEOF
4070#define MAILHOST "$withval"
4071_ACEOF
4072
4073fi
4074
4075
4076
067d23c9
KY
4077# Check whether --with-sound was given.
4078if test "${with_sound+set}" = set; then :
4079 withval=$with_sound;
4080else
ee77919d 4081 with_sound=$with_features
067d23c9
KY
4082fi
4083
4084
4085
067d23c9
KY
4086# Check whether --with-x-toolkit was given.
4087if test "${with_x_toolkit+set}" = set; then :
4088 withval=$with_x_toolkit; case "${withval}" in
4089 y | ye | yes ) val=gtk ;;
4090 n | no ) val=no ;;
4091 l | lu | luc | luci | lucid ) val=lucid ;;
4092 a | at | ath | athe | athen | athena ) val=athena ;;
4093 m | mo | mot | moti | motif ) val=motif ;;
4094 g | gt | gtk ) val=gtk ;;
4fa92495 4095 gtk2 ) val=gtk2 ;;
067d23c9
KY
4096 gtk3 ) val=gtk3 ;;
4097 * )
a9bec17c 4098as_fn_error "\`--with-x-toolkit=$withval' is invalid;
4fa92495
GM
4099this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif', \`gtk',
4100\`gtk2' or \`gtk3'. \`yes' and \`gtk' are synonyms.
4101\`athena' and \`lucid' are synonyms." "$LINENO" 5
067d23c9
KY
4102 ;;
4103 esac
4104 with_x_toolkit=$val
4105
4106fi
4107
4108
4109
0442dc7f
GM
4110# Check whether --with-wide-int was given.
4111if test "${with_wide_int+set}" = set; then :
4112 withval=$with_wide_int;
4113else
4114 with_wide_int=no
4115fi
4116
4117if test "$with_wide_int" = yes; then
4118
4119$as_echo "#define WIDE_EMACS_INT 1" >>confdefs.h
4120
4121fi
4122
4123
067d23c9
KY
4124# Check whether --with-xpm was given.
4125if test "${with_xpm+set}" = set; then :
4126 withval=$with_xpm;
4127else
ee77919d 4128 with_xpm=$with_features
067d23c9
KY
4129fi
4130
4131
4132# Check whether --with-jpeg was given.
4133if test "${with_jpeg+set}" = set; then :
4134 withval=$with_jpeg;
4135else
ee77919d 4136 with_jpeg=$with_features
067d23c9
KY
4137fi
4138
4139
4140# Check whether --with-tiff was given.
4141if test "${with_tiff+set}" = set; then :
4142 withval=$with_tiff;
4143else
ee77919d 4144 with_tiff=$with_features
067d23c9
KY
4145fi
4146
4147
4148# Check whether --with-gif was given.
4149if test "${with_gif+set}" = set; then :
4150 withval=$with_gif;
4151else
ee77919d 4152 with_gif=$with_features
067d23c9
KY
4153fi
4154
4155
4156# Check whether --with-png was given.
4157if test "${with_png+set}" = set; then :
4158 withval=$with_png;
4159else
ee77919d 4160 with_png=$with_features
067d23c9
KY
4161fi
4162
4163
4164# Check whether --with-rsvg was given.
4165if test "${with_rsvg+set}" = set; then :
4166 withval=$with_rsvg;
4167else
ee77919d 4168 with_rsvg=$with_features
067d23c9
KY
4169fi
4170
4171
4172# Check whether --with-xml2 was given.
4173if test "${with_xml2+set}" = set; then :
4174 withval=$with_xml2;
4175else
ee77919d 4176 with_xml2=$with_features
067d23c9
KY
4177fi
4178
4179
4180# Check whether --with-imagemagick was given.
4181if test "${with_imagemagick+set}" = set; then :
4182 withval=$with_imagemagick;
4183else
ee77919d 4184 with_imagemagick=$with_features
067d23c9
KY
4185fi
4186
4187
4188
4189# Check whether --with-xft was given.
4190if test "${with_xft+set}" = set; then :
4191 withval=$with_xft;
4192else
ee77919d 4193 with_xft=$with_features
067d23c9
KY
4194fi
4195
4196
4197# Check whether --with-libotf was given.
4198if test "${with_libotf+set}" = set; then :
4199 withval=$with_libotf;
4200else
ee77919d 4201 with_libotf=$with_features
067d23c9
KY
4202fi
4203
4204
4205# Check whether --with-m17n-flt was given.
4206if test "${with_m17n_flt+set}" = set; then :
4207 withval=$with_m17n_flt;
4208else
ee77919d 4209 with_m17n_flt=$with_features
067d23c9
KY
4210fi
4211
4212
4213
4214# Check whether --with-toolkit-scroll-bars was given.
4215if test "${with_toolkit_scroll_bars+set}" = set; then :
4216 withval=$with_toolkit_scroll_bars;
4217else
ee77919d 4218 with_toolkit_scroll_bars=$with_features
067d23c9
KY
4219fi
4220
4221
4222# Check whether --with-xaw3d was given.
4223if test "${with_xaw3d+set}" = set; then :
4224 withval=$with_xaw3d;
4225else
ee77919d 4226 with_xaw3d=$with_features
067d23c9
KY
4227fi
4228
4229
4230# Check whether --with-xim was given.
4231if test "${with_xim+set}" = set; then :
4232 withval=$with_xim;
4233else
ee77919d 4234 with_xim=$with_features
067d23c9
KY
4235fi
4236
4237
4238# Check whether --with-ns was given.
4239if test "${with_ns+set}" = set; then :
4240 withval=$with_ns;
4241else
4242 with_ns=no
4243fi
4244
4245
5c0255d9
GM
4246# Check whether --with-w32 was given.
4247if test "${with_w32+set}" = set; then :
4248 withval=$with_w32;
4249else
4250 with_w32=no
4251fi
4252
4253
067d23c9
KY
4254
4255# Check whether --with-gpm was given.
4256if test "${with_gpm+set}" = set; then :
4257 withval=$with_gpm;
4258else
ee77919d 4259 with_gpm=$with_features
067d23c9
KY
4260fi
4261
4262
4263# Check whether --with-dbus was given.
4264if test "${with_dbus+set}" = set; then :
4265 withval=$with_dbus;
4266else
ee77919d 4267 with_dbus=$with_features
067d23c9
KY
4268fi
4269
4270
4271# Check whether --with-gconf was given.
4272if test "${with_gconf+set}" = set; then :
4273 withval=$with_gconf;
4274else
ee77919d 4275 with_gconf=$with_features
067d23c9
KY
4276fi
4277
4278
f527bd02
GM
4279# Check whether --with-gsettings was given.
4280if test "${with_gsettings+set}" = set; then :
4281 withval=$with_gsettings;
4282else
ee77919d 4283 with_gsettings=$with_features
f527bd02
GM
4284fi
4285
4286
067d23c9
KY
4287# Check whether --with-selinux was given.
4288if test "${with_selinux+set}" = set; then :
4289 withval=$with_selinux;
4290else
ee77919d 4291 with_selinux=$with_features
067d23c9
KY
4292fi
4293
4294
4cc63c81
GM
4295# Check whether --with-acl was given.
4296if test "${with_acl+set}" = set; then :
4297 withval=$with_acl;
4298else
4299 with_acl=$with_features
4300fi
4301
4302
067d23c9
KY
4303# Check whether --with-gnutls was given.
4304if test "${with_gnutls+set}" = set; then :
4305 withval=$with_gnutls;
4306else
ee77919d 4307 with_gnutls=$with_features
067d23c9
KY
4308fi
4309
4310
b5eb356a
GM
4311# Check whether --with-inotify was given.
4312if test "${with_inotify+set}" = set; then :
4313 withval=$with_inotify;
4314else
4315 with_inotify=$with_features
4316fi
4317
4318
067d23c9
KY
4319## For the times when you want to build Emacs but don't have
4320## a suitable makeinfo, and can live without the manuals.
4321
4322# Check whether --with-makeinfo was given.
4323if test "${with_makeinfo+set}" = set; then :
4324 withval=$with_makeinfo;
4325else
ee77919d 4326 with_makeinfo=$with_features
067d23c9
KY
4327fi
4328
4329
c3a461a5
GM
4330## Makefile.in needs the cache file name.
4331
4332
067d23c9
KY
4333## This is an option because I do not know if all info/man support
4334## compressed files, nor how to test if they do so.
4335
4336# Check whether --with-compress-info was given.
4337if test "${with_compress_info+set}" = set; then :
4338 withval=$with_compress_info;
4339else
ee77919d 4340 with_compress_info=$with_features
067d23c9
KY
4341fi
4342
4343if test $with_compress_info = yes; then
4344 GZIP_INFO=yes
4345else
4346 GZIP_INFO=
4347fi
4348
4349
4350
4351# Check whether --with-pkg-config-prog was given.
4352if test "${with_pkg_config_prog+set}" = set; then :
4353 withval=$with_pkg_config_prog;
4354fi
4355
4356if test "X${with_pkg_config_prog}" != X; then
4357 if test "${with_pkg_config_prog}" != yes; then
4358 PKG_CONFIG="${with_pkg_config_prog}"
4359 fi
4360fi
4361
067d23c9 4362
4fc5868a
UM
4363# Check whether --with-gameuser was given.
4364if test "${with_gameuser+set}" = set; then :
4365 withval=$with_gameuser;
4366fi
4367
4368test "X${with_gameuser}" != X && test "${with_gameuser}" != yes \
4369 && gameuser="${with_gameuser}"
4370test "X$gameuser" = X && gameuser=games
4371
4372
067d23c9
KY
4373# Check whether --with-gnustep-conf was given.
4374if test "${with_gnustep_conf+set}" = set; then :
4375 withval=$with_gnustep_conf;
4376fi
4377
4378test "X${with_gnustep_conf}" != X && test "${with_gnustep_conf}" != yes && \
4379 GNUSTEP_CONFIG_FILE="${with_gnustep_conf}"
4380test "X$GNUSTEP_CONFIG_FILE" = "X" && \
4381 GNUSTEP_CONFIG_FILE=/etc/GNUstep/GNUstep.conf
4382
4383# Check whether --enable-ns-self-contained was given.
4384if test "${enable_ns_self_contained+set}" = set; then :
4385 enableval=$enable_ns_self_contained; EN_NS_SELF_CONTAINED=$enableval
4386else
4387 EN_NS_SELF_CONTAINED=yes
4388fi
4389
4390
067d23c9
KY
4391# Check whether --enable-locallisppath was given.
4392if test "${enable_locallisppath+set}" = set; then :
4393 enableval=$enable_locallisppath; if test "${enableval}" = "no"; then
4394 locallisppath=
4395elif test "${enableval}" != "yes"; then
4396 locallisppath=${enableval}
4397fi
4398fi
4399
4400
4401# Check whether --enable-checking was given.
4402if test "${enable_checking+set}" = set; then :
4403 enableval=$enable_checking; ac_checking_flags="${enableval}"
4404fi
4405
4406IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
4407for check in $ac_checking_flags
4408do
4409 case $check in
4410 # these set all the flags to specific states
4411 yes) ac_enable_checking=1 ;;
4412 no) ac_enable_checking= ;
4413 ac_gc_check_stringbytes= ;
4414 ac_gc_check_string_overrun= ;
4415 ac_gc_check_string_free_list= ;
4416 ac_xmalloc_overrun= ;
7ee3791f 4417 ac_gc_check_cons_list= ;
e4d35030 4418 ac_glyphs_debug= ;;
067d23c9
KY
4419 all) ac_enable_checking=1 ;
4420 ac_gc_check_stringbytes=1 ;
4421 ac_gc_check_string_overrun=1 ;
4422 ac_gc_check_string_free_list=1 ;
4423 ac_xmalloc_overrun=1 ;
7ee3791f 4424 ac_gc_check_cons_list=1 ;
e4d35030 4425 ac_glyphs_debug=1 ;;
067d23c9
KY
4426 # these enable particular checks
4427 stringbytes) ac_gc_check_stringbytes=1 ;;
4428 stringoverrun) ac_gc_check_string_overrun=1 ;;
4429 stringfreelist) ac_gc_check_string_free_list=1 ;;
4430 xmallocoverrun) ac_xmalloc_overrun=1 ;;
4431 conslist) ac_gc_check_cons_list=1 ;;
e4d35030 4432 glyphs) ac_glyphs_debug=1 ;;
a9bec17c 4433 *) as_fn_error "unknown check category $check" "$LINENO" 5 ;;
067d23c9
KY
4434 esac
4435done
4436IFS="$ac_save_IFS"
4437
4438if test x$ac_enable_checking != x ; then
4439
4440$as_echo "#define ENABLE_CHECKING 1" >>confdefs.h
4441
4442fi
4443if test x$ac_gc_check_stringbytes != x ; then
4444
4445$as_echo "#define GC_CHECK_STRING_BYTES 1" >>confdefs.h
4446
4447fi
4fda9c95 4448if test x$ac_gc_check_string_overrun != x ; then
067d23c9
KY
4449
4450$as_echo "#define GC_CHECK_STRING_OVERRUN 1" >>confdefs.h
4451
4452fi
4453if test x$ac_gc_check_string_free_list != x ; then
4454
4455$as_echo "#define GC_CHECK_STRING_FREE_LIST 1" >>confdefs.h
4456
4457fi
4458if test x$ac_xmalloc_overrun != x ; then
4459
4460$as_echo "#define XMALLOC_OVERRUN_CHECK 1" >>confdefs.h
4461
4462fi
4463if test x$ac_gc_check_cons_list != x ; then
4464
4465$as_echo "#define GC_CHECK_CONS_LIST 1" >>confdefs.h
4466
7ee3791f 4467fi
e4d35030 4468if test x$ac_glyphs_debug != x ; then
7ee3791f
GM
4469
4470$as_echo "#define GLYPH_DEBUG 1" >>confdefs.h
4471
067d23c9
KY
4472fi
4473
afd07e01
GM
4474# Check whether --enable-check-lisp-object-type was given.
4475if test "${enable_check_lisp_object_type+set}" = set; then :
4476 enableval=$enable_check_lisp_object_type; if test "${enableval}" != "no"; then
067d23c9 4477
afd07e01 4478$as_echo "#define CHECK_LISP_OBJECT_TYPE 1" >>confdefs.h
067d23c9
KY
4479
4480fi
4481fi
4482
4483
4484
4485# Check whether --enable-profiling was given.
4486if test "${enable_profiling+set}" = set; then :
4487 enableval=$enable_profiling; ac_enable_profiling="${enableval}"
4488fi
4489
4490if test x$ac_enable_profiling != x ; then
4491 PROFILING_CFLAGS="-DPROFILING=1 -pg"
4492else
4493 PROFILING_CFLAGS=
4494fi
4495
4496
4497# Check whether --enable-autodepend was given.
4498if test "${enable_autodepend+set}" = set; then :
4499 enableval=$enable_autodepend; ac_enable_autodepend="${enableval}"
4500else
4501 ac_enable_autodepend=yes
4502fi
4503
4504
4efe5ef9
GM
4505# Check whether --enable-gtk-deprecation-warnings was given.
4506if test "${enable_gtk_deprecation_warnings+set}" = set; then :
4507 enableval=$enable_gtk_deprecation_warnings; ac_enable_gtk_deprecation_warnings="${enableval}"
4508fi
4509
4510
067d23c9 4511#### Make srcdir absolute, if it isn't already. It's important to
b5591ebb 4512#### avoid running the file name through pwd unnecessarily, since pwd can
067d23c9
KY
4513#### give you automounter prefixes, which can go away. We do all this
4514#### so Emacs can find its files when run uninstalled.
4515## Make sure CDPATH doesn't affect cd (in case PWD is relative).
4516unset CDPATH
4517case "${srcdir}" in
4518 /* ) ;;
4519 . )
4520 ## We may be able to use the $PWD environment variable to make this
4521 ## absolute. But sometimes PWD is inaccurate.
b5591ebb 4522 ## Note: we used to use $PWD at the end instead of `pwd`,
067d23c9
KY
4523 ## but that tested only for a well-formed and valid PWD,
4524 ## it did not object when PWD was well-formed and valid but just wrong.
b5591ebb 4525 if test ".$PWD" != "." && test ".`(cd "$PWD" ; sh -c pwd)`" = ".`pwd`" ;
067d23c9
KY
4526 then
4527 srcdir="$PWD"
4528 else
b5591ebb 4529 srcdir=`(cd "$srcdir"; pwd)`
067d23c9
KY
4530 fi
4531 ;;
b5591ebb 4532 * ) srcdir=`(cd "$srcdir"; pwd)` ;;
067d23c9
KY
4533esac
4534
067d23c9
KY
4535### Canonicalize the configuration name.
4536
067d23c9
KY
4537# Make sure we can run config.sub.
4538$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
a9bec17c 4539 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
067d23c9
KY
4540
4541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4542$as_echo_n "checking build system type... " >&6; }
a9bec17c 4543if test "${ac_cv_build+set}" = set; then :
067d23c9
KY
4544 $as_echo_n "(cached) " >&6
4545else
4546 ac_build_alias=$build_alias
4547test "x$ac_build_alias" = x &&
4548 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4549test "x$ac_build_alias" = x &&
a9bec17c 4550 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
067d23c9 4551ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
a9bec17c 4552 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
067d23c9
KY
4553
4554fi
4555{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4556$as_echo "$ac_cv_build" >&6; }
4557case $ac_cv_build in
4558*-*-*) ;;
a9bec17c 4559*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
067d23c9
KY
4560esac
4561build=$ac_cv_build
4562ac_save_IFS=$IFS; IFS='-'
4563set x $ac_cv_build
4564shift
4565build_cpu=$1
4566build_vendor=$2
4567shift; shift
4568# Remember, the first character of IFS is used to create $*,
4569# except with old shells:
4570build_os=$*
4571IFS=$ac_save_IFS
4572case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
4573
4574
4575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4576$as_echo_n "checking host system type... " >&6; }
a9bec17c 4577if test "${ac_cv_host+set}" = set; then :
067d23c9
KY
4578 $as_echo_n "(cached) " >&6
4579else
4580 if test "x$host_alias" = x; then
4581 ac_cv_host=$ac_cv_build
4582else
4583 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
a9bec17c 4584 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
067d23c9
KY
4585fi
4586
4587fi
4588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4589$as_echo "$ac_cv_host" >&6; }
4590case $ac_cv_host in
4591*-*-*) ;;
a9bec17c 4592*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
067d23c9
KY
4593esac
4594host=$ac_cv_host
4595ac_save_IFS=$IFS; IFS='-'
4596set x $ac_cv_host
4597shift
4598host_cpu=$1
4599host_vendor=$2
4600shift; shift
4601# Remember, the first character of IFS is used to create $*,
4602# except with old shells:
4603host_os=$*
4604IFS=$ac_save_IFS
4605case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
4606
4607
4608canonical=$host
4609configuration=${host_alias-${build_alias-$host}}
4610
4611
4612
4613### If you add support for a new configuration, add code to this
4614### switch statement to recognize your configuration name and select
42bbbe8b 4615### the appropriate operating system file.
067d23c9 4616
42bbbe8b 4617### You would hope that you could choose an s/*.h
067d23c9 4618### file based on the operating system portion. However, it turns out
42bbbe8b 4619### that each s/*.h file is pretty manufacturer-specific.
067d23c9
KY
4620### So we basically have to have a special case for each
4621### configuration name.
4622###
4623### As far as handling version numbers on operating systems is
4624### concerned, make sure things will fail in a fixable way. If
4625### /etc/MACHINES doesn't say anything about version numbers, be
4626### prepared to handle anything reasonably. If version numbers
4627### matter, be sure /etc/MACHINES says something about it.
4628
42bbbe8b 4629opsys='' unported=no
067d23c9
KY
4630case "${canonical}" in
4631
9b6e5515
GM
4632 ## GNU/Linux and similar ports
4633 *-*-linux* )
d6a003a8 4634 opsys=gnu-linux
d6a003a8
AS
4635 ;;
4636
067d23c9
KY
4637 ## FreeBSD ports
4638 *-*-freebsd* )
4639 opsys=freebsd
067d23c9
KY
4640 ;;
4641
4642 ## FreeBSD kernel + glibc based userland
4643 *-*-kfreebsd*gnu* )
4644 opsys=gnu-kfreebsd
067d23c9
KY
4645 ;;
4646
4647 ## NetBSD ports
4648 *-*-netbsd* )
4649 opsys=netbsd
067d23c9
KY
4650 ;;
4651
4652 ## OpenBSD ports
4653 *-*-openbsd* )
4654 opsys=openbsd
067d23c9
KY
4655 ;;
4656
067d23c9
KY
4657 ## Apple Darwin / Mac OS X
4658 *-apple-darwin* )
4659 case "${canonical}" in
42bbbe8b
GM
4660 i[3456]86-* ) ;;
4661 powerpc-* ) ;;
4662 x86_64-* ) ;;
067d23c9
KY
4663 * ) unported=yes ;;
4664 esac
4665 opsys=darwin
adf4198e
GM
4666 ## Use fink packages if available.
4667 ## FIXME find a better way to do this: http://debbugs.gnu.org/11507
4668## if test -d /sw/include && test -d /sw/lib; then
4669## GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib"
4670## NON_GCC_TEST_OPTIONS=${GCC_TEST_OPTIONS}
4671## fi
067d23c9
KY
4672 ;;
4673
4674 ## HP 9000 series 700 and 800, running HP/UX
4675 hppa*-hp-hpux10.2* )
d6a003a8 4676 opsys=hpux10-20
067d23c9
KY
4677 ;;
4678 hppa*-hp-hpux1[1-9]* )
d6a003a8 4679 opsys=hpux11
067d23c9
KY
4680 CFLAGS="-D_INCLUDE__STDC_A1_SOURCE $CFLAGS"
4681 ;;
4682
067d23c9 4683 ## IBM machines
067d23c9 4684 rs6000-ibm-aix4.[23]* )
42bbbe8b 4685 opsys=aix4-2
067d23c9
KY
4686 ;;
4687 powerpc-ibm-aix4.[23]* )
42bbbe8b 4688 opsys=aix4-2
067d23c9
KY
4689 ;;
4690 rs6000-ibm-aix[56]* )
42bbbe8b 4691 opsys=aix4-2
067d23c9
KY
4692 ;;
4693 powerpc-ibm-aix[56]* )
42bbbe8b 4694 opsys=aix4-2
067d23c9
KY
4695 ;;
4696
067d23c9
KY
4697 ## Silicon Graphics machines
4698 ## Iris 4D
4699 mips-sgi-irix6.5 )
fd44db7f 4700 opsys=irix6-5
067d23c9
KY
4701 # Without defining _LANGUAGE_C, things get masked out in the headers
4702 # so that, for instance, grepping for `free' in stdlib.h fails and
4703 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
067d23c9
KY
4704 NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
4705 ;;
4706
4707 ## Suns
067d23c9
KY
4708 *-sun-solaris* \
4709 | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* \
4710 | x86_64-*-solaris2* | x86_64-*-sunos5*)
4711 case "${canonical}" in
42bbbe8b
GM
4712 i[3456]86-*-* ) ;;
4713 amd64-*-*|x86_64-*-*) ;;
4714 sparc* ) ;;
067d23c9
KY
4715 * ) unported=yes ;;
4716 esac
4717 case "${canonical}" in
4718 *-sunos5.6* | *-solaris2.6* )
4719 opsys=sol2-6
067d23c9
KY
4720 RANLIB="ar -ts"
4721 ;;
4722 *-sunos5.[7-9]* | *-solaris2.[7-9]* )
4723 opsys=sol2-6
4724 emacs_check_sunpro_c=yes
067d23c9
KY
4725 ;;
4726 *-sunos5* | *-solaris* )
4727 opsys=sol2-10
4728 emacs_check_sunpro_c=yes
067d23c9
KY
4729 ;;
4730 esac
4731 ## Watch out for a compiler that we know will not work.
4732 case "${canonical}" in
4733 *-solaris* | *-sunos5* )
4734 if [ "x$CC" = x/usr/ucb/cc ]; then
4735 ## /usr/ucb/cc doesn't work;
4736 ## we should find some other compiler that does work.
4737 unset CC
4738 fi
4739 ;;
4740 *) ;;
4741 esac
4742 ;;
4743
067d23c9
KY
4744 ## Intel 386 machines where we don't care about the manufacturer.
4745 i[3456]86-*-* )
067d23c9
KY
4746 case "${canonical}" in
4747 *-cygwin ) opsys=cygwin ;;
5ec54608
GM
4748 *-darwin* ) opsys=darwin ;;
4749 *-sysv4.2uw* ) opsys=unixware ;;
4750 *-sysv5uw* ) opsys=unixware ;;
4751 *-sysv5OpenUNIX* ) opsys=unixware ;;
067d23c9
KY
4752 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
4753 esac
4754 ;;
4755
067d23c9
KY
4756 * )
4757 unported=yes
4758 ;;
4759esac
4760
4761### If the code above didn't choose an operating system, just choose
4762### an operating system based on the configuration name. You really
4763### only want to use this when you have no idea what the right
4764### operating system is; if you know what operating systems a machine
4765### runs, it's cleaner to make it explicit in the case statement
4766### above.
4767if test x"${opsys}" = x; then
4768 case "${canonical}" in
4769 *-gnu* ) opsys=gnu ;;
4770 * )
4771 unported=yes
4772 ;;
4773 esac
4774fi
4775
4776
4777
4778if test $unported = yes; then
a9bec17c 4779 as_fn_error "Emacs hasn't been ported to \`${canonical}' systems.
067d23c9
KY
4780Check \`etc/MACHINES' for recognized configuration names." "$LINENO" 5
4781fi
4782
067d23c9
KY
4783
4784#### Choose a compiler.
067d23c9
KY
4785
4786ac_ext=c
4787ac_cpp='$CPP $CPPFLAGS'
4788ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4789ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4790ac_compiler_gnu=$ac_cv_c_compiler_gnu
4791if test -n "$ac_tool_prefix"; then
4792 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4793set dummy ${ac_tool_prefix}gcc; ac_word=$2
4794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4795$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 4796if test "${ac_cv_prog_CC+set}" = set; then :
067d23c9
KY
4797 $as_echo_n "(cached) " >&6
4798else
4799 if test -n "$CC"; then
4800 ac_cv_prog_CC="$CC" # Let the user override the test.
4801else
4802as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4803for as_dir in $PATH
4804do
4805 IFS=$as_save_IFS
4806 test -z "$as_dir" && as_dir=.
4807 for ac_exec_ext in '' $ac_executable_extensions; do
4808 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4809 ac_cv_prog_CC="${ac_tool_prefix}gcc"
4810 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4811 break 2
4812 fi
4813done
4814 done
4815IFS=$as_save_IFS
4816
4817fi
4818fi
4819CC=$ac_cv_prog_CC
4820if test -n "$CC"; then
4821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4822$as_echo "$CC" >&6; }
4823else
4824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4825$as_echo "no" >&6; }
4826fi
4827
4828
4829fi
4830if test -z "$ac_cv_prog_CC"; then
4831 ac_ct_CC=$CC
4832 # Extract the first word of "gcc", so it can be a program name with args.
4833set dummy gcc; ac_word=$2
4834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4835$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 4836if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
067d23c9
KY
4837 $as_echo_n "(cached) " >&6
4838else
4839 if test -n "$ac_ct_CC"; then
4840 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4841else
4842as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4843for as_dir in $PATH
4844do
4845 IFS=$as_save_IFS
4846 test -z "$as_dir" && as_dir=.
4847 for ac_exec_ext in '' $ac_executable_extensions; do
4848 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4849 ac_cv_prog_ac_ct_CC="gcc"
4850 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4851 break 2
4852 fi
4853done
4854 done
4855IFS=$as_save_IFS
4856
4857fi
4858fi
4859ac_ct_CC=$ac_cv_prog_ac_ct_CC
4860if test -n "$ac_ct_CC"; then
4861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4862$as_echo "$ac_ct_CC" >&6; }
4863else
4864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4865$as_echo "no" >&6; }
4866fi
4867
4868 if test "x$ac_ct_CC" = x; then
4869 CC=""
4870 else
4871 case $cross_compiling:$ac_tool_warned in
4872yes:)
4873{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4874$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4875ac_tool_warned=yes ;;
4876esac
4877 CC=$ac_ct_CC
4878 fi
4879else
4880 CC="$ac_cv_prog_CC"
4881fi
4882
4883if test -z "$CC"; then
4884 if test -n "$ac_tool_prefix"; then
4885 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4886set dummy ${ac_tool_prefix}cc; ac_word=$2
4887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4888$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 4889if test "${ac_cv_prog_CC+set}" = set; then :
067d23c9
KY
4890 $as_echo_n "(cached) " >&6
4891else
4892 if test -n "$CC"; then
4893 ac_cv_prog_CC="$CC" # Let the user override the test.
4894else
4895as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4896for as_dir in $PATH
4897do
4898 IFS=$as_save_IFS
4899 test -z "$as_dir" && as_dir=.
4900 for ac_exec_ext in '' $ac_executable_extensions; do
4901 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4902 ac_cv_prog_CC="${ac_tool_prefix}cc"
4903 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4904 break 2
4905 fi
4906done
4907 done
4908IFS=$as_save_IFS
4909
4910fi
4911fi
4912CC=$ac_cv_prog_CC
4913if test -n "$CC"; then
4914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4915$as_echo "$CC" >&6; }
4916else
4917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4918$as_echo "no" >&6; }
4919fi
4920
4921
4922 fi
4923fi
4924if test -z "$CC"; then
4925 # Extract the first word of "cc", so it can be a program name with args.
4926set dummy cc; ac_word=$2
4927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4928$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 4929if test "${ac_cv_prog_CC+set}" = set; then :
067d23c9
KY
4930 $as_echo_n "(cached) " >&6
4931else
4932 if test -n "$CC"; then
4933 ac_cv_prog_CC="$CC" # Let the user override the test.
4934else
4935 ac_prog_rejected=no
4936as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4937for as_dir in $PATH
4938do
4939 IFS=$as_save_IFS
4940 test -z "$as_dir" && as_dir=.
4941 for ac_exec_ext in '' $ac_executable_extensions; do
4942 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4943 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4944 ac_prog_rejected=yes
4945 continue
4946 fi
4947 ac_cv_prog_CC="cc"
4948 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4949 break 2
4950 fi
4951done
4952 done
4953IFS=$as_save_IFS
4954
4955if test $ac_prog_rejected = yes; then
4956 # We found a bogon in the path, so make sure we never use it.
4957 set dummy $ac_cv_prog_CC
4958 shift
4959 if test $# != 0; then
4960 # We chose a different compiler from the bogus one.
4961 # However, it has the same basename, so the bogon will be chosen
4962 # first if we set CC to just the basename; use the full file name.
4963 shift
4964 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
4965 fi
4966fi
4967fi
4968fi
4969CC=$ac_cv_prog_CC
4970if test -n "$CC"; then
4971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4972$as_echo "$CC" >&6; }
4973else
4974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4975$as_echo "no" >&6; }
4976fi
4977
4978
4979fi
4980if test -z "$CC"; then
4981 if test -n "$ac_tool_prefix"; then
4982 for ac_prog in cl.exe
4983 do
4984 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4985set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4987$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 4988if test "${ac_cv_prog_CC+set}" = set; then :
067d23c9
KY
4989 $as_echo_n "(cached) " >&6
4990else
4991 if test -n "$CC"; then
4992 ac_cv_prog_CC="$CC" # Let the user override the test.
4993else
4994as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4995for as_dir in $PATH
4996do
4997 IFS=$as_save_IFS
4998 test -z "$as_dir" && as_dir=.
4999 for ac_exec_ext in '' $ac_executable_extensions; do
5000 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5001 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
5002 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5003 break 2
5004 fi
5005done
5006 done
5007IFS=$as_save_IFS
5008
5009fi
5010fi
5011CC=$ac_cv_prog_CC
5012if test -n "$CC"; then
5013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5014$as_echo "$CC" >&6; }
5015else
5016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5017$as_echo "no" >&6; }
5018fi
5019
5020
5021 test -n "$CC" && break
5022 done
5023fi
5024if test -z "$CC"; then
5025 ac_ct_CC=$CC
5026 for ac_prog in cl.exe
5027do
5028 # Extract the first word of "$ac_prog", so it can be a program name with args.
5029set dummy $ac_prog; ac_word=$2
5030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5031$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 5032if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
067d23c9
KY
5033 $as_echo_n "(cached) " >&6
5034else
5035 if test -n "$ac_ct_CC"; then
5036 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5037else
5038as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5039for as_dir in $PATH
5040do
5041 IFS=$as_save_IFS
5042 test -z "$as_dir" && as_dir=.
5043 for ac_exec_ext in '' $ac_executable_extensions; do
5044 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5045 ac_cv_prog_ac_ct_CC="$ac_prog"
5046 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5047 break 2
5048 fi
5049done
5050 done
5051IFS=$as_save_IFS
5052
5053fi
5054fi
5055ac_ct_CC=$ac_cv_prog_ac_ct_CC
5056if test -n "$ac_ct_CC"; then
5057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5058$as_echo "$ac_ct_CC" >&6; }
5059else
5060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5061$as_echo "no" >&6; }
5062fi
5063
5064
5065 test -n "$ac_ct_CC" && break
5066done
5067
5068 if test "x$ac_ct_CC" = x; then
5069 CC=""
5070 else
5071 case $cross_compiling:$ac_tool_warned in
5072yes:)
5073{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5074$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5075ac_tool_warned=yes ;;
5076esac
5077 CC=$ac_ct_CC
5078 fi
5079fi
5080
5081fi
5082
5083
5084test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5085$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
a9bec17c
GM
5086as_fn_error "no acceptable C compiler found in \$PATH
5087See \`config.log' for more details." "$LINENO" 5; }
067d23c9
KY
5088
5089# Provide some information about the compiler.
5090$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
5091set X $ac_compile
5092ac_compiler=$2
5093for ac_option in --version -v -V -qversion; do
5094 { { ac_try="$ac_compiler $ac_option >&5"
5095case "(($ac_try" in
5096 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5097 *) ac_try_echo=$ac_try;;
5098esac
5099eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5100$as_echo "$ac_try_echo"; } >&5
5101 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
5102 ac_status=$?
5103 if test -s conftest.err; then
5104 sed '10a\
5105... rest of stderr output deleted ...
5106 10q' conftest.err >conftest.er1
5107 cat conftest.er1 >&5
5108 fi
5109 rm -f conftest.er1 conftest.err
5110 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5111 test $ac_status = 0; }
5112done
5113
5114cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5115/* end confdefs.h. */
5116
5117int
5118main ()
5119{
5120
5121 ;
5122 return 0;
5123}
5124_ACEOF
5125ac_clean_files_save=$ac_clean_files
5126ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
5127# Try to create an executable without -o first, disregard a.out.
5128# It will help us diagnose broken compilers, and finding out an intuition
5129# of exeext.
5130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
5131$as_echo_n "checking whether the C compiler works... " >&6; }
5132ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
5133
5134# The possible output files:
5135ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
5136
5137ac_rmfiles=
5138for ac_file in $ac_files
5139do
5140 case $ac_file in
5141 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
5142 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
5143 esac
5144done
5145rm -f $ac_rmfiles
5146
5147if { { ac_try="$ac_link_default"
5148case "(($ac_try" in
5149 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5150 *) ac_try_echo=$ac_try;;
5151esac
5152eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5153$as_echo "$ac_try_echo"; } >&5
5154 (eval "$ac_link_default") 2>&5
5155 ac_status=$?
5156 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5157 test $ac_status = 0; }; then :
5158 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
5159# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
5160# in a Makefile. We should not override ac_cv_exeext if it was cached,
5161# so that the user can short-circuit this test for compilers unknown to
5162# Autoconf.
5163for ac_file in $ac_files ''
5164do
5165 test -f "$ac_file" || continue
5166 case $ac_file in
5167 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
5168 ;;
5169 [ab].out )
5170 # We found the default executable, but exeext='' is most
5171 # certainly right.
5172 break;;
5173 *.* )
5174 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
5175 then :; else
5176 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
5177 fi
5178 # We set ac_cv_exeext here because the later test for it is not
5179 # safe: cross compilers may not add the suffix if given an `-o'
5180 # argument, so we may need to know it at that point already.
5181 # Even if this section looks crufty: it has the advantage of
5182 # actually working.
5183 break;;
5184 * )
5185 break;;
5186 esac
5187done
5188test "$ac_cv_exeext" = no && ac_cv_exeext=
5189
5190else
5191 ac_file=''
5192fi
5193if test -z "$ac_file"; then :
5194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5195$as_echo "no" >&6; }
5196$as_echo "$as_me: failed program was:" >&5
5197sed 's/^/| /' conftest.$ac_ext >&5
5198
5199{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5200$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
a9bec17c
GM
5201{ as_fn_set_status 77
5202as_fn_error "C compiler cannot create executables
5203See \`config.log' for more details." "$LINENO" 5; }; }
067d23c9
KY
5204else
5205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5206$as_echo "yes" >&6; }
5207fi
5208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
5209$as_echo_n "checking for C compiler default output file name... " >&6; }
5210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
5211$as_echo "$ac_file" >&6; }
5212ac_exeext=$ac_cv_exeext
5213
5214rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
5215ac_clean_files=$ac_clean_files_save
5216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
5217$as_echo_n "checking for suffix of executables... " >&6; }
5218if { { ac_try="$ac_link"
5219case "(($ac_try" in
5220 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5221 *) ac_try_echo=$ac_try;;
5222esac
5223eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5224$as_echo "$ac_try_echo"; } >&5
5225 (eval "$ac_link") 2>&5
5226 ac_status=$?
5227 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5228 test $ac_status = 0; }; then :
5229 # If both `conftest.exe' and `conftest' are `present' (well, observable)
5230# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
5231# work properly (i.e., refer to `conftest.exe'), while it won't with
5232# `rm'.
5233for ac_file in conftest.exe conftest conftest.*; do
5234 test -f "$ac_file" || continue
5235 case $ac_file in
5236 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
5237 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
5238 break;;
5239 * ) break;;
5240 esac
5241done
5242else
5243 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5244$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
a9bec17c
GM
5245as_fn_error "cannot compute suffix of executables: cannot compile and link
5246See \`config.log' for more details." "$LINENO" 5; }
067d23c9
KY
5247fi
5248rm -f conftest conftest$ac_cv_exeext
5249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
5250$as_echo "$ac_cv_exeext" >&6; }
5251
5252rm -f conftest.$ac_ext
5253EXEEXT=$ac_cv_exeext
5254ac_exeext=$EXEEXT
5255cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5256/* end confdefs.h. */
5257#include <stdio.h>
5258int
5259main ()
5260{
5261FILE *f = fopen ("conftest.out", "w");
5262 return ferror (f) || fclose (f) != 0;
5263
5264 ;
5265 return 0;
5266}
5267_ACEOF
5268ac_clean_files="$ac_clean_files conftest.out"
5269# Check that the compiler produces executables we can run. If not, either
5270# the compiler is broken, or we cross compile.
5271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
5272$as_echo_n "checking whether we are cross compiling... " >&6; }
5273if test "$cross_compiling" != yes; then
5274 { { ac_try="$ac_link"
5275case "(($ac_try" in
5276 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5277 *) ac_try_echo=$ac_try;;
5278esac
5279eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5280$as_echo "$ac_try_echo"; } >&5
5281 (eval "$ac_link") 2>&5
5282 ac_status=$?
5283 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5284 test $ac_status = 0; }
5285 if { ac_try='./conftest$ac_cv_exeext'
5286 { { case "(($ac_try" in
5287 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5288 *) ac_try_echo=$ac_try;;
5289esac
5290eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5291$as_echo "$ac_try_echo"; } >&5
5292 (eval "$ac_try") 2>&5
5293 ac_status=$?
5294 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5295 test $ac_status = 0; }; }; then
5296 cross_compiling=no
5297 else
5298 if test "$cross_compiling" = maybe; then
5299 cross_compiling=yes
5300 else
5301 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5302$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
a9bec17c 5303as_fn_error "cannot run C compiled programs.
067d23c9 5304If you meant to cross compile, use \`--host'.
a9bec17c 5305See \`config.log' for more details." "$LINENO" 5; }
067d23c9
KY
5306 fi
5307 fi
5308fi
5309{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
5310$as_echo "$cross_compiling" >&6; }
5311
5312rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
5313ac_clean_files=$ac_clean_files_save
5314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
5315$as_echo_n "checking for suffix of object files... " >&6; }
a9bec17c 5316if test "${ac_cv_objext+set}" = set; then :
067d23c9
KY
5317 $as_echo_n "(cached) " >&6
5318else
5319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5320/* end confdefs.h. */
5321
5322int
5323main ()
5324{
5325
5326 ;
5327 return 0;
5328}
5329_ACEOF
5330rm -f conftest.o conftest.obj
5331if { { ac_try="$ac_compile"
5332case "(($ac_try" in
5333 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5334 *) ac_try_echo=$ac_try;;
5335esac
5336eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5337$as_echo "$ac_try_echo"; } >&5
5338 (eval "$ac_compile") 2>&5
5339 ac_status=$?
5340 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5341 test $ac_status = 0; }; then :
5342 for ac_file in conftest.o conftest.obj conftest.*; do
5343 test -f "$ac_file" || continue;
5344 case $ac_file in
5345 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
5346 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
5347 break;;
5348 esac
5349done
5350else
5351 $as_echo "$as_me: failed program was:" >&5
5352sed 's/^/| /' conftest.$ac_ext >&5
5353
5354{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5355$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
a9bec17c
GM
5356as_fn_error "cannot compute suffix of object files: cannot compile
5357See \`config.log' for more details." "$LINENO" 5; }
067d23c9
KY
5358fi
5359rm -f conftest.$ac_cv_objext conftest.$ac_ext
5360fi
5361{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
5362$as_echo "$ac_cv_objext" >&6; }
5363OBJEXT=$ac_cv_objext
5364ac_objext=$OBJEXT
5365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
5366$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
a9bec17c 5367if test "${ac_cv_c_compiler_gnu+set}" = set; then :
067d23c9
KY
5368 $as_echo_n "(cached) " >&6
5369else
5370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5371/* end confdefs.h. */
5372
5373int
5374main ()
5375{
5376#ifndef __GNUC__
5377 choke me
5378#endif
5379
5380 ;
5381 return 0;
5382}
5383_ACEOF
5384if ac_fn_c_try_compile "$LINENO"; then :
5385 ac_compiler_gnu=yes
5386else
5387 ac_compiler_gnu=no
5388fi
5389rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5390ac_cv_c_compiler_gnu=$ac_compiler_gnu
5391
5392fi
5393{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
5394$as_echo "$ac_cv_c_compiler_gnu" >&6; }
5395if test $ac_compiler_gnu = yes; then
5396 GCC=yes
5397else
5398 GCC=
5399fi
5400ac_test_CFLAGS=${CFLAGS+set}
5401ac_save_CFLAGS=$CFLAGS
5402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
5403$as_echo_n "checking whether $CC accepts -g... " >&6; }
a9bec17c 5404if test "${ac_cv_prog_cc_g+set}" = set; then :
067d23c9
KY
5405 $as_echo_n "(cached) " >&6
5406else
5407 ac_save_c_werror_flag=$ac_c_werror_flag
5408 ac_c_werror_flag=yes
5409 ac_cv_prog_cc_g=no
5410 CFLAGS="-g"
5411 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5412/* end confdefs.h. */
5413
5414int
5415main ()
5416{
5417
5418 ;
5419 return 0;
5420}
5421_ACEOF
5422if ac_fn_c_try_compile "$LINENO"; then :
5423 ac_cv_prog_cc_g=yes
5424else
5425 CFLAGS=""
5426 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5427/* end confdefs.h. */
5428
5429int
5430main ()
5431{
5432
5433 ;
5434 return 0;
5435}
5436_ACEOF
5437if ac_fn_c_try_compile "$LINENO"; then :
5438
5439else
5440 ac_c_werror_flag=$ac_save_c_werror_flag
5441 CFLAGS="-g"
5442 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5443/* end confdefs.h. */
5444
5445int
5446main ()
5447{
5448
5449 ;
5450 return 0;
5451}
5452_ACEOF
5453if ac_fn_c_try_compile "$LINENO"; then :
5454 ac_cv_prog_cc_g=yes
5455fi
5456rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5457fi
5458rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5459fi
5460rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5461 ac_c_werror_flag=$ac_save_c_werror_flag
5462fi
5463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
5464$as_echo "$ac_cv_prog_cc_g" >&6; }
5465if test "$ac_test_CFLAGS" = set; then
5466 CFLAGS=$ac_save_CFLAGS
5467elif test $ac_cv_prog_cc_g = yes; then
5468 if test "$GCC" = yes; then
5469 CFLAGS="-g -O2"
5470 else
5471 CFLAGS="-g"
5472 fi
5473else
5474 if test "$GCC" = yes; then
5475 CFLAGS="-O2"
5476 else
5477 CFLAGS=
5478 fi
5479fi
5480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
5481$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
a9bec17c 5482if test "${ac_cv_prog_cc_c89+set}" = set; then :
067d23c9
KY
5483 $as_echo_n "(cached) " >&6
5484else
5485 ac_cv_prog_cc_c89=no
5486ac_save_CC=$CC
5487cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5488/* end confdefs.h. */
5489#include <stdarg.h>
5490#include <stdio.h>
5491#include <sys/types.h>
5492#include <sys/stat.h>
5493/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
5494struct buf { int x; };
5495FILE * (*rcsopen) (struct buf *, struct stat *, int);
5496static char *e (p, i)
5497 char **p;
5498 int i;
5499{
5500 return p[i];
5501}
5502static char *f (char * (*g) (char **, int), char **p, ...)
5503{
5504 char *s;
5505 va_list v;
5506 va_start (v,p);
5507 s = g (p, va_arg (v,int));
5508 va_end (v);
5509 return s;
5510}
5511
5512/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
5513 function prototypes and stuff, but not '\xHH' hex character constants.
5514 These don't provoke an error unfortunately, instead are silently treated
5515 as 'x'. The following induces an error, until -std is added to get
5516 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
5517 array size at least. It's necessary to write '\x00'==0 to get something
5518 that's true only with -std. */
5519int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5520
5521/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5522 inside strings and character constants. */
5523#define FOO(x) 'x'
5524int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5525
5526int test (int i, double x);
5527struct s1 {int (*f) (int a);};
5528struct s2 {int (*f) (double a);};
5529int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5530int argc;
5531char **argv;
5532int
5533main ()
5534{
5535return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
5536 ;
5537 return 0;
5538}
5539_ACEOF
5540for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5541 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5542do
5543 CC="$ac_save_CC $ac_arg"
5544 if ac_fn_c_try_compile "$LINENO"; then :
5545 ac_cv_prog_cc_c89=$ac_arg
5546fi
5547rm -f core conftest.err conftest.$ac_objext
5548 test "x$ac_cv_prog_cc_c89" != "xno" && break
5549done
743c80a7
PE
5550rm -f conftest.$ac_ext
5551CC=$ac_save_CC
5552
5553fi
5554# AC_CACHE_VAL
5555case "x$ac_cv_prog_cc_c89" in
5556 x)
5557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5558$as_echo "none needed" >&6; } ;;
5559 xno)
5560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5561$as_echo "unsupported" >&6; } ;;
5562 *)
5563 CC="$CC $ac_cv_prog_cc_c89"
5564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5565$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
5566esac
5567if test "x$ac_cv_prog_cc_c89" != xno; then :
5568
5569fi
5570
5571ac_ext=c
5572ac_cpp='$CPP $CPPFLAGS'
5573ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5574ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5575ac_compiler_gnu=$ac_cv_c_compiler_gnu
5576DEPDIR="${am__leading_dot}deps"
5577
5578ac_config_commands="$ac_config_commands depfiles"
5579
5580
5581am_make=${MAKE-make}
5582cat > confinc << 'END'
5583am__doit:
5584 @echo this is the am__doit target
5585.PHONY: am__doit
5586END
5587# If we don't find an include directive, just comment out the code.
5588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
5589$as_echo_n "checking for style of include used by $am_make... " >&6; }
5590am__include="#"
5591am__quote=
5592_am_result=none
5593# First try GNU make style include.
5594echo "include confinc" > confmf
5595# Ignore all kinds of additional output from `make'.
5596case `$am_make -s -f confmf 2> /dev/null` in #(
5597*the\ am__doit\ target*)
5598 am__include=include
5599 am__quote=
5600 _am_result=GNU
5601 ;;
5602esac
5603# Now try BSD make style include.
5604if test "$am__include" = "#"; then
5605 echo '.include "confinc"' > confmf
5606 case `$am_make -s -f confmf 2> /dev/null` in #(
5607 *the\ am__doit\ target*)
5608 am__include=.include
5609 am__quote="\""
5610 _am_result=BSD
5611 ;;
5612 esac
5613fi
5614
5615
5616{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
5617$as_echo "$_am_result" >&6; }
5618rm -f confinc confmf
5619
5620# Check whether --enable-dependency-tracking was given.
5621if test "${enable_dependency_tracking+set}" = set; then :
5622 enableval=$enable_dependency_tracking;
5623fi
5624
5625if test "x$enable_dependency_tracking" != xno; then
5626 am_depcomp="$ac_aux_dir/depcomp"
5627 AMDEPBACKSLASH='\'
5628fi
5629 if test "x$enable_dependency_tracking" != xno; then
5630 AMDEP_TRUE=
5631 AMDEP_FALSE='#'
5632else
5633 AMDEP_TRUE='#'
5634 AMDEP_FALSE=
5635fi
5636
5637
5638
5639depcc="$CC" am_compiler_list=
5640
5641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
5642$as_echo_n "checking dependency style of $depcc... " >&6; }
a9bec17c 5643if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
743c80a7
PE
5644 $as_echo_n "(cached) " >&6
5645else
5646 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
5647 # We make a subdir and do the tests there. Otherwise we can end up
5648 # making bogus files that we don't know about and never remove. For
5649 # instance it was reported that on HP-UX the gcc test will end up
5650 # making a dummy file named `D' -- because `-MD' means `put the output
5651 # in D'.
5652 mkdir conftest.dir
5653 # Copy depcomp to subdir because otherwise we won't find it if we're
5654 # using a relative directory.
5655 cp "$am_depcomp" conftest.dir
5656 cd conftest.dir
5657 # We will build objects and dependencies in a subdirectory because
5658 # it helps to detect inapplicable dependency modes. For instance
5659 # both Tru64's cc and ICC support -MD to output dependencies as a
5660 # side effect of compilation, but ICC will put the dependencies in
5661 # the current directory while Tru64 will put them in the object
5662 # directory.
5663 mkdir sub
5664
5665 am_cv_CC_dependencies_compiler_type=none
5666 if test "$am_compiler_list" = ""; then
5667 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5668 fi
5669 am__universal=false
5670 case " $depcc " in #(
5671 *\ -arch\ *\ -arch\ *) am__universal=true ;;
5672 esac
5673
5674 for depmode in $am_compiler_list; do
5675 # Setup a source with many dependencies, because some compilers
5676 # like to wrap large dependency lists on column 80 (with \), and
5677 # we should not choose a depcomp mode which is confused by this.
5678 #
5679 # We need to recreate these files for each test, as the compiler may
5680 # overwrite some of them when testing with obscure command lines.
5681 # This happens at least with the AIX C compiler.
5682 : > sub/conftest.c
5683 for i in 1 2 3 4 5 6; do
5684 echo '#include "conftst'$i'.h"' >> sub/conftest.c
5685 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
5686 # Solaris 8's {/usr,}/bin/sh.
5687 touch sub/conftst$i.h
5688 done
5689 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
5690
5691 # We check with `-c' and `-o' for the sake of the "dashmstdout"
5692 # mode. It turns out that the SunPro C++ compiler does not properly
5693 # handle `-M -o', and we need to detect this. Also, some Intel
5694 # versions had trouble with output in subdirs
5695 am__obj=sub/conftest.${OBJEXT-o}
5696 am__minus_obj="-o $am__obj"
5697 case $depmode in
5698 gcc)
5699 # This depmode causes a compiler race in universal mode.
5700 test "$am__universal" = false || continue
5701 ;;
5702 nosideeffect)
5703 # after this tag, mechanisms are not by side-effect, so they'll
5704 # only be used when explicitly requested
5705 if test "x$enable_dependency_tracking" = xyes; then
5706 continue
5707 else
5708 break
5709 fi
5710 ;;
5711 msvisualcpp | msvcmsys)
5712 # This compiler won't grok `-c -o', but also, the minuso test has
5713 # not run yet. These depmodes are late enough in the game, and
5714 # so weak that their functioning should not be impacted.
5715 am__obj=conftest.${OBJEXT-o}
5716 am__minus_obj=
5717 ;;
5718 none) break ;;
5719 esac
5720 if depmode=$depmode \
5721 source=sub/conftest.c object=$am__obj \
5722 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
5723 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
5724 >/dev/null 2>conftest.err &&
5725 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
5726 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
5727 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
5728 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
5729 # icc doesn't choke on unknown options, it will just issue warnings
5730 # or remarks (even with -Werror). So we grep stderr for any message
5731 # that says an option was ignored or not supported.
5732 # When given -MP, icc 7.0 and 7.1 complain thusly:
5733 # icc: Command line warning: ignoring option '-M'; no argument required
5734 # The diagnosis changed in icc 8.0:
5735 # icc: Command line remark: option '-MP' not supported
5736 if (grep 'ignoring option' conftest.err ||
5737 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
5738 am_cv_CC_dependencies_compiler_type=$depmode
5739 break
5740 fi
5741 fi
5742 done
5743
5744 cd ..
5745 rm -rf conftest.dir
5746else
5747 am_cv_CC_dependencies_compiler_type=none
5748fi
5749
5750fi
5751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
5752$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
5753CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
5754
5755 if
5756 test "x$enable_dependency_tracking" != xno \
5757 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
5758 am__fastdepCC_TRUE=
5759 am__fastdepCC_FALSE='#'
5760else
5761 am__fastdepCC_TRUE='#'
5762 am__fastdepCC_FALSE=
5763fi
5764
5765
5766if test "x$CC" != xcc; then
5767 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5
5768$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
5769else
5770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5
5771$as_echo_n "checking whether cc understands -c and -o together... " >&6; }
5772fi
5773set dummy $CC; ac_cc=`$as_echo "$2" |
5774 sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
a9bec17c 5775if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then :
743c80a7
PE
5776 $as_echo_n "(cached) " >&6
5777else
5778 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5779/* end confdefs.h. */
5780
5781int
5782main ()
5783{
5784
5785 ;
5786 return 0;
5787}
5788_ACEOF
5789# Make sure it works both with $CC and with simple cc.
5790# We do the test twice because some compilers refuse to overwrite an
5791# existing .o file with -o, though they will create one.
5792ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
5793rm -f conftest2.*
5794if { { case "(($ac_try" in
5795 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5796 *) ac_try_echo=$ac_try;;
5797esac
5798eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5799$as_echo "$ac_try_echo"; } >&5
5800 (eval "$ac_try") 2>&5
5801 ac_status=$?
5802 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5803 test $ac_status = 0; } &&
5804 test -f conftest2.$ac_objext && { { case "(($ac_try" in
5805 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5806 *) ac_try_echo=$ac_try;;
5807esac
5808eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5809$as_echo "$ac_try_echo"; } >&5
5810 (eval "$ac_try") 2>&5
5811 ac_status=$?
5812 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5813 test $ac_status = 0; };
5814then
5815 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
5816 if test "x$CC" != xcc; then
5817 # Test first that cc exists at all.
5818 if { ac_try='cc -c conftest.$ac_ext >&5'
5819 { { case "(($ac_try" in
5820 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5821 *) ac_try_echo=$ac_try;;
5822esac
5823eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5824$as_echo "$ac_try_echo"; } >&5
5825 (eval "$ac_try") 2>&5
5826 ac_status=$?
5827 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5828 test $ac_status = 0; }; }; then
5829 ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
5830 rm -f conftest2.*
5831 if { { case "(($ac_try" in
5832 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5833 *) ac_try_echo=$ac_try;;
5834esac
5835eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5836$as_echo "$ac_try_echo"; } >&5
5837 (eval "$ac_try") 2>&5
5838 ac_status=$?
5839 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5840 test $ac_status = 0; } &&
5841 test -f conftest2.$ac_objext && { { case "(($ac_try" in
5842 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5843 *) ac_try_echo=$ac_try;;
5844esac
5845eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5846$as_echo "$ac_try_echo"; } >&5
5847 (eval "$ac_try") 2>&5
5848 ac_status=$?
5849 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5850 test $ac_status = 0; };
5851 then
5852 # cc works too.
5853 :
5854 else
5855 # cc exists but doesn't like -o.
5856 eval ac_cv_prog_cc_${ac_cc}_c_o=no
5857 fi
5858 fi
5859 fi
5860else
5861 eval ac_cv_prog_cc_${ac_cc}_c_o=no
5862fi
5863rm -f core conftest*
5864
5865fi
5866if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
5867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5868$as_echo "yes" >&6; }
5869else
5870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5871$as_echo "no" >&6; }
5872
5873$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h
5874
5875fi
5876
5877# FIXME: we rely on the cache variable name because
5878# there is no other way.
5879set dummy $CC
5880am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
5881eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
5882if test "$am_t" != yes; then
5883 # Losing compiler, so override with the script.
5884 # FIXME: It is wrong to rewrite CC.
5885 # But if we don't then we get into trouble of one sort or another.
5886 # A longer-term fix would be to have automake use am__CC in this case,
5887 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
5888 CC="$am_aux_dir/compile $CC"
5889fi
5890
5891
5892
5ec54608
GM
5893if test x$GCC = xyes; then
5894 test "x$GCC_TEST_OPTIONS" != x && CC="$CC $GCC_TEST_OPTIONS"
5895else
5896 test "x$NON_GCC_TEST_OPTIONS" != x && CC="$CC $NON_GCC_TEST_OPTIONS"
5897fi
5898
710f5812
GM
5899# Avoid gnulib's tests for O_NOATIME and O_NOFOLLOW, as we don't use them.
5900
f077f61d
GM
5901# Avoid gnulib's threadlib module, as we do threads our own way.
5902
5903
5ec54608 5904# Initialize gnulib right after choosing the compiler.
743c80a7 5905
067d23c9
KY
5906ac_ext=c
5907ac_cpp='$CPP $CPPFLAGS'
5908ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5909ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5910ac_compiler_gnu=$ac_cv_c_compiler_gnu
5911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
5912$as_echo_n "checking how to run the C preprocessor... " >&6; }
5913# On Suns, sometimes $CPP names a directory.
5914if test -n "$CPP" && test -d "$CPP"; then
5915 CPP=
5916fi
5917if test -z "$CPP"; then
a9bec17c 5918 if test "${ac_cv_prog_CPP+set}" = set; then :
067d23c9
KY
5919 $as_echo_n "(cached) " >&6
5920else
5921 # Double quotes because CPP needs to be expanded
5922 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
5923 do
5924 ac_preproc_ok=false
5925for ac_c_preproc_warn_flag in '' yes
5926do
5927 # Use a header file that comes with gcc, so configuring glibc
5928 # with a fresh cross-compiler works.
5929 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5930 # <limits.h> exists even on freestanding compilers.
5931 # On the NeXT, cc -E runs the code through the compiler's parser,
5932 # not just through cpp. "Syntax error" is here to catch this case.
5933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5934/* end confdefs.h. */
5935#ifdef __STDC__
5936# include <limits.h>
5937#else
5938# include <assert.h>
5939#endif
5940 Syntax error
5941_ACEOF
5942if ac_fn_c_try_cpp "$LINENO"; then :
5943
5944else
5945 # Broken: fails on valid input.
5946continue
5947fi
a9bec17c 5948rm -f conftest.err conftest.$ac_ext
067d23c9
KY
5949
5950 # OK, works on sane cases. Now check whether nonexistent headers
5951 # can be detected and how.
5952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5953/* end confdefs.h. */
5954#include <ac_nonexistent.h>
5955_ACEOF
5956if ac_fn_c_try_cpp "$LINENO"; then :
5957 # Broken: success on invalid input.
5958continue
5959else
5960 # Passes both tests.
5961ac_preproc_ok=:
5962break
5963fi
a9bec17c 5964rm -f conftest.err conftest.$ac_ext
067d23c9
KY
5965
5966done
5967# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
a9bec17c 5968rm -f conftest.err conftest.$ac_ext
067d23c9
KY
5969if $ac_preproc_ok; then :
5970 break
5971fi
5972
5973 done
5974 ac_cv_prog_CPP=$CPP
5975
5976fi
5977 CPP=$ac_cv_prog_CPP
5978else
5979 ac_cv_prog_CPP=$CPP
5980fi
5981{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
5982$as_echo "$CPP" >&6; }
5983ac_preproc_ok=false
5984for ac_c_preproc_warn_flag in '' yes
5985do
5986 # Use a header file that comes with gcc, so configuring glibc
5987 # with a fresh cross-compiler works.
5988 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5989 # <limits.h> exists even on freestanding compilers.
5990 # On the NeXT, cc -E runs the code through the compiler's parser,
5991 # not just through cpp. "Syntax error" is here to catch this case.
5992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5993/* end confdefs.h. */
5994#ifdef __STDC__
5995# include <limits.h>
5996#else
5997# include <assert.h>
5998#endif
5999 Syntax error
6000_ACEOF
6001if ac_fn_c_try_cpp "$LINENO"; then :
6002
6003else
6004 # Broken: fails on valid input.
6005continue
6006fi
a9bec17c 6007rm -f conftest.err conftest.$ac_ext
067d23c9
KY
6008
6009 # OK, works on sane cases. Now check whether nonexistent headers
6010 # can be detected and how.
6011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6012/* end confdefs.h. */
6013#include <ac_nonexistent.h>
6014_ACEOF
6015if ac_fn_c_try_cpp "$LINENO"; then :
6016 # Broken: success on invalid input.
6017continue
6018else
6019 # Passes both tests.
6020ac_preproc_ok=:
6021break
6022fi
a9bec17c 6023rm -f conftest.err conftest.$ac_ext
067d23c9
KY
6024
6025done
6026# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
a9bec17c 6027rm -f conftest.err conftest.$ac_ext
067d23c9
KY
6028if $ac_preproc_ok; then :
6029
6030else
6031 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6032$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
a9bec17c
GM
6033as_fn_error "C preprocessor \"$CPP\" fails sanity check
6034See \`config.log' for more details." "$LINENO" 5; }
067d23c9
KY
6035fi
6036
6037ac_ext=c
6038ac_cpp='$CPP $CPPFLAGS'
6039ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6040ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6041ac_compiler_gnu=$ac_cv_c_compiler_gnu
6042
6043
6044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6045$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
a9bec17c 6046if test "${ac_cv_path_GREP+set}" = set; then :
067d23c9
KY
6047 $as_echo_n "(cached) " >&6
6048else
6049 if test -z "$GREP"; then
6050 ac_path_GREP_found=false
6051 # Loop through the user's path and test for each of PROGNAME-LIST
6052 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6053for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6054do
6055 IFS=$as_save_IFS
6056 test -z "$as_dir" && as_dir=.
6057 for ac_prog in grep ggrep; do
6058 for ac_exec_ext in '' $ac_executable_extensions; do
6059 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6060 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
6061# Check for GNU ac_path_GREP and select it if it is found.
6062 # Check for GNU $ac_path_GREP
6063case `"$ac_path_GREP" --version 2>&1` in
6064*GNU*)
6065 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6066*)
6067 ac_count=0
6068 $as_echo_n 0123456789 >"conftest.in"
6069 while :
6070 do
6071 cat "conftest.in" "conftest.in" >"conftest.tmp"
6072 mv "conftest.tmp" "conftest.in"
6073 cp "conftest.in" "conftest.nl"
6074 $as_echo 'GREP' >> "conftest.nl"
6075 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6076 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6077 as_fn_arith $ac_count + 1 && ac_count=$as_val
6078 if test $ac_count -gt ${ac_path_GREP_max-0}; then
6079 # Best one so far, save it but keep looking for a better one
6080 ac_cv_path_GREP="$ac_path_GREP"
6081 ac_path_GREP_max=$ac_count
6082 fi
6083 # 10*(2^10) chars as input seems more than enough
6084 test $ac_count -gt 10 && break
6085 done
6086 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6087esac
6088
6089 $ac_path_GREP_found && break 3
6090 done
6091 done
6092 done
6093IFS=$as_save_IFS
6094 if test -z "$ac_cv_path_GREP"; then
a9bec17c 6095 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
067d23c9
KY
6096 fi
6097else
6098 ac_cv_path_GREP=$GREP
6099fi
6100
6101fi
6102{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6103$as_echo "$ac_cv_path_GREP" >&6; }
6104 GREP="$ac_cv_path_GREP"
6105
6106
6107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6108$as_echo_n "checking for egrep... " >&6; }
a9bec17c 6109if test "${ac_cv_path_EGREP+set}" = set; then :
067d23c9
KY
6110 $as_echo_n "(cached) " >&6
6111else
6112 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6113 then ac_cv_path_EGREP="$GREP -E"
6114 else
6115 if test -z "$EGREP"; then
6116 ac_path_EGREP_found=false
6117 # Loop through the user's path and test for each of PROGNAME-LIST
6118 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6119for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6120do
6121 IFS=$as_save_IFS
6122 test -z "$as_dir" && as_dir=.
6123 for ac_prog in egrep; do
6124 for ac_exec_ext in '' $ac_executable_extensions; do
6125 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6126 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
6127# Check for GNU ac_path_EGREP and select it if it is found.
6128 # Check for GNU $ac_path_EGREP
6129case `"$ac_path_EGREP" --version 2>&1` in
6130*GNU*)
6131 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6132*)
6133 ac_count=0
6134 $as_echo_n 0123456789 >"conftest.in"
6135 while :
6136 do
6137 cat "conftest.in" "conftest.in" >"conftest.tmp"
6138 mv "conftest.tmp" "conftest.in"
6139 cp "conftest.in" "conftest.nl"
6140 $as_echo 'EGREP' >> "conftest.nl"
6141 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6142 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6143 as_fn_arith $ac_count + 1 && ac_count=$as_val
6144 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6145 # Best one so far, save it but keep looking for a better one
6146 ac_cv_path_EGREP="$ac_path_EGREP"
6147 ac_path_EGREP_max=$ac_count
6148 fi
6149 # 10*(2^10) chars as input seems more than enough
6150 test $ac_count -gt 10 && break
6151 done
6152 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6153esac
6154
6155 $ac_path_EGREP_found && break 3
6156 done
6157 done
6158 done
6159IFS=$as_save_IFS
6160 if test -z "$ac_cv_path_EGREP"; then
a9bec17c 6161 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
067d23c9
KY
6162 fi
6163else
6164 ac_cv_path_EGREP=$EGREP
6165fi
6166
6167 fi
6168fi
6169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6170$as_echo "$ac_cv_path_EGREP" >&6; }
6171 EGREP="$ac_cv_path_EGREP"
6172
6173
369e19fc
PE
6174
6175
6176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
6177$as_echo_n "checking for Minix Amsterdam compiler... " >&6; }
a9bec17c 6178if test "${gl_cv_c_amsterdam_compiler+set}" = set; then :
369e19fc
PE
6179 $as_echo_n "(cached) " >&6
6180else
6181
6182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6183/* end confdefs.h. */
6184
6185#ifdef __ACK__
6186Amsterdam
6187#endif
6188
6189_ACEOF
6190if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6191 $EGREP "Amsterdam" >/dev/null 2>&1; then :
6192 gl_cv_c_amsterdam_compiler=yes
6193else
6194 gl_cv_c_amsterdam_compiler=no
6195fi
6196rm -f conftest*
6197
6198
6199fi
6200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
6201$as_echo "$gl_cv_c_amsterdam_compiler" >&6; }
6202 if test -z "$AR"; then
6203 if test $gl_cv_c_amsterdam_compiler = yes; then
6204 AR='cc -c.a'
6205 if test -z "$ARFLAGS"; then
6206 ARFLAGS='-o'
6207 fi
6208 else
6209 if test -n "$ac_tool_prefix"; then
6210 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6211set dummy ${ac_tool_prefix}ar; ac_word=$2
6212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6213$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 6214if test "${ac_cv_prog_AR+set}" = set; then :
369e19fc
PE
6215 $as_echo_n "(cached) " >&6
6216else
6217 if test -n "$AR"; then
6218 ac_cv_prog_AR="$AR" # Let the user override the test.
6219else
6220as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6221for as_dir in $PATH
6222do
6223 IFS=$as_save_IFS
6224 test -z "$as_dir" && as_dir=.
6225 for ac_exec_ext in '' $ac_executable_extensions; do
6226 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6227 ac_cv_prog_AR="${ac_tool_prefix}ar"
6228 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6229 break 2
6230 fi
6231done
6232 done
6233IFS=$as_save_IFS
6234
6235fi
6236fi
6237AR=$ac_cv_prog_AR
6238if test -n "$AR"; then
6239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6240$as_echo "$AR" >&6; }
6241else
6242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6243$as_echo "no" >&6; }
6244fi
6245
6246
6247fi
6248if test -z "$ac_cv_prog_AR"; then
6249 ac_ct_AR=$AR
6250 # Extract the first word of "ar", so it can be a program name with args.
6251set dummy ar; ac_word=$2
6252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6253$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 6254if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
369e19fc
PE
6255 $as_echo_n "(cached) " >&6
6256else
6257 if test -n "$ac_ct_AR"; then
6258 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6259else
6260as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6261for as_dir in $PATH
6262do
6263 IFS=$as_save_IFS
6264 test -z "$as_dir" && as_dir=.
6265 for ac_exec_ext in '' $ac_executable_extensions; do
6266 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6267 ac_cv_prog_ac_ct_AR="ar"
6268 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6269 break 2
6270 fi
6271done
6272 done
6273IFS=$as_save_IFS
6274
6275fi
6276fi
6277ac_ct_AR=$ac_cv_prog_ac_ct_AR
6278if test -n "$ac_ct_AR"; then
6279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6280$as_echo "$ac_ct_AR" >&6; }
6281else
6282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6283$as_echo "no" >&6; }
6284fi
6285
6286 if test "x$ac_ct_AR" = x; then
6287 AR="ar"
6288 else
6289 case $cross_compiling:$ac_tool_warned in
6290yes:)
6291{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6292$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6293ac_tool_warned=yes ;;
6294esac
6295 AR=$ac_ct_AR
6296 fi
6297else
6298 AR="$ac_cv_prog_AR"
6299fi
6300
6301 if test -z "$ARFLAGS"; then
6302 ARFLAGS='cru'
6303 fi
6304 fi
6305 else
6306 if test -z "$ARFLAGS"; then
6307 ARFLAGS='cru'
6308 fi
6309 fi
6310
6311
6312 if test -z "$RANLIB"; then
6313 if test $gl_cv_c_amsterdam_compiler = yes; then
6314 RANLIB=':'
6315 else
6316 if test -n "$ac_tool_prefix"; then
6317 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6318set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6320$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 6321if test "${ac_cv_prog_RANLIB+set}" = set; then :
369e19fc
PE
6322 $as_echo_n "(cached) " >&6
6323else
6324 if test -n "$RANLIB"; then
6325 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6326else
6327as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6328for as_dir in $PATH
6329do
6330 IFS=$as_save_IFS
6331 test -z "$as_dir" && as_dir=.
6332 for ac_exec_ext in '' $ac_executable_extensions; do
6333 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6334 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6335 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6336 break 2
6337 fi
6338done
6339 done
6340IFS=$as_save_IFS
6341
6342fi
6343fi
6344RANLIB=$ac_cv_prog_RANLIB
6345if test -n "$RANLIB"; then
6346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6347$as_echo "$RANLIB" >&6; }
6348else
6349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6350$as_echo "no" >&6; }
6351fi
6352
6353
6354fi
6355if test -z "$ac_cv_prog_RANLIB"; then
6356 ac_ct_RANLIB=$RANLIB
6357 # Extract the first word of "ranlib", so it can be a program name with args.
6358set dummy ranlib; ac_word=$2
6359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6360$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 6361if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
369e19fc
PE
6362 $as_echo_n "(cached) " >&6
6363else
6364 if test -n "$ac_ct_RANLIB"; then
6365 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6366else
6367as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6368for as_dir in $PATH
6369do
6370 IFS=$as_save_IFS
6371 test -z "$as_dir" && as_dir=.
6372 for ac_exec_ext in '' $ac_executable_extensions; do
6373 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6374 ac_cv_prog_ac_ct_RANLIB="ranlib"
6375 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6376 break 2
6377 fi
6378done
6379 done
6380IFS=$as_save_IFS
6381
6382fi
6383fi
6384ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6385if test -n "$ac_ct_RANLIB"; then
6386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6387$as_echo "$ac_ct_RANLIB" >&6; }
6388else
6389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6390$as_echo "no" >&6; }
6391fi
6392
6393 if test "x$ac_ct_RANLIB" = x; then
6394 RANLIB=":"
6395 else
6396 case $cross_compiling:$ac_tool_warned in
6397yes:)
6398{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6399$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6400ac_tool_warned=yes ;;
6401esac
6402 RANLIB=$ac_ct_RANLIB
6403 fi
6404else
6405 RANLIB="$ac_cv_prog_RANLIB"
6406fi
6407
6408 fi
6409 fi
6410
6411
067d23c9
KY
6412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6413$as_echo_n "checking for ANSI C header files... " >&6; }
a9bec17c 6414if test "${ac_cv_header_stdc+set}" = set; then :
067d23c9
KY
6415 $as_echo_n "(cached) " >&6
6416else
6417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6418/* end confdefs.h. */
6419#include <stdlib.h>
6420#include <stdarg.h>
6421#include <string.h>
6422#include <float.h>
6423
6424int
6425main ()
6426{
6427
6428 ;
6429 return 0;
6430}
6431_ACEOF
6432if ac_fn_c_try_compile "$LINENO"; then :
6433 ac_cv_header_stdc=yes
6434else
6435 ac_cv_header_stdc=no
6436fi
6437rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6438
6439if test $ac_cv_header_stdc = yes; then
6440 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6441 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6442/* end confdefs.h. */
6443#include <string.h>
6444
6445_ACEOF
6446if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6447 $EGREP "memchr" >/dev/null 2>&1; then :
6448
6449else
6450 ac_cv_header_stdc=no
6451fi
6452rm -f conftest*
6453
6454fi
6455
6456if test $ac_cv_header_stdc = yes; then
6457 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6459/* end confdefs.h. */
6460#include <stdlib.h>
6461
6462_ACEOF
6463if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6464 $EGREP "free" >/dev/null 2>&1; then :
6465
6466else
6467 ac_cv_header_stdc=no
6468fi
6469rm -f conftest*
6470
6471fi
6472
6473if test $ac_cv_header_stdc = yes; then
6474 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6475 if test "$cross_compiling" = yes; then :
6476 :
6477else
6478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6479/* end confdefs.h. */
6480#include <ctype.h>
6481#include <stdlib.h>
6482#if ((' ' & 0x0FF) == 0x020)
6483# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6484# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6485#else
6486# define ISLOWER(c) \
6487 (('a' <= (c) && (c) <= 'i') \
6488 || ('j' <= (c) && (c) <= 'r') \
6489 || ('s' <= (c) && (c) <= 'z'))
6490# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6491#endif
6492
6493#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6494int
6495main ()
6496{
6497 int i;
6498 for (i = 0; i < 256; i++)
6499 if (XOR (islower (i), ISLOWER (i))
6500 || toupper (i) != TOUPPER (i))
6501 return 2;
6502 return 0;
6503}
6504_ACEOF
6505if ac_fn_c_try_run "$LINENO"; then :
6506
6507else
6508 ac_cv_header_stdc=no
6509fi
6510rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6511 conftest.$ac_objext conftest.beam conftest.$ac_ext
6512fi
6513
6514fi
6515fi
6516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6517$as_echo "$ac_cv_header_stdc" >&6; }
6518if test $ac_cv_header_stdc = yes; then
6519
6520$as_echo "#define STDC_HEADERS 1" >>confdefs.h
6521
6522fi
6523
6524# On IRIX 5.3, sys/types and inttypes.h are conflicting.
6525for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
6526 inttypes.h stdint.h unistd.h
6527do :
6528 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6529ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
6530"
a9bec17c
GM
6531eval as_val=\$$as_ac_Header
6532 if test "x$as_val" = x""yes; then :
067d23c9
KY
6533 cat >>confdefs.h <<_ACEOF
6534#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6535_ACEOF
6536
6537fi
6538
6539done
6540
6541
6542
6543 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
a9bec17c 6544if test "x$ac_cv_header_minix_config_h" = x""yes; then :
067d23c9
KY
6545 MINIX=yes
6546else
6547 MINIX=
6548fi
6549
6550
6551 if test "$MINIX" = yes; then
6552
6553$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
6554
6555
6556$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
6557
6558
6559$as_echo "#define _MINIX 1" >>confdefs.h
6560
1fd182f0 6561
2cdd55fc 6562$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
1fd182f0 6563
2cdd55fc 6564 fi
1fd182f0 6565
067d23c9
KY
6566
6567 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
6568$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
a9bec17c 6569if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
067d23c9
KY
6570 $as_echo_n "(cached) " >&6
6571else
6572 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6573/* end confdefs.h. */
369e19fc
PE
6574
6575# define __EXTENSIONS__ 1
6576 $ac_includes_default
6577int
6578main ()
6579{
6580
6581 ;
6582 return 0;
6583}
6584_ACEOF
6585if ac_fn_c_try_compile "$LINENO"; then :
6586 ac_cv_safe_to_define___extensions__=yes
6587else
6588 ac_cv_safe_to_define___extensions__=no
6589fi
6590rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6591fi
6592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
6593$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
6594 test $ac_cv_safe_to_define___extensions__ = yes &&
6595 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
6596
6597 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
6598
6599 $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
6600
6601 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
6602
6603 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
6604
6605 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
6606
2cdd55fc
GM
6607 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
6608$as_echo_n "checking whether _XOPEN_SOURCE should be defined... " >&6; }
6609if test "${ac_cv_should_define__xopen_source+set}" = set; then :
6610 $as_echo_n "(cached) " >&6
6611else
6612 ac_cv_should_define__xopen_source=no
6613 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6614/* end confdefs.h. */
6615
6616 #include <wchar.h>
6617 mbstate_t x;
6618int
6619main ()
6620{
6621
6622 ;
6623 return 0;
6624}
6625_ACEOF
6626if ac_fn_c_try_compile "$LINENO"; then :
6627
6628else
6629 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6630/* end confdefs.h. */
6631
6632 #define _XOPEN_SOURCE 500
6633 #include <wchar.h>
6634 mbstate_t x;
6635int
6636main ()
6637{
6638
6639 ;
6640 return 0;
6641}
6642_ACEOF
6643if ac_fn_c_try_compile "$LINENO"; then :
6644 ac_cv_should_define__xopen_source=yes
6645fi
6646rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6647fi
6648rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6649fi
6650{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
6651$as_echo "$ac_cv_should_define__xopen_source" >&6; }
6652 test $ac_cv_should_define__xopen_source = yes &&
6653 $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
6654
369e19fc
PE
6655
6656
6657
6658
6659
6660
6661
6662# Check whether --enable-largefile was given.
6663if test "${enable_largefile+set}" = set; then :
6664 enableval=$enable_largefile;
6665fi
6666
6667if test "$enable_largefile" != no; then
6668
6669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
6670$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
a9bec17c 6671if test "${ac_cv_sys_largefile_CC+set}" = set; then :
369e19fc
PE
6672 $as_echo_n "(cached) " >&6
6673else
6674 ac_cv_sys_largefile_CC=no
6675 if test "$GCC" != yes; then
6676 ac_save_CC=$CC
6677 while :; do
6678 # IRIX 6.2 and later do not support large files by default,
6679 # so use the C compiler's -n32 option if that helps.
6680 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6681/* end confdefs.h. */
6682#include <sys/types.h>
6683 /* Check that off_t can represent 2**63 - 1 correctly.
6684 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6685 since some C++ compilers masquerading as C compilers
6686 incorrectly reject 9223372036854775807. */
6687#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6688 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6689 && LARGE_OFF_T % 2147483647 == 1)
6690 ? 1 : -1];
6691int
6692main ()
6693{
6694
6695 ;
6696 return 0;
6697}
6698_ACEOF
6699 if ac_fn_c_try_compile "$LINENO"; then :
6700 break
6701fi
6702rm -f core conftest.err conftest.$ac_objext
6703 CC="$CC -n32"
6704 if ac_fn_c_try_compile "$LINENO"; then :
6705 ac_cv_sys_largefile_CC=' -n32'; break
6706fi
6707rm -f core conftest.err conftest.$ac_objext
6708 break
6709 done
6710 CC=$ac_save_CC
6711 rm -f conftest.$ac_ext
6712 fi
6713fi
6714{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
6715$as_echo "$ac_cv_sys_largefile_CC" >&6; }
6716 if test "$ac_cv_sys_largefile_CC" != no; then
6717 CC=$CC$ac_cv_sys_largefile_CC
6718 fi
6719
6720 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
6721$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
a9bec17c 6722if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
369e19fc
PE
6723 $as_echo_n "(cached) " >&6
6724else
6725 while :; do
6726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6727/* end confdefs.h. */
6728#include <sys/types.h>
6729 /* Check that off_t can represent 2**63 - 1 correctly.
6730 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6731 since some C++ compilers masquerading as C compilers
6732 incorrectly reject 9223372036854775807. */
6733#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6734 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6735 && LARGE_OFF_T % 2147483647 == 1)
6736 ? 1 : -1];
6737int
6738main ()
6739{
6740
6741 ;
6742 return 0;
6743}
6744_ACEOF
6745if ac_fn_c_try_compile "$LINENO"; then :
6746 ac_cv_sys_file_offset_bits=no; break
6747fi
6748rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6749 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6750/* end confdefs.h. */
6751#define _FILE_OFFSET_BITS 64
6752#include <sys/types.h>
6753 /* Check that off_t can represent 2**63 - 1 correctly.
6754 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6755 since some C++ compilers masquerading as C compilers
6756 incorrectly reject 9223372036854775807. */
6757#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6758 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6759 && LARGE_OFF_T % 2147483647 == 1)
6760 ? 1 : -1];
6761int
6762main ()
6763{
6764
6765 ;
6766 return 0;
6767}
6768_ACEOF
6769if ac_fn_c_try_compile "$LINENO"; then :
6770 ac_cv_sys_file_offset_bits=64; break
6771fi
6772rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6773 ac_cv_sys_file_offset_bits=unknown
6774 break
6775done
6776fi
6777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
6778$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
6779case $ac_cv_sys_file_offset_bits in #(
6780 no | unknown) ;;
6781 *)
6782cat >>confdefs.h <<_ACEOF
6783#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
6784_ACEOF
6785;;
6786esac
6787rm -rf conftest*
6788 if test $ac_cv_sys_file_offset_bits = unknown; then
6789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
6790$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
a9bec17c 6791if test "${ac_cv_sys_large_files+set}" = set; then :
369e19fc
PE
6792 $as_echo_n "(cached) " >&6
6793else
6794 while :; do
6795 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6796/* end confdefs.h. */
6797#include <sys/types.h>
6798 /* Check that off_t can represent 2**63 - 1 correctly.
6799 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6800 since some C++ compilers masquerading as C compilers
6801 incorrectly reject 9223372036854775807. */
6802#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6803 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6804 && LARGE_OFF_T % 2147483647 == 1)
6805 ? 1 : -1];
6806int
6807main ()
6808{
6809
6810 ;
6811 return 0;
6812}
6813_ACEOF
6814if ac_fn_c_try_compile "$LINENO"; then :
6815 ac_cv_sys_large_files=no; break
6816fi
6817rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6819/* end confdefs.h. */
6820#define _LARGE_FILES 1
6821#include <sys/types.h>
6822 /* Check that off_t can represent 2**63 - 1 correctly.
6823 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6824 since some C++ compilers masquerading as C compilers
6825 incorrectly reject 9223372036854775807. */
6826#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6827 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6828 && LARGE_OFF_T % 2147483647 == 1)
6829 ? 1 : -1];
067d23c9
KY
6830int
6831main ()
6832{
6833
6834 ;
6835 return 0;
6836}
6837_ACEOF
6838if ac_fn_c_try_compile "$LINENO"; then :
369e19fc 6839 ac_cv_sys_large_files=1; break
067d23c9
KY
6840fi
6841rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
369e19fc
PE
6842 ac_cv_sys_large_files=unknown
6843 break
6844done
067d23c9 6845fi
369e19fc
PE
6846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
6847$as_echo "$ac_cv_sys_large_files" >&6; }
6848case $ac_cv_sys_large_files in #(
6849 no | unknown) ;;
6850 *)
6851cat >>confdefs.h <<_ACEOF
6852#define _LARGE_FILES $ac_cv_sys_large_files
6853_ACEOF
6854;;
6855esac
6856rm -rf conftest*
6857 fi
1fd182f0
PE
6858
6859
858c7150
GM
6860$as_echo "#define _DARWIN_USE_64_BIT_INODE 1" >>confdefs.h
6861
369e19fc 6862fi
1fd182f0 6863
6d153f56
GM
6864 case $ac_cv_prog_cc_stdc in #(
6865 no) :
6866 ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; #(
6867 *) :
6868 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
6869$as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
a9bec17c 6870if test "${ac_cv_prog_cc_c99+set}" = set; then :
6d153f56
GM
6871 $as_echo_n "(cached) " >&6
6872else
6873 ac_cv_prog_cc_c99=no
6874ac_save_CC=$CC
6875cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6876/* end confdefs.h. */
6877#include <stdarg.h>
6878#include <stdbool.h>
6879#include <stdlib.h>
6880#include <wchar.h>
6881#include <stdio.h>
6882
6883// Check varargs macros. These examples are taken from C99 6.10.3.5.
6884#define debug(...) fprintf (stderr, __VA_ARGS__)
6885#define showlist(...) puts (#__VA_ARGS__)
6886#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
6887static void
6888test_varargs_macros (void)
6889{
6890 int x = 1234;
6891 int y = 5678;
6892 debug ("Flag");
6893 debug ("X = %d\n", x);
6894 showlist (The first, second, and third items.);
6895 report (x>y, "x is %d but y is %d", x, y);
6896}
6897
6898// Check long long types.
6899#define BIG64 18446744073709551615ull
6900#define BIG32 4294967295ul
6901#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
6902#if !BIG_OK
6903 your preprocessor is broken;
6904#endif
6905#if BIG_OK
6906#else
6907 your preprocessor is broken;
6908#endif
6909static long long int bignum = -9223372036854775807LL;
6910static unsigned long long int ubignum = BIG64;
6911
6912struct incomplete_array
6913{
6914 int datasize;
6915 double data[];
6916};
6917
6918struct named_init {
6919 int number;
6920 const wchar_t *name;
6921 double average;
6922};
6923
6924typedef const char *ccp;
6925
6926static inline int
6927test_restrict (ccp restrict text)
6928{
6929 // See if C++-style comments work.
6930 // Iterate through items via the restricted pointer.
6931 // Also check for declarations in for loops.
6932 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
6933 continue;
6934 return 0;
6935}
6936
6937// Check varargs and va_copy.
6938static void
6939test_varargs (const char *format, ...)
6940{
6941 va_list args;
6942 va_start (args, format);
6943 va_list args_copy;
6944 va_copy (args_copy, args);
6945
6946 const char *str;
6947 int number;
6948 float fnumber;
6949
6950 while (*format)
6951 {
6952 switch (*format++)
6953 {
6954 case 's': // string
6955 str = va_arg (args_copy, const char *);
6956 break;
6957 case 'd': // int
6958 number = va_arg (args_copy, int);
6959 break;
6960 case 'f': // float
6961 fnumber = va_arg (args_copy, double);
6962 break;
6963 default:
6964 break;
6965 }
6966 }
6967 va_end (args_copy);
6968 va_end (args);
6969}
6970
6971int
6972main ()
6973{
6974
6975 // Check bool.
6976 _Bool success = false;
6977
6978 // Check restrict.
6979 if (test_restrict ("String literal") == 0)
6980 success = true;
6981 char *restrict newvar = "Another string";
6982
6983 // Check varargs.
6984 test_varargs ("s, d' f .", "string", 65, 34.234);
6985 test_varargs_macros ();
6986
6987 // Check flexible array members.
6988 struct incomplete_array *ia =
6989 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
6990 ia->datasize = 10;
6991 for (int i = 0; i < ia->datasize; ++i)
6992 ia->data[i] = i * 1.234;
6993
6994 // Check named initializers.
6995 struct named_init ni = {
6996 .number = 34,
6997 .name = L"Test wide string",
6998 .average = 543.34343,
6999 };
7000
7001 ni.number = 58;
7002
7003 int dynamic_array[ni.number];
7004 dynamic_array[ni.number - 1] = 543;
7005
7006 // work around unused variable warnings
7007 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
7008 || dynamic_array[ni.number - 1] != 543);
7009
7010 ;
7011 return 0;
7012}
7013_ACEOF
7014for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99
7015do
7016 CC="$ac_save_CC $ac_arg"
7017 if ac_fn_c_try_compile "$LINENO"; then :
7018 ac_cv_prog_cc_c99=$ac_arg
7019fi
7020rm -f core conftest.err conftest.$ac_objext
7021 test "x$ac_cv_prog_cc_c99" != "xno" && break
7022done
7023rm -f conftest.$ac_ext
7024CC=$ac_save_CC
7025
7026fi
7027# AC_CACHE_VAL
7028case "x$ac_cv_prog_cc_c99" in
7029 x)
7030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
7031$as_echo "none needed" >&6; } ;;
7032 xno)
7033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
7034$as_echo "unsupported" >&6; } ;;
7035 *)
7036 CC="$CC $ac_cv_prog_cc_c99"
7037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
7038$as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
7039esac
7040if test "x$ac_cv_prog_cc_c99" != xno; then :
7041 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
7042else
7043 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
7044$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
a9bec17c 7045if test "${ac_cv_prog_cc_c89+set}" = set; then :
6d153f56
GM
7046 $as_echo_n "(cached) " >&6
7047else
7048 ac_cv_prog_cc_c89=no
7049ac_save_CC=$CC
7050cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7051/* end confdefs.h. */
7052#include <stdarg.h>
7053#include <stdio.h>
7054#include <sys/types.h>
7055#include <sys/stat.h>
7056/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
7057struct buf { int x; };
7058FILE * (*rcsopen) (struct buf *, struct stat *, int);
7059static char *e (p, i)
7060 char **p;
7061 int i;
7062{
7063 return p[i];
7064}
7065static char *f (char * (*g) (char **, int), char **p, ...)
7066{
7067 char *s;
7068 va_list v;
7069 va_start (v,p);
7070 s = g (p, va_arg (v,int));
7071 va_end (v);
7072 return s;
7073}
7074
7075/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
7076 function prototypes and stuff, but not '\xHH' hex character constants.
7077 These don't provoke an error unfortunately, instead are silently treated
7078 as 'x'. The following induces an error, until -std is added to get
7079 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
7080 array size at least. It's necessary to write '\x00'==0 to get something
7081 that's true only with -std. */
7082int osf4_cc_array ['\x00' == 0 ? 1 : -1];
7083
7084/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
7085 inside strings and character constants. */
7086#define FOO(x) 'x'
7087int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
7088
7089int test (int i, double x);
7090struct s1 {int (*f) (int a);};
7091struct s2 {int (*f) (double a);};
7092int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
7093int argc;
7094char **argv;
7095int
7096main ()
7097{
7098return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
7099 ;
7100 return 0;
7101}
7102_ACEOF
7103for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
7104 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
7105do
7106 CC="$ac_save_CC $ac_arg"
7107 if ac_fn_c_try_compile "$LINENO"; then :
7108 ac_cv_prog_cc_c89=$ac_arg
7109fi
7110rm -f core conftest.err conftest.$ac_objext
7111 test "x$ac_cv_prog_cc_c89" != "xno" && break
7112done
7113rm -f conftest.$ac_ext
7114CC=$ac_save_CC
7115
7116fi
7117# AC_CACHE_VAL
7118case "x$ac_cv_prog_cc_c89" in
7119 x)
7120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
7121$as_echo "none needed" >&6; } ;;
7122 xno)
7123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
7124$as_echo "unsupported" >&6; } ;;
7125 *)
7126 CC="$CC $ac_cv_prog_cc_c89"
7127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
7128$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
7129esac
7130if test "x$ac_cv_prog_cc_c89" != xno; then :
7131 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
7132else
7133 ac_cv_prog_cc_stdc=no
7134fi
7135
7136fi
7137 ;;
7138esac
7139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5
7140$as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; }
a9bec17c 7141 if test "${ac_cv_prog_cc_stdc+set}" = set; then :
6d153f56
GM
7142 $as_echo_n "(cached) " >&6
7143fi
7144
7145 case $ac_cv_prog_cc_stdc in #(
7146 no) :
7147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
7148$as_echo "unsupported" >&6; } ;; #(
7149 '') :
7150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
7151$as_echo "none needed" >&6; } ;; #(
7152 *) :
7153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_stdc" >&5
7154$as_echo "$ac_cv_prog_cc_stdc" >&6; } ;;
7155esac
7156
1fd182f0
PE
7157
7158
4fc2b746 7159 # Code from module alloca-opt:
8d8af66d 7160 # Code from module allocator:
d7ad186c 7161 # Code from module at-internal:
938a4ef9
GM
7162 # Code from module c-ctype:
7163 # Code from module c-strcase:
6c051bab 7164 # Code from module careadlinkat:
f199cab1 7165 # Code from module clock-time:
3bf26e96 7166 # Code from module close-stream:
942f733f 7167 # Code from module crypto/md5:
40e27e7f 7168 # Code from module crypto/sha1:
d87ffdb7
GM
7169 # Code from module crypto/sha256:
7170 # Code from module crypto/sha512:
d7ad186c 7171 # Code from module dirent:
36f13e16 7172 # Code from module dosname:
f737437b 7173 # Code from module dtoastr:
f199cab1 7174 # Code from module dtotimespec:
7d2a1c5e 7175 # Code from module dup2:
93131e11 7176 # Code from module environ:
710f5812 7177 # Code from module euidaccess:
8966cbff 7178 # Code from module execinfo:
1fd182f0
PE
7179 # Code from module extensions:
7180
7cd2ed2c 7181 # Code from module extern-inline:
710f5812
GM
7182 # Code from module faccessat:
7183 # Code from module fcntl-h:
d7ad186c 7184 # Code from module fdopendir:
5fa4ac76 7185 # Code from module filemode:
3bf26e96 7186 # Code from module fpending:
d7ad186c 7187 # Code from module fstatat:
710f5812 7188 # Code from module getgroups:
1f5d53eb 7189 # Code from module getloadavg:
e275c824
PE
7190 # Code from module getopt-gnu:
7191 # Code from module getopt-posix:
7192 # Code from module gettext-h:
f199cab1
GM
7193 # Code from module gettime:
7194 # Code from module gettimeofday:
710f5812 7195 # Code from module group-member:
67342916 7196 # Code from module ignore-value:
1fd182f0
PE
7197 # Code from module include_next:
7198 # Code from module intprops:
4fda9c95 7199 # Code from module inttypes-incomplete:
369e19fc
PE
7200 # Code from module largefile:
7201
ae0d7250 7202 # Code from module lstat:
ac1ca7e9 7203 # Code from module manywarnings:
283c7aed 7204 # Code from module memrchr:
1fd182f0
PE
7205 # Code from module mktime:
7206 # Code from module multiarch:
369e19fc 7207 # Code from module nocrash:
d7ad186c 7208 # Code from module openat-h:
a0a61e58 7209 # Code from module pathmax:
f199cab1 7210 # Code from module pselect:
3e0be4ab 7211 # Code from module pthread_sigmask:
b5591ebb 7212 # Code from module putenv:
ae0d7250 7213 # Code from module readlink:
d7ad186c 7214 # Code from module readlinkat:
710f5812 7215 # Code from module root-uid:
e4184a20 7216 # Code from module sig2str:
2b1928b8 7217 # Code from module signal-h:
369e19fc
PE
7218 # Code from module snippet/_Noreturn:
7219 # Code from module snippet/arg-nonnull:
7220 # Code from module snippet/c++defs:
7221 # Code from module snippet/warn-on-use:
6ad6792b 7222 # Code from module socklen:
6c051bab 7223 # Code from module ssize_t:
ae0d7250 7224 # Code from module stat:
f199cab1 7225 # Code from module stat-time:
0eb775a3 7226 # Code from module stdalign:
6d153f56
GM
7227 # Code from module stdarg:
7228
8c069cc7
GM
7229
7230
16c3e636 7231 # Code from module stdbool:
1fd182f0 7232 # Code from module stddef:
5f90be1b 7233 # Code from module stdint:
6ad6792b 7234 # Code from module stdio:
1f5d53eb 7235 # Code from module stdlib:
16c3e636 7236 # Code from module strftime:
283c7aed 7237 # Code from module string:
3e0be4ab
GM
7238 # Code from module strtoimax:
7239 # Code from module strtoll:
4fda9c95
GM
7240 # Code from module strtoull:
7241 # Code from module strtoumax:
ae0d7250 7242 # Code from module symlink:
f199cab1 7243 # Code from module sys_select:
5fa4ac76 7244 # Code from module sys_stat:
f199cab1 7245 # Code from module sys_time:
1fd182f0
PE
7246 # Code from module time:
7247 # Code from module time_r:
f077f61d 7248 # Code from module timer-time:
f199cab1
GM
7249 # Code from module timespec:
7250 # Code from module timespec-add:
7251 # Code from module timespec-sub:
d87ffdb7 7252 # Code from module u64:
e275c824 7253 # Code from module unistd:
b5591ebb 7254 # Code from module unsetenv:
f199cab1 7255 # Code from module utimens:
4fda9c95 7256 # Code from module verify:
ac1ca7e9 7257 # Code from module warnings:
710f5812 7258 # Code from module xalloc-oversized:
1fd182f0
PE
7259
7260
6bd1cda5
GM
7261# It's helpful to have C macros available to GDB, so prefer -g3 to -g
7262# if -g3 works and the user does not specify CFLAGS.
7263# This test must follow gl_EARLY; otherwise AC_LINK_IFELSE complains.
7264if test "$ac_test_CFLAGS" != set; then
7265 case $CFLAGS in
7266 '-g')
7267 emacs_g3_CFLAGS='-g3';;
7268 '-g -O2')
7269 emacs_g3_CFLAGS='-g3 -O2';;
7270 *)
7271 emacs_g3_CFLAGS='';;
7272 esac
7273 if test -n "$emacs_g3_CFLAGS"; then
7274 emacs_save_CFLAGS=$CFLAGS
7275 CFLAGS=$emacs_g3_CFLAGS
7276 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts $emacs_g3_CFLAGS" >&5
7277$as_echo_n "checking whether $CC accepts $emacs_g3_CFLAGS... " >&6; }
7278if test "${emacs_cv_prog_cc_g3+set}" = set; then :
7279 $as_echo_n "(cached) " >&6
7280else
7281 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7282/* end confdefs.h. */
7283
7284int
7285main ()
7286{
7287
7288 ;
7289 return 0;
7290}
7291_ACEOF
7292if ac_fn_c_try_link "$LINENO"; then :
7293 emacs_cv_prog_cc_g3=yes
7294else
7295 emacs_cv_prog_cc_g3=no
7296fi
7297rm -f core conftest.err conftest.$ac_objext \
7298 conftest$ac_exeext conftest.$ac_ext
7299fi
7300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_prog_cc_g3" >&5
7301$as_echo "$emacs_cv_prog_cc_g3" >&6; }
7302 if test $emacs_cv_prog_cc_g3 = yes; then
7303 CFLAGS=$emacs_g3_CFLAGS
7304 else
7305 CFLAGS=$emacs_save_CFLAGS
7306 fi
7307 fi
7308fi
7309
a6b92a4a
GM
7310# Check whether --enable-gcc-warnings was given.
7311if test "${enable_gcc_warnings+set}" = set; then :
7312 enableval=$enable_gcc_warnings; case $enableval in
7313 yes|no) ;;
7314 *) as_fn_error "bad value $enableval for gcc-warnings option" "$LINENO" 5 ;;
7315 esac
7316 gl_gcc_warnings=$enableval
7317else
7318 gl_gcc_warnings=no
7319
7320fi
7321
7322
e4d35030
GM
7323# Check whether --enable-link-time-optimization was given.
7324if test "${enable_link_time_optimization+set}" = set; then :
7325 enableval=$enable_link_time_optimization; if test "${enableval}" != "no"; then
7326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether link-time optimization is supported" >&5
7327$as_echo_n "checking whether link-time optimization is supported... " >&6; }
7328 ac_lto_supported=no
7329 if test x$GCC = xyes; then
7330 CPUS=`getconf _NPROCESSORS_ONLN 2>/dev/null`
7331 if test x$CPUS != x; then
7332 LTO="-flto=$CPUS"
7333 else
7334 LTO="-flto"
7335 fi
7336 old_CFLAGS=$CFLAGS
7337 CFLAGS="$CFLAGS $LTO"
7338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7339/* end confdefs.h. */
7340
7341int
7342main ()
7343{
7344
7345 ;
7346 return 0;
7347}
7348_ACEOF
7349if ac_fn_c_try_compile "$LINENO"; then :
7350 ac_lto_supported=yes
7351else
7352 ac_lto_supported=no
7353fi
7354rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7355 CFLAGS="$old_CFLAGS"
7356 fi
7357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_lto_supported" >&5
7358$as_echo "$ac_lto_supported" >&6; }
7359 if test "$ac_lto_supported" = "yes"; then
7360 CFLAGS="$CFLAGS $LTO"
7361 fi
7362fi
7363fi
7364
7365
a6b92a4a
GM
7366# gl_GCC_VERSION_IFELSE([major], [minor], [run-if-found], [run-if-not-found])
7367# ------------------------------------------------
7368# If $CPP is gcc-MAJOR.MINOR or newer, then run RUN-IF-FOUND.
7369# Otherwise, run RUN-IF-NOT-FOUND.
7370
7371
7372# When compiling with GCC, prefer -isystem to -I when including system
7373# include files, to avoid generating useless diagnostics for the files.
7374if test "$gl_gcc_warnings" != yes; then
7375 isystem='-I'
7376else
7377 isystem='-isystem '
7378
7379 # This, $nw, is the list of warnings we disable.
7380 nw=
7381
7382 case $with_x_toolkit in
7383 lucid | athena | motif)
7384 # Old toolkits mishandle 'const'.
7385 nw="$nw -Wwrite-strings"
7386 ;;
7387 *)
7388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror" >&5
7389$as_echo_n "checking whether C compiler handles -Werror... " >&6; }
7390if test "${gl_cv_warn_c__Werror+set}" = set; then :
7391 $as_echo_n "(cached) " >&6
7392else
7393
7394 gl_save_compiler_FLAGS="$CFLAGS"
0eb775a3 7395 as_fn_append CFLAGS " -Werror"
a6b92a4a 7396 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
7397/* end confdefs.h. */
7398
7399int
7400main ()
7401{
7402
7403 ;
7404 return 0;
7405}
7406_ACEOF
7407if ac_fn_c_try_compile "$LINENO"; then :
a6b92a4a 7408 gl_cv_warn_c__Werror=yes
067d23c9 7409else
a6b92a4a 7410 gl_cv_warn_c__Werror=no
067d23c9
KY
7411fi
7412rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a6b92a4a
GM
7413 CFLAGS="$gl_save_compiler_FLAGS"
7414
7415fi
7416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror" >&5
7417$as_echo "$gl_cv_warn_c__Werror" >&6; }
7418if test "x$gl_cv_warn_c__Werror" = x""yes; then :
7419 as_fn_append WERROR_CFLAGS " -Werror"
7420fi
7421
0eb775a3 7422
a6b92a4a
GM
7423 ;;
7424 esac
7425
7426
7427 nw="$nw -Waggregate-return" # anachronistic
ca0294bb 7428 nw="$nw -Wlong-long" # C90 is anachronistic
a6b92a4a
GM
7429 nw="$nw -Wc++-compat" # We don't care about C++ compilers
7430 nw="$nw -Wundef" # Warns on '#if GNULIB_FOO' etc in gnulib
7431 nw="$nw -Wtraditional" # Warns on #elif which we use often
7432 nw="$nw -Wcast-qual" # Too many warnings for now
7433 nw="$nw -Wconversion" # Too many warnings for now
7434 nw="$nw -Wsystem-headers" # Don't let system headers trigger warnings
7435 nw="$nw -Wsign-conversion" # Too many warnings for now
7436 nw="$nw -Woverlength-strings" # Not a problem these days
7437 nw="$nw -Wtraditional-conversion" # Too many warnings for now
fd9d2a9d 7438 nw="$nw -Wunreachable-code" # so buggy that it's now silently ignored
a6b92a4a 7439 nw="$nw -Wpadded" # Our structs are not padded
fd9d2a9d 7440 nw="$nw -Wredundant-decls" # we regularly (re)declare functions
a6b92a4a 7441 nw="$nw -Wlogical-op" # any use of fwrite provokes this
fd9d2a9d 7442 nw="$nw -Wformat-nonliteral" # we do this a lot
a6b92a4a
GM
7443 nw="$nw -Wvla" # warnings in gettext.h
7444 nw="$nw -Wnested-externs" # use of XARGMATCH/verify_function__
7445 nw="$nw -Wswitch-enum" # Too many warnings for now
7446 nw="$nw -Wswitch-default" # Too many warnings for now
fd9d2a9d
GM
7447 nw="$nw -Wfloat-equal" # warns about high-quality code
7448 nw="$nw -Winline" # OK to ignore 'inline'
6ec9a5a7 7449 nw="$nw -Wjump-misses-init" # We sometimes safely jump over init.
da8ed5ba
GM
7450 nw="$nw -Wstrict-overflow" # OK to optimize assuming that
7451 # signed overflow has undefined behavior
fd9d2a9d
GM
7452 nw="$nw -Wsync-nand" # irrelevant here, and provokes ObjC warning
7453 nw="$nw -Wunsafe-loop-optimizations" # OK to suppress unsafe optimizations
a6b92a4a
GM
7454
7455 # Emacs doesn't care about shadowing; see
7456 # <http://lists.gnu.org/archive/html/emacs-diffs/2011-11/msg00265.html>.
7457 nw="$nw -Wshadow"
7458
ad33cb00
GM
7459 # Emacs's use of alloca inhibits protecting the stack.
7460 nw="$nw -Wstack-protector"
7461
da8ed5ba 7462 # The following line should be removable at some point.
a6b92a4a
GM
7463 nw="$nw -Wsuggest-attribute=pure"
7464
7465
7466
7467 if test -n "$GCC"; then
7468
7469 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is supported" >&5
7470$as_echo_n "checking whether -Wno-missing-field-initializers is supported... " >&6; }
7471 if test "${gl_cv_cc_nomfi_supported+set}" = set; then :
7472 $as_echo_n "(cached) " >&6
7473else
7474
7475 gl_save_CFLAGS="$CFLAGS"
7476 CFLAGS="$CFLAGS -W -Werror -Wno-missing-field-initializers"
7477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
7478/* end confdefs.h. */
7479
7480int
7481main ()
7482{
7483
7484 ;
7485 return 0;
7486}
7487_ACEOF
7488if ac_fn_c_try_compile "$LINENO"; then :
a6b92a4a 7489 gl_cv_cc_nomfi_supported=yes
067d23c9 7490else
a6b92a4a 7491 gl_cv_cc_nomfi_supported=no
067d23c9
KY
7492fi
7493rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a6b92a4a
GM
7494 CFLAGS="$gl_save_CFLAGS"
7495fi
7496
7497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_supported" >&5
7498$as_echo "$gl_cv_cc_nomfi_supported" >&6; }
7499
7500 if test "$gl_cv_cc_nomfi_supported" = yes; then
7501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is needed" >&5
7502$as_echo_n "checking whether -Wno-missing-field-initializers is needed... " >&6; }
7503 if test "${gl_cv_cc_nomfi_needed+set}" = set; then :
7504 $as_echo_n "(cached) " >&6
7505else
7506
7507 gl_save_CFLAGS="$CFLAGS"
7508 CFLAGS="$CFLAGS -W -Werror"
7509 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7510/* end confdefs.h. */
7511void f (void)
7512 {
7513 typedef struct { int a; int b; } s_t;
7514 s_t s1 = { 0, };
7515 }
7516
7517int
7518main ()
7519{
7520
7521 ;
7522 return 0;
7523}
7524_ACEOF
7525if ac_fn_c_try_compile "$LINENO"; then :
7526 gl_cv_cc_nomfi_needed=no
7527else
7528 gl_cv_cc_nomfi_needed=yes
7529fi
7530rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7531 CFLAGS="$gl_save_CFLAGS"
7532
7533fi
7534
7535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_needed" >&5
7536$as_echo "$gl_cv_cc_nomfi_needed" >&6; }
7537 fi
b6c9d18d
GM
7538
7539 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wuninitialized is supported" >&5
7540$as_echo_n "checking whether -Wuninitialized is supported... " >&6; }
7541 if test "${gl_cv_cc_uninitialized_supported+set}" = set; then :
7542 $as_echo_n "(cached) " >&6
7543else
7544
7545 gl_save_CFLAGS="$CFLAGS"
7546 CFLAGS="$CFLAGS -Werror -Wuninitialized"
7547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7548/* end confdefs.h. */
7549
7550int
7551main ()
7552{
7553
7554 ;
7555 return 0;
7556}
7557_ACEOF
7558if ac_fn_c_try_compile "$LINENO"; then :
7559 gl_cv_cc_uninitialized_supported=yes
7560else
7561 gl_cv_cc_uninitialized_supported=no
7562fi
7563rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7564 CFLAGS="$gl_save_CFLAGS"
7565fi
7566
7567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_uninitialized_supported" >&5
7568$as_echo "$gl_cv_cc_uninitialized_supported" >&6; }
7569
a6b92a4a
GM
7570 fi
7571
b6c9d18d 7572 # List all gcc warning categories.
a6b92a4a
GM
7573 gl_manywarn_set=
7574 for gl_manywarn_item in \
a6b92a4a 7575 -W \
dcde497f
GM
7576 -Wabi \
7577 -Waddress \
7578 -Wall \
7579 -Warray-bounds \
7580 -Wattributes \
a6b92a4a 7581 -Wbad-function-cast \
a6b92a4a 7582 -Wbuiltin-macro-redefined \
dcde497f
GM
7583 -Wcast-align \
7584 -Wchar-subscripts \
7585 -Wclobbered \
7586 -Wcomment \
7587 -Wcomments \
a6b92a4a 7588 -Wcoverage-mismatch \
a6b92a4a
GM
7589 -Wcpp \
7590 -Wdeprecated \
7591 -Wdeprecated-declarations \
dcde497f 7592 -Wdisabled-optimization \
a6b92a4a
GM
7593 -Wdiv-by-zero \
7594 -Wdouble-promotion \
dcde497f 7595 -Wempty-body \
a6b92a4a 7596 -Wendif-labels \
dcde497f 7597 -Wenum-compare \
a6b92a4a
GM
7598 -Wextra \
7599 -Wformat-contains-nul \
7600 -Wformat-extra-args \
dcde497f
GM
7601 -Wformat-nonliteral \
7602 -Wformat-security \
7603 -Wformat-y2k \
a6b92a4a
GM
7604 -Wformat-zero-length \
7605 -Wformat=2 \
dcde497f
GM
7606 -Wfree-nonheap-object \
7607 -Wignored-qualifiers \
7608 -Wimplicit \
7609 -Wimplicit-function-declaration \
7610 -Wimplicit-int \
7611 -Winit-self \
7612 -Winline \
7613 -Wint-to-pointer-cast \
7614 -Winvalid-memory-model \
7615 -Winvalid-pch \
7616 -Wjump-misses-init \
7617 -Wlogical-op \
7618 -Wmain \
7619 -Wmaybe-uninitialized \
7620 -Wmissing-braces \
7621 -Wmissing-declarations \
7622 -Wmissing-field-initializers \
7623 -Wmissing-format-attribute \
7624 -Wmissing-include-dirs \
7625 -Wmissing-noreturn \
7626 -Wmissing-parameter-type \
7627 -Wmissing-prototypes \
7628 -Wmudflap \
a6b92a4a 7629 -Wmultichar \
dcde497f
GM
7630 -Wnarrowing \
7631 -Wnested-externs \
7632 -Wnonnull \
a6b92a4a 7633 -Wnormalized=nfc \
dcde497f
GM
7634 -Wold-style-declaration \
7635 -Wold-style-definition \
a6b92a4a 7636 -Woverflow \
dcde497f
GM
7637 -Woverlength-strings \
7638 -Woverride-init \
7639 -Wpacked \
7640 -Wpacked-bitfield-compat \
7641 -Wparentheses \
7642 -Wpointer-arith \
7643 -Wpointer-sign \
a6b92a4a
GM
7644 -Wpointer-to-int-cast \
7645 -Wpragmas \
dcde497f
GM
7646 -Wreturn-type \
7647 -Wsequence-point \
7648 -Wshadow \
7649 -Wsizeof-pointer-memaccess \
7650 -Wstack-protector \
7651 -Wstrict-aliasing \
7652 -Wstrict-overflow \
7653 -Wstrict-prototypes \
a6b92a4a 7654 -Wsuggest-attribute=const \
dcde497f 7655 -Wsuggest-attribute=format \
a6b92a4a
GM
7656 -Wsuggest-attribute=noreturn \
7657 -Wsuggest-attribute=pure \
dcde497f
GM
7658 -Wswitch \
7659 -Wswitch-default \
7660 -Wsync-nand \
7661 -Wsystem-headers \
a6b92a4a 7662 -Wtrampolines \
dcde497f
GM
7663 -Wtrigraphs \
7664 -Wtype-limits \
7665 -Wuninitialized \
7666 -Wunknown-pragmas \
7667 -Wunreachable-code \
7668 -Wunsafe-loop-optimizations \
7669 -Wunused \
7670 -Wunused-but-set-parameter \
7671 -Wunused-but-set-variable \
7672 -Wunused-function \
7673 -Wunused-label \
7674 -Wunused-local-typedefs \
7675 -Wunused-macros \
7676 -Wunused-parameter \
7677 -Wunused-result \
7678 -Wunused-value \
7679 -Wunused-variable \
7680 -Wvarargs \
7681 -Wvariadic-macros \
7682 -Wvector-operation-performance \
7683 -Wvla \
7684 -Wvolatile-register-var \
7685 -Wwrite-strings \
7686 \
a6b92a4a
GM
7687 ; do
7688 gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
7689 done
7690
b6c9d18d 7691 # Disable specific options as needed.
a6b92a4a
GM
7692 if test "$gl_cv_cc_nomfi_needed" = yes; then
7693 gl_manywarn_set="$gl_manywarn_set -Wno-missing-field-initializers"
7694 fi
7695
b6c9d18d
GM
7696 if test "$gl_cv_cc_uninitialized_supported" = no; then
7697 gl_manywarn_set="$gl_manywarn_set -Wno-uninitialized"
7698 fi
7699
a6b92a4a
GM
7700 ws=$gl_manywarn_set
7701
7702
7703 gl_warn_set=
7704 set x $ws; shift
7705 for gl_warn_item
7706 do
7707 case " $nw " in
7708 *" $gl_warn_item "*)
7709 ;;
7710 *)
7711 gl_warn_set="$gl_warn_set $gl_warn_item"
7712 ;;
7713 esac
7714 done
7715 ws=$gl_warn_set
7716
7717 for w in $ws; do
7718 as_gl_Warn=`$as_echo "gl_cv_warn_c_$w" | $as_tr_sh`
7719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles $w" >&5
7720$as_echo_n "checking whether C compiler handles $w... " >&6; }
7721if { as_var=$as_gl_Warn; eval "test \"\${$as_var+set}\" = set"; }; then :
7722 $as_echo_n "(cached) " >&6
7723else
7724
7725 gl_save_compiler_FLAGS="$CFLAGS"
0eb775a3 7726 as_fn_append CFLAGS " $w"
a6b92a4a
GM
7727 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7728/* end confdefs.h. */
7729
7730int
7731main ()
7732{
7733
7734 ;
7735 return 0;
7736}
7737_ACEOF
7738if ac_fn_c_try_compile "$LINENO"; then :
7739 eval "$as_gl_Warn=yes"
7740else
7741 eval "$as_gl_Warn=no"
7742fi
7743rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7744 CFLAGS="$gl_save_compiler_FLAGS"
7745
7746fi
7747eval ac_res=\$$as_gl_Warn
7748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7749$as_echo "$ac_res" >&6; }
7750eval as_val=\$$as_gl_Warn
7751 if test "x$as_val" = x""yes; then :
7752 as_fn_append WARN_CFLAGS " $w"
7753fi
7754
0eb775a3 7755
a6b92a4a
GM
7756 done
7757 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-missing-field-initializers" >&5
7758$as_echo_n "checking whether C compiler handles -Wno-missing-field-initializers... " >&6; }
7759if test "${gl_cv_warn_c__Wno_missing_field_initializers+set}" = set; then :
7760 $as_echo_n "(cached) " >&6
7761else
7762
7763 gl_save_compiler_FLAGS="$CFLAGS"
0eb775a3 7764 as_fn_append CFLAGS " -Wno-missing-field-initializers"
a6b92a4a
GM
7765 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7766/* end confdefs.h. */
7767
7768int
7769main ()
7770{
7771
7772 ;
7773 return 0;
7774}
7775_ACEOF
7776if ac_fn_c_try_compile "$LINENO"; then :
7777 gl_cv_warn_c__Wno_missing_field_initializers=yes
7778else
7779 gl_cv_warn_c__Wno_missing_field_initializers=no
7780fi
7781rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7782 CFLAGS="$gl_save_compiler_FLAGS"
7783
7784fi
7785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_missing_field_initializers" >&5
7786$as_echo "$gl_cv_warn_c__Wno_missing_field_initializers" >&6; }
7787if test "x$gl_cv_warn_c__Wno_missing_field_initializers" = x""yes; then :
7788 as_fn_append WARN_CFLAGS " -Wno-missing-field-initializers"
7789fi
0eb775a3 7790
a6b92a4a
GM
7791 # We need this one
7792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-sign-compare" >&5
7793$as_echo_n "checking whether C compiler handles -Wno-sign-compare... " >&6; }
7794if test "${gl_cv_warn_c__Wno_sign_compare+set}" = set; then :
7795 $as_echo_n "(cached) " >&6
7796else
7797
7798 gl_save_compiler_FLAGS="$CFLAGS"
0eb775a3 7799 as_fn_append CFLAGS " -Wno-sign-compare"
a6b92a4a
GM
7800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7801/* end confdefs.h. */
7802
7803int
7804main ()
7805{
7806
7807 ;
7808 return 0;
7809}
7810_ACEOF
7811if ac_fn_c_try_compile "$LINENO"; then :
7812 gl_cv_warn_c__Wno_sign_compare=yes
7813else
7814 gl_cv_warn_c__Wno_sign_compare=no
7815fi
7816rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7817 CFLAGS="$gl_save_compiler_FLAGS"
7818
7819fi
7820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_sign_compare" >&5
7821$as_echo "$gl_cv_warn_c__Wno_sign_compare" >&6; }
7822if test "x$gl_cv_warn_c__Wno_sign_compare" = x""yes; then :
7823 as_fn_append WARN_CFLAGS " -Wno-sign-compare"
7824fi
0eb775a3 7825
a6b92a4a
GM
7826 # Too many warnings for now
7827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-type-limits" >&5
7828$as_echo_n "checking whether C compiler handles -Wno-type-limits... " >&6; }
7829if test "${gl_cv_warn_c__Wno_type_limits+set}" = set; then :
7830 $as_echo_n "(cached) " >&6
7831else
7832
7833 gl_save_compiler_FLAGS="$CFLAGS"
0eb775a3 7834 as_fn_append CFLAGS " -Wno-type-limits"
a6b92a4a
GM
7835 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7836/* end confdefs.h. */
7837
7838int
7839main ()
7840{
7841
7842 ;
7843 return 0;
7844}
7845_ACEOF
7846if ac_fn_c_try_compile "$LINENO"; then :
7847 gl_cv_warn_c__Wno_type_limits=yes
7848else
7849 gl_cv_warn_c__Wno_type_limits=no
7850fi
7851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7852 CFLAGS="$gl_save_compiler_FLAGS"
7853
7854fi
7855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_type_limits" >&5
7856$as_echo "$gl_cv_warn_c__Wno_type_limits" >&6; }
7857if test "x$gl_cv_warn_c__Wno_type_limits" = x""yes; then :
7858 as_fn_append WARN_CFLAGS " -Wno-type-limits"
7859fi
0eb775a3 7860
a6b92a4a
GM
7861 # Too many warnings for now
7862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-switch" >&5
7863$as_echo_n "checking whether C compiler handles -Wno-switch... " >&6; }
7864if test "${gl_cv_warn_c__Wno_switch+set}" = set; then :
7865 $as_echo_n "(cached) " >&6
7866else
7867
7868 gl_save_compiler_FLAGS="$CFLAGS"
0eb775a3 7869 as_fn_append CFLAGS " -Wno-switch"
a6b92a4a
GM
7870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7871/* end confdefs.h. */
7872
7873int
7874main ()
7875{
7876
7877 ;
7878 return 0;
7879}
7880_ACEOF
7881if ac_fn_c_try_compile "$LINENO"; then :
7882 gl_cv_warn_c__Wno_switch=yes
7883else
7884 gl_cv_warn_c__Wno_switch=no
7885fi
7886rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7887 CFLAGS="$gl_save_compiler_FLAGS"
7888
7889fi
7890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_switch" >&5
7891$as_echo "$gl_cv_warn_c__Wno_switch" >&6; }
7892if test "x$gl_cv_warn_c__Wno_switch" = x""yes; then :
7893 as_fn_append WARN_CFLAGS " -Wno-switch"
7894fi
0eb775a3 7895
a6b92a4a
GM
7896 # Too many warnings for now
7897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-parameter" >&5
7898$as_echo_n "checking whether C compiler handles -Wno-unused-parameter... " >&6; }
7899if test "${gl_cv_warn_c__Wno_unused_parameter+set}" = set; then :
7900 $as_echo_n "(cached) " >&6
7901else
7902
7903 gl_save_compiler_FLAGS="$CFLAGS"
0eb775a3 7904 as_fn_append CFLAGS " -Wno-unused-parameter"
a6b92a4a
GM
7905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7906/* end confdefs.h. */
7907
7908int
7909main ()
7910{
7911
7912 ;
7913 return 0;
7914}
7915_ACEOF
7916if ac_fn_c_try_compile "$LINENO"; then :
7917 gl_cv_warn_c__Wno_unused_parameter=yes
7918else
7919 gl_cv_warn_c__Wno_unused_parameter=no
7920fi
7921rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7922 CFLAGS="$gl_save_compiler_FLAGS"
7923
7924fi
7925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_parameter" >&5
7926$as_echo "$gl_cv_warn_c__Wno_unused_parameter" >&6; }
7927if test "x$gl_cv_warn_c__Wno_unused_parameter" = x""yes; then :
7928 as_fn_append WARN_CFLAGS " -Wno-unused-parameter"
7929fi
0eb775a3 7930
a6b92a4a
GM
7931 # Too many warnings for now
7932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-format-nonliteral" >&5
7933$as_echo_n "checking whether C compiler handles -Wno-format-nonliteral... " >&6; }
7934if test "${gl_cv_warn_c__Wno_format_nonliteral+set}" = set; then :
7935 $as_echo_n "(cached) " >&6
7936else
7937
7938 gl_save_compiler_FLAGS="$CFLAGS"
0eb775a3 7939 as_fn_append CFLAGS " -Wno-format-nonliteral"
a6b92a4a
GM
7940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7941/* end confdefs.h. */
7942
7943int
7944main ()
7945{
7946
7947 ;
7948 return 0;
7949}
7950_ACEOF
7951if ac_fn_c_try_compile "$LINENO"; then :
7952 gl_cv_warn_c__Wno_format_nonliteral=yes
7953else
7954 gl_cv_warn_c__Wno_format_nonliteral=no
7955fi
7956rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7957 CFLAGS="$gl_save_compiler_FLAGS"
7958
7959fi
7960{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_format_nonliteral" >&5
7961$as_echo "$gl_cv_warn_c__Wno_format_nonliteral" >&6; }
7962if test "x$gl_cv_warn_c__Wno_format_nonliteral" = x""yes; then :
7963 as_fn_append WARN_CFLAGS " -Wno-format-nonliteral"
7964fi
7965
7966
0eb775a3 7967
a6b92a4a
GM
7968 # In spite of excluding -Wlogical-op above, it is enabled, as of
7969 # gcc 4.5.0 20090517.
7970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-logical-op" >&5
7971$as_echo_n "checking whether C compiler handles -Wno-logical-op... " >&6; }
7972if test "${gl_cv_warn_c__Wno_logical_op+set}" = set; then :
7973 $as_echo_n "(cached) " >&6
7974else
7975
7976 gl_save_compiler_FLAGS="$CFLAGS"
0eb775a3 7977 as_fn_append CFLAGS " -Wno-logical-op"
a6b92a4a
GM
7978 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7979/* end confdefs.h. */
7980
7981int
7982main ()
7983{
7984
7985 ;
7986 return 0;
7987}
7988_ACEOF
7989if ac_fn_c_try_compile "$LINENO"; then :
7990 gl_cv_warn_c__Wno_logical_op=yes
7991else
7992 gl_cv_warn_c__Wno_logical_op=no
7993fi
7994rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7995 CFLAGS="$gl_save_compiler_FLAGS"
7996
7997fi
7998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_logical_op" >&5
7999$as_echo "$gl_cv_warn_c__Wno_logical_op" >&6; }
8000if test "x$gl_cv_warn_c__Wno_logical_op" = x""yes; then :
8001 as_fn_append WARN_CFLAGS " -Wno-logical-op"
8002fi
8003
8004
0eb775a3 8005
a6b92a4a
GM
8006 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fdiagnostics-show-option" >&5
8007$as_echo_n "checking whether C compiler handles -fdiagnostics-show-option... " >&6; }
8008if test "${gl_cv_warn_c__fdiagnostics_show_option+set}" = set; then :
8009 $as_echo_n "(cached) " >&6
8010else
8011
8012 gl_save_compiler_FLAGS="$CFLAGS"
0eb775a3 8013 as_fn_append CFLAGS " -fdiagnostics-show-option"
a6b92a4a 8014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
8015/* end confdefs.h. */
8016
8017int
8018main ()
8019{
8020
8021 ;
8022 return 0;
8023}
8024_ACEOF
8025if ac_fn_c_try_compile "$LINENO"; then :
a6b92a4a 8026 gl_cv_warn_c__fdiagnostics_show_option=yes
067d23c9 8027else
a6b92a4a 8028 gl_cv_warn_c__fdiagnostics_show_option=no
067d23c9
KY
8029fi
8030rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a6b92a4a
GM
8031 CFLAGS="$gl_save_compiler_FLAGS"
8032
8033fi
8034{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fdiagnostics_show_option" >&5
8035$as_echo "$gl_cv_warn_c__fdiagnostics_show_option" >&6; }
8036if test "x$gl_cv_warn_c__fdiagnostics_show_option" = x""yes; then :
8037 as_fn_append WARN_CFLAGS " -fdiagnostics-show-option"
067d23c9 8038fi
067d23c9 8039
0eb775a3 8040
a6b92a4a
GM
8041 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -funit-at-a-time" >&5
8042$as_echo_n "checking whether C compiler handles -funit-at-a-time... " >&6; }
8043if test "${gl_cv_warn_c__funit_at_a_time+set}" = set; then :
8044 $as_echo_n "(cached) " >&6
8045else
8046
8047 gl_save_compiler_FLAGS="$CFLAGS"
0eb775a3 8048 as_fn_append CFLAGS " -funit-at-a-time"
a6b92a4a
GM
8049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8050/* end confdefs.h. */
8051
8052int
8053main ()
8054{
8055
8056 ;
8057 return 0;
8058}
8059_ACEOF
8060if ac_fn_c_try_compile "$LINENO"; then :
8061 gl_cv_warn_c__funit_at_a_time=yes
8062else
8063 gl_cv_warn_c__funit_at_a_time=no
8064fi
8065rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8066 CFLAGS="$gl_save_compiler_FLAGS"
8067
8068fi
8069{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__funit_at_a_time" >&5
8070$as_echo "$gl_cv_warn_c__funit_at_a_time" >&6; }
8071if test "x$gl_cv_warn_c__funit_at_a_time" = x""yes; then :
8072 as_fn_append WARN_CFLAGS " -funit-at-a-time"
8073fi
8074
8075
8076
0eb775a3 8077
a6b92a4a
GM
8078$as_echo "#define lint 1" >>confdefs.h
8079
8080
a6b92a4a
GM
8081
8082$as_echo "#define GNULIB_PORTCHECK 1" >>confdefs.h
8083
8084
8085 # We use a slightly smaller set of warning options for lib/.
8086 # Remove the following and save the result in GNULIB_WARN_CFLAGS.
8087 nw=
8088 nw="$nw -Wunused-macros"
8089
8090
8091 gl_warn_set=
8092 set x $WARN_CFLAGS; shift
8093 for gl_warn_item
8094 do
8095 case " $nw " in
8096 *" $gl_warn_item "*)
8097 ;;
8098 *)
8099 gl_warn_set="$gl_warn_set $gl_warn_item"
8100 ;;
8101 esac
8102 done
8103 GNULIB_WARN_CFLAGS=$gl_warn_set
8104
8105
8106fi
067d23c9
KY
8107
8108
8109
0e733db9
GM
8110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
8111$as_echo_n "checking whether ln -s works... " >&6; }
8112LN_S=$as_ln_s
8113if test "$LN_S" = "ln -s"; then
8114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8115$as_echo "yes" >&6; }
8116else
8117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
8118$as_echo "no, using $LN_S" >&6; }
8119fi
8120
067d23c9 8121
067d23c9
KY
8122# Extract the first word of "install-info", so it can be a program name with args.
8123set dummy install-info; ac_word=$2
8124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8125$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 8126if test "${ac_cv_path_INSTALL_INFO+set}" = set; then :
067d23c9
KY
8127 $as_echo_n "(cached) " >&6
8128else
8129 case $INSTALL_INFO in
8130 [\\/]* | ?:[\\/]*)
8131 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
8132 ;;
8133 *)
8134 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
e700232f 8135for as_dir in $PATH$PATH_SEPARATOR/usr/sbin$PATH_SEPARATOR/sbin
067d23c9
KY
8136do
8137 IFS=$as_save_IFS
8138 test -z "$as_dir" && as_dir=.
8139 for ac_exec_ext in '' $ac_executable_extensions; do
8140 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8141 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
8142 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8143 break 2
8144 fi
8145done
8146 done
8147IFS=$as_save_IFS
8148
8149 test -z "$ac_cv_path_INSTALL_INFO" && ac_cv_path_INSTALL_INFO=":"
8150 ;;
8151esac
8152fi
8153INSTALL_INFO=$ac_cv_path_INSTALL_INFO
8154if test -n "$INSTALL_INFO"; then
8155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_INFO" >&5
8156$as_echo "$INSTALL_INFO" >&6; }
8157else
8158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8159$as_echo "no" >&6; }
8160fi
8161
8162
8163# Extract the first word of "gzip", so it can be a program name with args.
8164set dummy gzip; ac_word=$2
8165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8166$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 8167if test "${ac_cv_path_GZIP_PROG+set}" = set; then :
067d23c9
KY
8168 $as_echo_n "(cached) " >&6
8169else
8170 case $GZIP_PROG in
8171 [\\/]* | ?:[\\/]*)
8172 ac_cv_path_GZIP_PROG="$GZIP_PROG" # Let the user override the test with a path.
8173 ;;
8174 *)
8175 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8176for as_dir in $PATH
8177do
8178 IFS=$as_save_IFS
8179 test -z "$as_dir" && as_dir=.
8180 for ac_exec_ext in '' $ac_executable_extensions; do
8181 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8182 ac_cv_path_GZIP_PROG="$as_dir/$ac_word$ac_exec_ext"
8183 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8184 break 2
8185 fi
8186done
8187 done
8188IFS=$as_save_IFS
8189
8190 ;;
8191esac
8192fi
8193GZIP_PROG=$ac_cv_path_GZIP_PROG
8194if test -n "$GZIP_PROG"; then
8195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP_PROG" >&5
8196$as_echo "$GZIP_PROG" >&6; }
8197else
8198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8199$as_echo "no" >&6; }
8200fi
8201
8202
7ee3791f
GM
8203
8204if test $opsys = gnu-linux; then
8205 # Extract the first word of "paxctl", so it can be a program name with args.
9c29597b
GM
8206set dummy paxctl; ac_word=$2
8207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8208$as_echo_n "checking for $ac_word... " >&6; }
8209if test "${ac_cv_path_PAXCTL+set}" = set; then :
8210 $as_echo_n "(cached) " >&6
8211else
8212 case $PAXCTL in
8213 [\\/]* | ?:[\\/]*)
8214 ac_cv_path_PAXCTL="$PAXCTL" # Let the user override the test with a path.
8215 ;;
8216 *)
8217 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8218for as_dir in $PATH$PATH_SEPARATOR/sbin$PATH_SEPARATOR/usr/sbin
8219do
8220 IFS=$as_save_IFS
8221 test -z "$as_dir" && as_dir=.
8222 for ac_exec_ext in '' $ac_executable_extensions; do
8223 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8224 ac_cv_path_PAXCTL="$as_dir/$ac_word$ac_exec_ext"
8225 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8226 break 2
8227 fi
8228done
8229 done
8230IFS=$as_save_IFS
8231
8232 ;;
8233esac
8234fi
8235PAXCTL=$ac_cv_path_PAXCTL
8236if test -n "$PAXCTL"; then
8237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PAXCTL" >&5
8238$as_echo "$PAXCTL" >&6; }
8239else
8240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8241$as_echo "no" >&6; }
8242fi
8243
8244
685e57ea
GM
8245 if test "X$PAXCTL" != X; then
8246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether binaries have a PT_PAX_FLAGS header" >&5
8247$as_echo_n "checking whether binaries have a PT_PAX_FLAGS header... " >&6; }
8248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8249/* end confdefs.h. */
8250
8251int
8252main ()
8253{
8254
8255 ;
8256 return 0;
8257}
8258_ACEOF
8259if ac_fn_c_try_link "$LINENO"; then :
8260 if $PAXCTL -v conftest$EXEEXT >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8261$as_echo "yes" >&6; }
8262 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8263$as_echo "no" >&6; }; PAXCTL=""; fi
8264fi
8265rm -f core conftest.err conftest.$ac_objext \
8266 conftest$ac_exeext conftest.$ac_ext
8267 fi
7ee3791f 8268fi
067d23c9 8269
9e40dda4 8270## Need makeinfo >= 4.7 (?) to build the manuals.
067d23c9
KY
8271# Extract the first word of "makeinfo", so it can be a program name with args.
8272set dummy makeinfo; ac_word=$2
8273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8274$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 8275if test "${ac_cv_path_MAKEINFO+set}" = set; then :
067d23c9
KY
8276 $as_echo_n "(cached) " >&6
8277else
8278 case $MAKEINFO in
8279 [\\/]* | ?:[\\/]*)
8280 ac_cv_path_MAKEINFO="$MAKEINFO" # Let the user override the test with a path.
8281 ;;
8282 *)
8283 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8284for as_dir in $PATH
8285do
8286 IFS=$as_save_IFS
8287 test -z "$as_dir" && as_dir=.
8288 for ac_exec_ext in '' $ac_executable_extensions; do
8289 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8290 ac_cv_path_MAKEINFO="$as_dir/$ac_word$ac_exec_ext"
8291 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8292 break 2
8293 fi
8294done
8295 done
8296IFS=$as_save_IFS
8297
8298 test -z "$ac_cv_path_MAKEINFO" && ac_cv_path_MAKEINFO="no"
8299 ;;
8300esac
8301fi
8302MAKEINFO=$ac_cv_path_MAKEINFO
8303if test -n "$MAKEINFO"; then
8304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKEINFO" >&5
8305$as_echo "$MAKEINFO" >&6; }
8306else
8307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8308$as_echo "no" >&6; }
8309fi
8310
8311
b5591ebb
GM
8312if test "$MAKEINFO" != "no"; then
8313 case `
8314 $MAKEINFO --version 2> /dev/null |
8315 $EGREP 'texinfo[^0-9]*([1-4][0-9]+|[5-9]|4\.[7-9]|4\.[1-6][0-9]+)'
8316 ` in
8317 '') MAKEINFO=no;;
8318 esac
067d23c9
KY
8319fi
8320
8321## Makeinfo is unusual. For a released Emacs, the manuals are
8322## pre-built, and not deleted by the normal clean rules. makeinfo is
8323## therefore in the category of "special tools" not normally required, which
8324## configure does not have to check for (eg autoconf itself).
8325## In a Bazaar checkout on the other hand, the manuals are not included.
8326## So makeinfo is a requirement to build from Bazaar, and configure
8327## should test for it as it does for any other build requirement.
8328## We use the presence of $srcdir/info/emacs to distinguish a release,
8329## with pre-built manuals, from a Bazaar checkout.
96f129d5
GM
8330HAVE_MAKEINFO=yes
8331
067d23c9 8332if test "$MAKEINFO" = "no"; then
96f129d5 8333 MAKEINFO=makeinfo
067d23c9 8334 if test "x${with_makeinfo}" = "xno"; then
96f129d5 8335 HAVE_MAKEINFO=no
b5591ebb 8336 elif test ! -e "$srcdir/info/emacs" && test ! -e "$srcdir/info/emacs.info"; then
9e40dda4 8337 as_fn_error "You do not seem to have makeinfo >= 4.7, and your
067d23c9
KY
8338source tree does not seem to have pre-built manuals in the \`info' directory.
8339Either install a suitable version of makeinfo, or re-run configure
8340with the \`--without-makeinfo' option to build without the manuals. " "$LINENO" 5
8341 fi
8342fi
8343
8344
141d074d
GM
8345INFO_EXT=.info
8346INFO_OPTS=--no-split
8347
8348
8349
96f129d5 8350
067d23c9
KY
8351if test x$GCC = xyes; then
8352 test "x$GCC_LINK_TEST_OPTIONS" != x && \
8353 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
8354else
8355 test "x$NON_GCC_LINK_TEST_OPTIONS" != x && \
8356 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
8357fi
8358
8359
8360late_LDFLAGS=$LDFLAGS
8361if test x$GCC = xyes; then
8362 LDFLAGS="$LDFLAGS -Wl,-znocombreloc"
8363else
8364 LDFLAGS="$LDFLAGS -znocombreloc"
8365fi
8366
8367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -znocombreloc" >&5
8368$as_echo_n "checking for -znocombreloc... " >&6; }
8369cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8370/* end confdefs.h. */
8371
8372int
8373main ()
8374{
8375
8376 ;
8377 return 0;
8378}
8379_ACEOF
8380if ac_fn_c_try_link "$LINENO"; then :
8381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8382$as_echo "yes" >&6; }
8383else
8384 LDFLAGS=$late_LDFLAGS
8385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8386$as_echo "no" >&6; }
8387fi
8388rm -f core conftest.err conftest.$ac_objext \
8389 conftest$ac_exeext conftest.$ac_ext
8390
8391
125c3718 8392test "x$CANNOT_DUMP" = "x" && CANNOT_DUMP=no
067d23c9 8393case "$opsys" in
125c3718
PE
8394 your-opsys-here) CANNOT_DUMP=yes ;;
8395esac
8396
8397test "$CANNOT_DUMP" = "yes" && \
067d23c9
KY
8398
8399$as_echo "#define CANNOT_DUMP 1" >>confdefs.h
8400
125c3718 8401
067d23c9
KY
8402
8403
8404
8405UNEXEC_OBJ=unexelf.o
8406case "$opsys" in
8407 # MSDOS uses unexcoff.o
8408 # MSWindows uses unexw32.o
8409 aix4-2)
8410 UNEXEC_OBJ=unexaix.o
8411 ;;
8412 cygwin)
8413 UNEXEC_OBJ=unexcw.o
8414 ;;
8415 darwin)
8416 UNEXEC_OBJ=unexmacosx.o
8417 ;;
8418 hpux10-20 | hpux11)
8419 UNEXEC_OBJ=unexhp9k800.o
8420 ;;
8421 sol2-10)
8422 # Use the Solaris dldump() function, called from unexsol.c, to dump
8423 # emacs, instead of the generic ELF dump code found in unexelf.c.
8424 # The resulting binary has a complete symbol table, and is better
8425 # for debugging and other observability tools (debuggers, pstack, etc).
8426 #
8427 # If you encounter a problem using dldump(), please consider sending
8428 # a message to the OpenSolaris tools-linking mailing list:
8429 # http://mail.opensolaris.org/mailman/listinfo/tools-linking
8430 #
8431 # It is likely that dldump() works with older Solaris too, but this has
8432 # not been tested, so for now this change is for Solaris 10 or newer.
8433 UNEXEC_OBJ=unexsol.o
8434 ;;
8435esac
8436
8437LD_SWITCH_SYSTEM=
8438case "$opsys" in
8439 freebsd)
8440 ## Let `ld' find image libs and similar things in /usr/local/lib.
8441 ## The system compiler, GCC, has apparently been modified to not
8442 ## look there, contrary to what a stock GCC would do.
a7479549
GM
8443### It's not our place to do this. See bug#10313#17.
8444### LD_SWITCH_SYSTEM=-L/usr/local/lib
8445 :
067d23c9
KY
8446 ;;
8447
8448 gnu-linux)
8449 ## cpp test was "ifdef __mips__", but presumably this is equivalent...
d6a003a8 8450 case $host_cpu in mips*) LD_SWITCH_SYSTEM="-G 0";; esac
067d23c9
KY
8451 ;;
8452
8453 netbsd)
a7479549
GM
8454### It's not our place to do this. See bug#10313#17.
8455### LD_SWITCH_SYSTEM="-Wl,-rpath,/usr/pkg/lib -L/usr/pkg/lib -Wl,-rpath,/usr/local/lib -L/usr/local/lib"
8456 :
067d23c9
KY
8457 ;;
8458
8459 openbsd)
8460 ## Han Boetes <han@mijncomputer.nl> says this is necessary,
8461 ## otherwise Emacs dumps core on elf systems.
8462 LD_SWITCH_SYSTEM="-Z"
8463 ;;
8464esac
8465
8466
8467ac_link="$ac_link $LD_SWITCH_SYSTEM"
8468
ae629dae 8469## This setting of LD_SWITCH_SYSTEM references LD_SWITCH_X_SITE_RPATH,
067d23c9
KY
8470## which has not been defined yet. When this was handled with cpp,
8471## it was expanded to null when configure sourced the s/*.h file.
8472## Thus LD_SWITCH_SYSTEM had different values in configure and the Makefiles.
8473## FIXME it would be cleaner to put this in LD_SWITCH_SYSTEM_TEMACS
8474## (or somesuch), but because it is supposed to go at the _front_
8475## of LD_SWITCH_SYSTEM, we cannot do that in exactly the same way.
8476## Compare with the gnu-linux case below, which added to the end
8477## of LD_SWITCH_SYSTEM, and so can instead go at the front of
8478## LD_SWITCH_SYSTEM_TEMACS.
8479case "$opsys" in
8480 netbsd|openbsd)
ae629dae 8481 LD_SWITCH_SYSTEM="\$(LD_SWITCH_X_SITE_RPATH) $LD_SWITCH_SYSTEM" ;;
067d23c9
KY
8482esac
8483
8484
8485C_SWITCH_MACHINE=
42bbbe8b
GM
8486case $canonical in
8487 alpha*)
067d23c9 8488 ac_fn_c_check_decl "$LINENO" "__ELF__" "ac_cv_have_decl___ELF__" "$ac_includes_default"
a9bec17c 8489if test "x$ac_cv_have_decl___ELF__" = x""yes; then :
067d23c9
KY
8490
8491fi
8492
8493 if test "$ac_cv_have_decl___ELF__" = "yes"; then
8494 ## With ELF, make sure that all common symbols get allocated to in the
8495 ## data section. Otherwise, the dump of temacs may miss variables in
8496 ## the shared library that have been initialized. For example, with
8497 ## GNU libc, __malloc_initialized would normally be resolved to the
8498 ## shared library's .bss section, which is fatal.
8499 if test "x$GCC" = "xyes"; then
8500 C_SWITCH_MACHINE="-fno-common"
8501 else
a9bec17c 8502 as_fn_error "What gives? Fix me if DEC Unix supports ELF now." "$LINENO" 5
067d23c9
KY
8503 fi
8504 else
8505 UNEXEC_OBJ=unexalpha.o
8506 fi
42bbbe8b
GM
8507 ;;
8508esac
067d23c9
KY
8509
8510
8511
8512
8513C_SWITCH_SYSTEM=
8514## Some programs in src produce warnings saying certain subprograms
8515## are too complex and need a MAXMEM value greater than 2000 for
8516## additional optimization. --nils@exp-math.uni-essen.de
8517test "$opsys" = "aix4.2" && test "x$GCC" != "xyes" && \
8518 C_SWITCH_SYSTEM="-ma -qmaxmem=4000"
8519## gnu-linux might need -D_BSD_SOURCE on old libc5 systems.
8520## It is redundant in glibc2, since we define _GNU_SOURCE.
8521
8522
8523
8524LIBS_SYSTEM=
8525case "$opsys" in
8526 ## IBM's X11R5 uses -lIM and -liconv in AIX 3.2.2.
8527 aix4-2) LIBS_SYSTEM="-lrts -lIM -liconv" ;;
8528
8529 freebsd) LIBS_SYSTEM="-lutil" ;;
8530
8531 hpux*) LIBS_SYSTEM="-l:libdld.sl" ;;
8532
1f5d53eb 8533 sol2*) LIBS_SYSTEM="-lsocket -lnsl" ;;
067d23c9
KY
8534
8535 ## Motif needs -lgen.
8536 unixware) LIBS_SYSTEM="-lsocket -lnsl -lelf -lgen" ;;
8537esac
8538
8539
8540
8541### Make sure subsequent tests use flags consistent with the build flags.
8542
8543if test x"${OVERRIDE_CPPFLAGS}" != x; then
8544 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
8545else
8546 CPPFLAGS="$C_SWITCH_SYSTEM $C_SWITCH_MACHINE $CPPFLAGS"
8547fi
8548
4fda9c95
GM
8549# Suppress obsolescent Autoconf test for size_t; Emacs assumes C89 or better.
8550
3e0be4ab
GM
8551# Likewise for obsolescent test for uid_t, gid_t; Emacs assumes them.
8552
4fda9c95 8553
067d23c9 8554
067d23c9 8555LIB_MATH=-lm
4717915f 8556SYSTEM_TYPE=`echo $opsys | sed -e 's/[0-9].*//' -e 's|-|/|'`
067d23c9
KY
8557
8558case $opsys in
8559 cygwin )
8560 LIB_MATH=
067d23c9
KY
8561 ;;
8562 darwin )
8563 ## Adding -lm confuses the dynamic linker, so omit it.
8564 LIB_MATH=
067d23c9
KY
8565 ;;
8566 freebsd )
15f79fcd 8567 SYSTEM_TYPE=berkeley-unix
067d23c9
KY
8568 ;;
8569 gnu-linux | gnu-kfreebsd )
067d23c9
KY
8570 ;;
8571 hpux10-20 | hpux11 )
067d23c9 8572 ;;
bb72ce91 8573 netbsd | openbsd )
15f79fcd 8574 SYSTEM_TYPE=berkeley-unix
067d23c9 8575 ;;
15f79fcd
GM
8576
8577 sol2* | unixware )
8578 SYSTEM_TYPE=usg-unix-v
8579 ;;
8580
067d23c9
KY
8581esac
8582
8583
8584
15f79fcd
GM
8585cat >>confdefs.h <<_ACEOF
8586#define SYSTEM_TYPE "$SYSTEM_TYPE"
8587_ACEOF
8588
8589
130f1dac 8590
5476a9a4
GM
8591pre_PKG_CONFIG_CFLAGS=$CFLAGS
8592pre_PKG_CONFIG_LIBS=$LIBS
067d23c9 8593
5476a9a4
GM
8594# Extract the first word of "pkg-config", so it can be a program name with args.
8595set dummy pkg-config; ac_word=$2
8596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8597$as_echo_n "checking for $ac_word... " >&6; }
8598if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
8599 $as_echo_n "(cached) " >&6
8600else
8601 case $PKG_CONFIG in
8602 [\\/]* | ?:[\\/]*)
8603 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8604 ;;
8605 *)
8606 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8607for as_dir in $PATH
8608do
8609 IFS=$as_save_IFS
8610 test -z "$as_dir" && as_dir=.
8611 for ac_exec_ext in '' $ac_executable_extensions; do
8612 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8613 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8614 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8615 break 2
8616 fi
8617done
8618 done
8619IFS=$as_save_IFS
8620
8621 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
8622 ;;
8623esac
8624fi
8625PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8626if test -n "$PKG_CONFIG"; then
8627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8628$as_echo "$PKG_CONFIG" >&6; }
8629else
8630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8631$as_echo "no" >&6; }
8632fi
f199cab1
GM
8633
8634
f199cab1 8635
5476a9a4
GM
8636
8637
8638
8639if test "${with_sound}" != "no"; then
8640 # Sound support for GNU/Linux and the free BSDs.
8641 for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h
8642do :
8643 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8644ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8645eval as_val=\$$as_ac_Header
8646 if test "x$as_val" = x""yes; then :
8647 cat >>confdefs.h <<_ACEOF
8648#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8649_ACEOF
8650 have_sound_header=yes
8651fi
8652
8653done
8654
8655 # Emulation library used on NetBSD.
8656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _oss_ioctl in -lossaudio" >&5
8657$as_echo_n "checking for _oss_ioctl in -lossaudio... " >&6; }
8658if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then :
067d23c9
KY
8659 $as_echo_n "(cached) " >&6
8660else
5476a9a4
GM
8661 ac_check_lib_save_LIBS=$LIBS
8662LIBS="-lossaudio $LIBS"
8663cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 8664/* end confdefs.h. */
5476a9a4
GM
8665
8666/* Override any GCC internal prototype to avoid an error.
8667 Use char because int might match the return type of a GCC
8668 builtin and then its argument prototype would still apply. */
8669#ifdef __cplusplus
8670extern "C"
8671#endif
8672char _oss_ioctl ();
067d23c9
KY
8673int
8674main ()
8675{
5476a9a4 8676return _oss_ioctl ();
067d23c9
KY
8677 ;
8678 return 0;
8679}
8680_ACEOF
8681if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 8682 ac_cv_lib_ossaudio__oss_ioctl=yes
067d23c9 8683else
5476a9a4 8684 ac_cv_lib_ossaudio__oss_ioctl=no
067d23c9
KY
8685fi
8686rm -f core conftest.err conftest.$ac_objext \
8687 conftest$ac_exeext conftest.$ac_ext
5476a9a4
GM
8688LIBS=$ac_check_lib_save_LIBS
8689fi
8690{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5
8691$as_echo "$ac_cv_lib_ossaudio__oss_ioctl" >&6; }
8692if test "x$ac_cv_lib_ossaudio__oss_ioctl" = x""yes; then :
8693 LIBSOUND=-lossaudio
8694else
8695 LIBSOUND=
067d23c9
KY
8696fi
8697
8698
8699
5476a9a4
GM
8700 ALSA_REQUIRED=1.0.0
8701 ALSA_MODULES="alsa >= $ALSA_REQUIRED"
8702
8703 succeeded=no
8704
8705 if test "$PKG_CONFIG" = "no" ; then
8706 HAVE_ALSA=no
8707 else
8708 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 8709 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
8710 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ALSA_MODULES" >&5
8711$as_echo_n "checking for $ALSA_MODULES... " >&6; }
8712
b5591ebb
GM
8713 if "$PKG_CONFIG" --exists "$ALSA_MODULES" 2>&5 &&
8714 ALSA_CFLAGS=`"$PKG_CONFIG" --cflags "$ALSA_MODULES" 2>&5` &&
8715 ALSA_LIBS=`"$PKG_CONFIG" --libs "$ALSA_MODULES" 2>&5`; then
5476a9a4
GM
8716 edit_cflags="
8717 s,///*,/,g
8718 s/^/ /
8719 s/ -I/ $isystem/g
8720 s/^ //
8721 "
8722 ALSA_CFLAGS=`$as_echo "$ALSA_CFLAGS" | sed -e "$edit_cflags"`
8723 ALSA_LIBS=`$as_echo "$ALSA_LIBS" | sed -e 's,///*,/,g'`
8724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$ALSA_CFLAGS' LIBS='$ALSA_LIBS'" >&5
8725$as_echo "yes CFLAGS='$ALSA_CFLAGS' LIBS='$ALSA_LIBS'" >&6; }
8726 succeeded=yes
8727 else
8728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8729$as_echo "no" >&6; }
8730 ALSA_CFLAGS=""
8731 ALSA_LIBS=""
8732 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
8733 ## do set a variable so people can do so. Do it in a subshell
8734 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 8735 ALSA_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$ALSA_MODULES") 2>&1`
5476a9a4
GM
8736
8737 fi
8738
8739
8740
8741 else
8742 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
8743 echo "*** See http://www.freedesktop.org/software/pkgconfig"
8744 fi
8745 fi
8746
8747 if test $succeeded = yes; then
8748 HAVE_ALSA=yes
8749 else
8750 HAVE_ALSA=no
8751 fi
f199cab1 8752
5476a9a4
GM
8753 if test $HAVE_ALSA = yes; then
8754 SAVE_CFLAGS="$CFLAGS"
8755 SAVE_LIBS="$LIBS"
8756 CFLAGS="$ALSA_CFLAGS $CFLAGS"
8757 LIBS="$ALSA_LIBS $LIBS"
8758 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8759/* end confdefs.h. */
8760#include <asoundlib.h>
067d23c9
KY
8761int
8762main ()
8763{
5476a9a4 8764snd_lib_error_set_handler (0);
067d23c9
KY
8765 ;
8766 return 0;
8767}
8768_ACEOF
5476a9a4
GM
8769if ac_fn_c_try_compile "$LINENO"; then :
8770 emacs_alsa_normal=yes
067d23c9 8771else
5476a9a4 8772 emacs_alsa_normal=no
067d23c9 8773fi
5476a9a4
GM
8774rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8775 if test "$emacs_alsa_normal" != yes; then
8776 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8777/* end confdefs.h. */
8778#include <alsa/asoundlib.h>
8779int
8780main ()
8781{
8782snd_lib_error_set_handler (0);
8783 ;
8784 return 0;
8785}
8786_ACEOF
8787if ac_fn_c_try_compile "$LINENO"; then :
8788 emacs_alsa_subdir=yes
8789else
8790 emacs_alsa_subdir=no
f199cab1 8791fi
5476a9a4
GM
8792rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8793 if test "$emacs_alsa_subdir" != yes; then
8794 as_fn_error "pkg-config found alsa, but it does not compile. See config.log for error messages." "$LINENO" 5
8795 fi
8796 ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE"
8797 fi
067d23c9 8798
5476a9a4
GM
8799 CFLAGS="$SAVE_CFLAGS"
8800 LIBS="$SAVE_LIBS"
8801 LIBSOUND="$LIBSOUND $ALSA_LIBS"
8802 CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS"
067d23c9 8803
5476a9a4 8804$as_echo "#define HAVE_ALSA 1" >>confdefs.h
067d23c9 8805
5476a9a4 8806 fi
067d23c9 8807
5476a9a4
GM
8808 if test x$have_sound_header = xyes || test $HAVE_ALSA = yes; then
8809 case "$opsys" in
8810 gnu-linux|freebsd|netbsd)
067d23c9 8811
5476a9a4 8812$as_echo "#define HAVE_SOUND 1" >>confdefs.h
067d23c9 8813
5476a9a4
GM
8814 ;;
8815 esac
8816 fi
067d23c9
KY
8817
8818
5476a9a4 8819fi
067d23c9 8820
e700232f
GM
8821
8822
8823
5476a9a4
GM
8824 for ac_header in $ac_header_list
8825do :
8826 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8827ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
8828"
8829eval as_val=\$$as_ac_Header
8830 if test "x$as_val" = x""yes; then :
8831 cat >>confdefs.h <<_ACEOF
8832#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
067d23c9
KY
8833_ACEOF
8834
f199cab1 8835fi
e700232f 8836
5476a9a4
GM
8837done
8838
8839
e700232f
GM
8840
8841
8842
f199cab1 8843
067d23c9 8844
067d23c9 8845
067d23c9 8846
067d23c9 8847
f199cab1
GM
8848
8849
8850
067d23c9 8851
067d23c9 8852
f199cab1
GM
8853
8854
8855
5476a9a4
GM
8856
8857
8858
8859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if personality LINUX32 can be set" >&5
8860$as_echo_n "checking if personality LINUX32 can be set... " >&6; }
8861cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8862/* end confdefs.h. */
8863#include <sys/personality.h>
067d23c9
KY
8864int
8865main ()
8866{
5476a9a4 8867personality (PER_LINUX32)
067d23c9
KY
8868 ;
8869 return 0;
8870}
8871_ACEOF
8872if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4 8873 emacs_cv_personality_linux32=yes
067d23c9 8874else
5476a9a4 8875 emacs_cv_personality_linux32=no
067d23c9 8876fi
f199cab1 8877rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5476a9a4
GM
8878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_personality_linux32" >&5
8879$as_echo "$emacs_cv_personality_linux32" >&6; }
f199cab1 8880
5476a9a4 8881if test $emacs_cv_personality_linux32 = yes; then
f199cab1 8882
5476a9a4
GM
8883$as_echo "#define HAVE_PERSONALITY_LINUX32 1" >>confdefs.h
8884
8885fi
8886
8887for ac_header in term.h
8888do :
8889 ac_fn_c_check_header_preproc "$LINENO" "term.h" "ac_cv_header_term_h"
8890if test "x$ac_cv_header_term_h" = x""yes; then :
8891 cat >>confdefs.h <<_ACEOF
8892#define HAVE_TERM_H 1
067d23c9 8893_ACEOF
5476a9a4
GM
8894
8895fi
8896
8897done
8898
8899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
8900$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
8901if test "${ac_cv_header_time+set}" = set; then :
8902 $as_echo_n "(cached) " >&6
8903else
8904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 8905/* end confdefs.h. */
5476a9a4
GM
8906#include <sys/types.h>
8907#include <sys/time.h>
8908#include <time.h>
f199cab1 8909
067d23c9
KY
8910int
8911main ()
8912{
5476a9a4
GM
8913if ((struct tm *) 0)
8914return 0;
067d23c9
KY
8915 ;
8916 return 0;
8917}
8918_ACEOF
8919if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4 8920 ac_cv_header_time=yes
067d23c9 8921else
5476a9a4 8922 ac_cv_header_time=no
067d23c9
KY
8923fi
8924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8925fi
5476a9a4
GM
8926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
8927$as_echo "$ac_cv_header_time" >&6; }
8928if test $ac_cv_header_time = yes; then
f199cab1 8929
5476a9a4
GM
8930$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
8931
8932fi
8933
dc67e786
GM
8934ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "#include <signal.h>
8935
8936"
5476a9a4
GM
8937if test "x$ac_cv_have_decl_sys_siglist" = x""yes; then :
8938 ac_have_decl=1
8939else
8940 ac_have_decl=0
8941fi
8942
8943cat >>confdefs.h <<_ACEOF
8944#define HAVE_DECL_SYS_SIGLIST $ac_have_decl
067d23c9 8945_ACEOF
5476a9a4
GM
8946
8947if test $ac_cv_have_decl_sys_siglist != yes; then
8948 # For Tru64, at least:
dc67e786
GM
8949 ac_fn_c_check_decl "$LINENO" "__sys_siglist" "ac_cv_have_decl___sys_siglist" "#include <signal.h>
8950
8951"
5476a9a4
GM
8952if test "x$ac_cv_have_decl___sys_siglist" = x""yes; then :
8953 ac_have_decl=1
8954else
8955 ac_have_decl=0
067d23c9 8956fi
5476a9a4
GM
8957
8958cat >>confdefs.h <<_ACEOF
8959#define HAVE_DECL___SYS_SIGLIST $ac_have_decl
8960_ACEOF
8961
8962 if test $ac_cv_have_decl___sys_siglist = yes; then
8963
8964$as_echo "#define sys_siglist __sys_siglist" >>confdefs.h
8965
8966 fi
8967fi
8968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
8969$as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
8970if test "${ac_cv_header_sys_wait_h+set}" = set; then :
8971 $as_echo_n "(cached) " >&6
067d23c9
KY
8972else
8973 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8974/* end confdefs.h. */
5476a9a4
GM
8975#include <sys/types.h>
8976#include <sys/wait.h>
8977#ifndef WEXITSTATUS
8978# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
8979#endif
8980#ifndef WIFEXITED
8981# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8982#endif
8983
067d23c9
KY
8984int
8985main ()
8986{
5476a9a4
GM
8987 int s;
8988 wait (&s);
8989 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
067d23c9
KY
8990 ;
8991 return 0;
8992}
8993_ACEOF
5476a9a4
GM
8994if ac_fn_c_try_compile "$LINENO"; then :
8995 ac_cv_header_sys_wait_h=yes
067d23c9 8996else
5476a9a4 8997 ac_cv_header_sys_wait_h=no
067d23c9 8998fi
5476a9a4 8999rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
067d23c9 9000fi
5476a9a4
GM
9001{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
9002$as_echo "$ac_cv_header_sys_wait_h" >&6; }
9003if test $ac_cv_header_sys_wait_h = yes; then
067d23c9 9004
5476a9a4 9005$as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
7417b37c 9006
5476a9a4 9007fi
7417b37c 9008
7417b37c 9009
5476a9a4
GM
9010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for speed_t" >&5
9011$as_echo_n "checking for speed_t... " >&6; }
9012if test "${emacs_cv_speed_t+set}" = set; then :
f199cab1
GM
9013 $as_echo_n "(cached) " >&6
9014else
f199cab1
GM
9015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9016/* end confdefs.h. */
5476a9a4
GM
9017#include <termios.h>
9018int
9019main ()
9020{
9021speed_t x = 1;
9022 ;
9023 return 0;
9024}
7417b37c 9025_ACEOF
f199cab1 9026if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4
GM
9027 emacs_cv_speed_t=yes
9028else
9029 emacs_cv_speed_t=no
7417b37c 9030fi
f199cab1 9031rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7417b37c 9032fi
5476a9a4
GM
9033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_speed_t" >&5
9034$as_echo "$emacs_cv_speed_t" >&6; }
9035if test $emacs_cv_speed_t = yes; then
7417b37c 9036
5476a9a4 9037$as_echo "#define HAVE_SPEED_T 1" >>confdefs.h
067d23c9 9038
5476a9a4 9039fi
067d23c9 9040
067d23c9
KY
9041
9042
e700232f 9043
5476a9a4
GM
9044for ac_header in net/if.h
9045do :
9046 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
9047#if HAVE_SYS_SOCKET_H
9048#include <sys/socket.h>
9049#endif
9050"
9051if test "x$ac_cv_header_net_if_h" = x""yes; then :
9052 cat >>confdefs.h <<_ACEOF
9053#define HAVE_NET_IF_H 1
067d23c9 9054_ACEOF
7cae64b4 9055
067d23c9 9056fi
067d23c9 9057
5476a9a4 9058done
4d4b75e8 9059
5476a9a4
GM
9060for ac_header in ifaddrs.h
9061do :
9062 ac_fn_c_check_header_compile "$LINENO" "ifaddrs.h" "ac_cv_header_ifaddrs_h" "$ac_includes_default
9063#if HAVE_SYS_SOCKET_H
9064#include <sys/socket.h>
9065#endif
9066"
9067if test "x$ac_cv_header_ifaddrs_h" = x""yes; then :
9068 cat >>confdefs.h <<_ACEOF
9069#define HAVE_IFADDRS_H 1
9070_ACEOF
4d4b75e8 9071
5476a9a4 9072fi
4d4b75e8 9073
5476a9a4 9074done
7e723570 9075
5476a9a4 9076for ac_header in net/if_dl.h
7e723570 9077do :
5476a9a4
GM
9078 ac_fn_c_check_header_compile "$LINENO" "net/if_dl.h" "ac_cv_header_net_if_dl_h" "$ac_includes_default
9079#if HAVE_SYS_SOCKET_H
9080#include <sys/socket.h>
9081#endif
7e723570 9082"
5476a9a4 9083if test "x$ac_cv_header_net_if_dl_h" = x""yes; then :
7e723570 9084 cat >>confdefs.h <<_ACEOF
5476a9a4 9085#define HAVE_NET_IF_DL_H 1
7e723570
GM
9086_ACEOF
9087
9088fi
9089
9090done
9091
9092
5476a9a4
GM
9093ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_flags" "ac_cv_member_struct_ifreq_ifr_flags" "$ac_includes_default
9094#if HAVE_SYS_SOCKET_H
9095#include <sys/socket.h>
9096#endif
9097#if HAVE_NET_IF_H
9098#include <net/if.h>
9099#endif
9100"
9101if test "x$ac_cv_member_struct_ifreq_ifr_flags" = x""yes; then :
7e723570 9102
5476a9a4
GM
9103cat >>confdefs.h <<_ACEOF
9104#define HAVE_STRUCT_IFREQ_IFR_FLAGS 1
9105_ACEOF
7e723570
GM
9106
9107
5476a9a4
GM
9108fi
9109ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_hwaddr" "ac_cv_member_struct_ifreq_ifr_hwaddr" "$ac_includes_default
9110#if HAVE_SYS_SOCKET_H
9111#include <sys/socket.h>
f199cab1 9112#endif
5476a9a4
GM
9113#if HAVE_NET_IF_H
9114#include <net/if.h>
f199cab1 9115#endif
5476a9a4
GM
9116"
9117if test "x$ac_cv_member_struct_ifreq_ifr_hwaddr" = x""yes; then :
9118
9119cat >>confdefs.h <<_ACEOF
9120#define HAVE_STRUCT_IFREQ_IFR_HWADDR 1
9121_ACEOF
9122
9123
9124fi
9125ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_netmask" "ac_cv_member_struct_ifreq_ifr_netmask" "$ac_includes_default
9126#if HAVE_SYS_SOCKET_H
9127#include <sys/socket.h>
f199cab1 9128#endif
5476a9a4
GM
9129#if HAVE_NET_IF_H
9130#include <net/if.h>
9131#endif
9132"
9133if test "x$ac_cv_member_struct_ifreq_ifr_netmask" = x""yes; then :
9134
9135cat >>confdefs.h <<_ACEOF
9136#define HAVE_STRUCT_IFREQ_IFR_NETMASK 1
f199cab1 9137_ACEOF
5476a9a4
GM
9138
9139
9140fi
9141ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_broadaddr" "ac_cv_member_struct_ifreq_ifr_broadaddr" "$ac_includes_default
9142#if HAVE_SYS_SOCKET_H
9143#include <sys/socket.h>
9144#endif
9145#if HAVE_NET_IF_H
9146#include <net/if.h>
9147#endif
9148"
9149if test "x$ac_cv_member_struct_ifreq_ifr_broadaddr" = x""yes; then :
9150
9151cat >>confdefs.h <<_ACEOF
9152#define HAVE_STRUCT_IFREQ_IFR_BROADADDR 1
f199cab1 9153_ACEOF
5476a9a4
GM
9154
9155
067d23c9 9156fi
5476a9a4
GM
9157ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_addr" "ac_cv_member_struct_ifreq_ifr_addr" "$ac_includes_default
9158#if HAVE_SYS_SOCKET_H
9159#include <sys/socket.h>
9160#endif
9161#if HAVE_NET_IF_H
9162#include <net/if.h>
9163#endif
9164"
9165if test "x$ac_cv_member_struct_ifreq_ifr_addr" = x""yes; then :
9166
9167cat >>confdefs.h <<_ACEOF
9168#define HAVE_STRUCT_IFREQ_IFR_ADDR 1
9169_ACEOF
9170
067d23c9 9171
f199cab1 9172fi
5476a9a4
GM
9173ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_addr.sa_len" "ac_cv_member_struct_ifreq_ifr_addr_sa_len" "$ac_includes_default
9174#if HAVE_SYS_SOCKET_H
9175#include <sys/socket.h>
9176#endif
9177#if HAVE_NET_IF_H
9178#include <net/if.h>
9179#endif
9180"
9181if test "x$ac_cv_member_struct_ifreq_ifr_addr_sa_len" = x""yes; then :
9182
9183cat >>confdefs.h <<_ACEOF
9184#define HAVE_STRUCT_IFREQ_IFR_ADDR_SA_LEN 1
9185_ACEOF
9186
067d23c9
KY
9187
9188fi
9189
9190
067d23c9 9191
f199cab1 9192
5476a9a4
GM
9193DEPFLAGS=
9194MKDEPDIR=":"
9195deps_frag=deps.mk
9196if test "$GCC" = yes && test "$ac_enable_autodepend" = yes; then
9197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using GNU Make" >&5
9198$as_echo_n "checking whether we are using GNU Make... " >&6; }
9199 HAVE_GNU_MAKE=no
9200 testval=`${MAKE-make} --version 2>/dev/null | grep 'GNU Make'`
9201 if test "x$testval" != x; then
9202 HAVE_GNU_MAKE=yes
9203 else
9204 ac_enable_autodepend=no
9205 fi
9206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_GNU_MAKE" >&5
9207$as_echo "$HAVE_GNU_MAKE" >&6; }
9208 if test $HAVE_GNU_MAKE = yes; then
9209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -MMD -MF" >&5
9210$as_echo_n "checking whether gcc understands -MMD -MF... " >&6; }
9211 SAVE_CFLAGS="$CFLAGS"
9212 CFLAGS="$CFLAGS -MMD -MF deps.d -MP"
9213 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9214/* end confdefs.h. */
f199cab1 9215
5476a9a4
GM
9216int
9217main ()
9218{
f199cab1 9219
5476a9a4
GM
9220 ;
9221 return 0;
9222}
9223_ACEOF
9224if ac_fn_c_try_compile "$LINENO"; then :
f199cab1 9225
5476a9a4
GM
9226else
9227 ac_enable_autodepend=no
9228fi
9229rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9230 CFLAGS="$SAVE_CFLAGS"
9231 test -f deps.d || ac_enable_autodepend=no
9232 rm -rf deps.d
9233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_autodepend" >&5
9234$as_echo "$ac_enable_autodepend" >&6; }
9235 fi
9236 if test $ac_enable_autodepend = yes; then
9237 DEPFLAGS='-MMD -MF ${DEPDIR}/$*.d -MP'
9238 ## MKDIR_P is documented (see AC_PROG_MKDIR_P) to be parallel-safe.
9239 MKDEPDIR='${MKDIR_P} ${DEPDIR}'
9240 deps_frag=autodeps.mk
9241 fi
9242fi
9243deps_frag=$srcdir/src/$deps_frag
f199cab1
GM
9244
9245
9246
9247
9248
5476a9a4 9249lisp_frag=$srcdir/src/lisp.mk
f199cab1
GM
9250
9251
9252
5476a9a4
GM
9253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long file names" >&5
9254$as_echo_n "checking for long file names... " >&6; }
9255if test "${ac_cv_sys_long_file_names+set}" = set; then :
9256 $as_echo_n "(cached) " >&6
9257else
9258 ac_cv_sys_long_file_names=yes
9259# Test for long file names in all the places we know might matter:
9260# . the current directory, where building will happen
9261# $prefix/lib where we will be installing things
9262# $exec_prefix/lib likewise
9263# $TMPDIR if set, where it might want to write temporary files
9264# /tmp where it might want to write temporary files
9265# /var/tmp likewise
9266# /usr/tmp likewise
9267for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do
9268 # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib
9269 # in the usual case where exec_prefix is '${prefix}'.
9270 case $ac_dir in #(
9271 . | /* | ?:[\\/]*) ;; #(
9272 *) continue;;
9273 esac
9274 test -w "$ac_dir/." || continue # It is less confusing to not echo anything here.
9275 ac_xdir=$ac_dir/cf$$
9276 (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
9277 ac_tf1=$ac_xdir/conftest9012345
9278 ac_tf2=$ac_xdir/conftest9012346
9279 touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" ||
9280 ac_cv_sys_long_file_names=no
9281 rm -f -r "$ac_xdir" 2>/dev/null
9282 test $ac_cv_sys_long_file_names = no && break
9283done
9284fi
9285{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_long_file_names" >&5
9286$as_echo "$ac_cv_sys_long_file_names" >&6; }
9287if test $ac_cv_sys_long_file_names = yes; then
f199cab1 9288
5476a9a4 9289$as_echo "#define HAVE_LONG_FILE_NAMES 1" >>confdefs.h
f199cab1 9290
5476a9a4 9291fi
f199cab1 9292
f199cab1 9293
5476a9a4 9294#### Choose a window system.
f199cab1 9295
42dcba54
GM
9296## We leave window_system equal to none if
9297## we end up building without one. Any new window system should
9298## set window_system to an appropriate value and add objects to
9299## window-system-specific substs.
9300
9301window_system=none
5476a9a4
GM
9302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
9303$as_echo_n "checking for X... " >&6; }
f199cab1 9304
f199cab1 9305
5476a9a4
GM
9306# Check whether --with-x was given.
9307if test "${with_x+set}" = set; then :
9308 withval=$with_x;
9309fi
f199cab1 9310
5476a9a4
GM
9311# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
9312if test "x$with_x" = xno; then
9313 # The user explicitly disabled X.
9314 have_x=disabled
9315else
9316 case $x_includes,$x_libraries in #(
9317 *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
9318 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
9319 $as_echo_n "(cached) " >&6
9320else
9321 # One or both of the vars are not set, and there is no cached value.
9322ac_x_includes=no ac_x_libraries=no
9323rm -f -r conftest.dir
9324if mkdir conftest.dir; then
9325 cd conftest.dir
9326 cat >Imakefile <<'_ACEOF'
9327incroot:
9328 @echo incroot='${INCROOT}'
9329usrlibdir:
9330 @echo usrlibdir='${USRLIBDIR}'
9331libdir:
9332 @echo libdir='${LIBDIR}'
9333_ACEOF
9334 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
9335 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
9336 for ac_var in incroot usrlibdir libdir; do
9337 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
9338 done
9339 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
9340 for ac_extension in a so sl dylib la dll; do
9341 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
9342 test -f "$ac_im_libdir/libX11.$ac_extension"; then
9343 ac_im_usrlibdir=$ac_im_libdir; break
9344 fi
9345 done
9346 # Screen out bogus values from the imake configuration. They are
9347 # bogus both because they are the default anyway, and because
9348 # using them would break gcc on systems where it needs fixed includes.
9349 case $ac_im_incroot in
9350 /usr/include) ac_x_includes= ;;
9351 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
9352 esac
9353 case $ac_im_usrlibdir in
9354 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
9355 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
9356 esac
9357 fi
9358 cd ..
9359 rm -f -r conftest.dir
067d23c9
KY
9360fi
9361
5476a9a4
GM
9362# Standard set of common directories for X headers.
9363# Check X11 before X11Rn because it is often a symlink to the current release.
9364ac_x_header_dirs='
9365/usr/X11/include
9366/usr/X11R7/include
9367/usr/X11R6/include
9368/usr/X11R5/include
9369/usr/X11R4/include
067d23c9 9370
5476a9a4
GM
9371/usr/include/X11
9372/usr/include/X11R7
9373/usr/include/X11R6
9374/usr/include/X11R5
9375/usr/include/X11R4
067d23c9 9376
5476a9a4
GM
9377/usr/local/X11/include
9378/usr/local/X11R7/include
9379/usr/local/X11R6/include
9380/usr/local/X11R5/include
9381/usr/local/X11R4/include
067d23c9 9382
5476a9a4
GM
9383/usr/local/include/X11
9384/usr/local/include/X11R7
9385/usr/local/include/X11R6
9386/usr/local/include/X11R5
9387/usr/local/include/X11R4
067d23c9 9388
5476a9a4
GM
9389/usr/X386/include
9390/usr/x386/include
9391/usr/XFree86/include/X11
067d23c9 9392
5476a9a4
GM
9393/usr/include
9394/usr/local/include
9395/usr/unsupported/include
9396/usr/athena/include
9397/usr/local/x11r5/include
9398/usr/lpp/Xamples/include
067d23c9 9399
5476a9a4
GM
9400/usr/openwin/include
9401/usr/openwin/share/include'
067d23c9 9402
5476a9a4
GM
9403if test "$ac_x_includes" = no; then
9404 # Guess where to find include files, by looking for Xlib.h.
9405 # First, try using that file with no special directory specified.
9406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9407/* end confdefs.h. */
9408#include <X11/Xlib.h>
067d23c9 9409_ACEOF
5476a9a4
GM
9410if ac_fn_c_try_cpp "$LINENO"; then :
9411 # We can compile using X headers with no special include directory.
9412ac_x_includes=
067d23c9 9413else
5476a9a4
GM
9414 for ac_dir in $ac_x_header_dirs; do
9415 if test -r "$ac_dir/X11/Xlib.h"; then
9416 ac_x_includes=$ac_dir
9417 break
f199cab1 9418 fi
f199cab1 9419done
5476a9a4
GM
9420fi
9421rm -f conftest.err conftest.$ac_ext
9422fi # $ac_x_includes = no
067d23c9 9423
5476a9a4
GM
9424if test "$ac_x_libraries" = no; then
9425 # Check for the libraries.
9426 # See if we find them without any special options.
9427 # Don't add to $LIBS permanently.
9428 ac_save_LIBS=$LIBS
9429 LIBS="-lX11 $LIBS"
7ee3791f 9430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 9431/* end confdefs.h. */
5476a9a4 9432#include <X11/Xlib.h>
067d23c9
KY
9433int
9434main ()
9435{
5476a9a4
GM
9436XrmInitialize ()
9437 ;
067d23c9
KY
9438 return 0;
9439}
9440_ACEOF
5476a9a4
GM
9441if ac_fn_c_try_link "$LINENO"; then :
9442 LIBS=$ac_save_LIBS
9443# We can link X programs with no special library path.
9444ac_x_libraries=
7ee3791f 9445else
5476a9a4
GM
9446 LIBS=$ac_save_LIBS
9447for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
9448do
9449 # Don't even attempt the hair of trying to link an X program!
9450 for ac_extension in a so sl dylib la dll; do
9451 if test -r "$ac_dir/libX11.$ac_extension"; then
9452 ac_x_libraries=$ac_dir
9453 break 2
9454 fi
9455 done
9456done
7ee3791f 9457fi
5476a9a4
GM
9458rm -f core conftest.err conftest.$ac_objext \
9459 conftest$ac_exeext conftest.$ac_ext
9460fi # $ac_x_libraries = no
7ee3791f 9461
5476a9a4
GM
9462case $ac_x_includes,$ac_x_libraries in #(
9463 no,* | *,no | *\'*)
9464 # Didn't find X, or a directory has "'" in its name.
9465 ac_cv_have_x="have_x=no";; #(
9466 *)
9467 # Record where we found X for the cache.
9468 ac_cv_have_x="have_x=yes\
9469 ac_x_includes='$ac_x_includes'\
9470 ac_x_libraries='$ac_x_libraries'"
9471esac
9472fi
9473;; #(
9474 *) have_x=yes;;
9475 esac
9476 eval "$ac_cv_have_x"
9477fi # $with_x != no
9478
9479if test "$have_x" != yes; then
9480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
9481$as_echo "$have_x" >&6; }
9482 no_x=yes
9483else
9484 # If each of the values was on the command line, it overrides each guess.
9485 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
9486 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
9487 # Update the cache value to reflect the command line values.
9488 ac_cv_have_x="have_x=yes\
9489 ac_x_includes='$x_includes'\
9490 ac_x_libraries='$x_libraries'"
9491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
9492$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
9493fi
9494
42dcba54 9495if test "$no_x" != yes; then
5476a9a4
GM
9496 window_system=x11
9497fi
9498
9499LD_SWITCH_X_SITE_RPATH=
9500if test "${x_libraries}" != NONE; then
9501 if test -n "${x_libraries}"; then
9502 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
9503 LD_SWITCH_X_SITE_RPATH=-Wl,-rpath,`echo ${x_libraries} | sed -e "s/:/ -Wl,-rpath,/g"`
9504 fi
9505 x_default_search_path=""
9506 x_search_path=${x_libraries}
9507 if test -z "${x_search_path}"; then
9508 x_search_path=/usr/lib
9509 fi
9510 for x_library in `echo ${x_search_path}: | \
9511 sed -e "s/:/ /g" -e p -e "s:/lib[^ /]* :/share :g"`; do
9512 x_search_path="\
9513${x_library}/X11/%L/%T/%N%C%S:\
9514${x_library}/X11/%l/%T/%N%C%S:\
9515${x_library}/X11/%T/%N%C%S:\
9516${x_library}/X11/%L/%T/%N%S:\
9517${x_library}/X11/%l/%T/%N%S:\
9518${x_library}/X11/%T/%N%S"
9519 if test x"${x_default_search_path}" = x; then
9520 x_default_search_path=${x_search_path}
9521 else
9522 x_default_search_path="${x_search_path}:${x_default_search_path}"
9523 fi
9524 done
9525fi
9526
9527
9528if test "${x_includes}" != NONE && test -n "${x_includes}"; then
9529 C_SWITCH_X_SITE="$isystem"`echo ${x_includes} | sed -e "s/:/ $isystem/g"`
9530fi
9531
9532if test x"${x_includes}" = x; then
9533 bitmapdir=/usr/include/X11/bitmaps
9534else
9535 # accumulate include directories that have X11 bitmap subdirectories
9536 bmd_acc="dummyval"
9537 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
9538 if test -d "${bmd}/X11/bitmaps"; then
9539 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
9540 fi
9541 if test -d "${bmd}/bitmaps"; then
9542 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
9543 fi
9544 done
9545 if test ${bmd_acc} != "dummyval"; then
9546 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
9547 fi
9548fi
7ee3791f 9549
5476a9a4
GM
9550HAVE_NS=no
9551NS_IMPL_COCOA=no
9552NS_IMPL_GNUSTEP=no
9553tmp_CPPFLAGS="$CPPFLAGS"
9554tmp_CFLAGS="$CFLAGS"
9555CPPFLAGS="$CPPFLAGS -x objective-c"
9556CFLAGS="$CFLAGS -x objective-c"
5476a9a4 9557GNU_OBJC_CFLAGS=
4efe5ef9 9558LIBS_GNUSTEP=
5476a9a4
GM
9559if test "${with_ns}" != no; then
9560 if test "${opsys}" = darwin; then
9561 NS_IMPL_COCOA=yes
9562 ns_appdir=`pwd`/nextstep/Emacs.app
9563 ns_appbindir=${ns_appdir}/Contents/MacOS
9564 ns_appresdir=${ns_appdir}/Contents/Resources
bb7dce39 9565 ns_appsrc=Cocoa/Emacs.base
5476a9a4
GM
9566 elif test -f $GNUSTEP_CONFIG_FILE; then
9567 NS_IMPL_GNUSTEP=yes
9568 ns_appdir=`pwd`/nextstep/Emacs.app
9569 ns_appbindir=${ns_appdir}
9570 ns_appresdir=${ns_appdir}/Resources
bb7dce39 9571 ns_appsrc=GNUstep/Emacs.base
5476a9a4
GM
9572 GNUSTEP_SYSTEM_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_HEADERS)"
9573 GNUSTEP_SYSTEM_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_LIBRARIES)"
9574 GNUSTEP_LOCAL_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_HEADERS)"
9575 GNUSTEP_LOCAL_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_LIBRARIES)"
9576 test "x${GNUSTEP_LOCAL_HEADERS}" != "x" && \
9577 GNUSTEP_LOCAL_HEADERS="-I${GNUSTEP_LOCAL_HEADERS}"
9578 test "x${GNUSTEP_LOCAL_LIBRARIES}" != "x" && \
9579 GNUSTEP_LOCAL_LIBRARIES="-L${GNUSTEP_LOCAL_LIBRARIES}"
9580 CPPFLAGS="$CPPFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
9581 CFLAGS="$CFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
9582 LDFLAGS="$LDFLAGS -L${GNUSTEP_SYSTEM_LIBRARIES} ${GNUSTEP_LOCAL_LIBRARIES}"
4efe5ef9 9583 LIBS_GNUSTEP="-lgnustep-gui -lgnustep-base -lobjc -lpthread"
5476a9a4
GM
9584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if GNUstep defines BASE_NATIVE_OBJC_EXCEPTIONS" >&5
9585$as_echo_n "checking if GNUstep defines BASE_NATIVE_OBJC_EXCEPTIONS... " >&6; }
9586if test "${emacs_cv_objc_exceptions+set}" = set; then :
9587 $as_echo_n "(cached) " >&6
9588else
9589 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9590/* end confdefs.h. */
9591#include <GNUstepBase/GSConfig.h>
39b3d70b
GM
9592int
9593main ()
9594{
5476a9a4
GM
9595#if defined BASE_NATIVE_OBJC_EXCEPTIONS && BASE_NATIVE_OBJC_EXCEPTIONS > 0
95961;
9597#else
9598fail;
9599#endif
9600 ;
39b3d70b
GM
9601 return 0;
9602}
9603_ACEOF
5476a9a4
GM
9604if ac_fn_c_try_compile "$LINENO"; then :
9605 emacs_cv_objc_exceptions=yes
39b3d70b 9606else
5476a9a4 9607 emacs_cv_objc_exceptions=no
39b3d70b 9608fi
5476a9a4 9609rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
39b3d70b 9610fi
5476a9a4
GM
9611{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_objc_exceptions" >&5
9612$as_echo "$emacs_cv_objc_exceptions" >&6; }
9613 if test $emacs_cv_objc_exceptions = yes; then
39b3d70b 9614
5476a9a4
GM
9615$as_echo "#define _NATIVE_OBJC_EXCEPTIONS 1" >>confdefs.h
9616
9617 GNU_OBJC_CFLAGS="-fobjc-exceptions"
9618 fi
9619 fi
9620
9621 CFLAGS="$CFLAGS $GNU_OBJC_CFLAGS"
9622
9623 ac_fn_c_check_header_mongrel "$LINENO" "AppKit/AppKit.h" "ac_cv_header_AppKit_AppKit_h" "$ac_includes_default"
9624if test "x$ac_cv_header_AppKit_AppKit_h" = x""yes; then :
9625 HAVE_NS=yes
067d23c9 9626else
5476a9a4
GM
9627 as_fn_error "\`--with-ns' was specified, but the include
9628 files are missing or cannot be compiled." "$LINENO" 5
9629fi
f199cab1 9630
f199cab1 9631
dc67e786
GM
9632
9633 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9634/* end confdefs.h. */
9635#include <AppKit/AppKit.h>
9636int
9637main ()
9638{
9639
9640#ifdef MAC_OS_X_VERSION_MAX_ALLOWED
9641#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1040
9642 ; /* OK */
9643#else
9644#error "OSX 10.4 or newer required"
9645#endif
9646#endif
9647
9648 ;
9649 return 0;
9650}
9651_ACEOF
9652if ac_fn_c_try_compile "$LINENO"; then :
9653 ns_osx_have_104=yes
9654else
9655 ns_osx_have_104=no
9656fi
9657rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5476a9a4
GM
9658 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9659/* end confdefs.h. */
9660#include <Foundation/NSObjCRuntime.h>
067d23c9
KY
9661int
9662main ()
9663{
5476a9a4
GM
9664NSInteger i;
9665 ;
067d23c9
KY
9666 return 0;
9667}
9668_ACEOF
5476a9a4
GM
9669if ac_fn_c_try_compile "$LINENO"; then :
9670 ns_have_nsinteger=yes
067d23c9 9671else
5476a9a4 9672 ns_have_nsinteger=no
067d23c9 9673fi
5476a9a4 9674rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
dc67e786
GM
9675 if test $ns_osx_have_104 = no; then
9676 as_fn_error "\`OSX 10.4 or newer is required'" "$LINENO" 5;
9677 fi
5476a9a4 9678 if test $ns_have_nsinteger = yes; then
067d23c9 9679
5476a9a4 9680$as_echo "#define NS_HAVE_NSINTEGER 1" >>confdefs.h
067d23c9 9681
067d23c9 9682 fi
5476a9a4 9683fi
067d23c9 9684
5476a9a4 9685
5c0255d9 9686
5476a9a4
GM
9687INSTALL_ARCH_INDEP_EXTRA=install-etc
9688ns_self_contained=no
5476a9a4
GM
9689NS_OBJ=
9690NS_OBJC_OBJ=
9691if test "${HAVE_NS}" = yes; then
9692 if test "$with_toolkit_scroll_bars" = "no"; then
9693 as_fn_error "Non-toolkit scroll bars are not implemented for Nextstep." "$LINENO" 5
9694 fi
9695
9696 window_system=nextstep
5476a9a4
GM
9697 # set up packaging dirs
9698 if test "${EN_NS_SELF_CONTAINED}" = yes; then
9699 ns_self_contained=yes
9700 prefix=${ns_appresdir}
9701 exec_prefix=${ns_appbindir}
9702 libexecdir="\${ns_appbindir}/libexec"
9703 archlibdir="\${ns_appbindir}/libexec"
9704 docdir="\${ns_appresdir}/etc"
9705 etcdir="\${ns_appresdir}/etc"
9706 infodir="\${ns_appresdir}/info"
9707 mandir="\${ns_appresdir}/man"
9708 lispdir="\${ns_appresdir}/lisp"
9709 leimdir="\${ns_appresdir}/leim"
9710 INSTALL_ARCH_INDEP_EXTRA=
9711 fi
5476a9a4
GM
9712 NS_OBJC_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o"
9713fi
9714CFLAGS="$tmp_CFLAGS"
9715CPPFLAGS="$tmp_CPPFLAGS"
9716
9717
9718
9719
9720
5c0255d9
GM
9721HAVE_W32=no
9722W32_OBJ=
9723W32_LIBS=
b5eb356a
GM
9724W32_RES=
9725W32_RES_LINK=
5c0255d9
GM
9726if test "${with_w32}" != no; then
9727 if test "${opsys}" != "cygwin"; then
9728 as_fn_error "Using w32 with an autotools build is only supported for Cygwin." "$LINENO" 5
9729 fi
9730 ac_fn_c_check_header_mongrel "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default"
9731if test "x$ac_cv_header_windows_h" = x""yes; then :
9732 HAVE_W32=yes
9733else
9734 as_fn_error "\`--with-w32' was specified, but windows.h
9735 cannot be found." "$LINENO" 5
9736fi
9737
9738
9739
9740$as_echo "#define HAVE_NTGUI 1" >>confdefs.h
9741
b5eb356a
GM
9742 if test -n "$ac_tool_prefix"; then
9743 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
9744set dummy ${ac_tool_prefix}windres; ac_word=$2
9745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9746$as_echo_n "checking for $ac_word... " >&6; }
9747if test "${ac_cv_prog_WINDRES+set}" = set; then :
9748 $as_echo_n "(cached) " >&6
9749else
9750 if test -n "$WINDRES"; then
9751 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
9752else
9753as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9754for as_dir in $PATH
9755do
9756 IFS=$as_save_IFS
9757 test -z "$as_dir" && as_dir=.
9758 for ac_exec_ext in '' $ac_executable_extensions; do
9759 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9760 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
9761 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9762 break 2
9763 fi
9764done
9765 done
9766IFS=$as_save_IFS
9767
9768fi
9769fi
9770WINDRES=$ac_cv_prog_WINDRES
9771if test -n "$WINDRES"; then
9772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
9773$as_echo "$WINDRES" >&6; }
9774else
9775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9776$as_echo "no" >&6; }
9777fi
9778
9779
9780fi
9781if test -z "$ac_cv_prog_WINDRES"; then
9782 ac_ct_WINDRES=$WINDRES
9783 # Extract the first word of "windres", so it can be a program name with args.
9784set dummy windres; ac_word=$2
9785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9786$as_echo_n "checking for $ac_word... " >&6; }
9787if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then :
9788 $as_echo_n "(cached) " >&6
9789else
9790 if test -n "$ac_ct_WINDRES"; then
9791 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
9792else
9793as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9794for as_dir in $PATH
9795do
9796 IFS=$as_save_IFS
9797 test -z "$as_dir" && as_dir=.
9798 for ac_exec_ext in '' $ac_executable_extensions; do
9799 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9800 ac_cv_prog_ac_ct_WINDRES="windres"
9801 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9802 break 2
9803 fi
9804done
9805 done
9806IFS=$as_save_IFS
9807
9808fi
9809fi
9810ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
9811if test -n "$ac_ct_WINDRES"; then
9812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
9813$as_echo "$ac_ct_WINDRES" >&6; }
9814else
9815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9816$as_echo "no" >&6; }
9817fi
9818
9819 if test "x$ac_ct_WINDRES" = x; then
9820 WINDRES="as_fn_error "No resource compiler found." "$LINENO" 5"
9821 else
9822 case $cross_compiling:$ac_tool_warned in
9823yes:)
9824{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9825$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9826ac_tool_warned=yes ;;
9827esac
9828 WINDRES=$ac_ct_WINDRES
9829 fi
9830else
9831 WINDRES="$ac_cv_prog_WINDRES"
9832fi
9833
5c0255d9
GM
9834 W32_OBJ="w32fns.o w32menu.o w32reg.o w32font.o w32term.o"
9835 W32_OBJ="$W32_OBJ w32xfns.o w32select.o w32uniscribe.o"
9836 W32_LIBS="$W32_LIBS -lkernel32 -luser32 -lgdi32 -lole32 -lcomdlg32"
9837 W32_LIBS="$W32_LIBS -lusp10 -lcomctl32 -lwinspool"
b5eb356a
GM
9838 W32_RES="emacs.res"
9839 # Tell the linker that emacs.res is an object (which we compile from
9840 # the rc file), not a linker script.
9841 W32_RES_LINK="-Wl,-bpe-i386 -Wl,emacs.res"
5c0255d9
GM
9842fi
9843
9844
9845
b5eb356a
GM
9846
9847
5c0255d9
GM
9848if test "${HAVE_W32}" = "yes"; then
9849 window_system=w32
9850 with_xft=no
9851fi
9852
42dcba54
GM
9853## $window_system is now set to the window system we will
9854## ultimately use.
9855
9856term_header=
9857HAVE_X_WINDOWS=no
9858HAVE_X11=no
9859USE_X_TOOLKIT=none
9860
5476a9a4
GM
9861case "${window_system}" in
9862 x11 )
9863 HAVE_X_WINDOWS=yes
9864 HAVE_X11=yes
42dcba54 9865 term_header=xterm.h
5476a9a4
GM
9866 case "${with_x_toolkit}" in
9867 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
9868 motif ) USE_X_TOOLKIT=MOTIF ;;
9869 gtk ) with_gtk=yes
42dcba54 9870 term_header=gtkutil.h
5476a9a4 9871 USE_X_TOOLKIT=none ;;
4fa92495
GM
9872 gtk2 ) with_gtk2=yes
9873 term_header=gtkutil.h
9874 USE_X_TOOLKIT=none ;;
5476a9a4 9875 gtk3 ) with_gtk3=yes
42dcba54 9876 term_header=gtkutil.h
5476a9a4
GM
9877 USE_X_TOOLKIT=none ;;
9878 no ) USE_X_TOOLKIT=none ;;
9879 * ) USE_X_TOOLKIT=maybe ;;
9880 esac
9881 ;;
42dcba54
GM
9882 nextstep )
9883 term_header=nsterm.h
5476a9a4 9884 ;;
5c0255d9
GM
9885 w32 )
9886 term_header=w32term.h
9887 ;;
5476a9a4
GM
9888esac
9889
42dcba54
GM
9890if test -n "${term_header}"; then
9891
9892cat >>confdefs.h <<_ACEOF
9893#define TERM_HEADER "${term_header}"
9894_ACEOF
9895
9896fi
9897
5476a9a4
GM
9898if test "$window_system" = none && test "X$with_x" != "Xno"; then
9899 # Extract the first word of "X", so it can be a program name with args.
9900set dummy X; ac_word=$2
9901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9902$as_echo_n "checking for $ac_word... " >&6; }
9903if test "${ac_cv_prog_HAVE_XSERVER+set}" = set; then :
9904 $as_echo_n "(cached) " >&6
9905else
9906 if test -n "$HAVE_XSERVER"; then
9907 ac_cv_prog_HAVE_XSERVER="$HAVE_XSERVER" # Let the user override the test.
9908else
9909as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9910for as_dir in $PATH
9911do
9912 IFS=$as_save_IFS
9913 test -z "$as_dir" && as_dir=.
9914 for ac_exec_ext in '' $ac_executable_extensions; do
9915 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9916 ac_cv_prog_HAVE_XSERVER="true"
9917 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9918 break 2
9919 fi
9920done
9921 done
9922IFS=$as_save_IFS
9923
9924 test -z "$ac_cv_prog_HAVE_XSERVER" && ac_cv_prog_HAVE_XSERVER="false"
9925fi
9926fi
9927HAVE_XSERVER=$ac_cv_prog_HAVE_XSERVER
9928if test -n "$HAVE_XSERVER"; then
9929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_XSERVER" >&5
9930$as_echo "$HAVE_XSERVER" >&6; }
9931else
9932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9933$as_echo "no" >&6; }
9934fi
9935
9936
9937 if test "$HAVE_XSERVER" = true ||
9938 test -n "$DISPLAY" ||
9939 test "`echo /usr/lib/libX11.*`" != "/usr/lib/libX11.*"; then
9940 as_fn_error "You seem to be running X, but no X development libraries
9941were found. You should install the relevant development files for X
9942and for the toolkit you want, such as Gtk+, Lesstif or Motif. Also make
9943sure you have development files for image handling, i.e.
9944tiff, gif, jpeg, png and xpm.
9945If you are sure you want Emacs compiled without X window support, pass
9946 --without-x
9947to configure." "$LINENO" 5
9948 fi
9949fi
9950
9951### If we're using X11, we should use the X menu package.
9952HAVE_MENUS=no
9953case ${HAVE_X11} in
9954 yes ) HAVE_MENUS=yes ;;
9955esac
9956
9957# Does the opsystem file prohibit the use of the GNU malloc?
9958# Assume not, until told otherwise.
9959GNU_MALLOC=yes
9960
9961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc is Doug Lea style" >&5
9962$as_echo_n "checking whether malloc is Doug Lea style... " >&6; }
9963if test "${emacs_cv_var_doug_lea_malloc+set}" = set; then :
067d23c9
KY
9964 $as_echo_n "(cached) " >&6
9965else
5476a9a4
GM
9966 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9967/* end confdefs.h. */
9968#include <malloc.h>
9969 static void hook (void) {}
9970int
9971main ()
9972{
9973malloc_set_state (malloc_get_state ());
9974 __after_morecore_hook = hook;
9975 __malloc_initialize_hook = hook;
9976 ;
9977 return 0;
9978}
9979_ACEOF
9980if ac_fn_c_try_link "$LINENO"; then :
9981 emacs_cv_var_doug_lea_malloc=yes
9982else
9983 emacs_cv_var_doug_lea_malloc=no
9984fi
9985rm -f core conftest.err conftest.$ac_objext \
9986 conftest$ac_exeext conftest.$ac_ext
9987fi
9988{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_var_doug_lea_malloc" >&5
9989$as_echo "$emacs_cv_var_doug_lea_malloc" >&6; }
9990doug_lea_malloc=$emacs_cv_var_doug_lea_malloc
9991
9992
9993system_malloc=no
9994case "$opsys" in
9995 ## darwin ld insists on the use of malloc routines in the System framework.
9996 darwin|sol2-10) system_malloc=yes ;;
9997esac
9998
9999if test "${system_malloc}" = "yes"; then
10000
10001$as_echo "#define SYSTEM_MALLOC 1" >>confdefs.h
10002
10003 GNU_MALLOC=no
10004 GNU_MALLOC_reason="
10005 (The GNU allocators don't work with this system configuration.)"
10006 GMALLOC_OBJ=
10007 VMLIMIT_OBJ=
10008else
10009 test "$doug_lea_malloc" != "yes" && GMALLOC_OBJ=gmalloc.o
10010 VMLIMIT_OBJ=vm-limit.o
ce9ae7ca
GM
10011
10012 for ac_header in sys/vlimit.h
10013do :
10014 ac_fn_c_check_header_mongrel "$LINENO" "sys/vlimit.h" "ac_cv_header_sys_vlimit_h" "$ac_includes_default"
10015if test "x$ac_cv_header_sys_vlimit_h" = x""yes; then :
10016 cat >>confdefs.h <<_ACEOF
10017#define HAVE_SYS_VLIMIT_H 1
10018_ACEOF
10019
10020fi
10021
10022done
10023
10024 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for data_start" >&5
10025$as_echo_n "checking for data_start... " >&6; }
10026if test "${emacs_cv_data_start+set}" = set; then :
10027 $as_echo_n "(cached) " >&6
10028else
10029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10030/* end confdefs.h. */
10031extern char data_start[]; char ch;
10032int
10033main ()
10034{
71e41a46 10035return data_start < &ch;
ce9ae7ca
GM
10036 ;
10037 return 0;
10038}
10039_ACEOF
10040if ac_fn_c_try_link "$LINENO"; then :
10041 emacs_cv_data_start=yes
10042else
10043 emacs_cv_data_start=no
10044fi
10045rm -f core conftest.err conftest.$ac_objext \
10046 conftest$ac_exeext conftest.$ac_ext
10047fi
10048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_data_start" >&5
10049$as_echo "$emacs_cv_data_start" >&6; }
10050 if test $emacs_cv_data_start = yes; then
10051
10052$as_echo "#define HAVE_DATA_START 1" >>confdefs.h
10053
10054 fi
5476a9a4
GM
10055fi
10056
10057
10058
10059if test "$doug_lea_malloc" = "yes" ; then
10060 if test "$GNU_MALLOC" = yes ; then
10061 GNU_MALLOC_reason="
10062 (Using Doug Lea's new malloc from the GNU C Library.)"
10063 fi
10064
10065$as_echo "#define DOUG_LEA_MALLOC 1" >>confdefs.h
10066
10067
10068 ## Use mmap directly for allocating larger buffers.
10069 ## FIXME this comes from src/s/{gnu,gnu-linux}.h:
10070 ## #ifdef DOUG_LEA_MALLOC; #undef REL_ALLOC; #endif
10071 ## Does the AC_FUNC_MMAP test below make this check unnecessary?
10072 case "$opsys" in
10073 gnu*) REL_ALLOC=no ;;
10074 esac
10075fi
10076
10077if test x"${REL_ALLOC}" = x; then
10078 REL_ALLOC=${GNU_MALLOC}
10079fi
10080
10081use_mmap_for_buffers=no
10082case "$opsys" in
10083 cygwin|freebsd|irix6-5) use_mmap_for_buffers=yes ;;
10084esac
10085
10086
10087
10088
10089
10090
10091
10092
10093for ac_func in getpagesize
10094do :
10095 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
10096if test "x$ac_cv_func_getpagesize" = x""yes; then :
10097 cat >>confdefs.h <<_ACEOF
10098#define HAVE_GETPAGESIZE 1
10099_ACEOF
10100
10101fi
10102done
10103
10104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
10105$as_echo_n "checking for working mmap... " >&6; }
10106if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
10107 $as_echo_n "(cached) " >&6
10108else
10109 if test "$cross_compiling" = yes; then :
10110 ac_cv_func_mmap_fixed_mapped=no
10111else
10112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10113/* end confdefs.h. */
10114$ac_includes_default
10115/* malloc might have been renamed as rpl_malloc. */
10116#undef malloc
10117
10118/* Thanks to Mike Haertel and Jim Avera for this test.
10119 Here is a matrix of mmap possibilities:
10120 mmap private not fixed
10121 mmap private fixed at somewhere currently unmapped
10122 mmap private fixed at somewhere already mapped
10123 mmap shared not fixed
10124 mmap shared fixed at somewhere currently unmapped
10125 mmap shared fixed at somewhere already mapped
10126 For private mappings, we should verify that changes cannot be read()
10127 back from the file, nor mmap's back from the file at a different
10128 address. (There have been systems where private was not correctly
10129 implemented like the infamous i386 svr4.0, and systems where the
10130 VM page cache was not coherent with the file system buffer cache
10131 like early versions of FreeBSD and possibly contemporary NetBSD.)
10132 For shared mappings, we should conversely verify that changes get
10133 propagated back to all the places they're supposed to be.
10134
10135 Grep wants private fixed already mapped.
10136 The main things grep needs to know about mmap are:
10137 * does it exist and is it safe to write into the mmap'd area
10138 * how to use it (BSD variants) */
10139
10140#include <fcntl.h>
10141#include <sys/mman.h>
10142
10143#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
10144char *malloc ();
10145#endif
10146
10147/* This mess was copied from the GNU getpagesize.h. */
10148#ifndef HAVE_GETPAGESIZE
10149# ifdef _SC_PAGESIZE
10150# define getpagesize() sysconf(_SC_PAGESIZE)
10151# else /* no _SC_PAGESIZE */
10152# ifdef HAVE_SYS_PARAM_H
10153# include <sys/param.h>
10154# ifdef EXEC_PAGESIZE
10155# define getpagesize() EXEC_PAGESIZE
10156# else /* no EXEC_PAGESIZE */
10157# ifdef NBPG
10158# define getpagesize() NBPG * CLSIZE
10159# ifndef CLSIZE
10160# define CLSIZE 1
10161# endif /* no CLSIZE */
10162# else /* no NBPG */
10163# ifdef NBPC
10164# define getpagesize() NBPC
10165# else /* no NBPC */
10166# ifdef PAGESIZE
10167# define getpagesize() PAGESIZE
10168# endif /* PAGESIZE */
10169# endif /* no NBPC */
10170# endif /* no NBPG */
10171# endif /* no EXEC_PAGESIZE */
10172# else /* no HAVE_SYS_PARAM_H */
10173# define getpagesize() 8192 /* punt totally */
10174# endif /* no HAVE_SYS_PARAM_H */
10175# endif /* no _SC_PAGESIZE */
10176
10177#endif /* no HAVE_GETPAGESIZE */
10178
10179int
10180main ()
10181{
10182 char *data, *data2, *data3;
10183 const char *cdata2;
10184 int i, pagesize;
10185 int fd, fd2;
10186
10187 pagesize = getpagesize ();
10188
10189 /* First, make a file with some known garbage in it. */
10190 data = (char *) malloc (pagesize);
10191 if (!data)
10192 return 1;
10193 for (i = 0; i < pagesize; ++i)
10194 *(data + i) = rand ();
10195 umask (0);
10196 fd = creat ("conftest.mmap", 0600);
10197 if (fd < 0)
10198 return 2;
10199 if (write (fd, data, pagesize) != pagesize)
10200 return 3;
10201 close (fd);
10202
10203 /* Next, check that the tail of a page is zero-filled. File must have
10204 non-zero length, otherwise we risk SIGBUS for entire page. */
10205 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
10206 if (fd2 < 0)
10207 return 4;
10208 cdata2 = "";
10209 if (write (fd2, cdata2, 1) != 1)
10210 return 5;
10211 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
10212 if (data2 == MAP_FAILED)
10213 return 6;
10214 for (i = 0; i < pagesize; ++i)
10215 if (*(data2 + i))
10216 return 7;
10217 close (fd2);
10218 if (munmap (data2, pagesize))
10219 return 8;
10220
10221 /* Next, try to mmap the file at a fixed address which already has
10222 something else allocated at it. If we can, also make sure that
10223 we see the same garbage. */
10224 fd = open ("conftest.mmap", O_RDWR);
10225 if (fd < 0)
10226 return 9;
10227 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
10228 MAP_PRIVATE | MAP_FIXED, fd, 0L))
10229 return 10;
10230 for (i = 0; i < pagesize; ++i)
10231 if (*(data + i) != *(data2 + i))
10232 return 11;
10233
10234 /* Finally, make sure that changes to the mapped area do not
10235 percolate back to the file as seen by read(). (This is a bug on
10236 some variants of i386 svr4.0.) */
10237 for (i = 0; i < pagesize; ++i)
10238 *(data2 + i) = *(data2 + i) + 1;
10239 data3 = (char *) malloc (pagesize);
10240 if (!data3)
10241 return 12;
10242 if (read (fd, data3, pagesize) != pagesize)
10243 return 13;
10244 for (i = 0; i < pagesize; ++i)
10245 if (*(data + i) != *(data3 + i))
10246 return 14;
10247 close (fd);
10248 return 0;
10249}
10250_ACEOF
10251if ac_fn_c_try_run "$LINENO"; then :
10252 ac_cv_func_mmap_fixed_mapped=yes
10253else
10254 ac_cv_func_mmap_fixed_mapped=no
10255fi
10256rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10257 conftest.$ac_objext conftest.beam conftest.$ac_ext
10258fi
10259
10260fi
10261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
10262$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
10263if test $ac_cv_func_mmap_fixed_mapped = yes; then
10264
10265$as_echo "#define HAVE_MMAP 1" >>confdefs.h
10266
10267fi
10268rm -f conftest.mmap conftest.txt
10269
10270if test $use_mmap_for_buffers = yes; then
f199cab1 10271
5476a9a4
GM
10272$as_echo "#define USE_MMAP_FOR_BUFFERS 1" >>confdefs.h
10273
10274 REL_ALLOC=no
10275fi
10276
10277LIBS="$LIBS_SYSTEM $LIBS"
10278
10279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
10280$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
10281if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then :
10282 $as_echo_n "(cached) " >&6
067d23c9 10283else
5476a9a4
GM
10284 ac_check_lib_save_LIBS=$LIBS
10285LIBS="-ldnet $LIBS"
10286cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 10287/* end confdefs.h. */
067d23c9 10288
5476a9a4
GM
10289/* Override any GCC internal prototype to avoid an error.
10290 Use char because int might match the return type of a GCC
10291 builtin and then its argument prototype would still apply. */
10292#ifdef __cplusplus
10293extern "C"
10294#endif
10295char dnet_ntoa ();
10296int
10297main ()
f199cab1 10298{
5476a9a4
GM
10299return dnet_ntoa ();
10300 ;
10301 return 0;
f199cab1 10302}
5476a9a4
GM
10303_ACEOF
10304if ac_fn_c_try_link "$LINENO"; then :
10305 ac_cv_lib_dnet_dnet_ntoa=yes
10306else
10307 ac_cv_lib_dnet_dnet_ntoa=no
10308fi
10309rm -f core conftest.err conftest.$ac_objext \
10310 conftest$ac_exeext conftest.$ac_ext
10311LIBS=$ac_check_lib_save_LIBS
10312fi
10313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
10314$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
10315if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then :
10316 cat >>confdefs.h <<_ACEOF
10317#define HAVE_LIBDNET 1
10318_ACEOF
10319
10320 LIBS="-ldnet $LIBS"
10321
10322fi
10323
10324
10325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lXbsd" >&5
10326$as_echo_n "checking for main in -lXbsd... " >&6; }
10327if test "${ac_cv_lib_Xbsd_main+set}" = set; then :
10328 $as_echo_n "(cached) " >&6
10329else
10330 ac_check_lib_save_LIBS=$LIBS
10331LIBS="-lXbsd $LIBS"
10332cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10333/* end confdefs.h. */
10334
10335
10336int
10337main ()
f199cab1 10338{
5476a9a4
GM
10339return main ();
10340 ;
10341 return 0;
f199cab1 10342}
5476a9a4
GM
10343_ACEOF
10344if ac_fn_c_try_link "$LINENO"; then :
10345 ac_cv_lib_Xbsd_main=yes
10346else
10347 ac_cv_lib_Xbsd_main=no
10348fi
10349rm -f core conftest.err conftest.$ac_objext \
10350 conftest$ac_exeext conftest.$ac_ext
10351LIBS=$ac_check_lib_save_LIBS
10352fi
10353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xbsd_main" >&5
10354$as_echo "$ac_cv_lib_Xbsd_main" >&6; }
10355if test "x$ac_cv_lib_Xbsd_main" = x""yes; then :
10356 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
10357fi
10358
10359
10360LIB_PTHREAD=
10361
10362
10363
10364if test "$ac_cv_header_pthread_h"; then
10365 if test "$GMALLOC_OBJ" = gmalloc.o; then
10366 emacs_pthread_function=pthread_atfork
10367 else
10368 emacs_pthread_function=pthread_self
10369 fi
10370 as_ac_Lib=`$as_echo "ac_cv_lib_pthread_$emacs_pthread_function" | $as_tr_sh`
10371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $emacs_pthread_function in -lpthread" >&5
10372$as_echo_n "checking for $emacs_pthread_function in -lpthread... " >&6; }
10373if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
10374 $as_echo_n "(cached) " >&6
10375else
10376 ac_check_lib_save_LIBS=$LIBS
10377LIBS="-lpthread $LIBS"
10378cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10379/* end confdefs.h. */
10380
10381/* Override any GCC internal prototype to avoid an error.
10382 Use char because int might match the return type of a GCC
10383 builtin and then its argument prototype would still apply. */
10384#ifdef __cplusplus
10385extern "C"
10386#endif
10387char $emacs_pthread_function ();
10388int
10389main ()
f199cab1 10390{
5476a9a4
GM
10391return $emacs_pthread_function ();
10392 ;
10393 return 0;
f199cab1 10394}
5476a9a4
GM
10395_ACEOF
10396if ac_fn_c_try_link "$LINENO"; then :
10397 eval "$as_ac_Lib=yes"
10398else
10399 eval "$as_ac_Lib=no"
10400fi
10401rm -f core conftest.err conftest.$ac_objext \
10402 conftest$ac_exeext conftest.$ac_ext
10403LIBS=$ac_check_lib_save_LIBS
10404fi
10405eval ac_res=\$$as_ac_Lib
10406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10407$as_echo "$ac_res" >&6; }
10408eval as_val=\$$as_ac_Lib
10409 if test "x$as_val" = x""yes; then :
10410 HAVE_PTHREAD=yes
10411fi
10412
10413fi
10414if test "$HAVE_PTHREAD" = yes; then
10415 case "${canonical}" in
10416 *-hpux*) ;;
10417 *) LIB_PTHREAD="-lpthread"
10418 LIBS="$LIB_PTHREAD $LIBS" ;;
10419 esac
10420
10421$as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
10422
10423fi
10424
10425
10426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cma_open in -lpthreads" >&5
10427$as_echo_n "checking for cma_open in -lpthreads... " >&6; }
10428if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then :
10429 $as_echo_n "(cached) " >&6
10430else
10431 ac_check_lib_save_LIBS=$LIBS
10432LIBS="-lpthreads $LIBS"
10433cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10434/* end confdefs.h. */
10435
10436/* Override any GCC internal prototype to avoid an error.
10437 Use char because int might match the return type of a GCC
10438 builtin and then its argument prototype would still apply. */
10439#ifdef __cplusplus
10440extern "C"
f199cab1 10441#endif
5476a9a4
GM
10442char cma_open ();
10443int
10444main ()
10445{
10446return cma_open ();
10447 ;
10448 return 0;
f199cab1 10449}
5476a9a4
GM
10450_ACEOF
10451if ac_fn_c_try_link "$LINENO"; then :
10452 ac_cv_lib_pthreads_cma_open=yes
10453else
10454 ac_cv_lib_pthreads_cma_open=no
10455fi
10456rm -f core conftest.err conftest.$ac_objext \
10457 conftest$ac_exeext conftest.$ac_ext
10458LIBS=$ac_check_lib_save_LIBS
10459fi
10460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_cma_open" >&5
10461$as_echo "$ac_cv_lib_pthreads_cma_open" >&6; }
10462if test "x$ac_cv_lib_pthreads_cma_open" = x""yes; then :
10463 cat >>confdefs.h <<_ACEOF
10464#define HAVE_LIBPTHREADS 1
10465_ACEOF
10466
10467 LIBS="-lpthreads $LIBS"
10468
10469fi
10470
10471
10472## Note: when using cpp in s/aix4.2.h, this definition depended on
10473## HAVE_LIBPTHREADS. That was not defined earlier in configure when
10474## the system file was sourced. Hence the value of LIBS_SYSTEM
10475## added to LIBS in configure would never contain the pthreads part,
10476## but the value used in Makefiles might. FIXME?
10477##
10478## -lpthreads seems to be necessary for Xlib in X11R6, and should
10479## be harmless on older versions of X where it happens to exist.
10480test "$opsys" = "aix4-2" && \
10481 test $ac_cv_lib_pthreads_cma_open = yes && \
10482 LIBS_SYSTEM="$LIBS_SYSTEM -lpthreads"
10483
10484
10485case ${host_os} in
10486aix*)
10487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
10488$as_echo_n "checking for -bbigtoc option... " >&6; }
10489if test "${gdb_cv_bigtoc+set}" = set; then :
10490 $as_echo_n "(cached) " >&6
10491else
10492
10493 case $GCC in
10494 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
10495 *) gdb_cv_bigtoc=-bbigtoc ;;
10496 esac
067d23c9 10497
5476a9a4
GM
10498 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
10499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10500/* end confdefs.h. */
067d23c9
KY
10501
10502int
10503main ()
10504{
5476a9a4
GM
10505int i;
10506 ;
10507 return 0;
10508}
10509_ACEOF
10510if ac_fn_c_try_link "$LINENO"; then :
067d23c9 10511
5476a9a4
GM
10512else
10513 gdb_cv_bigtoc=
10514fi
10515rm -f core conftest.err conftest.$ac_objext \
10516 conftest$ac_exeext conftest.$ac_ext
067d23c9 10517
5476a9a4
GM
10518fi
10519{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
10520$as_echo "$gdb_cv_bigtoc" >&6; }
10521 ;;
10522esac
067d23c9 10523
5476a9a4
GM
10524# Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets
10525# used for the tests that follow. We set them back to REAL_CFLAGS and
10526# REAL_CPPFLAGS later on.
067d23c9 10527
5476a9a4
GM
10528REAL_CFLAGS="$CFLAGS"
10529REAL_CPPFLAGS="$CPPFLAGS"
10530
10531if test "${HAVE_X11}" = "yes"; then
10532 DEFS="$C_SWITCH_X_SITE $DEFS"
10533 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
10534 LIBS="-lX11 $LIBS"
10535 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
10536 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
10537
10538 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
10539 # This is handled by LD_SWITCH_X_SITE_RPATH during the real build,
10540 # but it's more convenient here to set LD_RUN_PATH since this
10541 # also works on hosts that don't understand LD_SWITCH_X_SITE_RPATH.
10542 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
10543 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
10544 export LD_RUN_PATH
10545 fi
10546
10547 if test "${opsys}" = "gnu-linux"; then
10548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether X on GNU/Linux needs -b to link" >&5
10549$as_echo_n "checking whether X on GNU/Linux needs -b to link... " >&6; }
10550 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10551/* end confdefs.h. */
067d23c9 10552
5476a9a4
GM
10553int
10554main ()
10555{
10556XOpenDisplay ("foo");
f199cab1 10557 ;
067d23c9
KY
10558 return 0;
10559}
10560_ACEOF
5476a9a4
GM
10561if ac_fn_c_try_link "$LINENO"; then :
10562 xgnu_linux_first_failure=no
067d23c9 10563else
5476a9a4 10564 xgnu_linux_first_failure=yes
067d23c9 10565fi
5476a9a4
GM
10566rm -f core conftest.err conftest.$ac_objext \
10567 conftest$ac_exeext conftest.$ac_ext
10568 if test "${xgnu_linux_first_failure}" = "yes"; then
10569 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
10570 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
10571 OLD_CPPFLAGS="$CPPFLAGS"
10572 OLD_LIBS="$LIBS"
10573 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
10574 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
10575 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
10576 LIBS="$LIBS -b i486-linuxaout"
10577 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10578/* end confdefs.h. */
067d23c9 10579
5476a9a4
GM
10580int
10581main ()
10582{
10583XOpenDisplay ("foo");
10584 ;
10585 return 0;
10586}
10587_ACEOF
10588if ac_fn_c_try_link "$LINENO"; then :
10589 xgnu_linux_second_failure=no
10590else
10591 xgnu_linux_second_failure=yes
067d23c9 10592fi
5476a9a4
GM
10593rm -f core conftest.err conftest.$ac_objext \
10594 conftest$ac_exeext conftest.$ac_ext
10595 if test "${xgnu_linux_second_failure}" = "yes"; then
10596 # If we get the same failure with -b, there is no use adding -b.
10597 # So take it out. This plays safe.
10598 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
10599 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
10600 CPPFLAGS="$OLD_CPPFLAGS"
10601 LIBS="$OLD_LIBS"
10602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10603$as_echo "no" >&6; }
10604 else
10605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10606$as_echo "yes" >&6; }
10607 fi
0eb4e0df 10608 else
5476a9a4
GM
10609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10610$as_echo "no" >&6; }
10611 fi
10612 fi
0eb4e0df 10613
5476a9a4
GM
10614 # Reportedly, some broken Solaris systems have XKBlib.h but are missing
10615 # header files included from there.
10616 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Xkb" >&5
10617$as_echo_n "checking for Xkb... " >&6; }
0eb4e0df
GM
10618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10619/* end confdefs.h. */
5476a9a4
GM
10620#include <X11/Xlib.h>
10621#include <X11/XKBlib.h>
0eb4e0df
GM
10622int
10623main ()
10624{
5476a9a4 10625XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);
0eb4e0df
GM
10626 ;
10627 return 0;
10628}
10629_ACEOF
5476a9a4
GM
10630if ac_fn_c_try_link "$LINENO"; then :
10631 emacs_xkb=yes
0eb4e0df 10632else
5476a9a4 10633 emacs_xkb=no
0eb4e0df 10634fi
5476a9a4
GM
10635rm -f core conftest.err conftest.$ac_objext \
10636 conftest$ac_exeext conftest.$ac_ext
10637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_xkb" >&5
10638$as_echo "$emacs_xkb" >&6; }
10639 if test $emacs_xkb = yes; then
1abfdc54 10640
5476a9a4 10641$as_echo "#define HAVE_XKBGETKEYBOARD 1" >>confdefs.h
1abfdc54 10642
e1fefc61 10643 fi
1abfdc54 10644
5476a9a4
GM
10645 for ac_func in XrmSetDatabase XScreenResourceString \
10646XScreenNumberOfScreen
10647do :
10648 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10649ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10650eval as_val=\$$as_ac_var
10651 if test "x$as_val" = x""yes; then :
10652 cat >>confdefs.h <<_ACEOF
10653#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
f199cab1 10654_ACEOF
1abfdc54 10655
5476a9a4
GM
10656fi
10657done
1abfdc54 10658
5476a9a4 10659fi
1abfdc54 10660
5476a9a4
GM
10661if test "${window_system}" = "x11"; then
10662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 version 6" >&5
10663$as_echo_n "checking X11 version 6... " >&6; }
10664 if test "${emacs_cv_x11_version_6+set}" = set; then :
067d23c9
KY
10665 $as_echo_n "(cached) " >&6
10666else
5476a9a4 10667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 10668/* end confdefs.h. */
5476a9a4 10669#include <X11/Xlib.h>
067d23c9
KY
10670int
10671main ()
10672{
5476a9a4
GM
10673#if XlibSpecificationRelease < 6
10674fail;
10675#endif
10676
067d23c9
KY
10677 ;
10678 return 0;
10679}
10680_ACEOF
5476a9a4
GM
10681if ac_fn_c_try_link "$LINENO"; then :
10682 emacs_cv_x11_version_6=yes
10683else
10684 emacs_cv_x11_version_6=no
10685fi
10686rm -f core conftest.err conftest.$ac_objext \
10687 conftest$ac_exeext conftest.$ac_ext
067d23c9 10688fi
f199cab1 10689
5476a9a4
GM
10690 if test $emacs_cv_x11_version_6 = yes; then
10691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5
10692$as_echo "6 or newer" >&6; }
f199cab1 10693
5476a9a4 10694$as_echo "#define HAVE_X11R6 1" >>confdefs.h
f199cab1
GM
10695
10696
5476a9a4 10697$as_echo "#define HAVE_X_I18N 1" >>confdefs.h
f199cab1 10698
5476a9a4
GM
10699 ## inoue@ainet.or.jp says Solaris has a bug related to X11R6-style
10700 ## XIM support.
10701 case "$opsys" in
10702 sol2-*) : ;;
10703 *)
10704$as_echo "#define HAVE_X11R6_XIM 1" >>confdefs.h
f199cab1 10705
5476a9a4
GM
10706 ;;
10707 esac
10708 else
10709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5
10710$as_echo "before 6" >&6; }
10711 fi
10712fi
f199cab1 10713
067d23c9 10714
5476a9a4
GM
10715### Use -lrsvg-2 if available, unless `--with-rsvg=no' is specified.
10716HAVE_RSVG=no
10717if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes"; then
10718 if test "${with_rsvg}" != "no"; then
10719 RSVG_REQUIRED=2.11.0
10720 RSVG_MODULE="librsvg-2.0 >= $RSVG_REQUIRED"
067d23c9 10721
f199cab1 10722
5476a9a4 10723 succeeded=no
067d23c9 10724
5476a9a4
GM
10725 if test "$PKG_CONFIG" = "no" ; then
10726 :
10727 else
10728 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 10729 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
10730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $RSVG_MODULE" >&5
10731$as_echo_n "checking for $RSVG_MODULE... " >&6; }
f199cab1 10732
b5591ebb
GM
10733 if "$PKG_CONFIG" --exists "$RSVG_MODULE" 2>&5 &&
10734 RSVG_CFLAGS=`"$PKG_CONFIG" --cflags "$RSVG_MODULE" 2>&5` &&
10735 RSVG_LIBS=`"$PKG_CONFIG" --libs "$RSVG_MODULE" 2>&5`; then
5476a9a4
GM
10736 edit_cflags="
10737 s,///*,/,g
10738 s/^/ /
10739 s/ -I/ $isystem/g
10740 s/^ //
10741 "
10742 RSVG_CFLAGS=`$as_echo "$RSVG_CFLAGS" | sed -e "$edit_cflags"`
10743 RSVG_LIBS=`$as_echo "$RSVG_LIBS" | sed -e 's,///*,/,g'`
10744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$RSVG_CFLAGS' LIBS='$RSVG_LIBS'" >&5
10745$as_echo "yes CFLAGS='$RSVG_CFLAGS' LIBS='$RSVG_LIBS'" >&6; }
10746 succeeded=yes
10747 else
10748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10749$as_echo "no" >&6; }
10750 RSVG_CFLAGS=""
10751 RSVG_LIBS=""
10752 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
10753 ## do set a variable so people can do so. Do it in a subshell
10754 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 10755 RSVG_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$RSVG_MODULE") 2>&1`
f199cab1 10756
5476a9a4 10757 fi
067d23c9 10758
067d23c9 10759
067d23c9 10760
f199cab1 10761 else
5476a9a4
GM
10762 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10763 echo "*** See http://www.freedesktop.org/software/pkgconfig"
f199cab1 10764 fi
5476a9a4
GM
10765 fi
10766
10767 if test $succeeded = yes; then
10768 HAVE_RSVG=yes
10769 else
10770 :
10771 fi
067d23c9 10772
067d23c9 10773
067d23c9 10774
f199cab1 10775
5476a9a4 10776 if test $HAVE_RSVG = yes; then
f199cab1 10777
5476a9a4
GM
10778$as_echo "#define HAVE_RSVG 1" >>confdefs.h
10779
10780 CFLAGS="$CFLAGS $RSVG_CFLAGS"
10781 LIBS="$RSVG_LIBS $LIBS"
10782 fi
f199cab1 10783 fi
5476a9a4 10784fi
f199cab1 10785
5476a9a4
GM
10786HAVE_IMAGEMAGICK=no
10787if test "${HAVE_X11}" = "yes"; then
10788 if test "${with_imagemagick}" != "no"; then
10789 ## 6.2.8 is the earliest version known to work, but earlier versions
10790 ## might work - let us know if you find one.
10791 ## 6.0.7 does not work. See bug#7955.
10792 IMAGEMAGICK_MODULE="Wand >= 6.2.8"
f199cab1 10793
5476a9a4 10794 succeeded=no
f199cab1 10795
5476a9a4
GM
10796 if test "$PKG_CONFIG" = "no" ; then
10797 :
10798 else
10799 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 10800 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
10801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $IMAGEMAGICK_MODULE" >&5
10802$as_echo_n "checking for $IMAGEMAGICK_MODULE... " >&6; }
f199cab1 10803
b5591ebb
GM
10804 if "$PKG_CONFIG" --exists "$IMAGEMAGICK_MODULE" 2>&5 &&
10805 IMAGEMAGICK_CFLAGS=`"$PKG_CONFIG" --cflags "$IMAGEMAGICK_MODULE" 2>&5` &&
10806 IMAGEMAGICK_LIBS=`"$PKG_CONFIG" --libs "$IMAGEMAGICK_MODULE" 2>&5`; then
5476a9a4
GM
10807 edit_cflags="
10808 s,///*,/,g
10809 s/^/ /
10810 s/ -I/ $isystem/g
10811 s/^ //
10812 "
10813 IMAGEMAGICK_CFLAGS=`$as_echo "$IMAGEMAGICK_CFLAGS" | sed -e "$edit_cflags"`
10814 IMAGEMAGICK_LIBS=`$as_echo "$IMAGEMAGICK_LIBS" | sed -e 's,///*,/,g'`
10815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$IMAGEMAGICK_CFLAGS' LIBS='$IMAGEMAGICK_LIBS'" >&5
10816$as_echo "yes CFLAGS='$IMAGEMAGICK_CFLAGS' LIBS='$IMAGEMAGICK_LIBS'" >&6; }
10817 succeeded=yes
10818 else
10819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10820$as_echo "no" >&6; }
10821 IMAGEMAGICK_CFLAGS=""
10822 IMAGEMAGICK_LIBS=""
10823 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
10824 ## do set a variable so people can do so. Do it in a subshell
10825 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 10826 IMAGEMAGICK_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$IMAGEMAGICK_MODULE") 2>&1`
f199cab1 10827
5476a9a4 10828 fi
f199cab1 10829
f199cab1 10830
f199cab1 10831
5476a9a4
GM
10832 else
10833 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10834 echo "*** See http://www.freedesktop.org/software/pkgconfig"
10835 fi
f199cab1 10836 fi
5476a9a4
GM
10837
10838 if test $succeeded = yes; then
10839 HAVE_IMAGEMAGICK=yes
f199cab1 10840 else
5476a9a4 10841 :
067d23c9
KY
10842 fi
10843
f199cab1 10844
067d23c9 10845
f199cab1 10846
5476a9a4 10847 if test $HAVE_IMAGEMAGICK = yes; then
067d23c9 10848
5476a9a4 10849$as_echo "#define HAVE_IMAGEMAGICK 1" >>confdefs.h
f199cab1 10850
5476a9a4
GM
10851 CFLAGS="$CFLAGS $IMAGEMAGICK_CFLAGS"
10852 LIBS="$IMAGEMAGICK_LIBS $LIBS"
10853 for ac_func in MagickExportImagePixels MagickMergeImageLayers
10854do :
10855 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10856ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10857eval as_val=\$$as_ac_var
10858 if test "x$as_val" = x""yes; then :
10859 cat >>confdefs.h <<_ACEOF
10860#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
067d23c9 10861_ACEOF
f199cab1
GM
10862
10863fi
5476a9a4
GM
10864done
10865
067d23c9
KY
10866 fi
10867 fi
5476a9a4 10868fi
067d23c9 10869
f199cab1 10870
5476a9a4
GM
10871HAVE_GTK=no
10872GTK_OBJ=
4fa92495
GM
10873check_gtk2=no
10874gtk3_pkg_errors=
10875if test "${with_gtk3}" = "yes" || test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "maybe"; then
5476a9a4
GM
10876 GLIB_REQUIRED=2.28
10877 GTK_REQUIRED=3.0
10878 GTK_MODULES="gtk+-3.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
f199cab1
GM
10879
10880
5476a9a4 10881 succeeded=no
f199cab1 10882
5476a9a4
GM
10883 if test "$PKG_CONFIG" = "no" ; then
10884 pkg_check_gtk=no
10885 else
10886 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 10887 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
10888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5
10889$as_echo_n "checking for $GTK_MODULES... " >&6; }
f199cab1 10890
b5591ebb
GM
10891 if "$PKG_CONFIG" --exists "$GTK_MODULES" 2>&5 &&
10892 GTK_CFLAGS=`"$PKG_CONFIG" --cflags "$GTK_MODULES" 2>&5` &&
10893 GTK_LIBS=`"$PKG_CONFIG" --libs "$GTK_MODULES" 2>&5`; then
5476a9a4
GM
10894 edit_cflags="
10895 s,///*,/,g
10896 s/^/ /
10897 s/ -I/ $isystem/g
10898 s/^ //
10899 "
10900 GTK_CFLAGS=`$as_echo "$GTK_CFLAGS" | sed -e "$edit_cflags"`
10901 GTK_LIBS=`$as_echo "$GTK_LIBS" | sed -e 's,///*,/,g'`
10902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&5
10903$as_echo "yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&6; }
10904 succeeded=yes
10905 else
10906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10907$as_echo "no" >&6; }
10908 GTK_CFLAGS=""
10909 GTK_LIBS=""
10910 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
10911 ## do set a variable so people can do so. Do it in a subshell
10912 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 10913 GTK_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$GTK_MODULES") 2>&1`
f199cab1 10914
5476a9a4 10915 fi
f199cab1 10916
f199cab1 10917
f199cab1 10918
5476a9a4
GM
10919 else
10920 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10921 echo "*** See http://www.freedesktop.org/software/pkgconfig"
f199cab1 10922 fi
5476a9a4 10923 fi
067d23c9 10924
5476a9a4
GM
10925 if test $succeeded = yes; then
10926 pkg_check_gtk=yes
10927 else
10928 pkg_check_gtk=no
10929 fi
067d23c9 10930
4fa92495 10931 if test "$pkg_check_gtk" = "no" && test "$with_gtk3" = "yes"; then
5476a9a4 10932 as_fn_error "$GTK_PKG_ERRORS" "$LINENO" 5
067d23c9 10933 fi
4fa92495 10934 if test "$pkg_check_gtk" = "yes"; then
067d23c9 10935
5476a9a4 10936$as_echo "#define HAVE_GTK3 1" >>confdefs.h
067d23c9 10937
4fa92495
GM
10938 GTK_OBJ=emacsgtkfixed.o
10939 term_header=gtkutil.h
a732eace 10940 USE_GTK_TOOLKIT="GTK3"
4efe5ef9
GM
10941 if test "x$ac_enable_gtk_deprecation_warnings" = x; then
10942 GTK_CFLAGS="$GTK_CFLAGS -DGDK_DISABLE_DEPRECATION_WARNINGS"
10943 fi
4fa92495
GM
10944 else
10945 check_gtk2=yes
10946 gtk3_pkg_errors="$GTK_PKG_ERRORS "
10947 fi
5476a9a4 10948fi
067d23c9 10949
4fa92495 10950if test "${with_gtk2}" = "yes" || test "$check_gtk2" = "yes"; then
5476a9a4
GM
10951 GLIB_REQUIRED=2.10
10952 GTK_REQUIRED=2.10
10953 GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
f199cab1 10954
5476a9a4
GM
10955
10956 succeeded=no
10957
10958 if test "$PKG_CONFIG" = "no" ; then
10959 pkg_check_gtk=no
10960 else
10961 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 10962 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
10963 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5
10964$as_echo_n "checking for $GTK_MODULES... " >&6; }
10965
b5591ebb
GM
10966 if "$PKG_CONFIG" --exists "$GTK_MODULES" 2>&5 &&
10967 GTK_CFLAGS=`"$PKG_CONFIG" --cflags "$GTK_MODULES" 2>&5` &&
10968 GTK_LIBS=`"$PKG_CONFIG" --libs "$GTK_MODULES" 2>&5`; then
5476a9a4
GM
10969 edit_cflags="
10970 s,///*,/,g
10971 s/^/ /
10972 s/ -I/ $isystem/g
10973 s/^ //
10974 "
10975 GTK_CFLAGS=`$as_echo "$GTK_CFLAGS" | sed -e "$edit_cflags"`
10976 GTK_LIBS=`$as_echo "$GTK_LIBS" | sed -e 's,///*,/,g'`
10977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&5
10978$as_echo "yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&6; }
10979 succeeded=yes
10980 else
10981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10982$as_echo "no" >&6; }
10983 GTK_CFLAGS=""
10984 GTK_LIBS=""
10985 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
10986 ## do set a variable so people can do so. Do it in a subshell
10987 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 10988 GTK_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$GTK_MODULES") 2>&1`
5476a9a4
GM
10989
10990 fi
10991
10992
10993
10994 else
10995 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10996 echo "*** See http://www.freedesktop.org/software/pkgconfig"
10997 fi
10998 fi
10999
11000 if test $succeeded = yes; then
11001 pkg_check_gtk=yes
11002 else
11003 pkg_check_gtk=no
11004 fi
11005
e2d8f316
GM
11006 if test "$pkg_check_gtk" = "no" &&
11007 { test "$with_gtk" = yes || test "$with_gtk2" = "yes"; }
11008 then
11009 as_fn_error "$gtk3_pkg_errors$GTK_PKG_ERRORS" "$LINENO" 5
5476a9a4 11010 fi
a732eace 11011 test "$pkg_check_gtk" = "yes" && USE_GTK_TOOLKIT="GTK2"
067d23c9 11012fi
067d23c9 11013
5476a9a4
GM
11014if test x"$pkg_check_gtk" = xyes; then
11015
11016
11017
11018 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS"
11019 CFLAGS="$CFLAGS $GTK_CFLAGS"
11020 LIBS="$GTK_LIBS $LIBS"
11021 GTK_COMPILES=no
11022 for ac_func in gtk_main
11023do :
11024 ac_fn_c_check_func "$LINENO" "gtk_main" "ac_cv_func_gtk_main"
11025if test "x$ac_cv_func_gtk_main" = x""yes; then :
11026 cat >>confdefs.h <<_ACEOF
11027#define HAVE_GTK_MAIN 1
11028_ACEOF
11029 GTK_COMPILES=yes
f199cab1 11030fi
5476a9a4 11031done
067d23c9 11032
5476a9a4
GM
11033 if test "${GTK_COMPILES}" != "yes"; then
11034 if test "$USE_X_TOOLKIT" != "maybe"; then
11035 as_fn_error "Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" "$LINENO" 5;
11036 fi
11037 else
11038 HAVE_GTK=yes
11039
11040$as_echo "#define USE_GTK 1" >>confdefs.h
067d23c9 11041
5476a9a4
GM
11042 GTK_OBJ="gtkutil.o $GTK_OBJ"
11043 USE_X_TOOLKIT=none
b5591ebb 11044 if "$PKG_CONFIG" --atleast-version=2.10 gtk+-2.0; then
5476a9a4
GM
11045 :
11046 else
11047 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your version of Gtk+ will have problems with
11048 closing open displays. This is no problem if you just use
11049 one display, but if you use more than one and close one of them
11050 Emacs may crash." >&5
11051$as_echo "$as_me: WARNING: Your version of Gtk+ will have problems with
11052 closing open displays. This is no problem if you just use
11053 one display, but if you use more than one and close one of them
11054 Emacs may crash." >&2;}
11055 sleep 3
11056 fi
067d23c9
KY
11057 fi
11058
5476a9a4 11059fi
067d23c9
KY
11060
11061
11062
5476a9a4 11063if test "${HAVE_GTK}" = "yes"; then
067d23c9 11064
5476a9a4
GM
11065 if test "$with_toolkit_scroll_bars" != no; then
11066 with_toolkit_scroll_bars=yes
11067 fi
067d23c9 11068
5476a9a4
GM
11069 HAVE_GTK_FILE_SELECTION=no
11070 ac_fn_c_check_decl "$LINENO" "GTK_TYPE_FILE_SELECTION" "ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" "$ac_includes_default
11071#include <gtk/gtk.h>
11072"
11073if test "x$ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" = x""yes; then :
11074 HAVE_GTK_FILE_SELECTION=yes
11075else
11076 HAVE_GTK_FILE_SELECTION=no
11077fi
067d23c9 11078
5476a9a4
GM
11079 if test "$HAVE_GTK_FILE_SELECTION" = yes; then
11080 for ac_func in gtk_file_selection_new
11081do :
11082 ac_fn_c_check_func "$LINENO" "gtk_file_selection_new" "ac_cv_func_gtk_file_selection_new"
11083if test "x$ac_cv_func_gtk_file_selection_new" = x""yes; then :
11084 cat >>confdefs.h <<_ACEOF
11085#define HAVE_GTK_FILE_SELECTION_NEW 1
f199cab1 11086_ACEOF
067d23c9 11087
f199cab1 11088fi
5476a9a4
GM
11089done
11090
f199cab1 11091 fi
067d23c9 11092
4efe5ef9
GM
11093 HAVE_GTK_HANDLE_BOX=no
11094 ac_fn_c_check_decl "$LINENO" "GTK_TYPE_HANDLE_BOX" "ac_cv_have_decl_GTK_TYPE_HANDLE_BOX" "$ac_includes_default
11095#include <gtk/gtk.h>
11096"
11097if test "x$ac_cv_have_decl_GTK_TYPE_HANDLE_BOX" = x""yes; then :
11098 HAVE_GTK_HANDLE_BOX=yes
11099else
11100 HAVE_GTK_HANDLE_BOX=no
11101fi
11102
11103 if test "$HAVE_GTK_HANDLE_BOX" = yes; then
11104 for ac_func in gtk_handle_box_new
11105do :
11106 ac_fn_c_check_func "$LINENO" "gtk_handle_box_new" "ac_cv_func_gtk_handle_box_new"
11107if test "x$ac_cv_func_gtk_handle_box_new" = x""yes; then :
11108 cat >>confdefs.h <<_ACEOF
11109#define HAVE_GTK_HANDLE_BOX_NEW 1
11110_ACEOF
11111
11112fi
11113done
11114
11115 fi
11116
11117 HAVE_GTK_TEAROFF_MENU_ITEM=no
11118 ac_fn_c_check_decl "$LINENO" "GTK_TYPE_TEAROFF_MENU_ITEM" "ac_cv_have_decl_GTK_TYPE_TEAROFF_MENU_ITEM" "$ac_includes_default
11119#include <gtk/gtk.h>
11120"
11121if test "x$ac_cv_have_decl_GTK_TYPE_TEAROFF_MENU_ITEM" = x""yes; then :
11122 HAVE_GTK_TEAROFF_MENU_ITEM=yes
11123else
11124 HAVE_GTK_TEAROFF_MENU_ITEM=no
11125fi
11126
11127 if test "$HAVE_GTK_TEAROFF_MENU_ITEM" = yes; then
11128 for ac_func in gtk_tearoff_menu_item_new
11129do :
11130 ac_fn_c_check_func "$LINENO" "gtk_tearoff_menu_item_new" "ac_cv_func_gtk_tearoff_menu_item_new"
11131if test "x$ac_cv_func_gtk_tearoff_menu_item_new" = x""yes; then :
11132 cat >>confdefs.h <<_ACEOF
11133#define HAVE_GTK_TEAROFF_MENU_ITEM_NEW 1
11134_ACEOF
11135
11136fi
11137done
11138
11139 fi
067d23c9 11140
5476a9a4
GM
11141 for ac_func in gtk_widget_get_window gtk_widget_set_has_window \
11142 gtk_dialog_get_action_area gtk_widget_get_sensitive \
11143 gtk_widget_get_mapped gtk_adjustment_get_page_size \
11144 gtk_orientable_set_orientation \
11145 gtk_window_set_has_resize_grip
11146do :
11147 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11148ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11149eval as_val=\$$as_ac_var
11150 if test "x$as_val" = x""yes; then :
11151 cat >>confdefs.h <<_ACEOF
11152#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11153_ACEOF
067d23c9 11154
5476a9a4
GM
11155fi
11156done
067d23c9 11157
42dcba54
GM
11158
11159 term_header=gtkutil.h
5476a9a4 11160fi
067d23c9 11161
5476a9a4
GM
11162HAVE_DBUS=no
11163DBUS_OBJ=
11164if test "${with_dbus}" = "yes"; then
067d23c9 11165
5476a9a4 11166 succeeded=no
067d23c9 11167
5476a9a4
GM
11168 if test "$PKG_CONFIG" = "no" ; then
11169 HAVE_DBUS=no
f199cab1 11170 else
5476a9a4 11171 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 11172 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
11173 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbus-1 >= 1.0" >&5
11174$as_echo_n "checking for dbus-1 >= 1.0... " >&6; }
067d23c9 11175
b5591ebb
GM
11176 if "$PKG_CONFIG" --exists "dbus-1 >= 1.0" 2>&5 &&
11177 DBUS_CFLAGS=`"$PKG_CONFIG" --cflags "dbus-1 >= 1.0" 2>&5` &&
11178 DBUS_LIBS=`"$PKG_CONFIG" --libs "dbus-1 >= 1.0" 2>&5`; then
5476a9a4
GM
11179 edit_cflags="
11180 s,///*,/,g
11181 s/^/ /
11182 s/ -I/ $isystem/g
11183 s/^ //
11184 "
11185 DBUS_CFLAGS=`$as_echo "$DBUS_CFLAGS" | sed -e "$edit_cflags"`
11186 DBUS_LIBS=`$as_echo "$DBUS_LIBS" | sed -e 's,///*,/,g'`
11187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$DBUS_CFLAGS' LIBS='$DBUS_LIBS'" >&5
11188$as_echo "yes CFLAGS='$DBUS_CFLAGS' LIBS='$DBUS_LIBS'" >&6; }
11189 succeeded=yes
11190 else
11191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11192$as_echo "no" >&6; }
11193 DBUS_CFLAGS=""
11194 DBUS_LIBS=""
11195 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
11196 ## do set a variable so people can do so. Do it in a subshell
11197 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 11198 DBUS_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "dbus-1 >= 1.0") 2>&1`
067d23c9 11199
5476a9a4 11200 fi
067d23c9 11201
15f79fcd 11202
067d23c9 11203
5476a9a4
GM
11204 else
11205 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11206 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11207 fi
067d23c9 11208 fi
067d23c9 11209
5476a9a4
GM
11210 if test $succeeded = yes; then
11211 HAVE_DBUS=yes
f199cab1 11212 else
5476a9a4 11213 HAVE_DBUS=no
f199cab1 11214 fi
067d23c9 11215
5476a9a4
GM
11216 if test "$HAVE_DBUS" = yes; then
11217 LIBS="$LIBS $DBUS_LIBS"
067d23c9 11218
5476a9a4 11219$as_echo "#define HAVE_DBUS 1" >>confdefs.h
067d23c9 11220
5476a9a4
GM
11221 for ac_func in dbus_watch_get_unix_fd \
11222 dbus_type_is_valid \
11223 dbus_validate_bus_name \
11224 dbus_validate_path \
11225 dbus_validate_interface \
11226 dbus_validate_member
11227do :
11228 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11229ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11230eval as_val=\$$as_ac_var
11231 if test "x$as_val" = x""yes; then :
11232 cat >>confdefs.h <<_ACEOF
11233#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11234_ACEOF
067d23c9 11235
5476a9a4
GM
11236fi
11237done
067d23c9 11238
5476a9a4
GM
11239 DBUS_OBJ=dbusbind.o
11240 fi
11241fi
067d23c9
KY
11242
11243
5476a9a4
GM
11244HAVE_GSETTINGS=no
11245if test "${HAVE_X11}" = "yes" && test "${with_gsettings}" = "yes"; then
067d23c9 11246
5476a9a4 11247 succeeded=no
067d23c9 11248
5476a9a4
GM
11249 if test "$PKG_CONFIG" = "no" ; then
11250 HAVE_GSETTINGS=no
11251 else
11252 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 11253 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
11254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gio-2.0 >= 2.26" >&5
11255$as_echo_n "checking for gio-2.0 >= 2.26... " >&6; }
0afb4571 11256
b5591ebb
GM
11257 if "$PKG_CONFIG" --exists "gio-2.0 >= 2.26" 2>&5 &&
11258 GSETTINGS_CFLAGS=`"$PKG_CONFIG" --cflags "gio-2.0 >= 2.26" 2>&5` &&
11259 GSETTINGS_LIBS=`"$PKG_CONFIG" --libs "gio-2.0 >= 2.26" 2>&5`; then
5476a9a4
GM
11260 edit_cflags="
11261 s,///*,/,g
11262 s/^/ /
11263 s/ -I/ $isystem/g
11264 s/^ //
11265 "
11266 GSETTINGS_CFLAGS=`$as_echo "$GSETTINGS_CFLAGS" | sed -e "$edit_cflags"`
11267 GSETTINGS_LIBS=`$as_echo "$GSETTINGS_LIBS" | sed -e 's,///*,/,g'`
11268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GSETTINGS_CFLAGS' LIBS='$GSETTINGS_LIBS'" >&5
11269$as_echo "yes CFLAGS='$GSETTINGS_CFLAGS' LIBS='$GSETTINGS_LIBS'" >&6; }
11270 succeeded=yes
11271 else
11272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11273$as_echo "no" >&6; }
11274 GSETTINGS_CFLAGS=""
11275 GSETTINGS_LIBS=""
11276 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
11277 ## do set a variable so people can do so. Do it in a subshell
11278 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 11279 GSETTINGS_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "gio-2.0 >= 2.26") 2>&1`
0afb4571 11280
5476a9a4 11281 fi
067d23c9
KY
11282
11283
11284
11285 else
5476a9a4
GM
11286 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11287 echo "*** See http://www.freedesktop.org/software/pkgconfig"
067d23c9 11288 fi
5476a9a4 11289 fi
067d23c9 11290
5476a9a4
GM
11291 if test $succeeded = yes; then
11292 HAVE_GSETTINGS=yes
11293 else
11294 HAVE_GSETTINGS=no
11295 fi
f199cab1 11296
5476a9a4 11297 if test "$HAVE_GSETTINGS" = "yes"; then
f199cab1 11298
5476a9a4 11299$as_echo "#define HAVE_GSETTINGS 1" >>confdefs.h
f199cab1 11300
5476a9a4
GM
11301 SETTINGS_CFLAGS="$GSETTINGS_CFLAGS"
11302 SETTINGS_LIBS="$GSETTINGS_LIBS"
11303 fi
11304fi
067d23c9 11305
5476a9a4
GM
11306HAVE_GCONF=no
11307if test "${HAVE_X11}" = "yes" && test "${with_gconf}" = "yes"; then
067d23c9 11308
5476a9a4 11309 succeeded=no
067d23c9 11310
5476a9a4
GM
11311 if test "$PKG_CONFIG" = "no" ; then
11312 HAVE_GCONF=no
11313 else
11314 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 11315 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
11316 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gconf-2.0 >= 2.13" >&5
11317$as_echo_n "checking for gconf-2.0 >= 2.13... " >&6; }
067d23c9 11318
b5591ebb
GM
11319 if "$PKG_CONFIG" --exists "gconf-2.0 >= 2.13" 2>&5 &&
11320 GCONF_CFLAGS=`"$PKG_CONFIG" --cflags "gconf-2.0 >= 2.13" 2>&5` &&
11321 GCONF_LIBS=`"$PKG_CONFIG" --libs "gconf-2.0 >= 2.13" 2>&5`; then
5476a9a4
GM
11322 edit_cflags="
11323 s,///*,/,g
11324 s/^/ /
11325 s/ -I/ $isystem/g
11326 s/^ //
11327 "
11328 GCONF_CFLAGS=`$as_echo "$GCONF_CFLAGS" | sed -e "$edit_cflags"`
11329 GCONF_LIBS=`$as_echo "$GCONF_LIBS" | sed -e 's,///*,/,g'`
11330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GCONF_CFLAGS' LIBS='$GCONF_LIBS'" >&5
11331$as_echo "yes CFLAGS='$GCONF_CFLAGS' LIBS='$GCONF_LIBS'" >&6; }
11332 succeeded=yes
11333 else
11334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11335$as_echo "no" >&6; }
11336 GCONF_CFLAGS=""
11337 GCONF_LIBS=""
11338 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
11339 ## do set a variable so people can do so. Do it in a subshell
11340 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 11341 GCONF_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "gconf-2.0 >= 2.13") 2>&1`
067d23c9 11342
5476a9a4 11343 fi
f199cab1 11344
f199cab1
GM
11345
11346
5476a9a4
GM
11347 else
11348 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11349 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11350 fi
11351 fi
f199cab1 11352
5476a9a4
GM
11353 if test $succeeded = yes; then
11354 HAVE_GCONF=yes
11355 else
11356 HAVE_GCONF=no
11357 fi
f199cab1 11358
5476a9a4 11359 if test "$HAVE_GCONF" = yes; then
f199cab1 11360
5476a9a4 11361$as_echo "#define HAVE_GCONF 1" >>confdefs.h
f199cab1 11362
5476a9a4
GM
11363 SETTINGS_CFLAGS="$SETTINGS_CFLAGS $GCONF_CFLAGS"
11364 SETTINGS_LIBS="$SETTINGS_LIBS $GCONF_LIBS"
11365 fi
11366fi
f199cab1 11367
5476a9a4 11368if test "$HAVE_GSETTINGS" = "yes" || test "$HAVE_GCONF" = "yes"; then
dcde497f
GM
11369
11370 succeeded=no
11371
11372 if test "$PKG_CONFIG" = "no" ; then
11373 HAVE_GOBJECT=no
11374 else
11375 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 11376 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
dcde497f
GM
11377 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gobject-2.0 >= 2.0" >&5
11378$as_echo_n "checking for gobject-2.0 >= 2.0... " >&6; }
11379
b5591ebb
GM
11380 if "$PKG_CONFIG" --exists "gobject-2.0 >= 2.0" 2>&5 &&
11381 GOBJECT_CFLAGS=`"$PKG_CONFIG" --cflags "gobject-2.0 >= 2.0" 2>&5` &&
11382 GOBJECT_LIBS=`"$PKG_CONFIG" --libs "gobject-2.0 >= 2.0" 2>&5`; then
dcde497f
GM
11383 edit_cflags="
11384 s,///*,/,g
11385 s/^/ /
11386 s/ -I/ $isystem/g
11387 s/^ //
11388 "
11389 GOBJECT_CFLAGS=`$as_echo "$GOBJECT_CFLAGS" | sed -e "$edit_cflags"`
11390 GOBJECT_LIBS=`$as_echo "$GOBJECT_LIBS" | sed -e 's,///*,/,g'`
11391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GOBJECT_CFLAGS' LIBS='$GOBJECT_LIBS'" >&5
11392$as_echo "yes CFLAGS='$GOBJECT_CFLAGS' LIBS='$GOBJECT_LIBS'" >&6; }
11393 succeeded=yes
11394 else
11395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11396$as_echo "no" >&6; }
11397 GOBJECT_CFLAGS=""
11398 GOBJECT_LIBS=""
11399 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
11400 ## do set a variable so people can do so. Do it in a subshell
11401 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 11402 GOBJECT_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "gobject-2.0 >= 2.0") 2>&1`
dcde497f
GM
11403
11404 fi
11405
11406
11407
11408 else
11409 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11410 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11411 fi
11412 fi
11413
11414 if test $succeeded = yes; then
11415 HAVE_GOBJECT=yes
11416 else
11417 HAVE_GOBJECT=no
11418 fi
11419
11420 if test "$HAVE_GOBJECT" = "yes"; then
11421 SETTINGS_CFLAGS="$SETTINGS_CFLAGS $GOBJECT_CFLAGS"
11422 SETTINGS_LIBS="$SETTINGS_LIBS $GOBJECT_LIBS"
11423 fi
5476a9a4
GM
11424 SAVE_CFLAGS="$CFLAGS"
11425 SAVE_LIBS="$LIBS"
11426 CFLAGS="$SETTINGS_CFLAGS $CFLAGS"
11427 LIBS="$SETTINGS_LIBS $LIBS"
11428 for ac_func in g_type_init
11429do :
11430 ac_fn_c_check_func "$LINENO" "g_type_init" "ac_cv_func_g_type_init"
11431if test "x$ac_cv_func_g_type_init" = x""yes; then :
11432 cat >>confdefs.h <<_ACEOF
11433#define HAVE_G_TYPE_INIT 1
067d23c9 11434_ACEOF
067d23c9 11435
5476a9a4
GM
11436fi
11437done
067d23c9 11438
5476a9a4
GM
11439 CFLAGS="$SAVE_CFLAGS"
11440 LIBS="$SAVE_LIBS"
11441fi
067d23c9 11442
067d23c9 11443
f199cab1 11444
067d23c9 11445
5476a9a4
GM
11446HAVE_LIBSELINUX=no
11447LIBSELINUX_LIBS=
11448if test "${with_selinux}" = "yes"; then
11449 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lgetfilecon in -lselinux" >&5
11450$as_echo_n "checking for lgetfilecon in -lselinux... " >&6; }
11451if test "${ac_cv_lib_selinux_lgetfilecon+set}" = set; then :
11452 $as_echo_n "(cached) " >&6
11453else
11454 ac_check_lib_save_LIBS=$LIBS
11455LIBS="-lselinux $LIBS"
11456cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11457/* end confdefs.h. */
067d23c9 11458
5476a9a4
GM
11459/* Override any GCC internal prototype to avoid an error.
11460 Use char because int might match the return type of a GCC
11461 builtin and then its argument prototype would still apply. */
11462#ifdef __cplusplus
11463extern "C"
f199cab1 11464#endif
5476a9a4 11465char lgetfilecon ();
f199cab1
GM
11466int
11467main ()
11468{
5476a9a4 11469return lgetfilecon ();
f199cab1
GM
11470 ;
11471 return 0;
11472}
11473_ACEOF
5476a9a4
GM
11474if ac_fn_c_try_link "$LINENO"; then :
11475 ac_cv_lib_selinux_lgetfilecon=yes
11476else
11477 ac_cv_lib_selinux_lgetfilecon=no
f199cab1 11478fi
5476a9a4
GM
11479rm -f core conftest.err conftest.$ac_objext \
11480 conftest$ac_exeext conftest.$ac_ext
11481LIBS=$ac_check_lib_save_LIBS
11482fi
11483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_lgetfilecon" >&5
11484$as_echo "$ac_cv_lib_selinux_lgetfilecon" >&6; }
11485if test "x$ac_cv_lib_selinux_lgetfilecon" = x""yes; then :
11486 HAVE_LIBSELINUX=yes
11487else
11488 HAVE_LIBSELINUX=no
067d23c9
KY
11489fi
11490
5476a9a4 11491 if test "$HAVE_LIBSELINUX" = yes; then
067d23c9 11492
5476a9a4 11493$as_echo "#define HAVE_LIBSELINUX 1" >>confdefs.h
067d23c9 11494
5476a9a4
GM
11495 LIBSELINUX_LIBS=-lselinux
11496 fi
f199cab1 11497fi
067d23c9 11498
067d23c9 11499
5476a9a4
GM
11500HAVE_GNUTLS=no
11501HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY=no
11502if test "${with_gnutls}" = "yes" ; then
067d23c9 11503
5476a9a4 11504 succeeded=no
067d23c9 11505
5476a9a4
GM
11506 if test "$PKG_CONFIG" = "no" ; then
11507 HAVE_GNUTLS=no
11508 else
11509 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 11510 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
11511 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gnutls >= 2.6.6" >&5
11512$as_echo_n "checking for gnutls >= 2.6.6... " >&6; }
067d23c9 11513
b5591ebb
GM
11514 if "$PKG_CONFIG" --exists "gnutls >= 2.6.6" 2>&5 &&
11515 LIBGNUTLS_CFLAGS=`"$PKG_CONFIG" --cflags "gnutls >= 2.6.6" 2>&5` &&
11516 LIBGNUTLS_LIBS=`"$PKG_CONFIG" --libs "gnutls >= 2.6.6" 2>&5`; then
5476a9a4
GM
11517 edit_cflags="
11518 s,///*,/,g
11519 s/^/ /
11520 s/ -I/ $isystem/g
11521 s/^ //
11522 "
11523 LIBGNUTLS_CFLAGS=`$as_echo "$LIBGNUTLS_CFLAGS" | sed -e "$edit_cflags"`
11524 LIBGNUTLS_LIBS=`$as_echo "$LIBGNUTLS_LIBS" | sed -e 's,///*,/,g'`
11525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBGNUTLS_CFLAGS' LIBS='$LIBGNUTLS_LIBS'" >&5
11526$as_echo "yes CFLAGS='$LIBGNUTLS_CFLAGS' LIBS='$LIBGNUTLS_LIBS'" >&6; }
11527 succeeded=yes
11528 else
11529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11530$as_echo "no" >&6; }
11531 LIBGNUTLS_CFLAGS=""
11532 LIBGNUTLS_LIBS=""
11533 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
11534 ## do set a variable so people can do so. Do it in a subshell
11535 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 11536 LIBGNUTLS_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "gnutls >= 2.6.6") 2>&1`
067d23c9 11537
5476a9a4 11538 fi
067d23c9 11539
067d23c9 11540
067d23c9 11541
5476a9a4
GM
11542 else
11543 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11544 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11545 fi
11546 fi
067d23c9 11547
5476a9a4
GM
11548 if test $succeeded = yes; then
11549 HAVE_GNUTLS=yes
11550 else
11551 HAVE_GNUTLS=no
11552 fi
067d23c9 11553
5476a9a4 11554 if test "${HAVE_GNUTLS}" = "yes"; then
067d23c9 11555
5476a9a4 11556$as_echo "#define HAVE_GNUTLS 1" >>confdefs.h
067d23c9 11557
5476a9a4 11558 fi
f199cab1 11559
5476a9a4
GM
11560 CFLAGS="$CFLAGS $LIBGNUTLS_CFLAGS"
11561 LIBS="$LIBGNUTLS_LIBS $LIBS"
11562 for ac_func in gnutls_certificate_set_verify_function
11563do :
11564 ac_fn_c_check_func "$LINENO" "gnutls_certificate_set_verify_function" "ac_cv_func_gnutls_certificate_set_verify_function"
11565if test "x$ac_cv_func_gnutls_certificate_set_verify_function" = x""yes; then :
11566 cat >>confdefs.h <<_ACEOF
11567#define HAVE_GNUTLS_CERTIFICATE_SET_VERIFY_FUNCTION 1
f199cab1 11568_ACEOF
5476a9a4
GM
11569 HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY=yes
11570fi
11571done
067d23c9
KY
11572
11573
5476a9a4
GM
11574 if test "${HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY}" = "yes"; then
11575
11576$as_echo "#define HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY 1" >>confdefs.h
f527bd02 11577
f199cab1 11578 fi
5476a9a4 11579fi
f527bd02 11580
f527bd02 11581
5476a9a4
GM
11582
11583
b5eb356a
GM
11584if test "${with_inotify}" = "yes"; then
11585 for ac_header in sys/inotify.h
11586do :
11587 ac_fn_c_check_header_mongrel "$LINENO" "sys/inotify.h" "ac_cv_header_sys_inotify_h" "$ac_includes_default"
11588if test "x$ac_cv_header_sys_inotify_h" = x""yes; then :
11589 cat >>confdefs.h <<_ACEOF
11590#define HAVE_SYS_INOTIFY_H 1
11591_ACEOF
11592
11593fi
11594
11595done
11596
11597 if test "$ac_cv_header_sys_inotify_h" = yes ; then
11598 ac_fn_c_check_func "$LINENO" "inotify_init1" "ac_cv_func_inotify_init1"
11599if test "x$ac_cv_func_inotify_init1" = x""yes; then :
11600
11601fi
11602
11603 fi
11604fi
11605if test "$ac_cv_func_inotify_init1" = yes; then
11606
11607$as_echo "#define HAVE_INOTIFY 1" >>confdefs.h
11608
11609fi
11610
4cc63c81
GM
11611HAVE_POSIX_ACL=no
11612LIBACL_LIBS=
11613if test "${with_acl}" = "yes"; then
11614 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for acl_set_file in -lacl" >&5
11615$as_echo_n "checking for acl_set_file in -lacl... " >&6; }
11616if test "${ac_cv_lib_acl_acl_set_file+set}" = set; then :
11617 $as_echo_n "(cached) " >&6
11618else
11619 ac_check_lib_save_LIBS=$LIBS
11620LIBS="-lacl $LIBS"
11621cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11622/* end confdefs.h. */
11623
11624/* Override any GCC internal prototype to avoid an error.
11625 Use char because int might match the return type of a GCC
11626 builtin and then its argument prototype would still apply. */
11627#ifdef __cplusplus
11628extern "C"
11629#endif
11630char acl_set_file ();
11631int
11632main ()
11633{
11634return acl_set_file ();
11635 ;
11636 return 0;
11637}
11638_ACEOF
11639if ac_fn_c_try_link "$LINENO"; then :
11640 ac_cv_lib_acl_acl_set_file=yes
11641else
11642 ac_cv_lib_acl_acl_set_file=no
11643fi
11644rm -f core conftest.err conftest.$ac_objext \
11645 conftest$ac_exeext conftest.$ac_ext
11646LIBS=$ac_check_lib_save_LIBS
11647fi
11648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_acl_acl_set_file" >&5
11649$as_echo "$ac_cv_lib_acl_acl_set_file" >&6; }
11650if test "x$ac_cv_lib_acl_acl_set_file" = x""yes; then :
11651 HAVE_POSIX_ACL=yes
11652else
11653 HAVE_POSIX_ACL=no
11654fi
11655
11656 if test "$HAVE_POSIX_ACL" = yes; then
11657
11658$as_echo "#define HAVE_POSIX_ACL 1" >>confdefs.h
11659
11660 LIBACL_LIBS=-lacl
11661 else
11662 ac_fn_c_check_func "$LINENO" "acl_set_file" "ac_cv_func_acl_set_file"
11663if test "x$ac_cv_func_acl_set_file" = x""yes; then :
11664 HAVE_POSIX_ACL=yes
11665else
11666 HAVE_POSIX_ACL=no
11667fi
11668
11669 if test "$HAVE_POSIX_ACL" = yes; then
11670
11671$as_echo "#define HAVE_POSIX_ACL 1" >>confdefs.h
11672
11673 fi
11674 fi
11675fi
11676
11677
5476a9a4
GM
11678HAVE_XAW3D=no
11679LUCID_LIBW=
11680if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then
11681 if test "$with_xaw3d" != no; then
5476a9a4 11682 if test "${emacs_cv_xaw3d+set}" = set; then :
f199cab1
GM
11683 $as_echo_n "(cached) " >&6
11684else
5476a9a4
GM
11685 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11686/* end confdefs.h. */
f527bd02 11687
5476a9a4
GM
11688#include <X11/Intrinsic.h>
11689#include <X11/Xaw3d/Simple.h>
11690int
11691main ()
11692{
11693
11694 ;
11695 return 0;
11696}
11697_ACEOF
11698if ac_fn_c_try_link "$LINENO"; then :
11699 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XawScrollbarSetThumb in -lXaw3d" >&5
11700$as_echo_n "checking for XawScrollbarSetThumb in -lXaw3d... " >&6; }
11701if test "${ac_cv_lib_Xaw3d_XawScrollbarSetThumb+set}" = set; then :
11702 $as_echo_n "(cached) " >&6
11703else
11704 ac_check_lib_save_LIBS=$LIBS
11705LIBS="-lXaw3d $LIBS"
11706cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11707/* end confdefs.h. */
f527bd02 11708
5476a9a4
GM
11709/* Override any GCC internal prototype to avoid an error.
11710 Use char because int might match the return type of a GCC
11711 builtin and then its argument prototype would still apply. */
11712#ifdef __cplusplus
11713extern "C"
11714#endif
11715char XawScrollbarSetThumb ();
11716int
11717main ()
11718{
11719return XawScrollbarSetThumb ();
11720 ;
11721 return 0;
11722}
11723_ACEOF
11724if ac_fn_c_try_link "$LINENO"; then :
11725 ac_cv_lib_Xaw3d_XawScrollbarSetThumb=yes
f199cab1 11726else
5476a9a4 11727 ac_cv_lib_Xaw3d_XawScrollbarSetThumb=no
f199cab1 11728fi
5476a9a4
GM
11729rm -f core conftest.err conftest.$ac_objext \
11730 conftest$ac_exeext conftest.$ac_ext
11731LIBS=$ac_check_lib_save_LIBS
11732fi
11733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&5
11734$as_echo "$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&6; }
11735if test "x$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" = x""yes; then :
11736 emacs_cv_xaw3d=yes
11737else
11738 emacs_cv_xaw3d=no
f199cab1 11739fi
f527bd02 11740
5476a9a4
GM
11741else
11742 emacs_cv_xaw3d=no
11743fi
11744rm -f core conftest.err conftest.$ac_objext \
11745 conftest$ac_exeext conftest.$ac_ext
11746fi
f527bd02 11747
5476a9a4
GM
11748 else
11749 emacs_cv_xaw3d=no
11750 fi
11751 if test $emacs_cv_xaw3d = yes; then
4fa92495
GM
11752 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xaw3d" >&5
11753$as_echo_n "checking for xaw3d... " >&6; }
5476a9a4
GM
11754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5
11755$as_echo "yes; using Lucid toolkit" >&6; }
11756 USE_X_TOOLKIT=LUCID
11757 HAVE_XAW3D=yes
11758 LUCID_LIBW=-lXaw3d
f527bd02 11759
5476a9a4 11760$as_echo "#define HAVE_XAW3D 1" >>confdefs.h
f527bd02 11761
5476a9a4 11762 else
4fa92495
GM
11763 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xaw3d" >&5
11764$as_echo_n "checking for xaw3d... " >&6; }
5476a9a4
GM
11765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11766$as_echo "no" >&6; }
11767 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libXaw" >&5
11768$as_echo_n "checking for libXaw... " >&6; }
11769 if test "${emacs_cv_xaw+set}" = set; then :
f199cab1
GM
11770 $as_echo_n "(cached) " >&6
11771else
11772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11773/* end confdefs.h. */
067d23c9 11774
5476a9a4
GM
11775#include <X11/Intrinsic.h>
11776#include <X11/Xaw/Simple.h>
f199cab1
GM
11777int
11778main ()
11779{
067d23c9 11780
f199cab1
GM
11781 ;
11782 return 0;
11783}
11784_ACEOF
5476a9a4
GM
11785if ac_fn_c_try_link "$LINENO"; then :
11786 emacs_cv_xaw=yes
f199cab1 11787else
5476a9a4 11788 emacs_cv_xaw=no
f199cab1 11789fi
5476a9a4
GM
11790rm -f core conftest.err conftest.$ac_objext \
11791 conftest$ac_exeext conftest.$ac_ext
f199cab1 11792fi
067d23c9 11793
5476a9a4
GM
11794 if test $emacs_cv_xaw = yes; then
11795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5
11796$as_echo "yes; using Lucid toolkit" >&6; }
11797 USE_X_TOOLKIT=LUCID
11798 LUCID_LIBW=-lXaw
11799 elif test x"${USE_X_TOOLKIT}" = xLUCID; then
11800 as_fn_error "Lucid toolkit requires X11/Xaw include files" "$LINENO" 5
f199cab1 11801 else
5476a9a4
GM
11802 as_fn_error "No X toolkit could be found.
11803If you are sure you want Emacs compiled without an X toolkit, pass
11804 --with-x-toolkit=no
11805to configure. Otherwise, install the development libraries for the toolkit
11806that you want to use (e.g. Gtk+) and re-run configure." "$LINENO" 5
f199cab1 11807 fi
5476a9a4
GM
11808 fi
11809fi
067d23c9 11810
5476a9a4 11811X_TOOLKIT_TYPE=$USE_X_TOOLKIT
067d23c9 11812
5476a9a4
GM
11813LIBXTR6=
11814if test "${USE_X_TOOLKIT}" != "none"; then
11815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 toolkit version" >&5
11816$as_echo_n "checking X11 toolkit version... " >&6; }
11817 if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then :
f199cab1
GM
11818 $as_echo_n "(cached) " >&6
11819else
5476a9a4 11820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 11821/* end confdefs.h. */
5476a9a4 11822#include <X11/Intrinsic.h>
f199cab1
GM
11823int
11824main ()
11825{
5476a9a4
GM
11826#if XtSpecificationRelease < 6
11827fail;
11828#endif
f527bd02 11829
f199cab1
GM
11830 ;
11831 return 0;
11832}
067d23c9 11833_ACEOF
5476a9a4
GM
11834if ac_fn_c_try_link "$LINENO"; then :
11835 emacs_cv_x11_toolkit_version_6=yes
11836else
11837 emacs_cv_x11_toolkit_version_6=no
067d23c9 11838fi
5476a9a4
GM
11839rm -f core conftest.err conftest.$ac_objext \
11840 conftest$ac_exeext conftest.$ac_ext
067d23c9
KY
11841fi
11842
5476a9a4
GM
11843 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
11844 if test $emacs_cv_x11_toolkit_version_6 = yes; then
11845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5
11846$as_echo "6 or newer" >&6; }
f527bd02 11847
5476a9a4 11848$as_echo "#define HAVE_X11XTR6 1" >>confdefs.h
f527bd02 11849
5476a9a4
GM
11850 LIBXTR6="-lSM -lICE"
11851 case "$opsys" in
11852 ## Use libw.a along with X11R6 Xt.
11853 unixware) LIBXTR6="$LIBXTR6 -lw" ;;
11854 esac
11855 else
11856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5
11857$as_echo "before 6" >&6; }
f199cab1 11858 fi
f527bd02 11859
5476a9a4
GM
11860 OLDLIBS="$LIBS"
11861 if test x$HAVE_X11XTR6 = xyes; then
11862 LIBS="-lXt -lSM -lICE $LIBS"
11863 else
11864 LIBS="-lXt $LIBS"
11865 fi
11866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XmuConvertStandardSelection in -lXmu" >&5
11867$as_echo_n "checking for XmuConvertStandardSelection in -lXmu... " >&6; }
11868if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then :
11869 $as_echo_n "(cached) " >&6
11870else
11871 ac_check_lib_save_LIBS=$LIBS
11872LIBS="-lXmu $LIBS"
11873cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11874/* end confdefs.h. */
f199cab1 11875
5476a9a4
GM
11876/* Override any GCC internal prototype to avoid an error.
11877 Use char because int might match the return type of a GCC
11878 builtin and then its argument prototype would still apply. */
11879#ifdef __cplusplus
11880extern "C"
11881#endif
11882char XmuConvertStandardSelection ();
067d23c9
KY
11883int
11884main ()
11885{
5476a9a4 11886return XmuConvertStandardSelection ();
067d23c9
KY
11887 ;
11888 return 0;
11889}
11890_ACEOF
5476a9a4
GM
11891if ac_fn_c_try_link "$LINENO"; then :
11892 ac_cv_lib_Xmu_XmuConvertStandardSelection=yes
11893else
11894 ac_cv_lib_Xmu_XmuConvertStandardSelection=no
067d23c9 11895fi
5476a9a4
GM
11896rm -f core conftest.err conftest.$ac_objext \
11897 conftest$ac_exeext conftest.$ac_ext
11898LIBS=$ac_check_lib_save_LIBS
067d23c9 11899fi
5476a9a4
GM
11900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5
11901$as_echo "$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6; }
11902if test "x$ac_cv_lib_Xmu_XmuConvertStandardSelection" = x""yes; then :
11903 cat >>confdefs.h <<_ACEOF
11904#define HAVE_LIBXMU 1
f199cab1
GM
11905_ACEOF
11906
5476a9a4 11907 LIBS="-lXmu $LIBS"
f199cab1 11908
067d23c9
KY
11909fi
11910
5476a9a4
GM
11911 test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
11912 fi
067d23c9 11913
067d23c9 11914
5476a9a4
GM
11915LIBXMU=-lXmu
11916case $opsys in
11917 ## These systems don't supply Xmu.
11918 hpux* | aix4-2 )
11919 test "X$ac_cv_lib_Xmu_XmuConvertStandardSelection" != "Xyes" && LIBXMU=
11920 ;;
11921esac
067d23c9
KY
11922
11923
5476a9a4
GM
11924# On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
11925if test "${HAVE_X11}" = "yes"; then
11926 if test "${USE_X_TOOLKIT}" != "none"; then
11927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XShapeQueryExtension in -lXext" >&5
11928$as_echo_n "checking for XShapeQueryExtension in -lXext... " >&6; }
11929if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then :
f199cab1
GM
11930 $as_echo_n "(cached) " >&6
11931else
5476a9a4
GM
11932 ac_check_lib_save_LIBS=$LIBS
11933LIBS="-lXext $LIBS"
11934cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 11935/* end confdefs.h. */
f199cab1 11936
5476a9a4
GM
11937/* Override any GCC internal prototype to avoid an error.
11938 Use char because int might match the return type of a GCC
11939 builtin and then its argument prototype would still apply. */
11940#ifdef __cplusplus
11941extern "C"
11942#endif
11943char XShapeQueryExtension ();
11944int
11945main ()
11946{
11947return XShapeQueryExtension ();
11948 ;
11949 return 0;
11950}
e7d4e61f 11951_ACEOF
5476a9a4
GM
11952if ac_fn_c_try_link "$LINENO"; then :
11953 ac_cv_lib_Xext_XShapeQueryExtension=yes
11954else
11955 ac_cv_lib_Xext_XShapeQueryExtension=no
067d23c9 11956fi
5476a9a4
GM
11957rm -f core conftest.err conftest.$ac_objext \
11958 conftest$ac_exeext conftest.$ac_ext
11959LIBS=$ac_check_lib_save_LIBS
11960fi
11961{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
11962$as_echo "$ac_cv_lib_Xext_XShapeQueryExtension" >&6; }
11963if test "x$ac_cv_lib_Xext_XShapeQueryExtension" = x""yes; then :
11964 cat >>confdefs.h <<_ACEOF
11965#define HAVE_LIBXEXT 1
11966_ACEOF
f199cab1 11967
5476a9a4 11968 LIBS="-lXext $LIBS"
f199cab1 11969
5476a9a4 11970fi
f199cab1 11971
5476a9a4
GM
11972 fi
11973fi
f199cab1 11974
5476a9a4
GM
11975LIBXP=
11976if test "${USE_X_TOOLKIT}" = "MOTIF"; then
8ad96b1d
GM
11977 # OpenMotif may be installed in such a way on some GNU/Linux systems.
11978 if test -d /usr/include/openmotif; then
11979 CPPFLAGS="-I/usr/include/openmotif $CPPFLAGS"
11980 emacs_cv_openmotif=yes
11981 case "$canonical" in
11982 x86_64-*-linux-gnu* | powerpc64-*-linux-gnu* | sparc64-*-linux-gnu*)
11983 test -d /usr/lib64/openmotif && LDFLAGS="-L/usr/lib64/openmotif $LDFLAGS"
11984 ;;
11985 *)
11986 test -d /usr/lib/openmotif && LDFLAGS="-L/usr/lib/openmotif $LDFLAGS"
11987 esac
11988 else
11989 emacs_cv_openmotif=no
11990 fi
11991 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for (Open)Motif version 2.1" >&5
11992$as_echo_n "checking for (Open)Motif version 2.1... " >&6; }
5476a9a4 11993if test "${emacs_cv_motif_version_2_1+set}" = set; then :
ae1362a3
AS
11994 $as_echo_n "(cached) " >&6
11995else
f199cab1
GM
11996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11997/* end confdefs.h. */
5476a9a4
GM
11998#include <Xm/Xm.h>
11999int
12000main ()
12001{
12002#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
12003int x = 5;
12004#else
12005Motif version prior to 2.1.
12006#endif
12007 ;
12008 return 0;
12009}
12010_ACEOF
12011if ac_fn_c_try_compile "$LINENO"; then :
12012 emacs_cv_motif_version_2_1=yes
12013else
12014 emacs_cv_motif_version_2_1=no
12015fi
12016rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12017fi
12018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_motif_version_2_1" >&5
12019$as_echo "$emacs_cv_motif_version_2_1" >&6; }
12020 if test $emacs_cv_motif_version_2_1 = yes; then
12021 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpCreateContext in -lXp" >&5
12022$as_echo_n "checking for XpCreateContext in -lXp... " >&6; }
12023if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then :
12024 $as_echo_n "(cached) " >&6
12025else
12026 ac_check_lib_save_LIBS=$LIBS
12027LIBS="-lXp $LIBS"
12028cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12029/* end confdefs.h. */
f199cab1 12030
5476a9a4
GM
12031/* Override any GCC internal prototype to avoid an error.
12032 Use char because int might match the return type of a GCC
12033 builtin and then its argument prototype would still apply. */
12034#ifdef __cplusplus
12035extern "C"
12036#endif
12037char XpCreateContext ();
ae1362a3
AS
12038int
12039main ()
12040{
5476a9a4 12041return XpCreateContext ();
ae1362a3
AS
12042 ;
12043 return 0;
12044}
12045_ACEOF
5476a9a4
GM
12046if ac_fn_c_try_link "$LINENO"; then :
12047 ac_cv_lib_Xp_XpCreateContext=yes
067d23c9 12048else
5476a9a4 12049 ac_cv_lib_Xp_XpCreateContext=no
067d23c9 12050fi
5476a9a4
GM
12051rm -f core conftest.err conftest.$ac_objext \
12052 conftest$ac_exeext conftest.$ac_ext
12053LIBS=$ac_check_lib_save_LIBS
12054fi
12055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xp_XpCreateContext" >&5
12056$as_echo "$ac_cv_lib_Xp_XpCreateContext" >&6; }
12057if test "x$ac_cv_lib_Xp_XpCreateContext" = x""yes; then :
12058 LIBXP=-lXp
067d23c9 12059fi
f199cab1 12060
8ad96b1d
GM
12061 if test x$emacs_cv_openmotif = xyes; then
12062 REAL_CPPFLAGS="-I/usr/include/openmotif $REAL_CPPFLAGS"
12063 fi
5476a9a4
GM
12064 else
12065 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LessTif where some systems put it" >&5
12066$as_echo_n "checking for LessTif where some systems put it... " >&6; }
12067if test "${emacs_cv_lesstif+set}" = set; then :
067d23c9 12068 $as_echo_n "(cached) " >&6
f199cab1 12069else
5476a9a4
GM
12070 # We put this in CFLAGS temporarily to precede other -I options
12071 # that might be in CFLAGS temporarily.
12072 # We put this in CPPFLAGS where it precedes the other -I options.
12073 OLD_CPPFLAGS=$CPPFLAGS
12074 OLD_CFLAGS=$CFLAGS
12075 CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS"
12076 CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS"
12077 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 12078/* end confdefs.h. */
5476a9a4 12079#include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h>
067d23c9
KY
12080int
12081main ()
12082{
5476a9a4 12083int x = 5;
067d23c9
KY
12084 ;
12085 return 0;
12086}
12087_ACEOF
5476a9a4
GM
12088if ac_fn_c_try_compile "$LINENO"; then :
12089 emacs_cv_lesstif=yes
067d23c9 12090else
5476a9a4 12091 emacs_cv_lesstif=no
067d23c9 12092fi
5476a9a4 12093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
067d23c9 12094fi
5476a9a4
GM
12095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_lesstif" >&5
12096$as_echo "$emacs_cv_lesstif" >&6; }
12097 if test $emacs_cv_lesstif = yes; then
12098 # Make sure this -I option remains in CPPFLAGS after it is set
12099 # back to REAL_CPPFLAGS.
12100 # There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not
12101 # have those other -I options anyway. Ultimately, having this
12102 # directory ultimately in CPPFLAGS will be enough.
12103 REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS"
12104 LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS"
12105 else
12106 CFLAGS=$OLD_CFLAGS
12107 CPPFLAGS=$OLD_CPPFLAGS
12108 fi
12109 fi
12110 ac_fn_c_check_header_mongrel "$LINENO" "Xm/BulletinB.h" "ac_cv_header_Xm_BulletinB_h" "$ac_includes_default"
12111if test "x$ac_cv_header_Xm_BulletinB_h" = x""yes; then :
067d23c9 12112
5476a9a4
GM
12113else
12114 as_fn_error "Motif toolkit requested but requirements not found." "$LINENO" 5
067d23c9 12115fi
f199cab1
GM
12116
12117
5476a9a4 12118fi
f199cab1
GM
12119
12120
5476a9a4
GM
12121USE_TOOLKIT_SCROLL_BARS=no
12122if test "${with_toolkit_scroll_bars}" != "no"; then
12123 if test "${USE_X_TOOLKIT}" != "none"; then
12124 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
12125 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
f199cab1 12126
5476a9a4
GM
12127 HAVE_XAW3D=no
12128 USE_TOOLKIT_SCROLL_BARS=yes
12129 elif test "${HAVE_XAW3D}" = "yes" || test "${USE_X_TOOLKIT}" = "LUCID"; then
12130 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
f199cab1 12131
5476a9a4
GM
12132 USE_TOOLKIT_SCROLL_BARS=yes
12133 fi
12134 elif test "${HAVE_GTK}" = "yes"; then
12135 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
f199cab1 12136
5476a9a4
GM
12137 USE_TOOLKIT_SCROLL_BARS=yes
12138 elif test "${HAVE_NS}" = "yes"; then
12139 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
f199cab1 12140
5c0255d9
GM
12141 USE_TOOLKIT_SCROLL_BARS=yes
12142 elif test "${HAVE_W32}" = "yes"; then
12143 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
12144
5476a9a4
GM
12145 USE_TOOLKIT_SCROLL_BARS=yes
12146 fi
12147fi
f199cab1 12148
5476a9a4 12149cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 12150/* end confdefs.h. */
5476a9a4
GM
12151
12152 #include <X11/Xlib.h>
12153 #include <X11/Xresource.h>
067d23c9
KY
12154int
12155main ()
12156{
5476a9a4 12157XIMProc callback;
067d23c9
KY
12158 ;
12159 return 0;
12160}
12161_ACEOF
f199cab1 12162if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4
GM
12163 HAVE_XIM=yes
12164
12165$as_echo "#define HAVE_XIM 1" >>confdefs.h
12166
067d23c9 12167else
5476a9a4 12168 HAVE_XIM=no
067d23c9 12169fi
f199cab1 12170rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 12171
f199cab1 12172
5476a9a4
GM
12173if test "${with_xim}" != "no"; then
12174
12175$as_echo "#define USE_XIM 1" >>confdefs.h
12176
12177fi
12178
12179
12180if test "${HAVE_XIM}" != "no"; then
12181 late_CFLAGS=$CFLAGS
12182 if test "$GCC" = yes; then
12183 CFLAGS="$CFLAGS --pedantic-errors"
12184 fi
12185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12186/* end confdefs.h. */
f199cab1 12187
5476a9a4
GM
12188#include <X11/Xlib.h>
12189#include <X11/Xresource.h>
12190int
12191main ()
12192{
12193Display *display;
12194XrmDatabase db;
12195char *res_name;
12196char *res_class;
12197XIMProc callback;
12198XPointer *client_data;
12199#ifndef __GNUC__
12200/* If we're not using GCC, it's probably not XFree86, and this is
12201 probably right, but we can't use something like --pedantic-errors. */
12202extern Bool XRegisterIMInstantiateCallback(Display*, XrmDatabase, char*,
12203 char*, XIMProc, XPointer*);
12204#endif
12205(void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, callback,
12206 client_data);
067d23c9
KY
12207 ;
12208 return 0;
12209}
12210_ACEOF
5476a9a4
GM
12211if ac_fn_c_try_compile "$LINENO"; then :
12212 emacs_cv_arg6_star=yes
067d23c9 12213fi
f199cab1 12214rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5476a9a4
GM
12215 if test "$emacs_cv_arg6_star" = yes; then
12216 $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer*" >>confdefs.h
12217
12218 else
12219 $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer" >>confdefs.h
067d23c9 12220
5476a9a4
GM
12221 fi
12222 CFLAGS=$late_CFLAGS
067d23c9
KY
12223fi
12224
5476a9a4
GM
12225### Start of font-backend (under any platform) section.
12226# (nothing here yet -- this is a placeholder)
12227### End of font-backend (under any platform) section.
067d23c9 12228
5476a9a4
GM
12229### Start of font-backend (under X11) section.
12230if test "${HAVE_X11}" = "yes"; then
067d23c9 12231
5476a9a4 12232 succeeded=no
067d23c9 12233
5476a9a4
GM
12234 if test "$PKG_CONFIG" = "no" ; then
12235 HAVE_FC=no
12236 else
12237 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 12238 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
12239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fontconfig >= 2.2.0" >&5
12240$as_echo_n "checking for fontconfig >= 2.2.0... " >&6; }
f199cab1 12241
b5591ebb
GM
12242 if "$PKG_CONFIG" --exists "fontconfig >= 2.2.0" 2>&5 &&
12243 FONTCONFIG_CFLAGS=`"$PKG_CONFIG" --cflags "fontconfig >= 2.2.0" 2>&5` &&
12244 FONTCONFIG_LIBS=`"$PKG_CONFIG" --libs "fontconfig >= 2.2.0" 2>&5`; then
5476a9a4
GM
12245 edit_cflags="
12246 s,///*,/,g
12247 s/^/ /
12248 s/ -I/ $isystem/g
12249 s/^ //
12250 "
12251 FONTCONFIG_CFLAGS=`$as_echo "$FONTCONFIG_CFLAGS" | sed -e "$edit_cflags"`
12252 FONTCONFIG_LIBS=`$as_echo "$FONTCONFIG_LIBS" | sed -e 's,///*,/,g'`
12253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$FONTCONFIG_CFLAGS' LIBS='$FONTCONFIG_LIBS'" >&5
12254$as_echo "yes CFLAGS='$FONTCONFIG_CFLAGS' LIBS='$FONTCONFIG_LIBS'" >&6; }
12255 succeeded=yes
12256 else
12257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12258$as_echo "no" >&6; }
12259 FONTCONFIG_CFLAGS=""
12260 FONTCONFIG_LIBS=""
12261 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
12262 ## do set a variable so people can do so. Do it in a subshell
12263 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 12264 FONTCONFIG_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "fontconfig >= 2.2.0") 2>&1`
f199cab1 12265
5476a9a4 12266 fi
f199cab1
GM
12267
12268
12269
f199cab1 12270 else
5476a9a4
GM
12271 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12272 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12273 fi
12274 fi
f199cab1 12275
5476a9a4
GM
12276 if test $succeeded = yes; then
12277 HAVE_FC=yes
12278 else
12279 HAVE_FC=no
12280 fi
f199cab1 12281
067d23c9 12282
5476a9a4
GM
12283 ## Use -lXft if available, unless `--with-xft=no'.
12284 HAVE_XFT=maybe
12285 if test "${HAVE_FC}" = "no" || test "x${with_x}" = "xno"; then
12286 with_xft="no";
12287 fi
12288 if test "x${with_xft}" != "xno"; then
f199cab1 12289
f199cab1 12290
5476a9a4 12291 succeeded=no
f199cab1 12292
5476a9a4
GM
12293 if test "$PKG_CONFIG" = "no" ; then
12294 HAVE_XFT=no
12295 else
12296 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 12297 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
12298 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xft >= 0.13.0" >&5
12299$as_echo_n "checking for xft >= 0.13.0... " >&6; }
f199cab1 12300
b5591ebb
GM
12301 if "$PKG_CONFIG" --exists "xft >= 0.13.0" 2>&5 &&
12302 XFT_CFLAGS=`"$PKG_CONFIG" --cflags "xft >= 0.13.0" 2>&5` &&
12303 XFT_LIBS=`"$PKG_CONFIG" --libs "xft >= 0.13.0" 2>&5`; then
5476a9a4
GM
12304 edit_cflags="
12305 s,///*,/,g
12306 s/^/ /
12307 s/ -I/ $isystem/g
12308 s/^ //
12309 "
12310 XFT_CFLAGS=`$as_echo "$XFT_CFLAGS" | sed -e "$edit_cflags"`
12311 XFT_LIBS=`$as_echo "$XFT_LIBS" | sed -e 's,///*,/,g'`
12312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$XFT_CFLAGS' LIBS='$XFT_LIBS'" >&5
12313$as_echo "yes CFLAGS='$XFT_CFLAGS' LIBS='$XFT_LIBS'" >&6; }
12314 succeeded=yes
12315 else
12316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12317$as_echo "no" >&6; }
12318 XFT_CFLAGS=""
12319 XFT_LIBS=""
12320 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
12321 ## do set a variable so people can do so. Do it in a subshell
12322 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 12323 XFT_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "xft >= 0.13.0") 2>&1`
f199cab1 12324
5476a9a4 12325 fi
f199cab1
GM
12326
12327
12328
5476a9a4
GM
12329 else
12330 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12331 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12332 fi
12333 fi
f199cab1 12334
5476a9a4
GM
12335 if test $succeeded = yes; then
12336 :
f199cab1 12337 else
5476a9a4 12338 HAVE_XFT=no
f199cab1
GM
12339 fi
12340
5476a9a4
GM
12341 ## Because xftfont.c uses XRenderQueryExtension, we also
12342 ## need to link to -lXrender.
12343 HAVE_XRENDER=no
12344 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRenderQueryExtension in -lXrender" >&5
12345$as_echo_n "checking for XRenderQueryExtension in -lXrender... " >&6; }
12346if test "${ac_cv_lib_Xrender_XRenderQueryExtension+set}" = set; then :
12347 $as_echo_n "(cached) " >&6
12348else
12349 ac_check_lib_save_LIBS=$LIBS
12350LIBS="-lXrender $LIBS"
12351cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12352/* end confdefs.h. */
f199cab1 12353
5476a9a4
GM
12354/* Override any GCC internal prototype to avoid an error.
12355 Use char because int might match the return type of a GCC
12356 builtin and then its argument prototype would still apply. */
12357#ifdef __cplusplus
12358extern "C"
12359#endif
12360char XRenderQueryExtension ();
12361int
12362main ()
12363{
12364return XRenderQueryExtension ();
12365 ;
12366 return 0;
12367}
12368_ACEOF
12369if ac_fn_c_try_link "$LINENO"; then :
12370 ac_cv_lib_Xrender_XRenderQueryExtension=yes
12371else
12372 ac_cv_lib_Xrender_XRenderQueryExtension=no
12373fi
12374rm -f core conftest.err conftest.$ac_objext \
12375 conftest$ac_exeext conftest.$ac_ext
12376LIBS=$ac_check_lib_save_LIBS
12377fi
12378{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrender_XRenderQueryExtension" >&5
12379$as_echo "$ac_cv_lib_Xrender_XRenderQueryExtension" >&6; }
12380if test "x$ac_cv_lib_Xrender_XRenderQueryExtension" = x""yes; then :
12381 HAVE_XRENDER=yes
12382fi
f199cab1 12383
5476a9a4
GM
12384 if test "$HAVE_XFT" != no && test "$HAVE_XRENDER" != no; then
12385 OLD_CPPFLAGS="$CPPFLAGS"
12386 OLD_CFLAGS="$CFLAGS"
12387 OLD_LIBS="$LIBS"
12388 CPPFLAGS="$CPPFLAGS $XFT_CFLAGS"
12389 CFLAGS="$CFLAGS $XFT_CFLAGS"
12390 XFT_LIBS="-lXrender $XFT_LIBS"
12391 LIBS="$XFT_LIBS $LIBS"
12392 ac_fn_c_check_header_mongrel "$LINENO" "X11/Xft/Xft.h" "ac_cv_header_X11_Xft_Xft_h" "$ac_includes_default"
12393if test "x$ac_cv_header_X11_Xft_Xft_h" = x""yes; then :
12394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XftFontOpen in -lXft" >&5
12395$as_echo_n "checking for XftFontOpen in -lXft... " >&6; }
12396if test "${ac_cv_lib_Xft_XftFontOpen+set}" = set; then :
12397 $as_echo_n "(cached) " >&6
12398else
12399 ac_check_lib_save_LIBS=$LIBS
12400LIBS="-lXft $XFT_LIBS $LIBS"
12401cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12402/* end confdefs.h. */
f199cab1 12403
5476a9a4
GM
12404/* Override any GCC internal prototype to avoid an error.
12405 Use char because int might match the return type of a GCC
12406 builtin and then its argument prototype would still apply. */
12407#ifdef __cplusplus
12408extern "C"
12409#endif
12410char XftFontOpen ();
12411int
12412main ()
12413{
12414return XftFontOpen ();
12415 ;
12416 return 0;
12417}
067d23c9 12418_ACEOF
5476a9a4
GM
12419if ac_fn_c_try_link "$LINENO"; then :
12420 ac_cv_lib_Xft_XftFontOpen=yes
12421else
12422 ac_cv_lib_Xft_XftFontOpen=no
12423fi
12424rm -f core conftest.err conftest.$ac_objext \
12425 conftest$ac_exeext conftest.$ac_ext
12426LIBS=$ac_check_lib_save_LIBS
12427fi
12428{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xft_XftFontOpen" >&5
12429$as_echo "$ac_cv_lib_Xft_XftFontOpen" >&6; }
12430if test "x$ac_cv_lib_Xft_XftFontOpen" = x""yes; then :
12431 HAVE_XFT=yes
f199cab1
GM
12432fi
12433
5476a9a4 12434fi
f199cab1
GM
12435
12436
f199cab1 12437
5476a9a4 12438 if test "${HAVE_XFT}" = "yes"; then
f199cab1 12439
5476a9a4 12440$as_echo "#define HAVE_XFT 1" >>confdefs.h
f199cab1 12441
067d23c9 12442
5476a9a4
GM
12443 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $XFT_CFLAGS"
12444 else
12445 CPPFLAGS="$OLD_CPPFLAGS"
12446 CFLAGS="$OLD_CFLAGS"
12447 LIBS="$OLD_LIBS"
12448 fi # "${HAVE_XFT}" = "yes"
12449 fi # "$HAVE_XFT" != no
12450 fi # "x${with_xft}" != "xno"
f199cab1 12451
5476a9a4
GM
12452 ## We used to allow building with FreeType and without Xft.
12453 ## However, the ftx font backend driver is not in good shape.
12454 if test "$HAVE_XFT" != "yes"; then
12455 HAVE_XFT=no
12456 HAVE_FREETYPE=no
12457 else
f199cab1 12458
5476a9a4 12459 succeeded=no
f199cab1 12460
5476a9a4
GM
12461 if test "$PKG_CONFIG" = "no" ; then
12462 HAVE_FREETYPE=no
12463 else
12464 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 12465 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
12466 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype2" >&5
12467$as_echo_n "checking for freetype2... " >&6; }
f199cab1 12468
b5591ebb
GM
12469 if "$PKG_CONFIG" --exists "freetype2" 2>&5 &&
12470 FREETYPE_CFLAGS=`"$PKG_CONFIG" --cflags "freetype2" 2>&5` &&
12471 FREETYPE_LIBS=`"$PKG_CONFIG" --libs "freetype2" 2>&5`; then
5476a9a4
GM
12472 edit_cflags="
12473 s,///*,/,g
12474 s/^/ /
12475 s/ -I/ $isystem/g
12476 s/^ //
12477 "
12478 FREETYPE_CFLAGS=`$as_echo "$FREETYPE_CFLAGS" | sed -e "$edit_cflags"`
12479 FREETYPE_LIBS=`$as_echo "$FREETYPE_LIBS" | sed -e 's,///*,/,g'`
12480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$FREETYPE_CFLAGS' LIBS='$FREETYPE_LIBS'" >&5
12481$as_echo "yes CFLAGS='$FREETYPE_CFLAGS' LIBS='$FREETYPE_LIBS'" >&6; }
12482 succeeded=yes
12483 else
12484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12485$as_echo "no" >&6; }
12486 FREETYPE_CFLAGS=""
12487 FREETYPE_LIBS=""
12488 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
12489 ## do set a variable so people can do so. Do it in a subshell
12490 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 12491 FREETYPE_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "freetype2") 2>&1`
f199cab1 12492
5476a9a4 12493 fi
f199cab1 12494
f199cab1 12495
067d23c9 12496
5476a9a4
GM
12497 else
12498 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12499 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12500 fi
067d23c9 12501 fi
f199cab1 12502
5476a9a4
GM
12503 if test $succeeded = yes; then
12504 HAVE_FREETYPE=yes
12505 else
12506 HAVE_FREETYPE=no
12507 fi
f199cab1 12508
f199cab1 12509
5476a9a4
GM
12510 test "$HAVE_FREETYPE" = "no" && as_fn_error "libxft requires libfreetype" "$LINENO" 5
12511 fi
f199cab1 12512
5476a9a4
GM
12513 HAVE_LIBOTF=no
12514 if test "${HAVE_FREETYPE}" = "yes"; then
f199cab1 12515
5476a9a4 12516$as_echo "#define HAVE_FREETYPE 1" >>confdefs.h
f199cab1 12517
5476a9a4 12518 if test "${with_libotf}" != "no"; then
f199cab1 12519
5476a9a4 12520 succeeded=no
f199cab1 12521
5476a9a4
GM
12522 if test "$PKG_CONFIG" = "no" ; then
12523 HAVE_LIBOTF=no
12524 else
12525 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 12526 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
12527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libotf" >&5
12528$as_echo_n "checking for libotf... " >&6; }
f199cab1 12529
b5591ebb
GM
12530 if "$PKG_CONFIG" --exists "libotf" 2>&5 &&
12531 LIBOTF_CFLAGS=`"$PKG_CONFIG" --cflags "libotf" 2>&5` &&
12532 LIBOTF_LIBS=`"$PKG_CONFIG" --libs "libotf" 2>&5`; then
5476a9a4
GM
12533 edit_cflags="
12534 s,///*,/,g
12535 s/^/ /
12536 s/ -I/ $isystem/g
12537 s/^ //
12538 "
12539 LIBOTF_CFLAGS=`$as_echo "$LIBOTF_CFLAGS" | sed -e "$edit_cflags"`
12540 LIBOTF_LIBS=`$as_echo "$LIBOTF_LIBS" | sed -e 's,///*,/,g'`
12541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBOTF_CFLAGS' LIBS='$LIBOTF_LIBS'" >&5
12542$as_echo "yes CFLAGS='$LIBOTF_CFLAGS' LIBS='$LIBOTF_LIBS'" >&6; }
12543 succeeded=yes
12544 else
12545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12546$as_echo "no" >&6; }
12547 LIBOTF_CFLAGS=""
12548 LIBOTF_LIBS=""
12549 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
12550 ## do set a variable so people can do so. Do it in a subshell
12551 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 12552 LIBOTF_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "libotf") 2>&1`
067d23c9 12553
5476a9a4 12554 fi
f199cab1
GM
12555
12556
067d23c9 12557
5476a9a4
GM
12558 else
12559 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12560 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12561 fi
12562 fi
f199cab1 12563
5476a9a4
GM
12564 if test $succeeded = yes; then
12565 HAVE_LIBOTF=yes
12566 else
12567 HAVE_LIBOTF=no
12568 fi
f199cab1 12569
5476a9a4 12570 if test "$HAVE_LIBOTF" = "yes"; then
f199cab1 12571
5476a9a4 12572$as_echo "#define HAVE_LIBOTF 1" >>confdefs.h
f199cab1 12573
5476a9a4
GM
12574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTF_get_variation_glyphs in -lotf" >&5
12575$as_echo_n "checking for OTF_get_variation_glyphs in -lotf... " >&6; }
12576if test "${ac_cv_lib_otf_OTF_get_variation_glyphs+set}" = set; then :
067d23c9
KY
12577 $as_echo_n "(cached) " >&6
12578else
5476a9a4
GM
12579 ac_check_lib_save_LIBS=$LIBS
12580LIBS="-lotf $LIBS"
12581cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 12582/* end confdefs.h. */
5476a9a4
GM
12583
12584/* Override any GCC internal prototype to avoid an error.
12585 Use char because int might match the return type of a GCC
12586 builtin and then its argument prototype would still apply. */
12587#ifdef __cplusplus
12588extern "C"
12589#endif
12590char OTF_get_variation_glyphs ();
067d23c9
KY
12591int
12592main ()
12593{
5476a9a4 12594return OTF_get_variation_glyphs ();
067d23c9
KY
12595 ;
12596 return 0;
12597}
12598_ACEOF
5476a9a4
GM
12599if ac_fn_c_try_link "$LINENO"; then :
12600 ac_cv_lib_otf_OTF_get_variation_glyphs=yes
067d23c9 12601else
5476a9a4 12602 ac_cv_lib_otf_OTF_get_variation_glyphs=no
067d23c9 12603fi
5476a9a4
GM
12604rm -f core conftest.err conftest.$ac_objext \
12605 conftest$ac_exeext conftest.$ac_ext
12606LIBS=$ac_check_lib_save_LIBS
12607fi
12608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_otf_OTF_get_variation_glyphs" >&5
12609$as_echo "$ac_cv_lib_otf_OTF_get_variation_glyphs" >&6; }
12610if test "x$ac_cv_lib_otf_OTF_get_variation_glyphs" = x""yes; then :
12611 HAVE_OTF_GET_VARIATION_GLYPHS=yes
12612else
12613 HAVE_OTF_GET_VARIATION_GLYPHS=no
067d23c9 12614fi
067d23c9 12615
5476a9a4
GM
12616 if test "${HAVE_OTF_GET_VARIATION_GLYPHS}" = "yes"; then
12617
12618$as_echo "#define HAVE_OTF_GET_VARIATION_GLYPHS 1" >>confdefs.h
12619
12620 fi
12621 fi
12622 fi
12623 fi
12624
12625 HAVE_M17N_FLT=no
12626 if test "${HAVE_LIBOTF}" = yes; then
12627 if test "${with_m17n_flt}" != "no"; then
12628
12629 succeeded=no
12630
12631 if test "$PKG_CONFIG" = "no" ; then
12632 HAVE_M17N_FLT=no
12633 else
12634 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 12635 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
12636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for m17n-flt" >&5
12637$as_echo_n "checking for m17n-flt... " >&6; }
12638
b5591ebb
GM
12639 if "$PKG_CONFIG" --exists "m17n-flt" 2>&5 &&
12640 M17N_FLT_CFLAGS=`"$PKG_CONFIG" --cflags "m17n-flt" 2>&5` &&
12641 M17N_FLT_LIBS=`"$PKG_CONFIG" --libs "m17n-flt" 2>&5`; then
5476a9a4
GM
12642 edit_cflags="
12643 s,///*,/,g
12644 s/^/ /
12645 s/ -I/ $isystem/g
12646 s/^ //
12647 "
12648 M17N_FLT_CFLAGS=`$as_echo "$M17N_FLT_CFLAGS" | sed -e "$edit_cflags"`
12649 M17N_FLT_LIBS=`$as_echo "$M17N_FLT_LIBS" | sed -e 's,///*,/,g'`
12650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$M17N_FLT_CFLAGS' LIBS='$M17N_FLT_LIBS'" >&5
12651$as_echo "yes CFLAGS='$M17N_FLT_CFLAGS' LIBS='$M17N_FLT_LIBS'" >&6; }
12652 succeeded=yes
12653 else
12654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12655$as_echo "no" >&6; }
12656 M17N_FLT_CFLAGS=""
12657 M17N_FLT_LIBS=""
12658 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
12659 ## do set a variable so people can do so. Do it in a subshell
12660 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 12661 M17N_FLT_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "m17n-flt") 2>&1`
5476a9a4
GM
12662
12663 fi
12664
12665
067d23c9 12666
5476a9a4
GM
12667 else
12668 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12669 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12670 fi
f199cab1 12671 fi
067d23c9 12672
5476a9a4
GM
12673 if test $succeeded = yes; then
12674 HAVE_M17N_FLT=yes
12675 else
12676 HAVE_M17N_FLT=no
12677 fi
12678
12679 if test "$HAVE_M17N_FLT" = "yes"; then
12680
12681$as_echo "#define HAVE_M17N_FLT 1" >>confdefs.h
12682
12683 fi
12684 fi
12685 fi
12686else
12687 HAVE_XFT=no
12688 HAVE_FREETYPE=no
12689 HAVE_LIBOTF=no
12690 HAVE_M17N_FLT=no
12691fi
12692
12693### End of font-backend (under X11) section.
12694
12695
067d23c9 12696
067d23c9 12697
5476a9a4
GM
12698
12699
12700
12701
12702
12703
12704### Use -lXpm if available, unless `--with-xpm=no'.
12705HAVE_XPM=no
12706LIBXPM=
5c0255d9
GM
12707
12708if test "${HAVE_W32}" = "yes"; then
12709 if test "${with_xpm}" != "no"; then
12710 SAVE_CPPFLAGS="$CPPFLAGS"
12711 SAVE_LDFLAGS="$LDFLAGS"
12712 CPPFLAGS="$CPPFLAGS -I/usr/include/noX"
12713 LDFLAGS="$LDFLAGS -L/usr/lib/noX"
12714 ac_fn_c_check_header_mongrel "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "$ac_includes_default"
12715if test "x$ac_cv_header_X11_xpm_h" = x""yes; then :
12716 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReadFileToImage in -lXpm" >&5
12717$as_echo_n "checking for XpmReadFileToImage in -lXpm... " >&6; }
12718if test "${ac_cv_lib_Xpm_XpmReadFileToImage+set}" = set; then :
12719 $as_echo_n "(cached) " >&6
12720else
12721 ac_check_lib_save_LIBS=$LIBS
12722LIBS="-lXpm $LIBS"
12723cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12724/* end confdefs.h. */
12725
12726/* Override any GCC internal prototype to avoid an error.
12727 Use char because int might match the return type of a GCC
12728 builtin and then its argument prototype would still apply. */
12729#ifdef __cplusplus
12730extern "C"
12731#endif
12732char XpmReadFileToImage ();
12733int
12734main ()
12735{
12736return XpmReadFileToImage ();
12737 ;
12738 return 0;
12739}
12740_ACEOF
12741if ac_fn_c_try_link "$LINENO"; then :
12742 ac_cv_lib_Xpm_XpmReadFileToImage=yes
12743else
12744 ac_cv_lib_Xpm_XpmReadFileToImage=no
12745fi
12746rm -f core conftest.err conftest.$ac_objext \
12747 conftest$ac_exeext conftest.$ac_ext
12748LIBS=$ac_check_lib_save_LIBS
12749fi
12750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmReadFileToImage" >&5
12751$as_echo "$ac_cv_lib_Xpm_XpmReadFileToImage" >&6; }
12752if test "x$ac_cv_lib_Xpm_XpmReadFileToImage" = x""yes; then :
12753 HAVE_XPM=yes
12754fi
12755
12756fi
12757
12758
12759 if test "${HAVE_XPM}" = "yes"; then
12760 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReturnAllocPixels preprocessor define" >&5
12761$as_echo_n "checking for XpmReturnAllocPixels preprocessor define... " >&6; }
12762 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12763/* end confdefs.h. */
12764#include "X11/xpm.h"
12765#ifndef XpmReturnAllocPixels
12766no_return_alloc_pixels
12767#endif
12768
12769_ACEOF
12770if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12771 $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then :
12772 HAVE_XPM=no
12773else
12774 HAVE_XPM=yes
12775fi
12776rm -f conftest*
12777
12778
12779 if test "${HAVE_XPM}" = "yes"; then
12780 REAL_CPPFLAGS="$REAL_CPPFLAGS -I/usr/include/noX"
12781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12782$as_echo "yes" >&6; }
12783 else
12784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12785$as_echo "no" >&6; }
12786 CPPFLAGS="$SAVE_CPPFLAGS"
12787 LDFLAGS="$SAVE_LDFLAGS"
12788 fi
12789 fi
12790 fi
12791
12792 if test "${HAVE_XPM}" = "yes"; then
12793
12794$as_echo "#define HAVE_XPM 1" >>confdefs.h
12795
12796 LIBXPM=-lXpm
12797 fi
12798fi
12799
5476a9a4
GM
12800if test "${HAVE_X11}" = "yes"; then
12801 if test "${with_xpm}" != "no"; then
12802 ac_fn_c_check_header_mongrel "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "$ac_includes_default"
12803if test "x$ac_cv_header_X11_xpm_h" = x""yes; then :
12804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReadFileToPixmap in -lXpm" >&5
12805$as_echo_n "checking for XpmReadFileToPixmap in -lXpm... " >&6; }
12806if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then :
f199cab1
GM
12807 $as_echo_n "(cached) " >&6
12808else
5476a9a4
GM
12809 ac_check_lib_save_LIBS=$LIBS
12810LIBS="-lXpm -lX11 $LIBS"
12811cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
12812/* end confdefs.h. */
12813
5476a9a4
GM
12814/* Override any GCC internal prototype to avoid an error.
12815 Use char because int might match the return type of a GCC
12816 builtin and then its argument prototype would still apply. */
12817#ifdef __cplusplus
12818extern "C"
12819#endif
12820char XpmReadFileToPixmap ();
067d23c9
KY
12821int
12822main ()
12823{
5476a9a4 12824return XpmReadFileToPixmap ();
067d23c9
KY
12825 ;
12826 return 0;
12827}
12828_ACEOF
5476a9a4
GM
12829if ac_fn_c_try_link "$LINENO"; then :
12830 ac_cv_lib_Xpm_XpmReadFileToPixmap=yes
067d23c9 12831else
5476a9a4 12832 ac_cv_lib_Xpm_XpmReadFileToPixmap=no
067d23c9 12833fi
5476a9a4
GM
12834rm -f core conftest.err conftest.$ac_objext \
12835 conftest$ac_exeext conftest.$ac_ext
12836LIBS=$ac_check_lib_save_LIBS
12837fi
12838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5
12839$as_echo "$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6; }
12840if test "x$ac_cv_lib_Xpm_XpmReadFileToPixmap" = x""yes; then :
12841 HAVE_XPM=yes
f199cab1 12842fi
067d23c9
KY
12843
12844fi
12845
12846
5476a9a4
GM
12847 if test "${HAVE_XPM}" = "yes"; then
12848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReturnAllocPixels preprocessor define" >&5
12849$as_echo_n "checking for XpmReturnAllocPixels preprocessor define... " >&6; }
12850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12851/* end confdefs.h. */
12852#include "X11/xpm.h"
12853#ifndef XpmReturnAllocPixels
12854no_return_alloc_pixels
12855#endif
067d23c9 12856
067d23c9 12857_ACEOF
5476a9a4
GM
12858if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12859 $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then :
12860 HAVE_XPM=no
12861else
12862 HAVE_XPM=yes
12863fi
12864rm -f conftest*
067d23c9 12865
067d23c9 12866
5476a9a4
GM
12867 if test "${HAVE_XPM}" = "yes"; then
12868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12869$as_echo "yes" >&6; }
12870 else
12871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12872$as_echo "no" >&6; }
12873 fi
12874 fi
12875 fi
067d23c9 12876
5476a9a4 12877 if test "${HAVE_XPM}" = "yes"; then
067d23c9 12878
5476a9a4 12879$as_echo "#define HAVE_XPM 1" >>confdefs.h
067d23c9 12880
5476a9a4
GM
12881 LIBXPM=-lXpm
12882 fi
067d23c9
KY
12883fi
12884
f199cab1 12885
5c0255d9 12886
5476a9a4
GM
12887### Use -ljpeg if available, unless `--with-jpeg=no'.
12888HAVE_JPEG=no
12889LIBJPEG=
5c0255d9 12890if test "${HAVE_X11}" = "yes" || test "${HAVE_W32}" = "yes"; then
5476a9a4
GM
12891 if test "${with_jpeg}" != "no"; then
12892 ac_fn_c_check_header_mongrel "$LINENO" "jerror.h" "ac_cv_header_jerror_h" "$ac_includes_default"
12893if test "x$ac_cv_header_jerror_h" = x""yes; then :
12894 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_destroy_compress in -ljpeg" >&5
12895$as_echo_n "checking for jpeg_destroy_compress in -ljpeg... " >&6; }
12896if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then :
067d23c9
KY
12897 $as_echo_n "(cached) " >&6
12898else
5476a9a4
GM
12899 ac_check_lib_save_LIBS=$LIBS
12900LIBS="-ljpeg $LIBS"
12901cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 12902/* end confdefs.h. */
f199cab1 12903
5476a9a4
GM
12904/* Override any GCC internal prototype to avoid an error.
12905 Use char because int might match the return type of a GCC
12906 builtin and then its argument prototype would still apply. */
12907#ifdef __cplusplus
12908extern "C"
12909#endif
12910char jpeg_destroy_compress ();
067d23c9
KY
12911int
12912main ()
12913{
5476a9a4 12914return jpeg_destroy_compress ();
067d23c9
KY
12915 ;
12916 return 0;
12917}
12918_ACEOF
12919if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 12920 ac_cv_lib_jpeg_jpeg_destroy_compress=yes
067d23c9 12921else
5476a9a4 12922 ac_cv_lib_jpeg_jpeg_destroy_compress=no
067d23c9
KY
12923fi
12924rm -f core conftest.err conftest.$ac_objext \
12925 conftest$ac_exeext conftest.$ac_ext
5476a9a4
GM
12926LIBS=$ac_check_lib_save_LIBS
12927fi
12928{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5
12929$as_echo "$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6; }
12930if test "x$ac_cv_lib_jpeg_jpeg_destroy_compress" = x""yes; then :
12931 HAVE_JPEG=yes
12932fi
12933
067d23c9 12934fi
f199cab1 12935
f199cab1
GM
12936
12937 fi
067d23c9 12938
5476a9a4
GM
12939 if test "${HAVE_JPEG}" = "yes"; then
12940 $as_echo "#define HAVE_JPEG 1" >>confdefs.h
f199cab1 12941
5476a9a4
GM
12942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12943/* end confdefs.h. */
12944#include <jpeglib.h>
12945 version=JPEG_LIB_VERSION
f199cab1 12946
5476a9a4
GM
12947_ACEOF
12948if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12949 $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then :
12950 $as_echo "#define HAVE_JPEG 1" >>confdefs.h
f199cab1 12951
5476a9a4
GM
12952else
12953 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libjpeg found, but not version 6b or later" >&5
12954$as_echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;}
12955 HAVE_JPEG=no
067d23c9 12956fi
5476a9a4 12957rm -f conftest*
067d23c9 12958
5476a9a4
GM
12959 fi
12960 if test "${HAVE_JPEG}" = "yes"; then
12961 LIBJPEG=-ljpeg
12962 fi
12963fi
067d23c9
KY
12964
12965
5476a9a4
GM
12966### Use -lpng if available, unless `--with-png=no'.
12967HAVE_PNG=no
12968LIBPNG=
5c0255d9 12969if test "${HAVE_X11}" = "yes" || test "${HAVE_W32}" = "yes"; then
5476a9a4
GM
12970 if test "${with_png}" != "no"; then
12971 # Debian unstable as of July 2003 has multiple libpngs, and puts png.h
12972 # in /usr/include/libpng.
12973 for ac_header in png.h libpng/png.h
12974do :
12975 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12976ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12977eval as_val=\$$as_ac_Header
12978 if test "x$as_val" = x""yes; then :
12979 cat >>confdefs.h <<_ACEOF
12980#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12981_ACEOF
12982 break
12983fi
067d23c9 12984
5476a9a4 12985done
067d23c9 12986
5476a9a4
GM
12987 if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then
12988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_get_channels in -lpng" >&5
12989$as_echo_n "checking for png_get_channels in -lpng... " >&6; }
12990if test "${ac_cv_lib_png_png_get_channels+set}" = set; then :
12991 $as_echo_n "(cached) " >&6
12992else
12993 ac_check_lib_save_LIBS=$LIBS
12994LIBS="-lpng -lz -lm $LIBS"
12995cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12996/* end confdefs.h. */
067d23c9 12997
5476a9a4
GM
12998/* Override any GCC internal prototype to avoid an error.
12999 Use char because int might match the return type of a GCC
13000 builtin and then its argument prototype would still apply. */
13001#ifdef __cplusplus
13002extern "C"
13003#endif
13004char png_get_channels ();
13005int
13006main ()
13007{
13008return png_get_channels ();
13009 ;
13010 return 0;
13011}
13012_ACEOF
13013if ac_fn_c_try_link "$LINENO"; then :
13014 ac_cv_lib_png_png_get_channels=yes
f199cab1 13015else
5476a9a4
GM
13016 ac_cv_lib_png_png_get_channels=no
13017fi
13018rm -f core conftest.err conftest.$ac_objext \
13019 conftest$ac_exeext conftest.$ac_ext
13020LIBS=$ac_check_lib_save_LIBS
13021fi
13022{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_png_png_get_channels" >&5
13023$as_echo "$ac_cv_lib_png_png_get_channels" >&6; }
13024if test "x$ac_cv_lib_png_png_get_channels" = x""yes; then :
13025 HAVE_PNG=yes
f199cab1 13026fi
067d23c9 13027
5476a9a4
GM
13028 fi
13029 fi
7834125e 13030
5476a9a4
GM
13031 if test "${HAVE_PNG}" = "yes"; then
13032
13033$as_echo "#define HAVE_PNG 1" >>confdefs.h
13034
13035 LIBPNG="-lpng -lz -lm"
13036
13037 ac_fn_c_check_decl "$LINENO" "png_longjmp" "ac_cv_have_decl_png_longjmp" "#ifdef HAVE_LIBPNG_PNG_H
13038 # include <libpng/png.h>
13039 #else
13040 # include <png.h>
13041 #endif
13042
13043"
13044if test "x$ac_cv_have_decl_png_longjmp" = x""yes; then :
13045
13046else
7834125e 13047
5476a9a4 13048$as_echo "#define PNG_DEPSTRUCT /**/" >>confdefs.h
7834125e 13049
f199cab1 13050fi
7834125e 13051
5476a9a4
GM
13052 fi
13053fi
7834125e
GM
13054
13055
5476a9a4
GM
13056### Use -ltiff if available, unless `--with-tiff=no'.
13057HAVE_TIFF=no
13058LIBTIFF=
5c0255d9 13059if test "${HAVE_X11}" = "yes" || test "${HAVE_W32}" = "yes"; then
5476a9a4
GM
13060 if test "${with_tiff}" != "no"; then
13061 ac_fn_c_check_header_mongrel "$LINENO" "tiffio.h" "ac_cv_header_tiffio_h" "$ac_includes_default"
13062if test "x$ac_cv_header_tiffio_h" = x""yes; then :
13063 tifflibs="-lz -lm"
13064 # At least one tiff package requires the jpeg library.
13065 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
13066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIFFGetVersion in -ltiff" >&5
13067$as_echo_n "checking for TIFFGetVersion in -ltiff... " >&6; }
13068if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then :
f199cab1
GM
13069 $as_echo_n "(cached) " >&6
13070else
5476a9a4
GM
13071 ac_check_lib_save_LIBS=$LIBS
13072LIBS="-ltiff $tifflibs $LIBS"
13073cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 13074/* end confdefs.h. */
067d23c9 13075
5476a9a4
GM
13076/* Override any GCC internal prototype to avoid an error.
13077 Use char because int might match the return type of a GCC
13078 builtin and then its argument prototype would still apply. */
13079#ifdef __cplusplus
13080extern "C"
f199cab1 13081#endif
5476a9a4
GM
13082char TIFFGetVersion ();
13083int
13084main ()
13085{
13086return TIFFGetVersion ();
13087 ;
13088 return 0;
13089}
f199cab1 13090_ACEOF
5476a9a4
GM
13091if ac_fn_c_try_link "$LINENO"; then :
13092 ac_cv_lib_tiff_TIFFGetVersion=yes
f199cab1 13093else
5476a9a4 13094 ac_cv_lib_tiff_TIFFGetVersion=no
f199cab1 13095fi
5476a9a4
GM
13096rm -f core conftest.err conftest.$ac_objext \
13097 conftest$ac_exeext conftest.$ac_ext
13098LIBS=$ac_check_lib_save_LIBS
f199cab1 13099fi
5476a9a4
GM
13100{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5
13101$as_echo "$ac_cv_lib_tiff_TIFFGetVersion" >&6; }
13102if test "x$ac_cv_lib_tiff_TIFFGetVersion" = x""yes; then :
13103 HAVE_TIFF=yes
f199cab1 13104fi
067d23c9 13105
5476a9a4 13106fi
067d23c9 13107
067d23c9 13108
5476a9a4 13109 fi
f199cab1 13110
5476a9a4 13111 if test "${HAVE_TIFF}" = "yes"; then
067d23c9 13112
5476a9a4 13113$as_echo "#define HAVE_TIFF 1" >>confdefs.h
067d23c9 13114
5476a9a4
GM
13115 LIBTIFF=-ltiff
13116 fi
f199cab1 13117fi
067d23c9 13118
067d23c9 13119
5476a9a4
GM
13120### Use -lgif or -lungif if available, unless `--with-gif=no'.
13121HAVE_GIF=no
13122LIBGIF=
5c0255d9
GM
13123if test "${HAVE_X11}" = "yes" && test "${with_gif}" != "no" \
13124 || test "${HAVE_W32}" = "yes"; then
5476a9a4
GM
13125 ac_fn_c_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
13126if test "x$ac_cv_header_gif_lib_h" = x""yes; then :
13127 # EGifPutExtensionLast only exists from version libungif-4.1.0b1.
13128# Earlier versions can crash Emacs.
13129 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lgif" >&5
13130$as_echo_n "checking for EGifPutExtensionLast in -lgif... " >&6; }
13131if test "${ac_cv_lib_gif_EGifPutExtensionLast+set}" = set; then :
f199cab1
GM
13132 $as_echo_n "(cached) " >&6
13133else
5476a9a4
GM
13134 ac_check_lib_save_LIBS=$LIBS
13135LIBS="-lgif $LIBS"
13136cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 13137/* end confdefs.h. */
067d23c9 13138
5476a9a4
GM
13139/* Override any GCC internal prototype to avoid an error.
13140 Use char because int might match the return type of a GCC
13141 builtin and then its argument prototype would still apply. */
13142#ifdef __cplusplus
13143extern "C"
13144#endif
13145char EGifPutExtensionLast ();
f199cab1
GM
13146int
13147main ()
13148{
5476a9a4 13149return EGifPutExtensionLast ();
f199cab1
GM
13150 ;
13151 return 0;
13152}
13153_ACEOF
5476a9a4
GM
13154if ac_fn_c_try_link "$LINENO"; then :
13155 ac_cv_lib_gif_EGifPutExtensionLast=yes
f199cab1 13156else
5476a9a4 13157 ac_cv_lib_gif_EGifPutExtensionLast=no
f199cab1 13158fi
5476a9a4
GM
13159rm -f core conftest.err conftest.$ac_objext \
13160 conftest$ac_exeext conftest.$ac_ext
13161LIBS=$ac_check_lib_save_LIBS
13162fi
13163{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_EGifPutExtensionLast" >&5
13164$as_echo "$ac_cv_lib_gif_EGifPutExtensionLast" >&6; }
13165if test "x$ac_cv_lib_gif_EGifPutExtensionLast" = x""yes; then :
13166 HAVE_GIF=yes
13167else
13168 HAVE_GIF=maybe
f199cab1 13169fi
067d23c9 13170
5476a9a4
GM
13171fi
13172
13173
13174
13175 if test "$HAVE_GIF" = yes; then
13176 LIBGIF=-lgif
13177 elif test "$HAVE_GIF" = maybe; then
13178# If gif_lib.h but no libgif, try libungif.
13179 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lungif" >&5
13180$as_echo_n "checking for EGifPutExtensionLast in -lungif... " >&6; }
13181if test "${ac_cv_lib_ungif_EGifPutExtensionLast+set}" = set; then :
f199cab1
GM
13182 $as_echo_n "(cached) " >&6
13183else
5476a9a4
GM
13184 ac_check_lib_save_LIBS=$LIBS
13185LIBS="-lungif $LIBS"
13186cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 13187/* end confdefs.h. */
f199cab1 13188
5476a9a4
GM
13189/* Override any GCC internal prototype to avoid an error.
13190 Use char because int might match the return type of a GCC
13191 builtin and then its argument prototype would still apply. */
13192#ifdef __cplusplus
13193extern "C"
13194#endif
13195char EGifPutExtensionLast ();
f199cab1
GM
13196int
13197main ()
13198{
5476a9a4 13199return EGifPutExtensionLast ();
f199cab1
GM
13200 ;
13201 return 0;
13202}
13203_ACEOF
5476a9a4
GM
13204if ac_fn_c_try_link "$LINENO"; then :
13205 ac_cv_lib_ungif_EGifPutExtensionLast=yes
f199cab1 13206else
5476a9a4 13207 ac_cv_lib_ungif_EGifPutExtensionLast=no
f199cab1 13208fi
5476a9a4
GM
13209rm -f core conftest.err conftest.$ac_objext \
13210 conftest$ac_exeext conftest.$ac_ext
13211LIBS=$ac_check_lib_save_LIBS
f199cab1 13212fi
5476a9a4
GM
13213{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5
13214$as_echo "$ac_cv_lib_ungif_EGifPutExtensionLast" >&6; }
13215if test "x$ac_cv_lib_ungif_EGifPutExtensionLast" = x""yes; then :
13216 HAVE_GIF=yes
13217else
13218 HAVE_GIF=no
13219fi
13220
13221 test "$HAVE_GIF" = yes && LIBGIF=-lungif
13222 fi
13223
13224 if test "${HAVE_GIF}" = "yes"; then
13225
13226$as_echo "#define HAVE_GIF 1" >>confdefs.h
13227
13228 fi
13229fi
13230
13231
13232if test "${HAVE_X11}" = "yes"; then
13233 MISSING=""
13234 WITH_NO=""
13235 test "${with_xpm}" != "no" && test "${HAVE_XPM}" != "yes" &&
13236 MISSING="libXpm" && WITH_NO="--with-xpm=no"
13237 test "${with_jpeg}" != "no" && test "${HAVE_JPEG}" != "yes" &&
13238 MISSING="$MISSING libjpeg" && WITH_NO="$WITH_NO --with-jpeg=no"
13239 test "${with_png}" != "no" && test "${HAVE_PNG}" != "yes" &&
13240 MISSING="$MISSING libpng" && WITH_NO="$WITH_NO --with-png=no"
13241 test "${with_gif}" != "no" && test "${HAVE_GIF}" != "yes" &&
13242 MISSING="$MISSING libgif/libungif" && WITH_NO="$WITH_NO --with-gif=no"
13243 test "${with_tiff}" != "no" && test "${HAVE_TIFF}" != "yes" &&
13244 MISSING="$MISSING libtiff" && WITH_NO="$WITH_NO --with-tiff=no"
13245
13246 if test "X${MISSING}" != X; then
13247 as_fn_error "The following required libraries were not found:
13248 $MISSING
13249Maybe some development libraries/packages are missing?
13250If you don't want to link with them give
13251 $WITH_NO
13252as options to configure" "$LINENO" 5
13253 fi
13254fi
13255
13256### Use -lgpm if available, unless `--with-gpm=no'.
13257HAVE_GPM=no
13258LIBGPM=
13259if test "${with_gpm}" != "no"; then
13260 ac_fn_c_check_header_mongrel "$LINENO" "gpm.h" "ac_cv_header_gpm_h" "$ac_includes_default"
13261if test "x$ac_cv_header_gpm_h" = x""yes; then :
13262 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Gpm_Open in -lgpm" >&5
13263$as_echo_n "checking for Gpm_Open in -lgpm... " >&6; }
13264if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then :
067d23c9
KY
13265 $as_echo_n "(cached) " >&6
13266else
5476a9a4
GM
13267 ac_check_lib_save_LIBS=$LIBS
13268LIBS="-lgpm $LIBS"
13269cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
13270/* end confdefs.h. */
13271
5476a9a4
GM
13272/* Override any GCC internal prototype to avoid an error.
13273 Use char because int might match the return type of a GCC
13274 builtin and then its argument prototype would still apply. */
13275#ifdef __cplusplus
13276extern "C"
13277#endif
13278char Gpm_Open ();
067d23c9
KY
13279int
13280main ()
13281{
5476a9a4 13282return Gpm_Open ();
067d23c9
KY
13283 ;
13284 return 0;
13285}
13286_ACEOF
5476a9a4
GM
13287if ac_fn_c_try_link "$LINENO"; then :
13288 ac_cv_lib_gpm_Gpm_Open=yes
067d23c9 13289else
5476a9a4 13290 ac_cv_lib_gpm_Gpm_Open=no
067d23c9 13291fi
5476a9a4
GM
13292rm -f core conftest.err conftest.$ac_objext \
13293 conftest$ac_exeext conftest.$ac_ext
13294LIBS=$ac_check_lib_save_LIBS
13295fi
13296{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gpm_Gpm_Open" >&5
13297$as_echo "$ac_cv_lib_gpm_Gpm_Open" >&6; }
13298if test "x$ac_cv_lib_gpm_Gpm_Open" = x""yes; then :
13299 HAVE_GPM=yes
067d23c9 13300fi
f199cab1 13301
5476a9a4 13302fi
f199cab1 13303
f199cab1 13304
f199cab1 13305
5476a9a4 13306 if test "${HAVE_GPM}" = "yes"; then
f199cab1 13307
5476a9a4 13308$as_echo "#define HAVE_GPM 1" >>confdefs.h
f199cab1 13309
5476a9a4
GM
13310 LIBGPM=-lgpm
13311 fi
067d23c9 13312fi
067d23c9
KY
13313
13314
13315
13316
13317
13318
5476a9a4
GM
13319GNUSTEP_CFLAGS=
13320### Use NeXTstep API to implement GUI.
13321if test "${HAVE_NS}" = "yes"; then
067d23c9 13322
5476a9a4 13323$as_echo "#define HAVE_NS 1" >>confdefs.h
067d23c9 13324
5476a9a4 13325 if test "${NS_IMPL_COCOA}" = "yes"; then
067d23c9 13326
5476a9a4 13327$as_echo "#define NS_IMPL_COCOA 1" >>confdefs.h
f199cab1 13328
5476a9a4
GM
13329 fi
13330 if test "${NS_IMPL_GNUSTEP}" = "yes"; then
f199cab1 13331
5476a9a4 13332$as_echo "#define NS_IMPL_GNUSTEP 1" >>confdefs.h
f199cab1 13333
5476a9a4
GM
13334 # See also .m.o rule in Makefile.in */
13335 # FIXME: are all these flags really needed? Document here why. */
13336 GNUSTEP_CFLAGS="-D_REENTRANT -fPIC -fno-strict-aliasing -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
13337 ## Extra CFLAGS applied to src/*.m files.
13338 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"
13339 fi
13340 # We also have mouse menus.
13341 HAVE_MENUS=yes
13342 OTHER_FILES=ns-app
13343fi
f199cab1 13344
5c0255d9
GM
13345if test "${HAVE_W32}" = "yes"; then
13346 HAVE_MENUS=yes
13347fi
f199cab1 13348
5476a9a4
GM
13349### Use session management (-lSM -lICE) if available
13350HAVE_X_SM=no
13351LIBXSM=
13352if test "${HAVE_X11}" = "yes"; then
13353 ac_fn_c_check_header_mongrel "$LINENO" "X11/SM/SMlib.h" "ac_cv_header_X11_SM_SMlib_h" "$ac_includes_default"
13354if test "x$ac_cv_header_X11_SM_SMlib_h" = x""yes; then :
13355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SmcOpenConnection in -lSM" >&5
13356$as_echo_n "checking for SmcOpenConnection in -lSM... " >&6; }
13357if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then :
067d23c9
KY
13358 $as_echo_n "(cached) " >&6
13359else
5476a9a4
GM
13360 ac_check_lib_save_LIBS=$LIBS
13361LIBS="-lSM -lICE $LIBS"
13362cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
13363/* end confdefs.h. */
13364
5476a9a4
GM
13365/* Override any GCC internal prototype to avoid an error.
13366 Use char because int might match the return type of a GCC
13367 builtin and then its argument prototype would still apply. */
13368#ifdef __cplusplus
13369extern "C"
13370#endif
13371char SmcOpenConnection ();
f199cab1
GM
13372int
13373main ()
13374{
5476a9a4
GM
13375return SmcOpenConnection ();
13376 ;
13377 return 0;
f199cab1 13378}
067d23c9 13379_ACEOF
5476a9a4
GM
13380if ac_fn_c_try_link "$LINENO"; then :
13381 ac_cv_lib_SM_SmcOpenConnection=yes
067d23c9 13382else
5476a9a4 13383 ac_cv_lib_SM_SmcOpenConnection=no
f199cab1 13384fi
5476a9a4
GM
13385rm -f core conftest.err conftest.$ac_objext \
13386 conftest$ac_exeext conftest.$ac_ext
13387LIBS=$ac_check_lib_save_LIBS
13388fi
13389{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_SM_SmcOpenConnection" >&5
13390$as_echo "$ac_cv_lib_SM_SmcOpenConnection" >&6; }
13391if test "x$ac_cv_lib_SM_SmcOpenConnection" = x""yes; then :
13392 HAVE_X_SM=yes
067d23c9 13393fi
067d23c9 13394
f199cab1 13395fi
f199cab1 13396
f199cab1 13397
067d23c9 13398
5476a9a4
GM
13399 if test "${HAVE_X_SM}" = "yes"; then
13400
13401$as_echo "#define HAVE_X_SM 1" >>confdefs.h
13402
13403 LIBXSM="-lSM -lICE"
13404 case "$LIBS" in
13405 *-lSM*) ;;
13406 *) LIBS="$LIBXSM $LIBS" ;;
13407 esac
067d23c9 13408 fi
5476a9a4 13409fi
067d23c9 13410
067d23c9 13411
5476a9a4
GM
13412### Use libxml (-lxml2) if available
13413HAVE_LIBXML2=no
13414if test "${with_xml2}" != "no"; then
13415 ### I'm not sure what the version number should be, so I just guessed.
067d23c9 13416
5476a9a4 13417 succeeded=no
067d23c9 13418
5476a9a4
GM
13419 if test "$PKG_CONFIG" = "no" ; then
13420 HAVE_LIBXML2=no
13421 else
13422 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 13423 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
13424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxml-2.0 > 2.6.17" >&5
13425$as_echo_n "checking for libxml-2.0 > 2.6.17... " >&6; }
067d23c9 13426
b5591ebb
GM
13427 if "$PKG_CONFIG" --exists "libxml-2.0 > 2.6.17" 2>&5 &&
13428 LIBXML2_CFLAGS=`"$PKG_CONFIG" --cflags "libxml-2.0 > 2.6.17" 2>&5` &&
13429 LIBXML2_LIBS=`"$PKG_CONFIG" --libs "libxml-2.0 > 2.6.17" 2>&5`; then
5476a9a4
GM
13430 edit_cflags="
13431 s,///*,/,g
13432 s/^/ /
13433 s/ -I/ $isystem/g
13434 s/^ //
13435 "
13436 LIBXML2_CFLAGS=`$as_echo "$LIBXML2_CFLAGS" | sed -e "$edit_cflags"`
13437 LIBXML2_LIBS=`$as_echo "$LIBXML2_LIBS" | sed -e 's,///*,/,g'`
13438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBXML2_CFLAGS' LIBS='$LIBXML2_LIBS'" >&5
13439$as_echo "yes CFLAGS='$LIBXML2_CFLAGS' LIBS='$LIBXML2_LIBS'" >&6; }
13440 succeeded=yes
13441 else
13442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13443$as_echo "no" >&6; }
13444 LIBXML2_CFLAGS=""
13445 LIBXML2_LIBS=""
13446 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
13447 ## do set a variable so people can do so. Do it in a subshell
13448 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 13449 LIBXML2_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "libxml-2.0 > 2.6.17") 2>&1`
5476a9a4
GM
13450
13451 fi
13452
13453
13454
13455 else
13456 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
13457 echo "*** See http://www.freedesktop.org/software/pkgconfig"
13458 fi
13459 fi
13460
13461 if test $succeeded = yes; then
13462 HAVE_LIBXML2=yes
13463 else
13464 HAVE_LIBXML2=no
13465 fi
13466
13467 if test "${HAVE_LIBXML2}" = "yes"; then
13468 LIBS="$LIBXML2_LIBS $LIBS"
13469 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for htmlReadMemory in -lxml2" >&5
13470$as_echo_n "checking for htmlReadMemory in -lxml2... " >&6; }
13471if test "${ac_cv_lib_xml2_htmlReadMemory+set}" = set; then :
067d23c9
KY
13472 $as_echo_n "(cached) " >&6
13473else
5476a9a4
GM
13474 ac_check_lib_save_LIBS=$LIBS
13475LIBS="-lxml2 $LIBS"
13476cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
13477/* end confdefs.h. */
13478
5476a9a4
GM
13479/* Override any GCC internal prototype to avoid an error.
13480 Use char because int might match the return type of a GCC
13481 builtin and then its argument prototype would still apply. */
13482#ifdef __cplusplus
13483extern "C"
13484#endif
13485char htmlReadMemory ();
067d23c9
KY
13486int
13487main ()
13488{
5476a9a4 13489return htmlReadMemory ();
067d23c9
KY
13490 ;
13491 return 0;
13492}
13493_ACEOF
5476a9a4
GM
13494if ac_fn_c_try_link "$LINENO"; then :
13495 ac_cv_lib_xml2_htmlReadMemory=yes
067d23c9 13496else
5476a9a4 13497 ac_cv_lib_xml2_htmlReadMemory=no
067d23c9 13498fi
5476a9a4
GM
13499rm -f core conftest.err conftest.$ac_objext \
13500 conftest$ac_exeext conftest.$ac_ext
13501LIBS=$ac_check_lib_save_LIBS
13502fi
13503{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_htmlReadMemory" >&5
13504$as_echo "$ac_cv_lib_xml2_htmlReadMemory" >&6; }
13505if test "x$ac_cv_lib_xml2_htmlReadMemory" = x""yes; then :
13506 HAVE_LIBXML2=yes
13507else
13508 HAVE_LIBXML2=no
067d23c9
KY
13509fi
13510
5476a9a4 13511 if test "${HAVE_LIBXML2}" = "yes"; then
067d23c9 13512
5476a9a4 13513$as_echo "#define HAVE_LIBXML2 1" >>confdefs.h
067d23c9 13514
5476a9a4
GM
13515 else
13516 LIBXML2_LIBS=""
13517 LIBXML2_CFLAGS=""
13518 fi
067d23c9 13519 fi
5476a9a4 13520fi
067d23c9 13521
067d23c9 13522
067d23c9 13523
5476a9a4
GM
13524# If netdb.h doesn't declare h_errno, we must declare it by hand.
13525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether netdb declares h_errno" >&5
13526$as_echo_n "checking whether netdb declares h_errno... " >&6; }
13527if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then :
13528 $as_echo_n "(cached) " >&6
067d23c9 13529else
5476a9a4
GM
13530 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13531/* end confdefs.h. */
13532#include <netdb.h>
13533int
13534main ()
13535{
13536return h_errno;
13537 ;
13538 return 0;
13539}
13540_ACEOF
13541if ac_fn_c_try_link "$LINENO"; then :
13542 emacs_cv_netdb_declares_h_errno=yes
13543else
13544 emacs_cv_netdb_declares_h_errno=no
067d23c9 13545fi
5476a9a4
GM
13546rm -f core conftest.err conftest.$ac_objext \
13547 conftest$ac_exeext conftest.$ac_ext
13548fi
13549{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_netdb_declares_h_errno" >&5
13550$as_echo "$emacs_cv_netdb_declares_h_errno" >&6; }
13551if test $emacs_cv_netdb_declares_h_errno = yes; then
067d23c9 13552
5476a9a4 13553$as_echo "#define HAVE_H_ERRNO 1" >>confdefs.h
f199cab1 13554
5476a9a4 13555fi
f199cab1 13556
2c98a625
GM
13557# sqrt and other floating-point functions such as fmod and frexp
13558# are found in -lm on most systems.
5476a9a4
GM
13559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5
13560$as_echo_n "checking for sqrt in -lm... " >&6; }
13561if test "${ac_cv_lib_m_sqrt+set}" = set; then :
13562 $as_echo_n "(cached) " >&6
13563else
13564 ac_check_lib_save_LIBS=$LIBS
13565LIBS="-lm $LIBS"
13566cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13567/* end confdefs.h. */
f199cab1 13568
5476a9a4
GM
13569/* Override any GCC internal prototype to avoid an error.
13570 Use char because int might match the return type of a GCC
13571 builtin and then its argument prototype would still apply. */
13572#ifdef __cplusplus
13573extern "C"
13574#endif
13575char sqrt ();
13576int
13577main ()
13578{
13579return sqrt ();
13580 ;
13581 return 0;
13582}
13583_ACEOF
13584if ac_fn_c_try_link "$LINENO"; then :
13585 ac_cv_lib_m_sqrt=yes
13586else
13587 ac_cv_lib_m_sqrt=no
13588fi
13589rm -f core conftest.err conftest.$ac_objext \
13590 conftest$ac_exeext conftest.$ac_ext
13591LIBS=$ac_check_lib_save_LIBS
13592fi
13593{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sqrt" >&5
13594$as_echo "$ac_cv_lib_m_sqrt" >&6; }
13595if test "x$ac_cv_lib_m_sqrt" = x""yes; then :
13596 cat >>confdefs.h <<_ACEOF
13597#define HAVE_LIBM 1
13598_ACEOF
f199cab1 13599
5476a9a4 13600 LIBS="-lm $LIBS"
f199cab1 13601
5476a9a4 13602fi
f199cab1 13603
f199cab1 13604
5476a9a4
GM
13605# Check for mail-locking functions in a "mail" library. Probably this should
13606# have the same check as for liblockfile below.
13607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -lmail" >&5
13608$as_echo_n "checking for maillock in -lmail... " >&6; }
13609if test "${ac_cv_lib_mail_maillock+set}" = set; then :
067d23c9
KY
13610 $as_echo_n "(cached) " >&6
13611else
5476a9a4
GM
13612 ac_check_lib_save_LIBS=$LIBS
13613LIBS="-lmail $LIBS"
13614cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
13615/* end confdefs.h. */
13616
5476a9a4
GM
13617/* Override any GCC internal prototype to avoid an error.
13618 Use char because int might match the return type of a GCC
13619 builtin and then its argument prototype would still apply. */
13620#ifdef __cplusplus
13621extern "C"
067d23c9 13622#endif
5476a9a4
GM
13623char maillock ();
13624int
13625main ()
13626{
13627return maillock ();
13628 ;
13629 return 0;
13630}
067d23c9 13631_ACEOF
5476a9a4
GM
13632if ac_fn_c_try_link "$LINENO"; then :
13633 ac_cv_lib_mail_maillock=yes
067d23c9 13634else
5476a9a4 13635 ac_cv_lib_mail_maillock=no
067d23c9 13636fi
5476a9a4
GM
13637rm -f core conftest.err conftest.$ac_objext \
13638 conftest$ac_exeext conftest.$ac_ext
13639LIBS=$ac_check_lib_save_LIBS
067d23c9 13640fi
5476a9a4
GM
13641{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mail_maillock" >&5
13642$as_echo "$ac_cv_lib_mail_maillock" >&6; }
13643if test "x$ac_cv_lib_mail_maillock" = x""yes; then :
13644 have_mail=yes
f199cab1 13645else
5476a9a4 13646 have_mail=no
067d23c9
KY
13647fi
13648
5476a9a4
GM
13649if test $have_mail = yes; then
13650 LIBS_MAIL=-lmail
13651 LIBS="$LIBS_MAIL $LIBS"
067d23c9 13652
5476a9a4 13653$as_echo "#define HAVE_LIBMAIL 1" >>confdefs.h
067d23c9 13654
5476a9a4
GM
13655else
13656 LIBS_MAIL=
13657fi
13658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -llockfile" >&5
13659$as_echo_n "checking for maillock in -llockfile... " >&6; }
13660if test "${ac_cv_lib_lockfile_maillock+set}" = set; then :
067d23c9
KY
13661 $as_echo_n "(cached) " >&6
13662else
5476a9a4
GM
13663 ac_check_lib_save_LIBS=$LIBS
13664LIBS="-llockfile $LIBS"
067d23c9
KY
13665cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13666/* end confdefs.h. */
13667
13668/* Override any GCC internal prototype to avoid an error.
13669 Use char because int might match the return type of a GCC
13670 builtin and then its argument prototype would still apply. */
13671#ifdef __cplusplus
13672extern "C"
13673#endif
5476a9a4 13674char maillock ();
067d23c9
KY
13675int
13676main ()
13677{
5476a9a4 13678return maillock ();
067d23c9
KY
13679 ;
13680 return 0;
13681}
13682_ACEOF
5476a9a4
GM
13683if ac_fn_c_try_link "$LINENO"; then :
13684 ac_cv_lib_lockfile_maillock=yes
13685else
13686 ac_cv_lib_lockfile_maillock=no
067d23c9
KY
13687fi
13688rm -f core conftest.err conftest.$ac_objext \
5476a9a4
GM
13689 conftest$ac_exeext conftest.$ac_ext
13690LIBS=$ac_check_lib_save_LIBS
067d23c9 13691fi
5476a9a4
GM
13692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lockfile_maillock" >&5
13693$as_echo "$ac_cv_lib_lockfile_maillock" >&6; }
13694if test "x$ac_cv_lib_lockfile_maillock" = x""yes; then :
13695 have_lockfile=yes
067d23c9 13696else
5476a9a4 13697 have_lockfile=no
f199cab1
GM
13698fi
13699
5476a9a4
GM
13700if test $have_lockfile = yes; then
13701 LIBS_MAIL=-llockfile
13702 LIBS="$LIBS_MAIL $LIBS"
067d23c9 13703
5476a9a4 13704$as_echo "#define HAVE_LIBLOCKFILE 1" >>confdefs.h
067d23c9 13705
5476a9a4
GM
13706else
13707# If we have the shared liblockfile, assume we must use it for mail
13708# locking (e.g. Debian). If we couldn't link against liblockfile
13709# (no liblockfile.a installed), ensure that we don't need to.
13710 # Extract the first word of "liblockfile.so", so it can be a program name with args.
13711set dummy liblockfile.so; ac_word=$2
13712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13713$as_echo_n "checking for $ac_word... " >&6; }
13714if test "${ac_cv_prog_liblockfile+set}" = set; then :
13715 $as_echo_n "(cached) " >&6
13716else
13717 if test -n "$liblockfile"; then
13718 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
13719else
13720as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13721as_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
13722for as_dir in $as_dummy
13723do
13724 IFS=$as_save_IFS
13725 test -z "$as_dir" && as_dir=.
13726 for ac_exec_ext in '' $ac_executable_extensions; do
13727 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
13728 ac_cv_prog_liblockfile="yes"
13729 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13730 break 2
13731 fi
13732done
13733 done
13734IFS=$as_save_IFS
067d23c9 13735
5476a9a4
GM
13736 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
13737fi
13738fi
13739liblockfile=$ac_cv_prog_liblockfile
13740if test -n "$liblockfile"; then
13741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $liblockfile" >&5
13742$as_echo "$liblockfile" >&6; }
13743else
13744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13745$as_echo "no" >&6; }
13746fi
067d23c9 13747
067d23c9 13748
5476a9a4
GM
13749 if test $ac_cv_prog_liblockfile = yes; then
13750 as_fn_error "Shared liblockfile found but can't link against it.
13751This probably means that movemail could lose mail.
13752There may be a \`development' package to install containing liblockfile." "$LINENO" 5
13753 fi
13754fi
067d23c9 13755
067d23c9 13756
067d23c9 13757
067d23c9
KY
13758
13759
5476a9a4
GM
13760## Define MAIL_USE_FLOCK (or LOCKF) if the mailer uses flock (or lockf) to
13761## interlock access to the mail spool. The alternative is a lock file named
13762## /usr/spool/mail/$USER.lock.
13763mail_lock=no
13764case "$opsys" in
13765 aix4-2) mail_lock="lockf" ;;
067d23c9 13766
5476a9a4 13767 gnu|freebsd|netbsd|openbsd|darwin|irix6-5) mail_lock="flock" ;;
067d23c9 13768
5476a9a4
GM
13769 ## On GNU/Linux systems, both methods are used by various mail programs.
13770 ## I assume most people are using newer mailers that have heard of flock.
13771 ## Change this if you need to.
13772 ## Debian contains a patch which says: ``On Debian/GNU/Linux systems,
13773 ## configure gets the right answers, and that means *NOT* using flock.
13774 ## Using flock is guaranteed to be the wrong thing. See Debian Policy
13775 ## for details.'' and then uses `#ifdef DEBIAN'. Unfortunately the
13776 ## Debian maintainer hasn't provided a clean fix for Emacs.
13777 ## movemail.c will use `maillock' when MAILDIR, HAVE_LIBMAIL and
13778 ## HAVE_MAILLOCK_H are defined, so the following appears to be the
13779 ## correct logic. -- fx
13780 ## We must check for HAVE_LIBLOCKFILE too, as movemail does.
13781 ## liblockfile is a Free Software replacement for libmail, used on
13782 ## Debian systems and elsewhere. -rfr.
13783 gnu-*)
13784 mail_lock="flock"
13785 if test $have_mail = yes || test $have_lockfile = yes; then
13786 test $ac_cv_header_maillock_h = yes && mail_lock=no
13787 fi
13788 ;;
13789esac
f199cab1 13790
5476a9a4
GM
13791BLESSMAIL_TARGET=
13792case "$mail_lock" in
13793 flock)
13794$as_echo "#define MAIL_USE_FLOCK 1" >>confdefs.h
13795 ;;
f199cab1 13796
5476a9a4
GM
13797 lockf)
13798$as_echo "#define MAIL_USE_LOCKF 1" >>confdefs.h
13799 ;;
f199cab1 13800
5476a9a4
GM
13801 *) BLESSMAIL_TARGET="need-blessmail" ;;
13802esac
f199cab1
GM
13803
13804
13805
5476a9a4 13806for ac_func in gethostname \
e7d0e5ee 13807getrusage get_current_dir_name \
eda33f78 13808lrand48 \
a455a5ce 13809select getpagesize setlocale \
aa8715fb 13810utimes getrlimit setrlimit shutdown getaddrinfo \
eda33f78 13811strsignal setitimer \
5476a9a4
GM
13812sendto recvfrom getsockname getpeername getifaddrs freeifaddrs \
13813gai_strerror mkstemp getline getdelim fsync sync \
13814difftime posix_memalign \
13815getpwent endpwent getgrent endgrent \
13816touchlock \
13817cfmakeraw cfsetspeed copysign __executable_start
13818do :
13819 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13820ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13821eval as_val=\$$as_ac_var
13822 if test "x$as_val" = x""yes; then :
13823 cat >>confdefs.h <<_ACEOF
13824#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13825_ACEOF
f199cab1 13826
5476a9a4
GM
13827fi
13828done
f199cab1
GM
13829
13830
5476a9a4
GM
13831## Eric Backus <ericb@lsid.hp.com> says, HP-UX 9.x on HP 700 machines
13832## has a broken `rint' in some library versions including math library
13833## version number A.09.05.
13834## You can fix the math library by installing patch number PHSS_4630.
13835## But we can fix it more reliably for Emacs by just not using rint.
8ad96b1d 13836## We also skip HAVE_RANDOM - see comments in src/conf_post.h.
5476a9a4
GM
13837case $opsys in
13838 hpux*) : ;;
13839 *) for ac_func in random rint
13840do :
13841 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13842ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13843eval as_val=\$$as_ac_var
13844 if test "x$as_val" = x""yes; then :
13845 cat >>confdefs.h <<_ACEOF
13846#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13847_ACEOF
f199cab1 13848
5476a9a4
GM
13849fi
13850done
13851 ;;
13852esac
f199cab1 13853
5476a9a4
GM
13854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unwind_init" >&5
13855$as_echo_n "checking for __builtin_unwind_init... " >&6; }
13856if test "${emacs_cv_func___builtin_unwind_init+set}" = set; then :
067d23c9 13857 $as_echo_n "(cached) " >&6
f199cab1
GM
13858else
13859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
13860/* end confdefs.h. */
13861
067d23c9
KY
13862int
13863main ()
13864{
5476a9a4 13865__builtin_unwind_init ();
067d23c9
KY
13866 ;
13867 return 0;
13868}
13869_ACEOF
5476a9a4
GM
13870if ac_fn_c_try_link "$LINENO"; then :
13871 emacs_cv_func___builtin_unwind_init=yes
067d23c9 13872else
5476a9a4 13873 emacs_cv_func___builtin_unwind_init=no
067d23c9 13874fi
5476a9a4
GM
13875rm -f core conftest.err conftest.$ac_objext \
13876 conftest$ac_exeext conftest.$ac_ext
067d23c9 13877fi
5476a9a4
GM
13878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_func___builtin_unwind_init" >&5
13879$as_echo "$emacs_cv_func___builtin_unwind_init" >&6; }
13880if test $emacs_cv_func___builtin_unwind_init = yes; then
067d23c9 13881
5476a9a4 13882$as_echo "#define HAVE___BUILTIN_UNWIND_INIT 1" >>confdefs.h
f199cab1 13883
067d23c9 13884fi
067d23c9 13885
f199cab1
GM
13886
13887
13888
13889
5476a9a4
GM
13890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
13891$as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
13892if test "${ac_cv_sys_largefile_source+set}" = set; then :
13893 $as_echo_n "(cached) " >&6
13894else
13895 while :; do
13896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13897/* end confdefs.h. */
13898#include <sys/types.h> /* for off_t */
13899 #include <stdio.h>
13900int
13901main ()
13902{
13903int (*fp) (FILE *, off_t, int) = fseeko;
13904 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
13905 ;
13906 return 0;
13907}
13908_ACEOF
13909if ac_fn_c_try_link "$LINENO"; then :
13910 ac_cv_sys_largefile_source=no; break
067d23c9 13911fi
5476a9a4
GM
13912rm -f core conftest.err conftest.$ac_objext \
13913 conftest$ac_exeext conftest.$ac_ext
13914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13915/* end confdefs.h. */
13916#define _LARGEFILE_SOURCE 1
13917#include <sys/types.h> /* for off_t */
13918 #include <stdio.h>
13919int
13920main ()
13921{
13922int (*fp) (FILE *, off_t, int) = fseeko;
13923 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
13924 ;
13925 return 0;
13926}
13927_ACEOF
13928if ac_fn_c_try_link "$LINENO"; then :
13929 ac_cv_sys_largefile_source=1; break
13930fi
13931rm -f core conftest.err conftest.$ac_objext \
13932 conftest$ac_exeext conftest.$ac_ext
13933 ac_cv_sys_largefile_source=unknown
13934 break
13935done
13936fi
13937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
13938$as_echo "$ac_cv_sys_largefile_source" >&6; }
13939case $ac_cv_sys_largefile_source in #(
13940 no | unknown) ;;
13941 *)
13942cat >>confdefs.h <<_ACEOF
13943#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
13944_ACEOF
13945;;
13946esac
13947rm -rf conftest*
067d23c9 13948
5476a9a4
GM
13949# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
13950# in glibc 2.1.3, but that breaks too many other things.
13951# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
13952if test $ac_cv_sys_largefile_source != unknown; then
067d23c9 13953
5476a9a4 13954$as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
067d23c9 13955
5476a9a4 13956fi
067d23c9
KY
13957
13958
5476a9a4
GM
13959# UNIX98 PTYs.
13960for ac_func in grantpt
13961do :
13962 ac_fn_c_check_func "$LINENO" "grantpt" "ac_cv_func_grantpt"
13963if test "x$ac_cv_func_grantpt" = x""yes; then :
13964 cat >>confdefs.h <<_ACEOF
13965#define HAVE_GRANTPT 1
13966_ACEOF
f199cab1 13967
5476a9a4
GM
13968fi
13969done
f199cab1 13970
f199cab1 13971
5476a9a4 13972# PTY-related GNU extensions.
1146da8d 13973for ac_func in getpt posix_openpt
5476a9a4 13974do :
1146da8d
GM
13975 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13976ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13977eval as_val=\$$as_ac_var
13978 if test "x$as_val" = x""yes; then :
5476a9a4 13979 cat >>confdefs.h <<_ACEOF
1146da8d 13980#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
5476a9a4 13981_ACEOF
f199cab1 13982
5476a9a4
GM
13983fi
13984done
f199cab1 13985
f199cab1 13986
5476a9a4
GM
13987# Check this now, so that we will NOT find the above functions in ncurses.
13988# That is because we have not set up to link ncurses in lib-src.
13989# It's better to believe a function is not available
13990# than to expect to find it in ncurses.
13991# Also we need tputs and friends to be able to build at all.
13992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tputs" >&5
13993$as_echo_n "checking for library containing tputs... " >&6; }
13994# Run a test program that contains a call to tputs, a call that is
13995# never executed. This tests whether a pre-'main' dynamic linker
13996# works with the library. It's too much trouble to actually call
13997# tputs in the test program, due to portability hassles. When
13998# cross-compiling, assume the test program will run if it links.
f199cab1 13999
5476a9a4
GM
14000# Maybe curses should be tried earlier?
14001# See http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9736#35
14002for tputs_library in '' tinfo ncurses terminfo termcap curses; do
14003 OLIBS=$LIBS
14004 if test -z "$tputs_library"; then
14005 LIBS_TERMCAP=
14006 msg='none required'
14007 else
14008 LIBS_TERMCAP=-l$tputs_library
14009 msg=$LIBS_TERMCAP
14010 LIBS="$LIBS_TERMCAP $LIBS"
14011 fi
14012 if test "$cross_compiling" = yes; then :
14013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
14014/* end confdefs.h. */
14015
5476a9a4
GM
14016 extern void tputs (const char *, int, int (*)(int));
14017 int main (int argc, char **argv)
14018 {
14019 if (argc == 10000)
14020 tputs (argv[0], 0, 0);
14021 return 0;
14022 }
14023
067d23c9
KY
14024_ACEOF
14025if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 14026
067d23c9 14027else
5476a9a4 14028 msg=no
067d23c9
KY
14029fi
14030rm -f core conftest.err conftest.$ac_objext \
14031 conftest$ac_exeext conftest.$ac_ext
067d23c9 14032else
5476a9a4 14033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
14034/* end confdefs.h. */
14035
5476a9a4
GM
14036 extern void tputs (const char *, int, int (*)(int));
14037 int main (int argc, char **argv)
14038 {
14039 if (argc == 10000)
14040 tputs (argv[0], 0, 0);
14041 return 0;
14042 }
14043
067d23c9 14044_ACEOF
5476a9a4
GM
14045if ac_fn_c_try_run "$LINENO"; then :
14046
067d23c9 14047else
5476a9a4 14048 msg=no
067d23c9 14049fi
5476a9a4
GM
14050rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14051 conftest.$ac_objext conftest.beam conftest.$ac_ext
067d23c9 14052fi
5476a9a4
GM
14053
14054 LIBS=$OLIBS
14055 if test "X$msg" != Xno; then
14056 break
14057 fi
14058done
14059{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $msg" >&5
14060$as_echo "$msg" >&6; }
14061if test "X$msg" = Xno; then
14062 as_fn_error "The required function \`tputs' was not found in any library.
14063The following libraries were tried (in order):
14064 libtinfo, libncurses, libterminfo, libtermcap, libcurses
14065Please try installing whichever of these libraries is most appropriate
14066for your system, together with its header files.
14067For example, a libncurses-dev(el) or similar package." "$LINENO" 5
067d23c9
KY
14068fi
14069
5476a9a4
GM
14070## Use termcap instead of terminfo?
14071## Only true for: freebsd < 40000, ms-w32, msdos, netbsd < 599002500.
14072TERMINFO=yes
14073## FIXME? In the cases below where we unconditionally set
14074## LIBS_TERMCAP="-lncurses", this overrides LIBS_TERMCAP = -ltinfo,
14075## if that was found above to have tputs.
14076## Should we use the gnu* logic everywhere?
14077case "$opsys" in
14078 ## darwin: Prevents crashes when running Emacs in Terminal.app under 10.2.
14079 ## The ncurses library has been moved out of the System framework in
14080 ## Mac OS X 10.2. So if configure detects it, set the command-line
14081 ## option to use it.
14082 darwin) LIBS_TERMCAP="-lncurses" ;;
14083
14084 gnu*) test -z "$LIBS_TERMCAP" && LIBS_TERMCAP="-lncurses" ;;
14085
14086 freebsd)
14087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether FreeBSD is new enough to use terminfo" >&5
14088$as_echo_n "checking whether FreeBSD is new enough to use terminfo... " >&6; }
14089 if test "${emacs_cv_freebsd_terminfo+set}" = set; then :
067d23c9
KY
14090 $as_echo_n "(cached) " >&6
14091else
5476a9a4 14092 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 14093/* end confdefs.h. */
5476a9a4 14094#include <osreldate.h>
067d23c9
KY
14095int
14096main ()
14097{
5476a9a4
GM
14098#if __FreeBSD_version < 400000
14099fail;
14100#endif
14101
067d23c9
KY
14102 ;
14103 return 0;
14104}
14105_ACEOF
14106if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 14107 emacs_cv_freebsd_terminfo=yes
067d23c9 14108else
5476a9a4 14109 emacs_cv_freebsd_terminfo=no
067d23c9
KY
14110fi
14111rm -f core conftest.err conftest.$ac_objext \
14112 conftest$ac_exeext conftest.$ac_ext
14113fi
5476a9a4
GM
14114
14115
14116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_freebsd_terminfo" >&5
14117$as_echo "$emacs_cv_freebsd_terminfo" >&6; }
14118
14119 if test $emacs_cv_freebsd_terminfo = yes; then
14120 LIBS_TERMCAP="-lncurses"
14121 else
14122 TERMINFO=no
14123 LIBS_TERMCAP="-ltermcap"
14124 fi
14125 ;;
14126
14127 netbsd)
14128 if test "x$LIBS_TERMCAP" != "x-lterminfo"; then
14129 TERMINFO=no
14130 LIBS_TERMCAP="-ltermcap"
14131 fi
14132 ;;
14133
14134 openbsd) LIBS_TERMCAP="-lncurses" ;;
14135
14136 ## hpux: Make sure we get select from libc rather than from libcurses
14137 ## because libcurses on HPUX 10.10 has a broken version of select.
14138 ## We used to use -lc -lcurses, but this may be cleaner.
14139 ## FIXME? But TERMINFO = yes on hpux (it used to be explicitly
14140 # set that way, now it uses the default). Isn't this a contradiction?
14141 hpux*) LIBS_TERMCAP="-ltermcap" ;;
14142
14143esac
14144
14145TERMCAP_OBJ=tparam.o
14146if test $TERMINFO = yes; then
14147
14148$as_echo "#define TERMINFO 1" >>confdefs.h
14149
14150 TERMCAP_OBJ=terminfo.o
067d23c9
KY
14151fi
14152
f199cab1 14153
067d23c9 14154
5476a9a4
GM
14155
14156# Do we have res_init, for detecting changes in /etc/resolv.conf?
14157# On Darwin, res_init appears not to be useful: see bug#562 and
14158# http://lists.gnu.org/archive/html/emacs-devel/2007-11/msg01467.html
14159resolv=no
14160
14161if test $opsys != darwin; then
14162
14163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14164/* end confdefs.h. */
14165#include <netinet/in.h>
14166#include <arpa/nameser.h>
14167#include <resolv.h>
067d23c9
KY
14168int
14169main ()
14170{
5476a9a4 14171return res_init();
067d23c9
KY
14172 ;
14173 return 0;
14174}
14175_ACEOF
14176if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 14177 have_res_init=yes
067d23c9 14178else
5476a9a4 14179 have_res_init=no
067d23c9
KY
14180fi
14181rm -f core conftest.err conftest.$ac_objext \
14182 conftest$ac_exeext conftest.$ac_ext
5476a9a4
GM
14183 if test "$have_res_init" = no; then
14184 OLIBS="$LIBS"
14185 LIBS="$LIBS -lresolv"
14186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_init with -lresolv" >&5
14187$as_echo_n "checking for res_init with -lresolv... " >&6; }
14188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 14189/* end confdefs.h. */
5476a9a4
GM
14190#include <netinet/in.h>
14191#include <arpa/nameser.h>
14192#include <resolv.h>
067d23c9
KY
14193int
14194main ()
14195{
5476a9a4 14196return res_init();
067d23c9
KY
14197 ;
14198 return 0;
14199}
14200_ACEOF
14201if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 14202 have_res_init=yes
067d23c9 14203else
5476a9a4 14204 have_res_init=no
067d23c9
KY
14205fi
14206rm -f core conftest.err conftest.$ac_objext \
14207 conftest$ac_exeext conftest.$ac_ext
5476a9a4
GM
14208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_res_init" >&5
14209$as_echo "$have_res_init" >&6; }
14210 if test "$have_res_init" = yes ; then
14211 resolv=yes
14212 fi
14213 LIBS="$OLIBS"
14214 fi
067d23c9 14215
5476a9a4
GM
14216 if test "$have_res_init" = yes; then
14217
14218$as_echo "#define HAVE_RES_INIT 1" >>confdefs.h
067d23c9 14219
5476a9a4 14220 fi
067d23c9 14221fi
5476a9a4
GM
14222# Do we need the Hesiod library to provide the support routines?
14223LIBHESIOD=
14224if test "$with_hesiod" != no ; then
14225 # Don't set $LIBS here -- see comments above. FIXME which comments?
14226 ac_fn_c_check_func "$LINENO" "res_send" "ac_cv_func_res_send"
14227if test "x$ac_cv_func_res_send" = x""yes; then :
f199cab1 14228
5476a9a4
GM
14229else
14230 ac_fn_c_check_func "$LINENO" "__res_send" "ac_cv_func___res_send"
14231if test "x$ac_cv_func___res_send" = x""yes; then :
f199cab1 14232
5476a9a4
GM
14233else
14234 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_send in -lresolv" >&5
14235$as_echo_n "checking for res_send in -lresolv... " >&6; }
14236if test "${ac_cv_lib_resolv_res_send+set}" = set; then :
067d23c9
KY
14237 $as_echo_n "(cached) " >&6
14238else
14239 ac_check_lib_save_LIBS=$LIBS
5476a9a4 14240LIBS="-lresolv $LIBS"
067d23c9
KY
14241cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14242/* end confdefs.h. */
14243
14244/* Override any GCC internal prototype to avoid an error.
14245 Use char because int might match the return type of a GCC
14246 builtin and then its argument prototype would still apply. */
14247#ifdef __cplusplus
14248extern "C"
14249#endif
5476a9a4 14250char res_send ();
067d23c9
KY
14251int
14252main ()
14253{
5476a9a4 14254return res_send ();
067d23c9
KY
14255 ;
14256 return 0;
14257}
14258_ACEOF
14259if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 14260 ac_cv_lib_resolv_res_send=yes
067d23c9 14261else
5476a9a4 14262 ac_cv_lib_resolv_res_send=no
067d23c9
KY
14263fi
14264rm -f core conftest.err conftest.$ac_objext \
f199cab1
GM
14265 conftest$ac_exeext conftest.$ac_ext
14266LIBS=$ac_check_lib_save_LIBS
14267fi
5476a9a4
GM
14268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_send" >&5
14269$as_echo "$ac_cv_lib_resolv_res_send" >&6; }
14270if test "x$ac_cv_lib_resolv_res_send" = x""yes; then :
14271 resolv=yes
14272else
14273 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __res_send in -lresolv" >&5
14274$as_echo_n "checking for __res_send in -lresolv... " >&6; }
14275if test "${ac_cv_lib_resolv___res_send+set}" = set; then :
f199cab1
GM
14276 $as_echo_n "(cached) " >&6
14277else
14278 ac_check_lib_save_LIBS=$LIBS
5476a9a4 14279LIBS="-lresolv $LIBS"
f199cab1
GM
14280cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14281/* end confdefs.h. */
4717915f 14282
f199cab1
GM
14283/* Override any GCC internal prototype to avoid an error.
14284 Use char because int might match the return type of a GCC
14285 builtin and then its argument prototype would still apply. */
14286#ifdef __cplusplus
14287extern "C"
14288#endif
5476a9a4 14289char __res_send ();
f199cab1
GM
14290int
14291main ()
14292{
5476a9a4 14293return __res_send ();
f199cab1
GM
14294 ;
14295 return 0;
14296}
14297_ACEOF
14298if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 14299 ac_cv_lib_resolv___res_send=yes
f199cab1 14300else
5476a9a4 14301 ac_cv_lib_resolv___res_send=no
f199cab1
GM
14302fi
14303rm -f core conftest.err conftest.$ac_objext \
14304 conftest$ac_exeext conftest.$ac_ext
14305LIBS=$ac_check_lib_save_LIBS
14306fi
5476a9a4
GM
14307{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv___res_send" >&5
14308$as_echo "$ac_cv_lib_resolv___res_send" >&6; }
14309if test "x$ac_cv_lib_resolv___res_send" = x""yes; then :
14310 resolv=yes
067d23c9 14311fi
f199cab1 14312
5476a9a4 14313fi
1f5d53eb 14314
5476a9a4 14315fi
067d23c9 14316
067d23c9
KY
14317fi
14318
5476a9a4
GM
14319 if test "$resolv" = yes ; then
14320 RESOLVLIB=-lresolv
14321 else
14322 RESOLVLIB=
14323 fi
14324 ac_fn_c_check_func "$LINENO" "hes_getmailhost" "ac_cv_func_hes_getmailhost"
14325if test "x$ac_cv_func_hes_getmailhost" = x""yes; then :
14326
14327else
14328 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hes_getmailhost in -lhesiod" >&5
14329$as_echo_n "checking for hes_getmailhost in -lhesiod... " >&6; }
14330if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then :
14331 $as_echo_n "(cached) " >&6
14332else
14333 ac_check_lib_save_LIBS=$LIBS
14334LIBS="-lhesiod $RESOLVLIB $LIBS"
14335cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 14336/* end confdefs.h. */
5476a9a4
GM
14337
14338/* Override any GCC internal prototype to avoid an error.
14339 Use char because int might match the return type of a GCC
14340 builtin and then its argument prototype would still apply. */
14341#ifdef __cplusplus
14342extern "C"
14343#endif
14344char hes_getmailhost ();
067d23c9
KY
14345int
14346main ()
14347{
5476a9a4 14348return hes_getmailhost ();
067d23c9
KY
14349 ;
14350 return 0;
14351}
14352_ACEOF
f199cab1 14353if ac_fn_c_try_link "$LINENO"; then :
5476a9a4
GM
14354 ac_cv_lib_hesiod_hes_getmailhost=yes
14355else
14356 ac_cv_lib_hesiod_hes_getmailhost=no
067d23c9 14357fi
f199cab1
GM
14358rm -f core conftest.err conftest.$ac_objext \
14359 conftest$ac_exeext conftest.$ac_ext
5476a9a4 14360LIBS=$ac_check_lib_save_LIBS
067d23c9 14361fi
5476a9a4
GM
14362{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5
14363$as_echo "$ac_cv_lib_hesiod_hes_getmailhost" >&6; }
14364if test "x$ac_cv_lib_hesiod_hes_getmailhost" = x""yes; then :
14365 hesiod=yes
14366else
14367 :
067d23c9
KY
14368fi
14369
c5a68906 14370fi
f199cab1
GM
14371
14372
5476a9a4 14373 if test x"$hesiod" = xyes; then
f199cab1 14374
5476a9a4 14375$as_echo "#define HAVE_LIBHESIOD 1" >>confdefs.h
f199cab1 14376
5476a9a4 14377 LIBHESIOD=-lhesiod
c5a68906 14378 fi
5476a9a4 14379fi
4fc2b746 14380
4fc2b746 14381
5476a9a4
GM
14382# Do we need libresolv (due to res_init or Hesiod)?
14383if test "$resolv" = yes && test $opsys != darwin; then
4fc2b746 14384
5476a9a4 14385$as_echo "#define HAVE_LIBRESOLV 1" >>confdefs.h
4fc2b746 14386
5476a9a4
GM
14387 LIBRESOLV=-lresolv
14388else
14389 LIBRESOLV=
14390fi
4fc2b746 14391
4fc2b746 14392
5476a9a4
GM
14393# These tell us which Kerberos-related libraries to use.
14394COM_ERRLIB=
14395CRYPTOLIB=
14396KRB5LIB=
14397DESLIB=
14398KRB4LIB=
4fc2b746 14399
5476a9a4
GM
14400if test "${with_kerberos}" != no; then
14401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for com_err in -lcom_err" >&5
14402$as_echo_n "checking for com_err in -lcom_err... " >&6; }
14403if test "${ac_cv_lib_com_err_com_err+set}" = set; then :
14404 $as_echo_n "(cached) " >&6
14405else
14406 ac_check_lib_save_LIBS=$LIBS
14407LIBS="-lcom_err $LIBS"
14408cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14409/* end confdefs.h. */
4fc2b746 14410
5476a9a4
GM
14411/* Override any GCC internal prototype to avoid an error.
14412 Use char because int might match the return type of a GCC
14413 builtin and then its argument prototype would still apply. */
14414#ifdef __cplusplus
14415extern "C"
14416#endif
14417char com_err ();
14418int
14419main ()
14420{
14421return com_err ();
14422 ;
14423 return 0;
14424}
14425_ACEOF
14426if ac_fn_c_try_link "$LINENO"; then :
14427 ac_cv_lib_com_err_com_err=yes
14428else
14429 ac_cv_lib_com_err_com_err=no
14430fi
14431rm -f core conftest.err conftest.$ac_objext \
14432 conftest$ac_exeext conftest.$ac_ext
14433LIBS=$ac_check_lib_save_LIBS
14434fi
14435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_com_err_com_err" >&5
14436$as_echo "$ac_cv_lib_com_err_com_err" >&6; }
14437if test "x$ac_cv_lib_com_err_com_err" = x""yes; then :
14438 have_com_err=yes
14439else
14440 have_com_err=no
14441fi
f199cab1 14442
5476a9a4
GM
14443 if test $have_com_err = yes; then
14444 COM_ERRLIB=-lcom_err
14445 LIBS="$COM_ERRLIB $LIBS"
f199cab1 14446
5476a9a4 14447$as_echo "#define HAVE_LIBCOM_ERR 1" >>confdefs.h
f199cab1 14448
5476a9a4
GM
14449 fi
14450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lcrypto" >&5
14451$as_echo_n "checking for mit_des_cbc_encrypt in -lcrypto... " >&6; }
14452if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then :
14453 $as_echo_n "(cached) " >&6
14454else
14455 ac_check_lib_save_LIBS=$LIBS
14456LIBS="-lcrypto $LIBS"
14457cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14458/* end confdefs.h. */
f199cab1 14459
5476a9a4
GM
14460/* Override any GCC internal prototype to avoid an error.
14461 Use char because int might match the return type of a GCC
14462 builtin and then its argument prototype would still apply. */
14463#ifdef __cplusplus
14464extern "C"
14465#endif
14466char mit_des_cbc_encrypt ();
14467int
14468main ()
14469{
14470return mit_des_cbc_encrypt ();
14471 ;
14472 return 0;
14473}
14474_ACEOF
14475if ac_fn_c_try_link "$LINENO"; then :
14476 ac_cv_lib_crypto_mit_des_cbc_encrypt=yes
14477else
14478 ac_cv_lib_crypto_mit_des_cbc_encrypt=no
14479fi
14480rm -f core conftest.err conftest.$ac_objext \
14481 conftest$ac_exeext conftest.$ac_ext
14482LIBS=$ac_check_lib_save_LIBS
14483fi
14484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5
14485$as_echo "$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6; }
14486if test "x$ac_cv_lib_crypto_mit_des_cbc_encrypt" = x""yes; then :
14487 have_crypto=yes
14488else
14489 have_crypto=no
14490fi
f199cab1 14491
5476a9a4
GM
14492 if test $have_crypto = yes; then
14493 CRYPTOLIB=-lcrypto
14494 LIBS="$CRYPTOLIB $LIBS"
f199cab1 14495
5476a9a4 14496$as_echo "#define HAVE_LIBCRYPTO 1" >>confdefs.h
f199cab1 14497
5476a9a4
GM
14498 fi
14499 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
14500$as_echo_n "checking for mit_des_cbc_encrypt in -lk5crypto... " >&6; }
14501if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then :
14502 $as_echo_n "(cached) " >&6
14503else
14504 ac_check_lib_save_LIBS=$LIBS
14505LIBS="-lk5crypto $LIBS"
14506cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14507/* end confdefs.h. */
f199cab1 14508
5476a9a4
GM
14509/* Override any GCC internal prototype to avoid an error.
14510 Use char because int might match the return type of a GCC
14511 builtin and then its argument prototype would still apply. */
14512#ifdef __cplusplus
14513extern "C"
14514#endif
14515char mit_des_cbc_encrypt ();
14516int
14517main ()
14518{
14519return mit_des_cbc_encrypt ();
14520 ;
14521 return 0;
14522}
14523_ACEOF
14524if ac_fn_c_try_link "$LINENO"; then :
14525 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes
14526else
14527 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no
14528fi
14529rm -f core conftest.err conftest.$ac_objext \
14530 conftest$ac_exeext conftest.$ac_ext
14531LIBS=$ac_check_lib_save_LIBS
14532fi
14533{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5
14534$as_echo "$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6; }
14535if test "x$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" = x""yes; then :
14536 have_k5crypto=yes
14537else
14538 have_k5crypto=no
4fc2b746 14539fi
4fc2b746 14540
5476a9a4
GM
14541 if test $have_k5crypto = yes; then
14542 CRYPTOLIB=-lk5crypto
14543 LIBS="$CRYPTOLIB $LIBS"
4fc2b746 14544
5476a9a4 14545$as_echo "#define HAVE_LIBK5CRYPTO 1" >>confdefs.h
4fc2b746 14546
5476a9a4
GM
14547 fi
14548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5_init_context in -lkrb5" >&5
14549$as_echo_n "checking for krb5_init_context in -lkrb5... " >&6; }
14550if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then :
14551 $as_echo_n "(cached) " >&6
14552else
14553 ac_check_lib_save_LIBS=$LIBS
14554LIBS="-lkrb5 $LIBS"
14555cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14556/* end confdefs.h. */
4fc2b746 14557
5476a9a4
GM
14558/* Override any GCC internal prototype to avoid an error.
14559 Use char because int might match the return type of a GCC
14560 builtin and then its argument prototype would still apply. */
14561#ifdef __cplusplus
14562extern "C"
14563#endif
14564char krb5_init_context ();
14565int
14566main ()
14567{
14568return krb5_init_context ();
14569 ;
14570 return 0;
14571}
14572_ACEOF
14573if ac_fn_c_try_link "$LINENO"; then :
14574 ac_cv_lib_krb5_krb5_init_context=yes
14575else
14576 ac_cv_lib_krb5_krb5_init_context=no
14577fi
14578rm -f core conftest.err conftest.$ac_objext \
14579 conftest$ac_exeext conftest.$ac_ext
14580LIBS=$ac_check_lib_save_LIBS
14581fi
14582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb5_krb5_init_context" >&5
14583$as_echo "$ac_cv_lib_krb5_krb5_init_context" >&6; }
14584if test "x$ac_cv_lib_krb5_krb5_init_context" = x""yes; then :
14585 have_krb5=yes
14586else
14587 have_krb5=no
14588fi
f199cab1 14589
5476a9a4
GM
14590 if test $have_krb5=yes; then
14591 KRB5LIB=-lkrb5
14592 LIBS="$KRB5LIB $LIBS"
f199cab1 14593
5476a9a4 14594$as_echo "#define HAVE_LIBKRB5 1" >>confdefs.h
f199cab1 14595
5476a9a4
GM
14596 fi
14597 if test "${with_kerberos5}" = no; then
14598 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes425" >&5
14599$as_echo_n "checking for des_cbc_encrypt in -ldes425... " >&6; }
14600if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then :
f199cab1
GM
14601 $as_echo_n "(cached) " >&6
14602else
5476a9a4
GM
14603 ac_check_lib_save_LIBS=$LIBS
14604LIBS="-ldes425 $LIBS"
14605cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3e0be4ab 14606/* end confdefs.h. */
f199cab1 14607
5476a9a4
GM
14608/* Override any GCC internal prototype to avoid an error.
14609 Use char because int might match the return type of a GCC
14610 builtin and then its argument prototype would still apply. */
14611#ifdef __cplusplus
14612extern "C"
14613#endif
14614char des_cbc_encrypt ();
3e0be4ab
GM
14615int
14616main ()
14617{
5476a9a4 14618return des_cbc_encrypt ();
3e0be4ab
GM
14619 ;
14620 return 0;
14621}
14622_ACEOF
5476a9a4
GM
14623if ac_fn_c_try_link "$LINENO"; then :
14624 ac_cv_lib_des425_des_cbc_encrypt=yes
3e0be4ab 14625else
5476a9a4 14626 ac_cv_lib_des425_des_cbc_encrypt=no
3e0be4ab 14627fi
5476a9a4
GM
14628rm -f core conftest.err conftest.$ac_objext \
14629 conftest$ac_exeext conftest.$ac_ext
14630LIBS=$ac_check_lib_save_LIBS
4fc2b746 14631fi
5476a9a4
GM
14632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
14633$as_echo "$ac_cv_lib_des425_des_cbc_encrypt" >&6; }
14634if test "x$ac_cv_lib_des425_des_cbc_encrypt" = x""yes; then :
14635 have_des425=yes
14636else
14637 have_des425=no
f199cab1 14638fi
6c051bab 14639
5476a9a4
GM
14640 if test $have_des425 = yes; then
14641 DESLIB=-ldes425
14642 LIBS="$DESLIB $LIBS"
6c051bab 14643
5476a9a4 14644$as_echo "#define HAVE_LIBDES425 1" >>confdefs.h
f199cab1 14645
5476a9a4
GM
14646 else
14647 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes" >&5
14648$as_echo_n "checking for des_cbc_encrypt in -ldes... " >&6; }
14649if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then :
14650 $as_echo_n "(cached) " >&6
14651else
14652 ac_check_lib_save_LIBS=$LIBS
14653LIBS="-ldes $LIBS"
14654cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14655/* end confdefs.h. */
f199cab1 14656
5476a9a4
GM
14657/* Override any GCC internal prototype to avoid an error.
14658 Use char because int might match the return type of a GCC
14659 builtin and then its argument prototype would still apply. */
14660#ifdef __cplusplus
14661extern "C"
14662#endif
14663char des_cbc_encrypt ();
14664int
14665main ()
14666{
14667return des_cbc_encrypt ();
14668 ;
14669 return 0;
14670}
14671_ACEOF
14672if ac_fn_c_try_link "$LINENO"; then :
14673 ac_cv_lib_des_des_cbc_encrypt=yes
14674else
14675 ac_cv_lib_des_des_cbc_encrypt=no
14676fi
14677rm -f core conftest.err conftest.$ac_objext \
14678 conftest$ac_exeext conftest.$ac_ext
14679LIBS=$ac_check_lib_save_LIBS
14680fi
14681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
14682$as_echo "$ac_cv_lib_des_des_cbc_encrypt" >&6; }
14683if test "x$ac_cv_lib_des_des_cbc_encrypt" = x""yes; then :
14684 have_des=yes
14685else
14686 have_des=no
14687fi
f199cab1 14688
5476a9a4
GM
14689 if test $have_des = yes; then
14690 DESLIB=-ldes
14691 LIBS="$DESLIB $LIBS"
f199cab1 14692
5476a9a4 14693$as_echo "#define HAVE_LIBDES 1" >>confdefs.h
f199cab1 14694
5476a9a4
GM
14695 fi
14696 fi
14697 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb4" >&5
14698$as_echo_n "checking for krb_get_cred in -lkrb4... " >&6; }
14699if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then :
942f733f
PE
14700 $as_echo_n "(cached) " >&6
14701else
5476a9a4
GM
14702 ac_check_lib_save_LIBS=$LIBS
14703LIBS="-lkrb4 $LIBS"
14704cat confdefs.h - <<_ACEOF >conftest.$ac_ext
942f733f 14705/* end confdefs.h. */
942f733f 14706
5476a9a4
GM
14707/* Override any GCC internal prototype to avoid an error.
14708 Use char because int might match the return type of a GCC
14709 builtin and then its argument prototype would still apply. */
14710#ifdef __cplusplus
14711extern "C"
14712#endif
14713char krb_get_cred ();
942f733f
PE
14714int
14715main ()
14716{
5476a9a4 14717return krb_get_cred ();
942f733f
PE
14718 ;
14719 return 0;
14720}
14721_ACEOF
5476a9a4
GM
14722if ac_fn_c_try_link "$LINENO"; then :
14723 ac_cv_lib_krb4_krb_get_cred=yes
14724else
14725 ac_cv_lib_krb4_krb_get_cred=no
14726fi
14727rm -f core conftest.err conftest.$ac_objext \
14728 conftest$ac_exeext conftest.$ac_ext
14729LIBS=$ac_check_lib_save_LIBS
14730fi
14731{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb4_krb_get_cred" >&5
14732$as_echo "$ac_cv_lib_krb4_krb_get_cred" >&6; }
14733if test "x$ac_cv_lib_krb4_krb_get_cred" = x""yes; then :
14734 have_krb4=yes
14735else
14736 have_krb4=no
14737fi
14738
14739 if test $have_krb4 = yes; then
14740 KRB4LIB=-lkrb4
14741 LIBS="$KRB4LIB $LIBS"
14742
14743$as_echo "#define HAVE_LIBKRB4 1" >>confdefs.h
14744
14745 else
14746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb" >&5
14747$as_echo_n "checking for krb_get_cred in -lkrb... " >&6; }
14748if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then :
14749 $as_echo_n "(cached) " >&6
3e0be4ab 14750else
5476a9a4
GM
14751 ac_check_lib_save_LIBS=$LIBS
14752LIBS="-lkrb $LIBS"
14753cat confdefs.h - <<_ACEOF >conftest.$ac_ext
942f733f 14754/* end confdefs.h. */
942f733f 14755
5476a9a4
GM
14756/* Override any GCC internal prototype to avoid an error.
14757 Use char because int might match the return type of a GCC
14758 builtin and then its argument prototype would still apply. */
14759#ifdef __cplusplus
14760extern "C"
14761#endif
14762char krb_get_cred ();
942f733f
PE
14763int
14764main ()
14765{
5476a9a4 14766return krb_get_cred ();
942f733f
PE
14767 ;
14768 return 0;
14769}
14770_ACEOF
5476a9a4
GM
14771if ac_fn_c_try_link "$LINENO"; then :
14772 ac_cv_lib_krb_krb_get_cred=yes
942f733f 14773else
5476a9a4 14774 ac_cv_lib_krb_krb_get_cred=no
942f733f 14775fi
5476a9a4
GM
14776rm -f core conftest.err conftest.$ac_objext \
14777 conftest$ac_exeext conftest.$ac_ext
14778LIBS=$ac_check_lib_save_LIBS
3e0be4ab 14779fi
5476a9a4
GM
14780{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb_krb_get_cred" >&5
14781$as_echo "$ac_cv_lib_krb_krb_get_cred" >&6; }
14782if test "x$ac_cv_lib_krb_krb_get_cred" = x""yes; then :
14783 have_krb=yes
14784else
14785 have_krb=no
942f733f 14786fi
f199cab1 14787
5476a9a4
GM
14788 if test $have_krb = yes; then
14789 KRB4LIB=-lkrb
14790 LIBS="$KRB4LIB $LIBS"
14791
14792$as_echo "#define HAVE_LIBKRB 1" >>confdefs.h
14793
14794 fi
14795 fi
f199cab1
GM
14796 fi
14797
5476a9a4
GM
14798 if test "${with_kerberos5}" != no; then
14799 for ac_header in krb5.h
14800do :
14801 ac_fn_c_check_header_mongrel "$LINENO" "krb5.h" "ac_cv_header_krb5_h" "$ac_includes_default"
14802if test "x$ac_cv_header_krb5_h" = x""yes; then :
14803 cat >>confdefs.h <<_ACEOF
14804#define HAVE_KRB5_H 1
14805_ACEOF
14806 ac_fn_c_check_member "$LINENO" "krb5_error" "text" "ac_cv_member_krb5_error_text" "#include <krb5.h>
14807"
14808if test "x$ac_cv_member_krb5_error_text" = x""yes; then :
14809
f199cab1 14810cat >>confdefs.h <<_ACEOF
5476a9a4 14811#define HAVE_KRB5_ERROR_TEXT 1
f199cab1
GM
14812_ACEOF
14813
14814
5476a9a4
GM
14815fi
14816ac_fn_c_check_member "$LINENO" "krb5_error" "e_text" "ac_cv_member_krb5_error_e_text" "#include <krb5.h>
14817"
14818if test "x$ac_cv_member_krb5_error_e_text" = x""yes; then :
f199cab1 14819
5476a9a4
GM
14820cat >>confdefs.h <<_ACEOF
14821#define HAVE_KRB5_ERROR_E_TEXT 1
14822_ACEOF
f199cab1
GM
14823
14824
5476a9a4 14825fi
f199cab1 14826
5476a9a4 14827fi
f199cab1 14828
5476a9a4 14829done
f199cab1 14830
5476a9a4
GM
14831 else
14832 for ac_header in des.h
14833do :
14834 ac_fn_c_check_header_mongrel "$LINENO" "des.h" "ac_cv_header_des_h" "$ac_includes_default"
14835if test "x$ac_cv_header_des_h" = x""yes; then :
14836 cat >>confdefs.h <<_ACEOF
14837#define HAVE_DES_H 1
14838_ACEOF
f199cab1 14839
5476a9a4
GM
14840else
14841 for ac_header in kerberosIV/des.h
14842do :
14843 ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/des.h" "ac_cv_header_kerberosIV_des_h" "$ac_includes_default"
14844if test "x$ac_cv_header_kerberosIV_des_h" = x""yes; then :
14845 cat >>confdefs.h <<_ACEOF
14846#define HAVE_KERBEROSIV_DES_H 1
14847_ACEOF
f199cab1 14848
5476a9a4
GM
14849else
14850 for ac_header in kerberos/des.h
14851do :
14852 ac_fn_c_check_header_mongrel "$LINENO" "kerberos/des.h" "ac_cv_header_kerberos_des_h" "$ac_includes_default"
14853if test "x$ac_cv_header_kerberos_des_h" = x""yes; then :
14854 cat >>confdefs.h <<_ACEOF
14855#define HAVE_KERBEROS_DES_H 1
14856_ACEOF
f199cab1 14857
5476a9a4 14858fi
f199cab1 14859
5476a9a4
GM
14860done
14861
14862fi
14863
14864done
14865
14866fi
14867
14868done
14869
14870 for ac_header in krb.h
f199cab1 14871do :
5476a9a4
GM
14872 ac_fn_c_check_header_mongrel "$LINENO" "krb.h" "ac_cv_header_krb_h" "$ac_includes_default"
14873if test "x$ac_cv_header_krb_h" = x""yes; then :
f199cab1 14874 cat >>confdefs.h <<_ACEOF
5476a9a4
GM
14875#define HAVE_KRB_H 1
14876_ACEOF
14877
14878else
14879 for ac_header in kerberosIV/krb.h
14880do :
14881 ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/krb.h" "ac_cv_header_kerberosIV_krb_h" "$ac_includes_default"
14882if test "x$ac_cv_header_kerberosIV_krb_h" = x""yes; then :
14883 cat >>confdefs.h <<_ACEOF
14884#define HAVE_KERBEROSIV_KRB_H 1
14885_ACEOF
14886
14887else
14888 for ac_header in kerberos/krb.h
14889do :
14890 ac_fn_c_check_header_mongrel "$LINENO" "kerberos/krb.h" "ac_cv_header_kerberos_krb_h" "$ac_includes_default"
14891if test "x$ac_cv_header_kerberos_krb_h" = x""yes; then :
14892 cat >>confdefs.h <<_ACEOF
14893#define HAVE_KERBEROS_KRB_H 1
f199cab1 14894_ACEOF
942f733f 14895
3e0be4ab 14896fi
942f733f 14897
f199cab1
GM
14898done
14899
5476a9a4
GM
14900fi
14901
14902done
14903
14904fi
14905
14906done
14907
14908 fi
14909 for ac_header in com_err.h
f199cab1 14910do :
5476a9a4
GM
14911 ac_fn_c_check_header_mongrel "$LINENO" "com_err.h" "ac_cv_header_com_err_h" "$ac_includes_default"
14912if test "x$ac_cv_header_com_err_h" = x""yes; then :
f199cab1 14913 cat >>confdefs.h <<_ACEOF
5476a9a4 14914#define HAVE_COM_ERR_H 1
f199cab1
GM
14915_ACEOF
14916
3e0be4ab 14917fi
f199cab1 14918
5476a9a4 14919done
3e0be4ab
GM
14920
14921fi
14922
f199cab1
GM
14923
14924
14925
14926
f199cab1
GM
14927
14928
14929
14930
14931
5476a9a4
GM
14932 for ac_func in $ac_func_list
14933do :
14934 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14935ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14936eval as_val=\$$as_ac_var
14937 if test "x$as_val" = x""yes; then :
14938 cat >>confdefs.h <<_ACEOF
14939#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14940_ACEOF
14941
14942fi
14943done
14944
f199cab1
GM
14945
14946
14947
5476a9a4
GM
14948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime caches TZ" >&5
14949$as_echo_n "checking whether localtime caches TZ... " >&6; }
14950if test "${emacs_cv_localtime_cache+set}" = set; then :
14951 $as_echo_n "(cached) " >&6
14952else
14953 if test x$ac_cv_func_tzset = xyes; then
14954if test "$cross_compiling" = yes; then :
14955 # If we have tzset, assume the worst when cross-compiling.
14956emacs_cv_localtime_cache=yes
14957else
14958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14959/* end confdefs.h. */
14960#include <time.h>
14961char TZ_GMT0[] = "TZ=GMT0";
14962char TZ_PST8[] = "TZ=PST8";
14963main()
14964{
14965 time_t now = time ((time_t *) 0);
14966 int hour_GMT0, hour_unset;
14967 if (putenv (TZ_GMT0) != 0)
14968 exit (1);
14969 hour_GMT0 = localtime (&now)->tm_hour;
14970 unsetenv("TZ");
14971 hour_unset = localtime (&now)->tm_hour;
14972 if (putenv (TZ_PST8) != 0)
14973 exit (1);
14974 if (localtime (&now)->tm_hour == hour_GMT0)
14975 exit (1);
14976 unsetenv("TZ");
14977 if (localtime (&now)->tm_hour != hour_unset)
14978 exit (1);
14979 exit (0);
14980}
14981_ACEOF
14982if ac_fn_c_try_run "$LINENO"; then :
14983 emacs_cv_localtime_cache=no
14984else
14985 emacs_cv_localtime_cache=yes
14986fi
14987rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14988 conftest.$ac_objext conftest.beam conftest.$ac_ext
14989fi
f199cab1 14990
5476a9a4
GM
14991else
14992 # If we lack tzset, report that localtime does not cache TZ,
14993 # since we can't invalidate the cache if we don't have tzset.
14994 emacs_cv_localtime_cache=no
14995fi
14996fi
14997{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_localtime_cache" >&5
14998$as_echo "$emacs_cv_localtime_cache" >&6; }
14999if test $emacs_cv_localtime_cache = yes; then
f199cab1 15000
5476a9a4 15001$as_echo "#define LOCALTIME_CACHE 1" >>confdefs.h
f199cab1 15002
5476a9a4 15003fi
f199cab1 15004
5476a9a4
GM
15005ok_so_far=yes
15006ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket"
15007if test "x$ac_cv_func_socket" = x""yes; then :
3e0be4ab 15008
5476a9a4
GM
15009else
15010 ok_so_far=no
15011fi
f199cab1 15012
5476a9a4
GM
15013if test $ok_so_far = yes; then
15014 ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
15015if test "x$ac_cv_header_netinet_in_h" = x""yes; then :
f199cab1 15016
5476a9a4
GM
15017else
15018 ok_so_far=no
15019fi
f199cab1
GM
15020
15021
5476a9a4
GM
15022fi
15023if test $ok_so_far = yes; then
15024 ac_fn_c_check_header_mongrel "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default"
15025if test "x$ac_cv_header_arpa_inet_h" = x""yes; then :
f199cab1 15026
5476a9a4
GM
15027else
15028 ok_so_far=no
15029fi
f199cab1
GM
15030
15031
5476a9a4
GM
15032fi
15033if test $ok_so_far = yes; then
f199cab1 15034
5476a9a4 15035$as_echo "#define HAVE_INET_SOCKETS 1" >>confdefs.h
f199cab1 15036
5476a9a4 15037fi
f199cab1 15038
5476a9a4 15039if test -f /usr/lpp/X11/bin/smt.exp; then
942f733f 15040
5476a9a4 15041$as_echo "#define HAVE_AIX_SMT_EXP 1" >>confdefs.h
942f733f 15042
942f733f 15043fi
3e0be4ab 15044
5476a9a4
GM
15045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system supports dynamic ptys" >&5
15046$as_echo_n "checking whether system supports dynamic ptys... " >&6; }
15047if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
15048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15049$as_echo "yes" >&6; }
15050
15051$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
3e0be4ab 15052
5476a9a4
GM
15053else
15054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15055$as_echo "no" >&6; }
15056fi
3e0be4ab 15057
bb7dce39
GM
15058case $canonical in
15059 *-solaris2.4 | *-solaris2.4.*)
15060 : ${ac_cv_func_vfork_works=no};;
15061esac
15062
5476a9a4
GM
15063ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
15064if test "x$ac_cv_type_pid_t" = x""yes; then :
3e0be4ab 15065
5476a9a4 15066else
3e0be4ab 15067
5476a9a4
GM
15068cat >>confdefs.h <<_ACEOF
15069#define pid_t int
15070_ACEOF
f199cab1 15071
5476a9a4 15072fi
f199cab1 15073
5476a9a4
GM
15074for ac_header in vfork.h
15075do :
15076 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
15077if test "x$ac_cv_header_vfork_h" = x""yes; then :
15078 cat >>confdefs.h <<_ACEOF
15079#define HAVE_VFORK_H 1
15080_ACEOF
f199cab1 15081
5476a9a4 15082fi
f199cab1 15083
5476a9a4 15084done
f199cab1 15085
5476a9a4
GM
15086for ac_func in fork vfork
15087do :
15088 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15089ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15090eval as_val=\$$as_ac_var
15091 if test "x$as_val" = x""yes; then :
15092 cat >>confdefs.h <<_ACEOF
15093#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15094_ACEOF
f199cab1 15095
5476a9a4
GM
15096fi
15097done
f199cab1 15098
5476a9a4
GM
15099if test "x$ac_cv_func_fork" = xyes; then
15100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
15101$as_echo_n "checking for working fork... " >&6; }
15102if test "${ac_cv_func_fork_works+set}" = set; then :
15103 $as_echo_n "(cached) " >&6
15104else
15105 if test "$cross_compiling" = yes; then :
15106 ac_cv_func_fork_works=cross
15107else
15108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15109/* end confdefs.h. */
15110$ac_includes_default
15111int
15112main ()
15113{
f199cab1 15114
5476a9a4
GM
15115 /* By Ruediger Kuhlmann. */
15116 return fork () < 0;
f199cab1 15117
5476a9a4
GM
15118 ;
15119 return 0;
15120}
15121_ACEOF
15122if ac_fn_c_try_run "$LINENO"; then :
15123 ac_cv_func_fork_works=yes
15124else
15125 ac_cv_func_fork_works=no
15126fi
15127rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15128 conftest.$ac_objext conftest.beam conftest.$ac_ext
15129fi
f199cab1 15130
5476a9a4
GM
15131fi
15132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
15133$as_echo "$ac_cv_func_fork_works" >&6; }
f199cab1 15134
5476a9a4
GM
15135else
15136 ac_cv_func_fork_works=$ac_cv_func_fork
15137fi
15138if test "x$ac_cv_func_fork_works" = xcross; then
15139 case $host in
15140 *-*-amigaos* | *-*-msdosdjgpp*)
15141 # Override, as these systems have only a dummy fork() stub
15142 ac_cv_func_fork_works=no
15143 ;;
15144 *)
15145 ac_cv_func_fork_works=yes
15146 ;;
15147 esac
15148 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
15149$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
15150fi
15151ac_cv_func_vfork_works=$ac_cv_func_vfork
15152if test "x$ac_cv_func_vfork" = xyes; then
15153 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
15154$as_echo_n "checking for working vfork... " >&6; }
15155if test "${ac_cv_func_vfork_works+set}" = set; then :
f199cab1
GM
15156 $as_echo_n "(cached) " >&6
15157else
15158 if test "$cross_compiling" = yes; then :
5476a9a4 15159 ac_cv_func_vfork_works=cross
f199cab1
GM
15160else
15161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15162/* end confdefs.h. */
5476a9a4
GM
15163/* Thanks to Paul Eggert for this test. */
15164$ac_includes_default
15165#include <sys/wait.h>
15166#ifdef HAVE_VFORK_H
15167# include <vfork.h>
f199cab1 15168#endif
5476a9a4
GM
15169/* On some sparc systems, changes by the child to local and incoming
15170 argument registers are propagated back to the parent. The compiler
15171 is told about this with #include <vfork.h>, but some compilers
15172 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
15173 static variable whose address is put into a register that is
15174 clobbered by the vfork. */
15175static void
15176#ifdef __cplusplus
15177sparc_address_test (int arg)
15178# else
15179sparc_address_test (arg) int arg;
f199cab1 15180#endif
5476a9a4
GM
15181{
15182 static pid_t child;
15183 if (!child) {
15184 child = vfork ();
15185 if (child < 0) {
15186 perror ("vfork");
15187 _exit(2);
15188 }
15189 if (!child) {
15190 arg = getpid();
15191 write(-1, "", 0);
15192 _exit (arg);
15193 }
15194 }
15195}
f199cab1 15196
5476a9a4
GM
15197int
15198main ()
15199{
15200 pid_t parent = getpid ();
15201 pid_t child;
f199cab1 15202
5476a9a4 15203 sparc_address_test (0);
f199cab1 15204
5476a9a4 15205 child = vfork ();
3e0be4ab 15206
5476a9a4
GM
15207 if (child == 0) {
15208 /* Here is another test for sparc vfork register problems. This
15209 test uses lots of local variables, at least as many local
15210 variables as main has allocated so far including compiler
15211 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
15212 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
15213 reuse the register of parent for one of the local variables,
15214 since it will think that parent can't possibly be used any more
15215 in this routine. Assigning to the local variable will thus
15216 munge parent in the parent process. */
15217 pid_t
15218 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
15219 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
15220 /* Convince the compiler that p..p7 are live; otherwise, it might
15221 use the same hardware register for all 8 local variables. */
15222 if (p != p1 || p != p2 || p != p3 || p != p4
15223 || p != p5 || p != p6 || p != p7)
15224 _exit(1);
3e0be4ab 15225
5476a9a4
GM
15226 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
15227 from child file descriptors. If the child closes a descriptor
15228 before it execs or exits, this munges the parent's descriptor
15229 as well. Test for this by closing stdout in the child. */
15230 _exit(close(fileno(stdout)) != 0);
15231 } else {
15232 int status;
15233 struct stat st;
3e0be4ab 15234
5476a9a4
GM
15235 while (wait(&status) != child)
15236 ;
15237 return (
15238 /* Was there some problem with vforking? */
15239 child < 0
3e0be4ab 15240
5476a9a4
GM
15241 /* Did the child fail? (This shouldn't happen.) */
15242 || status
15243
15244 /* Did the vfork/compiler bug occur? */
15245 || parent != getpid()
15246
15247 /* Did the file descriptor bug occur? */
15248 || fstat(fileno(stdout), &st) != 0
15249 );
15250 }
f199cab1 15251}
5476a9a4
GM
15252_ACEOF
15253if ac_fn_c_try_run "$LINENO"; then :
15254 ac_cv_func_vfork_works=yes
15255else
15256 ac_cv_func_vfork_works=no
15257fi
15258rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15259 conftest.$ac_objext conftest.beam conftest.$ac_ext
15260fi
15261
15262fi
15263{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
15264$as_echo "$ac_cv_func_vfork_works" >&6; }
15265
15266fi;
15267if test "x$ac_cv_func_fork_works" = xcross; then
15268 ac_cv_func_vfork_works=$ac_cv_func_vfork
15269 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
15270$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
15271fi
15272
15273if test "x$ac_cv_func_vfork_works" = xyes; then
3e0be4ab 15274
5476a9a4 15275$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
3e0be4ab 15276
5476a9a4 15277else
3e0be4ab 15278
5476a9a4 15279$as_echo "#define vfork fork" >>confdefs.h
942f733f 15280
5476a9a4
GM
15281fi
15282if test "x$ac_cv_func_fork_works" = xyes; then
942f733f 15283
5476a9a4 15284$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
942f733f 15285
5476a9a4 15286fi
f199cab1 15287
f199cab1 15288
5476a9a4
GM
15289for ac_func in snprintf
15290do :
15291 ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
15292if test "x$ac_cv_func_snprintf" = x""yes; then :
15293 cat >>confdefs.h <<_ACEOF
15294#define HAVE_SNPRINTF 1
15295_ACEOF
15296
15297fi
15298done
15299
942f733f 15300
5476a9a4
GM
15301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
15302$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
15303if test "${emacs_cv_langinfo_codeset+set}" = set; then :
15304 $as_echo_n "(cached) " >&6
15305else
15306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15307/* end confdefs.h. */
15308#include <langinfo.h>
3e0be4ab
GM
15309int
15310main ()
15311{
5476a9a4
GM
15312char* cs = nl_langinfo(CODESET);
15313 ;
15314 return 0;
15315}
15316_ACEOF
15317if ac_fn_c_try_link "$LINENO"; then :
15318 emacs_cv_langinfo_codeset=yes
15319else
15320 emacs_cv_langinfo_codeset=no
15321fi
15322rm -f core conftest.err conftest.$ac_objext \
15323 conftest$ac_exeext conftest.$ac_ext
f199cab1 15324
5476a9a4
GM
15325fi
15326{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_langinfo_codeset" >&5
15327$as_echo "$emacs_cv_langinfo_codeset" >&6; }
15328if test $emacs_cv_langinfo_codeset = yes; then
f199cab1 15329
5476a9a4 15330$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
f199cab1 15331
5476a9a4 15332fi
f199cab1 15333
5476a9a4
GM
15334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
15335$as_echo_n "checking for mbstate_t... " >&6; }
15336if test "${ac_cv_type_mbstate_t+set}" = set; then :
15337 $as_echo_n "(cached) " >&6
15338else
15339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15340/* end confdefs.h. */
15341$ac_includes_default
15342# include <wchar.h>
15343int
15344main ()
15345{
15346mbstate_t x; return sizeof x;
15347 ;
15348 return 0;
3e0be4ab 15349}
942f733f 15350_ACEOF
5476a9a4
GM
15351if ac_fn_c_try_compile "$LINENO"; then :
15352 ac_cv_type_mbstate_t=yes
3e0be4ab 15353else
5476a9a4 15354 ac_cv_type_mbstate_t=no
942f733f 15355fi
5476a9a4 15356rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3e0be4ab 15357fi
5476a9a4
GM
15358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
15359$as_echo "$ac_cv_type_mbstate_t" >&6; }
15360 if test $ac_cv_type_mbstate_t = yes; then
f199cab1 15361
5476a9a4 15362$as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
f199cab1 15363
5476a9a4 15364 else
f199cab1 15365
5476a9a4 15366$as_echo "#define mbstate_t int" >>confdefs.h
f199cab1 15367
5476a9a4
GM
15368 fi
15369
15370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C restricted array declarations" >&5
15371$as_echo_n "checking for C restricted array declarations... " >&6; }
15372if test "${emacs_cv_c_restrict_arr+set}" = set; then :
15373 $as_echo_n "(cached) " >&6
15374else
15375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15376/* end confdefs.h. */
15377void fred (int x[__restrict]);
15378int
15379main ()
15380{
15381
15382 ;
15383 return 0;
15384}
15385_ACEOF
15386if ac_fn_c_try_compile "$LINENO"; then :
15387 emacs_cv_c_restrict_arr=yes
15388else
15389 emacs_cv_c_restrict_arr=no
15390fi
15391rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15392fi
15393{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_c_restrict_arr" >&5
15394$as_echo "$emacs_cv_c_restrict_arr" >&6; }
15395if test "$emacs_cv_c_restrict_arr" = yes; then
f199cab1 15396
5476a9a4 15397$as_echo "#define __restrict_arr __restrict" >>confdefs.h
f199cab1 15398
5476a9a4 15399fi
f199cab1
GM
15400
15401
15402
8ad96b1d
GM
15403$as_echo "#define AMPERSAND_FULL_NAME 1" >>confdefs.h
15404
15405
15406
5476a9a4 15407$as_echo "#define CLASH_DETECTION 1" >>confdefs.h
f199cab1
GM
15408
15409
5476a9a4 15410## Note: PTYs are broken on darwin <6. Use at your own risk.
f199cab1 15411
5476a9a4 15412$as_echo "#define HAVE_PTYS 1" >>confdefs.h
f199cab1
GM
15413
15414
15415
5476a9a4 15416$as_echo "#define HAVE_SOCKETS 1" >>confdefs.h
f199cab1 15417
942f733f 15418
942f733f 15419
6b10626d
GM
15420
15421
8ad96b1d
GM
15422$as_echo "#define NULL_DEVICE \"/dev/null\"" >>confdefs.h
15423
15424
15425
15426$as_echo "#define SEPCHAR ':'" >>confdefs.h
15427
15428
15429
15430$as_echo "#define subprocesses 1" >>confdefs.h
15431
15432
15433
15434$as_echo "#define USER_FULL_NAME pw->pw_gecos" >>confdefs.h
15435
15436
15437
942f733f 15438
9ff736dc
GM
15439$as_echo "#define DIRECTORY_SEP '/'" >>confdefs.h
15440
15441
15442
f199cab1 15443
6b10626d
GM
15444
15445$as_echo "#define IS_DEVICE_SEP(_c_) 0" >>confdefs.h
15446
15447
15448
15449$as_echo "#define IS_DIRECTORY_SEP(_c_) ((_c_) == DIRECTORY_SEP)" >>confdefs.h
15450
15451
15452
15453$as_echo "#define IS_ANY_SEP(_c_) (IS_DIRECTORY_SEP (_c_))" >>confdefs.h
15454
15455
15456
15457
15458
5476a9a4
GM
15459case $opsys in
15460 aix4-2)
15461 if test x$ac_cv_lib_Xmu_XmuConvertStandardSelection != xyes; then
15462 $as_echo "#define NO_EDITRES 1" >>confdefs.h
f199cab1 15463
5476a9a4
GM
15464 fi
15465 ;;
f199cab1 15466
5476a9a4
GM
15467 hpux*)
15468 $as_echo "#define NO_EDITRES 1" >>confdefs.h
f199cab1 15469
5476a9a4
GM
15470 ;;
15471esac
f199cab1
GM
15472
15473
5476a9a4 15474case $opsys in
5476a9a4 15475 irix6-5 | sol2* | unixware )
f199cab1 15476
5476a9a4 15477$as_echo "#define NSIG_MINIMUM 32" >>confdefs.h
f199cab1 15478
5476a9a4
GM
15479 ;;
15480esac
f199cab1 15481
4fa92495 15482emacs_broken_SIGIO=no
f199cab1 15483
5476a9a4
GM
15484case $opsys in
15485 hpux* | irix6-5 | openbsd | sol2* | unixware )
4fa92495 15486 emacs_broken_SIGIO=yes
5476a9a4 15487 ;;
f199cab1 15488
5476a9a4 15489 aix4-2)
f199cab1 15490
5476a9a4 15491$as_echo "#define BROKEN_GET_CURRENT_DIR_NAME 1" >>confdefs.h
067d23c9 15492
5476a9a4 15493 ;;
067d23c9 15494
5476a9a4 15495 freebsd)
f199cab1 15496
5476a9a4 15497$as_echo "#define BROKEN_PTY_READ_AFTER_EAGAIN 1" >>confdefs.h
f199cab1 15498
5476a9a4 15499 ;;
5476a9a4 15500esac
f199cab1 15501
5476a9a4
GM
15502case $opsys in
15503 gnu-* | sol2-10 )
f199cab1 15504
5476a9a4 15505$as_echo "#define HAVE_PROCFS 1" >>confdefs.h
f199cab1 15506
5476a9a4
GM
15507 ;;
15508esac
f199cab1 15509
5476a9a4
GM
15510case $opsys in
15511 darwin | freebsd | netbsd | openbsd )
f199cab1 15512
5476a9a4 15513$as_echo "#define DONT_REOPEN_PTY 1" >>confdefs.h
f199cab1 15514
5476a9a4
GM
15515 ;;
15516esac
f199cab1 15517
5476a9a4
GM
15518case $opsys in
15519 netbsd | openbsd) sound_device="/dev/audio" ;;
15520 *) sound_device="/dev/dsp" ;;
15521esac
f199cab1 15522
f199cab1 15523
5476a9a4
GM
15524cat >>confdefs.h <<_ACEOF
15525#define DEFAULT_SOUND_DEVICE "$sound_device"
15526_ACEOF
f199cab1
GM
15527
15528
15529
5476a9a4
GM
15530case $opsys in
15531 darwin | gnu-linux | gnu-kfreebsd )
f199cab1 15532
5476a9a4 15533$as_echo "#define INTERRUPT_INPUT 1" >>confdefs.h
f199cab1 15534
5476a9a4
GM
15535 ;;
15536esac
f199cab1 15537
f199cab1 15538
5476a9a4
GM
15539case $opsys in
15540 cygwin|gnu|gnu-linux|gnu-kfreebsd|irix6-5|freebsd|netbsd|openbsd)
f199cab1 15541
5476a9a4 15542$as_echo "#define NARROWPROTO 1" >>confdefs.h
067d23c9 15543
5476a9a4
GM
15544 ;;
15545esac
f199cab1
GM
15546
15547
067d23c9 15548
1f5d53eb
PE
15549
15550
f199cab1 15551
f199cab1 15552
7d2a1c5e 15553
5476a9a4
GM
15554case $opsys in
15555 aix4-2 )
a09508f2 15556 $as_echo "#define PTY_ITERATION int c; for (c = 0; !c ; c++)" >>confdefs.h
f199cab1 15557
a09508f2 15558 $as_echo "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptc\");" >>confdefs.h
f199cab1 15559
a09508f2 15560 $as_echo "#define PTY_TTY_NAME_SPRINTF strcpy (pty_name, ttyname (fd));" >>confdefs.h
7d2a1c5e 15561
5476a9a4 15562 ;;
7d2a1c5e 15563
5476a9a4 15564 cygwin )
a09508f2 15565 $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++)" >>confdefs.h
7d2a1c5e 15566
843f2634 15567 $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 15568
a09508f2 15569 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
7d2a1c5e 15570
a09508f2 15571 $as_echo "#define PTY_TTY_NAME_SPRINTF /**/" >>confdefs.h
f199cab1 15572
5476a9a4 15573 ;;
f199cab1 15574
1146da8d 15575 darwin )
a09508f2 15576 $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++)" >>confdefs.h
7d2a1c5e 15577
5476a9a4 15578 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
7d2a1c5e 15579
a09508f2 15580 $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 15581
a09508f2 15582 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
f199cab1 15583
a09508f2 15584 $as_echo "#define PTY_TTY_NAME_SPRINTF /**/" >>confdefs.h
f199cab1 15585
5476a9a4 15586 ;;
f199cab1 15587
1146da8d 15588 gnu | openbsd )
5476a9a4 15589 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
f199cab1 15590
5476a9a4 15591 ;;
f199cab1 15592
1146da8d 15593 gnu-linux | gnu-kfreebsd | freebsd | netbsd )
5476a9a4 15594 if test "x$ac_cv_func_grantpt" = xyes; then
f199cab1 15595
5476a9a4 15596$as_echo "#define UNIX98_PTYS 1" >>confdefs.h
f199cab1 15597
a09508f2 15598 $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++)" >>confdefs.h
f199cab1 15599
843f2634 15600 $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 15601
1146da8d
GM
15602 if test "x$ac_cv_func_posix_openpt" = xyes; then
15603 $as_echo "#define PTY_OPEN fd = posix_openpt (O_RDWR | O_NOCTTY)" >>confdefs.h
15604
15605 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
15606
15607 elif test "x$ac_cv_func_getpt" = xyes; then
5476a9a4 15608 $as_echo "#define PTY_OPEN fd = getpt ()" >>confdefs.h
f199cab1 15609
a09508f2 15610 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
f199cab1 15611
5476a9a4 15612 else
a09508f2 15613 $as_echo "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptmx\");" >>confdefs.h
f199cab1 15614
5476a9a4
GM
15615 fi
15616 else
15617 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
f199cab1 15618
5476a9a4
GM
15619 fi
15620 ;;
f199cab1 15621
5476a9a4
GM
15622 hpux*)
15623 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
f199cab1 15624
a09508f2 15625 $as_echo "#define PTY_NAME_SPRINTF sprintf (pty_name, \"/dev/ptym/pty%c%x\", c, i);" >>confdefs.h
f199cab1 15626
a09508f2 15627 $as_echo "#define PTY_TTY_NAME_SPRINTF sprintf (pty_name, \"/dev/pty/tty%c%x\", c, i);" >>confdefs.h
f199cab1 15628
5476a9a4 15629 ;;
f199cab1 15630
5476a9a4
GM
15631 irix6-5 )
15632 $as_echo "#define PTY_ITERATION /**/" >>confdefs.h
f199cab1 15633
5476a9a4 15634 $as_echo "#define FIRST_PTY_LETTER 'q'" >>confdefs.h
f199cab1 15635
e4184a20 15636 $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 15637
a09508f2 15638 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
f199cab1 15639
a09508f2 15640 $as_echo "#define PTY_TTY_NAME_SPRINTF /**/" >>confdefs.h
f199cab1 15641
5476a9a4 15642 ;;
f199cab1 15643
5476a9a4 15644 sol2* )
e4184a20 15645 $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 15646
5476a9a4 15647 ;;
f199cab1 15648
5476a9a4 15649 unixware )
e4184a20 15650 $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
15651
15652 ;;
15653esac
15654
15655
15656case $opsys in
15657 sol2* | unixware )
15658 $as_echo "#define FIRST_PTY_LETTER 'z'" >>confdefs.h
15659
a09508f2 15660 $as_echo "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptmx\");" >>confdefs.h
5476a9a4
GM
15661
15662
15663$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
15664
15665 ;;
15666esac
15667
15668
15669
15670
15671case $opsys in
c396a953 15672 aix4-2 | cygwin | gnu | irix6-5 | freebsd | netbsd | openbsd | darwin )
5476a9a4
GM
15673 $as_echo "#define SIGNALS_VIA_CHARACTERS 1" >>confdefs.h
15674
15675 ;;
15676
15677 gnu-linux | gnu-kfreebsd )
15678
15679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signals via characters" >&5
15680$as_echo_n "checking for signals via characters... " >&6; }
15681 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1f5d53eb 15682/* end confdefs.h. */
5476a9a4
GM
15683
15684#include <linux/version.h>
15685#if LINUX_VERSION_CODE < 0x20400
15686# error "Linux version too old"
15687#endif
15688
3e0be4ab
GM
15689int
15690main ()
15691{
f199cab1 15692
3e0be4ab
GM
15693 ;
15694 return 0;
15695}
067d23c9 15696_ACEOF
5476a9a4
GM
15697if ac_fn_c_try_cpp "$LINENO"; then :
15698 emacs_signals_via_chars=yes
1f5d53eb 15699else
5476a9a4 15700 emacs_signals_via_chars=no
067d23c9 15701fi
5476a9a4 15702rm -f conftest.err conftest.$ac_ext
067d23c9 15703
5476a9a4
GM
15704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_signals_via_chars" >&5
15705$as_echo "$emacs_signals_via_chars" >&6; }
15706 test $emacs_signals_via_chars = yes && $as_echo "#define SIGNALS_VIA_CHARACTERS 1" >>confdefs.h
15707
15708 ;;
15709esac
15710
15711
15712
15713
5476a9a4 15714case $opsys in
0f63df79 15715 aix*)
ce9ae7ca 15716 $as_echo "#define DATA_SEG_BITS 0x20000000" >>confdefs.h
0f63df79
GM
15717
15718 ;;
5476a9a4 15719 hpux*)
ce9ae7ca 15720 $as_echo "#define DATA_SEG_BITS 0x40000000" >>confdefs.h
067d23c9 15721
5476a9a4
GM
15722 ;;
15723 irix6-5)
5476a9a4 15724 $as_echo "#define DATA_SEG_BITS 0x10000000" >>confdefs.h
067d23c9 15725
5476a9a4
GM
15726 ;;
15727esac
067d23c9 15728
1f5d53eb 15729
1f5d53eb 15730
067d23c9 15731
5476a9a4
GM
15732case $opsys in
15733 darwin) $as_echo "#define TAB3 OXTABS" >>confdefs.h
15734 ;;
f199cab1 15735
5476a9a4 15736 gnu | freebsd | netbsd | openbsd )
f199cab1 15737
5476a9a4 15738$as_echo "#define TABDLY OXTABS" >>confdefs.h
f199cab1 15739
5476a9a4 15740 $as_echo "#define TAB3 OXTABS" >>confdefs.h
f199cab1 15741
5476a9a4 15742 ;;
f199cab1 15743
5476a9a4 15744 gnu-linux | gnu-kfreebsd )
5476a9a4
GM
15745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15746/* end confdefs.h. */
3e0be4ab 15747
5476a9a4
GM
15748#ifndef __ia64__
15749# error "not ia64"
15750#endif
067d23c9 15751
5476a9a4
GM
15752int
15753main ()
15754{
3e0be4ab 15755
5476a9a4
GM
15756 ;
15757 return 0;
15758}
15759_ACEOF
15760if ac_fn_c_try_cpp "$LINENO"; then :
f199cab1 15761
5476a9a4 15762$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 15763
3e0be4ab 15764fi
5476a9a4
GM
15765rm -f conftest.err conftest.$ac_ext
15766 ;;
067d23c9 15767
5476a9a4 15768 hpux*)
3e0be4ab 15769
5476a9a4 15770$as_echo "#define RUN_TIME_REMAP 1" >>confdefs.h
3e0be4ab 15771
5476a9a4 15772 ;;
5476a9a4 15773esac
3e0be4ab
GM
15774
15775
f199cab1 15776
e700232f
GM
15777
15778
5476a9a4 15779case $opsys in
5476a9a4
GM
15780 gnu-linux | gnu-kfreebsd )
15781 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1fd182f0 15782/* end confdefs.h. */
f199cab1 15783
5476a9a4
GM
15784#if defined __i386__ || defined __sparc__ || defined __mc68000__ \
15785 || defined __alpha__ || defined __mips__ || defined __s390__ \
15786 || defined __arm__ || defined __powerpc__ || defined __amd64__ \
15787 || defined __ia64__ || defined __sh__
15788/* ok */
15789#else
15790# error "setjmp not known to work on this arch"
15791#endif
15792
f199cab1
GM
15793int
15794main ()
1fd182f0 15795{
5476a9a4 15796
f199cab1
GM
15797 ;
15798 return 0;
1fd182f0
PE
15799}
15800_ACEOF
5476a9a4
GM
15801if ac_fn_c_try_cpp "$LINENO"; then :
15802 $as_echo "#define GC_SETJMP_WORKS 1" >>confdefs.h
f199cab1 15803
1f5d53eb 15804fi
5476a9a4
GM
15805rm -f conftest.err conftest.$ac_ext
15806 ;;
15807esac
1fd182f0 15808
f199cab1 15809
5476a9a4
GM
15810if test x$GCC = xyes; then
15811 $as_echo "#define GC_SETJMP_WORKS 1" >>confdefs.h
15812
1fd182f0 15813else
5476a9a4
GM
15814 case $opsys in
15815 freebsd | netbsd | openbsd | irix6-5 | sol2* )
15816 $as_echo "#define GC_SETJMP_WORKS 1" >>confdefs.h
1fd182f0 15817
5476a9a4
GM
15818 ;;
15819 esac
15820fi
6ec9a5a7
GM
15821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _setjmp" >&5
15822$as_echo_n "checking for _setjmp... " >&6; }
15823if test "${emacs_cv_func__setjmp+set}" = set; then :
15824 $as_echo_n "(cached) " >&6
15825else
15826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15827/* end confdefs.h. */
15828#include <setjmp.h>
1fd182f0 15829
6ec9a5a7
GM
15830int
15831main ()
15832{
15833jmp_buf j;
15834 if (! _setjmp (j))
15835 _longjmp (j, 1);
15836 ;
15837 return 0;
15838}
15839_ACEOF
15840if ac_fn_c_try_link "$LINENO"; then :
15841 emacs_cv_func__setjmp=yes
15842else
15843 emacs_cv_func__setjmp=no
15844fi
15845rm -f core conftest.err conftest.$ac_objext \
15846 conftest$ac_exeext conftest.$ac_ext
15847fi
15848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_func__setjmp" >&5
15849$as_echo "$emacs_cv_func__setjmp" >&6; }
e2d8f316 15850if test $emacs_cv_func__setjmp = yes; then
906debc3 15851
e2d8f316 15852$as_echo "#define HAVE__SETJMP 1" >>confdefs.h
906debc3 15853
e2d8f316
GM
15854else
15855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
15856$as_echo_n "checking for sigsetjmp... " >&6; }
15857if test "${emacs_cv_func_sigsetjmp+set}" = set; then :
15858 $as_echo_n "(cached) " >&6
15859else
15860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15861/* end confdefs.h. */
15862#include <setjmp.h>
15863
15864int
15865main ()
15866{
15867sigjmp_buf j;
15868 if (! sigsetjmp (j, 1))
15869 siglongjmp (j, 1);
15870 ;
15871 return 0;
15872}
15873_ACEOF
15874if ac_fn_c_try_link "$LINENO"; then :
15875 emacs_cv_func_sigsetjmp=yes
15876else
15877 emacs_cv_func_sigsetjmp=no
15878fi
15879rm -f core conftest.err conftest.$ac_objext \
15880 conftest$ac_exeext conftest.$ac_ext
15881fi
15882{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_func_sigsetjmp" >&5
15883$as_echo "$emacs_cv_func_sigsetjmp" >&6; }
15884 if test $emacs_cv_func_sigsetjmp = yes; then
906debc3 15885
e2d8f316 15886$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
906debc3 15887
e2d8f316 15888 fi
6ec9a5a7
GM
15889fi
15890
15891case $opsys in
15892 sol2* | unixware )
906debc3
GM
15893
15894$as_echo "#define TIOCSIGSEND TIOCSIGNAL" >>confdefs.h
15895
15896 ;;
15897esac
15898
906debc3 15899
5476a9a4
GM
15900case $opsys in
15901 hpux* | sol2* )
1f5d53eb 15902
5476a9a4 15903$as_echo "#define XOS_NEEDS_TIME_H 1" >>confdefs.h
1f5d53eb 15904
5476a9a4
GM
15905 ;;
15906esac
1f5d53eb 15907
1f5d53eb 15908
4fda9c95 15909
3e0be4ab 15910
4fda9c95 15911
4fda9c95 15912
f199cab1 15913
906debc3 15914
7cd2ed2c 15915
5476a9a4
GM
15916case $opsys in
15917 aix4-2)
15918 $as_echo "#define USG /**/" >>confdefs.h
15919
15920 $as_echo "#define USG5 /**/" >>confdefs.h
15921
15922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15923/* end confdefs.h. */
15924
15925#ifndef _AIX
15926# error "_AIX not defined"
15927#endif
f199cab1 15928
4fda9c95
GM
15929int
15930main ()
15931{
3e0be4ab 15932
4fda9c95
GM
15933 ;
15934 return 0;
15935}
15936_ACEOF
5476a9a4 15937if ac_fn_c_try_cpp "$LINENO"; then :
4fda9c95 15938
3e0be4ab 15939else
4fda9c95 15940
5476a9a4 15941$as_echo "#define _AIX /**/" >>confdefs.h
3e0be4ab 15942
5476a9a4
GM
15943fi
15944rm -f conftest.err conftest.$ac_ext
15945 ;;
4fda9c95 15946
5476a9a4 15947 cygwin)
3e0be4ab 15948
5476a9a4 15949$as_echo "#define CYGWIN 1" >>confdefs.h
f199cab1 15950
5476a9a4 15951 ;;
f199cab1 15952
5476a9a4 15953 darwin)
b0a49335 15954 $as_echo "#define BSD_SYSTEM /**/" >>confdefs.h
f199cab1
GM
15955
15956
5476a9a4 15957$as_echo "#define DARWIN_OS /**/" >>confdefs.h
f199cab1 15958
5476a9a4 15959 ;;
4fda9c95 15960
5476a9a4 15961 freebsd)
4fda9c95 15962
5476a9a4 15963$as_echo "#define BSD_SYSTEM_AHB 1" >>confdefs.h
4fda9c95 15964
5476a9a4 15965 ;;
f199cab1 15966
5476a9a4 15967 gnu | netbsd | openbsd )
5476a9a4
GM
15968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15969/* end confdefs.h. */
f199cab1 15970
5476a9a4
GM
15971#ifndef BSD_SYSTEM
15972# error "BSD_SYSTEM not defined"
15973#endif
f199cab1 15974
5476a9a4
GM
15975int
15976main ()
15977{
f199cab1 15978
5476a9a4
GM
15979 ;
15980 return 0;
15981}
f199cab1 15982_ACEOF
5476a9a4 15983if ac_fn_c_try_cpp "$LINENO"; then :
4fda9c95 15984
3e0be4ab 15985else
5476a9a4 15986 $as_echo "#define BSD_SYSTEM 43" >>confdefs.h
4fda9c95 15987
5476a9a4
GM
15988fi
15989rm -f conftest.err conftest.$ac_ext
15990 ;;
4fda9c95 15991
5476a9a4
GM
15992 gnu-linux | gnu-kfreebsd )
15993 $as_echo "#define USG /**/" >>confdefs.h
4fda9c95 15994
f199cab1 15995
5476a9a4 15996$as_echo "#define GNU_LINUX /**/" >>confdefs.h
4fda9c95 15997
5476a9a4 15998 ;;
4fda9c95 15999
5476a9a4
GM
16000 hpux*)
16001 $as_echo "#define USG /**/" >>confdefs.h
4fda9c95 16002
5476a9a4 16003 $as_echo "#define USG5 /**/" >>confdefs.h
697210c4 16004
4717915f 16005
5476a9a4 16006$as_echo "#define HPUX /**/" >>confdefs.h
697210c4 16007
5476a9a4 16008 ;;
697210c4 16009
5476a9a4
GM
16010 irix6-5)
16011 $as_echo "#define USG /**/" >>confdefs.h
f199cab1 16012
5476a9a4 16013 $as_echo "#define USG5 /**/" >>confdefs.h
f199cab1 16014
906debc3
GM
16015 $as_echo "#define USG5_4 /**/" >>confdefs.h
16016
f199cab1 16017
5476a9a4 16018$as_echo "#define IRIX6_5 /**/" >>confdefs.h
f199cab1 16019
5476a9a4 16020 ;;
f199cab1 16021
5476a9a4
GM
16022 sol2*)
16023 $as_echo "#define USG /**/" >>confdefs.h
4fda9c95 16024
5476a9a4 16025 $as_echo "#define USG5 /**/" >>confdefs.h
4fda9c95 16026
906debc3
GM
16027 $as_echo "#define USG5_4 /**/" >>confdefs.h
16028
4fda9c95 16029
5476a9a4 16030$as_echo "#define SOLARIS2 /**/" >>confdefs.h
f199cab1 16031
5476a9a4 16032 ;;
f199cab1 16033
5476a9a4
GM
16034 unixware)
16035 $as_echo "#define USG /**/" >>confdefs.h
f199cab1 16036
5476a9a4 16037 $as_echo "#define USG5 /**/" >>confdefs.h
f199cab1 16038
906debc3
GM
16039 $as_echo "#define USG5_4 /**/" >>confdefs.h
16040
5476a9a4
GM
16041 ;;
16042esac
f199cab1 16043
4fa92495
GM
16044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable FIONREAD" >&5
16045$as_echo_n "checking for usable FIONREAD... " >&6; }
16046if test "${emacs_cv_usable_FIONREAD+set}" = set; then :
16047 $as_echo_n "(cached) " >&6
16048else
16049 case $opsys in
16050 aix4-2)
16051 emacs_cv_usable_FIONREAD=no
16052 ;;
16053
16054 *)
16055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16056/* end confdefs.h. */
16057#include <sys/types.h>
16058 #include <sys/ioctl.h>
16059 #ifdef USG5_4
16060 # include <sys/filio.h>
16061 #endif
16062
16063int
16064main ()
16065{
16066int foo = ioctl (0, FIONREAD, &foo);
16067 ;
16068 return 0;
16069}
16070_ACEOF
16071if ac_fn_c_try_compile "$LINENO"; then :
16072 emacs_cv_usable_FIONREAD=yes
16073else
16074 emacs_cv_usable_FIONREAD=no
16075fi
16076rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16077 ;;
16078 esac
16079fi
16080{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_usable_FIONREAD" >&5
16081$as_echo "$emacs_cv_usable_FIONREAD" >&6; }
16082if test $emacs_cv_usable_FIONREAD = yes; then
16083
16084$as_echo "#define USABLE_FIONREAD 1" >>confdefs.h
16085
16086
16087 if test $emacs_broken_SIGIO = no; then
16088 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable SIGIO" >&5
16089$as_echo_n "checking for usable SIGIO... " >&6; }
16090if test "${emacs_cv_usable_SIGIO+set}" = set; then :
16091 $as_echo_n "(cached) " >&6
16092else
16093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16094/* end confdefs.h. */
16095#include <fcntl.h>
16096 #include <signal.h>
16097
16098int
16099main ()
16100{
16101int foo = SIGIO | F_SETFL | FASYNC;
16102 ;
16103 return 0;
16104}
16105_ACEOF
16106if ac_fn_c_try_compile "$LINENO"; then :
16107 emacs_cv_usable_SIGIO=yes
16108else
16109 emacs_cv_usable_SIGIO=no
16110fi
16111rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16112fi
16113{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_usable_SIGIO" >&5
16114$as_echo "$emacs_cv_usable_SIGIO" >&6; }
16115 if test $emacs_cv_usable_SIGIO = yes; then
16116
16117$as_echo "#define USABLE_SIGIO 1" >>confdefs.h
16118
16119 fi
16120 fi
16121fi
16122
4fda9c95 16123
5476a9a4
GM
16124case $opsys in
16125 cygwin)
4fda9c95 16126
5476a9a4 16127$as_echo "#define G_SLICE_ALWAYS_MALLOC 1" >>confdefs.h
4fda9c95 16128
5476a9a4 16129 ;;
4fda9c95 16130
5476a9a4 16131 hpux11)
f199cab1 16132
5476a9a4 16133$as_echo "#define USG_SUBTTY_WORKS 1" >>confdefs.h
f199cab1 16134
5476a9a4 16135 ;;
f199cab1 16136
5476a9a4 16137 irix6-5)
f199cab1 16138
5476a9a4 16139$as_echo "#define PREFER_VSUSP 1" >>confdefs.h
f199cab1 16140
5476a9a4 16141 ;;
f199cab1 16142
5476a9a4 16143 sol2-10)
f199cab1 16144
5476a9a4 16145$as_echo "#define _STRUCTURED_PROC 1" >>confdefs.h
f199cab1 16146
5476a9a4
GM
16147 ;;
16148esac
f199cab1 16149
5476a9a4
GM
16150# Set up the CFLAGS for real compilation, so we can substitute it.
16151CFLAGS="$REAL_CFLAGS"
16152CPPFLAGS="$REAL_CPPFLAGS"
f199cab1 16153
5476a9a4
GM
16154## Hack to detect a buggy GCC version.
16155if test "x$GCC" = xyes \
16156 && test x"`$CC --version 2> /dev/null | grep 'gcc.* 4.5.0'`" != x \
16157 && test x"`echo $CFLAGS | grep '\-O[23]'`" != x \
16158 && test x"`echo $CFLAGS | grep '\-fno-optimize-sibling-calls'`" = x; then
16159 as_fn_error "GCC 4.5.0 has problems compiling Emacs; see etc/PROBLEMS'." "$LINENO" 5
16160fi
f199cab1 16161
5476a9a4 16162version=$PACKAGE_VERSION
f199cab1 16163
0778f6f0 16164copyright="Copyright (C) 2013 Free Software Foundation, Inc."
bb7dce39
GM
16165
16166cat >>confdefs.h <<_ACEOF
16167#define COPYRIGHT "$copyright"
16168_ACEOF
16169
16170
16171
5476a9a4
GM
16172### Specify what sort of things we'll be editing into Makefile and config.h.
16173### Use configuration here uncanonicalized to avoid exceeding size limits.
4fda9c95 16174
f199cab1 16175
5476a9a4 16176## Unused?
4fda9c95
GM
16177
16178
16179
16180
4717915f 16181
4717915f 16182
4717915f 16183
4717915f 16184
4717915f 16185
4717915f 16186
4717915f 16187
4717915f 16188
4717915f 16189
4717915f 16190
4717915f 16191
4717915f
GM
16192
16193
4717915f
GM
16194
16195
4717915f 16196
4717915f 16197
4717915f 16198
5476a9a4
GM
16199## FIXME? Nothing uses @LD_SWITCH_X_SITE@.
16200## src/Makefile.in did add LD_SWITCH_X_SITE (as a cpp define) to the
16201## end of LIBX_BASE, but nothing ever set it.
4717915f 16202
4717915f 16203
4fda9c95 16204
4fda9c95 16205
5476a9a4
GM
16206## Used in lwlib/Makefile.in.
16207
4fda9c95 16208
4fda9c95 16209
4fda9c95
GM
16210
16211
16212
16213
4fda9c95 16214
42dcba54
GM
16215if test -n "${term_header}"; then
16216
16217cat >>confdefs.h <<_ACEOF
16218#define TERM_HEADER "${term_header}"
16219_ACEOF
16220
16221fi
16222
4fda9c95 16223
5476a9a4
GM
16224cat >>confdefs.h <<_ACEOF
16225#define EMACS_CONFIGURATION "${canonical}"
16226_ACEOF
4fda9c95 16227
1e8a045a 16228emacs_config_options=`echo "$emacs_config_options " | sed -e 's/--no-create //' -e 's/--no-recursion //' -e 's/ *$//' -e "s/\"/'/g"`
4fda9c95 16229
5476a9a4 16230cat >>confdefs.h <<_ACEOF
e25a10b7 16231#define EMACS_CONFIG_OPTIONS "${emacs_config_options}"
5476a9a4
GM
16232_ACEOF
16233
5476a9a4 16234
4fda9c95 16235
5476a9a4
GM
16236XMENU_OBJ=
16237XOBJ=
16238FONT_OBJ=
16239if test "${HAVE_X_WINDOWS}" = "yes" ; then
16240
16241$as_echo "#define HAVE_X_WINDOWS 1" >>confdefs.h
4fda9c95 16242
5476a9a4 16243 XMENU_OBJ=xmenu.o
42dcba54 16244 XOBJ="xterm.o xfns.o xselect.o xrdb.o xsmfns.o xsettings.o xgselect.o"
5476a9a4
GM
16245 FONT_OBJ=xfont.o
16246 if test "$HAVE_XFT" = "yes"; then
16247 FONT_OBJ="$FONT_OBJ ftfont.o xftfont.o ftxfont.o"
16248 elif test "$HAVE_FREETYPE" = "yes"; then
16249 FONT_OBJ="$FONT_OBJ ftfont.o ftxfont.o"
16250 fi
4fda9c95 16251
f199cab1 16252fi
4fda9c95 16253
4fda9c95 16254
4fda9c95 16255
4fda9c95 16256
5476a9a4
GM
16257WIDGET_OBJ=
16258MOTIF_LIBW=
16259if test "${USE_X_TOOLKIT}" != "none" ; then
16260 WIDGET_OBJ=widget.o
16261
16262$as_echo "#define USE_X_TOOLKIT 1" >>confdefs.h
16263
16264 if test "${USE_X_TOOLKIT}" = "LUCID"; then
16265
16266$as_echo "#define USE_LUCID 1" >>confdefs.h
e1939eb1 16267
5476a9a4 16268 elif test "${USE_X_TOOLKIT}" = "MOTIF"; then
4fda9c95 16269
5476a9a4 16270$as_echo "#define USE_MOTIF 1" >>confdefs.h
3e0be4ab 16271
5476a9a4
GM
16272 MOTIF_LIBW=-lXm
16273 case "$opsys" in
16274 gnu-linux)
16275 ## Paul Abrahams <abrahams at equinox.shaysnet.com> says this is needed.
16276 MOTIF_LIBW="$MOTIF_LIBW -lXpm"
16277 ;;
3e0be4ab 16278
5476a9a4
GM
16279 unixware)
16280 ## Richard Anthony Ryan <ryanr at ellingtn.ftc.nrcs.usda.gov>
16281 ## says -lXimp is needed in UNIX_SV ... 4.2 1.1.2.
16282 MOTIF_LIBW="MOTIF_LIBW -lXimp"
16283 ;;
3e0be4ab 16284
5476a9a4
GM
16285 aix4-2)
16286 ## olson@mcs.anl.gov says -li18n is needed by -lXm.
16287 MOTIF_LIBW="$MOTIF_LIBW -li18n"
16288 ;;
16289 esac
16290 MOTIF_LIBW="$MOTIF_LIBW $LIBXP"
16291 fi
16292fi
4fda9c95 16293
3e0be4ab 16294
5476a9a4
GM
16295TOOLKIT_LIBW=
16296case "$USE_X_TOOLKIT" in
16297 MOTIF) TOOLKIT_LIBW="$MOTIF_LIBW" ;;
16298 LUCID) TOOLKIT_LIBW="$LUCID_LIBW" ;;
16299 none) test "x$HAVE_GTK" = "xyes" && TOOLKIT_LIBW="$GTK_LIBS" ;;
16300esac
4fda9c95
GM
16301
16302
5476a9a4
GM
16303if test "$USE_X_TOOLKIT" = "none"; then
16304 LIBXT_OTHER="\$(LIBXSM)"
16305 OLDXMENU_TARGET="really-oldXMenu"
16306else
16307 LIBXT_OTHER="\$(LIBXMU) -lXt \$(LIBXTR6) -lXext"
16308 OLDXMENU_TARGET="really-lwlib"
16309fi
4fda9c95
GM
16310
16311
5476a9a4
GM
16312## The X Menu stuff is present in the X10 distribution, but missing
16313## from X11. If we have X10, just use the installed library;
16314## otherwise, use our own copy.
16315if test "${HAVE_X11}" = "yes" ; then
4fda9c95 16316
5476a9a4 16317$as_echo "#define HAVE_X11 1" >>confdefs.h
4fda9c95 16318
4fda9c95 16319
5476a9a4
GM
16320 if test "$USE_X_TOOLKIT" = "none"; then
16321 OLDXMENU="\${oldXMenudir}/libXMenu11.a"
16322 else
16323 OLDXMENU="\${lwlibdir}/liblw.a"
16324 fi
16325 LIBXMENU="\$(OLDXMENU)"
16326 LIBX_OTHER="\$(LIBXT) \$(LIBX_EXTRA)"
16327 OLDXMENU_DEPS="\${OLDXMENU} ../src/\${OLDXMENU}"
f199cab1 16328else
5476a9a4
GM
16329 ## For a syntactically valid Makefile; not actually used for anything.
16330 ## See comments in src/Makefile.in.
16331 OLDXMENU=nothing
16332 ## FIXME This case (!HAVE_X11 && HAVE_X_WINDOWS) is no longer possible(?).
16333 if test "${HAVE_X_WINDOWS}" = "yes"; then
16334 LIBXMENU="-lXMenu"
16335 else
16336 LIBXMENU=
16337 fi
16338 LIBX_OTHER=
16339 OLDXMENU_DEPS=
16340fi
4fda9c95 16341
5476a9a4
GM
16342if test "$HAVE_GTK" = "yes" || test "$HAVE_MENUS" != "yes"; then
16343 OLDXMENU_TARGET=
16344 OLDXMENU=nothing
16345 LIBXMENU=
16346 OLDXMENU_DEPS=
16347fi
4fda9c95 16348
4fda9c95
GM
16349
16350
3e0be4ab 16351
4fda9c95 16352
3e0be4ab 16353
3e0be4ab 16354
5476a9a4 16355if test "${HAVE_MENUS}" = "yes" ; then
3e0be4ab 16356
5476a9a4 16357$as_echo "#define HAVE_MENUS 1" >>confdefs.h
4fda9c95 16358
5476a9a4 16359fi
4fda9c95 16360
5476a9a4 16361if test "${GNU_MALLOC}" = "yes" ; then
4fda9c95 16362
5476a9a4 16363$as_echo "#define GNU_MALLOC 1" >>confdefs.h
4fda9c95 16364
5476a9a4 16365fi
3e0be4ab 16366
5476a9a4
GM
16367RALLOC_OBJ=
16368if test "${REL_ALLOC}" = "yes" ; then
16369
16370$as_echo "#define REL_ALLOC 1" >>confdefs.h
4fda9c95
GM
16371
16372
5476a9a4
GM
16373 test "$system_malloc" != "yes" && RALLOC_OBJ=ralloc.o
16374fi
4fda9c95 16375
4fda9c95 16376
5476a9a4 16377if test "$opsys" = "cygwin"; then
5c0255d9 16378 CYGWIN_OBJ="sheap.o cygw32.o"
5476a9a4
GM
16379 ## Cygwin differs because of its unexec().
16380 PRE_ALLOC_OBJ=
16381 POST_ALLOC_OBJ=lastfile.o
16382else
16383 CYGWIN_OBJ=
16384 PRE_ALLOC_OBJ=lastfile.o
16385 POST_ALLOC_OBJ=
16386fi
4fda9c95 16387
3e0be4ab 16388
3e0be4ab 16389
3e0be4ab 16390
5476a9a4
GM
16391# Configure gnulib. Although this does not affect CFLAGS or LIBS permanently.
16392# it temporarily reverts them to their pre-pkg-config values,
16393# because gnulib needs to work with both src (which uses the
16394# pkg-config stuff) and lib-src (which does not). For example, gnulib
16395# may need to determine whether LIB_CLOCK_GETTIME should contain -lrt,
16396# and it therefore needs to run in an environment where LIBS does not
16397# already contain -lrt merely because 'pkg-config --libs' printed '-lrt'
16398# for some package unrelated to lib-src.
16399SAVE_CFLAGS=$CFLAGS
16400SAVE_LIBS=$LIBS
16401CFLAGS=$pre_PKG_CONFIG_CFLAGS
16402LIBS="$LIB_PTHREAD $pre_PKG_CONFIG_LIBS"
3e0be4ab 16403
3e0be4ab
GM
16404
16405
4fda9c95 16406
4fda9c95 16407
3e0be4ab 16408
3e0be4ab
GM
16409
16410
4fda9c95 16411
3e0be4ab
GM
16412
16413
5476a9a4
GM
16414 LIBC_FATAL_STDERR_=1
16415 export LIBC_FATAL_STDERR_
3e0be4ab 16416
5476a9a4
GM
16417# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
16418# for constant arguments. Useless!
16419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
16420$as_echo_n "checking for working alloca.h... " >&6; }
16421if test "${ac_cv_working_alloca_h+set}" = set; then :
16422 $as_echo_n "(cached) " >&6
16423else
16424 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16425/* end confdefs.h. */
16426#include <alloca.h>
16427int
16428main ()
16429{
16430char *p = (char *) alloca (2 * sizeof (int));
16431 if (p) return 0;
16432 ;
16433 return 0;
16434}
16435_ACEOF
16436if ac_fn_c_try_link "$LINENO"; then :
16437 ac_cv_working_alloca_h=yes
16438else
16439 ac_cv_working_alloca_h=no
16440fi
16441rm -f core conftest.err conftest.$ac_objext \
16442 conftest$ac_exeext conftest.$ac_ext
16443fi
16444{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
16445$as_echo "$ac_cv_working_alloca_h" >&6; }
16446if test $ac_cv_working_alloca_h = yes; then
3e0be4ab 16447
5476a9a4 16448$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
3e0be4ab 16449
5476a9a4 16450fi
3e0be4ab 16451
5476a9a4
GM
16452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
16453$as_echo_n "checking for alloca... " >&6; }
16454if test "${ac_cv_func_alloca_works+set}" = set; then :
f199cab1
GM
16455 $as_echo_n "(cached) " >&6
16456else
5476a9a4 16457 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 16458/* end confdefs.h. */
5476a9a4
GM
16459#ifdef __GNUC__
16460# define alloca __builtin_alloca
16461#else
16462# ifdef _MSC_VER
16463# include <malloc.h>
16464# define alloca _alloca
16465# else
16466# ifdef HAVE_ALLOCA_H
16467# include <alloca.h>
16468# else
16469# ifdef _AIX
16470 #pragma alloca
16471# else
16472# ifndef alloca /* predefined by HP cc +Olibcalls */
16473char *alloca ();
16474# endif
16475# endif
16476# endif
16477# endif
16478#endif
16479
16480int
16481main ()
16482{
16483char *p = (char *) alloca (1);
16484 if (p) return 0;
16485 ;
16486 return 0;
16487}
16488_ACEOF
16489if ac_fn_c_try_link "$LINENO"; then :
16490 ac_cv_func_alloca_works=yes
16491else
16492 ac_cv_func_alloca_works=no
16493fi
16494rm -f core conftest.err conftest.$ac_objext \
16495 conftest$ac_exeext conftest.$ac_ext
16496fi
16497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
16498$as_echo "$ac_cv_func_alloca_works" >&6; }
16499
16500if test $ac_cv_func_alloca_works = yes; then
16501
16502$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
16503
16504else
16505 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
16506# that cause trouble. Some versions do not even contain alloca or
16507# contain a buggy version. If you still want to use their alloca,
16508# use ar to extract alloca.o from them instead of compiling alloca.c.
3e0be4ab 16509
4fda9c95 16510
4fda9c95 16511
4fda9c95
GM
16512
16513
5476a9a4 16514ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
4fda9c95 16515
5476a9a4 16516$as_echo "#define C_ALLOCA 1" >>confdefs.h
4fda9c95 16517
4fda9c95 16518
5476a9a4
GM
16519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether 'alloca.c' needs Cray hooks" >&5
16520$as_echo_n "checking whether 'alloca.c' needs Cray hooks... " >&6; }
16521if test "${ac_cv_os_cray+set}" = set; then :
16522 $as_echo_n "(cached) " >&6
16523else
16524 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16525/* end confdefs.h. */
16526#if defined CRAY && ! defined CRAY2
16527webecray
16528#else
16529wenotbecray
16530#endif
4fda9c95 16531
5476a9a4
GM
16532_ACEOF
16533if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16534 $EGREP "webecray" >/dev/null 2>&1; then :
16535 ac_cv_os_cray=yes
16536else
16537 ac_cv_os_cray=no
16538fi
16539rm -f conftest*
4fda9c95 16540
5476a9a4
GM
16541fi
16542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
16543$as_echo "$ac_cv_os_cray" >&6; }
16544if test $ac_cv_os_cray = yes; then
16545 for ac_func in _getb67 GETB67 getb67; do
16546 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16547ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16548eval as_val=\$$as_ac_var
16549 if test "x$as_val" = x""yes; then :
4fda9c95 16550
5476a9a4
GM
16551cat >>confdefs.h <<_ACEOF
16552#define CRAY_STACKSEG_END $ac_func
16553_ACEOF
4fda9c95 16554
5476a9a4
GM
16555 break
16556fi
4fda9c95 16557
5476a9a4
GM
16558 done
16559fi
4fda9c95 16560
5476a9a4
GM
16561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
16562$as_echo_n "checking stack direction for C alloca... " >&6; }
16563if test "${ac_cv_c_stack_direction+set}" = set; then :
16564 $as_echo_n "(cached) " >&6
16565else
16566 if test "$cross_compiling" = yes; then :
16567 ac_cv_c_stack_direction=0
16568else
16569 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16570/* end confdefs.h. */
16571$ac_includes_default
16572int
16573find_stack_direction (int *addr, int depth)
16574{
16575 int dir, dummy = 0;
16576 if (! addr)
16577 addr = &dummy;
16578 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
16579 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
16580 return dir + dummy;
16581}
4fda9c95 16582
5476a9a4
GM
16583int
16584main (int argc, char **argv)
16585{
16586 return find_stack_direction (0, argc + !argv + 20) < 0;
16587}
16588_ACEOF
16589if ac_fn_c_try_run "$LINENO"; then :
16590 ac_cv_c_stack_direction=1
16591else
16592 ac_cv_c_stack_direction=-1
16593fi
16594rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16595 conftest.$ac_objext conftest.beam conftest.$ac_ext
16596fi
4fda9c95 16597
5476a9a4
GM
16598fi
16599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
16600$as_echo "$ac_cv_c_stack_direction" >&6; }
16601cat >>confdefs.h <<_ACEOF
16602#define STACK_DIRECTION $ac_cv_c_stack_direction
16603_ACEOF
3e0be4ab
GM
16604
16605
5476a9a4 16606fi
3e0be4ab
GM
16607
16608
16609
16610
5476a9a4
GM
16611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
16612$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
16613if test "${ac_cv_c_bigendian+set}" = set; then :
16614 $as_echo_n "(cached) " >&6
16615else
16616 ac_cv_c_bigendian=unknown
16617 # See if we're dealing with a universal compiler.
16618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16619/* end confdefs.h. */
16620#ifndef __APPLE_CC__
16621 not a universal capable compiler
16622 #endif
16623 typedef int dummy;
16624
16625_ACEOF
16626if ac_fn_c_try_compile "$LINENO"; then :
3e0be4ab 16627
5476a9a4
GM
16628 # Check for potential -arch flags. It is not universal unless
16629 # there are at least two -arch flags with different values.
16630 ac_arch=
16631 ac_prev=
16632 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
16633 if test -n "$ac_prev"; then
16634 case $ac_word in
16635 i?86 | x86_64 | ppc | ppc64)
16636 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
16637 ac_arch=$ac_word
16638 else
16639 ac_cv_c_bigendian=universal
16640 break
16641 fi
16642 ;;
16643 esac
16644 ac_prev=
16645 elif test "x$ac_word" = "x-arch"; then
16646 ac_prev=arch
16647 fi
16648 done
16649fi
16650rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16651 if test $ac_cv_c_bigendian = unknown; then
16652 # See if sys/param.h defines the BYTE_ORDER macro.
16653 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16654/* end confdefs.h. */
16655#include <sys/types.h>
16656 #include <sys/param.h>
3e0be4ab 16657
5476a9a4
GM
16658int
16659main ()
16660{
16661#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
16662 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
16663 && LITTLE_ENDIAN)
16664 bogus endian macros
16665 #endif
3e0be4ab 16666
5476a9a4
GM
16667 ;
16668 return 0;
16669}
16670_ACEOF
16671if ac_fn_c_try_compile "$LINENO"; then :
16672 # It does; now see whether it defined to BIG_ENDIAN or not.
16673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16674/* end confdefs.h. */
16675#include <sys/types.h>
16676 #include <sys/param.h>
369e19fc 16677
5476a9a4
GM
16678int
16679main ()
16680{
16681#if BYTE_ORDER != BIG_ENDIAN
16682 not big endian
16683 #endif
3e0be4ab 16684
5476a9a4
GM
16685 ;
16686 return 0;
16687}
16688_ACEOF
16689if ac_fn_c_try_compile "$LINENO"; then :
16690 ac_cv_c_bigendian=yes
16691else
16692 ac_cv_c_bigendian=no
16693fi
16694rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16695fi
16696rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16697 fi
16698 if test $ac_cv_c_bigendian = unknown; then
16699 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
16700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16701/* end confdefs.h. */
16702#include <limits.h>
4fda9c95 16703
5476a9a4
GM
16704int
16705main ()
16706{
16707#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
16708 bogus endian macros
16709 #endif
4fda9c95 16710
5476a9a4
GM
16711 ;
16712 return 0;
16713}
16714_ACEOF
16715if ac_fn_c_try_compile "$LINENO"; then :
16716 # It does; now see whether it defined to _BIG_ENDIAN or not.
16717 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16718/* end confdefs.h. */
16719#include <limits.h>
4fda9c95 16720
5476a9a4
GM
16721int
16722main ()
16723{
16724#ifndef _BIG_ENDIAN
16725 not big endian
16726 #endif
f199cab1 16727
5476a9a4
GM
16728 ;
16729 return 0;
16730}
16731_ACEOF
16732if ac_fn_c_try_compile "$LINENO"; then :
16733 ac_cv_c_bigendian=yes
f199cab1 16734else
5476a9a4
GM
16735 ac_cv_c_bigendian=no
16736fi
16737rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16738fi
16739rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16740 fi
16741 if test $ac_cv_c_bigendian = unknown; then
16742 # Compile a test program.
16743 if test "$cross_compiling" = yes; then :
16744 # Try to guess by grepping values from an object file.
16745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16746/* end confdefs.h. */
16747short int ascii_mm[] =
16748 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
16749 short int ascii_ii[] =
16750 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
16751 int use_ascii (int i) {
16752 return ascii_mm[i] + ascii_ii[i];
16753 }
16754 short int ebcdic_ii[] =
16755 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
16756 short int ebcdic_mm[] =
16757 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
16758 int use_ebcdic (int i) {
16759 return ebcdic_mm[i] + ebcdic_ii[i];
16760 }
16761 extern int foo;
f199cab1 16762
5476a9a4
GM
16763int
16764main ()
16765{
16766return use_ascii (foo) == use_ebcdic (foo);
16767 ;
16768 return 0;
16769}
16770_ACEOF
16771if ac_fn_c_try_compile "$LINENO"; then :
16772 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
16773 ac_cv_c_bigendian=yes
16774 fi
16775 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
16776 if test "$ac_cv_c_bigendian" = unknown; then
16777 ac_cv_c_bigendian=no
16778 else
16779 # finding both strings is unlikely to happen, but who knows?
16780 ac_cv_c_bigendian=unknown
16781 fi
16782 fi
16783fi
16784rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4fda9c95 16785else
3e0be4ab 16786 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4fda9c95 16787/* end confdefs.h. */
5476a9a4
GM
16788$ac_includes_default
16789int
16790main ()
4fda9c95 16791{
5476a9a4
GM
16792
16793 /* Are we little or big endian? From Harbison&Steele. */
16794 union
16795 {
16796 long int l;
16797 char c[sizeof (long int)];
16798 } u;
16799 u.l = 1;
16800 return u.c[sizeof (long int) - 1] == 1;
16801
16802 ;
4fda9c95
GM
16803 return 0;
16804}
16805_ACEOF
f199cab1 16806if ac_fn_c_try_run "$LINENO"; then :
5476a9a4 16807 ac_cv_c_bigendian=no
3e0be4ab 16808else
5476a9a4 16809 ac_cv_c_bigendian=yes
4fda9c95 16810fi
f199cab1
GM
16811rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16812 conftest.$ac_objext conftest.beam conftest.$ac_ext
4fda9c95 16813fi
4fda9c95 16814
5476a9a4 16815 fi
f199cab1 16816fi
5476a9a4
GM
16817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
16818$as_echo "$ac_cv_c_bigendian" >&6; }
16819 case $ac_cv_c_bigendian in #(
16820 yes)
16821 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
16822;; #(
16823 no)
16824 ;; #(
16825 universal)
3e0be4ab 16826
5476a9a4 16827$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
3e0be4ab 16828
5476a9a4
GM
16829 ;; #(
16830 *)
16831 as_fn_error "unknown endianness
16832 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
16833 esac
4fda9c95 16834
4fda9c95 16835
da6c8463 16836
5476a9a4
GM
16837 GNULIB_CHDIR=0;
16838 GNULIB_CHOWN=0;
16839 GNULIB_CLOSE=0;
16840 GNULIB_DUP=0;
16841 GNULIB_DUP2=0;
16842 GNULIB_DUP3=0;
16843 GNULIB_ENVIRON=0;
16844 GNULIB_EUIDACCESS=0;
16845 GNULIB_FACCESSAT=0;
16846 GNULIB_FCHDIR=0;
16847 GNULIB_FCHOWNAT=0;
16848 GNULIB_FDATASYNC=0;
16849 GNULIB_FSYNC=0;
16850 GNULIB_FTRUNCATE=0;
16851 GNULIB_GETCWD=0;
16852 GNULIB_GETDOMAINNAME=0;
16853 GNULIB_GETDTABLESIZE=0;
16854 GNULIB_GETGROUPS=0;
16855 GNULIB_GETHOSTNAME=0;
16856 GNULIB_GETLOGIN=0;
16857 GNULIB_GETLOGIN_R=0;
16858 GNULIB_GETPAGESIZE=0;
16859 GNULIB_GETUSERSHELL=0;
16860 GNULIB_GROUP_MEMBER=0;
16861 GNULIB_ISATTY=0;
16862 GNULIB_LCHOWN=0;
16863 GNULIB_LINK=0;
16864 GNULIB_LINKAT=0;
16865 GNULIB_LSEEK=0;
16866 GNULIB_PIPE=0;
16867 GNULIB_PIPE2=0;
16868 GNULIB_PREAD=0;
16869 GNULIB_PWRITE=0;
16870 GNULIB_READ=0;
16871 GNULIB_READLINK=0;
16872 GNULIB_READLINKAT=0;
16873 GNULIB_RMDIR=0;
16874 GNULIB_SETHOSTNAME=0;
16875 GNULIB_SLEEP=0;
16876 GNULIB_SYMLINK=0;
16877 GNULIB_SYMLINKAT=0;
16878 GNULIB_TTYNAME_R=0;
16879 GNULIB_UNISTD_H_NONBLOCKING=0;
16880 GNULIB_UNISTD_H_SIGPIPE=0;
16881 GNULIB_UNLINK=0;
16882 GNULIB_UNLINKAT=0;
16883 GNULIB_USLEEP=0;
16884 GNULIB_WRITE=0;
16885 HAVE_CHOWN=1;
16886 HAVE_DUP2=1;
16887 HAVE_DUP3=1;
16888 HAVE_EUIDACCESS=1;
16889 HAVE_FACCESSAT=1;
16890 HAVE_FCHDIR=1;
16891 HAVE_FCHOWNAT=1;
16892 HAVE_FDATASYNC=1;
16893 HAVE_FSYNC=1;
16894 HAVE_FTRUNCATE=1;
16895 HAVE_GETDTABLESIZE=1;
16896 HAVE_GETGROUPS=1;
16897 HAVE_GETHOSTNAME=1;
16898 HAVE_GETLOGIN=1;
16899 HAVE_GETPAGESIZE=1;
16900 HAVE_GROUP_MEMBER=1;
16901 HAVE_LCHOWN=1;
16902 HAVE_LINK=1;
16903 HAVE_LINKAT=1;
16904 HAVE_PIPE=1;
16905 HAVE_PIPE2=1;
16906 HAVE_PREAD=1;
16907 HAVE_PWRITE=1;
16908 HAVE_READLINK=1;
16909 HAVE_READLINKAT=1;
16910 HAVE_SETHOSTNAME=1;
16911 HAVE_SLEEP=1;
16912 HAVE_SYMLINK=1;
16913 HAVE_SYMLINKAT=1;
16914 HAVE_UNLINKAT=1;
16915 HAVE_USLEEP=1;
16916 HAVE_DECL_ENVIRON=1;
16917 HAVE_DECL_FCHDIR=1;
16918 HAVE_DECL_FDATASYNC=1;
16919 HAVE_DECL_GETDOMAINNAME=1;
16920 HAVE_DECL_GETLOGIN_R=1;
16921 HAVE_DECL_GETPAGESIZE=1;
16922 HAVE_DECL_GETUSERSHELL=1;
16923 HAVE_DECL_SETHOSTNAME=1;
16924 HAVE_DECL_TTYNAME_R=1;
16925 HAVE_OS_H=0;
16926 HAVE_SYS_PARAM_H=0;
16927 REPLACE_CHOWN=0;
16928 REPLACE_CLOSE=0;
16929 REPLACE_DUP=0;
16930 REPLACE_DUP2=0;
16931 REPLACE_FCHOWNAT=0;
16932 REPLACE_FTRUNCATE=0;
16933 REPLACE_GETCWD=0;
16934 REPLACE_GETDOMAINNAME=0;
16935 REPLACE_GETLOGIN_R=0;
16936 REPLACE_GETGROUPS=0;
16937 REPLACE_GETPAGESIZE=0;
16938 REPLACE_ISATTY=0;
16939 REPLACE_LCHOWN=0;
16940 REPLACE_LINK=0;
16941 REPLACE_LINKAT=0;
16942 REPLACE_LSEEK=0;
16943 REPLACE_PREAD=0;
16944 REPLACE_PWRITE=0;
16945 REPLACE_READ=0;
16946 REPLACE_READLINK=0;
16947 REPLACE_RMDIR=0;
16948 REPLACE_SLEEP=0;
16949 REPLACE_SYMLINK=0;
16950 REPLACE_TTYNAME_R=0;
16951 REPLACE_UNLINK=0;
16952 REPLACE_UNLINKAT=0;
16953 REPLACE_USLEEP=0;
16954 REPLACE_WRITE=0;
16955 UNISTD_H_HAVE_WINSOCK2_H=0;
16956 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
f199cab1
GM
16957
16958
93131e11 16959
d7ad186c
GM
16960 GNULIB_OPENDIR=0;
16961 GNULIB_READDIR=0;
16962 GNULIB_REWINDDIR=0;
16963 GNULIB_CLOSEDIR=0;
16964 GNULIB_DIRFD=0;
16965 GNULIB_FDOPENDIR=0;
16966 GNULIB_SCANDIR=0;
16967 GNULIB_ALPHASORT=0;
16968 HAVE_OPENDIR=1;
16969 HAVE_READDIR=1;
16970 HAVE_REWINDDIR=1;
16971 HAVE_CLOSEDIR=1;
16972 HAVE_DECL_DIRFD=1;
16973 HAVE_DECL_FDOPENDIR=1;
16974 HAVE_FDOPENDIR=1;
16975 HAVE_SCANDIR=1;
16976 HAVE_ALPHASORT=1;
16977 REPLACE_OPENDIR=0;
16978 REPLACE_CLOSEDIR=0;
16979 REPLACE_DIRFD=0;
16980 REPLACE_FDOPENDIR=0;
710f5812
GM
16981
16982
16983
16984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
16985$as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
16986if test "${gl_cv_have_include_next+set}" = set; then :
16987 $as_echo_n "(cached) " >&6
16988else
16989 rm -rf conftestd1a conftestd1b conftestd2
16990 mkdir conftestd1a conftestd1b conftestd2
16991 cat <<EOF > conftestd1a/conftest.h
16992#define DEFINED_IN_CONFTESTD1
16993#include_next <conftest.h>
16994#ifdef DEFINED_IN_CONFTESTD2
16995int foo;
16996#else
16997#error "include_next doesn't work"
16998#endif
16999EOF
17000 cat <<EOF > conftestd1b/conftest.h
17001#define DEFINED_IN_CONFTESTD1
17002#include <stdio.h>
17003#include_next <conftest.h>
17004#ifdef DEFINED_IN_CONFTESTD2
17005int foo;
17006#else
17007#error "include_next doesn't work"
17008#endif
17009EOF
17010 cat <<EOF > conftestd2/conftest.h
17011#ifndef DEFINED_IN_CONFTESTD1
17012#error "include_next test doesn't work"
17013#endif
17014#define DEFINED_IN_CONFTESTD2
17015EOF
17016 gl_save_CPPFLAGS="$CPPFLAGS"
17017 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
17018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17019/* end confdefs.h. */
17020#include <conftest.h>
17021_ACEOF
17022if ac_fn_c_try_compile "$LINENO"; then :
17023 gl_cv_have_include_next=yes
17024else
17025 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
17026 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17027/* end confdefs.h. */
17028#include <conftest.h>
17029_ACEOF
17030if ac_fn_c_try_compile "$LINENO"; then :
17031 gl_cv_have_include_next=buggy
17032else
17033 gl_cv_have_include_next=no
17034fi
17035rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17036
17037fi
17038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17039 CPPFLAGS="$gl_save_CPPFLAGS"
17040 rm -rf conftestd1a conftestd1b conftestd2
17041
17042fi
17043{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
17044$as_echo "$gl_cv_have_include_next" >&6; }
17045 PRAGMA_SYSTEM_HEADER=
17046 if test $gl_cv_have_include_next = yes; then
17047 INCLUDE_NEXT=include_next
17048 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
17049 if test -n "$GCC"; then
17050 PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
17051 fi
17052 else
17053 if test $gl_cv_have_include_next = buggy; then
17054 INCLUDE_NEXT=include
17055 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
17056 else
17057 INCLUDE_NEXT=include
17058 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
17059 fi
17060 fi
17061
17062
17063
17064 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5
17065$as_echo_n "checking whether system header files limit the line length... " >&6; }
17066if test "${gl_cv_pragma_columns+set}" = set; then :
17067 $as_echo_n "(cached) " >&6
17068else
17069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17070/* end confdefs.h. */
17071
17072#ifdef __TANDEM
17073choke me
17074#endif
17075
17076_ACEOF
17077if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17078 $EGREP "choke me" >/dev/null 2>&1; then :
17079 gl_cv_pragma_columns=yes
17080else
17081 gl_cv_pragma_columns=no
17082fi
17083rm -f conftest*
17084
17085
17086fi
17087{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5
17088$as_echo "$gl_cv_pragma_columns" >&6; }
17089 if test $gl_cv_pragma_columns = yes; then
17090 PRAGMA_COLUMNS="#pragma COLUMNS 10000"
17091 else
17092 PRAGMA_COLUMNS=
17093 fi
17094
17095
710f5812 17096
710f5812 17097
710f5812 17098
d7ad186c
GM
17099 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtold conforms to C99" >&5
17100$as_echo_n "checking whether strtold conforms to C99... " >&6; }
17101if test "${gl_cv_func_c99_strtold+set}" = set; then :
f199cab1 17102 $as_echo_n "(cached) " >&6
ae0d7250 17103else
f199cab1 17104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3e0be4ab 17105/* end confdefs.h. */
d7ad186c
GM
17106/* On HP-UX before 11.23, strtold returns a struct instead of
17107 long double. Reject implementations like that, by requiring
17108 compatibility with the C99 prototype. */
17109 #include <stdlib.h>
17110 static long double (*p) (char const *, char **) = strtold;
17111 static long double
17112 test (char const *nptr, char **endptr)
17113 {
17114 long double r;
17115 r = strtold (nptr, endptr);
17116 return r;
17117 }
3e0be4ab
GM
17118int
17119main ()
17120{
d7ad186c 17121return test ("1.0", NULL) != 1 || p ("1.0", NULL) != 1;
3e0be4ab
GM
17122 ;
17123 return 0;
17124}
6ad6792b 17125_ACEOF
d7ad186c
GM
17126if ac_fn_c_try_link "$LINENO"; then :
17127 gl_cv_func_c99_strtold=yes
f199cab1 17128else
d7ad186c 17129 gl_cv_func_c99_strtold=no
f199cab1 17130fi
d7ad186c
GM
17131rm -f core conftest.err conftest.$ac_objext \
17132 conftest$ac_exeext conftest.$ac_ext
f199cab1 17133fi
d7ad186c
GM
17134{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_c99_strtold" >&5
17135$as_echo "$gl_cv_func_c99_strtold" >&6; }
17136 if test $gl_cv_func_c99_strtold = yes; then
f199cab1 17137
d7ad186c 17138$as_echo "#define HAVE_C99_STRTOLD 1" >>confdefs.h
f199cab1 17139
5476a9a4 17140 fi
f199cab1 17141
f199cab1 17142
f199cab1
GM
17143
17144
4fda9c95 17145
3bf26e96
GM
17146
17147
eda33f78 17148
d7ad186c
GM
17149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
17150$as_echo_n "checking if environ is properly declared... " >&6; }
17151 if test "${gt_cv_var_environ_declaration+set}" = set; then :
17152 $as_echo_n "(cached) " >&6
17153else
eda33f78 17154
d7ad186c
GM
17155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17156/* end confdefs.h. */
17157#if HAVE_UNISTD_H
17158 #include <unistd.h>
17159 #endif
17160 /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>. */
17161 #include <stdlib.h>
17162
17163 extern struct { int foo; } environ;
17164int
17165main ()
17166{
17167environ.foo = 1;
17168 ;
17169 return 0;
17170}
17171_ACEOF
17172if ac_fn_c_try_compile "$LINENO"; then :
17173 gt_cv_var_environ_declaration=no
17174else
17175 gt_cv_var_environ_declaration=yes
17176fi
17177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17178fi
17179
17180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
17181$as_echo "$gt_cv_var_environ_declaration" >&6; }
17182 if test $gt_cv_var_environ_declaration = yes; then
17183
17184$as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
17185
17186 fi
17187
17188
17189 if test $gt_cv_var_environ_declaration != yes; then
17190 HAVE_DECL_ENVIRON=0
17191 fi
17192
17193
17194
17195
17196
17197
17198
17199
17200
17201 GNULIB_FCNTL=0;
17202 GNULIB_NONBLOCKING=0;
17203 GNULIB_OPEN=0;
17204 GNULIB_OPENAT=0;
17205 HAVE_FCNTL=1;
17206 HAVE_OPENAT=1;
17207 REPLACE_FCNTL=0;
17208 REPLACE_OPEN=0;
17209 REPLACE_OPENAT=0;
17210
17211
17212ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
17213if test "x$ac_cv_type_mode_t" = x""yes; then :
17214
17215else
17216
17217cat >>confdefs.h <<_ACEOF
17218#define mode_t int
17219_ACEOF
17220
17221fi
17222
17223
17224
17225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for st_dm_mode in struct stat" >&5
17226$as_echo_n "checking for st_dm_mode in struct stat... " >&6; }
17227if test "${ac_cv_struct_st_dm_mode+set}" = set; then :
17228 $as_echo_n "(cached) " >&6
17229else
17230 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17231/* end confdefs.h. */
17232
17233#include <sys/types.h>
17234#include <sys/stat.h>
17235int
17236main ()
17237{
17238struct stat s; s.st_dm_mode;
17239 ;
17240 return 0;
17241}
17242_ACEOF
17243if ac_fn_c_try_compile "$LINENO"; then :
17244 ac_cv_struct_st_dm_mode=yes
17245else
17246 ac_cv_struct_st_dm_mode=no
17247fi
17248rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17249fi
17250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_st_dm_mode" >&5
17251$as_echo "$ac_cv_struct_st_dm_mode" >&6; }
17252
17253 if test $ac_cv_struct_st_dm_mode = yes; then
17254
17255$as_echo "#define HAVE_ST_DM_MODE 1" >>confdefs.h
17256
17257 fi
17258
17259
17260ac_fn_c_check_decl "$LINENO" "strmode" "ac_cv_have_decl_strmode" "$ac_includes_default"
17261if test "x$ac_cv_have_decl_strmode" = x""yes; then :
17262 ac_have_decl=1
17263else
17264 ac_have_decl=0
17265fi
17266
17267cat >>confdefs.h <<_ACEOF
17268#define HAVE_DECL_STRMODE $ac_have_decl
17269_ACEOF
17270
17271
17272
17273
17274
17275
17276 GNULIB_FCHMODAT=0;
17277 GNULIB_FSTAT=0;
17278 GNULIB_FSTATAT=0;
17279 GNULIB_FUTIMENS=0;
17280 GNULIB_LCHMOD=0;
17281 GNULIB_LSTAT=0;
17282 GNULIB_MKDIRAT=0;
17283 GNULIB_MKFIFO=0;
17284 GNULIB_MKFIFOAT=0;
17285 GNULIB_MKNOD=0;
17286 GNULIB_MKNODAT=0;
17287 GNULIB_STAT=0;
17288 GNULIB_UTIMENSAT=0;
17289 HAVE_FCHMODAT=1;
17290 HAVE_FSTATAT=1;
17291 HAVE_FUTIMENS=1;
17292 HAVE_LCHMOD=1;
17293 HAVE_LSTAT=1;
17294 HAVE_MKDIRAT=1;
17295 HAVE_MKFIFO=1;
17296 HAVE_MKFIFOAT=1;
17297 HAVE_MKNOD=1;
17298 HAVE_MKNODAT=1;
17299 HAVE_UTIMENSAT=1;
17300 REPLACE_FSTAT=0;
17301 REPLACE_FSTATAT=0;
17302 REPLACE_FUTIMENS=0;
17303 REPLACE_LSTAT=0;
17304 REPLACE_MKDIR=0;
17305 REPLACE_MKFIFO=0;
17306 REPLACE_MKNOD=0;
17307 REPLACE_STAT=0;
17308 REPLACE_UTIMENSAT=0;
17309
17310
17311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
17312$as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
17313if test "${gl_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then :
17314 $as_echo_n "(cached) " >&6
17315else
17316 rm -f conftest.sym conftest.file
17317 echo >conftest.file
17318 if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then
17319 if test "$cross_compiling" = yes; then :
17320 case "$host_os" in
17321 # Guess yes on glibc systems.
17322 *-gnu*) gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
17323 # If we don't know, assume the worst.
17324 *) gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
17325 esac
17326
17327else
17328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17329/* end confdefs.h. */
17330$ac_includes_default
17331int
17332main ()
17333{
17334struct stat sbuf;
17335 /* Linux will dereference the symlink and fail, as required by
17336 POSIX. That is better in the sense that it means we will not
17337 have to compile and use the lstat wrapper. */
17338 return lstat ("conftest.sym/", &sbuf) == 0;
17339
17340 ;
17341 return 0;
17342}
17343_ACEOF
17344if ac_fn_c_try_run "$LINENO"; then :
17345 gl_cv_func_lstat_dereferences_slashed_symlink=yes
17346else
17347 gl_cv_func_lstat_dereferences_slashed_symlink=no
17348fi
17349rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17350 conftest.$ac_objext conftest.beam conftest.$ac_ext
17351fi
17352
17353 else
17354 # If the 'ln -s' command failed, then we probably don't even
17355 # have an lstat function.
17356 gl_cv_func_lstat_dereferences_slashed_symlink="guessing no"
17357 fi
17358 rm -f conftest.sym conftest.file
17359
17360fi
17361{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
17362$as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
17363 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
17364 *yes)
17365
17366cat >>confdefs.h <<_ACEOF
17367#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
17368_ACEOF
17369
17370 ;;
17371 esac
17372
17373
17374
17375
17376 GNULIB__EXIT=0;
17377 GNULIB_ATOLL=0;
17378 GNULIB_CALLOC_POSIX=0;
17379 GNULIB_CANONICALIZE_FILE_NAME=0;
17380 GNULIB_GETLOADAVG=0;
17381 GNULIB_GETSUBOPT=0;
17382 GNULIB_GRANTPT=0;
5476a9a4
GM
17383 GNULIB_MALLOC_POSIX=0;
17384 GNULIB_MBTOWC=0;
17385 GNULIB_MKDTEMP=0;
17386 GNULIB_MKOSTEMP=0;
17387 GNULIB_MKOSTEMPS=0;
17388 GNULIB_MKSTEMP=0;
17389 GNULIB_MKSTEMPS=0;
17390 GNULIB_POSIX_OPENPT=0;
17391 GNULIB_PTSNAME=0;
17392 GNULIB_PTSNAME_R=0;
17393 GNULIB_PUTENV=0;
17394 GNULIB_RANDOM=0;
17395 GNULIB_RANDOM_R=0;
17396 GNULIB_REALLOC_POSIX=0;
17397 GNULIB_REALPATH=0;
17398 GNULIB_RPMATCH=0;
2cdd55fc 17399 GNULIB_SECURE_GETENV=0;
5476a9a4
GM
17400 GNULIB_SETENV=0;
17401 GNULIB_STRTOD=0;
17402 GNULIB_STRTOLL=0;
17403 GNULIB_STRTOULL=0;
17404 GNULIB_SYSTEM_POSIX=0;
17405 GNULIB_UNLOCKPT=0;
17406 GNULIB_UNSETENV=0;
17407 GNULIB_WCTOMB=0;
17408 HAVE__EXIT=1;
17409 HAVE_ATOLL=1;
17410 HAVE_CANONICALIZE_FILE_NAME=1;
17411 HAVE_DECL_GETLOADAVG=1;
17412 HAVE_GETSUBOPT=1;
17413 HAVE_GRANTPT=1;
17414 HAVE_MKDTEMP=1;
17415 HAVE_MKOSTEMP=1;
17416 HAVE_MKOSTEMPS=1;
17417 HAVE_MKSTEMP=1;
17418 HAVE_MKSTEMPS=1;
17419 HAVE_POSIX_OPENPT=1;
17420 HAVE_PTSNAME=1;
17421 HAVE_PTSNAME_R=1;
17422 HAVE_RANDOM=1;
17423 HAVE_RANDOM_H=1;
17424 HAVE_RANDOM_R=1;
17425 HAVE_REALPATH=1;
17426 HAVE_RPMATCH=1;
2cdd55fc 17427 HAVE_SECURE_GETENV=1;
5476a9a4
GM
17428 HAVE_SETENV=1;
17429 HAVE_DECL_SETENV=1;
17430 HAVE_STRTOD=1;
17431 HAVE_STRTOLL=1;
17432 HAVE_STRTOULL=1;
17433 HAVE_STRUCT_RANDOM_DATA=1;
17434 HAVE_SYS_LOADAVG_H=0;
17435 HAVE_UNLOCKPT=1;
17436 HAVE_DECL_UNSETENV=1;
17437 REPLACE_CALLOC=0;
17438 REPLACE_CANONICALIZE_FILE_NAME=0;
17439 REPLACE_MALLOC=0;
17440 REPLACE_MBTOWC=0;
17441 REPLACE_MKSTEMP=0;
b6c9d18d 17442 REPLACE_PTSNAME=0;
5476a9a4
GM
17443 REPLACE_PTSNAME_R=0;
17444 REPLACE_PUTENV=0;
17445 REPLACE_RANDOM_R=0;
17446 REPLACE_REALLOC=0;
17447 REPLACE_REALPATH=0;
17448 REPLACE_SETENV=0;
17449 REPLACE_STRTOD=0;
17450 REPLACE_UNSETENV=0;
17451 REPLACE_WCTOMB=0;
f199cab1
GM
17452
17453
17454
f199cab1
GM
17455
17456
17457
17458
17459
17460
17461
17462
17463
17464
5f90be1b 17465
f199cab1
GM
17466
17467
17468 if test $gl_cv_have_include_next = yes; then
5476a9a4 17469 gl_cv_next_getopt_h='<'getopt.h'>'
f199cab1 17470 else
5476a9a4
GM
17471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <getopt.h>" >&5
17472$as_echo_n "checking absolute name of <getopt.h>... " >&6; }
17473if test "${gl_cv_next_getopt_h+set}" = set; then :
5f90be1b 17474 $as_echo_n "(cached) " >&6
5f90be1b 17475else
f199cab1 17476
5476a9a4 17477 if test $ac_cv_header_getopt_h = yes; then
f199cab1
GM
17478
17479
17480 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5f90be1b 17481/* end confdefs.h. */
5476a9a4 17482#include <getopt.h>
4fda9c95 17483
5f90be1b 17484_ACEOF
f199cab1
GM
17485 case "$host_os" in
17486 aix*) gl_absname_cpp="$ac_cpp -C" ;;
17487 *) gl_absname_cpp="$ac_cpp" ;;
17488 esac
5f90be1b 17489
f199cab1
GM
17490 case "$host_os" in
17491 mingw*)
17492 gl_dirsep_regex='[/\\]'
17493 ;;
17494 *)
17495 gl_dirsep_regex='\/'
17496 ;;
17497 esac
17498 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
5f90be1b 17499
5476a9a4 17500 gl_header_literal_regex=`echo 'getopt.h' \
f199cab1
GM
17501 | sed -e "$gl_make_literal_regex_sed"`
17502 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17503 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17504 s|^/[^/]|//&|
17505 p
17506 q
17507 }'
5476a9a4 17508 gl_cv_next_getopt_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
f199cab1
GM
17509 sed -n "$gl_absolute_header_sed"`'"'
17510 else
5476a9a4 17511 gl_cv_next_getopt_h='<'getopt.h'>'
f199cab1 17512 fi
5f90be1b
PE
17513
17514
3e0be4ab 17515fi
5476a9a4
GM
17516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5
17517$as_echo "$gl_cv_next_getopt_h" >&6; }
f199cab1 17518 fi
5476a9a4 17519 NEXT_GETOPT_H=$gl_cv_next_getopt_h
3e0be4ab 17520
f199cab1
GM
17521 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17522 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
5476a9a4 17523 gl_next_as_first_directive='<'getopt.h'>'
f199cab1
GM
17524 else
17525 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
5476a9a4 17526 gl_next_as_first_directive=$gl_cv_next_getopt_h
f199cab1 17527 fi
5476a9a4 17528 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive
f199cab1
GM
17529
17530
f199cab1 17531
f199cab1 17532
5476a9a4
GM
17533 if test $ac_cv_header_getopt_h = yes; then
17534 HAVE_GETOPT_H=1
17535 else
17536 HAVE_GETOPT_H=0
f199cab1
GM
17537 fi
17538
f199cab1 17539
5476a9a4 17540 gl_replace_getopt=
f199cab1 17541
5476a9a4
GM
17542 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
17543 for ac_header in getopt.h
17544do :
17545 ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
17546if test "x$ac_cv_header_getopt_h" = x""yes; then :
17547 cat >>confdefs.h <<_ACEOF
17548#define HAVE_GETOPT_H 1
17549_ACEOF
f199cab1 17550
5476a9a4
GM
17551else
17552 gl_replace_getopt=yes
3e0be4ab 17553fi
3e0be4ab 17554
5476a9a4 17555done
3e0be4ab 17556
5476a9a4 17557 fi
3e0be4ab 17558
5476a9a4
GM
17559 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
17560 for ac_func in getopt_long_only
17561do :
17562 ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only"
17563if test "x$ac_cv_func_getopt_long_only" = x""yes; then :
17564 cat >>confdefs.h <<_ACEOF
17565#define HAVE_GETOPT_LONG_ONLY 1
17566_ACEOF
3e0be4ab 17567
3e0be4ab 17568else
5476a9a4 17569 gl_replace_getopt=yes
3e0be4ab 17570fi
5476a9a4 17571done
3e0be4ab 17572
f199cab1 17573 fi
3e0be4ab 17574
5476a9a4
GM
17575 if test -z "$gl_replace_getopt"; then
17576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5
17577$as_echo_n "checking whether getopt is POSIX compatible... " >&6; }
17578if test "${gl_cv_func_getopt_posix+set}" = set; then :
3e0be4ab 17579 $as_echo_n "(cached) " >&6
5476a9a4
GM
17580else
17581
17582 if test $cross_compiling = no; then
17583 if test "$cross_compiling" = yes; then :
17584 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17585$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17586as_fn_error "cannot run test program while cross compiling
17587See \`config.log' for more details." "$LINENO" 5; }
3e0be4ab 17588else
f199cab1 17589 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3e0be4ab 17590/* end confdefs.h. */
5476a9a4
GM
17591
17592#include <unistd.h>
17593#include <stdlib.h>
17594#include <string.h>
17595
f199cab1
GM
17596int
17597main ()
17598{
5476a9a4
GM
17599 static char program[] = "program";
17600 static char a[] = "-a";
17601 static char foo[] = "foo";
17602 static char bar[] = "bar";
17603 char *argv[] = { program, a, foo, bar, NULL };
17604 int c;
17605
17606 c = getopt (4, argv, "ab");
17607 if (!(c == 'a'))
17608 return 1;
17609 c = getopt (4, argv, "ab");
17610 if (!(c == -1))
17611 return 2;
17612 if (!(optind == 2))
17613 return 3;
f199cab1
GM
17614 return 0;
17615}
17616
3e0be4ab 17617_ACEOF
5476a9a4
GM
17618if ac_fn_c_try_run "$LINENO"; then :
17619 gl_cv_func_getopt_posix=maybe
3e0be4ab 17620else
5476a9a4 17621 gl_cv_func_getopt_posix=no
3e0be4ab 17622fi
5476a9a4
GM
17623rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17624 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1
GM
17625fi
17626
5476a9a4
GM
17627 if test $gl_cv_func_getopt_posix = maybe; then
17628 if test "$cross_compiling" = yes; then :
17629 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17630$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17631as_fn_error "cannot run test program while cross compiling
17632See \`config.log' for more details." "$LINENO" 5; }
3e0be4ab 17633else
5476a9a4
GM
17634 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17635/* end confdefs.h. */
3e0be4ab 17636
5476a9a4
GM
17637#include <unistd.h>
17638#include <stdlib.h>
17639#include <string.h>
3e0be4ab 17640
5476a9a4
GM
17641int
17642main ()
17643{
17644 static char program[] = "program";
17645 static char donald[] = "donald";
17646 static char p[] = "-p";
17647 static char billy[] = "billy";
17648 static char duck[] = "duck";
17649 static char a[] = "-a";
17650 static char bar[] = "bar";
17651 char *argv[] = { program, donald, p, billy, duck, a, bar, NULL };
17652 int c;
3e0be4ab 17653
5476a9a4
GM
17654 c = getopt (7, argv, "+abp:q:");
17655 if (!(c == -1))
17656 return 4;
17657 if (!(strcmp (argv[0], "program") == 0))
17658 return 5;
17659 if (!(strcmp (argv[1], "donald") == 0))
17660 return 6;
17661 if (!(strcmp (argv[2], "-p") == 0))
17662 return 7;
17663 if (!(strcmp (argv[3], "billy") == 0))
17664 return 8;
17665 if (!(strcmp (argv[4], "duck") == 0))
17666 return 9;
17667 if (!(strcmp (argv[5], "-a") == 0))
17668 return 10;
17669 if (!(strcmp (argv[6], "bar") == 0))
17670 return 11;
17671 if (!(optind == 1))
17672 return 12;
17673 return 0;
17674}
3e0be4ab
GM
17675
17676_ACEOF
5476a9a4
GM
17677if ac_fn_c_try_run "$LINENO"; then :
17678 gl_cv_func_getopt_posix=maybe
17679else
17680 gl_cv_func_getopt_posix=no
17681fi
17682rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17683 conftest.$ac_objext conftest.beam conftest.$ac_ext
17684fi
b0415a03 17685
5476a9a4
GM
17686 fi
17687 if test $gl_cv_func_getopt_posix = maybe; then
17688 if test "$cross_compiling" = yes; then :
17689 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17690$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17691as_fn_error "cannot run test program while cross compiling
17692See \`config.log' for more details." "$LINENO" 5; }
17693else
17694 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17695/* end confdefs.h. */
b0415a03 17696
5476a9a4
GM
17697#include <unistd.h>
17698#include <stdlib.h>
17699#include <string.h>
3e0be4ab 17700
5476a9a4
GM
17701int
17702main ()
17703{
17704 static char program[] = "program";
17705 static char ab[] = "-ab";
17706 char *argv[3] = { program, ab, NULL };
17707 if (getopt (2, argv, "ab:") != 'a')
17708 return 13;
17709 if (getopt (2, argv, "ab:") != '?')
17710 return 14;
17711 if (optopt != 'b')
17712 return 15;
17713 if (optind != 2)
17714 return 16;
17715 return 0;
17716}
3e0be4ab 17717
5476a9a4
GM
17718_ACEOF
17719if ac_fn_c_try_run "$LINENO"; then :
17720 gl_cv_func_getopt_posix=yes
17721else
17722 gl_cv_func_getopt_posix=no
17723fi
17724rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17725 conftest.$ac_objext conftest.beam conftest.$ac_ext
3e0be4ab 17726fi
3e0be4ab 17727
5476a9a4
GM
17728 fi
17729 else
17730 case "$host_os" in
17731 darwin* | aix* | mingw*) gl_cv_func_getopt_posix="guessing no";;
17732 *) gl_cv_func_getopt_posix="guessing yes";;
17733 esac
17734 fi
3e0be4ab 17735
5476a9a4
GM
17736fi
17737{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5
17738$as_echo "$gl_cv_func_getopt_posix" >&6; }
17739 case "$gl_cv_func_getopt_posix" in
17740 *no) gl_replace_getopt=yes ;;
17741 esac
3e0be4ab
GM
17742 fi
17743
5476a9a4
GM
17744 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
17745 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5
17746$as_echo_n "checking for working GNU getopt function... " >&6; }
17747if test "${gl_cv_func_getopt_gnu+set}" = set; then :
17748 $as_echo_n "(cached) " >&6
17749else
17750 # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the
17751 # optstring is necessary for programs like m4 that have POSIX-mandated
17752 # semantics for supporting options interspersed with files.
17753 # Also, since getopt_long is a GNU extension, we require optind=0.
17754 # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT;
17755 # so take care to revert to the correct (non-)export state.
17756 gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }'
17757 case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in
17758 xx) gl_had_POSIXLY_CORRECT=exported ;;
17759 x) gl_had_POSIXLY_CORRECT=yes ;;
17760 *) gl_had_POSIXLY_CORRECT= ;;
17761 esac
17762 POSIXLY_CORRECT=1
17763 export POSIXLY_CORRECT
17764 if test "$cross_compiling" = yes; then :
17765 gl_cv_func_getopt_gnu="guessing no"
3e0be4ab 17766
5476a9a4
GM
17767else
17768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17769/* end confdefs.h. */
17770#include <getopt.h>
17771 #include <stddef.h>
17772 #include <string.h>
3e0be4ab 17773
5476a9a4
GM
17774#include <stdlib.h>
17775#if defined __MACH__ && defined __APPLE__
17776/* Avoid a crash on Mac OS X. */
17777#include <mach/mach.h>
17778#include <mach/mach_error.h>
17779#include <mach/thread_status.h>
17780#include <mach/exception.h>
17781#include <mach/task.h>
17782#include <pthread.h>
17783/* The exception port on which our thread listens. */
17784static mach_port_t our_exception_port;
17785/* The main function of the thread listening for exceptions of type
17786 EXC_BAD_ACCESS. */
17787static void *
17788mach_exception_thread (void *arg)
17789{
17790 /* Buffer for a message to be received. */
17791 struct {
17792 mach_msg_header_t head;
17793 mach_msg_body_t msgh_body;
17794 char data[1024];
17795 } msg;
17796 mach_msg_return_t retval;
17797 /* Wait for a message on the exception port. */
17798 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
17799 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
17800 if (retval != MACH_MSG_SUCCESS)
17801 abort ();
17802 exit (1);
17803}
17804static void
17805nocrash_init (void)
17806{
17807 mach_port_t self = mach_task_self ();
17808 /* Allocate a port on which the thread shall listen for exceptions. */
17809 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
17810 == KERN_SUCCESS) {
17811 /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
17812 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
17813 MACH_MSG_TYPE_MAKE_SEND)
17814 == KERN_SUCCESS) {
17815 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
17816 for us. */
17817 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
17818 /* Create the thread listening on the exception port. */
17819 pthread_attr_t attr;
17820 pthread_t thread;
17821 if (pthread_attr_init (&attr) == 0
17822 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
17823 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
17824 pthread_attr_destroy (&attr);
17825 /* Replace the exception port info for these exceptions with our own.
17826 Note that we replace the exception port for the entire task, not only
17827 for a particular thread. This has the effect that when our exception
17828 port gets the message, the thread specific exception port has already
17829 been asked, and we don't need to bother about it.
17830 See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
17831 task_set_exception_ports (self, mask, our_exception_port,
17832 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
17833 }
17834 }
17835 }
17836}
17837#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
17838/* Avoid a crash on native Windows. */
17839#define WIN32_LEAN_AND_MEAN
17840#include <windows.h>
17841#include <winerror.h>
17842static LONG WINAPI
17843exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
17844{
17845 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
17846 {
17847 case EXCEPTION_ACCESS_VIOLATION:
17848 case EXCEPTION_IN_PAGE_ERROR:
17849 case EXCEPTION_STACK_OVERFLOW:
17850 case EXCEPTION_GUARD_PAGE:
17851 case EXCEPTION_PRIV_INSTRUCTION:
17852 case EXCEPTION_ILLEGAL_INSTRUCTION:
17853 case EXCEPTION_DATATYPE_MISALIGNMENT:
17854 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
17855 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
17856 exit (1);
17857 }
17858 return EXCEPTION_CONTINUE_SEARCH;
17859}
17860static void
17861nocrash_init (void)
17862{
17863 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
17864}
17865#else
17866/* Avoid a crash on POSIX systems. */
17867#include <signal.h>
17868/* A POSIX signal handler. */
17869static void
17870exception_handler (int sig)
17871{
17872 exit (1);
17873}
17874static void
17875nocrash_init (void)
17876{
17877#ifdef SIGSEGV
17878 signal (SIGSEGV, exception_handler);
17879#endif
17880#ifdef SIGBUS
17881 signal (SIGBUS, exception_handler);
17882#endif
17883}
17884#endif
3e0be4ab 17885
3e0be4ab 17886
5476a9a4
GM
17887int
17888main ()
17889{
3e0be4ab 17890
5476a9a4 17891 int result = 0;
3e0be4ab 17892
5476a9a4 17893 nocrash_init();
3e0be4ab 17894
5476a9a4
GM
17895 /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
17896 and fails on Mac OS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
17897 OSF/1 5.1, Solaris 10. */
17898 {
17899 static char conftest[] = "conftest";
17900 static char plus[] = "-+";
17901 char *argv[3] = { conftest, plus, NULL };
17902 opterr = 0;
17903 if (getopt (2, argv, "+a") != '?')
17904 result |= 1;
17905 }
17906 /* This code succeeds on glibc 2.8, mingw,
17907 and fails on Mac OS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
17908 IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */
17909 {
17910 static char program[] = "program";
17911 static char p[] = "-p";
17912 static char foo[] = "foo";
17913 static char bar[] = "bar";
17914 char *argv[] = { program, p, foo, bar, NULL };
3e0be4ab 17915
5476a9a4
GM
17916 optind = 1;
17917 if (getopt (4, argv, "p::") != 'p')
17918 result |= 2;
17919 else if (optarg != NULL)
17920 result |= 4;
17921 else if (getopt (4, argv, "p::") != -1)
17922 result |= 6;
17923 else if (optind != 2)
17924 result |= 8;
17925 }
17926 /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */
17927 {
17928 static char program[] = "program";
17929 static char foo[] = "foo";
17930 static char p[] = "-p";
17931 char *argv[] = { program, foo, p, NULL };
17932 optind = 0;
17933 if (getopt (3, argv, "-p") != 1)
17934 result |= 16;
17935 else if (getopt (3, argv, "-p") != 'p')
17936 result |= 16;
17937 }
17938 /* This code fails on glibc 2.11. */
17939 {
17940 static char program[] = "program";
17941 static char b[] = "-b";
17942 static char a[] = "-a";
17943 char *argv[] = { program, b, a, NULL };
17944 optind = opterr = 0;
17945 if (getopt (3, argv, "+:a:b") != 'b')
17946 result |= 32;
17947 else if (getopt (3, argv, "+:a:b") != ':')
17948 result |= 32;
17949 }
17950 /* This code dumps core on glibc 2.14. */
17951 {
17952 static char program[] = "program";
17953 static char w[] = "-W";
17954 static char dummy[] = "dummy";
17955 char *argv[] = { program, w, dummy, NULL };
17956 optind = opterr = 1;
17957 if (getopt (3, argv, "W;") != 'W')
17958 result |= 64;
17959 }
17960 return result;
3e0be4ab 17961
5476a9a4
GM
17962 ;
17963 return 0;
17964}
17965_ACEOF
17966if ac_fn_c_try_run "$LINENO"; then :
17967 gl_cv_func_getopt_gnu=yes
17968else
17969 gl_cv_func_getopt_gnu=no
17970fi
17971rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17972 conftest.$ac_objext conftest.beam conftest.$ac_ext
17973fi
3e0be4ab 17974
5476a9a4
GM
17975 case $gl_had_POSIXLY_CORRECT in
17976 exported) ;;
17977 yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;;
17978 *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;;
17979 esac
3e0be4ab 17980
5476a9a4
GM
17981fi
17982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5
17983$as_echo "$gl_cv_func_getopt_gnu" >&6; }
17984 if test "$gl_cv_func_getopt_gnu" != yes; then
17985 gl_replace_getopt=yes
17986 else
17987 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt_long function" >&5
17988$as_echo_n "checking for working GNU getopt_long function... " >&6; }
17989if test "${gl_cv_func_getopt_long_gnu+set}" = set; then :
f199cab1
GM
17990 $as_echo_n "(cached) " >&6
17991else
5476a9a4
GM
17992 if test "$cross_compiling" = yes; then :
17993 case "$host_os" in
17994 openbsd*) gl_cv_func_getopt_long_gnu="guessing no";;
17995 *) gl_cv_func_getopt_long_gnu="guessing yes";;
17996 esac
3e0be4ab
GM
17997
17998else
17999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18000/* end confdefs.h. */
5476a9a4
GM
18001#include <getopt.h>
18002 #include <stddef.h>
18003 #include <string.h>
f199cab1
GM
18004
18005int
18006main ()
369e19fc 18007{
5476a9a4
GM
18008static const struct option long_options[] =
18009 {
18010 { "xtremely-",no_argument, NULL, 1003 },
18011 { "xtra", no_argument, NULL, 1001 },
18012 { "xtreme", no_argument, NULL, 1002 },
18013 { "xtremely", no_argument, NULL, 1003 },
18014 { NULL, 0, NULL, 0 }
18015 };
18016 /* This code fails on OpenBSD 5.0. */
18017 {
18018 static char program[] = "program";
18019 static char xtremel[] = "--xtremel";
18020 char *argv[] = { program, xtremel, NULL };
18021 int option_index;
18022 optind = 1; opterr = 0;
18023 if (getopt_long (2, argv, "", long_options, &option_index) != 1003)
18024 return 1;
18025 }
18026 return 0;
f199cab1
GM
18027
18028 ;
18029 return 0;
369e19fc 18030}
f199cab1
GM
18031_ACEOF
18032if ac_fn_c_try_run "$LINENO"; then :
5476a9a4 18033 gl_cv_func_getopt_long_gnu=yes
f199cab1 18034else
5476a9a4 18035 gl_cv_func_getopt_long_gnu=no
f199cab1
GM
18036fi
18037rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18038 conftest.$ac_objext conftest.beam conftest.$ac_ext
18039fi
18040
5476a9a4 18041
f199cab1 18042fi
5476a9a4
GM
18043{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_long_gnu" >&5
18044$as_echo "$gl_cv_func_getopt_long_gnu" >&6; }
18045 case "$gl_cv_func_getopt_long_gnu" in
18046 *yes) ;;
18047 *) gl_replace_getopt=yes ;;
18048 esac
18049 fi
18050 fi
f199cab1 18051
f199cab1 18052
f199cab1 18053
369e19fc
PE
18054
18055
5476a9a4
GM
18056
18057 REPLACE_GETOPT=0
18058 if test -n "$gl_replace_getopt"; then
18059 REPLACE_GETOPT=1
f199cab1 18060 fi
3e0be4ab 18061
5476a9a4 18062 if test $REPLACE_GETOPT = 1; then
369e19fc 18063
5476a9a4 18064 GETOPT_H=getopt.h
369e19fc 18065
5476a9a4 18066$as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
6ad6792b
GM
18067
18068
f199cab1 18069
5476a9a4 18070 fi
f199cab1 18071
5476a9a4
GM
18072ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default"
18073if test "x$ac_cv_have_decl_getenv" = x""yes; then :
18074 ac_have_decl=1
3e0be4ab 18075else
5476a9a4 18076 ac_have_decl=0
3e0be4ab 18077fi
e275c824 18078
5476a9a4
GM
18079cat >>confdefs.h <<_ACEOF
18080#define HAVE_DECL_GETENV $ac_have_decl
18081_ACEOF
18082
a6342fc8 18083:
f199cab1 18084
5476a9a4
GM
18085
18086
18087
18088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
18089$as_echo_n "checking for C/C++ restrict keyword... " >&6; }
18090if test "${ac_cv_c_restrict+set}" = set; then :
18091 $as_echo_n "(cached) " >&6
f199cab1 18092else
5476a9a4
GM
18093 ac_cv_c_restrict=no
18094 # The order here caters to the fact that C++ does not require restrict.
18095 for ac_kw in __restrict __restrict__ _Restrict restrict; do
18096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 18097/* end confdefs.h. */
5476a9a4
GM
18098typedef int * int_ptr;
18099 int foo (int_ptr $ac_kw ip) {
18100 return ip[0];
18101 }
f199cab1
GM
18102int
18103main ()
18104{
5476a9a4
GM
18105int s[1];
18106 int * $ac_kw t = s;
18107 t[0] = 0;
18108 return foo(t)
f199cab1
GM
18109 ;
18110 return 0;
18111}
18112_ACEOF
5476a9a4
GM
18113if ac_fn_c_try_compile "$LINENO"; then :
18114 ac_cv_c_restrict=$ac_kw
f199cab1 18115fi
5476a9a4
GM
18116rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18117 test "$ac_cv_c_restrict" != no && break
18118 done
f199cab1 18119
f199cab1 18120fi
5476a9a4
GM
18121{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
18122$as_echo "$ac_cv_c_restrict" >&6; }
f199cab1 18123
5476a9a4
GM
18124 case $ac_cv_c_restrict in
18125 restrict) ;;
18126 no) $as_echo "#define restrict /**/" >>confdefs.h
18127 ;;
18128 *) cat >>confdefs.h <<_ACEOF
18129#define restrict $ac_cv_c_restrict
18130_ACEOF
18131 ;;
18132 esac
f199cab1 18133
f199cab1 18134
5476a9a4
GM
18135 GNULIB_GETTIMEOFDAY=0;
18136 HAVE_GETTIMEOFDAY=1;
18137 HAVE_STRUCT_TIMEVAL=1;
18138 HAVE_SYS_TIME_H=1;
18139 REPLACE_GETTIMEOFDAY=0;
18140 REPLACE_STRUCT_TIMEVAL=0;
e275c824 18141
e275c824 18142
e275c824 18143
e275c824 18144
4fda9c95 18145
5fa4ac76 18146
5fa4ac76 18147
5fa4ac76 18148
f199cab1
GM
18149
18150
18151
5fa4ac76 18152
5fa4ac76 18153
5fa4ac76 18154
5fa4ac76 18155
5fa4ac76 18156
5476a9a4
GM
18157 if test $gl_cv_have_include_next = yes; then
18158 gl_cv_next_sys_time_h='<'sys/time.h'>'
18159 else
18160 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
18161$as_echo_n "checking absolute name of <sys/time.h>... " >&6; }
18162if test "${gl_cv_next_sys_time_h+set}" = set; then :
18163 $as_echo_n "(cached) " >&6
18164else
5fa4ac76 18165
5476a9a4 18166 if test $ac_cv_header_sys_time_h = yes; then
5fa4ac76
PE
18167
18168
5476a9a4
GM
18169 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18170/* end confdefs.h. */
18171#include <sys/time.h>
5fa4ac76 18172
5476a9a4
GM
18173_ACEOF
18174 case "$host_os" in
18175 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18176 *) gl_absname_cpp="$ac_cpp" ;;
18177 esac
1f5d53eb 18178
5476a9a4
GM
18179 case "$host_os" in
18180 mingw*)
18181 gl_dirsep_regex='[/\\]'
18182 ;;
18183 *)
18184 gl_dirsep_regex='\/'
18185 ;;
18186 esac
18187 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
1f5d53eb 18188
5476a9a4
GM
18189 gl_header_literal_regex=`echo 'sys/time.h' \
18190 | sed -e "$gl_make_literal_regex_sed"`
18191 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18192 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18193 s|^/[^/]|//&|
18194 p
18195 q
18196 }'
18197 gl_cv_next_sys_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18198 sed -n "$gl_absolute_header_sed"`'"'
18199 else
18200 gl_cv_next_sys_time_h='<'sys/time.h'>'
18201 fi
1f5d53eb 18202
1f5d53eb 18203
5476a9a4
GM
18204fi
18205{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
18206$as_echo "$gl_cv_next_sys_time_h" >&6; }
18207 fi
18208 NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
3e0be4ab 18209
5476a9a4
GM
18210 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18211 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18212 gl_next_as_first_directive='<'sys/time.h'>'
18213 else
18214 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18215 gl_next_as_first_directive=$gl_cv_next_sys_time_h
18216 fi
18217 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
3e0be4ab 18218
e275c824 18219
3e0be4ab 18220
f199cab1
GM
18221
18222
5476a9a4
GM
18223 if test $ac_cv_header_sys_time_h != yes; then
18224 HAVE_SYS_TIME_H=0
18225 fi
f199cab1
GM
18226
18227
18228
18229
18230
5476a9a4
GM
18231 if test $ac_cv_header_sys_socket_h != yes; then
18232 for ac_header in winsock2.h
18233do :
18234 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
18235if test "x$ac_cv_header_winsock2_h" = x""yes; then :
18236 cat >>confdefs.h <<_ACEOF
18237#define HAVE_WINSOCK2_H 1
18238_ACEOF
f199cab1 18239
5476a9a4 18240fi
3e0be4ab 18241
5476a9a4 18242done
3e0be4ab 18243
5476a9a4
GM
18244 fi
18245 if test "$ac_cv_header_winsock2_h" = yes; then
18246 HAVE_WINSOCK2_H=1
18247 UNISTD_H_HAVE_WINSOCK2_H=1
18248 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
18249 else
18250 HAVE_WINSOCK2_H=0
18251 fi
18252
18253
18254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
18255$as_echo_n "checking for struct timeval... " >&6; }
18256if test "${gl_cv_sys_struct_timeval+set}" = set; then :
18257 $as_echo_n "(cached) " >&6
18258else
18259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18260/* end confdefs.h. */
18261#if HAVE_SYS_TIME_H
18262 #include <sys/time.h>
18263 #endif
18264 #include <time.h>
18265 #if HAVE_WINSOCK2_H
18266 # include <winsock2.h>
18267 #endif
f199cab1 18268
5476a9a4
GM
18269int
18270main ()
18271{
18272static struct timeval x; x.tv_sec = x.tv_usec;
18273 ;
18274 return 0;
18275}
18276_ACEOF
18277if ac_fn_c_try_compile "$LINENO"; then :
18278 gl_cv_sys_struct_timeval=yes
18279else
18280 gl_cv_sys_struct_timeval=no
f199cab1 18281fi
5476a9a4 18282rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 18283
5476a9a4
GM
18284fi
18285{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
18286$as_echo "$gl_cv_sys_struct_timeval" >&6; }
18287 if test $gl_cv_sys_struct_timeval != yes; then
18288 HAVE_STRUCT_TIMEVAL=0
18289 else
18290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
18291$as_echo_n "checking for wide-enough struct timeval.tv_sec member... " >&6; }
18292if test "${gl_cv_sys_struct_timeval_tv_sec+set}" = set; then :
18293 $as_echo_n "(cached) " >&6
18294else
18295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18296/* end confdefs.h. */
18297#if HAVE_SYS_TIME_H
18298 #include <sys/time.h>
18299 #endif
18300 #include <time.h>
18301 #if HAVE_WINSOCK2_H
18302 # include <winsock2.h>
18303 #endif
f199cab1 18304
5476a9a4
GM
18305int
18306main ()
18307{
18308static struct timeval x;
18309 typedef int verify_tv_sec_type[
18310 sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
18311 ];
f199cab1 18312
5476a9a4
GM
18313 ;
18314 return 0;
18315}
18316_ACEOF
18317if ac_fn_c_try_compile "$LINENO"; then :
18318 gl_cv_sys_struct_timeval_tv_sec=yes
18319else
18320 gl_cv_sys_struct_timeval_tv_sec=no
18321fi
18322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 18323
5476a9a4
GM
18324fi
18325{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
18326$as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
18327 if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
18328 REPLACE_STRUCT_TIMEVAL=1
18329 fi
18330 fi
f199cab1 18331
f199cab1
GM
18332
18333
18334
18335
18336
f199cab1 18337
5476a9a4
GM
18338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
18339$as_echo_n "checking for unsigned long long int... " >&6; }
18340if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then :
18341 $as_echo_n "(cached) " >&6
18342else
18343 ac_cv_type_unsigned_long_long_int=yes
18344 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
18345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18346/* end confdefs.h. */
f199cab1 18347
5476a9a4
GM
18348 /* For now, do not test the preprocessor; as of 2007 there are too many
18349 implementations with broken preprocessors. Perhaps this can
18350 be revisited in 2012. In the meantime, code should not expect
18351 #if to work with literals wider than 32 bits. */
18352 /* Test literals. */
18353 long long int ll = 9223372036854775807ll;
18354 long long int nll = -9223372036854775807LL;
18355 unsigned long long int ull = 18446744073709551615ULL;
18356 /* Test constant expressions. */
18357 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
18358 ? 1 : -1)];
18359 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
18360 ? 1 : -1)];
18361 int i = 63;
18362int
18363main ()
18364{
18365/* Test availability of runtime routines for shift and division. */
18366 long long int llmax = 9223372036854775807ll;
18367 unsigned long long int ullmax = 18446744073709551615ull;
18368 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
18369 | (llmax / ll) | (llmax % ll)
18370 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
18371 | (ullmax / ull) | (ullmax % ull));
18372 ;
18373 return 0;
18374}
f199cab1 18375
e275c824 18376_ACEOF
5476a9a4 18377if ac_fn_c_try_link "$LINENO"; then :
3e0be4ab 18378
5476a9a4
GM
18379else
18380 ac_cv_type_unsigned_long_long_int=no
e275c824 18381fi
5476a9a4
GM
18382rm -f core conftest.err conftest.$ac_objext \
18383 conftest$ac_exeext conftest.$ac_ext
18384 fi
18385fi
18386{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
18387$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
18388 if test $ac_cv_type_unsigned_long_long_int = yes; then
e275c824 18389
5476a9a4 18390$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
e275c824 18391
5476a9a4 18392 fi
e275c824
PE
18393
18394
f199cab1 18395
5476a9a4
GM
18396 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
18397$as_echo_n "checking for long long int... " >&6; }
18398if test "${ac_cv_type_long_long_int+set}" = set; then :
18399 $as_echo_n "(cached) " >&6
18400else
18401 ac_cv_type_long_long_int=yes
18402 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
18403 ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
18404 if test $ac_cv_type_long_long_int = yes; then
18405 if test "$cross_compiling" = yes; then :
f199cab1 18406 :
5476a9a4
GM
18407else
18408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18409/* end confdefs.h. */
18410#include <limits.h>
18411 #ifndef LLONG_MAX
18412 # define HALF \
18413 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
18414 # define LLONG_MAX (HALF - 1 + HALF)
18415 #endif
18416int
18417main ()
18418{
18419long long int n = 1;
18420 int i;
18421 for (i = 0; ; i++)
18422 {
18423 long long int m = n << i;
18424 if (m >> i != n)
18425 return 1;
18426 if (LLONG_MAX / 2 < m)
18427 break;
18428 }
18429 return 0;
18430 ;
18431 return 0;
18432}
18433_ACEOF
18434if ac_fn_c_try_run "$LINENO"; then :
18435
18436else
18437 ac_cv_type_long_long_int=no
18438fi
18439rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18440 conftest.$ac_objext conftest.beam conftest.$ac_ext
18441fi
e275c824 18442
5476a9a4
GM
18443 fi
18444 fi
1f5d53eb 18445fi
5476a9a4
GM
18446{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
18447$as_echo "$ac_cv_type_long_long_int" >&6; }
18448 if test $ac_cv_type_long_long_int = yes; then
e275c824 18449
5476a9a4 18450$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
e275c824 18451
5476a9a4 18452 fi
e275c824
PE
18453
18454
e275c824
PE
18455
18456
18457
18458
5476a9a4
GM
18459 gl_cv_c_multiarch=no
18460 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18461/* end confdefs.h. */
18462#ifndef __APPLE_CC__
18463 not a universal capable compiler
18464 #endif
18465 typedef int dummy;
e275c824 18466
5476a9a4
GM
18467_ACEOF
18468if ac_fn_c_try_compile "$LINENO"; then :
e275c824 18469
5476a9a4
GM
18470 arch=
18471 prev=
18472 for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
18473 if test -n "$prev"; then
18474 case $word in
18475 i?86 | x86_64 | ppc | ppc64)
18476 if test -z "$arch" || test "$arch" = "$word"; then
18477 arch="$word"
18478 else
18479 gl_cv_c_multiarch=yes
18480 fi
18481 ;;
18482 esac
18483 prev=
18484 else
18485 if test "x$word" = "x-arch"; then
18486 prev=arch
18487 fi
18488 fi
18489 done
f199cab1 18490
f199cab1 18491fi
5476a9a4
GM
18492rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18493 if test $gl_cv_c_multiarch = yes; then
18494 APPLE_UNIVERSAL_BUILD=1
18495 else
18496 APPLE_UNIVERSAL_BUILD=0
18497 fi
e275c824
PE
18498
18499
67342916 18500
67342916 18501
67342916 18502
5476a9a4
GM
18503 if test $ac_cv_type_long_long_int = yes; then
18504 HAVE_LONG_LONG_INT=1
18505 else
18506 HAVE_LONG_LONG_INT=0
18507 fi
e275c824 18508
e275c824 18509
5476a9a4
GM
18510 if test $ac_cv_type_unsigned_long_long_int = yes; then
18511 HAVE_UNSIGNED_LONG_LONG_INT=1
18512 else
18513 HAVE_UNSIGNED_LONG_LONG_INT=0
18514 fi
e275c824
PE
18515
18516
18517
5476a9a4
GM
18518 if test $ac_cv_header_wchar_h = yes; then
18519 HAVE_WCHAR_H=1
18520 else
18521 HAVE_WCHAR_H=0
18522 fi
e275c824 18523
e275c824 18524
5476a9a4
GM
18525 if test $ac_cv_header_inttypes_h = yes; then
18526 HAVE_INTTYPES_H=1
18527 else
18528 HAVE_INTTYPES_H=0
18529 fi
6c051bab 18530
942f733f 18531
5476a9a4
GM
18532 if test $ac_cv_header_sys_types_h = yes; then
18533 HAVE_SYS_TYPES_H=1
18534 else
18535 HAVE_SYS_TYPES_H=0
18536 fi
4fc2b746 18537
4fc2b746 18538
f199cab1
GM
18539
18540
18541
18542
18543
18544
18545
18546
18547
5476a9a4
GM
18548 if test $gl_cv_have_include_next = yes; then
18549 gl_cv_next_stdint_h='<'stdint.h'>'
18550 else
18551 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
18552$as_echo_n "checking absolute name of <stdint.h>... " >&6; }
18553if test "${gl_cv_next_stdint_h+set}" = set; then :
18554 $as_echo_n "(cached) " >&6
18555else
f199cab1 18556
5476a9a4 18557 if test $ac_cv_header_stdint_h = yes; then
f199cab1
GM
18558
18559
5476a9a4
GM
18560 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18561/* end confdefs.h. */
18562#include <stdint.h>
f199cab1 18563
5476a9a4
GM
18564_ACEOF
18565 case "$host_os" in
18566 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18567 *) gl_absname_cpp="$ac_cpp" ;;
18568 esac
f199cab1 18569
5476a9a4
GM
18570 case "$host_os" in
18571 mingw*)
18572 gl_dirsep_regex='[/\\]'
18573 ;;
18574 *)
18575 gl_dirsep_regex='\/'
18576 ;;
18577 esac
18578 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
4fc2b746 18579
5476a9a4
GM
18580 gl_header_literal_regex=`echo 'stdint.h' \
18581 | sed -e "$gl_make_literal_regex_sed"`
18582 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18583 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18584 s|^/[^/]|//&|
18585 p
18586 q
18587 }'
18588 gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18589 sed -n "$gl_absolute_header_sed"`'"'
18590 else
18591 gl_cv_next_stdint_h='<'stdint.h'>'
18592 fi
4fc2b746 18593
4fc2b746 18594
5476a9a4
GM
18595fi
18596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
18597$as_echo "$gl_cv_next_stdint_h" >&6; }
18598 fi
18599 NEXT_STDINT_H=$gl_cv_next_stdint_h
b0415a03 18600
5476a9a4
GM
18601 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18602 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18603 gl_next_as_first_directive='<'stdint.h'>'
18604 else
18605 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18606 gl_next_as_first_directive=$gl_cv_next_stdint_h
18607 fi
18608 NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
b0415a03 18609
4fc2b746 18610
f199cab1 18611
f199cab1 18612
5476a9a4
GM
18613 if test $ac_cv_header_stdint_h = yes; then
18614 HAVE_STDINT_H=1
18615 else
18616 HAVE_STDINT_H=0
18617 fi
f199cab1
GM
18618
18619
5476a9a4
GM
18620 if test $ac_cv_header_stdint_h = yes; then
18621 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
18622$as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
18623if test "${gl_cv_header_working_stdint_h+set}" = set; then :
f199cab1
GM
18624 $as_echo_n "(cached) " >&6
18625else
5476a9a4
GM
18626 gl_cv_header_working_stdint_h=no
18627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18628/* end confdefs.h. */
4fc2b746
GM
18629
18630
5476a9a4
GM
18631#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
18632#include <stdint.h>
18633/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
18634#if !(defined WCHAR_MIN && defined WCHAR_MAX)
18635#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
18636#endif
4fc2b746 18637
942f733f 18638
5476a9a4
GM
18639 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18640 included before <wchar.h>. */
18641 #include <stddef.h>
18642 #include <signal.h>
18643 #if HAVE_WCHAR_H
18644 # include <stdio.h>
18645 # include <time.h>
18646 # include <wchar.h>
18647 #endif
e275c824 18648
f199cab1 18649
5476a9a4
GM
18650#ifdef INT8_MAX
18651int8_t a1 = INT8_MAX;
18652int8_t a1min = INT8_MIN;
18653#endif
18654#ifdef INT16_MAX
18655int16_t a2 = INT16_MAX;
18656int16_t a2min = INT16_MIN;
18657#endif
18658#ifdef INT32_MAX
18659int32_t a3 = INT32_MAX;
18660int32_t a3min = INT32_MIN;
18661#endif
18662#ifdef INT64_MAX
18663int64_t a4 = INT64_MAX;
18664int64_t a4min = INT64_MIN;
18665#endif
18666#ifdef UINT8_MAX
18667uint8_t b1 = UINT8_MAX;
18668#else
18669typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
18670#endif
18671#ifdef UINT16_MAX
18672uint16_t b2 = UINT16_MAX;
18673#endif
18674#ifdef UINT32_MAX
18675uint32_t b3 = UINT32_MAX;
18676#endif
18677#ifdef UINT64_MAX
18678uint64_t b4 = UINT64_MAX;
18679#endif
18680int_least8_t c1 = INT8_C (0x7f);
18681int_least8_t c1max = INT_LEAST8_MAX;
18682int_least8_t c1min = INT_LEAST8_MIN;
18683int_least16_t c2 = INT16_C (0x7fff);
18684int_least16_t c2max = INT_LEAST16_MAX;
18685int_least16_t c2min = INT_LEAST16_MIN;
18686int_least32_t c3 = INT32_C (0x7fffffff);
18687int_least32_t c3max = INT_LEAST32_MAX;
18688int_least32_t c3min = INT_LEAST32_MIN;
18689int_least64_t c4 = INT64_C (0x7fffffffffffffff);
18690int_least64_t c4max = INT_LEAST64_MAX;
18691int_least64_t c4min = INT_LEAST64_MIN;
18692uint_least8_t d1 = UINT8_C (0xff);
18693uint_least8_t d1max = UINT_LEAST8_MAX;
18694uint_least16_t d2 = UINT16_C (0xffff);
18695uint_least16_t d2max = UINT_LEAST16_MAX;
18696uint_least32_t d3 = UINT32_C (0xffffffff);
18697uint_least32_t d3max = UINT_LEAST32_MAX;
18698uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
18699uint_least64_t d4max = UINT_LEAST64_MAX;
18700int_fast8_t e1 = INT_FAST8_MAX;
18701int_fast8_t e1min = INT_FAST8_MIN;
18702int_fast16_t e2 = INT_FAST16_MAX;
18703int_fast16_t e2min = INT_FAST16_MIN;
18704int_fast32_t e3 = INT_FAST32_MAX;
18705int_fast32_t e3min = INT_FAST32_MIN;
18706int_fast64_t e4 = INT_FAST64_MAX;
18707int_fast64_t e4min = INT_FAST64_MIN;
18708uint_fast8_t f1 = UINT_FAST8_MAX;
18709uint_fast16_t f2 = UINT_FAST16_MAX;
18710uint_fast32_t f3 = UINT_FAST32_MAX;
18711uint_fast64_t f4 = UINT_FAST64_MAX;
18712#ifdef INTPTR_MAX
18713intptr_t g = INTPTR_MAX;
18714intptr_t gmin = INTPTR_MIN;
18715#endif
18716#ifdef UINTPTR_MAX
18717uintptr_t h = UINTPTR_MAX;
18718#endif
18719intmax_t i = INTMAX_MAX;
18720uintmax_t j = UINTMAX_MAX;
5fa4ac76 18721
5476a9a4
GM
18722#include <limits.h> /* for CHAR_BIT */
18723#define TYPE_MINIMUM(t) \
18724 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
18725#define TYPE_MAXIMUM(t) \
18726 ((t) ((t) 0 < (t) -1 \
18727 ? (t) -1 \
18728 : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
18729struct s {
18730 int check_PTRDIFF:
18731 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
18732 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
18733 ? 1 : -1;
18734 /* Detect bug in FreeBSD 6.0 / ia64. */
18735 int check_SIG_ATOMIC:
18736 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
18737 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
18738 ? 1 : -1;
18739 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
18740 int check_WCHAR:
18741 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
18742 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
18743 ? 1 : -1;
18744 /* Detect bug in mingw. */
18745 int check_WINT:
18746 WINT_MIN == TYPE_MINIMUM (wint_t)
18747 && WINT_MAX == TYPE_MAXIMUM (wint_t)
18748 ? 1 : -1;
5fa4ac76 18749
5476a9a4
GM
18750 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
18751 int check_UINT8_C:
18752 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
18753 int check_UINT16_C:
18754 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
18755
18756 /* Detect bugs in OpenBSD 3.9 stdint.h. */
18757#ifdef UINT8_MAX
18758 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
3e0be4ab 18759#endif
5476a9a4
GM
18760#ifdef UINT16_MAX
18761 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
18762#endif
18763#ifdef UINT32_MAX
18764 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
18765#endif
18766#ifdef UINT64_MAX
18767 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
18768#endif
18769 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
18770 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
18771 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
18772 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
18773 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
18774 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
18775 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
18776 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
18777 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
18778 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
18779 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
18780};
18781
f199cab1
GM
18782int
18783main ()
18784{
5476a9a4 18785
f199cab1
GM
18786 ;
18787 return 0;
18788}
18789_ACEOF
5476a9a4
GM
18790if ac_fn_c_try_compile "$LINENO"; then :
18791 if test "$cross_compiling" = yes; then :
18792 gl_cv_header_working_stdint_h=yes
40e27e7f 18793
5476a9a4
GM
18794else
18795 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18796/* end confdefs.h. */
40e27e7f 18797
f199cab1 18798
5476a9a4
GM
18799#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
18800#include <stdint.h>
f199cab1
GM
18801
18802
5476a9a4
GM
18803 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18804 included before <wchar.h>. */
18805 #include <stddef.h>
18806 #include <signal.h>
18807 #if HAVE_WCHAR_H
18808 # include <stdio.h>
18809 # include <time.h>
18810 # include <wchar.h>
18811 #endif
f199cab1 18812
d87ffdb7 18813
5476a9a4
GM
18814#include <stdio.h>
18815#include <string.h>
18816#define MVAL(macro) MVAL1(macro)
18817#define MVAL1(expression) #expression
18818static const char *macro_values[] =
18819 {
18820#ifdef INT8_MAX
18821 MVAL (INT8_MAX),
18822#endif
18823#ifdef INT16_MAX
18824 MVAL (INT16_MAX),
18825#endif
18826#ifdef INT32_MAX
18827 MVAL (INT32_MAX),
18828#endif
18829#ifdef INT64_MAX
18830 MVAL (INT64_MAX),
18831#endif
18832#ifdef UINT8_MAX
18833 MVAL (UINT8_MAX),
18834#endif
18835#ifdef UINT16_MAX
18836 MVAL (UINT16_MAX),
18837#endif
18838#ifdef UINT32_MAX
18839 MVAL (UINT32_MAX),
18840#endif
18841#ifdef UINT64_MAX
18842 MVAL (UINT64_MAX),
18843#endif
18844 NULL
18845 };
f199cab1 18846
3e0be4ab
GM
18847int
18848main ()
18849{
5476a9a4
GM
18850
18851 const char **mv;
18852 for (mv = macro_values; *mv != NULL; mv++)
18853 {
18854 const char *value = *mv;
18855 /* Test whether it looks like a cast expression. */
18856 if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
18857 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
18858 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
18859 || strncmp (value, "((int)"/*)*/, 6) == 0
18860 || strncmp (value, "((signed short)"/*)*/, 15) == 0
18861 || strncmp (value, "((signed char)"/*)*/, 14) == 0)
18862 return mv - macro_values + 1;
18863 }
3e0be4ab 18864 return 0;
5476a9a4 18865
f199cab1
GM
18866 ;
18867 return 0;
18868}
18869_ACEOF
5476a9a4
GM
18870if ac_fn_c_try_run "$LINENO"; then :
18871 gl_cv_header_working_stdint_h=yes
f199cab1 18872fi
5476a9a4
GM
18873rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18874 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1
GM
18875fi
18876
d87ffdb7 18877
5476a9a4
GM
18878fi
18879rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d87ffdb7 18880
5476a9a4
GM
18881fi
18882{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
18883$as_echo "$gl_cv_header_working_stdint_h" >&6; }
18884 fi
18885 if test "$gl_cv_header_working_stdint_h" = yes; then
18886 STDINT_H=
18887 else
18888 for ac_header in sys/inttypes.h sys/bitypes.h
18889do :
18890 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
18891ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
18892eval as_val=\$$as_ac_Header
18893 if test "x$as_val" = x""yes; then :
18894 cat >>confdefs.h <<_ACEOF
18895#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
18896_ACEOF
d87ffdb7 18897
5476a9a4 18898fi
d87ffdb7 18899
5476a9a4 18900done
7d2a1c5e 18901
5476a9a4
GM
18902 if test $ac_cv_header_sys_inttypes_h = yes; then
18903 HAVE_SYS_INTTYPES_H=1
18904 else
18905 HAVE_SYS_INTTYPES_H=0
18906 fi
7d2a1c5e 18907
5476a9a4
GM
18908 if test $ac_cv_header_sys_bitypes_h = yes; then
18909 HAVE_SYS_BITYPES_H=1
18910 else
18911 HAVE_SYS_BITYPES_H=0
18912 fi
7d2a1c5e 18913
f199cab1
GM
18914
18915
18916
5476a9a4 18917 if test $APPLE_UNIVERSAL_BUILD = 0; then
f199cab1
GM
18918
18919
5476a9a4
GM
18920 for gltype in ptrdiff_t size_t ; do
18921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
18922$as_echo_n "checking for bit size of $gltype... " >&6; }
18923if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
18924 $as_echo_n "(cached) " >&6
18925else
18926 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
18927 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18928 included before <wchar.h>. */
18929 #include <stddef.h>
18930 #include <signal.h>
18931 #if HAVE_WCHAR_H
18932 # include <stdio.h>
18933 # include <time.h>
18934 # include <wchar.h>
18935 #endif
f199cab1 18936
5476a9a4 18937#include <limits.h>"; then :
f199cab1 18938
5476a9a4
GM
18939else
18940 result=unknown
18941fi
f199cab1 18942
5476a9a4 18943 eval gl_cv_bitsizeof_${gltype}=\$result
f199cab1 18944
5476a9a4
GM
18945fi
18946eval ac_res=\$gl_cv_bitsizeof_${gltype}
18947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18948$as_echo "$ac_res" >&6; }
18949 eval result=\$gl_cv_bitsizeof_${gltype}
18950 if test $result = unknown; then
18951 result=0
18952 fi
18953 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
18954 cat >>confdefs.h <<_ACEOF
18955#define BITSIZEOF_${GLTYPE} $result
18956_ACEOF
f199cab1 18957
5476a9a4
GM
18958 eval BITSIZEOF_${GLTYPE}=\$result
18959 done
f199cab1
GM
18960
18961
5476a9a4 18962 fi
f199cab1
GM
18963
18964
5476a9a4
GM
18965 for gltype in sig_atomic_t wchar_t wint_t ; do
18966 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
18967$as_echo_n "checking for bit size of $gltype... " >&6; }
18968if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
18969 $as_echo_n "(cached) " >&6
18970else
18971 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
18972 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18973 included before <wchar.h>. */
18974 #include <stddef.h>
18975 #include <signal.h>
18976 #if HAVE_WCHAR_H
18977 # include <stdio.h>
18978 # include <time.h>
18979 # include <wchar.h>
18980 #endif
f199cab1 18981
5476a9a4 18982#include <limits.h>"; then :
f199cab1 18983
f199cab1 18984else
5476a9a4 18985 result=unknown
7d2a1c5e 18986fi
7d2a1c5e 18987
5476a9a4 18988 eval gl_cv_bitsizeof_${gltype}=\$result
7d2a1c5e 18989
3e0be4ab 18990fi
5476a9a4
GM
18991eval ac_res=\$gl_cv_bitsizeof_${gltype}
18992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18993$as_echo "$ac_res" >&6; }
18994 eval result=\$gl_cv_bitsizeof_${gltype}
18995 if test $result = unknown; then
18996 result=0
18997 fi
18998 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
18999 cat >>confdefs.h <<_ACEOF
19000#define BITSIZEOF_${GLTYPE} $result
3e0be4ab 19001_ACEOF
7d2a1c5e 19002
5476a9a4
GM
19003 eval BITSIZEOF_${GLTYPE}=\$result
19004 done
7d2a1c5e
GM
19005
19006
5476a9a4
GM
19007
19008
19009 for gltype in sig_atomic_t wchar_t wint_t ; do
19010 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
19011$as_echo_n "checking whether $gltype is signed... " >&6; }
19012if { as_var=gl_cv_type_${gltype}_signed; eval "test \"\${$as_var+set}\" = set"; }; then :
3e0be4ab
GM
19013 $as_echo_n "(cached) " >&6
19014else
f199cab1
GM
19015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19016/* end confdefs.h. */
f199cab1 19017
5476a9a4
GM
19018 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19019 included before <wchar.h>. */
19020 #include <stddef.h>
19021 #include <signal.h>
19022 #if HAVE_WCHAR_H
19023 # include <stdio.h>
19024 # include <time.h>
19025 # include <wchar.h>
19026 #endif
19027
19028 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
f199cab1
GM
19029int
19030main ()
19031{
5476a9a4 19032
f199cab1
GM
19033 ;
19034 return 0;
19035}
19036_ACEOF
19037if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4 19038 result=yes
f199cab1 19039else
5476a9a4 19040 result=no
f199cab1
GM
19041fi
19042rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5476a9a4 19043 eval gl_cv_type_${gltype}_signed=\$result
7d2a1c5e 19044
3e0be4ab 19045fi
5476a9a4
GM
19046eval ac_res=\$gl_cv_type_${gltype}_signed
19047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
19048$as_echo "$ac_res" >&6; }
19049 eval result=\$gl_cv_type_${gltype}_signed
19050 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
19051 if test "$result" = yes; then
19052 cat >>confdefs.h <<_ACEOF
19053#define HAVE_SIGNED_${GLTYPE} 1
f199cab1 19054_ACEOF
d87ffdb7 19055
5476a9a4
GM
19056 eval HAVE_SIGNED_${GLTYPE}=1
19057 else
19058 eval HAVE_SIGNED_${GLTYPE}=0
19059 fi
19060 done
f199cab1 19061
e275c824 19062
5476a9a4
GM
19063 gl_cv_type_ptrdiff_t_signed=yes
19064 gl_cv_type_size_t_signed=no
19065 if test $APPLE_UNIVERSAL_BUILD = 0; then
e275c824 19066
e275c824 19067
5476a9a4
GM
19068 for gltype in ptrdiff_t size_t ; do
19069 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
19070$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
19071if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
16c3e636
PE
19072 $as_echo_n "(cached) " >&6
19073else
5476a9a4
GM
19074 eval gl_cv_type_${gltype}_suffix=no
19075 eval result=\$gl_cv_type_${gltype}_signed
19076 if test "$result" = yes; then
19077 glsufu=
19078 else
19079 glsufu=u
19080 fi
19081 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
19082 case $glsuf in
19083 '') gltype1='int';;
19084 l) gltype1='long int';;
19085 ll) gltype1='long long int';;
19086 i64) gltype1='__int64';;
19087 u) gltype1='unsigned int';;
19088 ul) gltype1='unsigned long int';;
19089 ull) gltype1='unsigned long long int';;
19090 ui64)gltype1='unsigned __int64';;
19091 esac
19092 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 19093/* end confdefs.h. */
16c3e636 19094
5476a9a4
GM
19095 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19096 included before <wchar.h>. */
19097 #include <stddef.h>
19098 #include <signal.h>
19099 #if HAVE_WCHAR_H
19100 # include <stdio.h>
19101 # include <time.h>
19102 # include <wchar.h>
19103 #endif
1f5d53eb 19104
5476a9a4
GM
19105 extern $gltype foo;
19106 extern $gltype1 foo;
f199cab1
GM
19107int
19108main ()
19109{
5476a9a4 19110
f199cab1
GM
19111 ;
19112 return 0;
19113}
19114_ACEOF
19115if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4 19116 eval gl_cv_type_${gltype}_suffix=\$glsuf
f199cab1
GM
19117fi
19118rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5476a9a4
GM
19119 eval result=\$gl_cv_type_${gltype}_suffix
19120 test "$result" != no && break
19121 done
f199cab1 19122fi
5476a9a4
GM
19123eval ac_res=\$gl_cv_type_${gltype}_suffix
19124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
19125$as_echo "$ac_res" >&6; }
19126 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
19127 eval result=\$gl_cv_type_${gltype}_suffix
19128 test "$result" = no && result=
19129 eval ${GLTYPE}_SUFFIX=\$result
19130 cat >>confdefs.h <<_ACEOF
19131#define ${GLTYPE}_SUFFIX $result
19132_ACEOF
16c3e636 19133
5476a9a4 19134 done
16c3e636 19135
3e0be4ab 19136
5476a9a4
GM
19137 fi
19138
19139
19140 for gltype in sig_atomic_t wchar_t wint_t ; do
19141 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
19142$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
19143if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
1fd182f0
PE
19144 $as_echo_n "(cached) " >&6
19145else
5476a9a4
GM
19146 eval gl_cv_type_${gltype}_suffix=no
19147 eval result=\$gl_cv_type_${gltype}_signed
19148 if test "$result" = yes; then
19149 glsufu=
19150 else
19151 glsufu=u
19152 fi
19153 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
19154 case $glsuf in
19155 '') gltype1='int';;
19156 l) gltype1='long int';;
19157 ll) gltype1='long long int';;
19158 i64) gltype1='__int64';;
19159 u) gltype1='unsigned int';;
19160 ul) gltype1='unsigned long int';;
19161 ull) gltype1='unsigned long long int';;
19162 ui64)gltype1='unsigned __int64';;
19163 esac
19164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1fd182f0 19165/* end confdefs.h. */
5476a9a4
GM
19166
19167 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19168 included before <wchar.h>. */
19169 #include <stddef.h>
19170 #include <signal.h>
19171 #if HAVE_WCHAR_H
19172 # include <stdio.h>
19173 # include <time.h>
19174 # include <wchar.h>
19175 #endif
19176
19177 extern $gltype foo;
19178 extern $gltype1 foo;
1fd182f0
PE
19179int
19180main ()
19181{
5476a9a4 19182
1fd182f0
PE
19183 ;
19184 return 0;
19185}
19186_ACEOF
3e0be4ab 19187if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4 19188 eval gl_cv_type_${gltype}_suffix=\$glsuf
1f5d53eb 19189fi
3e0be4ab 19190rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5476a9a4
GM
19191 eval result=\$gl_cv_type_${gltype}_suffix
19192 test "$result" != no && break
19193 done
f199cab1 19194fi
5476a9a4
GM
19195eval ac_res=\$gl_cv_type_${gltype}_suffix
19196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
19197$as_echo "$ac_res" >&6; }
19198 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
19199 eval result=\$gl_cv_type_${gltype}_suffix
19200 test "$result" = no && result=
19201 eval ${GLTYPE}_SUFFIX=\$result
19202 cat >>confdefs.h <<_ACEOF
19203#define ${GLTYPE}_SUFFIX $result
f199cab1
GM
19204_ACEOF
19205
5476a9a4 19206 done
f199cab1 19207
f199cab1 19208
f199cab1 19209
5476a9a4
GM
19210 if test $BITSIZEOF_WINT_T -lt 32; then
19211 BITSIZEOF_WINT_T=32
19212 fi
f199cab1 19213
5476a9a4
GM
19214 STDINT_H=stdint.h
19215 fi
f199cab1 19216
5476a9a4
GM
19217 if test -n "$STDINT_H"; then
19218 GL_GENERATE_STDINT_H_TRUE=
19219 GL_GENERATE_STDINT_H_FALSE='#'
19220else
19221 GL_GENERATE_STDINT_H_TRUE='#'
19222 GL_GENERATE_STDINT_H_FALSE=
f199cab1
GM
19223fi
19224
f199cab1 19225
f199cab1 19226
3e0be4ab 19227
f199cab1 19228
5476a9a4
GM
19229 GNULIB_IMAXABS=0;
19230 GNULIB_IMAXDIV=0;
19231 GNULIB_STRTOIMAX=0;
19232 GNULIB_STRTOUMAX=0;
19233 HAVE_DECL_IMAXABS=1;
19234 HAVE_DECL_IMAXDIV=1;
19235 HAVE_DECL_STRTOIMAX=1;
19236 HAVE_DECL_STRTOUMAX=1;
19237 REPLACE_STRTOIMAX=0;
19238 INT32_MAX_LT_INTMAX_MAX=1;
19239 INT64_MAX_EQ_LONG_MAX='defined _LP64';
19240 PRI_MACROS_BROKEN=0;
19241 PRIPTR_PREFIX=__PRIPTR_PREFIX;
19242 UINT32_MAX_LT_UINTMAX_MAX=1;
19243 UINT64_MAX_EQ_ULONG_MAX='defined _LP64';
1fd182f0 19244
1fd182f0 19245
1f5d53eb 19246
3e0be4ab
GM
19247
19248
1fd182f0 19249
3e0be4ab 19250
3e0be4ab 19251
f199cab1 19252
1fd182f0 19253
1f5d53eb 19254
1f5d53eb 19255
1f5d53eb 19256
3e0be4ab 19257
3e0be4ab 19258
5476a9a4
GM
19259 if test $gl_cv_have_include_next = yes; then
19260 gl_cv_next_inttypes_h='<'inttypes.h'>'
19261 else
19262 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
19263$as_echo_n "checking absolute name of <inttypes.h>... " >&6; }
19264if test "${gl_cv_next_inttypes_h+set}" = set; then :
19265 $as_echo_n "(cached) " >&6
f199cab1 19266else
2b1928b8 19267
5476a9a4 19268 if test $ac_cv_header_inttypes_h = yes; then
3e0be4ab
GM
19269
19270
5476a9a4 19271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 19272/* end confdefs.h. */
5476a9a4 19273#include <inttypes.h>
3e0be4ab 19274
f199cab1 19275_ACEOF
5476a9a4
GM
19276 case "$host_os" in
19277 aix*) gl_absname_cpp="$ac_cpp -C" ;;
19278 *) gl_absname_cpp="$ac_cpp" ;;
19279 esac
1fd182f0 19280
5476a9a4
GM
19281 case "$host_os" in
19282 mingw*)
19283 gl_dirsep_regex='[/\\]'
19284 ;;
19285 *)
19286 gl_dirsep_regex='\/'
19287 ;;
19288 esac
19289 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
1fd182f0 19290
5476a9a4
GM
19291 gl_header_literal_regex=`echo 'inttypes.h' \
19292 | sed -e "$gl_make_literal_regex_sed"`
19293 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19294 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19295 s|^/[^/]|//&|
19296 p
19297 q
19298 }'
19299 gl_cv_next_inttypes_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19300 sed -n "$gl_absolute_header_sed"`'"'
19301 else
19302 gl_cv_next_inttypes_h='<'inttypes.h'>'
19303 fi
1fd182f0
PE
19304
19305
5476a9a4
GM
19306fi
19307{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
19308$as_echo "$gl_cv_next_inttypes_h" >&6; }
19309 fi
19310 NEXT_INTTYPES_H=$gl_cv_next_inttypes_h
1fd182f0 19311
5476a9a4
GM
19312 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19313 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19314 gl_next_as_first_directive='<'inttypes.h'>'
19315 else
19316 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19317 gl_next_as_first_directive=$gl_cv_next_inttypes_h
19318 fi
19319 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
34119902
GM
19320
19321
3e0be4ab 19322
34119902 19323
3e0be4ab 19324
34119902 19325
b0415a03 19326
b0415a03 19327
3e0be4ab 19328
34119902 19329
34119902 19330
5476a9a4
GM
19331 case "$host_os" in
19332 mingw*)
19333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
19334$as_echo_n "checking for 64-bit off_t... " >&6; }
19335if test "${gl_cv_type_off_t_64+set}" = set; then :
f199cab1
GM
19336 $as_echo_n "(cached) " >&6
19337else
5476a9a4
GM
19338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19339/* end confdefs.h. */
19340#include <sys/types.h>
19341 int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
19342
19343int
19344main ()
19345{
19346
19347 ;
19348 return 0;
19349}
f199cab1 19350_ACEOF
5476a9a4
GM
19351if ac_fn_c_try_compile "$LINENO"; then :
19352 gl_cv_type_off_t_64=yes
19353else
19354 gl_cv_type_off_t_64=no
f199cab1 19355fi
5476a9a4 19356rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34119902 19357
5476a9a4
GM
19358fi
19359{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
19360$as_echo "$gl_cv_type_off_t_64" >&6; }
19361 if test $gl_cv_type_off_t_64 = no; then
19362 WINDOWS_64_BIT_OFF_T=1
19363 else
19364 WINDOWS_64_BIT_OFF_T=0
19365 fi
19366 WINDOWS_64_BIT_ST_SIZE=1
19367 ;;
19368 *)
19369 WINDOWS_64_BIT_OFF_T=0
19370 WINDOWS_64_BIT_ST_SIZE=0
19371 ;;
19372 esac
34119902
GM
19373
19374
34119902
GM
19375
19376
283c7aed
GM
19377 GNULIB_FFSL=0;
19378 GNULIB_FFSLL=0;
19379 GNULIB_MEMCHR=0;
19380 GNULIB_MEMMEM=0;
19381 GNULIB_MEMPCPY=0;
19382 GNULIB_MEMRCHR=0;
19383 GNULIB_RAWMEMCHR=0;
19384 GNULIB_STPCPY=0;
19385 GNULIB_STPNCPY=0;
19386 GNULIB_STRCHRNUL=0;
19387 GNULIB_STRDUP=0;
19388 GNULIB_STRNCAT=0;
19389 GNULIB_STRNDUP=0;
19390 GNULIB_STRNLEN=0;
19391 GNULIB_STRPBRK=0;
19392 GNULIB_STRSEP=0;
19393 GNULIB_STRSTR=0;
19394 GNULIB_STRCASESTR=0;
19395 GNULIB_STRTOK_R=0;
19396 GNULIB_MBSLEN=0;
19397 GNULIB_MBSNLEN=0;
19398 GNULIB_MBSCHR=0;
19399 GNULIB_MBSRCHR=0;
19400 GNULIB_MBSSTR=0;
19401 GNULIB_MBSCASECMP=0;
19402 GNULIB_MBSNCASECMP=0;
19403 GNULIB_MBSPCASECMP=0;
19404 GNULIB_MBSCASESTR=0;
19405 GNULIB_MBSCSPN=0;
19406 GNULIB_MBSPBRK=0;
19407 GNULIB_MBSSPN=0;
19408 GNULIB_MBSSEP=0;
19409 GNULIB_MBSTOK_R=0;
19410 GNULIB_STRERROR=0;
19411 GNULIB_STRERROR_R=0;
19412 GNULIB_STRSIGNAL=0;
19413 GNULIB_STRVERSCMP=0;
19414 HAVE_MBSLEN=0;
19415 HAVE_FFSL=1;
19416 HAVE_FFSLL=1;
19417 HAVE_MEMCHR=1;
19418 HAVE_DECL_MEMMEM=1;
19419 HAVE_MEMPCPY=1;
19420 HAVE_DECL_MEMRCHR=1;
19421 HAVE_RAWMEMCHR=1;
19422 HAVE_STPCPY=1;
19423 HAVE_STPNCPY=1;
19424 HAVE_STRCHRNUL=1;
19425 HAVE_DECL_STRDUP=1;
19426 HAVE_DECL_STRNDUP=1;
19427 HAVE_DECL_STRNLEN=1;
19428 HAVE_STRPBRK=1;
19429 HAVE_STRSEP=1;
19430 HAVE_STRCASESTR=1;
19431 HAVE_DECL_STRTOK_R=1;
19432 HAVE_DECL_STRERROR_R=1;
19433 HAVE_DECL_STRSIGNAL=1;
19434 HAVE_STRVERSCMP=1;
19435 REPLACE_MEMCHR=0;
19436 REPLACE_MEMMEM=0;
19437 REPLACE_STPNCPY=0;
19438 REPLACE_STRDUP=0;
19439 REPLACE_STRSTR=0;
19440 REPLACE_STRCASESTR=0;
19441 REPLACE_STRCHRNUL=0;
19442 REPLACE_STRERROR=0;
19443 REPLACE_STRERROR_R=0;
19444 REPLACE_STRNCAT=0;
19445 REPLACE_STRNDUP=0;
19446 REPLACE_STRNLEN=0;
19447 REPLACE_STRSIGNAL=0;
19448 REPLACE_STRTOK_R=0;
19449 UNDEFINE_STRTOK_R=0;
19450
19451ac_fn_c_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default"
19452if test "x$ac_cv_have_decl_memrchr" = x""yes; then :
19453 ac_have_decl=1
19454else
19455 ac_have_decl=0
19456fi
19457
19458cat >>confdefs.h <<_ACEOF
19459#define HAVE_DECL_MEMRCHR $ac_have_decl
19460_ACEOF
19461
19462
5476a9a4
GM
19463 GNULIB_MKTIME=0;
19464 GNULIB_NANOSLEEP=0;
19465 GNULIB_STRPTIME=0;
19466 GNULIB_TIMEGM=0;
19467 GNULIB_TIME_R=0;
19468 HAVE_DECL_LOCALTIME_R=1;
19469 HAVE_NANOSLEEP=1;
19470 HAVE_STRPTIME=1;
19471 HAVE_TIMEGM=1;
19472 REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
19473 REPLACE_MKTIME=GNULIB_PORTCHECK;
19474 REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
19475 REPLACE_TIMEGM=GNULIB_PORTCHECK;
34119902 19476
3e0be4ab
GM
19477
19478
19479
5476a9a4
GM
19480 GNULIB_PSELECT=0;
19481 GNULIB_SELECT=0;
19482 HAVE_PSELECT=1;
19483 REPLACE_PSELECT=0;
19484 REPLACE_SELECT=0;
19485
19486
3e0be4ab 19487
5476a9a4
GM
19488
19489
19490
19491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/select.h> is self-contained" >&5
19492$as_echo_n "checking whether <sys/select.h> is self-contained... " >&6; }
19493if test "${gl_cv_header_sys_select_h_selfcontained+set}" = set; then :
f199cab1 19494 $as_echo_n "(cached) " >&6
3e0be4ab 19495else
5476a9a4
GM
19496
19497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3e0be4ab 19498/* end confdefs.h. */
5476a9a4 19499#include <sys/select.h>
3e0be4ab
GM
19500int
19501main ()
19502{
5476a9a4 19503struct timeval b;
3e0be4ab
GM
19504 ;
19505 return 0;
19506}
34119902 19507_ACEOF
f199cab1 19508if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4 19509 gl_cv_header_sys_select_h_selfcontained=yes
3e0be4ab 19510else
5476a9a4 19511 gl_cv_header_sys_select_h_selfcontained=no
3e0be4ab 19512fi
f199cab1 19513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5476a9a4
GM
19514 if test $gl_cv_header_sys_select_h_selfcontained = yes; then
19515 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19516/* end confdefs.h. */
19517#include <sys/select.h>
19518int
19519main ()
19520{
19521int memset; int bzero;
19522 ;
19523 return 0;
19524}
3e0be4ab 19525
5476a9a4
GM
19526_ACEOF
19527if ac_fn_c_try_compile "$LINENO"; then :
f199cab1
GM
19528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19529/* end confdefs.h. */
5476a9a4 19530#include <sys/select.h>
f199cab1
GM
19531int
19532main ()
19533{
5476a9a4
GM
19534
19535 #undef memset
19536 #define memset nonexistent_memset
19537 extern
19538 #ifdef __cplusplus
19539 "C"
19540 #endif
19541 void *memset (void *, int, unsigned long);
19542 #undef bzero
19543 #define bzero nonexistent_bzero
19544 extern
19545 #ifdef __cplusplus
19546 "C"
19547 #endif
19548 void bzero (void *, unsigned long);
19549 fd_set fds;
19550 FD_ZERO (&fds);
19551
f199cab1
GM
19552 ;
19553 return 0;
19554}
5476a9a4 19555
f199cab1 19556_ACEOF
5476a9a4
GM
19557if ac_fn_c_try_link "$LINENO"; then :
19558
f199cab1 19559else
5476a9a4 19560 gl_cv_header_sys_select_h_selfcontained=no
f199cab1 19561fi
5476a9a4
GM
19562rm -f core conftest.err conftest.$ac_objext \
19563 conftest$ac_exeext conftest.$ac_ext
1fd182f0 19564
f199cab1 19565fi
5476a9a4
GM
19566rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19567 fi
1fd182f0 19568
f199cab1 19569fi
5476a9a4
GM
19570{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_select_h_selfcontained" >&5
19571$as_echo "$gl_cv_header_sys_select_h_selfcontained" >&6; }
1fd182f0
PE
19572
19573
b06b1098 19574
0eb775a3
GM
19575
19576
b06b1098 19577
1fd182f0 19578
1fd182f0 19579
5476a9a4
GM
19580
19581 if test $gl_cv_have_include_next = yes; then
19582 gl_cv_next_sys_select_h='<'sys/select.h'>'
19583 else
19584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/select.h>" >&5
19585$as_echo_n "checking absolute name of <sys/select.h>... " >&6; }
19586if test "${gl_cv_next_sys_select_h+set}" = set; then :
f199cab1 19587 $as_echo_n "(cached) " >&6
3e0be4ab 19588else
1fd182f0 19589
5476a9a4
GM
19590 if test $ac_cv_header_sys_select_h = yes; then
19591
19592
19593 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19594/* end confdefs.h. */
19595#include <sys/select.h>
19596
19597_ACEOF
19598 case "$host_os" in
19599 aix*) gl_absname_cpp="$ac_cpp -C" ;;
19600 *) gl_absname_cpp="$ac_cpp" ;;
19601 esac
19602
19603 case "$host_os" in
19604 mingw*)
19605 gl_dirsep_regex='[/\\]'
19606 ;;
19607 *)
19608 gl_dirsep_regex='\/'
19609 ;;
19610 esac
19611 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
19612
19613 gl_header_literal_regex=`echo 'sys/select.h' \
19614 | sed -e "$gl_make_literal_regex_sed"`
19615 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19616 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19617 s|^/[^/]|//&|
19618 p
19619 q
19620 }'
19621 gl_cv_next_sys_select_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19622 sed -n "$gl_absolute_header_sed"`'"'
19623 else
19624 gl_cv_next_sys_select_h='<'sys/select.h'>'
19625 fi
1fd182f0 19626
3e0be4ab 19627
1f5d53eb 19628fi
5476a9a4
GM
19629{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_select_h" >&5
19630$as_echo "$gl_cv_next_sys_select_h" >&6; }
19631 fi
19632 NEXT_SYS_SELECT_H=$gl_cv_next_sys_select_h
1fd182f0 19633
5476a9a4
GM
19634 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19635 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19636 gl_next_as_first_directive='<'sys/select.h'>'
19637 else
19638 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19639 gl_next_as_first_directive=$gl_cv_next_sys_select_h
19640 fi
19641 NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H=$gl_next_as_first_directive
1fd182f0
PE
19642
19643
5476a9a4
GM
19644
19645
19646 if test $ac_cv_header_sys_select_h = yes; then
19647 HAVE_SYS_SELECT_H=1
19648 else
19649 HAVE_SYS_SELECT_H=0
19650 fi
19651
19652
19653
19654
19655
19656 if test $ac_cv_header_sys_socket_h != yes; then
19657 for ac_header in winsock2.h
19658do :
19659 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
19660if test "x$ac_cv_header_winsock2_h" = x""yes; then :
19661 cat >>confdefs.h <<_ACEOF
19662#define HAVE_WINSOCK2_H 1
f199cab1 19663_ACEOF
5476a9a4 19664
f199cab1 19665fi
3e0be4ab 19666
5476a9a4 19667done
3e0be4ab 19668
5476a9a4
GM
19669 fi
19670 if test "$ac_cv_header_winsock2_h" = yes; then
19671 HAVE_WINSOCK2_H=1
19672 UNISTD_H_HAVE_WINSOCK2_H=1
19673 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
19674 else
19675 HAVE_WINSOCK2_H=0
19676 fi
f199cab1 19677
f199cab1 19678
f199cab1 19679
f199cab1 19680
3e0be4ab 19681
3e0be4ab 19682
3e0be4ab 19683
3e0be4ab 19684
5476a9a4
GM
19685 GNULIB_PTHREAD_SIGMASK=0;
19686 GNULIB_RAISE=0;
19687 GNULIB_SIGNAL_H_SIGPIPE=0;
19688 GNULIB_SIGPROCMASK=0;
19689 GNULIB_SIGACTION=0;
19690 HAVE_POSIX_SIGNALBLOCKING=1;
19691 HAVE_PTHREAD_SIGMASK=1;
19692 HAVE_RAISE=1;
19693 HAVE_SIGSET_T=1;
19694 HAVE_SIGINFO_T=1;
19695 HAVE_SIGACTION=1;
19696 HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
19697
19698 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
f199cab1 19699
5476a9a4
GM
19700 HAVE_SIGHANDLER_T=1;
19701 REPLACE_PTHREAD_SIGMASK=0;
19702 REPLACE_RAISE=0;
1f5d53eb 19703
1fd182f0 19704
b06b1098 19705
1fd182f0 19706
3e0be4ab
GM
19707
19708
f077f61d 19709
5476a9a4
GM
19710 ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
19711 #include <signal.h>
19712 /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
19713 #include <sys/types.h>
19714
19715"
19716if test "x$ac_cv_type_sigset_t" = x""yes; then :
19717
19718cat >>confdefs.h <<_ACEOF
19719#define HAVE_SIGSET_T 1
f199cab1 19720_ACEOF
3e0be4ab 19721
5476a9a4
GM
19722gl_cv_type_sigset_t=yes
19723else
19724 gl_cv_type_sigset_t=no
f199cab1 19725fi
3e0be4ab 19726
5476a9a4
GM
19727 if test $gl_cv_type_sigset_t != yes; then
19728 HAVE_SIGSET_T=0
19729 fi
3e0be4ab 19730
1f5d53eb 19731
3e0be4ab 19732
5476a9a4
GM
19733 if test $ac_cv_header_sys_socket_h = no; then
19734 for ac_header in ws2tcpip.h
19735do :
19736 ac_fn_c_check_header_mongrel "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default"
19737if test "x$ac_cv_header_ws2tcpip_h" = x""yes; then :
19738 cat >>confdefs.h <<_ACEOF
19739#define HAVE_WS2TCPIP_H 1
19740_ACEOF
3e0be4ab 19741
5476a9a4 19742fi
3e0be4ab 19743
5476a9a4
GM
19744done
19745
19746 fi
19747
19748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
19749$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
19750if test "${ac_cv_header_stdbool_h+set}" = set; then :
19751 $as_echo_n "(cached) " >&6
19752else
19753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19754/* end confdefs.h. */
1f5d53eb 19755
5476a9a4
GM
19756 #include <stdbool.h>
19757 #ifndef bool
19758 "error: bool is not defined"
19759 #endif
19760 #ifndef false
19761 "error: false is not defined"
19762 #endif
19763 #if false
19764 "error: false is not 0"
19765 #endif
19766 #ifndef true
19767 "error: true is not defined"
19768 #endif
19769 #if true != 1
19770 "error: true is not 1"
19771 #endif
19772 #ifndef __bool_true_false_are_defined
19773 "error: __bool_true_false_are_defined is not defined"
19774 #endif
19775
19776 struct s { _Bool s: 1; _Bool t; } s;
19777
19778 char a[true == 1 ? 1 : -1];
19779 char b[false == 0 ? 1 : -1];
19780 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
19781 char d[(bool) 0.5 == true ? 1 : -1];
19782 /* See body of main program for 'e'. */
19783 char f[(_Bool) 0.0 == false ? 1 : -1];
19784 char g[true];
19785 char h[sizeof (_Bool)];
19786 char i[sizeof s.t];
19787 enum { j = false, k = true, l = false * true, m = true * 256 };
19788 /* The following fails for
19789 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
19790 _Bool n[m];
19791 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
19792 char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
19793 /* Catch a bug in an HP-UX C compiler. See
19794 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
19795 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
19796 */
19797 _Bool q = true;
19798 _Bool *pq = &q;
1ebc9c87
GM
19799
19800int
19801main ()
19802{
f199cab1 19803
5476a9a4
GM
19804 bool e = &s;
19805 *pq |= q;
19806 *pq |= ! q;
19807 /* Refer to every declared value, to avoid compiler optimizations. */
19808 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
19809 + !m + !n + !o + !p + !q + !pq);
f199cab1 19810
5476a9a4 19811 ;
1ebc9c87
GM
19812 return 0;
19813}
19814_ACEOF
5476a9a4
GM
19815if ac_fn_c_try_compile "$LINENO"; then :
19816 ac_cv_header_stdbool_h=yes
1ebc9c87 19817else
5476a9a4 19818 ac_cv_header_stdbool_h=no
1ebc9c87 19819fi
5476a9a4 19820rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1ebc9c87 19821fi
5476a9a4
GM
19822{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
19823$as_echo "$ac_cv_header_stdbool_h" >&6; }
19824 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
19825if test "x$ac_cv_type__Bool" = x""yes; then :
1ebc9c87 19826
5476a9a4
GM
19827cat >>confdefs.h <<_ACEOF
19828#define HAVE__BOOL 1
19829_ACEOF
1ebc9c87 19830
1ebc9c87
GM
19831
19832fi
19833
1ebc9c87 19834
1ebc9c87 19835
5476a9a4
GM
19836 REPLACE_NULL=0;
19837 HAVE_WCHAR_T=1;
19838
19839
19840 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
19841$as_echo_n "checking for wchar_t... " >&6; }
19842if test "${gt_cv_c_wchar_t+set}" = set; then :
19843 $as_echo_n "(cached) " >&6
19844else
19845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19846/* end confdefs.h. */
19847#include <stddef.h>
19848 wchar_t foo = (wchar_t)'\0';
19849int
19850main ()
19851{
19852
19853 ;
19854 return 0;
19855}
19856_ACEOF
19857if ac_fn_c_try_compile "$LINENO"; then :
19858 gt_cv_c_wchar_t=yes
19859else
19860 gt_cv_c_wchar_t=no
19861fi
19862rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1ebc9c87 19863fi
5476a9a4
GM
19864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
19865$as_echo "$gt_cv_c_wchar_t" >&6; }
19866 if test $gt_cv_c_wchar_t = yes; then
1ebc9c87 19867
5476a9a4
GM
19868$as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
19869
19870 fi
19871
19872
19873 GNULIB_DPRINTF=0;
19874 GNULIB_FCLOSE=0;
19875 GNULIB_FDOPEN=0;
19876 GNULIB_FFLUSH=0;
19877 GNULIB_FGETC=0;
19878 GNULIB_FGETS=0;
19879 GNULIB_FOPEN=0;
19880 GNULIB_FPRINTF=0;
19881 GNULIB_FPRINTF_POSIX=0;
19882 GNULIB_FPURGE=0;
19883 GNULIB_FPUTC=0;
19884 GNULIB_FPUTS=0;
19885 GNULIB_FREAD=0;
19886 GNULIB_FREOPEN=0;
19887 GNULIB_FSCANF=0;
19888 GNULIB_FSEEK=0;
19889 GNULIB_FSEEKO=0;
19890 GNULIB_FTELL=0;
19891 GNULIB_FTELLO=0;
19892 GNULIB_FWRITE=0;
19893 GNULIB_GETC=0;
19894 GNULIB_GETCHAR=0;
19895 GNULIB_GETDELIM=0;
19896 GNULIB_GETLINE=0;
19897 GNULIB_OBSTACK_PRINTF=0;
19898 GNULIB_OBSTACK_PRINTF_POSIX=0;
19899 GNULIB_PCLOSE=0;
19900 GNULIB_PERROR=0;
19901 GNULIB_POPEN=0;
19902 GNULIB_PRINTF=0;
19903 GNULIB_PRINTF_POSIX=0;
19904 GNULIB_PUTC=0;
19905 GNULIB_PUTCHAR=0;
19906 GNULIB_PUTS=0;
19907 GNULIB_REMOVE=0;
19908 GNULIB_RENAME=0;
19909 GNULIB_RENAMEAT=0;
19910 GNULIB_SCANF=0;
19911 GNULIB_SNPRINTF=0;
19912 GNULIB_SPRINTF_POSIX=0;
19913 GNULIB_STDIO_H_NONBLOCKING=0;
19914 GNULIB_STDIO_H_SIGPIPE=0;
19915 GNULIB_TMPFILE=0;
19916 GNULIB_VASPRINTF=0;
19917 GNULIB_VFSCANF=0;
19918 GNULIB_VSCANF=0;
19919 GNULIB_VDPRINTF=0;
19920 GNULIB_VFPRINTF=0;
19921 GNULIB_VFPRINTF_POSIX=0;
19922 GNULIB_VPRINTF=0;
19923 GNULIB_VPRINTF_POSIX=0;
19924 GNULIB_VSNPRINTF=0;
19925 GNULIB_VSPRINTF_POSIX=0;
19926 HAVE_DECL_FPURGE=1;
19927 HAVE_DECL_FSEEKO=1;
19928 HAVE_DECL_FTELLO=1;
19929 HAVE_DECL_GETDELIM=1;
19930 HAVE_DECL_GETLINE=1;
19931 HAVE_DECL_OBSTACK_PRINTF=1;
19932 HAVE_DECL_SNPRINTF=1;
19933 HAVE_DECL_VSNPRINTF=1;
19934 HAVE_DPRINTF=1;
19935 HAVE_FSEEKO=1;
19936 HAVE_FTELLO=1;
19937 HAVE_PCLOSE=1;
19938 HAVE_POPEN=1;
19939 HAVE_RENAMEAT=1;
19940 HAVE_VASPRINTF=1;
19941 HAVE_VDPRINTF=1;
19942 REPLACE_DPRINTF=0;
19943 REPLACE_FCLOSE=0;
19944 REPLACE_FDOPEN=0;
19945 REPLACE_FFLUSH=0;
19946 REPLACE_FOPEN=0;
19947 REPLACE_FPRINTF=0;
19948 REPLACE_FPURGE=0;
19949 REPLACE_FREOPEN=0;
19950 REPLACE_FSEEK=0;
19951 REPLACE_FSEEKO=0;
19952 REPLACE_FTELL=0;
19953 REPLACE_FTELLO=0;
19954 REPLACE_GETDELIM=0;
19955 REPLACE_GETLINE=0;
19956 REPLACE_OBSTACK_PRINTF=0;
19957 REPLACE_PERROR=0;
19958 REPLACE_POPEN=0;
19959 REPLACE_PRINTF=0;
19960 REPLACE_REMOVE=0;
19961 REPLACE_RENAME=0;
19962 REPLACE_RENAMEAT=0;
19963 REPLACE_SNPRINTF=0;
19964 REPLACE_SPRINTF=0;
19965 REPLACE_STDIO_READ_FUNCS=0;
19966 REPLACE_STDIO_WRITE_FUNCS=0;
19967 REPLACE_TMPFILE=0;
19968 REPLACE_VASPRINTF=0;
19969 REPLACE_VDPRINTF=0;
19970 REPLACE_VFPRINTF=0;
19971 REPLACE_VPRINTF=0;
19972 REPLACE_VSNPRINTF=0;
19973 REPLACE_VSPRINTF=0;
1ebc9c87 19974
5476a9a4
GM
19975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
19976$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
19977if test "${ac_cv_struct_tm+set}" = set; then :
1ebc9c87
GM
19978 $as_echo_n "(cached) " >&6
19979else
5476a9a4 19980 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1ebc9c87 19981/* end confdefs.h. */
5476a9a4
GM
19982#include <sys/types.h>
19983#include <time.h>
1ebc9c87
GM
19984
19985int
19986main ()
19987{
5476a9a4
GM
19988struct tm tm;
19989 int *p = &tm.tm_sec;
19990 return !p;
1ebc9c87
GM
19991 ;
19992 return 0;
19993}
19994_ACEOF
5476a9a4
GM
19995if ac_fn_c_try_compile "$LINENO"; then :
19996 ac_cv_struct_tm=time.h
1ebc9c87 19997else
5476a9a4 19998 ac_cv_struct_tm=sys/time.h
1ebc9c87 19999fi
5476a9a4 20000rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1ebc9c87 20001fi
5476a9a4
GM
20002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
20003$as_echo "$ac_cv_struct_tm" >&6; }
20004if test $ac_cv_struct_tm = sys/time.h; then
1ebc9c87 20005
5476a9a4 20006$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
1ebc9c87 20007
1ebc9c87
GM
20008fi
20009
5476a9a4
GM
20010ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
20011#include <$ac_cv_struct_tm>
1fd182f0 20012
5476a9a4
GM
20013"
20014if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
1fd182f0 20015
5476a9a4
GM
20016cat >>confdefs.h <<_ACEOF
20017#define HAVE_STRUCT_TM_TM_ZONE 1
f199cab1 20018_ACEOF
5476a9a4
GM
20019
20020
1f5d53eb 20021fi
1fd182f0 20022
5476a9a4 20023if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
1f5d53eb 20024
5476a9a4 20025$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
1fd182f0 20026
5476a9a4
GM
20027else
20028 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
20029"
20030if test "x$ac_cv_have_decl_tzname" = x""yes; then :
20031 ac_have_decl=1
20032else
20033 ac_have_decl=0
20034fi
1fd182f0 20035
5476a9a4
GM
20036cat >>confdefs.h <<_ACEOF
20037#define HAVE_DECL_TZNAME $ac_have_decl
20038_ACEOF
f199cab1 20039
5476a9a4
GM
20040 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
20041$as_echo_n "checking for tzname... " >&6; }
20042if test "${ac_cv_var_tzname+set}" = set; then :
f199cab1 20043 $as_echo_n "(cached) " >&6
3e0be4ab 20044else
5476a9a4 20045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 20046/* end confdefs.h. */
5476a9a4
GM
20047#include <time.h>
20048#if !HAVE_DECL_TZNAME
20049extern char *tzname[];
f199cab1 20050#endif
5476a9a4 20051
f199cab1
GM
20052int
20053main ()
20054{
5476a9a4 20055return tzname[0][0];
f199cab1
GM
20056 ;
20057 return 0;
20058}
3e0be4ab 20059_ACEOF
f199cab1 20060if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 20061 ac_cv_var_tzname=yes
3e0be4ab 20062else
5476a9a4 20063 ac_cv_var_tzname=no
f199cab1
GM
20064fi
20065rm -f core conftest.err conftest.$ac_objext \
20066 conftest$ac_exeext conftest.$ac_ext
f199cab1 20067fi
5476a9a4
GM
20068{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
20069$as_echo "$ac_cv_var_tzname" >&6; }
20070 if test $ac_cv_var_tzname = yes; then
20071
20072$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
f199cab1 20073
5476a9a4 20074 fi
3e0be4ab 20075fi
cc322c06 20076
5476a9a4
GM
20077
20078 ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include <time.h>
20079"
20080if test "x$ac_cv_member_struct_tm_tm_gmtoff" = x""yes; then :
20081
20082$as_echo "#define HAVE_TM_GMTOFF 1" >>confdefs.h
cc322c06 20083
f199cab1 20084fi
cc322c06 20085
1f5d53eb 20086
e275c824 20087
5476a9a4 20088
283c7aed
GM
20089
20090
20091
20092
20093
20094
20095
20096
20097
20098 if test $gl_cv_have_include_next = yes; then
20099 gl_cv_next_string_h='<'string.h'>'
20100 else
20101 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
20102$as_echo_n "checking absolute name of <string.h>... " >&6; }
20103if test "${gl_cv_next_string_h+set}" = set; then :
20104 $as_echo_n "(cached) " >&6
20105else
20106
20107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20108/* end confdefs.h. */
20109#include <string.h>
20110
20111_ACEOF
20112 case "$host_os" in
20113 aix*) gl_absname_cpp="$ac_cpp -C" ;;
20114 *) gl_absname_cpp="$ac_cpp" ;;
20115 esac
20116
20117 case "$host_os" in
20118 mingw*)
20119 gl_dirsep_regex='[/\\]'
20120 ;;
20121 *)
20122 gl_dirsep_regex='\/'
20123 ;;
20124 esac
20125 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
20126
20127 gl_header_literal_regex=`echo 'string.h' \
20128 | sed -e "$gl_make_literal_regex_sed"`
20129 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20130 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20131 s|^/[^/]|//&|
20132 p
20133 q
20134 }'
20135 gl_cv_next_string_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20136 sed -n "$gl_absolute_header_sed"`'"'
20137
20138
20139fi
20140{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
20141$as_echo "$gl_cv_next_string_h" >&6; }
20142 fi
20143 NEXT_STRING_H=$gl_cv_next_string_h
20144
20145 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20146 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20147 gl_next_as_first_directive='<'string.h'>'
20148 else
20149 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20150 gl_next_as_first_directive=$gl_cv_next_string_h
20151 fi
20152 NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
20153
20154
20155
20156
20157
20158
20159
20160
20161
5476a9a4
GM
20162ac_fn_c_check_decl "$LINENO" "strtoimax" "ac_cv_have_decl_strtoimax" "$ac_includes_default"
20163if test "x$ac_cv_have_decl_strtoimax" = x""yes; then :
20164 ac_have_decl=1
3e0be4ab 20165else
5476a9a4 20166 ac_have_decl=0
3e0be4ab 20167fi
5476a9a4
GM
20168
20169cat >>confdefs.h <<_ACEOF
20170#define HAVE_DECL_STRTOIMAX $ac_have_decl
f199cab1 20171_ACEOF
e275c824
PE
20172
20173
5476a9a4
GM
20174
20175ac_fn_c_check_decl "$LINENO" "strtoumax" "ac_cv_have_decl_strtoumax" "$ac_includes_default"
20176if test "x$ac_cv_have_decl_strtoumax" = x""yes; then :
20177 ac_have_decl=1
20178else
20179 ac_have_decl=0
3e0be4ab 20180fi
e275c824 20181
5476a9a4
GM
20182cat >>confdefs.h <<_ACEOF
20183#define HAVE_DECL_STRTOUMAX $ac_have_decl
20184_ACEOF
e275c824
PE
20185
20186
2b1928b8 20187
5476a9a4
GM
20188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
20189$as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
20190if test "${ac_cv_header_stat_broken+set}" = set; then :
f199cab1 20191 $as_echo_n "(cached) " >&6
2b1928b8 20192else
5476a9a4
GM
20193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20194/* end confdefs.h. */
20195#include <sys/types.h>
20196#include <sys/stat.h>
2b1928b8 20197
5476a9a4
GM
20198#if defined S_ISBLK && defined S_IFDIR
20199extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
20200#endif
2b1928b8 20201
5476a9a4
GM
20202#if defined S_ISBLK && defined S_IFCHR
20203extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
20204#endif
0eb775a3 20205
5476a9a4
GM
20206#if defined S_ISLNK && defined S_IFREG
20207extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
20208#endif
20209
20210#if defined S_ISSOCK && defined S_IFREG
20211extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
20212#endif
0eb775a3 20213
5476a9a4
GM
20214_ACEOF
20215if ac_fn_c_try_compile "$LINENO"; then :
20216 ac_cv_header_stat_broken=no
f199cab1 20217else
5476a9a4 20218 ac_cv_header_stat_broken=yes
f199cab1 20219fi
5476a9a4 20220rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 20221fi
5476a9a4
GM
20222{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
20223$as_echo "$ac_cv_header_stat_broken" >&6; }
20224if test $ac_cv_header_stat_broken = yes; then
0eb775a3 20225
5476a9a4 20226$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
0eb775a3 20227
5476a9a4 20228fi
0eb775a3
GM
20229
20230
20231
5476a9a4
GM
20232
20233
20234 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
20235$as_echo_n "checking for struct timespec in <time.h>... " >&6; }
20236if test "${gl_cv_sys_struct_timespec_in_time_h+set}" = set; then :
20237 $as_echo_n "(cached) " >&6
20238else
20239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3e0be4ab 20240/* end confdefs.h. */
5476a9a4 20241#include <time.h>
52724a05 20242
3e0be4ab
GM
20243int
20244main ()
20245{
5476a9a4 20246static struct timespec x; x.tv_sec = x.tv_nsec;
3e0be4ab
GM
20247 ;
20248 return 0;
20249}
20250_ACEOF
5476a9a4
GM
20251if ac_fn_c_try_compile "$LINENO"; then :
20252 gl_cv_sys_struct_timespec_in_time_h=yes
3e0be4ab 20253else
5476a9a4 20254 gl_cv_sys_struct_timespec_in_time_h=no
3e0be4ab 20255fi
5476a9a4
GM
20256rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20257fi
20258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
20259$as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
52724a05 20260
5476a9a4
GM
20261 TIME_H_DEFINES_STRUCT_TIMESPEC=0
20262 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
20263 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
20264 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
20265 TIME_H_DEFINES_STRUCT_TIMESPEC=1
20266 else
20267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
20268$as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
20269if test "${gl_cv_sys_struct_timespec_in_sys_time_h+set}" = set; then :
20270 $as_echo_n "(cached) " >&6
20271else
3e0be4ab
GM
20272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20273/* end confdefs.h. */
5476a9a4
GM
20274#include <sys/time.h>
20275
3e0be4ab
GM
20276int
20277main ()
20278{
5476a9a4 20279static struct timespec x; x.tv_sec = x.tv_nsec;
3e0be4ab
GM
20280 ;
20281 return 0;
20282}
20283_ACEOF
5476a9a4
GM
20284if ac_fn_c_try_compile "$LINENO"; then :
20285 gl_cv_sys_struct_timespec_in_sys_time_h=yes
3e0be4ab 20286else
5476a9a4 20287 gl_cv_sys_struct_timespec_in_sys_time_h=no
3e0be4ab 20288fi
5476a9a4 20289rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 20290fi
5476a9a4
GM
20291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
20292$as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
20293 if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
20294 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
20295 else
20296 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
20297$as_echo_n "checking for struct timespec in <pthread.h>... " >&6; }
20298if test "${gl_cv_sys_struct_timespec_in_pthread_h+set}" = set; then :
3e0be4ab
GM
20299 $as_echo_n "(cached) " >&6
20300else
20301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20302/* end confdefs.h. */
5476a9a4
GM
20303#include <pthread.h>
20304
3e0be4ab
GM
20305int
20306main ()
20307{
5476a9a4 20308static struct timespec x; x.tv_sec = x.tv_nsec;
3e0be4ab
GM
20309 ;
20310 return 0;
20311}
20312_ACEOF
5476a9a4
GM
20313if ac_fn_c_try_compile "$LINENO"; then :
20314 gl_cv_sys_struct_timespec_in_pthread_h=yes
3e0be4ab 20315else
5476a9a4 20316 gl_cv_sys_struct_timespec_in_pthread_h=no
3e0be4ab 20317fi
5476a9a4 20318rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3e0be4ab 20319fi
5476a9a4
GM
20320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
20321$as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
20322 if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
20323 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
20324 fi
20325 fi
f199cab1 20326 fi
e275c824
PE
20327
20328
b0415a03 20329
b0415a03 20330
e275c824 20331
e275c824
PE
20332
20333
f199cab1 20334
e275c824
PE
20335
20336
20337
20338
20339
20340
20341
5476a9a4
GM
20342 if test $gl_cv_have_include_next = yes; then
20343 gl_cv_next_time_h='<'time.h'>'
20344 else
20345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
20346$as_echo_n "checking absolute name of <time.h>... " >&6; }
20347if test "${gl_cv_next_time_h+set}" = set; then :
20348 $as_echo_n "(cached) " >&6
20349else
e275c824 20350
5476a9a4
GM
20351 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20352/* end confdefs.h. */
20353#include <time.h>
e275c824 20354
5476a9a4
GM
20355_ACEOF
20356 case "$host_os" in
20357 aix*) gl_absname_cpp="$ac_cpp -C" ;;
20358 *) gl_absname_cpp="$ac_cpp" ;;
20359 esac
e275c824 20360
5476a9a4
GM
20361 case "$host_os" in
20362 mingw*)
20363 gl_dirsep_regex='[/\\]'
20364 ;;
20365 *)
20366 gl_dirsep_regex='\/'
20367 ;;
20368 esac
20369 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
e275c824 20370
5476a9a4
GM
20371 gl_header_literal_regex=`echo 'time.h' \
20372 | sed -e "$gl_make_literal_regex_sed"`
20373 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20374 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20375 s|^/[^/]|//&|
20376 p
20377 q
20378 }'
20379 gl_cv_next_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20380 sed -n "$gl_absolute_header_sed"`'"'
e275c824
PE
20381
20382
5476a9a4
GM
20383fi
20384{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
20385$as_echo "$gl_cv_next_time_h" >&6; }
20386 fi
20387 NEXT_TIME_H=$gl_cv_next_time_h
67342916 20388
5476a9a4
GM
20389 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20390 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20391 gl_next_as_first_directive='<'time.h'>'
f199cab1 20392 else
5476a9a4
GM
20393 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20394 gl_next_as_first_directive=$gl_cv_next_time_h
f199cab1 20395 fi
5476a9a4 20396 NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
4fda9c95
GM
20397
20398
52724a05
GM
20399
20400
20401
20402
20403
20404
20405
ae0d7250
PE
20406
20407
20408
cc322c06 20409
f199cab1 20410
b5591ebb
GM
20411ac_fn_c_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default"
20412if test "x$ac_cv_have_decl_unsetenv" = x""yes; then :
20413 ac_have_decl=1
20414else
20415 ac_have_decl=0
20416fi
20417
20418cat >>confdefs.h <<_ACEOF
20419#define HAVE_DECL_UNSETENV $ac_have_decl
20420_ACEOF
20421
cc322c06 20422
5476a9a4
GM
20423 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the utimes function works" >&5
20424$as_echo_n "checking whether the utimes function works... " >&6; }
20425if test "${gl_cv_func_working_utimes+set}" = set; then :
20426 $as_echo_n "(cached) " >&6
20427else
1fd182f0 20428
5476a9a4
GM
20429 if test "$cross_compiling" = yes; then :
20430 gl_cv_func_working_utimes=no
20431else
20432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20433/* end confdefs.h. */
20434
20435#include <sys/types.h>
20436#include <sys/stat.h>
20437#include <fcntl.h>
20438#include <sys/time.h>
20439#include <time.h>
20440#include <unistd.h>
20441#include <stdlib.h>
20442#include <stdio.h>
20443#include <utime.h>
1fd182f0 20444
5476a9a4
GM
20445static int
20446inorder (time_t a, time_t b, time_t c)
20447{
20448 return a <= b && b <= c;
20449}
1fd182f0 20450
5476a9a4
GM
20451int
20452main ()
20453{
20454 int result = 0;
20455 char const *file = "conftest.utimes";
20456 static struct timeval timeval[2] = {{9, 10}, {999999, 999999}};
1fd182f0 20457
5476a9a4
GM
20458 /* Test whether utimes() essentially works. */
20459 {
20460 struct stat sbuf;
20461 FILE *f = fopen (file, "w");
20462 if (f == NULL)
20463 result |= 1;
20464 else if (fclose (f) != 0)
20465 result |= 1;
20466 else if (utimes (file, timeval) != 0)
20467 result |= 2;
20468 else if (lstat (file, &sbuf) != 0)
20469 result |= 1;
20470 else if (!(sbuf.st_atime == timeval[0].tv_sec
20471 && sbuf.st_mtime == timeval[1].tv_sec))
20472 result |= 4;
20473 if (unlink (file) != 0)
20474 result |= 1;
20475 }
1fd182f0 20476
5476a9a4
GM
20477 /* Test whether utimes() with a NULL argument sets the file's timestamp
20478 to the current time. Use 'fstat' as well as 'time' to
20479 determine the "current" time, to accommodate NFS file systems
20480 if there is a time skew between the host and the NFS server. */
20481 {
20482 int fd = open (file, O_WRONLY|O_CREAT, 0644);
20483 if (fd < 0)
20484 result |= 1;
20485 else
20486 {
20487 time_t t0, t2;
20488 struct stat st0, st1, st2;
20489 if (time (&t0) == (time_t) -1)
20490 result |= 1;
20491 else if (fstat (fd, &st0) != 0)
20492 result |= 1;
20493 else if (utimes (file, timeval) != 0)
20494 result |= 2;
20495 else if (utimes (file, NULL) != 0)
20496 result |= 8;
20497 else if (fstat (fd, &st1) != 0)
20498 result |= 1;
20499 else if (write (fd, "\n", 1) != 1)
20500 result |= 1;
20501 else if (fstat (fd, &st2) != 0)
20502 result |= 1;
20503 else if (time (&t2) == (time_t) -1)
20504 result |= 1;
20505 else
20506 {
20507 int m_ok_POSIX = inorder (t0, st1.st_mtime, t2);
20508 int m_ok_NFS = inorder (st0.st_mtime, st1.st_mtime, st2.st_mtime);
20509 if (! (st1.st_atime == st1.st_mtime))
20510 result |= 16;
20511 if (! (m_ok_POSIX || m_ok_NFS))
20512 result |= 32;
20513 }
20514 if (close (fd) != 0)
20515 result |= 1;
20516 }
20517 if (unlink (file) != 0)
20518 result |= 1;
20519 }
52724a05 20520
5476a9a4
GM
20521 /* Test whether utimes() with a NULL argument works on read-only files. */
20522 {
20523 int fd = open (file, O_WRONLY|O_CREAT, 0444);
20524 if (fd < 0)
20525 result |= 1;
20526 else if (close (fd) != 0)
20527 result |= 1;
20528 else if (utimes (file, NULL) != 0)
20529 result |= 64;
20530 if (unlink (file) != 0)
20531 result |= 1;
20532 }
1fd182f0 20533
5476a9a4
GM
20534 return result;
20535}
1fd182f0 20536
5476a9a4
GM
20537_ACEOF
20538if ac_fn_c_try_run "$LINENO"; then :
20539 gl_cv_func_working_utimes=yes
20540else
20541 gl_cv_func_working_utimes=no
20542fi
20543rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20544 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1 20545fi
1fd182f0 20546
5476a9a4
GM
20547fi
20548{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_utimes" >&5
20549$as_echo "$gl_cv_func_working_utimes" >&6; }
1fd182f0 20550
5476a9a4 20551 if test $gl_cv_func_working_utimes = yes; then
1fd182f0 20552
5476a9a4 20553$as_echo "#define HAVE_WORKING_UTIMES 1" >>confdefs.h
1fd182f0 20554
5476a9a4 20555 fi
1fd182f0 20556
1fd182f0 20557
1fd182f0 20558
1fd182f0 20559
1fd182f0 20560
5476a9a4
GM
20561 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct utimbuf" >&5
20562$as_echo_n "checking for struct utimbuf... " >&6; }
20563if test "${gl_cv_sys_struct_utimbuf+set}" = set; then :
20564 $as_echo_n "(cached) " >&6
20565else
20566 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20567/* end confdefs.h. */
20568#if HAVE_SYS_TIME_H
20569 #include <sys/time.h>
20570 #endif
20571 #include <time.h>
20572 #ifdef HAVE_UTIME_H
20573 #include <utime.h>
20574 #endif
1fd182f0 20575
5476a9a4
GM
20576int
20577main ()
20578{
20579static struct utimbuf x; x.actime = x.modtime;
20580 ;
20581 return 0;
20582}
20583_ACEOF
20584if ac_fn_c_try_compile "$LINENO"; then :
20585 gl_cv_sys_struct_utimbuf=yes
20586else
20587 gl_cv_sys_struct_utimbuf=no
f199cab1 20588fi
5476a9a4 20589rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 20590fi
5476a9a4
GM
20591{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_utimbuf" >&5
20592$as_echo "$gl_cv_sys_struct_utimbuf" >&6; }
1fd182f0 20593
5476a9a4 20594 if test $gl_cv_sys_struct_utimbuf = yes; then
1fd182f0 20595
5476a9a4 20596$as_echo "#define HAVE_STRUCT_UTIMBUF 1" >>confdefs.h
1fd182f0 20597
5476a9a4 20598 fi
1fd182f0 20599
1fd182f0 20600
1fd182f0 20601
1fd182f0 20602
1fd182f0 20603
1fd182f0 20604
1fd182f0 20605
3e0be4ab 20606
f199cab1 20607
f199cab1 20608
067d23c9 20609
710f5812
GM
20610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking type of array argument to getgroups" >&5
20611$as_echo_n "checking type of array argument to getgroups... " >&6; }
20612if test "${ac_cv_type_getgroups+set}" = set; then :
20613 $as_echo_n "(cached) " >&6
20614else
20615 if test "$cross_compiling" = yes; then :
20616 ac_cv_type_getgroups=cross
20617else
20618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20619/* end confdefs.h. */
20620/* Thanks to Mike Rendell for this test. */
20621$ac_includes_default
20622#define NGID 256
20623#undef MAX
20624#define MAX(x, y) ((x) > (y) ? (x) : (y))
20625
20626int
20627main ()
20628{
20629 gid_t gidset[NGID];
20630 int i, n;
20631 union { gid_t gval; long int lval; } val;
20632
20633 val.lval = -1;
20634 for (i = 0; i < NGID; i++)
20635 gidset[i] = val.gval;
20636 n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
20637 gidset);
20638 /* Exit non-zero if getgroups seems to require an array of ints. This
20639 happens when gid_t is short int but getgroups modifies an array
20640 of ints. */
20641 return n > 0 && gidset[n] != val.gval;
20642}
20643_ACEOF
20644if ac_fn_c_try_run "$LINENO"; then :
20645 ac_cv_type_getgroups=gid_t
20646else
20647 ac_cv_type_getgroups=int
20648fi
20649rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20650 conftest.$ac_objext conftest.beam conftest.$ac_ext
20651fi
20652
20653if test $ac_cv_type_getgroups = cross; then
20654 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20655/* end confdefs.h. */
20656#include <unistd.h>
20657
20658_ACEOF
20659if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20660 $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then :
20661 ac_cv_type_getgroups=gid_t
20662else
20663 ac_cv_type_getgroups=int
20664fi
20665rm -f conftest*
20666
20667fi
20668fi
20669{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_getgroups" >&5
20670$as_echo "$ac_cv_type_getgroups" >&6; }
20671
20672cat >>confdefs.h <<_ACEOF
20673#define GETGROUPS_T $ac_cv_type_getgroups
20674_ACEOF
20675
20676
20677
067d23c9 20678
5476a9a4
GM
20679 if false; then
20680 GL_COND_LIBTOOL_TRUE=
20681 GL_COND_LIBTOOL_FALSE='#'
20682else
20683 GL_COND_LIBTOOL_TRUE='#'
20684 GL_COND_LIBTOOL_FALSE=
1fd182f0 20685fi
067d23c9 20686
5476a9a4
GM
20687 gl_cond_libtool=false
20688 gl_libdeps=
20689 gl_ltlibdeps=
20690 gl_m4_base='m4'
067d23c9 20691
f199cab1 20692
f199cab1 20693
f199cab1 20694
067d23c9 20695
f199cab1 20696
f199cab1 20697
f199cab1 20698
067d23c9 20699
5476a9a4 20700 gl_source_base='lib'
cc322c06
GM
20701
20702
5476a9a4
GM
20703 if test $ac_cv_func_alloca_works = no; then
20704 :
f199cab1 20705 fi
cc322c06 20706
5476a9a4
GM
20707 # Define an additional variable used in the Makefile substitution.
20708 if test $ac_cv_working_alloca_h = yes; then
20709 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
20710$as_echo_n "checking for alloca as a compiler built-in... " >&6; }
20711if test "${gl_cv_rpl_alloca+set}" = set; then :
20712 $as_echo_n "(cached) " >&6
20713else
cc322c06 20714
5476a9a4
GM
20715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20716/* end confdefs.h. */
067d23c9 20717
5476a9a4
GM
20718#if defined __GNUC__ || defined _AIX || defined _MSC_VER
20719 Need own alloca
20720#endif
067d23c9 20721
f199cab1 20722_ACEOF
5476a9a4
GM
20723if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20724 $EGREP "Need own alloca" >/dev/null 2>&1; then :
20725 gl_cv_rpl_alloca=yes
20726else
20727 gl_cv_rpl_alloca=no
369e19fc 20728fi
5476a9a4 20729rm -f conftest*
067d23c9 20730
ae0d7250 20731
5476a9a4
GM
20732fi
20733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
20734$as_echo "$gl_cv_rpl_alloca" >&6; }
20735 if test $gl_cv_rpl_alloca = yes; then
52724a05 20736
5476a9a4 20737$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
ae0d7250 20738
5476a9a4
GM
20739 ALLOCA_H=alloca.h
20740 else
20741 ALLOCA_H=
20742 fi
f199cab1 20743 else
5476a9a4
GM
20744 ALLOCA_H=alloca.h
20745 fi
ae0d7250 20746
5476a9a4
GM
20747 if test -n "$ALLOCA_H"; then
20748 GL_GENERATE_ALLOCA_H_TRUE=
20749 GL_GENERATE_ALLOCA_H_FALSE='#'
20750else
20751 GL_GENERATE_ALLOCA_H_TRUE='#'
20752 GL_GENERATE_ALLOCA_H_FALSE=
20753fi
f199cab1 20754
ae0d7250
PE
20755
20756
20757
20758
20759
5476a9a4
GM
20760 # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
20761 # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
ae0d7250 20762
5476a9a4
GM
20763 # Save and restore LIBS so e.g., -lrt, isn't added to it. Otherwise, *all*
20764 # programs in the package would end up linked with that potentially-shared
20765 # library, inducing unnecessary run-time overhead.
20766 LIB_CLOCK_GETTIME=
ae0d7250 20767
5476a9a4
GM
20768 gl_saved_libs=$LIBS
20769 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
20770$as_echo_n "checking for library containing clock_gettime... " >&6; }
20771if test "${ac_cv_search_clock_gettime+set}" = set; then :
20772 $as_echo_n "(cached) " >&6
20773else
20774 ac_func_search_save_LIBS=$LIBS
20775cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20776/* end confdefs.h. */
20777
20778/* Override any GCC internal prototype to avoid an error.
20779 Use char because int might match the return type of a GCC
20780 builtin and then its argument prototype would still apply. */
20781#ifdef __cplusplus
20782extern "C"
20783#endif
20784char clock_gettime ();
20785int
20786main ()
20787{
20788return clock_gettime ();
20789 ;
20790 return 0;
20791}
20792_ACEOF
20793for ac_lib in '' rt posix4; do
20794 if test -z "$ac_lib"; then
20795 ac_res="none required"
20796 else
20797 ac_res=-l$ac_lib
20798 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
20799 fi
20800 if ac_fn_c_try_link "$LINENO"; then :
20801 ac_cv_search_clock_gettime=$ac_res
f199cab1 20802fi
5476a9a4
GM
20803rm -f core conftest.err conftest.$ac_objext \
20804 conftest$ac_exeext
20805 if test "${ac_cv_search_clock_gettime+set}" = set; then :
20806 break
20807fi
20808done
20809if test "${ac_cv_search_clock_gettime+set}" = set; then :
ae0d7250 20810
5476a9a4
GM
20811else
20812 ac_cv_search_clock_gettime=no
20813fi
20814rm conftest.$ac_ext
20815LIBS=$ac_func_search_save_LIBS
20816fi
20817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
20818$as_echo "$ac_cv_search_clock_gettime" >&6; }
20819ac_res=$ac_cv_search_clock_gettime
20820if test "$ac_res" != no; then :
20821 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20822 test "$ac_cv_search_clock_gettime" = "none required" ||
20823 LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime
20824fi
ae0d7250 20825
5476a9a4
GM
20826 for ac_func in clock_gettime clock_settime
20827do :
20828 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
20829ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
20830eval as_val=\$$as_ac_var
20831 if test "x$as_val" = x""yes; then :
20832 cat >>confdefs.h <<_ACEOF
20833#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
20834_ACEOF
ae0d7250 20835
d7ad186c
GM
20836fi
20837done
20838
20839 LIBS=$gl_saved_libs
20840
20841
20842 :
20843
20844
20845
20846cat >>confdefs.h <<_ACEOF
20847#define GNULIB_CLOSE_STREAM 1
20848_ACEOF
20849
20850
20851
20852
20853 :
20854
20855
20856
20857 :
20858
20859
20860
20861
20862
20863
20864
20865
20866
20867
20868
20869
20870
20871
20872
20873
20874
ae0d7250 20875
3e0be4ab 20876
d7ad186c
GM
20877 if test $gl_cv_have_include_next = yes; then
20878 gl_cv_next_dirent_h='<'dirent.h'>'
20879 else
20880 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5
20881$as_echo_n "checking absolute name of <dirent.h>... " >&6; }
20882if test "${gl_cv_next_dirent_h+set}" = set; then :
20883 $as_echo_n "(cached) " >&6
20884else
3e0be4ab 20885
d7ad186c 20886 if test $ac_cv_header_dirent_h = yes; then
3bf26e96
GM
20887
20888
d7ad186c
GM
20889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20890/* end confdefs.h. */
20891#include <dirent.h>
3bf26e96 20892
3bf26e96 20893_ACEOF
d7ad186c
GM
20894 case "$host_os" in
20895 aix*) gl_absname_cpp="$ac_cpp -C" ;;
20896 *) gl_absname_cpp="$ac_cpp" ;;
20897 esac
3bf26e96 20898
d7ad186c
GM
20899 case "$host_os" in
20900 mingw*)
20901 gl_dirsep_regex='[/\\]'
20902 ;;
20903 *)
20904 gl_dirsep_regex='\/'
20905 ;;
20906 esac
20907 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
3bf26e96 20908
d7ad186c
GM
20909 gl_header_literal_regex=`echo 'dirent.h' \
20910 | sed -e "$gl_make_literal_regex_sed"`
20911 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20912 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20913 s|^/[^/]|//&|
20914 p
20915 q
20916 }'
20917 gl_cv_next_dirent_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20918 sed -n "$gl_absolute_header_sed"`'"'
20919 else
20920 gl_cv_next_dirent_h='<'dirent.h'>'
20921 fi
3bf26e96 20922
3e0be4ab 20923
d7ad186c
GM
20924fi
20925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5
20926$as_echo "$gl_cv_next_dirent_h" >&6; }
20927 fi
20928 NEXT_DIRENT_H=$gl_cv_next_dirent_h
f199cab1 20929
d7ad186c
GM
20930 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20931 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20932 gl_next_as_first_directive='<'dirent.h'>'
20933 else
20934 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20935 gl_next_as_first_directive=$gl_cv_next_dirent_h
20936 fi
20937 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive
f199cab1 20938
3e0be4ab 20939
f199cab1 20940
f199cab1 20941
d7ad186c
GM
20942 if test $ac_cv_header_dirent_h = yes; then
20943 HAVE_DIRENT_H=1
20944 else
20945 HAVE_DIRENT_H=0
20946 fi
3e0be4ab 20947
f199cab1
GM
20948
20949
20950
5476a9a4
GM
20951
20952
20953
20954
20955
20956
5476a9a4
GM
20957$as_echo "#define HAVE_DUP2 1" >>confdefs.h
20958
20959
20960 if test $HAVE_DUP2 = 1; then
20961 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
20962$as_echo_n "checking whether dup2 works... " >&6; }
20963if test "${gl_cv_func_dup2_works+set}" = set; then :
3e0be4ab
GM
20964 $as_echo_n "(cached) " >&6
20965else
5476a9a4
GM
20966 if test "$cross_compiling" = yes; then :
20967 case "$host_os" in
20968 mingw*) # on this platform, dup2 always returns 0 for success
20969 gl_cv_func_dup2_works="guessing no" ;;
20970 cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
20971 gl_cv_func_dup2_works="guessing no" ;;
20972 linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a
20973 # closed fd may yield -EBADF instead of -1 / errno=EBADF.
20974 gl_cv_func_dup2_works="guessing no" ;;
20975 freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF.
20976 gl_cv_func_dup2_works="guessing no" ;;
20977 haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
20978 gl_cv_func_dup2_works="guessing no" ;;
20979 *) gl_cv_func_dup2_works="guessing yes" ;;
20980 esac
20981else
20982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3e0be4ab 20983/* end confdefs.h. */
ae0d7250 20984
5476a9a4
GM
20985 #include <unistd.h>
20986#include <fcntl.h>
20987#include <errno.h>
3e0be4ab
GM
20988int
20989main ()
20990{
5476a9a4
GM
20991int result = 0;
20992#ifdef FD_CLOEXEC
20993 if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
20994 result |= 1;
20995#endif
20996 if (dup2 (1, 1) == 0)
20997 result |= 2;
20998#ifdef FD_CLOEXEC
20999 if (fcntl (1, F_GETFD) != FD_CLOEXEC)
21000 result |= 4;
21001#endif
21002 close (0);
21003 if (dup2 (0, 0) != -1)
21004 result |= 8;
21005 /* Many gnulib modules require POSIX conformance of EBADF. */
21006 if (dup2 (2, 1000000) == -1 && errno != EBADF)
21007 result |= 16;
0d1f53ad
GM
21008 /* Flush out a cygwin core dump. */
21009 if (dup2 (2, -1) != -1 || errno != EBADF)
21010 result |= 32;
5476a9a4
GM
21011 return result;
21012
ae0d7250
PE
21013 ;
21014 return 0;
21015}
5476a9a4 21016
ae0d7250 21017_ACEOF
5476a9a4
GM
21018if ac_fn_c_try_run "$LINENO"; then :
21019 gl_cv_func_dup2_works=yes
ae0d7250 21020else
5476a9a4 21021 gl_cv_func_dup2_works=no
ae0d7250 21022fi
5476a9a4
GM
21023rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21024 conftest.$ac_objext conftest.beam conftest.$ac_ext
ae0d7250 21025fi
5476a9a4
GM
21026
21027
3e0be4ab 21028fi
5476a9a4
GM
21029{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
21030$as_echo "$gl_cv_func_dup2_works" >&6; }
21031 case "$gl_cv_func_dup2_works" in
21032 *yes) ;;
21033 *)
21034 REPLACE_DUP2=1
21035 ;;
21036 esac
21037 fi
3e0be4ab 21038
3e0be4ab 21039
a6342fc8 21040 if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
f199cab1 21041
f199cab1
GM
21042
21043
f199cab1 21044
f199cab1 21045
f199cab1 21046
f199cab1 21047
f199cab1 21048
5476a9a4 21049 gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
f199cab1
GM
21050
21051
a6342fc8 21052 fi
f199cab1 21053
f199cab1 21054
f199cab1 21055
f199cab1 21056
f199cab1 21057
5476a9a4 21058 GNULIB_DUP2=1
f199cab1
GM
21059
21060
f199cab1 21061
f199cab1 21062
3e0be4ab 21063
3e0be4ab 21064
f199cab1
GM
21065
21066
ae0d7250 21067
ae0d7250 21068
5476a9a4 21069
93131e11
GM
21070 GNULIB_ENVIRON=1
21071
21072
21073
21074
21075
21076
21077
21078
8966cbff
GM
21079 LIB_EXECINFO=''
21080 EXECINFO_H='execinfo.h'
21081
21082 if test $ac_cv_header_execinfo_h = yes; then
21083 gl_saved_libs=$LIBS
21084 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing backtrace_symbols_fd" >&5
21085$as_echo_n "checking for library containing backtrace_symbols_fd... " >&6; }
21086if test "${ac_cv_search_backtrace_symbols_fd+set}" = set; then :
21087 $as_echo_n "(cached) " >&6
21088else
21089 ac_func_search_save_LIBS=$LIBS
21090cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21091/* end confdefs.h. */
21092
21093/* Override any GCC internal prototype to avoid an error.
21094 Use char because int might match the return type of a GCC
21095 builtin and then its argument prototype would still apply. */
21096#ifdef __cplusplus
21097extern "C"
21098#endif
21099char backtrace_symbols_fd ();
21100int
21101main ()
21102{
21103return backtrace_symbols_fd ();
21104 ;
21105 return 0;
21106}
21107_ACEOF
21108for ac_lib in '' execinfo; do
21109 if test -z "$ac_lib"; then
21110 ac_res="none required"
21111 else
21112 ac_res=-l$ac_lib
21113 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
21114 fi
21115 if ac_fn_c_try_link "$LINENO"; then :
21116 ac_cv_search_backtrace_symbols_fd=$ac_res
21117fi
21118rm -f core conftest.err conftest.$ac_objext \
21119 conftest$ac_exeext
21120 if test "${ac_cv_search_backtrace_symbols_fd+set}" = set; then :
21121 break
21122fi
21123done
21124if test "${ac_cv_search_backtrace_symbols_fd+set}" = set; then :
21125
21126else
21127 ac_cv_search_backtrace_symbols_fd=no
21128fi
21129rm conftest.$ac_ext
21130LIBS=$ac_func_search_save_LIBS
21131fi
21132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_backtrace_symbols_fd" >&5
21133$as_echo "$ac_cv_search_backtrace_symbols_fd" >&6; }
21134ac_res=$ac_cv_search_backtrace_symbols_fd
21135if test "$ac_res" != no; then :
21136 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
21137 test "$ac_cv_search_backtrace_symbols_fd" = "none required" ||
21138 LIB_EXECINFO=$ac_cv_search_backtrace_symbols_fd
21139fi
21140
21141 LIBS=$gl_saved_libs
21142 test "$ac_cv_search_backtrace_symbols_fd" = no || EXECINFO_H=''
21143 fi
21144
21145 if test -n "$EXECINFO_H"; then
21146
21147
21148
21149
21150
21151
21152
21153
21154 gl_LIBOBJS="$gl_LIBOBJS execinfo.$ac_objext"
21155
21156 fi
21157
21158
21159
21160 if test -n "$EXECINFO_H"; then
21161 GL_GENERATE_EXECINFO_H_TRUE=
21162 GL_GENERATE_EXECINFO_H_FALSE='#'
21163else
21164 GL_GENERATE_EXECINFO_H_TRUE='#'
21165 GL_GENERATE_EXECINFO_H_FALSE=
21166fi
21167
21168
21169
21170
21171
93131e11
GM
21172
21173
21174
7cd2ed2c 21175
710f5812
GM
21176 if test $ac_cv_func_faccessat = no; then
21177 HAVE_FACCESSAT=0
21178 fi
21179
21180 if test $HAVE_FACCESSAT = 0; then
21181
21182
21183
21184
21185
21186
21187
21188
21189 gl_LIBOBJS="$gl_LIBOBJS faccessat.$ac_objext"
21190
21191
21192 for ac_func in access
21193do :
21194 ac_fn_c_check_func "$LINENO" "access" "ac_cv_func_access"
21195if test "x$ac_cv_func_access" = x""yes; then :
21196 cat >>confdefs.h <<_ACEOF
21197#define HAVE_ACCESS 1
21198_ACEOF
21199
21200fi
21201done
21202
21203
21204 fi
21205
21206
21207cat >>confdefs.h <<_ACEOF
21208#define GNULIB_FACCESSAT 1
21209_ACEOF
21210
21211
21212
21213
21214
21215
21216
21217 GNULIB_FACCESSAT=1
21218
21219
21220
21221
21222
21223
21224
21225
21226
21227
21228
21229
21230
21231
21232
21233
21234 if test $gl_cv_have_include_next = yes; then
21235 gl_cv_next_fcntl_h='<'fcntl.h'>'
21236 else
21237 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
21238$as_echo_n "checking absolute name of <fcntl.h>... " >&6; }
21239if test "${gl_cv_next_fcntl_h+set}" = set; then :
21240 $as_echo_n "(cached) " >&6
21241else
21242
21243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21244/* end confdefs.h. */
21245#include <fcntl.h>
21246
21247_ACEOF
21248 case "$host_os" in
21249 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21250 *) gl_absname_cpp="$ac_cpp" ;;
21251 esac
21252
21253 case "$host_os" in
21254 mingw*)
21255 gl_dirsep_regex='[/\\]'
21256 ;;
21257 *)
21258 gl_dirsep_regex='\/'
21259 ;;
21260 esac
21261 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21262
21263 gl_header_literal_regex=`echo 'fcntl.h' \
21264 | sed -e "$gl_make_literal_regex_sed"`
21265 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21266 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21267 s|^/[^/]|//&|
21268 p
21269 q
21270 }'
21271 gl_cv_next_fcntl_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21272 sed -n "$gl_absolute_header_sed"`'"'
21273
21274
21275fi
21276{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
21277$as_echo "$gl_cv_next_fcntl_h" >&6; }
21278 fi
21279 NEXT_FCNTL_H=$gl_cv_next_fcntl_h
21280
21281 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21282 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21283 gl_next_as_first_directive='<'fcntl.h'>'
21284 else
21285 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21286 gl_next_as_first_directive=$gl_cv_next_fcntl_h
21287 fi
21288 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
21289
21290
21291
21292
21293
21294
21295
21296
21297
21298
21299
21300
21301
21302
21303
21304
d7ad186c
GM
21305 ac_fn_c_check_decl "$LINENO" "fdopendir" "ac_cv_have_decl_fdopendir" "
21306#include <dirent.h>
21307
21308"
21309if test "x$ac_cv_have_decl_fdopendir" = x""yes; then :
21310 ac_have_decl=1
21311else
21312 ac_have_decl=0
21313fi
21314
21315cat >>confdefs.h <<_ACEOF
21316#define HAVE_DECL_FDOPENDIR $ac_have_decl
21317_ACEOF
21318if test $ac_have_decl = 1; then :
21319
21320else
21321 HAVE_DECL_FDOPENDIR=0
21322fi
21323
21324
21325 if test $ac_cv_func_fdopendir = no; then
21326 HAVE_FDOPENDIR=0
21327 else
21328 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fdopendir works" >&5
21329$as_echo_n "checking whether fdopendir works... " >&6; }
21330if test "${gl_cv_func_fdopendir_works+set}" = set; then :
21331 $as_echo_n "(cached) " >&6
21332else
21333 if test "$cross_compiling" = yes; then :
21334 case "$host_os" in
21335 # Guess yes on glibc systems.
21336 *-gnu*) gl_cv_func_fdopendir_works="guessing yes" ;;
21337 # If we don't know, assume the worst.
21338 *) gl_cv_func_fdopendir_works="guessing no" ;;
21339 esac
21340
21341else
21342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21343/* end confdefs.h. */
21344
21345#include <dirent.h>
21346#include <fcntl.h>
21347#include <unistd.h>
21348#if !HAVE_DECL_FDOPENDIR
21349extern
21350# ifdef __cplusplus
21351"C"
21352# endif
21353DIR *fdopendir (int);
21354#endif
21355
21356int
21357main ()
21358{
21359int result = 0;
21360 int fd = open ("conftest.c", O_RDONLY);
21361 if (fd < 0) result |= 1;
21362 if (fdopendir (fd)) result |= 2;
21363 if (close (fd)) result |= 4;
21364 return result;
21365 ;
21366 return 0;
21367}
21368_ACEOF
21369if ac_fn_c_try_run "$LINENO"; then :
21370 gl_cv_func_fdopendir_works=yes
21371else
21372 gl_cv_func_fdopendir_works=no
21373fi
21374rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21375 conftest.$ac_objext conftest.beam conftest.$ac_ext
21376fi
21377
21378fi
21379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopendir_works" >&5
21380$as_echo "$gl_cv_func_fdopendir_works" >&6; }
21381 case "$gl_cv_func_fdopendir_works" in
21382 *yes) ;;
21383 *)
21384 REPLACE_FDOPENDIR=1
21385 ;;
21386 esac
21387 fi
21388
21389 if test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1; then
21390
21391
21392
21393
21394
21395
21396
21397
21398 gl_LIBOBJS="$gl_LIBOBJS fdopendir.$ac_objext"
21399
21400 fi
21401
21402
21403
21404
21405
21406 GNULIB_FDOPENDIR=1
21407
21408
21409
21410
21411
21412
21413
21414cat >>confdefs.h <<_ACEOF
21415#define GNULIB_FDOPENDIR 1
21416_ACEOF
21417
21418
21419
21420
21421
21422
21423
710f5812 21424
3bf26e96
GM
21425
21426 fp_headers='
21427# include <stdio.h>
21428# if HAVE_STDIO_EXT_H
21429# include <stdio_ext.h>
21430# endif
21431'
21432 ac_fn_c_check_decl "$LINENO" "__fpending" "ac_cv_have_decl___fpending" "$fp_headers
21433"
21434if test "x$ac_cv_have_decl___fpending" = x""yes; then :
21435 ac_have_decl=1
21436else
21437 ac_have_decl=0
21438fi
21439
21440cat >>confdefs.h <<_ACEOF
21441#define HAVE_DECL___FPENDING $ac_have_decl
21442_ACEOF
21443
21444
21445 if test $ac_cv_func___fpending = no; then
21446
21447
21448
21449
21450
21451
21452
21453
21454 gl_LIBOBJS="$gl_LIBOBJS fpending.$ac_objext"
21455
21456
21457 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to determine the number of pending output bytes on a stream" >&5
21458$as_echo_n "checking how to determine the number of pending output bytes on a stream... " >&6; }
21459if test "${ac_cv_sys_pending_output_n_bytes+set}" = set; then :
21460 $as_echo_n "(cached) " >&6
21461else
21462
21463 for ac_expr in \
21464 \
21465 '# glibc2' \
21466 'fp->_IO_write_ptr - fp->_IO_write_base' \
21467 \
21468 '# traditional Unix' \
21469 'fp->_ptr - fp->_base' \
21470 \
21471 '# BSD' \
21472 'fp->_p - fp->_bf._base' \
21473 \
21474 '# SCO, Unixware' \
21475 '(fp->__ptr ? fp->__ptr - fp->__base : 0)' \
21476 \
21477 '# QNX' \
21478 '(fp->_Mode & 0x2000 /*_MWRITE*/ ? fp->_Next - fp->_Buf : 0)' \
21479 \
21480 '# old glibc?' \
21481 'fp->__bufp - fp->__buffer' \
21482 \
21483 '# old glibc iostream?' \
21484 'fp->_pptr - fp->_pbase' \
21485 \
21486 '# emx+gcc' \
21487 'fp->_ptr - fp->_buffer' \
21488 \
21489 '# Minix' \
21490 'fp->_ptr - fp->_buf' \
21491 \
21492 '# Plan9' \
21493 'fp->wp - fp->buf' \
21494 \
21495 '# VMS' \
21496 '(*fp)->_ptr - (*fp)->_base' \
21497 \
21498 '# e.g., DGUX R4.11; the info is not available' \
21499 1 \
21500 ; do
21501
21502 # Skip each embedded comment.
21503 case "$ac_expr" in '#'*) continue;; esac
21504
21505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21506/* end confdefs.h. */
21507#include <stdio.h>
21508int
21509main ()
21510{
21511FILE *fp = stdin; (void) ($ac_expr);
21512 ;
21513 return 0;
21514}
21515_ACEOF
21516if ac_fn_c_try_compile "$LINENO"; then :
21517 fp_done=yes
21518
21519fi
21520rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21521 test "$fp_done" = yes && break
21522 done
21523
21524 ac_cv_sys_pending_output_n_bytes=$ac_expr
21525
21526
21527fi
21528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_pending_output_n_bytes" >&5
21529$as_echo "$ac_cv_sys_pending_output_n_bytes" >&6; }
21530
21531cat >>confdefs.h <<_ACEOF
21532#define PENDING_OUTPUT_N_BYTES $ac_cv_sys_pending_output_n_bytes
21533_ACEOF
21534
21535
21536 fi
21537
21538
d7ad186c
GM
21539
21540
21541
21542
21543 if test $ac_cv_func_fstatat = no; then
21544 HAVE_FSTATAT=0
21545 else
21546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fstatat (..., 0) works" >&5
21547$as_echo_n "checking whether fstatat (..., 0) works... " >&6; }
21548if test "${gl_cv_func_fstatat_zero_flag+set}" = set; then :
21549 $as_echo_n "(cached) " >&6
21550else
21551 if test "$cross_compiling" = yes; then :
21552 case "$host_os" in
21553 aix*) gl_cv_func_fstatat_zero_flag="guessing no";;
21554 *) gl_cv_func_fstatat_zero_flag="guessing yes";;
21555 esac
21556
21557else
21558 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21559/* end confdefs.h. */
21560
21561 #include <fcntl.h>
21562 #include <sys/stat.h>
21563 int
21564 main (void)
21565 {
21566 struct stat a;
21567 return fstatat (AT_FDCWD, ".", &a, 0) != 0;
21568 }
21569
21570_ACEOF
21571if ac_fn_c_try_run "$LINENO"; then :
21572 gl_cv_func_fstatat_zero_flag=yes
21573else
21574 gl_cv_func_fstatat_zero_flag=no
21575fi
21576rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21577 conftest.$ac_objext conftest.beam conftest.$ac_ext
21578fi
21579
21580
21581fi
21582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fstatat_zero_flag" >&5
21583$as_echo "$gl_cv_func_fstatat_zero_flag" >&6; }
21584
21585 case $gl_cv_func_fstatat_zero_flag+$gl_cv_func_lstat_dereferences_slashed_symlink in
21586 *yes+*yes) ;;
21587 *) REPLACE_FSTATAT=1
21588 case $gl_cv_func_fstatat_zero_flag in
21589 *yes)
21590
21591$as_echo "#define HAVE_WORKING_FSTATAT_ZERO_FLAG 1" >>confdefs.h
21592
21593 ;;
21594 esac
21595 ;;
21596 esac
21597 fi
21598
21599 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
21600
21601
21602
21603
21604
21605
21606
21607
21608 gl_LIBOBJS="$gl_LIBOBJS fstatat.$ac_objext"
21609
21610 fi
21611
21612
21613
21614
21615
21616 GNULIB_FSTATAT=1
21617
21618
21619
21620
21621
21622
21623
5476a9a4
GM
21624# Persuade glibc <stdlib.h> to declare getloadavg().
21625
21626
21627gl_save_LIBS=$LIBS
21628
21629# getloadvg is present in libc on glibc >= 2.2, Mac OS X, FreeBSD >= 2.0,
21630# NetBSD >= 0.9, OpenBSD >= 2.0, Solaris >= 7.
21631HAVE_GETLOADAVG=1
21632ac_fn_c_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg"
21633if test "x$ac_cv_func_getloadavg" = x""yes; then :
21634
21635else
21636 gl_func_getloadavg_done=no
21637
21638 # Some systems with -lutil have (and need) -lkvm as well, some do not.
21639 # On Solaris, -lkvm requires nlist from -lelf, so check that first
21640 # to get the right answer into the cache.
21641 # For kstat on solaris, we need to test for libelf and libkvm to force the
21642 # definition of SVR4 below.
21643 if test $gl_func_getloadavg_done = no; then
21644 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_begin in -lelf" >&5
21645$as_echo_n "checking for elf_begin in -lelf... " >&6; }
21646if test "${ac_cv_lib_elf_elf_begin+set}" = set; then :
6ad6792b
GM
21647 $as_echo_n "(cached) " >&6
21648else
3e0be4ab 21649 ac_check_lib_save_LIBS=$LIBS
5476a9a4 21650LIBS="-lelf $LIBS"
3e0be4ab 21651cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6ad6792b 21652/* end confdefs.h. */
6ad6792b 21653
3e0be4ab
GM
21654/* Override any GCC internal prototype to avoid an error.
21655 Use char because int might match the return type of a GCC
21656 builtin and then its argument prototype would still apply. */
21657#ifdef __cplusplus
21658extern "C"
21659#endif
5476a9a4 21660char elf_begin ();
6ad6792b
GM
21661int
21662main ()
21663{
5476a9a4 21664return elf_begin ();
6ad6792b
GM
21665 ;
21666 return 0;
21667}
21668_ACEOF
3e0be4ab 21669if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 21670 ac_cv_lib_elf_elf_begin=yes
3e0be4ab 21671else
5476a9a4 21672 ac_cv_lib_elf_elf_begin=no
6ad6792b 21673fi
3e0be4ab
GM
21674rm -f core conftest.err conftest.$ac_objext \
21675 conftest$ac_exeext conftest.$ac_ext
21676LIBS=$ac_check_lib_save_LIBS
6ad6792b 21677fi
5476a9a4
GM
21678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_elf_elf_begin" >&5
21679$as_echo "$ac_cv_lib_elf_elf_begin" >&6; }
21680if test "x$ac_cv_lib_elf_elf_begin" = x""yes; then :
21681 LIBS="-lelf $LIBS"
6ad6792b
GM
21682fi
21683
5476a9a4
GM
21684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kvm_open in -lkvm" >&5
21685$as_echo_n "checking for kvm_open in -lkvm... " >&6; }
21686if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then :
6c051bab
GM
21687 $as_echo_n "(cached) " >&6
21688else
5476a9a4
GM
21689 ac_check_lib_save_LIBS=$LIBS
21690LIBS="-lkvm $LIBS"
21691cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c051bab 21692/* end confdefs.h. */
3e0be4ab 21693
5476a9a4
GM
21694/* Override any GCC internal prototype to avoid an error.
21695 Use char because int might match the return type of a GCC
21696 builtin and then its argument prototype would still apply. */
21697#ifdef __cplusplus
21698extern "C"
21699#endif
21700char kvm_open ();
6c051bab
GM
21701int
21702main ()
21703{
5476a9a4 21704return kvm_open ();
6c051bab
GM
21705 ;
21706 return 0;
21707}
21708_ACEOF
3e0be4ab 21709if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 21710 ac_cv_lib_kvm_kvm_open=yes
6c051bab 21711else
5476a9a4 21712 ac_cv_lib_kvm_kvm_open=no
6c051bab 21713fi
3e0be4ab
GM
21714rm -f core conftest.err conftest.$ac_objext \
21715 conftest$ac_exeext conftest.$ac_ext
5476a9a4 21716LIBS=$ac_check_lib_save_LIBS
6c051bab 21717fi
5476a9a4
GM
21718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kvm_kvm_open" >&5
21719$as_echo "$ac_cv_lib_kvm_kvm_open" >&6; }
21720if test "x$ac_cv_lib_kvm_kvm_open" = x""yes; then :
21721 LIBS="-lkvm $LIBS"
3e0be4ab 21722fi
6c051bab 21723
5476a9a4
GM
21724 # Check for the 4.4BSD definition of getloadavg.
21725 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lutil" >&5
21726$as_echo_n "checking for getloadavg in -lutil... " >&6; }
21727if test "${ac_cv_lib_util_getloadavg+set}" = set; then :
ae0d7250
PE
21728 $as_echo_n "(cached) " >&6
21729else
5476a9a4
GM
21730 ac_check_lib_save_LIBS=$LIBS
21731LIBS="-lutil $LIBS"
21732cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6d153f56 21733/* end confdefs.h. */
5476a9a4
GM
21734
21735/* Override any GCC internal prototype to avoid an error.
21736 Use char because int might match the return type of a GCC
21737 builtin and then its argument prototype would still apply. */
21738#ifdef __cplusplus
21739extern "C"
21740#endif
21741char getloadavg ();
ae0d7250
PE
21742int
21743main ()
21744{
5476a9a4 21745return getloadavg ();
ae0d7250
PE
21746 ;
21747 return 0;
21748}
21749_ACEOF
3e0be4ab 21750if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 21751 ac_cv_lib_util_getloadavg=yes
ae0d7250 21752else
5476a9a4 21753 ac_cv_lib_util_getloadavg=no
ae0d7250 21754fi
3e0be4ab
GM
21755rm -f core conftest.err conftest.$ac_objext \
21756 conftest$ac_exeext conftest.$ac_ext
5476a9a4
GM
21757LIBS=$ac_check_lib_save_LIBS
21758fi
21759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_getloadavg" >&5
21760$as_echo "$ac_cv_lib_util_getloadavg" >&6; }
21761if test "x$ac_cv_lib_util_getloadavg" = x""yes; then :
21762 LIBS="-lutil $LIBS" gl_func_getloadavg_done=yes
3e0be4ab 21763fi
6d153f56 21764
5476a9a4 21765 fi
6d153f56 21766
5476a9a4
GM
21767 if test $gl_func_getloadavg_done = no; then
21768 # There is a commonly available library for RS/6000 AIX.
21769 # Since it is not a standard part of AIX, it might be installed locally.
21770 gl_getloadavg_LIBS=$LIBS
21771 LIBS="-L/usr/local/lib $LIBS"
21772 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lgetloadavg" >&5
21773$as_echo_n "checking for getloadavg in -lgetloadavg... " >&6; }
21774if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then :
f199cab1 21775 $as_echo_n "(cached) " >&6
3e0be4ab 21776else
f199cab1 21777 ac_check_lib_save_LIBS=$LIBS
5476a9a4 21778LIBS="-lgetloadavg $LIBS"
f199cab1
GM
21779cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21780/* end confdefs.h. */
3e0be4ab 21781
f199cab1
GM
21782/* Override any GCC internal prototype to avoid an error.
21783 Use char because int might match the return type of a GCC
21784 builtin and then its argument prototype would still apply. */
21785#ifdef __cplusplus
21786extern "C"
21787#endif
5476a9a4 21788char getloadavg ();
f199cab1
GM
21789int
21790main ()
21791{
5476a9a4 21792return getloadavg ();
f199cab1
GM
21793 ;
21794 return 0;
21795}
ae0d7250 21796_ACEOF
f199cab1 21797if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 21798 ac_cv_lib_getloadavg_getloadavg=yes
f199cab1 21799else
5476a9a4 21800 ac_cv_lib_getloadavg_getloadavg=no
ae0d7250 21801fi
f199cab1
GM
21802rm -f core conftest.err conftest.$ac_objext \
21803 conftest$ac_exeext conftest.$ac_ext
21804LIBS=$ac_check_lib_save_LIBS
3e0be4ab 21805fi
5476a9a4
GM
21806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_getloadavg_getloadavg" >&5
21807$as_echo "$ac_cv_lib_getloadavg_getloadavg" >&6; }
21808if test "x$ac_cv_lib_getloadavg_getloadavg" = x""yes; then :
21809 LIBS="-lgetloadavg $LIBS" gl_func_getloadavg_done=yes
21810else
21811 LIBS=$gl_getloadavg_LIBS
6d153f56 21812fi
ae0d7250 21813
5476a9a4 21814 fi
16c3e636 21815
5476a9a4
GM
21816 # Set up the replacement function if necessary.
21817 if test $gl_func_getloadavg_done = no; then
21818 HAVE_GETLOADAVG=0
16c3e636 21819
5476a9a4
GM
21820 # Solaris has libkstat which does not require root.
21821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kstat_open in -lkstat" >&5
21822$as_echo_n "checking for kstat_open in -lkstat... " >&6; }
21823if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then :
f199cab1
GM
21824 $as_echo_n "(cached) " >&6
21825else
21826 ac_check_lib_save_LIBS=$LIBS
5476a9a4 21827LIBS="-lkstat $LIBS"
f199cab1
GM
21828cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21829/* end confdefs.h. */
5f90be1b 21830
f199cab1
GM
21831/* Override any GCC internal prototype to avoid an error.
21832 Use char because int might match the return type of a GCC
21833 builtin and then its argument prototype would still apply. */
21834#ifdef __cplusplus
21835extern "C"
21836#endif
5476a9a4 21837char kstat_open ();
f199cab1
GM
21838int
21839main ()
21840{
5476a9a4 21841return kstat_open ();
f199cab1
GM
21842 ;
21843 return 0;
21844}
3e0be4ab 21845_ACEOF
f199cab1 21846if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 21847 ac_cv_lib_kstat_kstat_open=yes
f199cab1 21848else
5476a9a4 21849 ac_cv_lib_kstat_kstat_open=no
5f90be1b 21850fi
f199cab1
GM
21851rm -f core conftest.err conftest.$ac_objext \
21852 conftest$ac_exeext conftest.$ac_ext
21853LIBS=$ac_check_lib_save_LIBS
3e0be4ab 21854fi
5476a9a4
GM
21855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kstat_kstat_open" >&5
21856$as_echo "$ac_cv_lib_kstat_kstat_open" >&6; }
21857if test "x$ac_cv_lib_kstat_kstat_open" = x""yes; then :
3e0be4ab 21858 cat >>confdefs.h <<_ACEOF
5476a9a4 21859#define HAVE_LIBKSTAT 1
3e0be4ab 21860_ACEOF
5f90be1b 21861
5476a9a4 21862 LIBS="-lkstat $LIBS"
5f90be1b 21863
f199cab1 21864fi
5f90be1b 21865
5476a9a4 21866 test $ac_cv_lib_kstat_kstat_open = yes && gl_func_getloadavg_done=yes
da6c8463 21867
5476a9a4
GM
21868 # AIX has libperfstat which does not require root
21869 if test $gl_func_getloadavg_done = no; then
21870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for perfstat_cpu_total in -lperfstat" >&5
21871$as_echo_n "checking for perfstat_cpu_total in -lperfstat... " >&6; }
21872if test "${ac_cv_lib_perfstat_perfstat_cpu_total+set}" = set; then :
f199cab1
GM
21873 $as_echo_n "(cached) " >&6
21874else
5476a9a4
GM
21875 ac_check_lib_save_LIBS=$LIBS
21876LIBS="-lperfstat $LIBS"
21877cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5f90be1b 21878/* end confdefs.h. */
5476a9a4
GM
21879
21880/* Override any GCC internal prototype to avoid an error.
21881 Use char because int might match the return type of a GCC
21882 builtin and then its argument prototype would still apply. */
21883#ifdef __cplusplus
21884extern "C"
21885#endif
21886char perfstat_cpu_total ();
5f90be1b
PE
21887int
21888main ()
21889{
5476a9a4 21890return perfstat_cpu_total ();
5f90be1b
PE
21891 ;
21892 return 0;
21893}
21894_ACEOF
5476a9a4
GM
21895if ac_fn_c_try_link "$LINENO"; then :
21896 ac_cv_lib_perfstat_perfstat_cpu_total=yes
f199cab1 21897else
5476a9a4 21898 ac_cv_lib_perfstat_perfstat_cpu_total=no
f199cab1 21899fi
5476a9a4
GM
21900rm -f core conftest.err conftest.$ac_objext \
21901 conftest$ac_exeext conftest.$ac_ext
21902LIBS=$ac_check_lib_save_LIBS
f199cab1 21903fi
5476a9a4
GM
21904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_perfstat_perfstat_cpu_total" >&5
21905$as_echo "$ac_cv_lib_perfstat_perfstat_cpu_total" >&6; }
21906if test "x$ac_cv_lib_perfstat_perfstat_cpu_total" = x""yes; then :
21907 cat >>confdefs.h <<_ACEOF
21908#define HAVE_LIBPERFSTAT 1
21909_ACEOF
21910
21911 LIBS="-lperfstat $LIBS"
21912
21913fi
21914
21915 test $ac_cv_lib_perfstat_perfstat_cpu_total = yes && gl_func_getloadavg_done=yes
21916 fi
21917
21918 if test $gl_func_getloadavg_done = no; then
21919 ac_fn_c_check_header_mongrel "$LINENO" "sys/dg_sys_info.h" "ac_cv_header_sys_dg_sys_info_h" "$ac_includes_default"
21920if test "x$ac_cv_header_sys_dg_sys_info_h" = x""yes; then :
21921 gl_func_getloadavg_done=yes
21922
21923$as_echo "#define DGUX 1" >>confdefs.h
21924
21925 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dg_sys_info in -ldgc" >&5
21926$as_echo_n "checking for dg_sys_info in -ldgc... " >&6; }
21927if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then :
f199cab1
GM
21928 $as_echo_n "(cached) " >&6
21929else
21930 ac_check_lib_save_LIBS=$LIBS
5476a9a4 21931LIBS="-ldgc $LIBS"
f199cab1
GM
21932cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21933/* end confdefs.h. */
3e0be4ab 21934
f199cab1
GM
21935/* Override any GCC internal prototype to avoid an error.
21936 Use char because int might match the return type of a GCC
21937 builtin and then its argument prototype would still apply. */
21938#ifdef __cplusplus
21939extern "C"
21940#endif
5476a9a4 21941char dg_sys_info ();
f199cab1
GM
21942int
21943main ()
21944{
5476a9a4 21945return dg_sys_info ();
f199cab1
GM
21946 ;
21947 return 0;
21948}
21949_ACEOF
21950if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 21951 ac_cv_lib_dgc_dg_sys_info=yes
f199cab1 21952else
5476a9a4 21953 ac_cv_lib_dgc_dg_sys_info=no
5f90be1b 21954fi
3e0be4ab
GM
21955rm -f core conftest.err conftest.$ac_objext \
21956 conftest$ac_exeext conftest.$ac_ext
f199cab1 21957LIBS=$ac_check_lib_save_LIBS
5f90be1b 21958fi
5476a9a4
GM
21959{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dgc_dg_sys_info" >&5
21960$as_echo "$ac_cv_lib_dgc_dg_sys_info" >&6; }
21961if test "x$ac_cv_lib_dgc_dg_sys_info" = x""yes; then :
21962 cat >>confdefs.h <<_ACEOF
21963#define HAVE_LIBDGC 1
21964_ACEOF
21965
21966 LIBS="-ldgc $LIBS"
21967
da6c8463
GM
21968fi
21969
5476a9a4
GM
21970fi
21971
21972
21973 fi
21974 fi
21975fi
21976
21977
21978if test "x$gl_save_LIBS" = x; then
21979 GETLOADAVG_LIBS=$LIBS
f199cab1 21980else
5476a9a4
GM
21981 GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$gl_save_LIBS!!"`
21982fi
21983LIBS=$gl_save_LIBS
21984
21985
21986# Test whether the system declares getloadavg. Solaris has the function
21987# but declares it in <sys/loadavg.h>, not <stdlib.h>.
21988for ac_header in sys/loadavg.h
21989do :
21990 ac_fn_c_check_header_mongrel "$LINENO" "sys/loadavg.h" "ac_cv_header_sys_loadavg_h" "$ac_includes_default"
21991if test "x$ac_cv_header_sys_loadavg_h" = x""yes; then :
21992 cat >>confdefs.h <<_ACEOF
21993#define HAVE_SYS_LOADAVG_H 1
f199cab1 21994_ACEOF
5476a9a4 21995
f199cab1 21996fi
5476a9a4
GM
21997
21998done
21999
22000if test $ac_cv_header_sys_loadavg_h = yes; then
22001 HAVE_SYS_LOADAVG_H=1
22002else
22003 HAVE_SYS_LOADAVG_H=0
f199cab1 22004fi
5476a9a4
GM
22005ac_fn_c_check_decl "$LINENO" "getloadavg" "ac_cv_have_decl_getloadavg" "#if HAVE_SYS_LOADAVG_H
22006 # include <sys/loadavg.h>
22007 #endif
22008 #include <stdlib.h>
22009"
22010if test "x$ac_cv_have_decl_getloadavg" = x""yes; then :
5f90be1b 22011
f199cab1 22012else
5476a9a4 22013 HAVE_DECL_GETLOADAVG=0
f199cab1 22014fi
5f90be1b 22015
5f90be1b 22016
a6342fc8 22017 if test $HAVE_GETLOADAVG = 0; then
5476a9a4
GM
22018
22019
22020
22021
22022
22023
22024
22025
22026 gl_LIBOBJS="$gl_LIBOBJS getloadavg.$ac_objext"
22027
22028
22029# Figure out what our getloadavg.c needs.
22030
22031
22032
22033# On HPUX9, an unprivileged user can get load averages this way.
22034if test $gl_func_getloadavg_done = no; then
22035 for ac_func in pstat_getdynamic
22036do :
22037 ac_fn_c_check_func "$LINENO" "pstat_getdynamic" "ac_cv_func_pstat_getdynamic"
22038if test "x$ac_cv_func_pstat_getdynamic" = x""yes; then :
22039 cat >>confdefs.h <<_ACEOF
22040#define HAVE_PSTAT_GETDYNAMIC 1
22041_ACEOF
22042 gl_func_getloadavg_done=yes
3e0be4ab 22043fi
5476a9a4 22044done
6ad6792b 22045
5476a9a4 22046fi
6ad6792b 22047
5476a9a4
GM
22048# We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
22049# uses stabs), but it is still SVR4. We cannot check for <elf.h> because
22050# Irix 4.0.5F has the header but not the library.
22051if test $gl_func_getloadavg_done = no && test "$ac_cv_lib_elf_elf_begin" = yes \
22052 && test "$ac_cv_lib_kvm_kvm_open" = yes; then
22053 gl_func_getloadavg_done=yes
6ad6792b 22054
5476a9a4 22055$as_echo "#define SVR4 1" >>confdefs.h
6ad6792b 22056
5476a9a4
GM
22057fi
22058
22059if test $gl_func_getloadavg_done = no; then
22060 ac_fn_c_check_header_mongrel "$LINENO" "inq_stats/cpustats.h" "ac_cv_header_inq_stats_cpustats_h" "$ac_includes_default"
22061if test "x$ac_cv_header_inq_stats_cpustats_h" = x""yes; then :
22062 gl_func_getloadavg_done=yes
22063
22064$as_echo "#define UMAX 1" >>confdefs.h
22065
22066
22067$as_echo "#define UMAX4_3 1" >>confdefs.h
22068
22069fi
22070
22071
22072fi
22073
22074if test $gl_func_getloadavg_done = no; then
22075 ac_fn_c_check_header_mongrel "$LINENO" "sys/cpustats.h" "ac_cv_header_sys_cpustats_h" "$ac_includes_default"
22076if test "x$ac_cv_header_sys_cpustats_h" = x""yes; then :
22077 gl_func_getloadavg_done=yes; $as_echo "#define UMAX 1" >>confdefs.h
22078
22079fi
22080
22081
22082fi
22083
22084if test $gl_func_getloadavg_done = no; then
22085 for ac_header in mach/mach.h
22086do :
22087 ac_fn_c_check_header_mongrel "$LINENO" "mach/mach.h" "ac_cv_header_mach_mach_h" "$ac_includes_default"
22088if test "x$ac_cv_header_mach_mach_h" = x""yes; then :
22089 cat >>confdefs.h <<_ACEOF
22090#define HAVE_MACH_MACH_H 1
22091_ACEOF
22092
22093fi
22094
22095done
22096
22097fi
22098
22099for ac_header in nlist.h
22100do :
22101 ac_fn_c_check_header_mongrel "$LINENO" "nlist.h" "ac_cv_header_nlist_h" "$ac_includes_default"
22102if test "x$ac_cv_header_nlist_h" = x""yes; then :
22103 cat >>confdefs.h <<_ACEOF
22104#define HAVE_NLIST_H 1
22105_ACEOF
22106 ac_fn_c_check_member "$LINENO" "struct nlist" "n_un.n_name" "ac_cv_member_struct_nlist_n_un_n_name" "#include <nlist.h>
22107"
22108if test "x$ac_cv_member_struct_nlist_n_un_n_name" = x""yes; then :
22109
22110cat >>confdefs.h <<_ACEOF
22111#define HAVE_STRUCT_NLIST_N_UN_N_NAME 1
22112_ACEOF
6ad6792b 22113
0eb775a3 22114
f199cab1 22115fi
3e0be4ab 22116
5476a9a4 22117 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 22118/* end confdefs.h. */
5476a9a4 22119#include <nlist.h>
f199cab1
GM
22120int
22121main ()
22122{
5476a9a4
GM
22123struct nlist x;
22124 #ifdef HAVE_STRUCT_NLIST_N_UN_N_NAME
22125 x.n_un.n_name = "";
22126 #else
22127 x.n_name = "";
22128 #endif
f199cab1
GM
22129 ;
22130 return 0;
22131}
22132_ACEOF
5476a9a4 22133if ac_fn_c_try_link "$LINENO"; then :
6ad6792b 22134
5476a9a4 22135$as_echo "#define N_NAME_POINTER 1" >>confdefs.h
6ad6792b
GM
22136
22137fi
5476a9a4
GM
22138rm -f core conftest.err conftest.$ac_objext \
22139 conftest$ac_exeext conftest.$ac_ext
6ad6792b 22140
5476a9a4 22141fi
6ad6792b 22142
5476a9a4 22143done
6ad6792b 22144
a6342fc8 22145 fi
ca36e0ff 22146
ca36e0ff
GM
22147
22148
1f5d53eb
PE
22149
22150
5476a9a4 22151 GNULIB_GETLOADAVG=1
1f5d53eb
PE
22152
22153
22154
22155
22156
22157
22158
1f5d53eb 22159
1f5d53eb 22160
3e0be4ab 22161
a6342fc8 22162 if test $REPLACE_GETOPT = 1; then
3e0be4ab 22163
1f5d53eb
PE
22164
22165
1f5d53eb 22166
1f5d53eb
PE
22167
22168
22169
22170
5476a9a4 22171 gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
0eb775a3
GM
22172
22173
1f5d53eb
PE
22174
22175
16c3e636 22176
5476a9a4
GM
22177
22178
22179
22180
22181 gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
22182
22183
22184
22185
a6342fc8
GM
22186 GNULIB_GL_UNISTD_H_GETOPT=1
22187 fi
16c3e636
PE
22188
22189
22190
4fda9c95
GM
22191
22192
22193
22194
5476a9a4
GM
22195 REPLACE_GETOPT=0
22196 if test -n "$gl_replace_getopt"; then
22197 REPLACE_GETOPT=1
22198 fi
22199
22200 if test $REPLACE_GETOPT = 1; then
22201
22202 GETOPT_H=getopt.h
22203
22204$as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
22205
22206
22207
22208 fi
22209
a6342fc8 22210 if test $REPLACE_GETOPT = 1; then
5476a9a4
GM
22211
22212
22213
22214
22215
22216
22217
22218
22219 gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
22220
22221
22222
22223
22224
22225
22226
22227
22228
22229 gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
4fda9c95
GM
22230
22231
22232
22233
a6342fc8
GM
22234 GNULIB_GL_UNISTD_H_GETOPT=1
22235 fi
4fda9c95
GM
22236
22237
22238
22239
4fda9c95 22240
4fda9c95 22241
4fda9c95 22242
5476a9a4
GM
22243
22244
22245
22246
22247
22248 gl_gettimeofday_timezone=void
22249 if test $ac_cv_func_gettimeofday != yes; then
22250 HAVE_GETTIMEOFDAY=0
f199cab1 22251 else
4fda9c95
GM
22252
22253
3e0be4ab 22254
5476a9a4
GM
22255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5
22256$as_echo_n "checking whether gettimeofday clobbers localtime buffer... " >&6; }
22257if test "${gl_cv_func_gettimeofday_clobber+set}" = set; then :
22258 $as_echo_n "(cached) " >&6
22259else
22260 if test "$cross_compiling" = yes; then :
22261 # When cross-compiling:
22262 case "$host_os" in
22263 # Guess all is fine on glibc systems.
22264 *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
22265 # If we don't know, assume the worst.
22266 *) gl_cv_func_gettimeofday_clobber="guessing yes" ;;
22267 esac
4fda9c95 22268
5476a9a4
GM
22269else
22270 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22271/* end confdefs.h. */
22272#include <string.h>
22273 #include <sys/time.h>
22274 #include <time.h>
22275 #include <stdlib.h>
4fda9c95 22276
5476a9a4
GM
22277int
22278main ()
22279{
4fda9c95 22280
5476a9a4
GM
22281 time_t t = 0;
22282 struct tm *lt;
22283 struct tm saved_lt;
22284 struct timeval tv;
22285 lt = localtime (&t);
22286 saved_lt = *lt;
22287 gettimeofday (&tv, NULL);
22288 return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
cc322c06 22289
5476a9a4
GM
22290 ;
22291 return 0;
22292}
22293_ACEOF
22294if ac_fn_c_try_run "$LINENO"; then :
22295 gl_cv_func_gettimeofday_clobber=no
22296else
22297 gl_cv_func_gettimeofday_clobber=yes
22298fi
22299rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22300 conftest.$ac_objext conftest.beam conftest.$ac_ext
22301fi
cc322c06 22302
5476a9a4
GM
22303fi
22304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5
22305$as_echo "$gl_cv_func_gettimeofday_clobber" >&6; }
cc322c06 22306
5476a9a4
GM
22307 case "$gl_cv_func_gettimeofday_clobber" in
22308 *yes)
22309 REPLACE_GETTIMEOFDAY=1
cc322c06 22310
4fda9c95 22311
5476a9a4 22312$as_echo "#define gmtime rpl_gmtime" >>confdefs.h
4fda9c95 22313
ae0d7250 22314
5476a9a4 22315$as_echo "#define localtime rpl_localtime" >>confdefs.h
ae0d7250
PE
22316
22317
ae0d7250 22318
5476a9a4
GM
22319$as_echo "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h
22320
22321 ;;
22322 esac
22323
22324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
22325$as_echo_n "checking for gettimeofday with POSIX signature... " >&6; }
22326if test "${gl_cv_func_gettimeofday_posix_signature+set}" = set; then :
f199cab1
GM
22327 $as_echo_n "(cached) " >&6
22328else
5476a9a4
GM
22329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22330/* end confdefs.h. */
22331#include <sys/time.h>
22332 struct timeval c;
22333 int gettimeofday (struct timeval *restrict, void *restrict);
22334
22335int
22336main ()
22337{
22338/* glibc uses struct timezone * rather than the POSIX void *
22339 if _GNU_SOURCE is defined. However, since the only portable
22340 use of gettimeofday uses NULL as the second parameter, and
22341 since the glibc definition is actually more typesafe, it is
22342 not worth wrapping this to get a compliant signature. */
22343 int (*f) (struct timeval *restrict, void *restrict)
22344 = gettimeofday;
22345 int x = f (&c, 0);
22346 return !(x | c.tv_sec | c.tv_usec);
22347
22348 ;
22349 return 0;
22350}
22351_ACEOF
22352if ac_fn_c_try_compile "$LINENO"; then :
22353 gl_cv_func_gettimeofday_posix_signature=yes
22354else
22355 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 22356/* end confdefs.h. */
5476a9a4
GM
22357#include <sys/time.h>
22358int gettimeofday (struct timeval *restrict, struct timezone *restrict);
ae0d7250 22359
f199cab1
GM
22360int
22361main ()
22362{
5476a9a4 22363
f199cab1
GM
22364 ;
22365 return 0;
ae0d7250
PE
22366}
22367_ACEOF
5476a9a4
GM
22368if ac_fn_c_try_compile "$LINENO"; then :
22369 gl_cv_func_gettimeofday_posix_signature=almost
ae0d7250 22370else
5476a9a4 22371 gl_cv_func_gettimeofday_posix_signature=no
ae0d7250 22372fi
5476a9a4 22373rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ae0d7250 22374fi
5476a9a4 22375rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52724a05 22376fi
5476a9a4
GM
22377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
22378$as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; }
22379 if test $gl_cv_func_gettimeofday_posix_signature = almost; then
22380 gl_gettimeofday_timezone='struct timezone'
22381 elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
22382 REPLACE_GETTIMEOFDAY=1
22383 fi
22384 if test $REPLACE_STRUCT_TIMEVAL = 1; then
22385 REPLACE_GETTIMEOFDAY=1
22386 fi
3e0be4ab 22387
5476a9a4 22388 fi
ae0d7250 22389
5476a9a4
GM
22390cat >>confdefs.h <<_ACEOF
22391#define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone
22392_ACEOF
f199cab1 22393
ae0d7250 22394
a6342fc8 22395 if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
ae0d7250 22396
cc322c06
GM
22397
22398
cc322c06
GM
22399
22400
ae0d7250
PE
22401
22402
22403
5476a9a4 22404 gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
5fa4ac76
PE
22405
22406
5476a9a4
GM
22407 for ac_header in sys/timeb.h
22408do :
22409 ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
22410if test "x$ac_cv_header_sys_timeb_h" = x""yes; then :
22411 cat >>confdefs.h <<_ACEOF
22412#define HAVE_SYS_TIMEB_H 1
22413_ACEOF
5fa4ac76 22414
3e0be4ab 22415fi
5fa4ac76 22416
5476a9a4 22417done
f199cab1 22418
5476a9a4
GM
22419 for ac_func in _ftime
22420do :
22421 ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
22422if test "x$ac_cv_func__ftime" = x""yes; then :
22423 cat >>confdefs.h <<_ACEOF
22424#define HAVE__FTIME 1
22425_ACEOF
5fa4ac76 22426
5476a9a4
GM
22427fi
22428done
5fa4ac76
PE
22429
22430
a6342fc8 22431 fi
5fa4ac76
PE
22432
22433
22434
22435
22436
5476a9a4 22437 GNULIB_GETTIMEOFDAY=1
5fa4ac76
PE
22438
22439
22440
22441
0eb775a3
GM
22442
22443
369e19fc
PE
22444
22445
369e19fc
PE
22446
22447
5476a9a4
GM
22448 if test $ac_cv_func_lstat = yes; then
22449
22450 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
22451 *no)
22452 REPLACE_LSTAT=1
22453 ;;
22454 esac
22455 else
22456 HAVE_LSTAT=0
f199cab1 22457 fi
369e19fc 22458
a6342fc8 22459 if test $REPLACE_LSTAT = 1; then
369e19fc 22460
5fa4ac76 22461
369e19fc 22462
369e19fc 22463
369e19fc 22464
369e19fc 22465
369e19fc 22466
369e19fc 22467
5476a9a4 22468 gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
f199cab1 22469
45d4966b 22470 :
a6342fc8 22471 fi
369e19fc 22472
369e19fc 22473
369e19fc 22474
5fa4ac76
PE
22475
22476
5476a9a4 22477 GNULIB_LSTAT=1
5fa4ac76 22478
5fa4ac76 22479
27505cf5 22480
27505cf5 22481
27505cf5 22482
27505cf5 22483
27505cf5 22484
27505cf5 22485
5fa4ac76
PE
22486
22487
283c7aed
GM
22488 if test $ac_cv_have_decl_memrchr = no; then
22489 HAVE_DECL_MEMRCHR=0
22490 fi
22491
22492 for ac_func in memrchr
22493do :
22494 ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr"
22495if test "x$ac_cv_func_memrchr" = x""yes; then :
22496 cat >>confdefs.h <<_ACEOF
22497#define HAVE_MEMRCHR 1
22498_ACEOF
22499
22500fi
22501done
22502
22503
22504 if test $ac_cv_func_memrchr = no; then
22505
22506
22507
22508
22509
22510
22511
22512
22513 gl_LIBOBJS="$gl_LIBOBJS memrchr.$ac_objext"
22514
22515 :
22516 fi
22517
22518
22519
22520
22521
22522 GNULIB_MEMRCHR=1
22523
22524
22525
22526
22527
22528
22529
22530
22531
22532
5476a9a4
GM
22533
22534 if test $APPLE_UNIVERSAL_BUILD = 1; then
22535 # A universal build on Apple Mac OS X platforms.
22536 # The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode.
22537 # But we need a configuration result that is valid in both modes.
22538 gl_cv_func_working_mktime=no
22539 fi
22540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5
22541$as_echo_n "checking for working mktime... " >&6; }
22542if test "${gl_cv_func_working_mktime+set}" = set; then :
f199cab1
GM
22543 $as_echo_n "(cached) " >&6
22544else
5476a9a4
GM
22545 if test "$cross_compiling" = yes; then :
22546 gl_cv_func_working_mktime=no
22547else
22548 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 22549/* end confdefs.h. */
5476a9a4
GM
22550/* Test program from Paul Eggert and Tony Leneis. */
22551#include <limits.h>
22552#include <stdlib.h>
22553#include <time.h>
5fa4ac76 22554
5476a9a4
GM
22555#ifdef HAVE_UNISTD_H
22556# include <unistd.h>
f199cab1 22557#endif
5476a9a4
GM
22558
22559#ifndef HAVE_ALARM
22560# define alarm(X) /* empty */
22561#endif
22562
22563/* Work around redefinition to rpl_putenv by other config tests. */
22564#undef putenv
22565
22566static time_t time_t_max;
22567static time_t time_t_min;
22568
22569/* Values we'll use to set the TZ environment variable. */
22570static char *tz_strings[] = {
22571 (char *) 0, "TZ=GMT0", "TZ=JST-9",
22572 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
22573};
22574#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
22575
22576/* Return 0 if mktime fails to convert a date in the spring-forward gap.
22577 Based on a problem report from Andreas Jaeger. */
22578static int
22579spring_forward_gap ()
f199cab1 22580{
5476a9a4
GM
22581 /* glibc (up to about 1998-10-07) failed this test. */
22582 struct tm tm;
22583
22584 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
22585 instead of "TZ=America/Vancouver" in order to detect the bug even
22586 on systems that don't support the Olson extension, or don't have the
22587 full zoneinfo tables installed. */
22588 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
22589
22590 tm.tm_year = 98;
22591 tm.tm_mon = 3;
22592 tm.tm_mday = 5;
22593 tm.tm_hour = 2;
22594 tm.tm_min = 0;
22595 tm.tm_sec = 0;
22596 tm.tm_isdst = -1;
22597 return mktime (&tm) != (time_t) -1;
f199cab1 22598}
5fa4ac76 22599
5476a9a4
GM
22600static int
22601mktime_test1 (time_t now)
22602{
22603 struct tm *lt;
22604 return ! (lt = localtime (&now)) || mktime (lt) == now;
22605}
5fa4ac76 22606
5476a9a4
GM
22607static int
22608mktime_test (time_t now)
22609{
22610 return (mktime_test1 (now)
22611 && mktime_test1 ((time_t) (time_t_max - now))
22612 && mktime_test1 ((time_t) (time_t_min + now)));
22613}
067d23c9 22614
5476a9a4
GM
22615static int
22616irix_6_4_bug ()
22617{
22618 /* Based on code from Ariel Faigon. */
22619 struct tm tm;
22620 tm.tm_year = 96;
22621 tm.tm_mon = 3;
22622 tm.tm_mday = 0;
22623 tm.tm_hour = 0;
22624 tm.tm_min = 0;
22625 tm.tm_sec = 0;
22626 tm.tm_isdst = -1;
22627 mktime (&tm);
22628 return tm.tm_mon == 2 && tm.tm_mday == 31;
22629}
22630
22631static int
22632bigtime_test (int j)
22633{
22634 struct tm tm;
22635 time_t now;
22636 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
22637 now = mktime (&tm);
22638 if (now != (time_t) -1)
22639 {
22640 struct tm *lt = localtime (&now);
22641 if (! (lt
22642 && lt->tm_year == tm.tm_year
22643 && lt->tm_mon == tm.tm_mon
22644 && lt->tm_mday == tm.tm_mday
22645 && lt->tm_hour == tm.tm_hour
22646 && lt->tm_min == tm.tm_min
22647 && lt->tm_sec == tm.tm_sec
22648 && lt->tm_yday == tm.tm_yday
22649 && lt->tm_wday == tm.tm_wday
22650 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
22651 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
22652 return 0;
22653 }
22654 return 1;
22655}
369e19fc 22656
5476a9a4
GM
22657static int
22658year_2050_test ()
22659{
22660 /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
22661 ignoring leap seconds. */
22662 unsigned long int answer = 2527315200UL;
369e19fc 22663
5476a9a4
GM
22664 struct tm tm;
22665 time_t t;
22666 tm.tm_year = 2050 - 1900;
22667 tm.tm_mon = 2 - 1;
22668 tm.tm_mday = 1;
22669 tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
22670 tm.tm_isdst = -1;
369e19fc 22671
5476a9a4
GM
22672 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
22673 instead of "TZ=America/Vancouver" in order to detect the bug even
22674 on systems that don't support the Olson extension, or don't have the
22675 full zoneinfo tables installed. */
22676 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
067d23c9 22677
5476a9a4 22678 t = mktime (&tm);
067d23c9 22679
5476a9a4
GM
22680 /* Check that the result is either a failure, or close enough
22681 to the correct answer that we can assume the discrepancy is
22682 due to leap seconds. */
22683 return (t == (time_t) -1
22684 || (0 < t && answer - 120 <= t && t <= answer + 120));
22685}
067d23c9 22686
f199cab1
GM
22687int
22688main ()
22689{
5476a9a4
GM
22690 int result = 0;
22691 time_t t, delta;
22692 int i, j;
22693 int time_t_signed_magnitude = (time_t) ~ (time_t) 0 < (time_t) -1;
22694 int time_t_signed = ! ((time_t) 0 < (time_t) -1);
067d23c9 22695
5476a9a4
GM
22696 /* This test makes some buggy mktime implementations loop.
22697 Give up after 60 seconds; a mktime slower than that
22698 isn't worth using anyway. */
22699 alarm (60);
067d23c9 22700
5476a9a4
GM
22701 time_t_max = (! time_t_signed
22702 ? (time_t) -1
22703 : ((((time_t) 1 << (sizeof (time_t) * CHAR_BIT - 2)) - 1)
22704 * 2 + 1));
22705 time_t_min = (! time_t_signed
22706 ? (time_t) 0
22707 : time_t_signed_magnitude
22708 ? ~ (time_t) 0
22709 : ~ time_t_max);
3e0be4ab 22710
5476a9a4
GM
22711 delta = time_t_max / 997; /* a suitable prime number */
22712 for (i = 0; i < N_STRINGS; i++)
22713 {
22714 if (tz_strings[i])
22715 putenv (tz_strings[i]);
3e0be4ab 22716
5476a9a4
GM
22717 for (t = 0; t <= time_t_max - delta && (result & 1) == 0; t += delta)
22718 if (! mktime_test (t))
22719 result |= 1;
22720 if ((result & 2) == 0
22721 && ! (mktime_test ((time_t) 1)
22722 && mktime_test ((time_t) (60 * 60))
22723 && mktime_test ((time_t) (60 * 60 * 24))))
22724 result |= 2;
f199cab1 22725
5476a9a4
GM
22726 for (j = 1; (result & 4) == 0; j <<= 1)
22727 {
22728 if (! bigtime_test (j))
22729 result |= 4;
22730 if (INT_MAX / 2 < j)
22731 break;
22732 }
22733 if ((result & 8) == 0 && ! bigtime_test (INT_MAX))
22734 result |= 8;
22735 }
22736 if (! irix_6_4_bug ())
22737 result |= 16;
22738 if (! spring_forward_gap ())
22739 result |= 32;
22740 if (! year_2050_test ())
22741 result |= 64;
22742 return result;
067d23c9
KY
22743}
22744_ACEOF
5476a9a4
GM
22745if ac_fn_c_try_run "$LINENO"; then :
22746 gl_cv_func_working_mktime=yes
067d23c9 22747else
5476a9a4 22748 gl_cv_func_working_mktime=no
3e0be4ab 22749fi
5476a9a4
GM
22750rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22751 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1
GM
22752fi
22753
f199cab1 22754
5476a9a4
GM
22755fi
22756{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_mktime" >&5
22757$as_echo "$gl_cv_func_working_mktime" >&6; }
f199cab1 22758
5476a9a4
GM
22759 if test $gl_cv_func_working_mktime = no; then
22760 REPLACE_MKTIME=1
22761 else
22762 REPLACE_MKTIME=0
f199cab1 22763 fi
f199cab1 22764
a6342fc8 22765 if test $REPLACE_MKTIME = 1; then
f199cab1 22766
f199cab1 22767
0eb775a3 22768
067d23c9 22769
a451f14b 22770
a451f14b 22771
743c80a7
PE
22772
22773
5476a9a4
GM
22774 gl_LIBOBJS="$gl_LIBOBJS mktime.$ac_objext"
22775
a6342fc8
GM
22776 :
22777 fi
a451f14b
PE
22778
22779
22780
e275c824
PE
22781
22782
5476a9a4 22783 GNULIB_MKTIME=1
e275c824
PE
22784
22785
22786
22787
22788
22789
22790
22791
d87ffdb7 22792
5476a9a4
GM
22793
22794
22795 if test $ac_cv_func_pselect = yes; then
22796 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether signature of pselect conforms to POSIX" >&5
22797$as_echo_n "checking whether signature of pselect conforms to POSIX... " >&6; }
22798if test "${gl_cv_sig_pselect+set}" = set; then :
e275c824
PE
22799 $as_echo_n "(cached) " >&6
22800else
5476a9a4 22801 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
e275c824 22802/* end confdefs.h. */
5476a9a4 22803#include <sys/select.h>
e275c824 22804
f199cab1
GM
22805int
22806main ()
22807{
5476a9a4
GM
22808int (*p) (int, fd_set *, fd_set *, fd_set *restrict,
22809 struct timespec const *restrict,
22810 sigset_t const *restrict) = pselect;
22811 return !p;
f199cab1
GM
22812 ;
22813 return 0;
22814}
e275c824 22815_ACEOF
f199cab1 22816if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 22817 gl_cv_sig_pselect=yes
3e0be4ab 22818else
5476a9a4 22819 gl_cv_sig_pselect=no
f199cab1
GM
22820fi
22821rm -f core conftest.err conftest.$ac_objext \
22822 conftest$ac_exeext conftest.$ac_ext
3e0be4ab 22823fi
5476a9a4
GM
22824{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sig_pselect" >&5
22825$as_echo "$gl_cv_sig_pselect" >&6; }
b6c9d18d
GM
22826
22827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pselect detects invalid fds" >&5
22828$as_echo_n "checking whether pselect detects invalid fds... " >&6; }
22829if test "${gl_cv_func_pselect_detects_ebadf+set}" = set; then :
22830 $as_echo_n "(cached) " >&6
22831else
22832
22833 if test "$cross_compiling" = yes; then :
22834
22835 case "$host_os" in
22836 # Guess yes on glibc systems.
22837 *-gnu*) gl_cv_func_pselect_detects_ebadf="guessing yes" ;;
22838 # If we don't know, assume the worst.
22839 *) gl_cv_func_pselect_detects_ebadf="guessing no" ;;
22840 esac
22841
22842else
22843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22844/* end confdefs.h. */
22845
22846#include <sys/types.h>
22847#include <sys/time.h>
22848#if HAVE_SYS_SELECT_H
22849# include <sys/select.h>
22850#endif
22851#include <unistd.h>
22852#include <errno.h>
22853
22854int
22855main ()
22856{
22857
22858 fd_set set;
22859 dup2(0, 16);
22860 FD_ZERO(&set);
22861 FD_SET(16, &set);
22862 close(16);
22863 struct timespec timeout;
22864 timeout.tv_sec = 0;
22865 timeout.tv_nsec = 5000;
22866 return pselect (17, &set, NULL, NULL, &timeout, NULL) != -1 || errno != EBADF;
22867
22868 ;
22869 return 0;
22870}
22871_ACEOF
22872if ac_fn_c_try_run "$LINENO"; then :
22873 gl_cv_func_pselect_detects_ebadf=yes
22874else
22875 gl_cv_func_pselect_detects_ebadf=no
22876fi
22877rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22878 conftest.$ac_objext conftest.beam conftest.$ac_ext
22879fi
22880
22881
22882fi
22883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pselect_detects_ebadf" >&5
22884$as_echo "$gl_cv_func_pselect_detects_ebadf" >&6; }
22885 case $gl_cv_func_pselect_detects_ebadf in
22886 *yes) ;;
22887 *) REPLACE_PSELECT=1 ;;
22888 esac
5476a9a4 22889 fi
3e0be4ab 22890
5476a9a4
GM
22891 if test $ac_cv_func_pselect = no || test $gl_cv_sig_pselect = no; then
22892 REPLACE_PSELECT=1
22893 fi
3e0be4ab 22894
a6342fc8 22895 if test $HAVE_PSELECT = 0 || test $REPLACE_PSELECT = 1; then
3e0be4ab
GM
22896
22897
3e0be4ab 22898
3e0be4ab 22899
3e0be4ab 22900
3e0be4ab 22901
3e0be4ab 22902
3e0be4ab 22903
5476a9a4 22904 gl_LIBOBJS="$gl_LIBOBJS pselect.$ac_objext"
3e0be4ab 22905
a6342fc8 22906 fi
3e0be4ab
GM
22907
22908
f199cab1 22909
f199cab1 22910
f199cab1 22911
5476a9a4 22912 GNULIB_PSELECT=1
f199cab1 22913
6d153f56 22914
f199cab1 22915
3e0be4ab 22916
3e0be4ab
GM
22917
22918
f199cab1 22919
0eb775a3
GM
22920
22921
5476a9a4 22922 LIB_PTHREAD_SIGMASK=
0eb775a3 22923
f199cab1 22924
f077f61d
GM
22925
22926
22927 if test "$gl_threads_api" = posix; then
22928 if test $ac_cv_func_pthread_sigmask = yes; then
22929 :
22930 else
22931 if test -n "$LIBMULTITHREAD"; then
22932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_sigmask in $LIBMULTITHREAD" >&5
22933$as_echo_n "checking for pthread_sigmask in $LIBMULTITHREAD... " >&6; }
22934if test "${gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD+set}" = set; then :
22935 $as_echo_n "(cached) " >&6
22936else
22937 gl_save_LIBS="$LIBS"
22938 LIBS="$LIBS $LIBMULTITHREAD"
22939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22940/* end confdefs.h. */
22941#include <pthread.h>
22942 #include <signal.h>
22943
22944int
22945main ()
22946{
22947return pthread_sigmask (0, (sigset_t *) 0, (sigset_t *) 0);
22948 ;
22949 return 0;
22950}
22951
22952_ACEOF
22953if ac_fn_c_try_link "$LINENO"; then :
22954 gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD=yes
22955else
22956 gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD=no
22957fi
22958rm -f core conftest.err conftest.$ac_objext \
22959 conftest$ac_exeext conftest.$ac_ext
22960 LIBS="$gl_save_LIBS"
22961
22962fi
22963{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD" >&5
22964$as_echo "$gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD" >&6; }
22965 if test $gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD = yes; then
22966 LIB_PTHREAD_SIGMASK="$LIBMULTITHREAD"
22967 else
22968 HAVE_PTHREAD_SIGMASK=0
22969 fi
22970 else
22971 HAVE_PTHREAD_SIGMASK=0
22972 fi
22973 fi
5476a9a4 22974 else
f077f61d
GM
22975 if test $ac_cv_func_pthread_sigmask = yes; then
22976 REPLACE_PTHREAD_SIGMASK=1
22977 else
22978 HAVE_PTHREAD_SIGMASK=0
22979 fi
5476a9a4 22980 fi
6d153f56 22981
52724a05 22982
6d153f56
GM
22983
22984
5476a9a4
GM
22985 if test $HAVE_PTHREAD_SIGMASK = 1; then
22986
22987
22988 if test -z "$LIB_PTHREAD_SIGMASK"; then
22989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask works without -lpthread" >&5
22990$as_echo_n "checking whether pthread_sigmask works without -lpthread... " >&6; }
22991if test "${gl_cv_func_pthread_sigmask_in_libc_works+set}" = set; then :
f199cab1
GM
22992 $as_echo_n "(cached) " >&6
22993else
5476a9a4
GM
22994
22995 if test "$cross_compiling" = yes; then :
22996
22997 case "$host_os" in
22998 freebsd* | hpux* | solaris | solaris2.[2-9]*)
22999 gl_cv_func_pthread_sigmask_in_libc_works="guessing no";;
23000 *)
23001 gl_cv_func_pthread_sigmask_in_libc_works="guessing yes";;
23002 esac
23003
23004else
23005 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 23006/* end confdefs.h. */
6d153f56 23007
5476a9a4
GM
23008#include <pthread.h>
23009#include <signal.h>
23010#include <stddef.h>
23011int main ()
f199cab1 23012{
5476a9a4
GM
23013 sigset_t set;
23014 sigemptyset (&set);
23015 return pthread_sigmask (1729, &set, NULL) != 0;
f199cab1
GM
23016}
23017_ACEOF
5476a9a4
GM
23018if ac_fn_c_try_run "$LINENO"; then :
23019 gl_cv_func_pthread_sigmask_in_libc_works=no
f199cab1 23020else
5476a9a4 23021 gl_cv_func_pthread_sigmask_in_libc_works=yes
f199cab1 23022fi
5476a9a4
GM
23023rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23024 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1 23025fi
5476a9a4
GM
23026
23027
f199cab1 23028fi
5476a9a4
GM
23029{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_in_libc_works" >&5
23030$as_echo "$gl_cv_func_pthread_sigmask_in_libc_works" >&6; }
23031 case "$gl_cv_func_pthread_sigmask_in_libc_works" in
23032 *no)
23033 REPLACE_PTHREAD_SIGMASK=1
cc322c06 23034
5476a9a4 23035$as_echo "#define PTHREAD_SIGMASK_INEFFECTIVE 1" >>confdefs.h
cc322c06 23036
5476a9a4
GM
23037 ;;
23038 esac
23039 fi
3e0be4ab 23040
5476a9a4
GM
23041 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask returns error numbers" >&5
23042$as_echo_n "checking whether pthread_sigmask returns error numbers... " >&6; }
23043if test "${gl_cv_func_pthread_sigmask_return_works+set}" = set; then :
3e0be4ab
GM
23044 $as_echo_n "(cached) " >&6
23045else
5476a9a4
GM
23046
23047 gl_save_LIBS="$LIBS"
23048 LIBS="$LIBS $LIB_PTHREAD_SIGMASK"
23049 if test "$cross_compiling" = yes; then :
23050 case "$host_os" in
23051 cygwin*)
23052 gl_cv_func_pthread_sigmask_return_works="guessing no";;
23053 *)
23054 gl_cv_func_pthread_sigmask_return_works="guessing yes";;
23055 esac
23056
23057else
23058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3e0be4ab 23059/* end confdefs.h. */
f199cab1 23060
5476a9a4
GM
23061#include <pthread.h>
23062#include <signal.h>
23063#include <stddef.h>
23064int main ()
3e0be4ab 23065{
5476a9a4
GM
23066 sigset_t set;
23067 sigemptyset (&set);
23068 if (pthread_sigmask (1729, &set, NULL) == -1)
23069 return 1;
3e0be4ab
GM
23070 return 0;
23071}
6d153f56 23072_ACEOF
5476a9a4
GM
23073if ac_fn_c_try_run "$LINENO"; then :
23074 gl_cv_func_pthread_sigmask_return_works=yes
3e0be4ab 23075else
5476a9a4 23076 gl_cv_func_pthread_sigmask_return_works=no
6d153f56 23077fi
5476a9a4
GM
23078rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23079 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1 23080fi
5476a9a4
GM
23081
23082 LIBS="$gl_save_LIBS"
23083
52724a05 23084fi
5476a9a4
GM
23085{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_return_works" >&5
23086$as_echo "$gl_cv_func_pthread_sigmask_return_works" >&6; }
23087 case "$gl_cv_func_pthread_sigmask_return_works" in
23088 *no)
23089 REPLACE_PTHREAD_SIGMASK=1
6d153f56 23090
5476a9a4 23091$as_echo "#define PTHREAD_SIGMASK_FAILS_WITH_ERRNO 1" >>confdefs.h
6d153f56 23092
5476a9a4
GM
23093 ;;
23094 esac
cc322c06 23095
5476a9a4
GM
23096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask unblocks signals correctly" >&5
23097$as_echo_n "checking whether pthread_sigmask unblocks signals correctly... " >&6; }
23098if test "${gl_cv_func_pthread_sigmask_unblock_works+set}" = set; then :
f199cab1
GM
23099 $as_echo_n "(cached) " >&6
23100else
5476a9a4
GM
23101
23102 case "$host_os" in
23103 irix*)
23104 gl_cv_func_pthread_sigmask_unblock_works="guessing no";;
23105 *)
23106 gl_cv_func_pthread_sigmask_unblock_works="guessing yes";;
23107 esac
23108 gl_save_LIBS="$LIBS"
23109 LIBS="$LIBS $LIBMULTITHREAD"
23110 if test "$cross_compiling" = yes; then :
23111 :
f199cab1 23112else
5476a9a4
GM
23113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23114/* end confdefs.h. */
6d153f56 23115
5476a9a4
GM
23116#include <pthread.h>
23117#include <signal.h>
23118#include <stdio.h>
23119#include <stdlib.h>
23120#include <unistd.h>
23121static volatile int sigint_occurred;
23122static void
23123sigint_handler (int sig)
23124{
23125 sigint_occurred++;
23126}
23127int main ()
23128{
23129 sigset_t set;
23130 int pid = getpid ();
23131 char command[80];
23132 signal (SIGINT, sigint_handler);
23133 sigemptyset (&set);
23134 sigaddset (&set, SIGINT);
23135 if (!(pthread_sigmask (SIG_BLOCK, &set, NULL) == 0))
23136 return 1;
23137 sprintf (command, "sh -c 'sleep 1; kill -%d %d' &", SIGINT, pid);
23138 if (!(system (command) == 0))
23139 return 2;
23140 sleep (2);
23141 if (!(sigint_occurred == 0))
23142 return 3;
23143 if (!(pthread_sigmask (SIG_UNBLOCK, &set, NULL) == 0))
23144 return 4;
23145 if (!(sigint_occurred == 1)) /* This fails on IRIX. */
23146 return 5;
23147 return 0;
23148}
23149_ACEOF
23150if ac_fn_c_try_run "$LINENO"; then :
23151 :
23152else
23153 gl_cv_func_pthread_sigmask_unblock_works=no
f199cab1 23154fi
5476a9a4
GM
23155rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23156 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1 23157fi
5476a9a4
GM
23158
23159 LIBS="$gl_save_LIBS"
23160
f199cab1 23161fi
5476a9a4
GM
23162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_unblock_works" >&5
23163$as_echo "$gl_cv_func_pthread_sigmask_unblock_works" >&6; }
23164 case "$gl_cv_func_pthread_sigmask_unblock_works" in
23165 *no)
23166 REPLACE_PTHREAD_SIGMASK=1
6d153f56 23167
5476a9a4 23168$as_echo "#define PTHREAD_SIGMASK_UNBLOCK_BUG 1" >>confdefs.h
6d153f56 23169
5476a9a4
GM
23170 ;;
23171 esac
6d153f56 23172 fi
6d153f56 23173
a6342fc8 23174 if test $HAVE_PTHREAD_SIGMASK = 0 || test $REPLACE_PTHREAD_SIGMASK = 1; then
a451f14b 23175
a451f14b 23176
743c80a7
PE
23177
23178
23179
23180
23181
f199cab1 23182
5476a9a4 23183 gl_LIBOBJS="$gl_LIBOBJS pthread_sigmask.$ac_objext"
743c80a7
PE
23184
23185
5476a9a4 23186 if test $HAVE_PTHREAD_SIGMASK = 1; then
743c80a7 23187
5476a9a4 23188$as_echo "#define HAVE_PTHREAD_SIGMASK 1" >>confdefs.h
743c80a7 23189
5476a9a4 23190 fi
743c80a7 23191
a6342fc8 23192 fi
938a4ef9 23193
938a4ef9 23194
938a4ef9 23195
938a4ef9 23196
938a4ef9 23197
5476a9a4 23198 GNULIB_PTHREAD_SIGMASK=1
a451f14b 23199
a451f14b 23200
743c80a7
PE
23201
23202
23203
23204
23205
b5591ebb
GM
23206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for putenv compatible with GNU and SVID" >&5
23207$as_echo_n "checking for putenv compatible with GNU and SVID... " >&6; }
23208if test "${gl_cv_func_svid_putenv+set}" = set; then :
23209 $as_echo_n "(cached) " >&6
23210else
23211 if test "$cross_compiling" = yes; then :
23212 case "$host_os" in
23213 # Guess yes on glibc systems.
23214 *-gnu*) gl_cv_func_svid_putenv="guessing yes" ;;
23215 # If we don't know, assume the worst.
23216 *) gl_cv_func_svid_putenv="guessing no" ;;
23217 esac
23218
23219else
23220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23221/* end confdefs.h. */
23222$ac_includes_default
23223int
23224main ()
23225{
23226
23227 /* Put it in env. */
23228 if (putenv ("CONFTEST_putenv=val"))
23229 return 1;
23230
23231 /* Try to remove it. */
23232 if (putenv ("CONFTEST_putenv"))
23233 return 2;
23234
23235 /* Make sure it was deleted. */
23236 if (getenv ("CONFTEST_putenv") != 0)
23237 return 3;
23238
23239 return 0;
23240
23241 ;
23242 return 0;
23243}
23244_ACEOF
23245if ac_fn_c_try_run "$LINENO"; then :
23246 gl_cv_func_svid_putenv=yes
23247else
23248 gl_cv_func_svid_putenv=no
23249fi
23250rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23251 conftest.$ac_objext conftest.beam conftest.$ac_ext
23252fi
23253
23254
23255fi
23256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_svid_putenv" >&5
23257$as_echo "$gl_cv_func_svid_putenv" >&6; }
23258 case "$gl_cv_func_svid_putenv" in
23259 *yes) ;;
23260 *)
23261 REPLACE_PUTENV=1
23262 ;;
23263 esac
23264
23265 if test $REPLACE_PUTENV = 1; then
23266
23267
23268
23269
23270
23271
23272
23273
23274 gl_LIBOBJS="$gl_LIBOBJS putenv.$ac_objext"
23275
23276 fi
23277
23278
23279
23280
23281
23282 GNULIB_PUTENV=1
23283
23284
23285
23286
23287
23288
23289
743c80a7 23290
5476a9a4
GM
23291 if test $ac_cv_func_readlink = no; then
23292 HAVE_READLINK=0
23293 else
23294 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
23295$as_echo_n "checking whether readlink signature is correct... " >&6; }
23296if test "${gl_cv_decl_readlink_works+set}" = set; then :
3e0be4ab
GM
23297 $as_echo_n "(cached) " >&6
23298else
f199cab1 23299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3e0be4ab 23300/* end confdefs.h. */
5476a9a4
GM
23301#include <unistd.h>
23302 /* Cause compilation failure if original declaration has wrong type. */
23303 ssize_t readlink (const char *, char *, size_t);
f199cab1
GM
23304int
23305main ()
23306{
5476a9a4 23307
f199cab1
GM
23308 ;
23309 return 0;
23310}
3e0be4ab 23311_ACEOF
5476a9a4
GM
23312if ac_fn_c_try_compile "$LINENO"; then :
23313 gl_cv_decl_readlink_works=yes
23314else
23315 gl_cv_decl_readlink_works=no
3e0be4ab 23316fi
5476a9a4
GM
23317rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23318fi
23319{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5
23320$as_echo "$gl_cv_decl_readlink_works" >&6; }
23321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
23322$as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; }
23323if test "${gl_cv_func_readlink_works+set}" = set; then :
23324 $as_echo_n "(cached) " >&6
23325else
23326 # We have readlink, so assume ln -s works.
23327 ln -s conftest.no-such conftest.link
23328 ln -s conftest.link conftest.lnk2
23329 if test "$cross_compiling" = yes; then :
23330 case "$host_os" in
23331 # Guess yes on glibc systems.
23332 *-gnu*) gl_cv_func_readlink_works="guessing yes" ;;
23333 # If we don't know, assume the worst.
23334 *) gl_cv_func_readlink_works="guessing no" ;;
23335 esac
23336
23337else
f199cab1 23338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 23339/* end confdefs.h. */
5476a9a4
GM
23340#include <unistd.h>
23341
f199cab1
GM
23342int
23343main ()
23344{
5476a9a4
GM
23345char buf[20];
23346 return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;
f199cab1
GM
23347 ;
23348 return 0;
23349}
067d23c9 23350_ACEOF
5476a9a4
GM
23351if ac_fn_c_try_run "$LINENO"; then :
23352 gl_cv_func_readlink_works=yes
23353else
23354 gl_cv_func_readlink_works=no
067d23c9 23355fi
5476a9a4
GM
23356rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23357 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1 23358fi
067d23c9 23359
5476a9a4 23360 rm -f conftest.link conftest.lnk2
f199cab1 23361fi
5476a9a4
GM
23362{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_works" >&5
23363$as_echo "$gl_cv_func_readlink_works" >&6; }
23364 case "$gl_cv_func_readlink_works" in
23365 *yes)
23366 if test "$gl_cv_decl_readlink_works" != yes; then
23367 REPLACE_READLINK=1
23368 fi
23369 ;;
23370 *)
067d23c9 23371
5476a9a4 23372$as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
067d23c9 23373
5476a9a4
GM
23374 REPLACE_READLINK=1
23375 ;;
23376 esac
23377 fi
3e0be4ab 23378
a6342fc8 23379 if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
3e0be4ab
GM
23380
23381
23382
23383
3e0be4ab
GM
23384
23385
5476a9a4
GM
23386
23387
23388 gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext"
23389
23390
23391 :
3e0be4ab 23392
a6342fc8 23393 fi
3e0be4ab 23394
067d23c9 23395
067d23c9 23396
067d23c9 23397
067d23c9 23398
5476a9a4 23399 GNULIB_READLINK=1
067d23c9 23400
067d23c9 23401
067d23c9 23402
067d23c9
KY
23403
23404
067d23c9 23405
d7ad186c
GM
23406
23407
23408
23409 if test $ac_cv_func_readlinkat = no; then
23410 HAVE_READLINKAT=0
23411 fi
23412
23413 if test $HAVE_READLINKAT = 0; then
23414
23415
23416
23417
23418
23419
23420
23421
23422 gl_LIBOBJS="$gl_LIBOBJS readlinkat.$ac_objext"
23423
23424 fi
23425
23426
23427
23428
23429
23430 GNULIB_READLINKAT=1
23431
23432
23433
23434
23435
23436
e4184a20
GM
23437 for ac_func in sig2str
23438do :
23439 ac_fn_c_check_func "$LINENO" "sig2str" "ac_cv_func_sig2str"
23440if test "x$ac_cv_func_sig2str" = x""yes; then :
23441 cat >>confdefs.h <<_ACEOF
23442#define HAVE_SIG2STR 1
23443_ACEOF
23444
23445fi
23446done
23447
23448
23449 if test $ac_cv_func_sig2str = no; then
23450
23451
23452
23453
23454
23455
23456
23457
23458 gl_LIBOBJS="$gl_LIBOBJS sig2str.$ac_objext"
23459
23460
23461 :
23462
23463 fi
23464
369e19fc 23465
067d23c9 23466
5476a9a4
GM
23467
23468
23469
23470
23471
23472
23473
23474
23475 if test $gl_cv_have_include_next = yes; then
23476 gl_cv_next_signal_h='<'signal.h'>'
23477 else
23478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
23479$as_echo_n "checking absolute name of <signal.h>... " >&6; }
23480if test "${gl_cv_next_signal_h+set}" = set; then :
0eb775a3 23481 $as_echo_n "(cached) " >&6
0eb775a3 23482else
5476a9a4
GM
23483
23484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0eb775a3 23485/* end confdefs.h. */
5476a9a4 23486#include <signal.h>
f199cab1 23487
0eb775a3 23488_ACEOF
5476a9a4
GM
23489 case "$host_os" in
23490 aix*) gl_absname_cpp="$ac_cpp -C" ;;
23491 *) gl_absname_cpp="$ac_cpp" ;;
23492 esac
0eb775a3 23493
5476a9a4
GM
23494 case "$host_os" in
23495 mingw*)
23496 gl_dirsep_regex='[/\\]'
23497 ;;
23498 *)
23499 gl_dirsep_regex='\/'
23500 ;;
23501 esac
23502 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
0eb775a3 23503
5476a9a4
GM
23504 gl_header_literal_regex=`echo 'signal.h' \
23505 | sed -e "$gl_make_literal_regex_sed"`
23506 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23507 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23508 s|^/[^/]|//&|
23509 p
23510 q
23511 }'
23512 gl_cv_next_signal_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23513 sed -n "$gl_absolute_header_sed"`'"'
0eb775a3 23514
f199cab1 23515
5476a9a4
GM
23516fi
23517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
23518$as_echo "$gl_cv_next_signal_h" >&6; }
23519 fi
23520 NEXT_SIGNAL_H=$gl_cv_next_signal_h
067d23c9 23521
5476a9a4
GM
23522 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23523 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23524 gl_next_as_first_directive='<'signal.h'>'
23525 else
23526 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23527 gl_next_as_first_directive=$gl_cv_next_signal_h
23528 fi
23529 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
067d23c9 23530
067d23c9
KY
23531
23532
067d23c9 23533
067d23c9 23534
5476a9a4
GM
23535# AIX declares sig_atomic_t to already include volatile, and C89 compilers
23536# then choke on 'volatile sig_atomic_t'. C99 requires that it compile.
23537 ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
23538#include <signal.h>
23539
23540"
23541if test "x$ac_cv_type_volatile_sig_atomic_t" = x""yes; then :
23542
23543else
23544 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
f199cab1 23545fi
067d23c9 23546
067d23c9 23547
067d23c9 23548
067d23c9 23549
938a4ef9 23550
938a4ef9 23551
5476a9a4
GM
23552
23553 ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
23554#include <signal.h>
23555
23556"
23557if test "x$ac_cv_type_sighandler_t" = x""yes; then :
23558
23559else
23560 HAVE_SIGHANDLER_T=0
23561fi
23562
23563
23564
23565
a6342fc8 23566 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
5476a9a4
GM
23567/* <sys/types.h> is not needed according to POSIX, but the
23568 <sys/socket.h> in i386-unknown-freebsd4.10 and
23569 powerpc-apple-darwin5.5 required it. */
23570#include <sys/types.h>
23571#if HAVE_SYS_SOCKET_H
23572# include <sys/socket.h>
23573#elif HAVE_WS2TCPIP_H
23574# include <ws2tcpip.h>
23575#endif
23576
23577"
23578if test "x$ac_cv_type_socklen_t" = x""yes; then :
23579
067d23c9 23580else
5476a9a4
GM
23581 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5
23582$as_echo_n "checking for socklen_t equivalent... " >&6; }
23583 if test "${gl_cv_socklen_t_equiv+set}" = set; then :
23584 $as_echo_n "(cached) " >&6
23585else
23586 # Systems have either "struct sockaddr *" or
23587 # "void *" as the second argument to getpeername
23588 gl_cv_socklen_t_equiv=
23589 for arg2 in "struct sockaddr" void; do
23590 for t in int size_t "unsigned int" "long int" "unsigned long int"; do
23591 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 23592/* end confdefs.h. */
5476a9a4
GM
23593#include <sys/types.h>
23594 #include <sys/socket.h>
23595
23596 int getpeername (int, $arg2 *, $t *);
f199cab1
GM
23597int
23598main ()
23599{
5476a9a4
GM
23600$t len;
23601 getpeername (0, 0, &len);
f199cab1
GM
23602 ;
23603 return 0;
23604}
3e0be4ab 23605_ACEOF
5476a9a4
GM
23606if ac_fn_c_try_compile "$LINENO"; then :
23607 gl_cv_socklen_t_equiv="$t"
067d23c9 23608fi
5476a9a4
GM
23609rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23610 test "$gl_cv_socklen_t_equiv" != "" && break
23611 done
23612 test "$gl_cv_socklen_t_equiv" != "" && break
23613 done
067d23c9 23614
5476a9a4 23615fi
067d23c9 23616
5476a9a4
GM
23617 if test "$gl_cv_socklen_t_equiv" = ""; then
23618 as_fn_error "Cannot find a type to use in place of socklen_t" "$LINENO" 5
23619 fi
23620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socklen_t_equiv" >&5
23621$as_echo "$gl_cv_socklen_t_equiv" >&6; }
23622
23623cat >>confdefs.h <<_ACEOF
23624#define socklen_t $gl_cv_socklen_t_equiv
23625_ACEOF
067d23c9 23626
f199cab1 23627fi
3e0be4ab 23628
3e0be4ab 23629
5476a9a4
GM
23630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
23631$as_echo_n "checking for ssize_t... " >&6; }
23632if test "${gt_cv_ssize_t+set}" = set; then :
f199cab1
GM
23633 $as_echo_n "(cached) " >&6
23634else
5476a9a4 23635 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 23636/* end confdefs.h. */
5476a9a4 23637#include <sys/types.h>
f199cab1
GM
23638int
23639main ()
23640{
5476a9a4
GM
23641int x = sizeof (ssize_t *) + sizeof (ssize_t);
23642 return !x;
f199cab1
GM
23643 ;
23644 return 0;
23645}
23646_ACEOF
5476a9a4
GM
23647if ac_fn_c_try_compile "$LINENO"; then :
23648 gt_cv_ssize_t=yes
067d23c9 23649else
5476a9a4 23650 gt_cv_ssize_t=no
f199cab1 23651fi
5476a9a4 23652rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
067d23c9 23653fi
5476a9a4
GM
23654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
23655$as_echo "$gt_cv_ssize_t" >&6; }
23656 if test $gt_cv_ssize_t = no; then
23657
23658$as_echo "#define ssize_t int" >>confdefs.h
23659
23660 fi
23661
23662
23663
23664
23665
5476a9a4
GM
23666 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>
23667 #include <sys/stat.h>
23668"
23669if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = x""yes; then :
23670
23671cat >>confdefs.h <<_ACEOF
23672#define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1
23673_ACEOF
23674
23675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5
23676$as_echo_n "checking whether struct stat.st_atim is of type struct timespec... " >&6; }
23677if test "${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+set}" = set; then :
f199cab1
GM
23678 $as_echo_n "(cached) " >&6
23679else
5476a9a4 23680 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 23681/* end confdefs.h. */
3e0be4ab 23682
5476a9a4
GM
23683 #include <sys/types.h>
23684 #include <sys/stat.h>
23685 #if HAVE_SYS_TIME_H
23686 # include <sys/time.h>
23687 #endif
23688 #include <time.h>
23689 struct timespec ts;
23690 struct stat st;
23691
f199cab1
GM
23692int
23693main ()
23694{
5476a9a4
GM
23695
23696 st.st_atim = ts;
23697
f199cab1
GM
23698 ;
23699 return 0;
23700}
3e0be4ab 23701_ACEOF
5476a9a4
GM
23702if ac_fn_c_try_compile "$LINENO"; then :
23703 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes
f199cab1 23704else
5476a9a4 23705 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no
f199cab1 23706fi
5476a9a4 23707rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
067d23c9 23708fi
5476a9a4
GM
23709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5
23710$as_echo "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; }
23711 if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
067d23c9 23712
5476a9a4 23713$as_echo "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h
067d23c9 23714
5476a9a4
GM
23715 fi
23716else
23717 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>
23718 #include <sys/stat.h>
23719"
23720if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = x""yes; then :
067d23c9 23721
5476a9a4
GM
23722cat >>confdefs.h <<_ACEOF
23723#define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1
23724_ACEOF
3e0be4ab 23725
0eb775a3 23726
3e0be4ab 23727else
5476a9a4
GM
23728 ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h>
23729 #include <sys/stat.h>
23730"
23731if test "x$ac_cv_member_struct_stat_st_atimensec" = x""yes; then :
23732
23733cat >>confdefs.h <<_ACEOF
23734#define HAVE_STRUCT_STAT_ST_ATIMENSEC 1
067d23c9 23735_ACEOF
5476a9a4
GM
23736
23737
067d23c9 23738else
5476a9a4
GM
23739 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>
23740 #include <sys/stat.h>
23741"
23742if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = x""yes; then :
23743
23744cat >>confdefs.h <<_ACEOF
23745#define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1
23746_ACEOF
23747
23748
3e0be4ab 23749fi
5476a9a4 23750
067d23c9 23751fi
5476a9a4 23752
067d23c9 23753fi
067d23c9
KY
23754
23755fi
23756
067d23c9 23757
067d23c9 23758
067d23c9 23759
067d23c9 23760
5476a9a4
GM
23761 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>
23762 #include <sys/stat.h>
23763"
23764if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = x""yes; then :
23765
23766cat >>confdefs.h <<_ACEOF
23767#define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1
23768_ACEOF
067d23c9
KY
23769
23770
f199cab1 23771else
5476a9a4
GM
23772 ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include <sys/types.h>
23773 #include <sys/stat.h>
23774"
23775if test "x$ac_cv_member_struct_stat_st_birthtimensec" = x""yes; then :
067d23c9 23776
5476a9a4
GM
23777cat >>confdefs.h <<_ACEOF
23778#define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1
23779_ACEOF
067d23c9 23780
3e0be4ab 23781
067d23c9 23782else
5476a9a4
GM
23783 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>
23784 #include <sys/stat.h>
23785"
23786if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = x""yes; then :
067d23c9 23787
5476a9a4
GM
23788cat >>confdefs.h <<_ACEOF
23789#define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1
067d23c9 23790_ACEOF
5476a9a4
GM
23791
23792
f199cab1 23793fi
5476a9a4 23794
f199cab1 23795fi
5476a9a4 23796
067d23c9 23797fi
0eb775a3 23798
0eb775a3 23799
0eb775a3 23800
5476a9a4
GM
23801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working stdalign.h" >&5
23802$as_echo_n "checking for working stdalign.h... " >&6; }
23803if test "${gl_cv_header_working_stdalign_h+set}" = set; then :
f199cab1 23804 $as_echo_n "(cached) " >&6
067d23c9 23805else
5476a9a4 23806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 23807/* end confdefs.h. */
5476a9a4
GM
23808#include <stdalign.h>
23809 #include <stddef.h>
23810
23811 /* Test that alignof yields a result consistent with offsetof.
23812 This catches GCC bug 52023
23813 <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. */
23814 #ifdef __cplusplus
23815 template <class t> struct alignof_helper { char a; t b; };
23816 # define ao(type) offsetof (alignof_helper<type>, b)
23817 #else
23818 # define ao(type) offsetof (struct { char a; type b; }, b)
23819 #endif
23820 char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1];
23821 char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1];
23822 char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1];
23823
23824 /* Test _Alignas only on platforms where gnulib can help. */
23825 #if \
23826 (__GNUC__ || __IBMC__ || __IBMCPP__ \
23827 || 0x5110 <= __SUNPRO_C || 1300 <= _MSC_VER)
23828 int alignas (8) alignas_int = 1;
23829 char test_alignas[_Alignof (alignas_int) == 8 ? 1 : -1];
23830 #endif
067d23c9 23831
f199cab1
GM
23832int
23833main ()
23834{
5476a9a4 23835
f199cab1
GM
23836 ;
23837 return 0;
23838}
23839_ACEOF
5476a9a4
GM
23840if ac_fn_c_try_compile "$LINENO"; then :
23841 gl_cv_header_working_stdalign_h=yes
f199cab1 23842else
5476a9a4 23843 gl_cv_header_working_stdalign_h=no
f199cab1 23844fi
5476a9a4 23845rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
067d23c9 23846fi
5476a9a4
GM
23847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdalign_h" >&5
23848$as_echo "$gl_cv_header_working_stdalign_h" >&6; }
067d23c9 23849
5476a9a4
GM
23850 if test $gl_cv_header_working_stdalign_h = yes; then
23851 STDALIGN_H=''
23852 else
23853 STDALIGN_H='stdalign.h'
f199cab1 23854 fi
0eb775a3 23855
5476a9a4
GM
23856
23857 if test -n "$STDALIGN_H"; then
23858 GL_GENERATE_STDALIGN_H_TRUE=
23859 GL_GENERATE_STDALIGN_H_FALSE='#'
f199cab1 23860else
5476a9a4
GM
23861 GL_GENERATE_STDALIGN_H_TRUE='#'
23862 GL_GENERATE_STDALIGN_H_FALSE=
0eb775a3 23863fi
0eb775a3
GM
23864
23865
23866
5476a9a4
GM
23867 STDARG_H=''
23868 NEXT_STDARG_H='<stdarg.h>'
23869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5
23870$as_echo_n "checking for va_copy... " >&6; }
23871 if test "${gl_cv_func_va_copy+set}" = set; then :
f199cab1 23872 $as_echo_n "(cached) " >&6
5476a9a4
GM
23873else
23874
23875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23876/* end confdefs.h. */
23877#include <stdarg.h>
f199cab1
GM
23878int
23879main ()
23880{
5476a9a4
GM
23881
23882#ifndef va_copy
23883void (*func) (va_list, va_list) = va_copy;
23884#endif
23885
f199cab1
GM
23886 ;
23887 return 0;
23888}
23889_ACEOF
5476a9a4
GM
23890if ac_fn_c_try_compile "$LINENO"; then :
23891 gl_cv_func_va_copy=yes
f199cab1 23892else
5476a9a4 23893 gl_cv_func_va_copy=no
f199cab1 23894fi
5476a9a4 23895rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 23896fi
5476a9a4
GM
23897
23898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_va_copy" >&5
23899$as_echo "$gl_cv_func_va_copy" >&6; }
23900 if test $gl_cv_func_va_copy = no; then
23901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23902/* end confdefs.h. */
23903#if defined _AIX && !defined __GNUC__
23904 AIX vaccine
23905 #endif
23906
23907_ACEOF
23908if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23909 $EGREP "vaccine" >/dev/null 2>&1; then :
23910 gl_aixcc=yes
f199cab1 23911else
5476a9a4 23912 gl_aixcc=no
f199cab1 23913fi
5476a9a4 23914rm -f conftest*
0eb775a3 23915
5476a9a4
GM
23916 if test $gl_aixcc = yes; then
23917 STDARG_H=stdarg.h
0eb775a3
GM
23918
23919
5476a9a4
GM
23920
23921
23922
23923
23924
23925
23926 if test $gl_cv_have_include_next = yes; then
23927 gl_cv_next_stdarg_h='<'stdarg.h'>'
23928 else
23929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdarg.h>" >&5
23930$as_echo_n "checking absolute name of <stdarg.h>... " >&6; }
23931if test "${gl_cv_next_stdarg_h+set}" = set; then :
f199cab1
GM
23932 $as_echo_n "(cached) " >&6
23933else
5476a9a4
GM
23934
23935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 23936/* end confdefs.h. */
5476a9a4 23937#include <stdarg.h>
0eb775a3 23938
f199cab1 23939_ACEOF
5476a9a4
GM
23940 case "$host_os" in
23941 aix*) gl_absname_cpp="$ac_cpp -C" ;;
23942 *) gl_absname_cpp="$ac_cpp" ;;
23943 esac
23944
23945 case "$host_os" in
23946 mingw*)
23947 gl_dirsep_regex='[/\\]'
23948 ;;
23949 *)
23950 gl_dirsep_regex='\/'
23951 ;;
23952 esac
23953 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23954
23955 gl_header_literal_regex=`echo 'stdarg.h' \
23956 | sed -e "$gl_make_literal_regex_sed"`
23957 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23958 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23959 s|^/[^/]|//&|
23960 p
23961 q
23962 }'
23963 gl_cv_next_stdarg_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23964 sed -n "$gl_absolute_header_sed"`'"'
23965
23966
f199cab1 23967fi
5476a9a4
GM
23968{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdarg_h" >&5
23969$as_echo "$gl_cv_next_stdarg_h" >&6; }
23970 fi
23971 NEXT_STDARG_H=$gl_cv_next_stdarg_h
23972
23973 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23974 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23975 gl_next_as_first_directive='<'stdarg.h'>'
23976 else
23977 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23978 gl_next_as_first_directive=$gl_cv_next_stdarg_h
23979 fi
23980 NEXT_AS_FIRST_DIRECTIVE_STDARG_H=$gl_next_as_first_directive
0eb775a3
GM
23981
23982
23983
5476a9a4
GM
23984
23985 if test "$gl_cv_next_stdarg_h" = '""'; then
23986 gl_cv_next_stdarg_h='"///usr/include/stdarg.h"'
23987 NEXT_STDARG_H="$gl_cv_next_stdarg_h"
23988 fi
f199cab1 23989 else
5476a9a4
GM
23990
23991 saved_as_echo_n="$as_echo_n"
23992 as_echo_n=':'
23993 if test "${gl_cv_func___va_copy+set}" = set; then :
f199cab1
GM
23994 $as_echo_n "(cached) " >&6
23995else
0eb775a3 23996
5476a9a4
GM
23997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23998/* end confdefs.h. */
23999#include <stdarg.h>
f199cab1
GM
24000int
24001main ()
24002{
5476a9a4
GM
24003
24004#ifndef __va_copy
24005error, bail out
24006#endif
24007
f199cab1
GM
24008 ;
24009 return 0;
24010}
24011_ACEOF
5476a9a4
GM
24012if ac_fn_c_try_compile "$LINENO"; then :
24013 gl_cv_func___va_copy=yes
f199cab1 24014else
5476a9a4 24015 gl_cv_func___va_copy=no
f199cab1 24016fi
5476a9a4 24017rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 24018fi
0eb775a3 24019
5476a9a4
GM
24020 as_echo_n="$saved_as_echo_n"
24021
24022 if test $gl_cv_func___va_copy = yes; then
24023
24024$as_echo "#define va_copy __va_copy" >>confdefs.h
24025
24026 else
0eb775a3 24027
5476a9a4
GM
24028
24029$as_echo "#define va_copy gl_va_copy" >>confdefs.h
0eb775a3 24030
f199cab1
GM
24031 fi
24032 fi
5476a9a4
GM
24033 fi
24034
24035 if test -n "$STDARG_H"; then
24036 GL_GENERATE_STDARG_H_TRUE=
24037 GL_GENERATE_STDARG_H_FALSE='#'
24038else
24039 GL_GENERATE_STDARG_H_TRUE='#'
24040 GL_GENERATE_STDARG_H_FALSE=
24041fi
24042
24043
24044
24045
24046
24047
24048 # Define two additional variables used in the Makefile substitution.
24049
24050 if test "$ac_cv_header_stdbool_h" = yes; then
24051 STDBOOL_H=''
24052 else
24053 STDBOOL_H='stdbool.h'
24054 fi
24055
24056 if test -n "$STDBOOL_H"; then
24057 GL_GENERATE_STDBOOL_H_TRUE=
24058 GL_GENERATE_STDBOOL_H_FALSE='#'
24059else
24060 GL_GENERATE_STDBOOL_H_TRUE='#'
24061 GL_GENERATE_STDBOOL_H_FALSE=
24062fi
24063
24064
24065 if test "$ac_cv_type__Bool" = yes; then
24066 HAVE__BOOL=1
24067 else
24068 HAVE__BOOL=0
24069 fi
24070
24071
24072
24073
24074
24075 STDDEF_H=
24076 if test $gt_cv_c_wchar_t = no; then
24077 HAVE_WCHAR_T=0
24078 STDDEF_H=stddef.h
24079 fi
24080 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
24081$as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
24082if test "${gl_cv_decl_null_works+set}" = set; then :
f199cab1
GM
24083 $as_echo_n "(cached) " >&6
24084else
5476a9a4 24085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 24086/* end confdefs.h. */
5476a9a4
GM
24087#include <stddef.h>
24088 int test[2 * (sizeof NULL == sizeof (void *)) -1];
3e0be4ab 24089
f199cab1
GM
24090int
24091main ()
24092{
5476a9a4 24093
f199cab1
GM
24094 ;
24095 return 0;
24096}
24097_ACEOF
5476a9a4
GM
24098if ac_fn_c_try_compile "$LINENO"; then :
24099 gl_cv_decl_null_works=yes
f199cab1 24100else
5476a9a4 24101 gl_cv_decl_null_works=no
f199cab1 24102fi
5476a9a4 24103rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 24104fi
5476a9a4
GM
24105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
24106$as_echo "$gl_cv_decl_null_works" >&6; }
24107 if test $gl_cv_decl_null_works = no; then
24108 REPLACE_NULL=1
24109 STDDEF_H=stddef.h
24110 fi
24111
24112 if test -n "$STDDEF_H"; then
24113 GL_GENERATE_STDDEF_H_TRUE=
24114 GL_GENERATE_STDDEF_H_FALSE='#'
f199cab1 24115else
5476a9a4
GM
24116 GL_GENERATE_STDDEF_H_TRUE='#'
24117 GL_GENERATE_STDDEF_H_FALSE=
f199cab1 24118fi
3e0be4ab 24119
5476a9a4 24120 if test -n "$STDDEF_H"; then
3e0be4ab
GM
24121
24122
5476a9a4
GM
24123
24124
24125
24126
24127
24128
24129 if test $gl_cv_have_include_next = yes; then
24130 gl_cv_next_stddef_h='<'stddef.h'>'
24131 else
24132 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
24133$as_echo_n "checking absolute name of <stddef.h>... " >&6; }
24134if test "${gl_cv_next_stddef_h+set}" = set; then :
067d23c9
KY
24135 $as_echo_n "(cached) " >&6
24136else
5476a9a4
GM
24137
24138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 24139/* end confdefs.h. */
5476a9a4 24140#include <stddef.h>
f199cab1 24141
067d23c9 24142_ACEOF
5476a9a4
GM
24143 case "$host_os" in
24144 aix*) gl_absname_cpp="$ac_cpp -C" ;;
24145 *) gl_absname_cpp="$ac_cpp" ;;
24146 esac
24147
24148 case "$host_os" in
24149 mingw*)
24150 gl_dirsep_regex='[/\\]'
24151 ;;
24152 *)
24153 gl_dirsep_regex='\/'
24154 ;;
24155 esac
24156 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
24157
24158 gl_header_literal_regex=`echo 'stddef.h' \
24159 | sed -e "$gl_make_literal_regex_sed"`
24160 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
24161 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
24162 s|^/[^/]|//&|
24163 p
24164 q
24165 }'
24166 gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24167 sed -n "$gl_absolute_header_sed"`'"'
24168
24169
f199cab1 24170fi
5476a9a4
GM
24171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
24172$as_echo "$gl_cv_next_stddef_h" >&6; }
24173 fi
24174 NEXT_STDDEF_H=$gl_cv_next_stddef_h
24175
24176 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24177 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
24178 gl_next_as_first_directive='<'stddef.h'>'
24179 else
24180 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
24181 gl_next_as_first_directive=$gl_cv_next_stddef_h
24182 fi
24183 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
24184
f199cab1 24185
f199cab1 24186
f199cab1 24187
067d23c9 24188 fi
067d23c9 24189
f199cab1 24190
067d23c9 24191
067d23c9 24192
067d23c9 24193
067d23c9
KY
24194
24195
067d23c9 24196
067d23c9
KY
24197
24198
067d23c9 24199
3e0be4ab 24200
5476a9a4
GM
24201 if test $gl_cv_have_include_next = yes; then
24202 gl_cv_next_stdio_h='<'stdio.h'>'
24203 else
24204 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
24205$as_echo_n "checking absolute name of <stdio.h>... " >&6; }
24206if test "${gl_cv_next_stdio_h+set}" = set; then :
24207 $as_echo_n "(cached) " >&6
f199cab1 24208else
5476a9a4
GM
24209
24210 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24211/* end confdefs.h. */
24212#include <stdio.h>
24213
f199cab1 24214_ACEOF
5476a9a4
GM
24215 case "$host_os" in
24216 aix*) gl_absname_cpp="$ac_cpp -C" ;;
24217 *) gl_absname_cpp="$ac_cpp" ;;
24218 esac
067d23c9 24219
5476a9a4
GM
24220 case "$host_os" in
24221 mingw*)
24222 gl_dirsep_regex='[/\\]'
24223 ;;
24224 *)
24225 gl_dirsep_regex='\/'
24226 ;;
24227 esac
24228 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
24229
24230 gl_header_literal_regex=`echo 'stdio.h' \
24231 | sed -e "$gl_make_literal_regex_sed"`
24232 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
24233 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
24234 s|^/[^/]|//&|
24235 p
24236 q
24237 }'
24238 gl_cv_next_stdio_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24239 sed -n "$gl_absolute_header_sed"`'"'
067d23c9 24240
067d23c9 24241
f199cab1 24242fi
5476a9a4
GM
24243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
24244$as_echo "$gl_cv_next_stdio_h" >&6; }
24245 fi
24246 NEXT_STDIO_H=$gl_cv_next_stdio_h
067d23c9 24247
5476a9a4
GM
24248 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24249 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
24250 gl_next_as_first_directive='<'stdio.h'>'
24251 else
24252 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
24253 gl_next_as_first_directive=$gl_cv_next_stdio_h
24254 fi
24255 NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
24256
24257
24258
24259
24260
24261 GNULIB_FSCANF=1
24262
24263
24264cat >>confdefs.h <<_ACEOF
24265#define GNULIB_FSCANF 1
24266_ACEOF
067d23c9 24267
067d23c9 24268
5476a9a4 24269 GNULIB_SCANF=1
f199cab1 24270
f199cab1 24271
5476a9a4
GM
24272cat >>confdefs.h <<_ACEOF
24273#define GNULIB_SCANF 1
f199cab1
GM
24274_ACEOF
24275
067d23c9 24276
5476a9a4
GM
24277 GNULIB_FGETC=1
24278 GNULIB_GETC=1
24279 GNULIB_GETCHAR=1
24280 GNULIB_FGETS=1
24281 GNULIB_FREAD=1
067d23c9 24282
067d23c9 24283
5476a9a4
GM
24284 GNULIB_FPRINTF=1
24285 GNULIB_PRINTF=1
24286 GNULIB_VFPRINTF=1
24287 GNULIB_VPRINTF=1
24288 GNULIB_FPUTC=1
24289 GNULIB_PUTC=1
24290 GNULIB_PUTCHAR=1
24291 GNULIB_FPUTS=1
24292 GNULIB_PUTS=1
24293 GNULIB_FWRITE=1
067d23c9 24294
067d23c9 24295
067d23c9 24296
067d23c9 24297
067d23c9 24298
067d23c9 24299
067d23c9 24300
067d23c9 24301
3e0be4ab
GM
24302
24303
24304
24305
24306
24307
3e0be4ab 24308
5476a9a4
GM
24309 if test $gl_cv_have_include_next = yes; then
24310 gl_cv_next_stdlib_h='<'stdlib.h'>'
24311 else
24312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
24313$as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
24314if test "${gl_cv_next_stdlib_h+set}" = set; then :
067d23c9
KY
24315 $as_echo_n "(cached) " >&6
24316else
5476a9a4
GM
24317
24318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 24319/* end confdefs.h. */
5476a9a4
GM
24320#include <stdlib.h>
24321
f199cab1 24322_ACEOF
5476a9a4
GM
24323 case "$host_os" in
24324 aix*) gl_absname_cpp="$ac_cpp -C" ;;
24325 *) gl_absname_cpp="$ac_cpp" ;;
24326 esac
067d23c9 24327
5476a9a4
GM
24328 case "$host_os" in
24329 mingw*)
24330 gl_dirsep_regex='[/\\]'
24331 ;;
24332 *)
24333 gl_dirsep_regex='\/'
24334 ;;
24335 esac
24336 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
24337
24338 gl_header_literal_regex=`echo 'stdlib.h' \
24339 | sed -e "$gl_make_literal_regex_sed"`
24340 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
24341 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
24342 s|^/[^/]|//&|
24343 p
24344 q
24345 }'
24346 gl_cv_next_stdlib_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24347 sed -n "$gl_absolute_header_sed"`'"'
3e0be4ab 24348
067d23c9 24349
f199cab1 24350fi
5476a9a4
GM
24351{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
24352$as_echo "$gl_cv_next_stdlib_h" >&6; }
24353 fi
24354 NEXT_STDLIB_H=$gl_cv_next_stdlib_h
b0415a03 24355
5476a9a4
GM
24356 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24357 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
24358 gl_next_as_first_directive='<'stdlib.h'>'
24359 else
24360 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
24361 gl_next_as_first_directive=$gl_cv_next_stdlib_h
24362 fi
24363 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
b0415a03 24364
067d23c9 24365
067d23c9 24366
067d23c9 24367
067d23c9 24368
067d23c9 24369
067d23c9 24370
067d23c9 24371
067d23c9 24372
5476a9a4 24373 # This defines (or not) HAVE_TZNAME and HAVE_TM_ZONE.
067d23c9 24374
067d23c9 24375
067d23c9 24376
b0415a03
GM
24377
24378
ac1ca7e9 24379
0eb775a3 24380
5476a9a4 24381$as_echo "#define my_strftime nstrftime" >>confdefs.h
067d23c9 24382
067d23c9 24383
a0a61e58
GM
24384
24385
24386
3e0be4ab 24387
5476a9a4
GM
24388
24389
283c7aed
GM
24390
24391
24392
5476a9a4
GM
24393 if test "$ac_cv_have_decl_strtoimax" != yes; then
24394 HAVE_DECL_STRTOIMAX=0
24395 fi
24396
24397 if test $ac_cv_func_strtoimax = yes; then
24398 HAVE_STRTOIMAX=1
24399 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtoimax works" >&5
24400$as_echo_n "checking whether strtoimax works... " >&6; }
24401if test "${gl_cv_func_strtoimax+set}" = set; then :
f199cab1
GM
24402 $as_echo_n "(cached) " >&6
24403else
24404 if test "$cross_compiling" = yes; then :
5476a9a4
GM
24405 case "$host_os" in
24406 # Guess no on AIX 5.
24407 aix5*) gl_cv_func_strtoimax="guessing no" ;;
24408 # Guess yes otherwise.
24409 *) gl_cv_func_strtoimax="guessing yes" ;;
24410 esac
24411
f199cab1
GM
24412else
24413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24414/* end confdefs.h. */
3e0be4ab 24415
5476a9a4
GM
24416#include <errno.h>
24417#include <string.h>
24418#include <inttypes.h>
24419int main ()
24420{
24421 if (sizeof (intmax_t) > sizeof (int))
24422 {
24423 const char *s = "4294967295";
24424 char *p;
24425 intmax_t res;
24426 errno = 0;
24427 res = strtoimax (s, &p, 10);
24428 if (p != s + strlen (s))
24429 return 1;
24430 if (errno != 0)
24431 return 2;
24432 if (res != (intmax_t) 65535 * (intmax_t) 65537)
24433 return 3;
24434 }
24435 else
24436 {
24437 const char *s = "2147483647";
24438 char *p;
24439 intmax_t res;
24440 errno = 0;
24441 res = strtoimax (s, &p, 10);
24442 if (p != s + strlen (s))
24443 return 1;
24444 if (errno != 0)
24445 return 2;
24446 if (res != 2147483647)
24447 return 3;
24448 }
f199cab1
GM
24449 return 0;
24450}
5476a9a4 24451
f199cab1
GM
24452_ACEOF
24453if ac_fn_c_try_run "$LINENO"; then :
5476a9a4 24454 gl_cv_func_strtoimax=yes
f199cab1 24455else
5476a9a4 24456 gl_cv_func_strtoimax=no
f199cab1
GM
24457fi
24458rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24459 conftest.$ac_objext conftest.beam conftest.$ac_ext
067d23c9
KY
24460fi
24461
3e0be4ab 24462
f199cab1 24463fi
5476a9a4
GM
24464{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtoimax" >&5
24465$as_echo "$gl_cv_func_strtoimax" >&6; }
24466 case "$gl_cv_func_strtoimax" in
24467 *no) REPLACE_STRTOIMAX=1 ;;
24468 esac
24469 else
24470 HAVE_STRTOIMAX=0
24471 fi
067d23c9 24472
a6342fc8 24473 if test $HAVE_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; then
067d23c9 24474
067d23c9 24475
067d23c9 24476
067d23c9 24477
067d23c9 24478
3e0be4ab 24479
2b1928b8
GM
24480
24481
5476a9a4
GM
24482 gl_LIBOBJS="$gl_LIBOBJS strtoimax.$ac_objext"
24483
24484
24485 ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
24486if test "x$ac_cv_have_decl_strtoll" = x""yes; then :
24487 ac_have_decl=1
f199cab1 24488else
5476a9a4 24489 ac_have_decl=0
f199cab1 24490fi
2b1928b8 24491
5476a9a4
GM
24492cat >>confdefs.h <<_ACEOF
24493#define HAVE_DECL_STRTOLL $ac_have_decl
24494_ACEOF
24495
24496
067d23c9 24497
a6342fc8 24498 fi
067d23c9 24499
3e0be4ab
GM
24500
24501
24502
3e0be4ab 24503
5476a9a4 24504 GNULIB_STRTOIMAX=1
3e0be4ab
GM
24505
24506
24507
24508
3e0be4ab
GM
24509
24510
24511
f199cab1 24512
f199cab1 24513
5476a9a4
GM
24514 if test "$ac_cv_have_decl_strtoumax" != yes; then
24515 HAVE_DECL_STRTOUMAX=0
24516 fi
067d23c9 24517
a6342fc8 24518 if test $ac_cv_func_strtoumax = no; then
0eb775a3 24519
5476a9a4
GM
24520
24521
24522
24523
24524
24525
24526
24527 gl_LIBOBJS="$gl_LIBOBJS strtoumax.$ac_objext"
24528
24529
24530 ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
24531if test "x$ac_cv_have_decl_strtoull" = x""yes; then :
24532 ac_have_decl=1
067d23c9 24533else
5476a9a4 24534 ac_have_decl=0
067d23c9 24535fi
5476a9a4
GM
24536
24537cat >>confdefs.h <<_ACEOF
24538#define HAVE_DECL_STRTOULL $ac_have_decl
24539_ACEOF
24540
24541
24542
a6342fc8 24543 fi
067d23c9 24544
067d23c9 24545
067d23c9 24546
067d23c9 24547
067d23c9 24548
5476a9a4
GM
24549 GNULIB_STRTOUMAX=1
24550
24551
24552
24553
24554
24555
24556
24557 if test $ac_cv_func_symlink = no; then
24558 HAVE_SYMLINK=0
24559 else
24560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether symlink handles trailing slash correctly" >&5
24561$as_echo_n "checking whether symlink handles trailing slash correctly... " >&6; }
24562if test "${gl_cv_func_symlink_works+set}" = set; then :
f199cab1 24563 $as_echo_n "(cached) " >&6
5476a9a4
GM
24564else
24565 if test "$cross_compiling" = yes; then :
24566 case "$host_os" in
24567 # Guess yes on glibc systems.
24568 *-gnu*) gl_cv_func_symlink_works="guessing yes" ;;
24569 # If we don't know, assume the worst.
24570 *) gl_cv_func_symlink_works="guessing no" ;;
24571 esac
24572
f199cab1
GM
24573else
24574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24575/* end confdefs.h. */
5476a9a4
GM
24576#include <unistd.h>
24577
f199cab1
GM
24578int
24579main ()
24580{
5476a9a4
GM
24581int result = 0;
24582 if (!symlink ("a", "conftest.link/"))
24583 result |= 1;
24584 if (symlink ("conftest.f", "conftest.lnk2"))
24585 result |= 2;
24586 else if (!symlink ("a", "conftest.lnk2/"))
24587 result |= 4;
24588 return result;
067d23c9 24589
f199cab1
GM
24590 ;
24591 return 0;
24592}
24593_ACEOF
5476a9a4
GM
24594if ac_fn_c_try_run "$LINENO"; then :
24595 gl_cv_func_symlink_works=yes
f199cab1 24596else
5476a9a4 24597 gl_cv_func_symlink_works=no
f199cab1 24598fi
5476a9a4
GM
24599rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24600 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1 24601fi
067d23c9 24602
5476a9a4 24603 rm -f conftest.f conftest.link conftest.lnk2
f199cab1 24604fi
5476a9a4
GM
24605{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_symlink_works" >&5
24606$as_echo "$gl_cv_func_symlink_works" >&6; }
24607 case "$gl_cv_func_symlink_works" in
24608 *yes) ;;
24609 *)
24610 REPLACE_SYMLINK=1
24611 ;;
24612 esac
24613 fi
067d23c9 24614
a6342fc8 24615 if test $HAVE_SYMLINK = 0 || test $REPLACE_SYMLINK = 1; then
067d23c9 24616
7e723570 24617
7e723570
GM
24618
24619
dd0d840e 24620
dd0d840e
GM
24621
24622
24623
5476a9a4 24624 gl_LIBOBJS="$gl_LIBOBJS symlink.$ac_objext"
dd0d840e 24625
a6342fc8 24626 fi
dd0d840e
GM
24627
24628
d3127c14
GM
24629
24630
d3127c14 24631
5476a9a4 24632 GNULIB_SYMLINK=1
d3127c14 24633
d3127c14 24634
d3127c14
GM
24635
24636
067d23c9 24637
067d23c9 24638
d3127c14 24639
d3127c14 24640
5476a9a4
GM
24641 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/select.h> is self-contained" >&5
24642$as_echo_n "checking whether <sys/select.h> is self-contained... " >&6; }
24643if test "${gl_cv_header_sys_select_h_selfcontained+set}" = set; then :
24644 $as_echo_n "(cached) " >&6
24645else
d3127c14 24646
5476a9a4
GM
24647 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24648/* end confdefs.h. */
24649#include <sys/select.h>
24650int
24651main ()
24652{
24653struct timeval b;
24654 ;
24655 return 0;
24656}
24657_ACEOF
24658if ac_fn_c_try_compile "$LINENO"; then :
24659 gl_cv_header_sys_select_h_selfcontained=yes
24660else
24661 gl_cv_header_sys_select_h_selfcontained=no
24662fi
24663rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24664 if test $gl_cv_header_sys_select_h_selfcontained = yes; then
24665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24666/* end confdefs.h. */
24667#include <sys/select.h>
24668int
24669main ()
24670{
24671int memset; int bzero;
24672 ;
24673 return 0;
24674}
3e0be4ab 24675
5476a9a4
GM
24676_ACEOF
24677if ac_fn_c_try_compile "$LINENO"; then :
24678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24679/* end confdefs.h. */
24680#include <sys/select.h>
24681int
24682main ()
24683{
dd0d840e 24684
5476a9a4
GM
24685 #undef memset
24686 #define memset nonexistent_memset
24687 extern
24688 #ifdef __cplusplus
24689 "C"
24690 #endif
24691 void *memset (void *, int, unsigned long);
24692 #undef bzero
24693 #define bzero nonexistent_bzero
24694 extern
24695 #ifdef __cplusplus
24696 "C"
24697 #endif
24698 void bzero (void *, unsigned long);
24699 fd_set fds;
24700 FD_ZERO (&fds);
3e0be4ab 24701
5476a9a4
GM
24702 ;
24703 return 0;
24704}
067d23c9 24705
5476a9a4
GM
24706_ACEOF
24707if ac_fn_c_try_link "$LINENO"; then :
dd0d840e 24708
5476a9a4
GM
24709else
24710 gl_cv_header_sys_select_h_selfcontained=no
24711fi
24712rm -f core conftest.err conftest.$ac_objext \
24713 conftest$ac_exeext conftest.$ac_ext
dd0d840e 24714
5476a9a4
GM
24715fi
24716rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24717 fi
dd0d840e 24718
5476a9a4
GM
24719fi
24720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_select_h_selfcontained" >&5
24721$as_echo "$gl_cv_header_sys_select_h_selfcontained" >&6; }
dd0d840e 24722
dd0d840e
GM
24723
24724
dd0d840e
GM
24725
24726
dd0d840e
GM
24727
24728
24729
dd0d840e 24730
5476a9a4
GM
24731 if test $gl_cv_have_include_next = yes; then
24732 gl_cv_next_sys_select_h='<'sys/select.h'>'
24733 else
24734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/select.h>" >&5
24735$as_echo_n "checking absolute name of <sys/select.h>... " >&6; }
24736if test "${gl_cv_next_sys_select_h+set}" = set; then :
24737 $as_echo_n "(cached) " >&6
24738else
dd0d840e 24739
5476a9a4 24740 if test $ac_cv_header_sys_select_h = yes; then
dd0d840e 24741
dd0d840e 24742
5476a9a4
GM
24743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24744/* end confdefs.h. */
24745#include <sys/select.h>
dd0d840e 24746
5476a9a4
GM
24747_ACEOF
24748 case "$host_os" in
24749 aix*) gl_absname_cpp="$ac_cpp -C" ;;
24750 *) gl_absname_cpp="$ac_cpp" ;;
24751 esac
dd0d840e 24752
5476a9a4
GM
24753 case "$host_os" in
24754 mingw*)
24755 gl_dirsep_regex='[/\\]'
24756 ;;
24757 *)
24758 gl_dirsep_regex='\/'
24759 ;;
24760 esac
24761 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
dd0d840e 24762
5476a9a4
GM
24763 gl_header_literal_regex=`echo 'sys/select.h' \
24764 | sed -e "$gl_make_literal_regex_sed"`
24765 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
24766 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
24767 s|^/[^/]|//&|
24768 p
24769 q
24770 }'
24771 gl_cv_next_sys_select_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24772 sed -n "$gl_absolute_header_sed"`'"'
24773 else
24774 gl_cv_next_sys_select_h='<'sys/select.h'>'
24775 fi
067d23c9 24776
067d23c9 24777
5476a9a4
GM
24778fi
24779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_select_h" >&5
24780$as_echo "$gl_cv_next_sys_select_h" >&6; }
24781 fi
24782 NEXT_SYS_SELECT_H=$gl_cv_next_sys_select_h
24783
24784 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24785 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
24786 gl_next_as_first_directive='<'sys/select.h'>'
24787 else
24788 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
24789 gl_next_as_first_directive=$gl_cv_next_sys_select_h
24790 fi
24791 NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H=$gl_next_as_first_directive
24792
24793
24794
24795
24796 if test $ac_cv_header_sys_select_h = yes; then
24797 HAVE_SYS_SELECT_H=1
24798 else
24799 HAVE_SYS_SELECT_H=0
24800 fi
067d23c9
KY
24801
24802
7e723570 24803
7e723570 24804
7e723570 24805
5476a9a4
GM
24806 if test $ac_cv_header_sys_socket_h != yes; then
24807 for ac_header in winsock2.h
24808do :
24809 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
24810if test "x$ac_cv_header_winsock2_h" = x""yes; then :
24811 cat >>confdefs.h <<_ACEOF
24812#define HAVE_WINSOCK2_H 1
24813_ACEOF
7e723570 24814
5476a9a4 24815fi
7e723570 24816
5476a9a4 24817done
7e723570 24818
5476a9a4
GM
24819 fi
24820 if test "$ac_cv_header_winsock2_h" = yes; then
24821 HAVE_WINSOCK2_H=1
24822 UNISTD_H_HAVE_WINSOCK2_H=1
24823 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
24824 else
24825 HAVE_WINSOCK2_H=0
24826 fi
7e723570
GM
24827
24828
dd0d840e 24829
dd0d840e 24830
dd0d840e
GM
24831
24832
dd0d840e 24833
dd0d840e 24834
dd0d840e
GM
24835
24836
24837
24838
24839
24840
24841
24842
dd0d840e 24843
dd0d840e 24844
dd0d840e 24845
dd0d840e 24846
5476a9a4
GM
24847 if test $gl_cv_have_include_next = yes; then
24848 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
24849 else
24850 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
24851$as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
24852if test "${gl_cv_next_sys_stat_h+set}" = set; then :
24853 $as_echo_n "(cached) " >&6
24854else
dd0d840e 24855
5476a9a4 24856 if test $ac_cv_header_sys_stat_h = yes; then
dd0d840e 24857
dd0d840e 24858
5476a9a4
GM
24859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24860/* end confdefs.h. */
24861#include <sys/stat.h>
dd0d840e 24862
5476a9a4
GM
24863_ACEOF
24864 case "$host_os" in
24865 aix*) gl_absname_cpp="$ac_cpp -C" ;;
24866 *) gl_absname_cpp="$ac_cpp" ;;
24867 esac
dd0d840e 24868
5476a9a4
GM
24869 case "$host_os" in
24870 mingw*)
24871 gl_dirsep_regex='[/\\]'
24872 ;;
24873 *)
24874 gl_dirsep_regex='\/'
24875 ;;
24876 esac
24877 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
dd0d840e 24878
5476a9a4
GM
24879 gl_header_literal_regex=`echo 'sys/stat.h' \
24880 | sed -e "$gl_make_literal_regex_sed"`
24881 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
24882 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
24883 s|^/[^/]|//&|
24884 p
24885 q
24886 }'
24887 gl_cv_next_sys_stat_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24888 sed -n "$gl_absolute_header_sed"`'"'
24889 else
24890 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
24891 fi
dd0d840e 24892
dd0d840e 24893
5476a9a4
GM
24894fi
24895{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
24896$as_echo "$gl_cv_next_sys_stat_h" >&6; }
24897 fi
24898 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
dd0d840e 24899
5476a9a4
GM
24900 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24901 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
24902 gl_next_as_first_directive='<'sys/stat.h'>'
24903 else
24904 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
24905 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
24906 fi
24907 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
dd0d840e 24908
dd0d840e 24909
d3127c14 24910
d3127c14 24911
dd0d840e 24912
dd0d840e 24913
dd0d840e 24914
dd0d840e 24915
dd0d840e 24916
dd0d840e 24917
dd0d840e 24918
5476a9a4 24919 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
dd0d840e 24920
5476a9a4 24921$as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
dd0d840e 24922
5476a9a4 24923 fi
dd0d840e 24924
5476a9a4
GM
24925 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
24926 #include <sys/stat.h>
24927"
24928if test "x$ac_cv_type_nlink_t" = x""yes; then :
dd0d840e 24929
5476a9a4 24930else
dd0d840e 24931
5476a9a4 24932$as_echo "#define nlink_t int" >>confdefs.h
dd0d840e 24933
5476a9a4 24934fi
dd0d840e 24935
dd0d840e 24936
dd0d840e 24937
dd0d840e 24938
dd0d840e 24939
dd0d840e 24940
dd0d840e 24941
c9ca3f76 24942
dd0d840e 24943
dd0d840e 24944
dd0d840e 24945
c9ca3f76 24946
dd0d840e 24947
dd0d840e
GM
24948
24949
7e723570
GM
24950
24951
7e723570 24952
5476a9a4
GM
24953 ac_fn_c_check_decl "$LINENO" "localtime_r" "ac_cv_have_decl_localtime_r" "#include <time.h>
24954"
24955if test "x$ac_cv_have_decl_localtime_r" = x""yes; then :
24956 ac_have_decl=1
24957else
24958 ac_have_decl=0
24959fi
7e723570 24960
5476a9a4
GM
24961cat >>confdefs.h <<_ACEOF
24962#define HAVE_DECL_LOCALTIME_R $ac_have_decl
24963_ACEOF
7e723570 24964
5476a9a4
GM
24965 if test $ac_cv_have_decl_localtime_r = no; then
24966 HAVE_DECL_LOCALTIME_R=0
24967 fi
7e723570 24968
7e723570 24969
5476a9a4
GM
24970 if test $ac_cv_func_localtime_r = yes; then
24971 HAVE_LOCALTIME_R=1
24972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime_r is compatible with its POSIX signature" >&5
24973$as_echo_n "checking whether localtime_r is compatible with its POSIX signature... " >&6; }
24974if test "${gl_cv_time_r_posix+set}" = set; then :
24975 $as_echo_n "(cached) " >&6
24976else
24977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24978/* end confdefs.h. */
24979#include <time.h>
7e723570
GM
24980int
24981main ()
24982{
5476a9a4
GM
24983/* We don't need to append 'restrict's to the argument types,
24984 even though the POSIX signature has the 'restrict's,
24985 since C99 says they can't affect type compatibility. */
24986 struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r;
24987 if (ptr) return 0;
24988 /* Check the return type is a pointer.
24989 On HP-UX 10 it is 'int'. */
24990 *localtime_r (0, 0);
7e723570
GM
24991 ;
24992 return 0;
24993}
5476a9a4 24994
7e723570 24995_ACEOF
5476a9a4
GM
24996if ac_fn_c_try_compile "$LINENO"; then :
24997 gl_cv_time_r_posix=yes
7e723570 24998else
5476a9a4 24999 gl_cv_time_r_posix=no
7e723570 25000fi
5476a9a4 25001rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
02bd7257 25002
5476a9a4
GM
25003fi
25004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_r_posix" >&5
25005$as_echo "$gl_cv_time_r_posix" >&6; }
25006 if test $gl_cv_time_r_posix = yes; then
25007 REPLACE_LOCALTIME_R=0
25008 else
25009 REPLACE_LOCALTIME_R=1
25010 fi
25011 else
25012 HAVE_LOCALTIME_R=0
25013 fi
02bd7257 25014
a6342fc8 25015 if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then
02bd7257
GM
25016
25017
02bd7257 25018
02bd7257 25019
02bd7257 25020
02bd7257 25021
7e723570 25022
7e723570 25023
5476a9a4
GM
25024 gl_LIBOBJS="$gl_LIBOBJS time_r.$ac_objext"
25025
25026
25027 :
7e723570 25028
a6342fc8 25029 fi
7e723570 25030
7e723570 25031
7e723570 25032
7e723570 25033
7e723570 25034
5476a9a4 25035 GNULIB_TIME_R=1
7e723570 25036
7e723570 25037
7e723570 25038
7e723570 25039
7e723570 25040
f077f61d
GM
25041
25042
25043
25044
25045
25046 LIB_TIMER_TIME=
25047
25048 gl_saved_libs=$LIBS
25049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing timer_settime" >&5
25050$as_echo_n "checking for library containing timer_settime... " >&6; }
25051if test "${ac_cv_search_timer_settime+set}" = set; then :
25052 $as_echo_n "(cached) " >&6
25053else
25054 ac_func_search_save_LIBS=$LIBS
25055cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25056/* end confdefs.h. */
25057
25058/* Override any GCC internal prototype to avoid an error.
25059 Use char because int might match the return type of a GCC
25060 builtin and then its argument prototype would still apply. */
25061#ifdef __cplusplus
25062extern "C"
25063#endif
25064char timer_settime ();
25065int
25066main ()
25067{
25068return timer_settime ();
25069 ;
25070 return 0;
25071}
25072_ACEOF
25073for ac_lib in '' rt posix4; do
25074 if test -z "$ac_lib"; then
25075 ac_res="none required"
25076 else
25077 ac_res=-l$ac_lib
25078 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
25079 fi
25080 if ac_fn_c_try_link "$LINENO"; then :
25081 ac_cv_search_timer_settime=$ac_res
25082fi
25083rm -f core conftest.err conftest.$ac_objext \
25084 conftest$ac_exeext
25085 if test "${ac_cv_search_timer_settime+set}" = set; then :
25086 break
25087fi
25088done
25089if test "${ac_cv_search_timer_settime+set}" = set; then :
25090
25091else
25092 ac_cv_search_timer_settime=no
25093fi
25094rm conftest.$ac_ext
25095LIBS=$ac_func_search_save_LIBS
25096fi
25097{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_timer_settime" >&5
25098$as_echo "$ac_cv_search_timer_settime" >&6; }
25099ac_res=$ac_cv_search_timer_settime
25100if test "$ac_res" != no; then :
25101 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
25102 test "$ac_cv_search_timer_settime" = "none required" ||
25103 LIB_TIMER_TIME=$ac_cv_search_timer_settime
25104fi
25105
25106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25107/* end confdefs.h. */
25108
25109#include <features.h>
25110#ifdef __GNU_LIBRARY__
25111 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || (__GLIBC__ > 2)) \
25112 && !defined __UCLIBC__
25113 Thread emulation available
25114 #endif
25115#endif
25116
25117_ACEOF
25118if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25119 $EGREP "Thread" >/dev/null 2>&1; then :
25120 LIB_TIMER_TIME="$LIB_TIMER_TIME $LIBMULTITHREAD"
25121fi
25122rm -f conftest*
25123
25124 for ac_func in timer_settime
25125do :
25126 ac_fn_c_check_func "$LINENO" "timer_settime" "ac_cv_func_timer_settime"
25127if test "x$ac_cv_func_timer_settime" = x""yes; then :
25128 cat >>confdefs.h <<_ACEOF
25129#define HAVE_TIMER_SETTIME 1
25130_ACEOF
25131
25132fi
25133done
25134
25135 LIBS=$gl_saved_libs
25136
a6342fc8 25137 :
7e723570 25138
02bd7257 25139
02bd7257 25140
02bd7257 25141
02bd7257 25142
02bd7257 25143
02bd7257 25144
02bd7257 25145
dd0d840e
GM
25146
25147
25148
dd0d840e 25149
5476a9a4
GM
25150 if test $gl_cv_have_include_next = yes; then
25151 gl_cv_next_unistd_h='<'unistd.h'>'
25152 else
25153 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
25154$as_echo_n "checking absolute name of <unistd.h>... " >&6; }
25155if test "${gl_cv_next_unistd_h+set}" = set; then :
25156 $as_echo_n "(cached) " >&6
25157else
dd0d840e 25158
5476a9a4 25159 if test $ac_cv_header_unistd_h = yes; then
dd0d840e 25160
dd0d840e 25161
5476a9a4 25162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d3127c14 25163/* end confdefs.h. */
5476a9a4 25164#include <unistd.h>
d3127c14 25165
5476a9a4
GM
25166_ACEOF
25167 case "$host_os" in
25168 aix*) gl_absname_cpp="$ac_cpp -C" ;;
25169 *) gl_absname_cpp="$ac_cpp" ;;
25170 esac
d3127c14 25171
5476a9a4
GM
25172 case "$host_os" in
25173 mingw*)
25174 gl_dirsep_regex='[/\\]'
25175 ;;
25176 *)
25177 gl_dirsep_regex='\/'
25178 ;;
25179 esac
25180 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25181
25182 gl_header_literal_regex=`echo 'unistd.h' \
25183 | sed -e "$gl_make_literal_regex_sed"`
25184 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25185 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25186 s|^/[^/]|//&|
25187 p
25188 q
25189 }'
25190 gl_cv_next_unistd_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25191 sed -n "$gl_absolute_header_sed"`'"'
25192 else
25193 gl_cv_next_unistd_h='<'unistd.h'>'
25194 fi
d3127c14 25195
d3127c14 25196
c9ca3f76 25197fi
5476a9a4
GM
25198{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
25199$as_echo "$gl_cv_next_unistd_h" >&6; }
25200 fi
25201 NEXT_UNISTD_H=$gl_cv_next_unistd_h
c9ca3f76 25202
5476a9a4
GM
25203 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25204 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25205 gl_next_as_first_directive='<'unistd.h'>'
25206 else
25207 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25208 gl_next_as_first_directive=$gl_cv_next_unistd_h
25209 fi
25210 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
c9ca3f76 25211
c9ca3f76 25212
c9ca3f76 25213
c9ca3f76 25214
5476a9a4
GM
25215 if test $ac_cv_header_unistd_h = yes; then
25216 HAVE_UNISTD_H=1
25217 else
25218 HAVE_UNISTD_H=0
25219 fi
c9ca3f76 25220
d3127c14 25221
dd0d840e 25222
dd0d840e 25223
d3127c14 25224
d3127c14 25225
dd0d840e
GM
25226
25227
c9ca3f76
GM
25228
25229
25230
b5591ebb
GM
25231 if test $ac_cv_have_decl_unsetenv = no; then
25232 HAVE_DECL_UNSETENV=0
25233 fi
25234 for ac_func in unsetenv
25235do :
25236 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
25237if test "x$ac_cv_func_unsetenv" = x""yes; then :
25238 cat >>confdefs.h <<_ACEOF
25239#define HAVE_UNSETENV 1
25240_ACEOF
25241
25242fi
25243done
25244
25245 if test $ac_cv_func_unsetenv = no; then
25246 HAVE_UNSETENV=0
25247 else
25248 HAVE_UNSETENV=1
25249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5
25250$as_echo_n "checking for unsetenv() return type... " >&6; }
25251if test "${gt_cv_func_unsetenv_ret+set}" = set; then :
25252 $as_echo_n "(cached) " >&6
25253else
25254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25255/* end confdefs.h. */
25256
25257#undef _BSD
25258#define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */
25259#include <stdlib.h>
25260extern
25261#ifdef __cplusplus
25262"C"
25263#endif
25264int unsetenv (const char *name);
25265
25266int
25267main ()
25268{
25269
25270 ;
25271 return 0;
25272}
25273_ACEOF
25274if ac_fn_c_try_compile "$LINENO"; then :
25275 gt_cv_func_unsetenv_ret='int'
25276else
25277 gt_cv_func_unsetenv_ret='void'
25278fi
25279rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25280fi
25281{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5
25282$as_echo "$gt_cv_func_unsetenv_ret" >&6; }
25283 if test $gt_cv_func_unsetenv_ret = 'void'; then
25284
25285$as_echo "#define VOID_UNSETENV 1" >>confdefs.h
25286
25287 REPLACE_UNSETENV=1
25288 fi
25289
25290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5
25291$as_echo_n "checking whether unsetenv obeys POSIX... " >&6; }
25292if test "${gl_cv_func_unsetenv_works+set}" = set; then :
25293 $as_echo_n "(cached) " >&6
25294else
25295 if test "$cross_compiling" = yes; then :
25296 case "$host_os" in
25297 # Guess yes on glibc systems.
25298 *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
25299 # If we don't know, assume the worst.
25300 *) gl_cv_func_unsetenv_works="guessing no" ;;
25301 esac
25302
25303else
25304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25305/* end confdefs.h. */
25306
25307 #include <stdlib.h>
25308 #include <errno.h>
25309 extern char **environ;
25310
25311int
25312main ()
25313{
25314
25315 char entry1[] = "a=1";
25316 char entry2[] = "b=2";
25317 char *env[] = { entry1, entry2, NULL };
25318 if (putenv ((char *) "a=1")) return 1;
25319 if (putenv (entry2)) return 2;
25320 entry2[0] = 'a';
25321 unsetenv ("a");
25322 if (getenv ("a")) return 3;
25323 if (!unsetenv ("") || errno != EINVAL) return 4;
25324 entry2[0] = 'b';
25325 environ = env;
25326 if (!getenv ("a")) return 5;
25327 entry2[0] = 'a';
25328 unsetenv ("a");
25329 if (getenv ("a")) return 6;
25330
25331 ;
25332 return 0;
25333}
25334_ACEOF
25335if ac_fn_c_try_run "$LINENO"; then :
25336 gl_cv_func_unsetenv_works=yes
25337else
25338 gl_cv_func_unsetenv_works=no
25339fi
25340rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25341 conftest.$ac_objext conftest.beam conftest.$ac_ext
25342fi
25343
25344fi
25345{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5
25346$as_echo "$gl_cv_func_unsetenv_works" >&6; }
25347 case "$gl_cv_func_unsetenv_works" in
25348 *yes) ;;
25349 *)
25350 REPLACE_UNSETENV=1
25351 ;;
25352 esac
25353 fi
25354
25355 if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
25356
25357
25358
25359
25360
25361
25362
25363
25364 gl_LIBOBJS="$gl_LIBOBJS unsetenv.$ac_objext"
25365
25366
25367
25368
25369
25370 fi
25371
25372
25373
25374
25375
25376 GNULIB_UNSETENV=1
25377
25378
25379
25380
25381
25382
25383
25384
c9ca3f76
GM
25385
25386
c9ca3f76 25387
5476a9a4
GM
25388 if test $ac_cv_func_futimens = no && test $ac_cv_func_futimesat = yes; then
25389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether futimesat handles NULL file" >&5
25390$as_echo_n "checking whether futimesat handles NULL file... " >&6; }
25391if test "${gl_cv_func_futimesat_works+set}" = set; then :
25392 $as_echo_n "(cached) " >&6
25393else
25394 touch conftest.file
25395 if test "$cross_compiling" = yes; then :
25396 case "$host_os" in
25397 # Guess yes on glibc systems.
25398 *-gnu*) gl_cv_func_futimesat_works="guessing yes" ;;
25399 # If we don't know, assume the worst.
25400 *) gl_cv_func_futimesat_works="guessing no" ;;
25401 esac
c9ca3f76 25402
5476a9a4
GM
25403else
25404 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c9ca3f76
GM
25405/* end confdefs.h. */
25406
5476a9a4
GM
25407#include <stddef.h>
25408#include <sys/times.h>
25409#include <fcntl.h>
c9ca3f76
GM
25410
25411int
25412main ()
25413{
5476a9a4
GM
25414 int fd = open ("conftest.file", O_RDWR);
25415 if (fd < 0) return 1;
25416 if (futimesat (fd, NULL, NULL)) return 2;
c9ca3f76
GM
25417
25418 ;
25419 return 0;
25420}
25421_ACEOF
5476a9a4
GM
25422if ac_fn_c_try_run "$LINENO"; then :
25423 gl_cv_func_futimesat_works=yes
c9ca3f76 25424else
5476a9a4 25425 gl_cv_func_futimesat_works=no
c9ca3f76 25426fi
5476a9a4
GM
25427rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25428 conftest.$ac_objext conftest.beam conftest.$ac_ext
c9ca3f76
GM
25429fi
25430
5476a9a4
GM
25431 rm -f conftest.file
25432fi
25433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_futimesat_works" >&5
25434$as_echo "$gl_cv_func_futimesat_works" >&6; }
25435 case "$gl_cv_func_futimesat_works" in
25436 *yes) ;;
25437 *)
7e723570 25438
5476a9a4 25439$as_echo "#define FUTIMESAT_NULL_BUG 1" >>confdefs.h
067d23c9 25440
5476a9a4
GM
25441 ;;
25442 esac
25443 fi
dd0d840e 25444
d7ad186c 25445 gl_gnulib_enabled_260941c0e5dc67ec9e87d1fb321c300b=false
5476a9a4 25446 gl_gnulib_enabled_dosname=false
710f5812
GM
25447 gl_gnulib_enabled_euidaccess=false
25448 gl_gnulib_enabled_getgroups=false
5476a9a4 25449 gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=false
710f5812 25450 gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1=false
d7ad186c 25451 gl_gnulib_enabled_03e0aaad4cb89ca757653bd367a6ccb7=false
5476a9a4 25452 gl_gnulib_enabled_pathmax=false
710f5812 25453 gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c=false
5476a9a4
GM
25454 gl_gnulib_enabled_stat=false
25455 gl_gnulib_enabled_strtoll=false
25456 gl_gnulib_enabled_strtoull=false
25457 gl_gnulib_enabled_verify=false
710f5812 25458 gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec=false
d7ad186c
GM
25459 func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b ()
25460 {
25461 if ! $gl_gnulib_enabled_260941c0e5dc67ec9e87d1fb321c300b; then
25462
25463
25464
25465
25466
25467
25468
25469
25470 gl_LIBOBJS="$gl_LIBOBJS openat-proc.$ac_objext"
25471
25472 gl_gnulib_enabled_260941c0e5dc67ec9e87d1fb321c300b=true
25473 fi
25474 }
5476a9a4
GM
25475 func_gl_gnulib_m4code_dosname ()
25476 {
25477 if ! $gl_gnulib_enabled_dosname; then
25478 gl_gnulib_enabled_dosname=true
25479 fi
25480 }
710f5812 25481 func_gl_gnulib_m4code_euidaccess ()
5476a9a4 25482 {
710f5812 25483 if ! $gl_gnulib_enabled_euidaccess; then
dd0d840e 25484
d3127c14
GM
25485
25486
25487
25488
710f5812
GM
25489 for ac_func in euidaccess
25490do :
25491 ac_fn_c_check_func "$LINENO" "euidaccess" "ac_cv_func_euidaccess"
25492if test "x$ac_cv_func_euidaccess" = x""yes; then :
25493 cat >>confdefs.h <<_ACEOF
25494#define HAVE_EUIDACCESS 1
25495_ACEOF
d3127c14 25496
710f5812
GM
25497fi
25498done
d3127c14 25499
710f5812
GM
25500 if test $ac_cv_func_euidaccess = no; then
25501 HAVE_EUIDACCESS=0
25502 fi
d3127c14 25503
710f5812
GM
25504 if test $HAVE_EUIDACCESS = 0; then
25505
25506
25507
25508
25509
25510
25511
25512
25513 gl_LIBOBJS="$gl_LIBOBJS euidaccess.$ac_objext"
25514
25515
25516
25517 for ac_header in libgen.h
25518do :
25519 ac_fn_c_check_header_mongrel "$LINENO" "libgen.h" "ac_cv_header_libgen_h" "$ac_includes_default"
25520if test "x$ac_cv_header_libgen_h" = x""yes; then :
25521 cat >>confdefs.h <<_ACEOF
25522#define HAVE_LIBGEN_H 1
25523_ACEOF
25524
25525fi
25526
25527done
25528
25529
25530 ac_fn_c_check_func "$LINENO" "getgroups" "ac_cv_func_getgroups"
25531if test "x$ac_cv_func_getgroups" = x""yes; then :
25532
25533fi
25534
25535
25536 # If we don't yet have getgroups, see if it's in -lbsd.
25537 # This is reported to be necessary on an ITOS 3000WS running SEIUX 3.1.
25538 ac_save_LIBS=$LIBS
25539 if test $ac_cv_func_getgroups = no; then
25540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getgroups in -lbsd" >&5
25541$as_echo_n "checking for getgroups in -lbsd... " >&6; }
25542if test "${ac_cv_lib_bsd_getgroups+set}" = set; then :
5476a9a4
GM
25543 $as_echo_n "(cached) " >&6
25544else
710f5812
GM
25545 ac_check_lib_save_LIBS=$LIBS
25546LIBS="-lbsd $LIBS"
25547cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d3127c14 25548/* end confdefs.h. */
d3127c14 25549
710f5812
GM
25550/* Override any GCC internal prototype to avoid an error.
25551 Use char because int might match the return type of a GCC
25552 builtin and then its argument prototype would still apply. */
25553#ifdef __cplusplus
25554extern "C"
25555#endif
25556char getgroups ();
d3127c14
GM
25557int
25558main ()
25559{
710f5812 25560return getgroups ();
d3127c14
GM
25561 ;
25562 return 0;
25563}
25564_ACEOF
710f5812
GM
25565if ac_fn_c_try_link "$LINENO"; then :
25566 ac_cv_lib_bsd_getgroups=yes
d3127c14 25567else
710f5812 25568 ac_cv_lib_bsd_getgroups=no
5476a9a4 25569fi
710f5812
GM
25570rm -f core conftest.err conftest.$ac_objext \
25571 conftest$ac_exeext conftest.$ac_ext
25572LIBS=$ac_check_lib_save_LIBS
d3127c14 25573fi
710f5812
GM
25574{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_getgroups" >&5
25575$as_echo "$ac_cv_lib_bsd_getgroups" >&6; }
25576if test "x$ac_cv_lib_bsd_getgroups" = x""yes; then :
25577 GETGROUPS_LIB=-lbsd
5476a9a4 25578fi
710f5812
GM
25579
25580 fi
25581
25582 # Run the program to test the functionality of the system-supplied
25583 # getgroups function only if there is such a function.
25584 if test $ac_cv_func_getgroups = yes; then
25585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getgroups" >&5
25586$as_echo_n "checking for working getgroups... " >&6; }
25587if test "${ac_cv_func_getgroups_works+set}" = set; then :
5476a9a4
GM
25588 $as_echo_n "(cached) " >&6
25589else
710f5812
GM
25590 if test "$cross_compiling" = yes; then :
25591 case "$host_os" in # ((
5476a9a4 25592 # Guess yes on glibc systems.
710f5812 25593 *-gnu*) ac_cv_func_getgroups_works="guessing yes" ;;
5476a9a4 25594 # If we don't know, assume the worst.
710f5812 25595 *) ac_cv_func_getgroups_works="guessing no" ;;
5476a9a4 25596 esac
d3127c14 25597
5476a9a4
GM
25598else
25599 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d3127c14 25600/* end confdefs.h. */
710f5812 25601$ac_includes_default
d3127c14
GM
25602int
25603main ()
25604{
710f5812
GM
25605/* On Ultrix 4.3, getgroups (0, 0) always fails. */
25606 return getgroups (0, 0) == -1;
25607 ;
25608 return 0;
25609}
25610
25611_ACEOF
25612if ac_fn_c_try_run "$LINENO"; then :
25613 ac_cv_func_getgroups_works=yes
25614else
25615 ac_cv_func_getgroups_works=no
25616fi
25617rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25618 conftest.$ac_objext conftest.beam conftest.$ac_ext
25619fi
25620
25621
25622fi
25623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getgroups_works" >&5
25624$as_echo "$ac_cv_func_getgroups_works" >&6; }
25625 else
25626 ac_cv_func_getgroups_works=no
25627 fi
25628 case "$ac_cv_func_getgroups_works" in
25629 *yes)
25630
25631$as_echo "#define HAVE_GETGROUPS 1" >>confdefs.h
25632
25633 ;;
25634 esac
25635 LIBS=$ac_save_LIBS
25636
25637
25638 # Solaris 9 and 10 need -lgen to get the eaccess function.
25639 # Save and restore LIBS so -lgen isn't added to it. Otherwise, *all*
25640 # programs in the package would end up linked with that potentially-shared
25641 # library, inducing unnecessary run-time overhead.
25642 LIB_EACCESS=
25643
25644 gl_saved_libs=$LIBS
25645 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing eaccess" >&5
25646$as_echo_n "checking for library containing eaccess... " >&6; }
25647if test "${ac_cv_search_eaccess+set}" = set; then :
25648 $as_echo_n "(cached) " >&6
25649else
25650 ac_func_search_save_LIBS=$LIBS
25651cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25652/* end confdefs.h. */
25653
25654/* Override any GCC internal prototype to avoid an error.
25655 Use char because int might match the return type of a GCC
25656 builtin and then its argument prototype would still apply. */
25657#ifdef __cplusplus
25658extern "C"
25659#endif
25660char eaccess ();
25661int
25662main ()
25663{
25664return eaccess ();
25665 ;
25666 return 0;
25667}
25668_ACEOF
25669for ac_lib in '' gen; do
25670 if test -z "$ac_lib"; then
25671 ac_res="none required"
25672 else
25673 ac_res=-l$ac_lib
25674 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
25675 fi
25676 if ac_fn_c_try_link "$LINENO"; then :
25677 ac_cv_search_eaccess=$ac_res
25678fi
25679rm -f core conftest.err conftest.$ac_objext \
25680 conftest$ac_exeext
25681 if test "${ac_cv_search_eaccess+set}" = set; then :
25682 break
25683fi
25684done
25685if test "${ac_cv_search_eaccess+set}" = set; then :
25686
25687else
25688 ac_cv_search_eaccess=no
25689fi
25690rm conftest.$ac_ext
25691LIBS=$ac_func_search_save_LIBS
25692fi
25693{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_eaccess" >&5
25694$as_echo "$ac_cv_search_eaccess" >&6; }
25695ac_res=$ac_cv_search_eaccess
25696if test "$ac_res" != no; then :
25697 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
25698 test "$ac_cv_search_eaccess" = "none required" ||
25699 LIB_EACCESS=$ac_cv_search_eaccess
25700fi
25701
25702 for ac_func in eaccess
25703do :
25704 ac_fn_c_check_func "$LINENO" "eaccess" "ac_cv_func_eaccess"
25705if test "x$ac_cv_func_eaccess" = x""yes; then :
25706 cat >>confdefs.h <<_ACEOF
25707#define HAVE_EACCESS 1
25708_ACEOF
25709
25710fi
25711done
25712
25713 LIBS=$gl_saved_libs
25714
25715 fi
25716
25717
25718
25719
25720
25721 GNULIB_EUIDACCESS=1
25722
25723
25724
25725
25726
25727 gl_gnulib_enabled_euidaccess=true
25728 if test $HAVE_EUIDACCESS = 0; then
25729 func_gl_gnulib_m4code_a9786850e999ae65a836a6041e8e5ed1
25730 fi
25731 func_gl_gnulib_m4code_6099e9737f757db36c47fa9d9f02e88c
25732 if test $HAVE_EUIDACCESS = 0; then
25733 func_gl_gnulib_m4code_stat
25734 fi
25735 fi
25736 }
25737 func_gl_gnulib_m4code_getgroups ()
25738 {
25739 if ! $gl_gnulib_enabled_getgroups; then
25740
25741
25742
25743
25744
25745 ac_fn_c_check_func "$LINENO" "getgroups" "ac_cv_func_getgroups"
25746if test "x$ac_cv_func_getgroups" = x""yes; then :
25747
25748fi
25749
25750
25751 # If we don't yet have getgroups, see if it's in -lbsd.
25752 # This is reported to be necessary on an ITOS 3000WS running SEIUX 3.1.
25753 ac_save_LIBS=$LIBS
25754 if test $ac_cv_func_getgroups = no; then
25755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getgroups in -lbsd" >&5
25756$as_echo_n "checking for getgroups in -lbsd... " >&6; }
25757if test "${ac_cv_lib_bsd_getgroups+set}" = set; then :
25758 $as_echo_n "(cached) " >&6
25759else
25760 ac_check_lib_save_LIBS=$LIBS
25761LIBS="-lbsd $LIBS"
25762cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25763/* end confdefs.h. */
25764
25765/* Override any GCC internal prototype to avoid an error.
25766 Use char because int might match the return type of a GCC
25767 builtin and then its argument prototype would still apply. */
25768#ifdef __cplusplus
25769extern "C"
25770#endif
25771char getgroups ();
25772int
25773main ()
25774{
25775return getgroups ();
25776 ;
25777 return 0;
25778}
25779_ACEOF
25780if ac_fn_c_try_link "$LINENO"; then :
25781 ac_cv_lib_bsd_getgroups=yes
25782else
25783 ac_cv_lib_bsd_getgroups=no
25784fi
25785rm -f core conftest.err conftest.$ac_objext \
25786 conftest$ac_exeext conftest.$ac_ext
25787LIBS=$ac_check_lib_save_LIBS
25788fi
25789{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_getgroups" >&5
25790$as_echo "$ac_cv_lib_bsd_getgroups" >&6; }
25791if test "x$ac_cv_lib_bsd_getgroups" = x""yes; then :
25792 GETGROUPS_LIB=-lbsd
25793fi
25794
25795 fi
25796
25797 # Run the program to test the functionality of the system-supplied
25798 # getgroups function only if there is such a function.
25799 if test $ac_cv_func_getgroups = yes; then
25800 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getgroups" >&5
25801$as_echo_n "checking for working getgroups... " >&6; }
25802if test "${ac_cv_func_getgroups_works+set}" = set; then :
25803 $as_echo_n "(cached) " >&6
25804else
25805 if test "$cross_compiling" = yes; then :
25806 case "$host_os" in # ((
25807 # Guess yes on glibc systems.
25808 *-gnu*) ac_cv_func_getgroups_works="guessing yes" ;;
25809 # If we don't know, assume the worst.
25810 *) ac_cv_func_getgroups_works="guessing no" ;;
25811 esac
25812
25813else
25814 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25815/* end confdefs.h. */
25816$ac_includes_default
25817int
25818main ()
25819{
25820/* On Ultrix 4.3, getgroups (0, 0) always fails. */
25821 return getgroups (0, 0) == -1;
25822 ;
25823 return 0;
25824}
25825
25826_ACEOF
25827if ac_fn_c_try_run "$LINENO"; then :
25828 ac_cv_func_getgroups_works=yes
25829else
25830 ac_cv_func_getgroups_works=no
25831fi
25832rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25833 conftest.$ac_objext conftest.beam conftest.$ac_ext
25834fi
25835
25836
25837fi
25838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getgroups_works" >&5
25839$as_echo "$ac_cv_func_getgroups_works" >&6; }
25840 else
25841 ac_cv_func_getgroups_works=no
25842 fi
25843 case "$ac_cv_func_getgroups_works" in
25844 *yes)
25845
25846$as_echo "#define HAVE_GETGROUPS 1" >>confdefs.h
25847
25848 ;;
25849 esac
25850 LIBS=$ac_save_LIBS
25851
25852 if test $ac_cv_func_getgroups != yes; then
25853 HAVE_GETGROUPS=0
25854 else
25855 if test "$ac_cv_type_getgroups" != gid_t \
25856 || { case "$ac_cv_func_getgroups_works" in
25857 *yes) false;;
25858 *) true;;
25859 esac
25860 }; then
25861 REPLACE_GETGROUPS=1
25862
25863$as_echo "#define GETGROUPS_ZERO_BUG 1" >>confdefs.h
25864
25865 else
25866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getgroups handles negative values" >&5
25867$as_echo_n "checking whether getgroups handles negative values... " >&6; }
25868if test "${gl_cv_func_getgroups_works+set}" = set; then :
25869 $as_echo_n "(cached) " >&6
25870else
25871 if test "$cross_compiling" = yes; then :
25872 case "$host_os" in
25873 # Guess yes on glibc systems.
25874 *-gnu*) gl_cv_func_getgroups_works="guessing yes" ;;
25875 # If we don't know, assume the worst.
25876 *) gl_cv_func_getgroups_works="guessing no" ;;
25877 esac
25878
25879else
25880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25881/* end confdefs.h. */
25882$ac_includes_default
25883int
25884main ()
25885{
25886int size = getgroups (0, 0);
25887 gid_t *list = malloc (size * sizeof *list);
25888 return getgroups (-1, list) != -1;
25889 ;
25890 return 0;
25891}
25892_ACEOF
25893if ac_fn_c_try_run "$LINENO"; then :
25894 gl_cv_func_getgroups_works=yes
25895else
25896 gl_cv_func_getgroups_works=no
25897fi
25898rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25899 conftest.$ac_objext conftest.beam conftest.$ac_ext
25900fi
25901
25902fi
25903{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getgroups_works" >&5
25904$as_echo "$gl_cv_func_getgroups_works" >&6; }
25905 case "$gl_cv_func_getgroups_works" in
25906 *yes) ;;
25907 *) REPLACE_GETGROUPS=1 ;;
25908 esac
25909 fi
25910 fi
25911 test -n "$GETGROUPS_LIB" && LIBS="$GETGROUPS_LIB $LIBS"
25912
25913 if test $HAVE_GETGROUPS = 0 || test $REPLACE_GETGROUPS = 1; then
25914
25915
25916
25917
25918
25919
25920
25921
25922 gl_LIBOBJS="$gl_LIBOBJS getgroups.$ac_objext"
25923
25924 fi
25925
25926
25927
25928
25929
25930 GNULIB_GETGROUPS=1
25931
25932
25933
25934
25935
25936 gl_gnulib_enabled_getgroups=true
25937 fi
25938 }
25939 func_gl_gnulib_m4code_be453cec5eecf5731a274f2de7f2db36 ()
25940 {
25941 if ! $gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36; then
25942
25943
25944 gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=true
25945 fi
25946 }
25947 func_gl_gnulib_m4code_a9786850e999ae65a836a6041e8e5ed1 ()
25948 {
25949 if ! $gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1; then
25950
25951
25952
25953
25954
25955 ac_fn_c_check_func "$LINENO" "group_member" "ac_cv_func_group_member"
25956if test "x$ac_cv_func_group_member" = x""yes; then :
25957
25958else
25959
25960 HAVE_GROUP_MEMBER=0
25961
25962fi
25963
25964
25965 if test $HAVE_GROUP_MEMBER = 0; then
25966
25967
25968
25969
25970
25971
25972
25973
25974 gl_LIBOBJS="$gl_LIBOBJS group-member.$ac_objext"
25975
25976
25977
25978
25979 fi
25980
25981
25982
25983
25984
25985 GNULIB_GROUP_MEMBER=1
25986
25987
25988
25989
25990
25991 gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1=true
25992 if test $HAVE_GROUP_MEMBER = 0; then
25993 func_gl_gnulib_m4code_getgroups
25994 fi
25995 if test $HAVE_GROUP_MEMBER = 0; then
25996 func_gl_gnulib_m4code_682e609604ccaac6be382e4ee3a4eaec
25997 fi
25998 fi
25999 }
d7ad186c
GM
26000 func_gl_gnulib_m4code_03e0aaad4cb89ca757653bd367a6ccb7 ()
26001 {
26002 if ! $gl_gnulib_enabled_03e0aaad4cb89ca757653bd367a6ccb7; then
26003 gl_gnulib_enabled_03e0aaad4cb89ca757653bd367a6ccb7=true
26004 fi
26005 }
710f5812
GM
26006 func_gl_gnulib_m4code_pathmax ()
26007 {
26008 if ! $gl_gnulib_enabled_pathmax; then
26009
26010
26011
26012 gl_gnulib_enabled_pathmax=true
26013 fi
26014 }
26015 func_gl_gnulib_m4code_6099e9737f757db36c47fa9d9f02e88c ()
26016 {
26017 if ! $gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c; then
26018 gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c=true
26019 fi
26020 }
26021 func_gl_gnulib_m4code_stat ()
26022 {
26023 if ! $gl_gnulib_enabled_stat; then
26024
26025
26026
26027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5
26028$as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; }
26029if test "${gl_cv_func_stat_dir_slash+set}" = set; then :
26030 $as_echo_n "(cached) " >&6
26031else
26032 if test "$cross_compiling" = yes; then :
26033 case $host_os in
26034 mingw*) gl_cv_func_stat_dir_slash="guessing no";;
26035 *) gl_cv_func_stat_dir_slash="guessing yes";;
26036 esac
26037else
26038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26039/* end confdefs.h. */
26040#include <sys/stat.h>
26041
26042int
26043main ()
26044{
26045struct stat st; return stat (".", &st) != stat ("./", &st);
26046 ;
26047 return 0;
26048}
26049_ACEOF
26050if ac_fn_c_try_run "$LINENO"; then :
26051 gl_cv_func_stat_dir_slash=yes
26052else
26053 gl_cv_func_stat_dir_slash=no
26054fi
26055rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26056 conftest.$ac_objext conftest.beam conftest.$ac_ext
26057fi
26058
26059fi
26060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5
26061$as_echo "$gl_cv_func_stat_dir_slash" >&6; }
26062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
26063$as_echo_n "checking whether stat handles trailing slashes on files... " >&6; }
26064if test "${gl_cv_func_stat_file_slash+set}" = set; then :
26065 $as_echo_n "(cached) " >&6
26066else
26067 touch conftest.tmp
26068 # Assume that if we have lstat, we can also check symlinks.
26069 if test $ac_cv_func_lstat = yes; then
26070 ln -s conftest.tmp conftest.lnk
26071 fi
26072 if test "$cross_compiling" = yes; then :
26073 case "$host_os" in
26074 # Guess yes on glibc systems.
26075 *-gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
26076 # If we don't know, assume the worst.
26077 *) gl_cv_func_stat_file_slash="guessing no" ;;
26078 esac
26079
26080else
26081 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26082/* end confdefs.h. */
26083#include <sys/stat.h>
26084
26085int
26086main ()
26087{
26088int result = 0;
26089 struct stat st;
26090 if (!stat ("conftest.tmp/", &st))
26091 result |= 1;
26092#if HAVE_LSTAT
26093 if (!stat ("conftest.lnk/", &st))
5476a9a4
GM
26094 result |= 2;
26095#endif
26096 return result;
d3127c14
GM
26097
26098 ;
26099 return 0;
26100}
26101_ACEOF
5476a9a4
GM
26102if ac_fn_c_try_run "$LINENO"; then :
26103 gl_cv_func_stat_file_slash=yes
d3127c14 26104else
5476a9a4
GM
26105 gl_cv_func_stat_file_slash=no
26106fi
26107rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26108 conftest.$ac_objext conftest.beam conftest.$ac_ext
d3127c14 26109fi
d3127c14 26110
5476a9a4
GM
26111 rm -f conftest.tmp conftest.lnk
26112fi
26113{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
26114$as_echo "$gl_cv_func_stat_file_slash" >&6; }
26115 case $gl_cv_func_stat_dir_slash in
26116 *no) REPLACE_STAT=1
d3127c14 26117
5476a9a4
GM
26118$as_echo "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h
26119;;
26120 esac
26121 case $gl_cv_func_stat_file_slash in
26122 *no) REPLACE_STAT=1
d3127c14 26123
5476a9a4
GM
26124$as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
26125;;
26126 esac
d3127c14 26127
a6342fc8 26128 if test $REPLACE_STAT = 1; then
d3127c14 26129
dd0d840e 26130
dd0d840e 26131
dd0d840e 26132
dd0d840e 26133
dd0d840e 26134
067d23c9
KY
26135
26136
5476a9a4 26137 gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
067d23c9 26138
45d4966b 26139 :
a6342fc8 26140 fi
067d23c9 26141
dd0d840e
GM
26142
26143
dd0d840e 26144
dd0d840e 26145
5476a9a4 26146 GNULIB_STAT=1
dd0d840e 26147
067d23c9
KY
26148
26149
26150
26151
5476a9a4
GM
26152 gl_gnulib_enabled_stat=true
26153 if test $REPLACE_STAT = 1; then
26154 func_gl_gnulib_m4code_dosname
26155 fi
26156 if test $REPLACE_STAT = 1; then
26157 func_gl_gnulib_m4code_pathmax
26158 fi
26159 if test $REPLACE_STAT = 1; then
26160 func_gl_gnulib_m4code_verify
26161 fi
26162 fi
26163 }
26164 func_gl_gnulib_m4code_strtoll ()
26165 {
26166 if ! $gl_gnulib_enabled_strtoll; then
067d23c9
KY
26167
26168
26169
5476a9a4
GM
26170 if test "$ac_cv_type_long_long_int" = yes; then
26171 for ac_func in strtoll
26172do :
26173 ac_fn_c_check_func "$LINENO" "strtoll" "ac_cv_func_strtoll"
26174if test "x$ac_cv_func_strtoll" = x""yes; then :
26175 cat >>confdefs.h <<_ACEOF
26176#define HAVE_STRTOLL 1
26177_ACEOF
067d23c9 26178
5476a9a4
GM
26179fi
26180done
067d23c9 26181
5476a9a4
GM
26182 if test $ac_cv_func_strtoll = no; then
26183 HAVE_STRTOLL=0
26184 fi
26185 fi
067d23c9 26186
a6342fc8 26187 if test $HAVE_STRTOLL = 0; then
067d23c9
KY
26188
26189
26190
067d23c9
KY
26191
26192
26193
26194
26195
5476a9a4 26196 gl_LIBOBJS="$gl_LIBOBJS strtoll.$ac_objext"
067d23c9
KY
26197
26198
5476a9a4 26199 :
067d23c9 26200
a6342fc8 26201 fi
067d23c9
KY
26202
26203
26204
067d23c9 26205
067d23c9 26206
5476a9a4 26207 GNULIB_STRTOLL=1
067d23c9 26208
397f7161 26209
067d23c9
KY
26210
26211
067d23c9 26212
5476a9a4
GM
26213 gl_gnulib_enabled_strtoll=true
26214 fi
26215 }
26216 func_gl_gnulib_m4code_strtoull ()
26217 {
26218 if ! $gl_gnulib_enabled_strtoull; then
067d23c9 26219
067d23c9 26220
067d23c9 26221
5476a9a4
GM
26222 if test "$ac_cv_type_unsigned_long_long_int" = yes; then
26223 for ac_func in strtoull
26224do :
26225 ac_fn_c_check_func "$LINENO" "strtoull" "ac_cv_func_strtoull"
26226if test "x$ac_cv_func_strtoull" = x""yes; then :
26227 cat >>confdefs.h <<_ACEOF
26228#define HAVE_STRTOULL 1
26229_ACEOF
067d23c9 26230
f199cab1 26231fi
5476a9a4 26232done
067d23c9 26233
5476a9a4
GM
26234 if test $ac_cv_func_strtoull = no; then
26235 HAVE_STRTOULL=0
26236 fi
26237 fi
067d23c9 26238
a6342fc8 26239 if test $HAVE_STRTOULL = 0; then
067d23c9
KY
26240
26241
067d23c9 26242
067d23c9 26243
067d23c9 26244
067d23c9 26245
067d23c9 26246
067d23c9 26247
5476a9a4 26248 gl_LIBOBJS="$gl_LIBOBJS strtoull.$ac_objext"
067d23c9 26249
067d23c9 26250
5476a9a4 26251 :
067d23c9 26252
a6342fc8 26253 fi
067d23c9
KY
26254
26255
3e0be4ab 26256
3e0be4ab 26257
067d23c9 26258
5476a9a4 26259 GNULIB_STRTOULL=1
067d23c9 26260
a0a61e58 26261
067d23c9 26262
067d23c9
KY
26263
26264
5476a9a4
GM
26265 gl_gnulib_enabled_strtoull=true
26266 fi
26267 }
26268 func_gl_gnulib_m4code_verify ()
26269 {
26270 if ! $gl_gnulib_enabled_verify; then
26271 gl_gnulib_enabled_verify=true
26272 fi
26273 }
710f5812
GM
26274 func_gl_gnulib_m4code_682e609604ccaac6be382e4ee3a4eaec ()
26275 {
26276 if ! $gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec; then
26277 gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec=true
26278 fi
26279 }
d7ad186c
GM
26280 if test $HAVE_FACCESSAT = 0; then
26281 func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b
26282 fi
710f5812
GM
26283 if test $HAVE_FACCESSAT = 0; then
26284 func_gl_gnulib_m4code_dosname
26285 fi
26286 if test $HAVE_FACCESSAT = 0; then
26287 func_gl_gnulib_m4code_euidaccess
26288 fi
d7ad186c
GM
26289 if test $HAVE_FACCESSAT = 0; then
26290 func_gl_gnulib_m4code_03e0aaad4cb89ca757653bd367a6ccb7
26291 fi
26292 if test $HAVE_FDOPENDIR = 0; then
26293 func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b
26294 fi
26295 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
26296 func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b
26297 fi
26298 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
26299 func_gl_gnulib_m4code_dosname
26300 fi
26301 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
26302 func_gl_gnulib_m4code_03e0aaad4cb89ca757653bd367a6ccb7
26303 fi
5476a9a4
GM
26304 if test $REPLACE_GETOPT = 1; then
26305 func_gl_gnulib_m4code_be453cec5eecf5731a274f2de7f2db36
26306 fi
26307 if test $REPLACE_LSTAT = 1; then
26308 func_gl_gnulib_m4code_dosname
26309 fi
26310 if test $REPLACE_LSTAT = 1; then
26311 func_gl_gnulib_m4code_stat
26312 fi
26313 if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
26314 func_gl_gnulib_m4code_stat
26315 fi
d7ad186c
GM
26316 if test $HAVE_READLINKAT = 0; then
26317 func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b
26318 fi
26319 if test $HAVE_READLINKAT = 0; then
26320 func_gl_gnulib_m4code_dosname
26321 fi
26322 if test $HAVE_READLINKAT = 0; then
26323 func_gl_gnulib_m4code_03e0aaad4cb89ca757653bd367a6ccb7
26324 fi
5476a9a4
GM
26325 if { test $HAVE_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; } && test $ac_cv_type_long_long_int = yes; then
26326 func_gl_gnulib_m4code_strtoll
26327 fi
26328 if test $HAVE_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; then
26329 func_gl_gnulib_m4code_verify
26330 fi
26331 if test $ac_cv_func_strtoumax = no && test $ac_cv_type_unsigned_long_long_int = yes; then
26332 func_gl_gnulib_m4code_strtoull
26333 fi
26334 if test $ac_cv_func_strtoumax = no; then
26335 func_gl_gnulib_m4code_verify
26336 fi
067d23c9 26337
d7ad186c
GM
26338 if $gl_gnulib_enabled_260941c0e5dc67ec9e87d1fb321c300b; then
26339 gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_TRUE=
26340 gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_FALSE='#'
26341else
26342 gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_TRUE='#'
26343 gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_FALSE=
26344fi
26345
5476a9a4
GM
26346 if $gl_gnulib_enabled_dosname; then
26347 gl_GNULIB_ENABLED_dosname_TRUE=
26348 gl_GNULIB_ENABLED_dosname_FALSE='#'
26349else
26350 gl_GNULIB_ENABLED_dosname_TRUE='#'
26351 gl_GNULIB_ENABLED_dosname_FALSE=
26352fi
067d23c9 26353
710f5812
GM
26354 if $gl_gnulib_enabled_euidaccess; then
26355 gl_GNULIB_ENABLED_euidaccess_TRUE=
26356 gl_GNULIB_ENABLED_euidaccess_FALSE='#'
26357else
26358 gl_GNULIB_ENABLED_euidaccess_TRUE='#'
26359 gl_GNULIB_ENABLED_euidaccess_FALSE=
26360fi
26361
26362 if $gl_gnulib_enabled_getgroups; then
26363 gl_GNULIB_ENABLED_getgroups_TRUE=
26364 gl_GNULIB_ENABLED_getgroups_FALSE='#'
26365else
26366 gl_GNULIB_ENABLED_getgroups_TRUE='#'
26367 gl_GNULIB_ENABLED_getgroups_FALSE=
26368fi
26369
5476a9a4
GM
26370 if $gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36; then
26371 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE=
26372 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE='#'
26373else
26374 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE='#'
26375 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE=
26376fi
067d23c9 26377
710f5812
GM
26378 if $gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1; then
26379 gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_TRUE=
26380 gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_FALSE='#'
26381else
26382 gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_TRUE='#'
26383 gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_FALSE=
26384fi
26385
d7ad186c
GM
26386 if $gl_gnulib_enabled_03e0aaad4cb89ca757653bd367a6ccb7; then
26387 gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_TRUE=
26388 gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_FALSE='#'
26389else
26390 gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_TRUE='#'
26391 gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_FALSE=
26392fi
26393
5476a9a4
GM
26394 if $gl_gnulib_enabled_pathmax; then
26395 gl_GNULIB_ENABLED_pathmax_TRUE=
26396 gl_GNULIB_ENABLED_pathmax_FALSE='#'
26397else
26398 gl_GNULIB_ENABLED_pathmax_TRUE='#'
26399 gl_GNULIB_ENABLED_pathmax_FALSE=
26400fi
067d23c9 26401
710f5812
GM
26402 if $gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c; then
26403 gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_TRUE=
26404 gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_FALSE='#'
26405else
26406 gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_TRUE='#'
26407 gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_FALSE=
26408fi
26409
5476a9a4
GM
26410 if $gl_gnulib_enabled_stat; then
26411 gl_GNULIB_ENABLED_stat_TRUE=
26412 gl_GNULIB_ENABLED_stat_FALSE='#'
26413else
26414 gl_GNULIB_ENABLED_stat_TRUE='#'
26415 gl_GNULIB_ENABLED_stat_FALSE=
26416fi
067d23c9 26417
5476a9a4
GM
26418 if $gl_gnulib_enabled_strtoll; then
26419 gl_GNULIB_ENABLED_strtoll_TRUE=
26420 gl_GNULIB_ENABLED_strtoll_FALSE='#'
26421else
26422 gl_GNULIB_ENABLED_strtoll_TRUE='#'
26423 gl_GNULIB_ENABLED_strtoll_FALSE=
26424fi
067d23c9 26425
5476a9a4
GM
26426 if $gl_gnulib_enabled_strtoull; then
26427 gl_GNULIB_ENABLED_strtoull_TRUE=
26428 gl_GNULIB_ENABLED_strtoull_FALSE='#'
26429else
26430 gl_GNULIB_ENABLED_strtoull_TRUE='#'
26431 gl_GNULIB_ENABLED_strtoull_FALSE=
f199cab1 26432fi
067d23c9 26433
5476a9a4
GM
26434 if $gl_gnulib_enabled_verify; then
26435 gl_GNULIB_ENABLED_verify_TRUE=
26436 gl_GNULIB_ENABLED_verify_FALSE='#'
26437else
26438 gl_GNULIB_ENABLED_verify_TRUE='#'
26439 gl_GNULIB_ENABLED_verify_FALSE=
26440fi
067d23c9 26441
710f5812
GM
26442 if $gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec; then
26443 gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_TRUE=
26444 gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_FALSE='#'
26445else
26446 gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_TRUE='#'
26447 gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_FALSE=
26448fi
26449
5476a9a4 26450 # End of code from modules
067d23c9 26451
067d23c9 26452
067d23c9 26453
067d23c9 26454
f199cab1 26455
f199cab1
GM
26456
26457
067d23c9 26458
5476a9a4
GM
26459
26460 gltests_libdeps=
26461 gltests_ltlibdeps=
067d23c9 26462
067d23c9 26463
067d23c9
KY
26464
26465
067d23c9
KY
26466
26467
3e0be4ab 26468
3e0be4ab 26469
3e0be4ab 26470
5476a9a4
GM
26471 gl_source_base='tests'
26472 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 26473
5476a9a4 26474 gl_module_indicator_condition=$gltests_WITNESS
3e0be4ab
GM
26475
26476
26477
26478
26479
067d23c9
KY
26480
26481
26482
3e0be4ab 26483
3e0be4ab 26484
5476a9a4
GM
26485 LIBGNU_LIBDEPS="$gl_libdeps"
26486
26487 LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
26488
067d23c9 26489
5476a9a4
GM
26490CFLAGS=$SAVE_CFLAGS
26491LIBS=$SAVE_LIBS
067d23c9
KY
26492
26493case "$opsys" in
26494 aix4-2) LD_SWITCH_SYSTEM_TEMACS="-Wl,-bnodelcsect" ;;
26495
26496 darwin)
26497 ## The -headerpad option tells ld (see man page) to leave room at the
26498 ## end of the header for adding load commands. Needed for dumping.
26499 ## 0x690 is the total size of 30 segment load commands (at 56
26500 ## each); under Cocoa 31 commands are required.
26501 if test "$HAVE_NS" = "yes"; then
26502 libs_nsgui="-framework AppKit"
26503 headerpad_extra=6C8
26504 else
26505 libs_nsgui=
26506 headerpad_extra=690
26507 fi
85cf5029 26508 LD_SWITCH_SYSTEM_TEMACS="-fno-pie -prebind $libs_nsgui -Xlinker -headerpad -Xlinker $headerpad_extra"
067d23c9
KY
26509
26510 ## This is here because src/Makefile.in did some extra fiddling around
26511 ## with LD_SWITCH_SYSTEM. The cpp logic was:
26512 ## #ifndef LD_SWITCH_SYSTEM
26513 ## #if !defined (__GNUC__) && ((defined (BSD_SYSTEM) && !defined (COFF)))
26514 ## Since all the *bsds define LD_SWITCH_SYSTEM, this simplifies to:
42bbbe8b 26515 ## not using gcc, darwin.
067d23c9
KY
26516 ## Because this was done in src/Makefile.in, the resulting part of
26517 ## LD_SWITCH_SYSTEM was not used in configure (ie, in ac_link).
26518 ## It therefore seems cleaner to put this in LD_SWITCH_SYSTEM_TEMACS,
26519 ## rather than LD_SWITCH_SYSTEM.
26520 test "x$LD_SWITCH_SYSTEM" = "x" && test "x$GCC" != "xyes" && \
26521 LD_SWITCH_SYSTEM_TEMACS="-X $LD_SWITCH_SYSTEM_TEMACS"
26522 ;;
26523
ae629dae
GM
26524 ## LD_SWITCH_X_SITE_RPATH is a -rpath option saying where to
26525 ## find X at run-time.
26526 ## When handled by cpp, this was in LD_SWITCH_SYSTEM. However, at the
26527 ## point where configure sourced the s/*.h file, LD_SWITCH_X_SITE_RPATH
067d23c9
KY
26528 ## had not yet been defined and was expanded to null. Hence LD_SWITCH_SYSTEM
26529 ## had different values in configure (in ac_link) and src/Makefile.in.
26530 ## It seems clearer therefore to put this piece in LD_SWITCH_SYSTEM_TEMACS.
ae629dae 26531 gnu*) LD_SWITCH_SYSTEM_TEMACS="\$(LD_SWITCH_X_SITE_RPATH)" ;;
067d23c9
KY
26532
26533 *) LD_SWITCH_SYSTEM_TEMACS= ;;
26534esac
26535
067d23c9
KY
26536
26537
42dcba54
GM
26538## Common for all window systems
26539if test "$window_system" != "none"; then
067d23c9
KY
26540
26541$as_echo "#define HAVE_WINDOW_SYSTEM 1" >>confdefs.h
26542
42dcba54 26543 WINDOW_SYSTEM_OBJ="fontset.o fringe.o image.o"
067d23c9
KY
26544fi
26545
26546
26547
26548
42dcba54 26549
067d23c9
KY
26550#### Report on what we decided to do.
26551#### Report GTK as a toolkit, even if it doesn't use Xt.
26552#### It makes printing result more understandable as using GTK sets
26553#### toolkit_scroll_bars to yes by default.
26554if test "${HAVE_GTK}" = "yes"; then
a732eace 26555 USE_X_TOOLKIT="$USE_GTK_TOOLKIT"
067d23c9
KY
26556fi
26557
26558echo "
26559Configured for \`${canonical}'.
26560
26561 Where should the build process find the source code? ${srcdir}
067d23c9
KY
26562 What compiler should emacs be built with? ${CC} ${CFLAGS}
26563 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
26564 Should Emacs use a relocating allocator for buffers? ${REL_ALLOC}
26565 Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers
26566 What window system should Emacs use? ${window_system}
26567 What toolkit should Emacs use? ${USE_X_TOOLKIT}"
26568
26569if test -n "${x_includes}"; then
26570echo " Where do we find X Windows header files? ${x_includes}"
26571else
26572echo " Where do we find X Windows header files? Standard dirs"
26573fi
26574if test -n "${x_libraries}"; then
26575echo " Where do we find X Windows libraries? ${x_libraries}"
26576else
26577echo " Where do we find X Windows libraries? Standard dirs"
26578fi
26579
26580echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}"
26581echo " Does Emacs use -lXpm? ${HAVE_XPM}"
26582echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
26583echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
26584echo " Does Emacs use a gif library? ${HAVE_GIF} $LIBGIF"
26585echo " Does Emacs use -lpng? ${HAVE_PNG}"
26586echo " Does Emacs use -lrsvg-2? ${HAVE_RSVG}"
26587echo " Does Emacs use imagemagick? ${HAVE_IMAGEMAGICK}"
26588
26589echo " Does Emacs use -lgpm? ${HAVE_GPM}"
26590echo " Does Emacs use -ldbus? ${HAVE_DBUS}"
26591echo " Does Emacs use -lgconf? ${HAVE_GCONF}"
f527bd02 26592echo " Does Emacs use GSettings? ${HAVE_GSETTINGS}"
067d23c9 26593echo " Does Emacs use -lselinux? ${HAVE_LIBSELINUX}"
27f5a136 26594echo " Does Emacs use -lgnutls? ${HAVE_GNUTLS}"
067d23c9
KY
26595echo " Does Emacs use -lxml2? ${HAVE_LIBXML2}"
26596
26597echo " Does Emacs use -lfreetype? ${HAVE_FREETYPE}"
26598echo " Does Emacs use -lm17n-flt? ${HAVE_M17N_FLT}"
26599echo " Does Emacs use -lotf? ${HAVE_LIBOTF}"
26600echo " Does Emacs use -lxft? ${HAVE_XFT}"
26601
26602echo " Does Emacs use toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
26603echo
26604
eb39a72d
GM
26605if test -n "${EMACSDATA}"; then
26606 echo " Environment variable EMACSDATA set to: $EMACSDATA"
26607fi
26608if test -n "${EMACSDOC}"; then
26609 echo " Environment variable EMACSDOC set to: $EMACSDOC"
26610fi
26611
067d23c9
KY
26612echo
26613
26614if test "$HAVE_NS" = "yes"; then
26615 echo
3d0788a9 26616 echo "You must run \"${MAKE-make} install\" in order to test the built application.
067d23c9
KY
26617The installed application will go to nextstep/Emacs.app and can be
26618run or moved from there."
26619 if test "$EN_NS_SELF_CONTAINED" = "yes"; then
26620 echo "The application will be fully self-contained."
26621 else
26622 echo "The lisp resources for the application will be installed under ${prefix}.
3d0788a9 26623You may need to run \"${MAKE-make} install\" with sudo. The application will fail
067d23c9
KY
26624to run if these resources are not installed."
26625 fi
26626 echo
26627fi
26628
031fabfc
GM
26629if test "${opsys}" = "cygwin"; then
26630 case `uname -r` in
26631 1.5.*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: building Emacs on Cygwin 1.5 is not supported." >&5
26632$as_echo "$as_me: WARNING: building Emacs on Cygwin 1.5 is not supported." >&2;}
26633 echo
26634 ;;
26635 esac
26636fi
067d23c9
KY
26637
26638# Remove any trailing slashes in these variables.
26639test "${prefix}" != NONE &&
26640 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
26641test "${exec_prefix}" != NONE &&
26642 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
26643
bb7dce39
GM
26644if test "$HAVE_NS" = "yes"; then
26645 if test "$NS_IMPL_GNUSTEP" = yes; then
26646 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"
26647
26648 else
26649 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"
26650
26651 fi
26652fi
26653
26654SUBDIR_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 26655
bb7dce39 26656ac_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 26657
a877df06 26658
73b78882 26659opt_makefile=test/automated/Makefile
a877df06 26660
b5591ebb 26661if test -f "$srcdir/$opt_makefile.in"; then
73b78882 26662 SUBDIR_MAKEFILES="$SUBDIR_MAKEFILES $opt_makefile"
56ade35c 26663 ac_config_files="$ac_config_files test/automated/Makefile"
a877df06 26664
56ade35c 26665fi
73b78882 26666
40b65096
GM
26667
26668opt_makefile=admin/unidata/Makefile
26669
b5591ebb 26670if test -f "$srcdir/$opt_makefile.in"; then
40b65096
GM
26671 SUBDIR_MAKEFILES="$SUBDIR_MAKEFILES $opt_makefile"
26672 ac_config_files="$ac_config_files admin/unidata/Makefile"
26673
26674fi
26675
26676
56ade35c 26677SUBDIR_MAKEFILES_IN=`echo " ${SUBDIR_MAKEFILES}" | sed -e 's| | $(srcdir)/|g' -e 's|Makefile|Makefile.in|g'`
73b78882 26678
067d23c9 26679
9411886d
PE
26680
26681ac_config_commands="$ac_config_commands mkdirs"
26682
26683
26684ac_config_commands="$ac_config_commands epaths"
26685
26686
26687ac_config_commands="$ac_config_commands gdbinit"
26688
067d23c9
KY
26689
26690cat >confcache <<\_ACEOF
26691# This file is a shell script that caches the results of configure
26692# tests run on this system so they can be shared between configure
26693# scripts and configure runs, see configure's option --config-cache.
26694# It is not useful on other systems. If it contains results you don't
26695# want to keep, you may remove or edit it.
26696#
26697# config.status only pays attention to the cache file if you give it
26698# the --recheck option to rerun configure.
26699#
26700# `ac_cv_env_foo' variables (set or unset) will be overridden when
26701# loading this file, other *unset* `ac_cv_foo' will be assigned the
26702# following values.
26703
26704_ACEOF
26705
26706# The following way of writing the cache mishandles newlines in values,
26707# but we know of no workaround that is simple, portable, and efficient.
26708# So, we kill variables containing newlines.
26709# Ultrix sh set writes to stderr and can't be redirected directly,
26710# and sets the high bit in the cache file unless we assign to the vars.
26711(
26712 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
26713 eval ac_val=\$$ac_var
26714 case $ac_val in #(
26715 *${as_nl}*)
26716 case $ac_var in #(
26717 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
26718$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
26719 esac
26720 case $ac_var in #(
26721 _ | IFS | as_nl) ;; #(
26722 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
26723 *) { eval $ac_var=; unset $ac_var;} ;;
26724 esac ;;
26725 esac
26726 done
26727
26728 (set) 2>&1 |
26729 case $as_nl`(ac_space=' '; set) 2>&1` in #(
26730 *${as_nl}ac_space=\ *)
26731 # `set' does not quote correctly, so add quotes: double-quote
26732 # substitution turns \\\\ into \\, and sed turns \\ into \.
26733 sed -n \
26734 "s/'/'\\\\''/g;
26735 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
26736 ;; #(
26737 *)
26738 # `set' quotes correctly as required by POSIX, so do not add quotes.
26739 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
26740 ;;
26741 esac |
26742 sort
26743) |
26744 sed '
26745 /^ac_cv_env_/b end
26746 t clear
26747 :clear
26748 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
26749 t end
26750 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
26751 :end' >>confcache
26752if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
26753 if test -w "$cache_file"; then
a9bec17c 26754 test "x$cache_file" != "x/dev/null" &&
067d23c9
KY
26755 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
26756$as_echo "$as_me: updating cache $cache_file" >&6;}
a9bec17c 26757 cat confcache >$cache_file
067d23c9
KY
26758 else
26759 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
26760$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
26761 fi
26762fi
26763rm -f confcache
26764
26765test "x$prefix" = xNONE && prefix=$ac_default_prefix
26766# Let make expand exec_prefix.
26767test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
26768
26769DEFS=-DHAVE_CONFIG_H
26770
26771ac_libobjs=
26772ac_ltlibobjs=
26773for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
26774 # 1. Remove the extension, and $U if already installed.
26775 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
26776 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
26777 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
26778 # will be set to the directory where LIBOBJS objects are built.
26779 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
26780 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
26781done
26782LIBOBJS=$ac_libobjs
26783
26784LTLIBOBJS=$ac_ltlibobjs
26785
26786
743c80a7
PE
26787 if test -n "$EXEEXT"; then
26788 am__EXEEXT_TRUE=
26789 am__EXEEXT_FALSE='#'
26790else
26791 am__EXEEXT_TRUE='#'
26792 am__EXEEXT_FALSE=
26793fi
26794
26795if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
a9bec17c 26796 as_fn_error "conditional \"AMDEP\" was never defined.
743c80a7
PE
26797Usually this means the macro was only invoked conditionally." "$LINENO" 5
26798fi
26799if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
a9bec17c 26800 as_fn_error "conditional \"am__fastdepCC\" was never defined.
743c80a7
PE
26801Usually this means the macro was only invoked conditionally." "$LINENO" 5
26802fi
743c80a7 26803if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
a9bec17c 26804 as_fn_error "conditional \"GL_COND_LIBTOOL\" was never defined.
743c80a7
PE
26805Usually this means the macro was only invoked conditionally." "$LINENO" 5
26806fi
4fc2b746 26807if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
a9bec17c 26808 as_fn_error "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
4fc2b746
GM
26809Usually this means the macro was only invoked conditionally." "$LINENO" 5
26810fi
743c80a7 26811
8966cbff
GM
26812if test -z "${GL_GENERATE_EXECINFO_H_TRUE}" && test -z "${GL_GENERATE_EXECINFO_H_FALSE}"; then
26813 as_fn_error "conditional \"GL_GENERATE_EXECINFO_H\" was never defined.
26814Usually this means the macro was only invoked conditionally." "$LINENO" 5
26815fi
4fda9c95 26816if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
a9bec17c 26817 as_fn_error "conditional \"GL_GENERATE_STDINT_H\" was never defined.
4fda9c95
GM
26818Usually this means the macro was only invoked conditionally." "$LINENO" 5
26819fi
0eb775a3
GM
26820if test -z "${GL_GENERATE_STDALIGN_H_TRUE}" && test -z "${GL_GENERATE_STDALIGN_H_FALSE}"; then
26821 as_fn_error "conditional \"GL_GENERATE_STDALIGN_H\" was never defined.
26822Usually this means the macro was only invoked conditionally." "$LINENO" 5
26823fi
6d153f56 26824if test -z "${GL_GENERATE_STDARG_H_TRUE}" && test -z "${GL_GENERATE_STDARG_H_FALSE}"; then
a9bec17c 26825 as_fn_error "conditional \"GL_GENERATE_STDARG_H\" was never defined.
6d153f56
GM
26826Usually this means the macro was only invoked conditionally." "$LINENO" 5
26827fi
6c051bab 26828if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
a9bec17c 26829 as_fn_error "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
6c051bab
GM
26830Usually this means the macro was only invoked conditionally." "$LINENO" 5
26831fi
26832if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
a9bec17c 26833 as_fn_error "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
6c051bab
GM
26834Usually this means the macro was only invoked conditionally." "$LINENO" 5
26835fi
d7ad186c
GM
26836if test -z "${gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_TRUE}" && test -z "${gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_FALSE}"; then
26837 as_fn_error "conditional \"gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b\" was never defined.
26838Usually this means the macro was only invoked conditionally." "$LINENO" 5
26839fi
6d153f56 26840if test -z "${gl_GNULIB_ENABLED_dosname_TRUE}" && test -z "${gl_GNULIB_ENABLED_dosname_FALSE}"; then
a9bec17c 26841 as_fn_error "conditional \"gl_GNULIB_ENABLED_dosname\" was never defined.
6d153f56
GM
26842Usually this means the macro was only invoked conditionally." "$LINENO" 5
26843fi
710f5812
GM
26844if test -z "${gl_GNULIB_ENABLED_euidaccess_TRUE}" && test -z "${gl_GNULIB_ENABLED_euidaccess_FALSE}"; then
26845 as_fn_error "conditional \"gl_GNULIB_ENABLED_euidaccess\" was never defined.
26846Usually this means the macro was only invoked conditionally." "$LINENO" 5
26847fi
26848if test -z "${gl_GNULIB_ENABLED_getgroups_TRUE}" && test -z "${gl_GNULIB_ENABLED_getgroups_FALSE}"; then
26849 as_fn_error "conditional \"gl_GNULIB_ENABLED_getgroups\" was never defined.
26850Usually this means the macro was only invoked conditionally." "$LINENO" 5
26851fi
6d153f56 26852if test -z "${gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE}" && test -z "${gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE}"; then
a9bec17c 26853 as_fn_error "conditional \"gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36\" was never defined.
6d153f56
GM
26854Usually this means the macro was only invoked conditionally." "$LINENO" 5
26855fi
710f5812
GM
26856if test -z "${gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_TRUE}" && test -z "${gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_FALSE}"; then
26857 as_fn_error "conditional \"gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1\" was never defined.
26858Usually this means the macro was only invoked conditionally." "$LINENO" 5
26859fi
d7ad186c
GM
26860if test -z "${gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_TRUE}" && test -z "${gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_FALSE}"; then
26861 as_fn_error "conditional \"gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7\" was never defined.
26862Usually this means the macro was only invoked conditionally." "$LINENO" 5
26863fi
a0a61e58
GM
26864if test -z "${gl_GNULIB_ENABLED_pathmax_TRUE}" && test -z "${gl_GNULIB_ENABLED_pathmax_FALSE}"; then
26865 as_fn_error "conditional \"gl_GNULIB_ENABLED_pathmax\" was never defined.
26866Usually this means the macro was only invoked conditionally." "$LINENO" 5
26867fi
710f5812
GM
26868if test -z "${gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_TRUE}" && test -z "${gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_FALSE}"; then
26869 as_fn_error "conditional \"gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c\" was never defined.
26870Usually this means the macro was only invoked conditionally." "$LINENO" 5
26871fi
6d153f56 26872if test -z "${gl_GNULIB_ENABLED_stat_TRUE}" && test -z "${gl_GNULIB_ENABLED_stat_FALSE}"; then
a9bec17c 26873 as_fn_error "conditional \"gl_GNULIB_ENABLED_stat\" was never defined.
6d153f56
GM
26874Usually this means the macro was only invoked conditionally." "$LINENO" 5
26875fi
3e0be4ab 26876if test -z "${gl_GNULIB_ENABLED_strtoll_TRUE}" && test -z "${gl_GNULIB_ENABLED_strtoll_FALSE}"; then
a9bec17c 26877 as_fn_error "conditional \"gl_GNULIB_ENABLED_strtoll\" was never defined.
3e0be4ab
GM
26878Usually this means the macro was only invoked conditionally." "$LINENO" 5
26879fi
6d153f56 26880if test -z "${gl_GNULIB_ENABLED_strtoull_TRUE}" && test -z "${gl_GNULIB_ENABLED_strtoull_FALSE}"; then
a9bec17c 26881 as_fn_error "conditional \"gl_GNULIB_ENABLED_strtoull\" was never defined.
6d153f56
GM
26882Usually this means the macro was only invoked conditionally." "$LINENO" 5
26883fi
26884if test -z "${gl_GNULIB_ENABLED_verify_TRUE}" && test -z "${gl_GNULIB_ENABLED_verify_FALSE}"; then
a9bec17c 26885 as_fn_error "conditional \"gl_GNULIB_ENABLED_verify\" was never defined.
6d153f56 26886Usually this means the macro was only invoked conditionally." "$LINENO" 5
710f5812
GM
26887fi
26888if test -z "${gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_TRUE}" && test -z "${gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_FALSE}"; then
26889 as_fn_error "conditional \"gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec\" was never defined.
26890Usually this means the macro was only invoked conditionally." "$LINENO" 5
6c051bab 26891fi
942f733f 26892
743c80a7
PE
26893 gl_libobjs=
26894 gl_ltlibobjs=
26895 if test -n "$gl_LIBOBJS"; then
26896 # Remove the extension.
26897 sed_drop_objext='s/\.o$//;s/\.obj$//'
26898 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
26899 gl_libobjs="$gl_libobjs $i.$ac_objext"
26900 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
26901 done
26902 fi
26903 gl_LIBOBJS=$gl_libobjs
26904
26905 gl_LTLIBOBJS=$gl_ltlibobjs
26906
26907
26908
26909 gltests_libobjs=
26910 gltests_ltlibobjs=
26911 if test -n "$gltests_LIBOBJS"; then
26912 # Remove the extension.
26913 sed_drop_objext='s/\.o$//;s/\.obj$//'
26914 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
26915 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
26916 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
26917 done
26918 fi
26919 gltests_LIBOBJS=$gltests_libobjs
26920
26921 gltests_LTLIBOBJS=$gltests_ltlibobjs
26922
067d23c9
KY
26923
26924
a9bec17c 26925: ${CONFIG_STATUS=./config.status}
067d23c9
KY
26926ac_write_fail=0
26927ac_clean_files_save=$ac_clean_files
26928ac_clean_files="$ac_clean_files $CONFIG_STATUS"
26929{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
26930$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
26931as_write_fail=0
26932cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
26933#! $SHELL
26934# Generated by $as_me.
26935# Run this file to recreate the current configuration.
26936# Compiler output produced by configure, useful for debugging
26937# configure, is in config.log if it exists.
26938
26939debug=false
26940ac_cs_recheck=false
26941ac_cs_silent=false
26942
26943SHELL=\${CONFIG_SHELL-$SHELL}
26944export SHELL
26945_ASEOF
26946cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
26947## -------------------- ##
26948## M4sh Initialization. ##
26949## -------------------- ##
26950
26951# Be more Bourne compatible
26952DUALCASE=1; export DUALCASE # for MKS sh
26953if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
26954 emulate sh
26955 NULLCMD=:
26956 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
26957 # is contrary to our usage. Disable this feature.
26958 alias -g '${1+"$@"}'='"$@"'
26959 setopt NO_GLOB_SUBST
26960else
26961 case `(set -o) 2>/dev/null` in #(
26962 *posix*) :
26963 set -o posix ;; #(
26964 *) :
26965 ;;
26966esac
26967fi
26968
26969
26970as_nl='
26971'
26972export as_nl
26973# Printing a long string crashes Solaris 7 /usr/bin/printf.
26974as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
26975as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
26976as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
26977# Prefer a ksh shell builtin over an external printf program on Solaris,
26978# but without wasting forks for bash or zsh.
26979if test -z "$BASH_VERSION$ZSH_VERSION" \
26980 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
26981 as_echo='print -r --'
26982 as_echo_n='print -rn --'
26983elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
26984 as_echo='printf %s\n'
26985 as_echo_n='printf %s'
26986else
26987 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
26988 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
26989 as_echo_n='/usr/ucb/echo -n'
26990 else
26991 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
26992 as_echo_n_body='eval
26993 arg=$1;
26994 case $arg in #(
26995 *"$as_nl"*)
26996 expr "X$arg" : "X\\(.*\\)$as_nl";
26997 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
26998 esac;
26999 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
27000 '
27001 export as_echo_n_body
27002 as_echo_n='sh -c $as_echo_n_body as_echo'
27003 fi
27004 export as_echo_body
27005 as_echo='sh -c $as_echo_body as_echo'
27006fi
27007
27008# The user is always right.
27009if test "${PATH_SEPARATOR+set}" != set; then
27010 PATH_SEPARATOR=:
27011 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
27012 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
27013 PATH_SEPARATOR=';'
27014 }
27015fi
27016
27017
27018# IFS
27019# We need space, tab and new line, in precisely that order. Quoting is
27020# there to prevent editors from complaining about space-tab.
27021# (If _AS_PATH_WALK were called with IFS unset, it would disable word
27022# splitting by setting IFS to empty value.)
27023IFS=" "" $as_nl"
27024
27025# Find who we are. Look in the path if we contain no directory separator.
27026case $0 in #((
27027 *[\\/]* ) as_myself=$0 ;;
27028 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27029for as_dir in $PATH
27030do
27031 IFS=$as_save_IFS
27032 test -z "$as_dir" && as_dir=.
27033 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
27034 done
27035IFS=$as_save_IFS
27036
27037 ;;
27038esac
27039# We did not find ourselves, most probably we were run as `sh COMMAND'
27040# in which case we are not to be found in the path.
27041if test "x$as_myself" = x; then
27042 as_myself=$0
27043fi
27044if test ! -f "$as_myself"; then
27045 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
27046 exit 1
27047fi
27048
27049# Unset variables that we do not need and which cause bugs (e.g. in
27050# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
27051# suppresses any "Segmentation fault" message there. '((' could
27052# trigger a bug in pdksh 5.2.14.
27053for as_var in BASH_ENV ENV MAIL MAILPATH
27054do eval test x\${$as_var+set} = xset \
27055 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
27056done
27057PS1='$ '
27058PS2='> '
27059PS4='+ '
27060
27061# NLS nuisances.
27062LC_ALL=C
27063export LC_ALL
27064LANGUAGE=C
27065export LANGUAGE
27066
27067# CDPATH.
27068(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
27069
27070
a9bec17c
GM
27071# as_fn_error ERROR [LINENO LOG_FD]
27072# ---------------------------------
067d23c9
KY
27073# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
27074# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
a9bec17c 27075# script with status $?, using 1 if that was 0.
067d23c9
KY
27076as_fn_error ()
27077{
a9bec17c
GM
27078 as_status=$?; test $as_status -eq 0 && as_status=1
27079 if test "$3"; then
27080 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
27081 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
067d23c9 27082 fi
a9bec17c 27083 $as_echo "$as_me: error: $1" >&2
067d23c9
KY
27084 as_fn_exit $as_status
27085} # as_fn_error
27086
27087
27088# as_fn_set_status STATUS
27089# -----------------------
27090# Set $? to STATUS, without forking.
27091as_fn_set_status ()
27092{
27093 return $1
27094} # as_fn_set_status
27095
27096# as_fn_exit STATUS
27097# -----------------
27098# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
27099as_fn_exit ()
27100{
27101 set +e
27102 as_fn_set_status $1
27103 exit $1
27104} # as_fn_exit
27105
27106# as_fn_unset VAR
27107# ---------------
27108# Portably unset VAR.
27109as_fn_unset ()
27110{
27111 { eval $1=; unset $1;}
27112}
27113as_unset=as_fn_unset
27114# as_fn_append VAR VALUE
27115# ----------------------
27116# Append the text in VALUE to the end of the definition contained in VAR. Take
27117# advantage of any shell optimizations that allow amortized linear growth over
27118# repeated appends, instead of the typical quadratic growth present in naive
27119# implementations.
27120if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
27121 eval 'as_fn_append ()
27122 {
27123 eval $1+=\$2
27124 }'
27125else
27126 as_fn_append ()
27127 {
27128 eval $1=\$$1\$2
27129 }
27130fi # as_fn_append
27131
27132# as_fn_arith ARG...
27133# ------------------
27134# Perform arithmetic evaluation on the ARGs, and store the result in the
27135# global $as_val. Take advantage of shells that can avoid forks. The arguments
27136# must be portable across $(()) and expr.
27137if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
27138 eval 'as_fn_arith ()
27139 {
27140 as_val=$(( $* ))
27141 }'
27142else
27143 as_fn_arith ()
27144 {
27145 as_val=`expr "$@" || test $? -eq 1`
27146 }
27147fi # as_fn_arith
27148
27149
27150if expr a : '\(a\)' >/dev/null 2>&1 &&
27151 test "X`expr 00001 : '.*\(...\)'`" = X001; then
27152 as_expr=expr
27153else
27154 as_expr=false
27155fi
27156
27157if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
27158 as_basename=basename
27159else
27160 as_basename=false
27161fi
27162
27163if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
27164 as_dirname=dirname
27165else
27166 as_dirname=false
27167fi
27168
27169as_me=`$as_basename -- "$0" ||
27170$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
27171 X"$0" : 'X\(//\)$' \| \
27172 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
27173$as_echo X/"$0" |
27174 sed '/^.*\/\([^/][^/]*\)\/*$/{
27175 s//\1/
27176 q
27177 }
27178 /^X\/\(\/\/\)$/{
27179 s//\1/
27180 q
27181 }
27182 /^X\/\(\/\).*/{
27183 s//\1/
27184 q
27185 }
27186 s/.*/./; q'`
27187
27188# Avoid depending upon Character Ranges.
27189as_cr_letters='abcdefghijklmnopqrstuvwxyz'
27190as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
27191as_cr_Letters=$as_cr_letters$as_cr_LETTERS
27192as_cr_digits='0123456789'
27193as_cr_alnum=$as_cr_Letters$as_cr_digits
27194
27195ECHO_C= ECHO_N= ECHO_T=
27196case `echo -n x` in #(((((
27197-n*)
27198 case `echo 'xy\c'` in
27199 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
27200 xy) ECHO_C='\c';;
27201 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
27202 ECHO_T=' ';;
27203 esac;;
27204*)
27205 ECHO_N='-n';;
27206esac
27207
27208rm -f conf$$ conf$$.exe conf$$.file
27209if test -d conf$$.dir; then
27210 rm -f conf$$.dir/conf$$.file
27211else
27212 rm -f conf$$.dir
27213 mkdir conf$$.dir 2>/dev/null
27214fi
27215if (echo >conf$$.file) 2>/dev/null; then
27216 if ln -s conf$$.file conf$$ 2>/dev/null; then
27217 as_ln_s='ln -s'
27218 # ... but there are two gotchas:
27219 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
27220 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
27221 # In both cases, we have to default to `cp -p'.
27222 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
27223 as_ln_s='cp -p'
27224 elif ln conf$$.file conf$$ 2>/dev/null; then
27225 as_ln_s=ln
27226 else
27227 as_ln_s='cp -p'
27228 fi
27229else
27230 as_ln_s='cp -p'
27231fi
27232rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
27233rmdir conf$$.dir 2>/dev/null
27234
27235
27236# as_fn_mkdir_p
27237# -------------
27238# Create "$as_dir" as a directory, including parents if necessary.
27239as_fn_mkdir_p ()
27240{
27241
27242 case $as_dir in #(
27243 -*) as_dir=./$as_dir;;
27244 esac
27245 test -d "$as_dir" || eval $as_mkdir_p || {
27246 as_dirs=
27247 while :; do
27248 case $as_dir in #(
27249 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
27250 *) as_qdir=$as_dir;;
27251 esac
27252 as_dirs="'$as_qdir' $as_dirs"
27253 as_dir=`$as_dirname -- "$as_dir" ||
27254$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
27255 X"$as_dir" : 'X\(//\)[^/]' \| \
27256 X"$as_dir" : 'X\(//\)$' \| \
27257 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
27258$as_echo X"$as_dir" |
27259 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
27260 s//\1/
27261 q
27262 }
27263 /^X\(\/\/\)[^/].*/{
27264 s//\1/
27265 q
27266 }
27267 /^X\(\/\/\)$/{
27268 s//\1/
27269 q
27270 }
27271 /^X\(\/\).*/{
27272 s//\1/
27273 q
27274 }
27275 s/.*/./; q'`
27276 test -d "$as_dir" && break
27277 done
27278 test -z "$as_dirs" || eval "mkdir $as_dirs"
a9bec17c 27279 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
067d23c9
KY
27280
27281
27282} # as_fn_mkdir_p
27283if mkdir -p . 2>/dev/null; then
27284 as_mkdir_p='mkdir -p "$as_dir"'
27285else
27286 test -d ./-p && rmdir ./-p
27287 as_mkdir_p=false
27288fi
27289
27290if test -x / >/dev/null 2>&1; then
27291 as_test_x='test -x'
27292else
27293 if ls -dL / >/dev/null 2>&1; then
27294 as_ls_L_option=L
27295 else
27296 as_ls_L_option=
27297 fi
27298 as_test_x='
27299 eval sh -c '\''
27300 if test -d "$1"; then
27301 test -d "$1/.";
27302 else
27303 case $1 in #(
27304 -*)set "./$1";;
27305 esac;
27306 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
27307 ???[sx]*):;;*)false;;esac;fi
27308 '\'' sh
27309 '
27310fi
27311as_executable_p=$as_test_x
27312
27313# Sed expression to map a string onto a valid CPP name.
27314as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
27315
27316# Sed expression to map a string onto a valid variable name.
27317as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
27318
27319
27320exec 6>&1
27321## ----------------------------------- ##
27322## Main body of $CONFIG_STATUS script. ##
27323## ----------------------------------- ##
27324_ASEOF
27325test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
27326
27327cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27328# Save the log message, to keep $0 and so on meaningful, and to
27329# report actual input values of CONFIG_FILES etc. instead of their
27330# values after options handling.
27331ac_log="
c574bc34 27332This file was extended by emacs $as_me 24.3.50, which was
a9bec17c 27333generated by GNU Autoconf 2.65. Invocation command line was
067d23c9
KY
27334
27335 CONFIG_FILES = $CONFIG_FILES
27336 CONFIG_HEADERS = $CONFIG_HEADERS
27337 CONFIG_LINKS = $CONFIG_LINKS
27338 CONFIG_COMMANDS = $CONFIG_COMMANDS
27339 $ $0 $@
27340
27341on `(hostname || uname -n) 2>/dev/null | sed 1q`
27342"
27343
27344_ACEOF
27345
27346case $ac_config_files in *"
27347"*) set x $ac_config_files; shift; ac_config_files=$*;;
27348esac
27349
27350case $ac_config_headers in *"
27351"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
27352esac
27353
27354
27355cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27356# Files that config.status was made for.
27357config_files="$ac_config_files"
27358config_headers="$ac_config_headers"
27359config_commands="$ac_config_commands"
27360
27361_ACEOF
27362
27363cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27364ac_cs_usage="\
27365\`$as_me' instantiates files and other configuration actions
27366from templates according to the current configuration. Unless the files
27367and actions are specified as TAGs, all are instantiated by default.
27368
27369Usage: $0 [OPTION]... [TAG]...
27370
27371 -h, --help print this help, then exit
27372 -V, --version print version number and configuration settings, then exit
27373 --config print configuration, then exit
27374 -q, --quiet, --silent
27375 do not print progress messages
27376 -d, --debug don't remove temporary files
27377 --recheck update $as_me by reconfiguring in the same conditions
27378 --file=FILE[:TEMPLATE]
27379 instantiate the configuration file FILE
27380 --header=FILE[:TEMPLATE]
27381 instantiate the configuration header FILE
27382
27383Configuration files:
27384$config_files
27385
27386Configuration headers:
27387$config_headers
27388
27389Configuration commands:
27390$config_commands
27391
27392Report bugs to the package provider."
27393
27394_ACEOF
27395cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27396ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
27397ac_cs_version="\\
c574bc34 27398emacs config.status 24.3.50
a9bec17c 27399configured by $0, generated by GNU Autoconf 2.65,
067d23c9
KY
27400 with options \\"\$ac_cs_config\\"
27401
a9bec17c 27402Copyright (C) 2009 Free Software Foundation, Inc.
067d23c9
KY
27403This config.status script is free software; the Free Software Foundation
27404gives unlimited permission to copy, distribute and modify it."
27405
27406ac_pwd='$ac_pwd'
27407srcdir='$srcdir'
27408INSTALL='$INSTALL'
743c80a7
PE
27409MKDIR_P='$MKDIR_P'
27410AWK='$AWK'
067d23c9
KY
27411test -n "\$AWK" || AWK=awk
27412_ACEOF
27413
27414cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27415# The default lists apply if the user does not specify any file.
27416ac_need_defaults=:
27417while test $# != 0
27418do
27419 case $1 in
a9bec17c 27420 --*=*)
067d23c9
KY
27421 ac_option=`expr "X$1" : 'X\([^=]*\)='`
27422 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
27423 ac_shift=:
27424 ;;
27425 *)
27426 ac_option=$1
27427 ac_optarg=$2
27428 ac_shift=shift
27429 ;;
27430 esac
27431
27432 case $ac_option in
27433 # Handling of the options.
27434 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
27435 ac_cs_recheck=: ;;
27436 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
27437 $as_echo "$ac_cs_version"; exit ;;
27438 --config | --confi | --conf | --con | --co | --c )
27439 $as_echo "$ac_cs_config"; exit ;;
27440 --debug | --debu | --deb | --de | --d | -d )
27441 debug=: ;;
27442 --file | --fil | --fi | --f )
27443 $ac_shift
27444 case $ac_optarg in
27445 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
27446 esac
27447 as_fn_append CONFIG_FILES " '$ac_optarg'"
27448 ac_need_defaults=false;;
27449 --header | --heade | --head | --hea )
27450 $ac_shift
27451 case $ac_optarg in
27452 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
27453 esac
27454 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
27455 ac_need_defaults=false;;
27456 --he | --h)
27457 # Conflict between --help and --header
a9bec17c 27458 as_fn_error "ambiguous option: \`$1'
067d23c9
KY
27459Try \`$0 --help' for more information.";;
27460 --help | --hel | -h )
27461 $as_echo "$ac_cs_usage"; exit ;;
27462 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
27463 | -silent | --silent | --silen | --sile | --sil | --si | --s)
27464 ac_cs_silent=: ;;
27465
27466 # This is an error.
a9bec17c 27467 -*) as_fn_error "unrecognized option: \`$1'
067d23c9
KY
27468Try \`$0 --help' for more information." ;;
27469
27470 *) as_fn_append ac_config_targets " $1"
27471 ac_need_defaults=false ;;
27472
27473 esac
27474 shift
27475done
27476
27477ac_configure_extra_args=
27478
27479if $ac_cs_silent; then
27480 exec 6>/dev/null
27481 ac_configure_extra_args="$ac_configure_extra_args --silent"
27482fi
27483
27484_ACEOF
27485cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27486if \$ac_cs_recheck; then
27487 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
27488 shift
27489 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
27490 CONFIG_SHELL='$SHELL'
27491 export CONFIG_SHELL
27492 exec "\$@"
27493fi
27494
27495_ACEOF
27496cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27497exec 5>>config.log
27498{
27499 echo
27500 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
27501## Running $as_me. ##
27502_ASBOX
27503 $as_echo "$ac_log"
27504} >&5
27505
27506_ACEOF
27507cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27508#
27509# INIT-COMMANDS
27510#
743c80a7 27511AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
5ec54608 27512GCC="$GCC" CPPFLAGS="$CPPFLAGS"
067d23c9
KY
27513
27514_ACEOF
27515
27516cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27517
27518# Handling of arguments.
27519for ac_config_target in $ac_config_targets
27520do
27521 case $ac_config_target in
27522 "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:src/config.in" ;;
743c80a7 27523 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
bb7dce39
GM
27524 "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" ;;
27525 "nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop") CONFIG_FILES="$CONFIG_FILES nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop:nextstep/templates/Emacs.desktop.in" ;;
27526 "nextstep/Cocoa/Emacs.base/Contents/Info.plist") CONFIG_FILES="$CONFIG_FILES nextstep/Cocoa/Emacs.base/Contents/Info.plist:nextstep/templates/Info.plist.in" ;;
27527 "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 27528 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
743c80a7 27529 "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
56ade35c
GM
27530 "lib-src/Makefile") CONFIG_FILES="$CONFIG_FILES lib-src/Makefile" ;;
27531 "oldXMenu/Makefile") CONFIG_FILES="$CONFIG_FILES oldXMenu/Makefile" ;;
27532 "doc/emacs/Makefile") CONFIG_FILES="$CONFIG_FILES doc/emacs/Makefile" ;;
27533 "doc/misc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/misc/Makefile" ;;
27534 "doc/lispintro/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispintro/Makefile" ;;
27535 "doc/lispref/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispref/Makefile" ;;
27536 "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
27537 "lwlib/Makefile") CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;;
27538 "lisp/Makefile") CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;;
27539 "leim/Makefile") CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;;
bb7dce39 27540 "nextstep/Makefile") CONFIG_FILES="$CONFIG_FILES nextstep/Makefile" ;;
56ade35c 27541 "test/automated/Makefile") CONFIG_FILES="$CONFIG_FILES test/automated/Makefile" ;;
40b65096 27542 "admin/unidata/Makefile") CONFIG_FILES="$CONFIG_FILES admin/unidata/Makefile" ;;
9411886d
PE
27543 "mkdirs") CONFIG_COMMANDS="$CONFIG_COMMANDS mkdirs" ;;
27544 "epaths") CONFIG_COMMANDS="$CONFIG_COMMANDS epaths" ;;
27545 "gdbinit") CONFIG_COMMANDS="$CONFIG_COMMANDS gdbinit" ;;
067d23c9 27546
a9bec17c 27547 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
067d23c9
KY
27548 esac
27549done
27550
27551
27552# If the user did not use the arguments to specify the items to instantiate,
27553# then the envvar interface is used. Set only those that are not.
27554# We use the long form for the default assignment because of an extremely
27555# bizarre bug on SunOS 4.1.3.
27556if $ac_need_defaults; then
27557 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
27558 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
27559 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
27560fi
27561
27562# Have a temporary directory for convenience. Make it in the build tree
27563# simply because there is no reason against having it here, and in addition,
27564# creating and moving files from /tmp can sometimes cause problems.
27565# Hook for its removal unless debugging.
27566# Note that there is a small window in which the directory will not be cleaned:
27567# after its creation but before its name has been assigned to `$tmp'.
27568$debug ||
27569{
a9bec17c 27570 tmp=
067d23c9 27571 trap 'exit_status=$?
a9bec17c 27572 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
067d23c9
KY
27573' 0
27574 trap 'as_fn_exit 1' 1 2 13 15
27575}
27576# Create a (secure) tmp directory for tmp files.
27577
27578{
27579 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
a9bec17c 27580 test -n "$tmp" && test -d "$tmp"
067d23c9
KY
27581} ||
27582{
27583 tmp=./conf$$-$RANDOM
27584 (umask 077 && mkdir "$tmp")
a9bec17c 27585} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
067d23c9
KY
27586
27587# Set up the scripts for CONFIG_FILES section.
27588# No need to generate them if there are no CONFIG_FILES.
27589# This happens for instance with `./config.status config.h'.
27590if test -n "$CONFIG_FILES"; then
27591
27592if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
27593 ac_cs_awk_getline=:
27594 ac_cs_awk_pipe_init=
27595 ac_cs_awk_read_file='
27596 while ((getline aline < (F[key])) > 0)
27597 print(aline)
27598 close(F[key])'
27599 ac_cs_awk_pipe_fini=
27600else
27601 ac_cs_awk_getline=false
27602 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
27603 ac_cs_awk_read_file='
27604 print "|#_!!_#|"
27605 print "cat " F[key] " &&"
27606 '$ac_cs_awk_pipe_init
27607 # The final `:' finishes the AND list.
27608 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
27609fi
27610ac_cr=`echo X | tr X '\015'`
27611# On cygwin, bash can eat \r inside `` if the user requested igncr.
27612# But we know of no other shell where ac_cr would be empty at this
27613# point, so we can use a bashism as a fallback.
27614if test "x$ac_cr" = x; then
27615 eval ac_cr=\$\'\\r\'
27616fi
27617ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
27618if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
a9bec17c 27619 ac_cs_awk_cr='\r'
067d23c9
KY
27620else
27621 ac_cs_awk_cr=$ac_cr
27622fi
27623
a9bec17c 27624echo 'BEGIN {' >"$tmp/subs1.awk" &&
067d23c9
KY
27625_ACEOF
27626
27627# Create commands to substitute file output variables.
27628{
27629 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
a9bec17c 27630 echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
067d23c9
KY
27631 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
27632 echo "_ACAWK" &&
27633 echo "_ACEOF"
27634} >conf$$files.sh &&
27635. ./conf$$files.sh ||
a9bec17c 27636 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
067d23c9
KY
27637rm -f conf$$files.sh
27638
27639{
27640 echo "cat >conf$$subs.awk <<_ACEOF" &&
27641 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
27642 echo "_ACEOF"
27643} >conf$$subs.sh ||
a9bec17c
GM
27644 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
27645ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
067d23c9
KY
27646ac_delim='%!_!# '
27647for ac_last_try in false false false false false :; do
27648 . ./conf$$subs.sh ||
a9bec17c 27649 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
067d23c9
KY
27650
27651 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
27652 if test $ac_delim_n = $ac_delim_num; then
27653 break
27654 elif $ac_last_try; then
a9bec17c 27655 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
067d23c9
KY
27656 else
27657 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
27658 fi
27659done
27660rm -f conf$$subs.sh
27661
27662cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
a9bec17c 27663cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
067d23c9
KY
27664_ACEOF
27665sed -n '
27666h
27667s/^/S["/; s/!.*/"]=/
27668p
27669g
27670s/^[^!]*!//
27671:repl
27672t repl
27673s/'"$ac_delim"'$//
27674t delim
27675:nl
27676h
27677s/\(.\{148\}\)..*/\1/
27678t more1
27679s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
27680p
27681n
27682b repl
27683:more1
27684s/["\\]/\\&/g; s/^/"/; s/$/"\\/
27685p
27686g
27687s/.\{148\}//
27688t nl
27689:delim
27690h
27691s/\(.\{148\}\)..*/\1/
27692t more2
27693s/["\\]/\\&/g; s/^/"/; s/$/"/
27694p
27695b
27696:more2
27697s/["\\]/\\&/g; s/^/"/; s/$/"\\/
27698p
27699g
27700s/.\{148\}//
27701t delim
27702' <conf$$subs.awk | sed '
27703/^[^""]/{
27704 N
27705 s/\n//
27706}
27707' >>$CONFIG_STATUS || ac_write_fail=1
27708rm -f conf$$subs.awk
27709cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27710_ACAWK
a9bec17c 27711cat >>"\$tmp/subs1.awk" <<_ACAWK &&
067d23c9
KY
27712 for (key in S) S_is_set[key] = 1
27713 FS = "\a"
27714 \$ac_cs_awk_pipe_init
27715}
27716{
27717 line = $ 0
27718 nfields = split(line, field, "@")
27719 substed = 0
27720 len = length(field[1])
27721 for (i = 2; i < nfields; i++) {
27722 key = field[i]
27723 keylen = length(key)
27724 if (S_is_set[key]) {
27725 value = S[key]
27726 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
27727 len += length(value) + length(field[++i])
27728 substed = 1
27729 } else
27730 len += 1 + keylen
27731 }
27732 if (nfields == 3 && !substed) {
27733 key = field[2]
27734 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
27735 \$ac_cs_awk_read_file
27736 next
27737 }
27738 }
27739 print line
27740}
27741\$ac_cs_awk_pipe_fini
27742_ACAWK
27743_ACEOF
27744cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27745if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
27746 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
27747else
27748 cat
a9bec17c
GM
27749fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
27750 || as_fn_error "could not setup config files machinery" "$LINENO" 5
067d23c9
KY
27751_ACEOF
27752
a9bec17c
GM
27753# VPATH may cause trouble with some makes, so we remove $(srcdir),
27754# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
067d23c9
KY
27755# trailing colons and then remove the whole line if VPATH becomes empty
27756# (actually we leave an empty line to preserve line numbers).
27757if test "x$srcdir" = x.; then
a9bec17c
GM
27758 ac_vpsub='/^[ ]*VPATH[ ]*=/{
27759s/:*\$(srcdir):*/:/
27760s/:*\${srcdir}:*/:/
27761s/:*@srcdir@:*/:/
27762s/^\([^=]*=[ ]*\):*/\1/
067d23c9
KY
27763s/:*$//
27764s/^[^=]*=[ ]*$//
27765}'
27766fi
27767
27768cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27769fi # test -n "$CONFIG_FILES"
27770
27771# Set up the scripts for CONFIG_HEADERS section.
27772# No need to generate them if there are no CONFIG_HEADERS.
27773# This happens for instance with `./config.status Makefile'.
27774if test -n "$CONFIG_HEADERS"; then
a9bec17c 27775cat >"$tmp/defines.awk" <<\_ACAWK ||
067d23c9
KY
27776BEGIN {
27777_ACEOF
27778
27779# Transform confdefs.h into an awk script `defines.awk', embedded as
27780# here-document in config.status, that substitutes the proper values into
27781# config.h.in to produce config.h.
27782
27783# Create a delimiter string that does not exist in confdefs.h, to ease
27784# handling of long lines.
27785ac_delim='%!_!# '
27786for ac_last_try in false false :; do
a9bec17c
GM
27787 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
27788 if test -z "$ac_t"; then
067d23c9
KY
27789 break
27790 elif $ac_last_try; then
a9bec17c 27791 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
067d23c9
KY
27792 else
27793 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
27794 fi
27795done
27796
27797# For the awk script, D is an array of macro values keyed by name,
27798# likewise P contains macro parameters if any. Preserve backslash
27799# newline sequences.
27800
27801ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
27802sed -n '
27803s/.\{148\}/&'"$ac_delim"'/g
27804t rset
27805:rset
27806s/^[ ]*#[ ]*define[ ][ ]*/ /
27807t def
27808d
27809:def
27810s/\\$//
27811t bsnl
27812s/["\\]/\\&/g
27813s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
27814D["\1"]=" \3"/p
27815s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
27816d
27817:bsnl
27818s/["\\]/\\&/g
27819s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
27820D["\1"]=" \3\\\\\\n"\\/p
27821t cont
27822s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
27823t cont
27824d
27825:cont
27826n
27827s/.\{148\}/&'"$ac_delim"'/g
27828t clear
27829:clear
27830s/\\$//
27831t bsnlc
27832s/["\\]/\\&/g; s/^/"/; s/$/"/p
27833d
27834:bsnlc
27835s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
27836b cont
27837' <confdefs.h | sed '
27838s/'"$ac_delim"'/"\\\
27839"/g' >>$CONFIG_STATUS || ac_write_fail=1
27840
27841cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27842 for (key in D) D_is_set[key] = 1
27843 FS = "\a"
27844}
27845/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
27846 line = \$ 0
27847 split(line, arg, " ")
27848 if (arg[1] == "#") {
27849 defundef = arg[2]
27850 mac1 = arg[3]
27851 } else {
27852 defundef = substr(arg[1], 2)
27853 mac1 = arg[2]
27854 }
27855 split(mac1, mac2, "(") #)
27856 macro = mac2[1]
27857 prefix = substr(line, 1, index(line, defundef) - 1)
27858 if (D_is_set[macro]) {
27859 # Preserve the white space surrounding the "#".
27860 print prefix "define", macro P[macro] D[macro]
27861 next
27862 } else {
27863 # Replace #undef with comments. This is necessary, for example,
27864 # in the case of _POSIX_SOURCE, which is predefined and required
27865 # on some systems where configure will not decide to define it.
27866 if (defundef == "undef") {
27867 print "/*", prefix defundef, macro, "*/"
27868 next
27869 }
27870 }
27871}
27872{ print }
27873_ACAWK
27874_ACEOF
27875cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
a9bec17c 27876 as_fn_error "could not setup config headers machinery" "$LINENO" 5
067d23c9
KY
27877fi # test -n "$CONFIG_HEADERS"
27878
27879
27880eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
27881shift
27882for ac_tag
27883do
27884 case $ac_tag in
27885 :[FHLC]) ac_mode=$ac_tag; continue;;
27886 esac
27887 case $ac_mode$ac_tag in
27888 :[FHL]*:*);;
a9bec17c 27889 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
067d23c9
KY
27890 :[FH]-) ac_tag=-:-;;
27891 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
27892 esac
27893 ac_save_IFS=$IFS
27894 IFS=:
27895 set x $ac_tag
27896 IFS=$ac_save_IFS
27897 shift
27898 ac_file=$1
27899 shift
27900
27901 case $ac_mode in
27902 :L) ac_source=$1;;
27903 :[FH])
27904 ac_file_inputs=
27905 for ac_f
27906 do
27907 case $ac_f in
a9bec17c 27908 -) ac_f="$tmp/stdin";;
067d23c9
KY
27909 *) # Look for the file first in the build tree, then in the source tree
27910 # (if the path is not absolute). The absolute path cannot be DOS-style,
27911 # because $ac_f cannot contain `:'.
27912 test -f "$ac_f" ||
27913 case $ac_f in
27914 [\\/$]*) false;;
27915 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
27916 esac ||
a9bec17c 27917 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
067d23c9
KY
27918 esac
27919 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
27920 as_fn_append ac_file_inputs " '$ac_f'"
27921 done
27922
27923 # Let's still pretend it is `configure' which instantiates (i.e., don't
27924 # use $as_me), people would be surprised to read:
27925 # /* config.h. Generated by config.status. */
27926 configure_input='Generated from '`
27927 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
27928 `' by configure.'
27929 if test x"$ac_file" != x-; then
27930 configure_input="$ac_file. $configure_input"
27931 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
27932$as_echo "$as_me: creating $ac_file" >&6;}
27933 fi
27934 # Neutralize special characters interpreted by sed in replacement strings.
27935 case $configure_input in #(
27936 *\&* | *\|* | *\\* )
27937 ac_sed_conf_input=`$as_echo "$configure_input" |
27938 sed 's/[\\\\&|]/\\\\&/g'`;; #(
27939 *) ac_sed_conf_input=$configure_input;;
27940 esac
27941
27942 case $ac_tag in
a9bec17c
GM
27943 *:-:* | *:-) cat >"$tmp/stdin" \
27944 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
067d23c9
KY
27945 esac
27946 ;;
27947 esac
27948
27949 ac_dir=`$as_dirname -- "$ac_file" ||
27950$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
27951 X"$ac_file" : 'X\(//\)[^/]' \| \
27952 X"$ac_file" : 'X\(//\)$' \| \
27953 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
27954$as_echo X"$ac_file" |
27955 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
27956 s//\1/
27957 q
27958 }
27959 /^X\(\/\/\)[^/].*/{
27960 s//\1/
27961 q
27962 }
27963 /^X\(\/\/\)$/{
27964 s//\1/
27965 q
27966 }
27967 /^X\(\/\).*/{
27968 s//\1/
27969 q
27970 }
27971 s/.*/./; q'`
27972 as_dir="$ac_dir"; as_fn_mkdir_p
27973 ac_builddir=.
27974
27975case "$ac_dir" in
27976.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
27977*)
27978 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
27979 # A ".." for each directory in $ac_dir_suffix.
27980 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
27981 case $ac_top_builddir_sub in
27982 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
27983 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
27984 esac ;;
27985esac
27986ac_abs_top_builddir=$ac_pwd
27987ac_abs_builddir=$ac_pwd$ac_dir_suffix
27988# for backward compatibility:
27989ac_top_builddir=$ac_top_build_prefix
27990
27991case $srcdir in
27992 .) # We are building in place.
27993 ac_srcdir=.
27994 ac_top_srcdir=$ac_top_builddir_sub
27995 ac_abs_top_srcdir=$ac_pwd ;;
27996 [\\/]* | ?:[\\/]* ) # Absolute name.
27997 ac_srcdir=$srcdir$ac_dir_suffix;
27998 ac_top_srcdir=$srcdir
27999 ac_abs_top_srcdir=$srcdir ;;
28000 *) # Relative name.
28001 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
28002 ac_top_srcdir=$ac_top_build_prefix$srcdir
28003 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
28004esac
28005ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
28006
28007
28008 case $ac_mode in
28009 :F)
28010 #
28011 # CONFIG_FILE
28012 #
28013
28014 case $INSTALL in
28015 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
28016 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
28017 esac
743c80a7
PE
28018 ac_MKDIR_P=$MKDIR_P
28019 case $MKDIR_P in
28020 [\\/$]* | ?:[\\/]* ) ;;
28021 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
28022 esac
067d23c9
KY
28023_ACEOF
28024
28025cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
28026# If the template does not know about datarootdir, expand it.
28027# FIXME: This hack should be removed a few years after 2.60.
28028ac_datarootdir_hack=; ac_datarootdir_seen=
28029ac_sed_dataroot='
28030/datarootdir/ {
28031 p
28032 q
28033}
28034/@datadir@/p
28035/@docdir@/p
28036/@infodir@/p
28037/@localedir@/p
28038/@mandir@/p'
28039case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
28040*datarootdir*) ac_datarootdir_seen=yes;;
28041*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
28042 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
28043$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
28044_ACEOF
28045cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
28046 ac_datarootdir_hack='
28047 s&@datadir@&$datadir&g
28048 s&@docdir@&$docdir&g
28049 s&@infodir@&$infodir&g
28050 s&@localedir@&$localedir&g
28051 s&@mandir@&$mandir&g
28052 s&\\\${datarootdir}&$datarootdir&g' ;;
28053esac
28054_ACEOF
28055
28056# Neutralize VPATH when `$srcdir' = `.'.
28057# Shell code in configure.ac might set extrasub.
28058# FIXME: do we really want to maintain this feature?
28059cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
28060ac_sed_extra="$ac_vpsub
28061$extrasub
28062_ACEOF
28063cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
28064:t
28065/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
28066s|@configure_input@|$ac_sed_conf_input|;t t
28067s&@top_builddir@&$ac_top_builddir_sub&;t t
28068s&@top_build_prefix@&$ac_top_build_prefix&;t t
28069s&@srcdir@&$ac_srcdir&;t t
28070s&@abs_srcdir@&$ac_abs_srcdir&;t t
28071s&@top_srcdir@&$ac_top_srcdir&;t t
28072s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
28073s&@builddir@&$ac_builddir&;t t
28074s&@abs_builddir@&$ac_abs_builddir&;t t
28075s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
28076s&@INSTALL@&$ac_INSTALL&;t t
743c80a7 28077s&@MKDIR_P@&$ac_MKDIR_P&;t t
067d23c9
KY
28078$ac_datarootdir_hack
28079"
28080eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
28081if $ac_cs_awk_getline; then
a9bec17c 28082 $AWK -f "$tmp/subs.awk"
067d23c9 28083else
a9bec17c
GM
28084 $AWK -f "$tmp/subs.awk" | $SHELL
28085fi >$tmp/out \
28086 || as_fn_error "could not create $ac_file" "$LINENO" 5
067d23c9
KY
28087
28088test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
a9bec17c
GM
28089 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
28090 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
067d23c9 28091 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
a9bec17c 28092which seems to be undefined. Please make sure it is defined." >&5
067d23c9 28093$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
a9bec17c 28094which seems to be undefined. Please make sure it is defined." >&2;}
067d23c9 28095
a9bec17c 28096 rm -f "$tmp/stdin"
067d23c9 28097 case $ac_file in
a9bec17c
GM
28098 -) cat "$tmp/out" && rm -f "$tmp/out";;
28099 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
067d23c9 28100 esac \
a9bec17c 28101 || as_fn_error "could not create $ac_file" "$LINENO" 5
067d23c9
KY
28102 ;;
28103 :H)
28104 #
28105 # CONFIG_HEADER
28106 #
28107 if test x"$ac_file" != x-; then
28108 {
28109 $as_echo "/* $configure_input */" \
a9bec17c
GM
28110 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
28111 } >"$tmp/config.h" \
28112 || as_fn_error "could not create $ac_file" "$LINENO" 5
28113 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
067d23c9
KY
28114 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
28115$as_echo "$as_me: $ac_file is unchanged" >&6;}
28116 else
28117 rm -f "$ac_file"
a9bec17c
GM
28118 mv "$tmp/config.h" "$ac_file" \
28119 || as_fn_error "could not create $ac_file" "$LINENO" 5
067d23c9
KY
28120 fi
28121 else
28122 $as_echo "/* $configure_input */" \
a9bec17c
GM
28123 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
28124 || as_fn_error "could not create -" "$LINENO" 5
067d23c9 28125 fi
743c80a7
PE
28126# Compute "$ac_file"'s index in $config_headers.
28127_am_arg="$ac_file"
28128_am_stamp_count=1
28129for _am_header in $config_headers :; do
28130 case $_am_header in
28131 $_am_arg | $_am_arg:* )
28132 break ;;
28133 * )
28134 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
28135 esac
28136done
28137echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
28138$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
28139 X"$_am_arg" : 'X\(//\)[^/]' \| \
28140 X"$_am_arg" : 'X\(//\)$' \| \
28141 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
28142$as_echo X"$_am_arg" |
28143 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28144 s//\1/
28145 q
28146 }
28147 /^X\(\/\/\)[^/].*/{
28148 s//\1/
28149 q
28150 }
28151 /^X\(\/\/\)$/{
28152 s//\1/
28153 q
28154 }
28155 /^X\(\/\).*/{
28156 s//\1/
28157 q
28158 }
28159 s/.*/./; q'`/stamp-h$_am_stamp_count
067d23c9
KY
28160 ;;
28161
28162 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
28163$as_echo "$as_me: executing $ac_file commands" >&6;}
28164 ;;
28165 esac
28166
28167
28168 case $ac_file$ac_mode in
743c80a7
PE
28169 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
28170 # Autoconf 2.62 quotes --file arguments for eval, but not when files
28171 # are listed without --file. Let's play safe and only enable the eval
28172 # if we detect the quoting.
28173 case $CONFIG_FILES in
28174 *\'*) eval set x "$CONFIG_FILES" ;;
28175 *) set x $CONFIG_FILES ;;
28176 esac
28177 shift
28178 for mf
28179 do
28180 # Strip MF so we end up with the name of the file.
28181 mf=`echo "$mf" | sed -e 's/:.*$//'`
28182 # Check whether this is an Automake generated Makefile or not.
28183 # We used to match only the files named `Makefile.in', but
28184 # some people rename them; so instead we look at the file content.
28185 # Grep'ing the first line is not enough: some people post-process
28186 # each Makefile.in and add a new line on top of each file to say so.
28187 # Grep'ing the whole file is not good either: AIX grep has a line
28188 # limit of 2048, but all sed's we know have understand at least 4000.
28189 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
28190 dirpart=`$as_dirname -- "$mf" ||
28191$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
28192 X"$mf" : 'X\(//\)[^/]' \| \
28193 X"$mf" : 'X\(//\)$' \| \
28194 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
28195$as_echo X"$mf" |
28196 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28197 s//\1/
28198 q
28199 }
28200 /^X\(\/\/\)[^/].*/{
28201 s//\1/
28202 q
28203 }
28204 /^X\(\/\/\)$/{
28205 s//\1/
28206 q
28207 }
28208 /^X\(\/\).*/{
28209 s//\1/
28210 q
28211 }
28212 s/.*/./; q'`
28213 else
28214 continue
28215 fi
28216 # Extract the definition of DEPDIR, am__include, and am__quote
28217 # from the Makefile without running `make'.
28218 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
28219 test -z "$DEPDIR" && continue
28220 am__include=`sed -n 's/^am__include = //p' < "$mf"`
28221 test -z "am__include" && continue
28222 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
28223 # When using ansi2knr, U may be empty or an underscore; expand it
28224 U=`sed -n 's/^U = //p' < "$mf"`
28225 # Find all dependency output files, they are included files with
28226 # $(DEPDIR) in their names. We invoke sed twice because it is the
28227 # simplest approach to changing $(DEPDIR) to its actual value in the
28228 # expansion.
28229 for file in `sed -n "
28230 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
28231 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
28232 # Make sure the directory exists.
28233 test -f "$dirpart/$file" && continue
28234 fdir=`$as_dirname -- "$file" ||
28235$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
28236 X"$file" : 'X\(//\)[^/]' \| \
28237 X"$file" : 'X\(//\)$' \| \
28238 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
28239$as_echo X"$file" |
28240 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28241 s//\1/
28242 q
28243 }
28244 /^X\(\/\/\)[^/].*/{
28245 s//\1/
28246 q
28247 }
28248 /^X\(\/\/\)$/{
28249 s//\1/
28250 q
28251 }
28252 /^X\(\/\).*/{
28253 s//\1/
28254 q
28255 }
28256 s/.*/./; q'`
28257 as_dir=$dirpart/$fdir; as_fn_mkdir_p
28258 # echo "creating $dirpart/$file"
28259 echo '# dummy' > "$dirpart/$file"
28260 done
28261 done
28262}
28263 ;;
9411886d 28264 "mkdirs":C)
067d23c9
KY
28265for dir in etc lisp ; do
28266 test -d ${dir} || mkdir ${dir}
28267done
9411886d
PE
28268 ;;
28269 "epaths":C)
067d23c9 28270echo creating src/epaths.h
906debc3 28271${MAKE-make} MAKEFILE_NAME=do-not-make-Makefile epaths-force
9411886d
PE
28272 ;;
28273 "gdbinit":C)
b5591ebb 28274if test ! -f src/.gdbinit && test -f "$srcdir/src/.gdbinit"; then
067d23c9 28275 echo creating src/.gdbinit
b5591ebb 28276 echo "source $srcdir/src/.gdbinit" > src/.gdbinit
067d23c9 28277fi
067d23c9
KY
28278 ;;
28279
28280 esac
28281done # for ac_tag
28282
28283
28284as_fn_exit 0
28285_ACEOF
28286ac_clean_files=$ac_clean_files_save
28287
28288test $ac_write_fail = 0 ||
a9bec17c 28289 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
067d23c9
KY
28290
28291
28292# configure is writing to config.log, and then calls config.status.
28293# config.status does its own redirection, appending to config.log.
28294# Unfortunately, on DOS this fails, as config.log is still kept open
28295# by configure, so config.status won't be able to write to it; its
28296# output is simply discarded. So we exec the FD to /dev/null,
28297# effectively closing config.log, so it can be properly (re)opened and
28298# appended to by config.status. When coming back to configure, we
28299# need to make the FD available again.
28300if test "$no_create" != yes; then
28301 ac_cs_success=:
28302 ac_config_status_args=
28303 test "$silent" = yes &&
28304 ac_config_status_args="$ac_config_status_args --quiet"
28305 exec 5>/dev/null
28306 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
28307 exec 5>>config.log
28308 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
28309 # would make configure fail if this is the last instruction.
a9bec17c 28310 $ac_cs_success || as_fn_exit $?
067d23c9
KY
28311fi
28312if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
28313 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
28314$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
28315fi
28316