mouse.el comment
[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
KY
608LIB_GCC
609LD_FIRSTFLAG
610LD_SWITCH_SYSTEM_TEMACS
743c80a7
PE
611LIBGNU_LTLIBDEPS
612LIBGNU_LIBDEPS
613gltests_WITNESS
710f5812
GM
614gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_FALSE
615gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_TRUE
6d153f56
GM
616gl_GNULIB_ENABLED_verify_FALSE
617gl_GNULIB_ENABLED_verify_TRUE
618gl_GNULIB_ENABLED_strtoull_FALSE
619gl_GNULIB_ENABLED_strtoull_TRUE
3e0be4ab
GM
620gl_GNULIB_ENABLED_strtoll_FALSE
621gl_GNULIB_ENABLED_strtoll_TRUE
6d153f56
GM
622gl_GNULIB_ENABLED_stat_FALSE
623gl_GNULIB_ENABLED_stat_TRUE
710f5812
GM
624gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_FALSE
625gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_TRUE
a0a61e58
GM
626gl_GNULIB_ENABLED_pathmax_FALSE
627gl_GNULIB_ENABLED_pathmax_TRUE
d7ad186c
GM
628gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_FALSE
629gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_TRUE
710f5812
GM
630gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_FALSE
631gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_TRUE
6d153f56
GM
632gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE
633gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE
710f5812
GM
634gl_GNULIB_ENABLED_getgroups_FALSE
635gl_GNULIB_ENABLED_getgroups_TRUE
636gl_GNULIB_ENABLED_euidaccess_FALSE
637gl_GNULIB_ENABLED_euidaccess_TRUE
6d153f56
GM
638gl_GNULIB_ENABLED_dosname_FALSE
639gl_GNULIB_ENABLED_dosname_TRUE
d7ad186c
GM
640gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_FALSE
641gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_TRUE
6d153f56
GM
642LTLIBINTL
643LIBINTL
710f5812 644LIB_EACCESS
f199cab1 645WINDOWS_64_BIT_OFF_T
e275c824
PE
646HAVE_UNISTD_H
647NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
648NEXT_UNISTD_H
f077f61d 649LIB_TIMER_TIME
1fd182f0
PE
650PTHREAD_H_DEFINES_STRUCT_TIMESPEC
651SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
652TIME_H_DEFINES_STRUCT_TIMESPEC
653NEXT_AS_FIRST_DIRECTIVE_TIME_H
654NEXT_TIME_H
0eb775a3 655WINDOWS_64_BIT_ST_SIZE
5fa4ac76
PE
656NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
657NEXT_SYS_STAT_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
4fda9c95
GM
822NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H
823NEXT_INTTYPES_H
824UINT64_MAX_EQ_ULONG_MAX
825UINT32_MAX_LT_UINTMAX_MAX
826PRIPTR_PREFIX
827PRI_MACROS_BROKEN
828INT64_MAX_EQ_LONG_MAX
829INT32_MAX_LT_INTMAX_MAX
0eb775a3 830REPLACE_STRTOIMAX
4fda9c95
GM
831HAVE_DECL_STRTOUMAX
832HAVE_DECL_STRTOIMAX
833HAVE_DECL_IMAXDIV
834HAVE_DECL_IMAXABS
835GNULIB_STRTOUMAX
836GNULIB_STRTOIMAX
837GNULIB_IMAXDIV
838GNULIB_IMAXABS
839GL_GENERATE_STDINT_H_FALSE
840GL_GENERATE_STDINT_H_TRUE
841STDINT_H
842WINT_T_SUFFIX
843WCHAR_T_SUFFIX
844SIG_ATOMIC_T_SUFFIX
845SIZE_T_SUFFIX
846PTRDIFF_T_SUFFIX
847HAVE_SIGNED_WINT_T
848HAVE_SIGNED_WCHAR_T
849HAVE_SIGNED_SIG_ATOMIC_T
850BITSIZEOF_WINT_T
851BITSIZEOF_WCHAR_T
852BITSIZEOF_SIG_ATOMIC_T
853BITSIZEOF_SIZE_T
854BITSIZEOF_PTRDIFF_T
855APPLE_UNIVERSAL_BUILD
856HAVE_SYS_BITYPES_H
857HAVE_SYS_INTTYPES_H
858HAVE_STDINT_H
859NEXT_AS_FIRST_DIRECTIVE_STDINT_H
860NEXT_STDINT_H
861HAVE_SYS_TYPES_H
862HAVE_INTTYPES_H
863HAVE_WCHAR_H
864HAVE_UNSIGNED_LONG_LONG_INT
865HAVE_LONG_LONG_INT
f199cab1
GM
866HAVE_WINSOCK2_H
867NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
868NEXT_SYS_TIME_H
869REPLACE_STRUCT_TIMEVAL
870REPLACE_GETTIMEOFDAY
871HAVE_SYS_TIME_H
872HAVE_STRUCT_TIMEVAL
873HAVE_GETTIMEOFDAY
874GNULIB_GETTIMEOFDAY
0eb775a3 875GNULIB_GL_UNISTD_H_GETOPT
e275c824
PE
876GETOPT_H
877HAVE_GETOPT_H
878NEXT_AS_FIRST_DIRECTIVE_GETOPT_H
879NEXT_GETOPT_H
7d2a1c5e
GM
880GETLOADAVG_LIBS
881REPLACE_WCTOMB
882REPLACE_UNSETENV
883REPLACE_STRTOD
884REPLACE_SETENV
885REPLACE_REALPATH
886REPLACE_REALLOC
0eb775a3 887REPLACE_RANDOM_R
7d2a1c5e 888REPLACE_PUTENV
0eb775a3 889REPLACE_PTSNAME_R
b6c9d18d 890REPLACE_PTSNAME
7d2a1c5e
GM
891REPLACE_MKSTEMP
892REPLACE_MBTOWC
893REPLACE_MALLOC
894REPLACE_CANONICALIZE_FILE_NAME
895REPLACE_CALLOC
896HAVE_DECL_UNSETENV
897HAVE_UNLOCKPT
898HAVE_SYS_LOADAVG_H
899HAVE_STRUCT_RANDOM_DATA
900HAVE_STRTOULL
901HAVE_STRTOLL
902HAVE_STRTOD
903HAVE_DECL_SETENV
904HAVE_SETENV
905HAVE_RPMATCH
906HAVE_REALPATH
907HAVE_RANDOM_R
908HAVE_RANDOM_H
0eb775a3
GM
909HAVE_RANDOM
910HAVE_PTSNAME_R
7d2a1c5e 911HAVE_PTSNAME
0eb775a3 912HAVE_POSIX_OPENPT
7d2a1c5e
GM
913HAVE_MKSTEMPS
914HAVE_MKSTEMP
915HAVE_MKOSTEMPS
916HAVE_MKOSTEMP
917HAVE_MKDTEMP
918HAVE_GRANTPT
919HAVE_GETSUBOPT
920HAVE_DECL_GETLOADAVG
921HAVE_CANONICALIZE_FILE_NAME
922HAVE_ATOLL
923HAVE__EXIT
924GNULIB_WCTOMB
925GNULIB_UNSETENV
926GNULIB_UNLOCKPT
927GNULIB_SYSTEM_POSIX
928GNULIB_STRTOULL
929GNULIB_STRTOLL
930GNULIB_STRTOD
931GNULIB_SETENV
932GNULIB_RPMATCH
933GNULIB_REALPATH
934GNULIB_REALLOC_POSIX
935GNULIB_RANDOM_R
0eb775a3 936GNULIB_RANDOM
7d2a1c5e 937GNULIB_PUTENV
0eb775a3 938GNULIB_PTSNAME_R
7d2a1c5e 939GNULIB_PTSNAME
0eb775a3 940GNULIB_POSIX_OPENPT
7d2a1c5e
GM
941GNULIB_MKSTEMPS
942GNULIB_MKSTEMP
943GNULIB_MKOSTEMPS
944GNULIB_MKOSTEMP
945GNULIB_MKDTEMP
946GNULIB_MBTOWC
947GNULIB_MALLOC_POSIX
948GNULIB_GRANTPT
949GNULIB_GETSUBOPT
950GNULIB_GETLOADAVG
951GNULIB_CANONICALIZE_FILE_NAME
952GNULIB_CALLOC_POSIX
953GNULIB_ATOLL
954GNULIB__EXIT
d7ad186c
GM
955REPLACE_UTIMENSAT
956REPLACE_STAT
957REPLACE_MKNOD
958REPLACE_MKFIFO
959REPLACE_MKDIR
960REPLACE_LSTAT
961REPLACE_FUTIMENS
962REPLACE_FSTATAT
963REPLACE_FSTAT
964HAVE_UTIMENSAT
965HAVE_MKNODAT
966HAVE_MKNOD
967HAVE_MKFIFOAT
968HAVE_MKFIFO
969HAVE_MKDIRAT
970HAVE_LSTAT
971HAVE_LCHMOD
972HAVE_FUTIMENS
973HAVE_FSTATAT
974HAVE_FCHMODAT
975GNULIB_UTIMENSAT
976GNULIB_STAT
977GNULIB_MKNODAT
978GNULIB_MKNOD
979GNULIB_MKFIFOAT
980GNULIB_MKFIFO
981GNULIB_MKDIRAT
982GNULIB_LSTAT
983GNULIB_LCHMOD
984GNULIB_FUTIMENS
985GNULIB_FSTATAT
986GNULIB_FSTAT
987GNULIB_FCHMODAT
710f5812
GM
988NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
989NEXT_FCNTL_H
710f5812
GM
990REPLACE_OPENAT
991REPLACE_OPEN
992REPLACE_FCNTL
993HAVE_OPENAT
994HAVE_FCNTL
995GNULIB_OPENAT
996GNULIB_OPEN
997GNULIB_NONBLOCKING
998GNULIB_FCNTL
8966cbff
GM
999GL_GENERATE_EXECINFO_H_FALSE
1000GL_GENERATE_EXECINFO_H_TRUE
1001LIB_EXECINFO
1002EXECINFO_H
d7ad186c
GM
1003HAVE_DIRENT_H
1004NEXT_AS_FIRST_DIRECTIVE_DIRENT_H
1005NEXT_DIRENT_H
1006PRAGMA_COLUMNS
1007PRAGMA_SYSTEM_HEADER
1008INCLUDE_NEXT_AS_FIRST_DIRECTIVE
1009INCLUDE_NEXT
1010REPLACE_FDOPENDIR
1011REPLACE_DIRFD
1012REPLACE_CLOSEDIR
1013REPLACE_OPENDIR
1014HAVE_ALPHASORT
1015HAVE_SCANDIR
1016HAVE_FDOPENDIR
1017HAVE_DECL_FDOPENDIR
1018HAVE_DECL_DIRFD
1019HAVE_CLOSEDIR
1020HAVE_REWINDDIR
1021HAVE_READDIR
1022HAVE_OPENDIR
1023GNULIB_ALPHASORT
1024GNULIB_SCANDIR
1025GNULIB_FDOPENDIR
1026GNULIB_DIRFD
1027GNULIB_CLOSEDIR
1028GNULIB_REWINDDIR
1029GNULIB_READDIR
1030GNULIB_OPENDIR
e275c824
PE
1031UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1032UNISTD_H_HAVE_WINSOCK2_H
1033REPLACE_WRITE
1034REPLACE_USLEEP
1035REPLACE_UNLINKAT
1036REPLACE_UNLINK
1037REPLACE_TTYNAME_R
1038REPLACE_SYMLINK
1039REPLACE_SLEEP
1040REPLACE_RMDIR
1041REPLACE_READLINK
ca36e0ff 1042REPLACE_READ
e275c824
PE
1043REPLACE_PWRITE
1044REPLACE_PREAD
1045REPLACE_LSEEK
1046REPLACE_LINKAT
1047REPLACE_LINK
1048REPLACE_LCHOWN
0eb775a3 1049REPLACE_ISATTY
e275c824
PE
1050REPLACE_GETPAGESIZE
1051REPLACE_GETGROUPS
1052REPLACE_GETLOGIN_R
1053REPLACE_GETDOMAINNAME
1054REPLACE_GETCWD
0eb775a3 1055REPLACE_FTRUNCATE
e275c824
PE
1056REPLACE_FCHOWNAT
1057REPLACE_DUP2
1058REPLACE_DUP
1059REPLACE_CLOSE
1060REPLACE_CHOWN
1061HAVE_SYS_PARAM_H
1062HAVE_OS_H
1063HAVE_DECL_TTYNAME_R
0eb775a3 1064HAVE_DECL_SETHOSTNAME
e275c824
PE
1065HAVE_DECL_GETUSERSHELL
1066HAVE_DECL_GETPAGESIZE
1067HAVE_DECL_GETLOGIN_R
1068HAVE_DECL_GETDOMAINNAME
2b1928b8 1069HAVE_DECL_FDATASYNC
e275c824
PE
1070HAVE_DECL_FCHDIR
1071HAVE_DECL_ENVIRON
1072HAVE_USLEEP
1073HAVE_UNLINKAT
1074HAVE_SYMLINKAT
1075HAVE_SYMLINK
1076HAVE_SLEEP
0eb775a3 1077HAVE_SETHOSTNAME
e275c824
PE
1078HAVE_READLINKAT
1079HAVE_READLINK
1080HAVE_PWRITE
1081HAVE_PREAD
1082HAVE_PIPE2
1083HAVE_PIPE
1084HAVE_LINKAT
1085HAVE_LINK
1086HAVE_LCHOWN
da6c8463 1087HAVE_GROUP_MEMBER
e275c824
PE
1088HAVE_GETPAGESIZE
1089HAVE_GETLOGIN
1090HAVE_GETHOSTNAME
1091HAVE_GETGROUPS
1092HAVE_GETDTABLESIZE
1093HAVE_FTRUNCATE
1094HAVE_FSYNC
2b1928b8 1095HAVE_FDATASYNC
e275c824
PE
1096HAVE_FCHOWNAT
1097HAVE_FCHDIR
1098HAVE_FACCESSAT
1099HAVE_EUIDACCESS
1100HAVE_DUP3
1101HAVE_DUP2
1102HAVE_CHOWN
1103GNULIB_WRITE
1104GNULIB_USLEEP
1105GNULIB_UNLINKAT
1106GNULIB_UNLINK
1107GNULIB_UNISTD_H_SIGPIPE
ca36e0ff 1108GNULIB_UNISTD_H_NONBLOCKING
e275c824
PE
1109GNULIB_TTYNAME_R
1110GNULIB_SYMLINKAT
1111GNULIB_SYMLINK
1112GNULIB_SLEEP
0eb775a3 1113GNULIB_SETHOSTNAME
e275c824
PE
1114GNULIB_RMDIR
1115GNULIB_READLINKAT
1116GNULIB_READLINK
ca36e0ff 1117GNULIB_READ
e275c824
PE
1118GNULIB_PWRITE
1119GNULIB_PREAD
1120GNULIB_PIPE2
1121GNULIB_PIPE
1122GNULIB_LSEEK
1123GNULIB_LINKAT
1124GNULIB_LINK
1125GNULIB_LCHOWN
0eb775a3 1126GNULIB_ISATTY
da6c8463 1127GNULIB_GROUP_MEMBER
e275c824
PE
1128GNULIB_GETUSERSHELL
1129GNULIB_GETPAGESIZE
1130GNULIB_GETLOGIN_R
1131GNULIB_GETLOGIN
1132GNULIB_GETHOSTNAME
1133GNULIB_GETGROUPS
1134GNULIB_GETDTABLESIZE
1135GNULIB_GETDOMAINNAME
1136GNULIB_GETCWD
1137GNULIB_FTRUNCATE
1138GNULIB_FSYNC
2b1928b8 1139GNULIB_FDATASYNC
e275c824
PE
1140GNULIB_FCHOWNAT
1141GNULIB_FCHDIR
1142GNULIB_FACCESSAT
1143GNULIB_EUIDACCESS
1144GNULIB_ENVIRON
1145GNULIB_DUP3
1146GNULIB_DUP2
2b1928b8 1147GNULIB_DUP
e275c824
PE
1148GNULIB_CLOSE
1149GNULIB_CHOWN
2b1928b8 1150GNULIB_CHDIR
f199cab1 1151LIB_CLOCK_GETTIME
4fc2b746
GM
1152GL_GENERATE_ALLOCA_H_FALSE
1153GL_GENERATE_ALLOCA_H_TRUE
1154ALLOCA_H
1155ALLOCA
743c80a7
PE
1156GL_COND_LIBTOOL_FALSE
1157GL_COND_LIBTOOL_TRUE
5476a9a4
GM
1158POST_ALLOC_OBJ
1159PRE_ALLOC_OBJ
1160CYGWIN_OBJ
1161RALLOC_OBJ
1162OLDXMENU_DEPS
1163LIBX_OTHER
1164LIBXMENU
1165OLDXMENU
1166OLDXMENU_TARGET
1167LIBXT_OTHER
1168TOOLKIT_LIBW
1169WIDGET_OBJ
1170XOBJ
1171XMENU_OBJ
1172FONT_OBJ
1173OTHER_FILES
1174GNU_OBJC_CFLAGS
1175ns_appsrc
1176ns_appresdir
1177ns_appbindir
1178ns_appdir
5476a9a4
GM
1179X_TOOLKIT_TYPE
1180GNUSTEP_CFLAGS
1181C_SWITCH_X_SITE
1182LD_SWITCH_X_SITE
1183gameuser
1184gamedir
1185bitmapdir
1186archlibdir
1187etcdir
1188x_default_search_path
1189lisppath
1190locallisppath
1191standardlisppath
1192leimdir
1193lispdir
1194srcdir
1195canonical
1196configuration
1197version
bb7dce39 1198copyright
5476a9a4
GM
1199KRB4LIB
1200DESLIB
1201KRB5LIB
1202CRYPTOLIB
1203COM_ERRLIB
1204LIBRESOLV
1205LIBHESIOD
1206TERMCAP_OBJ
1207LIBS_TERMCAP
1208BLESSMAIL_TARGET
1209LIBS_MAIL
1210liblockfile
1211LIBXML2_LIBS
1212LIBXML2_CFLAGS
1213LIBXSM
1214LIBGPM
1215LIBGIF
1216LIBTIFF
1217LIBPNG
1218LIBJPEG
1219LIBXPM
1220M17N_FLT_LIBS
1221M17N_FLT_CFLAGS
1222LIBOTF_LIBS
1223LIBOTF_CFLAGS
1224FREETYPE_LIBS
1225FREETYPE_CFLAGS
1226XFT_LIBS
1227XFT_CFLAGS
1228FONTCONFIG_LIBS
1229FONTCONFIG_CFLAGS
1230LIBXMU
1231LIBXTR6
4cc63c81 1232LIBACL_LIBS
5476a9a4
GM
1233LIBGNUTLS_LIBS
1234LIBGNUTLS_CFLAGS
1235LIBSELINUX_LIBS
1236SETTINGS_LIBS
1237SETTINGS_CFLAGS
dcde497f
GM
1238GOBJECT_LIBS
1239GOBJECT_CFLAGS
5476a9a4
GM
1240GCONF_LIBS
1241GCONF_CFLAGS
1242GSETTINGS_LIBS
1243GSETTINGS_CFLAGS
1244DBUS_OBJ
1245DBUS_LIBS
1246DBUS_CFLAGS
1247GTK_OBJ
1248GTK_LIBS
1249GTK_CFLAGS
1250IMAGEMAGICK_LIBS
1251IMAGEMAGICK_CFLAGS
1252RSVG_LIBS
1253RSVG_CFLAGS
1254LIB_PTHREAD
1255VMLIMIT_OBJ
1256GMALLOC_OBJ
1257HAVE_XSERVER
b5eb356a
GM
1258W32_RES_LINK
1259W32_RES
5c0255d9
GM
1260W32_LIBS
1261W32_OBJ
b5eb356a 1262WINDRES
5476a9a4
GM
1263LIB_STANDARD
1264NS_OBJC_OBJ
1265NS_OBJ
1266ns_self_contained
1267INSTALL_ARCH_INDEP_EXTRA
4efe5ef9 1268LIBS_GNUSTEP
5476a9a4
GM
1269LD_SWITCH_X_SITE_RPATH
1270XMKMF
1271DEPFLAGS
1272MKDEPDIR
1273CFLAGS_SOUND
1274ALSA_LIBS
1275ALSA_CFLAGS
1276LIBSOUND
1277PKG_CONFIG
130f1dac 1278CRT_DIR
067d23c9
KY
1279START_FILES
1280LIB_MATH
067d23c9
KY
1281LIBS_SYSTEM
1282C_SWITCH_SYSTEM
1283UNEXEC_OBJ
1284C_SWITCH_MACHINE
1285LD_SWITCH_SYSTEM
1286CANNOT_DUMP
141d074d
GM
1287INFO_OPTS
1288INFO_EXT
96f129d5 1289HAVE_MAKEINFO
9c29597b 1290PAXCTL
067d23c9
KY
1291GZIP_PROG
1292INSTALL_INFO
0e733db9 1293LN_S
a6b92a4a 1294GNULIB_WARN_CFLAGS
0eb775a3 1295WARN_CFLAGS
a6b92a4a 1296WERROR_CFLAGS
369e19fc
PE
1297RANLIB
1298ARFLAGS
1299AR
067d23c9
KY
1300EGREP
1301GREP
1302CPP
743c80a7
PE
1303am__fastdepCC_FALSE
1304am__fastdepCC_TRUE
1305CCDEPMODE
1306AMDEPBACKSLASH
1307AMDEP_FALSE
1308AMDEP_TRUE
1309am__quote
1310am__include
1311DEPDIR
067d23c9
KY
1312OBJEXT
1313EXEEXT
1314ac_ct_CC
1315CPPFLAGS
1316LDFLAGS
1317CFLAGS
1318CC
1319host_os
1320host_vendor
1321host_cpu
1322host
1323build_os
1324build_vendor
1325build_cpu
1326build
1327PROFILING_CFLAGS
067d23c9 1328GZIP_INFO
c3a461a5 1329cache_file
743c80a7
PE
1330am__untar
1331am__tar
1332AMTAR
1333am__leading_dot
1334SET_MAKE
1335AWK
1336mkdir_p
1337MKDIR_P
1338INSTALL_STRIP_PROGRAM
1339STRIP
1340install_sh
1341MAKEINFO
1342AUTOHEADER
1343AUTOMAKE
1344AUTOCONF
1345ACLOCAL
1346VERSION
1347PACKAGE
1348CYGPATH_W
1349am__isrc
1350INSTALL_DATA
1351INSTALL_SCRIPT
1352INSTALL_PROGRAM
067d23c9
KY
1353target_alias
1354host_alias
1355build_alias
1356LIBS
1357ECHO_T
1358ECHO_N
1359ECHO_C
1360DEFS
1361mandir
1362localedir
1363libdir
1364psdir
1365pdfdir
1366dvidir
1367htmldir
1368infodir
1369docdir
1370oldincludedir
1371includedir
1372localstatedir
1373sharedstatedir
1374sysconfdir
1375datadir
1376datarootdir
1377libexecdir
1378sbindir
1379bindir
1380program_transform_name
1381prefix
1382exec_prefix
1383PACKAGE_URL
1384PACKAGE_BUGREPORT
1385PACKAGE_STRING
1386PACKAGE_VERSION
1387PACKAGE_TARNAME
1388PACKAGE_NAME
1389PATH_SEPARATOR
1390SHELL'
1391ac_subst_files='deps_frag
bb7dce39 1392lisp_frag'
067d23c9
KY
1393ac_user_opts='
1394enable_option_checking
ee77919d 1395with_all
067d23c9
KY
1396with_pop
1397with_kerberos
1398with_kerberos5
1399with_hesiod
1400with_mmdf
1401with_mail_unlink
1402with_mailhost
1403with_sound
067d23c9 1404with_x_toolkit
0442dc7f 1405with_wide_int
067d23c9
KY
1406with_xpm
1407with_jpeg
1408with_tiff
1409with_gif
1410with_png
1411with_rsvg
1412with_xml2
1413with_imagemagick
1414with_xft
1415with_libotf
1416with_m17n_flt
1417with_toolkit_scroll_bars
1418with_xaw3d
1419with_xim
1420with_ns
5c0255d9 1421with_w32
067d23c9
KY
1422with_gpm
1423with_dbus
1424with_gconf
f527bd02 1425with_gsettings
067d23c9 1426with_selinux
4cc63c81 1427with_acl
067d23c9 1428with_gnutls
b5eb356a 1429with_inotify
067d23c9
KY
1430with_makeinfo
1431with_compress_info
1432with_pkg_config_prog
1433with_crt_dir
4fc5868a 1434with_gameuser
067d23c9
KY
1435with_gnustep_conf
1436enable_ns_self_contained
067d23c9
KY
1437enable_locallisppath
1438enable_checking
afd07e01 1439enable_check_lisp_object_type
067d23c9
KY
1440enable_profiling
1441enable_autodepend
4efe5ef9 1442enable_gtk_deprecation_warnings
743c80a7 1443enable_dependency_tracking
067d23c9 1444enable_largefile
a6b92a4a 1445enable_gcc_warnings
e4d35030 1446enable_link_time_optimization
067d23c9
KY
1447with_x
1448'
1449 ac_precious_vars='build_alias
1450host_alias
1451target_alias
1452CC
1453CFLAGS
1454LDFLAGS
1455LIBS
1456CPPFLAGS
1457CPP
1458XMKMF'
1459
1460
1461# Initialize some variables set by options.
1462ac_init_help=
1463ac_init_version=false
1464ac_unrecognized_opts=
1465ac_unrecognized_sep=
1466# The variables have the same names as the options, with
1467# dashes changed to underlines.
1468cache_file=/dev/null
1469exec_prefix=NONE
1470no_create=
1471no_recursion=
1472prefix=NONE
1473program_prefix=NONE
1474program_suffix=NONE
1475program_transform_name=s,x,x,
1476silent=
1477site=
1478srcdir=
1479verbose=
1480x_includes=NONE
1481x_libraries=NONE
1482
1483# Installation directory options.
1484# These are left unexpanded so users can "make install exec_prefix=/foo"
1485# and all the variables that are supposed to be based on exec_prefix
1486# by default will actually change.
1487# Use braces instead of parens because sh, perl, etc. also accept them.
1488# (The list follows the same order as the GNU Coding Standards.)
1489bindir='${exec_prefix}/bin'
1490sbindir='${exec_prefix}/sbin'
1491libexecdir='${exec_prefix}/libexec'
1492datarootdir='${prefix}/share'
1493datadir='${datarootdir}'
1494sysconfdir='${prefix}/etc'
1495sharedstatedir='${prefix}/com'
1496localstatedir='${prefix}/var'
1497includedir='${prefix}/include'
1498oldincludedir='/usr/include'
1499docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1500infodir='${datarootdir}/info'
1501htmldir='${docdir}'
1502dvidir='${docdir}'
1503pdfdir='${docdir}'
1504psdir='${docdir}'
1505libdir='${exec_prefix}/lib'
1506localedir='${datarootdir}/locale'
1507mandir='${datarootdir}/man'
1508
1509ac_prev=
1510ac_dashdash=
1511for ac_option
1512do
1513 # If the previous option needs an argument, assign it.
1514 if test -n "$ac_prev"; then
1515 eval $ac_prev=\$ac_option
1516 ac_prev=
1517 continue
1518 fi
1519
1520 case $ac_option in
a9bec17c
GM
1521 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1522 *) ac_optarg=yes ;;
067d23c9
KY
1523 esac
1524
1525 # Accept the important Cygnus configure options, so we can diagnose typos.
1526
1527 case $ac_dashdash$ac_option in
1528 --)
1529 ac_dashdash=yes ;;
1530
1531 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1532 ac_prev=bindir ;;
1533 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1534 bindir=$ac_optarg ;;
1535
1536 -build | --build | --buil | --bui | --bu)
1537 ac_prev=build_alias ;;
1538 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1539 build_alias=$ac_optarg ;;
1540
1541 -cache-file | --cache-file | --cache-fil | --cache-fi \
1542 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1543 ac_prev=cache_file ;;
1544 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1545 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1546 cache_file=$ac_optarg ;;
1547
1548 --config-cache | -C)
1549 cache_file=config.cache ;;
1550
1551 -datadir | --datadir | --datadi | --datad)
1552 ac_prev=datadir ;;
1553 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1554 datadir=$ac_optarg ;;
1555
1556 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1557 | --dataroo | --dataro | --datar)
1558 ac_prev=datarootdir ;;
1559 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1560 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1561 datarootdir=$ac_optarg ;;
1562
1563 -disable-* | --disable-*)
1564 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1565 # Reject names that are not valid shell variable names.
1566 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
a9bec17c 1567 as_fn_error "invalid feature name: $ac_useropt"
067d23c9
KY
1568 ac_useropt_orig=$ac_useropt
1569 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1570 case $ac_user_opts in
1571 *"
1572"enable_$ac_useropt"
1573"*) ;;
1574 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1575 ac_unrecognized_sep=', ';;
1576 esac
1577 eval enable_$ac_useropt=no ;;
1578
1579 -docdir | --docdir | --docdi | --doc | --do)
1580 ac_prev=docdir ;;
1581 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1582 docdir=$ac_optarg ;;
1583
1584 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1585 ac_prev=dvidir ;;
1586 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1587 dvidir=$ac_optarg ;;
1588
1589 -enable-* | --enable-*)
1590 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1591 # Reject names that are not valid shell variable names.
1592 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
a9bec17c 1593 as_fn_error "invalid feature name: $ac_useropt"
067d23c9
KY
1594 ac_useropt_orig=$ac_useropt
1595 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1596 case $ac_user_opts in
1597 *"
1598"enable_$ac_useropt"
1599"*) ;;
1600 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1601 ac_unrecognized_sep=', ';;
1602 esac
1603 eval enable_$ac_useropt=\$ac_optarg ;;
1604
1605 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1606 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1607 | --exec | --exe | --ex)
1608 ac_prev=exec_prefix ;;
1609 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1610 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1611 | --exec=* | --exe=* | --ex=*)
1612 exec_prefix=$ac_optarg ;;
1613
1614 -gas | --gas | --ga | --g)
1615 # Obsolete; use --with-gas.
1616 with_gas=yes ;;
1617
1618 -help | --help | --hel | --he | -h)
1619 ac_init_help=long ;;
1620 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1621 ac_init_help=recursive ;;
1622 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1623 ac_init_help=short ;;
1624
1625 -host | --host | --hos | --ho)
1626 ac_prev=host_alias ;;
1627 -host=* | --host=* | --hos=* | --ho=*)
1628 host_alias=$ac_optarg ;;
1629
1630 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1631 ac_prev=htmldir ;;
1632 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1633 | --ht=*)
1634 htmldir=$ac_optarg ;;
1635
1636 -includedir | --includedir | --includedi | --included | --include \
1637 | --includ | --inclu | --incl | --inc)
1638 ac_prev=includedir ;;
1639 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1640 | --includ=* | --inclu=* | --incl=* | --inc=*)
1641 includedir=$ac_optarg ;;
1642
1643 -infodir | --infodir | --infodi | --infod | --info | --inf)
1644 ac_prev=infodir ;;
1645 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1646 infodir=$ac_optarg ;;
1647
1648 -libdir | --libdir | --libdi | --libd)
1649 ac_prev=libdir ;;
1650 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1651 libdir=$ac_optarg ;;
1652
1653 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1654 | --libexe | --libex | --libe)
1655 ac_prev=libexecdir ;;
1656 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1657 | --libexe=* | --libex=* | --libe=*)
1658 libexecdir=$ac_optarg ;;
1659
1660 -localedir | --localedir | --localedi | --localed | --locale)
1661 ac_prev=localedir ;;
1662 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1663 localedir=$ac_optarg ;;
1664
1665 -localstatedir | --localstatedir | --localstatedi | --localstated \
1666 | --localstate | --localstat | --localsta | --localst | --locals)
1667 ac_prev=localstatedir ;;
1668 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1669 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1670 localstatedir=$ac_optarg ;;
1671
1672 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1673 ac_prev=mandir ;;
1674 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1675 mandir=$ac_optarg ;;
1676
1677 -nfp | --nfp | --nf)
1678 # Obsolete; use --without-fp.
1679 with_fp=no ;;
1680
1681 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1682 | --no-cr | --no-c | -n)
1683 no_create=yes ;;
1684
1685 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1686 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1687 no_recursion=yes ;;
1688
1689 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1690 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1691 | --oldin | --oldi | --old | --ol | --o)
1692 ac_prev=oldincludedir ;;
1693 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1694 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1695 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1696 oldincludedir=$ac_optarg ;;
1697
1698 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1699 ac_prev=prefix ;;
1700 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1701 prefix=$ac_optarg ;;
1702
1703 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1704 | --program-pre | --program-pr | --program-p)
1705 ac_prev=program_prefix ;;
1706 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1707 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1708 program_prefix=$ac_optarg ;;
1709
1710 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1711 | --program-suf | --program-su | --program-s)
1712 ac_prev=program_suffix ;;
1713 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1714 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1715 program_suffix=$ac_optarg ;;
1716
1717 -program-transform-name | --program-transform-name \
1718 | --program-transform-nam | --program-transform-na \
1719 | --program-transform-n | --program-transform- \
1720 | --program-transform | --program-transfor \
1721 | --program-transfo | --program-transf \
1722 | --program-trans | --program-tran \
1723 | --progr-tra | --program-tr | --program-t)
1724 ac_prev=program_transform_name ;;
1725 -program-transform-name=* | --program-transform-name=* \
1726 | --program-transform-nam=* | --program-transform-na=* \
1727 | --program-transform-n=* | --program-transform-=* \
1728 | --program-transform=* | --program-transfor=* \
1729 | --program-transfo=* | --program-transf=* \
1730 | --program-trans=* | --program-tran=* \
1731 | --progr-tra=* | --program-tr=* | --program-t=*)
1732 program_transform_name=$ac_optarg ;;
1733
1734 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1735 ac_prev=pdfdir ;;
1736 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1737 pdfdir=$ac_optarg ;;
1738
1739 -psdir | --psdir | --psdi | --psd | --ps)
1740 ac_prev=psdir ;;
1741 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1742 psdir=$ac_optarg ;;
1743
1744 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1745 | -silent | --silent | --silen | --sile | --sil)
1746 silent=yes ;;
1747
1748 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1749 ac_prev=sbindir ;;
1750 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1751 | --sbi=* | --sb=*)
1752 sbindir=$ac_optarg ;;
1753
1754 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1755 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1756 | --sharedst | --shareds | --shared | --share | --shar \
1757 | --sha | --sh)
1758 ac_prev=sharedstatedir ;;
1759 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1760 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1761 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1762 | --sha=* | --sh=*)
1763 sharedstatedir=$ac_optarg ;;
1764
1765 -site | --site | --sit)
1766 ac_prev=site ;;
1767 -site=* | --site=* | --sit=*)
1768 site=$ac_optarg ;;
1769
1770 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1771 ac_prev=srcdir ;;
1772 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1773 srcdir=$ac_optarg ;;
1774
1775 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1776 | --syscon | --sysco | --sysc | --sys | --sy)
1777 ac_prev=sysconfdir ;;
1778 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1779 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1780 sysconfdir=$ac_optarg ;;
1781
1782 -target | --target | --targe | --targ | --tar | --ta | --t)
1783 ac_prev=target_alias ;;
1784 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1785 target_alias=$ac_optarg ;;
1786
1787 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1788 verbose=yes ;;
1789
1790 -version | --version | --versio | --versi | --vers | -V)
1791 ac_init_version=: ;;
1792
1793 -with-* | --with-*)
1794 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1795 # Reject names that are not valid shell variable names.
1796 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
a9bec17c 1797 as_fn_error "invalid package name: $ac_useropt"
067d23c9
KY
1798 ac_useropt_orig=$ac_useropt
1799 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1800 case $ac_user_opts in
1801 *"
1802"with_$ac_useropt"
1803"*) ;;
1804 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1805 ac_unrecognized_sep=', ';;
1806 esac
1807 eval with_$ac_useropt=\$ac_optarg ;;
1808
1809 -without-* | --without-*)
1810 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1811 # Reject names that are not valid shell variable names.
1812 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
a9bec17c 1813 as_fn_error "invalid package name: $ac_useropt"
067d23c9
KY
1814 ac_useropt_orig=$ac_useropt
1815 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1816 case $ac_user_opts in
1817 *"
1818"with_$ac_useropt"
1819"*) ;;
1820 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1821 ac_unrecognized_sep=', ';;
1822 esac
1823 eval with_$ac_useropt=no ;;
1824
1825 --x)
1826 # Obsolete; use --with-x.
1827 with_x=yes ;;
1828
1829 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1830 | --x-incl | --x-inc | --x-in | --x-i)
1831 ac_prev=x_includes ;;
1832 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1833 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1834 x_includes=$ac_optarg ;;
1835
1836 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1837 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1838 ac_prev=x_libraries ;;
1839 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1840 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1841 x_libraries=$ac_optarg ;;
1842
a9bec17c
GM
1843 -*) as_fn_error "unrecognized option: \`$ac_option'
1844Try \`$0 --help' for more information."
067d23c9
KY
1845 ;;
1846
1847 *=*)
1848 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1849 # Reject names that are not valid shell variable names.
1850 case $ac_envvar in #(
1851 '' | [0-9]* | *[!_$as_cr_alnum]* )
a9bec17c 1852 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
067d23c9
KY
1853 esac
1854 eval $ac_envvar=\$ac_optarg
1855 export $ac_envvar ;;
1856
1857 *)
1858 # FIXME: should be removed in autoconf 3.0.
1859 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1860 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1861 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
a9bec17c 1862 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
067d23c9
KY
1863 ;;
1864
1865 esac
1866done
1867
1868if test -n "$ac_prev"; then
1869 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
a9bec17c 1870 as_fn_error "missing argument to $ac_option"
067d23c9
KY
1871fi
1872
1873if test -n "$ac_unrecognized_opts"; then
1874 case $enable_option_checking in
1875 no) ;;
a9bec17c 1876 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
067d23c9
KY
1877 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1878 esac
1879fi
1880
1881# Check all directory arguments for consistency.
1882for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1883 datadir sysconfdir sharedstatedir localstatedir includedir \
1884 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1885 libdir localedir mandir
1886do
1887 eval ac_val=\$$ac_var
1888 # Remove trailing slashes.
1889 case $ac_val in
1890 */ )
1891 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1892 eval $ac_var=\$ac_val;;
1893 esac
1894 # Be sure to have absolute directory names.
1895 case $ac_val in
1896 [\\/$]* | ?:[\\/]* ) continue;;
1897 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1898 esac
a9bec17c 1899 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
067d23c9
KY
1900done
1901
1902# There might be people who depend on the old broken behavior: `$host'
1903# used to hold the argument of --host etc.
1904# FIXME: To remove some day.
1905build=$build_alias
1906host=$host_alias
1907target=$target_alias
1908
1909# FIXME: To remove some day.
1910if test "x$host_alias" != x; then
1911 if test "x$build_alias" = x; then
1912 cross_compiling=maybe
a9bec17c
GM
1913 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1914 If a cross compiler is detected then cross compile mode will be used." >&2
067d23c9
KY
1915 elif test "x$build_alias" != "x$host_alias"; then
1916 cross_compiling=yes
1917 fi
1918fi
1919
1920ac_tool_prefix=
1921test -n "$host_alias" && ac_tool_prefix=$host_alias-
1922
1923test "$silent" = yes && exec 6>/dev/null
1924
1925
1926ac_pwd=`pwd` && test -n "$ac_pwd" &&
1927ac_ls_di=`ls -di .` &&
1928ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
a9bec17c 1929 as_fn_error "working directory cannot be determined"
067d23c9 1930test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
a9bec17c 1931 as_fn_error "pwd does not report name of working directory"
067d23c9
KY
1932
1933
1934# Find the source files, if location was not specified.
1935if test -z "$srcdir"; then
1936 ac_srcdir_defaulted=yes
1937 # Try the directory containing this script, then the parent directory.
1938 ac_confdir=`$as_dirname -- "$as_myself" ||
1939$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1940 X"$as_myself" : 'X\(//\)[^/]' \| \
1941 X"$as_myself" : 'X\(//\)$' \| \
1942 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1943$as_echo X"$as_myself" |
1944 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1945 s//\1/
1946 q
1947 }
1948 /^X\(\/\/\)[^/].*/{
1949 s//\1/
1950 q
1951 }
1952 /^X\(\/\/\)$/{
1953 s//\1/
1954 q
1955 }
1956 /^X\(\/\).*/{
1957 s//\1/
1958 q
1959 }
1960 s/.*/./; q'`
1961 srcdir=$ac_confdir
1962 if test ! -r "$srcdir/$ac_unique_file"; then
1963 srcdir=..
1964 fi
1965else
1966 ac_srcdir_defaulted=no
1967fi
1968if test ! -r "$srcdir/$ac_unique_file"; then
1969 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
a9bec17c 1970 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
067d23c9
KY
1971fi
1972ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1973ac_abs_confdir=`(
a9bec17c 1974 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
067d23c9
KY
1975 pwd)`
1976# When building in place, set srcdir=.
1977if test "$ac_abs_confdir" = "$ac_pwd"; then
1978 srcdir=.
1979fi
1980# Remove unnecessary trailing slashes from srcdir.
1981# Double slashes in file names in object file debugging info
1982# mess up M-x gdb in Emacs.
1983case $srcdir in
1984*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1985esac
1986for ac_var in $ac_precious_vars; do
1987 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1988 eval ac_env_${ac_var}_value=\$${ac_var}
1989 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1990 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1991done
1992
1993#
1994# Report the --help message.
1995#
1996if test "$ac_init_help" = "long"; then
1997 # Omit some internal or obsolete options to make the list less imposing.
1998 # This message is too long to be a string in the A/UX 3.1 sh.
1999 cat <<_ACEOF
c574bc34 2000\`configure' configures emacs 24.3.50 to adapt to many kinds of systems.
067d23c9
KY
2001
2002Usage: $0 [OPTION]... [VAR=VALUE]...
2003
2004To assign environment variables (e.g., CC, CFLAGS...), specify them as
2005VAR=VALUE. See below for descriptions of some of the useful variables.
2006
2007Defaults for the options are specified in brackets.
2008
2009Configuration:
2010 -h, --help display this help and exit
2011 --help=short display options specific to this package
2012 --help=recursive display the short help of all the included packages
2013 -V, --version display version information and exit
a9bec17c 2014 -q, --quiet, --silent do not print \`checking...' messages
067d23c9
KY
2015 --cache-file=FILE cache test results in FILE [disabled]
2016 -C, --config-cache alias for \`--cache-file=config.cache'
2017 -n, --no-create do not create output files
2018 --srcdir=DIR find the sources in DIR [configure dir or \`..']
2019
2020Installation directories:
2021 --prefix=PREFIX install architecture-independent files in PREFIX
2022 [$ac_default_prefix]
2023 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
2024 [PREFIX]
2025
2026By default, \`make install' will install all the files in
2027\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
2028an installation prefix other than \`$ac_default_prefix' using \`--prefix',
2029for instance \`--prefix=\$HOME'.
2030
2031For better control, use the options below.
2032
2033Fine tuning of the installation directories:
2034 --bindir=DIR user executables [EPREFIX/bin]
2035 --sbindir=DIR system admin executables [EPREFIX/sbin]
2036 --libexecdir=DIR program executables [EPREFIX/libexec]
2037 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
2038 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
2039 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
2040 --libdir=DIR object code libraries [EPREFIX/lib]
2041 --includedir=DIR C header files [PREFIX/include]
2042 --oldincludedir=DIR C header files for non-gcc [/usr/include]
2043 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
2044 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
2045 --infodir=DIR info documentation [DATAROOTDIR/info]
2046 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
2047 --mandir=DIR man documentation [DATAROOTDIR/man]
2048 --docdir=DIR documentation root [DATAROOTDIR/doc/emacs]
2049 --htmldir=DIR html documentation [DOCDIR]
2050 --dvidir=DIR dvi documentation [DOCDIR]
2051 --pdfdir=DIR pdf documentation [DOCDIR]
2052 --psdir=DIR ps documentation [DOCDIR]
2053_ACEOF
2054
2055 cat <<\_ACEOF
2056
2057Program names:
2058 --program-prefix=PREFIX prepend PREFIX to installed program names
2059 --program-suffix=SUFFIX append SUFFIX to installed program names
2060 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
2061
2062X features:
2063 --x-includes=DIR X include files are in DIR
2064 --x-libraries=DIR X library files are in DIR
2065
2066System types:
2067 --build=BUILD configure for building on BUILD [guessed]
2068 --host=HOST cross-compile to build programs to run on HOST [BUILD]
2069_ACEOF
2070fi
2071
2072if test -n "$ac_init_help"; then
2073 case $ac_init_help in
c574bc34 2074 short | recursive ) echo "Configuration of emacs 24.3.50:";;
067d23c9
KY
2075 esac
2076 cat <<\_ACEOF
2077
2078Optional Features:
2079 --disable-option-checking ignore unrecognized --enable/--with options
2080 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
2081 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
2082 --disable-ns-self-contained
2083 disable self contained build under NeXTstep
067d23c9
KY
2084 --enable-locallisppath=PATH
2085 directories Emacs should search for lisp files
2086 specific to this site
2087 --enable-checking[=LIST]
2088 enable expensive run-time checks. With LIST, enable
2089 only specific categories of checks. Categories are:
2090 all,yes,no. Flags are: stringbytes, stringoverrun,
7ee3791f 2091 stringfreelist, xmallocoverrun, conslist, glyphs
afd07e01
GM
2092 --enable-check-lisp-object-type
2093 enable compile time checks for the Lisp_Object data
2094 type. This is useful for development for catching
2095 certain types of bugs.
3dc00ee8
GM
2096 --enable-profiling build emacs with low-level, gprof profiling support.
2097 Mainly useful for debugging Emacs itself. May not
2098 work on all platforms. Stops profiler.el working.
067d23c9
KY
2099 --enable-autodepend automatically generate dependencies to .h-files.
2100 Requires GNU Make and Gcc. Enabled if GNU Make and
2101 Gcc is found
4efe5ef9
GM
2102 --enable-gtk-deprecation-warnings
2103 Show Gtk+/Gdk deprecation warnings for Gtk+ >= 3.0
743c80a7
PE
2104 --disable-dependency-tracking speeds up one-time build
2105 --enable-dependency-tracking do not reject slow dependency extractors
067d23c9 2106 --disable-largefile omit support for large files
ac924f35
GM
2107 --enable-gcc-warnings turn on lots of GCC warnings/errors. This is
2108 intended for developers, and may generate false
2109 alarms when used with older or non-GNU development
2110 tools.
e4d35030
GM
2111 --enable-link-time-optimization
2112 build emacs with link-time optimization. This is
2113 supported only for GCC since 4.5.0.
067d23c9
KY
2114
2115Optional Packages:
2116 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
2117 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
ee77919d
GM
2118 --without-all omit almost all features and build small executable
2119 with minimal dependencies
067d23c9
KY
2120 --without-pop don't support POP mail retrieval with movemail
2121 --with-kerberos support Kerberos-authenticated POP
2122 --with-kerberos5 support Kerberos version 5 authenticated POP
2123 --with-hesiod support Hesiod to get the POP server host
2124 --with-mmdf support MMDF mailboxes
2125 --with-mail-unlink unlink, rather than empty, mail spool after reading
2126 --with-mailhost=HOSTNAME
2127 string giving default POP mail host
2128 --without-sound don't compile with sound support
4fa92495
GM
2129 --with-x-toolkit=KIT use an X toolkit (KIT one of: yes or gtk, gtk2,
2130 gtk3, lucid or athena, motif, no)
0442dc7f 2131 --with-wide-int prefer wide Emacs integers (typically 62-bit)
067d23c9
KY
2132 --without-xpm don't compile with XPM image support
2133 --without-jpeg don't compile with JPEG image support
2134 --without-tiff don't compile with TIFF image support
2135 --without-gif don't compile with GIF image support
2136 --without-png don't compile with PNG image support
2137 --without-rsvg don't compile with SVG image support
2138 --without-xml2 don't compile with XML parsing support
2139 --without-imagemagick don't compile with ImageMagick image support
2140 --without-xft don't use XFT for anti aliased fonts
2141 --without-libotf don't use libotf for OpenType font support
2142 --without-m17n-flt don't use m17n-flt for text shaping
2143 --without-toolkit-scroll-bars
2144 don't use Motif or Xaw3d scroll bars
2145 --without-xaw3d don't use Xaw3d
2146 --without-xim don't use X11 XIM
7834125e 2147 --with-ns use NeXTstep (Cocoa or GNUstep) windowing system
bf05ed1f 2148 --with-w32 use native MS Windows GUI
067d23c9
KY
2149 --without-gpm don't use -lgpm for mouse support on a GNU/Linux
2150 console
2151 --without-dbus don't compile with D-Bus support
2152 --without-gconf don't compile with GConf support
f527bd02 2153 --without-gsettings don't compile with GSettings support
067d23c9 2154 --without-selinux don't compile with SELinux support
4cc63c81 2155 --without-acl don't compile with ACL support
067d23c9 2156 --without-gnutls don't use -lgnutls for SSL/TLS support
b5eb356a 2157 --without-inotify don't compile with inotify (file-watch) support
067d23c9
KY
2158 --without-makeinfo don't require makeinfo for building manuals
2159 --without-compress-info don't compress the installed Info pages
b5591ebb
GM
2160 --with-pkg-config-prog=FILENAME
2161 file name of pkg-config for finding GTK and librsvg
067d23c9
KY
2162 --with-crt-dir=DIR directory containing crtn.o etc. The default is
2163 /usr/lib, or /usr/lib64 on some platforms.
4fc5868a 2164 --with-gameuser=USER user for shared game score files
b5591ebb
GM
2165 --with-gnustep-conf=FILENAME
2166 name of GNUstep.conf; default $GNUSTEP_CONFIG_FILE,
067d23c9
KY
2167 or /etc/GNUstep/GNUstep.conf
2168 --with-x use the X Window System
2169
2170Some influential environment variables:
2171 CC C compiler command
2172 CFLAGS C compiler flags
2173 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
2174 nonstandard directory <lib dir>
2175 LIBS libraries to pass to the linker, e.g. -l<library>
2176 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2177 you have headers in a nonstandard directory <include dir>
2178 CPP C preprocessor
2179 XMKMF Path to xmkmf, Makefile generator for X Window System
2180
2181Use these variables to override the choices made by `configure' or to help
2182it to find libraries and programs with nonstandard names/locations.
2183
2184Report bugs to the package provider.
2185_ACEOF
2186ac_status=$?
2187fi
2188
2189if test "$ac_init_help" = "recursive"; then
2190 # If there are subdirs, report their specific --help.
2191 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2192 test -d "$ac_dir" ||
2193 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2194 continue
2195 ac_builddir=.
2196
2197case "$ac_dir" in
2198.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2199*)
2200 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2201 # A ".." for each directory in $ac_dir_suffix.
2202 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2203 case $ac_top_builddir_sub in
2204 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2205 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2206 esac ;;
2207esac
2208ac_abs_top_builddir=$ac_pwd
2209ac_abs_builddir=$ac_pwd$ac_dir_suffix
2210# for backward compatibility:
2211ac_top_builddir=$ac_top_build_prefix
2212
2213case $srcdir in
2214 .) # We are building in place.
2215 ac_srcdir=.
2216 ac_top_srcdir=$ac_top_builddir_sub
2217 ac_abs_top_srcdir=$ac_pwd ;;
2218 [\\/]* | ?:[\\/]* ) # Absolute name.
2219 ac_srcdir=$srcdir$ac_dir_suffix;
2220 ac_top_srcdir=$srcdir
2221 ac_abs_top_srcdir=$srcdir ;;
2222 *) # Relative name.
2223 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2224 ac_top_srcdir=$ac_top_build_prefix$srcdir
2225 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2226esac
2227ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2228
2229 cd "$ac_dir" || { ac_status=$?; continue; }
2230 # Check for guested configure.
2231 if test -f "$ac_srcdir/configure.gnu"; then
2232 echo &&
2233 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2234 elif test -f "$ac_srcdir/configure"; then
2235 echo &&
2236 $SHELL "$ac_srcdir/configure" --help=recursive
2237 else
2238 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2239 fi || ac_status=$?
2240 cd "$ac_pwd" || { ac_status=$?; break; }
2241 done
2242fi
2243
2244test -n "$ac_init_help" && exit $ac_status
2245if $ac_init_version; then
2246 cat <<\_ACEOF
c574bc34 2247emacs configure 24.3.50
a9bec17c 2248generated by GNU Autoconf 2.65
067d23c9 2249
a9bec17c 2250Copyright (C) 2009 Free Software Foundation, Inc.
067d23c9
KY
2251This configure script is free software; the Free Software Foundation
2252gives unlimited permission to copy, distribute and modify it.
2253_ACEOF
2254 exit
2255fi
2256
2257## ------------------------ ##
2258## Autoconf initialization. ##
2259## ------------------------ ##
2260
2261# ac_fn_c_try_compile LINENO
2262# --------------------------
2263# Try to compile conftest.$ac_ext, and return whether this succeeded.
2264ac_fn_c_try_compile ()
2265{
2266 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2267 rm -f conftest.$ac_objext
2268 if { { ac_try="$ac_compile"
2269case "(($ac_try" in
2270 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2271 *) ac_try_echo=$ac_try;;
2272esac
2273eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2274$as_echo "$ac_try_echo"; } >&5
2275 (eval "$ac_compile") 2>conftest.err
2276 ac_status=$?
2277 if test -s conftest.err; then
2278 grep -v '^ *+' conftest.err >conftest.er1
2279 cat conftest.er1 >&5
2280 mv -f conftest.er1 conftest.err
2281 fi
2282 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2283 test $ac_status = 0; } && {
2284 test -z "$ac_c_werror_flag" ||
2285 test ! -s conftest.err
2286 } && test -s conftest.$ac_objext; then :
2287 ac_retval=0
2288else
2289 $as_echo "$as_me: failed program was:" >&5
2290sed 's/^/| /' conftest.$ac_ext >&5
2291
2292 ac_retval=1
2293fi
a9bec17c 2294 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
067d23c9
KY
2295 as_fn_set_status $ac_retval
2296
2297} # ac_fn_c_try_compile
2298
067d23c9
KY
2299# ac_fn_c_try_cpp LINENO
2300# ----------------------
2301# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2302ac_fn_c_try_cpp ()
2303{
2304 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2305 if { { ac_try="$ac_cpp conftest.$ac_ext"
2306case "(($ac_try" in
2307 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2308 *) ac_try_echo=$ac_try;;
2309esac
2310eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2311$as_echo "$ac_try_echo"; } >&5
2312 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2313 ac_status=$?
2314 if test -s conftest.err; then
2315 grep -v '^ *+' conftest.err >conftest.er1
2316 cat conftest.er1 >&5
2317 mv -f conftest.er1 conftest.err
2318 fi
2319 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
a9bec17c 2320 test $ac_status = 0; } >/dev/null && {
067d23c9
KY
2321 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2322 test ! -s conftest.err
2323 }; then :
2324 ac_retval=0
2325else
2326 $as_echo "$as_me: failed program was:" >&5
2327sed 's/^/| /' conftest.$ac_ext >&5
2328
2329 ac_retval=1
2330fi
a9bec17c 2331 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
067d23c9
KY
2332 as_fn_set_status $ac_retval
2333
2334} # ac_fn_c_try_cpp
2335
2336# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
2337# -------------------------------------------------------
2338# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2339# the include files in INCLUDES and setting the cache variable VAR
2340# accordingly.
2341ac_fn_c_check_header_mongrel ()
2342{
2343 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
a9bec17c 2344 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
067d23c9
KY
2345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2346$as_echo_n "checking for $2... " >&6; }
a9bec17c 2347if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
067d23c9
KY
2348 $as_echo_n "(cached) " >&6
2349fi
2350eval ac_res=\$$3
2351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2352$as_echo "$ac_res" >&6; }
2353else
2354 # Is the header compilable?
2355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2356$as_echo_n "checking $2 usability... " >&6; }
2357cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2358/* end confdefs.h. */
2359$4
2360#include <$2>
2361_ACEOF
2362if ac_fn_c_try_compile "$LINENO"; then :
2363 ac_header_compiler=yes
2364else
2365 ac_header_compiler=no
2366fi
2367rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2368{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2369$as_echo "$ac_header_compiler" >&6; }
2370
2371# Is the header present?
2372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2373$as_echo_n "checking $2 presence... " >&6; }
2374cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2375/* end confdefs.h. */
2376#include <$2>
2377_ACEOF
2378if ac_fn_c_try_cpp "$LINENO"; then :
2379 ac_header_preproc=yes
2380else
2381 ac_header_preproc=no
2382fi
a9bec17c 2383rm -f conftest.err conftest.$ac_ext
067d23c9
KY
2384{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2385$as_echo "$ac_header_preproc" >&6; }
2386
2387# So? What about this header?
2388case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
2389 yes:no: )
2390 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2391$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2392 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2393$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2394 ;;
2395 no:yes:* )
2396 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2397$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2398 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
2399$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
2400 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2401$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2402 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
2403$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
2404 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2405$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2406 ;;
2407esac
2408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2409$as_echo_n "checking for $2... " >&6; }
a9bec17c 2410if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
067d23c9
KY
2411 $as_echo_n "(cached) " >&6
2412else
2413 eval "$3=\$ac_header_compiler"
2414fi
2415eval ac_res=\$$3
2416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2417$as_echo "$ac_res" >&6; }
2418fi
a9bec17c 2419 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
067d23c9
KY
2420
2421} # ac_fn_c_check_header_mongrel
2422
2423# ac_fn_c_try_run LINENO
2424# ----------------------
2425# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2426# that executables *can* be run.
2427ac_fn_c_try_run ()
2428{
2429 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2430 if { { ac_try="$ac_link"
2431case "(($ac_try" in
2432 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2433 *) ac_try_echo=$ac_try;;
2434esac
2435eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2436$as_echo "$ac_try_echo"; } >&5
2437 (eval "$ac_link") 2>&5
2438 ac_status=$?
2439 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2440 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2441 { { case "(($ac_try" in
2442 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2443 *) ac_try_echo=$ac_try;;
2444esac
2445eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2446$as_echo "$ac_try_echo"; } >&5
2447 (eval "$ac_try") 2>&5
2448 ac_status=$?
2449 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2450 test $ac_status = 0; }; }; then :
2451 ac_retval=0
2452else
2453 $as_echo "$as_me: program exited with status $ac_status" >&5
2454 $as_echo "$as_me: failed program was:" >&5
2455sed 's/^/| /' conftest.$ac_ext >&5
2456
2457 ac_retval=$ac_status
2458fi
2459 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
a9bec17c 2460 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
067d23c9
KY
2461 as_fn_set_status $ac_retval
2462
2463} # ac_fn_c_try_run
2464
2465# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2466# -------------------------------------------------------
2467# Tests whether HEADER exists and can be compiled using the include files in
2468# INCLUDES, setting the cache variable VAR accordingly.
2469ac_fn_c_check_header_compile ()
2470{
2471 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2472 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2473$as_echo_n "checking for $2... " >&6; }
a9bec17c 2474if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
067d23c9
KY
2475 $as_echo_n "(cached) " >&6
2476else
2477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2478/* end confdefs.h. */
2479$4
2480#include <$2>
2481_ACEOF
2482if ac_fn_c_try_compile "$LINENO"; then :
2483 eval "$3=yes"
2484else
2485 eval "$3=no"
2486fi
2487rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2488fi
2489eval ac_res=\$$3
2490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2491$as_echo "$ac_res" >&6; }
a9bec17c 2492 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
067d23c9
KY
2493
2494} # ac_fn_c_check_header_compile
2495
1fd182f0
PE
2496# ac_fn_c_try_link LINENO
2497# -----------------------
2498# Try to link conftest.$ac_ext, and return whether this succeeded.
2499ac_fn_c_try_link ()
2500{
2501 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2502 rm -f conftest.$ac_objext conftest$ac_exeext
2503 if { { ac_try="$ac_link"
2504case "(($ac_try" in
2505 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2506 *) ac_try_echo=$ac_try;;
2507esac
2508eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2509$as_echo "$ac_try_echo"; } >&5
2510 (eval "$ac_link") 2>conftest.err
2511 ac_status=$?
2512 if test -s conftest.err; then
2513 grep -v '^ *+' conftest.err >conftest.er1
2514 cat conftest.er1 >&5
2515 mv -f conftest.er1 conftest.err
2516 fi
2517 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2518 test $ac_status = 0; } && {
2519 test -z "$ac_c_werror_flag" ||
2520 test ! -s conftest.err
2521 } && test -s conftest$ac_exeext && {
2522 test "$cross_compiling" = yes ||
2523 $as_test_x conftest$ac_exeext
2524 }; then :
2525 ac_retval=0
2526else
2527 $as_echo "$as_me: failed program was:" >&5
2528sed 's/^/| /' conftest.$ac_ext >&5
2529
2530 ac_retval=1
2531fi
2532 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2533 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2534 # interfere with the next link command; also delete a directory that is
2535 # left behind by Apple's compiler. We do this before executing the actions.
2536 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
a9bec17c 2537 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1fd182f0
PE
2538 as_fn_set_status $ac_retval
2539
2540} # ac_fn_c_try_link
2541
42bbbe8b
GM
2542# ac_fn_c_check_decl LINENO SYMBOL VAR
2543# ------------------------------------
2544# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2545ac_fn_c_check_decl ()
2546{
2547 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5
2549$as_echo_n "checking whether $2 is declared... " >&6; }
2550if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2551 $as_echo_n "(cached) " >&6
2552else
2553 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2554/* end confdefs.h. */
2555$4
2556int
2557main ()
2558{
2559#ifndef $2
2560 (void) $2;
2561#endif
2562
2563 ;
2564 return 0;
2565}
2566_ACEOF
2567if ac_fn_c_try_compile "$LINENO"; then :
2568 eval "$3=yes"
2569else
2570 eval "$3=no"
2571fi
2572rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2573fi
2574eval ac_res=\$$3
2575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2576$as_echo "$ac_res" >&6; }
2577 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2578
2579} # ac_fn_c_check_decl
2580
5476a9a4
GM
2581# ac_fn_c_check_header_preproc LINENO HEADER VAR
2582# ----------------------------------------------
2583# Tests whether HEADER is present, setting the cache variable VAR accordingly.
2584ac_fn_c_check_header_preproc ()
067d23c9
KY
2585{
2586 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2587 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2588$as_echo_n "checking for $2... " >&6; }
a9bec17c 2589if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
067d23c9
KY
2590 $as_echo_n "(cached) " >&6
2591else
2592 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2593/* end confdefs.h. */
5476a9a4
GM
2594#include <$2>
2595_ACEOF
2596if ac_fn_c_try_cpp "$LINENO"; then :
2597 eval "$3=yes"
2598else
2599 eval "$3=no"
2600fi
2601rm -f conftest.err conftest.$ac_ext
2602fi
2603eval ac_res=\$$3
2604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2605$as_echo "$ac_res" >&6; }
2606 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
067d23c9 2607
5476a9a4 2608} # ac_fn_c_check_header_preproc
067d23c9 2609
5476a9a4
GM
2610# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2611# ----------------------------------------------------
2612# Tries to find if the field MEMBER exists in type AGGR, after including
2613# INCLUDES, setting cache variable VAR accordingly.
2614ac_fn_c_check_member ()
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 for $2.$3" >&5
2618$as_echo_n "checking for $2.$3... " >&6; }
2619if { as_var=$4; 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$5
2625int
2626main ()
2627{
2628static $2 ac_aggr;
2629if (ac_aggr.$3)
2630return 0;
2631 ;
2632 return 0;
2633}
2634_ACEOF
2635if ac_fn_c_try_compile "$LINENO"; then :
2636 eval "$4=yes"
2637else
2638 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2639/* end confdefs.h. */
2640$5
2641int
2642main ()
2643{
2644static $2 ac_aggr;
2645if (sizeof ac_aggr.$3)
2646return 0;
2647 ;
2648 return 0;
2649}
2650_ACEOF
2651if ac_fn_c_try_compile "$LINENO"; then :
2652 eval "$4=yes"
2653else
2654 eval "$4=no"
2655fi
2656rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2657fi
2658rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2659fi
2660eval ac_res=\$$4
2661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2662$as_echo "$ac_res" >&6; }
2663 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2664
2665} # ac_fn_c_check_member
2666
2667# ac_fn_c_check_func LINENO FUNC VAR
2668# ----------------------------------
2669# Tests whether FUNC exists, setting the cache variable VAR accordingly
2670ac_fn_c_check_func ()
2671{
2672 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2674$as_echo_n "checking for $2... " >&6; }
2675if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2676 $as_echo_n "(cached) " >&6
2677else
2678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2679/* end confdefs.h. */
2680/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2681 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2682#define $2 innocuous_$2
2683
2684/* System header to define __stub macros and hopefully few prototypes,
2685 which can conflict with char $2 (); below.
2686 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2687 <limits.h> exists even on freestanding compilers. */
2688
2689#ifdef __STDC__
067d23c9
KY
2690# include <limits.h>
2691#else
2692# include <assert.h>
2693#endif
2694
2695#undef $2
2696
2697/* Override any GCC internal prototype to avoid an error.
2698 Use char because int might match the return type of a GCC
2699 builtin and then its argument prototype would still apply. */
2700#ifdef __cplusplus
2701extern "C"
2702#endif
2703char $2 ();
2704/* The GNU C library defines this for functions which it implements
2705 to always fail with ENOSYS. Some functions are actually named
2706 something starting with __ and the normal name is an alias. */
2707#if defined __stub_$2 || defined __stub___$2
2708choke me
2709#endif
2710
2711int
2712main ()
2713{
2714return $2 ();
2715 ;
2716 return 0;
2717}
2718_ACEOF
2719if ac_fn_c_try_link "$LINENO"; then :
2720 eval "$3=yes"
2721else
2722 eval "$3=no"
2723fi
2724rm -f core conftest.err conftest.$ac_objext \
2725 conftest$ac_exeext conftest.$ac_ext
2726fi
2727eval ac_res=\$$3
2728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2729$as_echo "$ac_res" >&6; }
a9bec17c 2730 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
067d23c9
KY
2731
2732} # ac_fn_c_check_func
2733
5476a9a4
GM
2734# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2735# -------------------------------------------
2736# Tests whether TYPE exists after having included INCLUDES, setting cache
2737# variable VAR accordingly.
2738ac_fn_c_check_type ()
3e0be4ab
GM
2739{
2740 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
5476a9a4
GM
2741 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2742$as_echo_n "checking for $2... " >&6; }
2743if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
3e0be4ab
GM
2744 $as_echo_n "(cached) " >&6
2745else
5476a9a4 2746 eval "$3=no"
3e0be4ab
GM
2747 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2748/* end confdefs.h. */
5476a9a4 2749$4
3e0be4ab
GM
2750int
2751main ()
2752{
5476a9a4
GM
2753if (sizeof ($2))
2754 return 0;
3e0be4ab
GM
2755 ;
2756 return 0;
2757}
2758_ACEOF
2759if ac_fn_c_try_compile "$LINENO"; then :
2760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2761/* end confdefs.h. */
5476a9a4 2762$4
3e0be4ab
GM
2763int
2764main ()
2765{
5476a9a4
GM
2766if (sizeof (($2)))
2767 return 0;
3e0be4ab
GM
2768 ;
2769 return 0;
2770}
2771_ACEOF
2772if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4 2773
3e0be4ab 2774else
5476a9a4 2775 eval "$3=yes"
3e0be4ab
GM
2776fi
2777rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2778fi
2779rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2780fi
5476a9a4 2781eval ac_res=\$$3
3e0be4ab
GM
2782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2783$as_echo "$ac_res" >&6; }
a9bec17c 2784 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
3e0be4ab 2785
5476a9a4 2786} # ac_fn_c_check_type
3e0be4ab 2787
5f90be1b
PE
2788# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2789# --------------------------------------------
2790# Tries to find the compile-time value of EXPR in a program that includes
2791# INCLUDES, setting VAR accordingly. Returns whether the value could be
2792# computed
2793ac_fn_c_compute_int ()
2794{
2795 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2796 if test "$cross_compiling" = yes; then
2797 # Depending upon the size, compute the lo and hi bounds.
2798cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2799/* end confdefs.h. */
2800$4
2801int
2802main ()
2803{
2804static int test_array [1 - 2 * !(($2) >= 0)];
2805test_array [0] = 0
2806
2807 ;
2808 return 0;
2809}
2810_ACEOF
2811if ac_fn_c_try_compile "$LINENO"; then :
2812 ac_lo=0 ac_mid=0
2813 while :; do
2814 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2815/* end confdefs.h. */
2816$4
2817int
2818main ()
2819{
2820static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2821test_array [0] = 0
2822
2823 ;
2824 return 0;
2825}
2826_ACEOF
2827if ac_fn_c_try_compile "$LINENO"; then :
2828 ac_hi=$ac_mid; break
2829else
2830 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2831 if test $ac_lo -le $ac_mid; then
2832 ac_lo= ac_hi=
2833 break
2834 fi
2835 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2836fi
2837rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2838 done
2839else
2840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2841/* end confdefs.h. */
2842$4
2843int
2844main ()
2845{
2846static int test_array [1 - 2 * !(($2) < 0)];
2847test_array [0] = 0
2848
2849 ;
2850 return 0;
2851}
2852_ACEOF
2853if ac_fn_c_try_compile "$LINENO"; then :
2854 ac_hi=-1 ac_mid=-1
2855 while :; do
2856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2857/* end confdefs.h. */
2858$4
2859int
2860main ()
2861{
2862static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2863test_array [0] = 0
2864
2865 ;
2866 return 0;
2867}
2868_ACEOF
2869if ac_fn_c_try_compile "$LINENO"; then :
2870 ac_lo=$ac_mid; break
2871else
2872 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2873 if test $ac_mid -le $ac_hi; then
2874 ac_lo= ac_hi=
2875 break
2876 fi
2877 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2878fi
2879rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2880 done
2881else
2882 ac_lo= ac_hi=
2883fi
2884rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2885fi
2886rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2887# Binary search between lo and hi bounds.
2888while test "x$ac_lo" != "x$ac_hi"; do
2889 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2891/* end confdefs.h. */
2892$4
2893int
2894main ()
2895{
2896static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2897test_array [0] = 0
2898
2899 ;
2900 return 0;
2901}
2902_ACEOF
2903if ac_fn_c_try_compile "$LINENO"; then :
2904 ac_hi=$ac_mid
2905else
2906 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2907fi
2908rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2909done
2910case $ac_lo in #((
2911?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2912'') ac_retval=1 ;;
2913esac
2914 else
2915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2916/* end confdefs.h. */
2917$4
2918static long int longval () { return $2; }
2919static unsigned long int ulongval () { return $2; }
2920#include <stdio.h>
2921#include <stdlib.h>
2922int
2923main ()
2924{
2925
2926 FILE *f = fopen ("conftest.val", "w");
2927 if (! f)
2928 return 1;
2929 if (($2) < 0)
2930 {
2931 long int i = longval ();
2932 if (i != ($2))
2933 return 1;
2934 fprintf (f, "%ld", i);
2935 }
2936 else
2937 {
2938 unsigned long int i = ulongval ();
2939 if (i != ($2))
2940 return 1;
2941 fprintf (f, "%lu", i);
2942 }
2943 /* Do not output a trailing newline, as this causes \r\n confusion
2944 on some platforms. */
2945 return ferror (f) || fclose (f) != 0;
2946
2947 ;
2948 return 0;
2949}
2950_ACEOF
2951if ac_fn_c_try_run "$LINENO"; then :
2952 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2953else
2954 ac_retval=1
2955fi
2956rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2957 conftest.$ac_objext conftest.beam conftest.$ac_ext
2958rm -f conftest.val
2959
2960 fi
a9bec17c 2961 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
5f90be1b
PE
2962 as_fn_set_status $ac_retval
2963
2964} # ac_fn_c_compute_int
067d23c9
KY
2965cat >config.log <<_ACEOF
2966This file contains any messages produced by compilers while
2967running configure, to aid debugging if configure makes a mistake.
2968
c574bc34 2969It was created by emacs $as_me 24.3.50, which was
a9bec17c 2970generated by GNU Autoconf 2.65. Invocation command line was
067d23c9
KY
2971
2972 $ $0 $@
2973
2974_ACEOF
2975exec 5>>config.log
2976{
2977cat <<_ASUNAME
2978## --------- ##
2979## Platform. ##
2980## --------- ##
2981
2982hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2983uname -m = `(uname -m) 2>/dev/null || echo unknown`
2984uname -r = `(uname -r) 2>/dev/null || echo unknown`
2985uname -s = `(uname -s) 2>/dev/null || echo unknown`
2986uname -v = `(uname -v) 2>/dev/null || echo unknown`
2987
2988/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2989/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2990
2991/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2992/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2993/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2994/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2995/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2996/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2997/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2998
2999_ASUNAME
3000
3001as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3002for as_dir in $PATH
3003do
3004 IFS=$as_save_IFS
3005 test -z "$as_dir" && as_dir=.
3006 $as_echo "PATH: $as_dir"
3007 done
3008IFS=$as_save_IFS
3009
3010} >&5
3011
3012cat >&5 <<_ACEOF
3013
3014
3015## ----------- ##
3016## Core tests. ##
3017## ----------- ##
3018
3019_ACEOF
3020
3021
3022# Keep a trace of the command line.
3023# Strip out --no-create and --no-recursion so they do not pile up.
3024# Strip out --silent because we don't want to record it for future runs.
3025# Also quote any args containing shell meta-characters.
3026# Make two passes to allow for proper duplicate-argument suppression.
3027ac_configure_args=
3028ac_configure_args0=
3029ac_configure_args1=
3030ac_must_keep_next=false
3031for ac_pass in 1 2
3032do
3033 for ac_arg
3034 do
3035 case $ac_arg in
3036 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3037 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3038 | -silent | --silent | --silen | --sile | --sil)
3039 continue ;;
3040 *\'*)
3041 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3042 esac
3043 case $ac_pass in
3044 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3045 2)
3046 as_fn_append ac_configure_args1 " '$ac_arg'"
3047 if test $ac_must_keep_next = true; then
3048 ac_must_keep_next=false # Got value, back to normal.
3049 else
3050 case $ac_arg in
3051 *=* | --config-cache | -C | -disable-* | --disable-* \
3052 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3053 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3054 | -with-* | --with-* | -without-* | --without-* | --x)
3055 case "$ac_configure_args0 " in
3056 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3057 esac
3058 ;;
3059 -* ) ac_must_keep_next=true ;;
3060 esac
3061 fi
3062 as_fn_append ac_configure_args " '$ac_arg'"
3063 ;;
3064 esac
3065 done
3066done
3067{ ac_configure_args0=; unset ac_configure_args0;}
3068{ ac_configure_args1=; unset ac_configure_args1;}
3069
3070# When interrupted or exit'd, cleanup temporary files, and complete
3071# config.log. We remove comments because anyway the quotes in there
3072# would cause problems or look ugly.
3073# WARNING: Use '\'' to represent an apostrophe within the trap.
3074# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3075trap 'exit_status=$?
3076 # Save into config.log some information that might help in debugging.
3077 {
3078 echo
3079
a9bec17c
GM
3080 cat <<\_ASBOX
3081## ---------------- ##
067d23c9 3082## Cache variables. ##
a9bec17c
GM
3083## ---------------- ##
3084_ASBOX
067d23c9
KY
3085 echo
3086 # The following way of writing the cache mishandles newlines in values,
3087(
3088 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3089 eval ac_val=\$$ac_var
3090 case $ac_val in #(
3091 *${as_nl}*)
3092 case $ac_var in #(
3093 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3094$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3095 esac
3096 case $ac_var in #(
3097 _ | IFS | as_nl) ;; #(
3098 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3099 *) { eval $ac_var=; unset $ac_var;} ;;
3100 esac ;;
3101 esac
3102 done
3103 (set) 2>&1 |
3104 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3105 *${as_nl}ac_space=\ *)
3106 sed -n \
3107 "s/'\''/'\''\\\\'\'''\''/g;
3108 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3109 ;; #(
3110 *)
3111 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3112 ;;
3113 esac |
3114 sort
3115)
3116 echo
3117
a9bec17c
GM
3118 cat <<\_ASBOX
3119## ----------------- ##
067d23c9 3120## Output variables. ##
a9bec17c
GM
3121## ----------------- ##
3122_ASBOX
067d23c9
KY
3123 echo
3124 for ac_var in $ac_subst_vars
3125 do
3126 eval ac_val=\$$ac_var
3127 case $ac_val in
3128 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3129 esac
3130 $as_echo "$ac_var='\''$ac_val'\''"
3131 done | sort
3132 echo
3133
3134 if test -n "$ac_subst_files"; then
a9bec17c
GM
3135 cat <<\_ASBOX
3136## ------------------- ##
067d23c9 3137## File substitutions. ##
a9bec17c
GM
3138## ------------------- ##
3139_ASBOX
067d23c9
KY
3140 echo
3141 for ac_var in $ac_subst_files
3142 do
3143 eval ac_val=\$$ac_var
3144 case $ac_val in
3145 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3146 esac
3147 $as_echo "$ac_var='\''$ac_val'\''"
3148 done | sort
3149 echo
3150 fi
3151
3152 if test -s confdefs.h; then
a9bec17c
GM
3153 cat <<\_ASBOX
3154## ----------- ##
067d23c9 3155## confdefs.h. ##
a9bec17c
GM
3156## ----------- ##
3157_ASBOX
067d23c9
KY
3158 echo
3159 cat confdefs.h
3160 echo
3161 fi
3162 test "$ac_signal" != 0 &&
3163 $as_echo "$as_me: caught signal $ac_signal"
3164 $as_echo "$as_me: exit $exit_status"
3165 } >&5
3166 rm -f core *.core core.conftest.* &&
3167 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3168 exit $exit_status
3169' 0
3170for ac_signal in 1 2 13 15; do
3171 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3172done
3173ac_signal=0
3174
3175# confdefs.h avoids OS command line length limits that DEFS can exceed.
3176rm -f -r conftest* confdefs.h
3177
3178$as_echo "/* confdefs.h */" > confdefs.h
3179
3180# Predefined preprocessor variables.
3181
3182cat >>confdefs.h <<_ACEOF
3183#define PACKAGE_NAME "$PACKAGE_NAME"
3184_ACEOF
3185
3186cat >>confdefs.h <<_ACEOF
3187#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3188_ACEOF
3189
3190cat >>confdefs.h <<_ACEOF
3191#define PACKAGE_VERSION "$PACKAGE_VERSION"
3192_ACEOF
3193
3194cat >>confdefs.h <<_ACEOF
3195#define PACKAGE_STRING "$PACKAGE_STRING"
3196_ACEOF
3197
3198cat >>confdefs.h <<_ACEOF
3199#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3200_ACEOF
3201
3202cat >>confdefs.h <<_ACEOF
3203#define PACKAGE_URL "$PACKAGE_URL"
3204_ACEOF
3205
3206
3207# Let the site file select an alternate cache file if it wants to.
3208# Prefer an explicitly selected file to automatically selected ones.
3209ac_site_file1=NONE
3210ac_site_file2=NONE
3211if test -n "$CONFIG_SITE"; then
a9bec17c 3212 ac_site_file1=$CONFIG_SITE
067d23c9
KY
3213elif test "x$prefix" != xNONE; then
3214 ac_site_file1=$prefix/share/config.site
3215 ac_site_file2=$prefix/etc/config.site
3216else
3217 ac_site_file1=$ac_default_prefix/share/config.site
3218 ac_site_file2=$ac_default_prefix/etc/config.site
3219fi
3220for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3221do
3222 test "x$ac_site_file" = xNONE && continue
3223 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3224 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3225$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3226 sed 's/^/| /' "$ac_site_file" >&5
a9bec17c 3227 . "$ac_site_file"
067d23c9
KY
3228 fi
3229done
3230
3231if test -r "$cache_file"; then
3232 # Some versions of bash will fail to source /dev/null (special files
3233 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
3234 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3235 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3236$as_echo "$as_me: loading cache $cache_file" >&6;}
3237 case $cache_file in
3238 [\\/]* | ?:[\\/]* ) . "$cache_file";;
3239 *) . "./$cache_file";;
3240 esac
3241 fi
3242else
3243 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3244$as_echo "$as_me: creating cache $cache_file" >&6;}
3245 >$cache_file
3246fi
3247
5476a9a4
GM
3248as_fn_append ac_header_list " linux/version.h"
3249as_fn_append ac_header_list " sys/systeminfo.h"
5476a9a4
GM
3250as_fn_append ac_header_list " coff.h"
3251as_fn_append ac_header_list " pty.h"
3252as_fn_append ac_header_list " sys/vlimit.h"
3253as_fn_append ac_header_list " sys/resource.h"
3254as_fn_append ac_header_list " sys/utsname.h"
3255as_fn_append ac_header_list " pwd.h"
3256as_fn_append ac_header_list " utmp.h"
5476a9a4
GM
3257as_fn_append ac_header_list " util.h"
3258as_fn_append ac_header_list " sys/socket.h"
3259as_fn_append ac_header_list " stdlib.h"
3260as_fn_append ac_header_list " unistd.h"
7e723570 3261as_fn_append ac_header_list " sys/param.h"
5476a9a4
GM
3262as_fn_append ac_header_list " pthread.h"
3263as_fn_append ac_header_list " malloc/malloc.h"
3264as_fn_append ac_header_list " maillock.h"
3265as_fn_append ac_header_list " sys/un.h"
3266as_fn_append ac_func_list " tzset"
3267as_fn_append ac_func_list " readlinkat"
d7ad186c 3268as_fn_append ac_header_list " dirent.h"
8966cbff 3269as_fn_append ac_header_list " execinfo.h"
710f5812 3270as_fn_append ac_func_list " faccessat"
d7ad186c 3271as_fn_append ac_func_list " fdopendir"
eda33f78 3272as_fn_append ac_header_list " stdio_ext.h"
3bf26e96 3273as_fn_append ac_func_list " __fpending"
d7ad186c 3274as_fn_append ac_func_list " fstatat"
f199cab1
GM
3275gl_getopt_required=GNU
3276as_fn_append ac_header_list " getopt.h"
3277as_fn_append ac_func_list " gettimeofday"
3278as_fn_append ac_func_list " nanotime"
e700232f 3279as_fn_append ac_header_list " sys/time.h"
f199cab1
GM
3280as_fn_append ac_header_list " wchar.h"
3281as_fn_append ac_header_list " stdint.h"
3282as_fn_append ac_header_list " inttypes.h"
3283as_fn_append ac_func_list " lstat"
f199cab1
GM
3284as_fn_append ac_func_list " alarm"
3285as_fn_append ac_header_list " sys/select.h"
3286as_fn_append ac_func_list " pselect"
3287as_fn_append ac_func_list " pthread_sigmask"
3288as_fn_append ac_func_list " readlink"
f199cab1
GM
3289as_fn_append ac_func_list " strtoimax"
3290as_fn_append ac_func_list " strtoumax"
3291as_fn_append ac_func_list " symlink"
3292as_fn_append ac_header_list " sys/stat.h"
3293as_fn_append ac_func_list " localtime_r"
e700232f 3294as_fn_append ac_header_list " utime.h"
f199cab1
GM
3295as_fn_append ac_func_list " futimes"
3296as_fn_append ac_func_list " futimesat"
3297as_fn_append ac_func_list " futimens"
3298as_fn_append ac_func_list " utimensat"
3299as_fn_append ac_func_list " lutimes"
067d23c9
KY
3300# Check that the precious variables saved in the cache have kept the same
3301# value.
3302ac_cache_corrupted=false
3303for ac_var in $ac_precious_vars; do
3304 eval ac_old_set=\$ac_cv_env_${ac_var}_set
3305 eval ac_new_set=\$ac_env_${ac_var}_set
3306 eval ac_old_val=\$ac_cv_env_${ac_var}_value
3307 eval ac_new_val=\$ac_env_${ac_var}_value
3308 case $ac_old_set,$ac_new_set in
3309 set,)
3310 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3311$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3312 ac_cache_corrupted=: ;;
3313 ,set)
3314 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3315$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3316 ac_cache_corrupted=: ;;
3317 ,);;
3318 *)
3319 if test "x$ac_old_val" != "x$ac_new_val"; then
3320 # differences in whitespace do not lead to failure.
3321 ac_old_val_w=`echo x $ac_old_val`
3322 ac_new_val_w=`echo x $ac_new_val`
3323 if test "$ac_old_val_w" != "$ac_new_val_w"; then
3324 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3325$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3326 ac_cache_corrupted=:
3327 else
3328 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3329$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3330 eval $ac_var=\$ac_old_val
3331 fi
3332 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
3333$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
3334 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
3335$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
3336 fi;;
3337 esac
3338 # Pass precious variables to config.status.
3339 if test "$ac_new_set" = set; then
3340 case $ac_new_val in
3341 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3342 *) ac_arg=$ac_var=$ac_new_val ;;
3343 esac
3344 case " $ac_configure_args " in
3345 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
3346 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3347 esac
3348 fi
3349done
3350if $ac_cache_corrupted; then
3351 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3352$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3353 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3354$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
a9bec17c 3355 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
067d23c9
KY
3356fi
3357## -------------------- ##
3358## Main body of script. ##
3359## -------------------- ##
3360
3361ac_ext=c
3362ac_cpp='$CPP $CPPFLAGS'
3363ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3364ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3365ac_compiler_gnu=$ac_cv_c_compiler_gnu
3366
3367
e25a10b7 3368emacs_config_options="$@"
067d23c9
KY
3369ac_config_headers="$ac_config_headers src/config.h:src/config.in"
3370
3371
743c80a7 3372ac_aux_dir=
369e19fc 3373for ac_dir in build-aux "$srcdir"/build-aux; do
a9bec17c
GM
3374 for ac_t in install-sh install.sh shtool; do
3375 if test -f "$ac_dir/$ac_t"; then
3376 ac_aux_dir=$ac_dir
3377 ac_install_sh="$ac_aux_dir/$ac_t -c"
3378 break 2
3379 fi
3380 done
743c80a7
PE
3381done
3382if test -z "$ac_aux_dir"; then
a9bec17c 3383 as_fn_error "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
743c80a7 3384fi
067d23c9 3385
743c80a7
PE
3386# These three variables are undocumented and unsupported,
3387# and are intended to be withdrawn in a future Autoconf release.
3388# They can cause serious problems if a builder's source tree is in a directory
3389# whose full name contains unusual characters.
3390ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
3391ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
3392ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
067d23c9 3393
067d23c9 3394
369e19fc
PE
3395am__api_version='1.11'
3396
743c80a7
PE
3397# Find a good install program. We prefer a C program (faster),
3398# so one script is as good as another. But avoid the broken or
3399# incompatible versions:
3400# SysV /etc/install, /usr/sbin/install
3401# SunOS /usr/etc/install
3402# IRIX /sbin/install
3403# AIX /bin/install
3404# AmigaOS /C/install, which installs bootblocks on floppy discs
3405# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3406# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3407# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3408# OS/2's system install, which has a completely different semantic
3409# ./install, which can be erroneously created by make from ./install.sh.
3410# Reject install programs that cannot install multiple files.
3411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
3412$as_echo_n "checking for a BSD-compatible install... " >&6; }
3413if test -z "$INSTALL"; then
a9bec17c 3414if test "${ac_cv_path_install+set}" = set; then :
743c80a7
PE
3415 $as_echo_n "(cached) " >&6
3416else
3417 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3418for as_dir in $PATH
3419do
3420 IFS=$as_save_IFS
3421 test -z "$as_dir" && as_dir=.
3422 # Account for people who put trailing slashes in PATH elements.
3423case $as_dir/ in #((
3424 ./ | .// | /[cC]/* | \
3425 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3426 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
3427 /usr/ucb/* ) ;;
3428 *)
3429 # OSF1 and SCO ODT 3.0 have their own names for install.
3430 # Don't use installbsd from OSF since it installs stuff as root
3431 # by default.
3432 for ac_prog in ginstall scoinst install; do
3433 for ac_exec_ext in '' $ac_executable_extensions; do
3434 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
3435 if test $ac_prog = install &&
3436 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3437 # AIX install. It has an incompatible calling convention.
3438 :
3439 elif test $ac_prog = install &&
3440 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3441 # program-specific install script used by HP pwplus--don't use.
3442 :
3443 else
3444 rm -rf conftest.one conftest.two conftest.dir
3445 echo one > conftest.one
3446 echo two > conftest.two
3447 mkdir conftest.dir
3448 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
3449 test -s conftest.one && test -s conftest.two &&
3450 test -s conftest.dir/conftest.one &&
3451 test -s conftest.dir/conftest.two
3452 then
3453 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3454 break 3
3455 fi
3456 fi
3457 fi
3458 done
3459 done
3460 ;;
3461esac
067d23c9 3462
743c80a7
PE
3463 done
3464IFS=$as_save_IFS
067d23c9 3465
743c80a7 3466rm -rf conftest.one conftest.two conftest.dir
067d23c9 3467
067d23c9 3468fi
743c80a7
PE
3469 if test "${ac_cv_path_install+set}" = set; then
3470 INSTALL=$ac_cv_path_install
3471 else
3472 # As a last resort, use the slow shell script. Don't cache a
3473 # value for INSTALL within a source directory, because that will
3474 # break other packages using the cache if that directory is
3475 # removed, or if the value is a relative name.
3476 INSTALL=$ac_install_sh
3477 fi
067d23c9 3478fi
743c80a7
PE
3479{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
3480$as_echo "$INSTALL" >&6; }
067d23c9 3481
743c80a7
PE
3482# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3483# It thinks the first close brace ends the variable substitution.
3484test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
067d23c9 3485
743c80a7 3486test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
067d23c9 3487
743c80a7 3488test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
067d23c9 3489
743c80a7
PE
3490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
3491$as_echo_n "checking whether build environment is sane... " >&6; }
3492# Just in case
3493sleep 1
3494echo timestamp > conftest.file
3495# Reject unsafe characters in $srcdir or the absolute working directory
3496# name. Accept space and tab only in the latter.
3497am_lf='
3498'
3499case `pwd` in
3500 *[\\\"\#\$\&\'\`$am_lf]*)
a9bec17c 3501 as_fn_error "unsafe absolute working directory name" "$LINENO" 5;;
743c80a7
PE
3502esac
3503case $srcdir in
3504 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
a9bec17c 3505 as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
743c80a7 3506esac
067d23c9 3507
743c80a7
PE
3508# Do `set' in a subshell so we don't clobber the current shell's
3509# arguments. Must try -L first in case configure is actually a
3510# symlink; some systems play weird games with the mod time of symlinks
3511# (eg FreeBSD returns the mod time of the symlink's containing
3512# directory).
3513if (
3514 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
3515 if test "$*" = "X"; then
3516 # -L didn't work.
3517 set X `ls -t "$srcdir/configure" conftest.file`
3518 fi
3519 rm -f conftest.file
3520 if test "$*" != "X $srcdir/configure conftest.file" \
3521 && test "$*" != "X conftest.file $srcdir/configure"; then
3522
3523 # If neither matched, then we have a broken ls. This can happen
3524 # if, for instance, CONFIG_SHELL is bash and it inherits a
3525 # broken ls alias from the environment. This has actually
3526 # happened. Such a system could not be considered "sane".
a9bec17c 3527 as_fn_error "ls -t appears to fail. Make sure there is not a broken
743c80a7
PE
3528alias in your environment" "$LINENO" 5
3529 fi
067d23c9 3530
743c80a7
PE
3531 test "$2" = conftest.file
3532 )
3533then
3534 # Ok.
3535 :
067d23c9 3536else
a9bec17c 3537 as_fn_error "newly created file is older than distributed files!
743c80a7 3538Check your system clock" "$LINENO" 5
067d23c9 3539fi
743c80a7
PE
3540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3541$as_echo "yes" >&6; }
3542test "$program_prefix" != NONE &&
3543 program_transform_name="s&^&$program_prefix&;$program_transform_name"
3544# Use a double $ so make ignores it.
3545test "$program_suffix" != NONE &&
3546 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
3547# Double any \ or $.
3548# By default was `s,x,x', remove it if useless.
3549ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
3550program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
067d23c9 3551
743c80a7
PE
3552# expand $ac_aux_dir to an absolute path
3553am_aux_dir=`cd $ac_aux_dir && pwd`
067d23c9 3554
743c80a7
PE
3555if test x"${MISSING+set}" != xset; then
3556 case $am_aux_dir in
3557 *\ * | *\ *)
3558 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
3559 *)
3560 MISSING="\${SHELL} $am_aux_dir/missing" ;;
3561 esac
067d23c9 3562fi
743c80a7
PE
3563# Use eval to expand $SHELL
3564if eval "$MISSING --run true"; then
3565 am_missing_run="$MISSING --run "
067d23c9 3566else
743c80a7
PE
3567 am_missing_run=
3568 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
3569$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
067d23c9
KY
3570fi
3571
743c80a7
PE
3572if test x"${install_sh}" != xset; then
3573 case $am_aux_dir in
3574 *\ * | *\ *)
3575 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
3576 *)
3577 install_sh="\${SHELL} $am_aux_dir/install-sh"
3578 esac
067d23c9
KY
3579fi
3580
743c80a7
PE
3581# Installed binaries are usually stripped using `strip' when the user
3582# run `make install-strip'. However `strip' might not be the right
3583# tool to use in cross-compilation environments, therefore Automake
3584# will honor the `STRIP' environment variable to overrule this program.
3585if test "$cross_compiling" != no; then
3586 if test -n "$ac_tool_prefix"; then
3587 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
3588set dummy ${ac_tool_prefix}strip; ac_word=$2
3589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3590$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 3591if test "${ac_cv_prog_STRIP+set}" = set; then :
743c80a7 3592 $as_echo_n "(cached) " >&6
067d23c9 3593else
743c80a7
PE
3594 if test -n "$STRIP"; then
3595 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
3596else
3597as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3598for as_dir in $PATH
3599do
3600 IFS=$as_save_IFS
3601 test -z "$as_dir" && as_dir=.
3602 for ac_exec_ext in '' $ac_executable_extensions; do
3603 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3604 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
3605 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3606 break 2
3607 fi
3608done
3609 done
3610IFS=$as_save_IFS
067d23c9
KY
3611
3612fi
067d23c9 3613fi
743c80a7
PE
3614STRIP=$ac_cv_prog_STRIP
3615if test -n "$STRIP"; then
3616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
3617$as_echo "$STRIP" >&6; }
3618else
3619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3620$as_echo "no" >&6; }
067d23c9
KY
3621fi
3622
3623
067d23c9 3624fi
743c80a7
PE
3625if test -z "$ac_cv_prog_STRIP"; then
3626 ac_ct_STRIP=$STRIP
3627 # Extract the first word of "strip", so it can be a program name with args.
3628set dummy strip; ac_word=$2
3629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3630$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 3631if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
743c80a7
PE
3632 $as_echo_n "(cached) " >&6
3633else
3634 if test -n "$ac_ct_STRIP"; then
3635 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
3636else
3637as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3638for as_dir in $PATH
3639do
3640 IFS=$as_save_IFS
3641 test -z "$as_dir" && as_dir=.
3642 for ac_exec_ext in '' $ac_executable_extensions; do
3643 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3644 ac_cv_prog_ac_ct_STRIP="strip"
3645 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3646 break 2
3647 fi
3648done
3649 done
3650IFS=$as_save_IFS
3651
3652fi
3653fi
3654ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
3655if test -n "$ac_ct_STRIP"; then
3656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
3657$as_echo "$ac_ct_STRIP" >&6; }
3658else
3659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3660$as_echo "no" >&6; }
3661fi
3662
3663 if test "x$ac_ct_STRIP" = x; then
3664 STRIP=":"
3665 else
3666 case $cross_compiling:$ac_tool_warned in
3667yes:)
3668{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3669$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3670ac_tool_warned=yes ;;
3671esac
3672 STRIP=$ac_ct_STRIP
3673 fi
3674else
3675 STRIP="$ac_cv_prog_STRIP"
3676fi
3677
3678fi
3679INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
3680
3681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
3682$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
3683if test -z "$MKDIR_P"; then
a9bec17c 3684 if test "${ac_cv_path_mkdir+set}" = set; then :
743c80a7
PE
3685 $as_echo_n "(cached) " >&6
3686else
3687 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3688for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
3689do
3690 IFS=$as_save_IFS
3691 test -z "$as_dir" && as_dir=.
3692 for ac_prog in mkdir gmkdir; do
3693 for ac_exec_ext in '' $ac_executable_extensions; do
3694 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
3695 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
3696 'mkdir (GNU coreutils) '* | \
3697 'mkdir (coreutils) '* | \
3698 'mkdir (fileutils) '4.1*)
3699 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
3700 break 3;;
3701 esac
3702 done
3703 done
3704 done
3705IFS=$as_save_IFS
3706
3707fi
3708
3709 test -d ./--version && rmdir ./--version
3710 if test "${ac_cv_path_mkdir+set}" = set; then
3711 MKDIR_P="$ac_cv_path_mkdir -p"
3712 else
3713 # As a last resort, use the slow shell script. Don't cache a
3714 # value for MKDIR_P within a source directory, because that will
3715 # break other packages using the cache if that directory is
3716 # removed, or if the value is a relative name.
3717 MKDIR_P="$ac_install_sh -d"
3718 fi
3719fi
3720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
3721$as_echo "$MKDIR_P" >&6; }
3722
3723mkdir_p="$MKDIR_P"
3724case $mkdir_p in
3725 [\\/$]* | ?:[\\/]*) ;;
3726 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
3727esac
3728
3729for ac_prog in gawk mawk nawk awk
3730do
3731 # Extract the first word of "$ac_prog", so it can be a program name with args.
3732set dummy $ac_prog; ac_word=$2
3733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3734$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 3735if test "${ac_cv_prog_AWK+set}" = set; then :
743c80a7
PE
3736 $as_echo_n "(cached) " >&6
3737else
3738 if test -n "$AWK"; then
3739 ac_cv_prog_AWK="$AWK" # Let the user override the test.
3740else
3741as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3742for as_dir in $PATH
3743do
3744 IFS=$as_save_IFS
3745 test -z "$as_dir" && as_dir=.
3746 for ac_exec_ext in '' $ac_executable_extensions; do
3747 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3748 ac_cv_prog_AWK="$ac_prog"
3749 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3750 break 2
3751 fi
3752done
3753 done
3754IFS=$as_save_IFS
3755
3756fi
3757fi
3758AWK=$ac_cv_prog_AWK
3759if test -n "$AWK"; then
3760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
3761$as_echo "$AWK" >&6; }
3762else
3763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3764$as_echo "no" >&6; }
3765fi
3766
3767
3768 test -n "$AWK" && break
3769done
3770
3771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3772$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
3773set x ${MAKE-make}
3774ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
a9bec17c 3775if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
743c80a7
PE
3776 $as_echo_n "(cached) " >&6
3777else
3778 cat >conftest.make <<\_ACEOF
3779SHELL = /bin/sh
3780all:
3781 @echo '@@@%%%=$(MAKE)=@@@%%%'
3782_ACEOF
a9bec17c 3783# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
743c80a7
PE
3784case `${MAKE-make} -f conftest.make 2>/dev/null` in
3785 *@@@%%%=?*=@@@%%%*)
3786 eval ac_cv_prog_make_${ac_make}_set=yes;;
3787 *)
3788 eval ac_cv_prog_make_${ac_make}_set=no;;
3789esac
3790rm -f conftest.make
3791fi
3792if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3794$as_echo "yes" >&6; }
3795 SET_MAKE=
3796else
3797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3798$as_echo "no" >&6; }
3799 SET_MAKE="MAKE=${MAKE-make}"
3800fi
3801
3802rm -rf .tst 2>/dev/null
3803mkdir .tst 2>/dev/null
3804if test -d .tst; then
3805 am__leading_dot=.
3806else
3807 am__leading_dot=_
3808fi
3809rmdir .tst 2>/dev/null
3810
3811if test "`cd $srcdir && pwd`" != "`pwd`"; then
3812 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
3813 # is not polluted with repeated "-I."
3814 am__isrc=' -I$(srcdir)'
3815 # test to see if srcdir already configured
3816 if test -f $srcdir/config.status; then
a9bec17c 3817 as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
743c80a7
PE
3818 fi
3819fi
3820
3821# test whether we have cygpath
3822if test -z "$CYGPATH_W"; then
3823 if (cygpath --version) >/dev/null 2>/dev/null; then
3824 CYGPATH_W='cygpath -w'
3825 else
3826 CYGPATH_W=echo
3827 fi
3828fi
3829
3830
3831# Define the identity of the package.
3832 PACKAGE='emacs'
c574bc34 3833 VERSION='24.3.50'
743c80a7
PE
3834
3835
3836cat >>confdefs.h <<_ACEOF
3837#define PACKAGE "$PACKAGE"
3838_ACEOF
3839
3840
3841cat >>confdefs.h <<_ACEOF
3842#define VERSION "$VERSION"
3843_ACEOF
3844
3845# Some tools Automake needs.
3846
3847ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
3848
3849
3850AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
3851
3852
3853AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
3854
3855
3856AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
3857
3858
3859MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
3860
3861# We need awk for the "check" target. The system "awk" is bad on
3862# some platforms.
3863# Always define AMTAR for backward compatibility.
3864
3865AMTAR=${AMTAR-"${am_missing_run}tar"}
3866
3867am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
3868
3869
3870
3871
3872
3873
3874
3875
3876lispdir='${datadir}/emacs/${version}/lisp'
e1939eb1 3877leimdir='${datadir}/emacs/${version}/leim'
397f7161 3878standardlisppath='${lispdir}:${leimdir}'
743c80a7
PE
3879locallisppath='${datadir}/emacs/${version}/site-lisp:'\
3880'${datadir}/emacs/site-lisp'
397f7161 3881lisppath='${locallisppath}:${standardlisppath}'
743c80a7
PE
3882etcdir='${datadir}/emacs/${version}/etc'
3883archlibdir='${libexecdir}/emacs/${version}/${configuration}'
3884docdir='${datadir}/emacs/${version}/etc'
3885gamedir='${localstatedir}/games/emacs'
3886
ee77919d
GM
3887
3888# Check whether --with-all was given.
3889if test "${with_all+set}" = set; then :
3890 withval=$with_all; with_features=$withval
c0528ebe 3891else
ee77919d 3892 with_features=yes
c0528ebe
GM
3893fi
3894
3895
743c80a7
PE
3896
3897
3898
3899# Check whether --with-pop was given.
3900if test "${with_pop+set}" = set; then :
3901 withval=$with_pop;
3902else
ee77919d 3903 with_pop=$with_features
743c80a7
PE
3904fi
3905
3906if test "$with_pop" = yes; then
3907 $as_echo "#define MAIL_USE_POP 1" >>confdefs.h
3908
3909fi
3910
3911
3912# Check whether --with-kerberos was given.
3913if test "${with_kerberos+set}" = set; then :
3914 withval=$with_kerberos;
3915else
3916 with_kerberos=no
3917fi
3918
3919if test "$with_kerberos" != no; then
3920 $as_echo "#define KERBEROS 1" >>confdefs.h
3921
3922fi
3923
3924
3925# Check whether --with-kerberos5 was given.
3926if test "${with_kerberos5+set}" = set; then :
3927 withval=$with_kerberos5;
3928else
3929 with_kerberos5=no
3930fi
3931
3932if test "${with_kerberos5}" != no; then
3933 if test "${with_kerberos}" = no; then
3934 with_kerberos=yes
3935 $as_echo "#define KERBEROS 1" >>confdefs.h
3936
3937 fi
3938
3939$as_echo "#define KERBEROS5 1" >>confdefs.h
3940
3941fi
3942
3943
3944# Check whether --with-hesiod was given.
3945if test "${with_hesiod+set}" = set; then :
3946 withval=$with_hesiod;
3947else
3948 with_hesiod=no
3949fi
3950
3951if test "$with_hesiod" != no; then
3952
3953$as_echo "#define HESIOD 1" >>confdefs.h
3954
3955fi
3956
3957
3958# Check whether --with-mmdf was given.
3959if test "${with_mmdf+set}" = set; then :
3960 withval=$with_mmdf;
3961else
3962 with_mmdf=no
3963fi
3964
3965if test "$with_mmdf" != no; then
3966
3967$as_echo "#define MAIL_USE_MMDF 1" >>confdefs.h
3968
3969fi
3970
3971
3972# Check whether --with-mail-unlink was given.
3973if test "${with_mail_unlink+set}" = set; then :
3974 withval=$with_mail_unlink;
3975else
3976 with_mail_unlink=no
3977fi
3978
3979if test "$with_mail_unlink" != no; then
3980
3981$as_echo "#define MAIL_UNLINK_SPOOL 1" >>confdefs.h
3982
3983fi
3984
3985
3986# Check whether --with-mailhost was given.
3987if test "${with_mailhost+set}" = set; then :
3988 withval=$with_mailhost;
3989cat >>confdefs.h <<_ACEOF
3990#define MAILHOST "$withval"
3991_ACEOF
3992
3993fi
3994
3995
3996
067d23c9
KY
3997# Check whether --with-sound was given.
3998if test "${with_sound+set}" = set; then :
3999 withval=$with_sound;
4000else
ee77919d 4001 with_sound=$with_features
067d23c9
KY
4002fi
4003
4004
4005
067d23c9
KY
4006# Check whether --with-x-toolkit was given.
4007if test "${with_x_toolkit+set}" = set; then :
4008 withval=$with_x_toolkit; case "${withval}" in
4009 y | ye | yes ) val=gtk ;;
4010 n | no ) val=no ;;
4011 l | lu | luc | luci | lucid ) val=lucid ;;
4012 a | at | ath | athe | athen | athena ) val=athena ;;
4013 m | mo | mot | moti | motif ) val=motif ;;
4014 g | gt | gtk ) val=gtk ;;
4fa92495 4015 gtk2 ) val=gtk2 ;;
067d23c9
KY
4016 gtk3 ) val=gtk3 ;;
4017 * )
a9bec17c 4018as_fn_error "\`--with-x-toolkit=$withval' is invalid;
4fa92495
GM
4019this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif', \`gtk',
4020\`gtk2' or \`gtk3'. \`yes' and \`gtk' are synonyms.
4021\`athena' and \`lucid' are synonyms." "$LINENO" 5
067d23c9
KY
4022 ;;
4023 esac
4024 with_x_toolkit=$val
4025
4026fi
4027
4028
4029
0442dc7f
GM
4030# Check whether --with-wide-int was given.
4031if test "${with_wide_int+set}" = set; then :
4032 withval=$with_wide_int;
4033else
4034 with_wide_int=no
4035fi
4036
4037if test "$with_wide_int" = yes; then
4038
4039$as_echo "#define WIDE_EMACS_INT 1" >>confdefs.h
4040
4041fi
4042
4043
067d23c9
KY
4044# Check whether --with-xpm was given.
4045if test "${with_xpm+set}" = set; then :
4046 withval=$with_xpm;
4047else
ee77919d 4048 with_xpm=$with_features
067d23c9
KY
4049fi
4050
4051
4052# Check whether --with-jpeg was given.
4053if test "${with_jpeg+set}" = set; then :
4054 withval=$with_jpeg;
4055else
ee77919d 4056 with_jpeg=$with_features
067d23c9
KY
4057fi
4058
4059
4060# Check whether --with-tiff was given.
4061if test "${with_tiff+set}" = set; then :
4062 withval=$with_tiff;
4063else
ee77919d 4064 with_tiff=$with_features
067d23c9
KY
4065fi
4066
4067
4068# Check whether --with-gif was given.
4069if test "${with_gif+set}" = set; then :
4070 withval=$with_gif;
4071else
ee77919d 4072 with_gif=$with_features
067d23c9
KY
4073fi
4074
4075
4076# Check whether --with-png was given.
4077if test "${with_png+set}" = set; then :
4078 withval=$with_png;
4079else
ee77919d 4080 with_png=$with_features
067d23c9
KY
4081fi
4082
4083
4084# Check whether --with-rsvg was given.
4085if test "${with_rsvg+set}" = set; then :
4086 withval=$with_rsvg;
4087else
ee77919d 4088 with_rsvg=$with_features
067d23c9
KY
4089fi
4090
4091
4092# Check whether --with-xml2 was given.
4093if test "${with_xml2+set}" = set; then :
4094 withval=$with_xml2;
4095else
ee77919d 4096 with_xml2=$with_features
067d23c9
KY
4097fi
4098
4099
4100# Check whether --with-imagemagick was given.
4101if test "${with_imagemagick+set}" = set; then :
4102 withval=$with_imagemagick;
4103else
ee77919d 4104 with_imagemagick=$with_features
067d23c9
KY
4105fi
4106
4107
4108
4109# Check whether --with-xft was given.
4110if test "${with_xft+set}" = set; then :
4111 withval=$with_xft;
4112else
ee77919d 4113 with_xft=$with_features
067d23c9
KY
4114fi
4115
4116
4117# Check whether --with-libotf was given.
4118if test "${with_libotf+set}" = set; then :
4119 withval=$with_libotf;
4120else
ee77919d 4121 with_libotf=$with_features
067d23c9
KY
4122fi
4123
4124
4125# Check whether --with-m17n-flt was given.
4126if test "${with_m17n_flt+set}" = set; then :
4127 withval=$with_m17n_flt;
4128else
ee77919d 4129 with_m17n_flt=$with_features
067d23c9
KY
4130fi
4131
4132
4133
4134# Check whether --with-toolkit-scroll-bars was given.
4135if test "${with_toolkit_scroll_bars+set}" = set; then :
4136 withval=$with_toolkit_scroll_bars;
4137else
ee77919d 4138 with_toolkit_scroll_bars=$with_features
067d23c9
KY
4139fi
4140
4141
4142# Check whether --with-xaw3d was given.
4143if test "${with_xaw3d+set}" = set; then :
4144 withval=$with_xaw3d;
4145else
ee77919d 4146 with_xaw3d=$with_features
067d23c9
KY
4147fi
4148
4149
4150# Check whether --with-xim was given.
4151if test "${with_xim+set}" = set; then :
4152 withval=$with_xim;
4153else
ee77919d 4154 with_xim=$with_features
067d23c9
KY
4155fi
4156
4157
4158# Check whether --with-ns was given.
4159if test "${with_ns+set}" = set; then :
4160 withval=$with_ns;
4161else
4162 with_ns=no
4163fi
4164
4165
5c0255d9
GM
4166# Check whether --with-w32 was given.
4167if test "${with_w32+set}" = set; then :
4168 withval=$with_w32;
4169else
4170 with_w32=no
4171fi
4172
4173
067d23c9
KY
4174
4175# Check whether --with-gpm was given.
4176if test "${with_gpm+set}" = set; then :
4177 withval=$with_gpm;
4178else
ee77919d 4179 with_gpm=$with_features
067d23c9
KY
4180fi
4181
4182
4183# Check whether --with-dbus was given.
4184if test "${with_dbus+set}" = set; then :
4185 withval=$with_dbus;
4186else
ee77919d 4187 with_dbus=$with_features
067d23c9
KY
4188fi
4189
4190
4191# Check whether --with-gconf was given.
4192if test "${with_gconf+set}" = set; then :
4193 withval=$with_gconf;
4194else
ee77919d 4195 with_gconf=$with_features
067d23c9
KY
4196fi
4197
4198
f527bd02
GM
4199# Check whether --with-gsettings was given.
4200if test "${with_gsettings+set}" = set; then :
4201 withval=$with_gsettings;
4202else
ee77919d 4203 with_gsettings=$with_features
f527bd02
GM
4204fi
4205
4206
067d23c9
KY
4207# Check whether --with-selinux was given.
4208if test "${with_selinux+set}" = set; then :
4209 withval=$with_selinux;
4210else
ee77919d 4211 with_selinux=$with_features
067d23c9
KY
4212fi
4213
4214
4cc63c81
GM
4215# Check whether --with-acl was given.
4216if test "${with_acl+set}" = set; then :
4217 withval=$with_acl;
4218else
4219 with_acl=$with_features
4220fi
4221
4222
067d23c9
KY
4223# Check whether --with-gnutls was given.
4224if test "${with_gnutls+set}" = set; then :
4225 withval=$with_gnutls;
4226else
ee77919d 4227 with_gnutls=$with_features
067d23c9
KY
4228fi
4229
4230
b5eb356a
GM
4231# Check whether --with-inotify was given.
4232if test "${with_inotify+set}" = set; then :
4233 withval=$with_inotify;
4234else
4235 with_inotify=$with_features
4236fi
4237
4238
067d23c9
KY
4239## For the times when you want to build Emacs but don't have
4240## a suitable makeinfo, and can live without the manuals.
4241
4242# Check whether --with-makeinfo was given.
4243if test "${with_makeinfo+set}" = set; then :
4244 withval=$with_makeinfo;
4245else
ee77919d 4246 with_makeinfo=$with_features
067d23c9
KY
4247fi
4248
4249
c3a461a5
GM
4250## Makefile.in needs the cache file name.
4251
4252
067d23c9
KY
4253## This is an option because I do not know if all info/man support
4254## compressed files, nor how to test if they do so.
4255
4256# Check whether --with-compress-info was given.
4257if test "${with_compress_info+set}" = set; then :
4258 withval=$with_compress_info;
4259else
ee77919d 4260 with_compress_info=$with_features
067d23c9
KY
4261fi
4262
4263if test $with_compress_info = yes; then
4264 GZIP_INFO=yes
4265else
4266 GZIP_INFO=
4267fi
4268
4269
4270
4271# Check whether --with-pkg-config-prog was given.
4272if test "${with_pkg_config_prog+set}" = set; then :
4273 withval=$with_pkg_config_prog;
4274fi
4275
4276if test "X${with_pkg_config_prog}" != X; then
4277 if test "${with_pkg_config_prog}" != yes; then
4278 PKG_CONFIG="${with_pkg_config_prog}"
4279 fi
4280fi
4281
4282CRT_DIR=
4283
4284# Check whether --with-crt-dir was given.
4285if test "${with_crt_dir+set}" = set; then :
4286 withval=$with_crt_dir;
4287fi
4288
4289CRT_DIR="${with_crt_dir}"
4290
4291
4fc5868a
UM
4292# Check whether --with-gameuser was given.
4293if test "${with_gameuser+set}" = set; then :
4294 withval=$with_gameuser;
4295fi
4296
4297test "X${with_gameuser}" != X && test "${with_gameuser}" != yes \
4298 && gameuser="${with_gameuser}"
4299test "X$gameuser" = X && gameuser=games
4300
4301
067d23c9
KY
4302# Check whether --with-gnustep-conf was given.
4303if test "${with_gnustep_conf+set}" = set; then :
4304 withval=$with_gnustep_conf;
4305fi
4306
4307test "X${with_gnustep_conf}" != X && test "${with_gnustep_conf}" != yes && \
4308 GNUSTEP_CONFIG_FILE="${with_gnustep_conf}"
4309test "X$GNUSTEP_CONFIG_FILE" = "X" && \
4310 GNUSTEP_CONFIG_FILE=/etc/GNUstep/GNUstep.conf
4311
4312# Check whether --enable-ns-self-contained was given.
4313if test "${enable_ns_self_contained+set}" = set; then :
4314 enableval=$enable_ns_self_contained; EN_NS_SELF_CONTAINED=$enableval
4315else
4316 EN_NS_SELF_CONTAINED=yes
4317fi
4318
4319
067d23c9
KY
4320# Check whether --enable-locallisppath was given.
4321if test "${enable_locallisppath+set}" = set; then :
4322 enableval=$enable_locallisppath; if test "${enableval}" = "no"; then
4323 locallisppath=
4324elif test "${enableval}" != "yes"; then
4325 locallisppath=${enableval}
4326fi
4327fi
4328
4329
4330# Check whether --enable-checking was given.
4331if test "${enable_checking+set}" = set; then :
4332 enableval=$enable_checking; ac_checking_flags="${enableval}"
4333fi
4334
4335IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
4336for check in $ac_checking_flags
4337do
4338 case $check in
4339 # these set all the flags to specific states
4340 yes) ac_enable_checking=1 ;;
4341 no) ac_enable_checking= ;
4342 ac_gc_check_stringbytes= ;
4343 ac_gc_check_string_overrun= ;
4344 ac_gc_check_string_free_list= ;
4345 ac_xmalloc_overrun= ;
7ee3791f 4346 ac_gc_check_cons_list= ;
e4d35030 4347 ac_glyphs_debug= ;;
067d23c9
KY
4348 all) ac_enable_checking=1 ;
4349 ac_gc_check_stringbytes=1 ;
4350 ac_gc_check_string_overrun=1 ;
4351 ac_gc_check_string_free_list=1 ;
4352 ac_xmalloc_overrun=1 ;
7ee3791f 4353 ac_gc_check_cons_list=1 ;
e4d35030 4354 ac_glyphs_debug=1 ;;
067d23c9
KY
4355 # these enable particular checks
4356 stringbytes) ac_gc_check_stringbytes=1 ;;
4357 stringoverrun) ac_gc_check_string_overrun=1 ;;
4358 stringfreelist) ac_gc_check_string_free_list=1 ;;
4359 xmallocoverrun) ac_xmalloc_overrun=1 ;;
4360 conslist) ac_gc_check_cons_list=1 ;;
e4d35030 4361 glyphs) ac_glyphs_debug=1 ;;
a9bec17c 4362 *) as_fn_error "unknown check category $check" "$LINENO" 5 ;;
067d23c9
KY
4363 esac
4364done
4365IFS="$ac_save_IFS"
4366
4367if test x$ac_enable_checking != x ; then
4368
4369$as_echo "#define ENABLE_CHECKING 1" >>confdefs.h
4370
4371fi
4372if test x$ac_gc_check_stringbytes != x ; then
4373
4374$as_echo "#define GC_CHECK_STRING_BYTES 1" >>confdefs.h
4375
4376fi
4fda9c95 4377if test x$ac_gc_check_string_overrun != x ; then
067d23c9
KY
4378
4379$as_echo "#define GC_CHECK_STRING_OVERRUN 1" >>confdefs.h
4380
4381fi
4382if test x$ac_gc_check_string_free_list != x ; then
4383
4384$as_echo "#define GC_CHECK_STRING_FREE_LIST 1" >>confdefs.h
4385
4386fi
4387if test x$ac_xmalloc_overrun != x ; then
4388
4389$as_echo "#define XMALLOC_OVERRUN_CHECK 1" >>confdefs.h
4390
4391fi
4392if test x$ac_gc_check_cons_list != x ; then
4393
4394$as_echo "#define GC_CHECK_CONS_LIST 1" >>confdefs.h
4395
7ee3791f 4396fi
e4d35030 4397if test x$ac_glyphs_debug != x ; then
7ee3791f
GM
4398
4399$as_echo "#define GLYPH_DEBUG 1" >>confdefs.h
4400
067d23c9
KY
4401fi
4402
afd07e01
GM
4403# Check whether --enable-check-lisp-object-type was given.
4404if test "${enable_check_lisp_object_type+set}" = set; then :
4405 enableval=$enable_check_lisp_object_type; if test "${enableval}" != "no"; then
067d23c9 4406
afd07e01 4407$as_echo "#define CHECK_LISP_OBJECT_TYPE 1" >>confdefs.h
067d23c9
KY
4408
4409fi
4410fi
4411
4412
4413
4414# Check whether --enable-profiling was given.
4415if test "${enable_profiling+set}" = set; then :
4416 enableval=$enable_profiling; ac_enable_profiling="${enableval}"
4417fi
4418
4419if test x$ac_enable_profiling != x ; then
4420 PROFILING_CFLAGS="-DPROFILING=1 -pg"
4421else
4422 PROFILING_CFLAGS=
4423fi
4424
4425
4426# Check whether --enable-autodepend was given.
4427if test "${enable_autodepend+set}" = set; then :
4428 enableval=$enable_autodepend; ac_enable_autodepend="${enableval}"
4429else
4430 ac_enable_autodepend=yes
4431fi
4432
4433
4efe5ef9
GM
4434# Check whether --enable-gtk-deprecation-warnings was given.
4435if test "${enable_gtk_deprecation_warnings+set}" = set; then :
4436 enableval=$enable_gtk_deprecation_warnings; ac_enable_gtk_deprecation_warnings="${enableval}"
4437fi
4438
4439
067d23c9 4440#### Make srcdir absolute, if it isn't already. It's important to
b5591ebb 4441#### avoid running the file name through pwd unnecessarily, since pwd can
067d23c9
KY
4442#### give you automounter prefixes, which can go away. We do all this
4443#### so Emacs can find its files when run uninstalled.
4444## Make sure CDPATH doesn't affect cd (in case PWD is relative).
4445unset CDPATH
4446case "${srcdir}" in
4447 /* ) ;;
4448 . )
4449 ## We may be able to use the $PWD environment variable to make this
4450 ## absolute. But sometimes PWD is inaccurate.
b5591ebb 4451 ## Note: we used to use $PWD at the end instead of `pwd`,
067d23c9
KY
4452 ## but that tested only for a well-formed and valid PWD,
4453 ## it did not object when PWD was well-formed and valid but just wrong.
b5591ebb 4454 if test ".$PWD" != "." && test ".`(cd "$PWD" ; sh -c pwd)`" = ".`pwd`" ;
067d23c9
KY
4455 then
4456 srcdir="$PWD"
4457 else
b5591ebb 4458 srcdir=`(cd "$srcdir"; pwd)`
067d23c9
KY
4459 fi
4460 ;;
b5591ebb 4461 * ) srcdir=`(cd "$srcdir"; pwd)` ;;
067d23c9
KY
4462esac
4463
067d23c9
KY
4464### Canonicalize the configuration name.
4465
067d23c9
KY
4466# Make sure we can run config.sub.
4467$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
a9bec17c 4468 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
067d23c9
KY
4469
4470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4471$as_echo_n "checking build system type... " >&6; }
a9bec17c 4472if test "${ac_cv_build+set}" = set; then :
067d23c9
KY
4473 $as_echo_n "(cached) " >&6
4474else
4475 ac_build_alias=$build_alias
4476test "x$ac_build_alias" = x &&
4477 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4478test "x$ac_build_alias" = x &&
a9bec17c 4479 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
067d23c9 4480ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
a9bec17c 4481 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
067d23c9
KY
4482
4483fi
4484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4485$as_echo "$ac_cv_build" >&6; }
4486case $ac_cv_build in
4487*-*-*) ;;
a9bec17c 4488*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
067d23c9
KY
4489esac
4490build=$ac_cv_build
4491ac_save_IFS=$IFS; IFS='-'
4492set x $ac_cv_build
4493shift
4494build_cpu=$1
4495build_vendor=$2
4496shift; shift
4497# Remember, the first character of IFS is used to create $*,
4498# except with old shells:
4499build_os=$*
4500IFS=$ac_save_IFS
4501case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
4502
4503
4504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4505$as_echo_n "checking host system type... " >&6; }
a9bec17c 4506if test "${ac_cv_host+set}" = set; then :
067d23c9
KY
4507 $as_echo_n "(cached) " >&6
4508else
4509 if test "x$host_alias" = x; then
4510 ac_cv_host=$ac_cv_build
4511else
4512 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
a9bec17c 4513 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
067d23c9
KY
4514fi
4515
4516fi
4517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4518$as_echo "$ac_cv_host" >&6; }
4519case $ac_cv_host in
4520*-*-*) ;;
a9bec17c 4521*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
067d23c9
KY
4522esac
4523host=$ac_cv_host
4524ac_save_IFS=$IFS; IFS='-'
4525set x $ac_cv_host
4526shift
4527host_cpu=$1
4528host_vendor=$2
4529shift; shift
4530# Remember, the first character of IFS is used to create $*,
4531# except with old shells:
4532host_os=$*
4533IFS=$ac_save_IFS
4534case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
4535
4536
4537canonical=$host
4538configuration=${host_alias-${build_alias-$host}}
4539
4540
4541
4542### If you add support for a new configuration, add code to this
4543### switch statement to recognize your configuration name and select
42bbbe8b 4544### the appropriate operating system file.
067d23c9 4545
42bbbe8b 4546### You would hope that you could choose an s/*.h
067d23c9 4547### file based on the operating system portion. However, it turns out
42bbbe8b 4548### that each s/*.h file is pretty manufacturer-specific.
067d23c9
KY
4549### So we basically have to have a special case for each
4550### configuration name.
4551###
4552### As far as handling version numbers on operating systems is
4553### concerned, make sure things will fail in a fixable way. If
4554### /etc/MACHINES doesn't say anything about version numbers, be
4555### prepared to handle anything reasonably. If version numbers
4556### matter, be sure /etc/MACHINES says something about it.
4557
42bbbe8b 4558opsys='' unported=no
067d23c9
KY
4559case "${canonical}" in
4560
9b6e5515
GM
4561 ## GNU/Linux and similar ports
4562 *-*-linux* )
d6a003a8 4563 opsys=gnu-linux
d6a003a8
AS
4564 ;;
4565
067d23c9
KY
4566 ## FreeBSD ports
4567 *-*-freebsd* )
4568 opsys=freebsd
067d23c9
KY
4569 ;;
4570
4571 ## FreeBSD kernel + glibc based userland
4572 *-*-kfreebsd*gnu* )
4573 opsys=gnu-kfreebsd
067d23c9
KY
4574 ;;
4575
4576 ## NetBSD ports
4577 *-*-netbsd* )
4578 opsys=netbsd
067d23c9
KY
4579 ;;
4580
4581 ## OpenBSD ports
4582 *-*-openbsd* )
4583 opsys=openbsd
067d23c9
KY
4584 ;;
4585
067d23c9
KY
4586 ## Apple Darwin / Mac OS X
4587 *-apple-darwin* )
4588 case "${canonical}" in
42bbbe8b
GM
4589 i[3456]86-* ) ;;
4590 powerpc-* ) ;;
4591 x86_64-* ) ;;
067d23c9
KY
4592 * ) unported=yes ;;
4593 esac
4594 opsys=darwin
adf4198e
GM
4595 ## Use fink packages if available.
4596 ## FIXME find a better way to do this: http://debbugs.gnu.org/11507
4597## if test -d /sw/include && test -d /sw/lib; then
4598## GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib"
4599## NON_GCC_TEST_OPTIONS=${GCC_TEST_OPTIONS}
4600## fi
067d23c9
KY
4601 ;;
4602
4603 ## HP 9000 series 700 and 800, running HP/UX
4604 hppa*-hp-hpux10.2* )
d6a003a8 4605 opsys=hpux10-20
067d23c9
KY
4606 ;;
4607 hppa*-hp-hpux1[1-9]* )
d6a003a8 4608 opsys=hpux11
067d23c9
KY
4609 CFLAGS="-D_INCLUDE__STDC_A1_SOURCE $CFLAGS"
4610 ;;
4611
067d23c9 4612 ## IBM machines
067d23c9 4613 rs6000-ibm-aix4.[23]* )
42bbbe8b 4614 opsys=aix4-2
067d23c9
KY
4615 ;;
4616 powerpc-ibm-aix4.[23]* )
42bbbe8b 4617 opsys=aix4-2
067d23c9
KY
4618 ;;
4619 rs6000-ibm-aix[56]* )
42bbbe8b 4620 opsys=aix4-2
067d23c9
KY
4621 ;;
4622 powerpc-ibm-aix[56]* )
42bbbe8b 4623 opsys=aix4-2
067d23c9
KY
4624 ;;
4625
067d23c9
KY
4626 ## Silicon Graphics machines
4627 ## Iris 4D
4628 mips-sgi-irix6.5 )
fd44db7f 4629 opsys=irix6-5
067d23c9
KY
4630 # Without defining _LANGUAGE_C, things get masked out in the headers
4631 # so that, for instance, grepping for `free' in stdlib.h fails and
4632 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
067d23c9
KY
4633 NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
4634 ;;
4635
4636 ## Suns
067d23c9
KY
4637 *-sun-solaris* \
4638 | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* \
4639 | x86_64-*-solaris2* | x86_64-*-sunos5*)
4640 case "${canonical}" in
42bbbe8b
GM
4641 i[3456]86-*-* ) ;;
4642 amd64-*-*|x86_64-*-*) ;;
4643 sparc* ) ;;
067d23c9
KY
4644 * ) unported=yes ;;
4645 esac
4646 case "${canonical}" in
4647 *-sunos5.6* | *-solaris2.6* )
4648 opsys=sol2-6
067d23c9
KY
4649 RANLIB="ar -ts"
4650 ;;
4651 *-sunos5.[7-9]* | *-solaris2.[7-9]* )
4652 opsys=sol2-6
4653 emacs_check_sunpro_c=yes
067d23c9
KY
4654 ;;
4655 *-sunos5* | *-solaris* )
4656 opsys=sol2-10
4657 emacs_check_sunpro_c=yes
067d23c9
KY
4658 ;;
4659 esac
4660 ## Watch out for a compiler that we know will not work.
4661 case "${canonical}" in
4662 *-solaris* | *-sunos5* )
4663 if [ "x$CC" = x/usr/ucb/cc ]; then
4664 ## /usr/ucb/cc doesn't work;
4665 ## we should find some other compiler that does work.
4666 unset CC
4667 fi
4668 ;;
4669 *) ;;
4670 esac
4671 ;;
4672
067d23c9
KY
4673 ## Intel 386 machines where we don't care about the manufacturer.
4674 i[3456]86-*-* )
067d23c9
KY
4675 case "${canonical}" in
4676 *-cygwin ) opsys=cygwin ;;
5ec54608
GM
4677 *-darwin* ) opsys=darwin ;;
4678 *-sysv4.2uw* ) opsys=unixware ;;
4679 *-sysv5uw* ) opsys=unixware ;;
4680 *-sysv5OpenUNIX* ) opsys=unixware ;;
067d23c9
KY
4681 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
4682 esac
4683 ;;
4684
067d23c9
KY
4685 * )
4686 unported=yes
4687 ;;
4688esac
4689
4690### If the code above didn't choose an operating system, just choose
4691### an operating system based on the configuration name. You really
4692### only want to use this when you have no idea what the right
4693### operating system is; if you know what operating systems a machine
4694### runs, it's cleaner to make it explicit in the case statement
4695### above.
4696if test x"${opsys}" = x; then
4697 case "${canonical}" in
4698 *-gnu* ) opsys=gnu ;;
4699 * )
4700 unported=yes
4701 ;;
4702 esac
4703fi
4704
4705
4706
4707if test $unported = yes; then
a9bec17c 4708 as_fn_error "Emacs hasn't been ported to \`${canonical}' systems.
067d23c9
KY
4709Check \`etc/MACHINES' for recognized configuration names." "$LINENO" 5
4710fi
4711
067d23c9
KY
4712
4713#### Choose a compiler.
067d23c9
KY
4714
4715ac_ext=c
4716ac_cpp='$CPP $CPPFLAGS'
4717ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4718ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4719ac_compiler_gnu=$ac_cv_c_compiler_gnu
4720if test -n "$ac_tool_prefix"; then
4721 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4722set dummy ${ac_tool_prefix}gcc; ac_word=$2
4723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4724$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 4725if test "${ac_cv_prog_CC+set}" = set; then :
067d23c9
KY
4726 $as_echo_n "(cached) " >&6
4727else
4728 if test -n "$CC"; then
4729 ac_cv_prog_CC="$CC" # Let the user override the test.
4730else
4731as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4732for as_dir in $PATH
4733do
4734 IFS=$as_save_IFS
4735 test -z "$as_dir" && as_dir=.
4736 for ac_exec_ext in '' $ac_executable_extensions; do
4737 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4738 ac_cv_prog_CC="${ac_tool_prefix}gcc"
4739 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4740 break 2
4741 fi
4742done
4743 done
4744IFS=$as_save_IFS
4745
4746fi
4747fi
4748CC=$ac_cv_prog_CC
4749if test -n "$CC"; then
4750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4751$as_echo "$CC" >&6; }
4752else
4753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4754$as_echo "no" >&6; }
4755fi
4756
4757
4758fi
4759if test -z "$ac_cv_prog_CC"; then
4760 ac_ct_CC=$CC
4761 # Extract the first word of "gcc", so it can be a program name with args.
4762set dummy gcc; ac_word=$2
4763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4764$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 4765if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
067d23c9
KY
4766 $as_echo_n "(cached) " >&6
4767else
4768 if test -n "$ac_ct_CC"; then
4769 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4770else
4771as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4772for as_dir in $PATH
4773do
4774 IFS=$as_save_IFS
4775 test -z "$as_dir" && as_dir=.
4776 for ac_exec_ext in '' $ac_executable_extensions; do
4777 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4778 ac_cv_prog_ac_ct_CC="gcc"
4779 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4780 break 2
4781 fi
4782done
4783 done
4784IFS=$as_save_IFS
4785
4786fi
4787fi
4788ac_ct_CC=$ac_cv_prog_ac_ct_CC
4789if test -n "$ac_ct_CC"; then
4790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4791$as_echo "$ac_ct_CC" >&6; }
4792else
4793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4794$as_echo "no" >&6; }
4795fi
4796
4797 if test "x$ac_ct_CC" = x; then
4798 CC=""
4799 else
4800 case $cross_compiling:$ac_tool_warned in
4801yes:)
4802{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4803$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4804ac_tool_warned=yes ;;
4805esac
4806 CC=$ac_ct_CC
4807 fi
4808else
4809 CC="$ac_cv_prog_CC"
4810fi
4811
4812if test -z "$CC"; then
4813 if test -n "$ac_tool_prefix"; then
4814 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4815set dummy ${ac_tool_prefix}cc; ac_word=$2
4816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4817$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 4818if test "${ac_cv_prog_CC+set}" = set; then :
067d23c9
KY
4819 $as_echo_n "(cached) " >&6
4820else
4821 if test -n "$CC"; then
4822 ac_cv_prog_CC="$CC" # Let the user override the test.
4823else
4824as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4825for as_dir in $PATH
4826do
4827 IFS=$as_save_IFS
4828 test -z "$as_dir" && as_dir=.
4829 for ac_exec_ext in '' $ac_executable_extensions; do
4830 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4831 ac_cv_prog_CC="${ac_tool_prefix}cc"
4832 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4833 break 2
4834 fi
4835done
4836 done
4837IFS=$as_save_IFS
4838
4839fi
4840fi
4841CC=$ac_cv_prog_CC
4842if test -n "$CC"; then
4843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4844$as_echo "$CC" >&6; }
4845else
4846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4847$as_echo "no" >&6; }
4848fi
4849
4850
4851 fi
4852fi
4853if test -z "$CC"; then
4854 # Extract the first word of "cc", so it can be a program name with args.
4855set dummy cc; ac_word=$2
4856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4857$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 4858if test "${ac_cv_prog_CC+set}" = set; then :
067d23c9
KY
4859 $as_echo_n "(cached) " >&6
4860else
4861 if test -n "$CC"; then
4862 ac_cv_prog_CC="$CC" # Let the user override the test.
4863else
4864 ac_prog_rejected=no
4865as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4866for as_dir in $PATH
4867do
4868 IFS=$as_save_IFS
4869 test -z "$as_dir" && as_dir=.
4870 for ac_exec_ext in '' $ac_executable_extensions; do
4871 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4872 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4873 ac_prog_rejected=yes
4874 continue
4875 fi
4876 ac_cv_prog_CC="cc"
4877 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4878 break 2
4879 fi
4880done
4881 done
4882IFS=$as_save_IFS
4883
4884if test $ac_prog_rejected = yes; then
4885 # We found a bogon in the path, so make sure we never use it.
4886 set dummy $ac_cv_prog_CC
4887 shift
4888 if test $# != 0; then
4889 # We chose a different compiler from the bogus one.
4890 # However, it has the same basename, so the bogon will be chosen
4891 # first if we set CC to just the basename; use the full file name.
4892 shift
4893 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
4894 fi
4895fi
4896fi
4897fi
4898CC=$ac_cv_prog_CC
4899if test -n "$CC"; then
4900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4901$as_echo "$CC" >&6; }
4902else
4903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4904$as_echo "no" >&6; }
4905fi
4906
4907
4908fi
4909if test -z "$CC"; then
4910 if test -n "$ac_tool_prefix"; then
4911 for ac_prog in cl.exe
4912 do
4913 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4914set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4916$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 4917if test "${ac_cv_prog_CC+set}" = set; then :
067d23c9
KY
4918 $as_echo_n "(cached) " >&6
4919else
4920 if test -n "$CC"; then
4921 ac_cv_prog_CC="$CC" # Let the user override the test.
4922else
4923as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4924for as_dir in $PATH
4925do
4926 IFS=$as_save_IFS
4927 test -z "$as_dir" && as_dir=.
4928 for ac_exec_ext in '' $ac_executable_extensions; do
4929 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4930 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4931 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4932 break 2
4933 fi
4934done
4935 done
4936IFS=$as_save_IFS
4937
4938fi
4939fi
4940CC=$ac_cv_prog_CC
4941if test -n "$CC"; then
4942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4943$as_echo "$CC" >&6; }
4944else
4945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4946$as_echo "no" >&6; }
4947fi
4948
4949
4950 test -n "$CC" && break
4951 done
4952fi
4953if test -z "$CC"; then
4954 ac_ct_CC=$CC
4955 for ac_prog in cl.exe
4956do
4957 # Extract the first word of "$ac_prog", so it can be a program name with args.
4958set dummy $ac_prog; ac_word=$2
4959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4960$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 4961if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
067d23c9
KY
4962 $as_echo_n "(cached) " >&6
4963else
4964 if test -n "$ac_ct_CC"; then
4965 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4966else
4967as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4968for as_dir in $PATH
4969do
4970 IFS=$as_save_IFS
4971 test -z "$as_dir" && as_dir=.
4972 for ac_exec_ext in '' $ac_executable_extensions; do
4973 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4974 ac_cv_prog_ac_ct_CC="$ac_prog"
4975 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4976 break 2
4977 fi
4978done
4979 done
4980IFS=$as_save_IFS
4981
4982fi
4983fi
4984ac_ct_CC=$ac_cv_prog_ac_ct_CC
4985if test -n "$ac_ct_CC"; then
4986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4987$as_echo "$ac_ct_CC" >&6; }
4988else
4989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4990$as_echo "no" >&6; }
4991fi
4992
4993
4994 test -n "$ac_ct_CC" && break
4995done
4996
4997 if test "x$ac_ct_CC" = x; then
4998 CC=""
4999 else
5000 case $cross_compiling:$ac_tool_warned in
5001yes:)
5002{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5003$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5004ac_tool_warned=yes ;;
5005esac
5006 CC=$ac_ct_CC
5007 fi
5008fi
5009
5010fi
5011
5012
5013test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5014$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
a9bec17c
GM
5015as_fn_error "no acceptable C compiler found in \$PATH
5016See \`config.log' for more details." "$LINENO" 5; }
067d23c9
KY
5017
5018# Provide some information about the compiler.
5019$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
5020set X $ac_compile
5021ac_compiler=$2
5022for ac_option in --version -v -V -qversion; do
5023 { { ac_try="$ac_compiler $ac_option >&5"
5024case "(($ac_try" in
5025 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5026 *) ac_try_echo=$ac_try;;
5027esac
5028eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5029$as_echo "$ac_try_echo"; } >&5
5030 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
5031 ac_status=$?
5032 if test -s conftest.err; then
5033 sed '10a\
5034... rest of stderr output deleted ...
5035 10q' conftest.err >conftest.er1
5036 cat conftest.er1 >&5
5037 fi
5038 rm -f conftest.er1 conftest.err
5039 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5040 test $ac_status = 0; }
5041done
5042
5043cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5044/* end confdefs.h. */
5045
5046int
5047main ()
5048{
5049
5050 ;
5051 return 0;
5052}
5053_ACEOF
5054ac_clean_files_save=$ac_clean_files
5055ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
5056# Try to create an executable without -o first, disregard a.out.
5057# It will help us diagnose broken compilers, and finding out an intuition
5058# of exeext.
5059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
5060$as_echo_n "checking whether the C compiler works... " >&6; }
5061ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
5062
5063# The possible output files:
5064ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
5065
5066ac_rmfiles=
5067for ac_file in $ac_files
5068do
5069 case $ac_file in
5070 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
5071 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
5072 esac
5073done
5074rm -f $ac_rmfiles
5075
5076if { { ac_try="$ac_link_default"
5077case "(($ac_try" in
5078 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5079 *) ac_try_echo=$ac_try;;
5080esac
5081eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5082$as_echo "$ac_try_echo"; } >&5
5083 (eval "$ac_link_default") 2>&5
5084 ac_status=$?
5085 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5086 test $ac_status = 0; }; then :
5087 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
5088# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
5089# in a Makefile. We should not override ac_cv_exeext if it was cached,
5090# so that the user can short-circuit this test for compilers unknown to
5091# Autoconf.
5092for ac_file in $ac_files ''
5093do
5094 test -f "$ac_file" || continue
5095 case $ac_file in
5096 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
5097 ;;
5098 [ab].out )
5099 # We found the default executable, but exeext='' is most
5100 # certainly right.
5101 break;;
5102 *.* )
5103 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
5104 then :; else
5105 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
5106 fi
5107 # We set ac_cv_exeext here because the later test for it is not
5108 # safe: cross compilers may not add the suffix if given an `-o'
5109 # argument, so we may need to know it at that point already.
5110 # Even if this section looks crufty: it has the advantage of
5111 # actually working.
5112 break;;
5113 * )
5114 break;;
5115 esac
5116done
5117test "$ac_cv_exeext" = no && ac_cv_exeext=
5118
5119else
5120 ac_file=''
5121fi
5122if test -z "$ac_file"; then :
5123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5124$as_echo "no" >&6; }
5125$as_echo "$as_me: failed program was:" >&5
5126sed 's/^/| /' conftest.$ac_ext >&5
5127
5128{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5129$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
a9bec17c
GM
5130{ as_fn_set_status 77
5131as_fn_error "C compiler cannot create executables
5132See \`config.log' for more details." "$LINENO" 5; }; }
067d23c9
KY
5133else
5134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5135$as_echo "yes" >&6; }
5136fi
5137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
5138$as_echo_n "checking for C compiler default output file name... " >&6; }
5139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
5140$as_echo "$ac_file" >&6; }
5141ac_exeext=$ac_cv_exeext
5142
5143rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
5144ac_clean_files=$ac_clean_files_save
5145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
5146$as_echo_n "checking for suffix of executables... " >&6; }
5147if { { ac_try="$ac_link"
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") 2>&5
5155 ac_status=$?
5156 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5157 test $ac_status = 0; }; then :
5158 # If both `conftest.exe' and `conftest' are `present' (well, observable)
5159# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
5160# work properly (i.e., refer to `conftest.exe'), while it won't with
5161# `rm'.
5162for ac_file in conftest.exe conftest conftest.*; do
5163 test -f "$ac_file" || continue
5164 case $ac_file in
5165 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
5166 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
5167 break;;
5168 * ) break;;
5169 esac
5170done
5171else
5172 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5173$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
a9bec17c
GM
5174as_fn_error "cannot compute suffix of executables: cannot compile and link
5175See \`config.log' for more details." "$LINENO" 5; }
067d23c9
KY
5176fi
5177rm -f conftest conftest$ac_cv_exeext
5178{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
5179$as_echo "$ac_cv_exeext" >&6; }
5180
5181rm -f conftest.$ac_ext
5182EXEEXT=$ac_cv_exeext
5183ac_exeext=$EXEEXT
5184cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5185/* end confdefs.h. */
5186#include <stdio.h>
5187int
5188main ()
5189{
5190FILE *f = fopen ("conftest.out", "w");
5191 return ferror (f) || fclose (f) != 0;
5192
5193 ;
5194 return 0;
5195}
5196_ACEOF
5197ac_clean_files="$ac_clean_files conftest.out"
5198# Check that the compiler produces executables we can run. If not, either
5199# the compiler is broken, or we cross compile.
5200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
5201$as_echo_n "checking whether we are cross compiling... " >&6; }
5202if test "$cross_compiling" != yes; then
5203 { { ac_try="$ac_link"
5204case "(($ac_try" in
5205 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5206 *) ac_try_echo=$ac_try;;
5207esac
5208eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5209$as_echo "$ac_try_echo"; } >&5
5210 (eval "$ac_link") 2>&5
5211 ac_status=$?
5212 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5213 test $ac_status = 0; }
5214 if { ac_try='./conftest$ac_cv_exeext'
5215 { { case "(($ac_try" in
5216 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5217 *) ac_try_echo=$ac_try;;
5218esac
5219eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5220$as_echo "$ac_try_echo"; } >&5
5221 (eval "$ac_try") 2>&5
5222 ac_status=$?
5223 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5224 test $ac_status = 0; }; }; then
5225 cross_compiling=no
5226 else
5227 if test "$cross_compiling" = maybe; then
5228 cross_compiling=yes
5229 else
5230 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5231$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
a9bec17c 5232as_fn_error "cannot run C compiled programs.
067d23c9 5233If you meant to cross compile, use \`--host'.
a9bec17c 5234See \`config.log' for more details." "$LINENO" 5; }
067d23c9
KY
5235 fi
5236 fi
5237fi
5238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
5239$as_echo "$cross_compiling" >&6; }
5240
5241rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
5242ac_clean_files=$ac_clean_files_save
5243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
5244$as_echo_n "checking for suffix of object files... " >&6; }
a9bec17c 5245if test "${ac_cv_objext+set}" = set; then :
067d23c9
KY
5246 $as_echo_n "(cached) " >&6
5247else
5248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5249/* end confdefs.h. */
5250
5251int
5252main ()
5253{
5254
5255 ;
5256 return 0;
5257}
5258_ACEOF
5259rm -f conftest.o conftest.obj
5260if { { ac_try="$ac_compile"
5261case "(($ac_try" in
5262 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5263 *) ac_try_echo=$ac_try;;
5264esac
5265eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5266$as_echo "$ac_try_echo"; } >&5
5267 (eval "$ac_compile") 2>&5
5268 ac_status=$?
5269 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5270 test $ac_status = 0; }; then :
5271 for ac_file in conftest.o conftest.obj conftest.*; do
5272 test -f "$ac_file" || continue;
5273 case $ac_file in
5274 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
5275 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
5276 break;;
5277 esac
5278done
5279else
5280 $as_echo "$as_me: failed program was:" >&5
5281sed 's/^/| /' conftest.$ac_ext >&5
5282
5283{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5284$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
a9bec17c
GM
5285as_fn_error "cannot compute suffix of object files: cannot compile
5286See \`config.log' for more details." "$LINENO" 5; }
067d23c9
KY
5287fi
5288rm -f conftest.$ac_cv_objext conftest.$ac_ext
5289fi
5290{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
5291$as_echo "$ac_cv_objext" >&6; }
5292OBJEXT=$ac_cv_objext
5293ac_objext=$OBJEXT
5294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
5295$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
a9bec17c 5296if test "${ac_cv_c_compiler_gnu+set}" = set; then :
067d23c9
KY
5297 $as_echo_n "(cached) " >&6
5298else
5299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5300/* end confdefs.h. */
5301
5302int
5303main ()
5304{
5305#ifndef __GNUC__
5306 choke me
5307#endif
5308
5309 ;
5310 return 0;
5311}
5312_ACEOF
5313if ac_fn_c_try_compile "$LINENO"; then :
5314 ac_compiler_gnu=yes
5315else
5316 ac_compiler_gnu=no
5317fi
5318rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5319ac_cv_c_compiler_gnu=$ac_compiler_gnu
5320
5321fi
5322{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
5323$as_echo "$ac_cv_c_compiler_gnu" >&6; }
5324if test $ac_compiler_gnu = yes; then
5325 GCC=yes
5326else
5327 GCC=
5328fi
5329ac_test_CFLAGS=${CFLAGS+set}
5330ac_save_CFLAGS=$CFLAGS
5331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
5332$as_echo_n "checking whether $CC accepts -g... " >&6; }
a9bec17c 5333if test "${ac_cv_prog_cc_g+set}" = set; then :
067d23c9
KY
5334 $as_echo_n "(cached) " >&6
5335else
5336 ac_save_c_werror_flag=$ac_c_werror_flag
5337 ac_c_werror_flag=yes
5338 ac_cv_prog_cc_g=no
5339 CFLAGS="-g"
5340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5341/* end confdefs.h. */
5342
5343int
5344main ()
5345{
5346
5347 ;
5348 return 0;
5349}
5350_ACEOF
5351if ac_fn_c_try_compile "$LINENO"; then :
5352 ac_cv_prog_cc_g=yes
5353else
5354 CFLAGS=""
5355 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5356/* end confdefs.h. */
5357
5358int
5359main ()
5360{
5361
5362 ;
5363 return 0;
5364}
5365_ACEOF
5366if ac_fn_c_try_compile "$LINENO"; then :
5367
5368else
5369 ac_c_werror_flag=$ac_save_c_werror_flag
5370 CFLAGS="-g"
5371 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5372/* end confdefs.h. */
5373
5374int
5375main ()
5376{
5377
5378 ;
5379 return 0;
5380}
5381_ACEOF
5382if ac_fn_c_try_compile "$LINENO"; then :
5383 ac_cv_prog_cc_g=yes
5384fi
5385rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5386fi
5387rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5388fi
5389rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5390 ac_c_werror_flag=$ac_save_c_werror_flag
5391fi
5392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
5393$as_echo "$ac_cv_prog_cc_g" >&6; }
5394if test "$ac_test_CFLAGS" = set; then
5395 CFLAGS=$ac_save_CFLAGS
5396elif test $ac_cv_prog_cc_g = yes; then
5397 if test "$GCC" = yes; then
5398 CFLAGS="-g -O2"
5399 else
5400 CFLAGS="-g"
5401 fi
5402else
5403 if test "$GCC" = yes; then
5404 CFLAGS="-O2"
5405 else
5406 CFLAGS=
5407 fi
5408fi
5409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
5410$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
a9bec17c 5411if test "${ac_cv_prog_cc_c89+set}" = set; then :
067d23c9
KY
5412 $as_echo_n "(cached) " >&6
5413else
5414 ac_cv_prog_cc_c89=no
5415ac_save_CC=$CC
5416cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5417/* end confdefs.h. */
5418#include <stdarg.h>
5419#include <stdio.h>
5420#include <sys/types.h>
5421#include <sys/stat.h>
5422/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
5423struct buf { int x; };
5424FILE * (*rcsopen) (struct buf *, struct stat *, int);
5425static char *e (p, i)
5426 char **p;
5427 int i;
5428{
5429 return p[i];
5430}
5431static char *f (char * (*g) (char **, int), char **p, ...)
5432{
5433 char *s;
5434 va_list v;
5435 va_start (v,p);
5436 s = g (p, va_arg (v,int));
5437 va_end (v);
5438 return s;
5439}
5440
5441/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
5442 function prototypes and stuff, but not '\xHH' hex character constants.
5443 These don't provoke an error unfortunately, instead are silently treated
5444 as 'x'. The following induces an error, until -std is added to get
5445 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
5446 array size at least. It's necessary to write '\x00'==0 to get something
5447 that's true only with -std. */
5448int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5449
5450/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5451 inside strings and character constants. */
5452#define FOO(x) 'x'
5453int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5454
5455int test (int i, double x);
5456struct s1 {int (*f) (int a);};
5457struct s2 {int (*f) (double a);};
5458int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5459int argc;
5460char **argv;
5461int
5462main ()
5463{
5464return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
5465 ;
5466 return 0;
5467}
5468_ACEOF
5469for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5470 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5471do
5472 CC="$ac_save_CC $ac_arg"
5473 if ac_fn_c_try_compile "$LINENO"; then :
5474 ac_cv_prog_cc_c89=$ac_arg
5475fi
5476rm -f core conftest.err conftest.$ac_objext
5477 test "x$ac_cv_prog_cc_c89" != "xno" && break
5478done
743c80a7
PE
5479rm -f conftest.$ac_ext
5480CC=$ac_save_CC
5481
5482fi
5483# AC_CACHE_VAL
5484case "x$ac_cv_prog_cc_c89" in
5485 x)
5486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5487$as_echo "none needed" >&6; } ;;
5488 xno)
5489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5490$as_echo "unsupported" >&6; } ;;
5491 *)
5492 CC="$CC $ac_cv_prog_cc_c89"
5493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5494$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
5495esac
5496if test "x$ac_cv_prog_cc_c89" != xno; then :
5497
5498fi
5499
5500ac_ext=c
5501ac_cpp='$CPP $CPPFLAGS'
5502ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5503ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5504ac_compiler_gnu=$ac_cv_c_compiler_gnu
5505DEPDIR="${am__leading_dot}deps"
5506
5507ac_config_commands="$ac_config_commands depfiles"
5508
5509
5510am_make=${MAKE-make}
5511cat > confinc << 'END'
5512am__doit:
5513 @echo this is the am__doit target
5514.PHONY: am__doit
5515END
5516# If we don't find an include directive, just comment out the code.
5517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
5518$as_echo_n "checking for style of include used by $am_make... " >&6; }
5519am__include="#"
5520am__quote=
5521_am_result=none
5522# First try GNU make style include.
5523echo "include confinc" > confmf
5524# Ignore all kinds of additional output from `make'.
5525case `$am_make -s -f confmf 2> /dev/null` in #(
5526*the\ am__doit\ target*)
5527 am__include=include
5528 am__quote=
5529 _am_result=GNU
5530 ;;
5531esac
5532# Now try BSD make style include.
5533if test "$am__include" = "#"; then
5534 echo '.include "confinc"' > confmf
5535 case `$am_make -s -f confmf 2> /dev/null` in #(
5536 *the\ am__doit\ target*)
5537 am__include=.include
5538 am__quote="\""
5539 _am_result=BSD
5540 ;;
5541 esac
5542fi
5543
5544
5545{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
5546$as_echo "$_am_result" >&6; }
5547rm -f confinc confmf
5548
5549# Check whether --enable-dependency-tracking was given.
5550if test "${enable_dependency_tracking+set}" = set; then :
5551 enableval=$enable_dependency_tracking;
5552fi
5553
5554if test "x$enable_dependency_tracking" != xno; then
5555 am_depcomp="$ac_aux_dir/depcomp"
5556 AMDEPBACKSLASH='\'
5557fi
5558 if test "x$enable_dependency_tracking" != xno; then
5559 AMDEP_TRUE=
5560 AMDEP_FALSE='#'
5561else
5562 AMDEP_TRUE='#'
5563 AMDEP_FALSE=
5564fi
5565
5566
5567
5568depcc="$CC" am_compiler_list=
5569
5570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
5571$as_echo_n "checking dependency style of $depcc... " >&6; }
a9bec17c 5572if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
743c80a7
PE
5573 $as_echo_n "(cached) " >&6
5574else
5575 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
5576 # We make a subdir and do the tests there. Otherwise we can end up
5577 # making bogus files that we don't know about and never remove. For
5578 # instance it was reported that on HP-UX the gcc test will end up
5579 # making a dummy file named `D' -- because `-MD' means `put the output
5580 # in D'.
5581 mkdir conftest.dir
5582 # Copy depcomp to subdir because otherwise we won't find it if we're
5583 # using a relative directory.
5584 cp "$am_depcomp" conftest.dir
5585 cd conftest.dir
5586 # We will build objects and dependencies in a subdirectory because
5587 # it helps to detect inapplicable dependency modes. For instance
5588 # both Tru64's cc and ICC support -MD to output dependencies as a
5589 # side effect of compilation, but ICC will put the dependencies in
5590 # the current directory while Tru64 will put them in the object
5591 # directory.
5592 mkdir sub
5593
5594 am_cv_CC_dependencies_compiler_type=none
5595 if test "$am_compiler_list" = ""; then
5596 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5597 fi
5598 am__universal=false
5599 case " $depcc " in #(
5600 *\ -arch\ *\ -arch\ *) am__universal=true ;;
5601 esac
5602
5603 for depmode in $am_compiler_list; do
5604 # Setup a source with many dependencies, because some compilers
5605 # like to wrap large dependency lists on column 80 (with \), and
5606 # we should not choose a depcomp mode which is confused by this.
5607 #
5608 # We need to recreate these files for each test, as the compiler may
5609 # overwrite some of them when testing with obscure command lines.
5610 # This happens at least with the AIX C compiler.
5611 : > sub/conftest.c
5612 for i in 1 2 3 4 5 6; do
5613 echo '#include "conftst'$i'.h"' >> sub/conftest.c
5614 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
5615 # Solaris 8's {/usr,}/bin/sh.
5616 touch sub/conftst$i.h
5617 done
5618 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
5619
5620 # We check with `-c' and `-o' for the sake of the "dashmstdout"
5621 # mode. It turns out that the SunPro C++ compiler does not properly
5622 # handle `-M -o', and we need to detect this. Also, some Intel
5623 # versions had trouble with output in subdirs
5624 am__obj=sub/conftest.${OBJEXT-o}
5625 am__minus_obj="-o $am__obj"
5626 case $depmode in
5627 gcc)
5628 # This depmode causes a compiler race in universal mode.
5629 test "$am__universal" = false || continue
5630 ;;
5631 nosideeffect)
5632 # after this tag, mechanisms are not by side-effect, so they'll
5633 # only be used when explicitly requested
5634 if test "x$enable_dependency_tracking" = xyes; then
5635 continue
5636 else
5637 break
5638 fi
5639 ;;
5640 msvisualcpp | msvcmsys)
5641 # This compiler won't grok `-c -o', but also, the minuso test has
5642 # not run yet. These depmodes are late enough in the game, and
5643 # so weak that their functioning should not be impacted.
5644 am__obj=conftest.${OBJEXT-o}
5645 am__minus_obj=
5646 ;;
5647 none) break ;;
5648 esac
5649 if depmode=$depmode \
5650 source=sub/conftest.c object=$am__obj \
5651 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
5652 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
5653 >/dev/null 2>conftest.err &&
5654 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
5655 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
5656 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
5657 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
5658 # icc doesn't choke on unknown options, it will just issue warnings
5659 # or remarks (even with -Werror). So we grep stderr for any message
5660 # that says an option was ignored or not supported.
5661 # When given -MP, icc 7.0 and 7.1 complain thusly:
5662 # icc: Command line warning: ignoring option '-M'; no argument required
5663 # The diagnosis changed in icc 8.0:
5664 # icc: Command line remark: option '-MP' not supported
5665 if (grep 'ignoring option' conftest.err ||
5666 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
5667 am_cv_CC_dependencies_compiler_type=$depmode
5668 break
5669 fi
5670 fi
5671 done
5672
5673 cd ..
5674 rm -rf conftest.dir
5675else
5676 am_cv_CC_dependencies_compiler_type=none
5677fi
5678
5679fi
5680{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
5681$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
5682CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
5683
5684 if
5685 test "x$enable_dependency_tracking" != xno \
5686 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
5687 am__fastdepCC_TRUE=
5688 am__fastdepCC_FALSE='#'
5689else
5690 am__fastdepCC_TRUE='#'
5691 am__fastdepCC_FALSE=
5692fi
5693
5694
5695if test "x$CC" != xcc; then
5696 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5
5697$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
5698else
5699 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5
5700$as_echo_n "checking whether cc understands -c and -o together... " >&6; }
5701fi
5702set dummy $CC; ac_cc=`$as_echo "$2" |
5703 sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
a9bec17c 5704if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then :
743c80a7
PE
5705 $as_echo_n "(cached) " >&6
5706else
5707 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5708/* end confdefs.h. */
5709
5710int
5711main ()
5712{
5713
5714 ;
5715 return 0;
5716}
5717_ACEOF
5718# Make sure it works both with $CC and with simple cc.
5719# We do the test twice because some compilers refuse to overwrite an
5720# existing .o file with -o, though they will create one.
5721ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
5722rm -f conftest2.*
5723if { { case "(($ac_try" in
5724 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5725 *) ac_try_echo=$ac_try;;
5726esac
5727eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5728$as_echo "$ac_try_echo"; } >&5
5729 (eval "$ac_try") 2>&5
5730 ac_status=$?
5731 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5732 test $ac_status = 0; } &&
5733 test -f conftest2.$ac_objext && { { case "(($ac_try" in
5734 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5735 *) ac_try_echo=$ac_try;;
5736esac
5737eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5738$as_echo "$ac_try_echo"; } >&5
5739 (eval "$ac_try") 2>&5
5740 ac_status=$?
5741 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5742 test $ac_status = 0; };
5743then
5744 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
5745 if test "x$CC" != xcc; then
5746 # Test first that cc exists at all.
5747 if { ac_try='cc -c conftest.$ac_ext >&5'
5748 { { case "(($ac_try" in
5749 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5750 *) ac_try_echo=$ac_try;;
5751esac
5752eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5753$as_echo "$ac_try_echo"; } >&5
5754 (eval "$ac_try") 2>&5
5755 ac_status=$?
5756 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5757 test $ac_status = 0; }; }; then
5758 ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
5759 rm -f conftest2.*
5760 if { { case "(($ac_try" in
5761 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5762 *) ac_try_echo=$ac_try;;
5763esac
5764eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5765$as_echo "$ac_try_echo"; } >&5
5766 (eval "$ac_try") 2>&5
5767 ac_status=$?
5768 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5769 test $ac_status = 0; } &&
5770 test -f conftest2.$ac_objext && { { case "(($ac_try" in
5771 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5772 *) ac_try_echo=$ac_try;;
5773esac
5774eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5775$as_echo "$ac_try_echo"; } >&5
5776 (eval "$ac_try") 2>&5
5777 ac_status=$?
5778 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5779 test $ac_status = 0; };
5780 then
5781 # cc works too.
5782 :
5783 else
5784 # cc exists but doesn't like -o.
5785 eval ac_cv_prog_cc_${ac_cc}_c_o=no
5786 fi
5787 fi
5788 fi
5789else
5790 eval ac_cv_prog_cc_${ac_cc}_c_o=no
5791fi
5792rm -f core conftest*
5793
5794fi
5795if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
5796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5797$as_echo "yes" >&6; }
5798else
5799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5800$as_echo "no" >&6; }
5801
5802$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h
5803
5804fi
5805
5806# FIXME: we rely on the cache variable name because
5807# there is no other way.
5808set dummy $CC
5809am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
5810eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
5811if test "$am_t" != yes; then
5812 # Losing compiler, so override with the script.
5813 # FIXME: It is wrong to rewrite CC.
5814 # But if we don't then we get into trouble of one sort or another.
5815 # A longer-term fix would be to have automake use am__CC in this case,
5816 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
5817 CC="$am_aux_dir/compile $CC"
5818fi
5819
5820
5821
5ec54608
GM
5822if test x$GCC = xyes; then
5823 test "x$GCC_TEST_OPTIONS" != x && CC="$CC $GCC_TEST_OPTIONS"
5824else
5825 test "x$NON_GCC_TEST_OPTIONS" != x && CC="$CC $NON_GCC_TEST_OPTIONS"
5826fi
5827
710f5812
GM
5828# Avoid gnulib's tests for O_NOATIME and O_NOFOLLOW, as we don't use them.
5829
f077f61d
GM
5830# Avoid gnulib's threadlib module, as we do threads our own way.
5831
5832
5ec54608 5833# Initialize gnulib right after choosing the compiler.
743c80a7 5834
067d23c9
KY
5835ac_ext=c
5836ac_cpp='$CPP $CPPFLAGS'
5837ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5838ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5839ac_compiler_gnu=$ac_cv_c_compiler_gnu
5840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
5841$as_echo_n "checking how to run the C preprocessor... " >&6; }
5842# On Suns, sometimes $CPP names a directory.
5843if test -n "$CPP" && test -d "$CPP"; then
5844 CPP=
5845fi
5846if test -z "$CPP"; then
a9bec17c 5847 if test "${ac_cv_prog_CPP+set}" = set; then :
067d23c9
KY
5848 $as_echo_n "(cached) " >&6
5849else
5850 # Double quotes because CPP needs to be expanded
5851 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
5852 do
5853 ac_preproc_ok=false
5854for ac_c_preproc_warn_flag in '' yes
5855do
5856 # Use a header file that comes with gcc, so configuring glibc
5857 # with a fresh cross-compiler works.
5858 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5859 # <limits.h> exists even on freestanding compilers.
5860 # On the NeXT, cc -E runs the code through the compiler's parser,
5861 # not just through cpp. "Syntax error" is here to catch this case.
5862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5863/* end confdefs.h. */
5864#ifdef __STDC__
5865# include <limits.h>
5866#else
5867# include <assert.h>
5868#endif
5869 Syntax error
5870_ACEOF
5871if ac_fn_c_try_cpp "$LINENO"; then :
5872
5873else
5874 # Broken: fails on valid input.
5875continue
5876fi
a9bec17c 5877rm -f conftest.err conftest.$ac_ext
067d23c9
KY
5878
5879 # OK, works on sane cases. Now check whether nonexistent headers
5880 # can be detected and how.
5881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5882/* end confdefs.h. */
5883#include <ac_nonexistent.h>
5884_ACEOF
5885if ac_fn_c_try_cpp "$LINENO"; then :
5886 # Broken: success on invalid input.
5887continue
5888else
5889 # Passes both tests.
5890ac_preproc_ok=:
5891break
5892fi
a9bec17c 5893rm -f conftest.err conftest.$ac_ext
067d23c9
KY
5894
5895done
5896# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
a9bec17c 5897rm -f conftest.err conftest.$ac_ext
067d23c9
KY
5898if $ac_preproc_ok; then :
5899 break
5900fi
5901
5902 done
5903 ac_cv_prog_CPP=$CPP
5904
5905fi
5906 CPP=$ac_cv_prog_CPP
5907else
5908 ac_cv_prog_CPP=$CPP
5909fi
5910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
5911$as_echo "$CPP" >&6; }
5912ac_preproc_ok=false
5913for ac_c_preproc_warn_flag in '' yes
5914do
5915 # Use a header file that comes with gcc, so configuring glibc
5916 # with a fresh cross-compiler works.
5917 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5918 # <limits.h> exists even on freestanding compilers.
5919 # On the NeXT, cc -E runs the code through the compiler's parser,
5920 # not just through cpp. "Syntax error" is here to catch this case.
5921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5922/* end confdefs.h. */
5923#ifdef __STDC__
5924# include <limits.h>
5925#else
5926# include <assert.h>
5927#endif
5928 Syntax error
5929_ACEOF
5930if ac_fn_c_try_cpp "$LINENO"; then :
5931
5932else
5933 # Broken: fails on valid input.
5934continue
5935fi
a9bec17c 5936rm -f conftest.err conftest.$ac_ext
067d23c9
KY
5937
5938 # OK, works on sane cases. Now check whether nonexistent headers
5939 # can be detected and how.
5940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5941/* end confdefs.h. */
5942#include <ac_nonexistent.h>
5943_ACEOF
5944if ac_fn_c_try_cpp "$LINENO"; then :
5945 # Broken: success on invalid input.
5946continue
5947else
5948 # Passes both tests.
5949ac_preproc_ok=:
5950break
5951fi
a9bec17c 5952rm -f conftest.err conftest.$ac_ext
067d23c9
KY
5953
5954done
5955# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
a9bec17c 5956rm -f conftest.err conftest.$ac_ext
067d23c9
KY
5957if $ac_preproc_ok; then :
5958
5959else
5960 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5961$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
a9bec17c
GM
5962as_fn_error "C preprocessor \"$CPP\" fails sanity check
5963See \`config.log' for more details." "$LINENO" 5; }
067d23c9
KY
5964fi
5965
5966ac_ext=c
5967ac_cpp='$CPP $CPPFLAGS'
5968ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5969ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5970ac_compiler_gnu=$ac_cv_c_compiler_gnu
5971
5972
5973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5974$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
a9bec17c 5975if test "${ac_cv_path_GREP+set}" = set; then :
067d23c9
KY
5976 $as_echo_n "(cached) " >&6
5977else
5978 if test -z "$GREP"; then
5979 ac_path_GREP_found=false
5980 # Loop through the user's path and test for each of PROGNAME-LIST
5981 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5982for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5983do
5984 IFS=$as_save_IFS
5985 test -z "$as_dir" && as_dir=.
5986 for ac_prog in grep ggrep; do
5987 for ac_exec_ext in '' $ac_executable_extensions; do
5988 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5989 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
5990# Check for GNU ac_path_GREP and select it if it is found.
5991 # Check for GNU $ac_path_GREP
5992case `"$ac_path_GREP" --version 2>&1` in
5993*GNU*)
5994 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5995*)
5996 ac_count=0
5997 $as_echo_n 0123456789 >"conftest.in"
5998 while :
5999 do
6000 cat "conftest.in" "conftest.in" >"conftest.tmp"
6001 mv "conftest.tmp" "conftest.in"
6002 cp "conftest.in" "conftest.nl"
6003 $as_echo 'GREP' >> "conftest.nl"
6004 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6005 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6006 as_fn_arith $ac_count + 1 && ac_count=$as_val
6007 if test $ac_count -gt ${ac_path_GREP_max-0}; then
6008 # Best one so far, save it but keep looking for a better one
6009 ac_cv_path_GREP="$ac_path_GREP"
6010 ac_path_GREP_max=$ac_count
6011 fi
6012 # 10*(2^10) chars as input seems more than enough
6013 test $ac_count -gt 10 && break
6014 done
6015 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6016esac
6017
6018 $ac_path_GREP_found && break 3
6019 done
6020 done
6021 done
6022IFS=$as_save_IFS
6023 if test -z "$ac_cv_path_GREP"; then
a9bec17c 6024 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
067d23c9
KY
6025 fi
6026else
6027 ac_cv_path_GREP=$GREP
6028fi
6029
6030fi
6031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6032$as_echo "$ac_cv_path_GREP" >&6; }
6033 GREP="$ac_cv_path_GREP"
6034
6035
6036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6037$as_echo_n "checking for egrep... " >&6; }
a9bec17c 6038if test "${ac_cv_path_EGREP+set}" = set; then :
067d23c9
KY
6039 $as_echo_n "(cached) " >&6
6040else
6041 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6042 then ac_cv_path_EGREP="$GREP -E"
6043 else
6044 if test -z "$EGREP"; then
6045 ac_path_EGREP_found=false
6046 # Loop through the user's path and test for each of PROGNAME-LIST
6047 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6048for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6049do
6050 IFS=$as_save_IFS
6051 test -z "$as_dir" && as_dir=.
6052 for ac_prog in egrep; do
6053 for ac_exec_ext in '' $ac_executable_extensions; do
6054 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6055 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
6056# Check for GNU ac_path_EGREP and select it if it is found.
6057 # Check for GNU $ac_path_EGREP
6058case `"$ac_path_EGREP" --version 2>&1` in
6059*GNU*)
6060 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6061*)
6062 ac_count=0
6063 $as_echo_n 0123456789 >"conftest.in"
6064 while :
6065 do
6066 cat "conftest.in" "conftest.in" >"conftest.tmp"
6067 mv "conftest.tmp" "conftest.in"
6068 cp "conftest.in" "conftest.nl"
6069 $as_echo 'EGREP' >> "conftest.nl"
6070 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6071 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6072 as_fn_arith $ac_count + 1 && ac_count=$as_val
6073 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6074 # Best one so far, save it but keep looking for a better one
6075 ac_cv_path_EGREP="$ac_path_EGREP"
6076 ac_path_EGREP_max=$ac_count
6077 fi
6078 # 10*(2^10) chars as input seems more than enough
6079 test $ac_count -gt 10 && break
6080 done
6081 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6082esac
6083
6084 $ac_path_EGREP_found && break 3
6085 done
6086 done
6087 done
6088IFS=$as_save_IFS
6089 if test -z "$ac_cv_path_EGREP"; then
a9bec17c 6090 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
067d23c9
KY
6091 fi
6092else
6093 ac_cv_path_EGREP=$EGREP
6094fi
6095
6096 fi
6097fi
6098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6099$as_echo "$ac_cv_path_EGREP" >&6; }
6100 EGREP="$ac_cv_path_EGREP"
6101
6102
369e19fc
PE
6103
6104
6105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
6106$as_echo_n "checking for Minix Amsterdam compiler... " >&6; }
a9bec17c 6107if test "${gl_cv_c_amsterdam_compiler+set}" = set; then :
369e19fc
PE
6108 $as_echo_n "(cached) " >&6
6109else
6110
6111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6112/* end confdefs.h. */
6113
6114#ifdef __ACK__
6115Amsterdam
6116#endif
6117
6118_ACEOF
6119if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6120 $EGREP "Amsterdam" >/dev/null 2>&1; then :
6121 gl_cv_c_amsterdam_compiler=yes
6122else
6123 gl_cv_c_amsterdam_compiler=no
6124fi
6125rm -f conftest*
6126
6127
6128fi
6129{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
6130$as_echo "$gl_cv_c_amsterdam_compiler" >&6; }
6131 if test -z "$AR"; then
6132 if test $gl_cv_c_amsterdam_compiler = yes; then
6133 AR='cc -c.a'
6134 if test -z "$ARFLAGS"; then
6135 ARFLAGS='-o'
6136 fi
6137 else
6138 if test -n "$ac_tool_prefix"; then
6139 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6140set dummy ${ac_tool_prefix}ar; ac_word=$2
6141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6142$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 6143if test "${ac_cv_prog_AR+set}" = set; then :
369e19fc
PE
6144 $as_echo_n "(cached) " >&6
6145else
6146 if test -n "$AR"; then
6147 ac_cv_prog_AR="$AR" # Let the user override the test.
6148else
6149as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6150for as_dir in $PATH
6151do
6152 IFS=$as_save_IFS
6153 test -z "$as_dir" && as_dir=.
6154 for ac_exec_ext in '' $ac_executable_extensions; do
6155 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6156 ac_cv_prog_AR="${ac_tool_prefix}ar"
6157 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6158 break 2
6159 fi
6160done
6161 done
6162IFS=$as_save_IFS
6163
6164fi
6165fi
6166AR=$ac_cv_prog_AR
6167if test -n "$AR"; then
6168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6169$as_echo "$AR" >&6; }
6170else
6171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6172$as_echo "no" >&6; }
6173fi
6174
6175
6176fi
6177if test -z "$ac_cv_prog_AR"; then
6178 ac_ct_AR=$AR
6179 # Extract the first word of "ar", so it can be a program name with args.
6180set dummy ar; ac_word=$2
6181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6182$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 6183if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
369e19fc
PE
6184 $as_echo_n "(cached) " >&6
6185else
6186 if test -n "$ac_ct_AR"; then
6187 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6188else
6189as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6190for as_dir in $PATH
6191do
6192 IFS=$as_save_IFS
6193 test -z "$as_dir" && as_dir=.
6194 for ac_exec_ext in '' $ac_executable_extensions; do
6195 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6196 ac_cv_prog_ac_ct_AR="ar"
6197 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6198 break 2
6199 fi
6200done
6201 done
6202IFS=$as_save_IFS
6203
6204fi
6205fi
6206ac_ct_AR=$ac_cv_prog_ac_ct_AR
6207if test -n "$ac_ct_AR"; then
6208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6209$as_echo "$ac_ct_AR" >&6; }
6210else
6211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6212$as_echo "no" >&6; }
6213fi
6214
6215 if test "x$ac_ct_AR" = x; then
6216 AR="ar"
6217 else
6218 case $cross_compiling:$ac_tool_warned in
6219yes:)
6220{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6221$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6222ac_tool_warned=yes ;;
6223esac
6224 AR=$ac_ct_AR
6225 fi
6226else
6227 AR="$ac_cv_prog_AR"
6228fi
6229
6230 if test -z "$ARFLAGS"; then
6231 ARFLAGS='cru'
6232 fi
6233 fi
6234 else
6235 if test -z "$ARFLAGS"; then
6236 ARFLAGS='cru'
6237 fi
6238 fi
6239
6240
6241 if test -z "$RANLIB"; then
6242 if test $gl_cv_c_amsterdam_compiler = yes; then
6243 RANLIB=':'
6244 else
6245 if test -n "$ac_tool_prefix"; then
6246 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6247set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6249$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 6250if test "${ac_cv_prog_RANLIB+set}" = set; then :
369e19fc
PE
6251 $as_echo_n "(cached) " >&6
6252else
6253 if test -n "$RANLIB"; then
6254 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6255else
6256as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6257for as_dir in $PATH
6258do
6259 IFS=$as_save_IFS
6260 test -z "$as_dir" && as_dir=.
6261 for ac_exec_ext in '' $ac_executable_extensions; do
6262 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6263 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6264 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6265 break 2
6266 fi
6267done
6268 done
6269IFS=$as_save_IFS
6270
6271fi
6272fi
6273RANLIB=$ac_cv_prog_RANLIB
6274if test -n "$RANLIB"; then
6275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6276$as_echo "$RANLIB" >&6; }
6277else
6278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6279$as_echo "no" >&6; }
6280fi
6281
6282
6283fi
6284if test -z "$ac_cv_prog_RANLIB"; then
6285 ac_ct_RANLIB=$RANLIB
6286 # Extract the first word of "ranlib", so it can be a program name with args.
6287set dummy ranlib; ac_word=$2
6288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6289$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 6290if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
369e19fc
PE
6291 $as_echo_n "(cached) " >&6
6292else
6293 if test -n "$ac_ct_RANLIB"; then
6294 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6295else
6296as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6297for as_dir in $PATH
6298do
6299 IFS=$as_save_IFS
6300 test -z "$as_dir" && as_dir=.
6301 for ac_exec_ext in '' $ac_executable_extensions; do
6302 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6303 ac_cv_prog_ac_ct_RANLIB="ranlib"
6304 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6305 break 2
6306 fi
6307done
6308 done
6309IFS=$as_save_IFS
6310
6311fi
6312fi
6313ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6314if test -n "$ac_ct_RANLIB"; then
6315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6316$as_echo "$ac_ct_RANLIB" >&6; }
6317else
6318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6319$as_echo "no" >&6; }
6320fi
6321
6322 if test "x$ac_ct_RANLIB" = x; then
6323 RANLIB=":"
6324 else
6325 case $cross_compiling:$ac_tool_warned in
6326yes:)
6327{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6328$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6329ac_tool_warned=yes ;;
6330esac
6331 RANLIB=$ac_ct_RANLIB
6332 fi
6333else
6334 RANLIB="$ac_cv_prog_RANLIB"
6335fi
6336
6337 fi
6338 fi
6339
6340
067d23c9
KY
6341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6342$as_echo_n "checking for ANSI C header files... " >&6; }
a9bec17c 6343if test "${ac_cv_header_stdc+set}" = set; then :
067d23c9
KY
6344 $as_echo_n "(cached) " >&6
6345else
6346 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6347/* end confdefs.h. */
6348#include <stdlib.h>
6349#include <stdarg.h>
6350#include <string.h>
6351#include <float.h>
6352
6353int
6354main ()
6355{
6356
6357 ;
6358 return 0;
6359}
6360_ACEOF
6361if ac_fn_c_try_compile "$LINENO"; then :
6362 ac_cv_header_stdc=yes
6363else
6364 ac_cv_header_stdc=no
6365fi
6366rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6367
6368if test $ac_cv_header_stdc = yes; then
6369 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6371/* end confdefs.h. */
6372#include <string.h>
6373
6374_ACEOF
6375if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6376 $EGREP "memchr" >/dev/null 2>&1; then :
6377
6378else
6379 ac_cv_header_stdc=no
6380fi
6381rm -f conftest*
6382
6383fi
6384
6385if test $ac_cv_header_stdc = yes; then
6386 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6387 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6388/* end confdefs.h. */
6389#include <stdlib.h>
6390
6391_ACEOF
6392if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6393 $EGREP "free" >/dev/null 2>&1; then :
6394
6395else
6396 ac_cv_header_stdc=no
6397fi
6398rm -f conftest*
6399
6400fi
6401
6402if test $ac_cv_header_stdc = yes; then
6403 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6404 if test "$cross_compiling" = yes; then :
6405 :
6406else
6407 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6408/* end confdefs.h. */
6409#include <ctype.h>
6410#include <stdlib.h>
6411#if ((' ' & 0x0FF) == 0x020)
6412# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6413# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6414#else
6415# define ISLOWER(c) \
6416 (('a' <= (c) && (c) <= 'i') \
6417 || ('j' <= (c) && (c) <= 'r') \
6418 || ('s' <= (c) && (c) <= 'z'))
6419# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6420#endif
6421
6422#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6423int
6424main ()
6425{
6426 int i;
6427 for (i = 0; i < 256; i++)
6428 if (XOR (islower (i), ISLOWER (i))
6429 || toupper (i) != TOUPPER (i))
6430 return 2;
6431 return 0;
6432}
6433_ACEOF
6434if ac_fn_c_try_run "$LINENO"; then :
6435
6436else
6437 ac_cv_header_stdc=no
6438fi
6439rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6440 conftest.$ac_objext conftest.beam conftest.$ac_ext
6441fi
6442
6443fi
6444fi
6445{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6446$as_echo "$ac_cv_header_stdc" >&6; }
6447if test $ac_cv_header_stdc = yes; then
6448
6449$as_echo "#define STDC_HEADERS 1" >>confdefs.h
6450
6451fi
6452
6453# On IRIX 5.3, sys/types and inttypes.h are conflicting.
6454for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
6455 inttypes.h stdint.h unistd.h
6456do :
6457 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6458ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
6459"
a9bec17c
GM
6460eval as_val=\$$as_ac_Header
6461 if test "x$as_val" = x""yes; then :
067d23c9
KY
6462 cat >>confdefs.h <<_ACEOF
6463#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6464_ACEOF
6465
6466fi
6467
6468done
6469
6470
6471
1fd182f0
PE
6472
6473
067d23c9 6474 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
a9bec17c 6475if test "x$ac_cv_header_minix_config_h" = x""yes; then :
067d23c9
KY
6476 MINIX=yes
6477else
6478 MINIX=
6479fi
6480
6481
6482 if test "$MINIX" = yes; then
6483
6484$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
6485
6486
6487$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
6488
6489
6490$as_echo "#define _MINIX 1" >>confdefs.h
6491
6492 fi
6493
1fd182f0
PE
6494 case "$host_os" in
6495 hpux*)
6496
6497$as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
6498
6499 ;;
6500 esac
6501
067d23c9
KY
6502
6503 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
6504$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
a9bec17c 6505if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
067d23c9
KY
6506 $as_echo_n "(cached) " >&6
6507else
6508 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6509/* end confdefs.h. */
369e19fc
PE
6510
6511# define __EXTENSIONS__ 1
6512 $ac_includes_default
6513int
6514main ()
6515{
6516
6517 ;
6518 return 0;
6519}
6520_ACEOF
6521if ac_fn_c_try_compile "$LINENO"; then :
6522 ac_cv_safe_to_define___extensions__=yes
6523else
6524 ac_cv_safe_to_define___extensions__=no
6525fi
6526rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6527fi
6528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
6529$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
6530 test $ac_cv_safe_to_define___extensions__ = yes &&
6531 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
6532
6533 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
6534
6535 $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
6536
6537 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
6538
6539 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
6540
6541 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
6542
6543
6544
6545
6546
6547
6548
6549
6550# Check whether --enable-largefile was given.
6551if test "${enable_largefile+set}" = set; then :
6552 enableval=$enable_largefile;
6553fi
6554
6555if test "$enable_largefile" != no; then
6556
6557 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
6558$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
a9bec17c 6559if test "${ac_cv_sys_largefile_CC+set}" = set; then :
369e19fc
PE
6560 $as_echo_n "(cached) " >&6
6561else
6562 ac_cv_sys_largefile_CC=no
6563 if test "$GCC" != yes; then
6564 ac_save_CC=$CC
6565 while :; do
6566 # IRIX 6.2 and later do not support large files by default,
6567 # so use the C compiler's -n32 option if that helps.
6568 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6569/* end confdefs.h. */
6570#include <sys/types.h>
6571 /* Check that off_t can represent 2**63 - 1 correctly.
6572 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6573 since some C++ compilers masquerading as C compilers
6574 incorrectly reject 9223372036854775807. */
6575#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6576 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6577 && LARGE_OFF_T % 2147483647 == 1)
6578 ? 1 : -1];
6579int
6580main ()
6581{
6582
6583 ;
6584 return 0;
6585}
6586_ACEOF
6587 if ac_fn_c_try_compile "$LINENO"; then :
6588 break
6589fi
6590rm -f core conftest.err conftest.$ac_objext
6591 CC="$CC -n32"
6592 if ac_fn_c_try_compile "$LINENO"; then :
6593 ac_cv_sys_largefile_CC=' -n32'; break
6594fi
6595rm -f core conftest.err conftest.$ac_objext
6596 break
6597 done
6598 CC=$ac_save_CC
6599 rm -f conftest.$ac_ext
6600 fi
6601fi
6602{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
6603$as_echo "$ac_cv_sys_largefile_CC" >&6; }
6604 if test "$ac_cv_sys_largefile_CC" != no; then
6605 CC=$CC$ac_cv_sys_largefile_CC
6606 fi
6607
6608 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
6609$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
a9bec17c 6610if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
369e19fc
PE
6611 $as_echo_n "(cached) " >&6
6612else
6613 while :; do
6614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6615/* end confdefs.h. */
6616#include <sys/types.h>
6617 /* Check that off_t can represent 2**63 - 1 correctly.
6618 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6619 since some C++ compilers masquerading as C compilers
6620 incorrectly reject 9223372036854775807. */
6621#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6622 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6623 && LARGE_OFF_T % 2147483647 == 1)
6624 ? 1 : -1];
6625int
6626main ()
6627{
6628
6629 ;
6630 return 0;
6631}
6632_ACEOF
6633if ac_fn_c_try_compile "$LINENO"; then :
6634 ac_cv_sys_file_offset_bits=no; break
6635fi
6636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6638/* end confdefs.h. */
6639#define _FILE_OFFSET_BITS 64
6640#include <sys/types.h>
6641 /* Check that off_t can represent 2**63 - 1 correctly.
6642 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6643 since some C++ compilers masquerading as C compilers
6644 incorrectly reject 9223372036854775807. */
6645#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6646 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6647 && LARGE_OFF_T % 2147483647 == 1)
6648 ? 1 : -1];
6649int
6650main ()
6651{
6652
6653 ;
6654 return 0;
6655}
6656_ACEOF
6657if ac_fn_c_try_compile "$LINENO"; then :
6658 ac_cv_sys_file_offset_bits=64; break
6659fi
6660rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6661 ac_cv_sys_file_offset_bits=unknown
6662 break
6663done
6664fi
6665{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
6666$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
6667case $ac_cv_sys_file_offset_bits in #(
6668 no | unknown) ;;
6669 *)
6670cat >>confdefs.h <<_ACEOF
6671#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
6672_ACEOF
6673;;
6674esac
6675rm -rf conftest*
6676 if test $ac_cv_sys_file_offset_bits = unknown; then
6677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
6678$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
a9bec17c 6679if test "${ac_cv_sys_large_files+set}" = set; then :
369e19fc
PE
6680 $as_echo_n "(cached) " >&6
6681else
6682 while :; do
6683 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6684/* end confdefs.h. */
6685#include <sys/types.h>
6686 /* Check that off_t can represent 2**63 - 1 correctly.
6687 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6688 since some C++ compilers masquerading as C compilers
6689 incorrectly reject 9223372036854775807. */
6690#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6691 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6692 && LARGE_OFF_T % 2147483647 == 1)
6693 ? 1 : -1];
6694int
6695main ()
6696{
6697
6698 ;
6699 return 0;
6700}
6701_ACEOF
6702if ac_fn_c_try_compile "$LINENO"; then :
6703 ac_cv_sys_large_files=no; break
6704fi
6705rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6707/* end confdefs.h. */
6708#define _LARGE_FILES 1
6709#include <sys/types.h>
6710 /* Check that off_t can represent 2**63 - 1 correctly.
6711 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6712 since some C++ compilers masquerading as C compilers
6713 incorrectly reject 9223372036854775807. */
6714#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6715 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6716 && LARGE_OFF_T % 2147483647 == 1)
6717 ? 1 : -1];
067d23c9
KY
6718int
6719main ()
6720{
6721
6722 ;
6723 return 0;
6724}
6725_ACEOF
6726if ac_fn_c_try_compile "$LINENO"; then :
369e19fc 6727 ac_cv_sys_large_files=1; break
067d23c9
KY
6728fi
6729rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
369e19fc
PE
6730 ac_cv_sys_large_files=unknown
6731 break
6732done
067d23c9 6733fi
369e19fc
PE
6734{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
6735$as_echo "$ac_cv_sys_large_files" >&6; }
6736case $ac_cv_sys_large_files in #(
6737 no | unknown) ;;
6738 *)
6739cat >>confdefs.h <<_ACEOF
6740#define _LARGE_FILES $ac_cv_sys_large_files
6741_ACEOF
6742;;
6743esac
6744rm -rf conftest*
6745 fi
1fd182f0
PE
6746
6747
858c7150
GM
6748$as_echo "#define _DARWIN_USE_64_BIT_INODE 1" >>confdefs.h
6749
369e19fc 6750fi
1fd182f0 6751
6d153f56
GM
6752 case $ac_cv_prog_cc_stdc in #(
6753 no) :
6754 ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; #(
6755 *) :
6756 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
6757$as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
a9bec17c 6758if test "${ac_cv_prog_cc_c99+set}" = set; then :
6d153f56
GM
6759 $as_echo_n "(cached) " >&6
6760else
6761 ac_cv_prog_cc_c99=no
6762ac_save_CC=$CC
6763cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6764/* end confdefs.h. */
6765#include <stdarg.h>
6766#include <stdbool.h>
6767#include <stdlib.h>
6768#include <wchar.h>
6769#include <stdio.h>
6770
6771// Check varargs macros. These examples are taken from C99 6.10.3.5.
6772#define debug(...) fprintf (stderr, __VA_ARGS__)
6773#define showlist(...) puts (#__VA_ARGS__)
6774#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
6775static void
6776test_varargs_macros (void)
6777{
6778 int x = 1234;
6779 int y = 5678;
6780 debug ("Flag");
6781 debug ("X = %d\n", x);
6782 showlist (The first, second, and third items.);
6783 report (x>y, "x is %d but y is %d", x, y);
6784}
6785
6786// Check long long types.
6787#define BIG64 18446744073709551615ull
6788#define BIG32 4294967295ul
6789#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
6790#if !BIG_OK
6791 your preprocessor is broken;
6792#endif
6793#if BIG_OK
6794#else
6795 your preprocessor is broken;
6796#endif
6797static long long int bignum = -9223372036854775807LL;
6798static unsigned long long int ubignum = BIG64;
6799
6800struct incomplete_array
6801{
6802 int datasize;
6803 double data[];
6804};
6805
6806struct named_init {
6807 int number;
6808 const wchar_t *name;
6809 double average;
6810};
6811
6812typedef const char *ccp;
6813
6814static inline int
6815test_restrict (ccp restrict text)
6816{
6817 // See if C++-style comments work.
6818 // Iterate through items via the restricted pointer.
6819 // Also check for declarations in for loops.
6820 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
6821 continue;
6822 return 0;
6823}
6824
6825// Check varargs and va_copy.
6826static void
6827test_varargs (const char *format, ...)
6828{
6829 va_list args;
6830 va_start (args, format);
6831 va_list args_copy;
6832 va_copy (args_copy, args);
6833
6834 const char *str;
6835 int number;
6836 float fnumber;
6837
6838 while (*format)
6839 {
6840 switch (*format++)
6841 {
6842 case 's': // string
6843 str = va_arg (args_copy, const char *);
6844 break;
6845 case 'd': // int
6846 number = va_arg (args_copy, int);
6847 break;
6848 case 'f': // float
6849 fnumber = va_arg (args_copy, double);
6850 break;
6851 default:
6852 break;
6853 }
6854 }
6855 va_end (args_copy);
6856 va_end (args);
6857}
6858
6859int
6860main ()
6861{
6862
6863 // Check bool.
6864 _Bool success = false;
6865
6866 // Check restrict.
6867 if (test_restrict ("String literal") == 0)
6868 success = true;
6869 char *restrict newvar = "Another string";
6870
6871 // Check varargs.
6872 test_varargs ("s, d' f .", "string", 65, 34.234);
6873 test_varargs_macros ();
6874
6875 // Check flexible array members.
6876 struct incomplete_array *ia =
6877 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
6878 ia->datasize = 10;
6879 for (int i = 0; i < ia->datasize; ++i)
6880 ia->data[i] = i * 1.234;
6881
6882 // Check named initializers.
6883 struct named_init ni = {
6884 .number = 34,
6885 .name = L"Test wide string",
6886 .average = 543.34343,
6887 };
6888
6889 ni.number = 58;
6890
6891 int dynamic_array[ni.number];
6892 dynamic_array[ni.number - 1] = 543;
6893
6894 // work around unused variable warnings
6895 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
6896 || dynamic_array[ni.number - 1] != 543);
6897
6898 ;
6899 return 0;
6900}
6901_ACEOF
6902for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99
6903do
6904 CC="$ac_save_CC $ac_arg"
6905 if ac_fn_c_try_compile "$LINENO"; then :
6906 ac_cv_prog_cc_c99=$ac_arg
6907fi
6908rm -f core conftest.err conftest.$ac_objext
6909 test "x$ac_cv_prog_cc_c99" != "xno" && break
6910done
6911rm -f conftest.$ac_ext
6912CC=$ac_save_CC
6913
6914fi
6915# AC_CACHE_VAL
6916case "x$ac_cv_prog_cc_c99" in
6917 x)
6918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6919$as_echo "none needed" >&6; } ;;
6920 xno)
6921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6922$as_echo "unsupported" >&6; } ;;
6923 *)
6924 CC="$CC $ac_cv_prog_cc_c99"
6925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
6926$as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
6927esac
6928if test "x$ac_cv_prog_cc_c99" != xno; then :
6929 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
6930else
6931 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
6932$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
a9bec17c 6933if test "${ac_cv_prog_cc_c89+set}" = set; then :
6d153f56
GM
6934 $as_echo_n "(cached) " >&6
6935else
6936 ac_cv_prog_cc_c89=no
6937ac_save_CC=$CC
6938cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6939/* end confdefs.h. */
6940#include <stdarg.h>
6941#include <stdio.h>
6942#include <sys/types.h>
6943#include <sys/stat.h>
6944/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
6945struct buf { int x; };
6946FILE * (*rcsopen) (struct buf *, struct stat *, int);
6947static char *e (p, i)
6948 char **p;
6949 int i;
6950{
6951 return p[i];
6952}
6953static char *f (char * (*g) (char **, int), char **p, ...)
6954{
6955 char *s;
6956 va_list v;
6957 va_start (v,p);
6958 s = g (p, va_arg (v,int));
6959 va_end (v);
6960 return s;
6961}
6962
6963/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
6964 function prototypes and stuff, but not '\xHH' hex character constants.
6965 These don't provoke an error unfortunately, instead are silently treated
6966 as 'x'. The following induces an error, until -std is added to get
6967 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
6968 array size at least. It's necessary to write '\x00'==0 to get something
6969 that's true only with -std. */
6970int osf4_cc_array ['\x00' == 0 ? 1 : -1];
6971
6972/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
6973 inside strings and character constants. */
6974#define FOO(x) 'x'
6975int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
6976
6977int test (int i, double x);
6978struct s1 {int (*f) (int a);};
6979struct s2 {int (*f) (double a);};
6980int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
6981int argc;
6982char **argv;
6983int
6984main ()
6985{
6986return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
6987 ;
6988 return 0;
6989}
6990_ACEOF
6991for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
6992 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
6993do
6994 CC="$ac_save_CC $ac_arg"
6995 if ac_fn_c_try_compile "$LINENO"; then :
6996 ac_cv_prog_cc_c89=$ac_arg
6997fi
6998rm -f core conftest.err conftest.$ac_objext
6999 test "x$ac_cv_prog_cc_c89" != "xno" && break
7000done
7001rm -f conftest.$ac_ext
7002CC=$ac_save_CC
7003
7004fi
7005# AC_CACHE_VAL
7006case "x$ac_cv_prog_cc_c89" in
7007 x)
7008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
7009$as_echo "none needed" >&6; } ;;
7010 xno)
7011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
7012$as_echo "unsupported" >&6; } ;;
7013 *)
7014 CC="$CC $ac_cv_prog_cc_c89"
7015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
7016$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
7017esac
7018if test "x$ac_cv_prog_cc_c89" != xno; then :
7019 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
7020else
7021 ac_cv_prog_cc_stdc=no
7022fi
7023
7024fi
7025 ;;
7026esac
7027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5
7028$as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; }
a9bec17c 7029 if test "${ac_cv_prog_cc_stdc+set}" = set; then :
6d153f56
GM
7030 $as_echo_n "(cached) " >&6
7031fi
7032
7033 case $ac_cv_prog_cc_stdc in #(
7034 no) :
7035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
7036$as_echo "unsupported" >&6; } ;; #(
7037 '') :
7038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
7039$as_echo "none needed" >&6; } ;; #(
7040 *) :
7041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_stdc" >&5
7042$as_echo "$ac_cv_prog_cc_stdc" >&6; } ;;
7043esac
7044
1fd182f0
PE
7045
7046
4fc2b746 7047 # Code from module alloca-opt:
8d8af66d 7048 # Code from module allocator:
d7ad186c 7049 # Code from module at-internal:
938a4ef9
GM
7050 # Code from module c-ctype:
7051 # Code from module c-strcase:
6c051bab 7052 # Code from module careadlinkat:
f199cab1 7053 # Code from module clock-time:
3bf26e96 7054 # Code from module close-stream:
942f733f 7055 # Code from module crypto/md5:
40e27e7f 7056 # Code from module crypto/sha1:
d87ffdb7
GM
7057 # Code from module crypto/sha256:
7058 # Code from module crypto/sha512:
d7ad186c 7059 # Code from module dirent:
36f13e16 7060 # Code from module dosname:
f737437b 7061 # Code from module dtoastr:
f199cab1 7062 # Code from module dtotimespec:
7d2a1c5e 7063 # Code from module dup2:
93131e11 7064 # Code from module environ:
710f5812 7065 # Code from module euidaccess:
8966cbff 7066 # Code from module execinfo:
1fd182f0
PE
7067 # Code from module extensions:
7068
7cd2ed2c 7069 # Code from module extern-inline:
710f5812
GM
7070 # Code from module faccessat:
7071 # Code from module fcntl-h:
d7ad186c 7072 # Code from module fdopendir:
5fa4ac76 7073 # Code from module filemode:
3bf26e96 7074 # Code from module fpending:
d7ad186c 7075 # Code from module fstatat:
710f5812 7076 # Code from module getgroups:
1f5d53eb 7077 # Code from module getloadavg:
e275c824
PE
7078 # Code from module getopt-gnu:
7079 # Code from module getopt-posix:
7080 # Code from module gettext-h:
f199cab1
GM
7081 # Code from module gettime:
7082 # Code from module gettimeofday:
710f5812 7083 # Code from module group-member:
67342916 7084 # Code from module ignore-value:
1fd182f0
PE
7085 # Code from module include_next:
7086 # Code from module intprops:
4fda9c95 7087 # Code from module inttypes-incomplete:
369e19fc
PE
7088 # Code from module largefile:
7089
ae0d7250 7090 # Code from module lstat:
ac1ca7e9 7091 # Code from module manywarnings:
1fd182f0
PE
7092 # Code from module mktime:
7093 # Code from module multiarch:
369e19fc 7094 # Code from module nocrash:
d7ad186c 7095 # Code from module openat-h:
a0a61e58 7096 # Code from module pathmax:
f199cab1 7097 # Code from module pselect:
3e0be4ab 7098 # Code from module pthread_sigmask:
b5591ebb 7099 # Code from module putenv:
ae0d7250 7100 # Code from module readlink:
d7ad186c 7101 # Code from module readlinkat:
710f5812 7102 # Code from module root-uid:
e4184a20 7103 # Code from module sig2str:
2b1928b8 7104 # Code from module signal-h:
369e19fc
PE
7105 # Code from module snippet/_Noreturn:
7106 # Code from module snippet/arg-nonnull:
7107 # Code from module snippet/c++defs:
7108 # Code from module snippet/warn-on-use:
6ad6792b 7109 # Code from module socklen:
6c051bab 7110 # Code from module ssize_t:
ae0d7250 7111 # Code from module stat:
f199cab1 7112 # Code from module stat-time:
0eb775a3 7113 # Code from module stdalign:
6d153f56
GM
7114 # Code from module stdarg:
7115
8c069cc7
GM
7116
7117
16c3e636 7118 # Code from module stdbool:
1fd182f0 7119 # Code from module stddef:
5f90be1b 7120 # Code from module stdint:
6ad6792b 7121 # Code from module stdio:
1f5d53eb 7122 # Code from module stdlib:
16c3e636 7123 # Code from module strftime:
3e0be4ab
GM
7124 # Code from module strtoimax:
7125 # Code from module strtoll:
4fda9c95
GM
7126 # Code from module strtoull:
7127 # Code from module strtoumax:
ae0d7250 7128 # Code from module symlink:
f199cab1 7129 # Code from module sys_select:
5fa4ac76 7130 # Code from module sys_stat:
f199cab1 7131 # Code from module sys_time:
1fd182f0
PE
7132 # Code from module time:
7133 # Code from module time_r:
f077f61d 7134 # Code from module timer-time:
f199cab1
GM
7135 # Code from module timespec:
7136 # Code from module timespec-add:
7137 # Code from module timespec-sub:
d87ffdb7 7138 # Code from module u64:
e275c824 7139 # Code from module unistd:
b5591ebb 7140 # Code from module unsetenv:
f199cab1 7141 # Code from module utimens:
4fda9c95 7142 # Code from module verify:
ac1ca7e9 7143 # Code from module warnings:
710f5812 7144 # Code from module xalloc-oversized:
1fd182f0
PE
7145
7146
6bd1cda5
GM
7147# It's helpful to have C macros available to GDB, so prefer -g3 to -g
7148# if -g3 works and the user does not specify CFLAGS.
7149# This test must follow gl_EARLY; otherwise AC_LINK_IFELSE complains.
7150if test "$ac_test_CFLAGS" != set; then
7151 case $CFLAGS in
7152 '-g')
7153 emacs_g3_CFLAGS='-g3';;
7154 '-g -O2')
7155 emacs_g3_CFLAGS='-g3 -O2';;
7156 *)
7157 emacs_g3_CFLAGS='';;
7158 esac
7159 if test -n "$emacs_g3_CFLAGS"; then
7160 emacs_save_CFLAGS=$CFLAGS
7161 CFLAGS=$emacs_g3_CFLAGS
7162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts $emacs_g3_CFLAGS" >&5
7163$as_echo_n "checking whether $CC accepts $emacs_g3_CFLAGS... " >&6; }
7164if test "${emacs_cv_prog_cc_g3+set}" = set; then :
7165 $as_echo_n "(cached) " >&6
7166else
7167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7168/* end confdefs.h. */
7169
7170int
7171main ()
7172{
7173
7174 ;
7175 return 0;
7176}
7177_ACEOF
7178if ac_fn_c_try_link "$LINENO"; then :
7179 emacs_cv_prog_cc_g3=yes
7180else
7181 emacs_cv_prog_cc_g3=no
7182fi
7183rm -f core conftest.err conftest.$ac_objext \
7184 conftest$ac_exeext conftest.$ac_ext
7185fi
7186{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_prog_cc_g3" >&5
7187$as_echo "$emacs_cv_prog_cc_g3" >&6; }
7188 if test $emacs_cv_prog_cc_g3 = yes; then
7189 CFLAGS=$emacs_g3_CFLAGS
7190 else
7191 CFLAGS=$emacs_save_CFLAGS
7192 fi
7193 fi
7194fi
7195
a6b92a4a
GM
7196# Check whether --enable-gcc-warnings was given.
7197if test "${enable_gcc_warnings+set}" = set; then :
7198 enableval=$enable_gcc_warnings; case $enableval in
7199 yes|no) ;;
7200 *) as_fn_error "bad value $enableval for gcc-warnings option" "$LINENO" 5 ;;
7201 esac
7202 gl_gcc_warnings=$enableval
7203else
7204 gl_gcc_warnings=no
7205
7206fi
7207
7208
e4d35030
GM
7209# Check whether --enable-link-time-optimization was given.
7210if test "${enable_link_time_optimization+set}" = set; then :
7211 enableval=$enable_link_time_optimization; if test "${enableval}" != "no"; then
7212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether link-time optimization is supported" >&5
7213$as_echo_n "checking whether link-time optimization is supported... " >&6; }
7214 ac_lto_supported=no
7215 if test x$GCC = xyes; then
7216 CPUS=`getconf _NPROCESSORS_ONLN 2>/dev/null`
7217 if test x$CPUS != x; then
7218 LTO="-flto=$CPUS"
7219 else
7220 LTO="-flto"
7221 fi
7222 old_CFLAGS=$CFLAGS
7223 CFLAGS="$CFLAGS $LTO"
7224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7225/* end confdefs.h. */
7226
7227int
7228main ()
7229{
7230
7231 ;
7232 return 0;
7233}
7234_ACEOF
7235if ac_fn_c_try_compile "$LINENO"; then :
7236 ac_lto_supported=yes
7237else
7238 ac_lto_supported=no
7239fi
7240rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7241 CFLAGS="$old_CFLAGS"
7242 fi
7243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_lto_supported" >&5
7244$as_echo "$ac_lto_supported" >&6; }
7245 if test "$ac_lto_supported" = "yes"; then
7246 CFLAGS="$CFLAGS $LTO"
7247 fi
7248fi
7249fi
7250
7251
a6b92a4a
GM
7252# gl_GCC_VERSION_IFELSE([major], [minor], [run-if-found], [run-if-not-found])
7253# ------------------------------------------------
7254# If $CPP is gcc-MAJOR.MINOR or newer, then run RUN-IF-FOUND.
7255# Otherwise, run RUN-IF-NOT-FOUND.
7256
7257
7258# When compiling with GCC, prefer -isystem to -I when including system
7259# include files, to avoid generating useless diagnostics for the files.
7260if test "$gl_gcc_warnings" != yes; then
7261 isystem='-I'
7262else
7263 isystem='-isystem '
7264
7265 # This, $nw, is the list of warnings we disable.
7266 nw=
7267
7268 case $with_x_toolkit in
7269 lucid | athena | motif)
7270 # Old toolkits mishandle 'const'.
7271 nw="$nw -Wwrite-strings"
7272 ;;
7273 *)
7274 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror" >&5
7275$as_echo_n "checking whether C compiler handles -Werror... " >&6; }
7276if test "${gl_cv_warn_c__Werror+set}" = set; then :
7277 $as_echo_n "(cached) " >&6
7278else
7279
7280 gl_save_compiler_FLAGS="$CFLAGS"
0eb775a3 7281 as_fn_append CFLAGS " -Werror"
a6b92a4a 7282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
7283/* end confdefs.h. */
7284
7285int
7286main ()
7287{
7288
7289 ;
7290 return 0;
7291}
7292_ACEOF
7293if ac_fn_c_try_compile "$LINENO"; then :
a6b92a4a 7294 gl_cv_warn_c__Werror=yes
067d23c9 7295else
a6b92a4a 7296 gl_cv_warn_c__Werror=no
067d23c9
KY
7297fi
7298rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a6b92a4a
GM
7299 CFLAGS="$gl_save_compiler_FLAGS"
7300
7301fi
7302{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror" >&5
7303$as_echo "$gl_cv_warn_c__Werror" >&6; }
7304if test "x$gl_cv_warn_c__Werror" = x""yes; then :
7305 as_fn_append WERROR_CFLAGS " -Werror"
7306fi
7307
0eb775a3 7308
a6b92a4a
GM
7309 ;;
7310 esac
7311
7312
7313 nw="$nw -Waggregate-return" # anachronistic
ca0294bb 7314 nw="$nw -Wlong-long" # C90 is anachronistic
a6b92a4a
GM
7315 nw="$nw -Wc++-compat" # We don't care about C++ compilers
7316 nw="$nw -Wundef" # Warns on '#if GNULIB_FOO' etc in gnulib
7317 nw="$nw -Wtraditional" # Warns on #elif which we use often
7318 nw="$nw -Wcast-qual" # Too many warnings for now
7319 nw="$nw -Wconversion" # Too many warnings for now
7320 nw="$nw -Wsystem-headers" # Don't let system headers trigger warnings
7321 nw="$nw -Wsign-conversion" # Too many warnings for now
7322 nw="$nw -Woverlength-strings" # Not a problem these days
7323 nw="$nw -Wtraditional-conversion" # Too many warnings for now
fd9d2a9d 7324 nw="$nw -Wunreachable-code" # so buggy that it's now silently ignored
a6b92a4a 7325 nw="$nw -Wpadded" # Our structs are not padded
fd9d2a9d 7326 nw="$nw -Wredundant-decls" # we regularly (re)declare functions
a6b92a4a 7327 nw="$nw -Wlogical-op" # any use of fwrite provokes this
fd9d2a9d 7328 nw="$nw -Wformat-nonliteral" # we do this a lot
a6b92a4a
GM
7329 nw="$nw -Wvla" # warnings in gettext.h
7330 nw="$nw -Wnested-externs" # use of XARGMATCH/verify_function__
7331 nw="$nw -Wswitch-enum" # Too many warnings for now
7332 nw="$nw -Wswitch-default" # Too many warnings for now
fd9d2a9d
GM
7333 nw="$nw -Wfloat-equal" # warns about high-quality code
7334 nw="$nw -Winline" # OK to ignore 'inline'
6ec9a5a7 7335 nw="$nw -Wjump-misses-init" # We sometimes safely jump over init.
da8ed5ba
GM
7336 nw="$nw -Wstrict-overflow" # OK to optimize assuming that
7337 # signed overflow has undefined behavior
fd9d2a9d
GM
7338 nw="$nw -Wsync-nand" # irrelevant here, and provokes ObjC warning
7339 nw="$nw -Wunsafe-loop-optimizations" # OK to suppress unsafe optimizations
a6b92a4a
GM
7340
7341 # Emacs doesn't care about shadowing; see
7342 # <http://lists.gnu.org/archive/html/emacs-diffs/2011-11/msg00265.html>.
7343 nw="$nw -Wshadow"
7344
ad33cb00
GM
7345 # Emacs's use of alloca inhibits protecting the stack.
7346 nw="$nw -Wstack-protector"
7347
da8ed5ba 7348 # The following line should be removable at some point.
a6b92a4a
GM
7349 nw="$nw -Wsuggest-attribute=pure"
7350
7351
7352
7353 if test -n "$GCC"; then
7354
7355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is supported" >&5
7356$as_echo_n "checking whether -Wno-missing-field-initializers is supported... " >&6; }
7357 if test "${gl_cv_cc_nomfi_supported+set}" = set; then :
7358 $as_echo_n "(cached) " >&6
7359else
7360
7361 gl_save_CFLAGS="$CFLAGS"
7362 CFLAGS="$CFLAGS -W -Werror -Wno-missing-field-initializers"
7363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
7364/* end confdefs.h. */
7365
7366int
7367main ()
7368{
7369
7370 ;
7371 return 0;
7372}
7373_ACEOF
7374if ac_fn_c_try_compile "$LINENO"; then :
a6b92a4a 7375 gl_cv_cc_nomfi_supported=yes
067d23c9 7376else
a6b92a4a 7377 gl_cv_cc_nomfi_supported=no
067d23c9
KY
7378fi
7379rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a6b92a4a
GM
7380 CFLAGS="$gl_save_CFLAGS"
7381fi
7382
7383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_supported" >&5
7384$as_echo "$gl_cv_cc_nomfi_supported" >&6; }
7385
7386 if test "$gl_cv_cc_nomfi_supported" = yes; then
7387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is needed" >&5
7388$as_echo_n "checking whether -Wno-missing-field-initializers is needed... " >&6; }
7389 if test "${gl_cv_cc_nomfi_needed+set}" = set; then :
7390 $as_echo_n "(cached) " >&6
7391else
7392
7393 gl_save_CFLAGS="$CFLAGS"
7394 CFLAGS="$CFLAGS -W -Werror"
7395 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7396/* end confdefs.h. */
7397void f (void)
7398 {
7399 typedef struct { int a; int b; } s_t;
7400 s_t s1 = { 0, };
7401 }
7402
7403int
7404main ()
7405{
7406
7407 ;
7408 return 0;
7409}
7410_ACEOF
7411if ac_fn_c_try_compile "$LINENO"; then :
7412 gl_cv_cc_nomfi_needed=no
7413else
7414 gl_cv_cc_nomfi_needed=yes
7415fi
7416rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7417 CFLAGS="$gl_save_CFLAGS"
7418
7419fi
7420
7421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_needed" >&5
7422$as_echo "$gl_cv_cc_nomfi_needed" >&6; }
7423 fi
b6c9d18d
GM
7424
7425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wuninitialized is supported" >&5
7426$as_echo_n "checking whether -Wuninitialized is supported... " >&6; }
7427 if test "${gl_cv_cc_uninitialized_supported+set}" = set; then :
7428 $as_echo_n "(cached) " >&6
7429else
7430
7431 gl_save_CFLAGS="$CFLAGS"
7432 CFLAGS="$CFLAGS -Werror -Wuninitialized"
7433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7434/* end confdefs.h. */
7435
7436int
7437main ()
7438{
7439
7440 ;
7441 return 0;
7442}
7443_ACEOF
7444if ac_fn_c_try_compile "$LINENO"; then :
7445 gl_cv_cc_uninitialized_supported=yes
7446else
7447 gl_cv_cc_uninitialized_supported=no
7448fi
7449rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7450 CFLAGS="$gl_save_CFLAGS"
7451fi
7452
7453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_uninitialized_supported" >&5
7454$as_echo "$gl_cv_cc_uninitialized_supported" >&6; }
7455
a6b92a4a
GM
7456 fi
7457
b6c9d18d 7458 # List all gcc warning categories.
a6b92a4a
GM
7459 gl_manywarn_set=
7460 for gl_manywarn_item in \
a6b92a4a 7461 -W \
dcde497f
GM
7462 -Wabi \
7463 -Waddress \
7464 -Wall \
7465 -Warray-bounds \
7466 -Wattributes \
a6b92a4a 7467 -Wbad-function-cast \
a6b92a4a 7468 -Wbuiltin-macro-redefined \
dcde497f
GM
7469 -Wcast-align \
7470 -Wchar-subscripts \
7471 -Wclobbered \
7472 -Wcomment \
7473 -Wcomments \
a6b92a4a 7474 -Wcoverage-mismatch \
a6b92a4a
GM
7475 -Wcpp \
7476 -Wdeprecated \
7477 -Wdeprecated-declarations \
dcde497f 7478 -Wdisabled-optimization \
a6b92a4a
GM
7479 -Wdiv-by-zero \
7480 -Wdouble-promotion \
dcde497f 7481 -Wempty-body \
a6b92a4a 7482 -Wendif-labels \
dcde497f 7483 -Wenum-compare \
a6b92a4a
GM
7484 -Wextra \
7485 -Wformat-contains-nul \
7486 -Wformat-extra-args \
dcde497f
GM
7487 -Wformat-nonliteral \
7488 -Wformat-security \
7489 -Wformat-y2k \
a6b92a4a
GM
7490 -Wformat-zero-length \
7491 -Wformat=2 \
dcde497f
GM
7492 -Wfree-nonheap-object \
7493 -Wignored-qualifiers \
7494 -Wimplicit \
7495 -Wimplicit-function-declaration \
7496 -Wimplicit-int \
7497 -Winit-self \
7498 -Winline \
7499 -Wint-to-pointer-cast \
7500 -Winvalid-memory-model \
7501 -Winvalid-pch \
7502 -Wjump-misses-init \
7503 -Wlogical-op \
7504 -Wmain \
7505 -Wmaybe-uninitialized \
7506 -Wmissing-braces \
7507 -Wmissing-declarations \
7508 -Wmissing-field-initializers \
7509 -Wmissing-format-attribute \
7510 -Wmissing-include-dirs \
7511 -Wmissing-noreturn \
7512 -Wmissing-parameter-type \
7513 -Wmissing-prototypes \
7514 -Wmudflap \
a6b92a4a 7515 -Wmultichar \
dcde497f
GM
7516 -Wnarrowing \
7517 -Wnested-externs \
7518 -Wnonnull \
a6b92a4a 7519 -Wnormalized=nfc \
dcde497f
GM
7520 -Wold-style-declaration \
7521 -Wold-style-definition \
a6b92a4a 7522 -Woverflow \
dcde497f
GM
7523 -Woverlength-strings \
7524 -Woverride-init \
7525 -Wpacked \
7526 -Wpacked-bitfield-compat \
7527 -Wparentheses \
7528 -Wpointer-arith \
7529 -Wpointer-sign \
a6b92a4a
GM
7530 -Wpointer-to-int-cast \
7531 -Wpragmas \
dcde497f
GM
7532 -Wreturn-type \
7533 -Wsequence-point \
7534 -Wshadow \
7535 -Wsizeof-pointer-memaccess \
7536 -Wstack-protector \
7537 -Wstrict-aliasing \
7538 -Wstrict-overflow \
7539 -Wstrict-prototypes \
a6b92a4a 7540 -Wsuggest-attribute=const \
dcde497f 7541 -Wsuggest-attribute=format \
a6b92a4a
GM
7542 -Wsuggest-attribute=noreturn \
7543 -Wsuggest-attribute=pure \
dcde497f
GM
7544 -Wswitch \
7545 -Wswitch-default \
7546 -Wsync-nand \
7547 -Wsystem-headers \
a6b92a4a 7548 -Wtrampolines \
dcde497f
GM
7549 -Wtrigraphs \
7550 -Wtype-limits \
7551 -Wuninitialized \
7552 -Wunknown-pragmas \
7553 -Wunreachable-code \
7554 -Wunsafe-loop-optimizations \
7555 -Wunused \
7556 -Wunused-but-set-parameter \
7557 -Wunused-but-set-variable \
7558 -Wunused-function \
7559 -Wunused-label \
7560 -Wunused-local-typedefs \
7561 -Wunused-macros \
7562 -Wunused-parameter \
7563 -Wunused-result \
7564 -Wunused-value \
7565 -Wunused-variable \
7566 -Wvarargs \
7567 -Wvariadic-macros \
7568 -Wvector-operation-performance \
7569 -Wvla \
7570 -Wvolatile-register-var \
7571 -Wwrite-strings \
7572 \
a6b92a4a
GM
7573 ; do
7574 gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
7575 done
7576
b6c9d18d 7577 # Disable specific options as needed.
a6b92a4a
GM
7578 if test "$gl_cv_cc_nomfi_needed" = yes; then
7579 gl_manywarn_set="$gl_manywarn_set -Wno-missing-field-initializers"
7580 fi
7581
b6c9d18d
GM
7582 if test "$gl_cv_cc_uninitialized_supported" = no; then
7583 gl_manywarn_set="$gl_manywarn_set -Wno-uninitialized"
7584 fi
7585
a6b92a4a
GM
7586 ws=$gl_manywarn_set
7587
7588
7589 gl_warn_set=
7590 set x $ws; shift
7591 for gl_warn_item
7592 do
7593 case " $nw " in
7594 *" $gl_warn_item "*)
7595 ;;
7596 *)
7597 gl_warn_set="$gl_warn_set $gl_warn_item"
7598 ;;
7599 esac
7600 done
7601 ws=$gl_warn_set
7602
7603 for w in $ws; do
7604 as_gl_Warn=`$as_echo "gl_cv_warn_c_$w" | $as_tr_sh`
7605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles $w" >&5
7606$as_echo_n "checking whether C compiler handles $w... " >&6; }
7607if { as_var=$as_gl_Warn; eval "test \"\${$as_var+set}\" = set"; }; then :
7608 $as_echo_n "(cached) " >&6
7609else
7610
7611 gl_save_compiler_FLAGS="$CFLAGS"
0eb775a3 7612 as_fn_append CFLAGS " $w"
a6b92a4a
GM
7613 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7614/* end confdefs.h. */
7615
7616int
7617main ()
7618{
7619
7620 ;
7621 return 0;
7622}
7623_ACEOF
7624if ac_fn_c_try_compile "$LINENO"; then :
7625 eval "$as_gl_Warn=yes"
7626else
7627 eval "$as_gl_Warn=no"
7628fi
7629rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7630 CFLAGS="$gl_save_compiler_FLAGS"
7631
7632fi
7633eval ac_res=\$$as_gl_Warn
7634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7635$as_echo "$ac_res" >&6; }
7636eval as_val=\$$as_gl_Warn
7637 if test "x$as_val" = x""yes; then :
7638 as_fn_append WARN_CFLAGS " $w"
7639fi
7640
0eb775a3 7641
a6b92a4a
GM
7642 done
7643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-missing-field-initializers" >&5
7644$as_echo_n "checking whether C compiler handles -Wno-missing-field-initializers... " >&6; }
7645if test "${gl_cv_warn_c__Wno_missing_field_initializers+set}" = set; then :
7646 $as_echo_n "(cached) " >&6
7647else
7648
7649 gl_save_compiler_FLAGS="$CFLAGS"
0eb775a3 7650 as_fn_append CFLAGS " -Wno-missing-field-initializers"
a6b92a4a
GM
7651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7652/* end confdefs.h. */
7653
7654int
7655main ()
7656{
7657
7658 ;
7659 return 0;
7660}
7661_ACEOF
7662if ac_fn_c_try_compile "$LINENO"; then :
7663 gl_cv_warn_c__Wno_missing_field_initializers=yes
7664else
7665 gl_cv_warn_c__Wno_missing_field_initializers=no
7666fi
7667rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7668 CFLAGS="$gl_save_compiler_FLAGS"
7669
7670fi
7671{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_missing_field_initializers" >&5
7672$as_echo "$gl_cv_warn_c__Wno_missing_field_initializers" >&6; }
7673if test "x$gl_cv_warn_c__Wno_missing_field_initializers" = x""yes; then :
7674 as_fn_append WARN_CFLAGS " -Wno-missing-field-initializers"
7675fi
0eb775a3 7676
a6b92a4a
GM
7677 # We need this one
7678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-sign-compare" >&5
7679$as_echo_n "checking whether C compiler handles -Wno-sign-compare... " >&6; }
7680if test "${gl_cv_warn_c__Wno_sign_compare+set}" = set; then :
7681 $as_echo_n "(cached) " >&6
7682else
7683
7684 gl_save_compiler_FLAGS="$CFLAGS"
0eb775a3 7685 as_fn_append CFLAGS " -Wno-sign-compare"
a6b92a4a
GM
7686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7687/* end confdefs.h. */
7688
7689int
7690main ()
7691{
7692
7693 ;
7694 return 0;
7695}
7696_ACEOF
7697if ac_fn_c_try_compile "$LINENO"; then :
7698 gl_cv_warn_c__Wno_sign_compare=yes
7699else
7700 gl_cv_warn_c__Wno_sign_compare=no
7701fi
7702rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7703 CFLAGS="$gl_save_compiler_FLAGS"
7704
7705fi
7706{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_sign_compare" >&5
7707$as_echo "$gl_cv_warn_c__Wno_sign_compare" >&6; }
7708if test "x$gl_cv_warn_c__Wno_sign_compare" = x""yes; then :
7709 as_fn_append WARN_CFLAGS " -Wno-sign-compare"
7710fi
0eb775a3 7711
a6b92a4a
GM
7712 # Too many warnings for now
7713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-type-limits" >&5
7714$as_echo_n "checking whether C compiler handles -Wno-type-limits... " >&6; }
7715if test "${gl_cv_warn_c__Wno_type_limits+set}" = set; then :
7716 $as_echo_n "(cached) " >&6
7717else
7718
7719 gl_save_compiler_FLAGS="$CFLAGS"
0eb775a3 7720 as_fn_append CFLAGS " -Wno-type-limits"
a6b92a4a
GM
7721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7722/* end confdefs.h. */
7723
7724int
7725main ()
7726{
7727
7728 ;
7729 return 0;
7730}
7731_ACEOF
7732if ac_fn_c_try_compile "$LINENO"; then :
7733 gl_cv_warn_c__Wno_type_limits=yes
7734else
7735 gl_cv_warn_c__Wno_type_limits=no
7736fi
7737rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7738 CFLAGS="$gl_save_compiler_FLAGS"
7739
7740fi
7741{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_type_limits" >&5
7742$as_echo "$gl_cv_warn_c__Wno_type_limits" >&6; }
7743if test "x$gl_cv_warn_c__Wno_type_limits" = x""yes; then :
7744 as_fn_append WARN_CFLAGS " -Wno-type-limits"
7745fi
0eb775a3 7746
a6b92a4a
GM
7747 # Too many warnings for now
7748 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-switch" >&5
7749$as_echo_n "checking whether C compiler handles -Wno-switch... " >&6; }
7750if test "${gl_cv_warn_c__Wno_switch+set}" = set; then :
7751 $as_echo_n "(cached) " >&6
7752else
7753
7754 gl_save_compiler_FLAGS="$CFLAGS"
0eb775a3 7755 as_fn_append CFLAGS " -Wno-switch"
a6b92a4a
GM
7756 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7757/* end confdefs.h. */
7758
7759int
7760main ()
7761{
7762
7763 ;
7764 return 0;
7765}
7766_ACEOF
7767if ac_fn_c_try_compile "$LINENO"; then :
7768 gl_cv_warn_c__Wno_switch=yes
7769else
7770 gl_cv_warn_c__Wno_switch=no
7771fi
7772rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7773 CFLAGS="$gl_save_compiler_FLAGS"
7774
7775fi
7776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_switch" >&5
7777$as_echo "$gl_cv_warn_c__Wno_switch" >&6; }
7778if test "x$gl_cv_warn_c__Wno_switch" = x""yes; then :
7779 as_fn_append WARN_CFLAGS " -Wno-switch"
7780fi
0eb775a3 7781
a6b92a4a
GM
7782 # Too many warnings for now
7783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-parameter" >&5
7784$as_echo_n "checking whether C compiler handles -Wno-unused-parameter... " >&6; }
7785if test "${gl_cv_warn_c__Wno_unused_parameter+set}" = set; then :
7786 $as_echo_n "(cached) " >&6
7787else
7788
7789 gl_save_compiler_FLAGS="$CFLAGS"
0eb775a3 7790 as_fn_append CFLAGS " -Wno-unused-parameter"
a6b92a4a
GM
7791 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7792/* end confdefs.h. */
7793
7794int
7795main ()
7796{
7797
7798 ;
7799 return 0;
7800}
7801_ACEOF
7802if ac_fn_c_try_compile "$LINENO"; then :
7803 gl_cv_warn_c__Wno_unused_parameter=yes
7804else
7805 gl_cv_warn_c__Wno_unused_parameter=no
7806fi
7807rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7808 CFLAGS="$gl_save_compiler_FLAGS"
7809
7810fi
7811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_parameter" >&5
7812$as_echo "$gl_cv_warn_c__Wno_unused_parameter" >&6; }
7813if test "x$gl_cv_warn_c__Wno_unused_parameter" = x""yes; then :
7814 as_fn_append WARN_CFLAGS " -Wno-unused-parameter"
7815fi
0eb775a3 7816
a6b92a4a
GM
7817 # Too many warnings for now
7818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-format-nonliteral" >&5
7819$as_echo_n "checking whether C compiler handles -Wno-format-nonliteral... " >&6; }
7820if test "${gl_cv_warn_c__Wno_format_nonliteral+set}" = set; then :
7821 $as_echo_n "(cached) " >&6
7822else
7823
7824 gl_save_compiler_FLAGS="$CFLAGS"
0eb775a3 7825 as_fn_append CFLAGS " -Wno-format-nonliteral"
a6b92a4a
GM
7826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7827/* end confdefs.h. */
7828
7829int
7830main ()
7831{
7832
7833 ;
7834 return 0;
7835}
7836_ACEOF
7837if ac_fn_c_try_compile "$LINENO"; then :
7838 gl_cv_warn_c__Wno_format_nonliteral=yes
7839else
7840 gl_cv_warn_c__Wno_format_nonliteral=no
7841fi
7842rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7843 CFLAGS="$gl_save_compiler_FLAGS"
7844
7845fi
7846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_format_nonliteral" >&5
7847$as_echo "$gl_cv_warn_c__Wno_format_nonliteral" >&6; }
7848if test "x$gl_cv_warn_c__Wno_format_nonliteral" = x""yes; then :
7849 as_fn_append WARN_CFLAGS " -Wno-format-nonliteral"
7850fi
7851
7852
0eb775a3 7853
a6b92a4a
GM
7854 # In spite of excluding -Wlogical-op above, it is enabled, as of
7855 # gcc 4.5.0 20090517.
7856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-logical-op" >&5
7857$as_echo_n "checking whether C compiler handles -Wno-logical-op... " >&6; }
7858if test "${gl_cv_warn_c__Wno_logical_op+set}" = set; then :
7859 $as_echo_n "(cached) " >&6
7860else
7861
7862 gl_save_compiler_FLAGS="$CFLAGS"
0eb775a3 7863 as_fn_append CFLAGS " -Wno-logical-op"
a6b92a4a
GM
7864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7865/* end confdefs.h. */
7866
7867int
7868main ()
7869{
7870
7871 ;
7872 return 0;
7873}
7874_ACEOF
7875if ac_fn_c_try_compile "$LINENO"; then :
7876 gl_cv_warn_c__Wno_logical_op=yes
7877else
7878 gl_cv_warn_c__Wno_logical_op=no
7879fi
7880rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7881 CFLAGS="$gl_save_compiler_FLAGS"
7882
7883fi
7884{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_logical_op" >&5
7885$as_echo "$gl_cv_warn_c__Wno_logical_op" >&6; }
7886if test "x$gl_cv_warn_c__Wno_logical_op" = x""yes; then :
7887 as_fn_append WARN_CFLAGS " -Wno-logical-op"
7888fi
7889
7890
0eb775a3 7891
a6b92a4a
GM
7892 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fdiagnostics-show-option" >&5
7893$as_echo_n "checking whether C compiler handles -fdiagnostics-show-option... " >&6; }
7894if test "${gl_cv_warn_c__fdiagnostics_show_option+set}" = set; then :
7895 $as_echo_n "(cached) " >&6
7896else
7897
7898 gl_save_compiler_FLAGS="$CFLAGS"
0eb775a3 7899 as_fn_append CFLAGS " -fdiagnostics-show-option"
a6b92a4a 7900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
7901/* end confdefs.h. */
7902
7903int
7904main ()
7905{
7906
7907 ;
7908 return 0;
7909}
7910_ACEOF
7911if ac_fn_c_try_compile "$LINENO"; then :
a6b92a4a 7912 gl_cv_warn_c__fdiagnostics_show_option=yes
067d23c9 7913else
a6b92a4a 7914 gl_cv_warn_c__fdiagnostics_show_option=no
067d23c9
KY
7915fi
7916rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a6b92a4a
GM
7917 CFLAGS="$gl_save_compiler_FLAGS"
7918
7919fi
7920{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fdiagnostics_show_option" >&5
7921$as_echo "$gl_cv_warn_c__fdiagnostics_show_option" >&6; }
7922if test "x$gl_cv_warn_c__fdiagnostics_show_option" = x""yes; then :
7923 as_fn_append WARN_CFLAGS " -fdiagnostics-show-option"
067d23c9 7924fi
067d23c9 7925
0eb775a3 7926
a6b92a4a
GM
7927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -funit-at-a-time" >&5
7928$as_echo_n "checking whether C compiler handles -funit-at-a-time... " >&6; }
7929if test "${gl_cv_warn_c__funit_at_a_time+set}" = set; then :
7930 $as_echo_n "(cached) " >&6
7931else
7932
7933 gl_save_compiler_FLAGS="$CFLAGS"
0eb775a3 7934 as_fn_append CFLAGS " -funit-at-a-time"
a6b92a4a
GM
7935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7936/* end confdefs.h. */
7937
7938int
7939main ()
7940{
7941
7942 ;
7943 return 0;
7944}
7945_ACEOF
7946if ac_fn_c_try_compile "$LINENO"; then :
7947 gl_cv_warn_c__funit_at_a_time=yes
7948else
7949 gl_cv_warn_c__funit_at_a_time=no
7950fi
7951rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7952 CFLAGS="$gl_save_compiler_FLAGS"
7953
7954fi
7955{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__funit_at_a_time" >&5
7956$as_echo "$gl_cv_warn_c__funit_at_a_time" >&6; }
7957if test "x$gl_cv_warn_c__funit_at_a_time" = x""yes; then :
7958 as_fn_append WARN_CFLAGS " -funit-at-a-time"
7959fi
7960
7961
7962
0eb775a3 7963
a6b92a4a
GM
7964$as_echo "#define lint 1" >>confdefs.h
7965
7966
a6b92a4a
GM
7967
7968$as_echo "#define GNULIB_PORTCHECK 1" >>confdefs.h
7969
7970
7971 # We use a slightly smaller set of warning options for lib/.
7972 # Remove the following and save the result in GNULIB_WARN_CFLAGS.
7973 nw=
7974 nw="$nw -Wunused-macros"
7975
7976
7977 gl_warn_set=
7978 set x $WARN_CFLAGS; shift
7979 for gl_warn_item
7980 do
7981 case " $nw " in
7982 *" $gl_warn_item "*)
7983 ;;
7984 *)
7985 gl_warn_set="$gl_warn_set $gl_warn_item"
7986 ;;
7987 esac
7988 done
7989 GNULIB_WARN_CFLAGS=$gl_warn_set
7990
7991
7992fi
067d23c9
KY
7993
7994
7995
0e733db9
GM
7996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7997$as_echo_n "checking whether ln -s works... " >&6; }
7998LN_S=$as_ln_s
7999if test "$LN_S" = "ln -s"; then
8000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8001$as_echo "yes" >&6; }
8002else
8003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
8004$as_echo "no, using $LN_S" >&6; }
8005fi
8006
067d23c9 8007
067d23c9
KY
8008# Extract the first word of "install-info", so it can be a program name with args.
8009set dummy install-info; ac_word=$2
8010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8011$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 8012if test "${ac_cv_path_INSTALL_INFO+set}" = set; then :
067d23c9
KY
8013 $as_echo_n "(cached) " >&6
8014else
8015 case $INSTALL_INFO in
8016 [\\/]* | ?:[\\/]*)
8017 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
8018 ;;
8019 *)
8020 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
e700232f 8021for as_dir in $PATH$PATH_SEPARATOR/usr/sbin$PATH_SEPARATOR/sbin
067d23c9
KY
8022do
8023 IFS=$as_save_IFS
8024 test -z "$as_dir" && as_dir=.
8025 for ac_exec_ext in '' $ac_executable_extensions; do
8026 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8027 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
8028 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8029 break 2
8030 fi
8031done
8032 done
8033IFS=$as_save_IFS
8034
8035 test -z "$ac_cv_path_INSTALL_INFO" && ac_cv_path_INSTALL_INFO=":"
8036 ;;
8037esac
8038fi
8039INSTALL_INFO=$ac_cv_path_INSTALL_INFO
8040if test -n "$INSTALL_INFO"; then
8041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_INFO" >&5
8042$as_echo "$INSTALL_INFO" >&6; }
8043else
8044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8045$as_echo "no" >&6; }
8046fi
8047
8048
8049# Extract the first word of "gzip", so it can be a program name with args.
8050set dummy gzip; ac_word=$2
8051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8052$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 8053if test "${ac_cv_path_GZIP_PROG+set}" = set; then :
067d23c9
KY
8054 $as_echo_n "(cached) " >&6
8055else
8056 case $GZIP_PROG in
8057 [\\/]* | ?:[\\/]*)
8058 ac_cv_path_GZIP_PROG="$GZIP_PROG" # Let the user override the test with a path.
8059 ;;
8060 *)
8061 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8062for as_dir in $PATH
8063do
8064 IFS=$as_save_IFS
8065 test -z "$as_dir" && as_dir=.
8066 for ac_exec_ext in '' $ac_executable_extensions; do
8067 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8068 ac_cv_path_GZIP_PROG="$as_dir/$ac_word$ac_exec_ext"
8069 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8070 break 2
8071 fi
8072done
8073 done
8074IFS=$as_save_IFS
8075
8076 ;;
8077esac
8078fi
8079GZIP_PROG=$ac_cv_path_GZIP_PROG
8080if test -n "$GZIP_PROG"; then
8081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP_PROG" >&5
8082$as_echo "$GZIP_PROG" >&6; }
8083else
8084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8085$as_echo "no" >&6; }
8086fi
8087
8088
7ee3791f
GM
8089
8090if test $opsys = gnu-linux; then
8091 # Extract the first word of "paxctl", so it can be a program name with args.
9c29597b
GM
8092set dummy paxctl; ac_word=$2
8093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8094$as_echo_n "checking for $ac_word... " >&6; }
8095if test "${ac_cv_path_PAXCTL+set}" = set; then :
8096 $as_echo_n "(cached) " >&6
8097else
8098 case $PAXCTL in
8099 [\\/]* | ?:[\\/]*)
8100 ac_cv_path_PAXCTL="$PAXCTL" # Let the user override the test with a path.
8101 ;;
8102 *)
8103 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8104for as_dir in $PATH$PATH_SEPARATOR/sbin$PATH_SEPARATOR/usr/sbin
8105do
8106 IFS=$as_save_IFS
8107 test -z "$as_dir" && as_dir=.
8108 for ac_exec_ext in '' $ac_executable_extensions; do
8109 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8110 ac_cv_path_PAXCTL="$as_dir/$ac_word$ac_exec_ext"
8111 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8112 break 2
8113 fi
8114done
8115 done
8116IFS=$as_save_IFS
8117
8118 ;;
8119esac
8120fi
8121PAXCTL=$ac_cv_path_PAXCTL
8122if test -n "$PAXCTL"; then
8123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PAXCTL" >&5
8124$as_echo "$PAXCTL" >&6; }
8125else
8126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8127$as_echo "no" >&6; }
8128fi
8129
8130
685e57ea
GM
8131 if test "X$PAXCTL" != X; then
8132 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether binaries have a PT_PAX_FLAGS header" >&5
8133$as_echo_n "checking whether binaries have a PT_PAX_FLAGS header... " >&6; }
8134 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8135/* end confdefs.h. */
8136
8137int
8138main ()
8139{
8140
8141 ;
8142 return 0;
8143}
8144_ACEOF
8145if ac_fn_c_try_link "$LINENO"; then :
8146 if $PAXCTL -v conftest$EXEEXT >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8147$as_echo "yes" >&6; }
8148 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8149$as_echo "no" >&6; }; PAXCTL=""; fi
8150fi
8151rm -f core conftest.err conftest.$ac_objext \
8152 conftest$ac_exeext conftest.$ac_ext
8153 fi
7ee3791f 8154fi
067d23c9 8155
9e40dda4 8156## Need makeinfo >= 4.7 (?) to build the manuals.
067d23c9
KY
8157# Extract the first word of "makeinfo", so it can be a program name with args.
8158set dummy makeinfo; ac_word=$2
8159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8160$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 8161if test "${ac_cv_path_MAKEINFO+set}" = set; then :
067d23c9
KY
8162 $as_echo_n "(cached) " >&6
8163else
8164 case $MAKEINFO in
8165 [\\/]* | ?:[\\/]*)
8166 ac_cv_path_MAKEINFO="$MAKEINFO" # Let the user override the test with a path.
8167 ;;
8168 *)
8169 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8170for as_dir in $PATH
8171do
8172 IFS=$as_save_IFS
8173 test -z "$as_dir" && as_dir=.
8174 for ac_exec_ext in '' $ac_executable_extensions; do
8175 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8176 ac_cv_path_MAKEINFO="$as_dir/$ac_word$ac_exec_ext"
8177 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8178 break 2
8179 fi
8180done
8181 done
8182IFS=$as_save_IFS
8183
8184 test -z "$ac_cv_path_MAKEINFO" && ac_cv_path_MAKEINFO="no"
8185 ;;
8186esac
8187fi
8188MAKEINFO=$ac_cv_path_MAKEINFO
8189if test -n "$MAKEINFO"; then
8190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKEINFO" >&5
8191$as_echo "$MAKEINFO" >&6; }
8192else
8193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8194$as_echo "no" >&6; }
8195fi
8196
8197
b5591ebb
GM
8198if test "$MAKEINFO" != "no"; then
8199 case `
8200 $MAKEINFO --version 2> /dev/null |
8201 $EGREP 'texinfo[^0-9]*([1-4][0-9]+|[5-9]|4\.[7-9]|4\.[1-6][0-9]+)'
8202 ` in
8203 '') MAKEINFO=no;;
8204 esac
067d23c9
KY
8205fi
8206
8207## Makeinfo is unusual. For a released Emacs, the manuals are
8208## pre-built, and not deleted by the normal clean rules. makeinfo is
8209## therefore in the category of "special tools" not normally required, which
8210## configure does not have to check for (eg autoconf itself).
8211## In a Bazaar checkout on the other hand, the manuals are not included.
8212## So makeinfo is a requirement to build from Bazaar, and configure
8213## should test for it as it does for any other build requirement.
8214## We use the presence of $srcdir/info/emacs to distinguish a release,
8215## with pre-built manuals, from a Bazaar checkout.
96f129d5
GM
8216HAVE_MAKEINFO=yes
8217
067d23c9 8218if test "$MAKEINFO" = "no"; then
96f129d5 8219 MAKEINFO=makeinfo
067d23c9 8220 if test "x${with_makeinfo}" = "xno"; then
96f129d5 8221 HAVE_MAKEINFO=no
b5591ebb 8222 elif test ! -e "$srcdir/info/emacs" && test ! -e "$srcdir/info/emacs.info"; then
9e40dda4 8223 as_fn_error "You do not seem to have makeinfo >= 4.7, and your
067d23c9
KY
8224source tree does not seem to have pre-built manuals in the \`info' directory.
8225Either install a suitable version of makeinfo, or re-run configure
8226with the \`--without-makeinfo' option to build without the manuals. " "$LINENO" 5
8227 fi
8228fi
8229
8230
141d074d
GM
8231INFO_EXT=.info
8232INFO_OPTS=--no-split
8233
8234
8235
96f129d5 8236
067d23c9
KY
8237if test x$GCC = xyes; then
8238 test "x$GCC_LINK_TEST_OPTIONS" != x && \
8239 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
8240else
8241 test "x$NON_GCC_LINK_TEST_OPTIONS" != x && \
8242 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
8243fi
8244
8245
8246late_LDFLAGS=$LDFLAGS
8247if test x$GCC = xyes; then
8248 LDFLAGS="$LDFLAGS -Wl,-znocombreloc"
8249else
8250 LDFLAGS="$LDFLAGS -znocombreloc"
8251fi
8252
8253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -znocombreloc" >&5
8254$as_echo_n "checking for -znocombreloc... " >&6; }
8255cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8256/* end confdefs.h. */
8257
8258int
8259main ()
8260{
8261
8262 ;
8263 return 0;
8264}
8265_ACEOF
8266if ac_fn_c_try_link "$LINENO"; then :
8267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8268$as_echo "yes" >&6; }
8269else
8270 LDFLAGS=$late_LDFLAGS
8271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8272$as_echo "no" >&6; }
8273fi
8274rm -f core conftest.err conftest.$ac_objext \
8275 conftest$ac_exeext conftest.$ac_ext
8276
8277
125c3718 8278test "x$CANNOT_DUMP" = "x" && CANNOT_DUMP=no
067d23c9 8279case "$opsys" in
125c3718
PE
8280 your-opsys-here) CANNOT_DUMP=yes ;;
8281esac
8282
8283test "$CANNOT_DUMP" = "yes" && \
067d23c9
KY
8284
8285$as_echo "#define CANNOT_DUMP 1" >>confdefs.h
8286
125c3718 8287
067d23c9
KY
8288
8289
8290
8291UNEXEC_OBJ=unexelf.o
8292case "$opsys" in
8293 # MSDOS uses unexcoff.o
8294 # MSWindows uses unexw32.o
8295 aix4-2)
8296 UNEXEC_OBJ=unexaix.o
8297 ;;
8298 cygwin)
8299 UNEXEC_OBJ=unexcw.o
8300 ;;
8301 darwin)
8302 UNEXEC_OBJ=unexmacosx.o
8303 ;;
8304 hpux10-20 | hpux11)
8305 UNEXEC_OBJ=unexhp9k800.o
8306 ;;
8307 sol2-10)
8308 # Use the Solaris dldump() function, called from unexsol.c, to dump
8309 # emacs, instead of the generic ELF dump code found in unexelf.c.
8310 # The resulting binary has a complete symbol table, and is better
8311 # for debugging and other observability tools (debuggers, pstack, etc).
8312 #
8313 # If you encounter a problem using dldump(), please consider sending
8314 # a message to the OpenSolaris tools-linking mailing list:
8315 # http://mail.opensolaris.org/mailman/listinfo/tools-linking
8316 #
8317 # It is likely that dldump() works with older Solaris too, but this has
8318 # not been tested, so for now this change is for Solaris 10 or newer.
8319 UNEXEC_OBJ=unexsol.o
8320 ;;
8321esac
8322
8323LD_SWITCH_SYSTEM=
8324case "$opsys" in
8325 freebsd)
8326 ## Let `ld' find image libs and similar things in /usr/local/lib.
8327 ## The system compiler, GCC, has apparently been modified to not
8328 ## look there, contrary to what a stock GCC would do.
a7479549
GM
8329### It's not our place to do this. See bug#10313#17.
8330### LD_SWITCH_SYSTEM=-L/usr/local/lib
8331 :
067d23c9
KY
8332 ;;
8333
8334 gnu-linux)
8335 ## cpp test was "ifdef __mips__", but presumably this is equivalent...
d6a003a8 8336 case $host_cpu in mips*) LD_SWITCH_SYSTEM="-G 0";; esac
067d23c9
KY
8337 ;;
8338
8339 netbsd)
a7479549
GM
8340### It's not our place to do this. See bug#10313#17.
8341### LD_SWITCH_SYSTEM="-Wl,-rpath,/usr/pkg/lib -L/usr/pkg/lib -Wl,-rpath,/usr/local/lib -L/usr/local/lib"
8342 :
067d23c9
KY
8343 ;;
8344
8345 openbsd)
8346 ## Han Boetes <han@mijncomputer.nl> says this is necessary,
8347 ## otherwise Emacs dumps core on elf systems.
8348 LD_SWITCH_SYSTEM="-Z"
8349 ;;
8350esac
8351
8352
8353ac_link="$ac_link $LD_SWITCH_SYSTEM"
8354
ae629dae 8355## This setting of LD_SWITCH_SYSTEM references LD_SWITCH_X_SITE_RPATH,
067d23c9
KY
8356## which has not been defined yet. When this was handled with cpp,
8357## it was expanded to null when configure sourced the s/*.h file.
8358## Thus LD_SWITCH_SYSTEM had different values in configure and the Makefiles.
8359## FIXME it would be cleaner to put this in LD_SWITCH_SYSTEM_TEMACS
8360## (or somesuch), but because it is supposed to go at the _front_
8361## of LD_SWITCH_SYSTEM, we cannot do that in exactly the same way.
8362## Compare with the gnu-linux case below, which added to the end
8363## of LD_SWITCH_SYSTEM, and so can instead go at the front of
8364## LD_SWITCH_SYSTEM_TEMACS.
8365case "$opsys" in
8366 netbsd|openbsd)
ae629dae 8367 LD_SWITCH_SYSTEM="\$(LD_SWITCH_X_SITE_RPATH) $LD_SWITCH_SYSTEM" ;;
067d23c9
KY
8368esac
8369
8370
8371C_SWITCH_MACHINE=
42bbbe8b
GM
8372case $canonical in
8373 alpha*)
067d23c9 8374 ac_fn_c_check_decl "$LINENO" "__ELF__" "ac_cv_have_decl___ELF__" "$ac_includes_default"
a9bec17c 8375if test "x$ac_cv_have_decl___ELF__" = x""yes; then :
067d23c9
KY
8376
8377fi
8378
8379 if test "$ac_cv_have_decl___ELF__" = "yes"; then
8380 ## With ELF, make sure that all common symbols get allocated to in the
8381 ## data section. Otherwise, the dump of temacs may miss variables in
8382 ## the shared library that have been initialized. For example, with
8383 ## GNU libc, __malloc_initialized would normally be resolved to the
8384 ## shared library's .bss section, which is fatal.
8385 if test "x$GCC" = "xyes"; then
8386 C_SWITCH_MACHINE="-fno-common"
8387 else
a9bec17c 8388 as_fn_error "What gives? Fix me if DEC Unix supports ELF now." "$LINENO" 5
067d23c9
KY
8389 fi
8390 else
8391 UNEXEC_OBJ=unexalpha.o
8392 fi
42bbbe8b
GM
8393 ;;
8394esac
067d23c9
KY
8395
8396
8397
8398
8399C_SWITCH_SYSTEM=
8400## Some programs in src produce warnings saying certain subprograms
8401## are too complex and need a MAXMEM value greater than 2000 for
8402## additional optimization. --nils@exp-math.uni-essen.de
8403test "$opsys" = "aix4.2" && test "x$GCC" != "xyes" && \
8404 C_SWITCH_SYSTEM="-ma -qmaxmem=4000"
8405## gnu-linux might need -D_BSD_SOURCE on old libc5 systems.
8406## It is redundant in glibc2, since we define _GNU_SOURCE.
8407
8408
8409
8410LIBS_SYSTEM=
8411case "$opsys" in
8412 ## IBM's X11R5 uses -lIM and -liconv in AIX 3.2.2.
8413 aix4-2) LIBS_SYSTEM="-lrts -lIM -liconv" ;;
8414
8415 freebsd) LIBS_SYSTEM="-lutil" ;;
8416
8417 hpux*) LIBS_SYSTEM="-l:libdld.sl" ;;
8418
1f5d53eb 8419 sol2*) LIBS_SYSTEM="-lsocket -lnsl" ;;
067d23c9
KY
8420
8421 ## Motif needs -lgen.
8422 unixware) LIBS_SYSTEM="-lsocket -lnsl -lelf -lgen" ;;
8423esac
8424
8425
8426
8427### Make sure subsequent tests use flags consistent with the build flags.
8428
8429if test x"${OVERRIDE_CPPFLAGS}" != x; then
8430 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
8431else
8432 CPPFLAGS="$C_SWITCH_SYSTEM $C_SWITCH_MACHINE $CPPFLAGS"
8433fi
8434
4fda9c95
GM
8435# Suppress obsolescent Autoconf test for size_t; Emacs assumes C89 or better.
8436
3e0be4ab
GM
8437# Likewise for obsolescent test for uid_t, gid_t; Emacs assumes them.
8438
4fda9c95 8439
067d23c9 8440
067d23c9
KY
8441LIB_MATH=-lm
8442LIB_STANDARD=
8443START_FILES=
4717915f 8444SYSTEM_TYPE=`echo $opsys | sed -e 's/[0-9].*//' -e 's|-|/|'`
067d23c9
KY
8445
8446case $opsys in
8447 cygwin )
8448 LIB_MATH=
8449 START_FILES='pre-crt0.o'
8450 ;;
8451 darwin )
8452 ## Adding -lm confuses the dynamic linker, so omit it.
8453 LIB_MATH=
8454 START_FILES='pre-crt0.o'
8455 ;;
8456 freebsd )
6b10626d
GM
8457 LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtn.o'
8458 START_FILES='pre-crt0.o $(CRT_DIR)/crt1.o $(CRT_DIR)/crti.o'
15f79fcd 8459 SYSTEM_TYPE=berkeley-unix
067d23c9
KY
8460 ;;
8461 gnu-linux | gnu-kfreebsd )
8462 LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtn.o'
8463 START_FILES='pre-crt0.o $(CRT_DIR)/crt1.o $(CRT_DIR)/crti.o'
8464 ;;
8465 hpux10-20 | hpux11 )
8466 LIB_STANDARD=-lc
8467 START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o'
8468 ;;
bb72ce91
GM
8469 netbsd | openbsd )
8470 LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o'
8471 START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o $(CRT_DIR)/crtbegin.o'
15f79fcd 8472 SYSTEM_TYPE=berkeley-unix
067d23c9 8473 ;;
15f79fcd
GM
8474
8475 sol2* | unixware )
8476 SYSTEM_TYPE=usg-unix-v
8477 ;;
8478
067d23c9
KY
8479esac
8480
8481
8482
8483
15f79fcd
GM
8484cat >>confdefs.h <<_ACEOF
8485#define SYSTEM_TYPE "$SYSTEM_TYPE"
8486_ACEOF
8487
8488
130f1dac
GM
8489crt_files=
8490
8491for file in x $LIB_STANDARD $START_FILES; do
8492 case "$file" in
8493 *CRT_DIR*) crt_files="$crt_files `echo $file | sed -e 's|.*/||'`" ;;
8494 esac
8495done
8496
8497if test "x$crt_files" != x; then
8498
8499 ## If user specified a crt-dir, use that unconditionally.
8500 crt_gcc=no
8501
8502 if test "X$CRT_DIR" = "X"; then
8503
8504 CRT_DIR=/usr/lib # default
8505
8506 case "$canonical" in
8507 x86_64-*-linux-gnu* | s390x-*-linux-gnu*)
8508 ## On x86-64 and s390x GNU/Linux distributions, the standard library
8509 ## can be in a variety of places. We only try /usr/lib64 and /usr/lib.
8510 ## For anything else (eg /usr/lib32), it is up the user to specify
8511 ## the location (bug#5655).
8512 ## Test for crtn.o, not just the directory, because sometimes the
8513 ## directory exists but does not have the relevant files (bug#1287).
8514 ## FIXME better to test for binary compatibility somehow.
8515 test -e /usr/lib64/crtn.o && CRT_DIR=/usr/lib64
8516 ;;
8517
8518 powerpc64-*-linux-gnu* | sparc64-*-linux-gnu*) CRT_DIR=/usr/lib64 ;;
8519 esac
8520
8521 case "$opsys" in
8522 hpux10-20) CRT_DIR=/lib ;;
8523 esac
8524
8525 test "x${GCC}" = xyes && crt_gcc=yes
8526
8527 fi # CRT_DIR = ""
8528
8529 crt_missing=
8530
8531 for file in $crt_files; do
8532
8533 ## If we're using gcc, try to determine it automatically by asking
8534 ## gcc. [If this doesn't work, CRT_DIR will remain at the
8535 ## system-dependent default from above.]
8536 if test $crt_gcc = yes && test ! -e $CRT_DIR/$file; then
8537
8538 crt_file=`$CC --print-file-name=$file 2>/dev/null`
8539 case "$crt_file" in
8540 */*)
8541 CRT_DIR=`$as_dirname -- "$crt_file" ||
8542$as_expr X"$crt_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
8543 X"$crt_file" : 'X\(//\)[^/]' \| \
8544 X"$crt_file" : 'X\(//\)$' \| \
8545 X"$crt_file" : 'X\(/\)' \| . 2>/dev/null ||
8546$as_echo X"$crt_file" |
8547 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
8548 s//\1/
8549 q
8550 }
8551 /^X\(\/\/\)[^/].*/{
8552 s//\1/
8553 q
8554 }
8555 /^X\(\/\/\)$/{
8556 s//\1/
8557 q
8558 }
8559 /^X\(\/\).*/{
8560 s//\1/
8561 q
8562 }
8563 s/.*/./; q'`
8564 ;;
8565 esac
8566 fi
8567
8568 crt_gcc=no
8569
8570 test -e $CRT_DIR/$file || crt_missing="$crt_missing $file"
8571 done # $crt_files
8572
8573 test "x$crt_missing" = x || \
a9bec17c 8574 as_fn_error "Required file(s) not found:$crt_missing
130f1dac
GM
8575Try using the --with-crt-dir option." "$LINENO" 5
8576
8577fi # crt_files != ""
8578
8579
8580
bb72ce91
GM
8581case $opsys in
8582 netbsd | openbsd )
8583 if test -f $CRT_DIR/crti.o; then
8584
8585 test -f $CRT_DIR/crtn.o || \
8586 as_fn_error "Required file not found: crtn.o" "$LINENO" 5
8587
8588 LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o $(CRT_DIR)/crtn.o'
8589 START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o $(CRT_DIR)/crti.o $(CRT_DIR)/crtbegin.o'
8590 fi
8591 ;;
8592esac
8593
130f1dac 8594
5476a9a4
GM
8595pre_PKG_CONFIG_CFLAGS=$CFLAGS
8596pre_PKG_CONFIG_LIBS=$LIBS
067d23c9 8597
5476a9a4
GM
8598# Extract the first word of "pkg-config", so it can be a program name with args.
8599set dummy pkg-config; ac_word=$2
8600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8601$as_echo_n "checking for $ac_word... " >&6; }
8602if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
8603 $as_echo_n "(cached) " >&6
8604else
8605 case $PKG_CONFIG in
8606 [\\/]* | ?:[\\/]*)
8607 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8608 ;;
8609 *)
8610 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8611for as_dir in $PATH
8612do
8613 IFS=$as_save_IFS
8614 test -z "$as_dir" && as_dir=.
8615 for ac_exec_ext in '' $ac_executable_extensions; do
8616 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8617 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8618 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8619 break 2
8620 fi
8621done
8622 done
8623IFS=$as_save_IFS
8624
8625 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
8626 ;;
8627esac
8628fi
8629PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8630if test -n "$PKG_CONFIG"; then
8631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8632$as_echo "$PKG_CONFIG" >&6; }
8633else
8634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8635$as_echo "no" >&6; }
8636fi
f199cab1
GM
8637
8638
f199cab1 8639
5476a9a4
GM
8640
8641
8642
8643if test "${with_sound}" != "no"; then
8644 # Sound support for GNU/Linux and the free BSDs.
8645 for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h
8646do :
8647 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8648ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8649eval as_val=\$$as_ac_Header
8650 if test "x$as_val" = x""yes; then :
8651 cat >>confdefs.h <<_ACEOF
8652#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8653_ACEOF
8654 have_sound_header=yes
8655fi
8656
8657done
8658
8659 # Emulation library used on NetBSD.
8660 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _oss_ioctl in -lossaudio" >&5
8661$as_echo_n "checking for _oss_ioctl in -lossaudio... " >&6; }
8662if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then :
067d23c9
KY
8663 $as_echo_n "(cached) " >&6
8664else
5476a9a4
GM
8665 ac_check_lib_save_LIBS=$LIBS
8666LIBS="-lossaudio $LIBS"
8667cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 8668/* end confdefs.h. */
5476a9a4
GM
8669
8670/* Override any GCC internal prototype to avoid an error.
8671 Use char because int might match the return type of a GCC
8672 builtin and then its argument prototype would still apply. */
8673#ifdef __cplusplus
8674extern "C"
8675#endif
8676char _oss_ioctl ();
067d23c9
KY
8677int
8678main ()
8679{
5476a9a4 8680return _oss_ioctl ();
067d23c9
KY
8681 ;
8682 return 0;
8683}
8684_ACEOF
8685if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 8686 ac_cv_lib_ossaudio__oss_ioctl=yes
067d23c9 8687else
5476a9a4 8688 ac_cv_lib_ossaudio__oss_ioctl=no
067d23c9
KY
8689fi
8690rm -f core conftest.err conftest.$ac_objext \
8691 conftest$ac_exeext conftest.$ac_ext
5476a9a4
GM
8692LIBS=$ac_check_lib_save_LIBS
8693fi
8694{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5
8695$as_echo "$ac_cv_lib_ossaudio__oss_ioctl" >&6; }
8696if test "x$ac_cv_lib_ossaudio__oss_ioctl" = x""yes; then :
8697 LIBSOUND=-lossaudio
8698else
8699 LIBSOUND=
067d23c9
KY
8700fi
8701
8702
8703
5476a9a4
GM
8704 ALSA_REQUIRED=1.0.0
8705 ALSA_MODULES="alsa >= $ALSA_REQUIRED"
8706
8707 succeeded=no
8708
8709 if test "$PKG_CONFIG" = "no" ; then
8710 HAVE_ALSA=no
8711 else
8712 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 8713 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
8714 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ALSA_MODULES" >&5
8715$as_echo_n "checking for $ALSA_MODULES... " >&6; }
8716
b5591ebb
GM
8717 if "$PKG_CONFIG" --exists "$ALSA_MODULES" 2>&5 &&
8718 ALSA_CFLAGS=`"$PKG_CONFIG" --cflags "$ALSA_MODULES" 2>&5` &&
8719 ALSA_LIBS=`"$PKG_CONFIG" --libs "$ALSA_MODULES" 2>&5`; then
5476a9a4
GM
8720 edit_cflags="
8721 s,///*,/,g
8722 s/^/ /
8723 s/ -I/ $isystem/g
8724 s/^ //
8725 "
8726 ALSA_CFLAGS=`$as_echo "$ALSA_CFLAGS" | sed -e "$edit_cflags"`
8727 ALSA_LIBS=`$as_echo "$ALSA_LIBS" | sed -e 's,///*,/,g'`
8728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$ALSA_CFLAGS' LIBS='$ALSA_LIBS'" >&5
8729$as_echo "yes CFLAGS='$ALSA_CFLAGS' LIBS='$ALSA_LIBS'" >&6; }
8730 succeeded=yes
8731 else
8732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8733$as_echo "no" >&6; }
8734 ALSA_CFLAGS=""
8735 ALSA_LIBS=""
8736 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
8737 ## do set a variable so people can do so. Do it in a subshell
8738 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 8739 ALSA_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$ALSA_MODULES") 2>&1`
5476a9a4
GM
8740
8741 fi
8742
8743
8744
8745 else
8746 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
8747 echo "*** See http://www.freedesktop.org/software/pkgconfig"
8748 fi
8749 fi
8750
8751 if test $succeeded = yes; then
8752 HAVE_ALSA=yes
8753 else
8754 HAVE_ALSA=no
8755 fi
f199cab1 8756
5476a9a4
GM
8757 if test $HAVE_ALSA = yes; then
8758 SAVE_CFLAGS="$CFLAGS"
8759 SAVE_LIBS="$LIBS"
8760 CFLAGS="$ALSA_CFLAGS $CFLAGS"
8761 LIBS="$ALSA_LIBS $LIBS"
8762 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8763/* end confdefs.h. */
8764#include <asoundlib.h>
067d23c9
KY
8765int
8766main ()
8767{
5476a9a4 8768snd_lib_error_set_handler (0);
067d23c9
KY
8769 ;
8770 return 0;
8771}
8772_ACEOF
5476a9a4
GM
8773if ac_fn_c_try_compile "$LINENO"; then :
8774 emacs_alsa_normal=yes
067d23c9 8775else
5476a9a4 8776 emacs_alsa_normal=no
067d23c9 8777fi
5476a9a4
GM
8778rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8779 if test "$emacs_alsa_normal" != yes; then
8780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8781/* end confdefs.h. */
8782#include <alsa/asoundlib.h>
8783int
8784main ()
8785{
8786snd_lib_error_set_handler (0);
8787 ;
8788 return 0;
8789}
8790_ACEOF
8791if ac_fn_c_try_compile "$LINENO"; then :
8792 emacs_alsa_subdir=yes
8793else
8794 emacs_alsa_subdir=no
f199cab1 8795fi
5476a9a4
GM
8796rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8797 if test "$emacs_alsa_subdir" != yes; then
8798 as_fn_error "pkg-config found alsa, but it does not compile. See config.log for error messages." "$LINENO" 5
8799 fi
8800 ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE"
8801 fi
067d23c9 8802
5476a9a4
GM
8803 CFLAGS="$SAVE_CFLAGS"
8804 LIBS="$SAVE_LIBS"
8805 LIBSOUND="$LIBSOUND $ALSA_LIBS"
8806 CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS"
067d23c9 8807
5476a9a4 8808$as_echo "#define HAVE_ALSA 1" >>confdefs.h
067d23c9 8809
5476a9a4 8810 fi
067d23c9 8811
5476a9a4
GM
8812 if test x$have_sound_header = xyes || test $HAVE_ALSA = yes; then
8813 case "$opsys" in
8814 gnu-linux|freebsd|netbsd)
067d23c9 8815
5476a9a4 8816$as_echo "#define HAVE_SOUND 1" >>confdefs.h
067d23c9 8817
5476a9a4
GM
8818 ;;
8819 esac
8820 fi
067d23c9
KY
8821
8822
5476a9a4 8823fi
067d23c9 8824
e700232f
GM
8825
8826
8827
5476a9a4
GM
8828 for ac_header in $ac_header_list
8829do :
8830 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8831ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
8832"
8833eval as_val=\$$as_ac_Header
8834 if test "x$as_val" = x""yes; then :
8835 cat >>confdefs.h <<_ACEOF
8836#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
067d23c9
KY
8837_ACEOF
8838
f199cab1 8839fi
e700232f 8840
5476a9a4
GM
8841done
8842
8843
e700232f
GM
8844
8845
8846
f199cab1 8847
067d23c9 8848
067d23c9 8849
067d23c9 8850
067d23c9 8851
f199cab1
GM
8852
8853
8854
067d23c9 8855
067d23c9 8856
f199cab1
GM
8857
8858
8859
f199cab1 8860
f199cab1 8861
5476a9a4
GM
8862
8863
8864
8865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if personality LINUX32 can be set" >&5
8866$as_echo_n "checking if personality LINUX32 can be set... " >&6; }
8867cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8868/* end confdefs.h. */
8869#include <sys/personality.h>
067d23c9
KY
8870int
8871main ()
8872{
5476a9a4 8873personality (PER_LINUX32)
067d23c9
KY
8874 ;
8875 return 0;
8876}
8877_ACEOF
8878if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4 8879 emacs_cv_personality_linux32=yes
067d23c9 8880else
5476a9a4 8881 emacs_cv_personality_linux32=no
067d23c9 8882fi
f199cab1 8883rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5476a9a4
GM
8884{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_personality_linux32" >&5
8885$as_echo "$emacs_cv_personality_linux32" >&6; }
f199cab1 8886
5476a9a4 8887if test $emacs_cv_personality_linux32 = yes; then
f199cab1 8888
5476a9a4
GM
8889$as_echo "#define HAVE_PERSONALITY_LINUX32 1" >>confdefs.h
8890
8891fi
8892
8893for ac_header in term.h
8894do :
8895 ac_fn_c_check_header_preproc "$LINENO" "term.h" "ac_cv_header_term_h"
8896if test "x$ac_cv_header_term_h" = x""yes; then :
8897 cat >>confdefs.h <<_ACEOF
8898#define HAVE_TERM_H 1
067d23c9 8899_ACEOF
5476a9a4
GM
8900
8901fi
8902
8903done
8904
8905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
8906$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
8907if test "${ac_cv_header_time+set}" = set; then :
8908 $as_echo_n "(cached) " >&6
8909else
8910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 8911/* end confdefs.h. */
5476a9a4
GM
8912#include <sys/types.h>
8913#include <sys/time.h>
8914#include <time.h>
f199cab1 8915
067d23c9
KY
8916int
8917main ()
8918{
5476a9a4
GM
8919if ((struct tm *) 0)
8920return 0;
067d23c9
KY
8921 ;
8922 return 0;
8923}
8924_ACEOF
8925if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4 8926 ac_cv_header_time=yes
067d23c9 8927else
5476a9a4 8928 ac_cv_header_time=no
067d23c9
KY
8929fi
8930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8931fi
5476a9a4
GM
8932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
8933$as_echo "$ac_cv_header_time" >&6; }
8934if test $ac_cv_header_time = yes; then
f199cab1 8935
5476a9a4
GM
8936$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
8937
8938fi
8939
dc67e786
GM
8940ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "#include <signal.h>
8941
8942"
5476a9a4
GM
8943if test "x$ac_cv_have_decl_sys_siglist" = x""yes; then :
8944 ac_have_decl=1
8945else
8946 ac_have_decl=0
8947fi
8948
8949cat >>confdefs.h <<_ACEOF
8950#define HAVE_DECL_SYS_SIGLIST $ac_have_decl
067d23c9 8951_ACEOF
5476a9a4
GM
8952
8953if test $ac_cv_have_decl_sys_siglist != yes; then
8954 # For Tru64, at least:
dc67e786
GM
8955 ac_fn_c_check_decl "$LINENO" "__sys_siglist" "ac_cv_have_decl___sys_siglist" "#include <signal.h>
8956
8957"
5476a9a4
GM
8958if test "x$ac_cv_have_decl___sys_siglist" = x""yes; then :
8959 ac_have_decl=1
8960else
8961 ac_have_decl=0
067d23c9 8962fi
5476a9a4
GM
8963
8964cat >>confdefs.h <<_ACEOF
8965#define HAVE_DECL___SYS_SIGLIST $ac_have_decl
8966_ACEOF
8967
8968 if test $ac_cv_have_decl___sys_siglist = yes; then
8969
8970$as_echo "#define sys_siglist __sys_siglist" >>confdefs.h
8971
8972 fi
8973fi
8974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
8975$as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
8976if test "${ac_cv_header_sys_wait_h+set}" = set; then :
8977 $as_echo_n "(cached) " >&6
067d23c9
KY
8978else
8979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8980/* end confdefs.h. */
5476a9a4
GM
8981#include <sys/types.h>
8982#include <sys/wait.h>
8983#ifndef WEXITSTATUS
8984# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
8985#endif
8986#ifndef WIFEXITED
8987# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8988#endif
8989
067d23c9
KY
8990int
8991main ()
8992{
5476a9a4
GM
8993 int s;
8994 wait (&s);
8995 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
067d23c9
KY
8996 ;
8997 return 0;
8998}
8999_ACEOF
5476a9a4
GM
9000if ac_fn_c_try_compile "$LINENO"; then :
9001 ac_cv_header_sys_wait_h=yes
067d23c9 9002else
5476a9a4 9003 ac_cv_header_sys_wait_h=no
067d23c9 9004fi
5476a9a4 9005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
067d23c9 9006fi
5476a9a4
GM
9007{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
9008$as_echo "$ac_cv_header_sys_wait_h" >&6; }
9009if test $ac_cv_header_sys_wait_h = yes; then
067d23c9 9010
5476a9a4 9011$as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
7417b37c 9012
5476a9a4 9013fi
7417b37c 9014
7417b37c 9015
5476a9a4
GM
9016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for speed_t" >&5
9017$as_echo_n "checking for speed_t... " >&6; }
9018if test "${emacs_cv_speed_t+set}" = set; then :
f199cab1
GM
9019 $as_echo_n "(cached) " >&6
9020else
f199cab1
GM
9021 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9022/* end confdefs.h. */
5476a9a4
GM
9023#include <termios.h>
9024int
9025main ()
9026{
9027speed_t x = 1;
9028 ;
9029 return 0;
9030}
7417b37c 9031_ACEOF
f199cab1 9032if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4
GM
9033 emacs_cv_speed_t=yes
9034else
9035 emacs_cv_speed_t=no
7417b37c 9036fi
f199cab1 9037rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7417b37c 9038fi
5476a9a4
GM
9039{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_speed_t" >&5
9040$as_echo "$emacs_cv_speed_t" >&6; }
9041if test $emacs_cv_speed_t = yes; then
7417b37c 9042
5476a9a4 9043$as_echo "#define HAVE_SPEED_T 1" >>confdefs.h
067d23c9 9044
5476a9a4 9045fi
067d23c9 9046
067d23c9
KY
9047
9048
e700232f 9049
5476a9a4
GM
9050for ac_header in net/if.h
9051do :
9052 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
9053#if HAVE_SYS_SOCKET_H
9054#include <sys/socket.h>
9055#endif
9056"
9057if test "x$ac_cv_header_net_if_h" = x""yes; then :
9058 cat >>confdefs.h <<_ACEOF
9059#define HAVE_NET_IF_H 1
067d23c9 9060_ACEOF
7cae64b4 9061
067d23c9 9062fi
067d23c9 9063
5476a9a4 9064done
4d4b75e8 9065
5476a9a4
GM
9066for ac_header in ifaddrs.h
9067do :
9068 ac_fn_c_check_header_compile "$LINENO" "ifaddrs.h" "ac_cv_header_ifaddrs_h" "$ac_includes_default
9069#if HAVE_SYS_SOCKET_H
9070#include <sys/socket.h>
9071#endif
9072"
9073if test "x$ac_cv_header_ifaddrs_h" = x""yes; then :
9074 cat >>confdefs.h <<_ACEOF
9075#define HAVE_IFADDRS_H 1
9076_ACEOF
4d4b75e8 9077
5476a9a4 9078fi
4d4b75e8 9079
5476a9a4 9080done
7e723570 9081
5476a9a4 9082for ac_header in net/if_dl.h
7e723570 9083do :
5476a9a4
GM
9084 ac_fn_c_check_header_compile "$LINENO" "net/if_dl.h" "ac_cv_header_net_if_dl_h" "$ac_includes_default
9085#if HAVE_SYS_SOCKET_H
9086#include <sys/socket.h>
9087#endif
7e723570 9088"
5476a9a4 9089if test "x$ac_cv_header_net_if_dl_h" = x""yes; then :
7e723570 9090 cat >>confdefs.h <<_ACEOF
5476a9a4 9091#define HAVE_NET_IF_DL_H 1
7e723570
GM
9092_ACEOF
9093
9094fi
9095
9096done
9097
9098
5476a9a4
GM
9099ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_flags" "ac_cv_member_struct_ifreq_ifr_flags" "$ac_includes_default
9100#if HAVE_SYS_SOCKET_H
9101#include <sys/socket.h>
9102#endif
9103#if HAVE_NET_IF_H
9104#include <net/if.h>
9105#endif
9106"
9107if test "x$ac_cv_member_struct_ifreq_ifr_flags" = x""yes; then :
7e723570 9108
5476a9a4
GM
9109cat >>confdefs.h <<_ACEOF
9110#define HAVE_STRUCT_IFREQ_IFR_FLAGS 1
9111_ACEOF
7e723570
GM
9112
9113
5476a9a4
GM
9114fi
9115ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_hwaddr" "ac_cv_member_struct_ifreq_ifr_hwaddr" "$ac_includes_default
9116#if HAVE_SYS_SOCKET_H
9117#include <sys/socket.h>
f199cab1 9118#endif
5476a9a4
GM
9119#if HAVE_NET_IF_H
9120#include <net/if.h>
f199cab1 9121#endif
5476a9a4
GM
9122"
9123if test "x$ac_cv_member_struct_ifreq_ifr_hwaddr" = x""yes; then :
9124
9125cat >>confdefs.h <<_ACEOF
9126#define HAVE_STRUCT_IFREQ_IFR_HWADDR 1
9127_ACEOF
9128
9129
9130fi
9131ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_netmask" "ac_cv_member_struct_ifreq_ifr_netmask" "$ac_includes_default
9132#if HAVE_SYS_SOCKET_H
9133#include <sys/socket.h>
f199cab1 9134#endif
5476a9a4
GM
9135#if HAVE_NET_IF_H
9136#include <net/if.h>
9137#endif
9138"
9139if test "x$ac_cv_member_struct_ifreq_ifr_netmask" = x""yes; then :
9140
9141cat >>confdefs.h <<_ACEOF
9142#define HAVE_STRUCT_IFREQ_IFR_NETMASK 1
f199cab1 9143_ACEOF
5476a9a4
GM
9144
9145
9146fi
9147ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_broadaddr" "ac_cv_member_struct_ifreq_ifr_broadaddr" "$ac_includes_default
9148#if HAVE_SYS_SOCKET_H
9149#include <sys/socket.h>
9150#endif
9151#if HAVE_NET_IF_H
9152#include <net/if.h>
9153#endif
9154"
9155if test "x$ac_cv_member_struct_ifreq_ifr_broadaddr" = x""yes; then :
9156
9157cat >>confdefs.h <<_ACEOF
9158#define HAVE_STRUCT_IFREQ_IFR_BROADADDR 1
f199cab1 9159_ACEOF
5476a9a4
GM
9160
9161
067d23c9 9162fi
5476a9a4
GM
9163ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_addr" "ac_cv_member_struct_ifreq_ifr_addr" "$ac_includes_default
9164#if HAVE_SYS_SOCKET_H
9165#include <sys/socket.h>
9166#endif
9167#if HAVE_NET_IF_H
9168#include <net/if.h>
9169#endif
9170"
9171if test "x$ac_cv_member_struct_ifreq_ifr_addr" = x""yes; then :
9172
9173cat >>confdefs.h <<_ACEOF
9174#define HAVE_STRUCT_IFREQ_IFR_ADDR 1
9175_ACEOF
9176
067d23c9 9177
f199cab1 9178fi
5476a9a4
GM
9179ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_addr.sa_len" "ac_cv_member_struct_ifreq_ifr_addr_sa_len" "$ac_includes_default
9180#if HAVE_SYS_SOCKET_H
9181#include <sys/socket.h>
9182#endif
9183#if HAVE_NET_IF_H
9184#include <net/if.h>
9185#endif
9186"
9187if test "x$ac_cv_member_struct_ifreq_ifr_addr_sa_len" = x""yes; then :
9188
9189cat >>confdefs.h <<_ACEOF
9190#define HAVE_STRUCT_IFREQ_IFR_ADDR_SA_LEN 1
9191_ACEOF
9192
067d23c9
KY
9193
9194fi
9195
9196
067d23c9 9197
f199cab1 9198
5476a9a4
GM
9199DEPFLAGS=
9200MKDEPDIR=":"
9201deps_frag=deps.mk
9202if test "$GCC" = yes && test "$ac_enable_autodepend" = yes; then
9203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using GNU Make" >&5
9204$as_echo_n "checking whether we are using GNU Make... " >&6; }
9205 HAVE_GNU_MAKE=no
9206 testval=`${MAKE-make} --version 2>/dev/null | grep 'GNU Make'`
9207 if test "x$testval" != x; then
9208 HAVE_GNU_MAKE=yes
9209 else
9210 ac_enable_autodepend=no
9211 fi
9212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_GNU_MAKE" >&5
9213$as_echo "$HAVE_GNU_MAKE" >&6; }
9214 if test $HAVE_GNU_MAKE = yes; then
9215 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -MMD -MF" >&5
9216$as_echo_n "checking whether gcc understands -MMD -MF... " >&6; }
9217 SAVE_CFLAGS="$CFLAGS"
9218 CFLAGS="$CFLAGS -MMD -MF deps.d -MP"
9219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9220/* end confdefs.h. */
f199cab1 9221
5476a9a4
GM
9222int
9223main ()
9224{
f199cab1 9225
5476a9a4
GM
9226 ;
9227 return 0;
9228}
9229_ACEOF
9230if ac_fn_c_try_compile "$LINENO"; then :
f199cab1 9231
5476a9a4
GM
9232else
9233 ac_enable_autodepend=no
9234fi
9235rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9236 CFLAGS="$SAVE_CFLAGS"
9237 test -f deps.d || ac_enable_autodepend=no
9238 rm -rf deps.d
9239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_autodepend" >&5
9240$as_echo "$ac_enable_autodepend" >&6; }
9241 fi
9242 if test $ac_enable_autodepend = yes; then
9243 DEPFLAGS='-MMD -MF ${DEPDIR}/$*.d -MP'
9244 ## MKDIR_P is documented (see AC_PROG_MKDIR_P) to be parallel-safe.
9245 MKDEPDIR='${MKDIR_P} ${DEPDIR}'
9246 deps_frag=autodeps.mk
9247 fi
9248fi
9249deps_frag=$srcdir/src/$deps_frag
f199cab1
GM
9250
9251
9252
9253
9254
5476a9a4 9255lisp_frag=$srcdir/src/lisp.mk
f199cab1
GM
9256
9257
9258
5476a9a4
GM
9259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long file names" >&5
9260$as_echo_n "checking for long file names... " >&6; }
9261if test "${ac_cv_sys_long_file_names+set}" = set; then :
9262 $as_echo_n "(cached) " >&6
9263else
9264 ac_cv_sys_long_file_names=yes
9265# Test for long file names in all the places we know might matter:
9266# . the current directory, where building will happen
9267# $prefix/lib where we will be installing things
9268# $exec_prefix/lib likewise
9269# $TMPDIR if set, where it might want to write temporary files
9270# /tmp where it might want to write temporary files
9271# /var/tmp likewise
9272# /usr/tmp likewise
9273for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do
9274 # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib
9275 # in the usual case where exec_prefix is '${prefix}'.
9276 case $ac_dir in #(
9277 . | /* | ?:[\\/]*) ;; #(
9278 *) continue;;
9279 esac
9280 test -w "$ac_dir/." || continue # It is less confusing to not echo anything here.
9281 ac_xdir=$ac_dir/cf$$
9282 (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
9283 ac_tf1=$ac_xdir/conftest9012345
9284 ac_tf2=$ac_xdir/conftest9012346
9285 touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" ||
9286 ac_cv_sys_long_file_names=no
9287 rm -f -r "$ac_xdir" 2>/dev/null
9288 test $ac_cv_sys_long_file_names = no && break
9289done
9290fi
9291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_long_file_names" >&5
9292$as_echo "$ac_cv_sys_long_file_names" >&6; }
9293if test $ac_cv_sys_long_file_names = yes; then
f199cab1 9294
5476a9a4 9295$as_echo "#define HAVE_LONG_FILE_NAMES 1" >>confdefs.h
f199cab1 9296
5476a9a4 9297fi
f199cab1 9298
f199cab1 9299
5476a9a4 9300#### Choose a window system.
f199cab1 9301
42dcba54
GM
9302## We leave window_system equal to none if
9303## we end up building without one. Any new window system should
9304## set window_system to an appropriate value and add objects to
9305## window-system-specific substs.
9306
9307window_system=none
5476a9a4
GM
9308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
9309$as_echo_n "checking for X... " >&6; }
f199cab1 9310
f199cab1 9311
5476a9a4
GM
9312# Check whether --with-x was given.
9313if test "${with_x+set}" = set; then :
9314 withval=$with_x;
9315fi
f199cab1 9316
5476a9a4
GM
9317# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
9318if test "x$with_x" = xno; then
9319 # The user explicitly disabled X.
9320 have_x=disabled
9321else
9322 case $x_includes,$x_libraries in #(
9323 *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
9324 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
9325 $as_echo_n "(cached) " >&6
9326else
9327 # One or both of the vars are not set, and there is no cached value.
9328ac_x_includes=no ac_x_libraries=no
9329rm -f -r conftest.dir
9330if mkdir conftest.dir; then
9331 cd conftest.dir
9332 cat >Imakefile <<'_ACEOF'
9333incroot:
9334 @echo incroot='${INCROOT}'
9335usrlibdir:
9336 @echo usrlibdir='${USRLIBDIR}'
9337libdir:
9338 @echo libdir='${LIBDIR}'
9339_ACEOF
9340 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
9341 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
9342 for ac_var in incroot usrlibdir libdir; do
9343 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
9344 done
9345 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
9346 for ac_extension in a so sl dylib la dll; do
9347 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
9348 test -f "$ac_im_libdir/libX11.$ac_extension"; then
9349 ac_im_usrlibdir=$ac_im_libdir; break
9350 fi
9351 done
9352 # Screen out bogus values from the imake configuration. They are
9353 # bogus both because they are the default anyway, and because
9354 # using them would break gcc on systems where it needs fixed includes.
9355 case $ac_im_incroot in
9356 /usr/include) ac_x_includes= ;;
9357 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
9358 esac
9359 case $ac_im_usrlibdir in
9360 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
9361 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
9362 esac
9363 fi
9364 cd ..
9365 rm -f -r conftest.dir
067d23c9
KY
9366fi
9367
5476a9a4
GM
9368# Standard set of common directories for X headers.
9369# Check X11 before X11Rn because it is often a symlink to the current release.
9370ac_x_header_dirs='
9371/usr/X11/include
9372/usr/X11R7/include
9373/usr/X11R6/include
9374/usr/X11R5/include
9375/usr/X11R4/include
067d23c9 9376
5476a9a4
GM
9377/usr/include/X11
9378/usr/include/X11R7
9379/usr/include/X11R6
9380/usr/include/X11R5
9381/usr/include/X11R4
067d23c9 9382
5476a9a4
GM
9383/usr/local/X11/include
9384/usr/local/X11R7/include
9385/usr/local/X11R6/include
9386/usr/local/X11R5/include
9387/usr/local/X11R4/include
067d23c9 9388
5476a9a4
GM
9389/usr/local/include/X11
9390/usr/local/include/X11R7
9391/usr/local/include/X11R6
9392/usr/local/include/X11R5
9393/usr/local/include/X11R4
067d23c9 9394
5476a9a4
GM
9395/usr/X386/include
9396/usr/x386/include
9397/usr/XFree86/include/X11
067d23c9 9398
5476a9a4
GM
9399/usr/include
9400/usr/local/include
9401/usr/unsupported/include
9402/usr/athena/include
9403/usr/local/x11r5/include
9404/usr/lpp/Xamples/include
067d23c9 9405
5476a9a4
GM
9406/usr/openwin/include
9407/usr/openwin/share/include'
067d23c9 9408
5476a9a4
GM
9409if test "$ac_x_includes" = no; then
9410 # Guess where to find include files, by looking for Xlib.h.
9411 # First, try using that file with no special directory specified.
9412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9413/* end confdefs.h. */
9414#include <X11/Xlib.h>
067d23c9 9415_ACEOF
5476a9a4
GM
9416if ac_fn_c_try_cpp "$LINENO"; then :
9417 # We can compile using X headers with no special include directory.
9418ac_x_includes=
067d23c9 9419else
5476a9a4
GM
9420 for ac_dir in $ac_x_header_dirs; do
9421 if test -r "$ac_dir/X11/Xlib.h"; then
9422 ac_x_includes=$ac_dir
9423 break
f199cab1 9424 fi
f199cab1 9425done
5476a9a4
GM
9426fi
9427rm -f conftest.err conftest.$ac_ext
9428fi # $ac_x_includes = no
067d23c9 9429
5476a9a4
GM
9430if test "$ac_x_libraries" = no; then
9431 # Check for the libraries.
9432 # See if we find them without any special options.
9433 # Don't add to $LIBS permanently.
9434 ac_save_LIBS=$LIBS
9435 LIBS="-lX11 $LIBS"
7ee3791f 9436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 9437/* end confdefs.h. */
5476a9a4 9438#include <X11/Xlib.h>
067d23c9
KY
9439int
9440main ()
9441{
5476a9a4
GM
9442XrmInitialize ()
9443 ;
067d23c9
KY
9444 return 0;
9445}
9446_ACEOF
5476a9a4
GM
9447if ac_fn_c_try_link "$LINENO"; then :
9448 LIBS=$ac_save_LIBS
9449# We can link X programs with no special library path.
9450ac_x_libraries=
7ee3791f 9451else
5476a9a4
GM
9452 LIBS=$ac_save_LIBS
9453for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
9454do
9455 # Don't even attempt the hair of trying to link an X program!
9456 for ac_extension in a so sl dylib la dll; do
9457 if test -r "$ac_dir/libX11.$ac_extension"; then
9458 ac_x_libraries=$ac_dir
9459 break 2
9460 fi
9461 done
9462done
7ee3791f 9463fi
5476a9a4
GM
9464rm -f core conftest.err conftest.$ac_objext \
9465 conftest$ac_exeext conftest.$ac_ext
9466fi # $ac_x_libraries = no
7ee3791f 9467
5476a9a4
GM
9468case $ac_x_includes,$ac_x_libraries in #(
9469 no,* | *,no | *\'*)
9470 # Didn't find X, or a directory has "'" in its name.
9471 ac_cv_have_x="have_x=no";; #(
9472 *)
9473 # Record where we found X for the cache.
9474 ac_cv_have_x="have_x=yes\
9475 ac_x_includes='$ac_x_includes'\
9476 ac_x_libraries='$ac_x_libraries'"
9477esac
9478fi
9479;; #(
9480 *) have_x=yes;;
9481 esac
9482 eval "$ac_cv_have_x"
9483fi # $with_x != no
9484
9485if test "$have_x" != yes; then
9486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
9487$as_echo "$have_x" >&6; }
9488 no_x=yes
9489else
9490 # If each of the values was on the command line, it overrides each guess.
9491 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
9492 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
9493 # Update the cache value to reflect the command line values.
9494 ac_cv_have_x="have_x=yes\
9495 ac_x_includes='$x_includes'\
9496 ac_x_libraries='$x_libraries'"
9497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
9498$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
9499fi
9500
42dcba54 9501if test "$no_x" != yes; then
5476a9a4
GM
9502 window_system=x11
9503fi
9504
9505LD_SWITCH_X_SITE_RPATH=
9506if test "${x_libraries}" != NONE; then
9507 if test -n "${x_libraries}"; then
9508 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
9509 LD_SWITCH_X_SITE_RPATH=-Wl,-rpath,`echo ${x_libraries} | sed -e "s/:/ -Wl,-rpath,/g"`
9510 fi
9511 x_default_search_path=""
9512 x_search_path=${x_libraries}
9513 if test -z "${x_search_path}"; then
9514 x_search_path=/usr/lib
9515 fi
9516 for x_library in `echo ${x_search_path}: | \
9517 sed -e "s/:/ /g" -e p -e "s:/lib[^ /]* :/share :g"`; do
9518 x_search_path="\
9519${x_library}/X11/%L/%T/%N%C%S:\
9520${x_library}/X11/%l/%T/%N%C%S:\
9521${x_library}/X11/%T/%N%C%S:\
9522${x_library}/X11/%L/%T/%N%S:\
9523${x_library}/X11/%l/%T/%N%S:\
9524${x_library}/X11/%T/%N%S"
9525 if test x"${x_default_search_path}" = x; then
9526 x_default_search_path=${x_search_path}
9527 else
9528 x_default_search_path="${x_search_path}:${x_default_search_path}"
9529 fi
9530 done
9531fi
9532
9533
9534if test "${x_includes}" != NONE && test -n "${x_includes}"; then
9535 C_SWITCH_X_SITE="$isystem"`echo ${x_includes} | sed -e "s/:/ $isystem/g"`
9536fi
9537
9538if test x"${x_includes}" = x; then
9539 bitmapdir=/usr/include/X11/bitmaps
9540else
9541 # accumulate include directories that have X11 bitmap subdirectories
9542 bmd_acc="dummyval"
9543 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
9544 if test -d "${bmd}/X11/bitmaps"; then
9545 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
9546 fi
9547 if test -d "${bmd}/bitmaps"; then
9548 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
9549 fi
9550 done
9551 if test ${bmd_acc} != "dummyval"; then
9552 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
9553 fi
9554fi
7ee3791f 9555
5476a9a4
GM
9556HAVE_NS=no
9557NS_IMPL_COCOA=no
9558NS_IMPL_GNUSTEP=no
9559tmp_CPPFLAGS="$CPPFLAGS"
9560tmp_CFLAGS="$CFLAGS"
9561CPPFLAGS="$CPPFLAGS -x objective-c"
9562CFLAGS="$CFLAGS -x objective-c"
5476a9a4 9563GNU_OBJC_CFLAGS=
4efe5ef9 9564LIBS_GNUSTEP=
5476a9a4
GM
9565if test "${with_ns}" != no; then
9566 if test "${opsys}" = darwin; then
9567 NS_IMPL_COCOA=yes
9568 ns_appdir=`pwd`/nextstep/Emacs.app
9569 ns_appbindir=${ns_appdir}/Contents/MacOS
9570 ns_appresdir=${ns_appdir}/Contents/Resources
bb7dce39 9571 ns_appsrc=Cocoa/Emacs.base
5476a9a4
GM
9572 elif test -f $GNUSTEP_CONFIG_FILE; then
9573 NS_IMPL_GNUSTEP=yes
9574 ns_appdir=`pwd`/nextstep/Emacs.app
9575 ns_appbindir=${ns_appdir}
9576 ns_appresdir=${ns_appdir}/Resources
bb7dce39 9577 ns_appsrc=GNUstep/Emacs.base
5476a9a4
GM
9578 GNUSTEP_SYSTEM_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_HEADERS)"
9579 GNUSTEP_SYSTEM_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_LIBRARIES)"
9580 GNUSTEP_LOCAL_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_HEADERS)"
9581 GNUSTEP_LOCAL_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_LIBRARIES)"
9582 test "x${GNUSTEP_LOCAL_HEADERS}" != "x" && \
9583 GNUSTEP_LOCAL_HEADERS="-I${GNUSTEP_LOCAL_HEADERS}"
9584 test "x${GNUSTEP_LOCAL_LIBRARIES}" != "x" && \
9585 GNUSTEP_LOCAL_LIBRARIES="-L${GNUSTEP_LOCAL_LIBRARIES}"
9586 CPPFLAGS="$CPPFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
9587 CFLAGS="$CFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
9588 LDFLAGS="$LDFLAGS -L${GNUSTEP_SYSTEM_LIBRARIES} ${GNUSTEP_LOCAL_LIBRARIES}"
4efe5ef9 9589 LIBS_GNUSTEP="-lgnustep-gui -lgnustep-base -lobjc -lpthread"
5476a9a4
GM
9590 LIB_STANDARD=
9591 START_FILES=
5476a9a4
GM
9592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if GNUstep defines BASE_NATIVE_OBJC_EXCEPTIONS" >&5
9593$as_echo_n "checking if GNUstep defines BASE_NATIVE_OBJC_EXCEPTIONS... " >&6; }
9594if test "${emacs_cv_objc_exceptions+set}" = set; then :
9595 $as_echo_n "(cached) " >&6
9596else
9597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9598/* end confdefs.h. */
9599#include <GNUstepBase/GSConfig.h>
39b3d70b
GM
9600int
9601main ()
9602{
5476a9a4
GM
9603#if defined BASE_NATIVE_OBJC_EXCEPTIONS && BASE_NATIVE_OBJC_EXCEPTIONS > 0
96041;
9605#else
9606fail;
9607#endif
9608 ;
39b3d70b
GM
9609 return 0;
9610}
9611_ACEOF
5476a9a4
GM
9612if ac_fn_c_try_compile "$LINENO"; then :
9613 emacs_cv_objc_exceptions=yes
39b3d70b 9614else
5476a9a4 9615 emacs_cv_objc_exceptions=no
39b3d70b 9616fi
5476a9a4 9617rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
39b3d70b 9618fi
5476a9a4
GM
9619{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_objc_exceptions" >&5
9620$as_echo "$emacs_cv_objc_exceptions" >&6; }
9621 if test $emacs_cv_objc_exceptions = yes; then
39b3d70b 9622
5476a9a4
GM
9623$as_echo "#define _NATIVE_OBJC_EXCEPTIONS 1" >>confdefs.h
9624
9625 GNU_OBJC_CFLAGS="-fobjc-exceptions"
9626 fi
9627 fi
9628
9629 CFLAGS="$CFLAGS $GNU_OBJC_CFLAGS"
9630
9631 ac_fn_c_check_header_mongrel "$LINENO" "AppKit/AppKit.h" "ac_cv_header_AppKit_AppKit_h" "$ac_includes_default"
9632if test "x$ac_cv_header_AppKit_AppKit_h" = x""yes; then :
9633 HAVE_NS=yes
067d23c9 9634else
5476a9a4
GM
9635 as_fn_error "\`--with-ns' was specified, but the include
9636 files are missing or cannot be compiled." "$LINENO" 5
9637fi
f199cab1 9638
f199cab1 9639
dc67e786
GM
9640
9641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9642/* end confdefs.h. */
9643#include <AppKit/AppKit.h>
9644int
9645main ()
9646{
9647
9648#ifdef MAC_OS_X_VERSION_MAX_ALLOWED
9649#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1040
9650 ; /* OK */
9651#else
9652#error "OSX 10.4 or newer required"
9653#endif
9654#endif
9655
9656 ;
9657 return 0;
9658}
9659_ACEOF
9660if ac_fn_c_try_compile "$LINENO"; then :
9661 ns_osx_have_104=yes
9662else
9663 ns_osx_have_104=no
9664fi
9665rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5476a9a4
GM
9666 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9667/* end confdefs.h. */
9668#include <Foundation/NSObjCRuntime.h>
067d23c9
KY
9669int
9670main ()
9671{
5476a9a4
GM
9672NSInteger i;
9673 ;
067d23c9
KY
9674 return 0;
9675}
9676_ACEOF
5476a9a4
GM
9677if ac_fn_c_try_compile "$LINENO"; then :
9678 ns_have_nsinteger=yes
067d23c9 9679else
5476a9a4 9680 ns_have_nsinteger=no
067d23c9 9681fi
5476a9a4 9682rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
dc67e786
GM
9683 if test $ns_osx_have_104 = no; then
9684 as_fn_error "\`OSX 10.4 or newer is required'" "$LINENO" 5;
9685 fi
5476a9a4 9686 if test $ns_have_nsinteger = yes; then
067d23c9 9687
5476a9a4 9688$as_echo "#define NS_HAVE_NSINTEGER 1" >>confdefs.h
067d23c9 9689
067d23c9 9690 fi
5476a9a4 9691fi
067d23c9 9692
5476a9a4 9693
5c0255d9 9694
5476a9a4
GM
9695INSTALL_ARCH_INDEP_EXTRA=install-etc
9696ns_self_contained=no
5476a9a4
GM
9697NS_OBJ=
9698NS_OBJC_OBJ=
9699if test "${HAVE_NS}" = yes; then
9700 if test "$with_toolkit_scroll_bars" = "no"; then
9701 as_fn_error "Non-toolkit scroll bars are not implemented for Nextstep." "$LINENO" 5
9702 fi
9703
9704 window_system=nextstep
5476a9a4
GM
9705 # set up packaging dirs
9706 if test "${EN_NS_SELF_CONTAINED}" = yes; then
9707 ns_self_contained=yes
9708 prefix=${ns_appresdir}
9709 exec_prefix=${ns_appbindir}
9710 libexecdir="\${ns_appbindir}/libexec"
9711 archlibdir="\${ns_appbindir}/libexec"
9712 docdir="\${ns_appresdir}/etc"
9713 etcdir="\${ns_appresdir}/etc"
9714 infodir="\${ns_appresdir}/info"
9715 mandir="\${ns_appresdir}/man"
9716 lispdir="\${ns_appresdir}/lisp"
9717 leimdir="\${ns_appresdir}/leim"
9718 INSTALL_ARCH_INDEP_EXTRA=
9719 fi
5476a9a4
GM
9720 NS_OBJC_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o"
9721fi
9722CFLAGS="$tmp_CFLAGS"
9723CPPFLAGS="$tmp_CPPFLAGS"
9724
9725
9726
9727
9728
9729
5c0255d9
GM
9730HAVE_W32=no
9731W32_OBJ=
9732W32_LIBS=
b5eb356a
GM
9733W32_RES=
9734W32_RES_LINK=
5c0255d9
GM
9735if test "${with_w32}" != no; then
9736 if test "${opsys}" != "cygwin"; then
9737 as_fn_error "Using w32 with an autotools build is only supported for Cygwin." "$LINENO" 5
9738 fi
9739 ac_fn_c_check_header_mongrel "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default"
9740if test "x$ac_cv_header_windows_h" = x""yes; then :
9741 HAVE_W32=yes
9742else
9743 as_fn_error "\`--with-w32' was specified, but windows.h
9744 cannot be found." "$LINENO" 5
9745fi
9746
9747
9748
9749$as_echo "#define HAVE_NTGUI 1" >>confdefs.h
9750
b5eb356a
GM
9751 if test -n "$ac_tool_prefix"; then
9752 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
9753set dummy ${ac_tool_prefix}windres; ac_word=$2
9754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9755$as_echo_n "checking for $ac_word... " >&6; }
9756if test "${ac_cv_prog_WINDRES+set}" = set; then :
9757 $as_echo_n "(cached) " >&6
9758else
9759 if test -n "$WINDRES"; then
9760 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
9761else
9762as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9763for as_dir in $PATH
9764do
9765 IFS=$as_save_IFS
9766 test -z "$as_dir" && as_dir=.
9767 for ac_exec_ext in '' $ac_executable_extensions; do
9768 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9769 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
9770 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9771 break 2
9772 fi
9773done
9774 done
9775IFS=$as_save_IFS
9776
9777fi
9778fi
9779WINDRES=$ac_cv_prog_WINDRES
9780if test -n "$WINDRES"; then
9781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
9782$as_echo "$WINDRES" >&6; }
9783else
9784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9785$as_echo "no" >&6; }
9786fi
9787
9788
9789fi
9790if test -z "$ac_cv_prog_WINDRES"; then
9791 ac_ct_WINDRES=$WINDRES
9792 # Extract the first word of "windres", so it can be a program name with args.
9793set dummy windres; ac_word=$2
9794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9795$as_echo_n "checking for $ac_word... " >&6; }
9796if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then :
9797 $as_echo_n "(cached) " >&6
9798else
9799 if test -n "$ac_ct_WINDRES"; then
9800 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
9801else
9802as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9803for as_dir in $PATH
9804do
9805 IFS=$as_save_IFS
9806 test -z "$as_dir" && as_dir=.
9807 for ac_exec_ext in '' $ac_executable_extensions; do
9808 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9809 ac_cv_prog_ac_ct_WINDRES="windres"
9810 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9811 break 2
9812 fi
9813done
9814 done
9815IFS=$as_save_IFS
9816
9817fi
9818fi
9819ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
9820if test -n "$ac_ct_WINDRES"; then
9821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
9822$as_echo "$ac_ct_WINDRES" >&6; }
9823else
9824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9825$as_echo "no" >&6; }
9826fi
9827
9828 if test "x$ac_ct_WINDRES" = x; then
9829 WINDRES="as_fn_error "No resource compiler found." "$LINENO" 5"
9830 else
9831 case $cross_compiling:$ac_tool_warned in
9832yes:)
9833{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9834$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9835ac_tool_warned=yes ;;
9836esac
9837 WINDRES=$ac_ct_WINDRES
9838 fi
9839else
9840 WINDRES="$ac_cv_prog_WINDRES"
9841fi
9842
5c0255d9
GM
9843 W32_OBJ="w32fns.o w32menu.o w32reg.o w32font.o w32term.o"
9844 W32_OBJ="$W32_OBJ w32xfns.o w32select.o w32uniscribe.o"
9845 W32_LIBS="$W32_LIBS -lkernel32 -luser32 -lgdi32 -lole32 -lcomdlg32"
9846 W32_LIBS="$W32_LIBS -lusp10 -lcomctl32 -lwinspool"
b5eb356a
GM
9847 W32_RES="emacs.res"
9848 # Tell the linker that emacs.res is an object (which we compile from
9849 # the rc file), not a linker script.
9850 W32_RES_LINK="-Wl,-bpe-i386 -Wl,emacs.res"
5c0255d9
GM
9851fi
9852
9853
9854
b5eb356a
GM
9855
9856
5c0255d9
GM
9857if test "${HAVE_W32}" = "yes"; then
9858 window_system=w32
9859 with_xft=no
9860fi
9861
42dcba54
GM
9862## $window_system is now set to the window system we will
9863## ultimately use.
9864
9865term_header=
9866HAVE_X_WINDOWS=no
9867HAVE_X11=no
9868USE_X_TOOLKIT=none
9869
5476a9a4
GM
9870case "${window_system}" in
9871 x11 )
9872 HAVE_X_WINDOWS=yes
9873 HAVE_X11=yes
42dcba54 9874 term_header=xterm.h
5476a9a4
GM
9875 case "${with_x_toolkit}" in
9876 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
9877 motif ) USE_X_TOOLKIT=MOTIF ;;
9878 gtk ) with_gtk=yes
42dcba54 9879 term_header=gtkutil.h
5476a9a4 9880 USE_X_TOOLKIT=none ;;
4fa92495
GM
9881 gtk2 ) with_gtk2=yes
9882 term_header=gtkutil.h
9883 USE_X_TOOLKIT=none ;;
5476a9a4 9884 gtk3 ) with_gtk3=yes
42dcba54 9885 term_header=gtkutil.h
5476a9a4
GM
9886 USE_X_TOOLKIT=none ;;
9887 no ) USE_X_TOOLKIT=none ;;
9888 * ) USE_X_TOOLKIT=maybe ;;
9889 esac
9890 ;;
42dcba54
GM
9891 nextstep )
9892 term_header=nsterm.h
5476a9a4 9893 ;;
5c0255d9
GM
9894 w32 )
9895 term_header=w32term.h
9896 ;;
5476a9a4
GM
9897esac
9898
42dcba54
GM
9899if test -n "${term_header}"; then
9900
9901cat >>confdefs.h <<_ACEOF
9902#define TERM_HEADER "${term_header}"
9903_ACEOF
9904
9905fi
9906
5476a9a4
GM
9907if test "$window_system" = none && test "X$with_x" != "Xno"; then
9908 # Extract the first word of "X", so it can be a program name with args.
9909set dummy X; ac_word=$2
9910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9911$as_echo_n "checking for $ac_word... " >&6; }
9912if test "${ac_cv_prog_HAVE_XSERVER+set}" = set; then :
9913 $as_echo_n "(cached) " >&6
9914else
9915 if test -n "$HAVE_XSERVER"; then
9916 ac_cv_prog_HAVE_XSERVER="$HAVE_XSERVER" # Let the user override the test.
9917else
9918as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9919for as_dir in $PATH
9920do
9921 IFS=$as_save_IFS
9922 test -z "$as_dir" && as_dir=.
9923 for ac_exec_ext in '' $ac_executable_extensions; do
9924 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9925 ac_cv_prog_HAVE_XSERVER="true"
9926 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9927 break 2
9928 fi
9929done
9930 done
9931IFS=$as_save_IFS
9932
9933 test -z "$ac_cv_prog_HAVE_XSERVER" && ac_cv_prog_HAVE_XSERVER="false"
9934fi
9935fi
9936HAVE_XSERVER=$ac_cv_prog_HAVE_XSERVER
9937if test -n "$HAVE_XSERVER"; then
9938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_XSERVER" >&5
9939$as_echo "$HAVE_XSERVER" >&6; }
9940else
9941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9942$as_echo "no" >&6; }
9943fi
9944
9945
9946 if test "$HAVE_XSERVER" = true ||
9947 test -n "$DISPLAY" ||
9948 test "`echo /usr/lib/libX11.*`" != "/usr/lib/libX11.*"; then
9949 as_fn_error "You seem to be running X, but no X development libraries
9950were found. You should install the relevant development files for X
9951and for the toolkit you want, such as Gtk+, Lesstif or Motif. Also make
9952sure you have development files for image handling, i.e.
9953tiff, gif, jpeg, png and xpm.
9954If you are sure you want Emacs compiled without X window support, pass
9955 --without-x
9956to configure." "$LINENO" 5
9957 fi
9958fi
9959
9960### If we're using X11, we should use the X menu package.
9961HAVE_MENUS=no
9962case ${HAVE_X11} in
9963 yes ) HAVE_MENUS=yes ;;
9964esac
9965
9966# Does the opsystem file prohibit the use of the GNU malloc?
9967# Assume not, until told otherwise.
9968GNU_MALLOC=yes
9969
9970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc is Doug Lea style" >&5
9971$as_echo_n "checking whether malloc is Doug Lea style... " >&6; }
9972if test "${emacs_cv_var_doug_lea_malloc+set}" = set; then :
067d23c9
KY
9973 $as_echo_n "(cached) " >&6
9974else
5476a9a4
GM
9975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9976/* end confdefs.h. */
9977#include <malloc.h>
9978 static void hook (void) {}
9979int
9980main ()
9981{
9982malloc_set_state (malloc_get_state ());
9983 __after_morecore_hook = hook;
9984 __malloc_initialize_hook = hook;
9985 ;
9986 return 0;
9987}
9988_ACEOF
9989if ac_fn_c_try_link "$LINENO"; then :
9990 emacs_cv_var_doug_lea_malloc=yes
9991else
9992 emacs_cv_var_doug_lea_malloc=no
9993fi
9994rm -f core conftest.err conftest.$ac_objext \
9995 conftest$ac_exeext conftest.$ac_ext
9996fi
9997{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_var_doug_lea_malloc" >&5
9998$as_echo "$emacs_cv_var_doug_lea_malloc" >&6; }
9999doug_lea_malloc=$emacs_cv_var_doug_lea_malloc
10000
10001
10002system_malloc=no
10003case "$opsys" in
10004 ## darwin ld insists on the use of malloc routines in the System framework.
10005 darwin|sol2-10) system_malloc=yes ;;
10006esac
10007
10008if test "${system_malloc}" = "yes"; then
10009
10010$as_echo "#define SYSTEM_MALLOC 1" >>confdefs.h
10011
10012 GNU_MALLOC=no
10013 GNU_MALLOC_reason="
10014 (The GNU allocators don't work with this system configuration.)"
10015 GMALLOC_OBJ=
10016 VMLIMIT_OBJ=
10017else
10018 test "$doug_lea_malloc" != "yes" && GMALLOC_OBJ=gmalloc.o
10019 VMLIMIT_OBJ=vm-limit.o
10020fi
10021
10022
10023
10024if test "$doug_lea_malloc" = "yes" ; then
10025 if test "$GNU_MALLOC" = yes ; then
10026 GNU_MALLOC_reason="
10027 (Using Doug Lea's new malloc from the GNU C Library.)"
10028 fi
10029
10030$as_echo "#define DOUG_LEA_MALLOC 1" >>confdefs.h
10031
10032
10033 ## Use mmap directly for allocating larger buffers.
10034 ## FIXME this comes from src/s/{gnu,gnu-linux}.h:
10035 ## #ifdef DOUG_LEA_MALLOC; #undef REL_ALLOC; #endif
10036 ## Does the AC_FUNC_MMAP test below make this check unnecessary?
10037 case "$opsys" in
10038 gnu*) REL_ALLOC=no ;;
10039 esac
10040fi
10041
10042if test x"${REL_ALLOC}" = x; then
10043 REL_ALLOC=${GNU_MALLOC}
10044fi
10045
10046use_mmap_for_buffers=no
10047case "$opsys" in
10048 cygwin|freebsd|irix6-5) use_mmap_for_buffers=yes ;;
10049esac
10050
10051
10052
10053
10054
10055
10056
10057
10058for ac_func in getpagesize
10059do :
10060 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
10061if test "x$ac_cv_func_getpagesize" = x""yes; then :
10062 cat >>confdefs.h <<_ACEOF
10063#define HAVE_GETPAGESIZE 1
10064_ACEOF
10065
10066fi
10067done
10068
10069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
10070$as_echo_n "checking for working mmap... " >&6; }
10071if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
10072 $as_echo_n "(cached) " >&6
10073else
10074 if test "$cross_compiling" = yes; then :
10075 ac_cv_func_mmap_fixed_mapped=no
10076else
10077 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10078/* end confdefs.h. */
10079$ac_includes_default
10080/* malloc might have been renamed as rpl_malloc. */
10081#undef malloc
10082
10083/* Thanks to Mike Haertel and Jim Avera for this test.
10084 Here is a matrix of mmap possibilities:
10085 mmap private not fixed
10086 mmap private fixed at somewhere currently unmapped
10087 mmap private fixed at somewhere already mapped
10088 mmap shared not fixed
10089 mmap shared fixed at somewhere currently unmapped
10090 mmap shared fixed at somewhere already mapped
10091 For private mappings, we should verify that changes cannot be read()
10092 back from the file, nor mmap's back from the file at a different
10093 address. (There have been systems where private was not correctly
10094 implemented like the infamous i386 svr4.0, and systems where the
10095 VM page cache was not coherent with the file system buffer cache
10096 like early versions of FreeBSD and possibly contemporary NetBSD.)
10097 For shared mappings, we should conversely verify that changes get
10098 propagated back to all the places they're supposed to be.
10099
10100 Grep wants private fixed already mapped.
10101 The main things grep needs to know about mmap are:
10102 * does it exist and is it safe to write into the mmap'd area
10103 * how to use it (BSD variants) */
10104
10105#include <fcntl.h>
10106#include <sys/mman.h>
10107
10108#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
10109char *malloc ();
10110#endif
10111
10112/* This mess was copied from the GNU getpagesize.h. */
10113#ifndef HAVE_GETPAGESIZE
10114# ifdef _SC_PAGESIZE
10115# define getpagesize() sysconf(_SC_PAGESIZE)
10116# else /* no _SC_PAGESIZE */
10117# ifdef HAVE_SYS_PARAM_H
10118# include <sys/param.h>
10119# ifdef EXEC_PAGESIZE
10120# define getpagesize() EXEC_PAGESIZE
10121# else /* no EXEC_PAGESIZE */
10122# ifdef NBPG
10123# define getpagesize() NBPG * CLSIZE
10124# ifndef CLSIZE
10125# define CLSIZE 1
10126# endif /* no CLSIZE */
10127# else /* no NBPG */
10128# ifdef NBPC
10129# define getpagesize() NBPC
10130# else /* no NBPC */
10131# ifdef PAGESIZE
10132# define getpagesize() PAGESIZE
10133# endif /* PAGESIZE */
10134# endif /* no NBPC */
10135# endif /* no NBPG */
10136# endif /* no EXEC_PAGESIZE */
10137# else /* no HAVE_SYS_PARAM_H */
10138# define getpagesize() 8192 /* punt totally */
10139# endif /* no HAVE_SYS_PARAM_H */
10140# endif /* no _SC_PAGESIZE */
10141
10142#endif /* no HAVE_GETPAGESIZE */
10143
10144int
10145main ()
10146{
10147 char *data, *data2, *data3;
10148 const char *cdata2;
10149 int i, pagesize;
10150 int fd, fd2;
10151
10152 pagesize = getpagesize ();
10153
10154 /* First, make a file with some known garbage in it. */
10155 data = (char *) malloc (pagesize);
10156 if (!data)
10157 return 1;
10158 for (i = 0; i < pagesize; ++i)
10159 *(data + i) = rand ();
10160 umask (0);
10161 fd = creat ("conftest.mmap", 0600);
10162 if (fd < 0)
10163 return 2;
10164 if (write (fd, data, pagesize) != pagesize)
10165 return 3;
10166 close (fd);
10167
10168 /* Next, check that the tail of a page is zero-filled. File must have
10169 non-zero length, otherwise we risk SIGBUS for entire page. */
10170 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
10171 if (fd2 < 0)
10172 return 4;
10173 cdata2 = "";
10174 if (write (fd2, cdata2, 1) != 1)
10175 return 5;
10176 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
10177 if (data2 == MAP_FAILED)
10178 return 6;
10179 for (i = 0; i < pagesize; ++i)
10180 if (*(data2 + i))
10181 return 7;
10182 close (fd2);
10183 if (munmap (data2, pagesize))
10184 return 8;
10185
10186 /* Next, try to mmap the file at a fixed address which already has
10187 something else allocated at it. If we can, also make sure that
10188 we see the same garbage. */
10189 fd = open ("conftest.mmap", O_RDWR);
10190 if (fd < 0)
10191 return 9;
10192 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
10193 MAP_PRIVATE | MAP_FIXED, fd, 0L))
10194 return 10;
10195 for (i = 0; i < pagesize; ++i)
10196 if (*(data + i) != *(data2 + i))
10197 return 11;
10198
10199 /* Finally, make sure that changes to the mapped area do not
10200 percolate back to the file as seen by read(). (This is a bug on
10201 some variants of i386 svr4.0.) */
10202 for (i = 0; i < pagesize; ++i)
10203 *(data2 + i) = *(data2 + i) + 1;
10204 data3 = (char *) malloc (pagesize);
10205 if (!data3)
10206 return 12;
10207 if (read (fd, data3, pagesize) != pagesize)
10208 return 13;
10209 for (i = 0; i < pagesize; ++i)
10210 if (*(data + i) != *(data3 + i))
10211 return 14;
10212 close (fd);
10213 return 0;
10214}
10215_ACEOF
10216if ac_fn_c_try_run "$LINENO"; then :
10217 ac_cv_func_mmap_fixed_mapped=yes
10218else
10219 ac_cv_func_mmap_fixed_mapped=no
10220fi
10221rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10222 conftest.$ac_objext conftest.beam conftest.$ac_ext
10223fi
10224
10225fi
10226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
10227$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
10228if test $ac_cv_func_mmap_fixed_mapped = yes; then
10229
10230$as_echo "#define HAVE_MMAP 1" >>confdefs.h
10231
10232fi
10233rm -f conftest.mmap conftest.txt
10234
10235if test $use_mmap_for_buffers = yes; then
f199cab1 10236
5476a9a4
GM
10237$as_echo "#define USE_MMAP_FOR_BUFFERS 1" >>confdefs.h
10238
10239 REL_ALLOC=no
10240fi
10241
10242LIBS="$LIBS_SYSTEM $LIBS"
10243
10244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
10245$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
10246if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then :
10247 $as_echo_n "(cached) " >&6
067d23c9 10248else
5476a9a4
GM
10249 ac_check_lib_save_LIBS=$LIBS
10250LIBS="-ldnet $LIBS"
10251cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 10252/* end confdefs.h. */
067d23c9 10253
5476a9a4
GM
10254/* Override any GCC internal prototype to avoid an error.
10255 Use char because int might match the return type of a GCC
10256 builtin and then its argument prototype would still apply. */
10257#ifdef __cplusplus
10258extern "C"
10259#endif
10260char dnet_ntoa ();
10261int
10262main ()
f199cab1 10263{
5476a9a4
GM
10264return dnet_ntoa ();
10265 ;
10266 return 0;
f199cab1 10267}
5476a9a4
GM
10268_ACEOF
10269if ac_fn_c_try_link "$LINENO"; then :
10270 ac_cv_lib_dnet_dnet_ntoa=yes
10271else
10272 ac_cv_lib_dnet_dnet_ntoa=no
10273fi
10274rm -f core conftest.err conftest.$ac_objext \
10275 conftest$ac_exeext conftest.$ac_ext
10276LIBS=$ac_check_lib_save_LIBS
10277fi
10278{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
10279$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
10280if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then :
10281 cat >>confdefs.h <<_ACEOF
10282#define HAVE_LIBDNET 1
10283_ACEOF
10284
10285 LIBS="-ldnet $LIBS"
10286
10287fi
10288
10289
10290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lXbsd" >&5
10291$as_echo_n "checking for main in -lXbsd... " >&6; }
10292if test "${ac_cv_lib_Xbsd_main+set}" = set; then :
10293 $as_echo_n "(cached) " >&6
10294else
10295 ac_check_lib_save_LIBS=$LIBS
10296LIBS="-lXbsd $LIBS"
10297cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10298/* end confdefs.h. */
10299
10300
10301int
10302main ()
f199cab1 10303{
5476a9a4
GM
10304return main ();
10305 ;
10306 return 0;
f199cab1 10307}
5476a9a4
GM
10308_ACEOF
10309if ac_fn_c_try_link "$LINENO"; then :
10310 ac_cv_lib_Xbsd_main=yes
10311else
10312 ac_cv_lib_Xbsd_main=no
10313fi
10314rm -f core conftest.err conftest.$ac_objext \
10315 conftest$ac_exeext conftest.$ac_ext
10316LIBS=$ac_check_lib_save_LIBS
10317fi
10318{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xbsd_main" >&5
10319$as_echo "$ac_cv_lib_Xbsd_main" >&6; }
10320if test "x$ac_cv_lib_Xbsd_main" = x""yes; then :
10321 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
10322fi
10323
10324
10325LIB_PTHREAD=
10326
10327
10328
10329if test "$ac_cv_header_pthread_h"; then
10330 if test "$GMALLOC_OBJ" = gmalloc.o; then
10331 emacs_pthread_function=pthread_atfork
10332 else
10333 emacs_pthread_function=pthread_self
10334 fi
10335 as_ac_Lib=`$as_echo "ac_cv_lib_pthread_$emacs_pthread_function" | $as_tr_sh`
10336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $emacs_pthread_function in -lpthread" >&5
10337$as_echo_n "checking for $emacs_pthread_function in -lpthread... " >&6; }
10338if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
10339 $as_echo_n "(cached) " >&6
10340else
10341 ac_check_lib_save_LIBS=$LIBS
10342LIBS="-lpthread $LIBS"
10343cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10344/* end confdefs.h. */
10345
10346/* Override any GCC internal prototype to avoid an error.
10347 Use char because int might match the return type of a GCC
10348 builtin and then its argument prototype would still apply. */
10349#ifdef __cplusplus
10350extern "C"
10351#endif
10352char $emacs_pthread_function ();
10353int
10354main ()
f199cab1 10355{
5476a9a4
GM
10356return $emacs_pthread_function ();
10357 ;
10358 return 0;
f199cab1 10359}
5476a9a4
GM
10360_ACEOF
10361if ac_fn_c_try_link "$LINENO"; then :
10362 eval "$as_ac_Lib=yes"
10363else
10364 eval "$as_ac_Lib=no"
10365fi
10366rm -f core conftest.err conftest.$ac_objext \
10367 conftest$ac_exeext conftest.$ac_ext
10368LIBS=$ac_check_lib_save_LIBS
10369fi
10370eval ac_res=\$$as_ac_Lib
10371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10372$as_echo "$ac_res" >&6; }
10373eval as_val=\$$as_ac_Lib
10374 if test "x$as_val" = x""yes; then :
10375 HAVE_PTHREAD=yes
10376fi
10377
10378fi
10379if test "$HAVE_PTHREAD" = yes; then
10380 case "${canonical}" in
10381 *-hpux*) ;;
10382 *) LIB_PTHREAD="-lpthread"
10383 LIBS="$LIB_PTHREAD $LIBS" ;;
10384 esac
10385
10386$as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
10387
10388fi
10389
10390
10391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cma_open in -lpthreads" >&5
10392$as_echo_n "checking for cma_open in -lpthreads... " >&6; }
10393if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then :
10394 $as_echo_n "(cached) " >&6
10395else
10396 ac_check_lib_save_LIBS=$LIBS
10397LIBS="-lpthreads $LIBS"
10398cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10399/* end confdefs.h. */
10400
10401/* Override any GCC internal prototype to avoid an error.
10402 Use char because int might match the return type of a GCC
10403 builtin and then its argument prototype would still apply. */
10404#ifdef __cplusplus
10405extern "C"
f199cab1 10406#endif
5476a9a4
GM
10407char cma_open ();
10408int
10409main ()
10410{
10411return cma_open ();
10412 ;
10413 return 0;
f199cab1 10414}
5476a9a4
GM
10415_ACEOF
10416if ac_fn_c_try_link "$LINENO"; then :
10417 ac_cv_lib_pthreads_cma_open=yes
10418else
10419 ac_cv_lib_pthreads_cma_open=no
10420fi
10421rm -f core conftest.err conftest.$ac_objext \
10422 conftest$ac_exeext conftest.$ac_ext
10423LIBS=$ac_check_lib_save_LIBS
10424fi
10425{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_cma_open" >&5
10426$as_echo "$ac_cv_lib_pthreads_cma_open" >&6; }
10427if test "x$ac_cv_lib_pthreads_cma_open" = x""yes; then :
10428 cat >>confdefs.h <<_ACEOF
10429#define HAVE_LIBPTHREADS 1
10430_ACEOF
10431
10432 LIBS="-lpthreads $LIBS"
10433
10434fi
10435
10436
10437## Note: when using cpp in s/aix4.2.h, this definition depended on
10438## HAVE_LIBPTHREADS. That was not defined earlier in configure when
10439## the system file was sourced. Hence the value of LIBS_SYSTEM
10440## added to LIBS in configure would never contain the pthreads part,
10441## but the value used in Makefiles might. FIXME?
10442##
10443## -lpthreads seems to be necessary for Xlib in X11R6, and should
10444## be harmless on older versions of X where it happens to exist.
10445test "$opsys" = "aix4-2" && \
10446 test $ac_cv_lib_pthreads_cma_open = yes && \
10447 LIBS_SYSTEM="$LIBS_SYSTEM -lpthreads"
10448
10449
10450case ${host_os} in
10451aix*)
10452 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
10453$as_echo_n "checking for -bbigtoc option... " >&6; }
10454if test "${gdb_cv_bigtoc+set}" = set; then :
10455 $as_echo_n "(cached) " >&6
10456else
10457
10458 case $GCC in
10459 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
10460 *) gdb_cv_bigtoc=-bbigtoc ;;
10461 esac
067d23c9 10462
5476a9a4
GM
10463 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
10464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10465/* end confdefs.h. */
067d23c9
KY
10466
10467int
10468main ()
10469{
5476a9a4
GM
10470int i;
10471 ;
10472 return 0;
10473}
10474_ACEOF
10475if ac_fn_c_try_link "$LINENO"; then :
067d23c9 10476
5476a9a4
GM
10477else
10478 gdb_cv_bigtoc=
10479fi
10480rm -f core conftest.err conftest.$ac_objext \
10481 conftest$ac_exeext conftest.$ac_ext
067d23c9 10482
5476a9a4
GM
10483fi
10484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
10485$as_echo "$gdb_cv_bigtoc" >&6; }
10486 ;;
10487esac
067d23c9 10488
5476a9a4
GM
10489# Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets
10490# used for the tests that follow. We set them back to REAL_CFLAGS and
10491# REAL_CPPFLAGS later on.
067d23c9 10492
5476a9a4
GM
10493REAL_CFLAGS="$CFLAGS"
10494REAL_CPPFLAGS="$CPPFLAGS"
10495
10496if test "${HAVE_X11}" = "yes"; then
10497 DEFS="$C_SWITCH_X_SITE $DEFS"
10498 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
10499 LIBS="-lX11 $LIBS"
10500 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
10501 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
10502
10503 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
10504 # This is handled by LD_SWITCH_X_SITE_RPATH during the real build,
10505 # but it's more convenient here to set LD_RUN_PATH since this
10506 # also works on hosts that don't understand LD_SWITCH_X_SITE_RPATH.
10507 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
10508 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
10509 export LD_RUN_PATH
10510 fi
10511
10512 if test "${opsys}" = "gnu-linux"; then
10513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether X on GNU/Linux needs -b to link" >&5
10514$as_echo_n "checking whether X on GNU/Linux needs -b to link... " >&6; }
10515 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10516/* end confdefs.h. */
067d23c9 10517
5476a9a4
GM
10518int
10519main ()
10520{
10521XOpenDisplay ("foo");
f199cab1 10522 ;
067d23c9
KY
10523 return 0;
10524}
10525_ACEOF
5476a9a4
GM
10526if ac_fn_c_try_link "$LINENO"; then :
10527 xgnu_linux_first_failure=no
067d23c9 10528else
5476a9a4 10529 xgnu_linux_first_failure=yes
067d23c9 10530fi
5476a9a4
GM
10531rm -f core conftest.err conftest.$ac_objext \
10532 conftest$ac_exeext conftest.$ac_ext
10533 if test "${xgnu_linux_first_failure}" = "yes"; then
10534 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
10535 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
10536 OLD_CPPFLAGS="$CPPFLAGS"
10537 OLD_LIBS="$LIBS"
10538 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
10539 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
10540 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
10541 LIBS="$LIBS -b i486-linuxaout"
10542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10543/* end confdefs.h. */
067d23c9 10544
5476a9a4
GM
10545int
10546main ()
10547{
10548XOpenDisplay ("foo");
10549 ;
10550 return 0;
10551}
10552_ACEOF
10553if ac_fn_c_try_link "$LINENO"; then :
10554 xgnu_linux_second_failure=no
10555else
10556 xgnu_linux_second_failure=yes
067d23c9 10557fi
5476a9a4
GM
10558rm -f core conftest.err conftest.$ac_objext \
10559 conftest$ac_exeext conftest.$ac_ext
10560 if test "${xgnu_linux_second_failure}" = "yes"; then
10561 # If we get the same failure with -b, there is no use adding -b.
10562 # So take it out. This plays safe.
10563 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
10564 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
10565 CPPFLAGS="$OLD_CPPFLAGS"
10566 LIBS="$OLD_LIBS"
10567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10568$as_echo "no" >&6; }
10569 else
10570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10571$as_echo "yes" >&6; }
10572 fi
0eb4e0df 10573 else
5476a9a4
GM
10574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10575$as_echo "no" >&6; }
10576 fi
10577 fi
0eb4e0df 10578
5476a9a4
GM
10579 # Reportedly, some broken Solaris systems have XKBlib.h but are missing
10580 # header files included from there.
10581 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Xkb" >&5
10582$as_echo_n "checking for Xkb... " >&6; }
0eb4e0df
GM
10583 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10584/* end confdefs.h. */
5476a9a4
GM
10585#include <X11/Xlib.h>
10586#include <X11/XKBlib.h>
0eb4e0df
GM
10587int
10588main ()
10589{
5476a9a4 10590XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);
0eb4e0df
GM
10591 ;
10592 return 0;
10593}
10594_ACEOF
5476a9a4
GM
10595if ac_fn_c_try_link "$LINENO"; then :
10596 emacs_xkb=yes
0eb4e0df 10597else
5476a9a4 10598 emacs_xkb=no
0eb4e0df 10599fi
5476a9a4
GM
10600rm -f core conftest.err conftest.$ac_objext \
10601 conftest$ac_exeext conftest.$ac_ext
10602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_xkb" >&5
10603$as_echo "$emacs_xkb" >&6; }
10604 if test $emacs_xkb = yes; then
1abfdc54 10605
5476a9a4 10606$as_echo "#define HAVE_XKBGETKEYBOARD 1" >>confdefs.h
1abfdc54 10607
e1fefc61 10608 fi
1abfdc54 10609
5476a9a4
GM
10610 for ac_func in XrmSetDatabase XScreenResourceString \
10611XScreenNumberOfScreen
10612do :
10613 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10614ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10615eval as_val=\$$as_ac_var
10616 if test "x$as_val" = x""yes; then :
10617 cat >>confdefs.h <<_ACEOF
10618#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
f199cab1 10619_ACEOF
1abfdc54 10620
5476a9a4
GM
10621fi
10622done
1abfdc54 10623
5476a9a4 10624fi
1abfdc54 10625
5476a9a4
GM
10626if test "${window_system}" = "x11"; then
10627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 version 6" >&5
10628$as_echo_n "checking X11 version 6... " >&6; }
10629 if test "${emacs_cv_x11_version_6+set}" = set; then :
067d23c9
KY
10630 $as_echo_n "(cached) " >&6
10631else
5476a9a4 10632 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 10633/* end confdefs.h. */
5476a9a4 10634#include <X11/Xlib.h>
067d23c9
KY
10635int
10636main ()
10637{
5476a9a4
GM
10638#if XlibSpecificationRelease < 6
10639fail;
10640#endif
10641
067d23c9
KY
10642 ;
10643 return 0;
10644}
10645_ACEOF
5476a9a4
GM
10646if ac_fn_c_try_link "$LINENO"; then :
10647 emacs_cv_x11_version_6=yes
10648else
10649 emacs_cv_x11_version_6=no
10650fi
10651rm -f core conftest.err conftest.$ac_objext \
10652 conftest$ac_exeext conftest.$ac_ext
067d23c9 10653fi
f199cab1 10654
5476a9a4
GM
10655 if test $emacs_cv_x11_version_6 = yes; then
10656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5
10657$as_echo "6 or newer" >&6; }
f199cab1 10658
5476a9a4 10659$as_echo "#define HAVE_X11R6 1" >>confdefs.h
f199cab1
GM
10660
10661
5476a9a4 10662$as_echo "#define HAVE_X_I18N 1" >>confdefs.h
f199cab1 10663
5476a9a4
GM
10664 ## inoue@ainet.or.jp says Solaris has a bug related to X11R6-style
10665 ## XIM support.
10666 case "$opsys" in
10667 sol2-*) : ;;
10668 *)
10669$as_echo "#define HAVE_X11R6_XIM 1" >>confdefs.h
f199cab1 10670
5476a9a4
GM
10671 ;;
10672 esac
10673 else
10674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5
10675$as_echo "before 6" >&6; }
10676 fi
10677fi
f199cab1 10678
067d23c9 10679
5476a9a4
GM
10680### Use -lrsvg-2 if available, unless `--with-rsvg=no' is specified.
10681HAVE_RSVG=no
10682if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes"; then
10683 if test "${with_rsvg}" != "no"; then
10684 RSVG_REQUIRED=2.11.0
10685 RSVG_MODULE="librsvg-2.0 >= $RSVG_REQUIRED"
067d23c9 10686
f199cab1 10687
5476a9a4 10688 succeeded=no
067d23c9 10689
5476a9a4
GM
10690 if test "$PKG_CONFIG" = "no" ; then
10691 :
10692 else
10693 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 10694 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
10695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $RSVG_MODULE" >&5
10696$as_echo_n "checking for $RSVG_MODULE... " >&6; }
f199cab1 10697
b5591ebb
GM
10698 if "$PKG_CONFIG" --exists "$RSVG_MODULE" 2>&5 &&
10699 RSVG_CFLAGS=`"$PKG_CONFIG" --cflags "$RSVG_MODULE" 2>&5` &&
10700 RSVG_LIBS=`"$PKG_CONFIG" --libs "$RSVG_MODULE" 2>&5`; then
5476a9a4
GM
10701 edit_cflags="
10702 s,///*,/,g
10703 s/^/ /
10704 s/ -I/ $isystem/g
10705 s/^ //
10706 "
10707 RSVG_CFLAGS=`$as_echo "$RSVG_CFLAGS" | sed -e "$edit_cflags"`
10708 RSVG_LIBS=`$as_echo "$RSVG_LIBS" | sed -e 's,///*,/,g'`
10709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$RSVG_CFLAGS' LIBS='$RSVG_LIBS'" >&5
10710$as_echo "yes CFLAGS='$RSVG_CFLAGS' LIBS='$RSVG_LIBS'" >&6; }
10711 succeeded=yes
10712 else
10713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10714$as_echo "no" >&6; }
10715 RSVG_CFLAGS=""
10716 RSVG_LIBS=""
10717 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
10718 ## do set a variable so people can do so. Do it in a subshell
10719 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 10720 RSVG_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$RSVG_MODULE") 2>&1`
f199cab1 10721
5476a9a4 10722 fi
067d23c9 10723
067d23c9 10724
067d23c9 10725
f199cab1 10726 else
5476a9a4
GM
10727 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10728 echo "*** See http://www.freedesktop.org/software/pkgconfig"
f199cab1 10729 fi
5476a9a4
GM
10730 fi
10731
10732 if test $succeeded = yes; then
10733 HAVE_RSVG=yes
10734 else
10735 :
10736 fi
067d23c9 10737
067d23c9 10738
067d23c9 10739
f199cab1 10740
5476a9a4 10741 if test $HAVE_RSVG = yes; then
f199cab1 10742
5476a9a4
GM
10743$as_echo "#define HAVE_RSVG 1" >>confdefs.h
10744
10745 CFLAGS="$CFLAGS $RSVG_CFLAGS"
10746 LIBS="$RSVG_LIBS $LIBS"
10747 fi
f199cab1 10748 fi
5476a9a4 10749fi
f199cab1 10750
5476a9a4
GM
10751HAVE_IMAGEMAGICK=no
10752if test "${HAVE_X11}" = "yes"; then
10753 if test "${with_imagemagick}" != "no"; then
10754 ## 6.2.8 is the earliest version known to work, but earlier versions
10755 ## might work - let us know if you find one.
10756 ## 6.0.7 does not work. See bug#7955.
10757 IMAGEMAGICK_MODULE="Wand >= 6.2.8"
f199cab1 10758
5476a9a4 10759 succeeded=no
f199cab1 10760
5476a9a4
GM
10761 if test "$PKG_CONFIG" = "no" ; then
10762 :
10763 else
10764 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 10765 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
10766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $IMAGEMAGICK_MODULE" >&5
10767$as_echo_n "checking for $IMAGEMAGICK_MODULE... " >&6; }
f199cab1 10768
b5591ebb
GM
10769 if "$PKG_CONFIG" --exists "$IMAGEMAGICK_MODULE" 2>&5 &&
10770 IMAGEMAGICK_CFLAGS=`"$PKG_CONFIG" --cflags "$IMAGEMAGICK_MODULE" 2>&5` &&
10771 IMAGEMAGICK_LIBS=`"$PKG_CONFIG" --libs "$IMAGEMAGICK_MODULE" 2>&5`; then
5476a9a4
GM
10772 edit_cflags="
10773 s,///*,/,g
10774 s/^/ /
10775 s/ -I/ $isystem/g
10776 s/^ //
10777 "
10778 IMAGEMAGICK_CFLAGS=`$as_echo "$IMAGEMAGICK_CFLAGS" | sed -e "$edit_cflags"`
10779 IMAGEMAGICK_LIBS=`$as_echo "$IMAGEMAGICK_LIBS" | sed -e 's,///*,/,g'`
10780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$IMAGEMAGICK_CFLAGS' LIBS='$IMAGEMAGICK_LIBS'" >&5
10781$as_echo "yes CFLAGS='$IMAGEMAGICK_CFLAGS' LIBS='$IMAGEMAGICK_LIBS'" >&6; }
10782 succeeded=yes
10783 else
10784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10785$as_echo "no" >&6; }
10786 IMAGEMAGICK_CFLAGS=""
10787 IMAGEMAGICK_LIBS=""
10788 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
10789 ## do set a variable so people can do so. Do it in a subshell
10790 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 10791 IMAGEMAGICK_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$IMAGEMAGICK_MODULE") 2>&1`
f199cab1 10792
5476a9a4 10793 fi
f199cab1 10794
f199cab1 10795
f199cab1 10796
5476a9a4
GM
10797 else
10798 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10799 echo "*** See http://www.freedesktop.org/software/pkgconfig"
10800 fi
f199cab1 10801 fi
5476a9a4
GM
10802
10803 if test $succeeded = yes; then
10804 HAVE_IMAGEMAGICK=yes
f199cab1 10805 else
5476a9a4 10806 :
067d23c9
KY
10807 fi
10808
f199cab1 10809
067d23c9 10810
f199cab1 10811
5476a9a4 10812 if test $HAVE_IMAGEMAGICK = yes; then
067d23c9 10813
5476a9a4 10814$as_echo "#define HAVE_IMAGEMAGICK 1" >>confdefs.h
f199cab1 10815
5476a9a4
GM
10816 CFLAGS="$CFLAGS $IMAGEMAGICK_CFLAGS"
10817 LIBS="$IMAGEMAGICK_LIBS $LIBS"
10818 for ac_func in MagickExportImagePixels MagickMergeImageLayers
10819do :
10820 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10821ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10822eval as_val=\$$as_ac_var
10823 if test "x$as_val" = x""yes; then :
10824 cat >>confdefs.h <<_ACEOF
10825#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
067d23c9 10826_ACEOF
f199cab1
GM
10827
10828fi
5476a9a4
GM
10829done
10830
067d23c9
KY
10831 fi
10832 fi
5476a9a4 10833fi
067d23c9 10834
f199cab1 10835
5476a9a4
GM
10836HAVE_GTK=no
10837GTK_OBJ=
4fa92495
GM
10838check_gtk2=no
10839gtk3_pkg_errors=
10840if test "${with_gtk3}" = "yes" || test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "maybe"; then
5476a9a4
GM
10841 GLIB_REQUIRED=2.28
10842 GTK_REQUIRED=3.0
10843 GTK_MODULES="gtk+-3.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
f199cab1
GM
10844
10845
5476a9a4 10846 succeeded=no
f199cab1 10847
5476a9a4
GM
10848 if test "$PKG_CONFIG" = "no" ; then
10849 pkg_check_gtk=no
10850 else
10851 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 10852 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
10853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5
10854$as_echo_n "checking for $GTK_MODULES... " >&6; }
f199cab1 10855
b5591ebb
GM
10856 if "$PKG_CONFIG" --exists "$GTK_MODULES" 2>&5 &&
10857 GTK_CFLAGS=`"$PKG_CONFIG" --cflags "$GTK_MODULES" 2>&5` &&
10858 GTK_LIBS=`"$PKG_CONFIG" --libs "$GTK_MODULES" 2>&5`; then
5476a9a4
GM
10859 edit_cflags="
10860 s,///*,/,g
10861 s/^/ /
10862 s/ -I/ $isystem/g
10863 s/^ //
10864 "
10865 GTK_CFLAGS=`$as_echo "$GTK_CFLAGS" | sed -e "$edit_cflags"`
10866 GTK_LIBS=`$as_echo "$GTK_LIBS" | sed -e 's,///*,/,g'`
10867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&5
10868$as_echo "yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&6; }
10869 succeeded=yes
10870 else
10871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10872$as_echo "no" >&6; }
10873 GTK_CFLAGS=""
10874 GTK_LIBS=""
10875 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
10876 ## do set a variable so people can do so. Do it in a subshell
10877 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 10878 GTK_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$GTK_MODULES") 2>&1`
f199cab1 10879
5476a9a4 10880 fi
f199cab1 10881
f199cab1 10882
f199cab1 10883
5476a9a4
GM
10884 else
10885 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10886 echo "*** See http://www.freedesktop.org/software/pkgconfig"
f199cab1 10887 fi
5476a9a4 10888 fi
067d23c9 10889
5476a9a4
GM
10890 if test $succeeded = yes; then
10891 pkg_check_gtk=yes
10892 else
10893 pkg_check_gtk=no
10894 fi
067d23c9 10895
4fa92495 10896 if test "$pkg_check_gtk" = "no" && test "$with_gtk3" = "yes"; then
5476a9a4 10897 as_fn_error "$GTK_PKG_ERRORS" "$LINENO" 5
067d23c9 10898 fi
4fa92495 10899 if test "$pkg_check_gtk" = "yes"; then
067d23c9 10900
5476a9a4 10901$as_echo "#define HAVE_GTK3 1" >>confdefs.h
067d23c9 10902
4fa92495
GM
10903 GTK_OBJ=emacsgtkfixed.o
10904 term_header=gtkutil.h
a732eace 10905 USE_GTK_TOOLKIT="GTK3"
4efe5ef9
GM
10906 if test "x$ac_enable_gtk_deprecation_warnings" = x; then
10907 GTK_CFLAGS="$GTK_CFLAGS -DGDK_DISABLE_DEPRECATION_WARNINGS"
10908 fi
4fa92495
GM
10909 else
10910 check_gtk2=yes
10911 gtk3_pkg_errors="$GTK_PKG_ERRORS "
10912 fi
5476a9a4 10913fi
067d23c9 10914
4fa92495 10915if test "${with_gtk2}" = "yes" || test "$check_gtk2" = "yes"; then
5476a9a4
GM
10916 GLIB_REQUIRED=2.10
10917 GTK_REQUIRED=2.10
10918 GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
f199cab1 10919
5476a9a4
GM
10920
10921 succeeded=no
10922
10923 if test "$PKG_CONFIG" = "no" ; then
10924 pkg_check_gtk=no
10925 else
10926 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 10927 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
10928 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5
10929$as_echo_n "checking for $GTK_MODULES... " >&6; }
10930
b5591ebb
GM
10931 if "$PKG_CONFIG" --exists "$GTK_MODULES" 2>&5 &&
10932 GTK_CFLAGS=`"$PKG_CONFIG" --cflags "$GTK_MODULES" 2>&5` &&
10933 GTK_LIBS=`"$PKG_CONFIG" --libs "$GTK_MODULES" 2>&5`; then
5476a9a4
GM
10934 edit_cflags="
10935 s,///*,/,g
10936 s/^/ /
10937 s/ -I/ $isystem/g
10938 s/^ //
10939 "
10940 GTK_CFLAGS=`$as_echo "$GTK_CFLAGS" | sed -e "$edit_cflags"`
10941 GTK_LIBS=`$as_echo "$GTK_LIBS" | sed -e 's,///*,/,g'`
10942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&5
10943$as_echo "yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&6; }
10944 succeeded=yes
10945 else
10946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10947$as_echo "no" >&6; }
10948 GTK_CFLAGS=""
10949 GTK_LIBS=""
10950 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
10951 ## do set a variable so people can do so. Do it in a subshell
10952 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 10953 GTK_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$GTK_MODULES") 2>&1`
5476a9a4
GM
10954
10955 fi
10956
10957
10958
10959 else
10960 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10961 echo "*** See http://www.freedesktop.org/software/pkgconfig"
10962 fi
10963 fi
10964
10965 if test $succeeded = yes; then
10966 pkg_check_gtk=yes
10967 else
10968 pkg_check_gtk=no
10969 fi
10970
e2d8f316
GM
10971 if test "$pkg_check_gtk" = "no" &&
10972 { test "$with_gtk" = yes || test "$with_gtk2" = "yes"; }
10973 then
10974 as_fn_error "$gtk3_pkg_errors$GTK_PKG_ERRORS" "$LINENO" 5
5476a9a4 10975 fi
a732eace 10976 test "$pkg_check_gtk" = "yes" && USE_GTK_TOOLKIT="GTK2"
067d23c9 10977fi
067d23c9 10978
5476a9a4
GM
10979if test x"$pkg_check_gtk" = xyes; then
10980
10981
10982
10983 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS"
10984 CFLAGS="$CFLAGS $GTK_CFLAGS"
10985 LIBS="$GTK_LIBS $LIBS"
10986 GTK_COMPILES=no
10987 for ac_func in gtk_main
10988do :
10989 ac_fn_c_check_func "$LINENO" "gtk_main" "ac_cv_func_gtk_main"
10990if test "x$ac_cv_func_gtk_main" = x""yes; then :
10991 cat >>confdefs.h <<_ACEOF
10992#define HAVE_GTK_MAIN 1
10993_ACEOF
10994 GTK_COMPILES=yes
f199cab1 10995fi
5476a9a4 10996done
067d23c9 10997
5476a9a4
GM
10998 if test "${GTK_COMPILES}" != "yes"; then
10999 if test "$USE_X_TOOLKIT" != "maybe"; then
11000 as_fn_error "Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" "$LINENO" 5;
11001 fi
11002 else
11003 HAVE_GTK=yes
11004
11005$as_echo "#define USE_GTK 1" >>confdefs.h
067d23c9 11006
5476a9a4
GM
11007 GTK_OBJ="gtkutil.o $GTK_OBJ"
11008 USE_X_TOOLKIT=none
b5591ebb 11009 if "$PKG_CONFIG" --atleast-version=2.10 gtk+-2.0; then
5476a9a4
GM
11010 :
11011 else
11012 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your version of Gtk+ will have problems with
11013 closing open displays. This is no problem if you just use
11014 one display, but if you use more than one and close one of them
11015 Emacs may crash." >&5
11016$as_echo "$as_me: WARNING: Your version of Gtk+ will have problems with
11017 closing open displays. This is no problem if you just use
11018 one display, but if you use more than one and close one of them
11019 Emacs may crash." >&2;}
11020 sleep 3
11021 fi
067d23c9
KY
11022 fi
11023
5476a9a4 11024fi
067d23c9
KY
11025
11026
11027
5476a9a4 11028if test "${HAVE_GTK}" = "yes"; then
067d23c9 11029
5476a9a4
GM
11030 if test "$with_toolkit_scroll_bars" != no; then
11031 with_toolkit_scroll_bars=yes
11032 fi
067d23c9 11033
5476a9a4
GM
11034 HAVE_GTK_FILE_SELECTION=no
11035 ac_fn_c_check_decl "$LINENO" "GTK_TYPE_FILE_SELECTION" "ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" "$ac_includes_default
11036#include <gtk/gtk.h>
11037"
11038if test "x$ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" = x""yes; then :
11039 HAVE_GTK_FILE_SELECTION=yes
11040else
11041 HAVE_GTK_FILE_SELECTION=no
11042fi
067d23c9 11043
5476a9a4
GM
11044 if test "$HAVE_GTK_FILE_SELECTION" = yes; then
11045 for ac_func in gtk_file_selection_new
11046do :
11047 ac_fn_c_check_func "$LINENO" "gtk_file_selection_new" "ac_cv_func_gtk_file_selection_new"
11048if test "x$ac_cv_func_gtk_file_selection_new" = x""yes; then :
11049 cat >>confdefs.h <<_ACEOF
11050#define HAVE_GTK_FILE_SELECTION_NEW 1
f199cab1 11051_ACEOF
067d23c9 11052
f199cab1 11053fi
5476a9a4
GM
11054done
11055
f199cab1 11056 fi
067d23c9 11057
4efe5ef9
GM
11058 HAVE_GTK_HANDLE_BOX=no
11059 ac_fn_c_check_decl "$LINENO" "GTK_TYPE_HANDLE_BOX" "ac_cv_have_decl_GTK_TYPE_HANDLE_BOX" "$ac_includes_default
11060#include <gtk/gtk.h>
11061"
11062if test "x$ac_cv_have_decl_GTK_TYPE_HANDLE_BOX" = x""yes; then :
11063 HAVE_GTK_HANDLE_BOX=yes
11064else
11065 HAVE_GTK_HANDLE_BOX=no
11066fi
11067
11068 if test "$HAVE_GTK_HANDLE_BOX" = yes; then
11069 for ac_func in gtk_handle_box_new
11070do :
11071 ac_fn_c_check_func "$LINENO" "gtk_handle_box_new" "ac_cv_func_gtk_handle_box_new"
11072if test "x$ac_cv_func_gtk_handle_box_new" = x""yes; then :
11073 cat >>confdefs.h <<_ACEOF
11074#define HAVE_GTK_HANDLE_BOX_NEW 1
11075_ACEOF
11076
11077fi
11078done
11079
11080 fi
11081
11082 HAVE_GTK_TEAROFF_MENU_ITEM=no
11083 ac_fn_c_check_decl "$LINENO" "GTK_TYPE_TEAROFF_MENU_ITEM" "ac_cv_have_decl_GTK_TYPE_TEAROFF_MENU_ITEM" "$ac_includes_default
11084#include <gtk/gtk.h>
11085"
11086if test "x$ac_cv_have_decl_GTK_TYPE_TEAROFF_MENU_ITEM" = x""yes; then :
11087 HAVE_GTK_TEAROFF_MENU_ITEM=yes
11088else
11089 HAVE_GTK_TEAROFF_MENU_ITEM=no
11090fi
11091
11092 if test "$HAVE_GTK_TEAROFF_MENU_ITEM" = yes; then
11093 for ac_func in gtk_tearoff_menu_item_new
11094do :
11095 ac_fn_c_check_func "$LINENO" "gtk_tearoff_menu_item_new" "ac_cv_func_gtk_tearoff_menu_item_new"
11096if test "x$ac_cv_func_gtk_tearoff_menu_item_new" = x""yes; then :
11097 cat >>confdefs.h <<_ACEOF
11098#define HAVE_GTK_TEAROFF_MENU_ITEM_NEW 1
11099_ACEOF
11100
11101fi
11102done
11103
11104 fi
067d23c9 11105
5476a9a4
GM
11106 for ac_func in gtk_widget_get_window gtk_widget_set_has_window \
11107 gtk_dialog_get_action_area gtk_widget_get_sensitive \
11108 gtk_widget_get_mapped gtk_adjustment_get_page_size \
11109 gtk_orientable_set_orientation \
11110 gtk_window_set_has_resize_grip
11111do :
11112 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11113ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11114eval as_val=\$$as_ac_var
11115 if test "x$as_val" = x""yes; then :
11116 cat >>confdefs.h <<_ACEOF
11117#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11118_ACEOF
067d23c9 11119
5476a9a4
GM
11120fi
11121done
067d23c9 11122
42dcba54
GM
11123
11124 term_header=gtkutil.h
5476a9a4 11125fi
067d23c9 11126
5476a9a4
GM
11127HAVE_DBUS=no
11128DBUS_OBJ=
11129if test "${with_dbus}" = "yes"; then
067d23c9 11130
5476a9a4 11131 succeeded=no
067d23c9 11132
5476a9a4
GM
11133 if test "$PKG_CONFIG" = "no" ; then
11134 HAVE_DBUS=no
f199cab1 11135 else
5476a9a4 11136 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 11137 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
11138 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbus-1 >= 1.0" >&5
11139$as_echo_n "checking for dbus-1 >= 1.0... " >&6; }
067d23c9 11140
b5591ebb
GM
11141 if "$PKG_CONFIG" --exists "dbus-1 >= 1.0" 2>&5 &&
11142 DBUS_CFLAGS=`"$PKG_CONFIG" --cflags "dbus-1 >= 1.0" 2>&5` &&
11143 DBUS_LIBS=`"$PKG_CONFIG" --libs "dbus-1 >= 1.0" 2>&5`; then
5476a9a4
GM
11144 edit_cflags="
11145 s,///*,/,g
11146 s/^/ /
11147 s/ -I/ $isystem/g
11148 s/^ //
11149 "
11150 DBUS_CFLAGS=`$as_echo "$DBUS_CFLAGS" | sed -e "$edit_cflags"`
11151 DBUS_LIBS=`$as_echo "$DBUS_LIBS" | sed -e 's,///*,/,g'`
11152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$DBUS_CFLAGS' LIBS='$DBUS_LIBS'" >&5
11153$as_echo "yes CFLAGS='$DBUS_CFLAGS' LIBS='$DBUS_LIBS'" >&6; }
11154 succeeded=yes
11155 else
11156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11157$as_echo "no" >&6; }
11158 DBUS_CFLAGS=""
11159 DBUS_LIBS=""
11160 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
11161 ## do set a variable so people can do so. Do it in a subshell
11162 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 11163 DBUS_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "dbus-1 >= 1.0") 2>&1`
067d23c9 11164
5476a9a4 11165 fi
067d23c9 11166
15f79fcd 11167
067d23c9 11168
5476a9a4
GM
11169 else
11170 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11171 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11172 fi
067d23c9 11173 fi
067d23c9 11174
5476a9a4
GM
11175 if test $succeeded = yes; then
11176 HAVE_DBUS=yes
f199cab1 11177 else
5476a9a4 11178 HAVE_DBUS=no
f199cab1 11179 fi
067d23c9 11180
5476a9a4
GM
11181 if test "$HAVE_DBUS" = yes; then
11182 LIBS="$LIBS $DBUS_LIBS"
067d23c9 11183
5476a9a4 11184$as_echo "#define HAVE_DBUS 1" >>confdefs.h
067d23c9 11185
5476a9a4
GM
11186 for ac_func in dbus_watch_get_unix_fd \
11187 dbus_type_is_valid \
11188 dbus_validate_bus_name \
11189 dbus_validate_path \
11190 dbus_validate_interface \
11191 dbus_validate_member
11192do :
11193 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11194ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11195eval as_val=\$$as_ac_var
11196 if test "x$as_val" = x""yes; then :
11197 cat >>confdefs.h <<_ACEOF
11198#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11199_ACEOF
067d23c9 11200
5476a9a4
GM
11201fi
11202done
067d23c9 11203
5476a9a4
GM
11204 DBUS_OBJ=dbusbind.o
11205 fi
11206fi
067d23c9
KY
11207
11208
5476a9a4
GM
11209HAVE_GSETTINGS=no
11210if test "${HAVE_X11}" = "yes" && test "${with_gsettings}" = "yes"; then
067d23c9 11211
5476a9a4 11212 succeeded=no
067d23c9 11213
5476a9a4
GM
11214 if test "$PKG_CONFIG" = "no" ; then
11215 HAVE_GSETTINGS=no
11216 else
11217 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 11218 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
11219 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gio-2.0 >= 2.26" >&5
11220$as_echo_n "checking for gio-2.0 >= 2.26... " >&6; }
0afb4571 11221
b5591ebb
GM
11222 if "$PKG_CONFIG" --exists "gio-2.0 >= 2.26" 2>&5 &&
11223 GSETTINGS_CFLAGS=`"$PKG_CONFIG" --cflags "gio-2.0 >= 2.26" 2>&5` &&
11224 GSETTINGS_LIBS=`"$PKG_CONFIG" --libs "gio-2.0 >= 2.26" 2>&5`; then
5476a9a4
GM
11225 edit_cflags="
11226 s,///*,/,g
11227 s/^/ /
11228 s/ -I/ $isystem/g
11229 s/^ //
11230 "
11231 GSETTINGS_CFLAGS=`$as_echo "$GSETTINGS_CFLAGS" | sed -e "$edit_cflags"`
11232 GSETTINGS_LIBS=`$as_echo "$GSETTINGS_LIBS" | sed -e 's,///*,/,g'`
11233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GSETTINGS_CFLAGS' LIBS='$GSETTINGS_LIBS'" >&5
11234$as_echo "yes CFLAGS='$GSETTINGS_CFLAGS' LIBS='$GSETTINGS_LIBS'" >&6; }
11235 succeeded=yes
11236 else
11237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11238$as_echo "no" >&6; }
11239 GSETTINGS_CFLAGS=""
11240 GSETTINGS_LIBS=""
11241 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
11242 ## do set a variable so people can do so. Do it in a subshell
11243 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 11244 GSETTINGS_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "gio-2.0 >= 2.26") 2>&1`
0afb4571 11245
5476a9a4 11246 fi
067d23c9
KY
11247
11248
11249
11250 else
5476a9a4
GM
11251 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11252 echo "*** See http://www.freedesktop.org/software/pkgconfig"
067d23c9 11253 fi
5476a9a4 11254 fi
067d23c9 11255
5476a9a4
GM
11256 if test $succeeded = yes; then
11257 HAVE_GSETTINGS=yes
11258 else
11259 HAVE_GSETTINGS=no
11260 fi
f199cab1 11261
5476a9a4 11262 if test "$HAVE_GSETTINGS" = "yes"; then
f199cab1 11263
5476a9a4 11264$as_echo "#define HAVE_GSETTINGS 1" >>confdefs.h
f199cab1 11265
5476a9a4
GM
11266 SETTINGS_CFLAGS="$GSETTINGS_CFLAGS"
11267 SETTINGS_LIBS="$GSETTINGS_LIBS"
11268 fi
11269fi
067d23c9 11270
5476a9a4
GM
11271HAVE_GCONF=no
11272if test "${HAVE_X11}" = "yes" && test "${with_gconf}" = "yes"; then
067d23c9 11273
5476a9a4 11274 succeeded=no
067d23c9 11275
5476a9a4
GM
11276 if test "$PKG_CONFIG" = "no" ; then
11277 HAVE_GCONF=no
11278 else
11279 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 11280 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
11281 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gconf-2.0 >= 2.13" >&5
11282$as_echo_n "checking for gconf-2.0 >= 2.13... " >&6; }
067d23c9 11283
b5591ebb
GM
11284 if "$PKG_CONFIG" --exists "gconf-2.0 >= 2.13" 2>&5 &&
11285 GCONF_CFLAGS=`"$PKG_CONFIG" --cflags "gconf-2.0 >= 2.13" 2>&5` &&
11286 GCONF_LIBS=`"$PKG_CONFIG" --libs "gconf-2.0 >= 2.13" 2>&5`; then
5476a9a4
GM
11287 edit_cflags="
11288 s,///*,/,g
11289 s/^/ /
11290 s/ -I/ $isystem/g
11291 s/^ //
11292 "
11293 GCONF_CFLAGS=`$as_echo "$GCONF_CFLAGS" | sed -e "$edit_cflags"`
11294 GCONF_LIBS=`$as_echo "$GCONF_LIBS" | sed -e 's,///*,/,g'`
11295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GCONF_CFLAGS' LIBS='$GCONF_LIBS'" >&5
11296$as_echo "yes CFLAGS='$GCONF_CFLAGS' LIBS='$GCONF_LIBS'" >&6; }
11297 succeeded=yes
11298 else
11299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11300$as_echo "no" >&6; }
11301 GCONF_CFLAGS=""
11302 GCONF_LIBS=""
11303 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
11304 ## do set a variable so people can do so. Do it in a subshell
11305 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 11306 GCONF_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "gconf-2.0 >= 2.13") 2>&1`
067d23c9 11307
5476a9a4 11308 fi
f199cab1 11309
f199cab1
GM
11310
11311
5476a9a4
GM
11312 else
11313 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11314 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11315 fi
11316 fi
f199cab1 11317
5476a9a4
GM
11318 if test $succeeded = yes; then
11319 HAVE_GCONF=yes
11320 else
11321 HAVE_GCONF=no
11322 fi
f199cab1 11323
5476a9a4 11324 if test "$HAVE_GCONF" = yes; then
f199cab1 11325
5476a9a4 11326$as_echo "#define HAVE_GCONF 1" >>confdefs.h
f199cab1 11327
5476a9a4
GM
11328 SETTINGS_CFLAGS="$SETTINGS_CFLAGS $GCONF_CFLAGS"
11329 SETTINGS_LIBS="$SETTINGS_LIBS $GCONF_LIBS"
11330 fi
11331fi
f199cab1 11332
5476a9a4 11333if test "$HAVE_GSETTINGS" = "yes" || test "$HAVE_GCONF" = "yes"; then
dcde497f
GM
11334
11335 succeeded=no
11336
11337 if test "$PKG_CONFIG" = "no" ; then
11338 HAVE_GOBJECT=no
11339 else
11340 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 11341 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
dcde497f
GM
11342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gobject-2.0 >= 2.0" >&5
11343$as_echo_n "checking for gobject-2.0 >= 2.0... " >&6; }
11344
b5591ebb
GM
11345 if "$PKG_CONFIG" --exists "gobject-2.0 >= 2.0" 2>&5 &&
11346 GOBJECT_CFLAGS=`"$PKG_CONFIG" --cflags "gobject-2.0 >= 2.0" 2>&5` &&
11347 GOBJECT_LIBS=`"$PKG_CONFIG" --libs "gobject-2.0 >= 2.0" 2>&5`; then
dcde497f
GM
11348 edit_cflags="
11349 s,///*,/,g
11350 s/^/ /
11351 s/ -I/ $isystem/g
11352 s/^ //
11353 "
11354 GOBJECT_CFLAGS=`$as_echo "$GOBJECT_CFLAGS" | sed -e "$edit_cflags"`
11355 GOBJECT_LIBS=`$as_echo "$GOBJECT_LIBS" | sed -e 's,///*,/,g'`
11356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GOBJECT_CFLAGS' LIBS='$GOBJECT_LIBS'" >&5
11357$as_echo "yes CFLAGS='$GOBJECT_CFLAGS' LIBS='$GOBJECT_LIBS'" >&6; }
11358 succeeded=yes
11359 else
11360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11361$as_echo "no" >&6; }
11362 GOBJECT_CFLAGS=""
11363 GOBJECT_LIBS=""
11364 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
11365 ## do set a variable so people can do so. Do it in a subshell
11366 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 11367 GOBJECT_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "gobject-2.0 >= 2.0") 2>&1`
dcde497f
GM
11368
11369 fi
11370
11371
11372
11373 else
11374 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11375 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11376 fi
11377 fi
11378
11379 if test $succeeded = yes; then
11380 HAVE_GOBJECT=yes
11381 else
11382 HAVE_GOBJECT=no
11383 fi
11384
11385 if test "$HAVE_GOBJECT" = "yes"; then
11386 SETTINGS_CFLAGS="$SETTINGS_CFLAGS $GOBJECT_CFLAGS"
11387 SETTINGS_LIBS="$SETTINGS_LIBS $GOBJECT_LIBS"
11388 fi
5476a9a4
GM
11389 SAVE_CFLAGS="$CFLAGS"
11390 SAVE_LIBS="$LIBS"
11391 CFLAGS="$SETTINGS_CFLAGS $CFLAGS"
11392 LIBS="$SETTINGS_LIBS $LIBS"
11393 for ac_func in g_type_init
11394do :
11395 ac_fn_c_check_func "$LINENO" "g_type_init" "ac_cv_func_g_type_init"
11396if test "x$ac_cv_func_g_type_init" = x""yes; then :
11397 cat >>confdefs.h <<_ACEOF
11398#define HAVE_G_TYPE_INIT 1
067d23c9 11399_ACEOF
067d23c9 11400
5476a9a4
GM
11401fi
11402done
067d23c9 11403
5476a9a4
GM
11404 CFLAGS="$SAVE_CFLAGS"
11405 LIBS="$SAVE_LIBS"
11406fi
067d23c9 11407
067d23c9 11408
f199cab1 11409
067d23c9 11410
5476a9a4
GM
11411HAVE_LIBSELINUX=no
11412LIBSELINUX_LIBS=
11413if test "${with_selinux}" = "yes"; then
11414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lgetfilecon in -lselinux" >&5
11415$as_echo_n "checking for lgetfilecon in -lselinux... " >&6; }
11416if test "${ac_cv_lib_selinux_lgetfilecon+set}" = set; then :
11417 $as_echo_n "(cached) " >&6
11418else
11419 ac_check_lib_save_LIBS=$LIBS
11420LIBS="-lselinux $LIBS"
11421cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11422/* end confdefs.h. */
067d23c9 11423
5476a9a4
GM
11424/* Override any GCC internal prototype to avoid an error.
11425 Use char because int might match the return type of a GCC
11426 builtin and then its argument prototype would still apply. */
11427#ifdef __cplusplus
11428extern "C"
f199cab1 11429#endif
5476a9a4 11430char lgetfilecon ();
f199cab1
GM
11431int
11432main ()
11433{
5476a9a4 11434return lgetfilecon ();
f199cab1
GM
11435 ;
11436 return 0;
11437}
11438_ACEOF
5476a9a4
GM
11439if ac_fn_c_try_link "$LINENO"; then :
11440 ac_cv_lib_selinux_lgetfilecon=yes
11441else
11442 ac_cv_lib_selinux_lgetfilecon=no
f199cab1 11443fi
5476a9a4
GM
11444rm -f core conftest.err conftest.$ac_objext \
11445 conftest$ac_exeext conftest.$ac_ext
11446LIBS=$ac_check_lib_save_LIBS
11447fi
11448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_lgetfilecon" >&5
11449$as_echo "$ac_cv_lib_selinux_lgetfilecon" >&6; }
11450if test "x$ac_cv_lib_selinux_lgetfilecon" = x""yes; then :
11451 HAVE_LIBSELINUX=yes
11452else
11453 HAVE_LIBSELINUX=no
067d23c9
KY
11454fi
11455
5476a9a4 11456 if test "$HAVE_LIBSELINUX" = yes; then
067d23c9 11457
5476a9a4 11458$as_echo "#define HAVE_LIBSELINUX 1" >>confdefs.h
067d23c9 11459
5476a9a4
GM
11460 LIBSELINUX_LIBS=-lselinux
11461 fi
f199cab1 11462fi
067d23c9 11463
067d23c9 11464
5476a9a4
GM
11465HAVE_GNUTLS=no
11466HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY=no
11467if test "${with_gnutls}" = "yes" ; then
067d23c9 11468
5476a9a4 11469 succeeded=no
067d23c9 11470
5476a9a4
GM
11471 if test "$PKG_CONFIG" = "no" ; then
11472 HAVE_GNUTLS=no
11473 else
11474 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 11475 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
11476 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gnutls >= 2.6.6" >&5
11477$as_echo_n "checking for gnutls >= 2.6.6... " >&6; }
067d23c9 11478
b5591ebb
GM
11479 if "$PKG_CONFIG" --exists "gnutls >= 2.6.6" 2>&5 &&
11480 LIBGNUTLS_CFLAGS=`"$PKG_CONFIG" --cflags "gnutls >= 2.6.6" 2>&5` &&
11481 LIBGNUTLS_LIBS=`"$PKG_CONFIG" --libs "gnutls >= 2.6.6" 2>&5`; then
5476a9a4
GM
11482 edit_cflags="
11483 s,///*,/,g
11484 s/^/ /
11485 s/ -I/ $isystem/g
11486 s/^ //
11487 "
11488 LIBGNUTLS_CFLAGS=`$as_echo "$LIBGNUTLS_CFLAGS" | sed -e "$edit_cflags"`
11489 LIBGNUTLS_LIBS=`$as_echo "$LIBGNUTLS_LIBS" | sed -e 's,///*,/,g'`
11490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBGNUTLS_CFLAGS' LIBS='$LIBGNUTLS_LIBS'" >&5
11491$as_echo "yes CFLAGS='$LIBGNUTLS_CFLAGS' LIBS='$LIBGNUTLS_LIBS'" >&6; }
11492 succeeded=yes
11493 else
11494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11495$as_echo "no" >&6; }
11496 LIBGNUTLS_CFLAGS=""
11497 LIBGNUTLS_LIBS=""
11498 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
11499 ## do set a variable so people can do so. Do it in a subshell
11500 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 11501 LIBGNUTLS_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "gnutls >= 2.6.6") 2>&1`
067d23c9 11502
5476a9a4 11503 fi
067d23c9 11504
067d23c9 11505
067d23c9 11506
5476a9a4
GM
11507 else
11508 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11509 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11510 fi
11511 fi
067d23c9 11512
5476a9a4
GM
11513 if test $succeeded = yes; then
11514 HAVE_GNUTLS=yes
11515 else
11516 HAVE_GNUTLS=no
11517 fi
067d23c9 11518
5476a9a4 11519 if test "${HAVE_GNUTLS}" = "yes"; then
067d23c9 11520
5476a9a4 11521$as_echo "#define HAVE_GNUTLS 1" >>confdefs.h
067d23c9 11522
5476a9a4 11523 fi
f199cab1 11524
5476a9a4
GM
11525 CFLAGS="$CFLAGS $LIBGNUTLS_CFLAGS"
11526 LIBS="$LIBGNUTLS_LIBS $LIBS"
11527 for ac_func in gnutls_certificate_set_verify_function
11528do :
11529 ac_fn_c_check_func "$LINENO" "gnutls_certificate_set_verify_function" "ac_cv_func_gnutls_certificate_set_verify_function"
11530if test "x$ac_cv_func_gnutls_certificate_set_verify_function" = x""yes; then :
11531 cat >>confdefs.h <<_ACEOF
11532#define HAVE_GNUTLS_CERTIFICATE_SET_VERIFY_FUNCTION 1
f199cab1 11533_ACEOF
5476a9a4
GM
11534 HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY=yes
11535fi
11536done
067d23c9
KY
11537
11538
5476a9a4
GM
11539 if test "${HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY}" = "yes"; then
11540
11541$as_echo "#define HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY 1" >>confdefs.h
f527bd02 11542
f199cab1 11543 fi
5476a9a4 11544fi
f527bd02 11545
f527bd02 11546
5476a9a4
GM
11547
11548
b5eb356a
GM
11549if test "${with_inotify}" = "yes"; then
11550 for ac_header in sys/inotify.h
11551do :
11552 ac_fn_c_check_header_mongrel "$LINENO" "sys/inotify.h" "ac_cv_header_sys_inotify_h" "$ac_includes_default"
11553if test "x$ac_cv_header_sys_inotify_h" = x""yes; then :
11554 cat >>confdefs.h <<_ACEOF
11555#define HAVE_SYS_INOTIFY_H 1
11556_ACEOF
11557
11558fi
11559
11560done
11561
11562 if test "$ac_cv_header_sys_inotify_h" = yes ; then
11563 ac_fn_c_check_func "$LINENO" "inotify_init1" "ac_cv_func_inotify_init1"
11564if test "x$ac_cv_func_inotify_init1" = x""yes; then :
11565
11566fi
11567
11568 fi
11569fi
11570if test "$ac_cv_func_inotify_init1" = yes; then
11571
11572$as_echo "#define HAVE_INOTIFY 1" >>confdefs.h
11573
11574fi
11575
4cc63c81
GM
11576HAVE_POSIX_ACL=no
11577LIBACL_LIBS=
11578if test "${with_acl}" = "yes"; then
11579 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for acl_set_file in -lacl" >&5
11580$as_echo_n "checking for acl_set_file in -lacl... " >&6; }
11581if test "${ac_cv_lib_acl_acl_set_file+set}" = set; then :
11582 $as_echo_n "(cached) " >&6
11583else
11584 ac_check_lib_save_LIBS=$LIBS
11585LIBS="-lacl $LIBS"
11586cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11587/* end confdefs.h. */
11588
11589/* Override any GCC internal prototype to avoid an error.
11590 Use char because int might match the return type of a GCC
11591 builtin and then its argument prototype would still apply. */
11592#ifdef __cplusplus
11593extern "C"
11594#endif
11595char acl_set_file ();
11596int
11597main ()
11598{
11599return acl_set_file ();
11600 ;
11601 return 0;
11602}
11603_ACEOF
11604if ac_fn_c_try_link "$LINENO"; then :
11605 ac_cv_lib_acl_acl_set_file=yes
11606else
11607 ac_cv_lib_acl_acl_set_file=no
11608fi
11609rm -f core conftest.err conftest.$ac_objext \
11610 conftest$ac_exeext conftest.$ac_ext
11611LIBS=$ac_check_lib_save_LIBS
11612fi
11613{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_acl_acl_set_file" >&5
11614$as_echo "$ac_cv_lib_acl_acl_set_file" >&6; }
11615if test "x$ac_cv_lib_acl_acl_set_file" = x""yes; then :
11616 HAVE_POSIX_ACL=yes
11617else
11618 HAVE_POSIX_ACL=no
11619fi
11620
11621 if test "$HAVE_POSIX_ACL" = yes; then
11622
11623$as_echo "#define HAVE_POSIX_ACL 1" >>confdefs.h
11624
11625 LIBACL_LIBS=-lacl
11626 else
11627 ac_fn_c_check_func "$LINENO" "acl_set_file" "ac_cv_func_acl_set_file"
11628if test "x$ac_cv_func_acl_set_file" = x""yes; then :
11629 HAVE_POSIX_ACL=yes
11630else
11631 HAVE_POSIX_ACL=no
11632fi
11633
11634 if test "$HAVE_POSIX_ACL" = yes; then
11635
11636$as_echo "#define HAVE_POSIX_ACL 1" >>confdefs.h
11637
11638 fi
11639 fi
11640fi
11641
11642
5476a9a4
GM
11643HAVE_XAW3D=no
11644LUCID_LIBW=
11645if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then
11646 if test "$with_xaw3d" != no; then
5476a9a4 11647 if test "${emacs_cv_xaw3d+set}" = set; then :
f199cab1
GM
11648 $as_echo_n "(cached) " >&6
11649else
5476a9a4
GM
11650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11651/* end confdefs.h. */
f527bd02 11652
5476a9a4
GM
11653#include <X11/Intrinsic.h>
11654#include <X11/Xaw3d/Simple.h>
11655int
11656main ()
11657{
11658
11659 ;
11660 return 0;
11661}
11662_ACEOF
11663if ac_fn_c_try_link "$LINENO"; then :
11664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XawScrollbarSetThumb in -lXaw3d" >&5
11665$as_echo_n "checking for XawScrollbarSetThumb in -lXaw3d... " >&6; }
11666if test "${ac_cv_lib_Xaw3d_XawScrollbarSetThumb+set}" = set; then :
11667 $as_echo_n "(cached) " >&6
11668else
11669 ac_check_lib_save_LIBS=$LIBS
11670LIBS="-lXaw3d $LIBS"
11671cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11672/* end confdefs.h. */
f527bd02 11673
5476a9a4
GM
11674/* Override any GCC internal prototype to avoid an error.
11675 Use char because int might match the return type of a GCC
11676 builtin and then its argument prototype would still apply. */
11677#ifdef __cplusplus
11678extern "C"
11679#endif
11680char XawScrollbarSetThumb ();
11681int
11682main ()
11683{
11684return XawScrollbarSetThumb ();
11685 ;
11686 return 0;
11687}
11688_ACEOF
11689if ac_fn_c_try_link "$LINENO"; then :
11690 ac_cv_lib_Xaw3d_XawScrollbarSetThumb=yes
f199cab1 11691else
5476a9a4 11692 ac_cv_lib_Xaw3d_XawScrollbarSetThumb=no
f199cab1 11693fi
5476a9a4
GM
11694rm -f core conftest.err conftest.$ac_objext \
11695 conftest$ac_exeext conftest.$ac_ext
11696LIBS=$ac_check_lib_save_LIBS
11697fi
11698{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&5
11699$as_echo "$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&6; }
11700if test "x$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" = x""yes; then :
11701 emacs_cv_xaw3d=yes
11702else
11703 emacs_cv_xaw3d=no
f199cab1 11704fi
f527bd02 11705
5476a9a4
GM
11706else
11707 emacs_cv_xaw3d=no
11708fi
11709rm -f core conftest.err conftest.$ac_objext \
11710 conftest$ac_exeext conftest.$ac_ext
11711fi
f527bd02 11712
5476a9a4
GM
11713 else
11714 emacs_cv_xaw3d=no
11715 fi
11716 if test $emacs_cv_xaw3d = yes; then
4fa92495
GM
11717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xaw3d" >&5
11718$as_echo_n "checking for xaw3d... " >&6; }
5476a9a4
GM
11719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5
11720$as_echo "yes; using Lucid toolkit" >&6; }
11721 USE_X_TOOLKIT=LUCID
11722 HAVE_XAW3D=yes
11723 LUCID_LIBW=-lXaw3d
f527bd02 11724
5476a9a4 11725$as_echo "#define HAVE_XAW3D 1" >>confdefs.h
f527bd02 11726
5476a9a4 11727 else
4fa92495
GM
11728 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xaw3d" >&5
11729$as_echo_n "checking for xaw3d... " >&6; }
5476a9a4
GM
11730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11731$as_echo "no" >&6; }
11732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libXaw" >&5
11733$as_echo_n "checking for libXaw... " >&6; }
11734 if test "${emacs_cv_xaw+set}" = set; then :
f199cab1
GM
11735 $as_echo_n "(cached) " >&6
11736else
11737 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11738/* end confdefs.h. */
067d23c9 11739
5476a9a4
GM
11740#include <X11/Intrinsic.h>
11741#include <X11/Xaw/Simple.h>
f199cab1
GM
11742int
11743main ()
11744{
067d23c9 11745
f199cab1
GM
11746 ;
11747 return 0;
11748}
11749_ACEOF
5476a9a4
GM
11750if ac_fn_c_try_link "$LINENO"; then :
11751 emacs_cv_xaw=yes
f199cab1 11752else
5476a9a4 11753 emacs_cv_xaw=no
f199cab1 11754fi
5476a9a4
GM
11755rm -f core conftest.err conftest.$ac_objext \
11756 conftest$ac_exeext conftest.$ac_ext
f199cab1 11757fi
067d23c9 11758
5476a9a4
GM
11759 if test $emacs_cv_xaw = yes; then
11760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5
11761$as_echo "yes; using Lucid toolkit" >&6; }
11762 USE_X_TOOLKIT=LUCID
11763 LUCID_LIBW=-lXaw
11764 elif test x"${USE_X_TOOLKIT}" = xLUCID; then
11765 as_fn_error "Lucid toolkit requires X11/Xaw include files" "$LINENO" 5
f199cab1 11766 else
5476a9a4
GM
11767 as_fn_error "No X toolkit could be found.
11768If you are sure you want Emacs compiled without an X toolkit, pass
11769 --with-x-toolkit=no
11770to configure. Otherwise, install the development libraries for the toolkit
11771that you want to use (e.g. Gtk+) and re-run configure." "$LINENO" 5
f199cab1 11772 fi
5476a9a4
GM
11773 fi
11774fi
067d23c9 11775
5476a9a4 11776X_TOOLKIT_TYPE=$USE_X_TOOLKIT
067d23c9 11777
5476a9a4
GM
11778LIBXTR6=
11779if test "${USE_X_TOOLKIT}" != "none"; then
11780 { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 toolkit version" >&5
11781$as_echo_n "checking X11 toolkit version... " >&6; }
11782 if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then :
f199cab1
GM
11783 $as_echo_n "(cached) " >&6
11784else
5476a9a4 11785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 11786/* end confdefs.h. */
5476a9a4 11787#include <X11/Intrinsic.h>
f199cab1
GM
11788int
11789main ()
11790{
5476a9a4
GM
11791#if XtSpecificationRelease < 6
11792fail;
11793#endif
f527bd02 11794
f199cab1
GM
11795 ;
11796 return 0;
11797}
067d23c9 11798_ACEOF
5476a9a4
GM
11799if ac_fn_c_try_link "$LINENO"; then :
11800 emacs_cv_x11_toolkit_version_6=yes
11801else
11802 emacs_cv_x11_toolkit_version_6=no
067d23c9 11803fi
5476a9a4
GM
11804rm -f core conftest.err conftest.$ac_objext \
11805 conftest$ac_exeext conftest.$ac_ext
067d23c9
KY
11806fi
11807
5476a9a4
GM
11808 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
11809 if test $emacs_cv_x11_toolkit_version_6 = yes; then
11810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5
11811$as_echo "6 or newer" >&6; }
f527bd02 11812
5476a9a4 11813$as_echo "#define HAVE_X11XTR6 1" >>confdefs.h
f527bd02 11814
5476a9a4
GM
11815 LIBXTR6="-lSM -lICE"
11816 case "$opsys" in
11817 ## Use libw.a along with X11R6 Xt.
11818 unixware) LIBXTR6="$LIBXTR6 -lw" ;;
11819 esac
11820 else
11821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5
11822$as_echo "before 6" >&6; }
f199cab1 11823 fi
f527bd02 11824
5476a9a4
GM
11825 OLDLIBS="$LIBS"
11826 if test x$HAVE_X11XTR6 = xyes; then
11827 LIBS="-lXt -lSM -lICE $LIBS"
11828 else
11829 LIBS="-lXt $LIBS"
11830 fi
11831 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XmuConvertStandardSelection in -lXmu" >&5
11832$as_echo_n "checking for XmuConvertStandardSelection in -lXmu... " >&6; }
11833if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then :
11834 $as_echo_n "(cached) " >&6
11835else
11836 ac_check_lib_save_LIBS=$LIBS
11837LIBS="-lXmu $LIBS"
11838cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11839/* end confdefs.h. */
f199cab1 11840
5476a9a4
GM
11841/* Override any GCC internal prototype to avoid an error.
11842 Use char because int might match the return type of a GCC
11843 builtin and then its argument prototype would still apply. */
11844#ifdef __cplusplus
11845extern "C"
11846#endif
11847char XmuConvertStandardSelection ();
067d23c9
KY
11848int
11849main ()
11850{
5476a9a4 11851return XmuConvertStandardSelection ();
067d23c9
KY
11852 ;
11853 return 0;
11854}
11855_ACEOF
5476a9a4
GM
11856if ac_fn_c_try_link "$LINENO"; then :
11857 ac_cv_lib_Xmu_XmuConvertStandardSelection=yes
11858else
11859 ac_cv_lib_Xmu_XmuConvertStandardSelection=no
067d23c9 11860fi
5476a9a4
GM
11861rm -f core conftest.err conftest.$ac_objext \
11862 conftest$ac_exeext conftest.$ac_ext
11863LIBS=$ac_check_lib_save_LIBS
067d23c9 11864fi
5476a9a4
GM
11865{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5
11866$as_echo "$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6; }
11867if test "x$ac_cv_lib_Xmu_XmuConvertStandardSelection" = x""yes; then :
11868 cat >>confdefs.h <<_ACEOF
11869#define HAVE_LIBXMU 1
f199cab1
GM
11870_ACEOF
11871
5476a9a4 11872 LIBS="-lXmu $LIBS"
f199cab1 11873
067d23c9
KY
11874fi
11875
5476a9a4
GM
11876 test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
11877 fi
067d23c9 11878
067d23c9 11879
5476a9a4
GM
11880LIBXMU=-lXmu
11881case $opsys in
11882 ## These systems don't supply Xmu.
11883 hpux* | aix4-2 )
11884 test "X$ac_cv_lib_Xmu_XmuConvertStandardSelection" != "Xyes" && LIBXMU=
11885 ;;
11886esac
067d23c9
KY
11887
11888
5476a9a4
GM
11889# On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
11890if test "${HAVE_X11}" = "yes"; then
11891 if test "${USE_X_TOOLKIT}" != "none"; then
11892 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XShapeQueryExtension in -lXext" >&5
11893$as_echo_n "checking for XShapeQueryExtension in -lXext... " >&6; }
11894if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then :
f199cab1
GM
11895 $as_echo_n "(cached) " >&6
11896else
5476a9a4
GM
11897 ac_check_lib_save_LIBS=$LIBS
11898LIBS="-lXext $LIBS"
11899cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 11900/* end confdefs.h. */
f199cab1 11901
5476a9a4
GM
11902/* Override any GCC internal prototype to avoid an error.
11903 Use char because int might match the return type of a GCC
11904 builtin and then its argument prototype would still apply. */
11905#ifdef __cplusplus
11906extern "C"
11907#endif
11908char XShapeQueryExtension ();
11909int
11910main ()
11911{
11912return XShapeQueryExtension ();
11913 ;
11914 return 0;
11915}
e7d4e61f 11916_ACEOF
5476a9a4
GM
11917if ac_fn_c_try_link "$LINENO"; then :
11918 ac_cv_lib_Xext_XShapeQueryExtension=yes
11919else
11920 ac_cv_lib_Xext_XShapeQueryExtension=no
067d23c9 11921fi
5476a9a4
GM
11922rm -f core conftest.err conftest.$ac_objext \
11923 conftest$ac_exeext conftest.$ac_ext
11924LIBS=$ac_check_lib_save_LIBS
11925fi
11926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
11927$as_echo "$ac_cv_lib_Xext_XShapeQueryExtension" >&6; }
11928if test "x$ac_cv_lib_Xext_XShapeQueryExtension" = x""yes; then :
11929 cat >>confdefs.h <<_ACEOF
11930#define HAVE_LIBXEXT 1
11931_ACEOF
f199cab1 11932
5476a9a4 11933 LIBS="-lXext $LIBS"
f199cab1 11934
5476a9a4 11935fi
f199cab1 11936
5476a9a4
GM
11937 fi
11938fi
f199cab1 11939
5476a9a4
GM
11940LIBXP=
11941if test "${USE_X_TOOLKIT}" = "MOTIF"; then
8ad96b1d
GM
11942 # OpenMotif may be installed in such a way on some GNU/Linux systems.
11943 if test -d /usr/include/openmotif; then
11944 CPPFLAGS="-I/usr/include/openmotif $CPPFLAGS"
11945 emacs_cv_openmotif=yes
11946 case "$canonical" in
11947 x86_64-*-linux-gnu* | powerpc64-*-linux-gnu* | sparc64-*-linux-gnu*)
11948 test -d /usr/lib64/openmotif && LDFLAGS="-L/usr/lib64/openmotif $LDFLAGS"
11949 ;;
11950 *)
11951 test -d /usr/lib/openmotif && LDFLAGS="-L/usr/lib/openmotif $LDFLAGS"
11952 esac
11953 else
11954 emacs_cv_openmotif=no
11955 fi
11956 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for (Open)Motif version 2.1" >&5
11957$as_echo_n "checking for (Open)Motif version 2.1... " >&6; }
5476a9a4 11958if test "${emacs_cv_motif_version_2_1+set}" = set; then :
ae1362a3
AS
11959 $as_echo_n "(cached) " >&6
11960else
f199cab1
GM
11961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11962/* end confdefs.h. */
5476a9a4
GM
11963#include <Xm/Xm.h>
11964int
11965main ()
11966{
11967#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
11968int x = 5;
11969#else
11970Motif version prior to 2.1.
11971#endif
11972 ;
11973 return 0;
11974}
11975_ACEOF
11976if ac_fn_c_try_compile "$LINENO"; then :
11977 emacs_cv_motif_version_2_1=yes
11978else
11979 emacs_cv_motif_version_2_1=no
11980fi
11981rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11982fi
11983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_motif_version_2_1" >&5
11984$as_echo "$emacs_cv_motif_version_2_1" >&6; }
11985 if test $emacs_cv_motif_version_2_1 = yes; then
11986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpCreateContext in -lXp" >&5
11987$as_echo_n "checking for XpCreateContext in -lXp... " >&6; }
11988if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then :
11989 $as_echo_n "(cached) " >&6
11990else
11991 ac_check_lib_save_LIBS=$LIBS
11992LIBS="-lXp $LIBS"
11993cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11994/* end confdefs.h. */
f199cab1 11995
5476a9a4
GM
11996/* Override any GCC internal prototype to avoid an error.
11997 Use char because int might match the return type of a GCC
11998 builtin and then its argument prototype would still apply. */
11999#ifdef __cplusplus
12000extern "C"
12001#endif
12002char XpCreateContext ();
ae1362a3
AS
12003int
12004main ()
12005{
5476a9a4 12006return XpCreateContext ();
ae1362a3
AS
12007 ;
12008 return 0;
12009}
12010_ACEOF
5476a9a4
GM
12011if ac_fn_c_try_link "$LINENO"; then :
12012 ac_cv_lib_Xp_XpCreateContext=yes
067d23c9 12013else
5476a9a4 12014 ac_cv_lib_Xp_XpCreateContext=no
067d23c9 12015fi
5476a9a4
GM
12016rm -f core conftest.err conftest.$ac_objext \
12017 conftest$ac_exeext conftest.$ac_ext
12018LIBS=$ac_check_lib_save_LIBS
12019fi
12020{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xp_XpCreateContext" >&5
12021$as_echo "$ac_cv_lib_Xp_XpCreateContext" >&6; }
12022if test "x$ac_cv_lib_Xp_XpCreateContext" = x""yes; then :
12023 LIBXP=-lXp
067d23c9 12024fi
f199cab1 12025
8ad96b1d
GM
12026 if test x$emacs_cv_openmotif = xyes; then
12027 REAL_CPPFLAGS="-I/usr/include/openmotif $REAL_CPPFLAGS"
12028 fi
5476a9a4
GM
12029 else
12030 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LessTif where some systems put it" >&5
12031$as_echo_n "checking for LessTif where some systems put it... " >&6; }
12032if test "${emacs_cv_lesstif+set}" = set; then :
067d23c9 12033 $as_echo_n "(cached) " >&6
f199cab1 12034else
5476a9a4
GM
12035 # We put this in CFLAGS temporarily to precede other -I options
12036 # that might be in CFLAGS temporarily.
12037 # We put this in CPPFLAGS where it precedes the other -I options.
12038 OLD_CPPFLAGS=$CPPFLAGS
12039 OLD_CFLAGS=$CFLAGS
12040 CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS"
12041 CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS"
12042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 12043/* end confdefs.h. */
5476a9a4 12044#include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h>
067d23c9
KY
12045int
12046main ()
12047{
5476a9a4 12048int x = 5;
067d23c9
KY
12049 ;
12050 return 0;
12051}
12052_ACEOF
5476a9a4
GM
12053if ac_fn_c_try_compile "$LINENO"; then :
12054 emacs_cv_lesstif=yes
067d23c9 12055else
5476a9a4 12056 emacs_cv_lesstif=no
067d23c9 12057fi
5476a9a4 12058rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
067d23c9 12059fi
5476a9a4
GM
12060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_lesstif" >&5
12061$as_echo "$emacs_cv_lesstif" >&6; }
12062 if test $emacs_cv_lesstif = yes; then
12063 # Make sure this -I option remains in CPPFLAGS after it is set
12064 # back to REAL_CPPFLAGS.
12065 # There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not
12066 # have those other -I options anyway. Ultimately, having this
12067 # directory ultimately in CPPFLAGS will be enough.
12068 REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS"
12069 LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS"
12070 else
12071 CFLAGS=$OLD_CFLAGS
12072 CPPFLAGS=$OLD_CPPFLAGS
12073 fi
12074 fi
12075 ac_fn_c_check_header_mongrel "$LINENO" "Xm/BulletinB.h" "ac_cv_header_Xm_BulletinB_h" "$ac_includes_default"
12076if test "x$ac_cv_header_Xm_BulletinB_h" = x""yes; then :
067d23c9 12077
5476a9a4
GM
12078else
12079 as_fn_error "Motif toolkit requested but requirements not found." "$LINENO" 5
067d23c9 12080fi
f199cab1
GM
12081
12082
5476a9a4 12083fi
f199cab1
GM
12084
12085
5476a9a4
GM
12086USE_TOOLKIT_SCROLL_BARS=no
12087if test "${with_toolkit_scroll_bars}" != "no"; then
12088 if test "${USE_X_TOOLKIT}" != "none"; then
12089 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
12090 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
f199cab1 12091
5476a9a4
GM
12092 HAVE_XAW3D=no
12093 USE_TOOLKIT_SCROLL_BARS=yes
12094 elif test "${HAVE_XAW3D}" = "yes" || test "${USE_X_TOOLKIT}" = "LUCID"; then
12095 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
f199cab1 12096
5476a9a4
GM
12097 USE_TOOLKIT_SCROLL_BARS=yes
12098 fi
12099 elif test "${HAVE_GTK}" = "yes"; then
12100 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
f199cab1 12101
5476a9a4
GM
12102 USE_TOOLKIT_SCROLL_BARS=yes
12103 elif test "${HAVE_NS}" = "yes"; then
12104 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
f199cab1 12105
5c0255d9
GM
12106 USE_TOOLKIT_SCROLL_BARS=yes
12107 elif test "${HAVE_W32}" = "yes"; then
12108 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
12109
5476a9a4
GM
12110 USE_TOOLKIT_SCROLL_BARS=yes
12111 fi
12112fi
f199cab1 12113
5476a9a4 12114cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 12115/* end confdefs.h. */
5476a9a4
GM
12116
12117 #include <X11/Xlib.h>
12118 #include <X11/Xresource.h>
067d23c9
KY
12119int
12120main ()
12121{
5476a9a4 12122XIMProc callback;
067d23c9
KY
12123 ;
12124 return 0;
12125}
12126_ACEOF
f199cab1 12127if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4
GM
12128 HAVE_XIM=yes
12129
12130$as_echo "#define HAVE_XIM 1" >>confdefs.h
12131
067d23c9 12132else
5476a9a4 12133 HAVE_XIM=no
067d23c9 12134fi
f199cab1 12135rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 12136
f199cab1 12137
5476a9a4
GM
12138if test "${with_xim}" != "no"; then
12139
12140$as_echo "#define USE_XIM 1" >>confdefs.h
12141
12142fi
12143
12144
12145if test "${HAVE_XIM}" != "no"; then
12146 late_CFLAGS=$CFLAGS
12147 if test "$GCC" = yes; then
12148 CFLAGS="$CFLAGS --pedantic-errors"
12149 fi
12150 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12151/* end confdefs.h. */
f199cab1 12152
5476a9a4
GM
12153#include <X11/Xlib.h>
12154#include <X11/Xresource.h>
12155int
12156main ()
12157{
12158Display *display;
12159XrmDatabase db;
12160char *res_name;
12161char *res_class;
12162XIMProc callback;
12163XPointer *client_data;
12164#ifndef __GNUC__
12165/* If we're not using GCC, it's probably not XFree86, and this is
12166 probably right, but we can't use something like --pedantic-errors. */
12167extern Bool XRegisterIMInstantiateCallback(Display*, XrmDatabase, char*,
12168 char*, XIMProc, XPointer*);
12169#endif
12170(void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, callback,
12171 client_data);
067d23c9
KY
12172 ;
12173 return 0;
12174}
12175_ACEOF
5476a9a4
GM
12176if ac_fn_c_try_compile "$LINENO"; then :
12177 emacs_cv_arg6_star=yes
067d23c9 12178fi
f199cab1 12179rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5476a9a4
GM
12180 if test "$emacs_cv_arg6_star" = yes; then
12181 $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer*" >>confdefs.h
12182
12183 else
12184 $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer" >>confdefs.h
067d23c9 12185
5476a9a4
GM
12186 fi
12187 CFLAGS=$late_CFLAGS
067d23c9
KY
12188fi
12189
5476a9a4
GM
12190### Start of font-backend (under any platform) section.
12191# (nothing here yet -- this is a placeholder)
12192### End of font-backend (under any platform) section.
067d23c9 12193
5476a9a4
GM
12194### Start of font-backend (under X11) section.
12195if test "${HAVE_X11}" = "yes"; then
067d23c9 12196
5476a9a4 12197 succeeded=no
067d23c9 12198
5476a9a4
GM
12199 if test "$PKG_CONFIG" = "no" ; then
12200 HAVE_FC=no
12201 else
12202 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 12203 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
12204 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fontconfig >= 2.2.0" >&5
12205$as_echo_n "checking for fontconfig >= 2.2.0... " >&6; }
f199cab1 12206
b5591ebb
GM
12207 if "$PKG_CONFIG" --exists "fontconfig >= 2.2.0" 2>&5 &&
12208 FONTCONFIG_CFLAGS=`"$PKG_CONFIG" --cflags "fontconfig >= 2.2.0" 2>&5` &&
12209 FONTCONFIG_LIBS=`"$PKG_CONFIG" --libs "fontconfig >= 2.2.0" 2>&5`; then
5476a9a4
GM
12210 edit_cflags="
12211 s,///*,/,g
12212 s/^/ /
12213 s/ -I/ $isystem/g
12214 s/^ //
12215 "
12216 FONTCONFIG_CFLAGS=`$as_echo "$FONTCONFIG_CFLAGS" | sed -e "$edit_cflags"`
12217 FONTCONFIG_LIBS=`$as_echo "$FONTCONFIG_LIBS" | sed -e 's,///*,/,g'`
12218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$FONTCONFIG_CFLAGS' LIBS='$FONTCONFIG_LIBS'" >&5
12219$as_echo "yes CFLAGS='$FONTCONFIG_CFLAGS' LIBS='$FONTCONFIG_LIBS'" >&6; }
12220 succeeded=yes
12221 else
12222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12223$as_echo "no" >&6; }
12224 FONTCONFIG_CFLAGS=""
12225 FONTCONFIG_LIBS=""
12226 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
12227 ## do set a variable so people can do so. Do it in a subshell
12228 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 12229 FONTCONFIG_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "fontconfig >= 2.2.0") 2>&1`
f199cab1 12230
5476a9a4 12231 fi
f199cab1
GM
12232
12233
12234
f199cab1 12235 else
5476a9a4
GM
12236 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12237 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12238 fi
12239 fi
f199cab1 12240
5476a9a4
GM
12241 if test $succeeded = yes; then
12242 HAVE_FC=yes
12243 else
12244 HAVE_FC=no
12245 fi
f199cab1 12246
067d23c9 12247
5476a9a4
GM
12248 ## Use -lXft if available, unless `--with-xft=no'.
12249 HAVE_XFT=maybe
12250 if test "${HAVE_FC}" = "no" || test "x${with_x}" = "xno"; then
12251 with_xft="no";
12252 fi
12253 if test "x${with_xft}" != "xno"; then
f199cab1 12254
f199cab1 12255
5476a9a4 12256 succeeded=no
f199cab1 12257
5476a9a4
GM
12258 if test "$PKG_CONFIG" = "no" ; then
12259 HAVE_XFT=no
12260 else
12261 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 12262 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
12263 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xft >= 0.13.0" >&5
12264$as_echo_n "checking for xft >= 0.13.0... " >&6; }
f199cab1 12265
b5591ebb
GM
12266 if "$PKG_CONFIG" --exists "xft >= 0.13.0" 2>&5 &&
12267 XFT_CFLAGS=`"$PKG_CONFIG" --cflags "xft >= 0.13.0" 2>&5` &&
12268 XFT_LIBS=`"$PKG_CONFIG" --libs "xft >= 0.13.0" 2>&5`; then
5476a9a4
GM
12269 edit_cflags="
12270 s,///*,/,g
12271 s/^/ /
12272 s/ -I/ $isystem/g
12273 s/^ //
12274 "
12275 XFT_CFLAGS=`$as_echo "$XFT_CFLAGS" | sed -e "$edit_cflags"`
12276 XFT_LIBS=`$as_echo "$XFT_LIBS" | sed -e 's,///*,/,g'`
12277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$XFT_CFLAGS' LIBS='$XFT_LIBS'" >&5
12278$as_echo "yes CFLAGS='$XFT_CFLAGS' LIBS='$XFT_LIBS'" >&6; }
12279 succeeded=yes
12280 else
12281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12282$as_echo "no" >&6; }
12283 XFT_CFLAGS=""
12284 XFT_LIBS=""
12285 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
12286 ## do set a variable so people can do so. Do it in a subshell
12287 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 12288 XFT_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "xft >= 0.13.0") 2>&1`
f199cab1 12289
5476a9a4 12290 fi
f199cab1
GM
12291
12292
12293
5476a9a4
GM
12294 else
12295 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12296 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12297 fi
12298 fi
f199cab1 12299
5476a9a4
GM
12300 if test $succeeded = yes; then
12301 :
f199cab1 12302 else
5476a9a4 12303 HAVE_XFT=no
f199cab1
GM
12304 fi
12305
5476a9a4
GM
12306 ## Because xftfont.c uses XRenderQueryExtension, we also
12307 ## need to link to -lXrender.
12308 HAVE_XRENDER=no
12309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRenderQueryExtension in -lXrender" >&5
12310$as_echo_n "checking for XRenderQueryExtension in -lXrender... " >&6; }
12311if test "${ac_cv_lib_Xrender_XRenderQueryExtension+set}" = set; then :
12312 $as_echo_n "(cached) " >&6
12313else
12314 ac_check_lib_save_LIBS=$LIBS
12315LIBS="-lXrender $LIBS"
12316cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12317/* end confdefs.h. */
f199cab1 12318
5476a9a4
GM
12319/* Override any GCC internal prototype to avoid an error.
12320 Use char because int might match the return type of a GCC
12321 builtin and then its argument prototype would still apply. */
12322#ifdef __cplusplus
12323extern "C"
12324#endif
12325char XRenderQueryExtension ();
12326int
12327main ()
12328{
12329return XRenderQueryExtension ();
12330 ;
12331 return 0;
12332}
12333_ACEOF
12334if ac_fn_c_try_link "$LINENO"; then :
12335 ac_cv_lib_Xrender_XRenderQueryExtension=yes
12336else
12337 ac_cv_lib_Xrender_XRenderQueryExtension=no
12338fi
12339rm -f core conftest.err conftest.$ac_objext \
12340 conftest$ac_exeext conftest.$ac_ext
12341LIBS=$ac_check_lib_save_LIBS
12342fi
12343{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrender_XRenderQueryExtension" >&5
12344$as_echo "$ac_cv_lib_Xrender_XRenderQueryExtension" >&6; }
12345if test "x$ac_cv_lib_Xrender_XRenderQueryExtension" = x""yes; then :
12346 HAVE_XRENDER=yes
12347fi
f199cab1 12348
5476a9a4
GM
12349 if test "$HAVE_XFT" != no && test "$HAVE_XRENDER" != no; then
12350 OLD_CPPFLAGS="$CPPFLAGS"
12351 OLD_CFLAGS="$CFLAGS"
12352 OLD_LIBS="$LIBS"
12353 CPPFLAGS="$CPPFLAGS $XFT_CFLAGS"
12354 CFLAGS="$CFLAGS $XFT_CFLAGS"
12355 XFT_LIBS="-lXrender $XFT_LIBS"
12356 LIBS="$XFT_LIBS $LIBS"
12357 ac_fn_c_check_header_mongrel "$LINENO" "X11/Xft/Xft.h" "ac_cv_header_X11_Xft_Xft_h" "$ac_includes_default"
12358if test "x$ac_cv_header_X11_Xft_Xft_h" = x""yes; then :
12359 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XftFontOpen in -lXft" >&5
12360$as_echo_n "checking for XftFontOpen in -lXft... " >&6; }
12361if test "${ac_cv_lib_Xft_XftFontOpen+set}" = set; then :
12362 $as_echo_n "(cached) " >&6
12363else
12364 ac_check_lib_save_LIBS=$LIBS
12365LIBS="-lXft $XFT_LIBS $LIBS"
12366cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12367/* end confdefs.h. */
f199cab1 12368
5476a9a4
GM
12369/* Override any GCC internal prototype to avoid an error.
12370 Use char because int might match the return type of a GCC
12371 builtin and then its argument prototype would still apply. */
12372#ifdef __cplusplus
12373extern "C"
12374#endif
12375char XftFontOpen ();
12376int
12377main ()
12378{
12379return XftFontOpen ();
12380 ;
12381 return 0;
12382}
067d23c9 12383_ACEOF
5476a9a4
GM
12384if ac_fn_c_try_link "$LINENO"; then :
12385 ac_cv_lib_Xft_XftFontOpen=yes
12386else
12387 ac_cv_lib_Xft_XftFontOpen=no
12388fi
12389rm -f core conftest.err conftest.$ac_objext \
12390 conftest$ac_exeext conftest.$ac_ext
12391LIBS=$ac_check_lib_save_LIBS
12392fi
12393{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xft_XftFontOpen" >&5
12394$as_echo "$ac_cv_lib_Xft_XftFontOpen" >&6; }
12395if test "x$ac_cv_lib_Xft_XftFontOpen" = x""yes; then :
12396 HAVE_XFT=yes
f199cab1
GM
12397fi
12398
5476a9a4 12399fi
f199cab1
GM
12400
12401
f199cab1 12402
5476a9a4 12403 if test "${HAVE_XFT}" = "yes"; then
f199cab1 12404
5476a9a4 12405$as_echo "#define HAVE_XFT 1" >>confdefs.h
f199cab1 12406
067d23c9 12407
5476a9a4
GM
12408 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $XFT_CFLAGS"
12409 else
12410 CPPFLAGS="$OLD_CPPFLAGS"
12411 CFLAGS="$OLD_CFLAGS"
12412 LIBS="$OLD_LIBS"
12413 fi # "${HAVE_XFT}" = "yes"
12414 fi # "$HAVE_XFT" != no
12415 fi # "x${with_xft}" != "xno"
f199cab1 12416
5476a9a4
GM
12417 ## We used to allow building with FreeType and without Xft.
12418 ## However, the ftx font backend driver is not in good shape.
12419 if test "$HAVE_XFT" != "yes"; then
12420 HAVE_XFT=no
12421 HAVE_FREETYPE=no
12422 else
f199cab1 12423
5476a9a4 12424 succeeded=no
f199cab1 12425
5476a9a4
GM
12426 if test "$PKG_CONFIG" = "no" ; then
12427 HAVE_FREETYPE=no
12428 else
12429 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 12430 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
12431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype2" >&5
12432$as_echo_n "checking for freetype2... " >&6; }
f199cab1 12433
b5591ebb
GM
12434 if "$PKG_CONFIG" --exists "freetype2" 2>&5 &&
12435 FREETYPE_CFLAGS=`"$PKG_CONFIG" --cflags "freetype2" 2>&5` &&
12436 FREETYPE_LIBS=`"$PKG_CONFIG" --libs "freetype2" 2>&5`; then
5476a9a4
GM
12437 edit_cflags="
12438 s,///*,/,g
12439 s/^/ /
12440 s/ -I/ $isystem/g
12441 s/^ //
12442 "
12443 FREETYPE_CFLAGS=`$as_echo "$FREETYPE_CFLAGS" | sed -e "$edit_cflags"`
12444 FREETYPE_LIBS=`$as_echo "$FREETYPE_LIBS" | sed -e 's,///*,/,g'`
12445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$FREETYPE_CFLAGS' LIBS='$FREETYPE_LIBS'" >&5
12446$as_echo "yes CFLAGS='$FREETYPE_CFLAGS' LIBS='$FREETYPE_LIBS'" >&6; }
12447 succeeded=yes
12448 else
12449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12450$as_echo "no" >&6; }
12451 FREETYPE_CFLAGS=""
12452 FREETYPE_LIBS=""
12453 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
12454 ## do set a variable so people can do so. Do it in a subshell
12455 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 12456 FREETYPE_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "freetype2") 2>&1`
f199cab1 12457
5476a9a4 12458 fi
f199cab1 12459
f199cab1 12460
067d23c9 12461
5476a9a4
GM
12462 else
12463 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12464 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12465 fi
067d23c9 12466 fi
f199cab1 12467
5476a9a4
GM
12468 if test $succeeded = yes; then
12469 HAVE_FREETYPE=yes
12470 else
12471 HAVE_FREETYPE=no
12472 fi
f199cab1 12473
f199cab1 12474
5476a9a4
GM
12475 test "$HAVE_FREETYPE" = "no" && as_fn_error "libxft requires libfreetype" "$LINENO" 5
12476 fi
f199cab1 12477
5476a9a4
GM
12478 HAVE_LIBOTF=no
12479 if test "${HAVE_FREETYPE}" = "yes"; then
f199cab1 12480
5476a9a4 12481$as_echo "#define HAVE_FREETYPE 1" >>confdefs.h
f199cab1 12482
5476a9a4 12483 if test "${with_libotf}" != "no"; then
f199cab1 12484
5476a9a4 12485 succeeded=no
f199cab1 12486
5476a9a4
GM
12487 if test "$PKG_CONFIG" = "no" ; then
12488 HAVE_LIBOTF=no
12489 else
12490 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 12491 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
12492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libotf" >&5
12493$as_echo_n "checking for libotf... " >&6; }
f199cab1 12494
b5591ebb
GM
12495 if "$PKG_CONFIG" --exists "libotf" 2>&5 &&
12496 LIBOTF_CFLAGS=`"$PKG_CONFIG" --cflags "libotf" 2>&5` &&
12497 LIBOTF_LIBS=`"$PKG_CONFIG" --libs "libotf" 2>&5`; then
5476a9a4
GM
12498 edit_cflags="
12499 s,///*,/,g
12500 s/^/ /
12501 s/ -I/ $isystem/g
12502 s/^ //
12503 "
12504 LIBOTF_CFLAGS=`$as_echo "$LIBOTF_CFLAGS" | sed -e "$edit_cflags"`
12505 LIBOTF_LIBS=`$as_echo "$LIBOTF_LIBS" | sed -e 's,///*,/,g'`
12506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBOTF_CFLAGS' LIBS='$LIBOTF_LIBS'" >&5
12507$as_echo "yes CFLAGS='$LIBOTF_CFLAGS' LIBS='$LIBOTF_LIBS'" >&6; }
12508 succeeded=yes
12509 else
12510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12511$as_echo "no" >&6; }
12512 LIBOTF_CFLAGS=""
12513 LIBOTF_LIBS=""
12514 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
12515 ## do set a variable so people can do so. Do it in a subshell
12516 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 12517 LIBOTF_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "libotf") 2>&1`
067d23c9 12518
5476a9a4 12519 fi
f199cab1
GM
12520
12521
067d23c9 12522
5476a9a4
GM
12523 else
12524 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12525 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12526 fi
12527 fi
f199cab1 12528
5476a9a4
GM
12529 if test $succeeded = yes; then
12530 HAVE_LIBOTF=yes
12531 else
12532 HAVE_LIBOTF=no
12533 fi
f199cab1 12534
5476a9a4 12535 if test "$HAVE_LIBOTF" = "yes"; then
f199cab1 12536
5476a9a4 12537$as_echo "#define HAVE_LIBOTF 1" >>confdefs.h
f199cab1 12538
5476a9a4
GM
12539 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTF_get_variation_glyphs in -lotf" >&5
12540$as_echo_n "checking for OTF_get_variation_glyphs in -lotf... " >&6; }
12541if test "${ac_cv_lib_otf_OTF_get_variation_glyphs+set}" = set; then :
067d23c9
KY
12542 $as_echo_n "(cached) " >&6
12543else
5476a9a4
GM
12544 ac_check_lib_save_LIBS=$LIBS
12545LIBS="-lotf $LIBS"
12546cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 12547/* end confdefs.h. */
5476a9a4
GM
12548
12549/* Override any GCC internal prototype to avoid an error.
12550 Use char because int might match the return type of a GCC
12551 builtin and then its argument prototype would still apply. */
12552#ifdef __cplusplus
12553extern "C"
12554#endif
12555char OTF_get_variation_glyphs ();
067d23c9
KY
12556int
12557main ()
12558{
5476a9a4 12559return OTF_get_variation_glyphs ();
067d23c9
KY
12560 ;
12561 return 0;
12562}
12563_ACEOF
5476a9a4
GM
12564if ac_fn_c_try_link "$LINENO"; then :
12565 ac_cv_lib_otf_OTF_get_variation_glyphs=yes
067d23c9 12566else
5476a9a4 12567 ac_cv_lib_otf_OTF_get_variation_glyphs=no
067d23c9 12568fi
5476a9a4
GM
12569rm -f core conftest.err conftest.$ac_objext \
12570 conftest$ac_exeext conftest.$ac_ext
12571LIBS=$ac_check_lib_save_LIBS
12572fi
12573{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_otf_OTF_get_variation_glyphs" >&5
12574$as_echo "$ac_cv_lib_otf_OTF_get_variation_glyphs" >&6; }
12575if test "x$ac_cv_lib_otf_OTF_get_variation_glyphs" = x""yes; then :
12576 HAVE_OTF_GET_VARIATION_GLYPHS=yes
12577else
12578 HAVE_OTF_GET_VARIATION_GLYPHS=no
067d23c9 12579fi
067d23c9 12580
5476a9a4
GM
12581 if test "${HAVE_OTF_GET_VARIATION_GLYPHS}" = "yes"; then
12582
12583$as_echo "#define HAVE_OTF_GET_VARIATION_GLYPHS 1" >>confdefs.h
12584
12585 fi
12586 fi
12587 fi
12588 fi
12589
12590 HAVE_M17N_FLT=no
12591 if test "${HAVE_LIBOTF}" = yes; then
12592 if test "${with_m17n_flt}" != "no"; then
12593
12594 succeeded=no
12595
12596 if test "$PKG_CONFIG" = "no" ; then
12597 HAVE_M17N_FLT=no
12598 else
12599 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 12600 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
12601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for m17n-flt" >&5
12602$as_echo_n "checking for m17n-flt... " >&6; }
12603
b5591ebb
GM
12604 if "$PKG_CONFIG" --exists "m17n-flt" 2>&5 &&
12605 M17N_FLT_CFLAGS=`"$PKG_CONFIG" --cflags "m17n-flt" 2>&5` &&
12606 M17N_FLT_LIBS=`"$PKG_CONFIG" --libs "m17n-flt" 2>&5`; then
5476a9a4
GM
12607 edit_cflags="
12608 s,///*,/,g
12609 s/^/ /
12610 s/ -I/ $isystem/g
12611 s/^ //
12612 "
12613 M17N_FLT_CFLAGS=`$as_echo "$M17N_FLT_CFLAGS" | sed -e "$edit_cflags"`
12614 M17N_FLT_LIBS=`$as_echo "$M17N_FLT_LIBS" | sed -e 's,///*,/,g'`
12615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$M17N_FLT_CFLAGS' LIBS='$M17N_FLT_LIBS'" >&5
12616$as_echo "yes CFLAGS='$M17N_FLT_CFLAGS' LIBS='$M17N_FLT_LIBS'" >&6; }
12617 succeeded=yes
12618 else
12619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12620$as_echo "no" >&6; }
12621 M17N_FLT_CFLAGS=""
12622 M17N_FLT_LIBS=""
12623 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
12624 ## do set a variable so people can do so. Do it in a subshell
12625 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 12626 M17N_FLT_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "m17n-flt") 2>&1`
5476a9a4
GM
12627
12628 fi
12629
12630
067d23c9 12631
5476a9a4
GM
12632 else
12633 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12634 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12635 fi
f199cab1 12636 fi
067d23c9 12637
5476a9a4
GM
12638 if test $succeeded = yes; then
12639 HAVE_M17N_FLT=yes
12640 else
12641 HAVE_M17N_FLT=no
12642 fi
12643
12644 if test "$HAVE_M17N_FLT" = "yes"; then
12645
12646$as_echo "#define HAVE_M17N_FLT 1" >>confdefs.h
12647
12648 fi
12649 fi
12650 fi
12651else
12652 HAVE_XFT=no
12653 HAVE_FREETYPE=no
12654 HAVE_LIBOTF=no
12655 HAVE_M17N_FLT=no
12656fi
12657
12658### End of font-backend (under X11) section.
12659
12660
067d23c9 12661
067d23c9 12662
5476a9a4
GM
12663
12664
12665
12666
12667
12668
12669### Use -lXpm if available, unless `--with-xpm=no'.
12670HAVE_XPM=no
12671LIBXPM=
5c0255d9
GM
12672
12673if test "${HAVE_W32}" = "yes"; then
12674 if test "${with_xpm}" != "no"; then
12675 SAVE_CPPFLAGS="$CPPFLAGS"
12676 SAVE_LDFLAGS="$LDFLAGS"
12677 CPPFLAGS="$CPPFLAGS -I/usr/include/noX"
12678 LDFLAGS="$LDFLAGS -L/usr/lib/noX"
12679 ac_fn_c_check_header_mongrel "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "$ac_includes_default"
12680if test "x$ac_cv_header_X11_xpm_h" = x""yes; then :
12681 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReadFileToImage in -lXpm" >&5
12682$as_echo_n "checking for XpmReadFileToImage in -lXpm... " >&6; }
12683if test "${ac_cv_lib_Xpm_XpmReadFileToImage+set}" = set; then :
12684 $as_echo_n "(cached) " >&6
12685else
12686 ac_check_lib_save_LIBS=$LIBS
12687LIBS="-lXpm $LIBS"
12688cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12689/* end confdefs.h. */
12690
12691/* Override any GCC internal prototype to avoid an error.
12692 Use char because int might match the return type of a GCC
12693 builtin and then its argument prototype would still apply. */
12694#ifdef __cplusplus
12695extern "C"
12696#endif
12697char XpmReadFileToImage ();
12698int
12699main ()
12700{
12701return XpmReadFileToImage ();
12702 ;
12703 return 0;
12704}
12705_ACEOF
12706if ac_fn_c_try_link "$LINENO"; then :
12707 ac_cv_lib_Xpm_XpmReadFileToImage=yes
12708else
12709 ac_cv_lib_Xpm_XpmReadFileToImage=no
12710fi
12711rm -f core conftest.err conftest.$ac_objext \
12712 conftest$ac_exeext conftest.$ac_ext
12713LIBS=$ac_check_lib_save_LIBS
12714fi
12715{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmReadFileToImage" >&5
12716$as_echo "$ac_cv_lib_Xpm_XpmReadFileToImage" >&6; }
12717if test "x$ac_cv_lib_Xpm_XpmReadFileToImage" = x""yes; then :
12718 HAVE_XPM=yes
12719fi
12720
12721fi
12722
12723
12724 if test "${HAVE_XPM}" = "yes"; then
12725 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReturnAllocPixels preprocessor define" >&5
12726$as_echo_n "checking for XpmReturnAllocPixels preprocessor define... " >&6; }
12727 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12728/* end confdefs.h. */
12729#include "X11/xpm.h"
12730#ifndef XpmReturnAllocPixels
12731no_return_alloc_pixels
12732#endif
12733
12734_ACEOF
12735if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12736 $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then :
12737 HAVE_XPM=no
12738else
12739 HAVE_XPM=yes
12740fi
12741rm -f conftest*
12742
12743
12744 if test "${HAVE_XPM}" = "yes"; then
12745 REAL_CPPFLAGS="$REAL_CPPFLAGS -I/usr/include/noX"
12746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12747$as_echo "yes" >&6; }
12748 else
12749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12750$as_echo "no" >&6; }
12751 CPPFLAGS="$SAVE_CPPFLAGS"
12752 LDFLAGS="$SAVE_LDFLAGS"
12753 fi
12754 fi
12755 fi
12756
12757 if test "${HAVE_XPM}" = "yes"; then
12758
12759$as_echo "#define HAVE_XPM 1" >>confdefs.h
12760
12761 LIBXPM=-lXpm
12762 fi
12763fi
12764
5476a9a4
GM
12765if test "${HAVE_X11}" = "yes"; then
12766 if test "${with_xpm}" != "no"; then
12767 ac_fn_c_check_header_mongrel "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "$ac_includes_default"
12768if test "x$ac_cv_header_X11_xpm_h" = x""yes; then :
12769 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReadFileToPixmap in -lXpm" >&5
12770$as_echo_n "checking for XpmReadFileToPixmap in -lXpm... " >&6; }
12771if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then :
f199cab1
GM
12772 $as_echo_n "(cached) " >&6
12773else
5476a9a4
GM
12774 ac_check_lib_save_LIBS=$LIBS
12775LIBS="-lXpm -lX11 $LIBS"
12776cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
12777/* end confdefs.h. */
12778
5476a9a4
GM
12779/* Override any GCC internal prototype to avoid an error.
12780 Use char because int might match the return type of a GCC
12781 builtin and then its argument prototype would still apply. */
12782#ifdef __cplusplus
12783extern "C"
12784#endif
12785char XpmReadFileToPixmap ();
067d23c9
KY
12786int
12787main ()
12788{
5476a9a4 12789return XpmReadFileToPixmap ();
067d23c9
KY
12790 ;
12791 return 0;
12792}
12793_ACEOF
5476a9a4
GM
12794if ac_fn_c_try_link "$LINENO"; then :
12795 ac_cv_lib_Xpm_XpmReadFileToPixmap=yes
067d23c9 12796else
5476a9a4 12797 ac_cv_lib_Xpm_XpmReadFileToPixmap=no
067d23c9 12798fi
5476a9a4
GM
12799rm -f core conftest.err conftest.$ac_objext \
12800 conftest$ac_exeext conftest.$ac_ext
12801LIBS=$ac_check_lib_save_LIBS
12802fi
12803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5
12804$as_echo "$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6; }
12805if test "x$ac_cv_lib_Xpm_XpmReadFileToPixmap" = x""yes; then :
12806 HAVE_XPM=yes
f199cab1 12807fi
067d23c9
KY
12808
12809fi
12810
12811
5476a9a4
GM
12812 if test "${HAVE_XPM}" = "yes"; then
12813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReturnAllocPixels preprocessor define" >&5
12814$as_echo_n "checking for XpmReturnAllocPixels preprocessor define... " >&6; }
12815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12816/* end confdefs.h. */
12817#include "X11/xpm.h"
12818#ifndef XpmReturnAllocPixels
12819no_return_alloc_pixels
12820#endif
067d23c9 12821
067d23c9 12822_ACEOF
5476a9a4
GM
12823if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12824 $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then :
12825 HAVE_XPM=no
12826else
12827 HAVE_XPM=yes
12828fi
12829rm -f conftest*
067d23c9 12830
067d23c9 12831
5476a9a4
GM
12832 if test "${HAVE_XPM}" = "yes"; then
12833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12834$as_echo "yes" >&6; }
12835 else
12836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12837$as_echo "no" >&6; }
12838 fi
12839 fi
12840 fi
067d23c9 12841
5476a9a4 12842 if test "${HAVE_XPM}" = "yes"; then
067d23c9 12843
5476a9a4 12844$as_echo "#define HAVE_XPM 1" >>confdefs.h
067d23c9 12845
5476a9a4
GM
12846 LIBXPM=-lXpm
12847 fi
067d23c9
KY
12848fi
12849
f199cab1 12850
5c0255d9 12851
5476a9a4
GM
12852### Use -ljpeg if available, unless `--with-jpeg=no'.
12853HAVE_JPEG=no
12854LIBJPEG=
5c0255d9 12855if test "${HAVE_X11}" = "yes" || test "${HAVE_W32}" = "yes"; then
5476a9a4
GM
12856 if test "${with_jpeg}" != "no"; then
12857 ac_fn_c_check_header_mongrel "$LINENO" "jerror.h" "ac_cv_header_jerror_h" "$ac_includes_default"
12858if test "x$ac_cv_header_jerror_h" = x""yes; then :
12859 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_destroy_compress in -ljpeg" >&5
12860$as_echo_n "checking for jpeg_destroy_compress in -ljpeg... " >&6; }
12861if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then :
067d23c9
KY
12862 $as_echo_n "(cached) " >&6
12863else
5476a9a4
GM
12864 ac_check_lib_save_LIBS=$LIBS
12865LIBS="-ljpeg $LIBS"
12866cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 12867/* end confdefs.h. */
f199cab1 12868
5476a9a4
GM
12869/* Override any GCC internal prototype to avoid an error.
12870 Use char because int might match the return type of a GCC
12871 builtin and then its argument prototype would still apply. */
12872#ifdef __cplusplus
12873extern "C"
12874#endif
12875char jpeg_destroy_compress ();
067d23c9
KY
12876int
12877main ()
12878{
5476a9a4 12879return jpeg_destroy_compress ();
067d23c9
KY
12880 ;
12881 return 0;
12882}
12883_ACEOF
12884if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 12885 ac_cv_lib_jpeg_jpeg_destroy_compress=yes
067d23c9 12886else
5476a9a4 12887 ac_cv_lib_jpeg_jpeg_destroy_compress=no
067d23c9
KY
12888fi
12889rm -f core conftest.err conftest.$ac_objext \
12890 conftest$ac_exeext conftest.$ac_ext
5476a9a4
GM
12891LIBS=$ac_check_lib_save_LIBS
12892fi
12893{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5
12894$as_echo "$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6; }
12895if test "x$ac_cv_lib_jpeg_jpeg_destroy_compress" = x""yes; then :
12896 HAVE_JPEG=yes
12897fi
12898
067d23c9 12899fi
f199cab1 12900
f199cab1
GM
12901
12902 fi
067d23c9 12903
5476a9a4
GM
12904 if test "${HAVE_JPEG}" = "yes"; then
12905 $as_echo "#define HAVE_JPEG 1" >>confdefs.h
f199cab1 12906
5476a9a4
GM
12907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12908/* end confdefs.h. */
12909#include <jpeglib.h>
12910 version=JPEG_LIB_VERSION
f199cab1 12911
5476a9a4
GM
12912_ACEOF
12913if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12914 $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then :
12915 $as_echo "#define HAVE_JPEG 1" >>confdefs.h
f199cab1 12916
5476a9a4
GM
12917else
12918 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libjpeg found, but not version 6b or later" >&5
12919$as_echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;}
12920 HAVE_JPEG=no
067d23c9 12921fi
5476a9a4 12922rm -f conftest*
067d23c9 12923
5476a9a4
GM
12924 fi
12925 if test "${HAVE_JPEG}" = "yes"; then
12926 LIBJPEG=-ljpeg
12927 fi
12928fi
067d23c9
KY
12929
12930
5476a9a4
GM
12931### Use -lpng if available, unless `--with-png=no'.
12932HAVE_PNG=no
12933LIBPNG=
5c0255d9 12934if test "${HAVE_X11}" = "yes" || test "${HAVE_W32}" = "yes"; then
5476a9a4
GM
12935 if test "${with_png}" != "no"; then
12936 # Debian unstable as of July 2003 has multiple libpngs, and puts png.h
12937 # in /usr/include/libpng.
12938 for ac_header in png.h libpng/png.h
12939do :
12940 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12941ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12942eval as_val=\$$as_ac_Header
12943 if test "x$as_val" = x""yes; then :
12944 cat >>confdefs.h <<_ACEOF
12945#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12946_ACEOF
12947 break
12948fi
067d23c9 12949
5476a9a4 12950done
067d23c9 12951
5476a9a4
GM
12952 if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then
12953 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_get_channels in -lpng" >&5
12954$as_echo_n "checking for png_get_channels in -lpng... " >&6; }
12955if test "${ac_cv_lib_png_png_get_channels+set}" = set; then :
12956 $as_echo_n "(cached) " >&6
12957else
12958 ac_check_lib_save_LIBS=$LIBS
12959LIBS="-lpng -lz -lm $LIBS"
12960cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12961/* end confdefs.h. */
067d23c9 12962
5476a9a4
GM
12963/* Override any GCC internal prototype to avoid an error.
12964 Use char because int might match the return type of a GCC
12965 builtin and then its argument prototype would still apply. */
12966#ifdef __cplusplus
12967extern "C"
12968#endif
12969char png_get_channels ();
12970int
12971main ()
12972{
12973return png_get_channels ();
12974 ;
12975 return 0;
12976}
12977_ACEOF
12978if ac_fn_c_try_link "$LINENO"; then :
12979 ac_cv_lib_png_png_get_channels=yes
f199cab1 12980else
5476a9a4
GM
12981 ac_cv_lib_png_png_get_channels=no
12982fi
12983rm -f core conftest.err conftest.$ac_objext \
12984 conftest$ac_exeext conftest.$ac_ext
12985LIBS=$ac_check_lib_save_LIBS
12986fi
12987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_png_png_get_channels" >&5
12988$as_echo "$ac_cv_lib_png_png_get_channels" >&6; }
12989if test "x$ac_cv_lib_png_png_get_channels" = x""yes; then :
12990 HAVE_PNG=yes
f199cab1 12991fi
067d23c9 12992
5476a9a4
GM
12993 fi
12994 fi
7834125e 12995
5476a9a4
GM
12996 if test "${HAVE_PNG}" = "yes"; then
12997
12998$as_echo "#define HAVE_PNG 1" >>confdefs.h
12999
13000 LIBPNG="-lpng -lz -lm"
13001
13002 ac_fn_c_check_decl "$LINENO" "png_longjmp" "ac_cv_have_decl_png_longjmp" "#ifdef HAVE_LIBPNG_PNG_H
13003 # include <libpng/png.h>
13004 #else
13005 # include <png.h>
13006 #endif
13007
13008"
13009if test "x$ac_cv_have_decl_png_longjmp" = x""yes; then :
13010
13011else
7834125e 13012
5476a9a4 13013$as_echo "#define PNG_DEPSTRUCT /**/" >>confdefs.h
7834125e 13014
f199cab1 13015fi
7834125e 13016
5476a9a4
GM
13017 fi
13018fi
7834125e
GM
13019
13020
5476a9a4
GM
13021### Use -ltiff if available, unless `--with-tiff=no'.
13022HAVE_TIFF=no
13023LIBTIFF=
5c0255d9 13024if test "${HAVE_X11}" = "yes" || test "${HAVE_W32}" = "yes"; then
5476a9a4
GM
13025 if test "${with_tiff}" != "no"; then
13026 ac_fn_c_check_header_mongrel "$LINENO" "tiffio.h" "ac_cv_header_tiffio_h" "$ac_includes_default"
13027if test "x$ac_cv_header_tiffio_h" = x""yes; then :
13028 tifflibs="-lz -lm"
13029 # At least one tiff package requires the jpeg library.
13030 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
13031 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIFFGetVersion in -ltiff" >&5
13032$as_echo_n "checking for TIFFGetVersion in -ltiff... " >&6; }
13033if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then :
f199cab1
GM
13034 $as_echo_n "(cached) " >&6
13035else
5476a9a4
GM
13036 ac_check_lib_save_LIBS=$LIBS
13037LIBS="-ltiff $tifflibs $LIBS"
13038cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 13039/* end confdefs.h. */
067d23c9 13040
5476a9a4
GM
13041/* Override any GCC internal prototype to avoid an error.
13042 Use char because int might match the return type of a GCC
13043 builtin and then its argument prototype would still apply. */
13044#ifdef __cplusplus
13045extern "C"
f199cab1 13046#endif
5476a9a4
GM
13047char TIFFGetVersion ();
13048int
13049main ()
13050{
13051return TIFFGetVersion ();
13052 ;
13053 return 0;
13054}
f199cab1 13055_ACEOF
5476a9a4
GM
13056if ac_fn_c_try_link "$LINENO"; then :
13057 ac_cv_lib_tiff_TIFFGetVersion=yes
f199cab1 13058else
5476a9a4 13059 ac_cv_lib_tiff_TIFFGetVersion=no
f199cab1 13060fi
5476a9a4
GM
13061rm -f core conftest.err conftest.$ac_objext \
13062 conftest$ac_exeext conftest.$ac_ext
13063LIBS=$ac_check_lib_save_LIBS
f199cab1 13064fi
5476a9a4
GM
13065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5
13066$as_echo "$ac_cv_lib_tiff_TIFFGetVersion" >&6; }
13067if test "x$ac_cv_lib_tiff_TIFFGetVersion" = x""yes; then :
13068 HAVE_TIFF=yes
f199cab1 13069fi
067d23c9 13070
5476a9a4 13071fi
067d23c9 13072
067d23c9 13073
5476a9a4 13074 fi
f199cab1 13075
5476a9a4 13076 if test "${HAVE_TIFF}" = "yes"; then
067d23c9 13077
5476a9a4 13078$as_echo "#define HAVE_TIFF 1" >>confdefs.h
067d23c9 13079
5476a9a4
GM
13080 LIBTIFF=-ltiff
13081 fi
f199cab1 13082fi
067d23c9 13083
067d23c9 13084
5476a9a4
GM
13085### Use -lgif or -lungif if available, unless `--with-gif=no'.
13086HAVE_GIF=no
13087LIBGIF=
5c0255d9
GM
13088if test "${HAVE_X11}" = "yes" && test "${with_gif}" != "no" \
13089 || test "${HAVE_W32}" = "yes"; then
5476a9a4
GM
13090 ac_fn_c_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
13091if test "x$ac_cv_header_gif_lib_h" = x""yes; then :
13092 # EGifPutExtensionLast only exists from version libungif-4.1.0b1.
13093# Earlier versions can crash Emacs.
13094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lgif" >&5
13095$as_echo_n "checking for EGifPutExtensionLast in -lgif... " >&6; }
13096if test "${ac_cv_lib_gif_EGifPutExtensionLast+set}" = set; then :
f199cab1
GM
13097 $as_echo_n "(cached) " >&6
13098else
5476a9a4
GM
13099 ac_check_lib_save_LIBS=$LIBS
13100LIBS="-lgif $LIBS"
13101cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 13102/* end confdefs.h. */
067d23c9 13103
5476a9a4
GM
13104/* Override any GCC internal prototype to avoid an error.
13105 Use char because int might match the return type of a GCC
13106 builtin and then its argument prototype would still apply. */
13107#ifdef __cplusplus
13108extern "C"
13109#endif
13110char EGifPutExtensionLast ();
f199cab1
GM
13111int
13112main ()
13113{
5476a9a4 13114return EGifPutExtensionLast ();
f199cab1
GM
13115 ;
13116 return 0;
13117}
13118_ACEOF
5476a9a4
GM
13119if ac_fn_c_try_link "$LINENO"; then :
13120 ac_cv_lib_gif_EGifPutExtensionLast=yes
f199cab1 13121else
5476a9a4 13122 ac_cv_lib_gif_EGifPutExtensionLast=no
f199cab1 13123fi
5476a9a4
GM
13124rm -f core conftest.err conftest.$ac_objext \
13125 conftest$ac_exeext conftest.$ac_ext
13126LIBS=$ac_check_lib_save_LIBS
13127fi
13128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_EGifPutExtensionLast" >&5
13129$as_echo "$ac_cv_lib_gif_EGifPutExtensionLast" >&6; }
13130if test "x$ac_cv_lib_gif_EGifPutExtensionLast" = x""yes; then :
13131 HAVE_GIF=yes
13132else
13133 HAVE_GIF=maybe
f199cab1 13134fi
067d23c9 13135
5476a9a4
GM
13136fi
13137
13138
13139
13140 if test "$HAVE_GIF" = yes; then
13141 LIBGIF=-lgif
13142 elif test "$HAVE_GIF" = maybe; then
13143# If gif_lib.h but no libgif, try libungif.
13144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lungif" >&5
13145$as_echo_n "checking for EGifPutExtensionLast in -lungif... " >&6; }
13146if test "${ac_cv_lib_ungif_EGifPutExtensionLast+set}" = set; then :
f199cab1
GM
13147 $as_echo_n "(cached) " >&6
13148else
5476a9a4
GM
13149 ac_check_lib_save_LIBS=$LIBS
13150LIBS="-lungif $LIBS"
13151cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 13152/* end confdefs.h. */
f199cab1 13153
5476a9a4
GM
13154/* Override any GCC internal prototype to avoid an error.
13155 Use char because int might match the return type of a GCC
13156 builtin and then its argument prototype would still apply. */
13157#ifdef __cplusplus
13158extern "C"
13159#endif
13160char EGifPutExtensionLast ();
f199cab1
GM
13161int
13162main ()
13163{
5476a9a4 13164return EGifPutExtensionLast ();
f199cab1
GM
13165 ;
13166 return 0;
13167}
13168_ACEOF
5476a9a4
GM
13169if ac_fn_c_try_link "$LINENO"; then :
13170 ac_cv_lib_ungif_EGifPutExtensionLast=yes
f199cab1 13171else
5476a9a4 13172 ac_cv_lib_ungif_EGifPutExtensionLast=no
f199cab1 13173fi
5476a9a4
GM
13174rm -f core conftest.err conftest.$ac_objext \
13175 conftest$ac_exeext conftest.$ac_ext
13176LIBS=$ac_check_lib_save_LIBS
f199cab1 13177fi
5476a9a4
GM
13178{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5
13179$as_echo "$ac_cv_lib_ungif_EGifPutExtensionLast" >&6; }
13180if test "x$ac_cv_lib_ungif_EGifPutExtensionLast" = x""yes; then :
13181 HAVE_GIF=yes
13182else
13183 HAVE_GIF=no
13184fi
13185
13186 test "$HAVE_GIF" = yes && LIBGIF=-lungif
13187 fi
13188
13189 if test "${HAVE_GIF}" = "yes"; then
13190
13191$as_echo "#define HAVE_GIF 1" >>confdefs.h
13192
13193 fi
13194fi
13195
13196
13197if test "${HAVE_X11}" = "yes"; then
13198 MISSING=""
13199 WITH_NO=""
13200 test "${with_xpm}" != "no" && test "${HAVE_XPM}" != "yes" &&
13201 MISSING="libXpm" && WITH_NO="--with-xpm=no"
13202 test "${with_jpeg}" != "no" && test "${HAVE_JPEG}" != "yes" &&
13203 MISSING="$MISSING libjpeg" && WITH_NO="$WITH_NO --with-jpeg=no"
13204 test "${with_png}" != "no" && test "${HAVE_PNG}" != "yes" &&
13205 MISSING="$MISSING libpng" && WITH_NO="$WITH_NO --with-png=no"
13206 test "${with_gif}" != "no" && test "${HAVE_GIF}" != "yes" &&
13207 MISSING="$MISSING libgif/libungif" && WITH_NO="$WITH_NO --with-gif=no"
13208 test "${with_tiff}" != "no" && test "${HAVE_TIFF}" != "yes" &&
13209 MISSING="$MISSING libtiff" && WITH_NO="$WITH_NO --with-tiff=no"
13210
13211 if test "X${MISSING}" != X; then
13212 as_fn_error "The following required libraries were not found:
13213 $MISSING
13214Maybe some development libraries/packages are missing?
13215If you don't want to link with them give
13216 $WITH_NO
13217as options to configure" "$LINENO" 5
13218 fi
13219fi
13220
13221### Use -lgpm if available, unless `--with-gpm=no'.
13222HAVE_GPM=no
13223LIBGPM=
13224if test "${with_gpm}" != "no"; then
13225 ac_fn_c_check_header_mongrel "$LINENO" "gpm.h" "ac_cv_header_gpm_h" "$ac_includes_default"
13226if test "x$ac_cv_header_gpm_h" = x""yes; then :
13227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Gpm_Open in -lgpm" >&5
13228$as_echo_n "checking for Gpm_Open in -lgpm... " >&6; }
13229if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then :
067d23c9
KY
13230 $as_echo_n "(cached) " >&6
13231else
5476a9a4
GM
13232 ac_check_lib_save_LIBS=$LIBS
13233LIBS="-lgpm $LIBS"
13234cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
13235/* end confdefs.h. */
13236
5476a9a4
GM
13237/* Override any GCC internal prototype to avoid an error.
13238 Use char because int might match the return type of a GCC
13239 builtin and then its argument prototype would still apply. */
13240#ifdef __cplusplus
13241extern "C"
13242#endif
13243char Gpm_Open ();
067d23c9
KY
13244int
13245main ()
13246{
5476a9a4 13247return Gpm_Open ();
067d23c9
KY
13248 ;
13249 return 0;
13250}
13251_ACEOF
5476a9a4
GM
13252if ac_fn_c_try_link "$LINENO"; then :
13253 ac_cv_lib_gpm_Gpm_Open=yes
067d23c9 13254else
5476a9a4 13255 ac_cv_lib_gpm_Gpm_Open=no
067d23c9 13256fi
5476a9a4
GM
13257rm -f core conftest.err conftest.$ac_objext \
13258 conftest$ac_exeext conftest.$ac_ext
13259LIBS=$ac_check_lib_save_LIBS
13260fi
13261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gpm_Gpm_Open" >&5
13262$as_echo "$ac_cv_lib_gpm_Gpm_Open" >&6; }
13263if test "x$ac_cv_lib_gpm_Gpm_Open" = x""yes; then :
13264 HAVE_GPM=yes
067d23c9 13265fi
f199cab1 13266
5476a9a4 13267fi
f199cab1 13268
f199cab1 13269
f199cab1 13270
5476a9a4 13271 if test "${HAVE_GPM}" = "yes"; then
f199cab1 13272
5476a9a4 13273$as_echo "#define HAVE_GPM 1" >>confdefs.h
f199cab1 13274
5476a9a4
GM
13275 LIBGPM=-lgpm
13276 fi
067d23c9 13277fi
067d23c9
KY
13278
13279
13280
13281
13282
13283
5476a9a4
GM
13284GNUSTEP_CFLAGS=
13285### Use NeXTstep API to implement GUI.
13286if test "${HAVE_NS}" = "yes"; then
067d23c9 13287
5476a9a4 13288$as_echo "#define HAVE_NS 1" >>confdefs.h
067d23c9 13289
5476a9a4 13290 if test "${NS_IMPL_COCOA}" = "yes"; then
067d23c9 13291
5476a9a4 13292$as_echo "#define NS_IMPL_COCOA 1" >>confdefs.h
f199cab1 13293
5476a9a4
GM
13294 fi
13295 if test "${NS_IMPL_GNUSTEP}" = "yes"; then
f199cab1 13296
5476a9a4 13297$as_echo "#define NS_IMPL_GNUSTEP 1" >>confdefs.h
f199cab1 13298
5476a9a4
GM
13299 # See also .m.o rule in Makefile.in */
13300 # FIXME: are all these flags really needed? Document here why. */
13301 GNUSTEP_CFLAGS="-D_REENTRANT -fPIC -fno-strict-aliasing -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
13302 ## Extra CFLAGS applied to src/*.m files.
13303 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"
13304 fi
13305 # We also have mouse menus.
13306 HAVE_MENUS=yes
13307 OTHER_FILES=ns-app
13308fi
f199cab1 13309
5c0255d9
GM
13310if test "${HAVE_W32}" = "yes"; then
13311 HAVE_MENUS=yes
13312fi
f199cab1 13313
5476a9a4
GM
13314### Use session management (-lSM -lICE) if available
13315HAVE_X_SM=no
13316LIBXSM=
13317if test "${HAVE_X11}" = "yes"; then
13318 ac_fn_c_check_header_mongrel "$LINENO" "X11/SM/SMlib.h" "ac_cv_header_X11_SM_SMlib_h" "$ac_includes_default"
13319if test "x$ac_cv_header_X11_SM_SMlib_h" = x""yes; then :
13320 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SmcOpenConnection in -lSM" >&5
13321$as_echo_n "checking for SmcOpenConnection in -lSM... " >&6; }
13322if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then :
067d23c9
KY
13323 $as_echo_n "(cached) " >&6
13324else
5476a9a4
GM
13325 ac_check_lib_save_LIBS=$LIBS
13326LIBS="-lSM -lICE $LIBS"
13327cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
13328/* end confdefs.h. */
13329
5476a9a4
GM
13330/* Override any GCC internal prototype to avoid an error.
13331 Use char because int might match the return type of a GCC
13332 builtin and then its argument prototype would still apply. */
13333#ifdef __cplusplus
13334extern "C"
13335#endif
13336char SmcOpenConnection ();
f199cab1
GM
13337int
13338main ()
13339{
5476a9a4
GM
13340return SmcOpenConnection ();
13341 ;
13342 return 0;
f199cab1 13343}
067d23c9 13344_ACEOF
5476a9a4
GM
13345if ac_fn_c_try_link "$LINENO"; then :
13346 ac_cv_lib_SM_SmcOpenConnection=yes
067d23c9 13347else
5476a9a4 13348 ac_cv_lib_SM_SmcOpenConnection=no
f199cab1 13349fi
5476a9a4
GM
13350rm -f core conftest.err conftest.$ac_objext \
13351 conftest$ac_exeext conftest.$ac_ext
13352LIBS=$ac_check_lib_save_LIBS
13353fi
13354{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_SM_SmcOpenConnection" >&5
13355$as_echo "$ac_cv_lib_SM_SmcOpenConnection" >&6; }
13356if test "x$ac_cv_lib_SM_SmcOpenConnection" = x""yes; then :
13357 HAVE_X_SM=yes
067d23c9 13358fi
067d23c9 13359
f199cab1 13360fi
f199cab1 13361
f199cab1 13362
067d23c9 13363
5476a9a4
GM
13364 if test "${HAVE_X_SM}" = "yes"; then
13365
13366$as_echo "#define HAVE_X_SM 1" >>confdefs.h
13367
13368 LIBXSM="-lSM -lICE"
13369 case "$LIBS" in
13370 *-lSM*) ;;
13371 *) LIBS="$LIBXSM $LIBS" ;;
13372 esac
067d23c9 13373 fi
5476a9a4 13374fi
067d23c9 13375
067d23c9 13376
5476a9a4
GM
13377### Use libxml (-lxml2) if available
13378HAVE_LIBXML2=no
13379if test "${with_xml2}" != "no"; then
13380 ### I'm not sure what the version number should be, so I just guessed.
067d23c9 13381
5476a9a4 13382 succeeded=no
067d23c9 13383
5476a9a4
GM
13384 if test "$PKG_CONFIG" = "no" ; then
13385 HAVE_LIBXML2=no
13386 else
13387 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 13388 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
13389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxml-2.0 > 2.6.17" >&5
13390$as_echo_n "checking for libxml-2.0 > 2.6.17... " >&6; }
067d23c9 13391
b5591ebb
GM
13392 if "$PKG_CONFIG" --exists "libxml-2.0 > 2.6.17" 2>&5 &&
13393 LIBXML2_CFLAGS=`"$PKG_CONFIG" --cflags "libxml-2.0 > 2.6.17" 2>&5` &&
13394 LIBXML2_LIBS=`"$PKG_CONFIG" --libs "libxml-2.0 > 2.6.17" 2>&5`; then
5476a9a4
GM
13395 edit_cflags="
13396 s,///*,/,g
13397 s/^/ /
13398 s/ -I/ $isystem/g
13399 s/^ //
13400 "
13401 LIBXML2_CFLAGS=`$as_echo "$LIBXML2_CFLAGS" | sed -e "$edit_cflags"`
13402 LIBXML2_LIBS=`$as_echo "$LIBXML2_LIBS" | sed -e 's,///*,/,g'`
13403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBXML2_CFLAGS' LIBS='$LIBXML2_LIBS'" >&5
13404$as_echo "yes CFLAGS='$LIBXML2_CFLAGS' LIBS='$LIBXML2_LIBS'" >&6; }
13405 succeeded=yes
13406 else
13407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13408$as_echo "no" >&6; }
13409 LIBXML2_CFLAGS=""
13410 LIBXML2_LIBS=""
13411 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
13412 ## do set a variable so people can do so. Do it in a subshell
13413 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 13414 LIBXML2_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "libxml-2.0 > 2.6.17") 2>&1`
5476a9a4
GM
13415
13416 fi
13417
13418
13419
13420 else
13421 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
13422 echo "*** See http://www.freedesktop.org/software/pkgconfig"
13423 fi
13424 fi
13425
13426 if test $succeeded = yes; then
13427 HAVE_LIBXML2=yes
13428 else
13429 HAVE_LIBXML2=no
13430 fi
13431
13432 if test "${HAVE_LIBXML2}" = "yes"; then
13433 LIBS="$LIBXML2_LIBS $LIBS"
13434 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for htmlReadMemory in -lxml2" >&5
13435$as_echo_n "checking for htmlReadMemory in -lxml2... " >&6; }
13436if test "${ac_cv_lib_xml2_htmlReadMemory+set}" = set; then :
067d23c9
KY
13437 $as_echo_n "(cached) " >&6
13438else
5476a9a4
GM
13439 ac_check_lib_save_LIBS=$LIBS
13440LIBS="-lxml2 $LIBS"
13441cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
13442/* end confdefs.h. */
13443
5476a9a4
GM
13444/* Override any GCC internal prototype to avoid an error.
13445 Use char because int might match the return type of a GCC
13446 builtin and then its argument prototype would still apply. */
13447#ifdef __cplusplus
13448extern "C"
13449#endif
13450char htmlReadMemory ();
067d23c9
KY
13451int
13452main ()
13453{
5476a9a4 13454return htmlReadMemory ();
067d23c9
KY
13455 ;
13456 return 0;
13457}
13458_ACEOF
5476a9a4
GM
13459if ac_fn_c_try_link "$LINENO"; then :
13460 ac_cv_lib_xml2_htmlReadMemory=yes
067d23c9 13461else
5476a9a4 13462 ac_cv_lib_xml2_htmlReadMemory=no
067d23c9 13463fi
5476a9a4
GM
13464rm -f core conftest.err conftest.$ac_objext \
13465 conftest$ac_exeext conftest.$ac_ext
13466LIBS=$ac_check_lib_save_LIBS
13467fi
13468{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_htmlReadMemory" >&5
13469$as_echo "$ac_cv_lib_xml2_htmlReadMemory" >&6; }
13470if test "x$ac_cv_lib_xml2_htmlReadMemory" = x""yes; then :
13471 HAVE_LIBXML2=yes
13472else
13473 HAVE_LIBXML2=no
067d23c9
KY
13474fi
13475
5476a9a4 13476 if test "${HAVE_LIBXML2}" = "yes"; then
067d23c9 13477
5476a9a4 13478$as_echo "#define HAVE_LIBXML2 1" >>confdefs.h
067d23c9 13479
5476a9a4
GM
13480 else
13481 LIBXML2_LIBS=""
13482 LIBXML2_CFLAGS=""
13483 fi
067d23c9 13484 fi
5476a9a4 13485fi
067d23c9 13486
067d23c9 13487
067d23c9 13488
5476a9a4
GM
13489# If netdb.h doesn't declare h_errno, we must declare it by hand.
13490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether netdb declares h_errno" >&5
13491$as_echo_n "checking whether netdb declares h_errno... " >&6; }
13492if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then :
13493 $as_echo_n "(cached) " >&6
067d23c9 13494else
5476a9a4
GM
13495 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13496/* end confdefs.h. */
13497#include <netdb.h>
13498int
13499main ()
13500{
13501return h_errno;
13502 ;
13503 return 0;
13504}
13505_ACEOF
13506if ac_fn_c_try_link "$LINENO"; then :
13507 emacs_cv_netdb_declares_h_errno=yes
13508else
13509 emacs_cv_netdb_declares_h_errno=no
067d23c9 13510fi
5476a9a4
GM
13511rm -f core conftest.err conftest.$ac_objext \
13512 conftest$ac_exeext conftest.$ac_ext
13513fi
13514{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_netdb_declares_h_errno" >&5
13515$as_echo "$emacs_cv_netdb_declares_h_errno" >&6; }
13516if test $emacs_cv_netdb_declares_h_errno = yes; then
067d23c9 13517
5476a9a4 13518$as_echo "#define HAVE_H_ERRNO 1" >>confdefs.h
f199cab1 13519
5476a9a4 13520fi
f199cab1 13521
2c98a625
GM
13522# sqrt and other floating-point functions such as fmod and frexp
13523# are found in -lm on most systems.
5476a9a4
GM
13524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5
13525$as_echo_n "checking for sqrt in -lm... " >&6; }
13526if test "${ac_cv_lib_m_sqrt+set}" = set; then :
13527 $as_echo_n "(cached) " >&6
13528else
13529 ac_check_lib_save_LIBS=$LIBS
13530LIBS="-lm $LIBS"
13531cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13532/* end confdefs.h. */
f199cab1 13533
5476a9a4
GM
13534/* Override any GCC internal prototype to avoid an error.
13535 Use char because int might match the return type of a GCC
13536 builtin and then its argument prototype would still apply. */
13537#ifdef __cplusplus
13538extern "C"
13539#endif
13540char sqrt ();
13541int
13542main ()
13543{
13544return sqrt ();
13545 ;
13546 return 0;
13547}
13548_ACEOF
13549if ac_fn_c_try_link "$LINENO"; then :
13550 ac_cv_lib_m_sqrt=yes
13551else
13552 ac_cv_lib_m_sqrt=no
13553fi
13554rm -f core conftest.err conftest.$ac_objext \
13555 conftest$ac_exeext conftest.$ac_ext
13556LIBS=$ac_check_lib_save_LIBS
13557fi
13558{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sqrt" >&5
13559$as_echo "$ac_cv_lib_m_sqrt" >&6; }
13560if test "x$ac_cv_lib_m_sqrt" = x""yes; then :
13561 cat >>confdefs.h <<_ACEOF
13562#define HAVE_LIBM 1
13563_ACEOF
f199cab1 13564
5476a9a4 13565 LIBS="-lm $LIBS"
f199cab1 13566
5476a9a4 13567fi
f199cab1 13568
f199cab1 13569
5476a9a4
GM
13570# Check for mail-locking functions in a "mail" library. Probably this should
13571# have the same check as for liblockfile below.
13572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -lmail" >&5
13573$as_echo_n "checking for maillock in -lmail... " >&6; }
13574if test "${ac_cv_lib_mail_maillock+set}" = set; then :
067d23c9
KY
13575 $as_echo_n "(cached) " >&6
13576else
5476a9a4
GM
13577 ac_check_lib_save_LIBS=$LIBS
13578LIBS="-lmail $LIBS"
13579cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
13580/* end confdefs.h. */
13581
5476a9a4
GM
13582/* Override any GCC internal prototype to avoid an error.
13583 Use char because int might match the return type of a GCC
13584 builtin and then its argument prototype would still apply. */
13585#ifdef __cplusplus
13586extern "C"
067d23c9 13587#endif
5476a9a4
GM
13588char maillock ();
13589int
13590main ()
13591{
13592return maillock ();
13593 ;
13594 return 0;
13595}
067d23c9 13596_ACEOF
5476a9a4
GM
13597if ac_fn_c_try_link "$LINENO"; then :
13598 ac_cv_lib_mail_maillock=yes
067d23c9 13599else
5476a9a4 13600 ac_cv_lib_mail_maillock=no
067d23c9 13601fi
5476a9a4
GM
13602rm -f core conftest.err conftest.$ac_objext \
13603 conftest$ac_exeext conftest.$ac_ext
13604LIBS=$ac_check_lib_save_LIBS
067d23c9 13605fi
5476a9a4
GM
13606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mail_maillock" >&5
13607$as_echo "$ac_cv_lib_mail_maillock" >&6; }
13608if test "x$ac_cv_lib_mail_maillock" = x""yes; then :
13609 have_mail=yes
f199cab1 13610else
5476a9a4 13611 have_mail=no
067d23c9
KY
13612fi
13613
5476a9a4
GM
13614if test $have_mail = yes; then
13615 LIBS_MAIL=-lmail
13616 LIBS="$LIBS_MAIL $LIBS"
067d23c9 13617
5476a9a4 13618$as_echo "#define HAVE_LIBMAIL 1" >>confdefs.h
067d23c9 13619
5476a9a4
GM
13620else
13621 LIBS_MAIL=
13622fi
13623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -llockfile" >&5
13624$as_echo_n "checking for maillock in -llockfile... " >&6; }
13625if test "${ac_cv_lib_lockfile_maillock+set}" = set; then :
067d23c9
KY
13626 $as_echo_n "(cached) " >&6
13627else
5476a9a4
GM
13628 ac_check_lib_save_LIBS=$LIBS
13629LIBS="-llockfile $LIBS"
067d23c9
KY
13630cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13631/* end confdefs.h. */
13632
13633/* Override any GCC internal prototype to avoid an error.
13634 Use char because int might match the return type of a GCC
13635 builtin and then its argument prototype would still apply. */
13636#ifdef __cplusplus
13637extern "C"
13638#endif
5476a9a4 13639char maillock ();
067d23c9
KY
13640int
13641main ()
13642{
5476a9a4 13643return maillock ();
067d23c9
KY
13644 ;
13645 return 0;
13646}
13647_ACEOF
5476a9a4
GM
13648if ac_fn_c_try_link "$LINENO"; then :
13649 ac_cv_lib_lockfile_maillock=yes
13650else
13651 ac_cv_lib_lockfile_maillock=no
067d23c9
KY
13652fi
13653rm -f core conftest.err conftest.$ac_objext \
5476a9a4
GM
13654 conftest$ac_exeext conftest.$ac_ext
13655LIBS=$ac_check_lib_save_LIBS
067d23c9 13656fi
5476a9a4
GM
13657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lockfile_maillock" >&5
13658$as_echo "$ac_cv_lib_lockfile_maillock" >&6; }
13659if test "x$ac_cv_lib_lockfile_maillock" = x""yes; then :
13660 have_lockfile=yes
067d23c9 13661else
5476a9a4 13662 have_lockfile=no
f199cab1
GM
13663fi
13664
5476a9a4
GM
13665if test $have_lockfile = yes; then
13666 LIBS_MAIL=-llockfile
13667 LIBS="$LIBS_MAIL $LIBS"
067d23c9 13668
5476a9a4 13669$as_echo "#define HAVE_LIBLOCKFILE 1" >>confdefs.h
067d23c9 13670
5476a9a4
GM
13671else
13672# If we have the shared liblockfile, assume we must use it for mail
13673# locking (e.g. Debian). If we couldn't link against liblockfile
13674# (no liblockfile.a installed), ensure that we don't need to.
13675 # Extract the first word of "liblockfile.so", so it can be a program name with args.
13676set dummy liblockfile.so; ac_word=$2
13677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13678$as_echo_n "checking for $ac_word... " >&6; }
13679if test "${ac_cv_prog_liblockfile+set}" = set; then :
13680 $as_echo_n "(cached) " >&6
13681else
13682 if test -n "$liblockfile"; then
13683 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
13684else
13685as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13686as_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
13687for as_dir in $as_dummy
13688do
13689 IFS=$as_save_IFS
13690 test -z "$as_dir" && as_dir=.
13691 for ac_exec_ext in '' $ac_executable_extensions; do
13692 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
13693 ac_cv_prog_liblockfile="yes"
13694 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13695 break 2
13696 fi
13697done
13698 done
13699IFS=$as_save_IFS
067d23c9 13700
5476a9a4
GM
13701 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
13702fi
13703fi
13704liblockfile=$ac_cv_prog_liblockfile
13705if test -n "$liblockfile"; then
13706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $liblockfile" >&5
13707$as_echo "$liblockfile" >&6; }
13708else
13709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13710$as_echo "no" >&6; }
13711fi
067d23c9 13712
067d23c9 13713
5476a9a4
GM
13714 if test $ac_cv_prog_liblockfile = yes; then
13715 as_fn_error "Shared liblockfile found but can't link against it.
13716This probably means that movemail could lose mail.
13717There may be a \`development' package to install containing liblockfile." "$LINENO" 5
13718 fi
13719fi
067d23c9 13720
067d23c9 13721
067d23c9 13722
067d23c9
KY
13723
13724
5476a9a4
GM
13725## Define MAIL_USE_FLOCK (or LOCKF) if the mailer uses flock (or lockf) to
13726## interlock access to the mail spool. The alternative is a lock file named
13727## /usr/spool/mail/$USER.lock.
13728mail_lock=no
13729case "$opsys" in
13730 aix4-2) mail_lock="lockf" ;;
067d23c9 13731
5476a9a4 13732 gnu|freebsd|netbsd|openbsd|darwin|irix6-5) mail_lock="flock" ;;
067d23c9 13733
5476a9a4
GM
13734 ## On GNU/Linux systems, both methods are used by various mail programs.
13735 ## I assume most people are using newer mailers that have heard of flock.
13736 ## Change this if you need to.
13737 ## Debian contains a patch which says: ``On Debian/GNU/Linux systems,
13738 ## configure gets the right answers, and that means *NOT* using flock.
13739 ## Using flock is guaranteed to be the wrong thing. See Debian Policy
13740 ## for details.'' and then uses `#ifdef DEBIAN'. Unfortunately the
13741 ## Debian maintainer hasn't provided a clean fix for Emacs.
13742 ## movemail.c will use `maillock' when MAILDIR, HAVE_LIBMAIL and
13743 ## HAVE_MAILLOCK_H are defined, so the following appears to be the
13744 ## correct logic. -- fx
13745 ## We must check for HAVE_LIBLOCKFILE too, as movemail does.
13746 ## liblockfile is a Free Software replacement for libmail, used on
13747 ## Debian systems and elsewhere. -rfr.
13748 gnu-*)
13749 mail_lock="flock"
13750 if test $have_mail = yes || test $have_lockfile = yes; then
13751 test $ac_cv_header_maillock_h = yes && mail_lock=no
13752 fi
13753 ;;
13754esac
f199cab1 13755
5476a9a4
GM
13756BLESSMAIL_TARGET=
13757case "$mail_lock" in
13758 flock)
13759$as_echo "#define MAIL_USE_FLOCK 1" >>confdefs.h
13760 ;;
f199cab1 13761
5476a9a4
GM
13762 lockf)
13763$as_echo "#define MAIL_USE_LOCKF 1" >>confdefs.h
13764 ;;
f199cab1 13765
5476a9a4
GM
13766 *) BLESSMAIL_TARGET="need-blessmail" ;;
13767esac
f199cab1
GM
13768
13769
13770
5476a9a4 13771for ac_func in gethostname \
e7d0e5ee 13772getrusage get_current_dir_name \
eda33f78 13773lrand48 \
a455a5ce 13774select getpagesize setlocale \
aa8715fb 13775utimes getrlimit setrlimit shutdown getaddrinfo \
eda33f78 13776strsignal setitimer \
5476a9a4
GM
13777sendto recvfrom getsockname getpeername getifaddrs freeifaddrs \
13778gai_strerror mkstemp getline getdelim fsync sync \
13779difftime posix_memalign \
13780getpwent endpwent getgrent endgrent \
13781touchlock \
13782cfmakeraw cfsetspeed copysign __executable_start
13783do :
13784 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13785ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13786eval as_val=\$$as_ac_var
13787 if test "x$as_val" = x""yes; then :
13788 cat >>confdefs.h <<_ACEOF
13789#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13790_ACEOF
f199cab1 13791
5476a9a4
GM
13792fi
13793done
f199cab1
GM
13794
13795
5476a9a4
GM
13796## Eric Backus <ericb@lsid.hp.com> says, HP-UX 9.x on HP 700 machines
13797## has a broken `rint' in some library versions including math library
13798## version number A.09.05.
13799## You can fix the math library by installing patch number PHSS_4630.
13800## But we can fix it more reliably for Emacs by just not using rint.
8ad96b1d 13801## We also skip HAVE_RANDOM - see comments in src/conf_post.h.
5476a9a4
GM
13802case $opsys in
13803 hpux*) : ;;
13804 *) for ac_func in random rint
13805do :
13806 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13807ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13808eval as_val=\$$as_ac_var
13809 if test "x$as_val" = x""yes; then :
13810 cat >>confdefs.h <<_ACEOF
13811#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13812_ACEOF
f199cab1 13813
5476a9a4
GM
13814fi
13815done
13816 ;;
13817esac
f199cab1 13818
5476a9a4
GM
13819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unwind_init" >&5
13820$as_echo_n "checking for __builtin_unwind_init... " >&6; }
13821if test "${emacs_cv_func___builtin_unwind_init+set}" = set; then :
067d23c9 13822 $as_echo_n "(cached) " >&6
f199cab1
GM
13823else
13824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
13825/* end confdefs.h. */
13826
067d23c9
KY
13827int
13828main ()
13829{
5476a9a4 13830__builtin_unwind_init ();
067d23c9
KY
13831 ;
13832 return 0;
13833}
13834_ACEOF
5476a9a4
GM
13835if ac_fn_c_try_link "$LINENO"; then :
13836 emacs_cv_func___builtin_unwind_init=yes
067d23c9 13837else
5476a9a4 13838 emacs_cv_func___builtin_unwind_init=no
067d23c9 13839fi
5476a9a4
GM
13840rm -f core conftest.err conftest.$ac_objext \
13841 conftest$ac_exeext conftest.$ac_ext
067d23c9 13842fi
5476a9a4
GM
13843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_func___builtin_unwind_init" >&5
13844$as_echo "$emacs_cv_func___builtin_unwind_init" >&6; }
13845if test $emacs_cv_func___builtin_unwind_init = yes; then
067d23c9 13846
5476a9a4 13847$as_echo "#define HAVE___BUILTIN_UNWIND_INIT 1" >>confdefs.h
f199cab1 13848
067d23c9 13849fi
067d23c9 13850
f199cab1
GM
13851
13852
13853
13854
5476a9a4
GM
13855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
13856$as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
13857if test "${ac_cv_sys_largefile_source+set}" = set; then :
13858 $as_echo_n "(cached) " >&6
13859else
13860 while :; do
13861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13862/* end confdefs.h. */
13863#include <sys/types.h> /* for off_t */
13864 #include <stdio.h>
13865int
13866main ()
13867{
13868int (*fp) (FILE *, off_t, int) = fseeko;
13869 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
13870 ;
13871 return 0;
13872}
13873_ACEOF
13874if ac_fn_c_try_link "$LINENO"; then :
13875 ac_cv_sys_largefile_source=no; break
067d23c9 13876fi
5476a9a4
GM
13877rm -f core conftest.err conftest.$ac_objext \
13878 conftest$ac_exeext conftest.$ac_ext
13879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13880/* end confdefs.h. */
13881#define _LARGEFILE_SOURCE 1
13882#include <sys/types.h> /* for off_t */
13883 #include <stdio.h>
13884int
13885main ()
13886{
13887int (*fp) (FILE *, off_t, int) = fseeko;
13888 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
13889 ;
13890 return 0;
13891}
13892_ACEOF
13893if ac_fn_c_try_link "$LINENO"; then :
13894 ac_cv_sys_largefile_source=1; break
13895fi
13896rm -f core conftest.err conftest.$ac_objext \
13897 conftest$ac_exeext conftest.$ac_ext
13898 ac_cv_sys_largefile_source=unknown
13899 break
13900done
13901fi
13902{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
13903$as_echo "$ac_cv_sys_largefile_source" >&6; }
13904case $ac_cv_sys_largefile_source in #(
13905 no | unknown) ;;
13906 *)
13907cat >>confdefs.h <<_ACEOF
13908#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
13909_ACEOF
13910;;
13911esac
13912rm -rf conftest*
067d23c9 13913
5476a9a4
GM
13914# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
13915# in glibc 2.1.3, but that breaks too many other things.
13916# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
13917if test $ac_cv_sys_largefile_source != unknown; then
067d23c9 13918
5476a9a4 13919$as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
067d23c9 13920
5476a9a4 13921fi
067d23c9
KY
13922
13923
5476a9a4
GM
13924# UNIX98 PTYs.
13925for ac_func in grantpt
13926do :
13927 ac_fn_c_check_func "$LINENO" "grantpt" "ac_cv_func_grantpt"
13928if test "x$ac_cv_func_grantpt" = x""yes; then :
13929 cat >>confdefs.h <<_ACEOF
13930#define HAVE_GRANTPT 1
13931_ACEOF
f199cab1 13932
5476a9a4
GM
13933fi
13934done
f199cab1 13935
f199cab1 13936
5476a9a4 13937# PTY-related GNU extensions.
1146da8d 13938for ac_func in getpt posix_openpt
5476a9a4 13939do :
1146da8d
GM
13940 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13941ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13942eval as_val=\$$as_ac_var
13943 if test "x$as_val" = x""yes; then :
5476a9a4 13944 cat >>confdefs.h <<_ACEOF
1146da8d 13945#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
5476a9a4 13946_ACEOF
f199cab1 13947
5476a9a4
GM
13948fi
13949done
f199cab1 13950
f199cab1 13951
5476a9a4
GM
13952# Check this now, so that we will NOT find the above functions in ncurses.
13953# That is because we have not set up to link ncurses in lib-src.
13954# It's better to believe a function is not available
13955# than to expect to find it in ncurses.
13956# Also we need tputs and friends to be able to build at all.
13957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tputs" >&5
13958$as_echo_n "checking for library containing tputs... " >&6; }
13959# Run a test program that contains a call to tputs, a call that is
13960# never executed. This tests whether a pre-'main' dynamic linker
13961# works with the library. It's too much trouble to actually call
13962# tputs in the test program, due to portability hassles. When
13963# cross-compiling, assume the test program will run if it links.
f199cab1 13964
5476a9a4
GM
13965# Maybe curses should be tried earlier?
13966# See http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9736#35
13967for tputs_library in '' tinfo ncurses terminfo termcap curses; do
13968 OLIBS=$LIBS
13969 if test -z "$tputs_library"; then
13970 LIBS_TERMCAP=
13971 msg='none required'
13972 else
13973 LIBS_TERMCAP=-l$tputs_library
13974 msg=$LIBS_TERMCAP
13975 LIBS="$LIBS_TERMCAP $LIBS"
13976 fi
13977 if test "$cross_compiling" = yes; then :
13978 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
13979/* end confdefs.h. */
13980
5476a9a4
GM
13981 extern void tputs (const char *, int, int (*)(int));
13982 int main (int argc, char **argv)
13983 {
13984 if (argc == 10000)
13985 tputs (argv[0], 0, 0);
13986 return 0;
13987 }
13988
067d23c9
KY
13989_ACEOF
13990if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 13991
067d23c9 13992else
5476a9a4 13993 msg=no
067d23c9
KY
13994fi
13995rm -f core conftest.err conftest.$ac_objext \
13996 conftest$ac_exeext conftest.$ac_ext
067d23c9 13997else
5476a9a4 13998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
13999/* end confdefs.h. */
14000
5476a9a4
GM
14001 extern void tputs (const char *, int, int (*)(int));
14002 int main (int argc, char **argv)
14003 {
14004 if (argc == 10000)
14005 tputs (argv[0], 0, 0);
14006 return 0;
14007 }
14008
067d23c9 14009_ACEOF
5476a9a4
GM
14010if ac_fn_c_try_run "$LINENO"; then :
14011
067d23c9 14012else
5476a9a4 14013 msg=no
067d23c9 14014fi
5476a9a4
GM
14015rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14016 conftest.$ac_objext conftest.beam conftest.$ac_ext
067d23c9 14017fi
5476a9a4
GM
14018
14019 LIBS=$OLIBS
14020 if test "X$msg" != Xno; then
14021 break
14022 fi
14023done
14024{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $msg" >&5
14025$as_echo "$msg" >&6; }
14026if test "X$msg" = Xno; then
14027 as_fn_error "The required function \`tputs' was not found in any library.
14028The following libraries were tried (in order):
14029 libtinfo, libncurses, libterminfo, libtermcap, libcurses
14030Please try installing whichever of these libraries is most appropriate
14031for your system, together with its header files.
14032For example, a libncurses-dev(el) or similar package." "$LINENO" 5
067d23c9
KY
14033fi
14034
5476a9a4
GM
14035## Use termcap instead of terminfo?
14036## Only true for: freebsd < 40000, ms-w32, msdos, netbsd < 599002500.
14037TERMINFO=yes
14038## FIXME? In the cases below where we unconditionally set
14039## LIBS_TERMCAP="-lncurses", this overrides LIBS_TERMCAP = -ltinfo,
14040## if that was found above to have tputs.
14041## Should we use the gnu* logic everywhere?
14042case "$opsys" in
14043 ## darwin: Prevents crashes when running Emacs in Terminal.app under 10.2.
14044 ## The ncurses library has been moved out of the System framework in
14045 ## Mac OS X 10.2. So if configure detects it, set the command-line
14046 ## option to use it.
14047 darwin) LIBS_TERMCAP="-lncurses" ;;
14048
14049 gnu*) test -z "$LIBS_TERMCAP" && LIBS_TERMCAP="-lncurses" ;;
14050
14051 freebsd)
14052 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether FreeBSD is new enough to use terminfo" >&5
14053$as_echo_n "checking whether FreeBSD is new enough to use terminfo... " >&6; }
14054 if test "${emacs_cv_freebsd_terminfo+set}" = set; then :
067d23c9
KY
14055 $as_echo_n "(cached) " >&6
14056else
5476a9a4 14057 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 14058/* end confdefs.h. */
5476a9a4 14059#include <osreldate.h>
067d23c9
KY
14060int
14061main ()
14062{
5476a9a4
GM
14063#if __FreeBSD_version < 400000
14064fail;
14065#endif
14066
067d23c9
KY
14067 ;
14068 return 0;
14069}
14070_ACEOF
14071if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 14072 emacs_cv_freebsd_terminfo=yes
067d23c9 14073else
5476a9a4 14074 emacs_cv_freebsd_terminfo=no
067d23c9
KY
14075fi
14076rm -f core conftest.err conftest.$ac_objext \
14077 conftest$ac_exeext conftest.$ac_ext
14078fi
5476a9a4
GM
14079
14080
14081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_freebsd_terminfo" >&5
14082$as_echo "$emacs_cv_freebsd_terminfo" >&6; }
14083
14084 if test $emacs_cv_freebsd_terminfo = yes; then
14085 LIBS_TERMCAP="-lncurses"
14086 else
14087 TERMINFO=no
14088 LIBS_TERMCAP="-ltermcap"
14089 fi
14090 ;;
14091
14092 netbsd)
14093 if test "x$LIBS_TERMCAP" != "x-lterminfo"; then
14094 TERMINFO=no
14095 LIBS_TERMCAP="-ltermcap"
14096 fi
14097 ;;
14098
14099 openbsd) LIBS_TERMCAP="-lncurses" ;;
14100
14101 ## hpux: Make sure we get select from libc rather than from libcurses
14102 ## because libcurses on HPUX 10.10 has a broken version of select.
14103 ## We used to use -lc -lcurses, but this may be cleaner.
14104 ## FIXME? But TERMINFO = yes on hpux (it used to be explicitly
14105 # set that way, now it uses the default). Isn't this a contradiction?
14106 hpux*) LIBS_TERMCAP="-ltermcap" ;;
14107
14108esac
14109
14110TERMCAP_OBJ=tparam.o
14111if test $TERMINFO = yes; then
14112
14113$as_echo "#define TERMINFO 1" >>confdefs.h
14114
14115 TERMCAP_OBJ=terminfo.o
067d23c9
KY
14116fi
14117
f199cab1 14118
067d23c9 14119
5476a9a4
GM
14120
14121# Do we have res_init, for detecting changes in /etc/resolv.conf?
14122# On Darwin, res_init appears not to be useful: see bug#562 and
14123# http://lists.gnu.org/archive/html/emacs-devel/2007-11/msg01467.html
14124resolv=no
14125
14126if test $opsys != darwin; then
14127
14128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14129/* end confdefs.h. */
14130#include <netinet/in.h>
14131#include <arpa/nameser.h>
14132#include <resolv.h>
067d23c9
KY
14133int
14134main ()
14135{
5476a9a4 14136return res_init();
067d23c9
KY
14137 ;
14138 return 0;
14139}
14140_ACEOF
14141if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 14142 have_res_init=yes
067d23c9 14143else
5476a9a4 14144 have_res_init=no
067d23c9
KY
14145fi
14146rm -f core conftest.err conftest.$ac_objext \
14147 conftest$ac_exeext conftest.$ac_ext
5476a9a4
GM
14148 if test "$have_res_init" = no; then
14149 OLIBS="$LIBS"
14150 LIBS="$LIBS -lresolv"
14151 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_init with -lresolv" >&5
14152$as_echo_n "checking for res_init with -lresolv... " >&6; }
14153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 14154/* end confdefs.h. */
5476a9a4
GM
14155#include <netinet/in.h>
14156#include <arpa/nameser.h>
14157#include <resolv.h>
067d23c9
KY
14158int
14159main ()
14160{
5476a9a4 14161return res_init();
067d23c9
KY
14162 ;
14163 return 0;
14164}
14165_ACEOF
14166if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 14167 have_res_init=yes
067d23c9 14168else
5476a9a4 14169 have_res_init=no
067d23c9
KY
14170fi
14171rm -f core conftest.err conftest.$ac_objext \
14172 conftest$ac_exeext conftest.$ac_ext
5476a9a4
GM
14173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_res_init" >&5
14174$as_echo "$have_res_init" >&6; }
14175 if test "$have_res_init" = yes ; then
14176 resolv=yes
14177 fi
14178 LIBS="$OLIBS"
14179 fi
067d23c9 14180
5476a9a4
GM
14181 if test "$have_res_init" = yes; then
14182
14183$as_echo "#define HAVE_RES_INIT 1" >>confdefs.h
067d23c9 14184
5476a9a4 14185 fi
067d23c9 14186fi
5476a9a4
GM
14187# Do we need the Hesiod library to provide the support routines?
14188LIBHESIOD=
14189if test "$with_hesiod" != no ; then
14190 # Don't set $LIBS here -- see comments above. FIXME which comments?
14191 ac_fn_c_check_func "$LINENO" "res_send" "ac_cv_func_res_send"
14192if test "x$ac_cv_func_res_send" = x""yes; then :
f199cab1 14193
5476a9a4
GM
14194else
14195 ac_fn_c_check_func "$LINENO" "__res_send" "ac_cv_func___res_send"
14196if test "x$ac_cv_func___res_send" = x""yes; then :
f199cab1 14197
5476a9a4
GM
14198else
14199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_send in -lresolv" >&5
14200$as_echo_n "checking for res_send in -lresolv... " >&6; }
14201if test "${ac_cv_lib_resolv_res_send+set}" = set; then :
067d23c9
KY
14202 $as_echo_n "(cached) " >&6
14203else
14204 ac_check_lib_save_LIBS=$LIBS
5476a9a4 14205LIBS="-lresolv $LIBS"
067d23c9
KY
14206cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14207/* end confdefs.h. */
14208
14209/* Override any GCC internal prototype to avoid an error.
14210 Use char because int might match the return type of a GCC
14211 builtin and then its argument prototype would still apply. */
14212#ifdef __cplusplus
14213extern "C"
14214#endif
5476a9a4 14215char res_send ();
067d23c9
KY
14216int
14217main ()
14218{
5476a9a4 14219return res_send ();
067d23c9
KY
14220 ;
14221 return 0;
14222}
14223_ACEOF
14224if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 14225 ac_cv_lib_resolv_res_send=yes
067d23c9 14226else
5476a9a4 14227 ac_cv_lib_resolv_res_send=no
067d23c9
KY
14228fi
14229rm -f core conftest.err conftest.$ac_objext \
f199cab1
GM
14230 conftest$ac_exeext conftest.$ac_ext
14231LIBS=$ac_check_lib_save_LIBS
14232fi
5476a9a4
GM
14233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_send" >&5
14234$as_echo "$ac_cv_lib_resolv_res_send" >&6; }
14235if test "x$ac_cv_lib_resolv_res_send" = x""yes; then :
14236 resolv=yes
14237else
14238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __res_send in -lresolv" >&5
14239$as_echo_n "checking for __res_send in -lresolv... " >&6; }
14240if test "${ac_cv_lib_resolv___res_send+set}" = set; then :
f199cab1
GM
14241 $as_echo_n "(cached) " >&6
14242else
14243 ac_check_lib_save_LIBS=$LIBS
5476a9a4 14244LIBS="-lresolv $LIBS"
f199cab1
GM
14245cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14246/* end confdefs.h. */
4717915f 14247
f199cab1
GM
14248/* Override any GCC internal prototype to avoid an error.
14249 Use char because int might match the return type of a GCC
14250 builtin and then its argument prototype would still apply. */
14251#ifdef __cplusplus
14252extern "C"
14253#endif
5476a9a4 14254char __res_send ();
f199cab1
GM
14255int
14256main ()
14257{
5476a9a4 14258return __res_send ();
f199cab1
GM
14259 ;
14260 return 0;
14261}
14262_ACEOF
14263if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 14264 ac_cv_lib_resolv___res_send=yes
f199cab1 14265else
5476a9a4 14266 ac_cv_lib_resolv___res_send=no
f199cab1
GM
14267fi
14268rm -f core conftest.err conftest.$ac_objext \
14269 conftest$ac_exeext conftest.$ac_ext
14270LIBS=$ac_check_lib_save_LIBS
14271fi
5476a9a4
GM
14272{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv___res_send" >&5
14273$as_echo "$ac_cv_lib_resolv___res_send" >&6; }
14274if test "x$ac_cv_lib_resolv___res_send" = x""yes; then :
14275 resolv=yes
067d23c9 14276fi
f199cab1 14277
5476a9a4 14278fi
1f5d53eb 14279
5476a9a4 14280fi
067d23c9 14281
067d23c9
KY
14282fi
14283
5476a9a4
GM
14284 if test "$resolv" = yes ; then
14285 RESOLVLIB=-lresolv
14286 else
14287 RESOLVLIB=
14288 fi
14289 ac_fn_c_check_func "$LINENO" "hes_getmailhost" "ac_cv_func_hes_getmailhost"
14290if test "x$ac_cv_func_hes_getmailhost" = x""yes; then :
14291
14292else
14293 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hes_getmailhost in -lhesiod" >&5
14294$as_echo_n "checking for hes_getmailhost in -lhesiod... " >&6; }
14295if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then :
14296 $as_echo_n "(cached) " >&6
14297else
14298 ac_check_lib_save_LIBS=$LIBS
14299LIBS="-lhesiod $RESOLVLIB $LIBS"
14300cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 14301/* end confdefs.h. */
5476a9a4
GM
14302
14303/* Override any GCC internal prototype to avoid an error.
14304 Use char because int might match the return type of a GCC
14305 builtin and then its argument prototype would still apply. */
14306#ifdef __cplusplus
14307extern "C"
14308#endif
14309char hes_getmailhost ();
067d23c9
KY
14310int
14311main ()
14312{
5476a9a4 14313return hes_getmailhost ();
067d23c9
KY
14314 ;
14315 return 0;
14316}
14317_ACEOF
f199cab1 14318if ac_fn_c_try_link "$LINENO"; then :
5476a9a4
GM
14319 ac_cv_lib_hesiod_hes_getmailhost=yes
14320else
14321 ac_cv_lib_hesiod_hes_getmailhost=no
067d23c9 14322fi
f199cab1
GM
14323rm -f core conftest.err conftest.$ac_objext \
14324 conftest$ac_exeext conftest.$ac_ext
5476a9a4 14325LIBS=$ac_check_lib_save_LIBS
067d23c9 14326fi
5476a9a4
GM
14327{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5
14328$as_echo "$ac_cv_lib_hesiod_hes_getmailhost" >&6; }
14329if test "x$ac_cv_lib_hesiod_hes_getmailhost" = x""yes; then :
14330 hesiod=yes
14331else
14332 :
067d23c9
KY
14333fi
14334
c5a68906 14335fi
f199cab1
GM
14336
14337
5476a9a4 14338 if test x"$hesiod" = xyes; then
f199cab1 14339
5476a9a4 14340$as_echo "#define HAVE_LIBHESIOD 1" >>confdefs.h
f199cab1 14341
5476a9a4 14342 LIBHESIOD=-lhesiod
c5a68906 14343 fi
5476a9a4 14344fi
4fc2b746 14345
4fc2b746 14346
5476a9a4
GM
14347# Do we need libresolv (due to res_init or Hesiod)?
14348if test "$resolv" = yes && test $opsys != darwin; then
4fc2b746 14349
5476a9a4 14350$as_echo "#define HAVE_LIBRESOLV 1" >>confdefs.h
4fc2b746 14351
5476a9a4
GM
14352 LIBRESOLV=-lresolv
14353else
14354 LIBRESOLV=
14355fi
4fc2b746 14356
4fc2b746 14357
5476a9a4
GM
14358# These tell us which Kerberos-related libraries to use.
14359COM_ERRLIB=
14360CRYPTOLIB=
14361KRB5LIB=
14362DESLIB=
14363KRB4LIB=
4fc2b746 14364
5476a9a4
GM
14365if test "${with_kerberos}" != no; then
14366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for com_err in -lcom_err" >&5
14367$as_echo_n "checking for com_err in -lcom_err... " >&6; }
14368if test "${ac_cv_lib_com_err_com_err+set}" = set; then :
14369 $as_echo_n "(cached) " >&6
14370else
14371 ac_check_lib_save_LIBS=$LIBS
14372LIBS="-lcom_err $LIBS"
14373cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14374/* end confdefs.h. */
4fc2b746 14375
5476a9a4
GM
14376/* Override any GCC internal prototype to avoid an error.
14377 Use char because int might match the return type of a GCC
14378 builtin and then its argument prototype would still apply. */
14379#ifdef __cplusplus
14380extern "C"
14381#endif
14382char com_err ();
14383int
14384main ()
14385{
14386return com_err ();
14387 ;
14388 return 0;
14389}
14390_ACEOF
14391if ac_fn_c_try_link "$LINENO"; then :
14392 ac_cv_lib_com_err_com_err=yes
14393else
14394 ac_cv_lib_com_err_com_err=no
14395fi
14396rm -f core conftest.err conftest.$ac_objext \
14397 conftest$ac_exeext conftest.$ac_ext
14398LIBS=$ac_check_lib_save_LIBS
14399fi
14400{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_com_err_com_err" >&5
14401$as_echo "$ac_cv_lib_com_err_com_err" >&6; }
14402if test "x$ac_cv_lib_com_err_com_err" = x""yes; then :
14403 have_com_err=yes
14404else
14405 have_com_err=no
14406fi
f199cab1 14407
5476a9a4
GM
14408 if test $have_com_err = yes; then
14409 COM_ERRLIB=-lcom_err
14410 LIBS="$COM_ERRLIB $LIBS"
f199cab1 14411
5476a9a4 14412$as_echo "#define HAVE_LIBCOM_ERR 1" >>confdefs.h
f199cab1 14413
5476a9a4
GM
14414 fi
14415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lcrypto" >&5
14416$as_echo_n "checking for mit_des_cbc_encrypt in -lcrypto... " >&6; }
14417if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then :
14418 $as_echo_n "(cached) " >&6
14419else
14420 ac_check_lib_save_LIBS=$LIBS
14421LIBS="-lcrypto $LIBS"
14422cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14423/* end confdefs.h. */
f199cab1 14424
5476a9a4
GM
14425/* Override any GCC internal prototype to avoid an error.
14426 Use char because int might match the return type of a GCC
14427 builtin and then its argument prototype would still apply. */
14428#ifdef __cplusplus
14429extern "C"
14430#endif
14431char mit_des_cbc_encrypt ();
14432int
14433main ()
14434{
14435return mit_des_cbc_encrypt ();
14436 ;
14437 return 0;
14438}
14439_ACEOF
14440if ac_fn_c_try_link "$LINENO"; then :
14441 ac_cv_lib_crypto_mit_des_cbc_encrypt=yes
14442else
14443 ac_cv_lib_crypto_mit_des_cbc_encrypt=no
14444fi
14445rm -f core conftest.err conftest.$ac_objext \
14446 conftest$ac_exeext conftest.$ac_ext
14447LIBS=$ac_check_lib_save_LIBS
14448fi
14449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5
14450$as_echo "$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6; }
14451if test "x$ac_cv_lib_crypto_mit_des_cbc_encrypt" = x""yes; then :
14452 have_crypto=yes
14453else
14454 have_crypto=no
14455fi
f199cab1 14456
5476a9a4
GM
14457 if test $have_crypto = yes; then
14458 CRYPTOLIB=-lcrypto
14459 LIBS="$CRYPTOLIB $LIBS"
f199cab1 14460
5476a9a4 14461$as_echo "#define HAVE_LIBCRYPTO 1" >>confdefs.h
f199cab1 14462
5476a9a4
GM
14463 fi
14464 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
14465$as_echo_n "checking for mit_des_cbc_encrypt in -lk5crypto... " >&6; }
14466if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then :
14467 $as_echo_n "(cached) " >&6
14468else
14469 ac_check_lib_save_LIBS=$LIBS
14470LIBS="-lk5crypto $LIBS"
14471cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14472/* end confdefs.h. */
f199cab1 14473
5476a9a4
GM
14474/* Override any GCC internal prototype to avoid an error.
14475 Use char because int might match the return type of a GCC
14476 builtin and then its argument prototype would still apply. */
14477#ifdef __cplusplus
14478extern "C"
14479#endif
14480char mit_des_cbc_encrypt ();
14481int
14482main ()
14483{
14484return mit_des_cbc_encrypt ();
14485 ;
14486 return 0;
14487}
14488_ACEOF
14489if ac_fn_c_try_link "$LINENO"; then :
14490 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes
14491else
14492 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no
14493fi
14494rm -f core conftest.err conftest.$ac_objext \
14495 conftest$ac_exeext conftest.$ac_ext
14496LIBS=$ac_check_lib_save_LIBS
14497fi
14498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5
14499$as_echo "$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6; }
14500if test "x$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" = x""yes; then :
14501 have_k5crypto=yes
14502else
14503 have_k5crypto=no
4fc2b746 14504fi
4fc2b746 14505
5476a9a4
GM
14506 if test $have_k5crypto = yes; then
14507 CRYPTOLIB=-lk5crypto
14508 LIBS="$CRYPTOLIB $LIBS"
4fc2b746 14509
5476a9a4 14510$as_echo "#define HAVE_LIBK5CRYPTO 1" >>confdefs.h
4fc2b746 14511
5476a9a4
GM
14512 fi
14513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5_init_context in -lkrb5" >&5
14514$as_echo_n "checking for krb5_init_context in -lkrb5... " >&6; }
14515if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then :
14516 $as_echo_n "(cached) " >&6
14517else
14518 ac_check_lib_save_LIBS=$LIBS
14519LIBS="-lkrb5 $LIBS"
14520cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14521/* end confdefs.h. */
4fc2b746 14522
5476a9a4
GM
14523/* Override any GCC internal prototype to avoid an error.
14524 Use char because int might match the return type of a GCC
14525 builtin and then its argument prototype would still apply. */
14526#ifdef __cplusplus
14527extern "C"
14528#endif
14529char krb5_init_context ();
14530int
14531main ()
14532{
14533return krb5_init_context ();
14534 ;
14535 return 0;
14536}
14537_ACEOF
14538if ac_fn_c_try_link "$LINENO"; then :
14539 ac_cv_lib_krb5_krb5_init_context=yes
14540else
14541 ac_cv_lib_krb5_krb5_init_context=no
14542fi
14543rm -f core conftest.err conftest.$ac_objext \
14544 conftest$ac_exeext conftest.$ac_ext
14545LIBS=$ac_check_lib_save_LIBS
14546fi
14547{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb5_krb5_init_context" >&5
14548$as_echo "$ac_cv_lib_krb5_krb5_init_context" >&6; }
14549if test "x$ac_cv_lib_krb5_krb5_init_context" = x""yes; then :
14550 have_krb5=yes
14551else
14552 have_krb5=no
14553fi
f199cab1 14554
5476a9a4
GM
14555 if test $have_krb5=yes; then
14556 KRB5LIB=-lkrb5
14557 LIBS="$KRB5LIB $LIBS"
f199cab1 14558
5476a9a4 14559$as_echo "#define HAVE_LIBKRB5 1" >>confdefs.h
f199cab1 14560
5476a9a4
GM
14561 fi
14562 if test "${with_kerberos5}" = no; then
14563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes425" >&5
14564$as_echo_n "checking for des_cbc_encrypt in -ldes425... " >&6; }
14565if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then :
f199cab1
GM
14566 $as_echo_n "(cached) " >&6
14567else
5476a9a4
GM
14568 ac_check_lib_save_LIBS=$LIBS
14569LIBS="-ldes425 $LIBS"
14570cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3e0be4ab 14571/* end confdefs.h. */
f199cab1 14572
5476a9a4
GM
14573/* Override any GCC internal prototype to avoid an error.
14574 Use char because int might match the return type of a GCC
14575 builtin and then its argument prototype would still apply. */
14576#ifdef __cplusplus
14577extern "C"
14578#endif
14579char des_cbc_encrypt ();
3e0be4ab
GM
14580int
14581main ()
14582{
5476a9a4 14583return des_cbc_encrypt ();
3e0be4ab
GM
14584 ;
14585 return 0;
14586}
14587_ACEOF
5476a9a4
GM
14588if ac_fn_c_try_link "$LINENO"; then :
14589 ac_cv_lib_des425_des_cbc_encrypt=yes
3e0be4ab 14590else
5476a9a4 14591 ac_cv_lib_des425_des_cbc_encrypt=no
3e0be4ab 14592fi
5476a9a4
GM
14593rm -f core conftest.err conftest.$ac_objext \
14594 conftest$ac_exeext conftest.$ac_ext
14595LIBS=$ac_check_lib_save_LIBS
4fc2b746 14596fi
5476a9a4
GM
14597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
14598$as_echo "$ac_cv_lib_des425_des_cbc_encrypt" >&6; }
14599if test "x$ac_cv_lib_des425_des_cbc_encrypt" = x""yes; then :
14600 have_des425=yes
14601else
14602 have_des425=no
f199cab1 14603fi
6c051bab 14604
5476a9a4
GM
14605 if test $have_des425 = yes; then
14606 DESLIB=-ldes425
14607 LIBS="$DESLIB $LIBS"
6c051bab 14608
5476a9a4 14609$as_echo "#define HAVE_LIBDES425 1" >>confdefs.h
f199cab1 14610
5476a9a4
GM
14611 else
14612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes" >&5
14613$as_echo_n "checking for des_cbc_encrypt in -ldes... " >&6; }
14614if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then :
14615 $as_echo_n "(cached) " >&6
14616else
14617 ac_check_lib_save_LIBS=$LIBS
14618LIBS="-ldes $LIBS"
14619cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14620/* end confdefs.h. */
f199cab1 14621
5476a9a4
GM
14622/* Override any GCC internal prototype to avoid an error.
14623 Use char because int might match the return type of a GCC
14624 builtin and then its argument prototype would still apply. */
14625#ifdef __cplusplus
14626extern "C"
14627#endif
14628char des_cbc_encrypt ();
14629int
14630main ()
14631{
14632return des_cbc_encrypt ();
14633 ;
14634 return 0;
14635}
14636_ACEOF
14637if ac_fn_c_try_link "$LINENO"; then :
14638 ac_cv_lib_des_des_cbc_encrypt=yes
14639else
14640 ac_cv_lib_des_des_cbc_encrypt=no
14641fi
14642rm -f core conftest.err conftest.$ac_objext \
14643 conftest$ac_exeext conftest.$ac_ext
14644LIBS=$ac_check_lib_save_LIBS
14645fi
14646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
14647$as_echo "$ac_cv_lib_des_des_cbc_encrypt" >&6; }
14648if test "x$ac_cv_lib_des_des_cbc_encrypt" = x""yes; then :
14649 have_des=yes
14650else
14651 have_des=no
14652fi
f199cab1 14653
5476a9a4
GM
14654 if test $have_des = yes; then
14655 DESLIB=-ldes
14656 LIBS="$DESLIB $LIBS"
f199cab1 14657
5476a9a4 14658$as_echo "#define HAVE_LIBDES 1" >>confdefs.h
f199cab1 14659
5476a9a4
GM
14660 fi
14661 fi
14662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb4" >&5
14663$as_echo_n "checking for krb_get_cred in -lkrb4... " >&6; }
14664if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then :
942f733f
PE
14665 $as_echo_n "(cached) " >&6
14666else
5476a9a4
GM
14667 ac_check_lib_save_LIBS=$LIBS
14668LIBS="-lkrb4 $LIBS"
14669cat confdefs.h - <<_ACEOF >conftest.$ac_ext
942f733f 14670/* end confdefs.h. */
942f733f 14671
5476a9a4
GM
14672/* Override any GCC internal prototype to avoid an error.
14673 Use char because int might match the return type of a GCC
14674 builtin and then its argument prototype would still apply. */
14675#ifdef __cplusplus
14676extern "C"
14677#endif
14678char krb_get_cred ();
942f733f
PE
14679int
14680main ()
14681{
5476a9a4 14682return krb_get_cred ();
942f733f
PE
14683 ;
14684 return 0;
14685}
14686_ACEOF
5476a9a4
GM
14687if ac_fn_c_try_link "$LINENO"; then :
14688 ac_cv_lib_krb4_krb_get_cred=yes
14689else
14690 ac_cv_lib_krb4_krb_get_cred=no
14691fi
14692rm -f core conftest.err conftest.$ac_objext \
14693 conftest$ac_exeext conftest.$ac_ext
14694LIBS=$ac_check_lib_save_LIBS
14695fi
14696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb4_krb_get_cred" >&5
14697$as_echo "$ac_cv_lib_krb4_krb_get_cred" >&6; }
14698if test "x$ac_cv_lib_krb4_krb_get_cred" = x""yes; then :
14699 have_krb4=yes
14700else
14701 have_krb4=no
14702fi
14703
14704 if test $have_krb4 = yes; then
14705 KRB4LIB=-lkrb4
14706 LIBS="$KRB4LIB $LIBS"
14707
14708$as_echo "#define HAVE_LIBKRB4 1" >>confdefs.h
14709
14710 else
14711 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb" >&5
14712$as_echo_n "checking for krb_get_cred in -lkrb... " >&6; }
14713if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then :
14714 $as_echo_n "(cached) " >&6
3e0be4ab 14715else
5476a9a4
GM
14716 ac_check_lib_save_LIBS=$LIBS
14717LIBS="-lkrb $LIBS"
14718cat confdefs.h - <<_ACEOF >conftest.$ac_ext
942f733f 14719/* end confdefs.h. */
942f733f 14720
5476a9a4
GM
14721/* Override any GCC internal prototype to avoid an error.
14722 Use char because int might match the return type of a GCC
14723 builtin and then its argument prototype would still apply. */
14724#ifdef __cplusplus
14725extern "C"
14726#endif
14727char krb_get_cred ();
942f733f
PE
14728int
14729main ()
14730{
5476a9a4 14731return krb_get_cred ();
942f733f
PE
14732 ;
14733 return 0;
14734}
14735_ACEOF
5476a9a4
GM
14736if ac_fn_c_try_link "$LINENO"; then :
14737 ac_cv_lib_krb_krb_get_cred=yes
942f733f 14738else
5476a9a4 14739 ac_cv_lib_krb_krb_get_cred=no
942f733f 14740fi
5476a9a4
GM
14741rm -f core conftest.err conftest.$ac_objext \
14742 conftest$ac_exeext conftest.$ac_ext
14743LIBS=$ac_check_lib_save_LIBS
3e0be4ab 14744fi
5476a9a4
GM
14745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb_krb_get_cred" >&5
14746$as_echo "$ac_cv_lib_krb_krb_get_cred" >&6; }
14747if test "x$ac_cv_lib_krb_krb_get_cred" = x""yes; then :
14748 have_krb=yes
14749else
14750 have_krb=no
942f733f 14751fi
f199cab1 14752
5476a9a4
GM
14753 if test $have_krb = yes; then
14754 KRB4LIB=-lkrb
14755 LIBS="$KRB4LIB $LIBS"
14756
14757$as_echo "#define HAVE_LIBKRB 1" >>confdefs.h
14758
14759 fi
14760 fi
f199cab1
GM
14761 fi
14762
5476a9a4
GM
14763 if test "${with_kerberos5}" != no; then
14764 for ac_header in krb5.h
14765do :
14766 ac_fn_c_check_header_mongrel "$LINENO" "krb5.h" "ac_cv_header_krb5_h" "$ac_includes_default"
14767if test "x$ac_cv_header_krb5_h" = x""yes; then :
14768 cat >>confdefs.h <<_ACEOF
14769#define HAVE_KRB5_H 1
14770_ACEOF
14771 ac_fn_c_check_member "$LINENO" "krb5_error" "text" "ac_cv_member_krb5_error_text" "#include <krb5.h>
14772"
14773if test "x$ac_cv_member_krb5_error_text" = x""yes; then :
14774
f199cab1 14775cat >>confdefs.h <<_ACEOF
5476a9a4 14776#define HAVE_KRB5_ERROR_TEXT 1
f199cab1
GM
14777_ACEOF
14778
14779
5476a9a4
GM
14780fi
14781ac_fn_c_check_member "$LINENO" "krb5_error" "e_text" "ac_cv_member_krb5_error_e_text" "#include <krb5.h>
14782"
14783if test "x$ac_cv_member_krb5_error_e_text" = x""yes; then :
f199cab1 14784
5476a9a4
GM
14785cat >>confdefs.h <<_ACEOF
14786#define HAVE_KRB5_ERROR_E_TEXT 1
14787_ACEOF
f199cab1
GM
14788
14789
5476a9a4 14790fi
f199cab1 14791
5476a9a4 14792fi
f199cab1 14793
5476a9a4 14794done
f199cab1 14795
5476a9a4
GM
14796 else
14797 for ac_header in des.h
14798do :
14799 ac_fn_c_check_header_mongrel "$LINENO" "des.h" "ac_cv_header_des_h" "$ac_includes_default"
14800if test "x$ac_cv_header_des_h" = x""yes; then :
14801 cat >>confdefs.h <<_ACEOF
14802#define HAVE_DES_H 1
14803_ACEOF
f199cab1 14804
5476a9a4
GM
14805else
14806 for ac_header in kerberosIV/des.h
14807do :
14808 ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/des.h" "ac_cv_header_kerberosIV_des_h" "$ac_includes_default"
14809if test "x$ac_cv_header_kerberosIV_des_h" = x""yes; then :
14810 cat >>confdefs.h <<_ACEOF
14811#define HAVE_KERBEROSIV_DES_H 1
14812_ACEOF
f199cab1 14813
5476a9a4
GM
14814else
14815 for ac_header in kerberos/des.h
14816do :
14817 ac_fn_c_check_header_mongrel "$LINENO" "kerberos/des.h" "ac_cv_header_kerberos_des_h" "$ac_includes_default"
14818if test "x$ac_cv_header_kerberos_des_h" = x""yes; then :
14819 cat >>confdefs.h <<_ACEOF
14820#define HAVE_KERBEROS_DES_H 1
14821_ACEOF
f199cab1 14822
5476a9a4 14823fi
f199cab1 14824
5476a9a4
GM
14825done
14826
14827fi
14828
14829done
14830
14831fi
14832
14833done
14834
14835 for ac_header in krb.h
f199cab1 14836do :
5476a9a4
GM
14837 ac_fn_c_check_header_mongrel "$LINENO" "krb.h" "ac_cv_header_krb_h" "$ac_includes_default"
14838if test "x$ac_cv_header_krb_h" = x""yes; then :
f199cab1 14839 cat >>confdefs.h <<_ACEOF
5476a9a4
GM
14840#define HAVE_KRB_H 1
14841_ACEOF
14842
14843else
14844 for ac_header in kerberosIV/krb.h
14845do :
14846 ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/krb.h" "ac_cv_header_kerberosIV_krb_h" "$ac_includes_default"
14847if test "x$ac_cv_header_kerberosIV_krb_h" = x""yes; then :
14848 cat >>confdefs.h <<_ACEOF
14849#define HAVE_KERBEROSIV_KRB_H 1
14850_ACEOF
14851
14852else
14853 for ac_header in kerberos/krb.h
14854do :
14855 ac_fn_c_check_header_mongrel "$LINENO" "kerberos/krb.h" "ac_cv_header_kerberos_krb_h" "$ac_includes_default"
14856if test "x$ac_cv_header_kerberos_krb_h" = x""yes; then :
14857 cat >>confdefs.h <<_ACEOF
14858#define HAVE_KERBEROS_KRB_H 1
f199cab1 14859_ACEOF
942f733f 14860
3e0be4ab 14861fi
942f733f 14862
f199cab1
GM
14863done
14864
5476a9a4
GM
14865fi
14866
14867done
14868
14869fi
14870
14871done
14872
14873 fi
14874 for ac_header in com_err.h
f199cab1 14875do :
5476a9a4
GM
14876 ac_fn_c_check_header_mongrel "$LINENO" "com_err.h" "ac_cv_header_com_err_h" "$ac_includes_default"
14877if test "x$ac_cv_header_com_err_h" = x""yes; then :
f199cab1 14878 cat >>confdefs.h <<_ACEOF
5476a9a4 14879#define HAVE_COM_ERR_H 1
f199cab1
GM
14880_ACEOF
14881
3e0be4ab 14882fi
f199cab1 14883
5476a9a4 14884done
3e0be4ab
GM
14885
14886fi
14887
f199cab1
GM
14888
14889
14890
14891
f199cab1
GM
14892
14893
14894
14895
14896
5476a9a4
GM
14897 for ac_func in $ac_func_list
14898do :
14899 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14900ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14901eval as_val=\$$as_ac_var
14902 if test "x$as_val" = x""yes; then :
14903 cat >>confdefs.h <<_ACEOF
14904#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14905_ACEOF
14906
14907fi
14908done
14909
f199cab1
GM
14910
14911
14912
5476a9a4
GM
14913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime caches TZ" >&5
14914$as_echo_n "checking whether localtime caches TZ... " >&6; }
14915if test "${emacs_cv_localtime_cache+set}" = set; then :
14916 $as_echo_n "(cached) " >&6
14917else
14918 if test x$ac_cv_func_tzset = xyes; then
14919if test "$cross_compiling" = yes; then :
14920 # If we have tzset, assume the worst when cross-compiling.
14921emacs_cv_localtime_cache=yes
14922else
14923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14924/* end confdefs.h. */
14925#include <time.h>
14926char TZ_GMT0[] = "TZ=GMT0";
14927char TZ_PST8[] = "TZ=PST8";
14928main()
14929{
14930 time_t now = time ((time_t *) 0);
14931 int hour_GMT0, hour_unset;
14932 if (putenv (TZ_GMT0) != 0)
14933 exit (1);
14934 hour_GMT0 = localtime (&now)->tm_hour;
14935 unsetenv("TZ");
14936 hour_unset = localtime (&now)->tm_hour;
14937 if (putenv (TZ_PST8) != 0)
14938 exit (1);
14939 if (localtime (&now)->tm_hour == hour_GMT0)
14940 exit (1);
14941 unsetenv("TZ");
14942 if (localtime (&now)->tm_hour != hour_unset)
14943 exit (1);
14944 exit (0);
14945}
14946_ACEOF
14947if ac_fn_c_try_run "$LINENO"; then :
14948 emacs_cv_localtime_cache=no
14949else
14950 emacs_cv_localtime_cache=yes
14951fi
14952rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14953 conftest.$ac_objext conftest.beam conftest.$ac_ext
14954fi
f199cab1 14955
5476a9a4
GM
14956else
14957 # If we lack tzset, report that localtime does not cache TZ,
14958 # since we can't invalidate the cache if we don't have tzset.
14959 emacs_cv_localtime_cache=no
14960fi
14961fi
14962{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_localtime_cache" >&5
14963$as_echo "$emacs_cv_localtime_cache" >&6; }
14964if test $emacs_cv_localtime_cache = yes; then
f199cab1 14965
5476a9a4 14966$as_echo "#define LOCALTIME_CACHE 1" >>confdefs.h
f199cab1 14967
5476a9a4 14968fi
f199cab1 14969
5476a9a4
GM
14970ok_so_far=yes
14971ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket"
14972if test "x$ac_cv_func_socket" = x""yes; then :
3e0be4ab 14973
5476a9a4
GM
14974else
14975 ok_so_far=no
14976fi
f199cab1 14977
5476a9a4
GM
14978if test $ok_so_far = yes; then
14979 ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
14980if test "x$ac_cv_header_netinet_in_h" = x""yes; then :
f199cab1 14981
5476a9a4
GM
14982else
14983 ok_so_far=no
14984fi
f199cab1
GM
14985
14986
5476a9a4
GM
14987fi
14988if test $ok_so_far = yes; then
14989 ac_fn_c_check_header_mongrel "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default"
14990if test "x$ac_cv_header_arpa_inet_h" = x""yes; then :
f199cab1 14991
5476a9a4
GM
14992else
14993 ok_so_far=no
14994fi
f199cab1
GM
14995
14996
5476a9a4
GM
14997fi
14998if test $ok_so_far = yes; then
f199cab1 14999
5476a9a4 15000$as_echo "#define HAVE_INET_SOCKETS 1" >>confdefs.h
f199cab1 15001
5476a9a4 15002fi
f199cab1 15003
5476a9a4 15004if test -f /usr/lpp/X11/bin/smt.exp; then
942f733f 15005
5476a9a4 15006$as_echo "#define HAVE_AIX_SMT_EXP 1" >>confdefs.h
942f733f 15007
942f733f 15008fi
3e0be4ab 15009
5476a9a4
GM
15010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system supports dynamic ptys" >&5
15011$as_echo_n "checking whether system supports dynamic ptys... " >&6; }
15012if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
15013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15014$as_echo "yes" >&6; }
15015
15016$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
3e0be4ab 15017
5476a9a4
GM
15018else
15019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15020$as_echo "no" >&6; }
15021fi
3e0be4ab 15022
bb7dce39
GM
15023case $canonical in
15024 *-solaris2.4 | *-solaris2.4.*)
15025 : ${ac_cv_func_vfork_works=no};;
15026esac
15027
5476a9a4
GM
15028ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
15029if test "x$ac_cv_type_pid_t" = x""yes; then :
3e0be4ab 15030
5476a9a4 15031else
3e0be4ab 15032
5476a9a4
GM
15033cat >>confdefs.h <<_ACEOF
15034#define pid_t int
15035_ACEOF
f199cab1 15036
5476a9a4 15037fi
f199cab1 15038
5476a9a4
GM
15039for ac_header in vfork.h
15040do :
15041 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
15042if test "x$ac_cv_header_vfork_h" = x""yes; then :
15043 cat >>confdefs.h <<_ACEOF
15044#define HAVE_VFORK_H 1
15045_ACEOF
f199cab1 15046
5476a9a4 15047fi
f199cab1 15048
5476a9a4 15049done
f199cab1 15050
5476a9a4
GM
15051for ac_func in fork vfork
15052do :
15053 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15054ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15055eval as_val=\$$as_ac_var
15056 if test "x$as_val" = x""yes; then :
15057 cat >>confdefs.h <<_ACEOF
15058#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15059_ACEOF
f199cab1 15060
5476a9a4
GM
15061fi
15062done
f199cab1 15063
5476a9a4
GM
15064if test "x$ac_cv_func_fork" = xyes; then
15065 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
15066$as_echo_n "checking for working fork... " >&6; }
15067if test "${ac_cv_func_fork_works+set}" = set; then :
15068 $as_echo_n "(cached) " >&6
15069else
15070 if test "$cross_compiling" = yes; then :
15071 ac_cv_func_fork_works=cross
15072else
15073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15074/* end confdefs.h. */
15075$ac_includes_default
15076int
15077main ()
15078{
f199cab1 15079
5476a9a4
GM
15080 /* By Ruediger Kuhlmann. */
15081 return fork () < 0;
f199cab1 15082
5476a9a4
GM
15083 ;
15084 return 0;
15085}
15086_ACEOF
15087if ac_fn_c_try_run "$LINENO"; then :
15088 ac_cv_func_fork_works=yes
15089else
15090 ac_cv_func_fork_works=no
15091fi
15092rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15093 conftest.$ac_objext conftest.beam conftest.$ac_ext
15094fi
f199cab1 15095
5476a9a4
GM
15096fi
15097{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
15098$as_echo "$ac_cv_func_fork_works" >&6; }
f199cab1 15099
5476a9a4
GM
15100else
15101 ac_cv_func_fork_works=$ac_cv_func_fork
15102fi
15103if test "x$ac_cv_func_fork_works" = xcross; then
15104 case $host in
15105 *-*-amigaos* | *-*-msdosdjgpp*)
15106 # Override, as these systems have only a dummy fork() stub
15107 ac_cv_func_fork_works=no
15108 ;;
15109 *)
15110 ac_cv_func_fork_works=yes
15111 ;;
15112 esac
15113 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
15114$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
15115fi
15116ac_cv_func_vfork_works=$ac_cv_func_vfork
15117if test "x$ac_cv_func_vfork" = xyes; then
15118 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
15119$as_echo_n "checking for working vfork... " >&6; }
15120if test "${ac_cv_func_vfork_works+set}" = set; then :
f199cab1
GM
15121 $as_echo_n "(cached) " >&6
15122else
15123 if test "$cross_compiling" = yes; then :
5476a9a4 15124 ac_cv_func_vfork_works=cross
f199cab1
GM
15125else
15126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15127/* end confdefs.h. */
5476a9a4
GM
15128/* Thanks to Paul Eggert for this test. */
15129$ac_includes_default
15130#include <sys/wait.h>
15131#ifdef HAVE_VFORK_H
15132# include <vfork.h>
f199cab1 15133#endif
5476a9a4
GM
15134/* On some sparc systems, changes by the child to local and incoming
15135 argument registers are propagated back to the parent. The compiler
15136 is told about this with #include <vfork.h>, but some compilers
15137 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
15138 static variable whose address is put into a register that is
15139 clobbered by the vfork. */
15140static void
15141#ifdef __cplusplus
15142sparc_address_test (int arg)
15143# else
15144sparc_address_test (arg) int arg;
f199cab1 15145#endif
5476a9a4
GM
15146{
15147 static pid_t child;
15148 if (!child) {
15149 child = vfork ();
15150 if (child < 0) {
15151 perror ("vfork");
15152 _exit(2);
15153 }
15154 if (!child) {
15155 arg = getpid();
15156 write(-1, "", 0);
15157 _exit (arg);
15158 }
15159 }
15160}
f199cab1 15161
5476a9a4
GM
15162int
15163main ()
15164{
15165 pid_t parent = getpid ();
15166 pid_t child;
f199cab1 15167
5476a9a4 15168 sparc_address_test (0);
f199cab1 15169
5476a9a4 15170 child = vfork ();
3e0be4ab 15171
5476a9a4
GM
15172 if (child == 0) {
15173 /* Here is another test for sparc vfork register problems. This
15174 test uses lots of local variables, at least as many local
15175 variables as main has allocated so far including compiler
15176 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
15177 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
15178 reuse the register of parent for one of the local variables,
15179 since it will think that parent can't possibly be used any more
15180 in this routine. Assigning to the local variable will thus
15181 munge parent in the parent process. */
15182 pid_t
15183 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
15184 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
15185 /* Convince the compiler that p..p7 are live; otherwise, it might
15186 use the same hardware register for all 8 local variables. */
15187 if (p != p1 || p != p2 || p != p3 || p != p4
15188 || p != p5 || p != p6 || p != p7)
15189 _exit(1);
3e0be4ab 15190
5476a9a4
GM
15191 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
15192 from child file descriptors. If the child closes a descriptor
15193 before it execs or exits, this munges the parent's descriptor
15194 as well. Test for this by closing stdout in the child. */
15195 _exit(close(fileno(stdout)) != 0);
15196 } else {
15197 int status;
15198 struct stat st;
3e0be4ab 15199
5476a9a4
GM
15200 while (wait(&status) != child)
15201 ;
15202 return (
15203 /* Was there some problem with vforking? */
15204 child < 0
3e0be4ab 15205
5476a9a4
GM
15206 /* Did the child fail? (This shouldn't happen.) */
15207 || status
15208
15209 /* Did the vfork/compiler bug occur? */
15210 || parent != getpid()
15211
15212 /* Did the file descriptor bug occur? */
15213 || fstat(fileno(stdout), &st) != 0
15214 );
15215 }
f199cab1 15216}
5476a9a4
GM
15217_ACEOF
15218if ac_fn_c_try_run "$LINENO"; then :
15219 ac_cv_func_vfork_works=yes
15220else
15221 ac_cv_func_vfork_works=no
15222fi
15223rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15224 conftest.$ac_objext conftest.beam conftest.$ac_ext
15225fi
15226
15227fi
15228{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
15229$as_echo "$ac_cv_func_vfork_works" >&6; }
15230
15231fi;
15232if test "x$ac_cv_func_fork_works" = xcross; then
15233 ac_cv_func_vfork_works=$ac_cv_func_vfork
15234 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
15235$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
15236fi
15237
15238if test "x$ac_cv_func_vfork_works" = xyes; then
3e0be4ab 15239
5476a9a4 15240$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
3e0be4ab 15241
5476a9a4 15242else
3e0be4ab 15243
5476a9a4 15244$as_echo "#define vfork fork" >>confdefs.h
942f733f 15245
5476a9a4
GM
15246fi
15247if test "x$ac_cv_func_fork_works" = xyes; then
942f733f 15248
5476a9a4 15249$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
942f733f 15250
5476a9a4 15251fi
f199cab1 15252
f199cab1 15253
5476a9a4
GM
15254for ac_func in snprintf
15255do :
15256 ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
15257if test "x$ac_cv_func_snprintf" = x""yes; then :
15258 cat >>confdefs.h <<_ACEOF
15259#define HAVE_SNPRINTF 1
15260_ACEOF
15261
15262fi
15263done
15264
942f733f 15265
5476a9a4
GM
15266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
15267$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
15268if test "${emacs_cv_langinfo_codeset+set}" = set; then :
15269 $as_echo_n "(cached) " >&6
15270else
15271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15272/* end confdefs.h. */
15273#include <langinfo.h>
3e0be4ab
GM
15274int
15275main ()
15276{
5476a9a4
GM
15277char* cs = nl_langinfo(CODESET);
15278 ;
15279 return 0;
15280}
15281_ACEOF
15282if ac_fn_c_try_link "$LINENO"; then :
15283 emacs_cv_langinfo_codeset=yes
15284else
15285 emacs_cv_langinfo_codeset=no
15286fi
15287rm -f core conftest.err conftest.$ac_objext \
15288 conftest$ac_exeext conftest.$ac_ext
f199cab1 15289
5476a9a4
GM
15290fi
15291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_langinfo_codeset" >&5
15292$as_echo "$emacs_cv_langinfo_codeset" >&6; }
15293if test $emacs_cv_langinfo_codeset = yes; then
f199cab1 15294
5476a9a4 15295$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
f199cab1 15296
5476a9a4 15297fi
f199cab1 15298
5476a9a4
GM
15299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
15300$as_echo_n "checking for mbstate_t... " >&6; }
15301if test "${ac_cv_type_mbstate_t+set}" = set; then :
15302 $as_echo_n "(cached) " >&6
15303else
15304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15305/* end confdefs.h. */
15306$ac_includes_default
15307# include <wchar.h>
15308int
15309main ()
15310{
15311mbstate_t x; return sizeof x;
15312 ;
15313 return 0;
3e0be4ab 15314}
942f733f 15315_ACEOF
5476a9a4
GM
15316if ac_fn_c_try_compile "$LINENO"; then :
15317 ac_cv_type_mbstate_t=yes
3e0be4ab 15318else
5476a9a4 15319 ac_cv_type_mbstate_t=no
942f733f 15320fi
5476a9a4 15321rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3e0be4ab 15322fi
5476a9a4
GM
15323{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
15324$as_echo "$ac_cv_type_mbstate_t" >&6; }
15325 if test $ac_cv_type_mbstate_t = yes; then
f199cab1 15326
5476a9a4 15327$as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
f199cab1 15328
5476a9a4 15329 else
f199cab1 15330
5476a9a4 15331$as_echo "#define mbstate_t int" >>confdefs.h
f199cab1 15332
5476a9a4
GM
15333 fi
15334
15335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C restricted array declarations" >&5
15336$as_echo_n "checking for C restricted array declarations... " >&6; }
15337if test "${emacs_cv_c_restrict_arr+set}" = set; then :
15338 $as_echo_n "(cached) " >&6
15339else
15340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15341/* end confdefs.h. */
15342void fred (int x[__restrict]);
15343int
15344main ()
15345{
15346
15347 ;
15348 return 0;
15349}
15350_ACEOF
15351if ac_fn_c_try_compile "$LINENO"; then :
15352 emacs_cv_c_restrict_arr=yes
15353else
15354 emacs_cv_c_restrict_arr=no
15355fi
15356rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15357fi
15358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_c_restrict_arr" >&5
15359$as_echo "$emacs_cv_c_restrict_arr" >&6; }
15360if test "$emacs_cv_c_restrict_arr" = yes; then
f199cab1 15361
5476a9a4 15362$as_echo "#define __restrict_arr __restrict" >>confdefs.h
f199cab1 15363
5476a9a4 15364fi
f199cab1
GM
15365
15366
15367
8ad96b1d
GM
15368$as_echo "#define AMPERSAND_FULL_NAME 1" >>confdefs.h
15369
15370
15371
5476a9a4 15372$as_echo "#define CLASH_DETECTION 1" >>confdefs.h
f199cab1
GM
15373
15374
5476a9a4 15375## Note: PTYs are broken on darwin <6. Use at your own risk.
f199cab1 15376
5476a9a4 15377$as_echo "#define HAVE_PTYS 1" >>confdefs.h
f199cab1
GM
15378
15379
15380
5476a9a4 15381$as_echo "#define HAVE_SOCKETS 1" >>confdefs.h
f199cab1 15382
942f733f 15383
942f733f 15384
6b10626d
GM
15385
15386
8ad96b1d
GM
15387$as_echo "#define NULL_DEVICE \"/dev/null\"" >>confdefs.h
15388
15389
15390
15391$as_echo "#define SEPCHAR ':'" >>confdefs.h
15392
15393
15394
15395$as_echo "#define subprocesses 1" >>confdefs.h
15396
15397
15398
15399$as_echo "#define USER_FULL_NAME pw->pw_gecos" >>confdefs.h
15400
15401
15402
942f733f 15403
9ff736dc
GM
15404$as_echo "#define DIRECTORY_SEP '/'" >>confdefs.h
15405
15406
15407
f199cab1 15408
6b10626d
GM
15409
15410$as_echo "#define IS_DEVICE_SEP(_c_) 0" >>confdefs.h
15411
15412
15413
15414$as_echo "#define IS_DIRECTORY_SEP(_c_) ((_c_) == DIRECTORY_SEP)" >>confdefs.h
15415
15416
15417
15418$as_echo "#define IS_ANY_SEP(_c_) (IS_DIRECTORY_SEP (_c_))" >>confdefs.h
15419
15420
15421
15422
15423
5476a9a4
GM
15424case $opsys in
15425 aix4-2)
15426 if test x$ac_cv_lib_Xmu_XmuConvertStandardSelection != xyes; then
15427 $as_echo "#define NO_EDITRES 1" >>confdefs.h
f199cab1 15428
5476a9a4
GM
15429 fi
15430 ;;
f199cab1 15431
5476a9a4
GM
15432 hpux*)
15433 $as_echo "#define NO_EDITRES 1" >>confdefs.h
f199cab1 15434
5476a9a4
GM
15435 ;;
15436esac
f199cab1
GM
15437
15438
5476a9a4 15439case $opsys in
5476a9a4 15440 irix6-5 | sol2* | unixware )
f199cab1 15441
5476a9a4 15442$as_echo "#define NSIG_MINIMUM 32" >>confdefs.h
f199cab1 15443
5476a9a4
GM
15444 ;;
15445esac
f199cab1 15446
4fa92495 15447emacs_broken_SIGIO=no
f199cab1 15448
5476a9a4
GM
15449case $opsys in
15450 hpux* | irix6-5 | openbsd | sol2* | unixware )
4fa92495 15451 emacs_broken_SIGIO=yes
5476a9a4 15452 ;;
f199cab1 15453
5476a9a4 15454 aix4-2)
f199cab1 15455
5476a9a4 15456$as_echo "#define BROKEN_GET_CURRENT_DIR_NAME 1" >>confdefs.h
067d23c9 15457
5476a9a4 15458 ;;
067d23c9 15459
5476a9a4 15460 freebsd)
f199cab1 15461
5476a9a4 15462$as_echo "#define BROKEN_PTY_READ_AFTER_EAGAIN 1" >>confdefs.h
f199cab1 15463
5476a9a4 15464 ;;
5476a9a4 15465esac
f199cab1 15466
5476a9a4
GM
15467case $opsys in
15468 gnu-* | sol2-10 )
f199cab1 15469
5476a9a4 15470$as_echo "#define HAVE_PROCFS 1" >>confdefs.h
f199cab1 15471
5476a9a4
GM
15472 ;;
15473esac
f199cab1 15474
5476a9a4
GM
15475case $opsys in
15476 darwin | freebsd | netbsd | openbsd )
f199cab1 15477
5476a9a4 15478$as_echo "#define DONT_REOPEN_PTY 1" >>confdefs.h
f199cab1 15479
5476a9a4
GM
15480 ;;
15481esac
f199cab1 15482
5476a9a4
GM
15483case $opsys in
15484 netbsd | openbsd) sound_device="/dev/audio" ;;
15485 *) sound_device="/dev/dsp" ;;
15486esac
f199cab1 15487
f199cab1 15488
5476a9a4
GM
15489cat >>confdefs.h <<_ACEOF
15490#define DEFAULT_SOUND_DEVICE "$sound_device"
15491_ACEOF
f199cab1
GM
15492
15493
15494
5476a9a4
GM
15495case $opsys in
15496 darwin | gnu-linux | gnu-kfreebsd )
f199cab1 15497
5476a9a4 15498$as_echo "#define INTERRUPT_INPUT 1" >>confdefs.h
f199cab1 15499
5476a9a4
GM
15500 ;;
15501esac
f199cab1 15502
f199cab1 15503
5476a9a4
GM
15504case $opsys in
15505 cygwin|gnu|gnu-linux|gnu-kfreebsd|irix6-5|freebsd|netbsd|openbsd)
f199cab1 15506
5476a9a4 15507$as_echo "#define NARROWPROTO 1" >>confdefs.h
067d23c9 15508
5476a9a4
GM
15509 ;;
15510esac
f199cab1
GM
15511
15512
067d23c9 15513
1f5d53eb
PE
15514
15515
f199cab1 15516
f199cab1 15517
7d2a1c5e 15518
5476a9a4
GM
15519case $opsys in
15520 aix4-2 )
a09508f2 15521 $as_echo "#define PTY_ITERATION int c; for (c = 0; !c ; c++)" >>confdefs.h
f199cab1 15522
a09508f2 15523 $as_echo "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptc\");" >>confdefs.h
f199cab1 15524
a09508f2 15525 $as_echo "#define PTY_TTY_NAME_SPRINTF strcpy (pty_name, ttyname (fd));" >>confdefs.h
7d2a1c5e 15526
5476a9a4 15527 ;;
7d2a1c5e 15528
5476a9a4 15529 cygwin )
a09508f2 15530 $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++)" >>confdefs.h
7d2a1c5e 15531
843f2634 15532 $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 15533
a09508f2 15534 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
7d2a1c5e 15535
a09508f2 15536 $as_echo "#define PTY_TTY_NAME_SPRINTF /**/" >>confdefs.h
f199cab1 15537
5476a9a4 15538 ;;
f199cab1 15539
1146da8d 15540 darwin )
a09508f2 15541 $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++)" >>confdefs.h
7d2a1c5e 15542
5476a9a4 15543 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
7d2a1c5e 15544
a09508f2 15545 $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 15546
a09508f2 15547 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
f199cab1 15548
a09508f2 15549 $as_echo "#define PTY_TTY_NAME_SPRINTF /**/" >>confdefs.h
f199cab1 15550
5476a9a4 15551 ;;
f199cab1 15552
1146da8d 15553 gnu | openbsd )
5476a9a4 15554 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
f199cab1 15555
5476a9a4 15556 ;;
f199cab1 15557
1146da8d 15558 gnu-linux | gnu-kfreebsd | freebsd | netbsd )
5476a9a4 15559 if test "x$ac_cv_func_grantpt" = xyes; then
f199cab1 15560
5476a9a4 15561$as_echo "#define UNIX98_PTYS 1" >>confdefs.h
f199cab1 15562
a09508f2 15563 $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++)" >>confdefs.h
f199cab1 15564
843f2634 15565 $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 15566
1146da8d
GM
15567 if test "x$ac_cv_func_posix_openpt" = xyes; then
15568 $as_echo "#define PTY_OPEN fd = posix_openpt (O_RDWR | O_NOCTTY)" >>confdefs.h
15569
15570 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
15571
15572 elif test "x$ac_cv_func_getpt" = xyes; then
5476a9a4 15573 $as_echo "#define PTY_OPEN fd = getpt ()" >>confdefs.h
f199cab1 15574
a09508f2 15575 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
f199cab1 15576
5476a9a4 15577 else
a09508f2 15578 $as_echo "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptmx\");" >>confdefs.h
f199cab1 15579
5476a9a4
GM
15580 fi
15581 else
15582 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
f199cab1 15583
5476a9a4
GM
15584 fi
15585 ;;
f199cab1 15586
5476a9a4
GM
15587 hpux*)
15588 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
f199cab1 15589
a09508f2 15590 $as_echo "#define PTY_NAME_SPRINTF sprintf (pty_name, \"/dev/ptym/pty%c%x\", c, i);" >>confdefs.h
f199cab1 15591
a09508f2 15592 $as_echo "#define PTY_TTY_NAME_SPRINTF sprintf (pty_name, \"/dev/pty/tty%c%x\", c, i);" >>confdefs.h
f199cab1 15593
5476a9a4 15594 ;;
f199cab1 15595
5476a9a4
GM
15596 irix6-5 )
15597 $as_echo "#define PTY_ITERATION /**/" >>confdefs.h
f199cab1 15598
5476a9a4 15599 $as_echo "#define FIRST_PTY_LETTER 'q'" >>confdefs.h
f199cab1 15600
e4184a20 15601 $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 15602
a09508f2 15603 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
f199cab1 15604
a09508f2 15605 $as_echo "#define PTY_TTY_NAME_SPRINTF /**/" >>confdefs.h
f199cab1 15606
5476a9a4 15607 ;;
f199cab1 15608
5476a9a4 15609 sol2* )
e4184a20 15610 $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 15611
5476a9a4 15612 ;;
f199cab1 15613
5476a9a4 15614 unixware )
e4184a20 15615 $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
15616
15617 ;;
15618esac
15619
15620
15621case $opsys in
15622 sol2* | unixware )
15623 $as_echo "#define FIRST_PTY_LETTER 'z'" >>confdefs.h
15624
a09508f2 15625 $as_echo "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptmx\");" >>confdefs.h
5476a9a4
GM
15626
15627
15628$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
15629
15630 ;;
15631esac
15632
15633
15634
15635
15636case $opsys in
c396a953 15637 aix4-2 | cygwin | gnu | irix6-5 | freebsd | netbsd | openbsd | darwin )
5476a9a4
GM
15638 $as_echo "#define SIGNALS_VIA_CHARACTERS 1" >>confdefs.h
15639
15640 ;;
15641
15642 gnu-linux | gnu-kfreebsd )
15643
15644 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signals via characters" >&5
15645$as_echo_n "checking for signals via characters... " >&6; }
15646 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1f5d53eb 15647/* end confdefs.h. */
5476a9a4
GM
15648
15649#include <linux/version.h>
15650#if LINUX_VERSION_CODE < 0x20400
15651# error "Linux version too old"
15652#endif
15653
3e0be4ab
GM
15654int
15655main ()
15656{
f199cab1 15657
3e0be4ab
GM
15658 ;
15659 return 0;
15660}
067d23c9 15661_ACEOF
5476a9a4
GM
15662if ac_fn_c_try_cpp "$LINENO"; then :
15663 emacs_signals_via_chars=yes
1f5d53eb 15664else
5476a9a4 15665 emacs_signals_via_chars=no
067d23c9 15666fi
5476a9a4 15667rm -f conftest.err conftest.$ac_ext
067d23c9 15668
5476a9a4
GM
15669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_signals_via_chars" >&5
15670$as_echo "$emacs_signals_via_chars" >&6; }
15671 test $emacs_signals_via_chars = yes && $as_echo "#define SIGNALS_VIA_CHARACTERS 1" >>confdefs.h
15672
15673 ;;
15674esac
15675
15676
15677
15678
f199cab1 15679
5476a9a4
GM
15680case $opsys in
15681 gnu)
15682 $as_echo "#define DATA_START ({ extern int data_start; (char *) &data_start; })" >>confdefs.h
f199cab1 15683
5476a9a4 15684 ;;
067d23c9 15685
5476a9a4
GM
15686 hpux*)
15687 $as_echo "#define DATA_START 0x40000000" >>confdefs.h
067d23c9 15688
5476a9a4 15689 $as_echo "#define DATA_SEG_BITS 0x40000000" >>confdefs.h
067d23c9 15690
5476a9a4
GM
15691 ;;
15692 irix6-5)
15693 $as_echo "#define DATA_START 0x10000000" >>confdefs.h
067d23c9 15694
5476a9a4 15695 $as_echo "#define DATA_SEG_BITS 0x10000000" >>confdefs.h
067d23c9 15696
5476a9a4
GM
15697 ;;
15698esac
067d23c9 15699
1f5d53eb 15700
1f5d53eb 15701
067d23c9 15702
5476a9a4
GM
15703case $opsys in
15704 darwin) $as_echo "#define TAB3 OXTABS" >>confdefs.h
15705 ;;
f199cab1 15706
5476a9a4 15707 gnu | freebsd | netbsd | openbsd )
f199cab1 15708
5476a9a4 15709$as_echo "#define TABDLY OXTABS" >>confdefs.h
f199cab1 15710
5476a9a4 15711 $as_echo "#define TAB3 OXTABS" >>confdefs.h
f199cab1 15712
5476a9a4 15713 ;;
f199cab1 15714
5476a9a4 15715 gnu-linux | gnu-kfreebsd )
5476a9a4
GM
15716 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15717/* end confdefs.h. */
3e0be4ab 15718
5476a9a4
GM
15719#ifndef __ia64__
15720# error "not ia64"
15721#endif
067d23c9 15722
5476a9a4
GM
15723int
15724main ()
15725{
3e0be4ab 15726
5476a9a4
GM
15727 ;
15728 return 0;
15729}
15730_ACEOF
15731if ac_fn_c_try_cpp "$LINENO"; then :
f199cab1 15732
5476a9a4 15733$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 15734
3e0be4ab 15735fi
5476a9a4
GM
15736rm -f conftest.err conftest.$ac_ext
15737 ;;
067d23c9 15738
5476a9a4 15739 hpux*)
3e0be4ab 15740
5476a9a4 15741$as_echo "#define RUN_TIME_REMAP 1" >>confdefs.h
3e0be4ab 15742
5476a9a4 15743 ;;
5476a9a4 15744esac
3e0be4ab
GM
15745
15746
f199cab1 15747
e700232f
GM
15748
15749
5476a9a4 15750case $opsys in
5476a9a4
GM
15751 gnu-linux | gnu-kfreebsd )
15752 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1fd182f0 15753/* end confdefs.h. */
f199cab1 15754
5476a9a4
GM
15755#if defined __i386__ || defined __sparc__ || defined __mc68000__ \
15756 || defined __alpha__ || defined __mips__ || defined __s390__ \
15757 || defined __arm__ || defined __powerpc__ || defined __amd64__ \
15758 || defined __ia64__ || defined __sh__
15759/* ok */
15760#else
15761# error "setjmp not known to work on this arch"
15762#endif
15763
f199cab1
GM
15764int
15765main ()
1fd182f0 15766{
5476a9a4 15767
f199cab1
GM
15768 ;
15769 return 0;
1fd182f0
PE
15770}
15771_ACEOF
5476a9a4
GM
15772if ac_fn_c_try_cpp "$LINENO"; then :
15773 $as_echo "#define GC_SETJMP_WORKS 1" >>confdefs.h
f199cab1 15774
1f5d53eb 15775fi
5476a9a4
GM
15776rm -f conftest.err conftest.$ac_ext
15777 ;;
15778esac
1fd182f0 15779
f199cab1 15780
5476a9a4
GM
15781if test x$GCC = xyes; then
15782 $as_echo "#define GC_SETJMP_WORKS 1" >>confdefs.h
15783
1fd182f0 15784else
5476a9a4
GM
15785 case $opsys in
15786 freebsd | netbsd | openbsd | irix6-5 | sol2* )
15787 $as_echo "#define GC_SETJMP_WORKS 1" >>confdefs.h
1fd182f0 15788
5476a9a4
GM
15789 ;;
15790 esac
15791fi
6ec9a5a7
GM
15792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _setjmp" >&5
15793$as_echo_n "checking for _setjmp... " >&6; }
15794if test "${emacs_cv_func__setjmp+set}" = set; then :
15795 $as_echo_n "(cached) " >&6
15796else
15797 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15798/* end confdefs.h. */
15799#include <setjmp.h>
1fd182f0 15800
6ec9a5a7
GM
15801int
15802main ()
15803{
15804jmp_buf j;
15805 if (! _setjmp (j))
15806 _longjmp (j, 1);
15807 ;
15808 return 0;
15809}
15810_ACEOF
15811if ac_fn_c_try_link "$LINENO"; then :
15812 emacs_cv_func__setjmp=yes
15813else
15814 emacs_cv_func__setjmp=no
15815fi
15816rm -f core conftest.err conftest.$ac_objext \
15817 conftest$ac_exeext conftest.$ac_ext
15818fi
15819{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_func__setjmp" >&5
15820$as_echo "$emacs_cv_func__setjmp" >&6; }
e2d8f316 15821if test $emacs_cv_func__setjmp = yes; then
906debc3 15822
e2d8f316 15823$as_echo "#define HAVE__SETJMP 1" >>confdefs.h
906debc3 15824
e2d8f316
GM
15825else
15826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
15827$as_echo_n "checking for sigsetjmp... " >&6; }
15828if test "${emacs_cv_func_sigsetjmp+set}" = set; then :
15829 $as_echo_n "(cached) " >&6
15830else
15831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15832/* end confdefs.h. */
15833#include <setjmp.h>
15834
15835int
15836main ()
15837{
15838sigjmp_buf j;
15839 if (! sigsetjmp (j, 1))
15840 siglongjmp (j, 1);
15841 ;
15842 return 0;
15843}
15844_ACEOF
15845if ac_fn_c_try_link "$LINENO"; then :
15846 emacs_cv_func_sigsetjmp=yes
15847else
15848 emacs_cv_func_sigsetjmp=no
15849fi
15850rm -f core conftest.err conftest.$ac_objext \
15851 conftest$ac_exeext conftest.$ac_ext
15852fi
15853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_func_sigsetjmp" >&5
15854$as_echo "$emacs_cv_func_sigsetjmp" >&6; }
15855 if test $emacs_cv_func_sigsetjmp = yes; then
906debc3 15856
e2d8f316 15857$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
906debc3 15858
e2d8f316 15859 fi
6ec9a5a7
GM
15860fi
15861
15862case $opsys in
15863 sol2* | unixware )
906debc3
GM
15864
15865$as_echo "#define TIOCSIGSEND TIOCSIGNAL" >>confdefs.h
15866
15867 ;;
15868esac
15869
906debc3 15870
5476a9a4
GM
15871case $opsys in
15872 hpux* | sol2* )
1f5d53eb 15873
5476a9a4 15874$as_echo "#define XOS_NEEDS_TIME_H 1" >>confdefs.h
1f5d53eb 15875
5476a9a4
GM
15876 ;;
15877esac
1f5d53eb 15878
1f5d53eb 15879
4fda9c95 15880
3e0be4ab 15881
4fda9c95 15882
4fda9c95 15883
f199cab1 15884
906debc3 15885
7cd2ed2c 15886
5476a9a4
GM
15887case $opsys in
15888 aix4-2)
15889 $as_echo "#define USG /**/" >>confdefs.h
15890
15891 $as_echo "#define USG5 /**/" >>confdefs.h
15892
15893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15894/* end confdefs.h. */
15895
15896#ifndef _AIX
15897# error "_AIX not defined"
15898#endif
f199cab1 15899
4fda9c95
GM
15900int
15901main ()
15902{
3e0be4ab 15903
4fda9c95
GM
15904 ;
15905 return 0;
15906}
15907_ACEOF
5476a9a4 15908if ac_fn_c_try_cpp "$LINENO"; then :
4fda9c95 15909
3e0be4ab 15910else
4fda9c95 15911
5476a9a4 15912$as_echo "#define _AIX /**/" >>confdefs.h
3e0be4ab 15913
5476a9a4
GM
15914fi
15915rm -f conftest.err conftest.$ac_ext
15916 ;;
4fda9c95 15917
5476a9a4 15918 cygwin)
3e0be4ab 15919
5476a9a4 15920$as_echo "#define CYGWIN 1" >>confdefs.h
f199cab1 15921
5476a9a4 15922 ;;
f199cab1 15923
5476a9a4 15924 darwin)
b0a49335 15925 $as_echo "#define BSD_SYSTEM /**/" >>confdefs.h
f199cab1
GM
15926
15927
5476a9a4 15928$as_echo "#define DARWIN_OS /**/" >>confdefs.h
f199cab1 15929
5476a9a4 15930 ;;
4fda9c95 15931
5476a9a4 15932 freebsd)
4fda9c95 15933
5476a9a4 15934$as_echo "#define BSD_SYSTEM_AHB 1" >>confdefs.h
4fda9c95 15935
5476a9a4 15936 ;;
f199cab1 15937
5476a9a4 15938 gnu | netbsd | openbsd )
5476a9a4
GM
15939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15940/* end confdefs.h. */
f199cab1 15941
5476a9a4
GM
15942#ifndef BSD_SYSTEM
15943# error "BSD_SYSTEM not defined"
15944#endif
f199cab1 15945
5476a9a4
GM
15946int
15947main ()
15948{
f199cab1 15949
5476a9a4
GM
15950 ;
15951 return 0;
15952}
f199cab1 15953_ACEOF
5476a9a4 15954if ac_fn_c_try_cpp "$LINENO"; then :
4fda9c95 15955
3e0be4ab 15956else
5476a9a4 15957 $as_echo "#define BSD_SYSTEM 43" >>confdefs.h
4fda9c95 15958
5476a9a4
GM
15959fi
15960rm -f conftest.err conftest.$ac_ext
15961 ;;
4fda9c95 15962
5476a9a4
GM
15963 gnu-linux | gnu-kfreebsd )
15964 $as_echo "#define USG /**/" >>confdefs.h
4fda9c95 15965
f199cab1 15966
5476a9a4 15967$as_echo "#define GNU_LINUX /**/" >>confdefs.h
4fda9c95 15968
5476a9a4 15969 ;;
4fda9c95 15970
5476a9a4
GM
15971 hpux*)
15972 $as_echo "#define USG /**/" >>confdefs.h
4fda9c95 15973
5476a9a4 15974 $as_echo "#define USG5 /**/" >>confdefs.h
697210c4 15975
4717915f 15976
5476a9a4 15977$as_echo "#define HPUX /**/" >>confdefs.h
697210c4 15978
5476a9a4 15979 ;;
697210c4 15980
5476a9a4
GM
15981 irix6-5)
15982 $as_echo "#define USG /**/" >>confdefs.h
f199cab1 15983
5476a9a4 15984 $as_echo "#define USG5 /**/" >>confdefs.h
f199cab1 15985
906debc3
GM
15986 $as_echo "#define USG5_4 /**/" >>confdefs.h
15987
f199cab1 15988
5476a9a4 15989$as_echo "#define IRIX6_5 /**/" >>confdefs.h
f199cab1 15990
5476a9a4 15991 ;;
f199cab1 15992
5476a9a4
GM
15993 sol2*)
15994 $as_echo "#define USG /**/" >>confdefs.h
4fda9c95 15995
5476a9a4 15996 $as_echo "#define USG5 /**/" >>confdefs.h
4fda9c95 15997
906debc3
GM
15998 $as_echo "#define USG5_4 /**/" >>confdefs.h
15999
4fda9c95 16000
5476a9a4 16001$as_echo "#define SOLARIS2 /**/" >>confdefs.h
f199cab1 16002
5476a9a4 16003 ;;
f199cab1 16004
5476a9a4
GM
16005 unixware)
16006 $as_echo "#define USG /**/" >>confdefs.h
f199cab1 16007
5476a9a4 16008 $as_echo "#define USG5 /**/" >>confdefs.h
f199cab1 16009
906debc3
GM
16010 $as_echo "#define USG5_4 /**/" >>confdefs.h
16011
5476a9a4
GM
16012 ;;
16013esac
f199cab1 16014
4fa92495
GM
16015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable FIONREAD" >&5
16016$as_echo_n "checking for usable FIONREAD... " >&6; }
16017if test "${emacs_cv_usable_FIONREAD+set}" = set; then :
16018 $as_echo_n "(cached) " >&6
16019else
16020 case $opsys in
16021 aix4-2)
16022 emacs_cv_usable_FIONREAD=no
16023 ;;
16024
16025 *)
16026 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16027/* end confdefs.h. */
16028#include <sys/types.h>
16029 #include <sys/ioctl.h>
16030 #ifdef USG5_4
16031 # include <sys/filio.h>
16032 #endif
16033
16034int
16035main ()
16036{
16037int foo = ioctl (0, FIONREAD, &foo);
16038 ;
16039 return 0;
16040}
16041_ACEOF
16042if ac_fn_c_try_compile "$LINENO"; then :
16043 emacs_cv_usable_FIONREAD=yes
16044else
16045 emacs_cv_usable_FIONREAD=no
16046fi
16047rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16048 ;;
16049 esac
16050fi
16051{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_usable_FIONREAD" >&5
16052$as_echo "$emacs_cv_usable_FIONREAD" >&6; }
16053if test $emacs_cv_usable_FIONREAD = yes; then
16054
16055$as_echo "#define USABLE_FIONREAD 1" >>confdefs.h
16056
16057
16058 if test $emacs_broken_SIGIO = no; then
16059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable SIGIO" >&5
16060$as_echo_n "checking for usable SIGIO... " >&6; }
16061if test "${emacs_cv_usable_SIGIO+set}" = set; then :
16062 $as_echo_n "(cached) " >&6
16063else
16064 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16065/* end confdefs.h. */
16066#include <fcntl.h>
16067 #include <signal.h>
16068
16069int
16070main ()
16071{
16072int foo = SIGIO | F_SETFL | FASYNC;
16073 ;
16074 return 0;
16075}
16076_ACEOF
16077if ac_fn_c_try_compile "$LINENO"; then :
16078 emacs_cv_usable_SIGIO=yes
16079else
16080 emacs_cv_usable_SIGIO=no
16081fi
16082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16083fi
16084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_usable_SIGIO" >&5
16085$as_echo "$emacs_cv_usable_SIGIO" >&6; }
16086 if test $emacs_cv_usable_SIGIO = yes; then
16087
16088$as_echo "#define USABLE_SIGIO 1" >>confdefs.h
16089
16090 fi
16091 fi
16092fi
16093
4fda9c95 16094
5476a9a4
GM
16095case $opsys in
16096 cygwin)
4fda9c95 16097
5476a9a4 16098$as_echo "#define G_SLICE_ALWAYS_MALLOC 1" >>confdefs.h
4fda9c95 16099
5476a9a4 16100 ;;
4fda9c95 16101
5476a9a4 16102 hpux11)
f199cab1 16103
5476a9a4 16104$as_echo "#define USG_SUBTTY_WORKS 1" >>confdefs.h
f199cab1 16105
5476a9a4 16106 ;;
f199cab1 16107
5476a9a4 16108 irix6-5)
f199cab1 16109
5476a9a4 16110$as_echo "#define PREFER_VSUSP 1" >>confdefs.h
f199cab1 16111
5476a9a4 16112 ;;
f199cab1 16113
5476a9a4 16114 sol2-10)
f199cab1 16115
5476a9a4 16116$as_echo "#define _STRUCTURED_PROC 1" >>confdefs.h
f199cab1 16117
5476a9a4
GM
16118 ;;
16119esac
f199cab1 16120
5476a9a4
GM
16121# Set up the CFLAGS for real compilation, so we can substitute it.
16122CFLAGS="$REAL_CFLAGS"
16123CPPFLAGS="$REAL_CPPFLAGS"
f199cab1 16124
5476a9a4
GM
16125## Hack to detect a buggy GCC version.
16126if test "x$GCC" = xyes \
16127 && test x"`$CC --version 2> /dev/null | grep 'gcc.* 4.5.0'`" != x \
16128 && test x"`echo $CFLAGS | grep '\-O[23]'`" != x \
16129 && test x"`echo $CFLAGS | grep '\-fno-optimize-sibling-calls'`" = x; then
16130 as_fn_error "GCC 4.5.0 has problems compiling Emacs; see etc/PROBLEMS'." "$LINENO" 5
16131fi
f199cab1 16132
5476a9a4 16133version=$PACKAGE_VERSION
f199cab1 16134
0778f6f0 16135copyright="Copyright (C) 2013 Free Software Foundation, Inc."
bb7dce39
GM
16136
16137cat >>confdefs.h <<_ACEOF
16138#define COPYRIGHT "$copyright"
16139_ACEOF
16140
16141
16142
5476a9a4
GM
16143### Specify what sort of things we'll be editing into Makefile and config.h.
16144### Use configuration here uncanonicalized to avoid exceeding size limits.
4fda9c95 16145
f199cab1 16146
5476a9a4 16147## Unused?
4fda9c95
GM
16148
16149
16150
16151
4717915f 16152
4717915f 16153
4717915f 16154
4717915f 16155
4717915f 16156
4717915f 16157
4717915f 16158
4717915f 16159
4717915f 16160
4717915f 16161
4717915f 16162
4717915f
GM
16163
16164
4717915f
GM
16165
16166
4717915f 16167
4717915f 16168
4717915f 16169
5476a9a4
GM
16170## FIXME? Nothing uses @LD_SWITCH_X_SITE@.
16171## src/Makefile.in did add LD_SWITCH_X_SITE (as a cpp define) to the
16172## end of LIBX_BASE, but nothing ever set it.
4717915f 16173
4717915f 16174
4fda9c95 16175
4fda9c95 16176
5476a9a4
GM
16177## Used in lwlib/Makefile.in.
16178
4fda9c95 16179
4fda9c95 16180
4fda9c95
GM
16181
16182
16183
16184
4fda9c95 16185
42dcba54
GM
16186if test -n "${term_header}"; then
16187
16188cat >>confdefs.h <<_ACEOF
16189#define TERM_HEADER "${term_header}"
16190_ACEOF
16191
16192fi
16193
4fda9c95 16194
5476a9a4
GM
16195cat >>confdefs.h <<_ACEOF
16196#define EMACS_CONFIGURATION "${canonical}"
16197_ACEOF
4fda9c95 16198
e25a10b7 16199emacs_config_options=`echo "$emacs_config_options" | sed -e "s/\"/'/g"`
4fda9c95 16200
5476a9a4 16201cat >>confdefs.h <<_ACEOF
e25a10b7 16202#define EMACS_CONFIG_OPTIONS "${emacs_config_options}"
5476a9a4
GM
16203_ACEOF
16204
5476a9a4 16205
4fda9c95 16206
5476a9a4
GM
16207XMENU_OBJ=
16208XOBJ=
16209FONT_OBJ=
16210if test "${HAVE_X_WINDOWS}" = "yes" ; then
16211
16212$as_echo "#define HAVE_X_WINDOWS 1" >>confdefs.h
4fda9c95 16213
5476a9a4 16214 XMENU_OBJ=xmenu.o
42dcba54 16215 XOBJ="xterm.o xfns.o xselect.o xrdb.o xsmfns.o xsettings.o xgselect.o"
5476a9a4
GM
16216 FONT_OBJ=xfont.o
16217 if test "$HAVE_XFT" = "yes"; then
16218 FONT_OBJ="$FONT_OBJ ftfont.o xftfont.o ftxfont.o"
16219 elif test "$HAVE_FREETYPE" = "yes"; then
16220 FONT_OBJ="$FONT_OBJ ftfont.o ftxfont.o"
16221 fi
4fda9c95 16222
f199cab1 16223fi
4fda9c95 16224
4fda9c95 16225
4fda9c95 16226
4fda9c95 16227
5476a9a4
GM
16228WIDGET_OBJ=
16229MOTIF_LIBW=
16230if test "${USE_X_TOOLKIT}" != "none" ; then
16231 WIDGET_OBJ=widget.o
16232
16233$as_echo "#define USE_X_TOOLKIT 1" >>confdefs.h
16234
16235 if test "${USE_X_TOOLKIT}" = "LUCID"; then
16236
16237$as_echo "#define USE_LUCID 1" >>confdefs.h
e1939eb1 16238
5476a9a4 16239 elif test "${USE_X_TOOLKIT}" = "MOTIF"; then
4fda9c95 16240
5476a9a4 16241$as_echo "#define USE_MOTIF 1" >>confdefs.h
3e0be4ab 16242
5476a9a4
GM
16243 MOTIF_LIBW=-lXm
16244 case "$opsys" in
16245 gnu-linux)
16246 ## Paul Abrahams <abrahams at equinox.shaysnet.com> says this is needed.
16247 MOTIF_LIBW="$MOTIF_LIBW -lXpm"
16248 ;;
3e0be4ab 16249
5476a9a4
GM
16250 unixware)
16251 ## Richard Anthony Ryan <ryanr at ellingtn.ftc.nrcs.usda.gov>
16252 ## says -lXimp is needed in UNIX_SV ... 4.2 1.1.2.
16253 MOTIF_LIBW="MOTIF_LIBW -lXimp"
16254 ;;
3e0be4ab 16255
5476a9a4
GM
16256 aix4-2)
16257 ## olson@mcs.anl.gov says -li18n is needed by -lXm.
16258 MOTIF_LIBW="$MOTIF_LIBW -li18n"
16259 ;;
16260 esac
16261 MOTIF_LIBW="$MOTIF_LIBW $LIBXP"
16262 fi
16263fi
4fda9c95 16264
3e0be4ab 16265
5476a9a4
GM
16266TOOLKIT_LIBW=
16267case "$USE_X_TOOLKIT" in
16268 MOTIF) TOOLKIT_LIBW="$MOTIF_LIBW" ;;
16269 LUCID) TOOLKIT_LIBW="$LUCID_LIBW" ;;
16270 none) test "x$HAVE_GTK" = "xyes" && TOOLKIT_LIBW="$GTK_LIBS" ;;
16271esac
4fda9c95
GM
16272
16273
5476a9a4
GM
16274if test "$USE_X_TOOLKIT" = "none"; then
16275 LIBXT_OTHER="\$(LIBXSM)"
16276 OLDXMENU_TARGET="really-oldXMenu"
16277else
16278 LIBXT_OTHER="\$(LIBXMU) -lXt \$(LIBXTR6) -lXext"
16279 OLDXMENU_TARGET="really-lwlib"
16280fi
4fda9c95
GM
16281
16282
5476a9a4
GM
16283## The X Menu stuff is present in the X10 distribution, but missing
16284## from X11. If we have X10, just use the installed library;
16285## otherwise, use our own copy.
16286if test "${HAVE_X11}" = "yes" ; then
4fda9c95 16287
5476a9a4 16288$as_echo "#define HAVE_X11 1" >>confdefs.h
4fda9c95 16289
4fda9c95 16290
5476a9a4
GM
16291 if test "$USE_X_TOOLKIT" = "none"; then
16292 OLDXMENU="\${oldXMenudir}/libXMenu11.a"
16293 else
16294 OLDXMENU="\${lwlibdir}/liblw.a"
16295 fi
16296 LIBXMENU="\$(OLDXMENU)"
16297 LIBX_OTHER="\$(LIBXT) \$(LIBX_EXTRA)"
16298 OLDXMENU_DEPS="\${OLDXMENU} ../src/\${OLDXMENU}"
f199cab1 16299else
5476a9a4
GM
16300 ## For a syntactically valid Makefile; not actually used for anything.
16301 ## See comments in src/Makefile.in.
16302 OLDXMENU=nothing
16303 ## FIXME This case (!HAVE_X11 && HAVE_X_WINDOWS) is no longer possible(?).
16304 if test "${HAVE_X_WINDOWS}" = "yes"; then
16305 LIBXMENU="-lXMenu"
16306 else
16307 LIBXMENU=
16308 fi
16309 LIBX_OTHER=
16310 OLDXMENU_DEPS=
16311fi
4fda9c95 16312
5476a9a4
GM
16313if test "$HAVE_GTK" = "yes" || test "$HAVE_MENUS" != "yes"; then
16314 OLDXMENU_TARGET=
16315 OLDXMENU=nothing
16316 LIBXMENU=
16317 OLDXMENU_DEPS=
16318fi
4fda9c95 16319
4fda9c95
GM
16320
16321
3e0be4ab 16322
4fda9c95 16323
3e0be4ab 16324
3e0be4ab 16325
5476a9a4 16326if test "${HAVE_MENUS}" = "yes" ; then
3e0be4ab 16327
5476a9a4 16328$as_echo "#define HAVE_MENUS 1" >>confdefs.h
4fda9c95 16329
5476a9a4 16330fi
4fda9c95 16331
5476a9a4 16332if test "${GNU_MALLOC}" = "yes" ; then
4fda9c95 16333
5476a9a4 16334$as_echo "#define GNU_MALLOC 1" >>confdefs.h
4fda9c95 16335
5476a9a4 16336fi
3e0be4ab 16337
5476a9a4
GM
16338RALLOC_OBJ=
16339if test "${REL_ALLOC}" = "yes" ; then
16340
16341$as_echo "#define REL_ALLOC 1" >>confdefs.h
4fda9c95
GM
16342
16343
5476a9a4
GM
16344 test "$system_malloc" != "yes" && RALLOC_OBJ=ralloc.o
16345fi
4fda9c95 16346
4fda9c95 16347
5476a9a4 16348if test "$opsys" = "cygwin"; then
5c0255d9 16349 CYGWIN_OBJ="sheap.o cygw32.o"
5476a9a4
GM
16350 ## Cygwin differs because of its unexec().
16351 PRE_ALLOC_OBJ=
16352 POST_ALLOC_OBJ=lastfile.o
16353else
16354 CYGWIN_OBJ=
16355 PRE_ALLOC_OBJ=lastfile.o
16356 POST_ALLOC_OBJ=
16357fi
4fda9c95 16358
3e0be4ab 16359
3e0be4ab 16360
3e0be4ab 16361
5476a9a4
GM
16362# Configure gnulib. Although this does not affect CFLAGS or LIBS permanently.
16363# it temporarily reverts them to their pre-pkg-config values,
16364# because gnulib needs to work with both src (which uses the
16365# pkg-config stuff) and lib-src (which does not). For example, gnulib
16366# may need to determine whether LIB_CLOCK_GETTIME should contain -lrt,
16367# and it therefore needs to run in an environment where LIBS does not
16368# already contain -lrt merely because 'pkg-config --libs' printed '-lrt'
16369# for some package unrelated to lib-src.
16370SAVE_CFLAGS=$CFLAGS
16371SAVE_LIBS=$LIBS
16372CFLAGS=$pre_PKG_CONFIG_CFLAGS
16373LIBS="$LIB_PTHREAD $pre_PKG_CONFIG_LIBS"
3e0be4ab 16374
3e0be4ab
GM
16375
16376
4fda9c95 16377
4fda9c95 16378
3e0be4ab 16379
3e0be4ab
GM
16380
16381
4fda9c95 16382
3e0be4ab
GM
16383
16384
5476a9a4
GM
16385 LIBC_FATAL_STDERR_=1
16386 export LIBC_FATAL_STDERR_
3e0be4ab 16387
5476a9a4
GM
16388# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
16389# for constant arguments. Useless!
16390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
16391$as_echo_n "checking for working alloca.h... " >&6; }
16392if test "${ac_cv_working_alloca_h+set}" = set; then :
16393 $as_echo_n "(cached) " >&6
16394else
16395 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16396/* end confdefs.h. */
16397#include <alloca.h>
16398int
16399main ()
16400{
16401char *p = (char *) alloca (2 * sizeof (int));
16402 if (p) return 0;
16403 ;
16404 return 0;
16405}
16406_ACEOF
16407if ac_fn_c_try_link "$LINENO"; then :
16408 ac_cv_working_alloca_h=yes
16409else
16410 ac_cv_working_alloca_h=no
16411fi
16412rm -f core conftest.err conftest.$ac_objext \
16413 conftest$ac_exeext conftest.$ac_ext
16414fi
16415{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
16416$as_echo "$ac_cv_working_alloca_h" >&6; }
16417if test $ac_cv_working_alloca_h = yes; then
3e0be4ab 16418
5476a9a4 16419$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
3e0be4ab 16420
5476a9a4 16421fi
3e0be4ab 16422
5476a9a4
GM
16423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
16424$as_echo_n "checking for alloca... " >&6; }
16425if test "${ac_cv_func_alloca_works+set}" = set; then :
f199cab1
GM
16426 $as_echo_n "(cached) " >&6
16427else
5476a9a4 16428 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 16429/* end confdefs.h. */
5476a9a4
GM
16430#ifdef __GNUC__
16431# define alloca __builtin_alloca
16432#else
16433# ifdef _MSC_VER
16434# include <malloc.h>
16435# define alloca _alloca
16436# else
16437# ifdef HAVE_ALLOCA_H
16438# include <alloca.h>
16439# else
16440# ifdef _AIX
16441 #pragma alloca
16442# else
16443# ifndef alloca /* predefined by HP cc +Olibcalls */
16444char *alloca ();
16445# endif
16446# endif
16447# endif
16448# endif
16449#endif
16450
16451int
16452main ()
16453{
16454char *p = (char *) alloca (1);
16455 if (p) return 0;
16456 ;
16457 return 0;
16458}
16459_ACEOF
16460if ac_fn_c_try_link "$LINENO"; then :
16461 ac_cv_func_alloca_works=yes
16462else
16463 ac_cv_func_alloca_works=no
16464fi
16465rm -f core conftest.err conftest.$ac_objext \
16466 conftest$ac_exeext conftest.$ac_ext
16467fi
16468{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
16469$as_echo "$ac_cv_func_alloca_works" >&6; }
16470
16471if test $ac_cv_func_alloca_works = yes; then
16472
16473$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
16474
16475else
16476 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
16477# that cause trouble. Some versions do not even contain alloca or
16478# contain a buggy version. If you still want to use their alloca,
16479# use ar to extract alloca.o from them instead of compiling alloca.c.
3e0be4ab 16480
4fda9c95 16481
4fda9c95 16482
4fda9c95
GM
16483
16484
5476a9a4 16485ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
4fda9c95 16486
5476a9a4 16487$as_echo "#define C_ALLOCA 1" >>confdefs.h
4fda9c95 16488
4fda9c95 16489
5476a9a4
GM
16490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether 'alloca.c' needs Cray hooks" >&5
16491$as_echo_n "checking whether 'alloca.c' needs Cray hooks... " >&6; }
16492if test "${ac_cv_os_cray+set}" = set; then :
16493 $as_echo_n "(cached) " >&6
16494else
16495 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16496/* end confdefs.h. */
16497#if defined CRAY && ! defined CRAY2
16498webecray
16499#else
16500wenotbecray
16501#endif
4fda9c95 16502
5476a9a4
GM
16503_ACEOF
16504if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16505 $EGREP "webecray" >/dev/null 2>&1; then :
16506 ac_cv_os_cray=yes
16507else
16508 ac_cv_os_cray=no
16509fi
16510rm -f conftest*
4fda9c95 16511
5476a9a4
GM
16512fi
16513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
16514$as_echo "$ac_cv_os_cray" >&6; }
16515if test $ac_cv_os_cray = yes; then
16516 for ac_func in _getb67 GETB67 getb67; do
16517 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16518ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16519eval as_val=\$$as_ac_var
16520 if test "x$as_val" = x""yes; then :
4fda9c95 16521
5476a9a4
GM
16522cat >>confdefs.h <<_ACEOF
16523#define CRAY_STACKSEG_END $ac_func
16524_ACEOF
4fda9c95 16525
5476a9a4
GM
16526 break
16527fi
4fda9c95 16528
5476a9a4
GM
16529 done
16530fi
4fda9c95 16531
5476a9a4
GM
16532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
16533$as_echo_n "checking stack direction for C alloca... " >&6; }
16534if test "${ac_cv_c_stack_direction+set}" = set; then :
16535 $as_echo_n "(cached) " >&6
16536else
16537 if test "$cross_compiling" = yes; then :
16538 ac_cv_c_stack_direction=0
16539else
16540 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16541/* end confdefs.h. */
16542$ac_includes_default
16543int
16544find_stack_direction (int *addr, int depth)
16545{
16546 int dir, dummy = 0;
16547 if (! addr)
16548 addr = &dummy;
16549 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
16550 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
16551 return dir + dummy;
16552}
4fda9c95 16553
5476a9a4
GM
16554int
16555main (int argc, char **argv)
16556{
16557 return find_stack_direction (0, argc + !argv + 20) < 0;
16558}
16559_ACEOF
16560if ac_fn_c_try_run "$LINENO"; then :
16561 ac_cv_c_stack_direction=1
16562else
16563 ac_cv_c_stack_direction=-1
16564fi
16565rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16566 conftest.$ac_objext conftest.beam conftest.$ac_ext
16567fi
4fda9c95 16568
5476a9a4
GM
16569fi
16570{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
16571$as_echo "$ac_cv_c_stack_direction" >&6; }
16572cat >>confdefs.h <<_ACEOF
16573#define STACK_DIRECTION $ac_cv_c_stack_direction
16574_ACEOF
3e0be4ab
GM
16575
16576
5476a9a4 16577fi
3e0be4ab
GM
16578
16579
16580
16581
5476a9a4
GM
16582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
16583$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
16584if test "${ac_cv_c_bigendian+set}" = set; then :
16585 $as_echo_n "(cached) " >&6
16586else
16587 ac_cv_c_bigendian=unknown
16588 # See if we're dealing with a universal compiler.
16589 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16590/* end confdefs.h. */
16591#ifndef __APPLE_CC__
16592 not a universal capable compiler
16593 #endif
16594 typedef int dummy;
16595
16596_ACEOF
16597if ac_fn_c_try_compile "$LINENO"; then :
3e0be4ab 16598
5476a9a4
GM
16599 # Check for potential -arch flags. It is not universal unless
16600 # there are at least two -arch flags with different values.
16601 ac_arch=
16602 ac_prev=
16603 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
16604 if test -n "$ac_prev"; then
16605 case $ac_word in
16606 i?86 | x86_64 | ppc | ppc64)
16607 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
16608 ac_arch=$ac_word
16609 else
16610 ac_cv_c_bigendian=universal
16611 break
16612 fi
16613 ;;
16614 esac
16615 ac_prev=
16616 elif test "x$ac_word" = "x-arch"; then
16617 ac_prev=arch
16618 fi
16619 done
16620fi
16621rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16622 if test $ac_cv_c_bigendian = unknown; then
16623 # See if sys/param.h defines the BYTE_ORDER macro.
16624 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16625/* end confdefs.h. */
16626#include <sys/types.h>
16627 #include <sys/param.h>
3e0be4ab 16628
5476a9a4
GM
16629int
16630main ()
16631{
16632#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
16633 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
16634 && LITTLE_ENDIAN)
16635 bogus endian macros
16636 #endif
3e0be4ab 16637
5476a9a4
GM
16638 ;
16639 return 0;
16640}
16641_ACEOF
16642if ac_fn_c_try_compile "$LINENO"; then :
16643 # It does; now see whether it defined to BIG_ENDIAN or not.
16644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16645/* end confdefs.h. */
16646#include <sys/types.h>
16647 #include <sys/param.h>
369e19fc 16648
5476a9a4
GM
16649int
16650main ()
16651{
16652#if BYTE_ORDER != BIG_ENDIAN
16653 not big endian
16654 #endif
3e0be4ab 16655
5476a9a4
GM
16656 ;
16657 return 0;
16658}
16659_ACEOF
16660if ac_fn_c_try_compile "$LINENO"; then :
16661 ac_cv_c_bigendian=yes
16662else
16663 ac_cv_c_bigendian=no
16664fi
16665rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16666fi
16667rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16668 fi
16669 if test $ac_cv_c_bigendian = unknown; then
16670 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
16671 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16672/* end confdefs.h. */
16673#include <limits.h>
4fda9c95 16674
5476a9a4
GM
16675int
16676main ()
16677{
16678#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
16679 bogus endian macros
16680 #endif
4fda9c95 16681
5476a9a4
GM
16682 ;
16683 return 0;
16684}
16685_ACEOF
16686if ac_fn_c_try_compile "$LINENO"; then :
16687 # It does; now see whether it defined to _BIG_ENDIAN or not.
16688 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16689/* end confdefs.h. */
16690#include <limits.h>
4fda9c95 16691
5476a9a4
GM
16692int
16693main ()
16694{
16695#ifndef _BIG_ENDIAN
16696 not big endian
16697 #endif
f199cab1 16698
5476a9a4
GM
16699 ;
16700 return 0;
16701}
16702_ACEOF
16703if ac_fn_c_try_compile "$LINENO"; then :
16704 ac_cv_c_bigendian=yes
f199cab1 16705else
5476a9a4
GM
16706 ac_cv_c_bigendian=no
16707fi
16708rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16709fi
16710rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16711 fi
16712 if test $ac_cv_c_bigendian = unknown; then
16713 # Compile a test program.
16714 if test "$cross_compiling" = yes; then :
16715 # Try to guess by grepping values from an object file.
16716 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16717/* end confdefs.h. */
16718short int ascii_mm[] =
16719 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
16720 short int ascii_ii[] =
16721 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
16722 int use_ascii (int i) {
16723 return ascii_mm[i] + ascii_ii[i];
16724 }
16725 short int ebcdic_ii[] =
16726 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
16727 short int ebcdic_mm[] =
16728 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
16729 int use_ebcdic (int i) {
16730 return ebcdic_mm[i] + ebcdic_ii[i];
16731 }
16732 extern int foo;
f199cab1 16733
5476a9a4
GM
16734int
16735main ()
16736{
16737return use_ascii (foo) == use_ebcdic (foo);
16738 ;
16739 return 0;
16740}
16741_ACEOF
16742if ac_fn_c_try_compile "$LINENO"; then :
16743 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
16744 ac_cv_c_bigendian=yes
16745 fi
16746 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
16747 if test "$ac_cv_c_bigendian" = unknown; then
16748 ac_cv_c_bigendian=no
16749 else
16750 # finding both strings is unlikely to happen, but who knows?
16751 ac_cv_c_bigendian=unknown
16752 fi
16753 fi
16754fi
16755rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4fda9c95 16756else
3e0be4ab 16757 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4fda9c95 16758/* end confdefs.h. */
5476a9a4
GM
16759$ac_includes_default
16760int
16761main ()
4fda9c95 16762{
5476a9a4
GM
16763
16764 /* Are we little or big endian? From Harbison&Steele. */
16765 union
16766 {
16767 long int l;
16768 char c[sizeof (long int)];
16769 } u;
16770 u.l = 1;
16771 return u.c[sizeof (long int) - 1] == 1;
16772
16773 ;
4fda9c95
GM
16774 return 0;
16775}
16776_ACEOF
f199cab1 16777if ac_fn_c_try_run "$LINENO"; then :
5476a9a4 16778 ac_cv_c_bigendian=no
3e0be4ab 16779else
5476a9a4 16780 ac_cv_c_bigendian=yes
4fda9c95 16781fi
f199cab1
GM
16782rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16783 conftest.$ac_objext conftest.beam conftest.$ac_ext
4fda9c95 16784fi
4fda9c95 16785
5476a9a4 16786 fi
f199cab1 16787fi
5476a9a4
GM
16788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
16789$as_echo "$ac_cv_c_bigendian" >&6; }
16790 case $ac_cv_c_bigendian in #(
16791 yes)
16792 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
16793;; #(
16794 no)
16795 ;; #(
16796 universal)
3e0be4ab 16797
5476a9a4 16798$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
3e0be4ab 16799
5476a9a4
GM
16800 ;; #(
16801 *)
16802 as_fn_error "unknown endianness
16803 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
16804 esac
4fda9c95 16805
4fda9c95 16806
da6c8463 16807
5476a9a4
GM
16808 GNULIB_CHDIR=0;
16809 GNULIB_CHOWN=0;
16810 GNULIB_CLOSE=0;
16811 GNULIB_DUP=0;
16812 GNULIB_DUP2=0;
16813 GNULIB_DUP3=0;
16814 GNULIB_ENVIRON=0;
16815 GNULIB_EUIDACCESS=0;
16816 GNULIB_FACCESSAT=0;
16817 GNULIB_FCHDIR=0;
16818 GNULIB_FCHOWNAT=0;
16819 GNULIB_FDATASYNC=0;
16820 GNULIB_FSYNC=0;
16821 GNULIB_FTRUNCATE=0;
16822 GNULIB_GETCWD=0;
16823 GNULIB_GETDOMAINNAME=0;
16824 GNULIB_GETDTABLESIZE=0;
16825 GNULIB_GETGROUPS=0;
16826 GNULIB_GETHOSTNAME=0;
16827 GNULIB_GETLOGIN=0;
16828 GNULIB_GETLOGIN_R=0;
16829 GNULIB_GETPAGESIZE=0;
16830 GNULIB_GETUSERSHELL=0;
16831 GNULIB_GROUP_MEMBER=0;
16832 GNULIB_ISATTY=0;
16833 GNULIB_LCHOWN=0;
16834 GNULIB_LINK=0;
16835 GNULIB_LINKAT=0;
16836 GNULIB_LSEEK=0;
16837 GNULIB_PIPE=0;
16838 GNULIB_PIPE2=0;
16839 GNULIB_PREAD=0;
16840 GNULIB_PWRITE=0;
16841 GNULIB_READ=0;
16842 GNULIB_READLINK=0;
16843 GNULIB_READLINKAT=0;
16844 GNULIB_RMDIR=0;
16845 GNULIB_SETHOSTNAME=0;
16846 GNULIB_SLEEP=0;
16847 GNULIB_SYMLINK=0;
16848 GNULIB_SYMLINKAT=0;
16849 GNULIB_TTYNAME_R=0;
16850 GNULIB_UNISTD_H_NONBLOCKING=0;
16851 GNULIB_UNISTD_H_SIGPIPE=0;
16852 GNULIB_UNLINK=0;
16853 GNULIB_UNLINKAT=0;
16854 GNULIB_USLEEP=0;
16855 GNULIB_WRITE=0;
16856 HAVE_CHOWN=1;
16857 HAVE_DUP2=1;
16858 HAVE_DUP3=1;
16859 HAVE_EUIDACCESS=1;
16860 HAVE_FACCESSAT=1;
16861 HAVE_FCHDIR=1;
16862 HAVE_FCHOWNAT=1;
16863 HAVE_FDATASYNC=1;
16864 HAVE_FSYNC=1;
16865 HAVE_FTRUNCATE=1;
16866 HAVE_GETDTABLESIZE=1;
16867 HAVE_GETGROUPS=1;
16868 HAVE_GETHOSTNAME=1;
16869 HAVE_GETLOGIN=1;
16870 HAVE_GETPAGESIZE=1;
16871 HAVE_GROUP_MEMBER=1;
16872 HAVE_LCHOWN=1;
16873 HAVE_LINK=1;
16874 HAVE_LINKAT=1;
16875 HAVE_PIPE=1;
16876 HAVE_PIPE2=1;
16877 HAVE_PREAD=1;
16878 HAVE_PWRITE=1;
16879 HAVE_READLINK=1;
16880 HAVE_READLINKAT=1;
16881 HAVE_SETHOSTNAME=1;
16882 HAVE_SLEEP=1;
16883 HAVE_SYMLINK=1;
16884 HAVE_SYMLINKAT=1;
16885 HAVE_UNLINKAT=1;
16886 HAVE_USLEEP=1;
16887 HAVE_DECL_ENVIRON=1;
16888 HAVE_DECL_FCHDIR=1;
16889 HAVE_DECL_FDATASYNC=1;
16890 HAVE_DECL_GETDOMAINNAME=1;
16891 HAVE_DECL_GETLOGIN_R=1;
16892 HAVE_DECL_GETPAGESIZE=1;
16893 HAVE_DECL_GETUSERSHELL=1;
16894 HAVE_DECL_SETHOSTNAME=1;
16895 HAVE_DECL_TTYNAME_R=1;
16896 HAVE_OS_H=0;
16897 HAVE_SYS_PARAM_H=0;
16898 REPLACE_CHOWN=0;
16899 REPLACE_CLOSE=0;
16900 REPLACE_DUP=0;
16901 REPLACE_DUP2=0;
16902 REPLACE_FCHOWNAT=0;
16903 REPLACE_FTRUNCATE=0;
16904 REPLACE_GETCWD=0;
16905 REPLACE_GETDOMAINNAME=0;
16906 REPLACE_GETLOGIN_R=0;
16907 REPLACE_GETGROUPS=0;
16908 REPLACE_GETPAGESIZE=0;
16909 REPLACE_ISATTY=0;
16910 REPLACE_LCHOWN=0;
16911 REPLACE_LINK=0;
16912 REPLACE_LINKAT=0;
16913 REPLACE_LSEEK=0;
16914 REPLACE_PREAD=0;
16915 REPLACE_PWRITE=0;
16916 REPLACE_READ=0;
16917 REPLACE_READLINK=0;
16918 REPLACE_RMDIR=0;
16919 REPLACE_SLEEP=0;
16920 REPLACE_SYMLINK=0;
16921 REPLACE_TTYNAME_R=0;
16922 REPLACE_UNLINK=0;
16923 REPLACE_UNLINKAT=0;
16924 REPLACE_USLEEP=0;
16925 REPLACE_WRITE=0;
16926 UNISTD_H_HAVE_WINSOCK2_H=0;
16927 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
f199cab1
GM
16928
16929
93131e11 16930
d7ad186c
GM
16931 GNULIB_OPENDIR=0;
16932 GNULIB_READDIR=0;
16933 GNULIB_REWINDDIR=0;
16934 GNULIB_CLOSEDIR=0;
16935 GNULIB_DIRFD=0;
16936 GNULIB_FDOPENDIR=0;
16937 GNULIB_SCANDIR=0;
16938 GNULIB_ALPHASORT=0;
16939 HAVE_OPENDIR=1;
16940 HAVE_READDIR=1;
16941 HAVE_REWINDDIR=1;
16942 HAVE_CLOSEDIR=1;
16943 HAVE_DECL_DIRFD=1;
16944 HAVE_DECL_FDOPENDIR=1;
16945 HAVE_FDOPENDIR=1;
16946 HAVE_SCANDIR=1;
16947 HAVE_ALPHASORT=1;
16948 REPLACE_OPENDIR=0;
16949 REPLACE_CLOSEDIR=0;
16950 REPLACE_DIRFD=0;
16951 REPLACE_FDOPENDIR=0;
710f5812
GM
16952
16953
16954
16955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
16956$as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
16957if test "${gl_cv_have_include_next+set}" = set; then :
16958 $as_echo_n "(cached) " >&6
16959else
16960 rm -rf conftestd1a conftestd1b conftestd2
16961 mkdir conftestd1a conftestd1b conftestd2
16962 cat <<EOF > conftestd1a/conftest.h
16963#define DEFINED_IN_CONFTESTD1
16964#include_next <conftest.h>
16965#ifdef DEFINED_IN_CONFTESTD2
16966int foo;
16967#else
16968#error "include_next doesn't work"
16969#endif
16970EOF
16971 cat <<EOF > conftestd1b/conftest.h
16972#define DEFINED_IN_CONFTESTD1
16973#include <stdio.h>
16974#include_next <conftest.h>
16975#ifdef DEFINED_IN_CONFTESTD2
16976int foo;
16977#else
16978#error "include_next doesn't work"
16979#endif
16980EOF
16981 cat <<EOF > conftestd2/conftest.h
16982#ifndef DEFINED_IN_CONFTESTD1
16983#error "include_next test doesn't work"
16984#endif
16985#define DEFINED_IN_CONFTESTD2
16986EOF
16987 gl_save_CPPFLAGS="$CPPFLAGS"
16988 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
16989 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16990/* end confdefs.h. */
16991#include <conftest.h>
16992_ACEOF
16993if ac_fn_c_try_compile "$LINENO"; then :
16994 gl_cv_have_include_next=yes
16995else
16996 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
16997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16998/* end confdefs.h. */
16999#include <conftest.h>
17000_ACEOF
17001if ac_fn_c_try_compile "$LINENO"; then :
17002 gl_cv_have_include_next=buggy
17003else
17004 gl_cv_have_include_next=no
17005fi
17006rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17007
17008fi
17009rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17010 CPPFLAGS="$gl_save_CPPFLAGS"
17011 rm -rf conftestd1a conftestd1b conftestd2
17012
17013fi
17014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
17015$as_echo "$gl_cv_have_include_next" >&6; }
17016 PRAGMA_SYSTEM_HEADER=
17017 if test $gl_cv_have_include_next = yes; then
17018 INCLUDE_NEXT=include_next
17019 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
17020 if test -n "$GCC"; then
17021 PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
17022 fi
17023 else
17024 if test $gl_cv_have_include_next = buggy; then
17025 INCLUDE_NEXT=include
17026 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
17027 else
17028 INCLUDE_NEXT=include
17029 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
17030 fi
17031 fi
17032
17033
17034
17035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5
17036$as_echo_n "checking whether system header files limit the line length... " >&6; }
17037if test "${gl_cv_pragma_columns+set}" = set; then :
17038 $as_echo_n "(cached) " >&6
17039else
17040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17041/* end confdefs.h. */
17042
17043#ifdef __TANDEM
17044choke me
17045#endif
17046
17047_ACEOF
17048if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17049 $EGREP "choke me" >/dev/null 2>&1; then :
17050 gl_cv_pragma_columns=yes
17051else
17052 gl_cv_pragma_columns=no
17053fi
17054rm -f conftest*
17055
17056
17057fi
17058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5
17059$as_echo "$gl_cv_pragma_columns" >&6; }
17060 if test $gl_cv_pragma_columns = yes; then
17061 PRAGMA_COLUMNS="#pragma COLUMNS 10000"
17062 else
17063 PRAGMA_COLUMNS=
17064 fi
17065
17066
710f5812 17067
710f5812 17068
710f5812 17069
d7ad186c
GM
17070 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtold conforms to C99" >&5
17071$as_echo_n "checking whether strtold conforms to C99... " >&6; }
17072if test "${gl_cv_func_c99_strtold+set}" = set; then :
f199cab1 17073 $as_echo_n "(cached) " >&6
ae0d7250 17074else
f199cab1 17075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3e0be4ab 17076/* end confdefs.h. */
d7ad186c
GM
17077/* On HP-UX before 11.23, strtold returns a struct instead of
17078 long double. Reject implementations like that, by requiring
17079 compatibility with the C99 prototype. */
17080 #include <stdlib.h>
17081 static long double (*p) (char const *, char **) = strtold;
17082 static long double
17083 test (char const *nptr, char **endptr)
17084 {
17085 long double r;
17086 r = strtold (nptr, endptr);
17087 return r;
17088 }
3e0be4ab
GM
17089int
17090main ()
17091{
d7ad186c 17092return test ("1.0", NULL) != 1 || p ("1.0", NULL) != 1;
3e0be4ab
GM
17093 ;
17094 return 0;
17095}
6ad6792b 17096_ACEOF
d7ad186c
GM
17097if ac_fn_c_try_link "$LINENO"; then :
17098 gl_cv_func_c99_strtold=yes
f199cab1 17099else
d7ad186c 17100 gl_cv_func_c99_strtold=no
f199cab1 17101fi
d7ad186c
GM
17102rm -f core conftest.err conftest.$ac_objext \
17103 conftest$ac_exeext conftest.$ac_ext
f199cab1 17104fi
d7ad186c
GM
17105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_c99_strtold" >&5
17106$as_echo "$gl_cv_func_c99_strtold" >&6; }
17107 if test $gl_cv_func_c99_strtold = yes; then
f199cab1 17108
d7ad186c 17109$as_echo "#define HAVE_C99_STRTOLD 1" >>confdefs.h
f199cab1 17110
5476a9a4 17111 fi
f199cab1 17112
f199cab1 17113
f199cab1
GM
17114
17115
4fda9c95 17116
3bf26e96
GM
17117
17118
eda33f78 17119
d7ad186c
GM
17120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
17121$as_echo_n "checking if environ is properly declared... " >&6; }
17122 if test "${gt_cv_var_environ_declaration+set}" = set; then :
17123 $as_echo_n "(cached) " >&6
17124else
eda33f78 17125
d7ad186c
GM
17126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17127/* end confdefs.h. */
17128#if HAVE_UNISTD_H
17129 #include <unistd.h>
17130 #endif
17131 /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>. */
17132 #include <stdlib.h>
17133
17134 extern struct { int foo; } environ;
17135int
17136main ()
17137{
17138environ.foo = 1;
17139 ;
17140 return 0;
17141}
17142_ACEOF
17143if ac_fn_c_try_compile "$LINENO"; then :
17144 gt_cv_var_environ_declaration=no
17145else
17146 gt_cv_var_environ_declaration=yes
17147fi
17148rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17149fi
17150
17151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
17152$as_echo "$gt_cv_var_environ_declaration" >&6; }
17153 if test $gt_cv_var_environ_declaration = yes; then
17154
17155$as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
17156
17157 fi
17158
17159
17160 if test $gt_cv_var_environ_declaration != yes; then
17161 HAVE_DECL_ENVIRON=0
17162 fi
17163
17164
17165
17166
17167
17168
17169
17170
17171
17172 GNULIB_FCNTL=0;
17173 GNULIB_NONBLOCKING=0;
17174 GNULIB_OPEN=0;
17175 GNULIB_OPENAT=0;
17176 HAVE_FCNTL=1;
17177 HAVE_OPENAT=1;
17178 REPLACE_FCNTL=0;
17179 REPLACE_OPEN=0;
17180 REPLACE_OPENAT=0;
17181
17182
17183ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
17184if test "x$ac_cv_type_mode_t" = x""yes; then :
17185
17186else
17187
17188cat >>confdefs.h <<_ACEOF
17189#define mode_t int
17190_ACEOF
17191
17192fi
17193
17194
17195
17196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for st_dm_mode in struct stat" >&5
17197$as_echo_n "checking for st_dm_mode in struct stat... " >&6; }
17198if test "${ac_cv_struct_st_dm_mode+set}" = set; then :
17199 $as_echo_n "(cached) " >&6
17200else
17201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17202/* end confdefs.h. */
17203
17204#include <sys/types.h>
17205#include <sys/stat.h>
17206int
17207main ()
17208{
17209struct stat s; s.st_dm_mode;
17210 ;
17211 return 0;
17212}
17213_ACEOF
17214if ac_fn_c_try_compile "$LINENO"; then :
17215 ac_cv_struct_st_dm_mode=yes
17216else
17217 ac_cv_struct_st_dm_mode=no
17218fi
17219rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17220fi
17221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_st_dm_mode" >&5
17222$as_echo "$ac_cv_struct_st_dm_mode" >&6; }
17223
17224 if test $ac_cv_struct_st_dm_mode = yes; then
17225
17226$as_echo "#define HAVE_ST_DM_MODE 1" >>confdefs.h
17227
17228 fi
17229
17230
17231ac_fn_c_check_decl "$LINENO" "strmode" "ac_cv_have_decl_strmode" "$ac_includes_default"
17232if test "x$ac_cv_have_decl_strmode" = x""yes; then :
17233 ac_have_decl=1
17234else
17235 ac_have_decl=0
17236fi
17237
17238cat >>confdefs.h <<_ACEOF
17239#define HAVE_DECL_STRMODE $ac_have_decl
17240_ACEOF
17241
17242
17243
17244
17245
17246
17247 GNULIB_FCHMODAT=0;
17248 GNULIB_FSTAT=0;
17249 GNULIB_FSTATAT=0;
17250 GNULIB_FUTIMENS=0;
17251 GNULIB_LCHMOD=0;
17252 GNULIB_LSTAT=0;
17253 GNULIB_MKDIRAT=0;
17254 GNULIB_MKFIFO=0;
17255 GNULIB_MKFIFOAT=0;
17256 GNULIB_MKNOD=0;
17257 GNULIB_MKNODAT=0;
17258 GNULIB_STAT=0;
17259 GNULIB_UTIMENSAT=0;
17260 HAVE_FCHMODAT=1;
17261 HAVE_FSTATAT=1;
17262 HAVE_FUTIMENS=1;
17263 HAVE_LCHMOD=1;
17264 HAVE_LSTAT=1;
17265 HAVE_MKDIRAT=1;
17266 HAVE_MKFIFO=1;
17267 HAVE_MKFIFOAT=1;
17268 HAVE_MKNOD=1;
17269 HAVE_MKNODAT=1;
17270 HAVE_UTIMENSAT=1;
17271 REPLACE_FSTAT=0;
17272 REPLACE_FSTATAT=0;
17273 REPLACE_FUTIMENS=0;
17274 REPLACE_LSTAT=0;
17275 REPLACE_MKDIR=0;
17276 REPLACE_MKFIFO=0;
17277 REPLACE_MKNOD=0;
17278 REPLACE_STAT=0;
17279 REPLACE_UTIMENSAT=0;
17280
17281
17282 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
17283$as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
17284if test "${gl_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then :
17285 $as_echo_n "(cached) " >&6
17286else
17287 rm -f conftest.sym conftest.file
17288 echo >conftest.file
17289 if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then
17290 if test "$cross_compiling" = yes; then :
17291 case "$host_os" in
17292 # Guess yes on glibc systems.
17293 *-gnu*) gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
17294 # If we don't know, assume the worst.
17295 *) gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
17296 esac
17297
17298else
17299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17300/* end confdefs.h. */
17301$ac_includes_default
17302int
17303main ()
17304{
17305struct stat sbuf;
17306 /* Linux will dereference the symlink and fail, as required by
17307 POSIX. That is better in the sense that it means we will not
17308 have to compile and use the lstat wrapper. */
17309 return lstat ("conftest.sym/", &sbuf) == 0;
17310
17311 ;
17312 return 0;
17313}
17314_ACEOF
17315if ac_fn_c_try_run "$LINENO"; then :
17316 gl_cv_func_lstat_dereferences_slashed_symlink=yes
17317else
17318 gl_cv_func_lstat_dereferences_slashed_symlink=no
17319fi
17320rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17321 conftest.$ac_objext conftest.beam conftest.$ac_ext
17322fi
17323
17324 else
17325 # If the 'ln -s' command failed, then we probably don't even
17326 # have an lstat function.
17327 gl_cv_func_lstat_dereferences_slashed_symlink="guessing no"
17328 fi
17329 rm -f conftest.sym conftest.file
17330
17331fi
17332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
17333$as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
17334 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
17335 *yes)
17336
17337cat >>confdefs.h <<_ACEOF
17338#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
17339_ACEOF
17340
17341 ;;
17342 esac
17343
17344
17345
17346
17347 GNULIB__EXIT=0;
17348 GNULIB_ATOLL=0;
17349 GNULIB_CALLOC_POSIX=0;
17350 GNULIB_CANONICALIZE_FILE_NAME=0;
17351 GNULIB_GETLOADAVG=0;
17352 GNULIB_GETSUBOPT=0;
17353 GNULIB_GRANTPT=0;
5476a9a4
GM
17354 GNULIB_MALLOC_POSIX=0;
17355 GNULIB_MBTOWC=0;
17356 GNULIB_MKDTEMP=0;
17357 GNULIB_MKOSTEMP=0;
17358 GNULIB_MKOSTEMPS=0;
17359 GNULIB_MKSTEMP=0;
17360 GNULIB_MKSTEMPS=0;
17361 GNULIB_POSIX_OPENPT=0;
17362 GNULIB_PTSNAME=0;
17363 GNULIB_PTSNAME_R=0;
17364 GNULIB_PUTENV=0;
17365 GNULIB_RANDOM=0;
17366 GNULIB_RANDOM_R=0;
17367 GNULIB_REALLOC_POSIX=0;
17368 GNULIB_REALPATH=0;
17369 GNULIB_RPMATCH=0;
17370 GNULIB_SETENV=0;
17371 GNULIB_STRTOD=0;
17372 GNULIB_STRTOLL=0;
17373 GNULIB_STRTOULL=0;
17374 GNULIB_SYSTEM_POSIX=0;
17375 GNULIB_UNLOCKPT=0;
17376 GNULIB_UNSETENV=0;
17377 GNULIB_WCTOMB=0;
17378 HAVE__EXIT=1;
17379 HAVE_ATOLL=1;
17380 HAVE_CANONICALIZE_FILE_NAME=1;
17381 HAVE_DECL_GETLOADAVG=1;
17382 HAVE_GETSUBOPT=1;
17383 HAVE_GRANTPT=1;
17384 HAVE_MKDTEMP=1;
17385 HAVE_MKOSTEMP=1;
17386 HAVE_MKOSTEMPS=1;
17387 HAVE_MKSTEMP=1;
17388 HAVE_MKSTEMPS=1;
17389 HAVE_POSIX_OPENPT=1;
17390 HAVE_PTSNAME=1;
17391 HAVE_PTSNAME_R=1;
17392 HAVE_RANDOM=1;
17393 HAVE_RANDOM_H=1;
17394 HAVE_RANDOM_R=1;
17395 HAVE_REALPATH=1;
17396 HAVE_RPMATCH=1;
17397 HAVE_SETENV=1;
17398 HAVE_DECL_SETENV=1;
17399 HAVE_STRTOD=1;
17400 HAVE_STRTOLL=1;
17401 HAVE_STRTOULL=1;
17402 HAVE_STRUCT_RANDOM_DATA=1;
17403 HAVE_SYS_LOADAVG_H=0;
17404 HAVE_UNLOCKPT=1;
17405 HAVE_DECL_UNSETENV=1;
17406 REPLACE_CALLOC=0;
17407 REPLACE_CANONICALIZE_FILE_NAME=0;
17408 REPLACE_MALLOC=0;
17409 REPLACE_MBTOWC=0;
17410 REPLACE_MKSTEMP=0;
b6c9d18d 17411 REPLACE_PTSNAME=0;
5476a9a4
GM
17412 REPLACE_PTSNAME_R=0;
17413 REPLACE_PUTENV=0;
17414 REPLACE_RANDOM_R=0;
17415 REPLACE_REALLOC=0;
17416 REPLACE_REALPATH=0;
17417 REPLACE_SETENV=0;
17418 REPLACE_STRTOD=0;
17419 REPLACE_UNSETENV=0;
17420 REPLACE_WCTOMB=0;
f199cab1
GM
17421
17422
17423
f199cab1
GM
17424
17425
17426
17427
17428
17429
17430
17431
17432
17433
5f90be1b 17434
f199cab1
GM
17435
17436
17437 if test $gl_cv_have_include_next = yes; then
5476a9a4 17438 gl_cv_next_getopt_h='<'getopt.h'>'
f199cab1 17439 else
5476a9a4
GM
17440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <getopt.h>" >&5
17441$as_echo_n "checking absolute name of <getopt.h>... " >&6; }
17442if test "${gl_cv_next_getopt_h+set}" = set; then :
5f90be1b 17443 $as_echo_n "(cached) " >&6
5f90be1b 17444else
f199cab1 17445
5476a9a4 17446 if test $ac_cv_header_getopt_h = yes; then
f199cab1
GM
17447
17448
17449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5f90be1b 17450/* end confdefs.h. */
5476a9a4 17451#include <getopt.h>
4fda9c95 17452
5f90be1b 17453_ACEOF
f199cab1
GM
17454 case "$host_os" in
17455 aix*) gl_absname_cpp="$ac_cpp -C" ;;
17456 *) gl_absname_cpp="$ac_cpp" ;;
17457 esac
5f90be1b 17458
f199cab1
GM
17459 case "$host_os" in
17460 mingw*)
17461 gl_dirsep_regex='[/\\]'
17462 ;;
17463 *)
17464 gl_dirsep_regex='\/'
17465 ;;
17466 esac
17467 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
5f90be1b 17468
5476a9a4 17469 gl_header_literal_regex=`echo 'getopt.h' \
f199cab1
GM
17470 | sed -e "$gl_make_literal_regex_sed"`
17471 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17472 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17473 s|^/[^/]|//&|
17474 p
17475 q
17476 }'
5476a9a4 17477 gl_cv_next_getopt_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
f199cab1
GM
17478 sed -n "$gl_absolute_header_sed"`'"'
17479 else
5476a9a4 17480 gl_cv_next_getopt_h='<'getopt.h'>'
f199cab1 17481 fi
5f90be1b
PE
17482
17483
3e0be4ab 17484fi
5476a9a4
GM
17485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5
17486$as_echo "$gl_cv_next_getopt_h" >&6; }
f199cab1 17487 fi
5476a9a4 17488 NEXT_GETOPT_H=$gl_cv_next_getopt_h
3e0be4ab 17489
f199cab1
GM
17490 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17491 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
5476a9a4 17492 gl_next_as_first_directive='<'getopt.h'>'
f199cab1
GM
17493 else
17494 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
5476a9a4 17495 gl_next_as_first_directive=$gl_cv_next_getopt_h
f199cab1 17496 fi
5476a9a4 17497 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive
f199cab1
GM
17498
17499
f199cab1 17500
f199cab1 17501
5476a9a4
GM
17502 if test $ac_cv_header_getopt_h = yes; then
17503 HAVE_GETOPT_H=1
17504 else
17505 HAVE_GETOPT_H=0
f199cab1
GM
17506 fi
17507
f199cab1 17508
5476a9a4 17509 gl_replace_getopt=
f199cab1 17510
5476a9a4
GM
17511 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
17512 for ac_header in getopt.h
17513do :
17514 ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
17515if test "x$ac_cv_header_getopt_h" = x""yes; then :
17516 cat >>confdefs.h <<_ACEOF
17517#define HAVE_GETOPT_H 1
17518_ACEOF
f199cab1 17519
5476a9a4
GM
17520else
17521 gl_replace_getopt=yes
3e0be4ab 17522fi
3e0be4ab 17523
5476a9a4 17524done
3e0be4ab 17525
5476a9a4 17526 fi
3e0be4ab 17527
5476a9a4
GM
17528 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
17529 for ac_func in getopt_long_only
17530do :
17531 ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only"
17532if test "x$ac_cv_func_getopt_long_only" = x""yes; then :
17533 cat >>confdefs.h <<_ACEOF
17534#define HAVE_GETOPT_LONG_ONLY 1
17535_ACEOF
3e0be4ab 17536
3e0be4ab 17537else
5476a9a4 17538 gl_replace_getopt=yes
3e0be4ab 17539fi
5476a9a4 17540done
3e0be4ab 17541
f199cab1 17542 fi
3e0be4ab 17543
5476a9a4
GM
17544 if test -z "$gl_replace_getopt"; then
17545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5
17546$as_echo_n "checking whether getopt is POSIX compatible... " >&6; }
17547if test "${gl_cv_func_getopt_posix+set}" = set; then :
3e0be4ab 17548 $as_echo_n "(cached) " >&6
5476a9a4
GM
17549else
17550
17551 if test $cross_compiling = no; then
17552 if test "$cross_compiling" = yes; then :
17553 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17554$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17555as_fn_error "cannot run test program while cross compiling
17556See \`config.log' for more details." "$LINENO" 5; }
3e0be4ab 17557else
f199cab1 17558 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3e0be4ab 17559/* end confdefs.h. */
5476a9a4
GM
17560
17561#include <unistd.h>
17562#include <stdlib.h>
17563#include <string.h>
17564
f199cab1
GM
17565int
17566main ()
17567{
5476a9a4
GM
17568 static char program[] = "program";
17569 static char a[] = "-a";
17570 static char foo[] = "foo";
17571 static char bar[] = "bar";
17572 char *argv[] = { program, a, foo, bar, NULL };
17573 int c;
17574
17575 c = getopt (4, argv, "ab");
17576 if (!(c == 'a'))
17577 return 1;
17578 c = getopt (4, argv, "ab");
17579 if (!(c == -1))
17580 return 2;
17581 if (!(optind == 2))
17582 return 3;
f199cab1
GM
17583 return 0;
17584}
17585
3e0be4ab 17586_ACEOF
5476a9a4
GM
17587if ac_fn_c_try_run "$LINENO"; then :
17588 gl_cv_func_getopt_posix=maybe
3e0be4ab 17589else
5476a9a4 17590 gl_cv_func_getopt_posix=no
3e0be4ab 17591fi
5476a9a4
GM
17592rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17593 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1
GM
17594fi
17595
5476a9a4
GM
17596 if test $gl_cv_func_getopt_posix = maybe; then
17597 if test "$cross_compiling" = yes; then :
17598 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17599$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17600as_fn_error "cannot run test program while cross compiling
17601See \`config.log' for more details." "$LINENO" 5; }
3e0be4ab 17602else
5476a9a4
GM
17603 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17604/* end confdefs.h. */
3e0be4ab 17605
5476a9a4
GM
17606#include <unistd.h>
17607#include <stdlib.h>
17608#include <string.h>
3e0be4ab 17609
5476a9a4
GM
17610int
17611main ()
17612{
17613 static char program[] = "program";
17614 static char donald[] = "donald";
17615 static char p[] = "-p";
17616 static char billy[] = "billy";
17617 static char duck[] = "duck";
17618 static char a[] = "-a";
17619 static char bar[] = "bar";
17620 char *argv[] = { program, donald, p, billy, duck, a, bar, NULL };
17621 int c;
3e0be4ab 17622
5476a9a4
GM
17623 c = getopt (7, argv, "+abp:q:");
17624 if (!(c == -1))
17625 return 4;
17626 if (!(strcmp (argv[0], "program") == 0))
17627 return 5;
17628 if (!(strcmp (argv[1], "donald") == 0))
17629 return 6;
17630 if (!(strcmp (argv[2], "-p") == 0))
17631 return 7;
17632 if (!(strcmp (argv[3], "billy") == 0))
17633 return 8;
17634 if (!(strcmp (argv[4], "duck") == 0))
17635 return 9;
17636 if (!(strcmp (argv[5], "-a") == 0))
17637 return 10;
17638 if (!(strcmp (argv[6], "bar") == 0))
17639 return 11;
17640 if (!(optind == 1))
17641 return 12;
17642 return 0;
17643}
3e0be4ab
GM
17644
17645_ACEOF
5476a9a4
GM
17646if ac_fn_c_try_run "$LINENO"; then :
17647 gl_cv_func_getopt_posix=maybe
17648else
17649 gl_cv_func_getopt_posix=no
17650fi
17651rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17652 conftest.$ac_objext conftest.beam conftest.$ac_ext
17653fi
b0415a03 17654
5476a9a4
GM
17655 fi
17656 if test $gl_cv_func_getopt_posix = maybe; then
17657 if test "$cross_compiling" = yes; then :
17658 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17659$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17660as_fn_error "cannot run test program while cross compiling
17661See \`config.log' for more details." "$LINENO" 5; }
17662else
17663 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17664/* end confdefs.h. */
b0415a03 17665
5476a9a4
GM
17666#include <unistd.h>
17667#include <stdlib.h>
17668#include <string.h>
3e0be4ab 17669
5476a9a4
GM
17670int
17671main ()
17672{
17673 static char program[] = "program";
17674 static char ab[] = "-ab";
17675 char *argv[3] = { program, ab, NULL };
17676 if (getopt (2, argv, "ab:") != 'a')
17677 return 13;
17678 if (getopt (2, argv, "ab:") != '?')
17679 return 14;
17680 if (optopt != 'b')
17681 return 15;
17682 if (optind != 2)
17683 return 16;
17684 return 0;
17685}
3e0be4ab 17686
5476a9a4
GM
17687_ACEOF
17688if ac_fn_c_try_run "$LINENO"; then :
17689 gl_cv_func_getopt_posix=yes
17690else
17691 gl_cv_func_getopt_posix=no
17692fi
17693rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17694 conftest.$ac_objext conftest.beam conftest.$ac_ext
3e0be4ab 17695fi
3e0be4ab 17696
5476a9a4
GM
17697 fi
17698 else
17699 case "$host_os" in
17700 darwin* | aix* | mingw*) gl_cv_func_getopt_posix="guessing no";;
17701 *) gl_cv_func_getopt_posix="guessing yes";;
17702 esac
17703 fi
3e0be4ab 17704
5476a9a4
GM
17705fi
17706{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5
17707$as_echo "$gl_cv_func_getopt_posix" >&6; }
17708 case "$gl_cv_func_getopt_posix" in
17709 *no) gl_replace_getopt=yes ;;
17710 esac
3e0be4ab
GM
17711 fi
17712
5476a9a4
GM
17713 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
17714 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5
17715$as_echo_n "checking for working GNU getopt function... " >&6; }
17716if test "${gl_cv_func_getopt_gnu+set}" = set; then :
17717 $as_echo_n "(cached) " >&6
17718else
17719 # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the
17720 # optstring is necessary for programs like m4 that have POSIX-mandated
17721 # semantics for supporting options interspersed with files.
17722 # Also, since getopt_long is a GNU extension, we require optind=0.
17723 # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT;
17724 # so take care to revert to the correct (non-)export state.
17725 gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }'
17726 case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in
17727 xx) gl_had_POSIXLY_CORRECT=exported ;;
17728 x) gl_had_POSIXLY_CORRECT=yes ;;
17729 *) gl_had_POSIXLY_CORRECT= ;;
17730 esac
17731 POSIXLY_CORRECT=1
17732 export POSIXLY_CORRECT
17733 if test "$cross_compiling" = yes; then :
17734 gl_cv_func_getopt_gnu="guessing no"
3e0be4ab 17735
5476a9a4
GM
17736else
17737 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17738/* end confdefs.h. */
17739#include <getopt.h>
17740 #include <stddef.h>
17741 #include <string.h>
3e0be4ab 17742
5476a9a4
GM
17743#include <stdlib.h>
17744#if defined __MACH__ && defined __APPLE__
17745/* Avoid a crash on Mac OS X. */
17746#include <mach/mach.h>
17747#include <mach/mach_error.h>
17748#include <mach/thread_status.h>
17749#include <mach/exception.h>
17750#include <mach/task.h>
17751#include <pthread.h>
17752/* The exception port on which our thread listens. */
17753static mach_port_t our_exception_port;
17754/* The main function of the thread listening for exceptions of type
17755 EXC_BAD_ACCESS. */
17756static void *
17757mach_exception_thread (void *arg)
17758{
17759 /* Buffer for a message to be received. */
17760 struct {
17761 mach_msg_header_t head;
17762 mach_msg_body_t msgh_body;
17763 char data[1024];
17764 } msg;
17765 mach_msg_return_t retval;
17766 /* Wait for a message on the exception port. */
17767 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
17768 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
17769 if (retval != MACH_MSG_SUCCESS)
17770 abort ();
17771 exit (1);
17772}
17773static void
17774nocrash_init (void)
17775{
17776 mach_port_t self = mach_task_self ();
17777 /* Allocate a port on which the thread shall listen for exceptions. */
17778 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
17779 == KERN_SUCCESS) {
17780 /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
17781 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
17782 MACH_MSG_TYPE_MAKE_SEND)
17783 == KERN_SUCCESS) {
17784 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
17785 for us. */
17786 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
17787 /* Create the thread listening on the exception port. */
17788 pthread_attr_t attr;
17789 pthread_t thread;
17790 if (pthread_attr_init (&attr) == 0
17791 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
17792 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
17793 pthread_attr_destroy (&attr);
17794 /* Replace the exception port info for these exceptions with our own.
17795 Note that we replace the exception port for the entire task, not only
17796 for a particular thread. This has the effect that when our exception
17797 port gets the message, the thread specific exception port has already
17798 been asked, and we don't need to bother about it.
17799 See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
17800 task_set_exception_ports (self, mask, our_exception_port,
17801 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
17802 }
17803 }
17804 }
17805}
17806#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
17807/* Avoid a crash on native Windows. */
17808#define WIN32_LEAN_AND_MEAN
17809#include <windows.h>
17810#include <winerror.h>
17811static LONG WINAPI
17812exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
17813{
17814 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
17815 {
17816 case EXCEPTION_ACCESS_VIOLATION:
17817 case EXCEPTION_IN_PAGE_ERROR:
17818 case EXCEPTION_STACK_OVERFLOW:
17819 case EXCEPTION_GUARD_PAGE:
17820 case EXCEPTION_PRIV_INSTRUCTION:
17821 case EXCEPTION_ILLEGAL_INSTRUCTION:
17822 case EXCEPTION_DATATYPE_MISALIGNMENT:
17823 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
17824 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
17825 exit (1);
17826 }
17827 return EXCEPTION_CONTINUE_SEARCH;
17828}
17829static void
17830nocrash_init (void)
17831{
17832 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
17833}
17834#else
17835/* Avoid a crash on POSIX systems. */
17836#include <signal.h>
17837/* A POSIX signal handler. */
17838static void
17839exception_handler (int sig)
17840{
17841 exit (1);
17842}
17843static void
17844nocrash_init (void)
17845{
17846#ifdef SIGSEGV
17847 signal (SIGSEGV, exception_handler);
17848#endif
17849#ifdef SIGBUS
17850 signal (SIGBUS, exception_handler);
17851#endif
17852}
17853#endif
3e0be4ab 17854
3e0be4ab 17855
5476a9a4
GM
17856int
17857main ()
17858{
3e0be4ab 17859
5476a9a4 17860 int result = 0;
3e0be4ab 17861
5476a9a4 17862 nocrash_init();
3e0be4ab 17863
5476a9a4
GM
17864 /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
17865 and fails on Mac OS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
17866 OSF/1 5.1, Solaris 10. */
17867 {
17868 static char conftest[] = "conftest";
17869 static char plus[] = "-+";
17870 char *argv[3] = { conftest, plus, NULL };
17871 opterr = 0;
17872 if (getopt (2, argv, "+a") != '?')
17873 result |= 1;
17874 }
17875 /* This code succeeds on glibc 2.8, mingw,
17876 and fails on Mac OS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
17877 IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */
17878 {
17879 static char program[] = "program";
17880 static char p[] = "-p";
17881 static char foo[] = "foo";
17882 static char bar[] = "bar";
17883 char *argv[] = { program, p, foo, bar, NULL };
3e0be4ab 17884
5476a9a4
GM
17885 optind = 1;
17886 if (getopt (4, argv, "p::") != 'p')
17887 result |= 2;
17888 else if (optarg != NULL)
17889 result |= 4;
17890 else if (getopt (4, argv, "p::") != -1)
17891 result |= 6;
17892 else if (optind != 2)
17893 result |= 8;
17894 }
17895 /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */
17896 {
17897 static char program[] = "program";
17898 static char foo[] = "foo";
17899 static char p[] = "-p";
17900 char *argv[] = { program, foo, p, NULL };
17901 optind = 0;
17902 if (getopt (3, argv, "-p") != 1)
17903 result |= 16;
17904 else if (getopt (3, argv, "-p") != 'p')
17905 result |= 16;
17906 }
17907 /* This code fails on glibc 2.11. */
17908 {
17909 static char program[] = "program";
17910 static char b[] = "-b";
17911 static char a[] = "-a";
17912 char *argv[] = { program, b, a, NULL };
17913 optind = opterr = 0;
17914 if (getopt (3, argv, "+:a:b") != 'b')
17915 result |= 32;
17916 else if (getopt (3, argv, "+:a:b") != ':')
17917 result |= 32;
17918 }
17919 /* This code dumps core on glibc 2.14. */
17920 {
17921 static char program[] = "program";
17922 static char w[] = "-W";
17923 static char dummy[] = "dummy";
17924 char *argv[] = { program, w, dummy, NULL };
17925 optind = opterr = 1;
17926 if (getopt (3, argv, "W;") != 'W')
17927 result |= 64;
17928 }
17929 return result;
3e0be4ab 17930
5476a9a4
GM
17931 ;
17932 return 0;
17933}
17934_ACEOF
17935if ac_fn_c_try_run "$LINENO"; then :
17936 gl_cv_func_getopt_gnu=yes
17937else
17938 gl_cv_func_getopt_gnu=no
17939fi
17940rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17941 conftest.$ac_objext conftest.beam conftest.$ac_ext
17942fi
3e0be4ab 17943
5476a9a4
GM
17944 case $gl_had_POSIXLY_CORRECT in
17945 exported) ;;
17946 yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;;
17947 *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;;
17948 esac
3e0be4ab 17949
5476a9a4
GM
17950fi
17951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5
17952$as_echo "$gl_cv_func_getopt_gnu" >&6; }
17953 if test "$gl_cv_func_getopt_gnu" != yes; then
17954 gl_replace_getopt=yes
17955 else
17956 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt_long function" >&5
17957$as_echo_n "checking for working GNU getopt_long function... " >&6; }
17958if test "${gl_cv_func_getopt_long_gnu+set}" = set; then :
f199cab1
GM
17959 $as_echo_n "(cached) " >&6
17960else
5476a9a4
GM
17961 if test "$cross_compiling" = yes; then :
17962 case "$host_os" in
17963 openbsd*) gl_cv_func_getopt_long_gnu="guessing no";;
17964 *) gl_cv_func_getopt_long_gnu="guessing yes";;
17965 esac
3e0be4ab
GM
17966
17967else
17968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17969/* end confdefs.h. */
5476a9a4
GM
17970#include <getopt.h>
17971 #include <stddef.h>
17972 #include <string.h>
f199cab1
GM
17973
17974int
17975main ()
369e19fc 17976{
5476a9a4
GM
17977static const struct option long_options[] =
17978 {
17979 { "xtremely-",no_argument, NULL, 1003 },
17980 { "xtra", no_argument, NULL, 1001 },
17981 { "xtreme", no_argument, NULL, 1002 },
17982 { "xtremely", no_argument, NULL, 1003 },
17983 { NULL, 0, NULL, 0 }
17984 };
17985 /* This code fails on OpenBSD 5.0. */
17986 {
17987 static char program[] = "program";
17988 static char xtremel[] = "--xtremel";
17989 char *argv[] = { program, xtremel, NULL };
17990 int option_index;
17991 optind = 1; opterr = 0;
17992 if (getopt_long (2, argv, "", long_options, &option_index) != 1003)
17993 return 1;
17994 }
17995 return 0;
f199cab1
GM
17996
17997 ;
17998 return 0;
369e19fc 17999}
f199cab1
GM
18000_ACEOF
18001if ac_fn_c_try_run "$LINENO"; then :
5476a9a4 18002 gl_cv_func_getopt_long_gnu=yes
f199cab1 18003else
5476a9a4 18004 gl_cv_func_getopt_long_gnu=no
f199cab1
GM
18005fi
18006rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18007 conftest.$ac_objext conftest.beam conftest.$ac_ext
18008fi
18009
5476a9a4 18010
f199cab1 18011fi
5476a9a4
GM
18012{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_long_gnu" >&5
18013$as_echo "$gl_cv_func_getopt_long_gnu" >&6; }
18014 case "$gl_cv_func_getopt_long_gnu" in
18015 *yes) ;;
18016 *) gl_replace_getopt=yes ;;
18017 esac
18018 fi
18019 fi
f199cab1 18020
f199cab1 18021
f199cab1 18022
369e19fc
PE
18023
18024
5476a9a4
GM
18025
18026 REPLACE_GETOPT=0
18027 if test -n "$gl_replace_getopt"; then
18028 REPLACE_GETOPT=1
f199cab1 18029 fi
3e0be4ab 18030
5476a9a4 18031 if test $REPLACE_GETOPT = 1; then
369e19fc 18032
5476a9a4 18033 GETOPT_H=getopt.h
369e19fc 18034
5476a9a4 18035$as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
6ad6792b
GM
18036
18037
f199cab1 18038
5476a9a4 18039 fi
f199cab1 18040
5476a9a4
GM
18041ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default"
18042if test "x$ac_cv_have_decl_getenv" = x""yes; then :
18043 ac_have_decl=1
3e0be4ab 18044else
5476a9a4 18045 ac_have_decl=0
3e0be4ab 18046fi
e275c824 18047
5476a9a4
GM
18048cat >>confdefs.h <<_ACEOF
18049#define HAVE_DECL_GETENV $ac_have_decl
18050_ACEOF
18051
a6342fc8 18052:
f199cab1 18053
5476a9a4
GM
18054
18055
18056
18057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
18058$as_echo_n "checking for C/C++ restrict keyword... " >&6; }
18059if test "${ac_cv_c_restrict+set}" = set; then :
18060 $as_echo_n "(cached) " >&6
f199cab1 18061else
5476a9a4
GM
18062 ac_cv_c_restrict=no
18063 # The order here caters to the fact that C++ does not require restrict.
18064 for ac_kw in __restrict __restrict__ _Restrict restrict; do
18065 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 18066/* end confdefs.h. */
5476a9a4
GM
18067typedef int * int_ptr;
18068 int foo (int_ptr $ac_kw ip) {
18069 return ip[0];
18070 }
f199cab1
GM
18071int
18072main ()
18073{
5476a9a4
GM
18074int s[1];
18075 int * $ac_kw t = s;
18076 t[0] = 0;
18077 return foo(t)
f199cab1
GM
18078 ;
18079 return 0;
18080}
18081_ACEOF
5476a9a4
GM
18082if ac_fn_c_try_compile "$LINENO"; then :
18083 ac_cv_c_restrict=$ac_kw
f199cab1 18084fi
5476a9a4
GM
18085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18086 test "$ac_cv_c_restrict" != no && break
18087 done
f199cab1 18088
f199cab1 18089fi
5476a9a4
GM
18090{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
18091$as_echo "$ac_cv_c_restrict" >&6; }
f199cab1 18092
5476a9a4
GM
18093 case $ac_cv_c_restrict in
18094 restrict) ;;
18095 no) $as_echo "#define restrict /**/" >>confdefs.h
18096 ;;
18097 *) cat >>confdefs.h <<_ACEOF
18098#define restrict $ac_cv_c_restrict
18099_ACEOF
18100 ;;
18101 esac
f199cab1 18102
f199cab1 18103
5476a9a4
GM
18104 GNULIB_GETTIMEOFDAY=0;
18105 HAVE_GETTIMEOFDAY=1;
18106 HAVE_STRUCT_TIMEVAL=1;
18107 HAVE_SYS_TIME_H=1;
18108 REPLACE_GETTIMEOFDAY=0;
18109 REPLACE_STRUCT_TIMEVAL=0;
e275c824 18110
e275c824 18111
e275c824 18112
e275c824 18113
4fda9c95 18114
5fa4ac76 18115
5fa4ac76 18116
5fa4ac76 18117
f199cab1
GM
18118
18119
18120
5fa4ac76 18121
5fa4ac76 18122
5fa4ac76 18123
5fa4ac76 18124
5fa4ac76 18125
5476a9a4
GM
18126 if test $gl_cv_have_include_next = yes; then
18127 gl_cv_next_sys_time_h='<'sys/time.h'>'
18128 else
18129 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
18130$as_echo_n "checking absolute name of <sys/time.h>... " >&6; }
18131if test "${gl_cv_next_sys_time_h+set}" = set; then :
18132 $as_echo_n "(cached) " >&6
18133else
5fa4ac76 18134
5476a9a4 18135 if test $ac_cv_header_sys_time_h = yes; then
5fa4ac76
PE
18136
18137
5476a9a4
GM
18138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18139/* end confdefs.h. */
18140#include <sys/time.h>
5fa4ac76 18141
5476a9a4
GM
18142_ACEOF
18143 case "$host_os" in
18144 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18145 *) gl_absname_cpp="$ac_cpp" ;;
18146 esac
1f5d53eb 18147
5476a9a4
GM
18148 case "$host_os" in
18149 mingw*)
18150 gl_dirsep_regex='[/\\]'
18151 ;;
18152 *)
18153 gl_dirsep_regex='\/'
18154 ;;
18155 esac
18156 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
1f5d53eb 18157
5476a9a4
GM
18158 gl_header_literal_regex=`echo 'sys/time.h' \
18159 | sed -e "$gl_make_literal_regex_sed"`
18160 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18161 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18162 s|^/[^/]|//&|
18163 p
18164 q
18165 }'
18166 gl_cv_next_sys_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18167 sed -n "$gl_absolute_header_sed"`'"'
18168 else
18169 gl_cv_next_sys_time_h='<'sys/time.h'>'
18170 fi
1f5d53eb 18171
1f5d53eb 18172
5476a9a4
GM
18173fi
18174{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
18175$as_echo "$gl_cv_next_sys_time_h" >&6; }
18176 fi
18177 NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
3e0be4ab 18178
5476a9a4
GM
18179 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18180 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18181 gl_next_as_first_directive='<'sys/time.h'>'
18182 else
18183 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18184 gl_next_as_first_directive=$gl_cv_next_sys_time_h
18185 fi
18186 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
3e0be4ab 18187
e275c824 18188
3e0be4ab 18189
f199cab1
GM
18190
18191
5476a9a4
GM
18192 if test $ac_cv_header_sys_time_h != yes; then
18193 HAVE_SYS_TIME_H=0
18194 fi
f199cab1
GM
18195
18196
18197
18198
18199
5476a9a4
GM
18200 if test $ac_cv_header_sys_socket_h != yes; then
18201 for ac_header in winsock2.h
18202do :
18203 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
18204if test "x$ac_cv_header_winsock2_h" = x""yes; then :
18205 cat >>confdefs.h <<_ACEOF
18206#define HAVE_WINSOCK2_H 1
18207_ACEOF
f199cab1 18208
5476a9a4 18209fi
3e0be4ab 18210
5476a9a4 18211done
3e0be4ab 18212
5476a9a4
GM
18213 fi
18214 if test "$ac_cv_header_winsock2_h" = yes; then
18215 HAVE_WINSOCK2_H=1
18216 UNISTD_H_HAVE_WINSOCK2_H=1
18217 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
18218 else
18219 HAVE_WINSOCK2_H=0
18220 fi
18221
18222
18223 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
18224$as_echo_n "checking for struct timeval... " >&6; }
18225if test "${gl_cv_sys_struct_timeval+set}" = set; then :
18226 $as_echo_n "(cached) " >&6
18227else
18228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18229/* end confdefs.h. */
18230#if HAVE_SYS_TIME_H
18231 #include <sys/time.h>
18232 #endif
18233 #include <time.h>
18234 #if HAVE_WINSOCK2_H
18235 # include <winsock2.h>
18236 #endif
f199cab1 18237
5476a9a4
GM
18238int
18239main ()
18240{
18241static struct timeval x; x.tv_sec = x.tv_usec;
18242 ;
18243 return 0;
18244}
18245_ACEOF
18246if ac_fn_c_try_compile "$LINENO"; then :
18247 gl_cv_sys_struct_timeval=yes
18248else
18249 gl_cv_sys_struct_timeval=no
f199cab1 18250fi
5476a9a4 18251rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 18252
5476a9a4
GM
18253fi
18254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
18255$as_echo "$gl_cv_sys_struct_timeval" >&6; }
18256 if test $gl_cv_sys_struct_timeval != yes; then
18257 HAVE_STRUCT_TIMEVAL=0
18258 else
18259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
18260$as_echo_n "checking for wide-enough struct timeval.tv_sec member... " >&6; }
18261if test "${gl_cv_sys_struct_timeval_tv_sec+set}" = set; then :
18262 $as_echo_n "(cached) " >&6
18263else
18264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18265/* end confdefs.h. */
18266#if HAVE_SYS_TIME_H
18267 #include <sys/time.h>
18268 #endif
18269 #include <time.h>
18270 #if HAVE_WINSOCK2_H
18271 # include <winsock2.h>
18272 #endif
f199cab1 18273
5476a9a4
GM
18274int
18275main ()
18276{
18277static struct timeval x;
18278 typedef int verify_tv_sec_type[
18279 sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
18280 ];
f199cab1 18281
5476a9a4
GM
18282 ;
18283 return 0;
18284}
18285_ACEOF
18286if ac_fn_c_try_compile "$LINENO"; then :
18287 gl_cv_sys_struct_timeval_tv_sec=yes
18288else
18289 gl_cv_sys_struct_timeval_tv_sec=no
18290fi
18291rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 18292
5476a9a4
GM
18293fi
18294{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
18295$as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
18296 if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
18297 REPLACE_STRUCT_TIMEVAL=1
18298 fi
18299 fi
f199cab1 18300
f199cab1
GM
18301
18302
18303
18304
18305
f199cab1 18306
5476a9a4
GM
18307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
18308$as_echo_n "checking for unsigned long long int... " >&6; }
18309if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then :
18310 $as_echo_n "(cached) " >&6
18311else
18312 ac_cv_type_unsigned_long_long_int=yes
18313 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
18314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18315/* end confdefs.h. */
f199cab1 18316
5476a9a4
GM
18317 /* For now, do not test the preprocessor; as of 2007 there are too many
18318 implementations with broken preprocessors. Perhaps this can
18319 be revisited in 2012. In the meantime, code should not expect
18320 #if to work with literals wider than 32 bits. */
18321 /* Test literals. */
18322 long long int ll = 9223372036854775807ll;
18323 long long int nll = -9223372036854775807LL;
18324 unsigned long long int ull = 18446744073709551615ULL;
18325 /* Test constant expressions. */
18326 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
18327 ? 1 : -1)];
18328 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
18329 ? 1 : -1)];
18330 int i = 63;
18331int
18332main ()
18333{
18334/* Test availability of runtime routines for shift and division. */
18335 long long int llmax = 9223372036854775807ll;
18336 unsigned long long int ullmax = 18446744073709551615ull;
18337 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
18338 | (llmax / ll) | (llmax % ll)
18339 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
18340 | (ullmax / ull) | (ullmax % ull));
18341 ;
18342 return 0;
18343}
f199cab1 18344
e275c824 18345_ACEOF
5476a9a4 18346if ac_fn_c_try_link "$LINENO"; then :
3e0be4ab 18347
5476a9a4
GM
18348else
18349 ac_cv_type_unsigned_long_long_int=no
e275c824 18350fi
5476a9a4
GM
18351rm -f core conftest.err conftest.$ac_objext \
18352 conftest$ac_exeext conftest.$ac_ext
18353 fi
18354fi
18355{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
18356$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
18357 if test $ac_cv_type_unsigned_long_long_int = yes; then
e275c824 18358
5476a9a4 18359$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
e275c824 18360
5476a9a4 18361 fi
e275c824
PE
18362
18363
f199cab1 18364
5476a9a4
GM
18365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
18366$as_echo_n "checking for long long int... " >&6; }
18367if test "${ac_cv_type_long_long_int+set}" = set; then :
18368 $as_echo_n "(cached) " >&6
18369else
18370 ac_cv_type_long_long_int=yes
18371 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
18372 ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
18373 if test $ac_cv_type_long_long_int = yes; then
18374 if test "$cross_compiling" = yes; then :
f199cab1 18375 :
5476a9a4
GM
18376else
18377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18378/* end confdefs.h. */
18379#include <limits.h>
18380 #ifndef LLONG_MAX
18381 # define HALF \
18382 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
18383 # define LLONG_MAX (HALF - 1 + HALF)
18384 #endif
18385int
18386main ()
18387{
18388long long int n = 1;
18389 int i;
18390 for (i = 0; ; i++)
18391 {
18392 long long int m = n << i;
18393 if (m >> i != n)
18394 return 1;
18395 if (LLONG_MAX / 2 < m)
18396 break;
18397 }
18398 return 0;
18399 ;
18400 return 0;
18401}
18402_ACEOF
18403if ac_fn_c_try_run "$LINENO"; then :
18404
18405else
18406 ac_cv_type_long_long_int=no
18407fi
18408rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18409 conftest.$ac_objext conftest.beam conftest.$ac_ext
18410fi
e275c824 18411
5476a9a4
GM
18412 fi
18413 fi
1f5d53eb 18414fi
5476a9a4
GM
18415{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
18416$as_echo "$ac_cv_type_long_long_int" >&6; }
18417 if test $ac_cv_type_long_long_int = yes; then
e275c824 18418
5476a9a4 18419$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
e275c824 18420
5476a9a4 18421 fi
e275c824
PE
18422
18423
e275c824
PE
18424
18425
18426
18427
5476a9a4
GM
18428 gl_cv_c_multiarch=no
18429 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18430/* end confdefs.h. */
18431#ifndef __APPLE_CC__
18432 not a universal capable compiler
18433 #endif
18434 typedef int dummy;
e275c824 18435
5476a9a4
GM
18436_ACEOF
18437if ac_fn_c_try_compile "$LINENO"; then :
e275c824 18438
5476a9a4
GM
18439 arch=
18440 prev=
18441 for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
18442 if test -n "$prev"; then
18443 case $word in
18444 i?86 | x86_64 | ppc | ppc64)
18445 if test -z "$arch" || test "$arch" = "$word"; then
18446 arch="$word"
18447 else
18448 gl_cv_c_multiarch=yes
18449 fi
18450 ;;
18451 esac
18452 prev=
18453 else
18454 if test "x$word" = "x-arch"; then
18455 prev=arch
18456 fi
18457 fi
18458 done
f199cab1 18459
f199cab1 18460fi
5476a9a4
GM
18461rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18462 if test $gl_cv_c_multiarch = yes; then
18463 APPLE_UNIVERSAL_BUILD=1
18464 else
18465 APPLE_UNIVERSAL_BUILD=0
18466 fi
e275c824
PE
18467
18468
67342916 18469
67342916 18470
67342916 18471
5476a9a4
GM
18472 if test $ac_cv_type_long_long_int = yes; then
18473 HAVE_LONG_LONG_INT=1
18474 else
18475 HAVE_LONG_LONG_INT=0
18476 fi
e275c824 18477
e275c824 18478
5476a9a4
GM
18479 if test $ac_cv_type_unsigned_long_long_int = yes; then
18480 HAVE_UNSIGNED_LONG_LONG_INT=1
18481 else
18482 HAVE_UNSIGNED_LONG_LONG_INT=0
18483 fi
e275c824
PE
18484
18485
18486
5476a9a4
GM
18487 if test $ac_cv_header_wchar_h = yes; then
18488 HAVE_WCHAR_H=1
18489 else
18490 HAVE_WCHAR_H=0
18491 fi
e275c824 18492
e275c824 18493
5476a9a4
GM
18494 if test $ac_cv_header_inttypes_h = yes; then
18495 HAVE_INTTYPES_H=1
18496 else
18497 HAVE_INTTYPES_H=0
18498 fi
6c051bab 18499
942f733f 18500
5476a9a4
GM
18501 if test $ac_cv_header_sys_types_h = yes; then
18502 HAVE_SYS_TYPES_H=1
18503 else
18504 HAVE_SYS_TYPES_H=0
18505 fi
4fc2b746 18506
4fc2b746 18507
f199cab1
GM
18508
18509
18510
18511
18512
18513
18514
18515
18516
5476a9a4
GM
18517 if test $gl_cv_have_include_next = yes; then
18518 gl_cv_next_stdint_h='<'stdint.h'>'
18519 else
18520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
18521$as_echo_n "checking absolute name of <stdint.h>... " >&6; }
18522if test "${gl_cv_next_stdint_h+set}" = set; then :
18523 $as_echo_n "(cached) " >&6
18524else
f199cab1 18525
5476a9a4 18526 if test $ac_cv_header_stdint_h = yes; then
f199cab1
GM
18527
18528
5476a9a4
GM
18529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18530/* end confdefs.h. */
18531#include <stdint.h>
f199cab1 18532
5476a9a4
GM
18533_ACEOF
18534 case "$host_os" in
18535 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18536 *) gl_absname_cpp="$ac_cpp" ;;
18537 esac
f199cab1 18538
5476a9a4
GM
18539 case "$host_os" in
18540 mingw*)
18541 gl_dirsep_regex='[/\\]'
18542 ;;
18543 *)
18544 gl_dirsep_regex='\/'
18545 ;;
18546 esac
18547 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
4fc2b746 18548
5476a9a4
GM
18549 gl_header_literal_regex=`echo 'stdint.h' \
18550 | sed -e "$gl_make_literal_regex_sed"`
18551 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18552 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18553 s|^/[^/]|//&|
18554 p
18555 q
18556 }'
18557 gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18558 sed -n "$gl_absolute_header_sed"`'"'
18559 else
18560 gl_cv_next_stdint_h='<'stdint.h'>'
18561 fi
4fc2b746 18562
4fc2b746 18563
5476a9a4
GM
18564fi
18565{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
18566$as_echo "$gl_cv_next_stdint_h" >&6; }
18567 fi
18568 NEXT_STDINT_H=$gl_cv_next_stdint_h
b0415a03 18569
5476a9a4
GM
18570 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18571 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18572 gl_next_as_first_directive='<'stdint.h'>'
18573 else
18574 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18575 gl_next_as_first_directive=$gl_cv_next_stdint_h
18576 fi
18577 NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
b0415a03 18578
4fc2b746 18579
f199cab1 18580
f199cab1 18581
5476a9a4
GM
18582 if test $ac_cv_header_stdint_h = yes; then
18583 HAVE_STDINT_H=1
18584 else
18585 HAVE_STDINT_H=0
18586 fi
f199cab1
GM
18587
18588
5476a9a4
GM
18589 if test $ac_cv_header_stdint_h = yes; then
18590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
18591$as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
18592if test "${gl_cv_header_working_stdint_h+set}" = set; then :
f199cab1
GM
18593 $as_echo_n "(cached) " >&6
18594else
5476a9a4
GM
18595 gl_cv_header_working_stdint_h=no
18596 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18597/* end confdefs.h. */
4fc2b746
GM
18598
18599
5476a9a4
GM
18600#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
18601#include <stdint.h>
18602/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
18603#if !(defined WCHAR_MIN && defined WCHAR_MAX)
18604#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
18605#endif
4fc2b746 18606
942f733f 18607
5476a9a4
GM
18608 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18609 included before <wchar.h>. */
18610 #include <stddef.h>
18611 #include <signal.h>
18612 #if HAVE_WCHAR_H
18613 # include <stdio.h>
18614 # include <time.h>
18615 # include <wchar.h>
18616 #endif
e275c824 18617
f199cab1 18618
5476a9a4
GM
18619#ifdef INT8_MAX
18620int8_t a1 = INT8_MAX;
18621int8_t a1min = INT8_MIN;
18622#endif
18623#ifdef INT16_MAX
18624int16_t a2 = INT16_MAX;
18625int16_t a2min = INT16_MIN;
18626#endif
18627#ifdef INT32_MAX
18628int32_t a3 = INT32_MAX;
18629int32_t a3min = INT32_MIN;
18630#endif
18631#ifdef INT64_MAX
18632int64_t a4 = INT64_MAX;
18633int64_t a4min = INT64_MIN;
18634#endif
18635#ifdef UINT8_MAX
18636uint8_t b1 = UINT8_MAX;
18637#else
18638typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
18639#endif
18640#ifdef UINT16_MAX
18641uint16_t b2 = UINT16_MAX;
18642#endif
18643#ifdef UINT32_MAX
18644uint32_t b3 = UINT32_MAX;
18645#endif
18646#ifdef UINT64_MAX
18647uint64_t b4 = UINT64_MAX;
18648#endif
18649int_least8_t c1 = INT8_C (0x7f);
18650int_least8_t c1max = INT_LEAST8_MAX;
18651int_least8_t c1min = INT_LEAST8_MIN;
18652int_least16_t c2 = INT16_C (0x7fff);
18653int_least16_t c2max = INT_LEAST16_MAX;
18654int_least16_t c2min = INT_LEAST16_MIN;
18655int_least32_t c3 = INT32_C (0x7fffffff);
18656int_least32_t c3max = INT_LEAST32_MAX;
18657int_least32_t c3min = INT_LEAST32_MIN;
18658int_least64_t c4 = INT64_C (0x7fffffffffffffff);
18659int_least64_t c4max = INT_LEAST64_MAX;
18660int_least64_t c4min = INT_LEAST64_MIN;
18661uint_least8_t d1 = UINT8_C (0xff);
18662uint_least8_t d1max = UINT_LEAST8_MAX;
18663uint_least16_t d2 = UINT16_C (0xffff);
18664uint_least16_t d2max = UINT_LEAST16_MAX;
18665uint_least32_t d3 = UINT32_C (0xffffffff);
18666uint_least32_t d3max = UINT_LEAST32_MAX;
18667uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
18668uint_least64_t d4max = UINT_LEAST64_MAX;
18669int_fast8_t e1 = INT_FAST8_MAX;
18670int_fast8_t e1min = INT_FAST8_MIN;
18671int_fast16_t e2 = INT_FAST16_MAX;
18672int_fast16_t e2min = INT_FAST16_MIN;
18673int_fast32_t e3 = INT_FAST32_MAX;
18674int_fast32_t e3min = INT_FAST32_MIN;
18675int_fast64_t e4 = INT_FAST64_MAX;
18676int_fast64_t e4min = INT_FAST64_MIN;
18677uint_fast8_t f1 = UINT_FAST8_MAX;
18678uint_fast16_t f2 = UINT_FAST16_MAX;
18679uint_fast32_t f3 = UINT_FAST32_MAX;
18680uint_fast64_t f4 = UINT_FAST64_MAX;
18681#ifdef INTPTR_MAX
18682intptr_t g = INTPTR_MAX;
18683intptr_t gmin = INTPTR_MIN;
18684#endif
18685#ifdef UINTPTR_MAX
18686uintptr_t h = UINTPTR_MAX;
18687#endif
18688intmax_t i = INTMAX_MAX;
18689uintmax_t j = UINTMAX_MAX;
5fa4ac76 18690
5476a9a4
GM
18691#include <limits.h> /* for CHAR_BIT */
18692#define TYPE_MINIMUM(t) \
18693 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
18694#define TYPE_MAXIMUM(t) \
18695 ((t) ((t) 0 < (t) -1 \
18696 ? (t) -1 \
18697 : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
18698struct s {
18699 int check_PTRDIFF:
18700 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
18701 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
18702 ? 1 : -1;
18703 /* Detect bug in FreeBSD 6.0 / ia64. */
18704 int check_SIG_ATOMIC:
18705 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
18706 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
18707 ? 1 : -1;
18708 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
18709 int check_WCHAR:
18710 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
18711 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
18712 ? 1 : -1;
18713 /* Detect bug in mingw. */
18714 int check_WINT:
18715 WINT_MIN == TYPE_MINIMUM (wint_t)
18716 && WINT_MAX == TYPE_MAXIMUM (wint_t)
18717 ? 1 : -1;
5fa4ac76 18718
5476a9a4
GM
18719 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
18720 int check_UINT8_C:
18721 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
18722 int check_UINT16_C:
18723 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
18724
18725 /* Detect bugs in OpenBSD 3.9 stdint.h. */
18726#ifdef UINT8_MAX
18727 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
3e0be4ab 18728#endif
5476a9a4
GM
18729#ifdef UINT16_MAX
18730 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
18731#endif
18732#ifdef UINT32_MAX
18733 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
18734#endif
18735#ifdef UINT64_MAX
18736 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
18737#endif
18738 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
18739 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
18740 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
18741 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
18742 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
18743 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
18744 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
18745 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
18746 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
18747 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
18748 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
18749};
18750
f199cab1
GM
18751int
18752main ()
18753{
5476a9a4 18754
f199cab1
GM
18755 ;
18756 return 0;
18757}
18758_ACEOF
5476a9a4
GM
18759if ac_fn_c_try_compile "$LINENO"; then :
18760 if test "$cross_compiling" = yes; then :
18761 gl_cv_header_working_stdint_h=yes
40e27e7f 18762
5476a9a4
GM
18763else
18764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18765/* end confdefs.h. */
40e27e7f 18766
f199cab1 18767
5476a9a4
GM
18768#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
18769#include <stdint.h>
f199cab1
GM
18770
18771
5476a9a4
GM
18772 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18773 included before <wchar.h>. */
18774 #include <stddef.h>
18775 #include <signal.h>
18776 #if HAVE_WCHAR_H
18777 # include <stdio.h>
18778 # include <time.h>
18779 # include <wchar.h>
18780 #endif
f199cab1 18781
d87ffdb7 18782
5476a9a4
GM
18783#include <stdio.h>
18784#include <string.h>
18785#define MVAL(macro) MVAL1(macro)
18786#define MVAL1(expression) #expression
18787static const char *macro_values[] =
18788 {
18789#ifdef INT8_MAX
18790 MVAL (INT8_MAX),
18791#endif
18792#ifdef INT16_MAX
18793 MVAL (INT16_MAX),
18794#endif
18795#ifdef INT32_MAX
18796 MVAL (INT32_MAX),
18797#endif
18798#ifdef INT64_MAX
18799 MVAL (INT64_MAX),
18800#endif
18801#ifdef UINT8_MAX
18802 MVAL (UINT8_MAX),
18803#endif
18804#ifdef UINT16_MAX
18805 MVAL (UINT16_MAX),
18806#endif
18807#ifdef UINT32_MAX
18808 MVAL (UINT32_MAX),
18809#endif
18810#ifdef UINT64_MAX
18811 MVAL (UINT64_MAX),
18812#endif
18813 NULL
18814 };
f199cab1 18815
3e0be4ab
GM
18816int
18817main ()
18818{
5476a9a4
GM
18819
18820 const char **mv;
18821 for (mv = macro_values; *mv != NULL; mv++)
18822 {
18823 const char *value = *mv;
18824 /* Test whether it looks like a cast expression. */
18825 if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
18826 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
18827 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
18828 || strncmp (value, "((int)"/*)*/, 6) == 0
18829 || strncmp (value, "((signed short)"/*)*/, 15) == 0
18830 || strncmp (value, "((signed char)"/*)*/, 14) == 0)
18831 return mv - macro_values + 1;
18832 }
3e0be4ab 18833 return 0;
5476a9a4 18834
f199cab1
GM
18835 ;
18836 return 0;
18837}
18838_ACEOF
5476a9a4
GM
18839if ac_fn_c_try_run "$LINENO"; then :
18840 gl_cv_header_working_stdint_h=yes
f199cab1 18841fi
5476a9a4
GM
18842rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18843 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1
GM
18844fi
18845
d87ffdb7 18846
5476a9a4
GM
18847fi
18848rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d87ffdb7 18849
5476a9a4
GM
18850fi
18851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
18852$as_echo "$gl_cv_header_working_stdint_h" >&6; }
18853 fi
18854 if test "$gl_cv_header_working_stdint_h" = yes; then
18855 STDINT_H=
18856 else
18857 for ac_header in sys/inttypes.h sys/bitypes.h
18858do :
18859 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
18860ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
18861eval as_val=\$$as_ac_Header
18862 if test "x$as_val" = x""yes; then :
18863 cat >>confdefs.h <<_ACEOF
18864#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
18865_ACEOF
d87ffdb7 18866
5476a9a4 18867fi
d87ffdb7 18868
5476a9a4 18869done
7d2a1c5e 18870
5476a9a4
GM
18871 if test $ac_cv_header_sys_inttypes_h = yes; then
18872 HAVE_SYS_INTTYPES_H=1
18873 else
18874 HAVE_SYS_INTTYPES_H=0
18875 fi
7d2a1c5e 18876
5476a9a4
GM
18877 if test $ac_cv_header_sys_bitypes_h = yes; then
18878 HAVE_SYS_BITYPES_H=1
18879 else
18880 HAVE_SYS_BITYPES_H=0
18881 fi
7d2a1c5e 18882
f199cab1
GM
18883
18884
18885
5476a9a4 18886 if test $APPLE_UNIVERSAL_BUILD = 0; then
f199cab1
GM
18887
18888
5476a9a4
GM
18889 for gltype in ptrdiff_t size_t ; do
18890 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
18891$as_echo_n "checking for bit size of $gltype... " >&6; }
18892if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
18893 $as_echo_n "(cached) " >&6
18894else
18895 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
18896 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18897 included before <wchar.h>. */
18898 #include <stddef.h>
18899 #include <signal.h>
18900 #if HAVE_WCHAR_H
18901 # include <stdio.h>
18902 # include <time.h>
18903 # include <wchar.h>
18904 #endif
f199cab1 18905
5476a9a4 18906#include <limits.h>"; then :
f199cab1 18907
5476a9a4
GM
18908else
18909 result=unknown
18910fi
f199cab1 18911
5476a9a4 18912 eval gl_cv_bitsizeof_${gltype}=\$result
f199cab1 18913
5476a9a4
GM
18914fi
18915eval ac_res=\$gl_cv_bitsizeof_${gltype}
18916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18917$as_echo "$ac_res" >&6; }
18918 eval result=\$gl_cv_bitsizeof_${gltype}
18919 if test $result = unknown; then
18920 result=0
18921 fi
18922 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
18923 cat >>confdefs.h <<_ACEOF
18924#define BITSIZEOF_${GLTYPE} $result
18925_ACEOF
f199cab1 18926
5476a9a4
GM
18927 eval BITSIZEOF_${GLTYPE}=\$result
18928 done
f199cab1
GM
18929
18930
5476a9a4 18931 fi
f199cab1
GM
18932
18933
5476a9a4
GM
18934 for gltype in sig_atomic_t wchar_t wint_t ; do
18935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
18936$as_echo_n "checking for bit size of $gltype... " >&6; }
18937if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
18938 $as_echo_n "(cached) " >&6
18939else
18940 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
18941 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18942 included before <wchar.h>. */
18943 #include <stddef.h>
18944 #include <signal.h>
18945 #if HAVE_WCHAR_H
18946 # include <stdio.h>
18947 # include <time.h>
18948 # include <wchar.h>
18949 #endif
f199cab1 18950
5476a9a4 18951#include <limits.h>"; then :
f199cab1 18952
f199cab1 18953else
5476a9a4 18954 result=unknown
7d2a1c5e 18955fi
7d2a1c5e 18956
5476a9a4 18957 eval gl_cv_bitsizeof_${gltype}=\$result
7d2a1c5e 18958
3e0be4ab 18959fi
5476a9a4
GM
18960eval ac_res=\$gl_cv_bitsizeof_${gltype}
18961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18962$as_echo "$ac_res" >&6; }
18963 eval result=\$gl_cv_bitsizeof_${gltype}
18964 if test $result = unknown; then
18965 result=0
18966 fi
18967 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
18968 cat >>confdefs.h <<_ACEOF
18969#define BITSIZEOF_${GLTYPE} $result
3e0be4ab 18970_ACEOF
7d2a1c5e 18971
5476a9a4
GM
18972 eval BITSIZEOF_${GLTYPE}=\$result
18973 done
7d2a1c5e
GM
18974
18975
5476a9a4
GM
18976
18977
18978 for gltype in sig_atomic_t wchar_t wint_t ; do
18979 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
18980$as_echo_n "checking whether $gltype is signed... " >&6; }
18981if { as_var=gl_cv_type_${gltype}_signed; eval "test \"\${$as_var+set}\" = set"; }; then :
3e0be4ab
GM
18982 $as_echo_n "(cached) " >&6
18983else
f199cab1
GM
18984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18985/* end confdefs.h. */
f199cab1 18986
5476a9a4
GM
18987 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18988 included before <wchar.h>. */
18989 #include <stddef.h>
18990 #include <signal.h>
18991 #if HAVE_WCHAR_H
18992 # include <stdio.h>
18993 # include <time.h>
18994 # include <wchar.h>
18995 #endif
18996
18997 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
f199cab1
GM
18998int
18999main ()
19000{
5476a9a4 19001
f199cab1
GM
19002 ;
19003 return 0;
19004}
19005_ACEOF
19006if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4 19007 result=yes
f199cab1 19008else
5476a9a4 19009 result=no
f199cab1
GM
19010fi
19011rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5476a9a4 19012 eval gl_cv_type_${gltype}_signed=\$result
7d2a1c5e 19013
3e0be4ab 19014fi
5476a9a4
GM
19015eval ac_res=\$gl_cv_type_${gltype}_signed
19016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
19017$as_echo "$ac_res" >&6; }
19018 eval result=\$gl_cv_type_${gltype}_signed
19019 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
19020 if test "$result" = yes; then
19021 cat >>confdefs.h <<_ACEOF
19022#define HAVE_SIGNED_${GLTYPE} 1
f199cab1 19023_ACEOF
d87ffdb7 19024
5476a9a4
GM
19025 eval HAVE_SIGNED_${GLTYPE}=1
19026 else
19027 eval HAVE_SIGNED_${GLTYPE}=0
19028 fi
19029 done
f199cab1 19030
e275c824 19031
5476a9a4
GM
19032 gl_cv_type_ptrdiff_t_signed=yes
19033 gl_cv_type_size_t_signed=no
19034 if test $APPLE_UNIVERSAL_BUILD = 0; then
e275c824 19035
e275c824 19036
5476a9a4
GM
19037 for gltype in ptrdiff_t size_t ; do
19038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
19039$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
19040if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
16c3e636
PE
19041 $as_echo_n "(cached) " >&6
19042else
5476a9a4
GM
19043 eval gl_cv_type_${gltype}_suffix=no
19044 eval result=\$gl_cv_type_${gltype}_signed
19045 if test "$result" = yes; then
19046 glsufu=
19047 else
19048 glsufu=u
19049 fi
19050 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
19051 case $glsuf in
19052 '') gltype1='int';;
19053 l) gltype1='long int';;
19054 ll) gltype1='long long int';;
19055 i64) gltype1='__int64';;
19056 u) gltype1='unsigned int';;
19057 ul) gltype1='unsigned long int';;
19058 ull) gltype1='unsigned long long int';;
19059 ui64)gltype1='unsigned __int64';;
19060 esac
19061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 19062/* end confdefs.h. */
16c3e636 19063
5476a9a4
GM
19064 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19065 included before <wchar.h>. */
19066 #include <stddef.h>
19067 #include <signal.h>
19068 #if HAVE_WCHAR_H
19069 # include <stdio.h>
19070 # include <time.h>
19071 # include <wchar.h>
19072 #endif
1f5d53eb 19073
5476a9a4
GM
19074 extern $gltype foo;
19075 extern $gltype1 foo;
f199cab1
GM
19076int
19077main ()
19078{
5476a9a4 19079
f199cab1
GM
19080 ;
19081 return 0;
19082}
19083_ACEOF
19084if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4 19085 eval gl_cv_type_${gltype}_suffix=\$glsuf
f199cab1
GM
19086fi
19087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5476a9a4
GM
19088 eval result=\$gl_cv_type_${gltype}_suffix
19089 test "$result" != no && break
19090 done
f199cab1 19091fi
5476a9a4
GM
19092eval ac_res=\$gl_cv_type_${gltype}_suffix
19093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
19094$as_echo "$ac_res" >&6; }
19095 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
19096 eval result=\$gl_cv_type_${gltype}_suffix
19097 test "$result" = no && result=
19098 eval ${GLTYPE}_SUFFIX=\$result
19099 cat >>confdefs.h <<_ACEOF
19100#define ${GLTYPE}_SUFFIX $result
19101_ACEOF
16c3e636 19102
5476a9a4 19103 done
16c3e636 19104
3e0be4ab 19105
5476a9a4
GM
19106 fi
19107
19108
19109 for gltype in sig_atomic_t wchar_t wint_t ; do
19110 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
19111$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
19112if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
1fd182f0
PE
19113 $as_echo_n "(cached) " >&6
19114else
5476a9a4
GM
19115 eval gl_cv_type_${gltype}_suffix=no
19116 eval result=\$gl_cv_type_${gltype}_signed
19117 if test "$result" = yes; then
19118 glsufu=
19119 else
19120 glsufu=u
19121 fi
19122 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
19123 case $glsuf in
19124 '') gltype1='int';;
19125 l) gltype1='long int';;
19126 ll) gltype1='long long int';;
19127 i64) gltype1='__int64';;
19128 u) gltype1='unsigned int';;
19129 ul) gltype1='unsigned long int';;
19130 ull) gltype1='unsigned long long int';;
19131 ui64)gltype1='unsigned __int64';;
19132 esac
19133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1fd182f0 19134/* end confdefs.h. */
5476a9a4
GM
19135
19136 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19137 included before <wchar.h>. */
19138 #include <stddef.h>
19139 #include <signal.h>
19140 #if HAVE_WCHAR_H
19141 # include <stdio.h>
19142 # include <time.h>
19143 # include <wchar.h>
19144 #endif
19145
19146 extern $gltype foo;
19147 extern $gltype1 foo;
1fd182f0
PE
19148int
19149main ()
19150{
5476a9a4 19151
1fd182f0
PE
19152 ;
19153 return 0;
19154}
19155_ACEOF
3e0be4ab 19156if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4 19157 eval gl_cv_type_${gltype}_suffix=\$glsuf
1f5d53eb 19158fi
3e0be4ab 19159rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5476a9a4
GM
19160 eval result=\$gl_cv_type_${gltype}_suffix
19161 test "$result" != no && break
19162 done
f199cab1 19163fi
5476a9a4
GM
19164eval ac_res=\$gl_cv_type_${gltype}_suffix
19165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
19166$as_echo "$ac_res" >&6; }
19167 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
19168 eval result=\$gl_cv_type_${gltype}_suffix
19169 test "$result" = no && result=
19170 eval ${GLTYPE}_SUFFIX=\$result
19171 cat >>confdefs.h <<_ACEOF
19172#define ${GLTYPE}_SUFFIX $result
f199cab1
GM
19173_ACEOF
19174
5476a9a4 19175 done
f199cab1 19176
f199cab1 19177
f199cab1 19178
5476a9a4
GM
19179 if test $BITSIZEOF_WINT_T -lt 32; then
19180 BITSIZEOF_WINT_T=32
19181 fi
f199cab1 19182
5476a9a4
GM
19183 STDINT_H=stdint.h
19184 fi
f199cab1 19185
5476a9a4
GM
19186 if test -n "$STDINT_H"; then
19187 GL_GENERATE_STDINT_H_TRUE=
19188 GL_GENERATE_STDINT_H_FALSE='#'
19189else
19190 GL_GENERATE_STDINT_H_TRUE='#'
19191 GL_GENERATE_STDINT_H_FALSE=
f199cab1
GM
19192fi
19193
f199cab1 19194
f199cab1 19195
3e0be4ab 19196
f199cab1 19197
5476a9a4
GM
19198 GNULIB_IMAXABS=0;
19199 GNULIB_IMAXDIV=0;
19200 GNULIB_STRTOIMAX=0;
19201 GNULIB_STRTOUMAX=0;
19202 HAVE_DECL_IMAXABS=1;
19203 HAVE_DECL_IMAXDIV=1;
19204 HAVE_DECL_STRTOIMAX=1;
19205 HAVE_DECL_STRTOUMAX=1;
19206 REPLACE_STRTOIMAX=0;
19207 INT32_MAX_LT_INTMAX_MAX=1;
19208 INT64_MAX_EQ_LONG_MAX='defined _LP64';
19209 PRI_MACROS_BROKEN=0;
19210 PRIPTR_PREFIX=__PRIPTR_PREFIX;
19211 UINT32_MAX_LT_UINTMAX_MAX=1;
19212 UINT64_MAX_EQ_ULONG_MAX='defined _LP64';
1fd182f0 19213
1fd182f0 19214
1f5d53eb 19215
3e0be4ab
GM
19216
19217
1fd182f0 19218
3e0be4ab 19219
3e0be4ab 19220
f199cab1 19221
1fd182f0 19222
1f5d53eb 19223
1f5d53eb 19224
1f5d53eb 19225
3e0be4ab 19226
3e0be4ab 19227
5476a9a4
GM
19228 if test $gl_cv_have_include_next = yes; then
19229 gl_cv_next_inttypes_h='<'inttypes.h'>'
19230 else
19231 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
19232$as_echo_n "checking absolute name of <inttypes.h>... " >&6; }
19233if test "${gl_cv_next_inttypes_h+set}" = set; then :
19234 $as_echo_n "(cached) " >&6
f199cab1 19235else
2b1928b8 19236
5476a9a4 19237 if test $ac_cv_header_inttypes_h = yes; then
3e0be4ab
GM
19238
19239
5476a9a4 19240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 19241/* end confdefs.h. */
5476a9a4 19242#include <inttypes.h>
3e0be4ab 19243
f199cab1 19244_ACEOF
5476a9a4
GM
19245 case "$host_os" in
19246 aix*) gl_absname_cpp="$ac_cpp -C" ;;
19247 *) gl_absname_cpp="$ac_cpp" ;;
19248 esac
1fd182f0 19249
5476a9a4
GM
19250 case "$host_os" in
19251 mingw*)
19252 gl_dirsep_regex='[/\\]'
19253 ;;
19254 *)
19255 gl_dirsep_regex='\/'
19256 ;;
19257 esac
19258 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
1fd182f0 19259
5476a9a4
GM
19260 gl_header_literal_regex=`echo 'inttypes.h' \
19261 | sed -e "$gl_make_literal_regex_sed"`
19262 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19263 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19264 s|^/[^/]|//&|
19265 p
19266 q
19267 }'
19268 gl_cv_next_inttypes_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19269 sed -n "$gl_absolute_header_sed"`'"'
19270 else
19271 gl_cv_next_inttypes_h='<'inttypes.h'>'
19272 fi
1fd182f0
PE
19273
19274
5476a9a4
GM
19275fi
19276{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
19277$as_echo "$gl_cv_next_inttypes_h" >&6; }
19278 fi
19279 NEXT_INTTYPES_H=$gl_cv_next_inttypes_h
1fd182f0 19280
5476a9a4
GM
19281 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19282 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19283 gl_next_as_first_directive='<'inttypes.h'>'
19284 else
19285 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19286 gl_next_as_first_directive=$gl_cv_next_inttypes_h
19287 fi
19288 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
34119902
GM
19289
19290
3e0be4ab 19291
34119902 19292
3e0be4ab 19293
34119902 19294
b0415a03 19295
b0415a03 19296
3e0be4ab 19297
34119902 19298
34119902 19299
5476a9a4
GM
19300 case "$host_os" in
19301 mingw*)
19302 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
19303$as_echo_n "checking for 64-bit off_t... " >&6; }
19304if test "${gl_cv_type_off_t_64+set}" = set; then :
f199cab1
GM
19305 $as_echo_n "(cached) " >&6
19306else
5476a9a4
GM
19307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19308/* end confdefs.h. */
19309#include <sys/types.h>
19310 int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
19311
19312int
19313main ()
19314{
19315
19316 ;
19317 return 0;
19318}
f199cab1 19319_ACEOF
5476a9a4
GM
19320if ac_fn_c_try_compile "$LINENO"; then :
19321 gl_cv_type_off_t_64=yes
19322else
19323 gl_cv_type_off_t_64=no
f199cab1 19324fi
5476a9a4 19325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34119902 19326
5476a9a4
GM
19327fi
19328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
19329$as_echo "$gl_cv_type_off_t_64" >&6; }
19330 if test $gl_cv_type_off_t_64 = no; then
19331 WINDOWS_64_BIT_OFF_T=1
19332 else
19333 WINDOWS_64_BIT_OFF_T=0
19334 fi
19335 WINDOWS_64_BIT_ST_SIZE=1
19336 ;;
19337 *)
19338 WINDOWS_64_BIT_OFF_T=0
19339 WINDOWS_64_BIT_ST_SIZE=0
19340 ;;
19341 esac
34119902
GM
19342
19343
34119902
GM
19344
19345
5476a9a4
GM
19346 GNULIB_MKTIME=0;
19347 GNULIB_NANOSLEEP=0;
19348 GNULIB_STRPTIME=0;
19349 GNULIB_TIMEGM=0;
19350 GNULIB_TIME_R=0;
19351 HAVE_DECL_LOCALTIME_R=1;
19352 HAVE_NANOSLEEP=1;
19353 HAVE_STRPTIME=1;
19354 HAVE_TIMEGM=1;
19355 REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
19356 REPLACE_MKTIME=GNULIB_PORTCHECK;
19357 REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
19358 REPLACE_TIMEGM=GNULIB_PORTCHECK;
34119902 19359
3e0be4ab
GM
19360
19361
19362
5476a9a4
GM
19363 GNULIB_PSELECT=0;
19364 GNULIB_SELECT=0;
19365 HAVE_PSELECT=1;
19366 REPLACE_PSELECT=0;
19367 REPLACE_SELECT=0;
19368
19369
3e0be4ab 19370
5476a9a4
GM
19371
19372
19373
19374 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/select.h> is self-contained" >&5
19375$as_echo_n "checking whether <sys/select.h> is self-contained... " >&6; }
19376if test "${gl_cv_header_sys_select_h_selfcontained+set}" = set; then :
f199cab1 19377 $as_echo_n "(cached) " >&6
3e0be4ab 19378else
5476a9a4
GM
19379
19380 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3e0be4ab 19381/* end confdefs.h. */
5476a9a4 19382#include <sys/select.h>
3e0be4ab
GM
19383int
19384main ()
19385{
5476a9a4 19386struct timeval b;
3e0be4ab
GM
19387 ;
19388 return 0;
19389}
34119902 19390_ACEOF
f199cab1 19391if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4 19392 gl_cv_header_sys_select_h_selfcontained=yes
3e0be4ab 19393else
5476a9a4 19394 gl_cv_header_sys_select_h_selfcontained=no
3e0be4ab 19395fi
f199cab1 19396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5476a9a4
GM
19397 if test $gl_cv_header_sys_select_h_selfcontained = yes; then
19398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19399/* end confdefs.h. */
19400#include <sys/select.h>
19401int
19402main ()
19403{
19404int memset; int bzero;
19405 ;
19406 return 0;
19407}
3e0be4ab 19408
5476a9a4
GM
19409_ACEOF
19410if ac_fn_c_try_compile "$LINENO"; then :
f199cab1
GM
19411 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19412/* end confdefs.h. */
5476a9a4 19413#include <sys/select.h>
f199cab1
GM
19414int
19415main ()
19416{
5476a9a4
GM
19417
19418 #undef memset
19419 #define memset nonexistent_memset
19420 extern
19421 #ifdef __cplusplus
19422 "C"
19423 #endif
19424 void *memset (void *, int, unsigned long);
19425 #undef bzero
19426 #define bzero nonexistent_bzero
19427 extern
19428 #ifdef __cplusplus
19429 "C"
19430 #endif
19431 void bzero (void *, unsigned long);
19432 fd_set fds;
19433 FD_ZERO (&fds);
19434
f199cab1
GM
19435 ;
19436 return 0;
19437}
5476a9a4 19438
f199cab1 19439_ACEOF
5476a9a4
GM
19440if ac_fn_c_try_link "$LINENO"; then :
19441
f199cab1 19442else
5476a9a4 19443 gl_cv_header_sys_select_h_selfcontained=no
f199cab1 19444fi
5476a9a4
GM
19445rm -f core conftest.err conftest.$ac_objext \
19446 conftest$ac_exeext conftest.$ac_ext
1fd182f0 19447
f199cab1 19448fi
5476a9a4
GM
19449rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19450 fi
1fd182f0 19451
f199cab1 19452fi
5476a9a4
GM
19453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_select_h_selfcontained" >&5
19454$as_echo "$gl_cv_header_sys_select_h_selfcontained" >&6; }
1fd182f0
PE
19455
19456
b06b1098 19457
0eb775a3
GM
19458
19459
b06b1098 19460
1fd182f0 19461
1fd182f0 19462
5476a9a4
GM
19463
19464 if test $gl_cv_have_include_next = yes; then
19465 gl_cv_next_sys_select_h='<'sys/select.h'>'
19466 else
19467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/select.h>" >&5
19468$as_echo_n "checking absolute name of <sys/select.h>... " >&6; }
19469if test "${gl_cv_next_sys_select_h+set}" = set; then :
f199cab1 19470 $as_echo_n "(cached) " >&6
3e0be4ab 19471else
1fd182f0 19472
5476a9a4
GM
19473 if test $ac_cv_header_sys_select_h = yes; then
19474
19475
19476 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19477/* end confdefs.h. */
19478#include <sys/select.h>
19479
19480_ACEOF
19481 case "$host_os" in
19482 aix*) gl_absname_cpp="$ac_cpp -C" ;;
19483 *) gl_absname_cpp="$ac_cpp" ;;
19484 esac
19485
19486 case "$host_os" in
19487 mingw*)
19488 gl_dirsep_regex='[/\\]'
19489 ;;
19490 *)
19491 gl_dirsep_regex='\/'
19492 ;;
19493 esac
19494 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
19495
19496 gl_header_literal_regex=`echo 'sys/select.h' \
19497 | sed -e "$gl_make_literal_regex_sed"`
19498 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19499 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19500 s|^/[^/]|//&|
19501 p
19502 q
19503 }'
19504 gl_cv_next_sys_select_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19505 sed -n "$gl_absolute_header_sed"`'"'
19506 else
19507 gl_cv_next_sys_select_h='<'sys/select.h'>'
19508 fi
1fd182f0 19509
3e0be4ab 19510
1f5d53eb 19511fi
5476a9a4
GM
19512{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_select_h" >&5
19513$as_echo "$gl_cv_next_sys_select_h" >&6; }
19514 fi
19515 NEXT_SYS_SELECT_H=$gl_cv_next_sys_select_h
1fd182f0 19516
5476a9a4
GM
19517 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19518 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19519 gl_next_as_first_directive='<'sys/select.h'>'
19520 else
19521 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19522 gl_next_as_first_directive=$gl_cv_next_sys_select_h
19523 fi
19524 NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H=$gl_next_as_first_directive
1fd182f0
PE
19525
19526
5476a9a4
GM
19527
19528
19529 if test $ac_cv_header_sys_select_h = yes; then
19530 HAVE_SYS_SELECT_H=1
19531 else
19532 HAVE_SYS_SELECT_H=0
19533 fi
19534
19535
19536
19537
19538
19539 if test $ac_cv_header_sys_socket_h != yes; then
19540 for ac_header in winsock2.h
19541do :
19542 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
19543if test "x$ac_cv_header_winsock2_h" = x""yes; then :
19544 cat >>confdefs.h <<_ACEOF
19545#define HAVE_WINSOCK2_H 1
f199cab1 19546_ACEOF
5476a9a4 19547
f199cab1 19548fi
3e0be4ab 19549
5476a9a4 19550done
3e0be4ab 19551
5476a9a4
GM
19552 fi
19553 if test "$ac_cv_header_winsock2_h" = yes; then
19554 HAVE_WINSOCK2_H=1
19555 UNISTD_H_HAVE_WINSOCK2_H=1
19556 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
19557 else
19558 HAVE_WINSOCK2_H=0
19559 fi
f199cab1 19560
f199cab1 19561
f199cab1 19562
f199cab1 19563
3e0be4ab 19564
3e0be4ab 19565
3e0be4ab 19566
3e0be4ab 19567
5476a9a4
GM
19568 GNULIB_PTHREAD_SIGMASK=0;
19569 GNULIB_RAISE=0;
19570 GNULIB_SIGNAL_H_SIGPIPE=0;
19571 GNULIB_SIGPROCMASK=0;
19572 GNULIB_SIGACTION=0;
19573 HAVE_POSIX_SIGNALBLOCKING=1;
19574 HAVE_PTHREAD_SIGMASK=1;
19575 HAVE_RAISE=1;
19576 HAVE_SIGSET_T=1;
19577 HAVE_SIGINFO_T=1;
19578 HAVE_SIGACTION=1;
19579 HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
19580
19581 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
f199cab1 19582
5476a9a4
GM
19583 HAVE_SIGHANDLER_T=1;
19584 REPLACE_PTHREAD_SIGMASK=0;
19585 REPLACE_RAISE=0;
1f5d53eb 19586
1fd182f0 19587
b06b1098 19588
1fd182f0 19589
3e0be4ab
GM
19590
19591
f077f61d 19592
5476a9a4
GM
19593 ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
19594 #include <signal.h>
19595 /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
19596 #include <sys/types.h>
19597
19598"
19599if test "x$ac_cv_type_sigset_t" = x""yes; then :
19600
19601cat >>confdefs.h <<_ACEOF
19602#define HAVE_SIGSET_T 1
f199cab1 19603_ACEOF
3e0be4ab 19604
5476a9a4
GM
19605gl_cv_type_sigset_t=yes
19606else
19607 gl_cv_type_sigset_t=no
f199cab1 19608fi
3e0be4ab 19609
5476a9a4
GM
19610 if test $gl_cv_type_sigset_t != yes; then
19611 HAVE_SIGSET_T=0
19612 fi
3e0be4ab 19613
1f5d53eb 19614
3e0be4ab 19615
5476a9a4
GM
19616 if test $ac_cv_header_sys_socket_h = no; then
19617 for ac_header in ws2tcpip.h
19618do :
19619 ac_fn_c_check_header_mongrel "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default"
19620if test "x$ac_cv_header_ws2tcpip_h" = x""yes; then :
19621 cat >>confdefs.h <<_ACEOF
19622#define HAVE_WS2TCPIP_H 1
19623_ACEOF
3e0be4ab 19624
5476a9a4 19625fi
3e0be4ab 19626
5476a9a4
GM
19627done
19628
19629 fi
19630
19631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
19632$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
19633if test "${ac_cv_header_stdbool_h+set}" = set; then :
19634 $as_echo_n "(cached) " >&6
19635else
19636 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19637/* end confdefs.h. */
1f5d53eb 19638
5476a9a4
GM
19639 #include <stdbool.h>
19640 #ifndef bool
19641 "error: bool is not defined"
19642 #endif
19643 #ifndef false
19644 "error: false is not defined"
19645 #endif
19646 #if false
19647 "error: false is not 0"
19648 #endif
19649 #ifndef true
19650 "error: true is not defined"
19651 #endif
19652 #if true != 1
19653 "error: true is not 1"
19654 #endif
19655 #ifndef __bool_true_false_are_defined
19656 "error: __bool_true_false_are_defined is not defined"
19657 #endif
19658
19659 struct s { _Bool s: 1; _Bool t; } s;
19660
19661 char a[true == 1 ? 1 : -1];
19662 char b[false == 0 ? 1 : -1];
19663 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
19664 char d[(bool) 0.5 == true ? 1 : -1];
19665 /* See body of main program for 'e'. */
19666 char f[(_Bool) 0.0 == false ? 1 : -1];
19667 char g[true];
19668 char h[sizeof (_Bool)];
19669 char i[sizeof s.t];
19670 enum { j = false, k = true, l = false * true, m = true * 256 };
19671 /* The following fails for
19672 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
19673 _Bool n[m];
19674 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
19675 char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
19676 /* Catch a bug in an HP-UX C compiler. See
19677 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
19678 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
19679 */
19680 _Bool q = true;
19681 _Bool *pq = &q;
1ebc9c87
GM
19682
19683int
19684main ()
19685{
f199cab1 19686
5476a9a4
GM
19687 bool e = &s;
19688 *pq |= q;
19689 *pq |= ! q;
19690 /* Refer to every declared value, to avoid compiler optimizations. */
19691 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
19692 + !m + !n + !o + !p + !q + !pq);
f199cab1 19693
5476a9a4 19694 ;
1ebc9c87
GM
19695 return 0;
19696}
19697_ACEOF
5476a9a4
GM
19698if ac_fn_c_try_compile "$LINENO"; then :
19699 ac_cv_header_stdbool_h=yes
1ebc9c87 19700else
5476a9a4 19701 ac_cv_header_stdbool_h=no
1ebc9c87 19702fi
5476a9a4 19703rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1ebc9c87 19704fi
5476a9a4
GM
19705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
19706$as_echo "$ac_cv_header_stdbool_h" >&6; }
19707 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
19708if test "x$ac_cv_type__Bool" = x""yes; then :
1ebc9c87 19709
5476a9a4
GM
19710cat >>confdefs.h <<_ACEOF
19711#define HAVE__BOOL 1
19712_ACEOF
1ebc9c87 19713
1ebc9c87
GM
19714
19715fi
19716
1ebc9c87 19717
1ebc9c87 19718
5476a9a4
GM
19719 REPLACE_NULL=0;
19720 HAVE_WCHAR_T=1;
19721
19722
19723 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
19724$as_echo_n "checking for wchar_t... " >&6; }
19725if test "${gt_cv_c_wchar_t+set}" = set; then :
19726 $as_echo_n "(cached) " >&6
19727else
19728 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19729/* end confdefs.h. */
19730#include <stddef.h>
19731 wchar_t foo = (wchar_t)'\0';
19732int
19733main ()
19734{
19735
19736 ;
19737 return 0;
19738}
19739_ACEOF
19740if ac_fn_c_try_compile "$LINENO"; then :
19741 gt_cv_c_wchar_t=yes
19742else
19743 gt_cv_c_wchar_t=no
19744fi
19745rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1ebc9c87 19746fi
5476a9a4
GM
19747{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
19748$as_echo "$gt_cv_c_wchar_t" >&6; }
19749 if test $gt_cv_c_wchar_t = yes; then
1ebc9c87 19750
5476a9a4
GM
19751$as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
19752
19753 fi
19754
19755
19756 GNULIB_DPRINTF=0;
19757 GNULIB_FCLOSE=0;
19758 GNULIB_FDOPEN=0;
19759 GNULIB_FFLUSH=0;
19760 GNULIB_FGETC=0;
19761 GNULIB_FGETS=0;
19762 GNULIB_FOPEN=0;
19763 GNULIB_FPRINTF=0;
19764 GNULIB_FPRINTF_POSIX=0;
19765 GNULIB_FPURGE=0;
19766 GNULIB_FPUTC=0;
19767 GNULIB_FPUTS=0;
19768 GNULIB_FREAD=0;
19769 GNULIB_FREOPEN=0;
19770 GNULIB_FSCANF=0;
19771 GNULIB_FSEEK=0;
19772 GNULIB_FSEEKO=0;
19773 GNULIB_FTELL=0;
19774 GNULIB_FTELLO=0;
19775 GNULIB_FWRITE=0;
19776 GNULIB_GETC=0;
19777 GNULIB_GETCHAR=0;
19778 GNULIB_GETDELIM=0;
19779 GNULIB_GETLINE=0;
19780 GNULIB_OBSTACK_PRINTF=0;
19781 GNULIB_OBSTACK_PRINTF_POSIX=0;
19782 GNULIB_PCLOSE=0;
19783 GNULIB_PERROR=0;
19784 GNULIB_POPEN=0;
19785 GNULIB_PRINTF=0;
19786 GNULIB_PRINTF_POSIX=0;
19787 GNULIB_PUTC=0;
19788 GNULIB_PUTCHAR=0;
19789 GNULIB_PUTS=0;
19790 GNULIB_REMOVE=0;
19791 GNULIB_RENAME=0;
19792 GNULIB_RENAMEAT=0;
19793 GNULIB_SCANF=0;
19794 GNULIB_SNPRINTF=0;
19795 GNULIB_SPRINTF_POSIX=0;
19796 GNULIB_STDIO_H_NONBLOCKING=0;
19797 GNULIB_STDIO_H_SIGPIPE=0;
19798 GNULIB_TMPFILE=0;
19799 GNULIB_VASPRINTF=0;
19800 GNULIB_VFSCANF=0;
19801 GNULIB_VSCANF=0;
19802 GNULIB_VDPRINTF=0;
19803 GNULIB_VFPRINTF=0;
19804 GNULIB_VFPRINTF_POSIX=0;
19805 GNULIB_VPRINTF=0;
19806 GNULIB_VPRINTF_POSIX=0;
19807 GNULIB_VSNPRINTF=0;
19808 GNULIB_VSPRINTF_POSIX=0;
19809 HAVE_DECL_FPURGE=1;
19810 HAVE_DECL_FSEEKO=1;
19811 HAVE_DECL_FTELLO=1;
19812 HAVE_DECL_GETDELIM=1;
19813 HAVE_DECL_GETLINE=1;
19814 HAVE_DECL_OBSTACK_PRINTF=1;
19815 HAVE_DECL_SNPRINTF=1;
19816 HAVE_DECL_VSNPRINTF=1;
19817 HAVE_DPRINTF=1;
19818 HAVE_FSEEKO=1;
19819 HAVE_FTELLO=1;
19820 HAVE_PCLOSE=1;
19821 HAVE_POPEN=1;
19822 HAVE_RENAMEAT=1;
19823 HAVE_VASPRINTF=1;
19824 HAVE_VDPRINTF=1;
19825 REPLACE_DPRINTF=0;
19826 REPLACE_FCLOSE=0;
19827 REPLACE_FDOPEN=0;
19828 REPLACE_FFLUSH=0;
19829 REPLACE_FOPEN=0;
19830 REPLACE_FPRINTF=0;
19831 REPLACE_FPURGE=0;
19832 REPLACE_FREOPEN=0;
19833 REPLACE_FSEEK=0;
19834 REPLACE_FSEEKO=0;
19835 REPLACE_FTELL=0;
19836 REPLACE_FTELLO=0;
19837 REPLACE_GETDELIM=0;
19838 REPLACE_GETLINE=0;
19839 REPLACE_OBSTACK_PRINTF=0;
19840 REPLACE_PERROR=0;
19841 REPLACE_POPEN=0;
19842 REPLACE_PRINTF=0;
19843 REPLACE_REMOVE=0;
19844 REPLACE_RENAME=0;
19845 REPLACE_RENAMEAT=0;
19846 REPLACE_SNPRINTF=0;
19847 REPLACE_SPRINTF=0;
19848 REPLACE_STDIO_READ_FUNCS=0;
19849 REPLACE_STDIO_WRITE_FUNCS=0;
19850 REPLACE_TMPFILE=0;
19851 REPLACE_VASPRINTF=0;
19852 REPLACE_VDPRINTF=0;
19853 REPLACE_VFPRINTF=0;
19854 REPLACE_VPRINTF=0;
19855 REPLACE_VSNPRINTF=0;
19856 REPLACE_VSPRINTF=0;
1ebc9c87 19857
5476a9a4
GM
19858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
19859$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
19860if test "${ac_cv_struct_tm+set}" = set; then :
1ebc9c87
GM
19861 $as_echo_n "(cached) " >&6
19862else
5476a9a4 19863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1ebc9c87 19864/* end confdefs.h. */
5476a9a4
GM
19865#include <sys/types.h>
19866#include <time.h>
1ebc9c87
GM
19867
19868int
19869main ()
19870{
5476a9a4
GM
19871struct tm tm;
19872 int *p = &tm.tm_sec;
19873 return !p;
1ebc9c87
GM
19874 ;
19875 return 0;
19876}
19877_ACEOF
5476a9a4
GM
19878if ac_fn_c_try_compile "$LINENO"; then :
19879 ac_cv_struct_tm=time.h
1ebc9c87 19880else
5476a9a4 19881 ac_cv_struct_tm=sys/time.h
1ebc9c87 19882fi
5476a9a4 19883rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1ebc9c87 19884fi
5476a9a4
GM
19885{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
19886$as_echo "$ac_cv_struct_tm" >&6; }
19887if test $ac_cv_struct_tm = sys/time.h; then
1ebc9c87 19888
5476a9a4 19889$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
1ebc9c87 19890
1ebc9c87
GM
19891fi
19892
5476a9a4
GM
19893ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
19894#include <$ac_cv_struct_tm>
1fd182f0 19895
5476a9a4
GM
19896"
19897if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
1fd182f0 19898
5476a9a4
GM
19899cat >>confdefs.h <<_ACEOF
19900#define HAVE_STRUCT_TM_TM_ZONE 1
f199cab1 19901_ACEOF
5476a9a4
GM
19902
19903
1f5d53eb 19904fi
1fd182f0 19905
5476a9a4 19906if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
1f5d53eb 19907
5476a9a4 19908$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
1fd182f0 19909
5476a9a4
GM
19910else
19911 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
19912"
19913if test "x$ac_cv_have_decl_tzname" = x""yes; then :
19914 ac_have_decl=1
19915else
19916 ac_have_decl=0
19917fi
1fd182f0 19918
5476a9a4
GM
19919cat >>confdefs.h <<_ACEOF
19920#define HAVE_DECL_TZNAME $ac_have_decl
19921_ACEOF
f199cab1 19922
5476a9a4
GM
19923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
19924$as_echo_n "checking for tzname... " >&6; }
19925if test "${ac_cv_var_tzname+set}" = set; then :
f199cab1 19926 $as_echo_n "(cached) " >&6
3e0be4ab 19927else
5476a9a4 19928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 19929/* end confdefs.h. */
5476a9a4
GM
19930#include <time.h>
19931#if !HAVE_DECL_TZNAME
19932extern char *tzname[];
f199cab1 19933#endif
5476a9a4 19934
f199cab1
GM
19935int
19936main ()
19937{
5476a9a4 19938return tzname[0][0];
f199cab1
GM
19939 ;
19940 return 0;
19941}
3e0be4ab 19942_ACEOF
f199cab1 19943if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 19944 ac_cv_var_tzname=yes
3e0be4ab 19945else
5476a9a4 19946 ac_cv_var_tzname=no
f199cab1
GM
19947fi
19948rm -f core conftest.err conftest.$ac_objext \
19949 conftest$ac_exeext conftest.$ac_ext
f199cab1 19950fi
5476a9a4
GM
19951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
19952$as_echo "$ac_cv_var_tzname" >&6; }
19953 if test $ac_cv_var_tzname = yes; then
19954
19955$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
f199cab1 19956
5476a9a4 19957 fi
3e0be4ab 19958fi
cc322c06 19959
5476a9a4
GM
19960
19961 ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include <time.h>
19962"
19963if test "x$ac_cv_member_struct_tm_tm_gmtoff" = x""yes; then :
19964
19965$as_echo "#define HAVE_TM_GMTOFF 1" >>confdefs.h
cc322c06 19966
f199cab1 19967fi
cc322c06 19968
1f5d53eb 19969
e275c824 19970
5476a9a4
GM
19971
19972ac_fn_c_check_decl "$LINENO" "strtoimax" "ac_cv_have_decl_strtoimax" "$ac_includes_default"
19973if test "x$ac_cv_have_decl_strtoimax" = x""yes; then :
19974 ac_have_decl=1
3e0be4ab 19975else
5476a9a4 19976 ac_have_decl=0
3e0be4ab 19977fi
5476a9a4
GM
19978
19979cat >>confdefs.h <<_ACEOF
19980#define HAVE_DECL_STRTOIMAX $ac_have_decl
f199cab1 19981_ACEOF
e275c824
PE
19982
19983
5476a9a4
GM
19984
19985ac_fn_c_check_decl "$LINENO" "strtoumax" "ac_cv_have_decl_strtoumax" "$ac_includes_default"
19986if test "x$ac_cv_have_decl_strtoumax" = x""yes; then :
19987 ac_have_decl=1
19988else
19989 ac_have_decl=0
3e0be4ab 19990fi
e275c824 19991
5476a9a4
GM
19992cat >>confdefs.h <<_ACEOF
19993#define HAVE_DECL_STRTOUMAX $ac_have_decl
19994_ACEOF
e275c824
PE
19995
19996
2b1928b8 19997
5476a9a4
GM
19998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
19999$as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
20000if test "${ac_cv_header_stat_broken+set}" = set; then :
f199cab1 20001 $as_echo_n "(cached) " >&6
2b1928b8 20002else
5476a9a4
GM
20003 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20004/* end confdefs.h. */
20005#include <sys/types.h>
20006#include <sys/stat.h>
2b1928b8 20007
5476a9a4
GM
20008#if defined S_ISBLK && defined S_IFDIR
20009extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
20010#endif
2b1928b8 20011
5476a9a4
GM
20012#if defined S_ISBLK && defined S_IFCHR
20013extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
20014#endif
0eb775a3 20015
5476a9a4
GM
20016#if defined S_ISLNK && defined S_IFREG
20017extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
20018#endif
20019
20020#if defined S_ISSOCK && defined S_IFREG
20021extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
20022#endif
0eb775a3 20023
5476a9a4
GM
20024_ACEOF
20025if ac_fn_c_try_compile "$LINENO"; then :
20026 ac_cv_header_stat_broken=no
f199cab1 20027else
5476a9a4 20028 ac_cv_header_stat_broken=yes
f199cab1 20029fi
5476a9a4 20030rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 20031fi
5476a9a4
GM
20032{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
20033$as_echo "$ac_cv_header_stat_broken" >&6; }
20034if test $ac_cv_header_stat_broken = yes; then
0eb775a3 20035
5476a9a4 20036$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
0eb775a3 20037
5476a9a4 20038fi
0eb775a3
GM
20039
20040
20041
5476a9a4
GM
20042
20043
20044 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
20045$as_echo_n "checking for struct timespec in <time.h>... " >&6; }
20046if test "${gl_cv_sys_struct_timespec_in_time_h+set}" = set; then :
20047 $as_echo_n "(cached) " >&6
20048else
20049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3e0be4ab 20050/* end confdefs.h. */
5476a9a4 20051#include <time.h>
52724a05 20052
3e0be4ab
GM
20053int
20054main ()
20055{
5476a9a4 20056static struct timespec x; x.tv_sec = x.tv_nsec;
3e0be4ab
GM
20057 ;
20058 return 0;
20059}
20060_ACEOF
5476a9a4
GM
20061if ac_fn_c_try_compile "$LINENO"; then :
20062 gl_cv_sys_struct_timespec_in_time_h=yes
3e0be4ab 20063else
5476a9a4 20064 gl_cv_sys_struct_timespec_in_time_h=no
3e0be4ab 20065fi
5476a9a4
GM
20066rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20067fi
20068{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
20069$as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
52724a05 20070
5476a9a4
GM
20071 TIME_H_DEFINES_STRUCT_TIMESPEC=0
20072 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
20073 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
20074 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
20075 TIME_H_DEFINES_STRUCT_TIMESPEC=1
20076 else
20077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
20078$as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
20079if test "${gl_cv_sys_struct_timespec_in_sys_time_h+set}" = set; then :
20080 $as_echo_n "(cached) " >&6
20081else
3e0be4ab
GM
20082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20083/* end confdefs.h. */
5476a9a4
GM
20084#include <sys/time.h>
20085
3e0be4ab
GM
20086int
20087main ()
20088{
5476a9a4 20089static struct timespec x; x.tv_sec = x.tv_nsec;
3e0be4ab
GM
20090 ;
20091 return 0;
20092}
20093_ACEOF
5476a9a4
GM
20094if ac_fn_c_try_compile "$LINENO"; then :
20095 gl_cv_sys_struct_timespec_in_sys_time_h=yes
3e0be4ab 20096else
5476a9a4 20097 gl_cv_sys_struct_timespec_in_sys_time_h=no
3e0be4ab 20098fi
5476a9a4 20099rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 20100fi
5476a9a4
GM
20101{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
20102$as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
20103 if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
20104 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
20105 else
20106 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
20107$as_echo_n "checking for struct timespec in <pthread.h>... " >&6; }
20108if test "${gl_cv_sys_struct_timespec_in_pthread_h+set}" = set; then :
3e0be4ab
GM
20109 $as_echo_n "(cached) " >&6
20110else
20111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20112/* end confdefs.h. */
5476a9a4
GM
20113#include <pthread.h>
20114
3e0be4ab
GM
20115int
20116main ()
20117{
5476a9a4 20118static struct timespec x; x.tv_sec = x.tv_nsec;
3e0be4ab
GM
20119 ;
20120 return 0;
20121}
20122_ACEOF
5476a9a4
GM
20123if ac_fn_c_try_compile "$LINENO"; then :
20124 gl_cv_sys_struct_timespec_in_pthread_h=yes
3e0be4ab 20125else
5476a9a4 20126 gl_cv_sys_struct_timespec_in_pthread_h=no
3e0be4ab 20127fi
5476a9a4 20128rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3e0be4ab 20129fi
5476a9a4
GM
20130{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
20131$as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
20132 if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
20133 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
20134 fi
20135 fi
f199cab1 20136 fi
e275c824
PE
20137
20138
b0415a03 20139
b0415a03 20140
e275c824 20141
e275c824
PE
20142
20143
f199cab1 20144
e275c824
PE
20145
20146
20147
20148
20149
20150
20151
5476a9a4
GM
20152 if test $gl_cv_have_include_next = yes; then
20153 gl_cv_next_time_h='<'time.h'>'
20154 else
20155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
20156$as_echo_n "checking absolute name of <time.h>... " >&6; }
20157if test "${gl_cv_next_time_h+set}" = set; then :
20158 $as_echo_n "(cached) " >&6
20159else
e275c824 20160
5476a9a4
GM
20161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20162/* end confdefs.h. */
20163#include <time.h>
e275c824 20164
5476a9a4
GM
20165_ACEOF
20166 case "$host_os" in
20167 aix*) gl_absname_cpp="$ac_cpp -C" ;;
20168 *) gl_absname_cpp="$ac_cpp" ;;
20169 esac
e275c824 20170
5476a9a4
GM
20171 case "$host_os" in
20172 mingw*)
20173 gl_dirsep_regex='[/\\]'
20174 ;;
20175 *)
20176 gl_dirsep_regex='\/'
20177 ;;
20178 esac
20179 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
e275c824 20180
5476a9a4
GM
20181 gl_header_literal_regex=`echo 'time.h' \
20182 | sed -e "$gl_make_literal_regex_sed"`
20183 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20184 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20185 s|^/[^/]|//&|
20186 p
20187 q
20188 }'
20189 gl_cv_next_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20190 sed -n "$gl_absolute_header_sed"`'"'
e275c824
PE
20191
20192
5476a9a4
GM
20193fi
20194{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
20195$as_echo "$gl_cv_next_time_h" >&6; }
20196 fi
20197 NEXT_TIME_H=$gl_cv_next_time_h
67342916 20198
5476a9a4
GM
20199 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20200 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20201 gl_next_as_first_directive='<'time.h'>'
f199cab1 20202 else
5476a9a4
GM
20203 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20204 gl_next_as_first_directive=$gl_cv_next_time_h
f199cab1 20205 fi
5476a9a4 20206 NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
4fda9c95
GM
20207
20208
52724a05
GM
20209
20210
20211
20212
20213
20214
20215
ae0d7250
PE
20216
20217
20218
cc322c06 20219
f199cab1 20220
b5591ebb
GM
20221ac_fn_c_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default"
20222if test "x$ac_cv_have_decl_unsetenv" = x""yes; then :
20223 ac_have_decl=1
20224else
20225 ac_have_decl=0
20226fi
20227
20228cat >>confdefs.h <<_ACEOF
20229#define HAVE_DECL_UNSETENV $ac_have_decl
20230_ACEOF
20231
cc322c06 20232
5476a9a4
GM
20233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the utimes function works" >&5
20234$as_echo_n "checking whether the utimes function works... " >&6; }
20235if test "${gl_cv_func_working_utimes+set}" = set; then :
20236 $as_echo_n "(cached) " >&6
20237else
1fd182f0 20238
5476a9a4
GM
20239 if test "$cross_compiling" = yes; then :
20240 gl_cv_func_working_utimes=no
20241else
20242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20243/* end confdefs.h. */
20244
20245#include <sys/types.h>
20246#include <sys/stat.h>
20247#include <fcntl.h>
20248#include <sys/time.h>
20249#include <time.h>
20250#include <unistd.h>
20251#include <stdlib.h>
20252#include <stdio.h>
20253#include <utime.h>
1fd182f0 20254
5476a9a4
GM
20255static int
20256inorder (time_t a, time_t b, time_t c)
20257{
20258 return a <= b && b <= c;
20259}
1fd182f0 20260
5476a9a4
GM
20261int
20262main ()
20263{
20264 int result = 0;
20265 char const *file = "conftest.utimes";
20266 static struct timeval timeval[2] = {{9, 10}, {999999, 999999}};
1fd182f0 20267
5476a9a4
GM
20268 /* Test whether utimes() essentially works. */
20269 {
20270 struct stat sbuf;
20271 FILE *f = fopen (file, "w");
20272 if (f == NULL)
20273 result |= 1;
20274 else if (fclose (f) != 0)
20275 result |= 1;
20276 else if (utimes (file, timeval) != 0)
20277 result |= 2;
20278 else if (lstat (file, &sbuf) != 0)
20279 result |= 1;
20280 else if (!(sbuf.st_atime == timeval[0].tv_sec
20281 && sbuf.st_mtime == timeval[1].tv_sec))
20282 result |= 4;
20283 if (unlink (file) != 0)
20284 result |= 1;
20285 }
1fd182f0 20286
5476a9a4
GM
20287 /* Test whether utimes() with a NULL argument sets the file's timestamp
20288 to the current time. Use 'fstat' as well as 'time' to
20289 determine the "current" time, to accommodate NFS file systems
20290 if there is a time skew between the host and the NFS server. */
20291 {
20292 int fd = open (file, O_WRONLY|O_CREAT, 0644);
20293 if (fd < 0)
20294 result |= 1;
20295 else
20296 {
20297 time_t t0, t2;
20298 struct stat st0, st1, st2;
20299 if (time (&t0) == (time_t) -1)
20300 result |= 1;
20301 else if (fstat (fd, &st0) != 0)
20302 result |= 1;
20303 else if (utimes (file, timeval) != 0)
20304 result |= 2;
20305 else if (utimes (file, NULL) != 0)
20306 result |= 8;
20307 else if (fstat (fd, &st1) != 0)
20308 result |= 1;
20309 else if (write (fd, "\n", 1) != 1)
20310 result |= 1;
20311 else if (fstat (fd, &st2) != 0)
20312 result |= 1;
20313 else if (time (&t2) == (time_t) -1)
20314 result |= 1;
20315 else
20316 {
20317 int m_ok_POSIX = inorder (t0, st1.st_mtime, t2);
20318 int m_ok_NFS = inorder (st0.st_mtime, st1.st_mtime, st2.st_mtime);
20319 if (! (st1.st_atime == st1.st_mtime))
20320 result |= 16;
20321 if (! (m_ok_POSIX || m_ok_NFS))
20322 result |= 32;
20323 }
20324 if (close (fd) != 0)
20325 result |= 1;
20326 }
20327 if (unlink (file) != 0)
20328 result |= 1;
20329 }
52724a05 20330
5476a9a4
GM
20331 /* Test whether utimes() with a NULL argument works on read-only files. */
20332 {
20333 int fd = open (file, O_WRONLY|O_CREAT, 0444);
20334 if (fd < 0)
20335 result |= 1;
20336 else if (close (fd) != 0)
20337 result |= 1;
20338 else if (utimes (file, NULL) != 0)
20339 result |= 64;
20340 if (unlink (file) != 0)
20341 result |= 1;
20342 }
1fd182f0 20343
5476a9a4
GM
20344 return result;
20345}
1fd182f0 20346
5476a9a4
GM
20347_ACEOF
20348if ac_fn_c_try_run "$LINENO"; then :
20349 gl_cv_func_working_utimes=yes
20350else
20351 gl_cv_func_working_utimes=no
20352fi
20353rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20354 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1 20355fi
1fd182f0 20356
5476a9a4
GM
20357fi
20358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_utimes" >&5
20359$as_echo "$gl_cv_func_working_utimes" >&6; }
1fd182f0 20360
5476a9a4 20361 if test $gl_cv_func_working_utimes = yes; then
1fd182f0 20362
5476a9a4 20363$as_echo "#define HAVE_WORKING_UTIMES 1" >>confdefs.h
1fd182f0 20364
5476a9a4 20365 fi
1fd182f0 20366
1fd182f0 20367
1fd182f0 20368
1fd182f0 20369
1fd182f0 20370
5476a9a4
GM
20371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct utimbuf" >&5
20372$as_echo_n "checking for struct utimbuf... " >&6; }
20373if test "${gl_cv_sys_struct_utimbuf+set}" = set; then :
20374 $as_echo_n "(cached) " >&6
20375else
20376 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20377/* end confdefs.h. */
20378#if HAVE_SYS_TIME_H
20379 #include <sys/time.h>
20380 #endif
20381 #include <time.h>
20382 #ifdef HAVE_UTIME_H
20383 #include <utime.h>
20384 #endif
1fd182f0 20385
5476a9a4
GM
20386int
20387main ()
20388{
20389static struct utimbuf x; x.actime = x.modtime;
20390 ;
20391 return 0;
20392}
20393_ACEOF
20394if ac_fn_c_try_compile "$LINENO"; then :
20395 gl_cv_sys_struct_utimbuf=yes
20396else
20397 gl_cv_sys_struct_utimbuf=no
f199cab1 20398fi
5476a9a4 20399rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 20400fi
5476a9a4
GM
20401{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_utimbuf" >&5
20402$as_echo "$gl_cv_sys_struct_utimbuf" >&6; }
1fd182f0 20403
5476a9a4 20404 if test $gl_cv_sys_struct_utimbuf = yes; then
1fd182f0 20405
5476a9a4 20406$as_echo "#define HAVE_STRUCT_UTIMBUF 1" >>confdefs.h
1fd182f0 20407
5476a9a4 20408 fi
1fd182f0 20409
1fd182f0 20410
1fd182f0 20411
1fd182f0 20412
1fd182f0 20413
1fd182f0 20414
1fd182f0 20415
3e0be4ab 20416
f199cab1 20417
f199cab1 20418
067d23c9 20419
710f5812
GM
20420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking type of array argument to getgroups" >&5
20421$as_echo_n "checking type of array argument to getgroups... " >&6; }
20422if test "${ac_cv_type_getgroups+set}" = set; then :
20423 $as_echo_n "(cached) " >&6
20424else
20425 if test "$cross_compiling" = yes; then :
20426 ac_cv_type_getgroups=cross
20427else
20428 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20429/* end confdefs.h. */
20430/* Thanks to Mike Rendell for this test. */
20431$ac_includes_default
20432#define NGID 256
20433#undef MAX
20434#define MAX(x, y) ((x) > (y) ? (x) : (y))
20435
20436int
20437main ()
20438{
20439 gid_t gidset[NGID];
20440 int i, n;
20441 union { gid_t gval; long int lval; } val;
20442
20443 val.lval = -1;
20444 for (i = 0; i < NGID; i++)
20445 gidset[i] = val.gval;
20446 n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
20447 gidset);
20448 /* Exit non-zero if getgroups seems to require an array of ints. This
20449 happens when gid_t is short int but getgroups modifies an array
20450 of ints. */
20451 return n > 0 && gidset[n] != val.gval;
20452}
20453_ACEOF
20454if ac_fn_c_try_run "$LINENO"; then :
20455 ac_cv_type_getgroups=gid_t
20456else
20457 ac_cv_type_getgroups=int
20458fi
20459rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20460 conftest.$ac_objext conftest.beam conftest.$ac_ext
20461fi
20462
20463if test $ac_cv_type_getgroups = cross; then
20464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20465/* end confdefs.h. */
20466#include <unistd.h>
20467
20468_ACEOF
20469if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20470 $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then :
20471 ac_cv_type_getgroups=gid_t
20472else
20473 ac_cv_type_getgroups=int
20474fi
20475rm -f conftest*
20476
20477fi
20478fi
20479{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_getgroups" >&5
20480$as_echo "$ac_cv_type_getgroups" >&6; }
20481
20482cat >>confdefs.h <<_ACEOF
20483#define GETGROUPS_T $ac_cv_type_getgroups
20484_ACEOF
20485
20486
20487
067d23c9 20488
5476a9a4
GM
20489 if false; then
20490 GL_COND_LIBTOOL_TRUE=
20491 GL_COND_LIBTOOL_FALSE='#'
20492else
20493 GL_COND_LIBTOOL_TRUE='#'
20494 GL_COND_LIBTOOL_FALSE=
1fd182f0 20495fi
067d23c9 20496
5476a9a4
GM
20497 gl_cond_libtool=false
20498 gl_libdeps=
20499 gl_ltlibdeps=
20500 gl_m4_base='m4'
067d23c9 20501
f199cab1 20502
f199cab1 20503
f199cab1 20504
067d23c9 20505
f199cab1 20506
f199cab1 20507
f199cab1 20508
067d23c9 20509
5476a9a4 20510 gl_source_base='lib'
cc322c06
GM
20511
20512
5476a9a4
GM
20513 if test $ac_cv_func_alloca_works = no; then
20514 :
f199cab1 20515 fi
cc322c06 20516
5476a9a4
GM
20517 # Define an additional variable used in the Makefile substitution.
20518 if test $ac_cv_working_alloca_h = yes; then
20519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
20520$as_echo_n "checking for alloca as a compiler built-in... " >&6; }
20521if test "${gl_cv_rpl_alloca+set}" = set; then :
20522 $as_echo_n "(cached) " >&6
20523else
cc322c06 20524
5476a9a4
GM
20525 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20526/* end confdefs.h. */
067d23c9 20527
5476a9a4
GM
20528#if defined __GNUC__ || defined _AIX || defined _MSC_VER
20529 Need own alloca
20530#endif
067d23c9 20531
f199cab1 20532_ACEOF
5476a9a4
GM
20533if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20534 $EGREP "Need own alloca" >/dev/null 2>&1; then :
20535 gl_cv_rpl_alloca=yes
20536else
20537 gl_cv_rpl_alloca=no
369e19fc 20538fi
5476a9a4 20539rm -f conftest*
067d23c9 20540
ae0d7250 20541
5476a9a4
GM
20542fi
20543{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
20544$as_echo "$gl_cv_rpl_alloca" >&6; }
20545 if test $gl_cv_rpl_alloca = yes; then
52724a05 20546
5476a9a4 20547$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
ae0d7250 20548
5476a9a4
GM
20549 ALLOCA_H=alloca.h
20550 else
20551 ALLOCA_H=
20552 fi
f199cab1 20553 else
5476a9a4
GM
20554 ALLOCA_H=alloca.h
20555 fi
ae0d7250 20556
5476a9a4
GM
20557 if test -n "$ALLOCA_H"; then
20558 GL_GENERATE_ALLOCA_H_TRUE=
20559 GL_GENERATE_ALLOCA_H_FALSE='#'
20560else
20561 GL_GENERATE_ALLOCA_H_TRUE='#'
20562 GL_GENERATE_ALLOCA_H_FALSE=
20563fi
f199cab1 20564
ae0d7250
PE
20565
20566
20567
20568
20569
5476a9a4
GM
20570 # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
20571 # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
ae0d7250 20572
5476a9a4
GM
20573 # Save and restore LIBS so e.g., -lrt, isn't added to it. Otherwise, *all*
20574 # programs in the package would end up linked with that potentially-shared
20575 # library, inducing unnecessary run-time overhead.
20576 LIB_CLOCK_GETTIME=
ae0d7250 20577
5476a9a4
GM
20578 gl_saved_libs=$LIBS
20579 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
20580$as_echo_n "checking for library containing clock_gettime... " >&6; }
20581if test "${ac_cv_search_clock_gettime+set}" = set; then :
20582 $as_echo_n "(cached) " >&6
20583else
20584 ac_func_search_save_LIBS=$LIBS
20585cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20586/* end confdefs.h. */
20587
20588/* Override any GCC internal prototype to avoid an error.
20589 Use char because int might match the return type of a GCC
20590 builtin and then its argument prototype would still apply. */
20591#ifdef __cplusplus
20592extern "C"
20593#endif
20594char clock_gettime ();
20595int
20596main ()
20597{
20598return clock_gettime ();
20599 ;
20600 return 0;
20601}
20602_ACEOF
20603for ac_lib in '' rt posix4; do
20604 if test -z "$ac_lib"; then
20605 ac_res="none required"
20606 else
20607 ac_res=-l$ac_lib
20608 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
20609 fi
20610 if ac_fn_c_try_link "$LINENO"; then :
20611 ac_cv_search_clock_gettime=$ac_res
f199cab1 20612fi
5476a9a4
GM
20613rm -f core conftest.err conftest.$ac_objext \
20614 conftest$ac_exeext
20615 if test "${ac_cv_search_clock_gettime+set}" = set; then :
20616 break
20617fi
20618done
20619if test "${ac_cv_search_clock_gettime+set}" = set; then :
ae0d7250 20620
5476a9a4
GM
20621else
20622 ac_cv_search_clock_gettime=no
20623fi
20624rm conftest.$ac_ext
20625LIBS=$ac_func_search_save_LIBS
20626fi
20627{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
20628$as_echo "$ac_cv_search_clock_gettime" >&6; }
20629ac_res=$ac_cv_search_clock_gettime
20630if test "$ac_res" != no; then :
20631 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20632 test "$ac_cv_search_clock_gettime" = "none required" ||
20633 LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime
20634fi
ae0d7250 20635
5476a9a4
GM
20636 for ac_func in clock_gettime clock_settime
20637do :
20638 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
20639ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
20640eval as_val=\$$as_ac_var
20641 if test "x$as_val" = x""yes; then :
20642 cat >>confdefs.h <<_ACEOF
20643#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
20644_ACEOF
ae0d7250 20645
d7ad186c
GM
20646fi
20647done
20648
20649 LIBS=$gl_saved_libs
20650
20651
20652 :
20653
20654
20655
20656cat >>confdefs.h <<_ACEOF
20657#define GNULIB_CLOSE_STREAM 1
20658_ACEOF
20659
20660
20661
20662
20663 :
20664
20665
20666
20667 :
20668
20669
20670
20671
20672
20673
20674
20675
20676
20677
20678
20679
20680
20681
20682
20683
20684
ae0d7250 20685
3e0be4ab 20686
d7ad186c
GM
20687 if test $gl_cv_have_include_next = yes; then
20688 gl_cv_next_dirent_h='<'dirent.h'>'
20689 else
20690 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5
20691$as_echo_n "checking absolute name of <dirent.h>... " >&6; }
20692if test "${gl_cv_next_dirent_h+set}" = set; then :
20693 $as_echo_n "(cached) " >&6
20694else
3e0be4ab 20695
d7ad186c 20696 if test $ac_cv_header_dirent_h = yes; then
3bf26e96
GM
20697
20698
d7ad186c
GM
20699 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20700/* end confdefs.h. */
20701#include <dirent.h>
3bf26e96 20702
3bf26e96 20703_ACEOF
d7ad186c
GM
20704 case "$host_os" in
20705 aix*) gl_absname_cpp="$ac_cpp -C" ;;
20706 *) gl_absname_cpp="$ac_cpp" ;;
20707 esac
3bf26e96 20708
d7ad186c
GM
20709 case "$host_os" in
20710 mingw*)
20711 gl_dirsep_regex='[/\\]'
20712 ;;
20713 *)
20714 gl_dirsep_regex='\/'
20715 ;;
20716 esac
20717 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
3bf26e96 20718
d7ad186c
GM
20719 gl_header_literal_regex=`echo 'dirent.h' \
20720 | sed -e "$gl_make_literal_regex_sed"`
20721 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20722 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20723 s|^/[^/]|//&|
20724 p
20725 q
20726 }'
20727 gl_cv_next_dirent_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20728 sed -n "$gl_absolute_header_sed"`'"'
20729 else
20730 gl_cv_next_dirent_h='<'dirent.h'>'
20731 fi
3bf26e96 20732
3e0be4ab 20733
d7ad186c
GM
20734fi
20735{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5
20736$as_echo "$gl_cv_next_dirent_h" >&6; }
20737 fi
20738 NEXT_DIRENT_H=$gl_cv_next_dirent_h
f199cab1 20739
d7ad186c
GM
20740 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20741 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20742 gl_next_as_first_directive='<'dirent.h'>'
20743 else
20744 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20745 gl_next_as_first_directive=$gl_cv_next_dirent_h
20746 fi
20747 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive
f199cab1 20748
3e0be4ab 20749
f199cab1 20750
f199cab1 20751
d7ad186c
GM
20752 if test $ac_cv_header_dirent_h = yes; then
20753 HAVE_DIRENT_H=1
20754 else
20755 HAVE_DIRENT_H=0
20756 fi
3e0be4ab 20757
f199cab1
GM
20758
20759
20760
5476a9a4
GM
20761
20762
20763
20764
20765
20766
5476a9a4
GM
20767$as_echo "#define HAVE_DUP2 1" >>confdefs.h
20768
20769
20770 if test $HAVE_DUP2 = 1; then
20771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
20772$as_echo_n "checking whether dup2 works... " >&6; }
20773if test "${gl_cv_func_dup2_works+set}" = set; then :
3e0be4ab
GM
20774 $as_echo_n "(cached) " >&6
20775else
5476a9a4
GM
20776 if test "$cross_compiling" = yes; then :
20777 case "$host_os" in
20778 mingw*) # on this platform, dup2 always returns 0 for success
20779 gl_cv_func_dup2_works="guessing no" ;;
20780 cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
20781 gl_cv_func_dup2_works="guessing no" ;;
20782 linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a
20783 # closed fd may yield -EBADF instead of -1 / errno=EBADF.
20784 gl_cv_func_dup2_works="guessing no" ;;
20785 freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF.
20786 gl_cv_func_dup2_works="guessing no" ;;
20787 haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
20788 gl_cv_func_dup2_works="guessing no" ;;
20789 *) gl_cv_func_dup2_works="guessing yes" ;;
20790 esac
20791else
20792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3e0be4ab 20793/* end confdefs.h. */
ae0d7250 20794
5476a9a4
GM
20795 #include <unistd.h>
20796#include <fcntl.h>
20797#include <errno.h>
3e0be4ab
GM
20798int
20799main ()
20800{
5476a9a4
GM
20801int result = 0;
20802#ifdef FD_CLOEXEC
20803 if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
20804 result |= 1;
20805#endif
20806 if (dup2 (1, 1) == 0)
20807 result |= 2;
20808#ifdef FD_CLOEXEC
20809 if (fcntl (1, F_GETFD) != FD_CLOEXEC)
20810 result |= 4;
20811#endif
20812 close (0);
20813 if (dup2 (0, 0) != -1)
20814 result |= 8;
20815 /* Many gnulib modules require POSIX conformance of EBADF. */
20816 if (dup2 (2, 1000000) == -1 && errno != EBADF)
20817 result |= 16;
0d1f53ad
GM
20818 /* Flush out a cygwin core dump. */
20819 if (dup2 (2, -1) != -1 || errno != EBADF)
20820 result |= 32;
5476a9a4
GM
20821 return result;
20822
ae0d7250
PE
20823 ;
20824 return 0;
20825}
5476a9a4 20826
ae0d7250 20827_ACEOF
5476a9a4
GM
20828if ac_fn_c_try_run "$LINENO"; then :
20829 gl_cv_func_dup2_works=yes
ae0d7250 20830else
5476a9a4 20831 gl_cv_func_dup2_works=no
ae0d7250 20832fi
5476a9a4
GM
20833rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20834 conftest.$ac_objext conftest.beam conftest.$ac_ext
ae0d7250 20835fi
5476a9a4
GM
20836
20837
3e0be4ab 20838fi
5476a9a4
GM
20839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
20840$as_echo "$gl_cv_func_dup2_works" >&6; }
20841 case "$gl_cv_func_dup2_works" in
20842 *yes) ;;
20843 *)
20844 REPLACE_DUP2=1
20845 ;;
20846 esac
20847 fi
3e0be4ab 20848
3e0be4ab 20849
a6342fc8 20850 if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
f199cab1 20851
f199cab1
GM
20852
20853
f199cab1 20854
f199cab1 20855
f199cab1 20856
f199cab1 20857
f199cab1 20858
5476a9a4 20859 gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
f199cab1
GM
20860
20861
a6342fc8 20862 fi
f199cab1 20863
f199cab1 20864
f199cab1 20865
f199cab1 20866
f199cab1 20867
5476a9a4 20868 GNULIB_DUP2=1
f199cab1
GM
20869
20870
f199cab1 20871
f199cab1 20872
3e0be4ab 20873
3e0be4ab 20874
f199cab1
GM
20875
20876
ae0d7250 20877
ae0d7250 20878
5476a9a4 20879
93131e11
GM
20880 GNULIB_ENVIRON=1
20881
20882
20883
20884
20885
20886
20887
20888
8966cbff
GM
20889 LIB_EXECINFO=''
20890 EXECINFO_H='execinfo.h'
20891
20892 if test $ac_cv_header_execinfo_h = yes; then
20893 gl_saved_libs=$LIBS
20894 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing backtrace_symbols_fd" >&5
20895$as_echo_n "checking for library containing backtrace_symbols_fd... " >&6; }
20896if test "${ac_cv_search_backtrace_symbols_fd+set}" = set; then :
20897 $as_echo_n "(cached) " >&6
20898else
20899 ac_func_search_save_LIBS=$LIBS
20900cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20901/* end confdefs.h. */
20902
20903/* Override any GCC internal prototype to avoid an error.
20904 Use char because int might match the return type of a GCC
20905 builtin and then its argument prototype would still apply. */
20906#ifdef __cplusplus
20907extern "C"
20908#endif
20909char backtrace_symbols_fd ();
20910int
20911main ()
20912{
20913return backtrace_symbols_fd ();
20914 ;
20915 return 0;
20916}
20917_ACEOF
20918for ac_lib in '' execinfo; do
20919 if test -z "$ac_lib"; then
20920 ac_res="none required"
20921 else
20922 ac_res=-l$ac_lib
20923 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
20924 fi
20925 if ac_fn_c_try_link "$LINENO"; then :
20926 ac_cv_search_backtrace_symbols_fd=$ac_res
20927fi
20928rm -f core conftest.err conftest.$ac_objext \
20929 conftest$ac_exeext
20930 if test "${ac_cv_search_backtrace_symbols_fd+set}" = set; then :
20931 break
20932fi
20933done
20934if test "${ac_cv_search_backtrace_symbols_fd+set}" = set; then :
20935
20936else
20937 ac_cv_search_backtrace_symbols_fd=no
20938fi
20939rm conftest.$ac_ext
20940LIBS=$ac_func_search_save_LIBS
20941fi
20942{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_backtrace_symbols_fd" >&5
20943$as_echo "$ac_cv_search_backtrace_symbols_fd" >&6; }
20944ac_res=$ac_cv_search_backtrace_symbols_fd
20945if test "$ac_res" != no; then :
20946 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20947 test "$ac_cv_search_backtrace_symbols_fd" = "none required" ||
20948 LIB_EXECINFO=$ac_cv_search_backtrace_symbols_fd
20949fi
20950
20951 LIBS=$gl_saved_libs
20952 test "$ac_cv_search_backtrace_symbols_fd" = no || EXECINFO_H=''
20953 fi
20954
20955 if test -n "$EXECINFO_H"; then
20956
20957
20958
20959
20960
20961
20962
20963
20964 gl_LIBOBJS="$gl_LIBOBJS execinfo.$ac_objext"
20965
20966 fi
20967
20968
20969
20970 if test -n "$EXECINFO_H"; then
20971 GL_GENERATE_EXECINFO_H_TRUE=
20972 GL_GENERATE_EXECINFO_H_FALSE='#'
20973else
20974 GL_GENERATE_EXECINFO_H_TRUE='#'
20975 GL_GENERATE_EXECINFO_H_FALSE=
20976fi
20977
20978
20979
20980
20981
93131e11
GM
20982
20983
20984
7cd2ed2c 20985
710f5812
GM
20986 if test $ac_cv_func_faccessat = no; then
20987 HAVE_FACCESSAT=0
20988 fi
20989
20990 if test $HAVE_FACCESSAT = 0; then
20991
20992
20993
20994
20995
20996
20997
20998
20999 gl_LIBOBJS="$gl_LIBOBJS faccessat.$ac_objext"
21000
21001
21002 for ac_func in access
21003do :
21004 ac_fn_c_check_func "$LINENO" "access" "ac_cv_func_access"
21005if test "x$ac_cv_func_access" = x""yes; then :
21006 cat >>confdefs.h <<_ACEOF
21007#define HAVE_ACCESS 1
21008_ACEOF
21009
21010fi
21011done
21012
21013
21014 fi
21015
21016
21017cat >>confdefs.h <<_ACEOF
21018#define GNULIB_FACCESSAT 1
21019_ACEOF
21020
21021
21022
21023
21024
21025
21026
21027 GNULIB_FACCESSAT=1
21028
21029
21030
21031
21032
21033
21034
21035
21036
21037
21038
21039
21040
21041
21042
21043
21044 if test $gl_cv_have_include_next = yes; then
21045 gl_cv_next_fcntl_h='<'fcntl.h'>'
21046 else
21047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
21048$as_echo_n "checking absolute name of <fcntl.h>... " >&6; }
21049if test "${gl_cv_next_fcntl_h+set}" = set; then :
21050 $as_echo_n "(cached) " >&6
21051else
21052
21053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21054/* end confdefs.h. */
21055#include <fcntl.h>
21056
21057_ACEOF
21058 case "$host_os" in
21059 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21060 *) gl_absname_cpp="$ac_cpp" ;;
21061 esac
21062
21063 case "$host_os" in
21064 mingw*)
21065 gl_dirsep_regex='[/\\]'
21066 ;;
21067 *)
21068 gl_dirsep_regex='\/'
21069 ;;
21070 esac
21071 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21072
21073 gl_header_literal_regex=`echo 'fcntl.h' \
21074 | sed -e "$gl_make_literal_regex_sed"`
21075 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21076 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21077 s|^/[^/]|//&|
21078 p
21079 q
21080 }'
21081 gl_cv_next_fcntl_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21082 sed -n "$gl_absolute_header_sed"`'"'
21083
21084
21085fi
21086{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
21087$as_echo "$gl_cv_next_fcntl_h" >&6; }
21088 fi
21089 NEXT_FCNTL_H=$gl_cv_next_fcntl_h
21090
21091 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21092 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21093 gl_next_as_first_directive='<'fcntl.h'>'
21094 else
21095 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21096 gl_next_as_first_directive=$gl_cv_next_fcntl_h
21097 fi
21098 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
21099
21100
21101
21102
21103
21104
21105
21106
21107
21108
21109
21110
21111
21112
21113
21114
d7ad186c
GM
21115 ac_fn_c_check_decl "$LINENO" "fdopendir" "ac_cv_have_decl_fdopendir" "
21116#include <dirent.h>
21117
21118"
21119if test "x$ac_cv_have_decl_fdopendir" = x""yes; then :
21120 ac_have_decl=1
21121else
21122 ac_have_decl=0
21123fi
21124
21125cat >>confdefs.h <<_ACEOF
21126#define HAVE_DECL_FDOPENDIR $ac_have_decl
21127_ACEOF
21128if test $ac_have_decl = 1; then :
21129
21130else
21131 HAVE_DECL_FDOPENDIR=0
21132fi
21133
21134
21135 if test $ac_cv_func_fdopendir = no; then
21136 HAVE_FDOPENDIR=0
21137 else
21138 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fdopendir works" >&5
21139$as_echo_n "checking whether fdopendir works... " >&6; }
21140if test "${gl_cv_func_fdopendir_works+set}" = set; then :
21141 $as_echo_n "(cached) " >&6
21142else
21143 if test "$cross_compiling" = yes; then :
21144 case "$host_os" in
21145 # Guess yes on glibc systems.
21146 *-gnu*) gl_cv_func_fdopendir_works="guessing yes" ;;
21147 # If we don't know, assume the worst.
21148 *) gl_cv_func_fdopendir_works="guessing no" ;;
21149 esac
21150
21151else
21152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21153/* end confdefs.h. */
21154
21155#include <dirent.h>
21156#include <fcntl.h>
21157#include <unistd.h>
21158#if !HAVE_DECL_FDOPENDIR
21159extern
21160# ifdef __cplusplus
21161"C"
21162# endif
21163DIR *fdopendir (int);
21164#endif
21165
21166int
21167main ()
21168{
21169int result = 0;
21170 int fd = open ("conftest.c", O_RDONLY);
21171 if (fd < 0) result |= 1;
21172 if (fdopendir (fd)) result |= 2;
21173 if (close (fd)) result |= 4;
21174 return result;
21175 ;
21176 return 0;
21177}
21178_ACEOF
21179if ac_fn_c_try_run "$LINENO"; then :
21180 gl_cv_func_fdopendir_works=yes
21181else
21182 gl_cv_func_fdopendir_works=no
21183fi
21184rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21185 conftest.$ac_objext conftest.beam conftest.$ac_ext
21186fi
21187
21188fi
21189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopendir_works" >&5
21190$as_echo "$gl_cv_func_fdopendir_works" >&6; }
21191 case "$gl_cv_func_fdopendir_works" in
21192 *yes) ;;
21193 *)
21194 REPLACE_FDOPENDIR=1
21195 ;;
21196 esac
21197 fi
21198
21199 if test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1; then
21200
21201
21202
21203
21204
21205
21206
21207
21208 gl_LIBOBJS="$gl_LIBOBJS fdopendir.$ac_objext"
21209
21210 fi
21211
21212
21213
21214
21215
21216 GNULIB_FDOPENDIR=1
21217
21218
21219
21220
21221
21222
21223
21224cat >>confdefs.h <<_ACEOF
21225#define GNULIB_FDOPENDIR 1
21226_ACEOF
21227
21228
21229
21230
21231
21232
21233
710f5812 21234
3bf26e96
GM
21235
21236 fp_headers='
21237# include <stdio.h>
21238# if HAVE_STDIO_EXT_H
21239# include <stdio_ext.h>
21240# endif
21241'
21242 ac_fn_c_check_decl "$LINENO" "__fpending" "ac_cv_have_decl___fpending" "$fp_headers
21243"
21244if test "x$ac_cv_have_decl___fpending" = x""yes; then :
21245 ac_have_decl=1
21246else
21247 ac_have_decl=0
21248fi
21249
21250cat >>confdefs.h <<_ACEOF
21251#define HAVE_DECL___FPENDING $ac_have_decl
21252_ACEOF
21253
21254
21255 if test $ac_cv_func___fpending = no; then
21256
21257
21258
21259
21260
21261
21262
21263
21264 gl_LIBOBJS="$gl_LIBOBJS fpending.$ac_objext"
21265
21266
21267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to determine the number of pending output bytes on a stream" >&5
21268$as_echo_n "checking how to determine the number of pending output bytes on a stream... " >&6; }
21269if test "${ac_cv_sys_pending_output_n_bytes+set}" = set; then :
21270 $as_echo_n "(cached) " >&6
21271else
21272
21273 for ac_expr in \
21274 \
21275 '# glibc2' \
21276 'fp->_IO_write_ptr - fp->_IO_write_base' \
21277 \
21278 '# traditional Unix' \
21279 'fp->_ptr - fp->_base' \
21280 \
21281 '# BSD' \
21282 'fp->_p - fp->_bf._base' \
21283 \
21284 '# SCO, Unixware' \
21285 '(fp->__ptr ? fp->__ptr - fp->__base : 0)' \
21286 \
21287 '# QNX' \
21288 '(fp->_Mode & 0x2000 /*_MWRITE*/ ? fp->_Next - fp->_Buf : 0)' \
21289 \
21290 '# old glibc?' \
21291 'fp->__bufp - fp->__buffer' \
21292 \
21293 '# old glibc iostream?' \
21294 'fp->_pptr - fp->_pbase' \
21295 \
21296 '# emx+gcc' \
21297 'fp->_ptr - fp->_buffer' \
21298 \
21299 '# Minix' \
21300 'fp->_ptr - fp->_buf' \
21301 \
21302 '# Plan9' \
21303 'fp->wp - fp->buf' \
21304 \
21305 '# VMS' \
21306 '(*fp)->_ptr - (*fp)->_base' \
21307 \
21308 '# e.g., DGUX R4.11; the info is not available' \
21309 1 \
21310 ; do
21311
21312 # Skip each embedded comment.
21313 case "$ac_expr" in '#'*) continue;; esac
21314
21315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21316/* end confdefs.h. */
21317#include <stdio.h>
21318int
21319main ()
21320{
21321FILE *fp = stdin; (void) ($ac_expr);
21322 ;
21323 return 0;
21324}
21325_ACEOF
21326if ac_fn_c_try_compile "$LINENO"; then :
21327 fp_done=yes
21328
21329fi
21330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21331 test "$fp_done" = yes && break
21332 done
21333
21334 ac_cv_sys_pending_output_n_bytes=$ac_expr
21335
21336
21337fi
21338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_pending_output_n_bytes" >&5
21339$as_echo "$ac_cv_sys_pending_output_n_bytes" >&6; }
21340
21341cat >>confdefs.h <<_ACEOF
21342#define PENDING_OUTPUT_N_BYTES $ac_cv_sys_pending_output_n_bytes
21343_ACEOF
21344
21345
21346 fi
21347
21348
d7ad186c
GM
21349
21350
21351
21352
21353 if test $ac_cv_func_fstatat = no; then
21354 HAVE_FSTATAT=0
21355 else
21356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fstatat (..., 0) works" >&5
21357$as_echo_n "checking whether fstatat (..., 0) works... " >&6; }
21358if test "${gl_cv_func_fstatat_zero_flag+set}" = set; then :
21359 $as_echo_n "(cached) " >&6
21360else
21361 if test "$cross_compiling" = yes; then :
21362 case "$host_os" in
21363 aix*) gl_cv_func_fstatat_zero_flag="guessing no";;
21364 *) gl_cv_func_fstatat_zero_flag="guessing yes";;
21365 esac
21366
21367else
21368 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21369/* end confdefs.h. */
21370
21371 #include <fcntl.h>
21372 #include <sys/stat.h>
21373 int
21374 main (void)
21375 {
21376 struct stat a;
21377 return fstatat (AT_FDCWD, ".", &a, 0) != 0;
21378 }
21379
21380_ACEOF
21381if ac_fn_c_try_run "$LINENO"; then :
21382 gl_cv_func_fstatat_zero_flag=yes
21383else
21384 gl_cv_func_fstatat_zero_flag=no
21385fi
21386rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21387 conftest.$ac_objext conftest.beam conftest.$ac_ext
21388fi
21389
21390
21391fi
21392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fstatat_zero_flag" >&5
21393$as_echo "$gl_cv_func_fstatat_zero_flag" >&6; }
21394
21395 case $gl_cv_func_fstatat_zero_flag+$gl_cv_func_lstat_dereferences_slashed_symlink in
21396 *yes+*yes) ;;
21397 *) REPLACE_FSTATAT=1
21398 case $gl_cv_func_fstatat_zero_flag in
21399 *yes)
21400
21401$as_echo "#define HAVE_WORKING_FSTATAT_ZERO_FLAG 1" >>confdefs.h
21402
21403 ;;
21404 esac
21405 ;;
21406 esac
21407 fi
21408
21409 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
21410
21411
21412
21413
21414
21415
21416
21417
21418 gl_LIBOBJS="$gl_LIBOBJS fstatat.$ac_objext"
21419
21420 fi
21421
21422
21423
21424
21425
21426 GNULIB_FSTATAT=1
21427
21428
21429
21430
21431
21432
21433
5476a9a4
GM
21434# Persuade glibc <stdlib.h> to declare getloadavg().
21435
21436
21437gl_save_LIBS=$LIBS
21438
21439# getloadvg is present in libc on glibc >= 2.2, Mac OS X, FreeBSD >= 2.0,
21440# NetBSD >= 0.9, OpenBSD >= 2.0, Solaris >= 7.
21441HAVE_GETLOADAVG=1
21442ac_fn_c_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg"
21443if test "x$ac_cv_func_getloadavg" = x""yes; then :
21444
21445else
21446 gl_func_getloadavg_done=no
21447
21448 # Some systems with -lutil have (and need) -lkvm as well, some do not.
21449 # On Solaris, -lkvm requires nlist from -lelf, so check that first
21450 # to get the right answer into the cache.
21451 # For kstat on solaris, we need to test for libelf and libkvm to force the
21452 # definition of SVR4 below.
21453 if test $gl_func_getloadavg_done = no; then
21454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_begin in -lelf" >&5
21455$as_echo_n "checking for elf_begin in -lelf... " >&6; }
21456if test "${ac_cv_lib_elf_elf_begin+set}" = set; then :
6ad6792b
GM
21457 $as_echo_n "(cached) " >&6
21458else
3e0be4ab 21459 ac_check_lib_save_LIBS=$LIBS
5476a9a4 21460LIBS="-lelf $LIBS"
3e0be4ab 21461cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6ad6792b 21462/* end confdefs.h. */
6ad6792b 21463
3e0be4ab
GM
21464/* Override any GCC internal prototype to avoid an error.
21465 Use char because int might match the return type of a GCC
21466 builtin and then its argument prototype would still apply. */
21467#ifdef __cplusplus
21468extern "C"
21469#endif
5476a9a4 21470char elf_begin ();
6ad6792b
GM
21471int
21472main ()
21473{
5476a9a4 21474return elf_begin ();
6ad6792b
GM
21475 ;
21476 return 0;
21477}
21478_ACEOF
3e0be4ab 21479if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 21480 ac_cv_lib_elf_elf_begin=yes
3e0be4ab 21481else
5476a9a4 21482 ac_cv_lib_elf_elf_begin=no
6ad6792b 21483fi
3e0be4ab
GM
21484rm -f core conftest.err conftest.$ac_objext \
21485 conftest$ac_exeext conftest.$ac_ext
21486LIBS=$ac_check_lib_save_LIBS
6ad6792b 21487fi
5476a9a4
GM
21488{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_elf_elf_begin" >&5
21489$as_echo "$ac_cv_lib_elf_elf_begin" >&6; }
21490if test "x$ac_cv_lib_elf_elf_begin" = x""yes; then :
21491 LIBS="-lelf $LIBS"
6ad6792b
GM
21492fi
21493
5476a9a4
GM
21494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kvm_open in -lkvm" >&5
21495$as_echo_n "checking for kvm_open in -lkvm... " >&6; }
21496if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then :
6c051bab
GM
21497 $as_echo_n "(cached) " >&6
21498else
5476a9a4
GM
21499 ac_check_lib_save_LIBS=$LIBS
21500LIBS="-lkvm $LIBS"
21501cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c051bab 21502/* end confdefs.h. */
3e0be4ab 21503
5476a9a4
GM
21504/* Override any GCC internal prototype to avoid an error.
21505 Use char because int might match the return type of a GCC
21506 builtin and then its argument prototype would still apply. */
21507#ifdef __cplusplus
21508extern "C"
21509#endif
21510char kvm_open ();
6c051bab
GM
21511int
21512main ()
21513{
5476a9a4 21514return kvm_open ();
6c051bab
GM
21515 ;
21516 return 0;
21517}
21518_ACEOF
3e0be4ab 21519if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 21520 ac_cv_lib_kvm_kvm_open=yes
6c051bab 21521else
5476a9a4 21522 ac_cv_lib_kvm_kvm_open=no
6c051bab 21523fi
3e0be4ab
GM
21524rm -f core conftest.err conftest.$ac_objext \
21525 conftest$ac_exeext conftest.$ac_ext
5476a9a4 21526LIBS=$ac_check_lib_save_LIBS
6c051bab 21527fi
5476a9a4
GM
21528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kvm_kvm_open" >&5
21529$as_echo "$ac_cv_lib_kvm_kvm_open" >&6; }
21530if test "x$ac_cv_lib_kvm_kvm_open" = x""yes; then :
21531 LIBS="-lkvm $LIBS"
3e0be4ab 21532fi
6c051bab 21533
5476a9a4
GM
21534 # Check for the 4.4BSD definition of getloadavg.
21535 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lutil" >&5
21536$as_echo_n "checking for getloadavg in -lutil... " >&6; }
21537if test "${ac_cv_lib_util_getloadavg+set}" = set; then :
ae0d7250
PE
21538 $as_echo_n "(cached) " >&6
21539else
5476a9a4
GM
21540 ac_check_lib_save_LIBS=$LIBS
21541LIBS="-lutil $LIBS"
21542cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6d153f56 21543/* end confdefs.h. */
5476a9a4
GM
21544
21545/* Override any GCC internal prototype to avoid an error.
21546 Use char because int might match the return type of a GCC
21547 builtin and then its argument prototype would still apply. */
21548#ifdef __cplusplus
21549extern "C"
21550#endif
21551char getloadavg ();
ae0d7250
PE
21552int
21553main ()
21554{
5476a9a4 21555return getloadavg ();
ae0d7250
PE
21556 ;
21557 return 0;
21558}
21559_ACEOF
3e0be4ab 21560if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 21561 ac_cv_lib_util_getloadavg=yes
ae0d7250 21562else
5476a9a4 21563 ac_cv_lib_util_getloadavg=no
ae0d7250 21564fi
3e0be4ab
GM
21565rm -f core conftest.err conftest.$ac_objext \
21566 conftest$ac_exeext conftest.$ac_ext
5476a9a4
GM
21567LIBS=$ac_check_lib_save_LIBS
21568fi
21569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_getloadavg" >&5
21570$as_echo "$ac_cv_lib_util_getloadavg" >&6; }
21571if test "x$ac_cv_lib_util_getloadavg" = x""yes; then :
21572 LIBS="-lutil $LIBS" gl_func_getloadavg_done=yes
3e0be4ab 21573fi
6d153f56 21574
5476a9a4 21575 fi
6d153f56 21576
5476a9a4
GM
21577 if test $gl_func_getloadavg_done = no; then
21578 # There is a commonly available library for RS/6000 AIX.
21579 # Since it is not a standard part of AIX, it might be installed locally.
21580 gl_getloadavg_LIBS=$LIBS
21581 LIBS="-L/usr/local/lib $LIBS"
21582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lgetloadavg" >&5
21583$as_echo_n "checking for getloadavg in -lgetloadavg... " >&6; }
21584if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then :
f199cab1 21585 $as_echo_n "(cached) " >&6
3e0be4ab 21586else
f199cab1 21587 ac_check_lib_save_LIBS=$LIBS
5476a9a4 21588LIBS="-lgetloadavg $LIBS"
f199cab1
GM
21589cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21590/* end confdefs.h. */
3e0be4ab 21591
f199cab1
GM
21592/* Override any GCC internal prototype to avoid an error.
21593 Use char because int might match the return type of a GCC
21594 builtin and then its argument prototype would still apply. */
21595#ifdef __cplusplus
21596extern "C"
21597#endif
5476a9a4 21598char getloadavg ();
f199cab1
GM
21599int
21600main ()
21601{
5476a9a4 21602return getloadavg ();
f199cab1
GM
21603 ;
21604 return 0;
21605}
ae0d7250 21606_ACEOF
f199cab1 21607if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 21608 ac_cv_lib_getloadavg_getloadavg=yes
f199cab1 21609else
5476a9a4 21610 ac_cv_lib_getloadavg_getloadavg=no
ae0d7250 21611fi
f199cab1
GM
21612rm -f core conftest.err conftest.$ac_objext \
21613 conftest$ac_exeext conftest.$ac_ext
21614LIBS=$ac_check_lib_save_LIBS
3e0be4ab 21615fi
5476a9a4
GM
21616{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_getloadavg_getloadavg" >&5
21617$as_echo "$ac_cv_lib_getloadavg_getloadavg" >&6; }
21618if test "x$ac_cv_lib_getloadavg_getloadavg" = x""yes; then :
21619 LIBS="-lgetloadavg $LIBS" gl_func_getloadavg_done=yes
21620else
21621 LIBS=$gl_getloadavg_LIBS
6d153f56 21622fi
ae0d7250 21623
5476a9a4 21624 fi
16c3e636 21625
5476a9a4
GM
21626 # Set up the replacement function if necessary.
21627 if test $gl_func_getloadavg_done = no; then
21628 HAVE_GETLOADAVG=0
16c3e636 21629
5476a9a4
GM
21630 # Solaris has libkstat which does not require root.
21631 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kstat_open in -lkstat" >&5
21632$as_echo_n "checking for kstat_open in -lkstat... " >&6; }
21633if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then :
f199cab1
GM
21634 $as_echo_n "(cached) " >&6
21635else
21636 ac_check_lib_save_LIBS=$LIBS
5476a9a4 21637LIBS="-lkstat $LIBS"
f199cab1
GM
21638cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21639/* end confdefs.h. */
5f90be1b 21640
f199cab1
GM
21641/* Override any GCC internal prototype to avoid an error.
21642 Use char because int might match the return type of a GCC
21643 builtin and then its argument prototype would still apply. */
21644#ifdef __cplusplus
21645extern "C"
21646#endif
5476a9a4 21647char kstat_open ();
f199cab1
GM
21648int
21649main ()
21650{
5476a9a4 21651return kstat_open ();
f199cab1
GM
21652 ;
21653 return 0;
21654}
3e0be4ab 21655_ACEOF
f199cab1 21656if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 21657 ac_cv_lib_kstat_kstat_open=yes
f199cab1 21658else
5476a9a4 21659 ac_cv_lib_kstat_kstat_open=no
5f90be1b 21660fi
f199cab1
GM
21661rm -f core conftest.err conftest.$ac_objext \
21662 conftest$ac_exeext conftest.$ac_ext
21663LIBS=$ac_check_lib_save_LIBS
3e0be4ab 21664fi
5476a9a4
GM
21665{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kstat_kstat_open" >&5
21666$as_echo "$ac_cv_lib_kstat_kstat_open" >&6; }
21667if test "x$ac_cv_lib_kstat_kstat_open" = x""yes; then :
3e0be4ab 21668 cat >>confdefs.h <<_ACEOF
5476a9a4 21669#define HAVE_LIBKSTAT 1
3e0be4ab 21670_ACEOF
5f90be1b 21671
5476a9a4 21672 LIBS="-lkstat $LIBS"
5f90be1b 21673
f199cab1 21674fi
5f90be1b 21675
5476a9a4 21676 test $ac_cv_lib_kstat_kstat_open = yes && gl_func_getloadavg_done=yes
da6c8463 21677
5476a9a4
GM
21678 # AIX has libperfstat which does not require root
21679 if test $gl_func_getloadavg_done = no; then
21680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for perfstat_cpu_total in -lperfstat" >&5
21681$as_echo_n "checking for perfstat_cpu_total in -lperfstat... " >&6; }
21682if test "${ac_cv_lib_perfstat_perfstat_cpu_total+set}" = set; then :
f199cab1
GM
21683 $as_echo_n "(cached) " >&6
21684else
5476a9a4
GM
21685 ac_check_lib_save_LIBS=$LIBS
21686LIBS="-lperfstat $LIBS"
21687cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5f90be1b 21688/* end confdefs.h. */
5476a9a4
GM
21689
21690/* Override any GCC internal prototype to avoid an error.
21691 Use char because int might match the return type of a GCC
21692 builtin and then its argument prototype would still apply. */
21693#ifdef __cplusplus
21694extern "C"
21695#endif
21696char perfstat_cpu_total ();
5f90be1b
PE
21697int
21698main ()
21699{
5476a9a4 21700return perfstat_cpu_total ();
5f90be1b
PE
21701 ;
21702 return 0;
21703}
21704_ACEOF
5476a9a4
GM
21705if ac_fn_c_try_link "$LINENO"; then :
21706 ac_cv_lib_perfstat_perfstat_cpu_total=yes
f199cab1 21707else
5476a9a4 21708 ac_cv_lib_perfstat_perfstat_cpu_total=no
f199cab1 21709fi
5476a9a4
GM
21710rm -f core conftest.err conftest.$ac_objext \
21711 conftest$ac_exeext conftest.$ac_ext
21712LIBS=$ac_check_lib_save_LIBS
f199cab1 21713fi
5476a9a4
GM
21714{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_perfstat_perfstat_cpu_total" >&5
21715$as_echo "$ac_cv_lib_perfstat_perfstat_cpu_total" >&6; }
21716if test "x$ac_cv_lib_perfstat_perfstat_cpu_total" = x""yes; then :
21717 cat >>confdefs.h <<_ACEOF
21718#define HAVE_LIBPERFSTAT 1
21719_ACEOF
21720
21721 LIBS="-lperfstat $LIBS"
21722
21723fi
21724
21725 test $ac_cv_lib_perfstat_perfstat_cpu_total = yes && gl_func_getloadavg_done=yes
21726 fi
21727
21728 if test $gl_func_getloadavg_done = no; then
21729 ac_fn_c_check_header_mongrel "$LINENO" "sys/dg_sys_info.h" "ac_cv_header_sys_dg_sys_info_h" "$ac_includes_default"
21730if test "x$ac_cv_header_sys_dg_sys_info_h" = x""yes; then :
21731 gl_func_getloadavg_done=yes
21732
21733$as_echo "#define DGUX 1" >>confdefs.h
21734
21735 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dg_sys_info in -ldgc" >&5
21736$as_echo_n "checking for dg_sys_info in -ldgc... " >&6; }
21737if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then :
f199cab1
GM
21738 $as_echo_n "(cached) " >&6
21739else
21740 ac_check_lib_save_LIBS=$LIBS
5476a9a4 21741LIBS="-ldgc $LIBS"
f199cab1
GM
21742cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21743/* end confdefs.h. */
3e0be4ab 21744
f199cab1
GM
21745/* Override any GCC internal prototype to avoid an error.
21746 Use char because int might match the return type of a GCC
21747 builtin and then its argument prototype would still apply. */
21748#ifdef __cplusplus
21749extern "C"
21750#endif
5476a9a4 21751char dg_sys_info ();
f199cab1
GM
21752int
21753main ()
21754{
5476a9a4 21755return dg_sys_info ();
f199cab1
GM
21756 ;
21757 return 0;
21758}
21759_ACEOF
21760if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 21761 ac_cv_lib_dgc_dg_sys_info=yes
f199cab1 21762else
5476a9a4 21763 ac_cv_lib_dgc_dg_sys_info=no
5f90be1b 21764fi
3e0be4ab
GM
21765rm -f core conftest.err conftest.$ac_objext \
21766 conftest$ac_exeext conftest.$ac_ext
f199cab1 21767LIBS=$ac_check_lib_save_LIBS
5f90be1b 21768fi
5476a9a4
GM
21769{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dgc_dg_sys_info" >&5
21770$as_echo "$ac_cv_lib_dgc_dg_sys_info" >&6; }
21771if test "x$ac_cv_lib_dgc_dg_sys_info" = x""yes; then :
21772 cat >>confdefs.h <<_ACEOF
21773#define HAVE_LIBDGC 1
21774_ACEOF
21775
21776 LIBS="-ldgc $LIBS"
21777
da6c8463
GM
21778fi
21779
5476a9a4
GM
21780fi
21781
21782
21783 fi
21784 fi
21785fi
21786
21787
21788if test "x$gl_save_LIBS" = x; then
21789 GETLOADAVG_LIBS=$LIBS
f199cab1 21790else
5476a9a4
GM
21791 GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$gl_save_LIBS!!"`
21792fi
21793LIBS=$gl_save_LIBS
21794
21795
21796# Test whether the system declares getloadavg. Solaris has the function
21797# but declares it in <sys/loadavg.h>, not <stdlib.h>.
21798for ac_header in sys/loadavg.h
21799do :
21800 ac_fn_c_check_header_mongrel "$LINENO" "sys/loadavg.h" "ac_cv_header_sys_loadavg_h" "$ac_includes_default"
21801if test "x$ac_cv_header_sys_loadavg_h" = x""yes; then :
21802 cat >>confdefs.h <<_ACEOF
21803#define HAVE_SYS_LOADAVG_H 1
f199cab1 21804_ACEOF
5476a9a4 21805
f199cab1 21806fi
5476a9a4
GM
21807
21808done
21809
21810if test $ac_cv_header_sys_loadavg_h = yes; then
21811 HAVE_SYS_LOADAVG_H=1
21812else
21813 HAVE_SYS_LOADAVG_H=0
f199cab1 21814fi
5476a9a4
GM
21815ac_fn_c_check_decl "$LINENO" "getloadavg" "ac_cv_have_decl_getloadavg" "#if HAVE_SYS_LOADAVG_H
21816 # include <sys/loadavg.h>
21817 #endif
21818 #include <stdlib.h>
21819"
21820if test "x$ac_cv_have_decl_getloadavg" = x""yes; then :
5f90be1b 21821
f199cab1 21822else
5476a9a4 21823 HAVE_DECL_GETLOADAVG=0
f199cab1 21824fi
5f90be1b 21825
5f90be1b 21826
a6342fc8 21827 if test $HAVE_GETLOADAVG = 0; then
5476a9a4
GM
21828
21829
21830
21831
21832
21833
21834
21835
21836 gl_LIBOBJS="$gl_LIBOBJS getloadavg.$ac_objext"
21837
21838
21839# Figure out what our getloadavg.c needs.
21840
21841
21842
21843# On HPUX9, an unprivileged user can get load averages this way.
21844if test $gl_func_getloadavg_done = no; then
21845 for ac_func in pstat_getdynamic
21846do :
21847 ac_fn_c_check_func "$LINENO" "pstat_getdynamic" "ac_cv_func_pstat_getdynamic"
21848if test "x$ac_cv_func_pstat_getdynamic" = x""yes; then :
21849 cat >>confdefs.h <<_ACEOF
21850#define HAVE_PSTAT_GETDYNAMIC 1
21851_ACEOF
21852 gl_func_getloadavg_done=yes
3e0be4ab 21853fi
5476a9a4 21854done
6ad6792b 21855
5476a9a4 21856fi
6ad6792b 21857
5476a9a4
GM
21858# We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
21859# uses stabs), but it is still SVR4. We cannot check for <elf.h> because
21860# Irix 4.0.5F has the header but not the library.
21861if test $gl_func_getloadavg_done = no && test "$ac_cv_lib_elf_elf_begin" = yes \
21862 && test "$ac_cv_lib_kvm_kvm_open" = yes; then
21863 gl_func_getloadavg_done=yes
6ad6792b 21864
5476a9a4 21865$as_echo "#define SVR4 1" >>confdefs.h
6ad6792b 21866
5476a9a4
GM
21867fi
21868
21869if test $gl_func_getloadavg_done = no; then
21870 ac_fn_c_check_header_mongrel "$LINENO" "inq_stats/cpustats.h" "ac_cv_header_inq_stats_cpustats_h" "$ac_includes_default"
21871if test "x$ac_cv_header_inq_stats_cpustats_h" = x""yes; then :
21872 gl_func_getloadavg_done=yes
21873
21874$as_echo "#define UMAX 1" >>confdefs.h
21875
21876
21877$as_echo "#define UMAX4_3 1" >>confdefs.h
21878
21879fi
21880
21881
21882fi
21883
21884if test $gl_func_getloadavg_done = no; then
21885 ac_fn_c_check_header_mongrel "$LINENO" "sys/cpustats.h" "ac_cv_header_sys_cpustats_h" "$ac_includes_default"
21886if test "x$ac_cv_header_sys_cpustats_h" = x""yes; then :
21887 gl_func_getloadavg_done=yes; $as_echo "#define UMAX 1" >>confdefs.h
21888
21889fi
21890
21891
21892fi
21893
21894if test $gl_func_getloadavg_done = no; then
21895 for ac_header in mach/mach.h
21896do :
21897 ac_fn_c_check_header_mongrel "$LINENO" "mach/mach.h" "ac_cv_header_mach_mach_h" "$ac_includes_default"
21898if test "x$ac_cv_header_mach_mach_h" = x""yes; then :
21899 cat >>confdefs.h <<_ACEOF
21900#define HAVE_MACH_MACH_H 1
21901_ACEOF
21902
21903fi
21904
21905done
21906
21907fi
21908
21909for ac_header in nlist.h
21910do :
21911 ac_fn_c_check_header_mongrel "$LINENO" "nlist.h" "ac_cv_header_nlist_h" "$ac_includes_default"
21912if test "x$ac_cv_header_nlist_h" = x""yes; then :
21913 cat >>confdefs.h <<_ACEOF
21914#define HAVE_NLIST_H 1
21915_ACEOF
21916 ac_fn_c_check_member "$LINENO" "struct nlist" "n_un.n_name" "ac_cv_member_struct_nlist_n_un_n_name" "#include <nlist.h>
21917"
21918if test "x$ac_cv_member_struct_nlist_n_un_n_name" = x""yes; then :
21919
21920cat >>confdefs.h <<_ACEOF
21921#define HAVE_STRUCT_NLIST_N_UN_N_NAME 1
21922_ACEOF
6ad6792b 21923
0eb775a3 21924
f199cab1 21925fi
3e0be4ab 21926
5476a9a4 21927 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 21928/* end confdefs.h. */
5476a9a4 21929#include <nlist.h>
f199cab1
GM
21930int
21931main ()
21932{
5476a9a4
GM
21933struct nlist x;
21934 #ifdef HAVE_STRUCT_NLIST_N_UN_N_NAME
21935 x.n_un.n_name = "";
21936 #else
21937 x.n_name = "";
21938 #endif
f199cab1
GM
21939 ;
21940 return 0;
21941}
21942_ACEOF
5476a9a4 21943if ac_fn_c_try_link "$LINENO"; then :
6ad6792b 21944
5476a9a4 21945$as_echo "#define N_NAME_POINTER 1" >>confdefs.h
6ad6792b
GM
21946
21947fi
5476a9a4
GM
21948rm -f core conftest.err conftest.$ac_objext \
21949 conftest$ac_exeext conftest.$ac_ext
6ad6792b 21950
5476a9a4 21951fi
6ad6792b 21952
5476a9a4 21953done
6ad6792b 21954
a6342fc8 21955 fi
ca36e0ff 21956
ca36e0ff
GM
21957
21958
1f5d53eb
PE
21959
21960
5476a9a4 21961 GNULIB_GETLOADAVG=1
1f5d53eb
PE
21962
21963
21964
21965
21966
21967
21968
1f5d53eb 21969
1f5d53eb 21970
3e0be4ab 21971
a6342fc8 21972 if test $REPLACE_GETOPT = 1; then
3e0be4ab 21973
1f5d53eb
PE
21974
21975
1f5d53eb 21976
1f5d53eb
PE
21977
21978
21979
21980
5476a9a4 21981 gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
0eb775a3
GM
21982
21983
1f5d53eb
PE
21984
21985
16c3e636 21986
5476a9a4
GM
21987
21988
21989
21990
21991 gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
21992
21993
21994
21995
a6342fc8
GM
21996 GNULIB_GL_UNISTD_H_GETOPT=1
21997 fi
16c3e636
PE
21998
21999
22000
4fda9c95
GM
22001
22002
22003
22004
5476a9a4
GM
22005 REPLACE_GETOPT=0
22006 if test -n "$gl_replace_getopt"; then
22007 REPLACE_GETOPT=1
22008 fi
22009
22010 if test $REPLACE_GETOPT = 1; then
22011
22012 GETOPT_H=getopt.h
22013
22014$as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
22015
22016
22017
22018 fi
22019
a6342fc8 22020 if test $REPLACE_GETOPT = 1; then
5476a9a4
GM
22021
22022
22023
22024
22025
22026
22027
22028
22029 gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
22030
22031
22032
22033
22034
22035
22036
22037
22038
22039 gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
4fda9c95
GM
22040
22041
22042
22043
a6342fc8
GM
22044 GNULIB_GL_UNISTD_H_GETOPT=1
22045 fi
4fda9c95
GM
22046
22047
22048
22049
4fda9c95 22050
4fda9c95 22051
4fda9c95 22052
5476a9a4
GM
22053
22054
22055
22056
22057
22058 gl_gettimeofday_timezone=void
22059 if test $ac_cv_func_gettimeofday != yes; then
22060 HAVE_GETTIMEOFDAY=0
f199cab1 22061 else
4fda9c95
GM
22062
22063
3e0be4ab 22064
5476a9a4
GM
22065 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5
22066$as_echo_n "checking whether gettimeofday clobbers localtime buffer... " >&6; }
22067if test "${gl_cv_func_gettimeofday_clobber+set}" = set; then :
22068 $as_echo_n "(cached) " >&6
22069else
22070 if test "$cross_compiling" = yes; then :
22071 # When cross-compiling:
22072 case "$host_os" in
22073 # Guess all is fine on glibc systems.
22074 *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
22075 # If we don't know, assume the worst.
22076 *) gl_cv_func_gettimeofday_clobber="guessing yes" ;;
22077 esac
4fda9c95 22078
5476a9a4
GM
22079else
22080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22081/* end confdefs.h. */
22082#include <string.h>
22083 #include <sys/time.h>
22084 #include <time.h>
22085 #include <stdlib.h>
4fda9c95 22086
5476a9a4
GM
22087int
22088main ()
22089{
4fda9c95 22090
5476a9a4
GM
22091 time_t t = 0;
22092 struct tm *lt;
22093 struct tm saved_lt;
22094 struct timeval tv;
22095 lt = localtime (&t);
22096 saved_lt = *lt;
22097 gettimeofday (&tv, NULL);
22098 return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
cc322c06 22099
5476a9a4
GM
22100 ;
22101 return 0;
22102}
22103_ACEOF
22104if ac_fn_c_try_run "$LINENO"; then :
22105 gl_cv_func_gettimeofday_clobber=no
22106else
22107 gl_cv_func_gettimeofday_clobber=yes
22108fi
22109rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22110 conftest.$ac_objext conftest.beam conftest.$ac_ext
22111fi
cc322c06 22112
5476a9a4
GM
22113fi
22114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5
22115$as_echo "$gl_cv_func_gettimeofday_clobber" >&6; }
cc322c06 22116
5476a9a4
GM
22117 case "$gl_cv_func_gettimeofday_clobber" in
22118 *yes)
22119 REPLACE_GETTIMEOFDAY=1
cc322c06 22120
4fda9c95 22121
5476a9a4 22122$as_echo "#define gmtime rpl_gmtime" >>confdefs.h
4fda9c95 22123
ae0d7250 22124
5476a9a4 22125$as_echo "#define localtime rpl_localtime" >>confdefs.h
ae0d7250
PE
22126
22127
ae0d7250 22128
5476a9a4
GM
22129$as_echo "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h
22130
22131 ;;
22132 esac
22133
22134 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
22135$as_echo_n "checking for gettimeofday with POSIX signature... " >&6; }
22136if test "${gl_cv_func_gettimeofday_posix_signature+set}" = set; then :
f199cab1
GM
22137 $as_echo_n "(cached) " >&6
22138else
5476a9a4
GM
22139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22140/* end confdefs.h. */
22141#include <sys/time.h>
22142 struct timeval c;
22143 int gettimeofday (struct timeval *restrict, void *restrict);
22144
22145int
22146main ()
22147{
22148/* glibc uses struct timezone * rather than the POSIX void *
22149 if _GNU_SOURCE is defined. However, since the only portable
22150 use of gettimeofday uses NULL as the second parameter, and
22151 since the glibc definition is actually more typesafe, it is
22152 not worth wrapping this to get a compliant signature. */
22153 int (*f) (struct timeval *restrict, void *restrict)
22154 = gettimeofday;
22155 int x = f (&c, 0);
22156 return !(x | c.tv_sec | c.tv_usec);
22157
22158 ;
22159 return 0;
22160}
22161_ACEOF
22162if ac_fn_c_try_compile "$LINENO"; then :
22163 gl_cv_func_gettimeofday_posix_signature=yes
22164else
22165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 22166/* end confdefs.h. */
5476a9a4
GM
22167#include <sys/time.h>
22168int gettimeofday (struct timeval *restrict, struct timezone *restrict);
ae0d7250 22169
f199cab1
GM
22170int
22171main ()
22172{
5476a9a4 22173
f199cab1
GM
22174 ;
22175 return 0;
ae0d7250
PE
22176}
22177_ACEOF
5476a9a4
GM
22178if ac_fn_c_try_compile "$LINENO"; then :
22179 gl_cv_func_gettimeofday_posix_signature=almost
ae0d7250 22180else
5476a9a4 22181 gl_cv_func_gettimeofday_posix_signature=no
ae0d7250 22182fi
5476a9a4 22183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ae0d7250 22184fi
5476a9a4 22185rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52724a05 22186fi
5476a9a4
GM
22187{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
22188$as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; }
22189 if test $gl_cv_func_gettimeofday_posix_signature = almost; then
22190 gl_gettimeofday_timezone='struct timezone'
22191 elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
22192 REPLACE_GETTIMEOFDAY=1
22193 fi
22194 if test $REPLACE_STRUCT_TIMEVAL = 1; then
22195 REPLACE_GETTIMEOFDAY=1
22196 fi
3e0be4ab 22197
5476a9a4 22198 fi
ae0d7250 22199
5476a9a4
GM
22200cat >>confdefs.h <<_ACEOF
22201#define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone
22202_ACEOF
f199cab1 22203
ae0d7250 22204
a6342fc8 22205 if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
ae0d7250 22206
cc322c06
GM
22207
22208
cc322c06
GM
22209
22210
ae0d7250
PE
22211
22212
22213
5476a9a4 22214 gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
5fa4ac76
PE
22215
22216
5476a9a4
GM
22217 for ac_header in sys/timeb.h
22218do :
22219 ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
22220if test "x$ac_cv_header_sys_timeb_h" = x""yes; then :
22221 cat >>confdefs.h <<_ACEOF
22222#define HAVE_SYS_TIMEB_H 1
22223_ACEOF
5fa4ac76 22224
3e0be4ab 22225fi
5fa4ac76 22226
5476a9a4 22227done
f199cab1 22228
5476a9a4
GM
22229 for ac_func in _ftime
22230do :
22231 ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
22232if test "x$ac_cv_func__ftime" = x""yes; then :
22233 cat >>confdefs.h <<_ACEOF
22234#define HAVE__FTIME 1
22235_ACEOF
5fa4ac76 22236
5476a9a4
GM
22237fi
22238done
5fa4ac76
PE
22239
22240
a6342fc8 22241 fi
5fa4ac76
PE
22242
22243
22244
22245
22246
5476a9a4 22247 GNULIB_GETTIMEOFDAY=1
5fa4ac76
PE
22248
22249
22250
22251
0eb775a3
GM
22252
22253
369e19fc
PE
22254
22255
369e19fc
PE
22256
22257
5476a9a4
GM
22258 if test $ac_cv_func_lstat = yes; then
22259
22260 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
22261 *no)
22262 REPLACE_LSTAT=1
22263 ;;
22264 esac
22265 else
22266 HAVE_LSTAT=0
f199cab1 22267 fi
369e19fc 22268
a6342fc8 22269 if test $REPLACE_LSTAT = 1; then
369e19fc 22270
5fa4ac76 22271
369e19fc 22272
369e19fc 22273
369e19fc 22274
369e19fc 22275
369e19fc 22276
369e19fc 22277
5476a9a4 22278 gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
f199cab1 22279
45d4966b 22280 :
a6342fc8 22281 fi
369e19fc 22282
369e19fc 22283
369e19fc 22284
5fa4ac76
PE
22285
22286
5476a9a4 22287 GNULIB_LSTAT=1
5fa4ac76 22288
5fa4ac76 22289
27505cf5 22290
27505cf5 22291
27505cf5 22292
27505cf5 22293
27505cf5 22294
27505cf5 22295
5fa4ac76
PE
22296
22297
5476a9a4
GM
22298
22299 if test $APPLE_UNIVERSAL_BUILD = 1; then
22300 # A universal build on Apple Mac OS X platforms.
22301 # The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode.
22302 # But we need a configuration result that is valid in both modes.
22303 gl_cv_func_working_mktime=no
22304 fi
22305 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5
22306$as_echo_n "checking for working mktime... " >&6; }
22307if test "${gl_cv_func_working_mktime+set}" = set; then :
f199cab1
GM
22308 $as_echo_n "(cached) " >&6
22309else
5476a9a4
GM
22310 if test "$cross_compiling" = yes; then :
22311 gl_cv_func_working_mktime=no
22312else
22313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 22314/* end confdefs.h. */
5476a9a4
GM
22315/* Test program from Paul Eggert and Tony Leneis. */
22316#include <limits.h>
22317#include <stdlib.h>
22318#include <time.h>
5fa4ac76 22319
5476a9a4
GM
22320#ifdef HAVE_UNISTD_H
22321# include <unistd.h>
f199cab1 22322#endif
5476a9a4
GM
22323
22324#ifndef HAVE_ALARM
22325# define alarm(X) /* empty */
22326#endif
22327
22328/* Work around redefinition to rpl_putenv by other config tests. */
22329#undef putenv
22330
22331static time_t time_t_max;
22332static time_t time_t_min;
22333
22334/* Values we'll use to set the TZ environment variable. */
22335static char *tz_strings[] = {
22336 (char *) 0, "TZ=GMT0", "TZ=JST-9",
22337 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
22338};
22339#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
22340
22341/* Return 0 if mktime fails to convert a date in the spring-forward gap.
22342 Based on a problem report from Andreas Jaeger. */
22343static int
22344spring_forward_gap ()
f199cab1 22345{
5476a9a4
GM
22346 /* glibc (up to about 1998-10-07) failed this test. */
22347 struct tm tm;
22348
22349 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
22350 instead of "TZ=America/Vancouver" in order to detect the bug even
22351 on systems that don't support the Olson extension, or don't have the
22352 full zoneinfo tables installed. */
22353 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
22354
22355 tm.tm_year = 98;
22356 tm.tm_mon = 3;
22357 tm.tm_mday = 5;
22358 tm.tm_hour = 2;
22359 tm.tm_min = 0;
22360 tm.tm_sec = 0;
22361 tm.tm_isdst = -1;
22362 return mktime (&tm) != (time_t) -1;
f199cab1 22363}
5fa4ac76 22364
5476a9a4
GM
22365static int
22366mktime_test1 (time_t now)
22367{
22368 struct tm *lt;
22369 return ! (lt = localtime (&now)) || mktime (lt) == now;
22370}
5fa4ac76 22371
5476a9a4
GM
22372static int
22373mktime_test (time_t now)
22374{
22375 return (mktime_test1 (now)
22376 && mktime_test1 ((time_t) (time_t_max - now))
22377 && mktime_test1 ((time_t) (time_t_min + now)));
22378}
067d23c9 22379
5476a9a4
GM
22380static int
22381irix_6_4_bug ()
22382{
22383 /* Based on code from Ariel Faigon. */
22384 struct tm tm;
22385 tm.tm_year = 96;
22386 tm.tm_mon = 3;
22387 tm.tm_mday = 0;
22388 tm.tm_hour = 0;
22389 tm.tm_min = 0;
22390 tm.tm_sec = 0;
22391 tm.tm_isdst = -1;
22392 mktime (&tm);
22393 return tm.tm_mon == 2 && tm.tm_mday == 31;
22394}
22395
22396static int
22397bigtime_test (int j)
22398{
22399 struct tm tm;
22400 time_t now;
22401 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
22402 now = mktime (&tm);
22403 if (now != (time_t) -1)
22404 {
22405 struct tm *lt = localtime (&now);
22406 if (! (lt
22407 && lt->tm_year == tm.tm_year
22408 && lt->tm_mon == tm.tm_mon
22409 && lt->tm_mday == tm.tm_mday
22410 && lt->tm_hour == tm.tm_hour
22411 && lt->tm_min == tm.tm_min
22412 && lt->tm_sec == tm.tm_sec
22413 && lt->tm_yday == tm.tm_yday
22414 && lt->tm_wday == tm.tm_wday
22415 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
22416 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
22417 return 0;
22418 }
22419 return 1;
22420}
369e19fc 22421
5476a9a4
GM
22422static int
22423year_2050_test ()
22424{
22425 /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
22426 ignoring leap seconds. */
22427 unsigned long int answer = 2527315200UL;
369e19fc 22428
5476a9a4
GM
22429 struct tm tm;
22430 time_t t;
22431 tm.tm_year = 2050 - 1900;
22432 tm.tm_mon = 2 - 1;
22433 tm.tm_mday = 1;
22434 tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
22435 tm.tm_isdst = -1;
369e19fc 22436
5476a9a4
GM
22437 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
22438 instead of "TZ=America/Vancouver" in order to detect the bug even
22439 on systems that don't support the Olson extension, or don't have the
22440 full zoneinfo tables installed. */
22441 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
067d23c9 22442
5476a9a4 22443 t = mktime (&tm);
067d23c9 22444
5476a9a4
GM
22445 /* Check that the result is either a failure, or close enough
22446 to the correct answer that we can assume the discrepancy is
22447 due to leap seconds. */
22448 return (t == (time_t) -1
22449 || (0 < t && answer - 120 <= t && t <= answer + 120));
22450}
067d23c9 22451
f199cab1
GM
22452int
22453main ()
22454{
5476a9a4
GM
22455 int result = 0;
22456 time_t t, delta;
22457 int i, j;
22458 int time_t_signed_magnitude = (time_t) ~ (time_t) 0 < (time_t) -1;
22459 int time_t_signed = ! ((time_t) 0 < (time_t) -1);
067d23c9 22460
5476a9a4
GM
22461 /* This test makes some buggy mktime implementations loop.
22462 Give up after 60 seconds; a mktime slower than that
22463 isn't worth using anyway. */
22464 alarm (60);
067d23c9 22465
5476a9a4
GM
22466 time_t_max = (! time_t_signed
22467 ? (time_t) -1
22468 : ((((time_t) 1 << (sizeof (time_t) * CHAR_BIT - 2)) - 1)
22469 * 2 + 1));
22470 time_t_min = (! time_t_signed
22471 ? (time_t) 0
22472 : time_t_signed_magnitude
22473 ? ~ (time_t) 0
22474 : ~ time_t_max);
3e0be4ab 22475
5476a9a4
GM
22476 delta = time_t_max / 997; /* a suitable prime number */
22477 for (i = 0; i < N_STRINGS; i++)
22478 {
22479 if (tz_strings[i])
22480 putenv (tz_strings[i]);
3e0be4ab 22481
5476a9a4
GM
22482 for (t = 0; t <= time_t_max - delta && (result & 1) == 0; t += delta)
22483 if (! mktime_test (t))
22484 result |= 1;
22485 if ((result & 2) == 0
22486 && ! (mktime_test ((time_t) 1)
22487 && mktime_test ((time_t) (60 * 60))
22488 && mktime_test ((time_t) (60 * 60 * 24))))
22489 result |= 2;
f199cab1 22490
5476a9a4
GM
22491 for (j = 1; (result & 4) == 0; j <<= 1)
22492 {
22493 if (! bigtime_test (j))
22494 result |= 4;
22495 if (INT_MAX / 2 < j)
22496 break;
22497 }
22498 if ((result & 8) == 0 && ! bigtime_test (INT_MAX))
22499 result |= 8;
22500 }
22501 if (! irix_6_4_bug ())
22502 result |= 16;
22503 if (! spring_forward_gap ())
22504 result |= 32;
22505 if (! year_2050_test ())
22506 result |= 64;
22507 return result;
067d23c9
KY
22508}
22509_ACEOF
5476a9a4
GM
22510if ac_fn_c_try_run "$LINENO"; then :
22511 gl_cv_func_working_mktime=yes
067d23c9 22512else
5476a9a4 22513 gl_cv_func_working_mktime=no
3e0be4ab 22514fi
5476a9a4
GM
22515rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22516 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1
GM
22517fi
22518
f199cab1 22519
5476a9a4
GM
22520fi
22521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_mktime" >&5
22522$as_echo "$gl_cv_func_working_mktime" >&6; }
f199cab1 22523
5476a9a4
GM
22524 if test $gl_cv_func_working_mktime = no; then
22525 REPLACE_MKTIME=1
22526 else
22527 REPLACE_MKTIME=0
f199cab1 22528 fi
f199cab1 22529
a6342fc8 22530 if test $REPLACE_MKTIME = 1; then
f199cab1 22531
f199cab1 22532
0eb775a3 22533
067d23c9 22534
a451f14b 22535
a451f14b 22536
743c80a7
PE
22537
22538
5476a9a4
GM
22539 gl_LIBOBJS="$gl_LIBOBJS mktime.$ac_objext"
22540
a6342fc8
GM
22541 :
22542 fi
a451f14b
PE
22543
22544
22545
e275c824
PE
22546
22547
5476a9a4 22548 GNULIB_MKTIME=1
e275c824
PE
22549
22550
22551
22552
22553
22554
22555
22556
d87ffdb7 22557
5476a9a4
GM
22558
22559
22560 if test $ac_cv_func_pselect = yes; then
22561 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether signature of pselect conforms to POSIX" >&5
22562$as_echo_n "checking whether signature of pselect conforms to POSIX... " >&6; }
22563if test "${gl_cv_sig_pselect+set}" = set; then :
e275c824
PE
22564 $as_echo_n "(cached) " >&6
22565else
5476a9a4 22566 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
e275c824 22567/* end confdefs.h. */
5476a9a4 22568#include <sys/select.h>
e275c824 22569
f199cab1
GM
22570int
22571main ()
22572{
5476a9a4
GM
22573int (*p) (int, fd_set *, fd_set *, fd_set *restrict,
22574 struct timespec const *restrict,
22575 sigset_t const *restrict) = pselect;
22576 return !p;
f199cab1
GM
22577 ;
22578 return 0;
22579}
e275c824 22580_ACEOF
f199cab1 22581if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 22582 gl_cv_sig_pselect=yes
3e0be4ab 22583else
5476a9a4 22584 gl_cv_sig_pselect=no
f199cab1
GM
22585fi
22586rm -f core conftest.err conftest.$ac_objext \
22587 conftest$ac_exeext conftest.$ac_ext
3e0be4ab 22588fi
5476a9a4
GM
22589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sig_pselect" >&5
22590$as_echo "$gl_cv_sig_pselect" >&6; }
b6c9d18d
GM
22591
22592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pselect detects invalid fds" >&5
22593$as_echo_n "checking whether pselect detects invalid fds... " >&6; }
22594if test "${gl_cv_func_pselect_detects_ebadf+set}" = set; then :
22595 $as_echo_n "(cached) " >&6
22596else
22597
22598 if test "$cross_compiling" = yes; then :
22599
22600 case "$host_os" in
22601 # Guess yes on glibc systems.
22602 *-gnu*) gl_cv_func_pselect_detects_ebadf="guessing yes" ;;
22603 # If we don't know, assume the worst.
22604 *) gl_cv_func_pselect_detects_ebadf="guessing no" ;;
22605 esac
22606
22607else
22608 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22609/* end confdefs.h. */
22610
22611#include <sys/types.h>
22612#include <sys/time.h>
22613#if HAVE_SYS_SELECT_H
22614# include <sys/select.h>
22615#endif
22616#include <unistd.h>
22617#include <errno.h>
22618
22619int
22620main ()
22621{
22622
22623 fd_set set;
22624 dup2(0, 16);
22625 FD_ZERO(&set);
22626 FD_SET(16, &set);
22627 close(16);
22628 struct timespec timeout;
22629 timeout.tv_sec = 0;
22630 timeout.tv_nsec = 5000;
22631 return pselect (17, &set, NULL, NULL, &timeout, NULL) != -1 || errno != EBADF;
22632
22633 ;
22634 return 0;
22635}
22636_ACEOF
22637if ac_fn_c_try_run "$LINENO"; then :
22638 gl_cv_func_pselect_detects_ebadf=yes
22639else
22640 gl_cv_func_pselect_detects_ebadf=no
22641fi
22642rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22643 conftest.$ac_objext conftest.beam conftest.$ac_ext
22644fi
22645
22646
22647fi
22648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pselect_detects_ebadf" >&5
22649$as_echo "$gl_cv_func_pselect_detects_ebadf" >&6; }
22650 case $gl_cv_func_pselect_detects_ebadf in
22651 *yes) ;;
22652 *) REPLACE_PSELECT=1 ;;
22653 esac
5476a9a4 22654 fi
3e0be4ab 22655
5476a9a4
GM
22656 if test $ac_cv_func_pselect = no || test $gl_cv_sig_pselect = no; then
22657 REPLACE_PSELECT=1
22658 fi
3e0be4ab 22659
a6342fc8 22660 if test $HAVE_PSELECT = 0 || test $REPLACE_PSELECT = 1; then
3e0be4ab
GM
22661
22662
3e0be4ab 22663
3e0be4ab 22664
3e0be4ab 22665
3e0be4ab 22666
3e0be4ab 22667
3e0be4ab 22668
5476a9a4 22669 gl_LIBOBJS="$gl_LIBOBJS pselect.$ac_objext"
3e0be4ab 22670
a6342fc8 22671 fi
3e0be4ab
GM
22672
22673
f199cab1 22674
f199cab1 22675
f199cab1 22676
5476a9a4 22677 GNULIB_PSELECT=1
f199cab1 22678
6d153f56 22679
f199cab1 22680
3e0be4ab 22681
3e0be4ab
GM
22682
22683
f199cab1 22684
0eb775a3
GM
22685
22686
5476a9a4 22687 LIB_PTHREAD_SIGMASK=
0eb775a3 22688
f199cab1 22689
f077f61d
GM
22690
22691
22692 if test "$gl_threads_api" = posix; then
22693 if test $ac_cv_func_pthread_sigmask = yes; then
22694 :
22695 else
22696 if test -n "$LIBMULTITHREAD"; then
22697 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_sigmask in $LIBMULTITHREAD" >&5
22698$as_echo_n "checking for pthread_sigmask in $LIBMULTITHREAD... " >&6; }
22699if test "${gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD+set}" = set; then :
22700 $as_echo_n "(cached) " >&6
22701else
22702 gl_save_LIBS="$LIBS"
22703 LIBS="$LIBS $LIBMULTITHREAD"
22704 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22705/* end confdefs.h. */
22706#include <pthread.h>
22707 #include <signal.h>
22708
22709int
22710main ()
22711{
22712return pthread_sigmask (0, (sigset_t *) 0, (sigset_t *) 0);
22713 ;
22714 return 0;
22715}
22716
22717_ACEOF
22718if ac_fn_c_try_link "$LINENO"; then :
22719 gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD=yes
22720else
22721 gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD=no
22722fi
22723rm -f core conftest.err conftest.$ac_objext \
22724 conftest$ac_exeext conftest.$ac_ext
22725 LIBS="$gl_save_LIBS"
22726
22727fi
22728{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD" >&5
22729$as_echo "$gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD" >&6; }
22730 if test $gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD = yes; then
22731 LIB_PTHREAD_SIGMASK="$LIBMULTITHREAD"
22732 else
22733 HAVE_PTHREAD_SIGMASK=0
22734 fi
22735 else
22736 HAVE_PTHREAD_SIGMASK=0
22737 fi
22738 fi
5476a9a4 22739 else
f077f61d
GM
22740 if test $ac_cv_func_pthread_sigmask = yes; then
22741 REPLACE_PTHREAD_SIGMASK=1
22742 else
22743 HAVE_PTHREAD_SIGMASK=0
22744 fi
5476a9a4 22745 fi
6d153f56 22746
52724a05 22747
6d153f56
GM
22748
22749
5476a9a4
GM
22750 if test $HAVE_PTHREAD_SIGMASK = 1; then
22751
22752
22753 if test -z "$LIB_PTHREAD_SIGMASK"; then
22754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask works without -lpthread" >&5
22755$as_echo_n "checking whether pthread_sigmask works without -lpthread... " >&6; }
22756if test "${gl_cv_func_pthread_sigmask_in_libc_works+set}" = set; then :
f199cab1
GM
22757 $as_echo_n "(cached) " >&6
22758else
5476a9a4
GM
22759
22760 if test "$cross_compiling" = yes; then :
22761
22762 case "$host_os" in
22763 freebsd* | hpux* | solaris | solaris2.[2-9]*)
22764 gl_cv_func_pthread_sigmask_in_libc_works="guessing no";;
22765 *)
22766 gl_cv_func_pthread_sigmask_in_libc_works="guessing yes";;
22767 esac
22768
22769else
22770 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 22771/* end confdefs.h. */
6d153f56 22772
5476a9a4
GM
22773#include <pthread.h>
22774#include <signal.h>
22775#include <stddef.h>
22776int main ()
f199cab1 22777{
5476a9a4
GM
22778 sigset_t set;
22779 sigemptyset (&set);
22780 return pthread_sigmask (1729, &set, NULL) != 0;
f199cab1
GM
22781}
22782_ACEOF
5476a9a4
GM
22783if ac_fn_c_try_run "$LINENO"; then :
22784 gl_cv_func_pthread_sigmask_in_libc_works=no
f199cab1 22785else
5476a9a4 22786 gl_cv_func_pthread_sigmask_in_libc_works=yes
f199cab1 22787fi
5476a9a4
GM
22788rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22789 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1 22790fi
5476a9a4
GM
22791
22792
f199cab1 22793fi
5476a9a4
GM
22794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_in_libc_works" >&5
22795$as_echo "$gl_cv_func_pthread_sigmask_in_libc_works" >&6; }
22796 case "$gl_cv_func_pthread_sigmask_in_libc_works" in
22797 *no)
22798 REPLACE_PTHREAD_SIGMASK=1
cc322c06 22799
5476a9a4 22800$as_echo "#define PTHREAD_SIGMASK_INEFFECTIVE 1" >>confdefs.h
cc322c06 22801
5476a9a4
GM
22802 ;;
22803 esac
22804 fi
3e0be4ab 22805
5476a9a4
GM
22806 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask returns error numbers" >&5
22807$as_echo_n "checking whether pthread_sigmask returns error numbers... " >&6; }
22808if test "${gl_cv_func_pthread_sigmask_return_works+set}" = set; then :
3e0be4ab
GM
22809 $as_echo_n "(cached) " >&6
22810else
5476a9a4
GM
22811
22812 gl_save_LIBS="$LIBS"
22813 LIBS="$LIBS $LIB_PTHREAD_SIGMASK"
22814 if test "$cross_compiling" = yes; then :
22815 case "$host_os" in
22816 cygwin*)
22817 gl_cv_func_pthread_sigmask_return_works="guessing no";;
22818 *)
22819 gl_cv_func_pthread_sigmask_return_works="guessing yes";;
22820 esac
22821
22822else
22823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3e0be4ab 22824/* end confdefs.h. */
f199cab1 22825
5476a9a4
GM
22826#include <pthread.h>
22827#include <signal.h>
22828#include <stddef.h>
22829int main ()
3e0be4ab 22830{
5476a9a4
GM
22831 sigset_t set;
22832 sigemptyset (&set);
22833 if (pthread_sigmask (1729, &set, NULL) == -1)
22834 return 1;
3e0be4ab
GM
22835 return 0;
22836}
6d153f56 22837_ACEOF
5476a9a4
GM
22838if ac_fn_c_try_run "$LINENO"; then :
22839 gl_cv_func_pthread_sigmask_return_works=yes
3e0be4ab 22840else
5476a9a4 22841 gl_cv_func_pthread_sigmask_return_works=no
6d153f56 22842fi
5476a9a4
GM
22843rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22844 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1 22845fi
5476a9a4
GM
22846
22847 LIBS="$gl_save_LIBS"
22848
52724a05 22849fi
5476a9a4
GM
22850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_return_works" >&5
22851$as_echo "$gl_cv_func_pthread_sigmask_return_works" >&6; }
22852 case "$gl_cv_func_pthread_sigmask_return_works" in
22853 *no)
22854 REPLACE_PTHREAD_SIGMASK=1
6d153f56 22855
5476a9a4 22856$as_echo "#define PTHREAD_SIGMASK_FAILS_WITH_ERRNO 1" >>confdefs.h
6d153f56 22857
5476a9a4
GM
22858 ;;
22859 esac
cc322c06 22860
5476a9a4
GM
22861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask unblocks signals correctly" >&5
22862$as_echo_n "checking whether pthread_sigmask unblocks signals correctly... " >&6; }
22863if test "${gl_cv_func_pthread_sigmask_unblock_works+set}" = set; then :
f199cab1
GM
22864 $as_echo_n "(cached) " >&6
22865else
5476a9a4
GM
22866
22867 case "$host_os" in
22868 irix*)
22869 gl_cv_func_pthread_sigmask_unblock_works="guessing no";;
22870 *)
22871 gl_cv_func_pthread_sigmask_unblock_works="guessing yes";;
22872 esac
22873 gl_save_LIBS="$LIBS"
22874 LIBS="$LIBS $LIBMULTITHREAD"
22875 if test "$cross_compiling" = yes; then :
22876 :
f199cab1 22877else
5476a9a4
GM
22878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22879/* end confdefs.h. */
6d153f56 22880
5476a9a4
GM
22881#include <pthread.h>
22882#include <signal.h>
22883#include <stdio.h>
22884#include <stdlib.h>
22885#include <unistd.h>
22886static volatile int sigint_occurred;
22887static void
22888sigint_handler (int sig)
22889{
22890 sigint_occurred++;
22891}
22892int main ()
22893{
22894 sigset_t set;
22895 int pid = getpid ();
22896 char command[80];
22897 signal (SIGINT, sigint_handler);
22898 sigemptyset (&set);
22899 sigaddset (&set, SIGINT);
22900 if (!(pthread_sigmask (SIG_BLOCK, &set, NULL) == 0))
22901 return 1;
22902 sprintf (command, "sh -c 'sleep 1; kill -%d %d' &", SIGINT, pid);
22903 if (!(system (command) == 0))
22904 return 2;
22905 sleep (2);
22906 if (!(sigint_occurred == 0))
22907 return 3;
22908 if (!(pthread_sigmask (SIG_UNBLOCK, &set, NULL) == 0))
22909 return 4;
22910 if (!(sigint_occurred == 1)) /* This fails on IRIX. */
22911 return 5;
22912 return 0;
22913}
22914_ACEOF
22915if ac_fn_c_try_run "$LINENO"; then :
22916 :
22917else
22918 gl_cv_func_pthread_sigmask_unblock_works=no
f199cab1 22919fi
5476a9a4
GM
22920rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22921 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1 22922fi
5476a9a4
GM
22923
22924 LIBS="$gl_save_LIBS"
22925
f199cab1 22926fi
5476a9a4
GM
22927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_unblock_works" >&5
22928$as_echo "$gl_cv_func_pthread_sigmask_unblock_works" >&6; }
22929 case "$gl_cv_func_pthread_sigmask_unblock_works" in
22930 *no)
22931 REPLACE_PTHREAD_SIGMASK=1
6d153f56 22932
5476a9a4 22933$as_echo "#define PTHREAD_SIGMASK_UNBLOCK_BUG 1" >>confdefs.h
6d153f56 22934
5476a9a4
GM
22935 ;;
22936 esac
6d153f56 22937 fi
6d153f56 22938
a6342fc8 22939 if test $HAVE_PTHREAD_SIGMASK = 0 || test $REPLACE_PTHREAD_SIGMASK = 1; then
a451f14b 22940
a451f14b 22941
743c80a7
PE
22942
22943
22944
22945
22946
f199cab1 22947
5476a9a4 22948 gl_LIBOBJS="$gl_LIBOBJS pthread_sigmask.$ac_objext"
743c80a7
PE
22949
22950
5476a9a4 22951 if test $HAVE_PTHREAD_SIGMASK = 1; then
743c80a7 22952
5476a9a4 22953$as_echo "#define HAVE_PTHREAD_SIGMASK 1" >>confdefs.h
743c80a7 22954
5476a9a4 22955 fi
743c80a7 22956
a6342fc8 22957 fi
938a4ef9 22958
938a4ef9 22959
938a4ef9 22960
938a4ef9 22961
938a4ef9 22962
5476a9a4 22963 GNULIB_PTHREAD_SIGMASK=1
a451f14b 22964
a451f14b 22965
743c80a7
PE
22966
22967
22968
22969
22970
b5591ebb
GM
22971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for putenv compatible with GNU and SVID" >&5
22972$as_echo_n "checking for putenv compatible with GNU and SVID... " >&6; }
22973if test "${gl_cv_func_svid_putenv+set}" = set; then :
22974 $as_echo_n "(cached) " >&6
22975else
22976 if test "$cross_compiling" = yes; then :
22977 case "$host_os" in
22978 # Guess yes on glibc systems.
22979 *-gnu*) gl_cv_func_svid_putenv="guessing yes" ;;
22980 # If we don't know, assume the worst.
22981 *) gl_cv_func_svid_putenv="guessing no" ;;
22982 esac
22983
22984else
22985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22986/* end confdefs.h. */
22987$ac_includes_default
22988int
22989main ()
22990{
22991
22992 /* Put it in env. */
22993 if (putenv ("CONFTEST_putenv=val"))
22994 return 1;
22995
22996 /* Try to remove it. */
22997 if (putenv ("CONFTEST_putenv"))
22998 return 2;
22999
23000 /* Make sure it was deleted. */
23001 if (getenv ("CONFTEST_putenv") != 0)
23002 return 3;
23003
23004 return 0;
23005
23006 ;
23007 return 0;
23008}
23009_ACEOF
23010if ac_fn_c_try_run "$LINENO"; then :
23011 gl_cv_func_svid_putenv=yes
23012else
23013 gl_cv_func_svid_putenv=no
23014fi
23015rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23016 conftest.$ac_objext conftest.beam conftest.$ac_ext
23017fi
23018
23019
23020fi
23021{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_svid_putenv" >&5
23022$as_echo "$gl_cv_func_svid_putenv" >&6; }
23023 case "$gl_cv_func_svid_putenv" in
23024 *yes) ;;
23025 *)
23026 REPLACE_PUTENV=1
23027 ;;
23028 esac
23029
23030 if test $REPLACE_PUTENV = 1; then
23031
23032
23033
23034
23035
23036
23037
23038
23039 gl_LIBOBJS="$gl_LIBOBJS putenv.$ac_objext"
23040
23041 fi
23042
23043
23044
23045
23046
23047 GNULIB_PUTENV=1
23048
23049
23050
23051
23052
23053
23054
743c80a7 23055
5476a9a4
GM
23056 if test $ac_cv_func_readlink = no; then
23057 HAVE_READLINK=0
23058 else
23059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
23060$as_echo_n "checking whether readlink signature is correct... " >&6; }
23061if test "${gl_cv_decl_readlink_works+set}" = set; then :
3e0be4ab
GM
23062 $as_echo_n "(cached) " >&6
23063else
f199cab1 23064 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3e0be4ab 23065/* end confdefs.h. */
5476a9a4
GM
23066#include <unistd.h>
23067 /* Cause compilation failure if original declaration has wrong type. */
23068 ssize_t readlink (const char *, char *, size_t);
f199cab1
GM
23069int
23070main ()
23071{
5476a9a4 23072
f199cab1
GM
23073 ;
23074 return 0;
23075}
3e0be4ab 23076_ACEOF
5476a9a4
GM
23077if ac_fn_c_try_compile "$LINENO"; then :
23078 gl_cv_decl_readlink_works=yes
23079else
23080 gl_cv_decl_readlink_works=no
3e0be4ab 23081fi
5476a9a4
GM
23082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23083fi
23084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5
23085$as_echo "$gl_cv_decl_readlink_works" >&6; }
23086 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
23087$as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; }
23088if test "${gl_cv_func_readlink_works+set}" = set; then :
23089 $as_echo_n "(cached) " >&6
23090else
23091 # We have readlink, so assume ln -s works.
23092 ln -s conftest.no-such conftest.link
23093 ln -s conftest.link conftest.lnk2
23094 if test "$cross_compiling" = yes; then :
23095 case "$host_os" in
23096 # Guess yes on glibc systems.
23097 *-gnu*) gl_cv_func_readlink_works="guessing yes" ;;
23098 # If we don't know, assume the worst.
23099 *) gl_cv_func_readlink_works="guessing no" ;;
23100 esac
23101
23102else
f199cab1 23103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 23104/* end confdefs.h. */
5476a9a4
GM
23105#include <unistd.h>
23106
f199cab1
GM
23107int
23108main ()
23109{
5476a9a4
GM
23110char buf[20];
23111 return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;
f199cab1
GM
23112 ;
23113 return 0;
23114}
067d23c9 23115_ACEOF
5476a9a4
GM
23116if ac_fn_c_try_run "$LINENO"; then :
23117 gl_cv_func_readlink_works=yes
23118else
23119 gl_cv_func_readlink_works=no
067d23c9 23120fi
5476a9a4
GM
23121rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23122 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1 23123fi
067d23c9 23124
5476a9a4 23125 rm -f conftest.link conftest.lnk2
f199cab1 23126fi
5476a9a4
GM
23127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_works" >&5
23128$as_echo "$gl_cv_func_readlink_works" >&6; }
23129 case "$gl_cv_func_readlink_works" in
23130 *yes)
23131 if test "$gl_cv_decl_readlink_works" != yes; then
23132 REPLACE_READLINK=1
23133 fi
23134 ;;
23135 *)
067d23c9 23136
5476a9a4 23137$as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
067d23c9 23138
5476a9a4
GM
23139 REPLACE_READLINK=1
23140 ;;
23141 esac
23142 fi
3e0be4ab 23143
a6342fc8 23144 if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
3e0be4ab
GM
23145
23146
23147
23148
3e0be4ab
GM
23149
23150
5476a9a4
GM
23151
23152
23153 gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext"
23154
23155
23156 :
3e0be4ab 23157
a6342fc8 23158 fi
3e0be4ab 23159
067d23c9 23160
067d23c9 23161
067d23c9 23162
067d23c9 23163
5476a9a4 23164 GNULIB_READLINK=1
067d23c9 23165
067d23c9 23166
067d23c9 23167
067d23c9
KY
23168
23169
067d23c9 23170
d7ad186c
GM
23171
23172
23173
23174 if test $ac_cv_func_readlinkat = no; then
23175 HAVE_READLINKAT=0
23176 fi
23177
23178 if test $HAVE_READLINKAT = 0; then
23179
23180
23181
23182
23183
23184
23185
23186
23187 gl_LIBOBJS="$gl_LIBOBJS readlinkat.$ac_objext"
23188
23189 fi
23190
23191
23192
23193
23194
23195 GNULIB_READLINKAT=1
23196
23197
23198
23199
23200
23201
e4184a20
GM
23202 for ac_func in sig2str
23203do :
23204 ac_fn_c_check_func "$LINENO" "sig2str" "ac_cv_func_sig2str"
23205if test "x$ac_cv_func_sig2str" = x""yes; then :
23206 cat >>confdefs.h <<_ACEOF
23207#define HAVE_SIG2STR 1
23208_ACEOF
23209
23210fi
23211done
23212
23213
23214 if test $ac_cv_func_sig2str = no; then
23215
23216
23217
23218
23219
23220
23221
23222
23223 gl_LIBOBJS="$gl_LIBOBJS sig2str.$ac_objext"
23224
23225
23226 :
23227
23228 fi
23229
369e19fc 23230
067d23c9 23231
5476a9a4
GM
23232
23233
23234
23235
23236
23237
23238
23239
23240 if test $gl_cv_have_include_next = yes; then
23241 gl_cv_next_signal_h='<'signal.h'>'
23242 else
23243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
23244$as_echo_n "checking absolute name of <signal.h>... " >&6; }
23245if test "${gl_cv_next_signal_h+set}" = set; then :
0eb775a3 23246 $as_echo_n "(cached) " >&6
0eb775a3 23247else
5476a9a4
GM
23248
23249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0eb775a3 23250/* end confdefs.h. */
5476a9a4 23251#include <signal.h>
f199cab1 23252
0eb775a3 23253_ACEOF
5476a9a4
GM
23254 case "$host_os" in
23255 aix*) gl_absname_cpp="$ac_cpp -C" ;;
23256 *) gl_absname_cpp="$ac_cpp" ;;
23257 esac
0eb775a3 23258
5476a9a4
GM
23259 case "$host_os" in
23260 mingw*)
23261 gl_dirsep_regex='[/\\]'
23262 ;;
23263 *)
23264 gl_dirsep_regex='\/'
23265 ;;
23266 esac
23267 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
0eb775a3 23268
5476a9a4
GM
23269 gl_header_literal_regex=`echo 'signal.h' \
23270 | sed -e "$gl_make_literal_regex_sed"`
23271 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23272 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23273 s|^/[^/]|//&|
23274 p
23275 q
23276 }'
23277 gl_cv_next_signal_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23278 sed -n "$gl_absolute_header_sed"`'"'
0eb775a3 23279
f199cab1 23280
5476a9a4
GM
23281fi
23282{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
23283$as_echo "$gl_cv_next_signal_h" >&6; }
23284 fi
23285 NEXT_SIGNAL_H=$gl_cv_next_signal_h
067d23c9 23286
5476a9a4
GM
23287 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23288 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23289 gl_next_as_first_directive='<'signal.h'>'
23290 else
23291 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23292 gl_next_as_first_directive=$gl_cv_next_signal_h
23293 fi
23294 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
067d23c9 23295
067d23c9
KY
23296
23297
067d23c9 23298
067d23c9 23299
5476a9a4
GM
23300# AIX declares sig_atomic_t to already include volatile, and C89 compilers
23301# then choke on 'volatile sig_atomic_t'. C99 requires that it compile.
23302 ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
23303#include <signal.h>
23304
23305"
23306if test "x$ac_cv_type_volatile_sig_atomic_t" = x""yes; then :
23307
23308else
23309 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
f199cab1 23310fi
067d23c9 23311
067d23c9 23312
067d23c9 23313
067d23c9 23314
938a4ef9 23315
938a4ef9 23316
5476a9a4
GM
23317
23318 ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
23319#include <signal.h>
23320
23321"
23322if test "x$ac_cv_type_sighandler_t" = x""yes; then :
23323
23324else
23325 HAVE_SIGHANDLER_T=0
23326fi
23327
23328
23329
23330
a6342fc8 23331 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
5476a9a4
GM
23332/* <sys/types.h> is not needed according to POSIX, but the
23333 <sys/socket.h> in i386-unknown-freebsd4.10 and
23334 powerpc-apple-darwin5.5 required it. */
23335#include <sys/types.h>
23336#if HAVE_SYS_SOCKET_H
23337# include <sys/socket.h>
23338#elif HAVE_WS2TCPIP_H
23339# include <ws2tcpip.h>
23340#endif
23341
23342"
23343if test "x$ac_cv_type_socklen_t" = x""yes; then :
23344
067d23c9 23345else
5476a9a4
GM
23346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5
23347$as_echo_n "checking for socklen_t equivalent... " >&6; }
23348 if test "${gl_cv_socklen_t_equiv+set}" = set; then :
23349 $as_echo_n "(cached) " >&6
23350else
23351 # Systems have either "struct sockaddr *" or
23352 # "void *" as the second argument to getpeername
23353 gl_cv_socklen_t_equiv=
23354 for arg2 in "struct sockaddr" void; do
23355 for t in int size_t "unsigned int" "long int" "unsigned long int"; do
23356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 23357/* end confdefs.h. */
5476a9a4
GM
23358#include <sys/types.h>
23359 #include <sys/socket.h>
23360
23361 int getpeername (int, $arg2 *, $t *);
f199cab1
GM
23362int
23363main ()
23364{
5476a9a4
GM
23365$t len;
23366 getpeername (0, 0, &len);
f199cab1
GM
23367 ;
23368 return 0;
23369}
3e0be4ab 23370_ACEOF
5476a9a4
GM
23371if ac_fn_c_try_compile "$LINENO"; then :
23372 gl_cv_socklen_t_equiv="$t"
067d23c9 23373fi
5476a9a4
GM
23374rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23375 test "$gl_cv_socklen_t_equiv" != "" && break
23376 done
23377 test "$gl_cv_socklen_t_equiv" != "" && break
23378 done
067d23c9 23379
5476a9a4 23380fi
067d23c9 23381
5476a9a4
GM
23382 if test "$gl_cv_socklen_t_equiv" = ""; then
23383 as_fn_error "Cannot find a type to use in place of socklen_t" "$LINENO" 5
23384 fi
23385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socklen_t_equiv" >&5
23386$as_echo "$gl_cv_socklen_t_equiv" >&6; }
23387
23388cat >>confdefs.h <<_ACEOF
23389#define socklen_t $gl_cv_socklen_t_equiv
23390_ACEOF
067d23c9 23391
f199cab1 23392fi
3e0be4ab 23393
3e0be4ab 23394
5476a9a4
GM
23395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
23396$as_echo_n "checking for ssize_t... " >&6; }
23397if test "${gt_cv_ssize_t+set}" = set; then :
f199cab1
GM
23398 $as_echo_n "(cached) " >&6
23399else
5476a9a4 23400 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 23401/* end confdefs.h. */
5476a9a4 23402#include <sys/types.h>
f199cab1
GM
23403int
23404main ()
23405{
5476a9a4
GM
23406int x = sizeof (ssize_t *) + sizeof (ssize_t);
23407 return !x;
f199cab1
GM
23408 ;
23409 return 0;
23410}
23411_ACEOF
5476a9a4
GM
23412if ac_fn_c_try_compile "$LINENO"; then :
23413 gt_cv_ssize_t=yes
067d23c9 23414else
5476a9a4 23415 gt_cv_ssize_t=no
f199cab1 23416fi
5476a9a4 23417rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
067d23c9 23418fi
5476a9a4
GM
23419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
23420$as_echo "$gt_cv_ssize_t" >&6; }
23421 if test $gt_cv_ssize_t = no; then
23422
23423$as_echo "#define ssize_t int" >>confdefs.h
23424
23425 fi
23426
23427
23428
23429
23430
5476a9a4
GM
23431 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>
23432 #include <sys/stat.h>
23433"
23434if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = x""yes; then :
23435
23436cat >>confdefs.h <<_ACEOF
23437#define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1
23438_ACEOF
23439
23440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5
23441$as_echo_n "checking whether struct stat.st_atim is of type struct timespec... " >&6; }
23442if test "${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+set}" = set; then :
f199cab1
GM
23443 $as_echo_n "(cached) " >&6
23444else
5476a9a4 23445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 23446/* end confdefs.h. */
3e0be4ab 23447
5476a9a4
GM
23448 #include <sys/types.h>
23449 #include <sys/stat.h>
23450 #if HAVE_SYS_TIME_H
23451 # include <sys/time.h>
23452 #endif
23453 #include <time.h>
23454 struct timespec ts;
23455 struct stat st;
23456
f199cab1
GM
23457int
23458main ()
23459{
5476a9a4
GM
23460
23461 st.st_atim = ts;
23462
f199cab1
GM
23463 ;
23464 return 0;
23465}
3e0be4ab 23466_ACEOF
5476a9a4
GM
23467if ac_fn_c_try_compile "$LINENO"; then :
23468 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes
f199cab1 23469else
5476a9a4 23470 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no
f199cab1 23471fi
5476a9a4 23472rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
067d23c9 23473fi
5476a9a4
GM
23474{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5
23475$as_echo "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; }
23476 if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
067d23c9 23477
5476a9a4 23478$as_echo "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h
067d23c9 23479
5476a9a4
GM
23480 fi
23481else
23482 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>
23483 #include <sys/stat.h>
23484"
23485if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = x""yes; then :
067d23c9 23486
5476a9a4
GM
23487cat >>confdefs.h <<_ACEOF
23488#define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1
23489_ACEOF
3e0be4ab 23490
0eb775a3 23491
3e0be4ab 23492else
5476a9a4
GM
23493 ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h>
23494 #include <sys/stat.h>
23495"
23496if test "x$ac_cv_member_struct_stat_st_atimensec" = x""yes; then :
23497
23498cat >>confdefs.h <<_ACEOF
23499#define HAVE_STRUCT_STAT_ST_ATIMENSEC 1
067d23c9 23500_ACEOF
5476a9a4
GM
23501
23502
067d23c9 23503else
5476a9a4
GM
23504 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>
23505 #include <sys/stat.h>
23506"
23507if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = x""yes; then :
23508
23509cat >>confdefs.h <<_ACEOF
23510#define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1
23511_ACEOF
23512
23513
3e0be4ab 23514fi
5476a9a4 23515
067d23c9 23516fi
5476a9a4 23517
067d23c9 23518fi
067d23c9
KY
23519
23520fi
23521
067d23c9 23522
067d23c9 23523
067d23c9 23524
067d23c9 23525
5476a9a4
GM
23526 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>
23527 #include <sys/stat.h>
23528"
23529if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = x""yes; then :
23530
23531cat >>confdefs.h <<_ACEOF
23532#define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1
23533_ACEOF
067d23c9
KY
23534
23535
f199cab1 23536else
5476a9a4
GM
23537 ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include <sys/types.h>
23538 #include <sys/stat.h>
23539"
23540if test "x$ac_cv_member_struct_stat_st_birthtimensec" = x""yes; then :
067d23c9 23541
5476a9a4
GM
23542cat >>confdefs.h <<_ACEOF
23543#define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1
23544_ACEOF
067d23c9 23545
3e0be4ab 23546
067d23c9 23547else
5476a9a4
GM
23548 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>
23549 #include <sys/stat.h>
23550"
23551if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = x""yes; then :
067d23c9 23552
5476a9a4
GM
23553cat >>confdefs.h <<_ACEOF
23554#define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1
067d23c9 23555_ACEOF
5476a9a4
GM
23556
23557
f199cab1 23558fi
5476a9a4 23559
f199cab1 23560fi
5476a9a4 23561
067d23c9 23562fi
0eb775a3 23563
0eb775a3 23564
0eb775a3 23565
5476a9a4
GM
23566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working stdalign.h" >&5
23567$as_echo_n "checking for working stdalign.h... " >&6; }
23568if test "${gl_cv_header_working_stdalign_h+set}" = set; then :
f199cab1 23569 $as_echo_n "(cached) " >&6
067d23c9 23570else
5476a9a4 23571 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 23572/* end confdefs.h. */
5476a9a4
GM
23573#include <stdalign.h>
23574 #include <stddef.h>
23575
23576 /* Test that alignof yields a result consistent with offsetof.
23577 This catches GCC bug 52023
23578 <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. */
23579 #ifdef __cplusplus
23580 template <class t> struct alignof_helper { char a; t b; };
23581 # define ao(type) offsetof (alignof_helper<type>, b)
23582 #else
23583 # define ao(type) offsetof (struct { char a; type b; }, b)
23584 #endif
23585 char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1];
23586 char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1];
23587 char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1];
23588
23589 /* Test _Alignas only on platforms where gnulib can help. */
23590 #if \
23591 (__GNUC__ || __IBMC__ || __IBMCPP__ \
23592 || 0x5110 <= __SUNPRO_C || 1300 <= _MSC_VER)
23593 int alignas (8) alignas_int = 1;
23594 char test_alignas[_Alignof (alignas_int) == 8 ? 1 : -1];
23595 #endif
067d23c9 23596
f199cab1
GM
23597int
23598main ()
23599{
5476a9a4 23600
f199cab1
GM
23601 ;
23602 return 0;
23603}
23604_ACEOF
5476a9a4
GM
23605if ac_fn_c_try_compile "$LINENO"; then :
23606 gl_cv_header_working_stdalign_h=yes
f199cab1 23607else
5476a9a4 23608 gl_cv_header_working_stdalign_h=no
f199cab1 23609fi
5476a9a4 23610rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
067d23c9 23611fi
5476a9a4
GM
23612{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdalign_h" >&5
23613$as_echo "$gl_cv_header_working_stdalign_h" >&6; }
067d23c9 23614
5476a9a4
GM
23615 if test $gl_cv_header_working_stdalign_h = yes; then
23616 STDALIGN_H=''
23617 else
23618 STDALIGN_H='stdalign.h'
f199cab1 23619 fi
0eb775a3 23620
5476a9a4
GM
23621
23622 if test -n "$STDALIGN_H"; then
23623 GL_GENERATE_STDALIGN_H_TRUE=
23624 GL_GENERATE_STDALIGN_H_FALSE='#'
f199cab1 23625else
5476a9a4
GM
23626 GL_GENERATE_STDALIGN_H_TRUE='#'
23627 GL_GENERATE_STDALIGN_H_FALSE=
0eb775a3 23628fi
0eb775a3
GM
23629
23630
23631
5476a9a4
GM
23632 STDARG_H=''
23633 NEXT_STDARG_H='<stdarg.h>'
23634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5
23635$as_echo_n "checking for va_copy... " >&6; }
23636 if test "${gl_cv_func_va_copy+set}" = set; then :
f199cab1 23637 $as_echo_n "(cached) " >&6
5476a9a4
GM
23638else
23639
23640 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23641/* end confdefs.h. */
23642#include <stdarg.h>
f199cab1
GM
23643int
23644main ()
23645{
5476a9a4
GM
23646
23647#ifndef va_copy
23648void (*func) (va_list, va_list) = va_copy;
23649#endif
23650
f199cab1
GM
23651 ;
23652 return 0;
23653}
23654_ACEOF
5476a9a4
GM
23655if ac_fn_c_try_compile "$LINENO"; then :
23656 gl_cv_func_va_copy=yes
f199cab1 23657else
5476a9a4 23658 gl_cv_func_va_copy=no
f199cab1 23659fi
5476a9a4 23660rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 23661fi
5476a9a4
GM
23662
23663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_va_copy" >&5
23664$as_echo "$gl_cv_func_va_copy" >&6; }
23665 if test $gl_cv_func_va_copy = no; then
23666 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23667/* end confdefs.h. */
23668#if defined _AIX && !defined __GNUC__
23669 AIX vaccine
23670 #endif
23671
23672_ACEOF
23673if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23674 $EGREP "vaccine" >/dev/null 2>&1; then :
23675 gl_aixcc=yes
f199cab1 23676else
5476a9a4 23677 gl_aixcc=no
f199cab1 23678fi
5476a9a4 23679rm -f conftest*
0eb775a3 23680
5476a9a4
GM
23681 if test $gl_aixcc = yes; then
23682 STDARG_H=stdarg.h
0eb775a3
GM
23683
23684
5476a9a4
GM
23685
23686
23687
23688
23689
23690
23691 if test $gl_cv_have_include_next = yes; then
23692 gl_cv_next_stdarg_h='<'stdarg.h'>'
23693 else
23694 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdarg.h>" >&5
23695$as_echo_n "checking absolute name of <stdarg.h>... " >&6; }
23696if test "${gl_cv_next_stdarg_h+set}" = set; then :
f199cab1
GM
23697 $as_echo_n "(cached) " >&6
23698else
5476a9a4
GM
23699
23700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 23701/* end confdefs.h. */
5476a9a4 23702#include <stdarg.h>
0eb775a3 23703
f199cab1 23704_ACEOF
5476a9a4
GM
23705 case "$host_os" in
23706 aix*) gl_absname_cpp="$ac_cpp -C" ;;
23707 *) gl_absname_cpp="$ac_cpp" ;;
23708 esac
23709
23710 case "$host_os" in
23711 mingw*)
23712 gl_dirsep_regex='[/\\]'
23713 ;;
23714 *)
23715 gl_dirsep_regex='\/'
23716 ;;
23717 esac
23718 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23719
23720 gl_header_literal_regex=`echo 'stdarg.h' \
23721 | sed -e "$gl_make_literal_regex_sed"`
23722 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23723 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23724 s|^/[^/]|//&|
23725 p
23726 q
23727 }'
23728 gl_cv_next_stdarg_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23729 sed -n "$gl_absolute_header_sed"`'"'
23730
23731
f199cab1 23732fi
5476a9a4
GM
23733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdarg_h" >&5
23734$as_echo "$gl_cv_next_stdarg_h" >&6; }
23735 fi
23736 NEXT_STDARG_H=$gl_cv_next_stdarg_h
23737
23738 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23739 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23740 gl_next_as_first_directive='<'stdarg.h'>'
23741 else
23742 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23743 gl_next_as_first_directive=$gl_cv_next_stdarg_h
23744 fi
23745 NEXT_AS_FIRST_DIRECTIVE_STDARG_H=$gl_next_as_first_directive
0eb775a3
GM
23746
23747
23748
5476a9a4
GM
23749
23750 if test "$gl_cv_next_stdarg_h" = '""'; then
23751 gl_cv_next_stdarg_h='"///usr/include/stdarg.h"'
23752 NEXT_STDARG_H="$gl_cv_next_stdarg_h"
23753 fi
f199cab1 23754 else
5476a9a4
GM
23755
23756 saved_as_echo_n="$as_echo_n"
23757 as_echo_n=':'
23758 if test "${gl_cv_func___va_copy+set}" = set; then :
f199cab1
GM
23759 $as_echo_n "(cached) " >&6
23760else
0eb775a3 23761
5476a9a4
GM
23762 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23763/* end confdefs.h. */
23764#include <stdarg.h>
f199cab1
GM
23765int
23766main ()
23767{
5476a9a4
GM
23768
23769#ifndef __va_copy
23770error, bail out
23771#endif
23772
f199cab1
GM
23773 ;
23774 return 0;
23775}
23776_ACEOF
5476a9a4
GM
23777if ac_fn_c_try_compile "$LINENO"; then :
23778 gl_cv_func___va_copy=yes
f199cab1 23779else
5476a9a4 23780 gl_cv_func___va_copy=no
f199cab1 23781fi
5476a9a4 23782rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 23783fi
0eb775a3 23784
5476a9a4
GM
23785 as_echo_n="$saved_as_echo_n"
23786
23787 if test $gl_cv_func___va_copy = yes; then
23788
23789$as_echo "#define va_copy __va_copy" >>confdefs.h
23790
23791 else
0eb775a3 23792
5476a9a4
GM
23793
23794$as_echo "#define va_copy gl_va_copy" >>confdefs.h
0eb775a3 23795
f199cab1
GM
23796 fi
23797 fi
5476a9a4
GM
23798 fi
23799
23800 if test -n "$STDARG_H"; then
23801 GL_GENERATE_STDARG_H_TRUE=
23802 GL_GENERATE_STDARG_H_FALSE='#'
23803else
23804 GL_GENERATE_STDARG_H_TRUE='#'
23805 GL_GENERATE_STDARG_H_FALSE=
23806fi
23807
23808
23809
23810
23811
23812
23813 # Define two additional variables used in the Makefile substitution.
23814
23815 if test "$ac_cv_header_stdbool_h" = yes; then
23816 STDBOOL_H=''
23817 else
23818 STDBOOL_H='stdbool.h'
23819 fi
23820
23821 if test -n "$STDBOOL_H"; then
23822 GL_GENERATE_STDBOOL_H_TRUE=
23823 GL_GENERATE_STDBOOL_H_FALSE='#'
23824else
23825 GL_GENERATE_STDBOOL_H_TRUE='#'
23826 GL_GENERATE_STDBOOL_H_FALSE=
23827fi
23828
23829
23830 if test "$ac_cv_type__Bool" = yes; then
23831 HAVE__BOOL=1
23832 else
23833 HAVE__BOOL=0
23834 fi
23835
23836
23837
23838
23839
23840 STDDEF_H=
23841 if test $gt_cv_c_wchar_t = no; then
23842 HAVE_WCHAR_T=0
23843 STDDEF_H=stddef.h
23844 fi
23845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
23846$as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
23847if test "${gl_cv_decl_null_works+set}" = set; then :
f199cab1
GM
23848 $as_echo_n "(cached) " >&6
23849else
5476a9a4 23850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 23851/* end confdefs.h. */
5476a9a4
GM
23852#include <stddef.h>
23853 int test[2 * (sizeof NULL == sizeof (void *)) -1];
3e0be4ab 23854
f199cab1
GM
23855int
23856main ()
23857{
5476a9a4 23858
f199cab1
GM
23859 ;
23860 return 0;
23861}
23862_ACEOF
5476a9a4
GM
23863if ac_fn_c_try_compile "$LINENO"; then :
23864 gl_cv_decl_null_works=yes
f199cab1 23865else
5476a9a4 23866 gl_cv_decl_null_works=no
f199cab1 23867fi
5476a9a4 23868rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 23869fi
5476a9a4
GM
23870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
23871$as_echo "$gl_cv_decl_null_works" >&6; }
23872 if test $gl_cv_decl_null_works = no; then
23873 REPLACE_NULL=1
23874 STDDEF_H=stddef.h
23875 fi
23876
23877 if test -n "$STDDEF_H"; then
23878 GL_GENERATE_STDDEF_H_TRUE=
23879 GL_GENERATE_STDDEF_H_FALSE='#'
f199cab1 23880else
5476a9a4
GM
23881 GL_GENERATE_STDDEF_H_TRUE='#'
23882 GL_GENERATE_STDDEF_H_FALSE=
f199cab1 23883fi
3e0be4ab 23884
5476a9a4 23885 if test -n "$STDDEF_H"; then
3e0be4ab
GM
23886
23887
5476a9a4
GM
23888
23889
23890
23891
23892
23893
23894 if test $gl_cv_have_include_next = yes; then
23895 gl_cv_next_stddef_h='<'stddef.h'>'
23896 else
23897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
23898$as_echo_n "checking absolute name of <stddef.h>... " >&6; }
23899if test "${gl_cv_next_stddef_h+set}" = set; then :
067d23c9
KY
23900 $as_echo_n "(cached) " >&6
23901else
5476a9a4
GM
23902
23903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 23904/* end confdefs.h. */
5476a9a4 23905#include <stddef.h>
f199cab1 23906
067d23c9 23907_ACEOF
5476a9a4
GM
23908 case "$host_os" in
23909 aix*) gl_absname_cpp="$ac_cpp -C" ;;
23910 *) gl_absname_cpp="$ac_cpp" ;;
23911 esac
23912
23913 case "$host_os" in
23914 mingw*)
23915 gl_dirsep_regex='[/\\]'
23916 ;;
23917 *)
23918 gl_dirsep_regex='\/'
23919 ;;
23920 esac
23921 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23922
23923 gl_header_literal_regex=`echo 'stddef.h' \
23924 | sed -e "$gl_make_literal_regex_sed"`
23925 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23926 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23927 s|^/[^/]|//&|
23928 p
23929 q
23930 }'
23931 gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23932 sed -n "$gl_absolute_header_sed"`'"'
23933
23934
f199cab1 23935fi
5476a9a4
GM
23936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
23937$as_echo "$gl_cv_next_stddef_h" >&6; }
23938 fi
23939 NEXT_STDDEF_H=$gl_cv_next_stddef_h
23940
23941 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23942 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23943 gl_next_as_first_directive='<'stddef.h'>'
23944 else
23945 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23946 gl_next_as_first_directive=$gl_cv_next_stddef_h
23947 fi
23948 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
23949
f199cab1 23950
f199cab1 23951
f199cab1 23952
067d23c9 23953 fi
067d23c9 23954
f199cab1 23955
067d23c9 23956
067d23c9 23957
067d23c9 23958
067d23c9
KY
23959
23960
067d23c9 23961
067d23c9
KY
23962
23963
067d23c9 23964
3e0be4ab 23965
5476a9a4
GM
23966 if test $gl_cv_have_include_next = yes; then
23967 gl_cv_next_stdio_h='<'stdio.h'>'
23968 else
23969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
23970$as_echo_n "checking absolute name of <stdio.h>... " >&6; }
23971if test "${gl_cv_next_stdio_h+set}" = set; then :
23972 $as_echo_n "(cached) " >&6
f199cab1 23973else
5476a9a4
GM
23974
23975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23976/* end confdefs.h. */
23977#include <stdio.h>
23978
f199cab1 23979_ACEOF
5476a9a4
GM
23980 case "$host_os" in
23981 aix*) gl_absname_cpp="$ac_cpp -C" ;;
23982 *) gl_absname_cpp="$ac_cpp" ;;
23983 esac
067d23c9 23984
5476a9a4
GM
23985 case "$host_os" in
23986 mingw*)
23987 gl_dirsep_regex='[/\\]'
23988 ;;
23989 *)
23990 gl_dirsep_regex='\/'
23991 ;;
23992 esac
23993 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23994
23995 gl_header_literal_regex=`echo 'stdio.h' \
23996 | sed -e "$gl_make_literal_regex_sed"`
23997 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23998 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23999 s|^/[^/]|//&|
24000 p
24001 q
24002 }'
24003 gl_cv_next_stdio_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24004 sed -n "$gl_absolute_header_sed"`'"'
067d23c9 24005
067d23c9 24006
f199cab1 24007fi
5476a9a4
GM
24008{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
24009$as_echo "$gl_cv_next_stdio_h" >&6; }
24010 fi
24011 NEXT_STDIO_H=$gl_cv_next_stdio_h
067d23c9 24012
5476a9a4
GM
24013 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24014 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
24015 gl_next_as_first_directive='<'stdio.h'>'
24016 else
24017 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
24018 gl_next_as_first_directive=$gl_cv_next_stdio_h
24019 fi
24020 NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
24021
24022
24023
24024
24025
24026 GNULIB_FSCANF=1
24027
24028
24029cat >>confdefs.h <<_ACEOF
24030#define GNULIB_FSCANF 1
24031_ACEOF
067d23c9 24032
067d23c9 24033
5476a9a4 24034 GNULIB_SCANF=1
f199cab1 24035
f199cab1 24036
5476a9a4
GM
24037cat >>confdefs.h <<_ACEOF
24038#define GNULIB_SCANF 1
f199cab1
GM
24039_ACEOF
24040
067d23c9 24041
5476a9a4
GM
24042 GNULIB_FGETC=1
24043 GNULIB_GETC=1
24044 GNULIB_GETCHAR=1
24045 GNULIB_FGETS=1
24046 GNULIB_FREAD=1
067d23c9 24047
067d23c9 24048
5476a9a4
GM
24049 GNULIB_FPRINTF=1
24050 GNULIB_PRINTF=1
24051 GNULIB_VFPRINTF=1
24052 GNULIB_VPRINTF=1
24053 GNULIB_FPUTC=1
24054 GNULIB_PUTC=1
24055 GNULIB_PUTCHAR=1
24056 GNULIB_FPUTS=1
24057 GNULIB_PUTS=1
24058 GNULIB_FWRITE=1
067d23c9 24059
067d23c9 24060
067d23c9 24061
067d23c9 24062
067d23c9 24063
067d23c9 24064
067d23c9 24065
067d23c9 24066
3e0be4ab
GM
24067
24068
24069
24070
24071
24072
3e0be4ab 24073
5476a9a4
GM
24074 if test $gl_cv_have_include_next = yes; then
24075 gl_cv_next_stdlib_h='<'stdlib.h'>'
24076 else
24077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
24078$as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
24079if test "${gl_cv_next_stdlib_h+set}" = set; then :
067d23c9
KY
24080 $as_echo_n "(cached) " >&6
24081else
5476a9a4
GM
24082
24083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 24084/* end confdefs.h. */
5476a9a4
GM
24085#include <stdlib.h>
24086
f199cab1 24087_ACEOF
5476a9a4
GM
24088 case "$host_os" in
24089 aix*) gl_absname_cpp="$ac_cpp -C" ;;
24090 *) gl_absname_cpp="$ac_cpp" ;;
24091 esac
067d23c9 24092
5476a9a4
GM
24093 case "$host_os" in
24094 mingw*)
24095 gl_dirsep_regex='[/\\]'
24096 ;;
24097 *)
24098 gl_dirsep_regex='\/'
24099 ;;
24100 esac
24101 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
24102
24103 gl_header_literal_regex=`echo 'stdlib.h' \
24104 | sed -e "$gl_make_literal_regex_sed"`
24105 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
24106 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
24107 s|^/[^/]|//&|
24108 p
24109 q
24110 }'
24111 gl_cv_next_stdlib_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24112 sed -n "$gl_absolute_header_sed"`'"'
3e0be4ab 24113
067d23c9 24114
f199cab1 24115fi
5476a9a4
GM
24116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
24117$as_echo "$gl_cv_next_stdlib_h" >&6; }
24118 fi
24119 NEXT_STDLIB_H=$gl_cv_next_stdlib_h
b0415a03 24120
5476a9a4
GM
24121 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24122 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
24123 gl_next_as_first_directive='<'stdlib.h'>'
24124 else
24125 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
24126 gl_next_as_first_directive=$gl_cv_next_stdlib_h
24127 fi
24128 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
b0415a03 24129
067d23c9 24130
067d23c9 24131
067d23c9 24132
067d23c9 24133
067d23c9 24134
067d23c9 24135
067d23c9 24136
067d23c9 24137
5476a9a4 24138 # This defines (or not) HAVE_TZNAME and HAVE_TM_ZONE.
067d23c9 24139
067d23c9 24140
067d23c9 24141
b0415a03
GM
24142
24143
ac1ca7e9 24144
0eb775a3 24145
5476a9a4 24146$as_echo "#define my_strftime nstrftime" >>confdefs.h
067d23c9 24147
067d23c9 24148
a0a61e58
GM
24149
24150
24151
3e0be4ab 24152
5476a9a4
GM
24153
24154
24155 if test "$ac_cv_have_decl_strtoimax" != yes; then
24156 HAVE_DECL_STRTOIMAX=0
24157 fi
24158
24159 if test $ac_cv_func_strtoimax = yes; then
24160 HAVE_STRTOIMAX=1
24161 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtoimax works" >&5
24162$as_echo_n "checking whether strtoimax works... " >&6; }
24163if test "${gl_cv_func_strtoimax+set}" = set; then :
f199cab1
GM
24164 $as_echo_n "(cached) " >&6
24165else
24166 if test "$cross_compiling" = yes; then :
5476a9a4
GM
24167 case "$host_os" in
24168 # Guess no on AIX 5.
24169 aix5*) gl_cv_func_strtoimax="guessing no" ;;
24170 # Guess yes otherwise.
24171 *) gl_cv_func_strtoimax="guessing yes" ;;
24172 esac
24173
f199cab1
GM
24174else
24175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24176/* end confdefs.h. */
3e0be4ab 24177
5476a9a4
GM
24178#include <errno.h>
24179#include <string.h>
24180#include <inttypes.h>
24181int main ()
24182{
24183 if (sizeof (intmax_t) > sizeof (int))
24184 {
24185 const char *s = "4294967295";
24186 char *p;
24187 intmax_t res;
24188 errno = 0;
24189 res = strtoimax (s, &p, 10);
24190 if (p != s + strlen (s))
24191 return 1;
24192 if (errno != 0)
24193 return 2;
24194 if (res != (intmax_t) 65535 * (intmax_t) 65537)
24195 return 3;
24196 }
24197 else
24198 {
24199 const char *s = "2147483647";
24200 char *p;
24201 intmax_t res;
24202 errno = 0;
24203 res = strtoimax (s, &p, 10);
24204 if (p != s + strlen (s))
24205 return 1;
24206 if (errno != 0)
24207 return 2;
24208 if (res != 2147483647)
24209 return 3;
24210 }
f199cab1
GM
24211 return 0;
24212}
5476a9a4 24213
f199cab1
GM
24214_ACEOF
24215if ac_fn_c_try_run "$LINENO"; then :
5476a9a4 24216 gl_cv_func_strtoimax=yes
f199cab1 24217else
5476a9a4 24218 gl_cv_func_strtoimax=no
f199cab1
GM
24219fi
24220rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24221 conftest.$ac_objext conftest.beam conftest.$ac_ext
067d23c9
KY
24222fi
24223
3e0be4ab 24224
f199cab1 24225fi
5476a9a4
GM
24226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtoimax" >&5
24227$as_echo "$gl_cv_func_strtoimax" >&6; }
24228 case "$gl_cv_func_strtoimax" in
24229 *no) REPLACE_STRTOIMAX=1 ;;
24230 esac
24231 else
24232 HAVE_STRTOIMAX=0
24233 fi
067d23c9 24234
a6342fc8 24235 if test $HAVE_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; then
067d23c9 24236
067d23c9 24237
067d23c9 24238
067d23c9 24239
067d23c9 24240
3e0be4ab 24241
2b1928b8
GM
24242
24243
5476a9a4
GM
24244 gl_LIBOBJS="$gl_LIBOBJS strtoimax.$ac_objext"
24245
24246
24247 ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
24248if test "x$ac_cv_have_decl_strtoll" = x""yes; then :
24249 ac_have_decl=1
f199cab1 24250else
5476a9a4 24251 ac_have_decl=0
f199cab1 24252fi
2b1928b8 24253
5476a9a4
GM
24254cat >>confdefs.h <<_ACEOF
24255#define HAVE_DECL_STRTOLL $ac_have_decl
24256_ACEOF
24257
24258
067d23c9 24259
a6342fc8 24260 fi
067d23c9 24261
3e0be4ab
GM
24262
24263
24264
3e0be4ab 24265
5476a9a4 24266 GNULIB_STRTOIMAX=1
3e0be4ab
GM
24267
24268
24269
24270
3e0be4ab
GM
24271
24272
24273
f199cab1 24274
f199cab1 24275
5476a9a4
GM
24276 if test "$ac_cv_have_decl_strtoumax" != yes; then
24277 HAVE_DECL_STRTOUMAX=0
24278 fi
067d23c9 24279
a6342fc8 24280 if test $ac_cv_func_strtoumax = no; then
0eb775a3 24281
5476a9a4
GM
24282
24283
24284
24285
24286
24287
24288
24289 gl_LIBOBJS="$gl_LIBOBJS strtoumax.$ac_objext"
24290
24291
24292 ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
24293if test "x$ac_cv_have_decl_strtoull" = x""yes; then :
24294 ac_have_decl=1
067d23c9 24295else
5476a9a4 24296 ac_have_decl=0
067d23c9 24297fi
5476a9a4
GM
24298
24299cat >>confdefs.h <<_ACEOF
24300#define HAVE_DECL_STRTOULL $ac_have_decl
24301_ACEOF
24302
24303
24304
a6342fc8 24305 fi
067d23c9 24306
067d23c9 24307
067d23c9 24308
067d23c9 24309
067d23c9 24310
5476a9a4
GM
24311 GNULIB_STRTOUMAX=1
24312
24313
24314
24315
24316
24317
24318
24319 if test $ac_cv_func_symlink = no; then
24320 HAVE_SYMLINK=0
24321 else
24322 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether symlink handles trailing slash correctly" >&5
24323$as_echo_n "checking whether symlink handles trailing slash correctly... " >&6; }
24324if test "${gl_cv_func_symlink_works+set}" = set; then :
f199cab1 24325 $as_echo_n "(cached) " >&6
5476a9a4
GM
24326else
24327 if test "$cross_compiling" = yes; then :
24328 case "$host_os" in
24329 # Guess yes on glibc systems.
24330 *-gnu*) gl_cv_func_symlink_works="guessing yes" ;;
24331 # If we don't know, assume the worst.
24332 *) gl_cv_func_symlink_works="guessing no" ;;
24333 esac
24334
f199cab1
GM
24335else
24336 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24337/* end confdefs.h. */
5476a9a4
GM
24338#include <unistd.h>
24339
f199cab1
GM
24340int
24341main ()
24342{
5476a9a4
GM
24343int result = 0;
24344 if (!symlink ("a", "conftest.link/"))
24345 result |= 1;
24346 if (symlink ("conftest.f", "conftest.lnk2"))
24347 result |= 2;
24348 else if (!symlink ("a", "conftest.lnk2/"))
24349 result |= 4;
24350 return result;
067d23c9 24351
f199cab1
GM
24352 ;
24353 return 0;
24354}
24355_ACEOF
5476a9a4
GM
24356if ac_fn_c_try_run "$LINENO"; then :
24357 gl_cv_func_symlink_works=yes
f199cab1 24358else
5476a9a4 24359 gl_cv_func_symlink_works=no
f199cab1 24360fi
5476a9a4
GM
24361rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24362 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1 24363fi
067d23c9 24364
5476a9a4 24365 rm -f conftest.f conftest.link conftest.lnk2
f199cab1 24366fi
5476a9a4
GM
24367{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_symlink_works" >&5
24368$as_echo "$gl_cv_func_symlink_works" >&6; }
24369 case "$gl_cv_func_symlink_works" in
24370 *yes) ;;
24371 *)
24372 REPLACE_SYMLINK=1
24373 ;;
24374 esac
24375 fi
067d23c9 24376
a6342fc8 24377 if test $HAVE_SYMLINK = 0 || test $REPLACE_SYMLINK = 1; then
067d23c9 24378
7e723570 24379
7e723570
GM
24380
24381
dd0d840e 24382
dd0d840e
GM
24383
24384
24385
5476a9a4 24386 gl_LIBOBJS="$gl_LIBOBJS symlink.$ac_objext"
dd0d840e 24387
a6342fc8 24388 fi
dd0d840e
GM
24389
24390
d3127c14
GM
24391
24392
d3127c14 24393
5476a9a4 24394 GNULIB_SYMLINK=1
d3127c14 24395
d3127c14 24396
d3127c14
GM
24397
24398
067d23c9 24399
067d23c9 24400
d3127c14 24401
d3127c14 24402
5476a9a4
GM
24403 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/select.h> is self-contained" >&5
24404$as_echo_n "checking whether <sys/select.h> is self-contained... " >&6; }
24405if test "${gl_cv_header_sys_select_h_selfcontained+set}" = set; then :
24406 $as_echo_n "(cached) " >&6
24407else
d3127c14 24408
5476a9a4
GM
24409 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24410/* end confdefs.h. */
24411#include <sys/select.h>
24412int
24413main ()
24414{
24415struct timeval b;
24416 ;
24417 return 0;
24418}
24419_ACEOF
24420if ac_fn_c_try_compile "$LINENO"; then :
24421 gl_cv_header_sys_select_h_selfcontained=yes
24422else
24423 gl_cv_header_sys_select_h_selfcontained=no
24424fi
24425rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24426 if test $gl_cv_header_sys_select_h_selfcontained = yes; then
24427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24428/* end confdefs.h. */
24429#include <sys/select.h>
24430int
24431main ()
24432{
24433int memset; int bzero;
24434 ;
24435 return 0;
24436}
3e0be4ab 24437
5476a9a4
GM
24438_ACEOF
24439if ac_fn_c_try_compile "$LINENO"; then :
24440 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24441/* end confdefs.h. */
24442#include <sys/select.h>
24443int
24444main ()
24445{
dd0d840e 24446
5476a9a4
GM
24447 #undef memset
24448 #define memset nonexistent_memset
24449 extern
24450 #ifdef __cplusplus
24451 "C"
24452 #endif
24453 void *memset (void *, int, unsigned long);
24454 #undef bzero
24455 #define bzero nonexistent_bzero
24456 extern
24457 #ifdef __cplusplus
24458 "C"
24459 #endif
24460 void bzero (void *, unsigned long);
24461 fd_set fds;
24462 FD_ZERO (&fds);
3e0be4ab 24463
5476a9a4
GM
24464 ;
24465 return 0;
24466}
067d23c9 24467
5476a9a4
GM
24468_ACEOF
24469if ac_fn_c_try_link "$LINENO"; then :
dd0d840e 24470
5476a9a4
GM
24471else
24472 gl_cv_header_sys_select_h_selfcontained=no
24473fi
24474rm -f core conftest.err conftest.$ac_objext \
24475 conftest$ac_exeext conftest.$ac_ext
dd0d840e 24476
5476a9a4
GM
24477fi
24478rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24479 fi
dd0d840e 24480
5476a9a4
GM
24481fi
24482{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_select_h_selfcontained" >&5
24483$as_echo "$gl_cv_header_sys_select_h_selfcontained" >&6; }
dd0d840e 24484
dd0d840e
GM
24485
24486
dd0d840e
GM
24487
24488
dd0d840e
GM
24489
24490
24491
dd0d840e 24492
5476a9a4
GM
24493 if test $gl_cv_have_include_next = yes; then
24494 gl_cv_next_sys_select_h='<'sys/select.h'>'
24495 else
24496 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/select.h>" >&5
24497$as_echo_n "checking absolute name of <sys/select.h>... " >&6; }
24498if test "${gl_cv_next_sys_select_h+set}" = set; then :
24499 $as_echo_n "(cached) " >&6
24500else
dd0d840e 24501
5476a9a4 24502 if test $ac_cv_header_sys_select_h = yes; then
dd0d840e 24503
dd0d840e 24504
5476a9a4
GM
24505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24506/* end confdefs.h. */
24507#include <sys/select.h>
dd0d840e 24508
5476a9a4
GM
24509_ACEOF
24510 case "$host_os" in
24511 aix*) gl_absname_cpp="$ac_cpp -C" ;;
24512 *) gl_absname_cpp="$ac_cpp" ;;
24513 esac
dd0d840e 24514
5476a9a4
GM
24515 case "$host_os" in
24516 mingw*)
24517 gl_dirsep_regex='[/\\]'
24518 ;;
24519 *)
24520 gl_dirsep_regex='\/'
24521 ;;
24522 esac
24523 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
dd0d840e 24524
5476a9a4
GM
24525 gl_header_literal_regex=`echo 'sys/select.h' \
24526 | sed -e "$gl_make_literal_regex_sed"`
24527 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
24528 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
24529 s|^/[^/]|//&|
24530 p
24531 q
24532 }'
24533 gl_cv_next_sys_select_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24534 sed -n "$gl_absolute_header_sed"`'"'
24535 else
24536 gl_cv_next_sys_select_h='<'sys/select.h'>'
24537 fi
067d23c9 24538
067d23c9 24539
5476a9a4
GM
24540fi
24541{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_select_h" >&5
24542$as_echo "$gl_cv_next_sys_select_h" >&6; }
24543 fi
24544 NEXT_SYS_SELECT_H=$gl_cv_next_sys_select_h
24545
24546 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24547 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
24548 gl_next_as_first_directive='<'sys/select.h'>'
24549 else
24550 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
24551 gl_next_as_first_directive=$gl_cv_next_sys_select_h
24552 fi
24553 NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H=$gl_next_as_first_directive
24554
24555
24556
24557
24558 if test $ac_cv_header_sys_select_h = yes; then
24559 HAVE_SYS_SELECT_H=1
24560 else
24561 HAVE_SYS_SELECT_H=0
24562 fi
067d23c9
KY
24563
24564
7e723570 24565
7e723570 24566
7e723570 24567
5476a9a4
GM
24568 if test $ac_cv_header_sys_socket_h != yes; then
24569 for ac_header in winsock2.h
24570do :
24571 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
24572if test "x$ac_cv_header_winsock2_h" = x""yes; then :
24573 cat >>confdefs.h <<_ACEOF
24574#define HAVE_WINSOCK2_H 1
24575_ACEOF
7e723570 24576
5476a9a4 24577fi
7e723570 24578
5476a9a4 24579done
7e723570 24580
5476a9a4
GM
24581 fi
24582 if test "$ac_cv_header_winsock2_h" = yes; then
24583 HAVE_WINSOCK2_H=1
24584 UNISTD_H_HAVE_WINSOCK2_H=1
24585 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
24586 else
24587 HAVE_WINSOCK2_H=0
24588 fi
7e723570
GM
24589
24590
dd0d840e 24591
dd0d840e 24592
dd0d840e
GM
24593
24594
dd0d840e 24595
dd0d840e 24596
dd0d840e
GM
24597
24598
24599
24600
24601
24602
24603
24604
dd0d840e 24605
dd0d840e 24606
dd0d840e 24607
dd0d840e 24608
5476a9a4
GM
24609 if test $gl_cv_have_include_next = yes; then
24610 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
24611 else
24612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
24613$as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
24614if test "${gl_cv_next_sys_stat_h+set}" = set; then :
24615 $as_echo_n "(cached) " >&6
24616else
dd0d840e 24617
5476a9a4 24618 if test $ac_cv_header_sys_stat_h = yes; then
dd0d840e 24619
dd0d840e 24620
5476a9a4
GM
24621 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24622/* end confdefs.h. */
24623#include <sys/stat.h>
dd0d840e 24624
5476a9a4
GM
24625_ACEOF
24626 case "$host_os" in
24627 aix*) gl_absname_cpp="$ac_cpp -C" ;;
24628 *) gl_absname_cpp="$ac_cpp" ;;
24629 esac
dd0d840e 24630
5476a9a4
GM
24631 case "$host_os" in
24632 mingw*)
24633 gl_dirsep_regex='[/\\]'
24634 ;;
24635 *)
24636 gl_dirsep_regex='\/'
24637 ;;
24638 esac
24639 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
dd0d840e 24640
5476a9a4
GM
24641 gl_header_literal_regex=`echo 'sys/stat.h' \
24642 | sed -e "$gl_make_literal_regex_sed"`
24643 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
24644 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
24645 s|^/[^/]|//&|
24646 p
24647 q
24648 }'
24649 gl_cv_next_sys_stat_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24650 sed -n "$gl_absolute_header_sed"`'"'
24651 else
24652 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
24653 fi
dd0d840e 24654
dd0d840e 24655
5476a9a4
GM
24656fi
24657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
24658$as_echo "$gl_cv_next_sys_stat_h" >&6; }
24659 fi
24660 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
dd0d840e 24661
5476a9a4
GM
24662 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24663 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
24664 gl_next_as_first_directive='<'sys/stat.h'>'
24665 else
24666 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
24667 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
24668 fi
24669 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
dd0d840e 24670
dd0d840e 24671
d3127c14 24672
d3127c14 24673
dd0d840e 24674
dd0d840e 24675
dd0d840e 24676
dd0d840e 24677
dd0d840e 24678
dd0d840e 24679
dd0d840e 24680
5476a9a4 24681 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
dd0d840e 24682
5476a9a4 24683$as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
dd0d840e 24684
5476a9a4 24685 fi
dd0d840e 24686
5476a9a4
GM
24687 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
24688 #include <sys/stat.h>
24689"
24690if test "x$ac_cv_type_nlink_t" = x""yes; then :
dd0d840e 24691
5476a9a4 24692else
dd0d840e 24693
5476a9a4 24694$as_echo "#define nlink_t int" >>confdefs.h
dd0d840e 24695
5476a9a4 24696fi
dd0d840e 24697
dd0d840e 24698
dd0d840e 24699
dd0d840e 24700
dd0d840e 24701
dd0d840e 24702
dd0d840e 24703
c9ca3f76 24704
dd0d840e 24705
dd0d840e 24706
dd0d840e 24707
c9ca3f76 24708
dd0d840e 24709
dd0d840e
GM
24710
24711
7e723570
GM
24712
24713
7e723570 24714
5476a9a4
GM
24715 ac_fn_c_check_decl "$LINENO" "localtime_r" "ac_cv_have_decl_localtime_r" "#include <time.h>
24716"
24717if test "x$ac_cv_have_decl_localtime_r" = x""yes; then :
24718 ac_have_decl=1
24719else
24720 ac_have_decl=0
24721fi
7e723570 24722
5476a9a4
GM
24723cat >>confdefs.h <<_ACEOF
24724#define HAVE_DECL_LOCALTIME_R $ac_have_decl
24725_ACEOF
7e723570 24726
5476a9a4
GM
24727 if test $ac_cv_have_decl_localtime_r = no; then
24728 HAVE_DECL_LOCALTIME_R=0
24729 fi
7e723570 24730
7e723570 24731
5476a9a4
GM
24732 if test $ac_cv_func_localtime_r = yes; then
24733 HAVE_LOCALTIME_R=1
24734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime_r is compatible with its POSIX signature" >&5
24735$as_echo_n "checking whether localtime_r is compatible with its POSIX signature... " >&6; }
24736if test "${gl_cv_time_r_posix+set}" = set; then :
24737 $as_echo_n "(cached) " >&6
24738else
24739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24740/* end confdefs.h. */
24741#include <time.h>
7e723570
GM
24742int
24743main ()
24744{
5476a9a4
GM
24745/* We don't need to append 'restrict's to the argument types,
24746 even though the POSIX signature has the 'restrict's,
24747 since C99 says they can't affect type compatibility. */
24748 struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r;
24749 if (ptr) return 0;
24750 /* Check the return type is a pointer.
24751 On HP-UX 10 it is 'int'. */
24752 *localtime_r (0, 0);
7e723570
GM
24753 ;
24754 return 0;
24755}
5476a9a4 24756
7e723570 24757_ACEOF
5476a9a4
GM
24758if ac_fn_c_try_compile "$LINENO"; then :
24759 gl_cv_time_r_posix=yes
7e723570 24760else
5476a9a4 24761 gl_cv_time_r_posix=no
7e723570 24762fi
5476a9a4 24763rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
02bd7257 24764
5476a9a4
GM
24765fi
24766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_r_posix" >&5
24767$as_echo "$gl_cv_time_r_posix" >&6; }
24768 if test $gl_cv_time_r_posix = yes; then
24769 REPLACE_LOCALTIME_R=0
24770 else
24771 REPLACE_LOCALTIME_R=1
24772 fi
24773 else
24774 HAVE_LOCALTIME_R=0
24775 fi
02bd7257 24776
a6342fc8 24777 if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then
02bd7257
GM
24778
24779
02bd7257 24780
02bd7257 24781
02bd7257 24782
02bd7257 24783
7e723570 24784
7e723570 24785
5476a9a4
GM
24786 gl_LIBOBJS="$gl_LIBOBJS time_r.$ac_objext"
24787
24788
24789 :
7e723570 24790
a6342fc8 24791 fi
7e723570 24792
7e723570 24793
7e723570 24794
7e723570 24795
7e723570 24796
5476a9a4 24797 GNULIB_TIME_R=1
7e723570 24798
7e723570 24799
7e723570 24800
7e723570 24801
7e723570 24802
f077f61d
GM
24803
24804
24805
24806
24807
24808 LIB_TIMER_TIME=
24809
24810 gl_saved_libs=$LIBS
24811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing timer_settime" >&5
24812$as_echo_n "checking for library containing timer_settime... " >&6; }
24813if test "${ac_cv_search_timer_settime+set}" = set; then :
24814 $as_echo_n "(cached) " >&6
24815else
24816 ac_func_search_save_LIBS=$LIBS
24817cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24818/* end confdefs.h. */
24819
24820/* Override any GCC internal prototype to avoid an error.
24821 Use char because int might match the return type of a GCC
24822 builtin and then its argument prototype would still apply. */
24823#ifdef __cplusplus
24824extern "C"
24825#endif
24826char timer_settime ();
24827int
24828main ()
24829{
24830return timer_settime ();
24831 ;
24832 return 0;
24833}
24834_ACEOF
24835for ac_lib in '' rt posix4; do
24836 if test -z "$ac_lib"; then
24837 ac_res="none required"
24838 else
24839 ac_res=-l$ac_lib
24840 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
24841 fi
24842 if ac_fn_c_try_link "$LINENO"; then :
24843 ac_cv_search_timer_settime=$ac_res
24844fi
24845rm -f core conftest.err conftest.$ac_objext \
24846 conftest$ac_exeext
24847 if test "${ac_cv_search_timer_settime+set}" = set; then :
24848 break
24849fi
24850done
24851if test "${ac_cv_search_timer_settime+set}" = set; then :
24852
24853else
24854 ac_cv_search_timer_settime=no
24855fi
24856rm conftest.$ac_ext
24857LIBS=$ac_func_search_save_LIBS
24858fi
24859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_timer_settime" >&5
24860$as_echo "$ac_cv_search_timer_settime" >&6; }
24861ac_res=$ac_cv_search_timer_settime
24862if test "$ac_res" != no; then :
24863 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
24864 test "$ac_cv_search_timer_settime" = "none required" ||
24865 LIB_TIMER_TIME=$ac_cv_search_timer_settime
24866fi
24867
24868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24869/* end confdefs.h. */
24870
24871#include <features.h>
24872#ifdef __GNU_LIBRARY__
24873 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || (__GLIBC__ > 2)) \
24874 && !defined __UCLIBC__
24875 Thread emulation available
24876 #endif
24877#endif
24878
24879_ACEOF
24880if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
24881 $EGREP "Thread" >/dev/null 2>&1; then :
24882 LIB_TIMER_TIME="$LIB_TIMER_TIME $LIBMULTITHREAD"
24883fi
24884rm -f conftest*
24885
24886 for ac_func in timer_settime
24887do :
24888 ac_fn_c_check_func "$LINENO" "timer_settime" "ac_cv_func_timer_settime"
24889if test "x$ac_cv_func_timer_settime" = x""yes; then :
24890 cat >>confdefs.h <<_ACEOF
24891#define HAVE_TIMER_SETTIME 1
24892_ACEOF
24893
24894fi
24895done
24896
24897 LIBS=$gl_saved_libs
24898
a6342fc8 24899 :
7e723570 24900
02bd7257 24901
02bd7257 24902
02bd7257 24903
02bd7257 24904
02bd7257 24905
02bd7257 24906
02bd7257 24907
dd0d840e
GM
24908
24909
24910
dd0d840e 24911
5476a9a4
GM
24912 if test $gl_cv_have_include_next = yes; then
24913 gl_cv_next_unistd_h='<'unistd.h'>'
24914 else
24915 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
24916$as_echo_n "checking absolute name of <unistd.h>... " >&6; }
24917if test "${gl_cv_next_unistd_h+set}" = set; then :
24918 $as_echo_n "(cached) " >&6
24919else
dd0d840e 24920
5476a9a4 24921 if test $ac_cv_header_unistd_h = yes; then
dd0d840e 24922
dd0d840e 24923
5476a9a4 24924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d3127c14 24925/* end confdefs.h. */
5476a9a4 24926#include <unistd.h>
d3127c14 24927
5476a9a4
GM
24928_ACEOF
24929 case "$host_os" in
24930 aix*) gl_absname_cpp="$ac_cpp -C" ;;
24931 *) gl_absname_cpp="$ac_cpp" ;;
24932 esac
d3127c14 24933
5476a9a4
GM
24934 case "$host_os" in
24935 mingw*)
24936 gl_dirsep_regex='[/\\]'
24937 ;;
24938 *)
24939 gl_dirsep_regex='\/'
24940 ;;
24941 esac
24942 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
24943
24944 gl_header_literal_regex=`echo 'unistd.h' \
24945 | sed -e "$gl_make_literal_regex_sed"`
24946 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
24947 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
24948 s|^/[^/]|//&|
24949 p
24950 q
24951 }'
24952 gl_cv_next_unistd_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24953 sed -n "$gl_absolute_header_sed"`'"'
24954 else
24955 gl_cv_next_unistd_h='<'unistd.h'>'
24956 fi
d3127c14 24957
d3127c14 24958
c9ca3f76 24959fi
5476a9a4
GM
24960{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
24961$as_echo "$gl_cv_next_unistd_h" >&6; }
24962 fi
24963 NEXT_UNISTD_H=$gl_cv_next_unistd_h
c9ca3f76 24964
5476a9a4
GM
24965 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24966 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
24967 gl_next_as_first_directive='<'unistd.h'>'
24968 else
24969 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
24970 gl_next_as_first_directive=$gl_cv_next_unistd_h
24971 fi
24972 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
c9ca3f76 24973
c9ca3f76 24974
c9ca3f76 24975
c9ca3f76 24976
5476a9a4
GM
24977 if test $ac_cv_header_unistd_h = yes; then
24978 HAVE_UNISTD_H=1
24979 else
24980 HAVE_UNISTD_H=0
24981 fi
c9ca3f76 24982
d3127c14 24983
dd0d840e 24984
dd0d840e 24985
d3127c14 24986
d3127c14 24987
dd0d840e
GM
24988
24989
c9ca3f76
GM
24990
24991
24992
b5591ebb
GM
24993 if test $ac_cv_have_decl_unsetenv = no; then
24994 HAVE_DECL_UNSETENV=0
24995 fi
24996 for ac_func in unsetenv
24997do :
24998 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
24999if test "x$ac_cv_func_unsetenv" = x""yes; then :
25000 cat >>confdefs.h <<_ACEOF
25001#define HAVE_UNSETENV 1
25002_ACEOF
25003
25004fi
25005done
25006
25007 if test $ac_cv_func_unsetenv = no; then
25008 HAVE_UNSETENV=0
25009 else
25010 HAVE_UNSETENV=1
25011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5
25012$as_echo_n "checking for unsetenv() return type... " >&6; }
25013if test "${gt_cv_func_unsetenv_ret+set}" = set; then :
25014 $as_echo_n "(cached) " >&6
25015else
25016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25017/* end confdefs.h. */
25018
25019#undef _BSD
25020#define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */
25021#include <stdlib.h>
25022extern
25023#ifdef __cplusplus
25024"C"
25025#endif
25026int unsetenv (const char *name);
25027
25028int
25029main ()
25030{
25031
25032 ;
25033 return 0;
25034}
25035_ACEOF
25036if ac_fn_c_try_compile "$LINENO"; then :
25037 gt_cv_func_unsetenv_ret='int'
25038else
25039 gt_cv_func_unsetenv_ret='void'
25040fi
25041rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25042fi
25043{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5
25044$as_echo "$gt_cv_func_unsetenv_ret" >&6; }
25045 if test $gt_cv_func_unsetenv_ret = 'void'; then
25046
25047$as_echo "#define VOID_UNSETENV 1" >>confdefs.h
25048
25049 REPLACE_UNSETENV=1
25050 fi
25051
25052 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5
25053$as_echo_n "checking whether unsetenv obeys POSIX... " >&6; }
25054if test "${gl_cv_func_unsetenv_works+set}" = set; then :
25055 $as_echo_n "(cached) " >&6
25056else
25057 if test "$cross_compiling" = yes; then :
25058 case "$host_os" in
25059 # Guess yes on glibc systems.
25060 *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
25061 # If we don't know, assume the worst.
25062 *) gl_cv_func_unsetenv_works="guessing no" ;;
25063 esac
25064
25065else
25066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25067/* end confdefs.h. */
25068
25069 #include <stdlib.h>
25070 #include <errno.h>
25071 extern char **environ;
25072
25073int
25074main ()
25075{
25076
25077 char entry1[] = "a=1";
25078 char entry2[] = "b=2";
25079 char *env[] = { entry1, entry2, NULL };
25080 if (putenv ((char *) "a=1")) return 1;
25081 if (putenv (entry2)) return 2;
25082 entry2[0] = 'a';
25083 unsetenv ("a");
25084 if (getenv ("a")) return 3;
25085 if (!unsetenv ("") || errno != EINVAL) return 4;
25086 entry2[0] = 'b';
25087 environ = env;
25088 if (!getenv ("a")) return 5;
25089 entry2[0] = 'a';
25090 unsetenv ("a");
25091 if (getenv ("a")) return 6;
25092
25093 ;
25094 return 0;
25095}
25096_ACEOF
25097if ac_fn_c_try_run "$LINENO"; then :
25098 gl_cv_func_unsetenv_works=yes
25099else
25100 gl_cv_func_unsetenv_works=no
25101fi
25102rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25103 conftest.$ac_objext conftest.beam conftest.$ac_ext
25104fi
25105
25106fi
25107{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5
25108$as_echo "$gl_cv_func_unsetenv_works" >&6; }
25109 case "$gl_cv_func_unsetenv_works" in
25110 *yes) ;;
25111 *)
25112 REPLACE_UNSETENV=1
25113 ;;
25114 esac
25115 fi
25116
25117 if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
25118
25119
25120
25121
25122
25123
25124
25125
25126 gl_LIBOBJS="$gl_LIBOBJS unsetenv.$ac_objext"
25127
25128
25129
25130
25131
25132 fi
25133
25134
25135
25136
25137
25138 GNULIB_UNSETENV=1
25139
25140
25141
25142
25143
25144
25145
25146
c9ca3f76
GM
25147
25148
c9ca3f76 25149
5476a9a4
GM
25150 if test $ac_cv_func_futimens = no && test $ac_cv_func_futimesat = yes; then
25151 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether futimesat handles NULL file" >&5
25152$as_echo_n "checking whether futimesat handles NULL file... " >&6; }
25153if test "${gl_cv_func_futimesat_works+set}" = set; then :
25154 $as_echo_n "(cached) " >&6
25155else
25156 touch conftest.file
25157 if test "$cross_compiling" = yes; then :
25158 case "$host_os" in
25159 # Guess yes on glibc systems.
25160 *-gnu*) gl_cv_func_futimesat_works="guessing yes" ;;
25161 # If we don't know, assume the worst.
25162 *) gl_cv_func_futimesat_works="guessing no" ;;
25163 esac
c9ca3f76 25164
5476a9a4
GM
25165else
25166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c9ca3f76
GM
25167/* end confdefs.h. */
25168
5476a9a4
GM
25169#include <stddef.h>
25170#include <sys/times.h>
25171#include <fcntl.h>
c9ca3f76
GM
25172
25173int
25174main ()
25175{
5476a9a4
GM
25176 int fd = open ("conftest.file", O_RDWR);
25177 if (fd < 0) return 1;
25178 if (futimesat (fd, NULL, NULL)) return 2;
c9ca3f76
GM
25179
25180 ;
25181 return 0;
25182}
25183_ACEOF
5476a9a4
GM
25184if ac_fn_c_try_run "$LINENO"; then :
25185 gl_cv_func_futimesat_works=yes
c9ca3f76 25186else
5476a9a4 25187 gl_cv_func_futimesat_works=no
c9ca3f76 25188fi
5476a9a4
GM
25189rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25190 conftest.$ac_objext conftest.beam conftest.$ac_ext
c9ca3f76
GM
25191fi
25192
5476a9a4
GM
25193 rm -f conftest.file
25194fi
25195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_futimesat_works" >&5
25196$as_echo "$gl_cv_func_futimesat_works" >&6; }
25197 case "$gl_cv_func_futimesat_works" in
25198 *yes) ;;
25199 *)
7e723570 25200
5476a9a4 25201$as_echo "#define FUTIMESAT_NULL_BUG 1" >>confdefs.h
067d23c9 25202
5476a9a4
GM
25203 ;;
25204 esac
25205 fi
dd0d840e 25206
d7ad186c 25207 gl_gnulib_enabled_260941c0e5dc67ec9e87d1fb321c300b=false
5476a9a4 25208 gl_gnulib_enabled_dosname=false
710f5812
GM
25209 gl_gnulib_enabled_euidaccess=false
25210 gl_gnulib_enabled_getgroups=false
5476a9a4 25211 gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=false
710f5812 25212 gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1=false
d7ad186c 25213 gl_gnulib_enabled_03e0aaad4cb89ca757653bd367a6ccb7=false
5476a9a4 25214 gl_gnulib_enabled_pathmax=false
710f5812 25215 gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c=false
5476a9a4
GM
25216 gl_gnulib_enabled_stat=false
25217 gl_gnulib_enabled_strtoll=false
25218 gl_gnulib_enabled_strtoull=false
25219 gl_gnulib_enabled_verify=false
710f5812 25220 gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec=false
d7ad186c
GM
25221 func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b ()
25222 {
25223 if ! $gl_gnulib_enabled_260941c0e5dc67ec9e87d1fb321c300b; then
25224
25225
25226
25227
25228
25229
25230
25231
25232 gl_LIBOBJS="$gl_LIBOBJS openat-proc.$ac_objext"
25233
25234 gl_gnulib_enabled_260941c0e5dc67ec9e87d1fb321c300b=true
25235 fi
25236 }
5476a9a4
GM
25237 func_gl_gnulib_m4code_dosname ()
25238 {
25239 if ! $gl_gnulib_enabled_dosname; then
25240 gl_gnulib_enabled_dosname=true
25241 fi
25242 }
710f5812 25243 func_gl_gnulib_m4code_euidaccess ()
5476a9a4 25244 {
710f5812 25245 if ! $gl_gnulib_enabled_euidaccess; then
dd0d840e 25246
d3127c14
GM
25247
25248
25249
25250
710f5812
GM
25251 for ac_func in euidaccess
25252do :
25253 ac_fn_c_check_func "$LINENO" "euidaccess" "ac_cv_func_euidaccess"
25254if test "x$ac_cv_func_euidaccess" = x""yes; then :
25255 cat >>confdefs.h <<_ACEOF
25256#define HAVE_EUIDACCESS 1
25257_ACEOF
d3127c14 25258
710f5812
GM
25259fi
25260done
d3127c14 25261
710f5812
GM
25262 if test $ac_cv_func_euidaccess = no; then
25263 HAVE_EUIDACCESS=0
25264 fi
d3127c14 25265
710f5812
GM
25266 if test $HAVE_EUIDACCESS = 0; then
25267
25268
25269
25270
25271
25272
25273
25274
25275 gl_LIBOBJS="$gl_LIBOBJS euidaccess.$ac_objext"
25276
25277
25278
25279 for ac_header in libgen.h
25280do :
25281 ac_fn_c_check_header_mongrel "$LINENO" "libgen.h" "ac_cv_header_libgen_h" "$ac_includes_default"
25282if test "x$ac_cv_header_libgen_h" = x""yes; then :
25283 cat >>confdefs.h <<_ACEOF
25284#define HAVE_LIBGEN_H 1
25285_ACEOF
25286
25287fi
25288
25289done
25290
25291
25292 ac_fn_c_check_func "$LINENO" "getgroups" "ac_cv_func_getgroups"
25293if test "x$ac_cv_func_getgroups" = x""yes; then :
25294
25295fi
25296
25297
25298 # If we don't yet have getgroups, see if it's in -lbsd.
25299 # This is reported to be necessary on an ITOS 3000WS running SEIUX 3.1.
25300 ac_save_LIBS=$LIBS
25301 if test $ac_cv_func_getgroups = no; then
25302 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getgroups in -lbsd" >&5
25303$as_echo_n "checking for getgroups in -lbsd... " >&6; }
25304if test "${ac_cv_lib_bsd_getgroups+set}" = set; then :
5476a9a4
GM
25305 $as_echo_n "(cached) " >&6
25306else
710f5812
GM
25307 ac_check_lib_save_LIBS=$LIBS
25308LIBS="-lbsd $LIBS"
25309cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d3127c14 25310/* end confdefs.h. */
d3127c14 25311
710f5812
GM
25312/* Override any GCC internal prototype to avoid an error.
25313 Use char because int might match the return type of a GCC
25314 builtin and then its argument prototype would still apply. */
25315#ifdef __cplusplus
25316extern "C"
25317#endif
25318char getgroups ();
d3127c14
GM
25319int
25320main ()
25321{
710f5812 25322return getgroups ();
d3127c14
GM
25323 ;
25324 return 0;
25325}
25326_ACEOF
710f5812
GM
25327if ac_fn_c_try_link "$LINENO"; then :
25328 ac_cv_lib_bsd_getgroups=yes
d3127c14 25329else
710f5812 25330 ac_cv_lib_bsd_getgroups=no
5476a9a4 25331fi
710f5812
GM
25332rm -f core conftest.err conftest.$ac_objext \
25333 conftest$ac_exeext conftest.$ac_ext
25334LIBS=$ac_check_lib_save_LIBS
d3127c14 25335fi
710f5812
GM
25336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_getgroups" >&5
25337$as_echo "$ac_cv_lib_bsd_getgroups" >&6; }
25338if test "x$ac_cv_lib_bsd_getgroups" = x""yes; then :
25339 GETGROUPS_LIB=-lbsd
5476a9a4 25340fi
710f5812
GM
25341
25342 fi
25343
25344 # Run the program to test the functionality of the system-supplied
25345 # getgroups function only if there is such a function.
25346 if test $ac_cv_func_getgroups = yes; then
25347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getgroups" >&5
25348$as_echo_n "checking for working getgroups... " >&6; }
25349if test "${ac_cv_func_getgroups_works+set}" = set; then :
5476a9a4
GM
25350 $as_echo_n "(cached) " >&6
25351else
710f5812
GM
25352 if test "$cross_compiling" = yes; then :
25353 case "$host_os" in # ((
5476a9a4 25354 # Guess yes on glibc systems.
710f5812 25355 *-gnu*) ac_cv_func_getgroups_works="guessing yes" ;;
5476a9a4 25356 # If we don't know, assume the worst.
710f5812 25357 *) ac_cv_func_getgroups_works="guessing no" ;;
5476a9a4 25358 esac
d3127c14 25359
5476a9a4
GM
25360else
25361 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d3127c14 25362/* end confdefs.h. */
710f5812 25363$ac_includes_default
d3127c14
GM
25364int
25365main ()
25366{
710f5812
GM
25367/* On Ultrix 4.3, getgroups (0, 0) always fails. */
25368 return getgroups (0, 0) == -1;
25369 ;
25370 return 0;
25371}
25372
25373_ACEOF
25374if ac_fn_c_try_run "$LINENO"; then :
25375 ac_cv_func_getgroups_works=yes
25376else
25377 ac_cv_func_getgroups_works=no
25378fi
25379rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25380 conftest.$ac_objext conftest.beam conftest.$ac_ext
25381fi
25382
25383
25384fi
25385{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getgroups_works" >&5
25386$as_echo "$ac_cv_func_getgroups_works" >&6; }
25387 else
25388 ac_cv_func_getgroups_works=no
25389 fi
25390 case "$ac_cv_func_getgroups_works" in
25391 *yes)
25392
25393$as_echo "#define HAVE_GETGROUPS 1" >>confdefs.h
25394
25395 ;;
25396 esac
25397 LIBS=$ac_save_LIBS
25398
25399
25400 # Solaris 9 and 10 need -lgen to get the eaccess function.
25401 # Save and restore LIBS so -lgen isn't added to it. Otherwise, *all*
25402 # programs in the package would end up linked with that potentially-shared
25403 # library, inducing unnecessary run-time overhead.
25404 LIB_EACCESS=
25405
25406 gl_saved_libs=$LIBS
25407 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing eaccess" >&5
25408$as_echo_n "checking for library containing eaccess... " >&6; }
25409if test "${ac_cv_search_eaccess+set}" = set; then :
25410 $as_echo_n "(cached) " >&6
25411else
25412 ac_func_search_save_LIBS=$LIBS
25413cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25414/* end confdefs.h. */
25415
25416/* Override any GCC internal prototype to avoid an error.
25417 Use char because int might match the return type of a GCC
25418 builtin and then its argument prototype would still apply. */
25419#ifdef __cplusplus
25420extern "C"
25421#endif
25422char eaccess ();
25423int
25424main ()
25425{
25426return eaccess ();
25427 ;
25428 return 0;
25429}
25430_ACEOF
25431for ac_lib in '' gen; do
25432 if test -z "$ac_lib"; then
25433 ac_res="none required"
25434 else
25435 ac_res=-l$ac_lib
25436 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
25437 fi
25438 if ac_fn_c_try_link "$LINENO"; then :
25439 ac_cv_search_eaccess=$ac_res
25440fi
25441rm -f core conftest.err conftest.$ac_objext \
25442 conftest$ac_exeext
25443 if test "${ac_cv_search_eaccess+set}" = set; then :
25444 break
25445fi
25446done
25447if test "${ac_cv_search_eaccess+set}" = set; then :
25448
25449else
25450 ac_cv_search_eaccess=no
25451fi
25452rm conftest.$ac_ext
25453LIBS=$ac_func_search_save_LIBS
25454fi
25455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_eaccess" >&5
25456$as_echo "$ac_cv_search_eaccess" >&6; }
25457ac_res=$ac_cv_search_eaccess
25458if test "$ac_res" != no; then :
25459 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
25460 test "$ac_cv_search_eaccess" = "none required" ||
25461 LIB_EACCESS=$ac_cv_search_eaccess
25462fi
25463
25464 for ac_func in eaccess
25465do :
25466 ac_fn_c_check_func "$LINENO" "eaccess" "ac_cv_func_eaccess"
25467if test "x$ac_cv_func_eaccess" = x""yes; then :
25468 cat >>confdefs.h <<_ACEOF
25469#define HAVE_EACCESS 1
25470_ACEOF
25471
25472fi
25473done
25474
25475 LIBS=$gl_saved_libs
25476
25477 fi
25478
25479
25480
25481
25482
25483 GNULIB_EUIDACCESS=1
25484
25485
25486
25487
25488
25489 gl_gnulib_enabled_euidaccess=true
25490 if test $HAVE_EUIDACCESS = 0; then
25491 func_gl_gnulib_m4code_a9786850e999ae65a836a6041e8e5ed1
25492 fi
25493 func_gl_gnulib_m4code_6099e9737f757db36c47fa9d9f02e88c
25494 if test $HAVE_EUIDACCESS = 0; then
25495 func_gl_gnulib_m4code_stat
25496 fi
25497 fi
25498 }
25499 func_gl_gnulib_m4code_getgroups ()
25500 {
25501 if ! $gl_gnulib_enabled_getgroups; then
25502
25503
25504
25505
25506
25507 ac_fn_c_check_func "$LINENO" "getgroups" "ac_cv_func_getgroups"
25508if test "x$ac_cv_func_getgroups" = x""yes; then :
25509
25510fi
25511
25512
25513 # If we don't yet have getgroups, see if it's in -lbsd.
25514 # This is reported to be necessary on an ITOS 3000WS running SEIUX 3.1.
25515 ac_save_LIBS=$LIBS
25516 if test $ac_cv_func_getgroups = no; then
25517 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getgroups in -lbsd" >&5
25518$as_echo_n "checking for getgroups in -lbsd... " >&6; }
25519if test "${ac_cv_lib_bsd_getgroups+set}" = set; then :
25520 $as_echo_n "(cached) " >&6
25521else
25522 ac_check_lib_save_LIBS=$LIBS
25523LIBS="-lbsd $LIBS"
25524cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25525/* end confdefs.h. */
25526
25527/* Override any GCC internal prototype to avoid an error.
25528 Use char because int might match the return type of a GCC
25529 builtin and then its argument prototype would still apply. */
25530#ifdef __cplusplus
25531extern "C"
25532#endif
25533char getgroups ();
25534int
25535main ()
25536{
25537return getgroups ();
25538 ;
25539 return 0;
25540}
25541_ACEOF
25542if ac_fn_c_try_link "$LINENO"; then :
25543 ac_cv_lib_bsd_getgroups=yes
25544else
25545 ac_cv_lib_bsd_getgroups=no
25546fi
25547rm -f core conftest.err conftest.$ac_objext \
25548 conftest$ac_exeext conftest.$ac_ext
25549LIBS=$ac_check_lib_save_LIBS
25550fi
25551{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_getgroups" >&5
25552$as_echo "$ac_cv_lib_bsd_getgroups" >&6; }
25553if test "x$ac_cv_lib_bsd_getgroups" = x""yes; then :
25554 GETGROUPS_LIB=-lbsd
25555fi
25556
25557 fi
25558
25559 # Run the program to test the functionality of the system-supplied
25560 # getgroups function only if there is such a function.
25561 if test $ac_cv_func_getgroups = yes; then
25562 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getgroups" >&5
25563$as_echo_n "checking for working getgroups... " >&6; }
25564if test "${ac_cv_func_getgroups_works+set}" = set; then :
25565 $as_echo_n "(cached) " >&6
25566else
25567 if test "$cross_compiling" = yes; then :
25568 case "$host_os" in # ((
25569 # Guess yes on glibc systems.
25570 *-gnu*) ac_cv_func_getgroups_works="guessing yes" ;;
25571 # If we don't know, assume the worst.
25572 *) ac_cv_func_getgroups_works="guessing no" ;;
25573 esac
25574
25575else
25576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25577/* end confdefs.h. */
25578$ac_includes_default
25579int
25580main ()
25581{
25582/* On Ultrix 4.3, getgroups (0, 0) always fails. */
25583 return getgroups (0, 0) == -1;
25584 ;
25585 return 0;
25586}
25587
25588_ACEOF
25589if ac_fn_c_try_run "$LINENO"; then :
25590 ac_cv_func_getgroups_works=yes
25591else
25592 ac_cv_func_getgroups_works=no
25593fi
25594rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25595 conftest.$ac_objext conftest.beam conftest.$ac_ext
25596fi
25597
25598
25599fi
25600{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getgroups_works" >&5
25601$as_echo "$ac_cv_func_getgroups_works" >&6; }
25602 else
25603 ac_cv_func_getgroups_works=no
25604 fi
25605 case "$ac_cv_func_getgroups_works" in
25606 *yes)
25607
25608$as_echo "#define HAVE_GETGROUPS 1" >>confdefs.h
25609
25610 ;;
25611 esac
25612 LIBS=$ac_save_LIBS
25613
25614 if test $ac_cv_func_getgroups != yes; then
25615 HAVE_GETGROUPS=0
25616 else
25617 if test "$ac_cv_type_getgroups" != gid_t \
25618 || { case "$ac_cv_func_getgroups_works" in
25619 *yes) false;;
25620 *) true;;
25621 esac
25622 }; then
25623 REPLACE_GETGROUPS=1
25624
25625$as_echo "#define GETGROUPS_ZERO_BUG 1" >>confdefs.h
25626
25627 else
25628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getgroups handles negative values" >&5
25629$as_echo_n "checking whether getgroups handles negative values... " >&6; }
25630if test "${gl_cv_func_getgroups_works+set}" = set; then :
25631 $as_echo_n "(cached) " >&6
25632else
25633 if test "$cross_compiling" = yes; then :
25634 case "$host_os" in
25635 # Guess yes on glibc systems.
25636 *-gnu*) gl_cv_func_getgroups_works="guessing yes" ;;
25637 # If we don't know, assume the worst.
25638 *) gl_cv_func_getgroups_works="guessing no" ;;
25639 esac
25640
25641else
25642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25643/* end confdefs.h. */
25644$ac_includes_default
25645int
25646main ()
25647{
25648int size = getgroups (0, 0);
25649 gid_t *list = malloc (size * sizeof *list);
25650 return getgroups (-1, list) != -1;
25651 ;
25652 return 0;
25653}
25654_ACEOF
25655if ac_fn_c_try_run "$LINENO"; then :
25656 gl_cv_func_getgroups_works=yes
25657else
25658 gl_cv_func_getgroups_works=no
25659fi
25660rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25661 conftest.$ac_objext conftest.beam conftest.$ac_ext
25662fi
25663
25664fi
25665{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getgroups_works" >&5
25666$as_echo "$gl_cv_func_getgroups_works" >&6; }
25667 case "$gl_cv_func_getgroups_works" in
25668 *yes) ;;
25669 *) REPLACE_GETGROUPS=1 ;;
25670 esac
25671 fi
25672 fi
25673 test -n "$GETGROUPS_LIB" && LIBS="$GETGROUPS_LIB $LIBS"
25674
25675 if test $HAVE_GETGROUPS = 0 || test $REPLACE_GETGROUPS = 1; then
25676
25677
25678
25679
25680
25681
25682
25683
25684 gl_LIBOBJS="$gl_LIBOBJS getgroups.$ac_objext"
25685
25686 fi
25687
25688
25689
25690
25691
25692 GNULIB_GETGROUPS=1
25693
25694
25695
25696
25697
25698 gl_gnulib_enabled_getgroups=true
25699 fi
25700 }
25701 func_gl_gnulib_m4code_be453cec5eecf5731a274f2de7f2db36 ()
25702 {
25703 if ! $gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36; then
25704
25705
25706 gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=true
25707 fi
25708 }
25709 func_gl_gnulib_m4code_a9786850e999ae65a836a6041e8e5ed1 ()
25710 {
25711 if ! $gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1; then
25712
25713
25714
25715
25716
25717 ac_fn_c_check_func "$LINENO" "group_member" "ac_cv_func_group_member"
25718if test "x$ac_cv_func_group_member" = x""yes; then :
25719
25720else
25721
25722 HAVE_GROUP_MEMBER=0
25723
25724fi
25725
25726
25727 if test $HAVE_GROUP_MEMBER = 0; then
25728
25729
25730
25731
25732
25733
25734
25735
25736 gl_LIBOBJS="$gl_LIBOBJS group-member.$ac_objext"
25737
25738
25739
25740
25741 fi
25742
25743
25744
25745
25746
25747 GNULIB_GROUP_MEMBER=1
25748
25749
25750
25751
25752
25753 gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1=true
25754 if test $HAVE_GROUP_MEMBER = 0; then
25755 func_gl_gnulib_m4code_getgroups
25756 fi
25757 if test $HAVE_GROUP_MEMBER = 0; then
25758 func_gl_gnulib_m4code_682e609604ccaac6be382e4ee3a4eaec
25759 fi
25760 fi
25761 }
d7ad186c
GM
25762 func_gl_gnulib_m4code_03e0aaad4cb89ca757653bd367a6ccb7 ()
25763 {
25764 if ! $gl_gnulib_enabled_03e0aaad4cb89ca757653bd367a6ccb7; then
25765 gl_gnulib_enabled_03e0aaad4cb89ca757653bd367a6ccb7=true
25766 fi
25767 }
710f5812
GM
25768 func_gl_gnulib_m4code_pathmax ()
25769 {
25770 if ! $gl_gnulib_enabled_pathmax; then
25771
25772
25773
25774 gl_gnulib_enabled_pathmax=true
25775 fi
25776 }
25777 func_gl_gnulib_m4code_6099e9737f757db36c47fa9d9f02e88c ()
25778 {
25779 if ! $gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c; then
25780 gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c=true
25781 fi
25782 }
25783 func_gl_gnulib_m4code_stat ()
25784 {
25785 if ! $gl_gnulib_enabled_stat; then
25786
25787
25788
25789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5
25790$as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; }
25791if test "${gl_cv_func_stat_dir_slash+set}" = set; then :
25792 $as_echo_n "(cached) " >&6
25793else
25794 if test "$cross_compiling" = yes; then :
25795 case $host_os in
25796 mingw*) gl_cv_func_stat_dir_slash="guessing no";;
25797 *) gl_cv_func_stat_dir_slash="guessing yes";;
25798 esac
25799else
25800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25801/* end confdefs.h. */
25802#include <sys/stat.h>
25803
25804int
25805main ()
25806{
25807struct stat st; return stat (".", &st) != stat ("./", &st);
25808 ;
25809 return 0;
25810}
25811_ACEOF
25812if ac_fn_c_try_run "$LINENO"; then :
25813 gl_cv_func_stat_dir_slash=yes
25814else
25815 gl_cv_func_stat_dir_slash=no
25816fi
25817rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25818 conftest.$ac_objext conftest.beam conftest.$ac_ext
25819fi
25820
25821fi
25822{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5
25823$as_echo "$gl_cv_func_stat_dir_slash" >&6; }
25824 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
25825$as_echo_n "checking whether stat handles trailing slashes on files... " >&6; }
25826if test "${gl_cv_func_stat_file_slash+set}" = set; then :
25827 $as_echo_n "(cached) " >&6
25828else
25829 touch conftest.tmp
25830 # Assume that if we have lstat, we can also check symlinks.
25831 if test $ac_cv_func_lstat = yes; then
25832 ln -s conftest.tmp conftest.lnk
25833 fi
25834 if test "$cross_compiling" = yes; then :
25835 case "$host_os" in
25836 # Guess yes on glibc systems.
25837 *-gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
25838 # If we don't know, assume the worst.
25839 *) gl_cv_func_stat_file_slash="guessing no" ;;
25840 esac
25841
25842else
25843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25844/* end confdefs.h. */
25845#include <sys/stat.h>
25846
25847int
25848main ()
25849{
25850int result = 0;
25851 struct stat st;
25852 if (!stat ("conftest.tmp/", &st))
25853 result |= 1;
25854#if HAVE_LSTAT
25855 if (!stat ("conftest.lnk/", &st))
5476a9a4
GM
25856 result |= 2;
25857#endif
25858 return result;
d3127c14
GM
25859
25860 ;
25861 return 0;
25862}
25863_ACEOF
5476a9a4
GM
25864if ac_fn_c_try_run "$LINENO"; then :
25865 gl_cv_func_stat_file_slash=yes
d3127c14 25866else
5476a9a4
GM
25867 gl_cv_func_stat_file_slash=no
25868fi
25869rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25870 conftest.$ac_objext conftest.beam conftest.$ac_ext
d3127c14 25871fi
d3127c14 25872
5476a9a4
GM
25873 rm -f conftest.tmp conftest.lnk
25874fi
25875{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
25876$as_echo "$gl_cv_func_stat_file_slash" >&6; }
25877 case $gl_cv_func_stat_dir_slash in
25878 *no) REPLACE_STAT=1
d3127c14 25879
5476a9a4
GM
25880$as_echo "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h
25881;;
25882 esac
25883 case $gl_cv_func_stat_file_slash in
25884 *no) REPLACE_STAT=1
d3127c14 25885
5476a9a4
GM
25886$as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
25887;;
25888 esac
d3127c14 25889
a6342fc8 25890 if test $REPLACE_STAT = 1; then
d3127c14 25891
dd0d840e 25892
dd0d840e 25893
dd0d840e 25894
dd0d840e 25895
dd0d840e 25896
067d23c9
KY
25897
25898
5476a9a4 25899 gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
067d23c9 25900
45d4966b 25901 :
a6342fc8 25902 fi
067d23c9 25903
dd0d840e
GM
25904
25905
dd0d840e 25906
dd0d840e 25907
5476a9a4 25908 GNULIB_STAT=1
dd0d840e 25909
067d23c9
KY
25910
25911
25912
25913
5476a9a4
GM
25914 gl_gnulib_enabled_stat=true
25915 if test $REPLACE_STAT = 1; then
25916 func_gl_gnulib_m4code_dosname
25917 fi
25918 if test $REPLACE_STAT = 1; then
25919 func_gl_gnulib_m4code_pathmax
25920 fi
25921 if test $REPLACE_STAT = 1; then
25922 func_gl_gnulib_m4code_verify
25923 fi
25924 fi
25925 }
25926 func_gl_gnulib_m4code_strtoll ()
25927 {
25928 if ! $gl_gnulib_enabled_strtoll; then
067d23c9
KY
25929
25930
25931
5476a9a4
GM
25932 if test "$ac_cv_type_long_long_int" = yes; then
25933 for ac_func in strtoll
25934do :
25935 ac_fn_c_check_func "$LINENO" "strtoll" "ac_cv_func_strtoll"
25936if test "x$ac_cv_func_strtoll" = x""yes; then :
25937 cat >>confdefs.h <<_ACEOF
25938#define HAVE_STRTOLL 1
25939_ACEOF
067d23c9 25940
5476a9a4
GM
25941fi
25942done
067d23c9 25943
5476a9a4
GM
25944 if test $ac_cv_func_strtoll = no; then
25945 HAVE_STRTOLL=0
25946 fi
25947 fi
067d23c9 25948
a6342fc8 25949 if test $HAVE_STRTOLL = 0; then
067d23c9
KY
25950
25951
25952
067d23c9
KY
25953
25954
25955
25956
25957
5476a9a4 25958 gl_LIBOBJS="$gl_LIBOBJS strtoll.$ac_objext"
067d23c9
KY
25959
25960
5476a9a4 25961 :
067d23c9 25962
a6342fc8 25963 fi
067d23c9
KY
25964
25965
25966
067d23c9 25967
067d23c9 25968
5476a9a4 25969 GNULIB_STRTOLL=1
067d23c9 25970
397f7161 25971
067d23c9
KY
25972
25973
067d23c9 25974
5476a9a4
GM
25975 gl_gnulib_enabled_strtoll=true
25976 fi
25977 }
25978 func_gl_gnulib_m4code_strtoull ()
25979 {
25980 if ! $gl_gnulib_enabled_strtoull; then
067d23c9 25981
067d23c9 25982
067d23c9 25983
5476a9a4
GM
25984 if test "$ac_cv_type_unsigned_long_long_int" = yes; then
25985 for ac_func in strtoull
25986do :
25987 ac_fn_c_check_func "$LINENO" "strtoull" "ac_cv_func_strtoull"
25988if test "x$ac_cv_func_strtoull" = x""yes; then :
25989 cat >>confdefs.h <<_ACEOF
25990#define HAVE_STRTOULL 1
25991_ACEOF
067d23c9 25992
f199cab1 25993fi
5476a9a4 25994done
067d23c9 25995
5476a9a4
GM
25996 if test $ac_cv_func_strtoull = no; then
25997 HAVE_STRTOULL=0
25998 fi
25999 fi
067d23c9 26000
a6342fc8 26001 if test $HAVE_STRTOULL = 0; then
067d23c9
KY
26002
26003
067d23c9 26004
067d23c9 26005
067d23c9 26006
067d23c9 26007
067d23c9 26008
067d23c9 26009
5476a9a4 26010 gl_LIBOBJS="$gl_LIBOBJS strtoull.$ac_objext"
067d23c9 26011
067d23c9 26012
5476a9a4 26013 :
067d23c9 26014
a6342fc8 26015 fi
067d23c9
KY
26016
26017
3e0be4ab 26018
3e0be4ab 26019
067d23c9 26020
5476a9a4 26021 GNULIB_STRTOULL=1
067d23c9 26022
a0a61e58 26023
067d23c9 26024
067d23c9
KY
26025
26026
5476a9a4
GM
26027 gl_gnulib_enabled_strtoull=true
26028 fi
26029 }
26030 func_gl_gnulib_m4code_verify ()
26031 {
26032 if ! $gl_gnulib_enabled_verify; then
26033 gl_gnulib_enabled_verify=true
26034 fi
26035 }
710f5812
GM
26036 func_gl_gnulib_m4code_682e609604ccaac6be382e4ee3a4eaec ()
26037 {
26038 if ! $gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec; then
26039 gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec=true
26040 fi
26041 }
d7ad186c
GM
26042 if test $HAVE_FACCESSAT = 0; then
26043 func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b
26044 fi
710f5812
GM
26045 if test $HAVE_FACCESSAT = 0; then
26046 func_gl_gnulib_m4code_dosname
26047 fi
26048 if test $HAVE_FACCESSAT = 0; then
26049 func_gl_gnulib_m4code_euidaccess
26050 fi
d7ad186c
GM
26051 if test $HAVE_FACCESSAT = 0; then
26052 func_gl_gnulib_m4code_03e0aaad4cb89ca757653bd367a6ccb7
26053 fi
26054 if test $HAVE_FDOPENDIR = 0; then
26055 func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b
26056 fi
26057 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
26058 func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b
26059 fi
26060 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
26061 func_gl_gnulib_m4code_dosname
26062 fi
26063 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
26064 func_gl_gnulib_m4code_03e0aaad4cb89ca757653bd367a6ccb7
26065 fi
5476a9a4
GM
26066 if test $REPLACE_GETOPT = 1; then
26067 func_gl_gnulib_m4code_be453cec5eecf5731a274f2de7f2db36
26068 fi
26069 if test $REPLACE_LSTAT = 1; then
26070 func_gl_gnulib_m4code_dosname
26071 fi
26072 if test $REPLACE_LSTAT = 1; then
26073 func_gl_gnulib_m4code_stat
26074 fi
26075 if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
26076 func_gl_gnulib_m4code_stat
26077 fi
d7ad186c
GM
26078 if test $HAVE_READLINKAT = 0; then
26079 func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b
26080 fi
26081 if test $HAVE_READLINKAT = 0; then
26082 func_gl_gnulib_m4code_dosname
26083 fi
26084 if test $HAVE_READLINKAT = 0; then
26085 func_gl_gnulib_m4code_03e0aaad4cb89ca757653bd367a6ccb7
26086 fi
5476a9a4
GM
26087 if { test $HAVE_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; } && test $ac_cv_type_long_long_int = yes; then
26088 func_gl_gnulib_m4code_strtoll
26089 fi
26090 if test $HAVE_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; then
26091 func_gl_gnulib_m4code_verify
26092 fi
26093 if test $ac_cv_func_strtoumax = no && test $ac_cv_type_unsigned_long_long_int = yes; then
26094 func_gl_gnulib_m4code_strtoull
26095 fi
26096 if test $ac_cv_func_strtoumax = no; then
26097 func_gl_gnulib_m4code_verify
26098 fi
067d23c9 26099
d7ad186c
GM
26100 if $gl_gnulib_enabled_260941c0e5dc67ec9e87d1fb321c300b; then
26101 gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_TRUE=
26102 gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_FALSE='#'
26103else
26104 gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_TRUE='#'
26105 gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_FALSE=
26106fi
26107
5476a9a4
GM
26108 if $gl_gnulib_enabled_dosname; then
26109 gl_GNULIB_ENABLED_dosname_TRUE=
26110 gl_GNULIB_ENABLED_dosname_FALSE='#'
26111else
26112 gl_GNULIB_ENABLED_dosname_TRUE='#'
26113 gl_GNULIB_ENABLED_dosname_FALSE=
26114fi
067d23c9 26115
710f5812
GM
26116 if $gl_gnulib_enabled_euidaccess; then
26117 gl_GNULIB_ENABLED_euidaccess_TRUE=
26118 gl_GNULIB_ENABLED_euidaccess_FALSE='#'
26119else
26120 gl_GNULIB_ENABLED_euidaccess_TRUE='#'
26121 gl_GNULIB_ENABLED_euidaccess_FALSE=
26122fi
26123
26124 if $gl_gnulib_enabled_getgroups; then
26125 gl_GNULIB_ENABLED_getgroups_TRUE=
26126 gl_GNULIB_ENABLED_getgroups_FALSE='#'
26127else
26128 gl_GNULIB_ENABLED_getgroups_TRUE='#'
26129 gl_GNULIB_ENABLED_getgroups_FALSE=
26130fi
26131
5476a9a4
GM
26132 if $gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36; then
26133 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE=
26134 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE='#'
26135else
26136 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE='#'
26137 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE=
26138fi
067d23c9 26139
710f5812
GM
26140 if $gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1; then
26141 gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_TRUE=
26142 gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_FALSE='#'
26143else
26144 gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_TRUE='#'
26145 gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_FALSE=
26146fi
26147
d7ad186c
GM
26148 if $gl_gnulib_enabled_03e0aaad4cb89ca757653bd367a6ccb7; then
26149 gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_TRUE=
26150 gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_FALSE='#'
26151else
26152 gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_TRUE='#'
26153 gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_FALSE=
26154fi
26155
5476a9a4
GM
26156 if $gl_gnulib_enabled_pathmax; then
26157 gl_GNULIB_ENABLED_pathmax_TRUE=
26158 gl_GNULIB_ENABLED_pathmax_FALSE='#'
26159else
26160 gl_GNULIB_ENABLED_pathmax_TRUE='#'
26161 gl_GNULIB_ENABLED_pathmax_FALSE=
26162fi
067d23c9 26163
710f5812
GM
26164 if $gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c; then
26165 gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_TRUE=
26166 gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_FALSE='#'
26167else
26168 gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_TRUE='#'
26169 gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_FALSE=
26170fi
26171
5476a9a4
GM
26172 if $gl_gnulib_enabled_stat; then
26173 gl_GNULIB_ENABLED_stat_TRUE=
26174 gl_GNULIB_ENABLED_stat_FALSE='#'
26175else
26176 gl_GNULIB_ENABLED_stat_TRUE='#'
26177 gl_GNULIB_ENABLED_stat_FALSE=
26178fi
067d23c9 26179
5476a9a4
GM
26180 if $gl_gnulib_enabled_strtoll; then
26181 gl_GNULIB_ENABLED_strtoll_TRUE=
26182 gl_GNULIB_ENABLED_strtoll_FALSE='#'
26183else
26184 gl_GNULIB_ENABLED_strtoll_TRUE='#'
26185 gl_GNULIB_ENABLED_strtoll_FALSE=
26186fi
067d23c9 26187
5476a9a4
GM
26188 if $gl_gnulib_enabled_strtoull; then
26189 gl_GNULIB_ENABLED_strtoull_TRUE=
26190 gl_GNULIB_ENABLED_strtoull_FALSE='#'
26191else
26192 gl_GNULIB_ENABLED_strtoull_TRUE='#'
26193 gl_GNULIB_ENABLED_strtoull_FALSE=
f199cab1 26194fi
067d23c9 26195
5476a9a4
GM
26196 if $gl_gnulib_enabled_verify; then
26197 gl_GNULIB_ENABLED_verify_TRUE=
26198 gl_GNULIB_ENABLED_verify_FALSE='#'
26199else
26200 gl_GNULIB_ENABLED_verify_TRUE='#'
26201 gl_GNULIB_ENABLED_verify_FALSE=
26202fi
067d23c9 26203
710f5812
GM
26204 if $gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec; then
26205 gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_TRUE=
26206 gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_FALSE='#'
26207else
26208 gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_TRUE='#'
26209 gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_FALSE=
26210fi
26211
5476a9a4 26212 # End of code from modules
067d23c9 26213
067d23c9 26214
067d23c9 26215
067d23c9 26216
f199cab1 26217
f199cab1
GM
26218
26219
067d23c9 26220
5476a9a4
GM
26221
26222 gltests_libdeps=
26223 gltests_ltlibdeps=
067d23c9 26224
067d23c9 26225
067d23c9
KY
26226
26227
067d23c9
KY
26228
26229
3e0be4ab 26230
3e0be4ab 26231
3e0be4ab 26232
5476a9a4
GM
26233 gl_source_base='tests'
26234 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 26235
5476a9a4 26236 gl_module_indicator_condition=$gltests_WITNESS
3e0be4ab
GM
26237
26238
26239
26240
26241
067d23c9
KY
26242
26243
26244
3e0be4ab 26245
3e0be4ab 26246
5476a9a4
GM
26247 LIBGNU_LIBDEPS="$gl_libdeps"
26248
26249 LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
26250
067d23c9 26251
5476a9a4
GM
26252CFLAGS=$SAVE_CFLAGS
26253LIBS=$SAVE_LIBS
067d23c9
KY
26254
26255case "$opsys" in
26256 aix4-2) LD_SWITCH_SYSTEM_TEMACS="-Wl,-bnodelcsect" ;;
26257
26258 darwin)
26259 ## The -headerpad option tells ld (see man page) to leave room at the
26260 ## end of the header for adding load commands. Needed for dumping.
26261 ## 0x690 is the total size of 30 segment load commands (at 56
26262 ## each); under Cocoa 31 commands are required.
26263 if test "$HAVE_NS" = "yes"; then
26264 libs_nsgui="-framework AppKit"
26265 headerpad_extra=6C8
26266 else
26267 libs_nsgui=
26268 headerpad_extra=690
26269 fi
85cf5029 26270 LD_SWITCH_SYSTEM_TEMACS="-fno-pie -prebind $libs_nsgui -Xlinker -headerpad -Xlinker $headerpad_extra"
067d23c9
KY
26271
26272 ## This is here because src/Makefile.in did some extra fiddling around
26273 ## with LD_SWITCH_SYSTEM. The cpp logic was:
26274 ## #ifndef LD_SWITCH_SYSTEM
26275 ## #if !defined (__GNUC__) && ((defined (BSD_SYSTEM) && !defined (COFF)))
26276 ## Since all the *bsds define LD_SWITCH_SYSTEM, this simplifies to:
42bbbe8b 26277 ## not using gcc, darwin.
067d23c9
KY
26278 ## Because this was done in src/Makefile.in, the resulting part of
26279 ## LD_SWITCH_SYSTEM was not used in configure (ie, in ac_link).
26280 ## It therefore seems cleaner to put this in LD_SWITCH_SYSTEM_TEMACS,
26281 ## rather than LD_SWITCH_SYSTEM.
26282 test "x$LD_SWITCH_SYSTEM" = "x" && test "x$GCC" != "xyes" && \
26283 LD_SWITCH_SYSTEM_TEMACS="-X $LD_SWITCH_SYSTEM_TEMACS"
26284 ;;
26285
ae629dae
GM
26286 ## LD_SWITCH_X_SITE_RPATH is a -rpath option saying where to
26287 ## find X at run-time.
26288 ## When handled by cpp, this was in LD_SWITCH_SYSTEM. However, at the
26289 ## point where configure sourced the s/*.h file, LD_SWITCH_X_SITE_RPATH
067d23c9
KY
26290 ## had not yet been defined and was expanded to null. Hence LD_SWITCH_SYSTEM
26291 ## had different values in configure (in ac_link) and src/Makefile.in.
26292 ## It seems clearer therefore to put this piece in LD_SWITCH_SYSTEM_TEMACS.
ae629dae 26293 gnu*) LD_SWITCH_SYSTEM_TEMACS="\$(LD_SWITCH_X_SITE_RPATH)" ;;
067d23c9
KY
26294
26295 *) LD_SWITCH_SYSTEM_TEMACS= ;;
26296esac
26297
067d23c9
KY
26298
26299
26300
26301LD_FIRSTFLAG=
26302ORDINARY_LINK=
26303case "$opsys" in
26304 ## gnu: GNU needs its own crt0.
26305 aix4-2|cygwin|darwin|gnu|hpux*|irix6-5|sol2*|unixware) ORDINARY_LINK=yes ;;
26306
26307 ## On post 1.3 releases of NetBSD, gcc -nostdlib also clears the
26308 ## library search parth, i.e. it won't search /usr/lib for libc and
26309 ## friends. Using -nostartfiles instead avoids this problem, and
26310 ## will also work on earlier NetBSD releases.
26311 netbsd|openbsd) LD_FIRSTFLAG="-nostartfiles" ;;
26312
42bbbe8b 26313 ## powerpc*: NAKAJI Hiroyuki <nakaji@tutrp.tut.ac.jp> says
067d23c9 26314 ## MkLinux/LinuxPPC needs this.
42bbbe8b 26315 ## s390x-* only supports opsys = gnu-linux so it can be added here.
067d23c9 26316 gnu-*)
42bbbe8b
GM
26317 case "$canonical" in
26318 powerpc*|s390x-*) LD_FIRSTFLAG="-nostdlib" ;;
067d23c9
KY
26319 esac
26320 ;;
26321esac
26322
26323
26324if test "x$ORDINARY_LINK" = "xyes"; then
26325
26326 LD_FIRSTFLAG=""
26327
26328$as_echo "#define ORDINARY_LINK 1" >>confdefs.h
26329
26330
26331## The system files defining neither ORDINARY_LINK nor LD_FIRSTFLAG are:
42bbbe8b 26332## freebsd, gnu-* not on powerpc*|s390x*.
067d23c9
KY
26333elif test "x$GCC" = "xyes" && test "x$LD_FIRSTFLAG" = "x"; then
26334
26335 ## Versions of GCC >= 2.0 put their library, libgcc.a, in obscure
26336 ## places that are difficult to figure out at make time. Fortunately,
26337 ## these same versions allow you to pass arbitrary flags on to the
26338 ## linker, so there is no reason not to use it as a linker.
26339 ##
26340 ## Well, it is not quite perfect. The "-nostdlib" keeps GCC from
26341 ## searching for libraries in its internal directories, so we have to
26342 ## ask GCC explicitly where to find libgcc.a (LIB_GCC below).
26343 LD_FIRSTFLAG="-nostdlib"
26344fi
26345
26346## FIXME? What setting of EDIT_LDFLAGS should this have?
26347test "$NS_IMPL_GNUSTEP" = "yes" && LD_FIRSTFLAG="-rdynamic"
26348
26349
26350
26351
26352## FIXME? The logic here is not precisely the same as that above.
26353## There is no check here for a pre-defined LD_FIRSTFLAG.
26354## Should we only be setting LIB_GCC if LD ~ -nostdlib?
26355LIB_GCC=
26356if test "x$GCC" = "xyes" && test "x$ORDINARY_LINK" != "xyes"; then
26357
26358 case "$opsys" in
26359 freebsd|netbsd|openbsd) LIB_GCC= ;;
26360
26361 gnu-*)
26362 ## armin76@gentoo.org reported that the lgcc_s flag is necessary to
26363 ## build on ARM EABI under GNU/Linux. (Bug#5518)
d6a003a8
AS
26364 case $host_cpu in
26365 arm*)
067d23c9 26366 LIB_GCC="-lgcc_s"
d6a003a8
AS
26367 ;;
26368 *)
067d23c9
KY
26369 ## FIXME? s/gnu-linux.h used to define LIB_GCC as below, then
26370 ## immediately undefine it again and redefine it to empty.
26371 ## Was the C_SWITCH_X_SITE part really necessary?
26372## LIB_GCC=`$CC $C_SWITCH_X_SITE -print-libgcc-file-name`
26373 LIB_GCC=
d6a003a8
AS
26374 ;;
26375 esac
067d23c9
KY
26376 ;;
26377
26378 ## Ask GCC where to find libgcc.a.
26379 *) LIB_GCC=`$CC -print-libgcc-file-name 2> /dev/null` ;;
26380 esac
26381fi
26382
42dcba54
GM
26383## Common for all window systems
26384if test "$window_system" != "none"; then
067d23c9
KY
26385
26386$as_echo "#define HAVE_WINDOW_SYSTEM 1" >>confdefs.h
26387
42dcba54 26388 WINDOW_SYSTEM_OBJ="fontset.o fringe.o image.o"
067d23c9
KY
26389fi
26390
26391
26392
26393
42dcba54 26394
067d23c9
KY
26395#### Report on what we decided to do.
26396#### Report GTK as a toolkit, even if it doesn't use Xt.
26397#### It makes printing result more understandable as using GTK sets
26398#### toolkit_scroll_bars to yes by default.
26399if test "${HAVE_GTK}" = "yes"; then
a732eace 26400 USE_X_TOOLKIT="$USE_GTK_TOOLKIT"
067d23c9
KY
26401fi
26402
26403echo "
26404Configured for \`${canonical}'.
26405
26406 Where should the build process find the source code? ${srcdir}
067d23c9
KY
26407 What compiler should emacs be built with? ${CC} ${CFLAGS}
26408 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
26409 Should Emacs use a relocating allocator for buffers? ${REL_ALLOC}
26410 Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers
26411 What window system should Emacs use? ${window_system}
26412 What toolkit should Emacs use? ${USE_X_TOOLKIT}"
26413
26414if test -n "${x_includes}"; then
26415echo " Where do we find X Windows header files? ${x_includes}"
26416else
26417echo " Where do we find X Windows header files? Standard dirs"
26418fi
26419if test -n "${x_libraries}"; then
26420echo " Where do we find X Windows libraries? ${x_libraries}"
26421else
26422echo " Where do we find X Windows libraries? Standard dirs"
26423fi
26424
26425echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}"
26426echo " Does Emacs use -lXpm? ${HAVE_XPM}"
26427echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
26428echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
26429echo " Does Emacs use a gif library? ${HAVE_GIF} $LIBGIF"
26430echo " Does Emacs use -lpng? ${HAVE_PNG}"
26431echo " Does Emacs use -lrsvg-2? ${HAVE_RSVG}"
26432echo " Does Emacs use imagemagick? ${HAVE_IMAGEMAGICK}"
26433
26434echo " Does Emacs use -lgpm? ${HAVE_GPM}"
26435echo " Does Emacs use -ldbus? ${HAVE_DBUS}"
26436echo " Does Emacs use -lgconf? ${HAVE_GCONF}"
f527bd02 26437echo " Does Emacs use GSettings? ${HAVE_GSETTINGS}"
067d23c9 26438echo " Does Emacs use -lselinux? ${HAVE_LIBSELINUX}"
27f5a136 26439echo " Does Emacs use -lgnutls? ${HAVE_GNUTLS}"
067d23c9
KY
26440echo " Does Emacs use -lxml2? ${HAVE_LIBXML2}"
26441
26442echo " Does Emacs use -lfreetype? ${HAVE_FREETYPE}"
26443echo " Does Emacs use -lm17n-flt? ${HAVE_M17N_FLT}"
26444echo " Does Emacs use -lotf? ${HAVE_LIBOTF}"
26445echo " Does Emacs use -lxft? ${HAVE_XFT}"
26446
26447echo " Does Emacs use toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
26448echo
26449
eb39a72d
GM
26450if test -n "${EMACSDATA}"; then
26451 echo " Environment variable EMACSDATA set to: $EMACSDATA"
26452fi
26453if test -n "${EMACSDOC}"; then
26454 echo " Environment variable EMACSDOC set to: $EMACSDOC"
26455fi
26456
067d23c9
KY
26457echo
26458
26459if test "$HAVE_NS" = "yes"; then
26460 echo
3d0788a9 26461 echo "You must run \"${MAKE-make} install\" in order to test the built application.
067d23c9
KY
26462The installed application will go to nextstep/Emacs.app and can be
26463run or moved from there."
26464 if test "$EN_NS_SELF_CONTAINED" = "yes"; then
26465 echo "The application will be fully self-contained."
26466 else
26467 echo "The lisp resources for the application will be installed under ${prefix}.
3d0788a9 26468You may need to run \"${MAKE-make} install\" with sudo. The application will fail
067d23c9
KY
26469to run if these resources are not installed."
26470 fi
26471 echo
26472fi
26473
031fabfc
GM
26474if test "${opsys}" = "cygwin"; then
26475 case `uname -r` in
26476 1.5.*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: building Emacs on Cygwin 1.5 is not supported." >&5
26477$as_echo "$as_me: WARNING: building Emacs on Cygwin 1.5 is not supported." >&2;}
26478 echo
26479 ;;
26480 esac
26481fi
067d23c9
KY
26482
26483# Remove any trailing slashes in these variables.
26484test "${prefix}" != NONE &&
26485 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
26486test "${exec_prefix}" != NONE &&
26487 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
26488
bb7dce39
GM
26489if test "$HAVE_NS" = "yes"; then
26490 if test "$NS_IMPL_GNUSTEP" = yes; then
26491 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"
26492
26493 else
26494 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"
26495
26496 fi
26497fi
26498
26499SUBDIR_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 26500
bb7dce39 26501ac_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 26502
a877df06 26503
73b78882 26504opt_makefile=test/automated/Makefile
a877df06 26505
b5591ebb 26506if test -f "$srcdir/$opt_makefile.in"; then
73b78882 26507 SUBDIR_MAKEFILES="$SUBDIR_MAKEFILES $opt_makefile"
56ade35c 26508 ac_config_files="$ac_config_files test/automated/Makefile"
a877df06 26509
56ade35c 26510fi
73b78882 26511
40b65096
GM
26512
26513opt_makefile=admin/unidata/Makefile
26514
b5591ebb 26515if test -f "$srcdir/$opt_makefile.in"; then
40b65096
GM
26516 SUBDIR_MAKEFILES="$SUBDIR_MAKEFILES $opt_makefile"
26517 ac_config_files="$ac_config_files admin/unidata/Makefile"
26518
26519fi
26520
26521
56ade35c 26522SUBDIR_MAKEFILES_IN=`echo " ${SUBDIR_MAKEFILES}" | sed -e 's| | $(srcdir)/|g' -e 's|Makefile|Makefile.in|g'`
73b78882 26523
067d23c9 26524
9411886d
PE
26525
26526ac_config_commands="$ac_config_commands mkdirs"
26527
26528
26529ac_config_commands="$ac_config_commands epaths"
26530
26531
26532ac_config_commands="$ac_config_commands gdbinit"
26533
067d23c9
KY
26534
26535cat >confcache <<\_ACEOF
26536# This file is a shell script that caches the results of configure
26537# tests run on this system so they can be shared between configure
26538# scripts and configure runs, see configure's option --config-cache.
26539# It is not useful on other systems. If it contains results you don't
26540# want to keep, you may remove or edit it.
26541#
26542# config.status only pays attention to the cache file if you give it
26543# the --recheck option to rerun configure.
26544#
26545# `ac_cv_env_foo' variables (set or unset) will be overridden when
26546# loading this file, other *unset* `ac_cv_foo' will be assigned the
26547# following values.
26548
26549_ACEOF
26550
26551# The following way of writing the cache mishandles newlines in values,
26552# but we know of no workaround that is simple, portable, and efficient.
26553# So, we kill variables containing newlines.
26554# Ultrix sh set writes to stderr and can't be redirected directly,
26555# and sets the high bit in the cache file unless we assign to the vars.
26556(
26557 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
26558 eval ac_val=\$$ac_var
26559 case $ac_val in #(
26560 *${as_nl}*)
26561 case $ac_var in #(
26562 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
26563$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
26564 esac
26565 case $ac_var in #(
26566 _ | IFS | as_nl) ;; #(
26567 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
26568 *) { eval $ac_var=; unset $ac_var;} ;;
26569 esac ;;
26570 esac
26571 done
26572
26573 (set) 2>&1 |
26574 case $as_nl`(ac_space=' '; set) 2>&1` in #(
26575 *${as_nl}ac_space=\ *)
26576 # `set' does not quote correctly, so add quotes: double-quote
26577 # substitution turns \\\\ into \\, and sed turns \\ into \.
26578 sed -n \
26579 "s/'/'\\\\''/g;
26580 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
26581 ;; #(
26582 *)
26583 # `set' quotes correctly as required by POSIX, so do not add quotes.
26584 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
26585 ;;
26586 esac |
26587 sort
26588) |
26589 sed '
26590 /^ac_cv_env_/b end
26591 t clear
26592 :clear
26593 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
26594 t end
26595 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
26596 :end' >>confcache
26597if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
26598 if test -w "$cache_file"; then
a9bec17c 26599 test "x$cache_file" != "x/dev/null" &&
067d23c9
KY
26600 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
26601$as_echo "$as_me: updating cache $cache_file" >&6;}
a9bec17c 26602 cat confcache >$cache_file
067d23c9
KY
26603 else
26604 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
26605$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
26606 fi
26607fi
26608rm -f confcache
26609
26610test "x$prefix" = xNONE && prefix=$ac_default_prefix
26611# Let make expand exec_prefix.
26612test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
26613
26614DEFS=-DHAVE_CONFIG_H
26615
26616ac_libobjs=
26617ac_ltlibobjs=
26618for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
26619 # 1. Remove the extension, and $U if already installed.
26620 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
26621 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
26622 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
26623 # will be set to the directory where LIBOBJS objects are built.
26624 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
26625 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
26626done
26627LIBOBJS=$ac_libobjs
26628
26629LTLIBOBJS=$ac_ltlibobjs
26630
26631
743c80a7
PE
26632 if test -n "$EXEEXT"; then
26633 am__EXEEXT_TRUE=
26634 am__EXEEXT_FALSE='#'
26635else
26636 am__EXEEXT_TRUE='#'
26637 am__EXEEXT_FALSE=
26638fi
26639
26640if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
a9bec17c 26641 as_fn_error "conditional \"AMDEP\" was never defined.
743c80a7
PE
26642Usually this means the macro was only invoked conditionally." "$LINENO" 5
26643fi
26644if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
a9bec17c 26645 as_fn_error "conditional \"am__fastdepCC\" was never defined.
743c80a7
PE
26646Usually this means the macro was only invoked conditionally." "$LINENO" 5
26647fi
743c80a7 26648if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
a9bec17c 26649 as_fn_error "conditional \"GL_COND_LIBTOOL\" was never defined.
743c80a7
PE
26650Usually this means the macro was only invoked conditionally." "$LINENO" 5
26651fi
4fc2b746 26652if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
a9bec17c 26653 as_fn_error "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
4fc2b746
GM
26654Usually this means the macro was only invoked conditionally." "$LINENO" 5
26655fi
743c80a7 26656
8966cbff
GM
26657if test -z "${GL_GENERATE_EXECINFO_H_TRUE}" && test -z "${GL_GENERATE_EXECINFO_H_FALSE}"; then
26658 as_fn_error "conditional \"GL_GENERATE_EXECINFO_H\" was never defined.
26659Usually this means the macro was only invoked conditionally." "$LINENO" 5
26660fi
4fda9c95 26661if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
a9bec17c 26662 as_fn_error "conditional \"GL_GENERATE_STDINT_H\" was never defined.
4fda9c95
GM
26663Usually this means the macro was only invoked conditionally." "$LINENO" 5
26664fi
0eb775a3
GM
26665if test -z "${GL_GENERATE_STDALIGN_H_TRUE}" && test -z "${GL_GENERATE_STDALIGN_H_FALSE}"; then
26666 as_fn_error "conditional \"GL_GENERATE_STDALIGN_H\" was never defined.
26667Usually this means the macro was only invoked conditionally." "$LINENO" 5
26668fi
6d153f56 26669if test -z "${GL_GENERATE_STDARG_H_TRUE}" && test -z "${GL_GENERATE_STDARG_H_FALSE}"; then
a9bec17c 26670 as_fn_error "conditional \"GL_GENERATE_STDARG_H\" was never defined.
6d153f56
GM
26671Usually this means the macro was only invoked conditionally." "$LINENO" 5
26672fi
6c051bab 26673if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
a9bec17c 26674 as_fn_error "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
6c051bab
GM
26675Usually this means the macro was only invoked conditionally." "$LINENO" 5
26676fi
26677if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
a9bec17c 26678 as_fn_error "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
6c051bab
GM
26679Usually this means the macro was only invoked conditionally." "$LINENO" 5
26680fi
d7ad186c
GM
26681if test -z "${gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_TRUE}" && test -z "${gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_FALSE}"; then
26682 as_fn_error "conditional \"gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b\" was never defined.
26683Usually this means the macro was only invoked conditionally." "$LINENO" 5
26684fi
6d153f56 26685if test -z "${gl_GNULIB_ENABLED_dosname_TRUE}" && test -z "${gl_GNULIB_ENABLED_dosname_FALSE}"; then
a9bec17c 26686 as_fn_error "conditional \"gl_GNULIB_ENABLED_dosname\" was never defined.
6d153f56
GM
26687Usually this means the macro was only invoked conditionally." "$LINENO" 5
26688fi
710f5812
GM
26689if test -z "${gl_GNULIB_ENABLED_euidaccess_TRUE}" && test -z "${gl_GNULIB_ENABLED_euidaccess_FALSE}"; then
26690 as_fn_error "conditional \"gl_GNULIB_ENABLED_euidaccess\" was never defined.
26691Usually this means the macro was only invoked conditionally." "$LINENO" 5
26692fi
26693if test -z "${gl_GNULIB_ENABLED_getgroups_TRUE}" && test -z "${gl_GNULIB_ENABLED_getgroups_FALSE}"; then
26694 as_fn_error "conditional \"gl_GNULIB_ENABLED_getgroups\" was never defined.
26695Usually this means the macro was only invoked conditionally." "$LINENO" 5
26696fi
6d153f56 26697if test -z "${gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE}" && test -z "${gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE}"; then
a9bec17c 26698 as_fn_error "conditional \"gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36\" was never defined.
6d153f56
GM
26699Usually this means the macro was only invoked conditionally." "$LINENO" 5
26700fi
710f5812
GM
26701if test -z "${gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_TRUE}" && test -z "${gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_FALSE}"; then
26702 as_fn_error "conditional \"gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1\" was never defined.
26703Usually this means the macro was only invoked conditionally." "$LINENO" 5
26704fi
d7ad186c
GM
26705if test -z "${gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_TRUE}" && test -z "${gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_FALSE}"; then
26706 as_fn_error "conditional \"gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7\" was never defined.
26707Usually this means the macro was only invoked conditionally." "$LINENO" 5
26708fi
a0a61e58
GM
26709if test -z "${gl_GNULIB_ENABLED_pathmax_TRUE}" && test -z "${gl_GNULIB_ENABLED_pathmax_FALSE}"; then
26710 as_fn_error "conditional \"gl_GNULIB_ENABLED_pathmax\" was never defined.
26711Usually this means the macro was only invoked conditionally." "$LINENO" 5
26712fi
710f5812
GM
26713if test -z "${gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_TRUE}" && test -z "${gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_FALSE}"; then
26714 as_fn_error "conditional \"gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c\" was never defined.
26715Usually this means the macro was only invoked conditionally." "$LINENO" 5
26716fi
6d153f56 26717if test -z "${gl_GNULIB_ENABLED_stat_TRUE}" && test -z "${gl_GNULIB_ENABLED_stat_FALSE}"; then
a9bec17c 26718 as_fn_error "conditional \"gl_GNULIB_ENABLED_stat\" was never defined.
6d153f56
GM
26719Usually this means the macro was only invoked conditionally." "$LINENO" 5
26720fi
3e0be4ab 26721if test -z "${gl_GNULIB_ENABLED_strtoll_TRUE}" && test -z "${gl_GNULIB_ENABLED_strtoll_FALSE}"; then
a9bec17c 26722 as_fn_error "conditional \"gl_GNULIB_ENABLED_strtoll\" was never defined.
3e0be4ab
GM
26723Usually this means the macro was only invoked conditionally." "$LINENO" 5
26724fi
6d153f56 26725if test -z "${gl_GNULIB_ENABLED_strtoull_TRUE}" && test -z "${gl_GNULIB_ENABLED_strtoull_FALSE}"; then
a9bec17c 26726 as_fn_error "conditional \"gl_GNULIB_ENABLED_strtoull\" was never defined.
6d153f56
GM
26727Usually this means the macro was only invoked conditionally." "$LINENO" 5
26728fi
26729if test -z "${gl_GNULIB_ENABLED_verify_TRUE}" && test -z "${gl_GNULIB_ENABLED_verify_FALSE}"; then
a9bec17c 26730 as_fn_error "conditional \"gl_GNULIB_ENABLED_verify\" was never defined.
6d153f56 26731Usually this means the macro was only invoked conditionally." "$LINENO" 5
710f5812
GM
26732fi
26733if test -z "${gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_TRUE}" && test -z "${gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_FALSE}"; then
26734 as_fn_error "conditional \"gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec\" was never defined.
26735Usually this means the macro was only invoked conditionally." "$LINENO" 5
6c051bab 26736fi
942f733f 26737
743c80a7
PE
26738 gl_libobjs=
26739 gl_ltlibobjs=
26740 if test -n "$gl_LIBOBJS"; then
26741 # Remove the extension.
26742 sed_drop_objext='s/\.o$//;s/\.obj$//'
26743 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
26744 gl_libobjs="$gl_libobjs $i.$ac_objext"
26745 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
26746 done
26747 fi
26748 gl_LIBOBJS=$gl_libobjs
26749
26750 gl_LTLIBOBJS=$gl_ltlibobjs
26751
26752
26753
26754 gltests_libobjs=
26755 gltests_ltlibobjs=
26756 if test -n "$gltests_LIBOBJS"; then
26757 # Remove the extension.
26758 sed_drop_objext='s/\.o$//;s/\.obj$//'
26759 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
26760 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
26761 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
26762 done
26763 fi
26764 gltests_LIBOBJS=$gltests_libobjs
26765
26766 gltests_LTLIBOBJS=$gltests_ltlibobjs
26767
067d23c9
KY
26768
26769
a9bec17c 26770: ${CONFIG_STATUS=./config.status}
067d23c9
KY
26771ac_write_fail=0
26772ac_clean_files_save=$ac_clean_files
26773ac_clean_files="$ac_clean_files $CONFIG_STATUS"
26774{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
26775$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
26776as_write_fail=0
26777cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
26778#! $SHELL
26779# Generated by $as_me.
26780# Run this file to recreate the current configuration.
26781# Compiler output produced by configure, useful for debugging
26782# configure, is in config.log if it exists.
26783
26784debug=false
26785ac_cs_recheck=false
26786ac_cs_silent=false
26787
26788SHELL=\${CONFIG_SHELL-$SHELL}
26789export SHELL
26790_ASEOF
26791cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
26792## -------------------- ##
26793## M4sh Initialization. ##
26794## -------------------- ##
26795
26796# Be more Bourne compatible
26797DUALCASE=1; export DUALCASE # for MKS sh
26798if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
26799 emulate sh
26800 NULLCMD=:
26801 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
26802 # is contrary to our usage. Disable this feature.
26803 alias -g '${1+"$@"}'='"$@"'
26804 setopt NO_GLOB_SUBST
26805else
26806 case `(set -o) 2>/dev/null` in #(
26807 *posix*) :
26808 set -o posix ;; #(
26809 *) :
26810 ;;
26811esac
26812fi
26813
26814
26815as_nl='
26816'
26817export as_nl
26818# Printing a long string crashes Solaris 7 /usr/bin/printf.
26819as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
26820as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
26821as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
26822# Prefer a ksh shell builtin over an external printf program on Solaris,
26823# but without wasting forks for bash or zsh.
26824if test -z "$BASH_VERSION$ZSH_VERSION" \
26825 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
26826 as_echo='print -r --'
26827 as_echo_n='print -rn --'
26828elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
26829 as_echo='printf %s\n'
26830 as_echo_n='printf %s'
26831else
26832 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
26833 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
26834 as_echo_n='/usr/ucb/echo -n'
26835 else
26836 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
26837 as_echo_n_body='eval
26838 arg=$1;
26839 case $arg in #(
26840 *"$as_nl"*)
26841 expr "X$arg" : "X\\(.*\\)$as_nl";
26842 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
26843 esac;
26844 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
26845 '
26846 export as_echo_n_body
26847 as_echo_n='sh -c $as_echo_n_body as_echo'
26848 fi
26849 export as_echo_body
26850 as_echo='sh -c $as_echo_body as_echo'
26851fi
26852
26853# The user is always right.
26854if test "${PATH_SEPARATOR+set}" != set; then
26855 PATH_SEPARATOR=:
26856 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
26857 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
26858 PATH_SEPARATOR=';'
26859 }
26860fi
26861
26862
26863# IFS
26864# We need space, tab and new line, in precisely that order. Quoting is
26865# there to prevent editors from complaining about space-tab.
26866# (If _AS_PATH_WALK were called with IFS unset, it would disable word
26867# splitting by setting IFS to empty value.)
26868IFS=" "" $as_nl"
26869
26870# Find who we are. Look in the path if we contain no directory separator.
26871case $0 in #((
26872 *[\\/]* ) as_myself=$0 ;;
26873 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26874for as_dir in $PATH
26875do
26876 IFS=$as_save_IFS
26877 test -z "$as_dir" && as_dir=.
26878 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
26879 done
26880IFS=$as_save_IFS
26881
26882 ;;
26883esac
26884# We did not find ourselves, most probably we were run as `sh COMMAND'
26885# in which case we are not to be found in the path.
26886if test "x$as_myself" = x; then
26887 as_myself=$0
26888fi
26889if test ! -f "$as_myself"; then
26890 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
26891 exit 1
26892fi
26893
26894# Unset variables that we do not need and which cause bugs (e.g. in
26895# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
26896# suppresses any "Segmentation fault" message there. '((' could
26897# trigger a bug in pdksh 5.2.14.
26898for as_var in BASH_ENV ENV MAIL MAILPATH
26899do eval test x\${$as_var+set} = xset \
26900 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
26901done
26902PS1='$ '
26903PS2='> '
26904PS4='+ '
26905
26906# NLS nuisances.
26907LC_ALL=C
26908export LC_ALL
26909LANGUAGE=C
26910export LANGUAGE
26911
26912# CDPATH.
26913(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
26914
26915
a9bec17c
GM
26916# as_fn_error ERROR [LINENO LOG_FD]
26917# ---------------------------------
067d23c9
KY
26918# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
26919# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
a9bec17c 26920# script with status $?, using 1 if that was 0.
067d23c9
KY
26921as_fn_error ()
26922{
a9bec17c
GM
26923 as_status=$?; test $as_status -eq 0 && as_status=1
26924 if test "$3"; then
26925 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
26926 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
067d23c9 26927 fi
a9bec17c 26928 $as_echo "$as_me: error: $1" >&2
067d23c9
KY
26929 as_fn_exit $as_status
26930} # as_fn_error
26931
26932
26933# as_fn_set_status STATUS
26934# -----------------------
26935# Set $? to STATUS, without forking.
26936as_fn_set_status ()
26937{
26938 return $1
26939} # as_fn_set_status
26940
26941# as_fn_exit STATUS
26942# -----------------
26943# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
26944as_fn_exit ()
26945{
26946 set +e
26947 as_fn_set_status $1
26948 exit $1
26949} # as_fn_exit
26950
26951# as_fn_unset VAR
26952# ---------------
26953# Portably unset VAR.
26954as_fn_unset ()
26955{
26956 { eval $1=; unset $1;}
26957}
26958as_unset=as_fn_unset
26959# as_fn_append VAR VALUE
26960# ----------------------
26961# Append the text in VALUE to the end of the definition contained in VAR. Take
26962# advantage of any shell optimizations that allow amortized linear growth over
26963# repeated appends, instead of the typical quadratic growth present in naive
26964# implementations.
26965if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
26966 eval 'as_fn_append ()
26967 {
26968 eval $1+=\$2
26969 }'
26970else
26971 as_fn_append ()
26972 {
26973 eval $1=\$$1\$2
26974 }
26975fi # as_fn_append
26976
26977# as_fn_arith ARG...
26978# ------------------
26979# Perform arithmetic evaluation on the ARGs, and store the result in the
26980# global $as_val. Take advantage of shells that can avoid forks. The arguments
26981# must be portable across $(()) and expr.
26982if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
26983 eval 'as_fn_arith ()
26984 {
26985 as_val=$(( $* ))
26986 }'
26987else
26988 as_fn_arith ()
26989 {
26990 as_val=`expr "$@" || test $? -eq 1`
26991 }
26992fi # as_fn_arith
26993
26994
26995if expr a : '\(a\)' >/dev/null 2>&1 &&
26996 test "X`expr 00001 : '.*\(...\)'`" = X001; then
26997 as_expr=expr
26998else
26999 as_expr=false
27000fi
27001
27002if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
27003 as_basename=basename
27004else
27005 as_basename=false
27006fi
27007
27008if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
27009 as_dirname=dirname
27010else
27011 as_dirname=false
27012fi
27013
27014as_me=`$as_basename -- "$0" ||
27015$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
27016 X"$0" : 'X\(//\)$' \| \
27017 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
27018$as_echo X/"$0" |
27019 sed '/^.*\/\([^/][^/]*\)\/*$/{
27020 s//\1/
27021 q
27022 }
27023 /^X\/\(\/\/\)$/{
27024 s//\1/
27025 q
27026 }
27027 /^X\/\(\/\).*/{
27028 s//\1/
27029 q
27030 }
27031 s/.*/./; q'`
27032
27033# Avoid depending upon Character Ranges.
27034as_cr_letters='abcdefghijklmnopqrstuvwxyz'
27035as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
27036as_cr_Letters=$as_cr_letters$as_cr_LETTERS
27037as_cr_digits='0123456789'
27038as_cr_alnum=$as_cr_Letters$as_cr_digits
27039
27040ECHO_C= ECHO_N= ECHO_T=
27041case `echo -n x` in #(((((
27042-n*)
27043 case `echo 'xy\c'` in
27044 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
27045 xy) ECHO_C='\c';;
27046 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
27047 ECHO_T=' ';;
27048 esac;;
27049*)
27050 ECHO_N='-n';;
27051esac
27052
27053rm -f conf$$ conf$$.exe conf$$.file
27054if test -d conf$$.dir; then
27055 rm -f conf$$.dir/conf$$.file
27056else
27057 rm -f conf$$.dir
27058 mkdir conf$$.dir 2>/dev/null
27059fi
27060if (echo >conf$$.file) 2>/dev/null; then
27061 if ln -s conf$$.file conf$$ 2>/dev/null; then
27062 as_ln_s='ln -s'
27063 # ... but there are two gotchas:
27064 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
27065 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
27066 # In both cases, we have to default to `cp -p'.
27067 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
27068 as_ln_s='cp -p'
27069 elif ln conf$$.file conf$$ 2>/dev/null; then
27070 as_ln_s=ln
27071 else
27072 as_ln_s='cp -p'
27073 fi
27074else
27075 as_ln_s='cp -p'
27076fi
27077rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
27078rmdir conf$$.dir 2>/dev/null
27079
27080
27081# as_fn_mkdir_p
27082# -------------
27083# Create "$as_dir" as a directory, including parents if necessary.
27084as_fn_mkdir_p ()
27085{
27086
27087 case $as_dir in #(
27088 -*) as_dir=./$as_dir;;
27089 esac
27090 test -d "$as_dir" || eval $as_mkdir_p || {
27091 as_dirs=
27092 while :; do
27093 case $as_dir in #(
27094 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
27095 *) as_qdir=$as_dir;;
27096 esac
27097 as_dirs="'$as_qdir' $as_dirs"
27098 as_dir=`$as_dirname -- "$as_dir" ||
27099$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
27100 X"$as_dir" : 'X\(//\)[^/]' \| \
27101 X"$as_dir" : 'X\(//\)$' \| \
27102 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
27103$as_echo X"$as_dir" |
27104 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
27105 s//\1/
27106 q
27107 }
27108 /^X\(\/\/\)[^/].*/{
27109 s//\1/
27110 q
27111 }
27112 /^X\(\/\/\)$/{
27113 s//\1/
27114 q
27115 }
27116 /^X\(\/\).*/{
27117 s//\1/
27118 q
27119 }
27120 s/.*/./; q'`
27121 test -d "$as_dir" && break
27122 done
27123 test -z "$as_dirs" || eval "mkdir $as_dirs"
a9bec17c 27124 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
067d23c9
KY
27125
27126
27127} # as_fn_mkdir_p
27128if mkdir -p . 2>/dev/null; then
27129 as_mkdir_p='mkdir -p "$as_dir"'
27130else
27131 test -d ./-p && rmdir ./-p
27132 as_mkdir_p=false
27133fi
27134
27135if test -x / >/dev/null 2>&1; then
27136 as_test_x='test -x'
27137else
27138 if ls -dL / >/dev/null 2>&1; then
27139 as_ls_L_option=L
27140 else
27141 as_ls_L_option=
27142 fi
27143 as_test_x='
27144 eval sh -c '\''
27145 if test -d "$1"; then
27146 test -d "$1/.";
27147 else
27148 case $1 in #(
27149 -*)set "./$1";;
27150 esac;
27151 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
27152 ???[sx]*):;;*)false;;esac;fi
27153 '\'' sh
27154 '
27155fi
27156as_executable_p=$as_test_x
27157
27158# Sed expression to map a string onto a valid CPP name.
27159as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
27160
27161# Sed expression to map a string onto a valid variable name.
27162as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
27163
27164
27165exec 6>&1
27166## ----------------------------------- ##
27167## Main body of $CONFIG_STATUS script. ##
27168## ----------------------------------- ##
27169_ASEOF
27170test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
27171
27172cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27173# Save the log message, to keep $0 and so on meaningful, and to
27174# report actual input values of CONFIG_FILES etc. instead of their
27175# values after options handling.
27176ac_log="
c574bc34 27177This file was extended by emacs $as_me 24.3.50, which was
a9bec17c 27178generated by GNU Autoconf 2.65. Invocation command line was
067d23c9
KY
27179
27180 CONFIG_FILES = $CONFIG_FILES
27181 CONFIG_HEADERS = $CONFIG_HEADERS
27182 CONFIG_LINKS = $CONFIG_LINKS
27183 CONFIG_COMMANDS = $CONFIG_COMMANDS
27184 $ $0 $@
27185
27186on `(hostname || uname -n) 2>/dev/null | sed 1q`
27187"
27188
27189_ACEOF
27190
27191case $ac_config_files in *"
27192"*) set x $ac_config_files; shift; ac_config_files=$*;;
27193esac
27194
27195case $ac_config_headers in *"
27196"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
27197esac
27198
27199
27200cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27201# Files that config.status was made for.
27202config_files="$ac_config_files"
27203config_headers="$ac_config_headers"
27204config_commands="$ac_config_commands"
27205
27206_ACEOF
27207
27208cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27209ac_cs_usage="\
27210\`$as_me' instantiates files and other configuration actions
27211from templates according to the current configuration. Unless the files
27212and actions are specified as TAGs, all are instantiated by default.
27213
27214Usage: $0 [OPTION]... [TAG]...
27215
27216 -h, --help print this help, then exit
27217 -V, --version print version number and configuration settings, then exit
27218 --config print configuration, then exit
27219 -q, --quiet, --silent
27220 do not print progress messages
27221 -d, --debug don't remove temporary files
27222 --recheck update $as_me by reconfiguring in the same conditions
27223 --file=FILE[:TEMPLATE]
27224 instantiate the configuration file FILE
27225 --header=FILE[:TEMPLATE]
27226 instantiate the configuration header FILE
27227
27228Configuration files:
27229$config_files
27230
27231Configuration headers:
27232$config_headers
27233
27234Configuration commands:
27235$config_commands
27236
27237Report bugs to the package provider."
27238
27239_ACEOF
27240cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27241ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
27242ac_cs_version="\\
c574bc34 27243emacs config.status 24.3.50
a9bec17c 27244configured by $0, generated by GNU Autoconf 2.65,
067d23c9
KY
27245 with options \\"\$ac_cs_config\\"
27246
a9bec17c 27247Copyright (C) 2009 Free Software Foundation, Inc.
067d23c9
KY
27248This config.status script is free software; the Free Software Foundation
27249gives unlimited permission to copy, distribute and modify it."
27250
27251ac_pwd='$ac_pwd'
27252srcdir='$srcdir'
27253INSTALL='$INSTALL'
743c80a7
PE
27254MKDIR_P='$MKDIR_P'
27255AWK='$AWK'
067d23c9
KY
27256test -n "\$AWK" || AWK=awk
27257_ACEOF
27258
27259cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27260# The default lists apply if the user does not specify any file.
27261ac_need_defaults=:
27262while test $# != 0
27263do
27264 case $1 in
a9bec17c 27265 --*=*)
067d23c9
KY
27266 ac_option=`expr "X$1" : 'X\([^=]*\)='`
27267 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
27268 ac_shift=:
27269 ;;
27270 *)
27271 ac_option=$1
27272 ac_optarg=$2
27273 ac_shift=shift
27274 ;;
27275 esac
27276
27277 case $ac_option in
27278 # Handling of the options.
27279 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
27280 ac_cs_recheck=: ;;
27281 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
27282 $as_echo "$ac_cs_version"; exit ;;
27283 --config | --confi | --conf | --con | --co | --c )
27284 $as_echo "$ac_cs_config"; exit ;;
27285 --debug | --debu | --deb | --de | --d | -d )
27286 debug=: ;;
27287 --file | --fil | --fi | --f )
27288 $ac_shift
27289 case $ac_optarg in
27290 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
27291 esac
27292 as_fn_append CONFIG_FILES " '$ac_optarg'"
27293 ac_need_defaults=false;;
27294 --header | --heade | --head | --hea )
27295 $ac_shift
27296 case $ac_optarg in
27297 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
27298 esac
27299 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
27300 ac_need_defaults=false;;
27301 --he | --h)
27302 # Conflict between --help and --header
a9bec17c 27303 as_fn_error "ambiguous option: \`$1'
067d23c9
KY
27304Try \`$0 --help' for more information.";;
27305 --help | --hel | -h )
27306 $as_echo "$ac_cs_usage"; exit ;;
27307 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
27308 | -silent | --silent | --silen | --sile | --sil | --si | --s)
27309 ac_cs_silent=: ;;
27310
27311 # This is an error.
a9bec17c 27312 -*) as_fn_error "unrecognized option: \`$1'
067d23c9
KY
27313Try \`$0 --help' for more information." ;;
27314
27315 *) as_fn_append ac_config_targets " $1"
27316 ac_need_defaults=false ;;
27317
27318 esac
27319 shift
27320done
27321
27322ac_configure_extra_args=
27323
27324if $ac_cs_silent; then
27325 exec 6>/dev/null
27326 ac_configure_extra_args="$ac_configure_extra_args --silent"
27327fi
27328
27329_ACEOF
27330cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27331if \$ac_cs_recheck; then
27332 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
27333 shift
27334 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
27335 CONFIG_SHELL='$SHELL'
27336 export CONFIG_SHELL
27337 exec "\$@"
27338fi
27339
27340_ACEOF
27341cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27342exec 5>>config.log
27343{
27344 echo
27345 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
27346## Running $as_me. ##
27347_ASBOX
27348 $as_echo "$ac_log"
27349} >&5
27350
27351_ACEOF
27352cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27353#
27354# INIT-COMMANDS
27355#
743c80a7 27356AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
5ec54608 27357GCC="$GCC" CPPFLAGS="$CPPFLAGS"
067d23c9
KY
27358
27359_ACEOF
27360
27361cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27362
27363# Handling of arguments.
27364for ac_config_target in $ac_config_targets
27365do
27366 case $ac_config_target in
27367 "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:src/config.in" ;;
743c80a7 27368 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
bb7dce39
GM
27369 "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" ;;
27370 "nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop") CONFIG_FILES="$CONFIG_FILES nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop:nextstep/templates/Emacs.desktop.in" ;;
27371 "nextstep/Cocoa/Emacs.base/Contents/Info.plist") CONFIG_FILES="$CONFIG_FILES nextstep/Cocoa/Emacs.base/Contents/Info.plist:nextstep/templates/Info.plist.in" ;;
27372 "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 27373 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
743c80a7 27374 "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
56ade35c
GM
27375 "lib-src/Makefile") CONFIG_FILES="$CONFIG_FILES lib-src/Makefile" ;;
27376 "oldXMenu/Makefile") CONFIG_FILES="$CONFIG_FILES oldXMenu/Makefile" ;;
27377 "doc/emacs/Makefile") CONFIG_FILES="$CONFIG_FILES doc/emacs/Makefile" ;;
27378 "doc/misc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/misc/Makefile" ;;
27379 "doc/lispintro/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispintro/Makefile" ;;
27380 "doc/lispref/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispref/Makefile" ;;
27381 "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
27382 "lwlib/Makefile") CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;;
27383 "lisp/Makefile") CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;;
27384 "leim/Makefile") CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;;
bb7dce39 27385 "nextstep/Makefile") CONFIG_FILES="$CONFIG_FILES nextstep/Makefile" ;;
56ade35c 27386 "test/automated/Makefile") CONFIG_FILES="$CONFIG_FILES test/automated/Makefile" ;;
40b65096 27387 "admin/unidata/Makefile") CONFIG_FILES="$CONFIG_FILES admin/unidata/Makefile" ;;
9411886d
PE
27388 "mkdirs") CONFIG_COMMANDS="$CONFIG_COMMANDS mkdirs" ;;
27389 "epaths") CONFIG_COMMANDS="$CONFIG_COMMANDS epaths" ;;
27390 "gdbinit") CONFIG_COMMANDS="$CONFIG_COMMANDS gdbinit" ;;
067d23c9 27391
a9bec17c 27392 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
067d23c9
KY
27393 esac
27394done
27395
27396
27397# If the user did not use the arguments to specify the items to instantiate,
27398# then the envvar interface is used. Set only those that are not.
27399# We use the long form for the default assignment because of an extremely
27400# bizarre bug on SunOS 4.1.3.
27401if $ac_need_defaults; then
27402 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
27403 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
27404 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
27405fi
27406
27407# Have a temporary directory for convenience. Make it in the build tree
27408# simply because there is no reason against having it here, and in addition,
27409# creating and moving files from /tmp can sometimes cause problems.
27410# Hook for its removal unless debugging.
27411# Note that there is a small window in which the directory will not be cleaned:
27412# after its creation but before its name has been assigned to `$tmp'.
27413$debug ||
27414{
a9bec17c 27415 tmp=
067d23c9 27416 trap 'exit_status=$?
a9bec17c 27417 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
067d23c9
KY
27418' 0
27419 trap 'as_fn_exit 1' 1 2 13 15
27420}
27421# Create a (secure) tmp directory for tmp files.
27422
27423{
27424 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
a9bec17c 27425 test -n "$tmp" && test -d "$tmp"
067d23c9
KY
27426} ||
27427{
27428 tmp=./conf$$-$RANDOM
27429 (umask 077 && mkdir "$tmp")
a9bec17c 27430} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
067d23c9
KY
27431
27432# Set up the scripts for CONFIG_FILES section.
27433# No need to generate them if there are no CONFIG_FILES.
27434# This happens for instance with `./config.status config.h'.
27435if test -n "$CONFIG_FILES"; then
27436
27437if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
27438 ac_cs_awk_getline=:
27439 ac_cs_awk_pipe_init=
27440 ac_cs_awk_read_file='
27441 while ((getline aline < (F[key])) > 0)
27442 print(aline)
27443 close(F[key])'
27444 ac_cs_awk_pipe_fini=
27445else
27446 ac_cs_awk_getline=false
27447 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
27448 ac_cs_awk_read_file='
27449 print "|#_!!_#|"
27450 print "cat " F[key] " &&"
27451 '$ac_cs_awk_pipe_init
27452 # The final `:' finishes the AND list.
27453 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
27454fi
27455ac_cr=`echo X | tr X '\015'`
27456# On cygwin, bash can eat \r inside `` if the user requested igncr.
27457# But we know of no other shell where ac_cr would be empty at this
27458# point, so we can use a bashism as a fallback.
27459if test "x$ac_cr" = x; then
27460 eval ac_cr=\$\'\\r\'
27461fi
27462ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
27463if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
a9bec17c 27464 ac_cs_awk_cr='\r'
067d23c9
KY
27465else
27466 ac_cs_awk_cr=$ac_cr
27467fi
27468
a9bec17c 27469echo 'BEGIN {' >"$tmp/subs1.awk" &&
067d23c9
KY
27470_ACEOF
27471
27472# Create commands to substitute file output variables.
27473{
27474 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
a9bec17c 27475 echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
067d23c9
KY
27476 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
27477 echo "_ACAWK" &&
27478 echo "_ACEOF"
27479} >conf$$files.sh &&
27480. ./conf$$files.sh ||
a9bec17c 27481 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
067d23c9
KY
27482rm -f conf$$files.sh
27483
27484{
27485 echo "cat >conf$$subs.awk <<_ACEOF" &&
27486 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
27487 echo "_ACEOF"
27488} >conf$$subs.sh ||
a9bec17c
GM
27489 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
27490ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
067d23c9
KY
27491ac_delim='%!_!# '
27492for ac_last_try in false false false false false :; do
27493 . ./conf$$subs.sh ||
a9bec17c 27494 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
067d23c9
KY
27495
27496 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
27497 if test $ac_delim_n = $ac_delim_num; then
27498 break
27499 elif $ac_last_try; then
a9bec17c 27500 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
067d23c9
KY
27501 else
27502 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
27503 fi
27504done
27505rm -f conf$$subs.sh
27506
27507cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
a9bec17c 27508cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
067d23c9
KY
27509_ACEOF
27510sed -n '
27511h
27512s/^/S["/; s/!.*/"]=/
27513p
27514g
27515s/^[^!]*!//
27516:repl
27517t repl
27518s/'"$ac_delim"'$//
27519t delim
27520:nl
27521h
27522s/\(.\{148\}\)..*/\1/
27523t more1
27524s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
27525p
27526n
27527b repl
27528:more1
27529s/["\\]/\\&/g; s/^/"/; s/$/"\\/
27530p
27531g
27532s/.\{148\}//
27533t nl
27534:delim
27535h
27536s/\(.\{148\}\)..*/\1/
27537t more2
27538s/["\\]/\\&/g; s/^/"/; s/$/"/
27539p
27540b
27541:more2
27542s/["\\]/\\&/g; s/^/"/; s/$/"\\/
27543p
27544g
27545s/.\{148\}//
27546t delim
27547' <conf$$subs.awk | sed '
27548/^[^""]/{
27549 N
27550 s/\n//
27551}
27552' >>$CONFIG_STATUS || ac_write_fail=1
27553rm -f conf$$subs.awk
27554cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27555_ACAWK
a9bec17c 27556cat >>"\$tmp/subs1.awk" <<_ACAWK &&
067d23c9
KY
27557 for (key in S) S_is_set[key] = 1
27558 FS = "\a"
27559 \$ac_cs_awk_pipe_init
27560}
27561{
27562 line = $ 0
27563 nfields = split(line, field, "@")
27564 substed = 0
27565 len = length(field[1])
27566 for (i = 2; i < nfields; i++) {
27567 key = field[i]
27568 keylen = length(key)
27569 if (S_is_set[key]) {
27570 value = S[key]
27571 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
27572 len += length(value) + length(field[++i])
27573 substed = 1
27574 } else
27575 len += 1 + keylen
27576 }
27577 if (nfields == 3 && !substed) {
27578 key = field[2]
27579 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
27580 \$ac_cs_awk_read_file
27581 next
27582 }
27583 }
27584 print line
27585}
27586\$ac_cs_awk_pipe_fini
27587_ACAWK
27588_ACEOF
27589cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27590if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
27591 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
27592else
27593 cat
a9bec17c
GM
27594fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
27595 || as_fn_error "could not setup config files machinery" "$LINENO" 5
067d23c9
KY
27596_ACEOF
27597
a9bec17c
GM
27598# VPATH may cause trouble with some makes, so we remove $(srcdir),
27599# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
067d23c9
KY
27600# trailing colons and then remove the whole line if VPATH becomes empty
27601# (actually we leave an empty line to preserve line numbers).
27602if test "x$srcdir" = x.; then
a9bec17c
GM
27603 ac_vpsub='/^[ ]*VPATH[ ]*=/{
27604s/:*\$(srcdir):*/:/
27605s/:*\${srcdir}:*/:/
27606s/:*@srcdir@:*/:/
27607s/^\([^=]*=[ ]*\):*/\1/
067d23c9
KY
27608s/:*$//
27609s/^[^=]*=[ ]*$//
27610}'
27611fi
27612
27613cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27614fi # test -n "$CONFIG_FILES"
27615
27616# Set up the scripts for CONFIG_HEADERS section.
27617# No need to generate them if there are no CONFIG_HEADERS.
27618# This happens for instance with `./config.status Makefile'.
27619if test -n "$CONFIG_HEADERS"; then
a9bec17c 27620cat >"$tmp/defines.awk" <<\_ACAWK ||
067d23c9
KY
27621BEGIN {
27622_ACEOF
27623
27624# Transform confdefs.h into an awk script `defines.awk', embedded as
27625# here-document in config.status, that substitutes the proper values into
27626# config.h.in to produce config.h.
27627
27628# Create a delimiter string that does not exist in confdefs.h, to ease
27629# handling of long lines.
27630ac_delim='%!_!# '
27631for ac_last_try in false false :; do
a9bec17c
GM
27632 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
27633 if test -z "$ac_t"; then
067d23c9
KY
27634 break
27635 elif $ac_last_try; then
a9bec17c 27636 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
067d23c9
KY
27637 else
27638 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
27639 fi
27640done
27641
27642# For the awk script, D is an array of macro values keyed by name,
27643# likewise P contains macro parameters if any. Preserve backslash
27644# newline sequences.
27645
27646ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
27647sed -n '
27648s/.\{148\}/&'"$ac_delim"'/g
27649t rset
27650:rset
27651s/^[ ]*#[ ]*define[ ][ ]*/ /
27652t def
27653d
27654:def
27655s/\\$//
27656t bsnl
27657s/["\\]/\\&/g
27658s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
27659D["\1"]=" \3"/p
27660s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
27661d
27662:bsnl
27663s/["\\]/\\&/g
27664s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
27665D["\1"]=" \3\\\\\\n"\\/p
27666t cont
27667s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
27668t cont
27669d
27670:cont
27671n
27672s/.\{148\}/&'"$ac_delim"'/g
27673t clear
27674:clear
27675s/\\$//
27676t bsnlc
27677s/["\\]/\\&/g; s/^/"/; s/$/"/p
27678d
27679:bsnlc
27680s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
27681b cont
27682' <confdefs.h | sed '
27683s/'"$ac_delim"'/"\\\
27684"/g' >>$CONFIG_STATUS || ac_write_fail=1
27685
27686cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27687 for (key in D) D_is_set[key] = 1
27688 FS = "\a"
27689}
27690/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
27691 line = \$ 0
27692 split(line, arg, " ")
27693 if (arg[1] == "#") {
27694 defundef = arg[2]
27695 mac1 = arg[3]
27696 } else {
27697 defundef = substr(arg[1], 2)
27698 mac1 = arg[2]
27699 }
27700 split(mac1, mac2, "(") #)
27701 macro = mac2[1]
27702 prefix = substr(line, 1, index(line, defundef) - 1)
27703 if (D_is_set[macro]) {
27704 # Preserve the white space surrounding the "#".
27705 print prefix "define", macro P[macro] D[macro]
27706 next
27707 } else {
27708 # Replace #undef with comments. This is necessary, for example,
27709 # in the case of _POSIX_SOURCE, which is predefined and required
27710 # on some systems where configure will not decide to define it.
27711 if (defundef == "undef") {
27712 print "/*", prefix defundef, macro, "*/"
27713 next
27714 }
27715 }
27716}
27717{ print }
27718_ACAWK
27719_ACEOF
27720cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
a9bec17c 27721 as_fn_error "could not setup config headers machinery" "$LINENO" 5
067d23c9
KY
27722fi # test -n "$CONFIG_HEADERS"
27723
27724
27725eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
27726shift
27727for ac_tag
27728do
27729 case $ac_tag in
27730 :[FHLC]) ac_mode=$ac_tag; continue;;
27731 esac
27732 case $ac_mode$ac_tag in
27733 :[FHL]*:*);;
a9bec17c 27734 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
067d23c9
KY
27735 :[FH]-) ac_tag=-:-;;
27736 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
27737 esac
27738 ac_save_IFS=$IFS
27739 IFS=:
27740 set x $ac_tag
27741 IFS=$ac_save_IFS
27742 shift
27743 ac_file=$1
27744 shift
27745
27746 case $ac_mode in
27747 :L) ac_source=$1;;
27748 :[FH])
27749 ac_file_inputs=
27750 for ac_f
27751 do
27752 case $ac_f in
a9bec17c 27753 -) ac_f="$tmp/stdin";;
067d23c9
KY
27754 *) # Look for the file first in the build tree, then in the source tree
27755 # (if the path is not absolute). The absolute path cannot be DOS-style,
27756 # because $ac_f cannot contain `:'.
27757 test -f "$ac_f" ||
27758 case $ac_f in
27759 [\\/$]*) false;;
27760 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
27761 esac ||
a9bec17c 27762 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
067d23c9
KY
27763 esac
27764 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
27765 as_fn_append ac_file_inputs " '$ac_f'"
27766 done
27767
27768 # Let's still pretend it is `configure' which instantiates (i.e., don't
27769 # use $as_me), people would be surprised to read:
27770 # /* config.h. Generated by config.status. */
27771 configure_input='Generated from '`
27772 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
27773 `' by configure.'
27774 if test x"$ac_file" != x-; then
27775 configure_input="$ac_file. $configure_input"
27776 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
27777$as_echo "$as_me: creating $ac_file" >&6;}
27778 fi
27779 # Neutralize special characters interpreted by sed in replacement strings.
27780 case $configure_input in #(
27781 *\&* | *\|* | *\\* )
27782 ac_sed_conf_input=`$as_echo "$configure_input" |
27783 sed 's/[\\\\&|]/\\\\&/g'`;; #(
27784 *) ac_sed_conf_input=$configure_input;;
27785 esac
27786
27787 case $ac_tag in
a9bec17c
GM
27788 *:-:* | *:-) cat >"$tmp/stdin" \
27789 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
067d23c9
KY
27790 esac
27791 ;;
27792 esac
27793
27794 ac_dir=`$as_dirname -- "$ac_file" ||
27795$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
27796 X"$ac_file" : 'X\(//\)[^/]' \| \
27797 X"$ac_file" : 'X\(//\)$' \| \
27798 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
27799$as_echo X"$ac_file" |
27800 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
27801 s//\1/
27802 q
27803 }
27804 /^X\(\/\/\)[^/].*/{
27805 s//\1/
27806 q
27807 }
27808 /^X\(\/\/\)$/{
27809 s//\1/
27810 q
27811 }
27812 /^X\(\/\).*/{
27813 s//\1/
27814 q
27815 }
27816 s/.*/./; q'`
27817 as_dir="$ac_dir"; as_fn_mkdir_p
27818 ac_builddir=.
27819
27820case "$ac_dir" in
27821.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
27822*)
27823 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
27824 # A ".." for each directory in $ac_dir_suffix.
27825 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
27826 case $ac_top_builddir_sub in
27827 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
27828 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
27829 esac ;;
27830esac
27831ac_abs_top_builddir=$ac_pwd
27832ac_abs_builddir=$ac_pwd$ac_dir_suffix
27833# for backward compatibility:
27834ac_top_builddir=$ac_top_build_prefix
27835
27836case $srcdir in
27837 .) # We are building in place.
27838 ac_srcdir=.
27839 ac_top_srcdir=$ac_top_builddir_sub
27840 ac_abs_top_srcdir=$ac_pwd ;;
27841 [\\/]* | ?:[\\/]* ) # Absolute name.
27842 ac_srcdir=$srcdir$ac_dir_suffix;
27843 ac_top_srcdir=$srcdir
27844 ac_abs_top_srcdir=$srcdir ;;
27845 *) # Relative name.
27846 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
27847 ac_top_srcdir=$ac_top_build_prefix$srcdir
27848 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
27849esac
27850ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
27851
27852
27853 case $ac_mode in
27854 :F)
27855 #
27856 # CONFIG_FILE
27857 #
27858
27859 case $INSTALL in
27860 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
27861 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
27862 esac
743c80a7
PE
27863 ac_MKDIR_P=$MKDIR_P
27864 case $MKDIR_P in
27865 [\\/$]* | ?:[\\/]* ) ;;
27866 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
27867 esac
067d23c9
KY
27868_ACEOF
27869
27870cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27871# If the template does not know about datarootdir, expand it.
27872# FIXME: This hack should be removed a few years after 2.60.
27873ac_datarootdir_hack=; ac_datarootdir_seen=
27874ac_sed_dataroot='
27875/datarootdir/ {
27876 p
27877 q
27878}
27879/@datadir@/p
27880/@docdir@/p
27881/@infodir@/p
27882/@localedir@/p
27883/@mandir@/p'
27884case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
27885*datarootdir*) ac_datarootdir_seen=yes;;
27886*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
27887 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
27888$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
27889_ACEOF
27890cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27891 ac_datarootdir_hack='
27892 s&@datadir@&$datadir&g
27893 s&@docdir@&$docdir&g
27894 s&@infodir@&$infodir&g
27895 s&@localedir@&$localedir&g
27896 s&@mandir@&$mandir&g
27897 s&\\\${datarootdir}&$datarootdir&g' ;;
27898esac
27899_ACEOF
27900
27901# Neutralize VPATH when `$srcdir' = `.'.
27902# Shell code in configure.ac might set extrasub.
27903# FIXME: do we really want to maintain this feature?
27904cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27905ac_sed_extra="$ac_vpsub
27906$extrasub
27907_ACEOF
27908cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27909:t
27910/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
27911s|@configure_input@|$ac_sed_conf_input|;t t
27912s&@top_builddir@&$ac_top_builddir_sub&;t t
27913s&@top_build_prefix@&$ac_top_build_prefix&;t t
27914s&@srcdir@&$ac_srcdir&;t t
27915s&@abs_srcdir@&$ac_abs_srcdir&;t t
27916s&@top_srcdir@&$ac_top_srcdir&;t t
27917s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
27918s&@builddir@&$ac_builddir&;t t
27919s&@abs_builddir@&$ac_abs_builddir&;t t
27920s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
27921s&@INSTALL@&$ac_INSTALL&;t t
743c80a7 27922s&@MKDIR_P@&$ac_MKDIR_P&;t t
067d23c9
KY
27923$ac_datarootdir_hack
27924"
27925eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
27926if $ac_cs_awk_getline; then
a9bec17c 27927 $AWK -f "$tmp/subs.awk"
067d23c9 27928else
a9bec17c
GM
27929 $AWK -f "$tmp/subs.awk" | $SHELL
27930fi >$tmp/out \
27931 || as_fn_error "could not create $ac_file" "$LINENO" 5
067d23c9
KY
27932
27933test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
a9bec17c
GM
27934 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
27935 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
067d23c9 27936 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
a9bec17c 27937which seems to be undefined. Please make sure it is defined." >&5
067d23c9 27938$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
a9bec17c 27939which seems to be undefined. Please make sure it is defined." >&2;}
067d23c9 27940
a9bec17c 27941 rm -f "$tmp/stdin"
067d23c9 27942 case $ac_file in
a9bec17c
GM
27943 -) cat "$tmp/out" && rm -f "$tmp/out";;
27944 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
067d23c9 27945 esac \
a9bec17c 27946 || as_fn_error "could not create $ac_file" "$LINENO" 5
067d23c9
KY
27947 ;;
27948 :H)
27949 #
27950 # CONFIG_HEADER
27951 #
27952 if test x"$ac_file" != x-; then
27953 {
27954 $as_echo "/* $configure_input */" \
a9bec17c
GM
27955 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
27956 } >"$tmp/config.h" \
27957 || as_fn_error "could not create $ac_file" "$LINENO" 5
27958 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
067d23c9
KY
27959 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
27960$as_echo "$as_me: $ac_file is unchanged" >&6;}
27961 else
27962 rm -f "$ac_file"
a9bec17c
GM
27963 mv "$tmp/config.h" "$ac_file" \
27964 || as_fn_error "could not create $ac_file" "$LINENO" 5
067d23c9
KY
27965 fi
27966 else
27967 $as_echo "/* $configure_input */" \
a9bec17c
GM
27968 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
27969 || as_fn_error "could not create -" "$LINENO" 5
067d23c9 27970 fi
743c80a7
PE
27971# Compute "$ac_file"'s index in $config_headers.
27972_am_arg="$ac_file"
27973_am_stamp_count=1
27974for _am_header in $config_headers :; do
27975 case $_am_header in
27976 $_am_arg | $_am_arg:* )
27977 break ;;
27978 * )
27979 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
27980 esac
27981done
27982echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
27983$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
27984 X"$_am_arg" : 'X\(//\)[^/]' \| \
27985 X"$_am_arg" : 'X\(//\)$' \| \
27986 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
27987$as_echo X"$_am_arg" |
27988 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
27989 s//\1/
27990 q
27991 }
27992 /^X\(\/\/\)[^/].*/{
27993 s//\1/
27994 q
27995 }
27996 /^X\(\/\/\)$/{
27997 s//\1/
27998 q
27999 }
28000 /^X\(\/\).*/{
28001 s//\1/
28002 q
28003 }
28004 s/.*/./; q'`/stamp-h$_am_stamp_count
067d23c9
KY
28005 ;;
28006
28007 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
28008$as_echo "$as_me: executing $ac_file commands" >&6;}
28009 ;;
28010 esac
28011
28012
28013 case $ac_file$ac_mode in
743c80a7
PE
28014 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
28015 # Autoconf 2.62 quotes --file arguments for eval, but not when files
28016 # are listed without --file. Let's play safe and only enable the eval
28017 # if we detect the quoting.
28018 case $CONFIG_FILES in
28019 *\'*) eval set x "$CONFIG_FILES" ;;
28020 *) set x $CONFIG_FILES ;;
28021 esac
28022 shift
28023 for mf
28024 do
28025 # Strip MF so we end up with the name of the file.
28026 mf=`echo "$mf" | sed -e 's/:.*$//'`
28027 # Check whether this is an Automake generated Makefile or not.
28028 # We used to match only the files named `Makefile.in', but
28029 # some people rename them; so instead we look at the file content.
28030 # Grep'ing the first line is not enough: some people post-process
28031 # each Makefile.in and add a new line on top of each file to say so.
28032 # Grep'ing the whole file is not good either: AIX grep has a line
28033 # limit of 2048, but all sed's we know have understand at least 4000.
28034 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
28035 dirpart=`$as_dirname -- "$mf" ||
28036$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
28037 X"$mf" : 'X\(//\)[^/]' \| \
28038 X"$mf" : 'X\(//\)$' \| \
28039 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
28040$as_echo X"$mf" |
28041 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28042 s//\1/
28043 q
28044 }
28045 /^X\(\/\/\)[^/].*/{
28046 s//\1/
28047 q
28048 }
28049 /^X\(\/\/\)$/{
28050 s//\1/
28051 q
28052 }
28053 /^X\(\/\).*/{
28054 s//\1/
28055 q
28056 }
28057 s/.*/./; q'`
28058 else
28059 continue
28060 fi
28061 # Extract the definition of DEPDIR, am__include, and am__quote
28062 # from the Makefile without running `make'.
28063 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
28064 test -z "$DEPDIR" && continue
28065 am__include=`sed -n 's/^am__include = //p' < "$mf"`
28066 test -z "am__include" && continue
28067 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
28068 # When using ansi2knr, U may be empty or an underscore; expand it
28069 U=`sed -n 's/^U = //p' < "$mf"`
28070 # Find all dependency output files, they are included files with
28071 # $(DEPDIR) in their names. We invoke sed twice because it is the
28072 # simplest approach to changing $(DEPDIR) to its actual value in the
28073 # expansion.
28074 for file in `sed -n "
28075 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
28076 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
28077 # Make sure the directory exists.
28078 test -f "$dirpart/$file" && continue
28079 fdir=`$as_dirname -- "$file" ||
28080$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
28081 X"$file" : 'X\(//\)[^/]' \| \
28082 X"$file" : 'X\(//\)$' \| \
28083 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
28084$as_echo X"$file" |
28085 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28086 s//\1/
28087 q
28088 }
28089 /^X\(\/\/\)[^/].*/{
28090 s//\1/
28091 q
28092 }
28093 /^X\(\/\/\)$/{
28094 s//\1/
28095 q
28096 }
28097 /^X\(\/\).*/{
28098 s//\1/
28099 q
28100 }
28101 s/.*/./; q'`
28102 as_dir=$dirpart/$fdir; as_fn_mkdir_p
28103 # echo "creating $dirpart/$file"
28104 echo '# dummy' > "$dirpart/$file"
28105 done
28106 done
28107}
28108 ;;
9411886d 28109 "mkdirs":C)
067d23c9
KY
28110for dir in etc lisp ; do
28111 test -d ${dir} || mkdir ${dir}
28112done
9411886d
PE
28113 ;;
28114 "epaths":C)
067d23c9 28115echo creating src/epaths.h
906debc3 28116${MAKE-make} MAKEFILE_NAME=do-not-make-Makefile epaths-force
9411886d
PE
28117 ;;
28118 "gdbinit":C)
b5591ebb 28119if test ! -f src/.gdbinit && test -f "$srcdir/src/.gdbinit"; then
067d23c9 28120 echo creating src/.gdbinit
b5591ebb 28121 echo "source $srcdir/src/.gdbinit" > src/.gdbinit
067d23c9 28122fi
067d23c9
KY
28123 ;;
28124
28125 esac
28126done # for ac_tag
28127
28128
28129as_fn_exit 0
28130_ACEOF
28131ac_clean_files=$ac_clean_files_save
28132
28133test $ac_write_fail = 0 ||
a9bec17c 28134 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
067d23c9
KY
28135
28136
28137# configure is writing to config.log, and then calls config.status.
28138# config.status does its own redirection, appending to config.log.
28139# Unfortunately, on DOS this fails, as config.log is still kept open
28140# by configure, so config.status won't be able to write to it; its
28141# output is simply discarded. So we exec the FD to /dev/null,
28142# effectively closing config.log, so it can be properly (re)opened and
28143# appended to by config.status. When coming back to configure, we
28144# need to make the FD available again.
28145if test "$no_create" != yes; then
28146 ac_cs_success=:
28147 ac_config_status_args=
28148 test "$silent" = yes &&
28149 ac_config_status_args="$ac_config_status_args --quiet"
28150 exec 5>/dev/null
28151 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
28152 exec 5>>config.log
28153 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
28154 # would make configure fail if this is the last instruction.
a9bec17c 28155 $ac_cs_success || as_fn_exit $?
067d23c9
KY
28156fi
28157if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
28158 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
28159$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
28160fi
28161