Merge from trunk.
[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
7c61eaab
GM
608EMACS_HEAPSIZE
609TEMACS_POST_LINK
610ADDSECTION
067d23c9 611LD_SWITCH_SYSTEM_TEMACS
743c80a7
PE
612LIBGNU_LTLIBDEPS
613LIBGNU_LIBDEPS
614gltests_WITNESS
710f5812
GM
615gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_FALSE
616gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_TRUE
6d153f56
GM
617gl_GNULIB_ENABLED_verify_FALSE
618gl_GNULIB_ENABLED_verify_TRUE
619gl_GNULIB_ENABLED_strtoull_FALSE
620gl_GNULIB_ENABLED_strtoull_TRUE
3e0be4ab
GM
621gl_GNULIB_ENABLED_strtoll_FALSE
622gl_GNULIB_ENABLED_strtoll_TRUE
6d153f56
GM
623gl_GNULIB_ENABLED_stat_FALSE
624gl_GNULIB_ENABLED_stat_TRUE
710f5812
GM
625gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_FALSE
626gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_TRUE
a0a61e58
GM
627gl_GNULIB_ENABLED_pathmax_FALSE
628gl_GNULIB_ENABLED_pathmax_TRUE
d7ad186c
GM
629gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_FALSE
630gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_TRUE
710f5812
GM
631gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_FALSE
632gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_TRUE
6d153f56
GM
633gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE
634gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE
710f5812
GM
635gl_GNULIB_ENABLED_getgroups_FALSE
636gl_GNULIB_ENABLED_getgroups_TRUE
637gl_GNULIB_ENABLED_euidaccess_FALSE
638gl_GNULIB_ENABLED_euidaccess_TRUE
6d153f56
GM
639gl_GNULIB_ENABLED_dosname_FALSE
640gl_GNULIB_ENABLED_dosname_TRUE
d7ad186c
GM
641gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_FALSE
642gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_TRUE
6d153f56
GM
643LTLIBINTL
644LIBINTL
710f5812 645LIB_EACCESS
f199cab1 646WINDOWS_64_BIT_OFF_T
e275c824
PE
647HAVE_UNISTD_H
648NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
649NEXT_UNISTD_H
f077f61d 650LIB_TIMER_TIME
1fd182f0
PE
651PTHREAD_H_DEFINES_STRUCT_TIMESPEC
652SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
653TIME_H_DEFINES_STRUCT_TIMESPEC
654NEXT_AS_FIRST_DIRECTIVE_TIME_H
655NEXT_TIME_H
0eb775a3 656WINDOWS_64_BIT_ST_SIZE
5fa4ac76
PE
657NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
658NEXT_SYS_STAT_H
283c7aed
GM
659NEXT_AS_FIRST_DIRECTIVE_STRING_H
660NEXT_STRING_H
1f5d53eb
PE
661NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
662NEXT_STDLIB_H
6ad6792b
GM
663NEXT_AS_FIRST_DIRECTIVE_STDIO_H
664NEXT_STDIO_H
665REPLACE_VSPRINTF
666REPLACE_VSNPRINTF
667REPLACE_VPRINTF
668REPLACE_VFPRINTF
669REPLACE_VDPRINTF
670REPLACE_VASPRINTF
671REPLACE_TMPFILE
672REPLACE_STDIO_WRITE_FUNCS
ca36e0ff 673REPLACE_STDIO_READ_FUNCS
6ad6792b
GM
674REPLACE_SPRINTF
675REPLACE_SNPRINTF
676REPLACE_RENAMEAT
677REPLACE_RENAME
678REPLACE_REMOVE
679REPLACE_PRINTF
680REPLACE_POPEN
681REPLACE_PERROR
682REPLACE_OBSTACK_PRINTF
683REPLACE_GETLINE
684REPLACE_GETDELIM
685REPLACE_FTELLO
686REPLACE_FTELL
687REPLACE_FSEEKO
688REPLACE_FSEEK
689REPLACE_FREOPEN
690REPLACE_FPURGE
691REPLACE_FPRINTF
692REPLACE_FOPEN
693REPLACE_FFLUSH
2b1928b8 694REPLACE_FDOPEN
6ad6792b
GM
695REPLACE_FCLOSE
696REPLACE_DPRINTF
697HAVE_VDPRINTF
698HAVE_VASPRINTF
699HAVE_RENAMEAT
2b1928b8
GM
700HAVE_POPEN
701HAVE_PCLOSE
6ad6792b
GM
702HAVE_FTELLO
703HAVE_FSEEKO
704HAVE_DPRINTF
705HAVE_DECL_VSNPRINTF
706HAVE_DECL_SNPRINTF
707HAVE_DECL_OBSTACK_PRINTF
708HAVE_DECL_GETLINE
709HAVE_DECL_GETDELIM
710HAVE_DECL_FTELLO
711HAVE_DECL_FSEEKO
712HAVE_DECL_FPURGE
713GNULIB_VSPRINTF_POSIX
714GNULIB_VSNPRINTF
715GNULIB_VPRINTF_POSIX
716GNULIB_VPRINTF
717GNULIB_VFPRINTF_POSIX
718GNULIB_VFPRINTF
719GNULIB_VDPRINTF
ca36e0ff
GM
720GNULIB_VSCANF
721GNULIB_VFSCANF
6ad6792b
GM
722GNULIB_VASPRINTF
723GNULIB_TMPFILE
724GNULIB_STDIO_H_SIGPIPE
ca36e0ff 725GNULIB_STDIO_H_NONBLOCKING
6ad6792b
GM
726GNULIB_SPRINTF_POSIX
727GNULIB_SNPRINTF
ca36e0ff 728GNULIB_SCANF
6ad6792b
GM
729GNULIB_RENAMEAT
730GNULIB_RENAME
731GNULIB_REMOVE
732GNULIB_PUTS
733GNULIB_PUTCHAR
734GNULIB_PUTC
735GNULIB_PRINTF_POSIX
736GNULIB_PRINTF
737GNULIB_POPEN
738GNULIB_PERROR
2b1928b8 739GNULIB_PCLOSE
6ad6792b
GM
740GNULIB_OBSTACK_PRINTF_POSIX
741GNULIB_OBSTACK_PRINTF
742GNULIB_GETLINE
743GNULIB_GETDELIM
ca36e0ff
GM
744GNULIB_GETCHAR
745GNULIB_GETC
6ad6792b
GM
746GNULIB_FWRITE
747GNULIB_FTELLO
748GNULIB_FTELL
749GNULIB_FSEEKO
750GNULIB_FSEEK
ca36e0ff 751GNULIB_FSCANF
6ad6792b 752GNULIB_FREOPEN
ca36e0ff 753GNULIB_FREAD
6ad6792b
GM
754GNULIB_FPUTS
755GNULIB_FPUTC
756GNULIB_FPURGE
757GNULIB_FPRINTF_POSIX
758GNULIB_FPRINTF
759GNULIB_FOPEN
ca36e0ff
GM
760GNULIB_FGETS
761GNULIB_FGETC
6ad6792b 762GNULIB_FFLUSH
2b1928b8 763GNULIB_FDOPEN
6ad6792b
GM
764GNULIB_FCLOSE
765GNULIB_DPRINTF
1fd182f0
PE
766NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
767NEXT_STDDEF_H
6c051bab
GM
768GL_GENERATE_STDDEF_H_FALSE
769GL_GENERATE_STDDEF_H_TRUE
1fd182f0
PE
770STDDEF_H
771HAVE_WCHAR_T
772REPLACE_NULL
16c3e636 773HAVE__BOOL
6c051bab
GM
774GL_GENERATE_STDBOOL_H_FALSE
775GL_GENERATE_STDBOOL_H_TRUE
16c3e636 776STDBOOL_H
6d153f56
GM
777GL_GENERATE_STDARG_H_FALSE
778GL_GENERATE_STDARG_H_TRUE
779STDARG_H
780NEXT_AS_FIRST_DIRECTIVE_STDARG_H
781NEXT_STDARG_H
0eb775a3
GM
782GL_GENERATE_STDALIGN_H_FALSE
783GL_GENERATE_STDALIGN_H_TRUE
784STDALIGN_H
3e0be4ab
GM
785NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H
786NEXT_SIGNAL_H
3a019ab4
GM
787USE_ACL
788LIB_ACL
0eb775a3 789LIB_PTHREAD_SIGMASK
2b1928b8 790REPLACE_RAISE
3e0be4ab
GM
791REPLACE_PTHREAD_SIGMASK
792HAVE_SIGHANDLER_T
793HAVE_TYPE_VOLATILE_SIG_ATOMIC_T
794HAVE_STRUCT_SIGACTION_SA_SIGACTION
795HAVE_SIGACTION
796HAVE_SIGINFO_T
797HAVE_SIGSET_T
2b1928b8 798HAVE_RAISE
3e0be4ab
GM
799HAVE_PTHREAD_SIGMASK
800HAVE_POSIX_SIGNALBLOCKING
801GNULIB_SIGACTION
802GNULIB_SIGPROCMASK
803GNULIB_SIGNAL_H_SIGPIPE
2b1928b8 804GNULIB_RAISE
3e0be4ab 805GNULIB_PTHREAD_SIGMASK
f199cab1
GM
806HAVE_SYS_SELECT_H
807NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H
808NEXT_SYS_SELECT_H
809REPLACE_SELECT
810REPLACE_PSELECT
811HAVE_PSELECT
812GNULIB_SELECT
813GNULIB_PSELECT
1fd182f0
PE
814REPLACE_TIMEGM
815REPLACE_NANOSLEEP
816REPLACE_MKTIME
817REPLACE_LOCALTIME_R
818HAVE_TIMEGM
819HAVE_STRPTIME
820HAVE_NANOSLEEP
821HAVE_DECL_LOCALTIME_R
822GNULIB_TIME_R
823GNULIB_TIMEGM
824GNULIB_STRPTIME
825GNULIB_NANOSLEEP
826GNULIB_MKTIME
283c7aed
GM
827UNDEFINE_STRTOK_R
828REPLACE_STRTOK_R
829REPLACE_STRSIGNAL
830REPLACE_STRNLEN
831REPLACE_STRNDUP
832REPLACE_STRNCAT
833REPLACE_STRERROR_R
834REPLACE_STRERROR
835REPLACE_STRCHRNUL
836REPLACE_STRCASESTR
837REPLACE_STRSTR
838REPLACE_STRDUP
839REPLACE_STPNCPY
840REPLACE_MEMMEM
841REPLACE_MEMCHR
842HAVE_STRVERSCMP
843HAVE_DECL_STRSIGNAL
844HAVE_DECL_STRERROR_R
845HAVE_DECL_STRTOK_R
846HAVE_STRCASESTR
847HAVE_STRSEP
848HAVE_STRPBRK
849HAVE_DECL_STRNLEN
850HAVE_DECL_STRNDUP
851HAVE_DECL_STRDUP
852HAVE_STRCHRNUL
853HAVE_STPNCPY
854HAVE_STPCPY
855HAVE_RAWMEMCHR
856HAVE_DECL_MEMRCHR
857HAVE_MEMPCPY
858HAVE_DECL_MEMMEM
859HAVE_MEMCHR
860HAVE_FFSLL
861HAVE_FFSL
862HAVE_MBSLEN
863GNULIB_STRVERSCMP
864GNULIB_STRSIGNAL
865GNULIB_STRERROR_R
866GNULIB_STRERROR
867GNULIB_MBSTOK_R
868GNULIB_MBSSEP
869GNULIB_MBSSPN
870GNULIB_MBSPBRK
871GNULIB_MBSCSPN
872GNULIB_MBSCASESTR
873GNULIB_MBSPCASECMP
874GNULIB_MBSNCASECMP
875GNULIB_MBSCASECMP
876GNULIB_MBSSTR
877GNULIB_MBSRCHR
878GNULIB_MBSCHR
879GNULIB_MBSNLEN
880GNULIB_MBSLEN
881GNULIB_STRTOK_R
882GNULIB_STRCASESTR
883GNULIB_STRSTR
884GNULIB_STRSEP
885GNULIB_STRPBRK
886GNULIB_STRNLEN
887GNULIB_STRNDUP
888GNULIB_STRNCAT
889GNULIB_STRDUP
890GNULIB_STRCHRNUL
891GNULIB_STPNCPY
892GNULIB_STPCPY
893GNULIB_RAWMEMCHR
894GNULIB_MEMRCHR
895GNULIB_MEMPCPY
896GNULIB_MEMMEM
897GNULIB_MEMCHR
898GNULIB_FFSLL
899GNULIB_FFSL
4fda9c95
GM
900NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H
901NEXT_INTTYPES_H
902UINT64_MAX_EQ_ULONG_MAX
903UINT32_MAX_LT_UINTMAX_MAX
904PRIPTR_PREFIX
905PRI_MACROS_BROKEN
906INT64_MAX_EQ_LONG_MAX
907INT32_MAX_LT_INTMAX_MAX
0eb775a3 908REPLACE_STRTOIMAX
4fda9c95
GM
909HAVE_DECL_STRTOUMAX
910HAVE_DECL_STRTOIMAX
911HAVE_DECL_IMAXDIV
912HAVE_DECL_IMAXABS
913GNULIB_STRTOUMAX
914GNULIB_STRTOIMAX
915GNULIB_IMAXDIV
916GNULIB_IMAXABS
917GL_GENERATE_STDINT_H_FALSE
918GL_GENERATE_STDINT_H_TRUE
919STDINT_H
920WINT_T_SUFFIX
921WCHAR_T_SUFFIX
922SIG_ATOMIC_T_SUFFIX
923SIZE_T_SUFFIX
924PTRDIFF_T_SUFFIX
925HAVE_SIGNED_WINT_T
926HAVE_SIGNED_WCHAR_T
927HAVE_SIGNED_SIG_ATOMIC_T
928BITSIZEOF_WINT_T
929BITSIZEOF_WCHAR_T
930BITSIZEOF_SIG_ATOMIC_T
931BITSIZEOF_SIZE_T
932BITSIZEOF_PTRDIFF_T
933APPLE_UNIVERSAL_BUILD
934HAVE_SYS_BITYPES_H
935HAVE_SYS_INTTYPES_H
936HAVE_STDINT_H
937NEXT_AS_FIRST_DIRECTIVE_STDINT_H
938NEXT_STDINT_H
939HAVE_SYS_TYPES_H
940HAVE_INTTYPES_H
941HAVE_WCHAR_H
942HAVE_UNSIGNED_LONG_LONG_INT
943HAVE_LONG_LONG_INT
f199cab1
GM
944HAVE_WINSOCK2_H
945NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
946NEXT_SYS_TIME_H
947REPLACE_STRUCT_TIMEVAL
948REPLACE_GETTIMEOFDAY
949HAVE_SYS_TIME_H
950HAVE_STRUCT_TIMEVAL
951HAVE_GETTIMEOFDAY
952GNULIB_GETTIMEOFDAY
0eb775a3 953GNULIB_GL_UNISTD_H_GETOPT
e275c824
PE
954GETOPT_H
955HAVE_GETOPT_H
956NEXT_AS_FIRST_DIRECTIVE_GETOPT_H
957NEXT_GETOPT_H
7d2a1c5e
GM
958GETLOADAVG_LIBS
959REPLACE_WCTOMB
960REPLACE_UNSETENV
961REPLACE_STRTOD
962REPLACE_SETENV
963REPLACE_REALPATH
964REPLACE_REALLOC
0eb775a3 965REPLACE_RANDOM_R
7d2a1c5e 966REPLACE_PUTENV
0eb775a3 967REPLACE_PTSNAME_R
b6c9d18d 968REPLACE_PTSNAME
7d2a1c5e
GM
969REPLACE_MKSTEMP
970REPLACE_MBTOWC
971REPLACE_MALLOC
972REPLACE_CANONICALIZE_FILE_NAME
973REPLACE_CALLOC
974HAVE_DECL_UNSETENV
975HAVE_UNLOCKPT
976HAVE_SYS_LOADAVG_H
977HAVE_STRUCT_RANDOM_DATA
978HAVE_STRTOULL
979HAVE_STRTOLL
980HAVE_STRTOD
981HAVE_DECL_SETENV
982HAVE_SETENV
2cdd55fc 983HAVE_SECURE_GETENV
7d2a1c5e
GM
984HAVE_RPMATCH
985HAVE_REALPATH
986HAVE_RANDOM_R
987HAVE_RANDOM_H
0eb775a3
GM
988HAVE_RANDOM
989HAVE_PTSNAME_R
7d2a1c5e 990HAVE_PTSNAME
0eb775a3 991HAVE_POSIX_OPENPT
7d2a1c5e
GM
992HAVE_MKSTEMPS
993HAVE_MKSTEMP
994HAVE_MKOSTEMPS
995HAVE_MKOSTEMP
996HAVE_MKDTEMP
997HAVE_GRANTPT
998HAVE_GETSUBOPT
999HAVE_DECL_GETLOADAVG
1000HAVE_CANONICALIZE_FILE_NAME
1001HAVE_ATOLL
1002HAVE__EXIT
1003GNULIB_WCTOMB
1004GNULIB_UNSETENV
1005GNULIB_UNLOCKPT
1006GNULIB_SYSTEM_POSIX
1007GNULIB_STRTOULL
1008GNULIB_STRTOLL
1009GNULIB_STRTOD
1010GNULIB_SETENV
2cdd55fc 1011GNULIB_SECURE_GETENV
7d2a1c5e
GM
1012GNULIB_RPMATCH
1013GNULIB_REALPATH
1014GNULIB_REALLOC_POSIX
1015GNULIB_RANDOM_R
0eb775a3 1016GNULIB_RANDOM
7d2a1c5e 1017GNULIB_PUTENV
0eb775a3 1018GNULIB_PTSNAME_R
7d2a1c5e 1019GNULIB_PTSNAME
0eb775a3 1020GNULIB_POSIX_OPENPT
7d2a1c5e
GM
1021GNULIB_MKSTEMPS
1022GNULIB_MKSTEMP
1023GNULIB_MKOSTEMPS
1024GNULIB_MKOSTEMP
1025GNULIB_MKDTEMP
1026GNULIB_MBTOWC
1027GNULIB_MALLOC_POSIX
1028GNULIB_GRANTPT
1029GNULIB_GETSUBOPT
1030GNULIB_GETLOADAVG
1031GNULIB_CANONICALIZE_FILE_NAME
1032GNULIB_CALLOC_POSIX
1033GNULIB_ATOLL
1034GNULIB__EXIT
d7ad186c
GM
1035REPLACE_UTIMENSAT
1036REPLACE_STAT
1037REPLACE_MKNOD
1038REPLACE_MKFIFO
1039REPLACE_MKDIR
1040REPLACE_LSTAT
1041REPLACE_FUTIMENS
1042REPLACE_FSTATAT
1043REPLACE_FSTAT
1044HAVE_UTIMENSAT
1045HAVE_MKNODAT
1046HAVE_MKNOD
1047HAVE_MKFIFOAT
1048HAVE_MKFIFO
1049HAVE_MKDIRAT
1050HAVE_LSTAT
1051HAVE_LCHMOD
1052HAVE_FUTIMENS
1053HAVE_FSTATAT
1054HAVE_FCHMODAT
1055GNULIB_UTIMENSAT
1056GNULIB_STAT
1057GNULIB_MKNODAT
1058GNULIB_MKNOD
1059GNULIB_MKFIFOAT
1060GNULIB_MKFIFO
1061GNULIB_MKDIRAT
1062GNULIB_LSTAT
1063GNULIB_LCHMOD
1064GNULIB_FUTIMENS
1065GNULIB_FSTATAT
1066GNULIB_FSTAT
1067GNULIB_FCHMODAT
2407788f 1068LIB_FDATASYNC
710f5812
GM
1069NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
1070NEXT_FCNTL_H
710f5812
GM
1071REPLACE_OPENAT
1072REPLACE_OPEN
1073REPLACE_FCNTL
1074HAVE_OPENAT
1075HAVE_FCNTL
1076GNULIB_OPENAT
1077GNULIB_OPEN
1078GNULIB_NONBLOCKING
1079GNULIB_FCNTL
8966cbff
GM
1080GL_GENERATE_EXECINFO_H_FALSE
1081GL_GENERATE_EXECINFO_H_TRUE
1082LIB_EXECINFO
1083EXECINFO_H
3a019ab4
GM
1084EOVERFLOW_VALUE
1085EOVERFLOW_HIDDEN
1086ENOLINK_VALUE
1087ENOLINK_HIDDEN
1088EMULTIHOP_VALUE
1089EMULTIHOP_HIDDEN
1090GL_GENERATE_ERRNO_H_FALSE
1091GL_GENERATE_ERRNO_H_TRUE
1092ERRNO_H
1093NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
1094NEXT_ERRNO_H
d7ad186c
GM
1095HAVE_DIRENT_H
1096NEXT_AS_FIRST_DIRECTIVE_DIRENT_H
1097NEXT_DIRENT_H
1098PRAGMA_COLUMNS
1099PRAGMA_SYSTEM_HEADER
1100INCLUDE_NEXT_AS_FIRST_DIRECTIVE
1101INCLUDE_NEXT
1102REPLACE_FDOPENDIR
1103REPLACE_DIRFD
1104REPLACE_CLOSEDIR
1105REPLACE_OPENDIR
1106HAVE_ALPHASORT
1107HAVE_SCANDIR
1108HAVE_FDOPENDIR
1109HAVE_DECL_FDOPENDIR
1110HAVE_DECL_DIRFD
1111HAVE_CLOSEDIR
1112HAVE_REWINDDIR
1113HAVE_READDIR
1114HAVE_OPENDIR
1115GNULIB_ALPHASORT
1116GNULIB_SCANDIR
1117GNULIB_FDOPENDIR
1118GNULIB_DIRFD
1119GNULIB_CLOSEDIR
1120GNULIB_REWINDDIR
1121GNULIB_READDIR
1122GNULIB_OPENDIR
e275c824
PE
1123UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1124UNISTD_H_HAVE_WINSOCK2_H
1125REPLACE_WRITE
1126REPLACE_USLEEP
1127REPLACE_UNLINKAT
1128REPLACE_UNLINK
1129REPLACE_TTYNAME_R
1130REPLACE_SYMLINK
1131REPLACE_SLEEP
1132REPLACE_RMDIR
1133REPLACE_READLINK
ca36e0ff 1134REPLACE_READ
e275c824
PE
1135REPLACE_PWRITE
1136REPLACE_PREAD
1137REPLACE_LSEEK
1138REPLACE_LINKAT
1139REPLACE_LINK
1140REPLACE_LCHOWN
0eb775a3 1141REPLACE_ISATTY
e275c824
PE
1142REPLACE_GETPAGESIZE
1143REPLACE_GETGROUPS
1144REPLACE_GETLOGIN_R
1145REPLACE_GETDOMAINNAME
1146REPLACE_GETCWD
0eb775a3 1147REPLACE_FTRUNCATE
e275c824
PE
1148REPLACE_FCHOWNAT
1149REPLACE_DUP2
1150REPLACE_DUP
1151REPLACE_CLOSE
1152REPLACE_CHOWN
1153HAVE_SYS_PARAM_H
1154HAVE_OS_H
1155HAVE_DECL_TTYNAME_R
0eb775a3 1156HAVE_DECL_SETHOSTNAME
e275c824
PE
1157HAVE_DECL_GETUSERSHELL
1158HAVE_DECL_GETPAGESIZE
1159HAVE_DECL_GETLOGIN_R
1160HAVE_DECL_GETDOMAINNAME
2b1928b8 1161HAVE_DECL_FDATASYNC
e275c824
PE
1162HAVE_DECL_FCHDIR
1163HAVE_DECL_ENVIRON
1164HAVE_USLEEP
1165HAVE_UNLINKAT
1166HAVE_SYMLINKAT
1167HAVE_SYMLINK
1168HAVE_SLEEP
0eb775a3 1169HAVE_SETHOSTNAME
e275c824
PE
1170HAVE_READLINKAT
1171HAVE_READLINK
1172HAVE_PWRITE
1173HAVE_PREAD
1174HAVE_PIPE2
1175HAVE_PIPE
1176HAVE_LINKAT
1177HAVE_LINK
1178HAVE_LCHOWN
da6c8463 1179HAVE_GROUP_MEMBER
e275c824
PE
1180HAVE_GETPAGESIZE
1181HAVE_GETLOGIN
1182HAVE_GETHOSTNAME
1183HAVE_GETGROUPS
1184HAVE_GETDTABLESIZE
1185HAVE_FTRUNCATE
1186HAVE_FSYNC
2b1928b8 1187HAVE_FDATASYNC
e275c824
PE
1188HAVE_FCHOWNAT
1189HAVE_FCHDIR
1190HAVE_FACCESSAT
1191HAVE_EUIDACCESS
1192HAVE_DUP3
1193HAVE_DUP2
1194HAVE_CHOWN
1195GNULIB_WRITE
1196GNULIB_USLEEP
1197GNULIB_UNLINKAT
1198GNULIB_UNLINK
1199GNULIB_UNISTD_H_SIGPIPE
ca36e0ff 1200GNULIB_UNISTD_H_NONBLOCKING
e275c824
PE
1201GNULIB_TTYNAME_R
1202GNULIB_SYMLINKAT
1203GNULIB_SYMLINK
1204GNULIB_SLEEP
0eb775a3 1205GNULIB_SETHOSTNAME
e275c824
PE
1206GNULIB_RMDIR
1207GNULIB_READLINKAT
1208GNULIB_READLINK
ca36e0ff 1209GNULIB_READ
e275c824
PE
1210GNULIB_PWRITE
1211GNULIB_PREAD
1212GNULIB_PIPE2
1213GNULIB_PIPE
1214GNULIB_LSEEK
1215GNULIB_LINKAT
1216GNULIB_LINK
1217GNULIB_LCHOWN
0eb775a3 1218GNULIB_ISATTY
da6c8463 1219GNULIB_GROUP_MEMBER
e275c824
PE
1220GNULIB_GETUSERSHELL
1221GNULIB_GETPAGESIZE
1222GNULIB_GETLOGIN_R
1223GNULIB_GETLOGIN
1224GNULIB_GETHOSTNAME
1225GNULIB_GETGROUPS
1226GNULIB_GETDTABLESIZE
1227GNULIB_GETDOMAINNAME
1228GNULIB_GETCWD
1229GNULIB_FTRUNCATE
1230GNULIB_FSYNC
2b1928b8 1231GNULIB_FDATASYNC
e275c824
PE
1232GNULIB_FCHOWNAT
1233GNULIB_FCHDIR
1234GNULIB_FACCESSAT
1235GNULIB_EUIDACCESS
1236GNULIB_ENVIRON
1237GNULIB_DUP3
1238GNULIB_DUP2
2b1928b8 1239GNULIB_DUP
e275c824
PE
1240GNULIB_CLOSE
1241GNULIB_CHOWN
2b1928b8 1242GNULIB_CHDIR
f199cab1 1243LIB_CLOCK_GETTIME
4fc2b746
GM
1244GL_GENERATE_ALLOCA_H_FALSE
1245GL_GENERATE_ALLOCA_H_TRUE
1246ALLOCA_H
1247ALLOCA
743c80a7
PE
1248GL_COND_LIBTOOL_FALSE
1249GL_COND_LIBTOOL_TRUE
5476a9a4
GM
1250POST_ALLOC_OBJ
1251PRE_ALLOC_OBJ
1252CYGWIN_OBJ
1253RALLOC_OBJ
1254OLDXMENU_DEPS
1255LIBX_OTHER
1256LIBXMENU
1257OLDXMENU
1258OLDXMENU_TARGET
1259LIBXT_OTHER
1260TOOLKIT_LIBW
1261WIDGET_OBJ
1262XOBJ
1263XMENU_OBJ
1264FONT_OBJ
1265OTHER_FILES
1266GNU_OBJC_CFLAGS
1267ns_appsrc
1268ns_appresdir
1269ns_appbindir
1270ns_appdir
5476a9a4
GM
1271X_TOOLKIT_TYPE
1272GNUSTEP_CFLAGS
1273C_SWITCH_X_SITE
1274LD_SWITCH_X_SITE
1275gameuser
1276gamedir
1277bitmapdir
1278archlibdir
1279etcdir
1280x_default_search_path
1281lisppath
1282locallisppath
1283standardlisppath
1284leimdir
1285lispdir
1286srcdir
1287canonical
1288configuration
1289version
bb7dce39 1290copyright
0f55a32e 1291XGSELOBJ
5476a9a4
GM
1292KRB4LIB
1293DESLIB
1294KRB5LIB
1295CRYPTOLIB
1296COM_ERRLIB
1297LIBRESOLV
1298LIBHESIOD
1299TERMCAP_OBJ
1300LIBS_TERMCAP
1301BLESSMAIL_TARGET
1302LIBS_MAIL
1303liblockfile
1304LIBXML2_LIBS
1305LIBXML2_CFLAGS
910833ae
GM
1306XINERAMA_LIBS
1307XINERAMA_CFLAGS
1308XRANDR_LIBS
1309XRANDR_CFLAGS
5476a9a4
GM
1310LIBXSM
1311LIBGPM
1312LIBGIF
1313LIBTIFF
1314LIBPNG
1315LIBJPEG
1316LIBXPM
1317M17N_FLT_LIBS
1318M17N_FLT_CFLAGS
1319LIBOTF_LIBS
1320LIBOTF_CFLAGS
1321FREETYPE_LIBS
1322FREETYPE_CFLAGS
1323XFT_LIBS
1324XFT_CFLAGS
1325FONTCONFIG_LIBS
1326FONTCONFIG_CFLAGS
1327LIBXMU
1328LIBXTR6
0f55a32e
GM
1329NOTIFY_OBJ
1330GFILENOTIFY_LIBS
1331GFILENOTIFY_CFLAGS
5476a9a4
GM
1332LIBGNUTLS_LIBS
1333LIBGNUTLS_CFLAGS
1334LIBSELINUX_LIBS
1335SETTINGS_LIBS
1336SETTINGS_CFLAGS
dcde497f
GM
1337GOBJECT_LIBS
1338GOBJECT_CFLAGS
5476a9a4
GM
1339GCONF_LIBS
1340GCONF_CFLAGS
1341GSETTINGS_LIBS
1342GSETTINGS_CFLAGS
1343DBUS_OBJ
1344DBUS_LIBS
1345DBUS_CFLAGS
1346GTK_OBJ
1347GTK_LIBS
1348GTK_CFLAGS
1349IMAGEMAGICK_LIBS
1350IMAGEMAGICK_CFLAGS
1351RSVG_LIBS
1352RSVG_CFLAGS
1353LIB_PTHREAD
1354VMLIMIT_OBJ
1355GMALLOC_OBJ
1356HAVE_XSERVER
7c61eaab
GM
1357XARGS_LIMIT
1358NTLIB
1359LIB_WSOCK32
1360LIBS_ECLIENT
1361CM_OBJ
1362NTDIR
1363FIRSTFILE_OBJ
b5eb356a 1364W32_RES_LINK
7c61eaab
GM
1365CLIENTW
1366CLIENTRES
1367EMACS_MANIFEST
1368EMACSRES
5c0255d9
GM
1369W32_LIBS
1370W32_OBJ
b5eb356a 1371WINDRES
5476a9a4
GM
1372NS_OBJC_OBJ
1373NS_OBJ
1374ns_self_contained
1375INSTALL_ARCH_INDEP_EXTRA
4efe5ef9 1376LIBS_GNUSTEP
5476a9a4
GM
1377LD_SWITCH_X_SITE_RPATH
1378XMKMF
1379DEPFLAGS
1380MKDEPDIR
1381CFLAGS_SOUND
1382ALSA_LIBS
1383ALSA_CFLAGS
1384LIBSOUND
1385PKG_CONFIG
067d23c9 1386LIB_MATH
067d23c9
KY
1387LIBS_SYSTEM
1388C_SWITCH_SYSTEM
1389UNEXEC_OBJ
1390C_SWITCH_MACHINE
1391LD_SWITCH_SYSTEM
1392CANNOT_DUMP
141d074d
GM
1393INFO_OPTS
1394INFO_EXT
96f129d5 1395HAVE_MAKEINFO
9c29597b 1396PAXCTL
067d23c9
KY
1397GZIP_PROG
1398INSTALL_INFO
4c5f4270 1399LN_S_FILEONLY
a6b92a4a 1400GNULIB_WARN_CFLAGS
0eb775a3 1401WARN_CFLAGS
a6b92a4a 1402WERROR_CFLAGS
369e19fc
PE
1403RANLIB
1404ARFLAGS
1405AR
067d23c9
KY
1406EGREP
1407GREP
1408CPP
7c61eaab
GM
1409BUILDING_FOR_WINDOWSNT_FALSE
1410BUILDING_FOR_WINDOWSNT_TRUE
743c80a7
PE
1411am__fastdepCC_FALSE
1412am__fastdepCC_TRUE
1413CCDEPMODE
1414AMDEPBACKSLASH
1415AMDEP_FALSE
1416AMDEP_TRUE
1417am__quote
1418am__include
1419DEPDIR
067d23c9
KY
1420OBJEXT
1421EXEEXT
1422ac_ct_CC
1423CPPFLAGS
1424LDFLAGS
1425CFLAGS
1426CC
1427host_os
1428host_vendor
1429host_cpu
1430host
1431build_os
1432build_vendor
1433build_cpu
1434build
1435PROFILING_CFLAGS
067d23c9 1436GZIP_INFO
c3a461a5 1437cache_file
743c80a7
PE
1438am__untar
1439am__tar
1440AMTAR
1441am__leading_dot
1442SET_MAKE
1443AWK
1444mkdir_p
1445MKDIR_P
1446INSTALL_STRIP_PROGRAM
1447STRIP
1448install_sh
1449MAKEINFO
1450AUTOHEADER
1451AUTOMAKE
1452AUTOCONF
1453ACLOCAL
1454VERSION
1455PACKAGE
1456CYGPATH_W
1457am__isrc
1458INSTALL_DATA
1459INSTALL_SCRIPT
1460INSTALL_PROGRAM
067d23c9
KY
1461target_alias
1462host_alias
1463build_alias
1464LIBS
1465ECHO_T
1466ECHO_N
1467ECHO_C
1468DEFS
1469mandir
1470localedir
1471libdir
1472psdir
1473pdfdir
1474dvidir
1475htmldir
1476infodir
1477docdir
1478oldincludedir
1479includedir
1480localstatedir
1481sharedstatedir
1482sysconfdir
1483datadir
1484datarootdir
1485libexecdir
1486sbindir
1487bindir
1488program_transform_name
1489prefix
1490exec_prefix
1491PACKAGE_URL
1492PACKAGE_BUGREPORT
1493PACKAGE_STRING
1494PACKAGE_VERSION
1495PACKAGE_TARNAME
1496PACKAGE_NAME
1497PATH_SEPARATOR
1498SHELL'
1499ac_subst_files='deps_frag
bb7dce39 1500lisp_frag'
067d23c9
KY
1501ac_user_opts='
1502enable_option_checking
ee77919d 1503with_all
067d23c9
KY
1504with_pop
1505with_kerberos
1506with_kerberos5
1507with_hesiod
1508with_mmdf
1509with_mail_unlink
1510with_mailhost
1511with_sound
067d23c9 1512with_x_toolkit
0442dc7f 1513with_wide_int
067d23c9
KY
1514with_xpm
1515with_jpeg
1516with_tiff
1517with_gif
1518with_png
1519with_rsvg
1520with_xml2
1521with_imagemagick
1522with_xft
1523with_libotf
1524with_m17n_flt
1525with_toolkit_scroll_bars
1526with_xaw3d
1527with_xim
1528with_ns
5c0255d9 1529with_w32
067d23c9
KY
1530with_gpm
1531with_dbus
1532with_gconf
f527bd02 1533with_gsettings
067d23c9
KY
1534with_selinux
1535with_gnutls
0f55a32e 1536with_file_notification
067d23c9
KY
1537with_makeinfo
1538with_compress_info
1539with_pkg_config_prog
4fc5868a 1540with_gameuser
067d23c9
KY
1541with_gnustep_conf
1542enable_ns_self_contained
067d23c9
KY
1543enable_locallisppath
1544enable_checking
afd07e01 1545enable_check_lisp_object_type
067d23c9
KY
1546enable_profiling
1547enable_autodepend
4efe5ef9 1548enable_gtk_deprecation_warnings
743c80a7 1549enable_dependency_tracking
067d23c9 1550enable_largefile
a6b92a4a 1551enable_gcc_warnings
e4d35030 1552enable_link_time_optimization
067d23c9 1553with_x
3a019ab4 1554enable_acl
067d23c9
KY
1555'
1556 ac_precious_vars='build_alias
1557host_alias
1558target_alias
1559CC
1560CFLAGS
1561LDFLAGS
1562LIBS
1563CPPFLAGS
1564CPP
1565XMKMF'
1566
1567
1568# Initialize some variables set by options.
1569ac_init_help=
1570ac_init_version=false
1571ac_unrecognized_opts=
1572ac_unrecognized_sep=
1573# The variables have the same names as the options, with
1574# dashes changed to underlines.
1575cache_file=/dev/null
1576exec_prefix=NONE
1577no_create=
1578no_recursion=
1579prefix=NONE
1580program_prefix=NONE
1581program_suffix=NONE
1582program_transform_name=s,x,x,
1583silent=
1584site=
1585srcdir=
1586verbose=
1587x_includes=NONE
1588x_libraries=NONE
1589
1590# Installation directory options.
1591# These are left unexpanded so users can "make install exec_prefix=/foo"
1592# and all the variables that are supposed to be based on exec_prefix
1593# by default will actually change.
1594# Use braces instead of parens because sh, perl, etc. also accept them.
1595# (The list follows the same order as the GNU Coding Standards.)
1596bindir='${exec_prefix}/bin'
1597sbindir='${exec_prefix}/sbin'
1598libexecdir='${exec_prefix}/libexec'
1599datarootdir='${prefix}/share'
1600datadir='${datarootdir}'
1601sysconfdir='${prefix}/etc'
1602sharedstatedir='${prefix}/com'
1603localstatedir='${prefix}/var'
1604includedir='${prefix}/include'
1605oldincludedir='/usr/include'
1606docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1607infodir='${datarootdir}/info'
1608htmldir='${docdir}'
1609dvidir='${docdir}'
1610pdfdir='${docdir}'
1611psdir='${docdir}'
1612libdir='${exec_prefix}/lib'
1613localedir='${datarootdir}/locale'
1614mandir='${datarootdir}/man'
1615
1616ac_prev=
1617ac_dashdash=
1618for ac_option
1619do
1620 # If the previous option needs an argument, assign it.
1621 if test -n "$ac_prev"; then
1622 eval $ac_prev=\$ac_option
1623 ac_prev=
1624 continue
1625 fi
1626
1627 case $ac_option in
a9bec17c
GM
1628 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1629 *) ac_optarg=yes ;;
067d23c9
KY
1630 esac
1631
1632 # Accept the important Cygnus configure options, so we can diagnose typos.
1633
1634 case $ac_dashdash$ac_option in
1635 --)
1636 ac_dashdash=yes ;;
1637
1638 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1639 ac_prev=bindir ;;
1640 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1641 bindir=$ac_optarg ;;
1642
1643 -build | --build | --buil | --bui | --bu)
1644 ac_prev=build_alias ;;
1645 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1646 build_alias=$ac_optarg ;;
1647
1648 -cache-file | --cache-file | --cache-fil | --cache-fi \
1649 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1650 ac_prev=cache_file ;;
1651 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1652 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1653 cache_file=$ac_optarg ;;
1654
1655 --config-cache | -C)
1656 cache_file=config.cache ;;
1657
1658 -datadir | --datadir | --datadi | --datad)
1659 ac_prev=datadir ;;
1660 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1661 datadir=$ac_optarg ;;
1662
1663 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1664 | --dataroo | --dataro | --datar)
1665 ac_prev=datarootdir ;;
1666 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1667 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1668 datarootdir=$ac_optarg ;;
1669
1670 -disable-* | --disable-*)
1671 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1672 # Reject names that are not valid shell variable names.
1673 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
a9bec17c 1674 as_fn_error "invalid feature name: $ac_useropt"
067d23c9
KY
1675 ac_useropt_orig=$ac_useropt
1676 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1677 case $ac_user_opts in
1678 *"
1679"enable_$ac_useropt"
1680"*) ;;
1681 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1682 ac_unrecognized_sep=', ';;
1683 esac
1684 eval enable_$ac_useropt=no ;;
1685
1686 -docdir | --docdir | --docdi | --doc | --do)
1687 ac_prev=docdir ;;
1688 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1689 docdir=$ac_optarg ;;
1690
1691 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1692 ac_prev=dvidir ;;
1693 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1694 dvidir=$ac_optarg ;;
1695
1696 -enable-* | --enable-*)
1697 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1698 # Reject names that are not valid shell variable names.
1699 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
a9bec17c 1700 as_fn_error "invalid feature name: $ac_useropt"
067d23c9
KY
1701 ac_useropt_orig=$ac_useropt
1702 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1703 case $ac_user_opts in
1704 *"
1705"enable_$ac_useropt"
1706"*) ;;
1707 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1708 ac_unrecognized_sep=', ';;
1709 esac
1710 eval enable_$ac_useropt=\$ac_optarg ;;
1711
1712 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1713 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1714 | --exec | --exe | --ex)
1715 ac_prev=exec_prefix ;;
1716 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1717 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1718 | --exec=* | --exe=* | --ex=*)
1719 exec_prefix=$ac_optarg ;;
1720
1721 -gas | --gas | --ga | --g)
1722 # Obsolete; use --with-gas.
1723 with_gas=yes ;;
1724
1725 -help | --help | --hel | --he | -h)
1726 ac_init_help=long ;;
1727 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1728 ac_init_help=recursive ;;
1729 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1730 ac_init_help=short ;;
1731
1732 -host | --host | --hos | --ho)
1733 ac_prev=host_alias ;;
1734 -host=* | --host=* | --hos=* | --ho=*)
1735 host_alias=$ac_optarg ;;
1736
1737 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1738 ac_prev=htmldir ;;
1739 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1740 | --ht=*)
1741 htmldir=$ac_optarg ;;
1742
1743 -includedir | --includedir | --includedi | --included | --include \
1744 | --includ | --inclu | --incl | --inc)
1745 ac_prev=includedir ;;
1746 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1747 | --includ=* | --inclu=* | --incl=* | --inc=*)
1748 includedir=$ac_optarg ;;
1749
1750 -infodir | --infodir | --infodi | --infod | --info | --inf)
1751 ac_prev=infodir ;;
1752 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1753 infodir=$ac_optarg ;;
1754
1755 -libdir | --libdir | --libdi | --libd)
1756 ac_prev=libdir ;;
1757 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1758 libdir=$ac_optarg ;;
1759
1760 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1761 | --libexe | --libex | --libe)
1762 ac_prev=libexecdir ;;
1763 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1764 | --libexe=* | --libex=* | --libe=*)
1765 libexecdir=$ac_optarg ;;
1766
1767 -localedir | --localedir | --localedi | --localed | --locale)
1768 ac_prev=localedir ;;
1769 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1770 localedir=$ac_optarg ;;
1771
1772 -localstatedir | --localstatedir | --localstatedi | --localstated \
1773 | --localstate | --localstat | --localsta | --localst | --locals)
1774 ac_prev=localstatedir ;;
1775 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1776 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1777 localstatedir=$ac_optarg ;;
1778
1779 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1780 ac_prev=mandir ;;
1781 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1782 mandir=$ac_optarg ;;
1783
1784 -nfp | --nfp | --nf)
1785 # Obsolete; use --without-fp.
1786 with_fp=no ;;
1787
1788 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1789 | --no-cr | --no-c | -n)
1790 no_create=yes ;;
1791
1792 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1793 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1794 no_recursion=yes ;;
1795
1796 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1797 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1798 | --oldin | --oldi | --old | --ol | --o)
1799 ac_prev=oldincludedir ;;
1800 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1801 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1802 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1803 oldincludedir=$ac_optarg ;;
1804
1805 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1806 ac_prev=prefix ;;
1807 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1808 prefix=$ac_optarg ;;
1809
1810 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1811 | --program-pre | --program-pr | --program-p)
1812 ac_prev=program_prefix ;;
1813 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1814 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1815 program_prefix=$ac_optarg ;;
1816
1817 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1818 | --program-suf | --program-su | --program-s)
1819 ac_prev=program_suffix ;;
1820 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1821 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1822 program_suffix=$ac_optarg ;;
1823
1824 -program-transform-name | --program-transform-name \
1825 | --program-transform-nam | --program-transform-na \
1826 | --program-transform-n | --program-transform- \
1827 | --program-transform | --program-transfor \
1828 | --program-transfo | --program-transf \
1829 | --program-trans | --program-tran \
1830 | --progr-tra | --program-tr | --program-t)
1831 ac_prev=program_transform_name ;;
1832 -program-transform-name=* | --program-transform-name=* \
1833 | --program-transform-nam=* | --program-transform-na=* \
1834 | --program-transform-n=* | --program-transform-=* \
1835 | --program-transform=* | --program-transfor=* \
1836 | --program-transfo=* | --program-transf=* \
1837 | --program-trans=* | --program-tran=* \
1838 | --progr-tra=* | --program-tr=* | --program-t=*)
1839 program_transform_name=$ac_optarg ;;
1840
1841 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1842 ac_prev=pdfdir ;;
1843 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1844 pdfdir=$ac_optarg ;;
1845
1846 -psdir | --psdir | --psdi | --psd | --ps)
1847 ac_prev=psdir ;;
1848 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1849 psdir=$ac_optarg ;;
1850
1851 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1852 | -silent | --silent | --silen | --sile | --sil)
1853 silent=yes ;;
1854
1855 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1856 ac_prev=sbindir ;;
1857 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1858 | --sbi=* | --sb=*)
1859 sbindir=$ac_optarg ;;
1860
1861 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1862 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1863 | --sharedst | --shareds | --shared | --share | --shar \
1864 | --sha | --sh)
1865 ac_prev=sharedstatedir ;;
1866 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1867 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1868 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1869 | --sha=* | --sh=*)
1870 sharedstatedir=$ac_optarg ;;
1871
1872 -site | --site | --sit)
1873 ac_prev=site ;;
1874 -site=* | --site=* | --sit=*)
1875 site=$ac_optarg ;;
1876
1877 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1878 ac_prev=srcdir ;;
1879 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1880 srcdir=$ac_optarg ;;
1881
1882 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1883 | --syscon | --sysco | --sysc | --sys | --sy)
1884 ac_prev=sysconfdir ;;
1885 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1886 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1887 sysconfdir=$ac_optarg ;;
1888
1889 -target | --target | --targe | --targ | --tar | --ta | --t)
1890 ac_prev=target_alias ;;
1891 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1892 target_alias=$ac_optarg ;;
1893
1894 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1895 verbose=yes ;;
1896
1897 -version | --version | --versio | --versi | --vers | -V)
1898 ac_init_version=: ;;
1899
1900 -with-* | --with-*)
1901 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1902 # Reject names that are not valid shell variable names.
1903 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
a9bec17c 1904 as_fn_error "invalid package name: $ac_useropt"
067d23c9
KY
1905 ac_useropt_orig=$ac_useropt
1906 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1907 case $ac_user_opts in
1908 *"
1909"with_$ac_useropt"
1910"*) ;;
1911 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1912 ac_unrecognized_sep=', ';;
1913 esac
1914 eval with_$ac_useropt=\$ac_optarg ;;
1915
1916 -without-* | --without-*)
1917 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1918 # Reject names that are not valid shell variable names.
1919 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
a9bec17c 1920 as_fn_error "invalid package name: $ac_useropt"
067d23c9
KY
1921 ac_useropt_orig=$ac_useropt
1922 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1923 case $ac_user_opts in
1924 *"
1925"with_$ac_useropt"
1926"*) ;;
1927 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1928 ac_unrecognized_sep=', ';;
1929 esac
1930 eval with_$ac_useropt=no ;;
1931
1932 --x)
1933 # Obsolete; use --with-x.
1934 with_x=yes ;;
1935
1936 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1937 | --x-incl | --x-inc | --x-in | --x-i)
1938 ac_prev=x_includes ;;
1939 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1940 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1941 x_includes=$ac_optarg ;;
1942
1943 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1944 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1945 ac_prev=x_libraries ;;
1946 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1947 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1948 x_libraries=$ac_optarg ;;
1949
a9bec17c
GM
1950 -*) as_fn_error "unrecognized option: \`$ac_option'
1951Try \`$0 --help' for more information."
067d23c9
KY
1952 ;;
1953
1954 *=*)
1955 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1956 # Reject names that are not valid shell variable names.
1957 case $ac_envvar in #(
1958 '' | [0-9]* | *[!_$as_cr_alnum]* )
a9bec17c 1959 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
067d23c9
KY
1960 esac
1961 eval $ac_envvar=\$ac_optarg
1962 export $ac_envvar ;;
1963
1964 *)
1965 # FIXME: should be removed in autoconf 3.0.
1966 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1967 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1968 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
a9bec17c 1969 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
067d23c9
KY
1970 ;;
1971
1972 esac
1973done
1974
1975if test -n "$ac_prev"; then
1976 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
a9bec17c 1977 as_fn_error "missing argument to $ac_option"
067d23c9
KY
1978fi
1979
1980if test -n "$ac_unrecognized_opts"; then
1981 case $enable_option_checking in
1982 no) ;;
a9bec17c 1983 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
067d23c9
KY
1984 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1985 esac
1986fi
1987
1988# Check all directory arguments for consistency.
1989for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1990 datadir sysconfdir sharedstatedir localstatedir includedir \
1991 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1992 libdir localedir mandir
1993do
1994 eval ac_val=\$$ac_var
1995 # Remove trailing slashes.
1996 case $ac_val in
1997 */ )
1998 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1999 eval $ac_var=\$ac_val;;
2000 esac
2001 # Be sure to have absolute directory names.
2002 case $ac_val in
2003 [\\/$]* | ?:[\\/]* ) continue;;
2004 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
2005 esac
a9bec17c 2006 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
067d23c9
KY
2007done
2008
2009# There might be people who depend on the old broken behavior: `$host'
2010# used to hold the argument of --host etc.
2011# FIXME: To remove some day.
2012build=$build_alias
2013host=$host_alias
2014target=$target_alias
2015
2016# FIXME: To remove some day.
2017if test "x$host_alias" != x; then
2018 if test "x$build_alias" = x; then
2019 cross_compiling=maybe
a9bec17c
GM
2020 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
2021 If a cross compiler is detected then cross compile mode will be used." >&2
067d23c9
KY
2022 elif test "x$build_alias" != "x$host_alias"; then
2023 cross_compiling=yes
2024 fi
2025fi
2026
2027ac_tool_prefix=
2028test -n "$host_alias" && ac_tool_prefix=$host_alias-
2029
2030test "$silent" = yes && exec 6>/dev/null
2031
2032
2033ac_pwd=`pwd` && test -n "$ac_pwd" &&
2034ac_ls_di=`ls -di .` &&
2035ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
a9bec17c 2036 as_fn_error "working directory cannot be determined"
067d23c9 2037test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
a9bec17c 2038 as_fn_error "pwd does not report name of working directory"
067d23c9
KY
2039
2040
2041# Find the source files, if location was not specified.
2042if test -z "$srcdir"; then
2043 ac_srcdir_defaulted=yes
2044 # Try the directory containing this script, then the parent directory.
2045 ac_confdir=`$as_dirname -- "$as_myself" ||
2046$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
2047 X"$as_myself" : 'X\(//\)[^/]' \| \
2048 X"$as_myself" : 'X\(//\)$' \| \
2049 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
2050$as_echo X"$as_myself" |
2051 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
2052 s//\1/
2053 q
2054 }
2055 /^X\(\/\/\)[^/].*/{
2056 s//\1/
2057 q
2058 }
2059 /^X\(\/\/\)$/{
2060 s//\1/
2061 q
2062 }
2063 /^X\(\/\).*/{
2064 s//\1/
2065 q
2066 }
2067 s/.*/./; q'`
2068 srcdir=$ac_confdir
2069 if test ! -r "$srcdir/$ac_unique_file"; then
2070 srcdir=..
2071 fi
2072else
2073 ac_srcdir_defaulted=no
2074fi
2075if test ! -r "$srcdir/$ac_unique_file"; then
2076 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
a9bec17c 2077 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
067d23c9
KY
2078fi
2079ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
2080ac_abs_confdir=`(
a9bec17c 2081 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
067d23c9
KY
2082 pwd)`
2083# When building in place, set srcdir=.
2084if test "$ac_abs_confdir" = "$ac_pwd"; then
2085 srcdir=.
2086fi
2087# Remove unnecessary trailing slashes from srcdir.
2088# Double slashes in file names in object file debugging info
2089# mess up M-x gdb in Emacs.
2090case $srcdir in
2091*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
2092esac
2093for ac_var in $ac_precious_vars; do
2094 eval ac_env_${ac_var}_set=\${${ac_var}+set}
2095 eval ac_env_${ac_var}_value=\$${ac_var}
2096 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
2097 eval ac_cv_env_${ac_var}_value=\$${ac_var}
2098done
2099
2100#
2101# Report the --help message.
2102#
2103if test "$ac_init_help" = "long"; then
2104 # Omit some internal or obsolete options to make the list less imposing.
2105 # This message is too long to be a string in the A/UX 3.1 sh.
2106 cat <<_ACEOF
c574bc34 2107\`configure' configures emacs 24.3.50 to adapt to many kinds of systems.
067d23c9
KY
2108
2109Usage: $0 [OPTION]... [VAR=VALUE]...
2110
2111To assign environment variables (e.g., CC, CFLAGS...), specify them as
2112VAR=VALUE. See below for descriptions of some of the useful variables.
2113
2114Defaults for the options are specified in brackets.
2115
2116Configuration:
2117 -h, --help display this help and exit
2118 --help=short display options specific to this package
2119 --help=recursive display the short help of all the included packages
2120 -V, --version display version information and exit
a9bec17c 2121 -q, --quiet, --silent do not print \`checking...' messages
067d23c9
KY
2122 --cache-file=FILE cache test results in FILE [disabled]
2123 -C, --config-cache alias for \`--cache-file=config.cache'
2124 -n, --no-create do not create output files
2125 --srcdir=DIR find the sources in DIR [configure dir or \`..']
2126
2127Installation directories:
2128 --prefix=PREFIX install architecture-independent files in PREFIX
2129 [$ac_default_prefix]
2130 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
2131 [PREFIX]
2132
2133By default, \`make install' will install all the files in
2134\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
2135an installation prefix other than \`$ac_default_prefix' using \`--prefix',
2136for instance \`--prefix=\$HOME'.
2137
2138For better control, use the options below.
2139
2140Fine tuning of the installation directories:
2141 --bindir=DIR user executables [EPREFIX/bin]
2142 --sbindir=DIR system admin executables [EPREFIX/sbin]
2143 --libexecdir=DIR program executables [EPREFIX/libexec]
2144 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
2145 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
2146 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
2147 --libdir=DIR object code libraries [EPREFIX/lib]
2148 --includedir=DIR C header files [PREFIX/include]
2149 --oldincludedir=DIR C header files for non-gcc [/usr/include]
2150 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
2151 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
2152 --infodir=DIR info documentation [DATAROOTDIR/info]
2153 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
2154 --mandir=DIR man documentation [DATAROOTDIR/man]
2155 --docdir=DIR documentation root [DATAROOTDIR/doc/emacs]
2156 --htmldir=DIR html documentation [DOCDIR]
2157 --dvidir=DIR dvi documentation [DOCDIR]
2158 --pdfdir=DIR pdf documentation [DOCDIR]
2159 --psdir=DIR ps documentation [DOCDIR]
2160_ACEOF
2161
2162 cat <<\_ACEOF
2163
2164Program names:
2165 --program-prefix=PREFIX prepend PREFIX to installed program names
2166 --program-suffix=SUFFIX append SUFFIX to installed program names
2167 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
2168
2169X features:
2170 --x-includes=DIR X include files are in DIR
2171 --x-libraries=DIR X library files are in DIR
2172
2173System types:
2174 --build=BUILD configure for building on BUILD [guessed]
2175 --host=HOST cross-compile to build programs to run on HOST [BUILD]
2176_ACEOF
2177fi
2178
2179if test -n "$ac_init_help"; then
2180 case $ac_init_help in
c574bc34 2181 short | recursive ) echo "Configuration of emacs 24.3.50:";;
067d23c9
KY
2182 esac
2183 cat <<\_ACEOF
2184
2185Optional Features:
2186 --disable-option-checking ignore unrecognized --enable/--with options
2187 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
2188 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
2189 --disable-ns-self-contained
2190 disable self contained build under NeXTstep
067d23c9
KY
2191 --enable-locallisppath=PATH
2192 directories Emacs should search for lisp files
2193 specific to this site
2194 --enable-checking[=LIST]
2195 enable expensive run-time checks. With LIST, enable
2196 only specific categories of checks. Categories are:
2197 all,yes,no. Flags are: stringbytes, stringoverrun,
7ee3791f 2198 stringfreelist, xmallocoverrun, conslist, glyphs
afd07e01
GM
2199 --enable-check-lisp-object-type
2200 enable compile time checks for the Lisp_Object data
2201 type. This is useful for development for catching
2202 certain types of bugs.
3dc00ee8
GM
2203 --enable-profiling build emacs with low-level, gprof profiling support.
2204 Mainly useful for debugging Emacs itself. May not
2205 work on all platforms. Stops profiler.el working.
067d23c9
KY
2206 --enable-autodepend automatically generate dependencies to .h-files.
2207 Requires GNU Make and Gcc. Enabled if GNU Make and
2208 Gcc is found
4efe5ef9
GM
2209 --enable-gtk-deprecation-warnings
2210 Show Gtk+/Gdk deprecation warnings for Gtk+ >= 3.0
743c80a7
PE
2211 --disable-dependency-tracking speeds up one-time build
2212 --enable-dependency-tracking do not reject slow dependency extractors
067d23c9 2213 --disable-largefile omit support for large files
ac924f35
GM
2214 --enable-gcc-warnings turn on lots of GCC warnings/errors. This is
2215 intended for developers, and may generate false
2216 alarms when used with older or non-GNU development
2217 tools.
e4d35030
GM
2218 --enable-link-time-optimization
2219 build emacs with link-time optimization. This is
2220 supported only for GCC since 4.5.0.
3a019ab4 2221 --disable-acl do not support ACLs
067d23c9
KY
2222
2223Optional Packages:
2224 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
2225 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
ee77919d
GM
2226 --without-all omit almost all features and build small executable
2227 with minimal dependencies
067d23c9
KY
2228 --without-pop don't support POP mail retrieval with movemail
2229 --with-kerberos support Kerberos-authenticated POP
2230 --with-kerberos5 support Kerberos version 5 authenticated POP
2231 --with-hesiod support Hesiod to get the POP server host
2232 --with-mmdf support MMDF mailboxes
2233 --with-mail-unlink unlink, rather than empty, mail spool after reading
2234 --with-mailhost=HOSTNAME
2235 string giving default POP mail host
2236 --without-sound don't compile with sound support
4fa92495
GM
2237 --with-x-toolkit=KIT use an X toolkit (KIT one of: yes or gtk, gtk2,
2238 gtk3, lucid or athena, motif, no)
0442dc7f 2239 --with-wide-int prefer wide Emacs integers (typically 62-bit)
067d23c9
KY
2240 --without-xpm don't compile with XPM image support
2241 --without-jpeg don't compile with JPEG image support
2242 --without-tiff don't compile with TIFF image support
2243 --without-gif don't compile with GIF image support
2244 --without-png don't compile with PNG image support
2245 --without-rsvg don't compile with SVG image support
2246 --without-xml2 don't compile with XML parsing support
2247 --without-imagemagick don't compile with ImageMagick image support
2248 --without-xft don't use XFT for anti aliased fonts
2249 --without-libotf don't use libotf for OpenType font support
2250 --without-m17n-flt don't use m17n-flt for text shaping
2251 --without-toolkit-scroll-bars
2252 don't use Motif or Xaw3d scroll bars
2253 --without-xaw3d don't use Xaw3d
2254 --without-xim don't use X11 XIM
7834125e 2255 --with-ns use NeXTstep (Cocoa or GNUstep) windowing system
7c61eaab 2256 --with-w32 use native MS Windows GUI in a Cygwin build
067d23c9
KY
2257 --without-gpm don't use -lgpm for mouse support on a GNU/Linux
2258 console
2259 --without-dbus don't compile with D-Bus support
2260 --without-gconf don't compile with GConf support
f527bd02 2261 --without-gsettings don't compile with GSettings support
067d23c9
KY
2262 --without-selinux don't compile with SELinux support
2263 --without-gnutls don't use -lgnutls for SSL/TLS support
0f55a32e
GM
2264 --with-file-notification=LIB
2265 use a file notification library (LIB one of: yes,
2266 gfile, inotify, w32, no)
067d23c9
KY
2267 --without-makeinfo don't require makeinfo for building manuals
2268 --without-compress-info don't compress the installed Info pages
b5591ebb
GM
2269 --with-pkg-config-prog=FILENAME
2270 file name of pkg-config for finding GTK and librsvg
4fc5868a 2271 --with-gameuser=USER user for shared game score files
b5591ebb
GM
2272 --with-gnustep-conf=FILENAME
2273 name of GNUstep.conf; default $GNUSTEP_CONFIG_FILE,
067d23c9
KY
2274 or /etc/GNUstep/GNUstep.conf
2275 --with-x use the X Window System
2276
2277Some influential environment variables:
2278 CC C compiler command
2279 CFLAGS C compiler flags
2280 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
2281 nonstandard directory <lib dir>
2282 LIBS libraries to pass to the linker, e.g. -l<library>
2283 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2284 you have headers in a nonstandard directory <include dir>
2285 CPP C preprocessor
2286 XMKMF Path to xmkmf, Makefile generator for X Window System
2287
2288Use these variables to override the choices made by `configure' or to help
2289it to find libraries and programs with nonstandard names/locations.
2290
2291Report bugs to the package provider.
2292_ACEOF
2293ac_status=$?
2294fi
2295
2296if test "$ac_init_help" = "recursive"; then
2297 # If there are subdirs, report their specific --help.
2298 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2299 test -d "$ac_dir" ||
2300 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2301 continue
2302 ac_builddir=.
2303
2304case "$ac_dir" in
2305.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2306*)
2307 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2308 # A ".." for each directory in $ac_dir_suffix.
2309 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2310 case $ac_top_builddir_sub in
2311 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2312 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2313 esac ;;
2314esac
2315ac_abs_top_builddir=$ac_pwd
2316ac_abs_builddir=$ac_pwd$ac_dir_suffix
2317# for backward compatibility:
2318ac_top_builddir=$ac_top_build_prefix
2319
2320case $srcdir in
2321 .) # We are building in place.
2322 ac_srcdir=.
2323 ac_top_srcdir=$ac_top_builddir_sub
2324 ac_abs_top_srcdir=$ac_pwd ;;
2325 [\\/]* | ?:[\\/]* ) # Absolute name.
2326 ac_srcdir=$srcdir$ac_dir_suffix;
2327 ac_top_srcdir=$srcdir
2328 ac_abs_top_srcdir=$srcdir ;;
2329 *) # Relative name.
2330 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2331 ac_top_srcdir=$ac_top_build_prefix$srcdir
2332 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2333esac
2334ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2335
2336 cd "$ac_dir" || { ac_status=$?; continue; }
2337 # Check for guested configure.
2338 if test -f "$ac_srcdir/configure.gnu"; then
2339 echo &&
2340 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2341 elif test -f "$ac_srcdir/configure"; then
2342 echo &&
2343 $SHELL "$ac_srcdir/configure" --help=recursive
2344 else
2345 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2346 fi || ac_status=$?
2347 cd "$ac_pwd" || { ac_status=$?; break; }
2348 done
2349fi
2350
2351test -n "$ac_init_help" && exit $ac_status
2352if $ac_init_version; then
2353 cat <<\_ACEOF
c574bc34 2354emacs configure 24.3.50
a9bec17c 2355generated by GNU Autoconf 2.65
067d23c9 2356
a9bec17c 2357Copyright (C) 2009 Free Software Foundation, Inc.
067d23c9
KY
2358This configure script is free software; the Free Software Foundation
2359gives unlimited permission to copy, distribute and modify it.
2360_ACEOF
2361 exit
2362fi
2363
2364## ------------------------ ##
2365## Autoconf initialization. ##
2366## ------------------------ ##
2367
2368# ac_fn_c_try_compile LINENO
2369# --------------------------
2370# Try to compile conftest.$ac_ext, and return whether this succeeded.
2371ac_fn_c_try_compile ()
2372{
2373 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2374 rm -f conftest.$ac_objext
2375 if { { ac_try="$ac_compile"
2376case "(($ac_try" in
2377 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2378 *) ac_try_echo=$ac_try;;
2379esac
2380eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2381$as_echo "$ac_try_echo"; } >&5
2382 (eval "$ac_compile") 2>conftest.err
2383 ac_status=$?
2384 if test -s conftest.err; then
2385 grep -v '^ *+' conftest.err >conftest.er1
2386 cat conftest.er1 >&5
2387 mv -f conftest.er1 conftest.err
2388 fi
2389 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2390 test $ac_status = 0; } && {
2391 test -z "$ac_c_werror_flag" ||
2392 test ! -s conftest.err
2393 } && test -s conftest.$ac_objext; then :
2394 ac_retval=0
2395else
2396 $as_echo "$as_me: failed program was:" >&5
2397sed 's/^/| /' conftest.$ac_ext >&5
2398
2399 ac_retval=1
2400fi
a9bec17c 2401 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
067d23c9
KY
2402 as_fn_set_status $ac_retval
2403
2404} # ac_fn_c_try_compile
2405
067d23c9
KY
2406# ac_fn_c_try_cpp LINENO
2407# ----------------------
2408# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2409ac_fn_c_try_cpp ()
2410{
2411 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2412 if { { ac_try="$ac_cpp conftest.$ac_ext"
2413case "(($ac_try" in
2414 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2415 *) ac_try_echo=$ac_try;;
2416esac
2417eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2418$as_echo "$ac_try_echo"; } >&5
2419 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2420 ac_status=$?
2421 if test -s conftest.err; then
2422 grep -v '^ *+' conftest.err >conftest.er1
2423 cat conftest.er1 >&5
2424 mv -f conftest.er1 conftest.err
2425 fi
2426 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
a9bec17c 2427 test $ac_status = 0; } >/dev/null && {
067d23c9
KY
2428 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2429 test ! -s conftest.err
2430 }; then :
2431 ac_retval=0
2432else
2433 $as_echo "$as_me: failed program was:" >&5
2434sed 's/^/| /' conftest.$ac_ext >&5
2435
2436 ac_retval=1
2437fi
a9bec17c 2438 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
067d23c9
KY
2439 as_fn_set_status $ac_retval
2440
2441} # ac_fn_c_try_cpp
2442
2443# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
2444# -------------------------------------------------------
2445# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2446# the include files in INCLUDES and setting the cache variable VAR
2447# accordingly.
2448ac_fn_c_check_header_mongrel ()
2449{
2450 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
a9bec17c 2451 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
067d23c9
KY
2452 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2453$as_echo_n "checking for $2... " >&6; }
a9bec17c 2454if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
067d23c9
KY
2455 $as_echo_n "(cached) " >&6
2456fi
2457eval ac_res=\$$3
2458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2459$as_echo "$ac_res" >&6; }
2460else
2461 # Is the header compilable?
2462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2463$as_echo_n "checking $2 usability... " >&6; }
2464cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2465/* end confdefs.h. */
2466$4
2467#include <$2>
2468_ACEOF
2469if ac_fn_c_try_compile "$LINENO"; then :
2470 ac_header_compiler=yes
2471else
2472 ac_header_compiler=no
2473fi
2474rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2475{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2476$as_echo "$ac_header_compiler" >&6; }
2477
2478# Is the header present?
2479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2480$as_echo_n "checking $2 presence... " >&6; }
2481cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2482/* end confdefs.h. */
2483#include <$2>
2484_ACEOF
2485if ac_fn_c_try_cpp "$LINENO"; then :
2486 ac_header_preproc=yes
2487else
2488 ac_header_preproc=no
2489fi
a9bec17c 2490rm -f conftest.err conftest.$ac_ext
067d23c9
KY
2491{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2492$as_echo "$ac_header_preproc" >&6; }
2493
2494# So? What about this header?
2495case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
2496 yes:no: )
2497 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2498$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2499 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2500$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2501 ;;
2502 no:yes:* )
2503 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2504$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2505 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
2506$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
2507 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2508$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2509 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
2510$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
2511 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2512$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2513 ;;
2514esac
2515 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2516$as_echo_n "checking for $2... " >&6; }
a9bec17c 2517if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
067d23c9
KY
2518 $as_echo_n "(cached) " >&6
2519else
2520 eval "$3=\$ac_header_compiler"
2521fi
2522eval ac_res=\$$3
2523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2524$as_echo "$ac_res" >&6; }
2525fi
a9bec17c 2526 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
067d23c9
KY
2527
2528} # ac_fn_c_check_header_mongrel
2529
2530# ac_fn_c_try_run LINENO
2531# ----------------------
2532# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2533# that executables *can* be run.
2534ac_fn_c_try_run ()
2535{
2536 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2537 if { { ac_try="$ac_link"
2538case "(($ac_try" in
2539 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2540 *) ac_try_echo=$ac_try;;
2541esac
2542eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2543$as_echo "$ac_try_echo"; } >&5
2544 (eval "$ac_link") 2>&5
2545 ac_status=$?
2546 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2547 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2548 { { case "(($ac_try" in
2549 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2550 *) ac_try_echo=$ac_try;;
2551esac
2552eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2553$as_echo "$ac_try_echo"; } >&5
2554 (eval "$ac_try") 2>&5
2555 ac_status=$?
2556 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2557 test $ac_status = 0; }; }; then :
2558 ac_retval=0
2559else
2560 $as_echo "$as_me: program exited with status $ac_status" >&5
2561 $as_echo "$as_me: failed program was:" >&5
2562sed 's/^/| /' conftest.$ac_ext >&5
2563
2564 ac_retval=$ac_status
2565fi
2566 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
a9bec17c 2567 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
067d23c9
KY
2568 as_fn_set_status $ac_retval
2569
2570} # ac_fn_c_try_run
2571
2572# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2573# -------------------------------------------------------
2574# Tests whether HEADER exists and can be compiled using the include files in
2575# INCLUDES, setting the cache variable VAR accordingly.
2576ac_fn_c_check_header_compile ()
2577{
2578 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2579 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2580$as_echo_n "checking for $2... " >&6; }
a9bec17c 2581if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
067d23c9
KY
2582 $as_echo_n "(cached) " >&6
2583else
2584 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2585/* end confdefs.h. */
2586$4
2587#include <$2>
2588_ACEOF
2589if ac_fn_c_try_compile "$LINENO"; then :
2590 eval "$3=yes"
2591else
2592 eval "$3=no"
2593fi
2594rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2595fi
2596eval ac_res=\$$3
2597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2598$as_echo "$ac_res" >&6; }
a9bec17c 2599 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
067d23c9
KY
2600
2601} # ac_fn_c_check_header_compile
2602
1fd182f0
PE
2603# ac_fn_c_try_link LINENO
2604# -----------------------
2605# Try to link conftest.$ac_ext, and return whether this succeeded.
2606ac_fn_c_try_link ()
2607{
2608 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2609 rm -f conftest.$ac_objext conftest$ac_exeext
2610 if { { ac_try="$ac_link"
2611case "(($ac_try" in
2612 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2613 *) ac_try_echo=$ac_try;;
2614esac
2615eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2616$as_echo "$ac_try_echo"; } >&5
2617 (eval "$ac_link") 2>conftest.err
2618 ac_status=$?
2619 if test -s conftest.err; then
2620 grep -v '^ *+' conftest.err >conftest.er1
2621 cat conftest.er1 >&5
2622 mv -f conftest.er1 conftest.err
2623 fi
2624 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2625 test $ac_status = 0; } && {
2626 test -z "$ac_c_werror_flag" ||
2627 test ! -s conftest.err
2628 } && test -s conftest$ac_exeext && {
2629 test "$cross_compiling" = yes ||
2630 $as_test_x conftest$ac_exeext
2631 }; then :
2632 ac_retval=0
2633else
2634 $as_echo "$as_me: failed program was:" >&5
2635sed 's/^/| /' conftest.$ac_ext >&5
2636
2637 ac_retval=1
2638fi
2639 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2640 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2641 # interfere with the next link command; also delete a directory that is
2642 # left behind by Apple's compiler. We do this before executing the actions.
2643 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
a9bec17c 2644 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1fd182f0
PE
2645 as_fn_set_status $ac_retval
2646
2647} # ac_fn_c_try_link
2648
42bbbe8b
GM
2649# ac_fn_c_check_decl LINENO SYMBOL VAR
2650# ------------------------------------
2651# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2652ac_fn_c_check_decl ()
2653{
2654 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2655 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5
2656$as_echo_n "checking whether $2 is declared... " >&6; }
2657if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2658 $as_echo_n "(cached) " >&6
2659else
2660 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2661/* end confdefs.h. */
2662$4
2663int
2664main ()
2665{
2666#ifndef $2
2667 (void) $2;
2668#endif
2669
2670 ;
2671 return 0;
2672}
2673_ACEOF
2674if ac_fn_c_try_compile "$LINENO"; then :
2675 eval "$3=yes"
2676else
2677 eval "$3=no"
2678fi
2679rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2680fi
2681eval ac_res=\$$3
2682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2683$as_echo "$ac_res" >&6; }
2684 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2685
2686} # ac_fn_c_check_decl
2687
5476a9a4
GM
2688# ac_fn_c_check_header_preproc LINENO HEADER VAR
2689# ----------------------------------------------
2690# Tests whether HEADER is present, setting the cache variable VAR accordingly.
2691ac_fn_c_check_header_preproc ()
067d23c9
KY
2692{
2693 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2694 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2695$as_echo_n "checking for $2... " >&6; }
a9bec17c 2696if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
067d23c9
KY
2697 $as_echo_n "(cached) " >&6
2698else
2699 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2700/* end confdefs.h. */
5476a9a4
GM
2701#include <$2>
2702_ACEOF
2703if ac_fn_c_try_cpp "$LINENO"; then :
2704 eval "$3=yes"
2705else
2706 eval "$3=no"
2707fi
2708rm -f conftest.err conftest.$ac_ext
2709fi
2710eval ac_res=\$$3
2711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2712$as_echo "$ac_res" >&6; }
2713 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
067d23c9 2714
5476a9a4 2715} # ac_fn_c_check_header_preproc
067d23c9 2716
5476a9a4
GM
2717# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2718# ----------------------------------------------------
2719# Tries to find if the field MEMBER exists in type AGGR, after including
2720# INCLUDES, setting cache variable VAR accordingly.
2721ac_fn_c_check_member ()
2722{
2723 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2724 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2725$as_echo_n "checking for $2.$3... " >&6; }
2726if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2727 $as_echo_n "(cached) " >&6
2728else
2729 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2730/* end confdefs.h. */
2731$5
2732int
2733main ()
2734{
2735static $2 ac_aggr;
2736if (ac_aggr.$3)
2737return 0;
2738 ;
2739 return 0;
2740}
2741_ACEOF
2742if ac_fn_c_try_compile "$LINENO"; then :
2743 eval "$4=yes"
2744else
2745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2746/* end confdefs.h. */
2747$5
2748int
2749main ()
2750{
2751static $2 ac_aggr;
2752if (sizeof ac_aggr.$3)
2753return 0;
2754 ;
2755 return 0;
2756}
2757_ACEOF
2758if ac_fn_c_try_compile "$LINENO"; then :
2759 eval "$4=yes"
2760else
2761 eval "$4=no"
2762fi
2763rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2764fi
2765rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2766fi
2767eval ac_res=\$$4
2768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2769$as_echo "$ac_res" >&6; }
2770 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2771
2772} # ac_fn_c_check_member
2773
2774# ac_fn_c_check_func LINENO FUNC VAR
2775# ----------------------------------
2776# Tests whether FUNC exists, setting the cache variable VAR accordingly
2777ac_fn_c_check_func ()
2778{
2779 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2780 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2781$as_echo_n "checking for $2... " >&6; }
2782if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2783 $as_echo_n "(cached) " >&6
2784else
2785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2786/* end confdefs.h. */
2787/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2788 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2789#define $2 innocuous_$2
2790
2791/* System header to define __stub macros and hopefully few prototypes,
2792 which can conflict with char $2 (); below.
2793 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2794 <limits.h> exists even on freestanding compilers. */
2795
2796#ifdef __STDC__
067d23c9
KY
2797# include <limits.h>
2798#else
2799# include <assert.h>
2800#endif
2801
2802#undef $2
2803
2804/* Override any GCC internal prototype to avoid an error.
2805 Use char because int might match the return type of a GCC
2806 builtin and then its argument prototype would still apply. */
2807#ifdef __cplusplus
2808extern "C"
2809#endif
2810char $2 ();
2811/* The GNU C library defines this for functions which it implements
2812 to always fail with ENOSYS. Some functions are actually named
2813 something starting with __ and the normal name is an alias. */
2814#if defined __stub_$2 || defined __stub___$2
2815choke me
2816#endif
2817
2818int
2819main ()
2820{
2821return $2 ();
2822 ;
2823 return 0;
2824}
2825_ACEOF
2826if ac_fn_c_try_link "$LINENO"; then :
2827 eval "$3=yes"
2828else
2829 eval "$3=no"
2830fi
2831rm -f core conftest.err conftest.$ac_objext \
2832 conftest$ac_exeext conftest.$ac_ext
2833fi
2834eval ac_res=\$$3
2835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2836$as_echo "$ac_res" >&6; }
a9bec17c 2837 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
067d23c9
KY
2838
2839} # ac_fn_c_check_func
2840
5476a9a4
GM
2841# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2842# -------------------------------------------
2843# Tests whether TYPE exists after having included INCLUDES, setting cache
2844# variable VAR accordingly.
2845ac_fn_c_check_type ()
3e0be4ab
GM
2846{
2847 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
5476a9a4
GM
2848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2849$as_echo_n "checking for $2... " >&6; }
2850if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
3e0be4ab
GM
2851 $as_echo_n "(cached) " >&6
2852else
5476a9a4 2853 eval "$3=no"
3e0be4ab
GM
2854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2855/* end confdefs.h. */
5476a9a4 2856$4
3e0be4ab
GM
2857int
2858main ()
2859{
5476a9a4
GM
2860if (sizeof ($2))
2861 return 0;
3e0be4ab
GM
2862 ;
2863 return 0;
2864}
2865_ACEOF
2866if ac_fn_c_try_compile "$LINENO"; then :
2867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2868/* end confdefs.h. */
5476a9a4 2869$4
3e0be4ab
GM
2870int
2871main ()
2872{
5476a9a4
GM
2873if (sizeof (($2)))
2874 return 0;
3e0be4ab
GM
2875 ;
2876 return 0;
2877}
2878_ACEOF
2879if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4 2880
3e0be4ab 2881else
5476a9a4 2882 eval "$3=yes"
3e0be4ab
GM
2883fi
2884rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2885fi
2886rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2887fi
5476a9a4 2888eval ac_res=\$$3
3e0be4ab
GM
2889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2890$as_echo "$ac_res" >&6; }
a9bec17c 2891 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
3e0be4ab 2892
5476a9a4 2893} # ac_fn_c_check_type
3e0be4ab 2894
5f90be1b
PE
2895# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2896# --------------------------------------------
2897# Tries to find the compile-time value of EXPR in a program that includes
2898# INCLUDES, setting VAR accordingly. Returns whether the value could be
2899# computed
2900ac_fn_c_compute_int ()
2901{
2902 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2903 if test "$cross_compiling" = yes; then
2904 # Depending upon the size, compute the lo and hi bounds.
2905cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2906/* end confdefs.h. */
2907$4
2908int
2909main ()
2910{
2911static int test_array [1 - 2 * !(($2) >= 0)];
2912test_array [0] = 0
2913
2914 ;
2915 return 0;
2916}
2917_ACEOF
2918if ac_fn_c_try_compile "$LINENO"; then :
2919 ac_lo=0 ac_mid=0
2920 while :; do
2921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2922/* end confdefs.h. */
2923$4
2924int
2925main ()
2926{
2927static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2928test_array [0] = 0
2929
2930 ;
2931 return 0;
2932}
2933_ACEOF
2934if ac_fn_c_try_compile "$LINENO"; then :
2935 ac_hi=$ac_mid; break
2936else
2937 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2938 if test $ac_lo -le $ac_mid; then
2939 ac_lo= ac_hi=
2940 break
2941 fi
2942 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2943fi
2944rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2945 done
2946else
2947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2948/* end confdefs.h. */
2949$4
2950int
2951main ()
2952{
2953static int test_array [1 - 2 * !(($2) < 0)];
2954test_array [0] = 0
2955
2956 ;
2957 return 0;
2958}
2959_ACEOF
2960if ac_fn_c_try_compile "$LINENO"; then :
2961 ac_hi=-1 ac_mid=-1
2962 while :; do
2963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2964/* end confdefs.h. */
2965$4
2966int
2967main ()
2968{
2969static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2970test_array [0] = 0
2971
2972 ;
2973 return 0;
2974}
2975_ACEOF
2976if ac_fn_c_try_compile "$LINENO"; then :
2977 ac_lo=$ac_mid; break
2978else
2979 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2980 if test $ac_mid -le $ac_hi; then
2981 ac_lo= ac_hi=
2982 break
2983 fi
2984 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2985fi
2986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2987 done
2988else
2989 ac_lo= ac_hi=
2990fi
2991rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2992fi
2993rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2994# Binary search between lo and hi bounds.
2995while test "x$ac_lo" != "x$ac_hi"; do
2996 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2998/* end confdefs.h. */
2999$4
3000int
3001main ()
3002{
3003static int test_array [1 - 2 * !(($2) <= $ac_mid)];
3004test_array [0] = 0
3005
3006 ;
3007 return 0;
3008}
3009_ACEOF
3010if ac_fn_c_try_compile "$LINENO"; then :
3011 ac_hi=$ac_mid
3012else
3013 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
3014fi
3015rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3016done
3017case $ac_lo in #((
3018?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
3019'') ac_retval=1 ;;
3020esac
3021 else
3022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3023/* end confdefs.h. */
3024$4
3025static long int longval () { return $2; }
3026static unsigned long int ulongval () { return $2; }
3027#include <stdio.h>
3028#include <stdlib.h>
3029int
3030main ()
3031{
3032
3033 FILE *f = fopen ("conftest.val", "w");
3034 if (! f)
3035 return 1;
3036 if (($2) < 0)
3037 {
3038 long int i = longval ();
3039 if (i != ($2))
3040 return 1;
3041 fprintf (f, "%ld", i);
3042 }
3043 else
3044 {
3045 unsigned long int i = ulongval ();
3046 if (i != ($2))
3047 return 1;
3048 fprintf (f, "%lu", i);
3049 }
3050 /* Do not output a trailing newline, as this causes \r\n confusion
3051 on some platforms. */
3052 return ferror (f) || fclose (f) != 0;
3053
3054 ;
3055 return 0;
3056}
3057_ACEOF
3058if ac_fn_c_try_run "$LINENO"; then :
3059 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
3060else
3061 ac_retval=1
3062fi
3063rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3064 conftest.$ac_objext conftest.beam conftest.$ac_ext
3065rm -f conftest.val
3066
3067 fi
a9bec17c 3068 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
5f90be1b
PE
3069 as_fn_set_status $ac_retval
3070
3071} # ac_fn_c_compute_int
067d23c9
KY
3072cat >config.log <<_ACEOF
3073This file contains any messages produced by compilers while
3074running configure, to aid debugging if configure makes a mistake.
3075
c574bc34 3076It was created by emacs $as_me 24.3.50, which was
a9bec17c 3077generated by GNU Autoconf 2.65. Invocation command line was
067d23c9
KY
3078
3079 $ $0 $@
3080
3081_ACEOF
3082exec 5>>config.log
3083{
3084cat <<_ASUNAME
3085## --------- ##
3086## Platform. ##
3087## --------- ##
3088
3089hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3090uname -m = `(uname -m) 2>/dev/null || echo unknown`
3091uname -r = `(uname -r) 2>/dev/null || echo unknown`
3092uname -s = `(uname -s) 2>/dev/null || echo unknown`
3093uname -v = `(uname -v) 2>/dev/null || echo unknown`
3094
3095/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3096/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
3097
3098/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
3099/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
3100/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3101/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
3102/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
3103/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
3104/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
3105
3106_ASUNAME
3107
3108as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3109for as_dir in $PATH
3110do
3111 IFS=$as_save_IFS
3112 test -z "$as_dir" && as_dir=.
3113 $as_echo "PATH: $as_dir"
3114 done
3115IFS=$as_save_IFS
3116
3117} >&5
3118
3119cat >&5 <<_ACEOF
3120
3121
3122## ----------- ##
3123## Core tests. ##
3124## ----------- ##
3125
3126_ACEOF
3127
3128
3129# Keep a trace of the command line.
3130# Strip out --no-create and --no-recursion so they do not pile up.
3131# Strip out --silent because we don't want to record it for future runs.
3132# Also quote any args containing shell meta-characters.
3133# Make two passes to allow for proper duplicate-argument suppression.
3134ac_configure_args=
3135ac_configure_args0=
3136ac_configure_args1=
3137ac_must_keep_next=false
3138for ac_pass in 1 2
3139do
3140 for ac_arg
3141 do
3142 case $ac_arg in
3143 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3144 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3145 | -silent | --silent | --silen | --sile | --sil)
3146 continue ;;
3147 *\'*)
3148 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3149 esac
3150 case $ac_pass in
3151 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3152 2)
3153 as_fn_append ac_configure_args1 " '$ac_arg'"
3154 if test $ac_must_keep_next = true; then
3155 ac_must_keep_next=false # Got value, back to normal.
3156 else
3157 case $ac_arg in
3158 *=* | --config-cache | -C | -disable-* | --disable-* \
3159 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3160 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3161 | -with-* | --with-* | -without-* | --without-* | --x)
3162 case "$ac_configure_args0 " in
3163 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3164 esac
3165 ;;
3166 -* ) ac_must_keep_next=true ;;
3167 esac
3168 fi
3169 as_fn_append ac_configure_args " '$ac_arg'"
3170 ;;
3171 esac
3172 done
3173done
3174{ ac_configure_args0=; unset ac_configure_args0;}
3175{ ac_configure_args1=; unset ac_configure_args1;}
3176
3177# When interrupted or exit'd, cleanup temporary files, and complete
3178# config.log. We remove comments because anyway the quotes in there
3179# would cause problems or look ugly.
3180# WARNING: Use '\'' to represent an apostrophe within the trap.
3181# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3182trap 'exit_status=$?
3183 # Save into config.log some information that might help in debugging.
3184 {
3185 echo
3186
a9bec17c
GM
3187 cat <<\_ASBOX
3188## ---------------- ##
067d23c9 3189## Cache variables. ##
a9bec17c
GM
3190## ---------------- ##
3191_ASBOX
067d23c9
KY
3192 echo
3193 # The following way of writing the cache mishandles newlines in values,
3194(
3195 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3196 eval ac_val=\$$ac_var
3197 case $ac_val in #(
3198 *${as_nl}*)
3199 case $ac_var in #(
3200 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3201$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3202 esac
3203 case $ac_var in #(
3204 _ | IFS | as_nl) ;; #(
3205 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3206 *) { eval $ac_var=; unset $ac_var;} ;;
3207 esac ;;
3208 esac
3209 done
3210 (set) 2>&1 |
3211 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3212 *${as_nl}ac_space=\ *)
3213 sed -n \
3214 "s/'\''/'\''\\\\'\'''\''/g;
3215 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3216 ;; #(
3217 *)
3218 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3219 ;;
3220 esac |
3221 sort
3222)
3223 echo
3224
a9bec17c
GM
3225 cat <<\_ASBOX
3226## ----------------- ##
067d23c9 3227## Output variables. ##
a9bec17c
GM
3228## ----------------- ##
3229_ASBOX
067d23c9
KY
3230 echo
3231 for ac_var in $ac_subst_vars
3232 do
3233 eval ac_val=\$$ac_var
3234 case $ac_val in
3235 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3236 esac
3237 $as_echo "$ac_var='\''$ac_val'\''"
3238 done | sort
3239 echo
3240
3241 if test -n "$ac_subst_files"; then
a9bec17c
GM
3242 cat <<\_ASBOX
3243## ------------------- ##
067d23c9 3244## File substitutions. ##
a9bec17c
GM
3245## ------------------- ##
3246_ASBOX
067d23c9
KY
3247 echo
3248 for ac_var in $ac_subst_files
3249 do
3250 eval ac_val=\$$ac_var
3251 case $ac_val in
3252 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3253 esac
3254 $as_echo "$ac_var='\''$ac_val'\''"
3255 done | sort
3256 echo
3257 fi
3258
3259 if test -s confdefs.h; then
a9bec17c
GM
3260 cat <<\_ASBOX
3261## ----------- ##
067d23c9 3262## confdefs.h. ##
a9bec17c
GM
3263## ----------- ##
3264_ASBOX
067d23c9
KY
3265 echo
3266 cat confdefs.h
3267 echo
3268 fi
3269 test "$ac_signal" != 0 &&
3270 $as_echo "$as_me: caught signal $ac_signal"
3271 $as_echo "$as_me: exit $exit_status"
3272 } >&5
3273 rm -f core *.core core.conftest.* &&
3274 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3275 exit $exit_status
3276' 0
3277for ac_signal in 1 2 13 15; do
3278 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3279done
3280ac_signal=0
3281
3282# confdefs.h avoids OS command line length limits that DEFS can exceed.
3283rm -f -r conftest* confdefs.h
3284
3285$as_echo "/* confdefs.h */" > confdefs.h
3286
3287# Predefined preprocessor variables.
3288
3289cat >>confdefs.h <<_ACEOF
3290#define PACKAGE_NAME "$PACKAGE_NAME"
3291_ACEOF
3292
3293cat >>confdefs.h <<_ACEOF
3294#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3295_ACEOF
3296
3297cat >>confdefs.h <<_ACEOF
3298#define PACKAGE_VERSION "$PACKAGE_VERSION"
3299_ACEOF
3300
3301cat >>confdefs.h <<_ACEOF
3302#define PACKAGE_STRING "$PACKAGE_STRING"
3303_ACEOF
3304
3305cat >>confdefs.h <<_ACEOF
3306#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3307_ACEOF
3308
3309cat >>confdefs.h <<_ACEOF
3310#define PACKAGE_URL "$PACKAGE_URL"
3311_ACEOF
3312
3313
3314# Let the site file select an alternate cache file if it wants to.
3315# Prefer an explicitly selected file to automatically selected ones.
3316ac_site_file1=NONE
3317ac_site_file2=NONE
3318if test -n "$CONFIG_SITE"; then
a9bec17c 3319 ac_site_file1=$CONFIG_SITE
067d23c9
KY
3320elif test "x$prefix" != xNONE; then
3321 ac_site_file1=$prefix/share/config.site
3322 ac_site_file2=$prefix/etc/config.site
3323else
3324 ac_site_file1=$ac_default_prefix/share/config.site
3325 ac_site_file2=$ac_default_prefix/etc/config.site
3326fi
3327for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3328do
3329 test "x$ac_site_file" = xNONE && continue
3330 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3331 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3332$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3333 sed 's/^/| /' "$ac_site_file" >&5
a9bec17c 3334 . "$ac_site_file"
067d23c9
KY
3335 fi
3336done
3337
3338if test -r "$cache_file"; then
3339 # Some versions of bash will fail to source /dev/null (special files
3340 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
3341 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3342 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3343$as_echo "$as_me: loading cache $cache_file" >&6;}
3344 case $cache_file in
3345 [\\/]* | ?:[\\/]* ) . "$cache_file";;
3346 *) . "./$cache_file";;
3347 esac
3348 fi
3349else
3350 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3351$as_echo "$as_me: creating cache $cache_file" >&6;}
3352 >$cache_file
3353fi
3354
5476a9a4
GM
3355as_fn_append ac_header_list " linux/version.h"
3356as_fn_append ac_header_list " sys/systeminfo.h"
5476a9a4
GM
3357as_fn_append ac_header_list " coff.h"
3358as_fn_append ac_header_list " pty.h"
5476a9a4
GM
3359as_fn_append ac_header_list " sys/resource.h"
3360as_fn_append ac_header_list " sys/utsname.h"
3361as_fn_append ac_header_list " pwd.h"
3362as_fn_append ac_header_list " utmp.h"
5476a9a4
GM
3363as_fn_append ac_header_list " util.h"
3364as_fn_append ac_header_list " sys/socket.h"
3365as_fn_append ac_header_list " stdlib.h"
3366as_fn_append ac_header_list " unistd.h"
7e723570 3367as_fn_append ac_header_list " sys/param.h"
5476a9a4
GM
3368as_fn_append ac_header_list " pthread.h"
3369as_fn_append ac_header_list " malloc/malloc.h"
3370as_fn_append ac_header_list " maillock.h"
3371as_fn_append ac_header_list " sys/un.h"
3372as_fn_append ac_func_list " tzset"
3373as_fn_append ac_func_list " readlinkat"
d7ad186c 3374as_fn_append ac_header_list " dirent.h"
8966cbff 3375as_fn_append ac_header_list " execinfo.h"
710f5812 3376as_fn_append ac_func_list " faccessat"
d7ad186c 3377as_fn_append ac_func_list " fdopendir"
eda33f78 3378as_fn_append ac_header_list " stdio_ext.h"
3bf26e96 3379as_fn_append ac_func_list " __fpending"
d7ad186c 3380as_fn_append ac_func_list " fstatat"
2407788f 3381as_fn_append ac_func_list " fsync"
f199cab1
GM
3382gl_getopt_required=GNU
3383as_fn_append ac_header_list " getopt.h"
3384as_fn_append ac_func_list " gettimeofday"
3385as_fn_append ac_func_list " nanotime"
e700232f 3386as_fn_append ac_header_list " sys/time.h"
f199cab1
GM
3387as_fn_append ac_header_list " wchar.h"
3388as_fn_append ac_header_list " stdint.h"
3389as_fn_append ac_header_list " inttypes.h"
3390as_fn_append ac_func_list " lstat"
f199cab1
GM
3391as_fn_append ac_header_list " sys/select.h"
3392as_fn_append ac_func_list " pselect"
3393as_fn_append ac_func_list " pthread_sigmask"
3394as_fn_append ac_func_list " readlink"
f199cab1
GM
3395as_fn_append ac_func_list " strtoimax"
3396as_fn_append ac_func_list " strtoumax"
3397as_fn_append ac_func_list " symlink"
3398as_fn_append ac_header_list " sys/stat.h"
3399as_fn_append ac_func_list " localtime_r"
e700232f 3400as_fn_append ac_header_list " utime.h"
f199cab1
GM
3401as_fn_append ac_func_list " futimes"
3402as_fn_append ac_func_list " futimesat"
3403as_fn_append ac_func_list " futimens"
3404as_fn_append ac_func_list " utimensat"
3405as_fn_append ac_func_list " lutimes"
067d23c9
KY
3406# Check that the precious variables saved in the cache have kept the same
3407# value.
3408ac_cache_corrupted=false
3409for ac_var in $ac_precious_vars; do
3410 eval ac_old_set=\$ac_cv_env_${ac_var}_set
3411 eval ac_new_set=\$ac_env_${ac_var}_set
3412 eval ac_old_val=\$ac_cv_env_${ac_var}_value
3413 eval ac_new_val=\$ac_env_${ac_var}_value
3414 case $ac_old_set,$ac_new_set in
3415 set,)
3416 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3417$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3418 ac_cache_corrupted=: ;;
3419 ,set)
3420 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3421$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3422 ac_cache_corrupted=: ;;
3423 ,);;
3424 *)
3425 if test "x$ac_old_val" != "x$ac_new_val"; then
3426 # differences in whitespace do not lead to failure.
3427 ac_old_val_w=`echo x $ac_old_val`
3428 ac_new_val_w=`echo x $ac_new_val`
3429 if test "$ac_old_val_w" != "$ac_new_val_w"; then
3430 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3431$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3432 ac_cache_corrupted=:
3433 else
3434 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3435$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3436 eval $ac_var=\$ac_old_val
3437 fi
3438 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
3439$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
3440 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
3441$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
3442 fi;;
3443 esac
3444 # Pass precious variables to config.status.
3445 if test "$ac_new_set" = set; then
3446 case $ac_new_val in
3447 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3448 *) ac_arg=$ac_var=$ac_new_val ;;
3449 esac
3450 case " $ac_configure_args " in
3451 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
3452 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3453 esac
3454 fi
3455done
3456if $ac_cache_corrupted; then
3457 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3458$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3459 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3460$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
a9bec17c 3461 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
067d23c9
KY
3462fi
3463## -------------------- ##
3464## Main body of script. ##
3465## -------------------- ##
3466
3467ac_ext=c
3468ac_cpp='$CPP $CPPFLAGS'
3469ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3470ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3471ac_compiler_gnu=$ac_cv_c_compiler_gnu
3472
3473
2f559cd2 3474
e25a10b7 3475emacs_config_options="$@"
2f559cd2
GM
3476## Add some environment variables, if they were passed via the environment
3477## rather than on the command-line.
3478for var in CFLAGS CPPFLAGS LDFLAGS; do
3479 case "$emacs_config_options" in
3480 *$var=*) continue ;;
3481 esac
3482 eval val="\$${var}"
3483 test x"$val" = x && continue
71b84316 3484 emacs_config_options="${emacs_config_options}${emacs_config_options:+ }$var=\"$val\""
2f559cd2
GM
3485done
3486
067d23c9
KY
3487ac_config_headers="$ac_config_headers src/config.h:src/config.in"
3488
3489
743c80a7 3490ac_aux_dir=
369e19fc 3491for ac_dir in build-aux "$srcdir"/build-aux; do
a9bec17c
GM
3492 for ac_t in install-sh install.sh shtool; do
3493 if test -f "$ac_dir/$ac_t"; then
3494 ac_aux_dir=$ac_dir
3495 ac_install_sh="$ac_aux_dir/$ac_t -c"
3496 break 2
3497 fi
3498 done
743c80a7
PE
3499done
3500if test -z "$ac_aux_dir"; then
a9bec17c 3501 as_fn_error "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
743c80a7 3502fi
067d23c9 3503
743c80a7
PE
3504# These three variables are undocumented and unsupported,
3505# and are intended to be withdrawn in a future Autoconf release.
3506# They can cause serious problems if a builder's source tree is in a directory
3507# whose full name contains unusual characters.
3508ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
3509ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
3510ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
067d23c9 3511
067d23c9 3512
369e19fc
PE
3513am__api_version='1.11'
3514
743c80a7
PE
3515# Find a good install program. We prefer a C program (faster),
3516# so one script is as good as another. But avoid the broken or
3517# incompatible versions:
3518# SysV /etc/install, /usr/sbin/install
3519# SunOS /usr/etc/install
3520# IRIX /sbin/install
3521# AIX /bin/install
3522# AmigaOS /C/install, which installs bootblocks on floppy discs
3523# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3524# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3525# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3526# OS/2's system install, which has a completely different semantic
3527# ./install, which can be erroneously created by make from ./install.sh.
3528# Reject install programs that cannot install multiple files.
3529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
3530$as_echo_n "checking for a BSD-compatible install... " >&6; }
3531if test -z "$INSTALL"; then
a9bec17c 3532if test "${ac_cv_path_install+set}" = set; then :
743c80a7
PE
3533 $as_echo_n "(cached) " >&6
3534else
3535 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3536for as_dir in $PATH
3537do
3538 IFS=$as_save_IFS
3539 test -z "$as_dir" && as_dir=.
3540 # Account for people who put trailing slashes in PATH elements.
3541case $as_dir/ in #((
3542 ./ | .// | /[cC]/* | \
3543 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3544 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
3545 /usr/ucb/* ) ;;
3546 *)
3547 # OSF1 and SCO ODT 3.0 have their own names for install.
3548 # Don't use installbsd from OSF since it installs stuff as root
3549 # by default.
3550 for ac_prog in ginstall scoinst install; do
3551 for ac_exec_ext in '' $ac_executable_extensions; do
3552 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
3553 if test $ac_prog = install &&
3554 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3555 # AIX install. It has an incompatible calling convention.
3556 :
3557 elif test $ac_prog = install &&
3558 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3559 # program-specific install script used by HP pwplus--don't use.
3560 :
3561 else
3562 rm -rf conftest.one conftest.two conftest.dir
3563 echo one > conftest.one
3564 echo two > conftest.two
3565 mkdir conftest.dir
3566 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
3567 test -s conftest.one && test -s conftest.two &&
3568 test -s conftest.dir/conftest.one &&
3569 test -s conftest.dir/conftest.two
3570 then
3571 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3572 break 3
3573 fi
3574 fi
3575 fi
3576 done
3577 done
3578 ;;
3579esac
067d23c9 3580
743c80a7
PE
3581 done
3582IFS=$as_save_IFS
067d23c9 3583
743c80a7 3584rm -rf conftest.one conftest.two conftest.dir
067d23c9 3585
067d23c9 3586fi
743c80a7
PE
3587 if test "${ac_cv_path_install+set}" = set; then
3588 INSTALL=$ac_cv_path_install
3589 else
3590 # As a last resort, use the slow shell script. Don't cache a
3591 # value for INSTALL within a source directory, because that will
3592 # break other packages using the cache if that directory is
3593 # removed, or if the value is a relative name.
3594 INSTALL=$ac_install_sh
3595 fi
067d23c9 3596fi
743c80a7
PE
3597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
3598$as_echo "$INSTALL" >&6; }
067d23c9 3599
743c80a7
PE
3600# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3601# It thinks the first close brace ends the variable substitution.
3602test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
067d23c9 3603
743c80a7 3604test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
067d23c9 3605
743c80a7 3606test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
067d23c9 3607
743c80a7
PE
3608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
3609$as_echo_n "checking whether build environment is sane... " >&6; }
3610# Just in case
3611sleep 1
3612echo timestamp > conftest.file
3613# Reject unsafe characters in $srcdir or the absolute working directory
3614# name. Accept space and tab only in the latter.
3615am_lf='
3616'
3617case `pwd` in
3618 *[\\\"\#\$\&\'\`$am_lf]*)
a9bec17c 3619 as_fn_error "unsafe absolute working directory name" "$LINENO" 5;;
743c80a7
PE
3620esac
3621case $srcdir in
3622 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
a9bec17c 3623 as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
743c80a7 3624esac
067d23c9 3625
743c80a7
PE
3626# Do `set' in a subshell so we don't clobber the current shell's
3627# arguments. Must try -L first in case configure is actually a
3628# symlink; some systems play weird games with the mod time of symlinks
3629# (eg FreeBSD returns the mod time of the symlink's containing
3630# directory).
3631if (
3632 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
3633 if test "$*" = "X"; then
3634 # -L didn't work.
3635 set X `ls -t "$srcdir/configure" conftest.file`
3636 fi
3637 rm -f conftest.file
3638 if test "$*" != "X $srcdir/configure conftest.file" \
3639 && test "$*" != "X conftest.file $srcdir/configure"; then
3640
3641 # If neither matched, then we have a broken ls. This can happen
3642 # if, for instance, CONFIG_SHELL is bash and it inherits a
3643 # broken ls alias from the environment. This has actually
3644 # happened. Such a system could not be considered "sane".
a9bec17c 3645 as_fn_error "ls -t appears to fail. Make sure there is not a broken
743c80a7
PE
3646alias in your environment" "$LINENO" 5
3647 fi
067d23c9 3648
743c80a7
PE
3649 test "$2" = conftest.file
3650 )
3651then
3652 # Ok.
3653 :
067d23c9 3654else
a9bec17c 3655 as_fn_error "newly created file is older than distributed files!
743c80a7 3656Check your system clock" "$LINENO" 5
067d23c9 3657fi
743c80a7
PE
3658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3659$as_echo "yes" >&6; }
3660test "$program_prefix" != NONE &&
3661 program_transform_name="s&^&$program_prefix&;$program_transform_name"
3662# Use a double $ so make ignores it.
3663test "$program_suffix" != NONE &&
3664 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
3665# Double any \ or $.
3666# By default was `s,x,x', remove it if useless.
3667ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
3668program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
067d23c9 3669
743c80a7
PE
3670# expand $ac_aux_dir to an absolute path
3671am_aux_dir=`cd $ac_aux_dir && pwd`
067d23c9 3672
743c80a7
PE
3673if test x"${MISSING+set}" != xset; then
3674 case $am_aux_dir in
3675 *\ * | *\ *)
3676 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
3677 *)
3678 MISSING="\${SHELL} $am_aux_dir/missing" ;;
3679 esac
067d23c9 3680fi
743c80a7
PE
3681# Use eval to expand $SHELL
3682if eval "$MISSING --run true"; then
3683 am_missing_run="$MISSING --run "
067d23c9 3684else
743c80a7
PE
3685 am_missing_run=
3686 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
3687$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
067d23c9
KY
3688fi
3689
743c80a7
PE
3690if test x"${install_sh}" != xset; then
3691 case $am_aux_dir in
3692 *\ * | *\ *)
3693 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
3694 *)
3695 install_sh="\${SHELL} $am_aux_dir/install-sh"
3696 esac
067d23c9
KY
3697fi
3698
743c80a7
PE
3699# Installed binaries are usually stripped using `strip' when the user
3700# run `make install-strip'. However `strip' might not be the right
3701# tool to use in cross-compilation environments, therefore Automake
3702# will honor the `STRIP' environment variable to overrule this program.
3703if test "$cross_compiling" != no; then
3704 if test -n "$ac_tool_prefix"; then
3705 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
3706set dummy ${ac_tool_prefix}strip; ac_word=$2
3707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3708$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 3709if test "${ac_cv_prog_STRIP+set}" = set; then :
743c80a7 3710 $as_echo_n "(cached) " >&6
067d23c9 3711else
743c80a7
PE
3712 if test -n "$STRIP"; then
3713 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
3714else
3715as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3716for as_dir in $PATH
3717do
3718 IFS=$as_save_IFS
3719 test -z "$as_dir" && as_dir=.
3720 for ac_exec_ext in '' $ac_executable_extensions; do
3721 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3722 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
3723 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3724 break 2
3725 fi
3726done
3727 done
3728IFS=$as_save_IFS
067d23c9
KY
3729
3730fi
067d23c9 3731fi
743c80a7
PE
3732STRIP=$ac_cv_prog_STRIP
3733if test -n "$STRIP"; then
3734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
3735$as_echo "$STRIP" >&6; }
3736else
3737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3738$as_echo "no" >&6; }
067d23c9
KY
3739fi
3740
3741
067d23c9 3742fi
743c80a7
PE
3743if test -z "$ac_cv_prog_STRIP"; then
3744 ac_ct_STRIP=$STRIP
3745 # Extract the first word of "strip", so it can be a program name with args.
3746set dummy strip; ac_word=$2
3747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3748$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 3749if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
743c80a7
PE
3750 $as_echo_n "(cached) " >&6
3751else
3752 if test -n "$ac_ct_STRIP"; then
3753 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
3754else
3755as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3756for as_dir in $PATH
3757do
3758 IFS=$as_save_IFS
3759 test -z "$as_dir" && as_dir=.
3760 for ac_exec_ext in '' $ac_executable_extensions; do
3761 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3762 ac_cv_prog_ac_ct_STRIP="strip"
3763 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3764 break 2
3765 fi
3766done
3767 done
3768IFS=$as_save_IFS
3769
3770fi
3771fi
3772ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
3773if test -n "$ac_ct_STRIP"; then
3774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
3775$as_echo "$ac_ct_STRIP" >&6; }
3776else
3777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3778$as_echo "no" >&6; }
3779fi
3780
3781 if test "x$ac_ct_STRIP" = x; then
3782 STRIP=":"
3783 else
3784 case $cross_compiling:$ac_tool_warned in
3785yes:)
3786{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3787$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3788ac_tool_warned=yes ;;
3789esac
3790 STRIP=$ac_ct_STRIP
3791 fi
3792else
3793 STRIP="$ac_cv_prog_STRIP"
3794fi
3795
3796fi
3797INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
3798
3799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
3800$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
3801if test -z "$MKDIR_P"; then
a9bec17c 3802 if test "${ac_cv_path_mkdir+set}" = set; then :
743c80a7
PE
3803 $as_echo_n "(cached) " >&6
3804else
3805 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3806for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
3807do
3808 IFS=$as_save_IFS
3809 test -z "$as_dir" && as_dir=.
3810 for ac_prog in mkdir gmkdir; do
3811 for ac_exec_ext in '' $ac_executable_extensions; do
3812 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
3813 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
3814 'mkdir (GNU coreutils) '* | \
3815 'mkdir (coreutils) '* | \
3816 'mkdir (fileutils) '4.1*)
3817 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
3818 break 3;;
3819 esac
3820 done
3821 done
3822 done
3823IFS=$as_save_IFS
3824
3825fi
3826
3827 test -d ./--version && rmdir ./--version
3828 if test "${ac_cv_path_mkdir+set}" = set; then
3829 MKDIR_P="$ac_cv_path_mkdir -p"
3830 else
3831 # As a last resort, use the slow shell script. Don't cache a
3832 # value for MKDIR_P within a source directory, because that will
3833 # break other packages using the cache if that directory is
3834 # removed, or if the value is a relative name.
3835 MKDIR_P="$ac_install_sh -d"
3836 fi
3837fi
3838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
3839$as_echo "$MKDIR_P" >&6; }
3840
3841mkdir_p="$MKDIR_P"
3842case $mkdir_p in
3843 [\\/$]* | ?:[\\/]*) ;;
3844 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
3845esac
3846
3847for ac_prog in gawk mawk nawk awk
3848do
3849 # Extract the first word of "$ac_prog", so it can be a program name with args.
3850set dummy $ac_prog; ac_word=$2
3851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3852$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 3853if test "${ac_cv_prog_AWK+set}" = set; then :
743c80a7
PE
3854 $as_echo_n "(cached) " >&6
3855else
3856 if test -n "$AWK"; then
3857 ac_cv_prog_AWK="$AWK" # Let the user override the test.
3858else
3859as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3860for as_dir in $PATH
3861do
3862 IFS=$as_save_IFS
3863 test -z "$as_dir" && as_dir=.
3864 for ac_exec_ext in '' $ac_executable_extensions; do
3865 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3866 ac_cv_prog_AWK="$ac_prog"
3867 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3868 break 2
3869 fi
3870done
3871 done
3872IFS=$as_save_IFS
3873
3874fi
3875fi
3876AWK=$ac_cv_prog_AWK
3877if test -n "$AWK"; then
3878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
3879$as_echo "$AWK" >&6; }
3880else
3881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3882$as_echo "no" >&6; }
3883fi
3884
3885
3886 test -n "$AWK" && break
3887done
3888
3889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3890$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
3891set x ${MAKE-make}
3892ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
a9bec17c 3893if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
743c80a7
PE
3894 $as_echo_n "(cached) " >&6
3895else
3896 cat >conftest.make <<\_ACEOF
3897SHELL = /bin/sh
3898all:
3899 @echo '@@@%%%=$(MAKE)=@@@%%%'
3900_ACEOF
a9bec17c 3901# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
743c80a7
PE
3902case `${MAKE-make} -f conftest.make 2>/dev/null` in
3903 *@@@%%%=?*=@@@%%%*)
3904 eval ac_cv_prog_make_${ac_make}_set=yes;;
3905 *)
3906 eval ac_cv_prog_make_${ac_make}_set=no;;
3907esac
3908rm -f conftest.make
3909fi
3910if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3912$as_echo "yes" >&6; }
3913 SET_MAKE=
3914else
3915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3916$as_echo "no" >&6; }
3917 SET_MAKE="MAKE=${MAKE-make}"
3918fi
3919
3920rm -rf .tst 2>/dev/null
3921mkdir .tst 2>/dev/null
3922if test -d .tst; then
3923 am__leading_dot=.
3924else
3925 am__leading_dot=_
3926fi
3927rmdir .tst 2>/dev/null
3928
3929if test "`cd $srcdir && pwd`" != "`pwd`"; then
3930 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
3931 # is not polluted with repeated "-I."
3932 am__isrc=' -I$(srcdir)'
3933 # test to see if srcdir already configured
3934 if test -f $srcdir/config.status; then
a9bec17c 3935 as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
743c80a7
PE
3936 fi
3937fi
3938
3939# test whether we have cygpath
3940if test -z "$CYGPATH_W"; then
3941 if (cygpath --version) >/dev/null 2>/dev/null; then
3942 CYGPATH_W='cygpath -w'
3943 else
3944 CYGPATH_W=echo
3945 fi
3946fi
3947
3948
3949# Define the identity of the package.
3950 PACKAGE='emacs'
c574bc34 3951 VERSION='24.3.50'
743c80a7
PE
3952
3953
3954cat >>confdefs.h <<_ACEOF
3955#define PACKAGE "$PACKAGE"
3956_ACEOF
3957
3958
3959cat >>confdefs.h <<_ACEOF
3960#define VERSION "$VERSION"
3961_ACEOF
3962
3963# Some tools Automake needs.
3964
3965ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
3966
3967
3968AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
3969
3970
3971AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
3972
3973
3974AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
3975
3976
3977MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
3978
3979# We need awk for the "check" target. The system "awk" is bad on
3980# some platforms.
3981# Always define AMTAR for backward compatibility.
3982
3983AMTAR=${AMTAR-"${am_missing_run}tar"}
3984
3985am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
3986
3987
3988
3989
3990
3991
3992
3993
3994lispdir='${datadir}/emacs/${version}/lisp'
e1939eb1 3995leimdir='${datadir}/emacs/${version}/leim'
397f7161 3996standardlisppath='${lispdir}:${leimdir}'
743c80a7
PE
3997locallisppath='${datadir}/emacs/${version}/site-lisp:'\
3998'${datadir}/emacs/site-lisp'
397f7161 3999lisppath='${locallisppath}:${standardlisppath}'
743c80a7
PE
4000etcdir='${datadir}/emacs/${version}/etc'
4001archlibdir='${libexecdir}/emacs/${version}/${configuration}'
4002docdir='${datadir}/emacs/${version}/etc'
4003gamedir='${localstatedir}/games/emacs'
4004
ee77919d
GM
4005
4006# Check whether --with-all was given.
4007if test "${with_all+set}" = set; then :
4008 withval=$with_all; with_features=$withval
c0528ebe 4009else
ee77919d 4010 with_features=yes
c0528ebe
GM
4011fi
4012
4013
743c80a7
PE
4014
4015
4016
4017# Check whether --with-pop was given.
4018if test "${with_pop+set}" = set; then :
4019 withval=$with_pop;
4020else
ee77919d 4021 with_pop=$with_features
743c80a7
PE
4022fi
4023
4024if test "$with_pop" = yes; then
4025 $as_echo "#define MAIL_USE_POP 1" >>confdefs.h
4026
4027fi
4028
4029
4030# Check whether --with-kerberos was given.
4031if test "${with_kerberos+set}" = set; then :
4032 withval=$with_kerberos;
4033else
4034 with_kerberos=no
4035fi
4036
4037if test "$with_kerberos" != no; then
4038 $as_echo "#define KERBEROS 1" >>confdefs.h
4039
4040fi
4041
4042
4043# Check whether --with-kerberos5 was given.
4044if test "${with_kerberos5+set}" = set; then :
4045 withval=$with_kerberos5;
4046else
4047 with_kerberos5=no
4048fi
4049
4050if test "${with_kerberos5}" != no; then
4051 if test "${with_kerberos}" = no; then
4052 with_kerberos=yes
4053 $as_echo "#define KERBEROS 1" >>confdefs.h
4054
4055 fi
4056
4057$as_echo "#define KERBEROS5 1" >>confdefs.h
4058
4059fi
4060
4061
4062# Check whether --with-hesiod was given.
4063if test "${with_hesiod+set}" = set; then :
4064 withval=$with_hesiod;
4065else
4066 with_hesiod=no
4067fi
4068
4069if test "$with_hesiod" != no; then
4070
4071$as_echo "#define HESIOD 1" >>confdefs.h
4072
4073fi
4074
4075
4076# Check whether --with-mmdf was given.
4077if test "${with_mmdf+set}" = set; then :
4078 withval=$with_mmdf;
4079else
4080 with_mmdf=no
4081fi
4082
4083if test "$with_mmdf" != no; then
4084
4085$as_echo "#define MAIL_USE_MMDF 1" >>confdefs.h
4086
4087fi
4088
4089
4090# Check whether --with-mail-unlink was given.
4091if test "${with_mail_unlink+set}" = set; then :
4092 withval=$with_mail_unlink;
4093else
4094 with_mail_unlink=no
4095fi
4096
4097if test "$with_mail_unlink" != no; then
4098
4099$as_echo "#define MAIL_UNLINK_SPOOL 1" >>confdefs.h
4100
4101fi
4102
4103
4104# Check whether --with-mailhost was given.
4105if test "${with_mailhost+set}" = set; then :
4106 withval=$with_mailhost;
4107cat >>confdefs.h <<_ACEOF
4108#define MAILHOST "$withval"
4109_ACEOF
4110
4111fi
4112
4113
4114
067d23c9
KY
4115# Check whether --with-sound was given.
4116if test "${with_sound+set}" = set; then :
4117 withval=$with_sound;
4118else
ee77919d 4119 with_sound=$with_features
067d23c9
KY
4120fi
4121
4122
4123
067d23c9
KY
4124# Check whether --with-x-toolkit was given.
4125if test "${with_x_toolkit+set}" = set; then :
4126 withval=$with_x_toolkit; case "${withval}" in
4127 y | ye | yes ) val=gtk ;;
4128 n | no ) val=no ;;
4129 l | lu | luc | luci | lucid ) val=lucid ;;
4130 a | at | ath | athe | athen | athena ) val=athena ;;
4131 m | mo | mot | moti | motif ) val=motif ;;
4132 g | gt | gtk ) val=gtk ;;
4fa92495 4133 gtk2 ) val=gtk2 ;;
067d23c9
KY
4134 gtk3 ) val=gtk3 ;;
4135 * )
a9bec17c 4136as_fn_error "\`--with-x-toolkit=$withval' is invalid;
4fa92495
GM
4137this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif', \`gtk',
4138\`gtk2' or \`gtk3'. \`yes' and \`gtk' are synonyms.
4139\`athena' and \`lucid' are synonyms." "$LINENO" 5
067d23c9
KY
4140 ;;
4141 esac
4142 with_x_toolkit=$val
4143
4144fi
4145
4146
4147
0442dc7f
GM
4148# Check whether --with-wide-int was given.
4149if test "${with_wide_int+set}" = set; then :
4150 withval=$with_wide_int;
4151else
4152 with_wide_int=no
4153fi
4154
4155if test "$with_wide_int" = yes; then
4156
4157$as_echo "#define WIDE_EMACS_INT 1" >>confdefs.h
4158
4159fi
4160
4161
067d23c9
KY
4162# Check whether --with-xpm was given.
4163if test "${with_xpm+set}" = set; then :
4164 withval=$with_xpm;
4165else
ee77919d 4166 with_xpm=$with_features
067d23c9
KY
4167fi
4168
4169
4170# Check whether --with-jpeg was given.
4171if test "${with_jpeg+set}" = set; then :
4172 withval=$with_jpeg;
4173else
ee77919d 4174 with_jpeg=$with_features
067d23c9
KY
4175fi
4176
4177
4178# Check whether --with-tiff was given.
4179if test "${with_tiff+set}" = set; then :
4180 withval=$with_tiff;
4181else
ee77919d 4182 with_tiff=$with_features
067d23c9
KY
4183fi
4184
4185
4186# Check whether --with-gif was given.
4187if test "${with_gif+set}" = set; then :
4188 withval=$with_gif;
4189else
ee77919d 4190 with_gif=$with_features
067d23c9
KY
4191fi
4192
4193
4194# Check whether --with-png was given.
4195if test "${with_png+set}" = set; then :
4196 withval=$with_png;
4197else
ee77919d 4198 with_png=$with_features
067d23c9
KY
4199fi
4200
4201
4202# Check whether --with-rsvg was given.
4203if test "${with_rsvg+set}" = set; then :
4204 withval=$with_rsvg;
4205else
ee77919d 4206 with_rsvg=$with_features
067d23c9
KY
4207fi
4208
4209
4210# Check whether --with-xml2 was given.
4211if test "${with_xml2+set}" = set; then :
4212 withval=$with_xml2;
4213else
ee77919d 4214 with_xml2=$with_features
067d23c9
KY
4215fi
4216
4217
4218# Check whether --with-imagemagick was given.
4219if test "${with_imagemagick+set}" = set; then :
4220 withval=$with_imagemagick;
4221else
ee77919d 4222 with_imagemagick=$with_features
067d23c9
KY
4223fi
4224
4225
4226
4227# Check whether --with-xft was given.
4228if test "${with_xft+set}" = set; then :
4229 withval=$with_xft;
4230else
ee77919d 4231 with_xft=$with_features
067d23c9
KY
4232fi
4233
4234
4235# Check whether --with-libotf was given.
4236if test "${with_libotf+set}" = set; then :
4237 withval=$with_libotf;
4238else
ee77919d 4239 with_libotf=$with_features
067d23c9
KY
4240fi
4241
4242
4243# Check whether --with-m17n-flt was given.
4244if test "${with_m17n_flt+set}" = set; then :
4245 withval=$with_m17n_flt;
4246else
ee77919d 4247 with_m17n_flt=$with_features
067d23c9
KY
4248fi
4249
4250
4251
4252# Check whether --with-toolkit-scroll-bars was given.
4253if test "${with_toolkit_scroll_bars+set}" = set; then :
4254 withval=$with_toolkit_scroll_bars;
4255else
ee77919d 4256 with_toolkit_scroll_bars=$with_features
067d23c9
KY
4257fi
4258
4259
4260# Check whether --with-xaw3d was given.
4261if test "${with_xaw3d+set}" = set; then :
4262 withval=$with_xaw3d;
4263else
ee77919d 4264 with_xaw3d=$with_features
067d23c9
KY
4265fi
4266
4267
4268# Check whether --with-xim was given.
4269if test "${with_xim+set}" = set; then :
4270 withval=$with_xim;
4271else
ee77919d 4272 with_xim=$with_features
067d23c9
KY
4273fi
4274
4275
4276# Check whether --with-ns was given.
4277if test "${with_ns+set}" = set; then :
4278 withval=$with_ns;
4279else
4280 with_ns=no
4281fi
4282
4283
5c0255d9
GM
4284# Check whether --with-w32 was given.
4285if test "${with_w32+set}" = set; then :
4286 withval=$with_w32;
4287else
4288 with_w32=no
4289fi
4290
4291
067d23c9
KY
4292
4293# Check whether --with-gpm was given.
4294if test "${with_gpm+set}" = set; then :
4295 withval=$with_gpm;
4296else
ee77919d 4297 with_gpm=$with_features
067d23c9
KY
4298fi
4299
4300
4301# Check whether --with-dbus was given.
4302if test "${with_dbus+set}" = set; then :
4303 withval=$with_dbus;
4304else
ee77919d 4305 with_dbus=$with_features
067d23c9
KY
4306fi
4307
4308
4309# Check whether --with-gconf was given.
4310if test "${with_gconf+set}" = set; then :
4311 withval=$with_gconf;
4312else
ee77919d 4313 with_gconf=$with_features
067d23c9
KY
4314fi
4315
4316
f527bd02
GM
4317# Check whether --with-gsettings was given.
4318if test "${with_gsettings+set}" = set; then :
4319 withval=$with_gsettings;
4320else
ee77919d 4321 with_gsettings=$with_features
f527bd02
GM
4322fi
4323
4324
067d23c9
KY
4325# Check whether --with-selinux was given.
4326if test "${with_selinux+set}" = set; then :
4327 withval=$with_selinux;
4328else
ee77919d 4329 with_selinux=$with_features
067d23c9
KY
4330fi
4331
4332
4333# Check whether --with-gnutls was given.
4334if test "${with_gnutls+set}" = set; then :
4335 withval=$with_gnutls;
4336else
ee77919d 4337 with_gnutls=$with_features
067d23c9
KY
4338fi
4339
4340
0f55a32e
GM
4341
4342# Check whether --with-file-notification was given.
4343if test "${with_file_notification+set}" = set; then :
4344 withval=$with_file_notification; case "${withval}" in
4345 y | ye | yes ) val=yes ;;
4346 n | no ) val=no ;;
4347 g | gf | gfi | gfil | gfile ) val=gfile ;;
4348 i | in | ino | inot | inoti | inotif | inotify ) val=inotify ;;
4349 w | w3 | w32 ) val=w32 ;;
4350 * ) as_fn_error "\`--with-file-notification=$withval' is invalid;
4351this option's value should be \`yes', \`no', \`gfile', \`inotify' or \`w32'.
4352\`yes' is a synonym for \`w32' on MS-Windows, and for \`gfile' otherwise." "$LINENO" 5
4353 ;;
4354 esac
4355 with_file_notification=$val
4356
b5eb356a 4357else
09220615 4358 with_file_notification=$with_features
b5eb356a
GM
4359fi
4360
4361
067d23c9
KY
4362## For the times when you want to build Emacs but don't have
4363## a suitable makeinfo, and can live without the manuals.
4364
4365# Check whether --with-makeinfo was given.
4366if test "${with_makeinfo+set}" = set; then :
4367 withval=$with_makeinfo;
4368else
ee77919d 4369 with_makeinfo=$with_features
067d23c9
KY
4370fi
4371
4372
c3a461a5
GM
4373## Makefile.in needs the cache file name.
4374
4375
067d23c9
KY
4376## This is an option because I do not know if all info/man support
4377## compressed files, nor how to test if they do so.
4378
4379# Check whether --with-compress-info was given.
4380if test "${with_compress_info+set}" = set; then :
4381 withval=$with_compress_info;
4382else
ee77919d 4383 with_compress_info=$with_features
067d23c9
KY
4384fi
4385
4386if test $with_compress_info = yes; then
4387 GZIP_INFO=yes
4388else
4389 GZIP_INFO=
4390fi
4391
4392
4393
4394# Check whether --with-pkg-config-prog was given.
4395if test "${with_pkg_config_prog+set}" = set; then :
4396 withval=$with_pkg_config_prog;
4397fi
4398
4399if test "X${with_pkg_config_prog}" != X; then
4400 if test "${with_pkg_config_prog}" != yes; then
4401 PKG_CONFIG="${with_pkg_config_prog}"
4402 fi
4403fi
4404
067d23c9 4405
4fc5868a
UM
4406# Check whether --with-gameuser was given.
4407if test "${with_gameuser+set}" = set; then :
4408 withval=$with_gameuser;
4409fi
4410
4411test "X${with_gameuser}" != X && test "${with_gameuser}" != yes \
4412 && gameuser="${with_gameuser}"
4413test "X$gameuser" = X && gameuser=games
4414
4415
067d23c9
KY
4416# Check whether --with-gnustep-conf was given.
4417if test "${with_gnustep_conf+set}" = set; then :
4418 withval=$with_gnustep_conf;
4419fi
4420
4421test "X${with_gnustep_conf}" != X && test "${with_gnustep_conf}" != yes && \
4422 GNUSTEP_CONFIG_FILE="${with_gnustep_conf}"
4423test "X$GNUSTEP_CONFIG_FILE" = "X" && \
4424 GNUSTEP_CONFIG_FILE=/etc/GNUstep/GNUstep.conf
4425
4426# Check whether --enable-ns-self-contained was given.
4427if test "${enable_ns_self_contained+set}" = set; then :
4428 enableval=$enable_ns_self_contained; EN_NS_SELF_CONTAINED=$enableval
4429else
4430 EN_NS_SELF_CONTAINED=yes
4431fi
4432
4433
067d23c9
KY
4434# Check whether --enable-locallisppath was given.
4435if test "${enable_locallisppath+set}" = set; then :
4436 enableval=$enable_locallisppath; if test "${enableval}" = "no"; then
4437 locallisppath=
4438elif test "${enableval}" != "yes"; then
4439 locallisppath=${enableval}
4440fi
4441fi
4442
4443
4444# Check whether --enable-checking was given.
4445if test "${enable_checking+set}" = set; then :
4446 enableval=$enable_checking; ac_checking_flags="${enableval}"
4447fi
4448
4449IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
4450for check in $ac_checking_flags
4451do
4452 case $check in
4453 # these set all the flags to specific states
4454 yes) ac_enable_checking=1 ;;
4455 no) ac_enable_checking= ;
4456 ac_gc_check_stringbytes= ;
4457 ac_gc_check_string_overrun= ;
4458 ac_gc_check_string_free_list= ;
4459 ac_xmalloc_overrun= ;
7ee3791f 4460 ac_gc_check_cons_list= ;
e4d35030 4461 ac_glyphs_debug= ;;
067d23c9
KY
4462 all) ac_enable_checking=1 ;
4463 ac_gc_check_stringbytes=1 ;
4464 ac_gc_check_string_overrun=1 ;
4465 ac_gc_check_string_free_list=1 ;
4466 ac_xmalloc_overrun=1 ;
7ee3791f 4467 ac_gc_check_cons_list=1 ;
e4d35030 4468 ac_glyphs_debug=1 ;;
067d23c9
KY
4469 # these enable particular checks
4470 stringbytes) ac_gc_check_stringbytes=1 ;;
4471 stringoverrun) ac_gc_check_string_overrun=1 ;;
4472 stringfreelist) ac_gc_check_string_free_list=1 ;;
4473 xmallocoverrun) ac_xmalloc_overrun=1 ;;
4474 conslist) ac_gc_check_cons_list=1 ;;
e4d35030 4475 glyphs) ac_glyphs_debug=1 ;;
a9bec17c 4476 *) as_fn_error "unknown check category $check" "$LINENO" 5 ;;
067d23c9
KY
4477 esac
4478done
4479IFS="$ac_save_IFS"
4480
4481if test x$ac_enable_checking != x ; then
4482
4483$as_echo "#define ENABLE_CHECKING 1" >>confdefs.h
4484
4485fi
4486if test x$ac_gc_check_stringbytes != x ; then
4487
4488$as_echo "#define GC_CHECK_STRING_BYTES 1" >>confdefs.h
4489
4490fi
4fda9c95 4491if test x$ac_gc_check_string_overrun != x ; then
067d23c9
KY
4492
4493$as_echo "#define GC_CHECK_STRING_OVERRUN 1" >>confdefs.h
4494
4495fi
4496if test x$ac_gc_check_string_free_list != x ; then
4497
4498$as_echo "#define GC_CHECK_STRING_FREE_LIST 1" >>confdefs.h
4499
4500fi
4501if test x$ac_xmalloc_overrun != x ; then
4502
4503$as_echo "#define XMALLOC_OVERRUN_CHECK 1" >>confdefs.h
4504
4505fi
4506if test x$ac_gc_check_cons_list != x ; then
4507
4508$as_echo "#define GC_CHECK_CONS_LIST 1" >>confdefs.h
4509
7ee3791f 4510fi
e4d35030 4511if test x$ac_glyphs_debug != x ; then
7ee3791f
GM
4512
4513$as_echo "#define GLYPH_DEBUG 1" >>confdefs.h
4514
067d23c9
KY
4515fi
4516
afd07e01
GM
4517# Check whether --enable-check-lisp-object-type was given.
4518if test "${enable_check_lisp_object_type+set}" = set; then :
4519 enableval=$enable_check_lisp_object_type; if test "${enableval}" != "no"; then
067d23c9 4520
afd07e01 4521$as_echo "#define CHECK_LISP_OBJECT_TYPE 1" >>confdefs.h
067d23c9
KY
4522
4523fi
4524fi
4525
4526
4527
4528# Check whether --enable-profiling was given.
4529if test "${enable_profiling+set}" = set; then :
4530 enableval=$enable_profiling; ac_enable_profiling="${enableval}"
4531fi
4532
4533if test x$ac_enable_profiling != x ; then
4534 PROFILING_CFLAGS="-DPROFILING=1 -pg"
4535else
4536 PROFILING_CFLAGS=
4537fi
4538
4539
4540# Check whether --enable-autodepend was given.
4541if test "${enable_autodepend+set}" = set; then :
4542 enableval=$enable_autodepend; ac_enable_autodepend="${enableval}"
4543else
4544 ac_enable_autodepend=yes
4545fi
4546
4547
4efe5ef9
GM
4548# Check whether --enable-gtk-deprecation-warnings was given.
4549if test "${enable_gtk_deprecation_warnings+set}" = set; then :
4550 enableval=$enable_gtk_deprecation_warnings; ac_enable_gtk_deprecation_warnings="${enableval}"
4551fi
4552
4553
067d23c9 4554#### Make srcdir absolute, if it isn't already. It's important to
b5591ebb 4555#### avoid running the file name through pwd unnecessarily, since pwd can
067d23c9
KY
4556#### give you automounter prefixes, which can go away. We do all this
4557#### so Emacs can find its files when run uninstalled.
4558## Make sure CDPATH doesn't affect cd (in case PWD is relative).
4559unset CDPATH
4560case "${srcdir}" in
7c61eaab 4561 [\\/]* | ?:[\\/]*) ;;
067d23c9
KY
4562 . )
4563 ## We may be able to use the $PWD environment variable to make this
4564 ## absolute. But sometimes PWD is inaccurate.
b5591ebb 4565 ## Note: we used to use $PWD at the end instead of `pwd`,
067d23c9
KY
4566 ## but that tested only for a well-formed and valid PWD,
4567 ## it did not object when PWD was well-formed and valid but just wrong.
b5591ebb 4568 if test ".$PWD" != "." && test ".`(cd "$PWD" ; sh -c pwd)`" = ".`pwd`" ;
067d23c9
KY
4569 then
4570 srcdir="$PWD"
4571 else
b5591ebb 4572 srcdir=`(cd "$srcdir"; pwd)`
067d23c9
KY
4573 fi
4574 ;;
b5591ebb 4575 * ) srcdir=`(cd "$srcdir"; pwd)` ;;
067d23c9
KY
4576esac
4577
067d23c9
KY
4578### Canonicalize the configuration name.
4579
067d23c9
KY
4580# Make sure we can run config.sub.
4581$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
a9bec17c 4582 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
067d23c9
KY
4583
4584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4585$as_echo_n "checking build system type... " >&6; }
a9bec17c 4586if test "${ac_cv_build+set}" = set; then :
067d23c9
KY
4587 $as_echo_n "(cached) " >&6
4588else
4589 ac_build_alias=$build_alias
4590test "x$ac_build_alias" = x &&
4591 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4592test "x$ac_build_alias" = x &&
a9bec17c 4593 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
067d23c9 4594ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
a9bec17c 4595 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
067d23c9
KY
4596
4597fi
4598{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4599$as_echo "$ac_cv_build" >&6; }
4600case $ac_cv_build in
4601*-*-*) ;;
a9bec17c 4602*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
067d23c9
KY
4603esac
4604build=$ac_cv_build
4605ac_save_IFS=$IFS; IFS='-'
4606set x $ac_cv_build
4607shift
4608build_cpu=$1
4609build_vendor=$2
4610shift; shift
4611# Remember, the first character of IFS is used to create $*,
4612# except with old shells:
4613build_os=$*
4614IFS=$ac_save_IFS
4615case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
4616
4617
4618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4619$as_echo_n "checking host system type... " >&6; }
a9bec17c 4620if test "${ac_cv_host+set}" = set; then :
067d23c9
KY
4621 $as_echo_n "(cached) " >&6
4622else
4623 if test "x$host_alias" = x; then
4624 ac_cv_host=$ac_cv_build
4625else
4626 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
a9bec17c 4627 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
067d23c9
KY
4628fi
4629
4630fi
4631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4632$as_echo "$ac_cv_host" >&6; }
4633case $ac_cv_host in
4634*-*-*) ;;
a9bec17c 4635*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
067d23c9
KY
4636esac
4637host=$ac_cv_host
4638ac_save_IFS=$IFS; IFS='-'
4639set x $ac_cv_host
4640shift
4641host_cpu=$1
4642host_vendor=$2
4643shift; shift
4644# Remember, the first character of IFS is used to create $*,
4645# except with old shells:
4646host_os=$*
4647IFS=$ac_save_IFS
4648case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
4649
4650
4651canonical=$host
4652configuration=${host_alias-${build_alias-$host}}
4653
4654
4655
4656### If you add support for a new configuration, add code to this
4657### switch statement to recognize your configuration name and select
42bbbe8b 4658### the appropriate operating system file.
067d23c9 4659
42bbbe8b 4660### You would hope that you could choose an s/*.h
067d23c9 4661### file based on the operating system portion. However, it turns out
42bbbe8b 4662### that each s/*.h file is pretty manufacturer-specific.
067d23c9
KY
4663### So we basically have to have a special case for each
4664### configuration name.
4665###
4666### As far as handling version numbers on operating systems is
4667### concerned, make sure things will fail in a fixable way. If
4668### /etc/MACHINES doesn't say anything about version numbers, be
4669### prepared to handle anything reasonably. If version numbers
4670### matter, be sure /etc/MACHINES says something about it.
4671
42bbbe8b 4672opsys='' unported=no
067d23c9
KY
4673case "${canonical}" in
4674
9b6e5515
GM
4675 ## GNU/Linux and similar ports
4676 *-*-linux* )
d6a003a8 4677 opsys=gnu-linux
d6a003a8
AS
4678 ;;
4679
067d23c9
KY
4680 ## FreeBSD ports
4681 *-*-freebsd* )
4682 opsys=freebsd
067d23c9
KY
4683 ;;
4684
87e1a811
GM
4685 ## DragonFly ports
4686 *-*-dragonfly* )
4687 opsys=dragonfly
4688 ;;
4689
067d23c9
KY
4690 ## FreeBSD kernel + glibc based userland
4691 *-*-kfreebsd*gnu* )
4692 opsys=gnu-kfreebsd
067d23c9
KY
4693 ;;
4694
4695 ## NetBSD ports
4696 *-*-netbsd* )
4697 opsys=netbsd
067d23c9
KY
4698 ;;
4699
4700 ## OpenBSD ports
4701 *-*-openbsd* )
4702 opsys=openbsd
067d23c9
KY
4703 ;;
4704
067d23c9
KY
4705 ## Apple Darwin / Mac OS X
4706 *-apple-darwin* )
4707 case "${canonical}" in
42bbbe8b
GM
4708 i[3456]86-* ) ;;
4709 powerpc-* ) ;;
4710 x86_64-* ) ;;
067d23c9
KY
4711 * ) unported=yes ;;
4712 esac
4713 opsys=darwin
adf4198e
GM
4714 ## Use fink packages if available.
4715 ## FIXME find a better way to do this: http://debbugs.gnu.org/11507
4716## if test -d /sw/include && test -d /sw/lib; then
4717## GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib"
4718## NON_GCC_TEST_OPTIONS=${GCC_TEST_OPTIONS}
4719## fi
067d23c9
KY
4720 ;;
4721
8c35e3c3
GM
4722 ## Cygwin ports
4723 *-*-cygwin )
4724 opsys=cygwin
4725 ;;
4726
067d23c9
KY
4727 ## HP 9000 series 700 and 800, running HP/UX
4728 hppa*-hp-hpux10.2* )
d6a003a8 4729 opsys=hpux10-20
067d23c9
KY
4730 ;;
4731 hppa*-hp-hpux1[1-9]* )
d6a003a8 4732 opsys=hpux11
067d23c9
KY
4733 CFLAGS="-D_INCLUDE__STDC_A1_SOURCE $CFLAGS"
4734 ;;
4735
067d23c9 4736 ## IBM machines
067d23c9 4737 rs6000-ibm-aix4.[23]* )
42bbbe8b 4738 opsys=aix4-2
067d23c9
KY
4739 ;;
4740 powerpc-ibm-aix4.[23]* )
42bbbe8b 4741 opsys=aix4-2
067d23c9
KY
4742 ;;
4743 rs6000-ibm-aix[56]* )
42bbbe8b 4744 opsys=aix4-2
067d23c9
KY
4745 ;;
4746 powerpc-ibm-aix[56]* )
42bbbe8b 4747 opsys=aix4-2
067d23c9
KY
4748 ;;
4749
067d23c9
KY
4750 ## Silicon Graphics machines
4751 ## Iris 4D
4752 mips-sgi-irix6.5 )
fd44db7f 4753 opsys=irix6-5
067d23c9
KY
4754 # Without defining _LANGUAGE_C, things get masked out in the headers
4755 # so that, for instance, grepping for `free' in stdlib.h fails and
4756 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
067d23c9
KY
4757 NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
4758 ;;
4759
4760 ## Suns
067d23c9
KY
4761 *-sun-solaris* \
4762 | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* \
4763 | x86_64-*-solaris2* | x86_64-*-sunos5*)
4764 case "${canonical}" in
42bbbe8b
GM
4765 i[3456]86-*-* ) ;;
4766 amd64-*-*|x86_64-*-*) ;;
4767 sparc* ) ;;
067d23c9
KY
4768 * ) unported=yes ;;
4769 esac
4770 case "${canonical}" in
4771 *-sunos5.6* | *-solaris2.6* )
4772 opsys=sol2-6
067d23c9
KY
4773 RANLIB="ar -ts"
4774 ;;
4775 *-sunos5.[7-9]* | *-solaris2.[7-9]* )
4776 opsys=sol2-6
4777 emacs_check_sunpro_c=yes
067d23c9
KY
4778 ;;
4779 *-sunos5* | *-solaris* )
4780 opsys=sol2-10
4781 emacs_check_sunpro_c=yes
067d23c9
KY
4782 ;;
4783 esac
4784 ## Watch out for a compiler that we know will not work.
4785 case "${canonical}" in
4786 *-solaris* | *-sunos5* )
4787 if [ "x$CC" = x/usr/ucb/cc ]; then
4788 ## /usr/ucb/cc doesn't work;
4789 ## we should find some other compiler that does work.
4790 unset CC
4791 fi
4792 ;;
4793 *) ;;
4794 esac
4795 ;;
4796
067d23c9
KY
4797 ## Intel 386 machines where we don't care about the manufacturer.
4798 i[3456]86-*-* )
067d23c9 4799 case "${canonical}" in
5ec54608 4800 *-darwin* ) opsys=darwin ;;
7c61eaab
GM
4801 *-mingw32 )
4802 opsys=mingw32
4803 # MinGW overrides and adds some system headers in nt/inc.
4804 GCC_TEST_OPTIONS="-I $srcdir/nt/inc"
4805 ;;
5ec54608
GM
4806 *-sysv4.2uw* ) opsys=unixware ;;
4807 *-sysv5uw* ) opsys=unixware ;;
4808 *-sysv5OpenUNIX* ) opsys=unixware ;;
067d23c9
KY
4809 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
4810 esac
4811 ;;
4812
067d23c9
KY
4813 * )
4814 unported=yes
4815 ;;
4816esac
4817
4818### If the code above didn't choose an operating system, just choose
4819### an operating system based on the configuration name. You really
4820### only want to use this when you have no idea what the right
4821### operating system is; if you know what operating systems a machine
4822### runs, it's cleaner to make it explicit in the case statement
4823### above.
4824if test x"${opsys}" = x; then
4825 case "${canonical}" in
4826 *-gnu* ) opsys=gnu ;;
4827 * )
4828 unported=yes
4829 ;;
4830 esac
4831fi
4832
4833
4834
4835if test $unported = yes; then
a9bec17c 4836 as_fn_error "Emacs hasn't been ported to \`${canonical}' systems.
067d23c9
KY
4837Check \`etc/MACHINES' for recognized configuration names." "$LINENO" 5
4838fi
4839
067d23c9
KY
4840
4841#### Choose a compiler.
067d23c9
KY
4842
4843ac_ext=c
4844ac_cpp='$CPP $CPPFLAGS'
4845ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4846ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4847ac_compiler_gnu=$ac_cv_c_compiler_gnu
4848if test -n "$ac_tool_prefix"; then
4849 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4850set dummy ${ac_tool_prefix}gcc; ac_word=$2
4851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4852$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 4853if test "${ac_cv_prog_CC+set}" = set; then :
067d23c9
KY
4854 $as_echo_n "(cached) " >&6
4855else
4856 if test -n "$CC"; then
4857 ac_cv_prog_CC="$CC" # Let the user override the test.
4858else
4859as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4860for as_dir in $PATH
4861do
4862 IFS=$as_save_IFS
4863 test -z "$as_dir" && as_dir=.
4864 for ac_exec_ext in '' $ac_executable_extensions; do
4865 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4866 ac_cv_prog_CC="${ac_tool_prefix}gcc"
4867 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4868 break 2
4869 fi
4870done
4871 done
4872IFS=$as_save_IFS
4873
4874fi
4875fi
4876CC=$ac_cv_prog_CC
4877if test -n "$CC"; then
4878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4879$as_echo "$CC" >&6; }
4880else
4881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4882$as_echo "no" >&6; }
4883fi
4884
4885
4886fi
4887if test -z "$ac_cv_prog_CC"; then
4888 ac_ct_CC=$CC
4889 # Extract the first word of "gcc", so it can be a program name with args.
4890set dummy gcc; ac_word=$2
4891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4892$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 4893if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
067d23c9
KY
4894 $as_echo_n "(cached) " >&6
4895else
4896 if test -n "$ac_ct_CC"; then
4897 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4898else
4899as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4900for as_dir in $PATH
4901do
4902 IFS=$as_save_IFS
4903 test -z "$as_dir" && as_dir=.
4904 for ac_exec_ext in '' $ac_executable_extensions; do
4905 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4906 ac_cv_prog_ac_ct_CC="gcc"
4907 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4908 break 2
4909 fi
4910done
4911 done
4912IFS=$as_save_IFS
4913
4914fi
4915fi
4916ac_ct_CC=$ac_cv_prog_ac_ct_CC
4917if test -n "$ac_ct_CC"; then
4918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4919$as_echo "$ac_ct_CC" >&6; }
4920else
4921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4922$as_echo "no" >&6; }
4923fi
4924
4925 if test "x$ac_ct_CC" = x; then
4926 CC=""
4927 else
4928 case $cross_compiling:$ac_tool_warned in
4929yes:)
4930{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4931$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4932ac_tool_warned=yes ;;
4933esac
4934 CC=$ac_ct_CC
4935 fi
4936else
4937 CC="$ac_cv_prog_CC"
4938fi
4939
4940if test -z "$CC"; then
4941 if test -n "$ac_tool_prefix"; then
4942 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4943set dummy ${ac_tool_prefix}cc; ac_word=$2
4944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4945$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 4946if test "${ac_cv_prog_CC+set}" = set; then :
067d23c9
KY
4947 $as_echo_n "(cached) " >&6
4948else
4949 if test -n "$CC"; then
4950 ac_cv_prog_CC="$CC" # Let the user override the test.
4951else
4952as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4953for as_dir in $PATH
4954do
4955 IFS=$as_save_IFS
4956 test -z "$as_dir" && as_dir=.
4957 for ac_exec_ext in '' $ac_executable_extensions; do
4958 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4959 ac_cv_prog_CC="${ac_tool_prefix}cc"
4960 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4961 break 2
4962 fi
4963done
4964 done
4965IFS=$as_save_IFS
4966
4967fi
4968fi
4969CC=$ac_cv_prog_CC
4970if test -n "$CC"; then
4971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4972$as_echo "$CC" >&6; }
4973else
4974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4975$as_echo "no" >&6; }
4976fi
4977
4978
4979 fi
4980fi
4981if test -z "$CC"; then
4982 # Extract the first word of "cc", so it can be a program name with args.
4983set dummy cc; ac_word=$2
4984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4985$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 4986if test "${ac_cv_prog_CC+set}" = set; then :
067d23c9
KY
4987 $as_echo_n "(cached) " >&6
4988else
4989 if test -n "$CC"; then
4990 ac_cv_prog_CC="$CC" # Let the user override the test.
4991else
4992 ac_prog_rejected=no
4993as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4994for as_dir in $PATH
4995do
4996 IFS=$as_save_IFS
4997 test -z "$as_dir" && as_dir=.
4998 for ac_exec_ext in '' $ac_executable_extensions; do
4999 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5000 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
5001 ac_prog_rejected=yes
5002 continue
5003 fi
5004 ac_cv_prog_CC="cc"
5005 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5006 break 2
5007 fi
5008done
5009 done
5010IFS=$as_save_IFS
5011
5012if test $ac_prog_rejected = yes; then
5013 # We found a bogon in the path, so make sure we never use it.
5014 set dummy $ac_cv_prog_CC
5015 shift
5016 if test $# != 0; then
5017 # We chose a different compiler from the bogus one.
5018 # However, it has the same basename, so the bogon will be chosen
5019 # first if we set CC to just the basename; use the full file name.
5020 shift
5021 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
5022 fi
5023fi
5024fi
5025fi
5026CC=$ac_cv_prog_CC
5027if test -n "$CC"; then
5028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5029$as_echo "$CC" >&6; }
5030else
5031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5032$as_echo "no" >&6; }
5033fi
5034
5035
5036fi
5037if test -z "$CC"; then
5038 if test -n "$ac_tool_prefix"; then
5039 for ac_prog in cl.exe
5040 do
5041 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5042set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5044$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 5045if test "${ac_cv_prog_CC+set}" = set; then :
067d23c9
KY
5046 $as_echo_n "(cached) " >&6
5047else
5048 if test -n "$CC"; then
5049 ac_cv_prog_CC="$CC" # Let the user override the test.
5050else
5051as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5052for as_dir in $PATH
5053do
5054 IFS=$as_save_IFS
5055 test -z "$as_dir" && as_dir=.
5056 for ac_exec_ext in '' $ac_executable_extensions; do
5057 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5058 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
5059 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5060 break 2
5061 fi
5062done
5063 done
5064IFS=$as_save_IFS
5065
5066fi
5067fi
5068CC=$ac_cv_prog_CC
5069if test -n "$CC"; then
5070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5071$as_echo "$CC" >&6; }
5072else
5073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5074$as_echo "no" >&6; }
5075fi
5076
5077
5078 test -n "$CC" && break
5079 done
5080fi
5081if test -z "$CC"; then
5082 ac_ct_CC=$CC
5083 for ac_prog in cl.exe
5084do
5085 # Extract the first word of "$ac_prog", so it can be a program name with args.
5086set dummy $ac_prog; ac_word=$2
5087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5088$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 5089if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
067d23c9
KY
5090 $as_echo_n "(cached) " >&6
5091else
5092 if test -n "$ac_ct_CC"; then
5093 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5094else
5095as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5096for as_dir in $PATH
5097do
5098 IFS=$as_save_IFS
5099 test -z "$as_dir" && as_dir=.
5100 for ac_exec_ext in '' $ac_executable_extensions; do
5101 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5102 ac_cv_prog_ac_ct_CC="$ac_prog"
5103 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5104 break 2
5105 fi
5106done
5107 done
5108IFS=$as_save_IFS
5109
5110fi
5111fi
5112ac_ct_CC=$ac_cv_prog_ac_ct_CC
5113if test -n "$ac_ct_CC"; then
5114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5115$as_echo "$ac_ct_CC" >&6; }
5116else
5117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5118$as_echo "no" >&6; }
5119fi
5120
5121
5122 test -n "$ac_ct_CC" && break
5123done
5124
5125 if test "x$ac_ct_CC" = x; then
5126 CC=""
5127 else
5128 case $cross_compiling:$ac_tool_warned in
5129yes:)
5130{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5131$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5132ac_tool_warned=yes ;;
5133esac
5134 CC=$ac_ct_CC
5135 fi
5136fi
5137
5138fi
5139
5140
5141test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5142$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
a9bec17c
GM
5143as_fn_error "no acceptable C compiler found in \$PATH
5144See \`config.log' for more details." "$LINENO" 5; }
067d23c9
KY
5145
5146# Provide some information about the compiler.
5147$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
5148set X $ac_compile
5149ac_compiler=$2
5150for ac_option in --version -v -V -qversion; do
5151 { { ac_try="$ac_compiler $ac_option >&5"
5152case "(($ac_try" in
5153 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5154 *) ac_try_echo=$ac_try;;
5155esac
5156eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5157$as_echo "$ac_try_echo"; } >&5
5158 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
5159 ac_status=$?
5160 if test -s conftest.err; then
5161 sed '10a\
5162... rest of stderr output deleted ...
5163 10q' conftest.err >conftest.er1
5164 cat conftest.er1 >&5
5165 fi
5166 rm -f conftest.er1 conftest.err
5167 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5168 test $ac_status = 0; }
5169done
5170
5171cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5172/* end confdefs.h. */
5173
5174int
5175main ()
5176{
5177
5178 ;
5179 return 0;
5180}
5181_ACEOF
5182ac_clean_files_save=$ac_clean_files
5183ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
5184# Try to create an executable without -o first, disregard a.out.
5185# It will help us diagnose broken compilers, and finding out an intuition
5186# of exeext.
5187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
5188$as_echo_n "checking whether the C compiler works... " >&6; }
5189ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
5190
5191# The possible output files:
5192ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
5193
5194ac_rmfiles=
5195for ac_file in $ac_files
5196do
5197 case $ac_file in
5198 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
5199 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
5200 esac
5201done
5202rm -f $ac_rmfiles
5203
5204if { { ac_try="$ac_link_default"
5205case "(($ac_try" in
5206 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5207 *) ac_try_echo=$ac_try;;
5208esac
5209eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5210$as_echo "$ac_try_echo"; } >&5
5211 (eval "$ac_link_default") 2>&5
5212 ac_status=$?
5213 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5214 test $ac_status = 0; }; then :
5215 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
5216# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
5217# in a Makefile. We should not override ac_cv_exeext if it was cached,
5218# so that the user can short-circuit this test for compilers unknown to
5219# Autoconf.
5220for ac_file in $ac_files ''
5221do
5222 test -f "$ac_file" || continue
5223 case $ac_file in
5224 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
5225 ;;
5226 [ab].out )
5227 # We found the default executable, but exeext='' is most
5228 # certainly right.
5229 break;;
5230 *.* )
5231 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
5232 then :; else
5233 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
5234 fi
5235 # We set ac_cv_exeext here because the later test for it is not
5236 # safe: cross compilers may not add the suffix if given an `-o'
5237 # argument, so we may need to know it at that point already.
5238 # Even if this section looks crufty: it has the advantage of
5239 # actually working.
5240 break;;
5241 * )
5242 break;;
5243 esac
5244done
5245test "$ac_cv_exeext" = no && ac_cv_exeext=
5246
5247else
5248 ac_file=''
5249fi
5250if test -z "$ac_file"; then :
5251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5252$as_echo "no" >&6; }
5253$as_echo "$as_me: failed program was:" >&5
5254sed 's/^/| /' conftest.$ac_ext >&5
5255
5256{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5257$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
a9bec17c
GM
5258{ as_fn_set_status 77
5259as_fn_error "C compiler cannot create executables
5260See \`config.log' for more details." "$LINENO" 5; }; }
067d23c9
KY
5261else
5262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5263$as_echo "yes" >&6; }
5264fi
5265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
5266$as_echo_n "checking for C compiler default output file name... " >&6; }
5267{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
5268$as_echo "$ac_file" >&6; }
5269ac_exeext=$ac_cv_exeext
5270
5271rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
5272ac_clean_files=$ac_clean_files_save
5273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
5274$as_echo_n "checking for suffix of executables... " >&6; }
5275if { { ac_try="$ac_link"
5276case "(($ac_try" in
5277 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5278 *) ac_try_echo=$ac_try;;
5279esac
5280eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5281$as_echo "$ac_try_echo"; } >&5
5282 (eval "$ac_link") 2>&5
5283 ac_status=$?
5284 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5285 test $ac_status = 0; }; then :
5286 # If both `conftest.exe' and `conftest' are `present' (well, observable)
5287# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
5288# work properly (i.e., refer to `conftest.exe'), while it won't with
5289# `rm'.
5290for ac_file in conftest.exe conftest conftest.*; do
5291 test -f "$ac_file" || continue
5292 case $ac_file in
5293 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
5294 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
5295 break;;
5296 * ) break;;
5297 esac
5298done
5299else
5300 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5301$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
a9bec17c
GM
5302as_fn_error "cannot compute suffix of executables: cannot compile and link
5303See \`config.log' for more details." "$LINENO" 5; }
067d23c9
KY
5304fi
5305rm -f conftest conftest$ac_cv_exeext
5306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
5307$as_echo "$ac_cv_exeext" >&6; }
5308
5309rm -f conftest.$ac_ext
5310EXEEXT=$ac_cv_exeext
5311ac_exeext=$EXEEXT
5312cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5313/* end confdefs.h. */
5314#include <stdio.h>
5315int
5316main ()
5317{
5318FILE *f = fopen ("conftest.out", "w");
5319 return ferror (f) || fclose (f) != 0;
5320
5321 ;
5322 return 0;
5323}
5324_ACEOF
5325ac_clean_files="$ac_clean_files conftest.out"
5326# Check that the compiler produces executables we can run. If not, either
5327# the compiler is broken, or we cross compile.
5328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
5329$as_echo_n "checking whether we are cross compiling... " >&6; }
5330if test "$cross_compiling" != yes; then
5331 { { ac_try="$ac_link"
5332case "(($ac_try" in
5333 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5334 *) ac_try_echo=$ac_try;;
5335esac
5336eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5337$as_echo "$ac_try_echo"; } >&5
5338 (eval "$ac_link") 2>&5
5339 ac_status=$?
5340 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5341 test $ac_status = 0; }
5342 if { ac_try='./conftest$ac_cv_exeext'
5343 { { case "(($ac_try" in
5344 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5345 *) ac_try_echo=$ac_try;;
5346esac
5347eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5348$as_echo "$ac_try_echo"; } >&5
5349 (eval "$ac_try") 2>&5
5350 ac_status=$?
5351 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5352 test $ac_status = 0; }; }; then
5353 cross_compiling=no
5354 else
5355 if test "$cross_compiling" = maybe; then
5356 cross_compiling=yes
5357 else
5358 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5359$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
a9bec17c 5360as_fn_error "cannot run C compiled programs.
067d23c9 5361If you meant to cross compile, use \`--host'.
a9bec17c 5362See \`config.log' for more details." "$LINENO" 5; }
067d23c9
KY
5363 fi
5364 fi
5365fi
5366{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
5367$as_echo "$cross_compiling" >&6; }
5368
5369rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
5370ac_clean_files=$ac_clean_files_save
5371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
5372$as_echo_n "checking for suffix of object files... " >&6; }
a9bec17c 5373if test "${ac_cv_objext+set}" = set; then :
067d23c9
KY
5374 $as_echo_n "(cached) " >&6
5375else
5376 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5377/* end confdefs.h. */
5378
5379int
5380main ()
5381{
5382
5383 ;
5384 return 0;
5385}
5386_ACEOF
5387rm -f conftest.o conftest.obj
5388if { { ac_try="$ac_compile"
5389case "(($ac_try" in
5390 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5391 *) ac_try_echo=$ac_try;;
5392esac
5393eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5394$as_echo "$ac_try_echo"; } >&5
5395 (eval "$ac_compile") 2>&5
5396 ac_status=$?
5397 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5398 test $ac_status = 0; }; then :
5399 for ac_file in conftest.o conftest.obj conftest.*; do
5400 test -f "$ac_file" || continue;
5401 case $ac_file in
5402 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
5403 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
5404 break;;
5405 esac
5406done
5407else
5408 $as_echo "$as_me: failed program was:" >&5
5409sed 's/^/| /' conftest.$ac_ext >&5
5410
5411{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5412$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
a9bec17c
GM
5413as_fn_error "cannot compute suffix of object files: cannot compile
5414See \`config.log' for more details." "$LINENO" 5; }
067d23c9
KY
5415fi
5416rm -f conftest.$ac_cv_objext conftest.$ac_ext
5417fi
5418{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
5419$as_echo "$ac_cv_objext" >&6; }
5420OBJEXT=$ac_cv_objext
5421ac_objext=$OBJEXT
5422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
5423$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
a9bec17c 5424if test "${ac_cv_c_compiler_gnu+set}" = set; then :
067d23c9
KY
5425 $as_echo_n "(cached) " >&6
5426else
5427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5428/* end confdefs.h. */
5429
5430int
5431main ()
5432{
5433#ifndef __GNUC__
5434 choke me
5435#endif
5436
5437 ;
5438 return 0;
5439}
5440_ACEOF
5441if ac_fn_c_try_compile "$LINENO"; then :
5442 ac_compiler_gnu=yes
5443else
5444 ac_compiler_gnu=no
5445fi
5446rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5447ac_cv_c_compiler_gnu=$ac_compiler_gnu
5448
5449fi
5450{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
5451$as_echo "$ac_cv_c_compiler_gnu" >&6; }
5452if test $ac_compiler_gnu = yes; then
5453 GCC=yes
5454else
5455 GCC=
5456fi
5457ac_test_CFLAGS=${CFLAGS+set}
5458ac_save_CFLAGS=$CFLAGS
5459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
5460$as_echo_n "checking whether $CC accepts -g... " >&6; }
a9bec17c 5461if test "${ac_cv_prog_cc_g+set}" = set; then :
067d23c9
KY
5462 $as_echo_n "(cached) " >&6
5463else
5464 ac_save_c_werror_flag=$ac_c_werror_flag
5465 ac_c_werror_flag=yes
5466 ac_cv_prog_cc_g=no
5467 CFLAGS="-g"
5468 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5469/* end confdefs.h. */
5470
5471int
5472main ()
5473{
5474
5475 ;
5476 return 0;
5477}
5478_ACEOF
5479if ac_fn_c_try_compile "$LINENO"; then :
5480 ac_cv_prog_cc_g=yes
5481else
5482 CFLAGS=""
5483 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5484/* end confdefs.h. */
5485
5486int
5487main ()
5488{
5489
5490 ;
5491 return 0;
5492}
5493_ACEOF
5494if ac_fn_c_try_compile "$LINENO"; then :
5495
5496else
5497 ac_c_werror_flag=$ac_save_c_werror_flag
5498 CFLAGS="-g"
5499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5500/* end confdefs.h. */
5501
5502int
5503main ()
5504{
5505
5506 ;
5507 return 0;
5508}
5509_ACEOF
5510if ac_fn_c_try_compile "$LINENO"; then :
5511 ac_cv_prog_cc_g=yes
5512fi
5513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5514fi
5515rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5516fi
5517rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5518 ac_c_werror_flag=$ac_save_c_werror_flag
5519fi
5520{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
5521$as_echo "$ac_cv_prog_cc_g" >&6; }
5522if test "$ac_test_CFLAGS" = set; then
5523 CFLAGS=$ac_save_CFLAGS
5524elif test $ac_cv_prog_cc_g = yes; then
5525 if test "$GCC" = yes; then
5526 CFLAGS="-g -O2"
5527 else
5528 CFLAGS="-g"
5529 fi
5530else
5531 if test "$GCC" = yes; then
5532 CFLAGS="-O2"
5533 else
5534 CFLAGS=
5535 fi
5536fi
5537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
5538$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
a9bec17c 5539if test "${ac_cv_prog_cc_c89+set}" = set; then :
067d23c9
KY
5540 $as_echo_n "(cached) " >&6
5541else
5542 ac_cv_prog_cc_c89=no
5543ac_save_CC=$CC
5544cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5545/* end confdefs.h. */
5546#include <stdarg.h>
5547#include <stdio.h>
5548#include <sys/types.h>
5549#include <sys/stat.h>
5550/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
5551struct buf { int x; };
5552FILE * (*rcsopen) (struct buf *, struct stat *, int);
5553static char *e (p, i)
5554 char **p;
5555 int i;
5556{
5557 return p[i];
5558}
5559static char *f (char * (*g) (char **, int), char **p, ...)
5560{
5561 char *s;
5562 va_list v;
5563 va_start (v,p);
5564 s = g (p, va_arg (v,int));
5565 va_end (v);
5566 return s;
5567}
5568
5569/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
5570 function prototypes and stuff, but not '\xHH' hex character constants.
5571 These don't provoke an error unfortunately, instead are silently treated
5572 as 'x'. The following induces an error, until -std is added to get
5573 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
5574 array size at least. It's necessary to write '\x00'==0 to get something
5575 that's true only with -std. */
5576int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5577
5578/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5579 inside strings and character constants. */
5580#define FOO(x) 'x'
5581int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5582
5583int test (int i, double x);
5584struct s1 {int (*f) (int a);};
5585struct s2 {int (*f) (double a);};
5586int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5587int argc;
5588char **argv;
5589int
5590main ()
5591{
5592return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
5593 ;
5594 return 0;
5595}
5596_ACEOF
5597for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5598 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5599do
5600 CC="$ac_save_CC $ac_arg"
5601 if ac_fn_c_try_compile "$LINENO"; then :
5602 ac_cv_prog_cc_c89=$ac_arg
5603fi
5604rm -f core conftest.err conftest.$ac_objext
5605 test "x$ac_cv_prog_cc_c89" != "xno" && break
5606done
743c80a7
PE
5607rm -f conftest.$ac_ext
5608CC=$ac_save_CC
5609
5610fi
5611# AC_CACHE_VAL
5612case "x$ac_cv_prog_cc_c89" in
5613 x)
5614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5615$as_echo "none needed" >&6; } ;;
5616 xno)
5617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5618$as_echo "unsupported" >&6; } ;;
5619 *)
5620 CC="$CC $ac_cv_prog_cc_c89"
5621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5622$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
5623esac
5624if test "x$ac_cv_prog_cc_c89" != xno; then :
5625
5626fi
5627
5628ac_ext=c
5629ac_cpp='$CPP $CPPFLAGS'
5630ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5631ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5632ac_compiler_gnu=$ac_cv_c_compiler_gnu
5633DEPDIR="${am__leading_dot}deps"
5634
5635ac_config_commands="$ac_config_commands depfiles"
5636
5637
5638am_make=${MAKE-make}
5639cat > confinc << 'END'
5640am__doit:
5641 @echo this is the am__doit target
5642.PHONY: am__doit
5643END
5644# If we don't find an include directive, just comment out the code.
5645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
5646$as_echo_n "checking for style of include used by $am_make... " >&6; }
5647am__include="#"
5648am__quote=
5649_am_result=none
5650# First try GNU make style include.
5651echo "include confinc" > confmf
5652# Ignore all kinds of additional output from `make'.
5653case `$am_make -s -f confmf 2> /dev/null` in #(
5654*the\ am__doit\ target*)
5655 am__include=include
5656 am__quote=
5657 _am_result=GNU
5658 ;;
5659esac
5660# Now try BSD make style include.
5661if test "$am__include" = "#"; then
5662 echo '.include "confinc"' > confmf
5663 case `$am_make -s -f confmf 2> /dev/null` in #(
5664 *the\ am__doit\ target*)
5665 am__include=.include
5666 am__quote="\""
5667 _am_result=BSD
5668 ;;
5669 esac
5670fi
5671
5672
5673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
5674$as_echo "$_am_result" >&6; }
5675rm -f confinc confmf
5676
5677# Check whether --enable-dependency-tracking was given.
5678if test "${enable_dependency_tracking+set}" = set; then :
5679 enableval=$enable_dependency_tracking;
5680fi
5681
5682if test "x$enable_dependency_tracking" != xno; then
5683 am_depcomp="$ac_aux_dir/depcomp"
5684 AMDEPBACKSLASH='\'
5685fi
5686 if test "x$enable_dependency_tracking" != xno; then
5687 AMDEP_TRUE=
5688 AMDEP_FALSE='#'
5689else
5690 AMDEP_TRUE='#'
5691 AMDEP_FALSE=
5692fi
5693
5694
5695
5696depcc="$CC" am_compiler_list=
5697
5698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
5699$as_echo_n "checking dependency style of $depcc... " >&6; }
a9bec17c 5700if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
743c80a7
PE
5701 $as_echo_n "(cached) " >&6
5702else
5703 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
5704 # We make a subdir and do the tests there. Otherwise we can end up
5705 # making bogus files that we don't know about and never remove. For
5706 # instance it was reported that on HP-UX the gcc test will end up
5707 # making a dummy file named `D' -- because `-MD' means `put the output
5708 # in D'.
5709 mkdir conftest.dir
5710 # Copy depcomp to subdir because otherwise we won't find it if we're
5711 # using a relative directory.
5712 cp "$am_depcomp" conftest.dir
5713 cd conftest.dir
5714 # We will build objects and dependencies in a subdirectory because
5715 # it helps to detect inapplicable dependency modes. For instance
5716 # both Tru64's cc and ICC support -MD to output dependencies as a
5717 # side effect of compilation, but ICC will put the dependencies in
5718 # the current directory while Tru64 will put them in the object
5719 # directory.
5720 mkdir sub
5721
5722 am_cv_CC_dependencies_compiler_type=none
5723 if test "$am_compiler_list" = ""; then
5724 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5725 fi
5726 am__universal=false
5727 case " $depcc " in #(
5728 *\ -arch\ *\ -arch\ *) am__universal=true ;;
5729 esac
5730
5731 for depmode in $am_compiler_list; do
5732 # Setup a source with many dependencies, because some compilers
5733 # like to wrap large dependency lists on column 80 (with \), and
5734 # we should not choose a depcomp mode which is confused by this.
5735 #
5736 # We need to recreate these files for each test, as the compiler may
5737 # overwrite some of them when testing with obscure command lines.
5738 # This happens at least with the AIX C compiler.
5739 : > sub/conftest.c
5740 for i in 1 2 3 4 5 6; do
5741 echo '#include "conftst'$i'.h"' >> sub/conftest.c
5742 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
5743 # Solaris 8's {/usr,}/bin/sh.
5744 touch sub/conftst$i.h
5745 done
5746 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
5747
5748 # We check with `-c' and `-o' for the sake of the "dashmstdout"
5749 # mode. It turns out that the SunPro C++ compiler does not properly
5750 # handle `-M -o', and we need to detect this. Also, some Intel
5751 # versions had trouble with output in subdirs
5752 am__obj=sub/conftest.${OBJEXT-o}
5753 am__minus_obj="-o $am__obj"
5754 case $depmode in
5755 gcc)
5756 # This depmode causes a compiler race in universal mode.
5757 test "$am__universal" = false || continue
5758 ;;
5759 nosideeffect)
5760 # after this tag, mechanisms are not by side-effect, so they'll
5761 # only be used when explicitly requested
5762 if test "x$enable_dependency_tracking" = xyes; then
5763 continue
5764 else
5765 break
5766 fi
5767 ;;
5768 msvisualcpp | msvcmsys)
5769 # This compiler won't grok `-c -o', but also, the minuso test has
5770 # not run yet. These depmodes are late enough in the game, and
5771 # so weak that their functioning should not be impacted.
5772 am__obj=conftest.${OBJEXT-o}
5773 am__minus_obj=
5774 ;;
5775 none) break ;;
5776 esac
5777 if depmode=$depmode \
5778 source=sub/conftest.c object=$am__obj \
5779 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
5780 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
5781 >/dev/null 2>conftest.err &&
5782 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
5783 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
5784 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
5785 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
5786 # icc doesn't choke on unknown options, it will just issue warnings
5787 # or remarks (even with -Werror). So we grep stderr for any message
5788 # that says an option was ignored or not supported.
5789 # When given -MP, icc 7.0 and 7.1 complain thusly:
5790 # icc: Command line warning: ignoring option '-M'; no argument required
5791 # The diagnosis changed in icc 8.0:
5792 # icc: Command line remark: option '-MP' not supported
5793 if (grep 'ignoring option' conftest.err ||
5794 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
5795 am_cv_CC_dependencies_compiler_type=$depmode
5796 break
5797 fi
5798 fi
5799 done
5800
5801 cd ..
5802 rm -rf conftest.dir
5803else
5804 am_cv_CC_dependencies_compiler_type=none
5805fi
5806
5807fi
5808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
5809$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
5810CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
5811
5812 if
5813 test "x$enable_dependency_tracking" != xno \
5814 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
5815 am__fastdepCC_TRUE=
5816 am__fastdepCC_FALSE='#'
5817else
5818 am__fastdepCC_TRUE='#'
5819 am__fastdepCC_FALSE=
5820fi
5821
5822
5823if test "x$CC" != xcc; then
5824 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5
5825$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
5826else
5827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5
5828$as_echo_n "checking whether cc understands -c and -o together... " >&6; }
5829fi
5830set dummy $CC; ac_cc=`$as_echo "$2" |
5831 sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
a9bec17c 5832if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then :
743c80a7
PE
5833 $as_echo_n "(cached) " >&6
5834else
5835 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5836/* end confdefs.h. */
5837
5838int
5839main ()
5840{
5841
5842 ;
5843 return 0;
5844}
5845_ACEOF
5846# Make sure it works both with $CC and with simple cc.
5847# We do the test twice because some compilers refuse to overwrite an
5848# existing .o file with -o, though they will create one.
5849ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
5850rm -f conftest2.*
5851if { { case "(($ac_try" in
5852 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5853 *) ac_try_echo=$ac_try;;
5854esac
5855eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5856$as_echo "$ac_try_echo"; } >&5
5857 (eval "$ac_try") 2>&5
5858 ac_status=$?
5859 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5860 test $ac_status = 0; } &&
5861 test -f conftest2.$ac_objext && { { case "(($ac_try" in
5862 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5863 *) ac_try_echo=$ac_try;;
5864esac
5865eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5866$as_echo "$ac_try_echo"; } >&5
5867 (eval "$ac_try") 2>&5
5868 ac_status=$?
5869 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5870 test $ac_status = 0; };
5871then
5872 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
5873 if test "x$CC" != xcc; then
5874 # Test first that cc exists at all.
5875 if { ac_try='cc -c conftest.$ac_ext >&5'
5876 { { case "(($ac_try" in
5877 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5878 *) ac_try_echo=$ac_try;;
5879esac
5880eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5881$as_echo "$ac_try_echo"; } >&5
5882 (eval "$ac_try") 2>&5
5883 ac_status=$?
5884 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5885 test $ac_status = 0; }; }; then
5886 ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
5887 rm -f conftest2.*
5888 if { { case "(($ac_try" in
5889 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5890 *) ac_try_echo=$ac_try;;
5891esac
5892eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5893$as_echo "$ac_try_echo"; } >&5
5894 (eval "$ac_try") 2>&5
5895 ac_status=$?
5896 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5897 test $ac_status = 0; } &&
5898 test -f conftest2.$ac_objext && { { case "(($ac_try" in
5899 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5900 *) ac_try_echo=$ac_try;;
5901esac
5902eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5903$as_echo "$ac_try_echo"; } >&5
5904 (eval "$ac_try") 2>&5
5905 ac_status=$?
5906 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5907 test $ac_status = 0; };
5908 then
5909 # cc works too.
5910 :
5911 else
5912 # cc exists but doesn't like -o.
5913 eval ac_cv_prog_cc_${ac_cc}_c_o=no
5914 fi
5915 fi
5916 fi
5917else
5918 eval ac_cv_prog_cc_${ac_cc}_c_o=no
5919fi
5920rm -f core conftest*
5921
5922fi
5923if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
5924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5925$as_echo "yes" >&6; }
5926else
5927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5928$as_echo "no" >&6; }
5929
5930$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h
5931
5932fi
5933
5934# FIXME: we rely on the cache variable name because
5935# there is no other way.
5936set dummy $CC
5937am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
5938eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
5939if test "$am_t" != yes; then
5940 # Losing compiler, so override with the script.
5941 # FIXME: It is wrong to rewrite CC.
5942 # But if we don't then we get into trouble of one sort or another.
5943 # A longer-term fix would be to have automake use am__CC in this case,
5944 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
5945 CC="$am_aux_dir/compile $CC"
5946fi
5947
5948
5949
5ec54608
GM
5950if test x$GCC = xyes; then
5951 test "x$GCC_TEST_OPTIONS" != x && CC="$CC $GCC_TEST_OPTIONS"
5952else
5953 test "x$NON_GCC_TEST_OPTIONS" != x && CC="$CC $NON_GCC_TEST_OPTIONS"
5954fi
5955
7c61eaab
GM
5956 if test "x$opsys" = "xmingw32"; then
5957 BUILDING_FOR_WINDOWSNT_TRUE=
5958 BUILDING_FOR_WINDOWSNT_FALSE='#'
5959else
5960 BUILDING_FOR_WINDOWSNT_TRUE='#'
5961 BUILDING_FOR_WINDOWSNT_FALSE=
5962fi
5963
5964
34fd7a48
GM
5965# Avoid gnulib's tests for HAVE_WORKING_O_NOATIME and HAVE_WORKING_O_NOFOLLOW,
5966# as we don't use them.
710f5812 5967
f077f61d
GM
5968# Avoid gnulib's threadlib module, as we do threads our own way.
5969
5970
5ec54608 5971# Initialize gnulib right after choosing the compiler.
743c80a7 5972
067d23c9
KY
5973ac_ext=c
5974ac_cpp='$CPP $CPPFLAGS'
5975ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5976ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5977ac_compiler_gnu=$ac_cv_c_compiler_gnu
5978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
5979$as_echo_n "checking how to run the C preprocessor... " >&6; }
5980# On Suns, sometimes $CPP names a directory.
5981if test -n "$CPP" && test -d "$CPP"; then
5982 CPP=
5983fi
5984if test -z "$CPP"; then
a9bec17c 5985 if test "${ac_cv_prog_CPP+set}" = set; then :
067d23c9
KY
5986 $as_echo_n "(cached) " >&6
5987else
5988 # Double quotes because CPP needs to be expanded
5989 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
5990 do
5991 ac_preproc_ok=false
5992for ac_c_preproc_warn_flag in '' yes
5993do
5994 # Use a header file that comes with gcc, so configuring glibc
5995 # with a fresh cross-compiler works.
5996 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5997 # <limits.h> exists even on freestanding compilers.
5998 # On the NeXT, cc -E runs the code through the compiler's parser,
5999 # not just through cpp. "Syntax error" is here to catch this case.
6000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6001/* end confdefs.h. */
6002#ifdef __STDC__
6003# include <limits.h>
6004#else
6005# include <assert.h>
6006#endif
6007 Syntax error
6008_ACEOF
6009if ac_fn_c_try_cpp "$LINENO"; then :
6010
6011else
6012 # Broken: fails on valid input.
6013continue
6014fi
a9bec17c 6015rm -f conftest.err conftest.$ac_ext
067d23c9
KY
6016
6017 # OK, works on sane cases. Now check whether nonexistent headers
6018 # can be detected and how.
6019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6020/* end confdefs.h. */
6021#include <ac_nonexistent.h>
6022_ACEOF
6023if ac_fn_c_try_cpp "$LINENO"; then :
6024 # Broken: success on invalid input.
6025continue
6026else
6027 # Passes both tests.
6028ac_preproc_ok=:
6029break
6030fi
a9bec17c 6031rm -f conftest.err conftest.$ac_ext
067d23c9
KY
6032
6033done
6034# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
a9bec17c 6035rm -f conftest.err conftest.$ac_ext
067d23c9
KY
6036if $ac_preproc_ok; then :
6037 break
6038fi
6039
6040 done
6041 ac_cv_prog_CPP=$CPP
6042
6043fi
6044 CPP=$ac_cv_prog_CPP
6045else
6046 ac_cv_prog_CPP=$CPP
6047fi
6048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
6049$as_echo "$CPP" >&6; }
6050ac_preproc_ok=false
6051for ac_c_preproc_warn_flag in '' yes
6052do
6053 # Use a header file that comes with gcc, so configuring glibc
6054 # with a fresh cross-compiler works.
6055 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6056 # <limits.h> exists even on freestanding compilers.
6057 # On the NeXT, cc -E runs the code through the compiler's parser,
6058 # not just through cpp. "Syntax error" is here to catch this case.
6059 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6060/* end confdefs.h. */
6061#ifdef __STDC__
6062# include <limits.h>
6063#else
6064# include <assert.h>
6065#endif
6066 Syntax error
6067_ACEOF
6068if ac_fn_c_try_cpp "$LINENO"; then :
6069
6070else
6071 # Broken: fails on valid input.
6072continue
6073fi
a9bec17c 6074rm -f conftest.err conftest.$ac_ext
067d23c9
KY
6075
6076 # OK, works on sane cases. Now check whether nonexistent headers
6077 # can be detected and how.
6078 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6079/* end confdefs.h. */
6080#include <ac_nonexistent.h>
6081_ACEOF
6082if ac_fn_c_try_cpp "$LINENO"; then :
6083 # Broken: success on invalid input.
6084continue
6085else
6086 # Passes both tests.
6087ac_preproc_ok=:
6088break
6089fi
a9bec17c 6090rm -f conftest.err conftest.$ac_ext
067d23c9
KY
6091
6092done
6093# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
a9bec17c 6094rm -f conftest.err conftest.$ac_ext
067d23c9
KY
6095if $ac_preproc_ok; then :
6096
6097else
6098 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6099$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
a9bec17c
GM
6100as_fn_error "C preprocessor \"$CPP\" fails sanity check
6101See \`config.log' for more details." "$LINENO" 5; }
067d23c9
KY
6102fi
6103
6104ac_ext=c
6105ac_cpp='$CPP $CPPFLAGS'
6106ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6107ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6108ac_compiler_gnu=$ac_cv_c_compiler_gnu
6109
6110
6111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6112$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
a9bec17c 6113if test "${ac_cv_path_GREP+set}" = set; then :
067d23c9
KY
6114 $as_echo_n "(cached) " >&6
6115else
6116 if test -z "$GREP"; then
6117 ac_path_GREP_found=false
6118 # Loop through the user's path and test for each of PROGNAME-LIST
6119 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6120for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6121do
6122 IFS=$as_save_IFS
6123 test -z "$as_dir" && as_dir=.
6124 for ac_prog in grep ggrep; do
6125 for ac_exec_ext in '' $ac_executable_extensions; do
6126 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6127 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
6128# Check for GNU ac_path_GREP and select it if it is found.
6129 # Check for GNU $ac_path_GREP
6130case `"$ac_path_GREP" --version 2>&1` in
6131*GNU*)
6132 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6133*)
6134 ac_count=0
6135 $as_echo_n 0123456789 >"conftest.in"
6136 while :
6137 do
6138 cat "conftest.in" "conftest.in" >"conftest.tmp"
6139 mv "conftest.tmp" "conftest.in"
6140 cp "conftest.in" "conftest.nl"
6141 $as_echo 'GREP' >> "conftest.nl"
6142 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6143 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6144 as_fn_arith $ac_count + 1 && ac_count=$as_val
6145 if test $ac_count -gt ${ac_path_GREP_max-0}; then
6146 # Best one so far, save it but keep looking for a better one
6147 ac_cv_path_GREP="$ac_path_GREP"
6148 ac_path_GREP_max=$ac_count
6149 fi
6150 # 10*(2^10) chars as input seems more than enough
6151 test $ac_count -gt 10 && break
6152 done
6153 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6154esac
6155
6156 $ac_path_GREP_found && break 3
6157 done
6158 done
6159 done
6160IFS=$as_save_IFS
6161 if test -z "$ac_cv_path_GREP"; then
a9bec17c 6162 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
067d23c9
KY
6163 fi
6164else
6165 ac_cv_path_GREP=$GREP
6166fi
6167
6168fi
6169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6170$as_echo "$ac_cv_path_GREP" >&6; }
6171 GREP="$ac_cv_path_GREP"
6172
6173
6174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6175$as_echo_n "checking for egrep... " >&6; }
a9bec17c 6176if test "${ac_cv_path_EGREP+set}" = set; then :
067d23c9
KY
6177 $as_echo_n "(cached) " >&6
6178else
6179 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6180 then ac_cv_path_EGREP="$GREP -E"
6181 else
6182 if test -z "$EGREP"; then
6183 ac_path_EGREP_found=false
6184 # Loop through the user's path and test for each of PROGNAME-LIST
6185 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6186for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6187do
6188 IFS=$as_save_IFS
6189 test -z "$as_dir" && as_dir=.
6190 for ac_prog in egrep; do
6191 for ac_exec_ext in '' $ac_executable_extensions; do
6192 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6193 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
6194# Check for GNU ac_path_EGREP and select it if it is found.
6195 # Check for GNU $ac_path_EGREP
6196case `"$ac_path_EGREP" --version 2>&1` in
6197*GNU*)
6198 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6199*)
6200 ac_count=0
6201 $as_echo_n 0123456789 >"conftest.in"
6202 while :
6203 do
6204 cat "conftest.in" "conftest.in" >"conftest.tmp"
6205 mv "conftest.tmp" "conftest.in"
6206 cp "conftest.in" "conftest.nl"
6207 $as_echo 'EGREP' >> "conftest.nl"
6208 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6209 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6210 as_fn_arith $ac_count + 1 && ac_count=$as_val
6211 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6212 # Best one so far, save it but keep looking for a better one
6213 ac_cv_path_EGREP="$ac_path_EGREP"
6214 ac_path_EGREP_max=$ac_count
6215 fi
6216 # 10*(2^10) chars as input seems more than enough
6217 test $ac_count -gt 10 && break
6218 done
6219 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6220esac
6221
6222 $ac_path_EGREP_found && break 3
6223 done
6224 done
6225 done
6226IFS=$as_save_IFS
6227 if test -z "$ac_cv_path_EGREP"; then
a9bec17c 6228 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
067d23c9
KY
6229 fi
6230else
6231 ac_cv_path_EGREP=$EGREP
6232fi
6233
6234 fi
6235fi
6236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6237$as_echo "$ac_cv_path_EGREP" >&6; }
6238 EGREP="$ac_cv_path_EGREP"
6239
6240
369e19fc
PE
6241
6242
6243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
6244$as_echo_n "checking for Minix Amsterdam compiler... " >&6; }
a9bec17c 6245if test "${gl_cv_c_amsterdam_compiler+set}" = set; then :
369e19fc
PE
6246 $as_echo_n "(cached) " >&6
6247else
6248
6249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6250/* end confdefs.h. */
6251
6252#ifdef __ACK__
6253Amsterdam
6254#endif
6255
6256_ACEOF
6257if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6258 $EGREP "Amsterdam" >/dev/null 2>&1; then :
6259 gl_cv_c_amsterdam_compiler=yes
6260else
6261 gl_cv_c_amsterdam_compiler=no
6262fi
6263rm -f conftest*
6264
6265
6266fi
6267{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
6268$as_echo "$gl_cv_c_amsterdam_compiler" >&6; }
6269 if test -z "$AR"; then
6270 if test $gl_cv_c_amsterdam_compiler = yes; then
6271 AR='cc -c.a'
6272 if test -z "$ARFLAGS"; then
6273 ARFLAGS='-o'
6274 fi
6275 else
6276 if test -n "$ac_tool_prefix"; then
6277 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6278set dummy ${ac_tool_prefix}ar; ac_word=$2
6279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6280$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 6281if test "${ac_cv_prog_AR+set}" = set; then :
369e19fc
PE
6282 $as_echo_n "(cached) " >&6
6283else
6284 if test -n "$AR"; then
6285 ac_cv_prog_AR="$AR" # Let the user override the test.
6286else
6287as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6288for as_dir in $PATH
6289do
6290 IFS=$as_save_IFS
6291 test -z "$as_dir" && as_dir=.
6292 for ac_exec_ext in '' $ac_executable_extensions; do
6293 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6294 ac_cv_prog_AR="${ac_tool_prefix}ar"
6295 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6296 break 2
6297 fi
6298done
6299 done
6300IFS=$as_save_IFS
6301
6302fi
6303fi
6304AR=$ac_cv_prog_AR
6305if test -n "$AR"; then
6306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6307$as_echo "$AR" >&6; }
6308else
6309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6310$as_echo "no" >&6; }
6311fi
6312
6313
6314fi
6315if test -z "$ac_cv_prog_AR"; then
6316 ac_ct_AR=$AR
6317 # Extract the first word of "ar", so it can be a program name with args.
6318set dummy ar; ac_word=$2
6319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6320$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 6321if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
369e19fc
PE
6322 $as_echo_n "(cached) " >&6
6323else
6324 if test -n "$ac_ct_AR"; then
6325 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6326else
6327as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6328for as_dir in $PATH
6329do
6330 IFS=$as_save_IFS
6331 test -z "$as_dir" && as_dir=.
6332 for ac_exec_ext in '' $ac_executable_extensions; do
6333 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6334 ac_cv_prog_ac_ct_AR="ar"
6335 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6336 break 2
6337 fi
6338done
6339 done
6340IFS=$as_save_IFS
6341
6342fi
6343fi
6344ac_ct_AR=$ac_cv_prog_ac_ct_AR
6345if test -n "$ac_ct_AR"; then
6346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6347$as_echo "$ac_ct_AR" >&6; }
6348else
6349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6350$as_echo "no" >&6; }
6351fi
6352
6353 if test "x$ac_ct_AR" = x; then
6354 AR="ar"
6355 else
6356 case $cross_compiling:$ac_tool_warned in
6357yes:)
6358{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6359$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6360ac_tool_warned=yes ;;
6361esac
6362 AR=$ac_ct_AR
6363 fi
6364else
6365 AR="$ac_cv_prog_AR"
6366fi
6367
6368 if test -z "$ARFLAGS"; then
6369 ARFLAGS='cru'
6370 fi
6371 fi
6372 else
6373 if test -z "$ARFLAGS"; then
6374 ARFLAGS='cru'
6375 fi
6376 fi
6377
6378
6379 if test -z "$RANLIB"; then
6380 if test $gl_cv_c_amsterdam_compiler = yes; then
6381 RANLIB=':'
6382 else
6383 if test -n "$ac_tool_prefix"; then
6384 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6385set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6387$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 6388if test "${ac_cv_prog_RANLIB+set}" = set; then :
369e19fc
PE
6389 $as_echo_n "(cached) " >&6
6390else
6391 if test -n "$RANLIB"; then
6392 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6393else
6394as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6395for as_dir in $PATH
6396do
6397 IFS=$as_save_IFS
6398 test -z "$as_dir" && as_dir=.
6399 for ac_exec_ext in '' $ac_executable_extensions; do
6400 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6401 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6402 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6403 break 2
6404 fi
6405done
6406 done
6407IFS=$as_save_IFS
6408
6409fi
6410fi
6411RANLIB=$ac_cv_prog_RANLIB
6412if test -n "$RANLIB"; then
6413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6414$as_echo "$RANLIB" >&6; }
6415else
6416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6417$as_echo "no" >&6; }
6418fi
6419
6420
6421fi
6422if test -z "$ac_cv_prog_RANLIB"; then
6423 ac_ct_RANLIB=$RANLIB
6424 # Extract the first word of "ranlib", so it can be a program name with args.
6425set dummy ranlib; ac_word=$2
6426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6427$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 6428if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
369e19fc
PE
6429 $as_echo_n "(cached) " >&6
6430else
6431 if test -n "$ac_ct_RANLIB"; then
6432 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6433else
6434as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6435for as_dir in $PATH
6436do
6437 IFS=$as_save_IFS
6438 test -z "$as_dir" && as_dir=.
6439 for ac_exec_ext in '' $ac_executable_extensions; do
6440 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6441 ac_cv_prog_ac_ct_RANLIB="ranlib"
6442 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6443 break 2
6444 fi
6445done
6446 done
6447IFS=$as_save_IFS
6448
6449fi
6450fi
6451ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6452if test -n "$ac_ct_RANLIB"; then
6453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6454$as_echo "$ac_ct_RANLIB" >&6; }
6455else
6456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6457$as_echo "no" >&6; }
6458fi
6459
6460 if test "x$ac_ct_RANLIB" = x; then
6461 RANLIB=":"
6462 else
6463 case $cross_compiling:$ac_tool_warned in
6464yes:)
6465{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6466$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6467ac_tool_warned=yes ;;
6468esac
6469 RANLIB=$ac_ct_RANLIB
6470 fi
6471else
6472 RANLIB="$ac_cv_prog_RANLIB"
6473fi
6474
6475 fi
6476 fi
6477
6478
067d23c9
KY
6479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6480$as_echo_n "checking for ANSI C header files... " >&6; }
a9bec17c 6481if test "${ac_cv_header_stdc+set}" = set; then :
067d23c9
KY
6482 $as_echo_n "(cached) " >&6
6483else
6484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6485/* end confdefs.h. */
6486#include <stdlib.h>
6487#include <stdarg.h>
6488#include <string.h>
6489#include <float.h>
6490
6491int
6492main ()
6493{
6494
6495 ;
6496 return 0;
6497}
6498_ACEOF
6499if ac_fn_c_try_compile "$LINENO"; then :
6500 ac_cv_header_stdc=yes
6501else
6502 ac_cv_header_stdc=no
6503fi
6504rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6505
6506if test $ac_cv_header_stdc = yes; then
6507 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6508 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6509/* end confdefs.h. */
6510#include <string.h>
6511
6512_ACEOF
6513if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6514 $EGREP "memchr" >/dev/null 2>&1; then :
6515
6516else
6517 ac_cv_header_stdc=no
6518fi
6519rm -f conftest*
6520
6521fi
6522
6523if test $ac_cv_header_stdc = yes; then
6524 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6525 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6526/* end confdefs.h. */
6527#include <stdlib.h>
6528
6529_ACEOF
6530if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6531 $EGREP "free" >/dev/null 2>&1; then :
6532
6533else
6534 ac_cv_header_stdc=no
6535fi
6536rm -f conftest*
6537
6538fi
6539
6540if test $ac_cv_header_stdc = yes; then
6541 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6542 if test "$cross_compiling" = yes; then :
6543 :
6544else
6545 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6546/* end confdefs.h. */
6547#include <ctype.h>
6548#include <stdlib.h>
6549#if ((' ' & 0x0FF) == 0x020)
6550# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6551# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6552#else
6553# define ISLOWER(c) \
6554 (('a' <= (c) && (c) <= 'i') \
6555 || ('j' <= (c) && (c) <= 'r') \
6556 || ('s' <= (c) && (c) <= 'z'))
6557# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6558#endif
6559
6560#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6561int
6562main ()
6563{
6564 int i;
6565 for (i = 0; i < 256; i++)
6566 if (XOR (islower (i), ISLOWER (i))
6567 || toupper (i) != TOUPPER (i))
6568 return 2;
6569 return 0;
6570}
6571_ACEOF
6572if ac_fn_c_try_run "$LINENO"; then :
6573
6574else
6575 ac_cv_header_stdc=no
6576fi
6577rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6578 conftest.$ac_objext conftest.beam conftest.$ac_ext
6579fi
6580
6581fi
6582fi
6583{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6584$as_echo "$ac_cv_header_stdc" >&6; }
6585if test $ac_cv_header_stdc = yes; then
6586
6587$as_echo "#define STDC_HEADERS 1" >>confdefs.h
6588
6589fi
6590
6591# On IRIX 5.3, sys/types and inttypes.h are conflicting.
6592for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
6593 inttypes.h stdint.h unistd.h
6594do :
6595 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6596ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
6597"
a9bec17c
GM
6598eval as_val=\$$as_ac_Header
6599 if test "x$as_val" = x""yes; then :
067d23c9
KY
6600 cat >>confdefs.h <<_ACEOF
6601#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6602_ACEOF
6603
6604fi
6605
6606done
6607
6608
6609
6610 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
a9bec17c 6611if test "x$ac_cv_header_minix_config_h" = x""yes; then :
067d23c9
KY
6612 MINIX=yes
6613else
6614 MINIX=
6615fi
6616
6617
6618 if test "$MINIX" = yes; then
6619
6620$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
6621
6622
6623$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
6624
6625
6626$as_echo "#define _MINIX 1" >>confdefs.h
6627
1fd182f0 6628
2cdd55fc 6629$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
1fd182f0 6630
2cdd55fc 6631 fi
1fd182f0 6632
067d23c9
KY
6633
6634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
6635$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
a9bec17c 6636if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
067d23c9
KY
6637 $as_echo_n "(cached) " >&6
6638else
6639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6640/* end confdefs.h. */
369e19fc
PE
6641
6642# define __EXTENSIONS__ 1
6643 $ac_includes_default
6644int
6645main ()
6646{
6647
6648 ;
6649 return 0;
6650}
6651_ACEOF
6652if ac_fn_c_try_compile "$LINENO"; then :
6653 ac_cv_safe_to_define___extensions__=yes
6654else
6655 ac_cv_safe_to_define___extensions__=no
6656fi
6657rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6658fi
6659{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
6660$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
6661 test $ac_cv_safe_to_define___extensions__ = yes &&
6662 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
6663
6664 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
6665
6666 $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
6667
6668 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
6669
6670 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
6671
6672 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
6673
2cdd55fc
GM
6674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
6675$as_echo_n "checking whether _XOPEN_SOURCE should be defined... " >&6; }
6676if test "${ac_cv_should_define__xopen_source+set}" = set; then :
6677 $as_echo_n "(cached) " >&6
6678else
6679 ac_cv_should_define__xopen_source=no
6680 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6681/* end confdefs.h. */
6682
6683 #include <wchar.h>
6684 mbstate_t x;
6685int
6686main ()
6687{
6688
6689 ;
6690 return 0;
6691}
6692_ACEOF
6693if ac_fn_c_try_compile "$LINENO"; then :
6694
6695else
6696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6697/* end confdefs.h. */
6698
6699 #define _XOPEN_SOURCE 500
6700 #include <wchar.h>
6701 mbstate_t x;
6702int
6703main ()
6704{
6705
6706 ;
6707 return 0;
6708}
6709_ACEOF
6710if ac_fn_c_try_compile "$LINENO"; then :
6711 ac_cv_should_define__xopen_source=yes
6712fi
6713rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6714fi
6715rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6716fi
6717{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
6718$as_echo "$ac_cv_should_define__xopen_source" >&6; }
6719 test $ac_cv_should_define__xopen_source = yes &&
6720 $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
6721
369e19fc
PE
6722
6723
6724
6725
6726
6727
6728
6729# Check whether --enable-largefile was given.
6730if test "${enable_largefile+set}" = set; then :
6731 enableval=$enable_largefile;
6732fi
6733
6734if test "$enable_largefile" != no; then
6735
6736 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
6737$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
a9bec17c 6738if test "${ac_cv_sys_largefile_CC+set}" = set; then :
369e19fc
PE
6739 $as_echo_n "(cached) " >&6
6740else
6741 ac_cv_sys_largefile_CC=no
6742 if test "$GCC" != yes; then
6743 ac_save_CC=$CC
6744 while :; do
6745 # IRIX 6.2 and later do not support large files by default,
6746 # so use the C compiler's -n32 option if that helps.
6747 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6748/* end confdefs.h. */
6749#include <sys/types.h>
6750 /* Check that off_t can represent 2**63 - 1 correctly.
6751 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6752 since some C++ compilers masquerading as C compilers
6753 incorrectly reject 9223372036854775807. */
6754#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6755 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6756 && LARGE_OFF_T % 2147483647 == 1)
6757 ? 1 : -1];
6758int
6759main ()
6760{
6761
6762 ;
6763 return 0;
6764}
6765_ACEOF
6766 if ac_fn_c_try_compile "$LINENO"; then :
6767 break
6768fi
6769rm -f core conftest.err conftest.$ac_objext
6770 CC="$CC -n32"
6771 if ac_fn_c_try_compile "$LINENO"; then :
6772 ac_cv_sys_largefile_CC=' -n32'; break
6773fi
6774rm -f core conftest.err conftest.$ac_objext
6775 break
6776 done
6777 CC=$ac_save_CC
6778 rm -f conftest.$ac_ext
6779 fi
6780fi
6781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
6782$as_echo "$ac_cv_sys_largefile_CC" >&6; }
6783 if test "$ac_cv_sys_largefile_CC" != no; then
6784 CC=$CC$ac_cv_sys_largefile_CC
6785 fi
6786
6787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
6788$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
a9bec17c 6789if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
369e19fc
PE
6790 $as_echo_n "(cached) " >&6
6791else
6792 while :; do
6793 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6794/* end confdefs.h. */
6795#include <sys/types.h>
6796 /* Check that off_t can represent 2**63 - 1 correctly.
6797 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6798 since some C++ compilers masquerading as C compilers
6799 incorrectly reject 9223372036854775807. */
6800#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6801 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6802 && LARGE_OFF_T % 2147483647 == 1)
6803 ? 1 : -1];
6804int
6805main ()
6806{
6807
6808 ;
6809 return 0;
6810}
6811_ACEOF
6812if ac_fn_c_try_compile "$LINENO"; then :
6813 ac_cv_sys_file_offset_bits=no; break
6814fi
6815rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6817/* end confdefs.h. */
6818#define _FILE_OFFSET_BITS 64
6819#include <sys/types.h>
6820 /* Check that off_t can represent 2**63 - 1 correctly.
6821 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6822 since some C++ compilers masquerading as C compilers
6823 incorrectly reject 9223372036854775807. */
6824#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6825 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6826 && LARGE_OFF_T % 2147483647 == 1)
6827 ? 1 : -1];
6828int
6829main ()
6830{
6831
6832 ;
6833 return 0;
6834}
6835_ACEOF
6836if ac_fn_c_try_compile "$LINENO"; then :
6837 ac_cv_sys_file_offset_bits=64; break
6838fi
6839rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6840 ac_cv_sys_file_offset_bits=unknown
6841 break
6842done
6843fi
6844{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
6845$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
6846case $ac_cv_sys_file_offset_bits in #(
6847 no | unknown) ;;
6848 *)
6849cat >>confdefs.h <<_ACEOF
6850#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
6851_ACEOF
6852;;
6853esac
6854rm -rf conftest*
6855 if test $ac_cv_sys_file_offset_bits = unknown; then
6856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
6857$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
a9bec17c 6858if test "${ac_cv_sys_large_files+set}" = set; then :
369e19fc
PE
6859 $as_echo_n "(cached) " >&6
6860else
6861 while :; do
6862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6863/* end confdefs.h. */
6864#include <sys/types.h>
6865 /* Check that off_t can represent 2**63 - 1 correctly.
6866 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6867 since some C++ compilers masquerading as C compilers
6868 incorrectly reject 9223372036854775807. */
6869#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6870 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6871 && LARGE_OFF_T % 2147483647 == 1)
6872 ? 1 : -1];
6873int
6874main ()
6875{
6876
6877 ;
6878 return 0;
6879}
6880_ACEOF
6881if ac_fn_c_try_compile "$LINENO"; then :
6882 ac_cv_sys_large_files=no; break
6883fi
6884rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6886/* end confdefs.h. */
6887#define _LARGE_FILES 1
6888#include <sys/types.h>
6889 /* Check that off_t can represent 2**63 - 1 correctly.
6890 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6891 since some C++ compilers masquerading as C compilers
6892 incorrectly reject 9223372036854775807. */
6893#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6894 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6895 && LARGE_OFF_T % 2147483647 == 1)
6896 ? 1 : -1];
067d23c9
KY
6897int
6898main ()
6899{
6900
6901 ;
6902 return 0;
6903}
6904_ACEOF
6905if ac_fn_c_try_compile "$LINENO"; then :
369e19fc 6906 ac_cv_sys_large_files=1; break
067d23c9
KY
6907fi
6908rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
369e19fc
PE
6909 ac_cv_sys_large_files=unknown
6910 break
6911done
067d23c9 6912fi
369e19fc
PE
6913{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
6914$as_echo "$ac_cv_sys_large_files" >&6; }
6915case $ac_cv_sys_large_files in #(
6916 no | unknown) ;;
6917 *)
6918cat >>confdefs.h <<_ACEOF
6919#define _LARGE_FILES $ac_cv_sys_large_files
6920_ACEOF
6921;;
6922esac
6923rm -rf conftest*
6924 fi
1fd182f0
PE
6925
6926
858c7150
GM
6927$as_echo "#define _DARWIN_USE_64_BIT_INODE 1" >>confdefs.h
6928
369e19fc 6929fi
1fd182f0 6930
6d153f56
GM
6931 case $ac_cv_prog_cc_stdc in #(
6932 no) :
6933 ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; #(
6934 *) :
6935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
6936$as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
a9bec17c 6937if test "${ac_cv_prog_cc_c99+set}" = set; then :
6d153f56
GM
6938 $as_echo_n "(cached) " >&6
6939else
6940 ac_cv_prog_cc_c99=no
6941ac_save_CC=$CC
6942cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6943/* end confdefs.h. */
6944#include <stdarg.h>
6945#include <stdbool.h>
6946#include <stdlib.h>
6947#include <wchar.h>
6948#include <stdio.h>
6949
6950// Check varargs macros. These examples are taken from C99 6.10.3.5.
6951#define debug(...) fprintf (stderr, __VA_ARGS__)
6952#define showlist(...) puts (#__VA_ARGS__)
6953#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
6954static void
6955test_varargs_macros (void)
6956{
6957 int x = 1234;
6958 int y = 5678;
6959 debug ("Flag");
6960 debug ("X = %d\n", x);
6961 showlist (The first, second, and third items.);
6962 report (x>y, "x is %d but y is %d", x, y);
6963}
6964
6965// Check long long types.
6966#define BIG64 18446744073709551615ull
6967#define BIG32 4294967295ul
6968#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
6969#if !BIG_OK
6970 your preprocessor is broken;
6971#endif
6972#if BIG_OK
6973#else
6974 your preprocessor is broken;
6975#endif
6976static long long int bignum = -9223372036854775807LL;
6977static unsigned long long int ubignum = BIG64;
6978
6979struct incomplete_array
6980{
6981 int datasize;
6982 double data[];
6983};
6984
6985struct named_init {
6986 int number;
6987 const wchar_t *name;
6988 double average;
6989};
6990
6991typedef const char *ccp;
6992
6993static inline int
6994test_restrict (ccp restrict text)
6995{
6996 // See if C++-style comments work.
6997 // Iterate through items via the restricted pointer.
6998 // Also check for declarations in for loops.
6999 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
7000 continue;
7001 return 0;
7002}
7003
7004// Check varargs and va_copy.
7005static void
7006test_varargs (const char *format, ...)
7007{
7008 va_list args;
7009 va_start (args, format);
7010 va_list args_copy;
7011 va_copy (args_copy, args);
7012
7013 const char *str;
7014 int number;
7015 float fnumber;
7016
7017 while (*format)
7018 {
7019 switch (*format++)
7020 {
7021 case 's': // string
7022 str = va_arg (args_copy, const char *);
7023 break;
7024 case 'd': // int
7025 number = va_arg (args_copy, int);
7026 break;
7027 case 'f': // float
7028 fnumber = va_arg (args_copy, double);
7029 break;
7030 default:
7031 break;
7032 }
7033 }
7034 va_end (args_copy);
7035 va_end (args);
7036}
7037
7038int
7039main ()
7040{
7041
7042 // Check bool.
7043 _Bool success = false;
7044
7045 // Check restrict.
7046 if (test_restrict ("String literal") == 0)
7047 success = true;
7048 char *restrict newvar = "Another string";
7049
7050 // Check varargs.
7051 test_varargs ("s, d' f .", "string", 65, 34.234);
7052 test_varargs_macros ();
7053
7054 // Check flexible array members.
7055 struct incomplete_array *ia =
7056 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
7057 ia->datasize = 10;
7058 for (int i = 0; i < ia->datasize; ++i)
7059 ia->data[i] = i * 1.234;
7060
7061 // Check named initializers.
7062 struct named_init ni = {
7063 .number = 34,
7064 .name = L"Test wide string",
7065 .average = 543.34343,
7066 };
7067
7068 ni.number = 58;
7069
7070 int dynamic_array[ni.number];
7071 dynamic_array[ni.number - 1] = 543;
7072
7073 // work around unused variable warnings
7074 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
7075 || dynamic_array[ni.number - 1] != 543);
7076
7077 ;
7078 return 0;
7079}
7080_ACEOF
7081for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99
7082do
7083 CC="$ac_save_CC $ac_arg"
7084 if ac_fn_c_try_compile "$LINENO"; then :
7085 ac_cv_prog_cc_c99=$ac_arg
7086fi
7087rm -f core conftest.err conftest.$ac_objext
7088 test "x$ac_cv_prog_cc_c99" != "xno" && break
7089done
7090rm -f conftest.$ac_ext
7091CC=$ac_save_CC
7092
7093fi
7094# AC_CACHE_VAL
7095case "x$ac_cv_prog_cc_c99" in
7096 x)
7097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
7098$as_echo "none needed" >&6; } ;;
7099 xno)
7100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
7101$as_echo "unsupported" >&6; } ;;
7102 *)
7103 CC="$CC $ac_cv_prog_cc_c99"
7104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
7105$as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
7106esac
7107if test "x$ac_cv_prog_cc_c99" != xno; then :
7108 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
7109else
7110 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
7111$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
a9bec17c 7112if test "${ac_cv_prog_cc_c89+set}" = set; then :
6d153f56
GM
7113 $as_echo_n "(cached) " >&6
7114else
7115 ac_cv_prog_cc_c89=no
7116ac_save_CC=$CC
7117cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7118/* end confdefs.h. */
7119#include <stdarg.h>
7120#include <stdio.h>
7121#include <sys/types.h>
7122#include <sys/stat.h>
7123/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
7124struct buf { int x; };
7125FILE * (*rcsopen) (struct buf *, struct stat *, int);
7126static char *e (p, i)
7127 char **p;
7128 int i;
7129{
7130 return p[i];
7131}
7132static char *f (char * (*g) (char **, int), char **p, ...)
7133{
7134 char *s;
7135 va_list v;
7136 va_start (v,p);
7137 s = g (p, va_arg (v,int));
7138 va_end (v);
7139 return s;
7140}
7141
7142/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
7143 function prototypes and stuff, but not '\xHH' hex character constants.
7144 These don't provoke an error unfortunately, instead are silently treated
7145 as 'x'. The following induces an error, until -std is added to get
7146 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
7147 array size at least. It's necessary to write '\x00'==0 to get something
7148 that's true only with -std. */
7149int osf4_cc_array ['\x00' == 0 ? 1 : -1];
7150
7151/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
7152 inside strings and character constants. */
7153#define FOO(x) 'x'
7154int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
7155
7156int test (int i, double x);
7157struct s1 {int (*f) (int a);};
7158struct s2 {int (*f) (double a);};
7159int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
7160int argc;
7161char **argv;
7162int
7163main ()
7164{
7165return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
7166 ;
7167 return 0;
7168}
7169_ACEOF
7170for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
7171 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
7172do
7173 CC="$ac_save_CC $ac_arg"
7174 if ac_fn_c_try_compile "$LINENO"; then :
7175 ac_cv_prog_cc_c89=$ac_arg
7176fi
7177rm -f core conftest.err conftest.$ac_objext
7178 test "x$ac_cv_prog_cc_c89" != "xno" && break
7179done
7180rm -f conftest.$ac_ext
7181CC=$ac_save_CC
7182
7183fi
7184# AC_CACHE_VAL
7185case "x$ac_cv_prog_cc_c89" in
7186 x)
7187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
7188$as_echo "none needed" >&6; } ;;
7189 xno)
7190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
7191$as_echo "unsupported" >&6; } ;;
7192 *)
7193 CC="$CC $ac_cv_prog_cc_c89"
7194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
7195$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
7196esac
7197if test "x$ac_cv_prog_cc_c89" != xno; then :
7198 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
7199else
7200 ac_cv_prog_cc_stdc=no
7201fi
7202
7203fi
7204 ;;
7205esac
7206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5
7207$as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; }
a9bec17c 7208 if test "${ac_cv_prog_cc_stdc+set}" = set; then :
6d153f56
GM
7209 $as_echo_n "(cached) " >&6
7210fi
7211
7212 case $ac_cv_prog_cc_stdc in #(
7213 no) :
7214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
7215$as_echo "unsupported" >&6; } ;; #(
7216 '') :
7217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
7218$as_echo "none needed" >&6; } ;; #(
7219 *) :
7220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_stdc" >&5
7221$as_echo "$ac_cv_prog_cc_stdc" >&6; } ;;
7222esac
7223
1fd182f0
PE
7224
7225
4fc2b746 7226 # Code from module alloca-opt:
8d8af66d 7227 # Code from module allocator:
d7ad186c 7228 # Code from module at-internal:
938a4ef9
GM
7229 # Code from module c-ctype:
7230 # Code from module c-strcase:
6c051bab 7231 # Code from module careadlinkat:
f199cab1 7232 # Code from module clock-time:
3bf26e96 7233 # Code from module close-stream:
942f733f 7234 # Code from module crypto/md5:
40e27e7f 7235 # Code from module crypto/sha1:
d87ffdb7
GM
7236 # Code from module crypto/sha256:
7237 # Code from module crypto/sha512:
d7ad186c 7238 # Code from module dirent:
36f13e16 7239 # Code from module dosname:
f737437b 7240 # Code from module dtoastr:
f199cab1 7241 # Code from module dtotimespec:
7d2a1c5e 7242 # Code from module dup2:
93131e11 7243 # Code from module environ:
3a019ab4 7244 # Code from module errno:
710f5812 7245 # Code from module euidaccess:
8966cbff 7246 # Code from module execinfo:
1fd182f0
PE
7247 # Code from module extensions:
7248
7cd2ed2c 7249 # Code from module extern-inline:
710f5812
GM
7250 # Code from module faccessat:
7251 # Code from module fcntl-h:
2407788f 7252 # Code from module fdatasync:
d7ad186c 7253 # Code from module fdopendir:
5fa4ac76 7254 # Code from module filemode:
3bf26e96 7255 # Code from module fpending:
d7ad186c 7256 # Code from module fstatat:
2407788f 7257 # Code from module fsync:
710f5812 7258 # Code from module getgroups:
1f5d53eb 7259 # Code from module getloadavg:
e275c824
PE
7260 # Code from module getopt-gnu:
7261 # Code from module getopt-posix:
7262 # Code from module gettext-h:
f199cab1
GM
7263 # Code from module gettime:
7264 # Code from module gettimeofday:
710f5812 7265 # Code from module group-member:
67342916 7266 # Code from module ignore-value:
1fd182f0
PE
7267 # Code from module include_next:
7268 # Code from module intprops:
4fda9c95 7269 # Code from module inttypes-incomplete:
369e19fc
PE
7270 # Code from module largefile:
7271
ae0d7250 7272 # Code from module lstat:
ac1ca7e9 7273 # Code from module manywarnings:
283c7aed 7274 # Code from module memrchr:
1fd182f0
PE
7275 # Code from module mktime:
7276 # Code from module multiarch:
369e19fc 7277 # Code from module nocrash:
d7ad186c 7278 # Code from module openat-h:
a0a61e58 7279 # Code from module pathmax:
f199cab1 7280 # Code from module pselect:
3e0be4ab 7281 # Code from module pthread_sigmask:
b5591ebb 7282 # Code from module putenv:
3a019ab4 7283 # Code from module qacl:
ae0d7250 7284 # Code from module readlink:
d7ad186c 7285 # Code from module readlinkat:
710f5812 7286 # Code from module root-uid:
e4184a20 7287 # Code from module sig2str:
2b1928b8 7288 # Code from module signal-h:
369e19fc
PE
7289 # Code from module snippet/_Noreturn:
7290 # Code from module snippet/arg-nonnull:
7291 # Code from module snippet/c++defs:
7292 # Code from module snippet/warn-on-use:
6ad6792b 7293 # Code from module socklen:
6c051bab 7294 # Code from module ssize_t:
ae0d7250 7295 # Code from module stat:
f199cab1 7296 # Code from module stat-time:
0eb775a3 7297 # Code from module stdalign:
6d153f56
GM
7298 # Code from module stdarg:
7299
8c069cc7
GM
7300
7301
16c3e636 7302 # Code from module stdbool:
1fd182f0 7303 # Code from module stddef:
5f90be1b 7304 # Code from module stdint:
6ad6792b 7305 # Code from module stdio:
1f5d53eb 7306 # Code from module stdlib:
16c3e636 7307 # Code from module strftime:
283c7aed 7308 # Code from module string:
3e0be4ab
GM
7309 # Code from module strtoimax:
7310 # Code from module strtoll:
4fda9c95
GM
7311 # Code from module strtoull:
7312 # Code from module strtoumax:
ae0d7250 7313 # Code from module symlink:
f199cab1 7314 # Code from module sys_select:
5fa4ac76 7315 # Code from module sys_stat:
f199cab1 7316 # Code from module sys_time:
1fd182f0
PE
7317 # Code from module time:
7318 # Code from module time_r:
f077f61d 7319 # Code from module timer-time:
f199cab1
GM
7320 # Code from module timespec:
7321 # Code from module timespec-add:
7322 # Code from module timespec-sub:
d87ffdb7 7323 # Code from module u64:
e275c824 7324 # Code from module unistd:
b5591ebb 7325 # Code from module unsetenv:
f199cab1 7326 # Code from module utimens:
4fda9c95 7327 # Code from module verify:
ac1ca7e9 7328 # Code from module warnings:
710f5812 7329 # Code from module xalloc-oversized:
1fd182f0
PE
7330
7331
6bd1cda5 7332if test "$ac_test_CFLAGS" != set; then
8beecaed
GM
7333 # It's helpful to have C macros available to GDB, so prefer -g3 to -g
7334 # if -g3 works and the user does not specify CFLAGS.
7335 # This test must follow gl_EARLY; otherwise AC_LINK_IFELSE complains.
6bd1cda5
GM
7336 case $CFLAGS in
7337 '-g')
7338 emacs_g3_CFLAGS='-g3';;
7339 '-g -O2')
7340 emacs_g3_CFLAGS='-g3 -O2';;
7341 *)
7342 emacs_g3_CFLAGS='';;
7343 esac
7344 if test -n "$emacs_g3_CFLAGS"; then
7345 emacs_save_CFLAGS=$CFLAGS
7346 CFLAGS=$emacs_g3_CFLAGS
7347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts $emacs_g3_CFLAGS" >&5
7348$as_echo_n "checking whether $CC accepts $emacs_g3_CFLAGS... " >&6; }
7349if test "${emacs_cv_prog_cc_g3+set}" = set; then :
7350 $as_echo_n "(cached) " >&6
7351else
7352 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7353/* end confdefs.h. */
7354
7355int
7356main ()
7357{
7358
7359 ;
7360 return 0;
7361}
7362_ACEOF
7363if ac_fn_c_try_link "$LINENO"; then :
7364 emacs_cv_prog_cc_g3=yes
7365else
7366 emacs_cv_prog_cc_g3=no
7367fi
7368rm -f core conftest.err conftest.$ac_objext \
7369 conftest$ac_exeext conftest.$ac_ext
7370fi
7371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_prog_cc_g3" >&5
7372$as_echo "$emacs_cv_prog_cc_g3" >&6; }
8beecaed 7373 if test $emacs_cv_prog_cc_g3 != yes; then
6bd1cda5
GM
7374 CFLAGS=$emacs_save_CFLAGS
7375 fi
7c61eaab
GM
7376 if test $opsys = mingw32; then
7377 CFLAGS="$CFLAGS -gdwarf-2"
7378 fi
6bd1cda5 7379 fi
8beecaed
GM
7380
7381 case $CFLAGS in
7382 *-O*) ;;
7383 *)
7384 # No optimization flag was inferred for this non-GCC compiler.
7385 # Try -O. This is needed for xlc on AIX; see Bug#14258.
7386 emacs_save_CFLAGS=$CFLAGS
7387 test -z "$CFLAGS" || CFLAGS="$CFLAGS "
7388 CFLAGS=${CFLAGS}-O
7389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -O" >&5
7390$as_echo_n "checking whether $CC accepts -O... " >&6; }
7391if test "${emacs_cv_prog_cc_o+set}" = set; then :
7392 $as_echo_n "(cached) " >&6
7393else
7394 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7395/* end confdefs.h. */
7396
7397int
7398main ()
7399{
7400
7401 ;
7402 return 0;
7403}
7404_ACEOF
7405if ac_fn_c_try_link "$LINENO"; then :
7406 emacs_cv_prog_cc_o=yes
7407else
7408 emacs_cv_prog_cc_o=no
7409fi
7410rm -f core conftest.err conftest.$ac_objext \
7411 conftest$ac_exeext conftest.$ac_ext
7412fi
7413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_prog_cc_o" >&5
7414$as_echo "$emacs_cv_prog_cc_o" >&6; }
7415 if test $emacs_cv_prog_cc_o != yes; then
7416 CFLAGS=$emacs_save_CFLAGS
7417 fi ;;
7418 esac
6bd1cda5
GM
7419fi
7420
a6b92a4a
GM
7421# Check whether --enable-gcc-warnings was given.
7422if test "${enable_gcc_warnings+set}" = set; then :
7423 enableval=$enable_gcc_warnings; case $enableval in
7424 yes|no) ;;
7425 *) as_fn_error "bad value $enableval for gcc-warnings option" "$LINENO" 5 ;;
7426 esac
7427 gl_gcc_warnings=$enableval
7428else
7429 gl_gcc_warnings=no
7430
7431fi
7432
7433
e4d35030
GM
7434# Check whether --enable-link-time-optimization was given.
7435if test "${enable_link_time_optimization+set}" = set; then :
7436 enableval=$enable_link_time_optimization; if test "${enableval}" != "no"; then
7437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether link-time optimization is supported" >&5
7438$as_echo_n "checking whether link-time optimization is supported... " >&6; }
7439 ac_lto_supported=no
7440 if test x$GCC = xyes; then
7441 CPUS=`getconf _NPROCESSORS_ONLN 2>/dev/null`
7442 if test x$CPUS != x; then
7443 LTO="-flto=$CPUS"
7444 else
7445 LTO="-flto"
7446 fi
7447 old_CFLAGS=$CFLAGS
7448 CFLAGS="$CFLAGS $LTO"
7449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7450/* end confdefs.h. */
7451
7452int
7453main ()
7454{
7455
7456 ;
7457 return 0;
7458}
7459_ACEOF
7460if ac_fn_c_try_compile "$LINENO"; then :
7461 ac_lto_supported=yes
7462else
7463 ac_lto_supported=no
7464fi
7465rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7466 CFLAGS="$old_CFLAGS"
7467 fi
7468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_lto_supported" >&5
7469$as_echo "$ac_lto_supported" >&6; }
7470 if test "$ac_lto_supported" = "yes"; then
7471 CFLAGS="$CFLAGS $LTO"
7472 fi
7473fi
7474fi
7475
7476
a6b92a4a
GM
7477# gl_GCC_VERSION_IFELSE([major], [minor], [run-if-found], [run-if-not-found])
7478# ------------------------------------------------
7479# If $CPP is gcc-MAJOR.MINOR or newer, then run RUN-IF-FOUND.
7480# Otherwise, run RUN-IF-NOT-FOUND.
7481
7482
7483# When compiling with GCC, prefer -isystem to -I when including system
7484# include files, to avoid generating useless diagnostics for the files.
7485if test "$gl_gcc_warnings" != yes; then
7486 isystem='-I'
7487else
7488 isystem='-isystem '
7489
7490 # This, $nw, is the list of warnings we disable.
7491 nw=
7492
7493 case $with_x_toolkit in
7494 lucid | athena | motif)
7495 # Old toolkits mishandle 'const'.
7496 nw="$nw -Wwrite-strings"
7497 ;;
7498 *)
dcfda130
GM
7499 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror -Wunknown-warning-option" >&5
7500$as_echo_n "checking whether C compiler handles -Werror -Wunknown-warning-option... " >&6; }
7501if test "${gl_cv_warn_c__Werror__Wunknown_warning_option+set}" = set; then :
7502 $as_echo_n "(cached) " >&6
7503else
7504
7505 gl_save_compiler_FLAGS="$CFLAGS"
7506 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror -Wunknown-warning-option"
7507 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7508/* end confdefs.h. */
7509
7510int
7511main ()
7512{
7513
7514 ;
7515 return 0;
7516}
7517_ACEOF
7518if ac_fn_c_try_compile "$LINENO"; then :
7519 gl_cv_warn_c__Werror__Wunknown_warning_option=yes
7520else
7521 gl_cv_warn_c__Werror__Wunknown_warning_option=no
7522fi
7523rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7524 CFLAGS="$gl_save_compiler_FLAGS"
7525
7526fi
7527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror__Wunknown_warning_option" >&5
7528$as_echo "$gl_cv_warn_c__Werror__Wunknown_warning_option" >&6; }
7529if test "x$gl_cv_warn_c__Werror__Wunknown_warning_option" = x""yes; then :
7530 gl_unknown_warnings_are_errors='-Wunknown-warning-option -Werror'
7531else
7532 gl_unknown_warnings_are_errors=
7533fi
7534
7535
7536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror" >&5
a6b92a4a
GM
7537$as_echo_n "checking whether C compiler handles -Werror... " >&6; }
7538if test "${gl_cv_warn_c__Werror+set}" = set; then :
7539 $as_echo_n "(cached) " >&6
7540else
7541
7542 gl_save_compiler_FLAGS="$CFLAGS"
dcfda130 7543 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror"
a6b92a4a 7544 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
7545/* end confdefs.h. */
7546
7547int
7548main ()
7549{
7550
7551 ;
7552 return 0;
7553}
7554_ACEOF
7555if ac_fn_c_try_compile "$LINENO"; then :
a6b92a4a 7556 gl_cv_warn_c__Werror=yes
067d23c9 7557else
a6b92a4a 7558 gl_cv_warn_c__Werror=no
067d23c9
KY
7559fi
7560rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a6b92a4a
GM
7561 CFLAGS="$gl_save_compiler_FLAGS"
7562
7563fi
7564{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror" >&5
7565$as_echo "$gl_cv_warn_c__Werror" >&6; }
7566if test "x$gl_cv_warn_c__Werror" = x""yes; then :
7567 as_fn_append WERROR_CFLAGS " -Werror"
7568fi
7569
0eb775a3 7570
a6b92a4a
GM
7571 ;;
7572 esac
7573
7574
a6b92a4a 7575 nw="$nw -Wsystem-headers" # Don't let system headers trigger warnings
a6b92a4a 7576 nw="$nw -Woverlength-strings" # Not a problem these days
a6b92a4a 7577 nw="$nw -Wlogical-op" # any use of fwrite provokes this
fd9d2a9d 7578 nw="$nw -Wformat-nonliteral" # we do this a lot
a6b92a4a
GM
7579 nw="$nw -Wvla" # warnings in gettext.h
7580 nw="$nw -Wnested-externs" # use of XARGMATCH/verify_function__
a6b92a4a 7581 nw="$nw -Wswitch-default" # Too many warnings for now
fd9d2a9d 7582 nw="$nw -Winline" # OK to ignore 'inline'
6ec9a5a7 7583 nw="$nw -Wjump-misses-init" # We sometimes safely jump over init.
da8ed5ba
GM
7584 nw="$nw -Wstrict-overflow" # OK to optimize assuming that
7585 # signed overflow has undefined behavior
fd9d2a9d
GM
7586 nw="$nw -Wsync-nand" # irrelevant here, and provokes ObjC warning
7587 nw="$nw -Wunsafe-loop-optimizations" # OK to suppress unsafe optimizations
372c83ba 7588 nw="$nw -Wbad-function-cast" # These casts are no worse than others.
a6b92a4a
GM
7589
7590 # Emacs doesn't care about shadowing; see
7591 # <http://lists.gnu.org/archive/html/emacs-diffs/2011-11/msg00265.html>.
7592 nw="$nw -Wshadow"
7593
ad33cb00
GM
7594 # Emacs's use of alloca inhibits protecting the stack.
7595 nw="$nw -Wstack-protector"
7596
da8ed5ba 7597 # The following line should be removable at some point.
a6b92a4a
GM
7598 nw="$nw -Wsuggest-attribute=pure"
7599
c081121f
GM
7600 # clang is unduly picky about some things.
7601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler is clang" >&5
7602$as_echo_n "checking whether the compiler is clang... " >&6; }
7603if test "${emacs_cv_clang+set}" = set; then :
7604 $as_echo_n "(cached) " >&6
7605else
7606 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7607/* end confdefs.h. */
7608
7609 #ifndef __clang__
7610 #error "not clang"
7611 #endif
7612
7613int
7614main ()
7615{
7616
7617 ;
7618 return 0;
7619}
7620_ACEOF
7621if ac_fn_c_try_compile "$LINENO"; then :
7622 emacs_cv_clang=yes
7623else
7624 emacs_cv_clang=no
7625fi
7626rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7627fi
7628{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_clang" >&5
7629$as_echo "$emacs_cv_clang" >&6; }
7630 if test $emacs_cv_clang = yes; then
7631 nw="$nw -Wcast-align"
7632 fi
7633
a6b92a4a
GM
7634
7635
7636 if test -n "$GCC"; then
7637
7638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is supported" >&5
7639$as_echo_n "checking whether -Wno-missing-field-initializers is supported... " >&6; }
7640 if test "${gl_cv_cc_nomfi_supported+set}" = set; then :
7641 $as_echo_n "(cached) " >&6
7642else
7643
7644 gl_save_CFLAGS="$CFLAGS"
7645 CFLAGS="$CFLAGS -W -Werror -Wno-missing-field-initializers"
7646 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
7647/* end confdefs.h. */
7648
7649int
7650main ()
7651{
7652
7653 ;
7654 return 0;
7655}
7656_ACEOF
7657if ac_fn_c_try_compile "$LINENO"; then :
a6b92a4a 7658 gl_cv_cc_nomfi_supported=yes
067d23c9 7659else
a6b92a4a 7660 gl_cv_cc_nomfi_supported=no
067d23c9
KY
7661fi
7662rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a6b92a4a
GM
7663 CFLAGS="$gl_save_CFLAGS"
7664fi
7665
7666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_supported" >&5
7667$as_echo "$gl_cv_cc_nomfi_supported" >&6; }
7668
7669 if test "$gl_cv_cc_nomfi_supported" = yes; then
7670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is needed" >&5
7671$as_echo_n "checking whether -Wno-missing-field-initializers is needed... " >&6; }
7672 if test "${gl_cv_cc_nomfi_needed+set}" = set; then :
7673 $as_echo_n "(cached) " >&6
7674else
7675
7676 gl_save_CFLAGS="$CFLAGS"
7677 CFLAGS="$CFLAGS -W -Werror"
7678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7679/* end confdefs.h. */
7680void f (void)
7681 {
7682 typedef struct { int a; int b; } s_t;
7683 s_t s1 = { 0, };
7684 }
7685
7686int
7687main ()
7688{
7689
7690 ;
7691 return 0;
7692}
7693_ACEOF
7694if ac_fn_c_try_compile "$LINENO"; then :
7695 gl_cv_cc_nomfi_needed=no
7696else
7697 gl_cv_cc_nomfi_needed=yes
7698fi
7699rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7700 CFLAGS="$gl_save_CFLAGS"
7701
7702fi
7703
7704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_needed" >&5
7705$as_echo "$gl_cv_cc_nomfi_needed" >&6; }
7706 fi
b6c9d18d
GM
7707
7708 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wuninitialized is supported" >&5
7709$as_echo_n "checking whether -Wuninitialized is supported... " >&6; }
7710 if test "${gl_cv_cc_uninitialized_supported+set}" = set; then :
7711 $as_echo_n "(cached) " >&6
7712else
7713
7714 gl_save_CFLAGS="$CFLAGS"
7715 CFLAGS="$CFLAGS -Werror -Wuninitialized"
7716 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7717/* end confdefs.h. */
7718
7719int
7720main ()
7721{
7722
7723 ;
7724 return 0;
7725}
7726_ACEOF
7727if ac_fn_c_try_compile "$LINENO"; then :
7728 gl_cv_cc_uninitialized_supported=yes
7729else
7730 gl_cv_cc_uninitialized_supported=no
7731fi
7732rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7733 CFLAGS="$gl_save_CFLAGS"
7734fi
7735
7736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_uninitialized_supported" >&5
7737$as_echo "$gl_cv_cc_uninitialized_supported" >&6; }
7738
a6b92a4a
GM
7739 fi
7740
b6c9d18d 7741 # List all gcc warning categories.
a6b92a4a
GM
7742 gl_manywarn_set=
7743 for gl_manywarn_item in \
a6b92a4a 7744 -W \
dcde497f
GM
7745 -Wabi \
7746 -Waddress \
dcfda130 7747 -Waggressive-loop-optimizations \
dcde497f
GM
7748 -Wall \
7749 -Warray-bounds \
7750 -Wattributes \
a6b92a4a 7751 -Wbad-function-cast \
a6b92a4a 7752 -Wbuiltin-macro-redefined \
dcde497f
GM
7753 -Wcast-align \
7754 -Wchar-subscripts \
7755 -Wclobbered \
7756 -Wcomment \
7757 -Wcomments \
a6b92a4a 7758 -Wcoverage-mismatch \
a6b92a4a
GM
7759 -Wcpp \
7760 -Wdeprecated \
7761 -Wdeprecated-declarations \
dcde497f 7762 -Wdisabled-optimization \
a6b92a4a
GM
7763 -Wdiv-by-zero \
7764 -Wdouble-promotion \
dcde497f 7765 -Wempty-body \
a6b92a4a 7766 -Wendif-labels \
dcde497f 7767 -Wenum-compare \
a6b92a4a
GM
7768 -Wextra \
7769 -Wformat-contains-nul \
7770 -Wformat-extra-args \
dcde497f
GM
7771 -Wformat-nonliteral \
7772 -Wformat-security \
7773 -Wformat-y2k \
a6b92a4a 7774 -Wformat-zero-length \
dcde497f
GM
7775 -Wfree-nonheap-object \
7776 -Wignored-qualifiers \
7777 -Wimplicit \
7778 -Wimplicit-function-declaration \
7779 -Wimplicit-int \
7780 -Winit-self \
7781 -Winline \
7782 -Wint-to-pointer-cast \
7783 -Winvalid-memory-model \
7784 -Winvalid-pch \
7785 -Wjump-misses-init \
7786 -Wlogical-op \
7787 -Wmain \
7788 -Wmaybe-uninitialized \
7789 -Wmissing-braces \
7790 -Wmissing-declarations \
7791 -Wmissing-field-initializers \
dcde497f 7792 -Wmissing-include-dirs \
dcde497f
GM
7793 -Wmissing-parameter-type \
7794 -Wmissing-prototypes \
7795 -Wmudflap \
a6b92a4a 7796 -Wmultichar \
dcde497f
GM
7797 -Wnarrowing \
7798 -Wnested-externs \
7799 -Wnonnull \
a6b92a4a 7800 -Wnormalized=nfc \
dcde497f
GM
7801 -Wold-style-declaration \
7802 -Wold-style-definition \
a6b92a4a 7803 -Woverflow \
dcde497f
GM
7804 -Woverlength-strings \
7805 -Woverride-init \
7806 -Wpacked \
7807 -Wpacked-bitfield-compat \
7808 -Wparentheses \
7809 -Wpointer-arith \
7810 -Wpointer-sign \
a6b92a4a
GM
7811 -Wpointer-to-int-cast \
7812 -Wpragmas \
dcfda130 7813 -Wreturn-local-addr \
dcde497f
GM
7814 -Wreturn-type \
7815 -Wsequence-point \
7816 -Wshadow \
7817 -Wsizeof-pointer-memaccess \
7818 -Wstack-protector \
7819 -Wstrict-aliasing \
7820 -Wstrict-overflow \
7821 -Wstrict-prototypes \
a6b92a4a 7822 -Wsuggest-attribute=const \
dcde497f 7823 -Wsuggest-attribute=format \
a6b92a4a
GM
7824 -Wsuggest-attribute=noreturn \
7825 -Wsuggest-attribute=pure \
dcde497f
GM
7826 -Wswitch \
7827 -Wswitch-default \
7828 -Wsync-nand \
7829 -Wsystem-headers \
a6b92a4a 7830 -Wtrampolines \
dcde497f
GM
7831 -Wtrigraphs \
7832 -Wtype-limits \
7833 -Wuninitialized \
7834 -Wunknown-pragmas \
dcde497f
GM
7835 -Wunsafe-loop-optimizations \
7836 -Wunused \
7837 -Wunused-but-set-parameter \
7838 -Wunused-but-set-variable \
7839 -Wunused-function \
7840 -Wunused-label \
7841 -Wunused-local-typedefs \
7842 -Wunused-macros \
7843 -Wunused-parameter \
7844 -Wunused-result \
7845 -Wunused-value \
7846 -Wunused-variable \
7847 -Wvarargs \
7848 -Wvariadic-macros \
7849 -Wvector-operation-performance \
7850 -Wvla \
7851 -Wvolatile-register-var \
7852 -Wwrite-strings \
7853 \
a6b92a4a
GM
7854 ; do
7855 gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
7856 done
7857
b6c9d18d 7858 # Disable specific options as needed.
a6b92a4a
GM
7859 if test "$gl_cv_cc_nomfi_needed" = yes; then
7860 gl_manywarn_set="$gl_manywarn_set -Wno-missing-field-initializers"
7861 fi
7862
b6c9d18d
GM
7863 if test "$gl_cv_cc_uninitialized_supported" = no; then
7864 gl_manywarn_set="$gl_manywarn_set -Wno-uninitialized"
7865 fi
7866
a6b92a4a
GM
7867 ws=$gl_manywarn_set
7868
7869
7870 gl_warn_set=
7871 set x $ws; shift
7872 for gl_warn_item
7873 do
7874 case " $nw " in
7875 *" $gl_warn_item "*)
7876 ;;
7877 *)
7878 gl_warn_set="$gl_warn_set $gl_warn_item"
7879 ;;
7880 esac
7881 done
7882 ws=$gl_warn_set
7883
7884 for w in $ws; do
dcfda130
GM
7885
7886as_gl_Warn=`$as_echo "gl_cv_warn_c_$w" | $as_tr_sh`
a6b92a4a
GM
7887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles $w" >&5
7888$as_echo_n "checking whether C compiler handles $w... " >&6; }
7889if { as_var=$as_gl_Warn; eval "test \"\${$as_var+set}\" = set"; }; then :
7890 $as_echo_n "(cached) " >&6
7891else
7892
7893 gl_save_compiler_FLAGS="$CFLAGS"
dcfda130 7894 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors $w"
a6b92a4a
GM
7895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7896/* end confdefs.h. */
7897
7898int
7899main ()
7900{
7901
7902 ;
7903 return 0;
7904}
7905_ACEOF
7906if ac_fn_c_try_compile "$LINENO"; then :
7907 eval "$as_gl_Warn=yes"
7908else
7909 eval "$as_gl_Warn=no"
7910fi
7911rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7912 CFLAGS="$gl_save_compiler_FLAGS"
7913
7914fi
7915eval ac_res=\$$as_gl_Warn
7916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7917$as_echo "$ac_res" >&6; }
7918eval as_val=\$$as_gl_Warn
7919 if test "x$as_val" = x""yes; then :
7920 as_fn_append WARN_CFLAGS " $w"
7921fi
7922
0eb775a3 7923
a6b92a4a 7924 done
dcfda130
GM
7925
7926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-missing-field-initializers" >&5
a6b92a4a
GM
7927$as_echo_n "checking whether C compiler handles -Wno-missing-field-initializers... " >&6; }
7928if test "${gl_cv_warn_c__Wno_missing_field_initializers+set}" = set; then :
7929 $as_echo_n "(cached) " >&6
7930else
7931
7932 gl_save_compiler_FLAGS="$CFLAGS"
dcfda130 7933 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-missing-field-initializers"
a6b92a4a
GM
7934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7935/* end confdefs.h. */
7936
7937int
7938main ()
7939{
7940
7941 ;
7942 return 0;
7943}
7944_ACEOF
7945if ac_fn_c_try_compile "$LINENO"; then :
7946 gl_cv_warn_c__Wno_missing_field_initializers=yes
7947else
7948 gl_cv_warn_c__Wno_missing_field_initializers=no
7949fi
7950rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7951 CFLAGS="$gl_save_compiler_FLAGS"
7952
7953fi
7954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_missing_field_initializers" >&5
7955$as_echo "$gl_cv_warn_c__Wno_missing_field_initializers" >&6; }
7956if test "x$gl_cv_warn_c__Wno_missing_field_initializers" = x""yes; then :
7957 as_fn_append WARN_CFLAGS " -Wno-missing-field-initializers"
7958fi
0eb775a3 7959
a6b92a4a 7960 # We need this one
dcfda130
GM
7961
7962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-sign-compare" >&5
a6b92a4a
GM
7963$as_echo_n "checking whether C compiler handles -Wno-sign-compare... " >&6; }
7964if test "${gl_cv_warn_c__Wno_sign_compare+set}" = set; then :
7965 $as_echo_n "(cached) " >&6
7966else
7967
7968 gl_save_compiler_FLAGS="$CFLAGS"
dcfda130 7969 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-sign-compare"
a6b92a4a
GM
7970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7971/* end confdefs.h. */
7972
7973int
7974main ()
7975{
7976
7977 ;
7978 return 0;
7979}
7980_ACEOF
7981if ac_fn_c_try_compile "$LINENO"; then :
7982 gl_cv_warn_c__Wno_sign_compare=yes
7983else
7984 gl_cv_warn_c__Wno_sign_compare=no
7985fi
7986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7987 CFLAGS="$gl_save_compiler_FLAGS"
7988
7989fi
7990{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_sign_compare" >&5
7991$as_echo "$gl_cv_warn_c__Wno_sign_compare" >&6; }
7992if test "x$gl_cv_warn_c__Wno_sign_compare" = x""yes; then :
7993 as_fn_append WARN_CFLAGS " -Wno-sign-compare"
7994fi
0eb775a3 7995
a6b92a4a 7996 # Too many warnings for now
dcfda130
GM
7997
7998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-type-limits" >&5
a6b92a4a
GM
7999$as_echo_n "checking whether C compiler handles -Wno-type-limits... " >&6; }
8000if test "${gl_cv_warn_c__Wno_type_limits+set}" = set; then :
8001 $as_echo_n "(cached) " >&6
8002else
8003
8004 gl_save_compiler_FLAGS="$CFLAGS"
dcfda130 8005 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-type-limits"
a6b92a4a
GM
8006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8007/* end confdefs.h. */
8008
8009int
8010main ()
8011{
8012
8013 ;
8014 return 0;
8015}
8016_ACEOF
8017if ac_fn_c_try_compile "$LINENO"; then :
8018 gl_cv_warn_c__Wno_type_limits=yes
8019else
8020 gl_cv_warn_c__Wno_type_limits=no
8021fi
8022rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8023 CFLAGS="$gl_save_compiler_FLAGS"
8024
8025fi
8026{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_type_limits" >&5
8027$as_echo "$gl_cv_warn_c__Wno_type_limits" >&6; }
8028if test "x$gl_cv_warn_c__Wno_type_limits" = x""yes; then :
8029 as_fn_append WARN_CFLAGS " -Wno-type-limits"
8030fi
0eb775a3 8031
a6b92a4a 8032 # Too many warnings for now
dcfda130
GM
8033
8034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-switch" >&5
a6b92a4a
GM
8035$as_echo_n "checking whether C compiler handles -Wno-switch... " >&6; }
8036if test "${gl_cv_warn_c__Wno_switch+set}" = set; then :
8037 $as_echo_n "(cached) " >&6
8038else
8039
8040 gl_save_compiler_FLAGS="$CFLAGS"
dcfda130 8041 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-switch"
a6b92a4a
GM
8042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8043/* end confdefs.h. */
8044
8045int
8046main ()
8047{
8048
8049 ;
8050 return 0;
8051}
8052_ACEOF
8053if ac_fn_c_try_compile "$LINENO"; then :
8054 gl_cv_warn_c__Wno_switch=yes
8055else
8056 gl_cv_warn_c__Wno_switch=no
8057fi
8058rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8059 CFLAGS="$gl_save_compiler_FLAGS"
8060
8061fi
8062{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_switch" >&5
8063$as_echo "$gl_cv_warn_c__Wno_switch" >&6; }
8064if test "x$gl_cv_warn_c__Wno_switch" = x""yes; then :
8065 as_fn_append WARN_CFLAGS " -Wno-switch"
8066fi
0eb775a3 8067
a6b92a4a 8068 # Too many warnings for now
dcfda130
GM
8069
8070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-parameter" >&5
a6b92a4a
GM
8071$as_echo_n "checking whether C compiler handles -Wno-unused-parameter... " >&6; }
8072if test "${gl_cv_warn_c__Wno_unused_parameter+set}" = set; then :
8073 $as_echo_n "(cached) " >&6
8074else
8075
8076 gl_save_compiler_FLAGS="$CFLAGS"
dcfda130 8077 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-unused-parameter"
a6b92a4a
GM
8078 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8079/* end confdefs.h. */
8080
8081int
8082main ()
8083{
8084
8085 ;
8086 return 0;
8087}
8088_ACEOF
8089if ac_fn_c_try_compile "$LINENO"; then :
8090 gl_cv_warn_c__Wno_unused_parameter=yes
8091else
8092 gl_cv_warn_c__Wno_unused_parameter=no
8093fi
8094rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8095 CFLAGS="$gl_save_compiler_FLAGS"
8096
8097fi
8098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_parameter" >&5
8099$as_echo "$gl_cv_warn_c__Wno_unused_parameter" >&6; }
8100if test "x$gl_cv_warn_c__Wno_unused_parameter" = x""yes; then :
8101 as_fn_append WARN_CFLAGS " -Wno-unused-parameter"
8102fi
0eb775a3 8103
a6b92a4a 8104 # Too many warnings for now
dcfda130
GM
8105
8106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-format-nonliteral" >&5
a6b92a4a
GM
8107$as_echo_n "checking whether C compiler handles -Wno-format-nonliteral... " >&6; }
8108if test "${gl_cv_warn_c__Wno_format_nonliteral+set}" = set; then :
8109 $as_echo_n "(cached) " >&6
8110else
8111
8112 gl_save_compiler_FLAGS="$CFLAGS"
dcfda130 8113 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-format-nonliteral"
a6b92a4a
GM
8114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8115/* end confdefs.h. */
8116
8117int
8118main ()
8119{
8120
8121 ;
8122 return 0;
8123}
8124_ACEOF
8125if ac_fn_c_try_compile "$LINENO"; then :
8126 gl_cv_warn_c__Wno_format_nonliteral=yes
8127else
8128 gl_cv_warn_c__Wno_format_nonliteral=no
8129fi
8130rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8131 CFLAGS="$gl_save_compiler_FLAGS"
8132
8133fi
8134{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_format_nonliteral" >&5
8135$as_echo "$gl_cv_warn_c__Wno_format_nonliteral" >&6; }
8136if test "x$gl_cv_warn_c__Wno_format_nonliteral" = x""yes; then :
8137 as_fn_append WARN_CFLAGS " -Wno-format-nonliteral"
8138fi
8139
8140
0eb775a3 8141
a6b92a4a
GM
8142 # In spite of excluding -Wlogical-op above, it is enabled, as of
8143 # gcc 4.5.0 20090517.
dcfda130
GM
8144
8145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-logical-op" >&5
a6b92a4a
GM
8146$as_echo_n "checking whether C compiler handles -Wno-logical-op... " >&6; }
8147if test "${gl_cv_warn_c__Wno_logical_op+set}" = set; then :
8148 $as_echo_n "(cached) " >&6
8149else
8150
8151 gl_save_compiler_FLAGS="$CFLAGS"
dcfda130 8152 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-logical-op"
a6b92a4a
GM
8153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8154/* end confdefs.h. */
8155
8156int
8157main ()
8158{
8159
8160 ;
8161 return 0;
8162}
8163_ACEOF
8164if ac_fn_c_try_compile "$LINENO"; then :
8165 gl_cv_warn_c__Wno_logical_op=yes
8166else
8167 gl_cv_warn_c__Wno_logical_op=no
8168fi
8169rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8170 CFLAGS="$gl_save_compiler_FLAGS"
8171
8172fi
8173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_logical_op" >&5
8174$as_echo "$gl_cv_warn_c__Wno_logical_op" >&6; }
8175if test "x$gl_cv_warn_c__Wno_logical_op" = x""yes; then :
8176 as_fn_append WARN_CFLAGS " -Wno-logical-op"
8177fi
8178
8179
0eb775a3 8180
c081121f
GM
8181 # More things that clang is unduly picky about.
8182 if test $emacs_cv_clang = yes; then
8183
8184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-format-extra-args" >&5
8185$as_echo_n "checking whether C compiler handles -Wno-format-extra-args... " >&6; }
8186if test "${gl_cv_warn_c__Wno_format_extra_args+set}" = set; then :
8187 $as_echo_n "(cached) " >&6
8188else
8189
8190 gl_save_compiler_FLAGS="$CFLAGS"
8191 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-format-extra-args"
8192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8193/* end confdefs.h. */
8194
8195int
8196main ()
8197{
8198
8199 ;
8200 return 0;
8201}
8202_ACEOF
8203if ac_fn_c_try_compile "$LINENO"; then :
8204 gl_cv_warn_c__Wno_format_extra_args=yes
8205else
8206 gl_cv_warn_c__Wno_format_extra_args=no
8207fi
8208rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8209 CFLAGS="$gl_save_compiler_FLAGS"
8210
8211fi
8212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_format_extra_args" >&5
8213$as_echo "$gl_cv_warn_c__Wno_format_extra_args" >&6; }
8214if test "x$gl_cv_warn_c__Wno_format_extra_args" = x""yes; then :
8215 as_fn_append WARN_CFLAGS " -Wno-format-extra-args"
8216fi
8217
8218
8219
8220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-tautological-constant-out-of-range-compare" >&5
8221$as_echo_n "checking whether C compiler handles -Wno-tautological-constant-out-of-range-compare... " >&6; }
8222if test "${gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare+set}" = set; then :
8223 $as_echo_n "(cached) " >&6
8224else
8225
8226 gl_save_compiler_FLAGS="$CFLAGS"
8227 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-tautological-constant-out-of-range-compare"
8228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8229/* end confdefs.h. */
8230
8231int
8232main ()
8233{
8234
8235 ;
8236 return 0;
8237}
8238_ACEOF
8239if ac_fn_c_try_compile "$LINENO"; then :
8240 gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare=yes
8241else
8242 gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare=no
8243fi
8244rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8245 CFLAGS="$gl_save_compiler_FLAGS"
8246
8247fi
8248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare" >&5
8249$as_echo "$gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare" >&6; }
8250if test "x$gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare" = x""yes; then :
8251 as_fn_append WARN_CFLAGS " -Wno-tautological-constant-out-of-range-compare"
8252fi
8253
8254
8255
8256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-command-line-argument" >&5
8257$as_echo_n "checking whether C compiler handles -Wno-unused-command-line-argument... " >&6; }
8258if test "${gl_cv_warn_c__Wno_unused_command_line_argument+set}" = set; then :
8259 $as_echo_n "(cached) " >&6
8260else
8261
8262 gl_save_compiler_FLAGS="$CFLAGS"
8263 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-unused-command-line-argument"
8264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8265/* end confdefs.h. */
8266
8267int
8268main ()
8269{
8270
8271 ;
8272 return 0;
8273}
8274_ACEOF
8275if ac_fn_c_try_compile "$LINENO"; then :
8276 gl_cv_warn_c__Wno_unused_command_line_argument=yes
8277else
8278 gl_cv_warn_c__Wno_unused_command_line_argument=no
8279fi
8280rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8281 CFLAGS="$gl_save_compiler_FLAGS"
8282
8283fi
8284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_command_line_argument" >&5
8285$as_echo "$gl_cv_warn_c__Wno_unused_command_line_argument" >&6; }
8286if test "x$gl_cv_warn_c__Wno_unused_command_line_argument" = x""yes; then :
8287 as_fn_append WARN_CFLAGS " -Wno-unused-command-line-argument"
8288fi
8289
8290
8291
8292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-value" >&5
8293$as_echo_n "checking whether C compiler handles -Wno-unused-value... " >&6; }
8294if test "${gl_cv_warn_c__Wno_unused_value+set}" = set; then :
8295 $as_echo_n "(cached) " >&6
8296else
8297
8298 gl_save_compiler_FLAGS="$CFLAGS"
8299 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-unused-value"
8300 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8301/* end confdefs.h. */
8302
8303int
8304main ()
8305{
8306
8307 ;
8308 return 0;
8309}
8310_ACEOF
8311if ac_fn_c_try_compile "$LINENO"; then :
8312 gl_cv_warn_c__Wno_unused_value=yes
8313else
8314 gl_cv_warn_c__Wno_unused_value=no
8315fi
8316rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8317 CFLAGS="$gl_save_compiler_FLAGS"
8318
8319fi
8320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_value" >&5
8321$as_echo "$gl_cv_warn_c__Wno_unused_value" >&6; }
8322if test "x$gl_cv_warn_c__Wno_unused_value" = x""yes; then :
8323 as_fn_append WARN_CFLAGS " -Wno-unused-value"
8324fi
8325
8326
8327 fi
8328
dcfda130
GM
8329
8330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fdiagnostics-show-option" >&5
a6b92a4a
GM
8331$as_echo_n "checking whether C compiler handles -fdiagnostics-show-option... " >&6; }
8332if test "${gl_cv_warn_c__fdiagnostics_show_option+set}" = set; then :
8333 $as_echo_n "(cached) " >&6
8334else
8335
8336 gl_save_compiler_FLAGS="$CFLAGS"
dcfda130 8337 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fdiagnostics-show-option"
a6b92a4a 8338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
8339/* end confdefs.h. */
8340
8341int
8342main ()
8343{
8344
8345 ;
8346 return 0;
8347}
8348_ACEOF
8349if ac_fn_c_try_compile "$LINENO"; then :
a6b92a4a 8350 gl_cv_warn_c__fdiagnostics_show_option=yes
067d23c9 8351else
a6b92a4a 8352 gl_cv_warn_c__fdiagnostics_show_option=no
067d23c9
KY
8353fi
8354rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a6b92a4a
GM
8355 CFLAGS="$gl_save_compiler_FLAGS"
8356
8357fi
8358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fdiagnostics_show_option" >&5
8359$as_echo "$gl_cv_warn_c__fdiagnostics_show_option" >&6; }
8360if test "x$gl_cv_warn_c__fdiagnostics_show_option" = x""yes; then :
8361 as_fn_append WARN_CFLAGS " -fdiagnostics-show-option"
067d23c9 8362fi
067d23c9 8363
0eb775a3 8364
dcfda130
GM
8365
8366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -funit-at-a-time" >&5
a6b92a4a
GM
8367$as_echo_n "checking whether C compiler handles -funit-at-a-time... " >&6; }
8368if test "${gl_cv_warn_c__funit_at_a_time+set}" = set; then :
8369 $as_echo_n "(cached) " >&6
8370else
8371
8372 gl_save_compiler_FLAGS="$CFLAGS"
dcfda130 8373 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -funit-at-a-time"
a6b92a4a
GM
8374 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8375/* end confdefs.h. */
8376
8377int
8378main ()
8379{
8380
8381 ;
8382 return 0;
8383}
8384_ACEOF
8385if ac_fn_c_try_compile "$LINENO"; then :
8386 gl_cv_warn_c__funit_at_a_time=yes
8387else
8388 gl_cv_warn_c__funit_at_a_time=no
8389fi
8390rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8391 CFLAGS="$gl_save_compiler_FLAGS"
8392
8393fi
8394{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__funit_at_a_time" >&5
8395$as_echo "$gl_cv_warn_c__funit_at_a_time" >&6; }
8396if test "x$gl_cv_warn_c__funit_at_a_time" = x""yes; then :
8397 as_fn_append WARN_CFLAGS " -funit-at-a-time"
8398fi
8399
8400
8401
0eb775a3 8402
a6b92a4a
GM
8403$as_echo "#define lint 1" >>confdefs.h
8404
8405
a6b92a4a
GM
8406
8407$as_echo "#define GNULIB_PORTCHECK 1" >>confdefs.h
8408
8409
8410 # We use a slightly smaller set of warning options for lib/.
8411 # Remove the following and save the result in GNULIB_WARN_CFLAGS.
8412 nw=
8413 nw="$nw -Wunused-macros"
8414
8415
8416 gl_warn_set=
8417 set x $WARN_CFLAGS; shift
8418 for gl_warn_item
8419 do
8420 case " $nw " in
8421 *" $gl_warn_item "*)
8422 ;;
8423 *)
8424 gl_warn_set="$gl_warn_set $gl_warn_item"
8425 ;;
8426 esac
8427 done
8428 GNULIB_WARN_CFLAGS=$gl_warn_set
8429
8430
8431fi
067d23c9
KY
8432
8433
8434
4c5f4270
GM
8435
8436
8437
8438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works for files in the same directory" >&5
8439$as_echo_n "checking whether ln -s works for files in the same directory... " >&6; }
8440rm -f conf$$ conf$$.file
8441
8442LN_S_FILEONLY='cp -p'
8443
8444if (echo >conf$$.file) 2>/dev/null; then
8445 if ln -s conf$$.file conf$$ 2>/dev/null; then
8446 LN_S_FILEONLY='ln -s'
8447 elif ln conf$$.file conf$$ 2>/dev/null; then
8448 LN_S_FILEONLY=ln
8449 fi
8450fi
8451
8452rm -f conf$$ conf$$.file
8453
8454if test "$LN_S_FILEONLY" = "ln -s"; then
8455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
0e733db9
GM
8456$as_echo "yes" >&6; }
8457else
4c5f4270
GM
8458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S_FILEONLY" >&5
8459$as_echo "no, using $LN_S_FILEONLY" >&6; }
0e733db9
GM
8460fi
8461
067d23c9 8462
4c5f4270
GM
8463
8464
7c61eaab
GM
8465if test "$opsys" = "mingw32"; then
8466 LN_S="ln"
8467fi
8468
067d23c9
KY
8469# Extract the first word of "install-info", so it can be a program name with args.
8470set dummy install-info; ac_word=$2
8471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8472$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 8473if test "${ac_cv_path_INSTALL_INFO+set}" = set; then :
067d23c9
KY
8474 $as_echo_n "(cached) " >&6
8475else
8476 case $INSTALL_INFO in
8477 [\\/]* | ?:[\\/]*)
8478 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
8479 ;;
8480 *)
8481 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
e700232f 8482for as_dir in $PATH$PATH_SEPARATOR/usr/sbin$PATH_SEPARATOR/sbin
067d23c9
KY
8483do
8484 IFS=$as_save_IFS
8485 test -z "$as_dir" && as_dir=.
8486 for ac_exec_ext in '' $ac_executable_extensions; do
8487 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8488 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
8489 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8490 break 2
8491 fi
8492done
8493 done
8494IFS=$as_save_IFS
8495
8496 test -z "$ac_cv_path_INSTALL_INFO" && ac_cv_path_INSTALL_INFO=":"
8497 ;;
8498esac
8499fi
8500INSTALL_INFO=$ac_cv_path_INSTALL_INFO
8501if test -n "$INSTALL_INFO"; then
8502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_INFO" >&5
8503$as_echo "$INSTALL_INFO" >&6; }
8504else
8505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8506$as_echo "no" >&6; }
8507fi
8508
8509
8510# Extract the first word of "gzip", so it can be a program name with args.
8511set dummy gzip; ac_word=$2
8512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8513$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 8514if test "${ac_cv_path_GZIP_PROG+set}" = set; then :
067d23c9
KY
8515 $as_echo_n "(cached) " >&6
8516else
8517 case $GZIP_PROG in
8518 [\\/]* | ?:[\\/]*)
8519 ac_cv_path_GZIP_PROG="$GZIP_PROG" # Let the user override the test with a path.
8520 ;;
8521 *)
8522 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8523for as_dir in $PATH
8524do
8525 IFS=$as_save_IFS
8526 test -z "$as_dir" && as_dir=.
8527 for ac_exec_ext in '' $ac_executable_extensions; do
8528 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8529 ac_cv_path_GZIP_PROG="$as_dir/$ac_word$ac_exec_ext"
8530 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8531 break 2
8532 fi
8533done
8534 done
8535IFS=$as_save_IFS
8536
8537 ;;
8538esac
8539fi
8540GZIP_PROG=$ac_cv_path_GZIP_PROG
8541if test -n "$GZIP_PROG"; then
8542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP_PROG" >&5
8543$as_echo "$GZIP_PROG" >&6; }
8544else
8545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8546$as_echo "no" >&6; }
8547fi
8548
8549
7ee3791f
GM
8550
8551if test $opsys = gnu-linux; then
8552 # Extract the first word of "paxctl", so it can be a program name with args.
9c29597b
GM
8553set dummy paxctl; ac_word=$2
8554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8555$as_echo_n "checking for $ac_word... " >&6; }
8556if test "${ac_cv_path_PAXCTL+set}" = set; then :
8557 $as_echo_n "(cached) " >&6
8558else
8559 case $PAXCTL in
8560 [\\/]* | ?:[\\/]*)
8561 ac_cv_path_PAXCTL="$PAXCTL" # Let the user override the test with a path.
8562 ;;
8563 *)
8564 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8565for as_dir in $PATH$PATH_SEPARATOR/sbin$PATH_SEPARATOR/usr/sbin
8566do
8567 IFS=$as_save_IFS
8568 test -z "$as_dir" && as_dir=.
8569 for ac_exec_ext in '' $ac_executable_extensions; do
8570 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8571 ac_cv_path_PAXCTL="$as_dir/$ac_word$ac_exec_ext"
8572 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8573 break 2
8574 fi
8575done
8576 done
8577IFS=$as_save_IFS
8578
8579 ;;
8580esac
8581fi
8582PAXCTL=$ac_cv_path_PAXCTL
8583if test -n "$PAXCTL"; then
8584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PAXCTL" >&5
8585$as_echo "$PAXCTL" >&6; }
8586else
8587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8588$as_echo "no" >&6; }
8589fi
8590
8591
685e57ea
GM
8592 if test "X$PAXCTL" != X; then
8593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether binaries have a PT_PAX_FLAGS header" >&5
8594$as_echo_n "checking whether binaries have a PT_PAX_FLAGS header... " >&6; }
8595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8596/* end confdefs.h. */
8597
8598int
8599main ()
8600{
8601
8602 ;
8603 return 0;
8604}
8605_ACEOF
8606if ac_fn_c_try_link "$LINENO"; then :
8607 if $PAXCTL -v conftest$EXEEXT >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8608$as_echo "yes" >&6; }
8609 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8610$as_echo "no" >&6; }; PAXCTL=""; fi
8611fi
8612rm -f core conftest.err conftest.$ac_objext \
8613 conftest$ac_exeext conftest.$ac_ext
8614 fi
7ee3791f 8615fi
067d23c9 8616
9e40dda4 8617## Need makeinfo >= 4.7 (?) to build the manuals.
067d23c9
KY
8618# Extract the first word of "makeinfo", so it can be a program name with args.
8619set dummy makeinfo; ac_word=$2
8620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8621$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 8622if test "${ac_cv_path_MAKEINFO+set}" = set; then :
067d23c9
KY
8623 $as_echo_n "(cached) " >&6
8624else
8625 case $MAKEINFO in
8626 [\\/]* | ?:[\\/]*)
8627 ac_cv_path_MAKEINFO="$MAKEINFO" # Let the user override the test with a path.
8628 ;;
8629 *)
8630 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8631for as_dir in $PATH
8632do
8633 IFS=$as_save_IFS
8634 test -z "$as_dir" && as_dir=.
8635 for ac_exec_ext in '' $ac_executable_extensions; do
8636 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8637 ac_cv_path_MAKEINFO="$as_dir/$ac_word$ac_exec_ext"
8638 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8639 break 2
8640 fi
8641done
8642 done
8643IFS=$as_save_IFS
8644
8645 test -z "$ac_cv_path_MAKEINFO" && ac_cv_path_MAKEINFO="no"
8646 ;;
8647esac
8648fi
8649MAKEINFO=$ac_cv_path_MAKEINFO
8650if test -n "$MAKEINFO"; then
8651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKEINFO" >&5
8652$as_echo "$MAKEINFO" >&6; }
8653else
8654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8655$as_echo "no" >&6; }
8656fi
8657
8658
b5591ebb
GM
8659if test "$MAKEINFO" != "no"; then
8660 case `
8661 $MAKEINFO --version 2> /dev/null |
8662 $EGREP 'texinfo[^0-9]*([1-4][0-9]+|[5-9]|4\.[7-9]|4\.[1-6][0-9]+)'
8663 ` in
8664 '') MAKEINFO=no;;
8665 esac
067d23c9
KY
8666fi
8667
8668## Makeinfo is unusual. For a released Emacs, the manuals are
8669## pre-built, and not deleted by the normal clean rules. makeinfo is
8670## therefore in the category of "special tools" not normally required, which
8671## configure does not have to check for (eg autoconf itself).
8672## In a Bazaar checkout on the other hand, the manuals are not included.
8673## So makeinfo is a requirement to build from Bazaar, and configure
8674## should test for it as it does for any other build requirement.
8675## We use the presence of $srcdir/info/emacs to distinguish a release,
8676## with pre-built manuals, from a Bazaar checkout.
96f129d5
GM
8677HAVE_MAKEINFO=yes
8678
067d23c9 8679if test "$MAKEINFO" = "no"; then
96f129d5 8680 MAKEINFO=makeinfo
067d23c9 8681 if test "x${with_makeinfo}" = "xno"; then
96f129d5 8682 HAVE_MAKEINFO=no
b5591ebb 8683 elif test ! -e "$srcdir/info/emacs" && test ! -e "$srcdir/info/emacs.info"; then
9e40dda4 8684 as_fn_error "You do not seem to have makeinfo >= 4.7, and your
067d23c9
KY
8685source tree does not seem to have pre-built manuals in the \`info' directory.
8686Either install a suitable version of makeinfo, or re-run configure
8687with the \`--without-makeinfo' option to build without the manuals. " "$LINENO" 5
8688 fi
8689fi
8690
8691
141d074d
GM
8692INFO_EXT=.info
8693INFO_OPTS=--no-split
8694
8695
8696
96f129d5 8697
067d23c9
KY
8698if test x$GCC = xyes; then
8699 test "x$GCC_LINK_TEST_OPTIONS" != x && \
8700 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
8701else
8702 test "x$NON_GCC_LINK_TEST_OPTIONS" != x && \
8703 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
8704fi
8705
8706
8707late_LDFLAGS=$LDFLAGS
8708if test x$GCC = xyes; then
8709 LDFLAGS="$LDFLAGS -Wl,-znocombreloc"
8710else
8711 LDFLAGS="$LDFLAGS -znocombreloc"
8712fi
8713
8714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -znocombreloc" >&5
8715$as_echo_n "checking for -znocombreloc... " >&6; }
8716cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8717/* end confdefs.h. */
8718
8719int
8720main ()
8721{
8722
8723 ;
8724 return 0;
8725}
8726_ACEOF
8727if ac_fn_c_try_link "$LINENO"; then :
8728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8729$as_echo "yes" >&6; }
8730else
8731 LDFLAGS=$late_LDFLAGS
8732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8733$as_echo "no" >&6; }
8734fi
8735rm -f core conftest.err conftest.$ac_objext \
8736 conftest$ac_exeext conftest.$ac_ext
8737
8738
125c3718 8739test "x$CANNOT_DUMP" = "x" && CANNOT_DUMP=no
067d23c9 8740case "$opsys" in
125c3718
PE
8741 your-opsys-here) CANNOT_DUMP=yes ;;
8742esac
8743
8744test "$CANNOT_DUMP" = "yes" && \
067d23c9
KY
8745
8746$as_echo "#define CANNOT_DUMP 1" >>confdefs.h
8747
125c3718 8748
067d23c9
KY
8749
8750
8751
8752UNEXEC_OBJ=unexelf.o
8753case "$opsys" in
8754 # MSDOS uses unexcoff.o
067d23c9
KY
8755 aix4-2)
8756 UNEXEC_OBJ=unexaix.o
8757 ;;
8758 cygwin)
8759 UNEXEC_OBJ=unexcw.o
8760 ;;
8761 darwin)
8762 UNEXEC_OBJ=unexmacosx.o
8763 ;;
8764 hpux10-20 | hpux11)
8765 UNEXEC_OBJ=unexhp9k800.o
8766 ;;
7c61eaab
GM
8767 mingw32)
8768 UNEXEC_OBJ=unexw32.o
8769 ;;
067d23c9
KY
8770 sol2-10)
8771 # Use the Solaris dldump() function, called from unexsol.c, to dump
8772 # emacs, instead of the generic ELF dump code found in unexelf.c.
8773 # The resulting binary has a complete symbol table, and is better
8774 # for debugging and other observability tools (debuggers, pstack, etc).
8775 #
8776 # If you encounter a problem using dldump(), please consider sending
8777 # a message to the OpenSolaris tools-linking mailing list:
8778 # http://mail.opensolaris.org/mailman/listinfo/tools-linking
8779 #
8780 # It is likely that dldump() works with older Solaris too, but this has
8781 # not been tested, so for now this change is for Solaris 10 or newer.
8782 UNEXEC_OBJ=unexsol.o
8783 ;;
8784esac
8785
8786LD_SWITCH_SYSTEM=
8787case "$opsys" in
87e1a811 8788 freebsd|dragonfly)
067d23c9
KY
8789 ## Let `ld' find image libs and similar things in /usr/local/lib.
8790 ## The system compiler, GCC, has apparently been modified to not
8791 ## look there, contrary to what a stock GCC would do.
a7479549
GM
8792### It's not our place to do this. See bug#10313#17.
8793### LD_SWITCH_SYSTEM=-L/usr/local/lib
8794 :
067d23c9
KY
8795 ;;
8796
8797 gnu-linux)
8798 ## cpp test was "ifdef __mips__", but presumably this is equivalent...
d6a003a8 8799 case $host_cpu in mips*) LD_SWITCH_SYSTEM="-G 0";; esac
067d23c9
KY
8800 ;;
8801
8802 netbsd)
a7479549
GM
8803### It's not our place to do this. See bug#10313#17.
8804### LD_SWITCH_SYSTEM="-Wl,-rpath,/usr/pkg/lib -L/usr/pkg/lib -Wl,-rpath,/usr/local/lib -L/usr/local/lib"
8805 :
067d23c9
KY
8806 ;;
8807
8808 openbsd)
3766b742 8809 ## Han Boetes <han@boetes.org> says this is necessary,
067d23c9
KY
8810 ## otherwise Emacs dumps core on elf systems.
8811 LD_SWITCH_SYSTEM="-Z"
8812 ;;
8813esac
8814
8815
8816ac_link="$ac_link $LD_SWITCH_SYSTEM"
8817
ae629dae 8818## This setting of LD_SWITCH_SYSTEM references LD_SWITCH_X_SITE_RPATH,
067d23c9
KY
8819## which has not been defined yet. When this was handled with cpp,
8820## it was expanded to null when configure sourced the s/*.h file.
8821## Thus LD_SWITCH_SYSTEM had different values in configure and the Makefiles.
8822## FIXME it would be cleaner to put this in LD_SWITCH_SYSTEM_TEMACS
8823## (or somesuch), but because it is supposed to go at the _front_
8824## of LD_SWITCH_SYSTEM, we cannot do that in exactly the same way.
8825## Compare with the gnu-linux case below, which added to the end
8826## of LD_SWITCH_SYSTEM, and so can instead go at the front of
8827## LD_SWITCH_SYSTEM_TEMACS.
8828case "$opsys" in
8829 netbsd|openbsd)
ae629dae 8830 LD_SWITCH_SYSTEM="\$(LD_SWITCH_X_SITE_RPATH) $LD_SWITCH_SYSTEM" ;;
067d23c9
KY
8831esac
8832
8833
8834C_SWITCH_MACHINE=
42bbbe8b
GM
8835case $canonical in
8836 alpha*)
067d23c9 8837 ac_fn_c_check_decl "$LINENO" "__ELF__" "ac_cv_have_decl___ELF__" "$ac_includes_default"
a9bec17c 8838if test "x$ac_cv_have_decl___ELF__" = x""yes; then :
067d23c9
KY
8839
8840fi
8841
8842 if test "$ac_cv_have_decl___ELF__" = "yes"; then
8843 ## With ELF, make sure that all common symbols get allocated to in the
8844 ## data section. Otherwise, the dump of temacs may miss variables in
8845 ## the shared library that have been initialized. For example, with
8846 ## GNU libc, __malloc_initialized would normally be resolved to the
8847 ## shared library's .bss section, which is fatal.
8848 if test "x$GCC" = "xyes"; then
8849 C_SWITCH_MACHINE="-fno-common"
8850 else
a9bec17c 8851 as_fn_error "What gives? Fix me if DEC Unix supports ELF now." "$LINENO" 5
067d23c9
KY
8852 fi
8853 else
8854 UNEXEC_OBJ=unexalpha.o
8855 fi
42bbbe8b
GM
8856 ;;
8857esac
067d23c9
KY
8858
8859
8860
8861
8862C_SWITCH_SYSTEM=
8863## Some programs in src produce warnings saying certain subprograms
8864## are too complex and need a MAXMEM value greater than 2000 for
8865## additional optimization. --nils@exp-math.uni-essen.de
8866test "$opsys" = "aix4.2" && test "x$GCC" != "xyes" && \
8867 C_SWITCH_SYSTEM="-ma -qmaxmem=4000"
7c61eaab 8868test "$opsys" = "mingw32" && C_SWITCH_SYSTEM="-mtune=pentium4"
067d23c9
KY
8869## gnu-linux might need -D_BSD_SOURCE on old libc5 systems.
8870## It is redundant in glibc2, since we define _GNU_SOURCE.
8871
8872
8873
8874LIBS_SYSTEM=
8875case "$opsys" in
8876 ## IBM's X11R5 uses -lIM and -liconv in AIX 3.2.2.
8877 aix4-2) LIBS_SYSTEM="-lrts -lIM -liconv" ;;
8878
87e1a811 8879 freebsd|dragonfly) LIBS_SYSTEM="-lutil" ;;
067d23c9
KY
8880
8881 hpux*) LIBS_SYSTEM="-l:libdld.sl" ;;
8882
1f5d53eb 8883 sol2*) LIBS_SYSTEM="-lsocket -lnsl" ;;
067d23c9
KY
8884
8885 ## Motif needs -lgen.
8886 unixware) LIBS_SYSTEM="-lsocket -lnsl -lelf -lgen" ;;
8887esac
8888
8889
8890
8891### Make sure subsequent tests use flags consistent with the build flags.
8892
8893if test x"${OVERRIDE_CPPFLAGS}" != x; then
8894 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
8895else
8896 CPPFLAGS="$C_SWITCH_SYSTEM $C_SWITCH_MACHINE $CPPFLAGS"
8897fi
8898
4fda9c95
GM
8899# Suppress obsolescent Autoconf test for size_t; Emacs assumes C89 or better.
8900
3e0be4ab
GM
8901# Likewise for obsolescent test for uid_t, gid_t; Emacs assumes them.
8902
4fda9c95 8903
067d23c9 8904
067d23c9 8905LIB_MATH=-lm
4717915f 8906SYSTEM_TYPE=`echo $opsys | sed -e 's/[0-9].*//' -e 's|-|/|'`
067d23c9
KY
8907
8908case $opsys in
8909 cygwin )
8910 LIB_MATH=
067d23c9
KY
8911 ;;
8912 darwin )
8913 ## Adding -lm confuses the dynamic linker, so omit it.
8914 LIB_MATH=
067d23c9 8915 ;;
87e1a811 8916 freebsd | dragonfly )
15f79fcd 8917 SYSTEM_TYPE=berkeley-unix
067d23c9
KY
8918 ;;
8919 gnu-linux | gnu-kfreebsd )
067d23c9
KY
8920 ;;
8921 hpux10-20 | hpux11 )
067d23c9 8922 ;;
7c61eaab
GM
8923 mingw32 )
8924 LIB_MATH=
8925 SYSTEM_TYPE=windows-nt
8926 ;;
bb72ce91 8927 netbsd | openbsd )
15f79fcd 8928 SYSTEM_TYPE=berkeley-unix
067d23c9 8929 ;;
15f79fcd
GM
8930
8931 sol2* | unixware )
8932 SYSTEM_TYPE=usg-unix-v
8933 ;;
8934
067d23c9
KY
8935esac
8936
8937
8938
15f79fcd
GM
8939cat >>confdefs.h <<_ACEOF
8940#define SYSTEM_TYPE "$SYSTEM_TYPE"
8941_ACEOF
8942
8943
130f1dac 8944
5476a9a4
GM
8945pre_PKG_CONFIG_CFLAGS=$CFLAGS
8946pre_PKG_CONFIG_LIBS=$LIBS
067d23c9 8947
5476a9a4
GM
8948# Extract the first word of "pkg-config", so it can be a program name with args.
8949set dummy pkg-config; ac_word=$2
8950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8951$as_echo_n "checking for $ac_word... " >&6; }
8952if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
8953 $as_echo_n "(cached) " >&6
8954else
8955 case $PKG_CONFIG in
8956 [\\/]* | ?:[\\/]*)
8957 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8958 ;;
8959 *)
8960 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8961for as_dir in $PATH
8962do
8963 IFS=$as_save_IFS
8964 test -z "$as_dir" && as_dir=.
8965 for ac_exec_ext in '' $ac_executable_extensions; do
8966 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8967 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8968 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8969 break 2
8970 fi
8971done
8972 done
8973IFS=$as_save_IFS
8974
8975 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
8976 ;;
8977esac
8978fi
8979PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8980if test -n "$PKG_CONFIG"; then
8981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8982$as_echo "$PKG_CONFIG" >&6; }
8983else
8984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8985$as_echo "no" >&6; }
8986fi
f199cab1
GM
8987
8988
f199cab1 8989
5476a9a4
GM
8990
8991
5476a9a4 8992if test "${with_sound}" != "no"; then
7c61eaab
GM
8993 # Sound support for GNU/Linux, the free BSDs, and MinGW.
8994 for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h mmsystem.h
5476a9a4
GM
8995do :
8996 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7c61eaab
GM
8997ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8998 #ifdef __MINGW32__
8999 #define WIN32_LEAN_AND_MEAN
9000 #include <windows.h>
9001 #endif
9002
9003"
5476a9a4
GM
9004eval as_val=\$$as_ac_Header
9005 if test "x$as_val" = x""yes; then :
9006 cat >>confdefs.h <<_ACEOF
9007#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9008_ACEOF
9009 have_sound_header=yes
9010fi
9011
9012done
9013
9014 # Emulation library used on NetBSD.
9015 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _oss_ioctl in -lossaudio" >&5
9016$as_echo_n "checking for _oss_ioctl in -lossaudio... " >&6; }
9017if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then :
067d23c9
KY
9018 $as_echo_n "(cached) " >&6
9019else
5476a9a4
GM
9020 ac_check_lib_save_LIBS=$LIBS
9021LIBS="-lossaudio $LIBS"
9022cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 9023/* end confdefs.h. */
5476a9a4
GM
9024
9025/* Override any GCC internal prototype to avoid an error.
9026 Use char because int might match the return type of a GCC
9027 builtin and then its argument prototype would still apply. */
9028#ifdef __cplusplus
9029extern "C"
9030#endif
9031char _oss_ioctl ();
067d23c9
KY
9032int
9033main ()
9034{
5476a9a4 9035return _oss_ioctl ();
067d23c9
KY
9036 ;
9037 return 0;
9038}
9039_ACEOF
9040if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 9041 ac_cv_lib_ossaudio__oss_ioctl=yes
067d23c9 9042else
5476a9a4 9043 ac_cv_lib_ossaudio__oss_ioctl=no
067d23c9
KY
9044fi
9045rm -f core conftest.err conftest.$ac_objext \
9046 conftest$ac_exeext conftest.$ac_ext
5476a9a4
GM
9047LIBS=$ac_check_lib_save_LIBS
9048fi
9049{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5
9050$as_echo "$ac_cv_lib_ossaudio__oss_ioctl" >&6; }
9051if test "x$ac_cv_lib_ossaudio__oss_ioctl" = x""yes; then :
9052 LIBSOUND=-lossaudio
9053else
9054 LIBSOUND=
067d23c9
KY
9055fi
9056
9057
9058
5476a9a4
GM
9059 ALSA_REQUIRED=1.0.0
9060 ALSA_MODULES="alsa >= $ALSA_REQUIRED"
9061
9062 succeeded=no
9063
9064 if test "$PKG_CONFIG" = "no" ; then
9065 HAVE_ALSA=no
9066 else
9067 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 9068 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
9069 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ALSA_MODULES" >&5
9070$as_echo_n "checking for $ALSA_MODULES... " >&6; }
9071
b5591ebb
GM
9072 if "$PKG_CONFIG" --exists "$ALSA_MODULES" 2>&5 &&
9073 ALSA_CFLAGS=`"$PKG_CONFIG" --cflags "$ALSA_MODULES" 2>&5` &&
9074 ALSA_LIBS=`"$PKG_CONFIG" --libs "$ALSA_MODULES" 2>&5`; then
5476a9a4
GM
9075 edit_cflags="
9076 s,///*,/,g
9077 s/^/ /
9078 s/ -I/ $isystem/g
9079 s/^ //
9080 "
9081 ALSA_CFLAGS=`$as_echo "$ALSA_CFLAGS" | sed -e "$edit_cflags"`
9082 ALSA_LIBS=`$as_echo "$ALSA_LIBS" | sed -e 's,///*,/,g'`
9083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$ALSA_CFLAGS' LIBS='$ALSA_LIBS'" >&5
9084$as_echo "yes CFLAGS='$ALSA_CFLAGS' LIBS='$ALSA_LIBS'" >&6; }
9085 succeeded=yes
9086 else
9087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9088$as_echo "no" >&6; }
9089 ALSA_CFLAGS=""
9090 ALSA_LIBS=""
9091 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
9092 ## do set a variable so people can do so. Do it in a subshell
9093 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 9094 ALSA_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$ALSA_MODULES") 2>&1`
5476a9a4
GM
9095
9096 fi
9097
9098
9099
9100 else
9101 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
9102 echo "*** See http://www.freedesktop.org/software/pkgconfig"
9103 fi
9104 fi
9105
9106 if test $succeeded = yes; then
9107 HAVE_ALSA=yes
9108 else
9109 HAVE_ALSA=no
9110 fi
f199cab1 9111
5476a9a4
GM
9112 if test $HAVE_ALSA = yes; then
9113 SAVE_CFLAGS="$CFLAGS"
9114 SAVE_LIBS="$LIBS"
9115 CFLAGS="$ALSA_CFLAGS $CFLAGS"
9116 LIBS="$ALSA_LIBS $LIBS"
9117 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9118/* end confdefs.h. */
9119#include <asoundlib.h>
067d23c9
KY
9120int
9121main ()
9122{
5476a9a4 9123snd_lib_error_set_handler (0);
067d23c9
KY
9124 ;
9125 return 0;
9126}
9127_ACEOF
5476a9a4
GM
9128if ac_fn_c_try_compile "$LINENO"; then :
9129 emacs_alsa_normal=yes
067d23c9 9130else
5476a9a4 9131 emacs_alsa_normal=no
067d23c9 9132fi
5476a9a4
GM
9133rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9134 if test "$emacs_alsa_normal" != yes; then
9135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9136/* end confdefs.h. */
9137#include <alsa/asoundlib.h>
9138int
9139main ()
9140{
9141snd_lib_error_set_handler (0);
9142 ;
9143 return 0;
9144}
9145_ACEOF
9146if ac_fn_c_try_compile "$LINENO"; then :
9147 emacs_alsa_subdir=yes
9148else
9149 emacs_alsa_subdir=no
f199cab1 9150fi
5476a9a4
GM
9151rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9152 if test "$emacs_alsa_subdir" != yes; then
9153 as_fn_error "pkg-config found alsa, but it does not compile. See config.log for error messages." "$LINENO" 5
9154 fi
9155 ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE"
9156 fi
067d23c9 9157
5476a9a4
GM
9158 CFLAGS="$SAVE_CFLAGS"
9159 LIBS="$SAVE_LIBS"
9160 LIBSOUND="$LIBSOUND $ALSA_LIBS"
9161 CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS"
067d23c9 9162
5476a9a4 9163$as_echo "#define HAVE_ALSA 1" >>confdefs.h
067d23c9 9164
5476a9a4 9165 fi
067d23c9 9166
5476a9a4
GM
9167 if test x$have_sound_header = xyes || test $HAVE_ALSA = yes; then
9168 case "$opsys" in
7c61eaab 9169 gnu-linux|freebsd|netbsd|mingw32)
067d23c9 9170
5476a9a4 9171$as_echo "#define HAVE_SOUND 1" >>confdefs.h
067d23c9 9172
5476a9a4
GM
9173 ;;
9174 esac
9175 fi
067d23c9
KY
9176
9177
5476a9a4 9178fi
067d23c9 9179
e700232f
GM
9180
9181
9182
5476a9a4
GM
9183 for ac_header in $ac_header_list
9184do :
9185 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9186ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
9187"
9188eval as_val=\$$as_ac_Header
9189 if test "x$as_val" = x""yes; then :
9190 cat >>confdefs.h <<_ACEOF
9191#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
067d23c9
KY
9192_ACEOF
9193
f199cab1 9194fi
e700232f 9195
5476a9a4
GM
9196done
9197
9198
e700232f
GM
9199
9200
9201
f199cab1 9202
067d23c9 9203
067d23c9 9204
067d23c9 9205
067d23c9 9206
f199cab1
GM
9207
9208
9209
067d23c9 9210
067d23c9 9211
f199cab1
GM
9212
9213
9214
5476a9a4
GM
9215
9216
9217
9218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if personality LINUX32 can be set" >&5
9219$as_echo_n "checking if personality LINUX32 can be set... " >&6; }
9220cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9221/* end confdefs.h. */
9222#include <sys/personality.h>
067d23c9
KY
9223int
9224main ()
9225{
5476a9a4 9226personality (PER_LINUX32)
067d23c9
KY
9227 ;
9228 return 0;
9229}
9230_ACEOF
9231if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4 9232 emacs_cv_personality_linux32=yes
067d23c9 9233else
5476a9a4 9234 emacs_cv_personality_linux32=no
067d23c9 9235fi
f199cab1 9236rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5476a9a4
GM
9237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_personality_linux32" >&5
9238$as_echo "$emacs_cv_personality_linux32" >&6; }
f199cab1 9239
5476a9a4 9240if test $emacs_cv_personality_linux32 = yes; then
f199cab1 9241
5476a9a4
GM
9242$as_echo "#define HAVE_PERSONALITY_LINUX32 1" >>confdefs.h
9243
9244fi
9245
9246for ac_header in term.h
9247do :
9248 ac_fn_c_check_header_preproc "$LINENO" "term.h" "ac_cv_header_term_h"
9249if test "x$ac_cv_header_term_h" = x""yes; then :
9250 cat >>confdefs.h <<_ACEOF
9251#define HAVE_TERM_H 1
067d23c9 9252_ACEOF
5476a9a4
GM
9253
9254fi
9255
9256done
9257
9258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
9259$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
9260if test "${ac_cv_header_time+set}" = set; then :
9261 $as_echo_n "(cached) " >&6
9262else
9263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 9264/* end confdefs.h. */
5476a9a4
GM
9265#include <sys/types.h>
9266#include <sys/time.h>
9267#include <time.h>
f199cab1 9268
067d23c9
KY
9269int
9270main ()
9271{
5476a9a4
GM
9272if ((struct tm *) 0)
9273return 0;
067d23c9
KY
9274 ;
9275 return 0;
9276}
9277_ACEOF
9278if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4 9279 ac_cv_header_time=yes
067d23c9 9280else
5476a9a4 9281 ac_cv_header_time=no
067d23c9
KY
9282fi
9283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9284fi
5476a9a4
GM
9285{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
9286$as_echo "$ac_cv_header_time" >&6; }
9287if test $ac_cv_header_time = yes; then
f199cab1 9288
5476a9a4
GM
9289$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
9290
9291fi
9292
dc67e786
GM
9293ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "#include <signal.h>
9294
9295"
5476a9a4
GM
9296if test "x$ac_cv_have_decl_sys_siglist" = x""yes; then :
9297 ac_have_decl=1
9298else
9299 ac_have_decl=0
9300fi
9301
9302cat >>confdefs.h <<_ACEOF
9303#define HAVE_DECL_SYS_SIGLIST $ac_have_decl
067d23c9 9304_ACEOF
5476a9a4
GM
9305
9306if test $ac_cv_have_decl_sys_siglist != yes; then
9307 # For Tru64, at least:
dc67e786
GM
9308 ac_fn_c_check_decl "$LINENO" "__sys_siglist" "ac_cv_have_decl___sys_siglist" "#include <signal.h>
9309
9310"
5476a9a4
GM
9311if test "x$ac_cv_have_decl___sys_siglist" = x""yes; then :
9312 ac_have_decl=1
9313else
9314 ac_have_decl=0
067d23c9 9315fi
5476a9a4
GM
9316
9317cat >>confdefs.h <<_ACEOF
9318#define HAVE_DECL___SYS_SIGLIST $ac_have_decl
9319_ACEOF
9320
9321 if test $ac_cv_have_decl___sys_siglist = yes; then
9322
9323$as_echo "#define sys_siglist __sys_siglist" >>confdefs.h
9324
9325 fi
9326fi
9327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
9328$as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
9329if test "${ac_cv_header_sys_wait_h+set}" = set; then :
9330 $as_echo_n "(cached) " >&6
067d23c9
KY
9331else
9332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9333/* end confdefs.h. */
5476a9a4
GM
9334#include <sys/types.h>
9335#include <sys/wait.h>
9336#ifndef WEXITSTATUS
9337# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
9338#endif
9339#ifndef WIFEXITED
9340# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
9341#endif
9342
067d23c9
KY
9343int
9344main ()
9345{
5476a9a4
GM
9346 int s;
9347 wait (&s);
9348 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
067d23c9
KY
9349 ;
9350 return 0;
9351}
9352_ACEOF
5476a9a4
GM
9353if ac_fn_c_try_compile "$LINENO"; then :
9354 ac_cv_header_sys_wait_h=yes
067d23c9 9355else
5476a9a4 9356 ac_cv_header_sys_wait_h=no
067d23c9 9357fi
5476a9a4 9358rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
067d23c9 9359fi
5476a9a4
GM
9360{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
9361$as_echo "$ac_cv_header_sys_wait_h" >&6; }
9362if test $ac_cv_header_sys_wait_h = yes; then
067d23c9 9363
5476a9a4 9364$as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
7417b37c 9365
5476a9a4 9366fi
7417b37c 9367
7417b37c 9368
5476a9a4
GM
9369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for speed_t" >&5
9370$as_echo_n "checking for speed_t... " >&6; }
9371if test "${emacs_cv_speed_t+set}" = set; then :
f199cab1
GM
9372 $as_echo_n "(cached) " >&6
9373else
f199cab1
GM
9374 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9375/* end confdefs.h. */
5476a9a4
GM
9376#include <termios.h>
9377int
9378main ()
9379{
9380speed_t x = 1;
9381 ;
9382 return 0;
9383}
7417b37c 9384_ACEOF
f199cab1 9385if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4
GM
9386 emacs_cv_speed_t=yes
9387else
9388 emacs_cv_speed_t=no
7417b37c 9389fi
f199cab1 9390rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7417b37c 9391fi
5476a9a4
GM
9392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_speed_t" >&5
9393$as_echo "$emacs_cv_speed_t" >&6; }
9394if test $emacs_cv_speed_t = yes; then
7417b37c 9395
5476a9a4 9396$as_echo "#define HAVE_SPEED_T 1" >>confdefs.h
067d23c9 9397
5476a9a4 9398fi
067d23c9 9399
067d23c9
KY
9400
9401
e700232f 9402
5476a9a4
GM
9403for ac_header in net/if.h
9404do :
9405 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
9406#if HAVE_SYS_SOCKET_H
9407#include <sys/socket.h>
9408#endif
9409"
9410if test "x$ac_cv_header_net_if_h" = x""yes; then :
9411 cat >>confdefs.h <<_ACEOF
9412#define HAVE_NET_IF_H 1
067d23c9 9413_ACEOF
7cae64b4 9414
067d23c9 9415fi
067d23c9 9416
5476a9a4 9417done
4d4b75e8 9418
5476a9a4
GM
9419for ac_header in ifaddrs.h
9420do :
9421 ac_fn_c_check_header_compile "$LINENO" "ifaddrs.h" "ac_cv_header_ifaddrs_h" "$ac_includes_default
9422#if HAVE_SYS_SOCKET_H
9423#include <sys/socket.h>
9424#endif
9425"
9426if test "x$ac_cv_header_ifaddrs_h" = x""yes; then :
9427 cat >>confdefs.h <<_ACEOF
9428#define HAVE_IFADDRS_H 1
9429_ACEOF
4d4b75e8 9430
5476a9a4 9431fi
4d4b75e8 9432
5476a9a4 9433done
7e723570 9434
5476a9a4 9435for ac_header in net/if_dl.h
7e723570 9436do :
5476a9a4
GM
9437 ac_fn_c_check_header_compile "$LINENO" "net/if_dl.h" "ac_cv_header_net_if_dl_h" "$ac_includes_default
9438#if HAVE_SYS_SOCKET_H
9439#include <sys/socket.h>
9440#endif
7e723570 9441"
5476a9a4 9442if test "x$ac_cv_header_net_if_dl_h" = x""yes; then :
7e723570 9443 cat >>confdefs.h <<_ACEOF
5476a9a4 9444#define HAVE_NET_IF_DL_H 1
7e723570
GM
9445_ACEOF
9446
9447fi
9448
9449done
9450
9451
5476a9a4
GM
9452ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_flags" "ac_cv_member_struct_ifreq_ifr_flags" "$ac_includes_default
9453#if HAVE_SYS_SOCKET_H
9454#include <sys/socket.h>
9455#endif
9456#if HAVE_NET_IF_H
9457#include <net/if.h>
9458#endif
9459"
9460if test "x$ac_cv_member_struct_ifreq_ifr_flags" = x""yes; then :
7e723570 9461
5476a9a4
GM
9462cat >>confdefs.h <<_ACEOF
9463#define HAVE_STRUCT_IFREQ_IFR_FLAGS 1
9464_ACEOF
7e723570
GM
9465
9466
5476a9a4
GM
9467fi
9468ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_hwaddr" "ac_cv_member_struct_ifreq_ifr_hwaddr" "$ac_includes_default
9469#if HAVE_SYS_SOCKET_H
9470#include <sys/socket.h>
f199cab1 9471#endif
5476a9a4
GM
9472#if HAVE_NET_IF_H
9473#include <net/if.h>
f199cab1 9474#endif
5476a9a4
GM
9475"
9476if test "x$ac_cv_member_struct_ifreq_ifr_hwaddr" = x""yes; then :
9477
9478cat >>confdefs.h <<_ACEOF
9479#define HAVE_STRUCT_IFREQ_IFR_HWADDR 1
9480_ACEOF
9481
9482
9483fi
9484ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_netmask" "ac_cv_member_struct_ifreq_ifr_netmask" "$ac_includes_default
9485#if HAVE_SYS_SOCKET_H
9486#include <sys/socket.h>
f199cab1 9487#endif
5476a9a4
GM
9488#if HAVE_NET_IF_H
9489#include <net/if.h>
9490#endif
9491"
9492if test "x$ac_cv_member_struct_ifreq_ifr_netmask" = x""yes; then :
9493
9494cat >>confdefs.h <<_ACEOF
9495#define HAVE_STRUCT_IFREQ_IFR_NETMASK 1
f199cab1 9496_ACEOF
5476a9a4
GM
9497
9498
9499fi
9500ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_broadaddr" "ac_cv_member_struct_ifreq_ifr_broadaddr" "$ac_includes_default
9501#if HAVE_SYS_SOCKET_H
9502#include <sys/socket.h>
9503#endif
9504#if HAVE_NET_IF_H
9505#include <net/if.h>
9506#endif
9507"
9508if test "x$ac_cv_member_struct_ifreq_ifr_broadaddr" = x""yes; then :
9509
9510cat >>confdefs.h <<_ACEOF
9511#define HAVE_STRUCT_IFREQ_IFR_BROADADDR 1
f199cab1 9512_ACEOF
5476a9a4
GM
9513
9514
067d23c9 9515fi
5476a9a4
GM
9516ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_addr" "ac_cv_member_struct_ifreq_ifr_addr" "$ac_includes_default
9517#if HAVE_SYS_SOCKET_H
9518#include <sys/socket.h>
9519#endif
9520#if HAVE_NET_IF_H
9521#include <net/if.h>
9522#endif
9523"
9524if test "x$ac_cv_member_struct_ifreq_ifr_addr" = x""yes; then :
9525
9526cat >>confdefs.h <<_ACEOF
9527#define HAVE_STRUCT_IFREQ_IFR_ADDR 1
9528_ACEOF
9529
067d23c9 9530
f199cab1 9531fi
5476a9a4
GM
9532ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_addr.sa_len" "ac_cv_member_struct_ifreq_ifr_addr_sa_len" "$ac_includes_default
9533#if HAVE_SYS_SOCKET_H
9534#include <sys/socket.h>
9535#endif
9536#if HAVE_NET_IF_H
9537#include <net/if.h>
9538#endif
9539"
9540if test "x$ac_cv_member_struct_ifreq_ifr_addr_sa_len" = x""yes; then :
9541
9542cat >>confdefs.h <<_ACEOF
9543#define HAVE_STRUCT_IFREQ_IFR_ADDR_SA_LEN 1
9544_ACEOF
9545
067d23c9
KY
9546
9547fi
9548
9549
067d23c9 9550
f199cab1 9551
5476a9a4
GM
9552DEPFLAGS=
9553MKDEPDIR=":"
9554deps_frag=deps.mk
9555if test "$GCC" = yes && test "$ac_enable_autodepend" = yes; then
9556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using GNU Make" >&5
9557$as_echo_n "checking whether we are using GNU Make... " >&6; }
9558 HAVE_GNU_MAKE=no
9559 testval=`${MAKE-make} --version 2>/dev/null | grep 'GNU Make'`
9560 if test "x$testval" != x; then
9561 HAVE_GNU_MAKE=yes
9562 else
9563 ac_enable_autodepend=no
9564 fi
9565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_GNU_MAKE" >&5
9566$as_echo "$HAVE_GNU_MAKE" >&6; }
9567 if test $HAVE_GNU_MAKE = yes; then
9568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -MMD -MF" >&5
9569$as_echo_n "checking whether gcc understands -MMD -MF... " >&6; }
9570 SAVE_CFLAGS="$CFLAGS"
9571 CFLAGS="$CFLAGS -MMD -MF deps.d -MP"
9572 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9573/* end confdefs.h. */
f199cab1 9574
5476a9a4
GM
9575int
9576main ()
9577{
f199cab1 9578
5476a9a4
GM
9579 ;
9580 return 0;
9581}
9582_ACEOF
9583if ac_fn_c_try_compile "$LINENO"; then :
f199cab1 9584
5476a9a4
GM
9585else
9586 ac_enable_autodepend=no
9587fi
9588rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9589 CFLAGS="$SAVE_CFLAGS"
9590 test -f deps.d || ac_enable_autodepend=no
9591 rm -rf deps.d
9592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_autodepend" >&5
9593$as_echo "$ac_enable_autodepend" >&6; }
9594 fi
9595 if test $ac_enable_autodepend = yes; then
9596 DEPFLAGS='-MMD -MF ${DEPDIR}/$*.d -MP'
9597 ## MKDIR_P is documented (see AC_PROG_MKDIR_P) to be parallel-safe.
9598 MKDEPDIR='${MKDIR_P} ${DEPDIR}'
9599 deps_frag=autodeps.mk
9600 fi
9601fi
9602deps_frag=$srcdir/src/$deps_frag
f199cab1
GM
9603
9604
9605
9606
9607
5476a9a4 9608lisp_frag=$srcdir/src/lisp.mk
f199cab1
GM
9609
9610
9611
5476a9a4
GM
9612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long file names" >&5
9613$as_echo_n "checking for long file names... " >&6; }
9614if test "${ac_cv_sys_long_file_names+set}" = set; then :
9615 $as_echo_n "(cached) " >&6
9616else
9617 ac_cv_sys_long_file_names=yes
9618# Test for long file names in all the places we know might matter:
9619# . the current directory, where building will happen
9620# $prefix/lib where we will be installing things
9621# $exec_prefix/lib likewise
9622# $TMPDIR if set, where it might want to write temporary files
9623# /tmp where it might want to write temporary files
9624# /var/tmp likewise
9625# /usr/tmp likewise
9626for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do
9627 # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib
9628 # in the usual case where exec_prefix is '${prefix}'.
9629 case $ac_dir in #(
9630 . | /* | ?:[\\/]*) ;; #(
9631 *) continue;;
9632 esac
9633 test -w "$ac_dir/." || continue # It is less confusing to not echo anything here.
9634 ac_xdir=$ac_dir/cf$$
9635 (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
9636 ac_tf1=$ac_xdir/conftest9012345
9637 ac_tf2=$ac_xdir/conftest9012346
9638 touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" ||
9639 ac_cv_sys_long_file_names=no
9640 rm -f -r "$ac_xdir" 2>/dev/null
9641 test $ac_cv_sys_long_file_names = no && break
9642done
9643fi
9644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_long_file_names" >&5
9645$as_echo "$ac_cv_sys_long_file_names" >&6; }
9646if test $ac_cv_sys_long_file_names = yes; then
f199cab1 9647
5476a9a4 9648$as_echo "#define HAVE_LONG_FILE_NAMES 1" >>confdefs.h
f199cab1 9649
5476a9a4 9650fi
f199cab1 9651
f199cab1 9652
5476a9a4 9653#### Choose a window system.
f199cab1 9654
42dcba54
GM
9655## We leave window_system equal to none if
9656## we end up building without one. Any new window system should
9657## set window_system to an appropriate value and add objects to
9658## window-system-specific substs.
9659
9660window_system=none
5476a9a4
GM
9661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
9662$as_echo_n "checking for X... " >&6; }
f199cab1 9663
f199cab1 9664
5476a9a4
GM
9665# Check whether --with-x was given.
9666if test "${with_x+set}" = set; then :
9667 withval=$with_x;
9668fi
f199cab1 9669
5476a9a4
GM
9670# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
9671if test "x$with_x" = xno; then
9672 # The user explicitly disabled X.
9673 have_x=disabled
9674else
9675 case $x_includes,$x_libraries in #(
9676 *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
9677 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
9678 $as_echo_n "(cached) " >&6
9679else
9680 # One or both of the vars are not set, and there is no cached value.
9681ac_x_includes=no ac_x_libraries=no
9682rm -f -r conftest.dir
9683if mkdir conftest.dir; then
9684 cd conftest.dir
9685 cat >Imakefile <<'_ACEOF'
9686incroot:
9687 @echo incroot='${INCROOT}'
9688usrlibdir:
9689 @echo usrlibdir='${USRLIBDIR}'
9690libdir:
9691 @echo libdir='${LIBDIR}'
9692_ACEOF
9693 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
9694 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
9695 for ac_var in incroot usrlibdir libdir; do
9696 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
9697 done
9698 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
9699 for ac_extension in a so sl dylib la dll; do
9700 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
9701 test -f "$ac_im_libdir/libX11.$ac_extension"; then
9702 ac_im_usrlibdir=$ac_im_libdir; break
9703 fi
9704 done
9705 # Screen out bogus values from the imake configuration. They are
9706 # bogus both because they are the default anyway, and because
9707 # using them would break gcc on systems where it needs fixed includes.
9708 case $ac_im_incroot in
9709 /usr/include) ac_x_includes= ;;
9710 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
9711 esac
9712 case $ac_im_usrlibdir in
9713 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
9714 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
9715 esac
9716 fi
9717 cd ..
9718 rm -f -r conftest.dir
067d23c9
KY
9719fi
9720
5476a9a4
GM
9721# Standard set of common directories for X headers.
9722# Check X11 before X11Rn because it is often a symlink to the current release.
9723ac_x_header_dirs='
9724/usr/X11/include
9725/usr/X11R7/include
9726/usr/X11R6/include
9727/usr/X11R5/include
9728/usr/X11R4/include
067d23c9 9729
5476a9a4
GM
9730/usr/include/X11
9731/usr/include/X11R7
9732/usr/include/X11R6
9733/usr/include/X11R5
9734/usr/include/X11R4
067d23c9 9735
5476a9a4
GM
9736/usr/local/X11/include
9737/usr/local/X11R7/include
9738/usr/local/X11R6/include
9739/usr/local/X11R5/include
9740/usr/local/X11R4/include
067d23c9 9741
5476a9a4
GM
9742/usr/local/include/X11
9743/usr/local/include/X11R7
9744/usr/local/include/X11R6
9745/usr/local/include/X11R5
9746/usr/local/include/X11R4
067d23c9 9747
5476a9a4
GM
9748/usr/X386/include
9749/usr/x386/include
9750/usr/XFree86/include/X11
067d23c9 9751
5476a9a4
GM
9752/usr/include
9753/usr/local/include
9754/usr/unsupported/include
9755/usr/athena/include
9756/usr/local/x11r5/include
9757/usr/lpp/Xamples/include
067d23c9 9758
5476a9a4
GM
9759/usr/openwin/include
9760/usr/openwin/share/include'
067d23c9 9761
5476a9a4
GM
9762if test "$ac_x_includes" = no; then
9763 # Guess where to find include files, by looking for Xlib.h.
9764 # First, try using that file with no special directory specified.
9765 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9766/* end confdefs.h. */
9767#include <X11/Xlib.h>
067d23c9 9768_ACEOF
5476a9a4
GM
9769if ac_fn_c_try_cpp "$LINENO"; then :
9770 # We can compile using X headers with no special include directory.
9771ac_x_includes=
067d23c9 9772else
5476a9a4
GM
9773 for ac_dir in $ac_x_header_dirs; do
9774 if test -r "$ac_dir/X11/Xlib.h"; then
9775 ac_x_includes=$ac_dir
9776 break
f199cab1 9777 fi
f199cab1 9778done
5476a9a4
GM
9779fi
9780rm -f conftest.err conftest.$ac_ext
9781fi # $ac_x_includes = no
067d23c9 9782
5476a9a4
GM
9783if test "$ac_x_libraries" = no; then
9784 # Check for the libraries.
9785 # See if we find them without any special options.
9786 # Don't add to $LIBS permanently.
9787 ac_save_LIBS=$LIBS
9788 LIBS="-lX11 $LIBS"
7ee3791f 9789 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 9790/* end confdefs.h. */
5476a9a4 9791#include <X11/Xlib.h>
067d23c9
KY
9792int
9793main ()
9794{
5476a9a4
GM
9795XrmInitialize ()
9796 ;
067d23c9
KY
9797 return 0;
9798}
9799_ACEOF
5476a9a4
GM
9800if ac_fn_c_try_link "$LINENO"; then :
9801 LIBS=$ac_save_LIBS
9802# We can link X programs with no special library path.
9803ac_x_libraries=
7ee3791f 9804else
5476a9a4
GM
9805 LIBS=$ac_save_LIBS
9806for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
9807do
9808 # Don't even attempt the hair of trying to link an X program!
9809 for ac_extension in a so sl dylib la dll; do
9810 if test -r "$ac_dir/libX11.$ac_extension"; then
9811 ac_x_libraries=$ac_dir
9812 break 2
9813 fi
9814 done
9815done
7ee3791f 9816fi
5476a9a4
GM
9817rm -f core conftest.err conftest.$ac_objext \
9818 conftest$ac_exeext conftest.$ac_ext
9819fi # $ac_x_libraries = no
7ee3791f 9820
5476a9a4
GM
9821case $ac_x_includes,$ac_x_libraries in #(
9822 no,* | *,no | *\'*)
9823 # Didn't find X, or a directory has "'" in its name.
9824 ac_cv_have_x="have_x=no";; #(
9825 *)
9826 # Record where we found X for the cache.
9827 ac_cv_have_x="have_x=yes\
9828 ac_x_includes='$ac_x_includes'\
9829 ac_x_libraries='$ac_x_libraries'"
9830esac
9831fi
9832;; #(
9833 *) have_x=yes;;
9834 esac
9835 eval "$ac_cv_have_x"
9836fi # $with_x != no
9837
9838if test "$have_x" != yes; then
9839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
9840$as_echo "$have_x" >&6; }
9841 no_x=yes
9842else
9843 # If each of the values was on the command line, it overrides each guess.
9844 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
9845 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
9846 # Update the cache value to reflect the command line values.
9847 ac_cv_have_x="have_x=yes\
9848 ac_x_includes='$x_includes'\
9849 ac_x_libraries='$x_libraries'"
9850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
9851$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
9852fi
9853
42dcba54 9854if test "$no_x" != yes; then
5476a9a4
GM
9855 window_system=x11
9856fi
9857
9858LD_SWITCH_X_SITE_RPATH=
9859if test "${x_libraries}" != NONE; then
9860 if test -n "${x_libraries}"; then
9861 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
9862 LD_SWITCH_X_SITE_RPATH=-Wl,-rpath,`echo ${x_libraries} | sed -e "s/:/ -Wl,-rpath,/g"`
9863 fi
9864 x_default_search_path=""
9865 x_search_path=${x_libraries}
9866 if test -z "${x_search_path}"; then
9867 x_search_path=/usr/lib
9868 fi
9869 for x_library in `echo ${x_search_path}: | \
9870 sed -e "s/:/ /g" -e p -e "s:/lib[^ /]* :/share :g"`; do
9871 x_search_path="\
9872${x_library}/X11/%L/%T/%N%C%S:\
9873${x_library}/X11/%l/%T/%N%C%S:\
9874${x_library}/X11/%T/%N%C%S:\
9875${x_library}/X11/%L/%T/%N%S:\
9876${x_library}/X11/%l/%T/%N%S:\
9877${x_library}/X11/%T/%N%S"
9878 if test x"${x_default_search_path}" = x; then
9879 x_default_search_path=${x_search_path}
9880 else
9881 x_default_search_path="${x_search_path}:${x_default_search_path}"
9882 fi
9883 done
9884fi
9885
9886
9887if test "${x_includes}" != NONE && test -n "${x_includes}"; then
9888 C_SWITCH_X_SITE="$isystem"`echo ${x_includes} | sed -e "s/:/ $isystem/g"`
9889fi
9890
9891if test x"${x_includes}" = x; then
9892 bitmapdir=/usr/include/X11/bitmaps
9893else
9894 # accumulate include directories that have X11 bitmap subdirectories
9895 bmd_acc="dummyval"
9896 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
9897 if test -d "${bmd}/X11/bitmaps"; then
9898 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
9899 fi
9900 if test -d "${bmd}/bitmaps"; then
9901 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
9902 fi
9903 done
9904 if test ${bmd_acc} != "dummyval"; then
9905 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
9906 fi
9907fi
7ee3791f 9908
5476a9a4
GM
9909HAVE_NS=no
9910NS_IMPL_COCOA=no
9911NS_IMPL_GNUSTEP=no
9912tmp_CPPFLAGS="$CPPFLAGS"
9913tmp_CFLAGS="$CFLAGS"
9914CPPFLAGS="$CPPFLAGS -x objective-c"
9915CFLAGS="$CFLAGS -x objective-c"
5476a9a4 9916GNU_OBJC_CFLAGS=
4efe5ef9 9917LIBS_GNUSTEP=
5476a9a4
GM
9918if test "${with_ns}" != no; then
9919 if test "${opsys}" = darwin; then
9920 NS_IMPL_COCOA=yes
9921 ns_appdir=`pwd`/nextstep/Emacs.app
9922 ns_appbindir=${ns_appdir}/Contents/MacOS
9923 ns_appresdir=${ns_appdir}/Contents/Resources
bb7dce39 9924 ns_appsrc=Cocoa/Emacs.base
5476a9a4
GM
9925 elif test -f $GNUSTEP_CONFIG_FILE; then
9926 NS_IMPL_GNUSTEP=yes
9927 ns_appdir=`pwd`/nextstep/Emacs.app
9928 ns_appbindir=${ns_appdir}
9929 ns_appresdir=${ns_appdir}/Resources
bb7dce39 9930 ns_appsrc=GNUstep/Emacs.base
5476a9a4
GM
9931 GNUSTEP_SYSTEM_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_HEADERS)"
9932 GNUSTEP_SYSTEM_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_LIBRARIES)"
9933 GNUSTEP_LOCAL_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_HEADERS)"
9934 GNUSTEP_LOCAL_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_LIBRARIES)"
9935 test "x${GNUSTEP_LOCAL_HEADERS}" != "x" && \
9936 GNUSTEP_LOCAL_HEADERS="-I${GNUSTEP_LOCAL_HEADERS}"
9937 test "x${GNUSTEP_LOCAL_LIBRARIES}" != "x" && \
9938 GNUSTEP_LOCAL_LIBRARIES="-L${GNUSTEP_LOCAL_LIBRARIES}"
9939 CPPFLAGS="$CPPFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
9940 CFLAGS="$CFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
9941 LDFLAGS="$LDFLAGS -L${GNUSTEP_SYSTEM_LIBRARIES} ${GNUSTEP_LOCAL_LIBRARIES}"
4efe5ef9 9942 LIBS_GNUSTEP="-lgnustep-gui -lgnustep-base -lobjc -lpthread"
5476a9a4
GM
9943 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if GNUstep defines BASE_NATIVE_OBJC_EXCEPTIONS" >&5
9944$as_echo_n "checking if GNUstep defines BASE_NATIVE_OBJC_EXCEPTIONS... " >&6; }
9945if test "${emacs_cv_objc_exceptions+set}" = set; then :
9946 $as_echo_n "(cached) " >&6
9947else
9948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9949/* end confdefs.h. */
9950#include <GNUstepBase/GSConfig.h>
39b3d70b
GM
9951int
9952main ()
9953{
5476a9a4
GM
9954#if defined BASE_NATIVE_OBJC_EXCEPTIONS && BASE_NATIVE_OBJC_EXCEPTIONS > 0
99551;
9956#else
9957fail;
9958#endif
9959 ;
39b3d70b
GM
9960 return 0;
9961}
9962_ACEOF
5476a9a4
GM
9963if ac_fn_c_try_compile "$LINENO"; then :
9964 emacs_cv_objc_exceptions=yes
39b3d70b 9965else
5476a9a4 9966 emacs_cv_objc_exceptions=no
39b3d70b 9967fi
5476a9a4 9968rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
39b3d70b 9969fi
5476a9a4
GM
9970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_objc_exceptions" >&5
9971$as_echo "$emacs_cv_objc_exceptions" >&6; }
9972 if test $emacs_cv_objc_exceptions = yes; then
39b3d70b 9973
5476a9a4
GM
9974$as_echo "#define _NATIVE_OBJC_EXCEPTIONS 1" >>confdefs.h
9975
9976 GNU_OBJC_CFLAGS="-fobjc-exceptions"
9977 fi
9978 fi
9979
9980 CFLAGS="$CFLAGS $GNU_OBJC_CFLAGS"
9981
9982 ac_fn_c_check_header_mongrel "$LINENO" "AppKit/AppKit.h" "ac_cv_header_AppKit_AppKit_h" "$ac_includes_default"
9983if test "x$ac_cv_header_AppKit_AppKit_h" = x""yes; then :
9984 HAVE_NS=yes
067d23c9 9985else
5476a9a4
GM
9986 as_fn_error "\`--with-ns' was specified, but the include
9987 files are missing or cannot be compiled." "$LINENO" 5
9988fi
f199cab1 9989
f199cab1 9990
dc67e786
GM
9991
9992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9993/* end confdefs.h. */
9994#include <AppKit/AppKit.h>
9995int
9996main ()
9997{
9998
9999#ifdef MAC_OS_X_VERSION_MAX_ALLOWED
10000#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1040
10001 ; /* OK */
10002#else
10003#error "OSX 10.4 or newer required"
10004#endif
10005#endif
10006
10007 ;
10008 return 0;
10009}
10010_ACEOF
10011if ac_fn_c_try_compile "$LINENO"; then :
10012 ns_osx_have_104=yes
10013else
10014 ns_osx_have_104=no
10015fi
10016rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5476a9a4
GM
10017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10018/* end confdefs.h. */
10019#include <Foundation/NSObjCRuntime.h>
067d23c9
KY
10020int
10021main ()
10022{
5476a9a4
GM
10023NSInteger i;
10024 ;
067d23c9
KY
10025 return 0;
10026}
10027_ACEOF
5476a9a4
GM
10028if ac_fn_c_try_compile "$LINENO"; then :
10029 ns_have_nsinteger=yes
067d23c9 10030else
5476a9a4 10031 ns_have_nsinteger=no
067d23c9 10032fi
5476a9a4 10033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
dc67e786
GM
10034 if test $ns_osx_have_104 = no; then
10035 as_fn_error "\`OSX 10.4 or newer is required'" "$LINENO" 5;
10036 fi
5476a9a4 10037 if test $ns_have_nsinteger = yes; then
067d23c9 10038
5476a9a4 10039$as_echo "#define NS_HAVE_NSINTEGER 1" >>confdefs.h
067d23c9 10040
067d23c9 10041 fi
5476a9a4 10042fi
067d23c9 10043
5476a9a4 10044
5c0255d9 10045
5476a9a4
GM
10046INSTALL_ARCH_INDEP_EXTRA=install-etc
10047ns_self_contained=no
5476a9a4
GM
10048NS_OBJ=
10049NS_OBJC_OBJ=
10050if test "${HAVE_NS}" = yes; then
10051 if test "$with_toolkit_scroll_bars" = "no"; then
10052 as_fn_error "Non-toolkit scroll bars are not implemented for Nextstep." "$LINENO" 5
10053 fi
10054
10055 window_system=nextstep
5476a9a4
GM
10056 # set up packaging dirs
10057 if test "${EN_NS_SELF_CONTAINED}" = yes; then
10058 ns_self_contained=yes
10059 prefix=${ns_appresdir}
10060 exec_prefix=${ns_appbindir}
10061 libexecdir="\${ns_appbindir}/libexec"
10062 archlibdir="\${ns_appbindir}/libexec"
10063 docdir="\${ns_appresdir}/etc"
10064 etcdir="\${ns_appresdir}/etc"
10065 infodir="\${ns_appresdir}/info"
10066 mandir="\${ns_appresdir}/man"
10067 lispdir="\${ns_appresdir}/lisp"
10068 leimdir="\${ns_appresdir}/leim"
10069 INSTALL_ARCH_INDEP_EXTRA=
10070 fi
5476a9a4
GM
10071 NS_OBJC_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o"
10072fi
10073CFLAGS="$tmp_CFLAGS"
10074CPPFLAGS="$tmp_CPPFLAGS"
10075
10076
10077
10078
10079
5c0255d9
GM
10080HAVE_W32=no
10081W32_OBJ=
10082W32_LIBS=
7c61eaab
GM
10083EMACSRES=
10084CLIENTRES=
10085CLIENTW=
b5eb356a 10086W32_RES_LINK=
7c61eaab 10087EMACS_MANIFEST=
5c0255d9 10088if test "${with_w32}" != no; then
7c61eaab
GM
10089 case "${opsys}" in
10090 cygwin)
10091 ac_fn_c_check_header_mongrel "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default"
5c0255d9
GM
10092if test "x$ac_cv_header_windows_h" = x""yes; then :
10093 HAVE_W32=yes
10094else
10095 as_fn_error "\`--with-w32' was specified, but windows.h
7c61eaab
GM
10096 cannot be found." "$LINENO" 5
10097fi
10098
10099
10100 ;;
10101 mingw32)
10102 ## Using --with-w32 with MinGW is a no-op, but we allow it.
10103 ;;
10104 *)
10105 as_fn_error "Using w32 with an autotools build is only supported for Cygwin and MinGW32." "$LINENO" 5
10106 ;;
10107 esac
5c0255d9
GM
10108fi
10109
7c61eaab
GM
10110if test "${opsys}" = "mingw32"; then
10111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Windows API headers are recent enough" >&5
10112$as_echo_n "checking whether Windows API headers are recent enough... " >&6; }
10113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10114/* end confdefs.h. */
10115
10116 #include <windows.h>
10117 #include <usp10.h>
10118int
10119main ()
10120{
10121void test(PIMAGE_NT_HEADERS pHeader)
10122 {PIMAGE_SECTION_HEADER pSection = IMAGE_FIRST_SECTION(pHeader);}
10123 ;
10124 return 0;
10125}
10126_ACEOF
10127if ac_fn_c_try_compile "$LINENO"; then :
10128 emacs_cv_w32api=yes
10129 HAVE_W32=yes
10130else
10131 emacs_cv_w32api=no
10132fi
10133rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_w32api" >&5
10135$as_echo "$emacs_cv_w32api" >&6; }
10136 if test "${emacs_cv_w32api}" = "no"; then
10137 as_fn_error "the Windows API headers are too old to support this build." "$LINENO" 5
10138 fi
10139fi
5c0255d9 10140
7c61eaab
GM
10141FIRSTFILE_OBJ=
10142NTDIR=
10143LIBS_ECLIENT=
10144LIB_WSOCK32=
10145NTLIB=
10146CM_OBJ="cm.o"
10147XARGS_LIMIT=
10148if test "${HAVE_W32}" = "yes"; then
5c0255d9
GM
10149
10150$as_echo "#define HAVE_NTGUI 1" >>confdefs.h
10151
b5eb356a
GM
10152 if test -n "$ac_tool_prefix"; then
10153 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
10154set dummy ${ac_tool_prefix}windres; ac_word=$2
10155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10156$as_echo_n "checking for $ac_word... " >&6; }
10157if test "${ac_cv_prog_WINDRES+set}" = set; then :
10158 $as_echo_n "(cached) " >&6
10159else
10160 if test -n "$WINDRES"; then
10161 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
10162else
10163as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10164for as_dir in $PATH
10165do
10166 IFS=$as_save_IFS
10167 test -z "$as_dir" && as_dir=.
10168 for ac_exec_ext in '' $ac_executable_extensions; do
10169 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10170 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
10171 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10172 break 2
10173 fi
10174done
10175 done
10176IFS=$as_save_IFS
10177
10178fi
10179fi
10180WINDRES=$ac_cv_prog_WINDRES
10181if test -n "$WINDRES"; then
10182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
10183$as_echo "$WINDRES" >&6; }
10184else
10185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10186$as_echo "no" >&6; }
10187fi
10188
10189
10190fi
10191if test -z "$ac_cv_prog_WINDRES"; then
10192 ac_ct_WINDRES=$WINDRES
10193 # Extract the first word of "windres", so it can be a program name with args.
10194set dummy windres; ac_word=$2
10195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10196$as_echo_n "checking for $ac_word... " >&6; }
10197if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then :
10198 $as_echo_n "(cached) " >&6
10199else
10200 if test -n "$ac_ct_WINDRES"; then
10201 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
10202else
10203as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10204for as_dir in $PATH
10205do
10206 IFS=$as_save_IFS
10207 test -z "$as_dir" && as_dir=.
10208 for ac_exec_ext in '' $ac_executable_extensions; do
10209 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10210 ac_cv_prog_ac_ct_WINDRES="windres"
10211 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10212 break 2
10213 fi
10214done
10215 done
10216IFS=$as_save_IFS
10217
10218fi
10219fi
10220ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
10221if test -n "$ac_ct_WINDRES"; then
10222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
10223$as_echo "$ac_ct_WINDRES" >&6; }
10224else
10225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10226$as_echo "no" >&6; }
10227fi
10228
10229 if test "x$ac_ct_WINDRES" = x; then
10230 WINDRES="as_fn_error "No resource compiler found." "$LINENO" 5"
10231 else
10232 case $cross_compiling:$ac_tool_warned in
10233yes:)
10234{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10235$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10236ac_tool_warned=yes ;;
10237esac
10238 WINDRES=$ac_ct_WINDRES
10239 fi
10240else
10241 WINDRES="$ac_cv_prog_WINDRES"
10242fi
10243
5c0255d9
GM
10244 W32_OBJ="w32fns.o w32menu.o w32reg.o w32font.o w32term.o"
10245 W32_OBJ="$W32_OBJ w32xfns.o w32select.o w32uniscribe.o"
7c61eaab
GM
10246 EMACSRES="emacs.res"
10247 case "$canonical" in
10248 x86_64-*-*) EMACS_MANIFEST="emacs-x64.manifest" ;;
10249 *) EMACS_MANIFEST="emacs-x86.manifest" ;;
10250 esac
10251 if test "${opsys}" = "cygwin"; then
10252 W32_LIBS="$W32_LIBS -lkernel32 -luser32 -lgdi32 -lole32 -lcomdlg32"
10253 W32_LIBS="$W32_LIBS -lusp10 -lcomctl32 -lwinspool"
10254 # Tell the linker that emacs.res is an object (which we compile from
10255 # the rc file), not a linker script.
10256 W32_RES_LINK="-Wl,emacs.res"
10257 else
10258 W32_OBJ="$W32_OBJ w32.o w32console.o w32heap.o w32inevt.o w32proc.o"
7c61eaab
GM
10259 W32_LIBS="$W32_LIBS -lwinmm -lgdi32 -lcomdlg32"
10260 W32_LIBS="$W32_LIBS -lmpr -lwinspool -lole32 -lcomctl32 -lusp10"
10261 W32_RES_LINK="\$(EMACSRES)"
10262 CLIENTRES="emacsclient.res"
10263 CLIENTW="emacsclientw\$(EXEEXT)"
10264 FIRSTFILE_OBJ=firstfile.o
10265 NTDIR=nt
10266 CM_OBJ=
10267 LIBS_ECLIENT="-lcomctl32"
10268 LIB_WSOCK32="-lwsock32"
10269 NTLIB="ntlib.$ac_objext"
10270 XARGS_LIMIT="-s 10000"
10271 fi
5c0255d9
GM
10272fi
10273
10274
10275
b5eb356a
GM
10276
10277
7c61eaab
GM
10278
10279
10280
10281
10282
10283
10284
10285
10286
10287
5c0255d9
GM
10288if test "${HAVE_W32}" = "yes"; then
10289 window_system=w32
10290 with_xft=no
10291fi
10292
42dcba54
GM
10293## $window_system is now set to the window system we will
10294## ultimately use.
10295
10296term_header=
10297HAVE_X_WINDOWS=no
10298HAVE_X11=no
10299USE_X_TOOLKIT=none
10300
5476a9a4
GM
10301case "${window_system}" in
10302 x11 )
10303 HAVE_X_WINDOWS=yes
10304 HAVE_X11=yes
42dcba54 10305 term_header=xterm.h
5476a9a4
GM
10306 case "${with_x_toolkit}" in
10307 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
10308 motif ) USE_X_TOOLKIT=MOTIF ;;
10309 gtk ) with_gtk=yes
42dcba54 10310 term_header=gtkutil.h
5476a9a4 10311 USE_X_TOOLKIT=none ;;
4fa92495
GM
10312 gtk2 ) with_gtk2=yes
10313 term_header=gtkutil.h
10314 USE_X_TOOLKIT=none ;;
5476a9a4 10315 gtk3 ) with_gtk3=yes
42dcba54 10316 term_header=gtkutil.h
5476a9a4
GM
10317 USE_X_TOOLKIT=none ;;
10318 no ) USE_X_TOOLKIT=none ;;
10319 * ) USE_X_TOOLKIT=maybe ;;
10320 esac
10321 ;;
42dcba54
GM
10322 nextstep )
10323 term_header=nsterm.h
5476a9a4 10324 ;;
5c0255d9
GM
10325 w32 )
10326 term_header=w32term.h
10327 ;;
5476a9a4
GM
10328esac
10329
10330if test "$window_system" = none && test "X$with_x" != "Xno"; then
10331 # Extract the first word of "X", so it can be a program name with args.
10332set dummy X; ac_word=$2
10333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10334$as_echo_n "checking for $ac_word... " >&6; }
10335if test "${ac_cv_prog_HAVE_XSERVER+set}" = set; then :
10336 $as_echo_n "(cached) " >&6
10337else
10338 if test -n "$HAVE_XSERVER"; then
10339 ac_cv_prog_HAVE_XSERVER="$HAVE_XSERVER" # Let the user override the test.
10340else
10341as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10342for as_dir in $PATH
10343do
10344 IFS=$as_save_IFS
10345 test -z "$as_dir" && as_dir=.
10346 for ac_exec_ext in '' $ac_executable_extensions; do
10347 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10348 ac_cv_prog_HAVE_XSERVER="true"
10349 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10350 break 2
10351 fi
10352done
10353 done
10354IFS=$as_save_IFS
10355
10356 test -z "$ac_cv_prog_HAVE_XSERVER" && ac_cv_prog_HAVE_XSERVER="false"
10357fi
10358fi
10359HAVE_XSERVER=$ac_cv_prog_HAVE_XSERVER
10360if test -n "$HAVE_XSERVER"; then
10361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_XSERVER" >&5
10362$as_echo "$HAVE_XSERVER" >&6; }
10363else
10364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10365$as_echo "no" >&6; }
10366fi
10367
10368
10369 if test "$HAVE_XSERVER" = true ||
10370 test -n "$DISPLAY" ||
10371 test "`echo /usr/lib/libX11.*`" != "/usr/lib/libX11.*"; then
10372 as_fn_error "You seem to be running X, but no X development libraries
10373were found. You should install the relevant development files for X
10374and for the toolkit you want, such as Gtk+, Lesstif or Motif. Also make
10375sure you have development files for image handling, i.e.
10376tiff, gif, jpeg, png and xpm.
10377If you are sure you want Emacs compiled without X window support, pass
10378 --without-x
10379to configure." "$LINENO" 5
10380 fi
10381fi
10382
10383### If we're using X11, we should use the X menu package.
10384HAVE_MENUS=no
10385case ${HAVE_X11} in
10386 yes ) HAVE_MENUS=yes ;;
10387esac
10388
10389# Does the opsystem file prohibit the use of the GNU malloc?
10390# Assume not, until told otherwise.
10391GNU_MALLOC=yes
10392
10393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc is Doug Lea style" >&5
10394$as_echo_n "checking whether malloc is Doug Lea style... " >&6; }
10395if test "${emacs_cv_var_doug_lea_malloc+set}" = set; then :
067d23c9
KY
10396 $as_echo_n "(cached) " >&6
10397else
5476a9a4
GM
10398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10399/* end confdefs.h. */
10400#include <malloc.h>
10401 static void hook (void) {}
10402int
10403main ()
10404{
10405malloc_set_state (malloc_get_state ());
10406 __after_morecore_hook = hook;
10407 __malloc_initialize_hook = hook;
10408 ;
10409 return 0;
10410}
10411_ACEOF
10412if ac_fn_c_try_link "$LINENO"; then :
10413 emacs_cv_var_doug_lea_malloc=yes
10414else
10415 emacs_cv_var_doug_lea_malloc=no
10416fi
10417rm -f core conftest.err conftest.$ac_objext \
10418 conftest$ac_exeext conftest.$ac_ext
10419fi
10420{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_var_doug_lea_malloc" >&5
10421$as_echo "$emacs_cv_var_doug_lea_malloc" >&6; }
10422doug_lea_malloc=$emacs_cv_var_doug_lea_malloc
10423
10424
10425system_malloc=no
10426case "$opsys" in
10427 ## darwin ld insists on the use of malloc routines in the System framework.
10428 darwin|sol2-10) system_malloc=yes ;;
10429esac
10430
10431if test "${system_malloc}" = "yes"; then
10432
10433$as_echo "#define SYSTEM_MALLOC 1" >>confdefs.h
10434
10435 GNU_MALLOC=no
10436 GNU_MALLOC_reason="
10437 (The GNU allocators don't work with this system configuration.)"
10438 GMALLOC_OBJ=
10439 VMLIMIT_OBJ=
10440else
10441 test "$doug_lea_malloc" != "yes" && GMALLOC_OBJ=gmalloc.o
10442 VMLIMIT_OBJ=vm-limit.o
ce9ae7ca
GM
10443
10444 for ac_header in sys/vlimit.h
10445do :
10446 ac_fn_c_check_header_mongrel "$LINENO" "sys/vlimit.h" "ac_cv_header_sys_vlimit_h" "$ac_includes_default"
10447if test "x$ac_cv_header_sys_vlimit_h" = x""yes; then :
10448 cat >>confdefs.h <<_ACEOF
10449#define HAVE_SYS_VLIMIT_H 1
10450_ACEOF
10451
10452fi
10453
10454done
10455
10456 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for data_start" >&5
10457$as_echo_n "checking for data_start... " >&6; }
10458if test "${emacs_cv_data_start+set}" = set; then :
10459 $as_echo_n "(cached) " >&6
10460else
10461 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10462/* end confdefs.h. */
10463extern char data_start[]; char ch;
10464int
10465main ()
10466{
71e41a46 10467return data_start < &ch;
ce9ae7ca
GM
10468 ;
10469 return 0;
10470}
10471_ACEOF
10472if ac_fn_c_try_link "$LINENO"; then :
10473 emacs_cv_data_start=yes
10474else
10475 emacs_cv_data_start=no
10476fi
10477rm -f core conftest.err conftest.$ac_objext \
10478 conftest$ac_exeext conftest.$ac_ext
10479fi
10480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_data_start" >&5
10481$as_echo "$emacs_cv_data_start" >&6; }
10482 if test $emacs_cv_data_start = yes; then
10483
10484$as_echo "#define HAVE_DATA_START 1" >>confdefs.h
10485
10486 fi
5476a9a4
GM
10487fi
10488
10489
10490
10491if test "$doug_lea_malloc" = "yes" ; then
10492 if test "$GNU_MALLOC" = yes ; then
10493 GNU_MALLOC_reason="
10494 (Using Doug Lea's new malloc from the GNU C Library.)"
10495 fi
10496
10497$as_echo "#define DOUG_LEA_MALLOC 1" >>confdefs.h
10498
10499
10500 ## Use mmap directly for allocating larger buffers.
10501 ## FIXME this comes from src/s/{gnu,gnu-linux}.h:
10502 ## #ifdef DOUG_LEA_MALLOC; #undef REL_ALLOC; #endif
10503 ## Does the AC_FUNC_MMAP test below make this check unnecessary?
10504 case "$opsys" in
10505 gnu*) REL_ALLOC=no ;;
10506 esac
10507fi
10508
10509if test x"${REL_ALLOC}" = x; then
10510 REL_ALLOC=${GNU_MALLOC}
10511fi
10512
10513use_mmap_for_buffers=no
10514case "$opsys" in
10515 cygwin|freebsd|irix6-5) use_mmap_for_buffers=yes ;;
10516esac
10517
10518
10519
10520
10521
10522
10523
10524
10525for ac_func in getpagesize
10526do :
10527 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
10528if test "x$ac_cv_func_getpagesize" = x""yes; then :
10529 cat >>confdefs.h <<_ACEOF
10530#define HAVE_GETPAGESIZE 1
10531_ACEOF
10532
10533fi
10534done
10535
10536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
10537$as_echo_n "checking for working mmap... " >&6; }
10538if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
10539 $as_echo_n "(cached) " >&6
10540else
10541 if test "$cross_compiling" = yes; then :
10542 ac_cv_func_mmap_fixed_mapped=no
10543else
10544 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10545/* end confdefs.h. */
10546$ac_includes_default
10547/* malloc might have been renamed as rpl_malloc. */
10548#undef malloc
10549
10550/* Thanks to Mike Haertel and Jim Avera for this test.
10551 Here is a matrix of mmap possibilities:
10552 mmap private not fixed
10553 mmap private fixed at somewhere currently unmapped
10554 mmap private fixed at somewhere already mapped
10555 mmap shared not fixed
10556 mmap shared fixed at somewhere currently unmapped
10557 mmap shared fixed at somewhere already mapped
10558 For private mappings, we should verify that changes cannot be read()
10559 back from the file, nor mmap's back from the file at a different
10560 address. (There have been systems where private was not correctly
10561 implemented like the infamous i386 svr4.0, and systems where the
10562 VM page cache was not coherent with the file system buffer cache
10563 like early versions of FreeBSD and possibly contemporary NetBSD.)
10564 For shared mappings, we should conversely verify that changes get
10565 propagated back to all the places they're supposed to be.
10566
10567 Grep wants private fixed already mapped.
10568 The main things grep needs to know about mmap are:
10569 * does it exist and is it safe to write into the mmap'd area
10570 * how to use it (BSD variants) */
10571
10572#include <fcntl.h>
10573#include <sys/mman.h>
10574
10575#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
10576char *malloc ();
10577#endif
10578
10579/* This mess was copied from the GNU getpagesize.h. */
10580#ifndef HAVE_GETPAGESIZE
10581# ifdef _SC_PAGESIZE
10582# define getpagesize() sysconf(_SC_PAGESIZE)
10583# else /* no _SC_PAGESIZE */
10584# ifdef HAVE_SYS_PARAM_H
10585# include <sys/param.h>
10586# ifdef EXEC_PAGESIZE
10587# define getpagesize() EXEC_PAGESIZE
10588# else /* no EXEC_PAGESIZE */
10589# ifdef NBPG
10590# define getpagesize() NBPG * CLSIZE
10591# ifndef CLSIZE
10592# define CLSIZE 1
10593# endif /* no CLSIZE */
10594# else /* no NBPG */
10595# ifdef NBPC
10596# define getpagesize() NBPC
10597# else /* no NBPC */
10598# ifdef PAGESIZE
10599# define getpagesize() PAGESIZE
10600# endif /* PAGESIZE */
10601# endif /* no NBPC */
10602# endif /* no NBPG */
10603# endif /* no EXEC_PAGESIZE */
10604# else /* no HAVE_SYS_PARAM_H */
10605# define getpagesize() 8192 /* punt totally */
10606# endif /* no HAVE_SYS_PARAM_H */
10607# endif /* no _SC_PAGESIZE */
10608
10609#endif /* no HAVE_GETPAGESIZE */
10610
10611int
10612main ()
10613{
10614 char *data, *data2, *data3;
10615 const char *cdata2;
10616 int i, pagesize;
10617 int fd, fd2;
10618
10619 pagesize = getpagesize ();
10620
10621 /* First, make a file with some known garbage in it. */
10622 data = (char *) malloc (pagesize);
10623 if (!data)
10624 return 1;
10625 for (i = 0; i < pagesize; ++i)
10626 *(data + i) = rand ();
10627 umask (0);
10628 fd = creat ("conftest.mmap", 0600);
10629 if (fd < 0)
10630 return 2;
10631 if (write (fd, data, pagesize) != pagesize)
10632 return 3;
10633 close (fd);
10634
10635 /* Next, check that the tail of a page is zero-filled. File must have
10636 non-zero length, otherwise we risk SIGBUS for entire page. */
10637 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
10638 if (fd2 < 0)
10639 return 4;
10640 cdata2 = "";
10641 if (write (fd2, cdata2, 1) != 1)
10642 return 5;
10643 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
10644 if (data2 == MAP_FAILED)
10645 return 6;
10646 for (i = 0; i < pagesize; ++i)
10647 if (*(data2 + i))
10648 return 7;
10649 close (fd2);
10650 if (munmap (data2, pagesize))
10651 return 8;
10652
10653 /* Next, try to mmap the file at a fixed address which already has
10654 something else allocated at it. If we can, also make sure that
10655 we see the same garbage. */
10656 fd = open ("conftest.mmap", O_RDWR);
10657 if (fd < 0)
10658 return 9;
10659 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
10660 MAP_PRIVATE | MAP_FIXED, fd, 0L))
10661 return 10;
10662 for (i = 0; i < pagesize; ++i)
10663 if (*(data + i) != *(data2 + i))
10664 return 11;
10665
10666 /* Finally, make sure that changes to the mapped area do not
10667 percolate back to the file as seen by read(). (This is a bug on
10668 some variants of i386 svr4.0.) */
10669 for (i = 0; i < pagesize; ++i)
10670 *(data2 + i) = *(data2 + i) + 1;
10671 data3 = (char *) malloc (pagesize);
10672 if (!data3)
10673 return 12;
10674 if (read (fd, data3, pagesize) != pagesize)
10675 return 13;
10676 for (i = 0; i < pagesize; ++i)
10677 if (*(data + i) != *(data3 + i))
10678 return 14;
10679 close (fd);
10680 return 0;
10681}
10682_ACEOF
10683if ac_fn_c_try_run "$LINENO"; then :
10684 ac_cv_func_mmap_fixed_mapped=yes
10685else
10686 ac_cv_func_mmap_fixed_mapped=no
10687fi
10688rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10689 conftest.$ac_objext conftest.beam conftest.$ac_ext
10690fi
10691
10692fi
10693{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
10694$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
10695if test $ac_cv_func_mmap_fixed_mapped = yes; then
10696
10697$as_echo "#define HAVE_MMAP 1" >>confdefs.h
10698
10699fi
10700rm -f conftest.mmap conftest.txt
10701
10702if test $use_mmap_for_buffers = yes; then
f199cab1 10703
5476a9a4
GM
10704$as_echo "#define USE_MMAP_FOR_BUFFERS 1" >>confdefs.h
10705
10706 REL_ALLOC=no
10707fi
10708
10709LIBS="$LIBS_SYSTEM $LIBS"
10710
10711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
10712$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
10713if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then :
10714 $as_echo_n "(cached) " >&6
067d23c9 10715else
5476a9a4
GM
10716 ac_check_lib_save_LIBS=$LIBS
10717LIBS="-ldnet $LIBS"
10718cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 10719/* end confdefs.h. */
067d23c9 10720
5476a9a4
GM
10721/* Override any GCC internal prototype to avoid an error.
10722 Use char because int might match the return type of a GCC
10723 builtin and then its argument prototype would still apply. */
10724#ifdef __cplusplus
10725extern "C"
10726#endif
10727char dnet_ntoa ();
10728int
10729main ()
f199cab1 10730{
5476a9a4
GM
10731return dnet_ntoa ();
10732 ;
10733 return 0;
f199cab1 10734}
5476a9a4
GM
10735_ACEOF
10736if ac_fn_c_try_link "$LINENO"; then :
10737 ac_cv_lib_dnet_dnet_ntoa=yes
10738else
10739 ac_cv_lib_dnet_dnet_ntoa=no
10740fi
10741rm -f core conftest.err conftest.$ac_objext \
10742 conftest$ac_exeext conftest.$ac_ext
10743LIBS=$ac_check_lib_save_LIBS
10744fi
10745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
10746$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
10747if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then :
10748 cat >>confdefs.h <<_ACEOF
10749#define HAVE_LIBDNET 1
10750_ACEOF
10751
10752 LIBS="-ldnet $LIBS"
10753
10754fi
10755
10756
10757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lXbsd" >&5
10758$as_echo_n "checking for main in -lXbsd... " >&6; }
10759if test "${ac_cv_lib_Xbsd_main+set}" = set; then :
10760 $as_echo_n "(cached) " >&6
10761else
10762 ac_check_lib_save_LIBS=$LIBS
10763LIBS="-lXbsd $LIBS"
10764cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10765/* end confdefs.h. */
10766
10767
10768int
10769main ()
f199cab1 10770{
5476a9a4
GM
10771return main ();
10772 ;
10773 return 0;
f199cab1 10774}
5476a9a4
GM
10775_ACEOF
10776if ac_fn_c_try_link "$LINENO"; then :
10777 ac_cv_lib_Xbsd_main=yes
10778else
10779 ac_cv_lib_Xbsd_main=no
10780fi
10781rm -f core conftest.err conftest.$ac_objext \
10782 conftest$ac_exeext conftest.$ac_ext
10783LIBS=$ac_check_lib_save_LIBS
10784fi
10785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xbsd_main" >&5
10786$as_echo "$ac_cv_lib_Xbsd_main" >&6; }
10787if test "x$ac_cv_lib_Xbsd_main" = x""yes; then :
10788 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
10789fi
10790
10791
10792LIB_PTHREAD=
10793
10794
10795
10796if test "$ac_cv_header_pthread_h"; then
10797 if test "$GMALLOC_OBJ" = gmalloc.o; then
10798 emacs_pthread_function=pthread_atfork
10799 else
10800 emacs_pthread_function=pthread_self
10801 fi
10802 as_ac_Lib=`$as_echo "ac_cv_lib_pthread_$emacs_pthread_function" | $as_tr_sh`
10803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $emacs_pthread_function in -lpthread" >&5
10804$as_echo_n "checking for $emacs_pthread_function in -lpthread... " >&6; }
10805if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
10806 $as_echo_n "(cached) " >&6
10807else
10808 ac_check_lib_save_LIBS=$LIBS
10809LIBS="-lpthread $LIBS"
10810cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10811/* end confdefs.h. */
10812
10813/* Override any GCC internal prototype to avoid an error.
10814 Use char because int might match the return type of a GCC
10815 builtin and then its argument prototype would still apply. */
10816#ifdef __cplusplus
10817extern "C"
10818#endif
10819char $emacs_pthread_function ();
10820int
10821main ()
f199cab1 10822{
5476a9a4
GM
10823return $emacs_pthread_function ();
10824 ;
10825 return 0;
f199cab1 10826}
5476a9a4
GM
10827_ACEOF
10828if ac_fn_c_try_link "$LINENO"; then :
10829 eval "$as_ac_Lib=yes"
10830else
10831 eval "$as_ac_Lib=no"
10832fi
10833rm -f core conftest.err conftest.$ac_objext \
10834 conftest$ac_exeext conftest.$ac_ext
10835LIBS=$ac_check_lib_save_LIBS
10836fi
10837eval ac_res=\$$as_ac_Lib
10838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10839$as_echo "$ac_res" >&6; }
10840eval as_val=\$$as_ac_Lib
10841 if test "x$as_val" = x""yes; then :
10842 HAVE_PTHREAD=yes
10843fi
10844
10845fi
10846if test "$HAVE_PTHREAD" = yes; then
10847 case "${canonical}" in
10848 *-hpux*) ;;
10849 *) LIB_PTHREAD="-lpthread"
10850 LIBS="$LIB_PTHREAD $LIBS" ;;
10851 esac
10852
10853$as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
10854
10855fi
10856
10857
10858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cma_open in -lpthreads" >&5
10859$as_echo_n "checking for cma_open in -lpthreads... " >&6; }
10860if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then :
10861 $as_echo_n "(cached) " >&6
10862else
10863 ac_check_lib_save_LIBS=$LIBS
10864LIBS="-lpthreads $LIBS"
10865cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10866/* end confdefs.h. */
10867
10868/* Override any GCC internal prototype to avoid an error.
10869 Use char because int might match the return type of a GCC
10870 builtin and then its argument prototype would still apply. */
10871#ifdef __cplusplus
10872extern "C"
f199cab1 10873#endif
5476a9a4
GM
10874char cma_open ();
10875int
10876main ()
10877{
10878return cma_open ();
10879 ;
10880 return 0;
f199cab1 10881}
5476a9a4
GM
10882_ACEOF
10883if ac_fn_c_try_link "$LINENO"; then :
10884 ac_cv_lib_pthreads_cma_open=yes
10885else
10886 ac_cv_lib_pthreads_cma_open=no
10887fi
10888rm -f core conftest.err conftest.$ac_objext \
10889 conftest$ac_exeext conftest.$ac_ext
10890LIBS=$ac_check_lib_save_LIBS
10891fi
10892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_cma_open" >&5
10893$as_echo "$ac_cv_lib_pthreads_cma_open" >&6; }
10894if test "x$ac_cv_lib_pthreads_cma_open" = x""yes; then :
10895 cat >>confdefs.h <<_ACEOF
10896#define HAVE_LIBPTHREADS 1
10897_ACEOF
10898
10899 LIBS="-lpthreads $LIBS"
10900
10901fi
10902
10903
10904## Note: when using cpp in s/aix4.2.h, this definition depended on
10905## HAVE_LIBPTHREADS. That was not defined earlier in configure when
10906## the system file was sourced. Hence the value of LIBS_SYSTEM
10907## added to LIBS in configure would never contain the pthreads part,
10908## but the value used in Makefiles might. FIXME?
10909##
10910## -lpthreads seems to be necessary for Xlib in X11R6, and should
10911## be harmless on older versions of X where it happens to exist.
10912test "$opsys" = "aix4-2" && \
10913 test $ac_cv_lib_pthreads_cma_open = yes && \
10914 LIBS_SYSTEM="$LIBS_SYSTEM -lpthreads"
10915
10916
10917case ${host_os} in
10918aix*)
10919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
10920$as_echo_n "checking for -bbigtoc option... " >&6; }
10921if test "${gdb_cv_bigtoc+set}" = set; then :
10922 $as_echo_n "(cached) " >&6
10923else
10924
10925 case $GCC in
10926 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
10927 *) gdb_cv_bigtoc=-bbigtoc ;;
10928 esac
067d23c9 10929
5476a9a4
GM
10930 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
10931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10932/* end confdefs.h. */
067d23c9
KY
10933
10934int
10935main ()
10936{
5476a9a4
GM
10937int i;
10938 ;
10939 return 0;
10940}
10941_ACEOF
10942if ac_fn_c_try_link "$LINENO"; then :
067d23c9 10943
5476a9a4
GM
10944else
10945 gdb_cv_bigtoc=
10946fi
10947rm -f core conftest.err conftest.$ac_objext \
10948 conftest$ac_exeext conftest.$ac_ext
067d23c9 10949
5476a9a4
GM
10950fi
10951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
10952$as_echo "$gdb_cv_bigtoc" >&6; }
10953 ;;
10954esac
067d23c9 10955
5476a9a4
GM
10956# Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets
10957# used for the tests that follow. We set them back to REAL_CFLAGS and
10958# REAL_CPPFLAGS later on.
067d23c9 10959
5476a9a4
GM
10960REAL_CFLAGS="$CFLAGS"
10961REAL_CPPFLAGS="$CPPFLAGS"
10962
10963if test "${HAVE_X11}" = "yes"; then
10964 DEFS="$C_SWITCH_X_SITE $DEFS"
10965 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
10966 LIBS="-lX11 $LIBS"
10967 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
10968 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
10969
10970 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
10971 # This is handled by LD_SWITCH_X_SITE_RPATH during the real build,
10972 # but it's more convenient here to set LD_RUN_PATH since this
10973 # also works on hosts that don't understand LD_SWITCH_X_SITE_RPATH.
10974 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
10975 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
10976 export LD_RUN_PATH
10977 fi
10978
10979 if test "${opsys}" = "gnu-linux"; then
10980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether X on GNU/Linux needs -b to link" >&5
10981$as_echo_n "checking whether X on GNU/Linux needs -b to link... " >&6; }
10982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10983/* end confdefs.h. */
067d23c9 10984
5476a9a4
GM
10985int
10986main ()
10987{
10988XOpenDisplay ("foo");
f199cab1 10989 ;
067d23c9
KY
10990 return 0;
10991}
10992_ACEOF
5476a9a4
GM
10993if ac_fn_c_try_link "$LINENO"; then :
10994 xgnu_linux_first_failure=no
067d23c9 10995else
5476a9a4 10996 xgnu_linux_first_failure=yes
067d23c9 10997fi
5476a9a4
GM
10998rm -f core conftest.err conftest.$ac_objext \
10999 conftest$ac_exeext conftest.$ac_ext
11000 if test "${xgnu_linux_first_failure}" = "yes"; then
11001 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
11002 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
11003 OLD_CPPFLAGS="$CPPFLAGS"
11004 OLD_LIBS="$LIBS"
11005 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
11006 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
11007 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
11008 LIBS="$LIBS -b i486-linuxaout"
11009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11010/* end confdefs.h. */
067d23c9 11011
5476a9a4
GM
11012int
11013main ()
11014{
11015XOpenDisplay ("foo");
11016 ;
11017 return 0;
11018}
11019_ACEOF
11020if ac_fn_c_try_link "$LINENO"; then :
11021 xgnu_linux_second_failure=no
11022else
11023 xgnu_linux_second_failure=yes
067d23c9 11024fi
5476a9a4
GM
11025rm -f core conftest.err conftest.$ac_objext \
11026 conftest$ac_exeext conftest.$ac_ext
11027 if test "${xgnu_linux_second_failure}" = "yes"; then
11028 # If we get the same failure with -b, there is no use adding -b.
11029 # So take it out. This plays safe.
11030 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
11031 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
11032 CPPFLAGS="$OLD_CPPFLAGS"
11033 LIBS="$OLD_LIBS"
11034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11035$as_echo "no" >&6; }
11036 else
11037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11038$as_echo "yes" >&6; }
11039 fi
0eb4e0df 11040 else
5476a9a4
GM
11041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11042$as_echo "no" >&6; }
11043 fi
11044 fi
0eb4e0df 11045
5476a9a4
GM
11046 # Reportedly, some broken Solaris systems have XKBlib.h but are missing
11047 # header files included from there.
11048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Xkb" >&5
11049$as_echo_n "checking for Xkb... " >&6; }
0eb4e0df
GM
11050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11051/* end confdefs.h. */
5476a9a4
GM
11052#include <X11/Xlib.h>
11053#include <X11/XKBlib.h>
0eb4e0df
GM
11054int
11055main ()
11056{
5476a9a4 11057XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);
0eb4e0df
GM
11058 ;
11059 return 0;
11060}
11061_ACEOF
5476a9a4
GM
11062if ac_fn_c_try_link "$LINENO"; then :
11063 emacs_xkb=yes
0eb4e0df 11064else
5476a9a4 11065 emacs_xkb=no
0eb4e0df 11066fi
5476a9a4
GM
11067rm -f core conftest.err conftest.$ac_objext \
11068 conftest$ac_exeext conftest.$ac_ext
11069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_xkb" >&5
11070$as_echo "$emacs_xkb" >&6; }
11071 if test $emacs_xkb = yes; then
1abfdc54 11072
f46ba47d
GM
11073$as_echo "#define HAVE_XKB 1" >>confdefs.h
11074
e1fefc61 11075 fi
1abfdc54 11076
5476a9a4
GM
11077 for ac_func in XrmSetDatabase XScreenResourceString \
11078XScreenNumberOfScreen
11079do :
11080 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11081ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11082eval as_val=\$$as_ac_var
11083 if test "x$as_val" = x""yes; then :
11084 cat >>confdefs.h <<_ACEOF
11085#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
f199cab1 11086_ACEOF
1abfdc54 11087
5476a9a4
GM
11088fi
11089done
1abfdc54 11090
5476a9a4 11091fi
1abfdc54 11092
5476a9a4
GM
11093if test "${window_system}" = "x11"; then
11094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 version 6" >&5
11095$as_echo_n "checking X11 version 6... " >&6; }
11096 if test "${emacs_cv_x11_version_6+set}" = set; then :
067d23c9
KY
11097 $as_echo_n "(cached) " >&6
11098else
5476a9a4 11099 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 11100/* end confdefs.h. */
5476a9a4 11101#include <X11/Xlib.h>
067d23c9
KY
11102int
11103main ()
11104{
5476a9a4
GM
11105#if XlibSpecificationRelease < 6
11106fail;
11107#endif
11108
067d23c9
KY
11109 ;
11110 return 0;
11111}
11112_ACEOF
5476a9a4
GM
11113if ac_fn_c_try_link "$LINENO"; then :
11114 emacs_cv_x11_version_6=yes
11115else
11116 emacs_cv_x11_version_6=no
11117fi
11118rm -f core conftest.err conftest.$ac_objext \
11119 conftest$ac_exeext conftest.$ac_ext
067d23c9 11120fi
f199cab1 11121
5476a9a4
GM
11122 if test $emacs_cv_x11_version_6 = yes; then
11123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5
11124$as_echo "6 or newer" >&6; }
f199cab1 11125
5476a9a4 11126$as_echo "#define HAVE_X11R6 1" >>confdefs.h
f199cab1
GM
11127
11128
5476a9a4 11129$as_echo "#define HAVE_X_I18N 1" >>confdefs.h
f199cab1 11130
5476a9a4
GM
11131 ## inoue@ainet.or.jp says Solaris has a bug related to X11R6-style
11132 ## XIM support.
11133 case "$opsys" in
11134 sol2-*) : ;;
11135 *)
11136$as_echo "#define HAVE_X11R6_XIM 1" >>confdefs.h
f199cab1 11137
5476a9a4
GM
11138 ;;
11139 esac
11140 else
11141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5
11142$as_echo "before 6" >&6; }
11143 fi
11144fi
f199cab1 11145
067d23c9 11146
5476a9a4
GM
11147### Use -lrsvg-2 if available, unless `--with-rsvg=no' is specified.
11148HAVE_RSVG=no
7c61eaab 11149if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes" || test "${opsys}" = "mingw32"; then
5476a9a4
GM
11150 if test "${with_rsvg}" != "no"; then
11151 RSVG_REQUIRED=2.11.0
11152 RSVG_MODULE="librsvg-2.0 >= $RSVG_REQUIRED"
067d23c9 11153
f199cab1 11154
5476a9a4 11155 succeeded=no
067d23c9 11156
5476a9a4
GM
11157 if test "$PKG_CONFIG" = "no" ; then
11158 :
11159 else
11160 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 11161 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
11162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $RSVG_MODULE" >&5
11163$as_echo_n "checking for $RSVG_MODULE... " >&6; }
f199cab1 11164
b5591ebb
GM
11165 if "$PKG_CONFIG" --exists "$RSVG_MODULE" 2>&5 &&
11166 RSVG_CFLAGS=`"$PKG_CONFIG" --cflags "$RSVG_MODULE" 2>&5` &&
11167 RSVG_LIBS=`"$PKG_CONFIG" --libs "$RSVG_MODULE" 2>&5`; then
5476a9a4
GM
11168 edit_cflags="
11169 s,///*,/,g
11170 s/^/ /
11171 s/ -I/ $isystem/g
11172 s/^ //
11173 "
11174 RSVG_CFLAGS=`$as_echo "$RSVG_CFLAGS" | sed -e "$edit_cflags"`
11175 RSVG_LIBS=`$as_echo "$RSVG_LIBS" | sed -e 's,///*,/,g'`
11176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$RSVG_CFLAGS' LIBS='$RSVG_LIBS'" >&5
11177$as_echo "yes CFLAGS='$RSVG_CFLAGS' LIBS='$RSVG_LIBS'" >&6; }
11178 succeeded=yes
11179 else
11180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11181$as_echo "no" >&6; }
11182 RSVG_CFLAGS=""
11183 RSVG_LIBS=""
11184 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
11185 ## do set a variable so people can do so. Do it in a subshell
11186 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 11187 RSVG_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$RSVG_MODULE") 2>&1`
f199cab1 11188
5476a9a4 11189 fi
067d23c9 11190
067d23c9 11191
067d23c9 11192
f199cab1 11193 else
5476a9a4
GM
11194 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11195 echo "*** See http://www.freedesktop.org/software/pkgconfig"
f199cab1 11196 fi
5476a9a4
GM
11197 fi
11198
11199 if test $succeeded = yes; then
11200 HAVE_RSVG=yes
11201 else
11202 :
11203 fi
067d23c9 11204
067d23c9 11205
067d23c9 11206
f199cab1 11207
5476a9a4 11208 if test $HAVE_RSVG = yes; then
f199cab1 11209
5476a9a4
GM
11210$as_echo "#define HAVE_RSVG 1" >>confdefs.h
11211
11212 CFLAGS="$CFLAGS $RSVG_CFLAGS"
11213 LIBS="$RSVG_LIBS $LIBS"
11214 fi
f199cab1 11215 fi
5476a9a4 11216fi
f199cab1 11217
5476a9a4
GM
11218HAVE_IMAGEMAGICK=no
11219if test "${HAVE_X11}" = "yes"; then
11220 if test "${with_imagemagick}" != "no"; then
11221 ## 6.2.8 is the earliest version known to work, but earlier versions
11222 ## might work - let us know if you find one.
11223 ## 6.0.7 does not work. See bug#7955.
0cb77136
GM
11224 ## 6.8.2 makes Emacs crash; see Bug#13867.
11225 IMAGEMAGICK_MODULE="Wand >= 6.2.8 Wand != 6.8.2"
f199cab1 11226
5476a9a4 11227 succeeded=no
f199cab1 11228
5476a9a4
GM
11229 if test "$PKG_CONFIG" = "no" ; then
11230 :
11231 else
11232 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 11233 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
11234 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $IMAGEMAGICK_MODULE" >&5
11235$as_echo_n "checking for $IMAGEMAGICK_MODULE... " >&6; }
f199cab1 11236
b5591ebb
GM
11237 if "$PKG_CONFIG" --exists "$IMAGEMAGICK_MODULE" 2>&5 &&
11238 IMAGEMAGICK_CFLAGS=`"$PKG_CONFIG" --cflags "$IMAGEMAGICK_MODULE" 2>&5` &&
11239 IMAGEMAGICK_LIBS=`"$PKG_CONFIG" --libs "$IMAGEMAGICK_MODULE" 2>&5`; then
5476a9a4
GM
11240 edit_cflags="
11241 s,///*,/,g
11242 s/^/ /
11243 s/ -I/ $isystem/g
11244 s/^ //
11245 "
11246 IMAGEMAGICK_CFLAGS=`$as_echo "$IMAGEMAGICK_CFLAGS" | sed -e "$edit_cflags"`
11247 IMAGEMAGICK_LIBS=`$as_echo "$IMAGEMAGICK_LIBS" | sed -e 's,///*,/,g'`
11248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$IMAGEMAGICK_CFLAGS' LIBS='$IMAGEMAGICK_LIBS'" >&5
11249$as_echo "yes CFLAGS='$IMAGEMAGICK_CFLAGS' LIBS='$IMAGEMAGICK_LIBS'" >&6; }
11250 succeeded=yes
11251 else
11252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11253$as_echo "no" >&6; }
11254 IMAGEMAGICK_CFLAGS=""
11255 IMAGEMAGICK_LIBS=""
11256 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
11257 ## do set a variable so people can do so. Do it in a subshell
11258 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 11259 IMAGEMAGICK_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$IMAGEMAGICK_MODULE") 2>&1`
f199cab1 11260
5476a9a4 11261 fi
f199cab1 11262
f199cab1 11263
f199cab1 11264
5476a9a4
GM
11265 else
11266 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11267 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11268 fi
f199cab1 11269 fi
5476a9a4
GM
11270
11271 if test $succeeded = yes; then
11272 HAVE_IMAGEMAGICK=yes
f199cab1 11273 else
5476a9a4 11274 :
067d23c9
KY
11275 fi
11276
f199cab1 11277
067d23c9 11278
f199cab1 11279
5476a9a4 11280 if test $HAVE_IMAGEMAGICK = yes; then
067d23c9 11281
5476a9a4 11282$as_echo "#define HAVE_IMAGEMAGICK 1" >>confdefs.h
f199cab1 11283
5476a9a4
GM
11284 CFLAGS="$CFLAGS $IMAGEMAGICK_CFLAGS"
11285 LIBS="$IMAGEMAGICK_LIBS $LIBS"
11286 for ac_func in MagickExportImagePixels MagickMergeImageLayers
11287do :
11288 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11289ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11290eval as_val=\$$as_ac_var
11291 if test "x$as_val" = x""yes; then :
11292 cat >>confdefs.h <<_ACEOF
11293#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
067d23c9 11294_ACEOF
f199cab1
GM
11295
11296fi
5476a9a4
GM
11297done
11298
067d23c9
KY
11299 fi
11300 fi
5476a9a4 11301fi
067d23c9 11302
f199cab1 11303
5476a9a4
GM
11304HAVE_GTK=no
11305GTK_OBJ=
4fa92495
GM
11306check_gtk2=no
11307gtk3_pkg_errors=
7c61eaab
GM
11308if test "${opsys}" != "mingw32"; then
11309 if test "${with_gtk3}" = "yes" || test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "maybe"; then
11310 GLIB_REQUIRED=2.28
11311 GTK_REQUIRED=3.0
11312 GTK_MODULES="gtk+-3.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
f199cab1
GM
11313
11314
5476a9a4 11315 succeeded=no
f199cab1 11316
5476a9a4
GM
11317 if test "$PKG_CONFIG" = "no" ; then
11318 pkg_check_gtk=no
11319 else
11320 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 11321 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
11322 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5
11323$as_echo_n "checking for $GTK_MODULES... " >&6; }
f199cab1 11324
b5591ebb
GM
11325 if "$PKG_CONFIG" --exists "$GTK_MODULES" 2>&5 &&
11326 GTK_CFLAGS=`"$PKG_CONFIG" --cflags "$GTK_MODULES" 2>&5` &&
11327 GTK_LIBS=`"$PKG_CONFIG" --libs "$GTK_MODULES" 2>&5`; then
5476a9a4
GM
11328 edit_cflags="
11329 s,///*,/,g
11330 s/^/ /
11331 s/ -I/ $isystem/g
11332 s/^ //
11333 "
11334 GTK_CFLAGS=`$as_echo "$GTK_CFLAGS" | sed -e "$edit_cflags"`
11335 GTK_LIBS=`$as_echo "$GTK_LIBS" | sed -e 's,///*,/,g'`
11336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&5
11337$as_echo "yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&6; }
11338 succeeded=yes
11339 else
11340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11341$as_echo "no" >&6; }
11342 GTK_CFLAGS=""
11343 GTK_LIBS=""
11344 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
11345 ## do set a variable so people can do so. Do it in a subshell
11346 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 11347 GTK_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$GTK_MODULES") 2>&1`
f199cab1 11348
5476a9a4 11349 fi
f199cab1 11350
f199cab1 11351
f199cab1 11352
5476a9a4
GM
11353 else
11354 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11355 echo "*** See http://www.freedesktop.org/software/pkgconfig"
f199cab1 11356 fi
5476a9a4 11357 fi
067d23c9 11358
5476a9a4
GM
11359 if test $succeeded = yes; then
11360 pkg_check_gtk=yes
11361 else
11362 pkg_check_gtk=no
11363 fi
067d23c9 11364
7c61eaab
GM
11365 if test "$pkg_check_gtk" = "no" && test "$with_gtk3" = "yes"; then
11366 as_fn_error "$GTK_PKG_ERRORS" "$LINENO" 5
11367 fi
11368 if test "$pkg_check_gtk" = "yes"; then
067d23c9 11369
5476a9a4 11370$as_echo "#define HAVE_GTK3 1" >>confdefs.h
067d23c9 11371
7c61eaab
GM
11372 GTK_OBJ=emacsgtkfixed.o
11373 term_header=gtkutil.h
11374 USE_GTK_TOOLKIT="GTK3"
11375 if test "x$ac_enable_gtk_deprecation_warnings" = x; then
11376 GTK_CFLAGS="$GTK_CFLAGS -DGDK_DISABLE_DEPRECATION_WARNINGS"
c081121f 11377 GTK_CFLAGS="$GTK_CFLAGS -DGLIB_DISABLE_DEPRECATION_WARNINGS"
7c61eaab
GM
11378 fi
11379 else
11380 check_gtk2=yes
11381 gtk3_pkg_errors="$GTK_PKG_ERRORS "
11382 fi
4fa92495 11383 fi
067d23c9 11384
7c61eaab
GM
11385 if test "${with_gtk2}" = "yes" || test "$check_gtk2" = "yes"; then
11386 GLIB_REQUIRED=2.10
11387 GTK_REQUIRED=2.10
11388 GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
f199cab1 11389
5476a9a4
GM
11390
11391 succeeded=no
11392
11393 if test "$PKG_CONFIG" = "no" ; then
11394 pkg_check_gtk=no
11395 else
11396 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 11397 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
11398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5
11399$as_echo_n "checking for $GTK_MODULES... " >&6; }
11400
b5591ebb
GM
11401 if "$PKG_CONFIG" --exists "$GTK_MODULES" 2>&5 &&
11402 GTK_CFLAGS=`"$PKG_CONFIG" --cflags "$GTK_MODULES" 2>&5` &&
11403 GTK_LIBS=`"$PKG_CONFIG" --libs "$GTK_MODULES" 2>&5`; then
5476a9a4
GM
11404 edit_cflags="
11405 s,///*,/,g
11406 s/^/ /
11407 s/ -I/ $isystem/g
11408 s/^ //
11409 "
11410 GTK_CFLAGS=`$as_echo "$GTK_CFLAGS" | sed -e "$edit_cflags"`
11411 GTK_LIBS=`$as_echo "$GTK_LIBS" | sed -e 's,///*,/,g'`
11412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&5
11413$as_echo "yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&6; }
11414 succeeded=yes
11415 else
11416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11417$as_echo "no" >&6; }
11418 GTK_CFLAGS=""
11419 GTK_LIBS=""
11420 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
11421 ## do set a variable so people can do so. Do it in a subshell
11422 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 11423 GTK_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$GTK_MODULES") 2>&1`
5476a9a4
GM
11424
11425 fi
11426
11427
11428
11429 else
11430 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11431 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11432 fi
11433 fi
11434
11435 if test $succeeded = yes; then
11436 pkg_check_gtk=yes
11437 else
11438 pkg_check_gtk=no
11439 fi
11440
7c61eaab
GM
11441 if test "$pkg_check_gtk" = "no" &&
11442 { test "$with_gtk" = yes || test "$with_gtk2" = "yes"; }
11443 then
11444 as_fn_error "$gtk3_pkg_errors$GTK_PKG_ERRORS" "$LINENO" 5
11445 fi
11446 test "$pkg_check_gtk" = "yes" && USE_GTK_TOOLKIT="GTK2"
5476a9a4 11447 fi
067d23c9 11448fi
067d23c9 11449
5476a9a4
GM
11450if test x"$pkg_check_gtk" = xyes; then
11451
11452
11453
11454 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS"
11455 CFLAGS="$CFLAGS $GTK_CFLAGS"
11456 LIBS="$GTK_LIBS $LIBS"
11457 GTK_COMPILES=no
11458 for ac_func in gtk_main
11459do :
11460 ac_fn_c_check_func "$LINENO" "gtk_main" "ac_cv_func_gtk_main"
11461if test "x$ac_cv_func_gtk_main" = x""yes; then :
11462 cat >>confdefs.h <<_ACEOF
11463#define HAVE_GTK_MAIN 1
11464_ACEOF
11465 GTK_COMPILES=yes
f199cab1 11466fi
5476a9a4 11467done
067d23c9 11468
5476a9a4
GM
11469 if test "${GTK_COMPILES}" != "yes"; then
11470 if test "$USE_X_TOOLKIT" != "maybe"; then
11471 as_fn_error "Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" "$LINENO" 5;
11472 fi
11473 else
11474 HAVE_GTK=yes
11475
11476$as_echo "#define USE_GTK 1" >>confdefs.h
067d23c9 11477
5476a9a4
GM
11478 GTK_OBJ="gtkutil.o $GTK_OBJ"
11479 USE_X_TOOLKIT=none
b5591ebb 11480 if "$PKG_CONFIG" --atleast-version=2.10 gtk+-2.0; then
5476a9a4
GM
11481 :
11482 else
11483 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your version of Gtk+ will have problems with
11484 closing open displays. This is no problem if you just use
11485 one display, but if you use more than one and close one of them
11486 Emacs may crash." >&5
11487$as_echo "$as_me: WARNING: Your version of Gtk+ will have problems with
11488 closing open displays. This is no problem if you just use
11489 one display, but if you use more than one and close one of them
11490 Emacs may crash." >&2;}
11491 sleep 3
11492 fi
067d23c9
KY
11493 fi
11494
5476a9a4 11495fi
067d23c9
KY
11496
11497
11498
5476a9a4 11499if test "${HAVE_GTK}" = "yes"; then
067d23c9 11500
5476a9a4
GM
11501 if test "$with_toolkit_scroll_bars" != no; then
11502 with_toolkit_scroll_bars=yes
11503 fi
067d23c9 11504
5476a9a4
GM
11505 HAVE_GTK_FILE_SELECTION=no
11506 ac_fn_c_check_decl "$LINENO" "GTK_TYPE_FILE_SELECTION" "ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" "$ac_includes_default
11507#include <gtk/gtk.h>
11508"
11509if test "x$ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" = x""yes; then :
11510 HAVE_GTK_FILE_SELECTION=yes
11511else
11512 HAVE_GTK_FILE_SELECTION=no
11513fi
067d23c9 11514
5476a9a4
GM
11515 if test "$HAVE_GTK_FILE_SELECTION" = yes; then
11516 for ac_func in gtk_file_selection_new
11517do :
11518 ac_fn_c_check_func "$LINENO" "gtk_file_selection_new" "ac_cv_func_gtk_file_selection_new"
11519if test "x$ac_cv_func_gtk_file_selection_new" = x""yes; then :
11520 cat >>confdefs.h <<_ACEOF
11521#define HAVE_GTK_FILE_SELECTION_NEW 1
f199cab1 11522_ACEOF
067d23c9 11523
f199cab1 11524fi
5476a9a4
GM
11525done
11526
f199cab1 11527 fi
067d23c9 11528
4efe5ef9
GM
11529 HAVE_GTK_HANDLE_BOX=no
11530 ac_fn_c_check_decl "$LINENO" "GTK_TYPE_HANDLE_BOX" "ac_cv_have_decl_GTK_TYPE_HANDLE_BOX" "$ac_includes_default
11531#include <gtk/gtk.h>
11532"
11533if test "x$ac_cv_have_decl_GTK_TYPE_HANDLE_BOX" = x""yes; then :
11534 HAVE_GTK_HANDLE_BOX=yes
11535else
11536 HAVE_GTK_HANDLE_BOX=no
11537fi
11538
11539 if test "$HAVE_GTK_HANDLE_BOX" = yes; then
11540 for ac_func in gtk_handle_box_new
11541do :
11542 ac_fn_c_check_func "$LINENO" "gtk_handle_box_new" "ac_cv_func_gtk_handle_box_new"
11543if test "x$ac_cv_func_gtk_handle_box_new" = x""yes; then :
11544 cat >>confdefs.h <<_ACEOF
11545#define HAVE_GTK_HANDLE_BOX_NEW 1
11546_ACEOF
11547
11548fi
11549done
11550
11551 fi
11552
11553 HAVE_GTK_TEAROFF_MENU_ITEM=no
11554 ac_fn_c_check_decl "$LINENO" "GTK_TYPE_TEAROFF_MENU_ITEM" "ac_cv_have_decl_GTK_TYPE_TEAROFF_MENU_ITEM" "$ac_includes_default
11555#include <gtk/gtk.h>
11556"
11557if test "x$ac_cv_have_decl_GTK_TYPE_TEAROFF_MENU_ITEM" = x""yes; then :
11558 HAVE_GTK_TEAROFF_MENU_ITEM=yes
11559else
11560 HAVE_GTK_TEAROFF_MENU_ITEM=no
11561fi
11562
11563 if test "$HAVE_GTK_TEAROFF_MENU_ITEM" = yes; then
11564 for ac_func in gtk_tearoff_menu_item_new
11565do :
11566 ac_fn_c_check_func "$LINENO" "gtk_tearoff_menu_item_new" "ac_cv_func_gtk_tearoff_menu_item_new"
11567if test "x$ac_cv_func_gtk_tearoff_menu_item_new" = x""yes; then :
11568 cat >>confdefs.h <<_ACEOF
11569#define HAVE_GTK_TEAROFF_MENU_ITEM_NEW 1
11570_ACEOF
11571
11572fi
11573done
11574
11575 fi
067d23c9 11576
5476a9a4
GM
11577 for ac_func in gtk_widget_get_window gtk_widget_set_has_window \
11578 gtk_dialog_get_action_area gtk_widget_get_sensitive \
11579 gtk_widget_get_mapped gtk_adjustment_get_page_size \
11580 gtk_orientable_set_orientation \
11581 gtk_window_set_has_resize_grip
11582do :
11583 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11584ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11585eval as_val=\$$as_ac_var
11586 if test "x$as_val" = x""yes; then :
11587 cat >>confdefs.h <<_ACEOF
11588#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11589_ACEOF
067d23c9 11590
5476a9a4
GM
11591fi
11592done
067d23c9 11593
42dcba54
GM
11594
11595 term_header=gtkutil.h
5476a9a4 11596fi
067d23c9 11597
5476a9a4
GM
11598HAVE_DBUS=no
11599DBUS_OBJ=
11600if test "${with_dbus}" = "yes"; then
067d23c9 11601
5476a9a4 11602 succeeded=no
067d23c9 11603
5476a9a4
GM
11604 if test "$PKG_CONFIG" = "no" ; then
11605 HAVE_DBUS=no
f199cab1 11606 else
5476a9a4 11607 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 11608 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
11609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbus-1 >= 1.0" >&5
11610$as_echo_n "checking for dbus-1 >= 1.0... " >&6; }
067d23c9 11611
b5591ebb
GM
11612 if "$PKG_CONFIG" --exists "dbus-1 >= 1.0" 2>&5 &&
11613 DBUS_CFLAGS=`"$PKG_CONFIG" --cflags "dbus-1 >= 1.0" 2>&5` &&
11614 DBUS_LIBS=`"$PKG_CONFIG" --libs "dbus-1 >= 1.0" 2>&5`; then
5476a9a4
GM
11615 edit_cflags="
11616 s,///*,/,g
11617 s/^/ /
11618 s/ -I/ $isystem/g
11619 s/^ //
11620 "
11621 DBUS_CFLAGS=`$as_echo "$DBUS_CFLAGS" | sed -e "$edit_cflags"`
11622 DBUS_LIBS=`$as_echo "$DBUS_LIBS" | sed -e 's,///*,/,g'`
11623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$DBUS_CFLAGS' LIBS='$DBUS_LIBS'" >&5
11624$as_echo "yes CFLAGS='$DBUS_CFLAGS' LIBS='$DBUS_LIBS'" >&6; }
11625 succeeded=yes
11626 else
11627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11628$as_echo "no" >&6; }
11629 DBUS_CFLAGS=""
11630 DBUS_LIBS=""
11631 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
11632 ## do set a variable so people can do so. Do it in a subshell
11633 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 11634 DBUS_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "dbus-1 >= 1.0") 2>&1`
067d23c9 11635
5476a9a4 11636 fi
067d23c9 11637
15f79fcd 11638
067d23c9 11639
5476a9a4
GM
11640 else
11641 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11642 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11643 fi
067d23c9 11644 fi
067d23c9 11645
5476a9a4
GM
11646 if test $succeeded = yes; then
11647 HAVE_DBUS=yes
f199cab1 11648 else
5476a9a4 11649 HAVE_DBUS=no
f199cab1 11650 fi
067d23c9 11651
5476a9a4
GM
11652 if test "$HAVE_DBUS" = yes; then
11653 LIBS="$LIBS $DBUS_LIBS"
067d23c9 11654
5476a9a4 11655$as_echo "#define HAVE_DBUS 1" >>confdefs.h
067d23c9 11656
5476a9a4
GM
11657 for ac_func in dbus_watch_get_unix_fd \
11658 dbus_type_is_valid \
11659 dbus_validate_bus_name \
11660 dbus_validate_path \
11661 dbus_validate_interface \
11662 dbus_validate_member
11663do :
11664 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11665ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11666eval as_val=\$$as_ac_var
11667 if test "x$as_val" = x""yes; then :
11668 cat >>confdefs.h <<_ACEOF
11669#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11670_ACEOF
067d23c9 11671
5476a9a4
GM
11672fi
11673done
067d23c9 11674
5476a9a4
GM
11675 DBUS_OBJ=dbusbind.o
11676 fi
11677fi
067d23c9
KY
11678
11679
5476a9a4
GM
11680HAVE_GSETTINGS=no
11681if test "${HAVE_X11}" = "yes" && test "${with_gsettings}" = "yes"; then
067d23c9 11682
5476a9a4 11683 succeeded=no
067d23c9 11684
5476a9a4
GM
11685 if test "$PKG_CONFIG" = "no" ; then
11686 HAVE_GSETTINGS=no
11687 else
11688 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 11689 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
11690 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gio-2.0 >= 2.26" >&5
11691$as_echo_n "checking for gio-2.0 >= 2.26... " >&6; }
0afb4571 11692
b5591ebb
GM
11693 if "$PKG_CONFIG" --exists "gio-2.0 >= 2.26" 2>&5 &&
11694 GSETTINGS_CFLAGS=`"$PKG_CONFIG" --cflags "gio-2.0 >= 2.26" 2>&5` &&
11695 GSETTINGS_LIBS=`"$PKG_CONFIG" --libs "gio-2.0 >= 2.26" 2>&5`; then
5476a9a4
GM
11696 edit_cflags="
11697 s,///*,/,g
11698 s/^/ /
11699 s/ -I/ $isystem/g
11700 s/^ //
11701 "
11702 GSETTINGS_CFLAGS=`$as_echo "$GSETTINGS_CFLAGS" | sed -e "$edit_cflags"`
11703 GSETTINGS_LIBS=`$as_echo "$GSETTINGS_LIBS" | sed -e 's,///*,/,g'`
11704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GSETTINGS_CFLAGS' LIBS='$GSETTINGS_LIBS'" >&5
11705$as_echo "yes CFLAGS='$GSETTINGS_CFLAGS' LIBS='$GSETTINGS_LIBS'" >&6; }
11706 succeeded=yes
11707 else
11708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11709$as_echo "no" >&6; }
11710 GSETTINGS_CFLAGS=""
11711 GSETTINGS_LIBS=""
11712 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
11713 ## do set a variable so people can do so. Do it in a subshell
11714 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 11715 GSETTINGS_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "gio-2.0 >= 2.26") 2>&1`
0afb4571 11716
5476a9a4 11717 fi
067d23c9
KY
11718
11719
11720
11721 else
5476a9a4
GM
11722 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11723 echo "*** See http://www.freedesktop.org/software/pkgconfig"
067d23c9 11724 fi
5476a9a4 11725 fi
067d23c9 11726
5476a9a4
GM
11727 if test $succeeded = yes; then
11728 HAVE_GSETTINGS=yes
11729 else
11730 HAVE_GSETTINGS=no
11731 fi
f199cab1 11732
5476a9a4 11733 if test "$HAVE_GSETTINGS" = "yes"; then
f199cab1 11734
5476a9a4 11735$as_echo "#define HAVE_GSETTINGS 1" >>confdefs.h
f199cab1 11736
5476a9a4
GM
11737 SETTINGS_CFLAGS="$GSETTINGS_CFLAGS"
11738 SETTINGS_LIBS="$GSETTINGS_LIBS"
11739 fi
11740fi
067d23c9 11741
5476a9a4
GM
11742HAVE_GCONF=no
11743if test "${HAVE_X11}" = "yes" && test "${with_gconf}" = "yes"; then
067d23c9 11744
5476a9a4 11745 succeeded=no
067d23c9 11746
5476a9a4
GM
11747 if test "$PKG_CONFIG" = "no" ; then
11748 HAVE_GCONF=no
11749 else
11750 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 11751 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
11752 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gconf-2.0 >= 2.13" >&5
11753$as_echo_n "checking for gconf-2.0 >= 2.13... " >&6; }
067d23c9 11754
b5591ebb
GM
11755 if "$PKG_CONFIG" --exists "gconf-2.0 >= 2.13" 2>&5 &&
11756 GCONF_CFLAGS=`"$PKG_CONFIG" --cflags "gconf-2.0 >= 2.13" 2>&5` &&
11757 GCONF_LIBS=`"$PKG_CONFIG" --libs "gconf-2.0 >= 2.13" 2>&5`; then
5476a9a4
GM
11758 edit_cflags="
11759 s,///*,/,g
11760 s/^/ /
11761 s/ -I/ $isystem/g
11762 s/^ //
11763 "
11764 GCONF_CFLAGS=`$as_echo "$GCONF_CFLAGS" | sed -e "$edit_cflags"`
11765 GCONF_LIBS=`$as_echo "$GCONF_LIBS" | sed -e 's,///*,/,g'`
11766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GCONF_CFLAGS' LIBS='$GCONF_LIBS'" >&5
11767$as_echo "yes CFLAGS='$GCONF_CFLAGS' LIBS='$GCONF_LIBS'" >&6; }
11768 succeeded=yes
11769 else
11770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11771$as_echo "no" >&6; }
11772 GCONF_CFLAGS=""
11773 GCONF_LIBS=""
11774 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
11775 ## do set a variable so people can do so. Do it in a subshell
11776 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 11777 GCONF_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "gconf-2.0 >= 2.13") 2>&1`
067d23c9 11778
5476a9a4 11779 fi
f199cab1 11780
f199cab1
GM
11781
11782
5476a9a4
GM
11783 else
11784 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11785 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11786 fi
11787 fi
f199cab1 11788
5476a9a4
GM
11789 if test $succeeded = yes; then
11790 HAVE_GCONF=yes
11791 else
11792 HAVE_GCONF=no
11793 fi
f199cab1 11794
5476a9a4 11795 if test "$HAVE_GCONF" = yes; then
f199cab1 11796
5476a9a4 11797$as_echo "#define HAVE_GCONF 1" >>confdefs.h
f199cab1 11798
5476a9a4
GM
11799 SETTINGS_CFLAGS="$SETTINGS_CFLAGS $GCONF_CFLAGS"
11800 SETTINGS_LIBS="$SETTINGS_LIBS $GCONF_LIBS"
11801 fi
11802fi
f199cab1 11803
5476a9a4 11804if test "$HAVE_GSETTINGS" = "yes" || test "$HAVE_GCONF" = "yes"; then
dcde497f
GM
11805
11806 succeeded=no
11807
11808 if test "$PKG_CONFIG" = "no" ; then
11809 HAVE_GOBJECT=no
11810 else
11811 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 11812 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
dcde497f
GM
11813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gobject-2.0 >= 2.0" >&5
11814$as_echo_n "checking for gobject-2.0 >= 2.0... " >&6; }
11815
b5591ebb
GM
11816 if "$PKG_CONFIG" --exists "gobject-2.0 >= 2.0" 2>&5 &&
11817 GOBJECT_CFLAGS=`"$PKG_CONFIG" --cflags "gobject-2.0 >= 2.0" 2>&5` &&
11818 GOBJECT_LIBS=`"$PKG_CONFIG" --libs "gobject-2.0 >= 2.0" 2>&5`; then
dcde497f
GM
11819 edit_cflags="
11820 s,///*,/,g
11821 s/^/ /
11822 s/ -I/ $isystem/g
11823 s/^ //
11824 "
11825 GOBJECT_CFLAGS=`$as_echo "$GOBJECT_CFLAGS" | sed -e "$edit_cflags"`
11826 GOBJECT_LIBS=`$as_echo "$GOBJECT_LIBS" | sed -e 's,///*,/,g'`
11827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GOBJECT_CFLAGS' LIBS='$GOBJECT_LIBS'" >&5
11828$as_echo "yes CFLAGS='$GOBJECT_CFLAGS' LIBS='$GOBJECT_LIBS'" >&6; }
11829 succeeded=yes
11830 else
11831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11832$as_echo "no" >&6; }
11833 GOBJECT_CFLAGS=""
11834 GOBJECT_LIBS=""
11835 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
11836 ## do set a variable so people can do so. Do it in a subshell
11837 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 11838 GOBJECT_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "gobject-2.0 >= 2.0") 2>&1`
dcde497f
GM
11839
11840 fi
11841
11842
11843
11844 else
11845 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11846 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11847 fi
11848 fi
11849
11850 if test $succeeded = yes; then
11851 HAVE_GOBJECT=yes
11852 else
11853 HAVE_GOBJECT=no
11854 fi
11855
11856 if test "$HAVE_GOBJECT" = "yes"; then
11857 SETTINGS_CFLAGS="$SETTINGS_CFLAGS $GOBJECT_CFLAGS"
11858 SETTINGS_LIBS="$SETTINGS_LIBS $GOBJECT_LIBS"
11859 fi
5476a9a4
GM
11860 SAVE_CFLAGS="$CFLAGS"
11861 SAVE_LIBS="$LIBS"
11862 CFLAGS="$SETTINGS_CFLAGS $CFLAGS"
11863 LIBS="$SETTINGS_LIBS $LIBS"
11864 for ac_func in g_type_init
11865do :
11866 ac_fn_c_check_func "$LINENO" "g_type_init" "ac_cv_func_g_type_init"
11867if test "x$ac_cv_func_g_type_init" = x""yes; then :
11868 cat >>confdefs.h <<_ACEOF
11869#define HAVE_G_TYPE_INIT 1
067d23c9 11870_ACEOF
067d23c9 11871
5476a9a4
GM
11872fi
11873done
067d23c9 11874
5476a9a4
GM
11875 CFLAGS="$SAVE_CFLAGS"
11876 LIBS="$SAVE_LIBS"
11877fi
067d23c9 11878
067d23c9 11879
f199cab1 11880
067d23c9 11881
5476a9a4
GM
11882HAVE_LIBSELINUX=no
11883LIBSELINUX_LIBS=
11884if test "${with_selinux}" = "yes"; then
11885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lgetfilecon in -lselinux" >&5
11886$as_echo_n "checking for lgetfilecon in -lselinux... " >&6; }
11887if test "${ac_cv_lib_selinux_lgetfilecon+set}" = set; then :
11888 $as_echo_n "(cached) " >&6
11889else
11890 ac_check_lib_save_LIBS=$LIBS
11891LIBS="-lselinux $LIBS"
11892cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11893/* end confdefs.h. */
067d23c9 11894
5476a9a4
GM
11895/* Override any GCC internal prototype to avoid an error.
11896 Use char because int might match the return type of a GCC
11897 builtin and then its argument prototype would still apply. */
11898#ifdef __cplusplus
11899extern "C"
f199cab1 11900#endif
5476a9a4 11901char lgetfilecon ();
f199cab1
GM
11902int
11903main ()
11904{
5476a9a4 11905return lgetfilecon ();
f199cab1
GM
11906 ;
11907 return 0;
11908}
11909_ACEOF
5476a9a4
GM
11910if ac_fn_c_try_link "$LINENO"; then :
11911 ac_cv_lib_selinux_lgetfilecon=yes
11912else
11913 ac_cv_lib_selinux_lgetfilecon=no
f199cab1 11914fi
5476a9a4
GM
11915rm -f core conftest.err conftest.$ac_objext \
11916 conftest$ac_exeext conftest.$ac_ext
11917LIBS=$ac_check_lib_save_LIBS
11918fi
11919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_lgetfilecon" >&5
11920$as_echo "$ac_cv_lib_selinux_lgetfilecon" >&6; }
11921if test "x$ac_cv_lib_selinux_lgetfilecon" = x""yes; then :
11922 HAVE_LIBSELINUX=yes
11923else
11924 HAVE_LIBSELINUX=no
067d23c9
KY
11925fi
11926
5476a9a4 11927 if test "$HAVE_LIBSELINUX" = yes; then
067d23c9 11928
5476a9a4 11929$as_echo "#define HAVE_LIBSELINUX 1" >>confdefs.h
067d23c9 11930
5476a9a4
GM
11931 LIBSELINUX_LIBS=-lselinux
11932 fi
f199cab1 11933fi
067d23c9 11934
067d23c9 11935
5476a9a4
GM
11936HAVE_GNUTLS=no
11937HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY=no
11938if test "${with_gnutls}" = "yes" ; then
067d23c9 11939
5476a9a4 11940 succeeded=no
067d23c9 11941
5476a9a4
GM
11942 if test "$PKG_CONFIG" = "no" ; then
11943 HAVE_GNUTLS=no
11944 else
11945 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 11946 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
11947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gnutls >= 2.6.6" >&5
11948$as_echo_n "checking for gnutls >= 2.6.6... " >&6; }
067d23c9 11949
b5591ebb
GM
11950 if "$PKG_CONFIG" --exists "gnutls >= 2.6.6" 2>&5 &&
11951 LIBGNUTLS_CFLAGS=`"$PKG_CONFIG" --cflags "gnutls >= 2.6.6" 2>&5` &&
11952 LIBGNUTLS_LIBS=`"$PKG_CONFIG" --libs "gnutls >= 2.6.6" 2>&5`; then
5476a9a4
GM
11953 edit_cflags="
11954 s,///*,/,g
11955 s/^/ /
11956 s/ -I/ $isystem/g
11957 s/^ //
11958 "
11959 LIBGNUTLS_CFLAGS=`$as_echo "$LIBGNUTLS_CFLAGS" | sed -e "$edit_cflags"`
11960 LIBGNUTLS_LIBS=`$as_echo "$LIBGNUTLS_LIBS" | sed -e 's,///*,/,g'`
11961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBGNUTLS_CFLAGS' LIBS='$LIBGNUTLS_LIBS'" >&5
11962$as_echo "yes CFLAGS='$LIBGNUTLS_CFLAGS' LIBS='$LIBGNUTLS_LIBS'" >&6; }
11963 succeeded=yes
11964 else
11965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11966$as_echo "no" >&6; }
11967 LIBGNUTLS_CFLAGS=""
11968 LIBGNUTLS_LIBS=""
11969 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
11970 ## do set a variable so people can do so. Do it in a subshell
11971 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 11972 LIBGNUTLS_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "gnutls >= 2.6.6") 2>&1`
067d23c9 11973
5476a9a4 11974 fi
067d23c9 11975
067d23c9 11976
067d23c9 11977
5476a9a4
GM
11978 else
11979 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11980 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11981 fi
11982 fi
067d23c9 11983
5476a9a4
GM
11984 if test $succeeded = yes; then
11985 HAVE_GNUTLS=yes
11986 else
11987 HAVE_GNUTLS=no
11988 fi
067d23c9 11989
5476a9a4 11990 if test "${HAVE_GNUTLS}" = "yes"; then
067d23c9 11991
5476a9a4 11992$as_echo "#define HAVE_GNUTLS 1" >>confdefs.h
067d23c9 11993
5476a9a4 11994 fi
f199cab1 11995
7c61eaab
GM
11996 OLD_CFLAGS=$CFLAGS
11997 OLD_LIBS=$LIBS
5476a9a4
GM
11998 CFLAGS="$CFLAGS $LIBGNUTLS_CFLAGS"
11999 LIBS="$LIBGNUTLS_LIBS $LIBS"
12000 for ac_func in gnutls_certificate_set_verify_function
12001do :
12002 ac_fn_c_check_func "$LINENO" "gnutls_certificate_set_verify_function" "ac_cv_func_gnutls_certificate_set_verify_function"
12003if test "x$ac_cv_func_gnutls_certificate_set_verify_function" = x""yes; then :
12004 cat >>confdefs.h <<_ACEOF
12005#define HAVE_GNUTLS_CERTIFICATE_SET_VERIFY_FUNCTION 1
f199cab1 12006_ACEOF
5476a9a4
GM
12007 HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY=yes
12008fi
12009done
067d23c9
KY
12010
12011
5476a9a4
GM
12012 if test "${HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY}" = "yes"; then
12013
12014$as_echo "#define HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY 1" >>confdefs.h
f527bd02 12015
f199cab1 12016 fi
7c61eaab
GM
12017
12018 # Windows loads GnuTLS dynamically
12019 if test "${opsys}" = "mingw32"; then
12020 CFLAGS=$OLD_CFLAGS
12021 LIBS=$OLD_LIBS
12022 LIBGNUTLS_LIBS=
12023 fi
5476a9a4 12024fi
f527bd02 12025
f527bd02 12026
5476a9a4
GM
12027
12028
0f55a32e
GM
12029NOTIFY_OBJ=
12030NOTIFY_SUMMARY=no
12031
12032if test "${with_file_notification}" = "yes"; then
12033 if test "${opsys}" = "mingw32"; then
12034 with_file_notification=w32
12035 else
7cee6e79
GM
12036 if test "${with_ns}" != yes; then
12037 with_file_notification=gfile
12038 fi
0f55a32e
GM
12039 fi
12040fi
12041
12042if test "${with_file_notification}" = "gfile"; then
12043
12044 succeeded=no
12045
12046 if test "$PKG_CONFIG" = "no" ; then
12047 HAVE_GFILENOTIFY=no
12048 else
12049 PKG_CONFIG_MIN_VERSION=0.9.0
12050 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
12051 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gio-2.0 >= 2.24" >&5
12052$as_echo_n "checking for gio-2.0 >= 2.24... " >&6; }
12053
12054 if "$PKG_CONFIG" --exists "gio-2.0 >= 2.24" 2>&5 &&
12055 GFILENOTIFY_CFLAGS=`"$PKG_CONFIG" --cflags "gio-2.0 >= 2.24" 2>&5` &&
12056 GFILENOTIFY_LIBS=`"$PKG_CONFIG" --libs "gio-2.0 >= 2.24" 2>&5`; then
12057 edit_cflags="
12058 s,///*,/,g
12059 s/^/ /
12060 s/ -I/ $isystem/g
12061 s/^ //
12062 "
12063 GFILENOTIFY_CFLAGS=`$as_echo "$GFILENOTIFY_CFLAGS" | sed -e "$edit_cflags"`
12064 GFILENOTIFY_LIBS=`$as_echo "$GFILENOTIFY_LIBS" | sed -e 's,///*,/,g'`
12065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GFILENOTIFY_CFLAGS' LIBS='$GFILENOTIFY_LIBS'" >&5
12066$as_echo "yes CFLAGS='$GFILENOTIFY_CFLAGS' LIBS='$GFILENOTIFY_LIBS'" >&6; }
12067 succeeded=yes
12068 else
12069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12070$as_echo "no" >&6; }
12071 GFILENOTIFY_CFLAGS=""
12072 GFILENOTIFY_LIBS=""
12073 ## If we have a custom action on failure, don't print errors, but
12074 ## do set a variable so people can do so. Do it in a subshell
12075 ## to capture any diagnostics in invoking pkg-config.
12076 GFILENOTIFY_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "gio-2.0 >= 2.24") 2>&1`
12077
12078 fi
12079
12080
12081
12082 else
12083 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12084 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12085 fi
12086 fi
12087
12088 if test $succeeded = yes; then
12089 HAVE_GFILENOTIFY=yes
12090 else
12091 HAVE_GFILENOTIFY=no
12092 fi
12093
12094 if test "$HAVE_GFILENOTIFY" = "yes"; then
12095
12096$as_echo "#define HAVE_GFILENOTIFY 1" >>confdefs.h
12097
12098 NOTIFY_OBJ=gfilenotify.o
12099 NOTIFY_SUMMARY="yes -lgio (gfile)"
12100 fi
12101fi
12102if test "${with_file_notification}" = "inotify"; then
12103 ac_fn_c_check_header_mongrel "$LINENO" "sys/inotify.h" "ac_cv_header_sys_inotify_h" "$ac_includes_default"
b5eb356a 12104if test "x$ac_cv_header_sys_inotify_h" = x""yes; then :
b5eb356a
GM
12105
12106fi
12107
b5eb356a
GM
12108
12109 if test "$ac_cv_header_sys_inotify_h" = yes ; then
0f55a32e 12110 ac_fn_c_check_func "$LINENO" "inotify_init1" "ac_cv_func_inotify_init1"
b5eb356a
GM
12111if test "x$ac_cv_func_inotify_init1" = x""yes; then :
12112
12113fi
12114
0f55a32e
GM
12115 if test "$ac_cv_func_inotify_init1" = yes; then
12116
12117$as_echo "#define HAVE_INOTIFY 1" >>confdefs.h
12118
12119 NOTIFY_OBJ=inotify.o
12120 NOTIFY_SUMMARY="yes -lglibc (inotify)"
12121 fi
12122 fi
12123fi
12124if test "${with_file_notification}" = "w32"; then
12125 ac_fn_c_check_header_mongrel "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default"
12126if test "x$ac_cv_header_windows_h" = x""yes; then :
12127
12128fi
12129
12130
12131 if test "$ac_cv_header_windows_h" = yes ; then
12132
12133$as_echo "#define HAVE_W32NOTIFY 1" >>confdefs.h
12134
12135 NOTIFY_OBJ=w32notify.o
12136 NOTIFY_SUMMARY="yes (w32)"
b5eb356a
GM
12137 fi
12138fi
0f55a32e 12139if test -n "$NOTIFY_OBJ"; then
b5eb356a 12140
0f55a32e 12141$as_echo "#define USE_FILE_NOTIFY 1" >>confdefs.h
b5eb356a
GM
12142
12143fi
12144
0f55a32e
GM
12145
12146
12147
5476a9a4
GM
12148HAVE_XAW3D=no
12149LUCID_LIBW=
12150if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then
12151 if test "$with_xaw3d" != no; then
5476a9a4 12152 if test "${emacs_cv_xaw3d+set}" = set; then :
f199cab1
GM
12153 $as_echo_n "(cached) " >&6
12154else
5476a9a4
GM
12155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12156/* end confdefs.h. */
f527bd02 12157
5476a9a4
GM
12158#include <X11/Intrinsic.h>
12159#include <X11/Xaw3d/Simple.h>
12160int
12161main ()
12162{
12163
12164 ;
12165 return 0;
12166}
12167_ACEOF
12168if ac_fn_c_try_link "$LINENO"; then :
12169 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XawScrollbarSetThumb in -lXaw3d" >&5
12170$as_echo_n "checking for XawScrollbarSetThumb in -lXaw3d... " >&6; }
12171if test "${ac_cv_lib_Xaw3d_XawScrollbarSetThumb+set}" = set; then :
12172 $as_echo_n "(cached) " >&6
12173else
12174 ac_check_lib_save_LIBS=$LIBS
12175LIBS="-lXaw3d $LIBS"
12176cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12177/* end confdefs.h. */
f527bd02 12178
5476a9a4
GM
12179/* Override any GCC internal prototype to avoid an error.
12180 Use char because int might match the return type of a GCC
12181 builtin and then its argument prototype would still apply. */
12182#ifdef __cplusplus
12183extern "C"
12184#endif
12185char XawScrollbarSetThumb ();
12186int
12187main ()
12188{
12189return XawScrollbarSetThumb ();
12190 ;
12191 return 0;
12192}
12193_ACEOF
12194if ac_fn_c_try_link "$LINENO"; then :
12195 ac_cv_lib_Xaw3d_XawScrollbarSetThumb=yes
f199cab1 12196else
5476a9a4 12197 ac_cv_lib_Xaw3d_XawScrollbarSetThumb=no
f199cab1 12198fi
5476a9a4
GM
12199rm -f core conftest.err conftest.$ac_objext \
12200 conftest$ac_exeext conftest.$ac_ext
12201LIBS=$ac_check_lib_save_LIBS
12202fi
12203{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&5
12204$as_echo "$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&6; }
12205if test "x$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" = x""yes; then :
12206 emacs_cv_xaw3d=yes
12207else
12208 emacs_cv_xaw3d=no
f199cab1 12209fi
f527bd02 12210
5476a9a4
GM
12211else
12212 emacs_cv_xaw3d=no
12213fi
12214rm -f core conftest.err conftest.$ac_objext \
12215 conftest$ac_exeext conftest.$ac_ext
12216fi
f527bd02 12217
5476a9a4
GM
12218 else
12219 emacs_cv_xaw3d=no
12220 fi
12221 if test $emacs_cv_xaw3d = yes; then
4fa92495
GM
12222 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xaw3d" >&5
12223$as_echo_n "checking for xaw3d... " >&6; }
5476a9a4
GM
12224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5
12225$as_echo "yes; using Lucid toolkit" >&6; }
12226 USE_X_TOOLKIT=LUCID
12227 HAVE_XAW3D=yes
12228 LUCID_LIBW=-lXaw3d
f527bd02 12229
5476a9a4 12230$as_echo "#define HAVE_XAW3D 1" >>confdefs.h
f527bd02 12231
5476a9a4 12232 else
4fa92495
GM
12233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xaw3d" >&5
12234$as_echo_n "checking for xaw3d... " >&6; }
5476a9a4
GM
12235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12236$as_echo "no" >&6; }
12237 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libXaw" >&5
12238$as_echo_n "checking for libXaw... " >&6; }
12239 if test "${emacs_cv_xaw+set}" = set; then :
f199cab1
GM
12240 $as_echo_n "(cached) " >&6
12241else
12242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12243/* end confdefs.h. */
067d23c9 12244
5476a9a4
GM
12245#include <X11/Intrinsic.h>
12246#include <X11/Xaw/Simple.h>
f199cab1
GM
12247int
12248main ()
12249{
067d23c9 12250
f199cab1
GM
12251 ;
12252 return 0;
12253}
12254_ACEOF
5476a9a4
GM
12255if ac_fn_c_try_link "$LINENO"; then :
12256 emacs_cv_xaw=yes
f199cab1 12257else
5476a9a4 12258 emacs_cv_xaw=no
f199cab1 12259fi
5476a9a4
GM
12260rm -f core conftest.err conftest.$ac_objext \
12261 conftest$ac_exeext conftest.$ac_ext
f199cab1 12262fi
067d23c9 12263
5476a9a4
GM
12264 if test $emacs_cv_xaw = yes; then
12265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5
12266$as_echo "yes; using Lucid toolkit" >&6; }
12267 USE_X_TOOLKIT=LUCID
12268 LUCID_LIBW=-lXaw
12269 elif test x"${USE_X_TOOLKIT}" = xLUCID; then
12270 as_fn_error "Lucid toolkit requires X11/Xaw include files" "$LINENO" 5
f199cab1 12271 else
5476a9a4
GM
12272 as_fn_error "No X toolkit could be found.
12273If you are sure you want Emacs compiled without an X toolkit, pass
12274 --with-x-toolkit=no
12275to configure. Otherwise, install the development libraries for the toolkit
12276that you want to use (e.g. Gtk+) and re-run configure." "$LINENO" 5
f199cab1 12277 fi
5476a9a4
GM
12278 fi
12279fi
067d23c9 12280
5476a9a4 12281X_TOOLKIT_TYPE=$USE_X_TOOLKIT
067d23c9 12282
5476a9a4
GM
12283LIBXTR6=
12284if test "${USE_X_TOOLKIT}" != "none"; then
12285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 toolkit version" >&5
12286$as_echo_n "checking X11 toolkit version... " >&6; }
12287 if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then :
f199cab1
GM
12288 $as_echo_n "(cached) " >&6
12289else
5476a9a4 12290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 12291/* end confdefs.h. */
5476a9a4 12292#include <X11/Intrinsic.h>
f199cab1
GM
12293int
12294main ()
12295{
5476a9a4
GM
12296#if XtSpecificationRelease < 6
12297fail;
12298#endif
f527bd02 12299
f199cab1
GM
12300 ;
12301 return 0;
12302}
067d23c9 12303_ACEOF
5476a9a4
GM
12304if ac_fn_c_try_link "$LINENO"; then :
12305 emacs_cv_x11_toolkit_version_6=yes
12306else
12307 emacs_cv_x11_toolkit_version_6=no
067d23c9 12308fi
5476a9a4
GM
12309rm -f core conftest.err conftest.$ac_objext \
12310 conftest$ac_exeext conftest.$ac_ext
067d23c9
KY
12311fi
12312
5476a9a4
GM
12313 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
12314 if test $emacs_cv_x11_toolkit_version_6 = yes; then
12315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5
12316$as_echo "6 or newer" >&6; }
f527bd02 12317
5476a9a4 12318$as_echo "#define HAVE_X11XTR6 1" >>confdefs.h
f527bd02 12319
5476a9a4
GM
12320 LIBXTR6="-lSM -lICE"
12321 case "$opsys" in
12322 ## Use libw.a along with X11R6 Xt.
12323 unixware) LIBXTR6="$LIBXTR6 -lw" ;;
12324 esac
12325 else
12326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5
12327$as_echo "before 6" >&6; }
f199cab1 12328 fi
f527bd02 12329
5476a9a4
GM
12330 OLDLIBS="$LIBS"
12331 if test x$HAVE_X11XTR6 = xyes; then
12332 LIBS="-lXt -lSM -lICE $LIBS"
12333 else
12334 LIBS="-lXt $LIBS"
12335 fi
12336 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XmuConvertStandardSelection in -lXmu" >&5
12337$as_echo_n "checking for XmuConvertStandardSelection in -lXmu... " >&6; }
12338if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then :
12339 $as_echo_n "(cached) " >&6
12340else
12341 ac_check_lib_save_LIBS=$LIBS
12342LIBS="-lXmu $LIBS"
12343cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12344/* end confdefs.h. */
f199cab1 12345
5476a9a4
GM
12346/* Override any GCC internal prototype to avoid an error.
12347 Use char because int might match the return type of a GCC
12348 builtin and then its argument prototype would still apply. */
12349#ifdef __cplusplus
12350extern "C"
12351#endif
12352char XmuConvertStandardSelection ();
067d23c9
KY
12353int
12354main ()
12355{
5476a9a4 12356return XmuConvertStandardSelection ();
067d23c9
KY
12357 ;
12358 return 0;
12359}
12360_ACEOF
5476a9a4
GM
12361if ac_fn_c_try_link "$LINENO"; then :
12362 ac_cv_lib_Xmu_XmuConvertStandardSelection=yes
12363else
12364 ac_cv_lib_Xmu_XmuConvertStandardSelection=no
067d23c9 12365fi
5476a9a4
GM
12366rm -f core conftest.err conftest.$ac_objext \
12367 conftest$ac_exeext conftest.$ac_ext
12368LIBS=$ac_check_lib_save_LIBS
067d23c9 12369fi
5476a9a4
GM
12370{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5
12371$as_echo "$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6; }
12372if test "x$ac_cv_lib_Xmu_XmuConvertStandardSelection" = x""yes; then :
12373 cat >>confdefs.h <<_ACEOF
12374#define HAVE_LIBXMU 1
f199cab1
GM
12375_ACEOF
12376
5476a9a4 12377 LIBS="-lXmu $LIBS"
f199cab1 12378
067d23c9
KY
12379fi
12380
5476a9a4
GM
12381 test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
12382 fi
067d23c9 12383
067d23c9 12384
5476a9a4
GM
12385LIBXMU=-lXmu
12386case $opsys in
12387 ## These systems don't supply Xmu.
12388 hpux* | aix4-2 )
12389 test "X$ac_cv_lib_Xmu_XmuConvertStandardSelection" != "Xyes" && LIBXMU=
12390 ;;
7c61eaab
GM
12391 mingw32 )
12392 LIBXMU=
12393 ;;
5476a9a4 12394esac
067d23c9
KY
12395
12396
5476a9a4
GM
12397# On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
12398if test "${HAVE_X11}" = "yes"; then
12399 if test "${USE_X_TOOLKIT}" != "none"; then
12400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XShapeQueryExtension in -lXext" >&5
12401$as_echo_n "checking for XShapeQueryExtension in -lXext... " >&6; }
12402if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then :
f199cab1
GM
12403 $as_echo_n "(cached) " >&6
12404else
5476a9a4
GM
12405 ac_check_lib_save_LIBS=$LIBS
12406LIBS="-lXext $LIBS"
12407cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 12408/* end confdefs.h. */
f199cab1 12409
5476a9a4
GM
12410/* Override any GCC internal prototype to avoid an error.
12411 Use char because int might match the return type of a GCC
12412 builtin and then its argument prototype would still apply. */
12413#ifdef __cplusplus
12414extern "C"
12415#endif
12416char XShapeQueryExtension ();
12417int
12418main ()
12419{
12420return XShapeQueryExtension ();
12421 ;
12422 return 0;
12423}
e7d4e61f 12424_ACEOF
5476a9a4
GM
12425if ac_fn_c_try_link "$LINENO"; then :
12426 ac_cv_lib_Xext_XShapeQueryExtension=yes
12427else
12428 ac_cv_lib_Xext_XShapeQueryExtension=no
067d23c9 12429fi
5476a9a4
GM
12430rm -f core conftest.err conftest.$ac_objext \
12431 conftest$ac_exeext conftest.$ac_ext
12432LIBS=$ac_check_lib_save_LIBS
12433fi
12434{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
12435$as_echo "$ac_cv_lib_Xext_XShapeQueryExtension" >&6; }
12436if test "x$ac_cv_lib_Xext_XShapeQueryExtension" = x""yes; then :
12437 cat >>confdefs.h <<_ACEOF
12438#define HAVE_LIBXEXT 1
12439_ACEOF
f199cab1 12440
5476a9a4 12441 LIBS="-lXext $LIBS"
f199cab1 12442
5476a9a4 12443fi
f199cab1 12444
5476a9a4
GM
12445 fi
12446fi
f199cab1 12447
5476a9a4
GM
12448LIBXP=
12449if test "${USE_X_TOOLKIT}" = "MOTIF"; then
8ad96b1d
GM
12450 # OpenMotif may be installed in such a way on some GNU/Linux systems.
12451 if test -d /usr/include/openmotif; then
12452 CPPFLAGS="-I/usr/include/openmotif $CPPFLAGS"
12453 emacs_cv_openmotif=yes
12454 case "$canonical" in
12455 x86_64-*-linux-gnu* | powerpc64-*-linux-gnu* | sparc64-*-linux-gnu*)
12456 test -d /usr/lib64/openmotif && LDFLAGS="-L/usr/lib64/openmotif $LDFLAGS"
12457 ;;
12458 *)
12459 test -d /usr/lib/openmotif && LDFLAGS="-L/usr/lib/openmotif $LDFLAGS"
12460 esac
12461 else
12462 emacs_cv_openmotif=no
12463 fi
12464 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for (Open)Motif version 2.1" >&5
12465$as_echo_n "checking for (Open)Motif version 2.1... " >&6; }
5476a9a4 12466if test "${emacs_cv_motif_version_2_1+set}" = set; then :
ae1362a3
AS
12467 $as_echo_n "(cached) " >&6
12468else
f199cab1
GM
12469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12470/* end confdefs.h. */
5476a9a4
GM
12471#include <Xm/Xm.h>
12472int
12473main ()
12474{
12475#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
12476int x = 5;
12477#else
12478Motif version prior to 2.1.
12479#endif
12480 ;
12481 return 0;
12482}
12483_ACEOF
12484if ac_fn_c_try_compile "$LINENO"; then :
12485 emacs_cv_motif_version_2_1=yes
12486else
12487 emacs_cv_motif_version_2_1=no
12488fi
12489rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12490fi
12491{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_motif_version_2_1" >&5
12492$as_echo "$emacs_cv_motif_version_2_1" >&6; }
12493 if test $emacs_cv_motif_version_2_1 = yes; then
12494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpCreateContext in -lXp" >&5
12495$as_echo_n "checking for XpCreateContext in -lXp... " >&6; }
12496if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then :
12497 $as_echo_n "(cached) " >&6
12498else
12499 ac_check_lib_save_LIBS=$LIBS
12500LIBS="-lXp $LIBS"
12501cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12502/* end confdefs.h. */
f199cab1 12503
5476a9a4
GM
12504/* Override any GCC internal prototype to avoid an error.
12505 Use char because int might match the return type of a GCC
12506 builtin and then its argument prototype would still apply. */
12507#ifdef __cplusplus
12508extern "C"
12509#endif
12510char XpCreateContext ();
ae1362a3
AS
12511int
12512main ()
12513{
5476a9a4 12514return XpCreateContext ();
ae1362a3
AS
12515 ;
12516 return 0;
12517}
12518_ACEOF
5476a9a4
GM
12519if ac_fn_c_try_link "$LINENO"; then :
12520 ac_cv_lib_Xp_XpCreateContext=yes
067d23c9 12521else
5476a9a4 12522 ac_cv_lib_Xp_XpCreateContext=no
067d23c9 12523fi
5476a9a4
GM
12524rm -f core conftest.err conftest.$ac_objext \
12525 conftest$ac_exeext conftest.$ac_ext
12526LIBS=$ac_check_lib_save_LIBS
12527fi
12528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xp_XpCreateContext" >&5
12529$as_echo "$ac_cv_lib_Xp_XpCreateContext" >&6; }
12530if test "x$ac_cv_lib_Xp_XpCreateContext" = x""yes; then :
12531 LIBXP=-lXp
067d23c9 12532fi
f199cab1 12533
8ad96b1d
GM
12534 if test x$emacs_cv_openmotif = xyes; then
12535 REAL_CPPFLAGS="-I/usr/include/openmotif $REAL_CPPFLAGS"
12536 fi
5476a9a4
GM
12537 else
12538 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LessTif where some systems put it" >&5
12539$as_echo_n "checking for LessTif where some systems put it... " >&6; }
12540if test "${emacs_cv_lesstif+set}" = set; then :
067d23c9 12541 $as_echo_n "(cached) " >&6
f199cab1 12542else
5476a9a4
GM
12543 # We put this in CFLAGS temporarily to precede other -I options
12544 # that might be in CFLAGS temporarily.
12545 # We put this in CPPFLAGS where it precedes the other -I options.
12546 OLD_CPPFLAGS=$CPPFLAGS
12547 OLD_CFLAGS=$CFLAGS
12548 CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS"
12549 CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS"
12550 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 12551/* end confdefs.h. */
5476a9a4 12552#include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h>
067d23c9
KY
12553int
12554main ()
12555{
5476a9a4 12556int x = 5;
067d23c9
KY
12557 ;
12558 return 0;
12559}
12560_ACEOF
5476a9a4
GM
12561if ac_fn_c_try_compile "$LINENO"; then :
12562 emacs_cv_lesstif=yes
067d23c9 12563else
5476a9a4 12564 emacs_cv_lesstif=no
067d23c9 12565fi
5476a9a4 12566rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
067d23c9 12567fi
5476a9a4
GM
12568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_lesstif" >&5
12569$as_echo "$emacs_cv_lesstif" >&6; }
12570 if test $emacs_cv_lesstif = yes; then
12571 # Make sure this -I option remains in CPPFLAGS after it is set
12572 # back to REAL_CPPFLAGS.
12573 # There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not
12574 # have those other -I options anyway. Ultimately, having this
12575 # directory ultimately in CPPFLAGS will be enough.
12576 REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS"
12577 LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS"
12578 else
12579 CFLAGS=$OLD_CFLAGS
12580 CPPFLAGS=$OLD_CPPFLAGS
12581 fi
12582 fi
12583 ac_fn_c_check_header_mongrel "$LINENO" "Xm/BulletinB.h" "ac_cv_header_Xm_BulletinB_h" "$ac_includes_default"
12584if test "x$ac_cv_header_Xm_BulletinB_h" = x""yes; then :
067d23c9 12585
5476a9a4
GM
12586else
12587 as_fn_error "Motif toolkit requested but requirements not found." "$LINENO" 5
067d23c9 12588fi
f199cab1
GM
12589
12590
5476a9a4 12591fi
f199cab1
GM
12592
12593
5476a9a4
GM
12594USE_TOOLKIT_SCROLL_BARS=no
12595if test "${with_toolkit_scroll_bars}" != "no"; then
12596 if test "${USE_X_TOOLKIT}" != "none"; then
12597 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
12598 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
f199cab1 12599
5476a9a4
GM
12600 HAVE_XAW3D=no
12601 USE_TOOLKIT_SCROLL_BARS=yes
12602 elif test "${HAVE_XAW3D}" = "yes" || test "${USE_X_TOOLKIT}" = "LUCID"; then
12603 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
f199cab1 12604
5476a9a4
GM
12605 USE_TOOLKIT_SCROLL_BARS=yes
12606 fi
12607 elif test "${HAVE_GTK}" = "yes"; then
12608 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
f199cab1 12609
5476a9a4
GM
12610 USE_TOOLKIT_SCROLL_BARS=yes
12611 elif test "${HAVE_NS}" = "yes"; then
12612 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
f199cab1 12613
5c0255d9
GM
12614 USE_TOOLKIT_SCROLL_BARS=yes
12615 elif test "${HAVE_W32}" = "yes"; then
12616 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
12617
5476a9a4
GM
12618 USE_TOOLKIT_SCROLL_BARS=yes
12619 fi
12620fi
f199cab1 12621
5476a9a4 12622cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 12623/* end confdefs.h. */
5476a9a4
GM
12624
12625 #include <X11/Xlib.h>
12626 #include <X11/Xresource.h>
067d23c9
KY
12627int
12628main ()
12629{
5476a9a4 12630XIMProc callback;
067d23c9
KY
12631 ;
12632 return 0;
12633}
12634_ACEOF
f199cab1 12635if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4
GM
12636 HAVE_XIM=yes
12637
12638$as_echo "#define HAVE_XIM 1" >>confdefs.h
12639
067d23c9 12640else
5476a9a4 12641 HAVE_XIM=no
067d23c9 12642fi
f199cab1 12643rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 12644
f199cab1 12645
5476a9a4
GM
12646if test "${with_xim}" != "no"; then
12647
12648$as_echo "#define USE_XIM 1" >>confdefs.h
12649
12650fi
12651
12652
12653if test "${HAVE_XIM}" != "no"; then
12654 late_CFLAGS=$CFLAGS
12655 if test "$GCC" = yes; then
12656 CFLAGS="$CFLAGS --pedantic-errors"
12657 fi
12658 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12659/* end confdefs.h. */
f199cab1 12660
5476a9a4
GM
12661#include <X11/Xlib.h>
12662#include <X11/Xresource.h>
12663int
12664main ()
12665{
12666Display *display;
12667XrmDatabase db;
12668char *res_name;
12669char *res_class;
12670XIMProc callback;
12671XPointer *client_data;
12672#ifndef __GNUC__
12673/* If we're not using GCC, it's probably not XFree86, and this is
12674 probably right, but we can't use something like --pedantic-errors. */
12675extern Bool XRegisterIMInstantiateCallback(Display*, XrmDatabase, char*,
12676 char*, XIMProc, XPointer*);
12677#endif
12678(void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, callback,
12679 client_data);
067d23c9
KY
12680 ;
12681 return 0;
12682}
12683_ACEOF
5476a9a4
GM
12684if ac_fn_c_try_compile "$LINENO"; then :
12685 emacs_cv_arg6_star=yes
067d23c9 12686fi
f199cab1 12687rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5476a9a4
GM
12688 if test "$emacs_cv_arg6_star" = yes; then
12689 $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer*" >>confdefs.h
12690
12691 else
12692 $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer" >>confdefs.h
067d23c9 12693
5476a9a4
GM
12694 fi
12695 CFLAGS=$late_CFLAGS
067d23c9
KY
12696fi
12697
5476a9a4
GM
12698### Start of font-backend (under any platform) section.
12699# (nothing here yet -- this is a placeholder)
12700### End of font-backend (under any platform) section.
067d23c9 12701
5476a9a4
GM
12702### Start of font-backend (under X11) section.
12703if test "${HAVE_X11}" = "yes"; then
067d23c9 12704
5476a9a4 12705 succeeded=no
067d23c9 12706
5476a9a4
GM
12707 if test "$PKG_CONFIG" = "no" ; then
12708 HAVE_FC=no
12709 else
12710 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 12711 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
12712 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fontconfig >= 2.2.0" >&5
12713$as_echo_n "checking for fontconfig >= 2.2.0... " >&6; }
f199cab1 12714
b5591ebb
GM
12715 if "$PKG_CONFIG" --exists "fontconfig >= 2.2.0" 2>&5 &&
12716 FONTCONFIG_CFLAGS=`"$PKG_CONFIG" --cflags "fontconfig >= 2.2.0" 2>&5` &&
12717 FONTCONFIG_LIBS=`"$PKG_CONFIG" --libs "fontconfig >= 2.2.0" 2>&5`; then
5476a9a4
GM
12718 edit_cflags="
12719 s,///*,/,g
12720 s/^/ /
12721 s/ -I/ $isystem/g
12722 s/^ //
12723 "
12724 FONTCONFIG_CFLAGS=`$as_echo "$FONTCONFIG_CFLAGS" | sed -e "$edit_cflags"`
12725 FONTCONFIG_LIBS=`$as_echo "$FONTCONFIG_LIBS" | sed -e 's,///*,/,g'`
12726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$FONTCONFIG_CFLAGS' LIBS='$FONTCONFIG_LIBS'" >&5
12727$as_echo "yes CFLAGS='$FONTCONFIG_CFLAGS' LIBS='$FONTCONFIG_LIBS'" >&6; }
12728 succeeded=yes
12729 else
12730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12731$as_echo "no" >&6; }
12732 FONTCONFIG_CFLAGS=""
12733 FONTCONFIG_LIBS=""
12734 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
12735 ## do set a variable so people can do so. Do it in a subshell
12736 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 12737 FONTCONFIG_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "fontconfig >= 2.2.0") 2>&1`
f199cab1 12738
5476a9a4 12739 fi
f199cab1
GM
12740
12741
12742
f199cab1 12743 else
5476a9a4
GM
12744 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12745 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12746 fi
12747 fi
f199cab1 12748
5476a9a4
GM
12749 if test $succeeded = yes; then
12750 HAVE_FC=yes
12751 else
12752 HAVE_FC=no
12753 fi
f199cab1 12754
067d23c9 12755
5476a9a4
GM
12756 ## Use -lXft if available, unless `--with-xft=no'.
12757 HAVE_XFT=maybe
12758 if test "${HAVE_FC}" = "no" || test "x${with_x}" = "xno"; then
12759 with_xft="no";
12760 fi
12761 if test "x${with_xft}" != "xno"; then
f199cab1 12762
f199cab1 12763
5476a9a4 12764 succeeded=no
f199cab1 12765
5476a9a4
GM
12766 if test "$PKG_CONFIG" = "no" ; then
12767 HAVE_XFT=no
12768 else
12769 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 12770 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
12771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xft >= 0.13.0" >&5
12772$as_echo_n "checking for xft >= 0.13.0... " >&6; }
f199cab1 12773
b5591ebb
GM
12774 if "$PKG_CONFIG" --exists "xft >= 0.13.0" 2>&5 &&
12775 XFT_CFLAGS=`"$PKG_CONFIG" --cflags "xft >= 0.13.0" 2>&5` &&
12776 XFT_LIBS=`"$PKG_CONFIG" --libs "xft >= 0.13.0" 2>&5`; then
5476a9a4
GM
12777 edit_cflags="
12778 s,///*,/,g
12779 s/^/ /
12780 s/ -I/ $isystem/g
12781 s/^ //
12782 "
12783 XFT_CFLAGS=`$as_echo "$XFT_CFLAGS" | sed -e "$edit_cflags"`
12784 XFT_LIBS=`$as_echo "$XFT_LIBS" | sed -e 's,///*,/,g'`
12785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$XFT_CFLAGS' LIBS='$XFT_LIBS'" >&5
12786$as_echo "yes CFLAGS='$XFT_CFLAGS' LIBS='$XFT_LIBS'" >&6; }
12787 succeeded=yes
12788 else
12789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12790$as_echo "no" >&6; }
12791 XFT_CFLAGS=""
12792 XFT_LIBS=""
12793 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
12794 ## do set a variable so people can do so. Do it in a subshell
12795 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 12796 XFT_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "xft >= 0.13.0") 2>&1`
f199cab1 12797
5476a9a4 12798 fi
f199cab1
GM
12799
12800
12801
5476a9a4
GM
12802 else
12803 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12804 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12805 fi
12806 fi
f199cab1 12807
5476a9a4
GM
12808 if test $succeeded = yes; then
12809 :
f199cab1 12810 else
5476a9a4 12811 HAVE_XFT=no
f199cab1
GM
12812 fi
12813
5476a9a4
GM
12814 ## Because xftfont.c uses XRenderQueryExtension, we also
12815 ## need to link to -lXrender.
12816 HAVE_XRENDER=no
12817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRenderQueryExtension in -lXrender" >&5
12818$as_echo_n "checking for XRenderQueryExtension in -lXrender... " >&6; }
12819if test "${ac_cv_lib_Xrender_XRenderQueryExtension+set}" = set; then :
12820 $as_echo_n "(cached) " >&6
12821else
12822 ac_check_lib_save_LIBS=$LIBS
12823LIBS="-lXrender $LIBS"
12824cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12825/* end confdefs.h. */
f199cab1 12826
5476a9a4
GM
12827/* Override any GCC internal prototype to avoid an error.
12828 Use char because int might match the return type of a GCC
12829 builtin and then its argument prototype would still apply. */
12830#ifdef __cplusplus
12831extern "C"
12832#endif
12833char XRenderQueryExtension ();
12834int
12835main ()
12836{
12837return XRenderQueryExtension ();
12838 ;
12839 return 0;
12840}
12841_ACEOF
12842if ac_fn_c_try_link "$LINENO"; then :
12843 ac_cv_lib_Xrender_XRenderQueryExtension=yes
12844else
12845 ac_cv_lib_Xrender_XRenderQueryExtension=no
12846fi
12847rm -f core conftest.err conftest.$ac_objext \
12848 conftest$ac_exeext conftest.$ac_ext
12849LIBS=$ac_check_lib_save_LIBS
12850fi
12851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrender_XRenderQueryExtension" >&5
12852$as_echo "$ac_cv_lib_Xrender_XRenderQueryExtension" >&6; }
12853if test "x$ac_cv_lib_Xrender_XRenderQueryExtension" = x""yes; then :
12854 HAVE_XRENDER=yes
12855fi
f199cab1 12856
5476a9a4
GM
12857 if test "$HAVE_XFT" != no && test "$HAVE_XRENDER" != no; then
12858 OLD_CPPFLAGS="$CPPFLAGS"
12859 OLD_CFLAGS="$CFLAGS"
12860 OLD_LIBS="$LIBS"
12861 CPPFLAGS="$CPPFLAGS $XFT_CFLAGS"
12862 CFLAGS="$CFLAGS $XFT_CFLAGS"
12863 XFT_LIBS="-lXrender $XFT_LIBS"
12864 LIBS="$XFT_LIBS $LIBS"
12865 ac_fn_c_check_header_mongrel "$LINENO" "X11/Xft/Xft.h" "ac_cv_header_X11_Xft_Xft_h" "$ac_includes_default"
12866if test "x$ac_cv_header_X11_Xft_Xft_h" = x""yes; then :
12867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XftFontOpen in -lXft" >&5
12868$as_echo_n "checking for XftFontOpen in -lXft... " >&6; }
12869if test "${ac_cv_lib_Xft_XftFontOpen+set}" = set; then :
12870 $as_echo_n "(cached) " >&6
12871else
12872 ac_check_lib_save_LIBS=$LIBS
12873LIBS="-lXft $XFT_LIBS $LIBS"
12874cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12875/* end confdefs.h. */
f199cab1 12876
5476a9a4
GM
12877/* Override any GCC internal prototype to avoid an error.
12878 Use char because int might match the return type of a GCC
12879 builtin and then its argument prototype would still apply. */
12880#ifdef __cplusplus
12881extern "C"
12882#endif
12883char XftFontOpen ();
12884int
12885main ()
12886{
12887return XftFontOpen ();
12888 ;
12889 return 0;
12890}
067d23c9 12891_ACEOF
5476a9a4
GM
12892if ac_fn_c_try_link "$LINENO"; then :
12893 ac_cv_lib_Xft_XftFontOpen=yes
12894else
12895 ac_cv_lib_Xft_XftFontOpen=no
12896fi
12897rm -f core conftest.err conftest.$ac_objext \
12898 conftest$ac_exeext conftest.$ac_ext
12899LIBS=$ac_check_lib_save_LIBS
12900fi
12901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xft_XftFontOpen" >&5
12902$as_echo "$ac_cv_lib_Xft_XftFontOpen" >&6; }
12903if test "x$ac_cv_lib_Xft_XftFontOpen" = x""yes; then :
12904 HAVE_XFT=yes
f199cab1
GM
12905fi
12906
5476a9a4 12907fi
f199cab1
GM
12908
12909
f199cab1 12910
5476a9a4 12911 if test "${HAVE_XFT}" = "yes"; then
f199cab1 12912
5476a9a4 12913$as_echo "#define HAVE_XFT 1" >>confdefs.h
f199cab1 12914
067d23c9 12915
5476a9a4
GM
12916 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $XFT_CFLAGS"
12917 else
12918 CPPFLAGS="$OLD_CPPFLAGS"
12919 CFLAGS="$OLD_CFLAGS"
12920 LIBS="$OLD_LIBS"
12921 fi # "${HAVE_XFT}" = "yes"
12922 fi # "$HAVE_XFT" != no
12923 fi # "x${with_xft}" != "xno"
f199cab1 12924
5476a9a4
GM
12925 ## We used to allow building with FreeType and without Xft.
12926 ## However, the ftx font backend driver is not in good shape.
12927 if test "$HAVE_XFT" != "yes"; then
12928 HAVE_XFT=no
12929 HAVE_FREETYPE=no
12930 else
f199cab1 12931
5476a9a4 12932 succeeded=no
f199cab1 12933
5476a9a4
GM
12934 if test "$PKG_CONFIG" = "no" ; then
12935 HAVE_FREETYPE=no
12936 else
12937 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 12938 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
12939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype2" >&5
12940$as_echo_n "checking for freetype2... " >&6; }
f199cab1 12941
b5591ebb
GM
12942 if "$PKG_CONFIG" --exists "freetype2" 2>&5 &&
12943 FREETYPE_CFLAGS=`"$PKG_CONFIG" --cflags "freetype2" 2>&5` &&
12944 FREETYPE_LIBS=`"$PKG_CONFIG" --libs "freetype2" 2>&5`; then
5476a9a4
GM
12945 edit_cflags="
12946 s,///*,/,g
12947 s/^/ /
12948 s/ -I/ $isystem/g
12949 s/^ //
12950 "
12951 FREETYPE_CFLAGS=`$as_echo "$FREETYPE_CFLAGS" | sed -e "$edit_cflags"`
12952 FREETYPE_LIBS=`$as_echo "$FREETYPE_LIBS" | sed -e 's,///*,/,g'`
12953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$FREETYPE_CFLAGS' LIBS='$FREETYPE_LIBS'" >&5
12954$as_echo "yes CFLAGS='$FREETYPE_CFLAGS' LIBS='$FREETYPE_LIBS'" >&6; }
12955 succeeded=yes
12956 else
12957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12958$as_echo "no" >&6; }
12959 FREETYPE_CFLAGS=""
12960 FREETYPE_LIBS=""
12961 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
12962 ## do set a variable so people can do so. Do it in a subshell
12963 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 12964 FREETYPE_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "freetype2") 2>&1`
f199cab1 12965
5476a9a4 12966 fi
f199cab1 12967
f199cab1 12968
067d23c9 12969
5476a9a4
GM
12970 else
12971 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12972 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12973 fi
067d23c9 12974 fi
f199cab1 12975
5476a9a4
GM
12976 if test $succeeded = yes; then
12977 HAVE_FREETYPE=yes
12978 else
12979 HAVE_FREETYPE=no
12980 fi
f199cab1 12981
f199cab1 12982
5476a9a4
GM
12983 test "$HAVE_FREETYPE" = "no" && as_fn_error "libxft requires libfreetype" "$LINENO" 5
12984 fi
f199cab1 12985
5476a9a4
GM
12986 HAVE_LIBOTF=no
12987 if test "${HAVE_FREETYPE}" = "yes"; then
f199cab1 12988
5476a9a4 12989$as_echo "#define HAVE_FREETYPE 1" >>confdefs.h
f199cab1 12990
5476a9a4 12991 if test "${with_libotf}" != "no"; then
f199cab1 12992
5476a9a4 12993 succeeded=no
f199cab1 12994
5476a9a4
GM
12995 if test "$PKG_CONFIG" = "no" ; then
12996 HAVE_LIBOTF=no
12997 else
12998 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 12999 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
13000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libotf" >&5
13001$as_echo_n "checking for libotf... " >&6; }
f199cab1 13002
b5591ebb
GM
13003 if "$PKG_CONFIG" --exists "libotf" 2>&5 &&
13004 LIBOTF_CFLAGS=`"$PKG_CONFIG" --cflags "libotf" 2>&5` &&
13005 LIBOTF_LIBS=`"$PKG_CONFIG" --libs "libotf" 2>&5`; then
5476a9a4
GM
13006 edit_cflags="
13007 s,///*,/,g
13008 s/^/ /
13009 s/ -I/ $isystem/g
13010 s/^ //
13011 "
13012 LIBOTF_CFLAGS=`$as_echo "$LIBOTF_CFLAGS" | sed -e "$edit_cflags"`
13013 LIBOTF_LIBS=`$as_echo "$LIBOTF_LIBS" | sed -e 's,///*,/,g'`
13014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBOTF_CFLAGS' LIBS='$LIBOTF_LIBS'" >&5
13015$as_echo "yes CFLAGS='$LIBOTF_CFLAGS' LIBS='$LIBOTF_LIBS'" >&6; }
13016 succeeded=yes
13017 else
13018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13019$as_echo "no" >&6; }
13020 LIBOTF_CFLAGS=""
13021 LIBOTF_LIBS=""
13022 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
13023 ## do set a variable so people can do so. Do it in a subshell
13024 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 13025 LIBOTF_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "libotf") 2>&1`
067d23c9 13026
5476a9a4 13027 fi
f199cab1
GM
13028
13029
067d23c9 13030
5476a9a4
GM
13031 else
13032 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
13033 echo "*** See http://www.freedesktop.org/software/pkgconfig"
13034 fi
13035 fi
f199cab1 13036
5476a9a4
GM
13037 if test $succeeded = yes; then
13038 HAVE_LIBOTF=yes
13039 else
13040 HAVE_LIBOTF=no
13041 fi
f199cab1 13042
5476a9a4 13043 if test "$HAVE_LIBOTF" = "yes"; then
f199cab1 13044
5476a9a4 13045$as_echo "#define HAVE_LIBOTF 1" >>confdefs.h
f199cab1 13046
5476a9a4
GM
13047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTF_get_variation_glyphs in -lotf" >&5
13048$as_echo_n "checking for OTF_get_variation_glyphs in -lotf... " >&6; }
13049if test "${ac_cv_lib_otf_OTF_get_variation_glyphs+set}" = set; then :
067d23c9
KY
13050 $as_echo_n "(cached) " >&6
13051else
5476a9a4
GM
13052 ac_check_lib_save_LIBS=$LIBS
13053LIBS="-lotf $LIBS"
13054cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 13055/* end confdefs.h. */
5476a9a4
GM
13056
13057/* Override any GCC internal prototype to avoid an error.
13058 Use char because int might match the return type of a GCC
13059 builtin and then its argument prototype would still apply. */
13060#ifdef __cplusplus
13061extern "C"
13062#endif
13063char OTF_get_variation_glyphs ();
067d23c9
KY
13064int
13065main ()
13066{
5476a9a4 13067return OTF_get_variation_glyphs ();
067d23c9
KY
13068 ;
13069 return 0;
13070}
13071_ACEOF
5476a9a4
GM
13072if ac_fn_c_try_link "$LINENO"; then :
13073 ac_cv_lib_otf_OTF_get_variation_glyphs=yes
067d23c9 13074else
5476a9a4 13075 ac_cv_lib_otf_OTF_get_variation_glyphs=no
067d23c9 13076fi
5476a9a4
GM
13077rm -f core conftest.err conftest.$ac_objext \
13078 conftest$ac_exeext conftest.$ac_ext
13079LIBS=$ac_check_lib_save_LIBS
13080fi
13081{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_otf_OTF_get_variation_glyphs" >&5
13082$as_echo "$ac_cv_lib_otf_OTF_get_variation_glyphs" >&6; }
13083if test "x$ac_cv_lib_otf_OTF_get_variation_glyphs" = x""yes; then :
13084 HAVE_OTF_GET_VARIATION_GLYPHS=yes
13085else
13086 HAVE_OTF_GET_VARIATION_GLYPHS=no
067d23c9 13087fi
067d23c9 13088
5476a9a4
GM
13089 if test "${HAVE_OTF_GET_VARIATION_GLYPHS}" = "yes"; then
13090
13091$as_echo "#define HAVE_OTF_GET_VARIATION_GLYPHS 1" >>confdefs.h
13092
13093 fi
13094 fi
13095 fi
13096 fi
13097
13098 HAVE_M17N_FLT=no
13099 if test "${HAVE_LIBOTF}" = yes; then
13100 if test "${with_m17n_flt}" != "no"; then
13101
13102 succeeded=no
13103
13104 if test "$PKG_CONFIG" = "no" ; then
13105 HAVE_M17N_FLT=no
13106 else
13107 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 13108 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
13109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for m17n-flt" >&5
13110$as_echo_n "checking for m17n-flt... " >&6; }
13111
b5591ebb
GM
13112 if "$PKG_CONFIG" --exists "m17n-flt" 2>&5 &&
13113 M17N_FLT_CFLAGS=`"$PKG_CONFIG" --cflags "m17n-flt" 2>&5` &&
13114 M17N_FLT_LIBS=`"$PKG_CONFIG" --libs "m17n-flt" 2>&5`; then
5476a9a4
GM
13115 edit_cflags="
13116 s,///*,/,g
13117 s/^/ /
13118 s/ -I/ $isystem/g
13119 s/^ //
13120 "
13121 M17N_FLT_CFLAGS=`$as_echo "$M17N_FLT_CFLAGS" | sed -e "$edit_cflags"`
13122 M17N_FLT_LIBS=`$as_echo "$M17N_FLT_LIBS" | sed -e 's,///*,/,g'`
13123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$M17N_FLT_CFLAGS' LIBS='$M17N_FLT_LIBS'" >&5
13124$as_echo "yes CFLAGS='$M17N_FLT_CFLAGS' LIBS='$M17N_FLT_LIBS'" >&6; }
13125 succeeded=yes
13126 else
13127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13128$as_echo "no" >&6; }
13129 M17N_FLT_CFLAGS=""
13130 M17N_FLT_LIBS=""
13131 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
13132 ## do set a variable so people can do so. Do it in a subshell
13133 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 13134 M17N_FLT_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "m17n-flt") 2>&1`
5476a9a4
GM
13135
13136 fi
13137
13138
067d23c9 13139
5476a9a4
GM
13140 else
13141 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
13142 echo "*** See http://www.freedesktop.org/software/pkgconfig"
13143 fi
f199cab1 13144 fi
067d23c9 13145
5476a9a4
GM
13146 if test $succeeded = yes; then
13147 HAVE_M17N_FLT=yes
13148 else
13149 HAVE_M17N_FLT=no
13150 fi
13151
13152 if test "$HAVE_M17N_FLT" = "yes"; then
13153
13154$as_echo "#define HAVE_M17N_FLT 1" >>confdefs.h
13155
13156 fi
13157 fi
13158 fi
13159else
13160 HAVE_XFT=no
13161 HAVE_FREETYPE=no
13162 HAVE_LIBOTF=no
13163 HAVE_M17N_FLT=no
13164fi
13165
13166### End of font-backend (under X11) section.
13167
13168
067d23c9 13169
067d23c9 13170
5476a9a4
GM
13171
13172
13173
13174
13175
13176
13177### Use -lXpm if available, unless `--with-xpm=no'.
7c61eaab 13178### mingw32 doesn't use -lXpm, since it loads the library dynamically.
5476a9a4
GM
13179HAVE_XPM=no
13180LIBXPM=
7c61eaab 13181if test "${HAVE_W32}" = "yes" && test "${opsys}" = "cygwin"; then
5c0255d9
GM
13182 if test "${with_xpm}" != "no"; then
13183 SAVE_CPPFLAGS="$CPPFLAGS"
13184 SAVE_LDFLAGS="$LDFLAGS"
13185 CPPFLAGS="$CPPFLAGS -I/usr/include/noX"
13186 LDFLAGS="$LDFLAGS -L/usr/lib/noX"
13187 ac_fn_c_check_header_mongrel "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "$ac_includes_default"
13188if test "x$ac_cv_header_X11_xpm_h" = x""yes; then :
13189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReadFileToImage in -lXpm" >&5
13190$as_echo_n "checking for XpmReadFileToImage in -lXpm... " >&6; }
13191if test "${ac_cv_lib_Xpm_XpmReadFileToImage+set}" = set; then :
13192 $as_echo_n "(cached) " >&6
13193else
13194 ac_check_lib_save_LIBS=$LIBS
13195LIBS="-lXpm $LIBS"
13196cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13197/* end confdefs.h. */
13198
13199/* Override any GCC internal prototype to avoid an error.
13200 Use char because int might match the return type of a GCC
13201 builtin and then its argument prototype would still apply. */
13202#ifdef __cplusplus
13203extern "C"
13204#endif
13205char XpmReadFileToImage ();
13206int
13207main ()
13208{
13209return XpmReadFileToImage ();
13210 ;
13211 return 0;
13212}
13213_ACEOF
13214if ac_fn_c_try_link "$LINENO"; then :
13215 ac_cv_lib_Xpm_XpmReadFileToImage=yes
13216else
13217 ac_cv_lib_Xpm_XpmReadFileToImage=no
13218fi
13219rm -f core conftest.err conftest.$ac_objext \
13220 conftest$ac_exeext conftest.$ac_ext
13221LIBS=$ac_check_lib_save_LIBS
13222fi
13223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmReadFileToImage" >&5
13224$as_echo "$ac_cv_lib_Xpm_XpmReadFileToImage" >&6; }
13225if test "x$ac_cv_lib_Xpm_XpmReadFileToImage" = x""yes; then :
13226 HAVE_XPM=yes
13227fi
13228
13229fi
13230
13231
13232 if test "${HAVE_XPM}" = "yes"; then
13233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReturnAllocPixels preprocessor define" >&5
13234$as_echo_n "checking for XpmReturnAllocPixels preprocessor define... " >&6; }
13235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13236/* end confdefs.h. */
13237#include "X11/xpm.h"
13238#ifndef XpmReturnAllocPixels
13239no_return_alloc_pixels
13240#endif
13241
13242_ACEOF
13243if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13244 $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then :
13245 HAVE_XPM=no
13246else
13247 HAVE_XPM=yes
13248fi
13249rm -f conftest*
13250
13251
13252 if test "${HAVE_XPM}" = "yes"; then
13253 REAL_CPPFLAGS="$REAL_CPPFLAGS -I/usr/include/noX"
13254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13255$as_echo "yes" >&6; }
13256 else
13257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13258$as_echo "no" >&6; }
13259 CPPFLAGS="$SAVE_CPPFLAGS"
13260 LDFLAGS="$SAVE_LDFLAGS"
13261 fi
13262 fi
13263 fi
13264
13265 if test "${HAVE_XPM}" = "yes"; then
13266
13267$as_echo "#define HAVE_XPM 1" >>confdefs.h
13268
13269 LIBXPM=-lXpm
13270 fi
13271fi
13272
5476a9a4
GM
13273if test "${HAVE_X11}" = "yes"; then
13274 if test "${with_xpm}" != "no"; then
13275 ac_fn_c_check_header_mongrel "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "$ac_includes_default"
13276if test "x$ac_cv_header_X11_xpm_h" = x""yes; then :
13277 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReadFileToPixmap in -lXpm" >&5
13278$as_echo_n "checking for XpmReadFileToPixmap in -lXpm... " >&6; }
13279if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then :
f199cab1
GM
13280 $as_echo_n "(cached) " >&6
13281else
5476a9a4
GM
13282 ac_check_lib_save_LIBS=$LIBS
13283LIBS="-lXpm -lX11 $LIBS"
13284cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
13285/* end confdefs.h. */
13286
5476a9a4
GM
13287/* Override any GCC internal prototype to avoid an error.
13288 Use char because int might match the return type of a GCC
13289 builtin and then its argument prototype would still apply. */
13290#ifdef __cplusplus
13291extern "C"
13292#endif
13293char XpmReadFileToPixmap ();
067d23c9
KY
13294int
13295main ()
13296{
5476a9a4 13297return XpmReadFileToPixmap ();
067d23c9
KY
13298 ;
13299 return 0;
13300}
13301_ACEOF
5476a9a4
GM
13302if ac_fn_c_try_link "$LINENO"; then :
13303 ac_cv_lib_Xpm_XpmReadFileToPixmap=yes
067d23c9 13304else
5476a9a4 13305 ac_cv_lib_Xpm_XpmReadFileToPixmap=no
067d23c9 13306fi
5476a9a4
GM
13307rm -f core conftest.err conftest.$ac_objext \
13308 conftest$ac_exeext conftest.$ac_ext
13309LIBS=$ac_check_lib_save_LIBS
13310fi
13311{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5
13312$as_echo "$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6; }
13313if test "x$ac_cv_lib_Xpm_XpmReadFileToPixmap" = x""yes; then :
13314 HAVE_XPM=yes
f199cab1 13315fi
067d23c9
KY
13316
13317fi
13318
13319
5476a9a4
GM
13320 if test "${HAVE_XPM}" = "yes"; then
13321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReturnAllocPixels preprocessor define" >&5
13322$as_echo_n "checking for XpmReturnAllocPixels preprocessor define... " >&6; }
13323 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13324/* end confdefs.h. */
13325#include "X11/xpm.h"
13326#ifndef XpmReturnAllocPixels
13327no_return_alloc_pixels
13328#endif
067d23c9 13329
067d23c9 13330_ACEOF
5476a9a4
GM
13331if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13332 $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then :
13333 HAVE_XPM=no
13334else
13335 HAVE_XPM=yes
13336fi
13337rm -f conftest*
067d23c9 13338
067d23c9 13339
5476a9a4
GM
13340 if test "${HAVE_XPM}" = "yes"; then
13341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13342$as_echo "yes" >&6; }
13343 else
13344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13345$as_echo "no" >&6; }
13346 fi
13347 fi
13348 fi
067d23c9 13349
5476a9a4 13350 if test "${HAVE_XPM}" = "yes"; then
067d23c9 13351
5476a9a4 13352$as_echo "#define HAVE_XPM 1" >>confdefs.h
067d23c9 13353
5476a9a4
GM
13354 LIBXPM=-lXpm
13355 fi
067d23c9
KY
13356fi
13357
7c61eaab
GM
13358### FIXME: Perhaps regroup to minimize code duplication due to MinGW's
13359### slightly different requirements wrt image libraries (it doesn't
13360### use -lXpm because it loads the xpm shared library dynamically at
13361### run time).
13362if test "${opsys}" = "mingw32"; then
13363 if test "${with_xpm}" != "no"; then
13364 ac_fn_c_check_header_compile "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "
13365#define FOR_MSW 1
13366"
13367if test "x$ac_cv_header_X11_xpm_h" = x""yes; then :
13368 HAVE_XPM=yes
13369else
13370 HAVE_XPM=no
13371fi
13372
13373
13374 fi
13375
13376 if test "${HAVE_XPM}" = "yes"; then
13377
13378$as_echo "#define HAVE_XPM 1" >>confdefs.h
13379
13380 fi
13381fi
13382
f199cab1 13383
5c0255d9 13384
5476a9a4 13385### Use -ljpeg if available, unless `--with-jpeg=no'.
7c61eaab 13386### mingw32 doesn't use -ljpeg, since it loads the library dynamically.
5476a9a4
GM
13387HAVE_JPEG=no
13388LIBJPEG=
7c61eaab
GM
13389if test "${opsys}" = "mingw32"; then
13390 if test "${with_jpeg}" != "no"; then
13391 ac_fn_c_check_header_mongrel "$LINENO" "jerror.h" "ac_cv_header_jerror_h" "$ac_includes_default"
13392if test "x$ac_cv_header_jerror_h" = x""yes; then :
13393 HAVE_JPEG=yes
13394else
13395 HAVE_JPEG=no
13396fi
13397
13398
13399 fi
13400 if test "${HAVE_JPEG}" = "yes"; then
13401 $as_echo "#define HAVE_JPEG 1" >>confdefs.h
13402
13403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13404/* end confdefs.h. */
13405#include <jpeglib.h>
13406 version=JPEG_LIB_VERSION
13407
13408_ACEOF
13409if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13410 $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then :
13411 $as_echo "#define HAVE_JPEG 1" >>confdefs.h
13412
13413else
13414 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libjpeg found, but not version 6b or later" >&5
13415$as_echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;}
13416 HAVE_JPEG=no
13417fi
13418rm -f conftest*
13419
13420 fi
13421elif test "${HAVE_X11}" = "yes" || test "${HAVE_W32}" = "yes"; then
5476a9a4
GM
13422 if test "${with_jpeg}" != "no"; then
13423 ac_fn_c_check_header_mongrel "$LINENO" "jerror.h" "ac_cv_header_jerror_h" "$ac_includes_default"
13424if test "x$ac_cv_header_jerror_h" = x""yes; then :
13425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_destroy_compress in -ljpeg" >&5
13426$as_echo_n "checking for jpeg_destroy_compress in -ljpeg... " >&6; }
13427if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then :
067d23c9
KY
13428 $as_echo_n "(cached) " >&6
13429else
5476a9a4
GM
13430 ac_check_lib_save_LIBS=$LIBS
13431LIBS="-ljpeg $LIBS"
13432cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 13433/* end confdefs.h. */
f199cab1 13434
5476a9a4
GM
13435/* Override any GCC internal prototype to avoid an error.
13436 Use char because int might match the return type of a GCC
13437 builtin and then its argument prototype would still apply. */
13438#ifdef __cplusplus
13439extern "C"
13440#endif
13441char jpeg_destroy_compress ();
067d23c9
KY
13442int
13443main ()
13444{
5476a9a4 13445return jpeg_destroy_compress ();
067d23c9
KY
13446 ;
13447 return 0;
13448}
13449_ACEOF
13450if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 13451 ac_cv_lib_jpeg_jpeg_destroy_compress=yes
067d23c9 13452else
5476a9a4 13453 ac_cv_lib_jpeg_jpeg_destroy_compress=no
067d23c9
KY
13454fi
13455rm -f core conftest.err conftest.$ac_objext \
13456 conftest$ac_exeext conftest.$ac_ext
5476a9a4
GM
13457LIBS=$ac_check_lib_save_LIBS
13458fi
13459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5
13460$as_echo "$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6; }
13461if test "x$ac_cv_lib_jpeg_jpeg_destroy_compress" = x""yes; then :
13462 HAVE_JPEG=yes
13463fi
13464
067d23c9 13465fi
f199cab1 13466
f199cab1
GM
13467
13468 fi
067d23c9 13469
5476a9a4
GM
13470 if test "${HAVE_JPEG}" = "yes"; then
13471 $as_echo "#define HAVE_JPEG 1" >>confdefs.h
f199cab1 13472
5476a9a4
GM
13473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13474/* end confdefs.h. */
13475#include <jpeglib.h>
13476 version=JPEG_LIB_VERSION
f199cab1 13477
5476a9a4
GM
13478_ACEOF
13479if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13480 $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then :
13481 $as_echo "#define HAVE_JPEG 1" >>confdefs.h
f199cab1 13482
5476a9a4
GM
13483else
13484 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libjpeg found, but not version 6b or later" >&5
13485$as_echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;}
7c61eaab 13486 HAVE_JPEG=no
067d23c9 13487fi
5476a9a4 13488rm -f conftest*
067d23c9 13489
5476a9a4
GM
13490 fi
13491 if test "${HAVE_JPEG}" = "yes"; then
13492 LIBJPEG=-ljpeg
13493 fi
13494fi
067d23c9
KY
13495
13496
5476a9a4 13497### Use -lpng if available, unless `--with-png=no'.
7c61eaab 13498### mingw32 doesn't use -lpng, since it loads the library dynamically.
5476a9a4
GM
13499HAVE_PNG=no
13500LIBPNG=
7c61eaab
GM
13501if test "${opsys}" = "mingw32"; then
13502 if test "${with_png}" != "no"; then
13503 ac_fn_c_check_header_mongrel "$LINENO" "png.h" "ac_cv_header_png_h" "$ac_includes_default"
13504if test "x$ac_cv_header_png_h" = x""yes; then :
13505 HAVE_PNG=yes
13506else
13507 HAVE_PNG=no
13508fi
13509
13510
13511 fi
13512 if test "${HAVE_PNG}" = "yes"; then
13513
13514$as_echo "#define HAVE_PNG 1" >>confdefs.h
13515
13516
13517 ac_fn_c_check_decl "$LINENO" "png_longjmp" "ac_cv_have_decl_png_longjmp" "#ifdef HAVE_LIBPNG_PNG_H
13518 # include <libpng/png.h>
13519 #else
13520 # include <png.h>
13521 #endif
13522
13523"
13524if test "x$ac_cv_have_decl_png_longjmp" = x""yes; then :
13525
13526else
13527
13528$as_echo "#define PNG_DEPSTRUCT /**/" >>confdefs.h
13529
13530fi
13531
13532 fi
13533elif test "${HAVE_X11}" = "yes" || test "${HAVE_W32}" = "yes"; then
5476a9a4
GM
13534 if test "${with_png}" != "no"; then
13535 # Debian unstable as of July 2003 has multiple libpngs, and puts png.h
13536 # in /usr/include/libpng.
13537 for ac_header in png.h libpng/png.h
13538do :
13539 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13540ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13541eval as_val=\$$as_ac_Header
13542 if test "x$as_val" = x""yes; then :
13543 cat >>confdefs.h <<_ACEOF
13544#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13545_ACEOF
13546 break
13547fi
067d23c9 13548
5476a9a4 13549done
067d23c9 13550
5476a9a4
GM
13551 if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then
13552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_get_channels in -lpng" >&5
13553$as_echo_n "checking for png_get_channels in -lpng... " >&6; }
13554if test "${ac_cv_lib_png_png_get_channels+set}" = set; then :
13555 $as_echo_n "(cached) " >&6
13556else
13557 ac_check_lib_save_LIBS=$LIBS
13558LIBS="-lpng -lz -lm $LIBS"
13559cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13560/* end confdefs.h. */
067d23c9 13561
5476a9a4
GM
13562/* Override any GCC internal prototype to avoid an error.
13563 Use char because int might match the return type of a GCC
13564 builtin and then its argument prototype would still apply. */
13565#ifdef __cplusplus
13566extern "C"
13567#endif
13568char png_get_channels ();
13569int
13570main ()
13571{
13572return png_get_channels ();
13573 ;
13574 return 0;
13575}
13576_ACEOF
13577if ac_fn_c_try_link "$LINENO"; then :
13578 ac_cv_lib_png_png_get_channels=yes
f199cab1 13579else
5476a9a4
GM
13580 ac_cv_lib_png_png_get_channels=no
13581fi
13582rm -f core conftest.err conftest.$ac_objext \
13583 conftest$ac_exeext conftest.$ac_ext
13584LIBS=$ac_check_lib_save_LIBS
13585fi
13586{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_png_png_get_channels" >&5
13587$as_echo "$ac_cv_lib_png_png_get_channels" >&6; }
13588if test "x$ac_cv_lib_png_png_get_channels" = x""yes; then :
13589 HAVE_PNG=yes
f199cab1 13590fi
067d23c9 13591
5476a9a4
GM
13592 fi
13593 fi
7834125e 13594
5476a9a4
GM
13595 if test "${HAVE_PNG}" = "yes"; then
13596
13597$as_echo "#define HAVE_PNG 1" >>confdefs.h
13598
13599 LIBPNG="-lpng -lz -lm"
13600
13601 ac_fn_c_check_decl "$LINENO" "png_longjmp" "ac_cv_have_decl_png_longjmp" "#ifdef HAVE_LIBPNG_PNG_H
13602 # include <libpng/png.h>
13603 #else
13604 # include <png.h>
13605 #endif
13606
13607"
13608if test "x$ac_cv_have_decl_png_longjmp" = x""yes; then :
13609
13610else
7834125e 13611
5476a9a4 13612$as_echo "#define PNG_DEPSTRUCT /**/" >>confdefs.h
7834125e 13613
f199cab1 13614fi
7834125e 13615
5476a9a4
GM
13616 fi
13617fi
7834125e
GM
13618
13619
5476a9a4 13620### Use -ltiff if available, unless `--with-tiff=no'.
7c61eaab 13621### mingw32 doesn't use -ltiff, since it loads the library dynamically.
5476a9a4
GM
13622HAVE_TIFF=no
13623LIBTIFF=
7c61eaab
GM
13624if test "${opsys}" = "mingw32"; then
13625 if test "${with_tiff}" != "no"; then
13626 ac_fn_c_check_header_mongrel "$LINENO" "tiffio.h" "ac_cv_header_tiffio_h" "$ac_includes_default"
13627if test "x$ac_cv_header_tiffio_h" = x""yes; then :
13628 HAVE_TIFF=yes
13629else
13630 HAVE_TIFF=no
13631fi
13632
13633
13634 fi
13635 if test "${HAVE_TIFF}" = "yes"; then
13636
13637$as_echo "#define HAVE_TIFF 1" >>confdefs.h
13638
13639 fi
13640elif test "${HAVE_X11}" = "yes" || test "${HAVE_W32}" = "yes"; then
5476a9a4
GM
13641 if test "${with_tiff}" != "no"; then
13642 ac_fn_c_check_header_mongrel "$LINENO" "tiffio.h" "ac_cv_header_tiffio_h" "$ac_includes_default"
13643if test "x$ac_cv_header_tiffio_h" = x""yes; then :
13644 tifflibs="-lz -lm"
13645 # At least one tiff package requires the jpeg library.
13646 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
13647 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIFFGetVersion in -ltiff" >&5
13648$as_echo_n "checking for TIFFGetVersion in -ltiff... " >&6; }
13649if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then :
f199cab1
GM
13650 $as_echo_n "(cached) " >&6
13651else
5476a9a4
GM
13652 ac_check_lib_save_LIBS=$LIBS
13653LIBS="-ltiff $tifflibs $LIBS"
13654cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 13655/* end confdefs.h. */
067d23c9 13656
5476a9a4
GM
13657/* Override any GCC internal prototype to avoid an error.
13658 Use char because int might match the return type of a GCC
13659 builtin and then its argument prototype would still apply. */
13660#ifdef __cplusplus
13661extern "C"
f199cab1 13662#endif
5476a9a4
GM
13663char TIFFGetVersion ();
13664int
13665main ()
13666{
13667return TIFFGetVersion ();
13668 ;
13669 return 0;
13670}
f199cab1 13671_ACEOF
5476a9a4
GM
13672if ac_fn_c_try_link "$LINENO"; then :
13673 ac_cv_lib_tiff_TIFFGetVersion=yes
f199cab1 13674else
5476a9a4 13675 ac_cv_lib_tiff_TIFFGetVersion=no
f199cab1 13676fi
5476a9a4
GM
13677rm -f core conftest.err conftest.$ac_objext \
13678 conftest$ac_exeext conftest.$ac_ext
13679LIBS=$ac_check_lib_save_LIBS
f199cab1 13680fi
5476a9a4
GM
13681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5
13682$as_echo "$ac_cv_lib_tiff_TIFFGetVersion" >&6; }
13683if test "x$ac_cv_lib_tiff_TIFFGetVersion" = x""yes; then :
13684 HAVE_TIFF=yes
f199cab1 13685fi
067d23c9 13686
5476a9a4 13687fi
067d23c9 13688
067d23c9 13689
5476a9a4 13690 fi
f199cab1 13691
5476a9a4 13692 if test "${HAVE_TIFF}" = "yes"; then
067d23c9 13693
5476a9a4 13694$as_echo "#define HAVE_TIFF 1" >>confdefs.h
067d23c9 13695
5476a9a4
GM
13696 LIBTIFF=-ltiff
13697 fi
f199cab1 13698fi
067d23c9 13699
067d23c9 13700
5476a9a4 13701### Use -lgif or -lungif if available, unless `--with-gif=no'.
7c61eaab 13702### mingw32 doesn't use -lgif/-lungif, since it loads the library dynamically.
5476a9a4
GM
13703HAVE_GIF=no
13704LIBGIF=
7c61eaab
GM
13705if test "${opsys}" = "mingw32"; then
13706 if test "${with_gif}" != "no"; then
13707 ac_fn_c_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
13708if test "x$ac_cv_header_gif_lib_h" = x""yes; then :
13709 HAVE_GIF=yes
13710else
13711 HAVE_GIF=no
13712fi
13713
13714
13715 fi
13716 if test "${HAVE_GIF}" = "yes"; then
13717
13718$as_echo "#define HAVE_GIF 1" >>confdefs.h
13719
13720 fi
13721elif test "${HAVE_X11}" = "yes" && test "${with_gif}" != "no" \
5c0255d9 13722 || test "${HAVE_W32}" = "yes"; then
5476a9a4
GM
13723 ac_fn_c_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
13724if test "x$ac_cv_header_gif_lib_h" = x""yes; then :
13725 # EGifPutExtensionLast only exists from version libungif-4.1.0b1.
13726# Earlier versions can crash Emacs.
13727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lgif" >&5
13728$as_echo_n "checking for EGifPutExtensionLast in -lgif... " >&6; }
13729if test "${ac_cv_lib_gif_EGifPutExtensionLast+set}" = set; then :
f199cab1
GM
13730 $as_echo_n "(cached) " >&6
13731else
5476a9a4
GM
13732 ac_check_lib_save_LIBS=$LIBS
13733LIBS="-lgif $LIBS"
13734cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 13735/* end confdefs.h. */
067d23c9 13736
5476a9a4
GM
13737/* Override any GCC internal prototype to avoid an error.
13738 Use char because int might match the return type of a GCC
13739 builtin and then its argument prototype would still apply. */
13740#ifdef __cplusplus
13741extern "C"
13742#endif
13743char EGifPutExtensionLast ();
f199cab1
GM
13744int
13745main ()
13746{
5476a9a4 13747return EGifPutExtensionLast ();
f199cab1
GM
13748 ;
13749 return 0;
13750}
13751_ACEOF
5476a9a4
GM
13752if ac_fn_c_try_link "$LINENO"; then :
13753 ac_cv_lib_gif_EGifPutExtensionLast=yes
f199cab1 13754else
5476a9a4 13755 ac_cv_lib_gif_EGifPutExtensionLast=no
f199cab1 13756fi
5476a9a4
GM
13757rm -f core conftest.err conftest.$ac_objext \
13758 conftest$ac_exeext conftest.$ac_ext
13759LIBS=$ac_check_lib_save_LIBS
13760fi
13761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_EGifPutExtensionLast" >&5
13762$as_echo "$ac_cv_lib_gif_EGifPutExtensionLast" >&6; }
13763if test "x$ac_cv_lib_gif_EGifPutExtensionLast" = x""yes; then :
13764 HAVE_GIF=yes
13765else
13766 HAVE_GIF=maybe
f199cab1 13767fi
067d23c9 13768
5476a9a4
GM
13769fi
13770
13771
13772
13773 if test "$HAVE_GIF" = yes; then
13774 LIBGIF=-lgif
13775 elif test "$HAVE_GIF" = maybe; then
13776# If gif_lib.h but no libgif, try libungif.
13777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lungif" >&5
13778$as_echo_n "checking for EGifPutExtensionLast in -lungif... " >&6; }
13779if test "${ac_cv_lib_ungif_EGifPutExtensionLast+set}" = set; then :
f199cab1
GM
13780 $as_echo_n "(cached) " >&6
13781else
5476a9a4
GM
13782 ac_check_lib_save_LIBS=$LIBS
13783LIBS="-lungif $LIBS"
13784cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 13785/* end confdefs.h. */
f199cab1 13786
5476a9a4
GM
13787/* Override any GCC internal prototype to avoid an error.
13788 Use char because int might match the return type of a GCC
13789 builtin and then its argument prototype would still apply. */
13790#ifdef __cplusplus
13791extern "C"
13792#endif
13793char EGifPutExtensionLast ();
f199cab1
GM
13794int
13795main ()
13796{
5476a9a4 13797return EGifPutExtensionLast ();
f199cab1
GM
13798 ;
13799 return 0;
13800}
13801_ACEOF
5476a9a4
GM
13802if ac_fn_c_try_link "$LINENO"; then :
13803 ac_cv_lib_ungif_EGifPutExtensionLast=yes
f199cab1 13804else
5476a9a4 13805 ac_cv_lib_ungif_EGifPutExtensionLast=no
f199cab1 13806fi
5476a9a4
GM
13807rm -f core conftest.err conftest.$ac_objext \
13808 conftest$ac_exeext conftest.$ac_ext
13809LIBS=$ac_check_lib_save_LIBS
f199cab1 13810fi
5476a9a4
GM
13811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5
13812$as_echo "$ac_cv_lib_ungif_EGifPutExtensionLast" >&6; }
13813if test "x$ac_cv_lib_ungif_EGifPutExtensionLast" = x""yes; then :
13814 HAVE_GIF=yes
13815else
13816 HAVE_GIF=no
13817fi
13818
13819 test "$HAVE_GIF" = yes && LIBGIF=-lungif
13820 fi
13821
13822 if test "${HAVE_GIF}" = "yes"; then
13823
13824$as_echo "#define HAVE_GIF 1" >>confdefs.h
13825
13826 fi
13827fi
13828
13829
13830if test "${HAVE_X11}" = "yes"; then
13831 MISSING=""
13832 WITH_NO=""
13833 test "${with_xpm}" != "no" && test "${HAVE_XPM}" != "yes" &&
13834 MISSING="libXpm" && WITH_NO="--with-xpm=no"
13835 test "${with_jpeg}" != "no" && test "${HAVE_JPEG}" != "yes" &&
13836 MISSING="$MISSING libjpeg" && WITH_NO="$WITH_NO --with-jpeg=no"
13837 test "${with_png}" != "no" && test "${HAVE_PNG}" != "yes" &&
13838 MISSING="$MISSING libpng" && WITH_NO="$WITH_NO --with-png=no"
13839 test "${with_gif}" != "no" && test "${HAVE_GIF}" != "yes" &&
13840 MISSING="$MISSING libgif/libungif" && WITH_NO="$WITH_NO --with-gif=no"
13841 test "${with_tiff}" != "no" && test "${HAVE_TIFF}" != "yes" &&
13842 MISSING="$MISSING libtiff" && WITH_NO="$WITH_NO --with-tiff=no"
13843
13844 if test "X${MISSING}" != X; then
13845 as_fn_error "The following required libraries were not found:
13846 $MISSING
13847Maybe some development libraries/packages are missing?
13848If you don't want to link with them give
13849 $WITH_NO
13850as options to configure" "$LINENO" 5
13851 fi
13852fi
13853
13854### Use -lgpm if available, unless `--with-gpm=no'.
13855HAVE_GPM=no
13856LIBGPM=
13857if test "${with_gpm}" != "no"; then
13858 ac_fn_c_check_header_mongrel "$LINENO" "gpm.h" "ac_cv_header_gpm_h" "$ac_includes_default"
13859if test "x$ac_cv_header_gpm_h" = x""yes; then :
13860 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Gpm_Open in -lgpm" >&5
13861$as_echo_n "checking for Gpm_Open in -lgpm... " >&6; }
13862if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then :
067d23c9
KY
13863 $as_echo_n "(cached) " >&6
13864else
5476a9a4
GM
13865 ac_check_lib_save_LIBS=$LIBS
13866LIBS="-lgpm $LIBS"
13867cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
13868/* end confdefs.h. */
13869
5476a9a4
GM
13870/* Override any GCC internal prototype to avoid an error.
13871 Use char because int might match the return type of a GCC
13872 builtin and then its argument prototype would still apply. */
13873#ifdef __cplusplus
13874extern "C"
13875#endif
13876char Gpm_Open ();
067d23c9
KY
13877int
13878main ()
13879{
5476a9a4 13880return Gpm_Open ();
067d23c9
KY
13881 ;
13882 return 0;
13883}
13884_ACEOF
5476a9a4
GM
13885if ac_fn_c_try_link "$LINENO"; then :
13886 ac_cv_lib_gpm_Gpm_Open=yes
067d23c9 13887else
5476a9a4 13888 ac_cv_lib_gpm_Gpm_Open=no
067d23c9 13889fi
5476a9a4
GM
13890rm -f core conftest.err conftest.$ac_objext \
13891 conftest$ac_exeext conftest.$ac_ext
13892LIBS=$ac_check_lib_save_LIBS
13893fi
13894{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gpm_Gpm_Open" >&5
13895$as_echo "$ac_cv_lib_gpm_Gpm_Open" >&6; }
13896if test "x$ac_cv_lib_gpm_Gpm_Open" = x""yes; then :
13897 HAVE_GPM=yes
067d23c9 13898fi
f199cab1 13899
5476a9a4 13900fi
f199cab1 13901
f199cab1 13902
f199cab1 13903
5476a9a4 13904 if test "${HAVE_GPM}" = "yes"; then
f199cab1 13905
5476a9a4 13906$as_echo "#define HAVE_GPM 1" >>confdefs.h
f199cab1 13907
5476a9a4
GM
13908 LIBGPM=-lgpm
13909 fi
067d23c9 13910fi
067d23c9
KY
13911
13912
13913
13914
13915
13916
5476a9a4
GM
13917GNUSTEP_CFLAGS=
13918### Use NeXTstep API to implement GUI.
13919if test "${HAVE_NS}" = "yes"; then
067d23c9 13920
5476a9a4 13921$as_echo "#define HAVE_NS 1" >>confdefs.h
067d23c9 13922
5476a9a4 13923 if test "${NS_IMPL_COCOA}" = "yes"; then
067d23c9 13924
5476a9a4 13925$as_echo "#define NS_IMPL_COCOA 1" >>confdefs.h
f199cab1 13926
5476a9a4
GM
13927 fi
13928 if test "${NS_IMPL_GNUSTEP}" = "yes"; then
f199cab1 13929
5476a9a4 13930$as_echo "#define NS_IMPL_GNUSTEP 1" >>confdefs.h
f199cab1 13931
5476a9a4
GM
13932 # See also .m.o rule in Makefile.in */
13933 # FIXME: are all these flags really needed? Document here why. */
13934 GNUSTEP_CFLAGS="-D_REENTRANT -fPIC -fno-strict-aliasing -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
13935 ## Extra CFLAGS applied to src/*.m files.
13936 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"
13937 fi
13938 # We also have mouse menus.
13939 HAVE_MENUS=yes
13940 OTHER_FILES=ns-app
13941fi
f199cab1 13942
5c0255d9
GM
13943if test "${HAVE_W32}" = "yes"; then
13944 HAVE_MENUS=yes
13945fi
f199cab1 13946
5476a9a4
GM
13947### Use session management (-lSM -lICE) if available
13948HAVE_X_SM=no
13949LIBXSM=
13950if test "${HAVE_X11}" = "yes"; then
13951 ac_fn_c_check_header_mongrel "$LINENO" "X11/SM/SMlib.h" "ac_cv_header_X11_SM_SMlib_h" "$ac_includes_default"
13952if test "x$ac_cv_header_X11_SM_SMlib_h" = x""yes; then :
13953 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SmcOpenConnection in -lSM" >&5
13954$as_echo_n "checking for SmcOpenConnection in -lSM... " >&6; }
13955if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then :
067d23c9
KY
13956 $as_echo_n "(cached) " >&6
13957else
5476a9a4
GM
13958 ac_check_lib_save_LIBS=$LIBS
13959LIBS="-lSM -lICE $LIBS"
13960cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
13961/* end confdefs.h. */
13962
5476a9a4
GM
13963/* Override any GCC internal prototype to avoid an error.
13964 Use char because int might match the return type of a GCC
13965 builtin and then its argument prototype would still apply. */
13966#ifdef __cplusplus
13967extern "C"
13968#endif
13969char SmcOpenConnection ();
f199cab1
GM
13970int
13971main ()
13972{
5476a9a4
GM
13973return SmcOpenConnection ();
13974 ;
13975 return 0;
f199cab1 13976}
067d23c9 13977_ACEOF
5476a9a4
GM
13978if ac_fn_c_try_link "$LINENO"; then :
13979 ac_cv_lib_SM_SmcOpenConnection=yes
067d23c9 13980else
5476a9a4 13981 ac_cv_lib_SM_SmcOpenConnection=no
f199cab1 13982fi
5476a9a4
GM
13983rm -f core conftest.err conftest.$ac_objext \
13984 conftest$ac_exeext conftest.$ac_ext
13985LIBS=$ac_check_lib_save_LIBS
13986fi
13987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_SM_SmcOpenConnection" >&5
13988$as_echo "$ac_cv_lib_SM_SmcOpenConnection" >&6; }
13989if test "x$ac_cv_lib_SM_SmcOpenConnection" = x""yes; then :
13990 HAVE_X_SM=yes
067d23c9 13991fi
067d23c9 13992
f199cab1 13993fi
f199cab1 13994
f199cab1 13995
067d23c9 13996
5476a9a4
GM
13997 if test "${HAVE_X_SM}" = "yes"; then
13998
13999$as_echo "#define HAVE_X_SM 1" >>confdefs.h
14000
14001 LIBXSM="-lSM -lICE"
14002 case "$LIBS" in
14003 *-lSM*) ;;
14004 *) LIBS="$LIBXSM $LIBS" ;;
14005 esac
067d23c9 14006 fi
5476a9a4 14007fi
067d23c9 14008
067d23c9 14009
910833ae
GM
14010### Use XRandr (-lXrandr) if available
14011HAVE_XRANDR=no
14012if test "${HAVE_X11}" = "yes"; then
14013 XRANDR_REQUIRED=1.2.2
14014 XRANDR_MODULES="xrandr >= $XRANDR_REQUIRED"
14015
14016 succeeded=no
14017
14018 if test "$PKG_CONFIG" = "no" ; then
14019 HAVE_XRANDR=no
14020 else
14021 PKG_CONFIG_MIN_VERSION=0.9.0
14022 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
14023 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $XRANDR_MODULES" >&5
14024$as_echo_n "checking for $XRANDR_MODULES... " >&6; }
14025
14026 if "$PKG_CONFIG" --exists "$XRANDR_MODULES" 2>&5 &&
14027 XRANDR_CFLAGS=`"$PKG_CONFIG" --cflags "$XRANDR_MODULES" 2>&5` &&
14028 XRANDR_LIBS=`"$PKG_CONFIG" --libs "$XRANDR_MODULES" 2>&5`; then
14029 edit_cflags="
14030 s,///*,/,g
14031 s/^/ /
14032 s/ -I/ $isystem/g
14033 s/^ //
14034 "
14035 XRANDR_CFLAGS=`$as_echo "$XRANDR_CFLAGS" | sed -e "$edit_cflags"`
14036 XRANDR_LIBS=`$as_echo "$XRANDR_LIBS" | sed -e 's,///*,/,g'`
14037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$XRANDR_CFLAGS' LIBS='$XRANDR_LIBS'" >&5
14038$as_echo "yes CFLAGS='$XRANDR_CFLAGS' LIBS='$XRANDR_LIBS'" >&6; }
14039 succeeded=yes
14040 else
14041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14042$as_echo "no" >&6; }
14043 XRANDR_CFLAGS=""
14044 XRANDR_LIBS=""
14045 ## If we have a custom action on failure, don't print errors, but
14046 ## do set a variable so people can do so. Do it in a subshell
14047 ## to capture any diagnostics in invoking pkg-config.
14048 XRANDR_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$XRANDR_MODULES") 2>&1`
14049
14050 fi
14051
14052
14053
14054 else
14055 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
14056 echo "*** See http://www.freedesktop.org/software/pkgconfig"
14057 fi
14058 fi
14059
14060 if test $succeeded = yes; then
14061 HAVE_XRANDR=yes
14062 else
14063 HAVE_XRANDR=no
14064 fi
14065
14066 if test $HAVE_XRANDR = no; then
14067 # Test old way in case pkg-config doesn't have it (older machines).
14068 ac_fn_c_check_header_mongrel "$LINENO" "X11/extensions/Xrandr.h" "ac_cv_header_X11_extensions_Xrandr_h" "$ac_includes_default"
14069if test "x$ac_cv_header_X11_extensions_Xrandr_h" = x""yes; then :
c31effdb
GM
14070 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRRGetScreenResources in -lXrandr" >&5
14071$as_echo_n "checking for XRRGetScreenResources in -lXrandr... " >&6; }
14072if test "${ac_cv_lib_Xrandr_XRRGetScreenResources+set}" = set; then :
910833ae
GM
14073 $as_echo_n "(cached) " >&6
14074else
14075 ac_check_lib_save_LIBS=$LIBS
14076LIBS="-lXrandr $LIBS"
14077cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14078/* end confdefs.h. */
14079
14080/* Override any GCC internal prototype to avoid an error.
14081 Use char because int might match the return type of a GCC
14082 builtin and then its argument prototype would still apply. */
14083#ifdef __cplusplus
14084extern "C"
14085#endif
c31effdb 14086char XRRGetScreenResources ();
910833ae
GM
14087int
14088main ()
14089{
c31effdb 14090return XRRGetScreenResources ();
910833ae
GM
14091 ;
14092 return 0;
14093}
14094_ACEOF
14095if ac_fn_c_try_link "$LINENO"; then :
c31effdb 14096 ac_cv_lib_Xrandr_XRRGetScreenResources=yes
910833ae 14097else
c31effdb 14098 ac_cv_lib_Xrandr_XRRGetScreenResources=no
910833ae
GM
14099fi
14100rm -f core conftest.err conftest.$ac_objext \
14101 conftest$ac_exeext conftest.$ac_ext
14102LIBS=$ac_check_lib_save_LIBS
14103fi
c31effdb
GM
14104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrandr_XRRGetScreenResources" >&5
14105$as_echo "$ac_cv_lib_Xrandr_XRRGetScreenResources" >&6; }
14106if test "x$ac_cv_lib_Xrandr_XRRGetScreenResources" = x""yes; then :
910833ae
GM
14107 HAVE_XRANDR=yes
14108fi
14109
14110fi
14111
14112
14113 if test $HAVE_XRANDR = yes; then
14114 XRANDR_LIBS=-lXrandr
14115
14116 fi
14117 fi
14118 if test $HAVE_XRANDR = yes; then
14119 SAVE_CFLAGS="$CFLAGS"
14120 SAVE_LIBS="$LIBS"
14121 CFLAGS="$XRANDR_CFLAGS $CFLAGS"
14122 LIBS="$XRANDR_LIBS $LIBS"
14123 for ac_func in XRRGetOutputPrimary XRRGetScreenResourcesCurrent
14124do :
14125 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14126ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14127eval as_val=\$$as_ac_var
14128 if test "x$as_val" = x""yes; then :
14129 cat >>confdefs.h <<_ACEOF
14130#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14131_ACEOF
14132
14133fi
14134done
14135
14136 CFLAGS="$SAVE_CFLAGS"
14137 LIBS="$SAVE_LIBS"
14138
14139
14140$as_echo "#define HAVE_XRANDR 1" >>confdefs.h
14141
14142 fi
14143fi
14144
14145### Use Xinerama (-lXinerama) if available
14146HAVE_XINERAMA=no
14147if test "${HAVE_X11}" = "yes"; then
14148 XINERAMA_REQUIRED=1.0.2
14149 XINERAMA_MODULES="xinerama >= $XINERAMA_REQUIRED"
14150
14151 succeeded=no
14152
14153 if test "$PKG_CONFIG" = "no" ; then
14154 HAVE_XINERAMA=no
14155 else
14156 PKG_CONFIG_MIN_VERSION=0.9.0
14157 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
14158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $XINERAMA_MODULES" >&5
14159$as_echo_n "checking for $XINERAMA_MODULES... " >&6; }
14160
14161 if "$PKG_CONFIG" --exists "$XINERAMA_MODULES" 2>&5 &&
14162 XINERAMA_CFLAGS=`"$PKG_CONFIG" --cflags "$XINERAMA_MODULES" 2>&5` &&
14163 XINERAMA_LIBS=`"$PKG_CONFIG" --libs "$XINERAMA_MODULES" 2>&5`; then
14164 edit_cflags="
14165 s,///*,/,g
14166 s/^/ /
14167 s/ -I/ $isystem/g
14168 s/^ //
14169 "
14170 XINERAMA_CFLAGS=`$as_echo "$XINERAMA_CFLAGS" | sed -e "$edit_cflags"`
14171 XINERAMA_LIBS=`$as_echo "$XINERAMA_LIBS" | sed -e 's,///*,/,g'`
14172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$XINERAMA_CFLAGS' LIBS='$XINERAMA_LIBS'" >&5
14173$as_echo "yes CFLAGS='$XINERAMA_CFLAGS' LIBS='$XINERAMA_LIBS'" >&6; }
14174 succeeded=yes
14175 else
14176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14177$as_echo "no" >&6; }
14178 XINERAMA_CFLAGS=""
14179 XINERAMA_LIBS=""
14180 ## If we have a custom action on failure, don't print errors, but
14181 ## do set a variable so people can do so. Do it in a subshell
14182 ## to capture any diagnostics in invoking pkg-config.
14183 XINERAMA_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$XINERAMA_MODULES") 2>&1`
14184
14185 fi
14186
14187
14188
14189 else
14190 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
14191 echo "*** See http://www.freedesktop.org/software/pkgconfig"
14192 fi
14193 fi
14194
14195 if test $succeeded = yes; then
14196 HAVE_XINERAMA=yes
14197 else
14198 HAVE_XINERAMA=no
14199 fi
14200
14201 if test $HAVE_XINERAMA = no; then
14202 # Test old way in case pkg-config doesn't have it (older machines).
14203 ac_fn_c_check_header_mongrel "$LINENO" "X11/extensions/Xinerama.h" "ac_cv_header_X11_extensions_Xinerama_h" "$ac_includes_default"
14204if test "x$ac_cv_header_X11_extensions_Xinerama_h" = x""yes; then :
14205 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XineramaQueryExtension in -lXinerama" >&5
14206$as_echo_n "checking for XineramaQueryExtension in -lXinerama... " >&6; }
14207if test "${ac_cv_lib_Xinerama_XineramaQueryExtension+set}" = set; then :
14208 $as_echo_n "(cached) " >&6
14209else
14210 ac_check_lib_save_LIBS=$LIBS
14211LIBS="-lXinerama $LIBS"
14212cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14213/* end confdefs.h. */
14214
14215/* Override any GCC internal prototype to avoid an error.
14216 Use char because int might match the return type of a GCC
14217 builtin and then its argument prototype would still apply. */
14218#ifdef __cplusplus
14219extern "C"
14220#endif
14221char XineramaQueryExtension ();
14222int
14223main ()
14224{
14225return XineramaQueryExtension ();
14226 ;
14227 return 0;
14228}
14229_ACEOF
14230if ac_fn_c_try_link "$LINENO"; then :
14231 ac_cv_lib_Xinerama_XineramaQueryExtension=yes
14232else
14233 ac_cv_lib_Xinerama_XineramaQueryExtension=no
14234fi
14235rm -f core conftest.err conftest.$ac_objext \
14236 conftest$ac_exeext conftest.$ac_ext
14237LIBS=$ac_check_lib_save_LIBS
14238fi
14239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xinerama_XineramaQueryExtension" >&5
14240$as_echo "$ac_cv_lib_Xinerama_XineramaQueryExtension" >&6; }
14241if test "x$ac_cv_lib_Xinerama_XineramaQueryExtension" = x""yes; then :
14242 HAVE_XINERAMA=yes
14243fi
14244
14245fi
14246
14247
14248 if test $HAVE_XINERAMA = yes; then
14249 XINERAMA_LIBS=-lXinerama
14250
14251 fi
14252 fi
14253 if test $HAVE_XINERAMA = yes; then
14254
14255$as_echo "#define HAVE_XINERAMA 1" >>confdefs.h
14256
14257 fi
14258fi
14259
14260
5476a9a4 14261### Use libxml (-lxml2) if available
7c61eaab 14262### mingw32 doesn't use -lxml2, since it loads the library dynamically.
5476a9a4
GM
14263HAVE_LIBXML2=no
14264if test "${with_xml2}" != "no"; then
14265 ### I'm not sure what the version number should be, so I just guessed.
067d23c9 14266
5476a9a4 14267 succeeded=no
067d23c9 14268
5476a9a4
GM
14269 if test "$PKG_CONFIG" = "no" ; then
14270 HAVE_LIBXML2=no
14271 else
14272 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 14273 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
14274 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxml-2.0 > 2.6.17" >&5
14275$as_echo_n "checking for libxml-2.0 > 2.6.17... " >&6; }
067d23c9 14276
b5591ebb
GM
14277 if "$PKG_CONFIG" --exists "libxml-2.0 > 2.6.17" 2>&5 &&
14278 LIBXML2_CFLAGS=`"$PKG_CONFIG" --cflags "libxml-2.0 > 2.6.17" 2>&5` &&
14279 LIBXML2_LIBS=`"$PKG_CONFIG" --libs "libxml-2.0 > 2.6.17" 2>&5`; then
5476a9a4
GM
14280 edit_cflags="
14281 s,///*,/,g
14282 s/^/ /
14283 s/ -I/ $isystem/g
14284 s/^ //
14285 "
14286 LIBXML2_CFLAGS=`$as_echo "$LIBXML2_CFLAGS" | sed -e "$edit_cflags"`
14287 LIBXML2_LIBS=`$as_echo "$LIBXML2_LIBS" | sed -e 's,///*,/,g'`
14288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBXML2_CFLAGS' LIBS='$LIBXML2_LIBS'" >&5
14289$as_echo "yes CFLAGS='$LIBXML2_CFLAGS' LIBS='$LIBXML2_LIBS'" >&6; }
14290 succeeded=yes
14291 else
14292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14293$as_echo "no" >&6; }
14294 LIBXML2_CFLAGS=""
14295 LIBXML2_LIBS=""
14296 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
14297 ## do set a variable so people can do so. Do it in a subshell
14298 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 14299 LIBXML2_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "libxml-2.0 > 2.6.17") 2>&1`
5476a9a4
GM
14300
14301 fi
14302
14303
14304
14305 else
14306 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
14307 echo "*** See http://www.freedesktop.org/software/pkgconfig"
14308 fi
14309 fi
14310
14311 if test $succeeded = yes; then
14312 HAVE_LIBXML2=yes
14313 else
14314 HAVE_LIBXML2=no
14315 fi
14316
4628c0bf
GM
14317 # Built-in libxml2 on OS X 10.8 lacks libxml-2.0.pc.
14318 if test "${HAVE_LIBXML2}" != "yes" -a "$opsys" = "darwin"; then
14319 SAVE_CPPFLAGS="$CPPFLAGS"
14320 CPPFLAGS="$CPPFLAGS -I/usr/include/libxml2"
14321 ac_fn_c_check_header_mongrel "$LINENO" "libxml/HTMLparser.h" "ac_cv_header_libxml_HTMLparser_h" "$ac_includes_default"
14322if test "x$ac_cv_header_libxml_HTMLparser_h" = x""yes; then :
14323 ac_fn_c_check_decl "$LINENO" "HTML_PARSE_RECOVER" "ac_cv_have_decl_HTML_PARSE_RECOVER" "#include <libxml/HTMLparser.h>
14324"
14325if test "x$ac_cv_have_decl_HTML_PARSE_RECOVER" = x""yes; then :
14326 HAVE_LIBXML2=yes
14327fi
14328
14329fi
14330
14331
14332 CPPFLAGS="$SAVE_CPPFLAGS"
14333 if test "${HAVE_LIBXML2}" = "yes"; then
14334 LIBXML2_LIBS="-lxml2"
14335 LIBXML2_CFLAGS="-I/usr/include/libxml2"
14336 fi
14337 fi
5476a9a4 14338 if test "${HAVE_LIBXML2}" = "yes"; then
7c61eaab
GM
14339 if test "${opsys}" != "mingw32"; then
14340 LIBS="$LIBXML2_LIBS $LIBS"
14341 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for htmlReadMemory in -lxml2" >&5
5476a9a4
GM
14342$as_echo_n "checking for htmlReadMemory in -lxml2... " >&6; }
14343if test "${ac_cv_lib_xml2_htmlReadMemory+set}" = set; then :
067d23c9
KY
14344 $as_echo_n "(cached) " >&6
14345else
5476a9a4
GM
14346 ac_check_lib_save_LIBS=$LIBS
14347LIBS="-lxml2 $LIBS"
14348cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
14349/* end confdefs.h. */
14350
5476a9a4
GM
14351/* Override any GCC internal prototype to avoid an error.
14352 Use char because int might match the return type of a GCC
14353 builtin and then its argument prototype would still apply. */
14354#ifdef __cplusplus
14355extern "C"
14356#endif
14357char htmlReadMemory ();
067d23c9
KY
14358int
14359main ()
14360{
5476a9a4 14361return htmlReadMemory ();
067d23c9
KY
14362 ;
14363 return 0;
14364}
14365_ACEOF
5476a9a4
GM
14366if ac_fn_c_try_link "$LINENO"; then :
14367 ac_cv_lib_xml2_htmlReadMemory=yes
067d23c9 14368else
5476a9a4 14369 ac_cv_lib_xml2_htmlReadMemory=no
067d23c9 14370fi
5476a9a4
GM
14371rm -f core conftest.err conftest.$ac_objext \
14372 conftest$ac_exeext conftest.$ac_ext
14373LIBS=$ac_check_lib_save_LIBS
14374fi
14375{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_htmlReadMemory" >&5
14376$as_echo "$ac_cv_lib_xml2_htmlReadMemory" >&6; }
14377if test "x$ac_cv_lib_xml2_htmlReadMemory" = x""yes; then :
14378 HAVE_LIBXML2=yes
14379else
14380 HAVE_LIBXML2=no
067d23c9
KY
14381fi
14382
7c61eaab
GM
14383 else
14384 LIBXML2_LIBS=""
14385 fi
5476a9a4 14386 if test "${HAVE_LIBXML2}" = "yes"; then
067d23c9 14387
5476a9a4 14388$as_echo "#define HAVE_LIBXML2 1" >>confdefs.h
067d23c9 14389
5476a9a4
GM
14390 else
14391 LIBXML2_LIBS=""
14392 LIBXML2_CFLAGS=""
14393 fi
067d23c9 14394 fi
5476a9a4 14395fi
067d23c9 14396
067d23c9 14397
067d23c9 14398
5476a9a4 14399# If netdb.h doesn't declare h_errno, we must declare it by hand.
7c61eaab
GM
14400# On MinGW, that is provided by nt/inc/sys/socket.h and w32.c.
14401if test "${opsys}" = "mingw32"; then
14402 emacs_cv_netdb_declares_h_errno=yes
14403fi
5476a9a4
GM
14404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether netdb declares h_errno" >&5
14405$as_echo_n "checking whether netdb declares h_errno... " >&6; }
14406if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then :
14407 $as_echo_n "(cached) " >&6
067d23c9 14408else
5476a9a4
GM
14409 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14410/* end confdefs.h. */
14411#include <netdb.h>
14412int
14413main ()
14414{
14415return h_errno;
14416 ;
14417 return 0;
14418}
14419_ACEOF
14420if ac_fn_c_try_link "$LINENO"; then :
14421 emacs_cv_netdb_declares_h_errno=yes
14422else
14423 emacs_cv_netdb_declares_h_errno=no
067d23c9 14424fi
5476a9a4
GM
14425rm -f core conftest.err conftest.$ac_objext \
14426 conftest$ac_exeext conftest.$ac_ext
14427fi
14428{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_netdb_declares_h_errno" >&5
14429$as_echo "$emacs_cv_netdb_declares_h_errno" >&6; }
14430if test $emacs_cv_netdb_declares_h_errno = yes; then
067d23c9 14431
5476a9a4 14432$as_echo "#define HAVE_H_ERRNO 1" >>confdefs.h
f199cab1 14433
5476a9a4 14434fi
f199cab1 14435
2c98a625 14436# sqrt and other floating-point functions such as fmod and frexp
7c61eaab
GM
14437# are found in -lm on most systems, but mingw32 doesn't use -lm.
14438if test "${opsys}" != "mingw32"; then
14439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5
5476a9a4
GM
14440$as_echo_n "checking for sqrt in -lm... " >&6; }
14441if test "${ac_cv_lib_m_sqrt+set}" = set; then :
14442 $as_echo_n "(cached) " >&6
14443else
14444 ac_check_lib_save_LIBS=$LIBS
14445LIBS="-lm $LIBS"
14446cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14447/* end confdefs.h. */
f199cab1 14448
5476a9a4
GM
14449/* Override any GCC internal prototype to avoid an error.
14450 Use char because int might match the return type of a GCC
14451 builtin and then its argument prototype would still apply. */
14452#ifdef __cplusplus
14453extern "C"
14454#endif
14455char sqrt ();
14456int
14457main ()
14458{
14459return sqrt ();
14460 ;
14461 return 0;
14462}
14463_ACEOF
14464if ac_fn_c_try_link "$LINENO"; then :
14465 ac_cv_lib_m_sqrt=yes
14466else
14467 ac_cv_lib_m_sqrt=no
14468fi
14469rm -f core conftest.err conftest.$ac_objext \
14470 conftest$ac_exeext conftest.$ac_ext
14471LIBS=$ac_check_lib_save_LIBS
14472fi
14473{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sqrt" >&5
14474$as_echo "$ac_cv_lib_m_sqrt" >&6; }
14475if test "x$ac_cv_lib_m_sqrt" = x""yes; then :
14476 cat >>confdefs.h <<_ACEOF
14477#define HAVE_LIBM 1
14478_ACEOF
f199cab1 14479
5476a9a4 14480 LIBS="-lm $LIBS"
f199cab1 14481
5476a9a4 14482fi
f199cab1 14483
7c61eaab 14484fi
f199cab1 14485
5476a9a4
GM
14486# Check for mail-locking functions in a "mail" library. Probably this should
14487# have the same check as for liblockfile below.
14488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -lmail" >&5
14489$as_echo_n "checking for maillock in -lmail... " >&6; }
14490if test "${ac_cv_lib_mail_maillock+set}" = set; then :
067d23c9
KY
14491 $as_echo_n "(cached) " >&6
14492else
5476a9a4
GM
14493 ac_check_lib_save_LIBS=$LIBS
14494LIBS="-lmail $LIBS"
14495cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
14496/* end confdefs.h. */
14497
5476a9a4
GM
14498/* Override any GCC internal prototype to avoid an error.
14499 Use char because int might match the return type of a GCC
14500 builtin and then its argument prototype would still apply. */
14501#ifdef __cplusplus
14502extern "C"
067d23c9 14503#endif
5476a9a4
GM
14504char maillock ();
14505int
14506main ()
14507{
14508return maillock ();
14509 ;
14510 return 0;
14511}
067d23c9 14512_ACEOF
5476a9a4
GM
14513if ac_fn_c_try_link "$LINENO"; then :
14514 ac_cv_lib_mail_maillock=yes
067d23c9 14515else
5476a9a4 14516 ac_cv_lib_mail_maillock=no
067d23c9 14517fi
5476a9a4
GM
14518rm -f core conftest.err conftest.$ac_objext \
14519 conftest$ac_exeext conftest.$ac_ext
14520LIBS=$ac_check_lib_save_LIBS
067d23c9 14521fi
5476a9a4
GM
14522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mail_maillock" >&5
14523$as_echo "$ac_cv_lib_mail_maillock" >&6; }
14524if test "x$ac_cv_lib_mail_maillock" = x""yes; then :
14525 have_mail=yes
f199cab1 14526else
5476a9a4 14527 have_mail=no
067d23c9
KY
14528fi
14529
5476a9a4
GM
14530if test $have_mail = yes; then
14531 LIBS_MAIL=-lmail
14532 LIBS="$LIBS_MAIL $LIBS"
067d23c9 14533
5476a9a4 14534$as_echo "#define HAVE_LIBMAIL 1" >>confdefs.h
067d23c9 14535
5476a9a4
GM
14536else
14537 LIBS_MAIL=
14538fi
14539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -llockfile" >&5
14540$as_echo_n "checking for maillock in -llockfile... " >&6; }
14541if test "${ac_cv_lib_lockfile_maillock+set}" = set; then :
067d23c9
KY
14542 $as_echo_n "(cached) " >&6
14543else
5476a9a4
GM
14544 ac_check_lib_save_LIBS=$LIBS
14545LIBS="-llockfile $LIBS"
067d23c9
KY
14546cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14547/* end confdefs.h. */
14548
14549/* Override any GCC internal prototype to avoid an error.
14550 Use char because int might match the return type of a GCC
14551 builtin and then its argument prototype would still apply. */
14552#ifdef __cplusplus
14553extern "C"
14554#endif
5476a9a4 14555char maillock ();
067d23c9
KY
14556int
14557main ()
14558{
5476a9a4 14559return maillock ();
067d23c9
KY
14560 ;
14561 return 0;
14562}
14563_ACEOF
5476a9a4
GM
14564if ac_fn_c_try_link "$LINENO"; then :
14565 ac_cv_lib_lockfile_maillock=yes
14566else
14567 ac_cv_lib_lockfile_maillock=no
067d23c9
KY
14568fi
14569rm -f core conftest.err conftest.$ac_objext \
5476a9a4
GM
14570 conftest$ac_exeext conftest.$ac_ext
14571LIBS=$ac_check_lib_save_LIBS
067d23c9 14572fi
5476a9a4
GM
14573{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lockfile_maillock" >&5
14574$as_echo "$ac_cv_lib_lockfile_maillock" >&6; }
14575if test "x$ac_cv_lib_lockfile_maillock" = x""yes; then :
14576 have_lockfile=yes
067d23c9 14577else
5476a9a4 14578 have_lockfile=no
f199cab1
GM
14579fi
14580
5476a9a4
GM
14581if test $have_lockfile = yes; then
14582 LIBS_MAIL=-llockfile
14583 LIBS="$LIBS_MAIL $LIBS"
067d23c9 14584
5476a9a4 14585$as_echo "#define HAVE_LIBLOCKFILE 1" >>confdefs.h
067d23c9 14586
5476a9a4
GM
14587else
14588# If we have the shared liblockfile, assume we must use it for mail
14589# locking (e.g. Debian). If we couldn't link against liblockfile
14590# (no liblockfile.a installed), ensure that we don't need to.
14591 # Extract the first word of "liblockfile.so", so it can be a program name with args.
14592set dummy liblockfile.so; ac_word=$2
14593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14594$as_echo_n "checking for $ac_word... " >&6; }
14595if test "${ac_cv_prog_liblockfile+set}" = set; then :
14596 $as_echo_n "(cached) " >&6
14597else
14598 if test -n "$liblockfile"; then
14599 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
14600else
14601as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14602as_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
14603for as_dir in $as_dummy
14604do
14605 IFS=$as_save_IFS
14606 test -z "$as_dir" && as_dir=.
14607 for ac_exec_ext in '' $ac_executable_extensions; do
14608 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
14609 ac_cv_prog_liblockfile="yes"
14610 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14611 break 2
14612 fi
14613done
14614 done
14615IFS=$as_save_IFS
067d23c9 14616
5476a9a4
GM
14617 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
14618fi
14619fi
14620liblockfile=$ac_cv_prog_liblockfile
14621if test -n "$liblockfile"; then
14622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $liblockfile" >&5
14623$as_echo "$liblockfile" >&6; }
14624else
14625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14626$as_echo "no" >&6; }
14627fi
067d23c9 14628
067d23c9 14629
5476a9a4
GM
14630 if test $ac_cv_prog_liblockfile = yes; then
14631 as_fn_error "Shared liblockfile found but can't link against it.
14632This probably means that movemail could lose mail.
14633There may be a \`development' package to install containing liblockfile." "$LINENO" 5
14634 fi
14635fi
067d23c9 14636
067d23c9 14637
067d23c9 14638
067d23c9
KY
14639
14640
5476a9a4
GM
14641## Define MAIL_USE_FLOCK (or LOCKF) if the mailer uses flock (or lockf) to
14642## interlock access to the mail spool. The alternative is a lock file named
14643## /usr/spool/mail/$USER.lock.
14644mail_lock=no
14645case "$opsys" in
14646 aix4-2) mail_lock="lockf" ;;
067d23c9 14647
87e1a811 14648 gnu|freebsd|dragonfly|netbsd|openbsd|darwin|irix6-5) mail_lock="flock" ;;
067d23c9 14649
5476a9a4
GM
14650 ## On GNU/Linux systems, both methods are used by various mail programs.
14651 ## I assume most people are using newer mailers that have heard of flock.
14652 ## Change this if you need to.
14653 ## Debian contains a patch which says: ``On Debian/GNU/Linux systems,
14654 ## configure gets the right answers, and that means *NOT* using flock.
14655 ## Using flock is guaranteed to be the wrong thing. See Debian Policy
14656 ## for details.'' and then uses `#ifdef DEBIAN'. Unfortunately the
14657 ## Debian maintainer hasn't provided a clean fix for Emacs.
14658 ## movemail.c will use `maillock' when MAILDIR, HAVE_LIBMAIL and
14659 ## HAVE_MAILLOCK_H are defined, so the following appears to be the
14660 ## correct logic. -- fx
14661 ## We must check for HAVE_LIBLOCKFILE too, as movemail does.
14662 ## liblockfile is a Free Software replacement for libmail, used on
14663 ## Debian systems and elsewhere. -rfr.
14664 gnu-*)
14665 mail_lock="flock"
14666 if test $have_mail = yes || test $have_lockfile = yes; then
14667 test $ac_cv_header_maillock_h = yes && mail_lock=no
14668 fi
14669 ;;
7c61eaab
GM
14670
14671 mingw32)
14672 mail_lock="none-needed" ;;
5476a9a4 14673esac
f199cab1 14674
5476a9a4
GM
14675BLESSMAIL_TARGET=
14676case "$mail_lock" in
14677 flock)
14678$as_echo "#define MAIL_USE_FLOCK 1" >>confdefs.h
14679 ;;
f199cab1 14680
5476a9a4
GM
14681 lockf)
14682$as_echo "#define MAIL_USE_LOCKF 1" >>confdefs.h
14683 ;;
f199cab1 14684
7c61eaab
GM
14685 none-needed) ;;
14686
5476a9a4
GM
14687 *) BLESSMAIL_TARGET="need-blessmail" ;;
14688esac
f199cab1
GM
14689
14690
14691
5476a9a4 14692for ac_func in gethostname \
e7d0e5ee 14693getrusage get_current_dir_name \
eda33f78 14694lrand48 \
a455a5ce 14695select getpagesize setlocale \
aa8715fb 14696utimes getrlimit setrlimit shutdown getaddrinfo \
eda33f78 14697strsignal setitimer \
5476a9a4 14698sendto recvfrom getsockname getpeername getifaddrs freeifaddrs \
2407788f 14699gai_strerror mkstemp getline getdelim sync \
5476a9a4
GM
14700difftime posix_memalign \
14701getpwent endpwent getgrent endgrent \
14702touchlock \
4628c0bf 14703cfmakeraw cfsetspeed copysign __executable_start log2
5476a9a4
GM
14704do :
14705 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14706ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14707eval as_val=\$$as_ac_var
14708 if test "x$as_val" = x""yes; then :
14709 cat >>confdefs.h <<_ACEOF
14710#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14711_ACEOF
f199cab1 14712
5476a9a4
GM
14713fi
14714done
f199cab1
GM
14715
14716
5476a9a4
GM
14717## Eric Backus <ericb@lsid.hp.com> says, HP-UX 9.x on HP 700 machines
14718## has a broken `rint' in some library versions including math library
14719## version number A.09.05.
14720## You can fix the math library by installing patch number PHSS_4630.
14721## But we can fix it more reliably for Emacs by just not using rint.
8ad96b1d 14722## We also skip HAVE_RANDOM - see comments in src/conf_post.h.
5476a9a4
GM
14723case $opsys in
14724 hpux*) : ;;
14725 *) for ac_func in random rint
14726do :
14727 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14728ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14729eval as_val=\$$as_ac_var
14730 if test "x$as_val" = x""yes; then :
14731 cat >>confdefs.h <<_ACEOF
14732#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14733_ACEOF
f199cab1 14734
5476a9a4
GM
14735fi
14736done
14737 ;;
14738esac
f199cab1 14739
5476a9a4
GM
14740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unwind_init" >&5
14741$as_echo_n "checking for __builtin_unwind_init... " >&6; }
14742if test "${emacs_cv_func___builtin_unwind_init+set}" = set; then :
067d23c9 14743 $as_echo_n "(cached) " >&6
f199cab1
GM
14744else
14745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
14746/* end confdefs.h. */
14747
067d23c9
KY
14748int
14749main ()
14750{
5476a9a4 14751__builtin_unwind_init ();
067d23c9
KY
14752 ;
14753 return 0;
14754}
14755_ACEOF
5476a9a4
GM
14756if ac_fn_c_try_link "$LINENO"; then :
14757 emacs_cv_func___builtin_unwind_init=yes
067d23c9 14758else
5476a9a4 14759 emacs_cv_func___builtin_unwind_init=no
067d23c9 14760fi
5476a9a4
GM
14761rm -f core conftest.err conftest.$ac_objext \
14762 conftest$ac_exeext conftest.$ac_ext
067d23c9 14763fi
5476a9a4
GM
14764{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_func___builtin_unwind_init" >&5
14765$as_echo "$emacs_cv_func___builtin_unwind_init" >&6; }
14766if test $emacs_cv_func___builtin_unwind_init = yes; then
067d23c9 14767
5476a9a4 14768$as_echo "#define HAVE___BUILTIN_UNWIND_INIT 1" >>confdefs.h
f199cab1 14769
067d23c9 14770fi
067d23c9 14771
f199cab1
GM
14772
14773
14774
14775
5476a9a4
GM
14776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
14777$as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
14778if test "${ac_cv_sys_largefile_source+set}" = set; then :
14779 $as_echo_n "(cached) " >&6
14780else
14781 while :; do
14782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14783/* end confdefs.h. */
14784#include <sys/types.h> /* for off_t */
14785 #include <stdio.h>
14786int
14787main ()
14788{
14789int (*fp) (FILE *, off_t, int) = fseeko;
14790 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
14791 ;
14792 return 0;
14793}
14794_ACEOF
14795if ac_fn_c_try_link "$LINENO"; then :
14796 ac_cv_sys_largefile_source=no; break
067d23c9 14797fi
5476a9a4
GM
14798rm -f core conftest.err conftest.$ac_objext \
14799 conftest$ac_exeext conftest.$ac_ext
14800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14801/* end confdefs.h. */
14802#define _LARGEFILE_SOURCE 1
14803#include <sys/types.h> /* for off_t */
14804 #include <stdio.h>
14805int
14806main ()
14807{
14808int (*fp) (FILE *, off_t, int) = fseeko;
14809 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
14810 ;
14811 return 0;
14812}
14813_ACEOF
14814if ac_fn_c_try_link "$LINENO"; then :
14815 ac_cv_sys_largefile_source=1; break
14816fi
14817rm -f core conftest.err conftest.$ac_objext \
14818 conftest$ac_exeext conftest.$ac_ext
14819 ac_cv_sys_largefile_source=unknown
14820 break
14821done
14822fi
14823{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
14824$as_echo "$ac_cv_sys_largefile_source" >&6; }
14825case $ac_cv_sys_largefile_source in #(
14826 no | unknown) ;;
14827 *)
14828cat >>confdefs.h <<_ACEOF
14829#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
14830_ACEOF
14831;;
14832esac
14833rm -rf conftest*
067d23c9 14834
5476a9a4
GM
14835# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
14836# in glibc 2.1.3, but that breaks too many other things.
14837# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
14838if test $ac_cv_sys_largefile_source != unknown; then
067d23c9 14839
5476a9a4 14840$as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
067d23c9 14841
5476a9a4 14842fi
067d23c9
KY
14843
14844
5476a9a4
GM
14845# UNIX98 PTYs.
14846for ac_func in grantpt
14847do :
14848 ac_fn_c_check_func "$LINENO" "grantpt" "ac_cv_func_grantpt"
14849if test "x$ac_cv_func_grantpt" = x""yes; then :
14850 cat >>confdefs.h <<_ACEOF
14851#define HAVE_GRANTPT 1
14852_ACEOF
f199cab1 14853
5476a9a4
GM
14854fi
14855done
f199cab1 14856
f199cab1 14857
5476a9a4 14858# PTY-related GNU extensions.
1146da8d 14859for ac_func in getpt posix_openpt
5476a9a4 14860do :
1146da8d
GM
14861 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14862ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14863eval as_val=\$$as_ac_var
14864 if test "x$as_val" = x""yes; then :
5476a9a4 14865 cat >>confdefs.h <<_ACEOF
1146da8d 14866#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
5476a9a4 14867_ACEOF
f199cab1 14868
5476a9a4
GM
14869fi
14870done
f199cab1 14871
f199cab1 14872
5476a9a4
GM
14873# Check this now, so that we will NOT find the above functions in ncurses.
14874# That is because we have not set up to link ncurses in lib-src.
14875# It's better to believe a function is not available
14876# than to expect to find it in ncurses.
14877# Also we need tputs and friends to be able to build at all.
14878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tputs" >&5
14879$as_echo_n "checking for library containing tputs... " >&6; }
14880# Run a test program that contains a call to tputs, a call that is
14881# never executed. This tests whether a pre-'main' dynamic linker
14882# works with the library. It's too much trouble to actually call
14883# tputs in the test program, due to portability hassles. When
14884# cross-compiling, assume the test program will run if it links.
f199cab1 14885
7c61eaab
GM
14886if test "${opsys}" = "mingw32"; then
14887 msg='none required'
14888else
14889 # Maybe curses should be tried earlier?
14890 # See http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9736#35
14891 for tputs_library in '' tinfo ncurses terminfo termcap curses; do
14892 OLIBS=$LIBS
14893 if test -z "$tputs_library"; then
14894 LIBS_TERMCAP=
14895 msg='none required'
14896 else
14897 LIBS_TERMCAP=-l$tputs_library
14898 msg=$LIBS_TERMCAP
14899 LIBS="$LIBS_TERMCAP $LIBS"
14900 fi
14901 if test "$cross_compiling" = yes; then :
5476a9a4 14902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
14903/* end confdefs.h. */
14904
5476a9a4
GM
14905 extern void tputs (const char *, int, int (*)(int));
14906 int main (int argc, char **argv)
14907 {
14908 if (argc == 10000)
14909 tputs (argv[0], 0, 0);
14910 return 0;
14911 }
14912
067d23c9
KY
14913_ACEOF
14914if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 14915
067d23c9 14916else
5476a9a4 14917 msg=no
067d23c9
KY
14918fi
14919rm -f core conftest.err conftest.$ac_objext \
14920 conftest$ac_exeext conftest.$ac_ext
067d23c9 14921else
5476a9a4 14922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
14923/* end confdefs.h. */
14924
5476a9a4
GM
14925 extern void tputs (const char *, int, int (*)(int));
14926 int main (int argc, char **argv)
14927 {
14928 if (argc == 10000)
14929 tputs (argv[0], 0, 0);
14930 return 0;
14931 }
14932
067d23c9 14933_ACEOF
5476a9a4
GM
14934if ac_fn_c_try_run "$LINENO"; then :
14935
067d23c9 14936else
5476a9a4 14937 msg=no
067d23c9 14938fi
5476a9a4
GM
14939rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14940 conftest.$ac_objext conftest.beam conftest.$ac_ext
067d23c9 14941fi
5476a9a4 14942
7c61eaab
GM
14943 LIBS=$OLIBS
14944 if test "X$msg" != Xno; then
14945 break
14946 fi
14947 done
14948fi
5476a9a4
GM
14949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $msg" >&5
14950$as_echo "$msg" >&6; }
14951if test "X$msg" = Xno; then
14952 as_fn_error "The required function \`tputs' was not found in any library.
14953The following libraries were tried (in order):
14954 libtinfo, libncurses, libterminfo, libtermcap, libcurses
14955Please try installing whichever of these libraries is most appropriate
14956for your system, together with its header files.
14957For example, a libncurses-dev(el) or similar package." "$LINENO" 5
067d23c9
KY
14958fi
14959
5476a9a4
GM
14960## Use termcap instead of terminfo?
14961## Only true for: freebsd < 40000, ms-w32, msdos, netbsd < 599002500.
14962TERMINFO=yes
14963## FIXME? In the cases below where we unconditionally set
14964## LIBS_TERMCAP="-lncurses", this overrides LIBS_TERMCAP = -ltinfo,
14965## if that was found above to have tputs.
14966## Should we use the gnu* logic everywhere?
14967case "$opsys" in
14968 ## darwin: Prevents crashes when running Emacs in Terminal.app under 10.2.
14969 ## The ncurses library has been moved out of the System framework in
14970 ## Mac OS X 10.2. So if configure detects it, set the command-line
14971 ## option to use it.
14972 darwin) LIBS_TERMCAP="-lncurses" ;;
14973
14974 gnu*) test -z "$LIBS_TERMCAP" && LIBS_TERMCAP="-lncurses" ;;
14975
14976 freebsd)
14977 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether FreeBSD is new enough to use terminfo" >&5
14978$as_echo_n "checking whether FreeBSD is new enough to use terminfo... " >&6; }
14979 if test "${emacs_cv_freebsd_terminfo+set}" = set; then :
067d23c9
KY
14980 $as_echo_n "(cached) " >&6
14981else
5476a9a4 14982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 14983/* end confdefs.h. */
5476a9a4 14984#include <osreldate.h>
067d23c9
KY
14985int
14986main ()
14987{
5476a9a4
GM
14988#if __FreeBSD_version < 400000
14989fail;
14990#endif
14991
067d23c9
KY
14992 ;
14993 return 0;
14994}
14995_ACEOF
14996if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 14997 emacs_cv_freebsd_terminfo=yes
067d23c9 14998else
5476a9a4 14999 emacs_cv_freebsd_terminfo=no
067d23c9
KY
15000fi
15001rm -f core conftest.err conftest.$ac_objext \
15002 conftest$ac_exeext conftest.$ac_ext
15003fi
5476a9a4
GM
15004
15005
15006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_freebsd_terminfo" >&5
15007$as_echo "$emacs_cv_freebsd_terminfo" >&6; }
15008
15009 if test $emacs_cv_freebsd_terminfo = yes; then
15010 LIBS_TERMCAP="-lncurses"
15011 else
15012 TERMINFO=no
15013 LIBS_TERMCAP="-ltermcap"
15014 fi
15015 ;;
15016
7c61eaab
GM
15017 mingw32)
15018 TERMINFO=no
15019 LIBS_TERMCAP=
15020 ;;
15021
5476a9a4
GM
15022 netbsd)
15023 if test "x$LIBS_TERMCAP" != "x-lterminfo"; then
15024 TERMINFO=no
15025 LIBS_TERMCAP="-ltermcap"
15026 fi
15027 ;;
15028
87e1a811 15029 openbsd | dragonfly) LIBS_TERMCAP="-lncurses" ;;
5476a9a4
GM
15030
15031 ## hpux: Make sure we get select from libc rather than from libcurses
15032 ## because libcurses on HPUX 10.10 has a broken version of select.
15033 ## We used to use -lc -lcurses, but this may be cleaner.
15034 ## FIXME? But TERMINFO = yes on hpux (it used to be explicitly
15035 # set that way, now it uses the default). Isn't this a contradiction?
15036 hpux*) LIBS_TERMCAP="-ltermcap" ;;
15037
15038esac
15039
15040TERMCAP_OBJ=tparam.o
15041if test $TERMINFO = yes; then
15042
15043$as_echo "#define TERMINFO 1" >>confdefs.h
15044
15045 TERMCAP_OBJ=terminfo.o
067d23c9
KY
15046fi
15047
f199cab1 15048
067d23c9 15049
5476a9a4
GM
15050
15051# Do we have res_init, for detecting changes in /etc/resolv.conf?
15052# On Darwin, res_init appears not to be useful: see bug#562 and
15053# http://lists.gnu.org/archive/html/emacs-devel/2007-11/msg01467.html
15054resolv=no
15055
15056if test $opsys != darwin; then
15057
15058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15059/* end confdefs.h. */
15060#include <netinet/in.h>
15061#include <arpa/nameser.h>
15062#include <resolv.h>
067d23c9
KY
15063int
15064main ()
15065{
5476a9a4 15066return res_init();
067d23c9
KY
15067 ;
15068 return 0;
15069}
15070_ACEOF
15071if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 15072 have_res_init=yes
067d23c9 15073else
5476a9a4 15074 have_res_init=no
067d23c9
KY
15075fi
15076rm -f core conftest.err conftest.$ac_objext \
15077 conftest$ac_exeext conftest.$ac_ext
5476a9a4
GM
15078 if test "$have_res_init" = no; then
15079 OLIBS="$LIBS"
15080 LIBS="$LIBS -lresolv"
15081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_init with -lresolv" >&5
15082$as_echo_n "checking for res_init with -lresolv... " >&6; }
15083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 15084/* end confdefs.h. */
5476a9a4
GM
15085#include <netinet/in.h>
15086#include <arpa/nameser.h>
15087#include <resolv.h>
067d23c9
KY
15088int
15089main ()
15090{
5476a9a4 15091return res_init();
067d23c9
KY
15092 ;
15093 return 0;
15094}
15095_ACEOF
15096if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 15097 have_res_init=yes
067d23c9 15098else
5476a9a4 15099 have_res_init=no
067d23c9
KY
15100fi
15101rm -f core conftest.err conftest.$ac_objext \
15102 conftest$ac_exeext conftest.$ac_ext
5476a9a4
GM
15103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_res_init" >&5
15104$as_echo "$have_res_init" >&6; }
15105 if test "$have_res_init" = yes ; then
15106 resolv=yes
15107 fi
15108 LIBS="$OLIBS"
15109 fi
067d23c9 15110
5476a9a4
GM
15111 if test "$have_res_init" = yes; then
15112
15113$as_echo "#define HAVE_RES_INIT 1" >>confdefs.h
067d23c9 15114
5476a9a4 15115 fi
067d23c9 15116fi
5476a9a4
GM
15117# Do we need the Hesiod library to provide the support routines?
15118LIBHESIOD=
15119if test "$with_hesiod" != no ; then
15120 # Don't set $LIBS here -- see comments above. FIXME which comments?
15121 ac_fn_c_check_func "$LINENO" "res_send" "ac_cv_func_res_send"
15122if test "x$ac_cv_func_res_send" = x""yes; then :
f199cab1 15123
5476a9a4
GM
15124else
15125 ac_fn_c_check_func "$LINENO" "__res_send" "ac_cv_func___res_send"
15126if test "x$ac_cv_func___res_send" = x""yes; then :
f199cab1 15127
5476a9a4
GM
15128else
15129 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_send in -lresolv" >&5
15130$as_echo_n "checking for res_send in -lresolv... " >&6; }
15131if test "${ac_cv_lib_resolv_res_send+set}" = set; then :
067d23c9
KY
15132 $as_echo_n "(cached) " >&6
15133else
15134 ac_check_lib_save_LIBS=$LIBS
5476a9a4 15135LIBS="-lresolv $LIBS"
067d23c9
KY
15136cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15137/* end confdefs.h. */
15138
15139/* Override any GCC internal prototype to avoid an error.
15140 Use char because int might match the return type of a GCC
15141 builtin and then its argument prototype would still apply. */
15142#ifdef __cplusplus
15143extern "C"
15144#endif
5476a9a4 15145char res_send ();
067d23c9
KY
15146int
15147main ()
15148{
5476a9a4 15149return res_send ();
067d23c9
KY
15150 ;
15151 return 0;
15152}
15153_ACEOF
15154if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 15155 ac_cv_lib_resolv_res_send=yes
067d23c9 15156else
5476a9a4 15157 ac_cv_lib_resolv_res_send=no
067d23c9
KY
15158fi
15159rm -f core conftest.err conftest.$ac_objext \
f199cab1
GM
15160 conftest$ac_exeext conftest.$ac_ext
15161LIBS=$ac_check_lib_save_LIBS
15162fi
5476a9a4
GM
15163{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_send" >&5
15164$as_echo "$ac_cv_lib_resolv_res_send" >&6; }
15165if test "x$ac_cv_lib_resolv_res_send" = x""yes; then :
15166 resolv=yes
15167else
15168 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __res_send in -lresolv" >&5
15169$as_echo_n "checking for __res_send in -lresolv... " >&6; }
15170if test "${ac_cv_lib_resolv___res_send+set}" = set; then :
f199cab1
GM
15171 $as_echo_n "(cached) " >&6
15172else
15173 ac_check_lib_save_LIBS=$LIBS
5476a9a4 15174LIBS="-lresolv $LIBS"
f199cab1
GM
15175cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15176/* end confdefs.h. */
4717915f 15177
f199cab1
GM
15178/* Override any GCC internal prototype to avoid an error.
15179 Use char because int might match the return type of a GCC
15180 builtin and then its argument prototype would still apply. */
15181#ifdef __cplusplus
15182extern "C"
15183#endif
5476a9a4 15184char __res_send ();
f199cab1
GM
15185int
15186main ()
15187{
5476a9a4 15188return __res_send ();
f199cab1
GM
15189 ;
15190 return 0;
15191}
15192_ACEOF
15193if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 15194 ac_cv_lib_resolv___res_send=yes
f199cab1 15195else
5476a9a4 15196 ac_cv_lib_resolv___res_send=no
f199cab1
GM
15197fi
15198rm -f core conftest.err conftest.$ac_objext \
15199 conftest$ac_exeext conftest.$ac_ext
15200LIBS=$ac_check_lib_save_LIBS
15201fi
5476a9a4
GM
15202{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv___res_send" >&5
15203$as_echo "$ac_cv_lib_resolv___res_send" >&6; }
15204if test "x$ac_cv_lib_resolv___res_send" = x""yes; then :
15205 resolv=yes
067d23c9 15206fi
f199cab1 15207
5476a9a4 15208fi
1f5d53eb 15209
5476a9a4 15210fi
067d23c9 15211
067d23c9
KY
15212fi
15213
5476a9a4
GM
15214 if test "$resolv" = yes ; then
15215 RESOLVLIB=-lresolv
15216 else
15217 RESOLVLIB=
15218 fi
15219 ac_fn_c_check_func "$LINENO" "hes_getmailhost" "ac_cv_func_hes_getmailhost"
15220if test "x$ac_cv_func_hes_getmailhost" = x""yes; then :
15221
15222else
15223 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hes_getmailhost in -lhesiod" >&5
15224$as_echo_n "checking for hes_getmailhost in -lhesiod... " >&6; }
15225if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then :
15226 $as_echo_n "(cached) " >&6
15227else
15228 ac_check_lib_save_LIBS=$LIBS
15229LIBS="-lhesiod $RESOLVLIB $LIBS"
15230cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 15231/* end confdefs.h. */
5476a9a4
GM
15232
15233/* Override any GCC internal prototype to avoid an error.
15234 Use char because int might match the return type of a GCC
15235 builtin and then its argument prototype would still apply. */
15236#ifdef __cplusplus
15237extern "C"
15238#endif
15239char hes_getmailhost ();
067d23c9
KY
15240int
15241main ()
15242{
5476a9a4 15243return hes_getmailhost ();
067d23c9
KY
15244 ;
15245 return 0;
15246}
15247_ACEOF
f199cab1 15248if ac_fn_c_try_link "$LINENO"; then :
5476a9a4
GM
15249 ac_cv_lib_hesiod_hes_getmailhost=yes
15250else
15251 ac_cv_lib_hesiod_hes_getmailhost=no
067d23c9 15252fi
f199cab1
GM
15253rm -f core conftest.err conftest.$ac_objext \
15254 conftest$ac_exeext conftest.$ac_ext
5476a9a4 15255LIBS=$ac_check_lib_save_LIBS
067d23c9 15256fi
5476a9a4
GM
15257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5
15258$as_echo "$ac_cv_lib_hesiod_hes_getmailhost" >&6; }
15259if test "x$ac_cv_lib_hesiod_hes_getmailhost" = x""yes; then :
15260 hesiod=yes
15261else
15262 :
067d23c9
KY
15263fi
15264
c5a68906 15265fi
f199cab1
GM
15266
15267
5476a9a4 15268 if test x"$hesiod" = xyes; then
f199cab1 15269
5476a9a4 15270$as_echo "#define HAVE_LIBHESIOD 1" >>confdefs.h
f199cab1 15271
5476a9a4 15272 LIBHESIOD=-lhesiod
c5a68906 15273 fi
5476a9a4 15274fi
4fc2b746 15275
4fc2b746 15276
5476a9a4
GM
15277# Do we need libresolv (due to res_init or Hesiod)?
15278if test "$resolv" = yes && test $opsys != darwin; then
4fc2b746 15279
5476a9a4 15280$as_echo "#define HAVE_LIBRESOLV 1" >>confdefs.h
4fc2b746 15281
5476a9a4
GM
15282 LIBRESOLV=-lresolv
15283else
15284 LIBRESOLV=
15285fi
4fc2b746 15286
4fc2b746 15287
5476a9a4
GM
15288# These tell us which Kerberos-related libraries to use.
15289COM_ERRLIB=
15290CRYPTOLIB=
15291KRB5LIB=
15292DESLIB=
15293KRB4LIB=
4fc2b746 15294
5476a9a4
GM
15295if test "${with_kerberos}" != no; then
15296 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for com_err in -lcom_err" >&5
15297$as_echo_n "checking for com_err in -lcom_err... " >&6; }
15298if test "${ac_cv_lib_com_err_com_err+set}" = set; then :
15299 $as_echo_n "(cached) " >&6
15300else
15301 ac_check_lib_save_LIBS=$LIBS
15302LIBS="-lcom_err $LIBS"
15303cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15304/* end confdefs.h. */
4fc2b746 15305
5476a9a4
GM
15306/* Override any GCC internal prototype to avoid an error.
15307 Use char because int might match the return type of a GCC
15308 builtin and then its argument prototype would still apply. */
15309#ifdef __cplusplus
15310extern "C"
15311#endif
15312char com_err ();
15313int
15314main ()
15315{
15316return com_err ();
15317 ;
15318 return 0;
15319}
15320_ACEOF
15321if ac_fn_c_try_link "$LINENO"; then :
15322 ac_cv_lib_com_err_com_err=yes
15323else
15324 ac_cv_lib_com_err_com_err=no
15325fi
15326rm -f core conftest.err conftest.$ac_objext \
15327 conftest$ac_exeext conftest.$ac_ext
15328LIBS=$ac_check_lib_save_LIBS
15329fi
15330{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_com_err_com_err" >&5
15331$as_echo "$ac_cv_lib_com_err_com_err" >&6; }
15332if test "x$ac_cv_lib_com_err_com_err" = x""yes; then :
15333 have_com_err=yes
15334else
15335 have_com_err=no
15336fi
f199cab1 15337
5476a9a4
GM
15338 if test $have_com_err = yes; then
15339 COM_ERRLIB=-lcom_err
15340 LIBS="$COM_ERRLIB $LIBS"
f199cab1 15341
5476a9a4 15342$as_echo "#define HAVE_LIBCOM_ERR 1" >>confdefs.h
f199cab1 15343
5476a9a4
GM
15344 fi
15345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lcrypto" >&5
15346$as_echo_n "checking for mit_des_cbc_encrypt in -lcrypto... " >&6; }
15347if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then :
15348 $as_echo_n "(cached) " >&6
15349else
15350 ac_check_lib_save_LIBS=$LIBS
15351LIBS="-lcrypto $LIBS"
15352cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15353/* end confdefs.h. */
f199cab1 15354
5476a9a4
GM
15355/* Override any GCC internal prototype to avoid an error.
15356 Use char because int might match the return type of a GCC
15357 builtin and then its argument prototype would still apply. */
15358#ifdef __cplusplus
15359extern "C"
15360#endif
15361char mit_des_cbc_encrypt ();
15362int
15363main ()
15364{
15365return mit_des_cbc_encrypt ();
15366 ;
15367 return 0;
15368}
15369_ACEOF
15370if ac_fn_c_try_link "$LINENO"; then :
15371 ac_cv_lib_crypto_mit_des_cbc_encrypt=yes
15372else
15373 ac_cv_lib_crypto_mit_des_cbc_encrypt=no
15374fi
15375rm -f core conftest.err conftest.$ac_objext \
15376 conftest$ac_exeext conftest.$ac_ext
15377LIBS=$ac_check_lib_save_LIBS
15378fi
15379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5
15380$as_echo "$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6; }
15381if test "x$ac_cv_lib_crypto_mit_des_cbc_encrypt" = x""yes; then :
15382 have_crypto=yes
15383else
15384 have_crypto=no
15385fi
f199cab1 15386
5476a9a4
GM
15387 if test $have_crypto = yes; then
15388 CRYPTOLIB=-lcrypto
15389 LIBS="$CRYPTOLIB $LIBS"
f199cab1 15390
5476a9a4 15391$as_echo "#define HAVE_LIBCRYPTO 1" >>confdefs.h
f199cab1 15392
5476a9a4
GM
15393 fi
15394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
15395$as_echo_n "checking for mit_des_cbc_encrypt in -lk5crypto... " >&6; }
15396if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then :
15397 $as_echo_n "(cached) " >&6
15398else
15399 ac_check_lib_save_LIBS=$LIBS
15400LIBS="-lk5crypto $LIBS"
15401cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15402/* end confdefs.h. */
f199cab1 15403
5476a9a4
GM
15404/* Override any GCC internal prototype to avoid an error.
15405 Use char because int might match the return type of a GCC
15406 builtin and then its argument prototype would still apply. */
15407#ifdef __cplusplus
15408extern "C"
15409#endif
15410char mit_des_cbc_encrypt ();
15411int
15412main ()
15413{
15414return mit_des_cbc_encrypt ();
15415 ;
15416 return 0;
15417}
15418_ACEOF
15419if ac_fn_c_try_link "$LINENO"; then :
15420 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes
15421else
15422 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no
15423fi
15424rm -f core conftest.err conftest.$ac_objext \
15425 conftest$ac_exeext conftest.$ac_ext
15426LIBS=$ac_check_lib_save_LIBS
15427fi
15428{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5
15429$as_echo "$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6; }
15430if test "x$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" = x""yes; then :
15431 have_k5crypto=yes
15432else
15433 have_k5crypto=no
4fc2b746 15434fi
4fc2b746 15435
5476a9a4
GM
15436 if test $have_k5crypto = yes; then
15437 CRYPTOLIB=-lk5crypto
15438 LIBS="$CRYPTOLIB $LIBS"
4fc2b746 15439
5476a9a4 15440$as_echo "#define HAVE_LIBK5CRYPTO 1" >>confdefs.h
4fc2b746 15441
5476a9a4
GM
15442 fi
15443 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5_init_context in -lkrb5" >&5
15444$as_echo_n "checking for krb5_init_context in -lkrb5... " >&6; }
15445if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then :
15446 $as_echo_n "(cached) " >&6
15447else
15448 ac_check_lib_save_LIBS=$LIBS
15449LIBS="-lkrb5 $LIBS"
15450cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15451/* end confdefs.h. */
4fc2b746 15452
5476a9a4
GM
15453/* Override any GCC internal prototype to avoid an error.
15454 Use char because int might match the return type of a GCC
15455 builtin and then its argument prototype would still apply. */
15456#ifdef __cplusplus
15457extern "C"
15458#endif
15459char krb5_init_context ();
15460int
15461main ()
15462{
15463return krb5_init_context ();
15464 ;
15465 return 0;
15466}
15467_ACEOF
15468if ac_fn_c_try_link "$LINENO"; then :
15469 ac_cv_lib_krb5_krb5_init_context=yes
15470else
15471 ac_cv_lib_krb5_krb5_init_context=no
15472fi
15473rm -f core conftest.err conftest.$ac_objext \
15474 conftest$ac_exeext conftest.$ac_ext
15475LIBS=$ac_check_lib_save_LIBS
15476fi
15477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb5_krb5_init_context" >&5
15478$as_echo "$ac_cv_lib_krb5_krb5_init_context" >&6; }
15479if test "x$ac_cv_lib_krb5_krb5_init_context" = x""yes; then :
15480 have_krb5=yes
15481else
15482 have_krb5=no
15483fi
f199cab1 15484
5476a9a4
GM
15485 if test $have_krb5=yes; then
15486 KRB5LIB=-lkrb5
15487 LIBS="$KRB5LIB $LIBS"
f199cab1 15488
5476a9a4 15489$as_echo "#define HAVE_LIBKRB5 1" >>confdefs.h
f199cab1 15490
5476a9a4
GM
15491 fi
15492 if test "${with_kerberos5}" = no; then
15493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes425" >&5
15494$as_echo_n "checking for des_cbc_encrypt in -ldes425... " >&6; }
15495if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then :
f199cab1
GM
15496 $as_echo_n "(cached) " >&6
15497else
5476a9a4
GM
15498 ac_check_lib_save_LIBS=$LIBS
15499LIBS="-ldes425 $LIBS"
15500cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3e0be4ab 15501/* end confdefs.h. */
f199cab1 15502
5476a9a4
GM
15503/* Override any GCC internal prototype to avoid an error.
15504 Use char because int might match the return type of a GCC
15505 builtin and then its argument prototype would still apply. */
15506#ifdef __cplusplus
15507extern "C"
15508#endif
15509char des_cbc_encrypt ();
3e0be4ab
GM
15510int
15511main ()
15512{
5476a9a4 15513return des_cbc_encrypt ();
3e0be4ab
GM
15514 ;
15515 return 0;
15516}
15517_ACEOF
5476a9a4
GM
15518if ac_fn_c_try_link "$LINENO"; then :
15519 ac_cv_lib_des425_des_cbc_encrypt=yes
3e0be4ab 15520else
5476a9a4 15521 ac_cv_lib_des425_des_cbc_encrypt=no
3e0be4ab 15522fi
5476a9a4
GM
15523rm -f core conftest.err conftest.$ac_objext \
15524 conftest$ac_exeext conftest.$ac_ext
15525LIBS=$ac_check_lib_save_LIBS
4fc2b746 15526fi
5476a9a4
GM
15527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
15528$as_echo "$ac_cv_lib_des425_des_cbc_encrypt" >&6; }
15529if test "x$ac_cv_lib_des425_des_cbc_encrypt" = x""yes; then :
15530 have_des425=yes
15531else
15532 have_des425=no
f199cab1 15533fi
6c051bab 15534
5476a9a4
GM
15535 if test $have_des425 = yes; then
15536 DESLIB=-ldes425
15537 LIBS="$DESLIB $LIBS"
6c051bab 15538
5476a9a4 15539$as_echo "#define HAVE_LIBDES425 1" >>confdefs.h
f199cab1 15540
5476a9a4
GM
15541 else
15542 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes" >&5
15543$as_echo_n "checking for des_cbc_encrypt in -ldes... " >&6; }
15544if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then :
15545 $as_echo_n "(cached) " >&6
15546else
15547 ac_check_lib_save_LIBS=$LIBS
15548LIBS="-ldes $LIBS"
15549cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15550/* end confdefs.h. */
f199cab1 15551
5476a9a4
GM
15552/* Override any GCC internal prototype to avoid an error.
15553 Use char because int might match the return type of a GCC
15554 builtin and then its argument prototype would still apply. */
15555#ifdef __cplusplus
15556extern "C"
15557#endif
15558char des_cbc_encrypt ();
15559int
15560main ()
15561{
15562return des_cbc_encrypt ();
15563 ;
15564 return 0;
15565}
15566_ACEOF
15567if ac_fn_c_try_link "$LINENO"; then :
15568 ac_cv_lib_des_des_cbc_encrypt=yes
15569else
15570 ac_cv_lib_des_des_cbc_encrypt=no
15571fi
15572rm -f core conftest.err conftest.$ac_objext \
15573 conftest$ac_exeext conftest.$ac_ext
15574LIBS=$ac_check_lib_save_LIBS
15575fi
15576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
15577$as_echo "$ac_cv_lib_des_des_cbc_encrypt" >&6; }
15578if test "x$ac_cv_lib_des_des_cbc_encrypt" = x""yes; then :
15579 have_des=yes
15580else
15581 have_des=no
15582fi
f199cab1 15583
5476a9a4
GM
15584 if test $have_des = yes; then
15585 DESLIB=-ldes
15586 LIBS="$DESLIB $LIBS"
f199cab1 15587
5476a9a4 15588$as_echo "#define HAVE_LIBDES 1" >>confdefs.h
f199cab1 15589
5476a9a4
GM
15590 fi
15591 fi
15592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb4" >&5
15593$as_echo_n "checking for krb_get_cred in -lkrb4... " >&6; }
15594if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then :
942f733f
PE
15595 $as_echo_n "(cached) " >&6
15596else
5476a9a4
GM
15597 ac_check_lib_save_LIBS=$LIBS
15598LIBS="-lkrb4 $LIBS"
15599cat confdefs.h - <<_ACEOF >conftest.$ac_ext
942f733f 15600/* end confdefs.h. */
942f733f 15601
5476a9a4
GM
15602/* Override any GCC internal prototype to avoid an error.
15603 Use char because int might match the return type of a GCC
15604 builtin and then its argument prototype would still apply. */
15605#ifdef __cplusplus
15606extern "C"
15607#endif
15608char krb_get_cred ();
942f733f
PE
15609int
15610main ()
15611{
5476a9a4 15612return krb_get_cred ();
942f733f
PE
15613 ;
15614 return 0;
15615}
15616_ACEOF
5476a9a4
GM
15617if ac_fn_c_try_link "$LINENO"; then :
15618 ac_cv_lib_krb4_krb_get_cred=yes
15619else
15620 ac_cv_lib_krb4_krb_get_cred=no
15621fi
15622rm -f core conftest.err conftest.$ac_objext \
15623 conftest$ac_exeext conftest.$ac_ext
15624LIBS=$ac_check_lib_save_LIBS
15625fi
15626{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb4_krb_get_cred" >&5
15627$as_echo "$ac_cv_lib_krb4_krb_get_cred" >&6; }
15628if test "x$ac_cv_lib_krb4_krb_get_cred" = x""yes; then :
15629 have_krb4=yes
15630else
15631 have_krb4=no
15632fi
15633
15634 if test $have_krb4 = yes; then
15635 KRB4LIB=-lkrb4
15636 LIBS="$KRB4LIB $LIBS"
15637
15638$as_echo "#define HAVE_LIBKRB4 1" >>confdefs.h
15639
15640 else
15641 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb" >&5
15642$as_echo_n "checking for krb_get_cred in -lkrb... " >&6; }
15643if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then :
15644 $as_echo_n "(cached) " >&6
3e0be4ab 15645else
5476a9a4
GM
15646 ac_check_lib_save_LIBS=$LIBS
15647LIBS="-lkrb $LIBS"
15648cat confdefs.h - <<_ACEOF >conftest.$ac_ext
942f733f 15649/* end confdefs.h. */
942f733f 15650
5476a9a4
GM
15651/* Override any GCC internal prototype to avoid an error.
15652 Use char because int might match the return type of a GCC
15653 builtin and then its argument prototype would still apply. */
15654#ifdef __cplusplus
15655extern "C"
15656#endif
15657char krb_get_cred ();
942f733f
PE
15658int
15659main ()
15660{
5476a9a4 15661return krb_get_cred ();
942f733f
PE
15662 ;
15663 return 0;
15664}
15665_ACEOF
5476a9a4
GM
15666if ac_fn_c_try_link "$LINENO"; then :
15667 ac_cv_lib_krb_krb_get_cred=yes
942f733f 15668else
5476a9a4 15669 ac_cv_lib_krb_krb_get_cred=no
942f733f 15670fi
5476a9a4
GM
15671rm -f core conftest.err conftest.$ac_objext \
15672 conftest$ac_exeext conftest.$ac_ext
15673LIBS=$ac_check_lib_save_LIBS
3e0be4ab 15674fi
5476a9a4
GM
15675{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb_krb_get_cred" >&5
15676$as_echo "$ac_cv_lib_krb_krb_get_cred" >&6; }
15677if test "x$ac_cv_lib_krb_krb_get_cred" = x""yes; then :
15678 have_krb=yes
15679else
15680 have_krb=no
942f733f 15681fi
f199cab1 15682
5476a9a4
GM
15683 if test $have_krb = yes; then
15684 KRB4LIB=-lkrb
15685 LIBS="$KRB4LIB $LIBS"
15686
15687$as_echo "#define HAVE_LIBKRB 1" >>confdefs.h
15688
15689 fi
15690 fi
f199cab1
GM
15691 fi
15692
5476a9a4
GM
15693 if test "${with_kerberos5}" != no; then
15694 for ac_header in krb5.h
15695do :
15696 ac_fn_c_check_header_mongrel "$LINENO" "krb5.h" "ac_cv_header_krb5_h" "$ac_includes_default"
15697if test "x$ac_cv_header_krb5_h" = x""yes; then :
15698 cat >>confdefs.h <<_ACEOF
15699#define HAVE_KRB5_H 1
15700_ACEOF
15701 ac_fn_c_check_member "$LINENO" "krb5_error" "text" "ac_cv_member_krb5_error_text" "#include <krb5.h>
15702"
15703if test "x$ac_cv_member_krb5_error_text" = x""yes; then :
15704
f199cab1 15705cat >>confdefs.h <<_ACEOF
5476a9a4 15706#define HAVE_KRB5_ERROR_TEXT 1
f199cab1
GM
15707_ACEOF
15708
15709
5476a9a4
GM
15710fi
15711ac_fn_c_check_member "$LINENO" "krb5_error" "e_text" "ac_cv_member_krb5_error_e_text" "#include <krb5.h>
15712"
15713if test "x$ac_cv_member_krb5_error_e_text" = x""yes; then :
f199cab1 15714
5476a9a4
GM
15715cat >>confdefs.h <<_ACEOF
15716#define HAVE_KRB5_ERROR_E_TEXT 1
15717_ACEOF
f199cab1
GM
15718
15719
5476a9a4 15720fi
f199cab1 15721
5476a9a4 15722fi
f199cab1 15723
5476a9a4 15724done
f199cab1 15725
5476a9a4
GM
15726 else
15727 for ac_header in des.h
15728do :
15729 ac_fn_c_check_header_mongrel "$LINENO" "des.h" "ac_cv_header_des_h" "$ac_includes_default"
15730if test "x$ac_cv_header_des_h" = x""yes; then :
15731 cat >>confdefs.h <<_ACEOF
15732#define HAVE_DES_H 1
15733_ACEOF
f199cab1 15734
5476a9a4
GM
15735else
15736 for ac_header in kerberosIV/des.h
15737do :
15738 ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/des.h" "ac_cv_header_kerberosIV_des_h" "$ac_includes_default"
15739if test "x$ac_cv_header_kerberosIV_des_h" = x""yes; then :
15740 cat >>confdefs.h <<_ACEOF
15741#define HAVE_KERBEROSIV_DES_H 1
15742_ACEOF
f199cab1 15743
5476a9a4
GM
15744else
15745 for ac_header in kerberos/des.h
15746do :
15747 ac_fn_c_check_header_mongrel "$LINENO" "kerberos/des.h" "ac_cv_header_kerberos_des_h" "$ac_includes_default"
15748if test "x$ac_cv_header_kerberos_des_h" = x""yes; then :
15749 cat >>confdefs.h <<_ACEOF
15750#define HAVE_KERBEROS_DES_H 1
15751_ACEOF
f199cab1 15752
5476a9a4 15753fi
f199cab1 15754
5476a9a4
GM
15755done
15756
15757fi
15758
15759done
15760
15761fi
15762
15763done
15764
15765 for ac_header in krb.h
f199cab1 15766do :
5476a9a4
GM
15767 ac_fn_c_check_header_mongrel "$LINENO" "krb.h" "ac_cv_header_krb_h" "$ac_includes_default"
15768if test "x$ac_cv_header_krb_h" = x""yes; then :
f199cab1 15769 cat >>confdefs.h <<_ACEOF
5476a9a4
GM
15770#define HAVE_KRB_H 1
15771_ACEOF
15772
15773else
15774 for ac_header in kerberosIV/krb.h
15775do :
15776 ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/krb.h" "ac_cv_header_kerberosIV_krb_h" "$ac_includes_default"
15777if test "x$ac_cv_header_kerberosIV_krb_h" = x""yes; then :
15778 cat >>confdefs.h <<_ACEOF
15779#define HAVE_KERBEROSIV_KRB_H 1
15780_ACEOF
15781
15782else
15783 for ac_header in kerberos/krb.h
15784do :
15785 ac_fn_c_check_header_mongrel "$LINENO" "kerberos/krb.h" "ac_cv_header_kerberos_krb_h" "$ac_includes_default"
15786if test "x$ac_cv_header_kerberos_krb_h" = x""yes; then :
15787 cat >>confdefs.h <<_ACEOF
15788#define HAVE_KERBEROS_KRB_H 1
f199cab1 15789_ACEOF
942f733f 15790
3e0be4ab 15791fi
942f733f 15792
f199cab1
GM
15793done
15794
5476a9a4
GM
15795fi
15796
15797done
15798
15799fi
15800
15801done
15802
15803 fi
15804 for ac_header in com_err.h
f199cab1 15805do :
5476a9a4
GM
15806 ac_fn_c_check_header_mongrel "$LINENO" "com_err.h" "ac_cv_header_com_err_h" "$ac_includes_default"
15807if test "x$ac_cv_header_com_err_h" = x""yes; then :
f199cab1 15808 cat >>confdefs.h <<_ACEOF
5476a9a4 15809#define HAVE_COM_ERR_H 1
f199cab1
GM
15810_ACEOF
15811
3e0be4ab 15812fi
f199cab1 15813
5476a9a4 15814done
3e0be4ab
GM
15815
15816fi
15817
f199cab1
GM
15818
15819
15820
15821
f199cab1
GM
15822
15823
15824
15825
15826
5476a9a4
GM
15827 for ac_func in $ac_func_list
15828do :
15829 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15830ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15831eval as_val=\$$as_ac_var
15832 if test "x$as_val" = x""yes; then :
15833 cat >>confdefs.h <<_ACEOF
15834#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15835_ACEOF
15836
15837fi
15838done
15839
f199cab1
GM
15840
15841
15842
5476a9a4
GM
15843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime caches TZ" >&5
15844$as_echo_n "checking whether localtime caches TZ... " >&6; }
15845if test "${emacs_cv_localtime_cache+set}" = set; then :
15846 $as_echo_n "(cached) " >&6
15847else
15848 if test x$ac_cv_func_tzset = xyes; then
15849if test "$cross_compiling" = yes; then :
15850 # If we have tzset, assume the worst when cross-compiling.
15851emacs_cv_localtime_cache=yes
15852else
15853 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15854/* end confdefs.h. */
15855#include <time.h>
15856char TZ_GMT0[] = "TZ=GMT0";
15857char TZ_PST8[] = "TZ=PST8";
15858main()
15859{
15860 time_t now = time ((time_t *) 0);
15861 int hour_GMT0, hour_unset;
15862 if (putenv (TZ_GMT0) != 0)
15863 exit (1);
15864 hour_GMT0 = localtime (&now)->tm_hour;
15865 unsetenv("TZ");
15866 hour_unset = localtime (&now)->tm_hour;
15867 if (putenv (TZ_PST8) != 0)
15868 exit (1);
15869 if (localtime (&now)->tm_hour == hour_GMT0)
15870 exit (1);
15871 unsetenv("TZ");
15872 if (localtime (&now)->tm_hour != hour_unset)
15873 exit (1);
15874 exit (0);
15875}
15876_ACEOF
15877if ac_fn_c_try_run "$LINENO"; then :
15878 emacs_cv_localtime_cache=no
15879else
15880 emacs_cv_localtime_cache=yes
15881fi
15882rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15883 conftest.$ac_objext conftest.beam conftest.$ac_ext
15884fi
f199cab1 15885
5476a9a4
GM
15886else
15887 # If we lack tzset, report that localtime does not cache TZ,
15888 # since we can't invalidate the cache if we don't have tzset.
15889 emacs_cv_localtime_cache=no
15890fi
15891fi
15892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_localtime_cache" >&5
15893$as_echo "$emacs_cv_localtime_cache" >&6; }
15894if test $emacs_cv_localtime_cache = yes; then
f199cab1 15895
5476a9a4 15896$as_echo "#define LOCALTIME_CACHE 1" >>confdefs.h
f199cab1 15897
5476a9a4 15898fi
f199cab1 15899
5476a9a4
GM
15900ok_so_far=yes
15901ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket"
15902if test "x$ac_cv_func_socket" = x""yes; then :
3e0be4ab 15903
5476a9a4
GM
15904else
15905 ok_so_far=no
15906fi
f199cab1 15907
5476a9a4
GM
15908if test $ok_so_far = yes; then
15909 ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
15910if test "x$ac_cv_header_netinet_in_h" = x""yes; then :
f199cab1 15911
5476a9a4
GM
15912else
15913 ok_so_far=no
15914fi
f199cab1
GM
15915
15916
5476a9a4
GM
15917fi
15918if test $ok_so_far = yes; then
15919 ac_fn_c_check_header_mongrel "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default"
15920if test "x$ac_cv_header_arpa_inet_h" = x""yes; then :
f199cab1 15921
5476a9a4
GM
15922else
15923 ok_so_far=no
15924fi
f199cab1
GM
15925
15926
5476a9a4
GM
15927fi
15928if test $ok_so_far = yes; then
f199cab1 15929
5476a9a4 15930$as_echo "#define HAVE_INET_SOCKETS 1" >>confdefs.h
f199cab1 15931
5476a9a4 15932fi
f199cab1 15933
5476a9a4 15934if test -f /usr/lpp/X11/bin/smt.exp; then
942f733f 15935
5476a9a4 15936$as_echo "#define HAVE_AIX_SMT_EXP 1" >>confdefs.h
942f733f 15937
942f733f 15938fi
3e0be4ab 15939
5476a9a4
GM
15940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system supports dynamic ptys" >&5
15941$as_echo_n "checking whether system supports dynamic ptys... " >&6; }
15942if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
15943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15944$as_echo "yes" >&6; }
15945
15946$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
3e0be4ab 15947
5476a9a4
GM
15948else
15949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15950$as_echo "no" >&6; }
15951fi
3e0be4ab 15952
bb7dce39
GM
15953case $canonical in
15954 *-solaris2.4 | *-solaris2.4.*)
15955 : ${ac_cv_func_vfork_works=no};;
15956esac
15957
5476a9a4
GM
15958ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
15959if test "x$ac_cv_type_pid_t" = x""yes; then :
3e0be4ab 15960
5476a9a4 15961else
3e0be4ab 15962
5476a9a4
GM
15963cat >>confdefs.h <<_ACEOF
15964#define pid_t int
15965_ACEOF
f199cab1 15966
5476a9a4 15967fi
f199cab1 15968
5476a9a4
GM
15969for ac_header in vfork.h
15970do :
15971 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
15972if test "x$ac_cv_header_vfork_h" = x""yes; then :
15973 cat >>confdefs.h <<_ACEOF
15974#define HAVE_VFORK_H 1
15975_ACEOF
f199cab1 15976
5476a9a4 15977fi
f199cab1 15978
5476a9a4 15979done
f199cab1 15980
5476a9a4
GM
15981for ac_func in fork vfork
15982do :
15983 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15984ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15985eval as_val=\$$as_ac_var
15986 if test "x$as_val" = x""yes; then :
15987 cat >>confdefs.h <<_ACEOF
15988#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15989_ACEOF
f199cab1 15990
5476a9a4
GM
15991fi
15992done
f199cab1 15993
5476a9a4
GM
15994if test "x$ac_cv_func_fork" = xyes; then
15995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
15996$as_echo_n "checking for working fork... " >&6; }
15997if test "${ac_cv_func_fork_works+set}" = set; then :
15998 $as_echo_n "(cached) " >&6
15999else
16000 if test "$cross_compiling" = yes; then :
16001 ac_cv_func_fork_works=cross
16002else
16003 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16004/* end confdefs.h. */
16005$ac_includes_default
16006int
16007main ()
16008{
f199cab1 16009
5476a9a4
GM
16010 /* By Ruediger Kuhlmann. */
16011 return fork () < 0;
f199cab1 16012
5476a9a4
GM
16013 ;
16014 return 0;
16015}
16016_ACEOF
16017if ac_fn_c_try_run "$LINENO"; then :
16018 ac_cv_func_fork_works=yes
16019else
16020 ac_cv_func_fork_works=no
16021fi
16022rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16023 conftest.$ac_objext conftest.beam conftest.$ac_ext
16024fi
f199cab1 16025
5476a9a4
GM
16026fi
16027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
16028$as_echo "$ac_cv_func_fork_works" >&6; }
f199cab1 16029
5476a9a4
GM
16030else
16031 ac_cv_func_fork_works=$ac_cv_func_fork
16032fi
16033if test "x$ac_cv_func_fork_works" = xcross; then
16034 case $host in
16035 *-*-amigaos* | *-*-msdosdjgpp*)
16036 # Override, as these systems have only a dummy fork() stub
16037 ac_cv_func_fork_works=no
16038 ;;
16039 *)
16040 ac_cv_func_fork_works=yes
16041 ;;
16042 esac
16043 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
16044$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
16045fi
16046ac_cv_func_vfork_works=$ac_cv_func_vfork
16047if test "x$ac_cv_func_vfork" = xyes; then
16048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
16049$as_echo_n "checking for working vfork... " >&6; }
16050if test "${ac_cv_func_vfork_works+set}" = set; then :
f199cab1
GM
16051 $as_echo_n "(cached) " >&6
16052else
16053 if test "$cross_compiling" = yes; then :
5476a9a4 16054 ac_cv_func_vfork_works=cross
f199cab1
GM
16055else
16056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16057/* end confdefs.h. */
5476a9a4
GM
16058/* Thanks to Paul Eggert for this test. */
16059$ac_includes_default
16060#include <sys/wait.h>
16061#ifdef HAVE_VFORK_H
16062# include <vfork.h>
f199cab1 16063#endif
5476a9a4
GM
16064/* On some sparc systems, changes by the child to local and incoming
16065 argument registers are propagated back to the parent. The compiler
16066 is told about this with #include <vfork.h>, but some compilers
16067 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
16068 static variable whose address is put into a register that is
16069 clobbered by the vfork. */
16070static void
16071#ifdef __cplusplus
16072sparc_address_test (int arg)
16073# else
16074sparc_address_test (arg) int arg;
f199cab1 16075#endif
5476a9a4
GM
16076{
16077 static pid_t child;
16078 if (!child) {
16079 child = vfork ();
16080 if (child < 0) {
16081 perror ("vfork");
16082 _exit(2);
16083 }
16084 if (!child) {
16085 arg = getpid();
16086 write(-1, "", 0);
16087 _exit (arg);
16088 }
16089 }
16090}
f199cab1 16091
5476a9a4
GM
16092int
16093main ()
16094{
16095 pid_t parent = getpid ();
16096 pid_t child;
f199cab1 16097
5476a9a4 16098 sparc_address_test (0);
f199cab1 16099
5476a9a4 16100 child = vfork ();
3e0be4ab 16101
5476a9a4
GM
16102 if (child == 0) {
16103 /* Here is another test for sparc vfork register problems. This
16104 test uses lots of local variables, at least as many local
16105 variables as main has allocated so far including compiler
16106 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
16107 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
16108 reuse the register of parent for one of the local variables,
16109 since it will think that parent can't possibly be used any more
16110 in this routine. Assigning to the local variable will thus
16111 munge parent in the parent process. */
16112 pid_t
16113 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
16114 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
16115 /* Convince the compiler that p..p7 are live; otherwise, it might
16116 use the same hardware register for all 8 local variables. */
16117 if (p != p1 || p != p2 || p != p3 || p != p4
16118 || p != p5 || p != p6 || p != p7)
16119 _exit(1);
3e0be4ab 16120
5476a9a4
GM
16121 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
16122 from child file descriptors. If the child closes a descriptor
16123 before it execs or exits, this munges the parent's descriptor
16124 as well. Test for this by closing stdout in the child. */
16125 _exit(close(fileno(stdout)) != 0);
16126 } else {
16127 int status;
16128 struct stat st;
3e0be4ab 16129
5476a9a4
GM
16130 while (wait(&status) != child)
16131 ;
16132 return (
16133 /* Was there some problem with vforking? */
16134 child < 0
3e0be4ab 16135
5476a9a4
GM
16136 /* Did the child fail? (This shouldn't happen.) */
16137 || status
16138
16139 /* Did the vfork/compiler bug occur? */
16140 || parent != getpid()
16141
16142 /* Did the file descriptor bug occur? */
16143 || fstat(fileno(stdout), &st) != 0
16144 );
16145 }
f199cab1 16146}
5476a9a4
GM
16147_ACEOF
16148if ac_fn_c_try_run "$LINENO"; then :
16149 ac_cv_func_vfork_works=yes
16150else
16151 ac_cv_func_vfork_works=no
16152fi
16153rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16154 conftest.$ac_objext conftest.beam conftest.$ac_ext
16155fi
16156
16157fi
16158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
16159$as_echo "$ac_cv_func_vfork_works" >&6; }
16160
16161fi;
16162if test "x$ac_cv_func_fork_works" = xcross; then
16163 ac_cv_func_vfork_works=$ac_cv_func_vfork
16164 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
16165$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
16166fi
16167
16168if test "x$ac_cv_func_vfork_works" = xyes; then
3e0be4ab 16169
5476a9a4 16170$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
3e0be4ab 16171
5476a9a4 16172else
3e0be4ab 16173
5476a9a4 16174$as_echo "#define vfork fork" >>confdefs.h
942f733f 16175
5476a9a4
GM
16176fi
16177if test "x$ac_cv_func_fork_works" = xyes; then
942f733f 16178
5476a9a4 16179$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
942f733f 16180
5476a9a4 16181fi
f199cab1 16182
f199cab1 16183
5476a9a4
GM
16184for ac_func in snprintf
16185do :
16186 ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
16187if test "x$ac_cv_func_snprintf" = x""yes; then :
16188 cat >>confdefs.h <<_ACEOF
16189#define HAVE_SNPRINTF 1
16190_ACEOF
16191
16192fi
16193done
16194
942f733f 16195
0f55a32e
GM
16196XGSELOBJ=
16197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether GLib is linked in" >&5
16198$as_echo_n "checking whether GLib is linked in... " >&6; }
16199cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16200/* end confdefs.h. */
16201#include <glib.h>
16202
16203int
16204main ()
16205{
16206g_print ("Hello world");
16207 ;
16208 return 0;
16209}
16210_ACEOF
16211if ac_fn_c_try_link "$LINENO"; then :
16212 links_glib=yes
16213else
16214 links_glib=no
16215fi
16216rm -f core conftest.err conftest.$ac_objext \
16217 conftest$ac_exeext conftest.$ac_ext
16218{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $links_glib" >&5
16219$as_echo "$links_glib" >&6; }
16220if test "${links_glib}" = "yes"; then
16221
16222$as_echo "#define HAVE_GLIB 1" >>confdefs.h
16223
7cee6e79
GM
16224 if test "$HAVE_NS" = no;then
16225 XGSELOBJ=xgselect.o
16226 fi
0f55a32e
GM
16227fi
16228
16229
5476a9a4
GM
16230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
16231$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
16232if test "${emacs_cv_langinfo_codeset+set}" = set; then :
16233 $as_echo_n "(cached) " >&6
16234else
16235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16236/* end confdefs.h. */
16237#include <langinfo.h>
3e0be4ab
GM
16238int
16239main ()
16240{
5476a9a4
GM
16241char* cs = nl_langinfo(CODESET);
16242 ;
16243 return 0;
16244}
16245_ACEOF
16246if ac_fn_c_try_link "$LINENO"; then :
16247 emacs_cv_langinfo_codeset=yes
16248else
16249 emacs_cv_langinfo_codeset=no
16250fi
16251rm -f core conftest.err conftest.$ac_objext \
16252 conftest$ac_exeext conftest.$ac_ext
f199cab1 16253
5476a9a4
GM
16254fi
16255{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_langinfo_codeset" >&5
16256$as_echo "$emacs_cv_langinfo_codeset" >&6; }
16257if test $emacs_cv_langinfo_codeset = yes; then
f199cab1 16258
5476a9a4 16259$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
f199cab1 16260
5476a9a4 16261fi
f199cab1 16262
5476a9a4
GM
16263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
16264$as_echo_n "checking for mbstate_t... " >&6; }
16265if test "${ac_cv_type_mbstate_t+set}" = set; then :
16266 $as_echo_n "(cached) " >&6
16267else
16268 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16269/* end confdefs.h. */
16270$ac_includes_default
16271# include <wchar.h>
16272int
16273main ()
16274{
16275mbstate_t x; return sizeof x;
16276 ;
16277 return 0;
3e0be4ab 16278}
942f733f 16279_ACEOF
5476a9a4
GM
16280if ac_fn_c_try_compile "$LINENO"; then :
16281 ac_cv_type_mbstate_t=yes
3e0be4ab 16282else
5476a9a4 16283 ac_cv_type_mbstate_t=no
942f733f 16284fi
5476a9a4 16285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3e0be4ab 16286fi
5476a9a4
GM
16287{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
16288$as_echo "$ac_cv_type_mbstate_t" >&6; }
16289 if test $ac_cv_type_mbstate_t = yes; then
f199cab1 16290
5476a9a4 16291$as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
f199cab1 16292
5476a9a4 16293 else
f199cab1 16294
5476a9a4 16295$as_echo "#define mbstate_t int" >>confdefs.h
f199cab1 16296
5476a9a4
GM
16297 fi
16298
16299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C restricted array declarations" >&5
16300$as_echo_n "checking for C restricted array declarations... " >&6; }
16301if test "${emacs_cv_c_restrict_arr+set}" = set; then :
16302 $as_echo_n "(cached) " >&6
16303else
16304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16305/* end confdefs.h. */
16306void fred (int x[__restrict]);
16307int
16308main ()
16309{
16310
16311 ;
16312 return 0;
16313}
16314_ACEOF
16315if ac_fn_c_try_compile "$LINENO"; then :
16316 emacs_cv_c_restrict_arr=yes
16317else
16318 emacs_cv_c_restrict_arr=no
16319fi
16320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16321fi
16322{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_c_restrict_arr" >&5
16323$as_echo "$emacs_cv_c_restrict_arr" >&6; }
16324if test "$emacs_cv_c_restrict_arr" = yes; then
f199cab1 16325
5476a9a4 16326$as_echo "#define __restrict_arr __restrict" >>confdefs.h
f199cab1 16327
5476a9a4 16328fi
f199cab1
GM
16329
16330
7c61eaab 16331if test "${opsys}" != "mingw32"; then
f199cab1 16332
8ad96b1d
GM
16333$as_echo "#define AMPERSAND_FULL_NAME 1" >>confdefs.h
16334
7c61eaab 16335fi
8ad96b1d
GM
16336
16337
5476a9a4 16338$as_echo "#define CLASH_DETECTION 1" >>confdefs.h
f199cab1
GM
16339
16340
5476a9a4 16341## Note: PTYs are broken on darwin <6. Use at your own risk.
7c61eaab 16342if test "${opsys}" != "mingw32"; then
f199cab1 16343
5476a9a4 16344$as_echo "#define HAVE_PTYS 1" >>confdefs.h
f199cab1 16345
7c61eaab 16346fi
f199cab1
GM
16347
16348
5476a9a4 16349$as_echo "#define HAVE_SOCKETS 1" >>confdefs.h
f199cab1 16350
942f733f 16351
942f733f 16352
6b10626d
GM
16353
16354
7c61eaab
GM
16355if test "${opsys}" = "mingw32"; then
16356 $as_echo "#define NULL_DEVICE \"NUL:\"" >>confdefs.h
16357
16358else
16359 $as_echo "#define NULL_DEVICE \"/dev/null\"" >>confdefs.h
16360
16361fi
8ad96b1d
GM
16362
16363
7c61eaab
GM
16364if test "${opsys}" = "mingw32"; then
16365 $as_echo "#define SEPCHAR ';'" >>confdefs.h
8ad96b1d 16366
7c61eaab
GM
16367else
16368 $as_echo "#define SEPCHAR ':'" >>confdefs.h
8ad96b1d 16369
7c61eaab 16370fi
8ad96b1d
GM
16371
16372
16373$as_echo "#define subprocesses 1" >>confdefs.h
16374
16375
16376
16377$as_echo "#define USER_FULL_NAME pw->pw_gecos" >>confdefs.h
16378
16379
16380
942f733f 16381
9ff736dc
GM
16382$as_echo "#define DIRECTORY_SEP '/'" >>confdefs.h
16383
16384
16385
7c61eaab
GM
16386if test "${opsys}" = "mingw32"; then
16387 $as_echo "#define DEVICE_SEP ':'" >>confdefs.h
16388
16389
16390$as_echo "#define IS_DEVICE_SEP(_c_) ((_c_) == DEVICE_SEP)" >>confdefs.h
f199cab1 16391
6b10626d 16392
7c61eaab
GM
16393
16394$as_echo "#define IS_DIRECTORY_SEP(_c_) ((_c_) == '/' || (_c_) == '\\\\')" >>confdefs.h
16395
16396
16397
16398$as_echo "#define IS_ANY_SEP(_c_) (IS_DIRECTORY_SEP (_c_) || IS_DEVICE_SEP(_c_))" >>confdefs.h
16399
16400else
16401
6b10626d
GM
16402$as_echo "#define IS_DEVICE_SEP(_c_) 0" >>confdefs.h
16403
16404
16405
16406$as_echo "#define IS_DIRECTORY_SEP(_c_) ((_c_) == DIRECTORY_SEP)" >>confdefs.h
16407
16408
16409
16410$as_echo "#define IS_ANY_SEP(_c_) (IS_DIRECTORY_SEP (_c_))" >>confdefs.h
16411
7c61eaab 16412fi
6b10626d
GM
16413
16414
16415
5476a9a4
GM
16416case $opsys in
16417 aix4-2)
16418 if test x$ac_cv_lib_Xmu_XmuConvertStandardSelection != xyes; then
16419 $as_echo "#define NO_EDITRES 1" >>confdefs.h
f199cab1 16420
5476a9a4
GM
16421 fi
16422 ;;
f199cab1 16423
5476a9a4
GM
16424 hpux*)
16425 $as_echo "#define NO_EDITRES 1" >>confdefs.h
f199cab1 16426
5476a9a4
GM
16427 ;;
16428esac
f199cab1
GM
16429
16430
5476a9a4 16431case $opsys in
5476a9a4 16432 irix6-5 | sol2* | unixware )
f199cab1 16433
5476a9a4 16434$as_echo "#define NSIG_MINIMUM 32" >>confdefs.h
f199cab1 16435
5476a9a4
GM
16436 ;;
16437esac
f199cab1 16438
4fa92495 16439emacs_broken_SIGIO=no
f199cab1 16440
5476a9a4
GM
16441case $opsys in
16442 hpux* | irix6-5 | openbsd | sol2* | unixware )
4fa92495 16443 emacs_broken_SIGIO=yes
5476a9a4 16444 ;;
f199cab1 16445
5476a9a4 16446 aix4-2)
f199cab1 16447
5476a9a4 16448$as_echo "#define BROKEN_GET_CURRENT_DIR_NAME 1" >>confdefs.h
067d23c9 16449
5476a9a4 16450 ;;
067d23c9 16451
5476a9a4 16452 freebsd)
f199cab1 16453
5476a9a4 16454$as_echo "#define BROKEN_PTY_READ_AFTER_EAGAIN 1" >>confdefs.h
f199cab1 16455
5476a9a4 16456 ;;
5476a9a4 16457esac
f199cab1 16458
5476a9a4
GM
16459case $opsys in
16460 gnu-* | sol2-10 )
f199cab1 16461
5476a9a4 16462$as_echo "#define HAVE_PROCFS 1" >>confdefs.h
f199cab1 16463
5476a9a4
GM
16464 ;;
16465esac
f199cab1 16466
5476a9a4 16467case $opsys in
87e1a811 16468 darwin | dragonfly | freebsd | netbsd | openbsd )
f199cab1 16469
5476a9a4 16470$as_echo "#define DONT_REOPEN_PTY 1" >>confdefs.h
f199cab1 16471
5476a9a4
GM
16472 ;;
16473esac
f199cab1 16474
5476a9a4
GM
16475case $opsys in
16476 netbsd | openbsd) sound_device="/dev/audio" ;;
16477 *) sound_device="/dev/dsp" ;;
16478esac
f199cab1 16479
f199cab1 16480
5476a9a4
GM
16481cat >>confdefs.h <<_ACEOF
16482#define DEFAULT_SOUND_DEVICE "$sound_device"
16483_ACEOF
f199cab1
GM
16484
16485
16486
5476a9a4
GM
16487case $opsys in
16488 darwin | gnu-linux | gnu-kfreebsd )
f199cab1 16489
5476a9a4 16490$as_echo "#define INTERRUPT_INPUT 1" >>confdefs.h
f199cab1 16491
5476a9a4
GM
16492 ;;
16493esac
f199cab1 16494
f199cab1 16495
5476a9a4
GM
16496case $opsys in
16497 cygwin|gnu|gnu-linux|gnu-kfreebsd|irix6-5|freebsd|netbsd|openbsd)
f199cab1 16498
5476a9a4 16499$as_echo "#define NARROWPROTO 1" >>confdefs.h
067d23c9 16500
5476a9a4
GM
16501 ;;
16502esac
f199cab1
GM
16503
16504
067d23c9 16505
1f5d53eb
PE
16506
16507
f199cab1 16508
f199cab1 16509
7d2a1c5e 16510
5476a9a4
GM
16511case $opsys in
16512 aix4-2 )
a09508f2 16513 $as_echo "#define PTY_ITERATION int c; for (c = 0; !c ; c++)" >>confdefs.h
f199cab1 16514
a09508f2 16515 $as_echo "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptc\");" >>confdefs.h
f199cab1 16516
a09508f2 16517 $as_echo "#define PTY_TTY_NAME_SPRINTF strcpy (pty_name, ttyname (fd));" >>confdefs.h
7d2a1c5e 16518
5476a9a4 16519 ;;
7d2a1c5e 16520
5476a9a4 16521 cygwin )
a09508f2 16522 $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++)" >>confdefs.h
7d2a1c5e 16523
843f2634 16524 $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 16525
a09508f2 16526 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
7d2a1c5e 16527
a09508f2 16528 $as_echo "#define PTY_TTY_NAME_SPRINTF /**/" >>confdefs.h
f199cab1 16529
5476a9a4 16530 ;;
f199cab1 16531
1146da8d 16532 darwin )
a09508f2 16533 $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++)" >>confdefs.h
7d2a1c5e 16534
5476a9a4 16535 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
7d2a1c5e 16536
a09508f2 16537 $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 16538
a09508f2 16539 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
f199cab1 16540
a09508f2 16541 $as_echo "#define PTY_TTY_NAME_SPRINTF /**/" >>confdefs.h
f199cab1 16542
5476a9a4 16543 ;;
f199cab1 16544
1146da8d 16545 gnu | openbsd )
5476a9a4 16546 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
f199cab1 16547
5476a9a4 16548 ;;
f199cab1 16549
87e1a811 16550 gnu-linux | gnu-kfreebsd | dragonfly | freebsd | netbsd )
5476a9a4 16551 if test "x$ac_cv_func_grantpt" = xyes; then
f199cab1 16552
5476a9a4 16553$as_echo "#define UNIX98_PTYS 1" >>confdefs.h
f199cab1 16554
a09508f2 16555 $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++)" >>confdefs.h
f199cab1 16556
843f2634 16557 $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 16558
1146da8d
GM
16559 if test "x$ac_cv_func_posix_openpt" = xyes; then
16560 $as_echo "#define PTY_OPEN fd = posix_openpt (O_RDWR | O_NOCTTY)" >>confdefs.h
16561
16562 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
16563
16564 elif test "x$ac_cv_func_getpt" = xyes; then
5476a9a4 16565 $as_echo "#define PTY_OPEN fd = getpt ()" >>confdefs.h
f199cab1 16566
a09508f2 16567 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
f199cab1 16568
5476a9a4 16569 else
a09508f2 16570 $as_echo "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptmx\");" >>confdefs.h
f199cab1 16571
5476a9a4
GM
16572 fi
16573 else
16574 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
f199cab1 16575
5476a9a4
GM
16576 fi
16577 ;;
f199cab1 16578
5476a9a4
GM
16579 hpux*)
16580 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
f199cab1 16581
a09508f2 16582 $as_echo "#define PTY_NAME_SPRINTF sprintf (pty_name, \"/dev/ptym/pty%c%x\", c, i);" >>confdefs.h
f199cab1 16583
a09508f2 16584 $as_echo "#define PTY_TTY_NAME_SPRINTF sprintf (pty_name, \"/dev/pty/tty%c%x\", c, i);" >>confdefs.h
f199cab1 16585
5476a9a4 16586 ;;
f199cab1 16587
5476a9a4
GM
16588 irix6-5 )
16589 $as_echo "#define PTY_ITERATION /**/" >>confdefs.h
f199cab1 16590
5476a9a4 16591 $as_echo "#define FIRST_PTY_LETTER 'q'" >>confdefs.h
f199cab1 16592
e4184a20 16593 $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 16594
a09508f2 16595 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
f199cab1 16596
a09508f2 16597 $as_echo "#define PTY_TTY_NAME_SPRINTF /**/" >>confdefs.h
f199cab1 16598
5476a9a4 16599 ;;
f199cab1 16600
5476a9a4 16601 sol2* )
e4184a20 16602 $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 16603
5476a9a4 16604 ;;
f199cab1 16605
5476a9a4 16606 unixware )
e4184a20 16607 $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
16608
16609 ;;
16610esac
16611
16612
16613case $opsys in
16614 sol2* | unixware )
16615 $as_echo "#define FIRST_PTY_LETTER 'z'" >>confdefs.h
16616
a09508f2 16617 $as_echo "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptmx\");" >>confdefs.h
5476a9a4
GM
16618
16619
16620$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
16621
16622 ;;
16623esac
16624
16625
16626
16627
16628case $opsys in
87e1a811 16629 aix4-2 | cygwin | gnu | irix6-5 | dragonfly | freebsd | netbsd | openbsd | darwin )
5476a9a4
GM
16630 $as_echo "#define SIGNALS_VIA_CHARACTERS 1" >>confdefs.h
16631
16632 ;;
16633
16634 gnu-linux | gnu-kfreebsd )
16635
16636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signals via characters" >&5
16637$as_echo_n "checking for signals via characters... " >&6; }
16638 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1f5d53eb 16639/* end confdefs.h. */
5476a9a4
GM
16640
16641#include <linux/version.h>
16642#if LINUX_VERSION_CODE < 0x20400
16643# error "Linux version too old"
16644#endif
16645
3e0be4ab
GM
16646int
16647main ()
16648{
f199cab1 16649
3e0be4ab
GM
16650 ;
16651 return 0;
16652}
067d23c9 16653_ACEOF
5476a9a4
GM
16654if ac_fn_c_try_cpp "$LINENO"; then :
16655 emacs_signals_via_chars=yes
1f5d53eb 16656else
5476a9a4 16657 emacs_signals_via_chars=no
067d23c9 16658fi
5476a9a4 16659rm -f conftest.err conftest.$ac_ext
067d23c9 16660
5476a9a4
GM
16661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_signals_via_chars" >&5
16662$as_echo "$emacs_signals_via_chars" >&6; }
16663 test $emacs_signals_via_chars = yes && $as_echo "#define SIGNALS_VIA_CHARACTERS 1" >>confdefs.h
16664
16665 ;;
16666esac
16667
16668
16669
16670
5476a9a4 16671case $opsys in
0f63df79 16672 aix*)
ce9ae7ca 16673 $as_echo "#define DATA_SEG_BITS 0x20000000" >>confdefs.h
0f63df79
GM
16674
16675 ;;
5476a9a4 16676 hpux*)
ce9ae7ca 16677 $as_echo "#define DATA_SEG_BITS 0x40000000" >>confdefs.h
067d23c9 16678
5476a9a4
GM
16679 ;;
16680 irix6-5)
5476a9a4 16681 $as_echo "#define DATA_SEG_BITS 0x10000000" >>confdefs.h
067d23c9 16682
5476a9a4
GM
16683 ;;
16684esac
067d23c9 16685
1f5d53eb 16686
1f5d53eb 16687
067d23c9 16688
5476a9a4
GM
16689case $opsys in
16690 darwin) $as_echo "#define TAB3 OXTABS" >>confdefs.h
16691 ;;
f199cab1 16692
87e1a811 16693 gnu | dragonfly | freebsd | netbsd | openbsd )
f199cab1 16694
5476a9a4 16695$as_echo "#define TABDLY OXTABS" >>confdefs.h
f199cab1 16696
5476a9a4 16697 $as_echo "#define TAB3 OXTABS" >>confdefs.h
f199cab1 16698
5476a9a4 16699 ;;
f199cab1 16700
5476a9a4 16701 gnu-linux | gnu-kfreebsd )
5476a9a4
GM
16702 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16703/* end confdefs.h. */
3e0be4ab 16704
5476a9a4
GM
16705#ifndef __ia64__
16706# error "not ia64"
16707#endif
067d23c9 16708
5476a9a4
GM
16709int
16710main ()
16711{
3e0be4ab 16712
5476a9a4
GM
16713 ;
16714 return 0;
16715}
16716_ACEOF
16717if ac_fn_c_try_cpp "$LINENO"; then :
f199cab1 16718
5476a9a4 16719$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 16720
3e0be4ab 16721fi
5476a9a4
GM
16722rm -f conftest.err conftest.$ac_ext
16723 ;;
067d23c9 16724
5476a9a4 16725 hpux*)
3e0be4ab 16726
5476a9a4 16727$as_echo "#define RUN_TIME_REMAP 1" >>confdefs.h
3e0be4ab 16728
5476a9a4 16729 ;;
5476a9a4 16730esac
3e0be4ab
GM
16731
16732
f199cab1 16733
e700232f
GM
16734
16735
5476a9a4 16736case $opsys in
5476a9a4
GM
16737 gnu-linux | gnu-kfreebsd )
16738 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1fd182f0 16739/* end confdefs.h. */
f199cab1 16740
5476a9a4
GM
16741#if defined __i386__ || defined __sparc__ || defined __mc68000__ \
16742 || defined __alpha__ || defined __mips__ || defined __s390__ \
16743 || defined __arm__ || defined __powerpc__ || defined __amd64__ \
16744 || defined __ia64__ || defined __sh__
16745/* ok */
16746#else
16747# error "setjmp not known to work on this arch"
16748#endif
16749
f199cab1
GM
16750int
16751main ()
1fd182f0 16752{
5476a9a4 16753
f199cab1
GM
16754 ;
16755 return 0;
1fd182f0
PE
16756}
16757_ACEOF
5476a9a4
GM
16758if ac_fn_c_try_cpp "$LINENO"; then :
16759 $as_echo "#define GC_SETJMP_WORKS 1" >>confdefs.h
f199cab1 16760
1f5d53eb 16761fi
5476a9a4
GM
16762rm -f conftest.err conftest.$ac_ext
16763 ;;
16764esac
1fd182f0 16765
f199cab1 16766
5476a9a4
GM
16767if test x$GCC = xyes; then
16768 $as_echo "#define GC_SETJMP_WORKS 1" >>confdefs.h
16769
1fd182f0 16770else
5476a9a4 16771 case $opsys in
87e1a811 16772 dragonfly | freebsd | netbsd | openbsd | irix6-5 | sol2* )
5476a9a4 16773 $as_echo "#define GC_SETJMP_WORKS 1" >>confdefs.h
1fd182f0 16774
5476a9a4
GM
16775 ;;
16776 esac
16777fi
6ec9a5a7
GM
16778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _setjmp" >&5
16779$as_echo_n "checking for _setjmp... " >&6; }
16780if test "${emacs_cv_func__setjmp+set}" = set; then :
16781 $as_echo_n "(cached) " >&6
16782else
16783 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16784/* end confdefs.h. */
16785#include <setjmp.h>
7c61eaab
GM
16786 #ifdef __MINGW32__
16787 # define _longjmp longjmp
16788 #endif
1fd182f0 16789
6ec9a5a7
GM
16790int
16791main ()
16792{
16793jmp_buf j;
16794 if (! _setjmp (j))
16795 _longjmp (j, 1);
16796 ;
16797 return 0;
16798}
16799_ACEOF
16800if ac_fn_c_try_link "$LINENO"; then :
16801 emacs_cv_func__setjmp=yes
16802else
16803 emacs_cv_func__setjmp=no
16804fi
16805rm -f core conftest.err conftest.$ac_objext \
16806 conftest$ac_exeext conftest.$ac_ext
16807fi
16808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_func__setjmp" >&5
16809$as_echo "$emacs_cv_func__setjmp" >&6; }
e2d8f316 16810if test $emacs_cv_func__setjmp = yes; then
906debc3 16811
e2d8f316 16812$as_echo "#define HAVE__SETJMP 1" >>confdefs.h
906debc3 16813
e2d8f316
GM
16814else
16815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
16816$as_echo_n "checking for sigsetjmp... " >&6; }
16817if test "${emacs_cv_func_sigsetjmp+set}" = set; then :
16818 $as_echo_n "(cached) " >&6
16819else
16820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16821/* end confdefs.h. */
16822#include <setjmp.h>
16823
16824int
16825main ()
16826{
16827sigjmp_buf j;
16828 if (! sigsetjmp (j, 1))
16829 siglongjmp (j, 1);
16830 ;
16831 return 0;
16832}
16833_ACEOF
16834if ac_fn_c_try_link "$LINENO"; then :
16835 emacs_cv_func_sigsetjmp=yes
16836else
16837 emacs_cv_func_sigsetjmp=no
16838fi
16839rm -f core conftest.err conftest.$ac_objext \
16840 conftest$ac_exeext conftest.$ac_ext
16841fi
16842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_func_sigsetjmp" >&5
16843$as_echo "$emacs_cv_func_sigsetjmp" >&6; }
16844 if test $emacs_cv_func_sigsetjmp = yes; then
906debc3 16845
e2d8f316 16846$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
906debc3 16847
e2d8f316 16848 fi
6ec9a5a7
GM
16849fi
16850
16851case $opsys in
16852 sol2* | unixware )
906debc3
GM
16853
16854$as_echo "#define TIOCSIGSEND TIOCSIGNAL" >>confdefs.h
16855
16856 ;;
16857esac
16858
906debc3 16859
5476a9a4
GM
16860case $opsys in
16861 hpux* | sol2* )
1f5d53eb 16862
5476a9a4 16863$as_echo "#define XOS_NEEDS_TIME_H 1" >>confdefs.h
1f5d53eb 16864
5476a9a4
GM
16865 ;;
16866esac
1f5d53eb 16867
1f5d53eb 16868
4fda9c95 16869
3e0be4ab 16870
4fda9c95 16871
4fda9c95 16872
f199cab1 16873
906debc3 16874
5476a9a4
GM
16875case $opsys in
16876 aix4-2)
16877 $as_echo "#define USG /**/" >>confdefs.h
16878
16879 $as_echo "#define USG5 /**/" >>confdefs.h
16880
16881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16882/* end confdefs.h. */
16883
16884#ifndef _AIX
16885# error "_AIX not defined"
16886#endif
f199cab1 16887
4fda9c95
GM
16888int
16889main ()
16890{
3e0be4ab 16891
4fda9c95
GM
16892 ;
16893 return 0;
16894}
16895_ACEOF
5476a9a4 16896if ac_fn_c_try_cpp "$LINENO"; then :
4fda9c95 16897
3e0be4ab 16898else
4fda9c95 16899
5476a9a4 16900$as_echo "#define _AIX /**/" >>confdefs.h
3e0be4ab 16901
5476a9a4
GM
16902fi
16903rm -f conftest.err conftest.$ac_ext
16904 ;;
4fda9c95 16905
5476a9a4 16906 cygwin)
3e0be4ab 16907
5476a9a4 16908$as_echo "#define CYGWIN 1" >>confdefs.h
f199cab1 16909
5476a9a4 16910 ;;
f199cab1 16911
5476a9a4 16912 darwin)
f199cab1 16913
5476a9a4 16914$as_echo "#define DARWIN_OS /**/" >>confdefs.h
f199cab1 16915
5476a9a4 16916 ;;
4fda9c95 16917
5476a9a4
GM
16918 gnu-linux | gnu-kfreebsd )
16919 $as_echo "#define USG /**/" >>confdefs.h
4fda9c95 16920
f199cab1 16921
5476a9a4 16922$as_echo "#define GNU_LINUX /**/" >>confdefs.h
4fda9c95 16923
5476a9a4 16924 ;;
4fda9c95 16925
5476a9a4
GM
16926 hpux*)
16927 $as_echo "#define USG /**/" >>confdefs.h
4fda9c95 16928
5476a9a4 16929 $as_echo "#define USG5 /**/" >>confdefs.h
697210c4 16930
4717915f 16931
5476a9a4 16932$as_echo "#define HPUX /**/" >>confdefs.h
697210c4 16933
5476a9a4 16934 ;;
697210c4 16935
5476a9a4
GM
16936 irix6-5)
16937 $as_echo "#define USG /**/" >>confdefs.h
f199cab1 16938
5476a9a4 16939 $as_echo "#define USG5 /**/" >>confdefs.h
f199cab1 16940
906debc3
GM
16941 $as_echo "#define USG5_4 /**/" >>confdefs.h
16942
f199cab1 16943
5476a9a4 16944$as_echo "#define IRIX6_5 /**/" >>confdefs.h
f199cab1 16945
5476a9a4 16946 ;;
f199cab1 16947
7c61eaab
GM
16948 mingw32)
16949 $as_echo "#define DOS_NT /**/" >>confdefs.h
16950
16951
16952$as_echo "#define WINDOWSNT 1" >>confdefs.h
16953
16954 if test "x$ac_enable_checking" != "x" ; then
16955
16956$as_echo "#define EMACSDEBUG 1" >>confdefs.h
16957
16958 fi
16959 ;;
16960
5476a9a4
GM
16961 sol2*)
16962 $as_echo "#define USG /**/" >>confdefs.h
4fda9c95 16963
5476a9a4 16964 $as_echo "#define USG5 /**/" >>confdefs.h
4fda9c95 16965
906debc3
GM
16966 $as_echo "#define USG5_4 /**/" >>confdefs.h
16967
4fda9c95 16968
5476a9a4 16969$as_echo "#define SOLARIS2 /**/" >>confdefs.h
f199cab1 16970
5476a9a4 16971 ;;
f199cab1 16972
5476a9a4
GM
16973 unixware)
16974 $as_echo "#define USG /**/" >>confdefs.h
f199cab1 16975
5476a9a4 16976 $as_echo "#define USG5 /**/" >>confdefs.h
f199cab1 16977
906debc3
GM
16978 $as_echo "#define USG5_4 /**/" >>confdefs.h
16979
5476a9a4
GM
16980 ;;
16981esac
f199cab1 16982
4fa92495
GM
16983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable FIONREAD" >&5
16984$as_echo_n "checking for usable FIONREAD... " >&6; }
16985if test "${emacs_cv_usable_FIONREAD+set}" = set; then :
16986 $as_echo_n "(cached) " >&6
16987else
16988 case $opsys in
16989 aix4-2)
16990 emacs_cv_usable_FIONREAD=no
16991 ;;
16992
7c61eaab
GM
16993 mingw32)
16994 emacs_cv_usable_FIONREAD=yes
16995 ;;
16996
4fa92495
GM
16997 *)
16998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16999/* end confdefs.h. */
17000#include <sys/types.h>
17001 #include <sys/ioctl.h>
17002 #ifdef USG5_4
17003 # include <sys/filio.h>
17004 #endif
17005
17006int
17007main ()
17008{
17009int foo = ioctl (0, FIONREAD, &foo);
17010 ;
17011 return 0;
17012}
17013_ACEOF
17014if ac_fn_c_try_compile "$LINENO"; then :
17015 emacs_cv_usable_FIONREAD=yes
17016else
17017 emacs_cv_usable_FIONREAD=no
17018fi
17019rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17020 ;;
17021 esac
17022fi
17023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_usable_FIONREAD" >&5
17024$as_echo "$emacs_cv_usable_FIONREAD" >&6; }
17025if test $emacs_cv_usable_FIONREAD = yes; then
17026
17027$as_echo "#define USABLE_FIONREAD 1" >>confdefs.h
17028
17029
17030 if test $emacs_broken_SIGIO = no; then
17031 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable SIGIO" >&5
17032$as_echo_n "checking for usable SIGIO... " >&6; }
17033if test "${emacs_cv_usable_SIGIO+set}" = set; then :
17034 $as_echo_n "(cached) " >&6
17035else
17036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17037/* end confdefs.h. */
17038#include <fcntl.h>
17039 #include <signal.h>
17040
17041int
17042main ()
17043{
17044int foo = SIGIO | F_SETFL | FASYNC;
17045 ;
17046 return 0;
17047}
17048_ACEOF
17049if ac_fn_c_try_compile "$LINENO"; then :
17050 emacs_cv_usable_SIGIO=yes
17051else
17052 emacs_cv_usable_SIGIO=no
17053fi
17054rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17055fi
17056{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_usable_SIGIO" >&5
17057$as_echo "$emacs_cv_usable_SIGIO" >&6; }
17058 if test $emacs_cv_usable_SIGIO = yes; then
17059
17060$as_echo "#define USABLE_SIGIO 1" >>confdefs.h
17061
17062 fi
17063 fi
17064fi
17065
4fda9c95 17066
5476a9a4
GM
17067case $opsys in
17068 cygwin)
4fda9c95 17069
5476a9a4 17070$as_echo "#define G_SLICE_ALWAYS_MALLOC 1" >>confdefs.h
4fda9c95 17071
5476a9a4 17072 ;;
4fda9c95 17073
5476a9a4 17074 hpux11)
f199cab1 17075
5476a9a4 17076$as_echo "#define USG_SUBTTY_WORKS 1" >>confdefs.h
f199cab1 17077
5476a9a4 17078 ;;
f199cab1 17079
5476a9a4 17080 irix6-5)
f199cab1 17081
5476a9a4 17082$as_echo "#define PREFER_VSUSP 1" >>confdefs.h
f199cab1 17083
5476a9a4 17084 ;;
f199cab1 17085
5476a9a4 17086 sol2-10)
f199cab1 17087
5476a9a4 17088$as_echo "#define _STRUCTURED_PROC 1" >>confdefs.h
f199cab1 17089
5476a9a4
GM
17090 ;;
17091esac
f199cab1 17092
5476a9a4
GM
17093# Set up the CFLAGS for real compilation, so we can substitute it.
17094CFLAGS="$REAL_CFLAGS"
17095CPPFLAGS="$REAL_CPPFLAGS"
f199cab1 17096
5476a9a4
GM
17097## Hack to detect a buggy GCC version.
17098if test "x$GCC" = xyes \
17099 && test x"`$CC --version 2> /dev/null | grep 'gcc.* 4.5.0'`" != x \
17100 && test x"`echo $CFLAGS | grep '\-O[23]'`" != x \
17101 && test x"`echo $CFLAGS | grep '\-fno-optimize-sibling-calls'`" = x; then
17102 as_fn_error "GCC 4.5.0 has problems compiling Emacs; see etc/PROBLEMS'." "$LINENO" 5
17103fi
f199cab1 17104
5476a9a4 17105version=$PACKAGE_VERSION
f199cab1 17106
0778f6f0 17107copyright="Copyright (C) 2013 Free Software Foundation, Inc."
bb7dce39
GM
17108
17109cat >>confdefs.h <<_ACEOF
17110#define COPYRIGHT "$copyright"
17111_ACEOF
17112
17113
17114
5476a9a4
GM
17115### Specify what sort of things we'll be editing into Makefile and config.h.
17116### Use configuration here uncanonicalized to avoid exceeding size limits.
4fda9c95 17117
f199cab1 17118
5476a9a4 17119## Unused?
4fda9c95
GM
17120
17121
17122
17123
4717915f 17124
4717915f 17125
4717915f 17126
4717915f 17127
4717915f 17128
4717915f 17129
4717915f 17130
4717915f 17131
4717915f 17132
4717915f 17133
4717915f 17134
4717915f
GM
17135
17136
4717915f
GM
17137
17138
4717915f 17139
4717915f 17140
4717915f 17141
5476a9a4
GM
17142## FIXME? Nothing uses @LD_SWITCH_X_SITE@.
17143## src/Makefile.in did add LD_SWITCH_X_SITE (as a cpp define) to the
17144## end of LIBX_BASE, but nothing ever set it.
4717915f 17145
4717915f 17146
4fda9c95 17147
4fda9c95 17148
5476a9a4
GM
17149## Used in lwlib/Makefile.in.
17150
4fda9c95 17151
4fda9c95 17152
4fda9c95
GM
17153
17154
17155
17156
4fda9c95 17157
42dcba54
GM
17158if test -n "${term_header}"; then
17159
17160cat >>confdefs.h <<_ACEOF
17161#define TERM_HEADER "${term_header}"
17162_ACEOF
17163
17164fi
17165
4fda9c95 17166
5476a9a4
GM
17167cat >>confdefs.h <<_ACEOF
17168#define EMACS_CONFIGURATION "${canonical}"
17169_ACEOF
4fda9c95 17170
1e8a045a 17171emacs_config_options=`echo "$emacs_config_options " | sed -e 's/--no-create //' -e 's/--no-recursion //' -e 's/ *$//' -e "s/\"/'/g"`
4fda9c95 17172
5476a9a4 17173cat >>confdefs.h <<_ACEOF
e25a10b7 17174#define EMACS_CONFIG_OPTIONS "${emacs_config_options}"
5476a9a4
GM
17175_ACEOF
17176
5476a9a4 17177
4fda9c95 17178
7c61eaab
GM
17179case $opsys in
17180 mingw32)
17181 $as_echo "#define config_opsysfile <ms-w32.h>" >>confdefs.h
17182
17183 ;;
17184esac
17185
5476a9a4
GM
17186XMENU_OBJ=
17187XOBJ=
17188FONT_OBJ=
17189if test "${HAVE_X_WINDOWS}" = "yes" ; then
17190
17191$as_echo "#define HAVE_X_WINDOWS 1" >>confdefs.h
4fda9c95 17192
5476a9a4 17193 XMENU_OBJ=xmenu.o
0f55a32e 17194 XOBJ="xterm.o xfns.o xselect.o xrdb.o xsmfns.o xsettings.o"
5476a9a4
GM
17195 FONT_OBJ=xfont.o
17196 if test "$HAVE_XFT" = "yes"; then
17197 FONT_OBJ="$FONT_OBJ ftfont.o xftfont.o ftxfont.o"
17198 elif test "$HAVE_FREETYPE" = "yes"; then
17199 FONT_OBJ="$FONT_OBJ ftfont.o ftxfont.o"
17200 fi
4fda9c95 17201
f199cab1 17202fi
4fda9c95 17203
4fda9c95 17204
4fda9c95 17205
4fda9c95 17206
5476a9a4
GM
17207WIDGET_OBJ=
17208MOTIF_LIBW=
17209if test "${USE_X_TOOLKIT}" != "none" ; then
17210 WIDGET_OBJ=widget.o
17211
17212$as_echo "#define USE_X_TOOLKIT 1" >>confdefs.h
17213
17214 if test "${USE_X_TOOLKIT}" = "LUCID"; then
17215
17216$as_echo "#define USE_LUCID 1" >>confdefs.h
e1939eb1 17217
5476a9a4 17218 elif test "${USE_X_TOOLKIT}" = "MOTIF"; then
4fda9c95 17219
5476a9a4 17220$as_echo "#define USE_MOTIF 1" >>confdefs.h
3e0be4ab 17221
5476a9a4
GM
17222 MOTIF_LIBW=-lXm
17223 case "$opsys" in
17224 gnu-linux)
17225 ## Paul Abrahams <abrahams at equinox.shaysnet.com> says this is needed.
17226 MOTIF_LIBW="$MOTIF_LIBW -lXpm"
17227 ;;
3e0be4ab 17228
5476a9a4
GM
17229 unixware)
17230 ## Richard Anthony Ryan <ryanr at ellingtn.ftc.nrcs.usda.gov>
17231 ## says -lXimp is needed in UNIX_SV ... 4.2 1.1.2.
17232 MOTIF_LIBW="MOTIF_LIBW -lXimp"
17233 ;;
3e0be4ab 17234
5476a9a4
GM
17235 aix4-2)
17236 ## olson@mcs.anl.gov says -li18n is needed by -lXm.
17237 MOTIF_LIBW="$MOTIF_LIBW -li18n"
17238 ;;
17239 esac
17240 MOTIF_LIBW="$MOTIF_LIBW $LIBXP"
17241 fi
17242fi
4fda9c95 17243
3e0be4ab 17244
5476a9a4
GM
17245TOOLKIT_LIBW=
17246case "$USE_X_TOOLKIT" in
17247 MOTIF) TOOLKIT_LIBW="$MOTIF_LIBW" ;;
17248 LUCID) TOOLKIT_LIBW="$LUCID_LIBW" ;;
17249 none) test "x$HAVE_GTK" = "xyes" && TOOLKIT_LIBW="$GTK_LIBS" ;;
17250esac
4fda9c95
GM
17251
17252
7c61eaab
GM
17253if test "${opsys}" != "mingw32"; then
17254 if test "$USE_X_TOOLKIT" = "none"; then
17255 LIBXT_OTHER="\$(LIBXSM)"
17256 OLDXMENU_TARGET="really-oldXMenu"
17257 else
17258 LIBXT_OTHER="\$(LIBXMU) -lXt \$(LIBXTR6) -lXext"
17259 OLDXMENU_TARGET="really-lwlib"
17260 fi
5476a9a4 17261fi
4fda9c95
GM
17262
17263
5476a9a4
GM
17264## The X Menu stuff is present in the X10 distribution, but missing
17265## from X11. If we have X10, just use the installed library;
17266## otherwise, use our own copy.
17267if test "${HAVE_X11}" = "yes" ; then
4fda9c95 17268
5476a9a4 17269$as_echo "#define HAVE_X11 1" >>confdefs.h
4fda9c95 17270
4fda9c95 17271
5476a9a4
GM
17272 if test "$USE_X_TOOLKIT" = "none"; then
17273 OLDXMENU="\${oldXMenudir}/libXMenu11.a"
17274 else
17275 OLDXMENU="\${lwlibdir}/liblw.a"
17276 fi
17277 LIBXMENU="\$(OLDXMENU)"
17278 LIBX_OTHER="\$(LIBXT) \$(LIBX_EXTRA)"
17279 OLDXMENU_DEPS="\${OLDXMENU} ../src/\${OLDXMENU}"
f199cab1 17280else
5476a9a4
GM
17281 ## For a syntactically valid Makefile; not actually used for anything.
17282 ## See comments in src/Makefile.in.
17283 OLDXMENU=nothing
17284 ## FIXME This case (!HAVE_X11 && HAVE_X_WINDOWS) is no longer possible(?).
17285 if test "${HAVE_X_WINDOWS}" = "yes"; then
17286 LIBXMENU="-lXMenu"
17287 else
17288 LIBXMENU=
17289 fi
17290 LIBX_OTHER=
17291 OLDXMENU_DEPS=
17292fi
4fda9c95 17293
5476a9a4
GM
17294if test "$HAVE_GTK" = "yes" || test "$HAVE_MENUS" != "yes"; then
17295 OLDXMENU_TARGET=
17296 OLDXMENU=nothing
17297 LIBXMENU=
17298 OLDXMENU_DEPS=
17299fi
4fda9c95 17300
4fda9c95
GM
17301
17302
3e0be4ab 17303
4fda9c95 17304
3e0be4ab 17305
3e0be4ab 17306
5476a9a4 17307if test "${HAVE_MENUS}" = "yes" ; then
3e0be4ab 17308
5476a9a4 17309$as_echo "#define HAVE_MENUS 1" >>confdefs.h
4fda9c95 17310
5476a9a4 17311fi
4fda9c95 17312
5476a9a4 17313if test "${GNU_MALLOC}" = "yes" ; then
4fda9c95 17314
5476a9a4 17315$as_echo "#define GNU_MALLOC 1" >>confdefs.h
4fda9c95 17316
5476a9a4 17317fi
3e0be4ab 17318
5476a9a4
GM
17319RALLOC_OBJ=
17320if test "${REL_ALLOC}" = "yes" ; then
17321
17322$as_echo "#define REL_ALLOC 1" >>confdefs.h
4fda9c95
GM
17323
17324
5476a9a4
GM
17325 test "$system_malloc" != "yes" && RALLOC_OBJ=ralloc.o
17326fi
4fda9c95 17327
4fda9c95 17328
5476a9a4 17329if test "$opsys" = "cygwin"; then
5c0255d9 17330 CYGWIN_OBJ="sheap.o cygw32.o"
5476a9a4
GM
17331 ## Cygwin differs because of its unexec().
17332 PRE_ALLOC_OBJ=
17333 POST_ALLOC_OBJ=lastfile.o
7c61eaab
GM
17334elif test "$opsys" = "mingw32"; then
17335 CYGWIN_OBJ=
17336 PRE_ALLOC_OBJ=
17337 POST_ALLOC_OBJ=lastfile.o
5476a9a4
GM
17338else
17339 CYGWIN_OBJ=
17340 PRE_ALLOC_OBJ=lastfile.o
17341 POST_ALLOC_OBJ=
17342fi
4fda9c95 17343
3e0be4ab 17344
3e0be4ab 17345
3e0be4ab 17346
5476a9a4
GM
17347# Configure gnulib. Although this does not affect CFLAGS or LIBS permanently.
17348# it temporarily reverts them to their pre-pkg-config values,
17349# because gnulib needs to work with both src (which uses the
17350# pkg-config stuff) and lib-src (which does not). For example, gnulib
17351# may need to determine whether LIB_CLOCK_GETTIME should contain -lrt,
17352# and it therefore needs to run in an environment where LIBS does not
17353# already contain -lrt merely because 'pkg-config --libs' printed '-lrt'
17354# for some package unrelated to lib-src.
17355SAVE_CFLAGS=$CFLAGS
17356SAVE_LIBS=$LIBS
17357CFLAGS=$pre_PKG_CONFIG_CFLAGS
17358LIBS="$LIB_PTHREAD $pre_PKG_CONFIG_LIBS"
3e0be4ab 17359
3e0be4ab
GM
17360
17361
4fda9c95 17362
4fda9c95 17363
3e0be4ab 17364
3e0be4ab
GM
17365
17366
4fda9c95 17367
3e0be4ab
GM
17368
17369
5476a9a4
GM
17370 LIBC_FATAL_STDERR_=1
17371 export LIBC_FATAL_STDERR_
3e0be4ab 17372
5476a9a4
GM
17373# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
17374# for constant arguments. Useless!
17375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
17376$as_echo_n "checking for working alloca.h... " >&6; }
17377if test "${ac_cv_working_alloca_h+set}" = set; then :
17378 $as_echo_n "(cached) " >&6
17379else
17380 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17381/* end confdefs.h. */
17382#include <alloca.h>
17383int
17384main ()
17385{
17386char *p = (char *) alloca (2 * sizeof (int));
17387 if (p) return 0;
17388 ;
17389 return 0;
17390}
17391_ACEOF
17392if ac_fn_c_try_link "$LINENO"; then :
17393 ac_cv_working_alloca_h=yes
17394else
17395 ac_cv_working_alloca_h=no
17396fi
17397rm -f core conftest.err conftest.$ac_objext \
17398 conftest$ac_exeext conftest.$ac_ext
17399fi
17400{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
17401$as_echo "$ac_cv_working_alloca_h" >&6; }
17402if test $ac_cv_working_alloca_h = yes; then
3e0be4ab 17403
5476a9a4 17404$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
3e0be4ab 17405
5476a9a4 17406fi
3e0be4ab 17407
5476a9a4
GM
17408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
17409$as_echo_n "checking for alloca... " >&6; }
17410if test "${ac_cv_func_alloca_works+set}" = set; then :
f199cab1
GM
17411 $as_echo_n "(cached) " >&6
17412else
5476a9a4 17413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 17414/* end confdefs.h. */
5476a9a4
GM
17415#ifdef __GNUC__
17416# define alloca __builtin_alloca
17417#else
17418# ifdef _MSC_VER
17419# include <malloc.h>
17420# define alloca _alloca
17421# else
17422# ifdef HAVE_ALLOCA_H
17423# include <alloca.h>
17424# else
17425# ifdef _AIX
17426 #pragma alloca
17427# else
17428# ifndef alloca /* predefined by HP cc +Olibcalls */
17429char *alloca ();
17430# endif
17431# endif
17432# endif
17433# endif
17434#endif
17435
17436int
17437main ()
17438{
17439char *p = (char *) alloca (1);
17440 if (p) return 0;
17441 ;
17442 return 0;
17443}
17444_ACEOF
17445if ac_fn_c_try_link "$LINENO"; then :
17446 ac_cv_func_alloca_works=yes
17447else
17448 ac_cv_func_alloca_works=no
17449fi
17450rm -f core conftest.err conftest.$ac_objext \
17451 conftest$ac_exeext conftest.$ac_ext
17452fi
17453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
17454$as_echo "$ac_cv_func_alloca_works" >&6; }
17455
17456if test $ac_cv_func_alloca_works = yes; then
17457
17458$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
17459
17460else
17461 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
17462# that cause trouble. Some versions do not even contain alloca or
17463# contain a buggy version. If you still want to use their alloca,
17464# use ar to extract alloca.o from them instead of compiling alloca.c.
3e0be4ab 17465
4fda9c95 17466
4fda9c95 17467
4fda9c95
GM
17468
17469
5476a9a4 17470ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
4fda9c95 17471
5476a9a4 17472$as_echo "#define C_ALLOCA 1" >>confdefs.h
4fda9c95 17473
4fda9c95 17474
5476a9a4
GM
17475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether 'alloca.c' needs Cray hooks" >&5
17476$as_echo_n "checking whether 'alloca.c' needs Cray hooks... " >&6; }
17477if test "${ac_cv_os_cray+set}" = set; then :
17478 $as_echo_n "(cached) " >&6
17479else
17480 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17481/* end confdefs.h. */
17482#if defined CRAY && ! defined CRAY2
17483webecray
17484#else
17485wenotbecray
17486#endif
4fda9c95 17487
5476a9a4
GM
17488_ACEOF
17489if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17490 $EGREP "webecray" >/dev/null 2>&1; then :
17491 ac_cv_os_cray=yes
17492else
17493 ac_cv_os_cray=no
17494fi
17495rm -f conftest*
4fda9c95 17496
5476a9a4
GM
17497fi
17498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
17499$as_echo "$ac_cv_os_cray" >&6; }
17500if test $ac_cv_os_cray = yes; then
17501 for ac_func in _getb67 GETB67 getb67; do
17502 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17503ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17504eval as_val=\$$as_ac_var
17505 if test "x$as_val" = x""yes; then :
4fda9c95 17506
5476a9a4
GM
17507cat >>confdefs.h <<_ACEOF
17508#define CRAY_STACKSEG_END $ac_func
17509_ACEOF
4fda9c95 17510
5476a9a4
GM
17511 break
17512fi
4fda9c95 17513
5476a9a4
GM
17514 done
17515fi
4fda9c95 17516
5476a9a4
GM
17517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
17518$as_echo_n "checking stack direction for C alloca... " >&6; }
17519if test "${ac_cv_c_stack_direction+set}" = set; then :
17520 $as_echo_n "(cached) " >&6
17521else
17522 if test "$cross_compiling" = yes; then :
17523 ac_cv_c_stack_direction=0
17524else
17525 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17526/* end confdefs.h. */
17527$ac_includes_default
17528int
17529find_stack_direction (int *addr, int depth)
17530{
17531 int dir, dummy = 0;
17532 if (! addr)
17533 addr = &dummy;
17534 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
17535 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
17536 return dir + dummy;
17537}
4fda9c95 17538
5476a9a4
GM
17539int
17540main (int argc, char **argv)
17541{
17542 return find_stack_direction (0, argc + !argv + 20) < 0;
17543}
17544_ACEOF
17545if ac_fn_c_try_run "$LINENO"; then :
17546 ac_cv_c_stack_direction=1
17547else
17548 ac_cv_c_stack_direction=-1
17549fi
17550rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17551 conftest.$ac_objext conftest.beam conftest.$ac_ext
17552fi
4fda9c95 17553
5476a9a4
GM
17554fi
17555{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
17556$as_echo "$ac_cv_c_stack_direction" >&6; }
17557cat >>confdefs.h <<_ACEOF
17558#define STACK_DIRECTION $ac_cv_c_stack_direction
17559_ACEOF
3e0be4ab
GM
17560
17561
5476a9a4 17562fi
3e0be4ab
GM
17563
17564
17565
17566
5476a9a4
GM
17567 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
17568$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
17569if test "${ac_cv_c_bigendian+set}" = set; then :
17570 $as_echo_n "(cached) " >&6
17571else
17572 ac_cv_c_bigendian=unknown
17573 # See if we're dealing with a universal compiler.
17574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17575/* end confdefs.h. */
17576#ifndef __APPLE_CC__
17577 not a universal capable compiler
17578 #endif
17579 typedef int dummy;
17580
17581_ACEOF
17582if ac_fn_c_try_compile "$LINENO"; then :
3e0be4ab 17583
5476a9a4
GM
17584 # Check for potential -arch flags. It is not universal unless
17585 # there are at least two -arch flags with different values.
17586 ac_arch=
17587 ac_prev=
17588 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
17589 if test -n "$ac_prev"; then
17590 case $ac_word in
17591 i?86 | x86_64 | ppc | ppc64)
17592 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
17593 ac_arch=$ac_word
17594 else
17595 ac_cv_c_bigendian=universal
17596 break
17597 fi
17598 ;;
17599 esac
17600 ac_prev=
17601 elif test "x$ac_word" = "x-arch"; then
17602 ac_prev=arch
17603 fi
17604 done
17605fi
17606rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17607 if test $ac_cv_c_bigendian = unknown; then
17608 # See if sys/param.h defines the BYTE_ORDER macro.
17609 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17610/* end confdefs.h. */
17611#include <sys/types.h>
17612 #include <sys/param.h>
3e0be4ab 17613
5476a9a4
GM
17614int
17615main ()
17616{
17617#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
17618 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
17619 && LITTLE_ENDIAN)
17620 bogus endian macros
17621 #endif
3e0be4ab 17622
5476a9a4
GM
17623 ;
17624 return 0;
17625}
17626_ACEOF
17627if ac_fn_c_try_compile "$LINENO"; then :
17628 # It does; now see whether it defined to BIG_ENDIAN or not.
17629 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17630/* end confdefs.h. */
17631#include <sys/types.h>
17632 #include <sys/param.h>
369e19fc 17633
5476a9a4
GM
17634int
17635main ()
17636{
17637#if BYTE_ORDER != BIG_ENDIAN
17638 not big endian
17639 #endif
3e0be4ab 17640
5476a9a4
GM
17641 ;
17642 return 0;
17643}
17644_ACEOF
17645if ac_fn_c_try_compile "$LINENO"; then :
17646 ac_cv_c_bigendian=yes
17647else
17648 ac_cv_c_bigendian=no
17649fi
17650rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17651fi
17652rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17653 fi
17654 if test $ac_cv_c_bigendian = unknown; then
17655 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
17656 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17657/* end confdefs.h. */
17658#include <limits.h>
4fda9c95 17659
5476a9a4
GM
17660int
17661main ()
17662{
17663#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
17664 bogus endian macros
17665 #endif
4fda9c95 17666
5476a9a4
GM
17667 ;
17668 return 0;
17669}
17670_ACEOF
17671if ac_fn_c_try_compile "$LINENO"; then :
17672 # It does; now see whether it defined to _BIG_ENDIAN or not.
17673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17674/* end confdefs.h. */
17675#include <limits.h>
4fda9c95 17676
5476a9a4
GM
17677int
17678main ()
17679{
17680#ifndef _BIG_ENDIAN
17681 not big endian
17682 #endif
f199cab1 17683
5476a9a4
GM
17684 ;
17685 return 0;
17686}
17687_ACEOF
17688if ac_fn_c_try_compile "$LINENO"; then :
17689 ac_cv_c_bigendian=yes
f199cab1 17690else
5476a9a4
GM
17691 ac_cv_c_bigendian=no
17692fi
17693rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17694fi
17695rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17696 fi
17697 if test $ac_cv_c_bigendian = unknown; then
17698 # Compile a test program.
17699 if test "$cross_compiling" = yes; then :
17700 # Try to guess by grepping values from an object file.
17701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17702/* end confdefs.h. */
17703short int ascii_mm[] =
17704 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
17705 short int ascii_ii[] =
17706 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
17707 int use_ascii (int i) {
17708 return ascii_mm[i] + ascii_ii[i];
17709 }
17710 short int ebcdic_ii[] =
17711 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
17712 short int ebcdic_mm[] =
17713 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
17714 int use_ebcdic (int i) {
17715 return ebcdic_mm[i] + ebcdic_ii[i];
17716 }
17717 extern int foo;
f199cab1 17718
5476a9a4
GM
17719int
17720main ()
17721{
17722return use_ascii (foo) == use_ebcdic (foo);
17723 ;
17724 return 0;
17725}
17726_ACEOF
17727if ac_fn_c_try_compile "$LINENO"; then :
17728 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
17729 ac_cv_c_bigendian=yes
17730 fi
17731 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
17732 if test "$ac_cv_c_bigendian" = unknown; then
17733 ac_cv_c_bigendian=no
17734 else
17735 # finding both strings is unlikely to happen, but who knows?
17736 ac_cv_c_bigendian=unknown
17737 fi
17738 fi
17739fi
17740rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4fda9c95 17741else
3e0be4ab 17742 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4fda9c95 17743/* end confdefs.h. */
5476a9a4
GM
17744$ac_includes_default
17745int
17746main ()
4fda9c95 17747{
5476a9a4
GM
17748
17749 /* Are we little or big endian? From Harbison&Steele. */
17750 union
17751 {
17752 long int l;
17753 char c[sizeof (long int)];
17754 } u;
17755 u.l = 1;
17756 return u.c[sizeof (long int) - 1] == 1;
17757
17758 ;
4fda9c95
GM
17759 return 0;
17760}
17761_ACEOF
f199cab1 17762if ac_fn_c_try_run "$LINENO"; then :
5476a9a4 17763 ac_cv_c_bigendian=no
3e0be4ab 17764else
5476a9a4 17765 ac_cv_c_bigendian=yes
4fda9c95 17766fi
f199cab1
GM
17767rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17768 conftest.$ac_objext conftest.beam conftest.$ac_ext
4fda9c95 17769fi
4fda9c95 17770
5476a9a4 17771 fi
f199cab1 17772fi
5476a9a4
GM
17773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
17774$as_echo "$ac_cv_c_bigendian" >&6; }
17775 case $ac_cv_c_bigendian in #(
17776 yes)
17777 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
17778;; #(
17779 no)
17780 ;; #(
17781 universal)
3e0be4ab 17782
5476a9a4 17783$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
3e0be4ab 17784
5476a9a4
GM
17785 ;; #(
17786 *)
17787 as_fn_error "unknown endianness
17788 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
17789 esac
4fda9c95 17790
4fda9c95 17791
da6c8463 17792
5476a9a4
GM
17793 GNULIB_CHDIR=0;
17794 GNULIB_CHOWN=0;
17795 GNULIB_CLOSE=0;
17796 GNULIB_DUP=0;
17797 GNULIB_DUP2=0;
17798 GNULIB_DUP3=0;
17799 GNULIB_ENVIRON=0;
17800 GNULIB_EUIDACCESS=0;
17801 GNULIB_FACCESSAT=0;
17802 GNULIB_FCHDIR=0;
17803 GNULIB_FCHOWNAT=0;
17804 GNULIB_FDATASYNC=0;
17805 GNULIB_FSYNC=0;
17806 GNULIB_FTRUNCATE=0;
17807 GNULIB_GETCWD=0;
17808 GNULIB_GETDOMAINNAME=0;
17809 GNULIB_GETDTABLESIZE=0;
17810 GNULIB_GETGROUPS=0;
17811 GNULIB_GETHOSTNAME=0;
17812 GNULIB_GETLOGIN=0;
17813 GNULIB_GETLOGIN_R=0;
17814 GNULIB_GETPAGESIZE=0;
17815 GNULIB_GETUSERSHELL=0;
17816 GNULIB_GROUP_MEMBER=0;
17817 GNULIB_ISATTY=0;
17818 GNULIB_LCHOWN=0;
17819 GNULIB_LINK=0;
17820 GNULIB_LINKAT=0;
17821 GNULIB_LSEEK=0;
17822 GNULIB_PIPE=0;
17823 GNULIB_PIPE2=0;
17824 GNULIB_PREAD=0;
17825 GNULIB_PWRITE=0;
17826 GNULIB_READ=0;
17827 GNULIB_READLINK=0;
17828 GNULIB_READLINKAT=0;
17829 GNULIB_RMDIR=0;
17830 GNULIB_SETHOSTNAME=0;
17831 GNULIB_SLEEP=0;
17832 GNULIB_SYMLINK=0;
17833 GNULIB_SYMLINKAT=0;
17834 GNULIB_TTYNAME_R=0;
17835 GNULIB_UNISTD_H_NONBLOCKING=0;
17836 GNULIB_UNISTD_H_SIGPIPE=0;
17837 GNULIB_UNLINK=0;
17838 GNULIB_UNLINKAT=0;
17839 GNULIB_USLEEP=0;
17840 GNULIB_WRITE=0;
17841 HAVE_CHOWN=1;
17842 HAVE_DUP2=1;
17843 HAVE_DUP3=1;
17844 HAVE_EUIDACCESS=1;
17845 HAVE_FACCESSAT=1;
17846 HAVE_FCHDIR=1;
17847 HAVE_FCHOWNAT=1;
17848 HAVE_FDATASYNC=1;
17849 HAVE_FSYNC=1;
17850 HAVE_FTRUNCATE=1;
17851 HAVE_GETDTABLESIZE=1;
17852 HAVE_GETGROUPS=1;
17853 HAVE_GETHOSTNAME=1;
17854 HAVE_GETLOGIN=1;
17855 HAVE_GETPAGESIZE=1;
17856 HAVE_GROUP_MEMBER=1;
17857 HAVE_LCHOWN=1;
17858 HAVE_LINK=1;
17859 HAVE_LINKAT=1;
17860 HAVE_PIPE=1;
17861 HAVE_PIPE2=1;
17862 HAVE_PREAD=1;
17863 HAVE_PWRITE=1;
17864 HAVE_READLINK=1;
17865 HAVE_READLINKAT=1;
17866 HAVE_SETHOSTNAME=1;
17867 HAVE_SLEEP=1;
17868 HAVE_SYMLINK=1;
17869 HAVE_SYMLINKAT=1;
17870 HAVE_UNLINKAT=1;
17871 HAVE_USLEEP=1;
17872 HAVE_DECL_ENVIRON=1;
17873 HAVE_DECL_FCHDIR=1;
17874 HAVE_DECL_FDATASYNC=1;
17875 HAVE_DECL_GETDOMAINNAME=1;
17876 HAVE_DECL_GETLOGIN_R=1;
17877 HAVE_DECL_GETPAGESIZE=1;
17878 HAVE_DECL_GETUSERSHELL=1;
17879 HAVE_DECL_SETHOSTNAME=1;
17880 HAVE_DECL_TTYNAME_R=1;
17881 HAVE_OS_H=0;
17882 HAVE_SYS_PARAM_H=0;
17883 REPLACE_CHOWN=0;
17884 REPLACE_CLOSE=0;
17885 REPLACE_DUP=0;
17886 REPLACE_DUP2=0;
17887 REPLACE_FCHOWNAT=0;
17888 REPLACE_FTRUNCATE=0;
17889 REPLACE_GETCWD=0;
17890 REPLACE_GETDOMAINNAME=0;
17891 REPLACE_GETLOGIN_R=0;
17892 REPLACE_GETGROUPS=0;
17893 REPLACE_GETPAGESIZE=0;
17894 REPLACE_ISATTY=0;
17895 REPLACE_LCHOWN=0;
17896 REPLACE_LINK=0;
17897 REPLACE_LINKAT=0;
17898 REPLACE_LSEEK=0;
17899 REPLACE_PREAD=0;
17900 REPLACE_PWRITE=0;
17901 REPLACE_READ=0;
17902 REPLACE_READLINK=0;
17903 REPLACE_RMDIR=0;
17904 REPLACE_SLEEP=0;
17905 REPLACE_SYMLINK=0;
17906 REPLACE_TTYNAME_R=0;
17907 REPLACE_UNLINK=0;
17908 REPLACE_UNLINKAT=0;
17909 REPLACE_USLEEP=0;
17910 REPLACE_WRITE=0;
17911 UNISTD_H_HAVE_WINSOCK2_H=0;
17912 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
f199cab1
GM
17913
17914
93131e11 17915
d7ad186c
GM
17916 GNULIB_OPENDIR=0;
17917 GNULIB_READDIR=0;
17918 GNULIB_REWINDDIR=0;
17919 GNULIB_CLOSEDIR=0;
17920 GNULIB_DIRFD=0;
17921 GNULIB_FDOPENDIR=0;
17922 GNULIB_SCANDIR=0;
17923 GNULIB_ALPHASORT=0;
17924 HAVE_OPENDIR=1;
17925 HAVE_READDIR=1;
17926 HAVE_REWINDDIR=1;
17927 HAVE_CLOSEDIR=1;
17928 HAVE_DECL_DIRFD=1;
17929 HAVE_DECL_FDOPENDIR=1;
17930 HAVE_FDOPENDIR=1;
17931 HAVE_SCANDIR=1;
17932 HAVE_ALPHASORT=1;
17933 REPLACE_OPENDIR=0;
17934 REPLACE_CLOSEDIR=0;
17935 REPLACE_DIRFD=0;
17936 REPLACE_FDOPENDIR=0;
710f5812
GM
17937
17938
17939
17940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
17941$as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
17942if test "${gl_cv_have_include_next+set}" = set; then :
17943 $as_echo_n "(cached) " >&6
17944else
17945 rm -rf conftestd1a conftestd1b conftestd2
17946 mkdir conftestd1a conftestd1b conftestd2
17947 cat <<EOF > conftestd1a/conftest.h
17948#define DEFINED_IN_CONFTESTD1
17949#include_next <conftest.h>
17950#ifdef DEFINED_IN_CONFTESTD2
17951int foo;
17952#else
17953#error "include_next doesn't work"
17954#endif
17955EOF
17956 cat <<EOF > conftestd1b/conftest.h
17957#define DEFINED_IN_CONFTESTD1
17958#include <stdio.h>
17959#include_next <conftest.h>
17960#ifdef DEFINED_IN_CONFTESTD2
17961int foo;
17962#else
17963#error "include_next doesn't work"
17964#endif
17965EOF
17966 cat <<EOF > conftestd2/conftest.h
17967#ifndef DEFINED_IN_CONFTESTD1
17968#error "include_next test doesn't work"
17969#endif
17970#define DEFINED_IN_CONFTESTD2
17971EOF
17972 gl_save_CPPFLAGS="$CPPFLAGS"
17973 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
17974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17975/* end confdefs.h. */
17976#include <conftest.h>
17977_ACEOF
17978if ac_fn_c_try_compile "$LINENO"; then :
17979 gl_cv_have_include_next=yes
17980else
17981 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
17982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17983/* end confdefs.h. */
17984#include <conftest.h>
17985_ACEOF
17986if ac_fn_c_try_compile "$LINENO"; then :
17987 gl_cv_have_include_next=buggy
17988else
17989 gl_cv_have_include_next=no
17990fi
17991rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17992
17993fi
17994rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17995 CPPFLAGS="$gl_save_CPPFLAGS"
17996 rm -rf conftestd1a conftestd1b conftestd2
17997
17998fi
17999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
18000$as_echo "$gl_cv_have_include_next" >&6; }
18001 PRAGMA_SYSTEM_HEADER=
18002 if test $gl_cv_have_include_next = yes; then
18003 INCLUDE_NEXT=include_next
18004 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
18005 if test -n "$GCC"; then
18006 PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
18007 fi
18008 else
18009 if test $gl_cv_have_include_next = buggy; then
18010 INCLUDE_NEXT=include
18011 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
18012 else
18013 INCLUDE_NEXT=include
18014 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
18015 fi
18016 fi
18017
18018
18019
18020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5
18021$as_echo_n "checking whether system header files limit the line length... " >&6; }
18022if test "${gl_cv_pragma_columns+set}" = set; then :
18023 $as_echo_n "(cached) " >&6
18024else
18025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18026/* end confdefs.h. */
18027
18028#ifdef __TANDEM
18029choke me
18030#endif
18031
18032_ACEOF
18033if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18034 $EGREP "choke me" >/dev/null 2>&1; then :
18035 gl_cv_pragma_columns=yes
18036else
18037 gl_cv_pragma_columns=no
18038fi
18039rm -f conftest*
18040
18041
18042fi
18043{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5
18044$as_echo "$gl_cv_pragma_columns" >&6; }
18045 if test $gl_cv_pragma_columns = yes; then
18046 PRAGMA_COLUMNS="#pragma COLUMNS 10000"
18047 else
18048 PRAGMA_COLUMNS=
18049 fi
18050
18051
710f5812 18052
710f5812 18053
710f5812 18054
d7ad186c
GM
18055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtold conforms to C99" >&5
18056$as_echo_n "checking whether strtold conforms to C99... " >&6; }
18057if test "${gl_cv_func_c99_strtold+set}" = set; then :
f199cab1 18058 $as_echo_n "(cached) " >&6
ae0d7250 18059else
f199cab1 18060 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3e0be4ab 18061/* end confdefs.h. */
d7ad186c
GM
18062/* On HP-UX before 11.23, strtold returns a struct instead of
18063 long double. Reject implementations like that, by requiring
18064 compatibility with the C99 prototype. */
18065 #include <stdlib.h>
18066 static long double (*p) (char const *, char **) = strtold;
18067 static long double
18068 test (char const *nptr, char **endptr)
18069 {
18070 long double r;
18071 r = strtold (nptr, endptr);
18072 return r;
18073 }
3e0be4ab
GM
18074int
18075main ()
18076{
d7ad186c 18077return test ("1.0", NULL) != 1 || p ("1.0", NULL) != 1;
3e0be4ab
GM
18078 ;
18079 return 0;
18080}
6ad6792b 18081_ACEOF
d7ad186c
GM
18082if ac_fn_c_try_link "$LINENO"; then :
18083 gl_cv_func_c99_strtold=yes
f199cab1 18084else
d7ad186c 18085 gl_cv_func_c99_strtold=no
f199cab1 18086fi
d7ad186c
GM
18087rm -f core conftest.err conftest.$ac_objext \
18088 conftest$ac_exeext conftest.$ac_ext
f199cab1 18089fi
d7ad186c
GM
18090{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_c99_strtold" >&5
18091$as_echo "$gl_cv_func_c99_strtold" >&6; }
18092 if test $gl_cv_func_c99_strtold = yes; then
f199cab1 18093
d7ad186c 18094$as_echo "#define HAVE_C99_STRTOLD 1" >>confdefs.h
f199cab1 18095
5476a9a4 18096 fi
f199cab1 18097
f199cab1 18098
f199cab1
GM
18099
18100
4fda9c95 18101
3bf26e96
GM
18102
18103
eda33f78 18104
d7ad186c
GM
18105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
18106$as_echo_n "checking if environ is properly declared... " >&6; }
18107 if test "${gt_cv_var_environ_declaration+set}" = set; then :
18108 $as_echo_n "(cached) " >&6
18109else
eda33f78 18110
d7ad186c
GM
18111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18112/* end confdefs.h. */
18113#if HAVE_UNISTD_H
18114 #include <unistd.h>
18115 #endif
18116 /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>. */
18117 #include <stdlib.h>
18118
18119 extern struct { int foo; } environ;
18120int
18121main ()
18122{
18123environ.foo = 1;
18124 ;
18125 return 0;
18126}
18127_ACEOF
18128if ac_fn_c_try_compile "$LINENO"; then :
18129 gt_cv_var_environ_declaration=no
18130else
18131 gt_cv_var_environ_declaration=yes
18132fi
18133rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18134fi
18135
18136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
18137$as_echo "$gt_cv_var_environ_declaration" >&6; }
18138 if test $gt_cv_var_environ_declaration = yes; then
18139
18140$as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
18141
18142 fi
18143
18144
18145 if test $gt_cv_var_environ_declaration != yes; then
18146 HAVE_DECL_ENVIRON=0
18147 fi
18148
18149
18150
3a019ab4
GM
18151 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
18152$as_echo_n "checking for complete errno.h... " >&6; }
18153if test "${gl_cv_header_errno_h_complete+set}" = set; then :
18154 $as_echo_n "(cached) " >&6
18155else
18156
18157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18158/* end confdefs.h. */
18159
18160#include <errno.h>
18161#if !defined ETXTBSY
18162booboo
18163#endif
18164#if !defined ENOMSG
18165booboo
18166#endif
18167#if !defined EIDRM
18168booboo
18169#endif
18170#if !defined ENOLINK
18171booboo
18172#endif
18173#if !defined EPROTO
18174booboo
18175#endif
18176#if !defined EMULTIHOP
18177booboo
18178#endif
18179#if !defined EBADMSG
18180booboo
18181#endif
18182#if !defined EOVERFLOW
18183booboo
18184#endif
18185#if !defined ENOTSUP
18186booboo
18187#endif
18188#if !defined ENETRESET
18189booboo
18190#endif
18191#if !defined ECONNABORTED
18192booboo
18193#endif
18194#if !defined ESTALE
18195booboo
18196#endif
18197#if !defined EDQUOT
18198booboo
18199#endif
18200#if !defined ECANCELED
18201booboo
18202#endif
18203#if !defined EOWNERDEAD
18204booboo
18205#endif
18206#if !defined ENOTRECOVERABLE
18207booboo
18208#endif
18209#if !defined EILSEQ
18210booboo
18211#endif
18212
18213_ACEOF
18214if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18215 $EGREP "booboo" >/dev/null 2>&1; then :
18216 gl_cv_header_errno_h_complete=no
18217else
18218 gl_cv_header_errno_h_complete=yes
18219fi
18220rm -f conftest*
18221
d7ad186c 18222
3a019ab4
GM
18223fi
18224{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
18225$as_echo "$gl_cv_header_errno_h_complete" >&6; }
18226 if test $gl_cv_header_errno_h_complete = yes; then
18227 ERRNO_H=''
18228 else
d7ad186c
GM
18229
18230
18231
18232
18233
d7ad186c
GM
18234
18235
d7ad186c 18236
3a019ab4
GM
18237 if test $gl_cv_have_include_next = yes; then
18238 gl_cv_next_errno_h='<'errno.h'>'
18239 else
18240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
18241$as_echo_n "checking absolute name of <errno.h>... " >&6; }
18242if test "${gl_cv_next_errno_h+set}" = set; then :
18243 $as_echo_n "(cached) " >&6
d7ad186c
GM
18244else
18245
3a019ab4
GM
18246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18247/* end confdefs.h. */
18248#include <errno.h>
18249
d7ad186c 18250_ACEOF
3a019ab4
GM
18251 case "$host_os" in
18252 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18253 *) gl_absname_cpp="$ac_cpp" ;;
18254 esac
18255
18256 case "$host_os" in
18257 mingw*)
18258 gl_dirsep_regex='[/\\]'
18259 ;;
18260 *)
18261 gl_dirsep_regex='\/'
18262 ;;
18263 esac
18264 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18265
18266 gl_header_literal_regex=`echo 'errno.h' \
18267 | sed -e "$gl_make_literal_regex_sed"`
18268 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18269 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18270 s|^/[^/]|//&|
18271 p
18272 q
18273 }'
18274 gl_cv_next_errno_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18275 sed -n "$gl_absolute_header_sed"`'"'
d7ad186c 18276
d7ad186c 18277
2407788f 18278fi
3a019ab4
GM
18279{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
18280$as_echo "$gl_cv_next_errno_h" >&6; }
18281 fi
18282 NEXT_ERRNO_H=$gl_cv_next_errno_h
2407788f 18283
3a019ab4
GM
18284 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18285 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18286 gl_next_as_first_directive='<'errno.h'>'
18287 else
18288 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18289 gl_next_as_first_directive=$gl_cv_next_errno_h
18290 fi
18291 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
2407788f 18292
d7ad186c
GM
18293
18294
d7ad186c 18295
3a019ab4
GM
18296 ERRNO_H='errno.h'
18297 fi
18298
18299 if test -n "$ERRNO_H"; then
18300 GL_GENERATE_ERRNO_H_TRUE=
18301 GL_GENERATE_ERRNO_H_FALSE='#'
d7ad186c 18302else
3a019ab4
GM
18303 GL_GENERATE_ERRNO_H_TRUE='#'
18304 GL_GENERATE_ERRNO_H_FALSE=
d7ad186c 18305fi
d7ad186c 18306
d7ad186c 18307
3a019ab4
GM
18308 if test -n "$ERRNO_H"; then
18309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
18310$as_echo_n "checking for EMULTIHOP value... " >&6; }
18311if test "${gl_cv_header_errno_h_EMULTIHOP+set}" = set; then :
18312 $as_echo_n "(cached) " >&6
18313else
d7ad186c 18314
3a019ab4
GM
18315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18316/* end confdefs.h. */
d7ad186c 18317
3a019ab4
GM
18318#include <errno.h>
18319#ifdef EMULTIHOP
18320yes
18321#endif
d7ad186c 18322
3a019ab4
GM
18323_ACEOF
18324if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18325 $EGREP "yes" >/dev/null 2>&1; then :
18326 gl_cv_header_errno_h_EMULTIHOP=yes
d7ad186c 18327else
3a019ab4 18328 gl_cv_header_errno_h_EMULTIHOP=no
d7ad186c 18329fi
3a019ab4
GM
18330rm -f conftest*
18331
18332 if test $gl_cv_header_errno_h_EMULTIHOP = no; then
18333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18334/* end confdefs.h. */
18335
18336#define _XOPEN_SOURCE_EXTENDED 1
18337#include <errno.h>
18338#ifdef EMULTIHOP
18339yes
18340#endif
d7ad186c 18341
d7ad186c 18342_ACEOF
3a019ab4
GM
18343if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18344 $EGREP "yes" >/dev/null 2>&1; then :
18345 gl_cv_header_errno_h_EMULTIHOP=hidden
18346fi
18347rm -f conftest*
d7ad186c 18348
3a019ab4
GM
18349 if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
18350 if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP" "
18351#define _XOPEN_SOURCE_EXTENDED 1
18352#include <errno.h>
18353/* The following two lines are a workaround against an autoconf-2.52 bug. */
18354#include <stdio.h>
18355#include <stdlib.h>
18356"; then :
d7ad186c 18357
3a019ab4 18358fi
d7ad186c 18359
3a019ab4
GM
18360 fi
18361 fi
d7ad186c 18362
3a019ab4
GM
18363fi
18364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
18365$as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
18366 case $gl_cv_header_errno_h_EMULTIHOP in
18367 yes | no)
18368 EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
18369 ;;
18370 *)
18371 EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
18372 ;;
18373 esac
d7ad186c
GM
18374
18375
3a019ab4 18376 fi
d7ad186c
GM
18377
18378
3a019ab4
GM
18379 if test -n "$ERRNO_H"; then
18380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
18381$as_echo_n "checking for ENOLINK value... " >&6; }
18382if test "${gl_cv_header_errno_h_ENOLINK+set}" = set; then :
d7ad186c
GM
18383 $as_echo_n "(cached) " >&6
18384else
d7ad186c 18385
3a019ab4 18386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d7ad186c 18387/* end confdefs.h. */
3a019ab4
GM
18388
18389#include <errno.h>
18390#ifdef ENOLINK
18391yes
18392#endif
18393
18394_ACEOF
18395if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18396 $EGREP "yes" >/dev/null 2>&1; then :
18397 gl_cv_header_errno_h_ENOLINK=yes
18398else
18399 gl_cv_header_errno_h_ENOLINK=no
18400fi
18401rm -f conftest*
18402
18403 if test $gl_cv_header_errno_h_ENOLINK = no; then
18404 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18405/* end confdefs.h. */
18406
18407#define _XOPEN_SOURCE_EXTENDED 1
18408#include <errno.h>
18409#ifdef ENOLINK
18410yes
18411#endif
18412
18413_ACEOF
18414if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18415 $EGREP "yes" >/dev/null 2>&1; then :
18416 gl_cv_header_errno_h_ENOLINK=hidden
18417fi
18418rm -f conftest*
18419
18420 if test $gl_cv_header_errno_h_ENOLINK = hidden; then
18421 if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK" "
18422#define _XOPEN_SOURCE_EXTENDED 1
18423#include <errno.h>
18424/* The following two lines are a workaround against an autoconf-2.52 bug. */
18425#include <stdio.h>
18426#include <stdlib.h>
18427"; then :
18428
18429fi
18430
18431 fi
18432 fi
18433
18434fi
18435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
18436$as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; }
18437 case $gl_cv_header_errno_h_ENOLINK in
18438 yes | no)
18439 ENOLINK_HIDDEN=0; ENOLINK_VALUE=
18440 ;;
18441 *)
18442 ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
18443 ;;
18444 esac
18445
18446
18447 fi
18448
18449
18450 if test -n "$ERRNO_H"; then
18451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
18452$as_echo_n "checking for EOVERFLOW value... " >&6; }
18453if test "${gl_cv_header_errno_h_EOVERFLOW+set}" = set; then :
18454 $as_echo_n "(cached) " >&6
18455else
18456
18457 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18458/* end confdefs.h. */
18459
18460#include <errno.h>
18461#ifdef EOVERFLOW
18462yes
18463#endif
18464
18465_ACEOF
18466if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18467 $EGREP "yes" >/dev/null 2>&1; then :
18468 gl_cv_header_errno_h_EOVERFLOW=yes
18469else
18470 gl_cv_header_errno_h_EOVERFLOW=no
18471fi
18472rm -f conftest*
18473
18474 if test $gl_cv_header_errno_h_EOVERFLOW = no; then
18475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18476/* end confdefs.h. */
18477
18478#define _XOPEN_SOURCE_EXTENDED 1
18479#include <errno.h>
18480#ifdef EOVERFLOW
18481yes
18482#endif
18483
18484_ACEOF
18485if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18486 $EGREP "yes" >/dev/null 2>&1; then :
18487 gl_cv_header_errno_h_EOVERFLOW=hidden
18488fi
18489rm -f conftest*
18490
18491 if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
18492 if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW" "
18493#define _XOPEN_SOURCE_EXTENDED 1
18494#include <errno.h>
18495/* The following two lines are a workaround against an autoconf-2.52 bug. */
18496#include <stdio.h>
18497#include <stdlib.h>
18498"; then :
18499
18500fi
18501
18502 fi
18503 fi
18504
18505fi
18506{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
18507$as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
18508 case $gl_cv_header_errno_h_EOVERFLOW in
18509 yes | no)
18510 EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
18511 ;;
18512 *)
18513 EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
18514 ;;
18515 esac
18516
18517
18518 fi
18519
18520
18521
18522
18523
18524
18525
18526
18527
18528
18529 GNULIB_FCNTL=0;
18530 GNULIB_NONBLOCKING=0;
18531 GNULIB_OPEN=0;
18532 GNULIB_OPENAT=0;
18533 HAVE_FCNTL=1;
18534 HAVE_OPENAT=1;
18535 REPLACE_FCNTL=0;
18536 REPLACE_OPEN=0;
18537 REPLACE_OPENAT=0;
18538
18539
18540ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
18541if test "x$ac_cv_type_mode_t" = x""yes; then :
18542
18543else
18544
18545cat >>confdefs.h <<_ACEOF
18546#define mode_t int
18547_ACEOF
18548
18549fi
18550
18551ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "$ac_includes_default"
18552if test "x$ac_cv_have_decl_fdatasync" = x""yes; then :
18553 ac_have_decl=1
18554else
18555 ac_have_decl=0
18556fi
18557
18558cat >>confdefs.h <<_ACEOF
18559#define HAVE_DECL_FDATASYNC $ac_have_decl
18560_ACEOF
18561
18562
18563
18564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for st_dm_mode in struct stat" >&5
18565$as_echo_n "checking for st_dm_mode in struct stat... " >&6; }
18566if test "${ac_cv_struct_st_dm_mode+set}" = set; then :
18567 $as_echo_n "(cached) " >&6
18568else
18569 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18570/* end confdefs.h. */
18571
18572#include <sys/types.h>
18573#include <sys/stat.h>
18574int
18575main ()
18576{
18577struct stat s; s.st_dm_mode;
18578 ;
18579 return 0;
18580}
18581_ACEOF
18582if ac_fn_c_try_compile "$LINENO"; then :
18583 ac_cv_struct_st_dm_mode=yes
18584else
18585 ac_cv_struct_st_dm_mode=no
18586fi
18587rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18588fi
18589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_st_dm_mode" >&5
18590$as_echo "$ac_cv_struct_st_dm_mode" >&6; }
18591
18592 if test $ac_cv_struct_st_dm_mode = yes; then
18593
18594$as_echo "#define HAVE_ST_DM_MODE 1" >>confdefs.h
18595
18596 fi
18597
18598
18599ac_fn_c_check_decl "$LINENO" "strmode" "ac_cv_have_decl_strmode" "$ac_includes_default"
18600if test "x$ac_cv_have_decl_strmode" = x""yes; then :
18601 ac_have_decl=1
18602else
18603 ac_have_decl=0
18604fi
18605
18606cat >>confdefs.h <<_ACEOF
18607#define HAVE_DECL_STRMODE $ac_have_decl
18608_ACEOF
18609
18610
18611
18612
18613
18614
18615 GNULIB_FCHMODAT=0;
18616 GNULIB_FSTAT=0;
18617 GNULIB_FSTATAT=0;
18618 GNULIB_FUTIMENS=0;
18619 GNULIB_LCHMOD=0;
18620 GNULIB_LSTAT=0;
18621 GNULIB_MKDIRAT=0;
18622 GNULIB_MKFIFO=0;
18623 GNULIB_MKFIFOAT=0;
18624 GNULIB_MKNOD=0;
18625 GNULIB_MKNODAT=0;
18626 GNULIB_STAT=0;
18627 GNULIB_UTIMENSAT=0;
18628 HAVE_FCHMODAT=1;
18629 HAVE_FSTATAT=1;
18630 HAVE_FUTIMENS=1;
18631 HAVE_LCHMOD=1;
18632 HAVE_LSTAT=1;
18633 HAVE_MKDIRAT=1;
18634 HAVE_MKFIFO=1;
18635 HAVE_MKFIFOAT=1;
18636 HAVE_MKNOD=1;
18637 HAVE_MKNODAT=1;
18638 HAVE_UTIMENSAT=1;
18639 REPLACE_FSTAT=0;
18640 REPLACE_FSTATAT=0;
18641 REPLACE_FUTIMENS=0;
18642 REPLACE_LSTAT=0;
18643 REPLACE_MKDIR=0;
18644 REPLACE_MKFIFO=0;
18645 REPLACE_MKNOD=0;
18646 REPLACE_STAT=0;
18647 REPLACE_UTIMENSAT=0;
18648
18649
18650 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
18651$as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
18652if test "${gl_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then :
18653 $as_echo_n "(cached) " >&6
18654else
18655 rm -f conftest.sym conftest.file
18656 echo >conftest.file
18657 if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then
18658 if test "$cross_compiling" = yes; then :
18659 case "$host_os" in
18660 # Guess yes on glibc systems.
18661 *-gnu*) gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
18662 # If we don't know, assume the worst.
18663 *) gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
18664 esac
18665
18666else
18667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18668/* end confdefs.h. */
18669$ac_includes_default
18670int
18671main ()
18672{
18673struct stat sbuf;
18674 /* Linux will dereference the symlink and fail, as required by
d7ad186c
GM
18675 POSIX. That is better in the sense that it means we will not
18676 have to compile and use the lstat wrapper. */
18677 return lstat ("conftest.sym/", &sbuf) == 0;
18678
18679 ;
18680 return 0;
18681}
18682_ACEOF
18683if ac_fn_c_try_run "$LINENO"; then :
18684 gl_cv_func_lstat_dereferences_slashed_symlink=yes
18685else
18686 gl_cv_func_lstat_dereferences_slashed_symlink=no
18687fi
18688rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18689 conftest.$ac_objext conftest.beam conftest.$ac_ext
18690fi
18691
18692 else
18693 # If the 'ln -s' command failed, then we probably don't even
18694 # have an lstat function.
18695 gl_cv_func_lstat_dereferences_slashed_symlink="guessing no"
18696 fi
18697 rm -f conftest.sym conftest.file
18698
18699fi
18700{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
18701$as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
18702 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
18703 *yes)
18704
18705cat >>confdefs.h <<_ACEOF
18706#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
18707_ACEOF
18708
18709 ;;
18710 esac
18711
18712
18713
18714
2407788f
GM
18715
18716
d7ad186c
GM
18717 GNULIB__EXIT=0;
18718 GNULIB_ATOLL=0;
18719 GNULIB_CALLOC_POSIX=0;
18720 GNULIB_CANONICALIZE_FILE_NAME=0;
18721 GNULIB_GETLOADAVG=0;
18722 GNULIB_GETSUBOPT=0;
18723 GNULIB_GRANTPT=0;
5476a9a4
GM
18724 GNULIB_MALLOC_POSIX=0;
18725 GNULIB_MBTOWC=0;
18726 GNULIB_MKDTEMP=0;
18727 GNULIB_MKOSTEMP=0;
18728 GNULIB_MKOSTEMPS=0;
18729 GNULIB_MKSTEMP=0;
18730 GNULIB_MKSTEMPS=0;
18731 GNULIB_POSIX_OPENPT=0;
18732 GNULIB_PTSNAME=0;
18733 GNULIB_PTSNAME_R=0;
18734 GNULIB_PUTENV=0;
18735 GNULIB_RANDOM=0;
18736 GNULIB_RANDOM_R=0;
18737 GNULIB_REALLOC_POSIX=0;
18738 GNULIB_REALPATH=0;
18739 GNULIB_RPMATCH=0;
2cdd55fc 18740 GNULIB_SECURE_GETENV=0;
5476a9a4
GM
18741 GNULIB_SETENV=0;
18742 GNULIB_STRTOD=0;
18743 GNULIB_STRTOLL=0;
18744 GNULIB_STRTOULL=0;
18745 GNULIB_SYSTEM_POSIX=0;
18746 GNULIB_UNLOCKPT=0;
18747 GNULIB_UNSETENV=0;
18748 GNULIB_WCTOMB=0;
18749 HAVE__EXIT=1;
18750 HAVE_ATOLL=1;
18751 HAVE_CANONICALIZE_FILE_NAME=1;
18752 HAVE_DECL_GETLOADAVG=1;
18753 HAVE_GETSUBOPT=1;
18754 HAVE_GRANTPT=1;
18755 HAVE_MKDTEMP=1;
18756 HAVE_MKOSTEMP=1;
18757 HAVE_MKOSTEMPS=1;
18758 HAVE_MKSTEMP=1;
18759 HAVE_MKSTEMPS=1;
18760 HAVE_POSIX_OPENPT=1;
18761 HAVE_PTSNAME=1;
18762 HAVE_PTSNAME_R=1;
18763 HAVE_RANDOM=1;
18764 HAVE_RANDOM_H=1;
18765 HAVE_RANDOM_R=1;
18766 HAVE_REALPATH=1;
18767 HAVE_RPMATCH=1;
2cdd55fc 18768 HAVE_SECURE_GETENV=1;
5476a9a4
GM
18769 HAVE_SETENV=1;
18770 HAVE_DECL_SETENV=1;
18771 HAVE_STRTOD=1;
18772 HAVE_STRTOLL=1;
18773 HAVE_STRTOULL=1;
18774 HAVE_STRUCT_RANDOM_DATA=1;
18775 HAVE_SYS_LOADAVG_H=0;
18776 HAVE_UNLOCKPT=1;
18777 HAVE_DECL_UNSETENV=1;
18778 REPLACE_CALLOC=0;
18779 REPLACE_CANONICALIZE_FILE_NAME=0;
18780 REPLACE_MALLOC=0;
18781 REPLACE_MBTOWC=0;
18782 REPLACE_MKSTEMP=0;
b6c9d18d 18783 REPLACE_PTSNAME=0;
5476a9a4
GM
18784 REPLACE_PTSNAME_R=0;
18785 REPLACE_PUTENV=0;
18786 REPLACE_RANDOM_R=0;
18787 REPLACE_REALLOC=0;
18788 REPLACE_REALPATH=0;
18789 REPLACE_SETENV=0;
18790 REPLACE_STRTOD=0;
18791 REPLACE_UNSETENV=0;
18792 REPLACE_WCTOMB=0;
f199cab1
GM
18793
18794
18795
f199cab1
GM
18796
18797
18798
18799
18800
18801
18802
18803
18804
18805
5f90be1b 18806
f199cab1
GM
18807
18808
18809 if test $gl_cv_have_include_next = yes; then
5476a9a4 18810 gl_cv_next_getopt_h='<'getopt.h'>'
f199cab1 18811 else
5476a9a4
GM
18812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <getopt.h>" >&5
18813$as_echo_n "checking absolute name of <getopt.h>... " >&6; }
18814if test "${gl_cv_next_getopt_h+set}" = set; then :
5f90be1b 18815 $as_echo_n "(cached) " >&6
5f90be1b 18816else
f199cab1 18817
5476a9a4 18818 if test $ac_cv_header_getopt_h = yes; then
f199cab1
GM
18819
18820
18821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5f90be1b 18822/* end confdefs.h. */
5476a9a4 18823#include <getopt.h>
4fda9c95 18824
5f90be1b 18825_ACEOF
f199cab1
GM
18826 case "$host_os" in
18827 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18828 *) gl_absname_cpp="$ac_cpp" ;;
18829 esac
5f90be1b 18830
f199cab1
GM
18831 case "$host_os" in
18832 mingw*)
18833 gl_dirsep_regex='[/\\]'
18834 ;;
18835 *)
18836 gl_dirsep_regex='\/'
18837 ;;
18838 esac
18839 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
5f90be1b 18840
5476a9a4 18841 gl_header_literal_regex=`echo 'getopt.h' \
f199cab1
GM
18842 | sed -e "$gl_make_literal_regex_sed"`
18843 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18844 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18845 s|^/[^/]|//&|
18846 p
18847 q
18848 }'
5476a9a4 18849 gl_cv_next_getopt_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
f199cab1
GM
18850 sed -n "$gl_absolute_header_sed"`'"'
18851 else
5476a9a4 18852 gl_cv_next_getopt_h='<'getopt.h'>'
f199cab1 18853 fi
5f90be1b
PE
18854
18855
3e0be4ab 18856fi
5476a9a4
GM
18857{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5
18858$as_echo "$gl_cv_next_getopt_h" >&6; }
f199cab1 18859 fi
5476a9a4 18860 NEXT_GETOPT_H=$gl_cv_next_getopt_h
3e0be4ab 18861
f199cab1
GM
18862 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18863 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
5476a9a4 18864 gl_next_as_first_directive='<'getopt.h'>'
f199cab1
GM
18865 else
18866 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
5476a9a4 18867 gl_next_as_first_directive=$gl_cv_next_getopt_h
f199cab1 18868 fi
5476a9a4 18869 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive
f199cab1
GM
18870
18871
f199cab1 18872
f199cab1 18873
5476a9a4
GM
18874 if test $ac_cv_header_getopt_h = yes; then
18875 HAVE_GETOPT_H=1
18876 else
18877 HAVE_GETOPT_H=0
f199cab1
GM
18878 fi
18879
f199cab1 18880
5476a9a4 18881 gl_replace_getopt=
f199cab1 18882
5476a9a4
GM
18883 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
18884 for ac_header in getopt.h
18885do :
18886 ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
18887if test "x$ac_cv_header_getopt_h" = x""yes; then :
18888 cat >>confdefs.h <<_ACEOF
18889#define HAVE_GETOPT_H 1
18890_ACEOF
f199cab1 18891
5476a9a4
GM
18892else
18893 gl_replace_getopt=yes
3e0be4ab 18894fi
3e0be4ab 18895
5476a9a4 18896done
3e0be4ab 18897
5476a9a4 18898 fi
3e0be4ab 18899
5476a9a4
GM
18900 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
18901 for ac_func in getopt_long_only
18902do :
18903 ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only"
18904if test "x$ac_cv_func_getopt_long_only" = x""yes; then :
18905 cat >>confdefs.h <<_ACEOF
18906#define HAVE_GETOPT_LONG_ONLY 1
18907_ACEOF
3e0be4ab 18908
3e0be4ab 18909else
5476a9a4 18910 gl_replace_getopt=yes
3e0be4ab 18911fi
5476a9a4 18912done
3e0be4ab 18913
f199cab1 18914 fi
3e0be4ab 18915
5476a9a4
GM
18916 if test -z "$gl_replace_getopt"; then
18917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5
18918$as_echo_n "checking whether getopt is POSIX compatible... " >&6; }
18919if test "${gl_cv_func_getopt_posix+set}" = set; then :
3e0be4ab 18920 $as_echo_n "(cached) " >&6
5476a9a4
GM
18921else
18922
18923 if test $cross_compiling = no; then
18924 if test "$cross_compiling" = yes; then :
18925 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18926$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18927as_fn_error "cannot run test program while cross compiling
18928See \`config.log' for more details." "$LINENO" 5; }
3e0be4ab 18929else
f199cab1 18930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3e0be4ab 18931/* end confdefs.h. */
5476a9a4
GM
18932
18933#include <unistd.h>
18934#include <stdlib.h>
18935#include <string.h>
18936
f199cab1
GM
18937int
18938main ()
18939{
5476a9a4
GM
18940 static char program[] = "program";
18941 static char a[] = "-a";
18942 static char foo[] = "foo";
18943 static char bar[] = "bar";
18944 char *argv[] = { program, a, foo, bar, NULL };
18945 int c;
18946
18947 c = getopt (4, argv, "ab");
18948 if (!(c == 'a'))
18949 return 1;
18950 c = getopt (4, argv, "ab");
18951 if (!(c == -1))
18952 return 2;
18953 if (!(optind == 2))
18954 return 3;
f199cab1
GM
18955 return 0;
18956}
18957
3e0be4ab 18958_ACEOF
5476a9a4
GM
18959if ac_fn_c_try_run "$LINENO"; then :
18960 gl_cv_func_getopt_posix=maybe
3e0be4ab 18961else
5476a9a4 18962 gl_cv_func_getopt_posix=no
3e0be4ab 18963fi
5476a9a4
GM
18964rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18965 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1
GM
18966fi
18967
5476a9a4
GM
18968 if test $gl_cv_func_getopt_posix = maybe; then
18969 if test "$cross_compiling" = yes; then :
18970 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18971$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18972as_fn_error "cannot run test program while cross compiling
18973See \`config.log' for more details." "$LINENO" 5; }
3e0be4ab 18974else
5476a9a4
GM
18975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18976/* end confdefs.h. */
3e0be4ab 18977
5476a9a4
GM
18978#include <unistd.h>
18979#include <stdlib.h>
18980#include <string.h>
3e0be4ab 18981
5476a9a4
GM
18982int
18983main ()
18984{
18985 static char program[] = "program";
18986 static char donald[] = "donald";
18987 static char p[] = "-p";
18988 static char billy[] = "billy";
18989 static char duck[] = "duck";
18990 static char a[] = "-a";
18991 static char bar[] = "bar";
18992 char *argv[] = { program, donald, p, billy, duck, a, bar, NULL };
18993 int c;
3e0be4ab 18994
5476a9a4
GM
18995 c = getopt (7, argv, "+abp:q:");
18996 if (!(c == -1))
18997 return 4;
18998 if (!(strcmp (argv[0], "program") == 0))
18999 return 5;
19000 if (!(strcmp (argv[1], "donald") == 0))
19001 return 6;
19002 if (!(strcmp (argv[2], "-p") == 0))
19003 return 7;
19004 if (!(strcmp (argv[3], "billy") == 0))
19005 return 8;
19006 if (!(strcmp (argv[4], "duck") == 0))
19007 return 9;
19008 if (!(strcmp (argv[5], "-a") == 0))
19009 return 10;
19010 if (!(strcmp (argv[6], "bar") == 0))
19011 return 11;
19012 if (!(optind == 1))
19013 return 12;
19014 return 0;
19015}
3e0be4ab
GM
19016
19017_ACEOF
5476a9a4
GM
19018if ac_fn_c_try_run "$LINENO"; then :
19019 gl_cv_func_getopt_posix=maybe
19020else
19021 gl_cv_func_getopt_posix=no
19022fi
19023rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19024 conftest.$ac_objext conftest.beam conftest.$ac_ext
19025fi
b0415a03 19026
5476a9a4
GM
19027 fi
19028 if test $gl_cv_func_getopt_posix = maybe; then
19029 if test "$cross_compiling" = yes; then :
19030 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19031$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19032as_fn_error "cannot run test program while cross compiling
19033See \`config.log' for more details." "$LINENO" 5; }
19034else
19035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19036/* end confdefs.h. */
b0415a03 19037
5476a9a4
GM
19038#include <unistd.h>
19039#include <stdlib.h>
19040#include <string.h>
3e0be4ab 19041
5476a9a4
GM
19042int
19043main ()
19044{
19045 static char program[] = "program";
19046 static char ab[] = "-ab";
19047 char *argv[3] = { program, ab, NULL };
19048 if (getopt (2, argv, "ab:") != 'a')
19049 return 13;
19050 if (getopt (2, argv, "ab:") != '?')
19051 return 14;
19052 if (optopt != 'b')
19053 return 15;
19054 if (optind != 2)
19055 return 16;
19056 return 0;
19057}
3e0be4ab 19058
5476a9a4
GM
19059_ACEOF
19060if ac_fn_c_try_run "$LINENO"; then :
19061 gl_cv_func_getopt_posix=yes
19062else
19063 gl_cv_func_getopt_posix=no
19064fi
19065rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19066 conftest.$ac_objext conftest.beam conftest.$ac_ext
3e0be4ab 19067fi
3e0be4ab 19068
5476a9a4
GM
19069 fi
19070 else
19071 case "$host_os" in
19072 darwin* | aix* | mingw*) gl_cv_func_getopt_posix="guessing no";;
19073 *) gl_cv_func_getopt_posix="guessing yes";;
19074 esac
19075 fi
3e0be4ab 19076
5476a9a4
GM
19077fi
19078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5
19079$as_echo "$gl_cv_func_getopt_posix" >&6; }
19080 case "$gl_cv_func_getopt_posix" in
19081 *no) gl_replace_getopt=yes ;;
19082 esac
3e0be4ab
GM
19083 fi
19084
5476a9a4
GM
19085 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
19086 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5
19087$as_echo_n "checking for working GNU getopt function... " >&6; }
19088if test "${gl_cv_func_getopt_gnu+set}" = set; then :
19089 $as_echo_n "(cached) " >&6
19090else
19091 # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the
19092 # optstring is necessary for programs like m4 that have POSIX-mandated
19093 # semantics for supporting options interspersed with files.
19094 # Also, since getopt_long is a GNU extension, we require optind=0.
19095 # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT;
19096 # so take care to revert to the correct (non-)export state.
19097 gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }'
19098 case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in
19099 xx) gl_had_POSIXLY_CORRECT=exported ;;
19100 x) gl_had_POSIXLY_CORRECT=yes ;;
19101 *) gl_had_POSIXLY_CORRECT= ;;
19102 esac
19103 POSIXLY_CORRECT=1
19104 export POSIXLY_CORRECT
19105 if test "$cross_compiling" = yes; then :
19106 gl_cv_func_getopt_gnu="guessing no"
3e0be4ab 19107
5476a9a4
GM
19108else
19109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19110/* end confdefs.h. */
19111#include <getopt.h>
19112 #include <stddef.h>
19113 #include <string.h>
3e0be4ab 19114
5476a9a4
GM
19115#include <stdlib.h>
19116#if defined __MACH__ && defined __APPLE__
19117/* Avoid a crash on Mac OS X. */
19118#include <mach/mach.h>
19119#include <mach/mach_error.h>
19120#include <mach/thread_status.h>
19121#include <mach/exception.h>
19122#include <mach/task.h>
19123#include <pthread.h>
19124/* The exception port on which our thread listens. */
19125static mach_port_t our_exception_port;
19126/* The main function of the thread listening for exceptions of type
19127 EXC_BAD_ACCESS. */
19128static void *
19129mach_exception_thread (void *arg)
19130{
19131 /* Buffer for a message to be received. */
19132 struct {
19133 mach_msg_header_t head;
19134 mach_msg_body_t msgh_body;
19135 char data[1024];
19136 } msg;
19137 mach_msg_return_t retval;
19138 /* Wait for a message on the exception port. */
19139 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
19140 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
19141 if (retval != MACH_MSG_SUCCESS)
19142 abort ();
19143 exit (1);
19144}
19145static void
19146nocrash_init (void)
19147{
19148 mach_port_t self = mach_task_self ();
19149 /* Allocate a port on which the thread shall listen for exceptions. */
19150 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
19151 == KERN_SUCCESS) {
19152 /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
19153 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
19154 MACH_MSG_TYPE_MAKE_SEND)
19155 == KERN_SUCCESS) {
19156 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
19157 for us. */
19158 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
19159 /* Create the thread listening on the exception port. */
19160 pthread_attr_t attr;
19161 pthread_t thread;
19162 if (pthread_attr_init (&attr) == 0
19163 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
19164 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
19165 pthread_attr_destroy (&attr);
19166 /* Replace the exception port info for these exceptions with our own.
19167 Note that we replace the exception port for the entire task, not only
19168 for a particular thread. This has the effect that when our exception
19169 port gets the message, the thread specific exception port has already
19170 been asked, and we don't need to bother about it.
19171 See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
19172 task_set_exception_ports (self, mask, our_exception_port,
19173 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
19174 }
19175 }
19176 }
19177}
19178#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
19179/* Avoid a crash on native Windows. */
19180#define WIN32_LEAN_AND_MEAN
19181#include <windows.h>
19182#include <winerror.h>
19183static LONG WINAPI
19184exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
19185{
19186 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
19187 {
19188 case EXCEPTION_ACCESS_VIOLATION:
19189 case EXCEPTION_IN_PAGE_ERROR:
19190 case EXCEPTION_STACK_OVERFLOW:
19191 case EXCEPTION_GUARD_PAGE:
19192 case EXCEPTION_PRIV_INSTRUCTION:
19193 case EXCEPTION_ILLEGAL_INSTRUCTION:
19194 case EXCEPTION_DATATYPE_MISALIGNMENT:
19195 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
19196 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
19197 exit (1);
19198 }
19199 return EXCEPTION_CONTINUE_SEARCH;
19200}
19201static void
19202nocrash_init (void)
19203{
19204 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
19205}
19206#else
19207/* Avoid a crash on POSIX systems. */
19208#include <signal.h>
19209/* A POSIX signal handler. */
19210static void
19211exception_handler (int sig)
19212{
19213 exit (1);
19214}
19215static void
19216nocrash_init (void)
19217{
19218#ifdef SIGSEGV
19219 signal (SIGSEGV, exception_handler);
19220#endif
19221#ifdef SIGBUS
19222 signal (SIGBUS, exception_handler);
19223#endif
19224}
19225#endif
3e0be4ab 19226
3e0be4ab 19227
5476a9a4
GM
19228int
19229main ()
19230{
3e0be4ab 19231
5476a9a4 19232 int result = 0;
3e0be4ab 19233
5476a9a4 19234 nocrash_init();
3e0be4ab 19235
5476a9a4
GM
19236 /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
19237 and fails on Mac OS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
19238 OSF/1 5.1, Solaris 10. */
19239 {
19240 static char conftest[] = "conftest";
19241 static char plus[] = "-+";
19242 char *argv[3] = { conftest, plus, NULL };
19243 opterr = 0;
19244 if (getopt (2, argv, "+a") != '?')
19245 result |= 1;
19246 }
19247 /* This code succeeds on glibc 2.8, mingw,
19248 and fails on Mac OS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
19249 IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */
19250 {
19251 static char program[] = "program";
19252 static char p[] = "-p";
19253 static char foo[] = "foo";
19254 static char bar[] = "bar";
19255 char *argv[] = { program, p, foo, bar, NULL };
3e0be4ab 19256
5476a9a4
GM
19257 optind = 1;
19258 if (getopt (4, argv, "p::") != 'p')
19259 result |= 2;
19260 else if (optarg != NULL)
19261 result |= 4;
19262 else if (getopt (4, argv, "p::") != -1)
19263 result |= 6;
19264 else if (optind != 2)
19265 result |= 8;
19266 }
19267 /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */
19268 {
19269 static char program[] = "program";
19270 static char foo[] = "foo";
19271 static char p[] = "-p";
19272 char *argv[] = { program, foo, p, NULL };
19273 optind = 0;
19274 if (getopt (3, argv, "-p") != 1)
19275 result |= 16;
19276 else if (getopt (3, argv, "-p") != 'p')
19277 result |= 16;
19278 }
19279 /* This code fails on glibc 2.11. */
19280 {
19281 static char program[] = "program";
19282 static char b[] = "-b";
19283 static char a[] = "-a";
19284 char *argv[] = { program, b, a, NULL };
19285 optind = opterr = 0;
19286 if (getopt (3, argv, "+:a:b") != 'b')
19287 result |= 32;
19288 else if (getopt (3, argv, "+:a:b") != ':')
19289 result |= 32;
19290 }
19291 /* This code dumps core on glibc 2.14. */
19292 {
19293 static char program[] = "program";
19294 static char w[] = "-W";
19295 static char dummy[] = "dummy";
19296 char *argv[] = { program, w, dummy, NULL };
19297 optind = opterr = 1;
19298 if (getopt (3, argv, "W;") != 'W')
19299 result |= 64;
19300 }
19301 return result;
3e0be4ab 19302
5476a9a4
GM
19303 ;
19304 return 0;
19305}
19306_ACEOF
19307if ac_fn_c_try_run "$LINENO"; then :
19308 gl_cv_func_getopt_gnu=yes
19309else
19310 gl_cv_func_getopt_gnu=no
19311fi
19312rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19313 conftest.$ac_objext conftest.beam conftest.$ac_ext
19314fi
3e0be4ab 19315
5476a9a4
GM
19316 case $gl_had_POSIXLY_CORRECT in
19317 exported) ;;
19318 yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;;
19319 *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;;
19320 esac
3e0be4ab 19321
5476a9a4
GM
19322fi
19323{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5
19324$as_echo "$gl_cv_func_getopt_gnu" >&6; }
19325 if test "$gl_cv_func_getopt_gnu" != yes; then
19326 gl_replace_getopt=yes
19327 else
19328 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt_long function" >&5
19329$as_echo_n "checking for working GNU getopt_long function... " >&6; }
19330if test "${gl_cv_func_getopt_long_gnu+set}" = set; then :
f199cab1
GM
19331 $as_echo_n "(cached) " >&6
19332else
5476a9a4
GM
19333 if test "$cross_compiling" = yes; then :
19334 case "$host_os" in
19335 openbsd*) gl_cv_func_getopt_long_gnu="guessing no";;
19336 *) gl_cv_func_getopt_long_gnu="guessing yes";;
19337 esac
3e0be4ab
GM
19338
19339else
19340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19341/* end confdefs.h. */
5476a9a4
GM
19342#include <getopt.h>
19343 #include <stddef.h>
19344 #include <string.h>
f199cab1
GM
19345
19346int
19347main ()
369e19fc 19348{
5476a9a4
GM
19349static const struct option long_options[] =
19350 {
19351 { "xtremely-",no_argument, NULL, 1003 },
19352 { "xtra", no_argument, NULL, 1001 },
19353 { "xtreme", no_argument, NULL, 1002 },
19354 { "xtremely", no_argument, NULL, 1003 },
19355 { NULL, 0, NULL, 0 }
19356 };
19357 /* This code fails on OpenBSD 5.0. */
19358 {
19359 static char program[] = "program";
19360 static char xtremel[] = "--xtremel";
19361 char *argv[] = { program, xtremel, NULL };
19362 int option_index;
19363 optind = 1; opterr = 0;
19364 if (getopt_long (2, argv, "", long_options, &option_index) != 1003)
19365 return 1;
19366 }
19367 return 0;
f199cab1
GM
19368
19369 ;
19370 return 0;
369e19fc 19371}
f199cab1
GM
19372_ACEOF
19373if ac_fn_c_try_run "$LINENO"; then :
5476a9a4 19374 gl_cv_func_getopt_long_gnu=yes
f199cab1 19375else
5476a9a4 19376 gl_cv_func_getopt_long_gnu=no
f199cab1
GM
19377fi
19378rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19379 conftest.$ac_objext conftest.beam conftest.$ac_ext
19380fi
19381
5476a9a4 19382
f199cab1 19383fi
5476a9a4
GM
19384{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_long_gnu" >&5
19385$as_echo "$gl_cv_func_getopt_long_gnu" >&6; }
19386 case "$gl_cv_func_getopt_long_gnu" in
19387 *yes) ;;
19388 *) gl_replace_getopt=yes ;;
19389 esac
19390 fi
19391 fi
f199cab1 19392
f199cab1 19393
f199cab1 19394
369e19fc
PE
19395
19396
5476a9a4
GM
19397
19398 REPLACE_GETOPT=0
19399 if test -n "$gl_replace_getopt"; then
19400 REPLACE_GETOPT=1
f199cab1 19401 fi
3e0be4ab 19402
5476a9a4 19403 if test $REPLACE_GETOPT = 1; then
369e19fc 19404
5476a9a4 19405 GETOPT_H=getopt.h
369e19fc 19406
5476a9a4 19407$as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
6ad6792b
GM
19408
19409
f199cab1 19410
5476a9a4 19411 fi
f199cab1 19412
5476a9a4
GM
19413ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default"
19414if test "x$ac_cv_have_decl_getenv" = x""yes; then :
19415 ac_have_decl=1
3e0be4ab 19416else
5476a9a4 19417 ac_have_decl=0
3e0be4ab 19418fi
e275c824 19419
5476a9a4
GM
19420cat >>confdefs.h <<_ACEOF
19421#define HAVE_DECL_GETENV $ac_have_decl
19422_ACEOF
19423
a6342fc8 19424:
f199cab1 19425
5476a9a4
GM
19426
19427
19428
19429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
19430$as_echo_n "checking for C/C++ restrict keyword... " >&6; }
19431if test "${ac_cv_c_restrict+set}" = set; then :
19432 $as_echo_n "(cached) " >&6
f199cab1 19433else
5476a9a4
GM
19434 ac_cv_c_restrict=no
19435 # The order here caters to the fact that C++ does not require restrict.
19436 for ac_kw in __restrict __restrict__ _Restrict restrict; do
19437 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 19438/* end confdefs.h. */
5476a9a4
GM
19439typedef int * int_ptr;
19440 int foo (int_ptr $ac_kw ip) {
19441 return ip[0];
19442 }
f199cab1
GM
19443int
19444main ()
19445{
5476a9a4
GM
19446int s[1];
19447 int * $ac_kw t = s;
19448 t[0] = 0;
19449 return foo(t)
f199cab1
GM
19450 ;
19451 return 0;
19452}
19453_ACEOF
5476a9a4
GM
19454if ac_fn_c_try_compile "$LINENO"; then :
19455 ac_cv_c_restrict=$ac_kw
f199cab1 19456fi
5476a9a4
GM
19457rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19458 test "$ac_cv_c_restrict" != no && break
19459 done
f199cab1 19460
f199cab1 19461fi
5476a9a4
GM
19462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
19463$as_echo "$ac_cv_c_restrict" >&6; }
f199cab1 19464
5476a9a4
GM
19465 case $ac_cv_c_restrict in
19466 restrict) ;;
19467 no) $as_echo "#define restrict /**/" >>confdefs.h
19468 ;;
19469 *) cat >>confdefs.h <<_ACEOF
19470#define restrict $ac_cv_c_restrict
19471_ACEOF
19472 ;;
19473 esac
f199cab1 19474
f199cab1 19475
5476a9a4
GM
19476 GNULIB_GETTIMEOFDAY=0;
19477 HAVE_GETTIMEOFDAY=1;
19478 HAVE_STRUCT_TIMEVAL=1;
19479 HAVE_SYS_TIME_H=1;
19480 REPLACE_GETTIMEOFDAY=0;
19481 REPLACE_STRUCT_TIMEVAL=0;
e275c824 19482
e275c824 19483
e275c824 19484
e275c824 19485
4fda9c95 19486
5fa4ac76 19487
5fa4ac76 19488
5fa4ac76 19489
f199cab1
GM
19490
19491
19492
5fa4ac76 19493
5fa4ac76 19494
5fa4ac76 19495
5fa4ac76 19496
5fa4ac76 19497
5476a9a4
GM
19498 if test $gl_cv_have_include_next = yes; then
19499 gl_cv_next_sys_time_h='<'sys/time.h'>'
19500 else
19501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
19502$as_echo_n "checking absolute name of <sys/time.h>... " >&6; }
19503if test "${gl_cv_next_sys_time_h+set}" = set; then :
19504 $as_echo_n "(cached) " >&6
19505else
5fa4ac76 19506
5476a9a4 19507 if test $ac_cv_header_sys_time_h = yes; then
5fa4ac76
PE
19508
19509
5476a9a4
GM
19510 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19511/* end confdefs.h. */
19512#include <sys/time.h>
5fa4ac76 19513
5476a9a4
GM
19514_ACEOF
19515 case "$host_os" in
19516 aix*) gl_absname_cpp="$ac_cpp -C" ;;
19517 *) gl_absname_cpp="$ac_cpp" ;;
19518 esac
1f5d53eb 19519
5476a9a4
GM
19520 case "$host_os" in
19521 mingw*)
19522 gl_dirsep_regex='[/\\]'
19523 ;;
19524 *)
19525 gl_dirsep_regex='\/'
19526 ;;
19527 esac
19528 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
1f5d53eb 19529
5476a9a4
GM
19530 gl_header_literal_regex=`echo 'sys/time.h' \
19531 | sed -e "$gl_make_literal_regex_sed"`
19532 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19533 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19534 s|^/[^/]|//&|
19535 p
19536 q
19537 }'
19538 gl_cv_next_sys_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19539 sed -n "$gl_absolute_header_sed"`'"'
19540 else
19541 gl_cv_next_sys_time_h='<'sys/time.h'>'
19542 fi
1f5d53eb 19543
1f5d53eb 19544
5476a9a4
GM
19545fi
19546{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
19547$as_echo "$gl_cv_next_sys_time_h" >&6; }
19548 fi
19549 NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
3e0be4ab 19550
5476a9a4
GM
19551 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19552 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19553 gl_next_as_first_directive='<'sys/time.h'>'
19554 else
19555 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19556 gl_next_as_first_directive=$gl_cv_next_sys_time_h
19557 fi
19558 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
3e0be4ab 19559
e275c824 19560
3e0be4ab 19561
f199cab1
GM
19562
19563
5476a9a4
GM
19564 if test $ac_cv_header_sys_time_h != yes; then
19565 HAVE_SYS_TIME_H=0
19566 fi
f199cab1
GM
19567
19568
19569
19570
19571
5476a9a4
GM
19572 if test $ac_cv_header_sys_socket_h != yes; then
19573 for ac_header in winsock2.h
19574do :
19575 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
19576if test "x$ac_cv_header_winsock2_h" = x""yes; then :
19577 cat >>confdefs.h <<_ACEOF
19578#define HAVE_WINSOCK2_H 1
19579_ACEOF
f199cab1 19580
5476a9a4 19581fi
3e0be4ab 19582
5476a9a4 19583done
3e0be4ab 19584
5476a9a4
GM
19585 fi
19586 if test "$ac_cv_header_winsock2_h" = yes; then
19587 HAVE_WINSOCK2_H=1
19588 UNISTD_H_HAVE_WINSOCK2_H=1
19589 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
19590 else
19591 HAVE_WINSOCK2_H=0
19592 fi
19593
19594
19595 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
19596$as_echo_n "checking for struct timeval... " >&6; }
19597if test "${gl_cv_sys_struct_timeval+set}" = set; then :
19598 $as_echo_n "(cached) " >&6
19599else
19600 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19601/* end confdefs.h. */
19602#if HAVE_SYS_TIME_H
19603 #include <sys/time.h>
19604 #endif
19605 #include <time.h>
19606 #if HAVE_WINSOCK2_H
19607 # include <winsock2.h>
19608 #endif
f199cab1 19609
5476a9a4
GM
19610int
19611main ()
19612{
19613static struct timeval x; x.tv_sec = x.tv_usec;
19614 ;
19615 return 0;
19616}
19617_ACEOF
19618if ac_fn_c_try_compile "$LINENO"; then :
19619 gl_cv_sys_struct_timeval=yes
19620else
19621 gl_cv_sys_struct_timeval=no
f199cab1 19622fi
5476a9a4 19623rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 19624
5476a9a4
GM
19625fi
19626{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
19627$as_echo "$gl_cv_sys_struct_timeval" >&6; }
19628 if test $gl_cv_sys_struct_timeval != yes; then
19629 HAVE_STRUCT_TIMEVAL=0
19630 else
19631 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
19632$as_echo_n "checking for wide-enough struct timeval.tv_sec member... " >&6; }
19633if test "${gl_cv_sys_struct_timeval_tv_sec+set}" = set; then :
19634 $as_echo_n "(cached) " >&6
19635else
19636 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19637/* end confdefs.h. */
19638#if HAVE_SYS_TIME_H
19639 #include <sys/time.h>
19640 #endif
19641 #include <time.h>
19642 #if HAVE_WINSOCK2_H
19643 # include <winsock2.h>
19644 #endif
f199cab1 19645
5476a9a4
GM
19646int
19647main ()
19648{
19649static struct timeval x;
19650 typedef int verify_tv_sec_type[
19651 sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
19652 ];
f199cab1 19653
5476a9a4
GM
19654 ;
19655 return 0;
19656}
19657_ACEOF
19658if ac_fn_c_try_compile "$LINENO"; then :
19659 gl_cv_sys_struct_timeval_tv_sec=yes
19660else
19661 gl_cv_sys_struct_timeval_tv_sec=no
19662fi
19663rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 19664
5476a9a4
GM
19665fi
19666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
19667$as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
19668 if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
19669 REPLACE_STRUCT_TIMEVAL=1
19670 fi
19671 fi
f199cab1 19672
f199cab1
GM
19673
19674
19675
19676
19677
f199cab1 19678
5476a9a4
GM
19679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
19680$as_echo_n "checking for unsigned long long int... " >&6; }
19681if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then :
19682 $as_echo_n "(cached) " >&6
19683else
19684 ac_cv_type_unsigned_long_long_int=yes
19685 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
19686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19687/* end confdefs.h. */
f199cab1 19688
5476a9a4
GM
19689 /* For now, do not test the preprocessor; as of 2007 there are too many
19690 implementations with broken preprocessors. Perhaps this can
19691 be revisited in 2012. In the meantime, code should not expect
19692 #if to work with literals wider than 32 bits. */
19693 /* Test literals. */
19694 long long int ll = 9223372036854775807ll;
19695 long long int nll = -9223372036854775807LL;
19696 unsigned long long int ull = 18446744073709551615ULL;
19697 /* Test constant expressions. */
19698 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
19699 ? 1 : -1)];
19700 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
19701 ? 1 : -1)];
19702 int i = 63;
19703int
19704main ()
19705{
19706/* Test availability of runtime routines for shift and division. */
19707 long long int llmax = 9223372036854775807ll;
19708 unsigned long long int ullmax = 18446744073709551615ull;
19709 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
19710 | (llmax / ll) | (llmax % ll)
19711 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
19712 | (ullmax / ull) | (ullmax % ull));
19713 ;
19714 return 0;
19715}
f199cab1 19716
e275c824 19717_ACEOF
5476a9a4 19718if ac_fn_c_try_link "$LINENO"; then :
3e0be4ab 19719
5476a9a4
GM
19720else
19721 ac_cv_type_unsigned_long_long_int=no
e275c824 19722fi
5476a9a4
GM
19723rm -f core conftest.err conftest.$ac_objext \
19724 conftest$ac_exeext conftest.$ac_ext
19725 fi
19726fi
19727{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
19728$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
19729 if test $ac_cv_type_unsigned_long_long_int = yes; then
e275c824 19730
5476a9a4 19731$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
e275c824 19732
5476a9a4 19733 fi
e275c824
PE
19734
19735
f199cab1 19736
5476a9a4
GM
19737 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
19738$as_echo_n "checking for long long int... " >&6; }
19739if test "${ac_cv_type_long_long_int+set}" = set; then :
19740 $as_echo_n "(cached) " >&6
19741else
19742 ac_cv_type_long_long_int=yes
19743 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
19744 ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
19745 if test $ac_cv_type_long_long_int = yes; then
19746 if test "$cross_compiling" = yes; then :
f199cab1 19747 :
5476a9a4
GM
19748else
19749 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19750/* end confdefs.h. */
19751#include <limits.h>
19752 #ifndef LLONG_MAX
19753 # define HALF \
19754 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
19755 # define LLONG_MAX (HALF - 1 + HALF)
19756 #endif
19757int
19758main ()
19759{
19760long long int n = 1;
19761 int i;
19762 for (i = 0; ; i++)
19763 {
19764 long long int m = n << i;
19765 if (m >> i != n)
19766 return 1;
19767 if (LLONG_MAX / 2 < m)
19768 break;
19769 }
19770 return 0;
19771 ;
19772 return 0;
19773}
19774_ACEOF
19775if ac_fn_c_try_run "$LINENO"; then :
19776
19777else
19778 ac_cv_type_long_long_int=no
19779fi
19780rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19781 conftest.$ac_objext conftest.beam conftest.$ac_ext
19782fi
e275c824 19783
5476a9a4
GM
19784 fi
19785 fi
1f5d53eb 19786fi
5476a9a4
GM
19787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
19788$as_echo "$ac_cv_type_long_long_int" >&6; }
19789 if test $ac_cv_type_long_long_int = yes; then
e275c824 19790
5476a9a4 19791$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
e275c824 19792
5476a9a4 19793 fi
e275c824
PE
19794
19795
e275c824
PE
19796
19797
19798
19799
5476a9a4
GM
19800 gl_cv_c_multiarch=no
19801 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19802/* end confdefs.h. */
19803#ifndef __APPLE_CC__
19804 not a universal capable compiler
19805 #endif
19806 typedef int dummy;
e275c824 19807
5476a9a4
GM
19808_ACEOF
19809if ac_fn_c_try_compile "$LINENO"; then :
e275c824 19810
5476a9a4
GM
19811 arch=
19812 prev=
19813 for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
19814 if test -n "$prev"; then
19815 case $word in
19816 i?86 | x86_64 | ppc | ppc64)
19817 if test -z "$arch" || test "$arch" = "$word"; then
19818 arch="$word"
19819 else
19820 gl_cv_c_multiarch=yes
19821 fi
19822 ;;
19823 esac
19824 prev=
19825 else
19826 if test "x$word" = "x-arch"; then
19827 prev=arch
19828 fi
19829 fi
19830 done
f199cab1 19831
f199cab1 19832fi
5476a9a4
GM
19833rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19834 if test $gl_cv_c_multiarch = yes; then
19835 APPLE_UNIVERSAL_BUILD=1
19836 else
19837 APPLE_UNIVERSAL_BUILD=0
19838 fi
e275c824
PE
19839
19840
67342916 19841
67342916 19842
67342916 19843
5476a9a4
GM
19844 if test $ac_cv_type_long_long_int = yes; then
19845 HAVE_LONG_LONG_INT=1
19846 else
19847 HAVE_LONG_LONG_INT=0
19848 fi
e275c824 19849
e275c824 19850
5476a9a4
GM
19851 if test $ac_cv_type_unsigned_long_long_int = yes; then
19852 HAVE_UNSIGNED_LONG_LONG_INT=1
19853 else
19854 HAVE_UNSIGNED_LONG_LONG_INT=0
19855 fi
e275c824
PE
19856
19857
19858
5476a9a4
GM
19859 if test $ac_cv_header_wchar_h = yes; then
19860 HAVE_WCHAR_H=1
19861 else
19862 HAVE_WCHAR_H=0
19863 fi
e275c824 19864
e275c824 19865
5476a9a4
GM
19866 if test $ac_cv_header_inttypes_h = yes; then
19867 HAVE_INTTYPES_H=1
19868 else
19869 HAVE_INTTYPES_H=0
19870 fi
6c051bab 19871
942f733f 19872
5476a9a4
GM
19873 if test $ac_cv_header_sys_types_h = yes; then
19874 HAVE_SYS_TYPES_H=1
19875 else
19876 HAVE_SYS_TYPES_H=0
19877 fi
4fc2b746 19878
4fc2b746 19879
f199cab1
GM
19880
19881
19882
19883
19884
19885
19886
19887
19888
5476a9a4
GM
19889 if test $gl_cv_have_include_next = yes; then
19890 gl_cv_next_stdint_h='<'stdint.h'>'
19891 else
19892 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
19893$as_echo_n "checking absolute name of <stdint.h>... " >&6; }
19894if test "${gl_cv_next_stdint_h+set}" = set; then :
19895 $as_echo_n "(cached) " >&6
19896else
f199cab1 19897
5476a9a4 19898 if test $ac_cv_header_stdint_h = yes; then
f199cab1
GM
19899
19900
5476a9a4
GM
19901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19902/* end confdefs.h. */
19903#include <stdint.h>
f199cab1 19904
5476a9a4
GM
19905_ACEOF
19906 case "$host_os" in
19907 aix*) gl_absname_cpp="$ac_cpp -C" ;;
19908 *) gl_absname_cpp="$ac_cpp" ;;
19909 esac
f199cab1 19910
5476a9a4
GM
19911 case "$host_os" in
19912 mingw*)
19913 gl_dirsep_regex='[/\\]'
19914 ;;
19915 *)
19916 gl_dirsep_regex='\/'
19917 ;;
19918 esac
19919 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
4fc2b746 19920
5476a9a4
GM
19921 gl_header_literal_regex=`echo 'stdint.h' \
19922 | sed -e "$gl_make_literal_regex_sed"`
19923 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19924 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19925 s|^/[^/]|//&|
19926 p
19927 q
19928 }'
19929 gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19930 sed -n "$gl_absolute_header_sed"`'"'
19931 else
19932 gl_cv_next_stdint_h='<'stdint.h'>'
19933 fi
4fc2b746 19934
4fc2b746 19935
5476a9a4
GM
19936fi
19937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
19938$as_echo "$gl_cv_next_stdint_h" >&6; }
19939 fi
19940 NEXT_STDINT_H=$gl_cv_next_stdint_h
b0415a03 19941
5476a9a4
GM
19942 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19943 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19944 gl_next_as_first_directive='<'stdint.h'>'
19945 else
19946 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19947 gl_next_as_first_directive=$gl_cv_next_stdint_h
19948 fi
19949 NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
b0415a03 19950
4fc2b746 19951
f199cab1 19952
f199cab1 19953
5476a9a4
GM
19954 if test $ac_cv_header_stdint_h = yes; then
19955 HAVE_STDINT_H=1
19956 else
19957 HAVE_STDINT_H=0
19958 fi
f199cab1
GM
19959
19960
5476a9a4
GM
19961 if test $ac_cv_header_stdint_h = yes; then
19962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
19963$as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
19964if test "${gl_cv_header_working_stdint_h+set}" = set; then :
f199cab1
GM
19965 $as_echo_n "(cached) " >&6
19966else
5476a9a4
GM
19967 gl_cv_header_working_stdint_h=no
19968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19969/* end confdefs.h. */
4fc2b746
GM
19970
19971
5476a9a4
GM
19972#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
19973#include <stdint.h>
19974/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
19975#if !(defined WCHAR_MIN && defined WCHAR_MAX)
19976#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
19977#endif
4fc2b746 19978
942f733f 19979
5476a9a4
GM
19980 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19981 included before <wchar.h>. */
19982 #include <stddef.h>
19983 #include <signal.h>
19984 #if HAVE_WCHAR_H
19985 # include <stdio.h>
19986 # include <time.h>
19987 # include <wchar.h>
19988 #endif
e275c824 19989
f199cab1 19990
5476a9a4
GM
19991#ifdef INT8_MAX
19992int8_t a1 = INT8_MAX;
19993int8_t a1min = INT8_MIN;
19994#endif
19995#ifdef INT16_MAX
19996int16_t a2 = INT16_MAX;
19997int16_t a2min = INT16_MIN;
19998#endif
19999#ifdef INT32_MAX
20000int32_t a3 = INT32_MAX;
20001int32_t a3min = INT32_MIN;
20002#endif
20003#ifdef INT64_MAX
20004int64_t a4 = INT64_MAX;
20005int64_t a4min = INT64_MIN;
20006#endif
20007#ifdef UINT8_MAX
20008uint8_t b1 = UINT8_MAX;
20009#else
20010typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
20011#endif
20012#ifdef UINT16_MAX
20013uint16_t b2 = UINT16_MAX;
20014#endif
20015#ifdef UINT32_MAX
20016uint32_t b3 = UINT32_MAX;
20017#endif
20018#ifdef UINT64_MAX
20019uint64_t b4 = UINT64_MAX;
20020#endif
20021int_least8_t c1 = INT8_C (0x7f);
20022int_least8_t c1max = INT_LEAST8_MAX;
20023int_least8_t c1min = INT_LEAST8_MIN;
20024int_least16_t c2 = INT16_C (0x7fff);
20025int_least16_t c2max = INT_LEAST16_MAX;
20026int_least16_t c2min = INT_LEAST16_MIN;
20027int_least32_t c3 = INT32_C (0x7fffffff);
20028int_least32_t c3max = INT_LEAST32_MAX;
20029int_least32_t c3min = INT_LEAST32_MIN;
20030int_least64_t c4 = INT64_C (0x7fffffffffffffff);
20031int_least64_t c4max = INT_LEAST64_MAX;
20032int_least64_t c4min = INT_LEAST64_MIN;
20033uint_least8_t d1 = UINT8_C (0xff);
20034uint_least8_t d1max = UINT_LEAST8_MAX;
20035uint_least16_t d2 = UINT16_C (0xffff);
20036uint_least16_t d2max = UINT_LEAST16_MAX;
20037uint_least32_t d3 = UINT32_C (0xffffffff);
20038uint_least32_t d3max = UINT_LEAST32_MAX;
20039uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
20040uint_least64_t d4max = UINT_LEAST64_MAX;
20041int_fast8_t e1 = INT_FAST8_MAX;
20042int_fast8_t e1min = INT_FAST8_MIN;
20043int_fast16_t e2 = INT_FAST16_MAX;
20044int_fast16_t e2min = INT_FAST16_MIN;
20045int_fast32_t e3 = INT_FAST32_MAX;
20046int_fast32_t e3min = INT_FAST32_MIN;
20047int_fast64_t e4 = INT_FAST64_MAX;
20048int_fast64_t e4min = INT_FAST64_MIN;
20049uint_fast8_t f1 = UINT_FAST8_MAX;
20050uint_fast16_t f2 = UINT_FAST16_MAX;
20051uint_fast32_t f3 = UINT_FAST32_MAX;
20052uint_fast64_t f4 = UINT_FAST64_MAX;
20053#ifdef INTPTR_MAX
20054intptr_t g = INTPTR_MAX;
20055intptr_t gmin = INTPTR_MIN;
20056#endif
20057#ifdef UINTPTR_MAX
20058uintptr_t h = UINTPTR_MAX;
20059#endif
20060intmax_t i = INTMAX_MAX;
20061uintmax_t j = UINTMAX_MAX;
5fa4ac76 20062
5476a9a4
GM
20063#include <limits.h> /* for CHAR_BIT */
20064#define TYPE_MINIMUM(t) \
20065 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
20066#define TYPE_MAXIMUM(t) \
20067 ((t) ((t) 0 < (t) -1 \
20068 ? (t) -1 \
20069 : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
20070struct s {
20071 int check_PTRDIFF:
20072 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
20073 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
20074 ? 1 : -1;
20075 /* Detect bug in FreeBSD 6.0 / ia64. */
20076 int check_SIG_ATOMIC:
20077 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
20078 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
20079 ? 1 : -1;
20080 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
20081 int check_WCHAR:
20082 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
20083 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
20084 ? 1 : -1;
20085 /* Detect bug in mingw. */
20086 int check_WINT:
20087 WINT_MIN == TYPE_MINIMUM (wint_t)
20088 && WINT_MAX == TYPE_MAXIMUM (wint_t)
20089 ? 1 : -1;
5fa4ac76 20090
5476a9a4
GM
20091 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
20092 int check_UINT8_C:
20093 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
20094 int check_UINT16_C:
20095 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
20096
20097 /* Detect bugs in OpenBSD 3.9 stdint.h. */
20098#ifdef UINT8_MAX
20099 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
3e0be4ab 20100#endif
5476a9a4
GM
20101#ifdef UINT16_MAX
20102 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
20103#endif
20104#ifdef UINT32_MAX
20105 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
20106#endif
20107#ifdef UINT64_MAX
20108 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
20109#endif
20110 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
20111 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
20112 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
20113 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
20114 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
20115 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
20116 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
20117 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
20118 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
20119 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
20120 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
20121};
20122
f199cab1
GM
20123int
20124main ()
20125{
5476a9a4 20126
f199cab1
GM
20127 ;
20128 return 0;
20129}
20130_ACEOF
5476a9a4
GM
20131if ac_fn_c_try_compile "$LINENO"; then :
20132 if test "$cross_compiling" = yes; then :
20133 gl_cv_header_working_stdint_h=yes
40e27e7f 20134
5476a9a4
GM
20135else
20136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20137/* end confdefs.h. */
40e27e7f 20138
f199cab1 20139
5476a9a4
GM
20140#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
20141#include <stdint.h>
f199cab1
GM
20142
20143
5476a9a4
GM
20144 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20145 included before <wchar.h>. */
20146 #include <stddef.h>
20147 #include <signal.h>
20148 #if HAVE_WCHAR_H
20149 # include <stdio.h>
20150 # include <time.h>
20151 # include <wchar.h>
20152 #endif
f199cab1 20153
d87ffdb7 20154
5476a9a4
GM
20155#include <stdio.h>
20156#include <string.h>
20157#define MVAL(macro) MVAL1(macro)
20158#define MVAL1(expression) #expression
20159static const char *macro_values[] =
20160 {
20161#ifdef INT8_MAX
20162 MVAL (INT8_MAX),
20163#endif
20164#ifdef INT16_MAX
20165 MVAL (INT16_MAX),
20166#endif
20167#ifdef INT32_MAX
20168 MVAL (INT32_MAX),
20169#endif
20170#ifdef INT64_MAX
20171 MVAL (INT64_MAX),
20172#endif
20173#ifdef UINT8_MAX
20174 MVAL (UINT8_MAX),
20175#endif
20176#ifdef UINT16_MAX
20177 MVAL (UINT16_MAX),
20178#endif
20179#ifdef UINT32_MAX
20180 MVAL (UINT32_MAX),
20181#endif
20182#ifdef UINT64_MAX
20183 MVAL (UINT64_MAX),
20184#endif
20185 NULL
20186 };
f199cab1 20187
3e0be4ab
GM
20188int
20189main ()
20190{
5476a9a4
GM
20191
20192 const char **mv;
20193 for (mv = macro_values; *mv != NULL; mv++)
20194 {
20195 const char *value = *mv;
20196 /* Test whether it looks like a cast expression. */
20197 if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
20198 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
20199 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
20200 || strncmp (value, "((int)"/*)*/, 6) == 0
20201 || strncmp (value, "((signed short)"/*)*/, 15) == 0
20202 || strncmp (value, "((signed char)"/*)*/, 14) == 0)
20203 return mv - macro_values + 1;
20204 }
3e0be4ab 20205 return 0;
5476a9a4 20206
f199cab1
GM
20207 ;
20208 return 0;
20209}
20210_ACEOF
5476a9a4
GM
20211if ac_fn_c_try_run "$LINENO"; then :
20212 gl_cv_header_working_stdint_h=yes
f199cab1 20213fi
5476a9a4
GM
20214rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20215 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1
GM
20216fi
20217
d87ffdb7 20218
5476a9a4
GM
20219fi
20220rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d87ffdb7 20221
5476a9a4
GM
20222fi
20223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
20224$as_echo "$gl_cv_header_working_stdint_h" >&6; }
20225 fi
20226 if test "$gl_cv_header_working_stdint_h" = yes; then
20227 STDINT_H=
20228 else
20229 for ac_header in sys/inttypes.h sys/bitypes.h
20230do :
20231 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
20232ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
20233eval as_val=\$$as_ac_Header
20234 if test "x$as_val" = x""yes; then :
20235 cat >>confdefs.h <<_ACEOF
20236#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
20237_ACEOF
d87ffdb7 20238
5476a9a4 20239fi
d87ffdb7 20240
5476a9a4 20241done
7d2a1c5e 20242
5476a9a4
GM
20243 if test $ac_cv_header_sys_inttypes_h = yes; then
20244 HAVE_SYS_INTTYPES_H=1
20245 else
20246 HAVE_SYS_INTTYPES_H=0
20247 fi
7d2a1c5e 20248
5476a9a4
GM
20249 if test $ac_cv_header_sys_bitypes_h = yes; then
20250 HAVE_SYS_BITYPES_H=1
20251 else
20252 HAVE_SYS_BITYPES_H=0
20253 fi
7d2a1c5e 20254
f199cab1
GM
20255
20256
20257
5476a9a4 20258 if test $APPLE_UNIVERSAL_BUILD = 0; then
f199cab1
GM
20259
20260
5476a9a4
GM
20261 for gltype in ptrdiff_t size_t ; do
20262 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
20263$as_echo_n "checking for bit size of $gltype... " >&6; }
20264if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
20265 $as_echo_n "(cached) " >&6
20266else
20267 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
20268 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20269 included before <wchar.h>. */
20270 #include <stddef.h>
20271 #include <signal.h>
20272 #if HAVE_WCHAR_H
20273 # include <stdio.h>
20274 # include <time.h>
20275 # include <wchar.h>
20276 #endif
f199cab1 20277
5476a9a4 20278#include <limits.h>"; then :
f199cab1 20279
5476a9a4
GM
20280else
20281 result=unknown
20282fi
f199cab1 20283
5476a9a4 20284 eval gl_cv_bitsizeof_${gltype}=\$result
f199cab1 20285
5476a9a4
GM
20286fi
20287eval ac_res=\$gl_cv_bitsizeof_${gltype}
20288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20289$as_echo "$ac_res" >&6; }
20290 eval result=\$gl_cv_bitsizeof_${gltype}
20291 if test $result = unknown; then
20292 result=0
20293 fi
20294 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
20295 cat >>confdefs.h <<_ACEOF
20296#define BITSIZEOF_${GLTYPE} $result
20297_ACEOF
f199cab1 20298
5476a9a4
GM
20299 eval BITSIZEOF_${GLTYPE}=\$result
20300 done
f199cab1
GM
20301
20302
5476a9a4 20303 fi
f199cab1
GM
20304
20305
5476a9a4
GM
20306 for gltype in sig_atomic_t wchar_t wint_t ; do
20307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
20308$as_echo_n "checking for bit size of $gltype... " >&6; }
20309if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
20310 $as_echo_n "(cached) " >&6
20311else
20312 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
20313 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20314 included before <wchar.h>. */
20315 #include <stddef.h>
20316 #include <signal.h>
20317 #if HAVE_WCHAR_H
20318 # include <stdio.h>
20319 # include <time.h>
20320 # include <wchar.h>
20321 #endif
f199cab1 20322
5476a9a4 20323#include <limits.h>"; then :
f199cab1 20324
f199cab1 20325else
5476a9a4 20326 result=unknown
7d2a1c5e 20327fi
7d2a1c5e 20328
5476a9a4 20329 eval gl_cv_bitsizeof_${gltype}=\$result
7d2a1c5e 20330
3e0be4ab 20331fi
5476a9a4
GM
20332eval ac_res=\$gl_cv_bitsizeof_${gltype}
20333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20334$as_echo "$ac_res" >&6; }
20335 eval result=\$gl_cv_bitsizeof_${gltype}
20336 if test $result = unknown; then
20337 result=0
20338 fi
20339 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
20340 cat >>confdefs.h <<_ACEOF
20341#define BITSIZEOF_${GLTYPE} $result
3e0be4ab 20342_ACEOF
7d2a1c5e 20343
5476a9a4
GM
20344 eval BITSIZEOF_${GLTYPE}=\$result
20345 done
7d2a1c5e
GM
20346
20347
5476a9a4
GM
20348
20349
20350 for gltype in sig_atomic_t wchar_t wint_t ; do
20351 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
20352$as_echo_n "checking whether $gltype is signed... " >&6; }
20353if { as_var=gl_cv_type_${gltype}_signed; eval "test \"\${$as_var+set}\" = set"; }; then :
3e0be4ab
GM
20354 $as_echo_n "(cached) " >&6
20355else
f199cab1
GM
20356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20357/* end confdefs.h. */
f199cab1 20358
5476a9a4
GM
20359 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20360 included before <wchar.h>. */
20361 #include <stddef.h>
20362 #include <signal.h>
20363 #if HAVE_WCHAR_H
20364 # include <stdio.h>
20365 # include <time.h>
20366 # include <wchar.h>
20367 #endif
20368
20369 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
f199cab1
GM
20370int
20371main ()
20372{
5476a9a4 20373
f199cab1
GM
20374 ;
20375 return 0;
20376}
20377_ACEOF
20378if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4 20379 result=yes
f199cab1 20380else
5476a9a4 20381 result=no
f199cab1
GM
20382fi
20383rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5476a9a4 20384 eval gl_cv_type_${gltype}_signed=\$result
7d2a1c5e 20385
3e0be4ab 20386fi
5476a9a4
GM
20387eval ac_res=\$gl_cv_type_${gltype}_signed
20388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20389$as_echo "$ac_res" >&6; }
20390 eval result=\$gl_cv_type_${gltype}_signed
20391 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
20392 if test "$result" = yes; then
20393 cat >>confdefs.h <<_ACEOF
20394#define HAVE_SIGNED_${GLTYPE} 1
f199cab1 20395_ACEOF
d87ffdb7 20396
5476a9a4
GM
20397 eval HAVE_SIGNED_${GLTYPE}=1
20398 else
20399 eval HAVE_SIGNED_${GLTYPE}=0
20400 fi
20401 done
f199cab1 20402
e275c824 20403
5476a9a4
GM
20404 gl_cv_type_ptrdiff_t_signed=yes
20405 gl_cv_type_size_t_signed=no
20406 if test $APPLE_UNIVERSAL_BUILD = 0; then
e275c824 20407
e275c824 20408
5476a9a4
GM
20409 for gltype in ptrdiff_t size_t ; do
20410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
20411$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
20412if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
16c3e636
PE
20413 $as_echo_n "(cached) " >&6
20414else
5476a9a4
GM
20415 eval gl_cv_type_${gltype}_suffix=no
20416 eval result=\$gl_cv_type_${gltype}_signed
20417 if test "$result" = yes; then
20418 glsufu=
20419 else
20420 glsufu=u
20421 fi
20422 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
20423 case $glsuf in
20424 '') gltype1='int';;
20425 l) gltype1='long int';;
20426 ll) gltype1='long long int';;
20427 i64) gltype1='__int64';;
20428 u) gltype1='unsigned int';;
20429 ul) gltype1='unsigned long int';;
20430 ull) gltype1='unsigned long long int';;
20431 ui64)gltype1='unsigned __int64';;
20432 esac
20433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 20434/* end confdefs.h. */
16c3e636 20435
5476a9a4
GM
20436 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20437 included before <wchar.h>. */
20438 #include <stddef.h>
20439 #include <signal.h>
20440 #if HAVE_WCHAR_H
20441 # include <stdio.h>
20442 # include <time.h>
20443 # include <wchar.h>
20444 #endif
1f5d53eb 20445
5476a9a4
GM
20446 extern $gltype foo;
20447 extern $gltype1 foo;
f199cab1
GM
20448int
20449main ()
20450{
5476a9a4 20451
f199cab1
GM
20452 ;
20453 return 0;
20454}
20455_ACEOF
20456if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4 20457 eval gl_cv_type_${gltype}_suffix=\$glsuf
f199cab1
GM
20458fi
20459rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5476a9a4
GM
20460 eval result=\$gl_cv_type_${gltype}_suffix
20461 test "$result" != no && break
20462 done
f199cab1 20463fi
5476a9a4
GM
20464eval ac_res=\$gl_cv_type_${gltype}_suffix
20465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20466$as_echo "$ac_res" >&6; }
20467 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
20468 eval result=\$gl_cv_type_${gltype}_suffix
20469 test "$result" = no && result=
20470 eval ${GLTYPE}_SUFFIX=\$result
20471 cat >>confdefs.h <<_ACEOF
20472#define ${GLTYPE}_SUFFIX $result
20473_ACEOF
16c3e636 20474
5476a9a4 20475 done
16c3e636 20476
3e0be4ab 20477
5476a9a4
GM
20478 fi
20479
20480
20481 for gltype in sig_atomic_t wchar_t wint_t ; do
20482 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
20483$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
20484if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
1fd182f0
PE
20485 $as_echo_n "(cached) " >&6
20486else
5476a9a4
GM
20487 eval gl_cv_type_${gltype}_suffix=no
20488 eval result=\$gl_cv_type_${gltype}_signed
20489 if test "$result" = yes; then
20490 glsufu=
20491 else
20492 glsufu=u
20493 fi
20494 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
20495 case $glsuf in
20496 '') gltype1='int';;
20497 l) gltype1='long int';;
20498 ll) gltype1='long long int';;
20499 i64) gltype1='__int64';;
20500 u) gltype1='unsigned int';;
20501 ul) gltype1='unsigned long int';;
20502 ull) gltype1='unsigned long long int';;
20503 ui64)gltype1='unsigned __int64';;
20504 esac
20505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1fd182f0 20506/* end confdefs.h. */
5476a9a4
GM
20507
20508 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20509 included before <wchar.h>. */
20510 #include <stddef.h>
20511 #include <signal.h>
20512 #if HAVE_WCHAR_H
20513 # include <stdio.h>
20514 # include <time.h>
20515 # include <wchar.h>
20516 #endif
20517
20518 extern $gltype foo;
20519 extern $gltype1 foo;
1fd182f0
PE
20520int
20521main ()
20522{
5476a9a4 20523
1fd182f0
PE
20524 ;
20525 return 0;
20526}
20527_ACEOF
3e0be4ab 20528if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4 20529 eval gl_cv_type_${gltype}_suffix=\$glsuf
1f5d53eb 20530fi
3e0be4ab 20531rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5476a9a4
GM
20532 eval result=\$gl_cv_type_${gltype}_suffix
20533 test "$result" != no && break
20534 done
f199cab1 20535fi
5476a9a4
GM
20536eval ac_res=\$gl_cv_type_${gltype}_suffix
20537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20538$as_echo "$ac_res" >&6; }
20539 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
20540 eval result=\$gl_cv_type_${gltype}_suffix
20541 test "$result" = no && result=
20542 eval ${GLTYPE}_SUFFIX=\$result
20543 cat >>confdefs.h <<_ACEOF
20544#define ${GLTYPE}_SUFFIX $result
f199cab1
GM
20545_ACEOF
20546
5476a9a4 20547 done
f199cab1 20548
f199cab1 20549
f199cab1 20550
5476a9a4
GM
20551 if test $BITSIZEOF_WINT_T -lt 32; then
20552 BITSIZEOF_WINT_T=32
20553 fi
f199cab1 20554
5476a9a4
GM
20555 STDINT_H=stdint.h
20556 fi
f199cab1 20557
5476a9a4
GM
20558 if test -n "$STDINT_H"; then
20559 GL_GENERATE_STDINT_H_TRUE=
20560 GL_GENERATE_STDINT_H_FALSE='#'
20561else
20562 GL_GENERATE_STDINT_H_TRUE='#'
20563 GL_GENERATE_STDINT_H_FALSE=
f199cab1
GM
20564fi
20565
f199cab1 20566
f199cab1 20567
3e0be4ab 20568
f199cab1 20569
5476a9a4
GM
20570 GNULIB_IMAXABS=0;
20571 GNULIB_IMAXDIV=0;
20572 GNULIB_STRTOIMAX=0;
20573 GNULIB_STRTOUMAX=0;
20574 HAVE_DECL_IMAXABS=1;
20575 HAVE_DECL_IMAXDIV=1;
20576 HAVE_DECL_STRTOIMAX=1;
20577 HAVE_DECL_STRTOUMAX=1;
20578 REPLACE_STRTOIMAX=0;
20579 INT32_MAX_LT_INTMAX_MAX=1;
20580 INT64_MAX_EQ_LONG_MAX='defined _LP64';
20581 PRI_MACROS_BROKEN=0;
20582 PRIPTR_PREFIX=__PRIPTR_PREFIX;
20583 UINT32_MAX_LT_UINTMAX_MAX=1;
20584 UINT64_MAX_EQ_ULONG_MAX='defined _LP64';
1fd182f0 20585
1fd182f0 20586
1f5d53eb 20587
3e0be4ab
GM
20588
20589
1fd182f0 20590
3e0be4ab 20591
3e0be4ab 20592
f199cab1 20593
1fd182f0 20594
1f5d53eb 20595
1f5d53eb 20596
1f5d53eb 20597
3e0be4ab 20598
3e0be4ab 20599
5476a9a4
GM
20600 if test $gl_cv_have_include_next = yes; then
20601 gl_cv_next_inttypes_h='<'inttypes.h'>'
20602 else
20603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
20604$as_echo_n "checking absolute name of <inttypes.h>... " >&6; }
20605if test "${gl_cv_next_inttypes_h+set}" = set; then :
20606 $as_echo_n "(cached) " >&6
f199cab1 20607else
2b1928b8 20608
5476a9a4 20609 if test $ac_cv_header_inttypes_h = yes; then
3e0be4ab
GM
20610
20611
5476a9a4 20612 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 20613/* end confdefs.h. */
5476a9a4 20614#include <inttypes.h>
3e0be4ab 20615
f199cab1 20616_ACEOF
5476a9a4
GM
20617 case "$host_os" in
20618 aix*) gl_absname_cpp="$ac_cpp -C" ;;
20619 *) gl_absname_cpp="$ac_cpp" ;;
20620 esac
1fd182f0 20621
5476a9a4
GM
20622 case "$host_os" in
20623 mingw*)
20624 gl_dirsep_regex='[/\\]'
20625 ;;
20626 *)
20627 gl_dirsep_regex='\/'
20628 ;;
20629 esac
20630 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
1fd182f0 20631
5476a9a4
GM
20632 gl_header_literal_regex=`echo 'inttypes.h' \
20633 | sed -e "$gl_make_literal_regex_sed"`
20634 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20635 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20636 s|^/[^/]|//&|
20637 p
20638 q
20639 }'
20640 gl_cv_next_inttypes_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20641 sed -n "$gl_absolute_header_sed"`'"'
20642 else
20643 gl_cv_next_inttypes_h='<'inttypes.h'>'
20644 fi
1fd182f0
PE
20645
20646
5476a9a4
GM
20647fi
20648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
20649$as_echo "$gl_cv_next_inttypes_h" >&6; }
20650 fi
20651 NEXT_INTTYPES_H=$gl_cv_next_inttypes_h
1fd182f0 20652
5476a9a4
GM
20653 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20654 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20655 gl_next_as_first_directive='<'inttypes.h'>'
20656 else
20657 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20658 gl_next_as_first_directive=$gl_cv_next_inttypes_h
20659 fi
20660 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
34119902
GM
20661
20662
3e0be4ab 20663
34119902 20664
3e0be4ab 20665
34119902 20666
b0415a03 20667
b0415a03 20668
3e0be4ab 20669
34119902 20670
34119902 20671
5476a9a4
GM
20672 case "$host_os" in
20673 mingw*)
20674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
20675$as_echo_n "checking for 64-bit off_t... " >&6; }
20676if test "${gl_cv_type_off_t_64+set}" = set; then :
f199cab1
GM
20677 $as_echo_n "(cached) " >&6
20678else
5476a9a4
GM
20679 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20680/* end confdefs.h. */
20681#include <sys/types.h>
20682 int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
20683
20684int
20685main ()
20686{
20687
20688 ;
20689 return 0;
20690}
f199cab1 20691_ACEOF
5476a9a4
GM
20692if ac_fn_c_try_compile "$LINENO"; then :
20693 gl_cv_type_off_t_64=yes
20694else
20695 gl_cv_type_off_t_64=no
f199cab1 20696fi
5476a9a4 20697rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34119902 20698
5476a9a4
GM
20699fi
20700{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
20701$as_echo "$gl_cv_type_off_t_64" >&6; }
20702 if test $gl_cv_type_off_t_64 = no; then
20703 WINDOWS_64_BIT_OFF_T=1
20704 else
20705 WINDOWS_64_BIT_OFF_T=0
20706 fi
20707 WINDOWS_64_BIT_ST_SIZE=1
20708 ;;
20709 *)
20710 WINDOWS_64_BIT_OFF_T=0
20711 WINDOWS_64_BIT_ST_SIZE=0
20712 ;;
20713 esac
34119902
GM
20714
20715
34119902
GM
20716
20717
283c7aed
GM
20718 GNULIB_FFSL=0;
20719 GNULIB_FFSLL=0;
20720 GNULIB_MEMCHR=0;
20721 GNULIB_MEMMEM=0;
20722 GNULIB_MEMPCPY=0;
20723 GNULIB_MEMRCHR=0;
20724 GNULIB_RAWMEMCHR=0;
20725 GNULIB_STPCPY=0;
20726 GNULIB_STPNCPY=0;
20727 GNULIB_STRCHRNUL=0;
20728 GNULIB_STRDUP=0;
20729 GNULIB_STRNCAT=0;
20730 GNULIB_STRNDUP=0;
20731 GNULIB_STRNLEN=0;
20732 GNULIB_STRPBRK=0;
20733 GNULIB_STRSEP=0;
20734 GNULIB_STRSTR=0;
20735 GNULIB_STRCASESTR=0;
20736 GNULIB_STRTOK_R=0;
20737 GNULIB_MBSLEN=0;
20738 GNULIB_MBSNLEN=0;
20739 GNULIB_MBSCHR=0;
20740 GNULIB_MBSRCHR=0;
20741 GNULIB_MBSSTR=0;
20742 GNULIB_MBSCASECMP=0;
20743 GNULIB_MBSNCASECMP=0;
20744 GNULIB_MBSPCASECMP=0;
20745 GNULIB_MBSCASESTR=0;
20746 GNULIB_MBSCSPN=0;
20747 GNULIB_MBSPBRK=0;
20748 GNULIB_MBSSPN=0;
20749 GNULIB_MBSSEP=0;
20750 GNULIB_MBSTOK_R=0;
20751 GNULIB_STRERROR=0;
20752 GNULIB_STRERROR_R=0;
20753 GNULIB_STRSIGNAL=0;
20754 GNULIB_STRVERSCMP=0;
20755 HAVE_MBSLEN=0;
20756 HAVE_FFSL=1;
20757 HAVE_FFSLL=1;
20758 HAVE_MEMCHR=1;
20759 HAVE_DECL_MEMMEM=1;
20760 HAVE_MEMPCPY=1;
20761 HAVE_DECL_MEMRCHR=1;
20762 HAVE_RAWMEMCHR=1;
20763 HAVE_STPCPY=1;
20764 HAVE_STPNCPY=1;
20765 HAVE_STRCHRNUL=1;
20766 HAVE_DECL_STRDUP=1;
20767 HAVE_DECL_STRNDUP=1;
20768 HAVE_DECL_STRNLEN=1;
20769 HAVE_STRPBRK=1;
20770 HAVE_STRSEP=1;
20771 HAVE_STRCASESTR=1;
20772 HAVE_DECL_STRTOK_R=1;
20773 HAVE_DECL_STRERROR_R=1;
20774 HAVE_DECL_STRSIGNAL=1;
20775 HAVE_STRVERSCMP=1;
20776 REPLACE_MEMCHR=0;
20777 REPLACE_MEMMEM=0;
20778 REPLACE_STPNCPY=0;
20779 REPLACE_STRDUP=0;
20780 REPLACE_STRSTR=0;
20781 REPLACE_STRCASESTR=0;
20782 REPLACE_STRCHRNUL=0;
20783 REPLACE_STRERROR=0;
20784 REPLACE_STRERROR_R=0;
20785 REPLACE_STRNCAT=0;
20786 REPLACE_STRNDUP=0;
20787 REPLACE_STRNLEN=0;
20788 REPLACE_STRSIGNAL=0;
20789 REPLACE_STRTOK_R=0;
20790 UNDEFINE_STRTOK_R=0;
20791
20792ac_fn_c_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default"
20793if test "x$ac_cv_have_decl_memrchr" = x""yes; then :
20794 ac_have_decl=1
20795else
20796 ac_have_decl=0
20797fi
20798
20799cat >>confdefs.h <<_ACEOF
20800#define HAVE_DECL_MEMRCHR $ac_have_decl
20801_ACEOF
20802
20803
5476a9a4
GM
20804 GNULIB_MKTIME=0;
20805 GNULIB_NANOSLEEP=0;
20806 GNULIB_STRPTIME=0;
20807 GNULIB_TIMEGM=0;
20808 GNULIB_TIME_R=0;
20809 HAVE_DECL_LOCALTIME_R=1;
20810 HAVE_NANOSLEEP=1;
20811 HAVE_STRPTIME=1;
20812 HAVE_TIMEGM=1;
20813 REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
20814 REPLACE_MKTIME=GNULIB_PORTCHECK;
20815 REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
20816 REPLACE_TIMEGM=GNULIB_PORTCHECK;
34119902 20817
2393bc74
GM
20818ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default"
20819if test "x$ac_cv_have_decl_alarm" = x""yes; then :
20820 ac_have_decl=1
20821else
20822 ac_have_decl=0
20823fi
3e0be4ab 20824
2393bc74
GM
20825cat >>confdefs.h <<_ACEOF
20826#define HAVE_DECL_ALARM $ac_have_decl
20827_ACEOF
3e0be4ab
GM
20828
20829
5476a9a4
GM
20830 GNULIB_PSELECT=0;
20831 GNULIB_SELECT=0;
20832 HAVE_PSELECT=1;
20833 REPLACE_PSELECT=0;
20834 REPLACE_SELECT=0;
20835
20836
3e0be4ab 20837
5476a9a4
GM
20838
20839
20840
20841 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/select.h> is self-contained" >&5
20842$as_echo_n "checking whether <sys/select.h> is self-contained... " >&6; }
20843if test "${gl_cv_header_sys_select_h_selfcontained+set}" = set; then :
f199cab1 20844 $as_echo_n "(cached) " >&6
3e0be4ab 20845else
5476a9a4
GM
20846
20847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3e0be4ab 20848/* end confdefs.h. */
5476a9a4 20849#include <sys/select.h>
3e0be4ab
GM
20850int
20851main ()
20852{
5476a9a4 20853struct timeval b;
3e0be4ab
GM
20854 ;
20855 return 0;
20856}
34119902 20857_ACEOF
f199cab1 20858if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4 20859 gl_cv_header_sys_select_h_selfcontained=yes
3e0be4ab 20860else
5476a9a4 20861 gl_cv_header_sys_select_h_selfcontained=no
3e0be4ab 20862fi
f199cab1 20863rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5476a9a4
GM
20864 if test $gl_cv_header_sys_select_h_selfcontained = yes; then
20865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20866/* end confdefs.h. */
20867#include <sys/select.h>
20868int
20869main ()
20870{
20871int memset; int bzero;
20872 ;
20873 return 0;
20874}
3e0be4ab 20875
5476a9a4
GM
20876_ACEOF
20877if ac_fn_c_try_compile "$LINENO"; then :
f199cab1
GM
20878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20879/* end confdefs.h. */
5476a9a4 20880#include <sys/select.h>
f199cab1
GM
20881int
20882main ()
20883{
5476a9a4
GM
20884
20885 #undef memset
20886 #define memset nonexistent_memset
20887 extern
20888 #ifdef __cplusplus
20889 "C"
20890 #endif
20891 void *memset (void *, int, unsigned long);
20892 #undef bzero
20893 #define bzero nonexistent_bzero
20894 extern
20895 #ifdef __cplusplus
20896 "C"
20897 #endif
20898 void bzero (void *, unsigned long);
20899 fd_set fds;
20900 FD_ZERO (&fds);
20901
f199cab1
GM
20902 ;
20903 return 0;
20904}
5476a9a4 20905
f199cab1 20906_ACEOF
5476a9a4
GM
20907if ac_fn_c_try_link "$LINENO"; then :
20908
f199cab1 20909else
5476a9a4 20910 gl_cv_header_sys_select_h_selfcontained=no
f199cab1 20911fi
5476a9a4
GM
20912rm -f core conftest.err conftest.$ac_objext \
20913 conftest$ac_exeext conftest.$ac_ext
1fd182f0 20914
f199cab1 20915fi
5476a9a4
GM
20916rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20917 fi
1fd182f0 20918
f199cab1 20919fi
5476a9a4
GM
20920{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_select_h_selfcontained" >&5
20921$as_echo "$gl_cv_header_sys_select_h_selfcontained" >&6; }
1fd182f0
PE
20922
20923
b06b1098 20924
0eb775a3
GM
20925
20926
b06b1098 20927
1fd182f0 20928
1fd182f0 20929
5476a9a4
GM
20930
20931 if test $gl_cv_have_include_next = yes; then
20932 gl_cv_next_sys_select_h='<'sys/select.h'>'
20933 else
20934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/select.h>" >&5
20935$as_echo_n "checking absolute name of <sys/select.h>... " >&6; }
20936if test "${gl_cv_next_sys_select_h+set}" = set; then :
f199cab1 20937 $as_echo_n "(cached) " >&6
3e0be4ab 20938else
1fd182f0 20939
5476a9a4
GM
20940 if test $ac_cv_header_sys_select_h = yes; then
20941
20942
20943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20944/* end confdefs.h. */
20945#include <sys/select.h>
20946
20947_ACEOF
20948 case "$host_os" in
20949 aix*) gl_absname_cpp="$ac_cpp -C" ;;
20950 *) gl_absname_cpp="$ac_cpp" ;;
20951 esac
20952
20953 case "$host_os" in
20954 mingw*)
20955 gl_dirsep_regex='[/\\]'
20956 ;;
20957 *)
20958 gl_dirsep_regex='\/'
20959 ;;
20960 esac
20961 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
20962
20963 gl_header_literal_regex=`echo 'sys/select.h' \
20964 | sed -e "$gl_make_literal_regex_sed"`
20965 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20966 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20967 s|^/[^/]|//&|
20968 p
20969 q
20970 }'
20971 gl_cv_next_sys_select_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20972 sed -n "$gl_absolute_header_sed"`'"'
20973 else
20974 gl_cv_next_sys_select_h='<'sys/select.h'>'
20975 fi
1fd182f0 20976
3e0be4ab 20977
1f5d53eb 20978fi
5476a9a4
GM
20979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_select_h" >&5
20980$as_echo "$gl_cv_next_sys_select_h" >&6; }
20981 fi
20982 NEXT_SYS_SELECT_H=$gl_cv_next_sys_select_h
1fd182f0 20983
5476a9a4
GM
20984 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20985 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20986 gl_next_as_first_directive='<'sys/select.h'>'
20987 else
20988 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20989 gl_next_as_first_directive=$gl_cv_next_sys_select_h
20990 fi
20991 NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H=$gl_next_as_first_directive
1fd182f0
PE
20992
20993
5476a9a4
GM
20994
20995
20996 if test $ac_cv_header_sys_select_h = yes; then
20997 HAVE_SYS_SELECT_H=1
20998 else
20999 HAVE_SYS_SELECT_H=0
21000 fi
21001
21002
21003
21004
21005
21006 if test $ac_cv_header_sys_socket_h != yes; then
21007 for ac_header in winsock2.h
21008do :
21009 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
21010if test "x$ac_cv_header_winsock2_h" = x""yes; then :
21011 cat >>confdefs.h <<_ACEOF
21012#define HAVE_WINSOCK2_H 1
f199cab1 21013_ACEOF
5476a9a4 21014
f199cab1 21015fi
3e0be4ab 21016
5476a9a4 21017done
3e0be4ab 21018
5476a9a4
GM
21019 fi
21020 if test "$ac_cv_header_winsock2_h" = yes; then
21021 HAVE_WINSOCK2_H=1
21022 UNISTD_H_HAVE_WINSOCK2_H=1
21023 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
21024 else
21025 HAVE_WINSOCK2_H=0
21026 fi
f199cab1 21027
f199cab1 21028
f199cab1 21029
f199cab1 21030
3e0be4ab 21031
3e0be4ab 21032
3e0be4ab 21033
3e0be4ab 21034
5476a9a4
GM
21035 GNULIB_PTHREAD_SIGMASK=0;
21036 GNULIB_RAISE=0;
21037 GNULIB_SIGNAL_H_SIGPIPE=0;
21038 GNULIB_SIGPROCMASK=0;
21039 GNULIB_SIGACTION=0;
21040 HAVE_POSIX_SIGNALBLOCKING=1;
21041 HAVE_PTHREAD_SIGMASK=1;
21042 HAVE_RAISE=1;
21043 HAVE_SIGSET_T=1;
21044 HAVE_SIGINFO_T=1;
21045 HAVE_SIGACTION=1;
21046 HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
21047
21048 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
f199cab1 21049
5476a9a4
GM
21050 HAVE_SIGHANDLER_T=1;
21051 REPLACE_PTHREAD_SIGMASK=0;
21052 REPLACE_RAISE=0;
1f5d53eb 21053
1fd182f0 21054
b06b1098 21055
1fd182f0 21056
3e0be4ab
GM
21057
21058
f077f61d 21059
5476a9a4
GM
21060 ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
21061 #include <signal.h>
21062 /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
21063 #include <sys/types.h>
21064
21065"
21066if test "x$ac_cv_type_sigset_t" = x""yes; then :
21067
21068cat >>confdefs.h <<_ACEOF
21069#define HAVE_SIGSET_T 1
f199cab1 21070_ACEOF
3e0be4ab 21071
5476a9a4
GM
21072gl_cv_type_sigset_t=yes
21073else
21074 gl_cv_type_sigset_t=no
f199cab1 21075fi
3e0be4ab 21076
5476a9a4
GM
21077 if test $gl_cv_type_sigset_t != yes; then
21078 HAVE_SIGSET_T=0
21079 fi
3e0be4ab 21080
1f5d53eb 21081
3e0be4ab 21082
5476a9a4
GM
21083 if test $ac_cv_header_sys_socket_h = no; then
21084 for ac_header in ws2tcpip.h
21085do :
21086 ac_fn_c_check_header_mongrel "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default"
21087if test "x$ac_cv_header_ws2tcpip_h" = x""yes; then :
21088 cat >>confdefs.h <<_ACEOF
21089#define HAVE_WS2TCPIP_H 1
21090_ACEOF
3e0be4ab 21091
5476a9a4 21092fi
3e0be4ab 21093
5476a9a4
GM
21094done
21095
21096 fi
21097
21098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
21099$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
21100if test "${ac_cv_header_stdbool_h+set}" = set; then :
21101 $as_echo_n "(cached) " >&6
21102else
21103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21104/* end confdefs.h. */
1f5d53eb 21105
5476a9a4
GM
21106 #include <stdbool.h>
21107 #ifndef bool
21108 "error: bool is not defined"
21109 #endif
21110 #ifndef false
21111 "error: false is not defined"
21112 #endif
21113 #if false
21114 "error: false is not 0"
21115 #endif
21116 #ifndef true
21117 "error: true is not defined"
21118 #endif
21119 #if true != 1
21120 "error: true is not 1"
21121 #endif
21122 #ifndef __bool_true_false_are_defined
21123 "error: __bool_true_false_are_defined is not defined"
21124 #endif
21125
21126 struct s { _Bool s: 1; _Bool t; } s;
21127
21128 char a[true == 1 ? 1 : -1];
21129 char b[false == 0 ? 1 : -1];
21130 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
21131 char d[(bool) 0.5 == true ? 1 : -1];
21132 /* See body of main program for 'e'. */
21133 char f[(_Bool) 0.0 == false ? 1 : -1];
21134 char g[true];
21135 char h[sizeof (_Bool)];
21136 char i[sizeof s.t];
21137 enum { j = false, k = true, l = false * true, m = true * 256 };
21138 /* The following fails for
21139 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
21140 _Bool n[m];
21141 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
21142 char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
21143 /* Catch a bug in an HP-UX C compiler. See
21144 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
21145 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
21146 */
21147 _Bool q = true;
21148 _Bool *pq = &q;
1ebc9c87
GM
21149
21150int
21151main ()
21152{
f199cab1 21153
5476a9a4
GM
21154 bool e = &s;
21155 *pq |= q;
21156 *pq |= ! q;
21157 /* Refer to every declared value, to avoid compiler optimizations. */
21158 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
21159 + !m + !n + !o + !p + !q + !pq);
f199cab1 21160
5476a9a4 21161 ;
1ebc9c87
GM
21162 return 0;
21163}
21164_ACEOF
5476a9a4
GM
21165if ac_fn_c_try_compile "$LINENO"; then :
21166 ac_cv_header_stdbool_h=yes
1ebc9c87 21167else
5476a9a4 21168 ac_cv_header_stdbool_h=no
1ebc9c87 21169fi
5476a9a4 21170rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1ebc9c87 21171fi
5476a9a4
GM
21172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
21173$as_echo "$ac_cv_header_stdbool_h" >&6; }
21174 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
21175if test "x$ac_cv_type__Bool" = x""yes; then :
1ebc9c87 21176
5476a9a4
GM
21177cat >>confdefs.h <<_ACEOF
21178#define HAVE__BOOL 1
21179_ACEOF
1ebc9c87 21180
1ebc9c87
GM
21181
21182fi
21183
1ebc9c87 21184
1ebc9c87 21185
5476a9a4
GM
21186 REPLACE_NULL=0;
21187 HAVE_WCHAR_T=1;
21188
21189
21190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
21191$as_echo_n "checking for wchar_t... " >&6; }
21192if test "${gt_cv_c_wchar_t+set}" = set; then :
21193 $as_echo_n "(cached) " >&6
21194else
21195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21196/* end confdefs.h. */
21197#include <stddef.h>
21198 wchar_t foo = (wchar_t)'\0';
21199int
21200main ()
21201{
21202
21203 ;
21204 return 0;
21205}
21206_ACEOF
21207if ac_fn_c_try_compile "$LINENO"; then :
21208 gt_cv_c_wchar_t=yes
21209else
21210 gt_cv_c_wchar_t=no
21211fi
21212rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1ebc9c87 21213fi
5476a9a4
GM
21214{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
21215$as_echo "$gt_cv_c_wchar_t" >&6; }
21216 if test $gt_cv_c_wchar_t = yes; then
1ebc9c87 21217
5476a9a4
GM
21218$as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
21219
21220 fi
21221
21222
21223 GNULIB_DPRINTF=0;
21224 GNULIB_FCLOSE=0;
21225 GNULIB_FDOPEN=0;
21226 GNULIB_FFLUSH=0;
21227 GNULIB_FGETC=0;
21228 GNULIB_FGETS=0;
21229 GNULIB_FOPEN=0;
21230 GNULIB_FPRINTF=0;
21231 GNULIB_FPRINTF_POSIX=0;
21232 GNULIB_FPURGE=0;
21233 GNULIB_FPUTC=0;
21234 GNULIB_FPUTS=0;
21235 GNULIB_FREAD=0;
21236 GNULIB_FREOPEN=0;
21237 GNULIB_FSCANF=0;
21238 GNULIB_FSEEK=0;
21239 GNULIB_FSEEKO=0;
21240 GNULIB_FTELL=0;
21241 GNULIB_FTELLO=0;
21242 GNULIB_FWRITE=0;
21243 GNULIB_GETC=0;
21244 GNULIB_GETCHAR=0;
21245 GNULIB_GETDELIM=0;
21246 GNULIB_GETLINE=0;
21247 GNULIB_OBSTACK_PRINTF=0;
21248 GNULIB_OBSTACK_PRINTF_POSIX=0;
21249 GNULIB_PCLOSE=0;
21250 GNULIB_PERROR=0;
21251 GNULIB_POPEN=0;
21252 GNULIB_PRINTF=0;
21253 GNULIB_PRINTF_POSIX=0;
21254 GNULIB_PUTC=0;
21255 GNULIB_PUTCHAR=0;
21256 GNULIB_PUTS=0;
21257 GNULIB_REMOVE=0;
21258 GNULIB_RENAME=0;
21259 GNULIB_RENAMEAT=0;
21260 GNULIB_SCANF=0;
21261 GNULIB_SNPRINTF=0;
21262 GNULIB_SPRINTF_POSIX=0;
21263 GNULIB_STDIO_H_NONBLOCKING=0;
21264 GNULIB_STDIO_H_SIGPIPE=0;
21265 GNULIB_TMPFILE=0;
21266 GNULIB_VASPRINTF=0;
21267 GNULIB_VFSCANF=0;
21268 GNULIB_VSCANF=0;
21269 GNULIB_VDPRINTF=0;
21270 GNULIB_VFPRINTF=0;
21271 GNULIB_VFPRINTF_POSIX=0;
21272 GNULIB_VPRINTF=0;
21273 GNULIB_VPRINTF_POSIX=0;
21274 GNULIB_VSNPRINTF=0;
21275 GNULIB_VSPRINTF_POSIX=0;
21276 HAVE_DECL_FPURGE=1;
21277 HAVE_DECL_FSEEKO=1;
21278 HAVE_DECL_FTELLO=1;
21279 HAVE_DECL_GETDELIM=1;
21280 HAVE_DECL_GETLINE=1;
21281 HAVE_DECL_OBSTACK_PRINTF=1;
21282 HAVE_DECL_SNPRINTF=1;
21283 HAVE_DECL_VSNPRINTF=1;
21284 HAVE_DPRINTF=1;
21285 HAVE_FSEEKO=1;
21286 HAVE_FTELLO=1;
21287 HAVE_PCLOSE=1;
21288 HAVE_POPEN=1;
21289 HAVE_RENAMEAT=1;
21290 HAVE_VASPRINTF=1;
21291 HAVE_VDPRINTF=1;
21292 REPLACE_DPRINTF=0;
21293 REPLACE_FCLOSE=0;
21294 REPLACE_FDOPEN=0;
21295 REPLACE_FFLUSH=0;
21296 REPLACE_FOPEN=0;
21297 REPLACE_FPRINTF=0;
21298 REPLACE_FPURGE=0;
21299 REPLACE_FREOPEN=0;
21300 REPLACE_FSEEK=0;
21301 REPLACE_FSEEKO=0;
21302 REPLACE_FTELL=0;
21303 REPLACE_FTELLO=0;
21304 REPLACE_GETDELIM=0;
21305 REPLACE_GETLINE=0;
21306 REPLACE_OBSTACK_PRINTF=0;
21307 REPLACE_PERROR=0;
21308 REPLACE_POPEN=0;
21309 REPLACE_PRINTF=0;
21310 REPLACE_REMOVE=0;
21311 REPLACE_RENAME=0;
21312 REPLACE_RENAMEAT=0;
21313 REPLACE_SNPRINTF=0;
21314 REPLACE_SPRINTF=0;
21315 REPLACE_STDIO_READ_FUNCS=0;
21316 REPLACE_STDIO_WRITE_FUNCS=0;
21317 REPLACE_TMPFILE=0;
21318 REPLACE_VASPRINTF=0;
21319 REPLACE_VDPRINTF=0;
21320 REPLACE_VFPRINTF=0;
21321 REPLACE_VPRINTF=0;
21322 REPLACE_VSNPRINTF=0;
21323 REPLACE_VSPRINTF=0;
1ebc9c87 21324
5476a9a4
GM
21325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
21326$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
21327if test "${ac_cv_struct_tm+set}" = set; then :
1ebc9c87
GM
21328 $as_echo_n "(cached) " >&6
21329else
5476a9a4 21330 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1ebc9c87 21331/* end confdefs.h. */
5476a9a4
GM
21332#include <sys/types.h>
21333#include <time.h>
1ebc9c87
GM
21334
21335int
21336main ()
21337{
5476a9a4
GM
21338struct tm tm;
21339 int *p = &tm.tm_sec;
21340 return !p;
1ebc9c87
GM
21341 ;
21342 return 0;
21343}
21344_ACEOF
5476a9a4
GM
21345if ac_fn_c_try_compile "$LINENO"; then :
21346 ac_cv_struct_tm=time.h
1ebc9c87 21347else
5476a9a4 21348 ac_cv_struct_tm=sys/time.h
1ebc9c87 21349fi
5476a9a4 21350rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1ebc9c87 21351fi
5476a9a4
GM
21352{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
21353$as_echo "$ac_cv_struct_tm" >&6; }
21354if test $ac_cv_struct_tm = sys/time.h; then
1ebc9c87 21355
5476a9a4 21356$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
1ebc9c87 21357
1ebc9c87
GM
21358fi
21359
5476a9a4
GM
21360ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
21361#include <$ac_cv_struct_tm>
1fd182f0 21362
5476a9a4
GM
21363"
21364if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
1fd182f0 21365
5476a9a4
GM
21366cat >>confdefs.h <<_ACEOF
21367#define HAVE_STRUCT_TM_TM_ZONE 1
f199cab1 21368_ACEOF
5476a9a4
GM
21369
21370
1f5d53eb 21371fi
1fd182f0 21372
5476a9a4 21373if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
1f5d53eb 21374
5476a9a4 21375$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
1fd182f0 21376
5476a9a4
GM
21377else
21378 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
21379"
21380if test "x$ac_cv_have_decl_tzname" = x""yes; then :
21381 ac_have_decl=1
21382else
21383 ac_have_decl=0
21384fi
1fd182f0 21385
5476a9a4
GM
21386cat >>confdefs.h <<_ACEOF
21387#define HAVE_DECL_TZNAME $ac_have_decl
21388_ACEOF
f199cab1 21389
5476a9a4
GM
21390 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
21391$as_echo_n "checking for tzname... " >&6; }
21392if test "${ac_cv_var_tzname+set}" = set; then :
f199cab1 21393 $as_echo_n "(cached) " >&6
3e0be4ab 21394else
5476a9a4 21395 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 21396/* end confdefs.h. */
5476a9a4
GM
21397#include <time.h>
21398#if !HAVE_DECL_TZNAME
21399extern char *tzname[];
f199cab1 21400#endif
5476a9a4 21401
f199cab1
GM
21402int
21403main ()
21404{
5476a9a4 21405return tzname[0][0];
f199cab1
GM
21406 ;
21407 return 0;
21408}
3e0be4ab 21409_ACEOF
f199cab1 21410if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 21411 ac_cv_var_tzname=yes
3e0be4ab 21412else
5476a9a4 21413 ac_cv_var_tzname=no
f199cab1
GM
21414fi
21415rm -f core conftest.err conftest.$ac_objext \
21416 conftest$ac_exeext conftest.$ac_ext
f199cab1 21417fi
5476a9a4
GM
21418{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
21419$as_echo "$ac_cv_var_tzname" >&6; }
21420 if test $ac_cv_var_tzname = yes; then
21421
21422$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
f199cab1 21423
5476a9a4 21424 fi
3e0be4ab 21425fi
cc322c06 21426
5476a9a4
GM
21427
21428 ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include <time.h>
21429"
21430if test "x$ac_cv_member_struct_tm_tm_gmtoff" = x""yes; then :
21431
21432$as_echo "#define HAVE_TM_GMTOFF 1" >>confdefs.h
cc322c06 21433
f199cab1 21434fi
cc322c06 21435
1f5d53eb 21436
e275c824 21437
5476a9a4 21438
283c7aed
GM
21439
21440
21441
21442
21443
21444
21445
21446
21447
21448 if test $gl_cv_have_include_next = yes; then
21449 gl_cv_next_string_h='<'string.h'>'
21450 else
21451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
21452$as_echo_n "checking absolute name of <string.h>... " >&6; }
21453if test "${gl_cv_next_string_h+set}" = set; then :
21454 $as_echo_n "(cached) " >&6
21455else
21456
21457 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21458/* end confdefs.h. */
21459#include <string.h>
21460
21461_ACEOF
21462 case "$host_os" in
21463 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21464 *) gl_absname_cpp="$ac_cpp" ;;
21465 esac
21466
21467 case "$host_os" in
21468 mingw*)
21469 gl_dirsep_regex='[/\\]'
21470 ;;
21471 *)
21472 gl_dirsep_regex='\/'
21473 ;;
21474 esac
21475 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21476
21477 gl_header_literal_regex=`echo 'string.h' \
21478 | sed -e "$gl_make_literal_regex_sed"`
21479 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21480 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21481 s|^/[^/]|//&|
21482 p
21483 q
21484 }'
21485 gl_cv_next_string_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21486 sed -n "$gl_absolute_header_sed"`'"'
21487
21488
21489fi
21490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
21491$as_echo "$gl_cv_next_string_h" >&6; }
21492 fi
21493 NEXT_STRING_H=$gl_cv_next_string_h
21494
21495 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21496 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21497 gl_next_as_first_directive='<'string.h'>'
21498 else
21499 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21500 gl_next_as_first_directive=$gl_cv_next_string_h
21501 fi
21502 NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
21503
21504
21505
21506
21507
21508
21509
21510
21511
5476a9a4
GM
21512ac_fn_c_check_decl "$LINENO" "strtoimax" "ac_cv_have_decl_strtoimax" "$ac_includes_default"
21513if test "x$ac_cv_have_decl_strtoimax" = x""yes; then :
21514 ac_have_decl=1
3e0be4ab 21515else
5476a9a4 21516 ac_have_decl=0
3e0be4ab 21517fi
5476a9a4
GM
21518
21519cat >>confdefs.h <<_ACEOF
21520#define HAVE_DECL_STRTOIMAX $ac_have_decl
f199cab1 21521_ACEOF
e275c824
PE
21522
21523
5476a9a4
GM
21524
21525ac_fn_c_check_decl "$LINENO" "strtoumax" "ac_cv_have_decl_strtoumax" "$ac_includes_default"
21526if test "x$ac_cv_have_decl_strtoumax" = x""yes; then :
21527 ac_have_decl=1
21528else
21529 ac_have_decl=0
3e0be4ab 21530fi
e275c824 21531
5476a9a4
GM
21532cat >>confdefs.h <<_ACEOF
21533#define HAVE_DECL_STRTOUMAX $ac_have_decl
21534_ACEOF
e275c824
PE
21535
21536
2b1928b8 21537
5476a9a4
GM
21538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
21539$as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
21540if test "${ac_cv_header_stat_broken+set}" = set; then :
f199cab1 21541 $as_echo_n "(cached) " >&6
2b1928b8 21542else
5476a9a4
GM
21543 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21544/* end confdefs.h. */
21545#include <sys/types.h>
21546#include <sys/stat.h>
2b1928b8 21547
5476a9a4
GM
21548#if defined S_ISBLK && defined S_IFDIR
21549extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
21550#endif
2b1928b8 21551
5476a9a4
GM
21552#if defined S_ISBLK && defined S_IFCHR
21553extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
21554#endif
0eb775a3 21555
5476a9a4
GM
21556#if defined S_ISLNK && defined S_IFREG
21557extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
21558#endif
21559
21560#if defined S_ISSOCK && defined S_IFREG
21561extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
21562#endif
0eb775a3 21563
5476a9a4
GM
21564_ACEOF
21565if ac_fn_c_try_compile "$LINENO"; then :
21566 ac_cv_header_stat_broken=no
f199cab1 21567else
5476a9a4 21568 ac_cv_header_stat_broken=yes
f199cab1 21569fi
5476a9a4 21570rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 21571fi
5476a9a4
GM
21572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
21573$as_echo "$ac_cv_header_stat_broken" >&6; }
21574if test $ac_cv_header_stat_broken = yes; then
0eb775a3 21575
5476a9a4 21576$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
0eb775a3 21577
5476a9a4 21578fi
0eb775a3
GM
21579
21580
21581
5476a9a4
GM
21582
21583
21584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
21585$as_echo_n "checking for struct timespec in <time.h>... " >&6; }
21586if test "${gl_cv_sys_struct_timespec_in_time_h+set}" = set; then :
21587 $as_echo_n "(cached) " >&6
21588else
21589 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3e0be4ab 21590/* end confdefs.h. */
5476a9a4 21591#include <time.h>
52724a05 21592
3e0be4ab
GM
21593int
21594main ()
21595{
5476a9a4 21596static struct timespec x; x.tv_sec = x.tv_nsec;
3e0be4ab
GM
21597 ;
21598 return 0;
21599}
21600_ACEOF
5476a9a4
GM
21601if ac_fn_c_try_compile "$LINENO"; then :
21602 gl_cv_sys_struct_timespec_in_time_h=yes
3e0be4ab 21603else
5476a9a4 21604 gl_cv_sys_struct_timespec_in_time_h=no
3e0be4ab 21605fi
5476a9a4
GM
21606rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21607fi
21608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
21609$as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
52724a05 21610
5476a9a4
GM
21611 TIME_H_DEFINES_STRUCT_TIMESPEC=0
21612 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
21613 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
21614 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
21615 TIME_H_DEFINES_STRUCT_TIMESPEC=1
21616 else
21617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
21618$as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
21619if test "${gl_cv_sys_struct_timespec_in_sys_time_h+set}" = set; then :
21620 $as_echo_n "(cached) " >&6
21621else
3e0be4ab
GM
21622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21623/* end confdefs.h. */
5476a9a4
GM
21624#include <sys/time.h>
21625
3e0be4ab
GM
21626int
21627main ()
21628{
5476a9a4 21629static struct timespec x; x.tv_sec = x.tv_nsec;
3e0be4ab
GM
21630 ;
21631 return 0;
21632}
21633_ACEOF
5476a9a4
GM
21634if ac_fn_c_try_compile "$LINENO"; then :
21635 gl_cv_sys_struct_timespec_in_sys_time_h=yes
3e0be4ab 21636else
5476a9a4 21637 gl_cv_sys_struct_timespec_in_sys_time_h=no
3e0be4ab 21638fi
5476a9a4 21639rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 21640fi
5476a9a4
GM
21641{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
21642$as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
21643 if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
21644 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
21645 else
21646 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
21647$as_echo_n "checking for struct timespec in <pthread.h>... " >&6; }
21648if test "${gl_cv_sys_struct_timespec_in_pthread_h+set}" = set; then :
3e0be4ab
GM
21649 $as_echo_n "(cached) " >&6
21650else
21651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21652/* end confdefs.h. */
5476a9a4
GM
21653#include <pthread.h>
21654
3e0be4ab
GM
21655int
21656main ()
21657{
5476a9a4 21658static struct timespec x; x.tv_sec = x.tv_nsec;
3e0be4ab
GM
21659 ;
21660 return 0;
21661}
21662_ACEOF
5476a9a4
GM
21663if ac_fn_c_try_compile "$LINENO"; then :
21664 gl_cv_sys_struct_timespec_in_pthread_h=yes
3e0be4ab 21665else
5476a9a4 21666 gl_cv_sys_struct_timespec_in_pthread_h=no
3e0be4ab 21667fi
5476a9a4 21668rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3e0be4ab 21669fi
5476a9a4
GM
21670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
21671$as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
21672 if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
21673 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
21674 fi
21675 fi
f199cab1 21676 fi
e275c824
PE
21677
21678
b0415a03 21679
b0415a03 21680
e275c824 21681
e275c824
PE
21682
21683
f199cab1 21684
e275c824
PE
21685
21686
21687
21688
21689
21690
21691
5476a9a4
GM
21692 if test $gl_cv_have_include_next = yes; then
21693 gl_cv_next_time_h='<'time.h'>'
21694 else
21695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
21696$as_echo_n "checking absolute name of <time.h>... " >&6; }
21697if test "${gl_cv_next_time_h+set}" = set; then :
21698 $as_echo_n "(cached) " >&6
21699else
e275c824 21700
5476a9a4
GM
21701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21702/* end confdefs.h. */
21703#include <time.h>
e275c824 21704
5476a9a4
GM
21705_ACEOF
21706 case "$host_os" in
21707 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21708 *) gl_absname_cpp="$ac_cpp" ;;
21709 esac
e275c824 21710
5476a9a4
GM
21711 case "$host_os" in
21712 mingw*)
21713 gl_dirsep_regex='[/\\]'
21714 ;;
21715 *)
21716 gl_dirsep_regex='\/'
21717 ;;
21718 esac
21719 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
e275c824 21720
5476a9a4
GM
21721 gl_header_literal_regex=`echo 'time.h' \
21722 | sed -e "$gl_make_literal_regex_sed"`
21723 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21724 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21725 s|^/[^/]|//&|
21726 p
21727 q
21728 }'
21729 gl_cv_next_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21730 sed -n "$gl_absolute_header_sed"`'"'
e275c824
PE
21731
21732
5476a9a4
GM
21733fi
21734{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
21735$as_echo "$gl_cv_next_time_h" >&6; }
21736 fi
21737 NEXT_TIME_H=$gl_cv_next_time_h
67342916 21738
5476a9a4
GM
21739 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21740 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21741 gl_next_as_first_directive='<'time.h'>'
f199cab1 21742 else
5476a9a4
GM
21743 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21744 gl_next_as_first_directive=$gl_cv_next_time_h
f199cab1 21745 fi
5476a9a4 21746 NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
4fda9c95
GM
21747
21748
52724a05
GM
21749
21750
21751
21752
21753
21754
21755
ae0d7250
PE
21756
21757
21758
cc322c06 21759
f199cab1 21760
b5591ebb
GM
21761ac_fn_c_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default"
21762if test "x$ac_cv_have_decl_unsetenv" = x""yes; then :
21763 ac_have_decl=1
21764else
21765 ac_have_decl=0
21766fi
21767
21768cat >>confdefs.h <<_ACEOF
21769#define HAVE_DECL_UNSETENV $ac_have_decl
21770_ACEOF
21771
cc322c06 21772
5476a9a4
GM
21773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the utimes function works" >&5
21774$as_echo_n "checking whether the utimes function works... " >&6; }
21775if test "${gl_cv_func_working_utimes+set}" = set; then :
21776 $as_echo_n "(cached) " >&6
21777else
1fd182f0 21778
5476a9a4
GM
21779 if test "$cross_compiling" = yes; then :
21780 gl_cv_func_working_utimes=no
21781else
21782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21783/* end confdefs.h. */
21784
21785#include <sys/types.h>
21786#include <sys/stat.h>
21787#include <fcntl.h>
21788#include <sys/time.h>
21789#include <time.h>
21790#include <unistd.h>
21791#include <stdlib.h>
21792#include <stdio.h>
21793#include <utime.h>
1fd182f0 21794
5476a9a4
GM
21795static int
21796inorder (time_t a, time_t b, time_t c)
21797{
21798 return a <= b && b <= c;
21799}
1fd182f0 21800
5476a9a4
GM
21801int
21802main ()
21803{
21804 int result = 0;
21805 char const *file = "conftest.utimes";
21806 static struct timeval timeval[2] = {{9, 10}, {999999, 999999}};
1fd182f0 21807
5476a9a4
GM
21808 /* Test whether utimes() essentially works. */
21809 {
21810 struct stat sbuf;
21811 FILE *f = fopen (file, "w");
21812 if (f == NULL)
21813 result |= 1;
21814 else if (fclose (f) != 0)
21815 result |= 1;
21816 else if (utimes (file, timeval) != 0)
21817 result |= 2;
21818 else if (lstat (file, &sbuf) != 0)
21819 result |= 1;
21820 else if (!(sbuf.st_atime == timeval[0].tv_sec
21821 && sbuf.st_mtime == timeval[1].tv_sec))
21822 result |= 4;
21823 if (unlink (file) != 0)
21824 result |= 1;
21825 }
1fd182f0 21826
5476a9a4
GM
21827 /* Test whether utimes() with a NULL argument sets the file's timestamp
21828 to the current time. Use 'fstat' as well as 'time' to
21829 determine the "current" time, to accommodate NFS file systems
21830 if there is a time skew between the host and the NFS server. */
21831 {
21832 int fd = open (file, O_WRONLY|O_CREAT, 0644);
21833 if (fd < 0)
21834 result |= 1;
21835 else
21836 {
21837 time_t t0, t2;
21838 struct stat st0, st1, st2;
21839 if (time (&t0) == (time_t) -1)
21840 result |= 1;
21841 else if (fstat (fd, &st0) != 0)
21842 result |= 1;
21843 else if (utimes (file, timeval) != 0)
21844 result |= 2;
21845 else if (utimes (file, NULL) != 0)
21846 result |= 8;
21847 else if (fstat (fd, &st1) != 0)
21848 result |= 1;
21849 else if (write (fd, "\n", 1) != 1)
21850 result |= 1;
21851 else if (fstat (fd, &st2) != 0)
21852 result |= 1;
21853 else if (time (&t2) == (time_t) -1)
21854 result |= 1;
21855 else
21856 {
21857 int m_ok_POSIX = inorder (t0, st1.st_mtime, t2);
21858 int m_ok_NFS = inorder (st0.st_mtime, st1.st_mtime, st2.st_mtime);
21859 if (! (st1.st_atime == st1.st_mtime))
21860 result |= 16;
21861 if (! (m_ok_POSIX || m_ok_NFS))
21862 result |= 32;
21863 }
21864 if (close (fd) != 0)
21865 result |= 1;
21866 }
21867 if (unlink (file) != 0)
21868 result |= 1;
21869 }
52724a05 21870
5476a9a4
GM
21871 /* Test whether utimes() with a NULL argument works on read-only files. */
21872 {
21873 int fd = open (file, O_WRONLY|O_CREAT, 0444);
21874 if (fd < 0)
21875 result |= 1;
21876 else if (close (fd) != 0)
21877 result |= 1;
21878 else if (utimes (file, NULL) != 0)
21879 result |= 64;
21880 if (unlink (file) != 0)
21881 result |= 1;
21882 }
1fd182f0 21883
5476a9a4
GM
21884 return result;
21885}
1fd182f0 21886
5476a9a4
GM
21887_ACEOF
21888if ac_fn_c_try_run "$LINENO"; then :
21889 gl_cv_func_working_utimes=yes
21890else
21891 gl_cv_func_working_utimes=no
21892fi
21893rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21894 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1 21895fi
1fd182f0 21896
5476a9a4
GM
21897fi
21898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_utimes" >&5
21899$as_echo "$gl_cv_func_working_utimes" >&6; }
1fd182f0 21900
5476a9a4 21901 if test $gl_cv_func_working_utimes = yes; then
1fd182f0 21902
5476a9a4 21903$as_echo "#define HAVE_WORKING_UTIMES 1" >>confdefs.h
1fd182f0 21904
5476a9a4 21905 fi
1fd182f0 21906
1fd182f0 21907
1fd182f0 21908
1fd182f0 21909
1fd182f0 21910
5476a9a4
GM
21911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct utimbuf" >&5
21912$as_echo_n "checking for struct utimbuf... " >&6; }
21913if test "${gl_cv_sys_struct_utimbuf+set}" = set; then :
21914 $as_echo_n "(cached) " >&6
21915else
21916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21917/* end confdefs.h. */
21918#if HAVE_SYS_TIME_H
21919 #include <sys/time.h>
21920 #endif
21921 #include <time.h>
21922 #ifdef HAVE_UTIME_H
21923 #include <utime.h>
21924 #endif
1fd182f0 21925
5476a9a4
GM
21926int
21927main ()
21928{
21929static struct utimbuf x; x.actime = x.modtime;
21930 ;
21931 return 0;
21932}
21933_ACEOF
21934if ac_fn_c_try_compile "$LINENO"; then :
21935 gl_cv_sys_struct_utimbuf=yes
21936else
21937 gl_cv_sys_struct_utimbuf=no
f199cab1 21938fi
5476a9a4 21939rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 21940fi
5476a9a4
GM
21941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_utimbuf" >&5
21942$as_echo "$gl_cv_sys_struct_utimbuf" >&6; }
1fd182f0 21943
5476a9a4 21944 if test $gl_cv_sys_struct_utimbuf = yes; then
1fd182f0 21945
5476a9a4 21946$as_echo "#define HAVE_STRUCT_UTIMBUF 1" >>confdefs.h
1fd182f0 21947
5476a9a4 21948 fi
1fd182f0 21949
1fd182f0 21950
1fd182f0 21951
1fd182f0 21952
1fd182f0 21953
1fd182f0 21954
1fd182f0 21955
3e0be4ab 21956
f199cab1 21957
f199cab1 21958
067d23c9 21959
710f5812
GM
21960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking type of array argument to getgroups" >&5
21961$as_echo_n "checking type of array argument to getgroups... " >&6; }
21962if test "${ac_cv_type_getgroups+set}" = set; then :
21963 $as_echo_n "(cached) " >&6
21964else
21965 if test "$cross_compiling" = yes; then :
21966 ac_cv_type_getgroups=cross
21967else
21968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21969/* end confdefs.h. */
21970/* Thanks to Mike Rendell for this test. */
21971$ac_includes_default
21972#define NGID 256
21973#undef MAX
21974#define MAX(x, y) ((x) > (y) ? (x) : (y))
21975
21976int
21977main ()
21978{
21979 gid_t gidset[NGID];
21980 int i, n;
21981 union { gid_t gval; long int lval; } val;
21982
21983 val.lval = -1;
21984 for (i = 0; i < NGID; i++)
21985 gidset[i] = val.gval;
21986 n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
21987 gidset);
21988 /* Exit non-zero if getgroups seems to require an array of ints. This
21989 happens when gid_t is short int but getgroups modifies an array
21990 of ints. */
21991 return n > 0 && gidset[n] != val.gval;
21992}
21993_ACEOF
21994if ac_fn_c_try_run "$LINENO"; then :
21995 ac_cv_type_getgroups=gid_t
21996else
21997 ac_cv_type_getgroups=int
21998fi
21999rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22000 conftest.$ac_objext conftest.beam conftest.$ac_ext
22001fi
22002
22003if test $ac_cv_type_getgroups = cross; then
22004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22005/* end confdefs.h. */
22006#include <unistd.h>
22007
22008_ACEOF
22009if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22010 $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then :
22011 ac_cv_type_getgroups=gid_t
22012else
22013 ac_cv_type_getgroups=int
22014fi
22015rm -f conftest*
22016
22017fi
22018fi
22019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_getgroups" >&5
22020$as_echo "$ac_cv_type_getgroups" >&6; }
22021
22022cat >>confdefs.h <<_ACEOF
22023#define GETGROUPS_T $ac_cv_type_getgroups
22024_ACEOF
22025
22026
22027
067d23c9 22028
5476a9a4
GM
22029 if false; then
22030 GL_COND_LIBTOOL_TRUE=
22031 GL_COND_LIBTOOL_FALSE='#'
22032else
22033 GL_COND_LIBTOOL_TRUE='#'
22034 GL_COND_LIBTOOL_FALSE=
1fd182f0 22035fi
067d23c9 22036
5476a9a4
GM
22037 gl_cond_libtool=false
22038 gl_libdeps=
22039 gl_ltlibdeps=
22040 gl_m4_base='m4'
067d23c9 22041
f199cab1 22042
f199cab1 22043
f199cab1 22044
067d23c9 22045
f199cab1 22046
f199cab1 22047
f199cab1 22048
067d23c9 22049
5476a9a4 22050 gl_source_base='lib'
cc322c06
GM
22051
22052
5476a9a4
GM
22053 if test $ac_cv_func_alloca_works = no; then
22054 :
f199cab1 22055 fi
cc322c06 22056
5476a9a4
GM
22057 # Define an additional variable used in the Makefile substitution.
22058 if test $ac_cv_working_alloca_h = yes; then
22059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
22060$as_echo_n "checking for alloca as a compiler built-in... " >&6; }
22061if test "${gl_cv_rpl_alloca+set}" = set; then :
22062 $as_echo_n "(cached) " >&6
22063else
cc322c06 22064
5476a9a4
GM
22065 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22066/* end confdefs.h. */
067d23c9 22067
5476a9a4
GM
22068#if defined __GNUC__ || defined _AIX || defined _MSC_VER
22069 Need own alloca
22070#endif
067d23c9 22071
f199cab1 22072_ACEOF
5476a9a4
GM
22073if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22074 $EGREP "Need own alloca" >/dev/null 2>&1; then :
22075 gl_cv_rpl_alloca=yes
22076else
22077 gl_cv_rpl_alloca=no
369e19fc 22078fi
5476a9a4 22079rm -f conftest*
067d23c9 22080
ae0d7250 22081
5476a9a4
GM
22082fi
22083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
22084$as_echo "$gl_cv_rpl_alloca" >&6; }
22085 if test $gl_cv_rpl_alloca = yes; then
52724a05 22086
5476a9a4 22087$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
ae0d7250 22088
5476a9a4
GM
22089 ALLOCA_H=alloca.h
22090 else
22091 ALLOCA_H=
22092 fi
f199cab1 22093 else
5476a9a4
GM
22094 ALLOCA_H=alloca.h
22095 fi
ae0d7250 22096
5476a9a4
GM
22097 if test -n "$ALLOCA_H"; then
22098 GL_GENERATE_ALLOCA_H_TRUE=
22099 GL_GENERATE_ALLOCA_H_FALSE='#'
22100else
22101 GL_GENERATE_ALLOCA_H_TRUE='#'
22102 GL_GENERATE_ALLOCA_H_FALSE=
22103fi
f199cab1 22104
ae0d7250
PE
22105
22106
22107
22108
22109
5476a9a4
GM
22110 # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
22111 # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
ae0d7250 22112
5476a9a4
GM
22113 # Save and restore LIBS so e.g., -lrt, isn't added to it. Otherwise, *all*
22114 # programs in the package would end up linked with that potentially-shared
22115 # library, inducing unnecessary run-time overhead.
22116 LIB_CLOCK_GETTIME=
ae0d7250 22117
5476a9a4
GM
22118 gl_saved_libs=$LIBS
22119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
22120$as_echo_n "checking for library containing clock_gettime... " >&6; }
22121if test "${ac_cv_search_clock_gettime+set}" = set; then :
22122 $as_echo_n "(cached) " >&6
22123else
22124 ac_func_search_save_LIBS=$LIBS
22125cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22126/* end confdefs.h. */
22127
22128/* Override any GCC internal prototype to avoid an error.
22129 Use char because int might match the return type of a GCC
22130 builtin and then its argument prototype would still apply. */
22131#ifdef __cplusplus
22132extern "C"
22133#endif
22134char clock_gettime ();
22135int
22136main ()
22137{
22138return clock_gettime ();
22139 ;
22140 return 0;
22141}
22142_ACEOF
22143for ac_lib in '' rt posix4; do
22144 if test -z "$ac_lib"; then
22145 ac_res="none required"
22146 else
22147 ac_res=-l$ac_lib
22148 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
22149 fi
22150 if ac_fn_c_try_link "$LINENO"; then :
22151 ac_cv_search_clock_gettime=$ac_res
f199cab1 22152fi
5476a9a4
GM
22153rm -f core conftest.err conftest.$ac_objext \
22154 conftest$ac_exeext
22155 if test "${ac_cv_search_clock_gettime+set}" = set; then :
22156 break
22157fi
22158done
22159if test "${ac_cv_search_clock_gettime+set}" = set; then :
ae0d7250 22160
5476a9a4
GM
22161else
22162 ac_cv_search_clock_gettime=no
22163fi
22164rm conftest.$ac_ext
22165LIBS=$ac_func_search_save_LIBS
22166fi
22167{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
22168$as_echo "$ac_cv_search_clock_gettime" >&6; }
22169ac_res=$ac_cv_search_clock_gettime
22170if test "$ac_res" != no; then :
22171 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
22172 test "$ac_cv_search_clock_gettime" = "none required" ||
22173 LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime
22174fi
ae0d7250 22175
5476a9a4
GM
22176 for ac_func in clock_gettime clock_settime
22177do :
22178 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
22179ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
22180eval as_val=\$$as_ac_var
22181 if test "x$as_val" = x""yes; then :
22182 cat >>confdefs.h <<_ACEOF
22183#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
22184_ACEOF
ae0d7250 22185
d7ad186c
GM
22186fi
22187done
22188
22189 LIBS=$gl_saved_libs
22190
22191
22192 :
22193
22194
22195
22196cat >>confdefs.h <<_ACEOF
22197#define GNULIB_CLOSE_STREAM 1
22198_ACEOF
22199
22200
22201
22202
22203 :
22204
22205
22206
22207 :
22208
22209
22210
22211
22212
22213
22214
22215
22216
22217
22218
22219
22220
22221
22222
22223
22224
ae0d7250 22225
3e0be4ab 22226
d7ad186c
GM
22227 if test $gl_cv_have_include_next = yes; then
22228 gl_cv_next_dirent_h='<'dirent.h'>'
22229 else
22230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5
22231$as_echo_n "checking absolute name of <dirent.h>... " >&6; }
22232if test "${gl_cv_next_dirent_h+set}" = set; then :
22233 $as_echo_n "(cached) " >&6
22234else
3e0be4ab 22235
d7ad186c 22236 if test $ac_cv_header_dirent_h = yes; then
3bf26e96
GM
22237
22238
d7ad186c
GM
22239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22240/* end confdefs.h. */
22241#include <dirent.h>
3bf26e96 22242
3bf26e96 22243_ACEOF
d7ad186c
GM
22244 case "$host_os" in
22245 aix*) gl_absname_cpp="$ac_cpp -C" ;;
22246 *) gl_absname_cpp="$ac_cpp" ;;
22247 esac
3bf26e96 22248
d7ad186c
GM
22249 case "$host_os" in
22250 mingw*)
22251 gl_dirsep_regex='[/\\]'
22252 ;;
22253 *)
22254 gl_dirsep_regex='\/'
22255 ;;
22256 esac
22257 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
3bf26e96 22258
d7ad186c
GM
22259 gl_header_literal_regex=`echo 'dirent.h' \
22260 | sed -e "$gl_make_literal_regex_sed"`
22261 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22262 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22263 s|^/[^/]|//&|
22264 p
22265 q
22266 }'
22267 gl_cv_next_dirent_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22268 sed -n "$gl_absolute_header_sed"`'"'
22269 else
22270 gl_cv_next_dirent_h='<'dirent.h'>'
22271 fi
3bf26e96 22272
3e0be4ab 22273
d7ad186c
GM
22274fi
22275{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5
22276$as_echo "$gl_cv_next_dirent_h" >&6; }
22277 fi
22278 NEXT_DIRENT_H=$gl_cv_next_dirent_h
f199cab1 22279
d7ad186c
GM
22280 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22281 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22282 gl_next_as_first_directive='<'dirent.h'>'
22283 else
22284 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22285 gl_next_as_first_directive=$gl_cv_next_dirent_h
22286 fi
22287 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive
f199cab1 22288
3e0be4ab 22289
f199cab1 22290
f199cab1 22291
d7ad186c
GM
22292 if test $ac_cv_header_dirent_h = yes; then
22293 HAVE_DIRENT_H=1
22294 else
22295 HAVE_DIRENT_H=0
22296 fi
3e0be4ab 22297
f199cab1
GM
22298
22299
22300
5476a9a4
GM
22301
22302
22303
22304
22305
22306
5476a9a4
GM
22307$as_echo "#define HAVE_DUP2 1" >>confdefs.h
22308
22309
22310 if test $HAVE_DUP2 = 1; then
22311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
22312$as_echo_n "checking whether dup2 works... " >&6; }
22313if test "${gl_cv_func_dup2_works+set}" = set; then :
3e0be4ab
GM
22314 $as_echo_n "(cached) " >&6
22315else
5476a9a4
GM
22316 if test "$cross_compiling" = yes; then :
22317 case "$host_os" in
22318 mingw*) # on this platform, dup2 always returns 0 for success
22319 gl_cv_func_dup2_works="guessing no" ;;
22320 cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
22321 gl_cv_func_dup2_works="guessing no" ;;
22322 linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a
22323 # closed fd may yield -EBADF instead of -1 / errno=EBADF.
22324 gl_cv_func_dup2_works="guessing no" ;;
22325 freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF.
22326 gl_cv_func_dup2_works="guessing no" ;;
22327 haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
22328 gl_cv_func_dup2_works="guessing no" ;;
22329 *) gl_cv_func_dup2_works="guessing yes" ;;
22330 esac
22331else
22332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3e0be4ab 22333/* end confdefs.h. */
ae0d7250 22334
5476a9a4
GM
22335 #include <unistd.h>
22336#include <fcntl.h>
22337#include <errno.h>
3e0be4ab
GM
22338int
22339main ()
22340{
5476a9a4
GM
22341int result = 0;
22342#ifdef FD_CLOEXEC
22343 if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
22344 result |= 1;
22345#endif
22346 if (dup2 (1, 1) == 0)
22347 result |= 2;
22348#ifdef FD_CLOEXEC
22349 if (fcntl (1, F_GETFD) != FD_CLOEXEC)
22350 result |= 4;
22351#endif
22352 close (0);
22353 if (dup2 (0, 0) != -1)
22354 result |= 8;
22355 /* Many gnulib modules require POSIX conformance of EBADF. */
22356 if (dup2 (2, 1000000) == -1 && errno != EBADF)
22357 result |= 16;
0d1f53ad
GM
22358 /* Flush out a cygwin core dump. */
22359 if (dup2 (2, -1) != -1 || errno != EBADF)
22360 result |= 32;
5476a9a4
GM
22361 return result;
22362
ae0d7250
PE
22363 ;
22364 return 0;
22365}
5476a9a4 22366
ae0d7250 22367_ACEOF
5476a9a4
GM
22368if ac_fn_c_try_run "$LINENO"; then :
22369 gl_cv_func_dup2_works=yes
ae0d7250 22370else
5476a9a4 22371 gl_cv_func_dup2_works=no
ae0d7250 22372fi
5476a9a4
GM
22373rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22374 conftest.$ac_objext conftest.beam conftest.$ac_ext
ae0d7250 22375fi
5476a9a4
GM
22376
22377
3e0be4ab 22378fi
5476a9a4
GM
22379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
22380$as_echo "$gl_cv_func_dup2_works" >&6; }
22381 case "$gl_cv_func_dup2_works" in
22382 *yes) ;;
22383 *)
22384 REPLACE_DUP2=1
22385 ;;
22386 esac
22387 fi
3e0be4ab 22388
3e0be4ab 22389
a6342fc8 22390 if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
f199cab1 22391
f199cab1
GM
22392
22393
f199cab1 22394
f199cab1 22395
f199cab1 22396
f199cab1 22397
f199cab1 22398
5476a9a4 22399 gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
f199cab1
GM
22400
22401
a6342fc8 22402 fi
f199cab1 22403
f199cab1 22404
f199cab1 22405
f199cab1 22406
f199cab1 22407
5476a9a4 22408 GNULIB_DUP2=1
f199cab1
GM
22409
22410
f199cab1 22411
f199cab1 22412
3e0be4ab 22413
3e0be4ab 22414
f199cab1
GM
22415
22416
ae0d7250 22417
ae0d7250 22418
5476a9a4 22419
93131e11
GM
22420 GNULIB_ENVIRON=1
22421
22422
22423
22424
22425
22426
22427
22428
3a019ab4 22429
8966cbff
GM
22430 LIB_EXECINFO=''
22431 EXECINFO_H='execinfo.h'
22432
22433 if test $ac_cv_header_execinfo_h = yes; then
22434 gl_saved_libs=$LIBS
22435 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing backtrace_symbols_fd" >&5
22436$as_echo_n "checking for library containing backtrace_symbols_fd... " >&6; }
22437if test "${ac_cv_search_backtrace_symbols_fd+set}" = set; then :
22438 $as_echo_n "(cached) " >&6
22439else
22440 ac_func_search_save_LIBS=$LIBS
22441cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22442/* end confdefs.h. */
22443
22444/* Override any GCC internal prototype to avoid an error.
22445 Use char because int might match the return type of a GCC
22446 builtin and then its argument prototype would still apply. */
22447#ifdef __cplusplus
22448extern "C"
22449#endif
22450char backtrace_symbols_fd ();
22451int
22452main ()
22453{
22454return backtrace_symbols_fd ();
22455 ;
22456 return 0;
22457}
22458_ACEOF
22459for ac_lib in '' execinfo; do
22460 if test -z "$ac_lib"; then
22461 ac_res="none required"
22462 else
22463 ac_res=-l$ac_lib
22464 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
22465 fi
22466 if ac_fn_c_try_link "$LINENO"; then :
22467 ac_cv_search_backtrace_symbols_fd=$ac_res
22468fi
22469rm -f core conftest.err conftest.$ac_objext \
22470 conftest$ac_exeext
22471 if test "${ac_cv_search_backtrace_symbols_fd+set}" = set; then :
22472 break
22473fi
22474done
22475if test "${ac_cv_search_backtrace_symbols_fd+set}" = set; then :
22476
22477else
22478 ac_cv_search_backtrace_symbols_fd=no
22479fi
22480rm conftest.$ac_ext
22481LIBS=$ac_func_search_save_LIBS
22482fi
22483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_backtrace_symbols_fd" >&5
22484$as_echo "$ac_cv_search_backtrace_symbols_fd" >&6; }
22485ac_res=$ac_cv_search_backtrace_symbols_fd
22486if test "$ac_res" != no; then :
22487 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
22488 test "$ac_cv_search_backtrace_symbols_fd" = "none required" ||
22489 LIB_EXECINFO=$ac_cv_search_backtrace_symbols_fd
22490fi
22491
22492 LIBS=$gl_saved_libs
22493 test "$ac_cv_search_backtrace_symbols_fd" = no || EXECINFO_H=''
22494 fi
22495
22496 if test -n "$EXECINFO_H"; then
22497
22498
22499
22500
22501
22502
22503
22504
22505 gl_LIBOBJS="$gl_LIBOBJS execinfo.$ac_objext"
22506
22507 fi
22508
22509
22510
22511 if test -n "$EXECINFO_H"; then
22512 GL_GENERATE_EXECINFO_H_TRUE=
22513 GL_GENERATE_EXECINFO_H_FALSE='#'
22514else
22515 GL_GENERATE_EXECINFO_H_TRUE='#'
22516 GL_GENERATE_EXECINFO_H_FALSE=
22517fi
22518
22519
22520
22521
22522
93131e11
GM
22523
22524
22525
7cd2ed2c 22526
710f5812
GM
22527 if test $ac_cv_func_faccessat = no; then
22528 HAVE_FACCESSAT=0
22529 fi
22530
22531 if test $HAVE_FACCESSAT = 0; then
22532
22533
22534
22535
22536
22537
22538
22539
22540 gl_LIBOBJS="$gl_LIBOBJS faccessat.$ac_objext"
22541
22542
22543 for ac_func in access
22544do :
22545 ac_fn_c_check_func "$LINENO" "access" "ac_cv_func_access"
22546if test "x$ac_cv_func_access" = x""yes; then :
22547 cat >>confdefs.h <<_ACEOF
22548#define HAVE_ACCESS 1
22549_ACEOF
22550
22551fi
22552done
22553
22554
22555 fi
22556
22557
22558cat >>confdefs.h <<_ACEOF
22559#define GNULIB_FACCESSAT 1
22560_ACEOF
22561
22562
22563
22564
22565
22566
22567
22568 GNULIB_FACCESSAT=1
22569
22570
22571
22572
22573
22574
22575
22576
22577
22578
22579
22580
22581
22582
22583
22584
22585 if test $gl_cv_have_include_next = yes; then
22586 gl_cv_next_fcntl_h='<'fcntl.h'>'
22587 else
22588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
22589$as_echo_n "checking absolute name of <fcntl.h>... " >&6; }
22590if test "${gl_cv_next_fcntl_h+set}" = set; then :
22591 $as_echo_n "(cached) " >&6
22592else
22593
22594 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22595/* end confdefs.h. */
22596#include <fcntl.h>
22597
22598_ACEOF
22599 case "$host_os" in
22600 aix*) gl_absname_cpp="$ac_cpp -C" ;;
22601 *) gl_absname_cpp="$ac_cpp" ;;
22602 esac
22603
22604 case "$host_os" in
22605 mingw*)
22606 gl_dirsep_regex='[/\\]'
22607 ;;
22608 *)
22609 gl_dirsep_regex='\/'
22610 ;;
22611 esac
22612 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22613
22614 gl_header_literal_regex=`echo 'fcntl.h' \
22615 | sed -e "$gl_make_literal_regex_sed"`
22616 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22617 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22618 s|^/[^/]|//&|
22619 p
22620 q
22621 }'
22622 gl_cv_next_fcntl_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22623 sed -n "$gl_absolute_header_sed"`'"'
22624
22625
22626fi
22627{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
22628$as_echo "$gl_cv_next_fcntl_h" >&6; }
22629 fi
22630 NEXT_FCNTL_H=$gl_cv_next_fcntl_h
22631
22632 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22633 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22634 gl_next_as_first_directive='<'fcntl.h'>'
22635 else
22636 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22637 gl_next_as_first_directive=$gl_cv_next_fcntl_h
22638 fi
22639 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
22640
22641
22642
22643
22644
22645
22646
22647
22648
22649
22650
22651
22652
22653
22654
2407788f
GM
22655 LIB_FDATASYNC=
22656
22657
22658 if test $ac_cv_have_decl_fdatasync = no; then
22659 HAVE_DECL_FDATASYNC=0
22660 for ac_func in fdatasync
22661do :
22662 ac_fn_c_check_func "$LINENO" "fdatasync" "ac_cv_func_fdatasync"
22663if test "x$ac_cv_func_fdatasync" = x""yes; then :
22664 cat >>confdefs.h <<_ACEOF
22665#define HAVE_FDATASYNC 1
22666_ACEOF
22667
22668fi
22669done
22670
22671 if test $ac_cv_func_fdatasync = no; then
22672 HAVE_FDATASYNC=0
22673 fi
22674 else
22675 gl_saved_libs=$LIBS
22676 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5
22677$as_echo_n "checking for library containing fdatasync... " >&6; }
22678if test "${ac_cv_search_fdatasync+set}" = set; then :
22679 $as_echo_n "(cached) " >&6
22680else
22681 ac_func_search_save_LIBS=$LIBS
22682cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22683/* end confdefs.h. */
22684
22685/* Override any GCC internal prototype to avoid an error.
22686 Use char because int might match the return type of a GCC
22687 builtin and then its argument prototype would still apply. */
22688#ifdef __cplusplus
22689extern "C"
22690#endif
22691char fdatasync ();
22692int
22693main ()
22694{
22695return fdatasync ();
22696 ;
22697 return 0;
22698}
22699_ACEOF
22700for ac_lib in '' rt posix4; do
22701 if test -z "$ac_lib"; then
22702 ac_res="none required"
22703 else
22704 ac_res=-l$ac_lib
22705 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
22706 fi
22707 if ac_fn_c_try_link "$LINENO"; then :
22708 ac_cv_search_fdatasync=$ac_res
22709fi
22710rm -f core conftest.err conftest.$ac_objext \
22711 conftest$ac_exeext
22712 if test "${ac_cv_search_fdatasync+set}" = set; then :
22713 break
22714fi
22715done
22716if test "${ac_cv_search_fdatasync+set}" = set; then :
22717
22718else
22719 ac_cv_search_fdatasync=no
22720fi
22721rm conftest.$ac_ext
22722LIBS=$ac_func_search_save_LIBS
22723fi
22724{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fdatasync" >&5
22725$as_echo "$ac_cv_search_fdatasync" >&6; }
22726ac_res=$ac_cv_search_fdatasync
22727if test "$ac_res" != no; then :
22728 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
22729 test "$ac_cv_search_fdatasync" = "none required" ||
22730 LIB_FDATASYNC=$ac_cv_search_fdatasync
22731fi
22732
22733 LIBS=$gl_saved_libs
22734 fi
22735
22736 if test $HAVE_FDATASYNC = 0; then
22737
22738
22739
22740
22741
22742
22743
22744
22745 gl_LIBOBJS="$gl_LIBOBJS fdatasync.$ac_objext"
22746
22747 fi
22748
22749
22750
22751
22752
22753 GNULIB_FDATASYNC=1
22754
22755
22756
22757
22758
22759
22760
22761
22762
710f5812 22763
d7ad186c
GM
22764 ac_fn_c_check_decl "$LINENO" "fdopendir" "ac_cv_have_decl_fdopendir" "
22765#include <dirent.h>
22766
22767"
22768if test "x$ac_cv_have_decl_fdopendir" = x""yes; then :
22769 ac_have_decl=1
22770else
22771 ac_have_decl=0
22772fi
22773
22774cat >>confdefs.h <<_ACEOF
22775#define HAVE_DECL_FDOPENDIR $ac_have_decl
22776_ACEOF
22777if test $ac_have_decl = 1; then :
22778
22779else
22780 HAVE_DECL_FDOPENDIR=0
22781fi
22782
22783
22784 if test $ac_cv_func_fdopendir = no; then
22785 HAVE_FDOPENDIR=0
22786 else
22787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fdopendir works" >&5
22788$as_echo_n "checking whether fdopendir works... " >&6; }
22789if test "${gl_cv_func_fdopendir_works+set}" = set; then :
22790 $as_echo_n "(cached) " >&6
22791else
22792 if test "$cross_compiling" = yes; then :
22793 case "$host_os" in
22794 # Guess yes on glibc systems.
22795 *-gnu*) gl_cv_func_fdopendir_works="guessing yes" ;;
22796 # If we don't know, assume the worst.
22797 *) gl_cv_func_fdopendir_works="guessing no" ;;
22798 esac
22799
22800else
22801 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22802/* end confdefs.h. */
22803
22804#include <dirent.h>
22805#include <fcntl.h>
22806#include <unistd.h>
22807#if !HAVE_DECL_FDOPENDIR
22808extern
22809# ifdef __cplusplus
22810"C"
22811# endif
22812DIR *fdopendir (int);
22813#endif
22814
22815int
22816main ()
22817{
22818int result = 0;
22819 int fd = open ("conftest.c", O_RDONLY);
22820 if (fd < 0) result |= 1;
22821 if (fdopendir (fd)) result |= 2;
22822 if (close (fd)) result |= 4;
22823 return result;
22824 ;
22825 return 0;
22826}
22827_ACEOF
22828if ac_fn_c_try_run "$LINENO"; then :
22829 gl_cv_func_fdopendir_works=yes
22830else
22831 gl_cv_func_fdopendir_works=no
22832fi
22833rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22834 conftest.$ac_objext conftest.beam conftest.$ac_ext
22835fi
22836
22837fi
22838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopendir_works" >&5
22839$as_echo "$gl_cv_func_fdopendir_works" >&6; }
22840 case "$gl_cv_func_fdopendir_works" in
22841 *yes) ;;
22842 *)
22843 REPLACE_FDOPENDIR=1
22844 ;;
22845 esac
22846 fi
22847
22848 if test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1; then
22849
22850
22851
22852
22853
22854
22855
22856
22857 gl_LIBOBJS="$gl_LIBOBJS fdopendir.$ac_objext"
22858
22859 fi
22860
22861
22862
22863
22864
22865 GNULIB_FDOPENDIR=1
22866
22867
22868
22869
22870
22871
22872
22873cat >>confdefs.h <<_ACEOF
22874#define GNULIB_FDOPENDIR 1
22875_ACEOF
22876
22877
22878
22879
22880
22881
22882
710f5812 22883
3bf26e96
GM
22884
22885 fp_headers='
22886# include <stdio.h>
22887# if HAVE_STDIO_EXT_H
22888# include <stdio_ext.h>
22889# endif
22890'
22891 ac_fn_c_check_decl "$LINENO" "__fpending" "ac_cv_have_decl___fpending" "$fp_headers
22892"
22893if test "x$ac_cv_have_decl___fpending" = x""yes; then :
22894 ac_have_decl=1
22895else
22896 ac_have_decl=0
22897fi
22898
22899cat >>confdefs.h <<_ACEOF
22900#define HAVE_DECL___FPENDING $ac_have_decl
22901_ACEOF
22902
22903
22904 if test $ac_cv_func___fpending = no; then
22905
22906
22907
22908
22909
22910
22911
22912
22913 gl_LIBOBJS="$gl_LIBOBJS fpending.$ac_objext"
22914
22915
22916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to determine the number of pending output bytes on a stream" >&5
22917$as_echo_n "checking how to determine the number of pending output bytes on a stream... " >&6; }
22918if test "${ac_cv_sys_pending_output_n_bytes+set}" = set; then :
22919 $as_echo_n "(cached) " >&6
22920else
22921
22922 for ac_expr in \
22923 \
22924 '# glibc2' \
22925 'fp->_IO_write_ptr - fp->_IO_write_base' \
22926 \
22927 '# traditional Unix' \
22928 'fp->_ptr - fp->_base' \
22929 \
22930 '# BSD' \
22931 'fp->_p - fp->_bf._base' \
22932 \
22933 '# SCO, Unixware' \
22934 '(fp->__ptr ? fp->__ptr - fp->__base : 0)' \
22935 \
22936 '# QNX' \
22937 '(fp->_Mode & 0x2000 /*_MWRITE*/ ? fp->_Next - fp->_Buf : 0)' \
22938 \
22939 '# old glibc?' \
22940 'fp->__bufp - fp->__buffer' \
22941 \
22942 '# old glibc iostream?' \
22943 'fp->_pptr - fp->_pbase' \
22944 \
22945 '# emx+gcc' \
22946 'fp->_ptr - fp->_buffer' \
22947 \
22948 '# Minix' \
22949 'fp->_ptr - fp->_buf' \
22950 \
22951 '# Plan9' \
22952 'fp->wp - fp->buf' \
22953 \
22954 '# VMS' \
22955 '(*fp)->_ptr - (*fp)->_base' \
22956 \
22957 '# e.g., DGUX R4.11; the info is not available' \
22958 1 \
22959 ; do
22960
22961 # Skip each embedded comment.
22962 case "$ac_expr" in '#'*) continue;; esac
22963
22964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22965/* end confdefs.h. */
22966#include <stdio.h>
22967int
22968main ()
22969{
22970FILE *fp = stdin; (void) ($ac_expr);
22971 ;
22972 return 0;
22973}
22974_ACEOF
22975if ac_fn_c_try_compile "$LINENO"; then :
22976 fp_done=yes
22977
22978fi
22979rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22980 test "$fp_done" = yes && break
22981 done
22982
22983 ac_cv_sys_pending_output_n_bytes=$ac_expr
22984
22985
22986fi
22987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_pending_output_n_bytes" >&5
22988$as_echo "$ac_cv_sys_pending_output_n_bytes" >&6; }
22989
22990cat >>confdefs.h <<_ACEOF
22991#define PENDING_OUTPUT_N_BYTES $ac_cv_sys_pending_output_n_bytes
22992_ACEOF
22993
22994
22995 fi
22996
22997
d7ad186c
GM
22998
22999
23000
23001
23002 if test $ac_cv_func_fstatat = no; then
23003 HAVE_FSTATAT=0
23004 else
23005 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fstatat (..., 0) works" >&5
23006$as_echo_n "checking whether fstatat (..., 0) works... " >&6; }
23007if test "${gl_cv_func_fstatat_zero_flag+set}" = set; then :
23008 $as_echo_n "(cached) " >&6
23009else
23010 if test "$cross_compiling" = yes; then :
23011 case "$host_os" in
23012 aix*) gl_cv_func_fstatat_zero_flag="guessing no";;
23013 *) gl_cv_func_fstatat_zero_flag="guessing yes";;
23014 esac
23015
23016else
23017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23018/* end confdefs.h. */
23019
23020 #include <fcntl.h>
23021 #include <sys/stat.h>
23022 int
23023 main (void)
23024 {
23025 struct stat a;
23026 return fstatat (AT_FDCWD, ".", &a, 0) != 0;
23027 }
23028
23029_ACEOF
23030if ac_fn_c_try_run "$LINENO"; then :
23031 gl_cv_func_fstatat_zero_flag=yes
23032else
23033 gl_cv_func_fstatat_zero_flag=no
23034fi
23035rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23036 conftest.$ac_objext conftest.beam conftest.$ac_ext
23037fi
23038
23039
23040fi
23041{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fstatat_zero_flag" >&5
23042$as_echo "$gl_cv_func_fstatat_zero_flag" >&6; }
23043
23044 case $gl_cv_func_fstatat_zero_flag+$gl_cv_func_lstat_dereferences_slashed_symlink in
23045 *yes+*yes) ;;
23046 *) REPLACE_FSTATAT=1
23047 case $gl_cv_func_fstatat_zero_flag in
23048 *yes)
23049
23050$as_echo "#define HAVE_WORKING_FSTATAT_ZERO_FLAG 1" >>confdefs.h
23051
23052 ;;
23053 esac
23054 ;;
23055 esac
23056 fi
23057
23058 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
23059
23060
23061
23062
23063
23064
23065
23066
23067 gl_LIBOBJS="$gl_LIBOBJS fstatat.$ac_objext"
23068
23069 fi
23070
23071
23072
23073
23074
23075 GNULIB_FSTATAT=1
23076
23077
23078
23079
23080
23081
23082
2407788f
GM
23083
23084 if test $ac_cv_func_fsync = no; then
23085 HAVE_FSYNC=0
23086 fi
23087
23088 if test $HAVE_FSYNC = 0; then
23089
23090
23091
23092
23093
23094
23095
23096
23097 gl_LIBOBJS="$gl_LIBOBJS fsync.$ac_objext"
23098
23099 :
23100 fi
23101
23102
23103
23104
23105
23106 GNULIB_FSYNC=1
23107
23108
23109
23110
23111
23112
23113
5476a9a4
GM
23114# Persuade glibc <stdlib.h> to declare getloadavg().
23115
23116
23117gl_save_LIBS=$LIBS
23118
23119# getloadvg is present in libc on glibc >= 2.2, Mac OS X, FreeBSD >= 2.0,
23120# NetBSD >= 0.9, OpenBSD >= 2.0, Solaris >= 7.
23121HAVE_GETLOADAVG=1
23122ac_fn_c_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg"
23123if test "x$ac_cv_func_getloadavg" = x""yes; then :
23124
23125else
23126 gl_func_getloadavg_done=no
23127
23128 # Some systems with -lutil have (and need) -lkvm as well, some do not.
23129 # On Solaris, -lkvm requires nlist from -lelf, so check that first
23130 # to get the right answer into the cache.
23131 # For kstat on solaris, we need to test for libelf and libkvm to force the
23132 # definition of SVR4 below.
23133 if test $gl_func_getloadavg_done = no; then
23134 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_begin in -lelf" >&5
23135$as_echo_n "checking for elf_begin in -lelf... " >&6; }
23136if test "${ac_cv_lib_elf_elf_begin+set}" = set; then :
6ad6792b
GM
23137 $as_echo_n "(cached) " >&6
23138else
3e0be4ab 23139 ac_check_lib_save_LIBS=$LIBS
5476a9a4 23140LIBS="-lelf $LIBS"
3e0be4ab 23141cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6ad6792b 23142/* end confdefs.h. */
6ad6792b 23143
3e0be4ab
GM
23144/* Override any GCC internal prototype to avoid an error.
23145 Use char because int might match the return type of a GCC
23146 builtin and then its argument prototype would still apply. */
23147#ifdef __cplusplus
23148extern "C"
23149#endif
5476a9a4 23150char elf_begin ();
6ad6792b
GM
23151int
23152main ()
23153{
5476a9a4 23154return elf_begin ();
6ad6792b
GM
23155 ;
23156 return 0;
23157}
23158_ACEOF
3e0be4ab 23159if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 23160 ac_cv_lib_elf_elf_begin=yes
3e0be4ab 23161else
5476a9a4 23162 ac_cv_lib_elf_elf_begin=no
6ad6792b 23163fi
3e0be4ab
GM
23164rm -f core conftest.err conftest.$ac_objext \
23165 conftest$ac_exeext conftest.$ac_ext
23166LIBS=$ac_check_lib_save_LIBS
6ad6792b 23167fi
5476a9a4
GM
23168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_elf_elf_begin" >&5
23169$as_echo "$ac_cv_lib_elf_elf_begin" >&6; }
23170if test "x$ac_cv_lib_elf_elf_begin" = x""yes; then :
23171 LIBS="-lelf $LIBS"
6ad6792b
GM
23172fi
23173
5476a9a4
GM
23174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kvm_open in -lkvm" >&5
23175$as_echo_n "checking for kvm_open in -lkvm... " >&6; }
23176if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then :
6c051bab
GM
23177 $as_echo_n "(cached) " >&6
23178else
5476a9a4
GM
23179 ac_check_lib_save_LIBS=$LIBS
23180LIBS="-lkvm $LIBS"
23181cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c051bab 23182/* end confdefs.h. */
3e0be4ab 23183
5476a9a4
GM
23184/* Override any GCC internal prototype to avoid an error.
23185 Use char because int might match the return type of a GCC
23186 builtin and then its argument prototype would still apply. */
23187#ifdef __cplusplus
23188extern "C"
23189#endif
23190char kvm_open ();
6c051bab
GM
23191int
23192main ()
23193{
5476a9a4 23194return kvm_open ();
6c051bab
GM
23195 ;
23196 return 0;
23197}
23198_ACEOF
3e0be4ab 23199if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 23200 ac_cv_lib_kvm_kvm_open=yes
6c051bab 23201else
5476a9a4 23202 ac_cv_lib_kvm_kvm_open=no
6c051bab 23203fi
3e0be4ab
GM
23204rm -f core conftest.err conftest.$ac_objext \
23205 conftest$ac_exeext conftest.$ac_ext
5476a9a4 23206LIBS=$ac_check_lib_save_LIBS
6c051bab 23207fi
5476a9a4
GM
23208{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kvm_kvm_open" >&5
23209$as_echo "$ac_cv_lib_kvm_kvm_open" >&6; }
23210if test "x$ac_cv_lib_kvm_kvm_open" = x""yes; then :
23211 LIBS="-lkvm $LIBS"
3e0be4ab 23212fi
6c051bab 23213
5476a9a4
GM
23214 # Check for the 4.4BSD definition of getloadavg.
23215 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lutil" >&5
23216$as_echo_n "checking for getloadavg in -lutil... " >&6; }
23217if test "${ac_cv_lib_util_getloadavg+set}" = set; then :
ae0d7250
PE
23218 $as_echo_n "(cached) " >&6
23219else
5476a9a4
GM
23220 ac_check_lib_save_LIBS=$LIBS
23221LIBS="-lutil $LIBS"
23222cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6d153f56 23223/* end confdefs.h. */
5476a9a4
GM
23224
23225/* Override any GCC internal prototype to avoid an error.
23226 Use char because int might match the return type of a GCC
23227 builtin and then its argument prototype would still apply. */
23228#ifdef __cplusplus
23229extern "C"
23230#endif
23231char getloadavg ();
ae0d7250
PE
23232int
23233main ()
23234{
5476a9a4 23235return getloadavg ();
ae0d7250
PE
23236 ;
23237 return 0;
23238}
23239_ACEOF
3e0be4ab 23240if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 23241 ac_cv_lib_util_getloadavg=yes
ae0d7250 23242else
5476a9a4 23243 ac_cv_lib_util_getloadavg=no
ae0d7250 23244fi
3e0be4ab
GM
23245rm -f core conftest.err conftest.$ac_objext \
23246 conftest$ac_exeext conftest.$ac_ext
5476a9a4
GM
23247LIBS=$ac_check_lib_save_LIBS
23248fi
23249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_getloadavg" >&5
23250$as_echo "$ac_cv_lib_util_getloadavg" >&6; }
23251if test "x$ac_cv_lib_util_getloadavg" = x""yes; then :
23252 LIBS="-lutil $LIBS" gl_func_getloadavg_done=yes
3e0be4ab 23253fi
6d153f56 23254
5476a9a4 23255 fi
6d153f56 23256
5476a9a4
GM
23257 if test $gl_func_getloadavg_done = no; then
23258 # There is a commonly available library for RS/6000 AIX.
23259 # Since it is not a standard part of AIX, it might be installed locally.
23260 gl_getloadavg_LIBS=$LIBS
23261 LIBS="-L/usr/local/lib $LIBS"
23262 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lgetloadavg" >&5
23263$as_echo_n "checking for getloadavg in -lgetloadavg... " >&6; }
23264if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then :
f199cab1 23265 $as_echo_n "(cached) " >&6
3e0be4ab 23266else
f199cab1 23267 ac_check_lib_save_LIBS=$LIBS
5476a9a4 23268LIBS="-lgetloadavg $LIBS"
f199cab1
GM
23269cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23270/* end confdefs.h. */
3e0be4ab 23271
f199cab1
GM
23272/* Override any GCC internal prototype to avoid an error.
23273 Use char because int might match the return type of a GCC
23274 builtin and then its argument prototype would still apply. */
23275#ifdef __cplusplus
23276extern "C"
23277#endif
5476a9a4 23278char getloadavg ();
f199cab1
GM
23279int
23280main ()
23281{
5476a9a4 23282return getloadavg ();
f199cab1
GM
23283 ;
23284 return 0;
23285}
ae0d7250 23286_ACEOF
f199cab1 23287if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 23288 ac_cv_lib_getloadavg_getloadavg=yes
f199cab1 23289else
5476a9a4 23290 ac_cv_lib_getloadavg_getloadavg=no
ae0d7250 23291fi
f199cab1
GM
23292rm -f core conftest.err conftest.$ac_objext \
23293 conftest$ac_exeext conftest.$ac_ext
23294LIBS=$ac_check_lib_save_LIBS
3e0be4ab 23295fi
5476a9a4
GM
23296{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_getloadavg_getloadavg" >&5
23297$as_echo "$ac_cv_lib_getloadavg_getloadavg" >&6; }
23298if test "x$ac_cv_lib_getloadavg_getloadavg" = x""yes; then :
23299 LIBS="-lgetloadavg $LIBS" gl_func_getloadavg_done=yes
23300else
23301 LIBS=$gl_getloadavg_LIBS
6d153f56 23302fi
ae0d7250 23303
5476a9a4 23304 fi
16c3e636 23305
5476a9a4
GM
23306 # Set up the replacement function if necessary.
23307 if test $gl_func_getloadavg_done = no; then
23308 HAVE_GETLOADAVG=0
16c3e636 23309
5476a9a4
GM
23310 # Solaris has libkstat which does not require root.
23311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kstat_open in -lkstat" >&5
23312$as_echo_n "checking for kstat_open in -lkstat... " >&6; }
23313if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then :
f199cab1
GM
23314 $as_echo_n "(cached) " >&6
23315else
23316 ac_check_lib_save_LIBS=$LIBS
5476a9a4 23317LIBS="-lkstat $LIBS"
f199cab1
GM
23318cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23319/* end confdefs.h. */
5f90be1b 23320
f199cab1
GM
23321/* Override any GCC internal prototype to avoid an error.
23322 Use char because int might match the return type of a GCC
23323 builtin and then its argument prototype would still apply. */
23324#ifdef __cplusplus
23325extern "C"
23326#endif
5476a9a4 23327char kstat_open ();
f199cab1
GM
23328int
23329main ()
23330{
5476a9a4 23331return kstat_open ();
f199cab1
GM
23332 ;
23333 return 0;
23334}
3e0be4ab 23335_ACEOF
f199cab1 23336if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 23337 ac_cv_lib_kstat_kstat_open=yes
f199cab1 23338else
5476a9a4 23339 ac_cv_lib_kstat_kstat_open=no
5f90be1b 23340fi
f199cab1
GM
23341rm -f core conftest.err conftest.$ac_objext \
23342 conftest$ac_exeext conftest.$ac_ext
23343LIBS=$ac_check_lib_save_LIBS
3e0be4ab 23344fi
5476a9a4
GM
23345{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kstat_kstat_open" >&5
23346$as_echo "$ac_cv_lib_kstat_kstat_open" >&6; }
23347if test "x$ac_cv_lib_kstat_kstat_open" = x""yes; then :
3e0be4ab 23348 cat >>confdefs.h <<_ACEOF
5476a9a4 23349#define HAVE_LIBKSTAT 1
3e0be4ab 23350_ACEOF
5f90be1b 23351
5476a9a4 23352 LIBS="-lkstat $LIBS"
5f90be1b 23353
f199cab1 23354fi
5f90be1b 23355
5476a9a4 23356 test $ac_cv_lib_kstat_kstat_open = yes && gl_func_getloadavg_done=yes
da6c8463 23357
5476a9a4
GM
23358 # AIX has libperfstat which does not require root
23359 if test $gl_func_getloadavg_done = no; then
23360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for perfstat_cpu_total in -lperfstat" >&5
23361$as_echo_n "checking for perfstat_cpu_total in -lperfstat... " >&6; }
23362if test "${ac_cv_lib_perfstat_perfstat_cpu_total+set}" = set; then :
f199cab1
GM
23363 $as_echo_n "(cached) " >&6
23364else
5476a9a4
GM
23365 ac_check_lib_save_LIBS=$LIBS
23366LIBS="-lperfstat $LIBS"
23367cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5f90be1b 23368/* end confdefs.h. */
5476a9a4
GM
23369
23370/* Override any GCC internal prototype to avoid an error.
23371 Use char because int might match the return type of a GCC
23372 builtin and then its argument prototype would still apply. */
23373#ifdef __cplusplus
23374extern "C"
23375#endif
23376char perfstat_cpu_total ();
5f90be1b
PE
23377int
23378main ()
23379{
5476a9a4 23380return perfstat_cpu_total ();
5f90be1b
PE
23381 ;
23382 return 0;
23383}
23384_ACEOF
5476a9a4
GM
23385if ac_fn_c_try_link "$LINENO"; then :
23386 ac_cv_lib_perfstat_perfstat_cpu_total=yes
f199cab1 23387else
5476a9a4 23388 ac_cv_lib_perfstat_perfstat_cpu_total=no
f199cab1 23389fi
5476a9a4
GM
23390rm -f core conftest.err conftest.$ac_objext \
23391 conftest$ac_exeext conftest.$ac_ext
23392LIBS=$ac_check_lib_save_LIBS
f199cab1 23393fi
5476a9a4
GM
23394{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_perfstat_perfstat_cpu_total" >&5
23395$as_echo "$ac_cv_lib_perfstat_perfstat_cpu_total" >&6; }
23396if test "x$ac_cv_lib_perfstat_perfstat_cpu_total" = x""yes; then :
23397 cat >>confdefs.h <<_ACEOF
23398#define HAVE_LIBPERFSTAT 1
23399_ACEOF
23400
23401 LIBS="-lperfstat $LIBS"
23402
23403fi
23404
23405 test $ac_cv_lib_perfstat_perfstat_cpu_total = yes && gl_func_getloadavg_done=yes
23406 fi
23407
23408 if test $gl_func_getloadavg_done = no; then
23409 ac_fn_c_check_header_mongrel "$LINENO" "sys/dg_sys_info.h" "ac_cv_header_sys_dg_sys_info_h" "$ac_includes_default"
23410if test "x$ac_cv_header_sys_dg_sys_info_h" = x""yes; then :
23411 gl_func_getloadavg_done=yes
23412
23413$as_echo "#define DGUX 1" >>confdefs.h
23414
23415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dg_sys_info in -ldgc" >&5
23416$as_echo_n "checking for dg_sys_info in -ldgc... " >&6; }
23417if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then :
f199cab1
GM
23418 $as_echo_n "(cached) " >&6
23419else
23420 ac_check_lib_save_LIBS=$LIBS
5476a9a4 23421LIBS="-ldgc $LIBS"
f199cab1
GM
23422cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23423/* end confdefs.h. */
3e0be4ab 23424
f199cab1
GM
23425/* Override any GCC internal prototype to avoid an error.
23426 Use char because int might match the return type of a GCC
23427 builtin and then its argument prototype would still apply. */
23428#ifdef __cplusplus
23429extern "C"
23430#endif
5476a9a4 23431char dg_sys_info ();
f199cab1
GM
23432int
23433main ()
23434{
5476a9a4 23435return dg_sys_info ();
f199cab1
GM
23436 ;
23437 return 0;
23438}
23439_ACEOF
23440if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 23441 ac_cv_lib_dgc_dg_sys_info=yes
f199cab1 23442else
5476a9a4 23443 ac_cv_lib_dgc_dg_sys_info=no
5f90be1b 23444fi
3e0be4ab
GM
23445rm -f core conftest.err conftest.$ac_objext \
23446 conftest$ac_exeext conftest.$ac_ext
f199cab1 23447LIBS=$ac_check_lib_save_LIBS
5f90be1b 23448fi
5476a9a4
GM
23449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dgc_dg_sys_info" >&5
23450$as_echo "$ac_cv_lib_dgc_dg_sys_info" >&6; }
23451if test "x$ac_cv_lib_dgc_dg_sys_info" = x""yes; then :
23452 cat >>confdefs.h <<_ACEOF
23453#define HAVE_LIBDGC 1
23454_ACEOF
23455
23456 LIBS="-ldgc $LIBS"
23457
da6c8463
GM
23458fi
23459
5476a9a4
GM
23460fi
23461
23462
23463 fi
23464 fi
23465fi
23466
23467
23468if test "x$gl_save_LIBS" = x; then
23469 GETLOADAVG_LIBS=$LIBS
f199cab1 23470else
5476a9a4
GM
23471 GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$gl_save_LIBS!!"`
23472fi
23473LIBS=$gl_save_LIBS
23474
23475
23476# Test whether the system declares getloadavg. Solaris has the function
23477# but declares it in <sys/loadavg.h>, not <stdlib.h>.
23478for ac_header in sys/loadavg.h
23479do :
23480 ac_fn_c_check_header_mongrel "$LINENO" "sys/loadavg.h" "ac_cv_header_sys_loadavg_h" "$ac_includes_default"
23481if test "x$ac_cv_header_sys_loadavg_h" = x""yes; then :
23482 cat >>confdefs.h <<_ACEOF
23483#define HAVE_SYS_LOADAVG_H 1
f199cab1 23484_ACEOF
5476a9a4 23485
f199cab1 23486fi
5476a9a4
GM
23487
23488done
23489
23490if test $ac_cv_header_sys_loadavg_h = yes; then
23491 HAVE_SYS_LOADAVG_H=1
23492else
23493 HAVE_SYS_LOADAVG_H=0
f199cab1 23494fi
5476a9a4
GM
23495ac_fn_c_check_decl "$LINENO" "getloadavg" "ac_cv_have_decl_getloadavg" "#if HAVE_SYS_LOADAVG_H
23496 # include <sys/loadavg.h>
23497 #endif
23498 #include <stdlib.h>
23499"
23500if test "x$ac_cv_have_decl_getloadavg" = x""yes; then :
5f90be1b 23501
f199cab1 23502else
5476a9a4 23503 HAVE_DECL_GETLOADAVG=0
f199cab1 23504fi
5f90be1b 23505
5f90be1b 23506
a6342fc8 23507 if test $HAVE_GETLOADAVG = 0; then
5476a9a4
GM
23508
23509
23510
23511
23512
23513
23514
23515
23516 gl_LIBOBJS="$gl_LIBOBJS getloadavg.$ac_objext"
23517
23518
23519# Figure out what our getloadavg.c needs.
23520
23521
23522
23523# On HPUX9, an unprivileged user can get load averages this way.
23524if test $gl_func_getloadavg_done = no; then
23525 for ac_func in pstat_getdynamic
23526do :
23527 ac_fn_c_check_func "$LINENO" "pstat_getdynamic" "ac_cv_func_pstat_getdynamic"
23528if test "x$ac_cv_func_pstat_getdynamic" = x""yes; then :
23529 cat >>confdefs.h <<_ACEOF
23530#define HAVE_PSTAT_GETDYNAMIC 1
23531_ACEOF
23532 gl_func_getloadavg_done=yes
3e0be4ab 23533fi
5476a9a4 23534done
6ad6792b 23535
5476a9a4 23536fi
6ad6792b 23537
5476a9a4
GM
23538# We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
23539# uses stabs), but it is still SVR4. We cannot check for <elf.h> because
23540# Irix 4.0.5F has the header but not the library.
23541if test $gl_func_getloadavg_done = no && test "$ac_cv_lib_elf_elf_begin" = yes \
23542 && test "$ac_cv_lib_kvm_kvm_open" = yes; then
23543 gl_func_getloadavg_done=yes
6ad6792b 23544
5476a9a4 23545$as_echo "#define SVR4 1" >>confdefs.h
6ad6792b 23546
5476a9a4
GM
23547fi
23548
23549if test $gl_func_getloadavg_done = no; then
23550 ac_fn_c_check_header_mongrel "$LINENO" "inq_stats/cpustats.h" "ac_cv_header_inq_stats_cpustats_h" "$ac_includes_default"
23551if test "x$ac_cv_header_inq_stats_cpustats_h" = x""yes; then :
23552 gl_func_getloadavg_done=yes
23553
23554$as_echo "#define UMAX 1" >>confdefs.h
23555
23556
23557$as_echo "#define UMAX4_3 1" >>confdefs.h
23558
23559fi
23560
23561
23562fi
23563
23564if test $gl_func_getloadavg_done = no; then
23565 ac_fn_c_check_header_mongrel "$LINENO" "sys/cpustats.h" "ac_cv_header_sys_cpustats_h" "$ac_includes_default"
23566if test "x$ac_cv_header_sys_cpustats_h" = x""yes; then :
23567 gl_func_getloadavg_done=yes; $as_echo "#define UMAX 1" >>confdefs.h
23568
23569fi
23570
23571
23572fi
23573
23574if test $gl_func_getloadavg_done = no; then
23575 for ac_header in mach/mach.h
23576do :
23577 ac_fn_c_check_header_mongrel "$LINENO" "mach/mach.h" "ac_cv_header_mach_mach_h" "$ac_includes_default"
23578if test "x$ac_cv_header_mach_mach_h" = x""yes; then :
23579 cat >>confdefs.h <<_ACEOF
23580#define HAVE_MACH_MACH_H 1
23581_ACEOF
23582
23583fi
23584
23585done
23586
23587fi
23588
23589for ac_header in nlist.h
23590do :
23591 ac_fn_c_check_header_mongrel "$LINENO" "nlist.h" "ac_cv_header_nlist_h" "$ac_includes_default"
23592if test "x$ac_cv_header_nlist_h" = x""yes; then :
23593 cat >>confdefs.h <<_ACEOF
23594#define HAVE_NLIST_H 1
23595_ACEOF
23596 ac_fn_c_check_member "$LINENO" "struct nlist" "n_un.n_name" "ac_cv_member_struct_nlist_n_un_n_name" "#include <nlist.h>
23597"
23598if test "x$ac_cv_member_struct_nlist_n_un_n_name" = x""yes; then :
23599
23600cat >>confdefs.h <<_ACEOF
23601#define HAVE_STRUCT_NLIST_N_UN_N_NAME 1
23602_ACEOF
6ad6792b 23603
0eb775a3 23604
f199cab1 23605fi
3e0be4ab 23606
5476a9a4 23607 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 23608/* end confdefs.h. */
5476a9a4 23609#include <nlist.h>
f199cab1
GM
23610int
23611main ()
23612{
5476a9a4
GM
23613struct nlist x;
23614 #ifdef HAVE_STRUCT_NLIST_N_UN_N_NAME
23615 x.n_un.n_name = "";
23616 #else
23617 x.n_name = "";
23618 #endif
f199cab1
GM
23619 ;
23620 return 0;
23621}
23622_ACEOF
5476a9a4 23623if ac_fn_c_try_link "$LINENO"; then :
6ad6792b 23624
5476a9a4 23625$as_echo "#define N_NAME_POINTER 1" >>confdefs.h
6ad6792b
GM
23626
23627fi
5476a9a4
GM
23628rm -f core conftest.err conftest.$ac_objext \
23629 conftest$ac_exeext conftest.$ac_ext
6ad6792b 23630
5476a9a4 23631fi
6ad6792b 23632
5476a9a4 23633done
6ad6792b 23634
a6342fc8 23635 fi
ca36e0ff 23636
ca36e0ff
GM
23637
23638
1f5d53eb
PE
23639
23640
5476a9a4 23641 GNULIB_GETLOADAVG=1
1f5d53eb
PE
23642
23643
23644
23645
23646
23647
23648
1f5d53eb 23649
1f5d53eb 23650
3e0be4ab 23651
a6342fc8 23652 if test $REPLACE_GETOPT = 1; then
3e0be4ab 23653
1f5d53eb
PE
23654
23655
1f5d53eb 23656
1f5d53eb
PE
23657
23658
23659
23660
5476a9a4 23661 gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
0eb775a3
GM
23662
23663
1f5d53eb
PE
23664
23665
16c3e636 23666
5476a9a4
GM
23667
23668
23669
23670
23671 gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
23672
23673
23674
23675
a6342fc8
GM
23676 GNULIB_GL_UNISTD_H_GETOPT=1
23677 fi
16c3e636
PE
23678
23679
23680
4fda9c95
GM
23681
23682
23683
23684
5476a9a4
GM
23685 REPLACE_GETOPT=0
23686 if test -n "$gl_replace_getopt"; then
23687 REPLACE_GETOPT=1
23688 fi
23689
23690 if test $REPLACE_GETOPT = 1; then
23691
23692 GETOPT_H=getopt.h
23693
23694$as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
23695
23696
23697
23698 fi
23699
a6342fc8 23700 if test $REPLACE_GETOPT = 1; then
5476a9a4
GM
23701
23702
23703
23704
23705
23706
23707
23708
23709 gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
23710
23711
23712
23713
23714
23715
23716
23717
23718
23719 gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
4fda9c95
GM
23720
23721
23722
23723
a6342fc8
GM
23724 GNULIB_GL_UNISTD_H_GETOPT=1
23725 fi
4fda9c95
GM
23726
23727
23728
23729
4fda9c95 23730
4fda9c95 23731
4fda9c95 23732
5476a9a4
GM
23733
23734
23735
23736
23737
23738 gl_gettimeofday_timezone=void
23739 if test $ac_cv_func_gettimeofday != yes; then
23740 HAVE_GETTIMEOFDAY=0
f199cab1 23741 else
4fda9c95
GM
23742
23743
3e0be4ab 23744
5476a9a4
GM
23745 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5
23746$as_echo_n "checking whether gettimeofday clobbers localtime buffer... " >&6; }
23747if test "${gl_cv_func_gettimeofday_clobber+set}" = set; then :
23748 $as_echo_n "(cached) " >&6
23749else
23750 if test "$cross_compiling" = yes; then :
23751 # When cross-compiling:
23752 case "$host_os" in
23753 # Guess all is fine on glibc systems.
23754 *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
23755 # If we don't know, assume the worst.
23756 *) gl_cv_func_gettimeofday_clobber="guessing yes" ;;
23757 esac
4fda9c95 23758
5476a9a4
GM
23759else
23760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23761/* end confdefs.h. */
23762#include <string.h>
23763 #include <sys/time.h>
23764 #include <time.h>
23765 #include <stdlib.h>
4fda9c95 23766
5476a9a4
GM
23767int
23768main ()
23769{
4fda9c95 23770
5476a9a4
GM
23771 time_t t = 0;
23772 struct tm *lt;
23773 struct tm saved_lt;
23774 struct timeval tv;
23775 lt = localtime (&t);
23776 saved_lt = *lt;
23777 gettimeofday (&tv, NULL);
23778 return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
cc322c06 23779
5476a9a4
GM
23780 ;
23781 return 0;
23782}
23783_ACEOF
23784if ac_fn_c_try_run "$LINENO"; then :
23785 gl_cv_func_gettimeofday_clobber=no
23786else
23787 gl_cv_func_gettimeofday_clobber=yes
23788fi
23789rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23790 conftest.$ac_objext conftest.beam conftest.$ac_ext
23791fi
cc322c06 23792
5476a9a4
GM
23793fi
23794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5
23795$as_echo "$gl_cv_func_gettimeofday_clobber" >&6; }
cc322c06 23796
5476a9a4
GM
23797 case "$gl_cv_func_gettimeofday_clobber" in
23798 *yes)
23799 REPLACE_GETTIMEOFDAY=1
cc322c06 23800
4fda9c95 23801
5476a9a4 23802$as_echo "#define gmtime rpl_gmtime" >>confdefs.h
4fda9c95 23803
ae0d7250 23804
5476a9a4 23805$as_echo "#define localtime rpl_localtime" >>confdefs.h
ae0d7250
PE
23806
23807
ae0d7250 23808
5476a9a4
GM
23809$as_echo "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h
23810
23811 ;;
23812 esac
23813
23814 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
23815$as_echo_n "checking for gettimeofday with POSIX signature... " >&6; }
23816if test "${gl_cv_func_gettimeofday_posix_signature+set}" = set; then :
f199cab1
GM
23817 $as_echo_n "(cached) " >&6
23818else
5476a9a4
GM
23819 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23820/* end confdefs.h. */
23821#include <sys/time.h>
23822 struct timeval c;
23823 int gettimeofday (struct timeval *restrict, void *restrict);
23824
23825int
23826main ()
23827{
23828/* glibc uses struct timezone * rather than the POSIX void *
23829 if _GNU_SOURCE is defined. However, since the only portable
23830 use of gettimeofday uses NULL as the second parameter, and
23831 since the glibc definition is actually more typesafe, it is
23832 not worth wrapping this to get a compliant signature. */
23833 int (*f) (struct timeval *restrict, void *restrict)
23834 = gettimeofday;
23835 int x = f (&c, 0);
23836 return !(x | c.tv_sec | c.tv_usec);
23837
23838 ;
23839 return 0;
23840}
23841_ACEOF
23842if ac_fn_c_try_compile "$LINENO"; then :
23843 gl_cv_func_gettimeofday_posix_signature=yes
23844else
23845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 23846/* end confdefs.h. */
5476a9a4
GM
23847#include <sys/time.h>
23848int gettimeofday (struct timeval *restrict, struct timezone *restrict);
ae0d7250 23849
f199cab1
GM
23850int
23851main ()
23852{
5476a9a4 23853
f199cab1
GM
23854 ;
23855 return 0;
ae0d7250
PE
23856}
23857_ACEOF
5476a9a4
GM
23858if ac_fn_c_try_compile "$LINENO"; then :
23859 gl_cv_func_gettimeofday_posix_signature=almost
ae0d7250 23860else
5476a9a4 23861 gl_cv_func_gettimeofday_posix_signature=no
ae0d7250 23862fi
5476a9a4 23863rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ae0d7250 23864fi
5476a9a4 23865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52724a05 23866fi
5476a9a4
GM
23867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
23868$as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; }
23869 if test $gl_cv_func_gettimeofday_posix_signature = almost; then
23870 gl_gettimeofday_timezone='struct timezone'
23871 elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
23872 REPLACE_GETTIMEOFDAY=1
23873 fi
23874 if test $REPLACE_STRUCT_TIMEVAL = 1; then
23875 REPLACE_GETTIMEOFDAY=1
23876 fi
3e0be4ab 23877
5476a9a4 23878 fi
ae0d7250 23879
5476a9a4
GM
23880cat >>confdefs.h <<_ACEOF
23881#define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone
23882_ACEOF
f199cab1 23883
ae0d7250 23884
a6342fc8 23885 if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
ae0d7250 23886
cc322c06
GM
23887
23888
cc322c06
GM
23889
23890
ae0d7250
PE
23891
23892
23893
5476a9a4 23894 gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
5fa4ac76
PE
23895
23896
5476a9a4
GM
23897 for ac_header in sys/timeb.h
23898do :
23899 ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
23900if test "x$ac_cv_header_sys_timeb_h" = x""yes; then :
23901 cat >>confdefs.h <<_ACEOF
23902#define HAVE_SYS_TIMEB_H 1
23903_ACEOF
5fa4ac76 23904
3e0be4ab 23905fi
5fa4ac76 23906
5476a9a4 23907done
f199cab1 23908
5476a9a4
GM
23909 for ac_func in _ftime
23910do :
23911 ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
23912if test "x$ac_cv_func__ftime" = x""yes; then :
23913 cat >>confdefs.h <<_ACEOF
23914#define HAVE__FTIME 1
23915_ACEOF
5fa4ac76 23916
5476a9a4
GM
23917fi
23918done
5fa4ac76
PE
23919
23920
a6342fc8 23921 fi
5fa4ac76
PE
23922
23923
23924
23925
23926
5476a9a4 23927 GNULIB_GETTIMEOFDAY=1
5fa4ac76
PE
23928
23929
23930
23931
0eb775a3
GM
23932
23933
369e19fc
PE
23934
23935
369e19fc
PE
23936
23937
5476a9a4
GM
23938 if test $ac_cv_func_lstat = yes; then
23939
23940 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
23941 *no)
23942 REPLACE_LSTAT=1
23943 ;;
23944 esac
23945 else
23946 HAVE_LSTAT=0
f199cab1 23947 fi
369e19fc 23948
a6342fc8 23949 if test $REPLACE_LSTAT = 1; then
369e19fc 23950
5fa4ac76 23951
369e19fc 23952
369e19fc 23953
369e19fc 23954
369e19fc 23955
369e19fc 23956
369e19fc 23957
5476a9a4 23958 gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
f199cab1 23959
45d4966b 23960 :
a6342fc8 23961 fi
369e19fc 23962
369e19fc 23963
369e19fc 23964
5fa4ac76
PE
23965
23966
5476a9a4 23967 GNULIB_LSTAT=1
5fa4ac76 23968
5fa4ac76 23969
27505cf5 23970
27505cf5 23971
27505cf5 23972
27505cf5 23973
27505cf5 23974
27505cf5 23975
5fa4ac76
PE
23976
23977
283c7aed
GM
23978 if test $ac_cv_have_decl_memrchr = no; then
23979 HAVE_DECL_MEMRCHR=0
23980 fi
23981
23982 for ac_func in memrchr
23983do :
23984 ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr"
23985if test "x$ac_cv_func_memrchr" = x""yes; then :
23986 cat >>confdefs.h <<_ACEOF
23987#define HAVE_MEMRCHR 1
23988_ACEOF
23989
23990fi
23991done
23992
23993
23994 if test $ac_cv_func_memrchr = no; then
23995
23996
23997
23998
23999
24000
24001
24002
24003 gl_LIBOBJS="$gl_LIBOBJS memrchr.$ac_objext"
24004
24005 :
24006 fi
24007
24008
24009
24010
24011
24012 GNULIB_MEMRCHR=1
24013
24014
24015
24016
24017
24018
24019
24020
24021
24022
5476a9a4
GM
24023
24024 if test $APPLE_UNIVERSAL_BUILD = 1; then
24025 # A universal build on Apple Mac OS X platforms.
24026 # The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode.
24027 # But we need a configuration result that is valid in both modes.
24028 gl_cv_func_working_mktime=no
24029 fi
24030 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5
24031$as_echo_n "checking for working mktime... " >&6; }
24032if test "${gl_cv_func_working_mktime+set}" = set; then :
f199cab1
GM
24033 $as_echo_n "(cached) " >&6
24034else
5476a9a4
GM
24035 if test "$cross_compiling" = yes; then :
24036 gl_cv_func_working_mktime=no
24037else
24038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 24039/* end confdefs.h. */
5476a9a4
GM
24040/* Test program from Paul Eggert and Tony Leneis. */
24041#include <limits.h>
24042#include <stdlib.h>
24043#include <time.h>
5fa4ac76 24044
5476a9a4
GM
24045#ifdef HAVE_UNISTD_H
24046# include <unistd.h>
f199cab1 24047#endif
5476a9a4 24048
2393bc74
GM
24049#if HAVE_DECL_ALARM
24050# include <signal.h>
5476a9a4
GM
24051#endif
24052
24053/* Work around redefinition to rpl_putenv by other config tests. */
24054#undef putenv
24055
24056static time_t time_t_max;
24057static time_t time_t_min;
24058
24059/* Values we'll use to set the TZ environment variable. */
24060static char *tz_strings[] = {
24061 (char *) 0, "TZ=GMT0", "TZ=JST-9",
24062 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
24063};
24064#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
24065
24066/* Return 0 if mktime fails to convert a date in the spring-forward gap.
24067 Based on a problem report from Andreas Jaeger. */
24068static int
24069spring_forward_gap ()
f199cab1 24070{
5476a9a4
GM
24071 /* glibc (up to about 1998-10-07) failed this test. */
24072 struct tm tm;
24073
24074 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
24075 instead of "TZ=America/Vancouver" in order to detect the bug even
24076 on systems that don't support the Olson extension, or don't have the
24077 full zoneinfo tables installed. */
24078 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
24079
24080 tm.tm_year = 98;
24081 tm.tm_mon = 3;
24082 tm.tm_mday = 5;
24083 tm.tm_hour = 2;
24084 tm.tm_min = 0;
24085 tm.tm_sec = 0;
24086 tm.tm_isdst = -1;
24087 return mktime (&tm) != (time_t) -1;
f199cab1 24088}
5fa4ac76 24089
5476a9a4
GM
24090static int
24091mktime_test1 (time_t now)
24092{
24093 struct tm *lt;
24094 return ! (lt = localtime (&now)) || mktime (lt) == now;
24095}
5fa4ac76 24096
5476a9a4
GM
24097static int
24098mktime_test (time_t now)
24099{
24100 return (mktime_test1 (now)
24101 && mktime_test1 ((time_t) (time_t_max - now))
24102 && mktime_test1 ((time_t) (time_t_min + now)));
24103}
067d23c9 24104
5476a9a4
GM
24105static int
24106irix_6_4_bug ()
24107{
24108 /* Based on code from Ariel Faigon. */
24109 struct tm tm;
24110 tm.tm_year = 96;
24111 tm.tm_mon = 3;
24112 tm.tm_mday = 0;
24113 tm.tm_hour = 0;
24114 tm.tm_min = 0;
24115 tm.tm_sec = 0;
24116 tm.tm_isdst = -1;
24117 mktime (&tm);
24118 return tm.tm_mon == 2 && tm.tm_mday == 31;
24119}
24120
24121static int
24122bigtime_test (int j)
24123{
24124 struct tm tm;
24125 time_t now;
24126 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
24127 now = mktime (&tm);
24128 if (now != (time_t) -1)
24129 {
24130 struct tm *lt = localtime (&now);
24131 if (! (lt
24132 && lt->tm_year == tm.tm_year
24133 && lt->tm_mon == tm.tm_mon
24134 && lt->tm_mday == tm.tm_mday
24135 && lt->tm_hour == tm.tm_hour
24136 && lt->tm_min == tm.tm_min
24137 && lt->tm_sec == tm.tm_sec
24138 && lt->tm_yday == tm.tm_yday
24139 && lt->tm_wday == tm.tm_wday
24140 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
24141 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
24142 return 0;
24143 }
24144 return 1;
24145}
369e19fc 24146
5476a9a4
GM
24147static int
24148year_2050_test ()
24149{
24150 /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
24151 ignoring leap seconds. */
24152 unsigned long int answer = 2527315200UL;
369e19fc 24153
5476a9a4
GM
24154 struct tm tm;
24155 time_t t;
24156 tm.tm_year = 2050 - 1900;
24157 tm.tm_mon = 2 - 1;
24158 tm.tm_mday = 1;
24159 tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
24160 tm.tm_isdst = -1;
369e19fc 24161
5476a9a4
GM
24162 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
24163 instead of "TZ=America/Vancouver" in order to detect the bug even
24164 on systems that don't support the Olson extension, or don't have the
24165 full zoneinfo tables installed. */
24166 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
067d23c9 24167
5476a9a4 24168 t = mktime (&tm);
067d23c9 24169
5476a9a4
GM
24170 /* Check that the result is either a failure, or close enough
24171 to the correct answer that we can assume the discrepancy is
24172 due to leap seconds. */
24173 return (t == (time_t) -1
24174 || (0 < t && answer - 120 <= t && t <= answer + 120));
24175}
067d23c9 24176
f199cab1
GM
24177int
24178main ()
24179{
5476a9a4
GM
24180 int result = 0;
24181 time_t t, delta;
24182 int i, j;
24183 int time_t_signed_magnitude = (time_t) ~ (time_t) 0 < (time_t) -1;
24184 int time_t_signed = ! ((time_t) 0 < (time_t) -1);
067d23c9 24185
2393bc74 24186#if HAVE_DECL_ALARM
5476a9a4
GM
24187 /* This test makes some buggy mktime implementations loop.
24188 Give up after 60 seconds; a mktime slower than that
24189 isn't worth using anyway. */
2393bc74 24190 signal (SIGALRM, SIG_DFL);
5476a9a4 24191 alarm (60);
2393bc74 24192#endif
067d23c9 24193
5476a9a4
GM
24194 time_t_max = (! time_t_signed
24195 ? (time_t) -1
24196 : ((((time_t) 1 << (sizeof (time_t) * CHAR_BIT - 2)) - 1)
24197 * 2 + 1));
24198 time_t_min = (! time_t_signed
24199 ? (time_t) 0
24200 : time_t_signed_magnitude
24201 ? ~ (time_t) 0
24202 : ~ time_t_max);
3e0be4ab 24203
5476a9a4
GM
24204 delta = time_t_max / 997; /* a suitable prime number */
24205 for (i = 0; i < N_STRINGS; i++)
24206 {
24207 if (tz_strings[i])
24208 putenv (tz_strings[i]);
3e0be4ab 24209
5476a9a4
GM
24210 for (t = 0; t <= time_t_max - delta && (result & 1) == 0; t += delta)
24211 if (! mktime_test (t))
24212 result |= 1;
24213 if ((result & 2) == 0
24214 && ! (mktime_test ((time_t) 1)
24215 && mktime_test ((time_t) (60 * 60))
24216 && mktime_test ((time_t) (60 * 60 * 24))))
24217 result |= 2;
f199cab1 24218
5476a9a4
GM
24219 for (j = 1; (result & 4) == 0; j <<= 1)
24220 {
24221 if (! bigtime_test (j))
24222 result |= 4;
24223 if (INT_MAX / 2 < j)
24224 break;
24225 }
24226 if ((result & 8) == 0 && ! bigtime_test (INT_MAX))
24227 result |= 8;
24228 }
24229 if (! irix_6_4_bug ())
24230 result |= 16;
24231 if (! spring_forward_gap ())
24232 result |= 32;
24233 if (! year_2050_test ())
24234 result |= 64;
24235 return result;
067d23c9
KY
24236}
24237_ACEOF
5476a9a4
GM
24238if ac_fn_c_try_run "$LINENO"; then :
24239 gl_cv_func_working_mktime=yes
067d23c9 24240else
5476a9a4 24241 gl_cv_func_working_mktime=no
3e0be4ab 24242fi
5476a9a4
GM
24243rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24244 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1
GM
24245fi
24246
f199cab1 24247
5476a9a4
GM
24248fi
24249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_mktime" >&5
24250$as_echo "$gl_cv_func_working_mktime" >&6; }
f199cab1 24251
5476a9a4
GM
24252 if test $gl_cv_func_working_mktime = no; then
24253 REPLACE_MKTIME=1
24254 else
24255 REPLACE_MKTIME=0
f199cab1 24256 fi
f199cab1 24257
a6342fc8 24258 if test $REPLACE_MKTIME = 1; then
f199cab1 24259
f199cab1 24260
0eb775a3 24261
067d23c9 24262
a451f14b 24263
a451f14b 24264
743c80a7
PE
24265
24266
5476a9a4
GM
24267 gl_LIBOBJS="$gl_LIBOBJS mktime.$ac_objext"
24268
a6342fc8
GM
24269 :
24270 fi
a451f14b
PE
24271
24272
24273
e275c824
PE
24274
24275
5476a9a4 24276 GNULIB_MKTIME=1
e275c824
PE
24277
24278
24279
24280
24281
24282
24283
24284
d87ffdb7 24285
5476a9a4
GM
24286
24287
24288 if test $ac_cv_func_pselect = yes; then
24289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether signature of pselect conforms to POSIX" >&5
24290$as_echo_n "checking whether signature of pselect conforms to POSIX... " >&6; }
24291if test "${gl_cv_sig_pselect+set}" = set; then :
e275c824
PE
24292 $as_echo_n "(cached) " >&6
24293else
5476a9a4 24294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
e275c824 24295/* end confdefs.h. */
5476a9a4 24296#include <sys/select.h>
e275c824 24297
f199cab1
GM
24298int
24299main ()
24300{
5476a9a4
GM
24301int (*p) (int, fd_set *, fd_set *, fd_set *restrict,
24302 struct timespec const *restrict,
24303 sigset_t const *restrict) = pselect;
24304 return !p;
f199cab1
GM
24305 ;
24306 return 0;
24307}
e275c824 24308_ACEOF
f199cab1 24309if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 24310 gl_cv_sig_pselect=yes
3e0be4ab 24311else
5476a9a4 24312 gl_cv_sig_pselect=no
f199cab1
GM
24313fi
24314rm -f core conftest.err conftest.$ac_objext \
24315 conftest$ac_exeext conftest.$ac_ext
3e0be4ab 24316fi
5476a9a4
GM
24317{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sig_pselect" >&5
24318$as_echo "$gl_cv_sig_pselect" >&6; }
b6c9d18d
GM
24319
24320 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pselect detects invalid fds" >&5
24321$as_echo_n "checking whether pselect detects invalid fds... " >&6; }
24322if test "${gl_cv_func_pselect_detects_ebadf+set}" = set; then :
24323 $as_echo_n "(cached) " >&6
24324else
24325
24326 if test "$cross_compiling" = yes; then :
24327
24328 case "$host_os" in
24329 # Guess yes on glibc systems.
24330 *-gnu*) gl_cv_func_pselect_detects_ebadf="guessing yes" ;;
24331 # If we don't know, assume the worst.
24332 *) gl_cv_func_pselect_detects_ebadf="guessing no" ;;
24333 esac
24334
24335else
24336 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24337/* end confdefs.h. */
24338
24339#include <sys/types.h>
24340#include <sys/time.h>
24341#if HAVE_SYS_SELECT_H
24342# include <sys/select.h>
24343#endif
24344#include <unistd.h>
24345#include <errno.h>
24346
24347int
24348main ()
24349{
24350
24351 fd_set set;
24352 dup2(0, 16);
24353 FD_ZERO(&set);
24354 FD_SET(16, &set);
24355 close(16);
24356 struct timespec timeout;
24357 timeout.tv_sec = 0;
24358 timeout.tv_nsec = 5000;
24359 return pselect (17, &set, NULL, NULL, &timeout, NULL) != -1 || errno != EBADF;
24360
24361 ;
24362 return 0;
24363}
24364_ACEOF
24365if ac_fn_c_try_run "$LINENO"; then :
24366 gl_cv_func_pselect_detects_ebadf=yes
24367else
24368 gl_cv_func_pselect_detects_ebadf=no
24369fi
24370rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24371 conftest.$ac_objext conftest.beam conftest.$ac_ext
24372fi
24373
24374
24375fi
24376{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pselect_detects_ebadf" >&5
24377$as_echo "$gl_cv_func_pselect_detects_ebadf" >&6; }
24378 case $gl_cv_func_pselect_detects_ebadf in
24379 *yes) ;;
24380 *) REPLACE_PSELECT=1 ;;
24381 esac
5476a9a4 24382 fi
3e0be4ab 24383
5476a9a4
GM
24384 if test $ac_cv_func_pselect = no || test $gl_cv_sig_pselect = no; then
24385 REPLACE_PSELECT=1
24386 fi
3e0be4ab 24387
a6342fc8 24388 if test $HAVE_PSELECT = 0 || test $REPLACE_PSELECT = 1; then
3e0be4ab
GM
24389
24390
3e0be4ab 24391
3e0be4ab 24392
3e0be4ab 24393
3e0be4ab 24394
3e0be4ab 24395
3e0be4ab 24396
5476a9a4 24397 gl_LIBOBJS="$gl_LIBOBJS pselect.$ac_objext"
3e0be4ab 24398
a6342fc8 24399 fi
3e0be4ab
GM
24400
24401
f199cab1 24402
f199cab1 24403
f199cab1 24404
5476a9a4 24405 GNULIB_PSELECT=1
f199cab1 24406
6d153f56 24407
f199cab1 24408
3e0be4ab 24409
3e0be4ab
GM
24410
24411
f199cab1 24412
0eb775a3
GM
24413
24414
5476a9a4 24415 LIB_PTHREAD_SIGMASK=
0eb775a3 24416
f199cab1 24417
f077f61d
GM
24418
24419
24420 if test "$gl_threads_api" = posix; then
24421 if test $ac_cv_func_pthread_sigmask = yes; then
24422 :
24423 else
24424 if test -n "$LIBMULTITHREAD"; then
24425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_sigmask in $LIBMULTITHREAD" >&5
24426$as_echo_n "checking for pthread_sigmask in $LIBMULTITHREAD... " >&6; }
24427if test "${gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD+set}" = set; then :
24428 $as_echo_n "(cached) " >&6
24429else
24430 gl_save_LIBS="$LIBS"
24431 LIBS="$LIBS $LIBMULTITHREAD"
24432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24433/* end confdefs.h. */
24434#include <pthread.h>
24435 #include <signal.h>
24436
24437int
24438main ()
24439{
24440return pthread_sigmask (0, (sigset_t *) 0, (sigset_t *) 0);
24441 ;
24442 return 0;
24443}
24444
24445_ACEOF
24446if ac_fn_c_try_link "$LINENO"; then :
24447 gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD=yes
24448else
24449 gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD=no
24450fi
24451rm -f core conftest.err conftest.$ac_objext \
24452 conftest$ac_exeext conftest.$ac_ext
24453 LIBS="$gl_save_LIBS"
24454
24455fi
24456{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD" >&5
24457$as_echo "$gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD" >&6; }
24458 if test $gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD = yes; then
24459 LIB_PTHREAD_SIGMASK="$LIBMULTITHREAD"
24460 else
24461 HAVE_PTHREAD_SIGMASK=0
24462 fi
24463 else
24464 HAVE_PTHREAD_SIGMASK=0
24465 fi
24466 fi
5476a9a4 24467 else
f077f61d
GM
24468 if test $ac_cv_func_pthread_sigmask = yes; then
24469 REPLACE_PTHREAD_SIGMASK=1
24470 else
24471 HAVE_PTHREAD_SIGMASK=0
24472 fi
5476a9a4 24473 fi
6d153f56 24474
52724a05 24475
6d153f56
GM
24476
24477
5476a9a4
GM
24478 if test $HAVE_PTHREAD_SIGMASK = 1; then
24479
24480
24481 if test -z "$LIB_PTHREAD_SIGMASK"; then
24482 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask works without -lpthread" >&5
24483$as_echo_n "checking whether pthread_sigmask works without -lpthread... " >&6; }
24484if test "${gl_cv_func_pthread_sigmask_in_libc_works+set}" = set; then :
f199cab1
GM
24485 $as_echo_n "(cached) " >&6
24486else
5476a9a4
GM
24487
24488 if test "$cross_compiling" = yes; then :
24489
24490 case "$host_os" in
24491 freebsd* | hpux* | solaris | solaris2.[2-9]*)
24492 gl_cv_func_pthread_sigmask_in_libc_works="guessing no";;
24493 *)
24494 gl_cv_func_pthread_sigmask_in_libc_works="guessing yes";;
24495 esac
24496
24497else
24498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 24499/* end confdefs.h. */
6d153f56 24500
5476a9a4
GM
24501#include <pthread.h>
24502#include <signal.h>
24503#include <stddef.h>
24504int main ()
f199cab1 24505{
5476a9a4
GM
24506 sigset_t set;
24507 sigemptyset (&set);
24508 return pthread_sigmask (1729, &set, NULL) != 0;
f199cab1
GM
24509}
24510_ACEOF
5476a9a4
GM
24511if ac_fn_c_try_run "$LINENO"; then :
24512 gl_cv_func_pthread_sigmask_in_libc_works=no
f199cab1 24513else
5476a9a4 24514 gl_cv_func_pthread_sigmask_in_libc_works=yes
f199cab1 24515fi
5476a9a4
GM
24516rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24517 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1 24518fi
5476a9a4
GM
24519
24520
f199cab1 24521fi
5476a9a4
GM
24522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_in_libc_works" >&5
24523$as_echo "$gl_cv_func_pthread_sigmask_in_libc_works" >&6; }
24524 case "$gl_cv_func_pthread_sigmask_in_libc_works" in
24525 *no)
24526 REPLACE_PTHREAD_SIGMASK=1
cc322c06 24527
5476a9a4 24528$as_echo "#define PTHREAD_SIGMASK_INEFFECTIVE 1" >>confdefs.h
cc322c06 24529
5476a9a4
GM
24530 ;;
24531 esac
24532 fi
3e0be4ab 24533
5476a9a4
GM
24534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask returns error numbers" >&5
24535$as_echo_n "checking whether pthread_sigmask returns error numbers... " >&6; }
24536if test "${gl_cv_func_pthread_sigmask_return_works+set}" = set; then :
3e0be4ab
GM
24537 $as_echo_n "(cached) " >&6
24538else
5476a9a4
GM
24539
24540 gl_save_LIBS="$LIBS"
24541 LIBS="$LIBS $LIB_PTHREAD_SIGMASK"
24542 if test "$cross_compiling" = yes; then :
24543 case "$host_os" in
24544 cygwin*)
24545 gl_cv_func_pthread_sigmask_return_works="guessing no";;
24546 *)
24547 gl_cv_func_pthread_sigmask_return_works="guessing yes";;
24548 esac
24549
24550else
24551 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3e0be4ab 24552/* end confdefs.h. */
f199cab1 24553
5476a9a4
GM
24554#include <pthread.h>
24555#include <signal.h>
24556#include <stddef.h>
24557int main ()
3e0be4ab 24558{
5476a9a4
GM
24559 sigset_t set;
24560 sigemptyset (&set);
24561 if (pthread_sigmask (1729, &set, NULL) == -1)
24562 return 1;
3e0be4ab
GM
24563 return 0;
24564}
6d153f56 24565_ACEOF
5476a9a4
GM
24566if ac_fn_c_try_run "$LINENO"; then :
24567 gl_cv_func_pthread_sigmask_return_works=yes
3e0be4ab 24568else
5476a9a4 24569 gl_cv_func_pthread_sigmask_return_works=no
6d153f56 24570fi
5476a9a4
GM
24571rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24572 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1 24573fi
5476a9a4
GM
24574
24575 LIBS="$gl_save_LIBS"
24576
52724a05 24577fi
5476a9a4
GM
24578{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_return_works" >&5
24579$as_echo "$gl_cv_func_pthread_sigmask_return_works" >&6; }
24580 case "$gl_cv_func_pthread_sigmask_return_works" in
24581 *no)
24582 REPLACE_PTHREAD_SIGMASK=1
6d153f56 24583
5476a9a4 24584$as_echo "#define PTHREAD_SIGMASK_FAILS_WITH_ERRNO 1" >>confdefs.h
6d153f56 24585
5476a9a4
GM
24586 ;;
24587 esac
cc322c06 24588
5476a9a4
GM
24589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask unblocks signals correctly" >&5
24590$as_echo_n "checking whether pthread_sigmask unblocks signals correctly... " >&6; }
24591if test "${gl_cv_func_pthread_sigmask_unblock_works+set}" = set; then :
f199cab1
GM
24592 $as_echo_n "(cached) " >&6
24593else
5476a9a4
GM
24594
24595 case "$host_os" in
24596 irix*)
24597 gl_cv_func_pthread_sigmask_unblock_works="guessing no";;
24598 *)
24599 gl_cv_func_pthread_sigmask_unblock_works="guessing yes";;
24600 esac
24601 gl_save_LIBS="$LIBS"
24602 LIBS="$LIBS $LIBMULTITHREAD"
24603 if test "$cross_compiling" = yes; then :
24604 :
f199cab1 24605else
5476a9a4
GM
24606 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24607/* end confdefs.h. */
6d153f56 24608
5476a9a4
GM
24609#include <pthread.h>
24610#include <signal.h>
24611#include <stdio.h>
24612#include <stdlib.h>
24613#include <unistd.h>
24614static volatile int sigint_occurred;
24615static void
24616sigint_handler (int sig)
24617{
24618 sigint_occurred++;
24619}
24620int main ()
24621{
24622 sigset_t set;
24623 int pid = getpid ();
24624 char command[80];
24625 signal (SIGINT, sigint_handler);
24626 sigemptyset (&set);
24627 sigaddset (&set, SIGINT);
24628 if (!(pthread_sigmask (SIG_BLOCK, &set, NULL) == 0))
24629 return 1;
24630 sprintf (command, "sh -c 'sleep 1; kill -%d %d' &", SIGINT, pid);
24631 if (!(system (command) == 0))
24632 return 2;
24633 sleep (2);
24634 if (!(sigint_occurred == 0))
24635 return 3;
24636 if (!(pthread_sigmask (SIG_UNBLOCK, &set, NULL) == 0))
24637 return 4;
24638 if (!(sigint_occurred == 1)) /* This fails on IRIX. */
24639 return 5;
24640 return 0;
24641}
24642_ACEOF
24643if ac_fn_c_try_run "$LINENO"; then :
24644 :
24645else
24646 gl_cv_func_pthread_sigmask_unblock_works=no
f199cab1 24647fi
5476a9a4
GM
24648rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24649 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1 24650fi
5476a9a4
GM
24651
24652 LIBS="$gl_save_LIBS"
24653
f199cab1 24654fi
5476a9a4
GM
24655{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_unblock_works" >&5
24656$as_echo "$gl_cv_func_pthread_sigmask_unblock_works" >&6; }
24657 case "$gl_cv_func_pthread_sigmask_unblock_works" in
24658 *no)
24659 REPLACE_PTHREAD_SIGMASK=1
6d153f56 24660
5476a9a4 24661$as_echo "#define PTHREAD_SIGMASK_UNBLOCK_BUG 1" >>confdefs.h
6d153f56 24662
5476a9a4
GM
24663 ;;
24664 esac
6d153f56 24665 fi
6d153f56 24666
a6342fc8 24667 if test $HAVE_PTHREAD_SIGMASK = 0 || test $REPLACE_PTHREAD_SIGMASK = 1; then
a451f14b 24668
a451f14b 24669
743c80a7
PE
24670
24671
24672
24673
24674
f199cab1 24675
5476a9a4 24676 gl_LIBOBJS="$gl_LIBOBJS pthread_sigmask.$ac_objext"
743c80a7
PE
24677
24678
5476a9a4 24679 if test $HAVE_PTHREAD_SIGMASK = 1; then
743c80a7 24680
5476a9a4 24681$as_echo "#define HAVE_PTHREAD_SIGMASK 1" >>confdefs.h
743c80a7 24682
5476a9a4 24683 fi
743c80a7 24684
a6342fc8 24685 fi
938a4ef9 24686
938a4ef9 24687
938a4ef9 24688
938a4ef9 24689
938a4ef9 24690
5476a9a4 24691 GNULIB_PTHREAD_SIGMASK=1
a451f14b 24692
a451f14b 24693
743c80a7
PE
24694
24695
24696
24697
24698
b5591ebb
GM
24699 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for putenv compatible with GNU and SVID" >&5
24700$as_echo_n "checking for putenv compatible with GNU and SVID... " >&6; }
24701if test "${gl_cv_func_svid_putenv+set}" = set; then :
24702 $as_echo_n "(cached) " >&6
24703else
24704 if test "$cross_compiling" = yes; then :
24705 case "$host_os" in
24706 # Guess yes on glibc systems.
24707 *-gnu*) gl_cv_func_svid_putenv="guessing yes" ;;
24708 # If we don't know, assume the worst.
24709 *) gl_cv_func_svid_putenv="guessing no" ;;
24710 esac
24711
24712else
24713 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24714/* end confdefs.h. */
24715$ac_includes_default
24716int
24717main ()
24718{
24719
24720 /* Put it in env. */
24721 if (putenv ("CONFTEST_putenv=val"))
24722 return 1;
24723
24724 /* Try to remove it. */
24725 if (putenv ("CONFTEST_putenv"))
24726 return 2;
24727
24728 /* Make sure it was deleted. */
24729 if (getenv ("CONFTEST_putenv") != 0)
24730 return 3;
24731
24732 return 0;
24733
24734 ;
24735 return 0;
24736}
24737_ACEOF
24738if ac_fn_c_try_run "$LINENO"; then :
24739 gl_cv_func_svid_putenv=yes
24740else
24741 gl_cv_func_svid_putenv=no
24742fi
24743rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24744 conftest.$ac_objext conftest.beam conftest.$ac_ext
24745fi
24746
24747
24748fi
24749{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_svid_putenv" >&5
24750$as_echo "$gl_cv_func_svid_putenv" >&6; }
24751 case "$gl_cv_func_svid_putenv" in
24752 *yes) ;;
24753 *)
24754 REPLACE_PUTENV=1
24755 ;;
24756 esac
24757
24758 if test $REPLACE_PUTENV = 1; then
24759
24760
24761
24762
24763
24764
24765
24766
24767 gl_LIBOBJS="$gl_LIBOBJS putenv.$ac_objext"
24768
c175d440 24769
2393bc74
GM
24770 ac_fn_c_check_decl "$LINENO" "_putenv" "ac_cv_have_decl__putenv" "$ac_includes_default"
24771if test "x$ac_cv_have_decl__putenv" = x""yes; then :
24772 ac_have_decl=1
24773else
24774 ac_have_decl=0
c175d440 24775fi
2393bc74
GM
24776
24777cat >>confdefs.h <<_ACEOF
24778#define HAVE_DECL__PUTENV $ac_have_decl
24779_ACEOF
c175d440
GM
24780
24781
b5591ebb
GM
24782 fi
24783
24784
24785
24786
24787
24788 GNULIB_PUTENV=1
24789
24790
24791
24792
24793
24794
3a019ab4
GM
24795 # Check whether --enable-acl was given.
24796if test "${enable_acl+set}" = set; then :
24797 enableval=$enable_acl;
24798else
24799 enable_acl=auto
24800fi
b5591ebb 24801
743c80a7 24802
3a019ab4
GM
24803 LIB_ACL=
24804 use_acl=0
24805 if test "x$enable_acl" != "xno"; then
24806 for ac_header in sys/acl.h
24807do :
24808 ac_fn_c_check_header_mongrel "$LINENO" "sys/acl.h" "ac_cv_header_sys_acl_h" "$ac_includes_default"
24809if test "x$ac_cv_header_sys_acl_h" = x""yes; then :
24810 cat >>confdefs.h <<_ACEOF
24811#define HAVE_SYS_ACL_H 1
24812_ACEOF
24813
24814fi
24815
24816done
24817
24818 if test $ac_cv_header_sys_acl_h = yes; then
24819 ac_save_LIBS=$LIBS
24820
24821 if test $use_acl = 0; then
24822 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing acl_get_file" >&5
24823$as_echo_n "checking for library containing acl_get_file... " >&6; }
24824if test "${ac_cv_search_acl_get_file+set}" = set; then :
24825 $as_echo_n "(cached) " >&6
24826else
24827 ac_func_search_save_LIBS=$LIBS
24828cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24829/* end confdefs.h. */
24830
24831/* Override any GCC internal prototype to avoid an error.
24832 Use char because int might match the return type of a GCC
24833 builtin and then its argument prototype would still apply. */
24834#ifdef __cplusplus
24835extern "C"
24836#endif
24837char acl_get_file ();
24838int
24839main ()
24840{
24841return acl_get_file ();
24842 ;
24843 return 0;
24844}
24845_ACEOF
24846for ac_lib in '' acl pacl; do
24847 if test -z "$ac_lib"; then
24848 ac_res="none required"
24849 else
24850 ac_res=-l$ac_lib
24851 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
24852 fi
24853 if ac_fn_c_try_link "$LINENO"; then :
24854 ac_cv_search_acl_get_file=$ac_res
24855fi
24856rm -f core conftest.err conftest.$ac_objext \
24857 conftest$ac_exeext
24858 if test "${ac_cv_search_acl_get_file+set}" = set; then :
24859 break
24860fi
24861done
24862if test "${ac_cv_search_acl_get_file+set}" = set; then :
24863
24864else
24865 ac_cv_search_acl_get_file=no
24866fi
24867rm conftest.$ac_ext
24868LIBS=$ac_func_search_save_LIBS
24869fi
24870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_acl_get_file" >&5
24871$as_echo "$ac_cv_search_acl_get_file" >&6; }
24872ac_res=$ac_cv_search_acl_get_file
24873if test "$ac_res" != no; then :
24874 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
24875 if test "$ac_cv_search_acl_get_file" != "none required"; then
24876 LIB_ACL=$ac_cv_search_acl_get_file
24877 fi
24878 for ac_func in acl_get_file acl_get_fd acl_set_file acl_set_fd \
24879 acl_free acl_from_mode acl_from_text \
24880 acl_delete_def_file acl_extended_file \
24881 acl_delete_fd_np acl_delete_file_np \
24882 acl_copy_ext_native acl_create_entry_np \
24883 acl_to_short_text acl_free_text
24884do :
24885 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
24886ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
24887eval as_val=\$$as_ac_var
24888 if test "x$as_val" = x""yes; then :
24889 cat >>confdefs.h <<_ACEOF
24890#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
24891_ACEOF
24892
24893fi
24894done
24895
24896 # If the acl_get_file bug is detected, don't enable the ACL support.
24897
24898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working acl_get_file" >&5
24899$as_echo_n "checking for working acl_get_file... " >&6; }
24900if test "${gl_cv_func_working_acl_get_file+set}" = set; then :
24901 $as_echo_n "(cached) " >&6
24902else
24903 if test "$cross_compiling" = yes; then :
24904 gl_cv_func_working_acl_get_file=cross-compiling
24905else
24906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24907/* end confdefs.h. */
24908#include <sys/types.h>
24909 #include <sys/acl.h>
24910 #include <errno.h>
24911
24912int
24913main ()
24914{
24915if (!acl_get_file (".", ACL_TYPE_ACCESS) && errno == ENOENT)
24916 return 1;
24917 return 0;
24918
24919 ;
24920 return 0;
24921}
24922_ACEOF
24923if ac_fn_c_try_run "$LINENO"; then :
24924 gl_cv_func_working_acl_get_file=yes
24925else
24926 gl_cv_func_working_acl_get_file=no
24927fi
24928rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24929 conftest.$ac_objext conftest.beam conftest.$ac_ext
24930fi
24931
24932fi
24933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_acl_get_file" >&5
24934$as_echo "$gl_cv_func_working_acl_get_file" >&6; }
24935
24936 if test $gl_cv_func_working_acl_get_file = yes; then :
24937 use_acl=1
24938fi
24939
24940 if test $use_acl = 1; then
24941 for ac_header in acl/libacl.h
24942do :
24943 ac_fn_c_check_header_mongrel "$LINENO" "acl/libacl.h" "ac_cv_header_acl_libacl_h" "$ac_includes_default"
24944if test "x$ac_cv_header_acl_libacl_h" = x""yes; then :
24945 cat >>confdefs.h <<_ACEOF
24946#define HAVE_ACL_LIBACL_H 1
24947_ACEOF
24948
24949fi
24950
24951done
24952
24953
24954
24955
24956
24957
24958
24959
24960
24961 for ac_func in acl_entries
24962do :
24963 ac_fn_c_check_func "$LINENO" "acl_entries" "ac_cv_func_acl_entries"
24964if test "x$ac_cv_func_acl_entries" = x""yes; then :
24965 cat >>confdefs.h <<_ACEOF
24966#define HAVE_ACL_ENTRIES 1
24967_ACEOF
24968
24969else
24970
24971 gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
24972
24973fi
24974done
24975
24976
24977 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ACL_FIRST_ENTRY" >&5
24978$as_echo_n "checking for ACL_FIRST_ENTRY... " >&6; }
24979if test "${gl_cv_acl_ACL_FIRST_ENTRY+set}" = set; then :
24980 $as_echo_n "(cached) " >&6
24981else
24982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24983/* end confdefs.h. */
24984#include <sys/types.h>
24985#include <sys/acl.h>
24986int type = ACL_FIRST_ENTRY;
24987int
24988main ()
24989{
24990
24991 ;
24992 return 0;
24993}
24994_ACEOF
24995if ac_fn_c_try_compile "$LINENO"; then :
24996 gl_cv_acl_ACL_FIRST_ENTRY=yes
24997else
24998 gl_cv_acl_ACL_FIRST_ENTRY=no
24999fi
25000rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25001fi
25002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_acl_ACL_FIRST_ENTRY" >&5
25003$as_echo "$gl_cv_acl_ACL_FIRST_ENTRY" >&6; }
25004 if test $gl_cv_acl_ACL_FIRST_ENTRY = yes; then
25005
25006$as_echo "#define HAVE_ACL_FIRST_ENTRY 1" >>confdefs.h
25007
25008 fi
25009 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ACL_TYPE_EXTENDED" >&5
25010$as_echo_n "checking for ACL_TYPE_EXTENDED... " >&6; }
25011if test "${gl_cv_acl_ACL_TYPE_EXTENDED+set}" = set; then :
25012 $as_echo_n "(cached) " >&6
25013else
25014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25015/* end confdefs.h. */
25016#include <sys/types.h>
25017#include <sys/acl.h>
25018int type = ACL_TYPE_EXTENDED;
25019int
25020main ()
25021{
25022
25023 ;
25024 return 0;
25025}
25026_ACEOF
25027if ac_fn_c_try_compile "$LINENO"; then :
25028 gl_cv_acl_ACL_TYPE_EXTENDED=yes
25029else
25030 gl_cv_acl_ACL_TYPE_EXTENDED=no
25031fi
25032rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25033fi
25034{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_acl_ACL_TYPE_EXTENDED" >&5
25035$as_echo "$gl_cv_acl_ACL_TYPE_EXTENDED" >&6; }
25036 if test $gl_cv_acl_ACL_TYPE_EXTENDED = yes; then
25037
25038$as_echo "#define HAVE_ACL_TYPE_EXTENDED 1" >>confdefs.h
25039
25040 fi
25041 else
25042 LIB_ACL=
25043 fi
25044
25045fi
25046
25047 fi
25048
25049 if test $use_acl = 0; then
25050 for ac_func in facl
25051do :
25052 ac_fn_c_check_func "$LINENO" "facl" "ac_cv_func_facl"
25053if test "x$ac_cv_func_facl" = x""yes; then :
25054 cat >>confdefs.h <<_ACEOF
25055#define HAVE_FACL 1
25056_ACEOF
25057
25058fi
25059done
25060
25061 if test $ac_cv_func_facl = yes; then
25062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing acl_trivial" >&5
25063$as_echo_n "checking for library containing acl_trivial... " >&6; }
25064if test "${ac_cv_search_acl_trivial+set}" = set; then :
25065 $as_echo_n "(cached) " >&6
25066else
25067 ac_func_search_save_LIBS=$LIBS
25068cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25069/* end confdefs.h. */
25070
25071/* Override any GCC internal prototype to avoid an error.
25072 Use char because int might match the return type of a GCC
25073 builtin and then its argument prototype would still apply. */
25074#ifdef __cplusplus
25075extern "C"
25076#endif
25077char acl_trivial ();
25078int
25079main ()
25080{
25081return acl_trivial ();
25082 ;
25083 return 0;
25084}
25085_ACEOF
25086for ac_lib in '' sec; do
25087 if test -z "$ac_lib"; then
25088 ac_res="none required"
25089 else
25090 ac_res=-l$ac_lib
25091 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
25092 fi
25093 if ac_fn_c_try_link "$LINENO"; then :
25094 ac_cv_search_acl_trivial=$ac_res
25095fi
25096rm -f core conftest.err conftest.$ac_objext \
25097 conftest$ac_exeext
25098 if test "${ac_cv_search_acl_trivial+set}" = set; then :
25099 break
25100fi
25101done
25102if test "${ac_cv_search_acl_trivial+set}" = set; then :
25103
25104else
25105 ac_cv_search_acl_trivial=no
25106fi
25107rm conftest.$ac_ext
25108LIBS=$ac_func_search_save_LIBS
25109fi
25110{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_acl_trivial" >&5
25111$as_echo "$ac_cv_search_acl_trivial" >&6; }
25112ac_res=$ac_cv_search_acl_trivial
25113if test "$ac_res" != no; then :
25114 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
25115 if test "$ac_cv_search_acl_trivial" != "none required"; then
25116 LIB_ACL=$ac_cv_search_acl_trivial
25117 fi
25118
25119fi
25120
25121 for ac_func in acl_trivial
25122do :
25123 ac_fn_c_check_func "$LINENO" "acl_trivial" "ac_cv_func_acl_trivial"
25124if test "x$ac_cv_func_acl_trivial" = x""yes; then :
25125 cat >>confdefs.h <<_ACEOF
25126#define HAVE_ACL_TRIVIAL 1
25127_ACEOF
25128
25129fi
25130done
25131
25132 use_acl=1
25133 fi
25134 fi
25135
25136 if test $use_acl = 0; then
25137 for ac_func in getacl
25138do :
25139 ac_fn_c_check_func "$LINENO" "getacl" "ac_cv_func_getacl"
25140if test "x$ac_cv_func_getacl" = x""yes; then :
25141 cat >>confdefs.h <<_ACEOF
25142#define HAVE_GETACL 1
25143_ACEOF
25144
25145fi
25146done
25147
25148 if test $ac_cv_func_getacl = yes; then
25149 use_acl=1
25150 fi
25151 for ac_header in aclv.h
25152do :
25153 ac_fn_c_check_header_compile "$LINENO" "aclv.h" "ac_cv_header_aclv_h" "#include <sys/types.h>
25154"
25155if test "x$ac_cv_header_aclv_h" = x""yes; then :
25156 cat >>confdefs.h <<_ACEOF
25157#define HAVE_ACLV_H 1
25158_ACEOF
25159
25160fi
25161
25162done
25163
25164 fi
25165
25166 if test $use_acl = 0; then
25167 for ac_func in aclx_get
25168do :
25169 ac_fn_c_check_func "$LINENO" "aclx_get" "ac_cv_func_aclx_get"
25170if test "x$ac_cv_func_aclx_get" = x""yes; then :
25171 cat >>confdefs.h <<_ACEOF
25172#define HAVE_ACLX_GET 1
25173_ACEOF
25174
25175fi
25176done
25177
25178 if test $ac_cv_func_aclx_get = yes; then
25179 use_acl=1
25180 fi
25181 fi
25182
25183 if test $use_acl = 0 || test "$ac_cv_func_aclx_get" = yes; then
25184 for ac_func in statacl
25185do :
25186 ac_fn_c_check_func "$LINENO" "statacl" "ac_cv_func_statacl"
25187if test "x$ac_cv_func_statacl" = x""yes; then :
25188 cat >>confdefs.h <<_ACEOF
25189#define HAVE_STATACL 1
25190_ACEOF
25191
25192fi
25193done
25194
25195 if test $ac_cv_func_statacl = yes; then
25196 use_acl=1
25197 fi
25198 fi
25199
25200 if test $use_acl = 0; then
25201 for ac_func in aclsort
25202do :
25203 ac_fn_c_check_func "$LINENO" "aclsort" "ac_cv_func_aclsort"
25204if test "x$ac_cv_func_aclsort" = x""yes; then :
25205 cat >>confdefs.h <<_ACEOF
25206#define HAVE_ACLSORT 1
25207_ACEOF
25208
25209fi
25210done
25211
25212 if test $ac_cv_func_aclsort = yes; then
25213 use_acl=1
25214 fi
25215 fi
25216
25217 LIBS=$ac_save_LIBS
25218 fi
25219 if test "x$enable_acl$use_acl" = "xyes0"; then
25220 as_fn_error "ACLs enabled but support not detected" "$LINENO" 5
25221 elif test "x$enable_acl$use_acl" = "xauto0"; then
25222 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libacl development library was not found or not usable." >&5
25223$as_echo "$as_me: WARNING: libacl development library was not found or not usable." >&2;}
25224 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: emacs will be built without ACL support." >&5
25225$as_echo "$as_me: WARNING: emacs will be built without ACL support." >&2;}
25226 fi
25227 fi
25228
25229
25230cat >>confdefs.h <<_ACEOF
25231#define USE_ACL $use_acl
25232_ACEOF
25233
25234 USE_ACL=$use_acl
25235
25236
25237
25238
25239
25240 if test $ac_cv_func_readlink = no; then
25241 HAVE_READLINK=0
25242 else
25243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
25244$as_echo_n "checking whether readlink signature is correct... " >&6; }
25245if test "${gl_cv_decl_readlink_works+set}" = set; then :
25246 $as_echo_n "(cached) " >&6
25247else
25248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25249/* end confdefs.h. */
25250#include <unistd.h>
25251 /* Cause compilation failure if original declaration has wrong type. */
25252 ssize_t readlink (const char *, char *, size_t);
25253int
f199cab1
GM
25254main ()
25255{
5476a9a4 25256
f199cab1
GM
25257 ;
25258 return 0;
25259}
3e0be4ab 25260_ACEOF
5476a9a4
GM
25261if ac_fn_c_try_compile "$LINENO"; then :
25262 gl_cv_decl_readlink_works=yes
25263else
25264 gl_cv_decl_readlink_works=no
3e0be4ab 25265fi
5476a9a4
GM
25266rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25267fi
25268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5
25269$as_echo "$gl_cv_decl_readlink_works" >&6; }
25270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
25271$as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; }
25272if test "${gl_cv_func_readlink_works+set}" = set; then :
25273 $as_echo_n "(cached) " >&6
25274else
25275 # We have readlink, so assume ln -s works.
25276 ln -s conftest.no-such conftest.link
25277 ln -s conftest.link conftest.lnk2
25278 if test "$cross_compiling" = yes; then :
25279 case "$host_os" in
25280 # Guess yes on glibc systems.
25281 *-gnu*) gl_cv_func_readlink_works="guessing yes" ;;
25282 # If we don't know, assume the worst.
25283 *) gl_cv_func_readlink_works="guessing no" ;;
25284 esac
25285
25286else
f199cab1 25287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 25288/* end confdefs.h. */
5476a9a4
GM
25289#include <unistd.h>
25290
f199cab1
GM
25291int
25292main ()
25293{
5476a9a4
GM
25294char buf[20];
25295 return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;
f199cab1
GM
25296 ;
25297 return 0;
25298}
067d23c9 25299_ACEOF
5476a9a4
GM
25300if ac_fn_c_try_run "$LINENO"; then :
25301 gl_cv_func_readlink_works=yes
25302else
25303 gl_cv_func_readlink_works=no
067d23c9 25304fi
5476a9a4
GM
25305rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25306 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1 25307fi
067d23c9 25308
5476a9a4 25309 rm -f conftest.link conftest.lnk2
f199cab1 25310fi
5476a9a4
GM
25311{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_works" >&5
25312$as_echo "$gl_cv_func_readlink_works" >&6; }
25313 case "$gl_cv_func_readlink_works" in
25314 *yes)
25315 if test "$gl_cv_decl_readlink_works" != yes; then
25316 REPLACE_READLINK=1
25317 fi
25318 ;;
25319 *)
067d23c9 25320
5476a9a4 25321$as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
067d23c9 25322
5476a9a4
GM
25323 REPLACE_READLINK=1
25324 ;;
25325 esac
25326 fi
3e0be4ab 25327
a6342fc8 25328 if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
3e0be4ab
GM
25329
25330
25331
25332
3e0be4ab
GM
25333
25334
5476a9a4
GM
25335
25336
25337 gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext"
25338
25339
25340 :
3e0be4ab 25341
a6342fc8 25342 fi
3e0be4ab 25343
067d23c9 25344
067d23c9 25345
067d23c9 25346
067d23c9 25347
5476a9a4 25348 GNULIB_READLINK=1
067d23c9 25349
067d23c9 25350
067d23c9 25351
067d23c9
KY
25352
25353
067d23c9 25354
d7ad186c
GM
25355
25356
25357
25358 if test $ac_cv_func_readlinkat = no; then
25359 HAVE_READLINKAT=0
25360 fi
25361
25362 if test $HAVE_READLINKAT = 0; then
25363
25364
25365
25366
25367
25368
25369
25370
25371 gl_LIBOBJS="$gl_LIBOBJS readlinkat.$ac_objext"
25372
25373 fi
25374
25375
25376
25377
25378
25379 GNULIB_READLINKAT=1
25380
25381
25382
25383
25384
25385
e4184a20
GM
25386 for ac_func in sig2str
25387do :
25388 ac_fn_c_check_func "$LINENO" "sig2str" "ac_cv_func_sig2str"
25389if test "x$ac_cv_func_sig2str" = x""yes; then :
25390 cat >>confdefs.h <<_ACEOF
25391#define HAVE_SIG2STR 1
25392_ACEOF
25393
25394fi
25395done
25396
25397
25398 if test $ac_cv_func_sig2str = no; then
25399
25400
25401
25402
25403
25404
25405
25406
25407 gl_LIBOBJS="$gl_LIBOBJS sig2str.$ac_objext"
25408
25409
25410 :
25411
25412 fi
25413
369e19fc 25414
067d23c9 25415
5476a9a4
GM
25416
25417
25418
25419
25420
25421
25422
25423
25424 if test $gl_cv_have_include_next = yes; then
25425 gl_cv_next_signal_h='<'signal.h'>'
25426 else
25427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
25428$as_echo_n "checking absolute name of <signal.h>... " >&6; }
25429if test "${gl_cv_next_signal_h+set}" = set; then :
0eb775a3 25430 $as_echo_n "(cached) " >&6
0eb775a3 25431else
5476a9a4
GM
25432
25433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0eb775a3 25434/* end confdefs.h. */
5476a9a4 25435#include <signal.h>
f199cab1 25436
0eb775a3 25437_ACEOF
5476a9a4
GM
25438 case "$host_os" in
25439 aix*) gl_absname_cpp="$ac_cpp -C" ;;
25440 *) gl_absname_cpp="$ac_cpp" ;;
25441 esac
0eb775a3 25442
5476a9a4
GM
25443 case "$host_os" in
25444 mingw*)
25445 gl_dirsep_regex='[/\\]'
25446 ;;
25447 *)
25448 gl_dirsep_regex='\/'
25449 ;;
25450 esac
25451 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
0eb775a3 25452
5476a9a4
GM
25453 gl_header_literal_regex=`echo 'signal.h' \
25454 | sed -e "$gl_make_literal_regex_sed"`
25455 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25456 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25457 s|^/[^/]|//&|
25458 p
25459 q
25460 }'
25461 gl_cv_next_signal_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25462 sed -n "$gl_absolute_header_sed"`'"'
0eb775a3 25463
f199cab1 25464
5476a9a4
GM
25465fi
25466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
25467$as_echo "$gl_cv_next_signal_h" >&6; }
25468 fi
25469 NEXT_SIGNAL_H=$gl_cv_next_signal_h
067d23c9 25470
5476a9a4
GM
25471 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25472 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25473 gl_next_as_first_directive='<'signal.h'>'
25474 else
25475 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25476 gl_next_as_first_directive=$gl_cv_next_signal_h
25477 fi
25478 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
067d23c9 25479
067d23c9
KY
25480
25481
067d23c9 25482
067d23c9 25483
5476a9a4
GM
25484# AIX declares sig_atomic_t to already include volatile, and C89 compilers
25485# then choke on 'volatile sig_atomic_t'. C99 requires that it compile.
25486 ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
25487#include <signal.h>
25488
25489"
25490if test "x$ac_cv_type_volatile_sig_atomic_t" = x""yes; then :
25491
25492else
25493 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
f199cab1 25494fi
067d23c9 25495
067d23c9 25496
067d23c9 25497
067d23c9 25498
938a4ef9 25499
938a4ef9 25500
5476a9a4
GM
25501
25502 ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
25503#include <signal.h>
25504
25505"
25506if test "x$ac_cv_type_sighandler_t" = x""yes; then :
25507
25508else
25509 HAVE_SIGHANDLER_T=0
25510fi
25511
25512
25513
25514
a6342fc8 25515 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
5476a9a4
GM
25516/* <sys/types.h> is not needed according to POSIX, but the
25517 <sys/socket.h> in i386-unknown-freebsd4.10 and
25518 powerpc-apple-darwin5.5 required it. */
25519#include <sys/types.h>
25520#if HAVE_SYS_SOCKET_H
25521# include <sys/socket.h>
25522#elif HAVE_WS2TCPIP_H
25523# include <ws2tcpip.h>
25524#endif
25525
25526"
25527if test "x$ac_cv_type_socklen_t" = x""yes; then :
25528
067d23c9 25529else
5476a9a4
GM
25530 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5
25531$as_echo_n "checking for socklen_t equivalent... " >&6; }
25532 if test "${gl_cv_socklen_t_equiv+set}" = set; then :
25533 $as_echo_n "(cached) " >&6
25534else
25535 # Systems have either "struct sockaddr *" or
25536 # "void *" as the second argument to getpeername
25537 gl_cv_socklen_t_equiv=
25538 for arg2 in "struct sockaddr" void; do
25539 for t in int size_t "unsigned int" "long int" "unsigned long int"; do
25540 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 25541/* end confdefs.h. */
5476a9a4
GM
25542#include <sys/types.h>
25543 #include <sys/socket.h>
25544
25545 int getpeername (int, $arg2 *, $t *);
f199cab1
GM
25546int
25547main ()
25548{
5476a9a4
GM
25549$t len;
25550 getpeername (0, 0, &len);
f199cab1
GM
25551 ;
25552 return 0;
25553}
3e0be4ab 25554_ACEOF
5476a9a4
GM
25555if ac_fn_c_try_compile "$LINENO"; then :
25556 gl_cv_socklen_t_equiv="$t"
067d23c9 25557fi
5476a9a4
GM
25558rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25559 test "$gl_cv_socklen_t_equiv" != "" && break
25560 done
25561 test "$gl_cv_socklen_t_equiv" != "" && break
25562 done
067d23c9 25563
5476a9a4 25564fi
067d23c9 25565
5476a9a4
GM
25566 if test "$gl_cv_socklen_t_equiv" = ""; then
25567 as_fn_error "Cannot find a type to use in place of socklen_t" "$LINENO" 5
25568 fi
25569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socklen_t_equiv" >&5
25570$as_echo "$gl_cv_socklen_t_equiv" >&6; }
25571
25572cat >>confdefs.h <<_ACEOF
25573#define socklen_t $gl_cv_socklen_t_equiv
25574_ACEOF
067d23c9 25575
f199cab1 25576fi
3e0be4ab 25577
3e0be4ab 25578
5476a9a4
GM
25579 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
25580$as_echo_n "checking for ssize_t... " >&6; }
25581if test "${gt_cv_ssize_t+set}" = set; then :
f199cab1
GM
25582 $as_echo_n "(cached) " >&6
25583else
5476a9a4 25584 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 25585/* end confdefs.h. */
5476a9a4 25586#include <sys/types.h>
f199cab1
GM
25587int
25588main ()
25589{
5476a9a4
GM
25590int x = sizeof (ssize_t *) + sizeof (ssize_t);
25591 return !x;
f199cab1
GM
25592 ;
25593 return 0;
25594}
25595_ACEOF
5476a9a4
GM
25596if ac_fn_c_try_compile "$LINENO"; then :
25597 gt_cv_ssize_t=yes
067d23c9 25598else
5476a9a4 25599 gt_cv_ssize_t=no
f199cab1 25600fi
5476a9a4 25601rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
067d23c9 25602fi
5476a9a4
GM
25603{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
25604$as_echo "$gt_cv_ssize_t" >&6; }
25605 if test $gt_cv_ssize_t = no; then
25606
25607$as_echo "#define ssize_t int" >>confdefs.h
25608
25609 fi
25610
25611
25612
25613
25614
5476a9a4
GM
25615 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>
25616 #include <sys/stat.h>
25617"
25618if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = x""yes; then :
25619
25620cat >>confdefs.h <<_ACEOF
25621#define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1
25622_ACEOF
25623
25624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5
25625$as_echo_n "checking whether struct stat.st_atim is of type struct timespec... " >&6; }
25626if test "${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+set}" = set; then :
f199cab1
GM
25627 $as_echo_n "(cached) " >&6
25628else
5476a9a4 25629 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 25630/* end confdefs.h. */
3e0be4ab 25631
5476a9a4
GM
25632 #include <sys/types.h>
25633 #include <sys/stat.h>
25634 #if HAVE_SYS_TIME_H
25635 # include <sys/time.h>
25636 #endif
25637 #include <time.h>
25638 struct timespec ts;
25639 struct stat st;
25640
f199cab1
GM
25641int
25642main ()
25643{
5476a9a4
GM
25644
25645 st.st_atim = ts;
25646
f199cab1
GM
25647 ;
25648 return 0;
25649}
3e0be4ab 25650_ACEOF
5476a9a4
GM
25651if ac_fn_c_try_compile "$LINENO"; then :
25652 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes
f199cab1 25653else
5476a9a4 25654 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no
f199cab1 25655fi
5476a9a4 25656rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
067d23c9 25657fi
5476a9a4
GM
25658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5
25659$as_echo "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; }
25660 if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
067d23c9 25661
5476a9a4 25662$as_echo "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h
067d23c9 25663
5476a9a4
GM
25664 fi
25665else
25666 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>
25667 #include <sys/stat.h>
25668"
25669if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = x""yes; then :
067d23c9 25670
5476a9a4
GM
25671cat >>confdefs.h <<_ACEOF
25672#define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1
25673_ACEOF
3e0be4ab 25674
0eb775a3 25675
3e0be4ab 25676else
5476a9a4
GM
25677 ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h>
25678 #include <sys/stat.h>
25679"
25680if test "x$ac_cv_member_struct_stat_st_atimensec" = x""yes; then :
25681
25682cat >>confdefs.h <<_ACEOF
25683#define HAVE_STRUCT_STAT_ST_ATIMENSEC 1
067d23c9 25684_ACEOF
5476a9a4
GM
25685
25686
067d23c9 25687else
5476a9a4
GM
25688 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>
25689 #include <sys/stat.h>
25690"
25691if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = x""yes; then :
25692
25693cat >>confdefs.h <<_ACEOF
25694#define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1
25695_ACEOF
25696
25697
3e0be4ab 25698fi
5476a9a4 25699
067d23c9 25700fi
5476a9a4 25701
067d23c9 25702fi
067d23c9
KY
25703
25704fi
25705
067d23c9 25706
067d23c9 25707
067d23c9 25708
067d23c9 25709
5476a9a4
GM
25710 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>
25711 #include <sys/stat.h>
25712"
25713if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = x""yes; then :
25714
25715cat >>confdefs.h <<_ACEOF
25716#define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1
25717_ACEOF
067d23c9
KY
25718
25719
f199cab1 25720else
5476a9a4
GM
25721 ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include <sys/types.h>
25722 #include <sys/stat.h>
25723"
25724if test "x$ac_cv_member_struct_stat_st_birthtimensec" = x""yes; then :
067d23c9 25725
5476a9a4
GM
25726cat >>confdefs.h <<_ACEOF
25727#define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1
25728_ACEOF
067d23c9 25729
3e0be4ab 25730
067d23c9 25731else
5476a9a4
GM
25732 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>
25733 #include <sys/stat.h>
25734"
25735if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = x""yes; then :
067d23c9 25736
5476a9a4
GM
25737cat >>confdefs.h <<_ACEOF
25738#define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1
067d23c9 25739_ACEOF
5476a9a4
GM
25740
25741
f199cab1 25742fi
5476a9a4 25743
f199cab1 25744fi
5476a9a4 25745
067d23c9 25746fi
0eb775a3 25747
0eb775a3 25748
0eb775a3 25749
5476a9a4
GM
25750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working stdalign.h" >&5
25751$as_echo_n "checking for working stdalign.h... " >&6; }
25752if test "${gl_cv_header_working_stdalign_h+set}" = set; then :
f199cab1 25753 $as_echo_n "(cached) " >&6
067d23c9 25754else
5476a9a4 25755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 25756/* end confdefs.h. */
5476a9a4
GM
25757#include <stdalign.h>
25758 #include <stddef.h>
25759
25760 /* Test that alignof yields a result consistent with offsetof.
25761 This catches GCC bug 52023
25762 <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. */
25763 #ifdef __cplusplus
25764 template <class t> struct alignof_helper { char a; t b; };
25765 # define ao(type) offsetof (alignof_helper<type>, b)
25766 #else
25767 # define ao(type) offsetof (struct { char a; type b; }, b)
25768 #endif
25769 char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1];
25770 char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1];
25771 char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1];
25772
25773 /* Test _Alignas only on platforms where gnulib can help. */
25774 #if \
25775 (__GNUC__ || __IBMC__ || __IBMCPP__ \
25776 || 0x5110 <= __SUNPRO_C || 1300 <= _MSC_VER)
6ea3f01e
GM
25777 struct alignas_test { char c; char alignas (8) alignas_8; };
25778 char test_alignas[offsetof (struct alignas_test, alignas_8) == 8
25779 ? 1 : -1];
5476a9a4 25780 #endif
067d23c9 25781
f199cab1
GM
25782int
25783main ()
25784{
5476a9a4 25785
f199cab1
GM
25786 ;
25787 return 0;
25788}
25789_ACEOF
5476a9a4
GM
25790if ac_fn_c_try_compile "$LINENO"; then :
25791 gl_cv_header_working_stdalign_h=yes
f199cab1 25792else
5476a9a4 25793 gl_cv_header_working_stdalign_h=no
f199cab1 25794fi
5476a9a4 25795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
067d23c9 25796fi
5476a9a4
GM
25797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdalign_h" >&5
25798$as_echo "$gl_cv_header_working_stdalign_h" >&6; }
067d23c9 25799
5476a9a4
GM
25800 if test $gl_cv_header_working_stdalign_h = yes; then
25801 STDALIGN_H=''
25802 else
25803 STDALIGN_H='stdalign.h'
f199cab1 25804 fi
0eb775a3 25805
5476a9a4
GM
25806
25807 if test -n "$STDALIGN_H"; then
25808 GL_GENERATE_STDALIGN_H_TRUE=
25809 GL_GENERATE_STDALIGN_H_FALSE='#'
f199cab1 25810else
5476a9a4
GM
25811 GL_GENERATE_STDALIGN_H_TRUE='#'
25812 GL_GENERATE_STDALIGN_H_FALSE=
0eb775a3 25813fi
0eb775a3
GM
25814
25815
25816
5476a9a4
GM
25817 STDARG_H=''
25818 NEXT_STDARG_H='<stdarg.h>'
25819 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5
25820$as_echo_n "checking for va_copy... " >&6; }
25821 if test "${gl_cv_func_va_copy+set}" = set; then :
f199cab1 25822 $as_echo_n "(cached) " >&6
5476a9a4
GM
25823else
25824
25825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25826/* end confdefs.h. */
25827#include <stdarg.h>
f199cab1
GM
25828int
25829main ()
25830{
5476a9a4
GM
25831
25832#ifndef va_copy
25833void (*func) (va_list, va_list) = va_copy;
25834#endif
25835
f199cab1
GM
25836 ;
25837 return 0;
25838}
25839_ACEOF
5476a9a4
GM
25840if ac_fn_c_try_compile "$LINENO"; then :
25841 gl_cv_func_va_copy=yes
f199cab1 25842else
5476a9a4 25843 gl_cv_func_va_copy=no
f199cab1 25844fi
5476a9a4 25845rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 25846fi
5476a9a4
GM
25847
25848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_va_copy" >&5
25849$as_echo "$gl_cv_func_va_copy" >&6; }
25850 if test $gl_cv_func_va_copy = no; then
25851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25852/* end confdefs.h. */
25853#if defined _AIX && !defined __GNUC__
25854 AIX vaccine
25855 #endif
25856
25857_ACEOF
25858if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25859 $EGREP "vaccine" >/dev/null 2>&1; then :
25860 gl_aixcc=yes
f199cab1 25861else
5476a9a4 25862 gl_aixcc=no
f199cab1 25863fi
5476a9a4 25864rm -f conftest*
0eb775a3 25865
5476a9a4
GM
25866 if test $gl_aixcc = yes; then
25867 STDARG_H=stdarg.h
0eb775a3
GM
25868
25869
5476a9a4
GM
25870
25871
25872
25873
25874
25875
25876 if test $gl_cv_have_include_next = yes; then
25877 gl_cv_next_stdarg_h='<'stdarg.h'>'
25878 else
25879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdarg.h>" >&5
25880$as_echo_n "checking absolute name of <stdarg.h>... " >&6; }
25881if test "${gl_cv_next_stdarg_h+set}" = set; then :
f199cab1
GM
25882 $as_echo_n "(cached) " >&6
25883else
5476a9a4
GM
25884
25885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 25886/* end confdefs.h. */
5476a9a4 25887#include <stdarg.h>
0eb775a3 25888
f199cab1 25889_ACEOF
5476a9a4
GM
25890 case "$host_os" in
25891 aix*) gl_absname_cpp="$ac_cpp -C" ;;
25892 *) gl_absname_cpp="$ac_cpp" ;;
25893 esac
25894
25895 case "$host_os" in
25896 mingw*)
25897 gl_dirsep_regex='[/\\]'
25898 ;;
25899 *)
25900 gl_dirsep_regex='\/'
25901 ;;
25902 esac
25903 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25904
25905 gl_header_literal_regex=`echo 'stdarg.h' \
25906 | sed -e "$gl_make_literal_regex_sed"`
25907 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25908 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25909 s|^/[^/]|//&|
25910 p
25911 q
25912 }'
25913 gl_cv_next_stdarg_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25914 sed -n "$gl_absolute_header_sed"`'"'
25915
25916
f199cab1 25917fi
5476a9a4
GM
25918{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdarg_h" >&5
25919$as_echo "$gl_cv_next_stdarg_h" >&6; }
25920 fi
25921 NEXT_STDARG_H=$gl_cv_next_stdarg_h
25922
25923 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25924 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25925 gl_next_as_first_directive='<'stdarg.h'>'
25926 else
25927 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25928 gl_next_as_first_directive=$gl_cv_next_stdarg_h
25929 fi
25930 NEXT_AS_FIRST_DIRECTIVE_STDARG_H=$gl_next_as_first_directive
0eb775a3
GM
25931
25932
25933
5476a9a4
GM
25934
25935 if test "$gl_cv_next_stdarg_h" = '""'; then
25936 gl_cv_next_stdarg_h='"///usr/include/stdarg.h"'
25937 NEXT_STDARG_H="$gl_cv_next_stdarg_h"
25938 fi
f199cab1 25939 else
5476a9a4
GM
25940
25941 saved_as_echo_n="$as_echo_n"
25942 as_echo_n=':'
25943 if test "${gl_cv_func___va_copy+set}" = set; then :
f199cab1
GM
25944 $as_echo_n "(cached) " >&6
25945else
0eb775a3 25946
5476a9a4
GM
25947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25948/* end confdefs.h. */
25949#include <stdarg.h>
f199cab1
GM
25950int
25951main ()
25952{
5476a9a4
GM
25953
25954#ifndef __va_copy
25955error, bail out
25956#endif
25957
f199cab1
GM
25958 ;
25959 return 0;
25960}
25961_ACEOF
5476a9a4
GM
25962if ac_fn_c_try_compile "$LINENO"; then :
25963 gl_cv_func___va_copy=yes
f199cab1 25964else
5476a9a4 25965 gl_cv_func___va_copy=no
f199cab1 25966fi
5476a9a4 25967rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 25968fi
0eb775a3 25969
5476a9a4
GM
25970 as_echo_n="$saved_as_echo_n"
25971
25972 if test $gl_cv_func___va_copy = yes; then
25973
25974$as_echo "#define va_copy __va_copy" >>confdefs.h
25975
25976 else
0eb775a3 25977
5476a9a4
GM
25978
25979$as_echo "#define va_copy gl_va_copy" >>confdefs.h
0eb775a3 25980
f199cab1
GM
25981 fi
25982 fi
5476a9a4
GM
25983 fi
25984
25985 if test -n "$STDARG_H"; then
25986 GL_GENERATE_STDARG_H_TRUE=
25987 GL_GENERATE_STDARG_H_FALSE='#'
25988else
25989 GL_GENERATE_STDARG_H_TRUE='#'
25990 GL_GENERATE_STDARG_H_FALSE=
25991fi
25992
25993
25994
25995
25996
25997
25998 # Define two additional variables used in the Makefile substitution.
25999
26000 if test "$ac_cv_header_stdbool_h" = yes; then
26001 STDBOOL_H=''
26002 else
26003 STDBOOL_H='stdbool.h'
26004 fi
26005
26006 if test -n "$STDBOOL_H"; then
26007 GL_GENERATE_STDBOOL_H_TRUE=
26008 GL_GENERATE_STDBOOL_H_FALSE='#'
26009else
26010 GL_GENERATE_STDBOOL_H_TRUE='#'
26011 GL_GENERATE_STDBOOL_H_FALSE=
26012fi
26013
26014
26015 if test "$ac_cv_type__Bool" = yes; then
26016 HAVE__BOOL=1
26017 else
26018 HAVE__BOOL=0
26019 fi
26020
26021
26022
26023
26024
26025 STDDEF_H=
26026 if test $gt_cv_c_wchar_t = no; then
26027 HAVE_WCHAR_T=0
26028 STDDEF_H=stddef.h
26029 fi
26030 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
26031$as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
26032if test "${gl_cv_decl_null_works+set}" = set; then :
f199cab1
GM
26033 $as_echo_n "(cached) " >&6
26034else
5476a9a4 26035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 26036/* end confdefs.h. */
5476a9a4
GM
26037#include <stddef.h>
26038 int test[2 * (sizeof NULL == sizeof (void *)) -1];
3e0be4ab 26039
f199cab1
GM
26040int
26041main ()
26042{
5476a9a4 26043
f199cab1
GM
26044 ;
26045 return 0;
26046}
26047_ACEOF
5476a9a4
GM
26048if ac_fn_c_try_compile "$LINENO"; then :
26049 gl_cv_decl_null_works=yes
f199cab1 26050else
5476a9a4 26051 gl_cv_decl_null_works=no
f199cab1 26052fi
5476a9a4 26053rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 26054fi
5476a9a4
GM
26055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
26056$as_echo "$gl_cv_decl_null_works" >&6; }
26057 if test $gl_cv_decl_null_works = no; then
26058 REPLACE_NULL=1
26059 STDDEF_H=stddef.h
26060 fi
26061
26062 if test -n "$STDDEF_H"; then
26063 GL_GENERATE_STDDEF_H_TRUE=
26064 GL_GENERATE_STDDEF_H_FALSE='#'
f199cab1 26065else
5476a9a4
GM
26066 GL_GENERATE_STDDEF_H_TRUE='#'
26067 GL_GENERATE_STDDEF_H_FALSE=
f199cab1 26068fi
3e0be4ab 26069
5476a9a4 26070 if test -n "$STDDEF_H"; then
3e0be4ab
GM
26071
26072
5476a9a4
GM
26073
26074
26075
26076
26077
26078
26079 if test $gl_cv_have_include_next = yes; then
26080 gl_cv_next_stddef_h='<'stddef.h'>'
26081 else
26082 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
26083$as_echo_n "checking absolute name of <stddef.h>... " >&6; }
26084if test "${gl_cv_next_stddef_h+set}" = set; then :
067d23c9
KY
26085 $as_echo_n "(cached) " >&6
26086else
5476a9a4
GM
26087
26088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 26089/* end confdefs.h. */
5476a9a4 26090#include <stddef.h>
f199cab1 26091
067d23c9 26092_ACEOF
5476a9a4
GM
26093 case "$host_os" in
26094 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26095 *) gl_absname_cpp="$ac_cpp" ;;
26096 esac
26097
26098 case "$host_os" in
26099 mingw*)
26100 gl_dirsep_regex='[/\\]'
26101 ;;
26102 *)
26103 gl_dirsep_regex='\/'
26104 ;;
26105 esac
26106 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26107
26108 gl_header_literal_regex=`echo 'stddef.h' \
26109 | sed -e "$gl_make_literal_regex_sed"`
26110 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26111 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26112 s|^/[^/]|//&|
26113 p
26114 q
26115 }'
26116 gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26117 sed -n "$gl_absolute_header_sed"`'"'
26118
26119
f199cab1 26120fi
5476a9a4
GM
26121{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
26122$as_echo "$gl_cv_next_stddef_h" >&6; }
26123 fi
26124 NEXT_STDDEF_H=$gl_cv_next_stddef_h
26125
26126 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26127 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26128 gl_next_as_first_directive='<'stddef.h'>'
26129 else
26130 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26131 gl_next_as_first_directive=$gl_cv_next_stddef_h
26132 fi
26133 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
26134
f199cab1 26135
f199cab1 26136
f199cab1 26137
067d23c9 26138 fi
067d23c9 26139
f199cab1 26140
067d23c9 26141
067d23c9 26142
067d23c9 26143
067d23c9
KY
26144
26145
067d23c9 26146
067d23c9
KY
26147
26148
067d23c9 26149
3e0be4ab 26150
5476a9a4
GM
26151 if test $gl_cv_have_include_next = yes; then
26152 gl_cv_next_stdio_h='<'stdio.h'>'
26153 else
26154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
26155$as_echo_n "checking absolute name of <stdio.h>... " >&6; }
26156if test "${gl_cv_next_stdio_h+set}" = set; then :
26157 $as_echo_n "(cached) " >&6
f199cab1 26158else
5476a9a4
GM
26159
26160 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26161/* end confdefs.h. */
26162#include <stdio.h>
26163
f199cab1 26164_ACEOF
5476a9a4
GM
26165 case "$host_os" in
26166 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26167 *) gl_absname_cpp="$ac_cpp" ;;
26168 esac
067d23c9 26169
5476a9a4
GM
26170 case "$host_os" in
26171 mingw*)
26172 gl_dirsep_regex='[/\\]'
26173 ;;
26174 *)
26175 gl_dirsep_regex='\/'
26176 ;;
26177 esac
26178 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26179
26180 gl_header_literal_regex=`echo 'stdio.h' \
26181 | sed -e "$gl_make_literal_regex_sed"`
26182 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26183 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26184 s|^/[^/]|//&|
26185 p
26186 q
26187 }'
26188 gl_cv_next_stdio_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26189 sed -n "$gl_absolute_header_sed"`'"'
067d23c9 26190
067d23c9 26191
f199cab1 26192fi
5476a9a4
GM
26193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
26194$as_echo "$gl_cv_next_stdio_h" >&6; }
26195 fi
26196 NEXT_STDIO_H=$gl_cv_next_stdio_h
067d23c9 26197
5476a9a4
GM
26198 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26199 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26200 gl_next_as_first_directive='<'stdio.h'>'
26201 else
26202 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26203 gl_next_as_first_directive=$gl_cv_next_stdio_h
26204 fi
26205 NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
26206
26207
26208
26209
26210
26211 GNULIB_FSCANF=1
26212
26213
26214cat >>confdefs.h <<_ACEOF
26215#define GNULIB_FSCANF 1
26216_ACEOF
067d23c9 26217
067d23c9 26218
5476a9a4 26219 GNULIB_SCANF=1
f199cab1 26220
f199cab1 26221
5476a9a4
GM
26222cat >>confdefs.h <<_ACEOF
26223#define GNULIB_SCANF 1
f199cab1
GM
26224_ACEOF
26225
067d23c9 26226
5476a9a4
GM
26227 GNULIB_FGETC=1
26228 GNULIB_GETC=1
26229 GNULIB_GETCHAR=1
26230 GNULIB_FGETS=1
26231 GNULIB_FREAD=1
067d23c9 26232
067d23c9 26233
5476a9a4
GM
26234 GNULIB_FPRINTF=1
26235 GNULIB_PRINTF=1
26236 GNULIB_VFPRINTF=1
26237 GNULIB_VPRINTF=1
26238 GNULIB_FPUTC=1
26239 GNULIB_PUTC=1
26240 GNULIB_PUTCHAR=1
26241 GNULIB_FPUTS=1
26242 GNULIB_PUTS=1
26243 GNULIB_FWRITE=1
067d23c9 26244
067d23c9 26245
067d23c9 26246
067d23c9 26247
067d23c9 26248
067d23c9 26249
067d23c9 26250
067d23c9 26251
3e0be4ab
GM
26252
26253
26254
26255
26256
26257
3e0be4ab 26258
5476a9a4
GM
26259 if test $gl_cv_have_include_next = yes; then
26260 gl_cv_next_stdlib_h='<'stdlib.h'>'
26261 else
26262 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
26263$as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
26264if test "${gl_cv_next_stdlib_h+set}" = set; then :
067d23c9
KY
26265 $as_echo_n "(cached) " >&6
26266else
5476a9a4
GM
26267
26268 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 26269/* end confdefs.h. */
5476a9a4
GM
26270#include <stdlib.h>
26271
f199cab1 26272_ACEOF
5476a9a4
GM
26273 case "$host_os" in
26274 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26275 *) gl_absname_cpp="$ac_cpp" ;;
26276 esac
067d23c9 26277
5476a9a4
GM
26278 case "$host_os" in
26279 mingw*)
26280 gl_dirsep_regex='[/\\]'
26281 ;;
26282 *)
26283 gl_dirsep_regex='\/'
26284 ;;
26285 esac
26286 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26287
26288 gl_header_literal_regex=`echo 'stdlib.h' \
26289 | sed -e "$gl_make_literal_regex_sed"`
26290 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26291 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26292 s|^/[^/]|//&|
26293 p
26294 q
26295 }'
26296 gl_cv_next_stdlib_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26297 sed -n "$gl_absolute_header_sed"`'"'
3e0be4ab 26298
067d23c9 26299
f199cab1 26300fi
5476a9a4
GM
26301{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
26302$as_echo "$gl_cv_next_stdlib_h" >&6; }
26303 fi
26304 NEXT_STDLIB_H=$gl_cv_next_stdlib_h
b0415a03 26305
5476a9a4
GM
26306 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26307 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26308 gl_next_as_first_directive='<'stdlib.h'>'
26309 else
26310 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26311 gl_next_as_first_directive=$gl_cv_next_stdlib_h
26312 fi
26313 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
b0415a03 26314
067d23c9 26315
067d23c9 26316
067d23c9 26317
067d23c9 26318
067d23c9 26319
067d23c9 26320
067d23c9 26321
067d23c9 26322
5476a9a4 26323 # This defines (or not) HAVE_TZNAME and HAVE_TM_ZONE.
067d23c9 26324
067d23c9 26325
067d23c9 26326
b0415a03
GM
26327
26328
ac1ca7e9 26329
0eb775a3 26330
5476a9a4 26331$as_echo "#define my_strftime nstrftime" >>confdefs.h
067d23c9 26332
067d23c9 26333
a0a61e58
GM
26334
26335
26336
3e0be4ab 26337
5476a9a4
GM
26338
26339
283c7aed
GM
26340
26341
26342
5476a9a4
GM
26343 if test "$ac_cv_have_decl_strtoimax" != yes; then
26344 HAVE_DECL_STRTOIMAX=0
26345 fi
26346
26347 if test $ac_cv_func_strtoimax = yes; then
26348 HAVE_STRTOIMAX=1
26349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtoimax works" >&5
26350$as_echo_n "checking whether strtoimax works... " >&6; }
26351if test "${gl_cv_func_strtoimax+set}" = set; then :
f199cab1
GM
26352 $as_echo_n "(cached) " >&6
26353else
26354 if test "$cross_compiling" = yes; then :
5476a9a4
GM
26355 case "$host_os" in
26356 # Guess no on AIX 5.
26357 aix5*) gl_cv_func_strtoimax="guessing no" ;;
26358 # Guess yes otherwise.
26359 *) gl_cv_func_strtoimax="guessing yes" ;;
26360 esac
26361
f199cab1
GM
26362else
26363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26364/* end confdefs.h. */
3e0be4ab 26365
5476a9a4
GM
26366#include <errno.h>
26367#include <string.h>
26368#include <inttypes.h>
26369int main ()
26370{
26371 if (sizeof (intmax_t) > sizeof (int))
26372 {
26373 const char *s = "4294967295";
26374 char *p;
26375 intmax_t res;
26376 errno = 0;
26377 res = strtoimax (s, &p, 10);
26378 if (p != s + strlen (s))
26379 return 1;
26380 if (errno != 0)
26381 return 2;
26382 if (res != (intmax_t) 65535 * (intmax_t) 65537)
26383 return 3;
26384 }
26385 else
26386 {
26387 const char *s = "2147483647";
26388 char *p;
26389 intmax_t res;
26390 errno = 0;
26391 res = strtoimax (s, &p, 10);
26392 if (p != s + strlen (s))
26393 return 1;
26394 if (errno != 0)
26395 return 2;
26396 if (res != 2147483647)
26397 return 3;
26398 }
f199cab1
GM
26399 return 0;
26400}
5476a9a4 26401
f199cab1
GM
26402_ACEOF
26403if ac_fn_c_try_run "$LINENO"; then :
5476a9a4 26404 gl_cv_func_strtoimax=yes
f199cab1 26405else
5476a9a4 26406 gl_cv_func_strtoimax=no
f199cab1
GM
26407fi
26408rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26409 conftest.$ac_objext conftest.beam conftest.$ac_ext
067d23c9
KY
26410fi
26411
3e0be4ab 26412
f199cab1 26413fi
5476a9a4
GM
26414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtoimax" >&5
26415$as_echo "$gl_cv_func_strtoimax" >&6; }
26416 case "$gl_cv_func_strtoimax" in
26417 *no) REPLACE_STRTOIMAX=1 ;;
26418 esac
26419 else
26420 HAVE_STRTOIMAX=0
26421 fi
067d23c9 26422
a6342fc8 26423 if test $HAVE_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; then
067d23c9 26424
067d23c9 26425
067d23c9 26426
067d23c9 26427
067d23c9 26428
3e0be4ab 26429
2b1928b8
GM
26430
26431
5476a9a4
GM
26432 gl_LIBOBJS="$gl_LIBOBJS strtoimax.$ac_objext"
26433
26434
26435 ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
26436if test "x$ac_cv_have_decl_strtoll" = x""yes; then :
26437 ac_have_decl=1
f199cab1 26438else
5476a9a4 26439 ac_have_decl=0
f199cab1 26440fi
2b1928b8 26441
5476a9a4
GM
26442cat >>confdefs.h <<_ACEOF
26443#define HAVE_DECL_STRTOLL $ac_have_decl
26444_ACEOF
26445
26446
067d23c9 26447
a6342fc8 26448 fi
067d23c9 26449
3e0be4ab
GM
26450
26451
26452
3e0be4ab 26453
5476a9a4 26454 GNULIB_STRTOIMAX=1
3e0be4ab
GM
26455
26456
26457
26458
3e0be4ab
GM
26459
26460
26461
f199cab1 26462
f199cab1 26463
5476a9a4
GM
26464 if test "$ac_cv_have_decl_strtoumax" != yes; then
26465 HAVE_DECL_STRTOUMAX=0
26466 fi
067d23c9 26467
a6342fc8 26468 if test $ac_cv_func_strtoumax = no; then
0eb775a3 26469
5476a9a4
GM
26470
26471
26472
26473
26474
26475
26476
26477 gl_LIBOBJS="$gl_LIBOBJS strtoumax.$ac_objext"
26478
26479
26480 ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
26481if test "x$ac_cv_have_decl_strtoull" = x""yes; then :
26482 ac_have_decl=1
067d23c9 26483else
5476a9a4 26484 ac_have_decl=0
067d23c9 26485fi
5476a9a4
GM
26486
26487cat >>confdefs.h <<_ACEOF
26488#define HAVE_DECL_STRTOULL $ac_have_decl
26489_ACEOF
26490
26491
26492
a6342fc8 26493 fi
067d23c9 26494
067d23c9 26495
067d23c9 26496
067d23c9 26497
067d23c9 26498
5476a9a4
GM
26499 GNULIB_STRTOUMAX=1
26500
26501
26502
26503
26504
26505
26506
26507 if test $ac_cv_func_symlink = no; then
26508 HAVE_SYMLINK=0
26509 else
26510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether symlink handles trailing slash correctly" >&5
26511$as_echo_n "checking whether symlink handles trailing slash correctly... " >&6; }
26512if test "${gl_cv_func_symlink_works+set}" = set; then :
f199cab1 26513 $as_echo_n "(cached) " >&6
5476a9a4
GM
26514else
26515 if test "$cross_compiling" = yes; then :
26516 case "$host_os" in
26517 # Guess yes on glibc systems.
26518 *-gnu*) gl_cv_func_symlink_works="guessing yes" ;;
26519 # If we don't know, assume the worst.
26520 *) gl_cv_func_symlink_works="guessing no" ;;
26521 esac
26522
f199cab1
GM
26523else
26524 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26525/* end confdefs.h. */
5476a9a4
GM
26526#include <unistd.h>
26527
f199cab1
GM
26528int
26529main ()
26530{
5476a9a4
GM
26531int result = 0;
26532 if (!symlink ("a", "conftest.link/"))
26533 result |= 1;
26534 if (symlink ("conftest.f", "conftest.lnk2"))
26535 result |= 2;
26536 else if (!symlink ("a", "conftest.lnk2/"))
26537 result |= 4;
26538 return result;
067d23c9 26539
f199cab1
GM
26540 ;
26541 return 0;
26542}
26543_ACEOF
5476a9a4
GM
26544if ac_fn_c_try_run "$LINENO"; then :
26545 gl_cv_func_symlink_works=yes
f199cab1 26546else
5476a9a4 26547 gl_cv_func_symlink_works=no
f199cab1 26548fi
5476a9a4
GM
26549rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26550 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1 26551fi
067d23c9 26552
5476a9a4 26553 rm -f conftest.f conftest.link conftest.lnk2
f199cab1 26554fi
5476a9a4
GM
26555{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_symlink_works" >&5
26556$as_echo "$gl_cv_func_symlink_works" >&6; }
26557 case "$gl_cv_func_symlink_works" in
26558 *yes) ;;
26559 *)
26560 REPLACE_SYMLINK=1
26561 ;;
26562 esac
26563 fi
067d23c9 26564
a6342fc8 26565 if test $HAVE_SYMLINK = 0 || test $REPLACE_SYMLINK = 1; then
067d23c9 26566
7e723570 26567
7e723570
GM
26568
26569
dd0d840e 26570
dd0d840e
GM
26571
26572
26573
5476a9a4 26574 gl_LIBOBJS="$gl_LIBOBJS symlink.$ac_objext"
dd0d840e 26575
a6342fc8 26576 fi
dd0d840e
GM
26577
26578
d3127c14
GM
26579
26580
d3127c14 26581
5476a9a4 26582 GNULIB_SYMLINK=1
d3127c14 26583
d3127c14 26584
d3127c14
GM
26585
26586
067d23c9 26587
067d23c9 26588
d3127c14 26589
d3127c14 26590
5476a9a4
GM
26591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/select.h> is self-contained" >&5
26592$as_echo_n "checking whether <sys/select.h> is self-contained... " >&6; }
26593if test "${gl_cv_header_sys_select_h_selfcontained+set}" = set; then :
26594 $as_echo_n "(cached) " >&6
26595else
d3127c14 26596
5476a9a4
GM
26597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26598/* end confdefs.h. */
26599#include <sys/select.h>
26600int
26601main ()
26602{
26603struct timeval b;
26604 ;
26605 return 0;
26606}
26607_ACEOF
26608if ac_fn_c_try_compile "$LINENO"; then :
26609 gl_cv_header_sys_select_h_selfcontained=yes
26610else
26611 gl_cv_header_sys_select_h_selfcontained=no
26612fi
26613rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26614 if test $gl_cv_header_sys_select_h_selfcontained = yes; then
26615 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26616/* end confdefs.h. */
26617#include <sys/select.h>
26618int
26619main ()
26620{
26621int memset; int bzero;
26622 ;
26623 return 0;
26624}
3e0be4ab 26625
5476a9a4
GM
26626_ACEOF
26627if ac_fn_c_try_compile "$LINENO"; then :
26628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26629/* end confdefs.h. */
26630#include <sys/select.h>
26631int
26632main ()
26633{
dd0d840e 26634
5476a9a4
GM
26635 #undef memset
26636 #define memset nonexistent_memset
26637 extern
26638 #ifdef __cplusplus
26639 "C"
26640 #endif
26641 void *memset (void *, int, unsigned long);
26642 #undef bzero
26643 #define bzero nonexistent_bzero
26644 extern
26645 #ifdef __cplusplus
26646 "C"
26647 #endif
26648 void bzero (void *, unsigned long);
26649 fd_set fds;
26650 FD_ZERO (&fds);
3e0be4ab 26651
5476a9a4
GM
26652 ;
26653 return 0;
26654}
067d23c9 26655
5476a9a4
GM
26656_ACEOF
26657if ac_fn_c_try_link "$LINENO"; then :
dd0d840e 26658
5476a9a4
GM
26659else
26660 gl_cv_header_sys_select_h_selfcontained=no
26661fi
26662rm -f core conftest.err conftest.$ac_objext \
26663 conftest$ac_exeext conftest.$ac_ext
dd0d840e 26664
5476a9a4
GM
26665fi
26666rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26667 fi
dd0d840e 26668
5476a9a4
GM
26669fi
26670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_select_h_selfcontained" >&5
26671$as_echo "$gl_cv_header_sys_select_h_selfcontained" >&6; }
dd0d840e 26672
dd0d840e
GM
26673
26674
dd0d840e
GM
26675
26676
dd0d840e
GM
26677
26678
26679
dd0d840e 26680
5476a9a4
GM
26681 if test $gl_cv_have_include_next = yes; then
26682 gl_cv_next_sys_select_h='<'sys/select.h'>'
26683 else
26684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/select.h>" >&5
26685$as_echo_n "checking absolute name of <sys/select.h>... " >&6; }
26686if test "${gl_cv_next_sys_select_h+set}" = set; then :
26687 $as_echo_n "(cached) " >&6
26688else
dd0d840e 26689
5476a9a4 26690 if test $ac_cv_header_sys_select_h = yes; then
dd0d840e 26691
dd0d840e 26692
5476a9a4
GM
26693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26694/* end confdefs.h. */
26695#include <sys/select.h>
dd0d840e 26696
5476a9a4
GM
26697_ACEOF
26698 case "$host_os" in
26699 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26700 *) gl_absname_cpp="$ac_cpp" ;;
26701 esac
dd0d840e 26702
5476a9a4
GM
26703 case "$host_os" in
26704 mingw*)
26705 gl_dirsep_regex='[/\\]'
26706 ;;
26707 *)
26708 gl_dirsep_regex='\/'
26709 ;;
26710 esac
26711 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
dd0d840e 26712
5476a9a4
GM
26713 gl_header_literal_regex=`echo 'sys/select.h' \
26714 | sed -e "$gl_make_literal_regex_sed"`
26715 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26716 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26717 s|^/[^/]|//&|
26718 p
26719 q
26720 }'
26721 gl_cv_next_sys_select_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26722 sed -n "$gl_absolute_header_sed"`'"'
26723 else
26724 gl_cv_next_sys_select_h='<'sys/select.h'>'
26725 fi
067d23c9 26726
067d23c9 26727
5476a9a4
GM
26728fi
26729{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_select_h" >&5
26730$as_echo "$gl_cv_next_sys_select_h" >&6; }
26731 fi
26732 NEXT_SYS_SELECT_H=$gl_cv_next_sys_select_h
26733
26734 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26735 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26736 gl_next_as_first_directive='<'sys/select.h'>'
26737 else
26738 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26739 gl_next_as_first_directive=$gl_cv_next_sys_select_h
26740 fi
26741 NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H=$gl_next_as_first_directive
26742
26743
26744
26745
26746 if test $ac_cv_header_sys_select_h = yes; then
26747 HAVE_SYS_SELECT_H=1
26748 else
26749 HAVE_SYS_SELECT_H=0
26750 fi
067d23c9
KY
26751
26752
7e723570 26753
7e723570 26754
7e723570 26755
5476a9a4
GM
26756 if test $ac_cv_header_sys_socket_h != yes; then
26757 for ac_header in winsock2.h
26758do :
26759 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
26760if test "x$ac_cv_header_winsock2_h" = x""yes; then :
26761 cat >>confdefs.h <<_ACEOF
26762#define HAVE_WINSOCK2_H 1
26763_ACEOF
7e723570 26764
5476a9a4 26765fi
7e723570 26766
5476a9a4 26767done
7e723570 26768
5476a9a4
GM
26769 fi
26770 if test "$ac_cv_header_winsock2_h" = yes; then
26771 HAVE_WINSOCK2_H=1
26772 UNISTD_H_HAVE_WINSOCK2_H=1
26773 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
26774 else
26775 HAVE_WINSOCK2_H=0
26776 fi
7e723570
GM
26777
26778
dd0d840e 26779
dd0d840e 26780
dd0d840e
GM
26781
26782
dd0d840e 26783
dd0d840e 26784
dd0d840e
GM
26785
26786
26787
26788
26789
26790
26791
26792
dd0d840e 26793
dd0d840e 26794
dd0d840e 26795
dd0d840e 26796
5476a9a4
GM
26797 if test $gl_cv_have_include_next = yes; then
26798 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
26799 else
26800 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
26801$as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
26802if test "${gl_cv_next_sys_stat_h+set}" = set; then :
26803 $as_echo_n "(cached) " >&6
26804else
dd0d840e 26805
5476a9a4 26806 if test $ac_cv_header_sys_stat_h = yes; then
dd0d840e 26807
dd0d840e 26808
5476a9a4
GM
26809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26810/* end confdefs.h. */
26811#include <sys/stat.h>
dd0d840e 26812
5476a9a4
GM
26813_ACEOF
26814 case "$host_os" in
26815 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26816 *) gl_absname_cpp="$ac_cpp" ;;
26817 esac
dd0d840e 26818
5476a9a4
GM
26819 case "$host_os" in
26820 mingw*)
26821 gl_dirsep_regex='[/\\]'
26822 ;;
26823 *)
26824 gl_dirsep_regex='\/'
26825 ;;
26826 esac
26827 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
dd0d840e 26828
5476a9a4
GM
26829 gl_header_literal_regex=`echo 'sys/stat.h' \
26830 | sed -e "$gl_make_literal_regex_sed"`
26831 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26832 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26833 s|^/[^/]|//&|
26834 p
26835 q
26836 }'
26837 gl_cv_next_sys_stat_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26838 sed -n "$gl_absolute_header_sed"`'"'
26839 else
26840 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
26841 fi
dd0d840e 26842
dd0d840e 26843
5476a9a4
GM
26844fi
26845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
26846$as_echo "$gl_cv_next_sys_stat_h" >&6; }
26847 fi
26848 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
dd0d840e 26849
5476a9a4
GM
26850 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26851 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26852 gl_next_as_first_directive='<'sys/stat.h'>'
26853 else
26854 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26855 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
26856 fi
26857 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
dd0d840e 26858
dd0d840e 26859
d3127c14 26860
d3127c14 26861
dd0d840e 26862
dd0d840e 26863
dd0d840e 26864
dd0d840e 26865
dd0d840e 26866
dd0d840e 26867
dd0d840e 26868
5476a9a4 26869 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
dd0d840e 26870
5476a9a4 26871$as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
dd0d840e 26872
5476a9a4 26873 fi
dd0d840e 26874
5476a9a4
GM
26875 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
26876 #include <sys/stat.h>
26877"
26878if test "x$ac_cv_type_nlink_t" = x""yes; then :
dd0d840e 26879
5476a9a4 26880else
dd0d840e 26881
5476a9a4 26882$as_echo "#define nlink_t int" >>confdefs.h
dd0d840e 26883
5476a9a4 26884fi
dd0d840e 26885
dd0d840e 26886
dd0d840e 26887
dd0d840e 26888
dd0d840e 26889
dd0d840e 26890
dd0d840e 26891
c9ca3f76 26892
dd0d840e 26893
dd0d840e 26894
dd0d840e 26895
c9ca3f76 26896
dd0d840e 26897
dd0d840e
GM
26898
26899
7e723570
GM
26900
26901
7e723570 26902
5476a9a4
GM
26903 ac_fn_c_check_decl "$LINENO" "localtime_r" "ac_cv_have_decl_localtime_r" "#include <time.h>
26904"
26905if test "x$ac_cv_have_decl_localtime_r" = x""yes; then :
26906 ac_have_decl=1
26907else
26908 ac_have_decl=0
26909fi
7e723570 26910
5476a9a4
GM
26911cat >>confdefs.h <<_ACEOF
26912#define HAVE_DECL_LOCALTIME_R $ac_have_decl
26913_ACEOF
7e723570 26914
5476a9a4
GM
26915 if test $ac_cv_have_decl_localtime_r = no; then
26916 HAVE_DECL_LOCALTIME_R=0
26917 fi
7e723570 26918
7e723570 26919
5476a9a4
GM
26920 if test $ac_cv_func_localtime_r = yes; then
26921 HAVE_LOCALTIME_R=1
26922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime_r is compatible with its POSIX signature" >&5
26923$as_echo_n "checking whether localtime_r is compatible with its POSIX signature... " >&6; }
26924if test "${gl_cv_time_r_posix+set}" = set; then :
26925 $as_echo_n "(cached) " >&6
26926else
26927 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26928/* end confdefs.h. */
26929#include <time.h>
7e723570
GM
26930int
26931main ()
26932{
5476a9a4
GM
26933/* We don't need to append 'restrict's to the argument types,
26934 even though the POSIX signature has the 'restrict's,
26935 since C99 says they can't affect type compatibility. */
26936 struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r;
26937 if (ptr) return 0;
26938 /* Check the return type is a pointer.
26939 On HP-UX 10 it is 'int'. */
26940 *localtime_r (0, 0);
7e723570
GM
26941 ;
26942 return 0;
26943}
5476a9a4 26944
7e723570 26945_ACEOF
5476a9a4
GM
26946if ac_fn_c_try_compile "$LINENO"; then :
26947 gl_cv_time_r_posix=yes
7e723570 26948else
5476a9a4 26949 gl_cv_time_r_posix=no
7e723570 26950fi
5476a9a4 26951rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
02bd7257 26952
5476a9a4
GM
26953fi
26954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_r_posix" >&5
26955$as_echo "$gl_cv_time_r_posix" >&6; }
26956 if test $gl_cv_time_r_posix = yes; then
26957 REPLACE_LOCALTIME_R=0
26958 else
26959 REPLACE_LOCALTIME_R=1
26960 fi
26961 else
26962 HAVE_LOCALTIME_R=0
26963 fi
02bd7257 26964
a6342fc8 26965 if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then
02bd7257
GM
26966
26967
02bd7257 26968
02bd7257 26969
02bd7257 26970
02bd7257 26971
7e723570 26972
7e723570 26973
5476a9a4
GM
26974 gl_LIBOBJS="$gl_LIBOBJS time_r.$ac_objext"
26975
26976
26977 :
7e723570 26978
a6342fc8 26979 fi
7e723570 26980
7e723570 26981
7e723570 26982
7e723570 26983
7e723570 26984
5476a9a4 26985 GNULIB_TIME_R=1
7e723570 26986
7e723570 26987
7e723570 26988
7e723570 26989
7e723570 26990
f077f61d
GM
26991
26992
26993
26994
26995
26996 LIB_TIMER_TIME=
26997
26998 gl_saved_libs=$LIBS
26999 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing timer_settime" >&5
27000$as_echo_n "checking for library containing timer_settime... " >&6; }
27001if test "${ac_cv_search_timer_settime+set}" = set; then :
27002 $as_echo_n "(cached) " >&6
27003else
27004 ac_func_search_save_LIBS=$LIBS
27005cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27006/* end confdefs.h. */
27007
27008/* Override any GCC internal prototype to avoid an error.
27009 Use char because int might match the return type of a GCC
27010 builtin and then its argument prototype would still apply. */
27011#ifdef __cplusplus
27012extern "C"
27013#endif
27014char timer_settime ();
27015int
27016main ()
27017{
27018return timer_settime ();
27019 ;
27020 return 0;
27021}
27022_ACEOF
27023for ac_lib in '' rt posix4; do
27024 if test -z "$ac_lib"; then
27025 ac_res="none required"
27026 else
27027 ac_res=-l$ac_lib
27028 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
27029 fi
27030 if ac_fn_c_try_link "$LINENO"; then :
27031 ac_cv_search_timer_settime=$ac_res
27032fi
27033rm -f core conftest.err conftest.$ac_objext \
27034 conftest$ac_exeext
27035 if test "${ac_cv_search_timer_settime+set}" = set; then :
27036 break
27037fi
27038done
27039if test "${ac_cv_search_timer_settime+set}" = set; then :
27040
27041else
27042 ac_cv_search_timer_settime=no
27043fi
27044rm conftest.$ac_ext
27045LIBS=$ac_func_search_save_LIBS
27046fi
27047{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_timer_settime" >&5
27048$as_echo "$ac_cv_search_timer_settime" >&6; }
27049ac_res=$ac_cv_search_timer_settime
27050if test "$ac_res" != no; then :
27051 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
27052 test "$ac_cv_search_timer_settime" = "none required" ||
27053 LIB_TIMER_TIME=$ac_cv_search_timer_settime
27054fi
27055
27056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27057/* end confdefs.h. */
27058
27059#include <features.h>
27060#ifdef __GNU_LIBRARY__
27061 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || (__GLIBC__ > 2)) \
27062 && !defined __UCLIBC__
27063 Thread emulation available
27064 #endif
27065#endif
27066
27067_ACEOF
27068if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27069 $EGREP "Thread" >/dev/null 2>&1; then :
27070 LIB_TIMER_TIME="$LIB_TIMER_TIME $LIBMULTITHREAD"
27071fi
27072rm -f conftest*
27073
27074 for ac_func in timer_settime
27075do :
27076 ac_fn_c_check_func "$LINENO" "timer_settime" "ac_cv_func_timer_settime"
27077if test "x$ac_cv_func_timer_settime" = x""yes; then :
27078 cat >>confdefs.h <<_ACEOF
27079#define HAVE_TIMER_SETTIME 1
27080_ACEOF
27081
27082fi
27083done
27084
27085 LIBS=$gl_saved_libs
27086
a6342fc8 27087 :
7e723570 27088
02bd7257 27089
02bd7257 27090
02bd7257 27091
02bd7257 27092
02bd7257 27093
02bd7257 27094
02bd7257 27095
dd0d840e
GM
27096
27097
27098
dd0d840e 27099
5476a9a4
GM
27100 if test $gl_cv_have_include_next = yes; then
27101 gl_cv_next_unistd_h='<'unistd.h'>'
27102 else
27103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
27104$as_echo_n "checking absolute name of <unistd.h>... " >&6; }
27105if test "${gl_cv_next_unistd_h+set}" = set; then :
27106 $as_echo_n "(cached) " >&6
27107else
dd0d840e 27108
5476a9a4 27109 if test $ac_cv_header_unistd_h = yes; then
dd0d840e 27110
dd0d840e 27111
5476a9a4 27112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d3127c14 27113/* end confdefs.h. */
5476a9a4 27114#include <unistd.h>
d3127c14 27115
5476a9a4
GM
27116_ACEOF
27117 case "$host_os" in
27118 aix*) gl_absname_cpp="$ac_cpp -C" ;;
27119 *) gl_absname_cpp="$ac_cpp" ;;
27120 esac
d3127c14 27121
5476a9a4
GM
27122 case "$host_os" in
27123 mingw*)
27124 gl_dirsep_regex='[/\\]'
27125 ;;
27126 *)
27127 gl_dirsep_regex='\/'
27128 ;;
27129 esac
27130 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
27131
27132 gl_header_literal_regex=`echo 'unistd.h' \
27133 | sed -e "$gl_make_literal_regex_sed"`
27134 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27135 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27136 s|^/[^/]|//&|
27137 p
27138 q
27139 }'
27140 gl_cv_next_unistd_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27141 sed -n "$gl_absolute_header_sed"`'"'
27142 else
27143 gl_cv_next_unistd_h='<'unistd.h'>'
27144 fi
d3127c14 27145
d3127c14 27146
c9ca3f76 27147fi
5476a9a4
GM
27148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
27149$as_echo "$gl_cv_next_unistd_h" >&6; }
27150 fi
27151 NEXT_UNISTD_H=$gl_cv_next_unistd_h
c9ca3f76 27152
5476a9a4
GM
27153 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27154 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27155 gl_next_as_first_directive='<'unistd.h'>'
27156 else
27157 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27158 gl_next_as_first_directive=$gl_cv_next_unistd_h
27159 fi
27160 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
c9ca3f76 27161
c9ca3f76 27162
c9ca3f76 27163
c9ca3f76 27164
5476a9a4
GM
27165 if test $ac_cv_header_unistd_h = yes; then
27166 HAVE_UNISTD_H=1
27167 else
27168 HAVE_UNISTD_H=0
27169 fi
c9ca3f76 27170
d3127c14 27171
dd0d840e 27172
dd0d840e 27173
d3127c14 27174
d3127c14 27175
dd0d840e
GM
27176
27177
c9ca3f76
GM
27178
27179
27180
b5591ebb
GM
27181 if test $ac_cv_have_decl_unsetenv = no; then
27182 HAVE_DECL_UNSETENV=0
27183 fi
27184 for ac_func in unsetenv
27185do :
27186 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
27187if test "x$ac_cv_func_unsetenv" = x""yes; then :
27188 cat >>confdefs.h <<_ACEOF
27189#define HAVE_UNSETENV 1
27190_ACEOF
27191
27192fi
27193done
27194
27195 if test $ac_cv_func_unsetenv = no; then
27196 HAVE_UNSETENV=0
27197 else
27198 HAVE_UNSETENV=1
27199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5
27200$as_echo_n "checking for unsetenv() return type... " >&6; }
27201if test "${gt_cv_func_unsetenv_ret+set}" = set; then :
27202 $as_echo_n "(cached) " >&6
27203else
27204 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27205/* end confdefs.h. */
27206
27207#undef _BSD
27208#define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */
27209#include <stdlib.h>
27210extern
27211#ifdef __cplusplus
27212"C"
27213#endif
27214int unsetenv (const char *name);
27215
27216int
27217main ()
27218{
27219
27220 ;
27221 return 0;
27222}
27223_ACEOF
27224if ac_fn_c_try_compile "$LINENO"; then :
27225 gt_cv_func_unsetenv_ret='int'
27226else
27227 gt_cv_func_unsetenv_ret='void'
27228fi
27229rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27230fi
27231{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5
27232$as_echo "$gt_cv_func_unsetenv_ret" >&6; }
27233 if test $gt_cv_func_unsetenv_ret = 'void'; then
27234
27235$as_echo "#define VOID_UNSETENV 1" >>confdefs.h
27236
27237 REPLACE_UNSETENV=1
27238 fi
27239
27240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5
27241$as_echo_n "checking whether unsetenv obeys POSIX... " >&6; }
27242if test "${gl_cv_func_unsetenv_works+set}" = set; then :
27243 $as_echo_n "(cached) " >&6
27244else
27245 if test "$cross_compiling" = yes; then :
27246 case "$host_os" in
27247 # Guess yes on glibc systems.
27248 *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
27249 # If we don't know, assume the worst.
27250 *) gl_cv_func_unsetenv_works="guessing no" ;;
27251 esac
27252
27253else
27254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27255/* end confdefs.h. */
27256
27257 #include <stdlib.h>
27258 #include <errno.h>
27259 extern char **environ;
27260
27261int
27262main ()
27263{
27264
27265 char entry1[] = "a=1";
27266 char entry2[] = "b=2";
27267 char *env[] = { entry1, entry2, NULL };
27268 if (putenv ((char *) "a=1")) return 1;
27269 if (putenv (entry2)) return 2;
27270 entry2[0] = 'a';
27271 unsetenv ("a");
27272 if (getenv ("a")) return 3;
27273 if (!unsetenv ("") || errno != EINVAL) return 4;
27274 entry2[0] = 'b';
27275 environ = env;
27276 if (!getenv ("a")) return 5;
27277 entry2[0] = 'a';
27278 unsetenv ("a");
27279 if (getenv ("a")) return 6;
27280
27281 ;
27282 return 0;
27283}
27284_ACEOF
27285if ac_fn_c_try_run "$LINENO"; then :
27286 gl_cv_func_unsetenv_works=yes
27287else
27288 gl_cv_func_unsetenv_works=no
27289fi
27290rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27291 conftest.$ac_objext conftest.beam conftest.$ac_ext
27292fi
27293
27294fi
27295{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5
27296$as_echo "$gl_cv_func_unsetenv_works" >&6; }
27297 case "$gl_cv_func_unsetenv_works" in
27298 *yes) ;;
27299 *)
27300 REPLACE_UNSETENV=1
27301 ;;
27302 esac
27303 fi
27304
27305 if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
27306
27307
27308
27309
27310
27311
27312
27313
27314 gl_LIBOBJS="$gl_LIBOBJS unsetenv.$ac_objext"
27315
27316
27317
27318
27319
27320 fi
27321
27322
27323
27324
27325
27326 GNULIB_UNSETENV=1
27327
27328
27329
27330
27331
27332
27333
27334
c9ca3f76
GM
27335
27336
c9ca3f76 27337
5476a9a4
GM
27338 if test $ac_cv_func_futimens = no && test $ac_cv_func_futimesat = yes; then
27339 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether futimesat handles NULL file" >&5
27340$as_echo_n "checking whether futimesat handles NULL file... " >&6; }
27341if test "${gl_cv_func_futimesat_works+set}" = set; then :
27342 $as_echo_n "(cached) " >&6
27343else
27344 touch conftest.file
27345 if test "$cross_compiling" = yes; then :
27346 case "$host_os" in
27347 # Guess yes on glibc systems.
27348 *-gnu*) gl_cv_func_futimesat_works="guessing yes" ;;
27349 # If we don't know, assume the worst.
27350 *) gl_cv_func_futimesat_works="guessing no" ;;
27351 esac
c9ca3f76 27352
5476a9a4
GM
27353else
27354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c9ca3f76
GM
27355/* end confdefs.h. */
27356
5476a9a4
GM
27357#include <stddef.h>
27358#include <sys/times.h>
27359#include <fcntl.h>
c9ca3f76
GM
27360
27361int
27362main ()
27363{
5476a9a4
GM
27364 int fd = open ("conftest.file", O_RDWR);
27365 if (fd < 0) return 1;
27366 if (futimesat (fd, NULL, NULL)) return 2;
c9ca3f76
GM
27367
27368 ;
27369 return 0;
27370}
27371_ACEOF
5476a9a4
GM
27372if ac_fn_c_try_run "$LINENO"; then :
27373 gl_cv_func_futimesat_works=yes
c9ca3f76 27374else
5476a9a4 27375 gl_cv_func_futimesat_works=no
c9ca3f76 27376fi
5476a9a4
GM
27377rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27378 conftest.$ac_objext conftest.beam conftest.$ac_ext
c9ca3f76
GM
27379fi
27380
5476a9a4
GM
27381 rm -f conftest.file
27382fi
27383{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_futimesat_works" >&5
27384$as_echo "$gl_cv_func_futimesat_works" >&6; }
27385 case "$gl_cv_func_futimesat_works" in
27386 *yes) ;;
27387 *)
7e723570 27388
5476a9a4 27389$as_echo "#define FUTIMESAT_NULL_BUG 1" >>confdefs.h
067d23c9 27390
5476a9a4
GM
27391 ;;
27392 esac
27393 fi
dd0d840e 27394
d7ad186c 27395 gl_gnulib_enabled_260941c0e5dc67ec9e87d1fb321c300b=false
5476a9a4 27396 gl_gnulib_enabled_dosname=false
710f5812
GM
27397 gl_gnulib_enabled_euidaccess=false
27398 gl_gnulib_enabled_getgroups=false
5476a9a4 27399 gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=false
710f5812 27400 gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1=false
d7ad186c 27401 gl_gnulib_enabled_03e0aaad4cb89ca757653bd367a6ccb7=false
5476a9a4 27402 gl_gnulib_enabled_pathmax=false
710f5812 27403 gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c=false
5476a9a4
GM
27404 gl_gnulib_enabled_stat=false
27405 gl_gnulib_enabled_strtoll=false
27406 gl_gnulib_enabled_strtoull=false
27407 gl_gnulib_enabled_verify=false
710f5812 27408 gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec=false
d7ad186c
GM
27409 func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b ()
27410 {
27411 if ! $gl_gnulib_enabled_260941c0e5dc67ec9e87d1fb321c300b; then
27412
27413
27414
27415
27416
27417
27418
27419
27420 gl_LIBOBJS="$gl_LIBOBJS openat-proc.$ac_objext"
27421
27422 gl_gnulib_enabled_260941c0e5dc67ec9e87d1fb321c300b=true
27423 fi
27424 }
5476a9a4
GM
27425 func_gl_gnulib_m4code_dosname ()
27426 {
27427 if ! $gl_gnulib_enabled_dosname; then
27428 gl_gnulib_enabled_dosname=true
27429 fi
27430 }
710f5812 27431 func_gl_gnulib_m4code_euidaccess ()
5476a9a4 27432 {
710f5812 27433 if ! $gl_gnulib_enabled_euidaccess; then
dd0d840e 27434
d3127c14
GM
27435
27436
27437
27438
710f5812
GM
27439 for ac_func in euidaccess
27440do :
27441 ac_fn_c_check_func "$LINENO" "euidaccess" "ac_cv_func_euidaccess"
27442if test "x$ac_cv_func_euidaccess" = x""yes; then :
27443 cat >>confdefs.h <<_ACEOF
27444#define HAVE_EUIDACCESS 1
27445_ACEOF
d3127c14 27446
710f5812
GM
27447fi
27448done
d3127c14 27449
710f5812
GM
27450 if test $ac_cv_func_euidaccess = no; then
27451 HAVE_EUIDACCESS=0
27452 fi
d3127c14 27453
710f5812
GM
27454 if test $HAVE_EUIDACCESS = 0; then
27455
27456
27457
27458
27459
27460
27461
27462
27463 gl_LIBOBJS="$gl_LIBOBJS euidaccess.$ac_objext"
27464
27465
27466
27467 for ac_header in libgen.h
27468do :
27469 ac_fn_c_check_header_mongrel "$LINENO" "libgen.h" "ac_cv_header_libgen_h" "$ac_includes_default"
27470if test "x$ac_cv_header_libgen_h" = x""yes; then :
27471 cat >>confdefs.h <<_ACEOF
27472#define HAVE_LIBGEN_H 1
27473_ACEOF
27474
27475fi
27476
27477done
27478
27479
27480 ac_fn_c_check_func "$LINENO" "getgroups" "ac_cv_func_getgroups"
27481if test "x$ac_cv_func_getgroups" = x""yes; then :
27482
27483fi
27484
27485
27486 # If we don't yet have getgroups, see if it's in -lbsd.
27487 # This is reported to be necessary on an ITOS 3000WS running SEIUX 3.1.
27488 ac_save_LIBS=$LIBS
27489 if test $ac_cv_func_getgroups = no; then
27490 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getgroups in -lbsd" >&5
27491$as_echo_n "checking for getgroups in -lbsd... " >&6; }
27492if test "${ac_cv_lib_bsd_getgroups+set}" = set; then :
5476a9a4
GM
27493 $as_echo_n "(cached) " >&6
27494else
710f5812
GM
27495 ac_check_lib_save_LIBS=$LIBS
27496LIBS="-lbsd $LIBS"
27497cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d3127c14 27498/* end confdefs.h. */
d3127c14 27499
710f5812
GM
27500/* Override any GCC internal prototype to avoid an error.
27501 Use char because int might match the return type of a GCC
27502 builtin and then its argument prototype would still apply. */
27503#ifdef __cplusplus
27504extern "C"
27505#endif
27506char getgroups ();
d3127c14
GM
27507int
27508main ()
27509{
710f5812 27510return getgroups ();
d3127c14
GM
27511 ;
27512 return 0;
27513}
27514_ACEOF
710f5812
GM
27515if ac_fn_c_try_link "$LINENO"; then :
27516 ac_cv_lib_bsd_getgroups=yes
d3127c14 27517else
710f5812 27518 ac_cv_lib_bsd_getgroups=no
5476a9a4 27519fi
710f5812
GM
27520rm -f core conftest.err conftest.$ac_objext \
27521 conftest$ac_exeext conftest.$ac_ext
27522LIBS=$ac_check_lib_save_LIBS
d3127c14 27523fi
710f5812
GM
27524{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_getgroups" >&5
27525$as_echo "$ac_cv_lib_bsd_getgroups" >&6; }
27526if test "x$ac_cv_lib_bsd_getgroups" = x""yes; then :
27527 GETGROUPS_LIB=-lbsd
5476a9a4 27528fi
710f5812
GM
27529
27530 fi
27531
27532 # Run the program to test the functionality of the system-supplied
27533 # getgroups function only if there is such a function.
27534 if test $ac_cv_func_getgroups = yes; then
27535 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getgroups" >&5
27536$as_echo_n "checking for working getgroups... " >&6; }
27537if test "${ac_cv_func_getgroups_works+set}" = set; then :
5476a9a4
GM
27538 $as_echo_n "(cached) " >&6
27539else
710f5812
GM
27540 if test "$cross_compiling" = yes; then :
27541 case "$host_os" in # ((
5476a9a4 27542 # Guess yes on glibc systems.
710f5812 27543 *-gnu*) ac_cv_func_getgroups_works="guessing yes" ;;
5476a9a4 27544 # If we don't know, assume the worst.
710f5812 27545 *) ac_cv_func_getgroups_works="guessing no" ;;
5476a9a4 27546 esac
d3127c14 27547
5476a9a4
GM
27548else
27549 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d3127c14 27550/* end confdefs.h. */
710f5812 27551$ac_includes_default
d3127c14
GM
27552int
27553main ()
27554{
710f5812
GM
27555/* On Ultrix 4.3, getgroups (0, 0) always fails. */
27556 return getgroups (0, 0) == -1;
27557 ;
27558 return 0;
27559}
27560
27561_ACEOF
27562if ac_fn_c_try_run "$LINENO"; then :
27563 ac_cv_func_getgroups_works=yes
27564else
27565 ac_cv_func_getgroups_works=no
27566fi
27567rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27568 conftest.$ac_objext conftest.beam conftest.$ac_ext
27569fi
27570
27571
27572fi
27573{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getgroups_works" >&5
27574$as_echo "$ac_cv_func_getgroups_works" >&6; }
27575 else
27576 ac_cv_func_getgroups_works=no
27577 fi
27578 case "$ac_cv_func_getgroups_works" in
27579 *yes)
27580
27581$as_echo "#define HAVE_GETGROUPS 1" >>confdefs.h
27582
27583 ;;
27584 esac
27585 LIBS=$ac_save_LIBS
27586
27587
27588 # Solaris 9 and 10 need -lgen to get the eaccess function.
27589 # Save and restore LIBS so -lgen isn't added to it. Otherwise, *all*
27590 # programs in the package would end up linked with that potentially-shared
27591 # library, inducing unnecessary run-time overhead.
27592 LIB_EACCESS=
27593
27594 gl_saved_libs=$LIBS
27595 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing eaccess" >&5
27596$as_echo_n "checking for library containing eaccess... " >&6; }
27597if test "${ac_cv_search_eaccess+set}" = set; then :
27598 $as_echo_n "(cached) " >&6
27599else
27600 ac_func_search_save_LIBS=$LIBS
27601cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27602/* end confdefs.h. */
27603
27604/* Override any GCC internal prototype to avoid an error.
27605 Use char because int might match the return type of a GCC
27606 builtin and then its argument prototype would still apply. */
27607#ifdef __cplusplus
27608extern "C"
27609#endif
27610char eaccess ();
27611int
27612main ()
27613{
27614return eaccess ();
27615 ;
27616 return 0;
27617}
27618_ACEOF
27619for ac_lib in '' gen; do
27620 if test -z "$ac_lib"; then
27621 ac_res="none required"
27622 else
27623 ac_res=-l$ac_lib
27624 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
27625 fi
27626 if ac_fn_c_try_link "$LINENO"; then :
27627 ac_cv_search_eaccess=$ac_res
27628fi
27629rm -f core conftest.err conftest.$ac_objext \
27630 conftest$ac_exeext
27631 if test "${ac_cv_search_eaccess+set}" = set; then :
27632 break
27633fi
27634done
27635if test "${ac_cv_search_eaccess+set}" = set; then :
27636
27637else
27638 ac_cv_search_eaccess=no
27639fi
27640rm conftest.$ac_ext
27641LIBS=$ac_func_search_save_LIBS
27642fi
27643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_eaccess" >&5
27644$as_echo "$ac_cv_search_eaccess" >&6; }
27645ac_res=$ac_cv_search_eaccess
27646if test "$ac_res" != no; then :
27647 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
27648 test "$ac_cv_search_eaccess" = "none required" ||
27649 LIB_EACCESS=$ac_cv_search_eaccess
27650fi
27651
27652 for ac_func in eaccess
27653do :
27654 ac_fn_c_check_func "$LINENO" "eaccess" "ac_cv_func_eaccess"
27655if test "x$ac_cv_func_eaccess" = x""yes; then :
27656 cat >>confdefs.h <<_ACEOF
27657#define HAVE_EACCESS 1
27658_ACEOF
27659
27660fi
27661done
27662
27663 LIBS=$gl_saved_libs
27664
27665 fi
27666
27667
27668
27669
27670
27671 GNULIB_EUIDACCESS=1
27672
27673
27674
27675
27676
27677 gl_gnulib_enabled_euidaccess=true
27678 if test $HAVE_EUIDACCESS = 0; then
27679 func_gl_gnulib_m4code_a9786850e999ae65a836a6041e8e5ed1
27680 fi
27681 func_gl_gnulib_m4code_6099e9737f757db36c47fa9d9f02e88c
27682 if test $HAVE_EUIDACCESS = 0; then
27683 func_gl_gnulib_m4code_stat
27684 fi
27685 fi
27686 }
27687 func_gl_gnulib_m4code_getgroups ()
27688 {
27689 if ! $gl_gnulib_enabled_getgroups; then
27690
27691
27692
27693
27694
27695 ac_fn_c_check_func "$LINENO" "getgroups" "ac_cv_func_getgroups"
27696if test "x$ac_cv_func_getgroups" = x""yes; then :
27697
27698fi
27699
27700
27701 # If we don't yet have getgroups, see if it's in -lbsd.
27702 # This is reported to be necessary on an ITOS 3000WS running SEIUX 3.1.
27703 ac_save_LIBS=$LIBS
27704 if test $ac_cv_func_getgroups = no; then
27705 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getgroups in -lbsd" >&5
27706$as_echo_n "checking for getgroups in -lbsd... " >&6; }
27707if test "${ac_cv_lib_bsd_getgroups+set}" = set; then :
27708 $as_echo_n "(cached) " >&6
27709else
27710 ac_check_lib_save_LIBS=$LIBS
27711LIBS="-lbsd $LIBS"
27712cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27713/* end confdefs.h. */
27714
27715/* Override any GCC internal prototype to avoid an error.
27716 Use char because int might match the return type of a GCC
27717 builtin and then its argument prototype would still apply. */
27718#ifdef __cplusplus
27719extern "C"
27720#endif
27721char getgroups ();
27722int
27723main ()
27724{
27725return getgroups ();
27726 ;
27727 return 0;
27728}
27729_ACEOF
27730if ac_fn_c_try_link "$LINENO"; then :
27731 ac_cv_lib_bsd_getgroups=yes
27732else
27733 ac_cv_lib_bsd_getgroups=no
27734fi
27735rm -f core conftest.err conftest.$ac_objext \
27736 conftest$ac_exeext conftest.$ac_ext
27737LIBS=$ac_check_lib_save_LIBS
27738fi
27739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_getgroups" >&5
27740$as_echo "$ac_cv_lib_bsd_getgroups" >&6; }
27741if test "x$ac_cv_lib_bsd_getgroups" = x""yes; then :
27742 GETGROUPS_LIB=-lbsd
27743fi
27744
27745 fi
27746
27747 # Run the program to test the functionality of the system-supplied
27748 # getgroups function only if there is such a function.
27749 if test $ac_cv_func_getgroups = yes; then
27750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getgroups" >&5
27751$as_echo_n "checking for working getgroups... " >&6; }
27752if test "${ac_cv_func_getgroups_works+set}" = set; then :
27753 $as_echo_n "(cached) " >&6
27754else
27755 if test "$cross_compiling" = yes; then :
27756 case "$host_os" in # ((
27757 # Guess yes on glibc systems.
27758 *-gnu*) ac_cv_func_getgroups_works="guessing yes" ;;
27759 # If we don't know, assume the worst.
27760 *) ac_cv_func_getgroups_works="guessing no" ;;
27761 esac
27762
27763else
27764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27765/* end confdefs.h. */
27766$ac_includes_default
27767int
27768main ()
27769{
27770/* On Ultrix 4.3, getgroups (0, 0) always fails. */
27771 return getgroups (0, 0) == -1;
27772 ;
27773 return 0;
27774}
27775
27776_ACEOF
27777if ac_fn_c_try_run "$LINENO"; then :
27778 ac_cv_func_getgroups_works=yes
27779else
27780 ac_cv_func_getgroups_works=no
27781fi
27782rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27783 conftest.$ac_objext conftest.beam conftest.$ac_ext
27784fi
27785
27786
27787fi
27788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getgroups_works" >&5
27789$as_echo "$ac_cv_func_getgroups_works" >&6; }
27790 else
27791 ac_cv_func_getgroups_works=no
27792 fi
27793 case "$ac_cv_func_getgroups_works" in
27794 *yes)
27795
27796$as_echo "#define HAVE_GETGROUPS 1" >>confdefs.h
27797
27798 ;;
27799 esac
27800 LIBS=$ac_save_LIBS
27801
27802 if test $ac_cv_func_getgroups != yes; then
27803 HAVE_GETGROUPS=0
27804 else
27805 if test "$ac_cv_type_getgroups" != gid_t \
27806 || { case "$ac_cv_func_getgroups_works" in
27807 *yes) false;;
27808 *) true;;
27809 esac
27810 }; then
27811 REPLACE_GETGROUPS=1
27812
27813$as_echo "#define GETGROUPS_ZERO_BUG 1" >>confdefs.h
27814
27815 else
27816 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getgroups handles negative values" >&5
27817$as_echo_n "checking whether getgroups handles negative values... " >&6; }
27818if test "${gl_cv_func_getgroups_works+set}" = set; then :
27819 $as_echo_n "(cached) " >&6
27820else
27821 if test "$cross_compiling" = yes; then :
27822 case "$host_os" in
27823 # Guess yes on glibc systems.
27824 *-gnu*) gl_cv_func_getgroups_works="guessing yes" ;;
27825 # If we don't know, assume the worst.
27826 *) gl_cv_func_getgroups_works="guessing no" ;;
27827 esac
27828
27829else
27830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27831/* end confdefs.h. */
27832$ac_includes_default
27833int
27834main ()
27835{
27836int size = getgroups (0, 0);
27837 gid_t *list = malloc (size * sizeof *list);
27838 return getgroups (-1, list) != -1;
27839 ;
27840 return 0;
27841}
27842_ACEOF
27843if ac_fn_c_try_run "$LINENO"; then :
27844 gl_cv_func_getgroups_works=yes
27845else
27846 gl_cv_func_getgroups_works=no
27847fi
27848rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27849 conftest.$ac_objext conftest.beam conftest.$ac_ext
27850fi
27851
27852fi
27853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getgroups_works" >&5
27854$as_echo "$gl_cv_func_getgroups_works" >&6; }
27855 case "$gl_cv_func_getgroups_works" in
27856 *yes) ;;
27857 *) REPLACE_GETGROUPS=1 ;;
27858 esac
27859 fi
27860 fi
27861 test -n "$GETGROUPS_LIB" && LIBS="$GETGROUPS_LIB $LIBS"
27862
27863 if test $HAVE_GETGROUPS = 0 || test $REPLACE_GETGROUPS = 1; then
27864
27865
27866
27867
27868
27869
27870
27871
27872 gl_LIBOBJS="$gl_LIBOBJS getgroups.$ac_objext"
27873
27874 fi
27875
27876
27877
27878
27879
27880 GNULIB_GETGROUPS=1
27881
27882
27883
27884
27885
27886 gl_gnulib_enabled_getgroups=true
27887 fi
27888 }
27889 func_gl_gnulib_m4code_be453cec5eecf5731a274f2de7f2db36 ()
27890 {
27891 if ! $gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36; then
27892
27893
27894 gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=true
27895 fi
27896 }
27897 func_gl_gnulib_m4code_a9786850e999ae65a836a6041e8e5ed1 ()
27898 {
27899 if ! $gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1; then
27900
27901
27902
27903
27904
27905 ac_fn_c_check_func "$LINENO" "group_member" "ac_cv_func_group_member"
27906if test "x$ac_cv_func_group_member" = x""yes; then :
27907
27908else
27909
27910 HAVE_GROUP_MEMBER=0
27911
27912fi
27913
27914
27915 if test $HAVE_GROUP_MEMBER = 0; then
27916
27917
27918
27919
27920
27921
27922
27923
27924 gl_LIBOBJS="$gl_LIBOBJS group-member.$ac_objext"
27925
27926
27927
27928
27929 fi
27930
27931
27932
27933
27934
27935 GNULIB_GROUP_MEMBER=1
27936
27937
27938
27939
27940
27941 gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1=true
27942 if test $HAVE_GROUP_MEMBER = 0; then
27943 func_gl_gnulib_m4code_getgroups
27944 fi
27945 if test $HAVE_GROUP_MEMBER = 0; then
27946 func_gl_gnulib_m4code_682e609604ccaac6be382e4ee3a4eaec
27947 fi
27948 fi
27949 }
d7ad186c
GM
27950 func_gl_gnulib_m4code_03e0aaad4cb89ca757653bd367a6ccb7 ()
27951 {
27952 if ! $gl_gnulib_enabled_03e0aaad4cb89ca757653bd367a6ccb7; then
27953 gl_gnulib_enabled_03e0aaad4cb89ca757653bd367a6ccb7=true
27954 fi
27955 }
710f5812
GM
27956 func_gl_gnulib_m4code_pathmax ()
27957 {
27958 if ! $gl_gnulib_enabled_pathmax; then
27959
27960
27961
27962 gl_gnulib_enabled_pathmax=true
27963 fi
27964 }
27965 func_gl_gnulib_m4code_6099e9737f757db36c47fa9d9f02e88c ()
27966 {
27967 if ! $gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c; then
27968 gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c=true
27969 fi
27970 }
27971 func_gl_gnulib_m4code_stat ()
27972 {
27973 if ! $gl_gnulib_enabled_stat; then
27974
27975
27976
27977 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5
27978$as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; }
27979if test "${gl_cv_func_stat_dir_slash+set}" = set; then :
27980 $as_echo_n "(cached) " >&6
27981else
27982 if test "$cross_compiling" = yes; then :
27983 case $host_os in
27984 mingw*) gl_cv_func_stat_dir_slash="guessing no";;
27985 *) gl_cv_func_stat_dir_slash="guessing yes";;
27986 esac
27987else
27988 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27989/* end confdefs.h. */
27990#include <sys/stat.h>
27991
27992int
27993main ()
27994{
27995struct stat st; return stat (".", &st) != stat ("./", &st);
27996 ;
27997 return 0;
27998}
27999_ACEOF
28000if ac_fn_c_try_run "$LINENO"; then :
28001 gl_cv_func_stat_dir_slash=yes
28002else
28003 gl_cv_func_stat_dir_slash=no
28004fi
28005rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28006 conftest.$ac_objext conftest.beam conftest.$ac_ext
28007fi
28008
28009fi
28010{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5
28011$as_echo "$gl_cv_func_stat_dir_slash" >&6; }
28012 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
28013$as_echo_n "checking whether stat handles trailing slashes on files... " >&6; }
28014if test "${gl_cv_func_stat_file_slash+set}" = set; then :
28015 $as_echo_n "(cached) " >&6
28016else
28017 touch conftest.tmp
28018 # Assume that if we have lstat, we can also check symlinks.
28019 if test $ac_cv_func_lstat = yes; then
28020 ln -s conftest.tmp conftest.lnk
28021 fi
28022 if test "$cross_compiling" = yes; then :
28023 case "$host_os" in
28024 # Guess yes on glibc systems.
28025 *-gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
28026 # If we don't know, assume the worst.
28027 *) gl_cv_func_stat_file_slash="guessing no" ;;
28028 esac
28029
28030else
28031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28032/* end confdefs.h. */
28033#include <sys/stat.h>
28034
28035int
28036main ()
28037{
28038int result = 0;
28039 struct stat st;
28040 if (!stat ("conftest.tmp/", &st))
28041 result |= 1;
28042#if HAVE_LSTAT
28043 if (!stat ("conftest.lnk/", &st))
5476a9a4
GM
28044 result |= 2;
28045#endif
28046 return result;
d3127c14
GM
28047
28048 ;
28049 return 0;
28050}
28051_ACEOF
5476a9a4
GM
28052if ac_fn_c_try_run "$LINENO"; then :
28053 gl_cv_func_stat_file_slash=yes
d3127c14 28054else
5476a9a4
GM
28055 gl_cv_func_stat_file_slash=no
28056fi
28057rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28058 conftest.$ac_objext conftest.beam conftest.$ac_ext
d3127c14 28059fi
d3127c14 28060
5476a9a4
GM
28061 rm -f conftest.tmp conftest.lnk
28062fi
28063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
28064$as_echo "$gl_cv_func_stat_file_slash" >&6; }
28065 case $gl_cv_func_stat_dir_slash in
28066 *no) REPLACE_STAT=1
d3127c14 28067
5476a9a4
GM
28068$as_echo "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h
28069;;
28070 esac
28071 case $gl_cv_func_stat_file_slash in
28072 *no) REPLACE_STAT=1
d3127c14 28073
5476a9a4
GM
28074$as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
28075;;
28076 esac
d3127c14 28077
a6342fc8 28078 if test $REPLACE_STAT = 1; then
d3127c14 28079
dd0d840e 28080
dd0d840e 28081
dd0d840e 28082
dd0d840e 28083
dd0d840e 28084
067d23c9
KY
28085
28086
5476a9a4 28087 gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
067d23c9 28088
45d4966b 28089 :
a6342fc8 28090 fi
067d23c9 28091
dd0d840e
GM
28092
28093
dd0d840e 28094
dd0d840e 28095
5476a9a4 28096 GNULIB_STAT=1
dd0d840e 28097
067d23c9
KY
28098
28099
28100
28101
5476a9a4
GM
28102 gl_gnulib_enabled_stat=true
28103 if test $REPLACE_STAT = 1; then
28104 func_gl_gnulib_m4code_dosname
28105 fi
28106 if test $REPLACE_STAT = 1; then
28107 func_gl_gnulib_m4code_pathmax
28108 fi
28109 if test $REPLACE_STAT = 1; then
28110 func_gl_gnulib_m4code_verify
28111 fi
28112 fi
28113 }
28114 func_gl_gnulib_m4code_strtoll ()
28115 {
28116 if ! $gl_gnulib_enabled_strtoll; then
067d23c9
KY
28117
28118
28119
5476a9a4
GM
28120 if test "$ac_cv_type_long_long_int" = yes; then
28121 for ac_func in strtoll
28122do :
28123 ac_fn_c_check_func "$LINENO" "strtoll" "ac_cv_func_strtoll"
28124if test "x$ac_cv_func_strtoll" = x""yes; then :
28125 cat >>confdefs.h <<_ACEOF
28126#define HAVE_STRTOLL 1
28127_ACEOF
067d23c9 28128
5476a9a4
GM
28129fi
28130done
067d23c9 28131
5476a9a4
GM
28132 if test $ac_cv_func_strtoll = no; then
28133 HAVE_STRTOLL=0
28134 fi
28135 fi
067d23c9 28136
a6342fc8 28137 if test $HAVE_STRTOLL = 0; then
067d23c9
KY
28138
28139
28140
067d23c9
KY
28141
28142
28143
28144
28145
5476a9a4 28146 gl_LIBOBJS="$gl_LIBOBJS strtoll.$ac_objext"
067d23c9
KY
28147
28148
5476a9a4 28149 :
067d23c9 28150
a6342fc8 28151 fi
067d23c9
KY
28152
28153
28154
067d23c9 28155
067d23c9 28156
5476a9a4 28157 GNULIB_STRTOLL=1
067d23c9 28158
397f7161 28159
067d23c9
KY
28160
28161
067d23c9 28162
5476a9a4
GM
28163 gl_gnulib_enabled_strtoll=true
28164 fi
28165 }
28166 func_gl_gnulib_m4code_strtoull ()
28167 {
28168 if ! $gl_gnulib_enabled_strtoull; then
067d23c9 28169
067d23c9 28170
067d23c9 28171
5476a9a4
GM
28172 if test "$ac_cv_type_unsigned_long_long_int" = yes; then
28173 for ac_func in strtoull
28174do :
28175 ac_fn_c_check_func "$LINENO" "strtoull" "ac_cv_func_strtoull"
28176if test "x$ac_cv_func_strtoull" = x""yes; then :
28177 cat >>confdefs.h <<_ACEOF
28178#define HAVE_STRTOULL 1
28179_ACEOF
067d23c9 28180
f199cab1 28181fi
5476a9a4 28182done
067d23c9 28183
5476a9a4
GM
28184 if test $ac_cv_func_strtoull = no; then
28185 HAVE_STRTOULL=0
28186 fi
28187 fi
067d23c9 28188
a6342fc8 28189 if test $HAVE_STRTOULL = 0; then
067d23c9
KY
28190
28191
067d23c9 28192
067d23c9 28193
067d23c9 28194
067d23c9 28195
067d23c9 28196
067d23c9 28197
5476a9a4 28198 gl_LIBOBJS="$gl_LIBOBJS strtoull.$ac_objext"
067d23c9 28199
067d23c9 28200
5476a9a4 28201 :
067d23c9 28202
a6342fc8 28203 fi
067d23c9
KY
28204
28205
3e0be4ab 28206
3e0be4ab 28207
067d23c9 28208
5476a9a4 28209 GNULIB_STRTOULL=1
067d23c9 28210
a0a61e58 28211
067d23c9 28212
067d23c9
KY
28213
28214
5476a9a4
GM
28215 gl_gnulib_enabled_strtoull=true
28216 fi
28217 }
28218 func_gl_gnulib_m4code_verify ()
28219 {
28220 if ! $gl_gnulib_enabled_verify; then
28221 gl_gnulib_enabled_verify=true
28222 fi
28223 }
710f5812
GM
28224 func_gl_gnulib_m4code_682e609604ccaac6be382e4ee3a4eaec ()
28225 {
28226 if ! $gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec; then
28227 gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec=true
28228 fi
28229 }
d7ad186c
GM
28230 if test $HAVE_FACCESSAT = 0; then
28231 func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b
28232 fi
710f5812
GM
28233 if test $HAVE_FACCESSAT = 0; then
28234 func_gl_gnulib_m4code_dosname
28235 fi
28236 if test $HAVE_FACCESSAT = 0; then
28237 func_gl_gnulib_m4code_euidaccess
28238 fi
d7ad186c
GM
28239 if test $HAVE_FACCESSAT = 0; then
28240 func_gl_gnulib_m4code_03e0aaad4cb89ca757653bd367a6ccb7
28241 fi
28242 if test $HAVE_FDOPENDIR = 0; then
28243 func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b
28244 fi
28245 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
28246 func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b
28247 fi
28248 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
28249 func_gl_gnulib_m4code_dosname
28250 fi
28251 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
28252 func_gl_gnulib_m4code_03e0aaad4cb89ca757653bd367a6ccb7
28253 fi
5476a9a4
GM
28254 if test $REPLACE_GETOPT = 1; then
28255 func_gl_gnulib_m4code_be453cec5eecf5731a274f2de7f2db36
28256 fi
28257 if test $REPLACE_LSTAT = 1; then
28258 func_gl_gnulib_m4code_dosname
28259 fi
28260 if test $REPLACE_LSTAT = 1; then
28261 func_gl_gnulib_m4code_stat
28262 fi
28263 if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
28264 func_gl_gnulib_m4code_stat
28265 fi
d7ad186c
GM
28266 if test $HAVE_READLINKAT = 0; then
28267 func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b
28268 fi
28269 if test $HAVE_READLINKAT = 0; then
28270 func_gl_gnulib_m4code_dosname
28271 fi
28272 if test $HAVE_READLINKAT = 0; then
28273 func_gl_gnulib_m4code_03e0aaad4cb89ca757653bd367a6ccb7
28274 fi
5476a9a4
GM
28275 if { test $HAVE_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; } && test $ac_cv_type_long_long_int = yes; then
28276 func_gl_gnulib_m4code_strtoll
28277 fi
28278 if test $HAVE_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; then
28279 func_gl_gnulib_m4code_verify
28280 fi
28281 if test $ac_cv_func_strtoumax = no && test $ac_cv_type_unsigned_long_long_int = yes; then
28282 func_gl_gnulib_m4code_strtoull
28283 fi
28284 if test $ac_cv_func_strtoumax = no; then
28285 func_gl_gnulib_m4code_verify
28286 fi
067d23c9 28287
d7ad186c
GM
28288 if $gl_gnulib_enabled_260941c0e5dc67ec9e87d1fb321c300b; then
28289 gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_TRUE=
28290 gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_FALSE='#'
28291else
28292 gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_TRUE='#'
28293 gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_FALSE=
28294fi
28295
5476a9a4
GM
28296 if $gl_gnulib_enabled_dosname; then
28297 gl_GNULIB_ENABLED_dosname_TRUE=
28298 gl_GNULIB_ENABLED_dosname_FALSE='#'
28299else
28300 gl_GNULIB_ENABLED_dosname_TRUE='#'
28301 gl_GNULIB_ENABLED_dosname_FALSE=
28302fi
067d23c9 28303
710f5812
GM
28304 if $gl_gnulib_enabled_euidaccess; then
28305 gl_GNULIB_ENABLED_euidaccess_TRUE=
28306 gl_GNULIB_ENABLED_euidaccess_FALSE='#'
28307else
28308 gl_GNULIB_ENABLED_euidaccess_TRUE='#'
28309 gl_GNULIB_ENABLED_euidaccess_FALSE=
28310fi
28311
28312 if $gl_gnulib_enabled_getgroups; then
28313 gl_GNULIB_ENABLED_getgroups_TRUE=
28314 gl_GNULIB_ENABLED_getgroups_FALSE='#'
28315else
28316 gl_GNULIB_ENABLED_getgroups_TRUE='#'
28317 gl_GNULIB_ENABLED_getgroups_FALSE=
28318fi
28319
5476a9a4
GM
28320 if $gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36; then
28321 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE=
28322 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE='#'
28323else
28324 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE='#'
28325 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE=
28326fi
067d23c9 28327
710f5812
GM
28328 if $gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1; then
28329 gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_TRUE=
28330 gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_FALSE='#'
28331else
28332 gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_TRUE='#'
28333 gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_FALSE=
28334fi
28335
d7ad186c
GM
28336 if $gl_gnulib_enabled_03e0aaad4cb89ca757653bd367a6ccb7; then
28337 gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_TRUE=
28338 gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_FALSE='#'
28339else
28340 gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_TRUE='#'
28341 gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_FALSE=
28342fi
28343
5476a9a4
GM
28344 if $gl_gnulib_enabled_pathmax; then
28345 gl_GNULIB_ENABLED_pathmax_TRUE=
28346 gl_GNULIB_ENABLED_pathmax_FALSE='#'
28347else
28348 gl_GNULIB_ENABLED_pathmax_TRUE='#'
28349 gl_GNULIB_ENABLED_pathmax_FALSE=
28350fi
067d23c9 28351
710f5812
GM
28352 if $gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c; then
28353 gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_TRUE=
28354 gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_FALSE='#'
28355else
28356 gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_TRUE='#'
28357 gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_FALSE=
28358fi
28359
5476a9a4
GM
28360 if $gl_gnulib_enabled_stat; then
28361 gl_GNULIB_ENABLED_stat_TRUE=
28362 gl_GNULIB_ENABLED_stat_FALSE='#'
28363else
28364 gl_GNULIB_ENABLED_stat_TRUE='#'
28365 gl_GNULIB_ENABLED_stat_FALSE=
28366fi
067d23c9 28367
5476a9a4
GM
28368 if $gl_gnulib_enabled_strtoll; then
28369 gl_GNULIB_ENABLED_strtoll_TRUE=
28370 gl_GNULIB_ENABLED_strtoll_FALSE='#'
28371else
28372 gl_GNULIB_ENABLED_strtoll_TRUE='#'
28373 gl_GNULIB_ENABLED_strtoll_FALSE=
28374fi
067d23c9 28375
5476a9a4
GM
28376 if $gl_gnulib_enabled_strtoull; then
28377 gl_GNULIB_ENABLED_strtoull_TRUE=
28378 gl_GNULIB_ENABLED_strtoull_FALSE='#'
28379else
28380 gl_GNULIB_ENABLED_strtoull_TRUE='#'
28381 gl_GNULIB_ENABLED_strtoull_FALSE=
f199cab1 28382fi
067d23c9 28383
5476a9a4
GM
28384 if $gl_gnulib_enabled_verify; then
28385 gl_GNULIB_ENABLED_verify_TRUE=
28386 gl_GNULIB_ENABLED_verify_FALSE='#'
28387else
28388 gl_GNULIB_ENABLED_verify_TRUE='#'
28389 gl_GNULIB_ENABLED_verify_FALSE=
28390fi
067d23c9 28391
710f5812
GM
28392 if $gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec; then
28393 gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_TRUE=
28394 gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_FALSE='#'
28395else
28396 gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_TRUE='#'
28397 gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_FALSE=
28398fi
28399
5476a9a4 28400 # End of code from modules
067d23c9 28401
067d23c9 28402
067d23c9 28403
067d23c9 28404
f199cab1 28405
f199cab1
GM
28406
28407
067d23c9 28408
5476a9a4
GM
28409
28410 gltests_libdeps=
28411 gltests_ltlibdeps=
067d23c9 28412
067d23c9 28413
067d23c9
KY
28414
28415
067d23c9
KY
28416
28417
3e0be4ab 28418
3e0be4ab 28419
3e0be4ab 28420
5476a9a4
GM
28421 gl_source_base='tests'
28422 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 28423
5476a9a4 28424 gl_module_indicator_condition=$gltests_WITNESS
3e0be4ab
GM
28425
28426
28427
28428
28429
067d23c9
KY
28430
28431
28432
3e0be4ab 28433
3e0be4ab 28434
5476a9a4
GM
28435 LIBGNU_LIBDEPS="$gl_libdeps"
28436
28437 LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
28438
067d23c9 28439
5476a9a4
GM
28440CFLAGS=$SAVE_CFLAGS
28441LIBS=$SAVE_LIBS
067d23c9 28442
7c61eaab
GM
28443if test "${opsys}" = "mingw32"; then
28444 CPPFLAGS="$CPPFLAGS -DUSE_CRT_DLL=1 -I $srcdir/nt/inc"
28445 # Remove unneeded switches from the value of CC that goes to Makefiles
28446 CC=`echo $CC | sed -e "s,$GCC_TEST_OPTIONS,,"`
28447fi
28448
067d23c9
KY
28449case "$opsys" in
28450 aix4-2) LD_SWITCH_SYSTEM_TEMACS="-Wl,-bnodelcsect" ;;
28451
28452 darwin)
28453 ## The -headerpad option tells ld (see man page) to leave room at the
28454 ## end of the header for adding load commands. Needed for dumping.
28455 ## 0x690 is the total size of 30 segment load commands (at 56
28456 ## each); under Cocoa 31 commands are required.
28457 if test "$HAVE_NS" = "yes"; then
28458 libs_nsgui="-framework AppKit"
cc70ee9b
GM
28459 if test "$NS_IMPL_COCOA" = "yes"; then
28460 libs_nsgui="$libs_nsgui -framework IOKit"
28461 fi
067d23c9
KY
28462 headerpad_extra=6C8
28463 else
28464 libs_nsgui=
28465 headerpad_extra=690
28466 fi
85cf5029 28467 LD_SWITCH_SYSTEM_TEMACS="-fno-pie -prebind $libs_nsgui -Xlinker -headerpad -Xlinker $headerpad_extra"
067d23c9
KY
28468
28469 ## This is here because src/Makefile.in did some extra fiddling around
2407788f
GM
28470 ## with LD_SWITCH_SYSTEM. It seems cleaner to put this in
28471 ## LD_SWITCH_SYSTEM_TEMACS instead,
067d23c9
KY
28472 test "x$LD_SWITCH_SYSTEM" = "x" && test "x$GCC" != "xyes" && \
28473 LD_SWITCH_SYSTEM_TEMACS="-X $LD_SWITCH_SYSTEM_TEMACS"
28474 ;;
28475
ae629dae
GM
28476 ## LD_SWITCH_X_SITE_RPATH is a -rpath option saying where to
28477 ## find X at run-time.
28478 ## When handled by cpp, this was in LD_SWITCH_SYSTEM. However, at the
28479 ## point where configure sourced the s/*.h file, LD_SWITCH_X_SITE_RPATH
067d23c9
KY
28480 ## had not yet been defined and was expanded to null. Hence LD_SWITCH_SYSTEM
28481 ## had different values in configure (in ac_link) and src/Makefile.in.
28482 ## It seems clearer therefore to put this piece in LD_SWITCH_SYSTEM_TEMACS.
ae629dae 28483 gnu*) LD_SWITCH_SYSTEM_TEMACS="\$(LD_SWITCH_X_SITE_RPATH)" ;;
067d23c9 28484
7c61eaab
GM
28485 mingw32)
28486 ## MinGW64 does not prepend an underscore to symbols, so we must
28487 ## pass a different -entry switch to linker. FIXME: It is better
28488 ## to make the entry points the same by changing unexw32.c.
28489 case "$canonical" in
28490 x86_64-*-*) LD_SWITCH_SYSTEM_TEMACS="-Wl,-stack,0x00800000 -Wl,-heap,0x00100000 -Wl,-image-base,0x01000000 -Wl,-entry,_start -Wl,-Map,./temacs.map" ;;
28491 *) LD_SWITCH_SYSTEM_TEMACS="-Wl,-stack,0x00800000 -Wl,-heap,0x00100000 -Wl,-image-base,0x01000000 -Wl,-entry,__start -Wl,-Map,./temacs.map" ;;
28492 esac
28493 ;;
28494
3766b742
GM
28495 openbsd) LD_SWITCH_SYSTEM_TEMACS='-nopie' ;;
28496
067d23c9
KY
28497 *) LD_SWITCH_SYSTEM_TEMACS= ;;
28498esac
28499
26256684
GM
28500if test x$ac_enable_profiling != x ; then
28501 case $opsys in
28502 *freebsd | gnu-linux) ;;
28503 *) LD_SWITCH_SYSTEM_TEMACS="$LD_SWITCH_SYSTEM_TEMACS -pg" ;;
28504 esac
28505fi
28506
067d23c9
KY
28507
28508
7c61eaab
GM
28509## MinGW-specific post-link processing of temacs.
28510TEMACS_POST_LINK=":"
28511ADDSECTION=
28512EMACS_HEAPSIZE=
28513if test "${opsys}" = "mingw32"; then
28514 TEMACS_POST_LINK="\$(MINGW_TEMACS_POST_LINK)"
28515 ADDSECTION="../nt/addsection\$(EXEEXT)"
28516 ## Preload heap size of temacs.exe in MB.
28517 case "$canonical" in
28518 x86_64-*-*) EMACS_HEAPSIZE=42 ;;
28519 *) EMACS_HEAPSIZE=27 ;;
28520 esac
28521fi
28522
28523
28524
28525
28526
42dcba54
GM
28527## Common for all window systems
28528if test "$window_system" != "none"; then
067d23c9
KY
28529
28530$as_echo "#define HAVE_WINDOW_SYSTEM 1" >>confdefs.h
28531
42dcba54 28532 WINDOW_SYSTEM_OBJ="fontset.o fringe.o image.o"
067d23c9
KY
28533fi
28534
28535
28536
28537
42dcba54 28538
067d23c9
KY
28539#### Report on what we decided to do.
28540#### Report GTK as a toolkit, even if it doesn't use Xt.
28541#### It makes printing result more understandable as using GTK sets
28542#### toolkit_scroll_bars to yes by default.
28543if test "${HAVE_GTK}" = "yes"; then
a732eace 28544 USE_X_TOOLKIT="$USE_GTK_TOOLKIT"
067d23c9
KY
28545fi
28546
28237e48
GM
28547if test $USE_ACL -ne 0; then
28548 acl_summary="yes $LIB_ACL"
28549else
28550 acl_summary=no
28551fi
28552
067d23c9
KY
28553echo "
28554Configured for \`${canonical}'.
28555
28556 Where should the build process find the source code? ${srcdir}
067d23c9
KY
28557 What compiler should emacs be built with? ${CC} ${CFLAGS}
28558 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
28559 Should Emacs use a relocating allocator for buffers? ${REL_ALLOC}
28560 Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers
28561 What window system should Emacs use? ${window_system}
28562 What toolkit should Emacs use? ${USE_X_TOOLKIT}"
28563
28564if test -n "${x_includes}"; then
28565echo " Where do we find X Windows header files? ${x_includes}"
28566else
28567echo " Where do we find X Windows header files? Standard dirs"
28568fi
28569if test -n "${x_libraries}"; then
28570echo " Where do we find X Windows libraries? ${x_libraries}"
28571else
28572echo " Where do we find X Windows libraries? Standard dirs"
28573fi
28574
28575echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}"
28576echo " Does Emacs use -lXpm? ${HAVE_XPM}"
28577echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
28578echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
28579echo " Does Emacs use a gif library? ${HAVE_GIF} $LIBGIF"
28580echo " Does Emacs use -lpng? ${HAVE_PNG}"
28581echo " Does Emacs use -lrsvg-2? ${HAVE_RSVG}"
28582echo " Does Emacs use imagemagick? ${HAVE_IMAGEMAGICK}"
28583
28584echo " Does Emacs use -lgpm? ${HAVE_GPM}"
28585echo " Does Emacs use -ldbus? ${HAVE_DBUS}"
28586echo " Does Emacs use -lgconf? ${HAVE_GCONF}"
f527bd02 28587echo " Does Emacs use GSettings? ${HAVE_GSETTINGS}"
0f55a32e 28588echo " Does Emacs use a file notification library? ${NOTIFY_SUMMARY}"
28237e48 28589echo " Does Emacs use access control lists? ${acl_summary}"
067d23c9 28590echo " Does Emacs use -lselinux? ${HAVE_LIBSELINUX}"
27f5a136 28591echo " Does Emacs use -lgnutls? ${HAVE_GNUTLS}"
067d23c9
KY
28592echo " Does Emacs use -lxml2? ${HAVE_LIBXML2}"
28593
28594echo " Does Emacs use -lfreetype? ${HAVE_FREETYPE}"
28595echo " Does Emacs use -lm17n-flt? ${HAVE_M17N_FLT}"
28596echo " Does Emacs use -lotf? ${HAVE_LIBOTF}"
28597echo " Does Emacs use -lxft? ${HAVE_XFT}"
28598
28599echo " Does Emacs use toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
28600echo
28601
eb39a72d
GM
28602if test -n "${EMACSDATA}"; then
28603 echo " Environment variable EMACSDATA set to: $EMACSDATA"
28604fi
28605if test -n "${EMACSDOC}"; then
28606 echo " Environment variable EMACSDOC set to: $EMACSDOC"
28607fi
28608
067d23c9
KY
28609echo
28610
28611if test "$HAVE_NS" = "yes"; then
28612 echo
3d0788a9 28613 echo "You must run \"${MAKE-make} install\" in order to test the built application.
067d23c9
KY
28614The installed application will go to nextstep/Emacs.app and can be
28615run or moved from there."
28616 if test "$EN_NS_SELF_CONTAINED" = "yes"; then
28617 echo "The application will be fully self-contained."
28618 else
28619 echo "The lisp resources for the application will be installed under ${prefix}.
3d0788a9 28620You may need to run \"${MAKE-make} install\" with sudo. The application will fail
067d23c9
KY
28621to run if these resources are not installed."
28622 fi
28623 echo
28624fi
28625
031fabfc
GM
28626if test "${opsys}" = "cygwin"; then
28627 case `uname -r` in
28628 1.5.*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: building Emacs on Cygwin 1.5 is not supported." >&5
28629$as_echo "$as_me: WARNING: building Emacs on Cygwin 1.5 is not supported." >&2;}
28630 echo
28631 ;;
28632 esac
28633fi
067d23c9
KY
28634
28635# Remove any trailing slashes in these variables.
28636test "${prefix}" != NONE &&
28637 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
28638test "${exec_prefix}" != NONE &&
28639 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
28640
bb7dce39
GM
28641if test "$HAVE_NS" = "yes"; then
28642 if test "$NS_IMPL_GNUSTEP" = yes; then
28643 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"
28644
28645 else
28646 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"
28647
28648 fi
28649fi
28650
7c61eaab 28651SUBDIR_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 nt/Makefile"
56ade35c 28652
7c61eaab 28653ac_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 nt/Makefile"
56ade35c 28654
a877df06 28655
73b78882 28656opt_makefile=test/automated/Makefile
a877df06 28657
b5591ebb 28658if test -f "$srcdir/$opt_makefile.in"; then
73b78882 28659 SUBDIR_MAKEFILES="$SUBDIR_MAKEFILES $opt_makefile"
56ade35c 28660 ac_config_files="$ac_config_files test/automated/Makefile"
a877df06 28661
56ade35c 28662fi
73b78882 28663
40b65096
GM
28664
28665opt_makefile=admin/unidata/Makefile
28666
b5591ebb 28667if test -f "$srcdir/$opt_makefile.in"; then
40b65096
GM
28668 SUBDIR_MAKEFILES="$SUBDIR_MAKEFILES $opt_makefile"
28669 ac_config_files="$ac_config_files admin/unidata/Makefile"
28670
28671fi
28672
28673
56ade35c 28674SUBDIR_MAKEFILES_IN=`echo " ${SUBDIR_MAKEFILES}" | sed -e 's| | $(srcdir)/|g' -e 's|Makefile|Makefile.in|g'`
73b78882 28675
067d23c9 28676
9411886d
PE
28677
28678ac_config_commands="$ac_config_commands mkdirs"
28679
28680
28681ac_config_commands="$ac_config_commands epaths"
28682
28683
28684ac_config_commands="$ac_config_commands gdbinit"
28685
067d23c9
KY
28686
28687cat >confcache <<\_ACEOF
28688# This file is a shell script that caches the results of configure
28689# tests run on this system so they can be shared between configure
28690# scripts and configure runs, see configure's option --config-cache.
28691# It is not useful on other systems. If it contains results you don't
28692# want to keep, you may remove or edit it.
28693#
28694# config.status only pays attention to the cache file if you give it
28695# the --recheck option to rerun configure.
28696#
28697# `ac_cv_env_foo' variables (set or unset) will be overridden when
28698# loading this file, other *unset* `ac_cv_foo' will be assigned the
28699# following values.
28700
28701_ACEOF
28702
28703# The following way of writing the cache mishandles newlines in values,
28704# but we know of no workaround that is simple, portable, and efficient.
28705# So, we kill variables containing newlines.
28706# Ultrix sh set writes to stderr and can't be redirected directly,
28707# and sets the high bit in the cache file unless we assign to the vars.
28708(
28709 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
28710 eval ac_val=\$$ac_var
28711 case $ac_val in #(
28712 *${as_nl}*)
28713 case $ac_var in #(
28714 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
28715$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
28716 esac
28717 case $ac_var in #(
28718 _ | IFS | as_nl) ;; #(
28719 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
28720 *) { eval $ac_var=; unset $ac_var;} ;;
28721 esac ;;
28722 esac
28723 done
28724
28725 (set) 2>&1 |
28726 case $as_nl`(ac_space=' '; set) 2>&1` in #(
28727 *${as_nl}ac_space=\ *)
28728 # `set' does not quote correctly, so add quotes: double-quote
28729 # substitution turns \\\\ into \\, and sed turns \\ into \.
28730 sed -n \
28731 "s/'/'\\\\''/g;
28732 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
28733 ;; #(
28734 *)
28735 # `set' quotes correctly as required by POSIX, so do not add quotes.
28736 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
28737 ;;
28738 esac |
28739 sort
28740) |
28741 sed '
28742 /^ac_cv_env_/b end
28743 t clear
28744 :clear
28745 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
28746 t end
28747 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
28748 :end' >>confcache
28749if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
28750 if test -w "$cache_file"; then
a9bec17c 28751 test "x$cache_file" != "x/dev/null" &&
067d23c9
KY
28752 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
28753$as_echo "$as_me: updating cache $cache_file" >&6;}
a9bec17c 28754 cat confcache >$cache_file
067d23c9
KY
28755 else
28756 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
28757$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
28758 fi
28759fi
28760rm -f confcache
28761
28762test "x$prefix" = xNONE && prefix=$ac_default_prefix
28763# Let make expand exec_prefix.
28764test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
28765
28766DEFS=-DHAVE_CONFIG_H
28767
28768ac_libobjs=
28769ac_ltlibobjs=
28770for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
28771 # 1. Remove the extension, and $U if already installed.
28772 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
28773 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
28774 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
28775 # will be set to the directory where LIBOBJS objects are built.
28776 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
28777 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
28778done
28779LIBOBJS=$ac_libobjs
28780
28781LTLIBOBJS=$ac_ltlibobjs
28782
28783
743c80a7
PE
28784 if test -n "$EXEEXT"; then
28785 am__EXEEXT_TRUE=
28786 am__EXEEXT_FALSE='#'
28787else
28788 am__EXEEXT_TRUE='#'
28789 am__EXEEXT_FALSE=
28790fi
28791
28792if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
a9bec17c 28793 as_fn_error "conditional \"AMDEP\" was never defined.
743c80a7
PE
28794Usually this means the macro was only invoked conditionally." "$LINENO" 5
28795fi
28796if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
a9bec17c 28797 as_fn_error "conditional \"am__fastdepCC\" was never defined.
743c80a7
PE
28798Usually this means the macro was only invoked conditionally." "$LINENO" 5
28799fi
7c61eaab
GM
28800if test -z "${BUILDING_FOR_WINDOWSNT_TRUE}" && test -z "${BUILDING_FOR_WINDOWSNT_FALSE}"; then
28801 as_fn_error "conditional \"BUILDING_FOR_WINDOWSNT\" was never defined.
28802Usually this means the macro was only invoked conditionally." "$LINENO" 5
28803fi
743c80a7 28804if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
a9bec17c 28805 as_fn_error "conditional \"GL_COND_LIBTOOL\" was never defined.
743c80a7
PE
28806Usually this means the macro was only invoked conditionally." "$LINENO" 5
28807fi
4fc2b746 28808if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
a9bec17c 28809 as_fn_error "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
4fc2b746
GM
28810Usually this means the macro was only invoked conditionally." "$LINENO" 5
28811fi
743c80a7 28812
3a019ab4
GM
28813if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then
28814 as_fn_error "conditional \"GL_GENERATE_ERRNO_H\" was never defined.
28815Usually this means the macro was only invoked conditionally." "$LINENO" 5
28816fi
8966cbff
GM
28817if test -z "${GL_GENERATE_EXECINFO_H_TRUE}" && test -z "${GL_GENERATE_EXECINFO_H_FALSE}"; then
28818 as_fn_error "conditional \"GL_GENERATE_EXECINFO_H\" was never defined.
28819Usually this means the macro was only invoked conditionally." "$LINENO" 5
28820fi
4fda9c95 28821if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
a9bec17c 28822 as_fn_error "conditional \"GL_GENERATE_STDINT_H\" was never defined.
4fda9c95
GM
28823Usually this means the macro was only invoked conditionally." "$LINENO" 5
28824fi
0eb775a3
GM
28825if test -z "${GL_GENERATE_STDALIGN_H_TRUE}" && test -z "${GL_GENERATE_STDALIGN_H_FALSE}"; then
28826 as_fn_error "conditional \"GL_GENERATE_STDALIGN_H\" was never defined.
28827Usually this means the macro was only invoked conditionally." "$LINENO" 5
28828fi
6d153f56 28829if test -z "${GL_GENERATE_STDARG_H_TRUE}" && test -z "${GL_GENERATE_STDARG_H_FALSE}"; then
a9bec17c 28830 as_fn_error "conditional \"GL_GENERATE_STDARG_H\" was never defined.
6d153f56
GM
28831Usually this means the macro was only invoked conditionally." "$LINENO" 5
28832fi
6c051bab 28833if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
a9bec17c 28834 as_fn_error "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
6c051bab
GM
28835Usually this means the macro was only invoked conditionally." "$LINENO" 5
28836fi
28837if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
a9bec17c 28838 as_fn_error "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
6c051bab
GM
28839Usually this means the macro was only invoked conditionally." "$LINENO" 5
28840fi
d7ad186c
GM
28841if test -z "${gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_TRUE}" && test -z "${gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_FALSE}"; then
28842 as_fn_error "conditional \"gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b\" was never defined.
28843Usually this means the macro was only invoked conditionally." "$LINENO" 5
28844fi
6d153f56 28845if test -z "${gl_GNULIB_ENABLED_dosname_TRUE}" && test -z "${gl_GNULIB_ENABLED_dosname_FALSE}"; then
a9bec17c 28846 as_fn_error "conditional \"gl_GNULIB_ENABLED_dosname\" was never defined.
6d153f56
GM
28847Usually this means the macro was only invoked conditionally." "$LINENO" 5
28848fi
710f5812
GM
28849if test -z "${gl_GNULIB_ENABLED_euidaccess_TRUE}" && test -z "${gl_GNULIB_ENABLED_euidaccess_FALSE}"; then
28850 as_fn_error "conditional \"gl_GNULIB_ENABLED_euidaccess\" was never defined.
28851Usually this means the macro was only invoked conditionally." "$LINENO" 5
28852fi
28853if test -z "${gl_GNULIB_ENABLED_getgroups_TRUE}" && test -z "${gl_GNULIB_ENABLED_getgroups_FALSE}"; then
28854 as_fn_error "conditional \"gl_GNULIB_ENABLED_getgroups\" was never defined.
28855Usually this means the macro was only invoked conditionally." "$LINENO" 5
28856fi
6d153f56 28857if test -z "${gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE}" && test -z "${gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE}"; then
a9bec17c 28858 as_fn_error "conditional \"gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36\" was never defined.
6d153f56
GM
28859Usually this means the macro was only invoked conditionally." "$LINENO" 5
28860fi
710f5812
GM
28861if test -z "${gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_TRUE}" && test -z "${gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_FALSE}"; then
28862 as_fn_error "conditional \"gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1\" was never defined.
28863Usually this means the macro was only invoked conditionally." "$LINENO" 5
28864fi
d7ad186c
GM
28865if test -z "${gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_TRUE}" && test -z "${gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_FALSE}"; then
28866 as_fn_error "conditional \"gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7\" was never defined.
28867Usually this means the macro was only invoked conditionally." "$LINENO" 5
28868fi
a0a61e58
GM
28869if test -z "${gl_GNULIB_ENABLED_pathmax_TRUE}" && test -z "${gl_GNULIB_ENABLED_pathmax_FALSE}"; then
28870 as_fn_error "conditional \"gl_GNULIB_ENABLED_pathmax\" was never defined.
28871Usually this means the macro was only invoked conditionally." "$LINENO" 5
28872fi
710f5812
GM
28873if test -z "${gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_TRUE}" && test -z "${gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_FALSE}"; then
28874 as_fn_error "conditional \"gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c\" was never defined.
28875Usually this means the macro was only invoked conditionally." "$LINENO" 5
28876fi
6d153f56 28877if test -z "${gl_GNULIB_ENABLED_stat_TRUE}" && test -z "${gl_GNULIB_ENABLED_stat_FALSE}"; then
a9bec17c 28878 as_fn_error "conditional \"gl_GNULIB_ENABLED_stat\" was never defined.
6d153f56
GM
28879Usually this means the macro was only invoked conditionally." "$LINENO" 5
28880fi
3e0be4ab 28881if test -z "${gl_GNULIB_ENABLED_strtoll_TRUE}" && test -z "${gl_GNULIB_ENABLED_strtoll_FALSE}"; then
a9bec17c 28882 as_fn_error "conditional \"gl_GNULIB_ENABLED_strtoll\" was never defined.
3e0be4ab
GM
28883Usually this means the macro was only invoked conditionally." "$LINENO" 5
28884fi
6d153f56 28885if test -z "${gl_GNULIB_ENABLED_strtoull_TRUE}" && test -z "${gl_GNULIB_ENABLED_strtoull_FALSE}"; then
a9bec17c 28886 as_fn_error "conditional \"gl_GNULIB_ENABLED_strtoull\" was never defined.
6d153f56
GM
28887Usually this means the macro was only invoked conditionally." "$LINENO" 5
28888fi
28889if test -z "${gl_GNULIB_ENABLED_verify_TRUE}" && test -z "${gl_GNULIB_ENABLED_verify_FALSE}"; then
a9bec17c 28890 as_fn_error "conditional \"gl_GNULIB_ENABLED_verify\" was never defined.
6d153f56 28891Usually this means the macro was only invoked conditionally." "$LINENO" 5
710f5812
GM
28892fi
28893if test -z "${gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_TRUE}" && test -z "${gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_FALSE}"; then
28894 as_fn_error "conditional \"gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec\" was never defined.
28895Usually this means the macro was only invoked conditionally." "$LINENO" 5
6c051bab 28896fi
942f733f 28897
743c80a7
PE
28898 gl_libobjs=
28899 gl_ltlibobjs=
28900 if test -n "$gl_LIBOBJS"; then
28901 # Remove the extension.
28902 sed_drop_objext='s/\.o$//;s/\.obj$//'
28903 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
28904 gl_libobjs="$gl_libobjs $i.$ac_objext"
28905 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
28906 done
28907 fi
28908 gl_LIBOBJS=$gl_libobjs
28909
28910 gl_LTLIBOBJS=$gl_ltlibobjs
28911
28912
28913
28914 gltests_libobjs=
28915 gltests_ltlibobjs=
28916 if test -n "$gltests_LIBOBJS"; then
28917 # Remove the extension.
28918 sed_drop_objext='s/\.o$//;s/\.obj$//'
28919 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
28920 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
28921 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
28922 done
28923 fi
28924 gltests_LIBOBJS=$gltests_libobjs
28925
28926 gltests_LTLIBOBJS=$gltests_ltlibobjs
28927
067d23c9
KY
28928
28929
a9bec17c 28930: ${CONFIG_STATUS=./config.status}
067d23c9
KY
28931ac_write_fail=0
28932ac_clean_files_save=$ac_clean_files
28933ac_clean_files="$ac_clean_files $CONFIG_STATUS"
28934{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
28935$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
28936as_write_fail=0
28937cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
28938#! $SHELL
28939# Generated by $as_me.
28940# Run this file to recreate the current configuration.
28941# Compiler output produced by configure, useful for debugging
28942# configure, is in config.log if it exists.
28943
28944debug=false
28945ac_cs_recheck=false
28946ac_cs_silent=false
28947
28948SHELL=\${CONFIG_SHELL-$SHELL}
28949export SHELL
28950_ASEOF
28951cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
28952## -------------------- ##
28953## M4sh Initialization. ##
28954## -------------------- ##
28955
28956# Be more Bourne compatible
28957DUALCASE=1; export DUALCASE # for MKS sh
28958if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
28959 emulate sh
28960 NULLCMD=:
28961 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
28962 # is contrary to our usage. Disable this feature.
28963 alias -g '${1+"$@"}'='"$@"'
28964 setopt NO_GLOB_SUBST
28965else
28966 case `(set -o) 2>/dev/null` in #(
28967 *posix*) :
28968 set -o posix ;; #(
28969 *) :
28970 ;;
28971esac
28972fi
28973
28974
28975as_nl='
28976'
28977export as_nl
28978# Printing a long string crashes Solaris 7 /usr/bin/printf.
28979as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
28980as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
28981as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
28982# Prefer a ksh shell builtin over an external printf program on Solaris,
28983# but without wasting forks for bash or zsh.
28984if test -z "$BASH_VERSION$ZSH_VERSION" \
28985 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
28986 as_echo='print -r --'
28987 as_echo_n='print -rn --'
28988elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
28989 as_echo='printf %s\n'
28990 as_echo_n='printf %s'
28991else
28992 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
28993 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
28994 as_echo_n='/usr/ucb/echo -n'
28995 else
28996 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
28997 as_echo_n_body='eval
28998 arg=$1;
28999 case $arg in #(
29000 *"$as_nl"*)
29001 expr "X$arg" : "X\\(.*\\)$as_nl";
29002 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
29003 esac;
29004 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
29005 '
29006 export as_echo_n_body
29007 as_echo_n='sh -c $as_echo_n_body as_echo'
29008 fi
29009 export as_echo_body
29010 as_echo='sh -c $as_echo_body as_echo'
29011fi
29012
29013# The user is always right.
29014if test "${PATH_SEPARATOR+set}" != set; then
29015 PATH_SEPARATOR=:
29016 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
29017 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
29018 PATH_SEPARATOR=';'
29019 }
29020fi
29021
29022
29023# IFS
29024# We need space, tab and new line, in precisely that order. Quoting is
29025# there to prevent editors from complaining about space-tab.
29026# (If _AS_PATH_WALK were called with IFS unset, it would disable word
29027# splitting by setting IFS to empty value.)
29028IFS=" "" $as_nl"
29029
29030# Find who we are. Look in the path if we contain no directory separator.
29031case $0 in #((
29032 *[\\/]* ) as_myself=$0 ;;
29033 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29034for as_dir in $PATH
29035do
29036 IFS=$as_save_IFS
29037 test -z "$as_dir" && as_dir=.
29038 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
29039 done
29040IFS=$as_save_IFS
29041
29042 ;;
29043esac
29044# We did not find ourselves, most probably we were run as `sh COMMAND'
29045# in which case we are not to be found in the path.
29046if test "x$as_myself" = x; then
29047 as_myself=$0
29048fi
29049if test ! -f "$as_myself"; then
29050 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
29051 exit 1
29052fi
29053
29054# Unset variables that we do not need and which cause bugs (e.g. in
29055# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
29056# suppresses any "Segmentation fault" message there. '((' could
29057# trigger a bug in pdksh 5.2.14.
29058for as_var in BASH_ENV ENV MAIL MAILPATH
29059do eval test x\${$as_var+set} = xset \
29060 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
29061done
29062PS1='$ '
29063PS2='> '
29064PS4='+ '
29065
29066# NLS nuisances.
29067LC_ALL=C
29068export LC_ALL
29069LANGUAGE=C
29070export LANGUAGE
29071
29072# CDPATH.
29073(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
29074
29075
a9bec17c
GM
29076# as_fn_error ERROR [LINENO LOG_FD]
29077# ---------------------------------
067d23c9
KY
29078# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
29079# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
a9bec17c 29080# script with status $?, using 1 if that was 0.
067d23c9
KY
29081as_fn_error ()
29082{
a9bec17c
GM
29083 as_status=$?; test $as_status -eq 0 && as_status=1
29084 if test "$3"; then
29085 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
29086 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
067d23c9 29087 fi
a9bec17c 29088 $as_echo "$as_me: error: $1" >&2
067d23c9
KY
29089 as_fn_exit $as_status
29090} # as_fn_error
29091
29092
29093# as_fn_set_status STATUS
29094# -----------------------
29095# Set $? to STATUS, without forking.
29096as_fn_set_status ()
29097{
29098 return $1
29099} # as_fn_set_status
29100
29101# as_fn_exit STATUS
29102# -----------------
29103# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
29104as_fn_exit ()
29105{
29106 set +e
29107 as_fn_set_status $1
29108 exit $1
29109} # as_fn_exit
29110
29111# as_fn_unset VAR
29112# ---------------
29113# Portably unset VAR.
29114as_fn_unset ()
29115{
29116 { eval $1=; unset $1;}
29117}
29118as_unset=as_fn_unset
29119# as_fn_append VAR VALUE
29120# ----------------------
29121# Append the text in VALUE to the end of the definition contained in VAR. Take
29122# advantage of any shell optimizations that allow amortized linear growth over
29123# repeated appends, instead of the typical quadratic growth present in naive
29124# implementations.
29125if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
29126 eval 'as_fn_append ()
29127 {
29128 eval $1+=\$2
29129 }'
29130else
29131 as_fn_append ()
29132 {
29133 eval $1=\$$1\$2
29134 }
29135fi # as_fn_append
29136
29137# as_fn_arith ARG...
29138# ------------------
29139# Perform arithmetic evaluation on the ARGs, and store the result in the
29140# global $as_val. Take advantage of shells that can avoid forks. The arguments
29141# must be portable across $(()) and expr.
29142if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
29143 eval 'as_fn_arith ()
29144 {
29145 as_val=$(( $* ))
29146 }'
29147else
29148 as_fn_arith ()
29149 {
29150 as_val=`expr "$@" || test $? -eq 1`
29151 }
29152fi # as_fn_arith
29153
29154
29155if expr a : '\(a\)' >/dev/null 2>&1 &&
29156 test "X`expr 00001 : '.*\(...\)'`" = X001; then
29157 as_expr=expr
29158else
29159 as_expr=false
29160fi
29161
29162if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
29163 as_basename=basename
29164else
29165 as_basename=false
29166fi
29167
29168if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
29169 as_dirname=dirname
29170else
29171 as_dirname=false
29172fi
29173
29174as_me=`$as_basename -- "$0" ||
29175$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
29176 X"$0" : 'X\(//\)$' \| \
29177 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
29178$as_echo X/"$0" |
29179 sed '/^.*\/\([^/][^/]*\)\/*$/{
29180 s//\1/
29181 q
29182 }
29183 /^X\/\(\/\/\)$/{
29184 s//\1/
29185 q
29186 }
29187 /^X\/\(\/\).*/{
29188 s//\1/
29189 q
29190 }
29191 s/.*/./; q'`
29192
29193# Avoid depending upon Character Ranges.
29194as_cr_letters='abcdefghijklmnopqrstuvwxyz'
29195as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
29196as_cr_Letters=$as_cr_letters$as_cr_LETTERS
29197as_cr_digits='0123456789'
29198as_cr_alnum=$as_cr_Letters$as_cr_digits
29199
29200ECHO_C= ECHO_N= ECHO_T=
29201case `echo -n x` in #(((((
29202-n*)
29203 case `echo 'xy\c'` in
29204 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
29205 xy) ECHO_C='\c';;
29206 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
29207 ECHO_T=' ';;
29208 esac;;
29209*)
29210 ECHO_N='-n';;
29211esac
29212
29213rm -f conf$$ conf$$.exe conf$$.file
29214if test -d conf$$.dir; then
29215 rm -f conf$$.dir/conf$$.file
29216else
29217 rm -f conf$$.dir
29218 mkdir conf$$.dir 2>/dev/null
29219fi
29220if (echo >conf$$.file) 2>/dev/null; then
29221 if ln -s conf$$.file conf$$ 2>/dev/null; then
29222 as_ln_s='ln -s'
29223 # ... but there are two gotchas:
29224 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
29225 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
29226 # In both cases, we have to default to `cp -p'.
29227 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
29228 as_ln_s='cp -p'
29229 elif ln conf$$.file conf$$ 2>/dev/null; then
29230 as_ln_s=ln
29231 else
29232 as_ln_s='cp -p'
29233 fi
29234else
29235 as_ln_s='cp -p'
29236fi
29237rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
29238rmdir conf$$.dir 2>/dev/null
29239
29240
29241# as_fn_mkdir_p
29242# -------------
29243# Create "$as_dir" as a directory, including parents if necessary.
29244as_fn_mkdir_p ()
29245{
29246
29247 case $as_dir in #(
29248 -*) as_dir=./$as_dir;;
29249 esac
29250 test -d "$as_dir" || eval $as_mkdir_p || {
29251 as_dirs=
29252 while :; do
29253 case $as_dir in #(
29254 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
29255 *) as_qdir=$as_dir;;
29256 esac
29257 as_dirs="'$as_qdir' $as_dirs"
29258 as_dir=`$as_dirname -- "$as_dir" ||
29259$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
29260 X"$as_dir" : 'X\(//\)[^/]' \| \
29261 X"$as_dir" : 'X\(//\)$' \| \
29262 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
29263$as_echo X"$as_dir" |
29264 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
29265 s//\1/
29266 q
29267 }
29268 /^X\(\/\/\)[^/].*/{
29269 s//\1/
29270 q
29271 }
29272 /^X\(\/\/\)$/{
29273 s//\1/
29274 q
29275 }
29276 /^X\(\/\).*/{
29277 s//\1/
29278 q
29279 }
29280 s/.*/./; q'`
29281 test -d "$as_dir" && break
29282 done
29283 test -z "$as_dirs" || eval "mkdir $as_dirs"
a9bec17c 29284 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
067d23c9
KY
29285
29286
29287} # as_fn_mkdir_p
29288if mkdir -p . 2>/dev/null; then
29289 as_mkdir_p='mkdir -p "$as_dir"'
29290else
29291 test -d ./-p && rmdir ./-p
29292 as_mkdir_p=false
29293fi
29294
29295if test -x / >/dev/null 2>&1; then
29296 as_test_x='test -x'
29297else
29298 if ls -dL / >/dev/null 2>&1; then
29299 as_ls_L_option=L
29300 else
29301 as_ls_L_option=
29302 fi
29303 as_test_x='
29304 eval sh -c '\''
29305 if test -d "$1"; then
29306 test -d "$1/.";
29307 else
29308 case $1 in #(
29309 -*)set "./$1";;
29310 esac;
29311 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
29312 ???[sx]*):;;*)false;;esac;fi
29313 '\'' sh
29314 '
29315fi
29316as_executable_p=$as_test_x
29317
29318# Sed expression to map a string onto a valid CPP name.
29319as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
29320
29321# Sed expression to map a string onto a valid variable name.
29322as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
29323
29324
29325exec 6>&1
29326## ----------------------------------- ##
29327## Main body of $CONFIG_STATUS script. ##
29328## ----------------------------------- ##
29329_ASEOF
29330test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
29331
29332cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29333# Save the log message, to keep $0 and so on meaningful, and to
29334# report actual input values of CONFIG_FILES etc. instead of their
29335# values after options handling.
29336ac_log="
c574bc34 29337This file was extended by emacs $as_me 24.3.50, which was
a9bec17c 29338generated by GNU Autoconf 2.65. Invocation command line was
067d23c9
KY
29339
29340 CONFIG_FILES = $CONFIG_FILES
29341 CONFIG_HEADERS = $CONFIG_HEADERS
29342 CONFIG_LINKS = $CONFIG_LINKS
29343 CONFIG_COMMANDS = $CONFIG_COMMANDS
29344 $ $0 $@
29345
29346on `(hostname || uname -n) 2>/dev/null | sed 1q`
29347"
29348
29349_ACEOF
29350
29351case $ac_config_files in *"
29352"*) set x $ac_config_files; shift; ac_config_files=$*;;
29353esac
29354
29355case $ac_config_headers in *"
29356"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
29357esac
29358
29359
29360cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29361# Files that config.status was made for.
29362config_files="$ac_config_files"
29363config_headers="$ac_config_headers"
29364config_commands="$ac_config_commands"
29365
29366_ACEOF
29367
29368cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29369ac_cs_usage="\
29370\`$as_me' instantiates files and other configuration actions
29371from templates according to the current configuration. Unless the files
29372and actions are specified as TAGs, all are instantiated by default.
29373
29374Usage: $0 [OPTION]... [TAG]...
29375
29376 -h, --help print this help, then exit
29377 -V, --version print version number and configuration settings, then exit
29378 --config print configuration, then exit
29379 -q, --quiet, --silent
29380 do not print progress messages
29381 -d, --debug don't remove temporary files
29382 --recheck update $as_me by reconfiguring in the same conditions
29383 --file=FILE[:TEMPLATE]
29384 instantiate the configuration file FILE
29385 --header=FILE[:TEMPLATE]
29386 instantiate the configuration header FILE
29387
29388Configuration files:
29389$config_files
29390
29391Configuration headers:
29392$config_headers
29393
29394Configuration commands:
29395$config_commands
29396
29397Report bugs to the package provider."
29398
29399_ACEOF
29400cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29401ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
29402ac_cs_version="\\
c574bc34 29403emacs config.status 24.3.50
a9bec17c 29404configured by $0, generated by GNU Autoconf 2.65,
067d23c9
KY
29405 with options \\"\$ac_cs_config\\"
29406
a9bec17c 29407Copyright (C) 2009 Free Software Foundation, Inc.
067d23c9
KY
29408This config.status script is free software; the Free Software Foundation
29409gives unlimited permission to copy, distribute and modify it."
29410
29411ac_pwd='$ac_pwd'
29412srcdir='$srcdir'
29413INSTALL='$INSTALL'
743c80a7
PE
29414MKDIR_P='$MKDIR_P'
29415AWK='$AWK'
067d23c9
KY
29416test -n "\$AWK" || AWK=awk
29417_ACEOF
29418
29419cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29420# The default lists apply if the user does not specify any file.
29421ac_need_defaults=:
29422while test $# != 0
29423do
29424 case $1 in
a9bec17c 29425 --*=*)
067d23c9
KY
29426 ac_option=`expr "X$1" : 'X\([^=]*\)='`
29427 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
29428 ac_shift=:
29429 ;;
29430 *)
29431 ac_option=$1
29432 ac_optarg=$2
29433 ac_shift=shift
29434 ;;
29435 esac
29436
29437 case $ac_option in
29438 # Handling of the options.
29439 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
29440 ac_cs_recheck=: ;;
29441 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
29442 $as_echo "$ac_cs_version"; exit ;;
29443 --config | --confi | --conf | --con | --co | --c )
29444 $as_echo "$ac_cs_config"; exit ;;
29445 --debug | --debu | --deb | --de | --d | -d )
29446 debug=: ;;
29447 --file | --fil | --fi | --f )
29448 $ac_shift
29449 case $ac_optarg in
29450 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
29451 esac
29452 as_fn_append CONFIG_FILES " '$ac_optarg'"
29453 ac_need_defaults=false;;
29454 --header | --heade | --head | --hea )
29455 $ac_shift
29456 case $ac_optarg in
29457 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
29458 esac
29459 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
29460 ac_need_defaults=false;;
29461 --he | --h)
29462 # Conflict between --help and --header
a9bec17c 29463 as_fn_error "ambiguous option: \`$1'
067d23c9
KY
29464Try \`$0 --help' for more information.";;
29465 --help | --hel | -h )
29466 $as_echo "$ac_cs_usage"; exit ;;
29467 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
29468 | -silent | --silent | --silen | --sile | --sil | --si | --s)
29469 ac_cs_silent=: ;;
29470
29471 # This is an error.
a9bec17c 29472 -*) as_fn_error "unrecognized option: \`$1'
067d23c9
KY
29473Try \`$0 --help' for more information." ;;
29474
29475 *) as_fn_append ac_config_targets " $1"
29476 ac_need_defaults=false ;;
29477
29478 esac
29479 shift
29480done
29481
29482ac_configure_extra_args=
29483
29484if $ac_cs_silent; then
29485 exec 6>/dev/null
29486 ac_configure_extra_args="$ac_configure_extra_args --silent"
29487fi
29488
29489_ACEOF
29490cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29491if \$ac_cs_recheck; then
29492 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
29493 shift
29494 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
29495 CONFIG_SHELL='$SHELL'
29496 export CONFIG_SHELL
29497 exec "\$@"
29498fi
29499
29500_ACEOF
29501cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29502exec 5>>config.log
29503{
29504 echo
29505 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
29506## Running $as_me. ##
29507_ASBOX
29508 $as_echo "$ac_log"
29509} >&5
29510
29511_ACEOF
29512cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29513#
29514# INIT-COMMANDS
29515#
743c80a7 29516AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
7c61eaab 29517GCC="$GCC" CPPFLAGS="$CPPFLAGS" opsys="$opsys"
067d23c9
KY
29518
29519_ACEOF
29520
29521cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29522
29523# Handling of arguments.
29524for ac_config_target in $ac_config_targets
29525do
29526 case $ac_config_target in
29527 "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:src/config.in" ;;
743c80a7 29528 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
bb7dce39
GM
29529 "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" ;;
29530 "nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop") CONFIG_FILES="$CONFIG_FILES nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop:nextstep/templates/Emacs.desktop.in" ;;
29531 "nextstep/Cocoa/Emacs.base/Contents/Info.plist") CONFIG_FILES="$CONFIG_FILES nextstep/Cocoa/Emacs.base/Contents/Info.plist:nextstep/templates/Info.plist.in" ;;
29532 "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 29533 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
743c80a7 29534 "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
56ade35c
GM
29535 "lib-src/Makefile") CONFIG_FILES="$CONFIG_FILES lib-src/Makefile" ;;
29536 "oldXMenu/Makefile") CONFIG_FILES="$CONFIG_FILES oldXMenu/Makefile" ;;
29537 "doc/emacs/Makefile") CONFIG_FILES="$CONFIG_FILES doc/emacs/Makefile" ;;
29538 "doc/misc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/misc/Makefile" ;;
29539 "doc/lispintro/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispintro/Makefile" ;;
29540 "doc/lispref/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispref/Makefile" ;;
29541 "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
29542 "lwlib/Makefile") CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;;
29543 "lisp/Makefile") CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;;
29544 "leim/Makefile") CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;;
bb7dce39 29545 "nextstep/Makefile") CONFIG_FILES="$CONFIG_FILES nextstep/Makefile" ;;
7c61eaab 29546 "nt/Makefile") CONFIG_FILES="$CONFIG_FILES nt/Makefile" ;;
56ade35c 29547 "test/automated/Makefile") CONFIG_FILES="$CONFIG_FILES test/automated/Makefile" ;;
40b65096 29548 "admin/unidata/Makefile") CONFIG_FILES="$CONFIG_FILES admin/unidata/Makefile" ;;
9411886d
PE
29549 "mkdirs") CONFIG_COMMANDS="$CONFIG_COMMANDS mkdirs" ;;
29550 "epaths") CONFIG_COMMANDS="$CONFIG_COMMANDS epaths" ;;
29551 "gdbinit") CONFIG_COMMANDS="$CONFIG_COMMANDS gdbinit" ;;
067d23c9 29552
a9bec17c 29553 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
067d23c9
KY
29554 esac
29555done
29556
29557
29558# If the user did not use the arguments to specify the items to instantiate,
29559# then the envvar interface is used. Set only those that are not.
29560# We use the long form for the default assignment because of an extremely
29561# bizarre bug on SunOS 4.1.3.
29562if $ac_need_defaults; then
29563 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
29564 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
29565 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
29566fi
29567
29568# Have a temporary directory for convenience. Make it in the build tree
29569# simply because there is no reason against having it here, and in addition,
29570# creating and moving files from /tmp can sometimes cause problems.
29571# Hook for its removal unless debugging.
29572# Note that there is a small window in which the directory will not be cleaned:
29573# after its creation but before its name has been assigned to `$tmp'.
29574$debug ||
29575{
a9bec17c 29576 tmp=
067d23c9 29577 trap 'exit_status=$?
a9bec17c 29578 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
067d23c9
KY
29579' 0
29580 trap 'as_fn_exit 1' 1 2 13 15
29581}
29582# Create a (secure) tmp directory for tmp files.
29583
29584{
29585 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
a9bec17c 29586 test -n "$tmp" && test -d "$tmp"
067d23c9
KY
29587} ||
29588{
29589 tmp=./conf$$-$RANDOM
29590 (umask 077 && mkdir "$tmp")
a9bec17c 29591} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
067d23c9
KY
29592
29593# Set up the scripts for CONFIG_FILES section.
29594# No need to generate them if there are no CONFIG_FILES.
29595# This happens for instance with `./config.status config.h'.
29596if test -n "$CONFIG_FILES"; then
29597
29598if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
29599 ac_cs_awk_getline=:
29600 ac_cs_awk_pipe_init=
29601 ac_cs_awk_read_file='
29602 while ((getline aline < (F[key])) > 0)
29603 print(aline)
29604 close(F[key])'
29605 ac_cs_awk_pipe_fini=
29606else
29607 ac_cs_awk_getline=false
29608 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
29609 ac_cs_awk_read_file='
29610 print "|#_!!_#|"
29611 print "cat " F[key] " &&"
29612 '$ac_cs_awk_pipe_init
29613 # The final `:' finishes the AND list.
29614 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
29615fi
29616ac_cr=`echo X | tr X '\015'`
29617# On cygwin, bash can eat \r inside `` if the user requested igncr.
29618# But we know of no other shell where ac_cr would be empty at this
29619# point, so we can use a bashism as a fallback.
29620if test "x$ac_cr" = x; then
29621 eval ac_cr=\$\'\\r\'
29622fi
29623ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
29624if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
a9bec17c 29625 ac_cs_awk_cr='\r'
067d23c9
KY
29626else
29627 ac_cs_awk_cr=$ac_cr
29628fi
29629
a9bec17c 29630echo 'BEGIN {' >"$tmp/subs1.awk" &&
067d23c9
KY
29631_ACEOF
29632
29633# Create commands to substitute file output variables.
29634{
29635 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
a9bec17c 29636 echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
067d23c9
KY
29637 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
29638 echo "_ACAWK" &&
29639 echo "_ACEOF"
29640} >conf$$files.sh &&
29641. ./conf$$files.sh ||
a9bec17c 29642 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
067d23c9
KY
29643rm -f conf$$files.sh
29644
29645{
29646 echo "cat >conf$$subs.awk <<_ACEOF" &&
29647 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
29648 echo "_ACEOF"
29649} >conf$$subs.sh ||
a9bec17c
GM
29650 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
29651ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
067d23c9
KY
29652ac_delim='%!_!# '
29653for ac_last_try in false false false false false :; do
29654 . ./conf$$subs.sh ||
a9bec17c 29655 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
067d23c9
KY
29656
29657 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
29658 if test $ac_delim_n = $ac_delim_num; then
29659 break
29660 elif $ac_last_try; then
a9bec17c 29661 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
067d23c9
KY
29662 else
29663 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
29664 fi
29665done
29666rm -f conf$$subs.sh
29667
29668cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
a9bec17c 29669cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
067d23c9
KY
29670_ACEOF
29671sed -n '
29672h
29673s/^/S["/; s/!.*/"]=/
29674p
29675g
29676s/^[^!]*!//
29677:repl
29678t repl
29679s/'"$ac_delim"'$//
29680t delim
29681:nl
29682h
29683s/\(.\{148\}\)..*/\1/
29684t more1
29685s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
29686p
29687n
29688b repl
29689:more1
29690s/["\\]/\\&/g; s/^/"/; s/$/"\\/
29691p
29692g
29693s/.\{148\}//
29694t nl
29695:delim
29696h
29697s/\(.\{148\}\)..*/\1/
29698t more2
29699s/["\\]/\\&/g; s/^/"/; s/$/"/
29700p
29701b
29702:more2
29703s/["\\]/\\&/g; s/^/"/; s/$/"\\/
29704p
29705g
29706s/.\{148\}//
29707t delim
29708' <conf$$subs.awk | sed '
29709/^[^""]/{
29710 N
29711 s/\n//
29712}
29713' >>$CONFIG_STATUS || ac_write_fail=1
29714rm -f conf$$subs.awk
29715cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29716_ACAWK
a9bec17c 29717cat >>"\$tmp/subs1.awk" <<_ACAWK &&
067d23c9
KY
29718 for (key in S) S_is_set[key] = 1
29719 FS = "\a"
29720 \$ac_cs_awk_pipe_init
29721}
29722{
29723 line = $ 0
29724 nfields = split(line, field, "@")
29725 substed = 0
29726 len = length(field[1])
29727 for (i = 2; i < nfields; i++) {
29728 key = field[i]
29729 keylen = length(key)
29730 if (S_is_set[key]) {
29731 value = S[key]
29732 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
29733 len += length(value) + length(field[++i])
29734 substed = 1
29735 } else
29736 len += 1 + keylen
29737 }
29738 if (nfields == 3 && !substed) {
29739 key = field[2]
29740 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
29741 \$ac_cs_awk_read_file
29742 next
29743 }
29744 }
29745 print line
29746}
29747\$ac_cs_awk_pipe_fini
29748_ACAWK
29749_ACEOF
29750cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29751if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
29752 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
29753else
29754 cat
a9bec17c
GM
29755fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
29756 || as_fn_error "could not setup config files machinery" "$LINENO" 5
067d23c9
KY
29757_ACEOF
29758
a9bec17c
GM
29759# VPATH may cause trouble with some makes, so we remove $(srcdir),
29760# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
067d23c9
KY
29761# trailing colons and then remove the whole line if VPATH becomes empty
29762# (actually we leave an empty line to preserve line numbers).
29763if test "x$srcdir" = x.; then
a9bec17c
GM
29764 ac_vpsub='/^[ ]*VPATH[ ]*=/{
29765s/:*\$(srcdir):*/:/
29766s/:*\${srcdir}:*/:/
29767s/:*@srcdir@:*/:/
29768s/^\([^=]*=[ ]*\):*/\1/
067d23c9
KY
29769s/:*$//
29770s/^[^=]*=[ ]*$//
29771}'
29772fi
29773
29774cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29775fi # test -n "$CONFIG_FILES"
29776
29777# Set up the scripts for CONFIG_HEADERS section.
29778# No need to generate them if there are no CONFIG_HEADERS.
29779# This happens for instance with `./config.status Makefile'.
29780if test -n "$CONFIG_HEADERS"; then
a9bec17c 29781cat >"$tmp/defines.awk" <<\_ACAWK ||
067d23c9
KY
29782BEGIN {
29783_ACEOF
29784
29785# Transform confdefs.h into an awk script `defines.awk', embedded as
29786# here-document in config.status, that substitutes the proper values into
29787# config.h.in to produce config.h.
29788
29789# Create a delimiter string that does not exist in confdefs.h, to ease
29790# handling of long lines.
29791ac_delim='%!_!# '
29792for ac_last_try in false false :; do
a9bec17c
GM
29793 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
29794 if test -z "$ac_t"; then
067d23c9
KY
29795 break
29796 elif $ac_last_try; then
a9bec17c 29797 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
067d23c9
KY
29798 else
29799 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
29800 fi
29801done
29802
29803# For the awk script, D is an array of macro values keyed by name,
29804# likewise P contains macro parameters if any. Preserve backslash
29805# newline sequences.
29806
29807ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
29808sed -n '
29809s/.\{148\}/&'"$ac_delim"'/g
29810t rset
29811:rset
29812s/^[ ]*#[ ]*define[ ][ ]*/ /
29813t def
29814d
29815:def
29816s/\\$//
29817t bsnl
29818s/["\\]/\\&/g
29819s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
29820D["\1"]=" \3"/p
29821s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
29822d
29823:bsnl
29824s/["\\]/\\&/g
29825s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
29826D["\1"]=" \3\\\\\\n"\\/p
29827t cont
29828s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
29829t cont
29830d
29831:cont
29832n
29833s/.\{148\}/&'"$ac_delim"'/g
29834t clear
29835:clear
29836s/\\$//
29837t bsnlc
29838s/["\\]/\\&/g; s/^/"/; s/$/"/p
29839d
29840:bsnlc
29841s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
29842b cont
29843' <confdefs.h | sed '
29844s/'"$ac_delim"'/"\\\
29845"/g' >>$CONFIG_STATUS || ac_write_fail=1
29846
29847cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29848 for (key in D) D_is_set[key] = 1
29849 FS = "\a"
29850}
29851/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
29852 line = \$ 0
29853 split(line, arg, " ")
29854 if (arg[1] == "#") {
29855 defundef = arg[2]
29856 mac1 = arg[3]
29857 } else {
29858 defundef = substr(arg[1], 2)
29859 mac1 = arg[2]
29860 }
29861 split(mac1, mac2, "(") #)
29862 macro = mac2[1]
29863 prefix = substr(line, 1, index(line, defundef) - 1)
29864 if (D_is_set[macro]) {
29865 # Preserve the white space surrounding the "#".
29866 print prefix "define", macro P[macro] D[macro]
29867 next
29868 } else {
29869 # Replace #undef with comments. This is necessary, for example,
29870 # in the case of _POSIX_SOURCE, which is predefined and required
29871 # on some systems where configure will not decide to define it.
29872 if (defundef == "undef") {
29873 print "/*", prefix defundef, macro, "*/"
29874 next
29875 }
29876 }
29877}
29878{ print }
29879_ACAWK
29880_ACEOF
29881cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
a9bec17c 29882 as_fn_error "could not setup config headers machinery" "$LINENO" 5
067d23c9
KY
29883fi # test -n "$CONFIG_HEADERS"
29884
29885
29886eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
29887shift
29888for ac_tag
29889do
29890 case $ac_tag in
29891 :[FHLC]) ac_mode=$ac_tag; continue;;
29892 esac
29893 case $ac_mode$ac_tag in
29894 :[FHL]*:*);;
a9bec17c 29895 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
067d23c9
KY
29896 :[FH]-) ac_tag=-:-;;
29897 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
29898 esac
29899 ac_save_IFS=$IFS
29900 IFS=:
29901 set x $ac_tag
29902 IFS=$ac_save_IFS
29903 shift
29904 ac_file=$1
29905 shift
29906
29907 case $ac_mode in
29908 :L) ac_source=$1;;
29909 :[FH])
29910 ac_file_inputs=
29911 for ac_f
29912 do
29913 case $ac_f in
a9bec17c 29914 -) ac_f="$tmp/stdin";;
067d23c9
KY
29915 *) # Look for the file first in the build tree, then in the source tree
29916 # (if the path is not absolute). The absolute path cannot be DOS-style,
29917 # because $ac_f cannot contain `:'.
29918 test -f "$ac_f" ||
29919 case $ac_f in
29920 [\\/$]*) false;;
29921 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
29922 esac ||
a9bec17c 29923 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
067d23c9
KY
29924 esac
29925 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
29926 as_fn_append ac_file_inputs " '$ac_f'"
29927 done
29928
29929 # Let's still pretend it is `configure' which instantiates (i.e., don't
29930 # use $as_me), people would be surprised to read:
29931 # /* config.h. Generated by config.status. */
29932 configure_input='Generated from '`
29933 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
29934 `' by configure.'
29935 if test x"$ac_file" != x-; then
29936 configure_input="$ac_file. $configure_input"
29937 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
29938$as_echo "$as_me: creating $ac_file" >&6;}
29939 fi
29940 # Neutralize special characters interpreted by sed in replacement strings.
29941 case $configure_input in #(
29942 *\&* | *\|* | *\\* )
29943 ac_sed_conf_input=`$as_echo "$configure_input" |
29944 sed 's/[\\\\&|]/\\\\&/g'`;; #(
29945 *) ac_sed_conf_input=$configure_input;;
29946 esac
29947
29948 case $ac_tag in
a9bec17c
GM
29949 *:-:* | *:-) cat >"$tmp/stdin" \
29950 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
067d23c9
KY
29951 esac
29952 ;;
29953 esac
29954
29955 ac_dir=`$as_dirname -- "$ac_file" ||
29956$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
29957 X"$ac_file" : 'X\(//\)[^/]' \| \
29958 X"$ac_file" : 'X\(//\)$' \| \
29959 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
29960$as_echo X"$ac_file" |
29961 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
29962 s//\1/
29963 q
29964 }
29965 /^X\(\/\/\)[^/].*/{
29966 s//\1/
29967 q
29968 }
29969 /^X\(\/\/\)$/{
29970 s//\1/
29971 q
29972 }
29973 /^X\(\/\).*/{
29974 s//\1/
29975 q
29976 }
29977 s/.*/./; q'`
29978 as_dir="$ac_dir"; as_fn_mkdir_p
29979 ac_builddir=.
29980
29981case "$ac_dir" in
29982.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
29983*)
29984 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
29985 # A ".." for each directory in $ac_dir_suffix.
29986 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
29987 case $ac_top_builddir_sub in
29988 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
29989 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
29990 esac ;;
29991esac
29992ac_abs_top_builddir=$ac_pwd
29993ac_abs_builddir=$ac_pwd$ac_dir_suffix
29994# for backward compatibility:
29995ac_top_builddir=$ac_top_build_prefix
29996
29997case $srcdir in
29998 .) # We are building in place.
29999 ac_srcdir=.
30000 ac_top_srcdir=$ac_top_builddir_sub
30001 ac_abs_top_srcdir=$ac_pwd ;;
30002 [\\/]* | ?:[\\/]* ) # Absolute name.
30003 ac_srcdir=$srcdir$ac_dir_suffix;
30004 ac_top_srcdir=$srcdir
30005 ac_abs_top_srcdir=$srcdir ;;
30006 *) # Relative name.
30007 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
30008 ac_top_srcdir=$ac_top_build_prefix$srcdir
30009 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
30010esac
30011ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
30012
30013
30014 case $ac_mode in
30015 :F)
30016 #
30017 # CONFIG_FILE
30018 #
30019
30020 case $INSTALL in
30021 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
30022 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
30023 esac
743c80a7
PE
30024 ac_MKDIR_P=$MKDIR_P
30025 case $MKDIR_P in
30026 [\\/$]* | ?:[\\/]* ) ;;
30027 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
30028 esac
067d23c9
KY
30029_ACEOF
30030
30031cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30032# If the template does not know about datarootdir, expand it.
30033# FIXME: This hack should be removed a few years after 2.60.
30034ac_datarootdir_hack=; ac_datarootdir_seen=
30035ac_sed_dataroot='
30036/datarootdir/ {
30037 p
30038 q
30039}
30040/@datadir@/p
30041/@docdir@/p
30042/@infodir@/p
30043/@localedir@/p
30044/@mandir@/p'
30045case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
30046*datarootdir*) ac_datarootdir_seen=yes;;
30047*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
30048 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
30049$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
30050_ACEOF
30051cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30052 ac_datarootdir_hack='
30053 s&@datadir@&$datadir&g
30054 s&@docdir@&$docdir&g
30055 s&@infodir@&$infodir&g
30056 s&@localedir@&$localedir&g
30057 s&@mandir@&$mandir&g
30058 s&\\\${datarootdir}&$datarootdir&g' ;;
30059esac
30060_ACEOF
30061
30062# Neutralize VPATH when `$srcdir' = `.'.
30063# Shell code in configure.ac might set extrasub.
30064# FIXME: do we really want to maintain this feature?
30065cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30066ac_sed_extra="$ac_vpsub
30067$extrasub
30068_ACEOF
30069cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30070:t
30071/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
30072s|@configure_input@|$ac_sed_conf_input|;t t
30073s&@top_builddir@&$ac_top_builddir_sub&;t t
30074s&@top_build_prefix@&$ac_top_build_prefix&;t t
30075s&@srcdir@&$ac_srcdir&;t t
30076s&@abs_srcdir@&$ac_abs_srcdir&;t t
30077s&@top_srcdir@&$ac_top_srcdir&;t t
30078s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
30079s&@builddir@&$ac_builddir&;t t
30080s&@abs_builddir@&$ac_abs_builddir&;t t
30081s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
30082s&@INSTALL@&$ac_INSTALL&;t t
743c80a7 30083s&@MKDIR_P@&$ac_MKDIR_P&;t t
067d23c9
KY
30084$ac_datarootdir_hack
30085"
30086eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
30087if $ac_cs_awk_getline; then
a9bec17c 30088 $AWK -f "$tmp/subs.awk"
067d23c9 30089else
a9bec17c
GM
30090 $AWK -f "$tmp/subs.awk" | $SHELL
30091fi >$tmp/out \
30092 || as_fn_error "could not create $ac_file" "$LINENO" 5
067d23c9
KY
30093
30094test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
a9bec17c
GM
30095 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
30096 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
067d23c9 30097 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
a9bec17c 30098which seems to be undefined. Please make sure it is defined." >&5
067d23c9 30099$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
a9bec17c 30100which seems to be undefined. Please make sure it is defined." >&2;}
067d23c9 30101
a9bec17c 30102 rm -f "$tmp/stdin"
067d23c9 30103 case $ac_file in
a9bec17c
GM
30104 -) cat "$tmp/out" && rm -f "$tmp/out";;
30105 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
067d23c9 30106 esac \
a9bec17c 30107 || as_fn_error "could not create $ac_file" "$LINENO" 5
067d23c9
KY
30108 ;;
30109 :H)
30110 #
30111 # CONFIG_HEADER
30112 #
30113 if test x"$ac_file" != x-; then
30114 {
30115 $as_echo "/* $configure_input */" \
a9bec17c
GM
30116 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
30117 } >"$tmp/config.h" \
30118 || as_fn_error "could not create $ac_file" "$LINENO" 5
30119 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
067d23c9
KY
30120 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
30121$as_echo "$as_me: $ac_file is unchanged" >&6;}
30122 else
30123 rm -f "$ac_file"
a9bec17c
GM
30124 mv "$tmp/config.h" "$ac_file" \
30125 || as_fn_error "could not create $ac_file" "$LINENO" 5
067d23c9
KY
30126 fi
30127 else
30128 $as_echo "/* $configure_input */" \
a9bec17c
GM
30129 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
30130 || as_fn_error "could not create -" "$LINENO" 5
067d23c9 30131 fi
743c80a7
PE
30132# Compute "$ac_file"'s index in $config_headers.
30133_am_arg="$ac_file"
30134_am_stamp_count=1
30135for _am_header in $config_headers :; do
30136 case $_am_header in
30137 $_am_arg | $_am_arg:* )
30138 break ;;
30139 * )
30140 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
30141 esac
30142done
30143echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
30144$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30145 X"$_am_arg" : 'X\(//\)[^/]' \| \
30146 X"$_am_arg" : 'X\(//\)$' \| \
30147 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
30148$as_echo X"$_am_arg" |
30149 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
30150 s//\1/
30151 q
30152 }
30153 /^X\(\/\/\)[^/].*/{
30154 s//\1/
30155 q
30156 }
30157 /^X\(\/\/\)$/{
30158 s//\1/
30159 q
30160 }
30161 /^X\(\/\).*/{
30162 s//\1/
30163 q
30164 }
30165 s/.*/./; q'`/stamp-h$_am_stamp_count
067d23c9
KY
30166 ;;
30167
30168 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
30169$as_echo "$as_me: executing $ac_file commands" >&6;}
30170 ;;
30171 esac
30172
30173
30174 case $ac_file$ac_mode in
743c80a7
PE
30175 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
30176 # Autoconf 2.62 quotes --file arguments for eval, but not when files
30177 # are listed without --file. Let's play safe and only enable the eval
30178 # if we detect the quoting.
30179 case $CONFIG_FILES in
30180 *\'*) eval set x "$CONFIG_FILES" ;;
30181 *) set x $CONFIG_FILES ;;
30182 esac
30183 shift
30184 for mf
30185 do
30186 # Strip MF so we end up with the name of the file.
30187 mf=`echo "$mf" | sed -e 's/:.*$//'`
30188 # Check whether this is an Automake generated Makefile or not.
30189 # We used to match only the files named `Makefile.in', but
30190 # some people rename them; so instead we look at the file content.
30191 # Grep'ing the first line is not enough: some people post-process
30192 # each Makefile.in and add a new line on top of each file to say so.
30193 # Grep'ing the whole file is not good either: AIX grep has a line
30194 # limit of 2048, but all sed's we know have understand at least 4000.
30195 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
30196 dirpart=`$as_dirname -- "$mf" ||
30197$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30198 X"$mf" : 'X\(//\)[^/]' \| \
30199 X"$mf" : 'X\(//\)$' \| \
30200 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
30201$as_echo X"$mf" |
30202 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
30203 s//\1/
30204 q
30205 }
30206 /^X\(\/\/\)[^/].*/{
30207 s//\1/
30208 q
30209 }
30210 /^X\(\/\/\)$/{
30211 s//\1/
30212 q
30213 }
30214 /^X\(\/\).*/{
30215 s//\1/
30216 q
30217 }
30218 s/.*/./; q'`
30219 else
30220 continue
30221 fi
30222 # Extract the definition of DEPDIR, am__include, and am__quote
30223 # from the Makefile without running `make'.
30224 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
30225 test -z "$DEPDIR" && continue
30226 am__include=`sed -n 's/^am__include = //p' < "$mf"`
30227 test -z "am__include" && continue
30228 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
30229 # When using ansi2knr, U may be empty or an underscore; expand it
30230 U=`sed -n 's/^U = //p' < "$mf"`
30231 # Find all dependency output files, they are included files with
30232 # $(DEPDIR) in their names. We invoke sed twice because it is the
30233 # simplest approach to changing $(DEPDIR) to its actual value in the
30234 # expansion.
30235 for file in `sed -n "
30236 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
30237 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
30238 # Make sure the directory exists.
30239 test -f "$dirpart/$file" && continue
30240 fdir=`$as_dirname -- "$file" ||
30241$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30242 X"$file" : 'X\(//\)[^/]' \| \
30243 X"$file" : 'X\(//\)$' \| \
30244 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
30245$as_echo X"$file" |
30246 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
30247 s//\1/
30248 q
30249 }
30250 /^X\(\/\/\)[^/].*/{
30251 s//\1/
30252 q
30253 }
30254 /^X\(\/\/\)$/{
30255 s//\1/
30256 q
30257 }
30258 /^X\(\/\).*/{
30259 s//\1/
30260 q
30261 }
30262 s/.*/./; q'`
30263 as_dir=$dirpart/$fdir; as_fn_mkdir_p
30264 # echo "creating $dirpart/$file"
30265 echo '# dummy' > "$dirpart/$file"
30266 done
30267 done
30268}
30269 ;;
9411886d 30270 "mkdirs":C)
067d23c9
KY
30271for dir in etc lisp ; do
30272 test -d ${dir} || mkdir ${dir}
30273done
9411886d
PE
30274 ;;
30275 "epaths":C)
067d23c9 30276echo creating src/epaths.h
7c61eaab
GM
30277if test "${opsys}" = "mingw32"; then
30278 ${MAKE-make} MAKEFILE_NAME=do-not-make-Makefile epaths-force-w32
30279else
30280 ${MAKE-make} MAKEFILE_NAME=do-not-make-Makefile epaths-force
30281fi
9411886d
PE
30282 ;;
30283 "gdbinit":C)
b5591ebb 30284if test ! -f src/.gdbinit && test -f "$srcdir/src/.gdbinit"; then
067d23c9 30285 echo creating src/.gdbinit
b5591ebb 30286 echo "source $srcdir/src/.gdbinit" > src/.gdbinit
067d23c9 30287fi
067d23c9
KY
30288 ;;
30289
30290 esac
30291done # for ac_tag
30292
30293
30294as_fn_exit 0
30295_ACEOF
30296ac_clean_files=$ac_clean_files_save
30297
30298test $ac_write_fail = 0 ||
a9bec17c 30299 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
067d23c9
KY
30300
30301
30302# configure is writing to config.log, and then calls config.status.
30303# config.status does its own redirection, appending to config.log.
30304# Unfortunately, on DOS this fails, as config.log is still kept open
30305# by configure, so config.status won't be able to write to it; its
30306# output is simply discarded. So we exec the FD to /dev/null,
30307# effectively closing config.log, so it can be properly (re)opened and
30308# appended to by config.status. When coming back to configure, we
30309# need to make the FD available again.
30310if test "$no_create" != yes; then
30311 ac_cs_success=:
30312 ac_config_status_args=
30313 test "$silent" = yes &&
30314 ac_config_status_args="$ac_config_status_args --quiet"
30315 exec 5>/dev/null
30316 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
30317 exec 5>>config.log
30318 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
30319 # would make configure fail if this is the last instruction.
a9bec17c 30320 $ac_cs_success || as_fn_exit $?
067d23c9
KY
30321fi
30322if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
30323 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
30324$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
30325fi
30326