Auto-commit of generated files.
[bpt/emacs.git] / autogen / configure
CommitLineData
067d23c9
KY
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
c574bc34 3# Generated by GNU Autoconf 2.65 for emacs 24.3.50.
067d23c9
KY
4#
5#
6# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
a9bec17c
GM
7# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
8# Inc.
067d23c9
KY
9#
10#
11# This configure script is free software; the Free Software Foundation
12# gives unlimited permission to copy, distribute and modify it.
13## -------------------- ##
14## M4sh Initialization. ##
15## -------------------- ##
16
17# Be more Bourne compatible
18DUALCASE=1; export DUALCASE # for MKS sh
19if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
20 emulate sh
21 NULLCMD=:
22 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
23 # is contrary to our usage. Disable this feature.
24 alias -g '${1+"$@"}'='"$@"'
25 setopt NO_GLOB_SUBST
26else
27 case `(set -o) 2>/dev/null` in #(
28 *posix*) :
29 set -o posix ;; #(
30 *) :
31 ;;
32esac
33fi
34
35
36as_nl='
37'
38export as_nl
39# Printing a long string crashes Solaris 7 /usr/bin/printf.
40as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43# Prefer a ksh shell builtin over an external printf program on Solaris,
44# but without wasting forks for bash or zsh.
45if test -z "$BASH_VERSION$ZSH_VERSION" \
46 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47 as_echo='print -r --'
48 as_echo_n='print -rn --'
49elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50 as_echo='printf %s\n'
51 as_echo_n='printf %s'
52else
53 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55 as_echo_n='/usr/ucb/echo -n'
56 else
57 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58 as_echo_n_body='eval
59 arg=$1;
60 case $arg in #(
61 *"$as_nl"*)
62 expr "X$arg" : "X\\(.*\\)$as_nl";
63 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64 esac;
65 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66 '
67 export as_echo_n_body
68 as_echo_n='sh -c $as_echo_n_body as_echo'
69 fi
70 export as_echo_body
71 as_echo='sh -c $as_echo_body as_echo'
72fi
73
74# The user is always right.
75if test "${PATH_SEPARATOR+set}" != set; then
76 PATH_SEPARATOR=:
77 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79 PATH_SEPARATOR=';'
80 }
81fi
82
83
84# IFS
85# We need space, tab and new line, in precisely that order. Quoting is
86# there to prevent editors from complaining about space-tab.
87# (If _AS_PATH_WALK were called with IFS unset, it would disable word
88# splitting by setting IFS to empty value.)
89IFS=" "" $as_nl"
90
91# Find who we are. Look in the path if we contain no directory separator.
92case $0 in #((
93 *[\\/]* ) as_myself=$0 ;;
94 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
95for as_dir in $PATH
96do
97 IFS=$as_save_IFS
98 test -z "$as_dir" && as_dir=.
99 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
100 done
101IFS=$as_save_IFS
102
103 ;;
104esac
105# We did not find ourselves, most probably we were run as `sh COMMAND'
106# in which case we are not to be found in the path.
107if test "x$as_myself" = x; then
108 as_myself=$0
109fi
110if test ! -f "$as_myself"; then
111 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
112 exit 1
113fi
114
115# Unset variables that we do not need and which cause bugs (e.g. in
116# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
117# suppresses any "Segmentation fault" message there. '((' could
118# trigger a bug in pdksh 5.2.14.
119for as_var in BASH_ENV ENV MAIL MAILPATH
120do eval test x\${$as_var+set} = xset \
121 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
122done
123PS1='$ '
124PS2='> '
125PS4='+ '
126
127# NLS nuisances.
128LC_ALL=C
129export LC_ALL
130LANGUAGE=C
131export LANGUAGE
132
133# CDPATH.
134(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
135
136if test "x$CONFIG_SHELL" = x; then
137 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
138 emulate sh
139 NULLCMD=:
140 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
141 # is contrary to our usage. Disable this feature.
142 alias -g '\${1+\"\$@\"}'='\"\$@\"'
143 setopt NO_GLOB_SUBST
144else
145 case \`(set -o) 2>/dev/null\` in #(
146 *posix*) :
147 set -o posix ;; #(
148 *) :
149 ;;
150esac
151fi
152"
153 as_required="as_fn_return () { (exit \$1); }
154as_fn_success () { as_fn_return 0; }
155as_fn_failure () { as_fn_return 1; }
156as_fn_ret_success () { return 0; }
157as_fn_ret_failure () { return 1; }
158
159exitcode=0
160as_fn_success || { exitcode=1; echo as_fn_success failed.; }
161as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
162as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
163as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
164if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
165
166else
167 exitcode=1; echo positional parameters were not saved.
168fi
169test x\$exitcode = x0 || exit 1"
170 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
171 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
172 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
173 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
174test \$(( 1 + 1 )) = 2 || exit 1"
175 if (eval "$as_required") 2>/dev/null; then :
176 as_have_required=yes
177else
178 as_have_required=no
179fi
180 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
181
182else
183 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
184as_found=false
185for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
186do
187 IFS=$as_save_IFS
188 test -z "$as_dir" && as_dir=.
189 as_found=:
190 case $as_dir in #(
191 /*)
192 for as_base in sh bash ksh sh5; do
193 # Try only shells that exist, to save several forks.
194 as_shell=$as_dir/$as_base
195 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
196 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
197 CONFIG_SHELL=$as_shell as_have_required=yes
198 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
199 break 2
200fi
201fi
202 done;;
203 esac
204 as_found=false
205done
206$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
207 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
208 CONFIG_SHELL=$SHELL as_have_required=yes
209fi; }
210IFS=$as_save_IFS
211
212
213 if test "x$CONFIG_SHELL" != x; then :
214 # We cannot yet assume a decent shell, so we have to provide a
215 # neutralization value for shells without unset; and this also
216 # works around shells that cannot unset nonexistent variables.
217 BASH_ENV=/dev/null
218 ENV=/dev/null
219 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
220 export CONFIG_SHELL
a9bec17c 221 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
067d23c9
KY
222fi
223
224 if test x$as_have_required = xno; then :
225 $as_echo "$0: This script requires a shell more modern than all"
226 $as_echo "$0: the shells that I found on your system."
227 if test x${ZSH_VERSION+set} = xset ; then
228 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
229 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
230 else
231 $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
232$0: including any error possibly output before this
233$0: message. Then install a modern shell, or manually run
234$0: the script under such a shell if you do have one."
235 fi
236 exit 1
237fi
238fi
239fi
240SHELL=${CONFIG_SHELL-/bin/sh}
241export SHELL
242# Unset more variables known to interfere with behavior of common tools.
243CLICOLOR_FORCE= GREP_OPTIONS=
244unset CLICOLOR_FORCE GREP_OPTIONS
245
246## --------------------- ##
247## M4sh Shell Functions. ##
248## --------------------- ##
249# as_fn_unset VAR
250# ---------------
251# Portably unset VAR.
252as_fn_unset ()
253{
254 { eval $1=; unset $1;}
255}
256as_unset=as_fn_unset
257
258# as_fn_set_status STATUS
259# -----------------------
260# Set $? to STATUS, without forking.
261as_fn_set_status ()
262{
263 return $1
264} # as_fn_set_status
265
266# as_fn_exit STATUS
267# -----------------
268# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
269as_fn_exit ()
270{
271 set +e
272 as_fn_set_status $1
273 exit $1
274} # as_fn_exit
275
276# as_fn_mkdir_p
277# -------------
278# Create "$as_dir" as a directory, including parents if necessary.
279as_fn_mkdir_p ()
280{
281
282 case $as_dir in #(
283 -*) as_dir=./$as_dir;;
284 esac
285 test -d "$as_dir" || eval $as_mkdir_p || {
286 as_dirs=
287 while :; do
288 case $as_dir in #(
289 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
290 *) as_qdir=$as_dir;;
291 esac
292 as_dirs="'$as_qdir' $as_dirs"
293 as_dir=`$as_dirname -- "$as_dir" ||
294$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
295 X"$as_dir" : 'X\(//\)[^/]' \| \
296 X"$as_dir" : 'X\(//\)$' \| \
297 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
298$as_echo X"$as_dir" |
299 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
300 s//\1/
301 q
302 }
303 /^X\(\/\/\)[^/].*/{
304 s//\1/
305 q
306 }
307 /^X\(\/\/\)$/{
308 s//\1/
309 q
310 }
311 /^X\(\/\).*/{
312 s//\1/
313 q
314 }
315 s/.*/./; q'`
316 test -d "$as_dir" && break
317 done
318 test -z "$as_dirs" || eval "mkdir $as_dirs"
a9bec17c 319 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
067d23c9
KY
320
321
322} # as_fn_mkdir_p
323# as_fn_append VAR VALUE
324# ----------------------
325# Append the text in VALUE to the end of the definition contained in VAR. Take
326# advantage of any shell optimizations that allow amortized linear growth over
327# repeated appends, instead of the typical quadratic growth present in naive
328# implementations.
329if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
330 eval 'as_fn_append ()
331 {
332 eval $1+=\$2
333 }'
334else
335 as_fn_append ()
336 {
337 eval $1=\$$1\$2
338 }
339fi # as_fn_append
340
341# as_fn_arith ARG...
342# ------------------
343# Perform arithmetic evaluation on the ARGs, and store the result in the
344# global $as_val. Take advantage of shells that can avoid forks. The arguments
345# must be portable across $(()) and expr.
346if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
347 eval 'as_fn_arith ()
348 {
349 as_val=$(( $* ))
350 }'
351else
352 as_fn_arith ()
353 {
354 as_val=`expr "$@" || test $? -eq 1`
355 }
356fi # as_fn_arith
357
358
a9bec17c
GM
359# as_fn_error ERROR [LINENO LOG_FD]
360# ---------------------------------
067d23c9
KY
361# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
362# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
a9bec17c 363# script with status $?, using 1 if that was 0.
067d23c9
KY
364as_fn_error ()
365{
a9bec17c
GM
366 as_status=$?; test $as_status -eq 0 && as_status=1
367 if test "$3"; then
368 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
369 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
067d23c9 370 fi
a9bec17c 371 $as_echo "$as_me: error: $1" >&2
067d23c9
KY
372 as_fn_exit $as_status
373} # as_fn_error
374
375if expr a : '\(a\)' >/dev/null 2>&1 &&
376 test "X`expr 00001 : '.*\(...\)'`" = X001; then
377 as_expr=expr
378else
379 as_expr=false
380fi
381
382if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
383 as_basename=basename
384else
385 as_basename=false
386fi
387
388if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
389 as_dirname=dirname
390else
391 as_dirname=false
392fi
393
394as_me=`$as_basename -- "$0" ||
395$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
396 X"$0" : 'X\(//\)$' \| \
397 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
398$as_echo X/"$0" |
399 sed '/^.*\/\([^/][^/]*\)\/*$/{
400 s//\1/
401 q
402 }
403 /^X\/\(\/\/\)$/{
404 s//\1/
405 q
406 }
407 /^X\/\(\/\).*/{
408 s//\1/
409 q
410 }
411 s/.*/./; q'`
412
413# Avoid depending upon Character Ranges.
414as_cr_letters='abcdefghijklmnopqrstuvwxyz'
415as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
416as_cr_Letters=$as_cr_letters$as_cr_LETTERS
417as_cr_digits='0123456789'
418as_cr_alnum=$as_cr_Letters$as_cr_digits
419
420
421 as_lineno_1=$LINENO as_lineno_1a=$LINENO
422 as_lineno_2=$LINENO as_lineno_2a=$LINENO
423 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
424 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
425 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
426 sed -n '
427 p
428 /[$]LINENO/=
429 ' <$as_myself |
430 sed '
431 s/[$]LINENO.*/&-/
432 t lineno
433 b
434 :lineno
435 N
436 :loop
437 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
438 t loop
439 s/-\n.*//
440 ' >$as_me.lineno &&
441 chmod +x "$as_me.lineno" ||
442 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
443
444 # Don't try to exec as it changes $[0], causing all sort of problems
445 # (the dirname of $[0] is not the place where we might find the
446 # original and so on. Autoconf is especially sensitive to this).
447 . "./$as_me.lineno"
448 # Exit status is that of the last command.
449 exit
450}
451
452ECHO_C= ECHO_N= ECHO_T=
453case `echo -n x` in #(((((
454-n*)
455 case `echo 'xy\c'` in
456 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
457 xy) ECHO_C='\c';;
458 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
459 ECHO_T=' ';;
460 esac;;
461*)
462 ECHO_N='-n';;
463esac
464
465rm -f conf$$ conf$$.exe conf$$.file
466if test -d conf$$.dir; then
467 rm -f conf$$.dir/conf$$.file
468else
469 rm -f conf$$.dir
470 mkdir conf$$.dir 2>/dev/null
471fi
472if (echo >conf$$.file) 2>/dev/null; then
473 if ln -s conf$$.file conf$$ 2>/dev/null; then
474 as_ln_s='ln -s'
475 # ... but there are two gotchas:
476 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
477 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
478 # In both cases, we have to default to `cp -p'.
479 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
480 as_ln_s='cp -p'
481 elif ln conf$$.file conf$$ 2>/dev/null; then
482 as_ln_s=ln
483 else
484 as_ln_s='cp -p'
485 fi
486else
487 as_ln_s='cp -p'
488fi
489rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
490rmdir conf$$.dir 2>/dev/null
491
492if mkdir -p . 2>/dev/null; then
493 as_mkdir_p='mkdir -p "$as_dir"'
494else
495 test -d ./-p && rmdir ./-p
496 as_mkdir_p=false
497fi
498
499if test -x / >/dev/null 2>&1; then
500 as_test_x='test -x'
501else
502 if ls -dL / >/dev/null 2>&1; then
503 as_ls_L_option=L
504 else
505 as_ls_L_option=
506 fi
507 as_test_x='
508 eval sh -c '\''
509 if test -d "$1"; then
510 test -d "$1/.";
511 else
512 case $1 in #(
513 -*)set "./$1";;
514 esac;
515 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
516 ???[sx]*):;;*)false;;esac;fi
517 '\'' sh
518 '
519fi
520as_executable_p=$as_test_x
521
522# Sed expression to map a string onto a valid CPP name.
523as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
524
525# Sed expression to map a string onto a valid variable name.
526as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
527
528
529test -n "$DJDIR" || exec 7<&0 </dev/null
530exec 6>&1
531
532# Name of the host.
a9bec17c 533# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
067d23c9
KY
534# so uname gets run too.
535ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
536
537#
538# Initializations.
539#
540ac_default_prefix=/usr/local
541ac_clean_files=
542ac_config_libobj_dir=.
543LIBOBJS=
544cross_compiling=no
545subdirs=
546MFLAGS=
547MAKEFLAGS=
548
549# Identity of this package.
550PACKAGE_NAME='emacs'
551PACKAGE_TARNAME='emacs'
c574bc34
GM
552PACKAGE_VERSION='24.3.50'
553PACKAGE_STRING='emacs 24.3.50'
067d23c9
KY
554PACKAGE_BUGREPORT=''
555PACKAGE_URL=''
556
557ac_unique_file="src/lisp.h"
558# Factoring default headers for most tests.
559ac_includes_default="\
560#include <stdio.h>
561#ifdef HAVE_SYS_TYPES_H
562# include <sys/types.h>
563#endif
564#ifdef HAVE_SYS_STAT_H
565# include <sys/stat.h>
566#endif
567#ifdef STDC_HEADERS
568# include <stdlib.h>
569# include <stddef.h>
570#else
571# ifdef HAVE_STDLIB_H
572# include <stdlib.h>
573# endif
574#endif
575#ifdef HAVE_STRING_H
576# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
577# include <memory.h>
578# endif
579# include <string.h>
580#endif
581#ifdef HAVE_STRINGS_H
582# include <strings.h>
583#endif
584#ifdef HAVE_INTTYPES_H
585# include <inttypes.h>
586#endif
587#ifdef HAVE_STDINT_H
588# include <stdint.h>
589#endif
590#ifdef HAVE_UNISTD_H
591# include <unistd.h>
592#endif"
593
f199cab1 594ac_header_list=
5476a9a4 595ac_func_list=
e275c824 596gl_getopt_required=POSIX
7e723570 597gl_getopt_required=POSIX
743c80a7
PE
598ac_subst_vars='gltests_LTLIBOBJS
599gltests_LIBOBJS
600gl_LTLIBOBJS
601gl_LIBOBJS
602am__EXEEXT_FALSE
603am__EXEEXT_TRUE
604LTLIBOBJS
1f5d53eb 605LIBOBJS
73b78882 606SUBDIR_MAKEFILES_IN
2f342695 607ns_check_file
42dcba54 608WINDOW_SYSTEM_OBJ
7c61eaab
GM
609EMACS_HEAPSIZE
610TEMACS_POST_LINK
611ADDSECTION
067d23c9 612LD_SWITCH_SYSTEM_TEMACS
743c80a7
PE
613LIBGNU_LTLIBDEPS
614LIBGNU_LIBDEPS
615gltests_WITNESS
710f5812
GM
616gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_FALSE
617gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_TRUE
e412eb97
GM
618gl_GNULIB_ENABLED_tempname_FALSE
619gl_GNULIB_ENABLED_tempname_TRUE
6d153f56
GM
620gl_GNULIB_ENABLED_strtoull_FALSE
621gl_GNULIB_ENABLED_strtoull_TRUE
3e0be4ab
GM
622gl_GNULIB_ENABLED_strtoll_FALSE
623gl_GNULIB_ENABLED_strtoll_TRUE
6d153f56
GM
624gl_GNULIB_ENABLED_stat_FALSE
625gl_GNULIB_ENABLED_stat_TRUE
e412eb97
GM
626gl_GNULIB_ENABLED_secure_getenv_FALSE
627gl_GNULIB_ENABLED_secure_getenv_TRUE
710f5812
GM
628gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_FALSE
629gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_TRUE
a0a61e58
GM
630gl_GNULIB_ENABLED_pathmax_FALSE
631gl_GNULIB_ENABLED_pathmax_TRUE
d7ad186c
GM
632gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_FALSE
633gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_TRUE
710f5812
GM
634gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_FALSE
635gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_TRUE
6d153f56
GM
636gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE
637gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE
710f5812
GM
638gl_GNULIB_ENABLED_getgroups_FALSE
639gl_GNULIB_ENABLED_getgroups_TRUE
0cdca42a
GM
640gl_GNULIB_ENABLED_getdtablesize_FALSE
641gl_GNULIB_ENABLED_getdtablesize_TRUE
710f5812
GM
642gl_GNULIB_ENABLED_euidaccess_FALSE
643gl_GNULIB_ENABLED_euidaccess_TRUE
6d153f56
GM
644gl_GNULIB_ENABLED_dosname_FALSE
645gl_GNULIB_ENABLED_dosname_TRUE
d7ad186c
GM
646gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_FALSE
647gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_TRUE
6d153f56
GM
648LTLIBINTL
649LIBINTL
710f5812 650LIB_EACCESS
f199cab1 651WINDOWS_64_BIT_OFF_T
e275c824
PE
652HAVE_UNISTD_H
653NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
654NEXT_UNISTD_H
f077f61d 655LIB_TIMER_TIME
1fd182f0
PE
656PTHREAD_H_DEFINES_STRUCT_TIMESPEC
657SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
658TIME_H_DEFINES_STRUCT_TIMESPEC
659NEXT_AS_FIRST_DIRECTIVE_TIME_H
660NEXT_TIME_H
0eb775a3 661WINDOWS_64_BIT_ST_SIZE
5fa4ac76
PE
662NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
663NEXT_SYS_STAT_H
283c7aed
GM
664NEXT_AS_FIRST_DIRECTIVE_STRING_H
665NEXT_STRING_H
1f5d53eb
PE
666NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
667NEXT_STDLIB_H
6ad6792b
GM
668NEXT_AS_FIRST_DIRECTIVE_STDIO_H
669NEXT_STDIO_H
670REPLACE_VSPRINTF
671REPLACE_VSNPRINTF
672REPLACE_VPRINTF
673REPLACE_VFPRINTF
674REPLACE_VDPRINTF
675REPLACE_VASPRINTF
676REPLACE_TMPFILE
677REPLACE_STDIO_WRITE_FUNCS
ca36e0ff 678REPLACE_STDIO_READ_FUNCS
6ad6792b
GM
679REPLACE_SPRINTF
680REPLACE_SNPRINTF
681REPLACE_RENAMEAT
682REPLACE_RENAME
683REPLACE_REMOVE
684REPLACE_PRINTF
685REPLACE_POPEN
686REPLACE_PERROR
687REPLACE_OBSTACK_PRINTF
688REPLACE_GETLINE
689REPLACE_GETDELIM
690REPLACE_FTELLO
691REPLACE_FTELL
692REPLACE_FSEEKO
693REPLACE_FSEEK
694REPLACE_FREOPEN
695REPLACE_FPURGE
696REPLACE_FPRINTF
697REPLACE_FOPEN
698REPLACE_FFLUSH
2b1928b8 699REPLACE_FDOPEN
6ad6792b
GM
700REPLACE_FCLOSE
701REPLACE_DPRINTF
702HAVE_VDPRINTF
703HAVE_VASPRINTF
704HAVE_RENAMEAT
2b1928b8
GM
705HAVE_POPEN
706HAVE_PCLOSE
6ad6792b
GM
707HAVE_FTELLO
708HAVE_FSEEKO
709HAVE_DPRINTF
710HAVE_DECL_VSNPRINTF
711HAVE_DECL_SNPRINTF
712HAVE_DECL_OBSTACK_PRINTF
713HAVE_DECL_GETLINE
714HAVE_DECL_GETDELIM
715HAVE_DECL_FTELLO
716HAVE_DECL_FSEEKO
717HAVE_DECL_FPURGE
718GNULIB_VSPRINTF_POSIX
719GNULIB_VSNPRINTF
720GNULIB_VPRINTF_POSIX
721GNULIB_VPRINTF
722GNULIB_VFPRINTF_POSIX
723GNULIB_VFPRINTF
724GNULIB_VDPRINTF
ca36e0ff
GM
725GNULIB_VSCANF
726GNULIB_VFSCANF
6ad6792b
GM
727GNULIB_VASPRINTF
728GNULIB_TMPFILE
729GNULIB_STDIO_H_SIGPIPE
ca36e0ff 730GNULIB_STDIO_H_NONBLOCKING
6ad6792b
GM
731GNULIB_SPRINTF_POSIX
732GNULIB_SNPRINTF
ca36e0ff 733GNULIB_SCANF
6ad6792b
GM
734GNULIB_RENAMEAT
735GNULIB_RENAME
736GNULIB_REMOVE
737GNULIB_PUTS
738GNULIB_PUTCHAR
739GNULIB_PUTC
740GNULIB_PRINTF_POSIX
741GNULIB_PRINTF
742GNULIB_POPEN
743GNULIB_PERROR
2b1928b8 744GNULIB_PCLOSE
6ad6792b
GM
745GNULIB_OBSTACK_PRINTF_POSIX
746GNULIB_OBSTACK_PRINTF
747GNULIB_GETLINE
748GNULIB_GETDELIM
ca36e0ff
GM
749GNULIB_GETCHAR
750GNULIB_GETC
6ad6792b
GM
751GNULIB_FWRITE
752GNULIB_FTELLO
753GNULIB_FTELL
754GNULIB_FSEEKO
755GNULIB_FSEEK
ca36e0ff 756GNULIB_FSCANF
6ad6792b 757GNULIB_FREOPEN
ca36e0ff 758GNULIB_FREAD
6ad6792b
GM
759GNULIB_FPUTS
760GNULIB_FPUTC
761GNULIB_FPURGE
762GNULIB_FPRINTF_POSIX
763GNULIB_FPRINTF
764GNULIB_FOPEN
ca36e0ff
GM
765GNULIB_FGETS
766GNULIB_FGETC
6ad6792b 767GNULIB_FFLUSH
2b1928b8 768GNULIB_FDOPEN
6ad6792b
GM
769GNULIB_FCLOSE
770GNULIB_DPRINTF
1fd182f0
PE
771NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
772NEXT_STDDEF_H
6c051bab
GM
773GL_GENERATE_STDDEF_H_FALSE
774GL_GENERATE_STDDEF_H_TRUE
1fd182f0
PE
775STDDEF_H
776HAVE_WCHAR_T
777REPLACE_NULL
16c3e636 778HAVE__BOOL
6c051bab
GM
779GL_GENERATE_STDBOOL_H_FALSE
780GL_GENERATE_STDBOOL_H_TRUE
16c3e636 781STDBOOL_H
6d153f56
GM
782GL_GENERATE_STDARG_H_FALSE
783GL_GENERATE_STDARG_H_TRUE
784STDARG_H
785NEXT_AS_FIRST_DIRECTIVE_STDARG_H
786NEXT_STDARG_H
0eb775a3
GM
787GL_GENERATE_STDALIGN_H_FALSE
788GL_GENERATE_STDALIGN_H_TRUE
789STDALIGN_H
3e0be4ab
GM
790NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H
791NEXT_SIGNAL_H
3a019ab4
GM
792USE_ACL
793LIB_ACL
0eb775a3 794LIB_PTHREAD_SIGMASK
2b1928b8 795REPLACE_RAISE
3e0be4ab
GM
796REPLACE_PTHREAD_SIGMASK
797HAVE_SIGHANDLER_T
798HAVE_TYPE_VOLATILE_SIG_ATOMIC_T
799HAVE_STRUCT_SIGACTION_SA_SIGACTION
800HAVE_SIGACTION
801HAVE_SIGINFO_T
802HAVE_SIGSET_T
2b1928b8 803HAVE_RAISE
3e0be4ab
GM
804HAVE_PTHREAD_SIGMASK
805HAVE_POSIX_SIGNALBLOCKING
806GNULIB_SIGACTION
807GNULIB_SIGPROCMASK
808GNULIB_SIGNAL_H_SIGPIPE
2b1928b8 809GNULIB_RAISE
3e0be4ab 810GNULIB_PTHREAD_SIGMASK
f199cab1
GM
811HAVE_SYS_SELECT_H
812NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H
813NEXT_SYS_SELECT_H
814REPLACE_SELECT
815REPLACE_PSELECT
816HAVE_PSELECT
817GNULIB_SELECT
818GNULIB_PSELECT
1fd182f0
PE
819REPLACE_TIMEGM
820REPLACE_NANOSLEEP
821REPLACE_MKTIME
822REPLACE_LOCALTIME_R
823HAVE_TIMEGM
824HAVE_STRPTIME
825HAVE_NANOSLEEP
826HAVE_DECL_LOCALTIME_R
827GNULIB_TIME_R
828GNULIB_TIMEGM
829GNULIB_STRPTIME
830GNULIB_NANOSLEEP
831GNULIB_MKTIME
283c7aed
GM
832UNDEFINE_STRTOK_R
833REPLACE_STRTOK_R
834REPLACE_STRSIGNAL
835REPLACE_STRNLEN
836REPLACE_STRNDUP
837REPLACE_STRNCAT
838REPLACE_STRERROR_R
839REPLACE_STRERROR
840REPLACE_STRCHRNUL
841REPLACE_STRCASESTR
842REPLACE_STRSTR
843REPLACE_STRDUP
844REPLACE_STPNCPY
845REPLACE_MEMMEM
846REPLACE_MEMCHR
847HAVE_STRVERSCMP
848HAVE_DECL_STRSIGNAL
849HAVE_DECL_STRERROR_R
850HAVE_DECL_STRTOK_R
851HAVE_STRCASESTR
852HAVE_STRSEP
853HAVE_STRPBRK
854HAVE_DECL_STRNLEN
855HAVE_DECL_STRNDUP
856HAVE_DECL_STRDUP
857HAVE_STRCHRNUL
858HAVE_STPNCPY
859HAVE_STPCPY
860HAVE_RAWMEMCHR
861HAVE_DECL_MEMRCHR
862HAVE_MEMPCPY
863HAVE_DECL_MEMMEM
864HAVE_MEMCHR
865HAVE_FFSLL
866HAVE_FFSL
867HAVE_MBSLEN
868GNULIB_STRVERSCMP
869GNULIB_STRSIGNAL
870GNULIB_STRERROR_R
871GNULIB_STRERROR
872GNULIB_MBSTOK_R
873GNULIB_MBSSEP
874GNULIB_MBSSPN
875GNULIB_MBSPBRK
876GNULIB_MBSCSPN
877GNULIB_MBSCASESTR
878GNULIB_MBSPCASECMP
879GNULIB_MBSNCASECMP
880GNULIB_MBSCASECMP
881GNULIB_MBSSTR
882GNULIB_MBSRCHR
883GNULIB_MBSCHR
884GNULIB_MBSNLEN
885GNULIB_MBSLEN
886GNULIB_STRTOK_R
887GNULIB_STRCASESTR
888GNULIB_STRSTR
889GNULIB_STRSEP
890GNULIB_STRPBRK
891GNULIB_STRNLEN
892GNULIB_STRNDUP
893GNULIB_STRNCAT
894GNULIB_STRDUP
895GNULIB_STRCHRNUL
896GNULIB_STPNCPY
897GNULIB_STPCPY
898GNULIB_RAWMEMCHR
899GNULIB_MEMRCHR
900GNULIB_MEMPCPY
901GNULIB_MEMMEM
902GNULIB_MEMCHR
903GNULIB_FFSLL
904GNULIB_FFSL
4fda9c95
GM
905NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H
906NEXT_INTTYPES_H
907UINT64_MAX_EQ_ULONG_MAX
908UINT32_MAX_LT_UINTMAX_MAX
909PRIPTR_PREFIX
910PRI_MACROS_BROKEN
911INT64_MAX_EQ_LONG_MAX
912INT32_MAX_LT_INTMAX_MAX
0eb775a3 913REPLACE_STRTOIMAX
4fda9c95
GM
914HAVE_DECL_STRTOUMAX
915HAVE_DECL_STRTOIMAX
916HAVE_DECL_IMAXDIV
917HAVE_DECL_IMAXABS
918GNULIB_STRTOUMAX
919GNULIB_STRTOIMAX
920GNULIB_IMAXDIV
921GNULIB_IMAXABS
922GL_GENERATE_STDINT_H_FALSE
923GL_GENERATE_STDINT_H_TRUE
924STDINT_H
925WINT_T_SUFFIX
926WCHAR_T_SUFFIX
927SIG_ATOMIC_T_SUFFIX
928SIZE_T_SUFFIX
929PTRDIFF_T_SUFFIX
930HAVE_SIGNED_WINT_T
931HAVE_SIGNED_WCHAR_T
932HAVE_SIGNED_SIG_ATOMIC_T
933BITSIZEOF_WINT_T
934BITSIZEOF_WCHAR_T
935BITSIZEOF_SIG_ATOMIC_T
936BITSIZEOF_SIZE_T
937BITSIZEOF_PTRDIFF_T
938APPLE_UNIVERSAL_BUILD
939HAVE_SYS_BITYPES_H
940HAVE_SYS_INTTYPES_H
941HAVE_STDINT_H
942NEXT_AS_FIRST_DIRECTIVE_STDINT_H
943NEXT_STDINT_H
944HAVE_SYS_TYPES_H
945HAVE_INTTYPES_H
946HAVE_WCHAR_H
947HAVE_UNSIGNED_LONG_LONG_INT
948HAVE_LONG_LONG_INT
f199cab1
GM
949HAVE_WINSOCK2_H
950NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
951NEXT_SYS_TIME_H
952REPLACE_STRUCT_TIMEVAL
953REPLACE_GETTIMEOFDAY
954HAVE_SYS_TIME_H
955HAVE_STRUCT_TIMEVAL
956HAVE_GETTIMEOFDAY
957GNULIB_GETTIMEOFDAY
0eb775a3 958GNULIB_GL_UNISTD_H_GETOPT
e275c824
PE
959GETOPT_H
960HAVE_GETOPT_H
961NEXT_AS_FIRST_DIRECTIVE_GETOPT_H
962NEXT_GETOPT_H
7d2a1c5e
GM
963GETLOADAVG_LIBS
964REPLACE_WCTOMB
965REPLACE_UNSETENV
966REPLACE_STRTOD
967REPLACE_SETENV
968REPLACE_REALPATH
969REPLACE_REALLOC
0eb775a3 970REPLACE_RANDOM_R
7d2a1c5e 971REPLACE_PUTENV
0eb775a3 972REPLACE_PTSNAME_R
b6c9d18d 973REPLACE_PTSNAME
7d2a1c5e
GM
974REPLACE_MKSTEMP
975REPLACE_MBTOWC
976REPLACE_MALLOC
977REPLACE_CANONICALIZE_FILE_NAME
978REPLACE_CALLOC
979HAVE_DECL_UNSETENV
980HAVE_UNLOCKPT
981HAVE_SYS_LOADAVG_H
982HAVE_STRUCT_RANDOM_DATA
983HAVE_STRTOULL
984HAVE_STRTOLL
985HAVE_STRTOD
986HAVE_DECL_SETENV
987HAVE_SETENV
2cdd55fc 988HAVE_SECURE_GETENV
7d2a1c5e
GM
989HAVE_RPMATCH
990HAVE_REALPATH
991HAVE_RANDOM_R
992HAVE_RANDOM_H
0eb775a3
GM
993HAVE_RANDOM
994HAVE_PTSNAME_R
7d2a1c5e 995HAVE_PTSNAME
0eb775a3 996HAVE_POSIX_OPENPT
7d2a1c5e
GM
997HAVE_MKSTEMPS
998HAVE_MKSTEMP
999HAVE_MKOSTEMPS
1000HAVE_MKOSTEMP
1001HAVE_MKDTEMP
1002HAVE_GRANTPT
1003HAVE_GETSUBOPT
1004HAVE_DECL_GETLOADAVG
1005HAVE_CANONICALIZE_FILE_NAME
1006HAVE_ATOLL
1007HAVE__EXIT
1008GNULIB_WCTOMB
1009GNULIB_UNSETENV
1010GNULIB_UNLOCKPT
1011GNULIB_SYSTEM_POSIX
1012GNULIB_STRTOULL
1013GNULIB_STRTOLL
1014GNULIB_STRTOD
1015GNULIB_SETENV
2cdd55fc 1016GNULIB_SECURE_GETENV
7d2a1c5e
GM
1017GNULIB_RPMATCH
1018GNULIB_REALPATH
1019GNULIB_REALLOC_POSIX
1020GNULIB_RANDOM_R
0eb775a3 1021GNULIB_RANDOM
7d2a1c5e 1022GNULIB_PUTENV
0eb775a3 1023GNULIB_PTSNAME_R
7d2a1c5e 1024GNULIB_PTSNAME
0eb775a3 1025GNULIB_POSIX_OPENPT
7d2a1c5e
GM
1026GNULIB_MKSTEMPS
1027GNULIB_MKSTEMP
1028GNULIB_MKOSTEMPS
1029GNULIB_MKOSTEMP
1030GNULIB_MKDTEMP
1031GNULIB_MBTOWC
1032GNULIB_MALLOC_POSIX
1033GNULIB_GRANTPT
1034GNULIB_GETSUBOPT
1035GNULIB_GETLOADAVG
1036GNULIB_CANONICALIZE_FILE_NAME
1037GNULIB_CALLOC_POSIX
1038GNULIB_ATOLL
1039GNULIB__EXIT
d7ad186c
GM
1040REPLACE_UTIMENSAT
1041REPLACE_STAT
1042REPLACE_MKNOD
1043REPLACE_MKFIFO
1044REPLACE_MKDIR
1045REPLACE_LSTAT
1046REPLACE_FUTIMENS
1047REPLACE_FSTATAT
1048REPLACE_FSTAT
1049HAVE_UTIMENSAT
1050HAVE_MKNODAT
1051HAVE_MKNOD
1052HAVE_MKFIFOAT
1053HAVE_MKFIFO
1054HAVE_MKDIRAT
1055HAVE_LSTAT
1056HAVE_LCHMOD
1057HAVE_FUTIMENS
1058HAVE_FSTATAT
1059HAVE_FCHMODAT
1060GNULIB_UTIMENSAT
1061GNULIB_STAT
1062GNULIB_MKNODAT
1063GNULIB_MKNOD
1064GNULIB_MKFIFOAT
1065GNULIB_MKFIFO
1066GNULIB_MKDIRAT
1067GNULIB_LSTAT
1068GNULIB_LCHMOD
1069GNULIB_FUTIMENS
1070GNULIB_FSTATAT
1071GNULIB_FSTAT
1072GNULIB_FCHMODAT
2407788f 1073LIB_FDATASYNC
710f5812
GM
1074NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
1075NEXT_FCNTL_H
710f5812
GM
1076REPLACE_OPENAT
1077REPLACE_OPEN
1078REPLACE_FCNTL
1079HAVE_OPENAT
1080HAVE_FCNTL
1081GNULIB_OPENAT
1082GNULIB_OPEN
1083GNULIB_NONBLOCKING
1084GNULIB_FCNTL
8966cbff
GM
1085GL_GENERATE_EXECINFO_H_FALSE
1086GL_GENERATE_EXECINFO_H_TRUE
1087LIB_EXECINFO
1088EXECINFO_H
3a019ab4
GM
1089EOVERFLOW_VALUE
1090EOVERFLOW_HIDDEN
1091ENOLINK_VALUE
1092ENOLINK_HIDDEN
1093EMULTIHOP_VALUE
1094EMULTIHOP_HIDDEN
1095GL_GENERATE_ERRNO_H_FALSE
1096GL_GENERATE_ERRNO_H_TRUE
1097ERRNO_H
1098NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
1099NEXT_ERRNO_H
d7ad186c
GM
1100HAVE_DIRENT_H
1101NEXT_AS_FIRST_DIRECTIVE_DIRENT_H
1102NEXT_DIRENT_H
1103PRAGMA_COLUMNS
1104PRAGMA_SYSTEM_HEADER
1105INCLUDE_NEXT_AS_FIRST_DIRECTIVE
1106INCLUDE_NEXT
1107REPLACE_FDOPENDIR
1108REPLACE_DIRFD
1109REPLACE_CLOSEDIR
1110REPLACE_OPENDIR
1111HAVE_ALPHASORT
1112HAVE_SCANDIR
1113HAVE_FDOPENDIR
1114HAVE_DECL_FDOPENDIR
1115HAVE_DECL_DIRFD
1116HAVE_CLOSEDIR
1117HAVE_REWINDDIR
1118HAVE_READDIR
1119HAVE_OPENDIR
1120GNULIB_ALPHASORT
1121GNULIB_SCANDIR
1122GNULIB_FDOPENDIR
1123GNULIB_DIRFD
1124GNULIB_CLOSEDIR
1125GNULIB_REWINDDIR
1126GNULIB_READDIR
1127GNULIB_OPENDIR
e275c824
PE
1128UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1129UNISTD_H_HAVE_WINSOCK2_H
1130REPLACE_WRITE
1131REPLACE_USLEEP
1132REPLACE_UNLINKAT
1133REPLACE_UNLINK
1134REPLACE_TTYNAME_R
1135REPLACE_SYMLINK
1136REPLACE_SLEEP
1137REPLACE_RMDIR
1138REPLACE_READLINK
ca36e0ff 1139REPLACE_READ
e275c824
PE
1140REPLACE_PWRITE
1141REPLACE_PREAD
1142REPLACE_LSEEK
1143REPLACE_LINKAT
1144REPLACE_LINK
1145REPLACE_LCHOWN
0eb775a3 1146REPLACE_ISATTY
e275c824
PE
1147REPLACE_GETPAGESIZE
1148REPLACE_GETGROUPS
1149REPLACE_GETLOGIN_R
1150REPLACE_GETDOMAINNAME
1151REPLACE_GETCWD
0eb775a3 1152REPLACE_FTRUNCATE
e275c824
PE
1153REPLACE_FCHOWNAT
1154REPLACE_DUP2
1155REPLACE_DUP
1156REPLACE_CLOSE
1157REPLACE_CHOWN
1158HAVE_SYS_PARAM_H
1159HAVE_OS_H
1160HAVE_DECL_TTYNAME_R
0eb775a3 1161HAVE_DECL_SETHOSTNAME
e275c824
PE
1162HAVE_DECL_GETUSERSHELL
1163HAVE_DECL_GETPAGESIZE
1164HAVE_DECL_GETLOGIN_R
1165HAVE_DECL_GETDOMAINNAME
2b1928b8 1166HAVE_DECL_FDATASYNC
e275c824
PE
1167HAVE_DECL_FCHDIR
1168HAVE_DECL_ENVIRON
1169HAVE_USLEEP
1170HAVE_UNLINKAT
1171HAVE_SYMLINKAT
1172HAVE_SYMLINK
1173HAVE_SLEEP
0eb775a3 1174HAVE_SETHOSTNAME
e275c824
PE
1175HAVE_READLINKAT
1176HAVE_READLINK
1177HAVE_PWRITE
1178HAVE_PREAD
1179HAVE_PIPE2
1180HAVE_PIPE
1181HAVE_LINKAT
1182HAVE_LINK
1183HAVE_LCHOWN
da6c8463 1184HAVE_GROUP_MEMBER
e275c824
PE
1185HAVE_GETPAGESIZE
1186HAVE_GETLOGIN
1187HAVE_GETHOSTNAME
1188HAVE_GETGROUPS
1189HAVE_GETDTABLESIZE
1190HAVE_FTRUNCATE
1191HAVE_FSYNC
2b1928b8 1192HAVE_FDATASYNC
e275c824
PE
1193HAVE_FCHOWNAT
1194HAVE_FCHDIR
1195HAVE_FACCESSAT
1196HAVE_EUIDACCESS
1197HAVE_DUP3
1198HAVE_DUP2
1199HAVE_CHOWN
1200GNULIB_WRITE
1201GNULIB_USLEEP
1202GNULIB_UNLINKAT
1203GNULIB_UNLINK
1204GNULIB_UNISTD_H_SIGPIPE
ca36e0ff 1205GNULIB_UNISTD_H_NONBLOCKING
e275c824
PE
1206GNULIB_TTYNAME_R
1207GNULIB_SYMLINKAT
1208GNULIB_SYMLINK
1209GNULIB_SLEEP
0eb775a3 1210GNULIB_SETHOSTNAME
e275c824
PE
1211GNULIB_RMDIR
1212GNULIB_READLINKAT
1213GNULIB_READLINK
ca36e0ff 1214GNULIB_READ
e275c824
PE
1215GNULIB_PWRITE
1216GNULIB_PREAD
1217GNULIB_PIPE2
1218GNULIB_PIPE
1219GNULIB_LSEEK
1220GNULIB_LINKAT
1221GNULIB_LINK
1222GNULIB_LCHOWN
0eb775a3 1223GNULIB_ISATTY
da6c8463 1224GNULIB_GROUP_MEMBER
e275c824
PE
1225GNULIB_GETUSERSHELL
1226GNULIB_GETPAGESIZE
1227GNULIB_GETLOGIN_R
1228GNULIB_GETLOGIN
1229GNULIB_GETHOSTNAME
1230GNULIB_GETGROUPS
1231GNULIB_GETDTABLESIZE
1232GNULIB_GETDOMAINNAME
1233GNULIB_GETCWD
1234GNULIB_FTRUNCATE
1235GNULIB_FSYNC
2b1928b8 1236GNULIB_FDATASYNC
e275c824
PE
1237GNULIB_FCHOWNAT
1238GNULIB_FCHDIR
1239GNULIB_FACCESSAT
1240GNULIB_EUIDACCESS
1241GNULIB_ENVIRON
1242GNULIB_DUP3
1243GNULIB_DUP2
2b1928b8 1244GNULIB_DUP
e275c824
PE
1245GNULIB_CLOSE
1246GNULIB_CHOWN
2b1928b8 1247GNULIB_CHDIR
f199cab1 1248LIB_CLOCK_GETTIME
4fc2b746
GM
1249GL_GENERATE_ALLOCA_H_FALSE
1250GL_GENERATE_ALLOCA_H_TRUE
1251ALLOCA_H
1252ALLOCA
743c80a7
PE
1253GL_COND_LIBTOOL_FALSE
1254GL_COND_LIBTOOL_TRUE
5476a9a4
GM
1255POST_ALLOC_OBJ
1256PRE_ALLOC_OBJ
1257CYGWIN_OBJ
1258RALLOC_OBJ
1259OLDXMENU_DEPS
1260LIBX_OTHER
1261LIBXMENU
1262OLDXMENU
1263OLDXMENU_TARGET
1264LIBXT_OTHER
1265TOOLKIT_LIBW
1266WIDGET_OBJ
1267XOBJ
1268XMENU_OBJ
1269FONT_OBJ
1270OTHER_FILES
1271GNU_OBJC_CFLAGS
1272ns_appsrc
1273ns_appresdir
1274ns_appbindir
1275ns_appdir
5476a9a4
GM
1276X_TOOLKIT_TYPE
1277GNUSTEP_CFLAGS
1278C_SWITCH_X_SITE
1279LD_SWITCH_X_SITE
1280gameuser
1281gamedir
1282bitmapdir
7a67e06b 1283etcdocdir
5476a9a4
GM
1284archlibdir
1285etcdir
1286x_default_search_path
1287lisppath
1288locallisppath
1289standardlisppath
1290leimdir
1291lispdir
1292srcdir
1293canonical
1294configuration
1295version
bb7dce39 1296copyright
0f55a32e 1297XGSELOBJ
5476a9a4
GM
1298KRB4LIB
1299DESLIB
1300KRB5LIB
1301CRYPTOLIB
1302COM_ERRLIB
1303LIBRESOLV
1304LIBHESIOD
1305TERMCAP_OBJ
1306LIBS_TERMCAP
1307BLESSMAIL_TARGET
1308LIBS_MAIL
1309liblockfile
1310LIBXML2_LIBS
1311LIBXML2_CFLAGS
910833ae
GM
1312XINERAMA_LIBS
1313XINERAMA_CFLAGS
1314XRANDR_LIBS
1315XRANDR_CFLAGS
5476a9a4
GM
1316LIBXSM
1317LIBGPM
1318LIBGIF
1319LIBTIFF
7a67e06b 1320LIBZ
5476a9a4
GM
1321LIBPNG
1322LIBJPEG
1323LIBXPM
1324M17N_FLT_LIBS
1325M17N_FLT_CFLAGS
1326LIBOTF_LIBS
1327LIBOTF_CFLAGS
1328FREETYPE_LIBS
1329FREETYPE_CFLAGS
1330XFT_LIBS
1331XFT_CFLAGS
1332FONTCONFIG_LIBS
1333FONTCONFIG_CFLAGS
1334LIBXMU
1335LIBXTR6
0f55a32e
GM
1336NOTIFY_OBJ
1337GFILENOTIFY_LIBS
1338GFILENOTIFY_CFLAGS
5476a9a4
GM
1339LIBGNUTLS_LIBS
1340LIBGNUTLS_CFLAGS
1341LIBSELINUX_LIBS
1342SETTINGS_LIBS
1343SETTINGS_CFLAGS
dcde497f
GM
1344GOBJECT_LIBS
1345GOBJECT_CFLAGS
5476a9a4
GM
1346GCONF_LIBS
1347GCONF_CFLAGS
1348GSETTINGS_LIBS
1349GSETTINGS_CFLAGS
1350DBUS_OBJ
1351DBUS_LIBS
1352DBUS_CFLAGS
1353GTK_OBJ
1354GTK_LIBS
1355GTK_CFLAGS
1356IMAGEMAGICK_LIBS
1357IMAGEMAGICK_CFLAGS
1358RSVG_LIBS
1359RSVG_CFLAGS
1360LIB_PTHREAD
1361VMLIMIT_OBJ
1362GMALLOC_OBJ
1363HAVE_XSERVER
7c61eaab
GM
1364XARGS_LIMIT
1365NTLIB
1366LIB_WSOCK32
1367LIBS_ECLIENT
1368CM_OBJ
1369NTDIR
1370FIRSTFILE_OBJ
b5eb356a 1371W32_RES_LINK
7c61eaab
GM
1372CLIENTW
1373CLIENTRES
68b8ed38 1374UPDATE_MANIFEST
7c61eaab
GM
1375EMACS_MANIFEST
1376EMACSRES
5c0255d9
GM
1377W32_LIBS
1378W32_OBJ
b5eb356a 1379WINDRES
5476a9a4
GM
1380NS_OBJC_OBJ
1381NS_OBJ
1382ns_self_contained
1383INSTALL_ARCH_INDEP_EXTRA
4efe5ef9 1384LIBS_GNUSTEP
5476a9a4
GM
1385LD_SWITCH_X_SITE_RPATH
1386XMKMF
1387DEPFLAGS
1388MKDEPDIR
1389CFLAGS_SOUND
1390ALSA_LIBS
1391ALSA_CFLAGS
1392LIBSOUND
1393PKG_CONFIG
067d23c9 1394LIB_MATH
067d23c9
KY
1395LIBS_SYSTEM
1396C_SWITCH_SYSTEM
1397UNEXEC_OBJ
1398C_SWITCH_MACHINE
1399LD_SWITCH_SYSTEM
1400CANNOT_DUMP
c65a2df9 1401DOCMISC_W32
141d074d
GM
1402INFO_OPTS
1403INFO_EXT
96f129d5 1404HAVE_MAKEINFO
9c29597b 1405PAXCTL
067d23c9
KY
1406GZIP_PROG
1407INSTALL_INFO
4c5f4270 1408LN_S_FILEONLY
a6b92a4a 1409GNULIB_WARN_CFLAGS
0eb775a3 1410WARN_CFLAGS
a6b92a4a 1411WERROR_CFLAGS
369e19fc
PE
1412RANLIB
1413ARFLAGS
1414AR
067d23c9
KY
1415EGREP
1416GREP
1417CPP
7c61eaab
GM
1418BUILDING_FOR_WINDOWSNT_FALSE
1419BUILDING_FOR_WINDOWSNT_TRUE
743c80a7
PE
1420am__fastdepCC_FALSE
1421am__fastdepCC_TRUE
1422CCDEPMODE
1423AMDEPBACKSLASH
1424AMDEP_FALSE
1425AMDEP_TRUE
1426am__quote
1427am__include
1428DEPDIR
067d23c9
KY
1429OBJEXT
1430EXEEXT
1431ac_ct_CC
1432CPPFLAGS
1433LDFLAGS
1434CFLAGS
1435CC
1436host_os
1437host_vendor
1438host_cpu
1439host
1440build_os
1441build_vendor
1442build_cpu
1443build
1444PROFILING_CFLAGS
c3a461a5 1445cache_file
743c80a7
PE
1446am__untar
1447am__tar
1448AMTAR
1449am__leading_dot
1450SET_MAKE
1451AWK
1452mkdir_p
1453MKDIR_P
1454INSTALL_STRIP_PROGRAM
1455STRIP
1456install_sh
1457MAKEINFO
1458AUTOHEADER
1459AUTOMAKE
1460AUTOCONF
1461ACLOCAL
1462VERSION
1463PACKAGE
1464CYGPATH_W
1465am__isrc
1466INSTALL_DATA
1467INSTALL_SCRIPT
1468INSTALL_PROGRAM
067d23c9
KY
1469target_alias
1470host_alias
1471build_alias
1472LIBS
1473ECHO_T
1474ECHO_N
1475ECHO_C
1476DEFS
1477mandir
1478localedir
1479libdir
1480psdir
1481pdfdir
1482dvidir
1483htmldir
1484infodir
1485docdir
1486oldincludedir
1487includedir
1488localstatedir
1489sharedstatedir
1490sysconfdir
1491datadir
1492datarootdir
1493libexecdir
1494sbindir
1495bindir
1496program_transform_name
1497prefix
1498exec_prefix
1499PACKAGE_URL
1500PACKAGE_BUGREPORT
1501PACKAGE_STRING
1502PACKAGE_VERSION
1503PACKAGE_TARNAME
1504PACKAGE_NAME
1505PATH_SEPARATOR
1506SHELL'
1507ac_subst_files='deps_frag
bb7dce39 1508lisp_frag'
067d23c9
KY
1509ac_user_opts='
1510enable_option_checking
ee77919d 1511with_all
067d23c9
KY
1512with_pop
1513with_kerberos
1514with_kerberos5
1515with_hesiod
1516with_mmdf
1517with_mail_unlink
1518with_mailhost
1519with_sound
067d23c9 1520with_x_toolkit
0442dc7f 1521with_wide_int
067d23c9
KY
1522with_xpm
1523with_jpeg
1524with_tiff
1525with_gif
1526with_png
1527with_rsvg
1528with_xml2
1529with_imagemagick
1530with_xft
1531with_libotf
1532with_m17n_flt
1533with_toolkit_scroll_bars
1534with_xaw3d
1535with_xim
1536with_ns
5c0255d9 1537with_w32
067d23c9
KY
1538with_gpm
1539with_dbus
1540with_gconf
f527bd02 1541with_gsettings
067d23c9
KY
1542with_selinux
1543with_gnutls
7a67e06b 1544with_zlib
0f55a32e 1545with_file_notification
067d23c9 1546with_makeinfo
992ec28a 1547with_compress_install
067d23c9 1548with_pkg_config_prog
4fc5868a 1549with_gameuser
067d23c9
KY
1550with_gnustep_conf
1551enable_ns_self_contained
067d23c9
KY
1552enable_locallisppath
1553enable_checking
afd07e01 1554enable_check_lisp_object_type
067d23c9
KY
1555enable_profiling
1556enable_autodepend
4efe5ef9 1557enable_gtk_deprecation_warnings
743c80a7 1558enable_dependency_tracking
067d23c9 1559enable_largefile
a6b92a4a 1560enable_gcc_warnings
e4d35030 1561enable_link_time_optimization
067d23c9 1562with_x
3a019ab4 1563enable_acl
067d23c9
KY
1564'
1565 ac_precious_vars='build_alias
1566host_alias
1567target_alias
1568CC
1569CFLAGS
1570LDFLAGS
1571LIBS
1572CPPFLAGS
1573CPP
1574XMKMF'
1575
1576
1577# Initialize some variables set by options.
1578ac_init_help=
1579ac_init_version=false
1580ac_unrecognized_opts=
1581ac_unrecognized_sep=
1582# The variables have the same names as the options, with
1583# dashes changed to underlines.
1584cache_file=/dev/null
1585exec_prefix=NONE
1586no_create=
1587no_recursion=
1588prefix=NONE
1589program_prefix=NONE
1590program_suffix=NONE
1591program_transform_name=s,x,x,
1592silent=
1593site=
1594srcdir=
1595verbose=
1596x_includes=NONE
1597x_libraries=NONE
1598
1599# Installation directory options.
1600# These are left unexpanded so users can "make install exec_prefix=/foo"
1601# and all the variables that are supposed to be based on exec_prefix
1602# by default will actually change.
1603# Use braces instead of parens because sh, perl, etc. also accept them.
1604# (The list follows the same order as the GNU Coding Standards.)
1605bindir='${exec_prefix}/bin'
1606sbindir='${exec_prefix}/sbin'
1607libexecdir='${exec_prefix}/libexec'
1608datarootdir='${prefix}/share'
1609datadir='${datarootdir}'
1610sysconfdir='${prefix}/etc'
1611sharedstatedir='${prefix}/com'
1612localstatedir='${prefix}/var'
1613includedir='${prefix}/include'
1614oldincludedir='/usr/include'
1615docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1616infodir='${datarootdir}/info'
1617htmldir='${docdir}'
1618dvidir='${docdir}'
1619pdfdir='${docdir}'
1620psdir='${docdir}'
1621libdir='${exec_prefix}/lib'
1622localedir='${datarootdir}/locale'
1623mandir='${datarootdir}/man'
1624
1625ac_prev=
1626ac_dashdash=
1627for ac_option
1628do
1629 # If the previous option needs an argument, assign it.
1630 if test -n "$ac_prev"; then
1631 eval $ac_prev=\$ac_option
1632 ac_prev=
1633 continue
1634 fi
1635
1636 case $ac_option in
a9bec17c
GM
1637 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1638 *) ac_optarg=yes ;;
067d23c9
KY
1639 esac
1640
1641 # Accept the important Cygnus configure options, so we can diagnose typos.
1642
1643 case $ac_dashdash$ac_option in
1644 --)
1645 ac_dashdash=yes ;;
1646
1647 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1648 ac_prev=bindir ;;
1649 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1650 bindir=$ac_optarg ;;
1651
1652 -build | --build | --buil | --bui | --bu)
1653 ac_prev=build_alias ;;
1654 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1655 build_alias=$ac_optarg ;;
1656
1657 -cache-file | --cache-file | --cache-fil | --cache-fi \
1658 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1659 ac_prev=cache_file ;;
1660 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1661 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1662 cache_file=$ac_optarg ;;
1663
1664 --config-cache | -C)
1665 cache_file=config.cache ;;
1666
1667 -datadir | --datadir | --datadi | --datad)
1668 ac_prev=datadir ;;
1669 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1670 datadir=$ac_optarg ;;
1671
1672 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1673 | --dataroo | --dataro | --datar)
1674 ac_prev=datarootdir ;;
1675 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1676 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1677 datarootdir=$ac_optarg ;;
1678
1679 -disable-* | --disable-*)
1680 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1681 # Reject names that are not valid shell variable names.
1682 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
a9bec17c 1683 as_fn_error "invalid feature name: $ac_useropt"
067d23c9
KY
1684 ac_useropt_orig=$ac_useropt
1685 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1686 case $ac_user_opts in
1687 *"
1688"enable_$ac_useropt"
1689"*) ;;
1690 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1691 ac_unrecognized_sep=', ';;
1692 esac
1693 eval enable_$ac_useropt=no ;;
1694
1695 -docdir | --docdir | --docdi | --doc | --do)
1696 ac_prev=docdir ;;
1697 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1698 docdir=$ac_optarg ;;
1699
1700 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1701 ac_prev=dvidir ;;
1702 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1703 dvidir=$ac_optarg ;;
1704
1705 -enable-* | --enable-*)
1706 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1707 # Reject names that are not valid shell variable names.
1708 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
a9bec17c 1709 as_fn_error "invalid feature name: $ac_useropt"
067d23c9
KY
1710 ac_useropt_orig=$ac_useropt
1711 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1712 case $ac_user_opts in
1713 *"
1714"enable_$ac_useropt"
1715"*) ;;
1716 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1717 ac_unrecognized_sep=', ';;
1718 esac
1719 eval enable_$ac_useropt=\$ac_optarg ;;
1720
1721 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1722 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1723 | --exec | --exe | --ex)
1724 ac_prev=exec_prefix ;;
1725 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1726 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1727 | --exec=* | --exe=* | --ex=*)
1728 exec_prefix=$ac_optarg ;;
1729
1730 -gas | --gas | --ga | --g)
1731 # Obsolete; use --with-gas.
1732 with_gas=yes ;;
1733
1734 -help | --help | --hel | --he | -h)
1735 ac_init_help=long ;;
1736 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1737 ac_init_help=recursive ;;
1738 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1739 ac_init_help=short ;;
1740
1741 -host | --host | --hos | --ho)
1742 ac_prev=host_alias ;;
1743 -host=* | --host=* | --hos=* | --ho=*)
1744 host_alias=$ac_optarg ;;
1745
1746 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1747 ac_prev=htmldir ;;
1748 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1749 | --ht=*)
1750 htmldir=$ac_optarg ;;
1751
1752 -includedir | --includedir | --includedi | --included | --include \
1753 | --includ | --inclu | --incl | --inc)
1754 ac_prev=includedir ;;
1755 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1756 | --includ=* | --inclu=* | --incl=* | --inc=*)
1757 includedir=$ac_optarg ;;
1758
1759 -infodir | --infodir | --infodi | --infod | --info | --inf)
1760 ac_prev=infodir ;;
1761 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1762 infodir=$ac_optarg ;;
1763
1764 -libdir | --libdir | --libdi | --libd)
1765 ac_prev=libdir ;;
1766 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1767 libdir=$ac_optarg ;;
1768
1769 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1770 | --libexe | --libex | --libe)
1771 ac_prev=libexecdir ;;
1772 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1773 | --libexe=* | --libex=* | --libe=*)
1774 libexecdir=$ac_optarg ;;
1775
1776 -localedir | --localedir | --localedi | --localed | --locale)
1777 ac_prev=localedir ;;
1778 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1779 localedir=$ac_optarg ;;
1780
1781 -localstatedir | --localstatedir | --localstatedi | --localstated \
1782 | --localstate | --localstat | --localsta | --localst | --locals)
1783 ac_prev=localstatedir ;;
1784 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1785 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1786 localstatedir=$ac_optarg ;;
1787
1788 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1789 ac_prev=mandir ;;
1790 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1791 mandir=$ac_optarg ;;
1792
1793 -nfp | --nfp | --nf)
1794 # Obsolete; use --without-fp.
1795 with_fp=no ;;
1796
1797 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1798 | --no-cr | --no-c | -n)
1799 no_create=yes ;;
1800
1801 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1802 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1803 no_recursion=yes ;;
1804
1805 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1806 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1807 | --oldin | --oldi | --old | --ol | --o)
1808 ac_prev=oldincludedir ;;
1809 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1810 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1811 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1812 oldincludedir=$ac_optarg ;;
1813
1814 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1815 ac_prev=prefix ;;
1816 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1817 prefix=$ac_optarg ;;
1818
1819 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1820 | --program-pre | --program-pr | --program-p)
1821 ac_prev=program_prefix ;;
1822 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1823 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1824 program_prefix=$ac_optarg ;;
1825
1826 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1827 | --program-suf | --program-su | --program-s)
1828 ac_prev=program_suffix ;;
1829 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1830 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1831 program_suffix=$ac_optarg ;;
1832
1833 -program-transform-name | --program-transform-name \
1834 | --program-transform-nam | --program-transform-na \
1835 | --program-transform-n | --program-transform- \
1836 | --program-transform | --program-transfor \
1837 | --program-transfo | --program-transf \
1838 | --program-trans | --program-tran \
1839 | --progr-tra | --program-tr | --program-t)
1840 ac_prev=program_transform_name ;;
1841 -program-transform-name=* | --program-transform-name=* \
1842 | --program-transform-nam=* | --program-transform-na=* \
1843 | --program-transform-n=* | --program-transform-=* \
1844 | --program-transform=* | --program-transfor=* \
1845 | --program-transfo=* | --program-transf=* \
1846 | --program-trans=* | --program-tran=* \
1847 | --progr-tra=* | --program-tr=* | --program-t=*)
1848 program_transform_name=$ac_optarg ;;
1849
1850 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1851 ac_prev=pdfdir ;;
1852 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1853 pdfdir=$ac_optarg ;;
1854
1855 -psdir | --psdir | --psdi | --psd | --ps)
1856 ac_prev=psdir ;;
1857 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1858 psdir=$ac_optarg ;;
1859
1860 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1861 | -silent | --silent | --silen | --sile | --sil)
1862 silent=yes ;;
1863
1864 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1865 ac_prev=sbindir ;;
1866 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1867 | --sbi=* | --sb=*)
1868 sbindir=$ac_optarg ;;
1869
1870 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1871 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1872 | --sharedst | --shareds | --shared | --share | --shar \
1873 | --sha | --sh)
1874 ac_prev=sharedstatedir ;;
1875 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1876 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1877 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1878 | --sha=* | --sh=*)
1879 sharedstatedir=$ac_optarg ;;
1880
1881 -site | --site | --sit)
1882 ac_prev=site ;;
1883 -site=* | --site=* | --sit=*)
1884 site=$ac_optarg ;;
1885
1886 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1887 ac_prev=srcdir ;;
1888 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1889 srcdir=$ac_optarg ;;
1890
1891 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1892 | --syscon | --sysco | --sysc | --sys | --sy)
1893 ac_prev=sysconfdir ;;
1894 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1895 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1896 sysconfdir=$ac_optarg ;;
1897
1898 -target | --target | --targe | --targ | --tar | --ta | --t)
1899 ac_prev=target_alias ;;
1900 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1901 target_alias=$ac_optarg ;;
1902
1903 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1904 verbose=yes ;;
1905
1906 -version | --version | --versio | --versi | --vers | -V)
1907 ac_init_version=: ;;
1908
1909 -with-* | --with-*)
1910 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1911 # Reject names that are not valid shell variable names.
1912 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
a9bec17c 1913 as_fn_error "invalid package name: $ac_useropt"
067d23c9
KY
1914 ac_useropt_orig=$ac_useropt
1915 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1916 case $ac_user_opts in
1917 *"
1918"with_$ac_useropt"
1919"*) ;;
1920 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1921 ac_unrecognized_sep=', ';;
1922 esac
1923 eval with_$ac_useropt=\$ac_optarg ;;
1924
1925 -without-* | --without-*)
1926 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1927 # Reject names that are not valid shell variable names.
1928 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
a9bec17c 1929 as_fn_error "invalid package name: $ac_useropt"
067d23c9
KY
1930 ac_useropt_orig=$ac_useropt
1931 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1932 case $ac_user_opts in
1933 *"
1934"with_$ac_useropt"
1935"*) ;;
1936 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1937 ac_unrecognized_sep=', ';;
1938 esac
1939 eval with_$ac_useropt=no ;;
1940
1941 --x)
1942 # Obsolete; use --with-x.
1943 with_x=yes ;;
1944
1945 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1946 | --x-incl | --x-inc | --x-in | --x-i)
1947 ac_prev=x_includes ;;
1948 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1949 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1950 x_includes=$ac_optarg ;;
1951
1952 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1953 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1954 ac_prev=x_libraries ;;
1955 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1956 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1957 x_libraries=$ac_optarg ;;
1958
a9bec17c
GM
1959 -*) as_fn_error "unrecognized option: \`$ac_option'
1960Try \`$0 --help' for more information."
067d23c9
KY
1961 ;;
1962
1963 *=*)
1964 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1965 # Reject names that are not valid shell variable names.
1966 case $ac_envvar in #(
1967 '' | [0-9]* | *[!_$as_cr_alnum]* )
a9bec17c 1968 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
067d23c9
KY
1969 esac
1970 eval $ac_envvar=\$ac_optarg
1971 export $ac_envvar ;;
1972
1973 *)
1974 # FIXME: should be removed in autoconf 3.0.
1975 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1976 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1977 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
a9bec17c 1978 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
067d23c9
KY
1979 ;;
1980
1981 esac
1982done
1983
1984if test -n "$ac_prev"; then
1985 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
a9bec17c 1986 as_fn_error "missing argument to $ac_option"
067d23c9
KY
1987fi
1988
1989if test -n "$ac_unrecognized_opts"; then
1990 case $enable_option_checking in
1991 no) ;;
a9bec17c 1992 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
067d23c9
KY
1993 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1994 esac
1995fi
1996
1997# Check all directory arguments for consistency.
1998for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1999 datadir sysconfdir sharedstatedir localstatedir includedir \
2000 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
2001 libdir localedir mandir
2002do
2003 eval ac_val=\$$ac_var
2004 # Remove trailing slashes.
2005 case $ac_val in
2006 */ )
2007 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
2008 eval $ac_var=\$ac_val;;
2009 esac
2010 # Be sure to have absolute directory names.
2011 case $ac_val in
2012 [\\/$]* | ?:[\\/]* ) continue;;
2013 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
2014 esac
a9bec17c 2015 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
067d23c9
KY
2016done
2017
2018# There might be people who depend on the old broken behavior: `$host'
2019# used to hold the argument of --host etc.
2020# FIXME: To remove some day.
2021build=$build_alias
2022host=$host_alias
2023target=$target_alias
2024
2025# FIXME: To remove some day.
2026if test "x$host_alias" != x; then
2027 if test "x$build_alias" = x; then
2028 cross_compiling=maybe
a9bec17c
GM
2029 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
2030 If a cross compiler is detected then cross compile mode will be used." >&2
067d23c9
KY
2031 elif test "x$build_alias" != "x$host_alias"; then
2032 cross_compiling=yes
2033 fi
2034fi
2035
2036ac_tool_prefix=
2037test -n "$host_alias" && ac_tool_prefix=$host_alias-
2038
2039test "$silent" = yes && exec 6>/dev/null
2040
2041
2042ac_pwd=`pwd` && test -n "$ac_pwd" &&
2043ac_ls_di=`ls -di .` &&
2044ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
a9bec17c 2045 as_fn_error "working directory cannot be determined"
067d23c9 2046test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
a9bec17c 2047 as_fn_error "pwd does not report name of working directory"
067d23c9
KY
2048
2049
2050# Find the source files, if location was not specified.
2051if test -z "$srcdir"; then
2052 ac_srcdir_defaulted=yes
2053 # Try the directory containing this script, then the parent directory.
2054 ac_confdir=`$as_dirname -- "$as_myself" ||
2055$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
2056 X"$as_myself" : 'X\(//\)[^/]' \| \
2057 X"$as_myself" : 'X\(//\)$' \| \
2058 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
2059$as_echo X"$as_myself" |
2060 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
2061 s//\1/
2062 q
2063 }
2064 /^X\(\/\/\)[^/].*/{
2065 s//\1/
2066 q
2067 }
2068 /^X\(\/\/\)$/{
2069 s//\1/
2070 q
2071 }
2072 /^X\(\/\).*/{
2073 s//\1/
2074 q
2075 }
2076 s/.*/./; q'`
2077 srcdir=$ac_confdir
2078 if test ! -r "$srcdir/$ac_unique_file"; then
2079 srcdir=..
2080 fi
2081else
2082 ac_srcdir_defaulted=no
2083fi
2084if test ! -r "$srcdir/$ac_unique_file"; then
2085 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
a9bec17c 2086 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
067d23c9
KY
2087fi
2088ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
2089ac_abs_confdir=`(
a9bec17c 2090 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
067d23c9
KY
2091 pwd)`
2092# When building in place, set srcdir=.
2093if test "$ac_abs_confdir" = "$ac_pwd"; then
2094 srcdir=.
2095fi
2096# Remove unnecessary trailing slashes from srcdir.
2097# Double slashes in file names in object file debugging info
2098# mess up M-x gdb in Emacs.
2099case $srcdir in
2100*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
2101esac
2102for ac_var in $ac_precious_vars; do
2103 eval ac_env_${ac_var}_set=\${${ac_var}+set}
2104 eval ac_env_${ac_var}_value=\$${ac_var}
2105 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
2106 eval ac_cv_env_${ac_var}_value=\$${ac_var}
2107done
2108
2109#
2110# Report the --help message.
2111#
2112if test "$ac_init_help" = "long"; then
2113 # Omit some internal or obsolete options to make the list less imposing.
2114 # This message is too long to be a string in the A/UX 3.1 sh.
2115 cat <<_ACEOF
c574bc34 2116\`configure' configures emacs 24.3.50 to adapt to many kinds of systems.
067d23c9
KY
2117
2118Usage: $0 [OPTION]... [VAR=VALUE]...
2119
2120To assign environment variables (e.g., CC, CFLAGS...), specify them as
2121VAR=VALUE. See below for descriptions of some of the useful variables.
2122
2123Defaults for the options are specified in brackets.
2124
2125Configuration:
2126 -h, --help display this help and exit
2127 --help=short display options specific to this package
2128 --help=recursive display the short help of all the included packages
2129 -V, --version display version information and exit
a9bec17c 2130 -q, --quiet, --silent do not print \`checking...' messages
067d23c9
KY
2131 --cache-file=FILE cache test results in FILE [disabled]
2132 -C, --config-cache alias for \`--cache-file=config.cache'
2133 -n, --no-create do not create output files
2134 --srcdir=DIR find the sources in DIR [configure dir or \`..']
2135
2136Installation directories:
2137 --prefix=PREFIX install architecture-independent files in PREFIX
2138 [$ac_default_prefix]
2139 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
2140 [PREFIX]
2141
2142By default, \`make install' will install all the files in
2143\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
2144an installation prefix other than \`$ac_default_prefix' using \`--prefix',
2145for instance \`--prefix=\$HOME'.
2146
2147For better control, use the options below.
2148
2149Fine tuning of the installation directories:
2150 --bindir=DIR user executables [EPREFIX/bin]
2151 --sbindir=DIR system admin executables [EPREFIX/sbin]
2152 --libexecdir=DIR program executables [EPREFIX/libexec]
2153 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
2154 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
2155 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
2156 --libdir=DIR object code libraries [EPREFIX/lib]
2157 --includedir=DIR C header files [PREFIX/include]
2158 --oldincludedir=DIR C header files for non-gcc [/usr/include]
2159 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
2160 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
2161 --infodir=DIR info documentation [DATAROOTDIR/info]
2162 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
2163 --mandir=DIR man documentation [DATAROOTDIR/man]
2164 --docdir=DIR documentation root [DATAROOTDIR/doc/emacs]
2165 --htmldir=DIR html documentation [DOCDIR]
2166 --dvidir=DIR dvi documentation [DOCDIR]
2167 --pdfdir=DIR pdf documentation [DOCDIR]
2168 --psdir=DIR ps documentation [DOCDIR]
2169_ACEOF
2170
2171 cat <<\_ACEOF
2172
2173Program names:
2174 --program-prefix=PREFIX prepend PREFIX to installed program names
2175 --program-suffix=SUFFIX append SUFFIX to installed program names
2176 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
2177
2178X features:
2179 --x-includes=DIR X include files are in DIR
2180 --x-libraries=DIR X library files are in DIR
2181
2182System types:
2183 --build=BUILD configure for building on BUILD [guessed]
2184 --host=HOST cross-compile to build programs to run on HOST [BUILD]
2185_ACEOF
2186fi
2187
2188if test -n "$ac_init_help"; then
2189 case $ac_init_help in
c574bc34 2190 short | recursive ) echo "Configuration of emacs 24.3.50:";;
067d23c9
KY
2191 esac
2192 cat <<\_ACEOF
2193
2194Optional Features:
2195 --disable-option-checking ignore unrecognized --enable/--with options
2196 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
2197 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
2198 --disable-ns-self-contained
2199 disable self contained build under NeXTstep
067d23c9
KY
2200 --enable-locallisppath=PATH
2201 directories Emacs should search for lisp files
2202 specific to this site
2203 --enable-checking[=LIST]
2204 enable expensive run-time checks. With LIST, enable
2205 only specific categories of checks. Categories are:
2206 all,yes,no. Flags are: stringbytes, stringoverrun,
7ee3791f 2207 stringfreelist, xmallocoverrun, conslist, glyphs
afd07e01
GM
2208 --enable-check-lisp-object-type
2209 enable compile time checks for the Lisp_Object data
2210 type. This is useful for development for catching
2211 certain types of bugs.
3dc00ee8
GM
2212 --enable-profiling build emacs with low-level, gprof profiling support.
2213 Mainly useful for debugging Emacs itself. May not
2214 work on all platforms. Stops profiler.el working.
067d23c9
KY
2215 --enable-autodepend automatically generate dependencies to .h-files.
2216 Requires GNU Make and Gcc. Enabled if GNU Make and
2217 Gcc is found
4efe5ef9
GM
2218 --enable-gtk-deprecation-warnings
2219 Show Gtk+/Gdk deprecation warnings for Gtk+ >= 3.0
743c80a7
PE
2220 --disable-dependency-tracking speeds up one-time build
2221 --enable-dependency-tracking do not reject slow dependency extractors
067d23c9 2222 --disable-largefile omit support for large files
ac924f35
GM
2223 --enable-gcc-warnings turn on lots of GCC warnings/errors. This is
2224 intended for developers, and may generate false
2225 alarms when used with older or non-GNU development
2226 tools.
e4d35030
GM
2227 --enable-link-time-optimization
2228 build emacs with link-time optimization. This is
2229 supported only for GCC since 4.5.0.
3a019ab4 2230 --disable-acl do not support ACLs
067d23c9
KY
2231
2232Optional Packages:
2233 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
2234 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
ee77919d
GM
2235 --without-all omit almost all features and build small executable
2236 with minimal dependencies
067d23c9
KY
2237 --without-pop don't support POP mail retrieval with movemail
2238 --with-kerberos support Kerberos-authenticated POP
2239 --with-kerberos5 support Kerberos version 5 authenticated POP
2240 --with-hesiod support Hesiod to get the POP server host
2241 --with-mmdf support MMDF mailboxes
2242 --with-mail-unlink unlink, rather than empty, mail spool after reading
2243 --with-mailhost=HOSTNAME
2244 string giving default POP mail host
dfdf7fe5
GM
2245 --with-sound=VALUE compile with sound support (VALUE one of: yes, alsa,
2246 oss, bsd-ossaudio, no; default yes). Only for
9dabd86d 2247 GNU/Linux, FreeBSD, NetBSD, MinGW.
4fa92495
GM
2248 --with-x-toolkit=KIT use an X toolkit (KIT one of: yes or gtk, gtk2,
2249 gtk3, lucid or athena, motif, no)
0442dc7f 2250 --with-wide-int prefer wide Emacs integers (typically 62-bit)
067d23c9
KY
2251 --without-xpm don't compile with XPM image support
2252 --without-jpeg don't compile with JPEG image support
2253 --without-tiff don't compile with TIFF image support
2254 --without-gif don't compile with GIF image support
2255 --without-png don't compile with PNG image support
2256 --without-rsvg don't compile with SVG image support
2257 --without-xml2 don't compile with XML parsing support
2258 --without-imagemagick don't compile with ImageMagick image support
2259 --without-xft don't use XFT for anti aliased fonts
2260 --without-libotf don't use libotf for OpenType font support
2261 --without-m17n-flt don't use m17n-flt for text shaping
2262 --without-toolkit-scroll-bars
2263 don't use Motif or Xaw3d scroll bars
2264 --without-xaw3d don't use Xaw3d
2265 --without-xim don't use X11 XIM
7834125e 2266 --with-ns use NeXTstep (Cocoa or GNUstep) windowing system
7c61eaab 2267 --with-w32 use native MS Windows GUI in a Cygwin build
067d23c9
KY
2268 --without-gpm don't use -lgpm for mouse support on a GNU/Linux
2269 console
2270 --without-dbus don't compile with D-Bus support
2271 --without-gconf don't compile with GConf support
f527bd02 2272 --without-gsettings don't compile with GSettings support
067d23c9
KY
2273 --without-selinux don't compile with SELinux support
2274 --without-gnutls don't use -lgnutls for SSL/TLS support
7a67e06b 2275 --without-zlib don't compile with zlib decompression support
0f55a32e
GM
2276 --with-file-notification=LIB
2277 use a file notification library (LIB one of: yes,
2278 gfile, inotify, w32, no)
067d23c9 2279 --without-makeinfo don't require makeinfo for building manuals
992ec28a
GM
2280 --without-compress-install
2281 don't compress some files (.el, .info, etc.) when
2282 installing. Equivalent to: make GZIP_PROG= install
b5591ebb
GM
2283 --with-pkg-config-prog=FILENAME
2284 file name of pkg-config for finding GTK and librsvg
4fc5868a 2285 --with-gameuser=USER user for shared game score files
b5591ebb
GM
2286 --with-gnustep-conf=FILENAME
2287 name of GNUstep.conf; default $GNUSTEP_CONFIG_FILE,
067d23c9
KY
2288 or /etc/GNUstep/GNUstep.conf
2289 --with-x use the X Window System
2290
2291Some influential environment variables:
2292 CC C compiler command
2293 CFLAGS C compiler flags
2294 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
2295 nonstandard directory <lib dir>
2296 LIBS libraries to pass to the linker, e.g. -l<library>
2297 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2298 you have headers in a nonstandard directory <include dir>
2299 CPP C preprocessor
2300 XMKMF Path to xmkmf, Makefile generator for X Window System
2301
2302Use these variables to override the choices made by `configure' or to help
2303it to find libraries and programs with nonstandard names/locations.
2304
2305Report bugs to the package provider.
2306_ACEOF
2307ac_status=$?
2308fi
2309
2310if test "$ac_init_help" = "recursive"; then
2311 # If there are subdirs, report their specific --help.
2312 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2313 test -d "$ac_dir" ||
2314 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2315 continue
2316 ac_builddir=.
2317
2318case "$ac_dir" in
2319.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2320*)
2321 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2322 # A ".." for each directory in $ac_dir_suffix.
2323 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2324 case $ac_top_builddir_sub in
2325 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2326 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2327 esac ;;
2328esac
2329ac_abs_top_builddir=$ac_pwd
2330ac_abs_builddir=$ac_pwd$ac_dir_suffix
2331# for backward compatibility:
2332ac_top_builddir=$ac_top_build_prefix
2333
2334case $srcdir in
2335 .) # We are building in place.
2336 ac_srcdir=.
2337 ac_top_srcdir=$ac_top_builddir_sub
2338 ac_abs_top_srcdir=$ac_pwd ;;
2339 [\\/]* | ?:[\\/]* ) # Absolute name.
2340 ac_srcdir=$srcdir$ac_dir_suffix;
2341 ac_top_srcdir=$srcdir
2342 ac_abs_top_srcdir=$srcdir ;;
2343 *) # Relative name.
2344 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2345 ac_top_srcdir=$ac_top_build_prefix$srcdir
2346 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2347esac
2348ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2349
2350 cd "$ac_dir" || { ac_status=$?; continue; }
2351 # Check for guested configure.
2352 if test -f "$ac_srcdir/configure.gnu"; then
2353 echo &&
2354 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2355 elif test -f "$ac_srcdir/configure"; then
2356 echo &&
2357 $SHELL "$ac_srcdir/configure" --help=recursive
2358 else
2359 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2360 fi || ac_status=$?
2361 cd "$ac_pwd" || { ac_status=$?; break; }
2362 done
2363fi
2364
2365test -n "$ac_init_help" && exit $ac_status
2366if $ac_init_version; then
2367 cat <<\_ACEOF
c574bc34 2368emacs configure 24.3.50
a9bec17c 2369generated by GNU Autoconf 2.65
067d23c9 2370
a9bec17c 2371Copyright (C) 2009 Free Software Foundation, Inc.
067d23c9
KY
2372This configure script is free software; the Free Software Foundation
2373gives unlimited permission to copy, distribute and modify it.
2374_ACEOF
2375 exit
2376fi
2377
2378## ------------------------ ##
2379## Autoconf initialization. ##
2380## ------------------------ ##
2381
2382# ac_fn_c_try_compile LINENO
2383# --------------------------
2384# Try to compile conftest.$ac_ext, and return whether this succeeded.
2385ac_fn_c_try_compile ()
2386{
2387 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2388 rm -f conftest.$ac_objext
2389 if { { ac_try="$ac_compile"
2390case "(($ac_try" in
2391 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2392 *) ac_try_echo=$ac_try;;
2393esac
2394eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2395$as_echo "$ac_try_echo"; } >&5
2396 (eval "$ac_compile") 2>conftest.err
2397 ac_status=$?
2398 if test -s conftest.err; then
2399 grep -v '^ *+' conftest.err >conftest.er1
2400 cat conftest.er1 >&5
2401 mv -f conftest.er1 conftest.err
2402 fi
2403 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2404 test $ac_status = 0; } && {
2405 test -z "$ac_c_werror_flag" ||
2406 test ! -s conftest.err
2407 } && test -s conftest.$ac_objext; then :
2408 ac_retval=0
2409else
2410 $as_echo "$as_me: failed program was:" >&5
2411sed 's/^/| /' conftest.$ac_ext >&5
2412
2413 ac_retval=1
2414fi
a9bec17c 2415 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
067d23c9
KY
2416 as_fn_set_status $ac_retval
2417
2418} # ac_fn_c_try_compile
2419
067d23c9
KY
2420# ac_fn_c_try_cpp LINENO
2421# ----------------------
2422# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2423ac_fn_c_try_cpp ()
2424{
2425 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2426 if { { ac_try="$ac_cpp conftest.$ac_ext"
2427case "(($ac_try" in
2428 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2429 *) ac_try_echo=$ac_try;;
2430esac
2431eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2432$as_echo "$ac_try_echo"; } >&5
2433 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2434 ac_status=$?
2435 if test -s conftest.err; then
2436 grep -v '^ *+' conftest.err >conftest.er1
2437 cat conftest.er1 >&5
2438 mv -f conftest.er1 conftest.err
2439 fi
2440 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
a9bec17c 2441 test $ac_status = 0; } >/dev/null && {
067d23c9
KY
2442 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2443 test ! -s conftest.err
2444 }; then :
2445 ac_retval=0
2446else
2447 $as_echo "$as_me: failed program was:" >&5
2448sed 's/^/| /' conftest.$ac_ext >&5
2449
2450 ac_retval=1
2451fi
a9bec17c 2452 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
067d23c9
KY
2453 as_fn_set_status $ac_retval
2454
2455} # ac_fn_c_try_cpp
2456
2457# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
2458# -------------------------------------------------------
2459# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2460# the include files in INCLUDES and setting the cache variable VAR
2461# accordingly.
2462ac_fn_c_check_header_mongrel ()
2463{
2464 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
a9bec17c 2465 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
067d23c9
KY
2466 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2467$as_echo_n "checking for $2... " >&6; }
a9bec17c 2468if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
067d23c9
KY
2469 $as_echo_n "(cached) " >&6
2470fi
2471eval ac_res=\$$3
2472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2473$as_echo "$ac_res" >&6; }
2474else
2475 # Is the header compilable?
2476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2477$as_echo_n "checking $2 usability... " >&6; }
2478cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2479/* end confdefs.h. */
2480$4
2481#include <$2>
2482_ACEOF
2483if ac_fn_c_try_compile "$LINENO"; then :
2484 ac_header_compiler=yes
2485else
2486 ac_header_compiler=no
2487fi
2488rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2489{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2490$as_echo "$ac_header_compiler" >&6; }
2491
2492# Is the header present?
2493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2494$as_echo_n "checking $2 presence... " >&6; }
2495cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2496/* end confdefs.h. */
2497#include <$2>
2498_ACEOF
2499if ac_fn_c_try_cpp "$LINENO"; then :
2500 ac_header_preproc=yes
2501else
2502 ac_header_preproc=no
2503fi
a9bec17c 2504rm -f conftest.err conftest.$ac_ext
067d23c9
KY
2505{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2506$as_echo "$ac_header_preproc" >&6; }
2507
2508# So? What about this header?
2509case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
2510 yes:no: )
2511 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2512$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2513 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2514$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2515 ;;
2516 no:yes:* )
2517 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2518$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2519 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
2520$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
2521 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2522$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2523 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
2524$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
2525 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2526$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2527 ;;
2528esac
2529 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2530$as_echo_n "checking for $2... " >&6; }
a9bec17c 2531if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
067d23c9
KY
2532 $as_echo_n "(cached) " >&6
2533else
2534 eval "$3=\$ac_header_compiler"
2535fi
2536eval ac_res=\$$3
2537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2538$as_echo "$ac_res" >&6; }
2539fi
a9bec17c 2540 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
067d23c9
KY
2541
2542} # ac_fn_c_check_header_mongrel
2543
2544# ac_fn_c_try_run LINENO
2545# ----------------------
2546# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2547# that executables *can* be run.
2548ac_fn_c_try_run ()
2549{
2550 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2551 if { { ac_try="$ac_link"
2552case "(($ac_try" in
2553 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2554 *) ac_try_echo=$ac_try;;
2555esac
2556eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2557$as_echo "$ac_try_echo"; } >&5
2558 (eval "$ac_link") 2>&5
2559 ac_status=$?
2560 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2561 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2562 { { case "(($ac_try" in
2563 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2564 *) ac_try_echo=$ac_try;;
2565esac
2566eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2567$as_echo "$ac_try_echo"; } >&5
2568 (eval "$ac_try") 2>&5
2569 ac_status=$?
2570 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2571 test $ac_status = 0; }; }; then :
2572 ac_retval=0
2573else
2574 $as_echo "$as_me: program exited with status $ac_status" >&5
2575 $as_echo "$as_me: failed program was:" >&5
2576sed 's/^/| /' conftest.$ac_ext >&5
2577
2578 ac_retval=$ac_status
2579fi
2580 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
a9bec17c 2581 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
067d23c9
KY
2582 as_fn_set_status $ac_retval
2583
2584} # ac_fn_c_try_run
2585
2586# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2587# -------------------------------------------------------
2588# Tests whether HEADER exists and can be compiled using the include files in
2589# INCLUDES, setting the cache variable VAR accordingly.
2590ac_fn_c_check_header_compile ()
2591{
2592 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2594$as_echo_n "checking for $2... " >&6; }
a9bec17c 2595if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
067d23c9
KY
2596 $as_echo_n "(cached) " >&6
2597else
2598 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2599/* end confdefs.h. */
2600$4
2601#include <$2>
2602_ACEOF
2603if ac_fn_c_try_compile "$LINENO"; then :
2604 eval "$3=yes"
2605else
2606 eval "$3=no"
2607fi
2608rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2609fi
2610eval ac_res=\$$3
2611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2612$as_echo "$ac_res" >&6; }
a9bec17c 2613 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
067d23c9
KY
2614
2615} # ac_fn_c_check_header_compile
2616
1fd182f0
PE
2617# ac_fn_c_try_link LINENO
2618# -----------------------
2619# Try to link conftest.$ac_ext, and return whether this succeeded.
2620ac_fn_c_try_link ()
2621{
2622 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2623 rm -f conftest.$ac_objext conftest$ac_exeext
2624 if { { ac_try="$ac_link"
2625case "(($ac_try" in
2626 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2627 *) ac_try_echo=$ac_try;;
2628esac
2629eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2630$as_echo "$ac_try_echo"; } >&5
2631 (eval "$ac_link") 2>conftest.err
2632 ac_status=$?
2633 if test -s conftest.err; then
2634 grep -v '^ *+' conftest.err >conftest.er1
2635 cat conftest.er1 >&5
2636 mv -f conftest.er1 conftest.err
2637 fi
2638 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2639 test $ac_status = 0; } && {
2640 test -z "$ac_c_werror_flag" ||
2641 test ! -s conftest.err
2642 } && test -s conftest$ac_exeext && {
2643 test "$cross_compiling" = yes ||
2644 $as_test_x conftest$ac_exeext
2645 }; then :
2646 ac_retval=0
2647else
2648 $as_echo "$as_me: failed program was:" >&5
2649sed 's/^/| /' conftest.$ac_ext >&5
2650
2651 ac_retval=1
2652fi
2653 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2654 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2655 # interfere with the next link command; also delete a directory that is
2656 # left behind by Apple's compiler. We do this before executing the actions.
2657 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
a9bec17c 2658 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1fd182f0
PE
2659 as_fn_set_status $ac_retval
2660
2661} # ac_fn_c_try_link
2662
42bbbe8b
GM
2663# ac_fn_c_check_decl LINENO SYMBOL VAR
2664# ------------------------------------
2665# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2666ac_fn_c_check_decl ()
2667{
2668 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5
2670$as_echo_n "checking whether $2 is declared... " >&6; }
2671if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2672 $as_echo_n "(cached) " >&6
2673else
2674 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2675/* end confdefs.h. */
2676$4
2677int
2678main ()
2679{
2680#ifndef $2
2681 (void) $2;
2682#endif
2683
2684 ;
2685 return 0;
2686}
2687_ACEOF
2688if ac_fn_c_try_compile "$LINENO"; then :
2689 eval "$3=yes"
2690else
2691 eval "$3=no"
2692fi
2693rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2694fi
2695eval ac_res=\$$3
2696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2697$as_echo "$ac_res" >&6; }
2698 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2699
2700} # ac_fn_c_check_decl
2701
5476a9a4
GM
2702# ac_fn_c_check_header_preproc LINENO HEADER VAR
2703# ----------------------------------------------
2704# Tests whether HEADER is present, setting the cache variable VAR accordingly.
2705ac_fn_c_check_header_preproc ()
067d23c9
KY
2706{
2707 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2708 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2709$as_echo_n "checking for $2... " >&6; }
a9bec17c 2710if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
067d23c9
KY
2711 $as_echo_n "(cached) " >&6
2712else
2713 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2714/* end confdefs.h. */
5476a9a4
GM
2715#include <$2>
2716_ACEOF
2717if ac_fn_c_try_cpp "$LINENO"; then :
2718 eval "$3=yes"
2719else
2720 eval "$3=no"
2721fi
2722rm -f conftest.err conftest.$ac_ext
2723fi
2724eval ac_res=\$$3
2725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2726$as_echo "$ac_res" >&6; }
2727 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
067d23c9 2728
5476a9a4 2729} # ac_fn_c_check_header_preproc
067d23c9 2730
5476a9a4
GM
2731# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2732# ----------------------------------------------------
2733# Tries to find if the field MEMBER exists in type AGGR, after including
2734# INCLUDES, setting cache variable VAR accordingly.
2735ac_fn_c_check_member ()
2736{
2737 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2739$as_echo_n "checking for $2.$3... " >&6; }
2740if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2741 $as_echo_n "(cached) " >&6
2742else
2743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2744/* end confdefs.h. */
2745$5
2746int
2747main ()
2748{
2749static $2 ac_aggr;
2750if (ac_aggr.$3)
2751return 0;
2752 ;
2753 return 0;
2754}
2755_ACEOF
2756if ac_fn_c_try_compile "$LINENO"; then :
2757 eval "$4=yes"
2758else
2759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2760/* end confdefs.h. */
2761$5
2762int
2763main ()
2764{
2765static $2 ac_aggr;
2766if (sizeof ac_aggr.$3)
2767return 0;
2768 ;
2769 return 0;
2770}
2771_ACEOF
2772if ac_fn_c_try_compile "$LINENO"; then :
2773 eval "$4=yes"
2774else
2775 eval "$4=no"
2776fi
2777rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2778fi
2779rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2780fi
2781eval ac_res=\$$4
2782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2783$as_echo "$ac_res" >&6; }
2784 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2785
2786} # ac_fn_c_check_member
2787
2788# ac_fn_c_check_func LINENO FUNC VAR
2789# ----------------------------------
2790# Tests whether FUNC exists, setting the cache variable VAR accordingly
2791ac_fn_c_check_func ()
2792{
2793 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2794 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2795$as_echo_n "checking for $2... " >&6; }
2796if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2797 $as_echo_n "(cached) " >&6
2798else
2799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2800/* end confdefs.h. */
2801/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2802 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2803#define $2 innocuous_$2
2804
2805/* System header to define __stub macros and hopefully few prototypes,
2806 which can conflict with char $2 (); below.
2807 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2808 <limits.h> exists even on freestanding compilers. */
2809
2810#ifdef __STDC__
067d23c9
KY
2811# include <limits.h>
2812#else
2813# include <assert.h>
2814#endif
2815
2816#undef $2
2817
2818/* Override any GCC internal prototype to avoid an error.
2819 Use char because int might match the return type of a GCC
2820 builtin and then its argument prototype would still apply. */
2821#ifdef __cplusplus
2822extern "C"
2823#endif
2824char $2 ();
2825/* The GNU C library defines this for functions which it implements
2826 to always fail with ENOSYS. Some functions are actually named
2827 something starting with __ and the normal name is an alias. */
2828#if defined __stub_$2 || defined __stub___$2
2829choke me
2830#endif
2831
2832int
2833main ()
2834{
2835return $2 ();
2836 ;
2837 return 0;
2838}
2839_ACEOF
2840if ac_fn_c_try_link "$LINENO"; then :
2841 eval "$3=yes"
2842else
2843 eval "$3=no"
2844fi
2845rm -f core conftest.err conftest.$ac_objext \
2846 conftest$ac_exeext conftest.$ac_ext
2847fi
2848eval ac_res=\$$3
2849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2850$as_echo "$ac_res" >&6; }
a9bec17c 2851 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
067d23c9
KY
2852
2853} # ac_fn_c_check_func
2854
5476a9a4
GM
2855# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2856# -------------------------------------------
2857# Tests whether TYPE exists after having included INCLUDES, setting cache
2858# variable VAR accordingly.
2859ac_fn_c_check_type ()
3e0be4ab
GM
2860{
2861 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
5476a9a4
GM
2862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2863$as_echo_n "checking for $2... " >&6; }
2864if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
3e0be4ab
GM
2865 $as_echo_n "(cached) " >&6
2866else
5476a9a4 2867 eval "$3=no"
3e0be4ab
GM
2868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2869/* end confdefs.h. */
5476a9a4 2870$4
3e0be4ab
GM
2871int
2872main ()
2873{
5476a9a4
GM
2874if (sizeof ($2))
2875 return 0;
3e0be4ab
GM
2876 ;
2877 return 0;
2878}
2879_ACEOF
2880if ac_fn_c_try_compile "$LINENO"; then :
2881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2882/* end confdefs.h. */
5476a9a4 2883$4
3e0be4ab
GM
2884int
2885main ()
2886{
5476a9a4
GM
2887if (sizeof (($2)))
2888 return 0;
3e0be4ab
GM
2889 ;
2890 return 0;
2891}
2892_ACEOF
2893if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4 2894
3e0be4ab 2895else
5476a9a4 2896 eval "$3=yes"
3e0be4ab
GM
2897fi
2898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2899fi
2900rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2901fi
5476a9a4 2902eval ac_res=\$$3
3e0be4ab
GM
2903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2904$as_echo "$ac_res" >&6; }
a9bec17c 2905 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
3e0be4ab 2906
5476a9a4 2907} # ac_fn_c_check_type
3e0be4ab 2908
5f90be1b
PE
2909# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2910# --------------------------------------------
2911# Tries to find the compile-time value of EXPR in a program that includes
2912# INCLUDES, setting VAR accordingly. Returns whether the value could be
2913# computed
2914ac_fn_c_compute_int ()
2915{
2916 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2917 if test "$cross_compiling" = yes; then
2918 # Depending upon the size, compute the lo and hi bounds.
2919cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2920/* end confdefs.h. */
2921$4
2922int
2923main ()
2924{
2925static int test_array [1 - 2 * !(($2) >= 0)];
2926test_array [0] = 0
2927
2928 ;
2929 return 0;
2930}
2931_ACEOF
2932if ac_fn_c_try_compile "$LINENO"; then :
2933 ac_lo=0 ac_mid=0
2934 while :; do
2935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2936/* end confdefs.h. */
2937$4
2938int
2939main ()
2940{
2941static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2942test_array [0] = 0
2943
2944 ;
2945 return 0;
2946}
2947_ACEOF
2948if ac_fn_c_try_compile "$LINENO"; then :
2949 ac_hi=$ac_mid; break
2950else
2951 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2952 if test $ac_lo -le $ac_mid; then
2953 ac_lo= ac_hi=
2954 break
2955 fi
2956 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2957fi
2958rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2959 done
2960else
2961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2962/* end confdefs.h. */
2963$4
2964int
2965main ()
2966{
2967static int test_array [1 - 2 * !(($2) < 0)];
2968test_array [0] = 0
2969
2970 ;
2971 return 0;
2972}
2973_ACEOF
2974if ac_fn_c_try_compile "$LINENO"; then :
2975 ac_hi=-1 ac_mid=-1
2976 while :; do
2977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2978/* end confdefs.h. */
2979$4
2980int
2981main ()
2982{
2983static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2984test_array [0] = 0
2985
2986 ;
2987 return 0;
2988}
2989_ACEOF
2990if ac_fn_c_try_compile "$LINENO"; then :
2991 ac_lo=$ac_mid; break
2992else
2993 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2994 if test $ac_mid -le $ac_hi; then
2995 ac_lo= ac_hi=
2996 break
2997 fi
2998 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2999fi
3000rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3001 done
3002else
3003 ac_lo= ac_hi=
3004fi
3005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3006fi
3007rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3008# Binary search between lo and hi bounds.
3009while test "x$ac_lo" != "x$ac_hi"; do
3010 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
3011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3012/* end confdefs.h. */
3013$4
3014int
3015main ()
3016{
3017static int test_array [1 - 2 * !(($2) <= $ac_mid)];
3018test_array [0] = 0
3019
3020 ;
3021 return 0;
3022}
3023_ACEOF
3024if ac_fn_c_try_compile "$LINENO"; then :
3025 ac_hi=$ac_mid
3026else
3027 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
3028fi
3029rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3030done
3031case $ac_lo in #((
3032?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
3033'') ac_retval=1 ;;
3034esac
3035 else
3036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3037/* end confdefs.h. */
3038$4
3039static long int longval () { return $2; }
3040static unsigned long int ulongval () { return $2; }
3041#include <stdio.h>
3042#include <stdlib.h>
3043int
3044main ()
3045{
3046
3047 FILE *f = fopen ("conftest.val", "w");
3048 if (! f)
3049 return 1;
3050 if (($2) < 0)
3051 {
3052 long int i = longval ();
3053 if (i != ($2))
3054 return 1;
3055 fprintf (f, "%ld", i);
3056 }
3057 else
3058 {
3059 unsigned long int i = ulongval ();
3060 if (i != ($2))
3061 return 1;
3062 fprintf (f, "%lu", i);
3063 }
3064 /* Do not output a trailing newline, as this causes \r\n confusion
3065 on some platforms. */
3066 return ferror (f) || fclose (f) != 0;
3067
3068 ;
3069 return 0;
3070}
3071_ACEOF
3072if ac_fn_c_try_run "$LINENO"; then :
3073 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
3074else
3075 ac_retval=1
3076fi
3077rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3078 conftest.$ac_objext conftest.beam conftest.$ac_ext
3079rm -f conftest.val
3080
3081 fi
a9bec17c 3082 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
5f90be1b
PE
3083 as_fn_set_status $ac_retval
3084
3085} # ac_fn_c_compute_int
067d23c9
KY
3086cat >config.log <<_ACEOF
3087This file contains any messages produced by compilers while
3088running configure, to aid debugging if configure makes a mistake.
3089
c574bc34 3090It was created by emacs $as_me 24.3.50, which was
a9bec17c 3091generated by GNU Autoconf 2.65. Invocation command line was
067d23c9
KY
3092
3093 $ $0 $@
3094
3095_ACEOF
3096exec 5>>config.log
3097{
3098cat <<_ASUNAME
3099## --------- ##
3100## Platform. ##
3101## --------- ##
3102
3103hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3104uname -m = `(uname -m) 2>/dev/null || echo unknown`
3105uname -r = `(uname -r) 2>/dev/null || echo unknown`
3106uname -s = `(uname -s) 2>/dev/null || echo unknown`
3107uname -v = `(uname -v) 2>/dev/null || echo unknown`
3108
3109/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3110/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
3111
3112/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
3113/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
3114/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3115/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
3116/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
3117/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
3118/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
3119
3120_ASUNAME
3121
3122as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3123for as_dir in $PATH
3124do
3125 IFS=$as_save_IFS
3126 test -z "$as_dir" && as_dir=.
3127 $as_echo "PATH: $as_dir"
3128 done
3129IFS=$as_save_IFS
3130
3131} >&5
3132
3133cat >&5 <<_ACEOF
3134
3135
3136## ----------- ##
3137## Core tests. ##
3138## ----------- ##
3139
3140_ACEOF
3141
3142
3143# Keep a trace of the command line.
3144# Strip out --no-create and --no-recursion so they do not pile up.
3145# Strip out --silent because we don't want to record it for future runs.
3146# Also quote any args containing shell meta-characters.
3147# Make two passes to allow for proper duplicate-argument suppression.
3148ac_configure_args=
3149ac_configure_args0=
3150ac_configure_args1=
3151ac_must_keep_next=false
3152for ac_pass in 1 2
3153do
3154 for ac_arg
3155 do
3156 case $ac_arg in
3157 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3158 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3159 | -silent | --silent | --silen | --sile | --sil)
3160 continue ;;
3161 *\'*)
3162 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3163 esac
3164 case $ac_pass in
3165 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3166 2)
3167 as_fn_append ac_configure_args1 " '$ac_arg'"
3168 if test $ac_must_keep_next = true; then
3169 ac_must_keep_next=false # Got value, back to normal.
3170 else
3171 case $ac_arg in
3172 *=* | --config-cache | -C | -disable-* | --disable-* \
3173 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3174 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3175 | -with-* | --with-* | -without-* | --without-* | --x)
3176 case "$ac_configure_args0 " in
3177 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3178 esac
3179 ;;
3180 -* ) ac_must_keep_next=true ;;
3181 esac
3182 fi
3183 as_fn_append ac_configure_args " '$ac_arg'"
3184 ;;
3185 esac
3186 done
3187done
3188{ ac_configure_args0=; unset ac_configure_args0;}
3189{ ac_configure_args1=; unset ac_configure_args1;}
3190
3191# When interrupted or exit'd, cleanup temporary files, and complete
3192# config.log. We remove comments because anyway the quotes in there
3193# would cause problems or look ugly.
3194# WARNING: Use '\'' to represent an apostrophe within the trap.
3195# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3196trap 'exit_status=$?
3197 # Save into config.log some information that might help in debugging.
3198 {
3199 echo
3200
a9bec17c
GM
3201 cat <<\_ASBOX
3202## ---------------- ##
067d23c9 3203## Cache variables. ##
a9bec17c
GM
3204## ---------------- ##
3205_ASBOX
067d23c9
KY
3206 echo
3207 # The following way of writing the cache mishandles newlines in values,
3208(
3209 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3210 eval ac_val=\$$ac_var
3211 case $ac_val in #(
3212 *${as_nl}*)
3213 case $ac_var in #(
3214 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3215$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3216 esac
3217 case $ac_var in #(
3218 _ | IFS | as_nl) ;; #(
3219 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3220 *) { eval $ac_var=; unset $ac_var;} ;;
3221 esac ;;
3222 esac
3223 done
3224 (set) 2>&1 |
3225 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3226 *${as_nl}ac_space=\ *)
3227 sed -n \
3228 "s/'\''/'\''\\\\'\'''\''/g;
3229 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3230 ;; #(
3231 *)
3232 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3233 ;;
3234 esac |
3235 sort
3236)
3237 echo
3238
a9bec17c
GM
3239 cat <<\_ASBOX
3240## ----------------- ##
067d23c9 3241## Output variables. ##
a9bec17c
GM
3242## ----------------- ##
3243_ASBOX
067d23c9
KY
3244 echo
3245 for ac_var in $ac_subst_vars
3246 do
3247 eval ac_val=\$$ac_var
3248 case $ac_val in
3249 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3250 esac
3251 $as_echo "$ac_var='\''$ac_val'\''"
3252 done | sort
3253 echo
3254
3255 if test -n "$ac_subst_files"; then
a9bec17c
GM
3256 cat <<\_ASBOX
3257## ------------------- ##
067d23c9 3258## File substitutions. ##
a9bec17c
GM
3259## ------------------- ##
3260_ASBOX
067d23c9
KY
3261 echo
3262 for ac_var in $ac_subst_files
3263 do
3264 eval ac_val=\$$ac_var
3265 case $ac_val in
3266 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3267 esac
3268 $as_echo "$ac_var='\''$ac_val'\''"
3269 done | sort
3270 echo
3271 fi
3272
3273 if test -s confdefs.h; then
a9bec17c
GM
3274 cat <<\_ASBOX
3275## ----------- ##
067d23c9 3276## confdefs.h. ##
a9bec17c
GM
3277## ----------- ##
3278_ASBOX
067d23c9
KY
3279 echo
3280 cat confdefs.h
3281 echo
3282 fi
3283 test "$ac_signal" != 0 &&
3284 $as_echo "$as_me: caught signal $ac_signal"
3285 $as_echo "$as_me: exit $exit_status"
3286 } >&5
3287 rm -f core *.core core.conftest.* &&
3288 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3289 exit $exit_status
3290' 0
3291for ac_signal in 1 2 13 15; do
3292 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3293done
3294ac_signal=0
3295
3296# confdefs.h avoids OS command line length limits that DEFS can exceed.
3297rm -f -r conftest* confdefs.h
3298
3299$as_echo "/* confdefs.h */" > confdefs.h
3300
3301# Predefined preprocessor variables.
3302
3303cat >>confdefs.h <<_ACEOF
3304#define PACKAGE_NAME "$PACKAGE_NAME"
3305_ACEOF
3306
3307cat >>confdefs.h <<_ACEOF
3308#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3309_ACEOF
3310
3311cat >>confdefs.h <<_ACEOF
3312#define PACKAGE_VERSION "$PACKAGE_VERSION"
3313_ACEOF
3314
3315cat >>confdefs.h <<_ACEOF
3316#define PACKAGE_STRING "$PACKAGE_STRING"
3317_ACEOF
3318
3319cat >>confdefs.h <<_ACEOF
3320#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3321_ACEOF
3322
3323cat >>confdefs.h <<_ACEOF
3324#define PACKAGE_URL "$PACKAGE_URL"
3325_ACEOF
3326
3327
3328# Let the site file select an alternate cache file if it wants to.
3329# Prefer an explicitly selected file to automatically selected ones.
3330ac_site_file1=NONE
3331ac_site_file2=NONE
3332if test -n "$CONFIG_SITE"; then
a9bec17c 3333 ac_site_file1=$CONFIG_SITE
067d23c9
KY
3334elif test "x$prefix" != xNONE; then
3335 ac_site_file1=$prefix/share/config.site
3336 ac_site_file2=$prefix/etc/config.site
3337else
3338 ac_site_file1=$ac_default_prefix/share/config.site
3339 ac_site_file2=$ac_default_prefix/etc/config.site
3340fi
3341for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3342do
3343 test "x$ac_site_file" = xNONE && continue
3344 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3345 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3346$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3347 sed 's/^/| /' "$ac_site_file" >&5
a9bec17c 3348 . "$ac_site_file"
067d23c9
KY
3349 fi
3350done
3351
3352if test -r "$cache_file"; then
3353 # Some versions of bash will fail to source /dev/null (special files
3354 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
3355 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3356 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3357$as_echo "$as_me: loading cache $cache_file" >&6;}
3358 case $cache_file in
3359 [\\/]* | ?:[\\/]* ) . "$cache_file";;
3360 *) . "./$cache_file";;
3361 esac
3362 fi
3363else
3364 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3365$as_echo "$as_me: creating cache $cache_file" >&6;}
3366 >$cache_file
3367fi
3368
5476a9a4 3369as_fn_append ac_header_list " sys/systeminfo.h"
5476a9a4
GM
3370as_fn_append ac_header_list " coff.h"
3371as_fn_append ac_header_list " pty.h"
5476a9a4
GM
3372as_fn_append ac_header_list " sys/resource.h"
3373as_fn_append ac_header_list " sys/utsname.h"
3374as_fn_append ac_header_list " pwd.h"
3375as_fn_append ac_header_list " utmp.h"
5476a9a4
GM
3376as_fn_append ac_header_list " util.h"
3377as_fn_append ac_header_list " sys/socket.h"
3378as_fn_append ac_header_list " stdlib.h"
3379as_fn_append ac_header_list " unistd.h"
7e723570 3380as_fn_append ac_header_list " sys/param.h"
5476a9a4
GM
3381as_fn_append ac_header_list " pthread.h"
3382as_fn_append ac_header_list " malloc/malloc.h"
3383as_fn_append ac_header_list " maillock.h"
3384as_fn_append ac_header_list " sys/un.h"
3385as_fn_append ac_func_list " tzset"
3386as_fn_append ac_func_list " readlinkat"
d7ad186c 3387as_fn_append ac_header_list " dirent.h"
8966cbff 3388as_fn_append ac_header_list " execinfo.h"
710f5812 3389as_fn_append ac_func_list " faccessat"
0cdca42a 3390as_fn_append ac_func_list " fcntl"
d7ad186c 3391as_fn_append ac_func_list " fdopendir"
eda33f78 3392as_fn_append ac_header_list " stdio_ext.h"
d7ad186c 3393as_fn_append ac_func_list " fstatat"
2407788f 3394as_fn_append ac_func_list " fsync"
f199cab1
GM
3395gl_getopt_required=GNU
3396as_fn_append ac_header_list " getopt.h"
3397as_fn_append ac_func_list " gettimeofday"
3398as_fn_append ac_func_list " nanotime"
e700232f 3399as_fn_append ac_header_list " sys/time.h"
f199cab1
GM
3400as_fn_append ac_header_list " wchar.h"
3401as_fn_append ac_header_list " stdint.h"
3402as_fn_append ac_header_list " inttypes.h"
3403as_fn_append ac_func_list " lstat"
e412eb97 3404as_fn_append ac_func_list " mkostemp"
0cdca42a 3405as_fn_append ac_func_list " pipe2"
f199cab1
GM
3406as_fn_append ac_header_list " sys/select.h"
3407as_fn_append ac_func_list " pselect"
3408as_fn_append ac_func_list " pthread_sigmask"
3409as_fn_append ac_func_list " readlink"
f199cab1
GM
3410as_fn_append ac_func_list " strtoimax"
3411as_fn_append ac_func_list " strtoumax"
3412as_fn_append ac_func_list " symlink"
3413as_fn_append ac_header_list " sys/stat.h"
3414as_fn_append ac_func_list " localtime_r"
e700232f 3415as_fn_append ac_header_list " utime.h"
f199cab1
GM
3416as_fn_append ac_func_list " futimes"
3417as_fn_append ac_func_list " futimesat"
3418as_fn_append ac_func_list " futimens"
3419as_fn_append ac_func_list " utimensat"
3420as_fn_append ac_func_list " lutimes"
0cdca42a 3421as_fn_append ac_func_list " getdtablesize"
e412eb97 3422as_fn_append ac_func_list " secure_getenv"
067d23c9
KY
3423# Check that the precious variables saved in the cache have kept the same
3424# value.
3425ac_cache_corrupted=false
3426for ac_var in $ac_precious_vars; do
3427 eval ac_old_set=\$ac_cv_env_${ac_var}_set
3428 eval ac_new_set=\$ac_env_${ac_var}_set
3429 eval ac_old_val=\$ac_cv_env_${ac_var}_value
3430 eval ac_new_val=\$ac_env_${ac_var}_value
3431 case $ac_old_set,$ac_new_set in
3432 set,)
3433 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3434$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3435 ac_cache_corrupted=: ;;
3436 ,set)
3437 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3438$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3439 ac_cache_corrupted=: ;;
3440 ,);;
3441 *)
3442 if test "x$ac_old_val" != "x$ac_new_val"; then
3443 # differences in whitespace do not lead to failure.
3444 ac_old_val_w=`echo x $ac_old_val`
3445 ac_new_val_w=`echo x $ac_new_val`
3446 if test "$ac_old_val_w" != "$ac_new_val_w"; then
3447 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3448$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3449 ac_cache_corrupted=:
3450 else
3451 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3452$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3453 eval $ac_var=\$ac_old_val
3454 fi
3455 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
3456$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
3457 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
3458$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
3459 fi;;
3460 esac
3461 # Pass precious variables to config.status.
3462 if test "$ac_new_set" = set; then
3463 case $ac_new_val in
3464 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3465 *) ac_arg=$ac_var=$ac_new_val ;;
3466 esac
3467 case " $ac_configure_args " in
3468 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
3469 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3470 esac
3471 fi
3472done
3473if $ac_cache_corrupted; then
3474 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3475$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3476 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3477$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
a9bec17c 3478 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
067d23c9
KY
3479fi
3480## -------------------- ##
3481## Main body of script. ##
3482## -------------------- ##
3483
3484ac_ext=c
3485ac_cpp='$CPP $CPPFLAGS'
3486ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3487ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3488ac_compiler_gnu=$ac_cv_c_compiler_gnu
3489
3490
2f559cd2 3491
1df7c7ca
GM
3492emacs_config_options=
3493optsep=
3494for opt in ${1+"$@"} CFLAGS CPPFLAGS LDFLAGS; do
3495 case $opt in
3496 -n | --no-create | --no-recursion)
3497 continue ;;
3498 CFLAGS | CPPFLAGS | LDFLAGS)
3499 eval 'test "${'$opt'+set}" = set' || continue
3500 case " $*" in
3501 *" $opt="*) continue ;;
3502 esac
3503 eval opt=$opt=\$$opt ;;
3504 esac
3505
3506 emacs_shell_specials=$IFS\''"#$&()*;<>?[\\`{|~'
3507 case $opt in
3508 *["$emacs_shell_specials"]*)
3509 case $opt in
3510 *\'*)
3511 emacs_quote_apostrophes="s/'/'\\\\''/g"
3512 opt=`$as_echo "$opt" | sed "$emacs_quote_apostrophes"` ;;
3513 esac
3514 opt="'$opt'"
3515 case $opt in
3516 *['"\\']*)
3517 emacs_quote_for_c='s/["\\]/\\&/g; $!s/$/\\n\\/'
3518 opt=`$as_echo "$opt" | sed "$emacs_quote_for_c"` ;;
3519 esac ;;
3520 esac
3521 as_fn_append emacs_config_options "$optsep$opt"
3522 optsep=' '
2f559cd2
GM
3523done
3524
067d23c9
KY
3525ac_config_headers="$ac_config_headers src/config.h:src/config.in"
3526
3527
743c80a7 3528ac_aux_dir=
369e19fc 3529for ac_dir in build-aux "$srcdir"/build-aux; do
a9bec17c
GM
3530 for ac_t in install-sh install.sh shtool; do
3531 if test -f "$ac_dir/$ac_t"; then
3532 ac_aux_dir=$ac_dir
3533 ac_install_sh="$ac_aux_dir/$ac_t -c"
3534 break 2
3535 fi
3536 done
743c80a7
PE
3537done
3538if test -z "$ac_aux_dir"; then
a9bec17c 3539 as_fn_error "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
743c80a7 3540fi
067d23c9 3541
743c80a7
PE
3542# These three variables are undocumented and unsupported,
3543# and are intended to be withdrawn in a future Autoconf release.
3544# They can cause serious problems if a builder's source tree is in a directory
3545# whose full name contains unusual characters.
3546ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
3547ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
3548ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
067d23c9 3549
067d23c9 3550
369e19fc
PE
3551am__api_version='1.11'
3552
743c80a7
PE
3553# Find a good install program. We prefer a C program (faster),
3554# so one script is as good as another. But avoid the broken or
3555# incompatible versions:
3556# SysV /etc/install, /usr/sbin/install
3557# SunOS /usr/etc/install
3558# IRIX /sbin/install
3559# AIX /bin/install
3560# AmigaOS /C/install, which installs bootblocks on floppy discs
3561# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3562# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3563# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3564# OS/2's system install, which has a completely different semantic
3565# ./install, which can be erroneously created by make from ./install.sh.
3566# Reject install programs that cannot install multiple files.
3567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
3568$as_echo_n "checking for a BSD-compatible install... " >&6; }
3569if test -z "$INSTALL"; then
a9bec17c 3570if test "${ac_cv_path_install+set}" = set; then :
743c80a7
PE
3571 $as_echo_n "(cached) " >&6
3572else
3573 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3574for as_dir in $PATH
3575do
3576 IFS=$as_save_IFS
3577 test -z "$as_dir" && as_dir=.
3578 # Account for people who put trailing slashes in PATH elements.
3579case $as_dir/ in #((
3580 ./ | .// | /[cC]/* | \
3581 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3582 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
3583 /usr/ucb/* ) ;;
3584 *)
3585 # OSF1 and SCO ODT 3.0 have their own names for install.
3586 # Don't use installbsd from OSF since it installs stuff as root
3587 # by default.
3588 for ac_prog in ginstall scoinst install; do
3589 for ac_exec_ext in '' $ac_executable_extensions; do
3590 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
3591 if test $ac_prog = install &&
3592 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3593 # AIX install. It has an incompatible calling convention.
3594 :
3595 elif test $ac_prog = install &&
3596 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3597 # program-specific install script used by HP pwplus--don't use.
3598 :
3599 else
3600 rm -rf conftest.one conftest.two conftest.dir
3601 echo one > conftest.one
3602 echo two > conftest.two
3603 mkdir conftest.dir
3604 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
3605 test -s conftest.one && test -s conftest.two &&
3606 test -s conftest.dir/conftest.one &&
3607 test -s conftest.dir/conftest.two
3608 then
3609 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3610 break 3
3611 fi
3612 fi
3613 fi
3614 done
3615 done
3616 ;;
3617esac
067d23c9 3618
743c80a7
PE
3619 done
3620IFS=$as_save_IFS
067d23c9 3621
743c80a7 3622rm -rf conftest.one conftest.two conftest.dir
067d23c9 3623
067d23c9 3624fi
743c80a7
PE
3625 if test "${ac_cv_path_install+set}" = set; then
3626 INSTALL=$ac_cv_path_install
3627 else
3628 # As a last resort, use the slow shell script. Don't cache a
3629 # value for INSTALL within a source directory, because that will
3630 # break other packages using the cache if that directory is
3631 # removed, or if the value is a relative name.
3632 INSTALL=$ac_install_sh
3633 fi
067d23c9 3634fi
743c80a7
PE
3635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
3636$as_echo "$INSTALL" >&6; }
067d23c9 3637
743c80a7
PE
3638# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3639# It thinks the first close brace ends the variable substitution.
3640test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
067d23c9 3641
743c80a7 3642test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
067d23c9 3643
743c80a7 3644test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
067d23c9 3645
743c80a7
PE
3646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
3647$as_echo_n "checking whether build environment is sane... " >&6; }
3648# Just in case
3649sleep 1
3650echo timestamp > conftest.file
3651# Reject unsafe characters in $srcdir or the absolute working directory
3652# name. Accept space and tab only in the latter.
3653am_lf='
3654'
3655case `pwd` in
3656 *[\\\"\#\$\&\'\`$am_lf]*)
a9bec17c 3657 as_fn_error "unsafe absolute working directory name" "$LINENO" 5;;
743c80a7
PE
3658esac
3659case $srcdir in
3660 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
a9bec17c 3661 as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
743c80a7 3662esac
067d23c9 3663
743c80a7
PE
3664# Do `set' in a subshell so we don't clobber the current shell's
3665# arguments. Must try -L first in case configure is actually a
3666# symlink; some systems play weird games with the mod time of symlinks
3667# (eg FreeBSD returns the mod time of the symlink's containing
3668# directory).
3669if (
3670 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
3671 if test "$*" = "X"; then
3672 # -L didn't work.
3673 set X `ls -t "$srcdir/configure" conftest.file`
3674 fi
3675 rm -f conftest.file
3676 if test "$*" != "X $srcdir/configure conftest.file" \
3677 && test "$*" != "X conftest.file $srcdir/configure"; then
3678
3679 # If neither matched, then we have a broken ls. This can happen
3680 # if, for instance, CONFIG_SHELL is bash and it inherits a
3681 # broken ls alias from the environment. This has actually
3682 # happened. Such a system could not be considered "sane".
a9bec17c 3683 as_fn_error "ls -t appears to fail. Make sure there is not a broken
743c80a7
PE
3684alias in your environment" "$LINENO" 5
3685 fi
067d23c9 3686
743c80a7
PE
3687 test "$2" = conftest.file
3688 )
3689then
3690 # Ok.
3691 :
067d23c9 3692else
a9bec17c 3693 as_fn_error "newly created file is older than distributed files!
743c80a7 3694Check your system clock" "$LINENO" 5
067d23c9 3695fi
743c80a7
PE
3696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3697$as_echo "yes" >&6; }
3698test "$program_prefix" != NONE &&
3699 program_transform_name="s&^&$program_prefix&;$program_transform_name"
3700# Use a double $ so make ignores it.
3701test "$program_suffix" != NONE &&
3702 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
3703# Double any \ or $.
3704# By default was `s,x,x', remove it if useless.
3705ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
3706program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
067d23c9 3707
743c80a7
PE
3708# expand $ac_aux_dir to an absolute path
3709am_aux_dir=`cd $ac_aux_dir && pwd`
067d23c9 3710
743c80a7
PE
3711if test x"${MISSING+set}" != xset; then
3712 case $am_aux_dir in
3713 *\ * | *\ *)
3714 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
3715 *)
3716 MISSING="\${SHELL} $am_aux_dir/missing" ;;
3717 esac
067d23c9 3718fi
743c80a7
PE
3719# Use eval to expand $SHELL
3720if eval "$MISSING --run true"; then
3721 am_missing_run="$MISSING --run "
067d23c9 3722else
743c80a7
PE
3723 am_missing_run=
3724 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
3725$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
067d23c9
KY
3726fi
3727
743c80a7
PE
3728if test x"${install_sh}" != xset; then
3729 case $am_aux_dir in
3730 *\ * | *\ *)
3731 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
3732 *)
3733 install_sh="\${SHELL} $am_aux_dir/install-sh"
3734 esac
067d23c9
KY
3735fi
3736
743c80a7
PE
3737# Installed binaries are usually stripped using `strip' when the user
3738# run `make install-strip'. However `strip' might not be the right
3739# tool to use in cross-compilation environments, therefore Automake
3740# will honor the `STRIP' environment variable to overrule this program.
3741if test "$cross_compiling" != no; then
3742 if test -n "$ac_tool_prefix"; then
3743 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
3744set dummy ${ac_tool_prefix}strip; ac_word=$2
3745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3746$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 3747if test "${ac_cv_prog_STRIP+set}" = set; then :
743c80a7 3748 $as_echo_n "(cached) " >&6
067d23c9 3749else
743c80a7
PE
3750 if test -n "$STRIP"; then
3751 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
3752else
3753as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3754for as_dir in $PATH
3755do
3756 IFS=$as_save_IFS
3757 test -z "$as_dir" && as_dir=.
3758 for ac_exec_ext in '' $ac_executable_extensions; do
3759 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3760 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
3761 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3762 break 2
3763 fi
3764done
3765 done
3766IFS=$as_save_IFS
067d23c9
KY
3767
3768fi
067d23c9 3769fi
743c80a7
PE
3770STRIP=$ac_cv_prog_STRIP
3771if test -n "$STRIP"; then
3772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
3773$as_echo "$STRIP" >&6; }
3774else
3775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3776$as_echo "no" >&6; }
067d23c9
KY
3777fi
3778
3779
067d23c9 3780fi
743c80a7
PE
3781if test -z "$ac_cv_prog_STRIP"; then
3782 ac_ct_STRIP=$STRIP
3783 # Extract the first word of "strip", so it can be a program name with args.
3784set dummy strip; ac_word=$2
3785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3786$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 3787if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
743c80a7
PE
3788 $as_echo_n "(cached) " >&6
3789else
3790 if test -n "$ac_ct_STRIP"; then
3791 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
3792else
3793as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3794for as_dir in $PATH
3795do
3796 IFS=$as_save_IFS
3797 test -z "$as_dir" && as_dir=.
3798 for ac_exec_ext in '' $ac_executable_extensions; do
3799 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3800 ac_cv_prog_ac_ct_STRIP="strip"
3801 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3802 break 2
3803 fi
3804done
3805 done
3806IFS=$as_save_IFS
3807
3808fi
3809fi
3810ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
3811if test -n "$ac_ct_STRIP"; then
3812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
3813$as_echo "$ac_ct_STRIP" >&6; }
3814else
3815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3816$as_echo "no" >&6; }
3817fi
3818
3819 if test "x$ac_ct_STRIP" = x; then
3820 STRIP=":"
3821 else
3822 case $cross_compiling:$ac_tool_warned in
3823yes:)
3824{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3825$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3826ac_tool_warned=yes ;;
3827esac
3828 STRIP=$ac_ct_STRIP
3829 fi
3830else
3831 STRIP="$ac_cv_prog_STRIP"
3832fi
3833
3834fi
3835INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
3836
3837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
3838$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
3839if test -z "$MKDIR_P"; then
a9bec17c 3840 if test "${ac_cv_path_mkdir+set}" = set; then :
743c80a7
PE
3841 $as_echo_n "(cached) " >&6
3842else
3843 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3844for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
3845do
3846 IFS=$as_save_IFS
3847 test -z "$as_dir" && as_dir=.
3848 for ac_prog in mkdir gmkdir; do
3849 for ac_exec_ext in '' $ac_executable_extensions; do
3850 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
3851 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
3852 'mkdir (GNU coreutils) '* | \
3853 'mkdir (coreutils) '* | \
3854 'mkdir (fileutils) '4.1*)
3855 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
3856 break 3;;
3857 esac
3858 done
3859 done
3860 done
3861IFS=$as_save_IFS
3862
3863fi
3864
3865 test -d ./--version && rmdir ./--version
3866 if test "${ac_cv_path_mkdir+set}" = set; then
3867 MKDIR_P="$ac_cv_path_mkdir -p"
3868 else
3869 # As a last resort, use the slow shell script. Don't cache a
3870 # value for MKDIR_P within a source directory, because that will
3871 # break other packages using the cache if that directory is
3872 # removed, or if the value is a relative name.
3873 MKDIR_P="$ac_install_sh -d"
3874 fi
3875fi
3876{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
3877$as_echo "$MKDIR_P" >&6; }
3878
3879mkdir_p="$MKDIR_P"
3880case $mkdir_p in
3881 [\\/$]* | ?:[\\/]*) ;;
3882 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
3883esac
3884
3885for ac_prog in gawk mawk nawk awk
3886do
3887 # Extract the first word of "$ac_prog", so it can be a program name with args.
3888set dummy $ac_prog; ac_word=$2
3889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3890$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 3891if test "${ac_cv_prog_AWK+set}" = set; then :
743c80a7
PE
3892 $as_echo_n "(cached) " >&6
3893else
3894 if test -n "$AWK"; then
3895 ac_cv_prog_AWK="$AWK" # Let the user override the test.
3896else
3897as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3898for as_dir in $PATH
3899do
3900 IFS=$as_save_IFS
3901 test -z "$as_dir" && as_dir=.
3902 for ac_exec_ext in '' $ac_executable_extensions; do
3903 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3904 ac_cv_prog_AWK="$ac_prog"
3905 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3906 break 2
3907 fi
3908done
3909 done
3910IFS=$as_save_IFS
3911
3912fi
3913fi
3914AWK=$ac_cv_prog_AWK
3915if test -n "$AWK"; then
3916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
3917$as_echo "$AWK" >&6; }
3918else
3919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3920$as_echo "no" >&6; }
3921fi
3922
3923
3924 test -n "$AWK" && break
3925done
3926
3927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3928$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
3929set x ${MAKE-make}
3930ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
a9bec17c 3931if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
743c80a7
PE
3932 $as_echo_n "(cached) " >&6
3933else
3934 cat >conftest.make <<\_ACEOF
3935SHELL = /bin/sh
3936all:
3937 @echo '@@@%%%=$(MAKE)=@@@%%%'
3938_ACEOF
a9bec17c 3939# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
743c80a7
PE
3940case `${MAKE-make} -f conftest.make 2>/dev/null` in
3941 *@@@%%%=?*=@@@%%%*)
3942 eval ac_cv_prog_make_${ac_make}_set=yes;;
3943 *)
3944 eval ac_cv_prog_make_${ac_make}_set=no;;
3945esac
3946rm -f conftest.make
3947fi
3948if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3950$as_echo "yes" >&6; }
3951 SET_MAKE=
3952else
3953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3954$as_echo "no" >&6; }
3955 SET_MAKE="MAKE=${MAKE-make}"
3956fi
3957
3958rm -rf .tst 2>/dev/null
3959mkdir .tst 2>/dev/null
3960if test -d .tst; then
3961 am__leading_dot=.
3962else
3963 am__leading_dot=_
3964fi
3965rmdir .tst 2>/dev/null
3966
3967if test "`cd $srcdir && pwd`" != "`pwd`"; then
3968 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
3969 # is not polluted with repeated "-I."
3970 am__isrc=' -I$(srcdir)'
3971 # test to see if srcdir already configured
3972 if test -f $srcdir/config.status; then
a9bec17c 3973 as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
743c80a7
PE
3974 fi
3975fi
3976
3977# test whether we have cygpath
3978if test -z "$CYGPATH_W"; then
3979 if (cygpath --version) >/dev/null 2>/dev/null; then
3980 CYGPATH_W='cygpath -w'
3981 else
3982 CYGPATH_W=echo
3983 fi
3984fi
3985
3986
3987# Define the identity of the package.
3988 PACKAGE='emacs'
c574bc34 3989 VERSION='24.3.50'
743c80a7
PE
3990
3991
3992cat >>confdefs.h <<_ACEOF
3993#define PACKAGE "$PACKAGE"
3994_ACEOF
3995
3996
3997cat >>confdefs.h <<_ACEOF
3998#define VERSION "$VERSION"
3999_ACEOF
4000
4001# Some tools Automake needs.
4002
4003ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
4004
4005
4006AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
4007
4008
4009AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
4010
4011
4012AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
4013
4014
4015MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
4016
4017# We need awk for the "check" target. The system "awk" is bad on
4018# some platforms.
4019# Always define AMTAR for backward compatibility.
4020
4021AMTAR=${AMTAR-"${am_missing_run}tar"}
4022
4023am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
4024
4025
4026
4027
4028
4029
4030
4031
4032lispdir='${datadir}/emacs/${version}/lisp'
e1939eb1 4033leimdir='${datadir}/emacs/${version}/leim'
397f7161 4034standardlisppath='${lispdir}:${leimdir}'
743c80a7
PE
4035locallisppath='${datadir}/emacs/${version}/site-lisp:'\
4036'${datadir}/emacs/site-lisp'
397f7161 4037lisppath='${locallisppath}:${standardlisppath}'
743c80a7
PE
4038etcdir='${datadir}/emacs/${version}/etc'
4039archlibdir='${libexecdir}/emacs/${version}/${configuration}'
7a67e06b 4040etcdocdir='${datadir}/emacs/${version}/etc'
743c80a7
PE
4041gamedir='${localstatedir}/games/emacs'
4042
ee77919d
GM
4043
4044# Check whether --with-all was given.
4045if test "${with_all+set}" = set; then :
4046 withval=$with_all; with_features=$withval
c0528ebe 4047else
ee77919d 4048 with_features=yes
c0528ebe
GM
4049fi
4050
4051
743c80a7
PE
4052
4053
4054
4055# Check whether --with-pop was given.
4056if test "${with_pop+set}" = set; then :
4057 withval=$with_pop;
4058else
ee77919d 4059 with_pop=$with_features
743c80a7
PE
4060fi
4061
4062if test "$with_pop" = yes; then
4063 $as_echo "#define MAIL_USE_POP 1" >>confdefs.h
4064
4065fi
4066
4067
4068# Check whether --with-kerberos was given.
4069if test "${with_kerberos+set}" = set; then :
4070 withval=$with_kerberos;
4071else
4072 with_kerberos=no
4073fi
4074
4075if test "$with_kerberos" != no; then
4076 $as_echo "#define KERBEROS 1" >>confdefs.h
4077
4078fi
4079
4080
4081# Check whether --with-kerberos5 was given.
4082if test "${with_kerberos5+set}" = set; then :
4083 withval=$with_kerberos5;
4084else
4085 with_kerberos5=no
4086fi
4087
4088if test "${with_kerberos5}" != no; then
4089 if test "${with_kerberos}" = no; then
4090 with_kerberos=yes
4091 $as_echo "#define KERBEROS 1" >>confdefs.h
4092
4093 fi
4094
4095$as_echo "#define KERBEROS5 1" >>confdefs.h
4096
4097fi
4098
4099
4100# Check whether --with-hesiod was given.
4101if test "${with_hesiod+set}" = set; then :
4102 withval=$with_hesiod;
4103else
4104 with_hesiod=no
4105fi
4106
4107if test "$with_hesiod" != no; then
4108
4109$as_echo "#define HESIOD 1" >>confdefs.h
4110
4111fi
4112
4113
4114# Check whether --with-mmdf was given.
4115if test "${with_mmdf+set}" = set; then :
4116 withval=$with_mmdf;
4117else
4118 with_mmdf=no
4119fi
4120
4121if test "$with_mmdf" != no; then
4122
4123$as_echo "#define MAIL_USE_MMDF 1" >>confdefs.h
4124
4125fi
4126
4127
4128# Check whether --with-mail-unlink was given.
4129if test "${with_mail_unlink+set}" = set; then :
4130 withval=$with_mail_unlink;
4131else
4132 with_mail_unlink=no
4133fi
4134
4135if test "$with_mail_unlink" != no; then
4136
4137$as_echo "#define MAIL_UNLINK_SPOOL 1" >>confdefs.h
4138
4139fi
4140
4141
4142# Check whether --with-mailhost was given.
4143if test "${with_mailhost+set}" = set; then :
4144 withval=$with_mailhost;
4145cat >>confdefs.h <<_ACEOF
4146#define MAILHOST "$withval"
4147_ACEOF
4148
4149fi
4150
4151
4152
067d23c9
KY
4153# Check whether --with-sound was given.
4154if test "${with_sound+set}" = set; then :
9dabd86d 4155 withval=$with_sound; case "${withval}" in
dfdf7fe5 4156 yes|no|alsa|oss|bsd-ossaudio) val=$withval ;;
9dabd86d 4157 *) as_fn_error "\`--with-sound=$withval' is invalid;
dfdf7fe5 4158this option's value should be \`yes', \`no', \`alsa', \`oss', or \`bsd-ossaudio'." "$LINENO" 5
9dabd86d
GM
4159 ;;
4160 esac
4161 with_sound=$val
4162
067d23c9 4163else
9dabd86d 4164 with_sound=$with_features
067d23c9
KY
4165fi
4166
4167
4168
067d23c9
KY
4169# Check whether --with-x-toolkit was given.
4170if test "${with_x_toolkit+set}" = set; then :
4171 withval=$with_x_toolkit; case "${withval}" in
4172 y | ye | yes ) val=gtk ;;
4173 n | no ) val=no ;;
4174 l | lu | luc | luci | lucid ) val=lucid ;;
4175 a | at | ath | athe | athen | athena ) val=athena ;;
4176 m | mo | mot | moti | motif ) val=motif ;;
4177 g | gt | gtk ) val=gtk ;;
4fa92495 4178 gtk2 ) val=gtk2 ;;
067d23c9
KY
4179 gtk3 ) val=gtk3 ;;
4180 * )
a9bec17c 4181as_fn_error "\`--with-x-toolkit=$withval' is invalid;
4fa92495
GM
4182this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif', \`gtk',
4183\`gtk2' or \`gtk3'. \`yes' and \`gtk' are synonyms.
4184\`athena' and \`lucid' are synonyms." "$LINENO" 5
067d23c9
KY
4185 ;;
4186 esac
4187 with_x_toolkit=$val
4188
4189fi
4190
4191
4192
0442dc7f
GM
4193# Check whether --with-wide-int was given.
4194if test "${with_wide_int+set}" = set; then :
4195 withval=$with_wide_int;
4196else
4197 with_wide_int=no
4198fi
4199
4200if test "$with_wide_int" = yes; then
4201
4202$as_echo "#define WIDE_EMACS_INT 1" >>confdefs.h
4203
4204fi
4205
4206
067d23c9
KY
4207# Check whether --with-xpm was given.
4208if test "${with_xpm+set}" = set; then :
4209 withval=$with_xpm;
4210else
ee77919d 4211 with_xpm=$with_features
067d23c9
KY
4212fi
4213
4214
4215# Check whether --with-jpeg was given.
4216if test "${with_jpeg+set}" = set; then :
4217 withval=$with_jpeg;
4218else
ee77919d 4219 with_jpeg=$with_features
067d23c9
KY
4220fi
4221
4222
4223# Check whether --with-tiff was given.
4224if test "${with_tiff+set}" = set; then :
4225 withval=$with_tiff;
4226else
ee77919d 4227 with_tiff=$with_features
067d23c9
KY
4228fi
4229
4230
4231# Check whether --with-gif was given.
4232if test "${with_gif+set}" = set; then :
4233 withval=$with_gif;
4234else
ee77919d 4235 with_gif=$with_features
067d23c9
KY
4236fi
4237
4238
4239# Check whether --with-png was given.
4240if test "${with_png+set}" = set; then :
4241 withval=$with_png;
4242else
ee77919d 4243 with_png=$with_features
067d23c9
KY
4244fi
4245
4246
4247# Check whether --with-rsvg was given.
4248if test "${with_rsvg+set}" = set; then :
4249 withval=$with_rsvg;
4250else
ee77919d 4251 with_rsvg=$with_features
067d23c9
KY
4252fi
4253
4254
4255# Check whether --with-xml2 was given.
4256if test "${with_xml2+set}" = set; then :
4257 withval=$with_xml2;
4258else
ee77919d 4259 with_xml2=$with_features
067d23c9
KY
4260fi
4261
4262
4263# Check whether --with-imagemagick was given.
4264if test "${with_imagemagick+set}" = set; then :
4265 withval=$with_imagemagick;
4266else
ee77919d 4267 with_imagemagick=$with_features
067d23c9
KY
4268fi
4269
4270
4271
4272# Check whether --with-xft was given.
4273if test "${with_xft+set}" = set; then :
4274 withval=$with_xft;
4275else
ee77919d 4276 with_xft=$with_features
067d23c9
KY
4277fi
4278
4279
4280# Check whether --with-libotf was given.
4281if test "${with_libotf+set}" = set; then :
4282 withval=$with_libotf;
4283else
ee77919d 4284 with_libotf=$with_features
067d23c9
KY
4285fi
4286
4287
4288# Check whether --with-m17n-flt was given.
4289if test "${with_m17n_flt+set}" = set; then :
4290 withval=$with_m17n_flt;
4291else
ee77919d 4292 with_m17n_flt=$with_features
067d23c9
KY
4293fi
4294
4295
4296
4297# Check whether --with-toolkit-scroll-bars was given.
4298if test "${with_toolkit_scroll_bars+set}" = set; then :
4299 withval=$with_toolkit_scroll_bars;
4300else
ee77919d 4301 with_toolkit_scroll_bars=$with_features
067d23c9
KY
4302fi
4303
4304
4305# Check whether --with-xaw3d was given.
4306if test "${with_xaw3d+set}" = set; then :
4307 withval=$with_xaw3d;
4308else
ee77919d 4309 with_xaw3d=$with_features
067d23c9
KY
4310fi
4311
4312
4313# Check whether --with-xim was given.
4314if test "${with_xim+set}" = set; then :
4315 withval=$with_xim;
4316else
ee77919d 4317 with_xim=$with_features
067d23c9
KY
4318fi
4319
4320
4321# Check whether --with-ns was given.
4322if test "${with_ns+set}" = set; then :
4323 withval=$with_ns;
4324else
4325 with_ns=no
4326fi
4327
4328
5c0255d9
GM
4329# Check whether --with-w32 was given.
4330if test "${with_w32+set}" = set; then :
4331 withval=$with_w32;
4332else
4333 with_w32=no
4334fi
4335
4336
067d23c9
KY
4337
4338# Check whether --with-gpm was given.
4339if test "${with_gpm+set}" = set; then :
4340 withval=$with_gpm;
4341else
ee77919d 4342 with_gpm=$with_features
067d23c9
KY
4343fi
4344
4345
4346# Check whether --with-dbus was given.
4347if test "${with_dbus+set}" = set; then :
4348 withval=$with_dbus;
4349else
ee77919d 4350 with_dbus=$with_features
067d23c9
KY
4351fi
4352
4353
4354# Check whether --with-gconf was given.
4355if test "${with_gconf+set}" = set; then :
4356 withval=$with_gconf;
4357else
ee77919d 4358 with_gconf=$with_features
067d23c9
KY
4359fi
4360
4361
f527bd02
GM
4362# Check whether --with-gsettings was given.
4363if test "${with_gsettings+set}" = set; then :
4364 withval=$with_gsettings;
4365else
ee77919d 4366 with_gsettings=$with_features
f527bd02
GM
4367fi
4368
4369
067d23c9
KY
4370# Check whether --with-selinux was given.
4371if test "${with_selinux+set}" = set; then :
4372 withval=$with_selinux;
4373else
ee77919d 4374 with_selinux=$with_features
067d23c9
KY
4375fi
4376
4377
4378# Check whether --with-gnutls was given.
4379if test "${with_gnutls+set}" = set; then :
4380 withval=$with_gnutls;
4381else
ee77919d 4382 with_gnutls=$with_features
067d23c9
KY
4383fi
4384
4385
7a67e06b
GM
4386# Check whether --with-zlib was given.
4387if test "${with_zlib+set}" = set; then :
4388 withval=$with_zlib;
4389else
4390 with_zlib=$with_features
4391fi
4392
4393
0f55a32e
GM
4394
4395# Check whether --with-file-notification was given.
4396if test "${with_file_notification+set}" = set; then :
4397 withval=$with_file_notification; case "${withval}" in
4398 y | ye | yes ) val=yes ;;
4399 n | no ) val=no ;;
4400 g | gf | gfi | gfil | gfile ) val=gfile ;;
4401 i | in | ino | inot | inoti | inotif | inotify ) val=inotify ;;
4402 w | w3 | w32 ) val=w32 ;;
4403 * ) as_fn_error "\`--with-file-notification=$withval' is invalid;
4404this option's value should be \`yes', \`no', \`gfile', \`inotify' or \`w32'.
6ee585de
GM
4405\`yes' is a synonym for \`w32' on MS-Windows, for \`no' on Nextstep,
4406otherwise for the first of \`gfile' or \`inotify' that is usable." "$LINENO" 5
0f55a32e
GM
4407 ;;
4408 esac
4409 with_file_notification=$val
4410
b5eb356a 4411else
09220615 4412 with_file_notification=$with_features
b5eb356a
GM
4413fi
4414
4415
067d23c9
KY
4416## For the times when you want to build Emacs but don't have
4417## a suitable makeinfo, and can live without the manuals.
4418
4419# Check whether --with-makeinfo was given.
4420if test "${with_makeinfo+set}" = set; then :
4421 withval=$with_makeinfo;
4422else
ee77919d 4423 with_makeinfo=$with_features
067d23c9
KY
4424fi
4425
4426
c3a461a5
GM
4427## Makefile.in needs the cache file name.
4428
4429
067d23c9
KY
4430## This is an option because I do not know if all info/man support
4431## compressed files, nor how to test if they do so.
4432
992ec28a
GM
4433# Check whether --with-compress-install was given.
4434if test "${with_compress_install+set}" = set; then :
4435 withval=$with_compress_install;
067d23c9 4436else
992ec28a 4437 with_compress_install=$with_features
067d23c9
KY
4438fi
4439
4440
4441
4442# Check whether --with-pkg-config-prog was given.
4443if test "${with_pkg_config_prog+set}" = set; then :
4444 withval=$with_pkg_config_prog;
4445fi
4446
4447if test "X${with_pkg_config_prog}" != X; then
4448 if test "${with_pkg_config_prog}" != yes; then
4449 PKG_CONFIG="${with_pkg_config_prog}"
4450 fi
4451fi
4452
067d23c9 4453
4fc5868a
UM
4454# Check whether --with-gameuser was given.
4455if test "${with_gameuser+set}" = set; then :
4456 withval=$with_gameuser;
4457fi
4458
4459test "X${with_gameuser}" != X && test "${with_gameuser}" != yes \
4460 && gameuser="${with_gameuser}"
4461test "X$gameuser" = X && gameuser=games
4462
4463
067d23c9
KY
4464# Check whether --with-gnustep-conf was given.
4465if test "${with_gnustep_conf+set}" = set; then :
4466 withval=$with_gnustep_conf;
4467fi
4468
4469test "X${with_gnustep_conf}" != X && test "${with_gnustep_conf}" != yes && \
4470 GNUSTEP_CONFIG_FILE="${with_gnustep_conf}"
4471test "X$GNUSTEP_CONFIG_FILE" = "X" && \
4472 GNUSTEP_CONFIG_FILE=/etc/GNUstep/GNUstep.conf
4473
4474# Check whether --enable-ns-self-contained was given.
4475if test "${enable_ns_self_contained+set}" = set; then :
4476 enableval=$enable_ns_self_contained; EN_NS_SELF_CONTAINED=$enableval
4477else
4478 EN_NS_SELF_CONTAINED=yes
4479fi
4480
4481
067d23c9
KY
4482# Check whether --enable-locallisppath was given.
4483if test "${enable_locallisppath+set}" = set; then :
4484 enableval=$enable_locallisppath; if test "${enableval}" = "no"; then
4485 locallisppath=
4486elif test "${enableval}" != "yes"; then
4487 locallisppath=${enableval}
4488fi
4489fi
4490
4491
4492# Check whether --enable-checking was given.
4493if test "${enable_checking+set}" = set; then :
4494 enableval=$enable_checking; ac_checking_flags="${enableval}"
4495fi
4496
4497IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
4498for check in $ac_checking_flags
4499do
4500 case $check in
4501 # these set all the flags to specific states
4502 yes) ac_enable_checking=1 ;;
4503 no) ac_enable_checking= ;
4504 ac_gc_check_stringbytes= ;
4505 ac_gc_check_string_overrun= ;
4506 ac_gc_check_string_free_list= ;
4507 ac_xmalloc_overrun= ;
7ee3791f 4508 ac_gc_check_cons_list= ;
e4d35030 4509 ac_glyphs_debug= ;;
067d23c9
KY
4510 all) ac_enable_checking=1 ;
4511 ac_gc_check_stringbytes=1 ;
4512 ac_gc_check_string_overrun=1 ;
4513 ac_gc_check_string_free_list=1 ;
4514 ac_xmalloc_overrun=1 ;
7ee3791f 4515 ac_gc_check_cons_list=1 ;
e4d35030 4516 ac_glyphs_debug=1 ;;
067d23c9
KY
4517 # these enable particular checks
4518 stringbytes) ac_gc_check_stringbytes=1 ;;
4519 stringoverrun) ac_gc_check_string_overrun=1 ;;
4520 stringfreelist) ac_gc_check_string_free_list=1 ;;
4521 xmallocoverrun) ac_xmalloc_overrun=1 ;;
4522 conslist) ac_gc_check_cons_list=1 ;;
e4d35030 4523 glyphs) ac_glyphs_debug=1 ;;
a9bec17c 4524 *) as_fn_error "unknown check category $check" "$LINENO" 5 ;;
067d23c9
KY
4525 esac
4526done
4527IFS="$ac_save_IFS"
4528
4529if test x$ac_enable_checking != x ; then
4530
4531$as_echo "#define ENABLE_CHECKING 1" >>confdefs.h
4532
4533fi
4534if test x$ac_gc_check_stringbytes != x ; then
4535
4536$as_echo "#define GC_CHECK_STRING_BYTES 1" >>confdefs.h
4537
4538fi
4fda9c95 4539if test x$ac_gc_check_string_overrun != x ; then
067d23c9
KY
4540
4541$as_echo "#define GC_CHECK_STRING_OVERRUN 1" >>confdefs.h
4542
4543fi
4544if test x$ac_gc_check_string_free_list != x ; then
4545
4546$as_echo "#define GC_CHECK_STRING_FREE_LIST 1" >>confdefs.h
4547
4548fi
4549if test x$ac_xmalloc_overrun != x ; then
4550
4551$as_echo "#define XMALLOC_OVERRUN_CHECK 1" >>confdefs.h
4552
4553fi
4554if test x$ac_gc_check_cons_list != x ; then
4555
4556$as_echo "#define GC_CHECK_CONS_LIST 1" >>confdefs.h
4557
7ee3791f 4558fi
e4d35030 4559if test x$ac_glyphs_debug != x ; then
7ee3791f
GM
4560
4561$as_echo "#define GLYPH_DEBUG 1" >>confdefs.h
4562
067d23c9
KY
4563fi
4564
afd07e01
GM
4565# Check whether --enable-check-lisp-object-type was given.
4566if test "${enable_check_lisp_object_type+set}" = set; then :
4567 enableval=$enable_check_lisp_object_type; if test "${enableval}" != "no"; then
067d23c9 4568
afd07e01 4569$as_echo "#define CHECK_LISP_OBJECT_TYPE 1" >>confdefs.h
067d23c9
KY
4570
4571fi
4572fi
4573
4574
4575
4576# Check whether --enable-profiling was given.
4577if test "${enable_profiling+set}" = set; then :
4578 enableval=$enable_profiling; ac_enable_profiling="${enableval}"
4579fi
4580
4581if test x$ac_enable_profiling != x ; then
4582 PROFILING_CFLAGS="-DPROFILING=1 -pg"
4583else
4584 PROFILING_CFLAGS=
4585fi
4586
4587
4588# Check whether --enable-autodepend was given.
4589if test "${enable_autodepend+set}" = set; then :
4590 enableval=$enable_autodepend; ac_enable_autodepend="${enableval}"
4591else
4592 ac_enable_autodepend=yes
4593fi
4594
4595
4efe5ef9
GM
4596# Check whether --enable-gtk-deprecation-warnings was given.
4597if test "${enable_gtk_deprecation_warnings+set}" = set; then :
4598 enableval=$enable_gtk_deprecation_warnings; ac_enable_gtk_deprecation_warnings="${enableval}"
4599fi
4600
4601
067d23c9 4602#### Make srcdir absolute, if it isn't already. It's important to
b5591ebb 4603#### avoid running the file name through pwd unnecessarily, since pwd can
067d23c9
KY
4604#### give you automounter prefixes, which can go away. We do all this
4605#### so Emacs can find its files when run uninstalled.
4606## Make sure CDPATH doesn't affect cd (in case PWD is relative).
4607unset CDPATH
4608case "${srcdir}" in
7c61eaab 4609 [\\/]* | ?:[\\/]*) ;;
067d23c9
KY
4610 . )
4611 ## We may be able to use the $PWD environment variable to make this
4612 ## absolute. But sometimes PWD is inaccurate.
b5591ebb 4613 ## Note: we used to use $PWD at the end instead of `pwd`,
067d23c9
KY
4614 ## but that tested only for a well-formed and valid PWD,
4615 ## it did not object when PWD was well-formed and valid but just wrong.
b5591ebb 4616 if test ".$PWD" != "." && test ".`(cd "$PWD" ; sh -c pwd)`" = ".`pwd`" ;
067d23c9
KY
4617 then
4618 srcdir="$PWD"
4619 else
b5591ebb 4620 srcdir=`(cd "$srcdir"; pwd)`
067d23c9
KY
4621 fi
4622 ;;
b5591ebb 4623 * ) srcdir=`(cd "$srcdir"; pwd)` ;;
067d23c9
KY
4624esac
4625
067d23c9
KY
4626### Canonicalize the configuration name.
4627
067d23c9
KY
4628# Make sure we can run config.sub.
4629$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
a9bec17c 4630 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
067d23c9
KY
4631
4632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4633$as_echo_n "checking build system type... " >&6; }
a9bec17c 4634if test "${ac_cv_build+set}" = set; then :
067d23c9
KY
4635 $as_echo_n "(cached) " >&6
4636else
4637 ac_build_alias=$build_alias
4638test "x$ac_build_alias" = x &&
4639 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4640test "x$ac_build_alias" = x &&
a9bec17c 4641 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
067d23c9 4642ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
a9bec17c 4643 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
067d23c9
KY
4644
4645fi
4646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4647$as_echo "$ac_cv_build" >&6; }
4648case $ac_cv_build in
4649*-*-*) ;;
a9bec17c 4650*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
067d23c9
KY
4651esac
4652build=$ac_cv_build
4653ac_save_IFS=$IFS; IFS='-'
4654set x $ac_cv_build
4655shift
4656build_cpu=$1
4657build_vendor=$2
4658shift; shift
4659# Remember, the first character of IFS is used to create $*,
4660# except with old shells:
4661build_os=$*
4662IFS=$ac_save_IFS
4663case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
4664
4665
4666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4667$as_echo_n "checking host system type... " >&6; }
a9bec17c 4668if test "${ac_cv_host+set}" = set; then :
067d23c9
KY
4669 $as_echo_n "(cached) " >&6
4670else
4671 if test "x$host_alias" = x; then
4672 ac_cv_host=$ac_cv_build
4673else
4674 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
a9bec17c 4675 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
067d23c9
KY
4676fi
4677
4678fi
4679{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4680$as_echo "$ac_cv_host" >&6; }
4681case $ac_cv_host in
4682*-*-*) ;;
a9bec17c 4683*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
067d23c9
KY
4684esac
4685host=$ac_cv_host
4686ac_save_IFS=$IFS; IFS='-'
4687set x $ac_cv_host
4688shift
4689host_cpu=$1
4690host_vendor=$2
4691shift; shift
4692# Remember, the first character of IFS is used to create $*,
4693# except with old shells:
4694host_os=$*
4695IFS=$ac_save_IFS
4696case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
4697
4698
4699canonical=$host
4700configuration=${host_alias-${build_alias-$host}}
4701
4702
4703
4704### If you add support for a new configuration, add code to this
4705### switch statement to recognize your configuration name and select
42bbbe8b 4706### the appropriate operating system file.
067d23c9 4707
42bbbe8b 4708### You would hope that you could choose an s/*.h
067d23c9 4709### file based on the operating system portion. However, it turns out
42bbbe8b 4710### that each s/*.h file is pretty manufacturer-specific.
067d23c9
KY
4711### So we basically have to have a special case for each
4712### configuration name.
4713###
4714### As far as handling version numbers on operating systems is
4715### concerned, make sure things will fail in a fixable way. If
4716### /etc/MACHINES doesn't say anything about version numbers, be
4717### prepared to handle anything reasonably. If version numbers
4718### matter, be sure /etc/MACHINES says something about it.
4719
42bbbe8b 4720opsys='' unported=no
067d23c9
KY
4721case "${canonical}" in
4722
9b6e5515
GM
4723 ## GNU/Linux and similar ports
4724 *-*-linux* )
d6a003a8 4725 opsys=gnu-linux
d6a003a8
AS
4726 ;;
4727
067d23c9
KY
4728 ## FreeBSD ports
4729 *-*-freebsd* )
4730 opsys=freebsd
067d23c9
KY
4731 ;;
4732
87e1a811
GM
4733 ## DragonFly ports
4734 *-*-dragonfly* )
4735 opsys=dragonfly
4736 ;;
4737
067d23c9
KY
4738 ## FreeBSD kernel + glibc based userland
4739 *-*-kfreebsd*gnu* )
4740 opsys=gnu-kfreebsd
067d23c9
KY
4741 ;;
4742
4743 ## NetBSD ports
4744 *-*-netbsd* )
4745 opsys=netbsd
067d23c9
KY
4746 ;;
4747
4748 ## OpenBSD ports
4749 *-*-openbsd* )
4750 opsys=openbsd
067d23c9
KY
4751 ;;
4752
067d23c9
KY
4753 ## Apple Darwin / Mac OS X
4754 *-apple-darwin* )
4755 case "${canonical}" in
42bbbe8b
GM
4756 i[3456]86-* ) ;;
4757 powerpc-* ) ;;
4758 x86_64-* ) ;;
067d23c9
KY
4759 * ) unported=yes ;;
4760 esac
4761 opsys=darwin
adf4198e
GM
4762 ## Use fink packages if available.
4763 ## FIXME find a better way to do this: http://debbugs.gnu.org/11507
4764## if test -d /sw/include && test -d /sw/lib; then
4765## GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib"
4766## NON_GCC_TEST_OPTIONS=${GCC_TEST_OPTIONS}
4767## fi
067d23c9
KY
4768 ;;
4769
8c35e3c3
GM
4770 ## Cygwin ports
4771 *-*-cygwin )
4772 opsys=cygwin
4773 ;;
4774
067d23c9
KY
4775 ## HP 9000 series 700 and 800, running HP/UX
4776 hppa*-hp-hpux10.2* )
d6a003a8 4777 opsys=hpux10-20
067d23c9
KY
4778 ;;
4779 hppa*-hp-hpux1[1-9]* )
d6a003a8 4780 opsys=hpux11
067d23c9
KY
4781 CFLAGS="-D_INCLUDE__STDC_A1_SOURCE $CFLAGS"
4782 ;;
4783
067d23c9 4784 ## IBM machines
067d23c9 4785 rs6000-ibm-aix4.[23]* )
42bbbe8b 4786 opsys=aix4-2
067d23c9
KY
4787 ;;
4788 powerpc-ibm-aix4.[23]* )
42bbbe8b 4789 opsys=aix4-2
067d23c9
KY
4790 ;;
4791 rs6000-ibm-aix[56]* )
42bbbe8b 4792 opsys=aix4-2
067d23c9
KY
4793 ;;
4794 powerpc-ibm-aix[56]* )
42bbbe8b 4795 opsys=aix4-2
067d23c9
KY
4796 ;;
4797
067d23c9
KY
4798 ## Silicon Graphics machines
4799 ## Iris 4D
4800 mips-sgi-irix6.5 )
fd44db7f 4801 opsys=irix6-5
067d23c9
KY
4802 # Without defining _LANGUAGE_C, things get masked out in the headers
4803 # so that, for instance, grepping for `free' in stdlib.h fails and
4804 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
067d23c9
KY
4805 NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
4806 ;;
4807
4808 ## Suns
067d23c9
KY
4809 *-sun-solaris* \
4810 | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* \
4811 | x86_64-*-solaris2* | x86_64-*-sunos5*)
4812 case "${canonical}" in
42bbbe8b
GM
4813 i[3456]86-*-* ) ;;
4814 amd64-*-*|x86_64-*-*) ;;
4815 sparc* ) ;;
067d23c9
KY
4816 * ) unported=yes ;;
4817 esac
4818 case "${canonical}" in
4819 *-sunos5.6* | *-solaris2.6* )
4820 opsys=sol2-6
067d23c9
KY
4821 RANLIB="ar -ts"
4822 ;;
4823 *-sunos5.[7-9]* | *-solaris2.[7-9]* )
4824 opsys=sol2-6
4825 emacs_check_sunpro_c=yes
067d23c9
KY
4826 ;;
4827 *-sunos5* | *-solaris* )
4828 opsys=sol2-10
4829 emacs_check_sunpro_c=yes
067d23c9
KY
4830 ;;
4831 esac
4832 ## Watch out for a compiler that we know will not work.
4833 case "${canonical}" in
4834 *-solaris* | *-sunos5* )
4835 if [ "x$CC" = x/usr/ucb/cc ]; then
4836 ## /usr/ucb/cc doesn't work;
4837 ## we should find some other compiler that does work.
4838 unset CC
4839 fi
4840 ;;
4841 *) ;;
4842 esac
4843 ;;
4844
067d23c9
KY
4845 ## Intel 386 machines where we don't care about the manufacturer.
4846 i[3456]86-*-* )
067d23c9 4847 case "${canonical}" in
5ec54608 4848 *-darwin* ) opsys=darwin ;;
7c61eaab
GM
4849 *-mingw32 )
4850 opsys=mingw32
4851 # MinGW overrides and adds some system headers in nt/inc.
4852 GCC_TEST_OPTIONS="-I $srcdir/nt/inc"
4853 ;;
5ec54608
GM
4854 *-sysv4.2uw* ) opsys=unixware ;;
4855 *-sysv5uw* ) opsys=unixware ;;
4856 *-sysv5OpenUNIX* ) opsys=unixware ;;
067d23c9
KY
4857 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
4858 esac
4859 ;;
4860
067d23c9
KY
4861 * )
4862 unported=yes
4863 ;;
4864esac
4865
4866### If the code above didn't choose an operating system, just choose
4867### an operating system based on the configuration name. You really
4868### only want to use this when you have no idea what the right
4869### operating system is; if you know what operating systems a machine
4870### runs, it's cleaner to make it explicit in the case statement
4871### above.
4872if test x"${opsys}" = x; then
4873 case "${canonical}" in
4874 *-gnu* ) opsys=gnu ;;
4875 * )
4876 unported=yes
4877 ;;
4878 esac
4879fi
4880
4881
4882
4883if test $unported = yes; then
a9bec17c 4884 as_fn_error "Emacs hasn't been ported to \`${canonical}' systems.
067d23c9
KY
4885Check \`etc/MACHINES' for recognized configuration names." "$LINENO" 5
4886fi
4887
067d23c9
KY
4888
4889#### Choose a compiler.
067d23c9
KY
4890
4891ac_ext=c
4892ac_cpp='$CPP $CPPFLAGS'
4893ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4894ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4895ac_compiler_gnu=$ac_cv_c_compiler_gnu
4896if test -n "$ac_tool_prefix"; then
4897 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4898set dummy ${ac_tool_prefix}gcc; ac_word=$2
4899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4900$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 4901if test "${ac_cv_prog_CC+set}" = set; then :
067d23c9
KY
4902 $as_echo_n "(cached) " >&6
4903else
4904 if test -n "$CC"; then
4905 ac_cv_prog_CC="$CC" # Let the user override the test.
4906else
4907as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4908for as_dir in $PATH
4909do
4910 IFS=$as_save_IFS
4911 test -z "$as_dir" && as_dir=.
4912 for ac_exec_ext in '' $ac_executable_extensions; do
4913 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4914 ac_cv_prog_CC="${ac_tool_prefix}gcc"
4915 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4916 break 2
4917 fi
4918done
4919 done
4920IFS=$as_save_IFS
4921
4922fi
4923fi
4924CC=$ac_cv_prog_CC
4925if test -n "$CC"; then
4926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4927$as_echo "$CC" >&6; }
4928else
4929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4930$as_echo "no" >&6; }
4931fi
4932
4933
4934fi
4935if test -z "$ac_cv_prog_CC"; then
4936 ac_ct_CC=$CC
4937 # Extract the first word of "gcc", so it can be a program name with args.
4938set dummy gcc; ac_word=$2
4939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4940$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 4941if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
067d23c9
KY
4942 $as_echo_n "(cached) " >&6
4943else
4944 if test -n "$ac_ct_CC"; then
4945 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4946else
4947as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4948for as_dir in $PATH
4949do
4950 IFS=$as_save_IFS
4951 test -z "$as_dir" && as_dir=.
4952 for ac_exec_ext in '' $ac_executable_extensions; do
4953 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4954 ac_cv_prog_ac_ct_CC="gcc"
4955 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4956 break 2
4957 fi
4958done
4959 done
4960IFS=$as_save_IFS
4961
4962fi
4963fi
4964ac_ct_CC=$ac_cv_prog_ac_ct_CC
4965if test -n "$ac_ct_CC"; then
4966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4967$as_echo "$ac_ct_CC" >&6; }
4968else
4969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4970$as_echo "no" >&6; }
4971fi
4972
4973 if test "x$ac_ct_CC" = x; then
4974 CC=""
4975 else
4976 case $cross_compiling:$ac_tool_warned in
4977yes:)
4978{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4979$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4980ac_tool_warned=yes ;;
4981esac
4982 CC=$ac_ct_CC
4983 fi
4984else
4985 CC="$ac_cv_prog_CC"
4986fi
4987
4988if test -z "$CC"; then
4989 if test -n "$ac_tool_prefix"; then
4990 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4991set dummy ${ac_tool_prefix}cc; ac_word=$2
4992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4993$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 4994if test "${ac_cv_prog_CC+set}" = set; then :
067d23c9
KY
4995 $as_echo_n "(cached) " >&6
4996else
4997 if test -n "$CC"; then
4998 ac_cv_prog_CC="$CC" # Let the user override the test.
4999else
5000as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5001for as_dir in $PATH
5002do
5003 IFS=$as_save_IFS
5004 test -z "$as_dir" && as_dir=.
5005 for ac_exec_ext in '' $ac_executable_extensions; do
5006 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5007 ac_cv_prog_CC="${ac_tool_prefix}cc"
5008 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5009 break 2
5010 fi
5011done
5012 done
5013IFS=$as_save_IFS
5014
5015fi
5016fi
5017CC=$ac_cv_prog_CC
5018if test -n "$CC"; then
5019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5020$as_echo "$CC" >&6; }
5021else
5022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5023$as_echo "no" >&6; }
5024fi
5025
5026
5027 fi
5028fi
5029if test -z "$CC"; then
5030 # Extract the first word of "cc", so it can be a program name with args.
5031set dummy cc; ac_word=$2
5032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5033$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 5034if test "${ac_cv_prog_CC+set}" = set; then :
067d23c9
KY
5035 $as_echo_n "(cached) " >&6
5036else
5037 if test -n "$CC"; then
5038 ac_cv_prog_CC="$CC" # Let the user override the test.
5039else
5040 ac_prog_rejected=no
5041as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5042for as_dir in $PATH
5043do
5044 IFS=$as_save_IFS
5045 test -z "$as_dir" && as_dir=.
5046 for ac_exec_ext in '' $ac_executable_extensions; do
5047 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5048 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
5049 ac_prog_rejected=yes
5050 continue
5051 fi
5052 ac_cv_prog_CC="cc"
5053 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5054 break 2
5055 fi
5056done
5057 done
5058IFS=$as_save_IFS
5059
5060if test $ac_prog_rejected = yes; then
5061 # We found a bogon in the path, so make sure we never use it.
5062 set dummy $ac_cv_prog_CC
5063 shift
5064 if test $# != 0; then
5065 # We chose a different compiler from the bogus one.
5066 # However, it has the same basename, so the bogon will be chosen
5067 # first if we set CC to just the basename; use the full file name.
5068 shift
5069 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
5070 fi
5071fi
5072fi
5073fi
5074CC=$ac_cv_prog_CC
5075if test -n "$CC"; then
5076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5077$as_echo "$CC" >&6; }
5078else
5079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5080$as_echo "no" >&6; }
5081fi
5082
5083
5084fi
5085if test -z "$CC"; then
5086 if test -n "$ac_tool_prefix"; then
5087 for ac_prog in cl.exe
5088 do
5089 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5090set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5092$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 5093if test "${ac_cv_prog_CC+set}" = set; then :
067d23c9
KY
5094 $as_echo_n "(cached) " >&6
5095else
5096 if test -n "$CC"; then
5097 ac_cv_prog_CC="$CC" # Let the user override the test.
5098else
5099as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5100for as_dir in $PATH
5101do
5102 IFS=$as_save_IFS
5103 test -z "$as_dir" && as_dir=.
5104 for ac_exec_ext in '' $ac_executable_extensions; do
5105 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5106 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
5107 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5108 break 2
5109 fi
5110done
5111 done
5112IFS=$as_save_IFS
5113
5114fi
5115fi
5116CC=$ac_cv_prog_CC
5117if test -n "$CC"; then
5118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5119$as_echo "$CC" >&6; }
5120else
5121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5122$as_echo "no" >&6; }
5123fi
5124
5125
5126 test -n "$CC" && break
5127 done
5128fi
5129if test -z "$CC"; then
5130 ac_ct_CC=$CC
5131 for ac_prog in cl.exe
5132do
5133 # Extract the first word of "$ac_prog", so it can be a program name with args.
5134set dummy $ac_prog; ac_word=$2
5135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5136$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 5137if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
067d23c9
KY
5138 $as_echo_n "(cached) " >&6
5139else
5140 if test -n "$ac_ct_CC"; then
5141 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5142else
5143as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5144for as_dir in $PATH
5145do
5146 IFS=$as_save_IFS
5147 test -z "$as_dir" && as_dir=.
5148 for ac_exec_ext in '' $ac_executable_extensions; do
5149 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5150 ac_cv_prog_ac_ct_CC="$ac_prog"
5151 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5152 break 2
5153 fi
5154done
5155 done
5156IFS=$as_save_IFS
5157
5158fi
5159fi
5160ac_ct_CC=$ac_cv_prog_ac_ct_CC
5161if test -n "$ac_ct_CC"; then
5162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5163$as_echo "$ac_ct_CC" >&6; }
5164else
5165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5166$as_echo "no" >&6; }
5167fi
5168
5169
5170 test -n "$ac_ct_CC" && break
5171done
5172
5173 if test "x$ac_ct_CC" = x; then
5174 CC=""
5175 else
5176 case $cross_compiling:$ac_tool_warned in
5177yes:)
5178{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5179$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5180ac_tool_warned=yes ;;
5181esac
5182 CC=$ac_ct_CC
5183 fi
5184fi
5185
5186fi
5187
5188
5189test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5190$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
a9bec17c
GM
5191as_fn_error "no acceptable C compiler found in \$PATH
5192See \`config.log' for more details." "$LINENO" 5; }
067d23c9
KY
5193
5194# Provide some information about the compiler.
5195$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
5196set X $ac_compile
5197ac_compiler=$2
5198for ac_option in --version -v -V -qversion; do
5199 { { ac_try="$ac_compiler $ac_option >&5"
5200case "(($ac_try" in
5201 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5202 *) ac_try_echo=$ac_try;;
5203esac
5204eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5205$as_echo "$ac_try_echo"; } >&5
5206 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
5207 ac_status=$?
5208 if test -s conftest.err; then
5209 sed '10a\
5210... rest of stderr output deleted ...
5211 10q' conftest.err >conftest.er1
5212 cat conftest.er1 >&5
5213 fi
5214 rm -f conftest.er1 conftest.err
5215 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5216 test $ac_status = 0; }
5217done
5218
5219cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5220/* end confdefs.h. */
5221
5222int
5223main ()
5224{
5225
5226 ;
5227 return 0;
5228}
5229_ACEOF
5230ac_clean_files_save=$ac_clean_files
5231ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
5232# Try to create an executable without -o first, disregard a.out.
5233# It will help us diagnose broken compilers, and finding out an intuition
5234# of exeext.
5235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
5236$as_echo_n "checking whether the C compiler works... " >&6; }
5237ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
5238
5239# The possible output files:
5240ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
5241
5242ac_rmfiles=
5243for ac_file in $ac_files
5244do
5245 case $ac_file in
5246 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
5247 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
5248 esac
5249done
5250rm -f $ac_rmfiles
5251
5252if { { ac_try="$ac_link_default"
5253case "(($ac_try" in
5254 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5255 *) ac_try_echo=$ac_try;;
5256esac
5257eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5258$as_echo "$ac_try_echo"; } >&5
5259 (eval "$ac_link_default") 2>&5
5260 ac_status=$?
5261 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5262 test $ac_status = 0; }; then :
5263 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
5264# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
5265# in a Makefile. We should not override ac_cv_exeext if it was cached,
5266# so that the user can short-circuit this test for compilers unknown to
5267# Autoconf.
5268for ac_file in $ac_files ''
5269do
5270 test -f "$ac_file" || continue
5271 case $ac_file in
5272 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
5273 ;;
5274 [ab].out )
5275 # We found the default executable, but exeext='' is most
5276 # certainly right.
5277 break;;
5278 *.* )
5279 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
5280 then :; else
5281 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
5282 fi
5283 # We set ac_cv_exeext here because the later test for it is not
5284 # safe: cross compilers may not add the suffix if given an `-o'
5285 # argument, so we may need to know it at that point already.
5286 # Even if this section looks crufty: it has the advantage of
5287 # actually working.
5288 break;;
5289 * )
5290 break;;
5291 esac
5292done
5293test "$ac_cv_exeext" = no && ac_cv_exeext=
5294
5295else
5296 ac_file=''
5297fi
5298if test -z "$ac_file"; then :
5299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5300$as_echo "no" >&6; }
5301$as_echo "$as_me: failed program was:" >&5
5302sed 's/^/| /' conftest.$ac_ext >&5
5303
5304{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5305$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
a9bec17c
GM
5306{ as_fn_set_status 77
5307as_fn_error "C compiler cannot create executables
5308See \`config.log' for more details." "$LINENO" 5; }; }
067d23c9
KY
5309else
5310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5311$as_echo "yes" >&6; }
5312fi
5313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
5314$as_echo_n "checking for C compiler default output file name... " >&6; }
5315{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
5316$as_echo "$ac_file" >&6; }
5317ac_exeext=$ac_cv_exeext
5318
5319rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
5320ac_clean_files=$ac_clean_files_save
5321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
5322$as_echo_n "checking for suffix of executables... " >&6; }
5323if { { ac_try="$ac_link"
5324case "(($ac_try" in
5325 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5326 *) ac_try_echo=$ac_try;;
5327esac
5328eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5329$as_echo "$ac_try_echo"; } >&5
5330 (eval "$ac_link") 2>&5
5331 ac_status=$?
5332 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5333 test $ac_status = 0; }; then :
5334 # If both `conftest.exe' and `conftest' are `present' (well, observable)
5335# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
5336# work properly (i.e., refer to `conftest.exe'), while it won't with
5337# `rm'.
5338for ac_file in conftest.exe conftest conftest.*; do
5339 test -f "$ac_file" || continue
5340 case $ac_file in
5341 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
5342 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
5343 break;;
5344 * ) break;;
5345 esac
5346done
5347else
5348 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5349$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
a9bec17c
GM
5350as_fn_error "cannot compute suffix of executables: cannot compile and link
5351See \`config.log' for more details." "$LINENO" 5; }
067d23c9
KY
5352fi
5353rm -f conftest conftest$ac_cv_exeext
5354{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
5355$as_echo "$ac_cv_exeext" >&6; }
5356
5357rm -f conftest.$ac_ext
5358EXEEXT=$ac_cv_exeext
5359ac_exeext=$EXEEXT
5360cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5361/* end confdefs.h. */
5362#include <stdio.h>
5363int
5364main ()
5365{
5366FILE *f = fopen ("conftest.out", "w");
5367 return ferror (f) || fclose (f) != 0;
5368
5369 ;
5370 return 0;
5371}
5372_ACEOF
5373ac_clean_files="$ac_clean_files conftest.out"
5374# Check that the compiler produces executables we can run. If not, either
5375# the compiler is broken, or we cross compile.
5376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
5377$as_echo_n "checking whether we are cross compiling... " >&6; }
5378if test "$cross_compiling" != yes; then
5379 { { ac_try="$ac_link"
5380case "(($ac_try" in
5381 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5382 *) ac_try_echo=$ac_try;;
5383esac
5384eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5385$as_echo "$ac_try_echo"; } >&5
5386 (eval "$ac_link") 2>&5
5387 ac_status=$?
5388 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5389 test $ac_status = 0; }
5390 if { ac_try='./conftest$ac_cv_exeext'
5391 { { case "(($ac_try" in
5392 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5393 *) ac_try_echo=$ac_try;;
5394esac
5395eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5396$as_echo "$ac_try_echo"; } >&5
5397 (eval "$ac_try") 2>&5
5398 ac_status=$?
5399 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5400 test $ac_status = 0; }; }; then
5401 cross_compiling=no
5402 else
5403 if test "$cross_compiling" = maybe; then
5404 cross_compiling=yes
5405 else
5406 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5407$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
a9bec17c 5408as_fn_error "cannot run C compiled programs.
067d23c9 5409If you meant to cross compile, use \`--host'.
a9bec17c 5410See \`config.log' for more details." "$LINENO" 5; }
067d23c9
KY
5411 fi
5412 fi
5413fi
5414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
5415$as_echo "$cross_compiling" >&6; }
5416
5417rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
5418ac_clean_files=$ac_clean_files_save
5419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
5420$as_echo_n "checking for suffix of object files... " >&6; }
a9bec17c 5421if test "${ac_cv_objext+set}" = set; then :
067d23c9
KY
5422 $as_echo_n "(cached) " >&6
5423else
5424 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5425/* end confdefs.h. */
5426
5427int
5428main ()
5429{
5430
5431 ;
5432 return 0;
5433}
5434_ACEOF
5435rm -f conftest.o conftest.obj
5436if { { ac_try="$ac_compile"
5437case "(($ac_try" in
5438 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5439 *) ac_try_echo=$ac_try;;
5440esac
5441eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5442$as_echo "$ac_try_echo"; } >&5
5443 (eval "$ac_compile") 2>&5
5444 ac_status=$?
5445 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5446 test $ac_status = 0; }; then :
5447 for ac_file in conftest.o conftest.obj conftest.*; do
5448 test -f "$ac_file" || continue;
5449 case $ac_file in
5450 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
5451 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
5452 break;;
5453 esac
5454done
5455else
5456 $as_echo "$as_me: failed program was:" >&5
5457sed 's/^/| /' conftest.$ac_ext >&5
5458
5459{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5460$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
a9bec17c
GM
5461as_fn_error "cannot compute suffix of object files: cannot compile
5462See \`config.log' for more details." "$LINENO" 5; }
067d23c9
KY
5463fi
5464rm -f conftest.$ac_cv_objext conftest.$ac_ext
5465fi
5466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
5467$as_echo "$ac_cv_objext" >&6; }
5468OBJEXT=$ac_cv_objext
5469ac_objext=$OBJEXT
5470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
5471$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
a9bec17c 5472if test "${ac_cv_c_compiler_gnu+set}" = set; then :
067d23c9
KY
5473 $as_echo_n "(cached) " >&6
5474else
5475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5476/* end confdefs.h. */
5477
5478int
5479main ()
5480{
5481#ifndef __GNUC__
5482 choke me
5483#endif
5484
5485 ;
5486 return 0;
5487}
5488_ACEOF
5489if ac_fn_c_try_compile "$LINENO"; then :
5490 ac_compiler_gnu=yes
5491else
5492 ac_compiler_gnu=no
5493fi
5494rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5495ac_cv_c_compiler_gnu=$ac_compiler_gnu
5496
5497fi
5498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
5499$as_echo "$ac_cv_c_compiler_gnu" >&6; }
5500if test $ac_compiler_gnu = yes; then
5501 GCC=yes
5502else
5503 GCC=
5504fi
5505ac_test_CFLAGS=${CFLAGS+set}
5506ac_save_CFLAGS=$CFLAGS
5507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
5508$as_echo_n "checking whether $CC accepts -g... " >&6; }
a9bec17c 5509if test "${ac_cv_prog_cc_g+set}" = set; then :
067d23c9
KY
5510 $as_echo_n "(cached) " >&6
5511else
5512 ac_save_c_werror_flag=$ac_c_werror_flag
5513 ac_c_werror_flag=yes
5514 ac_cv_prog_cc_g=no
5515 CFLAGS="-g"
5516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5517/* end confdefs.h. */
5518
5519int
5520main ()
5521{
5522
5523 ;
5524 return 0;
5525}
5526_ACEOF
5527if ac_fn_c_try_compile "$LINENO"; then :
5528 ac_cv_prog_cc_g=yes
5529else
5530 CFLAGS=""
5531 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5532/* end confdefs.h. */
5533
5534int
5535main ()
5536{
5537
5538 ;
5539 return 0;
5540}
5541_ACEOF
5542if ac_fn_c_try_compile "$LINENO"; then :
5543
5544else
5545 ac_c_werror_flag=$ac_save_c_werror_flag
5546 CFLAGS="-g"
5547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5548/* end confdefs.h. */
5549
5550int
5551main ()
5552{
5553
5554 ;
5555 return 0;
5556}
5557_ACEOF
5558if ac_fn_c_try_compile "$LINENO"; then :
5559 ac_cv_prog_cc_g=yes
5560fi
5561rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5562fi
5563rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5564fi
5565rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5566 ac_c_werror_flag=$ac_save_c_werror_flag
5567fi
5568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
5569$as_echo "$ac_cv_prog_cc_g" >&6; }
5570if test "$ac_test_CFLAGS" = set; then
5571 CFLAGS=$ac_save_CFLAGS
5572elif test $ac_cv_prog_cc_g = yes; then
5573 if test "$GCC" = yes; then
5574 CFLAGS="-g -O2"
5575 else
5576 CFLAGS="-g"
5577 fi
5578else
5579 if test "$GCC" = yes; then
5580 CFLAGS="-O2"
5581 else
5582 CFLAGS=
5583 fi
5584fi
5585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
5586$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
a9bec17c 5587if test "${ac_cv_prog_cc_c89+set}" = set; then :
067d23c9
KY
5588 $as_echo_n "(cached) " >&6
5589else
5590 ac_cv_prog_cc_c89=no
5591ac_save_CC=$CC
5592cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5593/* end confdefs.h. */
5594#include <stdarg.h>
5595#include <stdio.h>
5596#include <sys/types.h>
5597#include <sys/stat.h>
5598/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
5599struct buf { int x; };
5600FILE * (*rcsopen) (struct buf *, struct stat *, int);
5601static char *e (p, i)
5602 char **p;
5603 int i;
5604{
5605 return p[i];
5606}
5607static char *f (char * (*g) (char **, int), char **p, ...)
5608{
5609 char *s;
5610 va_list v;
5611 va_start (v,p);
5612 s = g (p, va_arg (v,int));
5613 va_end (v);
5614 return s;
5615}
5616
5617/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
5618 function prototypes and stuff, but not '\xHH' hex character constants.
5619 These don't provoke an error unfortunately, instead are silently treated
5620 as 'x'. The following induces an error, until -std is added to get
5621 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
5622 array size at least. It's necessary to write '\x00'==0 to get something
5623 that's true only with -std. */
5624int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5625
5626/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5627 inside strings and character constants. */
5628#define FOO(x) 'x'
5629int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5630
5631int test (int i, double x);
5632struct s1 {int (*f) (int a);};
5633struct s2 {int (*f) (double a);};
5634int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5635int argc;
5636char **argv;
5637int
5638main ()
5639{
5640return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
5641 ;
5642 return 0;
5643}
5644_ACEOF
5645for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5646 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5647do
5648 CC="$ac_save_CC $ac_arg"
5649 if ac_fn_c_try_compile "$LINENO"; then :
5650 ac_cv_prog_cc_c89=$ac_arg
5651fi
5652rm -f core conftest.err conftest.$ac_objext
5653 test "x$ac_cv_prog_cc_c89" != "xno" && break
5654done
743c80a7
PE
5655rm -f conftest.$ac_ext
5656CC=$ac_save_CC
5657
5658fi
5659# AC_CACHE_VAL
5660case "x$ac_cv_prog_cc_c89" in
5661 x)
5662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5663$as_echo "none needed" >&6; } ;;
5664 xno)
5665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5666$as_echo "unsupported" >&6; } ;;
5667 *)
5668 CC="$CC $ac_cv_prog_cc_c89"
5669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5670$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
5671esac
5672if test "x$ac_cv_prog_cc_c89" != xno; then :
5673
5674fi
5675
5676ac_ext=c
5677ac_cpp='$CPP $CPPFLAGS'
5678ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5679ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5680ac_compiler_gnu=$ac_cv_c_compiler_gnu
5681DEPDIR="${am__leading_dot}deps"
5682
5683ac_config_commands="$ac_config_commands depfiles"
5684
5685
5686am_make=${MAKE-make}
5687cat > confinc << 'END'
5688am__doit:
5689 @echo this is the am__doit target
5690.PHONY: am__doit
5691END
5692# If we don't find an include directive, just comment out the code.
5693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
5694$as_echo_n "checking for style of include used by $am_make... " >&6; }
5695am__include="#"
5696am__quote=
5697_am_result=none
5698# First try GNU make style include.
5699echo "include confinc" > confmf
5700# Ignore all kinds of additional output from `make'.
5701case `$am_make -s -f confmf 2> /dev/null` in #(
5702*the\ am__doit\ target*)
5703 am__include=include
5704 am__quote=
5705 _am_result=GNU
5706 ;;
5707esac
5708# Now try BSD make style include.
5709if test "$am__include" = "#"; then
5710 echo '.include "confinc"' > confmf
5711 case `$am_make -s -f confmf 2> /dev/null` in #(
5712 *the\ am__doit\ target*)
5713 am__include=.include
5714 am__quote="\""
5715 _am_result=BSD
5716 ;;
5717 esac
5718fi
5719
5720
5721{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
5722$as_echo "$_am_result" >&6; }
5723rm -f confinc confmf
5724
5725# Check whether --enable-dependency-tracking was given.
5726if test "${enable_dependency_tracking+set}" = set; then :
5727 enableval=$enable_dependency_tracking;
5728fi
5729
5730if test "x$enable_dependency_tracking" != xno; then
5731 am_depcomp="$ac_aux_dir/depcomp"
5732 AMDEPBACKSLASH='\'
5733fi
5734 if test "x$enable_dependency_tracking" != xno; then
5735 AMDEP_TRUE=
5736 AMDEP_FALSE='#'
5737else
5738 AMDEP_TRUE='#'
5739 AMDEP_FALSE=
5740fi
5741
5742
5743
5744depcc="$CC" am_compiler_list=
5745
5746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
5747$as_echo_n "checking dependency style of $depcc... " >&6; }
a9bec17c 5748if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
743c80a7
PE
5749 $as_echo_n "(cached) " >&6
5750else
5751 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
5752 # We make a subdir and do the tests there. Otherwise we can end up
5753 # making bogus files that we don't know about and never remove. For
5754 # instance it was reported that on HP-UX the gcc test will end up
5755 # making a dummy file named `D' -- because `-MD' means `put the output
5756 # in D'.
5757 mkdir conftest.dir
5758 # Copy depcomp to subdir because otherwise we won't find it if we're
5759 # using a relative directory.
5760 cp "$am_depcomp" conftest.dir
5761 cd conftest.dir
5762 # We will build objects and dependencies in a subdirectory because
5763 # it helps to detect inapplicable dependency modes. For instance
5764 # both Tru64's cc and ICC support -MD to output dependencies as a
5765 # side effect of compilation, but ICC will put the dependencies in
5766 # the current directory while Tru64 will put them in the object
5767 # directory.
5768 mkdir sub
5769
5770 am_cv_CC_dependencies_compiler_type=none
5771 if test "$am_compiler_list" = ""; then
5772 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5773 fi
5774 am__universal=false
5775 case " $depcc " in #(
5776 *\ -arch\ *\ -arch\ *) am__universal=true ;;
5777 esac
5778
5779 for depmode in $am_compiler_list; do
5780 # Setup a source with many dependencies, because some compilers
5781 # like to wrap large dependency lists on column 80 (with \), and
5782 # we should not choose a depcomp mode which is confused by this.
5783 #
5784 # We need to recreate these files for each test, as the compiler may
5785 # overwrite some of them when testing with obscure command lines.
5786 # This happens at least with the AIX C compiler.
5787 : > sub/conftest.c
5788 for i in 1 2 3 4 5 6; do
5789 echo '#include "conftst'$i'.h"' >> sub/conftest.c
5790 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
5791 # Solaris 8's {/usr,}/bin/sh.
5792 touch sub/conftst$i.h
5793 done
5794 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
5795
5796 # We check with `-c' and `-o' for the sake of the "dashmstdout"
5797 # mode. It turns out that the SunPro C++ compiler does not properly
5798 # handle `-M -o', and we need to detect this. Also, some Intel
5799 # versions had trouble with output in subdirs
5800 am__obj=sub/conftest.${OBJEXT-o}
5801 am__minus_obj="-o $am__obj"
5802 case $depmode in
5803 gcc)
5804 # This depmode causes a compiler race in universal mode.
5805 test "$am__universal" = false || continue
5806 ;;
5807 nosideeffect)
5808 # after this tag, mechanisms are not by side-effect, so they'll
5809 # only be used when explicitly requested
5810 if test "x$enable_dependency_tracking" = xyes; then
5811 continue
5812 else
5813 break
5814 fi
5815 ;;
5816 msvisualcpp | msvcmsys)
5817 # This compiler won't grok `-c -o', but also, the minuso test has
5818 # not run yet. These depmodes are late enough in the game, and
5819 # so weak that their functioning should not be impacted.
5820 am__obj=conftest.${OBJEXT-o}
5821 am__minus_obj=
5822 ;;
5823 none) break ;;
5824 esac
5825 if depmode=$depmode \
5826 source=sub/conftest.c object=$am__obj \
5827 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
5828 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
5829 >/dev/null 2>conftest.err &&
5830 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
5831 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
5832 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
5833 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
5834 # icc doesn't choke on unknown options, it will just issue warnings
5835 # or remarks (even with -Werror). So we grep stderr for any message
5836 # that says an option was ignored or not supported.
5837 # When given -MP, icc 7.0 and 7.1 complain thusly:
5838 # icc: Command line warning: ignoring option '-M'; no argument required
5839 # The diagnosis changed in icc 8.0:
5840 # icc: Command line remark: option '-MP' not supported
5841 if (grep 'ignoring option' conftest.err ||
5842 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
5843 am_cv_CC_dependencies_compiler_type=$depmode
5844 break
5845 fi
5846 fi
5847 done
5848
5849 cd ..
5850 rm -rf conftest.dir
5851else
5852 am_cv_CC_dependencies_compiler_type=none
5853fi
5854
5855fi
5856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
5857$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
5858CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
5859
5860 if
5861 test "x$enable_dependency_tracking" != xno \
5862 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
5863 am__fastdepCC_TRUE=
5864 am__fastdepCC_FALSE='#'
5865else
5866 am__fastdepCC_TRUE='#'
5867 am__fastdepCC_FALSE=
5868fi
5869
5870
5871if test "x$CC" != xcc; then
5872 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5
5873$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
5874else
5875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5
5876$as_echo_n "checking whether cc understands -c and -o together... " >&6; }
5877fi
5878set dummy $CC; ac_cc=`$as_echo "$2" |
5879 sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
a9bec17c 5880if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then :
743c80a7
PE
5881 $as_echo_n "(cached) " >&6
5882else
5883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5884/* end confdefs.h. */
5885
5886int
5887main ()
5888{
5889
5890 ;
5891 return 0;
5892}
5893_ACEOF
5894# Make sure it works both with $CC and with simple cc.
5895# We do the test twice because some compilers refuse to overwrite an
5896# existing .o file with -o, though they will create one.
5897ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
5898rm -f conftest2.*
5899if { { case "(($ac_try" in
5900 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5901 *) ac_try_echo=$ac_try;;
5902esac
5903eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5904$as_echo "$ac_try_echo"; } >&5
5905 (eval "$ac_try") 2>&5
5906 ac_status=$?
5907 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5908 test $ac_status = 0; } &&
5909 test -f conftest2.$ac_objext && { { case "(($ac_try" in
5910 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5911 *) ac_try_echo=$ac_try;;
5912esac
5913eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5914$as_echo "$ac_try_echo"; } >&5
5915 (eval "$ac_try") 2>&5
5916 ac_status=$?
5917 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5918 test $ac_status = 0; };
5919then
5920 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
5921 if test "x$CC" != xcc; then
5922 # Test first that cc exists at all.
5923 if { ac_try='cc -c conftest.$ac_ext >&5'
5924 { { case "(($ac_try" in
5925 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5926 *) ac_try_echo=$ac_try;;
5927esac
5928eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5929$as_echo "$ac_try_echo"; } >&5
5930 (eval "$ac_try") 2>&5
5931 ac_status=$?
5932 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5933 test $ac_status = 0; }; }; then
5934 ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
5935 rm -f conftest2.*
5936 if { { case "(($ac_try" in
5937 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5938 *) ac_try_echo=$ac_try;;
5939esac
5940eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5941$as_echo "$ac_try_echo"; } >&5
5942 (eval "$ac_try") 2>&5
5943 ac_status=$?
5944 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5945 test $ac_status = 0; } &&
5946 test -f conftest2.$ac_objext && { { case "(($ac_try" in
5947 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5948 *) ac_try_echo=$ac_try;;
5949esac
5950eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5951$as_echo "$ac_try_echo"; } >&5
5952 (eval "$ac_try") 2>&5
5953 ac_status=$?
5954 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5955 test $ac_status = 0; };
5956 then
5957 # cc works too.
5958 :
5959 else
5960 # cc exists but doesn't like -o.
5961 eval ac_cv_prog_cc_${ac_cc}_c_o=no
5962 fi
5963 fi
5964 fi
5965else
5966 eval ac_cv_prog_cc_${ac_cc}_c_o=no
5967fi
5968rm -f core conftest*
5969
5970fi
5971if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
5972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5973$as_echo "yes" >&6; }
5974else
5975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5976$as_echo "no" >&6; }
5977
5978$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h
5979
5980fi
5981
5982# FIXME: we rely on the cache variable name because
5983# there is no other way.
5984set dummy $CC
5985am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
5986eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
5987if test "$am_t" != yes; then
5988 # Losing compiler, so override with the script.
5989 # FIXME: It is wrong to rewrite CC.
5990 # But if we don't then we get into trouble of one sort or another.
5991 # A longer-term fix would be to have automake use am__CC in this case,
5992 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
5993 CC="$am_aux_dir/compile $CC"
5994fi
5995
5996
5997
5ec54608
GM
5998if test x$GCC = xyes; then
5999 test "x$GCC_TEST_OPTIONS" != x && CC="$CC $GCC_TEST_OPTIONS"
6000else
6001 test "x$NON_GCC_TEST_OPTIONS" != x && CC="$CC $NON_GCC_TEST_OPTIONS"
6002fi
6003
7c61eaab
GM
6004 if test "x$opsys" = "xmingw32"; then
6005 BUILDING_FOR_WINDOWSNT_TRUE=
6006 BUILDING_FOR_WINDOWSNT_FALSE='#'
6007else
6008 BUILDING_FOR_WINDOWSNT_TRUE='#'
6009 BUILDING_FOR_WINDOWSNT_FALSE=
6010fi
6011
6012
34fd7a48
GM
6013# Avoid gnulib's tests for HAVE_WORKING_O_NOATIME and HAVE_WORKING_O_NOFOLLOW,
6014# as we don't use them.
710f5812 6015
f077f61d
GM
6016# Avoid gnulib's threadlib module, as we do threads our own way.
6017
6018
5ec54608 6019# Initialize gnulib right after choosing the compiler.
743c80a7 6020
067d23c9
KY
6021ac_ext=c
6022ac_cpp='$CPP $CPPFLAGS'
6023ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6024ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6025ac_compiler_gnu=$ac_cv_c_compiler_gnu
6026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
6027$as_echo_n "checking how to run the C preprocessor... " >&6; }
6028# On Suns, sometimes $CPP names a directory.
6029if test -n "$CPP" && test -d "$CPP"; then
6030 CPP=
6031fi
6032if test -z "$CPP"; then
a9bec17c 6033 if test "${ac_cv_prog_CPP+set}" = set; then :
067d23c9
KY
6034 $as_echo_n "(cached) " >&6
6035else
6036 # Double quotes because CPP needs to be expanded
6037 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
6038 do
6039 ac_preproc_ok=false
6040for ac_c_preproc_warn_flag in '' yes
6041do
6042 # Use a header file that comes with gcc, so configuring glibc
6043 # with a fresh cross-compiler works.
6044 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6045 # <limits.h> exists even on freestanding compilers.
6046 # On the NeXT, cc -E runs the code through the compiler's parser,
6047 # not just through cpp. "Syntax error" is here to catch this case.
6048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6049/* end confdefs.h. */
6050#ifdef __STDC__
6051# include <limits.h>
6052#else
6053# include <assert.h>
6054#endif
6055 Syntax error
6056_ACEOF
6057if ac_fn_c_try_cpp "$LINENO"; then :
6058
6059else
6060 # Broken: fails on valid input.
6061continue
6062fi
a9bec17c 6063rm -f conftest.err conftest.$ac_ext
067d23c9
KY
6064
6065 # OK, works on sane cases. Now check whether nonexistent headers
6066 # can be detected and how.
6067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6068/* end confdefs.h. */
6069#include <ac_nonexistent.h>
6070_ACEOF
6071if ac_fn_c_try_cpp "$LINENO"; then :
6072 # Broken: success on invalid input.
6073continue
6074else
6075 # Passes both tests.
6076ac_preproc_ok=:
6077break
6078fi
a9bec17c 6079rm -f conftest.err conftest.$ac_ext
067d23c9
KY
6080
6081done
6082# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
a9bec17c 6083rm -f conftest.err conftest.$ac_ext
067d23c9
KY
6084if $ac_preproc_ok; then :
6085 break
6086fi
6087
6088 done
6089 ac_cv_prog_CPP=$CPP
6090
6091fi
6092 CPP=$ac_cv_prog_CPP
6093else
6094 ac_cv_prog_CPP=$CPP
6095fi
6096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
6097$as_echo "$CPP" >&6; }
6098ac_preproc_ok=false
6099for ac_c_preproc_warn_flag in '' yes
6100do
6101 # Use a header file that comes with gcc, so configuring glibc
6102 # with a fresh cross-compiler works.
6103 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6104 # <limits.h> exists even on freestanding compilers.
6105 # On the NeXT, cc -E runs the code through the compiler's parser,
6106 # not just through cpp. "Syntax error" is here to catch this case.
6107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6108/* end confdefs.h. */
6109#ifdef __STDC__
6110# include <limits.h>
6111#else
6112# include <assert.h>
6113#endif
6114 Syntax error
6115_ACEOF
6116if ac_fn_c_try_cpp "$LINENO"; then :
6117
6118else
6119 # Broken: fails on valid input.
6120continue
6121fi
a9bec17c 6122rm -f conftest.err conftest.$ac_ext
067d23c9
KY
6123
6124 # OK, works on sane cases. Now check whether nonexistent headers
6125 # can be detected and how.
6126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6127/* end confdefs.h. */
6128#include <ac_nonexistent.h>
6129_ACEOF
6130if ac_fn_c_try_cpp "$LINENO"; then :
6131 # Broken: success on invalid input.
6132continue
6133else
6134 # Passes both tests.
6135ac_preproc_ok=:
6136break
6137fi
a9bec17c 6138rm -f conftest.err conftest.$ac_ext
067d23c9
KY
6139
6140done
6141# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
a9bec17c 6142rm -f conftest.err conftest.$ac_ext
067d23c9
KY
6143if $ac_preproc_ok; then :
6144
6145else
6146 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6147$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
a9bec17c
GM
6148as_fn_error "C preprocessor \"$CPP\" fails sanity check
6149See \`config.log' for more details." "$LINENO" 5; }
067d23c9
KY
6150fi
6151
6152ac_ext=c
6153ac_cpp='$CPP $CPPFLAGS'
6154ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6155ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6156ac_compiler_gnu=$ac_cv_c_compiler_gnu
6157
6158
6159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6160$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
a9bec17c 6161if test "${ac_cv_path_GREP+set}" = set; then :
067d23c9
KY
6162 $as_echo_n "(cached) " >&6
6163else
6164 if test -z "$GREP"; then
6165 ac_path_GREP_found=false
6166 # Loop through the user's path and test for each of PROGNAME-LIST
6167 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6168for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6169do
6170 IFS=$as_save_IFS
6171 test -z "$as_dir" && as_dir=.
6172 for ac_prog in grep ggrep; do
6173 for ac_exec_ext in '' $ac_executable_extensions; do
6174 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6175 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
6176# Check for GNU ac_path_GREP and select it if it is found.
6177 # Check for GNU $ac_path_GREP
6178case `"$ac_path_GREP" --version 2>&1` in
6179*GNU*)
6180 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6181*)
6182 ac_count=0
6183 $as_echo_n 0123456789 >"conftest.in"
6184 while :
6185 do
6186 cat "conftest.in" "conftest.in" >"conftest.tmp"
6187 mv "conftest.tmp" "conftest.in"
6188 cp "conftest.in" "conftest.nl"
6189 $as_echo 'GREP' >> "conftest.nl"
6190 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6191 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6192 as_fn_arith $ac_count + 1 && ac_count=$as_val
6193 if test $ac_count -gt ${ac_path_GREP_max-0}; then
6194 # Best one so far, save it but keep looking for a better one
6195 ac_cv_path_GREP="$ac_path_GREP"
6196 ac_path_GREP_max=$ac_count
6197 fi
6198 # 10*(2^10) chars as input seems more than enough
6199 test $ac_count -gt 10 && break
6200 done
6201 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6202esac
6203
6204 $ac_path_GREP_found && break 3
6205 done
6206 done
6207 done
6208IFS=$as_save_IFS
6209 if test -z "$ac_cv_path_GREP"; then
a9bec17c 6210 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
067d23c9
KY
6211 fi
6212else
6213 ac_cv_path_GREP=$GREP
6214fi
6215
6216fi
6217{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6218$as_echo "$ac_cv_path_GREP" >&6; }
6219 GREP="$ac_cv_path_GREP"
6220
6221
6222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6223$as_echo_n "checking for egrep... " >&6; }
a9bec17c 6224if test "${ac_cv_path_EGREP+set}" = set; then :
067d23c9
KY
6225 $as_echo_n "(cached) " >&6
6226else
6227 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6228 then ac_cv_path_EGREP="$GREP -E"
6229 else
6230 if test -z "$EGREP"; then
6231 ac_path_EGREP_found=false
6232 # Loop through the user's path and test for each of PROGNAME-LIST
6233 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6234for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6235do
6236 IFS=$as_save_IFS
6237 test -z "$as_dir" && as_dir=.
6238 for ac_prog in egrep; do
6239 for ac_exec_ext in '' $ac_executable_extensions; do
6240 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6241 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
6242# Check for GNU ac_path_EGREP and select it if it is found.
6243 # Check for GNU $ac_path_EGREP
6244case `"$ac_path_EGREP" --version 2>&1` in
6245*GNU*)
6246 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6247*)
6248 ac_count=0
6249 $as_echo_n 0123456789 >"conftest.in"
6250 while :
6251 do
6252 cat "conftest.in" "conftest.in" >"conftest.tmp"
6253 mv "conftest.tmp" "conftest.in"
6254 cp "conftest.in" "conftest.nl"
6255 $as_echo 'EGREP' >> "conftest.nl"
6256 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6257 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6258 as_fn_arith $ac_count + 1 && ac_count=$as_val
6259 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6260 # Best one so far, save it but keep looking for a better one
6261 ac_cv_path_EGREP="$ac_path_EGREP"
6262 ac_path_EGREP_max=$ac_count
6263 fi
6264 # 10*(2^10) chars as input seems more than enough
6265 test $ac_count -gt 10 && break
6266 done
6267 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6268esac
6269
6270 $ac_path_EGREP_found && break 3
6271 done
6272 done
6273 done
6274IFS=$as_save_IFS
6275 if test -z "$ac_cv_path_EGREP"; then
a9bec17c 6276 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
067d23c9
KY
6277 fi
6278else
6279 ac_cv_path_EGREP=$EGREP
6280fi
6281
6282 fi
6283fi
6284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6285$as_echo "$ac_cv_path_EGREP" >&6; }
6286 EGREP="$ac_cv_path_EGREP"
6287
6288
369e19fc
PE
6289
6290
6291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
6292$as_echo_n "checking for Minix Amsterdam compiler... " >&6; }
a9bec17c 6293if test "${gl_cv_c_amsterdam_compiler+set}" = set; then :
369e19fc
PE
6294 $as_echo_n "(cached) " >&6
6295else
6296
6297 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6298/* end confdefs.h. */
6299
6300#ifdef __ACK__
6301Amsterdam
6302#endif
6303
6304_ACEOF
6305if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6306 $EGREP "Amsterdam" >/dev/null 2>&1; then :
6307 gl_cv_c_amsterdam_compiler=yes
6308else
6309 gl_cv_c_amsterdam_compiler=no
6310fi
6311rm -f conftest*
6312
6313
6314fi
6315{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
6316$as_echo "$gl_cv_c_amsterdam_compiler" >&6; }
6317 if test -z "$AR"; then
6318 if test $gl_cv_c_amsterdam_compiler = yes; then
6319 AR='cc -c.a'
6320 if test -z "$ARFLAGS"; then
6321 ARFLAGS='-o'
6322 fi
6323 else
6324 if test -n "$ac_tool_prefix"; then
6325 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6326set dummy ${ac_tool_prefix}ar; ac_word=$2
6327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6328$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 6329if test "${ac_cv_prog_AR+set}" = set; then :
369e19fc
PE
6330 $as_echo_n "(cached) " >&6
6331else
6332 if test -n "$AR"; then
6333 ac_cv_prog_AR="$AR" # Let the user override the test.
6334else
6335as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6336for as_dir in $PATH
6337do
6338 IFS=$as_save_IFS
6339 test -z "$as_dir" && as_dir=.
6340 for ac_exec_ext in '' $ac_executable_extensions; do
6341 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6342 ac_cv_prog_AR="${ac_tool_prefix}ar"
6343 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6344 break 2
6345 fi
6346done
6347 done
6348IFS=$as_save_IFS
6349
6350fi
6351fi
6352AR=$ac_cv_prog_AR
6353if test -n "$AR"; then
6354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6355$as_echo "$AR" >&6; }
6356else
6357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6358$as_echo "no" >&6; }
6359fi
6360
6361
6362fi
6363if test -z "$ac_cv_prog_AR"; then
6364 ac_ct_AR=$AR
6365 # Extract the first word of "ar", so it can be a program name with args.
6366set dummy ar; ac_word=$2
6367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6368$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 6369if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
369e19fc
PE
6370 $as_echo_n "(cached) " >&6
6371else
6372 if test -n "$ac_ct_AR"; then
6373 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6374else
6375as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6376for as_dir in $PATH
6377do
6378 IFS=$as_save_IFS
6379 test -z "$as_dir" && as_dir=.
6380 for ac_exec_ext in '' $ac_executable_extensions; do
6381 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6382 ac_cv_prog_ac_ct_AR="ar"
6383 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6384 break 2
6385 fi
6386done
6387 done
6388IFS=$as_save_IFS
6389
6390fi
6391fi
6392ac_ct_AR=$ac_cv_prog_ac_ct_AR
6393if test -n "$ac_ct_AR"; then
6394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6395$as_echo "$ac_ct_AR" >&6; }
6396else
6397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6398$as_echo "no" >&6; }
6399fi
6400
6401 if test "x$ac_ct_AR" = x; then
6402 AR="ar"
6403 else
6404 case $cross_compiling:$ac_tool_warned in
6405yes:)
6406{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6407$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6408ac_tool_warned=yes ;;
6409esac
6410 AR=$ac_ct_AR
6411 fi
6412else
6413 AR="$ac_cv_prog_AR"
6414fi
6415
6416 if test -z "$ARFLAGS"; then
6417 ARFLAGS='cru'
6418 fi
6419 fi
6420 else
6421 if test -z "$ARFLAGS"; then
6422 ARFLAGS='cru'
6423 fi
6424 fi
6425
6426
6427 if test -z "$RANLIB"; then
6428 if test $gl_cv_c_amsterdam_compiler = yes; then
6429 RANLIB=':'
6430 else
6431 if test -n "$ac_tool_prefix"; then
6432 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6433set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6435$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 6436if test "${ac_cv_prog_RANLIB+set}" = set; then :
369e19fc
PE
6437 $as_echo_n "(cached) " >&6
6438else
6439 if test -n "$RANLIB"; then
6440 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6441else
6442as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6443for as_dir in $PATH
6444do
6445 IFS=$as_save_IFS
6446 test -z "$as_dir" && as_dir=.
6447 for ac_exec_ext in '' $ac_executable_extensions; do
6448 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6449 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6450 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6451 break 2
6452 fi
6453done
6454 done
6455IFS=$as_save_IFS
6456
6457fi
6458fi
6459RANLIB=$ac_cv_prog_RANLIB
6460if test -n "$RANLIB"; then
6461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6462$as_echo "$RANLIB" >&6; }
6463else
6464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6465$as_echo "no" >&6; }
6466fi
6467
6468
6469fi
6470if test -z "$ac_cv_prog_RANLIB"; then
6471 ac_ct_RANLIB=$RANLIB
6472 # Extract the first word of "ranlib", so it can be a program name with args.
6473set dummy ranlib; ac_word=$2
6474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6475$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 6476if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
369e19fc
PE
6477 $as_echo_n "(cached) " >&6
6478else
6479 if test -n "$ac_ct_RANLIB"; then
6480 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6481else
6482as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6483for as_dir in $PATH
6484do
6485 IFS=$as_save_IFS
6486 test -z "$as_dir" && as_dir=.
6487 for ac_exec_ext in '' $ac_executable_extensions; do
6488 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6489 ac_cv_prog_ac_ct_RANLIB="ranlib"
6490 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6491 break 2
6492 fi
6493done
6494 done
6495IFS=$as_save_IFS
6496
6497fi
6498fi
6499ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6500if test -n "$ac_ct_RANLIB"; then
6501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6502$as_echo "$ac_ct_RANLIB" >&6; }
6503else
6504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6505$as_echo "no" >&6; }
6506fi
6507
6508 if test "x$ac_ct_RANLIB" = x; then
6509 RANLIB=":"
6510 else
6511 case $cross_compiling:$ac_tool_warned in
6512yes:)
6513{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6514$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6515ac_tool_warned=yes ;;
6516esac
6517 RANLIB=$ac_ct_RANLIB
6518 fi
6519else
6520 RANLIB="$ac_cv_prog_RANLIB"
6521fi
6522
6523 fi
6524 fi
6525
6526
067d23c9
KY
6527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6528$as_echo_n "checking for ANSI C header files... " >&6; }
a9bec17c 6529if test "${ac_cv_header_stdc+set}" = set; then :
067d23c9
KY
6530 $as_echo_n "(cached) " >&6
6531else
6532 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6533/* end confdefs.h. */
6534#include <stdlib.h>
6535#include <stdarg.h>
6536#include <string.h>
6537#include <float.h>
6538
6539int
6540main ()
6541{
6542
6543 ;
6544 return 0;
6545}
6546_ACEOF
6547if ac_fn_c_try_compile "$LINENO"; then :
6548 ac_cv_header_stdc=yes
6549else
6550 ac_cv_header_stdc=no
6551fi
6552rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6553
6554if test $ac_cv_header_stdc = yes; then
6555 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6556 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6557/* end confdefs.h. */
6558#include <string.h>
6559
6560_ACEOF
6561if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6562 $EGREP "memchr" >/dev/null 2>&1; then :
6563
6564else
6565 ac_cv_header_stdc=no
6566fi
6567rm -f conftest*
6568
6569fi
6570
6571if test $ac_cv_header_stdc = yes; then
6572 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6573 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6574/* end confdefs.h. */
6575#include <stdlib.h>
6576
6577_ACEOF
6578if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6579 $EGREP "free" >/dev/null 2>&1; then :
6580
6581else
6582 ac_cv_header_stdc=no
6583fi
6584rm -f conftest*
6585
6586fi
6587
6588if test $ac_cv_header_stdc = yes; then
6589 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6590 if test "$cross_compiling" = yes; then :
6591 :
6592else
6593 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6594/* end confdefs.h. */
6595#include <ctype.h>
6596#include <stdlib.h>
6597#if ((' ' & 0x0FF) == 0x020)
6598# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6599# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6600#else
6601# define ISLOWER(c) \
6602 (('a' <= (c) && (c) <= 'i') \
6603 || ('j' <= (c) && (c) <= 'r') \
6604 || ('s' <= (c) && (c) <= 'z'))
6605# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6606#endif
6607
6608#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6609int
6610main ()
6611{
6612 int i;
6613 for (i = 0; i < 256; i++)
6614 if (XOR (islower (i), ISLOWER (i))
6615 || toupper (i) != TOUPPER (i))
6616 return 2;
6617 return 0;
6618}
6619_ACEOF
6620if ac_fn_c_try_run "$LINENO"; then :
6621
6622else
6623 ac_cv_header_stdc=no
6624fi
6625rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6626 conftest.$ac_objext conftest.beam conftest.$ac_ext
6627fi
6628
6629fi
6630fi
6631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6632$as_echo "$ac_cv_header_stdc" >&6; }
6633if test $ac_cv_header_stdc = yes; then
6634
6635$as_echo "#define STDC_HEADERS 1" >>confdefs.h
6636
6637fi
6638
6639# On IRIX 5.3, sys/types and inttypes.h are conflicting.
6640for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
6641 inttypes.h stdint.h unistd.h
6642do :
6643 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6644ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
6645"
a9bec17c
GM
6646eval as_val=\$$as_ac_Header
6647 if test "x$as_val" = x""yes; then :
067d23c9
KY
6648 cat >>confdefs.h <<_ACEOF
6649#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6650_ACEOF
6651
6652fi
6653
6654done
6655
6656
6657
6658 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
a9bec17c 6659if test "x$ac_cv_header_minix_config_h" = x""yes; then :
067d23c9
KY
6660 MINIX=yes
6661else
6662 MINIX=
6663fi
6664
6665
6666 if test "$MINIX" = yes; then
6667
6668$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
6669
6670
6671$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
6672
6673
6674$as_echo "#define _MINIX 1" >>confdefs.h
6675
1fd182f0 6676
2cdd55fc 6677$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
1fd182f0 6678
2cdd55fc 6679 fi
1fd182f0 6680
067d23c9
KY
6681
6682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
6683$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
a9bec17c 6684if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
067d23c9
KY
6685 $as_echo_n "(cached) " >&6
6686else
6687 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6688/* end confdefs.h. */
369e19fc
PE
6689
6690# define __EXTENSIONS__ 1
6691 $ac_includes_default
6692int
6693main ()
6694{
6695
6696 ;
6697 return 0;
6698}
6699_ACEOF
6700if ac_fn_c_try_compile "$LINENO"; then :
6701 ac_cv_safe_to_define___extensions__=yes
6702else
6703 ac_cv_safe_to_define___extensions__=no
6704fi
6705rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6706fi
6707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
6708$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
6709 test $ac_cv_safe_to_define___extensions__ = yes &&
6710 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
6711
6712 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
6713
6714 $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
6715
6716 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
6717
6718 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
6719
6720 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
6721
2cdd55fc
GM
6722 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
6723$as_echo_n "checking whether _XOPEN_SOURCE should be defined... " >&6; }
6724if test "${ac_cv_should_define__xopen_source+set}" = set; then :
6725 $as_echo_n "(cached) " >&6
6726else
6727 ac_cv_should_define__xopen_source=no
6728 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6729/* end confdefs.h. */
6730
6731 #include <wchar.h>
6732 mbstate_t x;
6733int
6734main ()
6735{
6736
6737 ;
6738 return 0;
6739}
6740_ACEOF
6741if ac_fn_c_try_compile "$LINENO"; then :
6742
6743else
6744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6745/* end confdefs.h. */
6746
6747 #define _XOPEN_SOURCE 500
6748 #include <wchar.h>
6749 mbstate_t x;
6750int
6751main ()
6752{
6753
6754 ;
6755 return 0;
6756}
6757_ACEOF
6758if ac_fn_c_try_compile "$LINENO"; then :
6759 ac_cv_should_define__xopen_source=yes
6760fi
6761rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6762fi
6763rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6764fi
6765{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
6766$as_echo "$ac_cv_should_define__xopen_source" >&6; }
6767 test $ac_cv_should_define__xopen_source = yes &&
6768 $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
6769
369e19fc
PE
6770
6771
6772
6773
6774
6775
6776
6777# Check whether --enable-largefile was given.
6778if test "${enable_largefile+set}" = set; then :
6779 enableval=$enable_largefile;
6780fi
6781
6782if test "$enable_largefile" != no; then
6783
6784 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
6785$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
a9bec17c 6786if test "${ac_cv_sys_largefile_CC+set}" = set; then :
369e19fc
PE
6787 $as_echo_n "(cached) " >&6
6788else
6789 ac_cv_sys_largefile_CC=no
6790 if test "$GCC" != yes; then
6791 ac_save_CC=$CC
6792 while :; do
6793 # IRIX 6.2 and later do not support large files by default,
6794 # so use the C compiler's -n32 option if that helps.
6795 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6796/* end confdefs.h. */
6797#include <sys/types.h>
6798 /* Check that off_t can represent 2**63 - 1 correctly.
6799 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6800 since some C++ compilers masquerading as C compilers
6801 incorrectly reject 9223372036854775807. */
6802#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6803 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6804 && LARGE_OFF_T % 2147483647 == 1)
6805 ? 1 : -1];
6806int
6807main ()
6808{
6809
6810 ;
6811 return 0;
6812}
6813_ACEOF
6814 if ac_fn_c_try_compile "$LINENO"; then :
6815 break
6816fi
6817rm -f core conftest.err conftest.$ac_objext
6818 CC="$CC -n32"
6819 if ac_fn_c_try_compile "$LINENO"; then :
6820 ac_cv_sys_largefile_CC=' -n32'; break
6821fi
6822rm -f core conftest.err conftest.$ac_objext
6823 break
6824 done
6825 CC=$ac_save_CC
6826 rm -f conftest.$ac_ext
6827 fi
6828fi
6829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
6830$as_echo "$ac_cv_sys_largefile_CC" >&6; }
6831 if test "$ac_cv_sys_largefile_CC" != no; then
6832 CC=$CC$ac_cv_sys_largefile_CC
6833 fi
6834
6835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
6836$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
a9bec17c 6837if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
369e19fc
PE
6838 $as_echo_n "(cached) " >&6
6839else
6840 while :; do
6841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6842/* end confdefs.h. */
6843#include <sys/types.h>
6844 /* Check that off_t can represent 2**63 - 1 correctly.
6845 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6846 since some C++ compilers masquerading as C compilers
6847 incorrectly reject 9223372036854775807. */
6848#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6849 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6850 && LARGE_OFF_T % 2147483647 == 1)
6851 ? 1 : -1];
6852int
6853main ()
6854{
6855
6856 ;
6857 return 0;
6858}
6859_ACEOF
6860if ac_fn_c_try_compile "$LINENO"; then :
6861 ac_cv_sys_file_offset_bits=no; break
6862fi
6863rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6865/* end confdefs.h. */
6866#define _FILE_OFFSET_BITS 64
6867#include <sys/types.h>
6868 /* Check that off_t can represent 2**63 - 1 correctly.
6869 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6870 since some C++ compilers masquerading as C compilers
6871 incorrectly reject 9223372036854775807. */
6872#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6873 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6874 && LARGE_OFF_T % 2147483647 == 1)
6875 ? 1 : -1];
6876int
6877main ()
6878{
6879
6880 ;
6881 return 0;
6882}
6883_ACEOF
6884if ac_fn_c_try_compile "$LINENO"; then :
6885 ac_cv_sys_file_offset_bits=64; break
6886fi
6887rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6888 ac_cv_sys_file_offset_bits=unknown
6889 break
6890done
6891fi
6892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
6893$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
6894case $ac_cv_sys_file_offset_bits in #(
6895 no | unknown) ;;
6896 *)
6897cat >>confdefs.h <<_ACEOF
6898#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
6899_ACEOF
6900;;
6901esac
6902rm -rf conftest*
6903 if test $ac_cv_sys_file_offset_bits = unknown; then
6904 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
6905$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
a9bec17c 6906if test "${ac_cv_sys_large_files+set}" = set; then :
369e19fc
PE
6907 $as_echo_n "(cached) " >&6
6908else
6909 while :; do
6910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6911/* end confdefs.h. */
6912#include <sys/types.h>
6913 /* Check that off_t can represent 2**63 - 1 correctly.
6914 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6915 since some C++ compilers masquerading as C compilers
6916 incorrectly reject 9223372036854775807. */
6917#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6918 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6919 && LARGE_OFF_T % 2147483647 == 1)
6920 ? 1 : -1];
6921int
6922main ()
6923{
6924
6925 ;
6926 return 0;
6927}
6928_ACEOF
6929if ac_fn_c_try_compile "$LINENO"; then :
6930 ac_cv_sys_large_files=no; break
6931fi
6932rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6934/* end confdefs.h. */
6935#define _LARGE_FILES 1
6936#include <sys/types.h>
6937 /* Check that off_t can represent 2**63 - 1 correctly.
6938 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6939 since some C++ compilers masquerading as C compilers
6940 incorrectly reject 9223372036854775807. */
6941#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6942 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6943 && LARGE_OFF_T % 2147483647 == 1)
6944 ? 1 : -1];
067d23c9
KY
6945int
6946main ()
6947{
6948
6949 ;
6950 return 0;
6951}
6952_ACEOF
6953if ac_fn_c_try_compile "$LINENO"; then :
369e19fc 6954 ac_cv_sys_large_files=1; break
067d23c9
KY
6955fi
6956rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
369e19fc
PE
6957 ac_cv_sys_large_files=unknown
6958 break
6959done
067d23c9 6960fi
369e19fc
PE
6961{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
6962$as_echo "$ac_cv_sys_large_files" >&6; }
6963case $ac_cv_sys_large_files in #(
6964 no | unknown) ;;
6965 *)
6966cat >>confdefs.h <<_ACEOF
6967#define _LARGE_FILES $ac_cv_sys_large_files
6968_ACEOF
6969;;
6970esac
6971rm -rf conftest*
6972 fi
1fd182f0
PE
6973
6974
858c7150
GM
6975$as_echo "#define _DARWIN_USE_64_BIT_INODE 1" >>confdefs.h
6976
369e19fc 6977fi
1fd182f0 6978
6d153f56
GM
6979 case $ac_cv_prog_cc_stdc in #(
6980 no) :
6981 ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; #(
6982 *) :
6983 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
6984$as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
a9bec17c 6985if test "${ac_cv_prog_cc_c99+set}" = set; then :
6d153f56
GM
6986 $as_echo_n "(cached) " >&6
6987else
6988 ac_cv_prog_cc_c99=no
6989ac_save_CC=$CC
6990cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6991/* end confdefs.h. */
6992#include <stdarg.h>
6993#include <stdbool.h>
6994#include <stdlib.h>
6995#include <wchar.h>
6996#include <stdio.h>
6997
6998// Check varargs macros. These examples are taken from C99 6.10.3.5.
6999#define debug(...) fprintf (stderr, __VA_ARGS__)
7000#define showlist(...) puts (#__VA_ARGS__)
7001#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
7002static void
7003test_varargs_macros (void)
7004{
7005 int x = 1234;
7006 int y = 5678;
7007 debug ("Flag");
7008 debug ("X = %d\n", x);
7009 showlist (The first, second, and third items.);
7010 report (x>y, "x is %d but y is %d", x, y);
7011}
7012
7013// Check long long types.
7014#define BIG64 18446744073709551615ull
7015#define BIG32 4294967295ul
7016#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
7017#if !BIG_OK
7018 your preprocessor is broken;
7019#endif
7020#if BIG_OK
7021#else
7022 your preprocessor is broken;
7023#endif
7024static long long int bignum = -9223372036854775807LL;
7025static unsigned long long int ubignum = BIG64;
7026
7027struct incomplete_array
7028{
7029 int datasize;
7030 double data[];
7031};
7032
7033struct named_init {
7034 int number;
7035 const wchar_t *name;
7036 double average;
7037};
7038
7039typedef const char *ccp;
7040
7041static inline int
7042test_restrict (ccp restrict text)
7043{
7044 // See if C++-style comments work.
7045 // Iterate through items via the restricted pointer.
7046 // Also check for declarations in for loops.
7047 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
7048 continue;
7049 return 0;
7050}
7051
7052// Check varargs and va_copy.
7053static void
7054test_varargs (const char *format, ...)
7055{
7056 va_list args;
7057 va_start (args, format);
7058 va_list args_copy;
7059 va_copy (args_copy, args);
7060
7061 const char *str;
7062 int number;
7063 float fnumber;
7064
7065 while (*format)
7066 {
7067 switch (*format++)
7068 {
7069 case 's': // string
7070 str = va_arg (args_copy, const char *);
7071 break;
7072 case 'd': // int
7073 number = va_arg (args_copy, int);
7074 break;
7075 case 'f': // float
7076 fnumber = va_arg (args_copy, double);
7077 break;
7078 default:
7079 break;
7080 }
7081 }
7082 va_end (args_copy);
7083 va_end (args);
7084}
7085
7086int
7087main ()
7088{
7089
7090 // Check bool.
7091 _Bool success = false;
7092
7093 // Check restrict.
7094 if (test_restrict ("String literal") == 0)
7095 success = true;
7096 char *restrict newvar = "Another string";
7097
7098 // Check varargs.
7099 test_varargs ("s, d' f .", "string", 65, 34.234);
7100 test_varargs_macros ();
7101
7102 // Check flexible array members.
7103 struct incomplete_array *ia =
7104 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
7105 ia->datasize = 10;
7106 for (int i = 0; i < ia->datasize; ++i)
7107 ia->data[i] = i * 1.234;
7108
7109 // Check named initializers.
7110 struct named_init ni = {
7111 .number = 34,
7112 .name = L"Test wide string",
7113 .average = 543.34343,
7114 };
7115
7116 ni.number = 58;
7117
7118 int dynamic_array[ni.number];
7119 dynamic_array[ni.number - 1] = 543;
7120
7121 // work around unused variable warnings
7122 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
7123 || dynamic_array[ni.number - 1] != 543);
7124
7125 ;
7126 return 0;
7127}
7128_ACEOF
7129for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99
7130do
7131 CC="$ac_save_CC $ac_arg"
7132 if ac_fn_c_try_compile "$LINENO"; then :
7133 ac_cv_prog_cc_c99=$ac_arg
7134fi
7135rm -f core conftest.err conftest.$ac_objext
7136 test "x$ac_cv_prog_cc_c99" != "xno" && break
7137done
7138rm -f conftest.$ac_ext
7139CC=$ac_save_CC
7140
7141fi
7142# AC_CACHE_VAL
7143case "x$ac_cv_prog_cc_c99" in
7144 x)
7145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
7146$as_echo "none needed" >&6; } ;;
7147 xno)
7148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
7149$as_echo "unsupported" >&6; } ;;
7150 *)
7151 CC="$CC $ac_cv_prog_cc_c99"
7152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
7153$as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
7154esac
7155if test "x$ac_cv_prog_cc_c99" != xno; then :
7156 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
7157else
7158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
7159$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
a9bec17c 7160if test "${ac_cv_prog_cc_c89+set}" = set; then :
6d153f56
GM
7161 $as_echo_n "(cached) " >&6
7162else
7163 ac_cv_prog_cc_c89=no
7164ac_save_CC=$CC
7165cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7166/* end confdefs.h. */
7167#include <stdarg.h>
7168#include <stdio.h>
7169#include <sys/types.h>
7170#include <sys/stat.h>
7171/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
7172struct buf { int x; };
7173FILE * (*rcsopen) (struct buf *, struct stat *, int);
7174static char *e (p, i)
7175 char **p;
7176 int i;
7177{
7178 return p[i];
7179}
7180static char *f (char * (*g) (char **, int), char **p, ...)
7181{
7182 char *s;
7183 va_list v;
7184 va_start (v,p);
7185 s = g (p, va_arg (v,int));
7186 va_end (v);
7187 return s;
7188}
7189
7190/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
7191 function prototypes and stuff, but not '\xHH' hex character constants.
7192 These don't provoke an error unfortunately, instead are silently treated
7193 as 'x'. The following induces an error, until -std is added to get
7194 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
7195 array size at least. It's necessary to write '\x00'==0 to get something
7196 that's true only with -std. */
7197int osf4_cc_array ['\x00' == 0 ? 1 : -1];
7198
7199/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
7200 inside strings and character constants. */
7201#define FOO(x) 'x'
7202int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
7203
7204int test (int i, double x);
7205struct s1 {int (*f) (int a);};
7206struct s2 {int (*f) (double a);};
7207int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
7208int argc;
7209char **argv;
7210int
7211main ()
7212{
7213return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
7214 ;
7215 return 0;
7216}
7217_ACEOF
7218for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
7219 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
7220do
7221 CC="$ac_save_CC $ac_arg"
7222 if ac_fn_c_try_compile "$LINENO"; then :
7223 ac_cv_prog_cc_c89=$ac_arg
7224fi
7225rm -f core conftest.err conftest.$ac_objext
7226 test "x$ac_cv_prog_cc_c89" != "xno" && break
7227done
7228rm -f conftest.$ac_ext
7229CC=$ac_save_CC
7230
7231fi
7232# AC_CACHE_VAL
7233case "x$ac_cv_prog_cc_c89" in
7234 x)
7235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
7236$as_echo "none needed" >&6; } ;;
7237 xno)
7238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
7239$as_echo "unsupported" >&6; } ;;
7240 *)
7241 CC="$CC $ac_cv_prog_cc_c89"
7242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
7243$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
7244esac
7245if test "x$ac_cv_prog_cc_c89" != xno; then :
7246 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
7247else
7248 ac_cv_prog_cc_stdc=no
7249fi
7250
7251fi
7252 ;;
7253esac
7254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5
7255$as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; }
a9bec17c 7256 if test "${ac_cv_prog_cc_stdc+set}" = set; then :
6d153f56
GM
7257 $as_echo_n "(cached) " >&6
7258fi
7259
7260 case $ac_cv_prog_cc_stdc in #(
7261 no) :
7262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
7263$as_echo "unsupported" >&6; } ;; #(
7264 '') :
7265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
7266$as_echo "none needed" >&6; } ;; #(
7267 *) :
7268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_stdc" >&5
7269$as_echo "$ac_cv_prog_cc_stdc" >&6; } ;;
7270esac
7271
1fd182f0
PE
7272
7273
4fc2b746 7274 # Code from module alloca-opt:
8d8af66d 7275 # Code from module allocator:
d7ad186c 7276 # Code from module at-internal:
20c9c1dc 7277 # Code from module binary-io:
938a4ef9
GM
7278 # Code from module c-ctype:
7279 # Code from module c-strcase:
6c051bab 7280 # Code from module careadlinkat:
f199cab1 7281 # Code from module clock-time:
3bf26e96 7282 # Code from module close-stream:
942f733f 7283 # Code from module crypto/md5:
40e27e7f 7284 # Code from module crypto/sha1:
d87ffdb7
GM
7285 # Code from module crypto/sha256:
7286 # Code from module crypto/sha512:
d7ad186c 7287 # Code from module dirent:
36f13e16 7288 # Code from module dosname:
f737437b 7289 # Code from module dtoastr:
f199cab1 7290 # Code from module dtotimespec:
7d2a1c5e 7291 # Code from module dup2:
93131e11 7292 # Code from module environ:
3a019ab4 7293 # Code from module errno:
710f5812 7294 # Code from module euidaccess:
8966cbff 7295 # Code from module execinfo:
1fd182f0
PE
7296 # Code from module extensions:
7297
7cd2ed2c 7298 # Code from module extern-inline:
710f5812 7299 # Code from module faccessat:
0cdca42a 7300 # Code from module fcntl:
710f5812 7301 # Code from module fcntl-h:
2407788f 7302 # Code from module fdatasync:
d7ad186c 7303 # Code from module fdopendir:
5fa4ac76 7304 # Code from module filemode:
3bf26e96 7305 # Code from module fpending:
d7ad186c 7306 # Code from module fstatat:
2407788f 7307 # Code from module fsync:
0cdca42a 7308 # Code from module getdtablesize:
710f5812 7309 # Code from module getgroups:
1f5d53eb 7310 # Code from module getloadavg:
e275c824
PE
7311 # Code from module getopt-gnu:
7312 # Code from module getopt-posix:
7313 # Code from module gettext-h:
f199cab1
GM
7314 # Code from module gettime:
7315 # Code from module gettimeofday:
710f5812 7316 # Code from module group-member:
1fd182f0
PE
7317 # Code from module include_next:
7318 # Code from module intprops:
4fda9c95 7319 # Code from module inttypes-incomplete:
369e19fc
PE
7320 # Code from module largefile:
7321
ae0d7250 7322 # Code from module lstat:
ac1ca7e9 7323 # Code from module manywarnings:
283c7aed 7324 # Code from module memrchr:
e412eb97 7325 # Code from module mkostemp:
1fd182f0
PE
7326 # Code from module mktime:
7327 # Code from module multiarch:
369e19fc 7328 # Code from module nocrash:
d7ad186c 7329 # Code from module openat-h:
a0a61e58 7330 # Code from module pathmax:
0cdca42a 7331 # Code from module pipe2:
f199cab1 7332 # Code from module pselect:
3e0be4ab 7333 # Code from module pthread_sigmask:
b5591ebb 7334 # Code from module putenv:
3a019ab4 7335 # Code from module qacl:
ae0d7250 7336 # Code from module readlink:
d7ad186c 7337 # Code from module readlinkat:
710f5812 7338 # Code from module root-uid:
e412eb97 7339 # Code from module secure_getenv:
e4184a20 7340 # Code from module sig2str:
2b1928b8 7341 # Code from module signal-h:
369e19fc
PE
7342 # Code from module snippet/_Noreturn:
7343 # Code from module snippet/arg-nonnull:
7344 # Code from module snippet/c++defs:
7345 # Code from module snippet/warn-on-use:
6ad6792b 7346 # Code from module socklen:
6c051bab 7347 # Code from module ssize_t:
ae0d7250 7348 # Code from module stat:
f199cab1 7349 # Code from module stat-time:
0eb775a3 7350 # Code from module stdalign:
6d153f56
GM
7351 # Code from module stdarg:
7352
8c069cc7
GM
7353
7354
16c3e636 7355 # Code from module stdbool:
1fd182f0 7356 # Code from module stddef:
5f90be1b 7357 # Code from module stdint:
6ad6792b 7358 # Code from module stdio:
1f5d53eb 7359 # Code from module stdlib:
16c3e636 7360 # Code from module strftime:
283c7aed 7361 # Code from module string:
3e0be4ab
GM
7362 # Code from module strtoimax:
7363 # Code from module strtoll:
4fda9c95
GM
7364 # Code from module strtoull:
7365 # Code from module strtoumax:
ae0d7250 7366 # Code from module symlink:
f199cab1 7367 # Code from module sys_select:
5fa4ac76 7368 # Code from module sys_stat:
f199cab1 7369 # Code from module sys_time:
e412eb97 7370 # Code from module tempname:
1fd182f0
PE
7371 # Code from module time:
7372 # Code from module time_r:
f077f61d 7373 # Code from module timer-time:
f199cab1
GM
7374 # Code from module timespec:
7375 # Code from module timespec-add:
7376 # Code from module timespec-sub:
d87ffdb7 7377 # Code from module u64:
e275c824 7378 # Code from module unistd:
b5591ebb 7379 # Code from module unsetenv:
f199cab1 7380 # Code from module utimens:
4fda9c95 7381 # Code from module verify:
ac1ca7e9 7382 # Code from module warnings:
710f5812 7383 # Code from module xalloc-oversized:
1fd182f0
PE
7384
7385
6bd1cda5 7386if test "$ac_test_CFLAGS" != set; then
8beecaed
GM
7387 # It's helpful to have C macros available to GDB, so prefer -g3 to -g
7388 # if -g3 works and the user does not specify CFLAGS.
7389 # This test must follow gl_EARLY; otherwise AC_LINK_IFELSE complains.
6bd1cda5
GM
7390 case $CFLAGS in
7391 '-g')
7392 emacs_g3_CFLAGS='-g3';;
7393 '-g -O2')
7394 emacs_g3_CFLAGS='-g3 -O2';;
7395 *)
7396 emacs_g3_CFLAGS='';;
7397 esac
7398 if test -n "$emacs_g3_CFLAGS"; then
7399 emacs_save_CFLAGS=$CFLAGS
7400 CFLAGS=$emacs_g3_CFLAGS
7401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts $emacs_g3_CFLAGS" >&5
7402$as_echo_n "checking whether $CC accepts $emacs_g3_CFLAGS... " >&6; }
7403if test "${emacs_cv_prog_cc_g3+set}" = set; then :
7404 $as_echo_n "(cached) " >&6
7405else
7406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7407/* end confdefs.h. */
7408
7409int
7410main ()
7411{
7412
7413 ;
7414 return 0;
7415}
7416_ACEOF
7417if ac_fn_c_try_link "$LINENO"; then :
7418 emacs_cv_prog_cc_g3=yes
7419else
7420 emacs_cv_prog_cc_g3=no
7421fi
7422rm -f core conftest.err conftest.$ac_objext \
7423 conftest$ac_exeext conftest.$ac_ext
7424fi
7425{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_prog_cc_g3" >&5
7426$as_echo "$emacs_cv_prog_cc_g3" >&6; }
8beecaed 7427 if test $emacs_cv_prog_cc_g3 != yes; then
6bd1cda5
GM
7428 CFLAGS=$emacs_save_CFLAGS
7429 fi
7c61eaab
GM
7430 if test $opsys = mingw32; then
7431 CFLAGS="$CFLAGS -gdwarf-2"
7432 fi
6bd1cda5 7433 fi
8beecaed
GM
7434
7435 case $CFLAGS in
7436 *-O*) ;;
7437 *)
7438 # No optimization flag was inferred for this non-GCC compiler.
7439 # Try -O. This is needed for xlc on AIX; see Bug#14258.
7440 emacs_save_CFLAGS=$CFLAGS
7441 test -z "$CFLAGS" || CFLAGS="$CFLAGS "
7442 CFLAGS=${CFLAGS}-O
7443 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -O" >&5
7444$as_echo_n "checking whether $CC accepts -O... " >&6; }
7445if test "${emacs_cv_prog_cc_o+set}" = set; then :
7446 $as_echo_n "(cached) " >&6
7447else
7448 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7449/* end confdefs.h. */
7450
7451int
7452main ()
7453{
7454
7455 ;
7456 return 0;
7457}
7458_ACEOF
7459if ac_fn_c_try_link "$LINENO"; then :
7460 emacs_cv_prog_cc_o=yes
7461else
7462 emacs_cv_prog_cc_o=no
7463fi
7464rm -f core conftest.err conftest.$ac_objext \
7465 conftest$ac_exeext conftest.$ac_ext
7466fi
7467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_prog_cc_o" >&5
7468$as_echo "$emacs_cv_prog_cc_o" >&6; }
7469 if test $emacs_cv_prog_cc_o != yes; then
7470 CFLAGS=$emacs_save_CFLAGS
7471 fi ;;
7472 esac
6bd1cda5
GM
7473fi
7474
a6b92a4a
GM
7475# Check whether --enable-gcc-warnings was given.
7476if test "${enable_gcc_warnings+set}" = set; then :
7477 enableval=$enable_gcc_warnings; case $enableval in
7478 yes|no) ;;
7479 *) as_fn_error "bad value $enableval for gcc-warnings option" "$LINENO" 5 ;;
7480 esac
7481 gl_gcc_warnings=$enableval
7482else
7483 gl_gcc_warnings=no
7484
7485fi
7486
7487
e4d35030
GM
7488# Check whether --enable-link-time-optimization was given.
7489if test "${enable_link_time_optimization+set}" = set; then :
7490 enableval=$enable_link_time_optimization; if test "${enableval}" != "no"; then
7491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether link-time optimization is supported" >&5
7492$as_echo_n "checking whether link-time optimization is supported... " >&6; }
7493 ac_lto_supported=no
7494 if test x$GCC = xyes; then
7495 CPUS=`getconf _NPROCESSORS_ONLN 2>/dev/null`
7496 if test x$CPUS != x; then
7497 LTO="-flto=$CPUS"
7498 else
7499 LTO="-flto"
7500 fi
7501 old_CFLAGS=$CFLAGS
7502 CFLAGS="$CFLAGS $LTO"
7503 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7504/* end confdefs.h. */
7505
7506int
7507main ()
7508{
7509
7510 ;
7511 return 0;
7512}
7513_ACEOF
7514if ac_fn_c_try_compile "$LINENO"; then :
7515 ac_lto_supported=yes
7516else
7517 ac_lto_supported=no
7518fi
7519rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7520 CFLAGS="$old_CFLAGS"
7521 fi
7522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_lto_supported" >&5
7523$as_echo "$ac_lto_supported" >&6; }
7524 if test "$ac_lto_supported" = "yes"; then
7525 CFLAGS="$CFLAGS $LTO"
7526 fi
7527fi
7528fi
7529
7530
a6b92a4a
GM
7531# gl_GCC_VERSION_IFELSE([major], [minor], [run-if-found], [run-if-not-found])
7532# ------------------------------------------------
7533# If $CPP is gcc-MAJOR.MINOR or newer, then run RUN-IF-FOUND.
7534# Otherwise, run RUN-IF-NOT-FOUND.
7535
7536
7537# When compiling with GCC, prefer -isystem to -I when including system
7538# include files, to avoid generating useless diagnostics for the files.
7539if test "$gl_gcc_warnings" != yes; then
7540 isystem='-I'
7541else
7542 isystem='-isystem '
7543
7544 # This, $nw, is the list of warnings we disable.
7545 nw=
7546
7547 case $with_x_toolkit in
7548 lucid | athena | motif)
7549 # Old toolkits mishandle 'const'.
7550 nw="$nw -Wwrite-strings"
7551 ;;
7552 *)
dcfda130
GM
7553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror -Wunknown-warning-option" >&5
7554$as_echo_n "checking whether C compiler handles -Werror -Wunknown-warning-option... " >&6; }
7555if test "${gl_cv_warn_c__Werror__Wunknown_warning_option+set}" = set; then :
7556 $as_echo_n "(cached) " >&6
7557else
7558
7559 gl_save_compiler_FLAGS="$CFLAGS"
7560 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror -Wunknown-warning-option"
7561 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7562/* end confdefs.h. */
7563
7564int
7565main ()
7566{
7567
7568 ;
7569 return 0;
7570}
7571_ACEOF
7572if ac_fn_c_try_compile "$LINENO"; then :
7573 gl_cv_warn_c__Werror__Wunknown_warning_option=yes
7574else
7575 gl_cv_warn_c__Werror__Wunknown_warning_option=no
7576fi
7577rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7578 CFLAGS="$gl_save_compiler_FLAGS"
7579
7580fi
7581{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror__Wunknown_warning_option" >&5
7582$as_echo "$gl_cv_warn_c__Werror__Wunknown_warning_option" >&6; }
7583if test "x$gl_cv_warn_c__Werror__Wunknown_warning_option" = x""yes; then :
7584 gl_unknown_warnings_are_errors='-Wunknown-warning-option -Werror'
7585else
7586 gl_unknown_warnings_are_errors=
7587fi
7588
7589
7590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror" >&5
a6b92a4a
GM
7591$as_echo_n "checking whether C compiler handles -Werror... " >&6; }
7592if test "${gl_cv_warn_c__Werror+set}" = set; then :
7593 $as_echo_n "(cached) " >&6
7594else
7595
7596 gl_save_compiler_FLAGS="$CFLAGS"
dcfda130 7597 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror"
a6b92a4a 7598 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
7599/* end confdefs.h. */
7600
7601int
7602main ()
7603{
7604
7605 ;
7606 return 0;
7607}
7608_ACEOF
7609if ac_fn_c_try_compile "$LINENO"; then :
a6b92a4a 7610 gl_cv_warn_c__Werror=yes
067d23c9 7611else
a6b92a4a 7612 gl_cv_warn_c__Werror=no
067d23c9
KY
7613fi
7614rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a6b92a4a
GM
7615 CFLAGS="$gl_save_compiler_FLAGS"
7616
7617fi
7618{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror" >&5
7619$as_echo "$gl_cv_warn_c__Werror" >&6; }
7620if test "x$gl_cv_warn_c__Werror" = x""yes; then :
7621 as_fn_append WERROR_CFLAGS " -Werror"
7622fi
7623
0eb775a3 7624
a6b92a4a
GM
7625 ;;
7626 esac
7627
7628
a6b92a4a 7629 nw="$nw -Wsystem-headers" # Don't let system headers trigger warnings
a6b92a4a 7630 nw="$nw -Woverlength-strings" # Not a problem these days
a6b92a4a 7631 nw="$nw -Wlogical-op" # any use of fwrite provokes this
fd9d2a9d 7632 nw="$nw -Wformat-nonliteral" # we do this a lot
a6b92a4a
GM
7633 nw="$nw -Wvla" # warnings in gettext.h
7634 nw="$nw -Wnested-externs" # use of XARGMATCH/verify_function__
a6b92a4a 7635 nw="$nw -Wswitch-default" # Too many warnings for now
fd9d2a9d 7636 nw="$nw -Winline" # OK to ignore 'inline'
6ec9a5a7 7637 nw="$nw -Wjump-misses-init" # We sometimes safely jump over init.
da8ed5ba
GM
7638 nw="$nw -Wstrict-overflow" # OK to optimize assuming that
7639 # signed overflow has undefined behavior
fd9d2a9d
GM
7640 nw="$nw -Wsync-nand" # irrelevant here, and provokes ObjC warning
7641 nw="$nw -Wunsafe-loop-optimizations" # OK to suppress unsafe optimizations
372c83ba 7642 nw="$nw -Wbad-function-cast" # These casts are no worse than others.
a6b92a4a
GM
7643
7644 # Emacs doesn't care about shadowing; see
7645 # <http://lists.gnu.org/archive/html/emacs-diffs/2011-11/msg00265.html>.
7646 nw="$nw -Wshadow"
7647
ad33cb00
GM
7648 # Emacs's use of alloca inhibits protecting the stack.
7649 nw="$nw -Wstack-protector"
7650
da8ed5ba 7651 # The following line should be removable at some point.
a6b92a4a
GM
7652 nw="$nw -Wsuggest-attribute=pure"
7653
fc4002bd
GM
7654 # This part is merely for shortening the command line,
7655 # since -Wno-FOO needs to be added below regardless.
7656 nw="$nw -Wmissing-field-initializers"
7657 nw="$nw -Wswitch"
7658 nw="$nw -Wtype-limits"
7659 nw="$nw -Wunused-parameter"
7660
c081121f
GM
7661 # clang is unduly picky about some things.
7662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler is clang" >&5
7663$as_echo_n "checking whether the compiler is clang... " >&6; }
7664if test "${emacs_cv_clang+set}" = set; then :
7665 $as_echo_n "(cached) " >&6
7666else
7667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7668/* end confdefs.h. */
7669
7670 #ifndef __clang__
7671 #error "not clang"
7672 #endif
7673
7674int
7675main ()
7676{
7677
7678 ;
7679 return 0;
7680}
7681_ACEOF
7682if ac_fn_c_try_compile "$LINENO"; then :
7683 emacs_cv_clang=yes
7684else
7685 emacs_cv_clang=no
7686fi
7687rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7688fi
7689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_clang" >&5
7690$as_echo "$emacs_cv_clang" >&6; }
7691 if test $emacs_cv_clang = yes; then
7692 nw="$nw -Wcast-align"
7693 fi
7694
a6b92a4a
GM
7695
7696
7697 if test -n "$GCC"; then
7698
7699 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is supported" >&5
7700$as_echo_n "checking whether -Wno-missing-field-initializers is supported... " >&6; }
7701 if test "${gl_cv_cc_nomfi_supported+set}" = set; then :
7702 $as_echo_n "(cached) " >&6
7703else
7704
7705 gl_save_CFLAGS="$CFLAGS"
7706 CFLAGS="$CFLAGS -W -Werror -Wno-missing-field-initializers"
7707 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
7708/* end confdefs.h. */
7709
7710int
7711main ()
7712{
7713
7714 ;
7715 return 0;
7716}
7717_ACEOF
7718if ac_fn_c_try_compile "$LINENO"; then :
a6b92a4a 7719 gl_cv_cc_nomfi_supported=yes
067d23c9 7720else
a6b92a4a 7721 gl_cv_cc_nomfi_supported=no
067d23c9
KY
7722fi
7723rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a6b92a4a
GM
7724 CFLAGS="$gl_save_CFLAGS"
7725fi
7726
7727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_supported" >&5
7728$as_echo "$gl_cv_cc_nomfi_supported" >&6; }
7729
7730 if test "$gl_cv_cc_nomfi_supported" = yes; then
7731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is needed" >&5
7732$as_echo_n "checking whether -Wno-missing-field-initializers is needed... " >&6; }
7733 if test "${gl_cv_cc_nomfi_needed+set}" = set; then :
7734 $as_echo_n "(cached) " >&6
7735else
7736
7737 gl_save_CFLAGS="$CFLAGS"
7738 CFLAGS="$CFLAGS -W -Werror"
7739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7740/* end confdefs.h. */
7741void f (void)
7742 {
7743 typedef struct { int a; int b; } s_t;
7744 s_t s1 = { 0, };
7745 }
7746
7747int
7748main ()
7749{
7750
7751 ;
7752 return 0;
7753}
7754_ACEOF
7755if ac_fn_c_try_compile "$LINENO"; then :
7756 gl_cv_cc_nomfi_needed=no
7757else
7758 gl_cv_cc_nomfi_needed=yes
7759fi
7760rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7761 CFLAGS="$gl_save_CFLAGS"
7762
7763fi
7764
7765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_needed" >&5
7766$as_echo "$gl_cv_cc_nomfi_needed" >&6; }
7767 fi
b6c9d18d
GM
7768
7769 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wuninitialized is supported" >&5
7770$as_echo_n "checking whether -Wuninitialized is supported... " >&6; }
7771 if test "${gl_cv_cc_uninitialized_supported+set}" = set; then :
7772 $as_echo_n "(cached) " >&6
7773else
7774
7775 gl_save_CFLAGS="$CFLAGS"
7776 CFLAGS="$CFLAGS -Werror -Wuninitialized"
7777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7778/* end confdefs.h. */
7779
7780int
7781main ()
7782{
7783
7784 ;
7785 return 0;
7786}
7787_ACEOF
7788if ac_fn_c_try_compile "$LINENO"; then :
7789 gl_cv_cc_uninitialized_supported=yes
7790else
7791 gl_cv_cc_uninitialized_supported=no
7792fi
7793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7794 CFLAGS="$gl_save_CFLAGS"
7795fi
7796
7797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_uninitialized_supported" >&5
7798$as_echo "$gl_cv_cc_uninitialized_supported" >&6; }
7799
a6b92a4a
GM
7800 fi
7801
b6c9d18d 7802 # List all gcc warning categories.
a6b92a4a
GM
7803 gl_manywarn_set=
7804 for gl_manywarn_item in \
a6b92a4a 7805 -W \
dcde497f
GM
7806 -Wabi \
7807 -Waddress \
dcfda130 7808 -Waggressive-loop-optimizations \
dcde497f
GM
7809 -Wall \
7810 -Warray-bounds \
7811 -Wattributes \
a6b92a4a 7812 -Wbad-function-cast \
a6b92a4a 7813 -Wbuiltin-macro-redefined \
dcde497f
GM
7814 -Wcast-align \
7815 -Wchar-subscripts \
7816 -Wclobbered \
7817 -Wcomment \
7818 -Wcomments \
a6b92a4a 7819 -Wcoverage-mismatch \
a6b92a4a
GM
7820 -Wcpp \
7821 -Wdeprecated \
7822 -Wdeprecated-declarations \
dcde497f 7823 -Wdisabled-optimization \
a6b92a4a
GM
7824 -Wdiv-by-zero \
7825 -Wdouble-promotion \
dcde497f 7826 -Wempty-body \
a6b92a4a 7827 -Wendif-labels \
dcde497f 7828 -Wenum-compare \
a6b92a4a
GM
7829 -Wextra \
7830 -Wformat-contains-nul \
7831 -Wformat-extra-args \
dcde497f
GM
7832 -Wformat-nonliteral \
7833 -Wformat-security \
7834 -Wformat-y2k \
a6b92a4a 7835 -Wformat-zero-length \
dcde497f
GM
7836 -Wfree-nonheap-object \
7837 -Wignored-qualifiers \
7838 -Wimplicit \
7839 -Wimplicit-function-declaration \
7840 -Wimplicit-int \
7841 -Winit-self \
7842 -Winline \
7843 -Wint-to-pointer-cast \
7844 -Winvalid-memory-model \
7845 -Winvalid-pch \
7846 -Wjump-misses-init \
7847 -Wlogical-op \
7848 -Wmain \
7849 -Wmaybe-uninitialized \
7850 -Wmissing-braces \
7851 -Wmissing-declarations \
7852 -Wmissing-field-initializers \
dcde497f 7853 -Wmissing-include-dirs \
dcde497f
GM
7854 -Wmissing-parameter-type \
7855 -Wmissing-prototypes \
7856 -Wmudflap \
a6b92a4a 7857 -Wmultichar \
dcde497f
GM
7858 -Wnarrowing \
7859 -Wnested-externs \
7860 -Wnonnull \
a6b92a4a 7861 -Wnormalized=nfc \
dcde497f
GM
7862 -Wold-style-declaration \
7863 -Wold-style-definition \
a6b92a4a 7864 -Woverflow \
dcde497f
GM
7865 -Woverlength-strings \
7866 -Woverride-init \
7867 -Wpacked \
7868 -Wpacked-bitfield-compat \
7869 -Wparentheses \
7870 -Wpointer-arith \
7871 -Wpointer-sign \
a6b92a4a
GM
7872 -Wpointer-to-int-cast \
7873 -Wpragmas \
dcfda130 7874 -Wreturn-local-addr \
dcde497f
GM
7875 -Wreturn-type \
7876 -Wsequence-point \
7877 -Wshadow \
7878 -Wsizeof-pointer-memaccess \
7879 -Wstack-protector \
7880 -Wstrict-aliasing \
7881 -Wstrict-overflow \
7882 -Wstrict-prototypes \
a6b92a4a 7883 -Wsuggest-attribute=const \
dcde497f 7884 -Wsuggest-attribute=format \
a6b92a4a
GM
7885 -Wsuggest-attribute=noreturn \
7886 -Wsuggest-attribute=pure \
dcde497f
GM
7887 -Wswitch \
7888 -Wswitch-default \
7889 -Wsync-nand \
7890 -Wsystem-headers \
a6b92a4a 7891 -Wtrampolines \
dcde497f
GM
7892 -Wtrigraphs \
7893 -Wtype-limits \
7894 -Wuninitialized \
7895 -Wunknown-pragmas \
dcde497f
GM
7896 -Wunsafe-loop-optimizations \
7897 -Wunused \
7898 -Wunused-but-set-parameter \
7899 -Wunused-but-set-variable \
7900 -Wunused-function \
7901 -Wunused-label \
7902 -Wunused-local-typedefs \
7903 -Wunused-macros \
7904 -Wunused-parameter \
7905 -Wunused-result \
7906 -Wunused-value \
7907 -Wunused-variable \
7908 -Wvarargs \
7909 -Wvariadic-macros \
7910 -Wvector-operation-performance \
7911 -Wvla \
7912 -Wvolatile-register-var \
7913 -Wwrite-strings \
7914 \
a6b92a4a
GM
7915 ; do
7916 gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
7917 done
7918
b6c9d18d 7919 # Disable specific options as needed.
a6b92a4a
GM
7920 if test "$gl_cv_cc_nomfi_needed" = yes; then
7921 gl_manywarn_set="$gl_manywarn_set -Wno-missing-field-initializers"
7922 fi
7923
b6c9d18d
GM
7924 if test "$gl_cv_cc_uninitialized_supported" = no; then
7925 gl_manywarn_set="$gl_manywarn_set -Wno-uninitialized"
7926 fi
7927
a6b92a4a
GM
7928 ws=$gl_manywarn_set
7929
7930
7931 gl_warn_set=
7932 set x $ws; shift
7933 for gl_warn_item
7934 do
7935 case " $nw " in
7936 *" $gl_warn_item "*)
7937 ;;
7938 *)
7939 gl_warn_set="$gl_warn_set $gl_warn_item"
7940 ;;
7941 esac
7942 done
7943 ws=$gl_warn_set
7944
7945 for w in $ws; do
dcfda130
GM
7946
7947as_gl_Warn=`$as_echo "gl_cv_warn_c_$w" | $as_tr_sh`
6e64a12b
GM
7948gl_positive="$w"
7949case $gl_positive in
7950 -Wno-*) gl_positive=-W`expr "X$gl_positive" : 'X-Wno-\(.*\)'` ;;
7951esac
a6b92a4a
GM
7952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles $w" >&5
7953$as_echo_n "checking whether C compiler handles $w... " >&6; }
7954if { as_var=$as_gl_Warn; eval "test \"\${$as_var+set}\" = set"; }; then :
7955 $as_echo_n "(cached) " >&6
7956else
7957
7958 gl_save_compiler_FLAGS="$CFLAGS"
6e64a12b 7959 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors $gl_positive"
a6b92a4a
GM
7960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7961/* end confdefs.h. */
7962
7963int
7964main ()
7965{
7966
7967 ;
7968 return 0;
7969}
7970_ACEOF
7971if ac_fn_c_try_compile "$LINENO"; then :
7972 eval "$as_gl_Warn=yes"
7973else
7974 eval "$as_gl_Warn=no"
7975fi
7976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7977 CFLAGS="$gl_save_compiler_FLAGS"
7978
7979fi
7980eval ac_res=\$$as_gl_Warn
7981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7982$as_echo "$ac_res" >&6; }
7983eval as_val=\$$as_gl_Warn
7984 if test "x$as_val" = x""yes; then :
7985 as_fn_append WARN_CFLAGS " $w"
7986fi
7987
0eb775a3 7988
a6b92a4a 7989 done
dcfda130
GM
7990
7991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-missing-field-initializers" >&5
a6b92a4a
GM
7992$as_echo_n "checking whether C compiler handles -Wno-missing-field-initializers... " >&6; }
7993if test "${gl_cv_warn_c__Wno_missing_field_initializers+set}" = set; then :
7994 $as_echo_n "(cached) " >&6
7995else
7996
7997 gl_save_compiler_FLAGS="$CFLAGS"
6e64a12b 7998 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wmissing-field-initializers"
a6b92a4a
GM
7999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8000/* end confdefs.h. */
8001
8002int
8003main ()
8004{
8005
8006 ;
8007 return 0;
8008}
8009_ACEOF
8010if ac_fn_c_try_compile "$LINENO"; then :
8011 gl_cv_warn_c__Wno_missing_field_initializers=yes
8012else
8013 gl_cv_warn_c__Wno_missing_field_initializers=no
8014fi
8015rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8016 CFLAGS="$gl_save_compiler_FLAGS"
8017
8018fi
8019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_missing_field_initializers" >&5
8020$as_echo "$gl_cv_warn_c__Wno_missing_field_initializers" >&6; }
8021if test "x$gl_cv_warn_c__Wno_missing_field_initializers" = x""yes; then :
8022 as_fn_append WARN_CFLAGS " -Wno-missing-field-initializers"
8023fi
0eb775a3 8024
a6b92a4a 8025 # We need this one
dcfda130
GM
8026
8027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-sign-compare" >&5
a6b92a4a
GM
8028$as_echo_n "checking whether C compiler handles -Wno-sign-compare... " >&6; }
8029if test "${gl_cv_warn_c__Wno_sign_compare+set}" = set; then :
8030 $as_echo_n "(cached) " >&6
8031else
8032
8033 gl_save_compiler_FLAGS="$CFLAGS"
6e64a12b 8034 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wsign-compare"
a6b92a4a
GM
8035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8036/* end confdefs.h. */
8037
8038int
8039main ()
8040{
8041
8042 ;
8043 return 0;
8044}
8045_ACEOF
8046if ac_fn_c_try_compile "$LINENO"; then :
8047 gl_cv_warn_c__Wno_sign_compare=yes
8048else
8049 gl_cv_warn_c__Wno_sign_compare=no
8050fi
8051rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8052 CFLAGS="$gl_save_compiler_FLAGS"
8053
8054fi
8055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_sign_compare" >&5
8056$as_echo "$gl_cv_warn_c__Wno_sign_compare" >&6; }
8057if test "x$gl_cv_warn_c__Wno_sign_compare" = x""yes; then :
8058 as_fn_append WARN_CFLAGS " -Wno-sign-compare"
8059fi
0eb775a3 8060
a6b92a4a 8061 # Too many warnings for now
dcfda130
GM
8062
8063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-type-limits" >&5
a6b92a4a
GM
8064$as_echo_n "checking whether C compiler handles -Wno-type-limits... " >&6; }
8065if test "${gl_cv_warn_c__Wno_type_limits+set}" = set; then :
8066 $as_echo_n "(cached) " >&6
8067else
8068
8069 gl_save_compiler_FLAGS="$CFLAGS"
6e64a12b 8070 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wtype-limits"
a6b92a4a
GM
8071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8072/* end confdefs.h. */
8073
8074int
8075main ()
8076{
8077
8078 ;
8079 return 0;
8080}
8081_ACEOF
8082if ac_fn_c_try_compile "$LINENO"; then :
8083 gl_cv_warn_c__Wno_type_limits=yes
8084else
8085 gl_cv_warn_c__Wno_type_limits=no
8086fi
8087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8088 CFLAGS="$gl_save_compiler_FLAGS"
8089
8090fi
8091{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_type_limits" >&5
8092$as_echo "$gl_cv_warn_c__Wno_type_limits" >&6; }
8093if test "x$gl_cv_warn_c__Wno_type_limits" = x""yes; then :
8094 as_fn_append WARN_CFLAGS " -Wno-type-limits"
8095fi
0eb775a3 8096
a6b92a4a 8097 # Too many warnings for now
dcfda130
GM
8098
8099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-switch" >&5
a6b92a4a
GM
8100$as_echo_n "checking whether C compiler handles -Wno-switch... " >&6; }
8101if test "${gl_cv_warn_c__Wno_switch+set}" = set; then :
8102 $as_echo_n "(cached) " >&6
8103else
8104
8105 gl_save_compiler_FLAGS="$CFLAGS"
6e64a12b 8106 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wswitch"
a6b92a4a
GM
8107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8108/* end confdefs.h. */
8109
8110int
8111main ()
8112{
8113
8114 ;
8115 return 0;
8116}
8117_ACEOF
8118if ac_fn_c_try_compile "$LINENO"; then :
8119 gl_cv_warn_c__Wno_switch=yes
8120else
8121 gl_cv_warn_c__Wno_switch=no
8122fi
8123rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8124 CFLAGS="$gl_save_compiler_FLAGS"
8125
8126fi
8127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_switch" >&5
8128$as_echo "$gl_cv_warn_c__Wno_switch" >&6; }
8129if test "x$gl_cv_warn_c__Wno_switch" = x""yes; then :
8130 as_fn_append WARN_CFLAGS " -Wno-switch"
8131fi
0eb775a3 8132
a6b92a4a 8133 # Too many warnings for now
dcfda130
GM
8134
8135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-parameter" >&5
a6b92a4a
GM
8136$as_echo_n "checking whether C compiler handles -Wno-unused-parameter... " >&6; }
8137if test "${gl_cv_warn_c__Wno_unused_parameter+set}" = set; then :
8138 $as_echo_n "(cached) " >&6
8139else
8140
8141 gl_save_compiler_FLAGS="$CFLAGS"
6e64a12b 8142 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wunused-parameter"
a6b92a4a
GM
8143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8144/* end confdefs.h. */
8145
8146int
8147main ()
8148{
8149
8150 ;
8151 return 0;
8152}
8153_ACEOF
8154if ac_fn_c_try_compile "$LINENO"; then :
8155 gl_cv_warn_c__Wno_unused_parameter=yes
8156else
8157 gl_cv_warn_c__Wno_unused_parameter=no
8158fi
8159rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8160 CFLAGS="$gl_save_compiler_FLAGS"
8161
8162fi
8163{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_parameter" >&5
8164$as_echo "$gl_cv_warn_c__Wno_unused_parameter" >&6; }
8165if test "x$gl_cv_warn_c__Wno_unused_parameter" = x""yes; then :
8166 as_fn_append WARN_CFLAGS " -Wno-unused-parameter"
8167fi
0eb775a3 8168
a6b92a4a 8169 # Too many warnings for now
dcfda130
GM
8170
8171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-format-nonliteral" >&5
a6b92a4a
GM
8172$as_echo_n "checking whether C compiler handles -Wno-format-nonliteral... " >&6; }
8173if test "${gl_cv_warn_c__Wno_format_nonliteral+set}" = set; then :
8174 $as_echo_n "(cached) " >&6
8175else
8176
8177 gl_save_compiler_FLAGS="$CFLAGS"
6e64a12b 8178 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wformat-nonliteral"
a6b92a4a
GM
8179 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8180/* end confdefs.h. */
8181
8182int
8183main ()
8184{
8185
8186 ;
8187 return 0;
8188}
8189_ACEOF
8190if ac_fn_c_try_compile "$LINENO"; then :
8191 gl_cv_warn_c__Wno_format_nonliteral=yes
8192else
8193 gl_cv_warn_c__Wno_format_nonliteral=no
8194fi
8195rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8196 CFLAGS="$gl_save_compiler_FLAGS"
8197
8198fi
8199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_format_nonliteral" >&5
8200$as_echo "$gl_cv_warn_c__Wno_format_nonliteral" >&6; }
8201if test "x$gl_cv_warn_c__Wno_format_nonliteral" = x""yes; then :
8202 as_fn_append WARN_CFLAGS " -Wno-format-nonliteral"
8203fi
8204
8205
0eb775a3 8206
a6b92a4a
GM
8207 # In spite of excluding -Wlogical-op above, it is enabled, as of
8208 # gcc 4.5.0 20090517.
dcfda130
GM
8209
8210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-logical-op" >&5
a6b92a4a
GM
8211$as_echo_n "checking whether C compiler handles -Wno-logical-op... " >&6; }
8212if test "${gl_cv_warn_c__Wno_logical_op+set}" = set; then :
8213 $as_echo_n "(cached) " >&6
8214else
8215
8216 gl_save_compiler_FLAGS="$CFLAGS"
6e64a12b 8217 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wlogical-op"
a6b92a4a
GM
8218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8219/* end confdefs.h. */
8220
8221int
8222main ()
8223{
8224
8225 ;
8226 return 0;
8227}
8228_ACEOF
8229if ac_fn_c_try_compile "$LINENO"; then :
8230 gl_cv_warn_c__Wno_logical_op=yes
8231else
8232 gl_cv_warn_c__Wno_logical_op=no
8233fi
8234rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8235 CFLAGS="$gl_save_compiler_FLAGS"
8236
8237fi
8238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_logical_op" >&5
8239$as_echo "$gl_cv_warn_c__Wno_logical_op" >&6; }
8240if test "x$gl_cv_warn_c__Wno_logical_op" = x""yes; then :
8241 as_fn_append WARN_CFLAGS " -Wno-logical-op"
8242fi
8243
8244
0eb775a3 8245
c081121f
GM
8246 # More things that clang is unduly picky about.
8247 if test $emacs_cv_clang = yes; then
8248
8249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-format-extra-args" >&5
8250$as_echo_n "checking whether C compiler handles -Wno-format-extra-args... " >&6; }
8251if test "${gl_cv_warn_c__Wno_format_extra_args+set}" = set; then :
8252 $as_echo_n "(cached) " >&6
8253else
8254
8255 gl_save_compiler_FLAGS="$CFLAGS"
6e64a12b 8256 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wformat-extra-args"
c081121f
GM
8257 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8258/* end confdefs.h. */
8259
8260int
8261main ()
8262{
8263
8264 ;
8265 return 0;
8266}
8267_ACEOF
8268if ac_fn_c_try_compile "$LINENO"; then :
8269 gl_cv_warn_c__Wno_format_extra_args=yes
8270else
8271 gl_cv_warn_c__Wno_format_extra_args=no
8272fi
8273rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8274 CFLAGS="$gl_save_compiler_FLAGS"
8275
8276fi
8277{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_format_extra_args" >&5
8278$as_echo "$gl_cv_warn_c__Wno_format_extra_args" >&6; }
8279if test "x$gl_cv_warn_c__Wno_format_extra_args" = x""yes; then :
8280 as_fn_append WARN_CFLAGS " -Wno-format-extra-args"
8281fi
8282
8283
8284
8285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-tautological-constant-out-of-range-compare" >&5
8286$as_echo_n "checking whether C compiler handles -Wno-tautological-constant-out-of-range-compare... " >&6; }
8287if test "${gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare+set}" = set; then :
8288 $as_echo_n "(cached) " >&6
8289else
8290
8291 gl_save_compiler_FLAGS="$CFLAGS"
6e64a12b 8292 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wtautological-constant-out-of-range-compare"
c081121f
GM
8293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8294/* end confdefs.h. */
8295
8296int
8297main ()
8298{
8299
8300 ;
8301 return 0;
8302}
8303_ACEOF
8304if ac_fn_c_try_compile "$LINENO"; then :
8305 gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare=yes
8306else
8307 gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare=no
8308fi
8309rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8310 CFLAGS="$gl_save_compiler_FLAGS"
8311
8312fi
8313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare" >&5
8314$as_echo "$gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare" >&6; }
8315if test "x$gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare" = x""yes; then :
8316 as_fn_append WARN_CFLAGS " -Wno-tautological-constant-out-of-range-compare"
8317fi
8318
8319
8320
8321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-command-line-argument" >&5
8322$as_echo_n "checking whether C compiler handles -Wno-unused-command-line-argument... " >&6; }
8323if test "${gl_cv_warn_c__Wno_unused_command_line_argument+set}" = set; then :
8324 $as_echo_n "(cached) " >&6
8325else
8326
8327 gl_save_compiler_FLAGS="$CFLAGS"
6e64a12b 8328 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wunused-command-line-argument"
c081121f
GM
8329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8330/* end confdefs.h. */
8331
8332int
8333main ()
8334{
8335
8336 ;
8337 return 0;
8338}
8339_ACEOF
8340if ac_fn_c_try_compile "$LINENO"; then :
8341 gl_cv_warn_c__Wno_unused_command_line_argument=yes
8342else
8343 gl_cv_warn_c__Wno_unused_command_line_argument=no
8344fi
8345rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8346 CFLAGS="$gl_save_compiler_FLAGS"
8347
8348fi
8349{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_command_line_argument" >&5
8350$as_echo "$gl_cv_warn_c__Wno_unused_command_line_argument" >&6; }
8351if test "x$gl_cv_warn_c__Wno_unused_command_line_argument" = x""yes; then :
8352 as_fn_append WARN_CFLAGS " -Wno-unused-command-line-argument"
8353fi
8354
8355
8356
8357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-value" >&5
8358$as_echo_n "checking whether C compiler handles -Wno-unused-value... " >&6; }
8359if test "${gl_cv_warn_c__Wno_unused_value+set}" = set; then :
8360 $as_echo_n "(cached) " >&6
8361else
8362
8363 gl_save_compiler_FLAGS="$CFLAGS"
6e64a12b 8364 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wunused-value"
c081121f
GM
8365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8366/* end confdefs.h. */
8367
8368int
8369main ()
8370{
8371
8372 ;
8373 return 0;
8374}
8375_ACEOF
8376if ac_fn_c_try_compile "$LINENO"; then :
8377 gl_cv_warn_c__Wno_unused_value=yes
8378else
8379 gl_cv_warn_c__Wno_unused_value=no
8380fi
8381rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8382 CFLAGS="$gl_save_compiler_FLAGS"
8383
8384fi
8385{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_value" >&5
8386$as_echo "$gl_cv_warn_c__Wno_unused_value" >&6; }
8387if test "x$gl_cv_warn_c__Wno_unused_value" = x""yes; then :
8388 as_fn_append WARN_CFLAGS " -Wno-unused-value"
8389fi
8390
8391
8392 fi
8393
dcfda130
GM
8394
8395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fdiagnostics-show-option" >&5
a6b92a4a
GM
8396$as_echo_n "checking whether C compiler handles -fdiagnostics-show-option... " >&6; }
8397if test "${gl_cv_warn_c__fdiagnostics_show_option+set}" = set; then :
8398 $as_echo_n "(cached) " >&6
8399else
8400
8401 gl_save_compiler_FLAGS="$CFLAGS"
dcfda130 8402 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fdiagnostics-show-option"
a6b92a4a 8403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
8404/* end confdefs.h. */
8405
8406int
8407main ()
8408{
8409
8410 ;
8411 return 0;
8412}
8413_ACEOF
8414if ac_fn_c_try_compile "$LINENO"; then :
a6b92a4a 8415 gl_cv_warn_c__fdiagnostics_show_option=yes
067d23c9 8416else
a6b92a4a 8417 gl_cv_warn_c__fdiagnostics_show_option=no
067d23c9
KY
8418fi
8419rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a6b92a4a
GM
8420 CFLAGS="$gl_save_compiler_FLAGS"
8421
8422fi
8423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fdiagnostics_show_option" >&5
8424$as_echo "$gl_cv_warn_c__fdiagnostics_show_option" >&6; }
8425if test "x$gl_cv_warn_c__fdiagnostics_show_option" = x""yes; then :
8426 as_fn_append WARN_CFLAGS " -fdiagnostics-show-option"
067d23c9 8427fi
067d23c9 8428
0eb775a3 8429
dcfda130
GM
8430
8431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -funit-at-a-time" >&5
a6b92a4a
GM
8432$as_echo_n "checking whether C compiler handles -funit-at-a-time... " >&6; }
8433if test "${gl_cv_warn_c__funit_at_a_time+set}" = set; then :
8434 $as_echo_n "(cached) " >&6
8435else
8436
8437 gl_save_compiler_FLAGS="$CFLAGS"
dcfda130 8438 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -funit-at-a-time"
a6b92a4a
GM
8439 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8440/* end confdefs.h. */
8441
8442int
8443main ()
8444{
8445
8446 ;
8447 return 0;
8448}
8449_ACEOF
8450if ac_fn_c_try_compile "$LINENO"; then :
8451 gl_cv_warn_c__funit_at_a_time=yes
8452else
8453 gl_cv_warn_c__funit_at_a_time=no
8454fi
8455rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8456 CFLAGS="$gl_save_compiler_FLAGS"
8457
8458fi
8459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__funit_at_a_time" >&5
8460$as_echo "$gl_cv_warn_c__funit_at_a_time" >&6; }
8461if test "x$gl_cv_warn_c__funit_at_a_time" = x""yes; then :
8462 as_fn_append WARN_CFLAGS " -funit-at-a-time"
8463fi
8464
8465
8466
0eb775a3 8467
a6b92a4a
GM
8468$as_echo "#define lint 1" >>confdefs.h
8469
8470
a6b92a4a
GM
8471
8472$as_echo "#define GNULIB_PORTCHECK 1" >>confdefs.h
8473
8474
8475 # We use a slightly smaller set of warning options for lib/.
8476 # Remove the following and save the result in GNULIB_WARN_CFLAGS.
8477 nw=
8478 nw="$nw -Wunused-macros"
8479
8480
8481 gl_warn_set=
8482 set x $WARN_CFLAGS; shift
8483 for gl_warn_item
8484 do
8485 case " $nw " in
8486 *" $gl_warn_item "*)
8487 ;;
8488 *)
8489 gl_warn_set="$gl_warn_set $gl_warn_item"
8490 ;;
8491 esac
8492 done
8493 GNULIB_WARN_CFLAGS=$gl_warn_set
8494
8495
8496fi
067d23c9
KY
8497
8498
8499
4c5f4270
GM
8500
8501
8502
8503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works for files in the same directory" >&5
8504$as_echo_n "checking whether ln -s works for files in the same directory... " >&6; }
8505rm -f conf$$ conf$$.file
8506
8507LN_S_FILEONLY='cp -p'
8508
8509if (echo >conf$$.file) 2>/dev/null; then
8510 if ln -s conf$$.file conf$$ 2>/dev/null; then
8511 LN_S_FILEONLY='ln -s'
8512 elif ln conf$$.file conf$$ 2>/dev/null; then
8513 LN_S_FILEONLY=ln
8514 fi
8515fi
8516
8517rm -f conf$$ conf$$.file
8518
8519if test "$LN_S_FILEONLY" = "ln -s"; then
8520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
0e733db9
GM
8521$as_echo "yes" >&6; }
8522else
4c5f4270
GM
8523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S_FILEONLY" >&5
8524$as_echo "no, using $LN_S_FILEONLY" >&6; }
0e733db9
GM
8525fi
8526
067d23c9 8527
4c5f4270
GM
8528
8529
7c61eaab
GM
8530if test "$opsys" = "mingw32"; then
8531 LN_S="ln"
8532fi
8533
067d23c9
KY
8534# Extract the first word of "install-info", so it can be a program name with args.
8535set dummy install-info; ac_word=$2
8536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8537$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 8538if test "${ac_cv_path_INSTALL_INFO+set}" = set; then :
067d23c9
KY
8539 $as_echo_n "(cached) " >&6
8540else
8541 case $INSTALL_INFO in
8542 [\\/]* | ?:[\\/]*)
8543 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
8544 ;;
8545 *)
8546 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
e700232f 8547for as_dir in $PATH$PATH_SEPARATOR/usr/sbin$PATH_SEPARATOR/sbin
067d23c9
KY
8548do
8549 IFS=$as_save_IFS
8550 test -z "$as_dir" && as_dir=.
8551 for ac_exec_ext in '' $ac_executable_extensions; do
8552 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8553 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
8554 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8555 break 2
8556 fi
8557done
8558 done
8559IFS=$as_save_IFS
8560
8561 test -z "$ac_cv_path_INSTALL_INFO" && ac_cv_path_INSTALL_INFO=":"
8562 ;;
8563esac
8564fi
8565INSTALL_INFO=$ac_cv_path_INSTALL_INFO
8566if test -n "$INSTALL_INFO"; then
8567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_INFO" >&5
8568$as_echo "$INSTALL_INFO" >&6; }
8569else
8570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8571$as_echo "no" >&6; }
8572fi
8573
8574
8575# Extract the first word of "gzip", so it can be a program name with args.
8576set dummy gzip; ac_word=$2
8577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8578$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 8579if test "${ac_cv_path_GZIP_PROG+set}" = set; then :
067d23c9
KY
8580 $as_echo_n "(cached) " >&6
8581else
8582 case $GZIP_PROG in
8583 [\\/]* | ?:[\\/]*)
8584 ac_cv_path_GZIP_PROG="$GZIP_PROG" # Let the user override the test with a path.
8585 ;;
8586 *)
8587 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8588for as_dir in $PATH
8589do
8590 IFS=$as_save_IFS
8591 test -z "$as_dir" && as_dir=.
8592 for ac_exec_ext in '' $ac_executable_extensions; do
8593 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8594 ac_cv_path_GZIP_PROG="$as_dir/$ac_word$ac_exec_ext"
8595 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8596 break 2
8597 fi
8598done
8599 done
8600IFS=$as_save_IFS
8601
8602 ;;
8603esac
8604fi
8605GZIP_PROG=$ac_cv_path_GZIP_PROG
8606if test -n "$GZIP_PROG"; then
8607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP_PROG" >&5
8608$as_echo "$GZIP_PROG" >&6; }
8609else
8610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8611$as_echo "no" >&6; }
8612fi
8613
8614
7ee3791f 8615
992ec28a
GM
8616test $with_compress_install != yes && test -n "$GZIP_PROG" && \
8617 GZIP_PROG=" # $GZIP_PROG # (disabled by configure --without-compress-install)"
8618
7ee3791f
GM
8619if test $opsys = gnu-linux; then
8620 # Extract the first word of "paxctl", so it can be a program name with args.
9c29597b
GM
8621set dummy paxctl; ac_word=$2
8622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8623$as_echo_n "checking for $ac_word... " >&6; }
8624if test "${ac_cv_path_PAXCTL+set}" = set; then :
8625 $as_echo_n "(cached) " >&6
8626else
8627 case $PAXCTL in
8628 [\\/]* | ?:[\\/]*)
8629 ac_cv_path_PAXCTL="$PAXCTL" # Let the user override the test with a path.
8630 ;;
8631 *)
8632 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8633for as_dir in $PATH$PATH_SEPARATOR/sbin$PATH_SEPARATOR/usr/sbin
8634do
8635 IFS=$as_save_IFS
8636 test -z "$as_dir" && as_dir=.
8637 for ac_exec_ext in '' $ac_executable_extensions; do
8638 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8639 ac_cv_path_PAXCTL="$as_dir/$ac_word$ac_exec_ext"
8640 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8641 break 2
8642 fi
8643done
8644 done
8645IFS=$as_save_IFS
8646
8647 ;;
8648esac
8649fi
8650PAXCTL=$ac_cv_path_PAXCTL
8651if test -n "$PAXCTL"; then
8652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PAXCTL" >&5
8653$as_echo "$PAXCTL" >&6; }
8654else
8655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8656$as_echo "no" >&6; }
8657fi
8658
8659
685e57ea
GM
8660 if test "X$PAXCTL" != X; then
8661 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether binaries have a PT_PAX_FLAGS header" >&5
8662$as_echo_n "checking whether binaries have a PT_PAX_FLAGS header... " >&6; }
8663 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8664/* end confdefs.h. */
8665
8666int
8667main ()
8668{
8669
8670 ;
8671 return 0;
8672}
8673_ACEOF
8674if ac_fn_c_try_link "$LINENO"; then :
8675 if $PAXCTL -v conftest$EXEEXT >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8676$as_echo "yes" >&6; }
8677 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8678$as_echo "no" >&6; }; PAXCTL=""; fi
8679fi
8680rm -f core conftest.err conftest.$ac_objext \
8681 conftest$ac_exeext conftest.$ac_ext
8682 fi
7ee3791f 8683fi
067d23c9 8684
9e40dda4 8685## Need makeinfo >= 4.7 (?) to build the manuals.
067d23c9
KY
8686# Extract the first word of "makeinfo", so it can be a program name with args.
8687set dummy makeinfo; ac_word=$2
8688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8689$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 8690if test "${ac_cv_path_MAKEINFO+set}" = set; then :
067d23c9
KY
8691 $as_echo_n "(cached) " >&6
8692else
8693 case $MAKEINFO in
8694 [\\/]* | ?:[\\/]*)
8695 ac_cv_path_MAKEINFO="$MAKEINFO" # Let the user override the test with a path.
8696 ;;
8697 *)
8698 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8699for as_dir in $PATH
8700do
8701 IFS=$as_save_IFS
8702 test -z "$as_dir" && as_dir=.
8703 for ac_exec_ext in '' $ac_executable_extensions; do
8704 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8705 ac_cv_path_MAKEINFO="$as_dir/$ac_word$ac_exec_ext"
8706 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8707 break 2
8708 fi
8709done
8710 done
8711IFS=$as_save_IFS
8712
8713 test -z "$ac_cv_path_MAKEINFO" && ac_cv_path_MAKEINFO="no"
8714 ;;
8715esac
8716fi
8717MAKEINFO=$ac_cv_path_MAKEINFO
8718if test -n "$MAKEINFO"; then
8719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKEINFO" >&5
8720$as_echo "$MAKEINFO" >&6; }
8721else
8722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8723$as_echo "no" >&6; }
8724fi
8725
8726
b5591ebb
GM
8727if test "$MAKEINFO" != "no"; then
8728 case `
8729 $MAKEINFO --version 2> /dev/null |
8730 $EGREP 'texinfo[^0-9]*([1-4][0-9]+|[5-9]|4\.[7-9]|4\.[1-6][0-9]+)'
8731 ` in
8732 '') MAKEINFO=no;;
8733 esac
067d23c9
KY
8734fi
8735
8736## Makeinfo is unusual. For a released Emacs, the manuals are
8737## pre-built, and not deleted by the normal clean rules. makeinfo is
8738## therefore in the category of "special tools" not normally required, which
8739## configure does not have to check for (eg autoconf itself).
8740## In a Bazaar checkout on the other hand, the manuals are not included.
8741## So makeinfo is a requirement to build from Bazaar, and configure
8742## should test for it as it does for any other build requirement.
8743## We use the presence of $srcdir/info/emacs to distinguish a release,
8744## with pre-built manuals, from a Bazaar checkout.
96f129d5
GM
8745HAVE_MAKEINFO=yes
8746
067d23c9 8747if test "$MAKEINFO" = "no"; then
96f129d5 8748 MAKEINFO=makeinfo
067d23c9 8749 if test "x${with_makeinfo}" = "xno"; then
96f129d5 8750 HAVE_MAKEINFO=no
b5591ebb 8751 elif test ! -e "$srcdir/info/emacs" && test ! -e "$srcdir/info/emacs.info"; then
9e40dda4 8752 as_fn_error "You do not seem to have makeinfo >= 4.7, and your
067d23c9
KY
8753source tree does not seem to have pre-built manuals in the \`info' directory.
8754Either install a suitable version of makeinfo, or re-run configure
8755with the \`--without-makeinfo' option to build without the manuals. " "$LINENO" 5
8756 fi
8757fi
8758
8759
141d074d
GM
8760INFO_EXT=.info
8761INFO_OPTS=--no-split
8762
8763
8764
ffeb6dec 8765if test $opsys = mingw32; then
c65a2df9 8766 DOCMISC_W32=efaq-w32
ffeb6dec 8767else
c65a2df9 8768 DOCMISC_W32=
ffeb6dec
GM
8769fi
8770
8771
8772
067d23c9
KY
8773if test x$GCC = xyes; then
8774 test "x$GCC_LINK_TEST_OPTIONS" != x && \
8775 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
8776else
8777 test "x$NON_GCC_LINK_TEST_OPTIONS" != x && \
8778 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
8779fi
8780
8781
57f26ea7 8782late_LDFLAGS="$LDFLAGS"
067d23c9 8783if test x$GCC = xyes; then
992ec28a 8784 LDFLAGS_NOCOMBRELOC="-Wl,-znocombreloc"
067d23c9 8785else
992ec28a 8786 LDFLAGS_NOCOMBRELOC="-znocombreloc"
067d23c9
KY
8787fi
8788
992ec28a
GM
8789LDFLAGS="$LDFLAGS $LDFLAGS_NOCOMBRELOC"
8790
067d23c9
KY
8791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -znocombreloc" >&5
8792$as_echo_n "checking for -znocombreloc... " >&6; }
8793cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8794/* end confdefs.h. */
8795
8796int
8797main ()
8798{
8799
8800 ;
8801 return 0;
8802}
8803_ACEOF
8804if ac_fn_c_try_link "$LINENO"; then :
8805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8806$as_echo "yes" >&6; }
8807else
992ec28a 8808 LDFLAGS_NOCOMBRELOC=
067d23c9
KY
8809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8810$as_echo "no" >&6; }
8811fi
8812rm -f core conftest.err conftest.$ac_objext \
8813 conftest$ac_exeext conftest.$ac_ext
8814
57f26ea7 8815LDFLAGS="$late_LDFLAGS"
067d23c9 8816
125c3718 8817test "x$CANNOT_DUMP" = "x" && CANNOT_DUMP=no
067d23c9 8818case "$opsys" in
125c3718
PE
8819 your-opsys-here) CANNOT_DUMP=yes ;;
8820esac
8821
8822test "$CANNOT_DUMP" = "yes" && \
067d23c9
KY
8823
8824$as_echo "#define CANNOT_DUMP 1" >>confdefs.h
8825
125c3718 8826
067d23c9
KY
8827
8828
8829
8830UNEXEC_OBJ=unexelf.o
8831case "$opsys" in
8832 # MSDOS uses unexcoff.o
067d23c9
KY
8833 aix4-2)
8834 UNEXEC_OBJ=unexaix.o
8835 ;;
8836 cygwin)
8837 UNEXEC_OBJ=unexcw.o
8838 ;;
8839 darwin)
8840 UNEXEC_OBJ=unexmacosx.o
8841 ;;
8842 hpux10-20 | hpux11)
8843 UNEXEC_OBJ=unexhp9k800.o
8844 ;;
7c61eaab
GM
8845 mingw32)
8846 UNEXEC_OBJ=unexw32.o
8847 ;;
067d23c9
KY
8848 sol2-10)
8849 # Use the Solaris dldump() function, called from unexsol.c, to dump
8850 # emacs, instead of the generic ELF dump code found in unexelf.c.
8851 # The resulting binary has a complete symbol table, and is better
8852 # for debugging and other observability tools (debuggers, pstack, etc).
8853 #
8854 # If you encounter a problem using dldump(), please consider sending
8855 # a message to the OpenSolaris tools-linking mailing list:
8856 # http://mail.opensolaris.org/mailman/listinfo/tools-linking
8857 #
8858 # It is likely that dldump() works with older Solaris too, but this has
8859 # not been tested, so for now this change is for Solaris 10 or newer.
8860 UNEXEC_OBJ=unexsol.o
8861 ;;
8862esac
8863
8864LD_SWITCH_SYSTEM=
8865case "$opsys" in
87e1a811 8866 freebsd|dragonfly)
067d23c9
KY
8867 ## Let `ld' find image libs and similar things in /usr/local/lib.
8868 ## The system compiler, GCC, has apparently been modified to not
8869 ## look there, contrary to what a stock GCC would do.
a7479549
GM
8870### It's not our place to do this. See bug#10313#17.
8871### LD_SWITCH_SYSTEM=-L/usr/local/lib
8872 :
067d23c9
KY
8873 ;;
8874
8875 gnu-linux)
8876 ## cpp test was "ifdef __mips__", but presumably this is equivalent...
d6a003a8 8877 case $host_cpu in mips*) LD_SWITCH_SYSTEM="-G 0";; esac
067d23c9
KY
8878 ;;
8879
8880 netbsd)
a7479549
GM
8881### It's not our place to do this. See bug#10313#17.
8882### LD_SWITCH_SYSTEM="-Wl,-rpath,/usr/pkg/lib -L/usr/pkg/lib -Wl,-rpath,/usr/local/lib -L/usr/local/lib"
8883 :
067d23c9
KY
8884 ;;
8885
8886 openbsd)
3766b742 8887 ## Han Boetes <han@boetes.org> says this is necessary,
067d23c9
KY
8888 ## otherwise Emacs dumps core on elf systems.
8889 LD_SWITCH_SYSTEM="-Z"
8890 ;;
8891esac
8892
8893
8894ac_link="$ac_link $LD_SWITCH_SYSTEM"
8895
ae629dae 8896## This setting of LD_SWITCH_SYSTEM references LD_SWITCH_X_SITE_RPATH,
067d23c9
KY
8897## which has not been defined yet. When this was handled with cpp,
8898## it was expanded to null when configure sourced the s/*.h file.
8899## Thus LD_SWITCH_SYSTEM had different values in configure and the Makefiles.
8900## FIXME it would be cleaner to put this in LD_SWITCH_SYSTEM_TEMACS
8901## (or somesuch), but because it is supposed to go at the _front_
8902## of LD_SWITCH_SYSTEM, we cannot do that in exactly the same way.
8903## Compare with the gnu-linux case below, which added to the end
8904## of LD_SWITCH_SYSTEM, and so can instead go at the front of
8905## LD_SWITCH_SYSTEM_TEMACS.
8906case "$opsys" in
8907 netbsd|openbsd)
ae629dae 8908 LD_SWITCH_SYSTEM="\$(LD_SWITCH_X_SITE_RPATH) $LD_SWITCH_SYSTEM" ;;
067d23c9
KY
8909esac
8910
8911
8912C_SWITCH_MACHINE=
42bbbe8b
GM
8913case $canonical in
8914 alpha*)
067d23c9 8915 ac_fn_c_check_decl "$LINENO" "__ELF__" "ac_cv_have_decl___ELF__" "$ac_includes_default"
a9bec17c 8916if test "x$ac_cv_have_decl___ELF__" = x""yes; then :
067d23c9
KY
8917
8918fi
8919
8920 if test "$ac_cv_have_decl___ELF__" = "yes"; then
8921 ## With ELF, make sure that all common symbols get allocated to in the
8922 ## data section. Otherwise, the dump of temacs may miss variables in
8923 ## the shared library that have been initialized. For example, with
8924 ## GNU libc, __malloc_initialized would normally be resolved to the
8925 ## shared library's .bss section, which is fatal.
8926 if test "x$GCC" = "xyes"; then
8927 C_SWITCH_MACHINE="-fno-common"
8928 else
a9bec17c 8929 as_fn_error "What gives? Fix me if DEC Unix supports ELF now." "$LINENO" 5
067d23c9
KY
8930 fi
8931 else
8932 UNEXEC_OBJ=unexalpha.o
8933 fi
42bbbe8b
GM
8934 ;;
8935esac
067d23c9
KY
8936
8937
8938
8939
8940C_SWITCH_SYSTEM=
8941## Some programs in src produce warnings saying certain subprograms
8942## are too complex and need a MAXMEM value greater than 2000 for
8943## additional optimization. --nils@exp-math.uni-essen.de
8944test "$opsys" = "aix4.2" && test "x$GCC" != "xyes" && \
8945 C_SWITCH_SYSTEM="-ma -qmaxmem=4000"
7c61eaab 8946test "$opsys" = "mingw32" && C_SWITCH_SYSTEM="-mtune=pentium4"
067d23c9
KY
8947## gnu-linux might need -D_BSD_SOURCE on old libc5 systems.
8948## It is redundant in glibc2, since we define _GNU_SOURCE.
8949
8950
8951
8952LIBS_SYSTEM=
8953case "$opsys" in
8954 ## IBM's X11R5 uses -lIM and -liconv in AIX 3.2.2.
8955 aix4-2) LIBS_SYSTEM="-lrts -lIM -liconv" ;;
8956
87e1a811 8957 freebsd|dragonfly) LIBS_SYSTEM="-lutil" ;;
067d23c9
KY
8958
8959 hpux*) LIBS_SYSTEM="-l:libdld.sl" ;;
8960
1f5d53eb 8961 sol2*) LIBS_SYSTEM="-lsocket -lnsl" ;;
067d23c9
KY
8962
8963 ## Motif needs -lgen.
8964 unixware) LIBS_SYSTEM="-lsocket -lnsl -lelf -lgen" ;;
8965esac
8966
8967
8968
8969### Make sure subsequent tests use flags consistent with the build flags.
8970
8971if test x"${OVERRIDE_CPPFLAGS}" != x; then
8972 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
8973else
8974 CPPFLAGS="$C_SWITCH_SYSTEM $C_SWITCH_MACHINE $CPPFLAGS"
8975fi
8976
4fda9c95
GM
8977# Suppress obsolescent Autoconf test for size_t; Emacs assumes C89 or better.
8978
3e0be4ab
GM
8979# Likewise for obsolescent test for uid_t, gid_t; Emacs assumes them.
8980
4fda9c95 8981
067d23c9 8982
067d23c9 8983LIB_MATH=-lm
4717915f 8984SYSTEM_TYPE=`echo $opsys | sed -e 's/[0-9].*//' -e 's|-|/|'`
067d23c9
KY
8985
8986case $opsys in
8987 cygwin )
8988 LIB_MATH=
067d23c9
KY
8989 ;;
8990 darwin )
8991 ## Adding -lm confuses the dynamic linker, so omit it.
8992 LIB_MATH=
067d23c9 8993 ;;
87e1a811 8994 freebsd | dragonfly )
15f79fcd 8995 SYSTEM_TYPE=berkeley-unix
067d23c9
KY
8996 ;;
8997 gnu-linux | gnu-kfreebsd )
067d23c9
KY
8998 ;;
8999 hpux10-20 | hpux11 )
067d23c9 9000 ;;
7c61eaab
GM
9001 mingw32 )
9002 LIB_MATH=
9003 SYSTEM_TYPE=windows-nt
9004 ;;
bb72ce91 9005 netbsd | openbsd )
15f79fcd 9006 SYSTEM_TYPE=berkeley-unix
067d23c9 9007 ;;
15f79fcd
GM
9008
9009 sol2* | unixware )
9010 SYSTEM_TYPE=usg-unix-v
9011 ;;
9012
067d23c9
KY
9013esac
9014
9015
9016
15f79fcd
GM
9017cat >>confdefs.h <<_ACEOF
9018#define SYSTEM_TYPE "$SYSTEM_TYPE"
9019_ACEOF
9020
9021
130f1dac 9022
5476a9a4
GM
9023pre_PKG_CONFIG_CFLAGS=$CFLAGS
9024pre_PKG_CONFIG_LIBS=$LIBS
067d23c9 9025
5476a9a4
GM
9026# Extract the first word of "pkg-config", so it can be a program name with args.
9027set dummy pkg-config; ac_word=$2
9028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9029$as_echo_n "checking for $ac_word... " >&6; }
9030if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
9031 $as_echo_n "(cached) " >&6
9032else
9033 case $PKG_CONFIG in
9034 [\\/]* | ?:[\\/]*)
9035 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9036 ;;
9037 *)
9038 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9039for as_dir in $PATH
9040do
9041 IFS=$as_save_IFS
9042 test -z "$as_dir" && as_dir=.
9043 for ac_exec_ext in '' $ac_executable_extensions; do
9044 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9045 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9046 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9047 break 2
9048 fi
9049done
9050 done
9051IFS=$as_save_IFS
9052
9053 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
9054 ;;
9055esac
9056fi
9057PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9058if test -n "$PKG_CONFIG"; then
9059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9060$as_echo "$PKG_CONFIG" >&6; }
9061else
9062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9063$as_echo "no" >&6; }
9064fi
f199cab1
GM
9065
9066
f199cab1 9067
5476a9a4
GM
9068
9069
9dabd86d 9070HAVE_SOUND=no
5476a9a4 9071if test "${with_sound}" != "no"; then
7c61eaab 9072 # Sound support for GNU/Linux, the free BSDs, and MinGW.
db7863f4 9073 for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h
5476a9a4
GM
9074do :
9075 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7c61eaab
GM
9076ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
9077 #ifdef __MINGW32__
9078 #define WIN32_LEAN_AND_MEAN
9079 #include <windows.h>
9080 #endif
9081
9082"
5476a9a4
GM
9083eval as_val=\$$as_ac_Header
9084 if test "x$as_val" = x""yes; then :
9085 cat >>confdefs.h <<_ACEOF
9086#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9087_ACEOF
9088 have_sound_header=yes
9089fi
9090
9091done
9092
dfdf7fe5
GM
9093 test "${with_sound}" = "oss" && test "${have_sound_header}" != "yes" && \
9094 as_fn_error "OSS sound support requested but not found." "$LINENO" 5
9095
9096 if test "${with_sound}" = "bsd-ossaudio" || test "${with_sound}" = "yes"; then
9dabd86d
GM
9097 # Emulation library used on NetBSD.
9098 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _oss_ioctl in -lossaudio" >&5
5476a9a4
GM
9099$as_echo_n "checking for _oss_ioctl in -lossaudio... " >&6; }
9100if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then :
067d23c9
KY
9101 $as_echo_n "(cached) " >&6
9102else
5476a9a4
GM
9103 ac_check_lib_save_LIBS=$LIBS
9104LIBS="-lossaudio $LIBS"
9105cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 9106/* end confdefs.h. */
5476a9a4
GM
9107
9108/* Override any GCC internal prototype to avoid an error.
9109 Use char because int might match the return type of a GCC
9110 builtin and then its argument prototype would still apply. */
9111#ifdef __cplusplus
9112extern "C"
9113#endif
9114char _oss_ioctl ();
067d23c9
KY
9115int
9116main ()
9117{
5476a9a4 9118return _oss_ioctl ();
067d23c9
KY
9119 ;
9120 return 0;
9121}
9122_ACEOF
9123if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 9124 ac_cv_lib_ossaudio__oss_ioctl=yes
067d23c9 9125else
5476a9a4 9126 ac_cv_lib_ossaudio__oss_ioctl=no
067d23c9
KY
9127fi
9128rm -f core conftest.err conftest.$ac_objext \
9129 conftest$ac_exeext conftest.$ac_ext
5476a9a4
GM
9130LIBS=$ac_check_lib_save_LIBS
9131fi
9132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5
9133$as_echo "$ac_cv_lib_ossaudio__oss_ioctl" >&6; }
9134if test "x$ac_cv_lib_ossaudio__oss_ioctl" = x""yes; then :
9135 LIBSOUND=-lossaudio
9136else
9137 LIBSOUND=
067d23c9
KY
9138fi
9139
dfdf7fe5
GM
9140 test "${with_sound}" = "bsd-ossaudio" && test -z "$LIBSOUND" && \
9141 as_fn_error "bsd-ossaudio sound support requested but not found." "$LINENO" 5
9dabd86d 9142 fi
067d23c9
KY
9143
9144
9dabd86d
GM
9145 if test "${with_sound}" = "alsa" || test "${with_sound}" = "yes"; then
9146 ALSA_REQUIRED=1.0.0
9147 ALSA_MODULES="alsa >= $ALSA_REQUIRED"
5476a9a4
GM
9148
9149 succeeded=no
9150
9151 if test "$PKG_CONFIG" = "no" ; then
9152 HAVE_ALSA=no
9153 else
9154 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 9155 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
9156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ALSA_MODULES" >&5
9157$as_echo_n "checking for $ALSA_MODULES... " >&6; }
9158
b5591ebb
GM
9159 if "$PKG_CONFIG" --exists "$ALSA_MODULES" 2>&5 &&
9160 ALSA_CFLAGS=`"$PKG_CONFIG" --cflags "$ALSA_MODULES" 2>&5` &&
9161 ALSA_LIBS=`"$PKG_CONFIG" --libs "$ALSA_MODULES" 2>&5`; then
5476a9a4
GM
9162 edit_cflags="
9163 s,///*,/,g
9164 s/^/ /
9165 s/ -I/ $isystem/g
9166 s/^ //
9167 "
9168 ALSA_CFLAGS=`$as_echo "$ALSA_CFLAGS" | sed -e "$edit_cflags"`
9169 ALSA_LIBS=`$as_echo "$ALSA_LIBS" | sed -e 's,///*,/,g'`
9170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$ALSA_CFLAGS' LIBS='$ALSA_LIBS'" >&5
9171$as_echo "yes CFLAGS='$ALSA_CFLAGS' LIBS='$ALSA_LIBS'" >&6; }
9172 succeeded=yes
9173 else
9174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9175$as_echo "no" >&6; }
9176 ALSA_CFLAGS=""
9177 ALSA_LIBS=""
9178 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
9179 ## do set a variable so people can do so. Do it in a subshell
9180 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 9181 ALSA_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$ALSA_MODULES") 2>&1`
5476a9a4
GM
9182
9183 fi
9184
9185
9186
9187 else
9188 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
9189 echo "*** See http://www.freedesktop.org/software/pkgconfig"
9190 fi
9191 fi
9192
9193 if test $succeeded = yes; then
9194 HAVE_ALSA=yes
9195 else
9196 HAVE_ALSA=no
9197 fi
f199cab1 9198
9dabd86d
GM
9199 if test $HAVE_ALSA = yes; then
9200 SAVE_CFLAGS="$CFLAGS"
9201 SAVE_LIBS="$LIBS"
9202 CFLAGS="$ALSA_CFLAGS $CFLAGS"
9203 LIBS="$ALSA_LIBS $LIBS"
9204 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5476a9a4
GM
9205/* end confdefs.h. */
9206#include <asoundlib.h>
067d23c9
KY
9207int
9208main ()
9209{
5476a9a4 9210snd_lib_error_set_handler (0);
067d23c9
KY
9211 ;
9212 return 0;
9213}
9214_ACEOF
5476a9a4
GM
9215if ac_fn_c_try_compile "$LINENO"; then :
9216 emacs_alsa_normal=yes
067d23c9 9217else
5476a9a4 9218 emacs_alsa_normal=no
067d23c9 9219fi
5476a9a4 9220rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9dabd86d
GM
9221 if test "$emacs_alsa_normal" != yes; then
9222 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5476a9a4
GM
9223/* end confdefs.h. */
9224#include <alsa/asoundlib.h>
9225int
9226main ()
9227{
9228snd_lib_error_set_handler (0);
9229 ;
9230 return 0;
9231}
9232_ACEOF
9233if ac_fn_c_try_compile "$LINENO"; then :
9234 emacs_alsa_subdir=yes
9235else
9236 emacs_alsa_subdir=no
f199cab1 9237fi
5476a9a4 9238rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9dabd86d
GM
9239 if test "$emacs_alsa_subdir" != yes; then
9240 as_fn_error "pkg-config found alsa, but it does not compile. See config.log for error messages." "$LINENO" 5
9241 fi
9242 ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE"
5476a9a4 9243 fi
067d23c9 9244
9dabd86d
GM
9245 CFLAGS="$SAVE_CFLAGS"
9246 LIBS="$SAVE_LIBS"
9247 LIBSOUND="$LIBSOUND $ALSA_LIBS"
9248 CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS"
067d23c9 9249
5476a9a4 9250$as_echo "#define HAVE_ALSA 1" >>confdefs.h
067d23c9 9251
9dabd86d
GM
9252 elif test "${with_sound}" = "alsa"; then
9253 as_fn_error "ALSA sound support requested but not found." "$LINENO" 5
9254 fi
5476a9a4 9255 fi
9dabd86d 9256 if test x$have_sound_header = xyes || test $HAVE_ALSA = yes; then
5476a9a4 9257 case "$opsys" in
9dabd86d 9258 gnu-linux|freebsd|netbsd|mingw32)
067d23c9 9259
5476a9a4 9260$as_echo "#define HAVE_SOUND 1" >>confdefs.h
067d23c9 9261
9dabd86d 9262 HAVE_SOUND=yes
5476a9a4
GM
9263 ;;
9264 esac
9265 fi
067d23c9
KY
9266
9267
5476a9a4 9268fi
067d23c9 9269
e700232f
GM
9270
9271
9272
5476a9a4
GM
9273 for ac_header in $ac_header_list
9274do :
9275 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9276ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
9277"
9278eval as_val=\$$as_ac_Header
9279 if test "x$as_val" = x""yes; then :
9280 cat >>confdefs.h <<_ACEOF
9281#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
067d23c9
KY
9282_ACEOF
9283
f199cab1 9284fi
e700232f 9285
5476a9a4
GM
9286done
9287
9288
e700232f
GM
9289
9290
9291
f199cab1 9292
067d23c9 9293
067d23c9 9294
067d23c9 9295
067d23c9 9296
f199cab1
GM
9297
9298
9299
067d23c9 9300
067d23c9 9301
f199cab1
GM
9302
9303
9304
5476a9a4
GM
9305
9306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if personality LINUX32 can be set" >&5
9307$as_echo_n "checking if personality LINUX32 can be set... " >&6; }
9308cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9309/* end confdefs.h. */
9310#include <sys/personality.h>
067d23c9
KY
9311int
9312main ()
9313{
5476a9a4 9314personality (PER_LINUX32)
067d23c9
KY
9315 ;
9316 return 0;
9317}
9318_ACEOF
9319if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4 9320 emacs_cv_personality_linux32=yes
067d23c9 9321else
5476a9a4 9322 emacs_cv_personality_linux32=no
067d23c9 9323fi
f199cab1 9324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5476a9a4
GM
9325{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_personality_linux32" >&5
9326$as_echo "$emacs_cv_personality_linux32" >&6; }
f199cab1 9327
5476a9a4 9328if test $emacs_cv_personality_linux32 = yes; then
f199cab1 9329
5476a9a4
GM
9330$as_echo "#define HAVE_PERSONALITY_LINUX32 1" >>confdefs.h
9331
9332fi
9333
9334for ac_header in term.h
9335do :
9336 ac_fn_c_check_header_preproc "$LINENO" "term.h" "ac_cv_header_term_h"
9337if test "x$ac_cv_header_term_h" = x""yes; then :
9338 cat >>confdefs.h <<_ACEOF
9339#define HAVE_TERM_H 1
067d23c9 9340_ACEOF
5476a9a4
GM
9341
9342fi
9343
9344done
9345
9346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
9347$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
9348if test "${ac_cv_header_time+set}" = set; then :
9349 $as_echo_n "(cached) " >&6
9350else
9351 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 9352/* end confdefs.h. */
5476a9a4
GM
9353#include <sys/types.h>
9354#include <sys/time.h>
9355#include <time.h>
f199cab1 9356
067d23c9
KY
9357int
9358main ()
9359{
5476a9a4
GM
9360if ((struct tm *) 0)
9361return 0;
067d23c9
KY
9362 ;
9363 return 0;
9364}
9365_ACEOF
9366if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4 9367 ac_cv_header_time=yes
067d23c9 9368else
5476a9a4 9369 ac_cv_header_time=no
067d23c9
KY
9370fi
9371rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9372fi
5476a9a4
GM
9373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
9374$as_echo "$ac_cv_header_time" >&6; }
9375if test $ac_cv_header_time = yes; then
f199cab1 9376
5476a9a4
GM
9377$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
9378
9379fi
9380
dc67e786
GM
9381ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "#include <signal.h>
9382
9383"
5476a9a4
GM
9384if test "x$ac_cv_have_decl_sys_siglist" = x""yes; then :
9385 ac_have_decl=1
9386else
9387 ac_have_decl=0
9388fi
9389
9390cat >>confdefs.h <<_ACEOF
9391#define HAVE_DECL_SYS_SIGLIST $ac_have_decl
067d23c9 9392_ACEOF
5476a9a4
GM
9393
9394if test $ac_cv_have_decl_sys_siglist != yes; then
9395 # For Tru64, at least:
dc67e786
GM
9396 ac_fn_c_check_decl "$LINENO" "__sys_siglist" "ac_cv_have_decl___sys_siglist" "#include <signal.h>
9397
9398"
5476a9a4
GM
9399if test "x$ac_cv_have_decl___sys_siglist" = x""yes; then :
9400 ac_have_decl=1
9401else
9402 ac_have_decl=0
067d23c9 9403fi
5476a9a4
GM
9404
9405cat >>confdefs.h <<_ACEOF
9406#define HAVE_DECL___SYS_SIGLIST $ac_have_decl
9407_ACEOF
9408
5476a9a4
GM
9409fi
9410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
9411$as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
9412if test "${ac_cv_header_sys_wait_h+set}" = set; then :
9413 $as_echo_n "(cached) " >&6
067d23c9
KY
9414else
9415 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9416/* end confdefs.h. */
5476a9a4
GM
9417#include <sys/types.h>
9418#include <sys/wait.h>
9419#ifndef WEXITSTATUS
9420# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
9421#endif
9422#ifndef WIFEXITED
9423# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
9424#endif
9425
067d23c9
KY
9426int
9427main ()
9428{
5476a9a4
GM
9429 int s;
9430 wait (&s);
9431 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
067d23c9
KY
9432 ;
9433 return 0;
9434}
9435_ACEOF
5476a9a4
GM
9436if ac_fn_c_try_compile "$LINENO"; then :
9437 ac_cv_header_sys_wait_h=yes
067d23c9 9438else
5476a9a4 9439 ac_cv_header_sys_wait_h=no
067d23c9 9440fi
5476a9a4 9441rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
067d23c9 9442fi
5476a9a4
GM
9443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
9444$as_echo "$ac_cv_header_sys_wait_h" >&6; }
9445if test $ac_cv_header_sys_wait_h = yes; then
067d23c9 9446
5476a9a4 9447$as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
7417b37c 9448
5476a9a4 9449fi
7417b37c 9450
7417b37c 9451
067d23c9
KY
9452
9453
e700232f 9454
5476a9a4
GM
9455for ac_header in net/if.h
9456do :
9457 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
9458#if HAVE_SYS_SOCKET_H
9459#include <sys/socket.h>
9460#endif
9461"
9462if test "x$ac_cv_header_net_if_h" = x""yes; then :
9463 cat >>confdefs.h <<_ACEOF
9464#define HAVE_NET_IF_H 1
067d23c9 9465_ACEOF
7cae64b4 9466
067d23c9 9467fi
067d23c9 9468
5476a9a4 9469done
4d4b75e8 9470
5476a9a4
GM
9471for ac_header in ifaddrs.h
9472do :
9473 ac_fn_c_check_header_compile "$LINENO" "ifaddrs.h" "ac_cv_header_ifaddrs_h" "$ac_includes_default
9474#if HAVE_SYS_SOCKET_H
9475#include <sys/socket.h>
9476#endif
9477"
9478if test "x$ac_cv_header_ifaddrs_h" = x""yes; then :
9479 cat >>confdefs.h <<_ACEOF
9480#define HAVE_IFADDRS_H 1
9481_ACEOF
4d4b75e8 9482
5476a9a4 9483fi
4d4b75e8 9484
5476a9a4 9485done
7e723570 9486
5476a9a4 9487for ac_header in net/if_dl.h
7e723570 9488do :
5476a9a4
GM
9489 ac_fn_c_check_header_compile "$LINENO" "net/if_dl.h" "ac_cv_header_net_if_dl_h" "$ac_includes_default
9490#if HAVE_SYS_SOCKET_H
9491#include <sys/socket.h>
9492#endif
7e723570 9493"
5476a9a4 9494if test "x$ac_cv_header_net_if_dl_h" = x""yes; then :
7e723570 9495 cat >>confdefs.h <<_ACEOF
5476a9a4 9496#define HAVE_NET_IF_DL_H 1
7e723570
GM
9497_ACEOF
9498
9499fi
9500
9501done
9502
9503
5476a9a4
GM
9504ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_flags" "ac_cv_member_struct_ifreq_ifr_flags" "$ac_includes_default
9505#if HAVE_SYS_SOCKET_H
9506#include <sys/socket.h>
9507#endif
9508#if HAVE_NET_IF_H
9509#include <net/if.h>
9510#endif
9511"
9512if test "x$ac_cv_member_struct_ifreq_ifr_flags" = x""yes; then :
7e723570 9513
5476a9a4
GM
9514cat >>confdefs.h <<_ACEOF
9515#define HAVE_STRUCT_IFREQ_IFR_FLAGS 1
9516_ACEOF
7e723570
GM
9517
9518
5476a9a4
GM
9519fi
9520ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_hwaddr" "ac_cv_member_struct_ifreq_ifr_hwaddr" "$ac_includes_default
9521#if HAVE_SYS_SOCKET_H
9522#include <sys/socket.h>
f199cab1 9523#endif
5476a9a4
GM
9524#if HAVE_NET_IF_H
9525#include <net/if.h>
f199cab1 9526#endif
5476a9a4
GM
9527"
9528if test "x$ac_cv_member_struct_ifreq_ifr_hwaddr" = x""yes; then :
9529
9530cat >>confdefs.h <<_ACEOF
9531#define HAVE_STRUCT_IFREQ_IFR_HWADDR 1
9532_ACEOF
9533
9534
9535fi
9536ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_netmask" "ac_cv_member_struct_ifreq_ifr_netmask" "$ac_includes_default
9537#if HAVE_SYS_SOCKET_H
9538#include <sys/socket.h>
f199cab1 9539#endif
5476a9a4
GM
9540#if HAVE_NET_IF_H
9541#include <net/if.h>
9542#endif
9543"
9544if test "x$ac_cv_member_struct_ifreq_ifr_netmask" = x""yes; then :
9545
9546cat >>confdefs.h <<_ACEOF
9547#define HAVE_STRUCT_IFREQ_IFR_NETMASK 1
f199cab1 9548_ACEOF
5476a9a4
GM
9549
9550
9551fi
9552ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_broadaddr" "ac_cv_member_struct_ifreq_ifr_broadaddr" "$ac_includes_default
9553#if HAVE_SYS_SOCKET_H
9554#include <sys/socket.h>
9555#endif
9556#if HAVE_NET_IF_H
9557#include <net/if.h>
9558#endif
9559"
9560if test "x$ac_cv_member_struct_ifreq_ifr_broadaddr" = x""yes; then :
9561
9562cat >>confdefs.h <<_ACEOF
9563#define HAVE_STRUCT_IFREQ_IFR_BROADADDR 1
f199cab1 9564_ACEOF
5476a9a4
GM
9565
9566
067d23c9 9567fi
5476a9a4
GM
9568ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_addr" "ac_cv_member_struct_ifreq_ifr_addr" "$ac_includes_default
9569#if HAVE_SYS_SOCKET_H
9570#include <sys/socket.h>
9571#endif
9572#if HAVE_NET_IF_H
9573#include <net/if.h>
9574#endif
9575"
9576if test "x$ac_cv_member_struct_ifreq_ifr_addr" = x""yes; then :
9577
9578cat >>confdefs.h <<_ACEOF
9579#define HAVE_STRUCT_IFREQ_IFR_ADDR 1
9580_ACEOF
9581
067d23c9 9582
f199cab1 9583fi
5476a9a4
GM
9584ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_addr.sa_len" "ac_cv_member_struct_ifreq_ifr_addr_sa_len" "$ac_includes_default
9585#if HAVE_SYS_SOCKET_H
9586#include <sys/socket.h>
9587#endif
9588#if HAVE_NET_IF_H
9589#include <net/if.h>
9590#endif
9591"
9592if test "x$ac_cv_member_struct_ifreq_ifr_addr_sa_len" = x""yes; then :
9593
9594cat >>confdefs.h <<_ACEOF
9595#define HAVE_STRUCT_IFREQ_IFR_ADDR_SA_LEN 1
9596_ACEOF
9597
067d23c9
KY
9598
9599fi
9600
9601
067d23c9 9602
f199cab1 9603
5476a9a4
GM
9604DEPFLAGS=
9605MKDEPDIR=":"
9606deps_frag=deps.mk
9607if test "$GCC" = yes && test "$ac_enable_autodepend" = yes; then
9608 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using GNU Make" >&5
9609$as_echo_n "checking whether we are using GNU Make... " >&6; }
9610 HAVE_GNU_MAKE=no
9611 testval=`${MAKE-make} --version 2>/dev/null | grep 'GNU Make'`
9612 if test "x$testval" != x; then
9613 HAVE_GNU_MAKE=yes
9614 else
9615 ac_enable_autodepend=no
9616 fi
9617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_GNU_MAKE" >&5
9618$as_echo "$HAVE_GNU_MAKE" >&6; }
9619 if test $HAVE_GNU_MAKE = yes; then
9620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -MMD -MF" >&5
9621$as_echo_n "checking whether gcc understands -MMD -MF... " >&6; }
9622 SAVE_CFLAGS="$CFLAGS"
9623 CFLAGS="$CFLAGS -MMD -MF deps.d -MP"
9624 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9625/* end confdefs.h. */
f199cab1 9626
5476a9a4
GM
9627int
9628main ()
9629{
f199cab1 9630
5476a9a4
GM
9631 ;
9632 return 0;
9633}
9634_ACEOF
9635if ac_fn_c_try_compile "$LINENO"; then :
f199cab1 9636
5476a9a4
GM
9637else
9638 ac_enable_autodepend=no
9639fi
9640rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9641 CFLAGS="$SAVE_CFLAGS"
9642 test -f deps.d || ac_enable_autodepend=no
9643 rm -rf deps.d
9644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_autodepend" >&5
9645$as_echo "$ac_enable_autodepend" >&6; }
9646 fi
9647 if test $ac_enable_autodepend = yes; then
9648 DEPFLAGS='-MMD -MF ${DEPDIR}/$*.d -MP'
9649 ## MKDIR_P is documented (see AC_PROG_MKDIR_P) to be parallel-safe.
9650 MKDEPDIR='${MKDIR_P} ${DEPDIR}'
9651 deps_frag=autodeps.mk
9652 fi
9653fi
9654deps_frag=$srcdir/src/$deps_frag
f199cab1
GM
9655
9656
9657
9658
9659
5476a9a4 9660lisp_frag=$srcdir/src/lisp.mk
f199cab1
GM
9661
9662
9663
5476a9a4
GM
9664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long file names" >&5
9665$as_echo_n "checking for long file names... " >&6; }
9666if test "${ac_cv_sys_long_file_names+set}" = set; then :
9667 $as_echo_n "(cached) " >&6
9668else
9669 ac_cv_sys_long_file_names=yes
9670# Test for long file names in all the places we know might matter:
9671# . the current directory, where building will happen
9672# $prefix/lib where we will be installing things
9673# $exec_prefix/lib likewise
9674# $TMPDIR if set, where it might want to write temporary files
9675# /tmp where it might want to write temporary files
9676# /var/tmp likewise
9677# /usr/tmp likewise
9678for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do
9679 # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib
9680 # in the usual case where exec_prefix is '${prefix}'.
9681 case $ac_dir in #(
9682 . | /* | ?:[\\/]*) ;; #(
9683 *) continue;;
9684 esac
9685 test -w "$ac_dir/." || continue # It is less confusing to not echo anything here.
9686 ac_xdir=$ac_dir/cf$$
9687 (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
9688 ac_tf1=$ac_xdir/conftest9012345
9689 ac_tf2=$ac_xdir/conftest9012346
9690 touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" ||
9691 ac_cv_sys_long_file_names=no
9692 rm -f -r "$ac_xdir" 2>/dev/null
9693 test $ac_cv_sys_long_file_names = no && break
9694done
9695fi
9696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_long_file_names" >&5
9697$as_echo "$ac_cv_sys_long_file_names" >&6; }
9698if test $ac_cv_sys_long_file_names = yes; then
f199cab1 9699
5476a9a4 9700$as_echo "#define HAVE_LONG_FILE_NAMES 1" >>confdefs.h
f199cab1 9701
5476a9a4 9702fi
f199cab1 9703
f199cab1 9704
5476a9a4 9705#### Choose a window system.
f199cab1 9706
42dcba54
GM
9707## We leave window_system equal to none if
9708## we end up building without one. Any new window system should
9709## set window_system to an appropriate value and add objects to
9710## window-system-specific substs.
9711
9712window_system=none
5476a9a4
GM
9713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
9714$as_echo_n "checking for X... " >&6; }
f199cab1 9715
f199cab1 9716
5476a9a4
GM
9717# Check whether --with-x was given.
9718if test "${with_x+set}" = set; then :
9719 withval=$with_x;
9720fi
f199cab1 9721
5476a9a4
GM
9722# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
9723if test "x$with_x" = xno; then
9724 # The user explicitly disabled X.
9725 have_x=disabled
9726else
9727 case $x_includes,$x_libraries in #(
9728 *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
9729 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
9730 $as_echo_n "(cached) " >&6
9731else
9732 # One or both of the vars are not set, and there is no cached value.
9733ac_x_includes=no ac_x_libraries=no
9734rm -f -r conftest.dir
9735if mkdir conftest.dir; then
9736 cd conftest.dir
9737 cat >Imakefile <<'_ACEOF'
9738incroot:
9739 @echo incroot='${INCROOT}'
9740usrlibdir:
9741 @echo usrlibdir='${USRLIBDIR}'
9742libdir:
9743 @echo libdir='${LIBDIR}'
9744_ACEOF
9745 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
9746 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
9747 for ac_var in incroot usrlibdir libdir; do
9748 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
9749 done
9750 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
9751 for ac_extension in a so sl dylib la dll; do
9752 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
9753 test -f "$ac_im_libdir/libX11.$ac_extension"; then
9754 ac_im_usrlibdir=$ac_im_libdir; break
9755 fi
9756 done
9757 # Screen out bogus values from the imake configuration. They are
9758 # bogus both because they are the default anyway, and because
9759 # using them would break gcc on systems where it needs fixed includes.
9760 case $ac_im_incroot in
9761 /usr/include) ac_x_includes= ;;
9762 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
9763 esac
9764 case $ac_im_usrlibdir in
9765 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
9766 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
9767 esac
9768 fi
9769 cd ..
9770 rm -f -r conftest.dir
067d23c9
KY
9771fi
9772
5476a9a4
GM
9773# Standard set of common directories for X headers.
9774# Check X11 before X11Rn because it is often a symlink to the current release.
9775ac_x_header_dirs='
9776/usr/X11/include
9777/usr/X11R7/include
9778/usr/X11R6/include
9779/usr/X11R5/include
9780/usr/X11R4/include
067d23c9 9781
5476a9a4
GM
9782/usr/include/X11
9783/usr/include/X11R7
9784/usr/include/X11R6
9785/usr/include/X11R5
9786/usr/include/X11R4
067d23c9 9787
5476a9a4
GM
9788/usr/local/X11/include
9789/usr/local/X11R7/include
9790/usr/local/X11R6/include
9791/usr/local/X11R5/include
9792/usr/local/X11R4/include
067d23c9 9793
5476a9a4
GM
9794/usr/local/include/X11
9795/usr/local/include/X11R7
9796/usr/local/include/X11R6
9797/usr/local/include/X11R5
9798/usr/local/include/X11R4
067d23c9 9799
5476a9a4
GM
9800/usr/X386/include
9801/usr/x386/include
9802/usr/XFree86/include/X11
067d23c9 9803
5476a9a4
GM
9804/usr/include
9805/usr/local/include
9806/usr/unsupported/include
9807/usr/athena/include
9808/usr/local/x11r5/include
9809/usr/lpp/Xamples/include
067d23c9 9810
5476a9a4
GM
9811/usr/openwin/include
9812/usr/openwin/share/include'
067d23c9 9813
5476a9a4
GM
9814if test "$ac_x_includes" = no; then
9815 # Guess where to find include files, by looking for Xlib.h.
9816 # First, try using that file with no special directory specified.
9817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9818/* end confdefs.h. */
9819#include <X11/Xlib.h>
067d23c9 9820_ACEOF
5476a9a4
GM
9821if ac_fn_c_try_cpp "$LINENO"; then :
9822 # We can compile using X headers with no special include directory.
9823ac_x_includes=
067d23c9 9824else
5476a9a4
GM
9825 for ac_dir in $ac_x_header_dirs; do
9826 if test -r "$ac_dir/X11/Xlib.h"; then
9827 ac_x_includes=$ac_dir
9828 break
f199cab1 9829 fi
f199cab1 9830done
5476a9a4
GM
9831fi
9832rm -f conftest.err conftest.$ac_ext
9833fi # $ac_x_includes = no
067d23c9 9834
5476a9a4
GM
9835if test "$ac_x_libraries" = no; then
9836 # Check for the libraries.
9837 # See if we find them without any special options.
9838 # Don't add to $LIBS permanently.
9839 ac_save_LIBS=$LIBS
9840 LIBS="-lX11 $LIBS"
7ee3791f 9841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 9842/* end confdefs.h. */
5476a9a4 9843#include <X11/Xlib.h>
067d23c9
KY
9844int
9845main ()
9846{
5476a9a4
GM
9847XrmInitialize ()
9848 ;
067d23c9
KY
9849 return 0;
9850}
9851_ACEOF
5476a9a4
GM
9852if ac_fn_c_try_link "$LINENO"; then :
9853 LIBS=$ac_save_LIBS
9854# We can link X programs with no special library path.
9855ac_x_libraries=
7ee3791f 9856else
5476a9a4
GM
9857 LIBS=$ac_save_LIBS
9858for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
9859do
9860 # Don't even attempt the hair of trying to link an X program!
9861 for ac_extension in a so sl dylib la dll; do
9862 if test -r "$ac_dir/libX11.$ac_extension"; then
9863 ac_x_libraries=$ac_dir
9864 break 2
9865 fi
9866 done
9867done
7ee3791f 9868fi
5476a9a4
GM
9869rm -f core conftest.err conftest.$ac_objext \
9870 conftest$ac_exeext conftest.$ac_ext
9871fi # $ac_x_libraries = no
7ee3791f 9872
5476a9a4
GM
9873case $ac_x_includes,$ac_x_libraries in #(
9874 no,* | *,no | *\'*)
9875 # Didn't find X, or a directory has "'" in its name.
9876 ac_cv_have_x="have_x=no";; #(
9877 *)
9878 # Record where we found X for the cache.
9879 ac_cv_have_x="have_x=yes\
9880 ac_x_includes='$ac_x_includes'\
9881 ac_x_libraries='$ac_x_libraries'"
9882esac
9883fi
9884;; #(
9885 *) have_x=yes;;
9886 esac
9887 eval "$ac_cv_have_x"
9888fi # $with_x != no
9889
9890if test "$have_x" != yes; then
9891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
9892$as_echo "$have_x" >&6; }
9893 no_x=yes
9894else
9895 # If each of the values was on the command line, it overrides each guess.
9896 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
9897 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
9898 # Update the cache value to reflect the command line values.
9899 ac_cv_have_x="have_x=yes\
9900 ac_x_includes='$x_includes'\
9901 ac_x_libraries='$x_libraries'"
9902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
9903$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
9904fi
9905
42dcba54 9906if test "$no_x" != yes; then
5476a9a4
GM
9907 window_system=x11
9908fi
9909
9910LD_SWITCH_X_SITE_RPATH=
9911if test "${x_libraries}" != NONE; then
9912 if test -n "${x_libraries}"; then
9913 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
9914 LD_SWITCH_X_SITE_RPATH=-Wl,-rpath,`echo ${x_libraries} | sed -e "s/:/ -Wl,-rpath,/g"`
9915 fi
9916 x_default_search_path=""
9917 x_search_path=${x_libraries}
9918 if test -z "${x_search_path}"; then
9919 x_search_path=/usr/lib
9920 fi
9921 for x_library in `echo ${x_search_path}: | \
9922 sed -e "s/:/ /g" -e p -e "s:/lib[^ /]* :/share :g"`; do
9923 x_search_path="\
9924${x_library}/X11/%L/%T/%N%C%S:\
9925${x_library}/X11/%l/%T/%N%C%S:\
9926${x_library}/X11/%T/%N%C%S:\
9927${x_library}/X11/%L/%T/%N%S:\
9928${x_library}/X11/%l/%T/%N%S:\
9929${x_library}/X11/%T/%N%S"
9930 if test x"${x_default_search_path}" = x; then
9931 x_default_search_path=${x_search_path}
9932 else
9933 x_default_search_path="${x_search_path}:${x_default_search_path}"
9934 fi
9935 done
9936fi
9937
9938
9939if test "${x_includes}" != NONE && test -n "${x_includes}"; then
9940 C_SWITCH_X_SITE="$isystem"`echo ${x_includes} | sed -e "s/:/ $isystem/g"`
9941fi
9942
9943if test x"${x_includes}" = x; then
9944 bitmapdir=/usr/include/X11/bitmaps
9945else
9946 # accumulate include directories that have X11 bitmap subdirectories
9947 bmd_acc="dummyval"
9948 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
9949 if test -d "${bmd}/X11/bitmaps"; then
9950 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
9951 fi
9952 if test -d "${bmd}/bitmaps"; then
9953 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
9954 fi
9955 done
9956 if test ${bmd_acc} != "dummyval"; then
9957 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
9958 fi
9959fi
7ee3791f 9960
5476a9a4
GM
9961HAVE_NS=no
9962NS_IMPL_COCOA=no
9963NS_IMPL_GNUSTEP=no
9964tmp_CPPFLAGS="$CPPFLAGS"
9965tmp_CFLAGS="$CFLAGS"
9966CPPFLAGS="$CPPFLAGS -x objective-c"
9967CFLAGS="$CFLAGS -x objective-c"
5476a9a4 9968GNU_OBJC_CFLAGS=
4efe5ef9 9969LIBS_GNUSTEP=
5476a9a4
GM
9970if test "${with_ns}" != no; then
9971 if test "${opsys}" = darwin; then
9972 NS_IMPL_COCOA=yes
9973 ns_appdir=`pwd`/nextstep/Emacs.app
9974 ns_appbindir=${ns_appdir}/Contents/MacOS
9975 ns_appresdir=${ns_appdir}/Contents/Resources
bb7dce39 9976 ns_appsrc=Cocoa/Emacs.base
5476a9a4
GM
9977 elif test -f $GNUSTEP_CONFIG_FILE; then
9978 NS_IMPL_GNUSTEP=yes
9979 ns_appdir=`pwd`/nextstep/Emacs.app
9980 ns_appbindir=${ns_appdir}
9981 ns_appresdir=${ns_appdir}/Resources
bb7dce39 9982 ns_appsrc=GNUstep/Emacs.base
5476a9a4
GM
9983 GNUSTEP_SYSTEM_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_HEADERS)"
9984 GNUSTEP_SYSTEM_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_LIBRARIES)"
9985 GNUSTEP_LOCAL_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_HEADERS)"
9986 GNUSTEP_LOCAL_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_LIBRARIES)"
9987 test "x${GNUSTEP_LOCAL_HEADERS}" != "x" && \
9988 GNUSTEP_LOCAL_HEADERS="-I${GNUSTEP_LOCAL_HEADERS}"
9989 test "x${GNUSTEP_LOCAL_LIBRARIES}" != "x" && \
9990 GNUSTEP_LOCAL_LIBRARIES="-L${GNUSTEP_LOCAL_LIBRARIES}"
9991 CPPFLAGS="$CPPFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
9992 CFLAGS="$CFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
9993 LDFLAGS="$LDFLAGS -L${GNUSTEP_SYSTEM_LIBRARIES} ${GNUSTEP_LOCAL_LIBRARIES}"
4efe5ef9 9994 LIBS_GNUSTEP="-lgnustep-gui -lgnustep-base -lobjc -lpthread"
5476a9a4
GM
9995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if GNUstep defines BASE_NATIVE_OBJC_EXCEPTIONS" >&5
9996$as_echo_n "checking if GNUstep defines BASE_NATIVE_OBJC_EXCEPTIONS... " >&6; }
9997if test "${emacs_cv_objc_exceptions+set}" = set; then :
9998 $as_echo_n "(cached) " >&6
9999else
10000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10001/* end confdefs.h. */
10002#include <GNUstepBase/GSConfig.h>
39b3d70b
GM
10003int
10004main ()
10005{
5476a9a4
GM
10006#if defined BASE_NATIVE_OBJC_EXCEPTIONS && BASE_NATIVE_OBJC_EXCEPTIONS > 0
100071;
10008#else
10009fail;
10010#endif
10011 ;
39b3d70b
GM
10012 return 0;
10013}
10014_ACEOF
5476a9a4
GM
10015if ac_fn_c_try_compile "$LINENO"; then :
10016 emacs_cv_objc_exceptions=yes
39b3d70b 10017else
5476a9a4 10018 emacs_cv_objc_exceptions=no
39b3d70b 10019fi
5476a9a4 10020rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
39b3d70b 10021fi
5476a9a4
GM
10022{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_objc_exceptions" >&5
10023$as_echo "$emacs_cv_objc_exceptions" >&6; }
10024 if test $emacs_cv_objc_exceptions = yes; then
39b3d70b 10025
5476a9a4
GM
10026$as_echo "#define _NATIVE_OBJC_EXCEPTIONS 1" >>confdefs.h
10027
10028 GNU_OBJC_CFLAGS="-fobjc-exceptions"
10029 fi
10030 fi
10031
10032 CFLAGS="$CFLAGS $GNU_OBJC_CFLAGS"
10033
10034 ac_fn_c_check_header_mongrel "$LINENO" "AppKit/AppKit.h" "ac_cv_header_AppKit_AppKit_h" "$ac_includes_default"
10035if test "x$ac_cv_header_AppKit_AppKit_h" = x""yes; then :
10036 HAVE_NS=yes
067d23c9 10037else
5476a9a4
GM
10038 as_fn_error "\`--with-ns' was specified, but the include
10039 files are missing or cannot be compiled." "$LINENO" 5
10040fi
f199cab1 10041
f199cab1 10042
dc67e786 10043
c6ad9bca
GM
10044 macfont_file=""
10045 if test "${NS_IMPL_COCOA}" = "yes"; then
10046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.4 or newer" >&5
10047$as_echo_n "checking for OSX 10.4 or newer... " >&6; }
10048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
dc67e786
GM
10049/* end confdefs.h. */
10050#include <AppKit/AppKit.h>
10051int
10052main ()
10053{
10054
10055#ifdef MAC_OS_X_VERSION_MAX_ALLOWED
10056#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1040
10057 ; /* OK */
10058#else
10059#error "OSX 10.4 or newer required"
10060#endif
10061#endif
10062
10063 ;
10064 return 0;
10065}
10066_ACEOF
10067if ac_fn_c_try_compile "$LINENO"; then :
10068 ns_osx_have_104=yes
10069else
10070 ns_osx_have_104=no
10071fi
10072rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c6ad9bca
GM
10073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ns_osx_have_104" >&5
10074$as_echo "$ns_osx_have_104" >&6; }
10075
10076 if test $ns_osx_have_104 = no; then
10077 as_fn_error "\`OSX 10.4 or newer is required'" "$LINENO" 5;
10078 fi
10079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 or newer" >&5
10080$as_echo_n "checking for OSX 10.5 or newer... " >&6; }
10081 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10082/* end confdefs.h. */
10083#include <AppKit/AppKit.h>
10084int
10085main ()
10086{
10087
10088#ifdef MAC_OS_X_VERSION_MAX_ALLOWED
10089#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1050
10090 ; /* OK */
10091#else
10092#error "OSX 10.5 not found"
10093#endif
10094#endif
10095
10096 ;
10097 return 0;
10098}
10099_ACEOF
10100if ac_fn_c_try_compile "$LINENO"; then :
10101 ns_osx_have_105=yes
10102else
10103 ns_osx_have_105=no
10104fi
10105rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ns_osx_have_105" >&5
10107$as_echo "$ns_osx_have_105" >&6; }
10108 if test $ns_osx_have_105 = yes; then
10109 macfont_file="macfont.o"
10110 fi
10111 fi
5476a9a4
GM
10112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10113/* end confdefs.h. */
10114#include <Foundation/NSObjCRuntime.h>
067d23c9
KY
10115int
10116main ()
10117{
5476a9a4
GM
10118NSInteger i;
10119 ;
067d23c9
KY
10120 return 0;
10121}
10122_ACEOF
5476a9a4
GM
10123if ac_fn_c_try_compile "$LINENO"; then :
10124 ns_have_nsinteger=yes
067d23c9 10125else
5476a9a4 10126 ns_have_nsinteger=no
067d23c9 10127fi
5476a9a4
GM
10128rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10129 if test $ns_have_nsinteger = yes; then
067d23c9 10130
5476a9a4 10131$as_echo "#define NS_HAVE_NSINTEGER 1" >>confdefs.h
067d23c9 10132
067d23c9 10133 fi
5476a9a4 10134fi
067d23c9 10135
5476a9a4 10136
5c0255d9 10137
5476a9a4
GM
10138INSTALL_ARCH_INDEP_EXTRA=install-etc
10139ns_self_contained=no
5476a9a4
GM
10140NS_OBJ=
10141NS_OBJC_OBJ=
10142if test "${HAVE_NS}" = yes; then
10143 if test "$with_toolkit_scroll_bars" = "no"; then
10144 as_fn_error "Non-toolkit scroll bars are not implemented for Nextstep." "$LINENO" 5
10145 fi
10146
10147 window_system=nextstep
5476a9a4
GM
10148 # set up packaging dirs
10149 if test "${EN_NS_SELF_CONTAINED}" = yes; then
10150 ns_self_contained=yes
10151 prefix=${ns_appresdir}
10152 exec_prefix=${ns_appbindir}
10153 libexecdir="\${ns_appbindir}/libexec"
10154 archlibdir="\${ns_appbindir}/libexec"
7a67e06b 10155 etcdocdir="\${ns_appresdir}/etc"
5476a9a4
GM
10156 etcdir="\${ns_appresdir}/etc"
10157 infodir="\${ns_appresdir}/info"
10158 mandir="\${ns_appresdir}/man"
10159 lispdir="\${ns_appresdir}/lisp"
10160 leimdir="\${ns_appresdir}/leim"
10161 INSTALL_ARCH_INDEP_EXTRA=
10162 fi
c6ad9bca
GM
10163
10164 NS_OBJC_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o $macfont_file"
5476a9a4
GM
10165fi
10166CFLAGS="$tmp_CFLAGS"
10167CPPFLAGS="$tmp_CPPFLAGS"
10168
10169
10170
10171
10172
5c0255d9
GM
10173HAVE_W32=no
10174W32_OBJ=
10175W32_LIBS=
7c61eaab
GM
10176EMACSRES=
10177CLIENTRES=
10178CLIENTW=
b5eb356a 10179W32_RES_LINK=
7c61eaab 10180EMACS_MANIFEST=
68b8ed38 10181UPDATE_MANIFEST=
5c0255d9 10182if test "${with_w32}" != no; then
7c61eaab
GM
10183 case "${opsys}" in
10184 cygwin)
10185 ac_fn_c_check_header_mongrel "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default"
5c0255d9
GM
10186if test "x$ac_cv_header_windows_h" = x""yes; then :
10187 HAVE_W32=yes
10188else
10189 as_fn_error "\`--with-w32' was specified, but windows.h
7c61eaab
GM
10190 cannot be found." "$LINENO" 5
10191fi
10192
10193
10194 ;;
10195 mingw32)
10196 ## Using --with-w32 with MinGW is a no-op, but we allow it.
10197 ;;
10198 *)
10199 as_fn_error "Using w32 with an autotools build is only supported for Cygwin and MinGW32." "$LINENO" 5
10200 ;;
10201 esac
5c0255d9
GM
10202fi
10203
7c61eaab
GM
10204if test "${opsys}" = "mingw32"; then
10205 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Windows API headers are recent enough" >&5
10206$as_echo_n "checking whether Windows API headers are recent enough... " >&6; }
10207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10208/* end confdefs.h. */
10209
10210 #include <windows.h>
10211 #include <usp10.h>
10212int
10213main ()
10214{
20c9c1dc
GM
10215PIMAGE_NT_HEADERS pHeader;
10216 PIMAGE_SECTION_HEADER pSection = IMAGE_FIRST_SECTION(pHeader)
7c61eaab
GM
10217 ;
10218 return 0;
10219}
10220_ACEOF
10221if ac_fn_c_try_compile "$LINENO"; then :
10222 emacs_cv_w32api=yes
10223 HAVE_W32=yes
10224else
10225 emacs_cv_w32api=no
10226fi
10227rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_w32api" >&5
10229$as_echo "$emacs_cv_w32api" >&6; }
10230 if test "${emacs_cv_w32api}" = "no"; then
10231 as_fn_error "the Windows API headers are too old to support this build." "$LINENO" 5
10232 fi
10233fi
5c0255d9 10234
7c61eaab
GM
10235FIRSTFILE_OBJ=
10236NTDIR=
10237LIBS_ECLIENT=
10238LIB_WSOCK32=
10239NTLIB=
10240CM_OBJ="cm.o"
10241XARGS_LIMIT=
10242if test "${HAVE_W32}" = "yes"; then
5c0255d9
GM
10243
10244$as_echo "#define HAVE_NTGUI 1" >>confdefs.h
10245
b5eb356a
GM
10246 if test -n "$ac_tool_prefix"; then
10247 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
10248set dummy ${ac_tool_prefix}windres; ac_word=$2
10249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10250$as_echo_n "checking for $ac_word... " >&6; }
10251if test "${ac_cv_prog_WINDRES+set}" = set; then :
10252 $as_echo_n "(cached) " >&6
10253else
10254 if test -n "$WINDRES"; then
10255 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
10256else
10257as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10258for as_dir in $PATH
10259do
10260 IFS=$as_save_IFS
10261 test -z "$as_dir" && as_dir=.
10262 for ac_exec_ext in '' $ac_executable_extensions; do
10263 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10264 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
10265 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10266 break 2
10267 fi
10268done
10269 done
10270IFS=$as_save_IFS
10271
10272fi
10273fi
10274WINDRES=$ac_cv_prog_WINDRES
10275if test -n "$WINDRES"; then
10276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
10277$as_echo "$WINDRES" >&6; }
10278else
10279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10280$as_echo "no" >&6; }
10281fi
10282
10283
10284fi
10285if test -z "$ac_cv_prog_WINDRES"; then
10286 ac_ct_WINDRES=$WINDRES
10287 # Extract the first word of "windres", so it can be a program name with args.
10288set dummy windres; ac_word=$2
10289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10290$as_echo_n "checking for $ac_word... " >&6; }
10291if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then :
10292 $as_echo_n "(cached) " >&6
10293else
10294 if test -n "$ac_ct_WINDRES"; then
10295 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
10296else
10297as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10298for as_dir in $PATH
10299do
10300 IFS=$as_save_IFS
10301 test -z "$as_dir" && as_dir=.
10302 for ac_exec_ext in '' $ac_executable_extensions; do
10303 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10304 ac_cv_prog_ac_ct_WINDRES="windres"
10305 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10306 break 2
10307 fi
10308done
10309 done
10310IFS=$as_save_IFS
10311
10312fi
10313fi
10314ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
10315if test -n "$ac_ct_WINDRES"; then
10316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
10317$as_echo "$ac_ct_WINDRES" >&6; }
10318else
10319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10320$as_echo "no" >&6; }
10321fi
10322
10323 if test "x$ac_ct_WINDRES" = x; then
10324 WINDRES="as_fn_error "No resource compiler found." "$LINENO" 5"
10325 else
10326 case $cross_compiling:$ac_tool_warned in
10327yes:)
10328{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10329$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10330ac_tool_warned=yes ;;
10331esac
10332 WINDRES=$ac_ct_WINDRES
10333 fi
10334else
10335 WINDRES="$ac_cv_prog_WINDRES"
10336fi
10337
5c0255d9
GM
10338 W32_OBJ="w32fns.o w32menu.o w32reg.o w32font.o w32term.o"
10339 W32_OBJ="$W32_OBJ w32xfns.o w32select.o w32uniscribe.o"
7c61eaab
GM
10340 EMACSRES="emacs.res"
10341 case "$canonical" in
10342 x86_64-*-*) EMACS_MANIFEST="emacs-x64.manifest" ;;
10343 *) EMACS_MANIFEST="emacs-x86.manifest" ;;
10344 esac
68b8ed38 10345 UPDATE_MANIFEST=update-game-score.exe.manifest
7c61eaab
GM
10346 if test "${opsys}" = "cygwin"; then
10347 W32_LIBS="$W32_LIBS -lkernel32 -luser32 -lgdi32 -lole32 -lcomdlg32"
10348 W32_LIBS="$W32_LIBS -lusp10 -lcomctl32 -lwinspool"
10349 # Tell the linker that emacs.res is an object (which we compile from
10350 # the rc file), not a linker script.
10351 W32_RES_LINK="-Wl,emacs.res"
10352 else
10353 W32_OBJ="$W32_OBJ w32.o w32console.o w32heap.o w32inevt.o w32proc.o"
7c61eaab
GM
10354 W32_LIBS="$W32_LIBS -lwinmm -lgdi32 -lcomdlg32"
10355 W32_LIBS="$W32_LIBS -lmpr -lwinspool -lole32 -lcomctl32 -lusp10"
10356 W32_RES_LINK="\$(EMACSRES)"
10357 CLIENTRES="emacsclient.res"
10358 CLIENTW="emacsclientw\$(EXEEXT)"
10359 FIRSTFILE_OBJ=firstfile.o
10360 NTDIR=nt
10361 CM_OBJ=
10362 LIBS_ECLIENT="-lcomctl32"
10363 LIB_WSOCK32="-lwsock32"
10364 NTLIB="ntlib.$ac_objext"
10365 XARGS_LIMIT="-s 10000"
10366 fi
5c0255d9
GM
10367fi
10368
10369
10370
b5eb356a
GM
10371
10372
7c61eaab
GM
10373
10374
10375
10376
10377
10378
10379
10380
10381
10382
68b8ed38 10383
5c0255d9
GM
10384if test "${HAVE_W32}" = "yes"; then
10385 window_system=w32
10386 with_xft=no
10387fi
10388
42dcba54
GM
10389## $window_system is now set to the window system we will
10390## ultimately use.
10391
d04a2836
GM
10392if test "$window_system" = none && test "$gl_gcc_warnings" = yes; then
10393 # Too many warnings for now.
fc4002bd
GM
10394 nw=
10395 nw="$nw -Wsuggest-attribute=const"
10396 nw="$nw -Wsuggest-attribute=noreturn"
10397
10398 gl_warn_set=
10399 set x $WARN_CFLAGS; shift
10400 for gl_warn_item
10401 do
10402 case " $nw " in
10403 *" $gl_warn_item "*)
10404 ;;
10405 *)
10406 gl_warn_set="$gl_warn_set $gl_warn_item"
10407 ;;
10408 esac
10409 done
10410 WARN_CFLAGS=$gl_warn_set
10411
10412
d04a2836
GM
10413
10414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-variable" >&5
10415$as_echo_n "checking whether C compiler handles -Wno-unused-variable... " >&6; }
10416if test "${gl_cv_warn_c__Wno_unused_variable+set}" = set; then :
10417 $as_echo_n "(cached) " >&6
10418else
10419
10420 gl_save_compiler_FLAGS="$CFLAGS"
10421 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wunused-variable"
10422 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10423/* end confdefs.h. */
10424
10425int
10426main ()
10427{
10428
10429 ;
10430 return 0;
10431}
10432_ACEOF
10433if ac_fn_c_try_compile "$LINENO"; then :
10434 gl_cv_warn_c__Wno_unused_variable=yes
10435else
10436 gl_cv_warn_c__Wno_unused_variable=no
10437fi
10438rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10439 CFLAGS="$gl_save_compiler_FLAGS"
10440
10441fi
10442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_variable" >&5
10443$as_echo "$gl_cv_warn_c__Wno_unused_variable" >&6; }
10444if test "x$gl_cv_warn_c__Wno_unused_variable" = x""yes; then :
10445 as_fn_append WARN_CFLAGS " -Wno-unused-variable"
10446fi
10447
10448
10449
10450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-but-set-variable" >&5
10451$as_echo_n "checking whether C compiler handles -Wno-unused-but-set-variable... " >&6; }
10452if test "${gl_cv_warn_c__Wno_unused_but_set_variable+set}" = set; then :
10453 $as_echo_n "(cached) " >&6
10454else
10455
10456 gl_save_compiler_FLAGS="$CFLAGS"
10457 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wunused-but-set-variable"
10458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10459/* end confdefs.h. */
10460
10461int
10462main ()
10463{
10464
10465 ;
10466 return 0;
10467}
10468_ACEOF
10469if ac_fn_c_try_compile "$LINENO"; then :
10470 gl_cv_warn_c__Wno_unused_but_set_variable=yes
10471else
10472 gl_cv_warn_c__Wno_unused_but_set_variable=no
10473fi
10474rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10475 CFLAGS="$gl_save_compiler_FLAGS"
10476
10477fi
10478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_but_set_variable" >&5
10479$as_echo "$gl_cv_warn_c__Wno_unused_but_set_variable" >&6; }
10480if test "x$gl_cv_warn_c__Wno_unused_but_set_variable" = x""yes; then :
10481 as_fn_append WARN_CFLAGS " -Wno-unused-but-set-variable"
10482fi
10483
10484
10485
10486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-but-set-parameter" >&5
10487$as_echo_n "checking whether C compiler handles -Wno-unused-but-set-parameter... " >&6; }
10488if test "${gl_cv_warn_c__Wno_unused_but_set_parameter+set}" = set; then :
10489 $as_echo_n "(cached) " >&6
10490else
10491
10492 gl_save_compiler_FLAGS="$CFLAGS"
10493 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wunused-but-set-parameter"
10494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10495/* end confdefs.h. */
10496
10497int
10498main ()
10499{
10500
10501 ;
10502 return 0;
10503}
10504_ACEOF
10505if ac_fn_c_try_compile "$LINENO"; then :
10506 gl_cv_warn_c__Wno_unused_but_set_parameter=yes
10507else
10508 gl_cv_warn_c__Wno_unused_but_set_parameter=no
10509fi
10510rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10511 CFLAGS="$gl_save_compiler_FLAGS"
10512
10513fi
10514{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_but_set_parameter" >&5
10515$as_echo "$gl_cv_warn_c__Wno_unused_but_set_parameter" >&6; }
10516if test "x$gl_cv_warn_c__Wno_unused_but_set_parameter" = x""yes; then :
10517 as_fn_append WARN_CFLAGS " -Wno-unused-but-set-parameter"
10518fi
10519
10520
10521fi
10522
42dcba54
GM
10523term_header=
10524HAVE_X_WINDOWS=no
10525HAVE_X11=no
10526USE_X_TOOLKIT=none
10527
5476a9a4
GM
10528case "${window_system}" in
10529 x11 )
10530 HAVE_X_WINDOWS=yes
10531 HAVE_X11=yes
42dcba54 10532 term_header=xterm.h
5476a9a4
GM
10533 case "${with_x_toolkit}" in
10534 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
10535 motif ) USE_X_TOOLKIT=MOTIF ;;
10536 gtk ) with_gtk=yes
42dcba54 10537 term_header=gtkutil.h
5476a9a4 10538 USE_X_TOOLKIT=none ;;
4fa92495
GM
10539 gtk2 ) with_gtk2=yes
10540 term_header=gtkutil.h
10541 USE_X_TOOLKIT=none ;;
5476a9a4 10542 gtk3 ) with_gtk3=yes
42dcba54 10543 term_header=gtkutil.h
5476a9a4
GM
10544 USE_X_TOOLKIT=none ;;
10545 no ) USE_X_TOOLKIT=none ;;
10546 * ) USE_X_TOOLKIT=maybe ;;
10547 esac
10548 ;;
42dcba54
GM
10549 nextstep )
10550 term_header=nsterm.h
5476a9a4 10551 ;;
5c0255d9
GM
10552 w32 )
10553 term_header=w32term.h
10554 ;;
5476a9a4
GM
10555esac
10556
10557if test "$window_system" = none && test "X$with_x" != "Xno"; then
10558 # Extract the first word of "X", so it can be a program name with args.
10559set dummy X; ac_word=$2
10560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10561$as_echo_n "checking for $ac_word... " >&6; }
10562if test "${ac_cv_prog_HAVE_XSERVER+set}" = set; then :
10563 $as_echo_n "(cached) " >&6
10564else
10565 if test -n "$HAVE_XSERVER"; then
10566 ac_cv_prog_HAVE_XSERVER="$HAVE_XSERVER" # Let the user override the test.
10567else
10568as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10569for as_dir in $PATH
10570do
10571 IFS=$as_save_IFS
10572 test -z "$as_dir" && as_dir=.
10573 for ac_exec_ext in '' $ac_executable_extensions; do
10574 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10575 ac_cv_prog_HAVE_XSERVER="true"
10576 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10577 break 2
10578 fi
10579done
10580 done
10581IFS=$as_save_IFS
10582
10583 test -z "$ac_cv_prog_HAVE_XSERVER" && ac_cv_prog_HAVE_XSERVER="false"
10584fi
10585fi
10586HAVE_XSERVER=$ac_cv_prog_HAVE_XSERVER
10587if test -n "$HAVE_XSERVER"; then
10588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_XSERVER" >&5
10589$as_echo "$HAVE_XSERVER" >&6; }
10590else
10591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10592$as_echo "no" >&6; }
10593fi
10594
10595
10596 if test "$HAVE_XSERVER" = true ||
10597 test -n "$DISPLAY" ||
10598 test "`echo /usr/lib/libX11.*`" != "/usr/lib/libX11.*"; then
10599 as_fn_error "You seem to be running X, but no X development libraries
10600were found. You should install the relevant development files for X
10601and for the toolkit you want, such as Gtk+, Lesstif or Motif. Also make
10602sure you have development files for image handling, i.e.
10603tiff, gif, jpeg, png and xpm.
10604If you are sure you want Emacs compiled without X window support, pass
10605 --without-x
10606to configure." "$LINENO" 5
10607 fi
10608fi
10609
10610### If we're using X11, we should use the X menu package.
10611HAVE_MENUS=no
10612case ${HAVE_X11} in
10613 yes ) HAVE_MENUS=yes ;;
10614esac
10615
10616# Does the opsystem file prohibit the use of the GNU malloc?
10617# Assume not, until told otherwise.
10618GNU_MALLOC=yes
10619
10620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc is Doug Lea style" >&5
10621$as_echo_n "checking whether malloc is Doug Lea style... " >&6; }
10622if test "${emacs_cv_var_doug_lea_malloc+set}" = set; then :
067d23c9
KY
10623 $as_echo_n "(cached) " >&6
10624else
5476a9a4
GM
10625 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10626/* end confdefs.h. */
10627#include <malloc.h>
10628 static void hook (void) {}
10629int
10630main ()
10631{
10632malloc_set_state (malloc_get_state ());
10633 __after_morecore_hook = hook;
10634 __malloc_initialize_hook = hook;
10635 ;
10636 return 0;
10637}
10638_ACEOF
10639if ac_fn_c_try_link "$LINENO"; then :
10640 emacs_cv_var_doug_lea_malloc=yes
10641else
10642 emacs_cv_var_doug_lea_malloc=no
10643fi
10644rm -f core conftest.err conftest.$ac_objext \
10645 conftest$ac_exeext conftest.$ac_ext
10646fi
10647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_var_doug_lea_malloc" >&5
10648$as_echo "$emacs_cv_var_doug_lea_malloc" >&6; }
10649doug_lea_malloc=$emacs_cv_var_doug_lea_malloc
10650
10651
10652system_malloc=no
10653case "$opsys" in
10654 ## darwin ld insists on the use of malloc routines in the System framework.
10655 darwin|sol2-10) system_malloc=yes ;;
10656esac
10657
10658if test "${system_malloc}" = "yes"; then
10659
10660$as_echo "#define SYSTEM_MALLOC 1" >>confdefs.h
10661
10662 GNU_MALLOC=no
10663 GNU_MALLOC_reason="
10664 (The GNU allocators don't work with this system configuration.)"
10665 GMALLOC_OBJ=
10666 VMLIMIT_OBJ=
10667else
10668 test "$doug_lea_malloc" != "yes" && GMALLOC_OBJ=gmalloc.o
10669 VMLIMIT_OBJ=vm-limit.o
ce9ae7ca
GM
10670
10671 for ac_header in sys/vlimit.h
10672do :
10673 ac_fn_c_check_header_mongrel "$LINENO" "sys/vlimit.h" "ac_cv_header_sys_vlimit_h" "$ac_includes_default"
10674if test "x$ac_cv_header_sys_vlimit_h" = x""yes; then :
10675 cat >>confdefs.h <<_ACEOF
10676#define HAVE_SYS_VLIMIT_H 1
10677_ACEOF
10678
10679fi
10680
10681done
10682
10683 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for data_start" >&5
10684$as_echo_n "checking for data_start... " >&6; }
10685if test "${emacs_cv_data_start+set}" = set; then :
10686 $as_echo_n "(cached) " >&6
10687else
10688 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10689/* end confdefs.h. */
10690extern char data_start[]; char ch;
10691int
10692main ()
10693{
71e41a46 10694return data_start < &ch;
ce9ae7ca
GM
10695 ;
10696 return 0;
10697}
10698_ACEOF
10699if ac_fn_c_try_link "$LINENO"; then :
10700 emacs_cv_data_start=yes
10701else
10702 emacs_cv_data_start=no
10703fi
10704rm -f core conftest.err conftest.$ac_objext \
10705 conftest$ac_exeext conftest.$ac_ext
10706fi
10707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_data_start" >&5
10708$as_echo "$emacs_cv_data_start" >&6; }
10709 if test $emacs_cv_data_start = yes; then
10710
10711$as_echo "#define HAVE_DATA_START 1" >>confdefs.h
10712
10713 fi
5476a9a4
GM
10714fi
10715
10716
10717
10718if test "$doug_lea_malloc" = "yes" ; then
10719 if test "$GNU_MALLOC" = yes ; then
10720 GNU_MALLOC_reason="
10721 (Using Doug Lea's new malloc from the GNU C Library.)"
10722 fi
10723
10724$as_echo "#define DOUG_LEA_MALLOC 1" >>confdefs.h
10725
10726
10727 ## Use mmap directly for allocating larger buffers.
10728 ## FIXME this comes from src/s/{gnu,gnu-linux}.h:
10729 ## #ifdef DOUG_LEA_MALLOC; #undef REL_ALLOC; #endif
10730 ## Does the AC_FUNC_MMAP test below make this check unnecessary?
10731 case "$opsys" in
10732 gnu*) REL_ALLOC=no ;;
10733 esac
10734fi
10735
10736if test x"${REL_ALLOC}" = x; then
10737 REL_ALLOC=${GNU_MALLOC}
10738fi
10739
10740use_mmap_for_buffers=no
10741case "$opsys" in
10742 cygwin|freebsd|irix6-5) use_mmap_for_buffers=yes ;;
10743esac
10744
10745
10746
10747
10748
10749
10750
10751
10752for ac_func in getpagesize
10753do :
10754 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
10755if test "x$ac_cv_func_getpagesize" = x""yes; then :
10756 cat >>confdefs.h <<_ACEOF
10757#define HAVE_GETPAGESIZE 1
10758_ACEOF
10759
10760fi
10761done
10762
10763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
10764$as_echo_n "checking for working mmap... " >&6; }
10765if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
10766 $as_echo_n "(cached) " >&6
10767else
10768 if test "$cross_compiling" = yes; then :
10769 ac_cv_func_mmap_fixed_mapped=no
10770else
10771 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10772/* end confdefs.h. */
10773$ac_includes_default
10774/* malloc might have been renamed as rpl_malloc. */
10775#undef malloc
10776
10777/* Thanks to Mike Haertel and Jim Avera for this test.
10778 Here is a matrix of mmap possibilities:
10779 mmap private not fixed
10780 mmap private fixed at somewhere currently unmapped
10781 mmap private fixed at somewhere already mapped
10782 mmap shared not fixed
10783 mmap shared fixed at somewhere currently unmapped
10784 mmap shared fixed at somewhere already mapped
10785 For private mappings, we should verify that changes cannot be read()
10786 back from the file, nor mmap's back from the file at a different
10787 address. (There have been systems where private was not correctly
10788 implemented like the infamous i386 svr4.0, and systems where the
10789 VM page cache was not coherent with the file system buffer cache
10790 like early versions of FreeBSD and possibly contemporary NetBSD.)
10791 For shared mappings, we should conversely verify that changes get
10792 propagated back to all the places they're supposed to be.
10793
10794 Grep wants private fixed already mapped.
10795 The main things grep needs to know about mmap are:
10796 * does it exist and is it safe to write into the mmap'd area
10797 * how to use it (BSD variants) */
10798
10799#include <fcntl.h>
10800#include <sys/mman.h>
10801
10802#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
10803char *malloc ();
10804#endif
10805
10806/* This mess was copied from the GNU getpagesize.h. */
10807#ifndef HAVE_GETPAGESIZE
10808# ifdef _SC_PAGESIZE
10809# define getpagesize() sysconf(_SC_PAGESIZE)
10810# else /* no _SC_PAGESIZE */
10811# ifdef HAVE_SYS_PARAM_H
10812# include <sys/param.h>
10813# ifdef EXEC_PAGESIZE
10814# define getpagesize() EXEC_PAGESIZE
10815# else /* no EXEC_PAGESIZE */
10816# ifdef NBPG
10817# define getpagesize() NBPG * CLSIZE
10818# ifndef CLSIZE
10819# define CLSIZE 1
10820# endif /* no CLSIZE */
10821# else /* no NBPG */
10822# ifdef NBPC
10823# define getpagesize() NBPC
10824# else /* no NBPC */
10825# ifdef PAGESIZE
10826# define getpagesize() PAGESIZE
10827# endif /* PAGESIZE */
10828# endif /* no NBPC */
10829# endif /* no NBPG */
10830# endif /* no EXEC_PAGESIZE */
10831# else /* no HAVE_SYS_PARAM_H */
10832# define getpagesize() 8192 /* punt totally */
10833# endif /* no HAVE_SYS_PARAM_H */
10834# endif /* no _SC_PAGESIZE */
10835
10836#endif /* no HAVE_GETPAGESIZE */
10837
10838int
10839main ()
10840{
10841 char *data, *data2, *data3;
10842 const char *cdata2;
10843 int i, pagesize;
10844 int fd, fd2;
10845
10846 pagesize = getpagesize ();
10847
10848 /* First, make a file with some known garbage in it. */
10849 data = (char *) malloc (pagesize);
10850 if (!data)
10851 return 1;
10852 for (i = 0; i < pagesize; ++i)
10853 *(data + i) = rand ();
10854 umask (0);
10855 fd = creat ("conftest.mmap", 0600);
10856 if (fd < 0)
10857 return 2;
10858 if (write (fd, data, pagesize) != pagesize)
10859 return 3;
10860 close (fd);
10861
10862 /* Next, check that the tail of a page is zero-filled. File must have
10863 non-zero length, otherwise we risk SIGBUS for entire page. */
10864 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
10865 if (fd2 < 0)
10866 return 4;
10867 cdata2 = "";
10868 if (write (fd2, cdata2, 1) != 1)
10869 return 5;
10870 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
10871 if (data2 == MAP_FAILED)
10872 return 6;
10873 for (i = 0; i < pagesize; ++i)
10874 if (*(data2 + i))
10875 return 7;
10876 close (fd2);
10877 if (munmap (data2, pagesize))
10878 return 8;
10879
10880 /* Next, try to mmap the file at a fixed address which already has
10881 something else allocated at it. If we can, also make sure that
10882 we see the same garbage. */
10883 fd = open ("conftest.mmap", O_RDWR);
10884 if (fd < 0)
10885 return 9;
10886 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
10887 MAP_PRIVATE | MAP_FIXED, fd, 0L))
10888 return 10;
10889 for (i = 0; i < pagesize; ++i)
10890 if (*(data + i) != *(data2 + i))
10891 return 11;
10892
10893 /* Finally, make sure that changes to the mapped area do not
10894 percolate back to the file as seen by read(). (This is a bug on
10895 some variants of i386 svr4.0.) */
10896 for (i = 0; i < pagesize; ++i)
10897 *(data2 + i) = *(data2 + i) + 1;
10898 data3 = (char *) malloc (pagesize);
10899 if (!data3)
10900 return 12;
10901 if (read (fd, data3, pagesize) != pagesize)
10902 return 13;
10903 for (i = 0; i < pagesize; ++i)
10904 if (*(data + i) != *(data3 + i))
10905 return 14;
10906 close (fd);
10907 return 0;
10908}
10909_ACEOF
10910if ac_fn_c_try_run "$LINENO"; then :
10911 ac_cv_func_mmap_fixed_mapped=yes
10912else
10913 ac_cv_func_mmap_fixed_mapped=no
10914fi
10915rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10916 conftest.$ac_objext conftest.beam conftest.$ac_ext
10917fi
10918
10919fi
10920{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
10921$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
10922if test $ac_cv_func_mmap_fixed_mapped = yes; then
10923
10924$as_echo "#define HAVE_MMAP 1" >>confdefs.h
10925
10926fi
10927rm -f conftest.mmap conftest.txt
10928
10929if test $use_mmap_for_buffers = yes; then
f199cab1 10930
5476a9a4
GM
10931$as_echo "#define USE_MMAP_FOR_BUFFERS 1" >>confdefs.h
10932
10933 REL_ALLOC=no
10934fi
10935
10936LIBS="$LIBS_SYSTEM $LIBS"
10937
10938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
10939$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
10940if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then :
10941 $as_echo_n "(cached) " >&6
067d23c9 10942else
5476a9a4
GM
10943 ac_check_lib_save_LIBS=$LIBS
10944LIBS="-ldnet $LIBS"
10945cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 10946/* end confdefs.h. */
067d23c9 10947
5476a9a4
GM
10948/* Override any GCC internal prototype to avoid an error.
10949 Use char because int might match the return type of a GCC
10950 builtin and then its argument prototype would still apply. */
10951#ifdef __cplusplus
10952extern "C"
10953#endif
10954char dnet_ntoa ();
10955int
10956main ()
f199cab1 10957{
5476a9a4
GM
10958return dnet_ntoa ();
10959 ;
10960 return 0;
f199cab1 10961}
5476a9a4
GM
10962_ACEOF
10963if ac_fn_c_try_link "$LINENO"; then :
10964 ac_cv_lib_dnet_dnet_ntoa=yes
10965else
10966 ac_cv_lib_dnet_dnet_ntoa=no
10967fi
10968rm -f core conftest.err conftest.$ac_objext \
10969 conftest$ac_exeext conftest.$ac_ext
10970LIBS=$ac_check_lib_save_LIBS
10971fi
10972{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
10973$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
10974if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then :
10975 cat >>confdefs.h <<_ACEOF
10976#define HAVE_LIBDNET 1
10977_ACEOF
10978
10979 LIBS="-ldnet $LIBS"
10980
10981fi
10982
10983
10984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lXbsd" >&5
10985$as_echo_n "checking for main in -lXbsd... " >&6; }
10986if test "${ac_cv_lib_Xbsd_main+set}" = set; then :
10987 $as_echo_n "(cached) " >&6
10988else
10989 ac_check_lib_save_LIBS=$LIBS
10990LIBS="-lXbsd $LIBS"
10991cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10992/* end confdefs.h. */
10993
10994
10995int
10996main ()
f199cab1 10997{
5476a9a4
GM
10998return main ();
10999 ;
11000 return 0;
f199cab1 11001}
5476a9a4
GM
11002_ACEOF
11003if ac_fn_c_try_link "$LINENO"; then :
11004 ac_cv_lib_Xbsd_main=yes
11005else
11006 ac_cv_lib_Xbsd_main=no
11007fi
11008rm -f core conftest.err conftest.$ac_objext \
11009 conftest$ac_exeext conftest.$ac_ext
11010LIBS=$ac_check_lib_save_LIBS
11011fi
11012{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xbsd_main" >&5
11013$as_echo "$ac_cv_lib_Xbsd_main" >&6; }
11014if test "x$ac_cv_lib_Xbsd_main" = x""yes; then :
11015 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
11016fi
11017
11018
11019LIB_PTHREAD=
11020
11021
11022
11023if test "$ac_cv_header_pthread_h"; then
11024 if test "$GMALLOC_OBJ" = gmalloc.o; then
11025 emacs_pthread_function=pthread_atfork
11026 else
11027 emacs_pthread_function=pthread_self
11028 fi
11029 as_ac_Lib=`$as_echo "ac_cv_lib_pthread_$emacs_pthread_function" | $as_tr_sh`
11030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $emacs_pthread_function in -lpthread" >&5
11031$as_echo_n "checking for $emacs_pthread_function in -lpthread... " >&6; }
11032if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
11033 $as_echo_n "(cached) " >&6
11034else
11035 ac_check_lib_save_LIBS=$LIBS
11036LIBS="-lpthread $LIBS"
11037cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11038/* end confdefs.h. */
11039
11040/* Override any GCC internal prototype to avoid an error.
11041 Use char because int might match the return type of a GCC
11042 builtin and then its argument prototype would still apply. */
11043#ifdef __cplusplus
11044extern "C"
11045#endif
11046char $emacs_pthread_function ();
11047int
11048main ()
f199cab1 11049{
5476a9a4
GM
11050return $emacs_pthread_function ();
11051 ;
11052 return 0;
f199cab1 11053}
5476a9a4
GM
11054_ACEOF
11055if ac_fn_c_try_link "$LINENO"; then :
11056 eval "$as_ac_Lib=yes"
11057else
11058 eval "$as_ac_Lib=no"
11059fi
11060rm -f core conftest.err conftest.$ac_objext \
11061 conftest$ac_exeext conftest.$ac_ext
11062LIBS=$ac_check_lib_save_LIBS
11063fi
11064eval ac_res=\$$as_ac_Lib
11065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11066$as_echo "$ac_res" >&6; }
11067eval as_val=\$$as_ac_Lib
11068 if test "x$as_val" = x""yes; then :
11069 HAVE_PTHREAD=yes
11070fi
11071
11072fi
11073if test "$HAVE_PTHREAD" = yes; then
11074 case "${canonical}" in
11075 *-hpux*) ;;
11076 *) LIB_PTHREAD="-lpthread"
11077 LIBS="$LIB_PTHREAD $LIBS" ;;
11078 esac
11079
11080$as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
11081
11082fi
11083
11084
11085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cma_open in -lpthreads" >&5
11086$as_echo_n "checking for cma_open in -lpthreads... " >&6; }
11087if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then :
11088 $as_echo_n "(cached) " >&6
11089else
11090 ac_check_lib_save_LIBS=$LIBS
11091LIBS="-lpthreads $LIBS"
11092cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11093/* end confdefs.h. */
11094
11095/* Override any GCC internal prototype to avoid an error.
11096 Use char because int might match the return type of a GCC
11097 builtin and then its argument prototype would still apply. */
11098#ifdef __cplusplus
11099extern "C"
f199cab1 11100#endif
5476a9a4
GM
11101char cma_open ();
11102int
11103main ()
11104{
11105return cma_open ();
11106 ;
11107 return 0;
f199cab1 11108}
5476a9a4
GM
11109_ACEOF
11110if ac_fn_c_try_link "$LINENO"; then :
11111 ac_cv_lib_pthreads_cma_open=yes
11112else
11113 ac_cv_lib_pthreads_cma_open=no
11114fi
11115rm -f core conftest.err conftest.$ac_objext \
11116 conftest$ac_exeext conftest.$ac_ext
11117LIBS=$ac_check_lib_save_LIBS
11118fi
11119{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_cma_open" >&5
11120$as_echo "$ac_cv_lib_pthreads_cma_open" >&6; }
11121if test "x$ac_cv_lib_pthreads_cma_open" = x""yes; then :
11122 cat >>confdefs.h <<_ACEOF
11123#define HAVE_LIBPTHREADS 1
11124_ACEOF
11125
11126 LIBS="-lpthreads $LIBS"
11127
11128fi
11129
11130
11131## Note: when using cpp in s/aix4.2.h, this definition depended on
11132## HAVE_LIBPTHREADS. That was not defined earlier in configure when
11133## the system file was sourced. Hence the value of LIBS_SYSTEM
11134## added to LIBS in configure would never contain the pthreads part,
11135## but the value used in Makefiles might. FIXME?
11136##
11137## -lpthreads seems to be necessary for Xlib in X11R6, and should
11138## be harmless on older versions of X where it happens to exist.
11139test "$opsys" = "aix4-2" && \
11140 test $ac_cv_lib_pthreads_cma_open = yes && \
11141 LIBS_SYSTEM="$LIBS_SYSTEM -lpthreads"
11142
11143
11144case ${host_os} in
11145aix*)
11146 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
11147$as_echo_n "checking for -bbigtoc option... " >&6; }
11148if test "${gdb_cv_bigtoc+set}" = set; then :
11149 $as_echo_n "(cached) " >&6
11150else
11151
11152 case $GCC in
11153 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
11154 *) gdb_cv_bigtoc=-bbigtoc ;;
11155 esac
067d23c9 11156
5476a9a4
GM
11157 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
11158 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11159/* end confdefs.h. */
067d23c9
KY
11160
11161int
11162main ()
11163{
5476a9a4
GM
11164int i;
11165 ;
11166 return 0;
11167}
11168_ACEOF
11169if ac_fn_c_try_link "$LINENO"; then :
067d23c9 11170
5476a9a4
GM
11171else
11172 gdb_cv_bigtoc=
11173fi
11174rm -f core conftest.err conftest.$ac_objext \
11175 conftest$ac_exeext conftest.$ac_ext
067d23c9 11176
5476a9a4
GM
11177fi
11178{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
11179$as_echo "$gdb_cv_bigtoc" >&6; }
11180 ;;
11181esac
067d23c9 11182
5476a9a4
GM
11183# Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets
11184# used for the tests that follow. We set them back to REAL_CFLAGS and
11185# REAL_CPPFLAGS later on.
067d23c9 11186
5476a9a4
GM
11187REAL_CFLAGS="$CFLAGS"
11188REAL_CPPFLAGS="$CPPFLAGS"
11189
11190if test "${HAVE_X11}" = "yes"; then
11191 DEFS="$C_SWITCH_X_SITE $DEFS"
11192 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
11193 LIBS="-lX11 $LIBS"
11194 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
11195 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
11196
11197 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
11198 # This is handled by LD_SWITCH_X_SITE_RPATH during the real build,
11199 # but it's more convenient here to set LD_RUN_PATH since this
11200 # also works on hosts that don't understand LD_SWITCH_X_SITE_RPATH.
11201 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
11202 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
11203 export LD_RUN_PATH
11204 fi
11205
11206 if test "${opsys}" = "gnu-linux"; then
11207 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether X on GNU/Linux needs -b to link" >&5
11208$as_echo_n "checking whether X on GNU/Linux needs -b to link... " >&6; }
11209 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11210/* end confdefs.h. */
067d23c9 11211
5476a9a4
GM
11212int
11213main ()
11214{
11215XOpenDisplay ("foo");
f199cab1 11216 ;
067d23c9
KY
11217 return 0;
11218}
11219_ACEOF
5476a9a4
GM
11220if ac_fn_c_try_link "$LINENO"; then :
11221 xgnu_linux_first_failure=no
067d23c9 11222else
5476a9a4 11223 xgnu_linux_first_failure=yes
067d23c9 11224fi
5476a9a4
GM
11225rm -f core conftest.err conftest.$ac_objext \
11226 conftest$ac_exeext conftest.$ac_ext
11227 if test "${xgnu_linux_first_failure}" = "yes"; then
11228 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
11229 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
11230 OLD_CPPFLAGS="$CPPFLAGS"
11231 OLD_LIBS="$LIBS"
11232 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
11233 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
11234 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
11235 LIBS="$LIBS -b i486-linuxaout"
11236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11237/* end confdefs.h. */
067d23c9 11238
5476a9a4
GM
11239int
11240main ()
11241{
11242XOpenDisplay ("foo");
11243 ;
11244 return 0;
11245}
11246_ACEOF
11247if ac_fn_c_try_link "$LINENO"; then :
11248 xgnu_linux_second_failure=no
11249else
11250 xgnu_linux_second_failure=yes
067d23c9 11251fi
5476a9a4
GM
11252rm -f core conftest.err conftest.$ac_objext \
11253 conftest$ac_exeext conftest.$ac_ext
11254 if test "${xgnu_linux_second_failure}" = "yes"; then
11255 # If we get the same failure with -b, there is no use adding -b.
11256 # So take it out. This plays safe.
11257 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
11258 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
11259 CPPFLAGS="$OLD_CPPFLAGS"
11260 LIBS="$OLD_LIBS"
11261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11262$as_echo "no" >&6; }
11263 else
11264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11265$as_echo "yes" >&6; }
11266 fi
0eb4e0df 11267 else
5476a9a4
GM
11268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11269$as_echo "no" >&6; }
11270 fi
11271 fi
0eb4e0df 11272
5476a9a4
GM
11273 # Reportedly, some broken Solaris systems have XKBlib.h but are missing
11274 # header files included from there.
11275 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Xkb" >&5
11276$as_echo_n "checking for Xkb... " >&6; }
0eb4e0df
GM
11277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11278/* end confdefs.h. */
5476a9a4
GM
11279#include <X11/Xlib.h>
11280#include <X11/XKBlib.h>
0eb4e0df
GM
11281int
11282main ()
11283{
5476a9a4 11284XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);
0eb4e0df
GM
11285 ;
11286 return 0;
11287}
11288_ACEOF
5476a9a4
GM
11289if ac_fn_c_try_link "$LINENO"; then :
11290 emacs_xkb=yes
0eb4e0df 11291else
5476a9a4 11292 emacs_xkb=no
0eb4e0df 11293fi
5476a9a4
GM
11294rm -f core conftest.err conftest.$ac_objext \
11295 conftest$ac_exeext conftest.$ac_ext
11296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_xkb" >&5
11297$as_echo "$emacs_xkb" >&6; }
11298 if test $emacs_xkb = yes; then
1abfdc54 11299
f46ba47d
GM
11300$as_echo "#define HAVE_XKB 1" >>confdefs.h
11301
e1fefc61 11302 fi
1abfdc54 11303
5476a9a4
GM
11304 for ac_func in XrmSetDatabase XScreenResourceString \
11305XScreenNumberOfScreen
11306do :
11307 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11308ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11309eval as_val=\$$as_ac_var
11310 if test "x$as_val" = x""yes; then :
11311 cat >>confdefs.h <<_ACEOF
11312#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
f199cab1 11313_ACEOF
1abfdc54 11314
5476a9a4
GM
11315fi
11316done
1abfdc54 11317
5476a9a4 11318fi
1abfdc54 11319
5476a9a4
GM
11320if test "${window_system}" = "x11"; then
11321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 version 6" >&5
11322$as_echo_n "checking X11 version 6... " >&6; }
11323 if test "${emacs_cv_x11_version_6+set}" = set; then :
067d23c9
KY
11324 $as_echo_n "(cached) " >&6
11325else
5476a9a4 11326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 11327/* end confdefs.h. */
5476a9a4 11328#include <X11/Xlib.h>
067d23c9
KY
11329int
11330main ()
11331{
5476a9a4
GM
11332#if XlibSpecificationRelease < 6
11333fail;
11334#endif
11335
067d23c9
KY
11336 ;
11337 return 0;
11338}
11339_ACEOF
5476a9a4
GM
11340if ac_fn_c_try_link "$LINENO"; then :
11341 emacs_cv_x11_version_6=yes
11342else
11343 emacs_cv_x11_version_6=no
11344fi
11345rm -f core conftest.err conftest.$ac_objext \
11346 conftest$ac_exeext conftest.$ac_ext
067d23c9 11347fi
f199cab1 11348
5476a9a4
GM
11349 if test $emacs_cv_x11_version_6 = yes; then
11350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5
11351$as_echo "6 or newer" >&6; }
f199cab1 11352
5476a9a4 11353$as_echo "#define HAVE_X11R6 1" >>confdefs.h
f199cab1
GM
11354
11355
5476a9a4 11356$as_echo "#define HAVE_X_I18N 1" >>confdefs.h
f199cab1 11357
5476a9a4
GM
11358 ## inoue@ainet.or.jp says Solaris has a bug related to X11R6-style
11359 ## XIM support.
11360 case "$opsys" in
11361 sol2-*) : ;;
11362 *)
11363$as_echo "#define HAVE_X11R6_XIM 1" >>confdefs.h
f199cab1 11364
5476a9a4
GM
11365 ;;
11366 esac
11367 else
11368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5
11369$as_echo "before 6" >&6; }
11370 fi
11371fi
f199cab1 11372
067d23c9 11373
5476a9a4
GM
11374### Use -lrsvg-2 if available, unless `--with-rsvg=no' is specified.
11375HAVE_RSVG=no
7c61eaab 11376if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes" || test "${opsys}" = "mingw32"; then
5476a9a4
GM
11377 if test "${with_rsvg}" != "no"; then
11378 RSVG_REQUIRED=2.11.0
11379 RSVG_MODULE="librsvg-2.0 >= $RSVG_REQUIRED"
067d23c9 11380
f199cab1 11381
5476a9a4 11382 succeeded=no
067d23c9 11383
5476a9a4
GM
11384 if test "$PKG_CONFIG" = "no" ; then
11385 :
11386 else
11387 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 11388 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
11389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $RSVG_MODULE" >&5
11390$as_echo_n "checking for $RSVG_MODULE... " >&6; }
f199cab1 11391
b5591ebb
GM
11392 if "$PKG_CONFIG" --exists "$RSVG_MODULE" 2>&5 &&
11393 RSVG_CFLAGS=`"$PKG_CONFIG" --cflags "$RSVG_MODULE" 2>&5` &&
11394 RSVG_LIBS=`"$PKG_CONFIG" --libs "$RSVG_MODULE" 2>&5`; then
5476a9a4
GM
11395 edit_cflags="
11396 s,///*,/,g
11397 s/^/ /
11398 s/ -I/ $isystem/g
11399 s/^ //
11400 "
11401 RSVG_CFLAGS=`$as_echo "$RSVG_CFLAGS" | sed -e "$edit_cflags"`
11402 RSVG_LIBS=`$as_echo "$RSVG_LIBS" | sed -e 's,///*,/,g'`
11403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$RSVG_CFLAGS' LIBS='$RSVG_LIBS'" >&5
11404$as_echo "yes CFLAGS='$RSVG_CFLAGS' LIBS='$RSVG_LIBS'" >&6; }
11405 succeeded=yes
11406 else
11407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11408$as_echo "no" >&6; }
11409 RSVG_CFLAGS=""
11410 RSVG_LIBS=""
11411 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
11412 ## do set a variable so people can do so. Do it in a subshell
11413 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 11414 RSVG_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$RSVG_MODULE") 2>&1`
f199cab1 11415
5476a9a4 11416 fi
067d23c9 11417
067d23c9 11418
067d23c9 11419
f199cab1 11420 else
5476a9a4
GM
11421 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11422 echo "*** See http://www.freedesktop.org/software/pkgconfig"
f199cab1 11423 fi
5476a9a4
GM
11424 fi
11425
11426 if test $succeeded = yes; then
11427 HAVE_RSVG=yes
11428 else
11429 :
11430 fi
067d23c9 11431
067d23c9 11432
067d23c9 11433
f199cab1 11434
5476a9a4 11435 if test $HAVE_RSVG = yes; then
f199cab1 11436
5476a9a4
GM
11437$as_echo "#define HAVE_RSVG 1" >>confdefs.h
11438
11439 CFLAGS="$CFLAGS $RSVG_CFLAGS"
11440 LIBS="$RSVG_LIBS $LIBS"
11441 fi
f199cab1 11442 fi
5476a9a4 11443fi
f199cab1 11444
5476a9a4 11445HAVE_IMAGEMAGICK=no
d236c302 11446if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes"; then
5476a9a4
GM
11447 if test "${with_imagemagick}" != "no"; then
11448 ## 6.2.8 is the earliest version known to work, but earlier versions
11449 ## might work - let us know if you find one.
11450 ## 6.0.7 does not work. See bug#7955.
0cb77136
GM
11451 ## 6.8.2 makes Emacs crash; see Bug#13867.
11452 IMAGEMAGICK_MODULE="Wand >= 6.2.8 Wand != 6.8.2"
f199cab1 11453
5476a9a4 11454 succeeded=no
f199cab1 11455
5476a9a4
GM
11456 if test "$PKG_CONFIG" = "no" ; then
11457 :
11458 else
11459 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 11460 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
11461 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $IMAGEMAGICK_MODULE" >&5
11462$as_echo_n "checking for $IMAGEMAGICK_MODULE... " >&6; }
f199cab1 11463
b5591ebb
GM
11464 if "$PKG_CONFIG" --exists "$IMAGEMAGICK_MODULE" 2>&5 &&
11465 IMAGEMAGICK_CFLAGS=`"$PKG_CONFIG" --cflags "$IMAGEMAGICK_MODULE" 2>&5` &&
11466 IMAGEMAGICK_LIBS=`"$PKG_CONFIG" --libs "$IMAGEMAGICK_MODULE" 2>&5`; then
5476a9a4
GM
11467 edit_cflags="
11468 s,///*,/,g
11469 s/^/ /
11470 s/ -I/ $isystem/g
11471 s/^ //
11472 "
11473 IMAGEMAGICK_CFLAGS=`$as_echo "$IMAGEMAGICK_CFLAGS" | sed -e "$edit_cflags"`
11474 IMAGEMAGICK_LIBS=`$as_echo "$IMAGEMAGICK_LIBS" | sed -e 's,///*,/,g'`
11475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$IMAGEMAGICK_CFLAGS' LIBS='$IMAGEMAGICK_LIBS'" >&5
11476$as_echo "yes CFLAGS='$IMAGEMAGICK_CFLAGS' LIBS='$IMAGEMAGICK_LIBS'" >&6; }
11477 succeeded=yes
11478 else
11479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11480$as_echo "no" >&6; }
11481 IMAGEMAGICK_CFLAGS=""
11482 IMAGEMAGICK_LIBS=""
11483 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
11484 ## do set a variable so people can do so. Do it in a subshell
11485 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 11486 IMAGEMAGICK_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$IMAGEMAGICK_MODULE") 2>&1`
f199cab1 11487
5476a9a4 11488 fi
f199cab1 11489
f199cab1 11490
f199cab1 11491
5476a9a4
GM
11492 else
11493 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11494 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11495 fi
f199cab1 11496 fi
5476a9a4
GM
11497
11498 if test $succeeded = yes; then
11499 HAVE_IMAGEMAGICK=yes
f199cab1 11500 else
5476a9a4 11501 :
067d23c9
KY
11502 fi
11503
f199cab1 11504
067d23c9 11505
f199cab1 11506
5476a9a4 11507 if test $HAVE_IMAGEMAGICK = yes; then
067d23c9 11508
5476a9a4 11509$as_echo "#define HAVE_IMAGEMAGICK 1" >>confdefs.h
f199cab1 11510
5476a9a4
GM
11511 CFLAGS="$CFLAGS $IMAGEMAGICK_CFLAGS"
11512 LIBS="$IMAGEMAGICK_LIBS $LIBS"
11513 for ac_func in MagickExportImagePixels MagickMergeImageLayers
11514do :
11515 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11516ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11517eval as_val=\$$as_ac_var
11518 if test "x$as_val" = x""yes; then :
11519 cat >>confdefs.h <<_ACEOF
11520#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
067d23c9 11521_ACEOF
f199cab1
GM
11522
11523fi
5476a9a4
GM
11524done
11525
067d23c9
KY
11526 fi
11527 fi
5476a9a4 11528fi
067d23c9 11529
f199cab1 11530
5476a9a4
GM
11531HAVE_GTK=no
11532GTK_OBJ=
6d89e343 11533gtk_term_header=$term_header
4fa92495
GM
11534check_gtk2=no
11535gtk3_pkg_errors=
7c61eaab
GM
11536if test "${opsys}" != "mingw32"; then
11537 if test "${with_gtk3}" = "yes" || test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "maybe"; then
11538 GLIB_REQUIRED=2.28
11539 GTK_REQUIRED=3.0
11540 GTK_MODULES="gtk+-3.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
f199cab1
GM
11541
11542
5476a9a4 11543 succeeded=no
f199cab1 11544
5476a9a4
GM
11545 if test "$PKG_CONFIG" = "no" ; then
11546 pkg_check_gtk=no
11547 else
11548 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 11549 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
11550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5
11551$as_echo_n "checking for $GTK_MODULES... " >&6; }
f199cab1 11552
b5591ebb
GM
11553 if "$PKG_CONFIG" --exists "$GTK_MODULES" 2>&5 &&
11554 GTK_CFLAGS=`"$PKG_CONFIG" --cflags "$GTK_MODULES" 2>&5` &&
11555 GTK_LIBS=`"$PKG_CONFIG" --libs "$GTK_MODULES" 2>&5`; then
5476a9a4
GM
11556 edit_cflags="
11557 s,///*,/,g
11558 s/^/ /
11559 s/ -I/ $isystem/g
11560 s/^ //
11561 "
11562 GTK_CFLAGS=`$as_echo "$GTK_CFLAGS" | sed -e "$edit_cflags"`
11563 GTK_LIBS=`$as_echo "$GTK_LIBS" | sed -e 's,///*,/,g'`
11564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&5
11565$as_echo "yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&6; }
11566 succeeded=yes
11567 else
11568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11569$as_echo "no" >&6; }
11570 GTK_CFLAGS=""
11571 GTK_LIBS=""
11572 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
11573 ## do set a variable so people can do so. Do it in a subshell
11574 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 11575 GTK_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$GTK_MODULES") 2>&1`
f199cab1 11576
5476a9a4 11577 fi
f199cab1 11578
f199cab1 11579
f199cab1 11580
5476a9a4
GM
11581 else
11582 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11583 echo "*** See http://www.freedesktop.org/software/pkgconfig"
f199cab1 11584 fi
5476a9a4 11585 fi
067d23c9 11586
5476a9a4
GM
11587 if test $succeeded = yes; then
11588 pkg_check_gtk=yes
11589 else
11590 pkg_check_gtk=no
11591 fi
067d23c9 11592
7c61eaab
GM
11593 if test "$pkg_check_gtk" = "no" && test "$with_gtk3" = "yes"; then
11594 as_fn_error "$GTK_PKG_ERRORS" "$LINENO" 5
11595 fi
11596 if test "$pkg_check_gtk" = "yes"; then
067d23c9 11597
5476a9a4 11598$as_echo "#define HAVE_GTK3 1" >>confdefs.h
067d23c9 11599
7c61eaab 11600 GTK_OBJ=emacsgtkfixed.o
6d89e343 11601 gtk_term_header=gtkutil.h
7c61eaab
GM
11602 USE_GTK_TOOLKIT="GTK3"
11603 if test "x$ac_enable_gtk_deprecation_warnings" = x; then
11604 GTK_CFLAGS="$GTK_CFLAGS -DGDK_DISABLE_DEPRECATION_WARNINGS"
c081121f 11605 GTK_CFLAGS="$GTK_CFLAGS -DGLIB_DISABLE_DEPRECATION_WARNINGS"
7c61eaab
GM
11606 fi
11607 else
11608 check_gtk2=yes
11609 gtk3_pkg_errors="$GTK_PKG_ERRORS "
11610 fi
4fa92495 11611 fi
067d23c9 11612
7c61eaab
GM
11613 if test "${with_gtk2}" = "yes" || test "$check_gtk2" = "yes"; then
11614 GLIB_REQUIRED=2.10
11615 GTK_REQUIRED=2.10
11616 GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
f199cab1 11617
5476a9a4
GM
11618
11619 succeeded=no
11620
11621 if test "$PKG_CONFIG" = "no" ; then
11622 pkg_check_gtk=no
11623 else
11624 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 11625 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
11626 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5
11627$as_echo_n "checking for $GTK_MODULES... " >&6; }
11628
b5591ebb
GM
11629 if "$PKG_CONFIG" --exists "$GTK_MODULES" 2>&5 &&
11630 GTK_CFLAGS=`"$PKG_CONFIG" --cflags "$GTK_MODULES" 2>&5` &&
11631 GTK_LIBS=`"$PKG_CONFIG" --libs "$GTK_MODULES" 2>&5`; then
5476a9a4
GM
11632 edit_cflags="
11633 s,///*,/,g
11634 s/^/ /
11635 s/ -I/ $isystem/g
11636 s/^ //
11637 "
11638 GTK_CFLAGS=`$as_echo "$GTK_CFLAGS" | sed -e "$edit_cflags"`
11639 GTK_LIBS=`$as_echo "$GTK_LIBS" | sed -e 's,///*,/,g'`
11640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&5
11641$as_echo "yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&6; }
11642 succeeded=yes
11643 else
11644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11645$as_echo "no" >&6; }
11646 GTK_CFLAGS=""
11647 GTK_LIBS=""
11648 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
11649 ## do set a variable so people can do so. Do it in a subshell
11650 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 11651 GTK_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$GTK_MODULES") 2>&1`
5476a9a4
GM
11652
11653 fi
11654
11655
11656
11657 else
11658 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11659 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11660 fi
11661 fi
11662
11663 if test $succeeded = yes; then
11664 pkg_check_gtk=yes
11665 else
11666 pkg_check_gtk=no
11667 fi
11668
7c61eaab
GM
11669 if test "$pkg_check_gtk" = "no" &&
11670 { test "$with_gtk" = yes || test "$with_gtk2" = "yes"; }
11671 then
11672 as_fn_error "$gtk3_pkg_errors$GTK_PKG_ERRORS" "$LINENO" 5
11673 fi
11674 test "$pkg_check_gtk" = "yes" && USE_GTK_TOOLKIT="GTK2"
5476a9a4 11675 fi
067d23c9 11676fi
067d23c9 11677
5476a9a4
GM
11678if test x"$pkg_check_gtk" = xyes; then
11679
11680
11681
11682 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS"
11683 CFLAGS="$CFLAGS $GTK_CFLAGS"
11684 LIBS="$GTK_LIBS $LIBS"
646b9499
GM
11685 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether GTK compiles" >&5
11686$as_echo_n "checking whether GTK compiles... " >&6; }
11687 GTK_COMPILES=no
11688 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11689/* end confdefs.h. */
11690/* Check the Gtk and Glib APIs. */
11691 #include <gtk/gtk.h>
11692 #include <glib-object.h>
11693 static void
11694 callback (GObject *go, GParamSpec *spec, gpointer user_data)
11695 {}
11696
11697int
11698main ()
11699{
11700
11701 GtkSettings *gs = 0;
11702 /* Use G_CALLBACK to make sure function pointers can be cast to void *;
11703 strict C prohibits this. Use gtk_main_iteration to test that the
11704 libraries are there. */
11705 if (g_signal_handler_find (G_OBJECT (gs), G_SIGNAL_MATCH_FUNC,
11706 0, 0, 0, G_CALLBACK (callback), 0))
11707 gtk_main_iteration ();
11708
11709 ;
11710 return 0;
11711}
5476a9a4 11712_ACEOF
646b9499
GM
11713if ac_fn_c_try_link "$LINENO"; then :
11714 GTK_COMPILES=yes
f199cab1 11715fi
646b9499
GM
11716rm -f core conftest.err conftest.$ac_objext \
11717 conftest$ac_exeext conftest.$ac_ext
11718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_COMPILES" >&5
11719$as_echo "$GTK_COMPILES" >&6; }
5476a9a4 11720 if test "${GTK_COMPILES}" != "yes"; then
6d89e343 11721 GTK_OBJ=
5476a9a4
GM
11722 if test "$USE_X_TOOLKIT" != "maybe"; then
11723 as_fn_error "Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" "$LINENO" 5;
11724 fi
11725 else
11726 HAVE_GTK=yes
11727
11728$as_echo "#define USE_GTK 1" >>confdefs.h
067d23c9 11729
5476a9a4 11730 GTK_OBJ="gtkutil.o $GTK_OBJ"
6d89e343 11731 term_header=$gtk_term_header
5476a9a4 11732 USE_X_TOOLKIT=none
b5591ebb 11733 if "$PKG_CONFIG" --atleast-version=2.10 gtk+-2.0; then
5476a9a4
GM
11734 :
11735 else
11736 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your version of Gtk+ will have problems with
11737 closing open displays. This is no problem if you just use
11738 one display, but if you use more than one and close one of them
11739 Emacs may crash." >&5
11740$as_echo "$as_me: WARNING: Your version of Gtk+ will have problems with
11741 closing open displays. This is no problem if you just use
11742 one display, but if you use more than one and close one of them
11743 Emacs may crash." >&2;}
11744 sleep 3
11745 fi
067d23c9
KY
11746 fi
11747
5476a9a4 11748fi
067d23c9
KY
11749
11750
11751
5476a9a4 11752if test "${HAVE_GTK}" = "yes"; then
067d23c9 11753
5476a9a4
GM
11754 if test "$with_toolkit_scroll_bars" != no; then
11755 with_toolkit_scroll_bars=yes
11756 fi
067d23c9 11757
5476a9a4
GM
11758 HAVE_GTK_FILE_SELECTION=no
11759 ac_fn_c_check_decl "$LINENO" "GTK_TYPE_FILE_SELECTION" "ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" "$ac_includes_default
11760#include <gtk/gtk.h>
11761"
11762if test "x$ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" = x""yes; then :
11763 HAVE_GTK_FILE_SELECTION=yes
11764else
11765 HAVE_GTK_FILE_SELECTION=no
11766fi
067d23c9 11767
5476a9a4
GM
11768 if test "$HAVE_GTK_FILE_SELECTION" = yes; then
11769 for ac_func in gtk_file_selection_new
11770do :
11771 ac_fn_c_check_func "$LINENO" "gtk_file_selection_new" "ac_cv_func_gtk_file_selection_new"
11772if test "x$ac_cv_func_gtk_file_selection_new" = x""yes; then :
11773 cat >>confdefs.h <<_ACEOF
11774#define HAVE_GTK_FILE_SELECTION_NEW 1
f199cab1 11775_ACEOF
067d23c9 11776
f199cab1 11777fi
5476a9a4
GM
11778done
11779
f199cab1 11780 fi
067d23c9 11781
4efe5ef9
GM
11782 HAVE_GTK_HANDLE_BOX=no
11783 ac_fn_c_check_decl "$LINENO" "GTK_TYPE_HANDLE_BOX" "ac_cv_have_decl_GTK_TYPE_HANDLE_BOX" "$ac_includes_default
11784#include <gtk/gtk.h>
11785"
11786if test "x$ac_cv_have_decl_GTK_TYPE_HANDLE_BOX" = x""yes; then :
11787 HAVE_GTK_HANDLE_BOX=yes
11788else
11789 HAVE_GTK_HANDLE_BOX=no
11790fi
11791
11792 if test "$HAVE_GTK_HANDLE_BOX" = yes; then
11793 for ac_func in gtk_handle_box_new
11794do :
11795 ac_fn_c_check_func "$LINENO" "gtk_handle_box_new" "ac_cv_func_gtk_handle_box_new"
11796if test "x$ac_cv_func_gtk_handle_box_new" = x""yes; then :
11797 cat >>confdefs.h <<_ACEOF
11798#define HAVE_GTK_HANDLE_BOX_NEW 1
11799_ACEOF
11800
11801fi
11802done
11803
11804 fi
11805
11806 HAVE_GTK_TEAROFF_MENU_ITEM=no
11807 ac_fn_c_check_decl "$LINENO" "GTK_TYPE_TEAROFF_MENU_ITEM" "ac_cv_have_decl_GTK_TYPE_TEAROFF_MENU_ITEM" "$ac_includes_default
11808#include <gtk/gtk.h>
11809"
11810if test "x$ac_cv_have_decl_GTK_TYPE_TEAROFF_MENU_ITEM" = x""yes; then :
11811 HAVE_GTK_TEAROFF_MENU_ITEM=yes
11812else
11813 HAVE_GTK_TEAROFF_MENU_ITEM=no
11814fi
11815
11816 if test "$HAVE_GTK_TEAROFF_MENU_ITEM" = yes; then
11817 for ac_func in gtk_tearoff_menu_item_new
11818do :
11819 ac_fn_c_check_func "$LINENO" "gtk_tearoff_menu_item_new" "ac_cv_func_gtk_tearoff_menu_item_new"
11820if test "x$ac_cv_func_gtk_tearoff_menu_item_new" = x""yes; then :
11821 cat >>confdefs.h <<_ACEOF
11822#define HAVE_GTK_TEAROFF_MENU_ITEM_NEW 1
11823_ACEOF
11824
11825fi
11826done
11827
11828 fi
067d23c9 11829
5476a9a4
GM
11830 for ac_func in gtk_widget_get_window gtk_widget_set_has_window \
11831 gtk_dialog_get_action_area gtk_widget_get_sensitive \
11832 gtk_widget_get_mapped gtk_adjustment_get_page_size \
11833 gtk_orientable_set_orientation \
11834 gtk_window_set_has_resize_grip
11835do :
11836 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11837ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11838eval as_val=\$$as_ac_var
11839 if test "x$as_val" = x""yes; then :
11840 cat >>confdefs.h <<_ACEOF
11841#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11842_ACEOF
067d23c9 11843
5476a9a4
GM
11844fi
11845done
067d23c9 11846
42dcba54
GM
11847
11848 term_header=gtkutil.h
5476a9a4 11849fi
067d23c9 11850
5476a9a4
GM
11851HAVE_DBUS=no
11852DBUS_OBJ=
11853if test "${with_dbus}" = "yes"; then
067d23c9 11854
5476a9a4 11855 succeeded=no
067d23c9 11856
5476a9a4
GM
11857 if test "$PKG_CONFIG" = "no" ; then
11858 HAVE_DBUS=no
f199cab1 11859 else
5476a9a4 11860 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 11861 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
11862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbus-1 >= 1.0" >&5
11863$as_echo_n "checking for dbus-1 >= 1.0... " >&6; }
067d23c9 11864
b5591ebb
GM
11865 if "$PKG_CONFIG" --exists "dbus-1 >= 1.0" 2>&5 &&
11866 DBUS_CFLAGS=`"$PKG_CONFIG" --cflags "dbus-1 >= 1.0" 2>&5` &&
11867 DBUS_LIBS=`"$PKG_CONFIG" --libs "dbus-1 >= 1.0" 2>&5`; then
5476a9a4
GM
11868 edit_cflags="
11869 s,///*,/,g
11870 s/^/ /
11871 s/ -I/ $isystem/g
11872 s/^ //
11873 "
11874 DBUS_CFLAGS=`$as_echo "$DBUS_CFLAGS" | sed -e "$edit_cflags"`
11875 DBUS_LIBS=`$as_echo "$DBUS_LIBS" | sed -e 's,///*,/,g'`
11876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$DBUS_CFLAGS' LIBS='$DBUS_LIBS'" >&5
11877$as_echo "yes CFLAGS='$DBUS_CFLAGS' LIBS='$DBUS_LIBS'" >&6; }
11878 succeeded=yes
11879 else
11880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11881$as_echo "no" >&6; }
11882 DBUS_CFLAGS=""
11883 DBUS_LIBS=""
11884 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
11885 ## do set a variable so people can do so. Do it in a subshell
11886 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 11887 DBUS_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "dbus-1 >= 1.0") 2>&1`
067d23c9 11888
5476a9a4 11889 fi
067d23c9 11890
15f79fcd 11891
067d23c9 11892
5476a9a4
GM
11893 else
11894 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11895 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11896 fi
067d23c9 11897 fi
067d23c9 11898
5476a9a4
GM
11899 if test $succeeded = yes; then
11900 HAVE_DBUS=yes
f199cab1 11901 else
5476a9a4 11902 HAVE_DBUS=no
f199cab1 11903 fi
067d23c9 11904
5476a9a4
GM
11905 if test "$HAVE_DBUS" = yes; then
11906 LIBS="$LIBS $DBUS_LIBS"
067d23c9 11907
5476a9a4 11908$as_echo "#define HAVE_DBUS 1" >>confdefs.h
067d23c9 11909
5476a9a4
GM
11910 for ac_func in dbus_watch_get_unix_fd \
11911 dbus_type_is_valid \
11912 dbus_validate_bus_name \
11913 dbus_validate_path \
11914 dbus_validate_interface \
11915 dbus_validate_member
11916do :
11917 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11918ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11919eval as_val=\$$as_ac_var
11920 if test "x$as_val" = x""yes; then :
11921 cat >>confdefs.h <<_ACEOF
11922#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11923_ACEOF
067d23c9 11924
5476a9a4
GM
11925fi
11926done
067d23c9 11927
5476a9a4
GM
11928 DBUS_OBJ=dbusbind.o
11929 fi
11930fi
067d23c9
KY
11931
11932
5476a9a4
GM
11933HAVE_GSETTINGS=no
11934if test "${HAVE_X11}" = "yes" && test "${with_gsettings}" = "yes"; then
067d23c9 11935
5476a9a4 11936 succeeded=no
067d23c9 11937
5476a9a4
GM
11938 if test "$PKG_CONFIG" = "no" ; then
11939 HAVE_GSETTINGS=no
11940 else
11941 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 11942 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
11943 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gio-2.0 >= 2.26" >&5
11944$as_echo_n "checking for gio-2.0 >= 2.26... " >&6; }
0afb4571 11945
b5591ebb
GM
11946 if "$PKG_CONFIG" --exists "gio-2.0 >= 2.26" 2>&5 &&
11947 GSETTINGS_CFLAGS=`"$PKG_CONFIG" --cflags "gio-2.0 >= 2.26" 2>&5` &&
11948 GSETTINGS_LIBS=`"$PKG_CONFIG" --libs "gio-2.0 >= 2.26" 2>&5`; then
5476a9a4
GM
11949 edit_cflags="
11950 s,///*,/,g
11951 s/^/ /
11952 s/ -I/ $isystem/g
11953 s/^ //
11954 "
11955 GSETTINGS_CFLAGS=`$as_echo "$GSETTINGS_CFLAGS" | sed -e "$edit_cflags"`
11956 GSETTINGS_LIBS=`$as_echo "$GSETTINGS_LIBS" | sed -e 's,///*,/,g'`
11957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GSETTINGS_CFLAGS' LIBS='$GSETTINGS_LIBS'" >&5
11958$as_echo "yes CFLAGS='$GSETTINGS_CFLAGS' LIBS='$GSETTINGS_LIBS'" >&6; }
11959 succeeded=yes
11960 else
11961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11962$as_echo "no" >&6; }
11963 GSETTINGS_CFLAGS=""
11964 GSETTINGS_LIBS=""
11965 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
11966 ## do set a variable so people can do so. Do it in a subshell
11967 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 11968 GSETTINGS_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "gio-2.0 >= 2.26") 2>&1`
0afb4571 11969
5476a9a4 11970 fi
067d23c9
KY
11971
11972
11973
11974 else
5476a9a4
GM
11975 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11976 echo "*** See http://www.freedesktop.org/software/pkgconfig"
067d23c9 11977 fi
5476a9a4 11978 fi
067d23c9 11979
5476a9a4
GM
11980 if test $succeeded = yes; then
11981 HAVE_GSETTINGS=yes
11982 else
11983 HAVE_GSETTINGS=no
11984 fi
f199cab1 11985
5476a9a4 11986 if test "$HAVE_GSETTINGS" = "yes"; then
f199cab1 11987
5476a9a4 11988$as_echo "#define HAVE_GSETTINGS 1" >>confdefs.h
f199cab1 11989
5476a9a4
GM
11990 SETTINGS_CFLAGS="$GSETTINGS_CFLAGS"
11991 SETTINGS_LIBS="$GSETTINGS_LIBS"
11992 fi
11993fi
067d23c9 11994
5476a9a4
GM
11995HAVE_GCONF=no
11996if test "${HAVE_X11}" = "yes" && test "${with_gconf}" = "yes"; then
067d23c9 11997
5476a9a4 11998 succeeded=no
067d23c9 11999
5476a9a4
GM
12000 if test "$PKG_CONFIG" = "no" ; then
12001 HAVE_GCONF=no
12002 else
12003 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 12004 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
12005 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gconf-2.0 >= 2.13" >&5
12006$as_echo_n "checking for gconf-2.0 >= 2.13... " >&6; }
067d23c9 12007
b5591ebb
GM
12008 if "$PKG_CONFIG" --exists "gconf-2.0 >= 2.13" 2>&5 &&
12009 GCONF_CFLAGS=`"$PKG_CONFIG" --cflags "gconf-2.0 >= 2.13" 2>&5` &&
12010 GCONF_LIBS=`"$PKG_CONFIG" --libs "gconf-2.0 >= 2.13" 2>&5`; then
5476a9a4
GM
12011 edit_cflags="
12012 s,///*,/,g
12013 s/^/ /
12014 s/ -I/ $isystem/g
12015 s/^ //
12016 "
12017 GCONF_CFLAGS=`$as_echo "$GCONF_CFLAGS" | sed -e "$edit_cflags"`
12018 GCONF_LIBS=`$as_echo "$GCONF_LIBS" | sed -e 's,///*,/,g'`
12019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GCONF_CFLAGS' LIBS='$GCONF_LIBS'" >&5
12020$as_echo "yes CFLAGS='$GCONF_CFLAGS' LIBS='$GCONF_LIBS'" >&6; }
12021 succeeded=yes
12022 else
12023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12024$as_echo "no" >&6; }
12025 GCONF_CFLAGS=""
12026 GCONF_LIBS=""
12027 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
12028 ## do set a variable so people can do so. Do it in a subshell
12029 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 12030 GCONF_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "gconf-2.0 >= 2.13") 2>&1`
067d23c9 12031
5476a9a4 12032 fi
f199cab1 12033
f199cab1
GM
12034
12035
5476a9a4
GM
12036 else
12037 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12038 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12039 fi
12040 fi
f199cab1 12041
5476a9a4
GM
12042 if test $succeeded = yes; then
12043 HAVE_GCONF=yes
12044 else
12045 HAVE_GCONF=no
12046 fi
f199cab1 12047
5476a9a4 12048 if test "$HAVE_GCONF" = yes; then
f199cab1 12049
5476a9a4 12050$as_echo "#define HAVE_GCONF 1" >>confdefs.h
f199cab1 12051
5476a9a4
GM
12052 SETTINGS_CFLAGS="$SETTINGS_CFLAGS $GCONF_CFLAGS"
12053 SETTINGS_LIBS="$SETTINGS_LIBS $GCONF_LIBS"
12054 fi
12055fi
f199cab1 12056
5476a9a4 12057if test "$HAVE_GSETTINGS" = "yes" || test "$HAVE_GCONF" = "yes"; then
dcde497f
GM
12058
12059 succeeded=no
12060
12061 if test "$PKG_CONFIG" = "no" ; then
12062 HAVE_GOBJECT=no
12063 else
12064 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 12065 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
dcde497f
GM
12066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gobject-2.0 >= 2.0" >&5
12067$as_echo_n "checking for gobject-2.0 >= 2.0... " >&6; }
12068
b5591ebb
GM
12069 if "$PKG_CONFIG" --exists "gobject-2.0 >= 2.0" 2>&5 &&
12070 GOBJECT_CFLAGS=`"$PKG_CONFIG" --cflags "gobject-2.0 >= 2.0" 2>&5` &&
12071 GOBJECT_LIBS=`"$PKG_CONFIG" --libs "gobject-2.0 >= 2.0" 2>&5`; then
dcde497f
GM
12072 edit_cflags="
12073 s,///*,/,g
12074 s/^/ /
12075 s/ -I/ $isystem/g
12076 s/^ //
12077 "
12078 GOBJECT_CFLAGS=`$as_echo "$GOBJECT_CFLAGS" | sed -e "$edit_cflags"`
12079 GOBJECT_LIBS=`$as_echo "$GOBJECT_LIBS" | sed -e 's,///*,/,g'`
12080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GOBJECT_CFLAGS' LIBS='$GOBJECT_LIBS'" >&5
12081$as_echo "yes CFLAGS='$GOBJECT_CFLAGS' LIBS='$GOBJECT_LIBS'" >&6; }
12082 succeeded=yes
12083 else
12084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12085$as_echo "no" >&6; }
12086 GOBJECT_CFLAGS=""
12087 GOBJECT_LIBS=""
12088 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
12089 ## do set a variable so people can do so. Do it in a subshell
12090 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 12091 GOBJECT_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "gobject-2.0 >= 2.0") 2>&1`
dcde497f
GM
12092
12093 fi
12094
12095
12096
12097 else
12098 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12099 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12100 fi
12101 fi
12102
12103 if test $succeeded = yes; then
12104 HAVE_GOBJECT=yes
12105 else
12106 HAVE_GOBJECT=no
12107 fi
12108
12109 if test "$HAVE_GOBJECT" = "yes"; then
12110 SETTINGS_CFLAGS="$SETTINGS_CFLAGS $GOBJECT_CFLAGS"
12111 SETTINGS_LIBS="$SETTINGS_LIBS $GOBJECT_LIBS"
12112 fi
5476a9a4
GM
12113 SAVE_CFLAGS="$CFLAGS"
12114 SAVE_LIBS="$LIBS"
12115 CFLAGS="$SETTINGS_CFLAGS $CFLAGS"
12116 LIBS="$SETTINGS_LIBS $LIBS"
12117 for ac_func in g_type_init
12118do :
12119 ac_fn_c_check_func "$LINENO" "g_type_init" "ac_cv_func_g_type_init"
12120if test "x$ac_cv_func_g_type_init" = x""yes; then :
12121 cat >>confdefs.h <<_ACEOF
12122#define HAVE_G_TYPE_INIT 1
067d23c9 12123_ACEOF
067d23c9 12124
5476a9a4
GM
12125fi
12126done
067d23c9 12127
5476a9a4
GM
12128 CFLAGS="$SAVE_CFLAGS"
12129 LIBS="$SAVE_LIBS"
12130fi
067d23c9 12131
067d23c9 12132
f199cab1 12133
067d23c9 12134
5476a9a4
GM
12135HAVE_LIBSELINUX=no
12136LIBSELINUX_LIBS=
12137if test "${with_selinux}" = "yes"; then
12138 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lgetfilecon in -lselinux" >&5
12139$as_echo_n "checking for lgetfilecon in -lselinux... " >&6; }
12140if test "${ac_cv_lib_selinux_lgetfilecon+set}" = set; then :
12141 $as_echo_n "(cached) " >&6
12142else
12143 ac_check_lib_save_LIBS=$LIBS
12144LIBS="-lselinux $LIBS"
12145cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12146/* end confdefs.h. */
067d23c9 12147
5476a9a4
GM
12148/* Override any GCC internal prototype to avoid an error.
12149 Use char because int might match the return type of a GCC
12150 builtin and then its argument prototype would still apply. */
12151#ifdef __cplusplus
12152extern "C"
f199cab1 12153#endif
5476a9a4 12154char lgetfilecon ();
f199cab1
GM
12155int
12156main ()
12157{
5476a9a4 12158return lgetfilecon ();
f199cab1
GM
12159 ;
12160 return 0;
12161}
12162_ACEOF
5476a9a4
GM
12163if ac_fn_c_try_link "$LINENO"; then :
12164 ac_cv_lib_selinux_lgetfilecon=yes
12165else
12166 ac_cv_lib_selinux_lgetfilecon=no
f199cab1 12167fi
5476a9a4
GM
12168rm -f core conftest.err conftest.$ac_objext \
12169 conftest$ac_exeext conftest.$ac_ext
12170LIBS=$ac_check_lib_save_LIBS
12171fi
12172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_lgetfilecon" >&5
12173$as_echo "$ac_cv_lib_selinux_lgetfilecon" >&6; }
12174if test "x$ac_cv_lib_selinux_lgetfilecon" = x""yes; then :
12175 HAVE_LIBSELINUX=yes
12176else
12177 HAVE_LIBSELINUX=no
067d23c9
KY
12178fi
12179
5476a9a4 12180 if test "$HAVE_LIBSELINUX" = yes; then
067d23c9 12181
5476a9a4 12182$as_echo "#define HAVE_LIBSELINUX 1" >>confdefs.h
067d23c9 12183
5476a9a4
GM
12184 LIBSELINUX_LIBS=-lselinux
12185 fi
f199cab1 12186fi
067d23c9 12187
067d23c9 12188
5476a9a4 12189HAVE_GNUTLS=no
5476a9a4 12190if test "${with_gnutls}" = "yes" ; then
067d23c9 12191
5476a9a4 12192 succeeded=no
067d23c9 12193
5476a9a4
GM
12194 if test "$PKG_CONFIG" = "no" ; then
12195 HAVE_GNUTLS=no
12196 else
12197 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 12198 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
12199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gnutls >= 2.6.6" >&5
12200$as_echo_n "checking for gnutls >= 2.6.6... " >&6; }
067d23c9 12201
b5591ebb
GM
12202 if "$PKG_CONFIG" --exists "gnutls >= 2.6.6" 2>&5 &&
12203 LIBGNUTLS_CFLAGS=`"$PKG_CONFIG" --cflags "gnutls >= 2.6.6" 2>&5` &&
12204 LIBGNUTLS_LIBS=`"$PKG_CONFIG" --libs "gnutls >= 2.6.6" 2>&5`; then
5476a9a4
GM
12205 edit_cflags="
12206 s,///*,/,g
12207 s/^/ /
12208 s/ -I/ $isystem/g
12209 s/^ //
12210 "
12211 LIBGNUTLS_CFLAGS=`$as_echo "$LIBGNUTLS_CFLAGS" | sed -e "$edit_cflags"`
12212 LIBGNUTLS_LIBS=`$as_echo "$LIBGNUTLS_LIBS" | sed -e 's,///*,/,g'`
12213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBGNUTLS_CFLAGS' LIBS='$LIBGNUTLS_LIBS'" >&5
12214$as_echo "yes CFLAGS='$LIBGNUTLS_CFLAGS' LIBS='$LIBGNUTLS_LIBS'" >&6; }
12215 succeeded=yes
12216 else
12217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12218$as_echo "no" >&6; }
12219 LIBGNUTLS_CFLAGS=""
12220 LIBGNUTLS_LIBS=""
12221 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
12222 ## do set a variable so people can do so. Do it in a subshell
12223 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 12224 LIBGNUTLS_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "gnutls >= 2.6.6") 2>&1`
067d23c9 12225
5476a9a4 12226 fi
067d23c9 12227
067d23c9 12228
067d23c9 12229
5476a9a4
GM
12230 else
12231 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12232 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12233 fi
12234 fi
067d23c9 12235
5476a9a4
GM
12236 if test $succeeded = yes; then
12237 HAVE_GNUTLS=yes
12238 else
12239 HAVE_GNUTLS=no
12240 fi
067d23c9 12241
5476a9a4 12242 if test "${HAVE_GNUTLS}" = "yes"; then
067d23c9 12243
5476a9a4 12244$as_echo "#define HAVE_GNUTLS 1" >>confdefs.h
067d23c9 12245
5476a9a4 12246 fi
f199cab1 12247
7c61eaab
GM
12248 # Windows loads GnuTLS dynamically
12249 if test "${opsys}" = "mingw32"; then
7c61eaab 12250 LIBGNUTLS_LIBS=
db7863f4
GM
12251 else
12252 CFLAGS="$CFLAGS $LIBGNUTLS_CFLAGS"
12253 LIBS="$LIBGNUTLS_LIBS $LIBS"
7c61eaab 12254 fi
5476a9a4 12255fi
f527bd02 12256
f527bd02 12257
5476a9a4
GM
12258
12259
0f55a32e
GM
12260NOTIFY_OBJ=
12261NOTIFY_SUMMARY=no
12262
6ee585de
GM
12263if test "${with_ns}" = yes && test ${with_file_notification} = yes; then
12264 with_file_notification=no
12265fi
12266
12267case $with_file_notification,$opsys in
12268 w32,* | yes,mingw32)
12269 ac_fn_c_check_header_mongrel "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default"
12270if test "x$ac_cv_header_windows_h" = x""yes; then :
12271
0f55a32e
GM
12272fi
12273
6ee585de
GM
12274
12275 if test "$ac_cv_header_windows_h" = yes ; then
12276
12277$as_echo "#define HAVE_W32NOTIFY 1" >>confdefs.h
12278
12279 NOTIFY_OBJ=w32notify.o
12280 NOTIFY_SUMMARY="yes (w32)"
12281 fi ;;
12282esac
12283
12284case $with_file_notification,$NOTIFY_OBJ in
12285 gfile, | yes,)
0f55a32e
GM
12286
12287 succeeded=no
12288
12289 if test "$PKG_CONFIG" = "no" ; then
12290 HAVE_GFILENOTIFY=no
12291 else
12292 PKG_CONFIG_MIN_VERSION=0.9.0
12293 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
12294 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gio-2.0 >= 2.24" >&5
12295$as_echo_n "checking for gio-2.0 >= 2.24... " >&6; }
12296
12297 if "$PKG_CONFIG" --exists "gio-2.0 >= 2.24" 2>&5 &&
12298 GFILENOTIFY_CFLAGS=`"$PKG_CONFIG" --cflags "gio-2.0 >= 2.24" 2>&5` &&
12299 GFILENOTIFY_LIBS=`"$PKG_CONFIG" --libs "gio-2.0 >= 2.24" 2>&5`; then
12300 edit_cflags="
12301 s,///*,/,g
12302 s/^/ /
12303 s/ -I/ $isystem/g
12304 s/^ //
12305 "
12306 GFILENOTIFY_CFLAGS=`$as_echo "$GFILENOTIFY_CFLAGS" | sed -e "$edit_cflags"`
12307 GFILENOTIFY_LIBS=`$as_echo "$GFILENOTIFY_LIBS" | sed -e 's,///*,/,g'`
12308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GFILENOTIFY_CFLAGS' LIBS='$GFILENOTIFY_LIBS'" >&5
12309$as_echo "yes CFLAGS='$GFILENOTIFY_CFLAGS' LIBS='$GFILENOTIFY_LIBS'" >&6; }
12310 succeeded=yes
12311 else
12312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12313$as_echo "no" >&6; }
12314 GFILENOTIFY_CFLAGS=""
12315 GFILENOTIFY_LIBS=""
12316 ## If we have a custom action on failure, don't print errors, but
12317 ## do set a variable so people can do so. Do it in a subshell
12318 ## to capture any diagnostics in invoking pkg-config.
12319 GFILENOTIFY_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "gio-2.0 >= 2.24") 2>&1`
12320
12321 fi
12322
12323
12324
12325 else
12326 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12327 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12328 fi
12329 fi
12330
12331 if test $succeeded = yes; then
12332 HAVE_GFILENOTIFY=yes
12333 else
12334 HAVE_GFILENOTIFY=no
12335 fi
12336
6ee585de 12337 if test "$HAVE_GFILENOTIFY" = "yes"; then
0f55a32e
GM
12338
12339$as_echo "#define HAVE_GFILENOTIFY 1" >>confdefs.h
12340
6ee585de
GM
12341 NOTIFY_OBJ=gfilenotify.o
12342 NOTIFY_SUMMARY="yes -lgio (gfile)"
12343 fi ;;
12344esac
12345
12346case $with_file_notification,$NOTIFY_OBJ in
12347 inotify, | yes,)
12348 ac_fn_c_check_header_mongrel "$LINENO" "sys/inotify.h" "ac_cv_header_sys_inotify_h" "$ac_includes_default"
b5eb356a 12349if test "x$ac_cv_header_sys_inotify_h" = x""yes; then :
b5eb356a
GM
12350
12351fi
12352
b5eb356a 12353
6ee585de
GM
12354 if test "$ac_cv_header_sys_inotify_h" = yes ; then
12355 ac_fn_c_check_func "$LINENO" "inotify_init1" "ac_cv_func_inotify_init1"
b5eb356a
GM
12356if test "x$ac_cv_func_inotify_init1" = x""yes; then :
12357
12358fi
12359
6ee585de 12360 if test "$ac_cv_func_inotify_init1" = yes; then
0f55a32e
GM
12361
12362$as_echo "#define HAVE_INOTIFY 1" >>confdefs.h
12363
6ee585de
GM
12364 NOTIFY_OBJ=inotify.o
12365 NOTIFY_SUMMARY="yes -lglibc (inotify)"
12366 fi
12367 fi ;;
12368esac
0f55a32e 12369
6ee585de
GM
12370case $with_file_notification,$NOTIFY_OBJ in
12371 yes,* | no,* | *,?*) ;;
12372 *) as_fn_error "File notification \`$with_file_notification' requested but requirements not found." "$LINENO" 5 ;;
12373esac
0f55a32e 12374
0f55a32e 12375if test -n "$NOTIFY_OBJ"; then
b5eb356a 12376
0f55a32e 12377$as_echo "#define USE_FILE_NOTIFY 1" >>confdefs.h
b5eb356a
GM
12378
12379fi
12380
0f55a32e
GM
12381
12382
12383
5476a9a4
GM
12384HAVE_XAW3D=no
12385LUCID_LIBW=
12386if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then
12387 if test "$with_xaw3d" != no; then
5476a9a4 12388 if test "${emacs_cv_xaw3d+set}" = set; then :
f199cab1
GM
12389 $as_echo_n "(cached) " >&6
12390else
5476a9a4
GM
12391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12392/* end confdefs.h. */
f527bd02 12393
5476a9a4
GM
12394#include <X11/Intrinsic.h>
12395#include <X11/Xaw3d/Simple.h>
12396int
12397main ()
12398{
12399
12400 ;
12401 return 0;
12402}
12403_ACEOF
12404if ac_fn_c_try_link "$LINENO"; then :
12405 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XawScrollbarSetThumb in -lXaw3d" >&5
12406$as_echo_n "checking for XawScrollbarSetThumb in -lXaw3d... " >&6; }
12407if test "${ac_cv_lib_Xaw3d_XawScrollbarSetThumb+set}" = set; then :
12408 $as_echo_n "(cached) " >&6
12409else
12410 ac_check_lib_save_LIBS=$LIBS
12411LIBS="-lXaw3d $LIBS"
12412cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12413/* end confdefs.h. */
f527bd02 12414
5476a9a4
GM
12415/* Override any GCC internal prototype to avoid an error.
12416 Use char because int might match the return type of a GCC
12417 builtin and then its argument prototype would still apply. */
12418#ifdef __cplusplus
12419extern "C"
12420#endif
12421char XawScrollbarSetThumb ();
12422int
12423main ()
12424{
12425return XawScrollbarSetThumb ();
12426 ;
12427 return 0;
12428}
12429_ACEOF
12430if ac_fn_c_try_link "$LINENO"; then :
12431 ac_cv_lib_Xaw3d_XawScrollbarSetThumb=yes
f199cab1 12432else
5476a9a4 12433 ac_cv_lib_Xaw3d_XawScrollbarSetThumb=no
f199cab1 12434fi
5476a9a4
GM
12435rm -f core conftest.err conftest.$ac_objext \
12436 conftest$ac_exeext conftest.$ac_ext
12437LIBS=$ac_check_lib_save_LIBS
12438fi
12439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&5
12440$as_echo "$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&6; }
12441if test "x$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" = x""yes; then :
12442 emacs_cv_xaw3d=yes
12443else
12444 emacs_cv_xaw3d=no
f199cab1 12445fi
f527bd02 12446
5476a9a4
GM
12447else
12448 emacs_cv_xaw3d=no
12449fi
12450rm -f core conftest.err conftest.$ac_objext \
12451 conftest$ac_exeext conftest.$ac_ext
12452fi
f527bd02 12453
5476a9a4
GM
12454 else
12455 emacs_cv_xaw3d=no
12456 fi
12457 if test $emacs_cv_xaw3d = yes; then
4fa92495
GM
12458 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xaw3d" >&5
12459$as_echo_n "checking for xaw3d... " >&6; }
5476a9a4
GM
12460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5
12461$as_echo "yes; using Lucid toolkit" >&6; }
12462 USE_X_TOOLKIT=LUCID
12463 HAVE_XAW3D=yes
12464 LUCID_LIBW=-lXaw3d
f527bd02 12465
5476a9a4 12466$as_echo "#define HAVE_XAW3D 1" >>confdefs.h
f527bd02 12467
5476a9a4 12468 else
4fa92495
GM
12469 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xaw3d" >&5
12470$as_echo_n "checking for xaw3d... " >&6; }
5476a9a4
GM
12471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12472$as_echo "no" >&6; }
12473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libXaw" >&5
12474$as_echo_n "checking for libXaw... " >&6; }
12475 if test "${emacs_cv_xaw+set}" = set; then :
f199cab1
GM
12476 $as_echo_n "(cached) " >&6
12477else
12478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12479/* end confdefs.h. */
067d23c9 12480
5476a9a4
GM
12481#include <X11/Intrinsic.h>
12482#include <X11/Xaw/Simple.h>
f199cab1
GM
12483int
12484main ()
12485{
067d23c9 12486
f199cab1
GM
12487 ;
12488 return 0;
12489}
12490_ACEOF
5476a9a4
GM
12491if ac_fn_c_try_link "$LINENO"; then :
12492 emacs_cv_xaw=yes
f199cab1 12493else
5476a9a4 12494 emacs_cv_xaw=no
f199cab1 12495fi
5476a9a4
GM
12496rm -f core conftest.err conftest.$ac_objext \
12497 conftest$ac_exeext conftest.$ac_ext
f199cab1 12498fi
067d23c9 12499
5476a9a4
GM
12500 if test $emacs_cv_xaw = yes; then
12501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5
12502$as_echo "yes; using Lucid toolkit" >&6; }
12503 USE_X_TOOLKIT=LUCID
12504 LUCID_LIBW=-lXaw
12505 elif test x"${USE_X_TOOLKIT}" = xLUCID; then
12506 as_fn_error "Lucid toolkit requires X11/Xaw include files" "$LINENO" 5
f199cab1 12507 else
5476a9a4
GM
12508 as_fn_error "No X toolkit could be found.
12509If you are sure you want Emacs compiled without an X toolkit, pass
12510 --with-x-toolkit=no
12511to configure. Otherwise, install the development libraries for the toolkit
12512that you want to use (e.g. Gtk+) and re-run configure." "$LINENO" 5
f199cab1 12513 fi
5476a9a4
GM
12514 fi
12515fi
067d23c9 12516
5476a9a4 12517X_TOOLKIT_TYPE=$USE_X_TOOLKIT
067d23c9 12518
5476a9a4
GM
12519LIBXTR6=
12520if test "${USE_X_TOOLKIT}" != "none"; then
12521 { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 toolkit version" >&5
12522$as_echo_n "checking X11 toolkit version... " >&6; }
12523 if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then :
f199cab1
GM
12524 $as_echo_n "(cached) " >&6
12525else
5476a9a4 12526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 12527/* end confdefs.h. */
5476a9a4 12528#include <X11/Intrinsic.h>
f199cab1
GM
12529int
12530main ()
12531{
5476a9a4
GM
12532#if XtSpecificationRelease < 6
12533fail;
12534#endif
f527bd02 12535
f199cab1
GM
12536 ;
12537 return 0;
12538}
067d23c9 12539_ACEOF
5476a9a4
GM
12540if ac_fn_c_try_link "$LINENO"; then :
12541 emacs_cv_x11_toolkit_version_6=yes
12542else
12543 emacs_cv_x11_toolkit_version_6=no
067d23c9 12544fi
5476a9a4
GM
12545rm -f core conftest.err conftest.$ac_objext \
12546 conftest$ac_exeext conftest.$ac_ext
067d23c9
KY
12547fi
12548
5476a9a4
GM
12549 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
12550 if test $emacs_cv_x11_toolkit_version_6 = yes; then
12551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5
12552$as_echo "6 or newer" >&6; }
f527bd02 12553
5476a9a4 12554$as_echo "#define HAVE_X11XTR6 1" >>confdefs.h
f527bd02 12555
5476a9a4
GM
12556 LIBXTR6="-lSM -lICE"
12557 case "$opsys" in
12558 ## Use libw.a along with X11R6 Xt.
12559 unixware) LIBXTR6="$LIBXTR6 -lw" ;;
12560 esac
12561 else
12562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5
12563$as_echo "before 6" >&6; }
f199cab1 12564 fi
f527bd02 12565
5476a9a4
GM
12566 OLDLIBS="$LIBS"
12567 if test x$HAVE_X11XTR6 = xyes; then
12568 LIBS="-lXt -lSM -lICE $LIBS"
12569 else
12570 LIBS="-lXt $LIBS"
12571 fi
12572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XmuConvertStandardSelection in -lXmu" >&5
12573$as_echo_n "checking for XmuConvertStandardSelection in -lXmu... " >&6; }
12574if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then :
12575 $as_echo_n "(cached) " >&6
12576else
12577 ac_check_lib_save_LIBS=$LIBS
12578LIBS="-lXmu $LIBS"
12579cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12580/* end confdefs.h. */
f199cab1 12581
5476a9a4
GM
12582/* Override any GCC internal prototype to avoid an error.
12583 Use char because int might match the return type of a GCC
12584 builtin and then its argument prototype would still apply. */
12585#ifdef __cplusplus
12586extern "C"
12587#endif
12588char XmuConvertStandardSelection ();
067d23c9
KY
12589int
12590main ()
12591{
5476a9a4 12592return XmuConvertStandardSelection ();
067d23c9
KY
12593 ;
12594 return 0;
12595}
12596_ACEOF
5476a9a4
GM
12597if ac_fn_c_try_link "$LINENO"; then :
12598 ac_cv_lib_Xmu_XmuConvertStandardSelection=yes
12599else
12600 ac_cv_lib_Xmu_XmuConvertStandardSelection=no
067d23c9 12601fi
5476a9a4
GM
12602rm -f core conftest.err conftest.$ac_objext \
12603 conftest$ac_exeext conftest.$ac_ext
12604LIBS=$ac_check_lib_save_LIBS
067d23c9 12605fi
5476a9a4
GM
12606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5
12607$as_echo "$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6; }
12608if test "x$ac_cv_lib_Xmu_XmuConvertStandardSelection" = x""yes; then :
12609 cat >>confdefs.h <<_ACEOF
12610#define HAVE_LIBXMU 1
f199cab1
GM
12611_ACEOF
12612
5476a9a4 12613 LIBS="-lXmu $LIBS"
f199cab1 12614
067d23c9
KY
12615fi
12616
5476a9a4
GM
12617 test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
12618 fi
067d23c9 12619
067d23c9 12620
5476a9a4
GM
12621LIBXMU=-lXmu
12622case $opsys in
12623 ## These systems don't supply Xmu.
12624 hpux* | aix4-2 )
12625 test "X$ac_cv_lib_Xmu_XmuConvertStandardSelection" != "Xyes" && LIBXMU=
12626 ;;
7c61eaab
GM
12627 mingw32 )
12628 LIBXMU=
12629 ;;
5476a9a4 12630esac
067d23c9
KY
12631
12632
5476a9a4
GM
12633# On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
12634if test "${HAVE_X11}" = "yes"; then
12635 if test "${USE_X_TOOLKIT}" != "none"; then
12636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XShapeQueryExtension in -lXext" >&5
12637$as_echo_n "checking for XShapeQueryExtension in -lXext... " >&6; }
12638if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then :
f199cab1
GM
12639 $as_echo_n "(cached) " >&6
12640else
5476a9a4
GM
12641 ac_check_lib_save_LIBS=$LIBS
12642LIBS="-lXext $LIBS"
12643cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 12644/* end confdefs.h. */
f199cab1 12645
5476a9a4
GM
12646/* Override any GCC internal prototype to avoid an error.
12647 Use char because int might match the return type of a GCC
12648 builtin and then its argument prototype would still apply. */
12649#ifdef __cplusplus
12650extern "C"
12651#endif
12652char XShapeQueryExtension ();
12653int
12654main ()
12655{
12656return XShapeQueryExtension ();
12657 ;
12658 return 0;
12659}
e7d4e61f 12660_ACEOF
5476a9a4
GM
12661if ac_fn_c_try_link "$LINENO"; then :
12662 ac_cv_lib_Xext_XShapeQueryExtension=yes
12663else
12664 ac_cv_lib_Xext_XShapeQueryExtension=no
067d23c9 12665fi
5476a9a4
GM
12666rm -f core conftest.err conftest.$ac_objext \
12667 conftest$ac_exeext conftest.$ac_ext
12668LIBS=$ac_check_lib_save_LIBS
12669fi
12670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
12671$as_echo "$ac_cv_lib_Xext_XShapeQueryExtension" >&6; }
12672if test "x$ac_cv_lib_Xext_XShapeQueryExtension" = x""yes; then :
12673 cat >>confdefs.h <<_ACEOF
12674#define HAVE_LIBXEXT 1
12675_ACEOF
f199cab1 12676
5476a9a4 12677 LIBS="-lXext $LIBS"
f199cab1 12678
5476a9a4 12679fi
f199cab1 12680
5476a9a4
GM
12681 fi
12682fi
f199cab1 12683
5476a9a4
GM
12684LIBXP=
12685if test "${USE_X_TOOLKIT}" = "MOTIF"; then
8ad96b1d
GM
12686 # OpenMotif may be installed in such a way on some GNU/Linux systems.
12687 if test -d /usr/include/openmotif; then
12688 CPPFLAGS="-I/usr/include/openmotif $CPPFLAGS"
12689 emacs_cv_openmotif=yes
12690 case "$canonical" in
12691 x86_64-*-linux-gnu* | powerpc64-*-linux-gnu* | sparc64-*-linux-gnu*)
12692 test -d /usr/lib64/openmotif && LDFLAGS="-L/usr/lib64/openmotif $LDFLAGS"
12693 ;;
12694 *)
12695 test -d /usr/lib/openmotif && LDFLAGS="-L/usr/lib/openmotif $LDFLAGS"
12696 esac
12697 else
12698 emacs_cv_openmotif=no
12699 fi
12700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for (Open)Motif version 2.1" >&5
12701$as_echo_n "checking for (Open)Motif version 2.1... " >&6; }
5476a9a4 12702if test "${emacs_cv_motif_version_2_1+set}" = set; then :
ae1362a3
AS
12703 $as_echo_n "(cached) " >&6
12704else
f199cab1
GM
12705 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12706/* end confdefs.h. */
5476a9a4
GM
12707#include <Xm/Xm.h>
12708int
12709main ()
12710{
12711#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
12712int x = 5;
12713#else
12714Motif version prior to 2.1.
12715#endif
12716 ;
12717 return 0;
12718}
12719_ACEOF
12720if ac_fn_c_try_compile "$LINENO"; then :
12721 emacs_cv_motif_version_2_1=yes
12722else
12723 emacs_cv_motif_version_2_1=no
12724fi
12725rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12726fi
12727{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_motif_version_2_1" >&5
12728$as_echo "$emacs_cv_motif_version_2_1" >&6; }
12729 if test $emacs_cv_motif_version_2_1 = yes; then
12730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpCreateContext in -lXp" >&5
12731$as_echo_n "checking for XpCreateContext in -lXp... " >&6; }
12732if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then :
12733 $as_echo_n "(cached) " >&6
12734else
12735 ac_check_lib_save_LIBS=$LIBS
12736LIBS="-lXp $LIBS"
12737cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12738/* end confdefs.h. */
f199cab1 12739
5476a9a4
GM
12740/* Override any GCC internal prototype to avoid an error.
12741 Use char because int might match the return type of a GCC
12742 builtin and then its argument prototype would still apply. */
12743#ifdef __cplusplus
12744extern "C"
12745#endif
12746char XpCreateContext ();
ae1362a3
AS
12747int
12748main ()
12749{
5476a9a4 12750return XpCreateContext ();
ae1362a3
AS
12751 ;
12752 return 0;
12753}
12754_ACEOF
5476a9a4
GM
12755if ac_fn_c_try_link "$LINENO"; then :
12756 ac_cv_lib_Xp_XpCreateContext=yes
067d23c9 12757else
5476a9a4 12758 ac_cv_lib_Xp_XpCreateContext=no
067d23c9 12759fi
5476a9a4
GM
12760rm -f core conftest.err conftest.$ac_objext \
12761 conftest$ac_exeext conftest.$ac_ext
12762LIBS=$ac_check_lib_save_LIBS
12763fi
12764{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xp_XpCreateContext" >&5
12765$as_echo "$ac_cv_lib_Xp_XpCreateContext" >&6; }
12766if test "x$ac_cv_lib_Xp_XpCreateContext" = x""yes; then :
12767 LIBXP=-lXp
067d23c9 12768fi
f199cab1 12769
8ad96b1d
GM
12770 if test x$emacs_cv_openmotif = xyes; then
12771 REAL_CPPFLAGS="-I/usr/include/openmotif $REAL_CPPFLAGS"
12772 fi
5476a9a4
GM
12773 else
12774 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LessTif where some systems put it" >&5
12775$as_echo_n "checking for LessTif where some systems put it... " >&6; }
12776if test "${emacs_cv_lesstif+set}" = set; then :
067d23c9 12777 $as_echo_n "(cached) " >&6
f199cab1 12778else
5476a9a4
GM
12779 # We put this in CFLAGS temporarily to precede other -I options
12780 # that might be in CFLAGS temporarily.
12781 # We put this in CPPFLAGS where it precedes the other -I options.
12782 OLD_CPPFLAGS=$CPPFLAGS
12783 OLD_CFLAGS=$CFLAGS
12784 CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS"
12785 CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS"
12786 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 12787/* end confdefs.h. */
5476a9a4 12788#include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h>
067d23c9
KY
12789int
12790main ()
12791{
5476a9a4 12792int x = 5;
067d23c9
KY
12793 ;
12794 return 0;
12795}
12796_ACEOF
5476a9a4
GM
12797if ac_fn_c_try_compile "$LINENO"; then :
12798 emacs_cv_lesstif=yes
067d23c9 12799else
5476a9a4 12800 emacs_cv_lesstif=no
067d23c9 12801fi
5476a9a4 12802rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
067d23c9 12803fi
5476a9a4
GM
12804{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_lesstif" >&5
12805$as_echo "$emacs_cv_lesstif" >&6; }
12806 if test $emacs_cv_lesstif = yes; then
12807 # Make sure this -I option remains in CPPFLAGS after it is set
12808 # back to REAL_CPPFLAGS.
12809 # There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not
12810 # have those other -I options anyway. Ultimately, having this
12811 # directory ultimately in CPPFLAGS will be enough.
12812 REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS"
12813 LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS"
12814 else
12815 CFLAGS=$OLD_CFLAGS
12816 CPPFLAGS=$OLD_CPPFLAGS
12817 fi
12818 fi
12819 ac_fn_c_check_header_mongrel "$LINENO" "Xm/BulletinB.h" "ac_cv_header_Xm_BulletinB_h" "$ac_includes_default"
12820if test "x$ac_cv_header_Xm_BulletinB_h" = x""yes; then :
067d23c9 12821
5476a9a4
GM
12822else
12823 as_fn_error "Motif toolkit requested but requirements not found." "$LINENO" 5
067d23c9 12824fi
f199cab1
GM
12825
12826
5476a9a4 12827fi
f199cab1
GM
12828
12829
5476a9a4
GM
12830USE_TOOLKIT_SCROLL_BARS=no
12831if test "${with_toolkit_scroll_bars}" != "no"; then
12832 if test "${USE_X_TOOLKIT}" != "none"; then
12833 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
12834 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
f199cab1 12835
5476a9a4
GM
12836 HAVE_XAW3D=no
12837 USE_TOOLKIT_SCROLL_BARS=yes
12838 elif test "${HAVE_XAW3D}" = "yes" || test "${USE_X_TOOLKIT}" = "LUCID"; then
12839 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
f199cab1 12840
5476a9a4
GM
12841 USE_TOOLKIT_SCROLL_BARS=yes
12842 fi
12843 elif test "${HAVE_GTK}" = "yes"; then
12844 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
f199cab1 12845
5476a9a4
GM
12846 USE_TOOLKIT_SCROLL_BARS=yes
12847 elif test "${HAVE_NS}" = "yes"; then
12848 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
f199cab1 12849
5c0255d9
GM
12850 USE_TOOLKIT_SCROLL_BARS=yes
12851 elif test "${HAVE_W32}" = "yes"; then
12852 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
12853
5476a9a4
GM
12854 USE_TOOLKIT_SCROLL_BARS=yes
12855 fi
12856fi
f199cab1 12857
5476a9a4 12858cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 12859/* end confdefs.h. */
5476a9a4
GM
12860
12861 #include <X11/Xlib.h>
12862 #include <X11/Xresource.h>
067d23c9
KY
12863int
12864main ()
12865{
5476a9a4 12866XIMProc callback;
067d23c9
KY
12867 ;
12868 return 0;
12869}
12870_ACEOF
f199cab1 12871if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4
GM
12872 HAVE_XIM=yes
12873
12874$as_echo "#define HAVE_XIM 1" >>confdefs.h
12875
067d23c9 12876else
5476a9a4 12877 HAVE_XIM=no
067d23c9 12878fi
f199cab1 12879rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 12880
f199cab1 12881
5476a9a4
GM
12882if test "${with_xim}" != "no"; then
12883
12884$as_echo "#define USE_XIM 1" >>confdefs.h
12885
12886fi
12887
12888
12889if test "${HAVE_XIM}" != "no"; then
12890 late_CFLAGS=$CFLAGS
12891 if test "$GCC" = yes; then
12892 CFLAGS="$CFLAGS --pedantic-errors"
12893 fi
12894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12895/* end confdefs.h. */
f199cab1 12896
5476a9a4
GM
12897#include <X11/Xlib.h>
12898#include <X11/Xresource.h>
12899int
12900main ()
12901{
12902Display *display;
12903XrmDatabase db;
12904char *res_name;
12905char *res_class;
12906XIMProc callback;
12907XPointer *client_data;
12908#ifndef __GNUC__
12909/* If we're not using GCC, it's probably not XFree86, and this is
12910 probably right, but we can't use something like --pedantic-errors. */
12911extern Bool XRegisterIMInstantiateCallback(Display*, XrmDatabase, char*,
12912 char*, XIMProc, XPointer*);
12913#endif
12914(void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, callback,
12915 client_data);
067d23c9
KY
12916 ;
12917 return 0;
12918}
12919_ACEOF
5476a9a4
GM
12920if ac_fn_c_try_compile "$LINENO"; then :
12921 emacs_cv_arg6_star=yes
067d23c9 12922fi
f199cab1 12923rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5476a9a4
GM
12924 if test "$emacs_cv_arg6_star" = yes; then
12925 $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer*" >>confdefs.h
12926
12927 else
12928 $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer" >>confdefs.h
067d23c9 12929
5476a9a4
GM
12930 fi
12931 CFLAGS=$late_CFLAGS
067d23c9
KY
12932fi
12933
5476a9a4
GM
12934### Start of font-backend (under any platform) section.
12935# (nothing here yet -- this is a placeholder)
12936### End of font-backend (under any platform) section.
067d23c9 12937
5476a9a4
GM
12938### Start of font-backend (under X11) section.
12939if test "${HAVE_X11}" = "yes"; then
067d23c9 12940
5476a9a4 12941 succeeded=no
067d23c9 12942
5476a9a4
GM
12943 if test "$PKG_CONFIG" = "no" ; then
12944 HAVE_FC=no
12945 else
12946 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 12947 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
12948 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fontconfig >= 2.2.0" >&5
12949$as_echo_n "checking for fontconfig >= 2.2.0... " >&6; }
f199cab1 12950
b5591ebb
GM
12951 if "$PKG_CONFIG" --exists "fontconfig >= 2.2.0" 2>&5 &&
12952 FONTCONFIG_CFLAGS=`"$PKG_CONFIG" --cflags "fontconfig >= 2.2.0" 2>&5` &&
12953 FONTCONFIG_LIBS=`"$PKG_CONFIG" --libs "fontconfig >= 2.2.0" 2>&5`; then
5476a9a4
GM
12954 edit_cflags="
12955 s,///*,/,g
12956 s/^/ /
12957 s/ -I/ $isystem/g
12958 s/^ //
12959 "
12960 FONTCONFIG_CFLAGS=`$as_echo "$FONTCONFIG_CFLAGS" | sed -e "$edit_cflags"`
12961 FONTCONFIG_LIBS=`$as_echo "$FONTCONFIG_LIBS" | sed -e 's,///*,/,g'`
12962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$FONTCONFIG_CFLAGS' LIBS='$FONTCONFIG_LIBS'" >&5
12963$as_echo "yes CFLAGS='$FONTCONFIG_CFLAGS' LIBS='$FONTCONFIG_LIBS'" >&6; }
12964 succeeded=yes
12965 else
12966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12967$as_echo "no" >&6; }
12968 FONTCONFIG_CFLAGS=""
12969 FONTCONFIG_LIBS=""
12970 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
12971 ## do set a variable so people can do so. Do it in a subshell
12972 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 12973 FONTCONFIG_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "fontconfig >= 2.2.0") 2>&1`
f199cab1 12974
5476a9a4 12975 fi
f199cab1
GM
12976
12977
12978
f199cab1 12979 else
5476a9a4
GM
12980 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12981 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12982 fi
12983 fi
f199cab1 12984
5476a9a4
GM
12985 if test $succeeded = yes; then
12986 HAVE_FC=yes
12987 else
12988 HAVE_FC=no
12989 fi
f199cab1 12990
067d23c9 12991
5476a9a4
GM
12992 ## Use -lXft if available, unless `--with-xft=no'.
12993 HAVE_XFT=maybe
12994 if test "${HAVE_FC}" = "no" || test "x${with_x}" = "xno"; then
12995 with_xft="no";
12996 fi
12997 if test "x${with_xft}" != "xno"; then
f199cab1 12998
f199cab1 12999
5476a9a4 13000 succeeded=no
f199cab1 13001
5476a9a4
GM
13002 if test "$PKG_CONFIG" = "no" ; then
13003 HAVE_XFT=no
13004 else
13005 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 13006 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
13007 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xft >= 0.13.0" >&5
13008$as_echo_n "checking for xft >= 0.13.0... " >&6; }
f199cab1 13009
b5591ebb
GM
13010 if "$PKG_CONFIG" --exists "xft >= 0.13.0" 2>&5 &&
13011 XFT_CFLAGS=`"$PKG_CONFIG" --cflags "xft >= 0.13.0" 2>&5` &&
13012 XFT_LIBS=`"$PKG_CONFIG" --libs "xft >= 0.13.0" 2>&5`; then
5476a9a4
GM
13013 edit_cflags="
13014 s,///*,/,g
13015 s/^/ /
13016 s/ -I/ $isystem/g
13017 s/^ //
13018 "
13019 XFT_CFLAGS=`$as_echo "$XFT_CFLAGS" | sed -e "$edit_cflags"`
13020 XFT_LIBS=`$as_echo "$XFT_LIBS" | sed -e 's,///*,/,g'`
13021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$XFT_CFLAGS' LIBS='$XFT_LIBS'" >&5
13022$as_echo "yes CFLAGS='$XFT_CFLAGS' LIBS='$XFT_LIBS'" >&6; }
13023 succeeded=yes
13024 else
13025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13026$as_echo "no" >&6; }
13027 XFT_CFLAGS=""
13028 XFT_LIBS=""
13029 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
13030 ## do set a variable so people can do so. Do it in a subshell
13031 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 13032 XFT_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "xft >= 0.13.0") 2>&1`
f199cab1 13033
5476a9a4 13034 fi
f199cab1
GM
13035
13036
13037
5476a9a4
GM
13038 else
13039 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
13040 echo "*** See http://www.freedesktop.org/software/pkgconfig"
13041 fi
13042 fi
f199cab1 13043
5476a9a4
GM
13044 if test $succeeded = yes; then
13045 :
f199cab1 13046 else
5476a9a4 13047 HAVE_XFT=no
f199cab1
GM
13048 fi
13049
5476a9a4
GM
13050 ## Because xftfont.c uses XRenderQueryExtension, we also
13051 ## need to link to -lXrender.
13052 HAVE_XRENDER=no
13053 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRenderQueryExtension in -lXrender" >&5
13054$as_echo_n "checking for XRenderQueryExtension in -lXrender... " >&6; }
13055if test "${ac_cv_lib_Xrender_XRenderQueryExtension+set}" = set; then :
13056 $as_echo_n "(cached) " >&6
13057else
13058 ac_check_lib_save_LIBS=$LIBS
13059LIBS="-lXrender $LIBS"
13060cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13061/* end confdefs.h. */
f199cab1 13062
5476a9a4
GM
13063/* Override any GCC internal prototype to avoid an error.
13064 Use char because int might match the return type of a GCC
13065 builtin and then its argument prototype would still apply. */
13066#ifdef __cplusplus
13067extern "C"
13068#endif
13069char XRenderQueryExtension ();
13070int
13071main ()
13072{
13073return XRenderQueryExtension ();
13074 ;
13075 return 0;
13076}
13077_ACEOF
13078if ac_fn_c_try_link "$LINENO"; then :
13079 ac_cv_lib_Xrender_XRenderQueryExtension=yes
13080else
13081 ac_cv_lib_Xrender_XRenderQueryExtension=no
13082fi
13083rm -f core conftest.err conftest.$ac_objext \
13084 conftest$ac_exeext conftest.$ac_ext
13085LIBS=$ac_check_lib_save_LIBS
13086fi
13087{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrender_XRenderQueryExtension" >&5
13088$as_echo "$ac_cv_lib_Xrender_XRenderQueryExtension" >&6; }
13089if test "x$ac_cv_lib_Xrender_XRenderQueryExtension" = x""yes; then :
13090 HAVE_XRENDER=yes
13091fi
f199cab1 13092
5476a9a4
GM
13093 if test "$HAVE_XFT" != no && test "$HAVE_XRENDER" != no; then
13094 OLD_CPPFLAGS="$CPPFLAGS"
13095 OLD_CFLAGS="$CFLAGS"
13096 OLD_LIBS="$LIBS"
13097 CPPFLAGS="$CPPFLAGS $XFT_CFLAGS"
13098 CFLAGS="$CFLAGS $XFT_CFLAGS"
13099 XFT_LIBS="-lXrender $XFT_LIBS"
13100 LIBS="$XFT_LIBS $LIBS"
46f74982
GM
13101 ac_fn_c_check_header_compile "$LINENO" "X11/Xft/Xft.h" "ac_cv_header_X11_Xft_Xft_h" "#include <X11/X.h>
13102"
5476a9a4
GM
13103if test "x$ac_cv_header_X11_Xft_Xft_h" = x""yes; then :
13104 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XftFontOpen in -lXft" >&5
13105$as_echo_n "checking for XftFontOpen in -lXft... " >&6; }
13106if test "${ac_cv_lib_Xft_XftFontOpen+set}" = set; then :
13107 $as_echo_n "(cached) " >&6
13108else
13109 ac_check_lib_save_LIBS=$LIBS
13110LIBS="-lXft $XFT_LIBS $LIBS"
13111cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13112/* end confdefs.h. */
f199cab1 13113
5476a9a4
GM
13114/* Override any GCC internal prototype to avoid an error.
13115 Use char because int might match the return type of a GCC
13116 builtin and then its argument prototype would still apply. */
13117#ifdef __cplusplus
13118extern "C"
13119#endif
13120char XftFontOpen ();
13121int
13122main ()
13123{
13124return XftFontOpen ();
13125 ;
13126 return 0;
13127}
067d23c9 13128_ACEOF
5476a9a4
GM
13129if ac_fn_c_try_link "$LINENO"; then :
13130 ac_cv_lib_Xft_XftFontOpen=yes
13131else
13132 ac_cv_lib_Xft_XftFontOpen=no
13133fi
13134rm -f core conftest.err conftest.$ac_objext \
13135 conftest$ac_exeext conftest.$ac_ext
13136LIBS=$ac_check_lib_save_LIBS
13137fi
13138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xft_XftFontOpen" >&5
13139$as_echo "$ac_cv_lib_Xft_XftFontOpen" >&6; }
13140if test "x$ac_cv_lib_Xft_XftFontOpen" = x""yes; then :
13141 HAVE_XFT=yes
f199cab1
GM
13142fi
13143
5476a9a4 13144fi
f199cab1
GM
13145
13146
f199cab1 13147
5476a9a4 13148 if test "${HAVE_XFT}" = "yes"; then
f199cab1 13149
5476a9a4 13150$as_echo "#define HAVE_XFT 1" >>confdefs.h
f199cab1 13151
067d23c9 13152
5476a9a4
GM
13153 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $XFT_CFLAGS"
13154 else
13155 CPPFLAGS="$OLD_CPPFLAGS"
13156 CFLAGS="$OLD_CFLAGS"
13157 LIBS="$OLD_LIBS"
13158 fi # "${HAVE_XFT}" = "yes"
13159 fi # "$HAVE_XFT" != no
13160 fi # "x${with_xft}" != "xno"
f199cab1 13161
5476a9a4
GM
13162 ## We used to allow building with FreeType and without Xft.
13163 ## However, the ftx font backend driver is not in good shape.
13164 if test "$HAVE_XFT" != "yes"; then
13165 HAVE_XFT=no
13166 HAVE_FREETYPE=no
13167 else
f199cab1 13168
5476a9a4 13169 succeeded=no
f199cab1 13170
5476a9a4
GM
13171 if test "$PKG_CONFIG" = "no" ; then
13172 HAVE_FREETYPE=no
13173 else
13174 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 13175 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
13176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype2" >&5
13177$as_echo_n "checking for freetype2... " >&6; }
f199cab1 13178
b5591ebb
GM
13179 if "$PKG_CONFIG" --exists "freetype2" 2>&5 &&
13180 FREETYPE_CFLAGS=`"$PKG_CONFIG" --cflags "freetype2" 2>&5` &&
13181 FREETYPE_LIBS=`"$PKG_CONFIG" --libs "freetype2" 2>&5`; then
5476a9a4
GM
13182 edit_cflags="
13183 s,///*,/,g
13184 s/^/ /
13185 s/ -I/ $isystem/g
13186 s/^ //
13187 "
13188 FREETYPE_CFLAGS=`$as_echo "$FREETYPE_CFLAGS" | sed -e "$edit_cflags"`
13189 FREETYPE_LIBS=`$as_echo "$FREETYPE_LIBS" | sed -e 's,///*,/,g'`
13190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$FREETYPE_CFLAGS' LIBS='$FREETYPE_LIBS'" >&5
13191$as_echo "yes CFLAGS='$FREETYPE_CFLAGS' LIBS='$FREETYPE_LIBS'" >&6; }
13192 succeeded=yes
13193 else
13194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13195$as_echo "no" >&6; }
13196 FREETYPE_CFLAGS=""
13197 FREETYPE_LIBS=""
13198 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
13199 ## do set a variable so people can do so. Do it in a subshell
13200 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 13201 FREETYPE_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "freetype2") 2>&1`
f199cab1 13202
5476a9a4 13203 fi
f199cab1 13204
f199cab1 13205
067d23c9 13206
5476a9a4
GM
13207 else
13208 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
13209 echo "*** See http://www.freedesktop.org/software/pkgconfig"
13210 fi
067d23c9 13211 fi
f199cab1 13212
5476a9a4
GM
13213 if test $succeeded = yes; then
13214 HAVE_FREETYPE=yes
13215 else
13216 HAVE_FREETYPE=no
13217 fi
f199cab1 13218
f199cab1 13219
5476a9a4
GM
13220 test "$HAVE_FREETYPE" = "no" && as_fn_error "libxft requires libfreetype" "$LINENO" 5
13221 fi
f199cab1 13222
5476a9a4
GM
13223 HAVE_LIBOTF=no
13224 if test "${HAVE_FREETYPE}" = "yes"; then
f199cab1 13225
5476a9a4 13226$as_echo "#define HAVE_FREETYPE 1" >>confdefs.h
f199cab1 13227
5476a9a4 13228 if test "${with_libotf}" != "no"; then
f199cab1 13229
5476a9a4 13230 succeeded=no
f199cab1 13231
5476a9a4
GM
13232 if test "$PKG_CONFIG" = "no" ; then
13233 HAVE_LIBOTF=no
13234 else
13235 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 13236 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
13237 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libotf" >&5
13238$as_echo_n "checking for libotf... " >&6; }
f199cab1 13239
b5591ebb
GM
13240 if "$PKG_CONFIG" --exists "libotf" 2>&5 &&
13241 LIBOTF_CFLAGS=`"$PKG_CONFIG" --cflags "libotf" 2>&5` &&
13242 LIBOTF_LIBS=`"$PKG_CONFIG" --libs "libotf" 2>&5`; then
5476a9a4
GM
13243 edit_cflags="
13244 s,///*,/,g
13245 s/^/ /
13246 s/ -I/ $isystem/g
13247 s/^ //
13248 "
13249 LIBOTF_CFLAGS=`$as_echo "$LIBOTF_CFLAGS" | sed -e "$edit_cflags"`
13250 LIBOTF_LIBS=`$as_echo "$LIBOTF_LIBS" | sed -e 's,///*,/,g'`
13251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBOTF_CFLAGS' LIBS='$LIBOTF_LIBS'" >&5
13252$as_echo "yes CFLAGS='$LIBOTF_CFLAGS' LIBS='$LIBOTF_LIBS'" >&6; }
13253 succeeded=yes
13254 else
13255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13256$as_echo "no" >&6; }
13257 LIBOTF_CFLAGS=""
13258 LIBOTF_LIBS=""
13259 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
13260 ## do set a variable so people can do so. Do it in a subshell
13261 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 13262 LIBOTF_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "libotf") 2>&1`
067d23c9 13263
5476a9a4 13264 fi
f199cab1
GM
13265
13266
067d23c9 13267
5476a9a4
GM
13268 else
13269 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
13270 echo "*** See http://www.freedesktop.org/software/pkgconfig"
13271 fi
13272 fi
f199cab1 13273
5476a9a4
GM
13274 if test $succeeded = yes; then
13275 HAVE_LIBOTF=yes
13276 else
13277 HAVE_LIBOTF=no
13278 fi
f199cab1 13279
5476a9a4 13280 if test "$HAVE_LIBOTF" = "yes"; then
f199cab1 13281
5476a9a4 13282$as_echo "#define HAVE_LIBOTF 1" >>confdefs.h
f199cab1 13283
5476a9a4
GM
13284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTF_get_variation_glyphs in -lotf" >&5
13285$as_echo_n "checking for OTF_get_variation_glyphs in -lotf... " >&6; }
13286if test "${ac_cv_lib_otf_OTF_get_variation_glyphs+set}" = set; then :
067d23c9
KY
13287 $as_echo_n "(cached) " >&6
13288else
5476a9a4
GM
13289 ac_check_lib_save_LIBS=$LIBS
13290LIBS="-lotf $LIBS"
13291cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 13292/* end confdefs.h. */
5476a9a4
GM
13293
13294/* Override any GCC internal prototype to avoid an error.
13295 Use char because int might match the return type of a GCC
13296 builtin and then its argument prototype would still apply. */
13297#ifdef __cplusplus
13298extern "C"
13299#endif
13300char OTF_get_variation_glyphs ();
067d23c9
KY
13301int
13302main ()
13303{
5476a9a4 13304return OTF_get_variation_glyphs ();
067d23c9
KY
13305 ;
13306 return 0;
13307}
13308_ACEOF
5476a9a4
GM
13309if ac_fn_c_try_link "$LINENO"; then :
13310 ac_cv_lib_otf_OTF_get_variation_glyphs=yes
067d23c9 13311else
5476a9a4 13312 ac_cv_lib_otf_OTF_get_variation_glyphs=no
067d23c9 13313fi
5476a9a4
GM
13314rm -f core conftest.err conftest.$ac_objext \
13315 conftest$ac_exeext conftest.$ac_ext
13316LIBS=$ac_check_lib_save_LIBS
13317fi
13318{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_otf_OTF_get_variation_glyphs" >&5
13319$as_echo "$ac_cv_lib_otf_OTF_get_variation_glyphs" >&6; }
13320if test "x$ac_cv_lib_otf_OTF_get_variation_glyphs" = x""yes; then :
13321 HAVE_OTF_GET_VARIATION_GLYPHS=yes
13322else
13323 HAVE_OTF_GET_VARIATION_GLYPHS=no
067d23c9 13324fi
067d23c9 13325
5476a9a4
GM
13326 if test "${HAVE_OTF_GET_VARIATION_GLYPHS}" = "yes"; then
13327
13328$as_echo "#define HAVE_OTF_GET_VARIATION_GLYPHS 1" >>confdefs.h
13329
13330 fi
13331 fi
13332 fi
13333 fi
13334
13335 HAVE_M17N_FLT=no
13336 if test "${HAVE_LIBOTF}" = yes; then
13337 if test "${with_m17n_flt}" != "no"; then
13338
13339 succeeded=no
13340
13341 if test "$PKG_CONFIG" = "no" ; then
13342 HAVE_M17N_FLT=no
13343 else
13344 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 13345 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
13346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for m17n-flt" >&5
13347$as_echo_n "checking for m17n-flt... " >&6; }
13348
b5591ebb
GM
13349 if "$PKG_CONFIG" --exists "m17n-flt" 2>&5 &&
13350 M17N_FLT_CFLAGS=`"$PKG_CONFIG" --cflags "m17n-flt" 2>&5` &&
13351 M17N_FLT_LIBS=`"$PKG_CONFIG" --libs "m17n-flt" 2>&5`; then
5476a9a4
GM
13352 edit_cflags="
13353 s,///*,/,g
13354 s/^/ /
13355 s/ -I/ $isystem/g
13356 s/^ //
13357 "
13358 M17N_FLT_CFLAGS=`$as_echo "$M17N_FLT_CFLAGS" | sed -e "$edit_cflags"`
13359 M17N_FLT_LIBS=`$as_echo "$M17N_FLT_LIBS" | sed -e 's,///*,/,g'`
13360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$M17N_FLT_CFLAGS' LIBS='$M17N_FLT_LIBS'" >&5
13361$as_echo "yes CFLAGS='$M17N_FLT_CFLAGS' LIBS='$M17N_FLT_LIBS'" >&6; }
13362 succeeded=yes
13363 else
13364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13365$as_echo "no" >&6; }
13366 M17N_FLT_CFLAGS=""
13367 M17N_FLT_LIBS=""
13368 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
13369 ## do set a variable so people can do so. Do it in a subshell
13370 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 13371 M17N_FLT_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "m17n-flt") 2>&1`
5476a9a4
GM
13372
13373 fi
13374
13375
067d23c9 13376
5476a9a4
GM
13377 else
13378 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
13379 echo "*** See http://www.freedesktop.org/software/pkgconfig"
13380 fi
f199cab1 13381 fi
067d23c9 13382
5476a9a4
GM
13383 if test $succeeded = yes; then
13384 HAVE_M17N_FLT=yes
13385 else
13386 HAVE_M17N_FLT=no
13387 fi
13388
13389 if test "$HAVE_M17N_FLT" = "yes"; then
13390
13391$as_echo "#define HAVE_M17N_FLT 1" >>confdefs.h
13392
13393 fi
13394 fi
13395 fi
13396else
13397 HAVE_XFT=no
13398 HAVE_FREETYPE=no
13399 HAVE_LIBOTF=no
13400 HAVE_M17N_FLT=no
13401fi
13402
13403### End of font-backend (under X11) section.
13404
13405
067d23c9 13406
067d23c9 13407
5476a9a4
GM
13408
13409
13410
13411
13412
13413
13414### Use -lXpm if available, unless `--with-xpm=no'.
7c61eaab 13415### mingw32 doesn't use -lXpm, since it loads the library dynamically.
5476a9a4
GM
13416HAVE_XPM=no
13417LIBXPM=
7c61eaab 13418if test "${HAVE_W32}" = "yes" && test "${opsys}" = "cygwin"; then
5c0255d9
GM
13419 if test "${with_xpm}" != "no"; then
13420 SAVE_CPPFLAGS="$CPPFLAGS"
13421 SAVE_LDFLAGS="$LDFLAGS"
13422 CPPFLAGS="$CPPFLAGS -I/usr/include/noX"
13423 LDFLAGS="$LDFLAGS -L/usr/lib/noX"
13424 ac_fn_c_check_header_mongrel "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "$ac_includes_default"
13425if test "x$ac_cv_header_X11_xpm_h" = x""yes; then :
13426 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReadFileToImage in -lXpm" >&5
13427$as_echo_n "checking for XpmReadFileToImage in -lXpm... " >&6; }
13428if test "${ac_cv_lib_Xpm_XpmReadFileToImage+set}" = set; then :
13429 $as_echo_n "(cached) " >&6
13430else
13431 ac_check_lib_save_LIBS=$LIBS
13432LIBS="-lXpm $LIBS"
13433cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13434/* end confdefs.h. */
13435
13436/* Override any GCC internal prototype to avoid an error.
13437 Use char because int might match the return type of a GCC
13438 builtin and then its argument prototype would still apply. */
13439#ifdef __cplusplus
13440extern "C"
13441#endif
13442char XpmReadFileToImage ();
13443int
13444main ()
13445{
13446return XpmReadFileToImage ();
13447 ;
13448 return 0;
13449}
13450_ACEOF
13451if ac_fn_c_try_link "$LINENO"; then :
13452 ac_cv_lib_Xpm_XpmReadFileToImage=yes
13453else
13454 ac_cv_lib_Xpm_XpmReadFileToImage=no
13455fi
13456rm -f core conftest.err conftest.$ac_objext \
13457 conftest$ac_exeext conftest.$ac_ext
13458LIBS=$ac_check_lib_save_LIBS
13459fi
13460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmReadFileToImage" >&5
13461$as_echo "$ac_cv_lib_Xpm_XpmReadFileToImage" >&6; }
13462if test "x$ac_cv_lib_Xpm_XpmReadFileToImage" = x""yes; then :
13463 HAVE_XPM=yes
13464fi
13465
13466fi
13467
13468
13469 if test "${HAVE_XPM}" = "yes"; then
13470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReturnAllocPixels preprocessor define" >&5
13471$as_echo_n "checking for XpmReturnAllocPixels preprocessor define... " >&6; }
13472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13473/* end confdefs.h. */
13474#include "X11/xpm.h"
13475#ifndef XpmReturnAllocPixels
13476no_return_alloc_pixels
13477#endif
13478
13479_ACEOF
13480if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13481 $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then :
13482 HAVE_XPM=no
13483else
13484 HAVE_XPM=yes
13485fi
13486rm -f conftest*
13487
13488
13489 if test "${HAVE_XPM}" = "yes"; then
13490 REAL_CPPFLAGS="$REAL_CPPFLAGS -I/usr/include/noX"
13491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13492$as_echo "yes" >&6; }
13493 else
13494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13495$as_echo "no" >&6; }
13496 CPPFLAGS="$SAVE_CPPFLAGS"
13497 LDFLAGS="$SAVE_LDFLAGS"
13498 fi
13499 fi
13500 fi
13501
13502 if test "${HAVE_XPM}" = "yes"; then
13503
13504$as_echo "#define HAVE_XPM 1" >>confdefs.h
13505
13506 LIBXPM=-lXpm
13507 fi
13508fi
13509
5476a9a4
GM
13510if test "${HAVE_X11}" = "yes"; then
13511 if test "${with_xpm}" != "no"; then
13512 ac_fn_c_check_header_mongrel "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "$ac_includes_default"
13513if test "x$ac_cv_header_X11_xpm_h" = x""yes; then :
13514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReadFileToPixmap in -lXpm" >&5
13515$as_echo_n "checking for XpmReadFileToPixmap in -lXpm... " >&6; }
13516if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then :
f199cab1
GM
13517 $as_echo_n "(cached) " >&6
13518else
5476a9a4
GM
13519 ac_check_lib_save_LIBS=$LIBS
13520LIBS="-lXpm -lX11 $LIBS"
13521cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
13522/* end confdefs.h. */
13523
5476a9a4
GM
13524/* Override any GCC internal prototype to avoid an error.
13525 Use char because int might match the return type of a GCC
13526 builtin and then its argument prototype would still apply. */
13527#ifdef __cplusplus
13528extern "C"
13529#endif
13530char XpmReadFileToPixmap ();
067d23c9
KY
13531int
13532main ()
13533{
5476a9a4 13534return XpmReadFileToPixmap ();
067d23c9
KY
13535 ;
13536 return 0;
13537}
13538_ACEOF
5476a9a4
GM
13539if ac_fn_c_try_link "$LINENO"; then :
13540 ac_cv_lib_Xpm_XpmReadFileToPixmap=yes
067d23c9 13541else
5476a9a4 13542 ac_cv_lib_Xpm_XpmReadFileToPixmap=no
067d23c9 13543fi
5476a9a4
GM
13544rm -f core conftest.err conftest.$ac_objext \
13545 conftest$ac_exeext conftest.$ac_ext
13546LIBS=$ac_check_lib_save_LIBS
13547fi
13548{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5
13549$as_echo "$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6; }
13550if test "x$ac_cv_lib_Xpm_XpmReadFileToPixmap" = x""yes; then :
13551 HAVE_XPM=yes
f199cab1 13552fi
067d23c9
KY
13553
13554fi
13555
13556
5476a9a4
GM
13557 if test "${HAVE_XPM}" = "yes"; then
13558 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReturnAllocPixels preprocessor define" >&5
13559$as_echo_n "checking for XpmReturnAllocPixels preprocessor define... " >&6; }
13560 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13561/* end confdefs.h. */
13562#include "X11/xpm.h"
13563#ifndef XpmReturnAllocPixels
13564no_return_alloc_pixels
13565#endif
067d23c9 13566
067d23c9 13567_ACEOF
5476a9a4
GM
13568if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13569 $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then :
13570 HAVE_XPM=no
13571else
13572 HAVE_XPM=yes
13573fi
13574rm -f conftest*
067d23c9 13575
067d23c9 13576
5476a9a4
GM
13577 if test "${HAVE_XPM}" = "yes"; then
13578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13579$as_echo "yes" >&6; }
13580 else
13581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13582$as_echo "no" >&6; }
13583 fi
13584 fi
13585 fi
067d23c9 13586
5476a9a4 13587 if test "${HAVE_XPM}" = "yes"; then
067d23c9 13588
5476a9a4 13589$as_echo "#define HAVE_XPM 1" >>confdefs.h
067d23c9 13590
5476a9a4
GM
13591 LIBXPM=-lXpm
13592 fi
067d23c9
KY
13593fi
13594
7c61eaab
GM
13595### FIXME: Perhaps regroup to minimize code duplication due to MinGW's
13596### slightly different requirements wrt image libraries (it doesn't
13597### use -lXpm because it loads the xpm shared library dynamically at
13598### run time).
13599if test "${opsys}" = "mingw32"; then
13600 if test "${with_xpm}" != "no"; then
13601 ac_fn_c_check_header_compile "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "
13602#define FOR_MSW 1
13603"
13604if test "x$ac_cv_header_X11_xpm_h" = x""yes; then :
13605 HAVE_XPM=yes
13606else
13607 HAVE_XPM=no
13608fi
13609
13610
13611 fi
13612
13613 if test "${HAVE_XPM}" = "yes"; then
13614
13615$as_echo "#define HAVE_XPM 1" >>confdefs.h
13616
13617 fi
13618fi
13619
f199cab1 13620
5c0255d9 13621
5476a9a4 13622### Use -ljpeg if available, unless `--with-jpeg=no'.
7c61eaab 13623### mingw32 doesn't use -ljpeg, since it loads the library dynamically.
5476a9a4
GM
13624HAVE_JPEG=no
13625LIBJPEG=
7c61eaab
GM
13626if test "${opsys}" = "mingw32"; then
13627 if test "${with_jpeg}" != "no"; then
13628 ac_fn_c_check_header_mongrel "$LINENO" "jerror.h" "ac_cv_header_jerror_h" "$ac_includes_default"
13629if test "x$ac_cv_header_jerror_h" = x""yes; then :
13630 HAVE_JPEG=yes
13631else
13632 HAVE_JPEG=no
13633fi
13634
13635
13636 fi
13637 if test "${HAVE_JPEG}" = "yes"; then
13638 $as_echo "#define HAVE_JPEG 1" >>confdefs.h
13639
13640 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13641/* end confdefs.h. */
13642#include <jpeglib.h>
13643 version=JPEG_LIB_VERSION
13644
13645_ACEOF
13646if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13647 $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then :
13648 $as_echo "#define HAVE_JPEG 1" >>confdefs.h
13649
13650else
13651 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libjpeg found, but not version 6b or later" >&5
13652$as_echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;}
13653 HAVE_JPEG=no
13654fi
13655rm -f conftest*
13656
13657 fi
13658elif test "${HAVE_X11}" = "yes" || test "${HAVE_W32}" = "yes"; then
5476a9a4
GM
13659 if test "${with_jpeg}" != "no"; then
13660 ac_fn_c_check_header_mongrel "$LINENO" "jerror.h" "ac_cv_header_jerror_h" "$ac_includes_default"
13661if test "x$ac_cv_header_jerror_h" = x""yes; then :
13662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_destroy_compress in -ljpeg" >&5
13663$as_echo_n "checking for jpeg_destroy_compress in -ljpeg... " >&6; }
13664if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then :
067d23c9
KY
13665 $as_echo_n "(cached) " >&6
13666else
5476a9a4
GM
13667 ac_check_lib_save_LIBS=$LIBS
13668LIBS="-ljpeg $LIBS"
13669cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 13670/* end confdefs.h. */
f199cab1 13671
5476a9a4
GM
13672/* Override any GCC internal prototype to avoid an error.
13673 Use char because int might match the return type of a GCC
13674 builtin and then its argument prototype would still apply. */
13675#ifdef __cplusplus
13676extern "C"
13677#endif
13678char jpeg_destroy_compress ();
067d23c9
KY
13679int
13680main ()
13681{
5476a9a4 13682return jpeg_destroy_compress ();
067d23c9
KY
13683 ;
13684 return 0;
13685}
13686_ACEOF
13687if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 13688 ac_cv_lib_jpeg_jpeg_destroy_compress=yes
067d23c9 13689else
5476a9a4 13690 ac_cv_lib_jpeg_jpeg_destroy_compress=no
067d23c9
KY
13691fi
13692rm -f core conftest.err conftest.$ac_objext \
13693 conftest$ac_exeext conftest.$ac_ext
5476a9a4
GM
13694LIBS=$ac_check_lib_save_LIBS
13695fi
13696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5
13697$as_echo "$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6; }
13698if test "x$ac_cv_lib_jpeg_jpeg_destroy_compress" = x""yes; then :
13699 HAVE_JPEG=yes
13700fi
13701
067d23c9 13702fi
f199cab1 13703
f199cab1
GM
13704
13705 fi
067d23c9 13706
5476a9a4
GM
13707 if test "${HAVE_JPEG}" = "yes"; then
13708 $as_echo "#define HAVE_JPEG 1" >>confdefs.h
f199cab1 13709
5476a9a4
GM
13710 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13711/* end confdefs.h. */
13712#include <jpeglib.h>
13713 version=JPEG_LIB_VERSION
f199cab1 13714
5476a9a4
GM
13715_ACEOF
13716if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13717 $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then :
13718 $as_echo "#define HAVE_JPEG 1" >>confdefs.h
f199cab1 13719
5476a9a4
GM
13720else
13721 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libjpeg found, but not version 6b or later" >&5
13722$as_echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;}
7c61eaab 13723 HAVE_JPEG=no
067d23c9 13724fi
5476a9a4 13725rm -f conftest*
067d23c9 13726
5476a9a4
GM
13727 fi
13728 if test "${HAVE_JPEG}" = "yes"; then
13729 LIBJPEG=-ljpeg
13730 fi
13731fi
067d23c9
KY
13732
13733
5476a9a4 13734### Use -lpng if available, unless `--with-png=no'.
7c61eaab 13735### mingw32 doesn't use -lpng, since it loads the library dynamically.
5476a9a4
GM
13736HAVE_PNG=no
13737LIBPNG=
7c61eaab
GM
13738if test "${opsys}" = "mingw32"; then
13739 if test "${with_png}" != "no"; then
13740 ac_fn_c_check_header_mongrel "$LINENO" "png.h" "ac_cv_header_png_h" "$ac_includes_default"
13741if test "x$ac_cv_header_png_h" = x""yes; then :
13742 HAVE_PNG=yes
13743else
13744 HAVE_PNG=no
13745fi
13746
13747
13748 fi
13749 if test "${HAVE_PNG}" = "yes"; then
13750
13751$as_echo "#define HAVE_PNG 1" >>confdefs.h
13752
13753
13754 ac_fn_c_check_decl "$LINENO" "png_longjmp" "ac_cv_have_decl_png_longjmp" "#ifdef HAVE_LIBPNG_PNG_H
13755 # include <libpng/png.h>
13756 #else
13757 # include <png.h>
13758 #endif
13759
13760"
13761if test "x$ac_cv_have_decl_png_longjmp" = x""yes; then :
13762
13763else
13764
13765$as_echo "#define PNG_DEPSTRUCT /**/" >>confdefs.h
13766
13767fi
13768
13769 fi
13770elif test "${HAVE_X11}" = "yes" || test "${HAVE_W32}" = "yes"; then
5476a9a4
GM
13771 if test "${with_png}" != "no"; then
13772 # Debian unstable as of July 2003 has multiple libpngs, and puts png.h
13773 # in /usr/include/libpng.
13774 for ac_header in png.h libpng/png.h
13775do :
13776 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13777ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13778eval as_val=\$$as_ac_Header
13779 if test "x$as_val" = x""yes; then :
13780 cat >>confdefs.h <<_ACEOF
13781#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13782_ACEOF
13783 break
13784fi
067d23c9 13785
5476a9a4 13786done
067d23c9 13787
5476a9a4
GM
13788 if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then
13789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_get_channels in -lpng" >&5
13790$as_echo_n "checking for png_get_channels in -lpng... " >&6; }
13791if test "${ac_cv_lib_png_png_get_channels+set}" = set; then :
13792 $as_echo_n "(cached) " >&6
13793else
13794 ac_check_lib_save_LIBS=$LIBS
13795LIBS="-lpng -lz -lm $LIBS"
13796cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13797/* end confdefs.h. */
067d23c9 13798
5476a9a4
GM
13799/* Override any GCC internal prototype to avoid an error.
13800 Use char because int might match the return type of a GCC
13801 builtin and then its argument prototype would still apply. */
13802#ifdef __cplusplus
13803extern "C"
13804#endif
13805char png_get_channels ();
13806int
13807main ()
13808{
13809return png_get_channels ();
13810 ;
13811 return 0;
13812}
13813_ACEOF
13814if ac_fn_c_try_link "$LINENO"; then :
13815 ac_cv_lib_png_png_get_channels=yes
f199cab1 13816else
5476a9a4
GM
13817 ac_cv_lib_png_png_get_channels=no
13818fi
13819rm -f core conftest.err conftest.$ac_objext \
13820 conftest$ac_exeext conftest.$ac_ext
13821LIBS=$ac_check_lib_save_LIBS
13822fi
13823{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_png_png_get_channels" >&5
13824$as_echo "$ac_cv_lib_png_png_get_channels" >&6; }
13825if test "x$ac_cv_lib_png_png_get_channels" = x""yes; then :
13826 HAVE_PNG=yes
f199cab1 13827fi
067d23c9 13828
5476a9a4
GM
13829 fi
13830 fi
7834125e 13831
5476a9a4
GM
13832 if test "${HAVE_PNG}" = "yes"; then
13833
13834$as_echo "#define HAVE_PNG 1" >>confdefs.h
13835
13836 LIBPNG="-lpng -lz -lm"
13837
13838 ac_fn_c_check_decl "$LINENO" "png_longjmp" "ac_cv_have_decl_png_longjmp" "#ifdef HAVE_LIBPNG_PNG_H
13839 # include <libpng/png.h>
13840 #else
13841 # include <png.h>
13842 #endif
13843
13844"
13845if test "x$ac_cv_have_decl_png_longjmp" = x""yes; then :
13846
13847else
7834125e 13848
5476a9a4 13849$as_echo "#define PNG_DEPSTRUCT /**/" >>confdefs.h
7834125e 13850
f199cab1 13851fi
7834125e 13852
5476a9a4
GM
13853 fi
13854fi
7834125e
GM
13855
13856
7a67e06b
GM
13857HAVE_ZLIB=no
13858LIBZ=
13859if test "${with_zlib}" != "no"; then
31593bf6
GM
13860 OLIBS=$LIBS
13861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inflateEnd" >&5
7a67e06b
GM
13862$as_echo_n "checking for library containing inflateEnd... " >&6; }
13863if test "${ac_cv_search_inflateEnd+set}" = set; then :
13864 $as_echo_n "(cached) " >&6
13865else
13866 ac_func_search_save_LIBS=$LIBS
13867cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13868/* end confdefs.h. */
13869
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 inflateEnd ();
13877int
13878main ()
13879{
13880return inflateEnd ();
13881 ;
13882 return 0;
13883}
13884_ACEOF
13885for ac_lib in '' z; do
13886 if test -z "$ac_lib"; then
13887 ac_res="none required"
13888 else
13889 ac_res=-l$ac_lib
13890 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
13891 fi
13892 if ac_fn_c_try_link "$LINENO"; then :
13893 ac_cv_search_inflateEnd=$ac_res
13894fi
13895rm -f core conftest.err conftest.$ac_objext \
13896 conftest$ac_exeext
13897 if test "${ac_cv_search_inflateEnd+set}" = set; then :
13898 break
13899fi
13900done
13901if test "${ac_cv_search_inflateEnd+set}" = set; then :
13902
13903else
13904 ac_cv_search_inflateEnd=no
13905fi
13906rm conftest.$ac_ext
13907LIBS=$ac_func_search_save_LIBS
13908fi
13909{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inflateEnd" >&5
13910$as_echo "$ac_cv_search_inflateEnd" >&6; }
13911ac_res=$ac_cv_search_inflateEnd
13912if test "$ac_res" != no; then :
13913 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13914 HAVE_ZLIB=yes
13915fi
13916
31593bf6
GM
13917 LIBS=$OLIBS
13918 case $ac_cv_search_inflateEnd in
13919 -*) LIBZ=$ac_cv_search_inflateEnd ;;
13920 esac
7a67e06b
GM
13921fi
13922if test "${HAVE_ZLIB}" = "yes"; then
13923
13924$as_echo "#define HAVE_ZLIB 1" >>confdefs.h
13925
31593bf6
GM
13926 ### mingw32 doesn't use -lz, since it loads the library dynamically.
13927 if test "${opsys}" = "mingw32"; then
13928 LIBZ=
13929 fi
7a67e06b
GM
13930fi
13931
13932
13933
5476a9a4 13934### Use -ltiff if available, unless `--with-tiff=no'.
7c61eaab 13935### mingw32 doesn't use -ltiff, since it loads the library dynamically.
5476a9a4
GM
13936HAVE_TIFF=no
13937LIBTIFF=
7c61eaab
GM
13938if test "${opsys}" = "mingw32"; then
13939 if test "${with_tiff}" != "no"; then
13940 ac_fn_c_check_header_mongrel "$LINENO" "tiffio.h" "ac_cv_header_tiffio_h" "$ac_includes_default"
13941if test "x$ac_cv_header_tiffio_h" = x""yes; then :
13942 HAVE_TIFF=yes
13943else
13944 HAVE_TIFF=no
13945fi
13946
13947
13948 fi
13949 if test "${HAVE_TIFF}" = "yes"; then
13950
13951$as_echo "#define HAVE_TIFF 1" >>confdefs.h
13952
13953 fi
13954elif test "${HAVE_X11}" = "yes" || test "${HAVE_W32}" = "yes"; then
5476a9a4
GM
13955 if test "${with_tiff}" != "no"; then
13956 ac_fn_c_check_header_mongrel "$LINENO" "tiffio.h" "ac_cv_header_tiffio_h" "$ac_includes_default"
13957if test "x$ac_cv_header_tiffio_h" = x""yes; then :
13958 tifflibs="-lz -lm"
13959 # At least one tiff package requires the jpeg library.
13960 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
13961 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIFFGetVersion in -ltiff" >&5
13962$as_echo_n "checking for TIFFGetVersion in -ltiff... " >&6; }
13963if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then :
f199cab1
GM
13964 $as_echo_n "(cached) " >&6
13965else
5476a9a4
GM
13966 ac_check_lib_save_LIBS=$LIBS
13967LIBS="-ltiff $tifflibs $LIBS"
13968cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 13969/* end confdefs.h. */
067d23c9 13970
5476a9a4
GM
13971/* Override any GCC internal prototype to avoid an error.
13972 Use char because int might match the return type of a GCC
13973 builtin and then its argument prototype would still apply. */
13974#ifdef __cplusplus
13975extern "C"
f199cab1 13976#endif
5476a9a4
GM
13977char TIFFGetVersion ();
13978int
13979main ()
13980{
13981return TIFFGetVersion ();
13982 ;
13983 return 0;
13984}
f199cab1 13985_ACEOF
5476a9a4
GM
13986if ac_fn_c_try_link "$LINENO"; then :
13987 ac_cv_lib_tiff_TIFFGetVersion=yes
f199cab1 13988else
5476a9a4 13989 ac_cv_lib_tiff_TIFFGetVersion=no
f199cab1 13990fi
5476a9a4
GM
13991rm -f core conftest.err conftest.$ac_objext \
13992 conftest$ac_exeext conftest.$ac_ext
13993LIBS=$ac_check_lib_save_LIBS
f199cab1 13994fi
5476a9a4
GM
13995{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5
13996$as_echo "$ac_cv_lib_tiff_TIFFGetVersion" >&6; }
13997if test "x$ac_cv_lib_tiff_TIFFGetVersion" = x""yes; then :
13998 HAVE_TIFF=yes
f199cab1 13999fi
067d23c9 14000
5476a9a4 14001fi
067d23c9 14002
067d23c9 14003
5476a9a4 14004 fi
f199cab1 14005
5476a9a4 14006 if test "${HAVE_TIFF}" = "yes"; then
067d23c9 14007
5476a9a4 14008$as_echo "#define HAVE_TIFF 1" >>confdefs.h
067d23c9 14009
5476a9a4
GM
14010 LIBTIFF=-ltiff
14011 fi
f199cab1 14012fi
067d23c9 14013
067d23c9 14014
5476a9a4 14015### Use -lgif or -lungif if available, unless `--with-gif=no'.
7c61eaab 14016### mingw32 doesn't use -lgif/-lungif, since it loads the library dynamically.
5476a9a4
GM
14017HAVE_GIF=no
14018LIBGIF=
7c61eaab
GM
14019if test "${opsys}" = "mingw32"; then
14020 if test "${with_gif}" != "no"; then
14021 ac_fn_c_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
14022if test "x$ac_cv_header_gif_lib_h" = x""yes; then :
14023 HAVE_GIF=yes
14024else
14025 HAVE_GIF=no
14026fi
14027
14028
14029 fi
14030 if test "${HAVE_GIF}" = "yes"; then
14031
14032$as_echo "#define HAVE_GIF 1" >>confdefs.h
14033
14034 fi
14035elif test "${HAVE_X11}" = "yes" && test "${with_gif}" != "no" \
5c0255d9 14036 || test "${HAVE_W32}" = "yes"; then
5476a9a4
GM
14037 ac_fn_c_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
14038if test "x$ac_cv_header_gif_lib_h" = x""yes; then :
14039 # EGifPutExtensionLast only exists from version libungif-4.1.0b1.
14040# Earlier versions can crash Emacs.
14041 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lgif" >&5
14042$as_echo_n "checking for EGifPutExtensionLast in -lgif... " >&6; }
14043if test "${ac_cv_lib_gif_EGifPutExtensionLast+set}" = set; then :
f199cab1
GM
14044 $as_echo_n "(cached) " >&6
14045else
5476a9a4
GM
14046 ac_check_lib_save_LIBS=$LIBS
14047LIBS="-lgif $LIBS"
14048cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 14049/* end confdefs.h. */
067d23c9 14050
5476a9a4
GM
14051/* Override any GCC internal prototype to avoid an error.
14052 Use char because int might match the return type of a GCC
14053 builtin and then its argument prototype would still apply. */
14054#ifdef __cplusplus
14055extern "C"
14056#endif
14057char EGifPutExtensionLast ();
f199cab1
GM
14058int
14059main ()
14060{
5476a9a4 14061return EGifPutExtensionLast ();
f199cab1
GM
14062 ;
14063 return 0;
14064}
14065_ACEOF
5476a9a4
GM
14066if ac_fn_c_try_link "$LINENO"; then :
14067 ac_cv_lib_gif_EGifPutExtensionLast=yes
f199cab1 14068else
5476a9a4 14069 ac_cv_lib_gif_EGifPutExtensionLast=no
f199cab1 14070fi
5476a9a4
GM
14071rm -f core conftest.err conftest.$ac_objext \
14072 conftest$ac_exeext conftest.$ac_ext
14073LIBS=$ac_check_lib_save_LIBS
14074fi
14075{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_EGifPutExtensionLast" >&5
14076$as_echo "$ac_cv_lib_gif_EGifPutExtensionLast" >&6; }
14077if test "x$ac_cv_lib_gif_EGifPutExtensionLast" = x""yes; then :
14078 HAVE_GIF=yes
14079else
14080 HAVE_GIF=maybe
f199cab1 14081fi
067d23c9 14082
5476a9a4
GM
14083fi
14084
14085
14086
14087 if test "$HAVE_GIF" = yes; then
14088 LIBGIF=-lgif
14089 elif test "$HAVE_GIF" = maybe; then
14090# If gif_lib.h but no libgif, try libungif.
14091 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lungif" >&5
14092$as_echo_n "checking for EGifPutExtensionLast in -lungif... " >&6; }
14093if test "${ac_cv_lib_ungif_EGifPutExtensionLast+set}" = set; then :
f199cab1
GM
14094 $as_echo_n "(cached) " >&6
14095else
5476a9a4
GM
14096 ac_check_lib_save_LIBS=$LIBS
14097LIBS="-lungif $LIBS"
14098cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 14099/* end confdefs.h. */
f199cab1 14100
5476a9a4
GM
14101/* Override any GCC internal prototype to avoid an error.
14102 Use char because int might match the return type of a GCC
14103 builtin and then its argument prototype would still apply. */
14104#ifdef __cplusplus
14105extern "C"
14106#endif
14107char EGifPutExtensionLast ();
f199cab1
GM
14108int
14109main ()
14110{
5476a9a4 14111return EGifPutExtensionLast ();
f199cab1
GM
14112 ;
14113 return 0;
14114}
14115_ACEOF
5476a9a4
GM
14116if ac_fn_c_try_link "$LINENO"; then :
14117 ac_cv_lib_ungif_EGifPutExtensionLast=yes
f199cab1 14118else
5476a9a4 14119 ac_cv_lib_ungif_EGifPutExtensionLast=no
f199cab1 14120fi
5476a9a4
GM
14121rm -f core conftest.err conftest.$ac_objext \
14122 conftest$ac_exeext conftest.$ac_ext
14123LIBS=$ac_check_lib_save_LIBS
f199cab1 14124fi
5476a9a4
GM
14125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5
14126$as_echo "$ac_cv_lib_ungif_EGifPutExtensionLast" >&6; }
14127if test "x$ac_cv_lib_ungif_EGifPutExtensionLast" = x""yes; then :
14128 HAVE_GIF=yes
14129else
14130 HAVE_GIF=no
14131fi
14132
14133 test "$HAVE_GIF" = yes && LIBGIF=-lungif
14134 fi
14135
14136 if test "${HAVE_GIF}" = "yes"; then
14137
14138$as_echo "#define HAVE_GIF 1" >>confdefs.h
14139
14140 fi
14141fi
14142
14143
14144if test "${HAVE_X11}" = "yes"; then
14145 MISSING=""
14146 WITH_NO=""
14147 test "${with_xpm}" != "no" && test "${HAVE_XPM}" != "yes" &&
14148 MISSING="libXpm" && WITH_NO="--with-xpm=no"
14149 test "${with_jpeg}" != "no" && test "${HAVE_JPEG}" != "yes" &&
14150 MISSING="$MISSING libjpeg" && WITH_NO="$WITH_NO --with-jpeg=no"
14151 test "${with_png}" != "no" && test "${HAVE_PNG}" != "yes" &&
14152 MISSING="$MISSING libpng" && WITH_NO="$WITH_NO --with-png=no"
14153 test "${with_gif}" != "no" && test "${HAVE_GIF}" != "yes" &&
14154 MISSING="$MISSING libgif/libungif" && WITH_NO="$WITH_NO --with-gif=no"
14155 test "${with_tiff}" != "no" && test "${HAVE_TIFF}" != "yes" &&
14156 MISSING="$MISSING libtiff" && WITH_NO="$WITH_NO --with-tiff=no"
14157
14158 if test "X${MISSING}" != X; then
14159 as_fn_error "The following required libraries were not found:
14160 $MISSING
14161Maybe some development libraries/packages are missing?
14162If you don't want to link with them give
14163 $WITH_NO
14164as options to configure" "$LINENO" 5
14165 fi
14166fi
14167
14168### Use -lgpm if available, unless `--with-gpm=no'.
14169HAVE_GPM=no
14170LIBGPM=
14171if test "${with_gpm}" != "no"; then
14172 ac_fn_c_check_header_mongrel "$LINENO" "gpm.h" "ac_cv_header_gpm_h" "$ac_includes_default"
14173if test "x$ac_cv_header_gpm_h" = x""yes; then :
14174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Gpm_Open in -lgpm" >&5
14175$as_echo_n "checking for Gpm_Open in -lgpm... " >&6; }
14176if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then :
067d23c9
KY
14177 $as_echo_n "(cached) " >&6
14178else
5476a9a4
GM
14179 ac_check_lib_save_LIBS=$LIBS
14180LIBS="-lgpm $LIBS"
14181cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
14182/* end confdefs.h. */
14183
5476a9a4
GM
14184/* Override any GCC internal prototype to avoid an error.
14185 Use char because int might match the return type of a GCC
14186 builtin and then its argument prototype would still apply. */
14187#ifdef __cplusplus
14188extern "C"
14189#endif
14190char Gpm_Open ();
067d23c9
KY
14191int
14192main ()
14193{
5476a9a4 14194return Gpm_Open ();
067d23c9
KY
14195 ;
14196 return 0;
14197}
14198_ACEOF
5476a9a4
GM
14199if ac_fn_c_try_link "$LINENO"; then :
14200 ac_cv_lib_gpm_Gpm_Open=yes
067d23c9 14201else
5476a9a4 14202 ac_cv_lib_gpm_Gpm_Open=no
067d23c9 14203fi
5476a9a4
GM
14204rm -f core conftest.err conftest.$ac_objext \
14205 conftest$ac_exeext conftest.$ac_ext
14206LIBS=$ac_check_lib_save_LIBS
14207fi
14208{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gpm_Gpm_Open" >&5
14209$as_echo "$ac_cv_lib_gpm_Gpm_Open" >&6; }
14210if test "x$ac_cv_lib_gpm_Gpm_Open" = x""yes; then :
14211 HAVE_GPM=yes
067d23c9 14212fi
f199cab1 14213
5476a9a4 14214fi
f199cab1 14215
f199cab1 14216
f199cab1 14217
5476a9a4 14218 if test "${HAVE_GPM}" = "yes"; then
f199cab1 14219
5476a9a4 14220$as_echo "#define HAVE_GPM 1" >>confdefs.h
f199cab1 14221
5476a9a4
GM
14222 LIBGPM=-lgpm
14223 fi
067d23c9 14224fi
067d23c9
KY
14225
14226
14227
14228
14229
14230
5476a9a4
GM
14231GNUSTEP_CFLAGS=
14232### Use NeXTstep API to implement GUI.
14233if test "${HAVE_NS}" = "yes"; then
067d23c9 14234
5476a9a4 14235$as_echo "#define HAVE_NS 1" >>confdefs.h
067d23c9 14236
5476a9a4 14237 if test "${NS_IMPL_COCOA}" = "yes"; then
067d23c9 14238
5476a9a4 14239$as_echo "#define NS_IMPL_COCOA 1" >>confdefs.h
f199cab1 14240
5476a9a4
GM
14241 fi
14242 if test "${NS_IMPL_GNUSTEP}" = "yes"; then
f199cab1 14243
5476a9a4 14244$as_echo "#define NS_IMPL_GNUSTEP 1" >>confdefs.h
f199cab1 14245
5476a9a4
GM
14246 # See also .m.o rule in Makefile.in */
14247 # FIXME: are all these flags really needed? Document here why. */
14248 GNUSTEP_CFLAGS="-D_REENTRANT -fPIC -fno-strict-aliasing -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
14249 ## Extra CFLAGS applied to src/*.m files.
14250 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"
14251 fi
14252 # We also have mouse menus.
14253 HAVE_MENUS=yes
14254 OTHER_FILES=ns-app
14255fi
f199cab1 14256
5c0255d9
GM
14257if test "${HAVE_W32}" = "yes"; then
14258 HAVE_MENUS=yes
14259fi
f199cab1 14260
5476a9a4
GM
14261### Use session management (-lSM -lICE) if available
14262HAVE_X_SM=no
14263LIBXSM=
14264if test "${HAVE_X11}" = "yes"; then
14265 ac_fn_c_check_header_mongrel "$LINENO" "X11/SM/SMlib.h" "ac_cv_header_X11_SM_SMlib_h" "$ac_includes_default"
14266if test "x$ac_cv_header_X11_SM_SMlib_h" = x""yes; then :
14267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SmcOpenConnection in -lSM" >&5
14268$as_echo_n "checking for SmcOpenConnection in -lSM... " >&6; }
14269if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then :
067d23c9
KY
14270 $as_echo_n "(cached) " >&6
14271else
5476a9a4
GM
14272 ac_check_lib_save_LIBS=$LIBS
14273LIBS="-lSM -lICE $LIBS"
14274cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
14275/* end confdefs.h. */
14276
5476a9a4
GM
14277/* Override any GCC internal prototype to avoid an error.
14278 Use char because int might match the return type of a GCC
14279 builtin and then its argument prototype would still apply. */
14280#ifdef __cplusplus
14281extern "C"
14282#endif
14283char SmcOpenConnection ();
f199cab1
GM
14284int
14285main ()
14286{
5476a9a4
GM
14287return SmcOpenConnection ();
14288 ;
14289 return 0;
f199cab1 14290}
067d23c9 14291_ACEOF
5476a9a4
GM
14292if ac_fn_c_try_link "$LINENO"; then :
14293 ac_cv_lib_SM_SmcOpenConnection=yes
067d23c9 14294else
5476a9a4 14295 ac_cv_lib_SM_SmcOpenConnection=no
f199cab1 14296fi
5476a9a4
GM
14297rm -f core conftest.err conftest.$ac_objext \
14298 conftest$ac_exeext conftest.$ac_ext
14299LIBS=$ac_check_lib_save_LIBS
14300fi
14301{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_SM_SmcOpenConnection" >&5
14302$as_echo "$ac_cv_lib_SM_SmcOpenConnection" >&6; }
14303if test "x$ac_cv_lib_SM_SmcOpenConnection" = x""yes; then :
14304 HAVE_X_SM=yes
067d23c9 14305fi
067d23c9 14306
f199cab1 14307fi
f199cab1 14308
f199cab1 14309
067d23c9 14310
5476a9a4
GM
14311 if test "${HAVE_X_SM}" = "yes"; then
14312
14313$as_echo "#define HAVE_X_SM 1" >>confdefs.h
14314
14315 LIBXSM="-lSM -lICE"
14316 case "$LIBS" in
14317 *-lSM*) ;;
14318 *) LIBS="$LIBXSM $LIBS" ;;
14319 esac
067d23c9 14320 fi
5476a9a4 14321fi
067d23c9 14322
067d23c9 14323
910833ae
GM
14324### Use XRandr (-lXrandr) if available
14325HAVE_XRANDR=no
14326if test "${HAVE_X11}" = "yes"; then
14327 XRANDR_REQUIRED=1.2.2
14328 XRANDR_MODULES="xrandr >= $XRANDR_REQUIRED"
14329
14330 succeeded=no
14331
14332 if test "$PKG_CONFIG" = "no" ; then
14333 HAVE_XRANDR=no
14334 else
14335 PKG_CONFIG_MIN_VERSION=0.9.0
14336 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
14337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $XRANDR_MODULES" >&5
14338$as_echo_n "checking for $XRANDR_MODULES... " >&6; }
14339
14340 if "$PKG_CONFIG" --exists "$XRANDR_MODULES" 2>&5 &&
14341 XRANDR_CFLAGS=`"$PKG_CONFIG" --cflags "$XRANDR_MODULES" 2>&5` &&
14342 XRANDR_LIBS=`"$PKG_CONFIG" --libs "$XRANDR_MODULES" 2>&5`; then
14343 edit_cflags="
14344 s,///*,/,g
14345 s/^/ /
14346 s/ -I/ $isystem/g
14347 s/^ //
14348 "
14349 XRANDR_CFLAGS=`$as_echo "$XRANDR_CFLAGS" | sed -e "$edit_cflags"`
14350 XRANDR_LIBS=`$as_echo "$XRANDR_LIBS" | sed -e 's,///*,/,g'`
14351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$XRANDR_CFLAGS' LIBS='$XRANDR_LIBS'" >&5
14352$as_echo "yes CFLAGS='$XRANDR_CFLAGS' LIBS='$XRANDR_LIBS'" >&6; }
14353 succeeded=yes
14354 else
14355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14356$as_echo "no" >&6; }
14357 XRANDR_CFLAGS=""
14358 XRANDR_LIBS=""
14359 ## If we have a custom action on failure, don't print errors, but
14360 ## do set a variable so people can do so. Do it in a subshell
14361 ## to capture any diagnostics in invoking pkg-config.
14362 XRANDR_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$XRANDR_MODULES") 2>&1`
14363
14364 fi
14365
14366
14367
14368 else
14369 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
14370 echo "*** See http://www.freedesktop.org/software/pkgconfig"
14371 fi
14372 fi
14373
14374 if test $succeeded = yes; then
14375 HAVE_XRANDR=yes
14376 else
14377 HAVE_XRANDR=no
14378 fi
14379
14380 if test $HAVE_XRANDR = no; then
14381 # Test old way in case pkg-config doesn't have it (older machines).
14382 ac_fn_c_check_header_mongrel "$LINENO" "X11/extensions/Xrandr.h" "ac_cv_header_X11_extensions_Xrandr_h" "$ac_includes_default"
14383if test "x$ac_cv_header_X11_extensions_Xrandr_h" = x""yes; then :
c31effdb
GM
14384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRRGetScreenResources in -lXrandr" >&5
14385$as_echo_n "checking for XRRGetScreenResources in -lXrandr... " >&6; }
14386if test "${ac_cv_lib_Xrandr_XRRGetScreenResources+set}" = set; then :
910833ae
GM
14387 $as_echo_n "(cached) " >&6
14388else
14389 ac_check_lib_save_LIBS=$LIBS
14390LIBS="-lXrandr $LIBS"
14391cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14392/* end confdefs.h. */
14393
14394/* Override any GCC internal prototype to avoid an error.
14395 Use char because int might match the return type of a GCC
14396 builtin and then its argument prototype would still apply. */
14397#ifdef __cplusplus
14398extern "C"
14399#endif
c31effdb 14400char XRRGetScreenResources ();
910833ae
GM
14401int
14402main ()
14403{
c31effdb 14404return XRRGetScreenResources ();
910833ae
GM
14405 ;
14406 return 0;
14407}
14408_ACEOF
14409if ac_fn_c_try_link "$LINENO"; then :
c31effdb 14410 ac_cv_lib_Xrandr_XRRGetScreenResources=yes
910833ae 14411else
c31effdb 14412 ac_cv_lib_Xrandr_XRRGetScreenResources=no
910833ae
GM
14413fi
14414rm -f core conftest.err conftest.$ac_objext \
14415 conftest$ac_exeext conftest.$ac_ext
14416LIBS=$ac_check_lib_save_LIBS
14417fi
c31effdb
GM
14418{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrandr_XRRGetScreenResources" >&5
14419$as_echo "$ac_cv_lib_Xrandr_XRRGetScreenResources" >&6; }
14420if test "x$ac_cv_lib_Xrandr_XRRGetScreenResources" = x""yes; then :
910833ae
GM
14421 HAVE_XRANDR=yes
14422fi
14423
14424fi
14425
14426
14427 if test $HAVE_XRANDR = yes; then
14428 XRANDR_LIBS=-lXrandr
14429
14430 fi
14431 fi
14432 if test $HAVE_XRANDR = yes; then
14433 SAVE_CFLAGS="$CFLAGS"
14434 SAVE_LIBS="$LIBS"
14435 CFLAGS="$XRANDR_CFLAGS $CFLAGS"
14436 LIBS="$XRANDR_LIBS $LIBS"
14437 for ac_func in XRRGetOutputPrimary XRRGetScreenResourcesCurrent
14438do :
14439 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14440ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14441eval as_val=\$$as_ac_var
14442 if test "x$as_val" = x""yes; then :
14443 cat >>confdefs.h <<_ACEOF
14444#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14445_ACEOF
14446
14447fi
14448done
14449
14450 CFLAGS="$SAVE_CFLAGS"
14451 LIBS="$SAVE_LIBS"
14452
14453
14454$as_echo "#define HAVE_XRANDR 1" >>confdefs.h
14455
14456 fi
14457fi
14458
14459### Use Xinerama (-lXinerama) if available
14460HAVE_XINERAMA=no
14461if test "${HAVE_X11}" = "yes"; then
14462 XINERAMA_REQUIRED=1.0.2
14463 XINERAMA_MODULES="xinerama >= $XINERAMA_REQUIRED"
14464
14465 succeeded=no
14466
14467 if test "$PKG_CONFIG" = "no" ; then
14468 HAVE_XINERAMA=no
14469 else
14470 PKG_CONFIG_MIN_VERSION=0.9.0
14471 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
14472 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $XINERAMA_MODULES" >&5
14473$as_echo_n "checking for $XINERAMA_MODULES... " >&6; }
14474
14475 if "$PKG_CONFIG" --exists "$XINERAMA_MODULES" 2>&5 &&
14476 XINERAMA_CFLAGS=`"$PKG_CONFIG" --cflags "$XINERAMA_MODULES" 2>&5` &&
14477 XINERAMA_LIBS=`"$PKG_CONFIG" --libs "$XINERAMA_MODULES" 2>&5`; then
14478 edit_cflags="
14479 s,///*,/,g
14480 s/^/ /
14481 s/ -I/ $isystem/g
14482 s/^ //
14483 "
14484 XINERAMA_CFLAGS=`$as_echo "$XINERAMA_CFLAGS" | sed -e "$edit_cflags"`
14485 XINERAMA_LIBS=`$as_echo "$XINERAMA_LIBS" | sed -e 's,///*,/,g'`
14486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$XINERAMA_CFLAGS' LIBS='$XINERAMA_LIBS'" >&5
14487$as_echo "yes CFLAGS='$XINERAMA_CFLAGS' LIBS='$XINERAMA_LIBS'" >&6; }
14488 succeeded=yes
14489 else
14490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14491$as_echo "no" >&6; }
14492 XINERAMA_CFLAGS=""
14493 XINERAMA_LIBS=""
14494 ## If we have a custom action on failure, don't print errors, but
14495 ## do set a variable so people can do so. Do it in a subshell
14496 ## to capture any diagnostics in invoking pkg-config.
14497 XINERAMA_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$XINERAMA_MODULES") 2>&1`
14498
14499 fi
14500
14501
14502
14503 else
14504 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
14505 echo "*** See http://www.freedesktop.org/software/pkgconfig"
14506 fi
14507 fi
14508
14509 if test $succeeded = yes; then
14510 HAVE_XINERAMA=yes
14511 else
14512 HAVE_XINERAMA=no
14513 fi
14514
14515 if test $HAVE_XINERAMA = no; then
14516 # Test old way in case pkg-config doesn't have it (older machines).
14517 ac_fn_c_check_header_mongrel "$LINENO" "X11/extensions/Xinerama.h" "ac_cv_header_X11_extensions_Xinerama_h" "$ac_includes_default"
14518if test "x$ac_cv_header_X11_extensions_Xinerama_h" = x""yes; then :
14519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XineramaQueryExtension in -lXinerama" >&5
14520$as_echo_n "checking for XineramaQueryExtension in -lXinerama... " >&6; }
14521if test "${ac_cv_lib_Xinerama_XineramaQueryExtension+set}" = set; then :
14522 $as_echo_n "(cached) " >&6
14523else
14524 ac_check_lib_save_LIBS=$LIBS
14525LIBS="-lXinerama $LIBS"
14526cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14527/* end confdefs.h. */
14528
14529/* Override any GCC internal prototype to avoid an error.
14530 Use char because int might match the return type of a GCC
14531 builtin and then its argument prototype would still apply. */
14532#ifdef __cplusplus
14533extern "C"
14534#endif
14535char XineramaQueryExtension ();
14536int
14537main ()
14538{
14539return XineramaQueryExtension ();
14540 ;
14541 return 0;
14542}
14543_ACEOF
14544if ac_fn_c_try_link "$LINENO"; then :
14545 ac_cv_lib_Xinerama_XineramaQueryExtension=yes
14546else
14547 ac_cv_lib_Xinerama_XineramaQueryExtension=no
14548fi
14549rm -f core conftest.err conftest.$ac_objext \
14550 conftest$ac_exeext conftest.$ac_ext
14551LIBS=$ac_check_lib_save_LIBS
14552fi
14553{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xinerama_XineramaQueryExtension" >&5
14554$as_echo "$ac_cv_lib_Xinerama_XineramaQueryExtension" >&6; }
14555if test "x$ac_cv_lib_Xinerama_XineramaQueryExtension" = x""yes; then :
14556 HAVE_XINERAMA=yes
14557fi
14558
14559fi
14560
14561
14562 if test $HAVE_XINERAMA = yes; then
14563 XINERAMA_LIBS=-lXinerama
14564
14565 fi
14566 fi
14567 if test $HAVE_XINERAMA = yes; then
14568
14569$as_echo "#define HAVE_XINERAMA 1" >>confdefs.h
14570
14571 fi
14572fi
14573
14574
5476a9a4 14575### Use libxml (-lxml2) if available
7c61eaab 14576### mingw32 doesn't use -lxml2, since it loads the library dynamically.
5476a9a4
GM
14577HAVE_LIBXML2=no
14578if test "${with_xml2}" != "no"; then
14579 ### I'm not sure what the version number should be, so I just guessed.
067d23c9 14580
5476a9a4 14581 succeeded=no
067d23c9 14582
5476a9a4
GM
14583 if test "$PKG_CONFIG" = "no" ; then
14584 HAVE_LIBXML2=no
14585 else
14586 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 14587 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
14588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxml-2.0 > 2.6.17" >&5
14589$as_echo_n "checking for libxml-2.0 > 2.6.17... " >&6; }
067d23c9 14590
b5591ebb
GM
14591 if "$PKG_CONFIG" --exists "libxml-2.0 > 2.6.17" 2>&5 &&
14592 LIBXML2_CFLAGS=`"$PKG_CONFIG" --cflags "libxml-2.0 > 2.6.17" 2>&5` &&
14593 LIBXML2_LIBS=`"$PKG_CONFIG" --libs "libxml-2.0 > 2.6.17" 2>&5`; then
5476a9a4
GM
14594 edit_cflags="
14595 s,///*,/,g
14596 s/^/ /
14597 s/ -I/ $isystem/g
14598 s/^ //
14599 "
14600 LIBXML2_CFLAGS=`$as_echo "$LIBXML2_CFLAGS" | sed -e "$edit_cflags"`
14601 LIBXML2_LIBS=`$as_echo "$LIBXML2_LIBS" | sed -e 's,///*,/,g'`
14602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBXML2_CFLAGS' LIBS='$LIBXML2_LIBS'" >&5
14603$as_echo "yes CFLAGS='$LIBXML2_CFLAGS' LIBS='$LIBXML2_LIBS'" >&6; }
14604 succeeded=yes
14605 else
14606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14607$as_echo "no" >&6; }
14608 LIBXML2_CFLAGS=""
14609 LIBXML2_LIBS=""
14610 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
14611 ## do set a variable so people can do so. Do it in a subshell
14612 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 14613 LIBXML2_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "libxml-2.0 > 2.6.17") 2>&1`
5476a9a4
GM
14614
14615 fi
14616
14617
14618
14619 else
14620 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
14621 echo "*** See http://www.freedesktop.org/software/pkgconfig"
14622 fi
14623 fi
14624
14625 if test $succeeded = yes; then
14626 HAVE_LIBXML2=yes
14627 else
14628 HAVE_LIBXML2=no
14629 fi
14630
4628c0bf
GM
14631 # Built-in libxml2 on OS X 10.8 lacks libxml-2.0.pc.
14632 if test "${HAVE_LIBXML2}" != "yes" -a "$opsys" = "darwin"; then
14633 SAVE_CPPFLAGS="$CPPFLAGS"
14634 CPPFLAGS="$CPPFLAGS -I/usr/include/libxml2"
14635 ac_fn_c_check_header_mongrel "$LINENO" "libxml/HTMLparser.h" "ac_cv_header_libxml_HTMLparser_h" "$ac_includes_default"
14636if test "x$ac_cv_header_libxml_HTMLparser_h" = x""yes; then :
14637 ac_fn_c_check_decl "$LINENO" "HTML_PARSE_RECOVER" "ac_cv_have_decl_HTML_PARSE_RECOVER" "#include <libxml/HTMLparser.h>
14638"
14639if test "x$ac_cv_have_decl_HTML_PARSE_RECOVER" = x""yes; then :
14640 HAVE_LIBXML2=yes
14641fi
14642
14643fi
14644
14645
14646 CPPFLAGS="$SAVE_CPPFLAGS"
14647 if test "${HAVE_LIBXML2}" = "yes"; then
14648 LIBXML2_LIBS="-lxml2"
14649 LIBXML2_CFLAGS="-I/usr/include/libxml2"
14650 fi
14651 fi
5476a9a4 14652 if test "${HAVE_LIBXML2}" = "yes"; then
7c61eaab
GM
14653 if test "${opsys}" != "mingw32"; then
14654 LIBS="$LIBXML2_LIBS $LIBS"
14655 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for htmlReadMemory in -lxml2" >&5
5476a9a4
GM
14656$as_echo_n "checking for htmlReadMemory in -lxml2... " >&6; }
14657if test "${ac_cv_lib_xml2_htmlReadMemory+set}" = set; then :
067d23c9
KY
14658 $as_echo_n "(cached) " >&6
14659else
5476a9a4
GM
14660 ac_check_lib_save_LIBS=$LIBS
14661LIBS="-lxml2 $LIBS"
14662cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
14663/* end confdefs.h. */
14664
5476a9a4
GM
14665/* Override any GCC internal prototype to avoid an error.
14666 Use char because int might match the return type of a GCC
14667 builtin and then its argument prototype would still apply. */
14668#ifdef __cplusplus
14669extern "C"
14670#endif
14671char htmlReadMemory ();
067d23c9
KY
14672int
14673main ()
14674{
5476a9a4 14675return htmlReadMemory ();
067d23c9
KY
14676 ;
14677 return 0;
14678}
14679_ACEOF
5476a9a4
GM
14680if ac_fn_c_try_link "$LINENO"; then :
14681 ac_cv_lib_xml2_htmlReadMemory=yes
067d23c9 14682else
5476a9a4 14683 ac_cv_lib_xml2_htmlReadMemory=no
067d23c9 14684fi
5476a9a4
GM
14685rm -f core conftest.err conftest.$ac_objext \
14686 conftest$ac_exeext conftest.$ac_ext
14687LIBS=$ac_check_lib_save_LIBS
14688fi
14689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_htmlReadMemory" >&5
14690$as_echo "$ac_cv_lib_xml2_htmlReadMemory" >&6; }
14691if test "x$ac_cv_lib_xml2_htmlReadMemory" = x""yes; then :
14692 HAVE_LIBXML2=yes
14693else
14694 HAVE_LIBXML2=no
067d23c9
KY
14695fi
14696
7c61eaab
GM
14697 else
14698 LIBXML2_LIBS=""
14699 fi
5476a9a4 14700 if test "${HAVE_LIBXML2}" = "yes"; then
067d23c9 14701
5476a9a4 14702$as_echo "#define HAVE_LIBXML2 1" >>confdefs.h
067d23c9 14703
5476a9a4
GM
14704 else
14705 LIBXML2_LIBS=""
14706 LIBXML2_CFLAGS=""
14707 fi
067d23c9 14708 fi
5476a9a4 14709fi
067d23c9 14710
067d23c9 14711
067d23c9 14712
5476a9a4 14713# If netdb.h doesn't declare h_errno, we must declare it by hand.
7c61eaab
GM
14714# On MinGW, that is provided by nt/inc/sys/socket.h and w32.c.
14715if test "${opsys}" = "mingw32"; then
14716 emacs_cv_netdb_declares_h_errno=yes
14717fi
5476a9a4
GM
14718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether netdb declares h_errno" >&5
14719$as_echo_n "checking whether netdb declares h_errno... " >&6; }
14720if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then :
14721 $as_echo_n "(cached) " >&6
067d23c9 14722else
5476a9a4
GM
14723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14724/* end confdefs.h. */
14725#include <netdb.h>
14726int
14727main ()
14728{
14729return h_errno;
14730 ;
14731 return 0;
14732}
14733_ACEOF
14734if ac_fn_c_try_link "$LINENO"; then :
14735 emacs_cv_netdb_declares_h_errno=yes
14736else
14737 emacs_cv_netdb_declares_h_errno=no
067d23c9 14738fi
5476a9a4
GM
14739rm -f core conftest.err conftest.$ac_objext \
14740 conftest$ac_exeext conftest.$ac_ext
14741fi
14742{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_netdb_declares_h_errno" >&5
14743$as_echo "$emacs_cv_netdb_declares_h_errno" >&6; }
14744if test $emacs_cv_netdb_declares_h_errno = yes; then
067d23c9 14745
5476a9a4 14746$as_echo "#define HAVE_H_ERRNO 1" >>confdefs.h
f199cab1 14747
5476a9a4 14748fi
f199cab1 14749
2c98a625 14750# sqrt and other floating-point functions such as fmod and frexp
7c61eaab
GM
14751# are found in -lm on most systems, but mingw32 doesn't use -lm.
14752if test "${opsys}" != "mingw32"; then
14753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5
5476a9a4
GM
14754$as_echo_n "checking for sqrt in -lm... " >&6; }
14755if test "${ac_cv_lib_m_sqrt+set}" = set; then :
14756 $as_echo_n "(cached) " >&6
14757else
14758 ac_check_lib_save_LIBS=$LIBS
14759LIBS="-lm $LIBS"
14760cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14761/* end confdefs.h. */
f199cab1 14762
5476a9a4
GM
14763/* Override any GCC internal prototype to avoid an error.
14764 Use char because int might match the return type of a GCC
14765 builtin and then its argument prototype would still apply. */
14766#ifdef __cplusplus
14767extern "C"
14768#endif
14769char sqrt ();
14770int
14771main ()
14772{
14773return sqrt ();
14774 ;
14775 return 0;
14776}
14777_ACEOF
14778if ac_fn_c_try_link "$LINENO"; then :
14779 ac_cv_lib_m_sqrt=yes
14780else
14781 ac_cv_lib_m_sqrt=no
14782fi
14783rm -f core conftest.err conftest.$ac_objext \
14784 conftest$ac_exeext conftest.$ac_ext
14785LIBS=$ac_check_lib_save_LIBS
14786fi
14787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sqrt" >&5
14788$as_echo "$ac_cv_lib_m_sqrt" >&6; }
14789if test "x$ac_cv_lib_m_sqrt" = x""yes; then :
14790 cat >>confdefs.h <<_ACEOF
14791#define HAVE_LIBM 1
14792_ACEOF
f199cab1 14793
5476a9a4 14794 LIBS="-lm $LIBS"
f199cab1 14795
5476a9a4 14796fi
f199cab1 14797
7c61eaab 14798fi
f199cab1 14799
5476a9a4
GM
14800# Check for mail-locking functions in a "mail" library. Probably this should
14801# have the same check as for liblockfile below.
14802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -lmail" >&5
14803$as_echo_n "checking for maillock in -lmail... " >&6; }
14804if test "${ac_cv_lib_mail_maillock+set}" = set; then :
067d23c9
KY
14805 $as_echo_n "(cached) " >&6
14806else
5476a9a4
GM
14807 ac_check_lib_save_LIBS=$LIBS
14808LIBS="-lmail $LIBS"
14809cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
14810/* end confdefs.h. */
14811
5476a9a4
GM
14812/* Override any GCC internal prototype to avoid an error.
14813 Use char because int might match the return type of a GCC
14814 builtin and then its argument prototype would still apply. */
14815#ifdef __cplusplus
14816extern "C"
067d23c9 14817#endif
5476a9a4
GM
14818char maillock ();
14819int
14820main ()
14821{
14822return maillock ();
14823 ;
14824 return 0;
14825}
067d23c9 14826_ACEOF
5476a9a4
GM
14827if ac_fn_c_try_link "$LINENO"; then :
14828 ac_cv_lib_mail_maillock=yes
067d23c9 14829else
5476a9a4 14830 ac_cv_lib_mail_maillock=no
067d23c9 14831fi
5476a9a4
GM
14832rm -f core conftest.err conftest.$ac_objext \
14833 conftest$ac_exeext conftest.$ac_ext
14834LIBS=$ac_check_lib_save_LIBS
067d23c9 14835fi
5476a9a4
GM
14836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mail_maillock" >&5
14837$as_echo "$ac_cv_lib_mail_maillock" >&6; }
14838if test "x$ac_cv_lib_mail_maillock" = x""yes; then :
14839 have_mail=yes
f199cab1 14840else
5476a9a4 14841 have_mail=no
067d23c9
KY
14842fi
14843
5476a9a4
GM
14844if test $have_mail = yes; then
14845 LIBS_MAIL=-lmail
14846 LIBS="$LIBS_MAIL $LIBS"
067d23c9 14847
5476a9a4 14848$as_echo "#define HAVE_LIBMAIL 1" >>confdefs.h
067d23c9 14849
5476a9a4
GM
14850else
14851 LIBS_MAIL=
14852fi
14853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -llockfile" >&5
14854$as_echo_n "checking for maillock in -llockfile... " >&6; }
14855if test "${ac_cv_lib_lockfile_maillock+set}" = set; then :
067d23c9
KY
14856 $as_echo_n "(cached) " >&6
14857else
5476a9a4
GM
14858 ac_check_lib_save_LIBS=$LIBS
14859LIBS="-llockfile $LIBS"
067d23c9
KY
14860cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14861/* end confdefs.h. */
14862
14863/* Override any GCC internal prototype to avoid an error.
14864 Use char because int might match the return type of a GCC
14865 builtin and then its argument prototype would still apply. */
14866#ifdef __cplusplus
14867extern "C"
14868#endif
5476a9a4 14869char maillock ();
067d23c9
KY
14870int
14871main ()
14872{
5476a9a4 14873return maillock ();
067d23c9
KY
14874 ;
14875 return 0;
14876}
14877_ACEOF
5476a9a4
GM
14878if ac_fn_c_try_link "$LINENO"; then :
14879 ac_cv_lib_lockfile_maillock=yes
14880else
14881 ac_cv_lib_lockfile_maillock=no
067d23c9
KY
14882fi
14883rm -f core conftest.err conftest.$ac_objext \
5476a9a4
GM
14884 conftest$ac_exeext conftest.$ac_ext
14885LIBS=$ac_check_lib_save_LIBS
067d23c9 14886fi
5476a9a4
GM
14887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lockfile_maillock" >&5
14888$as_echo "$ac_cv_lib_lockfile_maillock" >&6; }
14889if test "x$ac_cv_lib_lockfile_maillock" = x""yes; then :
14890 have_lockfile=yes
067d23c9 14891else
5476a9a4 14892 have_lockfile=no
f199cab1
GM
14893fi
14894
5476a9a4
GM
14895if test $have_lockfile = yes; then
14896 LIBS_MAIL=-llockfile
14897 LIBS="$LIBS_MAIL $LIBS"
067d23c9 14898
5476a9a4 14899$as_echo "#define HAVE_LIBLOCKFILE 1" >>confdefs.h
067d23c9 14900
5476a9a4
GM
14901else
14902# If we have the shared liblockfile, assume we must use it for mail
14903# locking (e.g. Debian). If we couldn't link against liblockfile
14904# (no liblockfile.a installed), ensure that we don't need to.
14905 # Extract the first word of "liblockfile.so", so it can be a program name with args.
14906set dummy liblockfile.so; ac_word=$2
14907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14908$as_echo_n "checking for $ac_word... " >&6; }
14909if test "${ac_cv_prog_liblockfile+set}" = set; then :
14910 $as_echo_n "(cached) " >&6
14911else
14912 if test -n "$liblockfile"; then
14913 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
14914else
14915as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14916as_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
14917for as_dir in $as_dummy
14918do
14919 IFS=$as_save_IFS
14920 test -z "$as_dir" && as_dir=.
14921 for ac_exec_ext in '' $ac_executable_extensions; do
14922 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
14923 ac_cv_prog_liblockfile="yes"
14924 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14925 break 2
14926 fi
14927done
14928 done
14929IFS=$as_save_IFS
067d23c9 14930
5476a9a4
GM
14931 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
14932fi
14933fi
14934liblockfile=$ac_cv_prog_liblockfile
14935if test -n "$liblockfile"; then
14936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $liblockfile" >&5
14937$as_echo "$liblockfile" >&6; }
14938else
14939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14940$as_echo "no" >&6; }
14941fi
067d23c9 14942
067d23c9 14943
5476a9a4
GM
14944 if test $ac_cv_prog_liblockfile = yes; then
14945 as_fn_error "Shared liblockfile found but can't link against it.
14946This probably means that movemail could lose mail.
14947There may be a \`development' package to install containing liblockfile." "$LINENO" 5
14948 fi
14949fi
067d23c9 14950
067d23c9 14951
067d23c9 14952
067d23c9
KY
14953
14954
5476a9a4
GM
14955## Define MAIL_USE_FLOCK (or LOCKF) if the mailer uses flock (or lockf) to
14956## interlock access to the mail spool. The alternative is a lock file named
14957## /usr/spool/mail/$USER.lock.
14958mail_lock=no
14959case "$opsys" in
14960 aix4-2) mail_lock="lockf" ;;
067d23c9 14961
87e1a811 14962 gnu|freebsd|dragonfly|netbsd|openbsd|darwin|irix6-5) mail_lock="flock" ;;
067d23c9 14963
5476a9a4
GM
14964 ## On GNU/Linux systems, both methods are used by various mail programs.
14965 ## I assume most people are using newer mailers that have heard of flock.
14966 ## Change this if you need to.
14967 ## Debian contains a patch which says: ``On Debian/GNU/Linux systems,
14968 ## configure gets the right answers, and that means *NOT* using flock.
14969 ## Using flock is guaranteed to be the wrong thing. See Debian Policy
14970 ## for details.'' and then uses `#ifdef DEBIAN'. Unfortunately the
14971 ## Debian maintainer hasn't provided a clean fix for Emacs.
14972 ## movemail.c will use `maillock' when MAILDIR, HAVE_LIBMAIL and
14973 ## HAVE_MAILLOCK_H are defined, so the following appears to be the
14974 ## correct logic. -- fx
14975 ## We must check for HAVE_LIBLOCKFILE too, as movemail does.
14976 ## liblockfile is a Free Software replacement for libmail, used on
14977 ## Debian systems and elsewhere. -rfr.
14978 gnu-*)
14979 mail_lock="flock"
14980 if test $have_mail = yes || test $have_lockfile = yes; then
14981 test $ac_cv_header_maillock_h = yes && mail_lock=no
14982 fi
14983 ;;
7c61eaab
GM
14984
14985 mingw32)
14986 mail_lock="none-needed" ;;
5476a9a4 14987esac
f199cab1 14988
5476a9a4
GM
14989BLESSMAIL_TARGET=
14990case "$mail_lock" in
14991 flock)
14992$as_echo "#define MAIL_USE_FLOCK 1" >>confdefs.h
14993 ;;
f199cab1 14994
5476a9a4
GM
14995 lockf)
14996$as_echo "#define MAIL_USE_LOCKF 1" >>confdefs.h
14997 ;;
f199cab1 14998
7c61eaab
GM
14999 none-needed) ;;
15000
5476a9a4
GM
15001 *) BLESSMAIL_TARGET="need-blessmail" ;;
15002esac
f199cab1
GM
15003
15004
15005
0cdca42a 15006for ac_func in accept4 gethostname \
e7d0e5ee 15007getrusage get_current_dir_name \
eda33f78 15008lrand48 \
a455a5ce 15009select getpagesize setlocale \
db7863f4 15010getrlimit setrlimit shutdown getaddrinfo \
eda33f78 15011strsignal setitimer \
5476a9a4 15012sendto recvfrom getsockname getpeername getifaddrs freeifaddrs \
e412eb97 15013gai_strerror getline getdelim sync \
5476a9a4
GM
15014difftime posix_memalign \
15015getpwent endpwent getgrent endgrent \
15016touchlock \
4628c0bf 15017cfmakeraw cfsetspeed copysign __executable_start log2
5476a9a4
GM
15018do :
15019 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15020ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15021eval as_val=\$$as_ac_var
15022 if test "x$as_val" = x""yes; then :
15023 cat >>confdefs.h <<_ACEOF
15024#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15025_ACEOF
f199cab1 15026
5476a9a4
GM
15027fi
15028done
f199cab1
GM
15029
15030
5476a9a4
GM
15031## Eric Backus <ericb@lsid.hp.com> says, HP-UX 9.x on HP 700 machines
15032## has a broken `rint' in some library versions including math library
15033## version number A.09.05.
15034## You can fix the math library by installing patch number PHSS_4630.
15035## But we can fix it more reliably for Emacs by just not using rint.
8ad96b1d 15036## We also skip HAVE_RANDOM - see comments in src/conf_post.h.
5476a9a4
GM
15037case $opsys in
15038 hpux*) : ;;
15039 *) for ac_func in random rint
15040do :
15041 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15042ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15043eval as_val=\$$as_ac_var
15044 if test "x$as_val" = x""yes; then :
15045 cat >>confdefs.h <<_ACEOF
15046#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15047_ACEOF
f199cab1 15048
5476a9a4
GM
15049fi
15050done
15051 ;;
15052esac
f199cab1 15053
5476a9a4
GM
15054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unwind_init" >&5
15055$as_echo_n "checking for __builtin_unwind_init... " >&6; }
15056if test "${emacs_cv_func___builtin_unwind_init+set}" = set; then :
067d23c9 15057 $as_echo_n "(cached) " >&6
f199cab1
GM
15058else
15059 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
15060/* end confdefs.h. */
15061
067d23c9
KY
15062int
15063main ()
15064{
5476a9a4 15065__builtin_unwind_init ();
067d23c9
KY
15066 ;
15067 return 0;
15068}
15069_ACEOF
5476a9a4
GM
15070if ac_fn_c_try_link "$LINENO"; then :
15071 emacs_cv_func___builtin_unwind_init=yes
067d23c9 15072else
5476a9a4 15073 emacs_cv_func___builtin_unwind_init=no
067d23c9 15074fi
5476a9a4
GM
15075rm -f core conftest.err conftest.$ac_objext \
15076 conftest$ac_exeext conftest.$ac_ext
067d23c9 15077fi
5476a9a4
GM
15078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_func___builtin_unwind_init" >&5
15079$as_echo "$emacs_cv_func___builtin_unwind_init" >&6; }
15080if test $emacs_cv_func___builtin_unwind_init = yes; then
067d23c9 15081
5476a9a4 15082$as_echo "#define HAVE___BUILTIN_UNWIND_INIT 1" >>confdefs.h
f199cab1 15083
067d23c9 15084fi
067d23c9 15085
f199cab1
GM
15086
15087
15088
15089
5476a9a4
GM
15090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
15091$as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
15092if test "${ac_cv_sys_largefile_source+set}" = set; then :
15093 $as_echo_n "(cached) " >&6
15094else
15095 while :; do
15096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15097/* end confdefs.h. */
15098#include <sys/types.h> /* for off_t */
15099 #include <stdio.h>
15100int
15101main ()
15102{
15103int (*fp) (FILE *, off_t, int) = fseeko;
15104 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15105 ;
15106 return 0;
15107}
15108_ACEOF
15109if ac_fn_c_try_link "$LINENO"; then :
15110 ac_cv_sys_largefile_source=no; break
067d23c9 15111fi
5476a9a4
GM
15112rm -f core conftest.err conftest.$ac_objext \
15113 conftest$ac_exeext conftest.$ac_ext
15114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15115/* end confdefs.h. */
15116#define _LARGEFILE_SOURCE 1
15117#include <sys/types.h> /* for off_t */
15118 #include <stdio.h>
15119int
15120main ()
15121{
15122int (*fp) (FILE *, off_t, int) = fseeko;
15123 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15124 ;
15125 return 0;
15126}
15127_ACEOF
15128if ac_fn_c_try_link "$LINENO"; then :
15129 ac_cv_sys_largefile_source=1; break
15130fi
15131rm -f core conftest.err conftest.$ac_objext \
15132 conftest$ac_exeext conftest.$ac_ext
15133 ac_cv_sys_largefile_source=unknown
15134 break
15135done
15136fi
15137{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
15138$as_echo "$ac_cv_sys_largefile_source" >&6; }
15139case $ac_cv_sys_largefile_source in #(
15140 no | unknown) ;;
15141 *)
15142cat >>confdefs.h <<_ACEOF
15143#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
15144_ACEOF
15145;;
15146esac
15147rm -rf conftest*
067d23c9 15148
5476a9a4
GM
15149# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
15150# in glibc 2.1.3, but that breaks too many other things.
15151# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
15152if test $ac_cv_sys_largefile_source != unknown; then
067d23c9 15153
5476a9a4 15154$as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
067d23c9 15155
5476a9a4 15156fi
067d23c9
KY
15157
15158
5476a9a4
GM
15159# UNIX98 PTYs.
15160for ac_func in grantpt
15161do :
15162 ac_fn_c_check_func "$LINENO" "grantpt" "ac_cv_func_grantpt"
15163if test "x$ac_cv_func_grantpt" = x""yes; then :
15164 cat >>confdefs.h <<_ACEOF
15165#define HAVE_GRANTPT 1
15166_ACEOF
f199cab1 15167
5476a9a4
GM
15168fi
15169done
f199cab1 15170
f199cab1 15171
5476a9a4 15172# PTY-related GNU extensions.
1146da8d 15173for ac_func in getpt posix_openpt
5476a9a4 15174do :
1146da8d
GM
15175 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15176ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15177eval as_val=\$$as_ac_var
15178 if test "x$as_val" = x""yes; then :
5476a9a4 15179 cat >>confdefs.h <<_ACEOF
1146da8d 15180#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
5476a9a4 15181_ACEOF
f199cab1 15182
5476a9a4
GM
15183fi
15184done
f199cab1 15185
f199cab1 15186
5476a9a4
GM
15187# Check this now, so that we will NOT find the above functions in ncurses.
15188# That is because we have not set up to link ncurses in lib-src.
15189# It's better to believe a function is not available
15190# than to expect to find it in ncurses.
15191# Also we need tputs and friends to be able to build at all.
15192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tputs" >&5
15193$as_echo_n "checking for library containing tputs... " >&6; }
15194# Run a test program that contains a call to tputs, a call that is
15195# never executed. This tests whether a pre-'main' dynamic linker
15196# works with the library. It's too much trouble to actually call
15197# tputs in the test program, due to portability hassles. When
15198# cross-compiling, assume the test program will run if it links.
f199cab1 15199
7c61eaab
GM
15200if test "${opsys}" = "mingw32"; then
15201 msg='none required'
15202else
15203 # Maybe curses should be tried earlier?
15204 # See http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9736#35
15205 for tputs_library in '' tinfo ncurses terminfo termcap curses; do
15206 OLIBS=$LIBS
15207 if test -z "$tputs_library"; then
15208 LIBS_TERMCAP=
15209 msg='none required'
15210 else
15211 LIBS_TERMCAP=-l$tputs_library
15212 msg=$LIBS_TERMCAP
15213 LIBS="$LIBS_TERMCAP $LIBS"
15214 fi
15215 if test "$cross_compiling" = yes; then :
5476a9a4 15216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
15217/* end confdefs.h. */
15218
5476a9a4
GM
15219 extern void tputs (const char *, int, int (*)(int));
15220 int main (int argc, char **argv)
15221 {
15222 if (argc == 10000)
15223 tputs (argv[0], 0, 0);
15224 return 0;
15225 }
15226
067d23c9
KY
15227_ACEOF
15228if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 15229
067d23c9 15230else
5476a9a4 15231 msg=no
067d23c9
KY
15232fi
15233rm -f core conftest.err conftest.$ac_objext \
15234 conftest$ac_exeext conftest.$ac_ext
067d23c9 15235else
5476a9a4 15236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
15237/* end confdefs.h. */
15238
5476a9a4
GM
15239 extern void tputs (const char *, int, int (*)(int));
15240 int main (int argc, char **argv)
15241 {
15242 if (argc == 10000)
15243 tputs (argv[0], 0, 0);
15244 return 0;
15245 }
15246
067d23c9 15247_ACEOF
5476a9a4
GM
15248if ac_fn_c_try_run "$LINENO"; then :
15249
067d23c9 15250else
5476a9a4 15251 msg=no
067d23c9 15252fi
5476a9a4
GM
15253rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15254 conftest.$ac_objext conftest.beam conftest.$ac_ext
067d23c9 15255fi
5476a9a4 15256
7c61eaab
GM
15257 LIBS=$OLIBS
15258 if test "X$msg" != Xno; then
15259 break
15260 fi
15261 done
15262fi
5476a9a4
GM
15263{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $msg" >&5
15264$as_echo "$msg" >&6; }
15265if test "X$msg" = Xno; then
15266 as_fn_error "The required function \`tputs' was not found in any library.
15267The following libraries were tried (in order):
15268 libtinfo, libncurses, libterminfo, libtermcap, libcurses
15269Please try installing whichever of these libraries is most appropriate
15270for your system, together with its header files.
15271For example, a libncurses-dev(el) or similar package." "$LINENO" 5
067d23c9
KY
15272fi
15273
5476a9a4
GM
15274## Use termcap instead of terminfo?
15275## Only true for: freebsd < 40000, ms-w32, msdos, netbsd < 599002500.
15276TERMINFO=yes
15277## FIXME? In the cases below where we unconditionally set
15278## LIBS_TERMCAP="-lncurses", this overrides LIBS_TERMCAP = -ltinfo,
15279## if that was found above to have tputs.
15280## Should we use the gnu* logic everywhere?
15281case "$opsys" in
15282 ## darwin: Prevents crashes when running Emacs in Terminal.app under 10.2.
15283 ## The ncurses library has been moved out of the System framework in
15284 ## Mac OS X 10.2. So if configure detects it, set the command-line
15285 ## option to use it.
15286 darwin) LIBS_TERMCAP="-lncurses" ;;
15287
15288 gnu*) test -z "$LIBS_TERMCAP" && LIBS_TERMCAP="-lncurses" ;;
15289
15290 freebsd)
15291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether FreeBSD is new enough to use terminfo" >&5
15292$as_echo_n "checking whether FreeBSD is new enough to use terminfo... " >&6; }
15293 if test "${emacs_cv_freebsd_terminfo+set}" = set; then :
067d23c9
KY
15294 $as_echo_n "(cached) " >&6
15295else
5476a9a4 15296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 15297/* end confdefs.h. */
5476a9a4 15298#include <osreldate.h>
067d23c9
KY
15299int
15300main ()
15301{
5476a9a4
GM
15302#if __FreeBSD_version < 400000
15303fail;
15304#endif
15305
067d23c9
KY
15306 ;
15307 return 0;
15308}
15309_ACEOF
15310if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 15311 emacs_cv_freebsd_terminfo=yes
067d23c9 15312else
5476a9a4 15313 emacs_cv_freebsd_terminfo=no
067d23c9
KY
15314fi
15315rm -f core conftest.err conftest.$ac_objext \
15316 conftest$ac_exeext conftest.$ac_ext
15317fi
5476a9a4
GM
15318
15319
15320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_freebsd_terminfo" >&5
15321$as_echo "$emacs_cv_freebsd_terminfo" >&6; }
15322
15323 if test $emacs_cv_freebsd_terminfo = yes; then
15324 LIBS_TERMCAP="-lncurses"
15325 else
15326 TERMINFO=no
15327 LIBS_TERMCAP="-ltermcap"
15328 fi
15329 ;;
15330
7c61eaab
GM
15331 mingw32)
15332 TERMINFO=no
15333 LIBS_TERMCAP=
15334 ;;
15335
5476a9a4
GM
15336 netbsd)
15337 if test "x$LIBS_TERMCAP" != "x-lterminfo"; then
15338 TERMINFO=no
15339 LIBS_TERMCAP="-ltermcap"
15340 fi
15341 ;;
15342
87e1a811 15343 openbsd | dragonfly) LIBS_TERMCAP="-lncurses" ;;
5476a9a4
GM
15344
15345 ## hpux: Make sure we get select from libc rather than from libcurses
15346 ## because libcurses on HPUX 10.10 has a broken version of select.
15347 ## We used to use -lc -lcurses, but this may be cleaner.
15348 ## FIXME? But TERMINFO = yes on hpux (it used to be explicitly
15349 # set that way, now it uses the default). Isn't this a contradiction?
15350 hpux*) LIBS_TERMCAP="-ltermcap" ;;
15351
15352esac
15353
15354TERMCAP_OBJ=tparam.o
15355if test $TERMINFO = yes; then
15356
15357$as_echo "#define TERMINFO 1" >>confdefs.h
15358
15359 TERMCAP_OBJ=terminfo.o
067d23c9 15360fi
20d5e28a
GM
15361if test "X$LIBS_TERMCAP" = "X-lncurses"; then
15362
15363$as_echo "#define USE_NCURSES 1" >>confdefs.h
15364
15365fi
067d23c9 15366
f199cab1 15367
067d23c9 15368
5476a9a4
GM
15369
15370# Do we have res_init, for detecting changes in /etc/resolv.conf?
15371# On Darwin, res_init appears not to be useful: see bug#562 and
15372# http://lists.gnu.org/archive/html/emacs-devel/2007-11/msg01467.html
15373resolv=no
15374
15375if test $opsys != darwin; then
15376
15377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15378/* end confdefs.h. */
15379#include <netinet/in.h>
15380#include <arpa/nameser.h>
15381#include <resolv.h>
067d23c9
KY
15382int
15383main ()
15384{
5476a9a4 15385return res_init();
067d23c9
KY
15386 ;
15387 return 0;
15388}
15389_ACEOF
15390if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 15391 have_res_init=yes
067d23c9 15392else
5476a9a4 15393 have_res_init=no
067d23c9
KY
15394fi
15395rm -f core conftest.err conftest.$ac_objext \
15396 conftest$ac_exeext conftest.$ac_ext
5476a9a4
GM
15397 if test "$have_res_init" = no; then
15398 OLIBS="$LIBS"
15399 LIBS="$LIBS -lresolv"
15400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_init with -lresolv" >&5
15401$as_echo_n "checking for res_init with -lresolv... " >&6; }
15402 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 15403/* end confdefs.h. */
5476a9a4
GM
15404#include <netinet/in.h>
15405#include <arpa/nameser.h>
15406#include <resolv.h>
067d23c9
KY
15407int
15408main ()
15409{
5476a9a4 15410return res_init();
067d23c9
KY
15411 ;
15412 return 0;
15413}
15414_ACEOF
15415if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 15416 have_res_init=yes
067d23c9 15417else
5476a9a4 15418 have_res_init=no
067d23c9
KY
15419fi
15420rm -f core conftest.err conftest.$ac_objext \
15421 conftest$ac_exeext conftest.$ac_ext
5476a9a4
GM
15422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_res_init" >&5
15423$as_echo "$have_res_init" >&6; }
15424 if test "$have_res_init" = yes ; then
15425 resolv=yes
15426 fi
15427 LIBS="$OLIBS"
15428 fi
067d23c9 15429
5476a9a4
GM
15430 if test "$have_res_init" = yes; then
15431
15432$as_echo "#define HAVE_RES_INIT 1" >>confdefs.h
067d23c9 15433
5476a9a4 15434 fi
067d23c9 15435fi
5476a9a4
GM
15436# Do we need the Hesiod library to provide the support routines?
15437LIBHESIOD=
15438if test "$with_hesiod" != no ; then
15439 # Don't set $LIBS here -- see comments above. FIXME which comments?
15440 ac_fn_c_check_func "$LINENO" "res_send" "ac_cv_func_res_send"
15441if test "x$ac_cv_func_res_send" = x""yes; then :
f199cab1 15442
5476a9a4
GM
15443else
15444 ac_fn_c_check_func "$LINENO" "__res_send" "ac_cv_func___res_send"
15445if test "x$ac_cv_func___res_send" = x""yes; then :
f199cab1 15446
5476a9a4
GM
15447else
15448 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_send in -lresolv" >&5
15449$as_echo_n "checking for res_send in -lresolv... " >&6; }
15450if test "${ac_cv_lib_resolv_res_send+set}" = set; then :
067d23c9
KY
15451 $as_echo_n "(cached) " >&6
15452else
15453 ac_check_lib_save_LIBS=$LIBS
5476a9a4 15454LIBS="-lresolv $LIBS"
067d23c9
KY
15455cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15456/* end confdefs.h. */
15457
15458/* Override any GCC internal prototype to avoid an error.
15459 Use char because int might match the return type of a GCC
15460 builtin and then its argument prototype would still apply. */
15461#ifdef __cplusplus
15462extern "C"
15463#endif
5476a9a4 15464char res_send ();
067d23c9
KY
15465int
15466main ()
15467{
5476a9a4 15468return res_send ();
067d23c9
KY
15469 ;
15470 return 0;
15471}
15472_ACEOF
15473if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 15474 ac_cv_lib_resolv_res_send=yes
067d23c9 15475else
5476a9a4 15476 ac_cv_lib_resolv_res_send=no
067d23c9
KY
15477fi
15478rm -f core conftest.err conftest.$ac_objext \
f199cab1
GM
15479 conftest$ac_exeext conftest.$ac_ext
15480LIBS=$ac_check_lib_save_LIBS
15481fi
5476a9a4
GM
15482{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_send" >&5
15483$as_echo "$ac_cv_lib_resolv_res_send" >&6; }
15484if test "x$ac_cv_lib_resolv_res_send" = x""yes; then :
15485 resolv=yes
15486else
15487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __res_send in -lresolv" >&5
15488$as_echo_n "checking for __res_send in -lresolv... " >&6; }
15489if test "${ac_cv_lib_resolv___res_send+set}" = set; then :
f199cab1
GM
15490 $as_echo_n "(cached) " >&6
15491else
15492 ac_check_lib_save_LIBS=$LIBS
5476a9a4 15493LIBS="-lresolv $LIBS"
f199cab1
GM
15494cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15495/* end confdefs.h. */
4717915f 15496
f199cab1
GM
15497/* Override any GCC internal prototype to avoid an error.
15498 Use char because int might match the return type of a GCC
15499 builtin and then its argument prototype would still apply. */
15500#ifdef __cplusplus
15501extern "C"
15502#endif
5476a9a4 15503char __res_send ();
f199cab1
GM
15504int
15505main ()
15506{
5476a9a4 15507return __res_send ();
f199cab1
GM
15508 ;
15509 return 0;
15510}
15511_ACEOF
15512if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 15513 ac_cv_lib_resolv___res_send=yes
f199cab1 15514else
5476a9a4 15515 ac_cv_lib_resolv___res_send=no
f199cab1
GM
15516fi
15517rm -f core conftest.err conftest.$ac_objext \
15518 conftest$ac_exeext conftest.$ac_ext
15519LIBS=$ac_check_lib_save_LIBS
15520fi
5476a9a4
GM
15521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv___res_send" >&5
15522$as_echo "$ac_cv_lib_resolv___res_send" >&6; }
15523if test "x$ac_cv_lib_resolv___res_send" = x""yes; then :
15524 resolv=yes
067d23c9 15525fi
f199cab1 15526
5476a9a4 15527fi
1f5d53eb 15528
5476a9a4 15529fi
067d23c9 15530
067d23c9
KY
15531fi
15532
5476a9a4
GM
15533 if test "$resolv" = yes ; then
15534 RESOLVLIB=-lresolv
15535 else
15536 RESOLVLIB=
15537 fi
15538 ac_fn_c_check_func "$LINENO" "hes_getmailhost" "ac_cv_func_hes_getmailhost"
15539if test "x$ac_cv_func_hes_getmailhost" = x""yes; then :
15540
15541else
15542 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hes_getmailhost in -lhesiod" >&5
15543$as_echo_n "checking for hes_getmailhost in -lhesiod... " >&6; }
15544if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then :
15545 $as_echo_n "(cached) " >&6
15546else
15547 ac_check_lib_save_LIBS=$LIBS
15548LIBS="-lhesiod $RESOLVLIB $LIBS"
15549cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 15550/* end confdefs.h. */
5476a9a4
GM
15551
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 hes_getmailhost ();
067d23c9
KY
15559int
15560main ()
15561{
5476a9a4 15562return hes_getmailhost ();
067d23c9
KY
15563 ;
15564 return 0;
15565}
15566_ACEOF
f199cab1 15567if ac_fn_c_try_link "$LINENO"; then :
5476a9a4
GM
15568 ac_cv_lib_hesiod_hes_getmailhost=yes
15569else
15570 ac_cv_lib_hesiod_hes_getmailhost=no
067d23c9 15571fi
f199cab1
GM
15572rm -f core conftest.err conftest.$ac_objext \
15573 conftest$ac_exeext conftest.$ac_ext
5476a9a4 15574LIBS=$ac_check_lib_save_LIBS
067d23c9 15575fi
5476a9a4
GM
15576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5
15577$as_echo "$ac_cv_lib_hesiod_hes_getmailhost" >&6; }
15578if test "x$ac_cv_lib_hesiod_hes_getmailhost" = x""yes; then :
15579 hesiod=yes
15580else
15581 :
067d23c9
KY
15582fi
15583
c5a68906 15584fi
f199cab1
GM
15585
15586
5476a9a4 15587 if test x"$hesiod" = xyes; then
5476a9a4 15588 LIBHESIOD=-lhesiod
c5a68906 15589 fi
5476a9a4 15590fi
4fc2b746 15591
4fc2b746 15592
5476a9a4
GM
15593# Do we need libresolv (due to res_init or Hesiod)?
15594if test "$resolv" = yes && test $opsys != darwin; then
5476a9a4
GM
15595 LIBRESOLV=-lresolv
15596else
15597 LIBRESOLV=
15598fi
4fc2b746 15599
4fc2b746 15600
5476a9a4
GM
15601# These tell us which Kerberos-related libraries to use.
15602COM_ERRLIB=
15603CRYPTOLIB=
15604KRB5LIB=
15605DESLIB=
15606KRB4LIB=
4fc2b746 15607
5476a9a4
GM
15608if test "${with_kerberos}" != no; then
15609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for com_err in -lcom_err" >&5
15610$as_echo_n "checking for com_err in -lcom_err... " >&6; }
15611if test "${ac_cv_lib_com_err_com_err+set}" = set; then :
15612 $as_echo_n "(cached) " >&6
15613else
15614 ac_check_lib_save_LIBS=$LIBS
15615LIBS="-lcom_err $LIBS"
15616cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15617/* end confdefs.h. */
4fc2b746 15618
5476a9a4
GM
15619/* Override any GCC internal prototype to avoid an error.
15620 Use char because int might match the return type of a GCC
15621 builtin and then its argument prototype would still apply. */
15622#ifdef __cplusplus
15623extern "C"
15624#endif
15625char com_err ();
15626int
15627main ()
15628{
15629return com_err ();
15630 ;
15631 return 0;
15632}
15633_ACEOF
15634if ac_fn_c_try_link "$LINENO"; then :
15635 ac_cv_lib_com_err_com_err=yes
15636else
15637 ac_cv_lib_com_err_com_err=no
15638fi
15639rm -f core conftest.err conftest.$ac_objext \
15640 conftest$ac_exeext conftest.$ac_ext
15641LIBS=$ac_check_lib_save_LIBS
15642fi
15643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_com_err_com_err" >&5
15644$as_echo "$ac_cv_lib_com_err_com_err" >&6; }
15645if test "x$ac_cv_lib_com_err_com_err" = x""yes; then :
15646 have_com_err=yes
15647else
15648 have_com_err=no
15649fi
f199cab1 15650
5476a9a4
GM
15651 if test $have_com_err = yes; then
15652 COM_ERRLIB=-lcom_err
15653 LIBS="$COM_ERRLIB $LIBS"
5476a9a4
GM
15654 fi
15655 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lcrypto" >&5
15656$as_echo_n "checking for mit_des_cbc_encrypt in -lcrypto... " >&6; }
15657if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then :
15658 $as_echo_n "(cached) " >&6
15659else
15660 ac_check_lib_save_LIBS=$LIBS
15661LIBS="-lcrypto $LIBS"
15662cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15663/* end confdefs.h. */
f199cab1 15664
5476a9a4
GM
15665/* Override any GCC internal prototype to avoid an error.
15666 Use char because int might match the return type of a GCC
15667 builtin and then its argument prototype would still apply. */
15668#ifdef __cplusplus
15669extern "C"
15670#endif
15671char mit_des_cbc_encrypt ();
15672int
15673main ()
15674{
15675return mit_des_cbc_encrypt ();
15676 ;
15677 return 0;
15678}
15679_ACEOF
15680if ac_fn_c_try_link "$LINENO"; then :
15681 ac_cv_lib_crypto_mit_des_cbc_encrypt=yes
15682else
15683 ac_cv_lib_crypto_mit_des_cbc_encrypt=no
15684fi
15685rm -f core conftest.err conftest.$ac_objext \
15686 conftest$ac_exeext conftest.$ac_ext
15687LIBS=$ac_check_lib_save_LIBS
15688fi
15689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5
15690$as_echo "$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6; }
15691if test "x$ac_cv_lib_crypto_mit_des_cbc_encrypt" = x""yes; then :
15692 have_crypto=yes
15693else
15694 have_crypto=no
15695fi
f199cab1 15696
5476a9a4
GM
15697 if test $have_crypto = yes; then
15698 CRYPTOLIB=-lcrypto
15699 LIBS="$CRYPTOLIB $LIBS"
5476a9a4
GM
15700 fi
15701 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
15702$as_echo_n "checking for mit_des_cbc_encrypt in -lk5crypto... " >&6; }
15703if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then :
15704 $as_echo_n "(cached) " >&6
15705else
15706 ac_check_lib_save_LIBS=$LIBS
15707LIBS="-lk5crypto $LIBS"
15708cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15709/* end confdefs.h. */
f199cab1 15710
5476a9a4
GM
15711/* Override any GCC internal prototype to avoid an error.
15712 Use char because int might match the return type of a GCC
15713 builtin and then its argument prototype would still apply. */
15714#ifdef __cplusplus
15715extern "C"
15716#endif
15717char mit_des_cbc_encrypt ();
15718int
15719main ()
15720{
15721return mit_des_cbc_encrypt ();
15722 ;
15723 return 0;
15724}
15725_ACEOF
15726if ac_fn_c_try_link "$LINENO"; then :
15727 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes
15728else
15729 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no
15730fi
15731rm -f core conftest.err conftest.$ac_objext \
15732 conftest$ac_exeext conftest.$ac_ext
15733LIBS=$ac_check_lib_save_LIBS
15734fi
15735{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5
15736$as_echo "$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6; }
15737if test "x$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" = x""yes; then :
15738 have_k5crypto=yes
15739else
15740 have_k5crypto=no
4fc2b746 15741fi
4fc2b746 15742
5476a9a4
GM
15743 if test $have_k5crypto = yes; then
15744 CRYPTOLIB=-lk5crypto
15745 LIBS="$CRYPTOLIB $LIBS"
5476a9a4
GM
15746 fi
15747 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5_init_context in -lkrb5" >&5
15748$as_echo_n "checking for krb5_init_context in -lkrb5... " >&6; }
15749if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then :
15750 $as_echo_n "(cached) " >&6
15751else
15752 ac_check_lib_save_LIBS=$LIBS
15753LIBS="-lkrb5 $LIBS"
15754cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15755/* end confdefs.h. */
4fc2b746 15756
5476a9a4
GM
15757/* Override any GCC internal prototype to avoid an error.
15758 Use char because int might match the return type of a GCC
15759 builtin and then its argument prototype would still apply. */
15760#ifdef __cplusplus
15761extern "C"
15762#endif
15763char krb5_init_context ();
15764int
15765main ()
15766{
15767return krb5_init_context ();
15768 ;
15769 return 0;
15770}
15771_ACEOF
15772if ac_fn_c_try_link "$LINENO"; then :
15773 ac_cv_lib_krb5_krb5_init_context=yes
15774else
15775 ac_cv_lib_krb5_krb5_init_context=no
15776fi
15777rm -f core conftest.err conftest.$ac_objext \
15778 conftest$ac_exeext conftest.$ac_ext
15779LIBS=$ac_check_lib_save_LIBS
15780fi
15781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb5_krb5_init_context" >&5
15782$as_echo "$ac_cv_lib_krb5_krb5_init_context" >&6; }
15783if test "x$ac_cv_lib_krb5_krb5_init_context" = x""yes; then :
15784 have_krb5=yes
15785else
15786 have_krb5=no
15787fi
f199cab1 15788
5476a9a4
GM
15789 if test $have_krb5=yes; then
15790 KRB5LIB=-lkrb5
15791 LIBS="$KRB5LIB $LIBS"
5476a9a4
GM
15792 fi
15793 if test "${with_kerberos5}" = no; then
15794 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes425" >&5
15795$as_echo_n "checking for des_cbc_encrypt in -ldes425... " >&6; }
15796if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then :
f199cab1
GM
15797 $as_echo_n "(cached) " >&6
15798else
5476a9a4
GM
15799 ac_check_lib_save_LIBS=$LIBS
15800LIBS="-ldes425 $LIBS"
15801cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3e0be4ab 15802/* end confdefs.h. */
f199cab1 15803
5476a9a4
GM
15804/* Override any GCC internal prototype to avoid an error.
15805 Use char because int might match the return type of a GCC
15806 builtin and then its argument prototype would still apply. */
15807#ifdef __cplusplus
15808extern "C"
15809#endif
15810char des_cbc_encrypt ();
3e0be4ab
GM
15811int
15812main ()
15813{
5476a9a4 15814return des_cbc_encrypt ();
3e0be4ab
GM
15815 ;
15816 return 0;
15817}
15818_ACEOF
5476a9a4
GM
15819if ac_fn_c_try_link "$LINENO"; then :
15820 ac_cv_lib_des425_des_cbc_encrypt=yes
3e0be4ab 15821else
5476a9a4 15822 ac_cv_lib_des425_des_cbc_encrypt=no
3e0be4ab 15823fi
5476a9a4
GM
15824rm -f core conftest.err conftest.$ac_objext \
15825 conftest$ac_exeext conftest.$ac_ext
15826LIBS=$ac_check_lib_save_LIBS
4fc2b746 15827fi
5476a9a4
GM
15828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
15829$as_echo "$ac_cv_lib_des425_des_cbc_encrypt" >&6; }
15830if test "x$ac_cv_lib_des425_des_cbc_encrypt" = x""yes; then :
15831 have_des425=yes
15832else
15833 have_des425=no
f199cab1 15834fi
6c051bab 15835
5476a9a4
GM
15836 if test $have_des425 = yes; then
15837 DESLIB=-ldes425
15838 LIBS="$DESLIB $LIBS"
5476a9a4
GM
15839 else
15840 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes" >&5
15841$as_echo_n "checking for des_cbc_encrypt in -ldes... " >&6; }
15842if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then :
15843 $as_echo_n "(cached) " >&6
15844else
15845 ac_check_lib_save_LIBS=$LIBS
15846LIBS="-ldes $LIBS"
15847cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15848/* end confdefs.h. */
f199cab1 15849
5476a9a4
GM
15850/* Override any GCC internal prototype to avoid an error.
15851 Use char because int might match the return type of a GCC
15852 builtin and then its argument prototype would still apply. */
15853#ifdef __cplusplus
15854extern "C"
15855#endif
15856char des_cbc_encrypt ();
15857int
15858main ()
15859{
15860return des_cbc_encrypt ();
15861 ;
15862 return 0;
15863}
15864_ACEOF
15865if ac_fn_c_try_link "$LINENO"; then :
15866 ac_cv_lib_des_des_cbc_encrypt=yes
15867else
15868 ac_cv_lib_des_des_cbc_encrypt=no
15869fi
15870rm -f core conftest.err conftest.$ac_objext \
15871 conftest$ac_exeext conftest.$ac_ext
15872LIBS=$ac_check_lib_save_LIBS
15873fi
15874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
15875$as_echo "$ac_cv_lib_des_des_cbc_encrypt" >&6; }
15876if test "x$ac_cv_lib_des_des_cbc_encrypt" = x""yes; then :
15877 have_des=yes
15878else
15879 have_des=no
15880fi
f199cab1 15881
5476a9a4
GM
15882 if test $have_des = yes; then
15883 DESLIB=-ldes
15884 LIBS="$DESLIB $LIBS"
5476a9a4
GM
15885 fi
15886 fi
15887 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb4" >&5
15888$as_echo_n "checking for krb_get_cred in -lkrb4... " >&6; }
15889if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then :
942f733f
PE
15890 $as_echo_n "(cached) " >&6
15891else
5476a9a4
GM
15892 ac_check_lib_save_LIBS=$LIBS
15893LIBS="-lkrb4 $LIBS"
15894cat confdefs.h - <<_ACEOF >conftest.$ac_ext
942f733f 15895/* end confdefs.h. */
942f733f 15896
5476a9a4
GM
15897/* Override any GCC internal prototype to avoid an error.
15898 Use char because int might match the return type of a GCC
15899 builtin and then its argument prototype would still apply. */
15900#ifdef __cplusplus
15901extern "C"
15902#endif
15903char krb_get_cred ();
942f733f
PE
15904int
15905main ()
15906{
5476a9a4 15907return krb_get_cred ();
942f733f
PE
15908 ;
15909 return 0;
15910}
15911_ACEOF
5476a9a4
GM
15912if ac_fn_c_try_link "$LINENO"; then :
15913 ac_cv_lib_krb4_krb_get_cred=yes
15914else
15915 ac_cv_lib_krb4_krb_get_cred=no
15916fi
15917rm -f core conftest.err conftest.$ac_objext \
15918 conftest$ac_exeext conftest.$ac_ext
15919LIBS=$ac_check_lib_save_LIBS
15920fi
15921{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb4_krb_get_cred" >&5
15922$as_echo "$ac_cv_lib_krb4_krb_get_cred" >&6; }
15923if test "x$ac_cv_lib_krb4_krb_get_cred" = x""yes; then :
15924 have_krb4=yes
15925else
15926 have_krb4=no
15927fi
15928
15929 if test $have_krb4 = yes; then
15930 KRB4LIB=-lkrb4
15931 LIBS="$KRB4LIB $LIBS"
5476a9a4
GM
15932 else
15933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb" >&5
15934$as_echo_n "checking for krb_get_cred in -lkrb... " >&6; }
15935if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then :
15936 $as_echo_n "(cached) " >&6
3e0be4ab 15937else
5476a9a4
GM
15938 ac_check_lib_save_LIBS=$LIBS
15939LIBS="-lkrb $LIBS"
15940cat confdefs.h - <<_ACEOF >conftest.$ac_ext
942f733f 15941/* end confdefs.h. */
942f733f 15942
5476a9a4
GM
15943/* Override any GCC internal prototype to avoid an error.
15944 Use char because int might match the return type of a GCC
15945 builtin and then its argument prototype would still apply. */
15946#ifdef __cplusplus
15947extern "C"
15948#endif
15949char krb_get_cred ();
942f733f
PE
15950int
15951main ()
15952{
5476a9a4 15953return krb_get_cred ();
942f733f
PE
15954 ;
15955 return 0;
15956}
15957_ACEOF
5476a9a4
GM
15958if ac_fn_c_try_link "$LINENO"; then :
15959 ac_cv_lib_krb_krb_get_cred=yes
942f733f 15960else
5476a9a4 15961 ac_cv_lib_krb_krb_get_cred=no
942f733f 15962fi
5476a9a4
GM
15963rm -f core conftest.err conftest.$ac_objext \
15964 conftest$ac_exeext conftest.$ac_ext
15965LIBS=$ac_check_lib_save_LIBS
3e0be4ab 15966fi
5476a9a4
GM
15967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb_krb_get_cred" >&5
15968$as_echo "$ac_cv_lib_krb_krb_get_cred" >&6; }
15969if test "x$ac_cv_lib_krb_krb_get_cred" = x""yes; then :
15970 have_krb=yes
15971else
15972 have_krb=no
942f733f 15973fi
f199cab1 15974
5476a9a4
GM
15975 if test $have_krb = yes; then
15976 KRB4LIB=-lkrb
15977 LIBS="$KRB4LIB $LIBS"
5476a9a4
GM
15978 fi
15979 fi
f199cab1
GM
15980 fi
15981
5476a9a4
GM
15982 if test "${with_kerberos5}" != no; then
15983 for ac_header in krb5.h
15984do :
15985 ac_fn_c_check_header_mongrel "$LINENO" "krb5.h" "ac_cv_header_krb5_h" "$ac_includes_default"
15986if test "x$ac_cv_header_krb5_h" = x""yes; then :
15987 cat >>confdefs.h <<_ACEOF
15988#define HAVE_KRB5_H 1
15989_ACEOF
15990 ac_fn_c_check_member "$LINENO" "krb5_error" "text" "ac_cv_member_krb5_error_text" "#include <krb5.h>
15991"
15992if test "x$ac_cv_member_krb5_error_text" = x""yes; then :
15993
f199cab1 15994cat >>confdefs.h <<_ACEOF
5476a9a4 15995#define HAVE_KRB5_ERROR_TEXT 1
f199cab1
GM
15996_ACEOF
15997
15998
5476a9a4
GM
15999fi
16000ac_fn_c_check_member "$LINENO" "krb5_error" "e_text" "ac_cv_member_krb5_error_e_text" "#include <krb5.h>
16001"
16002if test "x$ac_cv_member_krb5_error_e_text" = x""yes; then :
f199cab1 16003
5476a9a4
GM
16004cat >>confdefs.h <<_ACEOF
16005#define HAVE_KRB5_ERROR_E_TEXT 1
16006_ACEOF
f199cab1
GM
16007
16008
5476a9a4 16009fi
f199cab1 16010
5476a9a4 16011fi
f199cab1 16012
5476a9a4 16013done
f199cab1 16014
5476a9a4 16015 else
5476a9a4 16016 for ac_header in krb.h
f199cab1 16017do :
5476a9a4
GM
16018 ac_fn_c_check_header_mongrel "$LINENO" "krb.h" "ac_cv_header_krb_h" "$ac_includes_default"
16019if test "x$ac_cv_header_krb_h" = x""yes; then :
f199cab1 16020 cat >>confdefs.h <<_ACEOF
5476a9a4
GM
16021#define HAVE_KRB_H 1
16022_ACEOF
16023
16024else
16025 for ac_header in kerberosIV/krb.h
16026do :
16027 ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/krb.h" "ac_cv_header_kerberosIV_krb_h" "$ac_includes_default"
16028if test "x$ac_cv_header_kerberosIV_krb_h" = x""yes; then :
16029 cat >>confdefs.h <<_ACEOF
16030#define HAVE_KERBEROSIV_KRB_H 1
16031_ACEOF
16032
16033else
16034 for ac_header in kerberos/krb.h
16035do :
16036 ac_fn_c_check_header_mongrel "$LINENO" "kerberos/krb.h" "ac_cv_header_kerberos_krb_h" "$ac_includes_default"
16037if test "x$ac_cv_header_kerberos_krb_h" = x""yes; then :
16038 cat >>confdefs.h <<_ACEOF
16039#define HAVE_KERBEROS_KRB_H 1
f199cab1 16040_ACEOF
942f733f 16041
3e0be4ab 16042fi
942f733f 16043
f199cab1
GM
16044done
16045
5476a9a4
GM
16046fi
16047
16048done
16049
16050fi
16051
16052done
16053
16054 fi
16055 for ac_header in com_err.h
f199cab1 16056do :
5476a9a4
GM
16057 ac_fn_c_check_header_mongrel "$LINENO" "com_err.h" "ac_cv_header_com_err_h" "$ac_includes_default"
16058if test "x$ac_cv_header_com_err_h" = x""yes; then :
f199cab1 16059 cat >>confdefs.h <<_ACEOF
5476a9a4 16060#define HAVE_COM_ERR_H 1
f199cab1
GM
16061_ACEOF
16062
3e0be4ab 16063fi
f199cab1 16064
5476a9a4 16065done
3e0be4ab
GM
16066
16067fi
16068
f199cab1
GM
16069
16070
16071
16072
f199cab1
GM
16073
16074
16075
16076
16077
5476a9a4
GM
16078 for ac_func in $ac_func_list
16079do :
16080 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16081ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16082eval as_val=\$$as_ac_var
16083 if test "x$as_val" = x""yes; then :
16084 cat >>confdefs.h <<_ACEOF
16085#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16086_ACEOF
16087
16088fi
16089done
16090
f199cab1
GM
16091
16092
16093
5476a9a4
GM
16094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime caches TZ" >&5
16095$as_echo_n "checking whether localtime caches TZ... " >&6; }
16096if test "${emacs_cv_localtime_cache+set}" = set; then :
16097 $as_echo_n "(cached) " >&6
16098else
16099 if test x$ac_cv_func_tzset = xyes; then
16100if test "$cross_compiling" = yes; then :
16101 # If we have tzset, assume the worst when cross-compiling.
16102emacs_cv_localtime_cache=yes
16103else
16104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16105/* end confdefs.h. */
16106#include <time.h>
16107char TZ_GMT0[] = "TZ=GMT0";
16108char TZ_PST8[] = "TZ=PST8";
16109main()
16110{
16111 time_t now = time ((time_t *) 0);
16112 int hour_GMT0, hour_unset;
16113 if (putenv (TZ_GMT0) != 0)
16114 exit (1);
16115 hour_GMT0 = localtime (&now)->tm_hour;
16116 unsetenv("TZ");
16117 hour_unset = localtime (&now)->tm_hour;
16118 if (putenv (TZ_PST8) != 0)
16119 exit (1);
16120 if (localtime (&now)->tm_hour == hour_GMT0)
16121 exit (1);
16122 unsetenv("TZ");
16123 if (localtime (&now)->tm_hour != hour_unset)
16124 exit (1);
16125 exit (0);
16126}
16127_ACEOF
16128if ac_fn_c_try_run "$LINENO"; then :
16129 emacs_cv_localtime_cache=no
16130else
16131 emacs_cv_localtime_cache=yes
16132fi
16133rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16134 conftest.$ac_objext conftest.beam conftest.$ac_ext
16135fi
f199cab1 16136
5476a9a4
GM
16137else
16138 # If we lack tzset, report that localtime does not cache TZ,
16139 # since we can't invalidate the cache if we don't have tzset.
16140 emacs_cv_localtime_cache=no
16141fi
16142fi
16143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_localtime_cache" >&5
16144$as_echo "$emacs_cv_localtime_cache" >&6; }
16145if test $emacs_cv_localtime_cache = yes; then
f199cab1 16146
5476a9a4 16147$as_echo "#define LOCALTIME_CACHE 1" >>confdefs.h
f199cab1 16148
5476a9a4 16149fi
f199cab1 16150
5476a9a4
GM
16151ok_so_far=yes
16152ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket"
16153if test "x$ac_cv_func_socket" = x""yes; then :
3e0be4ab 16154
5476a9a4
GM
16155else
16156 ok_so_far=no
16157fi
f199cab1 16158
5476a9a4
GM
16159if test $ok_so_far = yes; then
16160 ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
16161if test "x$ac_cv_header_netinet_in_h" = x""yes; then :
f199cab1 16162
5476a9a4
GM
16163else
16164 ok_so_far=no
16165fi
f199cab1
GM
16166
16167
5476a9a4
GM
16168fi
16169if test $ok_so_far = yes; then
16170 ac_fn_c_check_header_mongrel "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default"
16171if test "x$ac_cv_header_arpa_inet_h" = x""yes; then :
f199cab1 16172
5476a9a4
GM
16173else
16174 ok_so_far=no
16175fi
f199cab1
GM
16176
16177
5476a9a4
GM
16178fi
16179if test $ok_so_far = yes; then
f199cab1 16180
5476a9a4 16181$as_echo "#define HAVE_INET_SOCKETS 1" >>confdefs.h
f199cab1 16182
5476a9a4 16183fi
f199cab1 16184
bb7dce39
GM
16185case $canonical in
16186 *-solaris2.4 | *-solaris2.4.*)
16187 : ${ac_cv_func_vfork_works=no};;
16188esac
16189
5476a9a4
GM
16190ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
16191if test "x$ac_cv_type_pid_t" = x""yes; then :
3e0be4ab 16192
5476a9a4 16193else
3e0be4ab 16194
5476a9a4
GM
16195cat >>confdefs.h <<_ACEOF
16196#define pid_t int
16197_ACEOF
f199cab1 16198
5476a9a4 16199fi
f199cab1 16200
5476a9a4
GM
16201for ac_header in vfork.h
16202do :
16203 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
16204if test "x$ac_cv_header_vfork_h" = x""yes; then :
16205 cat >>confdefs.h <<_ACEOF
16206#define HAVE_VFORK_H 1
16207_ACEOF
f199cab1 16208
5476a9a4 16209fi
f199cab1 16210
5476a9a4 16211done
f199cab1 16212
5476a9a4
GM
16213for ac_func in fork vfork
16214do :
16215 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16216ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16217eval as_val=\$$as_ac_var
16218 if test "x$as_val" = x""yes; then :
16219 cat >>confdefs.h <<_ACEOF
16220#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16221_ACEOF
f199cab1 16222
5476a9a4
GM
16223fi
16224done
f199cab1 16225
5476a9a4
GM
16226if test "x$ac_cv_func_fork" = xyes; then
16227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
16228$as_echo_n "checking for working fork... " >&6; }
16229if test "${ac_cv_func_fork_works+set}" = set; then :
16230 $as_echo_n "(cached) " >&6
16231else
16232 if test "$cross_compiling" = yes; then :
16233 ac_cv_func_fork_works=cross
16234else
16235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16236/* end confdefs.h. */
16237$ac_includes_default
16238int
16239main ()
16240{
f199cab1 16241
5476a9a4
GM
16242 /* By Ruediger Kuhlmann. */
16243 return fork () < 0;
f199cab1 16244
5476a9a4
GM
16245 ;
16246 return 0;
16247}
16248_ACEOF
16249if ac_fn_c_try_run "$LINENO"; then :
16250 ac_cv_func_fork_works=yes
16251else
16252 ac_cv_func_fork_works=no
16253fi
16254rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16255 conftest.$ac_objext conftest.beam conftest.$ac_ext
16256fi
f199cab1 16257
5476a9a4
GM
16258fi
16259{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
16260$as_echo "$ac_cv_func_fork_works" >&6; }
f199cab1 16261
5476a9a4
GM
16262else
16263 ac_cv_func_fork_works=$ac_cv_func_fork
16264fi
16265if test "x$ac_cv_func_fork_works" = xcross; then
16266 case $host in
16267 *-*-amigaos* | *-*-msdosdjgpp*)
16268 # Override, as these systems have only a dummy fork() stub
16269 ac_cv_func_fork_works=no
16270 ;;
16271 *)
16272 ac_cv_func_fork_works=yes
16273 ;;
16274 esac
16275 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
16276$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
16277fi
16278ac_cv_func_vfork_works=$ac_cv_func_vfork
16279if test "x$ac_cv_func_vfork" = xyes; then
16280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
16281$as_echo_n "checking for working vfork... " >&6; }
16282if test "${ac_cv_func_vfork_works+set}" = set; then :
f199cab1
GM
16283 $as_echo_n "(cached) " >&6
16284else
16285 if test "$cross_compiling" = yes; then :
5476a9a4 16286 ac_cv_func_vfork_works=cross
f199cab1
GM
16287else
16288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16289/* end confdefs.h. */
5476a9a4
GM
16290/* Thanks to Paul Eggert for this test. */
16291$ac_includes_default
16292#include <sys/wait.h>
16293#ifdef HAVE_VFORK_H
16294# include <vfork.h>
f199cab1 16295#endif
5476a9a4
GM
16296/* On some sparc systems, changes by the child to local and incoming
16297 argument registers are propagated back to the parent. The compiler
16298 is told about this with #include <vfork.h>, but some compilers
16299 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
16300 static variable whose address is put into a register that is
16301 clobbered by the vfork. */
16302static void
16303#ifdef __cplusplus
16304sparc_address_test (int arg)
16305# else
16306sparc_address_test (arg) int arg;
f199cab1 16307#endif
5476a9a4
GM
16308{
16309 static pid_t child;
16310 if (!child) {
16311 child = vfork ();
16312 if (child < 0) {
16313 perror ("vfork");
16314 _exit(2);
16315 }
16316 if (!child) {
16317 arg = getpid();
16318 write(-1, "", 0);
16319 _exit (arg);
16320 }
16321 }
16322}
f199cab1 16323
5476a9a4
GM
16324int
16325main ()
16326{
16327 pid_t parent = getpid ();
16328 pid_t child;
f199cab1 16329
5476a9a4 16330 sparc_address_test (0);
f199cab1 16331
5476a9a4 16332 child = vfork ();
3e0be4ab 16333
5476a9a4
GM
16334 if (child == 0) {
16335 /* Here is another test for sparc vfork register problems. This
16336 test uses lots of local variables, at least as many local
16337 variables as main has allocated so far including compiler
16338 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
16339 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
16340 reuse the register of parent for one of the local variables,
16341 since it will think that parent can't possibly be used any more
16342 in this routine. Assigning to the local variable will thus
16343 munge parent in the parent process. */
16344 pid_t
16345 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
16346 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
16347 /* Convince the compiler that p..p7 are live; otherwise, it might
16348 use the same hardware register for all 8 local variables. */
16349 if (p != p1 || p != p2 || p != p3 || p != p4
16350 || p != p5 || p != p6 || p != p7)
16351 _exit(1);
3e0be4ab 16352
5476a9a4
GM
16353 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
16354 from child file descriptors. If the child closes a descriptor
16355 before it execs or exits, this munges the parent's descriptor
16356 as well. Test for this by closing stdout in the child. */
16357 _exit(close(fileno(stdout)) != 0);
16358 } else {
16359 int status;
16360 struct stat st;
3e0be4ab 16361
5476a9a4
GM
16362 while (wait(&status) != child)
16363 ;
16364 return (
16365 /* Was there some problem with vforking? */
16366 child < 0
3e0be4ab 16367
5476a9a4
GM
16368 /* Did the child fail? (This shouldn't happen.) */
16369 || status
16370
16371 /* Did the vfork/compiler bug occur? */
16372 || parent != getpid()
16373
16374 /* Did the file descriptor bug occur? */
16375 || fstat(fileno(stdout), &st) != 0
16376 );
16377 }
f199cab1 16378}
5476a9a4
GM
16379_ACEOF
16380if ac_fn_c_try_run "$LINENO"; then :
16381 ac_cv_func_vfork_works=yes
16382else
16383 ac_cv_func_vfork_works=no
16384fi
16385rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16386 conftest.$ac_objext conftest.beam conftest.$ac_ext
16387fi
16388
16389fi
16390{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
16391$as_echo "$ac_cv_func_vfork_works" >&6; }
16392
16393fi;
16394if test "x$ac_cv_func_fork_works" = xcross; then
16395 ac_cv_func_vfork_works=$ac_cv_func_vfork
16396 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
16397$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
16398fi
16399
16400if test "x$ac_cv_func_vfork_works" = xyes; then
3e0be4ab 16401
5476a9a4 16402$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
3e0be4ab 16403
5476a9a4 16404else
3e0be4ab 16405
5476a9a4 16406$as_echo "#define vfork fork" >>confdefs.h
942f733f 16407
5476a9a4
GM
16408fi
16409if test "x$ac_cv_func_fork_works" = xyes; then
942f733f 16410
5476a9a4 16411$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
942f733f 16412
5476a9a4 16413fi
f199cab1 16414
f199cab1 16415
5476a9a4
GM
16416for ac_func in snprintf
16417do :
16418 ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
16419if test "x$ac_cv_func_snprintf" = x""yes; then :
16420 cat >>confdefs.h <<_ACEOF
16421#define HAVE_SNPRINTF 1
16422_ACEOF
16423
16424fi
16425done
16426
942f733f 16427
0f55a32e
GM
16428XGSELOBJ=
16429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether GLib is linked in" >&5
16430$as_echo_n "checking whether GLib is linked in... " >&6; }
16431cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16432/* end confdefs.h. */
16433#include <glib.h>
16434
16435int
16436main ()
16437{
16438g_print ("Hello world");
16439 ;
16440 return 0;
16441}
16442_ACEOF
16443if ac_fn_c_try_link "$LINENO"; then :
16444 links_glib=yes
16445else
16446 links_glib=no
16447fi
16448rm -f core conftest.err conftest.$ac_objext \
16449 conftest$ac_exeext conftest.$ac_ext
16450{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $links_glib" >&5
16451$as_echo "$links_glib" >&6; }
16452if test "${links_glib}" = "yes"; then
16453
16454$as_echo "#define HAVE_GLIB 1" >>confdefs.h
16455
7cee6e79
GM
16456 if test "$HAVE_NS" = no;then
16457 XGSELOBJ=xgselect.o
16458 fi
0f55a32e
GM
16459fi
16460
16461
5476a9a4
GM
16462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
16463$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
16464if test "${emacs_cv_langinfo_codeset+set}" = set; then :
16465 $as_echo_n "(cached) " >&6
16466else
16467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16468/* end confdefs.h. */
16469#include <langinfo.h>
3e0be4ab
GM
16470int
16471main ()
16472{
5476a9a4
GM
16473char* cs = nl_langinfo(CODESET);
16474 ;
16475 return 0;
16476}
16477_ACEOF
16478if ac_fn_c_try_link "$LINENO"; then :
16479 emacs_cv_langinfo_codeset=yes
16480else
16481 emacs_cv_langinfo_codeset=no
16482fi
16483rm -f core conftest.err conftest.$ac_objext \
16484 conftest$ac_exeext conftest.$ac_ext
f199cab1 16485
5476a9a4
GM
16486fi
16487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_langinfo_codeset" >&5
16488$as_echo "$emacs_cv_langinfo_codeset" >&6; }
16489if test $emacs_cv_langinfo_codeset = yes; then
f199cab1 16490
5476a9a4 16491$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
f199cab1 16492
5476a9a4 16493fi
f199cab1 16494
5476a9a4
GM
16495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
16496$as_echo_n "checking for mbstate_t... " >&6; }
16497if test "${ac_cv_type_mbstate_t+set}" = set; then :
16498 $as_echo_n "(cached) " >&6
16499else
16500 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16501/* end confdefs.h. */
16502$ac_includes_default
16503# include <wchar.h>
16504int
16505main ()
16506{
16507mbstate_t x; return sizeof x;
16508 ;
16509 return 0;
3e0be4ab 16510}
942f733f 16511_ACEOF
5476a9a4
GM
16512if ac_fn_c_try_compile "$LINENO"; then :
16513 ac_cv_type_mbstate_t=yes
3e0be4ab 16514else
5476a9a4 16515 ac_cv_type_mbstate_t=no
942f733f 16516fi
5476a9a4 16517rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3e0be4ab 16518fi
5476a9a4
GM
16519{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
16520$as_echo "$ac_cv_type_mbstate_t" >&6; }
16521 if test $ac_cv_type_mbstate_t = yes; then
f199cab1 16522
5476a9a4 16523$as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
f199cab1 16524
5476a9a4 16525 else
f199cab1 16526
5476a9a4 16527$as_echo "#define mbstate_t int" >>confdefs.h
f199cab1 16528
5476a9a4
GM
16529 fi
16530
16531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C restricted array declarations" >&5
16532$as_echo_n "checking for C restricted array declarations... " >&6; }
16533if test "${emacs_cv_c_restrict_arr+set}" = set; then :
16534 $as_echo_n "(cached) " >&6
16535else
16536 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16537/* end confdefs.h. */
16538void fred (int x[__restrict]);
16539int
16540main ()
16541{
16542
16543 ;
16544 return 0;
16545}
16546_ACEOF
16547if ac_fn_c_try_compile "$LINENO"; then :
16548 emacs_cv_c_restrict_arr=yes
16549else
16550 emacs_cv_c_restrict_arr=no
16551fi
16552rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16553fi
16554{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_c_restrict_arr" >&5
16555$as_echo "$emacs_cv_c_restrict_arr" >&6; }
16556if test "$emacs_cv_c_restrict_arr" = yes; then
f199cab1 16557
5476a9a4 16558$as_echo "#define __restrict_arr __restrict" >>confdefs.h
f199cab1 16559
5476a9a4 16560fi
f199cab1
GM
16561
16562
7c61eaab 16563if test "${opsys}" != "mingw32"; then
f199cab1 16564
8ad96b1d
GM
16565$as_echo "#define AMPERSAND_FULL_NAME 1" >>confdefs.h
16566
7c61eaab 16567fi
8ad96b1d
GM
16568
16569
5476a9a4 16570$as_echo "#define CLASH_DETECTION 1" >>confdefs.h
f199cab1
GM
16571
16572
5476a9a4 16573## Note: PTYs are broken on darwin <6. Use at your own risk.
7c61eaab 16574if test "${opsys}" != "mingw32"; then
f199cab1 16575
5476a9a4 16576$as_echo "#define HAVE_PTYS 1" >>confdefs.h
f199cab1 16577
7c61eaab 16578fi
f199cab1
GM
16579
16580
5476a9a4 16581$as_echo "#define HAVE_SOCKETS 1" >>confdefs.h
f199cab1 16582
942f733f 16583
942f733f 16584
6b10626d
GM
16585
16586
7c61eaab
GM
16587if test "${opsys}" = "mingw32"; then
16588 $as_echo "#define NULL_DEVICE \"NUL:\"" >>confdefs.h
16589
16590else
16591 $as_echo "#define NULL_DEVICE \"/dev/null\"" >>confdefs.h
16592
16593fi
8ad96b1d
GM
16594
16595
7c61eaab
GM
16596if test "${opsys}" = "mingw32"; then
16597 $as_echo "#define SEPCHAR ';'" >>confdefs.h
8ad96b1d 16598
7c61eaab
GM
16599else
16600 $as_echo "#define SEPCHAR ':'" >>confdefs.h
8ad96b1d 16601
7c61eaab 16602fi
8ad96b1d
GM
16603
16604
16605$as_echo "#define subprocesses 1" >>confdefs.h
16606
16607
16608
16609$as_echo "#define USER_FULL_NAME pw->pw_gecos" >>confdefs.h
16610
16611
16612
942f733f 16613
9ff736dc
GM
16614$as_echo "#define DIRECTORY_SEP '/'" >>confdefs.h
16615
16616
7c61eaab 16617if test "${opsys}" = "mingw32"; then
7c61eaab 16618
db7863f4 16619$as_echo "#define IS_DEVICE_SEP(_c_) ((_c_) == ':')" >>confdefs.h
f199cab1 16620
6b10626d 16621
7c61eaab
GM
16622
16623$as_echo "#define IS_DIRECTORY_SEP(_c_) ((_c_) == '/' || (_c_) == '\\\\')" >>confdefs.h
16624
16625
16626
16627$as_echo "#define IS_ANY_SEP(_c_) (IS_DIRECTORY_SEP (_c_) || IS_DEVICE_SEP(_c_))" >>confdefs.h
16628
16629else
16630
6b10626d
GM
16631$as_echo "#define IS_DEVICE_SEP(_c_) 0" >>confdefs.h
16632
16633
16634
16635$as_echo "#define IS_DIRECTORY_SEP(_c_) ((_c_) == DIRECTORY_SEP)" >>confdefs.h
16636
16637
16638
16639$as_echo "#define IS_ANY_SEP(_c_) (IS_DIRECTORY_SEP (_c_))" >>confdefs.h
16640
7c61eaab 16641fi
6b10626d
GM
16642
16643
16644
5476a9a4
GM
16645case $opsys in
16646 aix4-2)
16647 if test x$ac_cv_lib_Xmu_XmuConvertStandardSelection != xyes; then
16648 $as_echo "#define NO_EDITRES 1" >>confdefs.h
f199cab1 16649
5476a9a4
GM
16650 fi
16651 ;;
f199cab1 16652
5476a9a4
GM
16653 hpux*)
16654 $as_echo "#define NO_EDITRES 1" >>confdefs.h
f199cab1 16655
5476a9a4
GM
16656 ;;
16657esac
f199cab1
GM
16658
16659
5476a9a4 16660case $opsys in
5476a9a4 16661 irix6-5 | sol2* | unixware )
f199cab1 16662
5476a9a4 16663$as_echo "#define NSIG_MINIMUM 32" >>confdefs.h
f199cab1 16664
5476a9a4
GM
16665 ;;
16666esac
f199cab1 16667
4fa92495 16668emacs_broken_SIGIO=no
f199cab1 16669
5476a9a4 16670case $opsys in
ffeb6dec 16671 hpux* | irix6-5 | openbsd | sol2* | unixware )
4fa92495 16672 emacs_broken_SIGIO=yes
5476a9a4 16673 ;;
f199cab1 16674
5476a9a4 16675 aix4-2)
f199cab1 16676
5476a9a4 16677$as_echo "#define BROKEN_GET_CURRENT_DIR_NAME 1" >>confdefs.h
067d23c9 16678
5476a9a4 16679 ;;
067d23c9 16680
5476a9a4 16681 freebsd)
f199cab1 16682
5476a9a4 16683$as_echo "#define BROKEN_PTY_READ_AFTER_EAGAIN 1" >>confdefs.h
f199cab1 16684
5476a9a4 16685 ;;
5476a9a4 16686esac
f199cab1 16687
5476a9a4
GM
16688case $opsys in
16689 gnu-* | sol2-10 )
f199cab1 16690
5476a9a4 16691$as_echo "#define HAVE_PROCFS 1" >>confdefs.h
f199cab1 16692
5476a9a4
GM
16693 ;;
16694esac
f199cab1 16695
5476a9a4 16696case $opsys in
87e1a811 16697 darwin | dragonfly | freebsd | netbsd | openbsd )
f199cab1 16698
5476a9a4 16699$as_echo "#define DONT_REOPEN_PTY 1" >>confdefs.h
f199cab1 16700
5476a9a4
GM
16701 ;;
16702esac
f199cab1 16703
5476a9a4
GM
16704case $opsys in
16705 netbsd | openbsd) sound_device="/dev/audio" ;;
16706 *) sound_device="/dev/dsp" ;;
16707esac
f199cab1 16708
f199cab1 16709
5476a9a4
GM
16710cat >>confdefs.h <<_ACEOF
16711#define DEFAULT_SOUND_DEVICE "$sound_device"
16712_ACEOF
f199cab1
GM
16713
16714
16715
5476a9a4
GM
16716case $opsys in
16717 darwin | gnu-linux | gnu-kfreebsd )
f199cab1 16718
5476a9a4 16719$as_echo "#define INTERRUPT_INPUT 1" >>confdefs.h
f199cab1 16720
5476a9a4
GM
16721 ;;
16722esac
f199cab1 16723
f199cab1 16724
5476a9a4
GM
16725case $opsys in
16726 cygwin|gnu|gnu-linux|gnu-kfreebsd|irix6-5|freebsd|netbsd|openbsd)
f199cab1 16727
5476a9a4 16728$as_echo "#define NARROWPROTO 1" >>confdefs.h
067d23c9 16729
5476a9a4
GM
16730 ;;
16731esac
f199cab1
GM
16732
16733
067d23c9 16734
1f5d53eb
PE
16735
16736
f199cab1 16737
f199cab1 16738
7d2a1c5e 16739
5476a9a4
GM
16740case $opsys in
16741 aix4-2 )
a09508f2 16742 $as_echo "#define PTY_ITERATION int c; for (c = 0; !c ; c++)" >>confdefs.h
f199cab1 16743
a09508f2 16744 $as_echo "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptc\");" >>confdefs.h
f199cab1 16745
a09508f2 16746 $as_echo "#define PTY_TTY_NAME_SPRINTF strcpy (pty_name, ttyname (fd));" >>confdefs.h
7d2a1c5e 16747
5476a9a4 16748 ;;
7d2a1c5e 16749
5476a9a4 16750 cygwin )
a09508f2 16751 $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++)" >>confdefs.h
7d2a1c5e 16752
843f2634 16753 $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 16754
a09508f2 16755 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
7d2a1c5e 16756
a09508f2 16757 $as_echo "#define PTY_TTY_NAME_SPRINTF /**/" >>confdefs.h
f199cab1 16758
5476a9a4 16759 ;;
f199cab1 16760
1146da8d 16761 darwin )
a09508f2 16762 $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++)" >>confdefs.h
7d2a1c5e 16763
5476a9a4 16764 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
7d2a1c5e 16765
a09508f2 16766 $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 16767
a09508f2 16768 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
f199cab1 16769
a09508f2 16770 $as_echo "#define PTY_TTY_NAME_SPRINTF /**/" >>confdefs.h
f199cab1 16771
5476a9a4 16772 ;;
f199cab1 16773
1146da8d 16774 gnu | openbsd )
5476a9a4 16775 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
f199cab1 16776
5476a9a4 16777 ;;
f199cab1 16778
87e1a811 16779 gnu-linux | gnu-kfreebsd | dragonfly | freebsd | netbsd )
5476a9a4 16780 if test "x$ac_cv_func_grantpt" = xyes; then
f199cab1 16781
5476a9a4 16782$as_echo "#define UNIX98_PTYS 1" >>confdefs.h
f199cab1 16783
a09508f2 16784 $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++)" >>confdefs.h
f199cab1 16785
75bdb32a 16786 $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) { emacs_close (fd); return -1; } snprintf (pty_name, PTY_NAME_SIZE, \"%s\", ptyname); }" >>confdefs.h
f199cab1 16787
1146da8d 16788 if test "x$ac_cv_func_posix_openpt" = xyes; then
df391f9b 16789 $as_echo "#define PTY_OPEN do { fd = posix_openpt (O_RDWR | O_CLOEXEC | O_NOCTTY); if (fd < 0 && errno == EINVAL) fd = posix_openpt (O_RDWR | O_NOCTTY); } while (0)" >>confdefs.h
1146da8d
GM
16790
16791 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
16792
16793 elif test "x$ac_cv_func_getpt" = xyes; then
5476a9a4 16794 $as_echo "#define PTY_OPEN fd = getpt ()" >>confdefs.h
f199cab1 16795
a09508f2 16796 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
f199cab1 16797
5476a9a4 16798 else
a09508f2 16799 $as_echo "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptmx\");" >>confdefs.h
f199cab1 16800
5476a9a4
GM
16801 fi
16802 else
16803 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
f199cab1 16804
5476a9a4
GM
16805 fi
16806 ;;
f199cab1 16807
5476a9a4
GM
16808 hpux*)
16809 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
f199cab1 16810
a09508f2 16811 $as_echo "#define PTY_NAME_SPRINTF sprintf (pty_name, \"/dev/ptym/pty%c%x\", c, i);" >>confdefs.h
f199cab1 16812
a09508f2 16813 $as_echo "#define PTY_TTY_NAME_SPRINTF sprintf (pty_name, \"/dev/pty/tty%c%x\", c, i);" >>confdefs.h
f199cab1 16814
5476a9a4 16815 ;;
f199cab1 16816
5476a9a4
GM
16817 irix6-5 )
16818 $as_echo "#define PTY_ITERATION /**/" >>confdefs.h
f199cab1 16819
5476a9a4 16820 $as_echo "#define FIRST_PTY_LETTER 'q'" >>confdefs.h
f199cab1 16821
e4184a20 16822 $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 16823
a09508f2 16824 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
f199cab1 16825
a09508f2 16826 $as_echo "#define PTY_TTY_NAME_SPRINTF /**/" >>confdefs.h
f199cab1 16827
5476a9a4 16828 ;;
f199cab1 16829
5476a9a4 16830 sol2* )
75bdb32a 16831 $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, PTY_NAME_SIZE, \"%s\", ptyname); }" >>confdefs.h
f199cab1 16832
5476a9a4 16833 ;;
f199cab1 16834
5476a9a4 16835 unixware )
75bdb32a 16836 $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, PTY_NAME_SIZE, \"%s\", ptyname); }" >>confdefs.h
5476a9a4
GM
16837
16838 ;;
16839esac
16840
16841
16842case $opsys in
16843 sol2* | unixware )
16844 $as_echo "#define FIRST_PTY_LETTER 'z'" >>confdefs.h
16845
a09508f2 16846 $as_echo "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptmx\");" >>confdefs.h
5476a9a4
GM
16847
16848
16849$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
16850
16851 ;;
16852esac
16853
16854
16855
16856
16857case $opsys in
87e1a811 16858 aix4-2 | cygwin | gnu | irix6-5 | dragonfly | freebsd | netbsd | openbsd | darwin )
5476a9a4
GM
16859 $as_echo "#define SIGNALS_VIA_CHARACTERS 1" >>confdefs.h
16860
16861 ;;
16862
16863 gnu-linux | gnu-kfreebsd )
16864
16865 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signals via characters" >&5
16866$as_echo_n "checking for signals via characters... " >&6; }
16867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1f5d53eb 16868/* end confdefs.h. */
5476a9a4
GM
16869
16870#include <linux/version.h>
16871#if LINUX_VERSION_CODE < 0x20400
16872# error "Linux version too old"
16873#endif
16874
3e0be4ab
GM
16875int
16876main ()
16877{
f199cab1 16878
3e0be4ab
GM
16879 ;
16880 return 0;
16881}
067d23c9 16882_ACEOF
5476a9a4
GM
16883if ac_fn_c_try_cpp "$LINENO"; then :
16884 emacs_signals_via_chars=yes
1f5d53eb 16885else
5476a9a4 16886 emacs_signals_via_chars=no
067d23c9 16887fi
5476a9a4 16888rm -f conftest.err conftest.$ac_ext
067d23c9 16889
5476a9a4
GM
16890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_signals_via_chars" >&5
16891$as_echo "$emacs_signals_via_chars" >&6; }
16892 test $emacs_signals_via_chars = yes && $as_echo "#define SIGNALS_VIA_CHARACTERS 1" >>confdefs.h
16893
16894 ;;
16895esac
16896
16897
16898
16899
5476a9a4 16900case $opsys in
0f63df79 16901 aix*)
ce9ae7ca 16902 $as_echo "#define DATA_SEG_BITS 0x20000000" >>confdefs.h
0f63df79
GM
16903
16904 ;;
5476a9a4 16905 hpux*)
ce9ae7ca 16906 $as_echo "#define DATA_SEG_BITS 0x40000000" >>confdefs.h
067d23c9 16907
5476a9a4
GM
16908 ;;
16909 irix6-5)
5476a9a4 16910 $as_echo "#define DATA_SEG_BITS 0x10000000" >>confdefs.h
067d23c9 16911
5476a9a4
GM
16912 ;;
16913esac
067d23c9 16914
1f5d53eb 16915
1f5d53eb 16916
067d23c9 16917
5476a9a4
GM
16918case $opsys in
16919 darwin) $as_echo "#define TAB3 OXTABS" >>confdefs.h
16920 ;;
f199cab1 16921
87e1a811 16922 gnu | dragonfly | freebsd | netbsd | openbsd )
f199cab1 16923
5476a9a4 16924$as_echo "#define TABDLY OXTABS" >>confdefs.h
f199cab1 16925
5476a9a4 16926 $as_echo "#define TAB3 OXTABS" >>confdefs.h
f199cab1 16927
5476a9a4 16928 ;;
f199cab1 16929
5476a9a4 16930 gnu-linux | gnu-kfreebsd )
5476a9a4
GM
16931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16932/* end confdefs.h. */
3e0be4ab 16933
5476a9a4
GM
16934#ifndef __ia64__
16935# error "not ia64"
16936#endif
067d23c9 16937
5476a9a4
GM
16938int
16939main ()
16940{
3e0be4ab 16941
5476a9a4
GM
16942 ;
16943 return 0;
16944}
16945_ACEOF
16946if ac_fn_c_try_cpp "$LINENO"; then :
f199cab1 16947
5476a9a4 16948$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 16949
3e0be4ab 16950fi
5476a9a4
GM
16951rm -f conftest.err conftest.$ac_ext
16952 ;;
067d23c9 16953
5476a9a4 16954 hpux*)
3e0be4ab 16955
5476a9a4 16956$as_echo "#define RUN_TIME_REMAP 1" >>confdefs.h
3e0be4ab 16957
5476a9a4 16958 ;;
5476a9a4 16959esac
3e0be4ab
GM
16960
16961
f199cab1 16962
e700232f
GM
16963
16964
5476a9a4 16965case $opsys in
5476a9a4
GM
16966 gnu-linux | gnu-kfreebsd )
16967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1fd182f0 16968/* end confdefs.h. */
f199cab1 16969
5476a9a4
GM
16970#if defined __i386__ || defined __sparc__ || defined __mc68000__ \
16971 || defined __alpha__ || defined __mips__ || defined __s390__ \
16972 || defined __arm__ || defined __powerpc__ || defined __amd64__ \
16973 || defined __ia64__ || defined __sh__
16974/* ok */
16975#else
16976# error "setjmp not known to work on this arch"
16977#endif
16978
f199cab1
GM
16979int
16980main ()
1fd182f0 16981{
5476a9a4 16982
f199cab1
GM
16983 ;
16984 return 0;
1fd182f0
PE
16985}
16986_ACEOF
5476a9a4
GM
16987if ac_fn_c_try_cpp "$LINENO"; then :
16988 $as_echo "#define GC_SETJMP_WORKS 1" >>confdefs.h
f199cab1 16989
1f5d53eb 16990fi
5476a9a4
GM
16991rm -f conftest.err conftest.$ac_ext
16992 ;;
16993esac
1fd182f0 16994
f199cab1 16995
5476a9a4
GM
16996if test x$GCC = xyes; then
16997 $as_echo "#define GC_SETJMP_WORKS 1" >>confdefs.h
16998
1fd182f0 16999else
5476a9a4 17000 case $opsys in
87e1a811 17001 dragonfly | freebsd | netbsd | openbsd | irix6-5 | sol2* )
5476a9a4 17002 $as_echo "#define GC_SETJMP_WORKS 1" >>confdefs.h
1fd182f0 17003
5476a9a4
GM
17004 ;;
17005 esac
17006fi
6ec9a5a7
GM
17007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _setjmp" >&5
17008$as_echo_n "checking for _setjmp... " >&6; }
17009if test "${emacs_cv_func__setjmp+set}" = set; then :
17010 $as_echo_n "(cached) " >&6
17011else
17012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17013/* end confdefs.h. */
17014#include <setjmp.h>
7c61eaab
GM
17015 #ifdef __MINGW32__
17016 # define _longjmp longjmp
17017 #endif
1fd182f0 17018
6ec9a5a7
GM
17019int
17020main ()
17021{
17022jmp_buf j;
17023 if (! _setjmp (j))
17024 _longjmp (j, 1);
17025 ;
17026 return 0;
17027}
17028_ACEOF
17029if ac_fn_c_try_link "$LINENO"; then :
17030 emacs_cv_func__setjmp=yes
17031else
17032 emacs_cv_func__setjmp=no
17033fi
17034rm -f core conftest.err conftest.$ac_objext \
17035 conftest$ac_exeext conftest.$ac_ext
17036fi
17037{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_func__setjmp" >&5
17038$as_echo "$emacs_cv_func__setjmp" >&6; }
e2d8f316 17039if test $emacs_cv_func__setjmp = yes; then
906debc3 17040
e2d8f316 17041$as_echo "#define HAVE__SETJMP 1" >>confdefs.h
906debc3 17042
e2d8f316
GM
17043else
17044 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
17045$as_echo_n "checking for sigsetjmp... " >&6; }
17046if test "${emacs_cv_func_sigsetjmp+set}" = set; then :
17047 $as_echo_n "(cached) " >&6
17048else
17049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17050/* end confdefs.h. */
17051#include <setjmp.h>
17052
17053int
17054main ()
17055{
17056sigjmp_buf j;
17057 if (! sigsetjmp (j, 1))
17058 siglongjmp (j, 1);
17059 ;
17060 return 0;
17061}
17062_ACEOF
17063if ac_fn_c_try_link "$LINENO"; then :
17064 emacs_cv_func_sigsetjmp=yes
17065else
17066 emacs_cv_func_sigsetjmp=no
17067fi
17068rm -f core conftest.err conftest.$ac_objext \
17069 conftest$ac_exeext conftest.$ac_ext
17070fi
17071{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_func_sigsetjmp" >&5
17072$as_echo "$emacs_cv_func_sigsetjmp" >&6; }
17073 if test $emacs_cv_func_sigsetjmp = yes; then
906debc3 17074
e2d8f316 17075$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
906debc3 17076
e2d8f316 17077 fi
6ec9a5a7
GM
17078fi
17079
17080case $opsys in
17081 sol2* | unixware )
906debc3
GM
17082
17083$as_echo "#define TIOCSIGSEND TIOCSIGNAL" >>confdefs.h
17084
17085 ;;
17086esac
17087
906debc3 17088
5476a9a4
GM
17089case $opsys in
17090 hpux* | sol2* )
1f5d53eb 17091
5476a9a4 17092$as_echo "#define XOS_NEEDS_TIME_H 1" >>confdefs.h
1f5d53eb 17093
5476a9a4
GM
17094 ;;
17095esac
1f5d53eb 17096
1f5d53eb 17097
4fda9c95 17098
3e0be4ab 17099
4fda9c95 17100
4fda9c95 17101
f199cab1 17102
5476a9a4
GM
17103case $opsys in
17104 aix4-2)
17105 $as_echo "#define USG /**/" >>confdefs.h
17106
5476a9a4
GM
17107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17108/* end confdefs.h. */
17109
17110#ifndef _AIX
17111# error "_AIX not defined"
17112#endif
f199cab1 17113
4fda9c95
GM
17114int
17115main ()
17116{
3e0be4ab 17117
4fda9c95
GM
17118 ;
17119 return 0;
17120}
17121_ACEOF
5476a9a4 17122if ac_fn_c_try_cpp "$LINENO"; then :
4fda9c95 17123
3e0be4ab 17124else
4fda9c95 17125
5476a9a4 17126$as_echo "#define _AIX /**/" >>confdefs.h
3e0be4ab 17127
5476a9a4
GM
17128fi
17129rm -f conftest.err conftest.$ac_ext
17130 ;;
4fda9c95 17131
5476a9a4 17132 cygwin)
3e0be4ab 17133
5476a9a4 17134$as_echo "#define CYGWIN 1" >>confdefs.h
f199cab1 17135
5476a9a4 17136 ;;
f199cab1 17137
5476a9a4 17138 darwin)
f199cab1 17139
5476a9a4 17140$as_echo "#define DARWIN_OS /**/" >>confdefs.h
f199cab1 17141
5476a9a4 17142 ;;
4fda9c95 17143
5476a9a4
GM
17144 gnu-linux | gnu-kfreebsd )
17145 $as_echo "#define USG /**/" >>confdefs.h
4fda9c95 17146
f199cab1 17147
5476a9a4 17148$as_echo "#define GNU_LINUX /**/" >>confdefs.h
4fda9c95 17149
5476a9a4 17150 ;;
4fda9c95 17151
5476a9a4
GM
17152 hpux*)
17153 $as_echo "#define USG /**/" >>confdefs.h
4fda9c95 17154
4717915f 17155
5476a9a4 17156$as_echo "#define HPUX /**/" >>confdefs.h
697210c4 17157
5476a9a4 17158 ;;
697210c4 17159
5476a9a4
GM
17160 irix6-5)
17161 $as_echo "#define USG /**/" >>confdefs.h
f199cab1 17162
906debc3
GM
17163 $as_echo "#define USG5_4 /**/" >>confdefs.h
17164
f199cab1 17165
5476a9a4 17166$as_echo "#define IRIX6_5 /**/" >>confdefs.h
f199cab1 17167
5476a9a4 17168 ;;
f199cab1 17169
7c61eaab
GM
17170 mingw32)
17171 $as_echo "#define DOS_NT /**/" >>confdefs.h
17172
17173
17174$as_echo "#define WINDOWSNT 1" >>confdefs.h
17175
17176 if test "x$ac_enable_checking" != "x" ; then
17177
17178$as_echo "#define EMACSDEBUG 1" >>confdefs.h
17179
17180 fi
17181 ;;
17182
5476a9a4
GM
17183 sol2*)
17184 $as_echo "#define USG /**/" >>confdefs.h
4fda9c95 17185
906debc3
GM
17186 $as_echo "#define USG5_4 /**/" >>confdefs.h
17187
4fda9c95 17188
5476a9a4 17189$as_echo "#define SOLARIS2 /**/" >>confdefs.h
f199cab1 17190
5476a9a4 17191 ;;
f199cab1 17192
5476a9a4
GM
17193 unixware)
17194 $as_echo "#define USG /**/" >>confdefs.h
f199cab1 17195
906debc3
GM
17196 $as_echo "#define USG5_4 /**/" >>confdefs.h
17197
5476a9a4
GM
17198 ;;
17199esac
f199cab1 17200
4fa92495
GM
17201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable FIONREAD" >&5
17202$as_echo_n "checking for usable FIONREAD... " >&6; }
17203if test "${emacs_cv_usable_FIONREAD+set}" = set; then :
17204 $as_echo_n "(cached) " >&6
17205else
17206 case $opsys in
17207 aix4-2)
17208 emacs_cv_usable_FIONREAD=no
17209 ;;
17210
7c61eaab
GM
17211 mingw32)
17212 emacs_cv_usable_FIONREAD=yes
17213 ;;
17214
4fa92495
GM
17215 *)
17216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17217/* end confdefs.h. */
17218#include <sys/types.h>
17219 #include <sys/ioctl.h>
17220 #ifdef USG5_4
17221 # include <sys/filio.h>
17222 #endif
17223
17224int
17225main ()
17226{
17227int foo = ioctl (0, FIONREAD, &foo);
17228 ;
17229 return 0;
17230}
17231_ACEOF
17232if ac_fn_c_try_compile "$LINENO"; then :
17233 emacs_cv_usable_FIONREAD=yes
17234else
17235 emacs_cv_usable_FIONREAD=no
17236fi
17237rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17238 ;;
17239 esac
17240fi
17241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_usable_FIONREAD" >&5
17242$as_echo "$emacs_cv_usable_FIONREAD" >&6; }
17243if test $emacs_cv_usable_FIONREAD = yes; then
17244
17245$as_echo "#define USABLE_FIONREAD 1" >>confdefs.h
17246
17247
17248 if test $emacs_broken_SIGIO = no; then
17249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable SIGIO" >&5
17250$as_echo_n "checking for usable SIGIO... " >&6; }
17251if test "${emacs_cv_usable_SIGIO+set}" = set; then :
17252 $as_echo_n "(cached) " >&6
17253else
17254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17255/* end confdefs.h. */
17256#include <fcntl.h>
17257 #include <signal.h>
17258
17259int
17260main ()
17261{
17262int foo = SIGIO | F_SETFL | FASYNC;
17263 ;
17264 return 0;
17265}
17266_ACEOF
17267if ac_fn_c_try_compile "$LINENO"; then :
17268 emacs_cv_usable_SIGIO=yes
17269else
17270 emacs_cv_usable_SIGIO=no
17271fi
17272rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17273fi
17274{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_usable_SIGIO" >&5
17275$as_echo "$emacs_cv_usable_SIGIO" >&6; }
17276 if test $emacs_cv_usable_SIGIO = yes; then
17277
17278$as_echo "#define USABLE_SIGIO 1" >>confdefs.h
17279
17280 fi
17281 fi
17282fi
17283
4fda9c95 17284
5476a9a4 17285case $opsys in
32c8eae2 17286 cygwin)
4fda9c95 17287
5476a9a4 17288$as_echo "#define G_SLICE_ALWAYS_MALLOC 1" >>confdefs.h
4fda9c95 17289
5476a9a4 17290 ;;
4fda9c95 17291
5476a9a4 17292 hpux11)
f199cab1 17293
5476a9a4 17294$as_echo "#define USG_SUBTTY_WORKS 1" >>confdefs.h
f199cab1 17295
5476a9a4 17296 ;;
f199cab1 17297
5476a9a4 17298 irix6-5)
f199cab1 17299
5476a9a4 17300$as_echo "#define PREFER_VSUSP 1" >>confdefs.h
f199cab1 17301
5476a9a4 17302 ;;
f199cab1 17303
5476a9a4 17304 sol2-10)
f199cab1 17305
5476a9a4 17306$as_echo "#define _STRUCTURED_PROC 1" >>confdefs.h
f199cab1 17307
5476a9a4
GM
17308 ;;
17309esac
f199cab1 17310
5476a9a4
GM
17311# Set up the CFLAGS for real compilation, so we can substitute it.
17312CFLAGS="$REAL_CFLAGS"
17313CPPFLAGS="$REAL_CPPFLAGS"
f199cab1 17314
5476a9a4
GM
17315## Hack to detect a buggy GCC version.
17316if test "x$GCC" = xyes \
17317 && test x"`$CC --version 2> /dev/null | grep 'gcc.* 4.5.0'`" != x \
17318 && test x"`echo $CFLAGS | grep '\-O[23]'`" != x \
17319 && test x"`echo $CFLAGS | grep '\-fno-optimize-sibling-calls'`" = x; then
17320 as_fn_error "GCC 4.5.0 has problems compiling Emacs; see etc/PROBLEMS'." "$LINENO" 5
17321fi
f199cab1 17322
5476a9a4 17323version=$PACKAGE_VERSION
f199cab1 17324
0778f6f0 17325copyright="Copyright (C) 2013 Free Software Foundation, Inc."
bb7dce39
GM
17326
17327cat >>confdefs.h <<_ACEOF
17328#define COPYRIGHT "$copyright"
17329_ACEOF
17330
17331
17332
5476a9a4
GM
17333### Specify what sort of things we'll be editing into Makefile and config.h.
17334### Use configuration here uncanonicalized to avoid exceeding size limits.
4fda9c95 17335
f199cab1 17336
5476a9a4 17337## Unused?
4fda9c95
GM
17338
17339
17340
17341
4717915f 17342
4717915f 17343
4717915f 17344
4717915f 17345
4717915f 17346
4717915f 17347
4717915f 17348
4717915f 17349
4717915f 17350
4717915f 17351
4717915f 17352
4717915f
GM
17353
17354
4717915f
GM
17355
17356
4717915f 17357
4717915f 17358
4717915f 17359
5476a9a4
GM
17360## FIXME? Nothing uses @LD_SWITCH_X_SITE@.
17361## src/Makefile.in did add LD_SWITCH_X_SITE (as a cpp define) to the
17362## end of LIBX_BASE, but nothing ever set it.
4717915f 17363
4717915f 17364
4fda9c95 17365
4fda9c95 17366
5476a9a4
GM
17367## Used in lwlib/Makefile.in.
17368
4fda9c95 17369
4fda9c95 17370
4fda9c95
GM
17371
17372
17373
17374
4fda9c95 17375
42dcba54
GM
17376if test -n "${term_header}"; then
17377
17378cat >>confdefs.h <<_ACEOF
17379#define TERM_HEADER "${term_header}"
17380_ACEOF
17381
17382fi
17383
4fda9c95 17384
5476a9a4
GM
17385cat >>confdefs.h <<_ACEOF
17386#define EMACS_CONFIGURATION "${canonical}"
17387_ACEOF
4fda9c95
GM
17388
17389
5476a9a4 17390cat >>confdefs.h <<_ACEOF
e25a10b7 17391#define EMACS_CONFIG_OPTIONS "${emacs_config_options}"
5476a9a4
GM
17392_ACEOF
17393
5476a9a4 17394
4fda9c95 17395
7c61eaab
GM
17396case $opsys in
17397 mingw32)
17398 $as_echo "#define config_opsysfile <ms-w32.h>" >>confdefs.h
17399
17400 ;;
17401esac
17402
5476a9a4
GM
17403XMENU_OBJ=
17404XOBJ=
17405FONT_OBJ=
17406if test "${HAVE_X_WINDOWS}" = "yes" ; then
17407
17408$as_echo "#define HAVE_X_WINDOWS 1" >>confdefs.h
4fda9c95 17409
5476a9a4 17410 XMENU_OBJ=xmenu.o
0f55a32e 17411 XOBJ="xterm.o xfns.o xselect.o xrdb.o xsmfns.o xsettings.o"
5476a9a4
GM
17412 FONT_OBJ=xfont.o
17413 if test "$HAVE_XFT" = "yes"; then
17414 FONT_OBJ="$FONT_OBJ ftfont.o xftfont.o ftxfont.o"
17415 elif test "$HAVE_FREETYPE" = "yes"; then
17416 FONT_OBJ="$FONT_OBJ ftfont.o ftxfont.o"
17417 fi
4fda9c95 17418
f199cab1 17419fi
4fda9c95 17420
4fda9c95 17421
4fda9c95 17422
4fda9c95 17423
5476a9a4
GM
17424WIDGET_OBJ=
17425MOTIF_LIBW=
17426if test "${USE_X_TOOLKIT}" != "none" ; then
17427 WIDGET_OBJ=widget.o
17428
17429$as_echo "#define USE_X_TOOLKIT 1" >>confdefs.h
17430
17431 if test "${USE_X_TOOLKIT}" = "LUCID"; then
17432
17433$as_echo "#define USE_LUCID 1" >>confdefs.h
e1939eb1 17434
5476a9a4 17435 elif test "${USE_X_TOOLKIT}" = "MOTIF"; then
4fda9c95 17436
5476a9a4 17437$as_echo "#define USE_MOTIF 1" >>confdefs.h
3e0be4ab 17438
5476a9a4
GM
17439 MOTIF_LIBW=-lXm
17440 case "$opsys" in
17441 gnu-linux)
17442 ## Paul Abrahams <abrahams at equinox.shaysnet.com> says this is needed.
17443 MOTIF_LIBW="$MOTIF_LIBW -lXpm"
17444 ;;
3e0be4ab 17445
5476a9a4
GM
17446 unixware)
17447 ## Richard Anthony Ryan <ryanr at ellingtn.ftc.nrcs.usda.gov>
17448 ## says -lXimp is needed in UNIX_SV ... 4.2 1.1.2.
17449 MOTIF_LIBW="MOTIF_LIBW -lXimp"
17450 ;;
3e0be4ab 17451
5476a9a4
GM
17452 aix4-2)
17453 ## olson@mcs.anl.gov says -li18n is needed by -lXm.
17454 MOTIF_LIBW="$MOTIF_LIBW -li18n"
17455 ;;
17456 esac
17457 MOTIF_LIBW="$MOTIF_LIBW $LIBXP"
17458 fi
17459fi
4fda9c95 17460
3e0be4ab 17461
5476a9a4
GM
17462TOOLKIT_LIBW=
17463case "$USE_X_TOOLKIT" in
17464 MOTIF) TOOLKIT_LIBW="$MOTIF_LIBW" ;;
17465 LUCID) TOOLKIT_LIBW="$LUCID_LIBW" ;;
17466 none) test "x$HAVE_GTK" = "xyes" && TOOLKIT_LIBW="$GTK_LIBS" ;;
17467esac
4fda9c95
GM
17468
17469
7c61eaab
GM
17470if test "${opsys}" != "mingw32"; then
17471 if test "$USE_X_TOOLKIT" = "none"; then
17472 LIBXT_OTHER="\$(LIBXSM)"
17473 OLDXMENU_TARGET="really-oldXMenu"
17474 else
17475 LIBXT_OTHER="\$(LIBXMU) -lXt \$(LIBXTR6) -lXext"
17476 OLDXMENU_TARGET="really-lwlib"
17477 fi
5476a9a4 17478fi
4fda9c95
GM
17479
17480
5476a9a4
GM
17481## The X Menu stuff is present in the X10 distribution, but missing
17482## from X11. If we have X10, just use the installed library;
17483## otherwise, use our own copy.
17484if test "${HAVE_X11}" = "yes" ; then
4fda9c95 17485
5476a9a4 17486$as_echo "#define HAVE_X11 1" >>confdefs.h
4fda9c95 17487
4fda9c95 17488
5476a9a4
GM
17489 if test "$USE_X_TOOLKIT" = "none"; then
17490 OLDXMENU="\${oldXMenudir}/libXMenu11.a"
17491 else
17492 OLDXMENU="\${lwlibdir}/liblw.a"
17493 fi
17494 LIBXMENU="\$(OLDXMENU)"
17495 LIBX_OTHER="\$(LIBXT) \$(LIBX_EXTRA)"
17496 OLDXMENU_DEPS="\${OLDXMENU} ../src/\${OLDXMENU}"
f199cab1 17497else
5476a9a4
GM
17498 ## For a syntactically valid Makefile; not actually used for anything.
17499 ## See comments in src/Makefile.in.
17500 OLDXMENU=nothing
17501 ## FIXME This case (!HAVE_X11 && HAVE_X_WINDOWS) is no longer possible(?).
17502 if test "${HAVE_X_WINDOWS}" = "yes"; then
17503 LIBXMENU="-lXMenu"
17504 else
17505 LIBXMENU=
17506 fi
17507 LIBX_OTHER=
17508 OLDXMENU_DEPS=
17509fi
4fda9c95 17510
5476a9a4
GM
17511if test "$HAVE_GTK" = "yes" || test "$HAVE_MENUS" != "yes"; then
17512 OLDXMENU_TARGET=
17513 OLDXMENU=nothing
17514 LIBXMENU=
17515 OLDXMENU_DEPS=
17516fi
4fda9c95 17517
4fda9c95
GM
17518
17519
3e0be4ab 17520
4fda9c95 17521
3e0be4ab 17522
3e0be4ab 17523
5476a9a4 17524if test "${HAVE_MENUS}" = "yes" ; then
3e0be4ab 17525
5476a9a4 17526$as_echo "#define HAVE_MENUS 1" >>confdefs.h
4fda9c95 17527
5476a9a4 17528fi
4fda9c95 17529
5476a9a4 17530if test "${GNU_MALLOC}" = "yes" ; then
4fda9c95 17531
5476a9a4 17532$as_echo "#define GNU_MALLOC 1" >>confdefs.h
4fda9c95 17533
5476a9a4 17534fi
3e0be4ab 17535
5476a9a4
GM
17536RALLOC_OBJ=
17537if test "${REL_ALLOC}" = "yes" ; then
17538
17539$as_echo "#define REL_ALLOC 1" >>confdefs.h
4fda9c95
GM
17540
17541
5476a9a4
GM
17542 test "$system_malloc" != "yes" && RALLOC_OBJ=ralloc.o
17543fi
4fda9c95 17544
4fda9c95 17545
5476a9a4 17546if test "$opsys" = "cygwin"; then
5c0255d9 17547 CYGWIN_OBJ="sheap.o cygw32.o"
5476a9a4
GM
17548 ## Cygwin differs because of its unexec().
17549 PRE_ALLOC_OBJ=
17550 POST_ALLOC_OBJ=lastfile.o
7c61eaab
GM
17551elif test "$opsys" = "mingw32"; then
17552 CYGWIN_OBJ=
17553 PRE_ALLOC_OBJ=
17554 POST_ALLOC_OBJ=lastfile.o
5476a9a4
GM
17555else
17556 CYGWIN_OBJ=
17557 PRE_ALLOC_OBJ=lastfile.o
17558 POST_ALLOC_OBJ=
17559fi
4fda9c95 17560
3e0be4ab 17561
3e0be4ab 17562
3e0be4ab 17563
5476a9a4
GM
17564# Configure gnulib. Although this does not affect CFLAGS or LIBS permanently.
17565# it temporarily reverts them to their pre-pkg-config values,
17566# because gnulib needs to work with both src (which uses the
17567# pkg-config stuff) and lib-src (which does not). For example, gnulib
17568# may need to determine whether LIB_CLOCK_GETTIME should contain -lrt,
17569# and it therefore needs to run in an environment where LIBS does not
17570# already contain -lrt merely because 'pkg-config --libs' printed '-lrt'
17571# for some package unrelated to lib-src.
17572SAVE_CFLAGS=$CFLAGS
17573SAVE_LIBS=$LIBS
17574CFLAGS=$pre_PKG_CONFIG_CFLAGS
17575LIBS="$LIB_PTHREAD $pre_PKG_CONFIG_LIBS"
3e0be4ab 17576
3e0be4ab
GM
17577
17578
4fda9c95 17579
4fda9c95 17580
3e0be4ab 17581
3e0be4ab
GM
17582
17583
4fda9c95 17584
3e0be4ab
GM
17585
17586
5476a9a4
GM
17587 LIBC_FATAL_STDERR_=1
17588 export LIBC_FATAL_STDERR_
3e0be4ab 17589
5476a9a4
GM
17590# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
17591# for constant arguments. Useless!
17592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
17593$as_echo_n "checking for working alloca.h... " >&6; }
17594if test "${ac_cv_working_alloca_h+set}" = set; then :
17595 $as_echo_n "(cached) " >&6
17596else
17597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17598/* end confdefs.h. */
17599#include <alloca.h>
17600int
17601main ()
17602{
17603char *p = (char *) alloca (2 * sizeof (int));
17604 if (p) return 0;
17605 ;
17606 return 0;
17607}
17608_ACEOF
17609if ac_fn_c_try_link "$LINENO"; then :
17610 ac_cv_working_alloca_h=yes
17611else
17612 ac_cv_working_alloca_h=no
17613fi
17614rm -f core conftest.err conftest.$ac_objext \
17615 conftest$ac_exeext conftest.$ac_ext
17616fi
17617{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
17618$as_echo "$ac_cv_working_alloca_h" >&6; }
17619if test $ac_cv_working_alloca_h = yes; then
3e0be4ab 17620
5476a9a4 17621$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
3e0be4ab 17622
5476a9a4 17623fi
3e0be4ab 17624
5476a9a4
GM
17625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
17626$as_echo_n "checking for alloca... " >&6; }
17627if test "${ac_cv_func_alloca_works+set}" = set; then :
f199cab1
GM
17628 $as_echo_n "(cached) " >&6
17629else
5476a9a4 17630 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 17631/* end confdefs.h. */
5476a9a4
GM
17632#ifdef __GNUC__
17633# define alloca __builtin_alloca
17634#else
17635# ifdef _MSC_VER
17636# include <malloc.h>
17637# define alloca _alloca
17638# else
17639# ifdef HAVE_ALLOCA_H
17640# include <alloca.h>
17641# else
17642# ifdef _AIX
17643 #pragma alloca
17644# else
17645# ifndef alloca /* predefined by HP cc +Olibcalls */
17646char *alloca ();
17647# endif
17648# endif
17649# endif
17650# endif
17651#endif
17652
17653int
17654main ()
17655{
17656char *p = (char *) alloca (1);
17657 if (p) return 0;
17658 ;
17659 return 0;
17660}
17661_ACEOF
17662if ac_fn_c_try_link "$LINENO"; then :
17663 ac_cv_func_alloca_works=yes
17664else
17665 ac_cv_func_alloca_works=no
17666fi
17667rm -f core conftest.err conftest.$ac_objext \
17668 conftest$ac_exeext conftest.$ac_ext
17669fi
17670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
17671$as_echo "$ac_cv_func_alloca_works" >&6; }
17672
17673if test $ac_cv_func_alloca_works = yes; then
17674
17675$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
17676
17677else
17678 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
17679# that cause trouble. Some versions do not even contain alloca or
17680# contain a buggy version. If you still want to use their alloca,
17681# use ar to extract alloca.o from them instead of compiling alloca.c.
3e0be4ab 17682
4fda9c95 17683
4fda9c95 17684
4fda9c95
GM
17685
17686
5476a9a4 17687ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
4fda9c95 17688
5476a9a4 17689$as_echo "#define C_ALLOCA 1" >>confdefs.h
4fda9c95 17690
4fda9c95 17691
5476a9a4
GM
17692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether 'alloca.c' needs Cray hooks" >&5
17693$as_echo_n "checking whether 'alloca.c' needs Cray hooks... " >&6; }
17694if test "${ac_cv_os_cray+set}" = set; then :
17695 $as_echo_n "(cached) " >&6
17696else
17697 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17698/* end confdefs.h. */
17699#if defined CRAY && ! defined CRAY2
17700webecray
17701#else
17702wenotbecray
17703#endif
4fda9c95 17704
5476a9a4
GM
17705_ACEOF
17706if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17707 $EGREP "webecray" >/dev/null 2>&1; then :
17708 ac_cv_os_cray=yes
17709else
17710 ac_cv_os_cray=no
17711fi
17712rm -f conftest*
4fda9c95 17713
5476a9a4
GM
17714fi
17715{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
17716$as_echo "$ac_cv_os_cray" >&6; }
17717if test $ac_cv_os_cray = yes; then
17718 for ac_func in _getb67 GETB67 getb67; do
17719 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17720ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17721eval as_val=\$$as_ac_var
17722 if test "x$as_val" = x""yes; then :
4fda9c95 17723
5476a9a4
GM
17724cat >>confdefs.h <<_ACEOF
17725#define CRAY_STACKSEG_END $ac_func
17726_ACEOF
4fda9c95 17727
5476a9a4
GM
17728 break
17729fi
4fda9c95 17730
5476a9a4
GM
17731 done
17732fi
4fda9c95 17733
5476a9a4
GM
17734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
17735$as_echo_n "checking stack direction for C alloca... " >&6; }
17736if test "${ac_cv_c_stack_direction+set}" = set; then :
17737 $as_echo_n "(cached) " >&6
17738else
17739 if test "$cross_compiling" = yes; then :
17740 ac_cv_c_stack_direction=0
17741else
17742 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17743/* end confdefs.h. */
17744$ac_includes_default
17745int
17746find_stack_direction (int *addr, int depth)
17747{
17748 int dir, dummy = 0;
17749 if (! addr)
17750 addr = &dummy;
17751 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
17752 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
17753 return dir + dummy;
17754}
4fda9c95 17755
5476a9a4
GM
17756int
17757main (int argc, char **argv)
17758{
17759 return find_stack_direction (0, argc + !argv + 20) < 0;
17760}
17761_ACEOF
17762if ac_fn_c_try_run "$LINENO"; then :
17763 ac_cv_c_stack_direction=1
17764else
17765 ac_cv_c_stack_direction=-1
17766fi
17767rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17768 conftest.$ac_objext conftest.beam conftest.$ac_ext
17769fi
4fda9c95 17770
5476a9a4
GM
17771fi
17772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
17773$as_echo "$ac_cv_c_stack_direction" >&6; }
17774cat >>confdefs.h <<_ACEOF
17775#define STACK_DIRECTION $ac_cv_c_stack_direction
17776_ACEOF
3e0be4ab
GM
17777
17778
5476a9a4 17779fi
3e0be4ab
GM
17780
17781
17782
17783
5476a9a4
GM
17784 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
17785$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
17786if test "${ac_cv_c_bigendian+set}" = set; then :
17787 $as_echo_n "(cached) " >&6
17788else
17789 ac_cv_c_bigendian=unknown
17790 # See if we're dealing with a universal compiler.
17791 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17792/* end confdefs.h. */
17793#ifndef __APPLE_CC__
17794 not a universal capable compiler
17795 #endif
17796 typedef int dummy;
17797
17798_ACEOF
17799if ac_fn_c_try_compile "$LINENO"; then :
3e0be4ab 17800
5476a9a4
GM
17801 # Check for potential -arch flags. It is not universal unless
17802 # there are at least two -arch flags with different values.
17803 ac_arch=
17804 ac_prev=
17805 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
17806 if test -n "$ac_prev"; then
17807 case $ac_word in
17808 i?86 | x86_64 | ppc | ppc64)
17809 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
17810 ac_arch=$ac_word
17811 else
17812 ac_cv_c_bigendian=universal
17813 break
17814 fi
17815 ;;
17816 esac
17817 ac_prev=
17818 elif test "x$ac_word" = "x-arch"; then
17819 ac_prev=arch
17820 fi
17821 done
17822fi
17823rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17824 if test $ac_cv_c_bigendian = unknown; then
17825 # See if sys/param.h defines the BYTE_ORDER macro.
17826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17827/* end confdefs.h. */
17828#include <sys/types.h>
17829 #include <sys/param.h>
3e0be4ab 17830
5476a9a4
GM
17831int
17832main ()
17833{
17834#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
17835 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
17836 && LITTLE_ENDIAN)
17837 bogus endian macros
17838 #endif
3e0be4ab 17839
5476a9a4
GM
17840 ;
17841 return 0;
17842}
17843_ACEOF
17844if ac_fn_c_try_compile "$LINENO"; then :
17845 # It does; now see whether it defined to BIG_ENDIAN or not.
17846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17847/* end confdefs.h. */
17848#include <sys/types.h>
17849 #include <sys/param.h>
369e19fc 17850
5476a9a4
GM
17851int
17852main ()
17853{
17854#if BYTE_ORDER != BIG_ENDIAN
17855 not big endian
17856 #endif
3e0be4ab 17857
5476a9a4
GM
17858 ;
17859 return 0;
17860}
17861_ACEOF
17862if ac_fn_c_try_compile "$LINENO"; then :
17863 ac_cv_c_bigendian=yes
17864else
17865 ac_cv_c_bigendian=no
17866fi
17867rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17868fi
17869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17870 fi
17871 if test $ac_cv_c_bigendian = unknown; then
17872 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
17873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17874/* end confdefs.h. */
17875#include <limits.h>
4fda9c95 17876
5476a9a4
GM
17877int
17878main ()
17879{
17880#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
17881 bogus endian macros
17882 #endif
4fda9c95 17883
5476a9a4
GM
17884 ;
17885 return 0;
17886}
17887_ACEOF
17888if ac_fn_c_try_compile "$LINENO"; then :
17889 # It does; now see whether it defined to _BIG_ENDIAN or not.
17890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17891/* end confdefs.h. */
17892#include <limits.h>
4fda9c95 17893
5476a9a4
GM
17894int
17895main ()
17896{
17897#ifndef _BIG_ENDIAN
17898 not big endian
17899 #endif
f199cab1 17900
5476a9a4
GM
17901 ;
17902 return 0;
17903}
17904_ACEOF
17905if ac_fn_c_try_compile "$LINENO"; then :
17906 ac_cv_c_bigendian=yes
f199cab1 17907else
5476a9a4
GM
17908 ac_cv_c_bigendian=no
17909fi
17910rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17911fi
17912rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17913 fi
17914 if test $ac_cv_c_bigendian = unknown; then
17915 # Compile a test program.
17916 if test "$cross_compiling" = yes; then :
17917 # Try to guess by grepping values from an object file.
17918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17919/* end confdefs.h. */
17920short int ascii_mm[] =
17921 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
17922 short int ascii_ii[] =
17923 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
17924 int use_ascii (int i) {
17925 return ascii_mm[i] + ascii_ii[i];
17926 }
17927 short int ebcdic_ii[] =
17928 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
17929 short int ebcdic_mm[] =
17930 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
17931 int use_ebcdic (int i) {
17932 return ebcdic_mm[i] + ebcdic_ii[i];
17933 }
17934 extern int foo;
f199cab1 17935
5476a9a4
GM
17936int
17937main ()
17938{
17939return use_ascii (foo) == use_ebcdic (foo);
17940 ;
17941 return 0;
17942}
17943_ACEOF
17944if ac_fn_c_try_compile "$LINENO"; then :
17945 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
17946 ac_cv_c_bigendian=yes
17947 fi
17948 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
17949 if test "$ac_cv_c_bigendian" = unknown; then
17950 ac_cv_c_bigendian=no
17951 else
17952 # finding both strings is unlikely to happen, but who knows?
17953 ac_cv_c_bigendian=unknown
17954 fi
17955 fi
17956fi
17957rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4fda9c95 17958else
3e0be4ab 17959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4fda9c95 17960/* end confdefs.h. */
5476a9a4
GM
17961$ac_includes_default
17962int
17963main ()
4fda9c95 17964{
5476a9a4
GM
17965
17966 /* Are we little or big endian? From Harbison&Steele. */
17967 union
17968 {
17969 long int l;
17970 char c[sizeof (long int)];
17971 } u;
17972 u.l = 1;
17973 return u.c[sizeof (long int) - 1] == 1;
17974
17975 ;
4fda9c95
GM
17976 return 0;
17977}
17978_ACEOF
f199cab1 17979if ac_fn_c_try_run "$LINENO"; then :
5476a9a4 17980 ac_cv_c_bigendian=no
3e0be4ab 17981else
5476a9a4 17982 ac_cv_c_bigendian=yes
4fda9c95 17983fi
f199cab1
GM
17984rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17985 conftest.$ac_objext conftest.beam conftest.$ac_ext
4fda9c95 17986fi
4fda9c95 17987
5476a9a4 17988 fi
f199cab1 17989fi
5476a9a4
GM
17990{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
17991$as_echo "$ac_cv_c_bigendian" >&6; }
17992 case $ac_cv_c_bigendian in #(
17993 yes)
17994 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
17995;; #(
17996 no)
17997 ;; #(
17998 universal)
3e0be4ab 17999
5476a9a4 18000$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
3e0be4ab 18001
5476a9a4
GM
18002 ;; #(
18003 *)
18004 as_fn_error "unknown endianness
18005 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
18006 esac
4fda9c95 18007
4fda9c95 18008
da6c8463 18009
5476a9a4
GM
18010 GNULIB_CHDIR=0;
18011 GNULIB_CHOWN=0;
18012 GNULIB_CLOSE=0;
18013 GNULIB_DUP=0;
18014 GNULIB_DUP2=0;
18015 GNULIB_DUP3=0;
18016 GNULIB_ENVIRON=0;
18017 GNULIB_EUIDACCESS=0;
18018 GNULIB_FACCESSAT=0;
18019 GNULIB_FCHDIR=0;
18020 GNULIB_FCHOWNAT=0;
18021 GNULIB_FDATASYNC=0;
18022 GNULIB_FSYNC=0;
18023 GNULIB_FTRUNCATE=0;
18024 GNULIB_GETCWD=0;
18025 GNULIB_GETDOMAINNAME=0;
18026 GNULIB_GETDTABLESIZE=0;
18027 GNULIB_GETGROUPS=0;
18028 GNULIB_GETHOSTNAME=0;
18029 GNULIB_GETLOGIN=0;
18030 GNULIB_GETLOGIN_R=0;
18031 GNULIB_GETPAGESIZE=0;
18032 GNULIB_GETUSERSHELL=0;
18033 GNULIB_GROUP_MEMBER=0;
18034 GNULIB_ISATTY=0;
18035 GNULIB_LCHOWN=0;
18036 GNULIB_LINK=0;
18037 GNULIB_LINKAT=0;
18038 GNULIB_LSEEK=0;
18039 GNULIB_PIPE=0;
18040 GNULIB_PIPE2=0;
18041 GNULIB_PREAD=0;
18042 GNULIB_PWRITE=0;
18043 GNULIB_READ=0;
18044 GNULIB_READLINK=0;
18045 GNULIB_READLINKAT=0;
18046 GNULIB_RMDIR=0;
18047 GNULIB_SETHOSTNAME=0;
18048 GNULIB_SLEEP=0;
18049 GNULIB_SYMLINK=0;
18050 GNULIB_SYMLINKAT=0;
18051 GNULIB_TTYNAME_R=0;
18052 GNULIB_UNISTD_H_NONBLOCKING=0;
18053 GNULIB_UNISTD_H_SIGPIPE=0;
18054 GNULIB_UNLINK=0;
18055 GNULIB_UNLINKAT=0;
18056 GNULIB_USLEEP=0;
18057 GNULIB_WRITE=0;
18058 HAVE_CHOWN=1;
18059 HAVE_DUP2=1;
18060 HAVE_DUP3=1;
18061 HAVE_EUIDACCESS=1;
18062 HAVE_FACCESSAT=1;
18063 HAVE_FCHDIR=1;
18064 HAVE_FCHOWNAT=1;
18065 HAVE_FDATASYNC=1;
18066 HAVE_FSYNC=1;
18067 HAVE_FTRUNCATE=1;
18068 HAVE_GETDTABLESIZE=1;
18069 HAVE_GETGROUPS=1;
18070 HAVE_GETHOSTNAME=1;
18071 HAVE_GETLOGIN=1;
18072 HAVE_GETPAGESIZE=1;
18073 HAVE_GROUP_MEMBER=1;
18074 HAVE_LCHOWN=1;
18075 HAVE_LINK=1;
18076 HAVE_LINKAT=1;
18077 HAVE_PIPE=1;
18078 HAVE_PIPE2=1;
18079 HAVE_PREAD=1;
18080 HAVE_PWRITE=1;
18081 HAVE_READLINK=1;
18082 HAVE_READLINKAT=1;
18083 HAVE_SETHOSTNAME=1;
18084 HAVE_SLEEP=1;
18085 HAVE_SYMLINK=1;
18086 HAVE_SYMLINKAT=1;
18087 HAVE_UNLINKAT=1;
18088 HAVE_USLEEP=1;
18089 HAVE_DECL_ENVIRON=1;
18090 HAVE_DECL_FCHDIR=1;
18091 HAVE_DECL_FDATASYNC=1;
18092 HAVE_DECL_GETDOMAINNAME=1;
18093 HAVE_DECL_GETLOGIN_R=1;
18094 HAVE_DECL_GETPAGESIZE=1;
18095 HAVE_DECL_GETUSERSHELL=1;
18096 HAVE_DECL_SETHOSTNAME=1;
18097 HAVE_DECL_TTYNAME_R=1;
18098 HAVE_OS_H=0;
18099 HAVE_SYS_PARAM_H=0;
18100 REPLACE_CHOWN=0;
18101 REPLACE_CLOSE=0;
18102 REPLACE_DUP=0;
18103 REPLACE_DUP2=0;
18104 REPLACE_FCHOWNAT=0;
18105 REPLACE_FTRUNCATE=0;
18106 REPLACE_GETCWD=0;
18107 REPLACE_GETDOMAINNAME=0;
18108 REPLACE_GETLOGIN_R=0;
18109 REPLACE_GETGROUPS=0;
18110 REPLACE_GETPAGESIZE=0;
18111 REPLACE_ISATTY=0;
18112 REPLACE_LCHOWN=0;
18113 REPLACE_LINK=0;
18114 REPLACE_LINKAT=0;
18115 REPLACE_LSEEK=0;
18116 REPLACE_PREAD=0;
18117 REPLACE_PWRITE=0;
18118 REPLACE_READ=0;
18119 REPLACE_READLINK=0;
18120 REPLACE_RMDIR=0;
18121 REPLACE_SLEEP=0;
18122 REPLACE_SYMLINK=0;
18123 REPLACE_TTYNAME_R=0;
18124 REPLACE_UNLINK=0;
18125 REPLACE_UNLINKAT=0;
18126 REPLACE_USLEEP=0;
18127 REPLACE_WRITE=0;
18128 UNISTD_H_HAVE_WINSOCK2_H=0;
18129 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
f199cab1
GM
18130
18131
93131e11 18132
d7ad186c
GM
18133 GNULIB_OPENDIR=0;
18134 GNULIB_READDIR=0;
18135 GNULIB_REWINDDIR=0;
18136 GNULIB_CLOSEDIR=0;
18137 GNULIB_DIRFD=0;
18138 GNULIB_FDOPENDIR=0;
18139 GNULIB_SCANDIR=0;
18140 GNULIB_ALPHASORT=0;
18141 HAVE_OPENDIR=1;
18142 HAVE_READDIR=1;
18143 HAVE_REWINDDIR=1;
18144 HAVE_CLOSEDIR=1;
18145 HAVE_DECL_DIRFD=1;
18146 HAVE_DECL_FDOPENDIR=1;
18147 HAVE_FDOPENDIR=1;
18148 HAVE_SCANDIR=1;
18149 HAVE_ALPHASORT=1;
18150 REPLACE_OPENDIR=0;
18151 REPLACE_CLOSEDIR=0;
18152 REPLACE_DIRFD=0;
18153 REPLACE_FDOPENDIR=0;
710f5812
GM
18154
18155
18156
18157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
18158$as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
18159if test "${gl_cv_have_include_next+set}" = set; then :
18160 $as_echo_n "(cached) " >&6
18161else
18162 rm -rf conftestd1a conftestd1b conftestd2
18163 mkdir conftestd1a conftestd1b conftestd2
18164 cat <<EOF > conftestd1a/conftest.h
18165#define DEFINED_IN_CONFTESTD1
18166#include_next <conftest.h>
18167#ifdef DEFINED_IN_CONFTESTD2
18168int foo;
18169#else
18170#error "include_next doesn't work"
18171#endif
18172EOF
18173 cat <<EOF > conftestd1b/conftest.h
18174#define DEFINED_IN_CONFTESTD1
18175#include <stdio.h>
18176#include_next <conftest.h>
18177#ifdef DEFINED_IN_CONFTESTD2
18178int foo;
18179#else
18180#error "include_next doesn't work"
18181#endif
18182EOF
18183 cat <<EOF > conftestd2/conftest.h
18184#ifndef DEFINED_IN_CONFTESTD1
18185#error "include_next test doesn't work"
18186#endif
18187#define DEFINED_IN_CONFTESTD2
18188EOF
18189 gl_save_CPPFLAGS="$CPPFLAGS"
18190 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
18191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18192/* end confdefs.h. */
18193#include <conftest.h>
18194_ACEOF
18195if ac_fn_c_try_compile "$LINENO"; then :
18196 gl_cv_have_include_next=yes
18197else
18198 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
18199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18200/* end confdefs.h. */
18201#include <conftest.h>
18202_ACEOF
18203if ac_fn_c_try_compile "$LINENO"; then :
18204 gl_cv_have_include_next=buggy
18205else
18206 gl_cv_have_include_next=no
18207fi
18208rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18209
18210fi
18211rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18212 CPPFLAGS="$gl_save_CPPFLAGS"
18213 rm -rf conftestd1a conftestd1b conftestd2
18214
18215fi
18216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
18217$as_echo "$gl_cv_have_include_next" >&6; }
18218 PRAGMA_SYSTEM_HEADER=
18219 if test $gl_cv_have_include_next = yes; then
18220 INCLUDE_NEXT=include_next
18221 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
18222 if test -n "$GCC"; then
18223 PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
18224 fi
18225 else
18226 if test $gl_cv_have_include_next = buggy; then
18227 INCLUDE_NEXT=include
18228 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
18229 else
18230 INCLUDE_NEXT=include
18231 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
18232 fi
18233 fi
18234
18235
18236
18237 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5
18238$as_echo_n "checking whether system header files limit the line length... " >&6; }
18239if test "${gl_cv_pragma_columns+set}" = set; then :
18240 $as_echo_n "(cached) " >&6
18241else
18242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18243/* end confdefs.h. */
18244
18245#ifdef __TANDEM
18246choke me
18247#endif
18248
18249_ACEOF
18250if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18251 $EGREP "choke me" >/dev/null 2>&1; then :
18252 gl_cv_pragma_columns=yes
18253else
18254 gl_cv_pragma_columns=no
18255fi
18256rm -f conftest*
18257
18258
18259fi
18260{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5
18261$as_echo "$gl_cv_pragma_columns" >&6; }
18262 if test $gl_cv_pragma_columns = yes; then
18263 PRAGMA_COLUMNS="#pragma COLUMNS 10000"
18264 else
18265 PRAGMA_COLUMNS=
18266 fi
18267
18268
710f5812 18269
710f5812 18270
710f5812 18271
d7ad186c
GM
18272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtold conforms to C99" >&5
18273$as_echo_n "checking whether strtold conforms to C99... " >&6; }
18274if test "${gl_cv_func_c99_strtold+set}" = set; then :
f199cab1 18275 $as_echo_n "(cached) " >&6
ae0d7250 18276else
f199cab1 18277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3e0be4ab 18278/* end confdefs.h. */
d7ad186c
GM
18279/* On HP-UX before 11.23, strtold returns a struct instead of
18280 long double. Reject implementations like that, by requiring
18281 compatibility with the C99 prototype. */
18282 #include <stdlib.h>
18283 static long double (*p) (char const *, char **) = strtold;
18284 static long double
18285 test (char const *nptr, char **endptr)
18286 {
18287 long double r;
18288 r = strtold (nptr, endptr);
18289 return r;
18290 }
3e0be4ab
GM
18291int
18292main ()
18293{
d7ad186c 18294return test ("1.0", NULL) != 1 || p ("1.0", NULL) != 1;
3e0be4ab
GM
18295 ;
18296 return 0;
18297}
6ad6792b 18298_ACEOF
d7ad186c
GM
18299if ac_fn_c_try_link "$LINENO"; then :
18300 gl_cv_func_c99_strtold=yes
f199cab1 18301else
d7ad186c 18302 gl_cv_func_c99_strtold=no
f199cab1 18303fi
d7ad186c
GM
18304rm -f core conftest.err conftest.$ac_objext \
18305 conftest$ac_exeext conftest.$ac_ext
f199cab1 18306fi
d7ad186c
GM
18307{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_c99_strtold" >&5
18308$as_echo "$gl_cv_func_c99_strtold" >&6; }
18309 if test $gl_cv_func_c99_strtold = yes; then
f199cab1 18310
d7ad186c 18311$as_echo "#define HAVE_C99_STRTOLD 1" >>confdefs.h
f199cab1 18312
5476a9a4 18313 fi
f199cab1 18314
f199cab1 18315
f199cab1
GM
18316
18317
4fda9c95 18318
3bf26e96
GM
18319
18320
eda33f78 18321
d7ad186c
GM
18322 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
18323$as_echo_n "checking if environ is properly declared... " >&6; }
18324 if test "${gt_cv_var_environ_declaration+set}" = set; then :
18325 $as_echo_n "(cached) " >&6
18326else
eda33f78 18327
d7ad186c
GM
18328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18329/* end confdefs.h. */
18330#if HAVE_UNISTD_H
18331 #include <unistd.h>
18332 #endif
18333 /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>. */
18334 #include <stdlib.h>
18335
18336 extern struct { int foo; } environ;
18337int
18338main ()
18339{
18340environ.foo = 1;
18341 ;
18342 return 0;
18343}
18344_ACEOF
18345if ac_fn_c_try_compile "$LINENO"; then :
18346 gt_cv_var_environ_declaration=no
18347else
18348 gt_cv_var_environ_declaration=yes
18349fi
18350rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18351fi
18352
18353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
18354$as_echo "$gt_cv_var_environ_declaration" >&6; }
18355 if test $gt_cv_var_environ_declaration = yes; then
18356
18357$as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
18358
18359 fi
18360
18361
18362 if test $gt_cv_var_environ_declaration != yes; then
18363 HAVE_DECL_ENVIRON=0
18364 fi
18365
18366
18367
3a019ab4
GM
18368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
18369$as_echo_n "checking for complete errno.h... " >&6; }
18370if test "${gl_cv_header_errno_h_complete+set}" = set; then :
18371 $as_echo_n "(cached) " >&6
18372else
18373
18374 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18375/* end confdefs.h. */
18376
18377#include <errno.h>
18378#if !defined ETXTBSY
18379booboo
18380#endif
18381#if !defined ENOMSG
18382booboo
18383#endif
18384#if !defined EIDRM
18385booboo
18386#endif
18387#if !defined ENOLINK
18388booboo
18389#endif
18390#if !defined EPROTO
18391booboo
18392#endif
18393#if !defined EMULTIHOP
18394booboo
18395#endif
18396#if !defined EBADMSG
18397booboo
18398#endif
18399#if !defined EOVERFLOW
18400booboo
18401#endif
18402#if !defined ENOTSUP
18403booboo
18404#endif
18405#if !defined ENETRESET
18406booboo
18407#endif
18408#if !defined ECONNABORTED
18409booboo
18410#endif
18411#if !defined ESTALE
18412booboo
18413#endif
18414#if !defined EDQUOT
18415booboo
18416#endif
18417#if !defined ECANCELED
18418booboo
18419#endif
18420#if !defined EOWNERDEAD
18421booboo
18422#endif
18423#if !defined ENOTRECOVERABLE
18424booboo
18425#endif
18426#if !defined EILSEQ
18427booboo
18428#endif
18429
18430_ACEOF
18431if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18432 $EGREP "booboo" >/dev/null 2>&1; then :
18433 gl_cv_header_errno_h_complete=no
18434else
18435 gl_cv_header_errno_h_complete=yes
18436fi
18437rm -f conftest*
18438
d7ad186c 18439
3a019ab4
GM
18440fi
18441{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
18442$as_echo "$gl_cv_header_errno_h_complete" >&6; }
18443 if test $gl_cv_header_errno_h_complete = yes; then
18444 ERRNO_H=''
18445 else
d7ad186c
GM
18446
18447
18448
18449
18450
d7ad186c
GM
18451
18452
d7ad186c 18453
3a019ab4
GM
18454 if test $gl_cv_have_include_next = yes; then
18455 gl_cv_next_errno_h='<'errno.h'>'
18456 else
18457 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
18458$as_echo_n "checking absolute name of <errno.h>... " >&6; }
18459if test "${gl_cv_next_errno_h+set}" = set; then :
18460 $as_echo_n "(cached) " >&6
d7ad186c
GM
18461else
18462
3a019ab4
GM
18463 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18464/* end confdefs.h. */
18465#include <errno.h>
18466
d7ad186c 18467_ACEOF
3a019ab4
GM
18468 case "$host_os" in
18469 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18470 *) gl_absname_cpp="$ac_cpp" ;;
18471 esac
18472
18473 case "$host_os" in
18474 mingw*)
18475 gl_dirsep_regex='[/\\]'
18476 ;;
18477 *)
18478 gl_dirsep_regex='\/'
18479 ;;
18480 esac
18481 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18482
18483 gl_header_literal_regex=`echo 'errno.h' \
18484 | sed -e "$gl_make_literal_regex_sed"`
18485 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18486 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18487 s|^/[^/]|//&|
18488 p
18489 q
18490 }'
18491 gl_cv_next_errno_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18492 sed -n "$gl_absolute_header_sed"`'"'
d7ad186c 18493
d7ad186c 18494
2407788f 18495fi
3a019ab4
GM
18496{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
18497$as_echo "$gl_cv_next_errno_h" >&6; }
18498 fi
18499 NEXT_ERRNO_H=$gl_cv_next_errno_h
2407788f 18500
3a019ab4
GM
18501 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18502 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18503 gl_next_as_first_directive='<'errno.h'>'
18504 else
18505 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18506 gl_next_as_first_directive=$gl_cv_next_errno_h
18507 fi
18508 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
2407788f 18509
d7ad186c
GM
18510
18511
d7ad186c 18512
3a019ab4
GM
18513 ERRNO_H='errno.h'
18514 fi
18515
18516 if test -n "$ERRNO_H"; then
18517 GL_GENERATE_ERRNO_H_TRUE=
18518 GL_GENERATE_ERRNO_H_FALSE='#'
d7ad186c 18519else
3a019ab4
GM
18520 GL_GENERATE_ERRNO_H_TRUE='#'
18521 GL_GENERATE_ERRNO_H_FALSE=
d7ad186c 18522fi
d7ad186c 18523
d7ad186c 18524
3a019ab4
GM
18525 if test -n "$ERRNO_H"; then
18526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
18527$as_echo_n "checking for EMULTIHOP value... " >&6; }
18528if test "${gl_cv_header_errno_h_EMULTIHOP+set}" = set; then :
18529 $as_echo_n "(cached) " >&6
18530else
d7ad186c 18531
3a019ab4
GM
18532 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18533/* end confdefs.h. */
d7ad186c 18534
3a019ab4
GM
18535#include <errno.h>
18536#ifdef EMULTIHOP
18537yes
18538#endif
d7ad186c 18539
3a019ab4
GM
18540_ACEOF
18541if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18542 $EGREP "yes" >/dev/null 2>&1; then :
18543 gl_cv_header_errno_h_EMULTIHOP=yes
d7ad186c 18544else
3a019ab4 18545 gl_cv_header_errno_h_EMULTIHOP=no
d7ad186c 18546fi
3a019ab4
GM
18547rm -f conftest*
18548
18549 if test $gl_cv_header_errno_h_EMULTIHOP = no; then
18550 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18551/* end confdefs.h. */
18552
18553#define _XOPEN_SOURCE_EXTENDED 1
18554#include <errno.h>
18555#ifdef EMULTIHOP
18556yes
18557#endif
d7ad186c 18558
d7ad186c 18559_ACEOF
3a019ab4
GM
18560if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18561 $EGREP "yes" >/dev/null 2>&1; then :
18562 gl_cv_header_errno_h_EMULTIHOP=hidden
18563fi
18564rm -f conftest*
d7ad186c 18565
3a019ab4
GM
18566 if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
18567 if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP" "
18568#define _XOPEN_SOURCE_EXTENDED 1
18569#include <errno.h>
18570/* The following two lines are a workaround against an autoconf-2.52 bug. */
18571#include <stdio.h>
18572#include <stdlib.h>
18573"; then :
d7ad186c 18574
3a019ab4 18575fi
d7ad186c 18576
3a019ab4
GM
18577 fi
18578 fi
d7ad186c 18579
3a019ab4
GM
18580fi
18581{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
18582$as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
18583 case $gl_cv_header_errno_h_EMULTIHOP in
18584 yes | no)
18585 EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
18586 ;;
18587 *)
18588 EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
18589 ;;
18590 esac
d7ad186c
GM
18591
18592
3a019ab4 18593 fi
d7ad186c
GM
18594
18595
3a019ab4
GM
18596 if test -n "$ERRNO_H"; then
18597 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
18598$as_echo_n "checking for ENOLINK value... " >&6; }
18599if test "${gl_cv_header_errno_h_ENOLINK+set}" = set; then :
d7ad186c
GM
18600 $as_echo_n "(cached) " >&6
18601else
d7ad186c 18602
3a019ab4 18603 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d7ad186c 18604/* end confdefs.h. */
3a019ab4
GM
18605
18606#include <errno.h>
18607#ifdef ENOLINK
18608yes
18609#endif
18610
18611_ACEOF
18612if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18613 $EGREP "yes" >/dev/null 2>&1; then :
18614 gl_cv_header_errno_h_ENOLINK=yes
18615else
18616 gl_cv_header_errno_h_ENOLINK=no
18617fi
18618rm -f conftest*
18619
18620 if test $gl_cv_header_errno_h_ENOLINK = no; then
18621 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18622/* end confdefs.h. */
18623
18624#define _XOPEN_SOURCE_EXTENDED 1
18625#include <errno.h>
18626#ifdef ENOLINK
18627yes
18628#endif
18629
18630_ACEOF
18631if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18632 $EGREP "yes" >/dev/null 2>&1; then :
18633 gl_cv_header_errno_h_ENOLINK=hidden
18634fi
18635rm -f conftest*
18636
18637 if test $gl_cv_header_errno_h_ENOLINK = hidden; then
18638 if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK" "
18639#define _XOPEN_SOURCE_EXTENDED 1
18640#include <errno.h>
18641/* The following two lines are a workaround against an autoconf-2.52 bug. */
18642#include <stdio.h>
18643#include <stdlib.h>
18644"; then :
18645
18646fi
18647
18648 fi
18649 fi
18650
18651fi
18652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
18653$as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; }
18654 case $gl_cv_header_errno_h_ENOLINK in
18655 yes | no)
18656 ENOLINK_HIDDEN=0; ENOLINK_VALUE=
18657 ;;
18658 *)
18659 ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
18660 ;;
18661 esac
18662
18663
18664 fi
18665
18666
18667 if test -n "$ERRNO_H"; then
18668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
18669$as_echo_n "checking for EOVERFLOW value... " >&6; }
18670if test "${gl_cv_header_errno_h_EOVERFLOW+set}" = set; then :
18671 $as_echo_n "(cached) " >&6
18672else
18673
18674 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18675/* end confdefs.h. */
18676
18677#include <errno.h>
18678#ifdef EOVERFLOW
18679yes
18680#endif
18681
18682_ACEOF
18683if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18684 $EGREP "yes" >/dev/null 2>&1; then :
18685 gl_cv_header_errno_h_EOVERFLOW=yes
18686else
18687 gl_cv_header_errno_h_EOVERFLOW=no
18688fi
18689rm -f conftest*
18690
18691 if test $gl_cv_header_errno_h_EOVERFLOW = no; then
18692 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18693/* end confdefs.h. */
18694
18695#define _XOPEN_SOURCE_EXTENDED 1
18696#include <errno.h>
18697#ifdef EOVERFLOW
18698yes
18699#endif
18700
18701_ACEOF
18702if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18703 $EGREP "yes" >/dev/null 2>&1; then :
18704 gl_cv_header_errno_h_EOVERFLOW=hidden
18705fi
18706rm -f conftest*
18707
18708 if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
18709 if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW" "
18710#define _XOPEN_SOURCE_EXTENDED 1
18711#include <errno.h>
18712/* The following two lines are a workaround against an autoconf-2.52 bug. */
18713#include <stdio.h>
18714#include <stdlib.h>
18715"; then :
18716
18717fi
18718
18719 fi
18720 fi
18721
18722fi
18723{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
18724$as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
18725 case $gl_cv_header_errno_h_EOVERFLOW in
18726 yes | no)
18727 EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
18728 ;;
18729 *)
18730 EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
18731 ;;
18732 esac
18733
18734
18735 fi
18736
18737
18738
18739
18740
18741
18742
18743
18744
18745
18746 GNULIB_FCNTL=0;
18747 GNULIB_NONBLOCKING=0;
18748 GNULIB_OPEN=0;
18749 GNULIB_OPENAT=0;
18750 HAVE_FCNTL=1;
18751 HAVE_OPENAT=1;
18752 REPLACE_FCNTL=0;
18753 REPLACE_OPEN=0;
18754 REPLACE_OPENAT=0;
18755
18756
0cdca42a
GM
18757
18758
3a019ab4
GM
18759ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
18760if test "x$ac_cv_type_mode_t" = x""yes; then :
18761
18762else
18763
18764cat >>confdefs.h <<_ACEOF
18765#define mode_t int
18766_ACEOF
18767
18768fi
18769
18770ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "$ac_includes_default"
18771if test "x$ac_cv_have_decl_fdatasync" = x""yes; then :
18772 ac_have_decl=1
18773else
18774 ac_have_decl=0
18775fi
18776
18777cat >>confdefs.h <<_ACEOF
18778#define HAVE_DECL_FDATASYNC $ac_have_decl
18779_ACEOF
18780
18781
18782
18783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for st_dm_mode in struct stat" >&5
18784$as_echo_n "checking for st_dm_mode in struct stat... " >&6; }
18785if test "${ac_cv_struct_st_dm_mode+set}" = set; then :
18786 $as_echo_n "(cached) " >&6
18787else
18788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18789/* end confdefs.h. */
18790
18791#include <sys/types.h>
18792#include <sys/stat.h>
18793int
18794main ()
18795{
18796struct stat s; s.st_dm_mode;
18797 ;
18798 return 0;
18799}
18800_ACEOF
18801if ac_fn_c_try_compile "$LINENO"; then :
18802 ac_cv_struct_st_dm_mode=yes
18803else
18804 ac_cv_struct_st_dm_mode=no
18805fi
18806rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18807fi
18808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_st_dm_mode" >&5
18809$as_echo "$ac_cv_struct_st_dm_mode" >&6; }
18810
18811 if test $ac_cv_struct_st_dm_mode = yes; then
18812
18813$as_echo "#define HAVE_ST_DM_MODE 1" >>confdefs.h
18814
18815 fi
18816
18817
18818ac_fn_c_check_decl "$LINENO" "strmode" "ac_cv_have_decl_strmode" "$ac_includes_default"
18819if test "x$ac_cv_have_decl_strmode" = x""yes; then :
18820 ac_have_decl=1
18821else
18822 ac_have_decl=0
18823fi
18824
18825cat >>confdefs.h <<_ACEOF
18826#define HAVE_DECL_STRMODE $ac_have_decl
18827_ACEOF
18828
18829
18830
18831
3a019ab4
GM
18832 GNULIB_FCHMODAT=0;
18833 GNULIB_FSTAT=0;
18834 GNULIB_FSTATAT=0;
18835 GNULIB_FUTIMENS=0;
18836 GNULIB_LCHMOD=0;
18837 GNULIB_LSTAT=0;
18838 GNULIB_MKDIRAT=0;
18839 GNULIB_MKFIFO=0;
18840 GNULIB_MKFIFOAT=0;
18841 GNULIB_MKNOD=0;
18842 GNULIB_MKNODAT=0;
18843 GNULIB_STAT=0;
18844 GNULIB_UTIMENSAT=0;
18845 HAVE_FCHMODAT=1;
18846 HAVE_FSTATAT=1;
18847 HAVE_FUTIMENS=1;
18848 HAVE_LCHMOD=1;
18849 HAVE_LSTAT=1;
18850 HAVE_MKDIRAT=1;
18851 HAVE_MKFIFO=1;
18852 HAVE_MKFIFOAT=1;
18853 HAVE_MKNOD=1;
18854 HAVE_MKNODAT=1;
18855 HAVE_UTIMENSAT=1;
18856 REPLACE_FSTAT=0;
18857 REPLACE_FSTATAT=0;
18858 REPLACE_FUTIMENS=0;
18859 REPLACE_LSTAT=0;
18860 REPLACE_MKDIR=0;
18861 REPLACE_MKFIFO=0;
18862 REPLACE_MKNOD=0;
18863 REPLACE_STAT=0;
18864 REPLACE_UTIMENSAT=0;
18865
18866
18867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
18868$as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
18869if test "${gl_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then :
18870 $as_echo_n "(cached) " >&6
18871else
18872 rm -f conftest.sym conftest.file
18873 echo >conftest.file
18874 if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then
18875 if test "$cross_compiling" = yes; then :
18876 case "$host_os" in
18877 # Guess yes on glibc systems.
18878 *-gnu*) gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
18879 # If we don't know, assume the worst.
18880 *) gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
18881 esac
18882
18883else
18884 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18885/* end confdefs.h. */
18886$ac_includes_default
18887int
18888main ()
18889{
18890struct stat sbuf;
18891 /* Linux will dereference the symlink and fail, as required by
d7ad186c
GM
18892 POSIX. That is better in the sense that it means we will not
18893 have to compile and use the lstat wrapper. */
18894 return lstat ("conftest.sym/", &sbuf) == 0;
18895
18896 ;
18897 return 0;
18898}
18899_ACEOF
18900if ac_fn_c_try_run "$LINENO"; then :
18901 gl_cv_func_lstat_dereferences_slashed_symlink=yes
18902else
18903 gl_cv_func_lstat_dereferences_slashed_symlink=no
18904fi
18905rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18906 conftest.$ac_objext conftest.beam conftest.$ac_ext
18907fi
18908
18909 else
18910 # If the 'ln -s' command failed, then we probably don't even
18911 # have an lstat function.
18912 gl_cv_func_lstat_dereferences_slashed_symlink="guessing no"
18913 fi
18914 rm -f conftest.sym conftest.file
18915
18916fi
18917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
18918$as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
18919 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
18920 *yes)
18921
18922cat >>confdefs.h <<_ACEOF
18923#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
18924_ACEOF
18925
18926 ;;
18927 esac
18928
18929
18930
18931
2407788f
GM
18932
18933
d7ad186c
GM
18934 GNULIB__EXIT=0;
18935 GNULIB_ATOLL=0;
18936 GNULIB_CALLOC_POSIX=0;
18937 GNULIB_CANONICALIZE_FILE_NAME=0;
18938 GNULIB_GETLOADAVG=0;
18939 GNULIB_GETSUBOPT=0;
18940 GNULIB_GRANTPT=0;
5476a9a4
GM
18941 GNULIB_MALLOC_POSIX=0;
18942 GNULIB_MBTOWC=0;
18943 GNULIB_MKDTEMP=0;
18944 GNULIB_MKOSTEMP=0;
18945 GNULIB_MKOSTEMPS=0;
18946 GNULIB_MKSTEMP=0;
18947 GNULIB_MKSTEMPS=0;
18948 GNULIB_POSIX_OPENPT=0;
18949 GNULIB_PTSNAME=0;
18950 GNULIB_PTSNAME_R=0;
18951 GNULIB_PUTENV=0;
18952 GNULIB_RANDOM=0;
18953 GNULIB_RANDOM_R=0;
18954 GNULIB_REALLOC_POSIX=0;
18955 GNULIB_REALPATH=0;
18956 GNULIB_RPMATCH=0;
2cdd55fc 18957 GNULIB_SECURE_GETENV=0;
5476a9a4
GM
18958 GNULIB_SETENV=0;
18959 GNULIB_STRTOD=0;
18960 GNULIB_STRTOLL=0;
18961 GNULIB_STRTOULL=0;
18962 GNULIB_SYSTEM_POSIX=0;
18963 GNULIB_UNLOCKPT=0;
18964 GNULIB_UNSETENV=0;
18965 GNULIB_WCTOMB=0;
18966 HAVE__EXIT=1;
18967 HAVE_ATOLL=1;
18968 HAVE_CANONICALIZE_FILE_NAME=1;
18969 HAVE_DECL_GETLOADAVG=1;
18970 HAVE_GETSUBOPT=1;
18971 HAVE_GRANTPT=1;
18972 HAVE_MKDTEMP=1;
18973 HAVE_MKOSTEMP=1;
18974 HAVE_MKOSTEMPS=1;
18975 HAVE_MKSTEMP=1;
18976 HAVE_MKSTEMPS=1;
18977 HAVE_POSIX_OPENPT=1;
18978 HAVE_PTSNAME=1;
18979 HAVE_PTSNAME_R=1;
18980 HAVE_RANDOM=1;
18981 HAVE_RANDOM_H=1;
18982 HAVE_RANDOM_R=1;
18983 HAVE_REALPATH=1;
18984 HAVE_RPMATCH=1;
2cdd55fc 18985 HAVE_SECURE_GETENV=1;
5476a9a4
GM
18986 HAVE_SETENV=1;
18987 HAVE_DECL_SETENV=1;
18988 HAVE_STRTOD=1;
18989 HAVE_STRTOLL=1;
18990 HAVE_STRTOULL=1;
18991 HAVE_STRUCT_RANDOM_DATA=1;
18992 HAVE_SYS_LOADAVG_H=0;
18993 HAVE_UNLOCKPT=1;
18994 HAVE_DECL_UNSETENV=1;
18995 REPLACE_CALLOC=0;
18996 REPLACE_CANONICALIZE_FILE_NAME=0;
18997 REPLACE_MALLOC=0;
18998 REPLACE_MBTOWC=0;
18999 REPLACE_MKSTEMP=0;
b6c9d18d 19000 REPLACE_PTSNAME=0;
5476a9a4
GM
19001 REPLACE_PTSNAME_R=0;
19002 REPLACE_PUTENV=0;
19003 REPLACE_RANDOM_R=0;
19004 REPLACE_REALLOC=0;
19005 REPLACE_REALPATH=0;
19006 REPLACE_SETENV=0;
19007 REPLACE_STRTOD=0;
19008 REPLACE_UNSETENV=0;
19009 REPLACE_WCTOMB=0;
f199cab1
GM
19010
19011
19012
f199cab1
GM
19013
19014
19015
19016
19017
19018
19019
19020
19021
19022
5f90be1b 19023
f199cab1
GM
19024
19025
19026 if test $gl_cv_have_include_next = yes; then
5476a9a4 19027 gl_cv_next_getopt_h='<'getopt.h'>'
f199cab1 19028 else
5476a9a4
GM
19029 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <getopt.h>" >&5
19030$as_echo_n "checking absolute name of <getopt.h>... " >&6; }
19031if test "${gl_cv_next_getopt_h+set}" = set; then :
5f90be1b 19032 $as_echo_n "(cached) " >&6
5f90be1b 19033else
f199cab1 19034
5476a9a4 19035 if test $ac_cv_header_getopt_h = yes; then
f199cab1
GM
19036
19037
19038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5f90be1b 19039/* end confdefs.h. */
5476a9a4 19040#include <getopt.h>
4fda9c95 19041
5f90be1b 19042_ACEOF
f199cab1
GM
19043 case "$host_os" in
19044 aix*) gl_absname_cpp="$ac_cpp -C" ;;
19045 *) gl_absname_cpp="$ac_cpp" ;;
19046 esac
5f90be1b 19047
f199cab1
GM
19048 case "$host_os" in
19049 mingw*)
19050 gl_dirsep_regex='[/\\]'
19051 ;;
19052 *)
19053 gl_dirsep_regex='\/'
19054 ;;
19055 esac
19056 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
5f90be1b 19057
5476a9a4 19058 gl_header_literal_regex=`echo 'getopt.h' \
f199cab1
GM
19059 | sed -e "$gl_make_literal_regex_sed"`
19060 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19061 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19062 s|^/[^/]|//&|
19063 p
19064 q
19065 }'
5476a9a4 19066 gl_cv_next_getopt_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
f199cab1
GM
19067 sed -n "$gl_absolute_header_sed"`'"'
19068 else
5476a9a4 19069 gl_cv_next_getopt_h='<'getopt.h'>'
f199cab1 19070 fi
5f90be1b
PE
19071
19072
3e0be4ab 19073fi
5476a9a4
GM
19074{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5
19075$as_echo "$gl_cv_next_getopt_h" >&6; }
f199cab1 19076 fi
5476a9a4 19077 NEXT_GETOPT_H=$gl_cv_next_getopt_h
3e0be4ab 19078
f199cab1
GM
19079 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19080 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
5476a9a4 19081 gl_next_as_first_directive='<'getopt.h'>'
f199cab1
GM
19082 else
19083 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
5476a9a4 19084 gl_next_as_first_directive=$gl_cv_next_getopt_h
f199cab1 19085 fi
5476a9a4 19086 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive
f199cab1
GM
19087
19088
f199cab1 19089
f199cab1 19090
5476a9a4
GM
19091 if test $ac_cv_header_getopt_h = yes; then
19092 HAVE_GETOPT_H=1
19093 else
19094 HAVE_GETOPT_H=0
f199cab1
GM
19095 fi
19096
f199cab1 19097
5476a9a4 19098 gl_replace_getopt=
f199cab1 19099
5476a9a4
GM
19100 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
19101 for ac_header in getopt.h
19102do :
19103 ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
19104if test "x$ac_cv_header_getopt_h" = x""yes; then :
19105 cat >>confdefs.h <<_ACEOF
19106#define HAVE_GETOPT_H 1
19107_ACEOF
f199cab1 19108
5476a9a4
GM
19109else
19110 gl_replace_getopt=yes
3e0be4ab 19111fi
3e0be4ab 19112
5476a9a4 19113done
3e0be4ab 19114
5476a9a4 19115 fi
3e0be4ab 19116
5476a9a4
GM
19117 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
19118 for ac_func in getopt_long_only
19119do :
19120 ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only"
19121if test "x$ac_cv_func_getopt_long_only" = x""yes; then :
19122 cat >>confdefs.h <<_ACEOF
19123#define HAVE_GETOPT_LONG_ONLY 1
19124_ACEOF
3e0be4ab 19125
3e0be4ab 19126else
5476a9a4 19127 gl_replace_getopt=yes
3e0be4ab 19128fi
5476a9a4 19129done
3e0be4ab 19130
f199cab1 19131 fi
3e0be4ab 19132
5476a9a4
GM
19133 if test -z "$gl_replace_getopt"; then
19134 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5
19135$as_echo_n "checking whether getopt is POSIX compatible... " >&6; }
19136if test "${gl_cv_func_getopt_posix+set}" = set; then :
3e0be4ab 19137 $as_echo_n "(cached) " >&6
5476a9a4
GM
19138else
19139
19140 if test $cross_compiling = no; then
19141 if test "$cross_compiling" = yes; then :
19142 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19143$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19144as_fn_error "cannot run test program while cross compiling
19145See \`config.log' for more details." "$LINENO" 5; }
3e0be4ab 19146else
f199cab1 19147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3e0be4ab 19148/* end confdefs.h. */
5476a9a4
GM
19149
19150#include <unistd.h>
19151#include <stdlib.h>
19152#include <string.h>
19153
f199cab1
GM
19154int
19155main ()
19156{
5476a9a4
GM
19157 static char program[] = "program";
19158 static char a[] = "-a";
19159 static char foo[] = "foo";
19160 static char bar[] = "bar";
19161 char *argv[] = { program, a, foo, bar, NULL };
19162 int c;
19163
19164 c = getopt (4, argv, "ab");
19165 if (!(c == 'a'))
19166 return 1;
19167 c = getopt (4, argv, "ab");
19168 if (!(c == -1))
19169 return 2;
19170 if (!(optind == 2))
19171 return 3;
f199cab1
GM
19172 return 0;
19173}
19174
3e0be4ab 19175_ACEOF
5476a9a4
GM
19176if ac_fn_c_try_run "$LINENO"; then :
19177 gl_cv_func_getopt_posix=maybe
3e0be4ab 19178else
5476a9a4 19179 gl_cv_func_getopt_posix=no
3e0be4ab 19180fi
5476a9a4
GM
19181rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19182 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1
GM
19183fi
19184
5476a9a4
GM
19185 if test $gl_cv_func_getopt_posix = maybe; then
19186 if test "$cross_compiling" = yes; then :
19187 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19188$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19189as_fn_error "cannot run test program while cross compiling
19190See \`config.log' for more details." "$LINENO" 5; }
3e0be4ab 19191else
5476a9a4
GM
19192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19193/* end confdefs.h. */
3e0be4ab 19194
5476a9a4
GM
19195#include <unistd.h>
19196#include <stdlib.h>
19197#include <string.h>
3e0be4ab 19198
5476a9a4
GM
19199int
19200main ()
19201{
19202 static char program[] = "program";
19203 static char donald[] = "donald";
19204 static char p[] = "-p";
19205 static char billy[] = "billy";
19206 static char duck[] = "duck";
19207 static char a[] = "-a";
19208 static char bar[] = "bar";
19209 char *argv[] = { program, donald, p, billy, duck, a, bar, NULL };
19210 int c;
3e0be4ab 19211
5476a9a4
GM
19212 c = getopt (7, argv, "+abp:q:");
19213 if (!(c == -1))
19214 return 4;
19215 if (!(strcmp (argv[0], "program") == 0))
19216 return 5;
19217 if (!(strcmp (argv[1], "donald") == 0))
19218 return 6;
19219 if (!(strcmp (argv[2], "-p") == 0))
19220 return 7;
19221 if (!(strcmp (argv[3], "billy") == 0))
19222 return 8;
19223 if (!(strcmp (argv[4], "duck") == 0))
19224 return 9;
19225 if (!(strcmp (argv[5], "-a") == 0))
19226 return 10;
19227 if (!(strcmp (argv[6], "bar") == 0))
19228 return 11;
19229 if (!(optind == 1))
19230 return 12;
19231 return 0;
19232}
3e0be4ab
GM
19233
19234_ACEOF
5476a9a4
GM
19235if ac_fn_c_try_run "$LINENO"; then :
19236 gl_cv_func_getopt_posix=maybe
19237else
19238 gl_cv_func_getopt_posix=no
19239fi
19240rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19241 conftest.$ac_objext conftest.beam conftest.$ac_ext
19242fi
b0415a03 19243
5476a9a4
GM
19244 fi
19245 if test $gl_cv_func_getopt_posix = maybe; then
19246 if test "$cross_compiling" = yes; then :
19247 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19248$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19249as_fn_error "cannot run test program while cross compiling
19250See \`config.log' for more details." "$LINENO" 5; }
19251else
19252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19253/* end confdefs.h. */
b0415a03 19254
5476a9a4
GM
19255#include <unistd.h>
19256#include <stdlib.h>
19257#include <string.h>
3e0be4ab 19258
5476a9a4
GM
19259int
19260main ()
19261{
19262 static char program[] = "program";
19263 static char ab[] = "-ab";
19264 char *argv[3] = { program, ab, NULL };
19265 if (getopt (2, argv, "ab:") != 'a')
19266 return 13;
19267 if (getopt (2, argv, "ab:") != '?')
19268 return 14;
19269 if (optopt != 'b')
19270 return 15;
19271 if (optind != 2)
19272 return 16;
19273 return 0;
19274}
3e0be4ab 19275
5476a9a4
GM
19276_ACEOF
19277if ac_fn_c_try_run "$LINENO"; then :
19278 gl_cv_func_getopt_posix=yes
19279else
19280 gl_cv_func_getopt_posix=no
19281fi
19282rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19283 conftest.$ac_objext conftest.beam conftest.$ac_ext
3e0be4ab 19284fi
3e0be4ab 19285
5476a9a4
GM
19286 fi
19287 else
19288 case "$host_os" in
19289 darwin* | aix* | mingw*) gl_cv_func_getopt_posix="guessing no";;
19290 *) gl_cv_func_getopt_posix="guessing yes";;
19291 esac
19292 fi
3e0be4ab 19293
5476a9a4
GM
19294fi
19295{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5
19296$as_echo "$gl_cv_func_getopt_posix" >&6; }
19297 case "$gl_cv_func_getopt_posix" in
19298 *no) gl_replace_getopt=yes ;;
19299 esac
3e0be4ab
GM
19300 fi
19301
5476a9a4
GM
19302 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
19303 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5
19304$as_echo_n "checking for working GNU getopt function... " >&6; }
19305if test "${gl_cv_func_getopt_gnu+set}" = set; then :
19306 $as_echo_n "(cached) " >&6
19307else
19308 # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the
19309 # optstring is necessary for programs like m4 that have POSIX-mandated
19310 # semantics for supporting options interspersed with files.
19311 # Also, since getopt_long is a GNU extension, we require optind=0.
19312 # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT;
19313 # so take care to revert to the correct (non-)export state.
19314 gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }'
19315 case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in
19316 xx) gl_had_POSIXLY_CORRECT=exported ;;
19317 x) gl_had_POSIXLY_CORRECT=yes ;;
19318 *) gl_had_POSIXLY_CORRECT= ;;
19319 esac
19320 POSIXLY_CORRECT=1
19321 export POSIXLY_CORRECT
19322 if test "$cross_compiling" = yes; then :
19323 gl_cv_func_getopt_gnu="guessing no"
3e0be4ab 19324
5476a9a4
GM
19325else
19326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19327/* end confdefs.h. */
19328#include <getopt.h>
19329 #include <stddef.h>
19330 #include <string.h>
3e0be4ab 19331
5476a9a4
GM
19332#include <stdlib.h>
19333#if defined __MACH__ && defined __APPLE__
19334/* Avoid a crash on Mac OS X. */
19335#include <mach/mach.h>
19336#include <mach/mach_error.h>
19337#include <mach/thread_status.h>
19338#include <mach/exception.h>
19339#include <mach/task.h>
19340#include <pthread.h>
19341/* The exception port on which our thread listens. */
19342static mach_port_t our_exception_port;
19343/* The main function of the thread listening for exceptions of type
19344 EXC_BAD_ACCESS. */
19345static void *
19346mach_exception_thread (void *arg)
19347{
19348 /* Buffer for a message to be received. */
19349 struct {
19350 mach_msg_header_t head;
19351 mach_msg_body_t msgh_body;
19352 char data[1024];
19353 } msg;
19354 mach_msg_return_t retval;
19355 /* Wait for a message on the exception port. */
19356 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
19357 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
19358 if (retval != MACH_MSG_SUCCESS)
19359 abort ();
19360 exit (1);
19361}
19362static void
19363nocrash_init (void)
19364{
19365 mach_port_t self = mach_task_self ();
19366 /* Allocate a port on which the thread shall listen for exceptions. */
19367 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
19368 == KERN_SUCCESS) {
19369 /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
19370 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
19371 MACH_MSG_TYPE_MAKE_SEND)
19372 == KERN_SUCCESS) {
19373 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
19374 for us. */
19375 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
19376 /* Create the thread listening on the exception port. */
19377 pthread_attr_t attr;
19378 pthread_t thread;
19379 if (pthread_attr_init (&attr) == 0
19380 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
19381 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
19382 pthread_attr_destroy (&attr);
19383 /* Replace the exception port info for these exceptions with our own.
19384 Note that we replace the exception port for the entire task, not only
19385 for a particular thread. This has the effect that when our exception
19386 port gets the message, the thread specific exception port has already
19387 been asked, and we don't need to bother about it.
19388 See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
19389 task_set_exception_ports (self, mask, our_exception_port,
19390 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
19391 }
19392 }
19393 }
19394}
19395#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
19396/* Avoid a crash on native Windows. */
19397#define WIN32_LEAN_AND_MEAN
19398#include <windows.h>
19399#include <winerror.h>
19400static LONG WINAPI
19401exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
19402{
19403 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
19404 {
19405 case EXCEPTION_ACCESS_VIOLATION:
19406 case EXCEPTION_IN_PAGE_ERROR:
19407 case EXCEPTION_STACK_OVERFLOW:
19408 case EXCEPTION_GUARD_PAGE:
19409 case EXCEPTION_PRIV_INSTRUCTION:
19410 case EXCEPTION_ILLEGAL_INSTRUCTION:
19411 case EXCEPTION_DATATYPE_MISALIGNMENT:
19412 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
19413 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
19414 exit (1);
19415 }
19416 return EXCEPTION_CONTINUE_SEARCH;
19417}
19418static void
19419nocrash_init (void)
19420{
19421 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
19422}
19423#else
19424/* Avoid a crash on POSIX systems. */
19425#include <signal.h>
19426/* A POSIX signal handler. */
19427static void
19428exception_handler (int sig)
19429{
19430 exit (1);
19431}
19432static void
19433nocrash_init (void)
19434{
19435#ifdef SIGSEGV
19436 signal (SIGSEGV, exception_handler);
19437#endif
19438#ifdef SIGBUS
19439 signal (SIGBUS, exception_handler);
19440#endif
19441}
19442#endif
3e0be4ab 19443
3e0be4ab 19444
5476a9a4
GM
19445int
19446main ()
19447{
3e0be4ab 19448
5476a9a4 19449 int result = 0;
3e0be4ab 19450
5476a9a4 19451 nocrash_init();
3e0be4ab 19452
5476a9a4
GM
19453 /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
19454 and fails on Mac OS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
19455 OSF/1 5.1, Solaris 10. */
19456 {
19457 static char conftest[] = "conftest";
19458 static char plus[] = "-+";
19459 char *argv[3] = { conftest, plus, NULL };
19460 opterr = 0;
19461 if (getopt (2, argv, "+a") != '?')
19462 result |= 1;
19463 }
19464 /* This code succeeds on glibc 2.8, mingw,
19465 and fails on Mac OS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
19466 IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */
19467 {
19468 static char program[] = "program";
19469 static char p[] = "-p";
19470 static char foo[] = "foo";
19471 static char bar[] = "bar";
19472 char *argv[] = { program, p, foo, bar, NULL };
3e0be4ab 19473
5476a9a4
GM
19474 optind = 1;
19475 if (getopt (4, argv, "p::") != 'p')
19476 result |= 2;
19477 else if (optarg != NULL)
19478 result |= 4;
19479 else if (getopt (4, argv, "p::") != -1)
19480 result |= 6;
19481 else if (optind != 2)
19482 result |= 8;
19483 }
19484 /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */
19485 {
19486 static char program[] = "program";
19487 static char foo[] = "foo";
19488 static char p[] = "-p";
19489 char *argv[] = { program, foo, p, NULL };
19490 optind = 0;
19491 if (getopt (3, argv, "-p") != 1)
19492 result |= 16;
19493 else if (getopt (3, argv, "-p") != 'p')
19494 result |= 16;
19495 }
19496 /* This code fails on glibc 2.11. */
19497 {
19498 static char program[] = "program";
19499 static char b[] = "-b";
19500 static char a[] = "-a";
19501 char *argv[] = { program, b, a, NULL };
19502 optind = opterr = 0;
19503 if (getopt (3, argv, "+:a:b") != 'b')
19504 result |= 32;
19505 else if (getopt (3, argv, "+:a:b") != ':')
19506 result |= 32;
19507 }
19508 /* This code dumps core on glibc 2.14. */
19509 {
19510 static char program[] = "program";
19511 static char w[] = "-W";
19512 static char dummy[] = "dummy";
19513 char *argv[] = { program, w, dummy, NULL };
19514 optind = opterr = 1;
19515 if (getopt (3, argv, "W;") != 'W')
19516 result |= 64;
19517 }
19518 return result;
3e0be4ab 19519
5476a9a4
GM
19520 ;
19521 return 0;
19522}
19523_ACEOF
19524if ac_fn_c_try_run "$LINENO"; then :
19525 gl_cv_func_getopt_gnu=yes
19526else
19527 gl_cv_func_getopt_gnu=no
19528fi
19529rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19530 conftest.$ac_objext conftest.beam conftest.$ac_ext
19531fi
3e0be4ab 19532
5476a9a4
GM
19533 case $gl_had_POSIXLY_CORRECT in
19534 exported) ;;
19535 yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;;
19536 *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;;
19537 esac
3e0be4ab 19538
5476a9a4
GM
19539fi
19540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5
19541$as_echo "$gl_cv_func_getopt_gnu" >&6; }
19542 if test "$gl_cv_func_getopt_gnu" != yes; then
19543 gl_replace_getopt=yes
19544 else
19545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt_long function" >&5
19546$as_echo_n "checking for working GNU getopt_long function... " >&6; }
19547if test "${gl_cv_func_getopt_long_gnu+set}" = set; then :
f199cab1
GM
19548 $as_echo_n "(cached) " >&6
19549else
5476a9a4
GM
19550 if test "$cross_compiling" = yes; then :
19551 case "$host_os" in
19552 openbsd*) gl_cv_func_getopt_long_gnu="guessing no";;
19553 *) gl_cv_func_getopt_long_gnu="guessing yes";;
19554 esac
3e0be4ab
GM
19555
19556else
19557 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19558/* end confdefs.h. */
5476a9a4
GM
19559#include <getopt.h>
19560 #include <stddef.h>
19561 #include <string.h>
f199cab1
GM
19562
19563int
19564main ()
369e19fc 19565{
5476a9a4
GM
19566static const struct option long_options[] =
19567 {
19568 { "xtremely-",no_argument, NULL, 1003 },
19569 { "xtra", no_argument, NULL, 1001 },
19570 { "xtreme", no_argument, NULL, 1002 },
19571 { "xtremely", no_argument, NULL, 1003 },
19572 { NULL, 0, NULL, 0 }
19573 };
19574 /* This code fails on OpenBSD 5.0. */
19575 {
19576 static char program[] = "program";
19577 static char xtremel[] = "--xtremel";
19578 char *argv[] = { program, xtremel, NULL };
19579 int option_index;
19580 optind = 1; opterr = 0;
19581 if (getopt_long (2, argv, "", long_options, &option_index) != 1003)
19582 return 1;
19583 }
19584 return 0;
f199cab1
GM
19585
19586 ;
19587 return 0;
369e19fc 19588}
f199cab1
GM
19589_ACEOF
19590if ac_fn_c_try_run "$LINENO"; then :
5476a9a4 19591 gl_cv_func_getopt_long_gnu=yes
f199cab1 19592else
5476a9a4 19593 gl_cv_func_getopt_long_gnu=no
f199cab1
GM
19594fi
19595rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19596 conftest.$ac_objext conftest.beam conftest.$ac_ext
19597fi
19598
5476a9a4 19599
f199cab1 19600fi
5476a9a4
GM
19601{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_long_gnu" >&5
19602$as_echo "$gl_cv_func_getopt_long_gnu" >&6; }
19603 case "$gl_cv_func_getopt_long_gnu" in
19604 *yes) ;;
19605 *) gl_replace_getopt=yes ;;
19606 esac
19607 fi
19608 fi
f199cab1 19609
f199cab1 19610
f199cab1 19611
369e19fc
PE
19612
19613
5476a9a4
GM
19614
19615 REPLACE_GETOPT=0
19616 if test -n "$gl_replace_getopt"; then
19617 REPLACE_GETOPT=1
f199cab1 19618 fi
3e0be4ab 19619
5476a9a4 19620 if test $REPLACE_GETOPT = 1; then
369e19fc 19621
5476a9a4 19622 GETOPT_H=getopt.h
369e19fc 19623
5476a9a4 19624$as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
6ad6792b
GM
19625
19626
f199cab1 19627
5476a9a4 19628 fi
f199cab1 19629
5476a9a4
GM
19630ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default"
19631if test "x$ac_cv_have_decl_getenv" = x""yes; then :
19632 ac_have_decl=1
3e0be4ab 19633else
5476a9a4 19634 ac_have_decl=0
3e0be4ab 19635fi
e275c824 19636
5476a9a4
GM
19637cat >>confdefs.h <<_ACEOF
19638#define HAVE_DECL_GETENV $ac_have_decl
19639_ACEOF
19640
a6342fc8 19641:
f199cab1 19642
5476a9a4
GM
19643
19644
19645
19646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
19647$as_echo_n "checking for C/C++ restrict keyword... " >&6; }
19648if test "${ac_cv_c_restrict+set}" = set; then :
19649 $as_echo_n "(cached) " >&6
f199cab1 19650else
5476a9a4
GM
19651 ac_cv_c_restrict=no
19652 # The order here caters to the fact that C++ does not require restrict.
19653 for ac_kw in __restrict __restrict__ _Restrict restrict; do
19654 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 19655/* end confdefs.h. */
5476a9a4
GM
19656typedef int * int_ptr;
19657 int foo (int_ptr $ac_kw ip) {
19658 return ip[0];
19659 }
f199cab1
GM
19660int
19661main ()
19662{
5476a9a4
GM
19663int s[1];
19664 int * $ac_kw t = s;
19665 t[0] = 0;
19666 return foo(t)
f199cab1
GM
19667 ;
19668 return 0;
19669}
19670_ACEOF
5476a9a4
GM
19671if ac_fn_c_try_compile "$LINENO"; then :
19672 ac_cv_c_restrict=$ac_kw
f199cab1 19673fi
5476a9a4
GM
19674rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19675 test "$ac_cv_c_restrict" != no && break
19676 done
f199cab1 19677
f199cab1 19678fi
5476a9a4
GM
19679{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
19680$as_echo "$ac_cv_c_restrict" >&6; }
f199cab1 19681
5476a9a4
GM
19682 case $ac_cv_c_restrict in
19683 restrict) ;;
19684 no) $as_echo "#define restrict /**/" >>confdefs.h
19685 ;;
19686 *) cat >>confdefs.h <<_ACEOF
19687#define restrict $ac_cv_c_restrict
19688_ACEOF
19689 ;;
19690 esac
f199cab1 19691
f199cab1 19692
5476a9a4
GM
19693 GNULIB_GETTIMEOFDAY=0;
19694 HAVE_GETTIMEOFDAY=1;
19695 HAVE_STRUCT_TIMEVAL=1;
19696 HAVE_SYS_TIME_H=1;
19697 REPLACE_GETTIMEOFDAY=0;
19698 REPLACE_STRUCT_TIMEVAL=0;
e275c824 19699
e275c824 19700
e275c824 19701
e275c824 19702
4fda9c95 19703
5fa4ac76 19704
5fa4ac76 19705
5fa4ac76 19706
f199cab1
GM
19707
19708
19709
5fa4ac76 19710
5fa4ac76 19711
5fa4ac76 19712
5fa4ac76 19713
5fa4ac76 19714
5476a9a4
GM
19715 if test $gl_cv_have_include_next = yes; then
19716 gl_cv_next_sys_time_h='<'sys/time.h'>'
19717 else
19718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
19719$as_echo_n "checking absolute name of <sys/time.h>... " >&6; }
19720if test "${gl_cv_next_sys_time_h+set}" = set; then :
19721 $as_echo_n "(cached) " >&6
19722else
5fa4ac76 19723
5476a9a4 19724 if test $ac_cv_header_sys_time_h = yes; then
5fa4ac76
PE
19725
19726
5476a9a4
GM
19727 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19728/* end confdefs.h. */
19729#include <sys/time.h>
5fa4ac76 19730
5476a9a4
GM
19731_ACEOF
19732 case "$host_os" in
19733 aix*) gl_absname_cpp="$ac_cpp -C" ;;
19734 *) gl_absname_cpp="$ac_cpp" ;;
19735 esac
1f5d53eb 19736
5476a9a4
GM
19737 case "$host_os" in
19738 mingw*)
19739 gl_dirsep_regex='[/\\]'
19740 ;;
19741 *)
19742 gl_dirsep_regex='\/'
19743 ;;
19744 esac
19745 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
1f5d53eb 19746
5476a9a4
GM
19747 gl_header_literal_regex=`echo 'sys/time.h' \
19748 | sed -e "$gl_make_literal_regex_sed"`
19749 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19750 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19751 s|^/[^/]|//&|
19752 p
19753 q
19754 }'
19755 gl_cv_next_sys_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19756 sed -n "$gl_absolute_header_sed"`'"'
19757 else
19758 gl_cv_next_sys_time_h='<'sys/time.h'>'
19759 fi
1f5d53eb 19760
1f5d53eb 19761
5476a9a4
GM
19762fi
19763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
19764$as_echo "$gl_cv_next_sys_time_h" >&6; }
19765 fi
19766 NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
3e0be4ab 19767
5476a9a4
GM
19768 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19769 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19770 gl_next_as_first_directive='<'sys/time.h'>'
19771 else
19772 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19773 gl_next_as_first_directive=$gl_cv_next_sys_time_h
19774 fi
19775 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
3e0be4ab 19776
e275c824 19777
3e0be4ab 19778
f199cab1
GM
19779
19780
5476a9a4
GM
19781 if test $ac_cv_header_sys_time_h != yes; then
19782 HAVE_SYS_TIME_H=0
19783 fi
f199cab1
GM
19784
19785
19786
19787
19788
5476a9a4
GM
19789 if test $ac_cv_header_sys_socket_h != yes; then
19790 for ac_header in winsock2.h
19791do :
19792 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
19793if test "x$ac_cv_header_winsock2_h" = x""yes; then :
19794 cat >>confdefs.h <<_ACEOF
19795#define HAVE_WINSOCK2_H 1
19796_ACEOF
f199cab1 19797
5476a9a4 19798fi
3e0be4ab 19799
5476a9a4 19800done
3e0be4ab 19801
5476a9a4
GM
19802 fi
19803 if test "$ac_cv_header_winsock2_h" = yes; then
19804 HAVE_WINSOCK2_H=1
19805 UNISTD_H_HAVE_WINSOCK2_H=1
19806 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
19807 else
19808 HAVE_WINSOCK2_H=0
19809 fi
19810
19811
19812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
19813$as_echo_n "checking for struct timeval... " >&6; }
19814if test "${gl_cv_sys_struct_timeval+set}" = set; then :
19815 $as_echo_n "(cached) " >&6
19816else
19817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19818/* end confdefs.h. */
19819#if HAVE_SYS_TIME_H
19820 #include <sys/time.h>
19821 #endif
19822 #include <time.h>
19823 #if HAVE_WINSOCK2_H
19824 # include <winsock2.h>
19825 #endif
f199cab1 19826
5476a9a4
GM
19827int
19828main ()
19829{
19830static struct timeval x; x.tv_sec = x.tv_usec;
19831 ;
19832 return 0;
19833}
19834_ACEOF
19835if ac_fn_c_try_compile "$LINENO"; then :
19836 gl_cv_sys_struct_timeval=yes
19837else
19838 gl_cv_sys_struct_timeval=no
f199cab1 19839fi
5476a9a4 19840rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 19841
5476a9a4
GM
19842fi
19843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
19844$as_echo "$gl_cv_sys_struct_timeval" >&6; }
19845 if test $gl_cv_sys_struct_timeval != yes; then
19846 HAVE_STRUCT_TIMEVAL=0
19847 else
19848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
19849$as_echo_n "checking for wide-enough struct timeval.tv_sec member... " >&6; }
19850if test "${gl_cv_sys_struct_timeval_tv_sec+set}" = set; then :
19851 $as_echo_n "(cached) " >&6
19852else
19853 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19854/* end confdefs.h. */
19855#if HAVE_SYS_TIME_H
19856 #include <sys/time.h>
19857 #endif
19858 #include <time.h>
19859 #if HAVE_WINSOCK2_H
19860 # include <winsock2.h>
19861 #endif
f199cab1 19862
5476a9a4
GM
19863int
19864main ()
19865{
19866static struct timeval x;
19867 typedef int verify_tv_sec_type[
19868 sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
19869 ];
f199cab1 19870
5476a9a4
GM
19871 ;
19872 return 0;
19873}
19874_ACEOF
19875if ac_fn_c_try_compile "$LINENO"; then :
19876 gl_cv_sys_struct_timeval_tv_sec=yes
19877else
19878 gl_cv_sys_struct_timeval_tv_sec=no
19879fi
19880rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 19881
5476a9a4
GM
19882fi
19883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
19884$as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
19885 if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
19886 REPLACE_STRUCT_TIMEVAL=1
19887 fi
19888 fi
f199cab1 19889
f199cab1
GM
19890
19891
19892
19893
19894
f199cab1 19895
5476a9a4
GM
19896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
19897$as_echo_n "checking for unsigned long long int... " >&6; }
19898if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then :
19899 $as_echo_n "(cached) " >&6
19900else
19901 ac_cv_type_unsigned_long_long_int=yes
19902 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
19903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19904/* end confdefs.h. */
f199cab1 19905
5476a9a4
GM
19906 /* For now, do not test the preprocessor; as of 2007 there are too many
19907 implementations with broken preprocessors. Perhaps this can
19908 be revisited in 2012. In the meantime, code should not expect
19909 #if to work with literals wider than 32 bits. */
19910 /* Test literals. */
19911 long long int ll = 9223372036854775807ll;
19912 long long int nll = -9223372036854775807LL;
19913 unsigned long long int ull = 18446744073709551615ULL;
19914 /* Test constant expressions. */
19915 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
19916 ? 1 : -1)];
19917 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
19918 ? 1 : -1)];
19919 int i = 63;
19920int
19921main ()
19922{
19923/* Test availability of runtime routines for shift and division. */
19924 long long int llmax = 9223372036854775807ll;
19925 unsigned long long int ullmax = 18446744073709551615ull;
19926 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
19927 | (llmax / ll) | (llmax % ll)
19928 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
19929 | (ullmax / ull) | (ullmax % ull));
19930 ;
19931 return 0;
19932}
f199cab1 19933
e275c824 19934_ACEOF
5476a9a4 19935if ac_fn_c_try_link "$LINENO"; then :
3e0be4ab 19936
5476a9a4
GM
19937else
19938 ac_cv_type_unsigned_long_long_int=no
e275c824 19939fi
5476a9a4
GM
19940rm -f core conftest.err conftest.$ac_objext \
19941 conftest$ac_exeext conftest.$ac_ext
19942 fi
19943fi
19944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
19945$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
19946 if test $ac_cv_type_unsigned_long_long_int = yes; then
e275c824 19947
5476a9a4 19948$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
e275c824 19949
5476a9a4 19950 fi
e275c824
PE
19951
19952
f199cab1 19953
5476a9a4
GM
19954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
19955$as_echo_n "checking for long long int... " >&6; }
19956if test "${ac_cv_type_long_long_int+set}" = set; then :
19957 $as_echo_n "(cached) " >&6
19958else
19959 ac_cv_type_long_long_int=yes
19960 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
19961 ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
19962 if test $ac_cv_type_long_long_int = yes; then
19963 if test "$cross_compiling" = yes; then :
f199cab1 19964 :
5476a9a4
GM
19965else
19966 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19967/* end confdefs.h. */
19968#include <limits.h>
19969 #ifndef LLONG_MAX
19970 # define HALF \
19971 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
19972 # define LLONG_MAX (HALF - 1 + HALF)
19973 #endif
19974int
19975main ()
19976{
19977long long int n = 1;
19978 int i;
19979 for (i = 0; ; i++)
19980 {
19981 long long int m = n << i;
19982 if (m >> i != n)
19983 return 1;
19984 if (LLONG_MAX / 2 < m)
19985 break;
19986 }
19987 return 0;
19988 ;
19989 return 0;
19990}
19991_ACEOF
19992if ac_fn_c_try_run "$LINENO"; then :
19993
19994else
19995 ac_cv_type_long_long_int=no
19996fi
19997rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19998 conftest.$ac_objext conftest.beam conftest.$ac_ext
19999fi
e275c824 20000
5476a9a4
GM
20001 fi
20002 fi
1f5d53eb 20003fi
5476a9a4
GM
20004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
20005$as_echo "$ac_cv_type_long_long_int" >&6; }
20006 if test $ac_cv_type_long_long_int = yes; then
e275c824 20007
5476a9a4 20008$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
e275c824 20009
5476a9a4 20010 fi
e275c824
PE
20011
20012
e275c824
PE
20013
20014
20015
20016
5476a9a4
GM
20017 gl_cv_c_multiarch=no
20018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20019/* end confdefs.h. */
20020#ifndef __APPLE_CC__
20021 not a universal capable compiler
20022 #endif
20023 typedef int dummy;
e275c824 20024
5476a9a4
GM
20025_ACEOF
20026if ac_fn_c_try_compile "$LINENO"; then :
e275c824 20027
5476a9a4
GM
20028 arch=
20029 prev=
20030 for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
20031 if test -n "$prev"; then
20032 case $word in
20033 i?86 | x86_64 | ppc | ppc64)
20034 if test -z "$arch" || test "$arch" = "$word"; then
20035 arch="$word"
20036 else
20037 gl_cv_c_multiarch=yes
20038 fi
20039 ;;
20040 esac
20041 prev=
20042 else
20043 if test "x$word" = "x-arch"; then
20044 prev=arch
20045 fi
20046 fi
20047 done
f199cab1 20048
f199cab1 20049fi
5476a9a4
GM
20050rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20051 if test $gl_cv_c_multiarch = yes; then
20052 APPLE_UNIVERSAL_BUILD=1
20053 else
20054 APPLE_UNIVERSAL_BUILD=0
20055 fi
e275c824
PE
20056
20057
67342916 20058
67342916 20059
67342916 20060
5476a9a4
GM
20061 if test $ac_cv_type_long_long_int = yes; then
20062 HAVE_LONG_LONG_INT=1
20063 else
20064 HAVE_LONG_LONG_INT=0
20065 fi
e275c824 20066
e275c824 20067
5476a9a4
GM
20068 if test $ac_cv_type_unsigned_long_long_int = yes; then
20069 HAVE_UNSIGNED_LONG_LONG_INT=1
20070 else
20071 HAVE_UNSIGNED_LONG_LONG_INT=0
20072 fi
e275c824
PE
20073
20074
20075
5476a9a4
GM
20076 if test $ac_cv_header_wchar_h = yes; then
20077 HAVE_WCHAR_H=1
20078 else
20079 HAVE_WCHAR_H=0
20080 fi
e275c824 20081
e275c824 20082
5476a9a4
GM
20083 if test $ac_cv_header_inttypes_h = yes; then
20084 HAVE_INTTYPES_H=1
20085 else
20086 HAVE_INTTYPES_H=0
20087 fi
6c051bab 20088
942f733f 20089
5476a9a4
GM
20090 if test $ac_cv_header_sys_types_h = yes; then
20091 HAVE_SYS_TYPES_H=1
20092 else
20093 HAVE_SYS_TYPES_H=0
20094 fi
4fc2b746 20095
4fc2b746 20096
f199cab1
GM
20097
20098
20099
20100
20101
20102
20103
20104
20105
5476a9a4
GM
20106 if test $gl_cv_have_include_next = yes; then
20107 gl_cv_next_stdint_h='<'stdint.h'>'
20108 else
20109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
20110$as_echo_n "checking absolute name of <stdint.h>... " >&6; }
20111if test "${gl_cv_next_stdint_h+set}" = set; then :
20112 $as_echo_n "(cached) " >&6
20113else
f199cab1 20114
5476a9a4 20115 if test $ac_cv_header_stdint_h = yes; then
f199cab1
GM
20116
20117
5476a9a4
GM
20118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20119/* end confdefs.h. */
20120#include <stdint.h>
f199cab1 20121
5476a9a4
GM
20122_ACEOF
20123 case "$host_os" in
20124 aix*) gl_absname_cpp="$ac_cpp -C" ;;
20125 *) gl_absname_cpp="$ac_cpp" ;;
20126 esac
f199cab1 20127
5476a9a4
GM
20128 case "$host_os" in
20129 mingw*)
20130 gl_dirsep_regex='[/\\]'
20131 ;;
20132 *)
20133 gl_dirsep_regex='\/'
20134 ;;
20135 esac
20136 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
4fc2b746 20137
5476a9a4
GM
20138 gl_header_literal_regex=`echo 'stdint.h' \
20139 | sed -e "$gl_make_literal_regex_sed"`
20140 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20141 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20142 s|^/[^/]|//&|
20143 p
20144 q
20145 }'
20146 gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20147 sed -n "$gl_absolute_header_sed"`'"'
20148 else
20149 gl_cv_next_stdint_h='<'stdint.h'>'
20150 fi
4fc2b746 20151
4fc2b746 20152
5476a9a4
GM
20153fi
20154{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
20155$as_echo "$gl_cv_next_stdint_h" >&6; }
20156 fi
20157 NEXT_STDINT_H=$gl_cv_next_stdint_h
b0415a03 20158
5476a9a4
GM
20159 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20160 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20161 gl_next_as_first_directive='<'stdint.h'>'
20162 else
20163 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20164 gl_next_as_first_directive=$gl_cv_next_stdint_h
20165 fi
20166 NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
b0415a03 20167
4fc2b746 20168
f199cab1 20169
f199cab1 20170
5476a9a4
GM
20171 if test $ac_cv_header_stdint_h = yes; then
20172 HAVE_STDINT_H=1
20173 else
20174 HAVE_STDINT_H=0
20175 fi
f199cab1
GM
20176
20177
5476a9a4
GM
20178 if test $ac_cv_header_stdint_h = yes; then
20179 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
20180$as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
20181if test "${gl_cv_header_working_stdint_h+set}" = set; then :
f199cab1
GM
20182 $as_echo_n "(cached) " >&6
20183else
5476a9a4
GM
20184 gl_cv_header_working_stdint_h=no
20185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20186/* end confdefs.h. */
4fc2b746
GM
20187
20188
5476a9a4
GM
20189#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
20190#include <stdint.h>
20191/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
20192#if !(defined WCHAR_MIN && defined WCHAR_MAX)
20193#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
20194#endif
4fc2b746 20195
942f733f 20196
5476a9a4
GM
20197 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20198 included before <wchar.h>. */
20199 #include <stddef.h>
20200 #include <signal.h>
20201 #if HAVE_WCHAR_H
20202 # include <stdio.h>
20203 # include <time.h>
20204 # include <wchar.h>
20205 #endif
e275c824 20206
f199cab1 20207
5476a9a4
GM
20208#ifdef INT8_MAX
20209int8_t a1 = INT8_MAX;
20210int8_t a1min = INT8_MIN;
20211#endif
20212#ifdef INT16_MAX
20213int16_t a2 = INT16_MAX;
20214int16_t a2min = INT16_MIN;
20215#endif
20216#ifdef INT32_MAX
20217int32_t a3 = INT32_MAX;
20218int32_t a3min = INT32_MIN;
20219#endif
20220#ifdef INT64_MAX
20221int64_t a4 = INT64_MAX;
20222int64_t a4min = INT64_MIN;
20223#endif
20224#ifdef UINT8_MAX
20225uint8_t b1 = UINT8_MAX;
20226#else
20227typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
20228#endif
20229#ifdef UINT16_MAX
20230uint16_t b2 = UINT16_MAX;
20231#endif
20232#ifdef UINT32_MAX
20233uint32_t b3 = UINT32_MAX;
20234#endif
20235#ifdef UINT64_MAX
20236uint64_t b4 = UINT64_MAX;
20237#endif
20238int_least8_t c1 = INT8_C (0x7f);
20239int_least8_t c1max = INT_LEAST8_MAX;
20240int_least8_t c1min = INT_LEAST8_MIN;
20241int_least16_t c2 = INT16_C (0x7fff);
20242int_least16_t c2max = INT_LEAST16_MAX;
20243int_least16_t c2min = INT_LEAST16_MIN;
20244int_least32_t c3 = INT32_C (0x7fffffff);
20245int_least32_t c3max = INT_LEAST32_MAX;
20246int_least32_t c3min = INT_LEAST32_MIN;
20247int_least64_t c4 = INT64_C (0x7fffffffffffffff);
20248int_least64_t c4max = INT_LEAST64_MAX;
20249int_least64_t c4min = INT_LEAST64_MIN;
20250uint_least8_t d1 = UINT8_C (0xff);
20251uint_least8_t d1max = UINT_LEAST8_MAX;
20252uint_least16_t d2 = UINT16_C (0xffff);
20253uint_least16_t d2max = UINT_LEAST16_MAX;
20254uint_least32_t d3 = UINT32_C (0xffffffff);
20255uint_least32_t d3max = UINT_LEAST32_MAX;
20256uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
20257uint_least64_t d4max = UINT_LEAST64_MAX;
20258int_fast8_t e1 = INT_FAST8_MAX;
20259int_fast8_t e1min = INT_FAST8_MIN;
20260int_fast16_t e2 = INT_FAST16_MAX;
20261int_fast16_t e2min = INT_FAST16_MIN;
20262int_fast32_t e3 = INT_FAST32_MAX;
20263int_fast32_t e3min = INT_FAST32_MIN;
20264int_fast64_t e4 = INT_FAST64_MAX;
20265int_fast64_t e4min = INT_FAST64_MIN;
20266uint_fast8_t f1 = UINT_FAST8_MAX;
20267uint_fast16_t f2 = UINT_FAST16_MAX;
20268uint_fast32_t f3 = UINT_FAST32_MAX;
20269uint_fast64_t f4 = UINT_FAST64_MAX;
20270#ifdef INTPTR_MAX
20271intptr_t g = INTPTR_MAX;
20272intptr_t gmin = INTPTR_MIN;
20273#endif
20274#ifdef UINTPTR_MAX
20275uintptr_t h = UINTPTR_MAX;
20276#endif
20277intmax_t i = INTMAX_MAX;
20278uintmax_t j = UINTMAX_MAX;
5fa4ac76 20279
5476a9a4
GM
20280#include <limits.h> /* for CHAR_BIT */
20281#define TYPE_MINIMUM(t) \
20282 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
20283#define TYPE_MAXIMUM(t) \
20284 ((t) ((t) 0 < (t) -1 \
20285 ? (t) -1 \
20286 : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
20287struct s {
20288 int check_PTRDIFF:
20289 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
20290 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
20291 ? 1 : -1;
20292 /* Detect bug in FreeBSD 6.0 / ia64. */
20293 int check_SIG_ATOMIC:
20294 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
20295 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
20296 ? 1 : -1;
20297 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
20298 int check_WCHAR:
20299 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
20300 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
20301 ? 1 : -1;
20302 /* Detect bug in mingw. */
20303 int check_WINT:
20304 WINT_MIN == TYPE_MINIMUM (wint_t)
20305 && WINT_MAX == TYPE_MAXIMUM (wint_t)
20306 ? 1 : -1;
5fa4ac76 20307
5476a9a4
GM
20308 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
20309 int check_UINT8_C:
20310 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
20311 int check_UINT16_C:
20312 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
20313
20314 /* Detect bugs in OpenBSD 3.9 stdint.h. */
20315#ifdef UINT8_MAX
20316 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
3e0be4ab 20317#endif
5476a9a4
GM
20318#ifdef UINT16_MAX
20319 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
20320#endif
20321#ifdef UINT32_MAX
20322 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
20323#endif
20324#ifdef UINT64_MAX
20325 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
20326#endif
20327 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
20328 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
20329 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
20330 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
20331 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
20332 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
20333 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
20334 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
20335 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
20336 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
20337 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
20338};
20339
f199cab1
GM
20340int
20341main ()
20342{
5476a9a4 20343
f199cab1
GM
20344 ;
20345 return 0;
20346}
20347_ACEOF
5476a9a4
GM
20348if ac_fn_c_try_compile "$LINENO"; then :
20349 if test "$cross_compiling" = yes; then :
20350 gl_cv_header_working_stdint_h=yes
40e27e7f 20351
5476a9a4
GM
20352else
20353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20354/* end confdefs.h. */
40e27e7f 20355
f199cab1 20356
5476a9a4
GM
20357#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
20358#include <stdint.h>
f199cab1
GM
20359
20360
5476a9a4
GM
20361 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20362 included before <wchar.h>. */
20363 #include <stddef.h>
20364 #include <signal.h>
20365 #if HAVE_WCHAR_H
20366 # include <stdio.h>
20367 # include <time.h>
20368 # include <wchar.h>
20369 #endif
f199cab1 20370
d87ffdb7 20371
5476a9a4
GM
20372#include <stdio.h>
20373#include <string.h>
20374#define MVAL(macro) MVAL1(macro)
20375#define MVAL1(expression) #expression
20376static const char *macro_values[] =
20377 {
20378#ifdef INT8_MAX
20379 MVAL (INT8_MAX),
20380#endif
20381#ifdef INT16_MAX
20382 MVAL (INT16_MAX),
20383#endif
20384#ifdef INT32_MAX
20385 MVAL (INT32_MAX),
20386#endif
20387#ifdef INT64_MAX
20388 MVAL (INT64_MAX),
20389#endif
20390#ifdef UINT8_MAX
20391 MVAL (UINT8_MAX),
20392#endif
20393#ifdef UINT16_MAX
20394 MVAL (UINT16_MAX),
20395#endif
20396#ifdef UINT32_MAX
20397 MVAL (UINT32_MAX),
20398#endif
20399#ifdef UINT64_MAX
20400 MVAL (UINT64_MAX),
20401#endif
20402 NULL
20403 };
f199cab1 20404
3e0be4ab
GM
20405int
20406main ()
20407{
5476a9a4
GM
20408
20409 const char **mv;
20410 for (mv = macro_values; *mv != NULL; mv++)
20411 {
20412 const char *value = *mv;
20413 /* Test whether it looks like a cast expression. */
20414 if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
20415 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
20416 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
20417 || strncmp (value, "((int)"/*)*/, 6) == 0
20418 || strncmp (value, "((signed short)"/*)*/, 15) == 0
20419 || strncmp (value, "((signed char)"/*)*/, 14) == 0)
20420 return mv - macro_values + 1;
20421 }
3e0be4ab 20422 return 0;
5476a9a4 20423
f199cab1
GM
20424 ;
20425 return 0;
20426}
20427_ACEOF
5476a9a4
GM
20428if ac_fn_c_try_run "$LINENO"; then :
20429 gl_cv_header_working_stdint_h=yes
f199cab1 20430fi
5476a9a4
GM
20431rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20432 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1
GM
20433fi
20434
d87ffdb7 20435
5476a9a4
GM
20436fi
20437rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d87ffdb7 20438
5476a9a4
GM
20439fi
20440{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
20441$as_echo "$gl_cv_header_working_stdint_h" >&6; }
20442 fi
20443 if test "$gl_cv_header_working_stdint_h" = yes; then
20444 STDINT_H=
20445 else
20446 for ac_header in sys/inttypes.h sys/bitypes.h
20447do :
20448 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
20449ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
20450eval as_val=\$$as_ac_Header
20451 if test "x$as_val" = x""yes; then :
20452 cat >>confdefs.h <<_ACEOF
20453#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
20454_ACEOF
d87ffdb7 20455
5476a9a4 20456fi
d87ffdb7 20457
5476a9a4 20458done
7d2a1c5e 20459
5476a9a4
GM
20460 if test $ac_cv_header_sys_inttypes_h = yes; then
20461 HAVE_SYS_INTTYPES_H=1
20462 else
20463 HAVE_SYS_INTTYPES_H=0
20464 fi
7d2a1c5e 20465
5476a9a4
GM
20466 if test $ac_cv_header_sys_bitypes_h = yes; then
20467 HAVE_SYS_BITYPES_H=1
20468 else
20469 HAVE_SYS_BITYPES_H=0
20470 fi
7d2a1c5e 20471
f199cab1
GM
20472
20473
20474
5476a9a4 20475 if test $APPLE_UNIVERSAL_BUILD = 0; then
f199cab1
GM
20476
20477
5476a9a4
GM
20478 for gltype in ptrdiff_t size_t ; do
20479 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
20480$as_echo_n "checking for bit size of $gltype... " >&6; }
20481if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
20482 $as_echo_n "(cached) " >&6
20483else
20484 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
20485 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20486 included before <wchar.h>. */
20487 #include <stddef.h>
20488 #include <signal.h>
20489 #if HAVE_WCHAR_H
20490 # include <stdio.h>
20491 # include <time.h>
20492 # include <wchar.h>
20493 #endif
f199cab1 20494
5476a9a4 20495#include <limits.h>"; then :
f199cab1 20496
5476a9a4
GM
20497else
20498 result=unknown
20499fi
f199cab1 20500
5476a9a4 20501 eval gl_cv_bitsizeof_${gltype}=\$result
f199cab1 20502
5476a9a4
GM
20503fi
20504eval ac_res=\$gl_cv_bitsizeof_${gltype}
20505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20506$as_echo "$ac_res" >&6; }
20507 eval result=\$gl_cv_bitsizeof_${gltype}
20508 if test $result = unknown; then
20509 result=0
20510 fi
20511 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
20512 cat >>confdefs.h <<_ACEOF
20513#define BITSIZEOF_${GLTYPE} $result
20514_ACEOF
f199cab1 20515
5476a9a4
GM
20516 eval BITSIZEOF_${GLTYPE}=\$result
20517 done
f199cab1
GM
20518
20519
5476a9a4 20520 fi
f199cab1
GM
20521
20522
5476a9a4
GM
20523 for gltype in sig_atomic_t wchar_t wint_t ; do
20524 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
20525$as_echo_n "checking for bit size of $gltype... " >&6; }
20526if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
20527 $as_echo_n "(cached) " >&6
20528else
20529 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
20530 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20531 included before <wchar.h>. */
20532 #include <stddef.h>
20533 #include <signal.h>
20534 #if HAVE_WCHAR_H
20535 # include <stdio.h>
20536 # include <time.h>
20537 # include <wchar.h>
20538 #endif
f199cab1 20539
5476a9a4 20540#include <limits.h>"; then :
f199cab1 20541
f199cab1 20542else
5476a9a4 20543 result=unknown
7d2a1c5e 20544fi
7d2a1c5e 20545
5476a9a4 20546 eval gl_cv_bitsizeof_${gltype}=\$result
7d2a1c5e 20547
3e0be4ab 20548fi
5476a9a4
GM
20549eval ac_res=\$gl_cv_bitsizeof_${gltype}
20550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20551$as_echo "$ac_res" >&6; }
20552 eval result=\$gl_cv_bitsizeof_${gltype}
20553 if test $result = unknown; then
20554 result=0
20555 fi
20556 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
20557 cat >>confdefs.h <<_ACEOF
20558#define BITSIZEOF_${GLTYPE} $result
3e0be4ab 20559_ACEOF
7d2a1c5e 20560
5476a9a4
GM
20561 eval BITSIZEOF_${GLTYPE}=\$result
20562 done
7d2a1c5e
GM
20563
20564
5476a9a4
GM
20565
20566
20567 for gltype in sig_atomic_t wchar_t wint_t ; do
20568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
20569$as_echo_n "checking whether $gltype is signed... " >&6; }
20570if { as_var=gl_cv_type_${gltype}_signed; eval "test \"\${$as_var+set}\" = set"; }; then :
3e0be4ab
GM
20571 $as_echo_n "(cached) " >&6
20572else
f199cab1
GM
20573 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20574/* end confdefs.h. */
f199cab1 20575
5476a9a4
GM
20576 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20577 included before <wchar.h>. */
20578 #include <stddef.h>
20579 #include <signal.h>
20580 #if HAVE_WCHAR_H
20581 # include <stdio.h>
20582 # include <time.h>
20583 # include <wchar.h>
20584 #endif
20585
20586 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
f199cab1
GM
20587int
20588main ()
20589{
5476a9a4 20590
f199cab1
GM
20591 ;
20592 return 0;
20593}
20594_ACEOF
20595if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4 20596 result=yes
f199cab1 20597else
5476a9a4 20598 result=no
f199cab1
GM
20599fi
20600rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5476a9a4 20601 eval gl_cv_type_${gltype}_signed=\$result
7d2a1c5e 20602
3e0be4ab 20603fi
5476a9a4
GM
20604eval ac_res=\$gl_cv_type_${gltype}_signed
20605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20606$as_echo "$ac_res" >&6; }
20607 eval result=\$gl_cv_type_${gltype}_signed
20608 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
20609 if test "$result" = yes; then
20610 cat >>confdefs.h <<_ACEOF
20611#define HAVE_SIGNED_${GLTYPE} 1
f199cab1 20612_ACEOF
d87ffdb7 20613
5476a9a4
GM
20614 eval HAVE_SIGNED_${GLTYPE}=1
20615 else
20616 eval HAVE_SIGNED_${GLTYPE}=0
20617 fi
20618 done
f199cab1 20619
e275c824 20620
5476a9a4
GM
20621 gl_cv_type_ptrdiff_t_signed=yes
20622 gl_cv_type_size_t_signed=no
20623 if test $APPLE_UNIVERSAL_BUILD = 0; then
e275c824 20624
e275c824 20625
5476a9a4
GM
20626 for gltype in ptrdiff_t size_t ; do
20627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
20628$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
20629if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
16c3e636
PE
20630 $as_echo_n "(cached) " >&6
20631else
5476a9a4
GM
20632 eval gl_cv_type_${gltype}_suffix=no
20633 eval result=\$gl_cv_type_${gltype}_signed
20634 if test "$result" = yes; then
20635 glsufu=
20636 else
20637 glsufu=u
20638 fi
20639 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
20640 case $glsuf in
20641 '') gltype1='int';;
20642 l) gltype1='long int';;
20643 ll) gltype1='long long int';;
20644 i64) gltype1='__int64';;
20645 u) gltype1='unsigned int';;
20646 ul) gltype1='unsigned long int';;
20647 ull) gltype1='unsigned long long int';;
20648 ui64)gltype1='unsigned __int64';;
20649 esac
20650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 20651/* end confdefs.h. */
16c3e636 20652
5476a9a4
GM
20653 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20654 included before <wchar.h>. */
20655 #include <stddef.h>
20656 #include <signal.h>
20657 #if HAVE_WCHAR_H
20658 # include <stdio.h>
20659 # include <time.h>
20660 # include <wchar.h>
20661 #endif
1f5d53eb 20662
5476a9a4
GM
20663 extern $gltype foo;
20664 extern $gltype1 foo;
f199cab1
GM
20665int
20666main ()
20667{
5476a9a4 20668
f199cab1
GM
20669 ;
20670 return 0;
20671}
20672_ACEOF
20673if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4 20674 eval gl_cv_type_${gltype}_suffix=\$glsuf
f199cab1
GM
20675fi
20676rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5476a9a4
GM
20677 eval result=\$gl_cv_type_${gltype}_suffix
20678 test "$result" != no && break
20679 done
f199cab1 20680fi
5476a9a4
GM
20681eval ac_res=\$gl_cv_type_${gltype}_suffix
20682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20683$as_echo "$ac_res" >&6; }
20684 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
20685 eval result=\$gl_cv_type_${gltype}_suffix
20686 test "$result" = no && result=
20687 eval ${GLTYPE}_SUFFIX=\$result
20688 cat >>confdefs.h <<_ACEOF
20689#define ${GLTYPE}_SUFFIX $result
20690_ACEOF
16c3e636 20691
5476a9a4 20692 done
16c3e636 20693
3e0be4ab 20694
5476a9a4
GM
20695 fi
20696
20697
20698 for gltype in sig_atomic_t wchar_t wint_t ; do
20699 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
20700$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
20701if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
1fd182f0
PE
20702 $as_echo_n "(cached) " >&6
20703else
5476a9a4
GM
20704 eval gl_cv_type_${gltype}_suffix=no
20705 eval result=\$gl_cv_type_${gltype}_signed
20706 if test "$result" = yes; then
20707 glsufu=
20708 else
20709 glsufu=u
20710 fi
20711 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
20712 case $glsuf in
20713 '') gltype1='int';;
20714 l) gltype1='long int';;
20715 ll) gltype1='long long int';;
20716 i64) gltype1='__int64';;
20717 u) gltype1='unsigned int';;
20718 ul) gltype1='unsigned long int';;
20719 ull) gltype1='unsigned long long int';;
20720 ui64)gltype1='unsigned __int64';;
20721 esac
20722 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1fd182f0 20723/* end confdefs.h. */
5476a9a4
GM
20724
20725 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20726 included before <wchar.h>. */
20727 #include <stddef.h>
20728 #include <signal.h>
20729 #if HAVE_WCHAR_H
20730 # include <stdio.h>
20731 # include <time.h>
20732 # include <wchar.h>
20733 #endif
20734
20735 extern $gltype foo;
20736 extern $gltype1 foo;
1fd182f0
PE
20737int
20738main ()
20739{
5476a9a4 20740
1fd182f0
PE
20741 ;
20742 return 0;
20743}
20744_ACEOF
3e0be4ab 20745if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4 20746 eval gl_cv_type_${gltype}_suffix=\$glsuf
1f5d53eb 20747fi
3e0be4ab 20748rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5476a9a4
GM
20749 eval result=\$gl_cv_type_${gltype}_suffix
20750 test "$result" != no && break
20751 done
f199cab1 20752fi
5476a9a4
GM
20753eval ac_res=\$gl_cv_type_${gltype}_suffix
20754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20755$as_echo "$ac_res" >&6; }
20756 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
20757 eval result=\$gl_cv_type_${gltype}_suffix
20758 test "$result" = no && result=
20759 eval ${GLTYPE}_SUFFIX=\$result
20760 cat >>confdefs.h <<_ACEOF
20761#define ${GLTYPE}_SUFFIX $result
f199cab1
GM
20762_ACEOF
20763
5476a9a4 20764 done
f199cab1 20765
f199cab1 20766
f199cab1 20767
5476a9a4
GM
20768 if test $BITSIZEOF_WINT_T -lt 32; then
20769 BITSIZEOF_WINT_T=32
20770 fi
f199cab1 20771
5476a9a4
GM
20772 STDINT_H=stdint.h
20773 fi
f199cab1 20774
5476a9a4
GM
20775 if test -n "$STDINT_H"; then
20776 GL_GENERATE_STDINT_H_TRUE=
20777 GL_GENERATE_STDINT_H_FALSE='#'
20778else
20779 GL_GENERATE_STDINT_H_TRUE='#'
20780 GL_GENERATE_STDINT_H_FALSE=
f199cab1
GM
20781fi
20782
f199cab1 20783
f199cab1 20784
3e0be4ab 20785
f199cab1 20786
5476a9a4
GM
20787 GNULIB_IMAXABS=0;
20788 GNULIB_IMAXDIV=0;
20789 GNULIB_STRTOIMAX=0;
20790 GNULIB_STRTOUMAX=0;
20791 HAVE_DECL_IMAXABS=1;
20792 HAVE_DECL_IMAXDIV=1;
20793 HAVE_DECL_STRTOIMAX=1;
20794 HAVE_DECL_STRTOUMAX=1;
20795 REPLACE_STRTOIMAX=0;
20796 INT32_MAX_LT_INTMAX_MAX=1;
20797 INT64_MAX_EQ_LONG_MAX='defined _LP64';
20798 PRI_MACROS_BROKEN=0;
20799 PRIPTR_PREFIX=__PRIPTR_PREFIX;
20800 UINT32_MAX_LT_UINTMAX_MAX=1;
20801 UINT64_MAX_EQ_ULONG_MAX='defined _LP64';
1fd182f0 20802
1fd182f0 20803
1f5d53eb 20804
3e0be4ab
GM
20805
20806
1fd182f0 20807
3e0be4ab 20808
3e0be4ab 20809
f199cab1 20810
1fd182f0 20811
1f5d53eb 20812
1f5d53eb 20813
1f5d53eb 20814
3e0be4ab 20815
3e0be4ab 20816
5476a9a4
GM
20817 if test $gl_cv_have_include_next = yes; then
20818 gl_cv_next_inttypes_h='<'inttypes.h'>'
20819 else
20820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
20821$as_echo_n "checking absolute name of <inttypes.h>... " >&6; }
20822if test "${gl_cv_next_inttypes_h+set}" = set; then :
20823 $as_echo_n "(cached) " >&6
f199cab1 20824else
2b1928b8 20825
5476a9a4 20826 if test $ac_cv_header_inttypes_h = yes; then
3e0be4ab
GM
20827
20828
5476a9a4 20829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 20830/* end confdefs.h. */
5476a9a4 20831#include <inttypes.h>
3e0be4ab 20832
f199cab1 20833_ACEOF
5476a9a4
GM
20834 case "$host_os" in
20835 aix*) gl_absname_cpp="$ac_cpp -C" ;;
20836 *) gl_absname_cpp="$ac_cpp" ;;
20837 esac
1fd182f0 20838
5476a9a4
GM
20839 case "$host_os" in
20840 mingw*)
20841 gl_dirsep_regex='[/\\]'
20842 ;;
20843 *)
20844 gl_dirsep_regex='\/'
20845 ;;
20846 esac
20847 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
1fd182f0 20848
5476a9a4
GM
20849 gl_header_literal_regex=`echo 'inttypes.h' \
20850 | sed -e "$gl_make_literal_regex_sed"`
20851 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20852 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20853 s|^/[^/]|//&|
20854 p
20855 q
20856 }'
20857 gl_cv_next_inttypes_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20858 sed -n "$gl_absolute_header_sed"`'"'
20859 else
20860 gl_cv_next_inttypes_h='<'inttypes.h'>'
20861 fi
1fd182f0
PE
20862
20863
5476a9a4
GM
20864fi
20865{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
20866$as_echo "$gl_cv_next_inttypes_h" >&6; }
20867 fi
20868 NEXT_INTTYPES_H=$gl_cv_next_inttypes_h
1fd182f0 20869
5476a9a4
GM
20870 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20871 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20872 gl_next_as_first_directive='<'inttypes.h'>'
20873 else
20874 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20875 gl_next_as_first_directive=$gl_cv_next_inttypes_h
20876 fi
20877 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
34119902
GM
20878
20879
3e0be4ab 20880
34119902 20881
3e0be4ab 20882
34119902 20883
b0415a03 20884
b0415a03 20885
3e0be4ab 20886
34119902 20887
34119902 20888
5476a9a4
GM
20889 case "$host_os" in
20890 mingw*)
20891 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
20892$as_echo_n "checking for 64-bit off_t... " >&6; }
20893if test "${gl_cv_type_off_t_64+set}" = set; then :
f199cab1
GM
20894 $as_echo_n "(cached) " >&6
20895else
5476a9a4
GM
20896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20897/* end confdefs.h. */
20898#include <sys/types.h>
20899 int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
20900
20901int
20902main ()
20903{
20904
20905 ;
20906 return 0;
20907}
f199cab1 20908_ACEOF
5476a9a4
GM
20909if ac_fn_c_try_compile "$LINENO"; then :
20910 gl_cv_type_off_t_64=yes
20911else
20912 gl_cv_type_off_t_64=no
f199cab1 20913fi
5476a9a4 20914rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34119902 20915
5476a9a4
GM
20916fi
20917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
20918$as_echo "$gl_cv_type_off_t_64" >&6; }
20919 if test $gl_cv_type_off_t_64 = no; then
20920 WINDOWS_64_BIT_OFF_T=1
20921 else
20922 WINDOWS_64_BIT_OFF_T=0
20923 fi
20924 WINDOWS_64_BIT_ST_SIZE=1
20925 ;;
20926 *)
20927 WINDOWS_64_BIT_OFF_T=0
20928 WINDOWS_64_BIT_ST_SIZE=0
20929 ;;
20930 esac
34119902
GM
20931
20932
34119902
GM
20933
20934
283c7aed
GM
20935 GNULIB_FFSL=0;
20936 GNULIB_FFSLL=0;
20937 GNULIB_MEMCHR=0;
20938 GNULIB_MEMMEM=0;
20939 GNULIB_MEMPCPY=0;
20940 GNULIB_MEMRCHR=0;
20941 GNULIB_RAWMEMCHR=0;
20942 GNULIB_STPCPY=0;
20943 GNULIB_STPNCPY=0;
20944 GNULIB_STRCHRNUL=0;
20945 GNULIB_STRDUP=0;
20946 GNULIB_STRNCAT=0;
20947 GNULIB_STRNDUP=0;
20948 GNULIB_STRNLEN=0;
20949 GNULIB_STRPBRK=0;
20950 GNULIB_STRSEP=0;
20951 GNULIB_STRSTR=0;
20952 GNULIB_STRCASESTR=0;
20953 GNULIB_STRTOK_R=0;
20954 GNULIB_MBSLEN=0;
20955 GNULIB_MBSNLEN=0;
20956 GNULIB_MBSCHR=0;
20957 GNULIB_MBSRCHR=0;
20958 GNULIB_MBSSTR=0;
20959 GNULIB_MBSCASECMP=0;
20960 GNULIB_MBSNCASECMP=0;
20961 GNULIB_MBSPCASECMP=0;
20962 GNULIB_MBSCASESTR=0;
20963 GNULIB_MBSCSPN=0;
20964 GNULIB_MBSPBRK=0;
20965 GNULIB_MBSSPN=0;
20966 GNULIB_MBSSEP=0;
20967 GNULIB_MBSTOK_R=0;
20968 GNULIB_STRERROR=0;
20969 GNULIB_STRERROR_R=0;
20970 GNULIB_STRSIGNAL=0;
20971 GNULIB_STRVERSCMP=0;
20972 HAVE_MBSLEN=0;
20973 HAVE_FFSL=1;
20974 HAVE_FFSLL=1;
20975 HAVE_MEMCHR=1;
20976 HAVE_DECL_MEMMEM=1;
20977 HAVE_MEMPCPY=1;
20978 HAVE_DECL_MEMRCHR=1;
20979 HAVE_RAWMEMCHR=1;
20980 HAVE_STPCPY=1;
20981 HAVE_STPNCPY=1;
20982 HAVE_STRCHRNUL=1;
20983 HAVE_DECL_STRDUP=1;
20984 HAVE_DECL_STRNDUP=1;
20985 HAVE_DECL_STRNLEN=1;
20986 HAVE_STRPBRK=1;
20987 HAVE_STRSEP=1;
20988 HAVE_STRCASESTR=1;
20989 HAVE_DECL_STRTOK_R=1;
20990 HAVE_DECL_STRERROR_R=1;
20991 HAVE_DECL_STRSIGNAL=1;
20992 HAVE_STRVERSCMP=1;
20993 REPLACE_MEMCHR=0;
20994 REPLACE_MEMMEM=0;
20995 REPLACE_STPNCPY=0;
20996 REPLACE_STRDUP=0;
20997 REPLACE_STRSTR=0;
20998 REPLACE_STRCASESTR=0;
20999 REPLACE_STRCHRNUL=0;
21000 REPLACE_STRERROR=0;
21001 REPLACE_STRERROR_R=0;
21002 REPLACE_STRNCAT=0;
21003 REPLACE_STRNDUP=0;
21004 REPLACE_STRNLEN=0;
21005 REPLACE_STRSIGNAL=0;
21006 REPLACE_STRTOK_R=0;
21007 UNDEFINE_STRTOK_R=0;
21008
21009ac_fn_c_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default"
21010if test "x$ac_cv_have_decl_memrchr" = x""yes; then :
21011 ac_have_decl=1
21012else
21013 ac_have_decl=0
21014fi
21015
21016cat >>confdefs.h <<_ACEOF
21017#define HAVE_DECL_MEMRCHR $ac_have_decl
21018_ACEOF
21019
21020
e412eb97
GM
21021
21022
5476a9a4
GM
21023 GNULIB_MKTIME=0;
21024 GNULIB_NANOSLEEP=0;
21025 GNULIB_STRPTIME=0;
21026 GNULIB_TIMEGM=0;
21027 GNULIB_TIME_R=0;
21028 HAVE_DECL_LOCALTIME_R=1;
21029 HAVE_NANOSLEEP=1;
21030 HAVE_STRPTIME=1;
21031 HAVE_TIMEGM=1;
21032 REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
21033 REPLACE_MKTIME=GNULIB_PORTCHECK;
21034 REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
21035 REPLACE_TIMEGM=GNULIB_PORTCHECK;
34119902 21036
2393bc74
GM
21037ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default"
21038if test "x$ac_cv_have_decl_alarm" = x""yes; then :
21039 ac_have_decl=1
21040else
21041 ac_have_decl=0
21042fi
3e0be4ab 21043
2393bc74
GM
21044cat >>confdefs.h <<_ACEOF
21045#define HAVE_DECL_ALARM $ac_have_decl
21046_ACEOF
3e0be4ab
GM
21047
21048
0cdca42a
GM
21049
21050
5476a9a4
GM
21051 GNULIB_PSELECT=0;
21052 GNULIB_SELECT=0;
21053 HAVE_PSELECT=1;
21054 REPLACE_PSELECT=0;
21055 REPLACE_SELECT=0;
21056
21057
3e0be4ab 21058
5476a9a4
GM
21059
21060
21061
21062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/select.h> is self-contained" >&5
21063$as_echo_n "checking whether <sys/select.h> is self-contained... " >&6; }
21064if test "${gl_cv_header_sys_select_h_selfcontained+set}" = set; then :
f199cab1 21065 $as_echo_n "(cached) " >&6
3e0be4ab 21066else
5476a9a4
GM
21067
21068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3e0be4ab 21069/* end confdefs.h. */
5476a9a4 21070#include <sys/select.h>
3e0be4ab
GM
21071int
21072main ()
21073{
5476a9a4 21074struct timeval b;
3e0be4ab
GM
21075 ;
21076 return 0;
21077}
34119902 21078_ACEOF
f199cab1 21079if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4 21080 gl_cv_header_sys_select_h_selfcontained=yes
3e0be4ab 21081else
5476a9a4 21082 gl_cv_header_sys_select_h_selfcontained=no
3e0be4ab 21083fi
f199cab1 21084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5476a9a4
GM
21085 if test $gl_cv_header_sys_select_h_selfcontained = yes; then
21086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21087/* end confdefs.h. */
21088#include <sys/select.h>
21089int
21090main ()
21091{
21092int memset; int bzero;
21093 ;
21094 return 0;
21095}
3e0be4ab 21096
5476a9a4
GM
21097_ACEOF
21098if ac_fn_c_try_compile "$LINENO"; then :
f199cab1
GM
21099 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21100/* end confdefs.h. */
5476a9a4 21101#include <sys/select.h>
f199cab1
GM
21102int
21103main ()
21104{
5476a9a4
GM
21105
21106 #undef memset
21107 #define memset nonexistent_memset
21108 extern
21109 #ifdef __cplusplus
21110 "C"
21111 #endif
21112 void *memset (void *, int, unsigned long);
21113 #undef bzero
21114 #define bzero nonexistent_bzero
21115 extern
21116 #ifdef __cplusplus
21117 "C"
21118 #endif
21119 void bzero (void *, unsigned long);
21120 fd_set fds;
21121 FD_ZERO (&fds);
21122
f199cab1
GM
21123 ;
21124 return 0;
21125}
5476a9a4 21126
f199cab1 21127_ACEOF
5476a9a4
GM
21128if ac_fn_c_try_link "$LINENO"; then :
21129
f199cab1 21130else
5476a9a4 21131 gl_cv_header_sys_select_h_selfcontained=no
f199cab1 21132fi
5476a9a4
GM
21133rm -f core conftest.err conftest.$ac_objext \
21134 conftest$ac_exeext conftest.$ac_ext
1fd182f0 21135
f199cab1 21136fi
5476a9a4
GM
21137rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21138 fi
1fd182f0 21139
f199cab1 21140fi
5476a9a4
GM
21141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_select_h_selfcontained" >&5
21142$as_echo "$gl_cv_header_sys_select_h_selfcontained" >&6; }
1fd182f0
PE
21143
21144
b06b1098 21145
0eb775a3
GM
21146
21147
b06b1098 21148
1fd182f0 21149
1fd182f0 21150
5476a9a4
GM
21151
21152 if test $gl_cv_have_include_next = yes; then
21153 gl_cv_next_sys_select_h='<'sys/select.h'>'
21154 else
21155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/select.h>" >&5
21156$as_echo_n "checking absolute name of <sys/select.h>... " >&6; }
21157if test "${gl_cv_next_sys_select_h+set}" = set; then :
f199cab1 21158 $as_echo_n "(cached) " >&6
3e0be4ab 21159else
1fd182f0 21160
5476a9a4
GM
21161 if test $ac_cv_header_sys_select_h = yes; then
21162
21163
21164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21165/* end confdefs.h. */
21166#include <sys/select.h>
21167
21168_ACEOF
21169 case "$host_os" in
21170 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21171 *) gl_absname_cpp="$ac_cpp" ;;
21172 esac
21173
21174 case "$host_os" in
21175 mingw*)
21176 gl_dirsep_regex='[/\\]'
21177 ;;
21178 *)
21179 gl_dirsep_regex='\/'
21180 ;;
21181 esac
21182 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21183
21184 gl_header_literal_regex=`echo 'sys/select.h' \
21185 | sed -e "$gl_make_literal_regex_sed"`
21186 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21187 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21188 s|^/[^/]|//&|
21189 p
21190 q
21191 }'
21192 gl_cv_next_sys_select_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21193 sed -n "$gl_absolute_header_sed"`'"'
21194 else
21195 gl_cv_next_sys_select_h='<'sys/select.h'>'
21196 fi
1fd182f0 21197
3e0be4ab 21198
1f5d53eb 21199fi
5476a9a4
GM
21200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_select_h" >&5
21201$as_echo "$gl_cv_next_sys_select_h" >&6; }
21202 fi
21203 NEXT_SYS_SELECT_H=$gl_cv_next_sys_select_h
1fd182f0 21204
5476a9a4
GM
21205 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21206 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21207 gl_next_as_first_directive='<'sys/select.h'>'
21208 else
21209 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21210 gl_next_as_first_directive=$gl_cv_next_sys_select_h
21211 fi
21212 NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H=$gl_next_as_first_directive
1fd182f0
PE
21213
21214
5476a9a4
GM
21215
21216
21217 if test $ac_cv_header_sys_select_h = yes; then
21218 HAVE_SYS_SELECT_H=1
21219 else
21220 HAVE_SYS_SELECT_H=0
21221 fi
21222
21223
21224
21225
21226
21227 if test $ac_cv_header_sys_socket_h != yes; then
21228 for ac_header in winsock2.h
21229do :
21230 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
21231if test "x$ac_cv_header_winsock2_h" = x""yes; then :
21232 cat >>confdefs.h <<_ACEOF
21233#define HAVE_WINSOCK2_H 1
f199cab1 21234_ACEOF
5476a9a4 21235
f199cab1 21236fi
3e0be4ab 21237
5476a9a4 21238done
3e0be4ab 21239
5476a9a4
GM
21240 fi
21241 if test "$ac_cv_header_winsock2_h" = yes; then
21242 HAVE_WINSOCK2_H=1
21243 UNISTD_H_HAVE_WINSOCK2_H=1
21244 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
21245 else
21246 HAVE_WINSOCK2_H=0
21247 fi
f199cab1 21248
f199cab1 21249
f199cab1 21250
f199cab1 21251
3e0be4ab 21252
3e0be4ab 21253
3e0be4ab 21254
3e0be4ab 21255
5476a9a4
GM
21256 GNULIB_PTHREAD_SIGMASK=0;
21257 GNULIB_RAISE=0;
21258 GNULIB_SIGNAL_H_SIGPIPE=0;
21259 GNULIB_SIGPROCMASK=0;
21260 GNULIB_SIGACTION=0;
21261 HAVE_POSIX_SIGNALBLOCKING=1;
21262 HAVE_PTHREAD_SIGMASK=1;
21263 HAVE_RAISE=1;
21264 HAVE_SIGSET_T=1;
21265 HAVE_SIGINFO_T=1;
21266 HAVE_SIGACTION=1;
21267 HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
21268
21269 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
f199cab1 21270
5476a9a4
GM
21271 HAVE_SIGHANDLER_T=1;
21272 REPLACE_PTHREAD_SIGMASK=0;
21273 REPLACE_RAISE=0;
1f5d53eb 21274
1fd182f0 21275
b06b1098 21276
1fd182f0 21277
3e0be4ab
GM
21278
21279
f077f61d 21280
5476a9a4
GM
21281 ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
21282 #include <signal.h>
21283 /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
21284 #include <sys/types.h>
21285
21286"
21287if test "x$ac_cv_type_sigset_t" = x""yes; then :
21288
21289cat >>confdefs.h <<_ACEOF
21290#define HAVE_SIGSET_T 1
f199cab1 21291_ACEOF
3e0be4ab 21292
5476a9a4
GM
21293gl_cv_type_sigset_t=yes
21294else
21295 gl_cv_type_sigset_t=no
f199cab1 21296fi
3e0be4ab 21297
5476a9a4
GM
21298 if test $gl_cv_type_sigset_t != yes; then
21299 HAVE_SIGSET_T=0
21300 fi
3e0be4ab 21301
1f5d53eb 21302
3e0be4ab 21303
5476a9a4
GM
21304 if test $ac_cv_header_sys_socket_h = no; then
21305 for ac_header in ws2tcpip.h
21306do :
21307 ac_fn_c_check_header_mongrel "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default"
21308if test "x$ac_cv_header_ws2tcpip_h" = x""yes; then :
21309 cat >>confdefs.h <<_ACEOF
21310#define HAVE_WS2TCPIP_H 1
21311_ACEOF
3e0be4ab 21312
5476a9a4 21313fi
3e0be4ab 21314
5476a9a4
GM
21315done
21316
21317 fi
21318
21319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
21320$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
21321if test "${ac_cv_header_stdbool_h+set}" = set; then :
21322 $as_echo_n "(cached) " >&6
21323else
21324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21325/* end confdefs.h. */
1f5d53eb 21326
5476a9a4
GM
21327 #include <stdbool.h>
21328 #ifndef bool
21329 "error: bool is not defined"
21330 #endif
21331 #ifndef false
21332 "error: false is not defined"
21333 #endif
21334 #if false
21335 "error: false is not 0"
21336 #endif
21337 #ifndef true
21338 "error: true is not defined"
21339 #endif
21340 #if true != 1
21341 "error: true is not 1"
21342 #endif
21343 #ifndef __bool_true_false_are_defined
21344 "error: __bool_true_false_are_defined is not defined"
21345 #endif
21346
21347 struct s { _Bool s: 1; _Bool t; } s;
21348
21349 char a[true == 1 ? 1 : -1];
21350 char b[false == 0 ? 1 : -1];
21351 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
21352 char d[(bool) 0.5 == true ? 1 : -1];
21353 /* See body of main program for 'e'. */
21354 char f[(_Bool) 0.0 == false ? 1 : -1];
21355 char g[true];
21356 char h[sizeof (_Bool)];
21357 char i[sizeof s.t];
21358 enum { j = false, k = true, l = false * true, m = true * 256 };
21359 /* The following fails for
21360 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
21361 _Bool n[m];
21362 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
21363 char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
21364 /* Catch a bug in an HP-UX C compiler. See
21365 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
21366 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
21367 */
21368 _Bool q = true;
21369 _Bool *pq = &q;
1ebc9c87
GM
21370
21371int
21372main ()
21373{
f199cab1 21374
5476a9a4
GM
21375 bool e = &s;
21376 *pq |= q;
21377 *pq |= ! q;
21378 /* Refer to every declared value, to avoid compiler optimizations. */
21379 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
21380 + !m + !n + !o + !p + !q + !pq);
f199cab1 21381
5476a9a4 21382 ;
1ebc9c87
GM
21383 return 0;
21384}
21385_ACEOF
5476a9a4
GM
21386if ac_fn_c_try_compile "$LINENO"; then :
21387 ac_cv_header_stdbool_h=yes
1ebc9c87 21388else
5476a9a4 21389 ac_cv_header_stdbool_h=no
1ebc9c87 21390fi
5476a9a4 21391rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1ebc9c87 21392fi
5476a9a4
GM
21393{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
21394$as_echo "$ac_cv_header_stdbool_h" >&6; }
21395 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
21396if test "x$ac_cv_type__Bool" = x""yes; then :
1ebc9c87 21397
5476a9a4
GM
21398cat >>confdefs.h <<_ACEOF
21399#define HAVE__BOOL 1
21400_ACEOF
1ebc9c87 21401
1ebc9c87
GM
21402
21403fi
21404
1ebc9c87 21405
1ebc9c87 21406
5476a9a4
GM
21407 REPLACE_NULL=0;
21408 HAVE_WCHAR_T=1;
21409
21410
21411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
21412$as_echo_n "checking for wchar_t... " >&6; }
21413if test "${gt_cv_c_wchar_t+set}" = set; then :
21414 $as_echo_n "(cached) " >&6
21415else
21416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21417/* end confdefs.h. */
21418#include <stddef.h>
21419 wchar_t foo = (wchar_t)'\0';
21420int
21421main ()
21422{
21423
21424 ;
21425 return 0;
21426}
21427_ACEOF
21428if ac_fn_c_try_compile "$LINENO"; then :
21429 gt_cv_c_wchar_t=yes
21430else
21431 gt_cv_c_wchar_t=no
21432fi
21433rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1ebc9c87 21434fi
5476a9a4
GM
21435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
21436$as_echo "$gt_cv_c_wchar_t" >&6; }
21437 if test $gt_cv_c_wchar_t = yes; then
1ebc9c87 21438
5476a9a4
GM
21439$as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
21440
21441 fi
21442
21443
21444 GNULIB_DPRINTF=0;
21445 GNULIB_FCLOSE=0;
21446 GNULIB_FDOPEN=0;
21447 GNULIB_FFLUSH=0;
21448 GNULIB_FGETC=0;
21449 GNULIB_FGETS=0;
21450 GNULIB_FOPEN=0;
21451 GNULIB_FPRINTF=0;
21452 GNULIB_FPRINTF_POSIX=0;
21453 GNULIB_FPURGE=0;
21454 GNULIB_FPUTC=0;
21455 GNULIB_FPUTS=0;
21456 GNULIB_FREAD=0;
21457 GNULIB_FREOPEN=0;
21458 GNULIB_FSCANF=0;
21459 GNULIB_FSEEK=0;
21460 GNULIB_FSEEKO=0;
21461 GNULIB_FTELL=0;
21462 GNULIB_FTELLO=0;
21463 GNULIB_FWRITE=0;
21464 GNULIB_GETC=0;
21465 GNULIB_GETCHAR=0;
21466 GNULIB_GETDELIM=0;
21467 GNULIB_GETLINE=0;
21468 GNULIB_OBSTACK_PRINTF=0;
21469 GNULIB_OBSTACK_PRINTF_POSIX=0;
21470 GNULIB_PCLOSE=0;
21471 GNULIB_PERROR=0;
21472 GNULIB_POPEN=0;
21473 GNULIB_PRINTF=0;
21474 GNULIB_PRINTF_POSIX=0;
21475 GNULIB_PUTC=0;
21476 GNULIB_PUTCHAR=0;
21477 GNULIB_PUTS=0;
21478 GNULIB_REMOVE=0;
21479 GNULIB_RENAME=0;
21480 GNULIB_RENAMEAT=0;
21481 GNULIB_SCANF=0;
21482 GNULIB_SNPRINTF=0;
21483 GNULIB_SPRINTF_POSIX=0;
21484 GNULIB_STDIO_H_NONBLOCKING=0;
21485 GNULIB_STDIO_H_SIGPIPE=0;
21486 GNULIB_TMPFILE=0;
21487 GNULIB_VASPRINTF=0;
21488 GNULIB_VFSCANF=0;
21489 GNULIB_VSCANF=0;
21490 GNULIB_VDPRINTF=0;
21491 GNULIB_VFPRINTF=0;
21492 GNULIB_VFPRINTF_POSIX=0;
21493 GNULIB_VPRINTF=0;
21494 GNULIB_VPRINTF_POSIX=0;
21495 GNULIB_VSNPRINTF=0;
21496 GNULIB_VSPRINTF_POSIX=0;
21497 HAVE_DECL_FPURGE=1;
21498 HAVE_DECL_FSEEKO=1;
21499 HAVE_DECL_FTELLO=1;
21500 HAVE_DECL_GETDELIM=1;
21501 HAVE_DECL_GETLINE=1;
21502 HAVE_DECL_OBSTACK_PRINTF=1;
21503 HAVE_DECL_SNPRINTF=1;
21504 HAVE_DECL_VSNPRINTF=1;
21505 HAVE_DPRINTF=1;
21506 HAVE_FSEEKO=1;
21507 HAVE_FTELLO=1;
21508 HAVE_PCLOSE=1;
21509 HAVE_POPEN=1;
21510 HAVE_RENAMEAT=1;
21511 HAVE_VASPRINTF=1;
21512 HAVE_VDPRINTF=1;
21513 REPLACE_DPRINTF=0;
21514 REPLACE_FCLOSE=0;
21515 REPLACE_FDOPEN=0;
21516 REPLACE_FFLUSH=0;
21517 REPLACE_FOPEN=0;
21518 REPLACE_FPRINTF=0;
21519 REPLACE_FPURGE=0;
21520 REPLACE_FREOPEN=0;
21521 REPLACE_FSEEK=0;
21522 REPLACE_FSEEKO=0;
21523 REPLACE_FTELL=0;
21524 REPLACE_FTELLO=0;
21525 REPLACE_GETDELIM=0;
21526 REPLACE_GETLINE=0;
21527 REPLACE_OBSTACK_PRINTF=0;
21528 REPLACE_PERROR=0;
21529 REPLACE_POPEN=0;
21530 REPLACE_PRINTF=0;
21531 REPLACE_REMOVE=0;
21532 REPLACE_RENAME=0;
21533 REPLACE_RENAMEAT=0;
21534 REPLACE_SNPRINTF=0;
21535 REPLACE_SPRINTF=0;
21536 REPLACE_STDIO_READ_FUNCS=0;
21537 REPLACE_STDIO_WRITE_FUNCS=0;
21538 REPLACE_TMPFILE=0;
21539 REPLACE_VASPRINTF=0;
21540 REPLACE_VDPRINTF=0;
21541 REPLACE_VFPRINTF=0;
21542 REPLACE_VPRINTF=0;
21543 REPLACE_VSNPRINTF=0;
21544 REPLACE_VSPRINTF=0;
1ebc9c87 21545
5476a9a4
GM
21546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
21547$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
21548if test "${ac_cv_struct_tm+set}" = set; then :
1ebc9c87
GM
21549 $as_echo_n "(cached) " >&6
21550else
5476a9a4 21551 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1ebc9c87 21552/* end confdefs.h. */
5476a9a4
GM
21553#include <sys/types.h>
21554#include <time.h>
1ebc9c87
GM
21555
21556int
21557main ()
21558{
5476a9a4
GM
21559struct tm tm;
21560 int *p = &tm.tm_sec;
21561 return !p;
1ebc9c87
GM
21562 ;
21563 return 0;
21564}
21565_ACEOF
5476a9a4
GM
21566if ac_fn_c_try_compile "$LINENO"; then :
21567 ac_cv_struct_tm=time.h
1ebc9c87 21568else
5476a9a4 21569 ac_cv_struct_tm=sys/time.h
1ebc9c87 21570fi
5476a9a4 21571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1ebc9c87 21572fi
5476a9a4
GM
21573{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
21574$as_echo "$ac_cv_struct_tm" >&6; }
21575if test $ac_cv_struct_tm = sys/time.h; then
1ebc9c87 21576
5476a9a4 21577$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
1ebc9c87 21578
1ebc9c87
GM
21579fi
21580
5476a9a4
GM
21581ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
21582#include <$ac_cv_struct_tm>
1fd182f0 21583
5476a9a4
GM
21584"
21585if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
1fd182f0 21586
5476a9a4
GM
21587cat >>confdefs.h <<_ACEOF
21588#define HAVE_STRUCT_TM_TM_ZONE 1
f199cab1 21589_ACEOF
5476a9a4
GM
21590
21591
1f5d53eb 21592fi
1fd182f0 21593
5476a9a4 21594if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
1f5d53eb 21595
5476a9a4 21596$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
1fd182f0 21597
5476a9a4
GM
21598else
21599 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
21600"
21601if test "x$ac_cv_have_decl_tzname" = x""yes; then :
21602 ac_have_decl=1
21603else
21604 ac_have_decl=0
21605fi
1fd182f0 21606
5476a9a4
GM
21607cat >>confdefs.h <<_ACEOF
21608#define HAVE_DECL_TZNAME $ac_have_decl
21609_ACEOF
f199cab1 21610
5476a9a4
GM
21611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
21612$as_echo_n "checking for tzname... " >&6; }
21613if test "${ac_cv_var_tzname+set}" = set; then :
f199cab1 21614 $as_echo_n "(cached) " >&6
3e0be4ab 21615else
5476a9a4 21616 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 21617/* end confdefs.h. */
5476a9a4
GM
21618#include <time.h>
21619#if !HAVE_DECL_TZNAME
21620extern char *tzname[];
f199cab1 21621#endif
5476a9a4 21622
f199cab1
GM
21623int
21624main ()
21625{
5476a9a4 21626return tzname[0][0];
f199cab1
GM
21627 ;
21628 return 0;
21629}
3e0be4ab 21630_ACEOF
f199cab1 21631if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 21632 ac_cv_var_tzname=yes
3e0be4ab 21633else
5476a9a4 21634 ac_cv_var_tzname=no
f199cab1
GM
21635fi
21636rm -f core conftest.err conftest.$ac_objext \
21637 conftest$ac_exeext conftest.$ac_ext
f199cab1 21638fi
5476a9a4
GM
21639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
21640$as_echo "$ac_cv_var_tzname" >&6; }
21641 if test $ac_cv_var_tzname = yes; then
21642
21643$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
f199cab1 21644
5476a9a4 21645 fi
3e0be4ab 21646fi
cc322c06 21647
5476a9a4
GM
21648
21649 ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include <time.h>
21650"
21651if test "x$ac_cv_member_struct_tm_tm_gmtoff" = x""yes; then :
21652
21653$as_echo "#define HAVE_TM_GMTOFF 1" >>confdefs.h
cc322c06 21654
f199cab1 21655fi
cc322c06 21656
1f5d53eb 21657
e275c824 21658
5476a9a4 21659
283c7aed
GM
21660
21661
21662
21663
21664
21665
21666
21667
21668
21669 if test $gl_cv_have_include_next = yes; then
21670 gl_cv_next_string_h='<'string.h'>'
21671 else
21672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
21673$as_echo_n "checking absolute name of <string.h>... " >&6; }
21674if test "${gl_cv_next_string_h+set}" = set; then :
21675 $as_echo_n "(cached) " >&6
21676else
21677
21678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21679/* end confdefs.h. */
21680#include <string.h>
21681
21682_ACEOF
21683 case "$host_os" in
21684 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21685 *) gl_absname_cpp="$ac_cpp" ;;
21686 esac
21687
21688 case "$host_os" in
21689 mingw*)
21690 gl_dirsep_regex='[/\\]'
21691 ;;
21692 *)
21693 gl_dirsep_regex='\/'
21694 ;;
21695 esac
21696 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21697
21698 gl_header_literal_regex=`echo 'string.h' \
21699 | sed -e "$gl_make_literal_regex_sed"`
21700 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21701 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21702 s|^/[^/]|//&|
21703 p
21704 q
21705 }'
21706 gl_cv_next_string_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21707 sed -n "$gl_absolute_header_sed"`'"'
21708
21709
21710fi
21711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
21712$as_echo "$gl_cv_next_string_h" >&6; }
21713 fi
21714 NEXT_STRING_H=$gl_cv_next_string_h
21715
21716 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21717 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21718 gl_next_as_first_directive='<'string.h'>'
21719 else
21720 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21721 gl_next_as_first_directive=$gl_cv_next_string_h
21722 fi
21723 NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
21724
21725
21726
21727
21728
21729
21730
21731
21732
5476a9a4
GM
21733ac_fn_c_check_decl "$LINENO" "strtoimax" "ac_cv_have_decl_strtoimax" "$ac_includes_default"
21734if test "x$ac_cv_have_decl_strtoimax" = x""yes; then :
21735 ac_have_decl=1
3e0be4ab 21736else
5476a9a4 21737 ac_have_decl=0
3e0be4ab 21738fi
5476a9a4
GM
21739
21740cat >>confdefs.h <<_ACEOF
21741#define HAVE_DECL_STRTOIMAX $ac_have_decl
f199cab1 21742_ACEOF
e275c824
PE
21743
21744
5476a9a4
GM
21745
21746ac_fn_c_check_decl "$LINENO" "strtoumax" "ac_cv_have_decl_strtoumax" "$ac_includes_default"
21747if test "x$ac_cv_have_decl_strtoumax" = x""yes; then :
21748 ac_have_decl=1
21749else
21750 ac_have_decl=0
3e0be4ab 21751fi
e275c824 21752
5476a9a4
GM
21753cat >>confdefs.h <<_ACEOF
21754#define HAVE_DECL_STRTOUMAX $ac_have_decl
21755_ACEOF
e275c824
PE
21756
21757
2b1928b8 21758
5476a9a4
GM
21759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
21760$as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
21761if test "${ac_cv_header_stat_broken+set}" = set; then :
f199cab1 21762 $as_echo_n "(cached) " >&6
2b1928b8 21763else
5476a9a4
GM
21764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21765/* end confdefs.h. */
21766#include <sys/types.h>
21767#include <sys/stat.h>
2b1928b8 21768
5476a9a4
GM
21769#if defined S_ISBLK && defined S_IFDIR
21770extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
21771#endif
2b1928b8 21772
5476a9a4
GM
21773#if defined S_ISBLK && defined S_IFCHR
21774extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
21775#endif
0eb775a3 21776
5476a9a4
GM
21777#if defined S_ISLNK && defined S_IFREG
21778extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
21779#endif
21780
21781#if defined S_ISSOCK && defined S_IFREG
21782extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
21783#endif
0eb775a3 21784
5476a9a4
GM
21785_ACEOF
21786if ac_fn_c_try_compile "$LINENO"; then :
21787 ac_cv_header_stat_broken=no
f199cab1 21788else
5476a9a4 21789 ac_cv_header_stat_broken=yes
f199cab1 21790fi
5476a9a4 21791rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 21792fi
5476a9a4
GM
21793{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
21794$as_echo "$ac_cv_header_stat_broken" >&6; }
21795if test $ac_cv_header_stat_broken = yes; then
0eb775a3 21796
5476a9a4 21797$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
0eb775a3 21798
5476a9a4 21799fi
0eb775a3
GM
21800
21801
21802
5476a9a4
GM
21803
21804
21805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
21806$as_echo_n "checking for struct timespec in <time.h>... " >&6; }
21807if test "${gl_cv_sys_struct_timespec_in_time_h+set}" = set; then :
21808 $as_echo_n "(cached) " >&6
21809else
21810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3e0be4ab 21811/* end confdefs.h. */
5476a9a4 21812#include <time.h>
52724a05 21813
3e0be4ab
GM
21814int
21815main ()
21816{
5476a9a4 21817static struct timespec x; x.tv_sec = x.tv_nsec;
3e0be4ab
GM
21818 ;
21819 return 0;
21820}
21821_ACEOF
5476a9a4
GM
21822if ac_fn_c_try_compile "$LINENO"; then :
21823 gl_cv_sys_struct_timespec_in_time_h=yes
3e0be4ab 21824else
5476a9a4 21825 gl_cv_sys_struct_timespec_in_time_h=no
3e0be4ab 21826fi
5476a9a4
GM
21827rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21828fi
21829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
21830$as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
52724a05 21831
5476a9a4
GM
21832 TIME_H_DEFINES_STRUCT_TIMESPEC=0
21833 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
21834 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
21835 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
21836 TIME_H_DEFINES_STRUCT_TIMESPEC=1
21837 else
21838 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
21839$as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
21840if test "${gl_cv_sys_struct_timespec_in_sys_time_h+set}" = set; then :
21841 $as_echo_n "(cached) " >&6
21842else
3e0be4ab
GM
21843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21844/* end confdefs.h. */
5476a9a4
GM
21845#include <sys/time.h>
21846
3e0be4ab
GM
21847int
21848main ()
21849{
5476a9a4 21850static struct timespec x; x.tv_sec = x.tv_nsec;
3e0be4ab
GM
21851 ;
21852 return 0;
21853}
21854_ACEOF
5476a9a4
GM
21855if ac_fn_c_try_compile "$LINENO"; then :
21856 gl_cv_sys_struct_timespec_in_sys_time_h=yes
3e0be4ab 21857else
5476a9a4 21858 gl_cv_sys_struct_timespec_in_sys_time_h=no
3e0be4ab 21859fi
5476a9a4 21860rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 21861fi
5476a9a4
GM
21862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
21863$as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
21864 if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
21865 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
21866 else
21867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
21868$as_echo_n "checking for struct timespec in <pthread.h>... " >&6; }
21869if test "${gl_cv_sys_struct_timespec_in_pthread_h+set}" = set; then :
3e0be4ab
GM
21870 $as_echo_n "(cached) " >&6
21871else
21872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21873/* end confdefs.h. */
5476a9a4
GM
21874#include <pthread.h>
21875
3e0be4ab
GM
21876int
21877main ()
21878{
5476a9a4 21879static struct timespec x; x.tv_sec = x.tv_nsec;
3e0be4ab
GM
21880 ;
21881 return 0;
21882}
21883_ACEOF
5476a9a4
GM
21884if ac_fn_c_try_compile "$LINENO"; then :
21885 gl_cv_sys_struct_timespec_in_pthread_h=yes
3e0be4ab 21886else
5476a9a4 21887 gl_cv_sys_struct_timespec_in_pthread_h=no
3e0be4ab 21888fi
5476a9a4 21889rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3e0be4ab 21890fi
5476a9a4
GM
21891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
21892$as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
21893 if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
21894 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
21895 fi
21896 fi
f199cab1 21897 fi
e275c824
PE
21898
21899
b0415a03 21900
b0415a03 21901
e275c824 21902
e275c824
PE
21903
21904
f199cab1 21905
e275c824
PE
21906
21907
21908
21909
21910
21911
21912
5476a9a4
GM
21913 if test $gl_cv_have_include_next = yes; then
21914 gl_cv_next_time_h='<'time.h'>'
21915 else
21916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
21917$as_echo_n "checking absolute name of <time.h>... " >&6; }
21918if test "${gl_cv_next_time_h+set}" = set; then :
21919 $as_echo_n "(cached) " >&6
21920else
e275c824 21921
5476a9a4
GM
21922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21923/* end confdefs.h. */
21924#include <time.h>
e275c824 21925
5476a9a4
GM
21926_ACEOF
21927 case "$host_os" in
21928 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21929 *) gl_absname_cpp="$ac_cpp" ;;
21930 esac
e275c824 21931
5476a9a4
GM
21932 case "$host_os" in
21933 mingw*)
21934 gl_dirsep_regex='[/\\]'
21935 ;;
21936 *)
21937 gl_dirsep_regex='\/'
21938 ;;
21939 esac
21940 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
e275c824 21941
5476a9a4
GM
21942 gl_header_literal_regex=`echo 'time.h' \
21943 | sed -e "$gl_make_literal_regex_sed"`
21944 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21945 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21946 s|^/[^/]|//&|
21947 p
21948 q
21949 }'
21950 gl_cv_next_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21951 sed -n "$gl_absolute_header_sed"`'"'
e275c824
PE
21952
21953
5476a9a4
GM
21954fi
21955{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
21956$as_echo "$gl_cv_next_time_h" >&6; }
21957 fi
21958 NEXT_TIME_H=$gl_cv_next_time_h
67342916 21959
5476a9a4
GM
21960 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21961 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21962 gl_next_as_first_directive='<'time.h'>'
f199cab1 21963 else
5476a9a4
GM
21964 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21965 gl_next_as_first_directive=$gl_cv_next_time_h
f199cab1 21966 fi
5476a9a4 21967 NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
4fda9c95
GM
21968
21969
52724a05
GM
21970
21971
21972
21973
21974
21975
21976
ae0d7250
PE
21977
21978
21979
cc322c06 21980
f199cab1 21981
b5591ebb
GM
21982ac_fn_c_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default"
21983if test "x$ac_cv_have_decl_unsetenv" = x""yes; then :
21984 ac_have_decl=1
21985else
21986 ac_have_decl=0
21987fi
21988
21989cat >>confdefs.h <<_ACEOF
21990#define HAVE_DECL_UNSETENV $ac_have_decl
21991_ACEOF
21992
cc322c06 21993
5476a9a4
GM
21994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the utimes function works" >&5
21995$as_echo_n "checking whether the utimes function works... " >&6; }
21996if test "${gl_cv_func_working_utimes+set}" = set; then :
21997 $as_echo_n "(cached) " >&6
21998else
1fd182f0 21999
5476a9a4
GM
22000 if test "$cross_compiling" = yes; then :
22001 gl_cv_func_working_utimes=no
22002else
22003 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22004/* end confdefs.h. */
22005
22006#include <sys/types.h>
22007#include <sys/stat.h>
22008#include <fcntl.h>
22009#include <sys/time.h>
22010#include <time.h>
22011#include <unistd.h>
22012#include <stdlib.h>
22013#include <stdio.h>
22014#include <utime.h>
1fd182f0 22015
5476a9a4
GM
22016static int
22017inorder (time_t a, time_t b, time_t c)
22018{
22019 return a <= b && b <= c;
22020}
1fd182f0 22021
5476a9a4
GM
22022int
22023main ()
22024{
22025 int result = 0;
22026 char const *file = "conftest.utimes";
22027 static struct timeval timeval[2] = {{9, 10}, {999999, 999999}};
1fd182f0 22028
5476a9a4
GM
22029 /* Test whether utimes() essentially works. */
22030 {
22031 struct stat sbuf;
22032 FILE *f = fopen (file, "w");
22033 if (f == NULL)
22034 result |= 1;
22035 else if (fclose (f) != 0)
22036 result |= 1;
22037 else if (utimes (file, timeval) != 0)
22038 result |= 2;
22039 else if (lstat (file, &sbuf) != 0)
22040 result |= 1;
22041 else if (!(sbuf.st_atime == timeval[0].tv_sec
22042 && sbuf.st_mtime == timeval[1].tv_sec))
22043 result |= 4;
22044 if (unlink (file) != 0)
22045 result |= 1;
22046 }
1fd182f0 22047
5476a9a4
GM
22048 /* Test whether utimes() with a NULL argument sets the file's timestamp
22049 to the current time. Use 'fstat' as well as 'time' to
22050 determine the "current" time, to accommodate NFS file systems
22051 if there is a time skew between the host and the NFS server. */
22052 {
22053 int fd = open (file, O_WRONLY|O_CREAT, 0644);
22054 if (fd < 0)
22055 result |= 1;
22056 else
22057 {
22058 time_t t0, t2;
22059 struct stat st0, st1, st2;
22060 if (time (&t0) == (time_t) -1)
22061 result |= 1;
22062 else if (fstat (fd, &st0) != 0)
22063 result |= 1;
22064 else if (utimes (file, timeval) != 0)
22065 result |= 2;
22066 else if (utimes (file, NULL) != 0)
22067 result |= 8;
22068 else if (fstat (fd, &st1) != 0)
22069 result |= 1;
22070 else if (write (fd, "\n", 1) != 1)
22071 result |= 1;
22072 else if (fstat (fd, &st2) != 0)
22073 result |= 1;
22074 else if (time (&t2) == (time_t) -1)
22075 result |= 1;
22076 else
22077 {
22078 int m_ok_POSIX = inorder (t0, st1.st_mtime, t2);
22079 int m_ok_NFS = inorder (st0.st_mtime, st1.st_mtime, st2.st_mtime);
22080 if (! (st1.st_atime == st1.st_mtime))
22081 result |= 16;
22082 if (! (m_ok_POSIX || m_ok_NFS))
22083 result |= 32;
22084 }
22085 if (close (fd) != 0)
22086 result |= 1;
22087 }
22088 if (unlink (file) != 0)
22089 result |= 1;
22090 }
52724a05 22091
5476a9a4
GM
22092 /* Test whether utimes() with a NULL argument works on read-only files. */
22093 {
22094 int fd = open (file, O_WRONLY|O_CREAT, 0444);
22095 if (fd < 0)
22096 result |= 1;
22097 else if (close (fd) != 0)
22098 result |= 1;
22099 else if (utimes (file, NULL) != 0)
22100 result |= 64;
22101 if (unlink (file) != 0)
22102 result |= 1;
22103 }
1fd182f0 22104
5476a9a4
GM
22105 return result;
22106}
1fd182f0 22107
5476a9a4
GM
22108_ACEOF
22109if ac_fn_c_try_run "$LINENO"; then :
22110 gl_cv_func_working_utimes=yes
22111else
22112 gl_cv_func_working_utimes=no
22113fi
22114rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22115 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1 22116fi
1fd182f0 22117
5476a9a4
GM
22118fi
22119{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_utimes" >&5
22120$as_echo "$gl_cv_func_working_utimes" >&6; }
1fd182f0 22121
5476a9a4 22122 if test $gl_cv_func_working_utimes = yes; then
1fd182f0 22123
5476a9a4 22124$as_echo "#define HAVE_WORKING_UTIMES 1" >>confdefs.h
1fd182f0 22125
5476a9a4 22126 fi
1fd182f0 22127
1fd182f0 22128
1fd182f0 22129
1fd182f0 22130
1fd182f0 22131
5476a9a4
GM
22132 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct utimbuf" >&5
22133$as_echo_n "checking for struct utimbuf... " >&6; }
22134if test "${gl_cv_sys_struct_utimbuf+set}" = set; then :
22135 $as_echo_n "(cached) " >&6
22136else
22137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22138/* end confdefs.h. */
22139#if HAVE_SYS_TIME_H
22140 #include <sys/time.h>
22141 #endif
22142 #include <time.h>
22143 #ifdef HAVE_UTIME_H
22144 #include <utime.h>
22145 #endif
1fd182f0 22146
5476a9a4
GM
22147int
22148main ()
22149{
22150static struct utimbuf x; x.actime = x.modtime;
22151 ;
22152 return 0;
22153}
22154_ACEOF
22155if ac_fn_c_try_compile "$LINENO"; then :
22156 gl_cv_sys_struct_utimbuf=yes
22157else
22158 gl_cv_sys_struct_utimbuf=no
f199cab1 22159fi
5476a9a4 22160rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 22161fi
5476a9a4
GM
22162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_utimbuf" >&5
22163$as_echo "$gl_cv_sys_struct_utimbuf" >&6; }
1fd182f0 22164
5476a9a4 22165 if test $gl_cv_sys_struct_utimbuf = yes; then
1fd182f0 22166
5476a9a4 22167$as_echo "#define HAVE_STRUCT_UTIMBUF 1" >>confdefs.h
1fd182f0 22168
5476a9a4 22169 fi
1fd182f0 22170
1fd182f0 22171
1fd182f0 22172
1fd182f0 22173
1fd182f0 22174
1fd182f0 22175
1fd182f0 22176
3e0be4ab 22177
f199cab1 22178
f199cab1 22179
067d23c9 22180
710f5812
GM
22181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking type of array argument to getgroups" >&5
22182$as_echo_n "checking type of array argument to getgroups... " >&6; }
22183if test "${ac_cv_type_getgroups+set}" = set; then :
22184 $as_echo_n "(cached) " >&6
22185else
22186 if test "$cross_compiling" = yes; then :
22187 ac_cv_type_getgroups=cross
22188else
22189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22190/* end confdefs.h. */
22191/* Thanks to Mike Rendell for this test. */
22192$ac_includes_default
22193#define NGID 256
22194#undef MAX
22195#define MAX(x, y) ((x) > (y) ? (x) : (y))
22196
22197int
22198main ()
22199{
22200 gid_t gidset[NGID];
22201 int i, n;
22202 union { gid_t gval; long int lval; } val;
22203
22204 val.lval = -1;
22205 for (i = 0; i < NGID; i++)
22206 gidset[i] = val.gval;
22207 n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
22208 gidset);
22209 /* Exit non-zero if getgroups seems to require an array of ints. This
22210 happens when gid_t is short int but getgroups modifies an array
22211 of ints. */
22212 return n > 0 && gidset[n] != val.gval;
22213}
22214_ACEOF
22215if ac_fn_c_try_run "$LINENO"; then :
22216 ac_cv_type_getgroups=gid_t
22217else
22218 ac_cv_type_getgroups=int
22219fi
22220rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22221 conftest.$ac_objext conftest.beam conftest.$ac_ext
22222fi
22223
22224if test $ac_cv_type_getgroups = cross; then
22225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22226/* end confdefs.h. */
22227#include <unistd.h>
22228
22229_ACEOF
22230if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22231 $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then :
22232 ac_cv_type_getgroups=gid_t
22233else
22234 ac_cv_type_getgroups=int
22235fi
22236rm -f conftest*
22237
22238fi
22239fi
22240{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_getgroups" >&5
22241$as_echo "$ac_cv_type_getgroups" >&6; }
22242
22243cat >>confdefs.h <<_ACEOF
22244#define GETGROUPS_T $ac_cv_type_getgroups
22245_ACEOF
22246
22247
22248
067d23c9 22249
0cdca42a
GM
22250
22251
e412eb97
GM
22252
22253
5476a9a4
GM
22254 if false; then
22255 GL_COND_LIBTOOL_TRUE=
22256 GL_COND_LIBTOOL_FALSE='#'
22257else
22258 GL_COND_LIBTOOL_TRUE='#'
22259 GL_COND_LIBTOOL_FALSE=
1fd182f0 22260fi
067d23c9 22261
5476a9a4
GM
22262 gl_cond_libtool=false
22263 gl_libdeps=
22264 gl_ltlibdeps=
22265 gl_m4_base='m4'
067d23c9 22266
f199cab1 22267
f199cab1 22268
f199cab1 22269
067d23c9 22270
f199cab1 22271
f199cab1 22272
f199cab1 22273
067d23c9 22274
5476a9a4 22275 gl_source_base='lib'
cc322c06
GM
22276
22277
5476a9a4
GM
22278 if test $ac_cv_func_alloca_works = no; then
22279 :
f199cab1 22280 fi
cc322c06 22281
5476a9a4
GM
22282 # Define an additional variable used in the Makefile substitution.
22283 if test $ac_cv_working_alloca_h = yes; then
22284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
22285$as_echo_n "checking for alloca as a compiler built-in... " >&6; }
22286if test "${gl_cv_rpl_alloca+set}" = set; then :
22287 $as_echo_n "(cached) " >&6
22288else
cc322c06 22289
5476a9a4
GM
22290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22291/* end confdefs.h. */
067d23c9 22292
5476a9a4
GM
22293#if defined __GNUC__ || defined _AIX || defined _MSC_VER
22294 Need own alloca
22295#endif
067d23c9 22296
f199cab1 22297_ACEOF
5476a9a4
GM
22298if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22299 $EGREP "Need own alloca" >/dev/null 2>&1; then :
22300 gl_cv_rpl_alloca=yes
22301else
22302 gl_cv_rpl_alloca=no
369e19fc 22303fi
5476a9a4 22304rm -f conftest*
067d23c9 22305
ae0d7250 22306
5476a9a4
GM
22307fi
22308{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
22309$as_echo "$gl_cv_rpl_alloca" >&6; }
22310 if test $gl_cv_rpl_alloca = yes; then
52724a05 22311
5476a9a4 22312$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
ae0d7250 22313
5476a9a4
GM
22314 ALLOCA_H=alloca.h
22315 else
22316 ALLOCA_H=
22317 fi
f199cab1 22318 else
5476a9a4
GM
22319 ALLOCA_H=alloca.h
22320 fi
ae0d7250 22321
5476a9a4
GM
22322 if test -n "$ALLOCA_H"; then
22323 GL_GENERATE_ALLOCA_H_TRUE=
22324 GL_GENERATE_ALLOCA_H_FALSE='#'
22325else
22326 GL_GENERATE_ALLOCA_H_TRUE='#'
22327 GL_GENERATE_ALLOCA_H_FALSE=
22328fi
f199cab1 22329
ae0d7250
PE
22330
22331
22332
22333
22334
5476a9a4
GM
22335 # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
22336 # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
ae0d7250 22337
5476a9a4
GM
22338 # Save and restore LIBS so e.g., -lrt, isn't added to it. Otherwise, *all*
22339 # programs in the package would end up linked with that potentially-shared
22340 # library, inducing unnecessary run-time overhead.
22341 LIB_CLOCK_GETTIME=
ae0d7250 22342
5476a9a4
GM
22343 gl_saved_libs=$LIBS
22344 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
22345$as_echo_n "checking for library containing clock_gettime... " >&6; }
22346if test "${ac_cv_search_clock_gettime+set}" = set; then :
22347 $as_echo_n "(cached) " >&6
22348else
22349 ac_func_search_save_LIBS=$LIBS
22350cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22351/* end confdefs.h. */
22352
22353/* Override any GCC internal prototype to avoid an error.
22354 Use char because int might match the return type of a GCC
22355 builtin and then its argument prototype would still apply. */
22356#ifdef __cplusplus
22357extern "C"
22358#endif
22359char clock_gettime ();
22360int
22361main ()
22362{
22363return clock_gettime ();
22364 ;
22365 return 0;
22366}
22367_ACEOF
22368for ac_lib in '' rt posix4; do
22369 if test -z "$ac_lib"; then
22370 ac_res="none required"
22371 else
22372 ac_res=-l$ac_lib
22373 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
22374 fi
22375 if ac_fn_c_try_link "$LINENO"; then :
22376 ac_cv_search_clock_gettime=$ac_res
f199cab1 22377fi
5476a9a4
GM
22378rm -f core conftest.err conftest.$ac_objext \
22379 conftest$ac_exeext
22380 if test "${ac_cv_search_clock_gettime+set}" = set; then :
22381 break
22382fi
22383done
22384if test "${ac_cv_search_clock_gettime+set}" = set; then :
ae0d7250 22385
5476a9a4
GM
22386else
22387 ac_cv_search_clock_gettime=no
22388fi
22389rm conftest.$ac_ext
22390LIBS=$ac_func_search_save_LIBS
22391fi
22392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
22393$as_echo "$ac_cv_search_clock_gettime" >&6; }
22394ac_res=$ac_cv_search_clock_gettime
22395if test "$ac_res" != no; then :
22396 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
22397 test "$ac_cv_search_clock_gettime" = "none required" ||
22398 LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime
22399fi
ae0d7250 22400
5476a9a4
GM
22401 for ac_func in clock_gettime clock_settime
22402do :
22403 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
22404ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
22405eval as_val=\$$as_ac_var
22406 if test "x$as_val" = x""yes; then :
22407 cat >>confdefs.h <<_ACEOF
22408#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
22409_ACEOF
ae0d7250 22410
d7ad186c
GM
22411fi
22412done
22413
22414 LIBS=$gl_saved_libs
22415
22416
22417 :
22418
22419
22420
22421cat >>confdefs.h <<_ACEOF
22422#define GNULIB_CLOSE_STREAM 1
22423_ACEOF
22424
22425
22426
22427
22428 :
22429
22430
22431
22432 :
22433
22434
22435
ffeb6dec 22436 :
d7ad186c
GM
22437
22438
22439
ffeb6dec 22440 :
d7ad186c
GM
22441
22442
22443
22444
22445
22446
22447
22448
22449
22450
22451
ae0d7250 22452
3e0be4ab 22453
d7ad186c
GM
22454 if test $gl_cv_have_include_next = yes; then
22455 gl_cv_next_dirent_h='<'dirent.h'>'
22456 else
22457 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5
22458$as_echo_n "checking absolute name of <dirent.h>... " >&6; }
22459if test "${gl_cv_next_dirent_h+set}" = set; then :
22460 $as_echo_n "(cached) " >&6
22461else
3e0be4ab 22462
d7ad186c 22463 if test $ac_cv_header_dirent_h = yes; then
3bf26e96
GM
22464
22465
d7ad186c
GM
22466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22467/* end confdefs.h. */
22468#include <dirent.h>
3bf26e96 22469
3bf26e96 22470_ACEOF
d7ad186c
GM
22471 case "$host_os" in
22472 aix*) gl_absname_cpp="$ac_cpp -C" ;;
22473 *) gl_absname_cpp="$ac_cpp" ;;
22474 esac
3bf26e96 22475
d7ad186c
GM
22476 case "$host_os" in
22477 mingw*)
22478 gl_dirsep_regex='[/\\]'
22479 ;;
22480 *)
22481 gl_dirsep_regex='\/'
22482 ;;
22483 esac
22484 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
3bf26e96 22485
d7ad186c
GM
22486 gl_header_literal_regex=`echo 'dirent.h' \
22487 | sed -e "$gl_make_literal_regex_sed"`
22488 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22489 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22490 s|^/[^/]|//&|
22491 p
22492 q
22493 }'
22494 gl_cv_next_dirent_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22495 sed -n "$gl_absolute_header_sed"`'"'
22496 else
22497 gl_cv_next_dirent_h='<'dirent.h'>'
22498 fi
3bf26e96 22499
3e0be4ab 22500
d7ad186c
GM
22501fi
22502{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5
22503$as_echo "$gl_cv_next_dirent_h" >&6; }
22504 fi
22505 NEXT_DIRENT_H=$gl_cv_next_dirent_h
f199cab1 22506
d7ad186c
GM
22507 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22508 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22509 gl_next_as_first_directive='<'dirent.h'>'
22510 else
22511 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22512 gl_next_as_first_directive=$gl_cv_next_dirent_h
22513 fi
22514 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive
f199cab1 22515
3e0be4ab 22516
f199cab1 22517
f199cab1 22518
d7ad186c
GM
22519 if test $ac_cv_header_dirent_h = yes; then
22520 HAVE_DIRENT_H=1
22521 else
22522 HAVE_DIRENT_H=0
22523 fi
3e0be4ab 22524
f199cab1
GM
22525
22526
22527
5476a9a4
GM
22528
22529
22530
22531
22532
22533
5476a9a4
GM
22534$as_echo "#define HAVE_DUP2 1" >>confdefs.h
22535
22536
22537 if test $HAVE_DUP2 = 1; then
22538 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
22539$as_echo_n "checking whether dup2 works... " >&6; }
22540if test "${gl_cv_func_dup2_works+set}" = set; then :
3e0be4ab
GM
22541 $as_echo_n "(cached) " >&6
22542else
5476a9a4
GM
22543 if test "$cross_compiling" = yes; then :
22544 case "$host_os" in
22545 mingw*) # on this platform, dup2 always returns 0 for success
22546 gl_cv_func_dup2_works="guessing no" ;;
22547 cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
22548 gl_cv_func_dup2_works="guessing no" ;;
22549 linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a
22550 # closed fd may yield -EBADF instead of -1 / errno=EBADF.
22551 gl_cv_func_dup2_works="guessing no" ;;
22552 freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF.
22553 gl_cv_func_dup2_works="guessing no" ;;
22554 haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
22555 gl_cv_func_dup2_works="guessing no" ;;
22556 *) gl_cv_func_dup2_works="guessing yes" ;;
22557 esac
22558else
22559 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3e0be4ab 22560/* end confdefs.h. */
ae0d7250 22561
5476a9a4
GM
22562 #include <unistd.h>
22563#include <fcntl.h>
22564#include <errno.h>
3e0be4ab
GM
22565int
22566main ()
22567{
5476a9a4
GM
22568int result = 0;
22569#ifdef FD_CLOEXEC
22570 if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
22571 result |= 1;
22572#endif
22573 if (dup2 (1, 1) == 0)
22574 result |= 2;
22575#ifdef FD_CLOEXEC
22576 if (fcntl (1, F_GETFD) != FD_CLOEXEC)
22577 result |= 4;
22578#endif
22579 close (0);
22580 if (dup2 (0, 0) != -1)
22581 result |= 8;
22582 /* Many gnulib modules require POSIX conformance of EBADF. */
22583 if (dup2 (2, 1000000) == -1 && errno != EBADF)
22584 result |= 16;
0d1f53ad
GM
22585 /* Flush out a cygwin core dump. */
22586 if (dup2 (2, -1) != -1 || errno != EBADF)
22587 result |= 32;
5476a9a4
GM
22588 return result;
22589
ae0d7250
PE
22590 ;
22591 return 0;
22592}
5476a9a4 22593
ae0d7250 22594_ACEOF
5476a9a4
GM
22595if ac_fn_c_try_run "$LINENO"; then :
22596 gl_cv_func_dup2_works=yes
ae0d7250 22597else
5476a9a4 22598 gl_cv_func_dup2_works=no
ae0d7250 22599fi
5476a9a4
GM
22600rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22601 conftest.$ac_objext conftest.beam conftest.$ac_ext
ae0d7250 22602fi
5476a9a4
GM
22603
22604
3e0be4ab 22605fi
5476a9a4
GM
22606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
22607$as_echo "$gl_cv_func_dup2_works" >&6; }
22608 case "$gl_cv_func_dup2_works" in
22609 *yes) ;;
22610 *)
22611 REPLACE_DUP2=1
22612 ;;
22613 esac
22614 fi
3e0be4ab 22615
3e0be4ab 22616
a6342fc8 22617 if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
f199cab1 22618
f199cab1
GM
22619
22620
f199cab1 22621
f199cab1 22622
f199cab1 22623
f199cab1 22624
f199cab1 22625
5476a9a4 22626 gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
f199cab1
GM
22627
22628
a6342fc8 22629 fi
f199cab1 22630
f199cab1 22631
f199cab1 22632
f199cab1 22633
f199cab1 22634
5476a9a4 22635 GNULIB_DUP2=1
f199cab1
GM
22636
22637
f199cab1 22638
f199cab1 22639
3e0be4ab 22640
3e0be4ab 22641
f199cab1
GM
22642
22643
ae0d7250 22644
ae0d7250 22645
5476a9a4 22646
93131e11
GM
22647 GNULIB_ENVIRON=1
22648
22649
22650
22651
22652
22653
22654
22655
3a019ab4 22656
8966cbff
GM
22657 LIB_EXECINFO=''
22658 EXECINFO_H='execinfo.h'
22659
22660 if test $ac_cv_header_execinfo_h = yes; then
22661 gl_saved_libs=$LIBS
22662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing backtrace_symbols_fd" >&5
22663$as_echo_n "checking for library containing backtrace_symbols_fd... " >&6; }
22664if test "${ac_cv_search_backtrace_symbols_fd+set}" = set; then :
22665 $as_echo_n "(cached) " >&6
22666else
22667 ac_func_search_save_LIBS=$LIBS
22668cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22669/* end confdefs.h. */
22670
22671/* Override any GCC internal prototype to avoid an error.
22672 Use char because int might match the return type of a GCC
22673 builtin and then its argument prototype would still apply. */
22674#ifdef __cplusplus
22675extern "C"
22676#endif
22677char backtrace_symbols_fd ();
22678int
22679main ()
22680{
22681return backtrace_symbols_fd ();
22682 ;
22683 return 0;
22684}
22685_ACEOF
22686for ac_lib in '' execinfo; do
22687 if test -z "$ac_lib"; then
22688 ac_res="none required"
22689 else
22690 ac_res=-l$ac_lib
22691 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
22692 fi
22693 if ac_fn_c_try_link "$LINENO"; then :
22694 ac_cv_search_backtrace_symbols_fd=$ac_res
22695fi
22696rm -f core conftest.err conftest.$ac_objext \
22697 conftest$ac_exeext
22698 if test "${ac_cv_search_backtrace_symbols_fd+set}" = set; then :
22699 break
22700fi
22701done
22702if test "${ac_cv_search_backtrace_symbols_fd+set}" = set; then :
22703
22704else
22705 ac_cv_search_backtrace_symbols_fd=no
22706fi
22707rm conftest.$ac_ext
22708LIBS=$ac_func_search_save_LIBS
22709fi
22710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_backtrace_symbols_fd" >&5
22711$as_echo "$ac_cv_search_backtrace_symbols_fd" >&6; }
22712ac_res=$ac_cv_search_backtrace_symbols_fd
22713if test "$ac_res" != no; then :
22714 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
22715 test "$ac_cv_search_backtrace_symbols_fd" = "none required" ||
22716 LIB_EXECINFO=$ac_cv_search_backtrace_symbols_fd
22717fi
22718
22719 LIBS=$gl_saved_libs
22720 test "$ac_cv_search_backtrace_symbols_fd" = no || EXECINFO_H=''
22721 fi
22722
22723 if test -n "$EXECINFO_H"; then
22724
22725
22726
22727
22728
22729
22730
22731
22732 gl_LIBOBJS="$gl_LIBOBJS execinfo.$ac_objext"
22733
22734 fi
22735
22736
22737
22738 if test -n "$EXECINFO_H"; then
22739 GL_GENERATE_EXECINFO_H_TRUE=
22740 GL_GENERATE_EXECINFO_H_FALSE='#'
22741else
22742 GL_GENERATE_EXECINFO_H_TRUE='#'
22743 GL_GENERATE_EXECINFO_H_FALSE=
22744fi
22745
22746
22747
22748
22749
93131e11
GM
22750
22751
22752
7cd2ed2c 22753
710f5812
GM
22754 if test $ac_cv_func_faccessat = no; then
22755 HAVE_FACCESSAT=0
22756 fi
22757
22758 if test $HAVE_FACCESSAT = 0; then
22759
22760
22761
22762
22763
22764
22765
22766
22767 gl_LIBOBJS="$gl_LIBOBJS faccessat.$ac_objext"
22768
22769
22770 for ac_func in access
22771do :
22772 ac_fn_c_check_func "$LINENO" "access" "ac_cv_func_access"
22773if test "x$ac_cv_func_access" = x""yes; then :
22774 cat >>confdefs.h <<_ACEOF
22775#define HAVE_ACCESS 1
22776_ACEOF
22777
22778fi
22779done
22780
22781
22782 fi
22783
22784
22785cat >>confdefs.h <<_ACEOF
22786#define GNULIB_FACCESSAT 1
22787_ACEOF
22788
22789
22790
22791
22792
22793
22794
22795 GNULIB_FACCESSAT=1
22796
22797
22798
22799
22800
22801
22802
22803
22804
22805
0cdca42a
GM
22806 if test $ac_cv_func_fcntl = no; then
22807
22808
22809
22810 if test $ac_cv_func_fcntl = no; then
22811 HAVE_FCNTL=0
22812 else
22813 REPLACE_FCNTL=1
22814 fi
22815
22816 else
22817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
22818$as_echo_n "checking whether fcntl handles F_DUPFD correctly... " >&6; }
22819if test "${gl_cv_func_fcntl_f_dupfd_works+set}" = set; then :
22820 $as_echo_n "(cached) " >&6
22821else
22822 if test "$cross_compiling" = yes; then :
22823 # Guess that it works on glibc systems
22824 case $host_os in #((
22825 *-gnu*) gl_cv_func_fcntl_f_dupfd_works="guessing yes";;
22826 *) gl_cv_func_fcntl_f_dupfd_works="guessing no";;
22827 esac
22828else
22829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22830/* end confdefs.h. */
22831
22832#include <fcntl.h>
22833#include <errno.h>
22834
22835int
22836main ()
22837{
22838int result = 0;
22839 if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
22840 if (errno != EINVAL) result |= 2;
22841 return result;
22842
22843 ;
22844 return 0;
22845}
22846_ACEOF
22847if ac_fn_c_try_run "$LINENO"; then :
22848 gl_cv_func_fcntl_f_dupfd_works=yes
22849else
22850 gl_cv_func_fcntl_f_dupfd_works=no
22851fi
22852rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22853 conftest.$ac_objext conftest.beam conftest.$ac_ext
22854fi
22855
22856fi
22857{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
22858$as_echo "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
22859 case $gl_cv_func_fcntl_f_dupfd_works in
22860 *yes) ;;
22861 *)
22862
22863
22864 if test $ac_cv_func_fcntl = no; then
22865 HAVE_FCNTL=0
22866 else
22867 REPLACE_FCNTL=1
22868 fi
22869
22870
22871$as_echo "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
22872 ;;
22873 esac
22874
22875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
22876$as_echo_n "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
22877if test "${gl_cv_func_fcntl_f_dupfd_cloexec+set}" = set; then :
22878 $as_echo_n "(cached) " >&6
22879else
22880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22881/* end confdefs.h. */
22882
22883#include <fcntl.h>
22884#ifndef F_DUPFD_CLOEXEC
22885choke me
22886#endif
22887
22888int
22889main ()
22890{
22891
22892 ;
22893 return 0;
22894}
22895_ACEOF
22896if ac_fn_c_try_compile "$LINENO"; then :
22897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22898/* end confdefs.h. */
22899
22900#ifdef __linux__
22901/* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
22902 it to support the semantics on older kernels that failed with EINVAL. */
22903choke me
22904#endif
22905
22906int
22907main ()
22908{
22909
22910 ;
22911 return 0;
22912}
22913_ACEOF
22914if ac_fn_c_try_compile "$LINENO"; then :
22915 gl_cv_func_fcntl_f_dupfd_cloexec=yes
22916else
22917 gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
22918fi
22919rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22920else
22921 gl_cv_func_fcntl_f_dupfd_cloexec=no
22922fi
22923rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22924fi
22925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
22926$as_echo "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
22927 if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then
22928
22929
22930
22931 if test $ac_cv_func_fcntl = no; then
22932 HAVE_FCNTL=0
22933 else
22934 REPLACE_FCNTL=1
22935 fi
22936
22937 fi
22938 fi
22939
22940
22941 if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
22942
22943
22944
22945
22946
22947
22948
22949
22950 gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext"
22951
22952 fi
22953
22954
22955
22956
22957
22958 GNULIB_FCNTL=1
22959
22960
22961
22962
22963
22964
22965
22966
22967
22968
710f5812
GM
22969
22970
22971
22972
22973
22974
22975 if test $gl_cv_have_include_next = yes; then
22976 gl_cv_next_fcntl_h='<'fcntl.h'>'
22977 else
22978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
22979$as_echo_n "checking absolute name of <fcntl.h>... " >&6; }
22980if test "${gl_cv_next_fcntl_h+set}" = set; then :
22981 $as_echo_n "(cached) " >&6
22982else
22983
22984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22985/* end confdefs.h. */
22986#include <fcntl.h>
22987
22988_ACEOF
22989 case "$host_os" in
22990 aix*) gl_absname_cpp="$ac_cpp -C" ;;
22991 *) gl_absname_cpp="$ac_cpp" ;;
22992 esac
22993
22994 case "$host_os" in
22995 mingw*)
22996 gl_dirsep_regex='[/\\]'
22997 ;;
22998 *)
22999 gl_dirsep_regex='\/'
23000 ;;
23001 esac
23002 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23003
23004 gl_header_literal_regex=`echo 'fcntl.h' \
23005 | sed -e "$gl_make_literal_regex_sed"`
23006 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23007 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23008 s|^/[^/]|//&|
23009 p
23010 q
23011 }'
23012 gl_cv_next_fcntl_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23013 sed -n "$gl_absolute_header_sed"`'"'
23014
23015
23016fi
23017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
23018$as_echo "$gl_cv_next_fcntl_h" >&6; }
23019 fi
23020 NEXT_FCNTL_H=$gl_cv_next_fcntl_h
23021
23022 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23023 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23024 gl_next_as_first_directive='<'fcntl.h'>'
23025 else
23026 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23027 gl_next_as_first_directive=$gl_cv_next_fcntl_h
23028 fi
23029 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
23030
23031
23032
23033
23034
23035
23036
23037
23038
23039
23040
23041
23042
23043
23044
2407788f
GM
23045 LIB_FDATASYNC=
23046
23047
23048 if test $ac_cv_have_decl_fdatasync = no; then
23049 HAVE_DECL_FDATASYNC=0
23050 for ac_func in fdatasync
23051do :
23052 ac_fn_c_check_func "$LINENO" "fdatasync" "ac_cv_func_fdatasync"
23053if test "x$ac_cv_func_fdatasync" = x""yes; then :
23054 cat >>confdefs.h <<_ACEOF
23055#define HAVE_FDATASYNC 1
23056_ACEOF
23057
23058fi
23059done
23060
23061 if test $ac_cv_func_fdatasync = no; then
23062 HAVE_FDATASYNC=0
23063 fi
23064 else
23065 gl_saved_libs=$LIBS
23066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5
23067$as_echo_n "checking for library containing fdatasync... " >&6; }
23068if test "${ac_cv_search_fdatasync+set}" = set; then :
23069 $as_echo_n "(cached) " >&6
23070else
23071 ac_func_search_save_LIBS=$LIBS
23072cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23073/* end confdefs.h. */
23074
23075/* Override any GCC internal prototype to avoid an error.
23076 Use char because int might match the return type of a GCC
23077 builtin and then its argument prototype would still apply. */
23078#ifdef __cplusplus
23079extern "C"
23080#endif
23081char fdatasync ();
23082int
23083main ()
23084{
23085return fdatasync ();
23086 ;
23087 return 0;
23088}
23089_ACEOF
23090for ac_lib in '' rt posix4; do
23091 if test -z "$ac_lib"; then
23092 ac_res="none required"
23093 else
23094 ac_res=-l$ac_lib
23095 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
23096 fi
23097 if ac_fn_c_try_link "$LINENO"; then :
23098 ac_cv_search_fdatasync=$ac_res
23099fi
23100rm -f core conftest.err conftest.$ac_objext \
23101 conftest$ac_exeext
23102 if test "${ac_cv_search_fdatasync+set}" = set; then :
23103 break
23104fi
23105done
23106if test "${ac_cv_search_fdatasync+set}" = set; then :
23107
23108else
23109 ac_cv_search_fdatasync=no
23110fi
23111rm conftest.$ac_ext
23112LIBS=$ac_func_search_save_LIBS
23113fi
23114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fdatasync" >&5
23115$as_echo "$ac_cv_search_fdatasync" >&6; }
23116ac_res=$ac_cv_search_fdatasync
23117if test "$ac_res" != no; then :
23118 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
23119 test "$ac_cv_search_fdatasync" = "none required" ||
23120 LIB_FDATASYNC=$ac_cv_search_fdatasync
23121fi
23122
23123 LIBS=$gl_saved_libs
23124 fi
23125
23126 if test $HAVE_FDATASYNC = 0; then
23127
23128
23129
23130
23131
23132
23133
23134
23135 gl_LIBOBJS="$gl_LIBOBJS fdatasync.$ac_objext"
23136
23137 fi
23138
23139
23140
23141
23142
23143 GNULIB_FDATASYNC=1
23144
23145
23146
23147
23148
23149
23150
23151
23152
710f5812 23153
d7ad186c
GM
23154 ac_fn_c_check_decl "$LINENO" "fdopendir" "ac_cv_have_decl_fdopendir" "
23155#include <dirent.h>
23156
23157"
23158if test "x$ac_cv_have_decl_fdopendir" = x""yes; then :
23159 ac_have_decl=1
23160else
23161 ac_have_decl=0
23162fi
23163
23164cat >>confdefs.h <<_ACEOF
23165#define HAVE_DECL_FDOPENDIR $ac_have_decl
23166_ACEOF
23167if test $ac_have_decl = 1; then :
23168
23169else
23170 HAVE_DECL_FDOPENDIR=0
23171fi
23172
23173
23174 if test $ac_cv_func_fdopendir = no; then
23175 HAVE_FDOPENDIR=0
23176 else
23177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fdopendir works" >&5
23178$as_echo_n "checking whether fdopendir works... " >&6; }
23179if test "${gl_cv_func_fdopendir_works+set}" = set; then :
23180 $as_echo_n "(cached) " >&6
23181else
23182 if test "$cross_compiling" = yes; then :
23183 case "$host_os" in
23184 # Guess yes on glibc systems.
23185 *-gnu*) gl_cv_func_fdopendir_works="guessing yes" ;;
23186 # If we don't know, assume the worst.
23187 *) gl_cv_func_fdopendir_works="guessing no" ;;
23188 esac
23189
23190else
23191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23192/* end confdefs.h. */
23193
23194#include <dirent.h>
23195#include <fcntl.h>
23196#include <unistd.h>
23197#if !HAVE_DECL_FDOPENDIR
23198extern
23199# ifdef __cplusplus
23200"C"
23201# endif
23202DIR *fdopendir (int);
23203#endif
23204
23205int
23206main ()
23207{
23208int result = 0;
23209 int fd = open ("conftest.c", O_RDONLY);
23210 if (fd < 0) result |= 1;
23211 if (fdopendir (fd)) result |= 2;
23212 if (close (fd)) result |= 4;
23213 return result;
23214 ;
23215 return 0;
23216}
23217_ACEOF
23218if ac_fn_c_try_run "$LINENO"; then :
23219 gl_cv_func_fdopendir_works=yes
23220else
23221 gl_cv_func_fdopendir_works=no
23222fi
23223rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23224 conftest.$ac_objext conftest.beam conftest.$ac_ext
23225fi
23226
23227fi
23228{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopendir_works" >&5
23229$as_echo "$gl_cv_func_fdopendir_works" >&6; }
23230 case "$gl_cv_func_fdopendir_works" in
23231 *yes) ;;
23232 *)
23233 REPLACE_FDOPENDIR=1
23234 ;;
23235 esac
23236 fi
23237
23238 if test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1; then
23239
23240
23241
23242
23243
23244
23245
23246
23247 gl_LIBOBJS="$gl_LIBOBJS fdopendir.$ac_objext"
23248
23249 fi
23250
23251
23252
23253
23254
23255 GNULIB_FDOPENDIR=1
23256
23257
23258
23259
23260
23261
23262
23263cat >>confdefs.h <<_ACEOF
23264#define GNULIB_FDOPENDIR 1
23265_ACEOF
23266
23267
23268
23269
23270
23271
23272
710f5812 23273
7a67e06b
GM
23274 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpending" >&5
23275$as_echo_n "checking for __fpending... " >&6; }
23276if test "${gl_cv_func___fpending+set}" = set; then :
23277 $as_echo_n "(cached) " >&6
3bf26e96 23278else
3bf26e96 23279
7a67e06b
GM
23280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23281/* end confdefs.h. */
23282#include <stdio.h>
23283 #if HAVE_STDIO_EXT_H
23284 # include <stdio_ext.h>
23285 #endif
23286
23287int
23288main ()
23289{
23290return ! __fpending (stdin);
23291 ;
23292 return 0;
23293}
3bf26e96 23294_ACEOF
7a67e06b
GM
23295if ac_fn_c_try_link "$LINENO"; then :
23296 gl_cv_func___fpending=yes
23297else
23298 gl_cv_func___fpending=no
23299fi
23300rm -f core conftest.err conftest.$ac_objext \
23301 conftest$ac_exeext conftest.$ac_ext
3bf26e96 23302
7a67e06b
GM
23303fi
23304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func___fpending" >&5
23305$as_echo "$gl_cv_func___fpending" >&6; }
3bf26e96 23306
7a67e06b 23307 if test $gl_cv_func___fpending = no; then
3bf26e96
GM
23308
23309
23310
23311
23312
23313
23314
23315
23316 gl_LIBOBJS="$gl_LIBOBJS fpending.$ac_objext"
23317
23318
23319 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to determine the number of pending output bytes on a stream" >&5
23320$as_echo_n "checking how to determine the number of pending output bytes on a stream... " >&6; }
23321if test "${ac_cv_sys_pending_output_n_bytes+set}" = set; then :
23322 $as_echo_n "(cached) " >&6
23323else
23324
23325 for ac_expr in \
23326 \
23327 '# glibc2' \
23328 'fp->_IO_write_ptr - fp->_IO_write_base' \
23329 \
23330 '# traditional Unix' \
23331 'fp->_ptr - fp->_base' \
23332 \
23333 '# BSD' \
23334 'fp->_p - fp->_bf._base' \
23335 \
23336 '# SCO, Unixware' \
23337 '(fp->__ptr ? fp->__ptr - fp->__base : 0)' \
23338 \
23339 '# QNX' \
23340 '(fp->_Mode & 0x2000 /*_MWRITE*/ ? fp->_Next - fp->_Buf : 0)' \
23341 \
23342 '# old glibc?' \
23343 'fp->__bufp - fp->__buffer' \
23344 \
23345 '# old glibc iostream?' \
23346 'fp->_pptr - fp->_pbase' \
23347 \
23348 '# emx+gcc' \
23349 'fp->_ptr - fp->_buffer' \
23350 \
23351 '# Minix' \
23352 'fp->_ptr - fp->_buf' \
23353 \
23354 '# Plan9' \
23355 'fp->wp - fp->buf' \
23356 \
23357 '# VMS' \
23358 '(*fp)->_ptr - (*fp)->_base' \
23359 \
23360 '# e.g., DGUX R4.11; the info is not available' \
23361 1 \
23362 ; do
23363
23364 # Skip each embedded comment.
23365 case "$ac_expr" in '#'*) continue;; esac
23366
23367 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23368/* end confdefs.h. */
23369#include <stdio.h>
23370int
23371main ()
23372{
23373FILE *fp = stdin; (void) ($ac_expr);
23374 ;
23375 return 0;
23376}
23377_ACEOF
23378if ac_fn_c_try_compile "$LINENO"; then :
23379 fp_done=yes
23380
23381fi
23382rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23383 test "$fp_done" = yes && break
23384 done
23385
23386 ac_cv_sys_pending_output_n_bytes=$ac_expr
23387
23388
23389fi
23390{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_pending_output_n_bytes" >&5
23391$as_echo "$ac_cv_sys_pending_output_n_bytes" >&6; }
23392
23393cat >>confdefs.h <<_ACEOF
23394#define PENDING_OUTPUT_N_BYTES $ac_cv_sys_pending_output_n_bytes
23395_ACEOF
23396
23397
23398 fi
23399
23400
d7ad186c
GM
23401
23402
23403
23404
23405 if test $ac_cv_func_fstatat = no; then
23406 HAVE_FSTATAT=0
23407 else
23408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fstatat (..., 0) works" >&5
23409$as_echo_n "checking whether fstatat (..., 0) works... " >&6; }
23410if test "${gl_cv_func_fstatat_zero_flag+set}" = set; then :
23411 $as_echo_n "(cached) " >&6
23412else
23413 if test "$cross_compiling" = yes; then :
23414 case "$host_os" in
23415 aix*) gl_cv_func_fstatat_zero_flag="guessing no";;
23416 *) gl_cv_func_fstatat_zero_flag="guessing yes";;
23417 esac
23418
23419else
23420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23421/* end confdefs.h. */
23422
23423 #include <fcntl.h>
23424 #include <sys/stat.h>
23425 int
23426 main (void)
23427 {
23428 struct stat a;
23429 return fstatat (AT_FDCWD, ".", &a, 0) != 0;
23430 }
23431
23432_ACEOF
23433if ac_fn_c_try_run "$LINENO"; then :
23434 gl_cv_func_fstatat_zero_flag=yes
23435else
23436 gl_cv_func_fstatat_zero_flag=no
23437fi
23438rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23439 conftest.$ac_objext conftest.beam conftest.$ac_ext
23440fi
23441
23442
23443fi
23444{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fstatat_zero_flag" >&5
23445$as_echo "$gl_cv_func_fstatat_zero_flag" >&6; }
23446
23447 case $gl_cv_func_fstatat_zero_flag+$gl_cv_func_lstat_dereferences_slashed_symlink in
23448 *yes+*yes) ;;
23449 *) REPLACE_FSTATAT=1
23450 case $gl_cv_func_fstatat_zero_flag in
23451 *yes)
23452
23453$as_echo "#define HAVE_WORKING_FSTATAT_ZERO_FLAG 1" >>confdefs.h
23454
23455 ;;
23456 esac
23457 ;;
23458 esac
23459 fi
23460
23461 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
23462
23463
23464
23465
23466
23467
23468
23469
23470 gl_LIBOBJS="$gl_LIBOBJS fstatat.$ac_objext"
23471
23472 fi
23473
23474
23475
23476
23477
23478 GNULIB_FSTATAT=1
23479
23480
23481
23482
23483
23484
23485
2407788f
GM
23486
23487 if test $ac_cv_func_fsync = no; then
23488 HAVE_FSYNC=0
23489 fi
23490
23491 if test $HAVE_FSYNC = 0; then
23492
23493
23494
23495
23496
23497
23498
23499
23500 gl_LIBOBJS="$gl_LIBOBJS fsync.$ac_objext"
23501
23502 :
23503 fi
23504
23505
23506
23507
23508
23509 GNULIB_FSYNC=1
23510
23511
23512
23513
23514
23515
23516
5476a9a4
GM
23517# Persuade glibc <stdlib.h> to declare getloadavg().
23518
23519
23520gl_save_LIBS=$LIBS
23521
23522# getloadvg is present in libc on glibc >= 2.2, Mac OS X, FreeBSD >= 2.0,
23523# NetBSD >= 0.9, OpenBSD >= 2.0, Solaris >= 7.
23524HAVE_GETLOADAVG=1
23525ac_fn_c_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg"
23526if test "x$ac_cv_func_getloadavg" = x""yes; then :
23527
23528else
23529 gl_func_getloadavg_done=no
23530
23531 # Some systems with -lutil have (and need) -lkvm as well, some do not.
23532 # On Solaris, -lkvm requires nlist from -lelf, so check that first
23533 # to get the right answer into the cache.
23534 # For kstat on solaris, we need to test for libelf and libkvm to force the
23535 # definition of SVR4 below.
23536 if test $gl_func_getloadavg_done = no; then
23537 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_begin in -lelf" >&5
23538$as_echo_n "checking for elf_begin in -lelf... " >&6; }
23539if test "${ac_cv_lib_elf_elf_begin+set}" = set; then :
6ad6792b
GM
23540 $as_echo_n "(cached) " >&6
23541else
3e0be4ab 23542 ac_check_lib_save_LIBS=$LIBS
5476a9a4 23543LIBS="-lelf $LIBS"
3e0be4ab 23544cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6ad6792b 23545/* end confdefs.h. */
6ad6792b 23546
3e0be4ab
GM
23547/* Override any GCC internal prototype to avoid an error.
23548 Use char because int might match the return type of a GCC
23549 builtin and then its argument prototype would still apply. */
23550#ifdef __cplusplus
23551extern "C"
23552#endif
5476a9a4 23553char elf_begin ();
6ad6792b
GM
23554int
23555main ()
23556{
5476a9a4 23557return elf_begin ();
6ad6792b
GM
23558 ;
23559 return 0;
23560}
23561_ACEOF
3e0be4ab 23562if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 23563 ac_cv_lib_elf_elf_begin=yes
3e0be4ab 23564else
5476a9a4 23565 ac_cv_lib_elf_elf_begin=no
6ad6792b 23566fi
3e0be4ab
GM
23567rm -f core conftest.err conftest.$ac_objext \
23568 conftest$ac_exeext conftest.$ac_ext
23569LIBS=$ac_check_lib_save_LIBS
6ad6792b 23570fi
5476a9a4
GM
23571{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_elf_elf_begin" >&5
23572$as_echo "$ac_cv_lib_elf_elf_begin" >&6; }
23573if test "x$ac_cv_lib_elf_elf_begin" = x""yes; then :
23574 LIBS="-lelf $LIBS"
6ad6792b
GM
23575fi
23576
5476a9a4
GM
23577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kvm_open in -lkvm" >&5
23578$as_echo_n "checking for kvm_open in -lkvm... " >&6; }
23579if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then :
6c051bab
GM
23580 $as_echo_n "(cached) " >&6
23581else
5476a9a4
GM
23582 ac_check_lib_save_LIBS=$LIBS
23583LIBS="-lkvm $LIBS"
23584cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c051bab 23585/* end confdefs.h. */
3e0be4ab 23586
5476a9a4
GM
23587/* Override any GCC internal prototype to avoid an error.
23588 Use char because int might match the return type of a GCC
23589 builtin and then its argument prototype would still apply. */
23590#ifdef __cplusplus
23591extern "C"
23592#endif
23593char kvm_open ();
6c051bab
GM
23594int
23595main ()
23596{
5476a9a4 23597return kvm_open ();
6c051bab
GM
23598 ;
23599 return 0;
23600}
23601_ACEOF
3e0be4ab 23602if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 23603 ac_cv_lib_kvm_kvm_open=yes
6c051bab 23604else
5476a9a4 23605 ac_cv_lib_kvm_kvm_open=no
6c051bab 23606fi
3e0be4ab
GM
23607rm -f core conftest.err conftest.$ac_objext \
23608 conftest$ac_exeext conftest.$ac_ext
5476a9a4 23609LIBS=$ac_check_lib_save_LIBS
6c051bab 23610fi
5476a9a4
GM
23611{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kvm_kvm_open" >&5
23612$as_echo "$ac_cv_lib_kvm_kvm_open" >&6; }
23613if test "x$ac_cv_lib_kvm_kvm_open" = x""yes; then :
23614 LIBS="-lkvm $LIBS"
3e0be4ab 23615fi
6c051bab 23616
5476a9a4
GM
23617 # Check for the 4.4BSD definition of getloadavg.
23618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lutil" >&5
23619$as_echo_n "checking for getloadavg in -lutil... " >&6; }
23620if test "${ac_cv_lib_util_getloadavg+set}" = set; then :
ae0d7250
PE
23621 $as_echo_n "(cached) " >&6
23622else
5476a9a4
GM
23623 ac_check_lib_save_LIBS=$LIBS
23624LIBS="-lutil $LIBS"
23625cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6d153f56 23626/* end confdefs.h. */
5476a9a4
GM
23627
23628/* Override any GCC internal prototype to avoid an error.
23629 Use char because int might match the return type of a GCC
23630 builtin and then its argument prototype would still apply. */
23631#ifdef __cplusplus
23632extern "C"
23633#endif
23634char getloadavg ();
ae0d7250
PE
23635int
23636main ()
23637{
5476a9a4 23638return getloadavg ();
ae0d7250
PE
23639 ;
23640 return 0;
23641}
23642_ACEOF
3e0be4ab 23643if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 23644 ac_cv_lib_util_getloadavg=yes
ae0d7250 23645else
5476a9a4 23646 ac_cv_lib_util_getloadavg=no
ae0d7250 23647fi
3e0be4ab
GM
23648rm -f core conftest.err conftest.$ac_objext \
23649 conftest$ac_exeext conftest.$ac_ext
5476a9a4
GM
23650LIBS=$ac_check_lib_save_LIBS
23651fi
23652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_getloadavg" >&5
23653$as_echo "$ac_cv_lib_util_getloadavg" >&6; }
23654if test "x$ac_cv_lib_util_getloadavg" = x""yes; then :
23655 LIBS="-lutil $LIBS" gl_func_getloadavg_done=yes
3e0be4ab 23656fi
6d153f56 23657
5476a9a4 23658 fi
6d153f56 23659
5476a9a4
GM
23660 if test $gl_func_getloadavg_done = no; then
23661 # There is a commonly available library for RS/6000 AIX.
23662 # Since it is not a standard part of AIX, it might be installed locally.
23663 gl_getloadavg_LIBS=$LIBS
23664 LIBS="-L/usr/local/lib $LIBS"
23665 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lgetloadavg" >&5
23666$as_echo_n "checking for getloadavg in -lgetloadavg... " >&6; }
23667if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then :
f199cab1 23668 $as_echo_n "(cached) " >&6
3e0be4ab 23669else
f199cab1 23670 ac_check_lib_save_LIBS=$LIBS
5476a9a4 23671LIBS="-lgetloadavg $LIBS"
f199cab1
GM
23672cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23673/* end confdefs.h. */
3e0be4ab 23674
f199cab1
GM
23675/* Override any GCC internal prototype to avoid an error.
23676 Use char because int might match the return type of a GCC
23677 builtin and then its argument prototype would still apply. */
23678#ifdef __cplusplus
23679extern "C"
23680#endif
5476a9a4 23681char getloadavg ();
f199cab1
GM
23682int
23683main ()
23684{
5476a9a4 23685return getloadavg ();
f199cab1
GM
23686 ;
23687 return 0;
23688}
ae0d7250 23689_ACEOF
f199cab1 23690if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 23691 ac_cv_lib_getloadavg_getloadavg=yes
f199cab1 23692else
5476a9a4 23693 ac_cv_lib_getloadavg_getloadavg=no
ae0d7250 23694fi
f199cab1
GM
23695rm -f core conftest.err conftest.$ac_objext \
23696 conftest$ac_exeext conftest.$ac_ext
23697LIBS=$ac_check_lib_save_LIBS
3e0be4ab 23698fi
5476a9a4
GM
23699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_getloadavg_getloadavg" >&5
23700$as_echo "$ac_cv_lib_getloadavg_getloadavg" >&6; }
23701if test "x$ac_cv_lib_getloadavg_getloadavg" = x""yes; then :
23702 LIBS="-lgetloadavg $LIBS" gl_func_getloadavg_done=yes
23703else
23704 LIBS=$gl_getloadavg_LIBS
6d153f56 23705fi
ae0d7250 23706
5476a9a4 23707 fi
16c3e636 23708
5476a9a4
GM
23709 # Set up the replacement function if necessary.
23710 if test $gl_func_getloadavg_done = no; then
23711 HAVE_GETLOADAVG=0
16c3e636 23712
5476a9a4
GM
23713 # Solaris has libkstat which does not require root.
23714 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kstat_open in -lkstat" >&5
23715$as_echo_n "checking for kstat_open in -lkstat... " >&6; }
23716if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then :
f199cab1
GM
23717 $as_echo_n "(cached) " >&6
23718else
23719 ac_check_lib_save_LIBS=$LIBS
5476a9a4 23720LIBS="-lkstat $LIBS"
f199cab1
GM
23721cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23722/* end confdefs.h. */
5f90be1b 23723
f199cab1
GM
23724/* Override any GCC internal prototype to avoid an error.
23725 Use char because int might match the return type of a GCC
23726 builtin and then its argument prototype would still apply. */
23727#ifdef __cplusplus
23728extern "C"
23729#endif
5476a9a4 23730char kstat_open ();
f199cab1
GM
23731int
23732main ()
23733{
5476a9a4 23734return kstat_open ();
f199cab1
GM
23735 ;
23736 return 0;
23737}
3e0be4ab 23738_ACEOF
f199cab1 23739if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 23740 ac_cv_lib_kstat_kstat_open=yes
f199cab1 23741else
5476a9a4 23742 ac_cv_lib_kstat_kstat_open=no
5f90be1b 23743fi
f199cab1
GM
23744rm -f core conftest.err conftest.$ac_objext \
23745 conftest$ac_exeext conftest.$ac_ext
23746LIBS=$ac_check_lib_save_LIBS
3e0be4ab 23747fi
5476a9a4
GM
23748{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kstat_kstat_open" >&5
23749$as_echo "$ac_cv_lib_kstat_kstat_open" >&6; }
23750if test "x$ac_cv_lib_kstat_kstat_open" = x""yes; then :
3e0be4ab 23751 cat >>confdefs.h <<_ACEOF
5476a9a4 23752#define HAVE_LIBKSTAT 1
3e0be4ab 23753_ACEOF
5f90be1b 23754
5476a9a4 23755 LIBS="-lkstat $LIBS"
5f90be1b 23756
f199cab1 23757fi
5f90be1b 23758
5476a9a4 23759 test $ac_cv_lib_kstat_kstat_open = yes && gl_func_getloadavg_done=yes
da6c8463 23760
5476a9a4
GM
23761 # AIX has libperfstat which does not require root
23762 if test $gl_func_getloadavg_done = no; then
23763 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for perfstat_cpu_total in -lperfstat" >&5
23764$as_echo_n "checking for perfstat_cpu_total in -lperfstat... " >&6; }
23765if test "${ac_cv_lib_perfstat_perfstat_cpu_total+set}" = set; then :
f199cab1
GM
23766 $as_echo_n "(cached) " >&6
23767else
5476a9a4
GM
23768 ac_check_lib_save_LIBS=$LIBS
23769LIBS="-lperfstat $LIBS"
23770cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5f90be1b 23771/* end confdefs.h. */
5476a9a4
GM
23772
23773/* Override any GCC internal prototype to avoid an error.
23774 Use char because int might match the return type of a GCC
23775 builtin and then its argument prototype would still apply. */
23776#ifdef __cplusplus
23777extern "C"
23778#endif
23779char perfstat_cpu_total ();
5f90be1b
PE
23780int
23781main ()
23782{
5476a9a4 23783return perfstat_cpu_total ();
5f90be1b
PE
23784 ;
23785 return 0;
23786}
23787_ACEOF
5476a9a4
GM
23788if ac_fn_c_try_link "$LINENO"; then :
23789 ac_cv_lib_perfstat_perfstat_cpu_total=yes
f199cab1 23790else
5476a9a4 23791 ac_cv_lib_perfstat_perfstat_cpu_total=no
f199cab1 23792fi
5476a9a4
GM
23793rm -f core conftest.err conftest.$ac_objext \
23794 conftest$ac_exeext conftest.$ac_ext
23795LIBS=$ac_check_lib_save_LIBS
f199cab1 23796fi
5476a9a4
GM
23797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_perfstat_perfstat_cpu_total" >&5
23798$as_echo "$ac_cv_lib_perfstat_perfstat_cpu_total" >&6; }
23799if test "x$ac_cv_lib_perfstat_perfstat_cpu_total" = x""yes; then :
23800 cat >>confdefs.h <<_ACEOF
23801#define HAVE_LIBPERFSTAT 1
23802_ACEOF
23803
23804 LIBS="-lperfstat $LIBS"
23805
23806fi
23807
23808 test $ac_cv_lib_perfstat_perfstat_cpu_total = yes && gl_func_getloadavg_done=yes
23809 fi
23810
23811 if test $gl_func_getloadavg_done = no; then
23812 ac_fn_c_check_header_mongrel "$LINENO" "sys/dg_sys_info.h" "ac_cv_header_sys_dg_sys_info_h" "$ac_includes_default"
23813if test "x$ac_cv_header_sys_dg_sys_info_h" = x""yes; then :
23814 gl_func_getloadavg_done=yes
23815
23816$as_echo "#define DGUX 1" >>confdefs.h
23817
23818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dg_sys_info in -ldgc" >&5
23819$as_echo_n "checking for dg_sys_info in -ldgc... " >&6; }
23820if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then :
f199cab1
GM
23821 $as_echo_n "(cached) " >&6
23822else
23823 ac_check_lib_save_LIBS=$LIBS
5476a9a4 23824LIBS="-ldgc $LIBS"
f199cab1
GM
23825cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23826/* end confdefs.h. */
3e0be4ab 23827
f199cab1
GM
23828/* Override any GCC internal prototype to avoid an error.
23829 Use char because int might match the return type of a GCC
23830 builtin and then its argument prototype would still apply. */
23831#ifdef __cplusplus
23832extern "C"
23833#endif
5476a9a4 23834char dg_sys_info ();
f199cab1
GM
23835int
23836main ()
23837{
5476a9a4 23838return dg_sys_info ();
f199cab1
GM
23839 ;
23840 return 0;
23841}
23842_ACEOF
23843if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 23844 ac_cv_lib_dgc_dg_sys_info=yes
f199cab1 23845else
5476a9a4 23846 ac_cv_lib_dgc_dg_sys_info=no
5f90be1b 23847fi
3e0be4ab
GM
23848rm -f core conftest.err conftest.$ac_objext \
23849 conftest$ac_exeext conftest.$ac_ext
f199cab1 23850LIBS=$ac_check_lib_save_LIBS
5f90be1b 23851fi
5476a9a4
GM
23852{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dgc_dg_sys_info" >&5
23853$as_echo "$ac_cv_lib_dgc_dg_sys_info" >&6; }
23854if test "x$ac_cv_lib_dgc_dg_sys_info" = x""yes; then :
23855 cat >>confdefs.h <<_ACEOF
23856#define HAVE_LIBDGC 1
23857_ACEOF
23858
23859 LIBS="-ldgc $LIBS"
23860
da6c8463
GM
23861fi
23862
5476a9a4
GM
23863fi
23864
23865
23866 fi
23867 fi
23868fi
23869
23870
23871if test "x$gl_save_LIBS" = x; then
23872 GETLOADAVG_LIBS=$LIBS
f199cab1 23873else
5476a9a4
GM
23874 GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$gl_save_LIBS!!"`
23875fi
23876LIBS=$gl_save_LIBS
23877
23878
23879# Test whether the system declares getloadavg. Solaris has the function
23880# but declares it in <sys/loadavg.h>, not <stdlib.h>.
23881for ac_header in sys/loadavg.h
23882do :
23883 ac_fn_c_check_header_mongrel "$LINENO" "sys/loadavg.h" "ac_cv_header_sys_loadavg_h" "$ac_includes_default"
23884if test "x$ac_cv_header_sys_loadavg_h" = x""yes; then :
23885 cat >>confdefs.h <<_ACEOF
23886#define HAVE_SYS_LOADAVG_H 1
f199cab1 23887_ACEOF
5476a9a4 23888
f199cab1 23889fi
5476a9a4
GM
23890
23891done
23892
23893if test $ac_cv_header_sys_loadavg_h = yes; then
23894 HAVE_SYS_LOADAVG_H=1
23895else
23896 HAVE_SYS_LOADAVG_H=0
f199cab1 23897fi
5476a9a4
GM
23898ac_fn_c_check_decl "$LINENO" "getloadavg" "ac_cv_have_decl_getloadavg" "#if HAVE_SYS_LOADAVG_H
23899 # include <sys/loadavg.h>
23900 #endif
23901 #include <stdlib.h>
23902"
23903if test "x$ac_cv_have_decl_getloadavg" = x""yes; then :
5f90be1b 23904
f199cab1 23905else
5476a9a4 23906 HAVE_DECL_GETLOADAVG=0
f199cab1 23907fi
5f90be1b 23908
5f90be1b 23909
a6342fc8 23910 if test $HAVE_GETLOADAVG = 0; then
5476a9a4
GM
23911
23912
23913
23914
23915
23916
23917
23918
23919 gl_LIBOBJS="$gl_LIBOBJS getloadavg.$ac_objext"
23920
23921
23922# Figure out what our getloadavg.c needs.
23923
23924
23925
23926# On HPUX9, an unprivileged user can get load averages this way.
23927if test $gl_func_getloadavg_done = no; then
23928 for ac_func in pstat_getdynamic
23929do :
23930 ac_fn_c_check_func "$LINENO" "pstat_getdynamic" "ac_cv_func_pstat_getdynamic"
23931if test "x$ac_cv_func_pstat_getdynamic" = x""yes; then :
23932 cat >>confdefs.h <<_ACEOF
23933#define HAVE_PSTAT_GETDYNAMIC 1
23934_ACEOF
23935 gl_func_getloadavg_done=yes
3e0be4ab 23936fi
5476a9a4 23937done
6ad6792b 23938
5476a9a4 23939fi
6ad6792b 23940
5476a9a4
GM
23941# We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
23942# uses stabs), but it is still SVR4. We cannot check for <elf.h> because
23943# Irix 4.0.5F has the header but not the library.
23944if test $gl_func_getloadavg_done = no && test "$ac_cv_lib_elf_elf_begin" = yes \
23945 && test "$ac_cv_lib_kvm_kvm_open" = yes; then
23946 gl_func_getloadavg_done=yes
6ad6792b 23947
5476a9a4 23948$as_echo "#define SVR4 1" >>confdefs.h
6ad6792b 23949
5476a9a4
GM
23950fi
23951
23952if test $gl_func_getloadavg_done = no; then
23953 ac_fn_c_check_header_mongrel "$LINENO" "inq_stats/cpustats.h" "ac_cv_header_inq_stats_cpustats_h" "$ac_includes_default"
23954if test "x$ac_cv_header_inq_stats_cpustats_h" = x""yes; then :
23955 gl_func_getloadavg_done=yes
23956
23957$as_echo "#define UMAX 1" >>confdefs.h
23958
23959
23960$as_echo "#define UMAX4_3 1" >>confdefs.h
23961
23962fi
23963
23964
23965fi
23966
23967if test $gl_func_getloadavg_done = no; then
23968 ac_fn_c_check_header_mongrel "$LINENO" "sys/cpustats.h" "ac_cv_header_sys_cpustats_h" "$ac_includes_default"
23969if test "x$ac_cv_header_sys_cpustats_h" = x""yes; then :
23970 gl_func_getloadavg_done=yes; $as_echo "#define UMAX 1" >>confdefs.h
23971
23972fi
23973
23974
23975fi
23976
23977if test $gl_func_getloadavg_done = no; then
23978 for ac_header in mach/mach.h
23979do :
23980 ac_fn_c_check_header_mongrel "$LINENO" "mach/mach.h" "ac_cv_header_mach_mach_h" "$ac_includes_default"
23981if test "x$ac_cv_header_mach_mach_h" = x""yes; then :
23982 cat >>confdefs.h <<_ACEOF
23983#define HAVE_MACH_MACH_H 1
23984_ACEOF
23985
23986fi
23987
23988done
23989
23990fi
23991
23992for ac_header in nlist.h
23993do :
23994 ac_fn_c_check_header_mongrel "$LINENO" "nlist.h" "ac_cv_header_nlist_h" "$ac_includes_default"
23995if test "x$ac_cv_header_nlist_h" = x""yes; then :
23996 cat >>confdefs.h <<_ACEOF
23997#define HAVE_NLIST_H 1
23998_ACEOF
23999 ac_fn_c_check_member "$LINENO" "struct nlist" "n_un.n_name" "ac_cv_member_struct_nlist_n_un_n_name" "#include <nlist.h>
24000"
24001if test "x$ac_cv_member_struct_nlist_n_un_n_name" = x""yes; then :
24002
24003cat >>confdefs.h <<_ACEOF
24004#define HAVE_STRUCT_NLIST_N_UN_N_NAME 1
24005_ACEOF
6ad6792b 24006
0eb775a3 24007
f199cab1 24008fi
3e0be4ab 24009
5476a9a4 24010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 24011/* end confdefs.h. */
5476a9a4 24012#include <nlist.h>
f199cab1
GM
24013int
24014main ()
24015{
5476a9a4
GM
24016struct nlist x;
24017 #ifdef HAVE_STRUCT_NLIST_N_UN_N_NAME
24018 x.n_un.n_name = "";
24019 #else
24020 x.n_name = "";
24021 #endif
f199cab1
GM
24022 ;
24023 return 0;
24024}
24025_ACEOF
5476a9a4 24026if ac_fn_c_try_link "$LINENO"; then :
6ad6792b 24027
5476a9a4 24028$as_echo "#define N_NAME_POINTER 1" >>confdefs.h
6ad6792b
GM
24029
24030fi
5476a9a4
GM
24031rm -f core conftest.err conftest.$ac_objext \
24032 conftest$ac_exeext conftest.$ac_ext
6ad6792b 24033
5476a9a4 24034fi
6ad6792b 24035
5476a9a4 24036done
6ad6792b 24037
a6342fc8 24038 fi
ca36e0ff 24039
ca36e0ff
GM
24040
24041
1f5d53eb
PE
24042
24043
5476a9a4 24044 GNULIB_GETLOADAVG=1
1f5d53eb
PE
24045
24046
24047
24048
24049
24050
24051
1f5d53eb 24052
1f5d53eb 24053
3e0be4ab 24054
a6342fc8 24055 if test $REPLACE_GETOPT = 1; then
3e0be4ab 24056
1f5d53eb
PE
24057
24058
1f5d53eb 24059
1f5d53eb
PE
24060
24061
24062
24063
5476a9a4 24064 gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
0eb775a3
GM
24065
24066
1f5d53eb
PE
24067
24068
16c3e636 24069
5476a9a4
GM
24070
24071
24072
24073
24074 gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
24075
24076
24077
24078
a6342fc8
GM
24079 GNULIB_GL_UNISTD_H_GETOPT=1
24080 fi
16c3e636
PE
24081
24082
24083
4fda9c95
GM
24084
24085
24086
24087
5476a9a4
GM
24088 REPLACE_GETOPT=0
24089 if test -n "$gl_replace_getopt"; then
24090 REPLACE_GETOPT=1
24091 fi
24092
24093 if test $REPLACE_GETOPT = 1; then
24094
24095 GETOPT_H=getopt.h
24096
24097$as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
24098
24099
24100
24101 fi
24102
a6342fc8 24103 if test $REPLACE_GETOPT = 1; then
5476a9a4
GM
24104
24105
24106
24107
24108
24109
24110
24111
24112 gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
24113
24114
24115
24116
24117
24118
24119
24120
24121
24122 gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
4fda9c95
GM
24123
24124
24125
24126
a6342fc8
GM
24127 GNULIB_GL_UNISTD_H_GETOPT=1
24128 fi
4fda9c95
GM
24129
24130
24131
24132
4fda9c95 24133
4fda9c95 24134
4fda9c95 24135
5476a9a4
GM
24136
24137
24138
24139
24140
24141 gl_gettimeofday_timezone=void
24142 if test $ac_cv_func_gettimeofday != yes; then
24143 HAVE_GETTIMEOFDAY=0
f199cab1 24144 else
4fda9c95
GM
24145
24146
3e0be4ab 24147
5476a9a4
GM
24148 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5
24149$as_echo_n "checking whether gettimeofday clobbers localtime buffer... " >&6; }
24150if test "${gl_cv_func_gettimeofday_clobber+set}" = set; then :
24151 $as_echo_n "(cached) " >&6
24152else
24153 if test "$cross_compiling" = yes; then :
24154 # When cross-compiling:
24155 case "$host_os" in
24156 # Guess all is fine on glibc systems.
24157 *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
24158 # If we don't know, assume the worst.
24159 *) gl_cv_func_gettimeofday_clobber="guessing yes" ;;
24160 esac
4fda9c95 24161
5476a9a4
GM
24162else
24163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24164/* end confdefs.h. */
24165#include <string.h>
24166 #include <sys/time.h>
24167 #include <time.h>
24168 #include <stdlib.h>
4fda9c95 24169
5476a9a4
GM
24170int
24171main ()
24172{
4fda9c95 24173
5476a9a4
GM
24174 time_t t = 0;
24175 struct tm *lt;
24176 struct tm saved_lt;
24177 struct timeval tv;
24178 lt = localtime (&t);
24179 saved_lt = *lt;
24180 gettimeofday (&tv, NULL);
24181 return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
cc322c06 24182
5476a9a4
GM
24183 ;
24184 return 0;
24185}
24186_ACEOF
24187if ac_fn_c_try_run "$LINENO"; then :
24188 gl_cv_func_gettimeofday_clobber=no
24189else
24190 gl_cv_func_gettimeofday_clobber=yes
24191fi
24192rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24193 conftest.$ac_objext conftest.beam conftest.$ac_ext
24194fi
cc322c06 24195
5476a9a4
GM
24196fi
24197{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5
24198$as_echo "$gl_cv_func_gettimeofday_clobber" >&6; }
cc322c06 24199
5476a9a4
GM
24200 case "$gl_cv_func_gettimeofday_clobber" in
24201 *yes)
24202 REPLACE_GETTIMEOFDAY=1
cc322c06 24203
4fda9c95 24204
5476a9a4 24205$as_echo "#define gmtime rpl_gmtime" >>confdefs.h
4fda9c95 24206
ae0d7250 24207
5476a9a4 24208$as_echo "#define localtime rpl_localtime" >>confdefs.h
ae0d7250
PE
24209
24210
ae0d7250 24211
5476a9a4
GM
24212$as_echo "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h
24213
24214 ;;
24215 esac
24216
24217 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
24218$as_echo_n "checking for gettimeofday with POSIX signature... " >&6; }
24219if test "${gl_cv_func_gettimeofday_posix_signature+set}" = set; then :
f199cab1
GM
24220 $as_echo_n "(cached) " >&6
24221else
5476a9a4
GM
24222 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24223/* end confdefs.h. */
24224#include <sys/time.h>
24225 struct timeval c;
24226 int gettimeofday (struct timeval *restrict, void *restrict);
24227
24228int
24229main ()
24230{
24231/* glibc uses struct timezone * rather than the POSIX void *
24232 if _GNU_SOURCE is defined. However, since the only portable
24233 use of gettimeofday uses NULL as the second parameter, and
24234 since the glibc definition is actually more typesafe, it is
24235 not worth wrapping this to get a compliant signature. */
24236 int (*f) (struct timeval *restrict, void *restrict)
24237 = gettimeofday;
24238 int x = f (&c, 0);
24239 return !(x | c.tv_sec | c.tv_usec);
24240
24241 ;
24242 return 0;
24243}
24244_ACEOF
24245if ac_fn_c_try_compile "$LINENO"; then :
24246 gl_cv_func_gettimeofday_posix_signature=yes
24247else
24248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 24249/* end confdefs.h. */
5476a9a4
GM
24250#include <sys/time.h>
24251int gettimeofday (struct timeval *restrict, struct timezone *restrict);
ae0d7250 24252
f199cab1
GM
24253int
24254main ()
24255{
5476a9a4 24256
f199cab1
GM
24257 ;
24258 return 0;
ae0d7250
PE
24259}
24260_ACEOF
5476a9a4
GM
24261if ac_fn_c_try_compile "$LINENO"; then :
24262 gl_cv_func_gettimeofday_posix_signature=almost
ae0d7250 24263else
5476a9a4 24264 gl_cv_func_gettimeofday_posix_signature=no
ae0d7250 24265fi
5476a9a4 24266rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ae0d7250 24267fi
5476a9a4 24268rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52724a05 24269fi
5476a9a4
GM
24270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
24271$as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; }
24272 if test $gl_cv_func_gettimeofday_posix_signature = almost; then
24273 gl_gettimeofday_timezone='struct timezone'
24274 elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
24275 REPLACE_GETTIMEOFDAY=1
24276 fi
24277 if test $REPLACE_STRUCT_TIMEVAL = 1; then
24278 REPLACE_GETTIMEOFDAY=1
24279 fi
3e0be4ab 24280
5476a9a4 24281 fi
ae0d7250 24282
5476a9a4
GM
24283cat >>confdefs.h <<_ACEOF
24284#define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone
24285_ACEOF
f199cab1 24286
ae0d7250 24287
a6342fc8 24288 if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
ae0d7250 24289
cc322c06
GM
24290
24291
cc322c06
GM
24292
24293
ae0d7250
PE
24294
24295
24296
5476a9a4 24297 gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
5fa4ac76
PE
24298
24299
5476a9a4
GM
24300 for ac_header in sys/timeb.h
24301do :
24302 ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
24303if test "x$ac_cv_header_sys_timeb_h" = x""yes; then :
24304 cat >>confdefs.h <<_ACEOF
24305#define HAVE_SYS_TIMEB_H 1
24306_ACEOF
5fa4ac76 24307
3e0be4ab 24308fi
5fa4ac76 24309
5476a9a4 24310done
f199cab1 24311
5476a9a4
GM
24312 for ac_func in _ftime
24313do :
24314 ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
24315if test "x$ac_cv_func__ftime" = x""yes; then :
24316 cat >>confdefs.h <<_ACEOF
24317#define HAVE__FTIME 1
24318_ACEOF
5fa4ac76 24319
5476a9a4
GM
24320fi
24321done
5fa4ac76
PE
24322
24323
a6342fc8 24324 fi
5fa4ac76
PE
24325
24326
24327
24328
24329
5476a9a4 24330 GNULIB_GETTIMEOFDAY=1
5fa4ac76
PE
24331
24332
24333
24334
0eb775a3
GM
24335
24336
369e19fc
PE
24337
24338
369e19fc
PE
24339
24340
5476a9a4
GM
24341 if test $ac_cv_func_lstat = yes; then
24342
24343 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
24344 *no)
24345 REPLACE_LSTAT=1
24346 ;;
24347 esac
24348 else
24349 HAVE_LSTAT=0
f199cab1 24350 fi
369e19fc 24351
a6342fc8 24352 if test $REPLACE_LSTAT = 1; then
369e19fc 24353
5fa4ac76 24354
369e19fc 24355
369e19fc 24356
369e19fc 24357
369e19fc 24358
369e19fc 24359
369e19fc 24360
5476a9a4 24361 gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
f199cab1 24362
45d4966b 24363 :
a6342fc8 24364 fi
369e19fc 24365
369e19fc 24366
369e19fc 24367
5fa4ac76
PE
24368
24369
5476a9a4 24370 GNULIB_LSTAT=1
5fa4ac76 24371
5fa4ac76 24372
27505cf5 24373
27505cf5 24374
27505cf5 24375
27505cf5 24376
27505cf5 24377
27505cf5 24378
5fa4ac76
PE
24379
24380
283c7aed
GM
24381 if test $ac_cv_have_decl_memrchr = no; then
24382 HAVE_DECL_MEMRCHR=0
24383 fi
24384
24385 for ac_func in memrchr
24386do :
24387 ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr"
24388if test "x$ac_cv_func_memrchr" = x""yes; then :
24389 cat >>confdefs.h <<_ACEOF
24390#define HAVE_MEMRCHR 1
24391_ACEOF
24392
24393fi
24394done
24395
24396
24397 if test $ac_cv_func_memrchr = no; then
24398
24399
24400
24401
24402
24403
24404
24405
24406 gl_LIBOBJS="$gl_LIBOBJS memrchr.$ac_objext"
24407
24408 :
24409 fi
24410
24411
24412
24413
24414
24415 GNULIB_MEMRCHR=1
24416
24417
24418
24419
24420
24421
24422
24423
24424
24425
5476a9a4 24426
e412eb97
GM
24427 if test $ac_cv_func_mkostemp != yes; then
24428 HAVE_MKOSTEMP=0
24429 fi
24430
24431 if test $HAVE_MKOSTEMP = 0; then
24432
24433
24434
24435
24436
24437
24438
24439
24440 gl_LIBOBJS="$gl_LIBOBJS mkostemp.$ac_objext"
24441
24442
24443
24444 fi
24445
24446
24447cat >>confdefs.h <<_ACEOF
24448#define GNULIB_MKOSTEMP 1
24449_ACEOF
24450
24451
24452
24453
24454
24455
24456
24457 GNULIB_MKOSTEMP=1
24458
24459
24460
24461
24462
24463
24464
24465
24466
24467
24468
5476a9a4
GM
24469 if test $APPLE_UNIVERSAL_BUILD = 1; then
24470 # A universal build on Apple Mac OS X platforms.
24471 # The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode.
24472 # But we need a configuration result that is valid in both modes.
24473 gl_cv_func_working_mktime=no
24474 fi
24475 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5
24476$as_echo_n "checking for working mktime... " >&6; }
24477if test "${gl_cv_func_working_mktime+set}" = set; then :
f199cab1
GM
24478 $as_echo_n "(cached) " >&6
24479else
5476a9a4
GM
24480 if test "$cross_compiling" = yes; then :
24481 gl_cv_func_working_mktime=no
24482else
24483 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 24484/* end confdefs.h. */
5476a9a4
GM
24485/* Test program from Paul Eggert and Tony Leneis. */
24486#include <limits.h>
24487#include <stdlib.h>
24488#include <time.h>
5fa4ac76 24489
5476a9a4
GM
24490#ifdef HAVE_UNISTD_H
24491# include <unistd.h>
f199cab1 24492#endif
5476a9a4 24493
2393bc74
GM
24494#if HAVE_DECL_ALARM
24495# include <signal.h>
5476a9a4
GM
24496#endif
24497
24498/* Work around redefinition to rpl_putenv by other config tests. */
24499#undef putenv
24500
24501static time_t time_t_max;
24502static time_t time_t_min;
24503
24504/* Values we'll use to set the TZ environment variable. */
24505static char *tz_strings[] = {
24506 (char *) 0, "TZ=GMT0", "TZ=JST-9",
24507 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
24508};
24509#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
24510
24511/* Return 0 if mktime fails to convert a date in the spring-forward gap.
24512 Based on a problem report from Andreas Jaeger. */
24513static int
24514spring_forward_gap ()
f199cab1 24515{
5476a9a4
GM
24516 /* glibc (up to about 1998-10-07) failed this test. */
24517 struct tm tm;
24518
24519 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
24520 instead of "TZ=America/Vancouver" in order to detect the bug even
24521 on systems that don't support the Olson extension, or don't have the
24522 full zoneinfo tables installed. */
24523 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
24524
24525 tm.tm_year = 98;
24526 tm.tm_mon = 3;
24527 tm.tm_mday = 5;
24528 tm.tm_hour = 2;
24529 tm.tm_min = 0;
24530 tm.tm_sec = 0;
24531 tm.tm_isdst = -1;
24532 return mktime (&tm) != (time_t) -1;
f199cab1 24533}
5fa4ac76 24534
5476a9a4
GM
24535static int
24536mktime_test1 (time_t now)
24537{
24538 struct tm *lt;
24539 return ! (lt = localtime (&now)) || mktime (lt) == now;
24540}
5fa4ac76 24541
5476a9a4
GM
24542static int
24543mktime_test (time_t now)
24544{
24545 return (mktime_test1 (now)
24546 && mktime_test1 ((time_t) (time_t_max - now))
24547 && mktime_test1 ((time_t) (time_t_min + now)));
24548}
067d23c9 24549
5476a9a4
GM
24550static int
24551irix_6_4_bug ()
24552{
24553 /* Based on code from Ariel Faigon. */
24554 struct tm tm;
24555 tm.tm_year = 96;
24556 tm.tm_mon = 3;
24557 tm.tm_mday = 0;
24558 tm.tm_hour = 0;
24559 tm.tm_min = 0;
24560 tm.tm_sec = 0;
24561 tm.tm_isdst = -1;
24562 mktime (&tm);
24563 return tm.tm_mon == 2 && tm.tm_mday == 31;
24564}
24565
24566static int
24567bigtime_test (int j)
24568{
24569 struct tm tm;
24570 time_t now;
24571 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
24572 now = mktime (&tm);
24573 if (now != (time_t) -1)
24574 {
24575 struct tm *lt = localtime (&now);
24576 if (! (lt
24577 && lt->tm_year == tm.tm_year
24578 && lt->tm_mon == tm.tm_mon
24579 && lt->tm_mday == tm.tm_mday
24580 && lt->tm_hour == tm.tm_hour
24581 && lt->tm_min == tm.tm_min
24582 && lt->tm_sec == tm.tm_sec
24583 && lt->tm_yday == tm.tm_yday
24584 && lt->tm_wday == tm.tm_wday
24585 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
24586 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
24587 return 0;
24588 }
24589 return 1;
24590}
369e19fc 24591
5476a9a4
GM
24592static int
24593year_2050_test ()
24594{
24595 /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
24596 ignoring leap seconds. */
24597 unsigned long int answer = 2527315200UL;
369e19fc 24598
5476a9a4
GM
24599 struct tm tm;
24600 time_t t;
24601 tm.tm_year = 2050 - 1900;
24602 tm.tm_mon = 2 - 1;
24603 tm.tm_mday = 1;
24604 tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
24605 tm.tm_isdst = -1;
369e19fc 24606
5476a9a4
GM
24607 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
24608 instead of "TZ=America/Vancouver" in order to detect the bug even
24609 on systems that don't support the Olson extension, or don't have the
24610 full zoneinfo tables installed. */
24611 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
067d23c9 24612
5476a9a4 24613 t = mktime (&tm);
067d23c9 24614
5476a9a4
GM
24615 /* Check that the result is either a failure, or close enough
24616 to the correct answer that we can assume the discrepancy is
24617 due to leap seconds. */
24618 return (t == (time_t) -1
24619 || (0 < t && answer - 120 <= t && t <= answer + 120));
24620}
067d23c9 24621
f199cab1
GM
24622int
24623main ()
24624{
5476a9a4
GM
24625 int result = 0;
24626 time_t t, delta;
24627 int i, j;
24628 int time_t_signed_magnitude = (time_t) ~ (time_t) 0 < (time_t) -1;
24629 int time_t_signed = ! ((time_t) 0 < (time_t) -1);
067d23c9 24630
2393bc74 24631#if HAVE_DECL_ALARM
5476a9a4
GM
24632 /* This test makes some buggy mktime implementations loop.
24633 Give up after 60 seconds; a mktime slower than that
24634 isn't worth using anyway. */
2393bc74 24635 signal (SIGALRM, SIG_DFL);
5476a9a4 24636 alarm (60);
2393bc74 24637#endif
067d23c9 24638
5476a9a4
GM
24639 time_t_max = (! time_t_signed
24640 ? (time_t) -1
24641 : ((((time_t) 1 << (sizeof (time_t) * CHAR_BIT - 2)) - 1)
24642 * 2 + 1));
24643 time_t_min = (! time_t_signed
24644 ? (time_t) 0
24645 : time_t_signed_magnitude
24646 ? ~ (time_t) 0
24647 : ~ time_t_max);
3e0be4ab 24648
5476a9a4
GM
24649 delta = time_t_max / 997; /* a suitable prime number */
24650 for (i = 0; i < N_STRINGS; i++)
24651 {
24652 if (tz_strings[i])
24653 putenv (tz_strings[i]);
3e0be4ab 24654
5476a9a4
GM
24655 for (t = 0; t <= time_t_max - delta && (result & 1) == 0; t += delta)
24656 if (! mktime_test (t))
24657 result |= 1;
24658 if ((result & 2) == 0
24659 && ! (mktime_test ((time_t) 1)
24660 && mktime_test ((time_t) (60 * 60))
24661 && mktime_test ((time_t) (60 * 60 * 24))))
24662 result |= 2;
f199cab1 24663
5476a9a4
GM
24664 for (j = 1; (result & 4) == 0; j <<= 1)
24665 {
24666 if (! bigtime_test (j))
24667 result |= 4;
24668 if (INT_MAX / 2 < j)
24669 break;
24670 }
24671 if ((result & 8) == 0 && ! bigtime_test (INT_MAX))
24672 result |= 8;
24673 }
24674 if (! irix_6_4_bug ())
24675 result |= 16;
24676 if (! spring_forward_gap ())
24677 result |= 32;
24678 if (! year_2050_test ())
24679 result |= 64;
24680 return result;
067d23c9
KY
24681}
24682_ACEOF
5476a9a4
GM
24683if ac_fn_c_try_run "$LINENO"; then :
24684 gl_cv_func_working_mktime=yes
067d23c9 24685else
5476a9a4 24686 gl_cv_func_working_mktime=no
3e0be4ab 24687fi
5476a9a4
GM
24688rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24689 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1
GM
24690fi
24691
f199cab1 24692
5476a9a4
GM
24693fi
24694{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_mktime" >&5
24695$as_echo "$gl_cv_func_working_mktime" >&6; }
f199cab1 24696
5476a9a4
GM
24697 if test $gl_cv_func_working_mktime = no; then
24698 REPLACE_MKTIME=1
24699 else
24700 REPLACE_MKTIME=0
f199cab1 24701 fi
f199cab1 24702
a6342fc8 24703 if test $REPLACE_MKTIME = 1; then
f199cab1 24704
f199cab1 24705
0eb775a3 24706
067d23c9 24707
a451f14b 24708
a451f14b 24709
743c80a7
PE
24710
24711
5476a9a4
GM
24712 gl_LIBOBJS="$gl_LIBOBJS mktime.$ac_objext"
24713
a6342fc8
GM
24714 :
24715 fi
a451f14b
PE
24716
24717
24718
e275c824
PE
24719
24720
5476a9a4 24721 GNULIB_MKTIME=1
e275c824
PE
24722
24723
24724
24725
24726
24727
24728
24729
d87ffdb7 24730
5476a9a4
GM
24731
24732
0cdca42a
GM
24733
24734 if test $ac_cv_func_pipe2 != yes; then
24735 HAVE_PIPE2=0
24736 fi
24737
24738
24739
24740
24741
24742
24743 GNULIB_PIPE2=1
24744
24745
24746
24747
24748
24749
24750
24751
24752
24753
5476a9a4
GM
24754 if test $ac_cv_func_pselect = yes; then
24755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether signature of pselect conforms to POSIX" >&5
24756$as_echo_n "checking whether signature of pselect conforms to POSIX... " >&6; }
24757if test "${gl_cv_sig_pselect+set}" = set; then :
e275c824
PE
24758 $as_echo_n "(cached) " >&6
24759else
5476a9a4 24760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
e275c824 24761/* end confdefs.h. */
5476a9a4 24762#include <sys/select.h>
e275c824 24763
f199cab1
GM
24764int
24765main ()
24766{
5476a9a4
GM
24767int (*p) (int, fd_set *, fd_set *, fd_set *restrict,
24768 struct timespec const *restrict,
24769 sigset_t const *restrict) = pselect;
24770 return !p;
f199cab1
GM
24771 ;
24772 return 0;
24773}
e275c824 24774_ACEOF
f199cab1 24775if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 24776 gl_cv_sig_pselect=yes
3e0be4ab 24777else
5476a9a4 24778 gl_cv_sig_pselect=no
f199cab1
GM
24779fi
24780rm -f core conftest.err conftest.$ac_objext \
24781 conftest$ac_exeext conftest.$ac_ext
3e0be4ab 24782fi
5476a9a4
GM
24783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sig_pselect" >&5
24784$as_echo "$gl_cv_sig_pselect" >&6; }
b6c9d18d
GM
24785
24786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pselect detects invalid fds" >&5
24787$as_echo_n "checking whether pselect detects invalid fds... " >&6; }
24788if test "${gl_cv_func_pselect_detects_ebadf+set}" = set; then :
24789 $as_echo_n "(cached) " >&6
24790else
24791
24792 if test "$cross_compiling" = yes; then :
24793
24794 case "$host_os" in
24795 # Guess yes on glibc systems.
24796 *-gnu*) gl_cv_func_pselect_detects_ebadf="guessing yes" ;;
24797 # If we don't know, assume the worst.
24798 *) gl_cv_func_pselect_detects_ebadf="guessing no" ;;
24799 esac
24800
24801else
24802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24803/* end confdefs.h. */
24804
24805#include <sys/types.h>
24806#include <sys/time.h>
24807#if HAVE_SYS_SELECT_H
24808# include <sys/select.h>
24809#endif
24810#include <unistd.h>
24811#include <errno.h>
24812
24813int
24814main ()
24815{
24816
24817 fd_set set;
24818 dup2(0, 16);
24819 FD_ZERO(&set);
24820 FD_SET(16, &set);
24821 close(16);
24822 struct timespec timeout;
24823 timeout.tv_sec = 0;
24824 timeout.tv_nsec = 5000;
24825 return pselect (17, &set, NULL, NULL, &timeout, NULL) != -1 || errno != EBADF;
24826
24827 ;
24828 return 0;
24829}
24830_ACEOF
24831if ac_fn_c_try_run "$LINENO"; then :
24832 gl_cv_func_pselect_detects_ebadf=yes
24833else
24834 gl_cv_func_pselect_detects_ebadf=no
24835fi
24836rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24837 conftest.$ac_objext conftest.beam conftest.$ac_ext
24838fi
24839
24840
24841fi
24842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pselect_detects_ebadf" >&5
24843$as_echo "$gl_cv_func_pselect_detects_ebadf" >&6; }
24844 case $gl_cv_func_pselect_detects_ebadf in
24845 *yes) ;;
24846 *) REPLACE_PSELECT=1 ;;
24847 esac
5476a9a4 24848 fi
3e0be4ab 24849
5476a9a4
GM
24850 if test $ac_cv_func_pselect = no || test $gl_cv_sig_pselect = no; then
24851 REPLACE_PSELECT=1
24852 fi
3e0be4ab 24853
a6342fc8 24854 if test $HAVE_PSELECT = 0 || test $REPLACE_PSELECT = 1; then
3e0be4ab
GM
24855
24856
3e0be4ab 24857
3e0be4ab 24858
3e0be4ab 24859
3e0be4ab 24860
3e0be4ab 24861
3e0be4ab 24862
5476a9a4 24863 gl_LIBOBJS="$gl_LIBOBJS pselect.$ac_objext"
3e0be4ab 24864
a6342fc8 24865 fi
3e0be4ab
GM
24866
24867
f199cab1 24868
f199cab1 24869
f199cab1 24870
5476a9a4 24871 GNULIB_PSELECT=1
f199cab1 24872
6d153f56 24873
f199cab1 24874
3e0be4ab 24875
3e0be4ab
GM
24876
24877
f199cab1 24878
0eb775a3
GM
24879
24880
5476a9a4 24881 LIB_PTHREAD_SIGMASK=
0eb775a3 24882
f199cab1 24883
f077f61d
GM
24884
24885
24886 if test "$gl_threads_api" = posix; then
24887 if test $ac_cv_func_pthread_sigmask = yes; then
24888 :
24889 else
24890 if test -n "$LIBMULTITHREAD"; then
24891 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_sigmask in $LIBMULTITHREAD" >&5
24892$as_echo_n "checking for pthread_sigmask in $LIBMULTITHREAD... " >&6; }
24893if test "${gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD+set}" = set; then :
24894 $as_echo_n "(cached) " >&6
24895else
24896 gl_save_LIBS="$LIBS"
24897 LIBS="$LIBS $LIBMULTITHREAD"
24898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24899/* end confdefs.h. */
24900#include <pthread.h>
24901 #include <signal.h>
24902
24903int
24904main ()
24905{
24906return pthread_sigmask (0, (sigset_t *) 0, (sigset_t *) 0);
24907 ;
24908 return 0;
24909}
24910
24911_ACEOF
24912if ac_fn_c_try_link "$LINENO"; then :
24913 gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD=yes
24914else
24915 gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD=no
24916fi
24917rm -f core conftest.err conftest.$ac_objext \
24918 conftest$ac_exeext conftest.$ac_ext
24919 LIBS="$gl_save_LIBS"
24920
24921fi
24922{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD" >&5
24923$as_echo "$gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD" >&6; }
24924 if test $gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD = yes; then
24925 LIB_PTHREAD_SIGMASK="$LIBMULTITHREAD"
24926 else
24927 HAVE_PTHREAD_SIGMASK=0
24928 fi
24929 else
24930 HAVE_PTHREAD_SIGMASK=0
24931 fi
24932 fi
5476a9a4 24933 else
f077f61d
GM
24934 if test $ac_cv_func_pthread_sigmask = yes; then
24935 REPLACE_PTHREAD_SIGMASK=1
24936 else
24937 HAVE_PTHREAD_SIGMASK=0
24938 fi
5476a9a4 24939 fi
6d153f56 24940
52724a05 24941
6d153f56
GM
24942
24943
5476a9a4
GM
24944 if test $HAVE_PTHREAD_SIGMASK = 1; then
24945
24946
24947 if test -z "$LIB_PTHREAD_SIGMASK"; then
24948 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask works without -lpthread" >&5
24949$as_echo_n "checking whether pthread_sigmask works without -lpthread... " >&6; }
24950if test "${gl_cv_func_pthread_sigmask_in_libc_works+set}" = set; then :
f199cab1
GM
24951 $as_echo_n "(cached) " >&6
24952else
5476a9a4
GM
24953
24954 if test "$cross_compiling" = yes; then :
24955
24956 case "$host_os" in
24957 freebsd* | hpux* | solaris | solaris2.[2-9]*)
24958 gl_cv_func_pthread_sigmask_in_libc_works="guessing no";;
24959 *)
24960 gl_cv_func_pthread_sigmask_in_libc_works="guessing yes";;
24961 esac
24962
24963else
24964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 24965/* end confdefs.h. */
6d153f56 24966
5476a9a4
GM
24967#include <pthread.h>
24968#include <signal.h>
24969#include <stddef.h>
24970int main ()
f199cab1 24971{
5476a9a4
GM
24972 sigset_t set;
24973 sigemptyset (&set);
24974 return pthread_sigmask (1729, &set, NULL) != 0;
f199cab1
GM
24975}
24976_ACEOF
5476a9a4
GM
24977if ac_fn_c_try_run "$LINENO"; then :
24978 gl_cv_func_pthread_sigmask_in_libc_works=no
f199cab1 24979else
5476a9a4 24980 gl_cv_func_pthread_sigmask_in_libc_works=yes
f199cab1 24981fi
5476a9a4
GM
24982rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24983 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1 24984fi
5476a9a4
GM
24985
24986
f199cab1 24987fi
5476a9a4
GM
24988{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_in_libc_works" >&5
24989$as_echo "$gl_cv_func_pthread_sigmask_in_libc_works" >&6; }
24990 case "$gl_cv_func_pthread_sigmask_in_libc_works" in
24991 *no)
24992 REPLACE_PTHREAD_SIGMASK=1
cc322c06 24993
5476a9a4 24994$as_echo "#define PTHREAD_SIGMASK_INEFFECTIVE 1" >>confdefs.h
cc322c06 24995
5476a9a4
GM
24996 ;;
24997 esac
24998 fi
3e0be4ab 24999
5476a9a4
GM
25000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask returns error numbers" >&5
25001$as_echo_n "checking whether pthread_sigmask returns error numbers... " >&6; }
25002if test "${gl_cv_func_pthread_sigmask_return_works+set}" = set; then :
3e0be4ab
GM
25003 $as_echo_n "(cached) " >&6
25004else
5476a9a4
GM
25005
25006 gl_save_LIBS="$LIBS"
25007 LIBS="$LIBS $LIB_PTHREAD_SIGMASK"
25008 if test "$cross_compiling" = yes; then :
25009 case "$host_os" in
25010 cygwin*)
25011 gl_cv_func_pthread_sigmask_return_works="guessing no";;
25012 *)
25013 gl_cv_func_pthread_sigmask_return_works="guessing yes";;
25014 esac
25015
25016else
25017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3e0be4ab 25018/* end confdefs.h. */
f199cab1 25019
5476a9a4
GM
25020#include <pthread.h>
25021#include <signal.h>
25022#include <stddef.h>
25023int main ()
3e0be4ab 25024{
5476a9a4
GM
25025 sigset_t set;
25026 sigemptyset (&set);
25027 if (pthread_sigmask (1729, &set, NULL) == -1)
25028 return 1;
3e0be4ab
GM
25029 return 0;
25030}
6d153f56 25031_ACEOF
5476a9a4
GM
25032if ac_fn_c_try_run "$LINENO"; then :
25033 gl_cv_func_pthread_sigmask_return_works=yes
3e0be4ab 25034else
5476a9a4 25035 gl_cv_func_pthread_sigmask_return_works=no
6d153f56 25036fi
5476a9a4
GM
25037rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25038 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1 25039fi
5476a9a4
GM
25040
25041 LIBS="$gl_save_LIBS"
25042
52724a05 25043fi
5476a9a4
GM
25044{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_return_works" >&5
25045$as_echo "$gl_cv_func_pthread_sigmask_return_works" >&6; }
25046 case "$gl_cv_func_pthread_sigmask_return_works" in
25047 *no)
25048 REPLACE_PTHREAD_SIGMASK=1
6d153f56 25049
5476a9a4 25050$as_echo "#define PTHREAD_SIGMASK_FAILS_WITH_ERRNO 1" >>confdefs.h
6d153f56 25051
5476a9a4
GM
25052 ;;
25053 esac
cc322c06 25054
5476a9a4
GM
25055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask unblocks signals correctly" >&5
25056$as_echo_n "checking whether pthread_sigmask unblocks signals correctly... " >&6; }
25057if test "${gl_cv_func_pthread_sigmask_unblock_works+set}" = set; then :
f199cab1
GM
25058 $as_echo_n "(cached) " >&6
25059else
5476a9a4
GM
25060
25061 case "$host_os" in
25062 irix*)
25063 gl_cv_func_pthread_sigmask_unblock_works="guessing no";;
25064 *)
25065 gl_cv_func_pthread_sigmask_unblock_works="guessing yes";;
25066 esac
25067 gl_save_LIBS="$LIBS"
25068 LIBS="$LIBS $LIBMULTITHREAD"
25069 if test "$cross_compiling" = yes; then :
25070 :
f199cab1 25071else
5476a9a4
GM
25072 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25073/* end confdefs.h. */
6d153f56 25074
5476a9a4
GM
25075#include <pthread.h>
25076#include <signal.h>
25077#include <stdio.h>
25078#include <stdlib.h>
25079#include <unistd.h>
25080static volatile int sigint_occurred;
25081static void
25082sigint_handler (int sig)
25083{
25084 sigint_occurred++;
25085}
25086int main ()
25087{
25088 sigset_t set;
25089 int pid = getpid ();
25090 char command[80];
25091 signal (SIGINT, sigint_handler);
25092 sigemptyset (&set);
25093 sigaddset (&set, SIGINT);
25094 if (!(pthread_sigmask (SIG_BLOCK, &set, NULL) == 0))
25095 return 1;
25096 sprintf (command, "sh -c 'sleep 1; kill -%d %d' &", SIGINT, pid);
25097 if (!(system (command) == 0))
25098 return 2;
25099 sleep (2);
25100 if (!(sigint_occurred == 0))
25101 return 3;
25102 if (!(pthread_sigmask (SIG_UNBLOCK, &set, NULL) == 0))
25103 return 4;
25104 if (!(sigint_occurred == 1)) /* This fails on IRIX. */
25105 return 5;
25106 return 0;
25107}
25108_ACEOF
25109if ac_fn_c_try_run "$LINENO"; then :
25110 :
25111else
25112 gl_cv_func_pthread_sigmask_unblock_works=no
f199cab1 25113fi
5476a9a4
GM
25114rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25115 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1 25116fi
5476a9a4
GM
25117
25118 LIBS="$gl_save_LIBS"
25119
f199cab1 25120fi
5476a9a4
GM
25121{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_unblock_works" >&5
25122$as_echo "$gl_cv_func_pthread_sigmask_unblock_works" >&6; }
25123 case "$gl_cv_func_pthread_sigmask_unblock_works" in
25124 *no)
25125 REPLACE_PTHREAD_SIGMASK=1
6d153f56 25126
5476a9a4 25127$as_echo "#define PTHREAD_SIGMASK_UNBLOCK_BUG 1" >>confdefs.h
6d153f56 25128
5476a9a4
GM
25129 ;;
25130 esac
6d153f56 25131 fi
6d153f56 25132
a6342fc8 25133 if test $HAVE_PTHREAD_SIGMASK = 0 || test $REPLACE_PTHREAD_SIGMASK = 1; then
a451f14b 25134
a451f14b 25135
743c80a7
PE
25136
25137
25138
25139
25140
f199cab1 25141
5476a9a4 25142 gl_LIBOBJS="$gl_LIBOBJS pthread_sigmask.$ac_objext"
743c80a7
PE
25143
25144
5476a9a4 25145 if test $HAVE_PTHREAD_SIGMASK = 1; then
743c80a7 25146
5476a9a4 25147$as_echo "#define HAVE_PTHREAD_SIGMASK 1" >>confdefs.h
743c80a7 25148
5476a9a4 25149 fi
743c80a7 25150
a6342fc8 25151 fi
938a4ef9 25152
938a4ef9 25153
938a4ef9 25154
938a4ef9 25155
938a4ef9 25156
5476a9a4 25157 GNULIB_PTHREAD_SIGMASK=1
a451f14b 25158
a451f14b 25159
743c80a7
PE
25160
25161
25162
25163
25164
b5591ebb
GM
25165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for putenv compatible with GNU and SVID" >&5
25166$as_echo_n "checking for putenv compatible with GNU and SVID... " >&6; }
25167if test "${gl_cv_func_svid_putenv+set}" = set; then :
25168 $as_echo_n "(cached) " >&6
25169else
25170 if test "$cross_compiling" = yes; then :
25171 case "$host_os" in
25172 # Guess yes on glibc systems.
25173 *-gnu*) gl_cv_func_svid_putenv="guessing yes" ;;
25174 # If we don't know, assume the worst.
25175 *) gl_cv_func_svid_putenv="guessing no" ;;
25176 esac
25177
25178else
25179 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25180/* end confdefs.h. */
25181$ac_includes_default
25182int
25183main ()
25184{
25185
25186 /* Put it in env. */
25187 if (putenv ("CONFTEST_putenv=val"))
25188 return 1;
25189
25190 /* Try to remove it. */
25191 if (putenv ("CONFTEST_putenv"))
25192 return 2;
25193
25194 /* Make sure it was deleted. */
25195 if (getenv ("CONFTEST_putenv") != 0)
25196 return 3;
25197
25198 return 0;
25199
25200 ;
25201 return 0;
25202}
25203_ACEOF
25204if ac_fn_c_try_run "$LINENO"; then :
25205 gl_cv_func_svid_putenv=yes
25206else
25207 gl_cv_func_svid_putenv=no
25208fi
25209rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25210 conftest.$ac_objext conftest.beam conftest.$ac_ext
25211fi
25212
25213
25214fi
25215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_svid_putenv" >&5
25216$as_echo "$gl_cv_func_svid_putenv" >&6; }
25217 case "$gl_cv_func_svid_putenv" in
25218 *yes) ;;
25219 *)
25220 REPLACE_PUTENV=1
25221 ;;
25222 esac
25223
25224 if test $REPLACE_PUTENV = 1; then
25225
25226
25227
25228
25229
25230
25231
25232
25233 gl_LIBOBJS="$gl_LIBOBJS putenv.$ac_objext"
25234
c175d440 25235
2393bc74
GM
25236 ac_fn_c_check_decl "$LINENO" "_putenv" "ac_cv_have_decl__putenv" "$ac_includes_default"
25237if test "x$ac_cv_have_decl__putenv" = x""yes; then :
25238 ac_have_decl=1
25239else
25240 ac_have_decl=0
c175d440 25241fi
2393bc74
GM
25242
25243cat >>confdefs.h <<_ACEOF
25244#define HAVE_DECL__PUTENV $ac_have_decl
25245_ACEOF
c175d440
GM
25246
25247
b5591ebb
GM
25248 fi
25249
25250
25251
25252
25253
25254 GNULIB_PUTENV=1
25255
25256
25257
25258
25259
25260
3a019ab4
GM
25261 # Check whether --enable-acl was given.
25262if test "${enable_acl+set}" = set; then :
25263 enableval=$enable_acl;
25264else
25265 enable_acl=auto
25266fi
b5591ebb 25267
743c80a7 25268
3a019ab4
GM
25269 LIB_ACL=
25270 use_acl=0
25271 if test "x$enable_acl" != "xno"; then
25272 for ac_header in sys/acl.h
25273do :
25274 ac_fn_c_check_header_mongrel "$LINENO" "sys/acl.h" "ac_cv_header_sys_acl_h" "$ac_includes_default"
25275if test "x$ac_cv_header_sys_acl_h" = x""yes; then :
25276 cat >>confdefs.h <<_ACEOF
25277#define HAVE_SYS_ACL_H 1
25278_ACEOF
25279
25280fi
25281
25282done
25283
25284 if test $ac_cv_header_sys_acl_h = yes; then
25285 ac_save_LIBS=$LIBS
25286
25287 if test $use_acl = 0; then
25288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing acl_get_file" >&5
25289$as_echo_n "checking for library containing acl_get_file... " >&6; }
25290if test "${ac_cv_search_acl_get_file+set}" = set; then :
25291 $as_echo_n "(cached) " >&6
25292else
25293 ac_func_search_save_LIBS=$LIBS
25294cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25295/* end confdefs.h. */
25296
25297/* Override any GCC internal prototype to avoid an error.
25298 Use char because int might match the return type of a GCC
25299 builtin and then its argument prototype would still apply. */
25300#ifdef __cplusplus
25301extern "C"
25302#endif
25303char acl_get_file ();
25304int
25305main ()
25306{
25307return acl_get_file ();
25308 ;
25309 return 0;
25310}
25311_ACEOF
25312for ac_lib in '' acl pacl; do
25313 if test -z "$ac_lib"; then
25314 ac_res="none required"
25315 else
25316 ac_res=-l$ac_lib
25317 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
25318 fi
25319 if ac_fn_c_try_link "$LINENO"; then :
25320 ac_cv_search_acl_get_file=$ac_res
25321fi
25322rm -f core conftest.err conftest.$ac_objext \
25323 conftest$ac_exeext
25324 if test "${ac_cv_search_acl_get_file+set}" = set; then :
25325 break
25326fi
25327done
25328if test "${ac_cv_search_acl_get_file+set}" = set; then :
25329
25330else
25331 ac_cv_search_acl_get_file=no
25332fi
25333rm conftest.$ac_ext
25334LIBS=$ac_func_search_save_LIBS
25335fi
25336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_acl_get_file" >&5
25337$as_echo "$ac_cv_search_acl_get_file" >&6; }
25338ac_res=$ac_cv_search_acl_get_file
25339if test "$ac_res" != no; then :
25340 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
25341 if test "$ac_cv_search_acl_get_file" != "none required"; then
25342 LIB_ACL=$ac_cv_search_acl_get_file
25343 fi
25344 for ac_func in acl_get_file acl_get_fd acl_set_file acl_set_fd \
25345 acl_free acl_from_mode acl_from_text \
25346 acl_delete_def_file acl_extended_file \
25347 acl_delete_fd_np acl_delete_file_np \
25348 acl_copy_ext_native acl_create_entry_np \
25349 acl_to_short_text acl_free_text
25350do :
25351 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
25352ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
25353eval as_val=\$$as_ac_var
25354 if test "x$as_val" = x""yes; then :
25355 cat >>confdefs.h <<_ACEOF
25356#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
25357_ACEOF
25358
25359fi
25360done
25361
25362 # If the acl_get_file bug is detected, don't enable the ACL support.
25363
25364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working acl_get_file" >&5
25365$as_echo_n "checking for working acl_get_file... " >&6; }
25366if test "${gl_cv_func_working_acl_get_file+set}" = set; then :
25367 $as_echo_n "(cached) " >&6
25368else
25369 if test "$cross_compiling" = yes; then :
25370 gl_cv_func_working_acl_get_file=cross-compiling
25371else
25372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25373/* end confdefs.h. */
25374#include <sys/types.h>
25375 #include <sys/acl.h>
25376 #include <errno.h>
25377
25378int
25379main ()
25380{
25381if (!acl_get_file (".", ACL_TYPE_ACCESS) && errno == ENOENT)
25382 return 1;
25383 return 0;
25384
25385 ;
25386 return 0;
25387}
25388_ACEOF
25389if ac_fn_c_try_run "$LINENO"; then :
25390 gl_cv_func_working_acl_get_file=yes
25391else
25392 gl_cv_func_working_acl_get_file=no
25393fi
25394rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25395 conftest.$ac_objext conftest.beam conftest.$ac_ext
25396fi
25397
25398fi
25399{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_acl_get_file" >&5
25400$as_echo "$gl_cv_func_working_acl_get_file" >&6; }
25401
25402 if test $gl_cv_func_working_acl_get_file = yes; then :
25403 use_acl=1
25404fi
25405
25406 if test $use_acl = 1; then
25407 for ac_header in acl/libacl.h
25408do :
25409 ac_fn_c_check_header_mongrel "$LINENO" "acl/libacl.h" "ac_cv_header_acl_libacl_h" "$ac_includes_default"
25410if test "x$ac_cv_header_acl_libacl_h" = x""yes; then :
25411 cat >>confdefs.h <<_ACEOF
25412#define HAVE_ACL_LIBACL_H 1
25413_ACEOF
25414
25415fi
25416
25417done
25418
25419
25420
25421
25422
25423
25424
25425
25426
25427 for ac_func in acl_entries
25428do :
25429 ac_fn_c_check_func "$LINENO" "acl_entries" "ac_cv_func_acl_entries"
25430if test "x$ac_cv_func_acl_entries" = x""yes; then :
25431 cat >>confdefs.h <<_ACEOF
25432#define HAVE_ACL_ENTRIES 1
25433_ACEOF
25434
25435else
25436
25437 gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
25438
25439fi
25440done
25441
25442
25443 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ACL_FIRST_ENTRY" >&5
25444$as_echo_n "checking for ACL_FIRST_ENTRY... " >&6; }
25445if test "${gl_cv_acl_ACL_FIRST_ENTRY+set}" = set; then :
25446 $as_echo_n "(cached) " >&6
25447else
25448 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25449/* end confdefs.h. */
25450#include <sys/types.h>
25451#include <sys/acl.h>
25452int type = ACL_FIRST_ENTRY;
25453int
25454main ()
25455{
25456
25457 ;
25458 return 0;
25459}
25460_ACEOF
25461if ac_fn_c_try_compile "$LINENO"; then :
25462 gl_cv_acl_ACL_FIRST_ENTRY=yes
25463else
25464 gl_cv_acl_ACL_FIRST_ENTRY=no
25465fi
25466rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25467fi
25468{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_acl_ACL_FIRST_ENTRY" >&5
25469$as_echo "$gl_cv_acl_ACL_FIRST_ENTRY" >&6; }
25470 if test $gl_cv_acl_ACL_FIRST_ENTRY = yes; then
25471
25472$as_echo "#define HAVE_ACL_FIRST_ENTRY 1" >>confdefs.h
25473
25474 fi
25475 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ACL_TYPE_EXTENDED" >&5
25476$as_echo_n "checking for ACL_TYPE_EXTENDED... " >&6; }
25477if test "${gl_cv_acl_ACL_TYPE_EXTENDED+set}" = set; then :
25478 $as_echo_n "(cached) " >&6
25479else
25480 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25481/* end confdefs.h. */
25482#include <sys/types.h>
25483#include <sys/acl.h>
25484int type = ACL_TYPE_EXTENDED;
25485int
25486main ()
25487{
25488
25489 ;
25490 return 0;
25491}
25492_ACEOF
25493if ac_fn_c_try_compile "$LINENO"; then :
25494 gl_cv_acl_ACL_TYPE_EXTENDED=yes
25495else
25496 gl_cv_acl_ACL_TYPE_EXTENDED=no
25497fi
25498rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25499fi
25500{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_acl_ACL_TYPE_EXTENDED" >&5
25501$as_echo "$gl_cv_acl_ACL_TYPE_EXTENDED" >&6; }
25502 if test $gl_cv_acl_ACL_TYPE_EXTENDED = yes; then
25503
25504$as_echo "#define HAVE_ACL_TYPE_EXTENDED 1" >>confdefs.h
25505
25506 fi
25507 else
25508 LIB_ACL=
25509 fi
25510
25511fi
25512
25513 fi
25514
25515 if test $use_acl = 0; then
25516 for ac_func in facl
25517do :
25518 ac_fn_c_check_func "$LINENO" "facl" "ac_cv_func_facl"
25519if test "x$ac_cv_func_facl" = x""yes; then :
25520 cat >>confdefs.h <<_ACEOF
25521#define HAVE_FACL 1
25522_ACEOF
25523
25524fi
25525done
25526
25527 if test $ac_cv_func_facl = yes; then
25528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing acl_trivial" >&5
25529$as_echo_n "checking for library containing acl_trivial... " >&6; }
25530if test "${ac_cv_search_acl_trivial+set}" = set; then :
25531 $as_echo_n "(cached) " >&6
25532else
25533 ac_func_search_save_LIBS=$LIBS
25534cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25535/* end confdefs.h. */
25536
25537/* Override any GCC internal prototype to avoid an error.
25538 Use char because int might match the return type of a GCC
25539 builtin and then its argument prototype would still apply. */
25540#ifdef __cplusplus
25541extern "C"
25542#endif
25543char acl_trivial ();
25544int
25545main ()
25546{
25547return acl_trivial ();
25548 ;
25549 return 0;
25550}
25551_ACEOF
25552for ac_lib in '' sec; do
25553 if test -z "$ac_lib"; then
25554 ac_res="none required"
25555 else
25556 ac_res=-l$ac_lib
25557 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
25558 fi
25559 if ac_fn_c_try_link "$LINENO"; then :
25560 ac_cv_search_acl_trivial=$ac_res
25561fi
25562rm -f core conftest.err conftest.$ac_objext \
25563 conftest$ac_exeext
25564 if test "${ac_cv_search_acl_trivial+set}" = set; then :
25565 break
25566fi
25567done
25568if test "${ac_cv_search_acl_trivial+set}" = set; then :
25569
25570else
25571 ac_cv_search_acl_trivial=no
25572fi
25573rm conftest.$ac_ext
25574LIBS=$ac_func_search_save_LIBS
25575fi
25576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_acl_trivial" >&5
25577$as_echo "$ac_cv_search_acl_trivial" >&6; }
25578ac_res=$ac_cv_search_acl_trivial
25579if test "$ac_res" != no; then :
25580 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
25581 if test "$ac_cv_search_acl_trivial" != "none required"; then
25582 LIB_ACL=$ac_cv_search_acl_trivial
25583 fi
25584
25585fi
25586
25587 for ac_func in acl_trivial
25588do :
25589 ac_fn_c_check_func "$LINENO" "acl_trivial" "ac_cv_func_acl_trivial"
25590if test "x$ac_cv_func_acl_trivial" = x""yes; then :
25591 cat >>confdefs.h <<_ACEOF
25592#define HAVE_ACL_TRIVIAL 1
25593_ACEOF
25594
25595fi
25596done
25597
25598 use_acl=1
25599 fi
25600 fi
25601
25602 if test $use_acl = 0; then
25603 for ac_func in getacl
25604do :
25605 ac_fn_c_check_func "$LINENO" "getacl" "ac_cv_func_getacl"
25606if test "x$ac_cv_func_getacl" = x""yes; then :
25607 cat >>confdefs.h <<_ACEOF
25608#define HAVE_GETACL 1
25609_ACEOF
25610
25611fi
25612done
25613
25614 if test $ac_cv_func_getacl = yes; then
25615 use_acl=1
25616 fi
25617 for ac_header in aclv.h
25618do :
25619 ac_fn_c_check_header_compile "$LINENO" "aclv.h" "ac_cv_header_aclv_h" "#include <sys/types.h>
25620"
25621if test "x$ac_cv_header_aclv_h" = x""yes; then :
25622 cat >>confdefs.h <<_ACEOF
25623#define HAVE_ACLV_H 1
25624_ACEOF
25625
25626fi
25627
25628done
25629
25630 fi
25631
25632 if test $use_acl = 0; then
25633 for ac_func in aclx_get
25634do :
25635 ac_fn_c_check_func "$LINENO" "aclx_get" "ac_cv_func_aclx_get"
25636if test "x$ac_cv_func_aclx_get" = x""yes; then :
25637 cat >>confdefs.h <<_ACEOF
25638#define HAVE_ACLX_GET 1
25639_ACEOF
25640
25641fi
25642done
25643
25644 if test $ac_cv_func_aclx_get = yes; then
25645 use_acl=1
25646 fi
25647 fi
25648
25649 if test $use_acl = 0 || test "$ac_cv_func_aclx_get" = yes; then
25650 for ac_func in statacl
25651do :
25652 ac_fn_c_check_func "$LINENO" "statacl" "ac_cv_func_statacl"
25653if test "x$ac_cv_func_statacl" = x""yes; then :
25654 cat >>confdefs.h <<_ACEOF
25655#define HAVE_STATACL 1
25656_ACEOF
25657
25658fi
25659done
25660
25661 if test $ac_cv_func_statacl = yes; then
25662 use_acl=1
25663 fi
25664 fi
25665
25666 if test $use_acl = 0; then
25667 for ac_func in aclsort
25668do :
25669 ac_fn_c_check_func "$LINENO" "aclsort" "ac_cv_func_aclsort"
25670if test "x$ac_cv_func_aclsort" = x""yes; then :
25671 cat >>confdefs.h <<_ACEOF
25672#define HAVE_ACLSORT 1
25673_ACEOF
25674
25675fi
25676done
25677
25678 if test $ac_cv_func_aclsort = yes; then
25679 use_acl=1
25680 fi
25681 fi
25682
25683 LIBS=$ac_save_LIBS
25684 fi
25685 if test "x$enable_acl$use_acl" = "xyes0"; then
25686 as_fn_error "ACLs enabled but support not detected" "$LINENO" 5
25687 elif test "x$enable_acl$use_acl" = "xauto0"; then
25688 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libacl development library was not found or not usable." >&5
25689$as_echo "$as_me: WARNING: libacl development library was not found or not usable." >&2;}
25690 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: emacs will be built without ACL support." >&5
25691$as_echo "$as_me: WARNING: emacs will be built without ACL support." >&2;}
25692 fi
25693 fi
25694
25695
25696cat >>confdefs.h <<_ACEOF
25697#define USE_ACL $use_acl
25698_ACEOF
25699
25700 USE_ACL=$use_acl
25701
25702
25703
25704
25705
25706 if test $ac_cv_func_readlink = no; then
25707 HAVE_READLINK=0
25708 else
25709 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
25710$as_echo_n "checking whether readlink signature is correct... " >&6; }
25711if test "${gl_cv_decl_readlink_works+set}" = set; then :
25712 $as_echo_n "(cached) " >&6
25713else
25714 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25715/* end confdefs.h. */
25716#include <unistd.h>
25717 /* Cause compilation failure if original declaration has wrong type. */
25718 ssize_t readlink (const char *, char *, size_t);
25719int
f199cab1
GM
25720main ()
25721{
5476a9a4 25722
f199cab1
GM
25723 ;
25724 return 0;
25725}
3e0be4ab 25726_ACEOF
5476a9a4
GM
25727if ac_fn_c_try_compile "$LINENO"; then :
25728 gl_cv_decl_readlink_works=yes
25729else
25730 gl_cv_decl_readlink_works=no
3e0be4ab 25731fi
5476a9a4
GM
25732rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25733fi
25734{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5
25735$as_echo "$gl_cv_decl_readlink_works" >&6; }
25736 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
25737$as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; }
25738if test "${gl_cv_func_readlink_works+set}" = set; then :
25739 $as_echo_n "(cached) " >&6
25740else
25741 # We have readlink, so assume ln -s works.
25742 ln -s conftest.no-such conftest.link
25743 ln -s conftest.link conftest.lnk2
25744 if test "$cross_compiling" = yes; then :
25745 case "$host_os" in
25746 # Guess yes on glibc systems.
25747 *-gnu*) gl_cv_func_readlink_works="guessing yes" ;;
25748 # If we don't know, assume the worst.
25749 *) gl_cv_func_readlink_works="guessing no" ;;
25750 esac
25751
25752else
f199cab1 25753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 25754/* end confdefs.h. */
5476a9a4
GM
25755#include <unistd.h>
25756
f199cab1
GM
25757int
25758main ()
25759{
5476a9a4
GM
25760char buf[20];
25761 return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;
f199cab1
GM
25762 ;
25763 return 0;
25764}
067d23c9 25765_ACEOF
5476a9a4
GM
25766if ac_fn_c_try_run "$LINENO"; then :
25767 gl_cv_func_readlink_works=yes
25768else
25769 gl_cv_func_readlink_works=no
067d23c9 25770fi
5476a9a4
GM
25771rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25772 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1 25773fi
067d23c9 25774
5476a9a4 25775 rm -f conftest.link conftest.lnk2
f199cab1 25776fi
5476a9a4
GM
25777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_works" >&5
25778$as_echo "$gl_cv_func_readlink_works" >&6; }
25779 case "$gl_cv_func_readlink_works" in
25780 *yes)
25781 if test "$gl_cv_decl_readlink_works" != yes; then
25782 REPLACE_READLINK=1
25783 fi
25784 ;;
25785 *)
067d23c9 25786
5476a9a4 25787$as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
067d23c9 25788
5476a9a4
GM
25789 REPLACE_READLINK=1
25790 ;;
25791 esac
25792 fi
3e0be4ab 25793
a6342fc8 25794 if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
3e0be4ab
GM
25795
25796
25797
25798
3e0be4ab
GM
25799
25800
5476a9a4
GM
25801
25802
25803 gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext"
25804
25805
25806 :
3e0be4ab 25807
a6342fc8 25808 fi
3e0be4ab 25809
067d23c9 25810
067d23c9 25811
067d23c9 25812
067d23c9 25813
5476a9a4 25814 GNULIB_READLINK=1
067d23c9 25815
067d23c9 25816
067d23c9 25817
067d23c9
KY
25818
25819
067d23c9 25820
d7ad186c
GM
25821
25822
25823
25824 if test $ac_cv_func_readlinkat = no; then
25825 HAVE_READLINKAT=0
25826 fi
25827
25828 if test $HAVE_READLINKAT = 0; then
25829
25830
25831
25832
25833
25834
25835
25836
25837 gl_LIBOBJS="$gl_LIBOBJS readlinkat.$ac_objext"
25838
25839 fi
25840
25841
25842
25843
25844
25845 GNULIB_READLINKAT=1
25846
25847
25848
25849
25850
25851
e4184a20
GM
25852 for ac_func in sig2str
25853do :
25854 ac_fn_c_check_func "$LINENO" "sig2str" "ac_cv_func_sig2str"
25855if test "x$ac_cv_func_sig2str" = x""yes; then :
25856 cat >>confdefs.h <<_ACEOF
25857#define HAVE_SIG2STR 1
25858_ACEOF
25859
25860fi
25861done
25862
25863
25864 if test $ac_cv_func_sig2str = no; then
25865
25866
25867
25868
25869
25870
25871
25872
25873 gl_LIBOBJS="$gl_LIBOBJS sig2str.$ac_objext"
25874
25875
25876 :
25877
25878 fi
25879
369e19fc 25880
067d23c9 25881
5476a9a4
GM
25882
25883
25884
25885
25886
25887
25888
25889
25890 if test $gl_cv_have_include_next = yes; then
25891 gl_cv_next_signal_h='<'signal.h'>'
25892 else
25893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
25894$as_echo_n "checking absolute name of <signal.h>... " >&6; }
25895if test "${gl_cv_next_signal_h+set}" = set; then :
0eb775a3 25896 $as_echo_n "(cached) " >&6
0eb775a3 25897else
5476a9a4
GM
25898
25899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0eb775a3 25900/* end confdefs.h. */
5476a9a4 25901#include <signal.h>
f199cab1 25902
0eb775a3 25903_ACEOF
5476a9a4
GM
25904 case "$host_os" in
25905 aix*) gl_absname_cpp="$ac_cpp -C" ;;
25906 *) gl_absname_cpp="$ac_cpp" ;;
25907 esac
0eb775a3 25908
5476a9a4
GM
25909 case "$host_os" in
25910 mingw*)
25911 gl_dirsep_regex='[/\\]'
25912 ;;
25913 *)
25914 gl_dirsep_regex='\/'
25915 ;;
25916 esac
25917 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
0eb775a3 25918
5476a9a4
GM
25919 gl_header_literal_regex=`echo 'signal.h' \
25920 | sed -e "$gl_make_literal_regex_sed"`
25921 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25922 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25923 s|^/[^/]|//&|
25924 p
25925 q
25926 }'
25927 gl_cv_next_signal_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25928 sed -n "$gl_absolute_header_sed"`'"'
0eb775a3 25929
f199cab1 25930
5476a9a4
GM
25931fi
25932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
25933$as_echo "$gl_cv_next_signal_h" >&6; }
25934 fi
25935 NEXT_SIGNAL_H=$gl_cv_next_signal_h
067d23c9 25936
5476a9a4
GM
25937 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25938 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25939 gl_next_as_first_directive='<'signal.h'>'
25940 else
25941 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25942 gl_next_as_first_directive=$gl_cv_next_signal_h
25943 fi
25944 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
067d23c9 25945
067d23c9
KY
25946
25947
067d23c9 25948
067d23c9 25949
5476a9a4
GM
25950# AIX declares sig_atomic_t to already include volatile, and C89 compilers
25951# then choke on 'volatile sig_atomic_t'. C99 requires that it compile.
25952 ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
25953#include <signal.h>
25954
25955"
25956if test "x$ac_cv_type_volatile_sig_atomic_t" = x""yes; then :
25957
25958else
25959 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
f199cab1 25960fi
067d23c9 25961
067d23c9 25962
067d23c9 25963
067d23c9 25964
938a4ef9 25965
938a4ef9 25966
5476a9a4
GM
25967
25968 ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
25969#include <signal.h>
25970
25971"
25972if test "x$ac_cv_type_sighandler_t" = x""yes; then :
25973
25974else
25975 HAVE_SIGHANDLER_T=0
25976fi
25977
25978
25979
25980
a6342fc8 25981 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
5476a9a4
GM
25982/* <sys/types.h> is not needed according to POSIX, but the
25983 <sys/socket.h> in i386-unknown-freebsd4.10 and
25984 powerpc-apple-darwin5.5 required it. */
25985#include <sys/types.h>
25986#if HAVE_SYS_SOCKET_H
25987# include <sys/socket.h>
25988#elif HAVE_WS2TCPIP_H
25989# include <ws2tcpip.h>
25990#endif
25991
25992"
25993if test "x$ac_cv_type_socklen_t" = x""yes; then :
25994
067d23c9 25995else
5476a9a4
GM
25996 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5
25997$as_echo_n "checking for socklen_t equivalent... " >&6; }
25998 if test "${gl_cv_socklen_t_equiv+set}" = set; then :
25999 $as_echo_n "(cached) " >&6
26000else
26001 # Systems have either "struct sockaddr *" or
26002 # "void *" as the second argument to getpeername
26003 gl_cv_socklen_t_equiv=
26004 for arg2 in "struct sockaddr" void; do
26005 for t in int size_t "unsigned int" "long int" "unsigned long int"; do
26006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 26007/* end confdefs.h. */
5476a9a4
GM
26008#include <sys/types.h>
26009 #include <sys/socket.h>
26010
26011 int getpeername (int, $arg2 *, $t *);
f199cab1
GM
26012int
26013main ()
26014{
5476a9a4
GM
26015$t len;
26016 getpeername (0, 0, &len);
f199cab1
GM
26017 ;
26018 return 0;
26019}
3e0be4ab 26020_ACEOF
5476a9a4
GM
26021if ac_fn_c_try_compile "$LINENO"; then :
26022 gl_cv_socklen_t_equiv="$t"
067d23c9 26023fi
5476a9a4
GM
26024rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26025 test "$gl_cv_socklen_t_equiv" != "" && break
26026 done
26027 test "$gl_cv_socklen_t_equiv" != "" && break
26028 done
067d23c9 26029
5476a9a4 26030fi
067d23c9 26031
5476a9a4
GM
26032 if test "$gl_cv_socklen_t_equiv" = ""; then
26033 as_fn_error "Cannot find a type to use in place of socklen_t" "$LINENO" 5
26034 fi
26035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socklen_t_equiv" >&5
26036$as_echo "$gl_cv_socklen_t_equiv" >&6; }
26037
26038cat >>confdefs.h <<_ACEOF
26039#define socklen_t $gl_cv_socklen_t_equiv
26040_ACEOF
067d23c9 26041
f199cab1 26042fi
3e0be4ab 26043
3e0be4ab 26044
5476a9a4
GM
26045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
26046$as_echo_n "checking for ssize_t... " >&6; }
26047if test "${gt_cv_ssize_t+set}" = set; then :
f199cab1
GM
26048 $as_echo_n "(cached) " >&6
26049else
5476a9a4 26050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 26051/* end confdefs.h. */
5476a9a4 26052#include <sys/types.h>
f199cab1
GM
26053int
26054main ()
26055{
5476a9a4
GM
26056int x = sizeof (ssize_t *) + sizeof (ssize_t);
26057 return !x;
f199cab1
GM
26058 ;
26059 return 0;
26060}
26061_ACEOF
5476a9a4
GM
26062if ac_fn_c_try_compile "$LINENO"; then :
26063 gt_cv_ssize_t=yes
067d23c9 26064else
5476a9a4 26065 gt_cv_ssize_t=no
f199cab1 26066fi
5476a9a4 26067rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
067d23c9 26068fi
5476a9a4
GM
26069{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
26070$as_echo "$gt_cv_ssize_t" >&6; }
26071 if test $gt_cv_ssize_t = no; then
26072
26073$as_echo "#define ssize_t int" >>confdefs.h
26074
26075 fi
26076
26077
26078
26079
26080
5476a9a4
GM
26081 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>
26082 #include <sys/stat.h>
26083"
26084if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = x""yes; then :
26085
26086cat >>confdefs.h <<_ACEOF
26087#define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1
26088_ACEOF
26089
26090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5
26091$as_echo_n "checking whether struct stat.st_atim is of type struct timespec... " >&6; }
26092if test "${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+set}" = set; then :
f199cab1
GM
26093 $as_echo_n "(cached) " >&6
26094else
5476a9a4 26095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 26096/* end confdefs.h. */
3e0be4ab 26097
5476a9a4
GM
26098 #include <sys/types.h>
26099 #include <sys/stat.h>
26100 #if HAVE_SYS_TIME_H
26101 # include <sys/time.h>
26102 #endif
26103 #include <time.h>
26104 struct timespec ts;
26105 struct stat st;
26106
f199cab1
GM
26107int
26108main ()
26109{
5476a9a4
GM
26110
26111 st.st_atim = ts;
26112
f199cab1
GM
26113 ;
26114 return 0;
26115}
3e0be4ab 26116_ACEOF
5476a9a4
GM
26117if ac_fn_c_try_compile "$LINENO"; then :
26118 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes
f199cab1 26119else
5476a9a4 26120 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no
f199cab1 26121fi
5476a9a4 26122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
067d23c9 26123fi
5476a9a4
GM
26124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5
26125$as_echo "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; }
26126 if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
067d23c9 26127
5476a9a4 26128$as_echo "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h
067d23c9 26129
5476a9a4
GM
26130 fi
26131else
26132 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>
26133 #include <sys/stat.h>
26134"
26135if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = x""yes; then :
067d23c9 26136
5476a9a4
GM
26137cat >>confdefs.h <<_ACEOF
26138#define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1
26139_ACEOF
3e0be4ab 26140
0eb775a3 26141
3e0be4ab 26142else
5476a9a4
GM
26143 ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h>
26144 #include <sys/stat.h>
26145"
26146if test "x$ac_cv_member_struct_stat_st_atimensec" = x""yes; then :
26147
26148cat >>confdefs.h <<_ACEOF
26149#define HAVE_STRUCT_STAT_ST_ATIMENSEC 1
067d23c9 26150_ACEOF
5476a9a4
GM
26151
26152
067d23c9 26153else
5476a9a4
GM
26154 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>
26155 #include <sys/stat.h>
26156"
26157if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = x""yes; then :
26158
26159cat >>confdefs.h <<_ACEOF
26160#define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1
26161_ACEOF
26162
26163
3e0be4ab 26164fi
5476a9a4 26165
067d23c9 26166fi
5476a9a4 26167
067d23c9 26168fi
067d23c9
KY
26169
26170fi
26171
067d23c9 26172
067d23c9 26173
067d23c9 26174
067d23c9 26175
5476a9a4
GM
26176 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>
26177 #include <sys/stat.h>
26178"
26179if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = x""yes; then :
26180
26181cat >>confdefs.h <<_ACEOF
26182#define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1
26183_ACEOF
067d23c9
KY
26184
26185
f199cab1 26186else
5476a9a4
GM
26187 ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include <sys/types.h>
26188 #include <sys/stat.h>
26189"
26190if test "x$ac_cv_member_struct_stat_st_birthtimensec" = x""yes; then :
067d23c9 26191
5476a9a4
GM
26192cat >>confdefs.h <<_ACEOF
26193#define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1
26194_ACEOF
067d23c9 26195
3e0be4ab 26196
067d23c9 26197else
5476a9a4
GM
26198 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>
26199 #include <sys/stat.h>
26200"
26201if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = x""yes; then :
067d23c9 26202
5476a9a4
GM
26203cat >>confdefs.h <<_ACEOF
26204#define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1
067d23c9 26205_ACEOF
5476a9a4
GM
26206
26207
f199cab1 26208fi
5476a9a4 26209
f199cab1 26210fi
5476a9a4 26211
067d23c9 26212fi
0eb775a3 26213
0eb775a3 26214
0eb775a3 26215
5476a9a4
GM
26216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working stdalign.h" >&5
26217$as_echo_n "checking for working stdalign.h... " >&6; }
26218if test "${gl_cv_header_working_stdalign_h+set}" = set; then :
f199cab1 26219 $as_echo_n "(cached) " >&6
067d23c9 26220else
5476a9a4 26221 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 26222/* end confdefs.h. */
5476a9a4
GM
26223#include <stdalign.h>
26224 #include <stddef.h>
26225
26226 /* Test that alignof yields a result consistent with offsetof.
26227 This catches GCC bug 52023
26228 <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. */
26229 #ifdef __cplusplus
26230 template <class t> struct alignof_helper { char a; t b; };
26231 # define ao(type) offsetof (alignof_helper<type>, b)
26232 #else
26233 # define ao(type) offsetof (struct { char a; type b; }, b)
26234 #endif
26235 char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1];
26236 char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1];
26237 char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1];
26238
26239 /* Test _Alignas only on platforms where gnulib can help. */
26240 #if \
0cdca42a
GM
26241 ((defined __cplusplus && 201103 <= __cplusplus) \
26242 || __GNUC__ || __IBMC__ || __IBMCPP__ || __ICC \
5476a9a4 26243 || 0x5110 <= __SUNPRO_C || 1300 <= _MSC_VER)
6ea3f01e
GM
26244 struct alignas_test { char c; char alignas (8) alignas_8; };
26245 char test_alignas[offsetof (struct alignas_test, alignas_8) == 8
26246 ? 1 : -1];
5476a9a4 26247 #endif
067d23c9 26248
f199cab1
GM
26249int
26250main ()
26251{
5476a9a4 26252
f199cab1
GM
26253 ;
26254 return 0;
26255}
26256_ACEOF
5476a9a4
GM
26257if ac_fn_c_try_compile "$LINENO"; then :
26258 gl_cv_header_working_stdalign_h=yes
f199cab1 26259else
5476a9a4 26260 gl_cv_header_working_stdalign_h=no
f199cab1 26261fi
5476a9a4 26262rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
067d23c9 26263fi
5476a9a4
GM
26264{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdalign_h" >&5
26265$as_echo "$gl_cv_header_working_stdalign_h" >&6; }
067d23c9 26266
5476a9a4
GM
26267 if test $gl_cv_header_working_stdalign_h = yes; then
26268 STDALIGN_H=''
26269 else
26270 STDALIGN_H='stdalign.h'
f199cab1 26271 fi
0eb775a3 26272
5476a9a4
GM
26273
26274 if test -n "$STDALIGN_H"; then
26275 GL_GENERATE_STDALIGN_H_TRUE=
26276 GL_GENERATE_STDALIGN_H_FALSE='#'
f199cab1 26277else
5476a9a4
GM
26278 GL_GENERATE_STDALIGN_H_TRUE='#'
26279 GL_GENERATE_STDALIGN_H_FALSE=
0eb775a3 26280fi
0eb775a3
GM
26281
26282
26283
5476a9a4
GM
26284 STDARG_H=''
26285 NEXT_STDARG_H='<stdarg.h>'
26286 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5
26287$as_echo_n "checking for va_copy... " >&6; }
26288 if test "${gl_cv_func_va_copy+set}" = set; then :
f199cab1 26289 $as_echo_n "(cached) " >&6
5476a9a4
GM
26290else
26291
26292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26293/* end confdefs.h. */
26294#include <stdarg.h>
f199cab1
GM
26295int
26296main ()
26297{
5476a9a4
GM
26298
26299#ifndef va_copy
26300void (*func) (va_list, va_list) = va_copy;
26301#endif
26302
f199cab1
GM
26303 ;
26304 return 0;
26305}
26306_ACEOF
5476a9a4
GM
26307if ac_fn_c_try_compile "$LINENO"; then :
26308 gl_cv_func_va_copy=yes
f199cab1 26309else
5476a9a4 26310 gl_cv_func_va_copy=no
f199cab1 26311fi
5476a9a4 26312rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 26313fi
5476a9a4
GM
26314
26315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_va_copy" >&5
26316$as_echo "$gl_cv_func_va_copy" >&6; }
26317 if test $gl_cv_func_va_copy = no; then
26318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26319/* end confdefs.h. */
26320#if defined _AIX && !defined __GNUC__
26321 AIX vaccine
26322 #endif
26323
26324_ACEOF
26325if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26326 $EGREP "vaccine" >/dev/null 2>&1; then :
26327 gl_aixcc=yes
f199cab1 26328else
5476a9a4 26329 gl_aixcc=no
f199cab1 26330fi
5476a9a4 26331rm -f conftest*
0eb775a3 26332
5476a9a4
GM
26333 if test $gl_aixcc = yes; then
26334 STDARG_H=stdarg.h
0eb775a3
GM
26335
26336
5476a9a4
GM
26337
26338
26339
26340
26341
26342
26343 if test $gl_cv_have_include_next = yes; then
26344 gl_cv_next_stdarg_h='<'stdarg.h'>'
26345 else
26346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdarg.h>" >&5
26347$as_echo_n "checking absolute name of <stdarg.h>... " >&6; }
26348if test "${gl_cv_next_stdarg_h+set}" = set; then :
f199cab1
GM
26349 $as_echo_n "(cached) " >&6
26350else
5476a9a4
GM
26351
26352 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 26353/* end confdefs.h. */
5476a9a4 26354#include <stdarg.h>
0eb775a3 26355
f199cab1 26356_ACEOF
5476a9a4
GM
26357 case "$host_os" in
26358 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26359 *) gl_absname_cpp="$ac_cpp" ;;
26360 esac
26361
26362 case "$host_os" in
26363 mingw*)
26364 gl_dirsep_regex='[/\\]'
26365 ;;
26366 *)
26367 gl_dirsep_regex='\/'
26368 ;;
26369 esac
26370 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26371
26372 gl_header_literal_regex=`echo 'stdarg.h' \
26373 | sed -e "$gl_make_literal_regex_sed"`
26374 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26375 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26376 s|^/[^/]|//&|
26377 p
26378 q
26379 }'
26380 gl_cv_next_stdarg_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26381 sed -n "$gl_absolute_header_sed"`'"'
26382
26383
f199cab1 26384fi
5476a9a4
GM
26385{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdarg_h" >&5
26386$as_echo "$gl_cv_next_stdarg_h" >&6; }
26387 fi
26388 NEXT_STDARG_H=$gl_cv_next_stdarg_h
26389
26390 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26391 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26392 gl_next_as_first_directive='<'stdarg.h'>'
26393 else
26394 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26395 gl_next_as_first_directive=$gl_cv_next_stdarg_h
26396 fi
26397 NEXT_AS_FIRST_DIRECTIVE_STDARG_H=$gl_next_as_first_directive
0eb775a3
GM
26398
26399
26400
5476a9a4
GM
26401
26402 if test "$gl_cv_next_stdarg_h" = '""'; then
26403 gl_cv_next_stdarg_h='"///usr/include/stdarg.h"'
26404 NEXT_STDARG_H="$gl_cv_next_stdarg_h"
26405 fi
f199cab1 26406 else
5476a9a4
GM
26407
26408 saved_as_echo_n="$as_echo_n"
26409 as_echo_n=':'
26410 if test "${gl_cv_func___va_copy+set}" = set; then :
f199cab1
GM
26411 $as_echo_n "(cached) " >&6
26412else
0eb775a3 26413
5476a9a4
GM
26414 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26415/* end confdefs.h. */
26416#include <stdarg.h>
f199cab1
GM
26417int
26418main ()
26419{
5476a9a4
GM
26420
26421#ifndef __va_copy
26422error, bail out
26423#endif
26424
f199cab1
GM
26425 ;
26426 return 0;
26427}
26428_ACEOF
5476a9a4
GM
26429if ac_fn_c_try_compile "$LINENO"; then :
26430 gl_cv_func___va_copy=yes
f199cab1 26431else
5476a9a4 26432 gl_cv_func___va_copy=no
f199cab1 26433fi
5476a9a4 26434rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 26435fi
0eb775a3 26436
5476a9a4
GM
26437 as_echo_n="$saved_as_echo_n"
26438
26439 if test $gl_cv_func___va_copy = yes; then
26440
26441$as_echo "#define va_copy __va_copy" >>confdefs.h
26442
26443 else
0eb775a3 26444
5476a9a4
GM
26445
26446$as_echo "#define va_copy gl_va_copy" >>confdefs.h
0eb775a3 26447
f199cab1
GM
26448 fi
26449 fi
5476a9a4
GM
26450 fi
26451
26452 if test -n "$STDARG_H"; then
26453 GL_GENERATE_STDARG_H_TRUE=
26454 GL_GENERATE_STDARG_H_FALSE='#'
26455else
26456 GL_GENERATE_STDARG_H_TRUE='#'
26457 GL_GENERATE_STDARG_H_FALSE=
26458fi
26459
26460
26461
26462
26463
26464
26465 # Define two additional variables used in the Makefile substitution.
26466
26467 if test "$ac_cv_header_stdbool_h" = yes; then
26468 STDBOOL_H=''
26469 else
26470 STDBOOL_H='stdbool.h'
26471 fi
26472
26473 if test -n "$STDBOOL_H"; then
26474 GL_GENERATE_STDBOOL_H_TRUE=
26475 GL_GENERATE_STDBOOL_H_FALSE='#'
26476else
26477 GL_GENERATE_STDBOOL_H_TRUE='#'
26478 GL_GENERATE_STDBOOL_H_FALSE=
26479fi
26480
26481
26482 if test "$ac_cv_type__Bool" = yes; then
26483 HAVE__BOOL=1
26484 else
26485 HAVE__BOOL=0
26486 fi
26487
26488
26489
26490
26491
26492 STDDEF_H=
26493 if test $gt_cv_c_wchar_t = no; then
26494 HAVE_WCHAR_T=0
26495 STDDEF_H=stddef.h
26496 fi
26497 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
26498$as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
26499if test "${gl_cv_decl_null_works+set}" = set; then :
f199cab1
GM
26500 $as_echo_n "(cached) " >&6
26501else
5476a9a4 26502 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 26503/* end confdefs.h. */
5476a9a4
GM
26504#include <stddef.h>
26505 int test[2 * (sizeof NULL == sizeof (void *)) -1];
3e0be4ab 26506
f199cab1
GM
26507int
26508main ()
26509{
5476a9a4 26510
f199cab1
GM
26511 ;
26512 return 0;
26513}
26514_ACEOF
5476a9a4
GM
26515if ac_fn_c_try_compile "$LINENO"; then :
26516 gl_cv_decl_null_works=yes
f199cab1 26517else
5476a9a4 26518 gl_cv_decl_null_works=no
f199cab1 26519fi
5476a9a4 26520rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 26521fi
5476a9a4
GM
26522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
26523$as_echo "$gl_cv_decl_null_works" >&6; }
26524 if test $gl_cv_decl_null_works = no; then
26525 REPLACE_NULL=1
26526 STDDEF_H=stddef.h
26527 fi
26528
26529 if test -n "$STDDEF_H"; then
26530 GL_GENERATE_STDDEF_H_TRUE=
26531 GL_GENERATE_STDDEF_H_FALSE='#'
f199cab1 26532else
5476a9a4
GM
26533 GL_GENERATE_STDDEF_H_TRUE='#'
26534 GL_GENERATE_STDDEF_H_FALSE=
f199cab1 26535fi
3e0be4ab 26536
5476a9a4 26537 if test -n "$STDDEF_H"; then
3e0be4ab
GM
26538
26539
5476a9a4
GM
26540
26541
26542
26543
26544
26545
26546 if test $gl_cv_have_include_next = yes; then
26547 gl_cv_next_stddef_h='<'stddef.h'>'
26548 else
26549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
26550$as_echo_n "checking absolute name of <stddef.h>... " >&6; }
26551if test "${gl_cv_next_stddef_h+set}" = set; then :
067d23c9
KY
26552 $as_echo_n "(cached) " >&6
26553else
5476a9a4
GM
26554
26555 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 26556/* end confdefs.h. */
5476a9a4 26557#include <stddef.h>
f199cab1 26558
067d23c9 26559_ACEOF
5476a9a4
GM
26560 case "$host_os" in
26561 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26562 *) gl_absname_cpp="$ac_cpp" ;;
26563 esac
26564
26565 case "$host_os" in
26566 mingw*)
26567 gl_dirsep_regex='[/\\]'
26568 ;;
26569 *)
26570 gl_dirsep_regex='\/'
26571 ;;
26572 esac
26573 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26574
26575 gl_header_literal_regex=`echo 'stddef.h' \
26576 | sed -e "$gl_make_literal_regex_sed"`
26577 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26578 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26579 s|^/[^/]|//&|
26580 p
26581 q
26582 }'
26583 gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26584 sed -n "$gl_absolute_header_sed"`'"'
26585
26586
f199cab1 26587fi
5476a9a4
GM
26588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
26589$as_echo "$gl_cv_next_stddef_h" >&6; }
26590 fi
26591 NEXT_STDDEF_H=$gl_cv_next_stddef_h
26592
26593 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26594 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26595 gl_next_as_first_directive='<'stddef.h'>'
26596 else
26597 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26598 gl_next_as_first_directive=$gl_cv_next_stddef_h
26599 fi
26600 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
26601
f199cab1 26602
f199cab1 26603
f199cab1 26604
067d23c9 26605 fi
067d23c9 26606
f199cab1 26607
067d23c9 26608
067d23c9 26609
067d23c9 26610
067d23c9
KY
26611
26612
067d23c9 26613
067d23c9
KY
26614
26615
067d23c9 26616
3e0be4ab 26617
5476a9a4
GM
26618 if test $gl_cv_have_include_next = yes; then
26619 gl_cv_next_stdio_h='<'stdio.h'>'
26620 else
26621 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
26622$as_echo_n "checking absolute name of <stdio.h>... " >&6; }
26623if test "${gl_cv_next_stdio_h+set}" = set; then :
26624 $as_echo_n "(cached) " >&6
f199cab1 26625else
5476a9a4
GM
26626
26627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26628/* end confdefs.h. */
26629#include <stdio.h>
26630
f199cab1 26631_ACEOF
5476a9a4
GM
26632 case "$host_os" in
26633 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26634 *) gl_absname_cpp="$ac_cpp" ;;
26635 esac
067d23c9 26636
5476a9a4
GM
26637 case "$host_os" in
26638 mingw*)
26639 gl_dirsep_regex='[/\\]'
26640 ;;
26641 *)
26642 gl_dirsep_regex='\/'
26643 ;;
26644 esac
26645 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26646
26647 gl_header_literal_regex=`echo 'stdio.h' \
26648 | sed -e "$gl_make_literal_regex_sed"`
26649 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26650 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26651 s|^/[^/]|//&|
26652 p
26653 q
26654 }'
26655 gl_cv_next_stdio_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26656 sed -n "$gl_absolute_header_sed"`'"'
067d23c9 26657
067d23c9 26658
f199cab1 26659fi
5476a9a4
GM
26660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
26661$as_echo "$gl_cv_next_stdio_h" >&6; }
26662 fi
26663 NEXT_STDIO_H=$gl_cv_next_stdio_h
067d23c9 26664
5476a9a4
GM
26665 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26666 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26667 gl_next_as_first_directive='<'stdio.h'>'
26668 else
26669 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26670 gl_next_as_first_directive=$gl_cv_next_stdio_h
26671 fi
26672 NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
26673
26674
26675
26676
26677
26678 GNULIB_FSCANF=1
26679
26680
26681cat >>confdefs.h <<_ACEOF
26682#define GNULIB_FSCANF 1
26683_ACEOF
067d23c9 26684
067d23c9 26685
5476a9a4 26686 GNULIB_SCANF=1
f199cab1 26687
f199cab1 26688
5476a9a4
GM
26689cat >>confdefs.h <<_ACEOF
26690#define GNULIB_SCANF 1
f199cab1
GM
26691_ACEOF
26692
067d23c9 26693
5476a9a4
GM
26694 GNULIB_FGETC=1
26695 GNULIB_GETC=1
26696 GNULIB_GETCHAR=1
26697 GNULIB_FGETS=1
26698 GNULIB_FREAD=1
067d23c9 26699
067d23c9 26700
5476a9a4
GM
26701 GNULIB_FPRINTF=1
26702 GNULIB_PRINTF=1
26703 GNULIB_VFPRINTF=1
26704 GNULIB_VPRINTF=1
26705 GNULIB_FPUTC=1
26706 GNULIB_PUTC=1
26707 GNULIB_PUTCHAR=1
26708 GNULIB_FPUTS=1
26709 GNULIB_PUTS=1
26710 GNULIB_FWRITE=1
067d23c9 26711
067d23c9 26712
067d23c9 26713
067d23c9 26714
067d23c9 26715
067d23c9 26716
067d23c9 26717
067d23c9 26718
3e0be4ab
GM
26719
26720
26721
26722
26723
26724
3e0be4ab 26725
5476a9a4
GM
26726 if test $gl_cv_have_include_next = yes; then
26727 gl_cv_next_stdlib_h='<'stdlib.h'>'
26728 else
26729 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
26730$as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
26731if test "${gl_cv_next_stdlib_h+set}" = set; then :
067d23c9
KY
26732 $as_echo_n "(cached) " >&6
26733else
5476a9a4
GM
26734
26735 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 26736/* end confdefs.h. */
5476a9a4
GM
26737#include <stdlib.h>
26738
f199cab1 26739_ACEOF
5476a9a4
GM
26740 case "$host_os" in
26741 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26742 *) gl_absname_cpp="$ac_cpp" ;;
26743 esac
067d23c9 26744
5476a9a4
GM
26745 case "$host_os" in
26746 mingw*)
26747 gl_dirsep_regex='[/\\]'
26748 ;;
26749 *)
26750 gl_dirsep_regex='\/'
26751 ;;
26752 esac
26753 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26754
26755 gl_header_literal_regex=`echo 'stdlib.h' \
26756 | sed -e "$gl_make_literal_regex_sed"`
26757 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26758 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26759 s|^/[^/]|//&|
26760 p
26761 q
26762 }'
26763 gl_cv_next_stdlib_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26764 sed -n "$gl_absolute_header_sed"`'"'
3e0be4ab 26765
067d23c9 26766
f199cab1 26767fi
5476a9a4
GM
26768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
26769$as_echo "$gl_cv_next_stdlib_h" >&6; }
26770 fi
26771 NEXT_STDLIB_H=$gl_cv_next_stdlib_h
b0415a03 26772
5476a9a4
GM
26773 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26774 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26775 gl_next_as_first_directive='<'stdlib.h'>'
26776 else
26777 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26778 gl_next_as_first_directive=$gl_cv_next_stdlib_h
26779 fi
26780 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
b0415a03 26781
067d23c9 26782
067d23c9 26783
067d23c9 26784
067d23c9 26785
067d23c9 26786
067d23c9 26787
067d23c9 26788
067d23c9 26789
5476a9a4 26790 # This defines (or not) HAVE_TZNAME and HAVE_TM_ZONE.
067d23c9 26791
067d23c9 26792
067d23c9 26793
b0415a03
GM
26794
26795
ac1ca7e9 26796
0eb775a3 26797
5476a9a4 26798$as_echo "#define my_strftime nstrftime" >>confdefs.h
067d23c9 26799
067d23c9 26800
a0a61e58
GM
26801
26802
26803
3e0be4ab 26804
5476a9a4
GM
26805
26806
283c7aed
GM
26807
26808
26809
5476a9a4
GM
26810 if test "$ac_cv_have_decl_strtoimax" != yes; then
26811 HAVE_DECL_STRTOIMAX=0
26812 fi
26813
26814 if test $ac_cv_func_strtoimax = yes; then
26815 HAVE_STRTOIMAX=1
26816 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtoimax works" >&5
26817$as_echo_n "checking whether strtoimax works... " >&6; }
26818if test "${gl_cv_func_strtoimax+set}" = set; then :
f199cab1
GM
26819 $as_echo_n "(cached) " >&6
26820else
26821 if test "$cross_compiling" = yes; then :
5476a9a4
GM
26822 case "$host_os" in
26823 # Guess no on AIX 5.
26824 aix5*) gl_cv_func_strtoimax="guessing no" ;;
26825 # Guess yes otherwise.
26826 *) gl_cv_func_strtoimax="guessing yes" ;;
26827 esac
26828
f199cab1
GM
26829else
26830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26831/* end confdefs.h. */
3e0be4ab 26832
5476a9a4
GM
26833#include <errno.h>
26834#include <string.h>
26835#include <inttypes.h>
26836int main ()
26837{
26838 if (sizeof (intmax_t) > sizeof (int))
26839 {
26840 const char *s = "4294967295";
26841 char *p;
26842 intmax_t res;
26843 errno = 0;
26844 res = strtoimax (s, &p, 10);
26845 if (p != s + strlen (s))
26846 return 1;
26847 if (errno != 0)
26848 return 2;
26849 if (res != (intmax_t) 65535 * (intmax_t) 65537)
26850 return 3;
26851 }
26852 else
26853 {
26854 const char *s = "2147483647";
26855 char *p;
26856 intmax_t res;
26857 errno = 0;
26858 res = strtoimax (s, &p, 10);
26859 if (p != s + strlen (s))
26860 return 1;
26861 if (errno != 0)
26862 return 2;
26863 if (res != 2147483647)
26864 return 3;
26865 }
f199cab1
GM
26866 return 0;
26867}
5476a9a4 26868
f199cab1
GM
26869_ACEOF
26870if ac_fn_c_try_run "$LINENO"; then :
5476a9a4 26871 gl_cv_func_strtoimax=yes
f199cab1 26872else
5476a9a4 26873 gl_cv_func_strtoimax=no
f199cab1
GM
26874fi
26875rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26876 conftest.$ac_objext conftest.beam conftest.$ac_ext
067d23c9
KY
26877fi
26878
3e0be4ab 26879
f199cab1 26880fi
5476a9a4
GM
26881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtoimax" >&5
26882$as_echo "$gl_cv_func_strtoimax" >&6; }
26883 case "$gl_cv_func_strtoimax" in
26884 *no) REPLACE_STRTOIMAX=1 ;;
26885 esac
26886 else
26887 HAVE_STRTOIMAX=0
26888 fi
067d23c9 26889
a6342fc8 26890 if test $HAVE_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; then
067d23c9 26891
067d23c9 26892
067d23c9 26893
067d23c9 26894
067d23c9 26895
3e0be4ab 26896
2b1928b8
GM
26897
26898
5476a9a4
GM
26899 gl_LIBOBJS="$gl_LIBOBJS strtoimax.$ac_objext"
26900
26901
26902 ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
26903if test "x$ac_cv_have_decl_strtoll" = x""yes; then :
26904 ac_have_decl=1
f199cab1 26905else
5476a9a4 26906 ac_have_decl=0
f199cab1 26907fi
2b1928b8 26908
5476a9a4
GM
26909cat >>confdefs.h <<_ACEOF
26910#define HAVE_DECL_STRTOLL $ac_have_decl
26911_ACEOF
26912
26913
067d23c9 26914
a6342fc8 26915 fi
067d23c9 26916
3e0be4ab
GM
26917
26918
26919
3e0be4ab 26920
5476a9a4 26921 GNULIB_STRTOIMAX=1
3e0be4ab
GM
26922
26923
26924
26925
3e0be4ab
GM
26926
26927
26928
f199cab1 26929
f199cab1 26930
5476a9a4
GM
26931 if test "$ac_cv_have_decl_strtoumax" != yes; then
26932 HAVE_DECL_STRTOUMAX=0
26933 fi
067d23c9 26934
a6342fc8 26935 if test $ac_cv_func_strtoumax = no; then
0eb775a3 26936
5476a9a4
GM
26937
26938
26939
26940
26941
26942
26943
26944 gl_LIBOBJS="$gl_LIBOBJS strtoumax.$ac_objext"
26945
26946
26947 ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
26948if test "x$ac_cv_have_decl_strtoull" = x""yes; then :
26949 ac_have_decl=1
067d23c9 26950else
5476a9a4 26951 ac_have_decl=0
067d23c9 26952fi
5476a9a4
GM
26953
26954cat >>confdefs.h <<_ACEOF
26955#define HAVE_DECL_STRTOULL $ac_have_decl
26956_ACEOF
26957
26958
26959
a6342fc8 26960 fi
067d23c9 26961
067d23c9 26962
067d23c9 26963
067d23c9 26964
067d23c9 26965
5476a9a4
GM
26966 GNULIB_STRTOUMAX=1
26967
26968
26969
26970
26971
26972
26973
26974 if test $ac_cv_func_symlink = no; then
26975 HAVE_SYMLINK=0
26976 else
26977 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether symlink handles trailing slash correctly" >&5
26978$as_echo_n "checking whether symlink handles trailing slash correctly... " >&6; }
26979if test "${gl_cv_func_symlink_works+set}" = set; then :
f199cab1 26980 $as_echo_n "(cached) " >&6
5476a9a4
GM
26981else
26982 if test "$cross_compiling" = yes; then :
26983 case "$host_os" in
26984 # Guess yes on glibc systems.
26985 *-gnu*) gl_cv_func_symlink_works="guessing yes" ;;
26986 # If we don't know, assume the worst.
26987 *) gl_cv_func_symlink_works="guessing no" ;;
26988 esac
26989
f199cab1
GM
26990else
26991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26992/* end confdefs.h. */
5476a9a4
GM
26993#include <unistd.h>
26994
f199cab1
GM
26995int
26996main ()
26997{
5476a9a4
GM
26998int result = 0;
26999 if (!symlink ("a", "conftest.link/"))
27000 result |= 1;
27001 if (symlink ("conftest.f", "conftest.lnk2"))
27002 result |= 2;
27003 else if (!symlink ("a", "conftest.lnk2/"))
27004 result |= 4;
27005 return result;
067d23c9 27006
f199cab1
GM
27007 ;
27008 return 0;
27009}
27010_ACEOF
5476a9a4
GM
27011if ac_fn_c_try_run "$LINENO"; then :
27012 gl_cv_func_symlink_works=yes
f199cab1 27013else
5476a9a4 27014 gl_cv_func_symlink_works=no
f199cab1 27015fi
5476a9a4
GM
27016rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27017 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1 27018fi
067d23c9 27019
5476a9a4 27020 rm -f conftest.f conftest.link conftest.lnk2
f199cab1 27021fi
5476a9a4
GM
27022{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_symlink_works" >&5
27023$as_echo "$gl_cv_func_symlink_works" >&6; }
27024 case "$gl_cv_func_symlink_works" in
27025 *yes) ;;
27026 *)
27027 REPLACE_SYMLINK=1
27028 ;;
27029 esac
27030 fi
067d23c9 27031
a6342fc8 27032 if test $HAVE_SYMLINK = 0 || test $REPLACE_SYMLINK = 1; then
067d23c9 27033
7e723570 27034
7e723570
GM
27035
27036
dd0d840e 27037
dd0d840e
GM
27038
27039
27040
5476a9a4 27041 gl_LIBOBJS="$gl_LIBOBJS symlink.$ac_objext"
dd0d840e 27042
a6342fc8 27043 fi
dd0d840e
GM
27044
27045
d3127c14
GM
27046
27047
d3127c14 27048
5476a9a4 27049 GNULIB_SYMLINK=1
d3127c14 27050
d3127c14 27051
d3127c14
GM
27052
27053
067d23c9 27054
067d23c9 27055
d3127c14 27056
d3127c14 27057
5476a9a4
GM
27058 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/select.h> is self-contained" >&5
27059$as_echo_n "checking whether <sys/select.h> is self-contained... " >&6; }
27060if test "${gl_cv_header_sys_select_h_selfcontained+set}" = set; then :
27061 $as_echo_n "(cached) " >&6
27062else
d3127c14 27063
5476a9a4
GM
27064 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27065/* end confdefs.h. */
27066#include <sys/select.h>
27067int
27068main ()
27069{
27070struct timeval b;
27071 ;
27072 return 0;
27073}
27074_ACEOF
27075if ac_fn_c_try_compile "$LINENO"; then :
27076 gl_cv_header_sys_select_h_selfcontained=yes
27077else
27078 gl_cv_header_sys_select_h_selfcontained=no
27079fi
27080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27081 if test $gl_cv_header_sys_select_h_selfcontained = yes; then
27082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27083/* end confdefs.h. */
27084#include <sys/select.h>
27085int
27086main ()
27087{
27088int memset; int bzero;
27089 ;
27090 return 0;
27091}
3e0be4ab 27092
5476a9a4
GM
27093_ACEOF
27094if ac_fn_c_try_compile "$LINENO"; then :
27095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27096/* end confdefs.h. */
27097#include <sys/select.h>
27098int
27099main ()
27100{
dd0d840e 27101
5476a9a4
GM
27102 #undef memset
27103 #define memset nonexistent_memset
27104 extern
27105 #ifdef __cplusplus
27106 "C"
27107 #endif
27108 void *memset (void *, int, unsigned long);
27109 #undef bzero
27110 #define bzero nonexistent_bzero
27111 extern
27112 #ifdef __cplusplus
27113 "C"
27114 #endif
27115 void bzero (void *, unsigned long);
27116 fd_set fds;
27117 FD_ZERO (&fds);
3e0be4ab 27118
5476a9a4
GM
27119 ;
27120 return 0;
27121}
067d23c9 27122
5476a9a4
GM
27123_ACEOF
27124if ac_fn_c_try_link "$LINENO"; then :
dd0d840e 27125
5476a9a4
GM
27126else
27127 gl_cv_header_sys_select_h_selfcontained=no
27128fi
27129rm -f core conftest.err conftest.$ac_objext \
27130 conftest$ac_exeext conftest.$ac_ext
dd0d840e 27131
5476a9a4
GM
27132fi
27133rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27134 fi
dd0d840e 27135
5476a9a4
GM
27136fi
27137{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_select_h_selfcontained" >&5
27138$as_echo "$gl_cv_header_sys_select_h_selfcontained" >&6; }
dd0d840e 27139
dd0d840e
GM
27140
27141
dd0d840e
GM
27142
27143
dd0d840e
GM
27144
27145
27146
dd0d840e 27147
5476a9a4
GM
27148 if test $gl_cv_have_include_next = yes; then
27149 gl_cv_next_sys_select_h='<'sys/select.h'>'
27150 else
27151 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/select.h>" >&5
27152$as_echo_n "checking absolute name of <sys/select.h>... " >&6; }
27153if test "${gl_cv_next_sys_select_h+set}" = set; then :
27154 $as_echo_n "(cached) " >&6
27155else
dd0d840e 27156
5476a9a4 27157 if test $ac_cv_header_sys_select_h = yes; then
dd0d840e 27158
dd0d840e 27159
5476a9a4
GM
27160 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27161/* end confdefs.h. */
27162#include <sys/select.h>
dd0d840e 27163
5476a9a4
GM
27164_ACEOF
27165 case "$host_os" in
27166 aix*) gl_absname_cpp="$ac_cpp -C" ;;
27167 *) gl_absname_cpp="$ac_cpp" ;;
27168 esac
dd0d840e 27169
5476a9a4
GM
27170 case "$host_os" in
27171 mingw*)
27172 gl_dirsep_regex='[/\\]'
27173 ;;
27174 *)
27175 gl_dirsep_regex='\/'
27176 ;;
27177 esac
27178 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
dd0d840e 27179
5476a9a4
GM
27180 gl_header_literal_regex=`echo 'sys/select.h' \
27181 | sed -e "$gl_make_literal_regex_sed"`
27182 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27183 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27184 s|^/[^/]|//&|
27185 p
27186 q
27187 }'
27188 gl_cv_next_sys_select_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27189 sed -n "$gl_absolute_header_sed"`'"'
27190 else
27191 gl_cv_next_sys_select_h='<'sys/select.h'>'
27192 fi
067d23c9 27193
067d23c9 27194
5476a9a4
GM
27195fi
27196{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_select_h" >&5
27197$as_echo "$gl_cv_next_sys_select_h" >&6; }
27198 fi
27199 NEXT_SYS_SELECT_H=$gl_cv_next_sys_select_h
27200
27201 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27202 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27203 gl_next_as_first_directive='<'sys/select.h'>'
27204 else
27205 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27206 gl_next_as_first_directive=$gl_cv_next_sys_select_h
27207 fi
27208 NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H=$gl_next_as_first_directive
27209
27210
27211
27212
27213 if test $ac_cv_header_sys_select_h = yes; then
27214 HAVE_SYS_SELECT_H=1
27215 else
27216 HAVE_SYS_SELECT_H=0
27217 fi
067d23c9
KY
27218
27219
7e723570 27220
7e723570 27221
7e723570 27222
5476a9a4
GM
27223 if test $ac_cv_header_sys_socket_h != yes; then
27224 for ac_header in winsock2.h
27225do :
27226 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
27227if test "x$ac_cv_header_winsock2_h" = x""yes; then :
27228 cat >>confdefs.h <<_ACEOF
27229#define HAVE_WINSOCK2_H 1
27230_ACEOF
7e723570 27231
5476a9a4 27232fi
7e723570 27233
5476a9a4 27234done
7e723570 27235
5476a9a4
GM
27236 fi
27237 if test "$ac_cv_header_winsock2_h" = yes; then
27238 HAVE_WINSOCK2_H=1
27239 UNISTD_H_HAVE_WINSOCK2_H=1
27240 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
27241 else
27242 HAVE_WINSOCK2_H=0
27243 fi
7e723570
GM
27244
27245
dd0d840e 27246
dd0d840e 27247
dd0d840e
GM
27248
27249
dd0d840e 27250
dd0d840e 27251
dd0d840e
GM
27252
27253
27254
27255
27256
27257
27258
27259
dd0d840e 27260
dd0d840e 27261
dd0d840e 27262
dd0d840e 27263
5476a9a4
GM
27264 if test $gl_cv_have_include_next = yes; then
27265 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
27266 else
27267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
27268$as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
27269if test "${gl_cv_next_sys_stat_h+set}" = set; then :
27270 $as_echo_n "(cached) " >&6
27271else
dd0d840e 27272
5476a9a4 27273 if test $ac_cv_header_sys_stat_h = yes; then
dd0d840e 27274
dd0d840e 27275
5476a9a4
GM
27276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27277/* end confdefs.h. */
27278#include <sys/stat.h>
dd0d840e 27279
5476a9a4
GM
27280_ACEOF
27281 case "$host_os" in
27282 aix*) gl_absname_cpp="$ac_cpp -C" ;;
27283 *) gl_absname_cpp="$ac_cpp" ;;
27284 esac
dd0d840e 27285
5476a9a4
GM
27286 case "$host_os" in
27287 mingw*)
27288 gl_dirsep_regex='[/\\]'
27289 ;;
27290 *)
27291 gl_dirsep_regex='\/'
27292 ;;
27293 esac
27294 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
dd0d840e 27295
5476a9a4
GM
27296 gl_header_literal_regex=`echo 'sys/stat.h' \
27297 | sed -e "$gl_make_literal_regex_sed"`
27298 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27299 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27300 s|^/[^/]|//&|
27301 p
27302 q
27303 }'
27304 gl_cv_next_sys_stat_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27305 sed -n "$gl_absolute_header_sed"`'"'
27306 else
27307 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
27308 fi
dd0d840e 27309
dd0d840e 27310
5476a9a4
GM
27311fi
27312{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
27313$as_echo "$gl_cv_next_sys_stat_h" >&6; }
27314 fi
27315 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
dd0d840e 27316
5476a9a4
GM
27317 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27318 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27319 gl_next_as_first_directive='<'sys/stat.h'>'
27320 else
27321 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27322 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
27323 fi
27324 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
dd0d840e 27325
dd0d840e 27326
d3127c14 27327
d3127c14 27328
dd0d840e 27329
dd0d840e 27330
dd0d840e 27331
dd0d840e 27332
dd0d840e 27333
dd0d840e 27334
dd0d840e 27335
5476a9a4 27336 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
dd0d840e 27337
5476a9a4 27338$as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
dd0d840e 27339
5476a9a4 27340 fi
dd0d840e 27341
5476a9a4
GM
27342 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
27343 #include <sys/stat.h>
27344"
27345if test "x$ac_cv_type_nlink_t" = x""yes; then :
dd0d840e 27346
5476a9a4 27347else
dd0d840e 27348
5476a9a4 27349$as_echo "#define nlink_t int" >>confdefs.h
dd0d840e 27350
5476a9a4 27351fi
dd0d840e 27352
dd0d840e 27353
dd0d840e 27354
dd0d840e 27355
dd0d840e 27356
dd0d840e 27357
dd0d840e 27358
c9ca3f76 27359
dd0d840e 27360
dd0d840e 27361
dd0d840e 27362
c9ca3f76 27363
dd0d840e 27364
dd0d840e
GM
27365
27366
7e723570
GM
27367
27368
7e723570 27369
5476a9a4
GM
27370 ac_fn_c_check_decl "$LINENO" "localtime_r" "ac_cv_have_decl_localtime_r" "#include <time.h>
27371"
27372if test "x$ac_cv_have_decl_localtime_r" = x""yes; then :
27373 ac_have_decl=1
27374else
27375 ac_have_decl=0
27376fi
7e723570 27377
5476a9a4
GM
27378cat >>confdefs.h <<_ACEOF
27379#define HAVE_DECL_LOCALTIME_R $ac_have_decl
27380_ACEOF
7e723570 27381
5476a9a4
GM
27382 if test $ac_cv_have_decl_localtime_r = no; then
27383 HAVE_DECL_LOCALTIME_R=0
27384 fi
7e723570 27385
7e723570 27386
5476a9a4
GM
27387 if test $ac_cv_func_localtime_r = yes; then
27388 HAVE_LOCALTIME_R=1
27389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime_r is compatible with its POSIX signature" >&5
27390$as_echo_n "checking whether localtime_r is compatible with its POSIX signature... " >&6; }
27391if test "${gl_cv_time_r_posix+set}" = set; then :
27392 $as_echo_n "(cached) " >&6
27393else
27394 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27395/* end confdefs.h. */
27396#include <time.h>
7e723570
GM
27397int
27398main ()
27399{
5476a9a4
GM
27400/* We don't need to append 'restrict's to the argument types,
27401 even though the POSIX signature has the 'restrict's,
27402 since C99 says they can't affect type compatibility. */
27403 struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r;
27404 if (ptr) return 0;
27405 /* Check the return type is a pointer.
27406 On HP-UX 10 it is 'int'. */
27407 *localtime_r (0, 0);
7e723570
GM
27408 ;
27409 return 0;
27410}
5476a9a4 27411
7e723570 27412_ACEOF
5476a9a4
GM
27413if ac_fn_c_try_compile "$LINENO"; then :
27414 gl_cv_time_r_posix=yes
7e723570 27415else
5476a9a4 27416 gl_cv_time_r_posix=no
7e723570 27417fi
5476a9a4 27418rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
02bd7257 27419
5476a9a4
GM
27420fi
27421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_r_posix" >&5
27422$as_echo "$gl_cv_time_r_posix" >&6; }
27423 if test $gl_cv_time_r_posix = yes; then
27424 REPLACE_LOCALTIME_R=0
27425 else
27426 REPLACE_LOCALTIME_R=1
27427 fi
27428 else
27429 HAVE_LOCALTIME_R=0
27430 fi
02bd7257 27431
a6342fc8 27432 if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then
02bd7257
GM
27433
27434
02bd7257 27435
02bd7257 27436
02bd7257 27437
02bd7257 27438
7e723570 27439
7e723570 27440
5476a9a4
GM
27441 gl_LIBOBJS="$gl_LIBOBJS time_r.$ac_objext"
27442
27443
27444 :
7e723570 27445
a6342fc8 27446 fi
7e723570 27447
7e723570 27448
7e723570 27449
7e723570 27450
7e723570 27451
5476a9a4 27452 GNULIB_TIME_R=1
7e723570 27453
7e723570 27454
7e723570 27455
7e723570 27456
7e723570 27457
f077f61d
GM
27458
27459
27460
27461
27462
27463 LIB_TIMER_TIME=
27464
27465 gl_saved_libs=$LIBS
27466 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing timer_settime" >&5
27467$as_echo_n "checking for library containing timer_settime... " >&6; }
27468if test "${ac_cv_search_timer_settime+set}" = set; then :
27469 $as_echo_n "(cached) " >&6
27470else
27471 ac_func_search_save_LIBS=$LIBS
27472cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27473/* end confdefs.h. */
27474
27475/* Override any GCC internal prototype to avoid an error.
27476 Use char because int might match the return type of a GCC
27477 builtin and then its argument prototype would still apply. */
27478#ifdef __cplusplus
27479extern "C"
27480#endif
27481char timer_settime ();
27482int
27483main ()
27484{
27485return timer_settime ();
27486 ;
27487 return 0;
27488}
27489_ACEOF
27490for ac_lib in '' rt posix4; do
27491 if test -z "$ac_lib"; then
27492 ac_res="none required"
27493 else
27494 ac_res=-l$ac_lib
27495 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
27496 fi
27497 if ac_fn_c_try_link "$LINENO"; then :
27498 ac_cv_search_timer_settime=$ac_res
27499fi
27500rm -f core conftest.err conftest.$ac_objext \
27501 conftest$ac_exeext
27502 if test "${ac_cv_search_timer_settime+set}" = set; then :
27503 break
27504fi
27505done
27506if test "${ac_cv_search_timer_settime+set}" = set; then :
27507
27508else
27509 ac_cv_search_timer_settime=no
27510fi
27511rm conftest.$ac_ext
27512LIBS=$ac_func_search_save_LIBS
27513fi
27514{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_timer_settime" >&5
27515$as_echo "$ac_cv_search_timer_settime" >&6; }
27516ac_res=$ac_cv_search_timer_settime
27517if test "$ac_res" != no; then :
27518 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
27519 test "$ac_cv_search_timer_settime" = "none required" ||
27520 LIB_TIMER_TIME=$ac_cv_search_timer_settime
27521fi
27522
27523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27524/* end confdefs.h. */
27525
27526#include <features.h>
27527#ifdef __GNU_LIBRARY__
27528 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || (__GLIBC__ > 2)) \
27529 && !defined __UCLIBC__
27530 Thread emulation available
27531 #endif
27532#endif
27533
27534_ACEOF
27535if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27536 $EGREP "Thread" >/dev/null 2>&1; then :
27537 LIB_TIMER_TIME="$LIB_TIMER_TIME $LIBMULTITHREAD"
27538fi
27539rm -f conftest*
27540
27541 for ac_func in timer_settime
27542do :
27543 ac_fn_c_check_func "$LINENO" "timer_settime" "ac_cv_func_timer_settime"
27544if test "x$ac_cv_func_timer_settime" = x""yes; then :
27545 cat >>confdefs.h <<_ACEOF
27546#define HAVE_TIMER_SETTIME 1
27547_ACEOF
27548
27549fi
27550done
27551
27552 LIBS=$gl_saved_libs
27553
a6342fc8 27554 :
7e723570 27555
02bd7257 27556
02bd7257 27557
02bd7257 27558
02bd7257 27559
02bd7257 27560
02bd7257 27561
02bd7257 27562
dd0d840e
GM
27563
27564
27565
dd0d840e 27566
5476a9a4
GM
27567 if test $gl_cv_have_include_next = yes; then
27568 gl_cv_next_unistd_h='<'unistd.h'>'
27569 else
27570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
27571$as_echo_n "checking absolute name of <unistd.h>... " >&6; }
27572if test "${gl_cv_next_unistd_h+set}" = set; then :
27573 $as_echo_n "(cached) " >&6
27574else
dd0d840e 27575
5476a9a4 27576 if test $ac_cv_header_unistd_h = yes; then
dd0d840e 27577
dd0d840e 27578
5476a9a4 27579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d3127c14 27580/* end confdefs.h. */
5476a9a4 27581#include <unistd.h>
d3127c14 27582
5476a9a4
GM
27583_ACEOF
27584 case "$host_os" in
27585 aix*) gl_absname_cpp="$ac_cpp -C" ;;
27586 *) gl_absname_cpp="$ac_cpp" ;;
27587 esac
d3127c14 27588
5476a9a4
GM
27589 case "$host_os" in
27590 mingw*)
27591 gl_dirsep_regex='[/\\]'
27592 ;;
27593 *)
27594 gl_dirsep_regex='\/'
27595 ;;
27596 esac
27597 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
27598
27599 gl_header_literal_regex=`echo 'unistd.h' \
27600 | sed -e "$gl_make_literal_regex_sed"`
27601 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27602 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27603 s|^/[^/]|//&|
27604 p
27605 q
27606 }'
27607 gl_cv_next_unistd_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27608 sed -n "$gl_absolute_header_sed"`'"'
27609 else
27610 gl_cv_next_unistd_h='<'unistd.h'>'
27611 fi
d3127c14 27612
d3127c14 27613
c9ca3f76 27614fi
5476a9a4
GM
27615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
27616$as_echo "$gl_cv_next_unistd_h" >&6; }
27617 fi
27618 NEXT_UNISTD_H=$gl_cv_next_unistd_h
c9ca3f76 27619
5476a9a4
GM
27620 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27621 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27622 gl_next_as_first_directive='<'unistd.h'>'
27623 else
27624 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27625 gl_next_as_first_directive=$gl_cv_next_unistd_h
27626 fi
27627 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
c9ca3f76 27628
c9ca3f76 27629
c9ca3f76 27630
c9ca3f76 27631
5476a9a4
GM
27632 if test $ac_cv_header_unistd_h = yes; then
27633 HAVE_UNISTD_H=1
27634 else
27635 HAVE_UNISTD_H=0
27636 fi
c9ca3f76 27637
d3127c14 27638
dd0d840e 27639
dd0d840e 27640
d3127c14 27641
d3127c14 27642
dd0d840e
GM
27643
27644
c9ca3f76
GM
27645
27646
27647
b5591ebb
GM
27648 if test $ac_cv_have_decl_unsetenv = no; then
27649 HAVE_DECL_UNSETENV=0
27650 fi
27651 for ac_func in unsetenv
27652do :
27653 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
27654if test "x$ac_cv_func_unsetenv" = x""yes; then :
27655 cat >>confdefs.h <<_ACEOF
27656#define HAVE_UNSETENV 1
27657_ACEOF
27658
27659fi
27660done
27661
27662 if test $ac_cv_func_unsetenv = no; then
27663 HAVE_UNSETENV=0
27664 else
27665 HAVE_UNSETENV=1
27666 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5
27667$as_echo_n "checking for unsetenv() return type... " >&6; }
27668if test "${gt_cv_func_unsetenv_ret+set}" = set; then :
27669 $as_echo_n "(cached) " >&6
27670else
27671 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27672/* end confdefs.h. */
27673
27674#undef _BSD
27675#define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */
27676#include <stdlib.h>
27677extern
27678#ifdef __cplusplus
27679"C"
27680#endif
27681int unsetenv (const char *name);
27682
27683int
27684main ()
27685{
27686
27687 ;
27688 return 0;
27689}
27690_ACEOF
27691if ac_fn_c_try_compile "$LINENO"; then :
27692 gt_cv_func_unsetenv_ret='int'
27693else
27694 gt_cv_func_unsetenv_ret='void'
27695fi
27696rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27697fi
27698{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5
27699$as_echo "$gt_cv_func_unsetenv_ret" >&6; }
27700 if test $gt_cv_func_unsetenv_ret = 'void'; then
27701
27702$as_echo "#define VOID_UNSETENV 1" >>confdefs.h
27703
27704 REPLACE_UNSETENV=1
27705 fi
27706
27707 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5
27708$as_echo_n "checking whether unsetenv obeys POSIX... " >&6; }
27709if test "${gl_cv_func_unsetenv_works+set}" = set; then :
27710 $as_echo_n "(cached) " >&6
27711else
27712 if test "$cross_compiling" = yes; then :
27713 case "$host_os" in
27714 # Guess yes on glibc systems.
27715 *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
27716 # If we don't know, assume the worst.
27717 *) gl_cv_func_unsetenv_works="guessing no" ;;
27718 esac
27719
27720else
27721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27722/* end confdefs.h. */
27723
27724 #include <stdlib.h>
27725 #include <errno.h>
27726 extern char **environ;
27727
27728int
27729main ()
27730{
27731
27732 char entry1[] = "a=1";
27733 char entry2[] = "b=2";
27734 char *env[] = { entry1, entry2, NULL };
27735 if (putenv ((char *) "a=1")) return 1;
27736 if (putenv (entry2)) return 2;
27737 entry2[0] = 'a';
27738 unsetenv ("a");
27739 if (getenv ("a")) return 3;
27740 if (!unsetenv ("") || errno != EINVAL) return 4;
27741 entry2[0] = 'b';
27742 environ = env;
27743 if (!getenv ("a")) return 5;
27744 entry2[0] = 'a';
27745 unsetenv ("a");
27746 if (getenv ("a")) return 6;
27747
27748 ;
27749 return 0;
27750}
27751_ACEOF
27752if ac_fn_c_try_run "$LINENO"; then :
27753 gl_cv_func_unsetenv_works=yes
27754else
27755 gl_cv_func_unsetenv_works=no
27756fi
27757rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27758 conftest.$ac_objext conftest.beam conftest.$ac_ext
27759fi
27760
27761fi
27762{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5
27763$as_echo "$gl_cv_func_unsetenv_works" >&6; }
27764 case "$gl_cv_func_unsetenv_works" in
27765 *yes) ;;
27766 *)
27767 REPLACE_UNSETENV=1
27768 ;;
27769 esac
27770 fi
27771
27772 if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
27773
27774
27775
27776
27777
27778
27779
27780
27781 gl_LIBOBJS="$gl_LIBOBJS unsetenv.$ac_objext"
27782
27783
27784
27785
27786
27787 fi
27788
27789
27790
27791
27792
27793 GNULIB_UNSETENV=1
27794
27795
27796
27797
27798
27799
27800
27801
c9ca3f76
GM
27802
27803
c9ca3f76 27804
5476a9a4
GM
27805 if test $ac_cv_func_futimens = no && test $ac_cv_func_futimesat = yes; then
27806 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether futimesat handles NULL file" >&5
27807$as_echo_n "checking whether futimesat handles NULL file... " >&6; }
27808if test "${gl_cv_func_futimesat_works+set}" = set; then :
27809 $as_echo_n "(cached) " >&6
27810else
27811 touch conftest.file
27812 if test "$cross_compiling" = yes; then :
27813 case "$host_os" in
27814 # Guess yes on glibc systems.
27815 *-gnu*) gl_cv_func_futimesat_works="guessing yes" ;;
27816 # If we don't know, assume the worst.
27817 *) gl_cv_func_futimesat_works="guessing no" ;;
27818 esac
c9ca3f76 27819
5476a9a4
GM
27820else
27821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c9ca3f76
GM
27822/* end confdefs.h. */
27823
5476a9a4
GM
27824#include <stddef.h>
27825#include <sys/times.h>
27826#include <fcntl.h>
c9ca3f76
GM
27827
27828int
27829main ()
27830{
5476a9a4
GM
27831 int fd = open ("conftest.file", O_RDWR);
27832 if (fd < 0) return 1;
27833 if (futimesat (fd, NULL, NULL)) return 2;
c9ca3f76
GM
27834
27835 ;
27836 return 0;
27837}
27838_ACEOF
5476a9a4
GM
27839if ac_fn_c_try_run "$LINENO"; then :
27840 gl_cv_func_futimesat_works=yes
c9ca3f76 27841else
5476a9a4 27842 gl_cv_func_futimesat_works=no
c9ca3f76 27843fi
5476a9a4
GM
27844rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27845 conftest.$ac_objext conftest.beam conftest.$ac_ext
c9ca3f76
GM
27846fi
27847
5476a9a4
GM
27848 rm -f conftest.file
27849fi
27850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_futimesat_works" >&5
27851$as_echo "$gl_cv_func_futimesat_works" >&6; }
27852 case "$gl_cv_func_futimesat_works" in
27853 *yes) ;;
27854 *)
7e723570 27855
5476a9a4 27856$as_echo "#define FUTIMESAT_NULL_BUG 1" >>confdefs.h
067d23c9 27857
5476a9a4
GM
27858 ;;
27859 esac
27860 fi
dd0d840e 27861
d7ad186c 27862 gl_gnulib_enabled_260941c0e5dc67ec9e87d1fb321c300b=false
5476a9a4 27863 gl_gnulib_enabled_dosname=false
710f5812 27864 gl_gnulib_enabled_euidaccess=false
0cdca42a 27865 gl_gnulib_enabled_getdtablesize=false
710f5812 27866 gl_gnulib_enabled_getgroups=false
5476a9a4 27867 gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=false
710f5812 27868 gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1=false
d7ad186c 27869 gl_gnulib_enabled_03e0aaad4cb89ca757653bd367a6ccb7=false
5476a9a4 27870 gl_gnulib_enabled_pathmax=false
710f5812 27871 gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c=false
e412eb97 27872 gl_gnulib_enabled_secure_getenv=false
5476a9a4
GM
27873 gl_gnulib_enabled_stat=false
27874 gl_gnulib_enabled_strtoll=false
27875 gl_gnulib_enabled_strtoull=false
e412eb97 27876 gl_gnulib_enabled_tempname=false
710f5812 27877 gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec=false
d7ad186c
GM
27878 func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b ()
27879 {
27880 if ! $gl_gnulib_enabled_260941c0e5dc67ec9e87d1fb321c300b; then
27881
27882
27883
27884
27885
27886
27887
27888
27889 gl_LIBOBJS="$gl_LIBOBJS openat-proc.$ac_objext"
27890
27891 gl_gnulib_enabled_260941c0e5dc67ec9e87d1fb321c300b=true
27892 fi
27893 }
5476a9a4
GM
27894 func_gl_gnulib_m4code_dosname ()
27895 {
27896 if ! $gl_gnulib_enabled_dosname; then
27897 gl_gnulib_enabled_dosname=true
27898 fi
27899 }
710f5812 27900 func_gl_gnulib_m4code_euidaccess ()
5476a9a4 27901 {
710f5812 27902 if ! $gl_gnulib_enabled_euidaccess; then
dd0d840e 27903
d3127c14
GM
27904
27905
27906
27907
710f5812
GM
27908 for ac_func in euidaccess
27909do :
27910 ac_fn_c_check_func "$LINENO" "euidaccess" "ac_cv_func_euidaccess"
27911if test "x$ac_cv_func_euidaccess" = x""yes; then :
27912 cat >>confdefs.h <<_ACEOF
27913#define HAVE_EUIDACCESS 1
27914_ACEOF
d3127c14 27915
710f5812
GM
27916fi
27917done
d3127c14 27918
710f5812
GM
27919 if test $ac_cv_func_euidaccess = no; then
27920 HAVE_EUIDACCESS=0
27921 fi
d3127c14 27922
710f5812
GM
27923 if test $HAVE_EUIDACCESS = 0; then
27924
27925
27926
27927
27928
27929
27930
27931
27932 gl_LIBOBJS="$gl_LIBOBJS euidaccess.$ac_objext"
27933
27934
27935
27936 for ac_header in libgen.h
27937do :
27938 ac_fn_c_check_header_mongrel "$LINENO" "libgen.h" "ac_cv_header_libgen_h" "$ac_includes_default"
27939if test "x$ac_cv_header_libgen_h" = x""yes; then :
27940 cat >>confdefs.h <<_ACEOF
27941#define HAVE_LIBGEN_H 1
27942_ACEOF
27943
27944fi
27945
27946done
27947
27948
27949 ac_fn_c_check_func "$LINENO" "getgroups" "ac_cv_func_getgroups"
27950if test "x$ac_cv_func_getgroups" = x""yes; then :
27951
27952fi
27953
27954
27955 # If we don't yet have getgroups, see if it's in -lbsd.
27956 # This is reported to be necessary on an ITOS 3000WS running SEIUX 3.1.
27957 ac_save_LIBS=$LIBS
27958 if test $ac_cv_func_getgroups = no; then
27959 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getgroups in -lbsd" >&5
27960$as_echo_n "checking for getgroups in -lbsd... " >&6; }
27961if test "${ac_cv_lib_bsd_getgroups+set}" = set; then :
5476a9a4
GM
27962 $as_echo_n "(cached) " >&6
27963else
710f5812
GM
27964 ac_check_lib_save_LIBS=$LIBS
27965LIBS="-lbsd $LIBS"
27966cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d3127c14 27967/* end confdefs.h. */
d3127c14 27968
710f5812
GM
27969/* Override any GCC internal prototype to avoid an error.
27970 Use char because int might match the return type of a GCC
27971 builtin and then its argument prototype would still apply. */
27972#ifdef __cplusplus
27973extern "C"
27974#endif
27975char getgroups ();
d3127c14
GM
27976int
27977main ()
27978{
710f5812 27979return getgroups ();
d3127c14
GM
27980 ;
27981 return 0;
27982}
27983_ACEOF
710f5812
GM
27984if ac_fn_c_try_link "$LINENO"; then :
27985 ac_cv_lib_bsd_getgroups=yes
d3127c14 27986else
710f5812 27987 ac_cv_lib_bsd_getgroups=no
5476a9a4 27988fi
710f5812
GM
27989rm -f core conftest.err conftest.$ac_objext \
27990 conftest$ac_exeext conftest.$ac_ext
27991LIBS=$ac_check_lib_save_LIBS
d3127c14 27992fi
710f5812
GM
27993{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_getgroups" >&5
27994$as_echo "$ac_cv_lib_bsd_getgroups" >&6; }
27995if test "x$ac_cv_lib_bsd_getgroups" = x""yes; then :
27996 GETGROUPS_LIB=-lbsd
5476a9a4 27997fi
710f5812
GM
27998
27999 fi
28000
28001 # Run the program to test the functionality of the system-supplied
28002 # getgroups function only if there is such a function.
28003 if test $ac_cv_func_getgroups = yes; then
28004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getgroups" >&5
28005$as_echo_n "checking for working getgroups... " >&6; }
28006if test "${ac_cv_func_getgroups_works+set}" = set; then :
5476a9a4
GM
28007 $as_echo_n "(cached) " >&6
28008else
710f5812
GM
28009 if test "$cross_compiling" = yes; then :
28010 case "$host_os" in # ((
5476a9a4 28011 # Guess yes on glibc systems.
710f5812 28012 *-gnu*) ac_cv_func_getgroups_works="guessing yes" ;;
5476a9a4 28013 # If we don't know, assume the worst.
710f5812 28014 *) ac_cv_func_getgroups_works="guessing no" ;;
5476a9a4 28015 esac
d3127c14 28016
5476a9a4
GM
28017else
28018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d3127c14 28019/* end confdefs.h. */
710f5812 28020$ac_includes_default
d3127c14
GM
28021int
28022main ()
28023{
710f5812
GM
28024/* On Ultrix 4.3, getgroups (0, 0) always fails. */
28025 return getgroups (0, 0) == -1;
28026 ;
28027 return 0;
28028}
28029
28030_ACEOF
28031if ac_fn_c_try_run "$LINENO"; then :
28032 ac_cv_func_getgroups_works=yes
28033else
28034 ac_cv_func_getgroups_works=no
28035fi
28036rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28037 conftest.$ac_objext conftest.beam conftest.$ac_ext
28038fi
28039
28040
28041fi
28042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getgroups_works" >&5
28043$as_echo "$ac_cv_func_getgroups_works" >&6; }
28044 else
28045 ac_cv_func_getgroups_works=no
28046 fi
28047 case "$ac_cv_func_getgroups_works" in
28048 *yes)
28049
28050$as_echo "#define HAVE_GETGROUPS 1" >>confdefs.h
28051
28052 ;;
28053 esac
28054 LIBS=$ac_save_LIBS
28055
28056
28057 # Solaris 9 and 10 need -lgen to get the eaccess function.
28058 # Save and restore LIBS so -lgen isn't added to it. Otherwise, *all*
28059 # programs in the package would end up linked with that potentially-shared
28060 # library, inducing unnecessary run-time overhead.
28061 LIB_EACCESS=
28062
28063 gl_saved_libs=$LIBS
28064 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing eaccess" >&5
28065$as_echo_n "checking for library containing eaccess... " >&6; }
28066if test "${ac_cv_search_eaccess+set}" = set; then :
28067 $as_echo_n "(cached) " >&6
28068else
28069 ac_func_search_save_LIBS=$LIBS
28070cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28071/* end confdefs.h. */
28072
28073/* Override any GCC internal prototype to avoid an error.
28074 Use char because int might match the return type of a GCC
28075 builtin and then its argument prototype would still apply. */
28076#ifdef __cplusplus
28077extern "C"
28078#endif
28079char eaccess ();
28080int
28081main ()
28082{
28083return eaccess ();
28084 ;
28085 return 0;
28086}
28087_ACEOF
28088for ac_lib in '' gen; do
28089 if test -z "$ac_lib"; then
28090 ac_res="none required"
28091 else
28092 ac_res=-l$ac_lib
28093 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
28094 fi
28095 if ac_fn_c_try_link "$LINENO"; then :
28096 ac_cv_search_eaccess=$ac_res
28097fi
28098rm -f core conftest.err conftest.$ac_objext \
28099 conftest$ac_exeext
28100 if test "${ac_cv_search_eaccess+set}" = set; then :
28101 break
28102fi
28103done
28104if test "${ac_cv_search_eaccess+set}" = set; then :
28105
28106else
28107 ac_cv_search_eaccess=no
28108fi
28109rm conftest.$ac_ext
28110LIBS=$ac_func_search_save_LIBS
28111fi
28112{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_eaccess" >&5
28113$as_echo "$ac_cv_search_eaccess" >&6; }
28114ac_res=$ac_cv_search_eaccess
28115if test "$ac_res" != no; then :
28116 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
28117 test "$ac_cv_search_eaccess" = "none required" ||
28118 LIB_EACCESS=$ac_cv_search_eaccess
28119fi
28120
28121 for ac_func in eaccess
28122do :
28123 ac_fn_c_check_func "$LINENO" "eaccess" "ac_cv_func_eaccess"
28124if test "x$ac_cv_func_eaccess" = x""yes; then :
28125 cat >>confdefs.h <<_ACEOF
28126#define HAVE_EACCESS 1
28127_ACEOF
28128
28129fi
28130done
28131
28132 LIBS=$gl_saved_libs
28133
28134 fi
28135
28136
28137
28138
28139
28140 GNULIB_EUIDACCESS=1
28141
28142
28143
28144
28145
28146 gl_gnulib_enabled_euidaccess=true
28147 if test $HAVE_EUIDACCESS = 0; then
28148 func_gl_gnulib_m4code_a9786850e999ae65a836a6041e8e5ed1
28149 fi
28150 func_gl_gnulib_m4code_6099e9737f757db36c47fa9d9f02e88c
28151 if test $HAVE_EUIDACCESS = 0; then
28152 func_gl_gnulib_m4code_stat
28153 fi
28154 fi
28155 }
0cdca42a
GM
28156 func_gl_gnulib_m4code_getdtablesize ()
28157 {
28158 if ! $gl_gnulib_enabled_getdtablesize; then
28159
28160
28161
28162 if test $ac_cv_func_getdtablesize != yes; then
28163 HAVE_GETDTABLESIZE=0
28164 fi
28165
28166 if test $HAVE_GETDTABLESIZE = 0; then
28167
28168
28169
28170
28171
28172
28173
28174
28175 gl_LIBOBJS="$gl_LIBOBJS getdtablesize.$ac_objext"
28176
28177 :
28178 fi
28179
28180
28181
28182
28183
28184 GNULIB_GETDTABLESIZE=1
28185
28186
28187
28188
28189
28190 gl_gnulib_enabled_getdtablesize=true
28191 fi
28192 }
710f5812
GM
28193 func_gl_gnulib_m4code_getgroups ()
28194 {
28195 if ! $gl_gnulib_enabled_getgroups; then
28196
28197
28198
28199
28200
28201 ac_fn_c_check_func "$LINENO" "getgroups" "ac_cv_func_getgroups"
28202if test "x$ac_cv_func_getgroups" = x""yes; then :
28203
28204fi
28205
28206
28207 # If we don't yet have getgroups, see if it's in -lbsd.
28208 # This is reported to be necessary on an ITOS 3000WS running SEIUX 3.1.
28209 ac_save_LIBS=$LIBS
28210 if test $ac_cv_func_getgroups = no; then
28211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getgroups in -lbsd" >&5
28212$as_echo_n "checking for getgroups in -lbsd... " >&6; }
28213if test "${ac_cv_lib_bsd_getgroups+set}" = set; then :
28214 $as_echo_n "(cached) " >&6
28215else
28216 ac_check_lib_save_LIBS=$LIBS
28217LIBS="-lbsd $LIBS"
28218cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28219/* end confdefs.h. */
28220
28221/* Override any GCC internal prototype to avoid an error.
28222 Use char because int might match the return type of a GCC
28223 builtin and then its argument prototype would still apply. */
28224#ifdef __cplusplus
28225extern "C"
28226#endif
28227char getgroups ();
28228int
28229main ()
28230{
28231return getgroups ();
28232 ;
28233 return 0;
28234}
28235_ACEOF
28236if ac_fn_c_try_link "$LINENO"; then :
28237 ac_cv_lib_bsd_getgroups=yes
28238else
28239 ac_cv_lib_bsd_getgroups=no
28240fi
28241rm -f core conftest.err conftest.$ac_objext \
28242 conftest$ac_exeext conftest.$ac_ext
28243LIBS=$ac_check_lib_save_LIBS
28244fi
28245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_getgroups" >&5
28246$as_echo "$ac_cv_lib_bsd_getgroups" >&6; }
28247if test "x$ac_cv_lib_bsd_getgroups" = x""yes; then :
28248 GETGROUPS_LIB=-lbsd
28249fi
28250
28251 fi
28252
28253 # Run the program to test the functionality of the system-supplied
28254 # getgroups function only if there is such a function.
28255 if test $ac_cv_func_getgroups = yes; then
28256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getgroups" >&5
28257$as_echo_n "checking for working getgroups... " >&6; }
28258if test "${ac_cv_func_getgroups_works+set}" = set; then :
28259 $as_echo_n "(cached) " >&6
28260else
28261 if test "$cross_compiling" = yes; then :
28262 case "$host_os" in # ((
28263 # Guess yes on glibc systems.
28264 *-gnu*) ac_cv_func_getgroups_works="guessing yes" ;;
28265 # If we don't know, assume the worst.
28266 *) ac_cv_func_getgroups_works="guessing no" ;;
28267 esac
28268
28269else
28270 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28271/* end confdefs.h. */
28272$ac_includes_default
28273int
28274main ()
28275{
28276/* On Ultrix 4.3, getgroups (0, 0) always fails. */
28277 return getgroups (0, 0) == -1;
28278 ;
28279 return 0;
28280}
28281
28282_ACEOF
28283if ac_fn_c_try_run "$LINENO"; then :
28284 ac_cv_func_getgroups_works=yes
28285else
28286 ac_cv_func_getgroups_works=no
28287fi
28288rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28289 conftest.$ac_objext conftest.beam conftest.$ac_ext
28290fi
28291
28292
28293fi
28294{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getgroups_works" >&5
28295$as_echo "$ac_cv_func_getgroups_works" >&6; }
28296 else
28297 ac_cv_func_getgroups_works=no
28298 fi
28299 case "$ac_cv_func_getgroups_works" in
28300 *yes)
28301
28302$as_echo "#define HAVE_GETGROUPS 1" >>confdefs.h
28303
28304 ;;
28305 esac
28306 LIBS=$ac_save_LIBS
28307
28308 if test $ac_cv_func_getgroups != yes; then
28309 HAVE_GETGROUPS=0
28310 else
28311 if test "$ac_cv_type_getgroups" != gid_t \
28312 || { case "$ac_cv_func_getgroups_works" in
28313 *yes) false;;
28314 *) true;;
28315 esac
28316 }; then
28317 REPLACE_GETGROUPS=1
28318
28319$as_echo "#define GETGROUPS_ZERO_BUG 1" >>confdefs.h
28320
28321 else
28322 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getgroups handles negative values" >&5
28323$as_echo_n "checking whether getgroups handles negative values... " >&6; }
28324if test "${gl_cv_func_getgroups_works+set}" = set; then :
28325 $as_echo_n "(cached) " >&6
28326else
28327 if test "$cross_compiling" = yes; then :
28328 case "$host_os" in
28329 # Guess yes on glibc systems.
28330 *-gnu*) gl_cv_func_getgroups_works="guessing yes" ;;
28331 # If we don't know, assume the worst.
28332 *) gl_cv_func_getgroups_works="guessing no" ;;
28333 esac
28334
28335else
28336 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28337/* end confdefs.h. */
28338$ac_includes_default
28339int
28340main ()
28341{
28342int size = getgroups (0, 0);
28343 gid_t *list = malloc (size * sizeof *list);
28344 return getgroups (-1, list) != -1;
28345 ;
28346 return 0;
28347}
28348_ACEOF
28349if ac_fn_c_try_run "$LINENO"; then :
28350 gl_cv_func_getgroups_works=yes
28351else
28352 gl_cv_func_getgroups_works=no
28353fi
28354rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28355 conftest.$ac_objext conftest.beam conftest.$ac_ext
28356fi
28357
28358fi
28359{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getgroups_works" >&5
28360$as_echo "$gl_cv_func_getgroups_works" >&6; }
28361 case "$gl_cv_func_getgroups_works" in
28362 *yes) ;;
28363 *) REPLACE_GETGROUPS=1 ;;
28364 esac
28365 fi
28366 fi
28367 test -n "$GETGROUPS_LIB" && LIBS="$GETGROUPS_LIB $LIBS"
28368
28369 if test $HAVE_GETGROUPS = 0 || test $REPLACE_GETGROUPS = 1; then
28370
28371
28372
28373
28374
28375
28376
28377
28378 gl_LIBOBJS="$gl_LIBOBJS getgroups.$ac_objext"
28379
28380 fi
28381
28382
28383
28384
28385
28386 GNULIB_GETGROUPS=1
28387
28388
28389
28390
28391
28392 gl_gnulib_enabled_getgroups=true
28393 fi
28394 }
28395 func_gl_gnulib_m4code_be453cec5eecf5731a274f2de7f2db36 ()
28396 {
28397 if ! $gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36; then
28398
28399
28400 gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=true
28401 fi
28402 }
28403 func_gl_gnulib_m4code_a9786850e999ae65a836a6041e8e5ed1 ()
28404 {
28405 if ! $gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1; then
28406
28407
28408
28409
28410
28411 ac_fn_c_check_func "$LINENO" "group_member" "ac_cv_func_group_member"
28412if test "x$ac_cv_func_group_member" = x""yes; then :
28413
28414else
28415
28416 HAVE_GROUP_MEMBER=0
28417
28418fi
28419
28420
28421 if test $HAVE_GROUP_MEMBER = 0; then
28422
28423
28424
28425
28426
28427
28428
28429
28430 gl_LIBOBJS="$gl_LIBOBJS group-member.$ac_objext"
28431
28432
28433
28434
28435 fi
28436
28437
28438
28439
28440
28441 GNULIB_GROUP_MEMBER=1
28442
28443
28444
28445
28446
28447 gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1=true
28448 if test $HAVE_GROUP_MEMBER = 0; then
28449 func_gl_gnulib_m4code_getgroups
28450 fi
28451 if test $HAVE_GROUP_MEMBER = 0; then
28452 func_gl_gnulib_m4code_682e609604ccaac6be382e4ee3a4eaec
28453 fi
28454 fi
28455 }
d7ad186c
GM
28456 func_gl_gnulib_m4code_03e0aaad4cb89ca757653bd367a6ccb7 ()
28457 {
28458 if ! $gl_gnulib_enabled_03e0aaad4cb89ca757653bd367a6ccb7; then
28459 gl_gnulib_enabled_03e0aaad4cb89ca757653bd367a6ccb7=true
28460 fi
28461 }
710f5812
GM
28462 func_gl_gnulib_m4code_pathmax ()
28463 {
28464 if ! $gl_gnulib_enabled_pathmax; then
28465
28466
28467
28468 gl_gnulib_enabled_pathmax=true
28469 fi
28470 }
28471 func_gl_gnulib_m4code_6099e9737f757db36c47fa9d9f02e88c ()
28472 {
28473 if ! $gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c; then
28474 gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c=true
28475 fi
28476 }
e412eb97
GM
28477 func_gl_gnulib_m4code_secure_getenv ()
28478 {
28479 if ! $gl_gnulib_enabled_secure_getenv; then
28480
28481
28482
28483
28484
28485 if test $ac_cv_func_secure_getenv = no; then
28486 HAVE_SECURE_GETENV=0
28487 fi
28488
28489 if test $HAVE_SECURE_GETENV = 0; then
28490
28491
28492
28493
28494
28495
28496
28497
28498 gl_LIBOBJS="$gl_LIBOBJS secure_getenv.$ac_objext"
28499
28500
28501 for ac_func in __secure_getenv
28502do :
28503 ac_fn_c_check_func "$LINENO" "__secure_getenv" "ac_cv_func___secure_getenv"
28504if test "x$ac_cv_func___secure_getenv" = x""yes; then :
28505 cat >>confdefs.h <<_ACEOF
28506#define HAVE___SECURE_GETENV 1
28507_ACEOF
28508
28509fi
28510done
28511
28512 if test $ac_cv_func___secure_getenv = no; then
28513 for ac_func in issetugid
28514do :
28515 ac_fn_c_check_func "$LINENO" "issetugid" "ac_cv_func_issetugid"
28516if test "x$ac_cv_func_issetugid" = x""yes; then :
28517 cat >>confdefs.h <<_ACEOF
28518#define HAVE_ISSETUGID 1
28519_ACEOF
28520
28521fi
28522done
28523
28524 fi
28525
28526 fi
28527
28528
28529
28530
28531
28532 GNULIB_SECURE_GETENV=1
28533
28534
28535
28536
28537
28538 gl_gnulib_enabled_secure_getenv=true
28539 fi
28540 }
710f5812
GM
28541 func_gl_gnulib_m4code_stat ()
28542 {
28543 if ! $gl_gnulib_enabled_stat; then
28544
28545
28546
28547 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5
28548$as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; }
28549if test "${gl_cv_func_stat_dir_slash+set}" = set; then :
28550 $as_echo_n "(cached) " >&6
28551else
28552 if test "$cross_compiling" = yes; then :
28553 case $host_os in
28554 mingw*) gl_cv_func_stat_dir_slash="guessing no";;
28555 *) gl_cv_func_stat_dir_slash="guessing yes";;
28556 esac
28557else
28558 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28559/* end confdefs.h. */
28560#include <sys/stat.h>
28561
28562int
28563main ()
28564{
28565struct stat st; return stat (".", &st) != stat ("./", &st);
28566 ;
28567 return 0;
28568}
28569_ACEOF
28570if ac_fn_c_try_run "$LINENO"; then :
28571 gl_cv_func_stat_dir_slash=yes
28572else
28573 gl_cv_func_stat_dir_slash=no
28574fi
28575rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28576 conftest.$ac_objext conftest.beam conftest.$ac_ext
28577fi
28578
28579fi
28580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5
28581$as_echo "$gl_cv_func_stat_dir_slash" >&6; }
28582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
28583$as_echo_n "checking whether stat handles trailing slashes on files... " >&6; }
28584if test "${gl_cv_func_stat_file_slash+set}" = set; then :
28585 $as_echo_n "(cached) " >&6
28586else
28587 touch conftest.tmp
28588 # Assume that if we have lstat, we can also check symlinks.
28589 if test $ac_cv_func_lstat = yes; then
28590 ln -s conftest.tmp conftest.lnk
28591 fi
28592 if test "$cross_compiling" = yes; then :
28593 case "$host_os" in
28594 # Guess yes on glibc systems.
28595 *-gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
28596 # If we don't know, assume the worst.
28597 *) gl_cv_func_stat_file_slash="guessing no" ;;
28598 esac
28599
28600else
28601 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28602/* end confdefs.h. */
28603#include <sys/stat.h>
28604
28605int
28606main ()
28607{
28608int result = 0;
28609 struct stat st;
28610 if (!stat ("conftest.tmp/", &st))
28611 result |= 1;
28612#if HAVE_LSTAT
28613 if (!stat ("conftest.lnk/", &st))
5476a9a4
GM
28614 result |= 2;
28615#endif
28616 return result;
d3127c14
GM
28617
28618 ;
28619 return 0;
28620}
28621_ACEOF
5476a9a4
GM
28622if ac_fn_c_try_run "$LINENO"; then :
28623 gl_cv_func_stat_file_slash=yes
d3127c14 28624else
5476a9a4
GM
28625 gl_cv_func_stat_file_slash=no
28626fi
28627rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28628 conftest.$ac_objext conftest.beam conftest.$ac_ext
d3127c14 28629fi
d3127c14 28630
5476a9a4
GM
28631 rm -f conftest.tmp conftest.lnk
28632fi
28633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
28634$as_echo "$gl_cv_func_stat_file_slash" >&6; }
28635 case $gl_cv_func_stat_dir_slash in
28636 *no) REPLACE_STAT=1
d3127c14 28637
5476a9a4
GM
28638$as_echo "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h
28639;;
28640 esac
28641 case $gl_cv_func_stat_file_slash in
28642 *no) REPLACE_STAT=1
d3127c14 28643
5476a9a4
GM
28644$as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
28645;;
28646 esac
d3127c14 28647
a6342fc8 28648 if test $REPLACE_STAT = 1; then
d3127c14 28649
dd0d840e 28650
dd0d840e 28651
dd0d840e 28652
dd0d840e 28653
dd0d840e 28654
067d23c9
KY
28655
28656
5476a9a4 28657 gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
067d23c9 28658
45d4966b 28659 :
a6342fc8 28660 fi
067d23c9 28661
dd0d840e
GM
28662
28663
dd0d840e 28664
dd0d840e 28665
5476a9a4 28666 GNULIB_STAT=1
dd0d840e 28667
067d23c9
KY
28668
28669
28670
28671
5476a9a4
GM
28672 gl_gnulib_enabled_stat=true
28673 if test $REPLACE_STAT = 1; then
28674 func_gl_gnulib_m4code_dosname
28675 fi
28676 if test $REPLACE_STAT = 1; then
28677 func_gl_gnulib_m4code_pathmax
28678 fi
5476a9a4
GM
28679 fi
28680 }
28681 func_gl_gnulib_m4code_strtoll ()
28682 {
28683 if ! $gl_gnulib_enabled_strtoll; then
067d23c9
KY
28684
28685
28686
5476a9a4
GM
28687 if test "$ac_cv_type_long_long_int" = yes; then
28688 for ac_func in strtoll
28689do :
28690 ac_fn_c_check_func "$LINENO" "strtoll" "ac_cv_func_strtoll"
28691if test "x$ac_cv_func_strtoll" = x""yes; then :
28692 cat >>confdefs.h <<_ACEOF
28693#define HAVE_STRTOLL 1
28694_ACEOF
067d23c9 28695
5476a9a4
GM
28696fi
28697done
067d23c9 28698
5476a9a4
GM
28699 if test $ac_cv_func_strtoll = no; then
28700 HAVE_STRTOLL=0
28701 fi
28702 fi
067d23c9 28703
a6342fc8 28704 if test $HAVE_STRTOLL = 0; then
067d23c9
KY
28705
28706
28707
067d23c9
KY
28708
28709
28710
28711
28712
5476a9a4 28713 gl_LIBOBJS="$gl_LIBOBJS strtoll.$ac_objext"
067d23c9
KY
28714
28715
5476a9a4 28716 :
067d23c9 28717
a6342fc8 28718 fi
067d23c9
KY
28719
28720
28721
067d23c9 28722
067d23c9 28723
5476a9a4 28724 GNULIB_STRTOLL=1
067d23c9 28725
397f7161 28726
067d23c9
KY
28727
28728
067d23c9 28729
5476a9a4
GM
28730 gl_gnulib_enabled_strtoll=true
28731 fi
28732 }
28733 func_gl_gnulib_m4code_strtoull ()
28734 {
28735 if ! $gl_gnulib_enabled_strtoull; then
067d23c9 28736
067d23c9 28737
067d23c9 28738
5476a9a4
GM
28739 if test "$ac_cv_type_unsigned_long_long_int" = yes; then
28740 for ac_func in strtoull
28741do :
28742 ac_fn_c_check_func "$LINENO" "strtoull" "ac_cv_func_strtoull"
28743if test "x$ac_cv_func_strtoull" = x""yes; then :
28744 cat >>confdefs.h <<_ACEOF
28745#define HAVE_STRTOULL 1
28746_ACEOF
067d23c9 28747
f199cab1 28748fi
5476a9a4 28749done
067d23c9 28750
5476a9a4
GM
28751 if test $ac_cv_func_strtoull = no; then
28752 HAVE_STRTOULL=0
28753 fi
28754 fi
067d23c9 28755
a6342fc8 28756 if test $HAVE_STRTOULL = 0; then
067d23c9
KY
28757
28758
067d23c9 28759
067d23c9 28760
067d23c9 28761
067d23c9 28762
067d23c9 28763
067d23c9 28764
5476a9a4 28765 gl_LIBOBJS="$gl_LIBOBJS strtoull.$ac_objext"
067d23c9 28766
067d23c9 28767
5476a9a4 28768 :
067d23c9 28769
a6342fc8 28770 fi
067d23c9
KY
28771
28772
3e0be4ab 28773
3e0be4ab 28774
067d23c9 28775
5476a9a4 28776 GNULIB_STRTOULL=1
067d23c9 28777
a0a61e58 28778
067d23c9 28779
067d23c9
KY
28780
28781
5476a9a4
GM
28782 gl_gnulib_enabled_strtoull=true
28783 fi
28784 }
e412eb97
GM
28785 func_gl_gnulib_m4code_tempname ()
28786 {
28787 if ! $gl_gnulib_enabled_tempname; then
28788
28789
28790 :
28791
28792
28793 gl_gnulib_enabled_tempname=true
28794 func_gl_gnulib_m4code_secure_getenv
28795 fi
28796 }
710f5812
GM
28797 func_gl_gnulib_m4code_682e609604ccaac6be382e4ee3a4eaec ()
28798 {
28799 if ! $gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec; then
28800 gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec=true
28801 fi
28802 }
d7ad186c
GM
28803 if test $HAVE_FACCESSAT = 0; then
28804 func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b
28805 fi
710f5812
GM
28806 if test $HAVE_FACCESSAT = 0; then
28807 func_gl_gnulib_m4code_dosname
28808 fi
28809 if test $HAVE_FACCESSAT = 0; then
28810 func_gl_gnulib_m4code_euidaccess
28811 fi
d7ad186c
GM
28812 if test $HAVE_FACCESSAT = 0; then
28813 func_gl_gnulib_m4code_03e0aaad4cb89ca757653bd367a6ccb7
28814 fi
0cdca42a
GM
28815 if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
28816 func_gl_gnulib_m4code_getdtablesize
28817 fi
d7ad186c
GM
28818 if test $HAVE_FDOPENDIR = 0; then
28819 func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b
28820 fi
28821 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
28822 func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b
28823 fi
28824 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
28825 func_gl_gnulib_m4code_dosname
28826 fi
28827 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
28828 func_gl_gnulib_m4code_03e0aaad4cb89ca757653bd367a6ccb7
28829 fi
5476a9a4
GM
28830 if test $REPLACE_GETOPT = 1; then
28831 func_gl_gnulib_m4code_be453cec5eecf5731a274f2de7f2db36
28832 fi
28833 if test $REPLACE_LSTAT = 1; then
28834 func_gl_gnulib_m4code_dosname
28835 fi
28836 if test $REPLACE_LSTAT = 1; then
28837 func_gl_gnulib_m4code_stat
28838 fi
e412eb97
GM
28839 if test $HAVE_MKOSTEMP = 0; then
28840 func_gl_gnulib_m4code_tempname
28841 fi
5476a9a4
GM
28842 if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
28843 func_gl_gnulib_m4code_stat
28844 fi
d7ad186c
GM
28845 if test $HAVE_READLINKAT = 0; then
28846 func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b
28847 fi
28848 if test $HAVE_READLINKAT = 0; then
28849 func_gl_gnulib_m4code_dosname
28850 fi
28851 if test $HAVE_READLINKAT = 0; then
28852 func_gl_gnulib_m4code_03e0aaad4cb89ca757653bd367a6ccb7
28853 fi
5476a9a4
GM
28854 if { test $HAVE_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; } && test $ac_cv_type_long_long_int = yes; then
28855 func_gl_gnulib_m4code_strtoll
28856 fi
5476a9a4
GM
28857 if test $ac_cv_func_strtoumax = no && test $ac_cv_type_unsigned_long_long_int = yes; then
28858 func_gl_gnulib_m4code_strtoull
28859 fi
067d23c9 28860
d7ad186c
GM
28861 if $gl_gnulib_enabled_260941c0e5dc67ec9e87d1fb321c300b; then
28862 gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_TRUE=
28863 gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_FALSE='#'
28864else
28865 gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_TRUE='#'
28866 gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_FALSE=
28867fi
28868
5476a9a4
GM
28869 if $gl_gnulib_enabled_dosname; then
28870 gl_GNULIB_ENABLED_dosname_TRUE=
28871 gl_GNULIB_ENABLED_dosname_FALSE='#'
28872else
28873 gl_GNULIB_ENABLED_dosname_TRUE='#'
28874 gl_GNULIB_ENABLED_dosname_FALSE=
28875fi
067d23c9 28876
710f5812
GM
28877 if $gl_gnulib_enabled_euidaccess; then
28878 gl_GNULIB_ENABLED_euidaccess_TRUE=
28879 gl_GNULIB_ENABLED_euidaccess_FALSE='#'
28880else
28881 gl_GNULIB_ENABLED_euidaccess_TRUE='#'
28882 gl_GNULIB_ENABLED_euidaccess_FALSE=
28883fi
28884
0cdca42a
GM
28885 if $gl_gnulib_enabled_getdtablesize; then
28886 gl_GNULIB_ENABLED_getdtablesize_TRUE=
28887 gl_GNULIB_ENABLED_getdtablesize_FALSE='#'
28888else
28889 gl_GNULIB_ENABLED_getdtablesize_TRUE='#'
28890 gl_GNULIB_ENABLED_getdtablesize_FALSE=
28891fi
28892
710f5812
GM
28893 if $gl_gnulib_enabled_getgroups; then
28894 gl_GNULIB_ENABLED_getgroups_TRUE=
28895 gl_GNULIB_ENABLED_getgroups_FALSE='#'
28896else
28897 gl_GNULIB_ENABLED_getgroups_TRUE='#'
28898 gl_GNULIB_ENABLED_getgroups_FALSE=
28899fi
28900
5476a9a4
GM
28901 if $gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36; then
28902 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE=
28903 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE='#'
28904else
28905 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE='#'
28906 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE=
28907fi
067d23c9 28908
710f5812
GM
28909 if $gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1; then
28910 gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_TRUE=
28911 gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_FALSE='#'
28912else
28913 gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_TRUE='#'
28914 gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_FALSE=
28915fi
28916
d7ad186c
GM
28917 if $gl_gnulib_enabled_03e0aaad4cb89ca757653bd367a6ccb7; then
28918 gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_TRUE=
28919 gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_FALSE='#'
28920else
28921 gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_TRUE='#'
28922 gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_FALSE=
28923fi
28924
5476a9a4
GM
28925 if $gl_gnulib_enabled_pathmax; then
28926 gl_GNULIB_ENABLED_pathmax_TRUE=
28927 gl_GNULIB_ENABLED_pathmax_FALSE='#'
28928else
28929 gl_GNULIB_ENABLED_pathmax_TRUE='#'
28930 gl_GNULIB_ENABLED_pathmax_FALSE=
28931fi
067d23c9 28932
710f5812
GM
28933 if $gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c; then
28934 gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_TRUE=
28935 gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_FALSE='#'
28936else
28937 gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_TRUE='#'
28938 gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_FALSE=
28939fi
28940
e412eb97
GM
28941 if $gl_gnulib_enabled_secure_getenv; then
28942 gl_GNULIB_ENABLED_secure_getenv_TRUE=
28943 gl_GNULIB_ENABLED_secure_getenv_FALSE='#'
28944else
28945 gl_GNULIB_ENABLED_secure_getenv_TRUE='#'
28946 gl_GNULIB_ENABLED_secure_getenv_FALSE=
28947fi
28948
5476a9a4
GM
28949 if $gl_gnulib_enabled_stat; then
28950 gl_GNULIB_ENABLED_stat_TRUE=
28951 gl_GNULIB_ENABLED_stat_FALSE='#'
28952else
28953 gl_GNULIB_ENABLED_stat_TRUE='#'
28954 gl_GNULIB_ENABLED_stat_FALSE=
28955fi
067d23c9 28956
5476a9a4
GM
28957 if $gl_gnulib_enabled_strtoll; then
28958 gl_GNULIB_ENABLED_strtoll_TRUE=
28959 gl_GNULIB_ENABLED_strtoll_FALSE='#'
28960else
28961 gl_GNULIB_ENABLED_strtoll_TRUE='#'
28962 gl_GNULIB_ENABLED_strtoll_FALSE=
28963fi
067d23c9 28964
5476a9a4
GM
28965 if $gl_gnulib_enabled_strtoull; then
28966 gl_GNULIB_ENABLED_strtoull_TRUE=
28967 gl_GNULIB_ENABLED_strtoull_FALSE='#'
28968else
28969 gl_GNULIB_ENABLED_strtoull_TRUE='#'
28970 gl_GNULIB_ENABLED_strtoull_FALSE=
f199cab1 28971fi
067d23c9 28972
e412eb97
GM
28973 if $gl_gnulib_enabled_tempname; then
28974 gl_GNULIB_ENABLED_tempname_TRUE=
28975 gl_GNULIB_ENABLED_tempname_FALSE='#'
28976else
28977 gl_GNULIB_ENABLED_tempname_TRUE='#'
28978 gl_GNULIB_ENABLED_tempname_FALSE=
28979fi
28980
710f5812
GM
28981 if $gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec; then
28982 gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_TRUE=
28983 gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_FALSE='#'
28984else
28985 gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_TRUE='#'
28986 gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_FALSE=
28987fi
28988
5476a9a4 28989 # End of code from modules
067d23c9 28990
067d23c9 28991
067d23c9 28992
067d23c9 28993
f199cab1 28994
f199cab1
GM
28995
28996
067d23c9 28997
5476a9a4
GM
28998
28999 gltests_libdeps=
29000 gltests_ltlibdeps=
067d23c9 29001
067d23c9 29002
067d23c9
KY
29003
29004
067d23c9
KY
29005
29006
3e0be4ab 29007
3e0be4ab 29008
3e0be4ab 29009
5476a9a4
GM
29010 gl_source_base='tests'
29011 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 29012
5476a9a4 29013 gl_module_indicator_condition=$gltests_WITNESS
3e0be4ab
GM
29014
29015
29016
29017
29018
067d23c9
KY
29019
29020
29021
3e0be4ab 29022
3e0be4ab 29023
5476a9a4
GM
29024 LIBGNU_LIBDEPS="$gl_libdeps"
29025
29026 LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
29027
067d23c9 29028
5476a9a4
GM
29029CFLAGS=$SAVE_CFLAGS
29030LIBS=$SAVE_LIBS
067d23c9 29031
7c61eaab
GM
29032if test "${opsys}" = "mingw32"; then
29033 CPPFLAGS="$CPPFLAGS -DUSE_CRT_DLL=1 -I $srcdir/nt/inc"
29034 # Remove unneeded switches from the value of CC that goes to Makefiles
29035 CC=`echo $CC | sed -e "s,$GCC_TEST_OPTIONS,,"`
29036fi
29037
067d23c9
KY
29038case "$opsys" in
29039 aix4-2) LD_SWITCH_SYSTEM_TEMACS="-Wl,-bnodelcsect" ;;
29040
29041 darwin)
29042 ## The -headerpad option tells ld (see man page) to leave room at the
29043 ## end of the header for adding load commands. Needed for dumping.
29044 ## 0x690 is the total size of 30 segment load commands (at 56
29045 ## each); under Cocoa 31 commands are required.
29046 if test "$HAVE_NS" = "yes"; then
29047 libs_nsgui="-framework AppKit"
cc70ee9b
GM
29048 if test "$NS_IMPL_COCOA" = "yes"; then
29049 libs_nsgui="$libs_nsgui -framework IOKit"
29050 fi
067d23c9
KY
29051 headerpad_extra=6C8
29052 else
29053 libs_nsgui=
29054 headerpad_extra=690
29055 fi
85cf5029 29056 LD_SWITCH_SYSTEM_TEMACS="-fno-pie -prebind $libs_nsgui -Xlinker -headerpad -Xlinker $headerpad_extra"
067d23c9
KY
29057
29058 ## This is here because src/Makefile.in did some extra fiddling around
2407788f
GM
29059 ## with LD_SWITCH_SYSTEM. It seems cleaner to put this in
29060 ## LD_SWITCH_SYSTEM_TEMACS instead,
067d23c9
KY
29061 test "x$LD_SWITCH_SYSTEM" = "x" && test "x$GCC" != "xyes" && \
29062 LD_SWITCH_SYSTEM_TEMACS="-X $LD_SWITCH_SYSTEM_TEMACS"
29063 ;;
29064
ae629dae
GM
29065 ## LD_SWITCH_X_SITE_RPATH is a -rpath option saying where to
29066 ## find X at run-time.
29067 ## When handled by cpp, this was in LD_SWITCH_SYSTEM. However, at the
29068 ## point where configure sourced the s/*.h file, LD_SWITCH_X_SITE_RPATH
067d23c9
KY
29069 ## had not yet been defined and was expanded to null. Hence LD_SWITCH_SYSTEM
29070 ## had different values in configure (in ac_link) and src/Makefile.in.
29071 ## It seems clearer therefore to put this piece in LD_SWITCH_SYSTEM_TEMACS.
ae629dae 29072 gnu*) LD_SWITCH_SYSTEM_TEMACS="\$(LD_SWITCH_X_SITE_RPATH)" ;;
067d23c9 29073
7c61eaab
GM
29074 mingw32)
29075 ## MinGW64 does not prepend an underscore to symbols, so we must
29076 ## pass a different -entry switch to linker. FIXME: It is better
29077 ## to make the entry points the same by changing unexw32.c.
29078 case "$canonical" in
29079 x86_64-*-*) LD_SWITCH_SYSTEM_TEMACS="-Wl,-stack,0x00800000 -Wl,-heap,0x00100000 -Wl,-image-base,0x01000000 -Wl,-entry,_start -Wl,-Map,./temacs.map" ;;
29080 *) LD_SWITCH_SYSTEM_TEMACS="-Wl,-stack,0x00800000 -Wl,-heap,0x00100000 -Wl,-image-base,0x01000000 -Wl,-entry,__start -Wl,-Map,./temacs.map" ;;
29081 esac
29082 ;;
29083
3766b742
GM
29084 openbsd) LD_SWITCH_SYSTEM_TEMACS='-nopie' ;;
29085
067d23c9
KY
29086 *) LD_SWITCH_SYSTEM_TEMACS= ;;
29087esac
29088
26256684
GM
29089if test x$ac_enable_profiling != x ; then
29090 case $opsys in
29091 *freebsd | gnu-linux) ;;
29092 *) LD_SWITCH_SYSTEM_TEMACS="$LD_SWITCH_SYSTEM_TEMACS -pg" ;;
29093 esac
29094fi
29095
992ec28a
GM
29096LD_SWITCH_SYSTEM_TEMACS="$LDFLAGS_NOCOMBRELOC $LD_SWITCH_SYSTEM_TEMACS"
29097
067d23c9
KY
29098
29099
7c61eaab
GM
29100## MinGW-specific post-link processing of temacs.
29101TEMACS_POST_LINK=":"
29102ADDSECTION=
29103EMACS_HEAPSIZE=
29104if test "${opsys}" = "mingw32"; then
29105 TEMACS_POST_LINK="\$(MINGW_TEMACS_POST_LINK)"
29106 ADDSECTION="../nt/addsection\$(EXEEXT)"
29107 ## Preload heap size of temacs.exe in MB.
29108 case "$canonical" in
29109 x86_64-*-*) EMACS_HEAPSIZE=42 ;;
29110 *) EMACS_HEAPSIZE=27 ;;
29111 esac
29112fi
29113
29114
29115
29116
29117
42dcba54
GM
29118## Common for all window systems
29119if test "$window_system" != "none"; then
067d23c9
KY
29120
29121$as_echo "#define HAVE_WINDOW_SYSTEM 1" >>confdefs.h
29122
42dcba54 29123 WINDOW_SYSTEM_OBJ="fontset.o fringe.o image.o"
067d23c9
KY
29124fi
29125
29126
29127
29128
42dcba54 29129
067d23c9
KY
29130#### Report on what we decided to do.
29131#### Report GTK as a toolkit, even if it doesn't use Xt.
29132#### It makes printing result more understandable as using GTK sets
29133#### toolkit_scroll_bars to yes by default.
29134if test "${HAVE_GTK}" = "yes"; then
a732eace 29135 USE_X_TOOLKIT="$USE_GTK_TOOLKIT"
067d23c9
KY
29136fi
29137
28237e48
GM
29138if test $USE_ACL -ne 0; then
29139 acl_summary="yes $LIB_ACL"
29140else
29141 acl_summary=no
29142fi
29143
067d23c9
KY
29144echo "
29145Configured for \`${canonical}'.
29146
29147 Where should the build process find the source code? ${srcdir}
067d23c9
KY
29148 What compiler should emacs be built with? ${CC} ${CFLAGS}
29149 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
29150 Should Emacs use a relocating allocator for buffers? ${REL_ALLOC}
29151 Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers
29152 What window system should Emacs use? ${window_system}
29153 What toolkit should Emacs use? ${USE_X_TOOLKIT}"
29154
29155if test -n "${x_includes}"; then
29156echo " Where do we find X Windows header files? ${x_includes}"
29157else
29158echo " Where do we find X Windows header files? Standard dirs"
29159fi
29160if test -n "${x_libraries}"; then
29161echo " Where do we find X Windows libraries? ${x_libraries}"
29162else
29163echo " Where do we find X Windows libraries? Standard dirs"
29164fi
29165
29166echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}"
29167echo " Does Emacs use -lXpm? ${HAVE_XPM}"
29168echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
29169echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
29170echo " Does Emacs use a gif library? ${HAVE_GIF} $LIBGIF"
29171echo " Does Emacs use -lpng? ${HAVE_PNG}"
29172echo " Does Emacs use -lrsvg-2? ${HAVE_RSVG}"
29173echo " Does Emacs use imagemagick? ${HAVE_IMAGEMAGICK}"
29174
9dabd86d
GM
29175echo " Does Emacs support sound? ${HAVE_SOUND}"
29176
067d23c9
KY
29177echo " Does Emacs use -lgpm? ${HAVE_GPM}"
29178echo " Does Emacs use -ldbus? ${HAVE_DBUS}"
29179echo " Does Emacs use -lgconf? ${HAVE_GCONF}"
f527bd02 29180echo " Does Emacs use GSettings? ${HAVE_GSETTINGS}"
0f55a32e 29181echo " Does Emacs use a file notification library? ${NOTIFY_SUMMARY}"
28237e48 29182echo " Does Emacs use access control lists? ${acl_summary}"
067d23c9 29183echo " Does Emacs use -lselinux? ${HAVE_LIBSELINUX}"
27f5a136 29184echo " Does Emacs use -lgnutls? ${HAVE_GNUTLS}"
067d23c9
KY
29185echo " Does Emacs use -lxml2? ${HAVE_LIBXML2}"
29186
29187echo " Does Emacs use -lfreetype? ${HAVE_FREETYPE}"
29188echo " Does Emacs use -lm17n-flt? ${HAVE_M17N_FLT}"
29189echo " Does Emacs use -lotf? ${HAVE_LIBOTF}"
29190echo " Does Emacs use -lxft? ${HAVE_XFT}"
7a67e06b 29191echo " Does Emacs directly use zlib? ${HAVE_ZLIB}"
067d23c9
KY
29192
29193echo " Does Emacs use toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
29194echo
29195
eb39a72d
GM
29196if test -n "${EMACSDATA}"; then
29197 echo " Environment variable EMACSDATA set to: $EMACSDATA"
29198fi
29199if test -n "${EMACSDOC}"; then
29200 echo " Environment variable EMACSDOC set to: $EMACSDOC"
29201fi
29202
067d23c9
KY
29203echo
29204
29205if test "$HAVE_NS" = "yes"; then
29206 echo
3d0788a9 29207 echo "You must run \"${MAKE-make} install\" in order to test the built application.
067d23c9
KY
29208The installed application will go to nextstep/Emacs.app and can be
29209run or moved from there."
29210 if test "$EN_NS_SELF_CONTAINED" = "yes"; then
29211 echo "The application will be fully self-contained."
29212 else
29213 echo "The lisp resources for the application will be installed under ${prefix}.
3d0788a9 29214You may need to run \"${MAKE-make} install\" with sudo. The application will fail
067d23c9
KY
29215to run if these resources are not installed."
29216 fi
29217 echo
29218fi
29219
031fabfc
GM
29220if test "${opsys}" = "cygwin"; then
29221 case `uname -r` in
29222 1.5.*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: building Emacs on Cygwin 1.5 is not supported." >&5
29223$as_echo "$as_me: WARNING: building Emacs on Cygwin 1.5 is not supported." >&2;}
29224 echo
29225 ;;
29226 esac
29227fi
067d23c9
KY
29228
29229# Remove any trailing slashes in these variables.
29230test "${prefix}" != NONE &&
29231 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
29232test "${exec_prefix}" != NONE &&
29233 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
29234
bb7dce39
GM
29235if test "$HAVE_NS" = "yes"; then
29236 if test "$NS_IMPL_GNUSTEP" = yes; then
29237 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"
29238
2f342695 29239 ns_check_file=Resources/Info-gnustep.plist
bb7dce39
GM
29240 else
29241 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"
29242
2f342695 29243 ns_check_file=Contents/Info.plist
bb7dce39 29244 fi
2f342695 29245
bb7dce39
GM
29246fi
29247
7c61eaab 29248SUBDIR_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 29249
7c61eaab 29250ac_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 29251
a877df06 29252
73b78882 29253opt_makefile=test/automated/Makefile
a877df06 29254
b5591ebb 29255if test -f "$srcdir/$opt_makefile.in"; then
73b78882 29256 SUBDIR_MAKEFILES="$SUBDIR_MAKEFILES $opt_makefile"
56ade35c 29257 ac_config_files="$ac_config_files test/automated/Makefile"
a877df06 29258
56ade35c 29259fi
73b78882 29260
40b65096
GM
29261
29262opt_makefile=admin/unidata/Makefile
29263
b5591ebb 29264if test -f "$srcdir/$opt_makefile.in"; then
40b65096
GM
29265 SUBDIR_MAKEFILES="$SUBDIR_MAKEFILES $opt_makefile"
29266 ac_config_files="$ac_config_files admin/unidata/Makefile"
29267
29268fi
29269
29270
56ade35c 29271SUBDIR_MAKEFILES_IN=`echo " ${SUBDIR_MAKEFILES}" | sed -e 's| | $(srcdir)/|g' -e 's|Makefile|Makefile.in|g'`
73b78882 29272
067d23c9 29273
9411886d 29274
4c15c0f2 29275ac_config_commands="$ac_config_commands src/epaths.h"
9411886d
PE
29276
29277
4c15c0f2 29278ac_config_commands="$ac_config_commands src/.gdbinit"
9411886d 29279
067d23c9
KY
29280
29281cat >confcache <<\_ACEOF
29282# This file is a shell script that caches the results of configure
29283# tests run on this system so they can be shared between configure
29284# scripts and configure runs, see configure's option --config-cache.
29285# It is not useful on other systems. If it contains results you don't
29286# want to keep, you may remove or edit it.
29287#
29288# config.status only pays attention to the cache file if you give it
29289# the --recheck option to rerun configure.
29290#
29291# `ac_cv_env_foo' variables (set or unset) will be overridden when
29292# loading this file, other *unset* `ac_cv_foo' will be assigned the
29293# following values.
29294
29295_ACEOF
29296
29297# The following way of writing the cache mishandles newlines in values,
29298# but we know of no workaround that is simple, portable, and efficient.
29299# So, we kill variables containing newlines.
29300# Ultrix sh set writes to stderr and can't be redirected directly,
29301# and sets the high bit in the cache file unless we assign to the vars.
29302(
29303 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
29304 eval ac_val=\$$ac_var
29305 case $ac_val in #(
29306 *${as_nl}*)
29307 case $ac_var in #(
29308 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
29309$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
29310 esac
29311 case $ac_var in #(
29312 _ | IFS | as_nl) ;; #(
29313 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
29314 *) { eval $ac_var=; unset $ac_var;} ;;
29315 esac ;;
29316 esac
29317 done
29318
29319 (set) 2>&1 |
29320 case $as_nl`(ac_space=' '; set) 2>&1` in #(
29321 *${as_nl}ac_space=\ *)
29322 # `set' does not quote correctly, so add quotes: double-quote
29323 # substitution turns \\\\ into \\, and sed turns \\ into \.
29324 sed -n \
29325 "s/'/'\\\\''/g;
29326 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
29327 ;; #(
29328 *)
29329 # `set' quotes correctly as required by POSIX, so do not add quotes.
29330 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
29331 ;;
29332 esac |
29333 sort
29334) |
29335 sed '
29336 /^ac_cv_env_/b end
29337 t clear
29338 :clear
29339 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
29340 t end
29341 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
29342 :end' >>confcache
29343if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
29344 if test -w "$cache_file"; then
a9bec17c 29345 test "x$cache_file" != "x/dev/null" &&
067d23c9
KY
29346 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
29347$as_echo "$as_me: updating cache $cache_file" >&6;}
a9bec17c 29348 cat confcache >$cache_file
067d23c9
KY
29349 else
29350 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
29351$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
29352 fi
29353fi
29354rm -f confcache
29355
29356test "x$prefix" = xNONE && prefix=$ac_default_prefix
29357# Let make expand exec_prefix.
29358test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
29359
29360DEFS=-DHAVE_CONFIG_H
29361
29362ac_libobjs=
29363ac_ltlibobjs=
29364for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
29365 # 1. Remove the extension, and $U if already installed.
29366 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
29367 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
29368 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
29369 # will be set to the directory where LIBOBJS objects are built.
29370 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
29371 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
29372done
29373LIBOBJS=$ac_libobjs
29374
29375LTLIBOBJS=$ac_ltlibobjs
29376
29377
743c80a7
PE
29378 if test -n "$EXEEXT"; then
29379 am__EXEEXT_TRUE=
29380 am__EXEEXT_FALSE='#'
29381else
29382 am__EXEEXT_TRUE='#'
29383 am__EXEEXT_FALSE=
29384fi
29385
29386if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
a9bec17c 29387 as_fn_error "conditional \"AMDEP\" was never defined.
743c80a7
PE
29388Usually this means the macro was only invoked conditionally." "$LINENO" 5
29389fi
29390if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
a9bec17c 29391 as_fn_error "conditional \"am__fastdepCC\" was never defined.
743c80a7
PE
29392Usually this means the macro was only invoked conditionally." "$LINENO" 5
29393fi
7c61eaab
GM
29394if test -z "${BUILDING_FOR_WINDOWSNT_TRUE}" && test -z "${BUILDING_FOR_WINDOWSNT_FALSE}"; then
29395 as_fn_error "conditional \"BUILDING_FOR_WINDOWSNT\" was never defined.
29396Usually this means the macro was only invoked conditionally." "$LINENO" 5
29397fi
743c80a7 29398if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
a9bec17c 29399 as_fn_error "conditional \"GL_COND_LIBTOOL\" was never defined.
743c80a7
PE
29400Usually this means the macro was only invoked conditionally." "$LINENO" 5
29401fi
4fc2b746 29402if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
a9bec17c 29403 as_fn_error "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
4fc2b746
GM
29404Usually this means the macro was only invoked conditionally." "$LINENO" 5
29405fi
743c80a7 29406
3a019ab4
GM
29407if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then
29408 as_fn_error "conditional \"GL_GENERATE_ERRNO_H\" was never defined.
29409Usually this means the macro was only invoked conditionally." "$LINENO" 5
29410fi
8966cbff
GM
29411if test -z "${GL_GENERATE_EXECINFO_H_TRUE}" && test -z "${GL_GENERATE_EXECINFO_H_FALSE}"; then
29412 as_fn_error "conditional \"GL_GENERATE_EXECINFO_H\" was never defined.
29413Usually this means the macro was only invoked conditionally." "$LINENO" 5
29414fi
4fda9c95 29415if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
a9bec17c 29416 as_fn_error "conditional \"GL_GENERATE_STDINT_H\" was never defined.
4fda9c95
GM
29417Usually this means the macro was only invoked conditionally." "$LINENO" 5
29418fi
0eb775a3
GM
29419if test -z "${GL_GENERATE_STDALIGN_H_TRUE}" && test -z "${GL_GENERATE_STDALIGN_H_FALSE}"; then
29420 as_fn_error "conditional \"GL_GENERATE_STDALIGN_H\" was never defined.
29421Usually this means the macro was only invoked conditionally." "$LINENO" 5
29422fi
6d153f56 29423if test -z "${GL_GENERATE_STDARG_H_TRUE}" && test -z "${GL_GENERATE_STDARG_H_FALSE}"; then
a9bec17c 29424 as_fn_error "conditional \"GL_GENERATE_STDARG_H\" was never defined.
6d153f56
GM
29425Usually this means the macro was only invoked conditionally." "$LINENO" 5
29426fi
6c051bab 29427if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
a9bec17c 29428 as_fn_error "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
6c051bab
GM
29429Usually this means the macro was only invoked conditionally." "$LINENO" 5
29430fi
29431if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
a9bec17c 29432 as_fn_error "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
6c051bab
GM
29433Usually this means the macro was only invoked conditionally." "$LINENO" 5
29434fi
d7ad186c
GM
29435if test -z "${gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_TRUE}" && test -z "${gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_FALSE}"; then
29436 as_fn_error "conditional \"gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b\" was never defined.
29437Usually this means the macro was only invoked conditionally." "$LINENO" 5
29438fi
6d153f56 29439if test -z "${gl_GNULIB_ENABLED_dosname_TRUE}" && test -z "${gl_GNULIB_ENABLED_dosname_FALSE}"; then
a9bec17c 29440 as_fn_error "conditional \"gl_GNULIB_ENABLED_dosname\" was never defined.
6d153f56
GM
29441Usually this means the macro was only invoked conditionally." "$LINENO" 5
29442fi
710f5812
GM
29443if test -z "${gl_GNULIB_ENABLED_euidaccess_TRUE}" && test -z "${gl_GNULIB_ENABLED_euidaccess_FALSE}"; then
29444 as_fn_error "conditional \"gl_GNULIB_ENABLED_euidaccess\" was never defined.
29445Usually this means the macro was only invoked conditionally." "$LINENO" 5
29446fi
0cdca42a
GM
29447if test -z "${gl_GNULIB_ENABLED_getdtablesize_TRUE}" && test -z "${gl_GNULIB_ENABLED_getdtablesize_FALSE}"; then
29448 as_fn_error "conditional \"gl_GNULIB_ENABLED_getdtablesize\" was never defined.
29449Usually this means the macro was only invoked conditionally." "$LINENO" 5
29450fi
710f5812
GM
29451if test -z "${gl_GNULIB_ENABLED_getgroups_TRUE}" && test -z "${gl_GNULIB_ENABLED_getgroups_FALSE}"; then
29452 as_fn_error "conditional \"gl_GNULIB_ENABLED_getgroups\" was never defined.
29453Usually this means the macro was only invoked conditionally." "$LINENO" 5
29454fi
6d153f56 29455if test -z "${gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE}" && test -z "${gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE}"; then
a9bec17c 29456 as_fn_error "conditional \"gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36\" was never defined.
6d153f56
GM
29457Usually this means the macro was only invoked conditionally." "$LINENO" 5
29458fi
710f5812
GM
29459if test -z "${gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_TRUE}" && test -z "${gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_FALSE}"; then
29460 as_fn_error "conditional \"gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1\" was never defined.
29461Usually this means the macro was only invoked conditionally." "$LINENO" 5
29462fi
d7ad186c
GM
29463if test -z "${gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_TRUE}" && test -z "${gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_FALSE}"; then
29464 as_fn_error "conditional \"gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7\" was never defined.
29465Usually this means the macro was only invoked conditionally." "$LINENO" 5
29466fi
a0a61e58
GM
29467if test -z "${gl_GNULIB_ENABLED_pathmax_TRUE}" && test -z "${gl_GNULIB_ENABLED_pathmax_FALSE}"; then
29468 as_fn_error "conditional \"gl_GNULIB_ENABLED_pathmax\" was never defined.
29469Usually this means the macro was only invoked conditionally." "$LINENO" 5
29470fi
710f5812
GM
29471if test -z "${gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_TRUE}" && test -z "${gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_FALSE}"; then
29472 as_fn_error "conditional \"gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c\" was never defined.
29473Usually this means the macro was only invoked conditionally." "$LINENO" 5
29474fi
e412eb97
GM
29475if test -z "${gl_GNULIB_ENABLED_secure_getenv_TRUE}" && test -z "${gl_GNULIB_ENABLED_secure_getenv_FALSE}"; then
29476 as_fn_error "conditional \"gl_GNULIB_ENABLED_secure_getenv\" was never defined.
29477Usually this means the macro was only invoked conditionally." "$LINENO" 5
29478fi
6d153f56 29479if test -z "${gl_GNULIB_ENABLED_stat_TRUE}" && test -z "${gl_GNULIB_ENABLED_stat_FALSE}"; then
a9bec17c 29480 as_fn_error "conditional \"gl_GNULIB_ENABLED_stat\" was never defined.
6d153f56
GM
29481Usually this means the macro was only invoked conditionally." "$LINENO" 5
29482fi
3e0be4ab 29483if test -z "${gl_GNULIB_ENABLED_strtoll_TRUE}" && test -z "${gl_GNULIB_ENABLED_strtoll_FALSE}"; then
a9bec17c 29484 as_fn_error "conditional \"gl_GNULIB_ENABLED_strtoll\" was never defined.
3e0be4ab
GM
29485Usually this means the macro was only invoked conditionally." "$LINENO" 5
29486fi
6d153f56 29487if test -z "${gl_GNULIB_ENABLED_strtoull_TRUE}" && test -z "${gl_GNULIB_ENABLED_strtoull_FALSE}"; then
a9bec17c 29488 as_fn_error "conditional \"gl_GNULIB_ENABLED_strtoull\" was never defined.
6d153f56
GM
29489Usually this means the macro was only invoked conditionally." "$LINENO" 5
29490fi
e412eb97
GM
29491if test -z "${gl_GNULIB_ENABLED_tempname_TRUE}" && test -z "${gl_GNULIB_ENABLED_tempname_FALSE}"; then
29492 as_fn_error "conditional \"gl_GNULIB_ENABLED_tempname\" was never defined.
29493Usually this means the macro was only invoked conditionally." "$LINENO" 5
29494fi
710f5812
GM
29495if test -z "${gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_TRUE}" && test -z "${gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_FALSE}"; then
29496 as_fn_error "conditional \"gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec\" was never defined.
29497Usually this means the macro was only invoked conditionally." "$LINENO" 5
6c051bab 29498fi
942f733f 29499
743c80a7
PE
29500 gl_libobjs=
29501 gl_ltlibobjs=
29502 if test -n "$gl_LIBOBJS"; then
29503 # Remove the extension.
29504 sed_drop_objext='s/\.o$//;s/\.obj$//'
29505 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
29506 gl_libobjs="$gl_libobjs $i.$ac_objext"
29507 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
29508 done
29509 fi
29510 gl_LIBOBJS=$gl_libobjs
29511
29512 gl_LTLIBOBJS=$gl_ltlibobjs
29513
29514
29515
29516 gltests_libobjs=
29517 gltests_ltlibobjs=
29518 if test -n "$gltests_LIBOBJS"; then
29519 # Remove the extension.
29520 sed_drop_objext='s/\.o$//;s/\.obj$//'
29521 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
29522 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
29523 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
29524 done
29525 fi
29526 gltests_LIBOBJS=$gltests_libobjs
29527
29528 gltests_LTLIBOBJS=$gltests_ltlibobjs
29529
067d23c9
KY
29530
29531
a9bec17c 29532: ${CONFIG_STATUS=./config.status}
067d23c9
KY
29533ac_write_fail=0
29534ac_clean_files_save=$ac_clean_files
29535ac_clean_files="$ac_clean_files $CONFIG_STATUS"
29536{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
29537$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
29538as_write_fail=0
29539cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
29540#! $SHELL
29541# Generated by $as_me.
29542# Run this file to recreate the current configuration.
29543# Compiler output produced by configure, useful for debugging
29544# configure, is in config.log if it exists.
29545
29546debug=false
29547ac_cs_recheck=false
29548ac_cs_silent=false
29549
29550SHELL=\${CONFIG_SHELL-$SHELL}
29551export SHELL
29552_ASEOF
29553cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
29554## -------------------- ##
29555## M4sh Initialization. ##
29556## -------------------- ##
29557
29558# Be more Bourne compatible
29559DUALCASE=1; export DUALCASE # for MKS sh
29560if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
29561 emulate sh
29562 NULLCMD=:
29563 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
29564 # is contrary to our usage. Disable this feature.
29565 alias -g '${1+"$@"}'='"$@"'
29566 setopt NO_GLOB_SUBST
29567else
29568 case `(set -o) 2>/dev/null` in #(
29569 *posix*) :
29570 set -o posix ;; #(
29571 *) :
29572 ;;
29573esac
29574fi
29575
29576
29577as_nl='
29578'
29579export as_nl
29580# Printing a long string crashes Solaris 7 /usr/bin/printf.
29581as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
29582as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
29583as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
29584# Prefer a ksh shell builtin over an external printf program on Solaris,
29585# but without wasting forks for bash or zsh.
29586if test -z "$BASH_VERSION$ZSH_VERSION" \
29587 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
29588 as_echo='print -r --'
29589 as_echo_n='print -rn --'
29590elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
29591 as_echo='printf %s\n'
29592 as_echo_n='printf %s'
29593else
29594 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
29595 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
29596 as_echo_n='/usr/ucb/echo -n'
29597 else
29598 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
29599 as_echo_n_body='eval
29600 arg=$1;
29601 case $arg in #(
29602 *"$as_nl"*)
29603 expr "X$arg" : "X\\(.*\\)$as_nl";
29604 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
29605 esac;
29606 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
29607 '
29608 export as_echo_n_body
29609 as_echo_n='sh -c $as_echo_n_body as_echo'
29610 fi
29611 export as_echo_body
29612 as_echo='sh -c $as_echo_body as_echo'
29613fi
29614
29615# The user is always right.
29616if test "${PATH_SEPARATOR+set}" != set; then
29617 PATH_SEPARATOR=:
29618 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
29619 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
29620 PATH_SEPARATOR=';'
29621 }
29622fi
29623
29624
29625# IFS
29626# We need space, tab and new line, in precisely that order. Quoting is
29627# there to prevent editors from complaining about space-tab.
29628# (If _AS_PATH_WALK were called with IFS unset, it would disable word
29629# splitting by setting IFS to empty value.)
29630IFS=" "" $as_nl"
29631
29632# Find who we are. Look in the path if we contain no directory separator.
29633case $0 in #((
29634 *[\\/]* ) as_myself=$0 ;;
29635 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29636for as_dir in $PATH
29637do
29638 IFS=$as_save_IFS
29639 test -z "$as_dir" && as_dir=.
29640 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
29641 done
29642IFS=$as_save_IFS
29643
29644 ;;
29645esac
29646# We did not find ourselves, most probably we were run as `sh COMMAND'
29647# in which case we are not to be found in the path.
29648if test "x$as_myself" = x; then
29649 as_myself=$0
29650fi
29651if test ! -f "$as_myself"; then
29652 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
29653 exit 1
29654fi
29655
29656# Unset variables that we do not need and which cause bugs (e.g. in
29657# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
29658# suppresses any "Segmentation fault" message there. '((' could
29659# trigger a bug in pdksh 5.2.14.
29660for as_var in BASH_ENV ENV MAIL MAILPATH
29661do eval test x\${$as_var+set} = xset \
29662 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
29663done
29664PS1='$ '
29665PS2='> '
29666PS4='+ '
29667
29668# NLS nuisances.
29669LC_ALL=C
29670export LC_ALL
29671LANGUAGE=C
29672export LANGUAGE
29673
29674# CDPATH.
29675(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
29676
29677
a9bec17c
GM
29678# as_fn_error ERROR [LINENO LOG_FD]
29679# ---------------------------------
067d23c9
KY
29680# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
29681# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
a9bec17c 29682# script with status $?, using 1 if that was 0.
067d23c9
KY
29683as_fn_error ()
29684{
a9bec17c
GM
29685 as_status=$?; test $as_status -eq 0 && as_status=1
29686 if test "$3"; then
29687 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
29688 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
067d23c9 29689 fi
a9bec17c 29690 $as_echo "$as_me: error: $1" >&2
067d23c9
KY
29691 as_fn_exit $as_status
29692} # as_fn_error
29693
29694
29695# as_fn_set_status STATUS
29696# -----------------------
29697# Set $? to STATUS, without forking.
29698as_fn_set_status ()
29699{
29700 return $1
29701} # as_fn_set_status
29702
29703# as_fn_exit STATUS
29704# -----------------
29705# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
29706as_fn_exit ()
29707{
29708 set +e
29709 as_fn_set_status $1
29710 exit $1
29711} # as_fn_exit
29712
29713# as_fn_unset VAR
29714# ---------------
29715# Portably unset VAR.
29716as_fn_unset ()
29717{
29718 { eval $1=; unset $1;}
29719}
29720as_unset=as_fn_unset
29721# as_fn_append VAR VALUE
29722# ----------------------
29723# Append the text in VALUE to the end of the definition contained in VAR. Take
29724# advantage of any shell optimizations that allow amortized linear growth over
29725# repeated appends, instead of the typical quadratic growth present in naive
29726# implementations.
29727if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
29728 eval 'as_fn_append ()
29729 {
29730 eval $1+=\$2
29731 }'
29732else
29733 as_fn_append ()
29734 {
29735 eval $1=\$$1\$2
29736 }
29737fi # as_fn_append
29738
29739# as_fn_arith ARG...
29740# ------------------
29741# Perform arithmetic evaluation on the ARGs, and store the result in the
29742# global $as_val. Take advantage of shells that can avoid forks. The arguments
29743# must be portable across $(()) and expr.
29744if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
29745 eval 'as_fn_arith ()
29746 {
29747 as_val=$(( $* ))
29748 }'
29749else
29750 as_fn_arith ()
29751 {
29752 as_val=`expr "$@" || test $? -eq 1`
29753 }
29754fi # as_fn_arith
29755
29756
29757if expr a : '\(a\)' >/dev/null 2>&1 &&
29758 test "X`expr 00001 : '.*\(...\)'`" = X001; then
29759 as_expr=expr
29760else
29761 as_expr=false
29762fi
29763
29764if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
29765 as_basename=basename
29766else
29767 as_basename=false
29768fi
29769
29770if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
29771 as_dirname=dirname
29772else
29773 as_dirname=false
29774fi
29775
29776as_me=`$as_basename -- "$0" ||
29777$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
29778 X"$0" : 'X\(//\)$' \| \
29779 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
29780$as_echo X/"$0" |
29781 sed '/^.*\/\([^/][^/]*\)\/*$/{
29782 s//\1/
29783 q
29784 }
29785 /^X\/\(\/\/\)$/{
29786 s//\1/
29787 q
29788 }
29789 /^X\/\(\/\).*/{
29790 s//\1/
29791 q
29792 }
29793 s/.*/./; q'`
29794
29795# Avoid depending upon Character Ranges.
29796as_cr_letters='abcdefghijklmnopqrstuvwxyz'
29797as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
29798as_cr_Letters=$as_cr_letters$as_cr_LETTERS
29799as_cr_digits='0123456789'
29800as_cr_alnum=$as_cr_Letters$as_cr_digits
29801
29802ECHO_C= ECHO_N= ECHO_T=
29803case `echo -n x` in #(((((
29804-n*)
29805 case `echo 'xy\c'` in
29806 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
29807 xy) ECHO_C='\c';;
29808 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
29809 ECHO_T=' ';;
29810 esac;;
29811*)
29812 ECHO_N='-n';;
29813esac
29814
29815rm -f conf$$ conf$$.exe conf$$.file
29816if test -d conf$$.dir; then
29817 rm -f conf$$.dir/conf$$.file
29818else
29819 rm -f conf$$.dir
29820 mkdir conf$$.dir 2>/dev/null
29821fi
29822if (echo >conf$$.file) 2>/dev/null; then
29823 if ln -s conf$$.file conf$$ 2>/dev/null; then
29824 as_ln_s='ln -s'
29825 # ... but there are two gotchas:
29826 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
29827 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
29828 # In both cases, we have to default to `cp -p'.
29829 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
29830 as_ln_s='cp -p'
29831 elif ln conf$$.file conf$$ 2>/dev/null; then
29832 as_ln_s=ln
29833 else
29834 as_ln_s='cp -p'
29835 fi
29836else
29837 as_ln_s='cp -p'
29838fi
29839rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
29840rmdir conf$$.dir 2>/dev/null
29841
29842
29843# as_fn_mkdir_p
29844# -------------
29845# Create "$as_dir" as a directory, including parents if necessary.
29846as_fn_mkdir_p ()
29847{
29848
29849 case $as_dir in #(
29850 -*) as_dir=./$as_dir;;
29851 esac
29852 test -d "$as_dir" || eval $as_mkdir_p || {
29853 as_dirs=
29854 while :; do
29855 case $as_dir in #(
29856 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
29857 *) as_qdir=$as_dir;;
29858 esac
29859 as_dirs="'$as_qdir' $as_dirs"
29860 as_dir=`$as_dirname -- "$as_dir" ||
29861$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
29862 X"$as_dir" : 'X\(//\)[^/]' \| \
29863 X"$as_dir" : 'X\(//\)$' \| \
29864 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
29865$as_echo X"$as_dir" |
29866 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
29867 s//\1/
29868 q
29869 }
29870 /^X\(\/\/\)[^/].*/{
29871 s//\1/
29872 q
29873 }
29874 /^X\(\/\/\)$/{
29875 s//\1/
29876 q
29877 }
29878 /^X\(\/\).*/{
29879 s//\1/
29880 q
29881 }
29882 s/.*/./; q'`
29883 test -d "$as_dir" && break
29884 done
29885 test -z "$as_dirs" || eval "mkdir $as_dirs"
a9bec17c 29886 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
067d23c9
KY
29887
29888
29889} # as_fn_mkdir_p
29890if mkdir -p . 2>/dev/null; then
29891 as_mkdir_p='mkdir -p "$as_dir"'
29892else
29893 test -d ./-p && rmdir ./-p
29894 as_mkdir_p=false
29895fi
29896
29897if test -x / >/dev/null 2>&1; then
29898 as_test_x='test -x'
29899else
29900 if ls -dL / >/dev/null 2>&1; then
29901 as_ls_L_option=L
29902 else
29903 as_ls_L_option=
29904 fi
29905 as_test_x='
29906 eval sh -c '\''
29907 if test -d "$1"; then
29908 test -d "$1/.";
29909 else
29910 case $1 in #(
29911 -*)set "./$1";;
29912 esac;
29913 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
29914 ???[sx]*):;;*)false;;esac;fi
29915 '\'' sh
29916 '
29917fi
29918as_executable_p=$as_test_x
29919
29920# Sed expression to map a string onto a valid CPP name.
29921as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
29922
29923# Sed expression to map a string onto a valid variable name.
29924as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
29925
29926
29927exec 6>&1
29928## ----------------------------------- ##
29929## Main body of $CONFIG_STATUS script. ##
29930## ----------------------------------- ##
29931_ASEOF
29932test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
29933
29934cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29935# Save the log message, to keep $0 and so on meaningful, and to
29936# report actual input values of CONFIG_FILES etc. instead of their
29937# values after options handling.
29938ac_log="
c574bc34 29939This file was extended by emacs $as_me 24.3.50, which was
a9bec17c 29940generated by GNU Autoconf 2.65. Invocation command line was
067d23c9
KY
29941
29942 CONFIG_FILES = $CONFIG_FILES
29943 CONFIG_HEADERS = $CONFIG_HEADERS
29944 CONFIG_LINKS = $CONFIG_LINKS
29945 CONFIG_COMMANDS = $CONFIG_COMMANDS
29946 $ $0 $@
29947
29948on `(hostname || uname -n) 2>/dev/null | sed 1q`
29949"
29950
29951_ACEOF
29952
29953case $ac_config_files in *"
29954"*) set x $ac_config_files; shift; ac_config_files=$*;;
29955esac
29956
29957case $ac_config_headers in *"
29958"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
29959esac
29960
29961
29962cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29963# Files that config.status was made for.
29964config_files="$ac_config_files"
29965config_headers="$ac_config_headers"
29966config_commands="$ac_config_commands"
29967
29968_ACEOF
29969
29970cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29971ac_cs_usage="\
29972\`$as_me' instantiates files and other configuration actions
29973from templates according to the current configuration. Unless the files
29974and actions are specified as TAGs, all are instantiated by default.
29975
29976Usage: $0 [OPTION]... [TAG]...
29977
29978 -h, --help print this help, then exit
29979 -V, --version print version number and configuration settings, then exit
29980 --config print configuration, then exit
29981 -q, --quiet, --silent
29982 do not print progress messages
29983 -d, --debug don't remove temporary files
29984 --recheck update $as_me by reconfiguring in the same conditions
29985 --file=FILE[:TEMPLATE]
29986 instantiate the configuration file FILE
29987 --header=FILE[:TEMPLATE]
29988 instantiate the configuration header FILE
29989
29990Configuration files:
29991$config_files
29992
29993Configuration headers:
29994$config_headers
29995
29996Configuration commands:
29997$config_commands
29998
29999Report bugs to the package provider."
30000
30001_ACEOF
30002cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30003ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
30004ac_cs_version="\\
c574bc34 30005emacs config.status 24.3.50
a9bec17c 30006configured by $0, generated by GNU Autoconf 2.65,
067d23c9
KY
30007 with options \\"\$ac_cs_config\\"
30008
a9bec17c 30009Copyright (C) 2009 Free Software Foundation, Inc.
067d23c9
KY
30010This config.status script is free software; the Free Software Foundation
30011gives unlimited permission to copy, distribute and modify it."
30012
30013ac_pwd='$ac_pwd'
30014srcdir='$srcdir'
30015INSTALL='$INSTALL'
743c80a7
PE
30016MKDIR_P='$MKDIR_P'
30017AWK='$AWK'
067d23c9
KY
30018test -n "\$AWK" || AWK=awk
30019_ACEOF
30020
30021cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30022# The default lists apply if the user does not specify any file.
30023ac_need_defaults=:
30024while test $# != 0
30025do
30026 case $1 in
a9bec17c 30027 --*=*)
067d23c9
KY
30028 ac_option=`expr "X$1" : 'X\([^=]*\)='`
30029 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
30030 ac_shift=:
30031 ;;
30032 *)
30033 ac_option=$1
30034 ac_optarg=$2
30035 ac_shift=shift
30036 ;;
30037 esac
30038
30039 case $ac_option in
30040 # Handling of the options.
30041 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
30042 ac_cs_recheck=: ;;
30043 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
30044 $as_echo "$ac_cs_version"; exit ;;
30045 --config | --confi | --conf | --con | --co | --c )
30046 $as_echo "$ac_cs_config"; exit ;;
30047 --debug | --debu | --deb | --de | --d | -d )
30048 debug=: ;;
30049 --file | --fil | --fi | --f )
30050 $ac_shift
30051 case $ac_optarg in
30052 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
30053 esac
30054 as_fn_append CONFIG_FILES " '$ac_optarg'"
30055 ac_need_defaults=false;;
30056 --header | --heade | --head | --hea )
30057 $ac_shift
30058 case $ac_optarg in
30059 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
30060 esac
30061 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
30062 ac_need_defaults=false;;
30063 --he | --h)
30064 # Conflict between --help and --header
a9bec17c 30065 as_fn_error "ambiguous option: \`$1'
067d23c9
KY
30066Try \`$0 --help' for more information.";;
30067 --help | --hel | -h )
30068 $as_echo "$ac_cs_usage"; exit ;;
30069 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
30070 | -silent | --silent | --silen | --sile | --sil | --si | --s)
30071 ac_cs_silent=: ;;
30072
30073 # This is an error.
a9bec17c 30074 -*) as_fn_error "unrecognized option: \`$1'
067d23c9
KY
30075Try \`$0 --help' for more information." ;;
30076
30077 *) as_fn_append ac_config_targets " $1"
30078 ac_need_defaults=false ;;
30079
30080 esac
30081 shift
30082done
30083
30084ac_configure_extra_args=
30085
30086if $ac_cs_silent; then
30087 exec 6>/dev/null
30088 ac_configure_extra_args="$ac_configure_extra_args --silent"
30089fi
30090
30091_ACEOF
30092cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30093if \$ac_cs_recheck; then
30094 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
30095 shift
30096 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
30097 CONFIG_SHELL='$SHELL'
30098 export CONFIG_SHELL
30099 exec "\$@"
30100fi
30101
30102_ACEOF
30103cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30104exec 5>>config.log
30105{
30106 echo
30107 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
30108## Running $as_me. ##
30109_ASBOX
30110 $as_echo "$ac_log"
30111} >&5
30112
30113_ACEOF
30114cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30115#
30116# INIT-COMMANDS
30117#
743c80a7 30118AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
7c61eaab 30119GCC="$GCC" CPPFLAGS="$CPPFLAGS" opsys="$opsys"
067d23c9
KY
30120
30121_ACEOF
30122
30123cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30124
30125# Handling of arguments.
30126for ac_config_target in $ac_config_targets
30127do
30128 case $ac_config_target in
30129 "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:src/config.in" ;;
743c80a7 30130 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
bb7dce39
GM
30131 "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" ;;
30132 "nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop") CONFIG_FILES="$CONFIG_FILES nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop:nextstep/templates/Emacs.desktop.in" ;;
30133 "nextstep/Cocoa/Emacs.base/Contents/Info.plist") CONFIG_FILES="$CONFIG_FILES nextstep/Cocoa/Emacs.base/Contents/Info.plist:nextstep/templates/Info.plist.in" ;;
30134 "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 30135 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
743c80a7 30136 "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
56ade35c
GM
30137 "lib-src/Makefile") CONFIG_FILES="$CONFIG_FILES lib-src/Makefile" ;;
30138 "oldXMenu/Makefile") CONFIG_FILES="$CONFIG_FILES oldXMenu/Makefile" ;;
30139 "doc/emacs/Makefile") CONFIG_FILES="$CONFIG_FILES doc/emacs/Makefile" ;;
30140 "doc/misc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/misc/Makefile" ;;
30141 "doc/lispintro/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispintro/Makefile" ;;
30142 "doc/lispref/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispref/Makefile" ;;
30143 "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
30144 "lwlib/Makefile") CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;;
30145 "lisp/Makefile") CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;;
30146 "leim/Makefile") CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;;
bb7dce39 30147 "nextstep/Makefile") CONFIG_FILES="$CONFIG_FILES nextstep/Makefile" ;;
7c61eaab 30148 "nt/Makefile") CONFIG_FILES="$CONFIG_FILES nt/Makefile" ;;
56ade35c 30149 "test/automated/Makefile") CONFIG_FILES="$CONFIG_FILES test/automated/Makefile" ;;
40b65096 30150 "admin/unidata/Makefile") CONFIG_FILES="$CONFIG_FILES admin/unidata/Makefile" ;;
4c15c0f2
GM
30151 "src/epaths.h") CONFIG_COMMANDS="$CONFIG_COMMANDS src/epaths.h" ;;
30152 "src/.gdbinit") CONFIG_COMMANDS="$CONFIG_COMMANDS src/.gdbinit" ;;
067d23c9 30153
a9bec17c 30154 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
067d23c9
KY
30155 esac
30156done
30157
30158
30159# If the user did not use the arguments to specify the items to instantiate,
30160# then the envvar interface is used. Set only those that are not.
30161# We use the long form for the default assignment because of an extremely
30162# bizarre bug on SunOS 4.1.3.
30163if $ac_need_defaults; then
30164 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
30165 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
30166 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
30167fi
30168
30169# Have a temporary directory for convenience. Make it in the build tree
30170# simply because there is no reason against having it here, and in addition,
30171# creating and moving files from /tmp can sometimes cause problems.
30172# Hook for its removal unless debugging.
30173# Note that there is a small window in which the directory will not be cleaned:
30174# after its creation but before its name has been assigned to `$tmp'.
30175$debug ||
30176{
a9bec17c 30177 tmp=
067d23c9 30178 trap 'exit_status=$?
a9bec17c 30179 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
067d23c9
KY
30180' 0
30181 trap 'as_fn_exit 1' 1 2 13 15
30182}
30183# Create a (secure) tmp directory for tmp files.
30184
30185{
30186 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
a9bec17c 30187 test -n "$tmp" && test -d "$tmp"
067d23c9
KY
30188} ||
30189{
30190 tmp=./conf$$-$RANDOM
30191 (umask 077 && mkdir "$tmp")
a9bec17c 30192} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
067d23c9
KY
30193
30194# Set up the scripts for CONFIG_FILES section.
30195# No need to generate them if there are no CONFIG_FILES.
30196# This happens for instance with `./config.status config.h'.
30197if test -n "$CONFIG_FILES"; then
30198
30199if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
30200 ac_cs_awk_getline=:
30201 ac_cs_awk_pipe_init=
30202 ac_cs_awk_read_file='
30203 while ((getline aline < (F[key])) > 0)
30204 print(aline)
30205 close(F[key])'
30206 ac_cs_awk_pipe_fini=
30207else
30208 ac_cs_awk_getline=false
30209 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
30210 ac_cs_awk_read_file='
30211 print "|#_!!_#|"
30212 print "cat " F[key] " &&"
30213 '$ac_cs_awk_pipe_init
30214 # The final `:' finishes the AND list.
30215 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
30216fi
30217ac_cr=`echo X | tr X '\015'`
30218# On cygwin, bash can eat \r inside `` if the user requested igncr.
30219# But we know of no other shell where ac_cr would be empty at this
30220# point, so we can use a bashism as a fallback.
30221if test "x$ac_cr" = x; then
30222 eval ac_cr=\$\'\\r\'
30223fi
30224ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
30225if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
a9bec17c 30226 ac_cs_awk_cr='\r'
067d23c9
KY
30227else
30228 ac_cs_awk_cr=$ac_cr
30229fi
30230
a9bec17c 30231echo 'BEGIN {' >"$tmp/subs1.awk" &&
067d23c9
KY
30232_ACEOF
30233
30234# Create commands to substitute file output variables.
30235{
30236 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
a9bec17c 30237 echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
067d23c9
KY
30238 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
30239 echo "_ACAWK" &&
30240 echo "_ACEOF"
30241} >conf$$files.sh &&
30242. ./conf$$files.sh ||
a9bec17c 30243 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
067d23c9
KY
30244rm -f conf$$files.sh
30245
30246{
30247 echo "cat >conf$$subs.awk <<_ACEOF" &&
30248 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
30249 echo "_ACEOF"
30250} >conf$$subs.sh ||
a9bec17c
GM
30251 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
30252ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
067d23c9
KY
30253ac_delim='%!_!# '
30254for ac_last_try in false false false false false :; do
30255 . ./conf$$subs.sh ||
a9bec17c 30256 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
067d23c9
KY
30257
30258 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
30259 if test $ac_delim_n = $ac_delim_num; then
30260 break
30261 elif $ac_last_try; then
a9bec17c 30262 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
067d23c9
KY
30263 else
30264 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
30265 fi
30266done
30267rm -f conf$$subs.sh
30268
30269cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
a9bec17c 30270cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
067d23c9
KY
30271_ACEOF
30272sed -n '
30273h
30274s/^/S["/; s/!.*/"]=/
30275p
30276g
30277s/^[^!]*!//
30278:repl
30279t repl
30280s/'"$ac_delim"'$//
30281t delim
30282:nl
30283h
30284s/\(.\{148\}\)..*/\1/
30285t more1
30286s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
30287p
30288n
30289b repl
30290:more1
30291s/["\\]/\\&/g; s/^/"/; s/$/"\\/
30292p
30293g
30294s/.\{148\}//
30295t nl
30296:delim
30297h
30298s/\(.\{148\}\)..*/\1/
30299t more2
30300s/["\\]/\\&/g; s/^/"/; s/$/"/
30301p
30302b
30303:more2
30304s/["\\]/\\&/g; s/^/"/; s/$/"\\/
30305p
30306g
30307s/.\{148\}//
30308t delim
30309' <conf$$subs.awk | sed '
30310/^[^""]/{
30311 N
30312 s/\n//
30313}
30314' >>$CONFIG_STATUS || ac_write_fail=1
30315rm -f conf$$subs.awk
30316cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30317_ACAWK
a9bec17c 30318cat >>"\$tmp/subs1.awk" <<_ACAWK &&
067d23c9
KY
30319 for (key in S) S_is_set[key] = 1
30320 FS = "\a"
30321 \$ac_cs_awk_pipe_init
30322}
30323{
30324 line = $ 0
30325 nfields = split(line, field, "@")
30326 substed = 0
30327 len = length(field[1])
30328 for (i = 2; i < nfields; i++) {
30329 key = field[i]
30330 keylen = length(key)
30331 if (S_is_set[key]) {
30332 value = S[key]
30333 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
30334 len += length(value) + length(field[++i])
30335 substed = 1
30336 } else
30337 len += 1 + keylen
30338 }
30339 if (nfields == 3 && !substed) {
30340 key = field[2]
30341 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
30342 \$ac_cs_awk_read_file
30343 next
30344 }
30345 }
30346 print line
30347}
30348\$ac_cs_awk_pipe_fini
30349_ACAWK
30350_ACEOF
30351cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30352if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
30353 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
30354else
30355 cat
a9bec17c
GM
30356fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
30357 || as_fn_error "could not setup config files machinery" "$LINENO" 5
067d23c9
KY
30358_ACEOF
30359
a9bec17c
GM
30360# VPATH may cause trouble with some makes, so we remove $(srcdir),
30361# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
067d23c9
KY
30362# trailing colons and then remove the whole line if VPATH becomes empty
30363# (actually we leave an empty line to preserve line numbers).
30364if test "x$srcdir" = x.; then
a9bec17c
GM
30365 ac_vpsub='/^[ ]*VPATH[ ]*=/{
30366s/:*\$(srcdir):*/:/
30367s/:*\${srcdir}:*/:/
30368s/:*@srcdir@:*/:/
30369s/^\([^=]*=[ ]*\):*/\1/
067d23c9
KY
30370s/:*$//
30371s/^[^=]*=[ ]*$//
30372}'
30373fi
30374
30375cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30376fi # test -n "$CONFIG_FILES"
30377
30378# Set up the scripts for CONFIG_HEADERS section.
30379# No need to generate them if there are no CONFIG_HEADERS.
30380# This happens for instance with `./config.status Makefile'.
30381if test -n "$CONFIG_HEADERS"; then
a9bec17c 30382cat >"$tmp/defines.awk" <<\_ACAWK ||
067d23c9
KY
30383BEGIN {
30384_ACEOF
30385
30386# Transform confdefs.h into an awk script `defines.awk', embedded as
30387# here-document in config.status, that substitutes the proper values into
30388# config.h.in to produce config.h.
30389
30390# Create a delimiter string that does not exist in confdefs.h, to ease
30391# handling of long lines.
30392ac_delim='%!_!# '
30393for ac_last_try in false false :; do
a9bec17c
GM
30394 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
30395 if test -z "$ac_t"; then
067d23c9
KY
30396 break
30397 elif $ac_last_try; then
a9bec17c 30398 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
067d23c9
KY
30399 else
30400 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
30401 fi
30402done
30403
30404# For the awk script, D is an array of macro values keyed by name,
30405# likewise P contains macro parameters if any. Preserve backslash
30406# newline sequences.
30407
30408ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
30409sed -n '
30410s/.\{148\}/&'"$ac_delim"'/g
30411t rset
30412:rset
30413s/^[ ]*#[ ]*define[ ][ ]*/ /
30414t def
30415d
30416:def
30417s/\\$//
30418t bsnl
30419s/["\\]/\\&/g
30420s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
30421D["\1"]=" \3"/p
30422s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
30423d
30424:bsnl
30425s/["\\]/\\&/g
30426s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
30427D["\1"]=" \3\\\\\\n"\\/p
30428t cont
30429s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
30430t cont
30431d
30432:cont
30433n
30434s/.\{148\}/&'"$ac_delim"'/g
30435t clear
30436:clear
30437s/\\$//
30438t bsnlc
30439s/["\\]/\\&/g; s/^/"/; s/$/"/p
30440d
30441:bsnlc
30442s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
30443b cont
30444' <confdefs.h | sed '
30445s/'"$ac_delim"'/"\\\
30446"/g' >>$CONFIG_STATUS || ac_write_fail=1
30447
30448cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30449 for (key in D) D_is_set[key] = 1
30450 FS = "\a"
30451}
30452/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
30453 line = \$ 0
30454 split(line, arg, " ")
30455 if (arg[1] == "#") {
30456 defundef = arg[2]
30457 mac1 = arg[3]
30458 } else {
30459 defundef = substr(arg[1], 2)
30460 mac1 = arg[2]
30461 }
30462 split(mac1, mac2, "(") #)
30463 macro = mac2[1]
30464 prefix = substr(line, 1, index(line, defundef) - 1)
30465 if (D_is_set[macro]) {
30466 # Preserve the white space surrounding the "#".
30467 print prefix "define", macro P[macro] D[macro]
30468 next
30469 } else {
30470 # Replace #undef with comments. This is necessary, for example,
30471 # in the case of _POSIX_SOURCE, which is predefined and required
30472 # on some systems where configure will not decide to define it.
30473 if (defundef == "undef") {
30474 print "/*", prefix defundef, macro, "*/"
30475 next
30476 }
30477 }
30478}
30479{ print }
30480_ACAWK
30481_ACEOF
30482cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
a9bec17c 30483 as_fn_error "could not setup config headers machinery" "$LINENO" 5
067d23c9
KY
30484fi # test -n "$CONFIG_HEADERS"
30485
30486
30487eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
30488shift
30489for ac_tag
30490do
30491 case $ac_tag in
30492 :[FHLC]) ac_mode=$ac_tag; continue;;
30493 esac
30494 case $ac_mode$ac_tag in
30495 :[FHL]*:*);;
a9bec17c 30496 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
067d23c9
KY
30497 :[FH]-) ac_tag=-:-;;
30498 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
30499 esac
30500 ac_save_IFS=$IFS
30501 IFS=:
30502 set x $ac_tag
30503 IFS=$ac_save_IFS
30504 shift
30505 ac_file=$1
30506 shift
30507
30508 case $ac_mode in
30509 :L) ac_source=$1;;
30510 :[FH])
30511 ac_file_inputs=
30512 for ac_f
30513 do
30514 case $ac_f in
a9bec17c 30515 -) ac_f="$tmp/stdin";;
067d23c9
KY
30516 *) # Look for the file first in the build tree, then in the source tree
30517 # (if the path is not absolute). The absolute path cannot be DOS-style,
30518 # because $ac_f cannot contain `:'.
30519 test -f "$ac_f" ||
30520 case $ac_f in
30521 [\\/$]*) false;;
30522 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
30523 esac ||
a9bec17c 30524 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
067d23c9
KY
30525 esac
30526 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
30527 as_fn_append ac_file_inputs " '$ac_f'"
30528 done
30529
30530 # Let's still pretend it is `configure' which instantiates (i.e., don't
30531 # use $as_me), people would be surprised to read:
30532 # /* config.h. Generated by config.status. */
30533 configure_input='Generated from '`
30534 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
30535 `' by configure.'
30536 if test x"$ac_file" != x-; then
30537 configure_input="$ac_file. $configure_input"
30538 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
30539$as_echo "$as_me: creating $ac_file" >&6;}
30540 fi
30541 # Neutralize special characters interpreted by sed in replacement strings.
30542 case $configure_input in #(
30543 *\&* | *\|* | *\\* )
30544 ac_sed_conf_input=`$as_echo "$configure_input" |
30545 sed 's/[\\\\&|]/\\\\&/g'`;; #(
30546 *) ac_sed_conf_input=$configure_input;;
30547 esac
30548
30549 case $ac_tag in
a9bec17c
GM
30550 *:-:* | *:-) cat >"$tmp/stdin" \
30551 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
067d23c9
KY
30552 esac
30553 ;;
30554 esac
30555
30556 ac_dir=`$as_dirname -- "$ac_file" ||
30557$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30558 X"$ac_file" : 'X\(//\)[^/]' \| \
30559 X"$ac_file" : 'X\(//\)$' \| \
30560 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
30561$as_echo X"$ac_file" |
30562 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
30563 s//\1/
30564 q
30565 }
30566 /^X\(\/\/\)[^/].*/{
30567 s//\1/
30568 q
30569 }
30570 /^X\(\/\/\)$/{
30571 s//\1/
30572 q
30573 }
30574 /^X\(\/\).*/{
30575 s//\1/
30576 q
30577 }
30578 s/.*/./; q'`
30579 as_dir="$ac_dir"; as_fn_mkdir_p
30580 ac_builddir=.
30581
30582case "$ac_dir" in
30583.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
30584*)
30585 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
30586 # A ".." for each directory in $ac_dir_suffix.
30587 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
30588 case $ac_top_builddir_sub in
30589 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
30590 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
30591 esac ;;
30592esac
30593ac_abs_top_builddir=$ac_pwd
30594ac_abs_builddir=$ac_pwd$ac_dir_suffix
30595# for backward compatibility:
30596ac_top_builddir=$ac_top_build_prefix
30597
30598case $srcdir in
30599 .) # We are building in place.
30600 ac_srcdir=.
30601 ac_top_srcdir=$ac_top_builddir_sub
30602 ac_abs_top_srcdir=$ac_pwd ;;
30603 [\\/]* | ?:[\\/]* ) # Absolute name.
30604 ac_srcdir=$srcdir$ac_dir_suffix;
30605 ac_top_srcdir=$srcdir
30606 ac_abs_top_srcdir=$srcdir ;;
30607 *) # Relative name.
30608 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
30609 ac_top_srcdir=$ac_top_build_prefix$srcdir
30610 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
30611esac
30612ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
30613
30614
30615 case $ac_mode in
30616 :F)
30617 #
30618 # CONFIG_FILE
30619 #
30620
30621 case $INSTALL in
30622 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
30623 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
30624 esac
743c80a7
PE
30625 ac_MKDIR_P=$MKDIR_P
30626 case $MKDIR_P in
30627 [\\/$]* | ?:[\\/]* ) ;;
30628 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
30629 esac
067d23c9
KY
30630_ACEOF
30631
30632cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30633# If the template does not know about datarootdir, expand it.
30634# FIXME: This hack should be removed a few years after 2.60.
30635ac_datarootdir_hack=; ac_datarootdir_seen=
30636ac_sed_dataroot='
30637/datarootdir/ {
30638 p
30639 q
30640}
30641/@datadir@/p
30642/@docdir@/p
30643/@infodir@/p
30644/@localedir@/p
30645/@mandir@/p'
30646case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
30647*datarootdir*) ac_datarootdir_seen=yes;;
30648*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
30649 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
30650$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
30651_ACEOF
30652cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30653 ac_datarootdir_hack='
30654 s&@datadir@&$datadir&g
30655 s&@docdir@&$docdir&g
30656 s&@infodir@&$infodir&g
30657 s&@localedir@&$localedir&g
30658 s&@mandir@&$mandir&g
30659 s&\\\${datarootdir}&$datarootdir&g' ;;
30660esac
30661_ACEOF
30662
30663# Neutralize VPATH when `$srcdir' = `.'.
30664# Shell code in configure.ac might set extrasub.
30665# FIXME: do we really want to maintain this feature?
30666cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30667ac_sed_extra="$ac_vpsub
30668$extrasub
30669_ACEOF
30670cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30671:t
30672/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
30673s|@configure_input@|$ac_sed_conf_input|;t t
30674s&@top_builddir@&$ac_top_builddir_sub&;t t
30675s&@top_build_prefix@&$ac_top_build_prefix&;t t
30676s&@srcdir@&$ac_srcdir&;t t
30677s&@abs_srcdir@&$ac_abs_srcdir&;t t
30678s&@top_srcdir@&$ac_top_srcdir&;t t
30679s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
30680s&@builddir@&$ac_builddir&;t t
30681s&@abs_builddir@&$ac_abs_builddir&;t t
30682s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
30683s&@INSTALL@&$ac_INSTALL&;t t
743c80a7 30684s&@MKDIR_P@&$ac_MKDIR_P&;t t
067d23c9
KY
30685$ac_datarootdir_hack
30686"
30687eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
30688if $ac_cs_awk_getline; then
a9bec17c 30689 $AWK -f "$tmp/subs.awk"
067d23c9 30690else
a9bec17c
GM
30691 $AWK -f "$tmp/subs.awk" | $SHELL
30692fi >$tmp/out \
30693 || as_fn_error "could not create $ac_file" "$LINENO" 5
067d23c9
KY
30694
30695test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
a9bec17c
GM
30696 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
30697 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
067d23c9 30698 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
a9bec17c 30699which seems to be undefined. Please make sure it is defined." >&5
067d23c9 30700$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
a9bec17c 30701which seems to be undefined. Please make sure it is defined." >&2;}
067d23c9 30702
a9bec17c 30703 rm -f "$tmp/stdin"
067d23c9 30704 case $ac_file in
a9bec17c
GM
30705 -) cat "$tmp/out" && rm -f "$tmp/out";;
30706 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
067d23c9 30707 esac \
a9bec17c 30708 || as_fn_error "could not create $ac_file" "$LINENO" 5
067d23c9
KY
30709 ;;
30710 :H)
30711 #
30712 # CONFIG_HEADER
30713 #
30714 if test x"$ac_file" != x-; then
30715 {
30716 $as_echo "/* $configure_input */" \
a9bec17c
GM
30717 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
30718 } >"$tmp/config.h" \
30719 || as_fn_error "could not create $ac_file" "$LINENO" 5
30720 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
067d23c9
KY
30721 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
30722$as_echo "$as_me: $ac_file is unchanged" >&6;}
30723 else
30724 rm -f "$ac_file"
a9bec17c
GM
30725 mv "$tmp/config.h" "$ac_file" \
30726 || as_fn_error "could not create $ac_file" "$LINENO" 5
067d23c9
KY
30727 fi
30728 else
30729 $as_echo "/* $configure_input */" \
a9bec17c
GM
30730 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
30731 || as_fn_error "could not create -" "$LINENO" 5
067d23c9 30732 fi
743c80a7
PE
30733# Compute "$ac_file"'s index in $config_headers.
30734_am_arg="$ac_file"
30735_am_stamp_count=1
30736for _am_header in $config_headers :; do
30737 case $_am_header in
30738 $_am_arg | $_am_arg:* )
30739 break ;;
30740 * )
30741 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
30742 esac
30743done
30744echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
30745$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30746 X"$_am_arg" : 'X\(//\)[^/]' \| \
30747 X"$_am_arg" : 'X\(//\)$' \| \
30748 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
30749$as_echo X"$_am_arg" |
30750 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
30751 s//\1/
30752 q
30753 }
30754 /^X\(\/\/\)[^/].*/{
30755 s//\1/
30756 q
30757 }
30758 /^X\(\/\/\)$/{
30759 s//\1/
30760 q
30761 }
30762 /^X\(\/\).*/{
30763 s//\1/
30764 q
30765 }
30766 s/.*/./; q'`/stamp-h$_am_stamp_count
067d23c9
KY
30767 ;;
30768
30769 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
30770$as_echo "$as_me: executing $ac_file commands" >&6;}
30771 ;;
30772 esac
30773
30774
30775 case $ac_file$ac_mode in
743c80a7
PE
30776 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
30777 # Autoconf 2.62 quotes --file arguments for eval, but not when files
30778 # are listed without --file. Let's play safe and only enable the eval
30779 # if we detect the quoting.
30780 case $CONFIG_FILES in
30781 *\'*) eval set x "$CONFIG_FILES" ;;
30782 *) set x $CONFIG_FILES ;;
30783 esac
30784 shift
30785 for mf
30786 do
30787 # Strip MF so we end up with the name of the file.
30788 mf=`echo "$mf" | sed -e 's/:.*$//'`
30789 # Check whether this is an Automake generated Makefile or not.
30790 # We used to match only the files named `Makefile.in', but
30791 # some people rename them; so instead we look at the file content.
30792 # Grep'ing the first line is not enough: some people post-process
30793 # each Makefile.in and add a new line on top of each file to say so.
30794 # Grep'ing the whole file is not good either: AIX grep has a line
30795 # limit of 2048, but all sed's we know have understand at least 4000.
30796 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
30797 dirpart=`$as_dirname -- "$mf" ||
30798$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30799 X"$mf" : 'X\(//\)[^/]' \| \
30800 X"$mf" : 'X\(//\)$' \| \
30801 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
30802$as_echo X"$mf" |
30803 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
30804 s//\1/
30805 q
30806 }
30807 /^X\(\/\/\)[^/].*/{
30808 s//\1/
30809 q
30810 }
30811 /^X\(\/\/\)$/{
30812 s//\1/
30813 q
30814 }
30815 /^X\(\/\).*/{
30816 s//\1/
30817 q
30818 }
30819 s/.*/./; q'`
30820 else
30821 continue
30822 fi
30823 # Extract the definition of DEPDIR, am__include, and am__quote
30824 # from the Makefile without running `make'.
30825 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
30826 test -z "$DEPDIR" && continue
30827 am__include=`sed -n 's/^am__include = //p' < "$mf"`
30828 test -z "am__include" && continue
30829 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
30830 # When using ansi2knr, U may be empty or an underscore; expand it
30831 U=`sed -n 's/^U = //p' < "$mf"`
30832 # Find all dependency output files, they are included files with
30833 # $(DEPDIR) in their names. We invoke sed twice because it is the
30834 # simplest approach to changing $(DEPDIR) to its actual value in the
30835 # expansion.
30836 for file in `sed -n "
30837 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
30838 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
30839 # Make sure the directory exists.
30840 test -f "$dirpart/$file" && continue
30841 fdir=`$as_dirname -- "$file" ||
30842$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30843 X"$file" : 'X\(//\)[^/]' \| \
30844 X"$file" : 'X\(//\)$' \| \
30845 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
30846$as_echo X"$file" |
30847 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
30848 s//\1/
30849 q
30850 }
30851 /^X\(\/\/\)[^/].*/{
30852 s//\1/
30853 q
30854 }
30855 /^X\(\/\/\)$/{
30856 s//\1/
30857 q
30858 }
30859 /^X\(\/\).*/{
30860 s//\1/
30861 q
30862 }
30863 s/.*/./; q'`
30864 as_dir=$dirpart/$fdir; as_fn_mkdir_p
30865 # echo "creating $dirpart/$file"
30866 echo '# dummy' > "$dirpart/$file"
30867 done
30868 done
30869}
30870 ;;
4c15c0f2 30871 "src/epaths.h":C)
7c61eaab
GM
30872if test "${opsys}" = "mingw32"; then
30873 ${MAKE-make} MAKEFILE_NAME=do-not-make-Makefile epaths-force-w32
30874else
30875 ${MAKE-make} MAKEFILE_NAME=do-not-make-Makefile epaths-force
30876fi
9411886d 30877 ;;
4c15c0f2 30878 "src/.gdbinit":C)
b5591ebb 30879if test ! -f src/.gdbinit && test -f "$srcdir/src/.gdbinit"; then
b5591ebb 30880 echo "source $srcdir/src/.gdbinit" > src/.gdbinit
067d23c9 30881fi
067d23c9
KY
30882 ;;
30883
30884 esac
30885done # for ac_tag
30886
30887
30888as_fn_exit 0
30889_ACEOF
30890ac_clean_files=$ac_clean_files_save
30891
30892test $ac_write_fail = 0 ||
a9bec17c 30893 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
067d23c9
KY
30894
30895
30896# configure is writing to config.log, and then calls config.status.
30897# config.status does its own redirection, appending to config.log.
30898# Unfortunately, on DOS this fails, as config.log is still kept open
30899# by configure, so config.status won't be able to write to it; its
30900# output is simply discarded. So we exec the FD to /dev/null,
30901# effectively closing config.log, so it can be properly (re)opened and
30902# appended to by config.status. When coming back to configure, we
30903# need to make the FD available again.
30904if test "$no_create" != yes; then
30905 ac_cs_success=:
30906 ac_config_status_args=
30907 test "$silent" = yes &&
30908 ac_config_status_args="$ac_config_status_args --quiet"
30909 exec 5>/dev/null
30910 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
30911 exec 5>>config.log
30912 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
30913 # would make configure fail if this is the last instruction.
a9bec17c 30914 $ac_cs_success || as_fn_exit $?
067d23c9
KY
30915fi
30916if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
30917 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
30918$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
30919fi
30920