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
8a3fafec 1150REPLACE_GETDTABLESIZE
e275c824
PE
1151REPLACE_GETDOMAINNAME
1152REPLACE_GETCWD
0eb775a3 1153REPLACE_FTRUNCATE
e275c824
PE
1154REPLACE_FCHOWNAT
1155REPLACE_DUP2
1156REPLACE_DUP
1157REPLACE_CLOSE
1158REPLACE_CHOWN
1159HAVE_SYS_PARAM_H
1160HAVE_OS_H
1161HAVE_DECL_TTYNAME_R
0eb775a3 1162HAVE_DECL_SETHOSTNAME
e275c824
PE
1163HAVE_DECL_GETUSERSHELL
1164HAVE_DECL_GETPAGESIZE
1165HAVE_DECL_GETLOGIN_R
1166HAVE_DECL_GETDOMAINNAME
2b1928b8 1167HAVE_DECL_FDATASYNC
e275c824
PE
1168HAVE_DECL_FCHDIR
1169HAVE_DECL_ENVIRON
1170HAVE_USLEEP
1171HAVE_UNLINKAT
1172HAVE_SYMLINKAT
1173HAVE_SYMLINK
1174HAVE_SLEEP
0eb775a3 1175HAVE_SETHOSTNAME
e275c824
PE
1176HAVE_READLINKAT
1177HAVE_READLINK
1178HAVE_PWRITE
1179HAVE_PREAD
1180HAVE_PIPE2
1181HAVE_PIPE
1182HAVE_LINKAT
1183HAVE_LINK
1184HAVE_LCHOWN
da6c8463 1185HAVE_GROUP_MEMBER
e275c824
PE
1186HAVE_GETPAGESIZE
1187HAVE_GETLOGIN
1188HAVE_GETHOSTNAME
1189HAVE_GETGROUPS
1190HAVE_GETDTABLESIZE
1191HAVE_FTRUNCATE
1192HAVE_FSYNC
2b1928b8 1193HAVE_FDATASYNC
e275c824
PE
1194HAVE_FCHOWNAT
1195HAVE_FCHDIR
1196HAVE_FACCESSAT
1197HAVE_EUIDACCESS
1198HAVE_DUP3
1199HAVE_DUP2
1200HAVE_CHOWN
1201GNULIB_WRITE
1202GNULIB_USLEEP
1203GNULIB_UNLINKAT
1204GNULIB_UNLINK
1205GNULIB_UNISTD_H_SIGPIPE
ca36e0ff 1206GNULIB_UNISTD_H_NONBLOCKING
e275c824
PE
1207GNULIB_TTYNAME_R
1208GNULIB_SYMLINKAT
1209GNULIB_SYMLINK
1210GNULIB_SLEEP
0eb775a3 1211GNULIB_SETHOSTNAME
e275c824
PE
1212GNULIB_RMDIR
1213GNULIB_READLINKAT
1214GNULIB_READLINK
ca36e0ff 1215GNULIB_READ
e275c824
PE
1216GNULIB_PWRITE
1217GNULIB_PREAD
1218GNULIB_PIPE2
1219GNULIB_PIPE
1220GNULIB_LSEEK
1221GNULIB_LINKAT
1222GNULIB_LINK
1223GNULIB_LCHOWN
0eb775a3 1224GNULIB_ISATTY
da6c8463 1225GNULIB_GROUP_MEMBER
e275c824
PE
1226GNULIB_GETUSERSHELL
1227GNULIB_GETPAGESIZE
1228GNULIB_GETLOGIN_R
1229GNULIB_GETLOGIN
1230GNULIB_GETHOSTNAME
1231GNULIB_GETGROUPS
1232GNULIB_GETDTABLESIZE
1233GNULIB_GETDOMAINNAME
1234GNULIB_GETCWD
1235GNULIB_FTRUNCATE
1236GNULIB_FSYNC
2b1928b8 1237GNULIB_FDATASYNC
e275c824
PE
1238GNULIB_FCHOWNAT
1239GNULIB_FCHDIR
1240GNULIB_FACCESSAT
1241GNULIB_EUIDACCESS
1242GNULIB_ENVIRON
1243GNULIB_DUP3
1244GNULIB_DUP2
2b1928b8 1245GNULIB_DUP
e275c824
PE
1246GNULIB_CLOSE
1247GNULIB_CHOWN
2b1928b8 1248GNULIB_CHDIR
f199cab1 1249LIB_CLOCK_GETTIME
eafe4c87
GM
1250GL_GENERATE_BYTESWAP_H_FALSE
1251GL_GENERATE_BYTESWAP_H_TRUE
1252BYTESWAP_H
4fc2b746
GM
1253GL_GENERATE_ALLOCA_H_FALSE
1254GL_GENERATE_ALLOCA_H_TRUE
1255ALLOCA_H
1256ALLOCA
743c80a7
PE
1257GL_COND_LIBTOOL_FALSE
1258GL_COND_LIBTOOL_TRUE
5476a9a4
GM
1259POST_ALLOC_OBJ
1260PRE_ALLOC_OBJ
1261CYGWIN_OBJ
1262RALLOC_OBJ
1263OLDXMENU_DEPS
1264LIBX_OTHER
1265LIBXMENU
1266OLDXMENU
1267OLDXMENU_TARGET
1268LIBXT_OTHER
1269TOOLKIT_LIBW
1270WIDGET_OBJ
1271XOBJ
1272XMENU_OBJ
1273FONT_OBJ
1274OTHER_FILES
1275GNU_OBJC_CFLAGS
1276ns_appsrc
1277ns_appresdir
1278ns_appbindir
1279ns_appdir
5476a9a4
GM
1280X_TOOLKIT_TYPE
1281GNUSTEP_CFLAGS
1282C_SWITCH_X_SITE
1283LD_SWITCH_X_SITE
1284gameuser
1285gamedir
1286bitmapdir
7a67e06b 1287etcdocdir
5476a9a4
GM
1288archlibdir
1289etcdir
1290x_default_search_path
1291lisppath
1292locallisppath
1293standardlisppath
1294leimdir
1295lispdir
1296srcdir
1297canonical
1298configuration
1299version
bb7dce39 1300copyright
0f55a32e 1301XGSELOBJ
5476a9a4
GM
1302KRB4LIB
1303DESLIB
1304KRB5LIB
1305CRYPTOLIB
1306COM_ERRLIB
1307LIBRESOLV
1308LIBHESIOD
1309TERMCAP_OBJ
1310LIBS_TERMCAP
1311BLESSMAIL_TARGET
1312LIBS_MAIL
1313liblockfile
1314LIBXML2_LIBS
1315LIBXML2_CFLAGS
910833ae
GM
1316XINERAMA_LIBS
1317XINERAMA_CFLAGS
1318XRANDR_LIBS
1319XRANDR_CFLAGS
5476a9a4
GM
1320LIBXSM
1321LIBGPM
1322LIBGIF
1323LIBTIFF
7a67e06b 1324LIBZ
5476a9a4
GM
1325LIBPNG
1326LIBJPEG
1327LIBXPM
1328M17N_FLT_LIBS
1329M17N_FLT_CFLAGS
1330LIBOTF_LIBS
1331LIBOTF_CFLAGS
1332FREETYPE_LIBS
1333FREETYPE_CFLAGS
1334XFT_LIBS
1335XFT_CFLAGS
1336FONTCONFIG_LIBS
1337FONTCONFIG_CFLAGS
1338LIBXMU
1339LIBXTR6
0f55a32e
GM
1340NOTIFY_OBJ
1341GFILENOTIFY_LIBS
1342GFILENOTIFY_CFLAGS
5476a9a4
GM
1343LIBGNUTLS_LIBS
1344LIBGNUTLS_CFLAGS
1345LIBSELINUX_LIBS
1346SETTINGS_LIBS
1347SETTINGS_CFLAGS
dcde497f
GM
1348GOBJECT_LIBS
1349GOBJECT_CFLAGS
5476a9a4
GM
1350GCONF_LIBS
1351GCONF_CFLAGS
1352GSETTINGS_LIBS
1353GSETTINGS_CFLAGS
1354DBUS_OBJ
1355DBUS_LIBS
1356DBUS_CFLAGS
1357GTK_OBJ
1358GTK_LIBS
1359GTK_CFLAGS
1360IMAGEMAGICK_LIBS
1361IMAGEMAGICK_CFLAGS
1362RSVG_LIBS
1363RSVG_CFLAGS
1364LIB_PTHREAD
1365VMLIMIT_OBJ
1366GMALLOC_OBJ
1367HAVE_XSERVER
7c61eaab
GM
1368XARGS_LIMIT
1369NTLIB
1370LIB_WSOCK32
1371LIBS_ECLIENT
1372CM_OBJ
1373NTDIR
1374FIRSTFILE_OBJ
b5eb356a 1375W32_RES_LINK
7c61eaab
GM
1376CLIENTW
1377CLIENTRES
68b8ed38 1378UPDATE_MANIFEST
7c61eaab
GM
1379EMACS_MANIFEST
1380EMACSRES
5c0255d9
GM
1381W32_LIBS
1382W32_OBJ
b5eb356a 1383WINDRES
5476a9a4
GM
1384NS_OBJC_OBJ
1385NS_OBJ
1386ns_self_contained
1387INSTALL_ARCH_INDEP_EXTRA
4efe5ef9 1388LIBS_GNUSTEP
5476a9a4
GM
1389LD_SWITCH_X_SITE_RPATH
1390XMKMF
1391DEPFLAGS
1392MKDEPDIR
1393CFLAGS_SOUND
1394ALSA_LIBS
1395ALSA_CFLAGS
1396LIBSOUND
1397PKG_CONFIG
067d23c9 1398LIB_MATH
067d23c9
KY
1399LIBS_SYSTEM
1400C_SWITCH_SYSTEM
1401UNEXEC_OBJ
1402C_SWITCH_MACHINE
1403LD_SWITCH_SYSTEM
1404CANNOT_DUMP
c65a2df9 1405DOCMISC_W32
141d074d
GM
1406INFO_OPTS
1407INFO_EXT
96f129d5 1408HAVE_MAKEINFO
9c29597b 1409PAXCTL
067d23c9
KY
1410GZIP_PROG
1411INSTALL_INFO
4c5f4270 1412LN_S_FILEONLY
a6b92a4a 1413GNULIB_WARN_CFLAGS
a6b92a4a 1414WERROR_CFLAGS
bab4f76d 1415WARN_CFLAGS
369e19fc
PE
1416RANLIB
1417ARFLAGS
1418AR
067d23c9
KY
1419EGREP
1420GREP
1421CPP
7c61eaab
GM
1422BUILDING_FOR_WINDOWSNT_FALSE
1423BUILDING_FOR_WINDOWSNT_TRUE
743c80a7
PE
1424am__fastdepCC_FALSE
1425am__fastdepCC_TRUE
1426CCDEPMODE
1427AMDEPBACKSLASH
1428AMDEP_FALSE
1429AMDEP_TRUE
1430am__quote
1431am__include
1432DEPDIR
067d23c9
KY
1433OBJEXT
1434EXEEXT
1435ac_ct_CC
1436CPPFLAGS
1437LDFLAGS
1438CFLAGS
1439CC
1440host_os
1441host_vendor
1442host_cpu
1443host
1444build_os
1445build_vendor
1446build_cpu
1447build
1448PROFILING_CFLAGS
c3a461a5 1449cache_file
743c80a7
PE
1450am__untar
1451am__tar
1452AMTAR
1453am__leading_dot
1454SET_MAKE
1455AWK
1456mkdir_p
1457MKDIR_P
1458INSTALL_STRIP_PROGRAM
1459STRIP
1460install_sh
1461MAKEINFO
1462AUTOHEADER
1463AUTOMAKE
1464AUTOCONF
1465ACLOCAL
1466VERSION
1467PACKAGE
1468CYGPATH_W
1469am__isrc
1470INSTALL_DATA
1471INSTALL_SCRIPT
1472INSTALL_PROGRAM
067d23c9
KY
1473target_alias
1474host_alias
1475build_alias
1476LIBS
1477ECHO_T
1478ECHO_N
1479ECHO_C
1480DEFS
1481mandir
1482localedir
1483libdir
1484psdir
1485pdfdir
1486dvidir
1487htmldir
1488infodir
1489docdir
1490oldincludedir
1491includedir
1492localstatedir
1493sharedstatedir
1494sysconfdir
1495datadir
1496datarootdir
1497libexecdir
1498sbindir
1499bindir
1500program_transform_name
1501prefix
1502exec_prefix
1503PACKAGE_URL
1504PACKAGE_BUGREPORT
1505PACKAGE_STRING
1506PACKAGE_VERSION
1507PACKAGE_TARNAME
1508PACKAGE_NAME
1509PATH_SEPARATOR
1510SHELL'
1511ac_subst_files='deps_frag
bb7dce39 1512lisp_frag'
067d23c9
KY
1513ac_user_opts='
1514enable_option_checking
ee77919d 1515with_all
067d23c9
KY
1516with_pop
1517with_kerberos
1518with_kerberos5
1519with_hesiod
1520with_mmdf
1521with_mail_unlink
1522with_mailhost
1523with_sound
067d23c9 1524with_x_toolkit
0442dc7f 1525with_wide_int
067d23c9
KY
1526with_xpm
1527with_jpeg
1528with_tiff
1529with_gif
1530with_png
1531with_rsvg
1532with_xml2
1533with_imagemagick
1534with_xft
1535with_libotf
1536with_m17n_flt
1537with_toolkit_scroll_bars
1538with_xaw3d
1539with_xim
1540with_ns
5c0255d9 1541with_w32
067d23c9
KY
1542with_gpm
1543with_dbus
1544with_gconf
f527bd02 1545with_gsettings
067d23c9
KY
1546with_selinux
1547with_gnutls
7a67e06b 1548with_zlib
0f55a32e 1549with_file_notification
067d23c9 1550with_makeinfo
992ec28a 1551with_compress_install
067d23c9 1552with_pkg_config_prog
4fc5868a 1553with_gameuser
067d23c9
KY
1554with_gnustep_conf
1555enable_ns_self_contained
067d23c9
KY
1556enable_locallisppath
1557enable_checking
afd07e01 1558enable_check_lisp_object_type
067d23c9
KY
1559enable_profiling
1560enable_autodepend
4efe5ef9 1561enable_gtk_deprecation_warnings
743c80a7 1562enable_dependency_tracking
067d23c9 1563enable_largefile
a6b92a4a 1564enable_gcc_warnings
e4d35030 1565enable_link_time_optimization
067d23c9 1566with_x
3a019ab4 1567enable_acl
067d23c9
KY
1568'
1569 ac_precious_vars='build_alias
1570host_alias
1571target_alias
1572CC
1573CFLAGS
1574LDFLAGS
1575LIBS
1576CPPFLAGS
1577CPP
1578XMKMF'
1579
1580
1581# Initialize some variables set by options.
1582ac_init_help=
1583ac_init_version=false
1584ac_unrecognized_opts=
1585ac_unrecognized_sep=
1586# The variables have the same names as the options, with
1587# dashes changed to underlines.
1588cache_file=/dev/null
1589exec_prefix=NONE
1590no_create=
1591no_recursion=
1592prefix=NONE
1593program_prefix=NONE
1594program_suffix=NONE
1595program_transform_name=s,x,x,
1596silent=
1597site=
1598srcdir=
1599verbose=
1600x_includes=NONE
1601x_libraries=NONE
1602
1603# Installation directory options.
1604# These are left unexpanded so users can "make install exec_prefix=/foo"
1605# and all the variables that are supposed to be based on exec_prefix
1606# by default will actually change.
1607# Use braces instead of parens because sh, perl, etc. also accept them.
1608# (The list follows the same order as the GNU Coding Standards.)
1609bindir='${exec_prefix}/bin'
1610sbindir='${exec_prefix}/sbin'
1611libexecdir='${exec_prefix}/libexec'
1612datarootdir='${prefix}/share'
1613datadir='${datarootdir}'
1614sysconfdir='${prefix}/etc'
1615sharedstatedir='${prefix}/com'
1616localstatedir='${prefix}/var'
1617includedir='${prefix}/include'
1618oldincludedir='/usr/include'
1619docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1620infodir='${datarootdir}/info'
1621htmldir='${docdir}'
1622dvidir='${docdir}'
1623pdfdir='${docdir}'
1624psdir='${docdir}'
1625libdir='${exec_prefix}/lib'
1626localedir='${datarootdir}/locale'
1627mandir='${datarootdir}/man'
1628
1629ac_prev=
1630ac_dashdash=
1631for ac_option
1632do
1633 # If the previous option needs an argument, assign it.
1634 if test -n "$ac_prev"; then
1635 eval $ac_prev=\$ac_option
1636 ac_prev=
1637 continue
1638 fi
1639
1640 case $ac_option in
a9bec17c
GM
1641 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1642 *) ac_optarg=yes ;;
067d23c9
KY
1643 esac
1644
1645 # Accept the important Cygnus configure options, so we can diagnose typos.
1646
1647 case $ac_dashdash$ac_option in
1648 --)
1649 ac_dashdash=yes ;;
1650
1651 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1652 ac_prev=bindir ;;
1653 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1654 bindir=$ac_optarg ;;
1655
1656 -build | --build | --buil | --bui | --bu)
1657 ac_prev=build_alias ;;
1658 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1659 build_alias=$ac_optarg ;;
1660
1661 -cache-file | --cache-file | --cache-fil | --cache-fi \
1662 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1663 ac_prev=cache_file ;;
1664 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1665 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1666 cache_file=$ac_optarg ;;
1667
1668 --config-cache | -C)
1669 cache_file=config.cache ;;
1670
1671 -datadir | --datadir | --datadi | --datad)
1672 ac_prev=datadir ;;
1673 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1674 datadir=$ac_optarg ;;
1675
1676 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1677 | --dataroo | --dataro | --datar)
1678 ac_prev=datarootdir ;;
1679 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1680 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1681 datarootdir=$ac_optarg ;;
1682
1683 -disable-* | --disable-*)
1684 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1685 # Reject names that are not valid shell variable names.
1686 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
a9bec17c 1687 as_fn_error "invalid feature name: $ac_useropt"
067d23c9
KY
1688 ac_useropt_orig=$ac_useropt
1689 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1690 case $ac_user_opts in
1691 *"
1692"enable_$ac_useropt"
1693"*) ;;
1694 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1695 ac_unrecognized_sep=', ';;
1696 esac
1697 eval enable_$ac_useropt=no ;;
1698
1699 -docdir | --docdir | --docdi | --doc | --do)
1700 ac_prev=docdir ;;
1701 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1702 docdir=$ac_optarg ;;
1703
1704 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1705 ac_prev=dvidir ;;
1706 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1707 dvidir=$ac_optarg ;;
1708
1709 -enable-* | --enable-*)
1710 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1711 # Reject names that are not valid shell variable names.
1712 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
a9bec17c 1713 as_fn_error "invalid feature name: $ac_useropt"
067d23c9
KY
1714 ac_useropt_orig=$ac_useropt
1715 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1716 case $ac_user_opts in
1717 *"
1718"enable_$ac_useropt"
1719"*) ;;
1720 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1721 ac_unrecognized_sep=', ';;
1722 esac
1723 eval enable_$ac_useropt=\$ac_optarg ;;
1724
1725 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1726 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1727 | --exec | --exe | --ex)
1728 ac_prev=exec_prefix ;;
1729 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1730 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1731 | --exec=* | --exe=* | --ex=*)
1732 exec_prefix=$ac_optarg ;;
1733
1734 -gas | --gas | --ga | --g)
1735 # Obsolete; use --with-gas.
1736 with_gas=yes ;;
1737
1738 -help | --help | --hel | --he | -h)
1739 ac_init_help=long ;;
1740 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1741 ac_init_help=recursive ;;
1742 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1743 ac_init_help=short ;;
1744
1745 -host | --host | --hos | --ho)
1746 ac_prev=host_alias ;;
1747 -host=* | --host=* | --hos=* | --ho=*)
1748 host_alias=$ac_optarg ;;
1749
1750 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1751 ac_prev=htmldir ;;
1752 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1753 | --ht=*)
1754 htmldir=$ac_optarg ;;
1755
1756 -includedir | --includedir | --includedi | --included | --include \
1757 | --includ | --inclu | --incl | --inc)
1758 ac_prev=includedir ;;
1759 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1760 | --includ=* | --inclu=* | --incl=* | --inc=*)
1761 includedir=$ac_optarg ;;
1762
1763 -infodir | --infodir | --infodi | --infod | --info | --inf)
1764 ac_prev=infodir ;;
1765 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1766 infodir=$ac_optarg ;;
1767
1768 -libdir | --libdir | --libdi | --libd)
1769 ac_prev=libdir ;;
1770 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1771 libdir=$ac_optarg ;;
1772
1773 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1774 | --libexe | --libex | --libe)
1775 ac_prev=libexecdir ;;
1776 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1777 | --libexe=* | --libex=* | --libe=*)
1778 libexecdir=$ac_optarg ;;
1779
1780 -localedir | --localedir | --localedi | --localed | --locale)
1781 ac_prev=localedir ;;
1782 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1783 localedir=$ac_optarg ;;
1784
1785 -localstatedir | --localstatedir | --localstatedi | --localstated \
1786 | --localstate | --localstat | --localsta | --localst | --locals)
1787 ac_prev=localstatedir ;;
1788 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1789 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1790 localstatedir=$ac_optarg ;;
1791
1792 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1793 ac_prev=mandir ;;
1794 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1795 mandir=$ac_optarg ;;
1796
1797 -nfp | --nfp | --nf)
1798 # Obsolete; use --without-fp.
1799 with_fp=no ;;
1800
1801 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1802 | --no-cr | --no-c | -n)
1803 no_create=yes ;;
1804
1805 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1806 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1807 no_recursion=yes ;;
1808
1809 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1810 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1811 | --oldin | --oldi | --old | --ol | --o)
1812 ac_prev=oldincludedir ;;
1813 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1814 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1815 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1816 oldincludedir=$ac_optarg ;;
1817
1818 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1819 ac_prev=prefix ;;
1820 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1821 prefix=$ac_optarg ;;
1822
1823 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1824 | --program-pre | --program-pr | --program-p)
1825 ac_prev=program_prefix ;;
1826 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1827 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1828 program_prefix=$ac_optarg ;;
1829
1830 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1831 | --program-suf | --program-su | --program-s)
1832 ac_prev=program_suffix ;;
1833 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1834 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1835 program_suffix=$ac_optarg ;;
1836
1837 -program-transform-name | --program-transform-name \
1838 | --program-transform-nam | --program-transform-na \
1839 | --program-transform-n | --program-transform- \
1840 | --program-transform | --program-transfor \
1841 | --program-transfo | --program-transf \
1842 | --program-trans | --program-tran \
1843 | --progr-tra | --program-tr | --program-t)
1844 ac_prev=program_transform_name ;;
1845 -program-transform-name=* | --program-transform-name=* \
1846 | --program-transform-nam=* | --program-transform-na=* \
1847 | --program-transform-n=* | --program-transform-=* \
1848 | --program-transform=* | --program-transfor=* \
1849 | --program-transfo=* | --program-transf=* \
1850 | --program-trans=* | --program-tran=* \
1851 | --progr-tra=* | --program-tr=* | --program-t=*)
1852 program_transform_name=$ac_optarg ;;
1853
1854 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1855 ac_prev=pdfdir ;;
1856 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1857 pdfdir=$ac_optarg ;;
1858
1859 -psdir | --psdir | --psdi | --psd | --ps)
1860 ac_prev=psdir ;;
1861 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1862 psdir=$ac_optarg ;;
1863
1864 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1865 | -silent | --silent | --silen | --sile | --sil)
1866 silent=yes ;;
1867
1868 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1869 ac_prev=sbindir ;;
1870 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1871 | --sbi=* | --sb=*)
1872 sbindir=$ac_optarg ;;
1873
1874 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1875 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1876 | --sharedst | --shareds | --shared | --share | --shar \
1877 | --sha | --sh)
1878 ac_prev=sharedstatedir ;;
1879 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1880 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1881 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1882 | --sha=* | --sh=*)
1883 sharedstatedir=$ac_optarg ;;
1884
1885 -site | --site | --sit)
1886 ac_prev=site ;;
1887 -site=* | --site=* | --sit=*)
1888 site=$ac_optarg ;;
1889
1890 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1891 ac_prev=srcdir ;;
1892 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1893 srcdir=$ac_optarg ;;
1894
1895 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1896 | --syscon | --sysco | --sysc | --sys | --sy)
1897 ac_prev=sysconfdir ;;
1898 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1899 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1900 sysconfdir=$ac_optarg ;;
1901
1902 -target | --target | --targe | --targ | --tar | --ta | --t)
1903 ac_prev=target_alias ;;
1904 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1905 target_alias=$ac_optarg ;;
1906
1907 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1908 verbose=yes ;;
1909
1910 -version | --version | --versio | --versi | --vers | -V)
1911 ac_init_version=: ;;
1912
1913 -with-* | --with-*)
1914 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1915 # Reject names that are not valid shell variable names.
1916 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
a9bec17c 1917 as_fn_error "invalid package name: $ac_useropt"
067d23c9
KY
1918 ac_useropt_orig=$ac_useropt
1919 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1920 case $ac_user_opts in
1921 *"
1922"with_$ac_useropt"
1923"*) ;;
1924 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1925 ac_unrecognized_sep=', ';;
1926 esac
1927 eval with_$ac_useropt=\$ac_optarg ;;
1928
1929 -without-* | --without-*)
1930 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1931 # Reject names that are not valid shell variable names.
1932 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
a9bec17c 1933 as_fn_error "invalid package name: $ac_useropt"
067d23c9
KY
1934 ac_useropt_orig=$ac_useropt
1935 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1936 case $ac_user_opts in
1937 *"
1938"with_$ac_useropt"
1939"*) ;;
1940 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1941 ac_unrecognized_sep=', ';;
1942 esac
1943 eval with_$ac_useropt=no ;;
1944
1945 --x)
1946 # Obsolete; use --with-x.
1947 with_x=yes ;;
1948
1949 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1950 | --x-incl | --x-inc | --x-in | --x-i)
1951 ac_prev=x_includes ;;
1952 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1953 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1954 x_includes=$ac_optarg ;;
1955
1956 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1957 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1958 ac_prev=x_libraries ;;
1959 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1960 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1961 x_libraries=$ac_optarg ;;
1962
a9bec17c
GM
1963 -*) as_fn_error "unrecognized option: \`$ac_option'
1964Try \`$0 --help' for more information."
067d23c9
KY
1965 ;;
1966
1967 *=*)
1968 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1969 # Reject names that are not valid shell variable names.
1970 case $ac_envvar in #(
1971 '' | [0-9]* | *[!_$as_cr_alnum]* )
a9bec17c 1972 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
067d23c9
KY
1973 esac
1974 eval $ac_envvar=\$ac_optarg
1975 export $ac_envvar ;;
1976
1977 *)
1978 # FIXME: should be removed in autoconf 3.0.
1979 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1980 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1981 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
a9bec17c 1982 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
067d23c9
KY
1983 ;;
1984
1985 esac
1986done
1987
1988if test -n "$ac_prev"; then
1989 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
a9bec17c 1990 as_fn_error "missing argument to $ac_option"
067d23c9
KY
1991fi
1992
1993if test -n "$ac_unrecognized_opts"; then
1994 case $enable_option_checking in
1995 no) ;;
a9bec17c 1996 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
067d23c9
KY
1997 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1998 esac
1999fi
2000
2001# Check all directory arguments for consistency.
2002for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
2003 datadir sysconfdir sharedstatedir localstatedir includedir \
2004 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
2005 libdir localedir mandir
2006do
2007 eval ac_val=\$$ac_var
2008 # Remove trailing slashes.
2009 case $ac_val in
2010 */ )
2011 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
2012 eval $ac_var=\$ac_val;;
2013 esac
2014 # Be sure to have absolute directory names.
2015 case $ac_val in
2016 [\\/$]* | ?:[\\/]* ) continue;;
2017 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
2018 esac
a9bec17c 2019 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
067d23c9
KY
2020done
2021
2022# There might be people who depend on the old broken behavior: `$host'
2023# used to hold the argument of --host etc.
2024# FIXME: To remove some day.
2025build=$build_alias
2026host=$host_alias
2027target=$target_alias
2028
2029# FIXME: To remove some day.
2030if test "x$host_alias" != x; then
2031 if test "x$build_alias" = x; then
2032 cross_compiling=maybe
a9bec17c
GM
2033 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
2034 If a cross compiler is detected then cross compile mode will be used." >&2
067d23c9
KY
2035 elif test "x$build_alias" != "x$host_alias"; then
2036 cross_compiling=yes
2037 fi
2038fi
2039
2040ac_tool_prefix=
2041test -n "$host_alias" && ac_tool_prefix=$host_alias-
2042
2043test "$silent" = yes && exec 6>/dev/null
2044
2045
2046ac_pwd=`pwd` && test -n "$ac_pwd" &&
2047ac_ls_di=`ls -di .` &&
2048ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
a9bec17c 2049 as_fn_error "working directory cannot be determined"
067d23c9 2050test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
a9bec17c 2051 as_fn_error "pwd does not report name of working directory"
067d23c9
KY
2052
2053
2054# Find the source files, if location was not specified.
2055if test -z "$srcdir"; then
2056 ac_srcdir_defaulted=yes
2057 # Try the directory containing this script, then the parent directory.
2058 ac_confdir=`$as_dirname -- "$as_myself" ||
2059$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
2060 X"$as_myself" : 'X\(//\)[^/]' \| \
2061 X"$as_myself" : 'X\(//\)$' \| \
2062 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
2063$as_echo X"$as_myself" |
2064 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
2065 s//\1/
2066 q
2067 }
2068 /^X\(\/\/\)[^/].*/{
2069 s//\1/
2070 q
2071 }
2072 /^X\(\/\/\)$/{
2073 s//\1/
2074 q
2075 }
2076 /^X\(\/\).*/{
2077 s//\1/
2078 q
2079 }
2080 s/.*/./; q'`
2081 srcdir=$ac_confdir
2082 if test ! -r "$srcdir/$ac_unique_file"; then
2083 srcdir=..
2084 fi
2085else
2086 ac_srcdir_defaulted=no
2087fi
2088if test ! -r "$srcdir/$ac_unique_file"; then
2089 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
a9bec17c 2090 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
067d23c9
KY
2091fi
2092ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
2093ac_abs_confdir=`(
a9bec17c 2094 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
067d23c9
KY
2095 pwd)`
2096# When building in place, set srcdir=.
2097if test "$ac_abs_confdir" = "$ac_pwd"; then
2098 srcdir=.
2099fi
2100# Remove unnecessary trailing slashes from srcdir.
2101# Double slashes in file names in object file debugging info
2102# mess up M-x gdb in Emacs.
2103case $srcdir in
2104*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
2105esac
2106for ac_var in $ac_precious_vars; do
2107 eval ac_env_${ac_var}_set=\${${ac_var}+set}
2108 eval ac_env_${ac_var}_value=\$${ac_var}
2109 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
2110 eval ac_cv_env_${ac_var}_value=\$${ac_var}
2111done
2112
2113#
2114# Report the --help message.
2115#
2116if test "$ac_init_help" = "long"; then
2117 # Omit some internal or obsolete options to make the list less imposing.
2118 # This message is too long to be a string in the A/UX 3.1 sh.
2119 cat <<_ACEOF
c574bc34 2120\`configure' configures emacs 24.3.50 to adapt to many kinds of systems.
067d23c9
KY
2121
2122Usage: $0 [OPTION]... [VAR=VALUE]...
2123
2124To assign environment variables (e.g., CC, CFLAGS...), specify them as
2125VAR=VALUE. See below for descriptions of some of the useful variables.
2126
2127Defaults for the options are specified in brackets.
2128
2129Configuration:
2130 -h, --help display this help and exit
2131 --help=short display options specific to this package
2132 --help=recursive display the short help of all the included packages
2133 -V, --version display version information and exit
a9bec17c 2134 -q, --quiet, --silent do not print \`checking...' messages
067d23c9
KY
2135 --cache-file=FILE cache test results in FILE [disabled]
2136 -C, --config-cache alias for \`--cache-file=config.cache'
2137 -n, --no-create do not create output files
2138 --srcdir=DIR find the sources in DIR [configure dir or \`..']
2139
2140Installation directories:
2141 --prefix=PREFIX install architecture-independent files in PREFIX
2142 [$ac_default_prefix]
2143 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
2144 [PREFIX]
2145
2146By default, \`make install' will install all the files in
2147\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
2148an installation prefix other than \`$ac_default_prefix' using \`--prefix',
2149for instance \`--prefix=\$HOME'.
2150
2151For better control, use the options below.
2152
2153Fine tuning of the installation directories:
2154 --bindir=DIR user executables [EPREFIX/bin]
2155 --sbindir=DIR system admin executables [EPREFIX/sbin]
2156 --libexecdir=DIR program executables [EPREFIX/libexec]
2157 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
2158 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
2159 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
2160 --libdir=DIR object code libraries [EPREFIX/lib]
2161 --includedir=DIR C header files [PREFIX/include]
2162 --oldincludedir=DIR C header files for non-gcc [/usr/include]
2163 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
2164 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
2165 --infodir=DIR info documentation [DATAROOTDIR/info]
2166 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
2167 --mandir=DIR man documentation [DATAROOTDIR/man]
2168 --docdir=DIR documentation root [DATAROOTDIR/doc/emacs]
2169 --htmldir=DIR html documentation [DOCDIR]
2170 --dvidir=DIR dvi documentation [DOCDIR]
2171 --pdfdir=DIR pdf documentation [DOCDIR]
2172 --psdir=DIR ps documentation [DOCDIR]
2173_ACEOF
2174
2175 cat <<\_ACEOF
2176
2177Program names:
2178 --program-prefix=PREFIX prepend PREFIX to installed program names
2179 --program-suffix=SUFFIX append SUFFIX to installed program names
2180 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
2181
2182X features:
2183 --x-includes=DIR X include files are in DIR
2184 --x-libraries=DIR X library files are in DIR
2185
2186System types:
2187 --build=BUILD configure for building on BUILD [guessed]
2188 --host=HOST cross-compile to build programs to run on HOST [BUILD]
2189_ACEOF
2190fi
2191
2192if test -n "$ac_init_help"; then
2193 case $ac_init_help in
c574bc34 2194 short | recursive ) echo "Configuration of emacs 24.3.50:";;
067d23c9
KY
2195 esac
2196 cat <<\_ACEOF
2197
2198Optional Features:
2199 --disable-option-checking ignore unrecognized --enable/--with options
2200 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
2201 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
2202 --disable-ns-self-contained
2203 disable self contained build under NeXTstep
067d23c9
KY
2204 --enable-locallisppath=PATH
2205 directories Emacs should search for lisp files
2206 specific to this site
2207 --enable-checking[=LIST]
2208 enable expensive run-time checks. With LIST, enable
2209 only specific categories of checks. Categories are:
2210 all,yes,no. Flags are: stringbytes, stringoverrun,
7ee3791f 2211 stringfreelist, xmallocoverrun, conslist, glyphs
afd07e01
GM
2212 --enable-check-lisp-object-type
2213 enable compile time checks for the Lisp_Object data
2214 type. This is useful for development for catching
2215 certain types of bugs.
3dc00ee8
GM
2216 --enable-profiling build emacs with low-level, gprof profiling support.
2217 Mainly useful for debugging Emacs itself. May not
2218 work on all platforms. Stops profiler.el working.
067d23c9
KY
2219 --enable-autodepend automatically generate dependencies to .h-files.
2220 Requires GNU Make and Gcc. Enabled if GNU Make and
2221 Gcc is found
4efe5ef9
GM
2222 --enable-gtk-deprecation-warnings
2223 Show Gtk+/Gdk deprecation warnings for Gtk+ >= 3.0
743c80a7
PE
2224 --disable-dependency-tracking speeds up one-time build
2225 --enable-dependency-tracking do not reject slow dependency extractors
067d23c9 2226 --disable-largefile omit support for large files
ac924f35
GM
2227 --enable-gcc-warnings turn on lots of GCC warnings/errors. This is
2228 intended for developers, and may generate false
2229 alarms when used with older or non-GNU development
2230 tools.
e4d35030
GM
2231 --enable-link-time-optimization
2232 build emacs with link-time optimization. This is
2233 supported only for GCC since 4.5.0.
3a019ab4 2234 --disable-acl do not support ACLs
067d23c9
KY
2235
2236Optional Packages:
2237 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
2238 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
ee77919d
GM
2239 --without-all omit almost all features and build small executable
2240 with minimal dependencies
067d23c9
KY
2241 --without-pop don't support POP mail retrieval with movemail
2242 --with-kerberos support Kerberos-authenticated POP
2243 --with-kerberos5 support Kerberos version 5 authenticated POP
2244 --with-hesiod support Hesiod to get the POP server host
2245 --with-mmdf support MMDF mailboxes
2246 --with-mail-unlink unlink, rather than empty, mail spool after reading
2247 --with-mailhost=HOSTNAME
2248 string giving default POP mail host
dfdf7fe5
GM
2249 --with-sound=VALUE compile with sound support (VALUE one of: yes, alsa,
2250 oss, bsd-ossaudio, no; default yes). Only for
9dabd86d 2251 GNU/Linux, FreeBSD, NetBSD, MinGW.
4fa92495
GM
2252 --with-x-toolkit=KIT use an X toolkit (KIT one of: yes or gtk, gtk2,
2253 gtk3, lucid or athena, motif, no)
0442dc7f 2254 --with-wide-int prefer wide Emacs integers (typically 62-bit)
067d23c9
KY
2255 --without-xpm don't compile with XPM image support
2256 --without-jpeg don't compile with JPEG image support
2257 --without-tiff don't compile with TIFF image support
2258 --without-gif don't compile with GIF image support
2259 --without-png don't compile with PNG image support
2260 --without-rsvg don't compile with SVG image support
2261 --without-xml2 don't compile with XML parsing support
2262 --without-imagemagick don't compile with ImageMagick image support
2263 --without-xft don't use XFT for anti aliased fonts
2264 --without-libotf don't use libotf for OpenType font support
2265 --without-m17n-flt don't use m17n-flt for text shaping
2266 --without-toolkit-scroll-bars
2267 don't use Motif or Xaw3d scroll bars
2268 --without-xaw3d don't use Xaw3d
2269 --without-xim don't use X11 XIM
7834125e 2270 --with-ns use NeXTstep (Cocoa or GNUstep) windowing system
7c61eaab 2271 --with-w32 use native MS Windows GUI in a Cygwin build
067d23c9
KY
2272 --without-gpm don't use -lgpm for mouse support on a GNU/Linux
2273 console
2274 --without-dbus don't compile with D-Bus support
2275 --without-gconf don't compile with GConf support
f527bd02 2276 --without-gsettings don't compile with GSettings support
067d23c9
KY
2277 --without-selinux don't compile with SELinux support
2278 --without-gnutls don't use -lgnutls for SSL/TLS support
7a67e06b 2279 --without-zlib don't compile with zlib decompression support
0f55a32e
GM
2280 --with-file-notification=LIB
2281 use a file notification library (LIB one of: yes,
2282 gfile, inotify, w32, no)
067d23c9 2283 --without-makeinfo don't require makeinfo for building manuals
992ec28a
GM
2284 --without-compress-install
2285 don't compress some files (.el, .info, etc.) when
2286 installing. Equivalent to: make GZIP_PROG= install
b5591ebb
GM
2287 --with-pkg-config-prog=FILENAME
2288 file name of pkg-config for finding GTK and librsvg
4fc5868a 2289 --with-gameuser=USER user for shared game score files
b5591ebb
GM
2290 --with-gnustep-conf=FILENAME
2291 name of GNUstep.conf; default $GNUSTEP_CONFIG_FILE,
067d23c9
KY
2292 or /etc/GNUstep/GNUstep.conf
2293 --with-x use the X Window System
2294
2295Some influential environment variables:
2296 CC C compiler command
2297 CFLAGS C compiler flags
2298 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
2299 nonstandard directory <lib dir>
2300 LIBS libraries to pass to the linker, e.g. -l<library>
2301 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2302 you have headers in a nonstandard directory <include dir>
2303 CPP C preprocessor
2304 XMKMF Path to xmkmf, Makefile generator for X Window System
2305
2306Use these variables to override the choices made by `configure' or to help
2307it to find libraries and programs with nonstandard names/locations.
2308
2309Report bugs to the package provider.
2310_ACEOF
2311ac_status=$?
2312fi
2313
2314if test "$ac_init_help" = "recursive"; then
2315 # If there are subdirs, report their specific --help.
2316 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2317 test -d "$ac_dir" ||
2318 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2319 continue
2320 ac_builddir=.
2321
2322case "$ac_dir" in
2323.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2324*)
2325 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2326 # A ".." for each directory in $ac_dir_suffix.
2327 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2328 case $ac_top_builddir_sub in
2329 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2330 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2331 esac ;;
2332esac
2333ac_abs_top_builddir=$ac_pwd
2334ac_abs_builddir=$ac_pwd$ac_dir_suffix
2335# for backward compatibility:
2336ac_top_builddir=$ac_top_build_prefix
2337
2338case $srcdir in
2339 .) # We are building in place.
2340 ac_srcdir=.
2341 ac_top_srcdir=$ac_top_builddir_sub
2342 ac_abs_top_srcdir=$ac_pwd ;;
2343 [\\/]* | ?:[\\/]* ) # Absolute name.
2344 ac_srcdir=$srcdir$ac_dir_suffix;
2345 ac_top_srcdir=$srcdir
2346 ac_abs_top_srcdir=$srcdir ;;
2347 *) # Relative name.
2348 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2349 ac_top_srcdir=$ac_top_build_prefix$srcdir
2350 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2351esac
2352ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2353
2354 cd "$ac_dir" || { ac_status=$?; continue; }
2355 # Check for guested configure.
2356 if test -f "$ac_srcdir/configure.gnu"; then
2357 echo &&
2358 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2359 elif test -f "$ac_srcdir/configure"; then
2360 echo &&
2361 $SHELL "$ac_srcdir/configure" --help=recursive
2362 else
2363 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2364 fi || ac_status=$?
2365 cd "$ac_pwd" || { ac_status=$?; break; }
2366 done
2367fi
2368
2369test -n "$ac_init_help" && exit $ac_status
2370if $ac_init_version; then
2371 cat <<\_ACEOF
c574bc34 2372emacs configure 24.3.50
a9bec17c 2373generated by GNU Autoconf 2.65
067d23c9 2374
a9bec17c 2375Copyright (C) 2009 Free Software Foundation, Inc.
067d23c9
KY
2376This configure script is free software; the Free Software Foundation
2377gives unlimited permission to copy, distribute and modify it.
2378_ACEOF
2379 exit
2380fi
2381
2382## ------------------------ ##
2383## Autoconf initialization. ##
2384## ------------------------ ##
2385
2386# ac_fn_c_try_compile LINENO
2387# --------------------------
2388# Try to compile conftest.$ac_ext, and return whether this succeeded.
2389ac_fn_c_try_compile ()
2390{
2391 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2392 rm -f conftest.$ac_objext
2393 if { { ac_try="$ac_compile"
2394case "(($ac_try" in
2395 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2396 *) ac_try_echo=$ac_try;;
2397esac
2398eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2399$as_echo "$ac_try_echo"; } >&5
2400 (eval "$ac_compile") 2>conftest.err
2401 ac_status=$?
2402 if test -s conftest.err; then
2403 grep -v '^ *+' conftest.err >conftest.er1
2404 cat conftest.er1 >&5
2405 mv -f conftest.er1 conftest.err
2406 fi
2407 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2408 test $ac_status = 0; } && {
2409 test -z "$ac_c_werror_flag" ||
2410 test ! -s conftest.err
2411 } && test -s conftest.$ac_objext; then :
2412 ac_retval=0
2413else
2414 $as_echo "$as_me: failed program was:" >&5
2415sed 's/^/| /' conftest.$ac_ext >&5
2416
2417 ac_retval=1
2418fi
a9bec17c 2419 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
067d23c9
KY
2420 as_fn_set_status $ac_retval
2421
2422} # ac_fn_c_try_compile
2423
067d23c9
KY
2424# ac_fn_c_try_cpp LINENO
2425# ----------------------
2426# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2427ac_fn_c_try_cpp ()
2428{
2429 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2430 if { { ac_try="$ac_cpp conftest.$ac_ext"
2431case "(($ac_try" in
2432 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2433 *) ac_try_echo=$ac_try;;
2434esac
2435eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2436$as_echo "$ac_try_echo"; } >&5
2437 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2438 ac_status=$?
2439 if test -s conftest.err; then
2440 grep -v '^ *+' conftest.err >conftest.er1
2441 cat conftest.er1 >&5
2442 mv -f conftest.er1 conftest.err
2443 fi
2444 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
a9bec17c 2445 test $ac_status = 0; } >/dev/null && {
067d23c9
KY
2446 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2447 test ! -s conftest.err
2448 }; then :
2449 ac_retval=0
2450else
2451 $as_echo "$as_me: failed program was:" >&5
2452sed 's/^/| /' conftest.$ac_ext >&5
2453
2454 ac_retval=1
2455fi
a9bec17c 2456 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
067d23c9
KY
2457 as_fn_set_status $ac_retval
2458
2459} # ac_fn_c_try_cpp
2460
2461# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
2462# -------------------------------------------------------
2463# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2464# the include files in INCLUDES and setting the cache variable VAR
2465# accordingly.
2466ac_fn_c_check_header_mongrel ()
2467{
2468 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
a9bec17c 2469 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
067d23c9
KY
2470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2471$as_echo_n "checking for $2... " >&6; }
a9bec17c 2472if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
067d23c9
KY
2473 $as_echo_n "(cached) " >&6
2474fi
2475eval ac_res=\$$3
2476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2477$as_echo "$ac_res" >&6; }
2478else
2479 # Is the header compilable?
2480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2481$as_echo_n "checking $2 usability... " >&6; }
2482cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2483/* end confdefs.h. */
2484$4
2485#include <$2>
2486_ACEOF
2487if ac_fn_c_try_compile "$LINENO"; then :
2488 ac_header_compiler=yes
2489else
2490 ac_header_compiler=no
2491fi
2492rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2494$as_echo "$ac_header_compiler" >&6; }
2495
2496# Is the header present?
2497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2498$as_echo_n "checking $2 presence... " >&6; }
2499cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2500/* end confdefs.h. */
2501#include <$2>
2502_ACEOF
2503if ac_fn_c_try_cpp "$LINENO"; then :
2504 ac_header_preproc=yes
2505else
2506 ac_header_preproc=no
2507fi
a9bec17c 2508rm -f conftest.err conftest.$ac_ext
067d23c9
KY
2509{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2510$as_echo "$ac_header_preproc" >&6; }
2511
2512# So? What about this header?
2513case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
2514 yes:no: )
2515 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2516$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2517 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2518$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2519 ;;
2520 no:yes:* )
2521 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2522$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2523 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
2524$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
2525 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2526$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2527 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
2528$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
2529 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2530$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2531 ;;
2532esac
2533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2534$as_echo_n "checking for $2... " >&6; }
a9bec17c 2535if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
067d23c9
KY
2536 $as_echo_n "(cached) " >&6
2537else
2538 eval "$3=\$ac_header_compiler"
2539fi
2540eval ac_res=\$$3
2541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2542$as_echo "$ac_res" >&6; }
2543fi
a9bec17c 2544 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
067d23c9
KY
2545
2546} # ac_fn_c_check_header_mongrel
2547
2548# ac_fn_c_try_run LINENO
2549# ----------------------
2550# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2551# that executables *can* be run.
2552ac_fn_c_try_run ()
2553{
2554 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2555 if { { ac_try="$ac_link"
2556case "(($ac_try" in
2557 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2558 *) ac_try_echo=$ac_try;;
2559esac
2560eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2561$as_echo "$ac_try_echo"; } >&5
2562 (eval "$ac_link") 2>&5
2563 ac_status=$?
2564 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2565 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2566 { { case "(($ac_try" in
2567 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2568 *) ac_try_echo=$ac_try;;
2569esac
2570eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2571$as_echo "$ac_try_echo"; } >&5
2572 (eval "$ac_try") 2>&5
2573 ac_status=$?
2574 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2575 test $ac_status = 0; }; }; then :
2576 ac_retval=0
2577else
2578 $as_echo "$as_me: program exited with status $ac_status" >&5
2579 $as_echo "$as_me: failed program was:" >&5
2580sed 's/^/| /' conftest.$ac_ext >&5
2581
2582 ac_retval=$ac_status
2583fi
2584 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
a9bec17c 2585 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
067d23c9
KY
2586 as_fn_set_status $ac_retval
2587
2588} # ac_fn_c_try_run
2589
2590# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2591# -------------------------------------------------------
2592# Tests whether HEADER exists and can be compiled using the include files in
2593# INCLUDES, setting the cache variable VAR accordingly.
2594ac_fn_c_check_header_compile ()
2595{
2596 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2597 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2598$as_echo_n "checking for $2... " >&6; }
a9bec17c 2599if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
067d23c9
KY
2600 $as_echo_n "(cached) " >&6
2601else
2602 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2603/* end confdefs.h. */
2604$4
2605#include <$2>
2606_ACEOF
2607if ac_fn_c_try_compile "$LINENO"; then :
2608 eval "$3=yes"
2609else
2610 eval "$3=no"
2611fi
2612rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2613fi
2614eval ac_res=\$$3
2615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2616$as_echo "$ac_res" >&6; }
a9bec17c 2617 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
067d23c9
KY
2618
2619} # ac_fn_c_check_header_compile
2620
1fd182f0
PE
2621# ac_fn_c_try_link LINENO
2622# -----------------------
2623# Try to link conftest.$ac_ext, and return whether this succeeded.
2624ac_fn_c_try_link ()
2625{
2626 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2627 rm -f conftest.$ac_objext conftest$ac_exeext
2628 if { { ac_try="$ac_link"
2629case "(($ac_try" in
2630 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2631 *) ac_try_echo=$ac_try;;
2632esac
2633eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2634$as_echo "$ac_try_echo"; } >&5
2635 (eval "$ac_link") 2>conftest.err
2636 ac_status=$?
2637 if test -s conftest.err; then
2638 grep -v '^ *+' conftest.err >conftest.er1
2639 cat conftest.er1 >&5
2640 mv -f conftest.er1 conftest.err
2641 fi
2642 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2643 test $ac_status = 0; } && {
2644 test -z "$ac_c_werror_flag" ||
2645 test ! -s conftest.err
2646 } && test -s conftest$ac_exeext && {
2647 test "$cross_compiling" = yes ||
2648 $as_test_x conftest$ac_exeext
2649 }; then :
2650 ac_retval=0
2651else
2652 $as_echo "$as_me: failed program was:" >&5
2653sed 's/^/| /' conftest.$ac_ext >&5
2654
2655 ac_retval=1
2656fi
2657 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2658 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2659 # interfere with the next link command; also delete a directory that is
2660 # left behind by Apple's compiler. We do this before executing the actions.
2661 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
a9bec17c 2662 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1fd182f0
PE
2663 as_fn_set_status $ac_retval
2664
2665} # ac_fn_c_try_link
2666
42bbbe8b
GM
2667# ac_fn_c_check_decl LINENO SYMBOL VAR
2668# ------------------------------------
2669# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2670ac_fn_c_check_decl ()
2671{
2672 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5
2674$as_echo_n "checking whether $2 is declared... " >&6; }
2675if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2676 $as_echo_n "(cached) " >&6
2677else
2678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2679/* end confdefs.h. */
2680$4
2681int
2682main ()
2683{
2684#ifndef $2
2685 (void) $2;
2686#endif
2687
2688 ;
2689 return 0;
2690}
2691_ACEOF
2692if ac_fn_c_try_compile "$LINENO"; then :
2693 eval "$3=yes"
2694else
2695 eval "$3=no"
2696fi
2697rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2698fi
2699eval ac_res=\$$3
2700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2701$as_echo "$ac_res" >&6; }
2702 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2703
2704} # ac_fn_c_check_decl
2705
5476a9a4
GM
2706# ac_fn_c_check_header_preproc LINENO HEADER VAR
2707# ----------------------------------------------
2708# Tests whether HEADER is present, setting the cache variable VAR accordingly.
2709ac_fn_c_check_header_preproc ()
067d23c9
KY
2710{
2711 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2712 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2713$as_echo_n "checking for $2... " >&6; }
a9bec17c 2714if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
067d23c9
KY
2715 $as_echo_n "(cached) " >&6
2716else
2717 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2718/* end confdefs.h. */
5476a9a4
GM
2719#include <$2>
2720_ACEOF
2721if ac_fn_c_try_cpp "$LINENO"; then :
2722 eval "$3=yes"
2723else
2724 eval "$3=no"
2725fi
2726rm -f conftest.err conftest.$ac_ext
2727fi
2728eval ac_res=\$$3
2729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2730$as_echo "$ac_res" >&6; }
2731 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
067d23c9 2732
5476a9a4 2733} # ac_fn_c_check_header_preproc
067d23c9 2734
5476a9a4
GM
2735# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2736# ----------------------------------------------------
2737# Tries to find if the field MEMBER exists in type AGGR, after including
2738# INCLUDES, setting cache variable VAR accordingly.
2739ac_fn_c_check_member ()
2740{
2741 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2743$as_echo_n "checking for $2.$3... " >&6; }
2744if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2745 $as_echo_n "(cached) " >&6
2746else
2747 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2748/* end confdefs.h. */
2749$5
2750int
2751main ()
2752{
2753static $2 ac_aggr;
2754if (ac_aggr.$3)
2755return 0;
2756 ;
2757 return 0;
2758}
2759_ACEOF
2760if ac_fn_c_try_compile "$LINENO"; then :
2761 eval "$4=yes"
2762else
2763 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2764/* end confdefs.h. */
2765$5
2766int
2767main ()
2768{
2769static $2 ac_aggr;
2770if (sizeof ac_aggr.$3)
2771return 0;
2772 ;
2773 return 0;
2774}
2775_ACEOF
2776if ac_fn_c_try_compile "$LINENO"; then :
2777 eval "$4=yes"
2778else
2779 eval "$4=no"
2780fi
2781rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2782fi
2783rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2784fi
2785eval ac_res=\$$4
2786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2787$as_echo "$ac_res" >&6; }
2788 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2789
2790} # ac_fn_c_check_member
2791
2792# ac_fn_c_check_func LINENO FUNC VAR
2793# ----------------------------------
2794# Tests whether FUNC exists, setting the cache variable VAR accordingly
2795ac_fn_c_check_func ()
2796{
2797 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2799$as_echo_n "checking for $2... " >&6; }
2800if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2801 $as_echo_n "(cached) " >&6
2802else
2803 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2804/* end confdefs.h. */
2805/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2806 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2807#define $2 innocuous_$2
2808
2809/* System header to define __stub macros and hopefully few prototypes,
2810 which can conflict with char $2 (); below.
2811 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2812 <limits.h> exists even on freestanding compilers. */
2813
2814#ifdef __STDC__
067d23c9
KY
2815# include <limits.h>
2816#else
2817# include <assert.h>
2818#endif
2819
2820#undef $2
2821
2822/* Override any GCC internal prototype to avoid an error.
2823 Use char because int might match the return type of a GCC
2824 builtin and then its argument prototype would still apply. */
2825#ifdef __cplusplus
2826extern "C"
2827#endif
2828char $2 ();
2829/* The GNU C library defines this for functions which it implements
2830 to always fail with ENOSYS. Some functions are actually named
2831 something starting with __ and the normal name is an alias. */
2832#if defined __stub_$2 || defined __stub___$2
2833choke me
2834#endif
2835
2836int
2837main ()
2838{
2839return $2 ();
2840 ;
2841 return 0;
2842}
2843_ACEOF
2844if ac_fn_c_try_link "$LINENO"; then :
2845 eval "$3=yes"
2846else
2847 eval "$3=no"
2848fi
2849rm -f core conftest.err conftest.$ac_objext \
2850 conftest$ac_exeext conftest.$ac_ext
2851fi
2852eval ac_res=\$$3
2853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2854$as_echo "$ac_res" >&6; }
a9bec17c 2855 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
067d23c9
KY
2856
2857} # ac_fn_c_check_func
2858
5476a9a4
GM
2859# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2860# -------------------------------------------
2861# Tests whether TYPE exists after having included INCLUDES, setting cache
2862# variable VAR accordingly.
2863ac_fn_c_check_type ()
3e0be4ab
GM
2864{
2865 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
5476a9a4
GM
2866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2867$as_echo_n "checking for $2... " >&6; }
2868if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
3e0be4ab
GM
2869 $as_echo_n "(cached) " >&6
2870else
5476a9a4 2871 eval "$3=no"
3e0be4ab
GM
2872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2873/* end confdefs.h. */
5476a9a4 2874$4
3e0be4ab
GM
2875int
2876main ()
2877{
5476a9a4
GM
2878if (sizeof ($2))
2879 return 0;
3e0be4ab
GM
2880 ;
2881 return 0;
2882}
2883_ACEOF
2884if ac_fn_c_try_compile "$LINENO"; then :
2885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2886/* end confdefs.h. */
5476a9a4 2887$4
3e0be4ab
GM
2888int
2889main ()
2890{
5476a9a4
GM
2891if (sizeof (($2)))
2892 return 0;
3e0be4ab
GM
2893 ;
2894 return 0;
2895}
2896_ACEOF
2897if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4 2898
3e0be4ab 2899else
5476a9a4 2900 eval "$3=yes"
3e0be4ab
GM
2901fi
2902rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2903fi
2904rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2905fi
5476a9a4 2906eval ac_res=\$$3
3e0be4ab
GM
2907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2908$as_echo "$ac_res" >&6; }
a9bec17c 2909 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
3e0be4ab 2910
5476a9a4 2911} # ac_fn_c_check_type
3e0be4ab 2912
5f90be1b
PE
2913# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2914# --------------------------------------------
2915# Tries to find the compile-time value of EXPR in a program that includes
2916# INCLUDES, setting VAR accordingly. Returns whether the value could be
2917# computed
2918ac_fn_c_compute_int ()
2919{
2920 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2921 if test "$cross_compiling" = yes; then
2922 # Depending upon the size, compute the lo and hi bounds.
2923cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2924/* end confdefs.h. */
2925$4
2926int
2927main ()
2928{
2929static int test_array [1 - 2 * !(($2) >= 0)];
2930test_array [0] = 0
2931
2932 ;
2933 return 0;
2934}
2935_ACEOF
2936if ac_fn_c_try_compile "$LINENO"; then :
2937 ac_lo=0 ac_mid=0
2938 while :; do
2939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2940/* end confdefs.h. */
2941$4
2942int
2943main ()
2944{
2945static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2946test_array [0] = 0
2947
2948 ;
2949 return 0;
2950}
2951_ACEOF
2952if ac_fn_c_try_compile "$LINENO"; then :
2953 ac_hi=$ac_mid; break
2954else
2955 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2956 if test $ac_lo -le $ac_mid; then
2957 ac_lo= ac_hi=
2958 break
2959 fi
2960 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2961fi
2962rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2963 done
2964else
2965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2966/* end confdefs.h. */
2967$4
2968int
2969main ()
2970{
2971static int test_array [1 - 2 * !(($2) < 0)];
2972test_array [0] = 0
2973
2974 ;
2975 return 0;
2976}
2977_ACEOF
2978if ac_fn_c_try_compile "$LINENO"; then :
2979 ac_hi=-1 ac_mid=-1
2980 while :; do
2981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2982/* end confdefs.h. */
2983$4
2984int
2985main ()
2986{
2987static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2988test_array [0] = 0
2989
2990 ;
2991 return 0;
2992}
2993_ACEOF
2994if ac_fn_c_try_compile "$LINENO"; then :
2995 ac_lo=$ac_mid; break
2996else
2997 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2998 if test $ac_mid -le $ac_hi; then
2999 ac_lo= ac_hi=
3000 break
3001 fi
3002 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
3003fi
3004rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3005 done
3006else
3007 ac_lo= ac_hi=
3008fi
3009rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3010fi
3011rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3012# Binary search between lo and hi bounds.
3013while test "x$ac_lo" != "x$ac_hi"; do
3014 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
3015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3016/* end confdefs.h. */
3017$4
3018int
3019main ()
3020{
3021static int test_array [1 - 2 * !(($2) <= $ac_mid)];
3022test_array [0] = 0
3023
3024 ;
3025 return 0;
3026}
3027_ACEOF
3028if ac_fn_c_try_compile "$LINENO"; then :
3029 ac_hi=$ac_mid
3030else
3031 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
3032fi
3033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3034done
3035case $ac_lo in #((
3036?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
3037'') ac_retval=1 ;;
3038esac
3039 else
3040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3041/* end confdefs.h. */
3042$4
3043static long int longval () { return $2; }
3044static unsigned long int ulongval () { return $2; }
3045#include <stdio.h>
3046#include <stdlib.h>
3047int
3048main ()
3049{
3050
3051 FILE *f = fopen ("conftest.val", "w");
3052 if (! f)
3053 return 1;
3054 if (($2) < 0)
3055 {
3056 long int i = longval ();
3057 if (i != ($2))
3058 return 1;
3059 fprintf (f, "%ld", i);
3060 }
3061 else
3062 {
3063 unsigned long int i = ulongval ();
3064 if (i != ($2))
3065 return 1;
3066 fprintf (f, "%lu", i);
3067 }
3068 /* Do not output a trailing newline, as this causes \r\n confusion
3069 on some platforms. */
3070 return ferror (f) || fclose (f) != 0;
3071
3072 ;
3073 return 0;
3074}
3075_ACEOF
3076if ac_fn_c_try_run "$LINENO"; then :
3077 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
3078else
3079 ac_retval=1
3080fi
3081rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3082 conftest.$ac_objext conftest.beam conftest.$ac_ext
3083rm -f conftest.val
3084
3085 fi
a9bec17c 3086 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
5f90be1b
PE
3087 as_fn_set_status $ac_retval
3088
3089} # ac_fn_c_compute_int
067d23c9
KY
3090cat >config.log <<_ACEOF
3091This file contains any messages produced by compilers while
3092running configure, to aid debugging if configure makes a mistake.
3093
c574bc34 3094It was created by emacs $as_me 24.3.50, which was
a9bec17c 3095generated by GNU Autoconf 2.65. Invocation command line was
067d23c9
KY
3096
3097 $ $0 $@
3098
3099_ACEOF
3100exec 5>>config.log
3101{
3102cat <<_ASUNAME
3103## --------- ##
3104## Platform. ##
3105## --------- ##
3106
3107hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3108uname -m = `(uname -m) 2>/dev/null || echo unknown`
3109uname -r = `(uname -r) 2>/dev/null || echo unknown`
3110uname -s = `(uname -s) 2>/dev/null || echo unknown`
3111uname -v = `(uname -v) 2>/dev/null || echo unknown`
3112
3113/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3114/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
3115
3116/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
3117/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
3118/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3119/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
3120/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
3121/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
3122/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
3123
3124_ASUNAME
3125
3126as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3127for as_dir in $PATH
3128do
3129 IFS=$as_save_IFS
3130 test -z "$as_dir" && as_dir=.
3131 $as_echo "PATH: $as_dir"
3132 done
3133IFS=$as_save_IFS
3134
3135} >&5
3136
3137cat >&5 <<_ACEOF
3138
3139
3140## ----------- ##
3141## Core tests. ##
3142## ----------- ##
3143
3144_ACEOF
3145
3146
3147# Keep a trace of the command line.
3148# Strip out --no-create and --no-recursion so they do not pile up.
3149# Strip out --silent because we don't want to record it for future runs.
3150# Also quote any args containing shell meta-characters.
3151# Make two passes to allow for proper duplicate-argument suppression.
3152ac_configure_args=
3153ac_configure_args0=
3154ac_configure_args1=
3155ac_must_keep_next=false
3156for ac_pass in 1 2
3157do
3158 for ac_arg
3159 do
3160 case $ac_arg in
3161 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3162 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3163 | -silent | --silent | --silen | --sile | --sil)
3164 continue ;;
3165 *\'*)
3166 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3167 esac
3168 case $ac_pass in
3169 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3170 2)
3171 as_fn_append ac_configure_args1 " '$ac_arg'"
3172 if test $ac_must_keep_next = true; then
3173 ac_must_keep_next=false # Got value, back to normal.
3174 else
3175 case $ac_arg in
3176 *=* | --config-cache | -C | -disable-* | --disable-* \
3177 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3178 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3179 | -with-* | --with-* | -without-* | --without-* | --x)
3180 case "$ac_configure_args0 " in
3181 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3182 esac
3183 ;;
3184 -* ) ac_must_keep_next=true ;;
3185 esac
3186 fi
3187 as_fn_append ac_configure_args " '$ac_arg'"
3188 ;;
3189 esac
3190 done
3191done
3192{ ac_configure_args0=; unset ac_configure_args0;}
3193{ ac_configure_args1=; unset ac_configure_args1;}
3194
3195# When interrupted or exit'd, cleanup temporary files, and complete
3196# config.log. We remove comments because anyway the quotes in there
3197# would cause problems or look ugly.
3198# WARNING: Use '\'' to represent an apostrophe within the trap.
3199# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3200trap 'exit_status=$?
3201 # Save into config.log some information that might help in debugging.
3202 {
3203 echo
3204
a9bec17c
GM
3205 cat <<\_ASBOX
3206## ---------------- ##
067d23c9 3207## Cache variables. ##
a9bec17c
GM
3208## ---------------- ##
3209_ASBOX
067d23c9
KY
3210 echo
3211 # The following way of writing the cache mishandles newlines in values,
3212(
3213 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3214 eval ac_val=\$$ac_var
3215 case $ac_val in #(
3216 *${as_nl}*)
3217 case $ac_var in #(
3218 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3219$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3220 esac
3221 case $ac_var in #(
3222 _ | IFS | as_nl) ;; #(
3223 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3224 *) { eval $ac_var=; unset $ac_var;} ;;
3225 esac ;;
3226 esac
3227 done
3228 (set) 2>&1 |
3229 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3230 *${as_nl}ac_space=\ *)
3231 sed -n \
3232 "s/'\''/'\''\\\\'\'''\''/g;
3233 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3234 ;; #(
3235 *)
3236 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3237 ;;
3238 esac |
3239 sort
3240)
3241 echo
3242
a9bec17c
GM
3243 cat <<\_ASBOX
3244## ----------------- ##
067d23c9 3245## Output variables. ##
a9bec17c
GM
3246## ----------------- ##
3247_ASBOX
067d23c9
KY
3248 echo
3249 for ac_var in $ac_subst_vars
3250 do
3251 eval ac_val=\$$ac_var
3252 case $ac_val in
3253 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3254 esac
3255 $as_echo "$ac_var='\''$ac_val'\''"
3256 done | sort
3257 echo
3258
3259 if test -n "$ac_subst_files"; then
a9bec17c
GM
3260 cat <<\_ASBOX
3261## ------------------- ##
067d23c9 3262## File substitutions. ##
a9bec17c
GM
3263## ------------------- ##
3264_ASBOX
067d23c9
KY
3265 echo
3266 for ac_var in $ac_subst_files
3267 do
3268 eval ac_val=\$$ac_var
3269 case $ac_val in
3270 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3271 esac
3272 $as_echo "$ac_var='\''$ac_val'\''"
3273 done | sort
3274 echo
3275 fi
3276
3277 if test -s confdefs.h; then
a9bec17c
GM
3278 cat <<\_ASBOX
3279## ----------- ##
067d23c9 3280## confdefs.h. ##
a9bec17c
GM
3281## ----------- ##
3282_ASBOX
067d23c9
KY
3283 echo
3284 cat confdefs.h
3285 echo
3286 fi
3287 test "$ac_signal" != 0 &&
3288 $as_echo "$as_me: caught signal $ac_signal"
3289 $as_echo "$as_me: exit $exit_status"
3290 } >&5
3291 rm -f core *.core core.conftest.* &&
3292 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3293 exit $exit_status
3294' 0
3295for ac_signal in 1 2 13 15; do
3296 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3297done
3298ac_signal=0
3299
3300# confdefs.h avoids OS command line length limits that DEFS can exceed.
3301rm -f -r conftest* confdefs.h
3302
3303$as_echo "/* confdefs.h */" > confdefs.h
3304
3305# Predefined preprocessor variables.
3306
3307cat >>confdefs.h <<_ACEOF
3308#define PACKAGE_NAME "$PACKAGE_NAME"
3309_ACEOF
3310
3311cat >>confdefs.h <<_ACEOF
3312#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3313_ACEOF
3314
3315cat >>confdefs.h <<_ACEOF
3316#define PACKAGE_VERSION "$PACKAGE_VERSION"
3317_ACEOF
3318
3319cat >>confdefs.h <<_ACEOF
3320#define PACKAGE_STRING "$PACKAGE_STRING"
3321_ACEOF
3322
3323cat >>confdefs.h <<_ACEOF
3324#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3325_ACEOF
3326
3327cat >>confdefs.h <<_ACEOF
3328#define PACKAGE_URL "$PACKAGE_URL"
3329_ACEOF
3330
3331
3332# Let the site file select an alternate cache file if it wants to.
3333# Prefer an explicitly selected file to automatically selected ones.
3334ac_site_file1=NONE
3335ac_site_file2=NONE
3336if test -n "$CONFIG_SITE"; then
a9bec17c 3337 ac_site_file1=$CONFIG_SITE
067d23c9
KY
3338elif test "x$prefix" != xNONE; then
3339 ac_site_file1=$prefix/share/config.site
3340 ac_site_file2=$prefix/etc/config.site
3341else
3342 ac_site_file1=$ac_default_prefix/share/config.site
3343 ac_site_file2=$ac_default_prefix/etc/config.site
3344fi
3345for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3346do
3347 test "x$ac_site_file" = xNONE && continue
3348 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3349 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3350$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3351 sed 's/^/| /' "$ac_site_file" >&5
a9bec17c 3352 . "$ac_site_file"
067d23c9
KY
3353 fi
3354done
3355
3356if test -r "$cache_file"; then
3357 # Some versions of bash will fail to source /dev/null (special files
3358 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
3359 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3360 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3361$as_echo "$as_me: loading cache $cache_file" >&6;}
3362 case $cache_file in
3363 [\\/]* | ?:[\\/]* ) . "$cache_file";;
3364 *) . "./$cache_file";;
3365 esac
3366 fi
3367else
3368 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3369$as_echo "$as_me: creating cache $cache_file" >&6;}
3370 >$cache_file
3371fi
3372
5476a9a4 3373as_fn_append ac_header_list " sys/systeminfo.h"
5476a9a4
GM
3374as_fn_append ac_header_list " coff.h"
3375as_fn_append ac_header_list " pty.h"
5476a9a4
GM
3376as_fn_append ac_header_list " sys/resource.h"
3377as_fn_append ac_header_list " sys/utsname.h"
3378as_fn_append ac_header_list " pwd.h"
3379as_fn_append ac_header_list " utmp.h"
5476a9a4
GM
3380as_fn_append ac_header_list " util.h"
3381as_fn_append ac_header_list " sys/socket.h"
3382as_fn_append ac_header_list " stdlib.h"
3383as_fn_append ac_header_list " unistd.h"
7e723570 3384as_fn_append ac_header_list " sys/param.h"
5476a9a4
GM
3385as_fn_append ac_header_list " pthread.h"
3386as_fn_append ac_header_list " malloc/malloc.h"
3387as_fn_append ac_header_list " maillock.h"
3388as_fn_append ac_header_list " sys/un.h"
3389as_fn_append ac_func_list " tzset"
3390as_fn_append ac_func_list " readlinkat"
d7ad186c 3391as_fn_append ac_header_list " dirent.h"
8966cbff 3392as_fn_append ac_header_list " execinfo.h"
710f5812 3393as_fn_append ac_func_list " faccessat"
0cdca42a 3394as_fn_append ac_func_list " fcntl"
d7ad186c 3395as_fn_append ac_func_list " fdopendir"
eda33f78 3396as_fn_append ac_header_list " stdio_ext.h"
d7ad186c 3397as_fn_append ac_func_list " fstatat"
2407788f 3398as_fn_append ac_func_list " fsync"
f199cab1
GM
3399gl_getopt_required=GNU
3400as_fn_append ac_header_list " getopt.h"
3401as_fn_append ac_func_list " gettimeofday"
3402as_fn_append ac_func_list " nanotime"
e700232f 3403as_fn_append ac_header_list " sys/time.h"
f199cab1
GM
3404as_fn_append ac_header_list " wchar.h"
3405as_fn_append ac_header_list " stdint.h"
3406as_fn_append ac_header_list " inttypes.h"
3407as_fn_append ac_func_list " lstat"
e412eb97 3408as_fn_append ac_func_list " mkostemp"
0cdca42a 3409as_fn_append ac_func_list " pipe2"
f199cab1
GM
3410as_fn_append ac_header_list " sys/select.h"
3411as_fn_append ac_func_list " pselect"
3412as_fn_append ac_func_list " pthread_sigmask"
3413as_fn_append ac_func_list " readlink"
f199cab1
GM
3414as_fn_append ac_func_list " strtoimax"
3415as_fn_append ac_func_list " strtoumax"
3416as_fn_append ac_func_list " symlink"
3417as_fn_append ac_header_list " sys/stat.h"
3418as_fn_append ac_func_list " localtime_r"
e700232f 3419as_fn_append ac_header_list " utime.h"
f199cab1
GM
3420as_fn_append ac_func_list " futimes"
3421as_fn_append ac_func_list " futimesat"
3422as_fn_append ac_func_list " futimens"
3423as_fn_append ac_func_list " utimensat"
3424as_fn_append ac_func_list " lutimes"
0cdca42a 3425as_fn_append ac_func_list " getdtablesize"
e412eb97 3426as_fn_append ac_func_list " secure_getenv"
067d23c9
KY
3427# Check that the precious variables saved in the cache have kept the same
3428# value.
3429ac_cache_corrupted=false
3430for ac_var in $ac_precious_vars; do
3431 eval ac_old_set=\$ac_cv_env_${ac_var}_set
3432 eval ac_new_set=\$ac_env_${ac_var}_set
3433 eval ac_old_val=\$ac_cv_env_${ac_var}_value
3434 eval ac_new_val=\$ac_env_${ac_var}_value
3435 case $ac_old_set,$ac_new_set in
3436 set,)
3437 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3438$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3439 ac_cache_corrupted=: ;;
3440 ,set)
3441 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3442$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3443 ac_cache_corrupted=: ;;
3444 ,);;
3445 *)
3446 if test "x$ac_old_val" != "x$ac_new_val"; then
3447 # differences in whitespace do not lead to failure.
3448 ac_old_val_w=`echo x $ac_old_val`
3449 ac_new_val_w=`echo x $ac_new_val`
3450 if test "$ac_old_val_w" != "$ac_new_val_w"; then
3451 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3452$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3453 ac_cache_corrupted=:
3454 else
3455 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3456$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3457 eval $ac_var=\$ac_old_val
3458 fi
3459 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
3460$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
3461 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
3462$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
3463 fi;;
3464 esac
3465 # Pass precious variables to config.status.
3466 if test "$ac_new_set" = set; then
3467 case $ac_new_val in
3468 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3469 *) ac_arg=$ac_var=$ac_new_val ;;
3470 esac
3471 case " $ac_configure_args " in
3472 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
3473 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3474 esac
3475 fi
3476done
3477if $ac_cache_corrupted; then
3478 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3479$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3480 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3481$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
a9bec17c 3482 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
067d23c9
KY
3483fi
3484## -------------------- ##
3485## Main body of script. ##
3486## -------------------- ##
3487
3488ac_ext=c
3489ac_cpp='$CPP $CPPFLAGS'
3490ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3491ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3492ac_compiler_gnu=$ac_cv_c_compiler_gnu
3493
3494
2f559cd2 3495
1df7c7ca
GM
3496emacs_config_options=
3497optsep=
3498for opt in ${1+"$@"} CFLAGS CPPFLAGS LDFLAGS; do
3499 case $opt in
3500 -n | --no-create | --no-recursion)
3501 continue ;;
3502 CFLAGS | CPPFLAGS | LDFLAGS)
3503 eval 'test "${'$opt'+set}" = set' || continue
3504 case " $*" in
3505 *" $opt="*) continue ;;
3506 esac
3507 eval opt=$opt=\$$opt ;;
3508 esac
3509
3510 emacs_shell_specials=$IFS\''"#$&()*;<>?[\\`{|~'
3511 case $opt in
3512 *["$emacs_shell_specials"]*)
3513 case $opt in
3514 *\'*)
3515 emacs_quote_apostrophes="s/'/'\\\\''/g"
3516 opt=`$as_echo "$opt" | sed "$emacs_quote_apostrophes"` ;;
3517 esac
3518 opt="'$opt'"
3519 case $opt in
3520 *['"\\']*)
3521 emacs_quote_for_c='s/["\\]/\\&/g; $!s/$/\\n\\/'
3522 opt=`$as_echo "$opt" | sed "$emacs_quote_for_c"` ;;
3523 esac ;;
3524 esac
3525 as_fn_append emacs_config_options "$optsep$opt"
3526 optsep=' '
2f559cd2
GM
3527done
3528
067d23c9
KY
3529ac_config_headers="$ac_config_headers src/config.h:src/config.in"
3530
3531
743c80a7 3532ac_aux_dir=
369e19fc 3533for ac_dir in build-aux "$srcdir"/build-aux; do
a9bec17c
GM
3534 for ac_t in install-sh install.sh shtool; do
3535 if test -f "$ac_dir/$ac_t"; then
3536 ac_aux_dir=$ac_dir
3537 ac_install_sh="$ac_aux_dir/$ac_t -c"
3538 break 2
3539 fi
3540 done
743c80a7
PE
3541done
3542if test -z "$ac_aux_dir"; then
a9bec17c 3543 as_fn_error "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
743c80a7 3544fi
067d23c9 3545
743c80a7
PE
3546# These three variables are undocumented and unsupported,
3547# and are intended to be withdrawn in a future Autoconf release.
3548# They can cause serious problems if a builder's source tree is in a directory
3549# whose full name contains unusual characters.
3550ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
3551ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
3552ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
067d23c9 3553
067d23c9 3554
369e19fc
PE
3555am__api_version='1.11'
3556
743c80a7
PE
3557# Find a good install program. We prefer a C program (faster),
3558# so one script is as good as another. But avoid the broken or
3559# incompatible versions:
3560# SysV /etc/install, /usr/sbin/install
3561# SunOS /usr/etc/install
3562# IRIX /sbin/install
3563# AIX /bin/install
3564# AmigaOS /C/install, which installs bootblocks on floppy discs
3565# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3566# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3567# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3568# OS/2's system install, which has a completely different semantic
3569# ./install, which can be erroneously created by make from ./install.sh.
3570# Reject install programs that cannot install multiple files.
3571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
3572$as_echo_n "checking for a BSD-compatible install... " >&6; }
3573if test -z "$INSTALL"; then
a9bec17c 3574if test "${ac_cv_path_install+set}" = set; then :
743c80a7
PE
3575 $as_echo_n "(cached) " >&6
3576else
3577 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3578for as_dir in $PATH
3579do
3580 IFS=$as_save_IFS
3581 test -z "$as_dir" && as_dir=.
3582 # Account for people who put trailing slashes in PATH elements.
3583case $as_dir/ in #((
3584 ./ | .// | /[cC]/* | \
3585 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3586 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
3587 /usr/ucb/* ) ;;
3588 *)
3589 # OSF1 and SCO ODT 3.0 have their own names for install.
3590 # Don't use installbsd from OSF since it installs stuff as root
3591 # by default.
3592 for ac_prog in ginstall scoinst install; do
3593 for ac_exec_ext in '' $ac_executable_extensions; do
3594 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
3595 if test $ac_prog = install &&
3596 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3597 # AIX install. It has an incompatible calling convention.
3598 :
3599 elif test $ac_prog = install &&
3600 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3601 # program-specific install script used by HP pwplus--don't use.
3602 :
3603 else
3604 rm -rf conftest.one conftest.two conftest.dir
3605 echo one > conftest.one
3606 echo two > conftest.two
3607 mkdir conftest.dir
3608 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
3609 test -s conftest.one && test -s conftest.two &&
3610 test -s conftest.dir/conftest.one &&
3611 test -s conftest.dir/conftest.two
3612 then
3613 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3614 break 3
3615 fi
3616 fi
3617 fi
3618 done
3619 done
3620 ;;
3621esac
067d23c9 3622
743c80a7
PE
3623 done
3624IFS=$as_save_IFS
067d23c9 3625
743c80a7 3626rm -rf conftest.one conftest.two conftest.dir
067d23c9 3627
067d23c9 3628fi
743c80a7
PE
3629 if test "${ac_cv_path_install+set}" = set; then
3630 INSTALL=$ac_cv_path_install
3631 else
3632 # As a last resort, use the slow shell script. Don't cache a
3633 # value for INSTALL within a source directory, because that will
3634 # break other packages using the cache if that directory is
3635 # removed, or if the value is a relative name.
3636 INSTALL=$ac_install_sh
3637 fi
067d23c9 3638fi
743c80a7
PE
3639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
3640$as_echo "$INSTALL" >&6; }
067d23c9 3641
743c80a7
PE
3642# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3643# It thinks the first close brace ends the variable substitution.
3644test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
067d23c9 3645
743c80a7 3646test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
067d23c9 3647
743c80a7 3648test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
067d23c9 3649
743c80a7
PE
3650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
3651$as_echo_n "checking whether build environment is sane... " >&6; }
3652# Just in case
3653sleep 1
3654echo timestamp > conftest.file
3655# Reject unsafe characters in $srcdir or the absolute working directory
3656# name. Accept space and tab only in the latter.
3657am_lf='
3658'
3659case `pwd` in
3660 *[\\\"\#\$\&\'\`$am_lf]*)
a9bec17c 3661 as_fn_error "unsafe absolute working directory name" "$LINENO" 5;;
743c80a7
PE
3662esac
3663case $srcdir in
3664 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
a9bec17c 3665 as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
743c80a7 3666esac
067d23c9 3667
743c80a7
PE
3668# Do `set' in a subshell so we don't clobber the current shell's
3669# arguments. Must try -L first in case configure is actually a
3670# symlink; some systems play weird games with the mod time of symlinks
3671# (eg FreeBSD returns the mod time of the symlink's containing
3672# directory).
3673if (
3674 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
3675 if test "$*" = "X"; then
3676 # -L didn't work.
3677 set X `ls -t "$srcdir/configure" conftest.file`
3678 fi
3679 rm -f conftest.file
3680 if test "$*" != "X $srcdir/configure conftest.file" \
3681 && test "$*" != "X conftest.file $srcdir/configure"; then
3682
3683 # If neither matched, then we have a broken ls. This can happen
3684 # if, for instance, CONFIG_SHELL is bash and it inherits a
3685 # broken ls alias from the environment. This has actually
3686 # happened. Such a system could not be considered "sane".
a9bec17c 3687 as_fn_error "ls -t appears to fail. Make sure there is not a broken
743c80a7
PE
3688alias in your environment" "$LINENO" 5
3689 fi
067d23c9 3690
743c80a7
PE
3691 test "$2" = conftest.file
3692 )
3693then
3694 # Ok.
3695 :
067d23c9 3696else
a9bec17c 3697 as_fn_error "newly created file is older than distributed files!
743c80a7 3698Check your system clock" "$LINENO" 5
067d23c9 3699fi
743c80a7
PE
3700{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3701$as_echo "yes" >&6; }
3702test "$program_prefix" != NONE &&
3703 program_transform_name="s&^&$program_prefix&;$program_transform_name"
3704# Use a double $ so make ignores it.
3705test "$program_suffix" != NONE &&
3706 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
3707# Double any \ or $.
3708# By default was `s,x,x', remove it if useless.
3709ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
3710program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
067d23c9 3711
743c80a7
PE
3712# expand $ac_aux_dir to an absolute path
3713am_aux_dir=`cd $ac_aux_dir && pwd`
067d23c9 3714
743c80a7
PE
3715if test x"${MISSING+set}" != xset; then
3716 case $am_aux_dir in
3717 *\ * | *\ *)
3718 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
3719 *)
3720 MISSING="\${SHELL} $am_aux_dir/missing" ;;
3721 esac
067d23c9 3722fi
743c80a7
PE
3723# Use eval to expand $SHELL
3724if eval "$MISSING --run true"; then
3725 am_missing_run="$MISSING --run "
067d23c9 3726else
743c80a7
PE
3727 am_missing_run=
3728 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
3729$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
067d23c9
KY
3730fi
3731
743c80a7
PE
3732if test x"${install_sh}" != xset; then
3733 case $am_aux_dir in
3734 *\ * | *\ *)
3735 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
3736 *)
3737 install_sh="\${SHELL} $am_aux_dir/install-sh"
3738 esac
067d23c9
KY
3739fi
3740
743c80a7
PE
3741# Installed binaries are usually stripped using `strip' when the user
3742# run `make install-strip'. However `strip' might not be the right
3743# tool to use in cross-compilation environments, therefore Automake
3744# will honor the `STRIP' environment variable to overrule this program.
3745if test "$cross_compiling" != no; then
3746 if test -n "$ac_tool_prefix"; then
3747 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
3748set dummy ${ac_tool_prefix}strip; ac_word=$2
3749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3750$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 3751if test "${ac_cv_prog_STRIP+set}" = set; then :
743c80a7 3752 $as_echo_n "(cached) " >&6
067d23c9 3753else
743c80a7
PE
3754 if test -n "$STRIP"; then
3755 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
3756else
3757as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3758for as_dir in $PATH
3759do
3760 IFS=$as_save_IFS
3761 test -z "$as_dir" && as_dir=.
3762 for ac_exec_ext in '' $ac_executable_extensions; do
3763 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3764 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
3765 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3766 break 2
3767 fi
3768done
3769 done
3770IFS=$as_save_IFS
067d23c9
KY
3771
3772fi
067d23c9 3773fi
743c80a7
PE
3774STRIP=$ac_cv_prog_STRIP
3775if test -n "$STRIP"; then
3776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
3777$as_echo "$STRIP" >&6; }
3778else
3779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3780$as_echo "no" >&6; }
067d23c9
KY
3781fi
3782
3783
067d23c9 3784fi
743c80a7
PE
3785if test -z "$ac_cv_prog_STRIP"; then
3786 ac_ct_STRIP=$STRIP
3787 # Extract the first word of "strip", so it can be a program name with args.
3788set dummy strip; ac_word=$2
3789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3790$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 3791if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
743c80a7
PE
3792 $as_echo_n "(cached) " >&6
3793else
3794 if test -n "$ac_ct_STRIP"; then
3795 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
3796else
3797as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3798for as_dir in $PATH
3799do
3800 IFS=$as_save_IFS
3801 test -z "$as_dir" && as_dir=.
3802 for ac_exec_ext in '' $ac_executable_extensions; do
3803 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3804 ac_cv_prog_ac_ct_STRIP="strip"
3805 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3806 break 2
3807 fi
3808done
3809 done
3810IFS=$as_save_IFS
3811
3812fi
3813fi
3814ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
3815if test -n "$ac_ct_STRIP"; then
3816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
3817$as_echo "$ac_ct_STRIP" >&6; }
3818else
3819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3820$as_echo "no" >&6; }
3821fi
3822
3823 if test "x$ac_ct_STRIP" = x; then
3824 STRIP=":"
3825 else
3826 case $cross_compiling:$ac_tool_warned in
3827yes:)
3828{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3829$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3830ac_tool_warned=yes ;;
3831esac
3832 STRIP=$ac_ct_STRIP
3833 fi
3834else
3835 STRIP="$ac_cv_prog_STRIP"
3836fi
3837
3838fi
3839INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
3840
3841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
3842$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
3843if test -z "$MKDIR_P"; then
a9bec17c 3844 if test "${ac_cv_path_mkdir+set}" = set; then :
743c80a7
PE
3845 $as_echo_n "(cached) " >&6
3846else
3847 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3848for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
3849do
3850 IFS=$as_save_IFS
3851 test -z "$as_dir" && as_dir=.
3852 for ac_prog in mkdir gmkdir; do
3853 for ac_exec_ext in '' $ac_executable_extensions; do
3854 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
3855 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
3856 'mkdir (GNU coreutils) '* | \
3857 'mkdir (coreutils) '* | \
3858 'mkdir (fileutils) '4.1*)
3859 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
3860 break 3;;
3861 esac
3862 done
3863 done
3864 done
3865IFS=$as_save_IFS
3866
3867fi
3868
3869 test -d ./--version && rmdir ./--version
3870 if test "${ac_cv_path_mkdir+set}" = set; then
3871 MKDIR_P="$ac_cv_path_mkdir -p"
3872 else
3873 # As a last resort, use the slow shell script. Don't cache a
3874 # value for MKDIR_P within a source directory, because that will
3875 # break other packages using the cache if that directory is
3876 # removed, or if the value is a relative name.
3877 MKDIR_P="$ac_install_sh -d"
3878 fi
3879fi
3880{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
3881$as_echo "$MKDIR_P" >&6; }
3882
3883mkdir_p="$MKDIR_P"
3884case $mkdir_p in
3885 [\\/$]* | ?:[\\/]*) ;;
3886 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
3887esac
3888
3889for ac_prog in gawk mawk nawk awk
3890do
3891 # Extract the first word of "$ac_prog", so it can be a program name with args.
3892set dummy $ac_prog; ac_word=$2
3893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3894$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 3895if test "${ac_cv_prog_AWK+set}" = set; then :
743c80a7
PE
3896 $as_echo_n "(cached) " >&6
3897else
3898 if test -n "$AWK"; then
3899 ac_cv_prog_AWK="$AWK" # Let the user override the test.
3900else
3901as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3902for as_dir in $PATH
3903do
3904 IFS=$as_save_IFS
3905 test -z "$as_dir" && as_dir=.
3906 for ac_exec_ext in '' $ac_executable_extensions; do
3907 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3908 ac_cv_prog_AWK="$ac_prog"
3909 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3910 break 2
3911 fi
3912done
3913 done
3914IFS=$as_save_IFS
3915
3916fi
3917fi
3918AWK=$ac_cv_prog_AWK
3919if test -n "$AWK"; then
3920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
3921$as_echo "$AWK" >&6; }
3922else
3923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3924$as_echo "no" >&6; }
3925fi
3926
3927
3928 test -n "$AWK" && break
3929done
3930
3931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3932$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
3933set x ${MAKE-make}
3934ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
a9bec17c 3935if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
743c80a7
PE
3936 $as_echo_n "(cached) " >&6
3937else
3938 cat >conftest.make <<\_ACEOF
3939SHELL = /bin/sh
3940all:
3941 @echo '@@@%%%=$(MAKE)=@@@%%%'
3942_ACEOF
a9bec17c 3943# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
743c80a7
PE
3944case `${MAKE-make} -f conftest.make 2>/dev/null` in
3945 *@@@%%%=?*=@@@%%%*)
3946 eval ac_cv_prog_make_${ac_make}_set=yes;;
3947 *)
3948 eval ac_cv_prog_make_${ac_make}_set=no;;
3949esac
3950rm -f conftest.make
3951fi
3952if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3954$as_echo "yes" >&6; }
3955 SET_MAKE=
3956else
3957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3958$as_echo "no" >&6; }
3959 SET_MAKE="MAKE=${MAKE-make}"
3960fi
3961
3962rm -rf .tst 2>/dev/null
3963mkdir .tst 2>/dev/null
3964if test -d .tst; then
3965 am__leading_dot=.
3966else
3967 am__leading_dot=_
3968fi
3969rmdir .tst 2>/dev/null
3970
3971if test "`cd $srcdir && pwd`" != "`pwd`"; then
3972 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
3973 # is not polluted with repeated "-I."
3974 am__isrc=' -I$(srcdir)'
3975 # test to see if srcdir already configured
3976 if test -f $srcdir/config.status; then
a9bec17c 3977 as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
743c80a7
PE
3978 fi
3979fi
3980
3981# test whether we have cygpath
3982if test -z "$CYGPATH_W"; then
3983 if (cygpath --version) >/dev/null 2>/dev/null; then
3984 CYGPATH_W='cygpath -w'
3985 else
3986 CYGPATH_W=echo
3987 fi
3988fi
3989
3990
3991# Define the identity of the package.
3992 PACKAGE='emacs'
c574bc34 3993 VERSION='24.3.50'
743c80a7
PE
3994
3995
3996cat >>confdefs.h <<_ACEOF
3997#define PACKAGE "$PACKAGE"
3998_ACEOF
3999
4000
4001cat >>confdefs.h <<_ACEOF
4002#define VERSION "$VERSION"
4003_ACEOF
4004
4005# Some tools Automake needs.
4006
4007ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
4008
4009
4010AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
4011
4012
4013AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
4014
4015
4016AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
4017
4018
4019MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
4020
4021# We need awk for the "check" target. The system "awk" is bad on
4022# some platforms.
4023# Always define AMTAR for backward compatibility.
4024
4025AMTAR=${AMTAR-"${am_missing_run}tar"}
4026
4027am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
4028
4029
4030
4031
4032
4033
4034
4035
4036lispdir='${datadir}/emacs/${version}/lisp'
e1939eb1 4037leimdir='${datadir}/emacs/${version}/leim'
397f7161 4038standardlisppath='${lispdir}:${leimdir}'
743c80a7
PE
4039locallisppath='${datadir}/emacs/${version}/site-lisp:'\
4040'${datadir}/emacs/site-lisp'
397f7161 4041lisppath='${locallisppath}:${standardlisppath}'
743c80a7
PE
4042etcdir='${datadir}/emacs/${version}/etc'
4043archlibdir='${libexecdir}/emacs/${version}/${configuration}'
7a67e06b 4044etcdocdir='${datadir}/emacs/${version}/etc'
743c80a7
PE
4045gamedir='${localstatedir}/games/emacs'
4046
ee77919d
GM
4047
4048# Check whether --with-all was given.
4049if test "${with_all+set}" = set; then :
4050 withval=$with_all; with_features=$withval
c0528ebe 4051else
ee77919d 4052 with_features=yes
c0528ebe
GM
4053fi
4054
4055
743c80a7
PE
4056
4057
4058
4059# Check whether --with-pop was given.
4060if test "${with_pop+set}" = set; then :
4061 withval=$with_pop;
4062else
ee77919d 4063 with_pop=$with_features
743c80a7
PE
4064fi
4065
4066if test "$with_pop" = yes; then
4067 $as_echo "#define MAIL_USE_POP 1" >>confdefs.h
4068
4069fi
4070
4071
4072# Check whether --with-kerberos was given.
4073if test "${with_kerberos+set}" = set; then :
4074 withval=$with_kerberos;
4075else
4076 with_kerberos=no
4077fi
4078
4079if test "$with_kerberos" != no; then
4080 $as_echo "#define KERBEROS 1" >>confdefs.h
4081
4082fi
4083
4084
4085# Check whether --with-kerberos5 was given.
4086if test "${with_kerberos5+set}" = set; then :
4087 withval=$with_kerberos5;
4088else
4089 with_kerberos5=no
4090fi
4091
4092if test "${with_kerberos5}" != no; then
4093 if test "${with_kerberos}" = no; then
4094 with_kerberos=yes
4095 $as_echo "#define KERBEROS 1" >>confdefs.h
4096
4097 fi
4098
4099$as_echo "#define KERBEROS5 1" >>confdefs.h
4100
4101fi
4102
4103
4104# Check whether --with-hesiod was given.
4105if test "${with_hesiod+set}" = set; then :
4106 withval=$with_hesiod;
4107else
4108 with_hesiod=no
4109fi
4110
4111if test "$with_hesiod" != no; then
4112
4113$as_echo "#define HESIOD 1" >>confdefs.h
4114
4115fi
4116
4117
4118# Check whether --with-mmdf was given.
4119if test "${with_mmdf+set}" = set; then :
4120 withval=$with_mmdf;
4121else
4122 with_mmdf=no
4123fi
4124
4125if test "$with_mmdf" != no; then
4126
4127$as_echo "#define MAIL_USE_MMDF 1" >>confdefs.h
4128
4129fi
4130
4131
4132# Check whether --with-mail-unlink was given.
4133if test "${with_mail_unlink+set}" = set; then :
4134 withval=$with_mail_unlink;
4135else
4136 with_mail_unlink=no
4137fi
4138
4139if test "$with_mail_unlink" != no; then
4140
4141$as_echo "#define MAIL_UNLINK_SPOOL 1" >>confdefs.h
4142
4143fi
4144
4145
4146# Check whether --with-mailhost was given.
4147if test "${with_mailhost+set}" = set; then :
4148 withval=$with_mailhost;
4149cat >>confdefs.h <<_ACEOF
4150#define MAILHOST "$withval"
4151_ACEOF
4152
4153fi
4154
4155
4156
067d23c9
KY
4157# Check whether --with-sound was given.
4158if test "${with_sound+set}" = set; then :
9dabd86d 4159 withval=$with_sound; case "${withval}" in
dfdf7fe5 4160 yes|no|alsa|oss|bsd-ossaudio) val=$withval ;;
9dabd86d 4161 *) as_fn_error "\`--with-sound=$withval' is invalid;
dfdf7fe5 4162this option's value should be \`yes', \`no', \`alsa', \`oss', or \`bsd-ossaudio'." "$LINENO" 5
9dabd86d
GM
4163 ;;
4164 esac
4165 with_sound=$val
4166
067d23c9 4167else
9dabd86d 4168 with_sound=$with_features
067d23c9
KY
4169fi
4170
4171
4172
067d23c9
KY
4173# Check whether --with-x-toolkit was given.
4174if test "${with_x_toolkit+set}" = set; then :
4175 withval=$with_x_toolkit; case "${withval}" in
4176 y | ye | yes ) val=gtk ;;
4177 n | no ) val=no ;;
4178 l | lu | luc | luci | lucid ) val=lucid ;;
4179 a | at | ath | athe | athen | athena ) val=athena ;;
4180 m | mo | mot | moti | motif ) val=motif ;;
4181 g | gt | gtk ) val=gtk ;;
4fa92495 4182 gtk2 ) val=gtk2 ;;
067d23c9
KY
4183 gtk3 ) val=gtk3 ;;
4184 * )
a9bec17c 4185as_fn_error "\`--with-x-toolkit=$withval' is invalid;
4fa92495
GM
4186this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif', \`gtk',
4187\`gtk2' or \`gtk3'. \`yes' and \`gtk' are synonyms.
4188\`athena' and \`lucid' are synonyms." "$LINENO" 5
067d23c9
KY
4189 ;;
4190 esac
4191 with_x_toolkit=$val
4192
4193fi
4194
4195
4196
0442dc7f
GM
4197# Check whether --with-wide-int was given.
4198if test "${with_wide_int+set}" = set; then :
4199 withval=$with_wide_int;
4200else
4201 with_wide_int=no
4202fi
4203
4204if test "$with_wide_int" = yes; then
4205
4206$as_echo "#define WIDE_EMACS_INT 1" >>confdefs.h
4207
4208fi
4209
4210
067d23c9
KY
4211# Check whether --with-xpm was given.
4212if test "${with_xpm+set}" = set; then :
4213 withval=$with_xpm;
4214else
ee77919d 4215 with_xpm=$with_features
067d23c9
KY
4216fi
4217
4218
4219# Check whether --with-jpeg was given.
4220if test "${with_jpeg+set}" = set; then :
4221 withval=$with_jpeg;
4222else
ee77919d 4223 with_jpeg=$with_features
067d23c9
KY
4224fi
4225
4226
4227# Check whether --with-tiff was given.
4228if test "${with_tiff+set}" = set; then :
4229 withval=$with_tiff;
4230else
ee77919d 4231 with_tiff=$with_features
067d23c9
KY
4232fi
4233
4234
4235# Check whether --with-gif was given.
4236if test "${with_gif+set}" = set; then :
4237 withval=$with_gif;
4238else
ee77919d 4239 with_gif=$with_features
067d23c9
KY
4240fi
4241
4242
4243# Check whether --with-png was given.
4244if test "${with_png+set}" = set; then :
4245 withval=$with_png;
4246else
ee77919d 4247 with_png=$with_features
067d23c9
KY
4248fi
4249
4250
4251# Check whether --with-rsvg was given.
4252if test "${with_rsvg+set}" = set; then :
4253 withval=$with_rsvg;
4254else
ee77919d 4255 with_rsvg=$with_features
067d23c9
KY
4256fi
4257
4258
4259# Check whether --with-xml2 was given.
4260if test "${with_xml2+set}" = set; then :
4261 withval=$with_xml2;
4262else
ee77919d 4263 with_xml2=$with_features
067d23c9
KY
4264fi
4265
4266
4267# Check whether --with-imagemagick was given.
4268if test "${with_imagemagick+set}" = set; then :
4269 withval=$with_imagemagick;
4270else
ee77919d 4271 with_imagemagick=$with_features
067d23c9
KY
4272fi
4273
4274
4275
4276# Check whether --with-xft was given.
4277if test "${with_xft+set}" = set; then :
4278 withval=$with_xft;
4279else
ee77919d 4280 with_xft=$with_features
067d23c9
KY
4281fi
4282
4283
4284# Check whether --with-libotf was given.
4285if test "${with_libotf+set}" = set; then :
4286 withval=$with_libotf;
4287else
ee77919d 4288 with_libotf=$with_features
067d23c9
KY
4289fi
4290
4291
4292# Check whether --with-m17n-flt was given.
4293if test "${with_m17n_flt+set}" = set; then :
4294 withval=$with_m17n_flt;
4295else
ee77919d 4296 with_m17n_flt=$with_features
067d23c9
KY
4297fi
4298
4299
4300
4301# Check whether --with-toolkit-scroll-bars was given.
4302if test "${with_toolkit_scroll_bars+set}" = set; then :
4303 withval=$with_toolkit_scroll_bars;
4304else
ee77919d 4305 with_toolkit_scroll_bars=$with_features
067d23c9
KY
4306fi
4307
4308
4309# Check whether --with-xaw3d was given.
4310if test "${with_xaw3d+set}" = set; then :
4311 withval=$with_xaw3d;
4312else
ee77919d 4313 with_xaw3d=$with_features
067d23c9
KY
4314fi
4315
4316
4317# Check whether --with-xim was given.
4318if test "${with_xim+set}" = set; then :
4319 withval=$with_xim;
4320else
ee77919d 4321 with_xim=$with_features
067d23c9
KY
4322fi
4323
4324
4325# Check whether --with-ns was given.
4326if test "${with_ns+set}" = set; then :
4327 withval=$with_ns;
4328else
4329 with_ns=no
4330fi
4331
4332
5c0255d9
GM
4333# Check whether --with-w32 was given.
4334if test "${with_w32+set}" = set; then :
4335 withval=$with_w32;
4336else
4337 with_w32=no
4338fi
4339
4340
067d23c9
KY
4341
4342# Check whether --with-gpm was given.
4343if test "${with_gpm+set}" = set; then :
4344 withval=$with_gpm;
4345else
ee77919d 4346 with_gpm=$with_features
067d23c9
KY
4347fi
4348
4349
4350# Check whether --with-dbus was given.
4351if test "${with_dbus+set}" = set; then :
4352 withval=$with_dbus;
4353else
ee77919d 4354 with_dbus=$with_features
067d23c9
KY
4355fi
4356
4357
4358# Check whether --with-gconf was given.
4359if test "${with_gconf+set}" = set; then :
4360 withval=$with_gconf;
4361else
ee77919d 4362 with_gconf=$with_features
067d23c9
KY
4363fi
4364
4365
f527bd02
GM
4366# Check whether --with-gsettings was given.
4367if test "${with_gsettings+set}" = set; then :
4368 withval=$with_gsettings;
4369else
ee77919d 4370 with_gsettings=$with_features
f527bd02
GM
4371fi
4372
4373
067d23c9
KY
4374# Check whether --with-selinux was given.
4375if test "${with_selinux+set}" = set; then :
4376 withval=$with_selinux;
4377else
ee77919d 4378 with_selinux=$with_features
067d23c9
KY
4379fi
4380
4381
4382# Check whether --with-gnutls was given.
4383if test "${with_gnutls+set}" = set; then :
4384 withval=$with_gnutls;
4385else
ee77919d 4386 with_gnutls=$with_features
067d23c9
KY
4387fi
4388
4389
7a67e06b
GM
4390# Check whether --with-zlib was given.
4391if test "${with_zlib+set}" = set; then :
4392 withval=$with_zlib;
4393else
4394 with_zlib=$with_features
4395fi
4396
4397
0f55a32e
GM
4398
4399# Check whether --with-file-notification was given.
4400if test "${with_file_notification+set}" = set; then :
4401 withval=$with_file_notification; case "${withval}" in
4402 y | ye | yes ) val=yes ;;
4403 n | no ) val=no ;;
4404 g | gf | gfi | gfil | gfile ) val=gfile ;;
4405 i | in | ino | inot | inoti | inotif | inotify ) val=inotify ;;
4406 w | w3 | w32 ) val=w32 ;;
4407 * ) as_fn_error "\`--with-file-notification=$withval' is invalid;
4408this option's value should be \`yes', \`no', \`gfile', \`inotify' or \`w32'.
6ee585de
GM
4409\`yes' is a synonym for \`w32' on MS-Windows, for \`no' on Nextstep,
4410otherwise for the first of \`gfile' or \`inotify' that is usable." "$LINENO" 5
0f55a32e
GM
4411 ;;
4412 esac
4413 with_file_notification=$val
4414
b5eb356a 4415else
09220615 4416 with_file_notification=$with_features
b5eb356a
GM
4417fi
4418
4419
067d23c9
KY
4420## For the times when you want to build Emacs but don't have
4421## a suitable makeinfo, and can live without the manuals.
4422
4423# Check whether --with-makeinfo was given.
4424if test "${with_makeinfo+set}" = set; then :
4425 withval=$with_makeinfo;
4426else
ee77919d 4427 with_makeinfo=$with_features
067d23c9
KY
4428fi
4429
4430
c3a461a5
GM
4431## Makefile.in needs the cache file name.
4432
4433
067d23c9
KY
4434## This is an option because I do not know if all info/man support
4435## compressed files, nor how to test if they do so.
4436
992ec28a
GM
4437# Check whether --with-compress-install was given.
4438if test "${with_compress_install+set}" = set; then :
4439 withval=$with_compress_install;
067d23c9 4440else
992ec28a 4441 with_compress_install=$with_features
067d23c9
KY
4442fi
4443
4444
4445
4446# Check whether --with-pkg-config-prog was given.
4447if test "${with_pkg_config_prog+set}" = set; then :
4448 withval=$with_pkg_config_prog;
4449fi
4450
4451if test "X${with_pkg_config_prog}" != X; then
4452 if test "${with_pkg_config_prog}" != yes; then
4453 PKG_CONFIG="${with_pkg_config_prog}"
4454 fi
4455fi
4456
067d23c9 4457
4fc5868a
UM
4458# Check whether --with-gameuser was given.
4459if test "${with_gameuser+set}" = set; then :
4460 withval=$with_gameuser;
4461fi
4462
4463test "X${with_gameuser}" != X && test "${with_gameuser}" != yes \
4464 && gameuser="${with_gameuser}"
4465test "X$gameuser" = X && gameuser=games
4466
4467
067d23c9
KY
4468# Check whether --with-gnustep-conf was given.
4469if test "${with_gnustep_conf+set}" = set; then :
4470 withval=$with_gnustep_conf;
4471fi
4472
4473test "X${with_gnustep_conf}" != X && test "${with_gnustep_conf}" != yes && \
4474 GNUSTEP_CONFIG_FILE="${with_gnustep_conf}"
4475test "X$GNUSTEP_CONFIG_FILE" = "X" && \
4476 GNUSTEP_CONFIG_FILE=/etc/GNUstep/GNUstep.conf
4477
4478# Check whether --enable-ns-self-contained was given.
4479if test "${enable_ns_self_contained+set}" = set; then :
4480 enableval=$enable_ns_self_contained; EN_NS_SELF_CONTAINED=$enableval
4481else
4482 EN_NS_SELF_CONTAINED=yes
4483fi
4484
4485
067d23c9
KY
4486# Check whether --enable-locallisppath was given.
4487if test "${enable_locallisppath+set}" = set; then :
4488 enableval=$enable_locallisppath; if test "${enableval}" = "no"; then
4489 locallisppath=
4490elif test "${enableval}" != "yes"; then
4491 locallisppath=${enableval}
4492fi
4493fi
4494
4495
4496# Check whether --enable-checking was given.
4497if test "${enable_checking+set}" = set; then :
4498 enableval=$enable_checking; ac_checking_flags="${enableval}"
4499fi
4500
4501IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
4502for check in $ac_checking_flags
4503do
4504 case $check in
4505 # these set all the flags to specific states
4506 yes) ac_enable_checking=1 ;;
4507 no) ac_enable_checking= ;
4508 ac_gc_check_stringbytes= ;
4509 ac_gc_check_string_overrun= ;
4510 ac_gc_check_string_free_list= ;
4511 ac_xmalloc_overrun= ;
7ee3791f 4512 ac_gc_check_cons_list= ;
e4d35030 4513 ac_glyphs_debug= ;;
067d23c9
KY
4514 all) ac_enable_checking=1 ;
4515 ac_gc_check_stringbytes=1 ;
4516 ac_gc_check_string_overrun=1 ;
4517 ac_gc_check_string_free_list=1 ;
4518 ac_xmalloc_overrun=1 ;
7ee3791f 4519 ac_gc_check_cons_list=1 ;
e4d35030 4520 ac_glyphs_debug=1 ;;
067d23c9
KY
4521 # these enable particular checks
4522 stringbytes) ac_gc_check_stringbytes=1 ;;
4523 stringoverrun) ac_gc_check_string_overrun=1 ;;
4524 stringfreelist) ac_gc_check_string_free_list=1 ;;
4525 xmallocoverrun) ac_xmalloc_overrun=1 ;;
4526 conslist) ac_gc_check_cons_list=1 ;;
e4d35030 4527 glyphs) ac_glyphs_debug=1 ;;
a9bec17c 4528 *) as_fn_error "unknown check category $check" "$LINENO" 5 ;;
067d23c9
KY
4529 esac
4530done
4531IFS="$ac_save_IFS"
4532
4533if test x$ac_enable_checking != x ; then
4534
4535$as_echo "#define ENABLE_CHECKING 1" >>confdefs.h
4536
4537fi
4538if test x$ac_gc_check_stringbytes != x ; then
4539
4540$as_echo "#define GC_CHECK_STRING_BYTES 1" >>confdefs.h
4541
4542fi
4fda9c95 4543if test x$ac_gc_check_string_overrun != x ; then
067d23c9
KY
4544
4545$as_echo "#define GC_CHECK_STRING_OVERRUN 1" >>confdefs.h
4546
4547fi
4548if test x$ac_gc_check_string_free_list != x ; then
4549
4550$as_echo "#define GC_CHECK_STRING_FREE_LIST 1" >>confdefs.h
4551
4552fi
4553if test x$ac_xmalloc_overrun != x ; then
4554
4555$as_echo "#define XMALLOC_OVERRUN_CHECK 1" >>confdefs.h
4556
4557fi
4558if test x$ac_gc_check_cons_list != x ; then
4559
4560$as_echo "#define GC_CHECK_CONS_LIST 1" >>confdefs.h
4561
7ee3791f 4562fi
e4d35030 4563if test x$ac_glyphs_debug != x ; then
7ee3791f
GM
4564
4565$as_echo "#define GLYPH_DEBUG 1" >>confdefs.h
4566
067d23c9
KY
4567fi
4568
afd07e01
GM
4569# Check whether --enable-check-lisp-object-type was given.
4570if test "${enable_check_lisp_object_type+set}" = set; then :
4571 enableval=$enable_check_lisp_object_type; if test "${enableval}" != "no"; then
067d23c9 4572
afd07e01 4573$as_echo "#define CHECK_LISP_OBJECT_TYPE 1" >>confdefs.h
067d23c9
KY
4574
4575fi
4576fi
4577
4578
4579
4580# Check whether --enable-profiling was given.
4581if test "${enable_profiling+set}" = set; then :
4582 enableval=$enable_profiling; ac_enable_profiling="${enableval}"
4583fi
4584
4585if test x$ac_enable_profiling != x ; then
4586 PROFILING_CFLAGS="-DPROFILING=1 -pg"
4587else
4588 PROFILING_CFLAGS=
4589fi
4590
4591
4592# Check whether --enable-autodepend was given.
4593if test "${enable_autodepend+set}" = set; then :
4594 enableval=$enable_autodepend; ac_enable_autodepend="${enableval}"
4595else
4596 ac_enable_autodepend=yes
4597fi
4598
4599
4efe5ef9
GM
4600# Check whether --enable-gtk-deprecation-warnings was given.
4601if test "${enable_gtk_deprecation_warnings+set}" = set; then :
4602 enableval=$enable_gtk_deprecation_warnings; ac_enable_gtk_deprecation_warnings="${enableval}"
4603fi
4604
4605
067d23c9 4606#### Make srcdir absolute, if it isn't already. It's important to
b5591ebb 4607#### avoid running the file name through pwd unnecessarily, since pwd can
067d23c9
KY
4608#### give you automounter prefixes, which can go away. We do all this
4609#### so Emacs can find its files when run uninstalled.
4610## Make sure CDPATH doesn't affect cd (in case PWD is relative).
4611unset CDPATH
4612case "${srcdir}" in
7c61eaab 4613 [\\/]* | ?:[\\/]*) ;;
067d23c9
KY
4614 . )
4615 ## We may be able to use the $PWD environment variable to make this
4616 ## absolute. But sometimes PWD is inaccurate.
b5591ebb 4617 ## Note: we used to use $PWD at the end instead of `pwd`,
067d23c9
KY
4618 ## but that tested only for a well-formed and valid PWD,
4619 ## it did not object when PWD was well-formed and valid but just wrong.
b5591ebb 4620 if test ".$PWD" != "." && test ".`(cd "$PWD" ; sh -c pwd)`" = ".`pwd`" ;
067d23c9
KY
4621 then
4622 srcdir="$PWD"
4623 else
b5591ebb 4624 srcdir=`(cd "$srcdir"; pwd)`
067d23c9
KY
4625 fi
4626 ;;
b5591ebb 4627 * ) srcdir=`(cd "$srcdir"; pwd)` ;;
067d23c9
KY
4628esac
4629
52d4169a
GM
4630#### When building with MinGW inside the MSYS tree, 'pwd' produces
4631#### directories relative to the root of the MSYS tree,
4632#### e.g. '/home/user/foo' instead of '/d/MSYS/home/user/foo'. When
4633#### such a value of srcdir is written to the top-level Makefile, it
4634#### gets propagated to src/epaths.h, and that causes temacs to fail,
4635#### because, being a MinGW program that knows nothing of MSYS root
4636#### substitution, it cannot find the data directory. "pwd -W"
4637#### produces Windows-style 'd:/foo/bar' absolute directory names, so
4638#### we use it here to countermand that lossage.
4639test "$MSYSTEM" = "MINGW32" && srcdir=`(cd "$srcdir"; pwd -W | sed -e 's,^\([A-Za-z]\):,/\1,')`
4640
067d23c9
KY
4641### Canonicalize the configuration name.
4642
067d23c9
KY
4643# Make sure we can run config.sub.
4644$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
a9bec17c 4645 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
067d23c9
KY
4646
4647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4648$as_echo_n "checking build system type... " >&6; }
a9bec17c 4649if test "${ac_cv_build+set}" = set; then :
067d23c9
KY
4650 $as_echo_n "(cached) " >&6
4651else
4652 ac_build_alias=$build_alias
4653test "x$ac_build_alias" = x &&
4654 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4655test "x$ac_build_alias" = x &&
a9bec17c 4656 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
067d23c9 4657ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
a9bec17c 4658 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
067d23c9
KY
4659
4660fi
4661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4662$as_echo "$ac_cv_build" >&6; }
4663case $ac_cv_build in
4664*-*-*) ;;
a9bec17c 4665*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
067d23c9
KY
4666esac
4667build=$ac_cv_build
4668ac_save_IFS=$IFS; IFS='-'
4669set x $ac_cv_build
4670shift
4671build_cpu=$1
4672build_vendor=$2
4673shift; shift
4674# Remember, the first character of IFS is used to create $*,
4675# except with old shells:
4676build_os=$*
4677IFS=$ac_save_IFS
4678case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
4679
4680
4681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4682$as_echo_n "checking host system type... " >&6; }
a9bec17c 4683if test "${ac_cv_host+set}" = set; then :
067d23c9
KY
4684 $as_echo_n "(cached) " >&6
4685else
4686 if test "x$host_alias" = x; then
4687 ac_cv_host=$ac_cv_build
4688else
4689 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
a9bec17c 4690 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
067d23c9
KY
4691fi
4692
4693fi
4694{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4695$as_echo "$ac_cv_host" >&6; }
4696case $ac_cv_host in
4697*-*-*) ;;
a9bec17c 4698*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
067d23c9
KY
4699esac
4700host=$ac_cv_host
4701ac_save_IFS=$IFS; IFS='-'
4702set x $ac_cv_host
4703shift
4704host_cpu=$1
4705host_vendor=$2
4706shift; shift
4707# Remember, the first character of IFS is used to create $*,
4708# except with old shells:
4709host_os=$*
4710IFS=$ac_save_IFS
4711case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
4712
4713
4714canonical=$host
4715configuration=${host_alias-${build_alias-$host}}
4716
4717
4718
4719### If you add support for a new configuration, add code to this
4720### switch statement to recognize your configuration name and select
42bbbe8b 4721### the appropriate operating system file.
067d23c9 4722
42bbbe8b 4723### You would hope that you could choose an s/*.h
067d23c9 4724### file based on the operating system portion. However, it turns out
42bbbe8b 4725### that each s/*.h file is pretty manufacturer-specific.
067d23c9
KY
4726### So we basically have to have a special case for each
4727### configuration name.
4728###
4729### As far as handling version numbers on operating systems is
4730### concerned, make sure things will fail in a fixable way. If
4731### /etc/MACHINES doesn't say anything about version numbers, be
4732### prepared to handle anything reasonably. If version numbers
4733### matter, be sure /etc/MACHINES says something about it.
4734
42bbbe8b 4735opsys='' unported=no
067d23c9
KY
4736case "${canonical}" in
4737
9b6e5515
GM
4738 ## GNU/Linux and similar ports
4739 *-*-linux* )
d6a003a8 4740 opsys=gnu-linux
d6a003a8
AS
4741 ;;
4742
067d23c9
KY
4743 ## FreeBSD ports
4744 *-*-freebsd* )
4745 opsys=freebsd
067d23c9
KY
4746 ;;
4747
87e1a811
GM
4748 ## DragonFly ports
4749 *-*-dragonfly* )
4750 opsys=dragonfly
4751 ;;
4752
067d23c9
KY
4753 ## FreeBSD kernel + glibc based userland
4754 *-*-kfreebsd*gnu* )
4755 opsys=gnu-kfreebsd
067d23c9
KY
4756 ;;
4757
4758 ## NetBSD ports
4759 *-*-netbsd* )
4760 opsys=netbsd
067d23c9
KY
4761 ;;
4762
4763 ## OpenBSD ports
4764 *-*-openbsd* )
4765 opsys=openbsd
067d23c9
KY
4766 ;;
4767
067d23c9
KY
4768 ## Apple Darwin / Mac OS X
4769 *-apple-darwin* )
4770 case "${canonical}" in
42bbbe8b
GM
4771 i[3456]86-* ) ;;
4772 powerpc-* ) ;;
4773 x86_64-* ) ;;
067d23c9
KY
4774 * ) unported=yes ;;
4775 esac
4776 opsys=darwin
adf4198e
GM
4777 ## Use fink packages if available.
4778 ## FIXME find a better way to do this: http://debbugs.gnu.org/11507
4779## if test -d /sw/include && test -d /sw/lib; then
4780## GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib"
4781## NON_GCC_TEST_OPTIONS=${GCC_TEST_OPTIONS}
4782## fi
067d23c9
KY
4783 ;;
4784
8c35e3c3
GM
4785 ## Cygwin ports
4786 *-*-cygwin )
4787 opsys=cygwin
4788 ;;
4789
067d23c9
KY
4790 ## HP 9000 series 700 and 800, running HP/UX
4791 hppa*-hp-hpux10.2* )
d6a003a8 4792 opsys=hpux10-20
067d23c9
KY
4793 ;;
4794 hppa*-hp-hpux1[1-9]* )
d6a003a8 4795 opsys=hpux11
067d23c9
KY
4796 CFLAGS="-D_INCLUDE__STDC_A1_SOURCE $CFLAGS"
4797 ;;
4798
067d23c9 4799 ## IBM machines
067d23c9 4800 rs6000-ibm-aix4.[23]* )
42bbbe8b 4801 opsys=aix4-2
067d23c9
KY
4802 ;;
4803 powerpc-ibm-aix4.[23]* )
42bbbe8b 4804 opsys=aix4-2
067d23c9
KY
4805 ;;
4806 rs6000-ibm-aix[56]* )
42bbbe8b 4807 opsys=aix4-2
067d23c9
KY
4808 ;;
4809 powerpc-ibm-aix[56]* )
42bbbe8b 4810 opsys=aix4-2
067d23c9
KY
4811 ;;
4812
067d23c9
KY
4813 ## Silicon Graphics machines
4814 ## Iris 4D
4815 mips-sgi-irix6.5 )
fd44db7f 4816 opsys=irix6-5
067d23c9
KY
4817 # Without defining _LANGUAGE_C, things get masked out in the headers
4818 # so that, for instance, grepping for `free' in stdlib.h fails and
4819 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
067d23c9
KY
4820 NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
4821 ;;
4822
4823 ## Suns
067d23c9
KY
4824 *-sun-solaris* \
4825 | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* \
4826 | x86_64-*-solaris2* | x86_64-*-sunos5*)
4827 case "${canonical}" in
42bbbe8b
GM
4828 i[3456]86-*-* ) ;;
4829 amd64-*-*|x86_64-*-*) ;;
4830 sparc* ) ;;
067d23c9
KY
4831 * ) unported=yes ;;
4832 esac
4833 case "${canonical}" in
4834 *-sunos5.6* | *-solaris2.6* )
4835 opsys=sol2-6
067d23c9
KY
4836 RANLIB="ar -ts"
4837 ;;
4838 *-sunos5.[7-9]* | *-solaris2.[7-9]* )
4839 opsys=sol2-6
4840 emacs_check_sunpro_c=yes
067d23c9
KY
4841 ;;
4842 *-sunos5* | *-solaris* )
4843 opsys=sol2-10
4844 emacs_check_sunpro_c=yes
067d23c9
KY
4845 ;;
4846 esac
4847 ## Watch out for a compiler that we know will not work.
4848 case "${canonical}" in
4849 *-solaris* | *-sunos5* )
4850 if [ "x$CC" = x/usr/ucb/cc ]; then
4851 ## /usr/ucb/cc doesn't work;
4852 ## we should find some other compiler that does work.
4853 unset CC
4854 fi
4855 ;;
4856 *) ;;
4857 esac
4858 ;;
4859
067d23c9
KY
4860 ## Intel 386 machines where we don't care about the manufacturer.
4861 i[3456]86-*-* )
067d23c9 4862 case "${canonical}" in
5ec54608 4863 *-darwin* ) opsys=darwin ;;
7c61eaab
GM
4864 *-mingw32 )
4865 opsys=mingw32
4866 # MinGW overrides and adds some system headers in nt/inc.
4867 GCC_TEST_OPTIONS="-I $srcdir/nt/inc"
4868 ;;
5ec54608
GM
4869 *-sysv4.2uw* ) opsys=unixware ;;
4870 *-sysv5uw* ) opsys=unixware ;;
4871 *-sysv5OpenUNIX* ) opsys=unixware ;;
067d23c9
KY
4872 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
4873 esac
4874 ;;
4875
067d23c9
KY
4876 * )
4877 unported=yes
4878 ;;
4879esac
4880
4881### If the code above didn't choose an operating system, just choose
4882### an operating system based on the configuration name. You really
4883### only want to use this when you have no idea what the right
4884### operating system is; if you know what operating systems a machine
4885### runs, it's cleaner to make it explicit in the case statement
4886### above.
4887if test x"${opsys}" = x; then
4888 case "${canonical}" in
4889 *-gnu* ) opsys=gnu ;;
4890 * )
4891 unported=yes
4892 ;;
4893 esac
4894fi
4895
4896
4897
4898if test $unported = yes; then
a9bec17c 4899 as_fn_error "Emacs hasn't been ported to \`${canonical}' systems.
067d23c9
KY
4900Check \`etc/MACHINES' for recognized configuration names." "$LINENO" 5
4901fi
4902
067d23c9
KY
4903
4904#### Choose a compiler.
067d23c9
KY
4905
4906ac_ext=c
4907ac_cpp='$CPP $CPPFLAGS'
4908ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4909ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4910ac_compiler_gnu=$ac_cv_c_compiler_gnu
4911if test -n "$ac_tool_prefix"; then
4912 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4913set dummy ${ac_tool_prefix}gcc; ac_word=$2
4914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4915$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 4916if test "${ac_cv_prog_CC+set}" = set; then :
067d23c9
KY
4917 $as_echo_n "(cached) " >&6
4918else
4919 if test -n "$CC"; then
4920 ac_cv_prog_CC="$CC" # Let the user override the test.
4921else
4922as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4923for as_dir in $PATH
4924do
4925 IFS=$as_save_IFS
4926 test -z "$as_dir" && as_dir=.
4927 for ac_exec_ext in '' $ac_executable_extensions; do
4928 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4929 ac_cv_prog_CC="${ac_tool_prefix}gcc"
4930 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4931 break 2
4932 fi
4933done
4934 done
4935IFS=$as_save_IFS
4936
4937fi
4938fi
4939CC=$ac_cv_prog_CC
4940if test -n "$CC"; then
4941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4942$as_echo "$CC" >&6; }
4943else
4944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4945$as_echo "no" >&6; }
4946fi
4947
4948
4949fi
4950if test -z "$ac_cv_prog_CC"; then
4951 ac_ct_CC=$CC
4952 # Extract the first word of "gcc", so it can be a program name with args.
4953set dummy gcc; ac_word=$2
4954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4955$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 4956if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
067d23c9
KY
4957 $as_echo_n "(cached) " >&6
4958else
4959 if test -n "$ac_ct_CC"; then
4960 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4961else
4962as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4963for as_dir in $PATH
4964do
4965 IFS=$as_save_IFS
4966 test -z "$as_dir" && as_dir=.
4967 for ac_exec_ext in '' $ac_executable_extensions; do
4968 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4969 ac_cv_prog_ac_ct_CC="gcc"
4970 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4971 break 2
4972 fi
4973done
4974 done
4975IFS=$as_save_IFS
4976
4977fi
4978fi
4979ac_ct_CC=$ac_cv_prog_ac_ct_CC
4980if test -n "$ac_ct_CC"; then
4981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4982$as_echo "$ac_ct_CC" >&6; }
4983else
4984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4985$as_echo "no" >&6; }
4986fi
4987
4988 if test "x$ac_ct_CC" = x; then
4989 CC=""
4990 else
4991 case $cross_compiling:$ac_tool_warned in
4992yes:)
4993{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4994$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4995ac_tool_warned=yes ;;
4996esac
4997 CC=$ac_ct_CC
4998 fi
4999else
5000 CC="$ac_cv_prog_CC"
5001fi
5002
5003if test -z "$CC"; then
5004 if test -n "$ac_tool_prefix"; then
5005 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
5006set dummy ${ac_tool_prefix}cc; ac_word=$2
5007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5008$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 5009if test "${ac_cv_prog_CC+set}" = set; then :
067d23c9
KY
5010 $as_echo_n "(cached) " >&6
5011else
5012 if test -n "$CC"; then
5013 ac_cv_prog_CC="$CC" # Let the user override the test.
5014else
5015as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5016for as_dir in $PATH
5017do
5018 IFS=$as_save_IFS
5019 test -z "$as_dir" && as_dir=.
5020 for ac_exec_ext in '' $ac_executable_extensions; do
5021 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5022 ac_cv_prog_CC="${ac_tool_prefix}cc"
5023 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5024 break 2
5025 fi
5026done
5027 done
5028IFS=$as_save_IFS
5029
5030fi
5031fi
5032CC=$ac_cv_prog_CC
5033if test -n "$CC"; then
5034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5035$as_echo "$CC" >&6; }
5036else
5037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5038$as_echo "no" >&6; }
5039fi
5040
5041
5042 fi
5043fi
5044if test -z "$CC"; then
5045 # Extract the first word of "cc", so it can be a program name with args.
5046set dummy cc; ac_word=$2
5047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5048$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 5049if test "${ac_cv_prog_CC+set}" = set; then :
067d23c9
KY
5050 $as_echo_n "(cached) " >&6
5051else
5052 if test -n "$CC"; then
5053 ac_cv_prog_CC="$CC" # Let the user override the test.
5054else
5055 ac_prog_rejected=no
5056as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5057for as_dir in $PATH
5058do
5059 IFS=$as_save_IFS
5060 test -z "$as_dir" && as_dir=.
5061 for ac_exec_ext in '' $ac_executable_extensions; do
5062 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5063 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
5064 ac_prog_rejected=yes
5065 continue
5066 fi
5067 ac_cv_prog_CC="cc"
5068 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5069 break 2
5070 fi
5071done
5072 done
5073IFS=$as_save_IFS
5074
5075if test $ac_prog_rejected = yes; then
5076 # We found a bogon in the path, so make sure we never use it.
5077 set dummy $ac_cv_prog_CC
5078 shift
5079 if test $# != 0; then
5080 # We chose a different compiler from the bogus one.
5081 # However, it has the same basename, so the bogon will be chosen
5082 # first if we set CC to just the basename; use the full file name.
5083 shift
5084 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
5085 fi
5086fi
5087fi
5088fi
5089CC=$ac_cv_prog_CC
5090if test -n "$CC"; then
5091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5092$as_echo "$CC" >&6; }
5093else
5094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5095$as_echo "no" >&6; }
5096fi
5097
5098
5099fi
5100if test -z "$CC"; then
5101 if test -n "$ac_tool_prefix"; then
5102 for ac_prog in cl.exe
5103 do
5104 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5105set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5107$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 5108if test "${ac_cv_prog_CC+set}" = set; then :
067d23c9
KY
5109 $as_echo_n "(cached) " >&6
5110else
5111 if test -n "$CC"; then
5112 ac_cv_prog_CC="$CC" # Let the user override the test.
5113else
5114as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5115for as_dir in $PATH
5116do
5117 IFS=$as_save_IFS
5118 test -z "$as_dir" && as_dir=.
5119 for ac_exec_ext in '' $ac_executable_extensions; do
5120 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5121 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
5122 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5123 break 2
5124 fi
5125done
5126 done
5127IFS=$as_save_IFS
5128
5129fi
5130fi
5131CC=$ac_cv_prog_CC
5132if test -n "$CC"; then
5133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5134$as_echo "$CC" >&6; }
5135else
5136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5137$as_echo "no" >&6; }
5138fi
5139
5140
5141 test -n "$CC" && break
5142 done
5143fi
5144if test -z "$CC"; then
5145 ac_ct_CC=$CC
5146 for ac_prog in cl.exe
5147do
5148 # Extract the first word of "$ac_prog", so it can be a program name with args.
5149set dummy $ac_prog; ac_word=$2
5150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5151$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 5152if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
067d23c9
KY
5153 $as_echo_n "(cached) " >&6
5154else
5155 if test -n "$ac_ct_CC"; then
5156 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5157else
5158as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5159for as_dir in $PATH
5160do
5161 IFS=$as_save_IFS
5162 test -z "$as_dir" && as_dir=.
5163 for ac_exec_ext in '' $ac_executable_extensions; do
5164 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5165 ac_cv_prog_ac_ct_CC="$ac_prog"
5166 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5167 break 2
5168 fi
5169done
5170 done
5171IFS=$as_save_IFS
5172
5173fi
5174fi
5175ac_ct_CC=$ac_cv_prog_ac_ct_CC
5176if test -n "$ac_ct_CC"; then
5177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5178$as_echo "$ac_ct_CC" >&6; }
5179else
5180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5181$as_echo "no" >&6; }
5182fi
5183
5184
5185 test -n "$ac_ct_CC" && break
5186done
5187
5188 if test "x$ac_ct_CC" = x; then
5189 CC=""
5190 else
5191 case $cross_compiling:$ac_tool_warned in
5192yes:)
5193{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5194$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5195ac_tool_warned=yes ;;
5196esac
5197 CC=$ac_ct_CC
5198 fi
5199fi
5200
5201fi
5202
5203
5204test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5205$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
a9bec17c
GM
5206as_fn_error "no acceptable C compiler found in \$PATH
5207See \`config.log' for more details." "$LINENO" 5; }
067d23c9
KY
5208
5209# Provide some information about the compiler.
5210$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
5211set X $ac_compile
5212ac_compiler=$2
5213for ac_option in --version -v -V -qversion; do
5214 { { ac_try="$ac_compiler $ac_option >&5"
5215case "(($ac_try" in
5216 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5217 *) ac_try_echo=$ac_try;;
5218esac
5219eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5220$as_echo "$ac_try_echo"; } >&5
5221 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
5222 ac_status=$?
5223 if test -s conftest.err; then
5224 sed '10a\
5225... rest of stderr output deleted ...
5226 10q' conftest.err >conftest.er1
5227 cat conftest.er1 >&5
5228 fi
5229 rm -f conftest.er1 conftest.err
5230 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5231 test $ac_status = 0; }
5232done
5233
5234cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5235/* end confdefs.h. */
5236
5237int
5238main ()
5239{
5240
5241 ;
5242 return 0;
5243}
5244_ACEOF
5245ac_clean_files_save=$ac_clean_files
5246ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
5247# Try to create an executable without -o first, disregard a.out.
5248# It will help us diagnose broken compilers, and finding out an intuition
5249# of exeext.
5250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
5251$as_echo_n "checking whether the C compiler works... " >&6; }
5252ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
5253
5254# The possible output files:
5255ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
5256
5257ac_rmfiles=
5258for ac_file in $ac_files
5259do
5260 case $ac_file in
5261 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
5262 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
5263 esac
5264done
5265rm -f $ac_rmfiles
5266
5267if { { ac_try="$ac_link_default"
5268case "(($ac_try" in
5269 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5270 *) ac_try_echo=$ac_try;;
5271esac
5272eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5273$as_echo "$ac_try_echo"; } >&5
5274 (eval "$ac_link_default") 2>&5
5275 ac_status=$?
5276 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5277 test $ac_status = 0; }; then :
5278 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
5279# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
5280# in a Makefile. We should not override ac_cv_exeext if it was cached,
5281# so that the user can short-circuit this test for compilers unknown to
5282# Autoconf.
5283for ac_file in $ac_files ''
5284do
5285 test -f "$ac_file" || continue
5286 case $ac_file in
5287 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
5288 ;;
5289 [ab].out )
5290 # We found the default executable, but exeext='' is most
5291 # certainly right.
5292 break;;
5293 *.* )
5294 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
5295 then :; else
5296 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
5297 fi
5298 # We set ac_cv_exeext here because the later test for it is not
5299 # safe: cross compilers may not add the suffix if given an `-o'
5300 # argument, so we may need to know it at that point already.
5301 # Even if this section looks crufty: it has the advantage of
5302 # actually working.
5303 break;;
5304 * )
5305 break;;
5306 esac
5307done
5308test "$ac_cv_exeext" = no && ac_cv_exeext=
5309
5310else
5311 ac_file=''
5312fi
5313if test -z "$ac_file"; then :
5314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5315$as_echo "no" >&6; }
5316$as_echo "$as_me: failed program was:" >&5
5317sed 's/^/| /' conftest.$ac_ext >&5
5318
5319{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5320$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
a9bec17c
GM
5321{ as_fn_set_status 77
5322as_fn_error "C compiler cannot create executables
5323See \`config.log' for more details." "$LINENO" 5; }; }
067d23c9
KY
5324else
5325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5326$as_echo "yes" >&6; }
5327fi
5328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
5329$as_echo_n "checking for C compiler default output file name... " >&6; }
5330{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
5331$as_echo "$ac_file" >&6; }
5332ac_exeext=$ac_cv_exeext
5333
5334rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
5335ac_clean_files=$ac_clean_files_save
5336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
5337$as_echo_n "checking for suffix of executables... " >&6; }
5338if { { ac_try="$ac_link"
5339case "(($ac_try" in
5340 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5341 *) ac_try_echo=$ac_try;;
5342esac
5343eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5344$as_echo "$ac_try_echo"; } >&5
5345 (eval "$ac_link") 2>&5
5346 ac_status=$?
5347 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5348 test $ac_status = 0; }; then :
5349 # If both `conftest.exe' and `conftest' are `present' (well, observable)
5350# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
5351# work properly (i.e., refer to `conftest.exe'), while it won't with
5352# `rm'.
5353for ac_file in conftest.exe conftest conftest.*; do
5354 test -f "$ac_file" || continue
5355 case $ac_file in
5356 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
5357 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
5358 break;;
5359 * ) break;;
5360 esac
5361done
5362else
5363 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5364$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
a9bec17c
GM
5365as_fn_error "cannot compute suffix of executables: cannot compile and link
5366See \`config.log' for more details." "$LINENO" 5; }
067d23c9
KY
5367fi
5368rm -f conftest conftest$ac_cv_exeext
5369{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
5370$as_echo "$ac_cv_exeext" >&6; }
5371
5372rm -f conftest.$ac_ext
5373EXEEXT=$ac_cv_exeext
5374ac_exeext=$EXEEXT
5375cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5376/* end confdefs.h. */
5377#include <stdio.h>
5378int
5379main ()
5380{
5381FILE *f = fopen ("conftest.out", "w");
5382 return ferror (f) || fclose (f) != 0;
5383
5384 ;
5385 return 0;
5386}
5387_ACEOF
5388ac_clean_files="$ac_clean_files conftest.out"
5389# Check that the compiler produces executables we can run. If not, either
5390# the compiler is broken, or we cross compile.
5391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
5392$as_echo_n "checking whether we are cross compiling... " >&6; }
5393if test "$cross_compiling" != yes; then
5394 { { ac_try="$ac_link"
5395case "(($ac_try" in
5396 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5397 *) ac_try_echo=$ac_try;;
5398esac
5399eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5400$as_echo "$ac_try_echo"; } >&5
5401 (eval "$ac_link") 2>&5
5402 ac_status=$?
5403 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5404 test $ac_status = 0; }
5405 if { ac_try='./conftest$ac_cv_exeext'
5406 { { case "(($ac_try" in
5407 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5408 *) ac_try_echo=$ac_try;;
5409esac
5410eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5411$as_echo "$ac_try_echo"; } >&5
5412 (eval "$ac_try") 2>&5
5413 ac_status=$?
5414 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5415 test $ac_status = 0; }; }; then
5416 cross_compiling=no
5417 else
5418 if test "$cross_compiling" = maybe; then
5419 cross_compiling=yes
5420 else
5421 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5422$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
a9bec17c 5423as_fn_error "cannot run C compiled programs.
067d23c9 5424If you meant to cross compile, use \`--host'.
a9bec17c 5425See \`config.log' for more details." "$LINENO" 5; }
067d23c9
KY
5426 fi
5427 fi
5428fi
5429{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
5430$as_echo "$cross_compiling" >&6; }
5431
5432rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
5433ac_clean_files=$ac_clean_files_save
5434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
5435$as_echo_n "checking for suffix of object files... " >&6; }
a9bec17c 5436if test "${ac_cv_objext+set}" = set; then :
067d23c9
KY
5437 $as_echo_n "(cached) " >&6
5438else
5439 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5440/* end confdefs.h. */
5441
5442int
5443main ()
5444{
5445
5446 ;
5447 return 0;
5448}
5449_ACEOF
5450rm -f conftest.o conftest.obj
5451if { { ac_try="$ac_compile"
5452case "(($ac_try" in
5453 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5454 *) ac_try_echo=$ac_try;;
5455esac
5456eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5457$as_echo "$ac_try_echo"; } >&5
5458 (eval "$ac_compile") 2>&5
5459 ac_status=$?
5460 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5461 test $ac_status = 0; }; then :
5462 for ac_file in conftest.o conftest.obj conftest.*; do
5463 test -f "$ac_file" || continue;
5464 case $ac_file in
5465 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
5466 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
5467 break;;
5468 esac
5469done
5470else
5471 $as_echo "$as_me: failed program was:" >&5
5472sed 's/^/| /' conftest.$ac_ext >&5
5473
5474{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5475$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
a9bec17c
GM
5476as_fn_error "cannot compute suffix of object files: cannot compile
5477See \`config.log' for more details." "$LINENO" 5; }
067d23c9
KY
5478fi
5479rm -f conftest.$ac_cv_objext conftest.$ac_ext
5480fi
5481{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
5482$as_echo "$ac_cv_objext" >&6; }
5483OBJEXT=$ac_cv_objext
5484ac_objext=$OBJEXT
5485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
5486$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
a9bec17c 5487if test "${ac_cv_c_compiler_gnu+set}" = set; then :
067d23c9
KY
5488 $as_echo_n "(cached) " >&6
5489else
5490 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5491/* end confdefs.h. */
5492
5493int
5494main ()
5495{
5496#ifndef __GNUC__
5497 choke me
5498#endif
5499
5500 ;
5501 return 0;
5502}
5503_ACEOF
5504if ac_fn_c_try_compile "$LINENO"; then :
5505 ac_compiler_gnu=yes
5506else
5507 ac_compiler_gnu=no
5508fi
5509rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5510ac_cv_c_compiler_gnu=$ac_compiler_gnu
5511
5512fi
5513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
5514$as_echo "$ac_cv_c_compiler_gnu" >&6; }
5515if test $ac_compiler_gnu = yes; then
5516 GCC=yes
5517else
5518 GCC=
5519fi
5520ac_test_CFLAGS=${CFLAGS+set}
5521ac_save_CFLAGS=$CFLAGS
5522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
5523$as_echo_n "checking whether $CC accepts -g... " >&6; }
a9bec17c 5524if test "${ac_cv_prog_cc_g+set}" = set; then :
067d23c9
KY
5525 $as_echo_n "(cached) " >&6
5526else
5527 ac_save_c_werror_flag=$ac_c_werror_flag
5528 ac_c_werror_flag=yes
5529 ac_cv_prog_cc_g=no
5530 CFLAGS="-g"
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 ac_cv_prog_cc_g=yes
5544else
5545 CFLAGS=""
5546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5547/* end confdefs.h. */
5548
5549int
5550main ()
5551{
5552
5553 ;
5554 return 0;
5555}
5556_ACEOF
5557if ac_fn_c_try_compile "$LINENO"; then :
5558
5559else
5560 ac_c_werror_flag=$ac_save_c_werror_flag
5561 CFLAGS="-g"
5562 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5563/* end confdefs.h. */
5564
5565int
5566main ()
5567{
5568
5569 ;
5570 return 0;
5571}
5572_ACEOF
5573if ac_fn_c_try_compile "$LINENO"; then :
5574 ac_cv_prog_cc_g=yes
5575fi
5576rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5577fi
5578rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5579fi
5580rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5581 ac_c_werror_flag=$ac_save_c_werror_flag
5582fi
5583{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
5584$as_echo "$ac_cv_prog_cc_g" >&6; }
5585if test "$ac_test_CFLAGS" = set; then
5586 CFLAGS=$ac_save_CFLAGS
5587elif test $ac_cv_prog_cc_g = yes; then
5588 if test "$GCC" = yes; then
5589 CFLAGS="-g -O2"
5590 else
5591 CFLAGS="-g"
5592 fi
5593else
5594 if test "$GCC" = yes; then
5595 CFLAGS="-O2"
5596 else
5597 CFLAGS=
5598 fi
5599fi
5600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
5601$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
a9bec17c 5602if test "${ac_cv_prog_cc_c89+set}" = set; then :
067d23c9
KY
5603 $as_echo_n "(cached) " >&6
5604else
5605 ac_cv_prog_cc_c89=no
5606ac_save_CC=$CC
5607cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5608/* end confdefs.h. */
5609#include <stdarg.h>
5610#include <stdio.h>
5611#include <sys/types.h>
5612#include <sys/stat.h>
5613/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
5614struct buf { int x; };
5615FILE * (*rcsopen) (struct buf *, struct stat *, int);
5616static char *e (p, i)
5617 char **p;
5618 int i;
5619{
5620 return p[i];
5621}
5622static char *f (char * (*g) (char **, int), char **p, ...)
5623{
5624 char *s;
5625 va_list v;
5626 va_start (v,p);
5627 s = g (p, va_arg (v,int));
5628 va_end (v);
5629 return s;
5630}
5631
5632/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
5633 function prototypes and stuff, but not '\xHH' hex character constants.
5634 These don't provoke an error unfortunately, instead are silently treated
5635 as 'x'. The following induces an error, until -std is added to get
5636 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
5637 array size at least. It's necessary to write '\x00'==0 to get something
5638 that's true only with -std. */
5639int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5640
5641/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5642 inside strings and character constants. */
5643#define FOO(x) 'x'
5644int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5645
5646int test (int i, double x);
5647struct s1 {int (*f) (int a);};
5648struct s2 {int (*f) (double a);};
5649int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5650int argc;
5651char **argv;
5652int
5653main ()
5654{
5655return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
5656 ;
5657 return 0;
5658}
5659_ACEOF
5660for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5661 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5662do
5663 CC="$ac_save_CC $ac_arg"
5664 if ac_fn_c_try_compile "$LINENO"; then :
5665 ac_cv_prog_cc_c89=$ac_arg
5666fi
5667rm -f core conftest.err conftest.$ac_objext
5668 test "x$ac_cv_prog_cc_c89" != "xno" && break
5669done
743c80a7
PE
5670rm -f conftest.$ac_ext
5671CC=$ac_save_CC
5672
5673fi
5674# AC_CACHE_VAL
5675case "x$ac_cv_prog_cc_c89" in
5676 x)
5677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5678$as_echo "none needed" >&6; } ;;
5679 xno)
5680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5681$as_echo "unsupported" >&6; } ;;
5682 *)
5683 CC="$CC $ac_cv_prog_cc_c89"
5684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5685$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
5686esac
5687if test "x$ac_cv_prog_cc_c89" != xno; then :
5688
5689fi
5690
5691ac_ext=c
5692ac_cpp='$CPP $CPPFLAGS'
5693ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5694ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5695ac_compiler_gnu=$ac_cv_c_compiler_gnu
5696DEPDIR="${am__leading_dot}deps"
5697
5698ac_config_commands="$ac_config_commands depfiles"
5699
5700
5701am_make=${MAKE-make}
5702cat > confinc << 'END'
5703am__doit:
5704 @echo this is the am__doit target
5705.PHONY: am__doit
5706END
5707# If we don't find an include directive, just comment out the code.
5708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
5709$as_echo_n "checking for style of include used by $am_make... " >&6; }
5710am__include="#"
5711am__quote=
5712_am_result=none
5713# First try GNU make style include.
5714echo "include confinc" > confmf
5715# Ignore all kinds of additional output from `make'.
5716case `$am_make -s -f confmf 2> /dev/null` in #(
5717*the\ am__doit\ target*)
5718 am__include=include
5719 am__quote=
5720 _am_result=GNU
5721 ;;
5722esac
5723# Now try BSD make style include.
5724if test "$am__include" = "#"; then
5725 echo '.include "confinc"' > confmf
5726 case `$am_make -s -f confmf 2> /dev/null` in #(
5727 *the\ am__doit\ target*)
5728 am__include=.include
5729 am__quote="\""
5730 _am_result=BSD
5731 ;;
5732 esac
5733fi
5734
5735
5736{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
5737$as_echo "$_am_result" >&6; }
5738rm -f confinc confmf
5739
5740# Check whether --enable-dependency-tracking was given.
5741if test "${enable_dependency_tracking+set}" = set; then :
5742 enableval=$enable_dependency_tracking;
5743fi
5744
5745if test "x$enable_dependency_tracking" != xno; then
5746 am_depcomp="$ac_aux_dir/depcomp"
5747 AMDEPBACKSLASH='\'
5748fi
5749 if test "x$enable_dependency_tracking" != xno; then
5750 AMDEP_TRUE=
5751 AMDEP_FALSE='#'
5752else
5753 AMDEP_TRUE='#'
5754 AMDEP_FALSE=
5755fi
5756
5757
5758
5759depcc="$CC" am_compiler_list=
5760
5761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
5762$as_echo_n "checking dependency style of $depcc... " >&6; }
a9bec17c 5763if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
743c80a7
PE
5764 $as_echo_n "(cached) " >&6
5765else
5766 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
5767 # We make a subdir and do the tests there. Otherwise we can end up
5768 # making bogus files that we don't know about and never remove. For
5769 # instance it was reported that on HP-UX the gcc test will end up
5770 # making a dummy file named `D' -- because `-MD' means `put the output
5771 # in D'.
5772 mkdir conftest.dir
5773 # Copy depcomp to subdir because otherwise we won't find it if we're
5774 # using a relative directory.
5775 cp "$am_depcomp" conftest.dir
5776 cd conftest.dir
5777 # We will build objects and dependencies in a subdirectory because
5778 # it helps to detect inapplicable dependency modes. For instance
5779 # both Tru64's cc and ICC support -MD to output dependencies as a
5780 # side effect of compilation, but ICC will put the dependencies in
5781 # the current directory while Tru64 will put them in the object
5782 # directory.
5783 mkdir sub
5784
5785 am_cv_CC_dependencies_compiler_type=none
5786 if test "$am_compiler_list" = ""; then
5787 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5788 fi
5789 am__universal=false
5790 case " $depcc " in #(
5791 *\ -arch\ *\ -arch\ *) am__universal=true ;;
5792 esac
5793
5794 for depmode in $am_compiler_list; do
5795 # Setup a source with many dependencies, because some compilers
5796 # like to wrap large dependency lists on column 80 (with \), and
5797 # we should not choose a depcomp mode which is confused by this.
5798 #
5799 # We need to recreate these files for each test, as the compiler may
5800 # overwrite some of them when testing with obscure command lines.
5801 # This happens at least with the AIX C compiler.
5802 : > sub/conftest.c
5803 for i in 1 2 3 4 5 6; do
5804 echo '#include "conftst'$i'.h"' >> sub/conftest.c
5805 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
5806 # Solaris 8's {/usr,}/bin/sh.
5807 touch sub/conftst$i.h
5808 done
5809 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
5810
5811 # We check with `-c' and `-o' for the sake of the "dashmstdout"
5812 # mode. It turns out that the SunPro C++ compiler does not properly
5813 # handle `-M -o', and we need to detect this. Also, some Intel
5814 # versions had trouble with output in subdirs
5815 am__obj=sub/conftest.${OBJEXT-o}
5816 am__minus_obj="-o $am__obj"
5817 case $depmode in
5818 gcc)
5819 # This depmode causes a compiler race in universal mode.
5820 test "$am__universal" = false || continue
5821 ;;
5822 nosideeffect)
5823 # after this tag, mechanisms are not by side-effect, so they'll
5824 # only be used when explicitly requested
5825 if test "x$enable_dependency_tracking" = xyes; then
5826 continue
5827 else
5828 break
5829 fi
5830 ;;
5831 msvisualcpp | msvcmsys)
5832 # This compiler won't grok `-c -o', but also, the minuso test has
5833 # not run yet. These depmodes are late enough in the game, and
5834 # so weak that their functioning should not be impacted.
5835 am__obj=conftest.${OBJEXT-o}
5836 am__minus_obj=
5837 ;;
5838 none) break ;;
5839 esac
5840 if depmode=$depmode \
5841 source=sub/conftest.c object=$am__obj \
5842 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
5843 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
5844 >/dev/null 2>conftest.err &&
5845 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
5846 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
5847 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
5848 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
5849 # icc doesn't choke on unknown options, it will just issue warnings
5850 # or remarks (even with -Werror). So we grep stderr for any message
5851 # that says an option was ignored or not supported.
5852 # When given -MP, icc 7.0 and 7.1 complain thusly:
5853 # icc: Command line warning: ignoring option '-M'; no argument required
5854 # The diagnosis changed in icc 8.0:
5855 # icc: Command line remark: option '-MP' not supported
5856 if (grep 'ignoring option' conftest.err ||
5857 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
5858 am_cv_CC_dependencies_compiler_type=$depmode
5859 break
5860 fi
5861 fi
5862 done
5863
5864 cd ..
5865 rm -rf conftest.dir
5866else
5867 am_cv_CC_dependencies_compiler_type=none
5868fi
5869
5870fi
5871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
5872$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
5873CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
5874
5875 if
5876 test "x$enable_dependency_tracking" != xno \
5877 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
5878 am__fastdepCC_TRUE=
5879 am__fastdepCC_FALSE='#'
5880else
5881 am__fastdepCC_TRUE='#'
5882 am__fastdepCC_FALSE=
5883fi
5884
5885
5886if test "x$CC" != xcc; then
5887 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5
5888$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
5889else
5890 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5
5891$as_echo_n "checking whether cc understands -c and -o together... " >&6; }
5892fi
5893set dummy $CC; ac_cc=`$as_echo "$2" |
5894 sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
a9bec17c 5895if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then :
743c80a7
PE
5896 $as_echo_n "(cached) " >&6
5897else
5898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5899/* end confdefs.h. */
5900
5901int
5902main ()
5903{
5904
5905 ;
5906 return 0;
5907}
5908_ACEOF
5909# Make sure it works both with $CC and with simple cc.
5910# We do the test twice because some compilers refuse to overwrite an
5911# existing .o file with -o, though they will create one.
5912ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
5913rm -f conftest2.*
5914if { { case "(($ac_try" in
5915 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5916 *) ac_try_echo=$ac_try;;
5917esac
5918eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5919$as_echo "$ac_try_echo"; } >&5
5920 (eval "$ac_try") 2>&5
5921 ac_status=$?
5922 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5923 test $ac_status = 0; } &&
5924 test -f conftest2.$ac_objext && { { 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; };
5934then
5935 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
5936 if test "x$CC" != xcc; then
5937 # Test first that cc exists at all.
5938 if { ac_try='cc -c conftest.$ac_ext >&5'
5939 { { case "(($ac_try" in
5940 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5941 *) ac_try_echo=$ac_try;;
5942esac
5943eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5944$as_echo "$ac_try_echo"; } >&5
5945 (eval "$ac_try") 2>&5
5946 ac_status=$?
5947 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5948 test $ac_status = 0; }; }; then
5949 ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
5950 rm -f conftest2.*
5951 if { { case "(($ac_try" in
5952 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5953 *) ac_try_echo=$ac_try;;
5954esac
5955eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5956$as_echo "$ac_try_echo"; } >&5
5957 (eval "$ac_try") 2>&5
5958 ac_status=$?
5959 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5960 test $ac_status = 0; } &&
5961 test -f conftest2.$ac_objext && { { case "(($ac_try" in
5962 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5963 *) ac_try_echo=$ac_try;;
5964esac
5965eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5966$as_echo "$ac_try_echo"; } >&5
5967 (eval "$ac_try") 2>&5
5968 ac_status=$?
5969 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5970 test $ac_status = 0; };
5971 then
5972 # cc works too.
5973 :
5974 else
5975 # cc exists but doesn't like -o.
5976 eval ac_cv_prog_cc_${ac_cc}_c_o=no
5977 fi
5978 fi
5979 fi
5980else
5981 eval ac_cv_prog_cc_${ac_cc}_c_o=no
5982fi
5983rm -f core conftest*
5984
5985fi
5986if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
5987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5988$as_echo "yes" >&6; }
5989else
5990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5991$as_echo "no" >&6; }
5992
5993$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h
5994
5995fi
5996
5997# FIXME: we rely on the cache variable name because
5998# there is no other way.
5999set dummy $CC
6000am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
6001eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
6002if test "$am_t" != yes; then
6003 # Losing compiler, so override with the script.
6004 # FIXME: It is wrong to rewrite CC.
6005 # But if we don't then we get into trouble of one sort or another.
6006 # A longer-term fix would be to have automake use am__CC in this case,
6007 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
6008 CC="$am_aux_dir/compile $CC"
6009fi
6010
6011
6012
5ec54608
GM
6013if test x$GCC = xyes; then
6014 test "x$GCC_TEST_OPTIONS" != x && CC="$CC $GCC_TEST_OPTIONS"
6015else
6016 test "x$NON_GCC_TEST_OPTIONS" != x && CC="$CC $NON_GCC_TEST_OPTIONS"
6017fi
6018
7c61eaab
GM
6019 if test "x$opsys" = "xmingw32"; then
6020 BUILDING_FOR_WINDOWSNT_TRUE=
6021 BUILDING_FOR_WINDOWSNT_FALSE='#'
6022else
6023 BUILDING_FOR_WINDOWSNT_TRUE='#'
6024 BUILDING_FOR_WINDOWSNT_FALSE=
6025fi
6026
6027
34fd7a48
GM
6028# Avoid gnulib's tests for HAVE_WORKING_O_NOATIME and HAVE_WORKING_O_NOFOLLOW,
6029# as we don't use them.
710f5812 6030
f077f61d
GM
6031# Avoid gnulib's threadlib module, as we do threads our own way.
6032
6033
5ec54608 6034# Initialize gnulib right after choosing the compiler.
743c80a7 6035
067d23c9
KY
6036ac_ext=c
6037ac_cpp='$CPP $CPPFLAGS'
6038ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6039ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6040ac_compiler_gnu=$ac_cv_c_compiler_gnu
6041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
6042$as_echo_n "checking how to run the C preprocessor... " >&6; }
6043# On Suns, sometimes $CPP names a directory.
6044if test -n "$CPP" && test -d "$CPP"; then
6045 CPP=
6046fi
6047if test -z "$CPP"; then
a9bec17c 6048 if test "${ac_cv_prog_CPP+set}" = set; then :
067d23c9
KY
6049 $as_echo_n "(cached) " >&6
6050else
6051 # Double quotes because CPP needs to be expanded
6052 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
6053 do
6054 ac_preproc_ok=false
6055for ac_c_preproc_warn_flag in '' yes
6056do
6057 # Use a header file that comes with gcc, so configuring glibc
6058 # with a fresh cross-compiler works.
6059 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6060 # <limits.h> exists even on freestanding compilers.
6061 # On the NeXT, cc -E runs the code through the compiler's parser,
6062 # not just through cpp. "Syntax error" is here to catch this case.
6063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6064/* end confdefs.h. */
6065#ifdef __STDC__
6066# include <limits.h>
6067#else
6068# include <assert.h>
6069#endif
6070 Syntax error
6071_ACEOF
6072if ac_fn_c_try_cpp "$LINENO"; then :
6073
6074else
6075 # Broken: fails on valid input.
6076continue
6077fi
a9bec17c 6078rm -f conftest.err conftest.$ac_ext
067d23c9
KY
6079
6080 # OK, works on sane cases. Now check whether nonexistent headers
6081 # can be detected and how.
6082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6083/* end confdefs.h. */
6084#include <ac_nonexistent.h>
6085_ACEOF
6086if ac_fn_c_try_cpp "$LINENO"; then :
6087 # Broken: success on invalid input.
6088continue
6089else
6090 # Passes both tests.
6091ac_preproc_ok=:
6092break
6093fi
a9bec17c 6094rm -f conftest.err conftest.$ac_ext
067d23c9
KY
6095
6096done
6097# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
a9bec17c 6098rm -f conftest.err conftest.$ac_ext
067d23c9
KY
6099if $ac_preproc_ok; then :
6100 break
6101fi
6102
6103 done
6104 ac_cv_prog_CPP=$CPP
6105
6106fi
6107 CPP=$ac_cv_prog_CPP
6108else
6109 ac_cv_prog_CPP=$CPP
6110fi
6111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
6112$as_echo "$CPP" >&6; }
6113ac_preproc_ok=false
6114for ac_c_preproc_warn_flag in '' yes
6115do
6116 # Use a header file that comes with gcc, so configuring glibc
6117 # with a fresh cross-compiler works.
6118 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6119 # <limits.h> exists even on freestanding compilers.
6120 # On the NeXT, cc -E runs the code through the compiler's parser,
6121 # not just through cpp. "Syntax error" is here to catch this case.
6122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6123/* end confdefs.h. */
6124#ifdef __STDC__
6125# include <limits.h>
6126#else
6127# include <assert.h>
6128#endif
6129 Syntax error
6130_ACEOF
6131if ac_fn_c_try_cpp "$LINENO"; then :
6132
6133else
6134 # Broken: fails on valid input.
6135continue
6136fi
a9bec17c 6137rm -f conftest.err conftest.$ac_ext
067d23c9
KY
6138
6139 # OK, works on sane cases. Now check whether nonexistent headers
6140 # can be detected and how.
6141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6142/* end confdefs.h. */
6143#include <ac_nonexistent.h>
6144_ACEOF
6145if ac_fn_c_try_cpp "$LINENO"; then :
6146 # Broken: success on invalid input.
6147continue
6148else
6149 # Passes both tests.
6150ac_preproc_ok=:
6151break
6152fi
a9bec17c 6153rm -f conftest.err conftest.$ac_ext
067d23c9
KY
6154
6155done
6156# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
a9bec17c 6157rm -f conftest.err conftest.$ac_ext
067d23c9
KY
6158if $ac_preproc_ok; then :
6159
6160else
6161 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6162$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
a9bec17c
GM
6163as_fn_error "C preprocessor \"$CPP\" fails sanity check
6164See \`config.log' for more details." "$LINENO" 5; }
067d23c9
KY
6165fi
6166
6167ac_ext=c
6168ac_cpp='$CPP $CPPFLAGS'
6169ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6170ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6171ac_compiler_gnu=$ac_cv_c_compiler_gnu
6172
6173
6174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6175$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
a9bec17c 6176if test "${ac_cv_path_GREP+set}" = set; then :
067d23c9
KY
6177 $as_echo_n "(cached) " >&6
6178else
6179 if test -z "$GREP"; then
6180 ac_path_GREP_found=false
6181 # Loop through the user's path and test for each of PROGNAME-LIST
6182 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6183for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6184do
6185 IFS=$as_save_IFS
6186 test -z "$as_dir" && as_dir=.
6187 for ac_prog in grep ggrep; do
6188 for ac_exec_ext in '' $ac_executable_extensions; do
6189 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6190 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
6191# Check for GNU ac_path_GREP and select it if it is found.
6192 # Check for GNU $ac_path_GREP
6193case `"$ac_path_GREP" --version 2>&1` in
6194*GNU*)
6195 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6196*)
6197 ac_count=0
6198 $as_echo_n 0123456789 >"conftest.in"
6199 while :
6200 do
6201 cat "conftest.in" "conftest.in" >"conftest.tmp"
6202 mv "conftest.tmp" "conftest.in"
6203 cp "conftest.in" "conftest.nl"
6204 $as_echo 'GREP' >> "conftest.nl"
6205 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6206 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6207 as_fn_arith $ac_count + 1 && ac_count=$as_val
6208 if test $ac_count -gt ${ac_path_GREP_max-0}; then
6209 # Best one so far, save it but keep looking for a better one
6210 ac_cv_path_GREP="$ac_path_GREP"
6211 ac_path_GREP_max=$ac_count
6212 fi
6213 # 10*(2^10) chars as input seems more than enough
6214 test $ac_count -gt 10 && break
6215 done
6216 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6217esac
6218
6219 $ac_path_GREP_found && break 3
6220 done
6221 done
6222 done
6223IFS=$as_save_IFS
6224 if test -z "$ac_cv_path_GREP"; then
a9bec17c 6225 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
067d23c9
KY
6226 fi
6227else
6228 ac_cv_path_GREP=$GREP
6229fi
6230
6231fi
6232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6233$as_echo "$ac_cv_path_GREP" >&6; }
6234 GREP="$ac_cv_path_GREP"
6235
6236
6237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6238$as_echo_n "checking for egrep... " >&6; }
a9bec17c 6239if test "${ac_cv_path_EGREP+set}" = set; then :
067d23c9
KY
6240 $as_echo_n "(cached) " >&6
6241else
6242 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6243 then ac_cv_path_EGREP="$GREP -E"
6244 else
6245 if test -z "$EGREP"; then
6246 ac_path_EGREP_found=false
6247 # Loop through the user's path and test for each of PROGNAME-LIST
6248 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6249for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6250do
6251 IFS=$as_save_IFS
6252 test -z "$as_dir" && as_dir=.
6253 for ac_prog in egrep; do
6254 for ac_exec_ext in '' $ac_executable_extensions; do
6255 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6256 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
6257# Check for GNU ac_path_EGREP and select it if it is found.
6258 # Check for GNU $ac_path_EGREP
6259case `"$ac_path_EGREP" --version 2>&1` in
6260*GNU*)
6261 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6262*)
6263 ac_count=0
6264 $as_echo_n 0123456789 >"conftest.in"
6265 while :
6266 do
6267 cat "conftest.in" "conftest.in" >"conftest.tmp"
6268 mv "conftest.tmp" "conftest.in"
6269 cp "conftest.in" "conftest.nl"
6270 $as_echo 'EGREP' >> "conftest.nl"
6271 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6272 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6273 as_fn_arith $ac_count + 1 && ac_count=$as_val
6274 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6275 # Best one so far, save it but keep looking for a better one
6276 ac_cv_path_EGREP="$ac_path_EGREP"
6277 ac_path_EGREP_max=$ac_count
6278 fi
6279 # 10*(2^10) chars as input seems more than enough
6280 test $ac_count -gt 10 && break
6281 done
6282 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6283esac
6284
6285 $ac_path_EGREP_found && break 3
6286 done
6287 done
6288 done
6289IFS=$as_save_IFS
6290 if test -z "$ac_cv_path_EGREP"; then
a9bec17c 6291 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
067d23c9
KY
6292 fi
6293else
6294 ac_cv_path_EGREP=$EGREP
6295fi
6296
6297 fi
6298fi
6299{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6300$as_echo "$ac_cv_path_EGREP" >&6; }
6301 EGREP="$ac_cv_path_EGREP"
6302
6303
369e19fc
PE
6304
6305
6306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
6307$as_echo_n "checking for Minix Amsterdam compiler... " >&6; }
a9bec17c 6308if test "${gl_cv_c_amsterdam_compiler+set}" = set; then :
369e19fc
PE
6309 $as_echo_n "(cached) " >&6
6310else
6311
6312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6313/* end confdefs.h. */
6314
6315#ifdef __ACK__
6316Amsterdam
6317#endif
6318
6319_ACEOF
6320if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6321 $EGREP "Amsterdam" >/dev/null 2>&1; then :
6322 gl_cv_c_amsterdam_compiler=yes
6323else
6324 gl_cv_c_amsterdam_compiler=no
6325fi
6326rm -f conftest*
6327
6328
6329fi
6330{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
6331$as_echo "$gl_cv_c_amsterdam_compiler" >&6; }
6332 if test -z "$AR"; then
6333 if test $gl_cv_c_amsterdam_compiler = yes; then
6334 AR='cc -c.a'
6335 if test -z "$ARFLAGS"; then
6336 ARFLAGS='-o'
6337 fi
6338 else
6339 if test -n "$ac_tool_prefix"; then
6340 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6341set dummy ${ac_tool_prefix}ar; ac_word=$2
6342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6343$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 6344if test "${ac_cv_prog_AR+set}" = set; then :
369e19fc
PE
6345 $as_echo_n "(cached) " >&6
6346else
6347 if test -n "$AR"; then
6348 ac_cv_prog_AR="$AR" # Let the user override the test.
6349else
6350as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6351for as_dir in $PATH
6352do
6353 IFS=$as_save_IFS
6354 test -z "$as_dir" && as_dir=.
6355 for ac_exec_ext in '' $ac_executable_extensions; do
6356 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6357 ac_cv_prog_AR="${ac_tool_prefix}ar"
6358 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6359 break 2
6360 fi
6361done
6362 done
6363IFS=$as_save_IFS
6364
6365fi
6366fi
6367AR=$ac_cv_prog_AR
6368if test -n "$AR"; then
6369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6370$as_echo "$AR" >&6; }
6371else
6372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6373$as_echo "no" >&6; }
6374fi
6375
6376
6377fi
6378if test -z "$ac_cv_prog_AR"; then
6379 ac_ct_AR=$AR
6380 # Extract the first word of "ar", so it can be a program name with args.
6381set dummy ar; ac_word=$2
6382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6383$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 6384if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
369e19fc
PE
6385 $as_echo_n "(cached) " >&6
6386else
6387 if test -n "$ac_ct_AR"; then
6388 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6389else
6390as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6391for as_dir in $PATH
6392do
6393 IFS=$as_save_IFS
6394 test -z "$as_dir" && as_dir=.
6395 for ac_exec_ext in '' $ac_executable_extensions; do
6396 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6397 ac_cv_prog_ac_ct_AR="ar"
6398 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6399 break 2
6400 fi
6401done
6402 done
6403IFS=$as_save_IFS
6404
6405fi
6406fi
6407ac_ct_AR=$ac_cv_prog_ac_ct_AR
6408if test -n "$ac_ct_AR"; then
6409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6410$as_echo "$ac_ct_AR" >&6; }
6411else
6412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6413$as_echo "no" >&6; }
6414fi
6415
6416 if test "x$ac_ct_AR" = x; then
6417 AR="ar"
6418 else
6419 case $cross_compiling:$ac_tool_warned in
6420yes:)
6421{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6422$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6423ac_tool_warned=yes ;;
6424esac
6425 AR=$ac_ct_AR
6426 fi
6427else
6428 AR="$ac_cv_prog_AR"
6429fi
6430
6431 if test -z "$ARFLAGS"; then
6432 ARFLAGS='cru'
6433 fi
6434 fi
6435 else
6436 if test -z "$ARFLAGS"; then
6437 ARFLAGS='cru'
6438 fi
6439 fi
6440
6441
6442 if test -z "$RANLIB"; then
6443 if test $gl_cv_c_amsterdam_compiler = yes; then
6444 RANLIB=':'
6445 else
6446 if test -n "$ac_tool_prefix"; then
6447 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6448set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6450$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 6451if test "${ac_cv_prog_RANLIB+set}" = set; then :
369e19fc
PE
6452 $as_echo_n "(cached) " >&6
6453else
6454 if test -n "$RANLIB"; then
6455 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6456else
6457as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6458for as_dir in $PATH
6459do
6460 IFS=$as_save_IFS
6461 test -z "$as_dir" && as_dir=.
6462 for ac_exec_ext in '' $ac_executable_extensions; do
6463 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6464 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6465 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6466 break 2
6467 fi
6468done
6469 done
6470IFS=$as_save_IFS
6471
6472fi
6473fi
6474RANLIB=$ac_cv_prog_RANLIB
6475if test -n "$RANLIB"; then
6476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6477$as_echo "$RANLIB" >&6; }
6478else
6479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6480$as_echo "no" >&6; }
6481fi
6482
6483
6484fi
6485if test -z "$ac_cv_prog_RANLIB"; then
6486 ac_ct_RANLIB=$RANLIB
6487 # Extract the first word of "ranlib", so it can be a program name with args.
6488set dummy ranlib; ac_word=$2
6489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6490$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 6491if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
369e19fc
PE
6492 $as_echo_n "(cached) " >&6
6493else
6494 if test -n "$ac_ct_RANLIB"; then
6495 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6496else
6497as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6498for as_dir in $PATH
6499do
6500 IFS=$as_save_IFS
6501 test -z "$as_dir" && as_dir=.
6502 for ac_exec_ext in '' $ac_executable_extensions; do
6503 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6504 ac_cv_prog_ac_ct_RANLIB="ranlib"
6505 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6506 break 2
6507 fi
6508done
6509 done
6510IFS=$as_save_IFS
6511
6512fi
6513fi
6514ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6515if test -n "$ac_ct_RANLIB"; then
6516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6517$as_echo "$ac_ct_RANLIB" >&6; }
6518else
6519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6520$as_echo "no" >&6; }
6521fi
6522
6523 if test "x$ac_ct_RANLIB" = x; then
6524 RANLIB=":"
6525 else
6526 case $cross_compiling:$ac_tool_warned in
6527yes:)
6528{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6529$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6530ac_tool_warned=yes ;;
6531esac
6532 RANLIB=$ac_ct_RANLIB
6533 fi
6534else
6535 RANLIB="$ac_cv_prog_RANLIB"
6536fi
6537
6538 fi
6539 fi
6540
6541
067d23c9
KY
6542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6543$as_echo_n "checking for ANSI C header files... " >&6; }
a9bec17c 6544if test "${ac_cv_header_stdc+set}" = set; then :
067d23c9
KY
6545 $as_echo_n "(cached) " >&6
6546else
6547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6548/* end confdefs.h. */
6549#include <stdlib.h>
6550#include <stdarg.h>
6551#include <string.h>
6552#include <float.h>
6553
6554int
6555main ()
6556{
6557
6558 ;
6559 return 0;
6560}
6561_ACEOF
6562if ac_fn_c_try_compile "$LINENO"; then :
6563 ac_cv_header_stdc=yes
6564else
6565 ac_cv_header_stdc=no
6566fi
6567rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6568
6569if test $ac_cv_header_stdc = yes; then
6570 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6571 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6572/* end confdefs.h. */
6573#include <string.h>
6574
6575_ACEOF
6576if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6577 $EGREP "memchr" >/dev/null 2>&1; then :
6578
6579else
6580 ac_cv_header_stdc=no
6581fi
6582rm -f conftest*
6583
6584fi
6585
6586if test $ac_cv_header_stdc = yes; then
6587 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6588 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6589/* end confdefs.h. */
6590#include <stdlib.h>
6591
6592_ACEOF
6593if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6594 $EGREP "free" >/dev/null 2>&1; then :
6595
6596else
6597 ac_cv_header_stdc=no
6598fi
6599rm -f conftest*
6600
6601fi
6602
6603if test $ac_cv_header_stdc = yes; then
6604 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6605 if test "$cross_compiling" = yes; then :
6606 :
6607else
6608 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6609/* end confdefs.h. */
6610#include <ctype.h>
6611#include <stdlib.h>
6612#if ((' ' & 0x0FF) == 0x020)
6613# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6614# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6615#else
6616# define ISLOWER(c) \
6617 (('a' <= (c) && (c) <= 'i') \
6618 || ('j' <= (c) && (c) <= 'r') \
6619 || ('s' <= (c) && (c) <= 'z'))
6620# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6621#endif
6622
6623#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6624int
6625main ()
6626{
6627 int i;
6628 for (i = 0; i < 256; i++)
6629 if (XOR (islower (i), ISLOWER (i))
6630 || toupper (i) != TOUPPER (i))
6631 return 2;
6632 return 0;
6633}
6634_ACEOF
6635if ac_fn_c_try_run "$LINENO"; then :
6636
6637else
6638 ac_cv_header_stdc=no
6639fi
6640rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6641 conftest.$ac_objext conftest.beam conftest.$ac_ext
6642fi
6643
6644fi
6645fi
6646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6647$as_echo "$ac_cv_header_stdc" >&6; }
6648if test $ac_cv_header_stdc = yes; then
6649
6650$as_echo "#define STDC_HEADERS 1" >>confdefs.h
6651
6652fi
6653
6654# On IRIX 5.3, sys/types and inttypes.h are conflicting.
6655for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
6656 inttypes.h stdint.h unistd.h
6657do :
6658 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6659ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
6660"
a9bec17c
GM
6661eval as_val=\$$as_ac_Header
6662 if test "x$as_val" = x""yes; then :
067d23c9
KY
6663 cat >>confdefs.h <<_ACEOF
6664#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6665_ACEOF
6666
6667fi
6668
6669done
6670
6671
6672
6673 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
a9bec17c 6674if test "x$ac_cv_header_minix_config_h" = x""yes; then :
067d23c9
KY
6675 MINIX=yes
6676else
6677 MINIX=
6678fi
6679
6680
6681 if test "$MINIX" = yes; then
6682
6683$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
6684
6685
6686$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
6687
6688
6689$as_echo "#define _MINIX 1" >>confdefs.h
6690
1fd182f0 6691
2cdd55fc 6692$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
1fd182f0 6693
2cdd55fc 6694 fi
1fd182f0 6695
067d23c9
KY
6696
6697 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
6698$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
a9bec17c 6699if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
067d23c9
KY
6700 $as_echo_n "(cached) " >&6
6701else
6702 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6703/* end confdefs.h. */
369e19fc
PE
6704
6705# define __EXTENSIONS__ 1
6706 $ac_includes_default
6707int
6708main ()
6709{
6710
6711 ;
6712 return 0;
6713}
6714_ACEOF
6715if ac_fn_c_try_compile "$LINENO"; then :
6716 ac_cv_safe_to_define___extensions__=yes
6717else
6718 ac_cv_safe_to_define___extensions__=no
6719fi
6720rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6721fi
6722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
6723$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
6724 test $ac_cv_safe_to_define___extensions__ = yes &&
6725 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
6726
6727 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
6728
6729 $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
6730
6731 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
6732
6733 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
6734
6735 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
6736
2cdd55fc
GM
6737 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
6738$as_echo_n "checking whether _XOPEN_SOURCE should be defined... " >&6; }
6739if test "${ac_cv_should_define__xopen_source+set}" = set; then :
6740 $as_echo_n "(cached) " >&6
6741else
6742 ac_cv_should_define__xopen_source=no
6743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6744/* end confdefs.h. */
6745
6746 #include <wchar.h>
6747 mbstate_t x;
6748int
6749main ()
6750{
6751
6752 ;
6753 return 0;
6754}
6755_ACEOF
6756if ac_fn_c_try_compile "$LINENO"; then :
6757
6758else
6759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6760/* end confdefs.h. */
6761
6762 #define _XOPEN_SOURCE 500
6763 #include <wchar.h>
6764 mbstate_t x;
6765int
6766main ()
6767{
6768
6769 ;
6770 return 0;
6771}
6772_ACEOF
6773if ac_fn_c_try_compile "$LINENO"; then :
6774 ac_cv_should_define__xopen_source=yes
6775fi
6776rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6777fi
6778rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6779fi
6780{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
6781$as_echo "$ac_cv_should_define__xopen_source" >&6; }
6782 test $ac_cv_should_define__xopen_source = yes &&
6783 $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
6784
369e19fc
PE
6785
6786
6787
6788
6789
6790
6791
6792# Check whether --enable-largefile was given.
6793if test "${enable_largefile+set}" = set; then :
6794 enableval=$enable_largefile;
6795fi
6796
6797if test "$enable_largefile" != no; then
6798
6799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
6800$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
a9bec17c 6801if test "${ac_cv_sys_largefile_CC+set}" = set; then :
369e19fc
PE
6802 $as_echo_n "(cached) " >&6
6803else
6804 ac_cv_sys_largefile_CC=no
6805 if test "$GCC" != yes; then
6806 ac_save_CC=$CC
6807 while :; do
6808 # IRIX 6.2 and later do not support large files by default,
6809 # so use the C compiler's -n32 option if that helps.
6810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6811/* end confdefs.h. */
6812#include <sys/types.h>
6813 /* Check that off_t can represent 2**63 - 1 correctly.
6814 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6815 since some C++ compilers masquerading as C compilers
6816 incorrectly reject 9223372036854775807. */
6817#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6818 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6819 && LARGE_OFF_T % 2147483647 == 1)
6820 ? 1 : -1];
6821int
6822main ()
6823{
6824
6825 ;
6826 return 0;
6827}
6828_ACEOF
6829 if ac_fn_c_try_compile "$LINENO"; then :
6830 break
6831fi
6832rm -f core conftest.err conftest.$ac_objext
6833 CC="$CC -n32"
6834 if ac_fn_c_try_compile "$LINENO"; then :
6835 ac_cv_sys_largefile_CC=' -n32'; break
6836fi
6837rm -f core conftest.err conftest.$ac_objext
6838 break
6839 done
6840 CC=$ac_save_CC
6841 rm -f conftest.$ac_ext
6842 fi
6843fi
6844{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
6845$as_echo "$ac_cv_sys_largefile_CC" >&6; }
6846 if test "$ac_cv_sys_largefile_CC" != no; then
6847 CC=$CC$ac_cv_sys_largefile_CC
6848 fi
6849
6850 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
6851$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
a9bec17c 6852if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
369e19fc
PE
6853 $as_echo_n "(cached) " >&6
6854else
6855 while :; do
6856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6857/* end confdefs.h. */
6858#include <sys/types.h>
6859 /* Check that off_t can represent 2**63 - 1 correctly.
6860 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6861 since some C++ compilers masquerading as C compilers
6862 incorrectly reject 9223372036854775807. */
6863#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6864 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6865 && LARGE_OFF_T % 2147483647 == 1)
6866 ? 1 : -1];
6867int
6868main ()
6869{
6870
6871 ;
6872 return 0;
6873}
6874_ACEOF
6875if ac_fn_c_try_compile "$LINENO"; then :
6876 ac_cv_sys_file_offset_bits=no; break
6877fi
6878rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6880/* end confdefs.h. */
6881#define _FILE_OFFSET_BITS 64
6882#include <sys/types.h>
6883 /* Check that off_t can represent 2**63 - 1 correctly.
6884 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6885 since some C++ compilers masquerading as C compilers
6886 incorrectly reject 9223372036854775807. */
6887#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6888 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6889 && LARGE_OFF_T % 2147483647 == 1)
6890 ? 1 : -1];
6891int
6892main ()
6893{
6894
6895 ;
6896 return 0;
6897}
6898_ACEOF
6899if ac_fn_c_try_compile "$LINENO"; then :
6900 ac_cv_sys_file_offset_bits=64; break
6901fi
6902rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6903 ac_cv_sys_file_offset_bits=unknown
6904 break
6905done
6906fi
6907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
6908$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
6909case $ac_cv_sys_file_offset_bits in #(
6910 no | unknown) ;;
6911 *)
6912cat >>confdefs.h <<_ACEOF
6913#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
6914_ACEOF
6915;;
6916esac
6917rm -rf conftest*
6918 if test $ac_cv_sys_file_offset_bits = unknown; then
6919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
6920$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
a9bec17c 6921if test "${ac_cv_sys_large_files+set}" = set; then :
369e19fc
PE
6922 $as_echo_n "(cached) " >&6
6923else
6924 while :; do
6925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6926/* end confdefs.h. */
6927#include <sys/types.h>
6928 /* Check that off_t can represent 2**63 - 1 correctly.
6929 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6930 since some C++ compilers masquerading as C compilers
6931 incorrectly reject 9223372036854775807. */
6932#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6933 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6934 && LARGE_OFF_T % 2147483647 == 1)
6935 ? 1 : -1];
6936int
6937main ()
6938{
6939
6940 ;
6941 return 0;
6942}
6943_ACEOF
6944if ac_fn_c_try_compile "$LINENO"; then :
6945 ac_cv_sys_large_files=no; break
6946fi
6947rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6949/* end confdefs.h. */
6950#define _LARGE_FILES 1
6951#include <sys/types.h>
6952 /* Check that off_t can represent 2**63 - 1 correctly.
6953 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6954 since some C++ compilers masquerading as C compilers
6955 incorrectly reject 9223372036854775807. */
6956#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6957 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6958 && LARGE_OFF_T % 2147483647 == 1)
6959 ? 1 : -1];
067d23c9
KY
6960int
6961main ()
6962{
6963
6964 ;
6965 return 0;
6966}
6967_ACEOF
6968if ac_fn_c_try_compile "$LINENO"; then :
369e19fc 6969 ac_cv_sys_large_files=1; break
067d23c9
KY
6970fi
6971rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
369e19fc
PE
6972 ac_cv_sys_large_files=unknown
6973 break
6974done
067d23c9 6975fi
369e19fc
PE
6976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
6977$as_echo "$ac_cv_sys_large_files" >&6; }
6978case $ac_cv_sys_large_files in #(
6979 no | unknown) ;;
6980 *)
6981cat >>confdefs.h <<_ACEOF
6982#define _LARGE_FILES $ac_cv_sys_large_files
6983_ACEOF
6984;;
6985esac
6986rm -rf conftest*
6987 fi
1fd182f0
PE
6988
6989
858c7150
GM
6990$as_echo "#define _DARWIN_USE_64_BIT_INODE 1" >>confdefs.h
6991
369e19fc 6992fi
1fd182f0 6993
6d153f56
GM
6994 case $ac_cv_prog_cc_stdc in #(
6995 no) :
6996 ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; #(
6997 *) :
6998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
6999$as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
a9bec17c 7000if test "${ac_cv_prog_cc_c99+set}" = set; then :
6d153f56
GM
7001 $as_echo_n "(cached) " >&6
7002else
7003 ac_cv_prog_cc_c99=no
7004ac_save_CC=$CC
7005cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7006/* end confdefs.h. */
7007#include <stdarg.h>
7008#include <stdbool.h>
7009#include <stdlib.h>
7010#include <wchar.h>
7011#include <stdio.h>
7012
7013// Check varargs macros. These examples are taken from C99 6.10.3.5.
7014#define debug(...) fprintf (stderr, __VA_ARGS__)
7015#define showlist(...) puts (#__VA_ARGS__)
7016#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
7017static void
7018test_varargs_macros (void)
7019{
7020 int x = 1234;
7021 int y = 5678;
7022 debug ("Flag");
7023 debug ("X = %d\n", x);
7024 showlist (The first, second, and third items.);
7025 report (x>y, "x is %d but y is %d", x, y);
7026}
7027
7028// Check long long types.
7029#define BIG64 18446744073709551615ull
7030#define BIG32 4294967295ul
7031#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
7032#if !BIG_OK
7033 your preprocessor is broken;
7034#endif
7035#if BIG_OK
7036#else
7037 your preprocessor is broken;
7038#endif
7039static long long int bignum = -9223372036854775807LL;
7040static unsigned long long int ubignum = BIG64;
7041
7042struct incomplete_array
7043{
7044 int datasize;
7045 double data[];
7046};
7047
7048struct named_init {
7049 int number;
7050 const wchar_t *name;
7051 double average;
7052};
7053
7054typedef const char *ccp;
7055
7056static inline int
7057test_restrict (ccp restrict text)
7058{
7059 // See if C++-style comments work.
7060 // Iterate through items via the restricted pointer.
7061 // Also check for declarations in for loops.
7062 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
7063 continue;
7064 return 0;
7065}
7066
7067// Check varargs and va_copy.
7068static void
7069test_varargs (const char *format, ...)
7070{
7071 va_list args;
7072 va_start (args, format);
7073 va_list args_copy;
7074 va_copy (args_copy, args);
7075
7076 const char *str;
7077 int number;
7078 float fnumber;
7079
7080 while (*format)
7081 {
7082 switch (*format++)
7083 {
7084 case 's': // string
7085 str = va_arg (args_copy, const char *);
7086 break;
7087 case 'd': // int
7088 number = va_arg (args_copy, int);
7089 break;
7090 case 'f': // float
7091 fnumber = va_arg (args_copy, double);
7092 break;
7093 default:
7094 break;
7095 }
7096 }
7097 va_end (args_copy);
7098 va_end (args);
7099}
7100
7101int
7102main ()
7103{
7104
7105 // Check bool.
7106 _Bool success = false;
7107
7108 // Check restrict.
7109 if (test_restrict ("String literal") == 0)
7110 success = true;
7111 char *restrict newvar = "Another string";
7112
7113 // Check varargs.
7114 test_varargs ("s, d' f .", "string", 65, 34.234);
7115 test_varargs_macros ();
7116
7117 // Check flexible array members.
7118 struct incomplete_array *ia =
7119 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
7120 ia->datasize = 10;
7121 for (int i = 0; i < ia->datasize; ++i)
7122 ia->data[i] = i * 1.234;
7123
7124 // Check named initializers.
7125 struct named_init ni = {
7126 .number = 34,
7127 .name = L"Test wide string",
7128 .average = 543.34343,
7129 };
7130
7131 ni.number = 58;
7132
7133 int dynamic_array[ni.number];
7134 dynamic_array[ni.number - 1] = 543;
7135
7136 // work around unused variable warnings
7137 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
7138 || dynamic_array[ni.number - 1] != 543);
7139
7140 ;
7141 return 0;
7142}
7143_ACEOF
7144for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99
7145do
7146 CC="$ac_save_CC $ac_arg"
7147 if ac_fn_c_try_compile "$LINENO"; then :
7148 ac_cv_prog_cc_c99=$ac_arg
7149fi
7150rm -f core conftest.err conftest.$ac_objext
7151 test "x$ac_cv_prog_cc_c99" != "xno" && break
7152done
7153rm -f conftest.$ac_ext
7154CC=$ac_save_CC
7155
7156fi
7157# AC_CACHE_VAL
7158case "x$ac_cv_prog_cc_c99" in
7159 x)
7160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
7161$as_echo "none needed" >&6; } ;;
7162 xno)
7163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
7164$as_echo "unsupported" >&6; } ;;
7165 *)
7166 CC="$CC $ac_cv_prog_cc_c99"
7167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
7168$as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
7169esac
7170if test "x$ac_cv_prog_cc_c99" != xno; then :
7171 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
7172else
7173 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
7174$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
a9bec17c 7175if test "${ac_cv_prog_cc_c89+set}" = set; then :
6d153f56
GM
7176 $as_echo_n "(cached) " >&6
7177else
7178 ac_cv_prog_cc_c89=no
7179ac_save_CC=$CC
7180cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7181/* end confdefs.h. */
7182#include <stdarg.h>
7183#include <stdio.h>
7184#include <sys/types.h>
7185#include <sys/stat.h>
7186/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
7187struct buf { int x; };
7188FILE * (*rcsopen) (struct buf *, struct stat *, int);
7189static char *e (p, i)
7190 char **p;
7191 int i;
7192{
7193 return p[i];
7194}
7195static char *f (char * (*g) (char **, int), char **p, ...)
7196{
7197 char *s;
7198 va_list v;
7199 va_start (v,p);
7200 s = g (p, va_arg (v,int));
7201 va_end (v);
7202 return s;
7203}
7204
7205/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
7206 function prototypes and stuff, but not '\xHH' hex character constants.
7207 These don't provoke an error unfortunately, instead are silently treated
7208 as 'x'. The following induces an error, until -std is added to get
7209 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
7210 array size at least. It's necessary to write '\x00'==0 to get something
7211 that's true only with -std. */
7212int osf4_cc_array ['\x00' == 0 ? 1 : -1];
7213
7214/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
7215 inside strings and character constants. */
7216#define FOO(x) 'x'
7217int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
7218
7219int test (int i, double x);
7220struct s1 {int (*f) (int a);};
7221struct s2 {int (*f) (double a);};
7222int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
7223int argc;
7224char **argv;
7225int
7226main ()
7227{
7228return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
7229 ;
7230 return 0;
7231}
7232_ACEOF
7233for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
7234 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
7235do
7236 CC="$ac_save_CC $ac_arg"
7237 if ac_fn_c_try_compile "$LINENO"; then :
7238 ac_cv_prog_cc_c89=$ac_arg
7239fi
7240rm -f core conftest.err conftest.$ac_objext
7241 test "x$ac_cv_prog_cc_c89" != "xno" && break
7242done
7243rm -f conftest.$ac_ext
7244CC=$ac_save_CC
7245
7246fi
7247# AC_CACHE_VAL
7248case "x$ac_cv_prog_cc_c89" in
7249 x)
7250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
7251$as_echo "none needed" >&6; } ;;
7252 xno)
7253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
7254$as_echo "unsupported" >&6; } ;;
7255 *)
7256 CC="$CC $ac_cv_prog_cc_c89"
7257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
7258$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
7259esac
7260if test "x$ac_cv_prog_cc_c89" != xno; then :
7261 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
7262else
7263 ac_cv_prog_cc_stdc=no
7264fi
7265
7266fi
7267 ;;
7268esac
7269 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5
7270$as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; }
a9bec17c 7271 if test "${ac_cv_prog_cc_stdc+set}" = set; then :
6d153f56
GM
7272 $as_echo_n "(cached) " >&6
7273fi
7274
7275 case $ac_cv_prog_cc_stdc in #(
7276 no) :
7277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
7278$as_echo "unsupported" >&6; } ;; #(
7279 '') :
7280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
7281$as_echo "none needed" >&6; } ;; #(
7282 *) :
7283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_stdc" >&5
7284$as_echo "$ac_cv_prog_cc_stdc" >&6; } ;;
7285esac
7286
1fd182f0
PE
7287
7288
4fc2b746 7289 # Code from module alloca-opt:
8d8af66d 7290 # Code from module allocator:
d7ad186c 7291 # Code from module at-internal:
20c9c1dc 7292 # Code from module binary-io:
eafe4c87 7293 # Code from module byteswap:
938a4ef9
GM
7294 # Code from module c-ctype:
7295 # Code from module c-strcase:
6c051bab 7296 # Code from module careadlinkat:
f199cab1 7297 # Code from module clock-time:
3bf26e96 7298 # Code from module close-stream:
ec95982c
GM
7299 # Code from module count-one-bits:
7300 # Code from module count-trailing-zeros:
942f733f 7301 # Code from module crypto/md5:
40e27e7f 7302 # Code from module crypto/sha1:
d87ffdb7
GM
7303 # Code from module crypto/sha256:
7304 # Code from module crypto/sha512:
d7ad186c 7305 # Code from module dirent:
36f13e16 7306 # Code from module dosname:
f737437b 7307 # Code from module dtoastr:
f199cab1 7308 # Code from module dtotimespec:
7d2a1c5e 7309 # Code from module dup2:
93131e11 7310 # Code from module environ:
3a019ab4 7311 # Code from module errno:
710f5812 7312 # Code from module euidaccess:
8966cbff 7313 # Code from module execinfo:
1fd182f0
PE
7314 # Code from module extensions:
7315
7cd2ed2c 7316 # Code from module extern-inline:
710f5812 7317 # Code from module faccessat:
0cdca42a 7318 # Code from module fcntl:
710f5812 7319 # Code from module fcntl-h:
2407788f 7320 # Code from module fdatasync:
d7ad186c 7321 # Code from module fdopendir:
5fa4ac76 7322 # Code from module filemode:
3bf26e96 7323 # Code from module fpending:
d7ad186c 7324 # Code from module fstatat:
2407788f 7325 # Code from module fsync:
0cdca42a 7326 # Code from module getdtablesize:
710f5812 7327 # Code from module getgroups:
1f5d53eb 7328 # Code from module getloadavg:
e275c824
PE
7329 # Code from module getopt-gnu:
7330 # Code from module getopt-posix:
7331 # Code from module gettext-h:
f199cab1
GM
7332 # Code from module gettime:
7333 # Code from module gettimeofday:
710f5812 7334 # Code from module group-member:
1fd182f0
PE
7335 # Code from module include_next:
7336 # Code from module intprops:
4fda9c95 7337 # Code from module inttypes-incomplete:
369e19fc
PE
7338 # Code from module largefile:
7339
ae0d7250 7340 # Code from module lstat:
ac1ca7e9 7341 # Code from module manywarnings:
283c7aed 7342 # Code from module memrchr:
e412eb97 7343 # Code from module mkostemp:
1fd182f0
PE
7344 # Code from module mktime:
7345 # Code from module multiarch:
369e19fc 7346 # Code from module nocrash:
d7ad186c 7347 # Code from module openat-h:
a0a61e58 7348 # Code from module pathmax:
0cdca42a 7349 # Code from module pipe2:
f199cab1 7350 # Code from module pselect:
3e0be4ab 7351 # Code from module pthread_sigmask:
b5591ebb 7352 # Code from module putenv:
3a019ab4 7353 # Code from module qacl:
ae0d7250 7354 # Code from module readlink:
d7ad186c 7355 # Code from module readlinkat:
710f5812 7356 # Code from module root-uid:
e412eb97 7357 # Code from module secure_getenv:
e4184a20 7358 # Code from module sig2str:
2b1928b8 7359 # Code from module signal-h:
369e19fc
PE
7360 # Code from module snippet/_Noreturn:
7361 # Code from module snippet/arg-nonnull:
7362 # Code from module snippet/c++defs:
7363 # Code from module snippet/warn-on-use:
6ad6792b 7364 # Code from module socklen:
6c051bab 7365 # Code from module ssize_t:
ae0d7250 7366 # Code from module stat:
f199cab1 7367 # Code from module stat-time:
0eb775a3 7368 # Code from module stdalign:
6d153f56
GM
7369 # Code from module stdarg:
7370
8c069cc7
GM
7371
7372
16c3e636 7373 # Code from module stdbool:
1fd182f0 7374 # Code from module stddef:
5f90be1b 7375 # Code from module stdint:
6ad6792b 7376 # Code from module stdio:
1f5d53eb 7377 # Code from module stdlib:
16c3e636 7378 # Code from module strftime:
283c7aed 7379 # Code from module string:
3e0be4ab
GM
7380 # Code from module strtoimax:
7381 # Code from module strtoll:
4fda9c95
GM
7382 # Code from module strtoull:
7383 # Code from module strtoumax:
ae0d7250 7384 # Code from module symlink:
f199cab1 7385 # Code from module sys_select:
5fa4ac76 7386 # Code from module sys_stat:
f199cab1 7387 # Code from module sys_time:
e412eb97 7388 # Code from module tempname:
1fd182f0
PE
7389 # Code from module time:
7390 # Code from module time_r:
f077f61d 7391 # Code from module timer-time:
f199cab1
GM
7392 # Code from module timespec:
7393 # Code from module timespec-add:
7394 # Code from module timespec-sub:
d87ffdb7 7395 # Code from module u64:
e275c824 7396 # Code from module unistd:
b5591ebb 7397 # Code from module unsetenv:
f199cab1 7398 # Code from module utimens:
4fda9c95 7399 # Code from module verify:
ac1ca7e9 7400 # Code from module warnings:
710f5812 7401 # Code from module xalloc-oversized:
1fd182f0
PE
7402
7403
6bd1cda5 7404if test "$ac_test_CFLAGS" != set; then
8beecaed
GM
7405 # It's helpful to have C macros available to GDB, so prefer -g3 to -g
7406 # if -g3 works and the user does not specify CFLAGS.
7407 # This test must follow gl_EARLY; otherwise AC_LINK_IFELSE complains.
6bd1cda5
GM
7408 case $CFLAGS in
7409 '-g')
7410 emacs_g3_CFLAGS='-g3';;
7411 '-g -O2')
7412 emacs_g3_CFLAGS='-g3 -O2';;
7413 *)
7414 emacs_g3_CFLAGS='';;
7415 esac
7416 if test -n "$emacs_g3_CFLAGS"; then
7417 emacs_save_CFLAGS=$CFLAGS
7418 CFLAGS=$emacs_g3_CFLAGS
7419 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts $emacs_g3_CFLAGS" >&5
7420$as_echo_n "checking whether $CC accepts $emacs_g3_CFLAGS... " >&6; }
7421if test "${emacs_cv_prog_cc_g3+set}" = set; then :
7422 $as_echo_n "(cached) " >&6
7423else
7424 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7425/* end confdefs.h. */
7426
7427int
7428main ()
7429{
7430
7431 ;
7432 return 0;
7433}
7434_ACEOF
7435if ac_fn_c_try_link "$LINENO"; then :
7436 emacs_cv_prog_cc_g3=yes
7437else
7438 emacs_cv_prog_cc_g3=no
7439fi
7440rm -f core conftest.err conftest.$ac_objext \
7441 conftest$ac_exeext conftest.$ac_ext
7442fi
7443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_prog_cc_g3" >&5
7444$as_echo "$emacs_cv_prog_cc_g3" >&6; }
8beecaed 7445 if test $emacs_cv_prog_cc_g3 != yes; then
6bd1cda5
GM
7446 CFLAGS=$emacs_save_CFLAGS
7447 fi
7c61eaab
GM
7448 if test $opsys = mingw32; then
7449 CFLAGS="$CFLAGS -gdwarf-2"
7450 fi
6bd1cda5 7451 fi
8beecaed
GM
7452
7453 case $CFLAGS in
7454 *-O*) ;;
7455 *)
7456 # No optimization flag was inferred for this non-GCC compiler.
7457 # Try -O. This is needed for xlc on AIX; see Bug#14258.
7458 emacs_save_CFLAGS=$CFLAGS
7459 test -z "$CFLAGS" || CFLAGS="$CFLAGS "
7460 CFLAGS=${CFLAGS}-O
7461 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -O" >&5
7462$as_echo_n "checking whether $CC accepts -O... " >&6; }
7463if test "${emacs_cv_prog_cc_o+set}" = set; then :
7464 $as_echo_n "(cached) " >&6
7465else
7466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7467/* end confdefs.h. */
7468
7469int
7470main ()
7471{
7472
7473 ;
7474 return 0;
7475}
7476_ACEOF
7477if ac_fn_c_try_link "$LINENO"; then :
7478 emacs_cv_prog_cc_o=yes
7479else
7480 emacs_cv_prog_cc_o=no
7481fi
7482rm -f core conftest.err conftest.$ac_objext \
7483 conftest$ac_exeext conftest.$ac_ext
7484fi
7485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_prog_cc_o" >&5
7486$as_echo "$emacs_cv_prog_cc_o" >&6; }
7487 if test $emacs_cv_prog_cc_o != yes; then
7488 CFLAGS=$emacs_save_CFLAGS
7489 fi ;;
7490 esac
6bd1cda5
GM
7491fi
7492
a6b92a4a
GM
7493# Check whether --enable-gcc-warnings was given.
7494if test "${enable_gcc_warnings+set}" = set; then :
7495 enableval=$enable_gcc_warnings; case $enableval in
7496 yes|no) ;;
7497 *) as_fn_error "bad value $enableval for gcc-warnings option" "$LINENO" 5 ;;
7498 esac
7499 gl_gcc_warnings=$enableval
7500else
7501 gl_gcc_warnings=no
7502
7503fi
7504
7505
e4d35030
GM
7506# Check whether --enable-link-time-optimization was given.
7507if test "${enable_link_time_optimization+set}" = set; then :
7508 enableval=$enable_link_time_optimization; if test "${enableval}" != "no"; then
7509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether link-time optimization is supported" >&5
7510$as_echo_n "checking whether link-time optimization is supported... " >&6; }
7511 ac_lto_supported=no
7512 if test x$GCC = xyes; then
7513 CPUS=`getconf _NPROCESSORS_ONLN 2>/dev/null`
7514 if test x$CPUS != x; then
7515 LTO="-flto=$CPUS"
7516 else
7517 LTO="-flto"
7518 fi
7519 old_CFLAGS=$CFLAGS
7520 CFLAGS="$CFLAGS $LTO"
7521 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7522/* end confdefs.h. */
7523
7524int
7525main ()
7526{
7527
7528 ;
7529 return 0;
7530}
7531_ACEOF
7532if ac_fn_c_try_compile "$LINENO"; then :
7533 ac_lto_supported=yes
7534else
7535 ac_lto_supported=no
7536fi
7537rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7538 CFLAGS="$old_CFLAGS"
7539 fi
7540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_lto_supported" >&5
7541$as_echo "$ac_lto_supported" >&6; }
7542 if test "$ac_lto_supported" = "yes"; then
7543 CFLAGS="$CFLAGS $LTO"
7544 fi
7545fi
7546fi
7547
7548
a6b92a4a
GM
7549# gl_GCC_VERSION_IFELSE([major], [minor], [run-if-found], [run-if-not-found])
7550# ------------------------------------------------
7551# If $CPP is gcc-MAJOR.MINOR or newer, then run RUN-IF-FOUND.
7552# Otherwise, run RUN-IF-NOT-FOUND.
7553
7554
bab4f76d
GM
7555# clang is unduly picky about some things.
7556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler is clang" >&5
7557$as_echo_n "checking whether the compiler is clang... " >&6; }
7558if test "${emacs_cv_clang+set}" = set; then :
7559 $as_echo_n "(cached) " >&6
7560else
7561 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7562/* end confdefs.h. */
7563
7564 #ifndef __clang__
7565 #error "not clang"
7566 #endif
7567
7568int
7569main ()
7570{
7571
7572 ;
7573 return 0;
7574}
7575_ACEOF
7576if ac_fn_c_try_compile "$LINENO"; then :
7577 emacs_cv_clang=yes
7578else
7579 emacs_cv_clang=no
7580fi
7581rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7582fi
7583{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_clang" >&5
7584$as_echo "$emacs_cv_clang" >&6; }
7585
a6b92a4a
GM
7586# When compiling with GCC, prefer -isystem to -I when including system
7587# include files, to avoid generating useless diagnostics for the files.
7588if test "$gl_gcc_warnings" != yes; then
7589 isystem='-I'
bab4f76d
GM
7590 if test "$emacs_cv_clang" = yes
7591 then
7592 # Turn off some warnings if supported.
7593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror -Wunknown-warning-option" >&5
dcfda130
GM
7594$as_echo_n "checking whether C compiler handles -Werror -Wunknown-warning-option... " >&6; }
7595if test "${gl_cv_warn_c__Werror__Wunknown_warning_option+set}" = set; then :
7596 $as_echo_n "(cached) " >&6
7597else
7598
7599 gl_save_compiler_FLAGS="$CFLAGS"
7600 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror -Wunknown-warning-option"
7601 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7602/* end confdefs.h. */
7603
7604int
7605main ()
7606{
7607
7608 ;
7609 return 0;
7610}
7611_ACEOF
ec165e83 7612if ac_fn_c_try_link "$LINENO"; then :
dcfda130
GM
7613 gl_cv_warn_c__Werror__Wunknown_warning_option=yes
7614else
7615 gl_cv_warn_c__Werror__Wunknown_warning_option=no
7616fi
ec165e83
GM
7617rm -f core conftest.err conftest.$ac_objext \
7618 conftest$ac_exeext conftest.$ac_ext
dcfda130
GM
7619 CFLAGS="$gl_save_compiler_FLAGS"
7620
7621fi
7622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror__Wunknown_warning_option" >&5
7623$as_echo "$gl_cv_warn_c__Werror__Wunknown_warning_option" >&6; }
7624if test "x$gl_cv_warn_c__Werror__Wunknown_warning_option" = x""yes; then :
7625 gl_unknown_warnings_are_errors='-Wunknown-warning-option -Werror'
7626else
7627 gl_unknown_warnings_are_errors=
7628fi
7629
7630
bab4f76d
GM
7631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-switch" >&5
7632$as_echo_n "checking whether C compiler handles -Wno-switch... " >&6; }
7633if test "${gl_cv_warn_c__Wno_switch+set}" = set; then :
7634 $as_echo_n "(cached) " >&6
7635else
7636
7637 gl_save_compiler_FLAGS="$CFLAGS"
7638 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wswitch"
7639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7640/* end confdefs.h. */
7641
7642int
7643main ()
7644{
7645
7646 ;
7647 return 0;
7648}
7649_ACEOF
ec165e83 7650if ac_fn_c_try_link "$LINENO"; then :
bab4f76d
GM
7651 gl_cv_warn_c__Wno_switch=yes
7652else
7653 gl_cv_warn_c__Wno_switch=no
7654fi
ec165e83
GM
7655rm -f core conftest.err conftest.$ac_objext \
7656 conftest$ac_exeext conftest.$ac_ext
bab4f76d
GM
7657 CFLAGS="$gl_save_compiler_FLAGS"
7658
7659fi
7660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_switch" >&5
7661$as_echo "$gl_cv_warn_c__Wno_switch" >&6; }
7662if test "x$gl_cv_warn_c__Wno_switch" = x""yes; then :
7663 as_fn_append WARN_CFLAGS " -Wno-switch"
7664fi
7665
7666
7667
7668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-tautological-constant-out-of-range-compare" >&5
7669$as_echo_n "checking whether C compiler handles -Wno-tautological-constant-out-of-range-compare... " >&6; }
7670if test "${gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare+set}" = set; then :
7671 $as_echo_n "(cached) " >&6
7672else
7673
7674 gl_save_compiler_FLAGS="$CFLAGS"
7675 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wtautological-constant-out-of-range-compare"
7676 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7677/* end confdefs.h. */
7678
7679int
7680main ()
7681{
7682
7683 ;
7684 return 0;
7685}
7686_ACEOF
ec165e83 7687if ac_fn_c_try_link "$LINENO"; then :
bab4f76d
GM
7688 gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare=yes
7689else
7690 gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare=no
7691fi
ec165e83
GM
7692rm -f core conftest.err conftest.$ac_objext \
7693 conftest$ac_exeext conftest.$ac_ext
bab4f76d
GM
7694 CFLAGS="$gl_save_compiler_FLAGS"
7695
7696fi
7697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare" >&5
7698$as_echo "$gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare" >&6; }
7699if test "x$gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare" = x""yes; then :
7700 as_fn_append WARN_CFLAGS " -Wno-tautological-constant-out-of-range-compare"
7701fi
7702
7703
7704
7705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-pointer-sign" >&5
7706$as_echo_n "checking whether C compiler handles -Wno-pointer-sign... " >&6; }
7707if test "${gl_cv_warn_c__Wno_pointer_sign+set}" = set; then :
7708 $as_echo_n "(cached) " >&6
7709else
7710
7711 gl_save_compiler_FLAGS="$CFLAGS"
7712 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wpointer-sign"
7713 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7714/* end confdefs.h. */
7715
7716int
7717main ()
7718{
7719
7720 ;
7721 return 0;
7722}
7723_ACEOF
ec165e83 7724if ac_fn_c_try_link "$LINENO"; then :
bab4f76d
GM
7725 gl_cv_warn_c__Wno_pointer_sign=yes
7726else
7727 gl_cv_warn_c__Wno_pointer_sign=no
7728fi
ec165e83
GM
7729rm -f core conftest.err conftest.$ac_objext \
7730 conftest$ac_exeext conftest.$ac_ext
bab4f76d
GM
7731 CFLAGS="$gl_save_compiler_FLAGS"
7732
7733fi
7734{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_pointer_sign" >&5
7735$as_echo "$gl_cv_warn_c__Wno_pointer_sign" >&6; }
7736if test "x$gl_cv_warn_c__Wno_pointer_sign" = x""yes; then :
7737 as_fn_append WARN_CFLAGS " -Wno-pointer-sign"
7738fi
7739
7740
7741 fi
7742else
7743 isystem='-isystem '
7744
7745 # This, $nw, is the list of warnings we disable.
7746 nw=
7747
7748 case $with_x_toolkit in
7749 lucid | athena | motif)
7750 # Old toolkits mishandle 'const'.
7751 nw="$nw -Wwrite-strings"
7752 ;;
7753 *)
7754
dcfda130 7755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror" >&5
a6b92a4a
GM
7756$as_echo_n "checking whether C compiler handles -Werror... " >&6; }
7757if test "${gl_cv_warn_c__Werror+set}" = set; then :
7758 $as_echo_n "(cached) " >&6
7759else
7760
7761 gl_save_compiler_FLAGS="$CFLAGS"
dcfda130 7762 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror"
a6b92a4a 7763 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
7764/* end confdefs.h. */
7765
7766int
7767main ()
7768{
7769
7770 ;
7771 return 0;
7772}
7773_ACEOF
ec165e83 7774if ac_fn_c_try_link "$LINENO"; then :
a6b92a4a 7775 gl_cv_warn_c__Werror=yes
067d23c9 7776else
a6b92a4a 7777 gl_cv_warn_c__Werror=no
067d23c9 7778fi
ec165e83
GM
7779rm -f core conftest.err conftest.$ac_objext \
7780 conftest$ac_exeext conftest.$ac_ext
a6b92a4a
GM
7781 CFLAGS="$gl_save_compiler_FLAGS"
7782
7783fi
7784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror" >&5
7785$as_echo "$gl_cv_warn_c__Werror" >&6; }
7786if test "x$gl_cv_warn_c__Werror" = x""yes; then :
7787 as_fn_append WERROR_CFLAGS " -Werror"
7788fi
7789
0eb775a3 7790
a6b92a4a
GM
7791 ;;
7792 esac
7793
7794
a6b92a4a 7795 nw="$nw -Wsystem-headers" # Don't let system headers trigger warnings
a6b92a4a 7796 nw="$nw -Woverlength-strings" # Not a problem these days
a6b92a4a 7797 nw="$nw -Wlogical-op" # any use of fwrite provokes this
fd9d2a9d 7798 nw="$nw -Wformat-nonliteral" # we do this a lot
a6b92a4a
GM
7799 nw="$nw -Wvla" # warnings in gettext.h
7800 nw="$nw -Wnested-externs" # use of XARGMATCH/verify_function__
a6b92a4a 7801 nw="$nw -Wswitch-default" # Too many warnings for now
fd9d2a9d 7802 nw="$nw -Winline" # OK to ignore 'inline'
6ec9a5a7 7803 nw="$nw -Wjump-misses-init" # We sometimes safely jump over init.
da8ed5ba
GM
7804 nw="$nw -Wstrict-overflow" # OK to optimize assuming that
7805 # signed overflow has undefined behavior
fd9d2a9d
GM
7806 nw="$nw -Wsync-nand" # irrelevant here, and provokes ObjC warning
7807 nw="$nw -Wunsafe-loop-optimizations" # OK to suppress unsafe optimizations
372c83ba 7808 nw="$nw -Wbad-function-cast" # These casts are no worse than others.
a6b92a4a
GM
7809
7810 # Emacs doesn't care about shadowing; see
7811 # <http://lists.gnu.org/archive/html/emacs-diffs/2011-11/msg00265.html>.
7812 nw="$nw -Wshadow"
7813
ad33cb00
GM
7814 # Emacs's use of alloca inhibits protecting the stack.
7815 nw="$nw -Wstack-protector"
7816
da8ed5ba 7817 # The following line should be removable at some point.
a6b92a4a
GM
7818 nw="$nw -Wsuggest-attribute=pure"
7819
fc4002bd
GM
7820 # This part is merely for shortening the command line,
7821 # since -Wno-FOO needs to be added below regardless.
7822 nw="$nw -Wmissing-field-initializers"
7823 nw="$nw -Wswitch"
7824 nw="$nw -Wtype-limits"
7825 nw="$nw -Wunused-parameter"
7826
c081121f
GM
7827 if test $emacs_cv_clang = yes; then
7828 nw="$nw -Wcast-align"
7829 fi
7830
a6b92a4a
GM
7831
7832
7833 if test -n "$GCC"; then
7834
7835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is supported" >&5
7836$as_echo_n "checking whether -Wno-missing-field-initializers is supported... " >&6; }
7837 if test "${gl_cv_cc_nomfi_supported+set}" = set; then :
7838 $as_echo_n "(cached) " >&6
7839else
7840
7841 gl_save_CFLAGS="$CFLAGS"
7842 CFLAGS="$CFLAGS -W -Werror -Wno-missing-field-initializers"
7843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
7844/* end confdefs.h. */
7845
7846int
7847main ()
7848{
7849
7850 ;
7851 return 0;
7852}
7853_ACEOF
7854if ac_fn_c_try_compile "$LINENO"; then :
a6b92a4a 7855 gl_cv_cc_nomfi_supported=yes
067d23c9 7856else
a6b92a4a 7857 gl_cv_cc_nomfi_supported=no
067d23c9
KY
7858fi
7859rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a6b92a4a
GM
7860 CFLAGS="$gl_save_CFLAGS"
7861fi
7862
7863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_supported" >&5
7864$as_echo "$gl_cv_cc_nomfi_supported" >&6; }
7865
7866 if test "$gl_cv_cc_nomfi_supported" = yes; then
7867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is needed" >&5
7868$as_echo_n "checking whether -Wno-missing-field-initializers is needed... " >&6; }
7869 if test "${gl_cv_cc_nomfi_needed+set}" = set; then :
7870 $as_echo_n "(cached) " >&6
7871else
7872
7873 gl_save_CFLAGS="$CFLAGS"
7874 CFLAGS="$CFLAGS -W -Werror"
7875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7876/* end confdefs.h. */
7877void f (void)
7878 {
7879 typedef struct { int a; int b; } s_t;
7880 s_t s1 = { 0, };
7881 }
7882
7883int
7884main ()
7885{
7886
7887 ;
7888 return 0;
7889}
7890_ACEOF
7891if ac_fn_c_try_compile "$LINENO"; then :
7892 gl_cv_cc_nomfi_needed=no
7893else
7894 gl_cv_cc_nomfi_needed=yes
7895fi
7896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7897 CFLAGS="$gl_save_CFLAGS"
7898
7899fi
7900
7901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_needed" >&5
7902$as_echo "$gl_cv_cc_nomfi_needed" >&6; }
7903 fi
b6c9d18d
GM
7904
7905 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wuninitialized is supported" >&5
7906$as_echo_n "checking whether -Wuninitialized is supported... " >&6; }
7907 if test "${gl_cv_cc_uninitialized_supported+set}" = set; then :
7908 $as_echo_n "(cached) " >&6
7909else
7910
7911 gl_save_CFLAGS="$CFLAGS"
7912 CFLAGS="$CFLAGS -Werror -Wuninitialized"
7913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7914/* end confdefs.h. */
7915
7916int
7917main ()
7918{
7919
7920 ;
7921 return 0;
7922}
7923_ACEOF
7924if ac_fn_c_try_compile "$LINENO"; then :
7925 gl_cv_cc_uninitialized_supported=yes
7926else
7927 gl_cv_cc_uninitialized_supported=no
7928fi
7929rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7930 CFLAGS="$gl_save_CFLAGS"
7931fi
7932
7933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_uninitialized_supported" >&5
7934$as_echo "$gl_cv_cc_uninitialized_supported" >&6; }
7935
a6b92a4a
GM
7936 fi
7937
b6c9d18d 7938 # List all gcc warning categories.
a6b92a4a
GM
7939 gl_manywarn_set=
7940 for gl_manywarn_item in \
a6b92a4a 7941 -W \
dcde497f
GM
7942 -Wabi \
7943 -Waddress \
dcfda130 7944 -Waggressive-loop-optimizations \
dcde497f
GM
7945 -Wall \
7946 -Warray-bounds \
7947 -Wattributes \
a6b92a4a 7948 -Wbad-function-cast \
a6b92a4a 7949 -Wbuiltin-macro-redefined \
dcde497f
GM
7950 -Wcast-align \
7951 -Wchar-subscripts \
7952 -Wclobbered \
7953 -Wcomment \
7954 -Wcomments \
a6b92a4a 7955 -Wcoverage-mismatch \
a6b92a4a
GM
7956 -Wcpp \
7957 -Wdeprecated \
7958 -Wdeprecated-declarations \
dcde497f 7959 -Wdisabled-optimization \
a6b92a4a
GM
7960 -Wdiv-by-zero \
7961 -Wdouble-promotion \
dcde497f 7962 -Wempty-body \
a6b92a4a 7963 -Wendif-labels \
dcde497f 7964 -Wenum-compare \
a6b92a4a
GM
7965 -Wextra \
7966 -Wformat-contains-nul \
7967 -Wformat-extra-args \
dcde497f
GM
7968 -Wformat-nonliteral \
7969 -Wformat-security \
7970 -Wformat-y2k \
a6b92a4a 7971 -Wformat-zero-length \
dcde497f
GM
7972 -Wfree-nonheap-object \
7973 -Wignored-qualifiers \
7974 -Wimplicit \
7975 -Wimplicit-function-declaration \
7976 -Wimplicit-int \
7977 -Winit-self \
7978 -Winline \
7979 -Wint-to-pointer-cast \
7980 -Winvalid-memory-model \
7981 -Winvalid-pch \
7982 -Wjump-misses-init \
7983 -Wlogical-op \
7984 -Wmain \
7985 -Wmaybe-uninitialized \
7986 -Wmissing-braces \
7987 -Wmissing-declarations \
7988 -Wmissing-field-initializers \
dcde497f 7989 -Wmissing-include-dirs \
dcde497f
GM
7990 -Wmissing-parameter-type \
7991 -Wmissing-prototypes \
7992 -Wmudflap \
a6b92a4a 7993 -Wmultichar \
dcde497f
GM
7994 -Wnarrowing \
7995 -Wnested-externs \
7996 -Wnonnull \
a6b92a4a 7997 -Wnormalized=nfc \
dcde497f
GM
7998 -Wold-style-declaration \
7999 -Wold-style-definition \
a6b92a4a 8000 -Woverflow \
dcde497f
GM
8001 -Woverlength-strings \
8002 -Woverride-init \
8003 -Wpacked \
8004 -Wpacked-bitfield-compat \
8005 -Wparentheses \
8006 -Wpointer-arith \
8007 -Wpointer-sign \
a6b92a4a
GM
8008 -Wpointer-to-int-cast \
8009 -Wpragmas \
dcfda130 8010 -Wreturn-local-addr \
dcde497f
GM
8011 -Wreturn-type \
8012 -Wsequence-point \
8013 -Wshadow \
8014 -Wsizeof-pointer-memaccess \
8015 -Wstack-protector \
8016 -Wstrict-aliasing \
8017 -Wstrict-overflow \
8018 -Wstrict-prototypes \
a6b92a4a 8019 -Wsuggest-attribute=const \
dcde497f 8020 -Wsuggest-attribute=format \
a6b92a4a
GM
8021 -Wsuggest-attribute=noreturn \
8022 -Wsuggest-attribute=pure \
dcde497f
GM
8023 -Wswitch \
8024 -Wswitch-default \
8025 -Wsync-nand \
8026 -Wsystem-headers \
a6b92a4a 8027 -Wtrampolines \
dcde497f
GM
8028 -Wtrigraphs \
8029 -Wtype-limits \
8030 -Wuninitialized \
8031 -Wunknown-pragmas \
dcde497f
GM
8032 -Wunsafe-loop-optimizations \
8033 -Wunused \
8034 -Wunused-but-set-parameter \
8035 -Wunused-but-set-variable \
8036 -Wunused-function \
8037 -Wunused-label \
8038 -Wunused-local-typedefs \
8039 -Wunused-macros \
8040 -Wunused-parameter \
8041 -Wunused-result \
8042 -Wunused-value \
8043 -Wunused-variable \
8044 -Wvarargs \
8045 -Wvariadic-macros \
8046 -Wvector-operation-performance \
8047 -Wvla \
8048 -Wvolatile-register-var \
8049 -Wwrite-strings \
ec165e83
GM
8050 -fdiagnostics-show-option \
8051 -funit-at-a-time \
dcde497f 8052 \
a6b92a4a
GM
8053 ; do
8054 gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
8055 done
8056
b6c9d18d 8057 # Disable specific options as needed.
a6b92a4a
GM
8058 if test "$gl_cv_cc_nomfi_needed" = yes; then
8059 gl_manywarn_set="$gl_manywarn_set -Wno-missing-field-initializers"
8060 fi
8061
b6c9d18d
GM
8062 if test "$gl_cv_cc_uninitialized_supported" = no; then
8063 gl_manywarn_set="$gl_manywarn_set -Wno-uninitialized"
8064 fi
8065
a6b92a4a
GM
8066 ws=$gl_manywarn_set
8067
8068
8069 gl_warn_set=
8070 set x $ws; shift
8071 for gl_warn_item
8072 do
8073 case " $nw " in
8074 *" $gl_warn_item "*)
8075 ;;
8076 *)
8077 gl_warn_set="$gl_warn_set $gl_warn_item"
8078 ;;
8079 esac
8080 done
8081 ws=$gl_warn_set
8082
8083 for w in $ws; do
dcfda130
GM
8084
8085as_gl_Warn=`$as_echo "gl_cv_warn_c_$w" | $as_tr_sh`
6e64a12b
GM
8086gl_positive="$w"
8087case $gl_positive in
8088 -Wno-*) gl_positive=-W`expr "X$gl_positive" : 'X-Wno-\(.*\)'` ;;
8089esac
a6b92a4a
GM
8090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles $w" >&5
8091$as_echo_n "checking whether C compiler handles $w... " >&6; }
8092if { as_var=$as_gl_Warn; eval "test \"\${$as_var+set}\" = set"; }; then :
8093 $as_echo_n "(cached) " >&6
8094else
8095
8096 gl_save_compiler_FLAGS="$CFLAGS"
6e64a12b 8097 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors $gl_positive"
a6b92a4a
GM
8098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8099/* end confdefs.h. */
8100
8101int
8102main ()
8103{
8104
8105 ;
8106 return 0;
8107}
8108_ACEOF
ec165e83 8109if ac_fn_c_try_link "$LINENO"; then :
a6b92a4a
GM
8110 eval "$as_gl_Warn=yes"
8111else
8112 eval "$as_gl_Warn=no"
8113fi
ec165e83
GM
8114rm -f core conftest.err conftest.$ac_objext \
8115 conftest$ac_exeext conftest.$ac_ext
a6b92a4a
GM
8116 CFLAGS="$gl_save_compiler_FLAGS"
8117
8118fi
8119eval ac_res=\$$as_gl_Warn
8120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8121$as_echo "$ac_res" >&6; }
8122eval as_val=\$$as_gl_Warn
8123 if test "x$as_val" = x""yes; then :
8124 as_fn_append WARN_CFLAGS " $w"
8125fi
8126
0eb775a3 8127
a6b92a4a 8128 done
dcfda130
GM
8129
8130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-missing-field-initializers" >&5
a6b92a4a
GM
8131$as_echo_n "checking whether C compiler handles -Wno-missing-field-initializers... " >&6; }
8132if test "${gl_cv_warn_c__Wno_missing_field_initializers+set}" = set; then :
8133 $as_echo_n "(cached) " >&6
8134else
8135
8136 gl_save_compiler_FLAGS="$CFLAGS"
6e64a12b 8137 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wmissing-field-initializers"
a6b92a4a
GM
8138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8139/* end confdefs.h. */
8140
8141int
8142main ()
8143{
8144
8145 ;
8146 return 0;
8147}
8148_ACEOF
ec165e83 8149if ac_fn_c_try_link "$LINENO"; then :
a6b92a4a
GM
8150 gl_cv_warn_c__Wno_missing_field_initializers=yes
8151else
8152 gl_cv_warn_c__Wno_missing_field_initializers=no
8153fi
ec165e83
GM
8154rm -f core conftest.err conftest.$ac_objext \
8155 conftest$ac_exeext conftest.$ac_ext
a6b92a4a
GM
8156 CFLAGS="$gl_save_compiler_FLAGS"
8157
8158fi
8159{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_missing_field_initializers" >&5
8160$as_echo "$gl_cv_warn_c__Wno_missing_field_initializers" >&6; }
8161if test "x$gl_cv_warn_c__Wno_missing_field_initializers" = x""yes; then :
8162 as_fn_append WARN_CFLAGS " -Wno-missing-field-initializers"
8163fi
0eb775a3 8164
a6b92a4a 8165 # We need this one
dcfda130
GM
8166
8167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-sign-compare" >&5
a6b92a4a
GM
8168$as_echo_n "checking whether C compiler handles -Wno-sign-compare... " >&6; }
8169if test "${gl_cv_warn_c__Wno_sign_compare+set}" = set; then :
8170 $as_echo_n "(cached) " >&6
8171else
8172
8173 gl_save_compiler_FLAGS="$CFLAGS"
6e64a12b 8174 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wsign-compare"
a6b92a4a
GM
8175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8176/* end confdefs.h. */
8177
8178int
8179main ()
8180{
8181
8182 ;
8183 return 0;
8184}
8185_ACEOF
ec165e83 8186if ac_fn_c_try_link "$LINENO"; then :
a6b92a4a
GM
8187 gl_cv_warn_c__Wno_sign_compare=yes
8188else
8189 gl_cv_warn_c__Wno_sign_compare=no
8190fi
ec165e83
GM
8191rm -f core conftest.err conftest.$ac_objext \
8192 conftest$ac_exeext conftest.$ac_ext
a6b92a4a
GM
8193 CFLAGS="$gl_save_compiler_FLAGS"
8194
8195fi
8196{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_sign_compare" >&5
8197$as_echo "$gl_cv_warn_c__Wno_sign_compare" >&6; }
8198if test "x$gl_cv_warn_c__Wno_sign_compare" = x""yes; then :
8199 as_fn_append WARN_CFLAGS " -Wno-sign-compare"
8200fi
0eb775a3 8201
a6b92a4a 8202 # Too many warnings for now
dcfda130
GM
8203
8204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-type-limits" >&5
a6b92a4a
GM
8205$as_echo_n "checking whether C compiler handles -Wno-type-limits... " >&6; }
8206if test "${gl_cv_warn_c__Wno_type_limits+set}" = set; then :
8207 $as_echo_n "(cached) " >&6
8208else
8209
8210 gl_save_compiler_FLAGS="$CFLAGS"
6e64a12b 8211 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wtype-limits"
a6b92a4a
GM
8212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8213/* end confdefs.h. */
8214
8215int
8216main ()
8217{
8218
8219 ;
8220 return 0;
8221}
8222_ACEOF
ec165e83 8223if ac_fn_c_try_link "$LINENO"; then :
a6b92a4a
GM
8224 gl_cv_warn_c__Wno_type_limits=yes
8225else
8226 gl_cv_warn_c__Wno_type_limits=no
8227fi
ec165e83
GM
8228rm -f core conftest.err conftest.$ac_objext \
8229 conftest$ac_exeext conftest.$ac_ext
a6b92a4a
GM
8230 CFLAGS="$gl_save_compiler_FLAGS"
8231
8232fi
8233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_type_limits" >&5
8234$as_echo "$gl_cv_warn_c__Wno_type_limits" >&6; }
8235if test "x$gl_cv_warn_c__Wno_type_limits" = x""yes; then :
8236 as_fn_append WARN_CFLAGS " -Wno-type-limits"
8237fi
0eb775a3 8238
a6b92a4a 8239 # Too many warnings for now
dcfda130
GM
8240
8241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-switch" >&5
a6b92a4a
GM
8242$as_echo_n "checking whether C compiler handles -Wno-switch... " >&6; }
8243if test "${gl_cv_warn_c__Wno_switch+set}" = set; then :
8244 $as_echo_n "(cached) " >&6
8245else
8246
8247 gl_save_compiler_FLAGS="$CFLAGS"
6e64a12b 8248 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wswitch"
a6b92a4a
GM
8249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8250/* end confdefs.h. */
8251
8252int
8253main ()
8254{
8255
8256 ;
8257 return 0;
8258}
8259_ACEOF
ec165e83 8260if ac_fn_c_try_link "$LINENO"; then :
a6b92a4a
GM
8261 gl_cv_warn_c__Wno_switch=yes
8262else
8263 gl_cv_warn_c__Wno_switch=no
8264fi
ec165e83
GM
8265rm -f core conftest.err conftest.$ac_objext \
8266 conftest$ac_exeext conftest.$ac_ext
a6b92a4a
GM
8267 CFLAGS="$gl_save_compiler_FLAGS"
8268
8269fi
8270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_switch" >&5
8271$as_echo "$gl_cv_warn_c__Wno_switch" >&6; }
8272if test "x$gl_cv_warn_c__Wno_switch" = x""yes; then :
8273 as_fn_append WARN_CFLAGS " -Wno-switch"
8274fi
0eb775a3 8275
a6b92a4a 8276 # Too many warnings for now
dcfda130
GM
8277
8278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-parameter" >&5
a6b92a4a
GM
8279$as_echo_n "checking whether C compiler handles -Wno-unused-parameter... " >&6; }
8280if test "${gl_cv_warn_c__Wno_unused_parameter+set}" = set; then :
8281 $as_echo_n "(cached) " >&6
8282else
8283
8284 gl_save_compiler_FLAGS="$CFLAGS"
6e64a12b 8285 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wunused-parameter"
a6b92a4a
GM
8286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8287/* end confdefs.h. */
8288
8289int
8290main ()
8291{
8292
8293 ;
8294 return 0;
8295}
8296_ACEOF
ec165e83 8297if ac_fn_c_try_link "$LINENO"; then :
a6b92a4a
GM
8298 gl_cv_warn_c__Wno_unused_parameter=yes
8299else
8300 gl_cv_warn_c__Wno_unused_parameter=no
8301fi
ec165e83
GM
8302rm -f core conftest.err conftest.$ac_objext \
8303 conftest$ac_exeext conftest.$ac_ext
a6b92a4a
GM
8304 CFLAGS="$gl_save_compiler_FLAGS"
8305
8306fi
8307{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_parameter" >&5
8308$as_echo "$gl_cv_warn_c__Wno_unused_parameter" >&6; }
8309if test "x$gl_cv_warn_c__Wno_unused_parameter" = x""yes; then :
8310 as_fn_append WARN_CFLAGS " -Wno-unused-parameter"
8311fi
0eb775a3 8312
a6b92a4a 8313 # Too many warnings for now
dcfda130
GM
8314
8315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-format-nonliteral" >&5
a6b92a4a
GM
8316$as_echo_n "checking whether C compiler handles -Wno-format-nonliteral... " >&6; }
8317if test "${gl_cv_warn_c__Wno_format_nonliteral+set}" = set; then :
8318 $as_echo_n "(cached) " >&6
8319else
8320
8321 gl_save_compiler_FLAGS="$CFLAGS"
6e64a12b 8322 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wformat-nonliteral"
a6b92a4a
GM
8323 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8324/* end confdefs.h. */
8325
8326int
8327main ()
8328{
8329
8330 ;
8331 return 0;
8332}
8333_ACEOF
ec165e83 8334if ac_fn_c_try_link "$LINENO"; then :
a6b92a4a
GM
8335 gl_cv_warn_c__Wno_format_nonliteral=yes
8336else
8337 gl_cv_warn_c__Wno_format_nonliteral=no
8338fi
ec165e83
GM
8339rm -f core conftest.err conftest.$ac_objext \
8340 conftest$ac_exeext conftest.$ac_ext
a6b92a4a
GM
8341 CFLAGS="$gl_save_compiler_FLAGS"
8342
8343fi
8344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_format_nonliteral" >&5
8345$as_echo "$gl_cv_warn_c__Wno_format_nonliteral" >&6; }
8346if test "x$gl_cv_warn_c__Wno_format_nonliteral" = x""yes; then :
8347 as_fn_append WARN_CFLAGS " -Wno-format-nonliteral"
8348fi
8349
8350
0eb775a3 8351
a6b92a4a
GM
8352 # In spite of excluding -Wlogical-op above, it is enabled, as of
8353 # gcc 4.5.0 20090517.
dcfda130
GM
8354
8355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-logical-op" >&5
a6b92a4a
GM
8356$as_echo_n "checking whether C compiler handles -Wno-logical-op... " >&6; }
8357if test "${gl_cv_warn_c__Wno_logical_op+set}" = set; then :
8358 $as_echo_n "(cached) " >&6
8359else
8360
8361 gl_save_compiler_FLAGS="$CFLAGS"
6e64a12b 8362 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wlogical-op"
a6b92a4a
GM
8363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8364/* end confdefs.h. */
8365
8366int
8367main ()
8368{
8369
8370 ;
8371 return 0;
8372}
8373_ACEOF
ec165e83 8374if ac_fn_c_try_link "$LINENO"; then :
a6b92a4a
GM
8375 gl_cv_warn_c__Wno_logical_op=yes
8376else
8377 gl_cv_warn_c__Wno_logical_op=no
8378fi
ec165e83
GM
8379rm -f core conftest.err conftest.$ac_objext \
8380 conftest$ac_exeext conftest.$ac_ext
a6b92a4a
GM
8381 CFLAGS="$gl_save_compiler_FLAGS"
8382
8383fi
8384{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_logical_op" >&5
8385$as_echo "$gl_cv_warn_c__Wno_logical_op" >&6; }
8386if test "x$gl_cv_warn_c__Wno_logical_op" = x""yes; then :
8387 as_fn_append WARN_CFLAGS " -Wno-logical-op"
8388fi
8389
8390
0eb775a3 8391
c081121f
GM
8392 # More things that clang is unduly picky about.
8393 if test $emacs_cv_clang = yes; then
8394
8395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-format-extra-args" >&5
8396$as_echo_n "checking whether C compiler handles -Wno-format-extra-args... " >&6; }
8397if test "${gl_cv_warn_c__Wno_format_extra_args+set}" = set; then :
8398 $as_echo_n "(cached) " >&6
8399else
8400
8401 gl_save_compiler_FLAGS="$CFLAGS"
6e64a12b 8402 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wformat-extra-args"
c081121f
GM
8403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8404/* end confdefs.h. */
8405
8406int
8407main ()
8408{
8409
8410 ;
8411 return 0;
8412}
8413_ACEOF
ec165e83 8414if ac_fn_c_try_link "$LINENO"; then :
c081121f
GM
8415 gl_cv_warn_c__Wno_format_extra_args=yes
8416else
8417 gl_cv_warn_c__Wno_format_extra_args=no
8418fi
ec165e83
GM
8419rm -f core conftest.err conftest.$ac_objext \
8420 conftest$ac_exeext conftest.$ac_ext
c081121f
GM
8421 CFLAGS="$gl_save_compiler_FLAGS"
8422
8423fi
8424{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_format_extra_args" >&5
8425$as_echo "$gl_cv_warn_c__Wno_format_extra_args" >&6; }
8426if test "x$gl_cv_warn_c__Wno_format_extra_args" = x""yes; then :
8427 as_fn_append WARN_CFLAGS " -Wno-format-extra-args"
8428fi
8429
8430
8431
8432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-tautological-constant-out-of-range-compare" >&5
8433$as_echo_n "checking whether C compiler handles -Wno-tautological-constant-out-of-range-compare... " >&6; }
8434if test "${gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare+set}" = set; then :
8435 $as_echo_n "(cached) " >&6
8436else
8437
8438 gl_save_compiler_FLAGS="$CFLAGS"
6e64a12b 8439 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wtautological-constant-out-of-range-compare"
c081121f
GM
8440 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8441/* end confdefs.h. */
8442
8443int
8444main ()
8445{
8446
8447 ;
8448 return 0;
8449}
8450_ACEOF
ec165e83 8451if ac_fn_c_try_link "$LINENO"; then :
c081121f
GM
8452 gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare=yes
8453else
8454 gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare=no
8455fi
ec165e83
GM
8456rm -f core conftest.err conftest.$ac_objext \
8457 conftest$ac_exeext conftest.$ac_ext
c081121f
GM
8458 CFLAGS="$gl_save_compiler_FLAGS"
8459
8460fi
8461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare" >&5
8462$as_echo "$gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare" >&6; }
8463if test "x$gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare" = x""yes; then :
8464 as_fn_append WARN_CFLAGS " -Wno-tautological-constant-out-of-range-compare"
8465fi
8466
8467
8468
8469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-command-line-argument" >&5
8470$as_echo_n "checking whether C compiler handles -Wno-unused-command-line-argument... " >&6; }
8471if test "${gl_cv_warn_c__Wno_unused_command_line_argument+set}" = set; then :
8472 $as_echo_n "(cached) " >&6
8473else
8474
8475 gl_save_compiler_FLAGS="$CFLAGS"
6e64a12b 8476 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wunused-command-line-argument"
c081121f
GM
8477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8478/* end confdefs.h. */
8479
8480int
8481main ()
8482{
8483
8484 ;
8485 return 0;
8486}
8487_ACEOF
ec165e83 8488if ac_fn_c_try_link "$LINENO"; then :
c081121f
GM
8489 gl_cv_warn_c__Wno_unused_command_line_argument=yes
8490else
8491 gl_cv_warn_c__Wno_unused_command_line_argument=no
8492fi
ec165e83
GM
8493rm -f core conftest.err conftest.$ac_objext \
8494 conftest$ac_exeext conftest.$ac_ext
c081121f
GM
8495 CFLAGS="$gl_save_compiler_FLAGS"
8496
8497fi
8498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_command_line_argument" >&5
8499$as_echo "$gl_cv_warn_c__Wno_unused_command_line_argument" >&6; }
8500if test "x$gl_cv_warn_c__Wno_unused_command_line_argument" = x""yes; then :
8501 as_fn_append WARN_CFLAGS " -Wno-unused-command-line-argument"
8502fi
8503
8504
8505
8506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-value" >&5
8507$as_echo_n "checking whether C compiler handles -Wno-unused-value... " >&6; }
8508if test "${gl_cv_warn_c__Wno_unused_value+set}" = set; then :
8509 $as_echo_n "(cached) " >&6
8510else
8511
8512 gl_save_compiler_FLAGS="$CFLAGS"
6e64a12b 8513 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wunused-value"
c081121f
GM
8514 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8515/* end confdefs.h. */
8516
8517int
8518main ()
8519{
8520
8521 ;
8522 return 0;
8523}
8524_ACEOF
ec165e83 8525if ac_fn_c_try_link "$LINENO"; then :
c081121f
GM
8526 gl_cv_warn_c__Wno_unused_value=yes
8527else
8528 gl_cv_warn_c__Wno_unused_value=no
8529fi
ec165e83
GM
8530rm -f core conftest.err conftest.$ac_objext \
8531 conftest$ac_exeext conftest.$ac_ext
c081121f
GM
8532 CFLAGS="$gl_save_compiler_FLAGS"
8533
8534fi
8535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_value" >&5
8536$as_echo "$gl_cv_warn_c__Wno_unused_value" >&6; }
8537if test "x$gl_cv_warn_c__Wno_unused_value" = x""yes; then :
8538 as_fn_append WARN_CFLAGS " -Wno-unused-value"
8539fi
8540
8541
8542 fi
8543
dcfda130 8544
a6b92a4a
GM
8545$as_echo "#define lint 1" >>confdefs.h
8546
8547
a6b92a4a
GM
8548
8549$as_echo "#define GNULIB_PORTCHECK 1" >>confdefs.h
8550
8551
8552 # We use a slightly smaller set of warning options for lib/.
8553 # Remove the following and save the result in GNULIB_WARN_CFLAGS.
8554 nw=
8555 nw="$nw -Wunused-macros"
8556
8557
8558 gl_warn_set=
8559 set x $WARN_CFLAGS; shift
8560 for gl_warn_item
8561 do
8562 case " $nw " in
8563 *" $gl_warn_item "*)
8564 ;;
8565 *)
8566 gl_warn_set="$gl_warn_set $gl_warn_item"
8567 ;;
8568 esac
8569 done
8570 GNULIB_WARN_CFLAGS=$gl_warn_set
8571
8572
8573fi
067d23c9
KY
8574
8575
8576
4c5f4270
GM
8577
8578
8579
8580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works for files in the same directory" >&5
8581$as_echo_n "checking whether ln -s works for files in the same directory... " >&6; }
8582rm -f conf$$ conf$$.file
8583
8584LN_S_FILEONLY='cp -p'
8585
8586if (echo >conf$$.file) 2>/dev/null; then
8587 if ln -s conf$$.file conf$$ 2>/dev/null; then
8588 LN_S_FILEONLY='ln -s'
8589 elif ln conf$$.file conf$$ 2>/dev/null; then
8590 LN_S_FILEONLY=ln
8591 fi
8592fi
8593
8594rm -f conf$$ conf$$.file
8595
8596if test "$LN_S_FILEONLY" = "ln -s"; then
8597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
0e733db9
GM
8598$as_echo "yes" >&6; }
8599else
4c5f4270
GM
8600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S_FILEONLY" >&5
8601$as_echo "no, using $LN_S_FILEONLY" >&6; }
0e733db9
GM
8602fi
8603
067d23c9 8604
4c5f4270
GM
8605
8606
7c61eaab
GM
8607if test "$opsys" = "mingw32"; then
8608 LN_S="ln"
8609fi
8610
067d23c9
KY
8611# Extract the first word of "install-info", so it can be a program name with args.
8612set dummy install-info; ac_word=$2
8613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8614$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 8615if test "${ac_cv_path_INSTALL_INFO+set}" = set; then :
067d23c9
KY
8616 $as_echo_n "(cached) " >&6
8617else
8618 case $INSTALL_INFO in
8619 [\\/]* | ?:[\\/]*)
8620 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
8621 ;;
8622 *)
8623 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
e700232f 8624for as_dir in $PATH$PATH_SEPARATOR/usr/sbin$PATH_SEPARATOR/sbin
067d23c9
KY
8625do
8626 IFS=$as_save_IFS
8627 test -z "$as_dir" && as_dir=.
8628 for ac_exec_ext in '' $ac_executable_extensions; do
8629 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8630 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
8631 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8632 break 2
8633 fi
8634done
8635 done
8636IFS=$as_save_IFS
8637
8638 test -z "$ac_cv_path_INSTALL_INFO" && ac_cv_path_INSTALL_INFO=":"
8639 ;;
8640esac
8641fi
8642INSTALL_INFO=$ac_cv_path_INSTALL_INFO
8643if test -n "$INSTALL_INFO"; then
8644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_INFO" >&5
8645$as_echo "$INSTALL_INFO" >&6; }
8646else
8647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8648$as_echo "no" >&6; }
8649fi
8650
8651
8652# Extract the first word of "gzip", so it can be a program name with args.
8653set dummy gzip; ac_word=$2
8654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8655$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 8656if test "${ac_cv_path_GZIP_PROG+set}" = set; then :
067d23c9
KY
8657 $as_echo_n "(cached) " >&6
8658else
8659 case $GZIP_PROG in
8660 [\\/]* | ?:[\\/]*)
8661 ac_cv_path_GZIP_PROG="$GZIP_PROG" # Let the user override the test with a path.
8662 ;;
8663 *)
8664 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8665for as_dir in $PATH
8666do
8667 IFS=$as_save_IFS
8668 test -z "$as_dir" && as_dir=.
8669 for ac_exec_ext in '' $ac_executable_extensions; do
8670 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8671 ac_cv_path_GZIP_PROG="$as_dir/$ac_word$ac_exec_ext"
8672 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8673 break 2
8674 fi
8675done
8676 done
8677IFS=$as_save_IFS
8678
8679 ;;
8680esac
8681fi
8682GZIP_PROG=$ac_cv_path_GZIP_PROG
8683if test -n "$GZIP_PROG"; then
8684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP_PROG" >&5
8685$as_echo "$GZIP_PROG" >&6; }
8686else
8687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8688$as_echo "no" >&6; }
8689fi
8690
8691
7ee3791f 8692
992ec28a
GM
8693test $with_compress_install != yes && test -n "$GZIP_PROG" && \
8694 GZIP_PROG=" # $GZIP_PROG # (disabled by configure --without-compress-install)"
8695
7ee3791f
GM
8696if test $opsys = gnu-linux; then
8697 # Extract the first word of "paxctl", so it can be a program name with args.
9c29597b
GM
8698set dummy paxctl; ac_word=$2
8699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8700$as_echo_n "checking for $ac_word... " >&6; }
8701if test "${ac_cv_path_PAXCTL+set}" = set; then :
8702 $as_echo_n "(cached) " >&6
8703else
8704 case $PAXCTL in
8705 [\\/]* | ?:[\\/]*)
8706 ac_cv_path_PAXCTL="$PAXCTL" # Let the user override the test with a path.
8707 ;;
8708 *)
8709 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8710for as_dir in $PATH$PATH_SEPARATOR/sbin$PATH_SEPARATOR/usr/sbin
8711do
8712 IFS=$as_save_IFS
8713 test -z "$as_dir" && as_dir=.
8714 for ac_exec_ext in '' $ac_executable_extensions; do
8715 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8716 ac_cv_path_PAXCTL="$as_dir/$ac_word$ac_exec_ext"
8717 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8718 break 2
8719 fi
8720done
8721 done
8722IFS=$as_save_IFS
8723
8724 ;;
8725esac
8726fi
8727PAXCTL=$ac_cv_path_PAXCTL
8728if test -n "$PAXCTL"; then
8729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PAXCTL" >&5
8730$as_echo "$PAXCTL" >&6; }
8731else
8732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8733$as_echo "no" >&6; }
8734fi
8735
8736
685e57ea
GM
8737 if test "X$PAXCTL" != X; then
8738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether binaries have a PT_PAX_FLAGS header" >&5
8739$as_echo_n "checking whether binaries have a PT_PAX_FLAGS header... " >&6; }
8740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8741/* end confdefs.h. */
8742
8743int
8744main ()
8745{
8746
8747 ;
8748 return 0;
8749}
8750_ACEOF
8751if ac_fn_c_try_link "$LINENO"; then :
8752 if $PAXCTL -v conftest$EXEEXT >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8753$as_echo "yes" >&6; }
8754 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8755$as_echo "no" >&6; }; PAXCTL=""; fi
8756fi
8757rm -f core conftest.err conftest.$ac_objext \
8758 conftest$ac_exeext conftest.$ac_ext
8759 fi
7ee3791f 8760fi
067d23c9 8761
9e40dda4 8762## Need makeinfo >= 4.7 (?) to build the manuals.
067d23c9
KY
8763# Extract the first word of "makeinfo", so it can be a program name with args.
8764set dummy makeinfo; ac_word=$2
8765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8766$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 8767if test "${ac_cv_path_MAKEINFO+set}" = set; then :
067d23c9
KY
8768 $as_echo_n "(cached) " >&6
8769else
8770 case $MAKEINFO in
8771 [\\/]* | ?:[\\/]*)
8772 ac_cv_path_MAKEINFO="$MAKEINFO" # Let the user override the test with a path.
8773 ;;
8774 *)
8775 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8776for as_dir in $PATH
8777do
8778 IFS=$as_save_IFS
8779 test -z "$as_dir" && as_dir=.
8780 for ac_exec_ext in '' $ac_executable_extensions; do
8781 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8782 ac_cv_path_MAKEINFO="$as_dir/$ac_word$ac_exec_ext"
8783 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8784 break 2
8785 fi
8786done
8787 done
8788IFS=$as_save_IFS
8789
8790 test -z "$ac_cv_path_MAKEINFO" && ac_cv_path_MAKEINFO="no"
8791 ;;
8792esac
8793fi
8794MAKEINFO=$ac_cv_path_MAKEINFO
8795if test -n "$MAKEINFO"; then
8796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKEINFO" >&5
8797$as_echo "$MAKEINFO" >&6; }
8798else
8799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8800$as_echo "no" >&6; }
8801fi
8802
8803
b5591ebb
GM
8804if test "$MAKEINFO" != "no"; then
8805 case `
8806 $MAKEINFO --version 2> /dev/null |
8807 $EGREP 'texinfo[^0-9]*([1-4][0-9]+|[5-9]|4\.[7-9]|4\.[1-6][0-9]+)'
8808 ` in
8809 '') MAKEINFO=no;;
8810 esac
067d23c9
KY
8811fi
8812
8813## Makeinfo is unusual. For a released Emacs, the manuals are
8814## pre-built, and not deleted by the normal clean rules. makeinfo is
8815## therefore in the category of "special tools" not normally required, which
8816## configure does not have to check for (eg autoconf itself).
8817## In a Bazaar checkout on the other hand, the manuals are not included.
8818## So makeinfo is a requirement to build from Bazaar, and configure
8819## should test for it as it does for any other build requirement.
8820## We use the presence of $srcdir/info/emacs to distinguish a release,
8821## with pre-built manuals, from a Bazaar checkout.
96f129d5
GM
8822HAVE_MAKEINFO=yes
8823
067d23c9 8824if test "$MAKEINFO" = "no"; then
96f129d5 8825 MAKEINFO=makeinfo
067d23c9 8826 if test "x${with_makeinfo}" = "xno"; then
96f129d5 8827 HAVE_MAKEINFO=no
b5591ebb 8828 elif test ! -e "$srcdir/info/emacs" && test ! -e "$srcdir/info/emacs.info"; then
9e40dda4 8829 as_fn_error "You do not seem to have makeinfo >= 4.7, and your
067d23c9
KY
8830source tree does not seem to have pre-built manuals in the \`info' directory.
8831Either install a suitable version of makeinfo, or re-run configure
8832with the \`--without-makeinfo' option to build without the manuals. " "$LINENO" 5
8833 fi
8834fi
8835
8836
141d074d
GM
8837INFO_EXT=.info
8838INFO_OPTS=--no-split
8839
8840
8841
ffeb6dec 8842if test $opsys = mingw32; then
c65a2df9 8843 DOCMISC_W32=efaq-w32
ffeb6dec 8844else
c65a2df9 8845 DOCMISC_W32=
ffeb6dec
GM
8846fi
8847
8848
8849
067d23c9
KY
8850if test x$GCC = xyes; then
8851 test "x$GCC_LINK_TEST_OPTIONS" != x && \
8852 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
8853else
8854 test "x$NON_GCC_LINK_TEST_OPTIONS" != x && \
8855 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
8856fi
8857
8858
57f26ea7 8859late_LDFLAGS="$LDFLAGS"
067d23c9 8860if test x$GCC = xyes; then
992ec28a 8861 LDFLAGS_NOCOMBRELOC="-Wl,-znocombreloc"
067d23c9 8862else
992ec28a 8863 LDFLAGS_NOCOMBRELOC="-znocombreloc"
067d23c9
KY
8864fi
8865
992ec28a
GM
8866LDFLAGS="$LDFLAGS $LDFLAGS_NOCOMBRELOC"
8867
067d23c9
KY
8868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -znocombreloc" >&5
8869$as_echo_n "checking for -znocombreloc... " >&6; }
8870cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8871/* end confdefs.h. */
8872
8873int
8874main ()
8875{
8876
8877 ;
8878 return 0;
8879}
8880_ACEOF
8881if ac_fn_c_try_link "$LINENO"; then :
8882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8883$as_echo "yes" >&6; }
8884else
992ec28a 8885 LDFLAGS_NOCOMBRELOC=
067d23c9
KY
8886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8887$as_echo "no" >&6; }
8888fi
8889rm -f core conftest.err conftest.$ac_objext \
8890 conftest$ac_exeext conftest.$ac_ext
8891
57f26ea7 8892LDFLAGS="$late_LDFLAGS"
067d23c9 8893
125c3718 8894test "x$CANNOT_DUMP" = "x" && CANNOT_DUMP=no
067d23c9 8895case "$opsys" in
125c3718
PE
8896 your-opsys-here) CANNOT_DUMP=yes ;;
8897esac
8898
8899test "$CANNOT_DUMP" = "yes" && \
067d23c9
KY
8900
8901$as_echo "#define CANNOT_DUMP 1" >>confdefs.h
8902
125c3718 8903
067d23c9
KY
8904
8905
8906
8907UNEXEC_OBJ=unexelf.o
8908case "$opsys" in
8909 # MSDOS uses unexcoff.o
067d23c9
KY
8910 aix4-2)
8911 UNEXEC_OBJ=unexaix.o
8912 ;;
8913 cygwin)
8914 UNEXEC_OBJ=unexcw.o
8915 ;;
8916 darwin)
8917 UNEXEC_OBJ=unexmacosx.o
8918 ;;
8919 hpux10-20 | hpux11)
8920 UNEXEC_OBJ=unexhp9k800.o
8921 ;;
7c61eaab
GM
8922 mingw32)
8923 UNEXEC_OBJ=unexw32.o
8924 ;;
067d23c9
KY
8925 sol2-10)
8926 # Use the Solaris dldump() function, called from unexsol.c, to dump
8927 # emacs, instead of the generic ELF dump code found in unexelf.c.
8928 # The resulting binary has a complete symbol table, and is better
8929 # for debugging and other observability tools (debuggers, pstack, etc).
8930 #
8931 # If you encounter a problem using dldump(), please consider sending
8932 # a message to the OpenSolaris tools-linking mailing list:
8933 # http://mail.opensolaris.org/mailman/listinfo/tools-linking
8934 #
8935 # It is likely that dldump() works with older Solaris too, but this has
8936 # not been tested, so for now this change is for Solaris 10 or newer.
8937 UNEXEC_OBJ=unexsol.o
8938 ;;
8939esac
8940
8941LD_SWITCH_SYSTEM=
8942case "$opsys" in
87e1a811 8943 freebsd|dragonfly)
067d23c9
KY
8944 ## Let `ld' find image libs and similar things in /usr/local/lib.
8945 ## The system compiler, GCC, has apparently been modified to not
8946 ## look there, contrary to what a stock GCC would do.
a7479549
GM
8947### It's not our place to do this. See bug#10313#17.
8948### LD_SWITCH_SYSTEM=-L/usr/local/lib
8949 :
067d23c9
KY
8950 ;;
8951
8952 gnu-linux)
8953 ## cpp test was "ifdef __mips__", but presumably this is equivalent...
d6a003a8 8954 case $host_cpu in mips*) LD_SWITCH_SYSTEM="-G 0";; esac
067d23c9
KY
8955 ;;
8956
8957 netbsd)
a7479549
GM
8958### It's not our place to do this. See bug#10313#17.
8959### LD_SWITCH_SYSTEM="-Wl,-rpath,/usr/pkg/lib -L/usr/pkg/lib -Wl,-rpath,/usr/local/lib -L/usr/local/lib"
8960 :
067d23c9
KY
8961 ;;
8962
8963 openbsd)
3766b742 8964 ## Han Boetes <han@boetes.org> says this is necessary,
067d23c9
KY
8965 ## otherwise Emacs dumps core on elf systems.
8966 LD_SWITCH_SYSTEM="-Z"
8967 ;;
8968esac
8969
8970
8971ac_link="$ac_link $LD_SWITCH_SYSTEM"
8972
ae629dae 8973## This setting of LD_SWITCH_SYSTEM references LD_SWITCH_X_SITE_RPATH,
067d23c9
KY
8974## which has not been defined yet. When this was handled with cpp,
8975## it was expanded to null when configure sourced the s/*.h file.
8976## Thus LD_SWITCH_SYSTEM had different values in configure and the Makefiles.
8977## FIXME it would be cleaner to put this in LD_SWITCH_SYSTEM_TEMACS
8978## (or somesuch), but because it is supposed to go at the _front_
8979## of LD_SWITCH_SYSTEM, we cannot do that in exactly the same way.
8980## Compare with the gnu-linux case below, which added to the end
8981## of LD_SWITCH_SYSTEM, and so can instead go at the front of
8982## LD_SWITCH_SYSTEM_TEMACS.
8983case "$opsys" in
8984 netbsd|openbsd)
ae629dae 8985 LD_SWITCH_SYSTEM="\$(LD_SWITCH_X_SITE_RPATH) $LD_SWITCH_SYSTEM" ;;
067d23c9
KY
8986esac
8987
8988
8989C_SWITCH_MACHINE=
42bbbe8b
GM
8990case $canonical in
8991 alpha*)
067d23c9 8992 ac_fn_c_check_decl "$LINENO" "__ELF__" "ac_cv_have_decl___ELF__" "$ac_includes_default"
a9bec17c 8993if test "x$ac_cv_have_decl___ELF__" = x""yes; then :
067d23c9
KY
8994
8995fi
8996
8997 if test "$ac_cv_have_decl___ELF__" = "yes"; then
8998 ## With ELF, make sure that all common symbols get allocated to in the
8999 ## data section. Otherwise, the dump of temacs may miss variables in
9000 ## the shared library that have been initialized. For example, with
9001 ## GNU libc, __malloc_initialized would normally be resolved to the
9002 ## shared library's .bss section, which is fatal.
9003 if test "x$GCC" = "xyes"; then
9004 C_SWITCH_MACHINE="-fno-common"
9005 else
a9bec17c 9006 as_fn_error "What gives? Fix me if DEC Unix supports ELF now." "$LINENO" 5
067d23c9
KY
9007 fi
9008 else
9009 UNEXEC_OBJ=unexalpha.o
9010 fi
42bbbe8b
GM
9011 ;;
9012esac
067d23c9
KY
9013
9014
9015
9016
9017C_SWITCH_SYSTEM=
9018## Some programs in src produce warnings saying certain subprograms
9019## are too complex and need a MAXMEM value greater than 2000 for
9020## additional optimization. --nils@exp-math.uni-essen.de
9021test "$opsys" = "aix4.2" && test "x$GCC" != "xyes" && \
9022 C_SWITCH_SYSTEM="-ma -qmaxmem=4000"
7c61eaab 9023test "$opsys" = "mingw32" && C_SWITCH_SYSTEM="-mtune=pentium4"
067d23c9
KY
9024## gnu-linux might need -D_BSD_SOURCE on old libc5 systems.
9025## It is redundant in glibc2, since we define _GNU_SOURCE.
9026
9027
9028
9029LIBS_SYSTEM=
9030case "$opsys" in
9031 ## IBM's X11R5 uses -lIM and -liconv in AIX 3.2.2.
9032 aix4-2) LIBS_SYSTEM="-lrts -lIM -liconv" ;;
9033
87e1a811 9034 freebsd|dragonfly) LIBS_SYSTEM="-lutil" ;;
067d23c9
KY
9035
9036 hpux*) LIBS_SYSTEM="-l:libdld.sl" ;;
9037
1f5d53eb 9038 sol2*) LIBS_SYSTEM="-lsocket -lnsl" ;;
067d23c9
KY
9039
9040 ## Motif needs -lgen.
9041 unixware) LIBS_SYSTEM="-lsocket -lnsl -lelf -lgen" ;;
9042esac
9043
9044
9045
9046### Make sure subsequent tests use flags consistent with the build flags.
9047
9048if test x"${OVERRIDE_CPPFLAGS}" != x; then
9049 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
9050else
9051 CPPFLAGS="$C_SWITCH_SYSTEM $C_SWITCH_MACHINE $CPPFLAGS"
9052fi
9053
4fda9c95
GM
9054# Suppress obsolescent Autoconf test for size_t; Emacs assumes C89 or better.
9055
3e0be4ab
GM
9056# Likewise for obsolescent test for uid_t, gid_t; Emacs assumes them.
9057
4fda9c95 9058
067d23c9 9059
067d23c9 9060LIB_MATH=-lm
4717915f 9061SYSTEM_TYPE=`echo $opsys | sed -e 's/[0-9].*//' -e 's|-|/|'`
067d23c9
KY
9062
9063case $opsys in
9064 cygwin )
9065 LIB_MATH=
067d23c9
KY
9066 ;;
9067 darwin )
9068 ## Adding -lm confuses the dynamic linker, so omit it.
9069 LIB_MATH=
067d23c9 9070 ;;
87e1a811 9071 freebsd | dragonfly )
15f79fcd 9072 SYSTEM_TYPE=berkeley-unix
067d23c9
KY
9073 ;;
9074 gnu-linux | gnu-kfreebsd )
067d23c9
KY
9075 ;;
9076 hpux10-20 | hpux11 )
067d23c9 9077 ;;
7c61eaab
GM
9078 mingw32 )
9079 LIB_MATH=
9080 SYSTEM_TYPE=windows-nt
9081 ;;
bb72ce91 9082 netbsd | openbsd )
15f79fcd 9083 SYSTEM_TYPE=berkeley-unix
067d23c9 9084 ;;
15f79fcd
GM
9085
9086 sol2* | unixware )
9087 SYSTEM_TYPE=usg-unix-v
9088 ;;
9089
067d23c9
KY
9090esac
9091
9092
9093
15f79fcd
GM
9094cat >>confdefs.h <<_ACEOF
9095#define SYSTEM_TYPE "$SYSTEM_TYPE"
9096_ACEOF
9097
9098
130f1dac 9099
5476a9a4
GM
9100pre_PKG_CONFIG_CFLAGS=$CFLAGS
9101pre_PKG_CONFIG_LIBS=$LIBS
067d23c9 9102
5476a9a4
GM
9103# Extract the first word of "pkg-config", so it can be a program name with args.
9104set dummy pkg-config; ac_word=$2
9105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9106$as_echo_n "checking for $ac_word... " >&6; }
9107if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
9108 $as_echo_n "(cached) " >&6
9109else
9110 case $PKG_CONFIG in
9111 [\\/]* | ?:[\\/]*)
9112 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9113 ;;
9114 *)
9115 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9116for as_dir in $PATH
9117do
9118 IFS=$as_save_IFS
9119 test -z "$as_dir" && as_dir=.
9120 for ac_exec_ext in '' $ac_executable_extensions; do
9121 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9122 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9123 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9124 break 2
9125 fi
9126done
9127 done
9128IFS=$as_save_IFS
9129
9130 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
9131 ;;
9132esac
9133fi
9134PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9135if test -n "$PKG_CONFIG"; then
9136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9137$as_echo "$PKG_CONFIG" >&6; }
9138else
9139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9140$as_echo "no" >&6; }
9141fi
f199cab1
GM
9142
9143
f199cab1 9144
5476a9a4
GM
9145
9146
9dabd86d 9147HAVE_SOUND=no
5476a9a4 9148if test "${with_sound}" != "no"; then
7c61eaab 9149 # Sound support for GNU/Linux, the free BSDs, and MinGW.
db7863f4 9150 for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h
5476a9a4
GM
9151do :
9152 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7c61eaab
GM
9153ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
9154 #ifdef __MINGW32__
9155 #define WIN32_LEAN_AND_MEAN
9156 #include <windows.h>
9157 #endif
9158
9159"
5476a9a4
GM
9160eval as_val=\$$as_ac_Header
9161 if test "x$as_val" = x""yes; then :
9162 cat >>confdefs.h <<_ACEOF
9163#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9164_ACEOF
9165 have_sound_header=yes
9166fi
9167
9168done
9169
dfdf7fe5
GM
9170 test "${with_sound}" = "oss" && test "${have_sound_header}" != "yes" && \
9171 as_fn_error "OSS sound support requested but not found." "$LINENO" 5
9172
9173 if test "${with_sound}" = "bsd-ossaudio" || test "${with_sound}" = "yes"; then
9dabd86d
GM
9174 # Emulation library used on NetBSD.
9175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _oss_ioctl in -lossaudio" >&5
5476a9a4
GM
9176$as_echo_n "checking for _oss_ioctl in -lossaudio... " >&6; }
9177if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then :
067d23c9
KY
9178 $as_echo_n "(cached) " >&6
9179else
5476a9a4
GM
9180 ac_check_lib_save_LIBS=$LIBS
9181LIBS="-lossaudio $LIBS"
9182cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 9183/* end confdefs.h. */
5476a9a4
GM
9184
9185/* Override any GCC internal prototype to avoid an error.
9186 Use char because int might match the return type of a GCC
9187 builtin and then its argument prototype would still apply. */
9188#ifdef __cplusplus
9189extern "C"
9190#endif
9191char _oss_ioctl ();
067d23c9
KY
9192int
9193main ()
9194{
5476a9a4 9195return _oss_ioctl ();
067d23c9
KY
9196 ;
9197 return 0;
9198}
9199_ACEOF
9200if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 9201 ac_cv_lib_ossaudio__oss_ioctl=yes
067d23c9 9202else
5476a9a4 9203 ac_cv_lib_ossaudio__oss_ioctl=no
067d23c9
KY
9204fi
9205rm -f core conftest.err conftest.$ac_objext \
9206 conftest$ac_exeext conftest.$ac_ext
5476a9a4
GM
9207LIBS=$ac_check_lib_save_LIBS
9208fi
9209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5
9210$as_echo "$ac_cv_lib_ossaudio__oss_ioctl" >&6; }
9211if test "x$ac_cv_lib_ossaudio__oss_ioctl" = x""yes; then :
9212 LIBSOUND=-lossaudio
9213else
9214 LIBSOUND=
067d23c9
KY
9215fi
9216
dfdf7fe5
GM
9217 test "${with_sound}" = "bsd-ossaudio" && test -z "$LIBSOUND" && \
9218 as_fn_error "bsd-ossaudio sound support requested but not found." "$LINENO" 5
9dabd86d 9219 fi
067d23c9
KY
9220
9221
9dabd86d
GM
9222 if test "${with_sound}" = "alsa" || test "${with_sound}" = "yes"; then
9223 ALSA_REQUIRED=1.0.0
9224 ALSA_MODULES="alsa >= $ALSA_REQUIRED"
5476a9a4
GM
9225
9226 succeeded=no
9227
9228 if test "$PKG_CONFIG" = "no" ; then
9229 HAVE_ALSA=no
9230 else
9231 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 9232 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
9233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ALSA_MODULES" >&5
9234$as_echo_n "checking for $ALSA_MODULES... " >&6; }
9235
b5591ebb
GM
9236 if "$PKG_CONFIG" --exists "$ALSA_MODULES" 2>&5 &&
9237 ALSA_CFLAGS=`"$PKG_CONFIG" --cflags "$ALSA_MODULES" 2>&5` &&
9238 ALSA_LIBS=`"$PKG_CONFIG" --libs "$ALSA_MODULES" 2>&5`; then
5476a9a4
GM
9239 edit_cflags="
9240 s,///*,/,g
9241 s/^/ /
9242 s/ -I/ $isystem/g
9243 s/^ //
9244 "
9245 ALSA_CFLAGS=`$as_echo "$ALSA_CFLAGS" | sed -e "$edit_cflags"`
9246 ALSA_LIBS=`$as_echo "$ALSA_LIBS" | sed -e 's,///*,/,g'`
9247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$ALSA_CFLAGS' LIBS='$ALSA_LIBS'" >&5
9248$as_echo "yes CFLAGS='$ALSA_CFLAGS' LIBS='$ALSA_LIBS'" >&6; }
9249 succeeded=yes
9250 else
9251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9252$as_echo "no" >&6; }
9253 ALSA_CFLAGS=""
9254 ALSA_LIBS=""
9255 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
9256 ## do set a variable so people can do so. Do it in a subshell
9257 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 9258 ALSA_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$ALSA_MODULES") 2>&1`
5476a9a4
GM
9259
9260 fi
9261
9262
9263
9264 else
9265 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
9266 echo "*** See http://www.freedesktop.org/software/pkgconfig"
9267 fi
9268 fi
9269
9270 if test $succeeded = yes; then
9271 HAVE_ALSA=yes
9272 else
9273 HAVE_ALSA=no
9274 fi
f199cab1 9275
9dabd86d
GM
9276 if test $HAVE_ALSA = yes; then
9277 SAVE_CFLAGS="$CFLAGS"
9278 SAVE_LIBS="$LIBS"
9279 CFLAGS="$ALSA_CFLAGS $CFLAGS"
9280 LIBS="$ALSA_LIBS $LIBS"
9281 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5476a9a4
GM
9282/* end confdefs.h. */
9283#include <asoundlib.h>
067d23c9
KY
9284int
9285main ()
9286{
5476a9a4 9287snd_lib_error_set_handler (0);
067d23c9
KY
9288 ;
9289 return 0;
9290}
9291_ACEOF
5476a9a4
GM
9292if ac_fn_c_try_compile "$LINENO"; then :
9293 emacs_alsa_normal=yes
067d23c9 9294else
5476a9a4 9295 emacs_alsa_normal=no
067d23c9 9296fi
5476a9a4 9297rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9dabd86d
GM
9298 if test "$emacs_alsa_normal" != yes; then
9299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5476a9a4
GM
9300/* end confdefs.h. */
9301#include <alsa/asoundlib.h>
9302int
9303main ()
9304{
9305snd_lib_error_set_handler (0);
9306 ;
9307 return 0;
9308}
9309_ACEOF
9310if ac_fn_c_try_compile "$LINENO"; then :
9311 emacs_alsa_subdir=yes
9312else
9313 emacs_alsa_subdir=no
f199cab1 9314fi
5476a9a4 9315rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9dabd86d
GM
9316 if test "$emacs_alsa_subdir" != yes; then
9317 as_fn_error "pkg-config found alsa, but it does not compile. See config.log for error messages." "$LINENO" 5
9318 fi
9319 ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE"
5476a9a4 9320 fi
067d23c9 9321
9dabd86d
GM
9322 CFLAGS="$SAVE_CFLAGS"
9323 LIBS="$SAVE_LIBS"
9324 LIBSOUND="$LIBSOUND $ALSA_LIBS"
9325 CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS"
067d23c9 9326
5476a9a4 9327$as_echo "#define HAVE_ALSA 1" >>confdefs.h
067d23c9 9328
9dabd86d
GM
9329 elif test "${with_sound}" = "alsa"; then
9330 as_fn_error "ALSA sound support requested but not found." "$LINENO" 5
9331 fi
5476a9a4 9332 fi
9dabd86d 9333 if test x$have_sound_header = xyes || test $HAVE_ALSA = yes; then
5476a9a4 9334 case "$opsys" in
9dabd86d 9335 gnu-linux|freebsd|netbsd|mingw32)
067d23c9 9336
5476a9a4 9337$as_echo "#define HAVE_SOUND 1" >>confdefs.h
067d23c9 9338
9dabd86d 9339 HAVE_SOUND=yes
5476a9a4
GM
9340 ;;
9341 esac
9342 fi
067d23c9
KY
9343
9344
5476a9a4 9345fi
067d23c9 9346
e700232f
GM
9347
9348
9349
5476a9a4
GM
9350 for ac_header in $ac_header_list
9351do :
9352 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9353ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
9354"
9355eval as_val=\$$as_ac_Header
9356 if test "x$as_val" = x""yes; then :
9357 cat >>confdefs.h <<_ACEOF
9358#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
067d23c9
KY
9359_ACEOF
9360
f199cab1 9361fi
e700232f 9362
5476a9a4
GM
9363done
9364
9365
e700232f
GM
9366
9367
9368
f199cab1 9369
067d23c9 9370
067d23c9 9371
067d23c9 9372
067d23c9 9373
f199cab1
GM
9374
9375
9376
067d23c9 9377
067d23c9 9378
f199cab1
GM
9379
9380
9381
5476a9a4
GM
9382
9383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if personality LINUX32 can be set" >&5
9384$as_echo_n "checking if personality LINUX32 can be set... " >&6; }
9385cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9386/* end confdefs.h. */
9387#include <sys/personality.h>
067d23c9
KY
9388int
9389main ()
9390{
5476a9a4 9391personality (PER_LINUX32)
067d23c9
KY
9392 ;
9393 return 0;
9394}
9395_ACEOF
9396if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4 9397 emacs_cv_personality_linux32=yes
067d23c9 9398else
5476a9a4 9399 emacs_cv_personality_linux32=no
067d23c9 9400fi
f199cab1 9401rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5476a9a4
GM
9402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_personality_linux32" >&5
9403$as_echo "$emacs_cv_personality_linux32" >&6; }
f199cab1 9404
5476a9a4 9405if test $emacs_cv_personality_linux32 = yes; then
f199cab1 9406
5476a9a4
GM
9407$as_echo "#define HAVE_PERSONALITY_LINUX32 1" >>confdefs.h
9408
9409fi
9410
9411for ac_header in term.h
9412do :
9413 ac_fn_c_check_header_preproc "$LINENO" "term.h" "ac_cv_header_term_h"
9414if test "x$ac_cv_header_term_h" = x""yes; then :
9415 cat >>confdefs.h <<_ACEOF
9416#define HAVE_TERM_H 1
067d23c9 9417_ACEOF
5476a9a4
GM
9418
9419fi
9420
9421done
9422
9423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
9424$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
9425if test "${ac_cv_header_time+set}" = set; then :
9426 $as_echo_n "(cached) " >&6
9427else
9428 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 9429/* end confdefs.h. */
5476a9a4
GM
9430#include <sys/types.h>
9431#include <sys/time.h>
9432#include <time.h>
f199cab1 9433
067d23c9
KY
9434int
9435main ()
9436{
5476a9a4
GM
9437if ((struct tm *) 0)
9438return 0;
067d23c9
KY
9439 ;
9440 return 0;
9441}
9442_ACEOF
9443if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4 9444 ac_cv_header_time=yes
067d23c9 9445else
5476a9a4 9446 ac_cv_header_time=no
067d23c9
KY
9447fi
9448rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9449fi
5476a9a4
GM
9450{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
9451$as_echo "$ac_cv_header_time" >&6; }
9452if test $ac_cv_header_time = yes; then
f199cab1 9453
5476a9a4
GM
9454$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
9455
9456fi
9457
dc67e786
GM
9458ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "#include <signal.h>
9459
9460"
5476a9a4
GM
9461if test "x$ac_cv_have_decl_sys_siglist" = x""yes; then :
9462 ac_have_decl=1
9463else
9464 ac_have_decl=0
9465fi
9466
9467cat >>confdefs.h <<_ACEOF
9468#define HAVE_DECL_SYS_SIGLIST $ac_have_decl
067d23c9 9469_ACEOF
5476a9a4
GM
9470
9471if test $ac_cv_have_decl_sys_siglist != yes; then
9472 # For Tru64, at least:
dc67e786
GM
9473 ac_fn_c_check_decl "$LINENO" "__sys_siglist" "ac_cv_have_decl___sys_siglist" "#include <signal.h>
9474
9475"
5476a9a4
GM
9476if test "x$ac_cv_have_decl___sys_siglist" = x""yes; then :
9477 ac_have_decl=1
9478else
9479 ac_have_decl=0
067d23c9 9480fi
5476a9a4
GM
9481
9482cat >>confdefs.h <<_ACEOF
9483#define HAVE_DECL___SYS_SIGLIST $ac_have_decl
9484_ACEOF
9485
5476a9a4
GM
9486fi
9487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
9488$as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
9489if test "${ac_cv_header_sys_wait_h+set}" = set; then :
9490 $as_echo_n "(cached) " >&6
067d23c9
KY
9491else
9492 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9493/* end confdefs.h. */
5476a9a4
GM
9494#include <sys/types.h>
9495#include <sys/wait.h>
9496#ifndef WEXITSTATUS
9497# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
9498#endif
9499#ifndef WIFEXITED
9500# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
9501#endif
9502
067d23c9
KY
9503int
9504main ()
9505{
5476a9a4
GM
9506 int s;
9507 wait (&s);
9508 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
067d23c9
KY
9509 ;
9510 return 0;
9511}
9512_ACEOF
5476a9a4
GM
9513if ac_fn_c_try_compile "$LINENO"; then :
9514 ac_cv_header_sys_wait_h=yes
067d23c9 9515else
5476a9a4 9516 ac_cv_header_sys_wait_h=no
067d23c9 9517fi
5476a9a4 9518rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
067d23c9 9519fi
5476a9a4
GM
9520{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
9521$as_echo "$ac_cv_header_sys_wait_h" >&6; }
9522if test $ac_cv_header_sys_wait_h = yes; then
067d23c9 9523
5476a9a4 9524$as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
7417b37c 9525
5476a9a4 9526fi
7417b37c 9527
7417b37c 9528
067d23c9
KY
9529
9530
e700232f 9531
5476a9a4
GM
9532for ac_header in net/if.h
9533do :
9534 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
9535#if HAVE_SYS_SOCKET_H
9536#include <sys/socket.h>
9537#endif
9538"
9539if test "x$ac_cv_header_net_if_h" = x""yes; then :
9540 cat >>confdefs.h <<_ACEOF
9541#define HAVE_NET_IF_H 1
067d23c9 9542_ACEOF
7cae64b4 9543
067d23c9 9544fi
067d23c9 9545
5476a9a4 9546done
4d4b75e8 9547
5476a9a4
GM
9548for ac_header in ifaddrs.h
9549do :
9550 ac_fn_c_check_header_compile "$LINENO" "ifaddrs.h" "ac_cv_header_ifaddrs_h" "$ac_includes_default
9551#if HAVE_SYS_SOCKET_H
9552#include <sys/socket.h>
9553#endif
9554"
9555if test "x$ac_cv_header_ifaddrs_h" = x""yes; then :
9556 cat >>confdefs.h <<_ACEOF
9557#define HAVE_IFADDRS_H 1
9558_ACEOF
4d4b75e8 9559
5476a9a4 9560fi
4d4b75e8 9561
5476a9a4 9562done
7e723570 9563
5476a9a4 9564for ac_header in net/if_dl.h
7e723570 9565do :
5476a9a4
GM
9566 ac_fn_c_check_header_compile "$LINENO" "net/if_dl.h" "ac_cv_header_net_if_dl_h" "$ac_includes_default
9567#if HAVE_SYS_SOCKET_H
9568#include <sys/socket.h>
9569#endif
7e723570 9570"
5476a9a4 9571if test "x$ac_cv_header_net_if_dl_h" = x""yes; then :
7e723570 9572 cat >>confdefs.h <<_ACEOF
5476a9a4 9573#define HAVE_NET_IF_DL_H 1
7e723570
GM
9574_ACEOF
9575
9576fi
9577
9578done
9579
9580
5476a9a4
GM
9581ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_flags" "ac_cv_member_struct_ifreq_ifr_flags" "$ac_includes_default
9582#if HAVE_SYS_SOCKET_H
9583#include <sys/socket.h>
9584#endif
9585#if HAVE_NET_IF_H
9586#include <net/if.h>
9587#endif
9588"
9589if test "x$ac_cv_member_struct_ifreq_ifr_flags" = x""yes; then :
7e723570 9590
5476a9a4
GM
9591cat >>confdefs.h <<_ACEOF
9592#define HAVE_STRUCT_IFREQ_IFR_FLAGS 1
9593_ACEOF
7e723570
GM
9594
9595
5476a9a4
GM
9596fi
9597ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_hwaddr" "ac_cv_member_struct_ifreq_ifr_hwaddr" "$ac_includes_default
9598#if HAVE_SYS_SOCKET_H
9599#include <sys/socket.h>
f199cab1 9600#endif
5476a9a4
GM
9601#if HAVE_NET_IF_H
9602#include <net/if.h>
f199cab1 9603#endif
5476a9a4
GM
9604"
9605if test "x$ac_cv_member_struct_ifreq_ifr_hwaddr" = x""yes; then :
9606
9607cat >>confdefs.h <<_ACEOF
9608#define HAVE_STRUCT_IFREQ_IFR_HWADDR 1
9609_ACEOF
9610
9611
9612fi
9613ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_netmask" "ac_cv_member_struct_ifreq_ifr_netmask" "$ac_includes_default
9614#if HAVE_SYS_SOCKET_H
9615#include <sys/socket.h>
f199cab1 9616#endif
5476a9a4
GM
9617#if HAVE_NET_IF_H
9618#include <net/if.h>
9619#endif
9620"
9621if test "x$ac_cv_member_struct_ifreq_ifr_netmask" = x""yes; then :
9622
9623cat >>confdefs.h <<_ACEOF
9624#define HAVE_STRUCT_IFREQ_IFR_NETMASK 1
f199cab1 9625_ACEOF
5476a9a4
GM
9626
9627
9628fi
9629ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_broadaddr" "ac_cv_member_struct_ifreq_ifr_broadaddr" "$ac_includes_default
9630#if HAVE_SYS_SOCKET_H
9631#include <sys/socket.h>
9632#endif
9633#if HAVE_NET_IF_H
9634#include <net/if.h>
9635#endif
9636"
9637if test "x$ac_cv_member_struct_ifreq_ifr_broadaddr" = x""yes; then :
9638
9639cat >>confdefs.h <<_ACEOF
9640#define HAVE_STRUCT_IFREQ_IFR_BROADADDR 1
f199cab1 9641_ACEOF
5476a9a4
GM
9642
9643
067d23c9 9644fi
5476a9a4
GM
9645ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_addr" "ac_cv_member_struct_ifreq_ifr_addr" "$ac_includes_default
9646#if HAVE_SYS_SOCKET_H
9647#include <sys/socket.h>
9648#endif
9649#if HAVE_NET_IF_H
9650#include <net/if.h>
9651#endif
9652"
9653if test "x$ac_cv_member_struct_ifreq_ifr_addr" = x""yes; then :
9654
9655cat >>confdefs.h <<_ACEOF
9656#define HAVE_STRUCT_IFREQ_IFR_ADDR 1
9657_ACEOF
9658
067d23c9 9659
f199cab1 9660fi
5476a9a4
GM
9661ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_addr.sa_len" "ac_cv_member_struct_ifreq_ifr_addr_sa_len" "$ac_includes_default
9662#if HAVE_SYS_SOCKET_H
9663#include <sys/socket.h>
9664#endif
9665#if HAVE_NET_IF_H
9666#include <net/if.h>
9667#endif
9668"
9669if test "x$ac_cv_member_struct_ifreq_ifr_addr_sa_len" = x""yes; then :
9670
9671cat >>confdefs.h <<_ACEOF
9672#define HAVE_STRUCT_IFREQ_IFR_ADDR_SA_LEN 1
9673_ACEOF
9674
067d23c9
KY
9675
9676fi
9677
9678
067d23c9 9679
f199cab1 9680
5476a9a4
GM
9681DEPFLAGS=
9682MKDEPDIR=":"
9683deps_frag=deps.mk
9684if test "$GCC" = yes && test "$ac_enable_autodepend" = yes; then
9685 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using GNU Make" >&5
9686$as_echo_n "checking whether we are using GNU Make... " >&6; }
9687 HAVE_GNU_MAKE=no
9688 testval=`${MAKE-make} --version 2>/dev/null | grep 'GNU Make'`
9689 if test "x$testval" != x; then
9690 HAVE_GNU_MAKE=yes
9691 else
9692 ac_enable_autodepend=no
9693 fi
9694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_GNU_MAKE" >&5
9695$as_echo "$HAVE_GNU_MAKE" >&6; }
9696 if test $HAVE_GNU_MAKE = yes; then
9697 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -MMD -MF" >&5
9698$as_echo_n "checking whether gcc understands -MMD -MF... " >&6; }
9699 SAVE_CFLAGS="$CFLAGS"
9700 CFLAGS="$CFLAGS -MMD -MF deps.d -MP"
9701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9702/* end confdefs.h. */
f199cab1 9703
5476a9a4
GM
9704int
9705main ()
9706{
f199cab1 9707
5476a9a4
GM
9708 ;
9709 return 0;
9710}
9711_ACEOF
9712if ac_fn_c_try_compile "$LINENO"; then :
f199cab1 9713
5476a9a4
GM
9714else
9715 ac_enable_autodepend=no
9716fi
9717rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9718 CFLAGS="$SAVE_CFLAGS"
9719 test -f deps.d || ac_enable_autodepend=no
9720 rm -rf deps.d
9721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_autodepend" >&5
9722$as_echo "$ac_enable_autodepend" >&6; }
9723 fi
9724 if test $ac_enable_autodepend = yes; then
9725 DEPFLAGS='-MMD -MF ${DEPDIR}/$*.d -MP'
9726 ## MKDIR_P is documented (see AC_PROG_MKDIR_P) to be parallel-safe.
9727 MKDEPDIR='${MKDIR_P} ${DEPDIR}'
9728 deps_frag=autodeps.mk
9729 fi
9730fi
9731deps_frag=$srcdir/src/$deps_frag
f199cab1
GM
9732
9733
9734
9735
9736
5476a9a4 9737lisp_frag=$srcdir/src/lisp.mk
f199cab1
GM
9738
9739
9740
5476a9a4
GM
9741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long file names" >&5
9742$as_echo_n "checking for long file names... " >&6; }
9743if test "${ac_cv_sys_long_file_names+set}" = set; then :
9744 $as_echo_n "(cached) " >&6
9745else
9746 ac_cv_sys_long_file_names=yes
9747# Test for long file names in all the places we know might matter:
9748# . the current directory, where building will happen
9749# $prefix/lib where we will be installing things
9750# $exec_prefix/lib likewise
9751# $TMPDIR if set, where it might want to write temporary files
9752# /tmp where it might want to write temporary files
9753# /var/tmp likewise
9754# /usr/tmp likewise
9755for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do
9756 # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib
9757 # in the usual case where exec_prefix is '${prefix}'.
9758 case $ac_dir in #(
9759 . | /* | ?:[\\/]*) ;; #(
9760 *) continue;;
9761 esac
9762 test -w "$ac_dir/." || continue # It is less confusing to not echo anything here.
9763 ac_xdir=$ac_dir/cf$$
9764 (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
9765 ac_tf1=$ac_xdir/conftest9012345
9766 ac_tf2=$ac_xdir/conftest9012346
9767 touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" ||
9768 ac_cv_sys_long_file_names=no
9769 rm -f -r "$ac_xdir" 2>/dev/null
9770 test $ac_cv_sys_long_file_names = no && break
9771done
9772fi
9773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_long_file_names" >&5
9774$as_echo "$ac_cv_sys_long_file_names" >&6; }
9775if test $ac_cv_sys_long_file_names = yes; then
f199cab1 9776
5476a9a4 9777$as_echo "#define HAVE_LONG_FILE_NAMES 1" >>confdefs.h
f199cab1 9778
5476a9a4 9779fi
f199cab1 9780
f199cab1 9781
5476a9a4 9782#### Choose a window system.
f199cab1 9783
42dcba54
GM
9784## We leave window_system equal to none if
9785## we end up building without one. Any new window system should
9786## set window_system to an appropriate value and add objects to
9787## window-system-specific substs.
9788
9789window_system=none
5476a9a4
GM
9790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
9791$as_echo_n "checking for X... " >&6; }
f199cab1 9792
f199cab1 9793
5476a9a4
GM
9794# Check whether --with-x was given.
9795if test "${with_x+set}" = set; then :
9796 withval=$with_x;
9797fi
f199cab1 9798
5476a9a4
GM
9799# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
9800if test "x$with_x" = xno; then
9801 # The user explicitly disabled X.
9802 have_x=disabled
9803else
9804 case $x_includes,$x_libraries in #(
9805 *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
9806 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
9807 $as_echo_n "(cached) " >&6
9808else
9809 # One or both of the vars are not set, and there is no cached value.
9810ac_x_includes=no ac_x_libraries=no
9811rm -f -r conftest.dir
9812if mkdir conftest.dir; then
9813 cd conftest.dir
9814 cat >Imakefile <<'_ACEOF'
9815incroot:
9816 @echo incroot='${INCROOT}'
9817usrlibdir:
9818 @echo usrlibdir='${USRLIBDIR}'
9819libdir:
9820 @echo libdir='${LIBDIR}'
9821_ACEOF
9822 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
9823 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
9824 for ac_var in incroot usrlibdir libdir; do
9825 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
9826 done
9827 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
9828 for ac_extension in a so sl dylib la dll; do
9829 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
9830 test -f "$ac_im_libdir/libX11.$ac_extension"; then
9831 ac_im_usrlibdir=$ac_im_libdir; break
9832 fi
9833 done
9834 # Screen out bogus values from the imake configuration. They are
9835 # bogus both because they are the default anyway, and because
9836 # using them would break gcc on systems where it needs fixed includes.
9837 case $ac_im_incroot in
9838 /usr/include) ac_x_includes= ;;
9839 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
9840 esac
9841 case $ac_im_usrlibdir in
9842 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
9843 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
9844 esac
9845 fi
9846 cd ..
9847 rm -f -r conftest.dir
067d23c9
KY
9848fi
9849
5476a9a4
GM
9850# Standard set of common directories for X headers.
9851# Check X11 before X11Rn because it is often a symlink to the current release.
9852ac_x_header_dirs='
9853/usr/X11/include
9854/usr/X11R7/include
9855/usr/X11R6/include
9856/usr/X11R5/include
9857/usr/X11R4/include
067d23c9 9858
5476a9a4
GM
9859/usr/include/X11
9860/usr/include/X11R7
9861/usr/include/X11R6
9862/usr/include/X11R5
9863/usr/include/X11R4
067d23c9 9864
5476a9a4
GM
9865/usr/local/X11/include
9866/usr/local/X11R7/include
9867/usr/local/X11R6/include
9868/usr/local/X11R5/include
9869/usr/local/X11R4/include
067d23c9 9870
5476a9a4
GM
9871/usr/local/include/X11
9872/usr/local/include/X11R7
9873/usr/local/include/X11R6
9874/usr/local/include/X11R5
9875/usr/local/include/X11R4
067d23c9 9876
5476a9a4
GM
9877/usr/X386/include
9878/usr/x386/include
9879/usr/XFree86/include/X11
067d23c9 9880
5476a9a4
GM
9881/usr/include
9882/usr/local/include
9883/usr/unsupported/include
9884/usr/athena/include
9885/usr/local/x11r5/include
9886/usr/lpp/Xamples/include
067d23c9 9887
5476a9a4
GM
9888/usr/openwin/include
9889/usr/openwin/share/include'
067d23c9 9890
5476a9a4
GM
9891if test "$ac_x_includes" = no; then
9892 # Guess where to find include files, by looking for Xlib.h.
9893 # First, try using that file with no special directory specified.
9894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9895/* end confdefs.h. */
9896#include <X11/Xlib.h>
067d23c9 9897_ACEOF
5476a9a4
GM
9898if ac_fn_c_try_cpp "$LINENO"; then :
9899 # We can compile using X headers with no special include directory.
9900ac_x_includes=
067d23c9 9901else
5476a9a4
GM
9902 for ac_dir in $ac_x_header_dirs; do
9903 if test -r "$ac_dir/X11/Xlib.h"; then
9904 ac_x_includes=$ac_dir
9905 break
f199cab1 9906 fi
f199cab1 9907done
5476a9a4
GM
9908fi
9909rm -f conftest.err conftest.$ac_ext
9910fi # $ac_x_includes = no
067d23c9 9911
5476a9a4
GM
9912if test "$ac_x_libraries" = no; then
9913 # Check for the libraries.
9914 # See if we find them without any special options.
9915 # Don't add to $LIBS permanently.
9916 ac_save_LIBS=$LIBS
9917 LIBS="-lX11 $LIBS"
7ee3791f 9918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 9919/* end confdefs.h. */
5476a9a4 9920#include <X11/Xlib.h>
067d23c9
KY
9921int
9922main ()
9923{
5476a9a4
GM
9924XrmInitialize ()
9925 ;
067d23c9
KY
9926 return 0;
9927}
9928_ACEOF
5476a9a4
GM
9929if ac_fn_c_try_link "$LINENO"; then :
9930 LIBS=$ac_save_LIBS
9931# We can link X programs with no special library path.
9932ac_x_libraries=
7ee3791f 9933else
5476a9a4
GM
9934 LIBS=$ac_save_LIBS
9935for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
9936do
9937 # Don't even attempt the hair of trying to link an X program!
9938 for ac_extension in a so sl dylib la dll; do
9939 if test -r "$ac_dir/libX11.$ac_extension"; then
9940 ac_x_libraries=$ac_dir
9941 break 2
9942 fi
9943 done
9944done
7ee3791f 9945fi
5476a9a4
GM
9946rm -f core conftest.err conftest.$ac_objext \
9947 conftest$ac_exeext conftest.$ac_ext
9948fi # $ac_x_libraries = no
7ee3791f 9949
5476a9a4
GM
9950case $ac_x_includes,$ac_x_libraries in #(
9951 no,* | *,no | *\'*)
9952 # Didn't find X, or a directory has "'" in its name.
9953 ac_cv_have_x="have_x=no";; #(
9954 *)
9955 # Record where we found X for the cache.
9956 ac_cv_have_x="have_x=yes\
9957 ac_x_includes='$ac_x_includes'\
9958 ac_x_libraries='$ac_x_libraries'"
9959esac
9960fi
9961;; #(
9962 *) have_x=yes;;
9963 esac
9964 eval "$ac_cv_have_x"
9965fi # $with_x != no
9966
9967if test "$have_x" != yes; then
9968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
9969$as_echo "$have_x" >&6; }
9970 no_x=yes
9971else
9972 # If each of the values was on the command line, it overrides each guess.
9973 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
9974 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
9975 # Update the cache value to reflect the command line values.
9976 ac_cv_have_x="have_x=yes\
9977 ac_x_includes='$x_includes'\
9978 ac_x_libraries='$x_libraries'"
9979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
9980$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
9981fi
9982
42dcba54 9983if test "$no_x" != yes; then
5476a9a4
GM
9984 window_system=x11
9985fi
9986
9987LD_SWITCH_X_SITE_RPATH=
9988if test "${x_libraries}" != NONE; then
9989 if test -n "${x_libraries}"; then
9990 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
9991 LD_SWITCH_X_SITE_RPATH=-Wl,-rpath,`echo ${x_libraries} | sed -e "s/:/ -Wl,-rpath,/g"`
9992 fi
9993 x_default_search_path=""
9994 x_search_path=${x_libraries}
9995 if test -z "${x_search_path}"; then
9996 x_search_path=/usr/lib
9997 fi
9998 for x_library in `echo ${x_search_path}: | \
9999 sed -e "s/:/ /g" -e p -e "s:/lib[^ /]* :/share :g"`; do
10000 x_search_path="\
10001${x_library}/X11/%L/%T/%N%C%S:\
10002${x_library}/X11/%l/%T/%N%C%S:\
10003${x_library}/X11/%T/%N%C%S:\
10004${x_library}/X11/%L/%T/%N%S:\
10005${x_library}/X11/%l/%T/%N%S:\
10006${x_library}/X11/%T/%N%S"
10007 if test x"${x_default_search_path}" = x; then
10008 x_default_search_path=${x_search_path}
10009 else
10010 x_default_search_path="${x_search_path}:${x_default_search_path}"
10011 fi
10012 done
10013fi
10014
10015
10016if test "${x_includes}" != NONE && test -n "${x_includes}"; then
10017 C_SWITCH_X_SITE="$isystem"`echo ${x_includes} | sed -e "s/:/ $isystem/g"`
10018fi
10019
10020if test x"${x_includes}" = x; then
10021 bitmapdir=/usr/include/X11/bitmaps
10022else
10023 # accumulate include directories that have X11 bitmap subdirectories
10024 bmd_acc="dummyval"
10025 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
10026 if test -d "${bmd}/X11/bitmaps"; then
10027 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
10028 fi
10029 if test -d "${bmd}/bitmaps"; then
10030 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
10031 fi
10032 done
10033 if test ${bmd_acc} != "dummyval"; then
10034 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
10035 fi
10036fi
7ee3791f 10037
5476a9a4
GM
10038HAVE_NS=no
10039NS_IMPL_COCOA=no
10040NS_IMPL_GNUSTEP=no
10041tmp_CPPFLAGS="$CPPFLAGS"
10042tmp_CFLAGS="$CFLAGS"
10043CPPFLAGS="$CPPFLAGS -x objective-c"
10044CFLAGS="$CFLAGS -x objective-c"
5476a9a4 10045GNU_OBJC_CFLAGS=
4efe5ef9 10046LIBS_GNUSTEP=
5476a9a4
GM
10047if test "${with_ns}" != no; then
10048 if test "${opsys}" = darwin; then
10049 NS_IMPL_COCOA=yes
10050 ns_appdir=`pwd`/nextstep/Emacs.app
10051 ns_appbindir=${ns_appdir}/Contents/MacOS
10052 ns_appresdir=${ns_appdir}/Contents/Resources
bb7dce39 10053 ns_appsrc=Cocoa/Emacs.base
5476a9a4
GM
10054 elif test -f $GNUSTEP_CONFIG_FILE; then
10055 NS_IMPL_GNUSTEP=yes
10056 ns_appdir=`pwd`/nextstep/Emacs.app
10057 ns_appbindir=${ns_appdir}
10058 ns_appresdir=${ns_appdir}/Resources
bb7dce39 10059 ns_appsrc=GNUstep/Emacs.base
5476a9a4
GM
10060 GNUSTEP_SYSTEM_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_HEADERS)"
10061 GNUSTEP_SYSTEM_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_LIBRARIES)"
10062 GNUSTEP_LOCAL_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_HEADERS)"
10063 GNUSTEP_LOCAL_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_LIBRARIES)"
10064 test "x${GNUSTEP_LOCAL_HEADERS}" != "x" && \
10065 GNUSTEP_LOCAL_HEADERS="-I${GNUSTEP_LOCAL_HEADERS}"
10066 test "x${GNUSTEP_LOCAL_LIBRARIES}" != "x" && \
10067 GNUSTEP_LOCAL_LIBRARIES="-L${GNUSTEP_LOCAL_LIBRARIES}"
10068 CPPFLAGS="$CPPFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
10069 CFLAGS="$CFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
10070 LDFLAGS="$LDFLAGS -L${GNUSTEP_SYSTEM_LIBRARIES} ${GNUSTEP_LOCAL_LIBRARIES}"
4efe5ef9 10071 LIBS_GNUSTEP="-lgnustep-gui -lgnustep-base -lobjc -lpthread"
5476a9a4
GM
10072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if GNUstep defines BASE_NATIVE_OBJC_EXCEPTIONS" >&5
10073$as_echo_n "checking if GNUstep defines BASE_NATIVE_OBJC_EXCEPTIONS... " >&6; }
10074if test "${emacs_cv_objc_exceptions+set}" = set; then :
10075 $as_echo_n "(cached) " >&6
10076else
10077 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10078/* end confdefs.h. */
10079#include <GNUstepBase/GSConfig.h>
39b3d70b
GM
10080int
10081main ()
10082{
5476a9a4
GM
10083#if defined BASE_NATIVE_OBJC_EXCEPTIONS && BASE_NATIVE_OBJC_EXCEPTIONS > 0
100841;
10085#else
10086fail;
10087#endif
10088 ;
39b3d70b
GM
10089 return 0;
10090}
10091_ACEOF
5476a9a4
GM
10092if ac_fn_c_try_compile "$LINENO"; then :
10093 emacs_cv_objc_exceptions=yes
39b3d70b 10094else
5476a9a4 10095 emacs_cv_objc_exceptions=no
39b3d70b 10096fi
5476a9a4 10097rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
39b3d70b 10098fi
5476a9a4
GM
10099{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_objc_exceptions" >&5
10100$as_echo "$emacs_cv_objc_exceptions" >&6; }
10101 if test $emacs_cv_objc_exceptions = yes; then
39b3d70b 10102
5476a9a4
GM
10103$as_echo "#define _NATIVE_OBJC_EXCEPTIONS 1" >>confdefs.h
10104
10105 GNU_OBJC_CFLAGS="-fobjc-exceptions"
10106 fi
10107 fi
10108
10109 CFLAGS="$CFLAGS $GNU_OBJC_CFLAGS"
10110
10111 ac_fn_c_check_header_mongrel "$LINENO" "AppKit/AppKit.h" "ac_cv_header_AppKit_AppKit_h" "$ac_includes_default"
10112if test "x$ac_cv_header_AppKit_AppKit_h" = x""yes; then :
10113 HAVE_NS=yes
067d23c9 10114else
5476a9a4
GM
10115 as_fn_error "\`--with-ns' was specified, but the include
10116 files are missing or cannot be compiled." "$LINENO" 5
10117fi
f199cab1 10118
f199cab1 10119
dc67e786 10120
c6ad9bca
GM
10121 macfont_file=""
10122 if test "${NS_IMPL_COCOA}" = "yes"; then
10123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.4 or newer" >&5
10124$as_echo_n "checking for OSX 10.4 or newer... " >&6; }
10125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
dc67e786
GM
10126/* end confdefs.h. */
10127#include <AppKit/AppKit.h>
10128int
10129main ()
10130{
10131
10132#ifdef MAC_OS_X_VERSION_MAX_ALLOWED
10133#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1040
10134 ; /* OK */
10135#else
10136#error "OSX 10.4 or newer required"
10137#endif
10138#endif
10139
10140 ;
10141 return 0;
10142}
10143_ACEOF
10144if ac_fn_c_try_compile "$LINENO"; then :
10145 ns_osx_have_104=yes
10146else
10147 ns_osx_have_104=no
10148fi
10149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c6ad9bca
GM
10150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ns_osx_have_104" >&5
10151$as_echo "$ns_osx_have_104" >&6; }
10152
10153 if test $ns_osx_have_104 = no; then
10154 as_fn_error "\`OSX 10.4 or newer is required'" "$LINENO" 5;
10155 fi
10156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 or newer" >&5
10157$as_echo_n "checking for OSX 10.5 or newer... " >&6; }
10158 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10159/* end confdefs.h. */
10160#include <AppKit/AppKit.h>
10161int
10162main ()
10163{
10164
10165#ifdef MAC_OS_X_VERSION_MAX_ALLOWED
10166#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1050
10167 ; /* OK */
10168#else
10169#error "OSX 10.5 not found"
10170#endif
10171#endif
10172
10173 ;
10174 return 0;
10175}
10176_ACEOF
10177if ac_fn_c_try_compile "$LINENO"; then :
10178 ns_osx_have_105=yes
10179else
10180 ns_osx_have_105=no
10181fi
10182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ns_osx_have_105" >&5
10184$as_echo "$ns_osx_have_105" >&6; }
10185 if test $ns_osx_have_105 = yes; then
10186 macfont_file="macfont.o"
10187 fi
10188 fi
5476a9a4
GM
10189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10190/* end confdefs.h. */
10191#include <Foundation/NSObjCRuntime.h>
067d23c9
KY
10192int
10193main ()
10194{
5476a9a4
GM
10195NSInteger i;
10196 ;
067d23c9
KY
10197 return 0;
10198}
10199_ACEOF
5476a9a4
GM
10200if ac_fn_c_try_compile "$LINENO"; then :
10201 ns_have_nsinteger=yes
067d23c9 10202else
5476a9a4 10203 ns_have_nsinteger=no
067d23c9 10204fi
5476a9a4
GM
10205rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10206 if test $ns_have_nsinteger = yes; then
067d23c9 10207
5476a9a4 10208$as_echo "#define NS_HAVE_NSINTEGER 1" >>confdefs.h
067d23c9 10209
067d23c9 10210 fi
5476a9a4 10211fi
067d23c9 10212
5476a9a4 10213
5c0255d9 10214
5476a9a4
GM
10215INSTALL_ARCH_INDEP_EXTRA=install-etc
10216ns_self_contained=no
5476a9a4
GM
10217NS_OBJ=
10218NS_OBJC_OBJ=
10219if test "${HAVE_NS}" = yes; then
10220 if test "$with_toolkit_scroll_bars" = "no"; then
10221 as_fn_error "Non-toolkit scroll bars are not implemented for Nextstep." "$LINENO" 5
10222 fi
10223
10224 window_system=nextstep
5476a9a4
GM
10225 # set up packaging dirs
10226 if test "${EN_NS_SELF_CONTAINED}" = yes; then
10227 ns_self_contained=yes
10228 prefix=${ns_appresdir}
10229 exec_prefix=${ns_appbindir}
10230 libexecdir="\${ns_appbindir}/libexec"
10231 archlibdir="\${ns_appbindir}/libexec"
7a67e06b 10232 etcdocdir="\${ns_appresdir}/etc"
5476a9a4
GM
10233 etcdir="\${ns_appresdir}/etc"
10234 infodir="\${ns_appresdir}/info"
10235 mandir="\${ns_appresdir}/man"
10236 lispdir="\${ns_appresdir}/lisp"
10237 leimdir="\${ns_appresdir}/leim"
10238 INSTALL_ARCH_INDEP_EXTRA=
10239 fi
c6ad9bca
GM
10240
10241 NS_OBJC_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o $macfont_file"
5476a9a4
GM
10242fi
10243CFLAGS="$tmp_CFLAGS"
10244CPPFLAGS="$tmp_CPPFLAGS"
10245
10246
10247
10248
10249
5c0255d9
GM
10250HAVE_W32=no
10251W32_OBJ=
10252W32_LIBS=
7c61eaab
GM
10253EMACSRES=
10254CLIENTRES=
10255CLIENTW=
b5eb356a 10256W32_RES_LINK=
7c61eaab 10257EMACS_MANIFEST=
68b8ed38 10258UPDATE_MANIFEST=
5c0255d9 10259if test "${with_w32}" != no; then
7c61eaab
GM
10260 case "${opsys}" in
10261 cygwin)
10262 ac_fn_c_check_header_mongrel "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default"
5c0255d9
GM
10263if test "x$ac_cv_header_windows_h" = x""yes; then :
10264 HAVE_W32=yes
10265else
10266 as_fn_error "\`--with-w32' was specified, but windows.h
7c61eaab
GM
10267 cannot be found." "$LINENO" 5
10268fi
10269
10270
10271 ;;
10272 mingw32)
10273 ## Using --with-w32 with MinGW is a no-op, but we allow it.
10274 ;;
10275 *)
10276 as_fn_error "Using w32 with an autotools build is only supported for Cygwin and MinGW32." "$LINENO" 5
10277 ;;
10278 esac
5c0255d9
GM
10279fi
10280
7c61eaab
GM
10281if test "${opsys}" = "mingw32"; then
10282 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Windows API headers are recent enough" >&5
10283$as_echo_n "checking whether Windows API headers are recent enough... " >&6; }
10284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10285/* end confdefs.h. */
10286
10287 #include <windows.h>
10288 #include <usp10.h>
10289int
10290main ()
10291{
20c9c1dc
GM
10292PIMAGE_NT_HEADERS pHeader;
10293 PIMAGE_SECTION_HEADER pSection = IMAGE_FIRST_SECTION(pHeader)
7c61eaab
GM
10294 ;
10295 return 0;
10296}
10297_ACEOF
10298if ac_fn_c_try_compile "$LINENO"; then :
10299 emacs_cv_w32api=yes
10300 HAVE_W32=yes
10301else
10302 emacs_cv_w32api=no
10303fi
10304rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_w32api" >&5
10306$as_echo "$emacs_cv_w32api" >&6; }
10307 if test "${emacs_cv_w32api}" = "no"; then
10308 as_fn_error "the Windows API headers are too old to support this build." "$LINENO" 5
10309 fi
10310fi
5c0255d9 10311
7c61eaab
GM
10312FIRSTFILE_OBJ=
10313NTDIR=
10314LIBS_ECLIENT=
10315LIB_WSOCK32=
10316NTLIB=
10317CM_OBJ="cm.o"
10318XARGS_LIMIT=
10319if test "${HAVE_W32}" = "yes"; then
5c0255d9
GM
10320
10321$as_echo "#define HAVE_NTGUI 1" >>confdefs.h
10322
b5eb356a
GM
10323 if test -n "$ac_tool_prefix"; then
10324 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
10325set dummy ${ac_tool_prefix}windres; ac_word=$2
10326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10327$as_echo_n "checking for $ac_word... " >&6; }
10328if test "${ac_cv_prog_WINDRES+set}" = set; then :
10329 $as_echo_n "(cached) " >&6
10330else
10331 if test -n "$WINDRES"; then
10332 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
10333else
10334as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10335for as_dir in $PATH
10336do
10337 IFS=$as_save_IFS
10338 test -z "$as_dir" && as_dir=.
10339 for ac_exec_ext in '' $ac_executable_extensions; do
10340 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10341 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
10342 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10343 break 2
10344 fi
10345done
10346 done
10347IFS=$as_save_IFS
10348
10349fi
10350fi
10351WINDRES=$ac_cv_prog_WINDRES
10352if test -n "$WINDRES"; then
10353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
10354$as_echo "$WINDRES" >&6; }
10355else
10356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10357$as_echo "no" >&6; }
10358fi
10359
10360
10361fi
10362if test -z "$ac_cv_prog_WINDRES"; then
10363 ac_ct_WINDRES=$WINDRES
10364 # Extract the first word of "windres", so it can be a program name with args.
10365set dummy windres; ac_word=$2
10366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10367$as_echo_n "checking for $ac_word... " >&6; }
10368if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then :
10369 $as_echo_n "(cached) " >&6
10370else
10371 if test -n "$ac_ct_WINDRES"; then
10372 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
10373else
10374as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10375for as_dir in $PATH
10376do
10377 IFS=$as_save_IFS
10378 test -z "$as_dir" && as_dir=.
10379 for ac_exec_ext in '' $ac_executable_extensions; do
10380 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10381 ac_cv_prog_ac_ct_WINDRES="windres"
10382 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10383 break 2
10384 fi
10385done
10386 done
10387IFS=$as_save_IFS
10388
10389fi
10390fi
10391ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
10392if test -n "$ac_ct_WINDRES"; then
10393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
10394$as_echo "$ac_ct_WINDRES" >&6; }
10395else
10396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10397$as_echo "no" >&6; }
10398fi
10399
10400 if test "x$ac_ct_WINDRES" = x; then
10401 WINDRES="as_fn_error "No resource compiler found." "$LINENO" 5"
10402 else
10403 case $cross_compiling:$ac_tool_warned in
10404yes:)
10405{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10406$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10407ac_tool_warned=yes ;;
10408esac
10409 WINDRES=$ac_ct_WINDRES
10410 fi
10411else
10412 WINDRES="$ac_cv_prog_WINDRES"
10413fi
10414
5c0255d9
GM
10415 W32_OBJ="w32fns.o w32menu.o w32reg.o w32font.o w32term.o"
10416 W32_OBJ="$W32_OBJ w32xfns.o w32select.o w32uniscribe.o"
7c61eaab
GM
10417 EMACSRES="emacs.res"
10418 case "$canonical" in
10419 x86_64-*-*) EMACS_MANIFEST="emacs-x64.manifest" ;;
10420 *) EMACS_MANIFEST="emacs-x86.manifest" ;;
10421 esac
68b8ed38 10422 UPDATE_MANIFEST=update-game-score.exe.manifest
7c61eaab
GM
10423 if test "${opsys}" = "cygwin"; then
10424 W32_LIBS="$W32_LIBS -lkernel32 -luser32 -lgdi32 -lole32 -lcomdlg32"
10425 W32_LIBS="$W32_LIBS -lusp10 -lcomctl32 -lwinspool"
10426 # Tell the linker that emacs.res is an object (which we compile from
10427 # the rc file), not a linker script.
10428 W32_RES_LINK="-Wl,emacs.res"
10429 else
10430 W32_OBJ="$W32_OBJ w32.o w32console.o w32heap.o w32inevt.o w32proc.o"
7c61eaab
GM
10431 W32_LIBS="$W32_LIBS -lwinmm -lgdi32 -lcomdlg32"
10432 W32_LIBS="$W32_LIBS -lmpr -lwinspool -lole32 -lcomctl32 -lusp10"
10433 W32_RES_LINK="\$(EMACSRES)"
10434 CLIENTRES="emacsclient.res"
10435 CLIENTW="emacsclientw\$(EXEEXT)"
10436 FIRSTFILE_OBJ=firstfile.o
10437 NTDIR=nt
10438 CM_OBJ=
10439 LIBS_ECLIENT="-lcomctl32"
10440 LIB_WSOCK32="-lwsock32"
10441 NTLIB="ntlib.$ac_objext"
10442 XARGS_LIMIT="-s 10000"
10443 fi
5c0255d9
GM
10444fi
10445
10446
10447
b5eb356a
GM
10448
10449
7c61eaab
GM
10450
10451
10452
10453
10454
10455
10456
10457
10458
10459
68b8ed38 10460
5c0255d9
GM
10461if test "${HAVE_W32}" = "yes"; then
10462 window_system=w32
10463 with_xft=no
10464fi
10465
42dcba54
GM
10466## $window_system is now set to the window system we will
10467## ultimately use.
10468
d04a2836
GM
10469if test "$window_system" = none && test "$gl_gcc_warnings" = yes; then
10470 # Too many warnings for now.
fc4002bd
GM
10471 nw=
10472 nw="$nw -Wsuggest-attribute=const"
10473 nw="$nw -Wsuggest-attribute=noreturn"
10474
10475 gl_warn_set=
10476 set x $WARN_CFLAGS; shift
10477 for gl_warn_item
10478 do
10479 case " $nw " in
10480 *" $gl_warn_item "*)
10481 ;;
10482 *)
10483 gl_warn_set="$gl_warn_set $gl_warn_item"
10484 ;;
10485 esac
10486 done
10487 WARN_CFLAGS=$gl_warn_set
10488
10489
d04a2836
GM
10490
10491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-variable" >&5
10492$as_echo_n "checking whether C compiler handles -Wno-unused-variable... " >&6; }
10493if test "${gl_cv_warn_c__Wno_unused_variable+set}" = set; then :
10494 $as_echo_n "(cached) " >&6
10495else
10496
10497 gl_save_compiler_FLAGS="$CFLAGS"
10498 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wunused-variable"
10499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10500/* end confdefs.h. */
10501
10502int
10503main ()
10504{
10505
10506 ;
10507 return 0;
10508}
10509_ACEOF
ec165e83 10510if ac_fn_c_try_link "$LINENO"; then :
d04a2836
GM
10511 gl_cv_warn_c__Wno_unused_variable=yes
10512else
10513 gl_cv_warn_c__Wno_unused_variable=no
10514fi
ec165e83
GM
10515rm -f core conftest.err conftest.$ac_objext \
10516 conftest$ac_exeext conftest.$ac_ext
d04a2836
GM
10517 CFLAGS="$gl_save_compiler_FLAGS"
10518
10519fi
10520{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_variable" >&5
10521$as_echo "$gl_cv_warn_c__Wno_unused_variable" >&6; }
10522if test "x$gl_cv_warn_c__Wno_unused_variable" = x""yes; then :
10523 as_fn_append WARN_CFLAGS " -Wno-unused-variable"
10524fi
10525
10526
10527
10528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-but-set-variable" >&5
10529$as_echo_n "checking whether C compiler handles -Wno-unused-but-set-variable... " >&6; }
10530if test "${gl_cv_warn_c__Wno_unused_but_set_variable+set}" = set; then :
10531 $as_echo_n "(cached) " >&6
10532else
10533
10534 gl_save_compiler_FLAGS="$CFLAGS"
10535 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wunused-but-set-variable"
10536 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10537/* end confdefs.h. */
10538
10539int
10540main ()
10541{
10542
10543 ;
10544 return 0;
10545}
10546_ACEOF
ec165e83 10547if ac_fn_c_try_link "$LINENO"; then :
d04a2836
GM
10548 gl_cv_warn_c__Wno_unused_but_set_variable=yes
10549else
10550 gl_cv_warn_c__Wno_unused_but_set_variable=no
10551fi
ec165e83
GM
10552rm -f core conftest.err conftest.$ac_objext \
10553 conftest$ac_exeext conftest.$ac_ext
d04a2836
GM
10554 CFLAGS="$gl_save_compiler_FLAGS"
10555
10556fi
10557{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_but_set_variable" >&5
10558$as_echo "$gl_cv_warn_c__Wno_unused_but_set_variable" >&6; }
10559if test "x$gl_cv_warn_c__Wno_unused_but_set_variable" = x""yes; then :
10560 as_fn_append WARN_CFLAGS " -Wno-unused-but-set-variable"
10561fi
10562
10563
10564
10565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-but-set-parameter" >&5
10566$as_echo_n "checking whether C compiler handles -Wno-unused-but-set-parameter... " >&6; }
10567if test "${gl_cv_warn_c__Wno_unused_but_set_parameter+set}" = set; then :
10568 $as_echo_n "(cached) " >&6
10569else
10570
10571 gl_save_compiler_FLAGS="$CFLAGS"
10572 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wunused-but-set-parameter"
10573 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10574/* end confdefs.h. */
10575
10576int
10577main ()
10578{
10579
10580 ;
10581 return 0;
10582}
10583_ACEOF
ec165e83 10584if ac_fn_c_try_link "$LINENO"; then :
d04a2836
GM
10585 gl_cv_warn_c__Wno_unused_but_set_parameter=yes
10586else
10587 gl_cv_warn_c__Wno_unused_but_set_parameter=no
10588fi
ec165e83
GM
10589rm -f core conftest.err conftest.$ac_objext \
10590 conftest$ac_exeext conftest.$ac_ext
d04a2836
GM
10591 CFLAGS="$gl_save_compiler_FLAGS"
10592
10593fi
10594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_but_set_parameter" >&5
10595$as_echo "$gl_cv_warn_c__Wno_unused_but_set_parameter" >&6; }
10596if test "x$gl_cv_warn_c__Wno_unused_but_set_parameter" = x""yes; then :
10597 as_fn_append WARN_CFLAGS " -Wno-unused-but-set-parameter"
10598fi
10599
10600
10601fi
10602
42dcba54
GM
10603term_header=
10604HAVE_X_WINDOWS=no
10605HAVE_X11=no
10606USE_X_TOOLKIT=none
10607
5476a9a4
GM
10608case "${window_system}" in
10609 x11 )
10610 HAVE_X_WINDOWS=yes
10611 HAVE_X11=yes
42dcba54 10612 term_header=xterm.h
5476a9a4
GM
10613 case "${with_x_toolkit}" in
10614 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
10615 motif ) USE_X_TOOLKIT=MOTIF ;;
10616 gtk ) with_gtk=yes
42dcba54 10617 term_header=gtkutil.h
5476a9a4 10618 USE_X_TOOLKIT=none ;;
4fa92495
GM
10619 gtk2 ) with_gtk2=yes
10620 term_header=gtkutil.h
10621 USE_X_TOOLKIT=none ;;
5476a9a4 10622 gtk3 ) with_gtk3=yes
42dcba54 10623 term_header=gtkutil.h
5476a9a4
GM
10624 USE_X_TOOLKIT=none ;;
10625 no ) USE_X_TOOLKIT=none ;;
10626 * ) USE_X_TOOLKIT=maybe ;;
10627 esac
10628 ;;
42dcba54
GM
10629 nextstep )
10630 term_header=nsterm.h
5476a9a4 10631 ;;
5c0255d9
GM
10632 w32 )
10633 term_header=w32term.h
10634 ;;
5476a9a4
GM
10635esac
10636
10637if test "$window_system" = none && test "X$with_x" != "Xno"; then
10638 # Extract the first word of "X", so it can be a program name with args.
10639set dummy X; ac_word=$2
10640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10641$as_echo_n "checking for $ac_word... " >&6; }
10642if test "${ac_cv_prog_HAVE_XSERVER+set}" = set; then :
10643 $as_echo_n "(cached) " >&6
10644else
10645 if test -n "$HAVE_XSERVER"; then
10646 ac_cv_prog_HAVE_XSERVER="$HAVE_XSERVER" # Let the user override the test.
10647else
10648as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10649for as_dir in $PATH
10650do
10651 IFS=$as_save_IFS
10652 test -z "$as_dir" && as_dir=.
10653 for ac_exec_ext in '' $ac_executable_extensions; do
10654 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10655 ac_cv_prog_HAVE_XSERVER="true"
10656 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10657 break 2
10658 fi
10659done
10660 done
10661IFS=$as_save_IFS
10662
10663 test -z "$ac_cv_prog_HAVE_XSERVER" && ac_cv_prog_HAVE_XSERVER="false"
10664fi
10665fi
10666HAVE_XSERVER=$ac_cv_prog_HAVE_XSERVER
10667if test -n "$HAVE_XSERVER"; then
10668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_XSERVER" >&5
10669$as_echo "$HAVE_XSERVER" >&6; }
10670else
10671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10672$as_echo "no" >&6; }
10673fi
10674
10675
10676 if test "$HAVE_XSERVER" = true ||
10677 test -n "$DISPLAY" ||
10678 test "`echo /usr/lib/libX11.*`" != "/usr/lib/libX11.*"; then
10679 as_fn_error "You seem to be running X, but no X development libraries
10680were found. You should install the relevant development files for X
10681and for the toolkit you want, such as Gtk+, Lesstif or Motif. Also make
10682sure you have development files for image handling, i.e.
10683tiff, gif, jpeg, png and xpm.
10684If you are sure you want Emacs compiled without X window support, pass
10685 --without-x
10686to configure." "$LINENO" 5
10687 fi
10688fi
10689
10690### If we're using X11, we should use the X menu package.
10691HAVE_MENUS=no
10692case ${HAVE_X11} in
10693 yes ) HAVE_MENUS=yes ;;
10694esac
10695
10696# Does the opsystem file prohibit the use of the GNU malloc?
10697# Assume not, until told otherwise.
10698GNU_MALLOC=yes
10699
10700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc is Doug Lea style" >&5
10701$as_echo_n "checking whether malloc is Doug Lea style... " >&6; }
10702if test "${emacs_cv_var_doug_lea_malloc+set}" = set; then :
067d23c9
KY
10703 $as_echo_n "(cached) " >&6
10704else
5476a9a4
GM
10705 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10706/* end confdefs.h. */
10707#include <malloc.h>
10708 static void hook (void) {}
10709int
10710main ()
10711{
10712malloc_set_state (malloc_get_state ());
10713 __after_morecore_hook = hook;
10714 __malloc_initialize_hook = hook;
10715 ;
10716 return 0;
10717}
10718_ACEOF
10719if ac_fn_c_try_link "$LINENO"; then :
10720 emacs_cv_var_doug_lea_malloc=yes
10721else
10722 emacs_cv_var_doug_lea_malloc=no
10723fi
10724rm -f core conftest.err conftest.$ac_objext \
10725 conftest$ac_exeext conftest.$ac_ext
10726fi
10727{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_var_doug_lea_malloc" >&5
10728$as_echo "$emacs_cv_var_doug_lea_malloc" >&6; }
10729doug_lea_malloc=$emacs_cv_var_doug_lea_malloc
10730
10731
10732system_malloc=no
10733case "$opsys" in
10734 ## darwin ld insists on the use of malloc routines in the System framework.
10735 darwin|sol2-10) system_malloc=yes ;;
10736esac
10737
10738if test "${system_malloc}" = "yes"; then
10739
10740$as_echo "#define SYSTEM_MALLOC 1" >>confdefs.h
10741
10742 GNU_MALLOC=no
10743 GNU_MALLOC_reason="
10744 (The GNU allocators don't work with this system configuration.)"
10745 GMALLOC_OBJ=
10746 VMLIMIT_OBJ=
10747else
10748 test "$doug_lea_malloc" != "yes" && GMALLOC_OBJ=gmalloc.o
10749 VMLIMIT_OBJ=vm-limit.o
ce9ae7ca
GM
10750
10751 for ac_header in sys/vlimit.h
10752do :
10753 ac_fn_c_check_header_mongrel "$LINENO" "sys/vlimit.h" "ac_cv_header_sys_vlimit_h" "$ac_includes_default"
10754if test "x$ac_cv_header_sys_vlimit_h" = x""yes; then :
10755 cat >>confdefs.h <<_ACEOF
10756#define HAVE_SYS_VLIMIT_H 1
10757_ACEOF
10758
10759fi
10760
10761done
10762
10763 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for data_start" >&5
10764$as_echo_n "checking for data_start... " >&6; }
10765if test "${emacs_cv_data_start+set}" = set; then :
10766 $as_echo_n "(cached) " >&6
10767else
10768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10769/* end confdefs.h. */
10770extern char data_start[]; char ch;
10771int
10772main ()
10773{
71e41a46 10774return data_start < &ch;
ce9ae7ca
GM
10775 ;
10776 return 0;
10777}
10778_ACEOF
10779if ac_fn_c_try_link "$LINENO"; then :
10780 emacs_cv_data_start=yes
10781else
10782 emacs_cv_data_start=no
10783fi
10784rm -f core conftest.err conftest.$ac_objext \
10785 conftest$ac_exeext conftest.$ac_ext
10786fi
10787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_data_start" >&5
10788$as_echo "$emacs_cv_data_start" >&6; }
10789 if test $emacs_cv_data_start = yes; then
10790
10791$as_echo "#define HAVE_DATA_START 1" >>confdefs.h
10792
10793 fi
5476a9a4
GM
10794fi
10795
10796
10797
10798if test "$doug_lea_malloc" = "yes" ; then
10799 if test "$GNU_MALLOC" = yes ; then
10800 GNU_MALLOC_reason="
10801 (Using Doug Lea's new malloc from the GNU C Library.)"
10802 fi
10803
10804$as_echo "#define DOUG_LEA_MALLOC 1" >>confdefs.h
10805
10806
10807 ## Use mmap directly for allocating larger buffers.
10808 ## FIXME this comes from src/s/{gnu,gnu-linux}.h:
10809 ## #ifdef DOUG_LEA_MALLOC; #undef REL_ALLOC; #endif
10810 ## Does the AC_FUNC_MMAP test below make this check unnecessary?
10811 case "$opsys" in
10812 gnu*) REL_ALLOC=no ;;
10813 esac
10814fi
10815
10816if test x"${REL_ALLOC}" = x; then
10817 REL_ALLOC=${GNU_MALLOC}
10818fi
10819
10820use_mmap_for_buffers=no
10821case "$opsys" in
10822 cygwin|freebsd|irix6-5) use_mmap_for_buffers=yes ;;
10823esac
10824
10825
10826
10827
10828
10829
10830
10831
10832for ac_func in getpagesize
10833do :
10834 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
10835if test "x$ac_cv_func_getpagesize" = x""yes; then :
10836 cat >>confdefs.h <<_ACEOF
10837#define HAVE_GETPAGESIZE 1
10838_ACEOF
10839
10840fi
10841done
10842
10843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
10844$as_echo_n "checking for working mmap... " >&6; }
10845if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
10846 $as_echo_n "(cached) " >&6
10847else
10848 if test "$cross_compiling" = yes; then :
10849 ac_cv_func_mmap_fixed_mapped=no
10850else
10851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10852/* end confdefs.h. */
10853$ac_includes_default
10854/* malloc might have been renamed as rpl_malloc. */
10855#undef malloc
10856
10857/* Thanks to Mike Haertel and Jim Avera for this test.
10858 Here is a matrix of mmap possibilities:
10859 mmap private not fixed
10860 mmap private fixed at somewhere currently unmapped
10861 mmap private fixed at somewhere already mapped
10862 mmap shared not fixed
10863 mmap shared fixed at somewhere currently unmapped
10864 mmap shared fixed at somewhere already mapped
10865 For private mappings, we should verify that changes cannot be read()
10866 back from the file, nor mmap's back from the file at a different
10867 address. (There have been systems where private was not correctly
10868 implemented like the infamous i386 svr4.0, and systems where the
10869 VM page cache was not coherent with the file system buffer cache
10870 like early versions of FreeBSD and possibly contemporary NetBSD.)
10871 For shared mappings, we should conversely verify that changes get
10872 propagated back to all the places they're supposed to be.
10873
10874 Grep wants private fixed already mapped.
10875 The main things grep needs to know about mmap are:
10876 * does it exist and is it safe to write into the mmap'd area
10877 * how to use it (BSD variants) */
10878
10879#include <fcntl.h>
10880#include <sys/mman.h>
10881
10882#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
10883char *malloc ();
10884#endif
10885
10886/* This mess was copied from the GNU getpagesize.h. */
10887#ifndef HAVE_GETPAGESIZE
10888# ifdef _SC_PAGESIZE
10889# define getpagesize() sysconf(_SC_PAGESIZE)
10890# else /* no _SC_PAGESIZE */
10891# ifdef HAVE_SYS_PARAM_H
10892# include <sys/param.h>
10893# ifdef EXEC_PAGESIZE
10894# define getpagesize() EXEC_PAGESIZE
10895# else /* no EXEC_PAGESIZE */
10896# ifdef NBPG
10897# define getpagesize() NBPG * CLSIZE
10898# ifndef CLSIZE
10899# define CLSIZE 1
10900# endif /* no CLSIZE */
10901# else /* no NBPG */
10902# ifdef NBPC
10903# define getpagesize() NBPC
10904# else /* no NBPC */
10905# ifdef PAGESIZE
10906# define getpagesize() PAGESIZE
10907# endif /* PAGESIZE */
10908# endif /* no NBPC */
10909# endif /* no NBPG */
10910# endif /* no EXEC_PAGESIZE */
10911# else /* no HAVE_SYS_PARAM_H */
10912# define getpagesize() 8192 /* punt totally */
10913# endif /* no HAVE_SYS_PARAM_H */
10914# endif /* no _SC_PAGESIZE */
10915
10916#endif /* no HAVE_GETPAGESIZE */
10917
10918int
10919main ()
10920{
10921 char *data, *data2, *data3;
10922 const char *cdata2;
10923 int i, pagesize;
10924 int fd, fd2;
10925
10926 pagesize = getpagesize ();
10927
10928 /* First, make a file with some known garbage in it. */
10929 data = (char *) malloc (pagesize);
10930 if (!data)
10931 return 1;
10932 for (i = 0; i < pagesize; ++i)
10933 *(data + i) = rand ();
10934 umask (0);
10935 fd = creat ("conftest.mmap", 0600);
10936 if (fd < 0)
10937 return 2;
10938 if (write (fd, data, pagesize) != pagesize)
10939 return 3;
10940 close (fd);
10941
10942 /* Next, check that the tail of a page is zero-filled. File must have
10943 non-zero length, otherwise we risk SIGBUS for entire page. */
10944 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
10945 if (fd2 < 0)
10946 return 4;
10947 cdata2 = "";
10948 if (write (fd2, cdata2, 1) != 1)
10949 return 5;
10950 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
10951 if (data2 == MAP_FAILED)
10952 return 6;
10953 for (i = 0; i < pagesize; ++i)
10954 if (*(data2 + i))
10955 return 7;
10956 close (fd2);
10957 if (munmap (data2, pagesize))
10958 return 8;
10959
10960 /* Next, try to mmap the file at a fixed address which already has
10961 something else allocated at it. If we can, also make sure that
10962 we see the same garbage. */
10963 fd = open ("conftest.mmap", O_RDWR);
10964 if (fd < 0)
10965 return 9;
10966 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
10967 MAP_PRIVATE | MAP_FIXED, fd, 0L))
10968 return 10;
10969 for (i = 0; i < pagesize; ++i)
10970 if (*(data + i) != *(data2 + i))
10971 return 11;
10972
10973 /* Finally, make sure that changes to the mapped area do not
10974 percolate back to the file as seen by read(). (This is a bug on
10975 some variants of i386 svr4.0.) */
10976 for (i = 0; i < pagesize; ++i)
10977 *(data2 + i) = *(data2 + i) + 1;
10978 data3 = (char *) malloc (pagesize);
10979 if (!data3)
10980 return 12;
10981 if (read (fd, data3, pagesize) != pagesize)
10982 return 13;
10983 for (i = 0; i < pagesize; ++i)
10984 if (*(data + i) != *(data3 + i))
10985 return 14;
10986 close (fd);
10987 return 0;
10988}
10989_ACEOF
10990if ac_fn_c_try_run "$LINENO"; then :
10991 ac_cv_func_mmap_fixed_mapped=yes
10992else
10993 ac_cv_func_mmap_fixed_mapped=no
10994fi
10995rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10996 conftest.$ac_objext conftest.beam conftest.$ac_ext
10997fi
10998
10999fi
11000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
11001$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
11002if test $ac_cv_func_mmap_fixed_mapped = yes; then
11003
11004$as_echo "#define HAVE_MMAP 1" >>confdefs.h
11005
11006fi
11007rm -f conftest.mmap conftest.txt
11008
11009if test $use_mmap_for_buffers = yes; then
f199cab1 11010
5476a9a4
GM
11011$as_echo "#define USE_MMAP_FOR_BUFFERS 1" >>confdefs.h
11012
11013 REL_ALLOC=no
11014fi
11015
11016LIBS="$LIBS_SYSTEM $LIBS"
11017
11018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
11019$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
11020if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then :
11021 $as_echo_n "(cached) " >&6
067d23c9 11022else
5476a9a4
GM
11023 ac_check_lib_save_LIBS=$LIBS
11024LIBS="-ldnet $LIBS"
11025cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 11026/* end confdefs.h. */
067d23c9 11027
5476a9a4
GM
11028/* Override any GCC internal prototype to avoid an error.
11029 Use char because int might match the return type of a GCC
11030 builtin and then its argument prototype would still apply. */
11031#ifdef __cplusplus
11032extern "C"
11033#endif
11034char dnet_ntoa ();
11035int
11036main ()
f199cab1 11037{
5476a9a4
GM
11038return dnet_ntoa ();
11039 ;
11040 return 0;
f199cab1 11041}
5476a9a4
GM
11042_ACEOF
11043if ac_fn_c_try_link "$LINENO"; then :
11044 ac_cv_lib_dnet_dnet_ntoa=yes
11045else
11046 ac_cv_lib_dnet_dnet_ntoa=no
11047fi
11048rm -f core conftest.err conftest.$ac_objext \
11049 conftest$ac_exeext conftest.$ac_ext
11050LIBS=$ac_check_lib_save_LIBS
11051fi
11052{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
11053$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
11054if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then :
11055 cat >>confdefs.h <<_ACEOF
11056#define HAVE_LIBDNET 1
11057_ACEOF
11058
11059 LIBS="-ldnet $LIBS"
11060
11061fi
11062
11063
11064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lXbsd" >&5
11065$as_echo_n "checking for main in -lXbsd... " >&6; }
11066if test "${ac_cv_lib_Xbsd_main+set}" = set; then :
11067 $as_echo_n "(cached) " >&6
11068else
11069 ac_check_lib_save_LIBS=$LIBS
11070LIBS="-lXbsd $LIBS"
11071cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11072/* end confdefs.h. */
11073
11074
11075int
11076main ()
f199cab1 11077{
5476a9a4
GM
11078return main ();
11079 ;
11080 return 0;
f199cab1 11081}
5476a9a4
GM
11082_ACEOF
11083if ac_fn_c_try_link "$LINENO"; then :
11084 ac_cv_lib_Xbsd_main=yes
11085else
11086 ac_cv_lib_Xbsd_main=no
11087fi
11088rm -f core conftest.err conftest.$ac_objext \
11089 conftest$ac_exeext conftest.$ac_ext
11090LIBS=$ac_check_lib_save_LIBS
11091fi
11092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xbsd_main" >&5
11093$as_echo "$ac_cv_lib_Xbsd_main" >&6; }
11094if test "x$ac_cv_lib_Xbsd_main" = x""yes; then :
11095 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
11096fi
11097
11098
11099LIB_PTHREAD=
11100
11101
11102
11103if test "$ac_cv_header_pthread_h"; then
11104 if test "$GMALLOC_OBJ" = gmalloc.o; then
11105 emacs_pthread_function=pthread_atfork
11106 else
11107 emacs_pthread_function=pthread_self
11108 fi
11109 as_ac_Lib=`$as_echo "ac_cv_lib_pthread_$emacs_pthread_function" | $as_tr_sh`
11110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $emacs_pthread_function in -lpthread" >&5
11111$as_echo_n "checking for $emacs_pthread_function in -lpthread... " >&6; }
11112if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
11113 $as_echo_n "(cached) " >&6
11114else
11115 ac_check_lib_save_LIBS=$LIBS
11116LIBS="-lpthread $LIBS"
11117cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11118/* end confdefs.h. */
11119
11120/* Override any GCC internal prototype to avoid an error.
11121 Use char because int might match the return type of a GCC
11122 builtin and then its argument prototype would still apply. */
11123#ifdef __cplusplus
11124extern "C"
11125#endif
11126char $emacs_pthread_function ();
11127int
11128main ()
f199cab1 11129{
5476a9a4
GM
11130return $emacs_pthread_function ();
11131 ;
11132 return 0;
f199cab1 11133}
5476a9a4
GM
11134_ACEOF
11135if ac_fn_c_try_link "$LINENO"; then :
11136 eval "$as_ac_Lib=yes"
11137else
11138 eval "$as_ac_Lib=no"
11139fi
11140rm -f core conftest.err conftest.$ac_objext \
11141 conftest$ac_exeext conftest.$ac_ext
11142LIBS=$ac_check_lib_save_LIBS
11143fi
11144eval ac_res=\$$as_ac_Lib
11145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11146$as_echo "$ac_res" >&6; }
11147eval as_val=\$$as_ac_Lib
11148 if test "x$as_val" = x""yes; then :
11149 HAVE_PTHREAD=yes
11150fi
11151
11152fi
11153if test "$HAVE_PTHREAD" = yes; then
11154 case "${canonical}" in
11155 *-hpux*) ;;
11156 *) LIB_PTHREAD="-lpthread"
11157 LIBS="$LIB_PTHREAD $LIBS" ;;
11158 esac
11159
11160$as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
11161
11162fi
11163
11164
11165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cma_open in -lpthreads" >&5
11166$as_echo_n "checking for cma_open in -lpthreads... " >&6; }
11167if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then :
11168 $as_echo_n "(cached) " >&6
11169else
11170 ac_check_lib_save_LIBS=$LIBS
11171LIBS="-lpthreads $LIBS"
11172cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11173/* end confdefs.h. */
11174
11175/* Override any GCC internal prototype to avoid an error.
11176 Use char because int might match the return type of a GCC
11177 builtin and then its argument prototype would still apply. */
11178#ifdef __cplusplus
11179extern "C"
f199cab1 11180#endif
5476a9a4
GM
11181char cma_open ();
11182int
11183main ()
11184{
11185return cma_open ();
11186 ;
11187 return 0;
f199cab1 11188}
5476a9a4
GM
11189_ACEOF
11190if ac_fn_c_try_link "$LINENO"; then :
11191 ac_cv_lib_pthreads_cma_open=yes
11192else
11193 ac_cv_lib_pthreads_cma_open=no
11194fi
11195rm -f core conftest.err conftest.$ac_objext \
11196 conftest$ac_exeext conftest.$ac_ext
11197LIBS=$ac_check_lib_save_LIBS
11198fi
11199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_cma_open" >&5
11200$as_echo "$ac_cv_lib_pthreads_cma_open" >&6; }
11201if test "x$ac_cv_lib_pthreads_cma_open" = x""yes; then :
11202 cat >>confdefs.h <<_ACEOF
11203#define HAVE_LIBPTHREADS 1
11204_ACEOF
11205
11206 LIBS="-lpthreads $LIBS"
11207
11208fi
11209
11210
11211## Note: when using cpp in s/aix4.2.h, this definition depended on
11212## HAVE_LIBPTHREADS. That was not defined earlier in configure when
11213## the system file was sourced. Hence the value of LIBS_SYSTEM
11214## added to LIBS in configure would never contain the pthreads part,
11215## but the value used in Makefiles might. FIXME?
11216##
11217## -lpthreads seems to be necessary for Xlib in X11R6, and should
11218## be harmless on older versions of X where it happens to exist.
11219test "$opsys" = "aix4-2" && \
11220 test $ac_cv_lib_pthreads_cma_open = yes && \
11221 LIBS_SYSTEM="$LIBS_SYSTEM -lpthreads"
11222
11223
11224case ${host_os} in
11225aix*)
11226 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
11227$as_echo_n "checking for -bbigtoc option... " >&6; }
11228if test "${gdb_cv_bigtoc+set}" = set; then :
11229 $as_echo_n "(cached) " >&6
11230else
11231
11232 case $GCC in
11233 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
11234 *) gdb_cv_bigtoc=-bbigtoc ;;
11235 esac
067d23c9 11236
5476a9a4
GM
11237 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
11238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11239/* end confdefs.h. */
067d23c9
KY
11240
11241int
11242main ()
11243{
5476a9a4
GM
11244int i;
11245 ;
11246 return 0;
11247}
11248_ACEOF
11249if ac_fn_c_try_link "$LINENO"; then :
067d23c9 11250
5476a9a4
GM
11251else
11252 gdb_cv_bigtoc=
11253fi
11254rm -f core conftest.err conftest.$ac_objext \
11255 conftest$ac_exeext conftest.$ac_ext
067d23c9 11256
5476a9a4
GM
11257fi
11258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
11259$as_echo "$gdb_cv_bigtoc" >&6; }
11260 ;;
11261esac
067d23c9 11262
5476a9a4
GM
11263# Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets
11264# used for the tests that follow. We set them back to REAL_CFLAGS and
11265# REAL_CPPFLAGS later on.
067d23c9 11266
5476a9a4
GM
11267REAL_CFLAGS="$CFLAGS"
11268REAL_CPPFLAGS="$CPPFLAGS"
11269
11270if test "${HAVE_X11}" = "yes"; then
11271 DEFS="$C_SWITCH_X_SITE $DEFS"
11272 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
11273 LIBS="-lX11 $LIBS"
11274 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
11275 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
11276
11277 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
11278 # This is handled by LD_SWITCH_X_SITE_RPATH during the real build,
11279 # but it's more convenient here to set LD_RUN_PATH since this
11280 # also works on hosts that don't understand LD_SWITCH_X_SITE_RPATH.
11281 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
11282 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
11283 export LD_RUN_PATH
11284 fi
11285
11286 if test "${opsys}" = "gnu-linux"; then
11287 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether X on GNU/Linux needs -b to link" >&5
11288$as_echo_n "checking whether X on GNU/Linux needs -b to link... " >&6; }
11289 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11290/* end confdefs.h. */
067d23c9 11291
5476a9a4
GM
11292int
11293main ()
11294{
11295XOpenDisplay ("foo");
f199cab1 11296 ;
067d23c9
KY
11297 return 0;
11298}
11299_ACEOF
5476a9a4
GM
11300if ac_fn_c_try_link "$LINENO"; then :
11301 xgnu_linux_first_failure=no
067d23c9 11302else
5476a9a4 11303 xgnu_linux_first_failure=yes
067d23c9 11304fi
5476a9a4
GM
11305rm -f core conftest.err conftest.$ac_objext \
11306 conftest$ac_exeext conftest.$ac_ext
11307 if test "${xgnu_linux_first_failure}" = "yes"; then
11308 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
11309 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
11310 OLD_CPPFLAGS="$CPPFLAGS"
11311 OLD_LIBS="$LIBS"
11312 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
11313 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
11314 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
11315 LIBS="$LIBS -b i486-linuxaout"
11316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11317/* end confdefs.h. */
067d23c9 11318
5476a9a4
GM
11319int
11320main ()
11321{
11322XOpenDisplay ("foo");
11323 ;
11324 return 0;
11325}
11326_ACEOF
11327if ac_fn_c_try_link "$LINENO"; then :
11328 xgnu_linux_second_failure=no
11329else
11330 xgnu_linux_second_failure=yes
067d23c9 11331fi
5476a9a4
GM
11332rm -f core conftest.err conftest.$ac_objext \
11333 conftest$ac_exeext conftest.$ac_ext
11334 if test "${xgnu_linux_second_failure}" = "yes"; then
11335 # If we get the same failure with -b, there is no use adding -b.
11336 # So take it out. This plays safe.
11337 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
11338 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
11339 CPPFLAGS="$OLD_CPPFLAGS"
11340 LIBS="$OLD_LIBS"
11341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11342$as_echo "no" >&6; }
11343 else
11344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11345$as_echo "yes" >&6; }
11346 fi
0eb4e0df 11347 else
5476a9a4
GM
11348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11349$as_echo "no" >&6; }
11350 fi
11351 fi
0eb4e0df 11352
5476a9a4
GM
11353 # Reportedly, some broken Solaris systems have XKBlib.h but are missing
11354 # header files included from there.
11355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Xkb" >&5
11356$as_echo_n "checking for Xkb... " >&6; }
0eb4e0df
GM
11357 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11358/* end confdefs.h. */
5476a9a4
GM
11359#include <X11/Xlib.h>
11360#include <X11/XKBlib.h>
0eb4e0df
GM
11361int
11362main ()
11363{
5476a9a4 11364XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);
0eb4e0df
GM
11365 ;
11366 return 0;
11367}
11368_ACEOF
5476a9a4
GM
11369if ac_fn_c_try_link "$LINENO"; then :
11370 emacs_xkb=yes
0eb4e0df 11371else
5476a9a4 11372 emacs_xkb=no
0eb4e0df 11373fi
5476a9a4
GM
11374rm -f core conftest.err conftest.$ac_objext \
11375 conftest$ac_exeext conftest.$ac_ext
11376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_xkb" >&5
11377$as_echo "$emacs_xkb" >&6; }
11378 if test $emacs_xkb = yes; then
1abfdc54 11379
f46ba47d
GM
11380$as_echo "#define HAVE_XKB 1" >>confdefs.h
11381
e1fefc61 11382 fi
1abfdc54 11383
5476a9a4
GM
11384 for ac_func in XrmSetDatabase XScreenResourceString \
11385XScreenNumberOfScreen
11386do :
11387 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11388ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11389eval as_val=\$$as_ac_var
11390 if test "x$as_val" = x""yes; then :
11391 cat >>confdefs.h <<_ACEOF
11392#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
f199cab1 11393_ACEOF
1abfdc54 11394
5476a9a4
GM
11395fi
11396done
1abfdc54 11397
5476a9a4 11398fi
1abfdc54 11399
5476a9a4
GM
11400if test "${window_system}" = "x11"; then
11401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 version 6" >&5
11402$as_echo_n "checking X11 version 6... " >&6; }
11403 if test "${emacs_cv_x11_version_6+set}" = set; then :
067d23c9
KY
11404 $as_echo_n "(cached) " >&6
11405else
5476a9a4 11406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 11407/* end confdefs.h. */
5476a9a4 11408#include <X11/Xlib.h>
067d23c9
KY
11409int
11410main ()
11411{
5476a9a4
GM
11412#if XlibSpecificationRelease < 6
11413fail;
11414#endif
11415
067d23c9
KY
11416 ;
11417 return 0;
11418}
11419_ACEOF
5476a9a4
GM
11420if ac_fn_c_try_link "$LINENO"; then :
11421 emacs_cv_x11_version_6=yes
11422else
11423 emacs_cv_x11_version_6=no
11424fi
11425rm -f core conftest.err conftest.$ac_objext \
11426 conftest$ac_exeext conftest.$ac_ext
067d23c9 11427fi
f199cab1 11428
5476a9a4
GM
11429 if test $emacs_cv_x11_version_6 = yes; then
11430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5
11431$as_echo "6 or newer" >&6; }
f199cab1 11432
5476a9a4 11433$as_echo "#define HAVE_X11R6 1" >>confdefs.h
f199cab1
GM
11434
11435
5476a9a4 11436$as_echo "#define HAVE_X_I18N 1" >>confdefs.h
f199cab1 11437
5476a9a4
GM
11438 ## inoue@ainet.or.jp says Solaris has a bug related to X11R6-style
11439 ## XIM support.
11440 case "$opsys" in
11441 sol2-*) : ;;
11442 *)
11443$as_echo "#define HAVE_X11R6_XIM 1" >>confdefs.h
f199cab1 11444
5476a9a4
GM
11445 ;;
11446 esac
11447 else
11448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5
11449$as_echo "before 6" >&6; }
11450 fi
11451fi
f199cab1 11452
067d23c9 11453
5476a9a4
GM
11454### Use -lrsvg-2 if available, unless `--with-rsvg=no' is specified.
11455HAVE_RSVG=no
7c61eaab 11456if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes" || test "${opsys}" = "mingw32"; then
5476a9a4
GM
11457 if test "${with_rsvg}" != "no"; then
11458 RSVG_REQUIRED=2.11.0
11459 RSVG_MODULE="librsvg-2.0 >= $RSVG_REQUIRED"
067d23c9 11460
f199cab1 11461
5476a9a4 11462 succeeded=no
067d23c9 11463
5476a9a4
GM
11464 if test "$PKG_CONFIG" = "no" ; then
11465 :
11466 else
11467 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 11468 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
11469 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $RSVG_MODULE" >&5
11470$as_echo_n "checking for $RSVG_MODULE... " >&6; }
f199cab1 11471
b5591ebb
GM
11472 if "$PKG_CONFIG" --exists "$RSVG_MODULE" 2>&5 &&
11473 RSVG_CFLAGS=`"$PKG_CONFIG" --cflags "$RSVG_MODULE" 2>&5` &&
11474 RSVG_LIBS=`"$PKG_CONFIG" --libs "$RSVG_MODULE" 2>&5`; then
5476a9a4
GM
11475 edit_cflags="
11476 s,///*,/,g
11477 s/^/ /
11478 s/ -I/ $isystem/g
11479 s/^ //
11480 "
11481 RSVG_CFLAGS=`$as_echo "$RSVG_CFLAGS" | sed -e "$edit_cflags"`
11482 RSVG_LIBS=`$as_echo "$RSVG_LIBS" | sed -e 's,///*,/,g'`
11483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$RSVG_CFLAGS' LIBS='$RSVG_LIBS'" >&5
11484$as_echo "yes CFLAGS='$RSVG_CFLAGS' LIBS='$RSVG_LIBS'" >&6; }
11485 succeeded=yes
11486 else
11487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11488$as_echo "no" >&6; }
11489 RSVG_CFLAGS=""
11490 RSVG_LIBS=""
11491 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
11492 ## do set a variable so people can do so. Do it in a subshell
11493 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 11494 RSVG_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$RSVG_MODULE") 2>&1`
f199cab1 11495
5476a9a4 11496 fi
067d23c9 11497
067d23c9 11498
067d23c9 11499
f199cab1 11500 else
5476a9a4
GM
11501 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11502 echo "*** See http://www.freedesktop.org/software/pkgconfig"
f199cab1 11503 fi
5476a9a4
GM
11504 fi
11505
11506 if test $succeeded = yes; then
11507 HAVE_RSVG=yes
11508 else
11509 :
11510 fi
067d23c9 11511
067d23c9 11512
067d23c9 11513
f199cab1 11514
5476a9a4 11515 if test $HAVE_RSVG = yes; then
f199cab1 11516
5476a9a4
GM
11517$as_echo "#define HAVE_RSVG 1" >>confdefs.h
11518
11519 CFLAGS="$CFLAGS $RSVG_CFLAGS"
11520 LIBS="$RSVG_LIBS $LIBS"
11521 fi
f199cab1 11522 fi
5476a9a4 11523fi
f199cab1 11524
5476a9a4 11525HAVE_IMAGEMAGICK=no
d236c302 11526if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes"; then
5476a9a4
GM
11527 if test "${with_imagemagick}" != "no"; then
11528 ## 6.2.8 is the earliest version known to work, but earlier versions
11529 ## might work - let us know if you find one.
11530 ## 6.0.7 does not work. See bug#7955.
0cb77136
GM
11531 ## 6.8.2 makes Emacs crash; see Bug#13867.
11532 IMAGEMAGICK_MODULE="Wand >= 6.2.8 Wand != 6.8.2"
f199cab1 11533
5476a9a4 11534 succeeded=no
f199cab1 11535
5476a9a4
GM
11536 if test "$PKG_CONFIG" = "no" ; then
11537 :
11538 else
11539 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 11540 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
11541 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $IMAGEMAGICK_MODULE" >&5
11542$as_echo_n "checking for $IMAGEMAGICK_MODULE... " >&6; }
f199cab1 11543
b5591ebb
GM
11544 if "$PKG_CONFIG" --exists "$IMAGEMAGICK_MODULE" 2>&5 &&
11545 IMAGEMAGICK_CFLAGS=`"$PKG_CONFIG" --cflags "$IMAGEMAGICK_MODULE" 2>&5` &&
11546 IMAGEMAGICK_LIBS=`"$PKG_CONFIG" --libs "$IMAGEMAGICK_MODULE" 2>&5`; then
5476a9a4
GM
11547 edit_cflags="
11548 s,///*,/,g
11549 s/^/ /
11550 s/ -I/ $isystem/g
11551 s/^ //
11552 "
11553 IMAGEMAGICK_CFLAGS=`$as_echo "$IMAGEMAGICK_CFLAGS" | sed -e "$edit_cflags"`
11554 IMAGEMAGICK_LIBS=`$as_echo "$IMAGEMAGICK_LIBS" | sed -e 's,///*,/,g'`
11555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$IMAGEMAGICK_CFLAGS' LIBS='$IMAGEMAGICK_LIBS'" >&5
11556$as_echo "yes CFLAGS='$IMAGEMAGICK_CFLAGS' LIBS='$IMAGEMAGICK_LIBS'" >&6; }
11557 succeeded=yes
11558 else
11559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11560$as_echo "no" >&6; }
11561 IMAGEMAGICK_CFLAGS=""
11562 IMAGEMAGICK_LIBS=""
11563 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
11564 ## do set a variable so people can do so. Do it in a subshell
11565 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 11566 IMAGEMAGICK_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$IMAGEMAGICK_MODULE") 2>&1`
f199cab1 11567
5476a9a4 11568 fi
f199cab1 11569
f199cab1 11570
f199cab1 11571
5476a9a4
GM
11572 else
11573 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11574 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11575 fi
f199cab1 11576 fi
5476a9a4
GM
11577
11578 if test $succeeded = yes; then
11579 HAVE_IMAGEMAGICK=yes
f199cab1 11580 else
5476a9a4 11581 :
067d23c9
KY
11582 fi
11583
f199cab1 11584
067d23c9 11585
f199cab1 11586
5476a9a4 11587 if test $HAVE_IMAGEMAGICK = yes; then
067d23c9 11588
5476a9a4 11589$as_echo "#define HAVE_IMAGEMAGICK 1" >>confdefs.h
f199cab1 11590
5476a9a4
GM
11591 CFLAGS="$CFLAGS $IMAGEMAGICK_CFLAGS"
11592 LIBS="$IMAGEMAGICK_LIBS $LIBS"
11593 for ac_func in MagickExportImagePixels MagickMergeImageLayers
11594do :
11595 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11596ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11597eval as_val=\$$as_ac_var
11598 if test "x$as_val" = x""yes; then :
11599 cat >>confdefs.h <<_ACEOF
11600#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
067d23c9 11601_ACEOF
f199cab1
GM
11602
11603fi
5476a9a4
GM
11604done
11605
067d23c9
KY
11606 fi
11607 fi
5476a9a4 11608fi
067d23c9 11609
f199cab1 11610
5476a9a4
GM
11611HAVE_GTK=no
11612GTK_OBJ=
6d89e343 11613gtk_term_header=$term_header
4fa92495
GM
11614check_gtk2=no
11615gtk3_pkg_errors=
7c61eaab
GM
11616if test "${opsys}" != "mingw32"; then
11617 if test "${with_gtk3}" = "yes" || test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "maybe"; then
11618 GLIB_REQUIRED=2.28
11619 GTK_REQUIRED=3.0
11620 GTK_MODULES="gtk+-3.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
f199cab1
GM
11621
11622
5476a9a4 11623 succeeded=no
f199cab1 11624
5476a9a4
GM
11625 if test "$PKG_CONFIG" = "no" ; then
11626 pkg_check_gtk=no
11627 else
11628 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 11629 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
11630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5
11631$as_echo_n "checking for $GTK_MODULES... " >&6; }
f199cab1 11632
b5591ebb
GM
11633 if "$PKG_CONFIG" --exists "$GTK_MODULES" 2>&5 &&
11634 GTK_CFLAGS=`"$PKG_CONFIG" --cflags "$GTK_MODULES" 2>&5` &&
11635 GTK_LIBS=`"$PKG_CONFIG" --libs "$GTK_MODULES" 2>&5`; then
5476a9a4
GM
11636 edit_cflags="
11637 s,///*,/,g
11638 s/^/ /
11639 s/ -I/ $isystem/g
11640 s/^ //
11641 "
11642 GTK_CFLAGS=`$as_echo "$GTK_CFLAGS" | sed -e "$edit_cflags"`
11643 GTK_LIBS=`$as_echo "$GTK_LIBS" | sed -e 's,///*,/,g'`
11644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&5
11645$as_echo "yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&6; }
11646 succeeded=yes
11647 else
11648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11649$as_echo "no" >&6; }
11650 GTK_CFLAGS=""
11651 GTK_LIBS=""
11652 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
11653 ## do set a variable so people can do so. Do it in a subshell
11654 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 11655 GTK_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$GTK_MODULES") 2>&1`
f199cab1 11656
5476a9a4 11657 fi
f199cab1 11658
f199cab1 11659
f199cab1 11660
5476a9a4
GM
11661 else
11662 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11663 echo "*** See http://www.freedesktop.org/software/pkgconfig"
f199cab1 11664 fi
5476a9a4 11665 fi
067d23c9 11666
5476a9a4
GM
11667 if test $succeeded = yes; then
11668 pkg_check_gtk=yes
11669 else
11670 pkg_check_gtk=no
11671 fi
067d23c9 11672
7c61eaab
GM
11673 if test "$pkg_check_gtk" = "no" && test "$with_gtk3" = "yes"; then
11674 as_fn_error "$GTK_PKG_ERRORS" "$LINENO" 5
11675 fi
11676 if test "$pkg_check_gtk" = "yes"; then
067d23c9 11677
5476a9a4 11678$as_echo "#define HAVE_GTK3 1" >>confdefs.h
067d23c9 11679
7c61eaab 11680 GTK_OBJ=emacsgtkfixed.o
6d89e343 11681 gtk_term_header=gtkutil.h
7c61eaab
GM
11682 USE_GTK_TOOLKIT="GTK3"
11683 if test "x$ac_enable_gtk_deprecation_warnings" = x; then
11684 GTK_CFLAGS="$GTK_CFLAGS -DGDK_DISABLE_DEPRECATION_WARNINGS"
c081121f 11685 GTK_CFLAGS="$GTK_CFLAGS -DGLIB_DISABLE_DEPRECATION_WARNINGS"
7c61eaab
GM
11686 fi
11687 else
11688 check_gtk2=yes
11689 gtk3_pkg_errors="$GTK_PKG_ERRORS "
11690 fi
4fa92495 11691 fi
067d23c9 11692
7c61eaab
GM
11693 if test "${with_gtk2}" = "yes" || test "$check_gtk2" = "yes"; then
11694 GLIB_REQUIRED=2.10
11695 GTK_REQUIRED=2.10
11696 GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
f199cab1 11697
5476a9a4
GM
11698
11699 succeeded=no
11700
11701 if test "$PKG_CONFIG" = "no" ; then
11702 pkg_check_gtk=no
11703 else
11704 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 11705 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
11706 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5
11707$as_echo_n "checking for $GTK_MODULES... " >&6; }
11708
b5591ebb
GM
11709 if "$PKG_CONFIG" --exists "$GTK_MODULES" 2>&5 &&
11710 GTK_CFLAGS=`"$PKG_CONFIG" --cflags "$GTK_MODULES" 2>&5` &&
11711 GTK_LIBS=`"$PKG_CONFIG" --libs "$GTK_MODULES" 2>&5`; then
5476a9a4
GM
11712 edit_cflags="
11713 s,///*,/,g
11714 s/^/ /
11715 s/ -I/ $isystem/g
11716 s/^ //
11717 "
11718 GTK_CFLAGS=`$as_echo "$GTK_CFLAGS" | sed -e "$edit_cflags"`
11719 GTK_LIBS=`$as_echo "$GTK_LIBS" | sed -e 's,///*,/,g'`
11720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&5
11721$as_echo "yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&6; }
11722 succeeded=yes
11723 else
11724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11725$as_echo "no" >&6; }
11726 GTK_CFLAGS=""
11727 GTK_LIBS=""
11728 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
11729 ## do set a variable so people can do so. Do it in a subshell
11730 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 11731 GTK_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$GTK_MODULES") 2>&1`
5476a9a4
GM
11732
11733 fi
11734
11735
11736
11737 else
11738 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11739 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11740 fi
11741 fi
11742
11743 if test $succeeded = yes; then
11744 pkg_check_gtk=yes
11745 else
11746 pkg_check_gtk=no
11747 fi
11748
7c61eaab
GM
11749 if test "$pkg_check_gtk" = "no" &&
11750 { test "$with_gtk" = yes || test "$with_gtk2" = "yes"; }
11751 then
11752 as_fn_error "$gtk3_pkg_errors$GTK_PKG_ERRORS" "$LINENO" 5
11753 fi
11754 test "$pkg_check_gtk" = "yes" && USE_GTK_TOOLKIT="GTK2"
5476a9a4 11755 fi
067d23c9 11756fi
067d23c9 11757
5476a9a4
GM
11758if test x"$pkg_check_gtk" = xyes; then
11759
11760
11761
11762 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS"
11763 CFLAGS="$CFLAGS $GTK_CFLAGS"
11764 LIBS="$GTK_LIBS $LIBS"
646b9499
GM
11765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether GTK compiles" >&5
11766$as_echo_n "checking whether GTK compiles... " >&6; }
11767 GTK_COMPILES=no
11768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11769/* end confdefs.h. */
11770/* Check the Gtk and Glib APIs. */
11771 #include <gtk/gtk.h>
11772 #include <glib-object.h>
11773 static void
11774 callback (GObject *go, GParamSpec *spec, gpointer user_data)
11775 {}
11776
11777int
11778main ()
11779{
11780
11781 GtkSettings *gs = 0;
11782 /* Use G_CALLBACK to make sure function pointers can be cast to void *;
11783 strict C prohibits this. Use gtk_main_iteration to test that the
11784 libraries are there. */
11785 if (g_signal_handler_find (G_OBJECT (gs), G_SIGNAL_MATCH_FUNC,
11786 0, 0, 0, G_CALLBACK (callback), 0))
11787 gtk_main_iteration ();
11788
11789 ;
11790 return 0;
11791}
5476a9a4 11792_ACEOF
646b9499
GM
11793if ac_fn_c_try_link "$LINENO"; then :
11794 GTK_COMPILES=yes
f199cab1 11795fi
646b9499
GM
11796rm -f core conftest.err conftest.$ac_objext \
11797 conftest$ac_exeext conftest.$ac_ext
11798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_COMPILES" >&5
11799$as_echo "$GTK_COMPILES" >&6; }
5476a9a4 11800 if test "${GTK_COMPILES}" != "yes"; then
6d89e343 11801 GTK_OBJ=
5476a9a4
GM
11802 if test "$USE_X_TOOLKIT" != "maybe"; then
11803 as_fn_error "Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" "$LINENO" 5;
11804 fi
11805 else
11806 HAVE_GTK=yes
11807
11808$as_echo "#define USE_GTK 1" >>confdefs.h
067d23c9 11809
5476a9a4 11810 GTK_OBJ="gtkutil.o $GTK_OBJ"
6d89e343 11811 term_header=$gtk_term_header
5476a9a4 11812 USE_X_TOOLKIT=none
b5591ebb 11813 if "$PKG_CONFIG" --atleast-version=2.10 gtk+-2.0; then
5476a9a4
GM
11814 :
11815 else
11816 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your version of Gtk+ will have problems with
11817 closing open displays. This is no problem if you just use
11818 one display, but if you use more than one and close one of them
11819 Emacs may crash." >&5
11820$as_echo "$as_me: WARNING: Your version of Gtk+ will have problems with
11821 closing open displays. This is no problem if you just use
11822 one display, but if you use more than one and close one of them
11823 Emacs may crash." >&2;}
11824 sleep 3
11825 fi
067d23c9
KY
11826 fi
11827
5476a9a4 11828fi
067d23c9
KY
11829
11830
11831
5476a9a4 11832if test "${HAVE_GTK}" = "yes"; then
067d23c9 11833
5476a9a4
GM
11834 if test "$with_toolkit_scroll_bars" != no; then
11835 with_toolkit_scroll_bars=yes
11836 fi
067d23c9 11837
5476a9a4
GM
11838 HAVE_GTK_FILE_SELECTION=no
11839 ac_fn_c_check_decl "$LINENO" "GTK_TYPE_FILE_SELECTION" "ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" "$ac_includes_default
11840#include <gtk/gtk.h>
11841"
11842if test "x$ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" = x""yes; then :
11843 HAVE_GTK_FILE_SELECTION=yes
11844else
11845 HAVE_GTK_FILE_SELECTION=no
11846fi
067d23c9 11847
5476a9a4
GM
11848 if test "$HAVE_GTK_FILE_SELECTION" = yes; then
11849 for ac_func in gtk_file_selection_new
11850do :
11851 ac_fn_c_check_func "$LINENO" "gtk_file_selection_new" "ac_cv_func_gtk_file_selection_new"
11852if test "x$ac_cv_func_gtk_file_selection_new" = x""yes; then :
11853 cat >>confdefs.h <<_ACEOF
11854#define HAVE_GTK_FILE_SELECTION_NEW 1
f199cab1 11855_ACEOF
067d23c9 11856
f199cab1 11857fi
5476a9a4
GM
11858done
11859
f199cab1 11860 fi
067d23c9 11861
4efe5ef9
GM
11862 HAVE_GTK_HANDLE_BOX=no
11863 ac_fn_c_check_decl "$LINENO" "GTK_TYPE_HANDLE_BOX" "ac_cv_have_decl_GTK_TYPE_HANDLE_BOX" "$ac_includes_default
11864#include <gtk/gtk.h>
11865"
11866if test "x$ac_cv_have_decl_GTK_TYPE_HANDLE_BOX" = x""yes; then :
11867 HAVE_GTK_HANDLE_BOX=yes
11868else
11869 HAVE_GTK_HANDLE_BOX=no
11870fi
11871
11872 if test "$HAVE_GTK_HANDLE_BOX" = yes; then
11873 for ac_func in gtk_handle_box_new
11874do :
11875 ac_fn_c_check_func "$LINENO" "gtk_handle_box_new" "ac_cv_func_gtk_handle_box_new"
11876if test "x$ac_cv_func_gtk_handle_box_new" = x""yes; then :
11877 cat >>confdefs.h <<_ACEOF
11878#define HAVE_GTK_HANDLE_BOX_NEW 1
11879_ACEOF
11880
11881fi
11882done
11883
11884 fi
11885
11886 HAVE_GTK_TEAROFF_MENU_ITEM=no
11887 ac_fn_c_check_decl "$LINENO" "GTK_TYPE_TEAROFF_MENU_ITEM" "ac_cv_have_decl_GTK_TYPE_TEAROFF_MENU_ITEM" "$ac_includes_default
11888#include <gtk/gtk.h>
11889"
11890if test "x$ac_cv_have_decl_GTK_TYPE_TEAROFF_MENU_ITEM" = x""yes; then :
11891 HAVE_GTK_TEAROFF_MENU_ITEM=yes
11892else
11893 HAVE_GTK_TEAROFF_MENU_ITEM=no
11894fi
11895
11896 if test "$HAVE_GTK_TEAROFF_MENU_ITEM" = yes; then
11897 for ac_func in gtk_tearoff_menu_item_new
11898do :
11899 ac_fn_c_check_func "$LINENO" "gtk_tearoff_menu_item_new" "ac_cv_func_gtk_tearoff_menu_item_new"
11900if test "x$ac_cv_func_gtk_tearoff_menu_item_new" = x""yes; then :
11901 cat >>confdefs.h <<_ACEOF
11902#define HAVE_GTK_TEAROFF_MENU_ITEM_NEW 1
11903_ACEOF
11904
11905fi
11906done
11907
11908 fi
067d23c9 11909
5476a9a4
GM
11910 for ac_func in gtk_widget_get_window gtk_widget_set_has_window \
11911 gtk_dialog_get_action_area gtk_widget_get_sensitive \
11912 gtk_widget_get_mapped gtk_adjustment_get_page_size \
11913 gtk_orientable_set_orientation \
11914 gtk_window_set_has_resize_grip
11915do :
11916 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11917ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11918eval as_val=\$$as_ac_var
11919 if test "x$as_val" = x""yes; then :
11920 cat >>confdefs.h <<_ACEOF
11921#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11922_ACEOF
067d23c9 11923
5476a9a4
GM
11924fi
11925done
067d23c9 11926
42dcba54
GM
11927
11928 term_header=gtkutil.h
5476a9a4 11929fi
067d23c9 11930
5476a9a4
GM
11931HAVE_DBUS=no
11932DBUS_OBJ=
11933if test "${with_dbus}" = "yes"; then
067d23c9 11934
5476a9a4 11935 succeeded=no
067d23c9 11936
5476a9a4
GM
11937 if test "$PKG_CONFIG" = "no" ; then
11938 HAVE_DBUS=no
f199cab1 11939 else
5476a9a4 11940 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 11941 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
11942 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbus-1 >= 1.0" >&5
11943$as_echo_n "checking for dbus-1 >= 1.0... " >&6; }
067d23c9 11944
b5591ebb
GM
11945 if "$PKG_CONFIG" --exists "dbus-1 >= 1.0" 2>&5 &&
11946 DBUS_CFLAGS=`"$PKG_CONFIG" --cflags "dbus-1 >= 1.0" 2>&5` &&
11947 DBUS_LIBS=`"$PKG_CONFIG" --libs "dbus-1 >= 1.0" 2>&5`; then
5476a9a4
GM
11948 edit_cflags="
11949 s,///*,/,g
11950 s/^/ /
11951 s/ -I/ $isystem/g
11952 s/^ //
11953 "
11954 DBUS_CFLAGS=`$as_echo "$DBUS_CFLAGS" | sed -e "$edit_cflags"`
11955 DBUS_LIBS=`$as_echo "$DBUS_LIBS" | sed -e 's,///*,/,g'`
11956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$DBUS_CFLAGS' LIBS='$DBUS_LIBS'" >&5
11957$as_echo "yes CFLAGS='$DBUS_CFLAGS' LIBS='$DBUS_LIBS'" >&6; }
11958 succeeded=yes
11959 else
11960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11961$as_echo "no" >&6; }
11962 DBUS_CFLAGS=""
11963 DBUS_LIBS=""
11964 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
11965 ## do set a variable so people can do so. Do it in a subshell
11966 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 11967 DBUS_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "dbus-1 >= 1.0") 2>&1`
067d23c9 11968
5476a9a4 11969 fi
067d23c9 11970
15f79fcd 11971
067d23c9 11972
5476a9a4
GM
11973 else
11974 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11975 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11976 fi
067d23c9 11977 fi
067d23c9 11978
5476a9a4
GM
11979 if test $succeeded = yes; then
11980 HAVE_DBUS=yes
f199cab1 11981 else
5476a9a4 11982 HAVE_DBUS=no
f199cab1 11983 fi
067d23c9 11984
5476a9a4
GM
11985 if test "$HAVE_DBUS" = yes; then
11986 LIBS="$LIBS $DBUS_LIBS"
067d23c9 11987
5476a9a4 11988$as_echo "#define HAVE_DBUS 1" >>confdefs.h
067d23c9 11989
5476a9a4
GM
11990 for ac_func in dbus_watch_get_unix_fd \
11991 dbus_type_is_valid \
11992 dbus_validate_bus_name \
11993 dbus_validate_path \
11994 dbus_validate_interface \
11995 dbus_validate_member
11996do :
11997 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11998ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11999eval as_val=\$$as_ac_var
12000 if test "x$as_val" = x""yes; then :
12001 cat >>confdefs.h <<_ACEOF
12002#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12003_ACEOF
067d23c9 12004
5476a9a4
GM
12005fi
12006done
067d23c9 12007
5476a9a4
GM
12008 DBUS_OBJ=dbusbind.o
12009 fi
12010fi
067d23c9
KY
12011
12012
5476a9a4
GM
12013HAVE_GSETTINGS=no
12014if test "${HAVE_X11}" = "yes" && test "${with_gsettings}" = "yes"; then
067d23c9 12015
5476a9a4 12016 succeeded=no
067d23c9 12017
5476a9a4
GM
12018 if test "$PKG_CONFIG" = "no" ; then
12019 HAVE_GSETTINGS=no
12020 else
12021 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 12022 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
12023 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gio-2.0 >= 2.26" >&5
12024$as_echo_n "checking for gio-2.0 >= 2.26... " >&6; }
0afb4571 12025
b5591ebb
GM
12026 if "$PKG_CONFIG" --exists "gio-2.0 >= 2.26" 2>&5 &&
12027 GSETTINGS_CFLAGS=`"$PKG_CONFIG" --cflags "gio-2.0 >= 2.26" 2>&5` &&
12028 GSETTINGS_LIBS=`"$PKG_CONFIG" --libs "gio-2.0 >= 2.26" 2>&5`; then
5476a9a4
GM
12029 edit_cflags="
12030 s,///*,/,g
12031 s/^/ /
12032 s/ -I/ $isystem/g
12033 s/^ //
12034 "
12035 GSETTINGS_CFLAGS=`$as_echo "$GSETTINGS_CFLAGS" | sed -e "$edit_cflags"`
12036 GSETTINGS_LIBS=`$as_echo "$GSETTINGS_LIBS" | sed -e 's,///*,/,g'`
12037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GSETTINGS_CFLAGS' LIBS='$GSETTINGS_LIBS'" >&5
12038$as_echo "yes CFLAGS='$GSETTINGS_CFLAGS' LIBS='$GSETTINGS_LIBS'" >&6; }
12039 succeeded=yes
12040 else
12041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12042$as_echo "no" >&6; }
12043 GSETTINGS_CFLAGS=""
12044 GSETTINGS_LIBS=""
12045 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
12046 ## do set a variable so people can do so. Do it in a subshell
12047 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 12048 GSETTINGS_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "gio-2.0 >= 2.26") 2>&1`
0afb4571 12049
5476a9a4 12050 fi
067d23c9
KY
12051
12052
12053
12054 else
5476a9a4
GM
12055 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12056 echo "*** See http://www.freedesktop.org/software/pkgconfig"
067d23c9 12057 fi
5476a9a4 12058 fi
067d23c9 12059
5476a9a4
GM
12060 if test $succeeded = yes; then
12061 HAVE_GSETTINGS=yes
12062 else
12063 HAVE_GSETTINGS=no
12064 fi
f199cab1 12065
5476a9a4 12066 if test "$HAVE_GSETTINGS" = "yes"; then
f199cab1 12067
5476a9a4 12068$as_echo "#define HAVE_GSETTINGS 1" >>confdefs.h
f199cab1 12069
5476a9a4
GM
12070 SETTINGS_CFLAGS="$GSETTINGS_CFLAGS"
12071 SETTINGS_LIBS="$GSETTINGS_LIBS"
12072 fi
12073fi
067d23c9 12074
5476a9a4
GM
12075HAVE_GCONF=no
12076if test "${HAVE_X11}" = "yes" && test "${with_gconf}" = "yes"; then
067d23c9 12077
5476a9a4 12078 succeeded=no
067d23c9 12079
5476a9a4
GM
12080 if test "$PKG_CONFIG" = "no" ; then
12081 HAVE_GCONF=no
12082 else
12083 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 12084 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
12085 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gconf-2.0 >= 2.13" >&5
12086$as_echo_n "checking for gconf-2.0 >= 2.13... " >&6; }
067d23c9 12087
b5591ebb
GM
12088 if "$PKG_CONFIG" --exists "gconf-2.0 >= 2.13" 2>&5 &&
12089 GCONF_CFLAGS=`"$PKG_CONFIG" --cflags "gconf-2.0 >= 2.13" 2>&5` &&
12090 GCONF_LIBS=`"$PKG_CONFIG" --libs "gconf-2.0 >= 2.13" 2>&5`; then
5476a9a4
GM
12091 edit_cflags="
12092 s,///*,/,g
12093 s/^/ /
12094 s/ -I/ $isystem/g
12095 s/^ //
12096 "
12097 GCONF_CFLAGS=`$as_echo "$GCONF_CFLAGS" | sed -e "$edit_cflags"`
12098 GCONF_LIBS=`$as_echo "$GCONF_LIBS" | sed -e 's,///*,/,g'`
12099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GCONF_CFLAGS' LIBS='$GCONF_LIBS'" >&5
12100$as_echo "yes CFLAGS='$GCONF_CFLAGS' LIBS='$GCONF_LIBS'" >&6; }
12101 succeeded=yes
12102 else
12103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12104$as_echo "no" >&6; }
12105 GCONF_CFLAGS=""
12106 GCONF_LIBS=""
12107 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
12108 ## do set a variable so people can do so. Do it in a subshell
12109 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 12110 GCONF_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "gconf-2.0 >= 2.13") 2>&1`
067d23c9 12111
5476a9a4 12112 fi
f199cab1 12113
f199cab1
GM
12114
12115
5476a9a4
GM
12116 else
12117 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12118 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12119 fi
12120 fi
f199cab1 12121
5476a9a4
GM
12122 if test $succeeded = yes; then
12123 HAVE_GCONF=yes
12124 else
12125 HAVE_GCONF=no
12126 fi
f199cab1 12127
5476a9a4 12128 if test "$HAVE_GCONF" = yes; then
f199cab1 12129
5476a9a4 12130$as_echo "#define HAVE_GCONF 1" >>confdefs.h
f199cab1 12131
5476a9a4
GM
12132 SETTINGS_CFLAGS="$SETTINGS_CFLAGS $GCONF_CFLAGS"
12133 SETTINGS_LIBS="$SETTINGS_LIBS $GCONF_LIBS"
12134 fi
12135fi
f199cab1 12136
5476a9a4 12137if test "$HAVE_GSETTINGS" = "yes" || test "$HAVE_GCONF" = "yes"; then
dcde497f
GM
12138
12139 succeeded=no
12140
12141 if test "$PKG_CONFIG" = "no" ; then
12142 HAVE_GOBJECT=no
12143 else
12144 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 12145 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
dcde497f
GM
12146 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gobject-2.0 >= 2.0" >&5
12147$as_echo_n "checking for gobject-2.0 >= 2.0... " >&6; }
12148
b5591ebb
GM
12149 if "$PKG_CONFIG" --exists "gobject-2.0 >= 2.0" 2>&5 &&
12150 GOBJECT_CFLAGS=`"$PKG_CONFIG" --cflags "gobject-2.0 >= 2.0" 2>&5` &&
12151 GOBJECT_LIBS=`"$PKG_CONFIG" --libs "gobject-2.0 >= 2.0" 2>&5`; then
dcde497f
GM
12152 edit_cflags="
12153 s,///*,/,g
12154 s/^/ /
12155 s/ -I/ $isystem/g
12156 s/^ //
12157 "
12158 GOBJECT_CFLAGS=`$as_echo "$GOBJECT_CFLAGS" | sed -e "$edit_cflags"`
12159 GOBJECT_LIBS=`$as_echo "$GOBJECT_LIBS" | sed -e 's,///*,/,g'`
12160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GOBJECT_CFLAGS' LIBS='$GOBJECT_LIBS'" >&5
12161$as_echo "yes CFLAGS='$GOBJECT_CFLAGS' LIBS='$GOBJECT_LIBS'" >&6; }
12162 succeeded=yes
12163 else
12164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12165$as_echo "no" >&6; }
12166 GOBJECT_CFLAGS=""
12167 GOBJECT_LIBS=""
12168 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
12169 ## do set a variable so people can do so. Do it in a subshell
12170 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 12171 GOBJECT_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "gobject-2.0 >= 2.0") 2>&1`
dcde497f
GM
12172
12173 fi
12174
12175
12176
12177 else
12178 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12179 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12180 fi
12181 fi
12182
12183 if test $succeeded = yes; then
12184 HAVE_GOBJECT=yes
12185 else
12186 HAVE_GOBJECT=no
12187 fi
12188
12189 if test "$HAVE_GOBJECT" = "yes"; then
12190 SETTINGS_CFLAGS="$SETTINGS_CFLAGS $GOBJECT_CFLAGS"
12191 SETTINGS_LIBS="$SETTINGS_LIBS $GOBJECT_LIBS"
12192 fi
5476a9a4
GM
12193 SAVE_CFLAGS="$CFLAGS"
12194 SAVE_LIBS="$LIBS"
12195 CFLAGS="$SETTINGS_CFLAGS $CFLAGS"
12196 LIBS="$SETTINGS_LIBS $LIBS"
5476a9a4
GM
12197 CFLAGS="$SAVE_CFLAGS"
12198 LIBS="$SAVE_LIBS"
12199fi
067d23c9 12200
067d23c9 12201
f199cab1 12202
067d23c9 12203
5476a9a4
GM
12204HAVE_LIBSELINUX=no
12205LIBSELINUX_LIBS=
12206if test "${with_selinux}" = "yes"; then
12207 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lgetfilecon in -lselinux" >&5
12208$as_echo_n "checking for lgetfilecon in -lselinux... " >&6; }
12209if test "${ac_cv_lib_selinux_lgetfilecon+set}" = set; then :
12210 $as_echo_n "(cached) " >&6
12211else
12212 ac_check_lib_save_LIBS=$LIBS
12213LIBS="-lselinux $LIBS"
12214cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12215/* end confdefs.h. */
067d23c9 12216
5476a9a4
GM
12217/* Override any GCC internal prototype to avoid an error.
12218 Use char because int might match the return type of a GCC
12219 builtin and then its argument prototype would still apply. */
12220#ifdef __cplusplus
12221extern "C"
f199cab1 12222#endif
5476a9a4 12223char lgetfilecon ();
f199cab1
GM
12224int
12225main ()
12226{
5476a9a4 12227return lgetfilecon ();
f199cab1
GM
12228 ;
12229 return 0;
12230}
12231_ACEOF
5476a9a4
GM
12232if ac_fn_c_try_link "$LINENO"; then :
12233 ac_cv_lib_selinux_lgetfilecon=yes
12234else
12235 ac_cv_lib_selinux_lgetfilecon=no
f199cab1 12236fi
5476a9a4
GM
12237rm -f core conftest.err conftest.$ac_objext \
12238 conftest$ac_exeext conftest.$ac_ext
12239LIBS=$ac_check_lib_save_LIBS
12240fi
12241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_lgetfilecon" >&5
12242$as_echo "$ac_cv_lib_selinux_lgetfilecon" >&6; }
12243if test "x$ac_cv_lib_selinux_lgetfilecon" = x""yes; then :
12244 HAVE_LIBSELINUX=yes
12245else
12246 HAVE_LIBSELINUX=no
067d23c9
KY
12247fi
12248
5476a9a4 12249 if test "$HAVE_LIBSELINUX" = yes; then
067d23c9 12250
5476a9a4 12251$as_echo "#define HAVE_LIBSELINUX 1" >>confdefs.h
067d23c9 12252
5476a9a4
GM
12253 LIBSELINUX_LIBS=-lselinux
12254 fi
f199cab1 12255fi
067d23c9 12256
067d23c9 12257
5476a9a4 12258HAVE_GNUTLS=no
5476a9a4 12259if test "${with_gnutls}" = "yes" ; then
067d23c9 12260
5476a9a4 12261 succeeded=no
067d23c9 12262
5476a9a4
GM
12263 if test "$PKG_CONFIG" = "no" ; then
12264 HAVE_GNUTLS=no
12265 else
12266 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 12267 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
12268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gnutls >= 2.6.6" >&5
12269$as_echo_n "checking for gnutls >= 2.6.6... " >&6; }
067d23c9 12270
b5591ebb
GM
12271 if "$PKG_CONFIG" --exists "gnutls >= 2.6.6" 2>&5 &&
12272 LIBGNUTLS_CFLAGS=`"$PKG_CONFIG" --cflags "gnutls >= 2.6.6" 2>&5` &&
12273 LIBGNUTLS_LIBS=`"$PKG_CONFIG" --libs "gnutls >= 2.6.6" 2>&5`; then
5476a9a4
GM
12274 edit_cflags="
12275 s,///*,/,g
12276 s/^/ /
12277 s/ -I/ $isystem/g
12278 s/^ //
12279 "
12280 LIBGNUTLS_CFLAGS=`$as_echo "$LIBGNUTLS_CFLAGS" | sed -e "$edit_cflags"`
12281 LIBGNUTLS_LIBS=`$as_echo "$LIBGNUTLS_LIBS" | sed -e 's,///*,/,g'`
12282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBGNUTLS_CFLAGS' LIBS='$LIBGNUTLS_LIBS'" >&5
12283$as_echo "yes CFLAGS='$LIBGNUTLS_CFLAGS' LIBS='$LIBGNUTLS_LIBS'" >&6; }
12284 succeeded=yes
12285 else
12286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12287$as_echo "no" >&6; }
12288 LIBGNUTLS_CFLAGS=""
12289 LIBGNUTLS_LIBS=""
12290 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
12291 ## do set a variable so people can do so. Do it in a subshell
12292 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 12293 LIBGNUTLS_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "gnutls >= 2.6.6") 2>&1`
067d23c9 12294
5476a9a4 12295 fi
067d23c9 12296
067d23c9 12297
067d23c9 12298
5476a9a4
GM
12299 else
12300 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12301 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12302 fi
12303 fi
067d23c9 12304
5476a9a4
GM
12305 if test $succeeded = yes; then
12306 HAVE_GNUTLS=yes
12307 else
12308 HAVE_GNUTLS=no
12309 fi
067d23c9 12310
5476a9a4 12311 if test "${HAVE_GNUTLS}" = "yes"; then
067d23c9 12312
5476a9a4 12313$as_echo "#define HAVE_GNUTLS 1" >>confdefs.h
067d23c9 12314
5476a9a4 12315 fi
f199cab1 12316
7c61eaab
GM
12317 # Windows loads GnuTLS dynamically
12318 if test "${opsys}" = "mingw32"; then
7c61eaab 12319 LIBGNUTLS_LIBS=
db7863f4
GM
12320 else
12321 CFLAGS="$CFLAGS $LIBGNUTLS_CFLAGS"
12322 LIBS="$LIBGNUTLS_LIBS $LIBS"
7c61eaab 12323 fi
5476a9a4 12324fi
f527bd02 12325
f527bd02 12326
5476a9a4
GM
12327
12328
0f55a32e
GM
12329NOTIFY_OBJ=
12330NOTIFY_SUMMARY=no
12331
6ee585de
GM
12332if test "${with_ns}" = yes && test ${with_file_notification} = yes; then
12333 with_file_notification=no
12334fi
12335
12336case $with_file_notification,$opsys in
12337 w32,* | yes,mingw32)
12338 ac_fn_c_check_header_mongrel "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default"
12339if test "x$ac_cv_header_windows_h" = x""yes; then :
12340
0f55a32e
GM
12341fi
12342
6ee585de
GM
12343
12344 if test "$ac_cv_header_windows_h" = yes ; then
12345
12346$as_echo "#define HAVE_W32NOTIFY 1" >>confdefs.h
12347
12348 NOTIFY_OBJ=w32notify.o
12349 NOTIFY_SUMMARY="yes (w32)"
12350 fi ;;
12351esac
12352
12353case $with_file_notification,$NOTIFY_OBJ in
12354 gfile, | yes,)
0f55a32e
GM
12355
12356 succeeded=no
12357
12358 if test "$PKG_CONFIG" = "no" ; then
12359 HAVE_GFILENOTIFY=no
12360 else
12361 PKG_CONFIG_MIN_VERSION=0.9.0
12362 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
12363 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gio-2.0 >= 2.24" >&5
12364$as_echo_n "checking for gio-2.0 >= 2.24... " >&6; }
12365
12366 if "$PKG_CONFIG" --exists "gio-2.0 >= 2.24" 2>&5 &&
12367 GFILENOTIFY_CFLAGS=`"$PKG_CONFIG" --cflags "gio-2.0 >= 2.24" 2>&5` &&
12368 GFILENOTIFY_LIBS=`"$PKG_CONFIG" --libs "gio-2.0 >= 2.24" 2>&5`; then
12369 edit_cflags="
12370 s,///*,/,g
12371 s/^/ /
12372 s/ -I/ $isystem/g
12373 s/^ //
12374 "
12375 GFILENOTIFY_CFLAGS=`$as_echo "$GFILENOTIFY_CFLAGS" | sed -e "$edit_cflags"`
12376 GFILENOTIFY_LIBS=`$as_echo "$GFILENOTIFY_LIBS" | sed -e 's,///*,/,g'`
12377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GFILENOTIFY_CFLAGS' LIBS='$GFILENOTIFY_LIBS'" >&5
12378$as_echo "yes CFLAGS='$GFILENOTIFY_CFLAGS' LIBS='$GFILENOTIFY_LIBS'" >&6; }
12379 succeeded=yes
12380 else
12381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12382$as_echo "no" >&6; }
12383 GFILENOTIFY_CFLAGS=""
12384 GFILENOTIFY_LIBS=""
12385 ## If we have a custom action on failure, don't print errors, but
12386 ## do set a variable so people can do so. Do it in a subshell
12387 ## to capture any diagnostics in invoking pkg-config.
12388 GFILENOTIFY_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "gio-2.0 >= 2.24") 2>&1`
12389
12390 fi
12391
12392
12393
12394 else
12395 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12396 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12397 fi
12398 fi
12399
12400 if test $succeeded = yes; then
12401 HAVE_GFILENOTIFY=yes
12402 else
12403 HAVE_GFILENOTIFY=no
12404 fi
12405
6ee585de 12406 if test "$HAVE_GFILENOTIFY" = "yes"; then
0f55a32e
GM
12407
12408$as_echo "#define HAVE_GFILENOTIFY 1" >>confdefs.h
12409
6ee585de
GM
12410 NOTIFY_OBJ=gfilenotify.o
12411 NOTIFY_SUMMARY="yes -lgio (gfile)"
12412 fi ;;
12413esac
12414
12415case $with_file_notification,$NOTIFY_OBJ in
12416 inotify, | yes,)
12417 ac_fn_c_check_header_mongrel "$LINENO" "sys/inotify.h" "ac_cv_header_sys_inotify_h" "$ac_includes_default"
b5eb356a 12418if test "x$ac_cv_header_sys_inotify_h" = x""yes; then :
b5eb356a
GM
12419
12420fi
12421
b5eb356a 12422
6ee585de
GM
12423 if test "$ac_cv_header_sys_inotify_h" = yes ; then
12424 ac_fn_c_check_func "$LINENO" "inotify_init1" "ac_cv_func_inotify_init1"
b5eb356a
GM
12425if test "x$ac_cv_func_inotify_init1" = x""yes; then :
12426
12427fi
12428
6ee585de 12429 if test "$ac_cv_func_inotify_init1" = yes; then
0f55a32e
GM
12430
12431$as_echo "#define HAVE_INOTIFY 1" >>confdefs.h
12432
6ee585de
GM
12433 NOTIFY_OBJ=inotify.o
12434 NOTIFY_SUMMARY="yes -lglibc (inotify)"
12435 fi
12436 fi ;;
12437esac
0f55a32e 12438
6ee585de
GM
12439case $with_file_notification,$NOTIFY_OBJ in
12440 yes,* | no,* | *,?*) ;;
12441 *) as_fn_error "File notification \`$with_file_notification' requested but requirements not found." "$LINENO" 5 ;;
12442esac
0f55a32e 12443
0f55a32e 12444if test -n "$NOTIFY_OBJ"; then
b5eb356a 12445
0f55a32e 12446$as_echo "#define USE_FILE_NOTIFY 1" >>confdefs.h
b5eb356a
GM
12447
12448fi
12449
0f55a32e
GM
12450
12451
12452
5476a9a4
GM
12453HAVE_XAW3D=no
12454LUCID_LIBW=
12455if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then
12456 if test "$with_xaw3d" != no; then
5476a9a4 12457 if test "${emacs_cv_xaw3d+set}" = set; then :
f199cab1
GM
12458 $as_echo_n "(cached) " >&6
12459else
5476a9a4
GM
12460 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12461/* end confdefs.h. */
f527bd02 12462
5476a9a4
GM
12463#include <X11/Intrinsic.h>
12464#include <X11/Xaw3d/Simple.h>
12465int
12466main ()
12467{
12468
12469 ;
12470 return 0;
12471}
12472_ACEOF
12473if ac_fn_c_try_link "$LINENO"; then :
12474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XawScrollbarSetThumb in -lXaw3d" >&5
12475$as_echo_n "checking for XawScrollbarSetThumb in -lXaw3d... " >&6; }
12476if test "${ac_cv_lib_Xaw3d_XawScrollbarSetThumb+set}" = set; then :
12477 $as_echo_n "(cached) " >&6
12478else
12479 ac_check_lib_save_LIBS=$LIBS
12480LIBS="-lXaw3d $LIBS"
12481cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12482/* end confdefs.h. */
f527bd02 12483
5476a9a4
GM
12484/* Override any GCC internal prototype to avoid an error.
12485 Use char because int might match the return type of a GCC
12486 builtin and then its argument prototype would still apply. */
12487#ifdef __cplusplus
12488extern "C"
12489#endif
12490char XawScrollbarSetThumb ();
12491int
12492main ()
12493{
12494return XawScrollbarSetThumb ();
12495 ;
12496 return 0;
12497}
12498_ACEOF
12499if ac_fn_c_try_link "$LINENO"; then :
12500 ac_cv_lib_Xaw3d_XawScrollbarSetThumb=yes
f199cab1 12501else
5476a9a4 12502 ac_cv_lib_Xaw3d_XawScrollbarSetThumb=no
f199cab1 12503fi
5476a9a4
GM
12504rm -f core conftest.err conftest.$ac_objext \
12505 conftest$ac_exeext conftest.$ac_ext
12506LIBS=$ac_check_lib_save_LIBS
12507fi
12508{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&5
12509$as_echo "$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&6; }
12510if test "x$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" = x""yes; then :
12511 emacs_cv_xaw3d=yes
12512else
12513 emacs_cv_xaw3d=no
f199cab1 12514fi
f527bd02 12515
5476a9a4
GM
12516else
12517 emacs_cv_xaw3d=no
12518fi
12519rm -f core conftest.err conftest.$ac_objext \
12520 conftest$ac_exeext conftest.$ac_ext
12521fi
f527bd02 12522
5476a9a4
GM
12523 else
12524 emacs_cv_xaw3d=no
12525 fi
12526 if test $emacs_cv_xaw3d = yes; then
4fa92495
GM
12527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xaw3d" >&5
12528$as_echo_n "checking for xaw3d... " >&6; }
5476a9a4
GM
12529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5
12530$as_echo "yes; using Lucid toolkit" >&6; }
12531 USE_X_TOOLKIT=LUCID
12532 HAVE_XAW3D=yes
12533 LUCID_LIBW=-lXaw3d
f527bd02 12534
5476a9a4 12535$as_echo "#define HAVE_XAW3D 1" >>confdefs.h
f527bd02 12536
5476a9a4 12537 else
4fa92495
GM
12538 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xaw3d" >&5
12539$as_echo_n "checking for xaw3d... " >&6; }
5476a9a4
GM
12540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12541$as_echo "no" >&6; }
12542 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libXaw" >&5
12543$as_echo_n "checking for libXaw... " >&6; }
12544 if test "${emacs_cv_xaw+set}" = set; then :
f199cab1
GM
12545 $as_echo_n "(cached) " >&6
12546else
12547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12548/* end confdefs.h. */
067d23c9 12549
5476a9a4
GM
12550#include <X11/Intrinsic.h>
12551#include <X11/Xaw/Simple.h>
f199cab1
GM
12552int
12553main ()
12554{
067d23c9 12555
f199cab1
GM
12556 ;
12557 return 0;
12558}
12559_ACEOF
5476a9a4
GM
12560if ac_fn_c_try_link "$LINENO"; then :
12561 emacs_cv_xaw=yes
f199cab1 12562else
5476a9a4 12563 emacs_cv_xaw=no
f199cab1 12564fi
5476a9a4
GM
12565rm -f core conftest.err conftest.$ac_objext \
12566 conftest$ac_exeext conftest.$ac_ext
f199cab1 12567fi
067d23c9 12568
5476a9a4
GM
12569 if test $emacs_cv_xaw = yes; then
12570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5
12571$as_echo "yes; using Lucid toolkit" >&6; }
12572 USE_X_TOOLKIT=LUCID
12573 LUCID_LIBW=-lXaw
12574 elif test x"${USE_X_TOOLKIT}" = xLUCID; then
12575 as_fn_error "Lucid toolkit requires X11/Xaw include files" "$LINENO" 5
f199cab1 12576 else
5476a9a4
GM
12577 as_fn_error "No X toolkit could be found.
12578If you are sure you want Emacs compiled without an X toolkit, pass
12579 --with-x-toolkit=no
12580to configure. Otherwise, install the development libraries for the toolkit
12581that you want to use (e.g. Gtk+) and re-run configure." "$LINENO" 5
f199cab1 12582 fi
5476a9a4
GM
12583 fi
12584fi
067d23c9 12585
5476a9a4 12586X_TOOLKIT_TYPE=$USE_X_TOOLKIT
067d23c9 12587
5476a9a4
GM
12588LIBXTR6=
12589if test "${USE_X_TOOLKIT}" != "none"; then
12590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 toolkit version" >&5
12591$as_echo_n "checking X11 toolkit version... " >&6; }
12592 if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then :
f199cab1
GM
12593 $as_echo_n "(cached) " >&6
12594else
5476a9a4 12595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 12596/* end confdefs.h. */
5476a9a4 12597#include <X11/Intrinsic.h>
f199cab1
GM
12598int
12599main ()
12600{
5476a9a4
GM
12601#if XtSpecificationRelease < 6
12602fail;
12603#endif
f527bd02 12604
f199cab1
GM
12605 ;
12606 return 0;
12607}
067d23c9 12608_ACEOF
5476a9a4
GM
12609if ac_fn_c_try_link "$LINENO"; then :
12610 emacs_cv_x11_toolkit_version_6=yes
12611else
12612 emacs_cv_x11_toolkit_version_6=no
067d23c9 12613fi
5476a9a4
GM
12614rm -f core conftest.err conftest.$ac_objext \
12615 conftest$ac_exeext conftest.$ac_ext
067d23c9
KY
12616fi
12617
5476a9a4
GM
12618 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
12619 if test $emacs_cv_x11_toolkit_version_6 = yes; then
12620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5
12621$as_echo "6 or newer" >&6; }
f527bd02 12622
5476a9a4 12623$as_echo "#define HAVE_X11XTR6 1" >>confdefs.h
f527bd02 12624
5476a9a4
GM
12625 LIBXTR6="-lSM -lICE"
12626 case "$opsys" in
12627 ## Use libw.a along with X11R6 Xt.
12628 unixware) LIBXTR6="$LIBXTR6 -lw" ;;
12629 esac
12630 else
12631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5
12632$as_echo "before 6" >&6; }
f199cab1 12633 fi
f527bd02 12634
5476a9a4
GM
12635 OLDLIBS="$LIBS"
12636 if test x$HAVE_X11XTR6 = xyes; then
12637 LIBS="-lXt -lSM -lICE $LIBS"
12638 else
12639 LIBS="-lXt $LIBS"
12640 fi
12641 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XmuConvertStandardSelection in -lXmu" >&5
12642$as_echo_n "checking for XmuConvertStandardSelection in -lXmu... " >&6; }
12643if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then :
12644 $as_echo_n "(cached) " >&6
12645else
12646 ac_check_lib_save_LIBS=$LIBS
12647LIBS="-lXmu $LIBS"
12648cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12649/* end confdefs.h. */
f199cab1 12650
5476a9a4
GM
12651/* Override any GCC internal prototype to avoid an error.
12652 Use char because int might match the return type of a GCC
12653 builtin and then its argument prototype would still apply. */
12654#ifdef __cplusplus
12655extern "C"
12656#endif
12657char XmuConvertStandardSelection ();
067d23c9
KY
12658int
12659main ()
12660{
5476a9a4 12661return XmuConvertStandardSelection ();
067d23c9
KY
12662 ;
12663 return 0;
12664}
12665_ACEOF
5476a9a4
GM
12666if ac_fn_c_try_link "$LINENO"; then :
12667 ac_cv_lib_Xmu_XmuConvertStandardSelection=yes
12668else
12669 ac_cv_lib_Xmu_XmuConvertStandardSelection=no
067d23c9 12670fi
5476a9a4
GM
12671rm -f core conftest.err conftest.$ac_objext \
12672 conftest$ac_exeext conftest.$ac_ext
12673LIBS=$ac_check_lib_save_LIBS
067d23c9 12674fi
5476a9a4
GM
12675{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5
12676$as_echo "$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6; }
12677if test "x$ac_cv_lib_Xmu_XmuConvertStandardSelection" = x""yes; then :
12678 cat >>confdefs.h <<_ACEOF
12679#define HAVE_LIBXMU 1
f199cab1
GM
12680_ACEOF
12681
5476a9a4 12682 LIBS="-lXmu $LIBS"
f199cab1 12683
067d23c9
KY
12684fi
12685
5476a9a4
GM
12686 test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
12687 fi
067d23c9 12688
067d23c9 12689
5476a9a4
GM
12690LIBXMU=-lXmu
12691case $opsys in
12692 ## These systems don't supply Xmu.
12693 hpux* | aix4-2 )
12694 test "X$ac_cv_lib_Xmu_XmuConvertStandardSelection" != "Xyes" && LIBXMU=
12695 ;;
7c61eaab
GM
12696 mingw32 )
12697 LIBXMU=
12698 ;;
5476a9a4 12699esac
067d23c9
KY
12700
12701
5476a9a4
GM
12702# On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
12703if test "${HAVE_X11}" = "yes"; then
12704 if test "${USE_X_TOOLKIT}" != "none"; then
12705 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XShapeQueryExtension in -lXext" >&5
12706$as_echo_n "checking for XShapeQueryExtension in -lXext... " >&6; }
12707if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then :
f199cab1
GM
12708 $as_echo_n "(cached) " >&6
12709else
5476a9a4
GM
12710 ac_check_lib_save_LIBS=$LIBS
12711LIBS="-lXext $LIBS"
12712cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 12713/* end confdefs.h. */
f199cab1 12714
5476a9a4
GM
12715/* Override any GCC internal prototype to avoid an error.
12716 Use char because int might match the return type of a GCC
12717 builtin and then its argument prototype would still apply. */
12718#ifdef __cplusplus
12719extern "C"
12720#endif
12721char XShapeQueryExtension ();
12722int
12723main ()
12724{
12725return XShapeQueryExtension ();
12726 ;
12727 return 0;
12728}
e7d4e61f 12729_ACEOF
5476a9a4
GM
12730if ac_fn_c_try_link "$LINENO"; then :
12731 ac_cv_lib_Xext_XShapeQueryExtension=yes
12732else
12733 ac_cv_lib_Xext_XShapeQueryExtension=no
067d23c9 12734fi
5476a9a4
GM
12735rm -f core conftest.err conftest.$ac_objext \
12736 conftest$ac_exeext conftest.$ac_ext
12737LIBS=$ac_check_lib_save_LIBS
12738fi
12739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
12740$as_echo "$ac_cv_lib_Xext_XShapeQueryExtension" >&6; }
12741if test "x$ac_cv_lib_Xext_XShapeQueryExtension" = x""yes; then :
12742 cat >>confdefs.h <<_ACEOF
12743#define HAVE_LIBXEXT 1
12744_ACEOF
f199cab1 12745
5476a9a4 12746 LIBS="-lXext $LIBS"
f199cab1 12747
5476a9a4 12748fi
f199cab1 12749
5476a9a4
GM
12750 fi
12751fi
f199cab1 12752
5476a9a4
GM
12753LIBXP=
12754if test "${USE_X_TOOLKIT}" = "MOTIF"; then
8ad96b1d
GM
12755 # OpenMotif may be installed in such a way on some GNU/Linux systems.
12756 if test -d /usr/include/openmotif; then
12757 CPPFLAGS="-I/usr/include/openmotif $CPPFLAGS"
12758 emacs_cv_openmotif=yes
12759 case "$canonical" in
12760 x86_64-*-linux-gnu* | powerpc64-*-linux-gnu* | sparc64-*-linux-gnu*)
12761 test -d /usr/lib64/openmotif && LDFLAGS="-L/usr/lib64/openmotif $LDFLAGS"
12762 ;;
12763 *)
12764 test -d /usr/lib/openmotif && LDFLAGS="-L/usr/lib/openmotif $LDFLAGS"
12765 esac
12766 else
12767 emacs_cv_openmotif=no
12768 fi
12769 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for (Open)Motif version 2.1" >&5
12770$as_echo_n "checking for (Open)Motif version 2.1... " >&6; }
5476a9a4 12771if test "${emacs_cv_motif_version_2_1+set}" = set; then :
ae1362a3
AS
12772 $as_echo_n "(cached) " >&6
12773else
f199cab1
GM
12774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12775/* end confdefs.h. */
5476a9a4
GM
12776#include <Xm/Xm.h>
12777int
12778main ()
12779{
12780#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
12781int x = 5;
12782#else
12783Motif version prior to 2.1.
12784#endif
12785 ;
12786 return 0;
12787}
12788_ACEOF
12789if ac_fn_c_try_compile "$LINENO"; then :
12790 emacs_cv_motif_version_2_1=yes
12791else
12792 emacs_cv_motif_version_2_1=no
12793fi
12794rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12795fi
12796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_motif_version_2_1" >&5
12797$as_echo "$emacs_cv_motif_version_2_1" >&6; }
12798 if test $emacs_cv_motif_version_2_1 = yes; then
12799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpCreateContext in -lXp" >&5
12800$as_echo_n "checking for XpCreateContext in -lXp... " >&6; }
12801if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then :
12802 $as_echo_n "(cached) " >&6
12803else
12804 ac_check_lib_save_LIBS=$LIBS
12805LIBS="-lXp $LIBS"
12806cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12807/* end confdefs.h. */
f199cab1 12808
5476a9a4
GM
12809/* Override any GCC internal prototype to avoid an error.
12810 Use char because int might match the return type of a GCC
12811 builtin and then its argument prototype would still apply. */
12812#ifdef __cplusplus
12813extern "C"
12814#endif
12815char XpCreateContext ();
ae1362a3
AS
12816int
12817main ()
12818{
5476a9a4 12819return XpCreateContext ();
ae1362a3
AS
12820 ;
12821 return 0;
12822}
12823_ACEOF
5476a9a4
GM
12824if ac_fn_c_try_link "$LINENO"; then :
12825 ac_cv_lib_Xp_XpCreateContext=yes
067d23c9 12826else
5476a9a4 12827 ac_cv_lib_Xp_XpCreateContext=no
067d23c9 12828fi
5476a9a4
GM
12829rm -f core conftest.err conftest.$ac_objext \
12830 conftest$ac_exeext conftest.$ac_ext
12831LIBS=$ac_check_lib_save_LIBS
12832fi
12833{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xp_XpCreateContext" >&5
12834$as_echo "$ac_cv_lib_Xp_XpCreateContext" >&6; }
12835if test "x$ac_cv_lib_Xp_XpCreateContext" = x""yes; then :
12836 LIBXP=-lXp
067d23c9 12837fi
f199cab1 12838
8ad96b1d
GM
12839 if test x$emacs_cv_openmotif = xyes; then
12840 REAL_CPPFLAGS="-I/usr/include/openmotif $REAL_CPPFLAGS"
12841 fi
5476a9a4
GM
12842 else
12843 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LessTif where some systems put it" >&5
12844$as_echo_n "checking for LessTif where some systems put it... " >&6; }
12845if test "${emacs_cv_lesstif+set}" = set; then :
067d23c9 12846 $as_echo_n "(cached) " >&6
f199cab1 12847else
5476a9a4
GM
12848 # We put this in CFLAGS temporarily to precede other -I options
12849 # that might be in CFLAGS temporarily.
12850 # We put this in CPPFLAGS where it precedes the other -I options.
12851 OLD_CPPFLAGS=$CPPFLAGS
12852 OLD_CFLAGS=$CFLAGS
12853 CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS"
12854 CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS"
12855 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 12856/* end confdefs.h. */
5476a9a4 12857#include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h>
067d23c9
KY
12858int
12859main ()
12860{
5476a9a4 12861int x = 5;
067d23c9
KY
12862 ;
12863 return 0;
12864}
12865_ACEOF
5476a9a4
GM
12866if ac_fn_c_try_compile "$LINENO"; then :
12867 emacs_cv_lesstif=yes
067d23c9 12868else
5476a9a4 12869 emacs_cv_lesstif=no
067d23c9 12870fi
5476a9a4 12871rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
067d23c9 12872fi
5476a9a4
GM
12873{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_lesstif" >&5
12874$as_echo "$emacs_cv_lesstif" >&6; }
12875 if test $emacs_cv_lesstif = yes; then
12876 # Make sure this -I option remains in CPPFLAGS after it is set
12877 # back to REAL_CPPFLAGS.
12878 # There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not
12879 # have those other -I options anyway. Ultimately, having this
12880 # directory ultimately in CPPFLAGS will be enough.
12881 REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS"
12882 LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS"
12883 else
12884 CFLAGS=$OLD_CFLAGS
12885 CPPFLAGS=$OLD_CPPFLAGS
12886 fi
12887 fi
12888 ac_fn_c_check_header_mongrel "$LINENO" "Xm/BulletinB.h" "ac_cv_header_Xm_BulletinB_h" "$ac_includes_default"
12889if test "x$ac_cv_header_Xm_BulletinB_h" = x""yes; then :
067d23c9 12890
5476a9a4
GM
12891else
12892 as_fn_error "Motif toolkit requested but requirements not found." "$LINENO" 5
067d23c9 12893fi
f199cab1
GM
12894
12895
5476a9a4 12896fi
f199cab1
GM
12897
12898
5476a9a4
GM
12899USE_TOOLKIT_SCROLL_BARS=no
12900if test "${with_toolkit_scroll_bars}" != "no"; then
12901 if test "${USE_X_TOOLKIT}" != "none"; then
12902 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
12903 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
f199cab1 12904
5476a9a4
GM
12905 HAVE_XAW3D=no
12906 USE_TOOLKIT_SCROLL_BARS=yes
12907 elif test "${HAVE_XAW3D}" = "yes" || test "${USE_X_TOOLKIT}" = "LUCID"; then
12908 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
f199cab1 12909
5476a9a4
GM
12910 USE_TOOLKIT_SCROLL_BARS=yes
12911 fi
12912 elif test "${HAVE_GTK}" = "yes"; then
12913 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
f199cab1 12914
5476a9a4
GM
12915 USE_TOOLKIT_SCROLL_BARS=yes
12916 elif test "${HAVE_NS}" = "yes"; then
12917 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
f199cab1 12918
5c0255d9
GM
12919 USE_TOOLKIT_SCROLL_BARS=yes
12920 elif test "${HAVE_W32}" = "yes"; then
12921 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
12922
5476a9a4
GM
12923 USE_TOOLKIT_SCROLL_BARS=yes
12924 fi
12925fi
f199cab1 12926
5476a9a4 12927cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 12928/* end confdefs.h. */
5476a9a4
GM
12929
12930 #include <X11/Xlib.h>
12931 #include <X11/Xresource.h>
067d23c9
KY
12932int
12933main ()
12934{
5476a9a4 12935XIMProc callback;
067d23c9
KY
12936 ;
12937 return 0;
12938}
12939_ACEOF
f199cab1 12940if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4
GM
12941 HAVE_XIM=yes
12942
12943$as_echo "#define HAVE_XIM 1" >>confdefs.h
12944
067d23c9 12945else
5476a9a4 12946 HAVE_XIM=no
067d23c9 12947fi
f199cab1 12948rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 12949
f199cab1 12950
5476a9a4
GM
12951if test "${with_xim}" != "no"; then
12952
12953$as_echo "#define USE_XIM 1" >>confdefs.h
12954
12955fi
12956
12957
12958if test "${HAVE_XIM}" != "no"; then
12959 late_CFLAGS=$CFLAGS
12960 if test "$GCC" = yes; then
12961 CFLAGS="$CFLAGS --pedantic-errors"
12962 fi
12963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12964/* end confdefs.h. */
f199cab1 12965
5476a9a4
GM
12966#include <X11/Xlib.h>
12967#include <X11/Xresource.h>
12968int
12969main ()
12970{
12971Display *display;
12972XrmDatabase db;
12973char *res_name;
12974char *res_class;
12975XIMProc callback;
12976XPointer *client_data;
12977#ifndef __GNUC__
12978/* If we're not using GCC, it's probably not XFree86, and this is
12979 probably right, but we can't use something like --pedantic-errors. */
12980extern Bool XRegisterIMInstantiateCallback(Display*, XrmDatabase, char*,
12981 char*, XIMProc, XPointer*);
12982#endif
12983(void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, callback,
12984 client_data);
067d23c9
KY
12985 ;
12986 return 0;
12987}
12988_ACEOF
5476a9a4
GM
12989if ac_fn_c_try_compile "$LINENO"; then :
12990 emacs_cv_arg6_star=yes
067d23c9 12991fi
f199cab1 12992rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5476a9a4
GM
12993 if test "$emacs_cv_arg6_star" = yes; then
12994 $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer*" >>confdefs.h
12995
12996 else
12997 $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer" >>confdefs.h
067d23c9 12998
5476a9a4
GM
12999 fi
13000 CFLAGS=$late_CFLAGS
067d23c9
KY
13001fi
13002
5476a9a4
GM
13003### Start of font-backend (under any platform) section.
13004# (nothing here yet -- this is a placeholder)
13005### End of font-backend (under any platform) section.
067d23c9 13006
5476a9a4
GM
13007### Start of font-backend (under X11) section.
13008if test "${HAVE_X11}" = "yes"; then
067d23c9 13009
5476a9a4 13010 succeeded=no
067d23c9 13011
5476a9a4
GM
13012 if test "$PKG_CONFIG" = "no" ; then
13013 HAVE_FC=no
13014 else
13015 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 13016 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
13017 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fontconfig >= 2.2.0" >&5
13018$as_echo_n "checking for fontconfig >= 2.2.0... " >&6; }
f199cab1 13019
b5591ebb
GM
13020 if "$PKG_CONFIG" --exists "fontconfig >= 2.2.0" 2>&5 &&
13021 FONTCONFIG_CFLAGS=`"$PKG_CONFIG" --cflags "fontconfig >= 2.2.0" 2>&5` &&
13022 FONTCONFIG_LIBS=`"$PKG_CONFIG" --libs "fontconfig >= 2.2.0" 2>&5`; then
5476a9a4
GM
13023 edit_cflags="
13024 s,///*,/,g
13025 s/^/ /
13026 s/ -I/ $isystem/g
13027 s/^ //
13028 "
13029 FONTCONFIG_CFLAGS=`$as_echo "$FONTCONFIG_CFLAGS" | sed -e "$edit_cflags"`
13030 FONTCONFIG_LIBS=`$as_echo "$FONTCONFIG_LIBS" | sed -e 's,///*,/,g'`
13031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$FONTCONFIG_CFLAGS' LIBS='$FONTCONFIG_LIBS'" >&5
13032$as_echo "yes CFLAGS='$FONTCONFIG_CFLAGS' LIBS='$FONTCONFIG_LIBS'" >&6; }
13033 succeeded=yes
13034 else
13035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13036$as_echo "no" >&6; }
13037 FONTCONFIG_CFLAGS=""
13038 FONTCONFIG_LIBS=""
13039 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
13040 ## do set a variable so people can do so. Do it in a subshell
13041 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 13042 FONTCONFIG_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "fontconfig >= 2.2.0") 2>&1`
f199cab1 13043
5476a9a4 13044 fi
f199cab1
GM
13045
13046
13047
f199cab1 13048 else
5476a9a4
GM
13049 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
13050 echo "*** See http://www.freedesktop.org/software/pkgconfig"
13051 fi
13052 fi
f199cab1 13053
5476a9a4
GM
13054 if test $succeeded = yes; then
13055 HAVE_FC=yes
13056 else
13057 HAVE_FC=no
13058 fi
f199cab1 13059
067d23c9 13060
5476a9a4
GM
13061 ## Use -lXft if available, unless `--with-xft=no'.
13062 HAVE_XFT=maybe
13063 if test "${HAVE_FC}" = "no" || test "x${with_x}" = "xno"; then
13064 with_xft="no";
13065 fi
13066 if test "x${with_xft}" != "xno"; then
f199cab1 13067
f199cab1 13068
5476a9a4 13069 succeeded=no
f199cab1 13070
5476a9a4
GM
13071 if test "$PKG_CONFIG" = "no" ; then
13072 HAVE_XFT=no
13073 else
13074 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 13075 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
13076 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xft >= 0.13.0" >&5
13077$as_echo_n "checking for xft >= 0.13.0... " >&6; }
f199cab1 13078
b5591ebb
GM
13079 if "$PKG_CONFIG" --exists "xft >= 0.13.0" 2>&5 &&
13080 XFT_CFLAGS=`"$PKG_CONFIG" --cflags "xft >= 0.13.0" 2>&5` &&
13081 XFT_LIBS=`"$PKG_CONFIG" --libs "xft >= 0.13.0" 2>&5`; then
5476a9a4
GM
13082 edit_cflags="
13083 s,///*,/,g
13084 s/^/ /
13085 s/ -I/ $isystem/g
13086 s/^ //
13087 "
13088 XFT_CFLAGS=`$as_echo "$XFT_CFLAGS" | sed -e "$edit_cflags"`
13089 XFT_LIBS=`$as_echo "$XFT_LIBS" | sed -e 's,///*,/,g'`
13090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$XFT_CFLAGS' LIBS='$XFT_LIBS'" >&5
13091$as_echo "yes CFLAGS='$XFT_CFLAGS' LIBS='$XFT_LIBS'" >&6; }
13092 succeeded=yes
13093 else
13094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13095$as_echo "no" >&6; }
13096 XFT_CFLAGS=""
13097 XFT_LIBS=""
13098 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
13099 ## do set a variable so people can do so. Do it in a subshell
13100 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 13101 XFT_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "xft >= 0.13.0") 2>&1`
f199cab1 13102
5476a9a4 13103 fi
f199cab1
GM
13104
13105
13106
5476a9a4
GM
13107 else
13108 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
13109 echo "*** See http://www.freedesktop.org/software/pkgconfig"
13110 fi
13111 fi
f199cab1 13112
5476a9a4
GM
13113 if test $succeeded = yes; then
13114 :
f199cab1 13115 else
5476a9a4 13116 HAVE_XFT=no
f199cab1
GM
13117 fi
13118
5476a9a4
GM
13119 ## Because xftfont.c uses XRenderQueryExtension, we also
13120 ## need to link to -lXrender.
13121 HAVE_XRENDER=no
13122 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRenderQueryExtension in -lXrender" >&5
13123$as_echo_n "checking for XRenderQueryExtension in -lXrender... " >&6; }
13124if test "${ac_cv_lib_Xrender_XRenderQueryExtension+set}" = set; then :
13125 $as_echo_n "(cached) " >&6
13126else
13127 ac_check_lib_save_LIBS=$LIBS
13128LIBS="-lXrender $LIBS"
13129cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13130/* end confdefs.h. */
f199cab1 13131
5476a9a4
GM
13132/* Override any GCC internal prototype to avoid an error.
13133 Use char because int might match the return type of a GCC
13134 builtin and then its argument prototype would still apply. */
13135#ifdef __cplusplus
13136extern "C"
13137#endif
13138char XRenderQueryExtension ();
13139int
13140main ()
13141{
13142return XRenderQueryExtension ();
13143 ;
13144 return 0;
13145}
13146_ACEOF
13147if ac_fn_c_try_link "$LINENO"; then :
13148 ac_cv_lib_Xrender_XRenderQueryExtension=yes
13149else
13150 ac_cv_lib_Xrender_XRenderQueryExtension=no
13151fi
13152rm -f core conftest.err conftest.$ac_objext \
13153 conftest$ac_exeext conftest.$ac_ext
13154LIBS=$ac_check_lib_save_LIBS
13155fi
13156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrender_XRenderQueryExtension" >&5
13157$as_echo "$ac_cv_lib_Xrender_XRenderQueryExtension" >&6; }
13158if test "x$ac_cv_lib_Xrender_XRenderQueryExtension" = x""yes; then :
13159 HAVE_XRENDER=yes
13160fi
f199cab1 13161
5476a9a4
GM
13162 if test "$HAVE_XFT" != no && test "$HAVE_XRENDER" != no; then
13163 OLD_CPPFLAGS="$CPPFLAGS"
13164 OLD_CFLAGS="$CFLAGS"
13165 OLD_LIBS="$LIBS"
13166 CPPFLAGS="$CPPFLAGS $XFT_CFLAGS"
13167 CFLAGS="$CFLAGS $XFT_CFLAGS"
13168 XFT_LIBS="-lXrender $XFT_LIBS"
13169 LIBS="$XFT_LIBS $LIBS"
46f74982
GM
13170 ac_fn_c_check_header_compile "$LINENO" "X11/Xft/Xft.h" "ac_cv_header_X11_Xft_Xft_h" "#include <X11/X.h>
13171"
5476a9a4
GM
13172if test "x$ac_cv_header_X11_Xft_Xft_h" = x""yes; then :
13173 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XftFontOpen in -lXft" >&5
13174$as_echo_n "checking for XftFontOpen in -lXft... " >&6; }
13175if test "${ac_cv_lib_Xft_XftFontOpen+set}" = set; then :
13176 $as_echo_n "(cached) " >&6
13177else
13178 ac_check_lib_save_LIBS=$LIBS
13179LIBS="-lXft $XFT_LIBS $LIBS"
13180cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13181/* end confdefs.h. */
f199cab1 13182
5476a9a4
GM
13183/* Override any GCC internal prototype to avoid an error.
13184 Use char because int might match the return type of a GCC
13185 builtin and then its argument prototype would still apply. */
13186#ifdef __cplusplus
13187extern "C"
13188#endif
13189char XftFontOpen ();
13190int
13191main ()
13192{
13193return XftFontOpen ();
13194 ;
13195 return 0;
13196}
067d23c9 13197_ACEOF
5476a9a4
GM
13198if ac_fn_c_try_link "$LINENO"; then :
13199 ac_cv_lib_Xft_XftFontOpen=yes
13200else
13201 ac_cv_lib_Xft_XftFontOpen=no
13202fi
13203rm -f core conftest.err conftest.$ac_objext \
13204 conftest$ac_exeext conftest.$ac_ext
13205LIBS=$ac_check_lib_save_LIBS
13206fi
13207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xft_XftFontOpen" >&5
13208$as_echo "$ac_cv_lib_Xft_XftFontOpen" >&6; }
13209if test "x$ac_cv_lib_Xft_XftFontOpen" = x""yes; then :
13210 HAVE_XFT=yes
f199cab1
GM
13211fi
13212
5476a9a4 13213fi
f199cab1
GM
13214
13215
f199cab1 13216
5476a9a4 13217 if test "${HAVE_XFT}" = "yes"; then
f199cab1 13218
5476a9a4 13219$as_echo "#define HAVE_XFT 1" >>confdefs.h
f199cab1 13220
067d23c9 13221
5476a9a4
GM
13222 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $XFT_CFLAGS"
13223 else
13224 CPPFLAGS="$OLD_CPPFLAGS"
13225 CFLAGS="$OLD_CFLAGS"
13226 LIBS="$OLD_LIBS"
13227 fi # "${HAVE_XFT}" = "yes"
13228 fi # "$HAVE_XFT" != no
13229 fi # "x${with_xft}" != "xno"
f199cab1 13230
5476a9a4
GM
13231 ## We used to allow building with FreeType and without Xft.
13232 ## However, the ftx font backend driver is not in good shape.
13233 if test "$HAVE_XFT" != "yes"; then
13234 HAVE_XFT=no
13235 HAVE_FREETYPE=no
13236 else
f199cab1 13237
5476a9a4 13238 succeeded=no
f199cab1 13239
5476a9a4
GM
13240 if test "$PKG_CONFIG" = "no" ; then
13241 HAVE_FREETYPE=no
13242 else
13243 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 13244 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
13245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype2" >&5
13246$as_echo_n "checking for freetype2... " >&6; }
f199cab1 13247
b5591ebb
GM
13248 if "$PKG_CONFIG" --exists "freetype2" 2>&5 &&
13249 FREETYPE_CFLAGS=`"$PKG_CONFIG" --cflags "freetype2" 2>&5` &&
13250 FREETYPE_LIBS=`"$PKG_CONFIG" --libs "freetype2" 2>&5`; then
5476a9a4
GM
13251 edit_cflags="
13252 s,///*,/,g
13253 s/^/ /
13254 s/ -I/ $isystem/g
13255 s/^ //
13256 "
13257 FREETYPE_CFLAGS=`$as_echo "$FREETYPE_CFLAGS" | sed -e "$edit_cflags"`
13258 FREETYPE_LIBS=`$as_echo "$FREETYPE_LIBS" | sed -e 's,///*,/,g'`
13259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$FREETYPE_CFLAGS' LIBS='$FREETYPE_LIBS'" >&5
13260$as_echo "yes CFLAGS='$FREETYPE_CFLAGS' LIBS='$FREETYPE_LIBS'" >&6; }
13261 succeeded=yes
13262 else
13263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13264$as_echo "no" >&6; }
13265 FREETYPE_CFLAGS=""
13266 FREETYPE_LIBS=""
13267 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
13268 ## do set a variable so people can do so. Do it in a subshell
13269 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 13270 FREETYPE_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "freetype2") 2>&1`
f199cab1 13271
5476a9a4 13272 fi
f199cab1 13273
f199cab1 13274
067d23c9 13275
5476a9a4
GM
13276 else
13277 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
13278 echo "*** See http://www.freedesktop.org/software/pkgconfig"
13279 fi
067d23c9 13280 fi
f199cab1 13281
5476a9a4
GM
13282 if test $succeeded = yes; then
13283 HAVE_FREETYPE=yes
13284 else
13285 HAVE_FREETYPE=no
13286 fi
f199cab1 13287
f199cab1 13288
5476a9a4
GM
13289 test "$HAVE_FREETYPE" = "no" && as_fn_error "libxft requires libfreetype" "$LINENO" 5
13290 fi
f199cab1 13291
5476a9a4
GM
13292 HAVE_LIBOTF=no
13293 if test "${HAVE_FREETYPE}" = "yes"; then
f199cab1 13294
5476a9a4 13295$as_echo "#define HAVE_FREETYPE 1" >>confdefs.h
f199cab1 13296
5476a9a4 13297 if test "${with_libotf}" != "no"; then
f199cab1 13298
5476a9a4 13299 succeeded=no
f199cab1 13300
5476a9a4
GM
13301 if test "$PKG_CONFIG" = "no" ; then
13302 HAVE_LIBOTF=no
13303 else
13304 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 13305 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
13306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libotf" >&5
13307$as_echo_n "checking for libotf... " >&6; }
f199cab1 13308
b5591ebb
GM
13309 if "$PKG_CONFIG" --exists "libotf" 2>&5 &&
13310 LIBOTF_CFLAGS=`"$PKG_CONFIG" --cflags "libotf" 2>&5` &&
13311 LIBOTF_LIBS=`"$PKG_CONFIG" --libs "libotf" 2>&5`; then
5476a9a4
GM
13312 edit_cflags="
13313 s,///*,/,g
13314 s/^/ /
13315 s/ -I/ $isystem/g
13316 s/^ //
13317 "
13318 LIBOTF_CFLAGS=`$as_echo "$LIBOTF_CFLAGS" | sed -e "$edit_cflags"`
13319 LIBOTF_LIBS=`$as_echo "$LIBOTF_LIBS" | sed -e 's,///*,/,g'`
13320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBOTF_CFLAGS' LIBS='$LIBOTF_LIBS'" >&5
13321$as_echo "yes CFLAGS='$LIBOTF_CFLAGS' LIBS='$LIBOTF_LIBS'" >&6; }
13322 succeeded=yes
13323 else
13324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13325$as_echo "no" >&6; }
13326 LIBOTF_CFLAGS=""
13327 LIBOTF_LIBS=""
13328 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
13329 ## do set a variable so people can do so. Do it in a subshell
13330 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 13331 LIBOTF_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "libotf") 2>&1`
067d23c9 13332
5476a9a4 13333 fi
f199cab1
GM
13334
13335
067d23c9 13336
5476a9a4
GM
13337 else
13338 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
13339 echo "*** See http://www.freedesktop.org/software/pkgconfig"
13340 fi
13341 fi
f199cab1 13342
5476a9a4
GM
13343 if test $succeeded = yes; then
13344 HAVE_LIBOTF=yes
13345 else
13346 HAVE_LIBOTF=no
13347 fi
f199cab1 13348
5476a9a4 13349 if test "$HAVE_LIBOTF" = "yes"; then
f199cab1 13350
5476a9a4 13351$as_echo "#define HAVE_LIBOTF 1" >>confdefs.h
f199cab1 13352
5476a9a4
GM
13353 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTF_get_variation_glyphs in -lotf" >&5
13354$as_echo_n "checking for OTF_get_variation_glyphs in -lotf... " >&6; }
13355if test "${ac_cv_lib_otf_OTF_get_variation_glyphs+set}" = set; then :
067d23c9
KY
13356 $as_echo_n "(cached) " >&6
13357else
5476a9a4
GM
13358 ac_check_lib_save_LIBS=$LIBS
13359LIBS="-lotf $LIBS"
13360cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 13361/* end confdefs.h. */
5476a9a4
GM
13362
13363/* Override any GCC internal prototype to avoid an error.
13364 Use char because int might match the return type of a GCC
13365 builtin and then its argument prototype would still apply. */
13366#ifdef __cplusplus
13367extern "C"
13368#endif
13369char OTF_get_variation_glyphs ();
067d23c9
KY
13370int
13371main ()
13372{
5476a9a4 13373return OTF_get_variation_glyphs ();
067d23c9
KY
13374 ;
13375 return 0;
13376}
13377_ACEOF
5476a9a4
GM
13378if ac_fn_c_try_link "$LINENO"; then :
13379 ac_cv_lib_otf_OTF_get_variation_glyphs=yes
067d23c9 13380else
5476a9a4 13381 ac_cv_lib_otf_OTF_get_variation_glyphs=no
067d23c9 13382fi
5476a9a4
GM
13383rm -f core conftest.err conftest.$ac_objext \
13384 conftest$ac_exeext conftest.$ac_ext
13385LIBS=$ac_check_lib_save_LIBS
13386fi
13387{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_otf_OTF_get_variation_glyphs" >&5
13388$as_echo "$ac_cv_lib_otf_OTF_get_variation_glyphs" >&6; }
13389if test "x$ac_cv_lib_otf_OTF_get_variation_glyphs" = x""yes; then :
13390 HAVE_OTF_GET_VARIATION_GLYPHS=yes
13391else
13392 HAVE_OTF_GET_VARIATION_GLYPHS=no
067d23c9 13393fi
067d23c9 13394
5476a9a4
GM
13395 if test "${HAVE_OTF_GET_VARIATION_GLYPHS}" = "yes"; then
13396
13397$as_echo "#define HAVE_OTF_GET_VARIATION_GLYPHS 1" >>confdefs.h
13398
13399 fi
13400 fi
13401 fi
13402 fi
13403
13404 HAVE_M17N_FLT=no
13405 if test "${HAVE_LIBOTF}" = yes; then
13406 if test "${with_m17n_flt}" != "no"; then
13407
13408 succeeded=no
13409
13410 if test "$PKG_CONFIG" = "no" ; then
13411 HAVE_M17N_FLT=no
13412 else
13413 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 13414 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
13415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for m17n-flt" >&5
13416$as_echo_n "checking for m17n-flt... " >&6; }
13417
b5591ebb
GM
13418 if "$PKG_CONFIG" --exists "m17n-flt" 2>&5 &&
13419 M17N_FLT_CFLAGS=`"$PKG_CONFIG" --cflags "m17n-flt" 2>&5` &&
13420 M17N_FLT_LIBS=`"$PKG_CONFIG" --libs "m17n-flt" 2>&5`; then
5476a9a4
GM
13421 edit_cflags="
13422 s,///*,/,g
13423 s/^/ /
13424 s/ -I/ $isystem/g
13425 s/^ //
13426 "
13427 M17N_FLT_CFLAGS=`$as_echo "$M17N_FLT_CFLAGS" | sed -e "$edit_cflags"`
13428 M17N_FLT_LIBS=`$as_echo "$M17N_FLT_LIBS" | sed -e 's,///*,/,g'`
13429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$M17N_FLT_CFLAGS' LIBS='$M17N_FLT_LIBS'" >&5
13430$as_echo "yes CFLAGS='$M17N_FLT_CFLAGS' LIBS='$M17N_FLT_LIBS'" >&6; }
13431 succeeded=yes
13432 else
13433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13434$as_echo "no" >&6; }
13435 M17N_FLT_CFLAGS=""
13436 M17N_FLT_LIBS=""
13437 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
13438 ## do set a variable so people can do so. Do it in a subshell
13439 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 13440 M17N_FLT_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "m17n-flt") 2>&1`
5476a9a4
GM
13441
13442 fi
13443
13444
067d23c9 13445
5476a9a4
GM
13446 else
13447 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
13448 echo "*** See http://www.freedesktop.org/software/pkgconfig"
13449 fi
f199cab1 13450 fi
067d23c9 13451
5476a9a4
GM
13452 if test $succeeded = yes; then
13453 HAVE_M17N_FLT=yes
13454 else
13455 HAVE_M17N_FLT=no
13456 fi
13457
13458 if test "$HAVE_M17N_FLT" = "yes"; then
13459
13460$as_echo "#define HAVE_M17N_FLT 1" >>confdefs.h
13461
13462 fi
13463 fi
13464 fi
13465else
13466 HAVE_XFT=no
13467 HAVE_FREETYPE=no
13468 HAVE_LIBOTF=no
13469 HAVE_M17N_FLT=no
13470fi
13471
13472### End of font-backend (under X11) section.
13473
13474
067d23c9 13475
067d23c9 13476
5476a9a4
GM
13477
13478
13479
13480
13481
13482
13483### Use -lXpm if available, unless `--with-xpm=no'.
7c61eaab 13484### mingw32 doesn't use -lXpm, since it loads the library dynamically.
5476a9a4
GM
13485HAVE_XPM=no
13486LIBXPM=
7c61eaab 13487if test "${HAVE_W32}" = "yes" && test "${opsys}" = "cygwin"; then
5c0255d9
GM
13488 if test "${with_xpm}" != "no"; then
13489 SAVE_CPPFLAGS="$CPPFLAGS"
13490 SAVE_LDFLAGS="$LDFLAGS"
13491 CPPFLAGS="$CPPFLAGS -I/usr/include/noX"
13492 LDFLAGS="$LDFLAGS -L/usr/lib/noX"
13493 ac_fn_c_check_header_mongrel "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "$ac_includes_default"
13494if test "x$ac_cv_header_X11_xpm_h" = x""yes; then :
13495 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReadFileToImage in -lXpm" >&5
13496$as_echo_n "checking for XpmReadFileToImage in -lXpm... " >&6; }
13497if test "${ac_cv_lib_Xpm_XpmReadFileToImage+set}" = set; then :
13498 $as_echo_n "(cached) " >&6
13499else
13500 ac_check_lib_save_LIBS=$LIBS
13501LIBS="-lXpm $LIBS"
13502cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13503/* end confdefs.h. */
13504
13505/* Override any GCC internal prototype to avoid an error.
13506 Use char because int might match the return type of a GCC
13507 builtin and then its argument prototype would still apply. */
13508#ifdef __cplusplus
13509extern "C"
13510#endif
13511char XpmReadFileToImage ();
13512int
13513main ()
13514{
13515return XpmReadFileToImage ();
13516 ;
13517 return 0;
13518}
13519_ACEOF
13520if ac_fn_c_try_link "$LINENO"; then :
13521 ac_cv_lib_Xpm_XpmReadFileToImage=yes
13522else
13523 ac_cv_lib_Xpm_XpmReadFileToImage=no
13524fi
13525rm -f core conftest.err conftest.$ac_objext \
13526 conftest$ac_exeext conftest.$ac_ext
13527LIBS=$ac_check_lib_save_LIBS
13528fi
13529{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmReadFileToImage" >&5
13530$as_echo "$ac_cv_lib_Xpm_XpmReadFileToImage" >&6; }
13531if test "x$ac_cv_lib_Xpm_XpmReadFileToImage" = x""yes; then :
13532 HAVE_XPM=yes
13533fi
13534
13535fi
13536
13537
13538 if test "${HAVE_XPM}" = "yes"; then
13539 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReturnAllocPixels preprocessor define" >&5
13540$as_echo_n "checking for XpmReturnAllocPixels preprocessor define... " >&6; }
13541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13542/* end confdefs.h. */
13543#include "X11/xpm.h"
13544#ifndef XpmReturnAllocPixels
13545no_return_alloc_pixels
13546#endif
13547
13548_ACEOF
13549if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13550 $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then :
13551 HAVE_XPM=no
13552else
13553 HAVE_XPM=yes
13554fi
13555rm -f conftest*
13556
13557
13558 if test "${HAVE_XPM}" = "yes"; then
13559 REAL_CPPFLAGS="$REAL_CPPFLAGS -I/usr/include/noX"
13560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13561$as_echo "yes" >&6; }
13562 else
13563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13564$as_echo "no" >&6; }
13565 CPPFLAGS="$SAVE_CPPFLAGS"
13566 LDFLAGS="$SAVE_LDFLAGS"
13567 fi
13568 fi
13569 fi
13570
13571 if test "${HAVE_XPM}" = "yes"; then
13572
13573$as_echo "#define HAVE_XPM 1" >>confdefs.h
13574
13575 LIBXPM=-lXpm
13576 fi
13577fi
13578
5476a9a4
GM
13579if test "${HAVE_X11}" = "yes"; then
13580 if test "${with_xpm}" != "no"; then
13581 ac_fn_c_check_header_mongrel "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "$ac_includes_default"
13582if test "x$ac_cv_header_X11_xpm_h" = x""yes; then :
13583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReadFileToPixmap in -lXpm" >&5
13584$as_echo_n "checking for XpmReadFileToPixmap in -lXpm... " >&6; }
13585if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then :
f199cab1
GM
13586 $as_echo_n "(cached) " >&6
13587else
5476a9a4
GM
13588 ac_check_lib_save_LIBS=$LIBS
13589LIBS="-lXpm -lX11 $LIBS"
13590cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
13591/* end confdefs.h. */
13592
5476a9a4
GM
13593/* Override any GCC internal prototype to avoid an error.
13594 Use char because int might match the return type of a GCC
13595 builtin and then its argument prototype would still apply. */
13596#ifdef __cplusplus
13597extern "C"
13598#endif
13599char XpmReadFileToPixmap ();
067d23c9
KY
13600int
13601main ()
13602{
5476a9a4 13603return XpmReadFileToPixmap ();
067d23c9
KY
13604 ;
13605 return 0;
13606}
13607_ACEOF
5476a9a4
GM
13608if ac_fn_c_try_link "$LINENO"; then :
13609 ac_cv_lib_Xpm_XpmReadFileToPixmap=yes
067d23c9 13610else
5476a9a4 13611 ac_cv_lib_Xpm_XpmReadFileToPixmap=no
067d23c9 13612fi
5476a9a4
GM
13613rm -f core conftest.err conftest.$ac_objext \
13614 conftest$ac_exeext conftest.$ac_ext
13615LIBS=$ac_check_lib_save_LIBS
13616fi
13617{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5
13618$as_echo "$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6; }
13619if test "x$ac_cv_lib_Xpm_XpmReadFileToPixmap" = x""yes; then :
13620 HAVE_XPM=yes
f199cab1 13621fi
067d23c9
KY
13622
13623fi
13624
13625
5476a9a4
GM
13626 if test "${HAVE_XPM}" = "yes"; then
13627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReturnAllocPixels preprocessor define" >&5
13628$as_echo_n "checking for XpmReturnAllocPixels preprocessor define... " >&6; }
13629 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13630/* end confdefs.h. */
13631#include "X11/xpm.h"
13632#ifndef XpmReturnAllocPixels
13633no_return_alloc_pixels
13634#endif
067d23c9 13635
067d23c9 13636_ACEOF
5476a9a4
GM
13637if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13638 $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then :
13639 HAVE_XPM=no
13640else
13641 HAVE_XPM=yes
13642fi
13643rm -f conftest*
067d23c9 13644
067d23c9 13645
5476a9a4
GM
13646 if test "${HAVE_XPM}" = "yes"; then
13647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13648$as_echo "yes" >&6; }
13649 else
13650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13651$as_echo "no" >&6; }
13652 fi
13653 fi
13654 fi
067d23c9 13655
5476a9a4 13656 if test "${HAVE_XPM}" = "yes"; then
067d23c9 13657
5476a9a4 13658$as_echo "#define HAVE_XPM 1" >>confdefs.h
067d23c9 13659
5476a9a4
GM
13660 LIBXPM=-lXpm
13661 fi
067d23c9
KY
13662fi
13663
7c61eaab
GM
13664### FIXME: Perhaps regroup to minimize code duplication due to MinGW's
13665### slightly different requirements wrt image libraries (it doesn't
13666### use -lXpm because it loads the xpm shared library dynamically at
13667### run time).
13668if test "${opsys}" = "mingw32"; then
13669 if test "${with_xpm}" != "no"; then
13670 ac_fn_c_check_header_compile "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "
13671#define FOR_MSW 1
13672"
13673if test "x$ac_cv_header_X11_xpm_h" = x""yes; then :
13674 HAVE_XPM=yes
13675else
13676 HAVE_XPM=no
13677fi
13678
13679
13680 fi
13681
13682 if test "${HAVE_XPM}" = "yes"; then
13683
13684$as_echo "#define HAVE_XPM 1" >>confdefs.h
13685
13686 fi
13687fi
13688
f199cab1 13689
5c0255d9 13690
5476a9a4 13691### Use -ljpeg if available, unless `--with-jpeg=no'.
7c61eaab 13692### mingw32 doesn't use -ljpeg, since it loads the library dynamically.
5476a9a4
GM
13693HAVE_JPEG=no
13694LIBJPEG=
7c61eaab
GM
13695if test "${opsys}" = "mingw32"; then
13696 if test "${with_jpeg}" != "no"; then
13697 ac_fn_c_check_header_mongrel "$LINENO" "jerror.h" "ac_cv_header_jerror_h" "$ac_includes_default"
13698if test "x$ac_cv_header_jerror_h" = x""yes; then :
13699 HAVE_JPEG=yes
13700else
13701 HAVE_JPEG=no
13702fi
13703
13704
13705 fi
13706 if test "${HAVE_JPEG}" = "yes"; then
13707 $as_echo "#define HAVE_JPEG 1" >>confdefs.h
13708
13709 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13710/* end confdefs.h. */
13711#include <jpeglib.h>
13712 version=JPEG_LIB_VERSION
13713
13714_ACEOF
13715if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13716 $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then :
13717 $as_echo "#define HAVE_JPEG 1" >>confdefs.h
13718
13719else
13720 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libjpeg found, but not version 6b or later" >&5
13721$as_echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;}
13722 HAVE_JPEG=no
13723fi
13724rm -f conftest*
13725
13726 fi
13727elif test "${HAVE_X11}" = "yes" || test "${HAVE_W32}" = "yes"; then
5476a9a4
GM
13728 if test "${with_jpeg}" != "no"; then
13729 ac_fn_c_check_header_mongrel "$LINENO" "jerror.h" "ac_cv_header_jerror_h" "$ac_includes_default"
13730if test "x$ac_cv_header_jerror_h" = x""yes; then :
13731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_destroy_compress in -ljpeg" >&5
13732$as_echo_n "checking for jpeg_destroy_compress in -ljpeg... " >&6; }
13733if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then :
067d23c9
KY
13734 $as_echo_n "(cached) " >&6
13735else
5476a9a4
GM
13736 ac_check_lib_save_LIBS=$LIBS
13737LIBS="-ljpeg $LIBS"
13738cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 13739/* end confdefs.h. */
f199cab1 13740
5476a9a4
GM
13741/* Override any GCC internal prototype to avoid an error.
13742 Use char because int might match the return type of a GCC
13743 builtin and then its argument prototype would still apply. */
13744#ifdef __cplusplus
13745extern "C"
13746#endif
13747char jpeg_destroy_compress ();
067d23c9
KY
13748int
13749main ()
13750{
5476a9a4 13751return jpeg_destroy_compress ();
067d23c9
KY
13752 ;
13753 return 0;
13754}
13755_ACEOF
13756if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 13757 ac_cv_lib_jpeg_jpeg_destroy_compress=yes
067d23c9 13758else
5476a9a4 13759 ac_cv_lib_jpeg_jpeg_destroy_compress=no
067d23c9
KY
13760fi
13761rm -f core conftest.err conftest.$ac_objext \
13762 conftest$ac_exeext conftest.$ac_ext
5476a9a4
GM
13763LIBS=$ac_check_lib_save_LIBS
13764fi
13765{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5
13766$as_echo "$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6; }
13767if test "x$ac_cv_lib_jpeg_jpeg_destroy_compress" = x""yes; then :
13768 HAVE_JPEG=yes
13769fi
13770
067d23c9 13771fi
f199cab1 13772
f199cab1
GM
13773
13774 fi
067d23c9 13775
5476a9a4
GM
13776 if test "${HAVE_JPEG}" = "yes"; then
13777 $as_echo "#define HAVE_JPEG 1" >>confdefs.h
f199cab1 13778
5476a9a4
GM
13779 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13780/* end confdefs.h. */
13781#include <jpeglib.h>
13782 version=JPEG_LIB_VERSION
f199cab1 13783
5476a9a4
GM
13784_ACEOF
13785if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13786 $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then :
13787 $as_echo "#define HAVE_JPEG 1" >>confdefs.h
f199cab1 13788
5476a9a4
GM
13789else
13790 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libjpeg found, but not version 6b or later" >&5
13791$as_echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;}
7c61eaab 13792 HAVE_JPEG=no
067d23c9 13793fi
5476a9a4 13794rm -f conftest*
067d23c9 13795
5476a9a4
GM
13796 fi
13797 if test "${HAVE_JPEG}" = "yes"; then
13798 LIBJPEG=-ljpeg
13799 fi
13800fi
067d23c9
KY
13801
13802
5476a9a4 13803### Use -lpng if available, unless `--with-png=no'.
7c61eaab 13804### mingw32 doesn't use -lpng, since it loads the library dynamically.
5476a9a4
GM
13805HAVE_PNG=no
13806LIBPNG=
7c61eaab
GM
13807if test "${opsys}" = "mingw32"; then
13808 if test "${with_png}" != "no"; then
13809 ac_fn_c_check_header_mongrel "$LINENO" "png.h" "ac_cv_header_png_h" "$ac_includes_default"
13810if test "x$ac_cv_header_png_h" = x""yes; then :
13811 HAVE_PNG=yes
13812else
13813 HAVE_PNG=no
13814fi
13815
13816
13817 fi
13818 if test "${HAVE_PNG}" = "yes"; then
13819
13820$as_echo "#define HAVE_PNG 1" >>confdefs.h
13821
13822
13823 ac_fn_c_check_decl "$LINENO" "png_longjmp" "ac_cv_have_decl_png_longjmp" "#ifdef HAVE_LIBPNG_PNG_H
13824 # include <libpng/png.h>
13825 #else
13826 # include <png.h>
13827 #endif
13828
13829"
13830if test "x$ac_cv_have_decl_png_longjmp" = x""yes; then :
13831
13832else
13833
13834$as_echo "#define PNG_DEPSTRUCT /**/" >>confdefs.h
13835
13836fi
13837
13838 fi
13839elif test "${HAVE_X11}" = "yes" || test "${HAVE_W32}" = "yes"; then
5476a9a4
GM
13840 if test "${with_png}" != "no"; then
13841 # Debian unstable as of July 2003 has multiple libpngs, and puts png.h
13842 # in /usr/include/libpng.
13843 for ac_header in png.h libpng/png.h
13844do :
13845 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13846ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13847eval as_val=\$$as_ac_Header
13848 if test "x$as_val" = x""yes; then :
13849 cat >>confdefs.h <<_ACEOF
13850#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13851_ACEOF
13852 break
13853fi
067d23c9 13854
5476a9a4 13855done
067d23c9 13856
5476a9a4
GM
13857 if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then
13858 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_get_channels in -lpng" >&5
13859$as_echo_n "checking for png_get_channels in -lpng... " >&6; }
13860if test "${ac_cv_lib_png_png_get_channels+set}" = set; then :
13861 $as_echo_n "(cached) " >&6
13862else
13863 ac_check_lib_save_LIBS=$LIBS
13864LIBS="-lpng -lz -lm $LIBS"
13865cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13866/* end confdefs.h. */
067d23c9 13867
5476a9a4
GM
13868/* Override any GCC internal prototype to avoid an error.
13869 Use char because int might match the return type of a GCC
13870 builtin and then its argument prototype would still apply. */
13871#ifdef __cplusplus
13872extern "C"
13873#endif
13874char png_get_channels ();
13875int
13876main ()
13877{
13878return png_get_channels ();
13879 ;
13880 return 0;
13881}
13882_ACEOF
13883if ac_fn_c_try_link "$LINENO"; then :
13884 ac_cv_lib_png_png_get_channels=yes
f199cab1 13885else
5476a9a4
GM
13886 ac_cv_lib_png_png_get_channels=no
13887fi
13888rm -f core conftest.err conftest.$ac_objext \
13889 conftest$ac_exeext conftest.$ac_ext
13890LIBS=$ac_check_lib_save_LIBS
13891fi
13892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_png_png_get_channels" >&5
13893$as_echo "$ac_cv_lib_png_png_get_channels" >&6; }
13894if test "x$ac_cv_lib_png_png_get_channels" = x""yes; then :
13895 HAVE_PNG=yes
f199cab1 13896fi
067d23c9 13897
5476a9a4
GM
13898 fi
13899 fi
7834125e 13900
5476a9a4
GM
13901 if test "${HAVE_PNG}" = "yes"; then
13902
13903$as_echo "#define HAVE_PNG 1" >>confdefs.h
13904
13905 LIBPNG="-lpng -lz -lm"
13906
13907 ac_fn_c_check_decl "$LINENO" "png_longjmp" "ac_cv_have_decl_png_longjmp" "#ifdef HAVE_LIBPNG_PNG_H
13908 # include <libpng/png.h>
13909 #else
13910 # include <png.h>
13911 #endif
13912
13913"
13914if test "x$ac_cv_have_decl_png_longjmp" = x""yes; then :
13915
13916else
7834125e 13917
5476a9a4 13918$as_echo "#define PNG_DEPSTRUCT /**/" >>confdefs.h
7834125e 13919
f199cab1 13920fi
7834125e 13921
5476a9a4
GM
13922 fi
13923fi
7834125e
GM
13924
13925
7a67e06b
GM
13926HAVE_ZLIB=no
13927LIBZ=
13928if test "${with_zlib}" != "no"; then
31593bf6
GM
13929 OLIBS=$LIBS
13930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inflateEnd" >&5
7a67e06b
GM
13931$as_echo_n "checking for library containing inflateEnd... " >&6; }
13932if test "${ac_cv_search_inflateEnd+set}" = set; then :
13933 $as_echo_n "(cached) " >&6
13934else
13935 ac_func_search_save_LIBS=$LIBS
13936cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13937/* end confdefs.h. */
13938
13939/* Override any GCC internal prototype to avoid an error.
13940 Use char because int might match the return type of a GCC
13941 builtin and then its argument prototype would still apply. */
13942#ifdef __cplusplus
13943extern "C"
13944#endif
13945char inflateEnd ();
13946int
13947main ()
13948{
13949return inflateEnd ();
13950 ;
13951 return 0;
13952}
13953_ACEOF
13954for ac_lib in '' z; do
13955 if test -z "$ac_lib"; then
13956 ac_res="none required"
13957 else
13958 ac_res=-l$ac_lib
13959 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
13960 fi
13961 if ac_fn_c_try_link "$LINENO"; then :
13962 ac_cv_search_inflateEnd=$ac_res
13963fi
13964rm -f core conftest.err conftest.$ac_objext \
13965 conftest$ac_exeext
13966 if test "${ac_cv_search_inflateEnd+set}" = set; then :
13967 break
13968fi
13969done
13970if test "${ac_cv_search_inflateEnd+set}" = set; then :
13971
13972else
13973 ac_cv_search_inflateEnd=no
13974fi
13975rm conftest.$ac_ext
13976LIBS=$ac_func_search_save_LIBS
13977fi
13978{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inflateEnd" >&5
13979$as_echo "$ac_cv_search_inflateEnd" >&6; }
13980ac_res=$ac_cv_search_inflateEnd
13981if test "$ac_res" != no; then :
13982 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13983 HAVE_ZLIB=yes
13984fi
13985
31593bf6
GM
13986 LIBS=$OLIBS
13987 case $ac_cv_search_inflateEnd in
13988 -*) LIBZ=$ac_cv_search_inflateEnd ;;
13989 esac
7a67e06b
GM
13990fi
13991if test "${HAVE_ZLIB}" = "yes"; then
13992
13993$as_echo "#define HAVE_ZLIB 1" >>confdefs.h
13994
31593bf6
GM
13995 ### mingw32 doesn't use -lz, since it loads the library dynamically.
13996 if test "${opsys}" = "mingw32"; then
13997 LIBZ=
13998 fi
7a67e06b
GM
13999fi
14000
14001
14002
5476a9a4 14003### Use -ltiff if available, unless `--with-tiff=no'.
7c61eaab 14004### mingw32 doesn't use -ltiff, since it loads the library dynamically.
5476a9a4
GM
14005HAVE_TIFF=no
14006LIBTIFF=
7c61eaab
GM
14007if test "${opsys}" = "mingw32"; then
14008 if test "${with_tiff}" != "no"; then
14009 ac_fn_c_check_header_mongrel "$LINENO" "tiffio.h" "ac_cv_header_tiffio_h" "$ac_includes_default"
14010if test "x$ac_cv_header_tiffio_h" = x""yes; then :
14011 HAVE_TIFF=yes
14012else
14013 HAVE_TIFF=no
14014fi
14015
14016
14017 fi
14018 if test "${HAVE_TIFF}" = "yes"; then
14019
14020$as_echo "#define HAVE_TIFF 1" >>confdefs.h
14021
14022 fi
14023elif test "${HAVE_X11}" = "yes" || test "${HAVE_W32}" = "yes"; then
5476a9a4
GM
14024 if test "${with_tiff}" != "no"; then
14025 ac_fn_c_check_header_mongrel "$LINENO" "tiffio.h" "ac_cv_header_tiffio_h" "$ac_includes_default"
14026if test "x$ac_cv_header_tiffio_h" = x""yes; then :
14027 tifflibs="-lz -lm"
14028 # At least one tiff package requires the jpeg library.
14029 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
14030 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIFFGetVersion in -ltiff" >&5
14031$as_echo_n "checking for TIFFGetVersion in -ltiff... " >&6; }
14032if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then :
f199cab1
GM
14033 $as_echo_n "(cached) " >&6
14034else
5476a9a4
GM
14035 ac_check_lib_save_LIBS=$LIBS
14036LIBS="-ltiff $tifflibs $LIBS"
14037cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 14038/* end confdefs.h. */
067d23c9 14039
5476a9a4
GM
14040/* Override any GCC internal prototype to avoid an error.
14041 Use char because int might match the return type of a GCC
14042 builtin and then its argument prototype would still apply. */
14043#ifdef __cplusplus
14044extern "C"
f199cab1 14045#endif
5476a9a4
GM
14046char TIFFGetVersion ();
14047int
14048main ()
14049{
14050return TIFFGetVersion ();
14051 ;
14052 return 0;
14053}
f199cab1 14054_ACEOF
5476a9a4
GM
14055if ac_fn_c_try_link "$LINENO"; then :
14056 ac_cv_lib_tiff_TIFFGetVersion=yes
f199cab1 14057else
5476a9a4 14058 ac_cv_lib_tiff_TIFFGetVersion=no
f199cab1 14059fi
5476a9a4
GM
14060rm -f core conftest.err conftest.$ac_objext \
14061 conftest$ac_exeext conftest.$ac_ext
14062LIBS=$ac_check_lib_save_LIBS
f199cab1 14063fi
5476a9a4
GM
14064{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5
14065$as_echo "$ac_cv_lib_tiff_TIFFGetVersion" >&6; }
14066if test "x$ac_cv_lib_tiff_TIFFGetVersion" = x""yes; then :
14067 HAVE_TIFF=yes
f199cab1 14068fi
067d23c9 14069
5476a9a4 14070fi
067d23c9 14071
067d23c9 14072
5476a9a4 14073 fi
f199cab1 14074
5476a9a4 14075 if test "${HAVE_TIFF}" = "yes"; then
067d23c9 14076
5476a9a4 14077$as_echo "#define HAVE_TIFF 1" >>confdefs.h
067d23c9 14078
5476a9a4
GM
14079 LIBTIFF=-ltiff
14080 fi
f199cab1 14081fi
067d23c9 14082
067d23c9 14083
5476a9a4 14084### Use -lgif or -lungif if available, unless `--with-gif=no'.
7c61eaab 14085### mingw32 doesn't use -lgif/-lungif, since it loads the library dynamically.
5476a9a4
GM
14086HAVE_GIF=no
14087LIBGIF=
7c61eaab
GM
14088if test "${opsys}" = "mingw32"; then
14089 if test "${with_gif}" != "no"; then
14090 ac_fn_c_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
14091if test "x$ac_cv_header_gif_lib_h" = x""yes; then :
14092 HAVE_GIF=yes
14093else
14094 HAVE_GIF=no
14095fi
14096
14097
14098 fi
14099 if test "${HAVE_GIF}" = "yes"; then
14100
14101$as_echo "#define HAVE_GIF 1" >>confdefs.h
14102
14103 fi
14104elif test "${HAVE_X11}" = "yes" && test "${with_gif}" != "no" \
5c0255d9 14105 || test "${HAVE_W32}" = "yes"; then
5476a9a4
GM
14106 ac_fn_c_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
14107if test "x$ac_cv_header_gif_lib_h" = x""yes; then :
14108 # EGifPutExtensionLast only exists from version libungif-4.1.0b1.
14109# Earlier versions can crash Emacs.
14110 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lgif" >&5
14111$as_echo_n "checking for EGifPutExtensionLast in -lgif... " >&6; }
14112if test "${ac_cv_lib_gif_EGifPutExtensionLast+set}" = set; then :
f199cab1
GM
14113 $as_echo_n "(cached) " >&6
14114else
5476a9a4
GM
14115 ac_check_lib_save_LIBS=$LIBS
14116LIBS="-lgif $LIBS"
14117cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 14118/* end confdefs.h. */
067d23c9 14119
5476a9a4
GM
14120/* Override any GCC internal prototype to avoid an error.
14121 Use char because int might match the return type of a GCC
14122 builtin and then its argument prototype would still apply. */
14123#ifdef __cplusplus
14124extern "C"
14125#endif
14126char EGifPutExtensionLast ();
f199cab1
GM
14127int
14128main ()
14129{
5476a9a4 14130return EGifPutExtensionLast ();
f199cab1
GM
14131 ;
14132 return 0;
14133}
14134_ACEOF
5476a9a4
GM
14135if ac_fn_c_try_link "$LINENO"; then :
14136 ac_cv_lib_gif_EGifPutExtensionLast=yes
f199cab1 14137else
5476a9a4 14138 ac_cv_lib_gif_EGifPutExtensionLast=no
f199cab1 14139fi
5476a9a4
GM
14140rm -f core conftest.err conftest.$ac_objext \
14141 conftest$ac_exeext conftest.$ac_ext
14142LIBS=$ac_check_lib_save_LIBS
14143fi
14144{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_EGifPutExtensionLast" >&5
14145$as_echo "$ac_cv_lib_gif_EGifPutExtensionLast" >&6; }
14146if test "x$ac_cv_lib_gif_EGifPutExtensionLast" = x""yes; then :
14147 HAVE_GIF=yes
14148else
14149 HAVE_GIF=maybe
f199cab1 14150fi
067d23c9 14151
5476a9a4
GM
14152fi
14153
14154
14155
14156 if test "$HAVE_GIF" = yes; then
14157 LIBGIF=-lgif
14158 elif test "$HAVE_GIF" = maybe; then
14159# If gif_lib.h but no libgif, try libungif.
14160 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lungif" >&5
14161$as_echo_n "checking for EGifPutExtensionLast in -lungif... " >&6; }
14162if test "${ac_cv_lib_ungif_EGifPutExtensionLast+set}" = set; then :
f199cab1
GM
14163 $as_echo_n "(cached) " >&6
14164else
5476a9a4
GM
14165 ac_check_lib_save_LIBS=$LIBS
14166LIBS="-lungif $LIBS"
14167cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 14168/* end confdefs.h. */
f199cab1 14169
5476a9a4
GM
14170/* Override any GCC internal prototype to avoid an error.
14171 Use char because int might match the return type of a GCC
14172 builtin and then its argument prototype would still apply. */
14173#ifdef __cplusplus
14174extern "C"
14175#endif
14176char EGifPutExtensionLast ();
f199cab1
GM
14177int
14178main ()
14179{
5476a9a4 14180return EGifPutExtensionLast ();
f199cab1
GM
14181 ;
14182 return 0;
14183}
14184_ACEOF
5476a9a4
GM
14185if ac_fn_c_try_link "$LINENO"; then :
14186 ac_cv_lib_ungif_EGifPutExtensionLast=yes
f199cab1 14187else
5476a9a4 14188 ac_cv_lib_ungif_EGifPutExtensionLast=no
f199cab1 14189fi
5476a9a4
GM
14190rm -f core conftest.err conftest.$ac_objext \
14191 conftest$ac_exeext conftest.$ac_ext
14192LIBS=$ac_check_lib_save_LIBS
f199cab1 14193fi
5476a9a4
GM
14194{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5
14195$as_echo "$ac_cv_lib_ungif_EGifPutExtensionLast" >&6; }
14196if test "x$ac_cv_lib_ungif_EGifPutExtensionLast" = x""yes; then :
14197 HAVE_GIF=yes
14198else
14199 HAVE_GIF=no
14200fi
14201
14202 test "$HAVE_GIF" = yes && LIBGIF=-lungif
14203 fi
14204
14205 if test "${HAVE_GIF}" = "yes"; then
14206
14207$as_echo "#define HAVE_GIF 1" >>confdefs.h
14208
14209 fi
14210fi
14211
14212
14213if test "${HAVE_X11}" = "yes"; then
14214 MISSING=""
14215 WITH_NO=""
14216 test "${with_xpm}" != "no" && test "${HAVE_XPM}" != "yes" &&
14217 MISSING="libXpm" && WITH_NO="--with-xpm=no"
14218 test "${with_jpeg}" != "no" && test "${HAVE_JPEG}" != "yes" &&
14219 MISSING="$MISSING libjpeg" && WITH_NO="$WITH_NO --with-jpeg=no"
14220 test "${with_png}" != "no" && test "${HAVE_PNG}" != "yes" &&
14221 MISSING="$MISSING libpng" && WITH_NO="$WITH_NO --with-png=no"
14222 test "${with_gif}" != "no" && test "${HAVE_GIF}" != "yes" &&
14223 MISSING="$MISSING libgif/libungif" && WITH_NO="$WITH_NO --with-gif=no"
14224 test "${with_tiff}" != "no" && test "${HAVE_TIFF}" != "yes" &&
14225 MISSING="$MISSING libtiff" && WITH_NO="$WITH_NO --with-tiff=no"
14226
14227 if test "X${MISSING}" != X; then
14228 as_fn_error "The following required libraries were not found:
14229 $MISSING
14230Maybe some development libraries/packages are missing?
14231If you don't want to link with them give
14232 $WITH_NO
14233as options to configure" "$LINENO" 5
14234 fi
14235fi
14236
14237### Use -lgpm if available, unless `--with-gpm=no'.
14238HAVE_GPM=no
14239LIBGPM=
14240if test "${with_gpm}" != "no"; then
14241 ac_fn_c_check_header_mongrel "$LINENO" "gpm.h" "ac_cv_header_gpm_h" "$ac_includes_default"
14242if test "x$ac_cv_header_gpm_h" = x""yes; then :
14243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Gpm_Open in -lgpm" >&5
14244$as_echo_n "checking for Gpm_Open in -lgpm... " >&6; }
14245if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then :
067d23c9
KY
14246 $as_echo_n "(cached) " >&6
14247else
5476a9a4
GM
14248 ac_check_lib_save_LIBS=$LIBS
14249LIBS="-lgpm $LIBS"
14250cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
14251/* end confdefs.h. */
14252
5476a9a4
GM
14253/* Override any GCC internal prototype to avoid an error.
14254 Use char because int might match the return type of a GCC
14255 builtin and then its argument prototype would still apply. */
14256#ifdef __cplusplus
14257extern "C"
14258#endif
14259char Gpm_Open ();
067d23c9
KY
14260int
14261main ()
14262{
5476a9a4 14263return Gpm_Open ();
067d23c9
KY
14264 ;
14265 return 0;
14266}
14267_ACEOF
5476a9a4
GM
14268if ac_fn_c_try_link "$LINENO"; then :
14269 ac_cv_lib_gpm_Gpm_Open=yes
067d23c9 14270else
5476a9a4 14271 ac_cv_lib_gpm_Gpm_Open=no
067d23c9 14272fi
5476a9a4
GM
14273rm -f core conftest.err conftest.$ac_objext \
14274 conftest$ac_exeext conftest.$ac_ext
14275LIBS=$ac_check_lib_save_LIBS
14276fi
14277{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gpm_Gpm_Open" >&5
14278$as_echo "$ac_cv_lib_gpm_Gpm_Open" >&6; }
14279if test "x$ac_cv_lib_gpm_Gpm_Open" = x""yes; then :
14280 HAVE_GPM=yes
067d23c9 14281fi
f199cab1 14282
5476a9a4 14283fi
f199cab1 14284
f199cab1 14285
f199cab1 14286
5476a9a4 14287 if test "${HAVE_GPM}" = "yes"; then
f199cab1 14288
5476a9a4 14289$as_echo "#define HAVE_GPM 1" >>confdefs.h
f199cab1 14290
5476a9a4
GM
14291 LIBGPM=-lgpm
14292 fi
067d23c9 14293fi
067d23c9
KY
14294
14295
14296
14297
14298
14299
5476a9a4
GM
14300GNUSTEP_CFLAGS=
14301### Use NeXTstep API to implement GUI.
14302if test "${HAVE_NS}" = "yes"; then
067d23c9 14303
5476a9a4 14304$as_echo "#define HAVE_NS 1" >>confdefs.h
067d23c9 14305
5476a9a4 14306 if test "${NS_IMPL_COCOA}" = "yes"; then
067d23c9 14307
5476a9a4 14308$as_echo "#define NS_IMPL_COCOA 1" >>confdefs.h
f199cab1 14309
5476a9a4
GM
14310 fi
14311 if test "${NS_IMPL_GNUSTEP}" = "yes"; then
f199cab1 14312
5476a9a4 14313$as_echo "#define NS_IMPL_GNUSTEP 1" >>confdefs.h
f199cab1 14314
5476a9a4
GM
14315 # See also .m.o rule in Makefile.in */
14316 # FIXME: are all these flags really needed? Document here why. */
14317 GNUSTEP_CFLAGS="-D_REENTRANT -fPIC -fno-strict-aliasing -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
14318 ## Extra CFLAGS applied to src/*.m files.
14319 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"
14320 fi
14321 # We also have mouse menus.
14322 HAVE_MENUS=yes
14323 OTHER_FILES=ns-app
14324fi
f199cab1 14325
5c0255d9
GM
14326if test "${HAVE_W32}" = "yes"; then
14327 HAVE_MENUS=yes
14328fi
f199cab1 14329
5476a9a4
GM
14330### Use session management (-lSM -lICE) if available
14331HAVE_X_SM=no
14332LIBXSM=
14333if test "${HAVE_X11}" = "yes"; then
14334 ac_fn_c_check_header_mongrel "$LINENO" "X11/SM/SMlib.h" "ac_cv_header_X11_SM_SMlib_h" "$ac_includes_default"
14335if test "x$ac_cv_header_X11_SM_SMlib_h" = x""yes; then :
14336 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SmcOpenConnection in -lSM" >&5
14337$as_echo_n "checking for SmcOpenConnection in -lSM... " >&6; }
14338if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then :
067d23c9
KY
14339 $as_echo_n "(cached) " >&6
14340else
5476a9a4
GM
14341 ac_check_lib_save_LIBS=$LIBS
14342LIBS="-lSM -lICE $LIBS"
14343cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
14344/* end confdefs.h. */
14345
5476a9a4
GM
14346/* Override any GCC internal prototype to avoid an error.
14347 Use char because int might match the return type of a GCC
14348 builtin and then its argument prototype would still apply. */
14349#ifdef __cplusplus
14350extern "C"
14351#endif
14352char SmcOpenConnection ();
f199cab1
GM
14353int
14354main ()
14355{
5476a9a4
GM
14356return SmcOpenConnection ();
14357 ;
14358 return 0;
f199cab1 14359}
067d23c9 14360_ACEOF
5476a9a4
GM
14361if ac_fn_c_try_link "$LINENO"; then :
14362 ac_cv_lib_SM_SmcOpenConnection=yes
067d23c9 14363else
5476a9a4 14364 ac_cv_lib_SM_SmcOpenConnection=no
f199cab1 14365fi
5476a9a4
GM
14366rm -f core conftest.err conftest.$ac_objext \
14367 conftest$ac_exeext conftest.$ac_ext
14368LIBS=$ac_check_lib_save_LIBS
14369fi
14370{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_SM_SmcOpenConnection" >&5
14371$as_echo "$ac_cv_lib_SM_SmcOpenConnection" >&6; }
14372if test "x$ac_cv_lib_SM_SmcOpenConnection" = x""yes; then :
14373 HAVE_X_SM=yes
067d23c9 14374fi
067d23c9 14375
f199cab1 14376fi
f199cab1 14377
f199cab1 14378
067d23c9 14379
5476a9a4
GM
14380 if test "${HAVE_X_SM}" = "yes"; then
14381
14382$as_echo "#define HAVE_X_SM 1" >>confdefs.h
14383
14384 LIBXSM="-lSM -lICE"
14385 case "$LIBS" in
14386 *-lSM*) ;;
14387 *) LIBS="$LIBXSM $LIBS" ;;
14388 esac
067d23c9 14389 fi
5476a9a4 14390fi
067d23c9 14391
067d23c9 14392
910833ae
GM
14393### Use XRandr (-lXrandr) if available
14394HAVE_XRANDR=no
14395if test "${HAVE_X11}" = "yes"; then
14396 XRANDR_REQUIRED=1.2.2
14397 XRANDR_MODULES="xrandr >= $XRANDR_REQUIRED"
14398
14399 succeeded=no
14400
14401 if test "$PKG_CONFIG" = "no" ; then
14402 HAVE_XRANDR=no
14403 else
14404 PKG_CONFIG_MIN_VERSION=0.9.0
14405 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
14406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $XRANDR_MODULES" >&5
14407$as_echo_n "checking for $XRANDR_MODULES... " >&6; }
14408
14409 if "$PKG_CONFIG" --exists "$XRANDR_MODULES" 2>&5 &&
14410 XRANDR_CFLAGS=`"$PKG_CONFIG" --cflags "$XRANDR_MODULES" 2>&5` &&
14411 XRANDR_LIBS=`"$PKG_CONFIG" --libs "$XRANDR_MODULES" 2>&5`; then
14412 edit_cflags="
14413 s,///*,/,g
14414 s/^/ /
14415 s/ -I/ $isystem/g
14416 s/^ //
14417 "
14418 XRANDR_CFLAGS=`$as_echo "$XRANDR_CFLAGS" | sed -e "$edit_cflags"`
14419 XRANDR_LIBS=`$as_echo "$XRANDR_LIBS" | sed -e 's,///*,/,g'`
14420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$XRANDR_CFLAGS' LIBS='$XRANDR_LIBS'" >&5
14421$as_echo "yes CFLAGS='$XRANDR_CFLAGS' LIBS='$XRANDR_LIBS'" >&6; }
14422 succeeded=yes
14423 else
14424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14425$as_echo "no" >&6; }
14426 XRANDR_CFLAGS=""
14427 XRANDR_LIBS=""
14428 ## If we have a custom action on failure, don't print errors, but
14429 ## do set a variable so people can do so. Do it in a subshell
14430 ## to capture any diagnostics in invoking pkg-config.
14431 XRANDR_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$XRANDR_MODULES") 2>&1`
14432
14433 fi
14434
14435
14436
14437 else
14438 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
14439 echo "*** See http://www.freedesktop.org/software/pkgconfig"
14440 fi
14441 fi
14442
14443 if test $succeeded = yes; then
14444 HAVE_XRANDR=yes
14445 else
14446 HAVE_XRANDR=no
14447 fi
14448
14449 if test $HAVE_XRANDR = no; then
14450 # Test old way in case pkg-config doesn't have it (older machines).
14451 ac_fn_c_check_header_mongrel "$LINENO" "X11/extensions/Xrandr.h" "ac_cv_header_X11_extensions_Xrandr_h" "$ac_includes_default"
14452if test "x$ac_cv_header_X11_extensions_Xrandr_h" = x""yes; then :
c31effdb
GM
14453 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRRGetScreenResources in -lXrandr" >&5
14454$as_echo_n "checking for XRRGetScreenResources in -lXrandr... " >&6; }
14455if test "${ac_cv_lib_Xrandr_XRRGetScreenResources+set}" = set; then :
910833ae
GM
14456 $as_echo_n "(cached) " >&6
14457else
14458 ac_check_lib_save_LIBS=$LIBS
14459LIBS="-lXrandr $LIBS"
14460cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14461/* end confdefs.h. */
14462
14463/* Override any GCC internal prototype to avoid an error.
14464 Use char because int might match the return type of a GCC
14465 builtin and then its argument prototype would still apply. */
14466#ifdef __cplusplus
14467extern "C"
14468#endif
c31effdb 14469char XRRGetScreenResources ();
910833ae
GM
14470int
14471main ()
14472{
c31effdb 14473return XRRGetScreenResources ();
910833ae
GM
14474 ;
14475 return 0;
14476}
14477_ACEOF
14478if ac_fn_c_try_link "$LINENO"; then :
c31effdb 14479 ac_cv_lib_Xrandr_XRRGetScreenResources=yes
910833ae 14480else
c31effdb 14481 ac_cv_lib_Xrandr_XRRGetScreenResources=no
910833ae
GM
14482fi
14483rm -f core conftest.err conftest.$ac_objext \
14484 conftest$ac_exeext conftest.$ac_ext
14485LIBS=$ac_check_lib_save_LIBS
14486fi
c31effdb
GM
14487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrandr_XRRGetScreenResources" >&5
14488$as_echo "$ac_cv_lib_Xrandr_XRRGetScreenResources" >&6; }
14489if test "x$ac_cv_lib_Xrandr_XRRGetScreenResources" = x""yes; then :
910833ae
GM
14490 HAVE_XRANDR=yes
14491fi
14492
14493fi
14494
14495
14496 if test $HAVE_XRANDR = yes; then
14497 XRANDR_LIBS=-lXrandr
14498
14499 fi
14500 fi
14501 if test $HAVE_XRANDR = yes; then
14502 SAVE_CFLAGS="$CFLAGS"
14503 SAVE_LIBS="$LIBS"
14504 CFLAGS="$XRANDR_CFLAGS $CFLAGS"
14505 LIBS="$XRANDR_LIBS $LIBS"
14506 for ac_func in XRRGetOutputPrimary XRRGetScreenResourcesCurrent
14507do :
14508 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14509ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14510eval as_val=\$$as_ac_var
14511 if test "x$as_val" = x""yes; then :
14512 cat >>confdefs.h <<_ACEOF
14513#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14514_ACEOF
14515
14516fi
14517done
14518
14519 CFLAGS="$SAVE_CFLAGS"
14520 LIBS="$SAVE_LIBS"
14521
14522
14523$as_echo "#define HAVE_XRANDR 1" >>confdefs.h
14524
14525 fi
14526fi
14527
14528### Use Xinerama (-lXinerama) if available
14529HAVE_XINERAMA=no
14530if test "${HAVE_X11}" = "yes"; then
14531 XINERAMA_REQUIRED=1.0.2
14532 XINERAMA_MODULES="xinerama >= $XINERAMA_REQUIRED"
14533
14534 succeeded=no
14535
14536 if test "$PKG_CONFIG" = "no" ; then
14537 HAVE_XINERAMA=no
14538 else
14539 PKG_CONFIG_MIN_VERSION=0.9.0
14540 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
14541 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $XINERAMA_MODULES" >&5
14542$as_echo_n "checking for $XINERAMA_MODULES... " >&6; }
14543
14544 if "$PKG_CONFIG" --exists "$XINERAMA_MODULES" 2>&5 &&
14545 XINERAMA_CFLAGS=`"$PKG_CONFIG" --cflags "$XINERAMA_MODULES" 2>&5` &&
14546 XINERAMA_LIBS=`"$PKG_CONFIG" --libs "$XINERAMA_MODULES" 2>&5`; then
14547 edit_cflags="
14548 s,///*,/,g
14549 s/^/ /
14550 s/ -I/ $isystem/g
14551 s/^ //
14552 "
14553 XINERAMA_CFLAGS=`$as_echo "$XINERAMA_CFLAGS" | sed -e "$edit_cflags"`
14554 XINERAMA_LIBS=`$as_echo "$XINERAMA_LIBS" | sed -e 's,///*,/,g'`
14555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$XINERAMA_CFLAGS' LIBS='$XINERAMA_LIBS'" >&5
14556$as_echo "yes CFLAGS='$XINERAMA_CFLAGS' LIBS='$XINERAMA_LIBS'" >&6; }
14557 succeeded=yes
14558 else
14559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14560$as_echo "no" >&6; }
14561 XINERAMA_CFLAGS=""
14562 XINERAMA_LIBS=""
14563 ## If we have a custom action on failure, don't print errors, but
14564 ## do set a variable so people can do so. Do it in a subshell
14565 ## to capture any diagnostics in invoking pkg-config.
14566 XINERAMA_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$XINERAMA_MODULES") 2>&1`
14567
14568 fi
14569
14570
14571
14572 else
14573 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
14574 echo "*** See http://www.freedesktop.org/software/pkgconfig"
14575 fi
14576 fi
14577
14578 if test $succeeded = yes; then
14579 HAVE_XINERAMA=yes
14580 else
14581 HAVE_XINERAMA=no
14582 fi
14583
14584 if test $HAVE_XINERAMA = no; then
14585 # Test old way in case pkg-config doesn't have it (older machines).
14586 ac_fn_c_check_header_mongrel "$LINENO" "X11/extensions/Xinerama.h" "ac_cv_header_X11_extensions_Xinerama_h" "$ac_includes_default"
14587if test "x$ac_cv_header_X11_extensions_Xinerama_h" = x""yes; then :
14588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XineramaQueryExtension in -lXinerama" >&5
14589$as_echo_n "checking for XineramaQueryExtension in -lXinerama... " >&6; }
14590if test "${ac_cv_lib_Xinerama_XineramaQueryExtension+set}" = set; then :
14591 $as_echo_n "(cached) " >&6
14592else
14593 ac_check_lib_save_LIBS=$LIBS
14594LIBS="-lXinerama $LIBS"
14595cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14596/* end confdefs.h. */
14597
14598/* Override any GCC internal prototype to avoid an error.
14599 Use char because int might match the return type of a GCC
14600 builtin and then its argument prototype would still apply. */
14601#ifdef __cplusplus
14602extern "C"
14603#endif
14604char XineramaQueryExtension ();
14605int
14606main ()
14607{
14608return XineramaQueryExtension ();
14609 ;
14610 return 0;
14611}
14612_ACEOF
14613if ac_fn_c_try_link "$LINENO"; then :
14614 ac_cv_lib_Xinerama_XineramaQueryExtension=yes
14615else
14616 ac_cv_lib_Xinerama_XineramaQueryExtension=no
14617fi
14618rm -f core conftest.err conftest.$ac_objext \
14619 conftest$ac_exeext conftest.$ac_ext
14620LIBS=$ac_check_lib_save_LIBS
14621fi
14622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xinerama_XineramaQueryExtension" >&5
14623$as_echo "$ac_cv_lib_Xinerama_XineramaQueryExtension" >&6; }
14624if test "x$ac_cv_lib_Xinerama_XineramaQueryExtension" = x""yes; then :
14625 HAVE_XINERAMA=yes
14626fi
14627
14628fi
14629
14630
14631 if test $HAVE_XINERAMA = yes; then
14632 XINERAMA_LIBS=-lXinerama
14633
14634 fi
14635 fi
14636 if test $HAVE_XINERAMA = yes; then
14637
14638$as_echo "#define HAVE_XINERAMA 1" >>confdefs.h
14639
14640 fi
14641fi
14642
14643
5476a9a4 14644### Use libxml (-lxml2) if available
7c61eaab 14645### mingw32 doesn't use -lxml2, since it loads the library dynamically.
5476a9a4
GM
14646HAVE_LIBXML2=no
14647if test "${with_xml2}" != "no"; then
14648 ### I'm not sure what the version number should be, so I just guessed.
067d23c9 14649
5476a9a4 14650 succeeded=no
067d23c9 14651
5476a9a4
GM
14652 if test "$PKG_CONFIG" = "no" ; then
14653 HAVE_LIBXML2=no
14654 else
14655 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 14656 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
14657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxml-2.0 > 2.6.17" >&5
14658$as_echo_n "checking for libxml-2.0 > 2.6.17... " >&6; }
067d23c9 14659
b5591ebb
GM
14660 if "$PKG_CONFIG" --exists "libxml-2.0 > 2.6.17" 2>&5 &&
14661 LIBXML2_CFLAGS=`"$PKG_CONFIG" --cflags "libxml-2.0 > 2.6.17" 2>&5` &&
14662 LIBXML2_LIBS=`"$PKG_CONFIG" --libs "libxml-2.0 > 2.6.17" 2>&5`; then
5476a9a4
GM
14663 edit_cflags="
14664 s,///*,/,g
14665 s/^/ /
14666 s/ -I/ $isystem/g
14667 s/^ //
14668 "
14669 LIBXML2_CFLAGS=`$as_echo "$LIBXML2_CFLAGS" | sed -e "$edit_cflags"`
14670 LIBXML2_LIBS=`$as_echo "$LIBXML2_LIBS" | sed -e 's,///*,/,g'`
14671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBXML2_CFLAGS' LIBS='$LIBXML2_LIBS'" >&5
14672$as_echo "yes CFLAGS='$LIBXML2_CFLAGS' LIBS='$LIBXML2_LIBS'" >&6; }
14673 succeeded=yes
14674 else
14675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14676$as_echo "no" >&6; }
14677 LIBXML2_CFLAGS=""
14678 LIBXML2_LIBS=""
14679 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
14680 ## do set a variable so people can do so. Do it in a subshell
14681 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 14682 LIBXML2_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "libxml-2.0 > 2.6.17") 2>&1`
5476a9a4
GM
14683
14684 fi
14685
14686
14687
14688 else
14689 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
14690 echo "*** See http://www.freedesktop.org/software/pkgconfig"
14691 fi
14692 fi
14693
14694 if test $succeeded = yes; then
14695 HAVE_LIBXML2=yes
14696 else
14697 HAVE_LIBXML2=no
14698 fi
14699
4628c0bf
GM
14700 # Built-in libxml2 on OS X 10.8 lacks libxml-2.0.pc.
14701 if test "${HAVE_LIBXML2}" != "yes" -a "$opsys" = "darwin"; then
14702 SAVE_CPPFLAGS="$CPPFLAGS"
14703 CPPFLAGS="$CPPFLAGS -I/usr/include/libxml2"
14704 ac_fn_c_check_header_mongrel "$LINENO" "libxml/HTMLparser.h" "ac_cv_header_libxml_HTMLparser_h" "$ac_includes_default"
14705if test "x$ac_cv_header_libxml_HTMLparser_h" = x""yes; then :
14706 ac_fn_c_check_decl "$LINENO" "HTML_PARSE_RECOVER" "ac_cv_have_decl_HTML_PARSE_RECOVER" "#include <libxml/HTMLparser.h>
14707"
14708if test "x$ac_cv_have_decl_HTML_PARSE_RECOVER" = x""yes; then :
14709 HAVE_LIBXML2=yes
14710fi
14711
14712fi
14713
14714
14715 CPPFLAGS="$SAVE_CPPFLAGS"
14716 if test "${HAVE_LIBXML2}" = "yes"; then
14717 LIBXML2_LIBS="-lxml2"
14718 LIBXML2_CFLAGS="-I/usr/include/libxml2"
14719 fi
14720 fi
5476a9a4 14721 if test "${HAVE_LIBXML2}" = "yes"; then
7c61eaab
GM
14722 if test "${opsys}" != "mingw32"; then
14723 LIBS="$LIBXML2_LIBS $LIBS"
14724 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for htmlReadMemory in -lxml2" >&5
5476a9a4
GM
14725$as_echo_n "checking for htmlReadMemory in -lxml2... " >&6; }
14726if test "${ac_cv_lib_xml2_htmlReadMemory+set}" = set; then :
067d23c9
KY
14727 $as_echo_n "(cached) " >&6
14728else
5476a9a4
GM
14729 ac_check_lib_save_LIBS=$LIBS
14730LIBS="-lxml2 $LIBS"
14731cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
14732/* end confdefs.h. */
14733
5476a9a4
GM
14734/* Override any GCC internal prototype to avoid an error.
14735 Use char because int might match the return type of a GCC
14736 builtin and then its argument prototype would still apply. */
14737#ifdef __cplusplus
14738extern "C"
14739#endif
14740char htmlReadMemory ();
067d23c9
KY
14741int
14742main ()
14743{
5476a9a4 14744return htmlReadMemory ();
067d23c9
KY
14745 ;
14746 return 0;
14747}
14748_ACEOF
5476a9a4
GM
14749if ac_fn_c_try_link "$LINENO"; then :
14750 ac_cv_lib_xml2_htmlReadMemory=yes
067d23c9 14751else
5476a9a4 14752 ac_cv_lib_xml2_htmlReadMemory=no
067d23c9 14753fi
5476a9a4
GM
14754rm -f core conftest.err conftest.$ac_objext \
14755 conftest$ac_exeext conftest.$ac_ext
14756LIBS=$ac_check_lib_save_LIBS
14757fi
14758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_htmlReadMemory" >&5
14759$as_echo "$ac_cv_lib_xml2_htmlReadMemory" >&6; }
14760if test "x$ac_cv_lib_xml2_htmlReadMemory" = x""yes; then :
14761 HAVE_LIBXML2=yes
14762else
14763 HAVE_LIBXML2=no
067d23c9
KY
14764fi
14765
7c61eaab
GM
14766 else
14767 LIBXML2_LIBS=""
14768 fi
5476a9a4 14769 if test "${HAVE_LIBXML2}" = "yes"; then
067d23c9 14770
5476a9a4 14771$as_echo "#define HAVE_LIBXML2 1" >>confdefs.h
067d23c9 14772
5476a9a4
GM
14773 else
14774 LIBXML2_LIBS=""
14775 LIBXML2_CFLAGS=""
14776 fi
067d23c9 14777 fi
5476a9a4 14778fi
067d23c9 14779
067d23c9 14780
067d23c9 14781
5476a9a4 14782# If netdb.h doesn't declare h_errno, we must declare it by hand.
7c61eaab
GM
14783# On MinGW, that is provided by nt/inc/sys/socket.h and w32.c.
14784if test "${opsys}" = "mingw32"; then
14785 emacs_cv_netdb_declares_h_errno=yes
14786fi
5476a9a4
GM
14787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether netdb declares h_errno" >&5
14788$as_echo_n "checking whether netdb declares h_errno... " >&6; }
14789if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then :
14790 $as_echo_n "(cached) " >&6
067d23c9 14791else
5476a9a4
GM
14792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14793/* end confdefs.h. */
14794#include <netdb.h>
14795int
14796main ()
14797{
14798return h_errno;
14799 ;
14800 return 0;
14801}
14802_ACEOF
14803if ac_fn_c_try_link "$LINENO"; then :
14804 emacs_cv_netdb_declares_h_errno=yes
14805else
14806 emacs_cv_netdb_declares_h_errno=no
067d23c9 14807fi
5476a9a4
GM
14808rm -f core conftest.err conftest.$ac_objext \
14809 conftest$ac_exeext conftest.$ac_ext
14810fi
14811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_netdb_declares_h_errno" >&5
14812$as_echo "$emacs_cv_netdb_declares_h_errno" >&6; }
14813if test $emacs_cv_netdb_declares_h_errno = yes; then
067d23c9 14814
5476a9a4 14815$as_echo "#define HAVE_H_ERRNO 1" >>confdefs.h
f199cab1 14816
5476a9a4 14817fi
f199cab1 14818
2c98a625 14819# sqrt and other floating-point functions such as fmod and frexp
7c61eaab
GM
14820# are found in -lm on most systems, but mingw32 doesn't use -lm.
14821if test "${opsys}" != "mingw32"; then
14822 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5
5476a9a4
GM
14823$as_echo_n "checking for sqrt in -lm... " >&6; }
14824if test "${ac_cv_lib_m_sqrt+set}" = set; then :
14825 $as_echo_n "(cached) " >&6
14826else
14827 ac_check_lib_save_LIBS=$LIBS
14828LIBS="-lm $LIBS"
14829cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14830/* end confdefs.h. */
f199cab1 14831
5476a9a4
GM
14832/* Override any GCC internal prototype to avoid an error.
14833 Use char because int might match the return type of a GCC
14834 builtin and then its argument prototype would still apply. */
14835#ifdef __cplusplus
14836extern "C"
14837#endif
14838char sqrt ();
14839int
14840main ()
14841{
14842return sqrt ();
14843 ;
14844 return 0;
14845}
14846_ACEOF
14847if ac_fn_c_try_link "$LINENO"; then :
14848 ac_cv_lib_m_sqrt=yes
14849else
14850 ac_cv_lib_m_sqrt=no
14851fi
14852rm -f core conftest.err conftest.$ac_objext \
14853 conftest$ac_exeext conftest.$ac_ext
14854LIBS=$ac_check_lib_save_LIBS
14855fi
14856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sqrt" >&5
14857$as_echo "$ac_cv_lib_m_sqrt" >&6; }
14858if test "x$ac_cv_lib_m_sqrt" = x""yes; then :
14859 cat >>confdefs.h <<_ACEOF
14860#define HAVE_LIBM 1
14861_ACEOF
f199cab1 14862
5476a9a4 14863 LIBS="-lm $LIBS"
f199cab1 14864
5476a9a4 14865fi
f199cab1 14866
7c61eaab 14867fi
f199cab1 14868
5476a9a4
GM
14869# Check for mail-locking functions in a "mail" library. Probably this should
14870# have the same check as for liblockfile below.
14871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -lmail" >&5
14872$as_echo_n "checking for maillock in -lmail... " >&6; }
14873if test "${ac_cv_lib_mail_maillock+set}" = set; then :
067d23c9
KY
14874 $as_echo_n "(cached) " >&6
14875else
5476a9a4
GM
14876 ac_check_lib_save_LIBS=$LIBS
14877LIBS="-lmail $LIBS"
14878cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
14879/* end confdefs.h. */
14880
5476a9a4
GM
14881/* Override any GCC internal prototype to avoid an error.
14882 Use char because int might match the return type of a GCC
14883 builtin and then its argument prototype would still apply. */
14884#ifdef __cplusplus
14885extern "C"
067d23c9 14886#endif
5476a9a4
GM
14887char maillock ();
14888int
14889main ()
14890{
14891return maillock ();
14892 ;
14893 return 0;
14894}
067d23c9 14895_ACEOF
5476a9a4
GM
14896if ac_fn_c_try_link "$LINENO"; then :
14897 ac_cv_lib_mail_maillock=yes
067d23c9 14898else
5476a9a4 14899 ac_cv_lib_mail_maillock=no
067d23c9 14900fi
5476a9a4
GM
14901rm -f core conftest.err conftest.$ac_objext \
14902 conftest$ac_exeext conftest.$ac_ext
14903LIBS=$ac_check_lib_save_LIBS
067d23c9 14904fi
5476a9a4
GM
14905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mail_maillock" >&5
14906$as_echo "$ac_cv_lib_mail_maillock" >&6; }
14907if test "x$ac_cv_lib_mail_maillock" = x""yes; then :
14908 have_mail=yes
f199cab1 14909else
5476a9a4 14910 have_mail=no
067d23c9
KY
14911fi
14912
5476a9a4
GM
14913if test $have_mail = yes; then
14914 LIBS_MAIL=-lmail
14915 LIBS="$LIBS_MAIL $LIBS"
067d23c9 14916
5476a9a4 14917$as_echo "#define HAVE_LIBMAIL 1" >>confdefs.h
067d23c9 14918
5476a9a4
GM
14919else
14920 LIBS_MAIL=
14921fi
14922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -llockfile" >&5
14923$as_echo_n "checking for maillock in -llockfile... " >&6; }
14924if test "${ac_cv_lib_lockfile_maillock+set}" = set; then :
067d23c9
KY
14925 $as_echo_n "(cached) " >&6
14926else
5476a9a4
GM
14927 ac_check_lib_save_LIBS=$LIBS
14928LIBS="-llockfile $LIBS"
067d23c9
KY
14929cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14930/* end confdefs.h. */
14931
14932/* Override any GCC internal prototype to avoid an error.
14933 Use char because int might match the return type of a GCC
14934 builtin and then its argument prototype would still apply. */
14935#ifdef __cplusplus
14936extern "C"
14937#endif
5476a9a4 14938char maillock ();
067d23c9
KY
14939int
14940main ()
14941{
5476a9a4 14942return maillock ();
067d23c9
KY
14943 ;
14944 return 0;
14945}
14946_ACEOF
5476a9a4
GM
14947if ac_fn_c_try_link "$LINENO"; then :
14948 ac_cv_lib_lockfile_maillock=yes
14949else
14950 ac_cv_lib_lockfile_maillock=no
067d23c9
KY
14951fi
14952rm -f core conftest.err conftest.$ac_objext \
5476a9a4
GM
14953 conftest$ac_exeext conftest.$ac_ext
14954LIBS=$ac_check_lib_save_LIBS
067d23c9 14955fi
5476a9a4
GM
14956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lockfile_maillock" >&5
14957$as_echo "$ac_cv_lib_lockfile_maillock" >&6; }
14958if test "x$ac_cv_lib_lockfile_maillock" = x""yes; then :
14959 have_lockfile=yes
067d23c9 14960else
5476a9a4 14961 have_lockfile=no
f199cab1
GM
14962fi
14963
5476a9a4
GM
14964if test $have_lockfile = yes; then
14965 LIBS_MAIL=-llockfile
14966 LIBS="$LIBS_MAIL $LIBS"
067d23c9 14967
5476a9a4 14968$as_echo "#define HAVE_LIBLOCKFILE 1" >>confdefs.h
067d23c9 14969
5476a9a4
GM
14970else
14971# If we have the shared liblockfile, assume we must use it for mail
14972# locking (e.g. Debian). If we couldn't link against liblockfile
14973# (no liblockfile.a installed), ensure that we don't need to.
14974 # Extract the first word of "liblockfile.so", so it can be a program name with args.
14975set dummy liblockfile.so; ac_word=$2
14976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14977$as_echo_n "checking for $ac_word... " >&6; }
14978if test "${ac_cv_prog_liblockfile+set}" = set; then :
14979 $as_echo_n "(cached) " >&6
14980else
14981 if test -n "$liblockfile"; then
14982 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
14983else
14984as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14985as_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
14986for as_dir in $as_dummy
14987do
14988 IFS=$as_save_IFS
14989 test -z "$as_dir" && as_dir=.
14990 for ac_exec_ext in '' $ac_executable_extensions; do
14991 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
14992 ac_cv_prog_liblockfile="yes"
14993 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14994 break 2
14995 fi
14996done
14997 done
14998IFS=$as_save_IFS
067d23c9 14999
5476a9a4
GM
15000 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
15001fi
15002fi
15003liblockfile=$ac_cv_prog_liblockfile
15004if test -n "$liblockfile"; then
15005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $liblockfile" >&5
15006$as_echo "$liblockfile" >&6; }
15007else
15008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15009$as_echo "no" >&6; }
15010fi
067d23c9 15011
067d23c9 15012
5476a9a4
GM
15013 if test $ac_cv_prog_liblockfile = yes; then
15014 as_fn_error "Shared liblockfile found but can't link against it.
15015This probably means that movemail could lose mail.
15016There may be a \`development' package to install containing liblockfile." "$LINENO" 5
15017 fi
15018fi
067d23c9 15019
067d23c9 15020
067d23c9 15021
067d23c9
KY
15022
15023
5476a9a4
GM
15024## Define MAIL_USE_FLOCK (or LOCKF) if the mailer uses flock (or lockf) to
15025## interlock access to the mail spool. The alternative is a lock file named
15026## /usr/spool/mail/$USER.lock.
15027mail_lock=no
15028case "$opsys" in
15029 aix4-2) mail_lock="lockf" ;;
067d23c9 15030
87e1a811 15031 gnu|freebsd|dragonfly|netbsd|openbsd|darwin|irix6-5) mail_lock="flock" ;;
067d23c9 15032
5476a9a4
GM
15033 ## On GNU/Linux systems, both methods are used by various mail programs.
15034 ## I assume most people are using newer mailers that have heard of flock.
15035 ## Change this if you need to.
15036 ## Debian contains a patch which says: ``On Debian/GNU/Linux systems,
15037 ## configure gets the right answers, and that means *NOT* using flock.
15038 ## Using flock is guaranteed to be the wrong thing. See Debian Policy
15039 ## for details.'' and then uses `#ifdef DEBIAN'. Unfortunately the
15040 ## Debian maintainer hasn't provided a clean fix for Emacs.
15041 ## movemail.c will use `maillock' when MAILDIR, HAVE_LIBMAIL and
15042 ## HAVE_MAILLOCK_H are defined, so the following appears to be the
15043 ## correct logic. -- fx
15044 ## We must check for HAVE_LIBLOCKFILE too, as movemail does.
15045 ## liblockfile is a Free Software replacement for libmail, used on
15046 ## Debian systems and elsewhere. -rfr.
15047 gnu-*)
15048 mail_lock="flock"
15049 if test $have_mail = yes || test $have_lockfile = yes; then
15050 test $ac_cv_header_maillock_h = yes && mail_lock=no
15051 fi
15052 ;;
7c61eaab
GM
15053
15054 mingw32)
15055 mail_lock="none-needed" ;;
5476a9a4 15056esac
f199cab1 15057
5476a9a4
GM
15058BLESSMAIL_TARGET=
15059case "$mail_lock" in
15060 flock)
15061$as_echo "#define MAIL_USE_FLOCK 1" >>confdefs.h
15062 ;;
f199cab1 15063
5476a9a4
GM
15064 lockf)
15065$as_echo "#define MAIL_USE_LOCKF 1" >>confdefs.h
15066 ;;
f199cab1 15067
7c61eaab
GM
15068 none-needed) ;;
15069
5476a9a4
GM
15070 *) BLESSMAIL_TARGET="need-blessmail" ;;
15071esac
f199cab1
GM
15072
15073
15074
0cdca42a 15075for ac_func in accept4 gethostname \
e7d0e5ee 15076getrusage get_current_dir_name \
eda33f78 15077lrand48 \
a455a5ce 15078select getpagesize setlocale \
db7863f4 15079getrlimit setrlimit shutdown getaddrinfo \
eda33f78 15080strsignal setitimer \
5476a9a4 15081sendto recvfrom getsockname getpeername getifaddrs freeifaddrs \
e412eb97 15082gai_strerror getline getdelim sync \
5476a9a4
GM
15083difftime posix_memalign \
15084getpwent endpwent getgrent endgrent \
15085touchlock \
4628c0bf 15086cfmakeraw cfsetspeed copysign __executable_start log2
5476a9a4
GM
15087do :
15088 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15089ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15090eval as_val=\$$as_ac_var
15091 if test "x$as_val" = x""yes; then :
15092 cat >>confdefs.h <<_ACEOF
15093#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15094_ACEOF
f199cab1 15095
5476a9a4
GM
15096fi
15097done
f199cab1
GM
15098
15099
5476a9a4
GM
15100## Eric Backus <ericb@lsid.hp.com> says, HP-UX 9.x on HP 700 machines
15101## has a broken `rint' in some library versions including math library
15102## version number A.09.05.
15103## You can fix the math library by installing patch number PHSS_4630.
15104## But we can fix it more reliably for Emacs by just not using rint.
8ad96b1d 15105## We also skip HAVE_RANDOM - see comments in src/conf_post.h.
5476a9a4
GM
15106case $opsys in
15107 hpux*) : ;;
15108 *) for ac_func in random rint
15109do :
15110 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15111ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15112eval as_val=\$$as_ac_var
15113 if test "x$as_val" = x""yes; then :
15114 cat >>confdefs.h <<_ACEOF
15115#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15116_ACEOF
f199cab1 15117
5476a9a4
GM
15118fi
15119done
15120 ;;
15121esac
f199cab1 15122
5476a9a4
GM
15123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unwind_init" >&5
15124$as_echo_n "checking for __builtin_unwind_init... " >&6; }
15125if test "${emacs_cv_func___builtin_unwind_init+set}" = set; then :
067d23c9 15126 $as_echo_n "(cached) " >&6
f199cab1
GM
15127else
15128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
15129/* end confdefs.h. */
15130
067d23c9
KY
15131int
15132main ()
15133{
5476a9a4 15134__builtin_unwind_init ();
067d23c9
KY
15135 ;
15136 return 0;
15137}
15138_ACEOF
5476a9a4
GM
15139if ac_fn_c_try_link "$LINENO"; then :
15140 emacs_cv_func___builtin_unwind_init=yes
067d23c9 15141else
5476a9a4 15142 emacs_cv_func___builtin_unwind_init=no
067d23c9 15143fi
5476a9a4
GM
15144rm -f core conftest.err conftest.$ac_objext \
15145 conftest$ac_exeext conftest.$ac_ext
067d23c9 15146fi
5476a9a4
GM
15147{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_func___builtin_unwind_init" >&5
15148$as_echo "$emacs_cv_func___builtin_unwind_init" >&6; }
15149if test $emacs_cv_func___builtin_unwind_init = yes; then
067d23c9 15150
5476a9a4 15151$as_echo "#define HAVE___BUILTIN_UNWIND_INIT 1" >>confdefs.h
f199cab1 15152
067d23c9 15153fi
067d23c9 15154
f199cab1
GM
15155
15156
15157
15158
5476a9a4
GM
15159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
15160$as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
15161if test "${ac_cv_sys_largefile_source+set}" = set; then :
15162 $as_echo_n "(cached) " >&6
15163else
15164 while :; do
15165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15166/* end confdefs.h. */
15167#include <sys/types.h> /* for off_t */
15168 #include <stdio.h>
15169int
15170main ()
15171{
15172int (*fp) (FILE *, off_t, int) = fseeko;
15173 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15174 ;
15175 return 0;
15176}
15177_ACEOF
15178if ac_fn_c_try_link "$LINENO"; then :
15179 ac_cv_sys_largefile_source=no; break
067d23c9 15180fi
5476a9a4
GM
15181rm -f core conftest.err conftest.$ac_objext \
15182 conftest$ac_exeext conftest.$ac_ext
15183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15184/* end confdefs.h. */
15185#define _LARGEFILE_SOURCE 1
15186#include <sys/types.h> /* for off_t */
15187 #include <stdio.h>
15188int
15189main ()
15190{
15191int (*fp) (FILE *, off_t, int) = fseeko;
15192 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15193 ;
15194 return 0;
15195}
15196_ACEOF
15197if ac_fn_c_try_link "$LINENO"; then :
15198 ac_cv_sys_largefile_source=1; break
15199fi
15200rm -f core conftest.err conftest.$ac_objext \
15201 conftest$ac_exeext conftest.$ac_ext
15202 ac_cv_sys_largefile_source=unknown
15203 break
15204done
15205fi
15206{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
15207$as_echo "$ac_cv_sys_largefile_source" >&6; }
15208case $ac_cv_sys_largefile_source in #(
15209 no | unknown) ;;
15210 *)
15211cat >>confdefs.h <<_ACEOF
15212#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
15213_ACEOF
15214;;
15215esac
15216rm -rf conftest*
067d23c9 15217
5476a9a4
GM
15218# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
15219# in glibc 2.1.3, but that breaks too many other things.
15220# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
15221if test $ac_cv_sys_largefile_source != unknown; then
067d23c9 15222
5476a9a4 15223$as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
067d23c9 15224
5476a9a4 15225fi
067d23c9
KY
15226
15227
5476a9a4
GM
15228# UNIX98 PTYs.
15229for ac_func in grantpt
15230do :
15231 ac_fn_c_check_func "$LINENO" "grantpt" "ac_cv_func_grantpt"
15232if test "x$ac_cv_func_grantpt" = x""yes; then :
15233 cat >>confdefs.h <<_ACEOF
15234#define HAVE_GRANTPT 1
15235_ACEOF
f199cab1 15236
5476a9a4
GM
15237fi
15238done
f199cab1 15239
f199cab1 15240
5476a9a4 15241# PTY-related GNU extensions.
1146da8d 15242for ac_func in getpt posix_openpt
5476a9a4 15243do :
1146da8d
GM
15244 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15245ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15246eval as_val=\$$as_ac_var
15247 if test "x$as_val" = x""yes; then :
5476a9a4 15248 cat >>confdefs.h <<_ACEOF
1146da8d 15249#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
5476a9a4 15250_ACEOF
f199cab1 15251
5476a9a4
GM
15252fi
15253done
f199cab1 15254
f199cab1 15255
5476a9a4
GM
15256# Check this now, so that we will NOT find the above functions in ncurses.
15257# That is because we have not set up to link ncurses in lib-src.
15258# It's better to believe a function is not available
15259# than to expect to find it in ncurses.
15260# Also we need tputs and friends to be able to build at all.
15261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tputs" >&5
15262$as_echo_n "checking for library containing tputs... " >&6; }
15263# Run a test program that contains a call to tputs, a call that is
15264# never executed. This tests whether a pre-'main' dynamic linker
15265# works with the library. It's too much trouble to actually call
15266# tputs in the test program, due to portability hassles. When
15267# cross-compiling, assume the test program will run if it links.
f199cab1 15268
7c61eaab
GM
15269if test "${opsys}" = "mingw32"; then
15270 msg='none required'
15271else
15272 # Maybe curses should be tried earlier?
15273 # See http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9736#35
15274 for tputs_library in '' tinfo ncurses terminfo termcap curses; do
15275 OLIBS=$LIBS
15276 if test -z "$tputs_library"; then
15277 LIBS_TERMCAP=
15278 msg='none required'
15279 else
15280 LIBS_TERMCAP=-l$tputs_library
15281 msg=$LIBS_TERMCAP
15282 LIBS="$LIBS_TERMCAP $LIBS"
15283 fi
15284 if test "$cross_compiling" = yes; then :
5476a9a4 15285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
15286/* end confdefs.h. */
15287
5476a9a4
GM
15288 extern void tputs (const char *, int, int (*)(int));
15289 int main (int argc, char **argv)
15290 {
15291 if (argc == 10000)
15292 tputs (argv[0], 0, 0);
15293 return 0;
15294 }
15295
067d23c9
KY
15296_ACEOF
15297if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 15298
067d23c9 15299else
5476a9a4 15300 msg=no
067d23c9
KY
15301fi
15302rm -f core conftest.err conftest.$ac_objext \
15303 conftest$ac_exeext conftest.$ac_ext
067d23c9 15304else
5476a9a4 15305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
15306/* end confdefs.h. */
15307
5476a9a4
GM
15308 extern void tputs (const char *, int, int (*)(int));
15309 int main (int argc, char **argv)
15310 {
15311 if (argc == 10000)
15312 tputs (argv[0], 0, 0);
15313 return 0;
15314 }
15315
067d23c9 15316_ACEOF
5476a9a4
GM
15317if ac_fn_c_try_run "$LINENO"; then :
15318
067d23c9 15319else
5476a9a4 15320 msg=no
067d23c9 15321fi
5476a9a4
GM
15322rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15323 conftest.$ac_objext conftest.beam conftest.$ac_ext
067d23c9 15324fi
5476a9a4 15325
7c61eaab
GM
15326 LIBS=$OLIBS
15327 if test "X$msg" != Xno; then
15328 break
15329 fi
15330 done
15331fi
5476a9a4
GM
15332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $msg" >&5
15333$as_echo "$msg" >&6; }
15334if test "X$msg" = Xno; then
15335 as_fn_error "The required function \`tputs' was not found in any library.
15336The following libraries were tried (in order):
15337 libtinfo, libncurses, libterminfo, libtermcap, libcurses
15338Please try installing whichever of these libraries is most appropriate
15339for your system, together with its header files.
15340For example, a libncurses-dev(el) or similar package." "$LINENO" 5
067d23c9
KY
15341fi
15342
5476a9a4
GM
15343## Use termcap instead of terminfo?
15344## Only true for: freebsd < 40000, ms-w32, msdos, netbsd < 599002500.
15345TERMINFO=yes
15346## FIXME? In the cases below where we unconditionally set
15347## LIBS_TERMCAP="-lncurses", this overrides LIBS_TERMCAP = -ltinfo,
15348## if that was found above to have tputs.
15349## Should we use the gnu* logic everywhere?
15350case "$opsys" in
15351 ## darwin: Prevents crashes when running Emacs in Terminal.app under 10.2.
15352 ## The ncurses library has been moved out of the System framework in
15353 ## Mac OS X 10.2. So if configure detects it, set the command-line
15354 ## option to use it.
15355 darwin) LIBS_TERMCAP="-lncurses" ;;
15356
15357 gnu*) test -z "$LIBS_TERMCAP" && LIBS_TERMCAP="-lncurses" ;;
15358
15359 freebsd)
15360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether FreeBSD is new enough to use terminfo" >&5
15361$as_echo_n "checking whether FreeBSD is new enough to use terminfo... " >&6; }
15362 if test "${emacs_cv_freebsd_terminfo+set}" = set; then :
067d23c9
KY
15363 $as_echo_n "(cached) " >&6
15364else
5476a9a4 15365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 15366/* end confdefs.h. */
5476a9a4 15367#include <osreldate.h>
067d23c9
KY
15368int
15369main ()
15370{
5476a9a4
GM
15371#if __FreeBSD_version < 400000
15372fail;
15373#endif
15374
067d23c9
KY
15375 ;
15376 return 0;
15377}
15378_ACEOF
15379if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 15380 emacs_cv_freebsd_terminfo=yes
067d23c9 15381else
5476a9a4 15382 emacs_cv_freebsd_terminfo=no
067d23c9
KY
15383fi
15384rm -f core conftest.err conftest.$ac_objext \
15385 conftest$ac_exeext conftest.$ac_ext
15386fi
5476a9a4
GM
15387
15388
15389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_freebsd_terminfo" >&5
15390$as_echo "$emacs_cv_freebsd_terminfo" >&6; }
15391
15392 if test $emacs_cv_freebsd_terminfo = yes; then
15393 LIBS_TERMCAP="-lncurses"
15394 else
15395 TERMINFO=no
15396 LIBS_TERMCAP="-ltermcap"
15397 fi
15398 ;;
15399
7c61eaab
GM
15400 mingw32)
15401 TERMINFO=no
15402 LIBS_TERMCAP=
15403 ;;
15404
5476a9a4
GM
15405 netbsd)
15406 if test "x$LIBS_TERMCAP" != "x-lterminfo"; then
15407 TERMINFO=no
15408 LIBS_TERMCAP="-ltermcap"
15409 fi
15410 ;;
15411
87e1a811 15412 openbsd | dragonfly) LIBS_TERMCAP="-lncurses" ;;
5476a9a4
GM
15413
15414 ## hpux: Make sure we get select from libc rather than from libcurses
15415 ## because libcurses on HPUX 10.10 has a broken version of select.
15416 ## We used to use -lc -lcurses, but this may be cleaner.
15417 ## FIXME? But TERMINFO = yes on hpux (it used to be explicitly
15418 # set that way, now it uses the default). Isn't this a contradiction?
15419 hpux*) LIBS_TERMCAP="-ltermcap" ;;
15420
15421esac
15422
15423TERMCAP_OBJ=tparam.o
15424if test $TERMINFO = yes; then
15425
15426$as_echo "#define TERMINFO 1" >>confdefs.h
15427
15428 TERMCAP_OBJ=terminfo.o
067d23c9 15429fi
20d5e28a
GM
15430if test "X$LIBS_TERMCAP" = "X-lncurses"; then
15431
15432$as_echo "#define USE_NCURSES 1" >>confdefs.h
15433
15434fi
067d23c9 15435
f199cab1 15436
067d23c9 15437
5476a9a4
GM
15438
15439# Do we have res_init, for detecting changes in /etc/resolv.conf?
15440# On Darwin, res_init appears not to be useful: see bug#562 and
15441# http://lists.gnu.org/archive/html/emacs-devel/2007-11/msg01467.html
15442resolv=no
15443
15444if test $opsys != darwin; then
15445
15446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15447/* end confdefs.h. */
15448#include <netinet/in.h>
15449#include <arpa/nameser.h>
15450#include <resolv.h>
067d23c9
KY
15451int
15452main ()
15453{
5476a9a4 15454return res_init();
067d23c9
KY
15455 ;
15456 return 0;
15457}
15458_ACEOF
15459if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 15460 have_res_init=yes
067d23c9 15461else
5476a9a4 15462 have_res_init=no
067d23c9
KY
15463fi
15464rm -f core conftest.err conftest.$ac_objext \
15465 conftest$ac_exeext conftest.$ac_ext
5476a9a4
GM
15466 if test "$have_res_init" = no; then
15467 OLIBS="$LIBS"
15468 LIBS="$LIBS -lresolv"
15469 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_init with -lresolv" >&5
15470$as_echo_n "checking for res_init with -lresolv... " >&6; }
15471 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 15472/* end confdefs.h. */
5476a9a4
GM
15473#include <netinet/in.h>
15474#include <arpa/nameser.h>
15475#include <resolv.h>
067d23c9
KY
15476int
15477main ()
15478{
5476a9a4 15479return res_init();
067d23c9
KY
15480 ;
15481 return 0;
15482}
15483_ACEOF
15484if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 15485 have_res_init=yes
067d23c9 15486else
5476a9a4 15487 have_res_init=no
067d23c9
KY
15488fi
15489rm -f core conftest.err conftest.$ac_objext \
15490 conftest$ac_exeext conftest.$ac_ext
5476a9a4
GM
15491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_res_init" >&5
15492$as_echo "$have_res_init" >&6; }
15493 if test "$have_res_init" = yes ; then
15494 resolv=yes
15495 fi
15496 LIBS="$OLIBS"
15497 fi
067d23c9 15498
5476a9a4
GM
15499 if test "$have_res_init" = yes; then
15500
15501$as_echo "#define HAVE_RES_INIT 1" >>confdefs.h
067d23c9 15502
5476a9a4 15503 fi
067d23c9 15504fi
5476a9a4
GM
15505# Do we need the Hesiod library to provide the support routines?
15506LIBHESIOD=
15507if test "$with_hesiod" != no ; then
15508 # Don't set $LIBS here -- see comments above. FIXME which comments?
15509 ac_fn_c_check_func "$LINENO" "res_send" "ac_cv_func_res_send"
15510if test "x$ac_cv_func_res_send" = x""yes; then :
f199cab1 15511
5476a9a4
GM
15512else
15513 ac_fn_c_check_func "$LINENO" "__res_send" "ac_cv_func___res_send"
15514if test "x$ac_cv_func___res_send" = x""yes; then :
f199cab1 15515
5476a9a4
GM
15516else
15517 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_send in -lresolv" >&5
15518$as_echo_n "checking for res_send in -lresolv... " >&6; }
15519if test "${ac_cv_lib_resolv_res_send+set}" = set; then :
067d23c9
KY
15520 $as_echo_n "(cached) " >&6
15521else
15522 ac_check_lib_save_LIBS=$LIBS
5476a9a4 15523LIBS="-lresolv $LIBS"
067d23c9
KY
15524cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15525/* end confdefs.h. */
15526
15527/* Override any GCC internal prototype to avoid an error.
15528 Use char because int might match the return type of a GCC
15529 builtin and then its argument prototype would still apply. */
15530#ifdef __cplusplus
15531extern "C"
15532#endif
5476a9a4 15533char res_send ();
067d23c9
KY
15534int
15535main ()
15536{
5476a9a4 15537return res_send ();
067d23c9
KY
15538 ;
15539 return 0;
15540}
15541_ACEOF
15542if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 15543 ac_cv_lib_resolv_res_send=yes
067d23c9 15544else
5476a9a4 15545 ac_cv_lib_resolv_res_send=no
067d23c9
KY
15546fi
15547rm -f core conftest.err conftest.$ac_objext \
f199cab1
GM
15548 conftest$ac_exeext conftest.$ac_ext
15549LIBS=$ac_check_lib_save_LIBS
15550fi
5476a9a4
GM
15551{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_send" >&5
15552$as_echo "$ac_cv_lib_resolv_res_send" >&6; }
15553if test "x$ac_cv_lib_resolv_res_send" = x""yes; then :
15554 resolv=yes
15555else
15556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __res_send in -lresolv" >&5
15557$as_echo_n "checking for __res_send in -lresolv... " >&6; }
15558if test "${ac_cv_lib_resolv___res_send+set}" = set; then :
f199cab1
GM
15559 $as_echo_n "(cached) " >&6
15560else
15561 ac_check_lib_save_LIBS=$LIBS
5476a9a4 15562LIBS="-lresolv $LIBS"
f199cab1
GM
15563cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15564/* end confdefs.h. */
4717915f 15565
f199cab1
GM
15566/* Override any GCC internal prototype to avoid an error.
15567 Use char because int might match the return type of a GCC
15568 builtin and then its argument prototype would still apply. */
15569#ifdef __cplusplus
15570extern "C"
15571#endif
5476a9a4 15572char __res_send ();
f199cab1
GM
15573int
15574main ()
15575{
5476a9a4 15576return __res_send ();
f199cab1
GM
15577 ;
15578 return 0;
15579}
15580_ACEOF
15581if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 15582 ac_cv_lib_resolv___res_send=yes
f199cab1 15583else
5476a9a4 15584 ac_cv_lib_resolv___res_send=no
f199cab1
GM
15585fi
15586rm -f core conftest.err conftest.$ac_objext \
15587 conftest$ac_exeext conftest.$ac_ext
15588LIBS=$ac_check_lib_save_LIBS
15589fi
5476a9a4
GM
15590{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv___res_send" >&5
15591$as_echo "$ac_cv_lib_resolv___res_send" >&6; }
15592if test "x$ac_cv_lib_resolv___res_send" = x""yes; then :
15593 resolv=yes
067d23c9 15594fi
f199cab1 15595
5476a9a4 15596fi
1f5d53eb 15597
5476a9a4 15598fi
067d23c9 15599
067d23c9
KY
15600fi
15601
5476a9a4
GM
15602 if test "$resolv" = yes ; then
15603 RESOLVLIB=-lresolv
15604 else
15605 RESOLVLIB=
15606 fi
15607 ac_fn_c_check_func "$LINENO" "hes_getmailhost" "ac_cv_func_hes_getmailhost"
15608if test "x$ac_cv_func_hes_getmailhost" = x""yes; then :
15609
15610else
15611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hes_getmailhost in -lhesiod" >&5
15612$as_echo_n "checking for hes_getmailhost in -lhesiod... " >&6; }
15613if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then :
15614 $as_echo_n "(cached) " >&6
15615else
15616 ac_check_lib_save_LIBS=$LIBS
15617LIBS="-lhesiod $RESOLVLIB $LIBS"
15618cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 15619/* end confdefs.h. */
5476a9a4
GM
15620
15621/* Override any GCC internal prototype to avoid an error.
15622 Use char because int might match the return type of a GCC
15623 builtin and then its argument prototype would still apply. */
15624#ifdef __cplusplus
15625extern "C"
15626#endif
15627char hes_getmailhost ();
067d23c9
KY
15628int
15629main ()
15630{
5476a9a4 15631return hes_getmailhost ();
067d23c9
KY
15632 ;
15633 return 0;
15634}
15635_ACEOF
f199cab1 15636if ac_fn_c_try_link "$LINENO"; then :
5476a9a4
GM
15637 ac_cv_lib_hesiod_hes_getmailhost=yes
15638else
15639 ac_cv_lib_hesiod_hes_getmailhost=no
067d23c9 15640fi
f199cab1
GM
15641rm -f core conftest.err conftest.$ac_objext \
15642 conftest$ac_exeext conftest.$ac_ext
5476a9a4 15643LIBS=$ac_check_lib_save_LIBS
067d23c9 15644fi
5476a9a4
GM
15645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5
15646$as_echo "$ac_cv_lib_hesiod_hes_getmailhost" >&6; }
15647if test "x$ac_cv_lib_hesiod_hes_getmailhost" = x""yes; then :
15648 hesiod=yes
15649else
15650 :
067d23c9
KY
15651fi
15652
c5a68906 15653fi
f199cab1
GM
15654
15655
5476a9a4 15656 if test x"$hesiod" = xyes; then
5476a9a4 15657 LIBHESIOD=-lhesiod
c5a68906 15658 fi
5476a9a4 15659fi
4fc2b746 15660
4fc2b746 15661
5476a9a4
GM
15662# Do we need libresolv (due to res_init or Hesiod)?
15663if test "$resolv" = yes && test $opsys != darwin; then
5476a9a4
GM
15664 LIBRESOLV=-lresolv
15665else
15666 LIBRESOLV=
15667fi
4fc2b746 15668
4fc2b746 15669
5476a9a4
GM
15670# These tell us which Kerberos-related libraries to use.
15671COM_ERRLIB=
15672CRYPTOLIB=
15673KRB5LIB=
15674DESLIB=
15675KRB4LIB=
4fc2b746 15676
5476a9a4
GM
15677if test "${with_kerberos}" != no; then
15678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for com_err in -lcom_err" >&5
15679$as_echo_n "checking for com_err in -lcom_err... " >&6; }
15680if test "${ac_cv_lib_com_err_com_err+set}" = set; then :
15681 $as_echo_n "(cached) " >&6
15682else
15683 ac_check_lib_save_LIBS=$LIBS
15684LIBS="-lcom_err $LIBS"
15685cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15686/* end confdefs.h. */
4fc2b746 15687
5476a9a4
GM
15688/* Override any GCC internal prototype to avoid an error.
15689 Use char because int might match the return type of a GCC
15690 builtin and then its argument prototype would still apply. */
15691#ifdef __cplusplus
15692extern "C"
15693#endif
15694char com_err ();
15695int
15696main ()
15697{
15698return com_err ();
15699 ;
15700 return 0;
15701}
15702_ACEOF
15703if ac_fn_c_try_link "$LINENO"; then :
15704 ac_cv_lib_com_err_com_err=yes
15705else
15706 ac_cv_lib_com_err_com_err=no
15707fi
15708rm -f core conftest.err conftest.$ac_objext \
15709 conftest$ac_exeext conftest.$ac_ext
15710LIBS=$ac_check_lib_save_LIBS
15711fi
15712{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_com_err_com_err" >&5
15713$as_echo "$ac_cv_lib_com_err_com_err" >&6; }
15714if test "x$ac_cv_lib_com_err_com_err" = x""yes; then :
15715 have_com_err=yes
15716else
15717 have_com_err=no
15718fi
f199cab1 15719
5476a9a4
GM
15720 if test $have_com_err = yes; then
15721 COM_ERRLIB=-lcom_err
15722 LIBS="$COM_ERRLIB $LIBS"
5476a9a4
GM
15723 fi
15724 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lcrypto" >&5
15725$as_echo_n "checking for mit_des_cbc_encrypt in -lcrypto... " >&6; }
15726if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then :
15727 $as_echo_n "(cached) " >&6
15728else
15729 ac_check_lib_save_LIBS=$LIBS
15730LIBS="-lcrypto $LIBS"
15731cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15732/* end confdefs.h. */
f199cab1 15733
5476a9a4
GM
15734/* Override any GCC internal prototype to avoid an error.
15735 Use char because int might match the return type of a GCC
15736 builtin and then its argument prototype would still apply. */
15737#ifdef __cplusplus
15738extern "C"
15739#endif
15740char mit_des_cbc_encrypt ();
15741int
15742main ()
15743{
15744return mit_des_cbc_encrypt ();
15745 ;
15746 return 0;
15747}
15748_ACEOF
15749if ac_fn_c_try_link "$LINENO"; then :
15750 ac_cv_lib_crypto_mit_des_cbc_encrypt=yes
15751else
15752 ac_cv_lib_crypto_mit_des_cbc_encrypt=no
15753fi
15754rm -f core conftest.err conftest.$ac_objext \
15755 conftest$ac_exeext conftest.$ac_ext
15756LIBS=$ac_check_lib_save_LIBS
15757fi
15758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5
15759$as_echo "$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6; }
15760if test "x$ac_cv_lib_crypto_mit_des_cbc_encrypt" = x""yes; then :
15761 have_crypto=yes
15762else
15763 have_crypto=no
15764fi
f199cab1 15765
5476a9a4
GM
15766 if test $have_crypto = yes; then
15767 CRYPTOLIB=-lcrypto
15768 LIBS="$CRYPTOLIB $LIBS"
5476a9a4
GM
15769 fi
15770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
15771$as_echo_n "checking for mit_des_cbc_encrypt in -lk5crypto... " >&6; }
15772if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then :
15773 $as_echo_n "(cached) " >&6
15774else
15775 ac_check_lib_save_LIBS=$LIBS
15776LIBS="-lk5crypto $LIBS"
15777cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15778/* end confdefs.h. */
f199cab1 15779
5476a9a4
GM
15780/* Override any GCC internal prototype to avoid an error.
15781 Use char because int might match the return type of a GCC
15782 builtin and then its argument prototype would still apply. */
15783#ifdef __cplusplus
15784extern "C"
15785#endif
15786char mit_des_cbc_encrypt ();
15787int
15788main ()
15789{
15790return mit_des_cbc_encrypt ();
15791 ;
15792 return 0;
15793}
15794_ACEOF
15795if ac_fn_c_try_link "$LINENO"; then :
15796 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes
15797else
15798 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no
15799fi
15800rm -f core conftest.err conftest.$ac_objext \
15801 conftest$ac_exeext conftest.$ac_ext
15802LIBS=$ac_check_lib_save_LIBS
15803fi
15804{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5
15805$as_echo "$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6; }
15806if test "x$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" = x""yes; then :
15807 have_k5crypto=yes
15808else
15809 have_k5crypto=no
4fc2b746 15810fi
4fc2b746 15811
5476a9a4
GM
15812 if test $have_k5crypto = yes; then
15813 CRYPTOLIB=-lk5crypto
15814 LIBS="$CRYPTOLIB $LIBS"
5476a9a4
GM
15815 fi
15816 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5_init_context in -lkrb5" >&5
15817$as_echo_n "checking for krb5_init_context in -lkrb5... " >&6; }
15818if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then :
15819 $as_echo_n "(cached) " >&6
15820else
15821 ac_check_lib_save_LIBS=$LIBS
15822LIBS="-lkrb5 $LIBS"
15823cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15824/* end confdefs.h. */
4fc2b746 15825
5476a9a4
GM
15826/* Override any GCC internal prototype to avoid an error.
15827 Use char because int might match the return type of a GCC
15828 builtin and then its argument prototype would still apply. */
15829#ifdef __cplusplus
15830extern "C"
15831#endif
15832char krb5_init_context ();
15833int
15834main ()
15835{
15836return krb5_init_context ();
15837 ;
15838 return 0;
15839}
15840_ACEOF
15841if ac_fn_c_try_link "$LINENO"; then :
15842 ac_cv_lib_krb5_krb5_init_context=yes
15843else
15844 ac_cv_lib_krb5_krb5_init_context=no
15845fi
15846rm -f core conftest.err conftest.$ac_objext \
15847 conftest$ac_exeext conftest.$ac_ext
15848LIBS=$ac_check_lib_save_LIBS
15849fi
15850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb5_krb5_init_context" >&5
15851$as_echo "$ac_cv_lib_krb5_krb5_init_context" >&6; }
15852if test "x$ac_cv_lib_krb5_krb5_init_context" = x""yes; then :
15853 have_krb5=yes
15854else
15855 have_krb5=no
15856fi
f199cab1 15857
5476a9a4
GM
15858 if test $have_krb5=yes; then
15859 KRB5LIB=-lkrb5
15860 LIBS="$KRB5LIB $LIBS"
5476a9a4
GM
15861 fi
15862 if test "${with_kerberos5}" = no; then
15863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes425" >&5
15864$as_echo_n "checking for des_cbc_encrypt in -ldes425... " >&6; }
15865if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then :
f199cab1
GM
15866 $as_echo_n "(cached) " >&6
15867else
5476a9a4
GM
15868 ac_check_lib_save_LIBS=$LIBS
15869LIBS="-ldes425 $LIBS"
15870cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3e0be4ab 15871/* end confdefs.h. */
f199cab1 15872
5476a9a4
GM
15873/* Override any GCC internal prototype to avoid an error.
15874 Use char because int might match the return type of a GCC
15875 builtin and then its argument prototype would still apply. */
15876#ifdef __cplusplus
15877extern "C"
15878#endif
15879char des_cbc_encrypt ();
3e0be4ab
GM
15880int
15881main ()
15882{
5476a9a4 15883return des_cbc_encrypt ();
3e0be4ab
GM
15884 ;
15885 return 0;
15886}
15887_ACEOF
5476a9a4
GM
15888if ac_fn_c_try_link "$LINENO"; then :
15889 ac_cv_lib_des425_des_cbc_encrypt=yes
3e0be4ab 15890else
5476a9a4 15891 ac_cv_lib_des425_des_cbc_encrypt=no
3e0be4ab 15892fi
5476a9a4
GM
15893rm -f core conftest.err conftest.$ac_objext \
15894 conftest$ac_exeext conftest.$ac_ext
15895LIBS=$ac_check_lib_save_LIBS
4fc2b746 15896fi
5476a9a4
GM
15897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
15898$as_echo "$ac_cv_lib_des425_des_cbc_encrypt" >&6; }
15899if test "x$ac_cv_lib_des425_des_cbc_encrypt" = x""yes; then :
15900 have_des425=yes
15901else
15902 have_des425=no
f199cab1 15903fi
6c051bab 15904
5476a9a4
GM
15905 if test $have_des425 = yes; then
15906 DESLIB=-ldes425
15907 LIBS="$DESLIB $LIBS"
5476a9a4
GM
15908 else
15909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes" >&5
15910$as_echo_n "checking for des_cbc_encrypt in -ldes... " >&6; }
15911if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then :
15912 $as_echo_n "(cached) " >&6
15913else
15914 ac_check_lib_save_LIBS=$LIBS
15915LIBS="-ldes $LIBS"
15916cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15917/* end confdefs.h. */
f199cab1 15918
5476a9a4
GM
15919/* Override any GCC internal prototype to avoid an error.
15920 Use char because int might match the return type of a GCC
15921 builtin and then its argument prototype would still apply. */
15922#ifdef __cplusplus
15923extern "C"
15924#endif
15925char des_cbc_encrypt ();
15926int
15927main ()
15928{
15929return des_cbc_encrypt ();
15930 ;
15931 return 0;
15932}
15933_ACEOF
15934if ac_fn_c_try_link "$LINENO"; then :
15935 ac_cv_lib_des_des_cbc_encrypt=yes
15936else
15937 ac_cv_lib_des_des_cbc_encrypt=no
15938fi
15939rm -f core conftest.err conftest.$ac_objext \
15940 conftest$ac_exeext conftest.$ac_ext
15941LIBS=$ac_check_lib_save_LIBS
15942fi
15943{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
15944$as_echo "$ac_cv_lib_des_des_cbc_encrypt" >&6; }
15945if test "x$ac_cv_lib_des_des_cbc_encrypt" = x""yes; then :
15946 have_des=yes
15947else
15948 have_des=no
15949fi
f199cab1 15950
5476a9a4
GM
15951 if test $have_des = yes; then
15952 DESLIB=-ldes
15953 LIBS="$DESLIB $LIBS"
5476a9a4
GM
15954 fi
15955 fi
15956 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb4" >&5
15957$as_echo_n "checking for krb_get_cred in -lkrb4... " >&6; }
15958if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then :
942f733f
PE
15959 $as_echo_n "(cached) " >&6
15960else
5476a9a4
GM
15961 ac_check_lib_save_LIBS=$LIBS
15962LIBS="-lkrb4 $LIBS"
15963cat confdefs.h - <<_ACEOF >conftest.$ac_ext
942f733f 15964/* end confdefs.h. */
942f733f 15965
5476a9a4
GM
15966/* Override any GCC internal prototype to avoid an error.
15967 Use char because int might match the return type of a GCC
15968 builtin and then its argument prototype would still apply. */
15969#ifdef __cplusplus
15970extern "C"
15971#endif
15972char krb_get_cred ();
942f733f
PE
15973int
15974main ()
15975{
5476a9a4 15976return krb_get_cred ();
942f733f
PE
15977 ;
15978 return 0;
15979}
15980_ACEOF
5476a9a4
GM
15981if ac_fn_c_try_link "$LINENO"; then :
15982 ac_cv_lib_krb4_krb_get_cred=yes
15983else
15984 ac_cv_lib_krb4_krb_get_cred=no
15985fi
15986rm -f core conftest.err conftest.$ac_objext \
15987 conftest$ac_exeext conftest.$ac_ext
15988LIBS=$ac_check_lib_save_LIBS
15989fi
15990{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb4_krb_get_cred" >&5
15991$as_echo "$ac_cv_lib_krb4_krb_get_cred" >&6; }
15992if test "x$ac_cv_lib_krb4_krb_get_cred" = x""yes; then :
15993 have_krb4=yes
15994else
15995 have_krb4=no
15996fi
15997
15998 if test $have_krb4 = yes; then
15999 KRB4LIB=-lkrb4
16000 LIBS="$KRB4LIB $LIBS"
5476a9a4
GM
16001 else
16002 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb" >&5
16003$as_echo_n "checking for krb_get_cred in -lkrb... " >&6; }
16004if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then :
16005 $as_echo_n "(cached) " >&6
3e0be4ab 16006else
5476a9a4
GM
16007 ac_check_lib_save_LIBS=$LIBS
16008LIBS="-lkrb $LIBS"
16009cat confdefs.h - <<_ACEOF >conftest.$ac_ext
942f733f 16010/* end confdefs.h. */
942f733f 16011
5476a9a4
GM
16012/* Override any GCC internal prototype to avoid an error.
16013 Use char because int might match the return type of a GCC
16014 builtin and then its argument prototype would still apply. */
16015#ifdef __cplusplus
16016extern "C"
16017#endif
16018char krb_get_cred ();
942f733f
PE
16019int
16020main ()
16021{
5476a9a4 16022return krb_get_cred ();
942f733f
PE
16023 ;
16024 return 0;
16025}
16026_ACEOF
5476a9a4
GM
16027if ac_fn_c_try_link "$LINENO"; then :
16028 ac_cv_lib_krb_krb_get_cred=yes
942f733f 16029else
5476a9a4 16030 ac_cv_lib_krb_krb_get_cred=no
942f733f 16031fi
5476a9a4
GM
16032rm -f core conftest.err conftest.$ac_objext \
16033 conftest$ac_exeext conftest.$ac_ext
16034LIBS=$ac_check_lib_save_LIBS
3e0be4ab 16035fi
5476a9a4
GM
16036{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb_krb_get_cred" >&5
16037$as_echo "$ac_cv_lib_krb_krb_get_cred" >&6; }
16038if test "x$ac_cv_lib_krb_krb_get_cred" = x""yes; then :
16039 have_krb=yes
16040else
16041 have_krb=no
942f733f 16042fi
f199cab1 16043
5476a9a4
GM
16044 if test $have_krb = yes; then
16045 KRB4LIB=-lkrb
16046 LIBS="$KRB4LIB $LIBS"
5476a9a4
GM
16047 fi
16048 fi
f199cab1
GM
16049 fi
16050
5476a9a4
GM
16051 if test "${with_kerberos5}" != no; then
16052 for ac_header in krb5.h
16053do :
16054 ac_fn_c_check_header_mongrel "$LINENO" "krb5.h" "ac_cv_header_krb5_h" "$ac_includes_default"
16055if test "x$ac_cv_header_krb5_h" = x""yes; then :
16056 cat >>confdefs.h <<_ACEOF
16057#define HAVE_KRB5_H 1
16058_ACEOF
16059 ac_fn_c_check_member "$LINENO" "krb5_error" "text" "ac_cv_member_krb5_error_text" "#include <krb5.h>
16060"
16061if test "x$ac_cv_member_krb5_error_text" = x""yes; then :
16062
f199cab1 16063cat >>confdefs.h <<_ACEOF
5476a9a4 16064#define HAVE_KRB5_ERROR_TEXT 1
f199cab1
GM
16065_ACEOF
16066
16067
5476a9a4
GM
16068fi
16069ac_fn_c_check_member "$LINENO" "krb5_error" "e_text" "ac_cv_member_krb5_error_e_text" "#include <krb5.h>
16070"
16071if test "x$ac_cv_member_krb5_error_e_text" = x""yes; then :
f199cab1 16072
5476a9a4
GM
16073cat >>confdefs.h <<_ACEOF
16074#define HAVE_KRB5_ERROR_E_TEXT 1
16075_ACEOF
f199cab1
GM
16076
16077
5476a9a4 16078fi
f199cab1 16079
5476a9a4 16080fi
f199cab1 16081
5476a9a4 16082done
f199cab1 16083
5476a9a4 16084 else
5476a9a4 16085 for ac_header in krb.h
f199cab1 16086do :
5476a9a4
GM
16087 ac_fn_c_check_header_mongrel "$LINENO" "krb.h" "ac_cv_header_krb_h" "$ac_includes_default"
16088if test "x$ac_cv_header_krb_h" = x""yes; then :
f199cab1 16089 cat >>confdefs.h <<_ACEOF
5476a9a4
GM
16090#define HAVE_KRB_H 1
16091_ACEOF
16092
16093else
16094 for ac_header in kerberosIV/krb.h
16095do :
16096 ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/krb.h" "ac_cv_header_kerberosIV_krb_h" "$ac_includes_default"
16097if test "x$ac_cv_header_kerberosIV_krb_h" = x""yes; then :
16098 cat >>confdefs.h <<_ACEOF
16099#define HAVE_KERBEROSIV_KRB_H 1
16100_ACEOF
16101
16102else
16103 for ac_header in kerberos/krb.h
16104do :
16105 ac_fn_c_check_header_mongrel "$LINENO" "kerberos/krb.h" "ac_cv_header_kerberos_krb_h" "$ac_includes_default"
16106if test "x$ac_cv_header_kerberos_krb_h" = x""yes; then :
16107 cat >>confdefs.h <<_ACEOF
16108#define HAVE_KERBEROS_KRB_H 1
f199cab1 16109_ACEOF
942f733f 16110
3e0be4ab 16111fi
942f733f 16112
f199cab1
GM
16113done
16114
5476a9a4
GM
16115fi
16116
16117done
16118
16119fi
16120
16121done
16122
16123 fi
16124 for ac_header in com_err.h
f199cab1 16125do :
5476a9a4
GM
16126 ac_fn_c_check_header_mongrel "$LINENO" "com_err.h" "ac_cv_header_com_err_h" "$ac_includes_default"
16127if test "x$ac_cv_header_com_err_h" = x""yes; then :
f199cab1 16128 cat >>confdefs.h <<_ACEOF
5476a9a4 16129#define HAVE_COM_ERR_H 1
f199cab1
GM
16130_ACEOF
16131
3e0be4ab 16132fi
f199cab1 16133
5476a9a4 16134done
3e0be4ab
GM
16135
16136fi
16137
f199cab1
GM
16138
16139
16140
16141
f199cab1
GM
16142
16143
bab4f76d
GM
16144for ac_header in valgrind/valgrind.h
16145do :
16146 ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default"
16147if test "x$ac_cv_header_valgrind_valgrind_h" = x""yes; then :
16148 cat >>confdefs.h <<_ACEOF
16149#define HAVE_VALGRIND_VALGRIND_H 1
16150_ACEOF
16151
16152fi
16153
16154done
16155
16156
f199cab1
GM
16157
16158
16159
5476a9a4
GM
16160 for ac_func in $ac_func_list
16161do :
16162 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16163ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16164eval as_val=\$$as_ac_var
16165 if test "x$as_val" = x""yes; then :
16166 cat >>confdefs.h <<_ACEOF
16167#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16168_ACEOF
16169
16170fi
16171done
16172
f199cab1
GM
16173
16174
16175
5476a9a4
GM
16176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime caches TZ" >&5
16177$as_echo_n "checking whether localtime caches TZ... " >&6; }
16178if test "${emacs_cv_localtime_cache+set}" = set; then :
16179 $as_echo_n "(cached) " >&6
16180else
16181 if test x$ac_cv_func_tzset = xyes; then
16182if test "$cross_compiling" = yes; then :
16183 # If we have tzset, assume the worst when cross-compiling.
16184emacs_cv_localtime_cache=yes
16185else
16186 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16187/* end confdefs.h. */
16188#include <time.h>
16189char TZ_GMT0[] = "TZ=GMT0";
16190char TZ_PST8[] = "TZ=PST8";
16191main()
16192{
16193 time_t now = time ((time_t *) 0);
16194 int hour_GMT0, hour_unset;
16195 if (putenv (TZ_GMT0) != 0)
16196 exit (1);
16197 hour_GMT0 = localtime (&now)->tm_hour;
16198 unsetenv("TZ");
16199 hour_unset = localtime (&now)->tm_hour;
16200 if (putenv (TZ_PST8) != 0)
16201 exit (1);
16202 if (localtime (&now)->tm_hour == hour_GMT0)
16203 exit (1);
16204 unsetenv("TZ");
16205 if (localtime (&now)->tm_hour != hour_unset)
16206 exit (1);
16207 exit (0);
16208}
16209_ACEOF
16210if ac_fn_c_try_run "$LINENO"; then :
16211 emacs_cv_localtime_cache=no
16212else
16213 emacs_cv_localtime_cache=yes
16214fi
16215rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16216 conftest.$ac_objext conftest.beam conftest.$ac_ext
16217fi
f199cab1 16218
5476a9a4
GM
16219else
16220 # If we lack tzset, report that localtime does not cache TZ,
16221 # since we can't invalidate the cache if we don't have tzset.
16222 emacs_cv_localtime_cache=no
16223fi
16224fi
16225{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_localtime_cache" >&5
16226$as_echo "$emacs_cv_localtime_cache" >&6; }
16227if test $emacs_cv_localtime_cache = yes; then
f199cab1 16228
5476a9a4 16229$as_echo "#define LOCALTIME_CACHE 1" >>confdefs.h
f199cab1 16230
5476a9a4 16231fi
f199cab1 16232
5476a9a4
GM
16233ok_so_far=yes
16234ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket"
16235if test "x$ac_cv_func_socket" = x""yes; then :
3e0be4ab 16236
5476a9a4
GM
16237else
16238 ok_so_far=no
16239fi
f199cab1 16240
5476a9a4
GM
16241if test $ok_so_far = yes; then
16242 ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
16243if test "x$ac_cv_header_netinet_in_h" = x""yes; then :
f199cab1 16244
5476a9a4
GM
16245else
16246 ok_so_far=no
16247fi
f199cab1
GM
16248
16249
5476a9a4
GM
16250fi
16251if test $ok_so_far = yes; then
16252 ac_fn_c_check_header_mongrel "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default"
16253if test "x$ac_cv_header_arpa_inet_h" = x""yes; then :
f199cab1 16254
5476a9a4
GM
16255else
16256 ok_so_far=no
16257fi
f199cab1
GM
16258
16259
5476a9a4
GM
16260fi
16261if test $ok_so_far = yes; then
f199cab1 16262
5476a9a4 16263$as_echo "#define HAVE_INET_SOCKETS 1" >>confdefs.h
f199cab1 16264
5476a9a4 16265fi
f199cab1 16266
bb7dce39
GM
16267case $canonical in
16268 *-solaris2.4 | *-solaris2.4.*)
16269 : ${ac_cv_func_vfork_works=no};;
16270esac
16271
5476a9a4
GM
16272ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
16273if test "x$ac_cv_type_pid_t" = x""yes; then :
3e0be4ab 16274
5476a9a4 16275else
3e0be4ab 16276
5476a9a4
GM
16277cat >>confdefs.h <<_ACEOF
16278#define pid_t int
16279_ACEOF
f199cab1 16280
5476a9a4 16281fi
f199cab1 16282
5476a9a4
GM
16283for ac_header in vfork.h
16284do :
16285 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
16286if test "x$ac_cv_header_vfork_h" = x""yes; then :
16287 cat >>confdefs.h <<_ACEOF
16288#define HAVE_VFORK_H 1
16289_ACEOF
f199cab1 16290
5476a9a4 16291fi
f199cab1 16292
5476a9a4 16293done
f199cab1 16294
5476a9a4
GM
16295for ac_func in fork vfork
16296do :
16297 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16298ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16299eval as_val=\$$as_ac_var
16300 if test "x$as_val" = x""yes; then :
16301 cat >>confdefs.h <<_ACEOF
16302#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16303_ACEOF
f199cab1 16304
5476a9a4
GM
16305fi
16306done
f199cab1 16307
5476a9a4
GM
16308if test "x$ac_cv_func_fork" = xyes; then
16309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
16310$as_echo_n "checking for working fork... " >&6; }
16311if test "${ac_cv_func_fork_works+set}" = set; then :
16312 $as_echo_n "(cached) " >&6
16313else
16314 if test "$cross_compiling" = yes; then :
16315 ac_cv_func_fork_works=cross
16316else
16317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16318/* end confdefs.h. */
16319$ac_includes_default
16320int
16321main ()
16322{
f199cab1 16323
5476a9a4
GM
16324 /* By Ruediger Kuhlmann. */
16325 return fork () < 0;
f199cab1 16326
5476a9a4
GM
16327 ;
16328 return 0;
16329}
16330_ACEOF
16331if ac_fn_c_try_run "$LINENO"; then :
16332 ac_cv_func_fork_works=yes
16333else
16334 ac_cv_func_fork_works=no
16335fi
16336rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16337 conftest.$ac_objext conftest.beam conftest.$ac_ext
16338fi
f199cab1 16339
5476a9a4
GM
16340fi
16341{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
16342$as_echo "$ac_cv_func_fork_works" >&6; }
f199cab1 16343
5476a9a4
GM
16344else
16345 ac_cv_func_fork_works=$ac_cv_func_fork
16346fi
16347if test "x$ac_cv_func_fork_works" = xcross; then
16348 case $host in
16349 *-*-amigaos* | *-*-msdosdjgpp*)
16350 # Override, as these systems have only a dummy fork() stub
16351 ac_cv_func_fork_works=no
16352 ;;
16353 *)
16354 ac_cv_func_fork_works=yes
16355 ;;
16356 esac
16357 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
16358$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
16359fi
16360ac_cv_func_vfork_works=$ac_cv_func_vfork
16361if test "x$ac_cv_func_vfork" = xyes; then
16362 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
16363$as_echo_n "checking for working vfork... " >&6; }
16364if test "${ac_cv_func_vfork_works+set}" = set; then :
f199cab1
GM
16365 $as_echo_n "(cached) " >&6
16366else
16367 if test "$cross_compiling" = yes; then :
5476a9a4 16368 ac_cv_func_vfork_works=cross
f199cab1
GM
16369else
16370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16371/* end confdefs.h. */
5476a9a4
GM
16372/* Thanks to Paul Eggert for this test. */
16373$ac_includes_default
16374#include <sys/wait.h>
16375#ifdef HAVE_VFORK_H
16376# include <vfork.h>
f199cab1 16377#endif
5476a9a4
GM
16378/* On some sparc systems, changes by the child to local and incoming
16379 argument registers are propagated back to the parent. The compiler
16380 is told about this with #include <vfork.h>, but some compilers
16381 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
16382 static variable whose address is put into a register that is
16383 clobbered by the vfork. */
16384static void
16385#ifdef __cplusplus
16386sparc_address_test (int arg)
16387# else
16388sparc_address_test (arg) int arg;
f199cab1 16389#endif
5476a9a4
GM
16390{
16391 static pid_t child;
16392 if (!child) {
16393 child = vfork ();
16394 if (child < 0) {
16395 perror ("vfork");
16396 _exit(2);
16397 }
16398 if (!child) {
16399 arg = getpid();
16400 write(-1, "", 0);
16401 _exit (arg);
16402 }
16403 }
16404}
f199cab1 16405
5476a9a4
GM
16406int
16407main ()
16408{
16409 pid_t parent = getpid ();
16410 pid_t child;
f199cab1 16411
5476a9a4 16412 sparc_address_test (0);
f199cab1 16413
5476a9a4 16414 child = vfork ();
3e0be4ab 16415
5476a9a4
GM
16416 if (child == 0) {
16417 /* Here is another test for sparc vfork register problems. This
16418 test uses lots of local variables, at least as many local
16419 variables as main has allocated so far including compiler
16420 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
16421 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
16422 reuse the register of parent for one of the local variables,
16423 since it will think that parent can't possibly be used any more
16424 in this routine. Assigning to the local variable will thus
16425 munge parent in the parent process. */
16426 pid_t
16427 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
16428 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
16429 /* Convince the compiler that p..p7 are live; otherwise, it might
16430 use the same hardware register for all 8 local variables. */
16431 if (p != p1 || p != p2 || p != p3 || p != p4
16432 || p != p5 || p != p6 || p != p7)
16433 _exit(1);
3e0be4ab 16434
5476a9a4
GM
16435 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
16436 from child file descriptors. If the child closes a descriptor
16437 before it execs or exits, this munges the parent's descriptor
16438 as well. Test for this by closing stdout in the child. */
16439 _exit(close(fileno(stdout)) != 0);
16440 } else {
16441 int status;
16442 struct stat st;
3e0be4ab 16443
5476a9a4
GM
16444 while (wait(&status) != child)
16445 ;
16446 return (
16447 /* Was there some problem with vforking? */
16448 child < 0
3e0be4ab 16449
5476a9a4
GM
16450 /* Did the child fail? (This shouldn't happen.) */
16451 || status
16452
16453 /* Did the vfork/compiler bug occur? */
16454 || parent != getpid()
16455
16456 /* Did the file descriptor bug occur? */
16457 || fstat(fileno(stdout), &st) != 0
16458 );
16459 }
f199cab1 16460}
5476a9a4
GM
16461_ACEOF
16462if ac_fn_c_try_run "$LINENO"; then :
16463 ac_cv_func_vfork_works=yes
16464else
16465 ac_cv_func_vfork_works=no
16466fi
16467rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16468 conftest.$ac_objext conftest.beam conftest.$ac_ext
16469fi
16470
16471fi
16472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
16473$as_echo "$ac_cv_func_vfork_works" >&6; }
16474
16475fi;
16476if test "x$ac_cv_func_fork_works" = xcross; then
16477 ac_cv_func_vfork_works=$ac_cv_func_vfork
16478 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
16479$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
16480fi
16481
16482if test "x$ac_cv_func_vfork_works" = xyes; then
3e0be4ab 16483
5476a9a4 16484$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
3e0be4ab 16485
5476a9a4 16486else
3e0be4ab 16487
5476a9a4 16488$as_echo "#define vfork fork" >>confdefs.h
942f733f 16489
5476a9a4
GM
16490fi
16491if test "x$ac_cv_func_fork_works" = xyes; then
942f733f 16492
5476a9a4 16493$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
942f733f 16494
5476a9a4 16495fi
f199cab1 16496
f199cab1 16497
5476a9a4
GM
16498for ac_func in snprintf
16499do :
16500 ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
16501if test "x$ac_cv_func_snprintf" = x""yes; then :
16502 cat >>confdefs.h <<_ACEOF
16503#define HAVE_SNPRINTF 1
16504_ACEOF
16505
16506fi
16507done
16508
942f733f 16509
0f55a32e
GM
16510XGSELOBJ=
16511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether GLib is linked in" >&5
16512$as_echo_n "checking whether GLib is linked in... " >&6; }
16513cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16514/* end confdefs.h. */
16515#include <glib.h>
16516
16517int
16518main ()
16519{
16520g_print ("Hello world");
16521 ;
16522 return 0;
16523}
16524_ACEOF
16525if ac_fn_c_try_link "$LINENO"; then :
16526 links_glib=yes
16527else
16528 links_glib=no
16529fi
16530rm -f core conftest.err conftest.$ac_objext \
16531 conftest$ac_exeext conftest.$ac_ext
16532{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $links_glib" >&5
16533$as_echo "$links_glib" >&6; }
16534if test "${links_glib}" = "yes"; then
16535
16536$as_echo "#define HAVE_GLIB 1" >>confdefs.h
16537
7cee6e79
GM
16538 if test "$HAVE_NS" = no;then
16539 XGSELOBJ=xgselect.o
16540 fi
0f55a32e
GM
16541fi
16542
16543
5476a9a4
GM
16544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
16545$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
16546if test "${emacs_cv_langinfo_codeset+set}" = set; then :
16547 $as_echo_n "(cached) " >&6
16548else
16549 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16550/* end confdefs.h. */
16551#include <langinfo.h>
3e0be4ab
GM
16552int
16553main ()
16554{
5476a9a4
GM
16555char* cs = nl_langinfo(CODESET);
16556 ;
16557 return 0;
16558}
16559_ACEOF
16560if ac_fn_c_try_link "$LINENO"; then :
16561 emacs_cv_langinfo_codeset=yes
16562else
16563 emacs_cv_langinfo_codeset=no
16564fi
16565rm -f core conftest.err conftest.$ac_objext \
16566 conftest$ac_exeext conftest.$ac_ext
f199cab1 16567
5476a9a4
GM
16568fi
16569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_langinfo_codeset" >&5
16570$as_echo "$emacs_cv_langinfo_codeset" >&6; }
16571if test $emacs_cv_langinfo_codeset = yes; then
f199cab1 16572
5476a9a4 16573$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
f199cab1 16574
5476a9a4 16575fi
f199cab1 16576
5476a9a4
GM
16577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
16578$as_echo_n "checking for mbstate_t... " >&6; }
16579if test "${ac_cv_type_mbstate_t+set}" = set; then :
16580 $as_echo_n "(cached) " >&6
16581else
16582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16583/* end confdefs.h. */
16584$ac_includes_default
16585# include <wchar.h>
16586int
16587main ()
16588{
16589mbstate_t x; return sizeof x;
16590 ;
16591 return 0;
3e0be4ab 16592}
942f733f 16593_ACEOF
5476a9a4
GM
16594if ac_fn_c_try_compile "$LINENO"; then :
16595 ac_cv_type_mbstate_t=yes
3e0be4ab 16596else
5476a9a4 16597 ac_cv_type_mbstate_t=no
942f733f 16598fi
5476a9a4 16599rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3e0be4ab 16600fi
5476a9a4
GM
16601{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
16602$as_echo "$ac_cv_type_mbstate_t" >&6; }
16603 if test $ac_cv_type_mbstate_t = yes; then
f199cab1 16604
5476a9a4 16605$as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
f199cab1 16606
5476a9a4 16607 else
f199cab1 16608
5476a9a4 16609$as_echo "#define mbstate_t int" >>confdefs.h
f199cab1 16610
5476a9a4
GM
16611 fi
16612
16613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C restricted array declarations" >&5
16614$as_echo_n "checking for C restricted array declarations... " >&6; }
16615if test "${emacs_cv_c_restrict_arr+set}" = set; then :
16616 $as_echo_n "(cached) " >&6
16617else
16618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16619/* end confdefs.h. */
16620void fred (int x[__restrict]);
16621int
16622main ()
16623{
16624
16625 ;
16626 return 0;
16627}
16628_ACEOF
16629if ac_fn_c_try_compile "$LINENO"; then :
16630 emacs_cv_c_restrict_arr=yes
16631else
16632 emacs_cv_c_restrict_arr=no
16633fi
16634rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16635fi
16636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_c_restrict_arr" >&5
16637$as_echo "$emacs_cv_c_restrict_arr" >&6; }
16638if test "$emacs_cv_c_restrict_arr" = yes; then
f199cab1 16639
5476a9a4 16640$as_echo "#define __restrict_arr __restrict" >>confdefs.h
f199cab1 16641
5476a9a4 16642fi
f199cab1
GM
16643
16644
7c61eaab 16645if test "${opsys}" != "mingw32"; then
f199cab1 16646
8ad96b1d
GM
16647$as_echo "#define AMPERSAND_FULL_NAME 1" >>confdefs.h
16648
7c61eaab 16649fi
8ad96b1d
GM
16650
16651
5476a9a4 16652$as_echo "#define CLASH_DETECTION 1" >>confdefs.h
f199cab1
GM
16653
16654
5476a9a4 16655## Note: PTYs are broken on darwin <6. Use at your own risk.
7c61eaab 16656if test "${opsys}" != "mingw32"; then
f199cab1 16657
5476a9a4 16658$as_echo "#define HAVE_PTYS 1" >>confdefs.h
f199cab1 16659
7c61eaab 16660fi
f199cab1
GM
16661
16662
5476a9a4 16663$as_echo "#define HAVE_SOCKETS 1" >>confdefs.h
f199cab1 16664
942f733f 16665
942f733f 16666
6b10626d
GM
16667
16668
7c61eaab
GM
16669if test "${opsys}" = "mingw32"; then
16670 $as_echo "#define NULL_DEVICE \"NUL:\"" >>confdefs.h
16671
16672else
16673 $as_echo "#define NULL_DEVICE \"/dev/null\"" >>confdefs.h
16674
16675fi
8ad96b1d
GM
16676
16677
7c61eaab
GM
16678if test "${opsys}" = "mingw32"; then
16679 $as_echo "#define SEPCHAR ';'" >>confdefs.h
8ad96b1d 16680
7c61eaab
GM
16681else
16682 $as_echo "#define SEPCHAR ':'" >>confdefs.h
8ad96b1d 16683
7c61eaab 16684fi
8ad96b1d
GM
16685
16686
16687$as_echo "#define subprocesses 1" >>confdefs.h
16688
16689
16690
16691$as_echo "#define USER_FULL_NAME pw->pw_gecos" >>confdefs.h
16692
16693
16694
942f733f 16695
9ff736dc
GM
16696$as_echo "#define DIRECTORY_SEP '/'" >>confdefs.h
16697
16698
7c61eaab 16699if test "${opsys}" = "mingw32"; then
7c61eaab 16700
db7863f4 16701$as_echo "#define IS_DEVICE_SEP(_c_) ((_c_) == ':')" >>confdefs.h
f199cab1 16702
6b10626d 16703
7c61eaab
GM
16704
16705$as_echo "#define IS_DIRECTORY_SEP(_c_) ((_c_) == '/' || (_c_) == '\\\\')" >>confdefs.h
16706
16707
16708
16709$as_echo "#define IS_ANY_SEP(_c_) (IS_DIRECTORY_SEP (_c_) || IS_DEVICE_SEP(_c_))" >>confdefs.h
16710
16711else
16712
6b10626d
GM
16713$as_echo "#define IS_DEVICE_SEP(_c_) 0" >>confdefs.h
16714
16715
16716
16717$as_echo "#define IS_DIRECTORY_SEP(_c_) ((_c_) == DIRECTORY_SEP)" >>confdefs.h
16718
16719
16720
16721$as_echo "#define IS_ANY_SEP(_c_) (IS_DIRECTORY_SEP (_c_))" >>confdefs.h
16722
7c61eaab 16723fi
6b10626d
GM
16724
16725
16726
5476a9a4
GM
16727case $opsys in
16728 aix4-2)
16729 if test x$ac_cv_lib_Xmu_XmuConvertStandardSelection != xyes; then
16730 $as_echo "#define NO_EDITRES 1" >>confdefs.h
f199cab1 16731
5476a9a4
GM
16732 fi
16733 ;;
f199cab1 16734
5476a9a4
GM
16735 hpux*)
16736 $as_echo "#define NO_EDITRES 1" >>confdefs.h
f199cab1 16737
5476a9a4
GM
16738 ;;
16739esac
f199cab1
GM
16740
16741
5476a9a4 16742case $opsys in
5476a9a4 16743 irix6-5 | sol2* | unixware )
f199cab1 16744
5476a9a4 16745$as_echo "#define NSIG_MINIMUM 32" >>confdefs.h
f199cab1 16746
5476a9a4
GM
16747 ;;
16748esac
f199cab1 16749
4fa92495 16750emacs_broken_SIGIO=no
f199cab1 16751
5476a9a4 16752case $opsys in
ffeb6dec 16753 hpux* | irix6-5 | openbsd | sol2* | unixware )
4fa92495 16754 emacs_broken_SIGIO=yes
5476a9a4 16755 ;;
f199cab1 16756
5476a9a4 16757 aix4-2)
f199cab1 16758
5476a9a4 16759$as_echo "#define BROKEN_GET_CURRENT_DIR_NAME 1" >>confdefs.h
067d23c9 16760
5476a9a4 16761 ;;
067d23c9 16762
5476a9a4 16763 freebsd)
f199cab1 16764
5476a9a4 16765$as_echo "#define BROKEN_PTY_READ_AFTER_EAGAIN 1" >>confdefs.h
f199cab1 16766
5476a9a4 16767 ;;
5476a9a4 16768esac
f199cab1 16769
5476a9a4
GM
16770case $opsys in
16771 gnu-* | sol2-10 )
f199cab1 16772
5476a9a4 16773$as_echo "#define HAVE_PROCFS 1" >>confdefs.h
f199cab1 16774
5476a9a4
GM
16775 ;;
16776esac
f199cab1 16777
5476a9a4 16778case $opsys in
87e1a811 16779 darwin | dragonfly | freebsd | netbsd | openbsd )
f199cab1 16780
5476a9a4 16781$as_echo "#define DONT_REOPEN_PTY 1" >>confdefs.h
f199cab1 16782
5476a9a4
GM
16783 ;;
16784esac
f199cab1 16785
5476a9a4
GM
16786case $opsys in
16787 netbsd | openbsd) sound_device="/dev/audio" ;;
16788 *) sound_device="/dev/dsp" ;;
16789esac
f199cab1 16790
f199cab1 16791
5476a9a4
GM
16792cat >>confdefs.h <<_ACEOF
16793#define DEFAULT_SOUND_DEVICE "$sound_device"
16794_ACEOF
f199cab1
GM
16795
16796
16797
5476a9a4
GM
16798case $opsys in
16799 darwin | gnu-linux | gnu-kfreebsd )
f199cab1 16800
5476a9a4 16801$as_echo "#define INTERRUPT_INPUT 1" >>confdefs.h
f199cab1 16802
5476a9a4
GM
16803 ;;
16804esac
f199cab1 16805
f199cab1 16806
5476a9a4
GM
16807case $opsys in
16808 cygwin|gnu|gnu-linux|gnu-kfreebsd|irix6-5|freebsd|netbsd|openbsd)
f199cab1 16809
5476a9a4 16810$as_echo "#define NARROWPROTO 1" >>confdefs.h
067d23c9 16811
5476a9a4
GM
16812 ;;
16813esac
f199cab1
GM
16814
16815
067d23c9 16816
1f5d53eb
PE
16817
16818
f199cab1 16819
f199cab1 16820
7d2a1c5e 16821
5476a9a4
GM
16822case $opsys in
16823 aix4-2 )
a09508f2 16824 $as_echo "#define PTY_ITERATION int c; for (c = 0; !c ; c++)" >>confdefs.h
f199cab1 16825
a09508f2 16826 $as_echo "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptc\");" >>confdefs.h
f199cab1 16827
a09508f2 16828 $as_echo "#define PTY_TTY_NAME_SPRINTF strcpy (pty_name, ttyname (fd));" >>confdefs.h
7d2a1c5e 16829
5476a9a4 16830 ;;
7d2a1c5e 16831
5476a9a4 16832 cygwin )
a09508f2 16833 $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++)" >>confdefs.h
7d2a1c5e 16834
843f2634 16835 $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 16836
a09508f2 16837 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
7d2a1c5e 16838
a09508f2 16839 $as_echo "#define PTY_TTY_NAME_SPRINTF /**/" >>confdefs.h
f199cab1 16840
5476a9a4 16841 ;;
f199cab1 16842
1146da8d 16843 darwin )
a09508f2 16844 $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++)" >>confdefs.h
7d2a1c5e 16845
5476a9a4 16846 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
7d2a1c5e 16847
a09508f2 16848 $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 16849
a09508f2 16850 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
f199cab1 16851
a09508f2 16852 $as_echo "#define PTY_TTY_NAME_SPRINTF /**/" >>confdefs.h
f199cab1 16853
5476a9a4 16854 ;;
f199cab1 16855
1146da8d 16856 gnu | openbsd )
5476a9a4 16857 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
f199cab1 16858
5476a9a4 16859 ;;
f199cab1 16860
87e1a811 16861 gnu-linux | gnu-kfreebsd | dragonfly | freebsd | netbsd )
5476a9a4 16862 if test "x$ac_cv_func_grantpt" = xyes; then
f199cab1 16863
5476a9a4 16864$as_echo "#define UNIX98_PTYS 1" >>confdefs.h
f199cab1 16865
a09508f2 16866 $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++)" >>confdefs.h
f199cab1 16867
75bdb32a 16868 $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 16869
1146da8d 16870 if test "x$ac_cv_func_posix_openpt" = xyes; then
df391f9b 16871 $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
16872
16873 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
16874
16875 elif test "x$ac_cv_func_getpt" = xyes; then
5476a9a4 16876 $as_echo "#define PTY_OPEN fd = getpt ()" >>confdefs.h
f199cab1 16877
a09508f2 16878 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
f199cab1 16879
5476a9a4 16880 else
a09508f2 16881 $as_echo "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptmx\");" >>confdefs.h
f199cab1 16882
5476a9a4
GM
16883 fi
16884 else
16885 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
f199cab1 16886
5476a9a4
GM
16887 fi
16888 ;;
f199cab1 16889
5476a9a4
GM
16890 hpux*)
16891 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
f199cab1 16892
a09508f2 16893 $as_echo "#define PTY_NAME_SPRINTF sprintf (pty_name, \"/dev/ptym/pty%c%x\", c, i);" >>confdefs.h
f199cab1 16894
a09508f2 16895 $as_echo "#define PTY_TTY_NAME_SPRINTF sprintf (pty_name, \"/dev/pty/tty%c%x\", c, i);" >>confdefs.h
f199cab1 16896
5476a9a4 16897 ;;
f199cab1 16898
5476a9a4
GM
16899 irix6-5 )
16900 $as_echo "#define PTY_ITERATION /**/" >>confdefs.h
f199cab1 16901
5476a9a4 16902 $as_echo "#define FIRST_PTY_LETTER 'q'" >>confdefs.h
f199cab1 16903
e4184a20 16904 $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 16905
a09508f2 16906 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
f199cab1 16907
a09508f2 16908 $as_echo "#define PTY_TTY_NAME_SPRINTF /**/" >>confdefs.h
f199cab1 16909
5476a9a4 16910 ;;
f199cab1 16911
5476a9a4 16912 sol2* )
75bdb32a 16913 $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 16914
5476a9a4 16915 ;;
f199cab1 16916
5476a9a4 16917 unixware )
75bdb32a 16918 $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
16919
16920 ;;
16921esac
16922
16923
16924case $opsys in
16925 sol2* | unixware )
16926 $as_echo "#define FIRST_PTY_LETTER 'z'" >>confdefs.h
16927
a09508f2 16928 $as_echo "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptmx\");" >>confdefs.h
5476a9a4
GM
16929
16930
16931$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
16932
16933 ;;
16934esac
16935
16936
16937
16938
16939case $opsys in
87e1a811 16940 aix4-2 | cygwin | gnu | irix6-5 | dragonfly | freebsd | netbsd | openbsd | darwin )
5476a9a4
GM
16941 $as_echo "#define SIGNALS_VIA_CHARACTERS 1" >>confdefs.h
16942
16943 ;;
16944
16945 gnu-linux | gnu-kfreebsd )
16946
16947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signals via characters" >&5
16948$as_echo_n "checking for signals via characters... " >&6; }
16949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1f5d53eb 16950/* end confdefs.h. */
5476a9a4
GM
16951
16952#include <linux/version.h>
16953#if LINUX_VERSION_CODE < 0x20400
16954# error "Linux version too old"
16955#endif
16956
3e0be4ab
GM
16957int
16958main ()
16959{
f199cab1 16960
3e0be4ab
GM
16961 ;
16962 return 0;
16963}
067d23c9 16964_ACEOF
5476a9a4
GM
16965if ac_fn_c_try_cpp "$LINENO"; then :
16966 emacs_signals_via_chars=yes
1f5d53eb 16967else
5476a9a4 16968 emacs_signals_via_chars=no
067d23c9 16969fi
5476a9a4 16970rm -f conftest.err conftest.$ac_ext
067d23c9 16971
5476a9a4
GM
16972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_signals_via_chars" >&5
16973$as_echo "$emacs_signals_via_chars" >&6; }
16974 test $emacs_signals_via_chars = yes && $as_echo "#define SIGNALS_VIA_CHARACTERS 1" >>confdefs.h
16975
16976 ;;
16977esac
16978
16979
16980
16981
5476a9a4 16982case $opsys in
0f63df79 16983 aix*)
ce9ae7ca 16984 $as_echo "#define DATA_SEG_BITS 0x20000000" >>confdefs.h
0f63df79
GM
16985
16986 ;;
5476a9a4 16987 hpux*)
ce9ae7ca 16988 $as_echo "#define DATA_SEG_BITS 0x40000000" >>confdefs.h
067d23c9 16989
5476a9a4
GM
16990 ;;
16991 irix6-5)
5476a9a4 16992 $as_echo "#define DATA_SEG_BITS 0x10000000" >>confdefs.h
067d23c9 16993
5476a9a4
GM
16994 ;;
16995esac
067d23c9 16996
1f5d53eb 16997
1f5d53eb 16998
067d23c9 16999
5476a9a4
GM
17000case $opsys in
17001 darwin) $as_echo "#define TAB3 OXTABS" >>confdefs.h
17002 ;;
f199cab1 17003
87e1a811 17004 gnu | dragonfly | freebsd | netbsd | openbsd )
f199cab1 17005
5476a9a4 17006$as_echo "#define TABDLY OXTABS" >>confdefs.h
f199cab1 17007
5476a9a4 17008 $as_echo "#define TAB3 OXTABS" >>confdefs.h
f199cab1 17009
5476a9a4 17010 ;;
f199cab1 17011
5476a9a4 17012 gnu-linux | gnu-kfreebsd )
5476a9a4
GM
17013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17014/* end confdefs.h. */
3e0be4ab 17015
5476a9a4
GM
17016#ifndef __ia64__
17017# error "not ia64"
17018#endif
067d23c9 17019
5476a9a4
GM
17020int
17021main ()
17022{
3e0be4ab 17023
5476a9a4
GM
17024 ;
17025 return 0;
17026}
17027_ACEOF
17028if ac_fn_c_try_cpp "$LINENO"; then :
f199cab1 17029
5476a9a4 17030$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 17031
3e0be4ab 17032fi
5476a9a4
GM
17033rm -f conftest.err conftest.$ac_ext
17034 ;;
067d23c9 17035
5476a9a4 17036 hpux*)
3e0be4ab 17037
5476a9a4 17038$as_echo "#define RUN_TIME_REMAP 1" >>confdefs.h
3e0be4ab 17039
5476a9a4 17040 ;;
5476a9a4 17041esac
3e0be4ab
GM
17042
17043
f199cab1 17044
e700232f
GM
17045
17046
5476a9a4 17047case $opsys in
5476a9a4
GM
17048 gnu-linux | gnu-kfreebsd )
17049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1fd182f0 17050/* end confdefs.h. */
f199cab1 17051
5476a9a4
GM
17052#if defined __i386__ || defined __sparc__ || defined __mc68000__ \
17053 || defined __alpha__ || defined __mips__ || defined __s390__ \
17054 || defined __arm__ || defined __powerpc__ || defined __amd64__ \
17055 || defined __ia64__ || defined __sh__
17056/* ok */
17057#else
17058# error "setjmp not known to work on this arch"
17059#endif
17060
f199cab1
GM
17061int
17062main ()
1fd182f0 17063{
5476a9a4 17064
f199cab1
GM
17065 ;
17066 return 0;
1fd182f0
PE
17067}
17068_ACEOF
5476a9a4
GM
17069if ac_fn_c_try_cpp "$LINENO"; then :
17070 $as_echo "#define GC_SETJMP_WORKS 1" >>confdefs.h
f199cab1 17071
1f5d53eb 17072fi
5476a9a4
GM
17073rm -f conftest.err conftest.$ac_ext
17074 ;;
17075esac
1fd182f0 17076
f199cab1 17077
5476a9a4
GM
17078if test x$GCC = xyes; then
17079 $as_echo "#define GC_SETJMP_WORKS 1" >>confdefs.h
17080
1fd182f0 17081else
5476a9a4 17082 case $opsys in
87e1a811 17083 dragonfly | freebsd | netbsd | openbsd | irix6-5 | sol2* )
5476a9a4 17084 $as_echo "#define GC_SETJMP_WORKS 1" >>confdefs.h
1fd182f0 17085
5476a9a4
GM
17086 ;;
17087 esac
17088fi
6ec9a5a7
GM
17089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _setjmp" >&5
17090$as_echo_n "checking for _setjmp... " >&6; }
17091if test "${emacs_cv_func__setjmp+set}" = set; then :
17092 $as_echo_n "(cached) " >&6
17093else
17094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17095/* end confdefs.h. */
17096#include <setjmp.h>
7c61eaab
GM
17097 #ifdef __MINGW32__
17098 # define _longjmp longjmp
17099 #endif
1fd182f0 17100
6ec9a5a7
GM
17101int
17102main ()
17103{
17104jmp_buf j;
17105 if (! _setjmp (j))
17106 _longjmp (j, 1);
17107 ;
17108 return 0;
17109}
17110_ACEOF
17111if ac_fn_c_try_link "$LINENO"; then :
17112 emacs_cv_func__setjmp=yes
17113else
17114 emacs_cv_func__setjmp=no
17115fi
17116rm -f core conftest.err conftest.$ac_objext \
17117 conftest$ac_exeext conftest.$ac_ext
17118fi
17119{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_func__setjmp" >&5
17120$as_echo "$emacs_cv_func__setjmp" >&6; }
e2d8f316 17121if test $emacs_cv_func__setjmp = yes; then
906debc3 17122
e2d8f316 17123$as_echo "#define HAVE__SETJMP 1" >>confdefs.h
906debc3 17124
e2d8f316
GM
17125else
17126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
17127$as_echo_n "checking for sigsetjmp... " >&6; }
17128if test "${emacs_cv_func_sigsetjmp+set}" = set; then :
17129 $as_echo_n "(cached) " >&6
17130else
17131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17132/* end confdefs.h. */
17133#include <setjmp.h>
17134
17135int
17136main ()
17137{
17138sigjmp_buf j;
17139 if (! sigsetjmp (j, 1))
17140 siglongjmp (j, 1);
17141 ;
17142 return 0;
17143}
17144_ACEOF
17145if ac_fn_c_try_link "$LINENO"; then :
17146 emacs_cv_func_sigsetjmp=yes
17147else
17148 emacs_cv_func_sigsetjmp=no
17149fi
17150rm -f core conftest.err conftest.$ac_objext \
17151 conftest$ac_exeext conftest.$ac_ext
17152fi
17153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_func_sigsetjmp" >&5
17154$as_echo "$emacs_cv_func_sigsetjmp" >&6; }
17155 if test $emacs_cv_func_sigsetjmp = yes; then
906debc3 17156
e2d8f316 17157$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
906debc3 17158
e2d8f316 17159 fi
6ec9a5a7
GM
17160fi
17161
17162case $opsys in
17163 sol2* | unixware )
906debc3
GM
17164
17165$as_echo "#define TIOCSIGSEND TIOCSIGNAL" >>confdefs.h
17166
17167 ;;
17168esac
17169
906debc3 17170
5476a9a4
GM
17171case $opsys in
17172 hpux* | sol2* )
1f5d53eb 17173
5476a9a4 17174$as_echo "#define XOS_NEEDS_TIME_H 1" >>confdefs.h
1f5d53eb 17175
5476a9a4
GM
17176 ;;
17177esac
1f5d53eb 17178
1f5d53eb 17179
4fda9c95 17180
3e0be4ab 17181
4fda9c95 17182
4fda9c95 17183
f199cab1 17184
5476a9a4
GM
17185case $opsys in
17186 aix4-2)
17187 $as_echo "#define USG /**/" >>confdefs.h
17188
5476a9a4
GM
17189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17190/* end confdefs.h. */
17191
17192#ifndef _AIX
17193# error "_AIX not defined"
17194#endif
f199cab1 17195
4fda9c95
GM
17196int
17197main ()
17198{
3e0be4ab 17199
4fda9c95
GM
17200 ;
17201 return 0;
17202}
17203_ACEOF
5476a9a4 17204if ac_fn_c_try_cpp "$LINENO"; then :
4fda9c95 17205
3e0be4ab 17206else
4fda9c95 17207
5476a9a4 17208$as_echo "#define _AIX /**/" >>confdefs.h
3e0be4ab 17209
5476a9a4
GM
17210fi
17211rm -f conftest.err conftest.$ac_ext
17212 ;;
4fda9c95 17213
5476a9a4 17214 cygwin)
3e0be4ab 17215
5476a9a4 17216$as_echo "#define CYGWIN 1" >>confdefs.h
f199cab1 17217
5476a9a4 17218 ;;
f199cab1 17219
5476a9a4 17220 darwin)
f199cab1 17221
5476a9a4 17222$as_echo "#define DARWIN_OS /**/" >>confdefs.h
f199cab1 17223
5476a9a4 17224 ;;
4fda9c95 17225
5476a9a4
GM
17226 gnu-linux | gnu-kfreebsd )
17227 $as_echo "#define USG /**/" >>confdefs.h
4fda9c95 17228
f199cab1 17229
5476a9a4 17230$as_echo "#define GNU_LINUX /**/" >>confdefs.h
4fda9c95 17231
5476a9a4 17232 ;;
4fda9c95 17233
5476a9a4
GM
17234 hpux*)
17235 $as_echo "#define USG /**/" >>confdefs.h
4fda9c95 17236
4717915f 17237
5476a9a4 17238$as_echo "#define HPUX /**/" >>confdefs.h
697210c4 17239
5476a9a4 17240 ;;
697210c4 17241
5476a9a4
GM
17242 irix6-5)
17243 $as_echo "#define USG /**/" >>confdefs.h
f199cab1 17244
906debc3
GM
17245 $as_echo "#define USG5_4 /**/" >>confdefs.h
17246
f199cab1 17247
5476a9a4 17248$as_echo "#define IRIX6_5 /**/" >>confdefs.h
f199cab1 17249
5476a9a4 17250 ;;
f199cab1 17251
7c61eaab
GM
17252 mingw32)
17253 $as_echo "#define DOS_NT /**/" >>confdefs.h
17254
17255
17256$as_echo "#define WINDOWSNT 1" >>confdefs.h
17257
17258 if test "x$ac_enable_checking" != "x" ; then
17259
17260$as_echo "#define EMACSDEBUG 1" >>confdefs.h
17261
17262 fi
17263 ;;
17264
5476a9a4
GM
17265 sol2*)
17266 $as_echo "#define USG /**/" >>confdefs.h
4fda9c95 17267
906debc3
GM
17268 $as_echo "#define USG5_4 /**/" >>confdefs.h
17269
4fda9c95 17270
5476a9a4 17271$as_echo "#define SOLARIS2 /**/" >>confdefs.h
f199cab1 17272
5476a9a4 17273 ;;
f199cab1 17274
5476a9a4
GM
17275 unixware)
17276 $as_echo "#define USG /**/" >>confdefs.h
f199cab1 17277
906debc3
GM
17278 $as_echo "#define USG5_4 /**/" >>confdefs.h
17279
5476a9a4
GM
17280 ;;
17281esac
f199cab1 17282
4fa92495
GM
17283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable FIONREAD" >&5
17284$as_echo_n "checking for usable FIONREAD... " >&6; }
17285if test "${emacs_cv_usable_FIONREAD+set}" = set; then :
17286 $as_echo_n "(cached) " >&6
17287else
17288 case $opsys in
17289 aix4-2)
17290 emacs_cv_usable_FIONREAD=no
17291 ;;
17292
7c61eaab
GM
17293 mingw32)
17294 emacs_cv_usable_FIONREAD=yes
17295 ;;
17296
4fa92495
GM
17297 *)
17298 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17299/* end confdefs.h. */
17300#include <sys/types.h>
17301 #include <sys/ioctl.h>
17302 #ifdef USG5_4
17303 # include <sys/filio.h>
17304 #endif
17305
17306int
17307main ()
17308{
17309int foo = ioctl (0, FIONREAD, &foo);
17310 ;
17311 return 0;
17312}
17313_ACEOF
17314if ac_fn_c_try_compile "$LINENO"; then :
17315 emacs_cv_usable_FIONREAD=yes
17316else
17317 emacs_cv_usable_FIONREAD=no
17318fi
17319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17320 ;;
17321 esac
17322fi
17323{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_usable_FIONREAD" >&5
17324$as_echo "$emacs_cv_usable_FIONREAD" >&6; }
17325if test $emacs_cv_usable_FIONREAD = yes; then
17326
17327$as_echo "#define USABLE_FIONREAD 1" >>confdefs.h
17328
17329
17330 if test $emacs_broken_SIGIO = no; then
17331 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable SIGIO" >&5
17332$as_echo_n "checking for usable SIGIO... " >&6; }
17333if test "${emacs_cv_usable_SIGIO+set}" = set; then :
17334 $as_echo_n "(cached) " >&6
17335else
17336 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17337/* end confdefs.h. */
17338#include <fcntl.h>
17339 #include <signal.h>
17340
17341int
17342main ()
17343{
17344int foo = SIGIO | F_SETFL | FASYNC;
17345 ;
17346 return 0;
17347}
17348_ACEOF
17349if ac_fn_c_try_compile "$LINENO"; then :
17350 emacs_cv_usable_SIGIO=yes
17351else
17352 emacs_cv_usable_SIGIO=no
17353fi
17354rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17355fi
17356{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_usable_SIGIO" >&5
17357$as_echo "$emacs_cv_usable_SIGIO" >&6; }
17358 if test $emacs_cv_usable_SIGIO = yes; then
17359
17360$as_echo "#define USABLE_SIGIO 1" >>confdefs.h
17361
17362 fi
17363 fi
17364fi
17365
4fda9c95 17366
5476a9a4 17367case $opsys in
32c8eae2 17368 cygwin)
4fda9c95 17369
5476a9a4 17370$as_echo "#define G_SLICE_ALWAYS_MALLOC 1" >>confdefs.h
4fda9c95 17371
5476a9a4 17372 ;;
4fda9c95 17373
5476a9a4 17374 hpux11)
f199cab1 17375
5476a9a4 17376$as_echo "#define USG_SUBTTY_WORKS 1" >>confdefs.h
f199cab1 17377
5476a9a4 17378 ;;
f199cab1 17379
5476a9a4 17380 irix6-5)
f199cab1 17381
5476a9a4 17382$as_echo "#define PREFER_VSUSP 1" >>confdefs.h
f199cab1 17383
5476a9a4 17384 ;;
f199cab1 17385
5476a9a4 17386 sol2-10)
f199cab1 17387
5476a9a4 17388$as_echo "#define _STRUCTURED_PROC 1" >>confdefs.h
f199cab1 17389
5476a9a4
GM
17390 ;;
17391esac
f199cab1 17392
5476a9a4
GM
17393# Set up the CFLAGS for real compilation, so we can substitute it.
17394CFLAGS="$REAL_CFLAGS"
17395CPPFLAGS="$REAL_CPPFLAGS"
f199cab1 17396
5476a9a4
GM
17397## Hack to detect a buggy GCC version.
17398if test "x$GCC" = xyes \
17399 && test x"`$CC --version 2> /dev/null | grep 'gcc.* 4.5.0'`" != x \
17400 && test x"`echo $CFLAGS | grep '\-O[23]'`" != x \
17401 && test x"`echo $CFLAGS | grep '\-fno-optimize-sibling-calls'`" = x; then
17402 as_fn_error "GCC 4.5.0 has problems compiling Emacs; see etc/PROBLEMS'." "$LINENO" 5
17403fi
f199cab1 17404
5476a9a4 17405version=$PACKAGE_VERSION
f199cab1 17406
0778f6f0 17407copyright="Copyright (C) 2013 Free Software Foundation, Inc."
bb7dce39
GM
17408
17409cat >>confdefs.h <<_ACEOF
17410#define COPYRIGHT "$copyright"
17411_ACEOF
17412
17413
17414
5476a9a4
GM
17415### Specify what sort of things we'll be editing into Makefile and config.h.
17416### Use configuration here uncanonicalized to avoid exceeding size limits.
4fda9c95 17417
f199cab1 17418
5476a9a4 17419## Unused?
4fda9c95
GM
17420
17421
17422
17423
4717915f 17424
4717915f 17425
4717915f 17426
4717915f 17427
4717915f 17428
4717915f 17429
4717915f 17430
4717915f 17431
4717915f 17432
4717915f 17433
4717915f 17434
4717915f
GM
17435
17436
4717915f
GM
17437
17438
4717915f 17439
4717915f 17440
4717915f 17441
5476a9a4
GM
17442## FIXME? Nothing uses @LD_SWITCH_X_SITE@.
17443## src/Makefile.in did add LD_SWITCH_X_SITE (as a cpp define) to the
17444## end of LIBX_BASE, but nothing ever set it.
4717915f 17445
4717915f 17446
4fda9c95 17447
4fda9c95 17448
5476a9a4
GM
17449## Used in lwlib/Makefile.in.
17450
4fda9c95 17451
4fda9c95 17452
4fda9c95
GM
17453
17454
17455
17456
4fda9c95 17457
42dcba54
GM
17458if test -n "${term_header}"; then
17459
17460cat >>confdefs.h <<_ACEOF
17461#define TERM_HEADER "${term_header}"
17462_ACEOF
17463
17464fi
17465
4fda9c95 17466
5476a9a4
GM
17467cat >>confdefs.h <<_ACEOF
17468#define EMACS_CONFIGURATION "${canonical}"
17469_ACEOF
4fda9c95
GM
17470
17471
5476a9a4 17472cat >>confdefs.h <<_ACEOF
e25a10b7 17473#define EMACS_CONFIG_OPTIONS "${emacs_config_options}"
5476a9a4
GM
17474_ACEOF
17475
5476a9a4 17476
4fda9c95 17477
7c61eaab
GM
17478case $opsys in
17479 mingw32)
17480 $as_echo "#define config_opsysfile <ms-w32.h>" >>confdefs.h
17481
17482 ;;
17483esac
17484
5476a9a4
GM
17485XMENU_OBJ=
17486XOBJ=
17487FONT_OBJ=
17488if test "${HAVE_X_WINDOWS}" = "yes" ; then
17489
17490$as_echo "#define HAVE_X_WINDOWS 1" >>confdefs.h
4fda9c95 17491
5476a9a4 17492 XMENU_OBJ=xmenu.o
0f55a32e 17493 XOBJ="xterm.o xfns.o xselect.o xrdb.o xsmfns.o xsettings.o"
5476a9a4
GM
17494 FONT_OBJ=xfont.o
17495 if test "$HAVE_XFT" = "yes"; then
17496 FONT_OBJ="$FONT_OBJ ftfont.o xftfont.o ftxfont.o"
17497 elif test "$HAVE_FREETYPE" = "yes"; then
17498 FONT_OBJ="$FONT_OBJ ftfont.o ftxfont.o"
17499 fi
4fda9c95 17500
f199cab1 17501fi
4fda9c95 17502
4fda9c95 17503
4fda9c95 17504
4fda9c95 17505
5476a9a4
GM
17506WIDGET_OBJ=
17507MOTIF_LIBW=
17508if test "${USE_X_TOOLKIT}" != "none" ; then
17509 WIDGET_OBJ=widget.o
17510
17511$as_echo "#define USE_X_TOOLKIT 1" >>confdefs.h
17512
17513 if test "${USE_X_TOOLKIT}" = "LUCID"; then
17514
17515$as_echo "#define USE_LUCID 1" >>confdefs.h
e1939eb1 17516
5476a9a4 17517 elif test "${USE_X_TOOLKIT}" = "MOTIF"; then
4fda9c95 17518
5476a9a4 17519$as_echo "#define USE_MOTIF 1" >>confdefs.h
3e0be4ab 17520
5476a9a4
GM
17521 MOTIF_LIBW=-lXm
17522 case "$opsys" in
17523 gnu-linux)
17524 ## Paul Abrahams <abrahams at equinox.shaysnet.com> says this is needed.
17525 MOTIF_LIBW="$MOTIF_LIBW -lXpm"
17526 ;;
3e0be4ab 17527
5476a9a4
GM
17528 unixware)
17529 ## Richard Anthony Ryan <ryanr at ellingtn.ftc.nrcs.usda.gov>
17530 ## says -lXimp is needed in UNIX_SV ... 4.2 1.1.2.
17531 MOTIF_LIBW="MOTIF_LIBW -lXimp"
17532 ;;
3e0be4ab 17533
5476a9a4
GM
17534 aix4-2)
17535 ## olson@mcs.anl.gov says -li18n is needed by -lXm.
17536 MOTIF_LIBW="$MOTIF_LIBW -li18n"
17537 ;;
17538 esac
17539 MOTIF_LIBW="$MOTIF_LIBW $LIBXP"
17540 fi
17541fi
4fda9c95 17542
3e0be4ab 17543
5476a9a4
GM
17544TOOLKIT_LIBW=
17545case "$USE_X_TOOLKIT" in
17546 MOTIF) TOOLKIT_LIBW="$MOTIF_LIBW" ;;
17547 LUCID) TOOLKIT_LIBW="$LUCID_LIBW" ;;
17548 none) test "x$HAVE_GTK" = "xyes" && TOOLKIT_LIBW="$GTK_LIBS" ;;
17549esac
4fda9c95
GM
17550
17551
7c61eaab
GM
17552if test "${opsys}" != "mingw32"; then
17553 if test "$USE_X_TOOLKIT" = "none"; then
17554 LIBXT_OTHER="\$(LIBXSM)"
17555 OLDXMENU_TARGET="really-oldXMenu"
17556 else
17557 LIBXT_OTHER="\$(LIBXMU) -lXt \$(LIBXTR6) -lXext"
17558 OLDXMENU_TARGET="really-lwlib"
17559 fi
5476a9a4 17560fi
4fda9c95
GM
17561
17562
5476a9a4
GM
17563## The X Menu stuff is present in the X10 distribution, but missing
17564## from X11. If we have X10, just use the installed library;
17565## otherwise, use our own copy.
17566if test "${HAVE_X11}" = "yes" ; then
4fda9c95 17567
5476a9a4 17568$as_echo "#define HAVE_X11 1" >>confdefs.h
4fda9c95 17569
4fda9c95 17570
5476a9a4
GM
17571 if test "$USE_X_TOOLKIT" = "none"; then
17572 OLDXMENU="\${oldXMenudir}/libXMenu11.a"
17573 else
17574 OLDXMENU="\${lwlibdir}/liblw.a"
17575 fi
17576 LIBXMENU="\$(OLDXMENU)"
17577 LIBX_OTHER="\$(LIBXT) \$(LIBX_EXTRA)"
17578 OLDXMENU_DEPS="\${OLDXMENU} ../src/\${OLDXMENU}"
f199cab1 17579else
5476a9a4
GM
17580 ## For a syntactically valid Makefile; not actually used for anything.
17581 ## See comments in src/Makefile.in.
17582 OLDXMENU=nothing
17583 ## FIXME This case (!HAVE_X11 && HAVE_X_WINDOWS) is no longer possible(?).
17584 if test "${HAVE_X_WINDOWS}" = "yes"; then
17585 LIBXMENU="-lXMenu"
17586 else
17587 LIBXMENU=
17588 fi
17589 LIBX_OTHER=
17590 OLDXMENU_DEPS=
17591fi
4fda9c95 17592
5476a9a4
GM
17593if test "$HAVE_GTK" = "yes" || test "$HAVE_MENUS" != "yes"; then
17594 OLDXMENU_TARGET=
17595 OLDXMENU=nothing
17596 LIBXMENU=
17597 OLDXMENU_DEPS=
17598fi
4fda9c95 17599
4fda9c95
GM
17600
17601
3e0be4ab 17602
4fda9c95 17603
3e0be4ab 17604
3e0be4ab 17605
5476a9a4 17606if test "${HAVE_MENUS}" = "yes" ; then
3e0be4ab 17607
5476a9a4 17608$as_echo "#define HAVE_MENUS 1" >>confdefs.h
4fda9c95 17609
5476a9a4 17610fi
4fda9c95 17611
5476a9a4 17612if test "${GNU_MALLOC}" = "yes" ; then
4fda9c95 17613
5476a9a4 17614$as_echo "#define GNU_MALLOC 1" >>confdefs.h
4fda9c95 17615
5476a9a4 17616fi
3e0be4ab 17617
5476a9a4
GM
17618RALLOC_OBJ=
17619if test "${REL_ALLOC}" = "yes" ; then
17620
17621$as_echo "#define REL_ALLOC 1" >>confdefs.h
4fda9c95
GM
17622
17623
5476a9a4
GM
17624 test "$system_malloc" != "yes" && RALLOC_OBJ=ralloc.o
17625fi
4fda9c95 17626
4fda9c95 17627
5476a9a4 17628if test "$opsys" = "cygwin"; then
5c0255d9 17629 CYGWIN_OBJ="sheap.o cygw32.o"
5476a9a4
GM
17630 ## Cygwin differs because of its unexec().
17631 PRE_ALLOC_OBJ=
17632 POST_ALLOC_OBJ=lastfile.o
7c61eaab
GM
17633elif test "$opsys" = "mingw32"; then
17634 CYGWIN_OBJ=
17635 PRE_ALLOC_OBJ=
17636 POST_ALLOC_OBJ=lastfile.o
5476a9a4
GM
17637else
17638 CYGWIN_OBJ=
17639 PRE_ALLOC_OBJ=lastfile.o
17640 POST_ALLOC_OBJ=
17641fi
4fda9c95 17642
3e0be4ab 17643
3e0be4ab 17644
3e0be4ab 17645
ad4c8083
GM
17646
17647
5476a9a4
GM
17648# Configure gnulib. Although this does not affect CFLAGS or LIBS permanently.
17649# it temporarily reverts them to their pre-pkg-config values,
17650# because gnulib needs to work with both src (which uses the
17651# pkg-config stuff) and lib-src (which does not). For example, gnulib
17652# may need to determine whether LIB_CLOCK_GETTIME should contain -lrt,
17653# and it therefore needs to run in an environment where LIBS does not
17654# already contain -lrt merely because 'pkg-config --libs' printed '-lrt'
17655# for some package unrelated to lib-src.
17656SAVE_CFLAGS=$CFLAGS
17657SAVE_LIBS=$LIBS
17658CFLAGS=$pre_PKG_CONFIG_CFLAGS
17659LIBS="$LIB_PTHREAD $pre_PKG_CONFIG_LIBS"
3e0be4ab 17660
3e0be4ab
GM
17661
17662
4fda9c95 17663
4fda9c95 17664
3e0be4ab 17665
3e0be4ab
GM
17666
17667
4fda9c95 17668
3e0be4ab
GM
17669
17670
5476a9a4
GM
17671 LIBC_FATAL_STDERR_=1
17672 export LIBC_FATAL_STDERR_
3e0be4ab 17673
5476a9a4
GM
17674# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
17675# for constant arguments. Useless!
17676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
17677$as_echo_n "checking for working alloca.h... " >&6; }
17678if test "${ac_cv_working_alloca_h+set}" = set; then :
17679 $as_echo_n "(cached) " >&6
17680else
17681 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17682/* end confdefs.h. */
17683#include <alloca.h>
17684int
17685main ()
17686{
17687char *p = (char *) alloca (2 * sizeof (int));
17688 if (p) return 0;
17689 ;
17690 return 0;
17691}
17692_ACEOF
17693if ac_fn_c_try_link "$LINENO"; then :
17694 ac_cv_working_alloca_h=yes
17695else
17696 ac_cv_working_alloca_h=no
17697fi
17698rm -f core conftest.err conftest.$ac_objext \
17699 conftest$ac_exeext conftest.$ac_ext
17700fi
17701{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
17702$as_echo "$ac_cv_working_alloca_h" >&6; }
17703if test $ac_cv_working_alloca_h = yes; then
3e0be4ab 17704
5476a9a4 17705$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
3e0be4ab 17706
5476a9a4 17707fi
3e0be4ab 17708
5476a9a4
GM
17709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
17710$as_echo_n "checking for alloca... " >&6; }
17711if test "${ac_cv_func_alloca_works+set}" = set; then :
f199cab1
GM
17712 $as_echo_n "(cached) " >&6
17713else
5476a9a4 17714 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 17715/* end confdefs.h. */
5476a9a4
GM
17716#ifdef __GNUC__
17717# define alloca __builtin_alloca
17718#else
17719# ifdef _MSC_VER
17720# include <malloc.h>
17721# define alloca _alloca
17722# else
17723# ifdef HAVE_ALLOCA_H
17724# include <alloca.h>
17725# else
17726# ifdef _AIX
17727 #pragma alloca
17728# else
17729# ifndef alloca /* predefined by HP cc +Olibcalls */
17730char *alloca ();
17731# endif
17732# endif
17733# endif
17734# endif
17735#endif
17736
17737int
17738main ()
17739{
17740char *p = (char *) alloca (1);
17741 if (p) return 0;
17742 ;
17743 return 0;
17744}
17745_ACEOF
17746if ac_fn_c_try_link "$LINENO"; then :
17747 ac_cv_func_alloca_works=yes
17748else
17749 ac_cv_func_alloca_works=no
17750fi
17751rm -f core conftest.err conftest.$ac_objext \
17752 conftest$ac_exeext conftest.$ac_ext
17753fi
17754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
17755$as_echo "$ac_cv_func_alloca_works" >&6; }
17756
17757if test $ac_cv_func_alloca_works = yes; then
17758
17759$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
17760
17761else
17762 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
17763# that cause trouble. Some versions do not even contain alloca or
17764# contain a buggy version. If you still want to use their alloca,
17765# use ar to extract alloca.o from them instead of compiling alloca.c.
3e0be4ab 17766
4fda9c95 17767
4fda9c95 17768
4fda9c95
GM
17769
17770
5476a9a4 17771ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
4fda9c95 17772
5476a9a4 17773$as_echo "#define C_ALLOCA 1" >>confdefs.h
4fda9c95 17774
4fda9c95 17775
5476a9a4
GM
17776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether 'alloca.c' needs Cray hooks" >&5
17777$as_echo_n "checking whether 'alloca.c' needs Cray hooks... " >&6; }
17778if test "${ac_cv_os_cray+set}" = set; then :
17779 $as_echo_n "(cached) " >&6
17780else
17781 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17782/* end confdefs.h. */
17783#if defined CRAY && ! defined CRAY2
17784webecray
17785#else
17786wenotbecray
17787#endif
4fda9c95 17788
5476a9a4
GM
17789_ACEOF
17790if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17791 $EGREP "webecray" >/dev/null 2>&1; then :
17792 ac_cv_os_cray=yes
17793else
17794 ac_cv_os_cray=no
17795fi
17796rm -f conftest*
4fda9c95 17797
5476a9a4
GM
17798fi
17799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
17800$as_echo "$ac_cv_os_cray" >&6; }
17801if test $ac_cv_os_cray = yes; then
17802 for ac_func in _getb67 GETB67 getb67; do
17803 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17804ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17805eval as_val=\$$as_ac_var
17806 if test "x$as_val" = x""yes; then :
4fda9c95 17807
5476a9a4
GM
17808cat >>confdefs.h <<_ACEOF
17809#define CRAY_STACKSEG_END $ac_func
17810_ACEOF
4fda9c95 17811
5476a9a4
GM
17812 break
17813fi
4fda9c95 17814
5476a9a4
GM
17815 done
17816fi
4fda9c95 17817
5476a9a4
GM
17818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
17819$as_echo_n "checking stack direction for C alloca... " >&6; }
17820if test "${ac_cv_c_stack_direction+set}" = set; then :
17821 $as_echo_n "(cached) " >&6
17822else
17823 if test "$cross_compiling" = yes; then :
17824 ac_cv_c_stack_direction=0
17825else
17826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17827/* end confdefs.h. */
17828$ac_includes_default
17829int
17830find_stack_direction (int *addr, int depth)
17831{
17832 int dir, dummy = 0;
17833 if (! addr)
17834 addr = &dummy;
17835 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
17836 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
17837 return dir + dummy;
17838}
4fda9c95 17839
5476a9a4
GM
17840int
17841main (int argc, char **argv)
17842{
17843 return find_stack_direction (0, argc + !argv + 20) < 0;
17844}
17845_ACEOF
17846if ac_fn_c_try_run "$LINENO"; then :
17847 ac_cv_c_stack_direction=1
17848else
17849 ac_cv_c_stack_direction=-1
17850fi
17851rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17852 conftest.$ac_objext conftest.beam conftest.$ac_ext
17853fi
4fda9c95 17854
5476a9a4
GM
17855fi
17856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
17857$as_echo "$ac_cv_c_stack_direction" >&6; }
17858cat >>confdefs.h <<_ACEOF
17859#define STACK_DIRECTION $ac_cv_c_stack_direction
17860_ACEOF
3e0be4ab
GM
17861
17862
5476a9a4 17863fi
3e0be4ab
GM
17864
17865
17866
17867
ec95982c
GM
17868 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
17869$as_echo_n "checking for unsigned long long int... " >&6; }
17870if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then :
17871 $as_echo_n "(cached) " >&6
17872else
17873 ac_cv_type_unsigned_long_long_int=yes
17874 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
17875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17876/* end confdefs.h. */
17877
17878 /* For now, do not test the preprocessor; as of 2007 there are too many
17879 implementations with broken preprocessors. Perhaps this can
17880 be revisited in 2012. In the meantime, code should not expect
17881 #if to work with literals wider than 32 bits. */
17882 /* Test literals. */
17883 long long int ll = 9223372036854775807ll;
17884 long long int nll = -9223372036854775807LL;
17885 unsigned long long int ull = 18446744073709551615ULL;
17886 /* Test constant expressions. */
17887 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
17888 ? 1 : -1)];
17889 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
17890 ? 1 : -1)];
17891 int i = 63;
17892int
17893main ()
17894{
17895/* Test availability of runtime routines for shift and division. */
17896 long long int llmax = 9223372036854775807ll;
17897 unsigned long long int ullmax = 18446744073709551615ull;
17898 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
17899 | (llmax / ll) | (llmax % ll)
17900 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
17901 | (ullmax / ull) | (ullmax % ull));
17902 ;
17903 return 0;
17904}
17905
17906_ACEOF
17907if ac_fn_c_try_link "$LINENO"; then :
17908
17909else
17910 ac_cv_type_unsigned_long_long_int=no
17911fi
17912rm -f core conftest.err conftest.$ac_objext \
17913 conftest$ac_exeext conftest.$ac_ext
17914 fi
17915fi
17916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
17917$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
17918 if test $ac_cv_type_unsigned_long_long_int = yes; then
17919
17920$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
17921
17922 fi
17923
17924
5476a9a4
GM
17925 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
17926$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
17927if test "${ac_cv_c_bigendian+set}" = set; then :
17928 $as_echo_n "(cached) " >&6
17929else
17930 ac_cv_c_bigendian=unknown
17931 # See if we're dealing with a universal compiler.
17932 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17933/* end confdefs.h. */
17934#ifndef __APPLE_CC__
17935 not a universal capable compiler
17936 #endif
17937 typedef int dummy;
17938
17939_ACEOF
17940if ac_fn_c_try_compile "$LINENO"; then :
3e0be4ab 17941
5476a9a4
GM
17942 # Check for potential -arch flags. It is not universal unless
17943 # there are at least two -arch flags with different values.
17944 ac_arch=
17945 ac_prev=
17946 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
17947 if test -n "$ac_prev"; then
17948 case $ac_word in
17949 i?86 | x86_64 | ppc | ppc64)
17950 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
17951 ac_arch=$ac_word
17952 else
17953 ac_cv_c_bigendian=universal
17954 break
17955 fi
17956 ;;
17957 esac
17958 ac_prev=
17959 elif test "x$ac_word" = "x-arch"; then
17960 ac_prev=arch
17961 fi
17962 done
17963fi
17964rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17965 if test $ac_cv_c_bigendian = unknown; then
17966 # See if sys/param.h defines the BYTE_ORDER macro.
17967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17968/* end confdefs.h. */
17969#include <sys/types.h>
17970 #include <sys/param.h>
3e0be4ab 17971
5476a9a4
GM
17972int
17973main ()
17974{
17975#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
17976 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
17977 && LITTLE_ENDIAN)
17978 bogus endian macros
17979 #endif
3e0be4ab 17980
5476a9a4
GM
17981 ;
17982 return 0;
17983}
17984_ACEOF
17985if ac_fn_c_try_compile "$LINENO"; then :
17986 # It does; now see whether it defined to BIG_ENDIAN or not.
17987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17988/* end confdefs.h. */
17989#include <sys/types.h>
17990 #include <sys/param.h>
369e19fc 17991
5476a9a4
GM
17992int
17993main ()
17994{
17995#if BYTE_ORDER != BIG_ENDIAN
17996 not big endian
17997 #endif
3e0be4ab 17998
5476a9a4
GM
17999 ;
18000 return 0;
18001}
18002_ACEOF
18003if ac_fn_c_try_compile "$LINENO"; then :
18004 ac_cv_c_bigendian=yes
18005else
18006 ac_cv_c_bigendian=no
18007fi
18008rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18009fi
18010rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18011 fi
18012 if test $ac_cv_c_bigendian = unknown; then
18013 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
18014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18015/* end confdefs.h. */
18016#include <limits.h>
4fda9c95 18017
5476a9a4
GM
18018int
18019main ()
18020{
18021#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
18022 bogus endian macros
18023 #endif
4fda9c95 18024
5476a9a4
GM
18025 ;
18026 return 0;
18027}
18028_ACEOF
18029if ac_fn_c_try_compile "$LINENO"; then :
18030 # It does; now see whether it defined to _BIG_ENDIAN or not.
18031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18032/* end confdefs.h. */
18033#include <limits.h>
4fda9c95 18034
5476a9a4
GM
18035int
18036main ()
18037{
18038#ifndef _BIG_ENDIAN
18039 not big endian
18040 #endif
f199cab1 18041
5476a9a4
GM
18042 ;
18043 return 0;
18044}
18045_ACEOF
18046if ac_fn_c_try_compile "$LINENO"; then :
18047 ac_cv_c_bigendian=yes
f199cab1 18048else
5476a9a4
GM
18049 ac_cv_c_bigendian=no
18050fi
18051rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18052fi
18053rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18054 fi
18055 if test $ac_cv_c_bigendian = unknown; then
18056 # Compile a test program.
18057 if test "$cross_compiling" = yes; then :
18058 # Try to guess by grepping values from an object file.
18059 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18060/* end confdefs.h. */
18061short int ascii_mm[] =
18062 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
18063 short int ascii_ii[] =
18064 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
18065 int use_ascii (int i) {
18066 return ascii_mm[i] + ascii_ii[i];
18067 }
18068 short int ebcdic_ii[] =
18069 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
18070 short int ebcdic_mm[] =
18071 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
18072 int use_ebcdic (int i) {
18073 return ebcdic_mm[i] + ebcdic_ii[i];
18074 }
18075 extern int foo;
f199cab1 18076
5476a9a4
GM
18077int
18078main ()
18079{
18080return use_ascii (foo) == use_ebcdic (foo);
18081 ;
18082 return 0;
18083}
18084_ACEOF
18085if ac_fn_c_try_compile "$LINENO"; then :
18086 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
18087 ac_cv_c_bigendian=yes
18088 fi
18089 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
18090 if test "$ac_cv_c_bigendian" = unknown; then
18091 ac_cv_c_bigendian=no
18092 else
18093 # finding both strings is unlikely to happen, but who knows?
18094 ac_cv_c_bigendian=unknown
18095 fi
18096 fi
18097fi
18098rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4fda9c95 18099else
3e0be4ab 18100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4fda9c95 18101/* end confdefs.h. */
5476a9a4
GM
18102$ac_includes_default
18103int
18104main ()
4fda9c95 18105{
5476a9a4
GM
18106
18107 /* Are we little or big endian? From Harbison&Steele. */
18108 union
18109 {
18110 long int l;
18111 char c[sizeof (long int)];
18112 } u;
18113 u.l = 1;
18114 return u.c[sizeof (long int) - 1] == 1;
18115
18116 ;
4fda9c95
GM
18117 return 0;
18118}
18119_ACEOF
f199cab1 18120if ac_fn_c_try_run "$LINENO"; then :
5476a9a4 18121 ac_cv_c_bigendian=no
3e0be4ab 18122else
5476a9a4 18123 ac_cv_c_bigendian=yes
4fda9c95 18124fi
f199cab1
GM
18125rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18126 conftest.$ac_objext conftest.beam conftest.$ac_ext
4fda9c95 18127fi
4fda9c95 18128
5476a9a4 18129 fi
f199cab1 18130fi
5476a9a4
GM
18131{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
18132$as_echo "$ac_cv_c_bigendian" >&6; }
18133 case $ac_cv_c_bigendian in #(
18134 yes)
18135 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
18136;; #(
18137 no)
18138 ;; #(
18139 universal)
3e0be4ab 18140
5476a9a4 18141$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
3e0be4ab 18142
5476a9a4
GM
18143 ;; #(
18144 *)
18145 as_fn_error "unknown endianness
18146 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
18147 esac
4fda9c95 18148
4fda9c95 18149
da6c8463 18150
5476a9a4
GM
18151 GNULIB_CHDIR=0;
18152 GNULIB_CHOWN=0;
18153 GNULIB_CLOSE=0;
18154 GNULIB_DUP=0;
18155 GNULIB_DUP2=0;
18156 GNULIB_DUP3=0;
18157 GNULIB_ENVIRON=0;
18158 GNULIB_EUIDACCESS=0;
18159 GNULIB_FACCESSAT=0;
18160 GNULIB_FCHDIR=0;
18161 GNULIB_FCHOWNAT=0;
18162 GNULIB_FDATASYNC=0;
18163 GNULIB_FSYNC=0;
18164 GNULIB_FTRUNCATE=0;
18165 GNULIB_GETCWD=0;
18166 GNULIB_GETDOMAINNAME=0;
18167 GNULIB_GETDTABLESIZE=0;
18168 GNULIB_GETGROUPS=0;
18169 GNULIB_GETHOSTNAME=0;
18170 GNULIB_GETLOGIN=0;
18171 GNULIB_GETLOGIN_R=0;
18172 GNULIB_GETPAGESIZE=0;
18173 GNULIB_GETUSERSHELL=0;
18174 GNULIB_GROUP_MEMBER=0;
18175 GNULIB_ISATTY=0;
18176 GNULIB_LCHOWN=0;
18177 GNULIB_LINK=0;
18178 GNULIB_LINKAT=0;
18179 GNULIB_LSEEK=0;
18180 GNULIB_PIPE=0;
18181 GNULIB_PIPE2=0;
18182 GNULIB_PREAD=0;
18183 GNULIB_PWRITE=0;
18184 GNULIB_READ=0;
18185 GNULIB_READLINK=0;
18186 GNULIB_READLINKAT=0;
18187 GNULIB_RMDIR=0;
18188 GNULIB_SETHOSTNAME=0;
18189 GNULIB_SLEEP=0;
18190 GNULIB_SYMLINK=0;
18191 GNULIB_SYMLINKAT=0;
18192 GNULIB_TTYNAME_R=0;
18193 GNULIB_UNISTD_H_NONBLOCKING=0;
18194 GNULIB_UNISTD_H_SIGPIPE=0;
18195 GNULIB_UNLINK=0;
18196 GNULIB_UNLINKAT=0;
18197 GNULIB_USLEEP=0;
18198 GNULIB_WRITE=0;
18199 HAVE_CHOWN=1;
18200 HAVE_DUP2=1;
18201 HAVE_DUP3=1;
18202 HAVE_EUIDACCESS=1;
18203 HAVE_FACCESSAT=1;
18204 HAVE_FCHDIR=1;
18205 HAVE_FCHOWNAT=1;
18206 HAVE_FDATASYNC=1;
18207 HAVE_FSYNC=1;
18208 HAVE_FTRUNCATE=1;
18209 HAVE_GETDTABLESIZE=1;
18210 HAVE_GETGROUPS=1;
18211 HAVE_GETHOSTNAME=1;
18212 HAVE_GETLOGIN=1;
18213 HAVE_GETPAGESIZE=1;
18214 HAVE_GROUP_MEMBER=1;
18215 HAVE_LCHOWN=1;
18216 HAVE_LINK=1;
18217 HAVE_LINKAT=1;
18218 HAVE_PIPE=1;
18219 HAVE_PIPE2=1;
18220 HAVE_PREAD=1;
18221 HAVE_PWRITE=1;
18222 HAVE_READLINK=1;
18223 HAVE_READLINKAT=1;
18224 HAVE_SETHOSTNAME=1;
18225 HAVE_SLEEP=1;
18226 HAVE_SYMLINK=1;
18227 HAVE_SYMLINKAT=1;
18228 HAVE_UNLINKAT=1;
18229 HAVE_USLEEP=1;
18230 HAVE_DECL_ENVIRON=1;
18231 HAVE_DECL_FCHDIR=1;
18232 HAVE_DECL_FDATASYNC=1;
18233 HAVE_DECL_GETDOMAINNAME=1;
18234 HAVE_DECL_GETLOGIN_R=1;
18235 HAVE_DECL_GETPAGESIZE=1;
18236 HAVE_DECL_GETUSERSHELL=1;
18237 HAVE_DECL_SETHOSTNAME=1;
18238 HAVE_DECL_TTYNAME_R=1;
18239 HAVE_OS_H=0;
18240 HAVE_SYS_PARAM_H=0;
18241 REPLACE_CHOWN=0;
18242 REPLACE_CLOSE=0;
18243 REPLACE_DUP=0;
18244 REPLACE_DUP2=0;
18245 REPLACE_FCHOWNAT=0;
18246 REPLACE_FTRUNCATE=0;
18247 REPLACE_GETCWD=0;
18248 REPLACE_GETDOMAINNAME=0;
8a3fafec 18249 REPLACE_GETDTABLESIZE=0;
5476a9a4
GM
18250 REPLACE_GETLOGIN_R=0;
18251 REPLACE_GETGROUPS=0;
18252 REPLACE_GETPAGESIZE=0;
18253 REPLACE_ISATTY=0;
18254 REPLACE_LCHOWN=0;
18255 REPLACE_LINK=0;
18256 REPLACE_LINKAT=0;
18257 REPLACE_LSEEK=0;
18258 REPLACE_PREAD=0;
18259 REPLACE_PWRITE=0;
18260 REPLACE_READ=0;
18261 REPLACE_READLINK=0;
18262 REPLACE_RMDIR=0;
18263 REPLACE_SLEEP=0;
18264 REPLACE_SYMLINK=0;
18265 REPLACE_TTYNAME_R=0;
18266 REPLACE_UNLINK=0;
18267 REPLACE_UNLINKAT=0;
18268 REPLACE_USLEEP=0;
18269 REPLACE_WRITE=0;
18270 UNISTD_H_HAVE_WINSOCK2_H=0;
18271 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
f199cab1
GM
18272
18273
93131e11 18274
d7ad186c
GM
18275 GNULIB_OPENDIR=0;
18276 GNULIB_READDIR=0;
18277 GNULIB_REWINDDIR=0;
18278 GNULIB_CLOSEDIR=0;
18279 GNULIB_DIRFD=0;
18280 GNULIB_FDOPENDIR=0;
18281 GNULIB_SCANDIR=0;
18282 GNULIB_ALPHASORT=0;
18283 HAVE_OPENDIR=1;
18284 HAVE_READDIR=1;
18285 HAVE_REWINDDIR=1;
18286 HAVE_CLOSEDIR=1;
18287 HAVE_DECL_DIRFD=1;
18288 HAVE_DECL_FDOPENDIR=1;
18289 HAVE_FDOPENDIR=1;
18290 HAVE_SCANDIR=1;
18291 HAVE_ALPHASORT=1;
18292 REPLACE_OPENDIR=0;
18293 REPLACE_CLOSEDIR=0;
18294 REPLACE_DIRFD=0;
18295 REPLACE_FDOPENDIR=0;
710f5812
GM
18296
18297
18298
18299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
18300$as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
18301if test "${gl_cv_have_include_next+set}" = set; then :
18302 $as_echo_n "(cached) " >&6
18303else
18304 rm -rf conftestd1a conftestd1b conftestd2
18305 mkdir conftestd1a conftestd1b conftestd2
18306 cat <<EOF > conftestd1a/conftest.h
18307#define DEFINED_IN_CONFTESTD1
18308#include_next <conftest.h>
18309#ifdef DEFINED_IN_CONFTESTD2
18310int foo;
18311#else
18312#error "include_next doesn't work"
18313#endif
18314EOF
18315 cat <<EOF > conftestd1b/conftest.h
18316#define DEFINED_IN_CONFTESTD1
18317#include <stdio.h>
18318#include_next <conftest.h>
18319#ifdef DEFINED_IN_CONFTESTD2
18320int foo;
18321#else
18322#error "include_next doesn't work"
18323#endif
18324EOF
18325 cat <<EOF > conftestd2/conftest.h
18326#ifndef DEFINED_IN_CONFTESTD1
18327#error "include_next test doesn't work"
18328#endif
18329#define DEFINED_IN_CONFTESTD2
18330EOF
18331 gl_save_CPPFLAGS="$CPPFLAGS"
18332 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
18333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18334/* end confdefs.h. */
18335#include <conftest.h>
18336_ACEOF
18337if ac_fn_c_try_compile "$LINENO"; then :
18338 gl_cv_have_include_next=yes
18339else
18340 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
18341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18342/* end confdefs.h. */
18343#include <conftest.h>
18344_ACEOF
18345if ac_fn_c_try_compile "$LINENO"; then :
18346 gl_cv_have_include_next=buggy
18347else
18348 gl_cv_have_include_next=no
18349fi
18350rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18351
18352fi
18353rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18354 CPPFLAGS="$gl_save_CPPFLAGS"
18355 rm -rf conftestd1a conftestd1b conftestd2
18356
18357fi
18358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
18359$as_echo "$gl_cv_have_include_next" >&6; }
18360 PRAGMA_SYSTEM_HEADER=
18361 if test $gl_cv_have_include_next = yes; then
18362 INCLUDE_NEXT=include_next
18363 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
18364 if test -n "$GCC"; then
18365 PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
18366 fi
18367 else
18368 if test $gl_cv_have_include_next = buggy; then
18369 INCLUDE_NEXT=include
18370 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
18371 else
18372 INCLUDE_NEXT=include
18373 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
18374 fi
18375 fi
18376
18377
18378
18379 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5
18380$as_echo_n "checking whether system header files limit the line length... " >&6; }
18381if test "${gl_cv_pragma_columns+set}" = set; then :
18382 $as_echo_n "(cached) " >&6
18383else
18384 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18385/* end confdefs.h. */
18386
18387#ifdef __TANDEM
18388choke me
18389#endif
18390
18391_ACEOF
18392if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18393 $EGREP "choke me" >/dev/null 2>&1; then :
18394 gl_cv_pragma_columns=yes
18395else
18396 gl_cv_pragma_columns=no
18397fi
18398rm -f conftest*
18399
18400
18401fi
18402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5
18403$as_echo "$gl_cv_pragma_columns" >&6; }
18404 if test $gl_cv_pragma_columns = yes; then
18405 PRAGMA_COLUMNS="#pragma COLUMNS 10000"
18406 else
18407 PRAGMA_COLUMNS=
18408 fi
18409
18410
710f5812 18411
710f5812 18412
710f5812 18413
d7ad186c
GM
18414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtold conforms to C99" >&5
18415$as_echo_n "checking whether strtold conforms to C99... " >&6; }
18416if test "${gl_cv_func_c99_strtold+set}" = set; then :
f199cab1 18417 $as_echo_n "(cached) " >&6
ae0d7250 18418else
f199cab1 18419 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3e0be4ab 18420/* end confdefs.h. */
d7ad186c
GM
18421/* On HP-UX before 11.23, strtold returns a struct instead of
18422 long double. Reject implementations like that, by requiring
18423 compatibility with the C99 prototype. */
18424 #include <stdlib.h>
18425 static long double (*p) (char const *, char **) = strtold;
18426 static long double
18427 test (char const *nptr, char **endptr)
18428 {
18429 long double r;
18430 r = strtold (nptr, endptr);
18431 return r;
18432 }
3e0be4ab
GM
18433int
18434main ()
18435{
d7ad186c 18436return test ("1.0", NULL) != 1 || p ("1.0", NULL) != 1;
3e0be4ab
GM
18437 ;
18438 return 0;
18439}
6ad6792b 18440_ACEOF
d7ad186c
GM
18441if ac_fn_c_try_link "$LINENO"; then :
18442 gl_cv_func_c99_strtold=yes
f199cab1 18443else
d7ad186c 18444 gl_cv_func_c99_strtold=no
f199cab1 18445fi
d7ad186c
GM
18446rm -f core conftest.err conftest.$ac_objext \
18447 conftest$ac_exeext conftest.$ac_ext
f199cab1 18448fi
d7ad186c
GM
18449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_c99_strtold" >&5
18450$as_echo "$gl_cv_func_c99_strtold" >&6; }
18451 if test $gl_cv_func_c99_strtold = yes; then
f199cab1 18452
d7ad186c 18453$as_echo "#define HAVE_C99_STRTOLD 1" >>confdefs.h
f199cab1 18454
5476a9a4 18455 fi
f199cab1 18456
f199cab1 18457
f199cab1
GM
18458
18459
4fda9c95 18460
3bf26e96
GM
18461
18462
eda33f78 18463
d7ad186c
GM
18464 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
18465$as_echo_n "checking if environ is properly declared... " >&6; }
18466 if test "${gt_cv_var_environ_declaration+set}" = set; then :
18467 $as_echo_n "(cached) " >&6
18468else
eda33f78 18469
d7ad186c
GM
18470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18471/* end confdefs.h. */
18472#if HAVE_UNISTD_H
18473 #include <unistd.h>
18474 #endif
18475 /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>. */
18476 #include <stdlib.h>
18477
18478 extern struct { int foo; } environ;
18479int
18480main ()
18481{
18482environ.foo = 1;
18483 ;
18484 return 0;
18485}
18486_ACEOF
18487if ac_fn_c_try_compile "$LINENO"; then :
18488 gt_cv_var_environ_declaration=no
18489else
18490 gt_cv_var_environ_declaration=yes
18491fi
18492rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18493fi
18494
18495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
18496$as_echo "$gt_cv_var_environ_declaration" >&6; }
18497 if test $gt_cv_var_environ_declaration = yes; then
18498
18499$as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
18500
18501 fi
18502
18503
18504 if test $gt_cv_var_environ_declaration != yes; then
18505 HAVE_DECL_ENVIRON=0
18506 fi
18507
18508
18509
3a019ab4
GM
18510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
18511$as_echo_n "checking for complete errno.h... " >&6; }
18512if test "${gl_cv_header_errno_h_complete+set}" = set; then :
18513 $as_echo_n "(cached) " >&6
18514else
18515
18516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18517/* end confdefs.h. */
18518
18519#include <errno.h>
18520#if !defined ETXTBSY
18521booboo
18522#endif
18523#if !defined ENOMSG
18524booboo
18525#endif
18526#if !defined EIDRM
18527booboo
18528#endif
18529#if !defined ENOLINK
18530booboo
18531#endif
18532#if !defined EPROTO
18533booboo
18534#endif
18535#if !defined EMULTIHOP
18536booboo
18537#endif
18538#if !defined EBADMSG
18539booboo
18540#endif
18541#if !defined EOVERFLOW
18542booboo
18543#endif
18544#if !defined ENOTSUP
18545booboo
18546#endif
18547#if !defined ENETRESET
18548booboo
18549#endif
18550#if !defined ECONNABORTED
18551booboo
18552#endif
18553#if !defined ESTALE
18554booboo
18555#endif
18556#if !defined EDQUOT
18557booboo
18558#endif
18559#if !defined ECANCELED
18560booboo
18561#endif
18562#if !defined EOWNERDEAD
18563booboo
18564#endif
18565#if !defined ENOTRECOVERABLE
18566booboo
18567#endif
18568#if !defined EILSEQ
18569booboo
18570#endif
18571
18572_ACEOF
18573if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18574 $EGREP "booboo" >/dev/null 2>&1; then :
18575 gl_cv_header_errno_h_complete=no
18576else
18577 gl_cv_header_errno_h_complete=yes
18578fi
18579rm -f conftest*
18580
d7ad186c 18581
3a019ab4
GM
18582fi
18583{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
18584$as_echo "$gl_cv_header_errno_h_complete" >&6; }
18585 if test $gl_cv_header_errno_h_complete = yes; then
18586 ERRNO_H=''
18587 else
d7ad186c
GM
18588
18589
18590
18591
18592
d7ad186c
GM
18593
18594
d7ad186c 18595
3a019ab4
GM
18596 if test $gl_cv_have_include_next = yes; then
18597 gl_cv_next_errno_h='<'errno.h'>'
18598 else
18599 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
18600$as_echo_n "checking absolute name of <errno.h>... " >&6; }
18601if test "${gl_cv_next_errno_h+set}" = set; then :
18602 $as_echo_n "(cached) " >&6
d7ad186c
GM
18603else
18604
3a019ab4
GM
18605 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18606/* end confdefs.h. */
18607#include <errno.h>
18608
d7ad186c 18609_ACEOF
3a019ab4
GM
18610 case "$host_os" in
18611 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18612 *) gl_absname_cpp="$ac_cpp" ;;
18613 esac
18614
18615 case "$host_os" in
18616 mingw*)
18617 gl_dirsep_regex='[/\\]'
18618 ;;
18619 *)
18620 gl_dirsep_regex='\/'
18621 ;;
18622 esac
18623 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18624
18625 gl_header_literal_regex=`echo 'errno.h' \
18626 | sed -e "$gl_make_literal_regex_sed"`
18627 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18628 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18629 s|^/[^/]|//&|
18630 p
18631 q
18632 }'
18633 gl_cv_next_errno_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18634 sed -n "$gl_absolute_header_sed"`'"'
d7ad186c 18635
d7ad186c 18636
2407788f 18637fi
3a019ab4
GM
18638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
18639$as_echo "$gl_cv_next_errno_h" >&6; }
18640 fi
18641 NEXT_ERRNO_H=$gl_cv_next_errno_h
2407788f 18642
3a019ab4
GM
18643 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18644 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18645 gl_next_as_first_directive='<'errno.h'>'
18646 else
18647 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18648 gl_next_as_first_directive=$gl_cv_next_errno_h
18649 fi
18650 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
2407788f 18651
d7ad186c
GM
18652
18653
d7ad186c 18654
3a019ab4
GM
18655 ERRNO_H='errno.h'
18656 fi
18657
18658 if test -n "$ERRNO_H"; then
18659 GL_GENERATE_ERRNO_H_TRUE=
18660 GL_GENERATE_ERRNO_H_FALSE='#'
d7ad186c 18661else
3a019ab4
GM
18662 GL_GENERATE_ERRNO_H_TRUE='#'
18663 GL_GENERATE_ERRNO_H_FALSE=
d7ad186c 18664fi
d7ad186c 18665
d7ad186c 18666
3a019ab4
GM
18667 if test -n "$ERRNO_H"; then
18668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
18669$as_echo_n "checking for EMULTIHOP value... " >&6; }
18670if test "${gl_cv_header_errno_h_EMULTIHOP+set}" = set; then :
18671 $as_echo_n "(cached) " >&6
18672else
d7ad186c 18673
3a019ab4
GM
18674 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18675/* end confdefs.h. */
d7ad186c 18676
3a019ab4
GM
18677#include <errno.h>
18678#ifdef EMULTIHOP
18679yes
18680#endif
d7ad186c 18681
3a019ab4
GM
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_EMULTIHOP=yes
d7ad186c 18686else
3a019ab4 18687 gl_cv_header_errno_h_EMULTIHOP=no
d7ad186c 18688fi
3a019ab4
GM
18689rm -f conftest*
18690
18691 if test $gl_cv_header_errno_h_EMULTIHOP = 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 EMULTIHOP
18698yes
18699#endif
d7ad186c 18700
d7ad186c 18701_ACEOF
3a019ab4
GM
18702if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18703 $EGREP "yes" >/dev/null 2>&1; then :
18704 gl_cv_header_errno_h_EMULTIHOP=hidden
18705fi
18706rm -f conftest*
d7ad186c 18707
3a019ab4
GM
18708 if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
18709 if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP" "
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 :
d7ad186c 18716
3a019ab4 18717fi
d7ad186c 18718
3a019ab4
GM
18719 fi
18720 fi
d7ad186c 18721
3a019ab4
GM
18722fi
18723{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
18724$as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
18725 case $gl_cv_header_errno_h_EMULTIHOP in
18726 yes | no)
18727 EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
18728 ;;
18729 *)
18730 EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
18731 ;;
18732 esac
d7ad186c
GM
18733
18734
3a019ab4 18735 fi
d7ad186c
GM
18736
18737
3a019ab4
GM
18738 if test -n "$ERRNO_H"; then
18739 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
18740$as_echo_n "checking for ENOLINK value... " >&6; }
18741if test "${gl_cv_header_errno_h_ENOLINK+set}" = set; then :
d7ad186c
GM
18742 $as_echo_n "(cached) " >&6
18743else
d7ad186c 18744
3a019ab4 18745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d7ad186c 18746/* end confdefs.h. */
3a019ab4
GM
18747
18748#include <errno.h>
18749#ifdef ENOLINK
18750yes
18751#endif
18752
18753_ACEOF
18754if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18755 $EGREP "yes" >/dev/null 2>&1; then :
18756 gl_cv_header_errno_h_ENOLINK=yes
18757else
18758 gl_cv_header_errno_h_ENOLINK=no
18759fi
18760rm -f conftest*
18761
18762 if test $gl_cv_header_errno_h_ENOLINK = no; then
18763 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18764/* end confdefs.h. */
18765
18766#define _XOPEN_SOURCE_EXTENDED 1
18767#include <errno.h>
18768#ifdef ENOLINK
18769yes
18770#endif
18771
18772_ACEOF
18773if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18774 $EGREP "yes" >/dev/null 2>&1; then :
18775 gl_cv_header_errno_h_ENOLINK=hidden
18776fi
18777rm -f conftest*
18778
18779 if test $gl_cv_header_errno_h_ENOLINK = hidden; then
18780 if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK" "
18781#define _XOPEN_SOURCE_EXTENDED 1
18782#include <errno.h>
18783/* The following two lines are a workaround against an autoconf-2.52 bug. */
18784#include <stdio.h>
18785#include <stdlib.h>
18786"; then :
18787
18788fi
18789
18790 fi
18791 fi
18792
18793fi
18794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
18795$as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; }
18796 case $gl_cv_header_errno_h_ENOLINK in
18797 yes | no)
18798 ENOLINK_HIDDEN=0; ENOLINK_VALUE=
18799 ;;
18800 *)
18801 ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
18802 ;;
18803 esac
18804
18805
18806 fi
18807
18808
18809 if test -n "$ERRNO_H"; then
18810 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
18811$as_echo_n "checking for EOVERFLOW value... " >&6; }
18812if test "${gl_cv_header_errno_h_EOVERFLOW+set}" = set; then :
18813 $as_echo_n "(cached) " >&6
18814else
18815
18816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18817/* end confdefs.h. */
18818
18819#include <errno.h>
18820#ifdef EOVERFLOW
18821yes
18822#endif
18823
18824_ACEOF
18825if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18826 $EGREP "yes" >/dev/null 2>&1; then :
18827 gl_cv_header_errno_h_EOVERFLOW=yes
18828else
18829 gl_cv_header_errno_h_EOVERFLOW=no
18830fi
18831rm -f conftest*
18832
18833 if test $gl_cv_header_errno_h_EOVERFLOW = no; then
18834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18835/* end confdefs.h. */
18836
18837#define _XOPEN_SOURCE_EXTENDED 1
18838#include <errno.h>
18839#ifdef EOVERFLOW
18840yes
18841#endif
18842
18843_ACEOF
18844if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18845 $EGREP "yes" >/dev/null 2>&1; then :
18846 gl_cv_header_errno_h_EOVERFLOW=hidden
18847fi
18848rm -f conftest*
18849
18850 if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
18851 if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW" "
18852#define _XOPEN_SOURCE_EXTENDED 1
18853#include <errno.h>
18854/* The following two lines are a workaround against an autoconf-2.52 bug. */
18855#include <stdio.h>
18856#include <stdlib.h>
18857"; then :
18858
18859fi
18860
18861 fi
18862 fi
18863
18864fi
18865{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
18866$as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
18867 case $gl_cv_header_errno_h_EOVERFLOW in
18868 yes | no)
18869 EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
18870 ;;
18871 *)
18872 EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
18873 ;;
18874 esac
18875
18876
18877 fi
18878
18879
18880
18881
18882
18883
18884
18885
18886
18887
18888 GNULIB_FCNTL=0;
18889 GNULIB_NONBLOCKING=0;
18890 GNULIB_OPEN=0;
18891 GNULIB_OPENAT=0;
18892 HAVE_FCNTL=1;
18893 HAVE_OPENAT=1;
18894 REPLACE_FCNTL=0;
18895 REPLACE_OPEN=0;
18896 REPLACE_OPENAT=0;
18897
18898
0cdca42a
GM
18899
18900
3a019ab4
GM
18901ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
18902if test "x$ac_cv_type_mode_t" = x""yes; then :
18903
18904else
18905
18906cat >>confdefs.h <<_ACEOF
18907#define mode_t int
18908_ACEOF
18909
18910fi
18911
18912ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "$ac_includes_default"
18913if test "x$ac_cv_have_decl_fdatasync" = x""yes; then :
18914 ac_have_decl=1
18915else
18916 ac_have_decl=0
18917fi
18918
18919cat >>confdefs.h <<_ACEOF
18920#define HAVE_DECL_FDATASYNC $ac_have_decl
18921_ACEOF
18922
18923
18924
18925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for st_dm_mode in struct stat" >&5
18926$as_echo_n "checking for st_dm_mode in struct stat... " >&6; }
18927if test "${ac_cv_struct_st_dm_mode+set}" = set; then :
18928 $as_echo_n "(cached) " >&6
18929else
18930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18931/* end confdefs.h. */
18932
18933#include <sys/types.h>
18934#include <sys/stat.h>
18935int
18936main ()
18937{
18938struct stat s; s.st_dm_mode;
18939 ;
18940 return 0;
18941}
18942_ACEOF
18943if ac_fn_c_try_compile "$LINENO"; then :
18944 ac_cv_struct_st_dm_mode=yes
18945else
18946 ac_cv_struct_st_dm_mode=no
18947fi
18948rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18949fi
18950{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_st_dm_mode" >&5
18951$as_echo "$ac_cv_struct_st_dm_mode" >&6; }
18952
18953 if test $ac_cv_struct_st_dm_mode = yes; then
18954
18955$as_echo "#define HAVE_ST_DM_MODE 1" >>confdefs.h
18956
18957 fi
18958
18959
18960ac_fn_c_check_decl "$LINENO" "strmode" "ac_cv_have_decl_strmode" "$ac_includes_default"
18961if test "x$ac_cv_have_decl_strmode" = x""yes; then :
18962 ac_have_decl=1
18963else
18964 ac_have_decl=0
18965fi
18966
18967cat >>confdefs.h <<_ACEOF
18968#define HAVE_DECL_STRMODE $ac_have_decl
18969_ACEOF
18970
18971
18972
18973
3a019ab4
GM
18974 GNULIB_FCHMODAT=0;
18975 GNULIB_FSTAT=0;
18976 GNULIB_FSTATAT=0;
18977 GNULIB_FUTIMENS=0;
18978 GNULIB_LCHMOD=0;
18979 GNULIB_LSTAT=0;
18980 GNULIB_MKDIRAT=0;
18981 GNULIB_MKFIFO=0;
18982 GNULIB_MKFIFOAT=0;
18983 GNULIB_MKNOD=0;
18984 GNULIB_MKNODAT=0;
18985 GNULIB_STAT=0;
18986 GNULIB_UTIMENSAT=0;
18987 HAVE_FCHMODAT=1;
18988 HAVE_FSTATAT=1;
18989 HAVE_FUTIMENS=1;
18990 HAVE_LCHMOD=1;
18991 HAVE_LSTAT=1;
18992 HAVE_MKDIRAT=1;
18993 HAVE_MKFIFO=1;
18994 HAVE_MKFIFOAT=1;
18995 HAVE_MKNOD=1;
18996 HAVE_MKNODAT=1;
18997 HAVE_UTIMENSAT=1;
18998 REPLACE_FSTAT=0;
18999 REPLACE_FSTATAT=0;
19000 REPLACE_FUTIMENS=0;
19001 REPLACE_LSTAT=0;
19002 REPLACE_MKDIR=0;
19003 REPLACE_MKFIFO=0;
19004 REPLACE_MKNOD=0;
19005 REPLACE_STAT=0;
19006 REPLACE_UTIMENSAT=0;
19007
19008
19009 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
19010$as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
19011if test "${gl_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then :
19012 $as_echo_n "(cached) " >&6
19013else
19014 rm -f conftest.sym conftest.file
19015 echo >conftest.file
19016 if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then
19017 if test "$cross_compiling" = yes; then :
19018 case "$host_os" in
19019 # Guess yes on glibc systems.
19020 *-gnu*) gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
19021 # If we don't know, assume the worst.
19022 *) gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
19023 esac
19024
19025else
19026 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19027/* end confdefs.h. */
19028$ac_includes_default
19029int
19030main ()
19031{
19032struct stat sbuf;
19033 /* Linux will dereference the symlink and fail, as required by
d7ad186c
GM
19034 POSIX. That is better in the sense that it means we will not
19035 have to compile and use the lstat wrapper. */
19036 return lstat ("conftest.sym/", &sbuf) == 0;
19037
19038 ;
19039 return 0;
19040}
19041_ACEOF
19042if ac_fn_c_try_run "$LINENO"; then :
19043 gl_cv_func_lstat_dereferences_slashed_symlink=yes
19044else
19045 gl_cv_func_lstat_dereferences_slashed_symlink=no
19046fi
19047rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19048 conftest.$ac_objext conftest.beam conftest.$ac_ext
19049fi
19050
19051 else
19052 # If the 'ln -s' command failed, then we probably don't even
19053 # have an lstat function.
19054 gl_cv_func_lstat_dereferences_slashed_symlink="guessing no"
19055 fi
19056 rm -f conftest.sym conftest.file
19057
19058fi
19059{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
19060$as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
19061 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
19062 *yes)
19063
19064cat >>confdefs.h <<_ACEOF
19065#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
19066_ACEOF
19067
19068 ;;
19069 esac
19070
19071
19072
19073
2407788f
GM
19074
19075
d7ad186c
GM
19076 GNULIB__EXIT=0;
19077 GNULIB_ATOLL=0;
19078 GNULIB_CALLOC_POSIX=0;
19079 GNULIB_CANONICALIZE_FILE_NAME=0;
19080 GNULIB_GETLOADAVG=0;
19081 GNULIB_GETSUBOPT=0;
19082 GNULIB_GRANTPT=0;
5476a9a4
GM
19083 GNULIB_MALLOC_POSIX=0;
19084 GNULIB_MBTOWC=0;
19085 GNULIB_MKDTEMP=0;
19086 GNULIB_MKOSTEMP=0;
19087 GNULIB_MKOSTEMPS=0;
19088 GNULIB_MKSTEMP=0;
19089 GNULIB_MKSTEMPS=0;
19090 GNULIB_POSIX_OPENPT=0;
19091 GNULIB_PTSNAME=0;
19092 GNULIB_PTSNAME_R=0;
19093 GNULIB_PUTENV=0;
19094 GNULIB_RANDOM=0;
19095 GNULIB_RANDOM_R=0;
19096 GNULIB_REALLOC_POSIX=0;
19097 GNULIB_REALPATH=0;
19098 GNULIB_RPMATCH=0;
2cdd55fc 19099 GNULIB_SECURE_GETENV=0;
5476a9a4
GM
19100 GNULIB_SETENV=0;
19101 GNULIB_STRTOD=0;
19102 GNULIB_STRTOLL=0;
19103 GNULIB_STRTOULL=0;
19104 GNULIB_SYSTEM_POSIX=0;
19105 GNULIB_UNLOCKPT=0;
19106 GNULIB_UNSETENV=0;
19107 GNULIB_WCTOMB=0;
19108 HAVE__EXIT=1;
19109 HAVE_ATOLL=1;
19110 HAVE_CANONICALIZE_FILE_NAME=1;
19111 HAVE_DECL_GETLOADAVG=1;
19112 HAVE_GETSUBOPT=1;
19113 HAVE_GRANTPT=1;
19114 HAVE_MKDTEMP=1;
19115 HAVE_MKOSTEMP=1;
19116 HAVE_MKOSTEMPS=1;
19117 HAVE_MKSTEMP=1;
19118 HAVE_MKSTEMPS=1;
19119 HAVE_POSIX_OPENPT=1;
19120 HAVE_PTSNAME=1;
19121 HAVE_PTSNAME_R=1;
19122 HAVE_RANDOM=1;
19123 HAVE_RANDOM_H=1;
19124 HAVE_RANDOM_R=1;
19125 HAVE_REALPATH=1;
19126 HAVE_RPMATCH=1;
2cdd55fc 19127 HAVE_SECURE_GETENV=1;
5476a9a4
GM
19128 HAVE_SETENV=1;
19129 HAVE_DECL_SETENV=1;
19130 HAVE_STRTOD=1;
19131 HAVE_STRTOLL=1;
19132 HAVE_STRTOULL=1;
19133 HAVE_STRUCT_RANDOM_DATA=1;
19134 HAVE_SYS_LOADAVG_H=0;
19135 HAVE_UNLOCKPT=1;
19136 HAVE_DECL_UNSETENV=1;
19137 REPLACE_CALLOC=0;
19138 REPLACE_CANONICALIZE_FILE_NAME=0;
19139 REPLACE_MALLOC=0;
19140 REPLACE_MBTOWC=0;
19141 REPLACE_MKSTEMP=0;
b6c9d18d 19142 REPLACE_PTSNAME=0;
5476a9a4
GM
19143 REPLACE_PTSNAME_R=0;
19144 REPLACE_PUTENV=0;
19145 REPLACE_RANDOM_R=0;
19146 REPLACE_REALLOC=0;
19147 REPLACE_REALPATH=0;
19148 REPLACE_SETENV=0;
19149 REPLACE_STRTOD=0;
19150 REPLACE_UNSETENV=0;
19151 REPLACE_WCTOMB=0;
f199cab1
GM
19152
19153
19154
f199cab1
GM
19155
19156
19157
19158
19159
19160
19161
19162
19163
19164
5f90be1b 19165
f199cab1
GM
19166
19167
19168 if test $gl_cv_have_include_next = yes; then
5476a9a4 19169 gl_cv_next_getopt_h='<'getopt.h'>'
f199cab1 19170 else
5476a9a4
GM
19171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <getopt.h>" >&5
19172$as_echo_n "checking absolute name of <getopt.h>... " >&6; }
19173if test "${gl_cv_next_getopt_h+set}" = set; then :
5f90be1b 19174 $as_echo_n "(cached) " >&6
5f90be1b 19175else
f199cab1 19176
5476a9a4 19177 if test $ac_cv_header_getopt_h = yes; then
f199cab1
GM
19178
19179
19180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5f90be1b 19181/* end confdefs.h. */
5476a9a4 19182#include <getopt.h>
4fda9c95 19183
5f90be1b 19184_ACEOF
f199cab1
GM
19185 case "$host_os" in
19186 aix*) gl_absname_cpp="$ac_cpp -C" ;;
19187 *) gl_absname_cpp="$ac_cpp" ;;
19188 esac
5f90be1b 19189
f199cab1
GM
19190 case "$host_os" in
19191 mingw*)
19192 gl_dirsep_regex='[/\\]'
19193 ;;
19194 *)
19195 gl_dirsep_regex='\/'
19196 ;;
19197 esac
19198 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
5f90be1b 19199
5476a9a4 19200 gl_header_literal_regex=`echo 'getopt.h' \
f199cab1
GM
19201 | sed -e "$gl_make_literal_regex_sed"`
19202 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19203 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19204 s|^/[^/]|//&|
19205 p
19206 q
19207 }'
5476a9a4 19208 gl_cv_next_getopt_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
f199cab1
GM
19209 sed -n "$gl_absolute_header_sed"`'"'
19210 else
5476a9a4 19211 gl_cv_next_getopt_h='<'getopt.h'>'
f199cab1 19212 fi
5f90be1b
PE
19213
19214
3e0be4ab 19215fi
5476a9a4
GM
19216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5
19217$as_echo "$gl_cv_next_getopt_h" >&6; }
f199cab1 19218 fi
5476a9a4 19219 NEXT_GETOPT_H=$gl_cv_next_getopt_h
3e0be4ab 19220
f199cab1
GM
19221 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19222 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
5476a9a4 19223 gl_next_as_first_directive='<'getopt.h'>'
f199cab1
GM
19224 else
19225 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
5476a9a4 19226 gl_next_as_first_directive=$gl_cv_next_getopt_h
f199cab1 19227 fi
5476a9a4 19228 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive
f199cab1
GM
19229
19230
f199cab1 19231
f199cab1 19232
5476a9a4
GM
19233 if test $ac_cv_header_getopt_h = yes; then
19234 HAVE_GETOPT_H=1
19235 else
19236 HAVE_GETOPT_H=0
f199cab1
GM
19237 fi
19238
f199cab1 19239
5476a9a4 19240 gl_replace_getopt=
f199cab1 19241
5476a9a4
GM
19242 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
19243 for ac_header in getopt.h
19244do :
19245 ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
19246if test "x$ac_cv_header_getopt_h" = x""yes; then :
19247 cat >>confdefs.h <<_ACEOF
19248#define HAVE_GETOPT_H 1
19249_ACEOF
f199cab1 19250
5476a9a4
GM
19251else
19252 gl_replace_getopt=yes
3e0be4ab 19253fi
3e0be4ab 19254
5476a9a4 19255done
3e0be4ab 19256
5476a9a4 19257 fi
3e0be4ab 19258
5476a9a4
GM
19259 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
19260 for ac_func in getopt_long_only
19261do :
19262 ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only"
19263if test "x$ac_cv_func_getopt_long_only" = x""yes; then :
19264 cat >>confdefs.h <<_ACEOF
19265#define HAVE_GETOPT_LONG_ONLY 1
19266_ACEOF
3e0be4ab 19267
3e0be4ab 19268else
5476a9a4 19269 gl_replace_getopt=yes
3e0be4ab 19270fi
5476a9a4 19271done
3e0be4ab 19272
f199cab1 19273 fi
3e0be4ab 19274
5476a9a4
GM
19275 if test -z "$gl_replace_getopt"; then
19276 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5
19277$as_echo_n "checking whether getopt is POSIX compatible... " >&6; }
19278if test "${gl_cv_func_getopt_posix+set}" = set; then :
3e0be4ab 19279 $as_echo_n "(cached) " >&6
5476a9a4
GM
19280else
19281
19282 if test $cross_compiling = no; then
19283 if test "$cross_compiling" = yes; then :
19284 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19285$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19286as_fn_error "cannot run test program while cross compiling
19287See \`config.log' for more details." "$LINENO" 5; }
3e0be4ab 19288else
f199cab1 19289 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3e0be4ab 19290/* end confdefs.h. */
5476a9a4
GM
19291
19292#include <unistd.h>
19293#include <stdlib.h>
19294#include <string.h>
19295
f199cab1
GM
19296int
19297main ()
19298{
5476a9a4
GM
19299 static char program[] = "program";
19300 static char a[] = "-a";
19301 static char foo[] = "foo";
19302 static char bar[] = "bar";
19303 char *argv[] = { program, a, foo, bar, NULL };
19304 int c;
19305
19306 c = getopt (4, argv, "ab");
19307 if (!(c == 'a'))
19308 return 1;
19309 c = getopt (4, argv, "ab");
19310 if (!(c == -1))
19311 return 2;
19312 if (!(optind == 2))
19313 return 3;
f199cab1
GM
19314 return 0;
19315}
19316
3e0be4ab 19317_ACEOF
5476a9a4
GM
19318if ac_fn_c_try_run "$LINENO"; then :
19319 gl_cv_func_getopt_posix=maybe
3e0be4ab 19320else
5476a9a4 19321 gl_cv_func_getopt_posix=no
3e0be4ab 19322fi
5476a9a4
GM
19323rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19324 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1
GM
19325fi
19326
5476a9a4
GM
19327 if test $gl_cv_func_getopt_posix = maybe; then
19328 if test "$cross_compiling" = yes; then :
19329 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19330$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19331as_fn_error "cannot run test program while cross compiling
19332See \`config.log' for more details." "$LINENO" 5; }
3e0be4ab 19333else
5476a9a4
GM
19334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19335/* end confdefs.h. */
3e0be4ab 19336
5476a9a4
GM
19337#include <unistd.h>
19338#include <stdlib.h>
19339#include <string.h>
3e0be4ab 19340
5476a9a4
GM
19341int
19342main ()
19343{
19344 static char program[] = "program";
19345 static char donald[] = "donald";
19346 static char p[] = "-p";
19347 static char billy[] = "billy";
19348 static char duck[] = "duck";
19349 static char a[] = "-a";
19350 static char bar[] = "bar";
19351 char *argv[] = { program, donald, p, billy, duck, a, bar, NULL };
19352 int c;
3e0be4ab 19353
5476a9a4
GM
19354 c = getopt (7, argv, "+abp:q:");
19355 if (!(c == -1))
19356 return 4;
19357 if (!(strcmp (argv[0], "program") == 0))
19358 return 5;
19359 if (!(strcmp (argv[1], "donald") == 0))
19360 return 6;
19361 if (!(strcmp (argv[2], "-p") == 0))
19362 return 7;
19363 if (!(strcmp (argv[3], "billy") == 0))
19364 return 8;
19365 if (!(strcmp (argv[4], "duck") == 0))
19366 return 9;
19367 if (!(strcmp (argv[5], "-a") == 0))
19368 return 10;
19369 if (!(strcmp (argv[6], "bar") == 0))
19370 return 11;
19371 if (!(optind == 1))
19372 return 12;
19373 return 0;
19374}
3e0be4ab
GM
19375
19376_ACEOF
5476a9a4
GM
19377if ac_fn_c_try_run "$LINENO"; then :
19378 gl_cv_func_getopt_posix=maybe
19379else
19380 gl_cv_func_getopt_posix=no
19381fi
19382rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19383 conftest.$ac_objext conftest.beam conftest.$ac_ext
19384fi
b0415a03 19385
5476a9a4
GM
19386 fi
19387 if test $gl_cv_func_getopt_posix = maybe; then
19388 if test "$cross_compiling" = yes; then :
19389 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19390$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19391as_fn_error "cannot run test program while cross compiling
19392See \`config.log' for more details." "$LINENO" 5; }
19393else
19394 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19395/* end confdefs.h. */
b0415a03 19396
5476a9a4
GM
19397#include <unistd.h>
19398#include <stdlib.h>
19399#include <string.h>
3e0be4ab 19400
5476a9a4
GM
19401int
19402main ()
19403{
19404 static char program[] = "program";
19405 static char ab[] = "-ab";
19406 char *argv[3] = { program, ab, NULL };
19407 if (getopt (2, argv, "ab:") != 'a')
19408 return 13;
19409 if (getopt (2, argv, "ab:") != '?')
19410 return 14;
19411 if (optopt != 'b')
19412 return 15;
19413 if (optind != 2)
19414 return 16;
19415 return 0;
19416}
3e0be4ab 19417
5476a9a4
GM
19418_ACEOF
19419if ac_fn_c_try_run "$LINENO"; then :
19420 gl_cv_func_getopt_posix=yes
19421else
19422 gl_cv_func_getopt_posix=no
19423fi
19424rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19425 conftest.$ac_objext conftest.beam conftest.$ac_ext
3e0be4ab 19426fi
3e0be4ab 19427
5476a9a4
GM
19428 fi
19429 else
19430 case "$host_os" in
19431 darwin* | aix* | mingw*) gl_cv_func_getopt_posix="guessing no";;
19432 *) gl_cv_func_getopt_posix="guessing yes";;
19433 esac
19434 fi
3e0be4ab 19435
5476a9a4
GM
19436fi
19437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5
19438$as_echo "$gl_cv_func_getopt_posix" >&6; }
19439 case "$gl_cv_func_getopt_posix" in
19440 *no) gl_replace_getopt=yes ;;
19441 esac
3e0be4ab
GM
19442 fi
19443
5476a9a4
GM
19444 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
19445 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5
19446$as_echo_n "checking for working GNU getopt function... " >&6; }
19447if test "${gl_cv_func_getopt_gnu+set}" = set; then :
19448 $as_echo_n "(cached) " >&6
19449else
19450 # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the
19451 # optstring is necessary for programs like m4 that have POSIX-mandated
19452 # semantics for supporting options interspersed with files.
19453 # Also, since getopt_long is a GNU extension, we require optind=0.
19454 # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT;
19455 # so take care to revert to the correct (non-)export state.
19456 gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }'
19457 case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in
19458 xx) gl_had_POSIXLY_CORRECT=exported ;;
19459 x) gl_had_POSIXLY_CORRECT=yes ;;
19460 *) gl_had_POSIXLY_CORRECT= ;;
19461 esac
19462 POSIXLY_CORRECT=1
19463 export POSIXLY_CORRECT
19464 if test "$cross_compiling" = yes; then :
19465 gl_cv_func_getopt_gnu="guessing no"
3e0be4ab 19466
5476a9a4
GM
19467else
19468 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19469/* end confdefs.h. */
19470#include <getopt.h>
19471 #include <stddef.h>
19472 #include <string.h>
3e0be4ab 19473
5476a9a4
GM
19474#include <stdlib.h>
19475#if defined __MACH__ && defined __APPLE__
19476/* Avoid a crash on Mac OS X. */
19477#include <mach/mach.h>
19478#include <mach/mach_error.h>
19479#include <mach/thread_status.h>
19480#include <mach/exception.h>
19481#include <mach/task.h>
19482#include <pthread.h>
19483/* The exception port on which our thread listens. */
19484static mach_port_t our_exception_port;
19485/* The main function of the thread listening for exceptions of type
19486 EXC_BAD_ACCESS. */
19487static void *
19488mach_exception_thread (void *arg)
19489{
19490 /* Buffer for a message to be received. */
19491 struct {
19492 mach_msg_header_t head;
19493 mach_msg_body_t msgh_body;
19494 char data[1024];
19495 } msg;
19496 mach_msg_return_t retval;
19497 /* Wait for a message on the exception port. */
19498 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
19499 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
19500 if (retval != MACH_MSG_SUCCESS)
19501 abort ();
19502 exit (1);
19503}
19504static void
19505nocrash_init (void)
19506{
19507 mach_port_t self = mach_task_self ();
19508 /* Allocate a port on which the thread shall listen for exceptions. */
19509 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
19510 == KERN_SUCCESS) {
19511 /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
19512 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
19513 MACH_MSG_TYPE_MAKE_SEND)
19514 == KERN_SUCCESS) {
19515 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
19516 for us. */
19517 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
19518 /* Create the thread listening on the exception port. */
19519 pthread_attr_t attr;
19520 pthread_t thread;
19521 if (pthread_attr_init (&attr) == 0
19522 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
19523 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
19524 pthread_attr_destroy (&attr);
19525 /* Replace the exception port info for these exceptions with our own.
19526 Note that we replace the exception port for the entire task, not only
19527 for a particular thread. This has the effect that when our exception
19528 port gets the message, the thread specific exception port has already
19529 been asked, and we don't need to bother about it.
19530 See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
19531 task_set_exception_ports (self, mask, our_exception_port,
19532 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
19533 }
19534 }
19535 }
19536}
19537#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
19538/* Avoid a crash on native Windows. */
19539#define WIN32_LEAN_AND_MEAN
19540#include <windows.h>
19541#include <winerror.h>
19542static LONG WINAPI
19543exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
19544{
19545 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
19546 {
19547 case EXCEPTION_ACCESS_VIOLATION:
19548 case EXCEPTION_IN_PAGE_ERROR:
19549 case EXCEPTION_STACK_OVERFLOW:
19550 case EXCEPTION_GUARD_PAGE:
19551 case EXCEPTION_PRIV_INSTRUCTION:
19552 case EXCEPTION_ILLEGAL_INSTRUCTION:
19553 case EXCEPTION_DATATYPE_MISALIGNMENT:
19554 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
19555 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
19556 exit (1);
19557 }
19558 return EXCEPTION_CONTINUE_SEARCH;
19559}
19560static void
19561nocrash_init (void)
19562{
19563 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
19564}
19565#else
19566/* Avoid a crash on POSIX systems. */
19567#include <signal.h>
19568/* A POSIX signal handler. */
19569static void
19570exception_handler (int sig)
19571{
19572 exit (1);
19573}
19574static void
19575nocrash_init (void)
19576{
19577#ifdef SIGSEGV
19578 signal (SIGSEGV, exception_handler);
19579#endif
19580#ifdef SIGBUS
19581 signal (SIGBUS, exception_handler);
19582#endif
19583}
19584#endif
3e0be4ab 19585
3e0be4ab 19586
5476a9a4
GM
19587int
19588main ()
19589{
3e0be4ab 19590
5476a9a4 19591 int result = 0;
3e0be4ab 19592
5476a9a4 19593 nocrash_init();
3e0be4ab 19594
5476a9a4
GM
19595 /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
19596 and fails on Mac OS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
19597 OSF/1 5.1, Solaris 10. */
19598 {
19599 static char conftest[] = "conftest";
19600 static char plus[] = "-+";
19601 char *argv[3] = { conftest, plus, NULL };
19602 opterr = 0;
19603 if (getopt (2, argv, "+a") != '?')
19604 result |= 1;
19605 }
19606 /* This code succeeds on glibc 2.8, mingw,
19607 and fails on Mac OS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
19608 IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */
19609 {
19610 static char program[] = "program";
19611 static char p[] = "-p";
19612 static char foo[] = "foo";
19613 static char bar[] = "bar";
19614 char *argv[] = { program, p, foo, bar, NULL };
3e0be4ab 19615
5476a9a4
GM
19616 optind = 1;
19617 if (getopt (4, argv, "p::") != 'p')
19618 result |= 2;
19619 else if (optarg != NULL)
19620 result |= 4;
19621 else if (getopt (4, argv, "p::") != -1)
19622 result |= 6;
19623 else if (optind != 2)
19624 result |= 8;
19625 }
19626 /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */
19627 {
19628 static char program[] = "program";
19629 static char foo[] = "foo";
19630 static char p[] = "-p";
19631 char *argv[] = { program, foo, p, NULL };
19632 optind = 0;
19633 if (getopt (3, argv, "-p") != 1)
19634 result |= 16;
19635 else if (getopt (3, argv, "-p") != 'p')
19636 result |= 16;
19637 }
19638 /* This code fails on glibc 2.11. */
19639 {
19640 static char program[] = "program";
19641 static char b[] = "-b";
19642 static char a[] = "-a";
19643 char *argv[] = { program, b, a, NULL };
19644 optind = opterr = 0;
19645 if (getopt (3, argv, "+:a:b") != 'b')
19646 result |= 32;
19647 else if (getopt (3, argv, "+:a:b") != ':')
19648 result |= 32;
19649 }
19650 /* This code dumps core on glibc 2.14. */
19651 {
19652 static char program[] = "program";
19653 static char w[] = "-W";
19654 static char dummy[] = "dummy";
19655 char *argv[] = { program, w, dummy, NULL };
19656 optind = opterr = 1;
19657 if (getopt (3, argv, "W;") != 'W')
19658 result |= 64;
19659 }
19660 return result;
3e0be4ab 19661
5476a9a4
GM
19662 ;
19663 return 0;
19664}
19665_ACEOF
19666if ac_fn_c_try_run "$LINENO"; then :
19667 gl_cv_func_getopt_gnu=yes
19668else
19669 gl_cv_func_getopt_gnu=no
19670fi
19671rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19672 conftest.$ac_objext conftest.beam conftest.$ac_ext
19673fi
3e0be4ab 19674
5476a9a4
GM
19675 case $gl_had_POSIXLY_CORRECT in
19676 exported) ;;
19677 yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;;
19678 *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;;
19679 esac
3e0be4ab 19680
5476a9a4
GM
19681fi
19682{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5
19683$as_echo "$gl_cv_func_getopt_gnu" >&6; }
19684 if test "$gl_cv_func_getopt_gnu" != yes; then
19685 gl_replace_getopt=yes
19686 else
19687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt_long function" >&5
19688$as_echo_n "checking for working GNU getopt_long function... " >&6; }
19689if test "${gl_cv_func_getopt_long_gnu+set}" = set; then :
f199cab1
GM
19690 $as_echo_n "(cached) " >&6
19691else
5476a9a4
GM
19692 if test "$cross_compiling" = yes; then :
19693 case "$host_os" in
19694 openbsd*) gl_cv_func_getopt_long_gnu="guessing no";;
19695 *) gl_cv_func_getopt_long_gnu="guessing yes";;
19696 esac
3e0be4ab
GM
19697
19698else
19699 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19700/* end confdefs.h. */
5476a9a4
GM
19701#include <getopt.h>
19702 #include <stddef.h>
19703 #include <string.h>
f199cab1
GM
19704
19705int
19706main ()
369e19fc 19707{
5476a9a4
GM
19708static const struct option long_options[] =
19709 {
19710 { "xtremely-",no_argument, NULL, 1003 },
19711 { "xtra", no_argument, NULL, 1001 },
19712 { "xtreme", no_argument, NULL, 1002 },
19713 { "xtremely", no_argument, NULL, 1003 },
19714 { NULL, 0, NULL, 0 }
19715 };
19716 /* This code fails on OpenBSD 5.0. */
19717 {
19718 static char program[] = "program";
19719 static char xtremel[] = "--xtremel";
19720 char *argv[] = { program, xtremel, NULL };
19721 int option_index;
19722 optind = 1; opterr = 0;
19723 if (getopt_long (2, argv, "", long_options, &option_index) != 1003)
19724 return 1;
19725 }
19726 return 0;
f199cab1
GM
19727
19728 ;
19729 return 0;
369e19fc 19730}
f199cab1
GM
19731_ACEOF
19732if ac_fn_c_try_run "$LINENO"; then :
5476a9a4 19733 gl_cv_func_getopt_long_gnu=yes
f199cab1 19734else
5476a9a4 19735 gl_cv_func_getopt_long_gnu=no
f199cab1
GM
19736fi
19737rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19738 conftest.$ac_objext conftest.beam conftest.$ac_ext
19739fi
19740
5476a9a4 19741
f199cab1 19742fi
5476a9a4
GM
19743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_long_gnu" >&5
19744$as_echo "$gl_cv_func_getopt_long_gnu" >&6; }
19745 case "$gl_cv_func_getopt_long_gnu" in
19746 *yes) ;;
19747 *) gl_replace_getopt=yes ;;
19748 esac
19749 fi
19750 fi
f199cab1 19751
f199cab1 19752
f199cab1 19753
369e19fc
PE
19754
19755
5476a9a4
GM
19756
19757 REPLACE_GETOPT=0
19758 if test -n "$gl_replace_getopt"; then
19759 REPLACE_GETOPT=1
f199cab1 19760 fi
3e0be4ab 19761
5476a9a4 19762 if test $REPLACE_GETOPT = 1; then
369e19fc 19763
5476a9a4 19764 GETOPT_H=getopt.h
369e19fc 19765
5476a9a4 19766$as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
6ad6792b
GM
19767
19768
f199cab1 19769
5476a9a4 19770 fi
f199cab1 19771
5476a9a4
GM
19772ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default"
19773if test "x$ac_cv_have_decl_getenv" = x""yes; then :
19774 ac_have_decl=1
3e0be4ab 19775else
5476a9a4 19776 ac_have_decl=0
3e0be4ab 19777fi
e275c824 19778
5476a9a4
GM
19779cat >>confdefs.h <<_ACEOF
19780#define HAVE_DECL_GETENV $ac_have_decl
19781_ACEOF
19782
a6342fc8 19783:
f199cab1 19784
5476a9a4
GM
19785
19786
19787
19788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
19789$as_echo_n "checking for C/C++ restrict keyword... " >&6; }
19790if test "${ac_cv_c_restrict+set}" = set; then :
19791 $as_echo_n "(cached) " >&6
f199cab1 19792else
5476a9a4
GM
19793 ac_cv_c_restrict=no
19794 # The order here caters to the fact that C++ does not require restrict.
19795 for ac_kw in __restrict __restrict__ _Restrict restrict; do
19796 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 19797/* end confdefs.h. */
5476a9a4
GM
19798typedef int * int_ptr;
19799 int foo (int_ptr $ac_kw ip) {
19800 return ip[0];
19801 }
f199cab1
GM
19802int
19803main ()
19804{
5476a9a4
GM
19805int s[1];
19806 int * $ac_kw t = s;
19807 t[0] = 0;
19808 return foo(t)
f199cab1
GM
19809 ;
19810 return 0;
19811}
19812_ACEOF
5476a9a4
GM
19813if ac_fn_c_try_compile "$LINENO"; then :
19814 ac_cv_c_restrict=$ac_kw
f199cab1 19815fi
5476a9a4
GM
19816rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19817 test "$ac_cv_c_restrict" != no && break
19818 done
f199cab1 19819
f199cab1 19820fi
5476a9a4
GM
19821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
19822$as_echo "$ac_cv_c_restrict" >&6; }
f199cab1 19823
5476a9a4
GM
19824 case $ac_cv_c_restrict in
19825 restrict) ;;
19826 no) $as_echo "#define restrict /**/" >>confdefs.h
19827 ;;
19828 *) cat >>confdefs.h <<_ACEOF
19829#define restrict $ac_cv_c_restrict
19830_ACEOF
19831 ;;
19832 esac
f199cab1 19833
f199cab1 19834
5476a9a4
GM
19835 GNULIB_GETTIMEOFDAY=0;
19836 HAVE_GETTIMEOFDAY=1;
19837 HAVE_STRUCT_TIMEVAL=1;
19838 HAVE_SYS_TIME_H=1;
19839 REPLACE_GETTIMEOFDAY=0;
19840 REPLACE_STRUCT_TIMEVAL=0;
e275c824 19841
e275c824 19842
e275c824 19843
e275c824 19844
4fda9c95 19845
5fa4ac76 19846
5fa4ac76 19847
5fa4ac76 19848
f199cab1
GM
19849
19850
19851
5fa4ac76 19852
5fa4ac76 19853
5fa4ac76 19854
5fa4ac76 19855
5fa4ac76 19856
5476a9a4
GM
19857 if test $gl_cv_have_include_next = yes; then
19858 gl_cv_next_sys_time_h='<'sys/time.h'>'
19859 else
19860 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
19861$as_echo_n "checking absolute name of <sys/time.h>... " >&6; }
19862if test "${gl_cv_next_sys_time_h+set}" = set; then :
19863 $as_echo_n "(cached) " >&6
19864else
5fa4ac76 19865
5476a9a4 19866 if test $ac_cv_header_sys_time_h = yes; then
5fa4ac76
PE
19867
19868
5476a9a4
GM
19869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19870/* end confdefs.h. */
19871#include <sys/time.h>
5fa4ac76 19872
5476a9a4
GM
19873_ACEOF
19874 case "$host_os" in
19875 aix*) gl_absname_cpp="$ac_cpp -C" ;;
19876 *) gl_absname_cpp="$ac_cpp" ;;
19877 esac
1f5d53eb 19878
5476a9a4
GM
19879 case "$host_os" in
19880 mingw*)
19881 gl_dirsep_regex='[/\\]'
19882 ;;
19883 *)
19884 gl_dirsep_regex='\/'
19885 ;;
19886 esac
19887 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
1f5d53eb 19888
5476a9a4
GM
19889 gl_header_literal_regex=`echo 'sys/time.h' \
19890 | sed -e "$gl_make_literal_regex_sed"`
19891 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19892 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19893 s|^/[^/]|//&|
19894 p
19895 q
19896 }'
19897 gl_cv_next_sys_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19898 sed -n "$gl_absolute_header_sed"`'"'
19899 else
19900 gl_cv_next_sys_time_h='<'sys/time.h'>'
19901 fi
1f5d53eb 19902
1f5d53eb 19903
5476a9a4
GM
19904fi
19905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
19906$as_echo "$gl_cv_next_sys_time_h" >&6; }
19907 fi
19908 NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
3e0be4ab 19909
5476a9a4
GM
19910 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19911 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19912 gl_next_as_first_directive='<'sys/time.h'>'
19913 else
19914 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19915 gl_next_as_first_directive=$gl_cv_next_sys_time_h
19916 fi
19917 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
3e0be4ab 19918
e275c824 19919
3e0be4ab 19920
f199cab1
GM
19921
19922
5476a9a4
GM
19923 if test $ac_cv_header_sys_time_h != yes; then
19924 HAVE_SYS_TIME_H=0
19925 fi
f199cab1
GM
19926
19927
19928
19929
19930
5476a9a4
GM
19931 if test $ac_cv_header_sys_socket_h != yes; then
19932 for ac_header in winsock2.h
19933do :
19934 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
19935if test "x$ac_cv_header_winsock2_h" = x""yes; then :
19936 cat >>confdefs.h <<_ACEOF
19937#define HAVE_WINSOCK2_H 1
19938_ACEOF
f199cab1 19939
5476a9a4 19940fi
3e0be4ab 19941
5476a9a4 19942done
3e0be4ab 19943
5476a9a4
GM
19944 fi
19945 if test "$ac_cv_header_winsock2_h" = yes; then
19946 HAVE_WINSOCK2_H=1
19947 UNISTD_H_HAVE_WINSOCK2_H=1
19948 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
19949 else
19950 HAVE_WINSOCK2_H=0
19951 fi
19952
19953
19954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
19955$as_echo_n "checking for struct timeval... " >&6; }
19956if test "${gl_cv_sys_struct_timeval+set}" = set; then :
19957 $as_echo_n "(cached) " >&6
19958else
19959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19960/* end confdefs.h. */
19961#if HAVE_SYS_TIME_H
19962 #include <sys/time.h>
19963 #endif
19964 #include <time.h>
19965 #if HAVE_WINSOCK2_H
19966 # include <winsock2.h>
19967 #endif
f199cab1 19968
5476a9a4
GM
19969int
19970main ()
19971{
19972static struct timeval x; x.tv_sec = x.tv_usec;
19973 ;
19974 return 0;
19975}
19976_ACEOF
19977if ac_fn_c_try_compile "$LINENO"; then :
19978 gl_cv_sys_struct_timeval=yes
19979else
19980 gl_cv_sys_struct_timeval=no
f199cab1 19981fi
5476a9a4 19982rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 19983
5476a9a4
GM
19984fi
19985{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
19986$as_echo "$gl_cv_sys_struct_timeval" >&6; }
19987 if test $gl_cv_sys_struct_timeval != yes; then
19988 HAVE_STRUCT_TIMEVAL=0
19989 else
19990 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
19991$as_echo_n "checking for wide-enough struct timeval.tv_sec member... " >&6; }
19992if test "${gl_cv_sys_struct_timeval_tv_sec+set}" = set; then :
19993 $as_echo_n "(cached) " >&6
19994else
19995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19996/* end confdefs.h. */
19997#if HAVE_SYS_TIME_H
19998 #include <sys/time.h>
19999 #endif
20000 #include <time.h>
20001 #if HAVE_WINSOCK2_H
20002 # include <winsock2.h>
20003 #endif
f199cab1 20004
5476a9a4
GM
20005int
20006main ()
20007{
20008static struct timeval x;
20009 typedef int verify_tv_sec_type[
20010 sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
20011 ];
f199cab1 20012
5476a9a4
GM
20013 ;
20014 return 0;
20015}
20016_ACEOF
20017if ac_fn_c_try_compile "$LINENO"; then :
20018 gl_cv_sys_struct_timeval_tv_sec=yes
20019else
20020 gl_cv_sys_struct_timeval_tv_sec=no
20021fi
20022rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 20023
5476a9a4
GM
20024fi
20025{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
20026$as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
20027 if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
20028 REPLACE_STRUCT_TIMEVAL=1
20029 fi
20030 fi
f199cab1 20031
f199cab1
GM
20032
20033
20034
20035
20036
f199cab1 20037
f199cab1 20038
5476a9a4
GM
20039 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
20040$as_echo_n "checking for long long int... " >&6; }
20041if test "${ac_cv_type_long_long_int+set}" = set; then :
20042 $as_echo_n "(cached) " >&6
20043else
20044 ac_cv_type_long_long_int=yes
20045 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
20046 ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
20047 if test $ac_cv_type_long_long_int = yes; then
20048 if test "$cross_compiling" = yes; then :
f199cab1 20049 :
5476a9a4
GM
20050else
20051 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20052/* end confdefs.h. */
20053#include <limits.h>
20054 #ifndef LLONG_MAX
20055 # define HALF \
20056 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
20057 # define LLONG_MAX (HALF - 1 + HALF)
20058 #endif
20059int
20060main ()
20061{
20062long long int n = 1;
20063 int i;
20064 for (i = 0; ; i++)
20065 {
20066 long long int m = n << i;
20067 if (m >> i != n)
20068 return 1;
20069 if (LLONG_MAX / 2 < m)
20070 break;
20071 }
20072 return 0;
20073 ;
20074 return 0;
20075}
20076_ACEOF
20077if ac_fn_c_try_run "$LINENO"; then :
20078
20079else
20080 ac_cv_type_long_long_int=no
20081fi
20082rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20083 conftest.$ac_objext conftest.beam conftest.$ac_ext
20084fi
e275c824 20085
5476a9a4
GM
20086 fi
20087 fi
1f5d53eb 20088fi
5476a9a4
GM
20089{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
20090$as_echo "$ac_cv_type_long_long_int" >&6; }
20091 if test $ac_cv_type_long_long_int = yes; then
e275c824 20092
5476a9a4 20093$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
e275c824 20094
5476a9a4 20095 fi
e275c824
PE
20096
20097
e275c824
PE
20098
20099
20100
20101
5476a9a4
GM
20102 gl_cv_c_multiarch=no
20103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20104/* end confdefs.h. */
20105#ifndef __APPLE_CC__
20106 not a universal capable compiler
20107 #endif
20108 typedef int dummy;
e275c824 20109
5476a9a4
GM
20110_ACEOF
20111if ac_fn_c_try_compile "$LINENO"; then :
e275c824 20112
5476a9a4
GM
20113 arch=
20114 prev=
20115 for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
20116 if test -n "$prev"; then
20117 case $word in
20118 i?86 | x86_64 | ppc | ppc64)
20119 if test -z "$arch" || test "$arch" = "$word"; then
20120 arch="$word"
20121 else
20122 gl_cv_c_multiarch=yes
20123 fi
20124 ;;
20125 esac
20126 prev=
20127 else
20128 if test "x$word" = "x-arch"; then
20129 prev=arch
20130 fi
20131 fi
20132 done
f199cab1 20133
f199cab1 20134fi
5476a9a4
GM
20135rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20136 if test $gl_cv_c_multiarch = yes; then
20137 APPLE_UNIVERSAL_BUILD=1
20138 else
20139 APPLE_UNIVERSAL_BUILD=0
20140 fi
e275c824
PE
20141
20142
67342916 20143
67342916 20144
67342916 20145
5476a9a4
GM
20146 if test $ac_cv_type_long_long_int = yes; then
20147 HAVE_LONG_LONG_INT=1
20148 else
20149 HAVE_LONG_LONG_INT=0
20150 fi
e275c824 20151
e275c824 20152
5476a9a4
GM
20153 if test $ac_cv_type_unsigned_long_long_int = yes; then
20154 HAVE_UNSIGNED_LONG_LONG_INT=1
20155 else
20156 HAVE_UNSIGNED_LONG_LONG_INT=0
20157 fi
e275c824
PE
20158
20159
20160
5476a9a4
GM
20161 if test $ac_cv_header_wchar_h = yes; then
20162 HAVE_WCHAR_H=1
20163 else
20164 HAVE_WCHAR_H=0
20165 fi
e275c824 20166
e275c824 20167
5476a9a4
GM
20168 if test $ac_cv_header_inttypes_h = yes; then
20169 HAVE_INTTYPES_H=1
20170 else
20171 HAVE_INTTYPES_H=0
20172 fi
6c051bab 20173
942f733f 20174
5476a9a4
GM
20175 if test $ac_cv_header_sys_types_h = yes; then
20176 HAVE_SYS_TYPES_H=1
20177 else
20178 HAVE_SYS_TYPES_H=0
20179 fi
4fc2b746 20180
4fc2b746 20181
f199cab1
GM
20182
20183
20184
20185
20186
20187
20188
20189
20190
5476a9a4
GM
20191 if test $gl_cv_have_include_next = yes; then
20192 gl_cv_next_stdint_h='<'stdint.h'>'
20193 else
20194 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
20195$as_echo_n "checking absolute name of <stdint.h>... " >&6; }
20196if test "${gl_cv_next_stdint_h+set}" = set; then :
20197 $as_echo_n "(cached) " >&6
20198else
f199cab1 20199
5476a9a4 20200 if test $ac_cv_header_stdint_h = yes; then
f199cab1
GM
20201
20202
5476a9a4
GM
20203 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20204/* end confdefs.h. */
20205#include <stdint.h>
f199cab1 20206
5476a9a4
GM
20207_ACEOF
20208 case "$host_os" in
20209 aix*) gl_absname_cpp="$ac_cpp -C" ;;
20210 *) gl_absname_cpp="$ac_cpp" ;;
20211 esac
f199cab1 20212
5476a9a4
GM
20213 case "$host_os" in
20214 mingw*)
20215 gl_dirsep_regex='[/\\]'
20216 ;;
20217 *)
20218 gl_dirsep_regex='\/'
20219 ;;
20220 esac
20221 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
4fc2b746 20222
5476a9a4
GM
20223 gl_header_literal_regex=`echo 'stdint.h' \
20224 | sed -e "$gl_make_literal_regex_sed"`
20225 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20226 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20227 s|^/[^/]|//&|
20228 p
20229 q
20230 }'
20231 gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20232 sed -n "$gl_absolute_header_sed"`'"'
20233 else
20234 gl_cv_next_stdint_h='<'stdint.h'>'
20235 fi
4fc2b746 20236
4fc2b746 20237
5476a9a4
GM
20238fi
20239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
20240$as_echo "$gl_cv_next_stdint_h" >&6; }
20241 fi
20242 NEXT_STDINT_H=$gl_cv_next_stdint_h
b0415a03 20243
5476a9a4
GM
20244 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20245 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20246 gl_next_as_first_directive='<'stdint.h'>'
20247 else
20248 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20249 gl_next_as_first_directive=$gl_cv_next_stdint_h
20250 fi
20251 NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
b0415a03 20252
4fc2b746 20253
f199cab1 20254
f199cab1 20255
5476a9a4
GM
20256 if test $ac_cv_header_stdint_h = yes; then
20257 HAVE_STDINT_H=1
20258 else
20259 HAVE_STDINT_H=0
20260 fi
f199cab1
GM
20261
20262
5476a9a4
GM
20263 if test $ac_cv_header_stdint_h = yes; then
20264 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
20265$as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
20266if test "${gl_cv_header_working_stdint_h+set}" = set; then :
f199cab1
GM
20267 $as_echo_n "(cached) " >&6
20268else
5476a9a4
GM
20269 gl_cv_header_working_stdint_h=no
20270 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20271/* end confdefs.h. */
4fc2b746
GM
20272
20273
5476a9a4
GM
20274#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
20275#include <stdint.h>
20276/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
20277#if !(defined WCHAR_MIN && defined WCHAR_MAX)
20278#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
20279#endif
4fc2b746 20280
942f733f 20281
5476a9a4
GM
20282 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20283 included before <wchar.h>. */
20284 #include <stddef.h>
20285 #include <signal.h>
20286 #if HAVE_WCHAR_H
20287 # include <stdio.h>
20288 # include <time.h>
20289 # include <wchar.h>
20290 #endif
e275c824 20291
f199cab1 20292
5476a9a4
GM
20293#ifdef INT8_MAX
20294int8_t a1 = INT8_MAX;
20295int8_t a1min = INT8_MIN;
20296#endif
20297#ifdef INT16_MAX
20298int16_t a2 = INT16_MAX;
20299int16_t a2min = INT16_MIN;
20300#endif
20301#ifdef INT32_MAX
20302int32_t a3 = INT32_MAX;
20303int32_t a3min = INT32_MIN;
20304#endif
20305#ifdef INT64_MAX
20306int64_t a4 = INT64_MAX;
20307int64_t a4min = INT64_MIN;
20308#endif
20309#ifdef UINT8_MAX
20310uint8_t b1 = UINT8_MAX;
20311#else
20312typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
20313#endif
20314#ifdef UINT16_MAX
20315uint16_t b2 = UINT16_MAX;
20316#endif
20317#ifdef UINT32_MAX
20318uint32_t b3 = UINT32_MAX;
20319#endif
20320#ifdef UINT64_MAX
20321uint64_t b4 = UINT64_MAX;
20322#endif
20323int_least8_t c1 = INT8_C (0x7f);
20324int_least8_t c1max = INT_LEAST8_MAX;
20325int_least8_t c1min = INT_LEAST8_MIN;
20326int_least16_t c2 = INT16_C (0x7fff);
20327int_least16_t c2max = INT_LEAST16_MAX;
20328int_least16_t c2min = INT_LEAST16_MIN;
20329int_least32_t c3 = INT32_C (0x7fffffff);
20330int_least32_t c3max = INT_LEAST32_MAX;
20331int_least32_t c3min = INT_LEAST32_MIN;
20332int_least64_t c4 = INT64_C (0x7fffffffffffffff);
20333int_least64_t c4max = INT_LEAST64_MAX;
20334int_least64_t c4min = INT_LEAST64_MIN;
20335uint_least8_t d1 = UINT8_C (0xff);
20336uint_least8_t d1max = UINT_LEAST8_MAX;
20337uint_least16_t d2 = UINT16_C (0xffff);
20338uint_least16_t d2max = UINT_LEAST16_MAX;
20339uint_least32_t d3 = UINT32_C (0xffffffff);
20340uint_least32_t d3max = UINT_LEAST32_MAX;
20341uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
20342uint_least64_t d4max = UINT_LEAST64_MAX;
20343int_fast8_t e1 = INT_FAST8_MAX;
20344int_fast8_t e1min = INT_FAST8_MIN;
20345int_fast16_t e2 = INT_FAST16_MAX;
20346int_fast16_t e2min = INT_FAST16_MIN;
20347int_fast32_t e3 = INT_FAST32_MAX;
20348int_fast32_t e3min = INT_FAST32_MIN;
20349int_fast64_t e4 = INT_FAST64_MAX;
20350int_fast64_t e4min = INT_FAST64_MIN;
20351uint_fast8_t f1 = UINT_FAST8_MAX;
20352uint_fast16_t f2 = UINT_FAST16_MAX;
20353uint_fast32_t f3 = UINT_FAST32_MAX;
20354uint_fast64_t f4 = UINT_FAST64_MAX;
20355#ifdef INTPTR_MAX
20356intptr_t g = INTPTR_MAX;
20357intptr_t gmin = INTPTR_MIN;
20358#endif
20359#ifdef UINTPTR_MAX
20360uintptr_t h = UINTPTR_MAX;
20361#endif
20362intmax_t i = INTMAX_MAX;
20363uintmax_t j = UINTMAX_MAX;
5fa4ac76 20364
5476a9a4
GM
20365#include <limits.h> /* for CHAR_BIT */
20366#define TYPE_MINIMUM(t) \
20367 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
20368#define TYPE_MAXIMUM(t) \
20369 ((t) ((t) 0 < (t) -1 \
20370 ? (t) -1 \
20371 : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
20372struct s {
20373 int check_PTRDIFF:
20374 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
20375 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
20376 ? 1 : -1;
20377 /* Detect bug in FreeBSD 6.0 / ia64. */
20378 int check_SIG_ATOMIC:
20379 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
20380 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
20381 ? 1 : -1;
20382 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
20383 int check_WCHAR:
20384 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
20385 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
20386 ? 1 : -1;
20387 /* Detect bug in mingw. */
20388 int check_WINT:
20389 WINT_MIN == TYPE_MINIMUM (wint_t)
20390 && WINT_MAX == TYPE_MAXIMUM (wint_t)
20391 ? 1 : -1;
5fa4ac76 20392
5476a9a4
GM
20393 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
20394 int check_UINT8_C:
20395 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
20396 int check_UINT16_C:
20397 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
20398
20399 /* Detect bugs in OpenBSD 3.9 stdint.h. */
20400#ifdef UINT8_MAX
20401 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
3e0be4ab 20402#endif
5476a9a4
GM
20403#ifdef UINT16_MAX
20404 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
20405#endif
20406#ifdef UINT32_MAX
20407 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
20408#endif
20409#ifdef UINT64_MAX
20410 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
20411#endif
20412 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
20413 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
20414 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
20415 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
20416 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
20417 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
20418 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
20419 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
20420 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
20421 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
20422 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
20423};
20424
f199cab1
GM
20425int
20426main ()
20427{
5476a9a4 20428
f199cab1
GM
20429 ;
20430 return 0;
20431}
20432_ACEOF
5476a9a4
GM
20433if ac_fn_c_try_compile "$LINENO"; then :
20434 if test "$cross_compiling" = yes; then :
20435 gl_cv_header_working_stdint_h=yes
40e27e7f 20436
5476a9a4
GM
20437else
20438 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20439/* end confdefs.h. */
40e27e7f 20440
f199cab1 20441
5476a9a4
GM
20442#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
20443#include <stdint.h>
f199cab1
GM
20444
20445
5476a9a4
GM
20446 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20447 included before <wchar.h>. */
20448 #include <stddef.h>
20449 #include <signal.h>
20450 #if HAVE_WCHAR_H
20451 # include <stdio.h>
20452 # include <time.h>
20453 # include <wchar.h>
20454 #endif
f199cab1 20455
d87ffdb7 20456
5476a9a4
GM
20457#include <stdio.h>
20458#include <string.h>
20459#define MVAL(macro) MVAL1(macro)
20460#define MVAL1(expression) #expression
20461static const char *macro_values[] =
20462 {
20463#ifdef INT8_MAX
20464 MVAL (INT8_MAX),
20465#endif
20466#ifdef INT16_MAX
20467 MVAL (INT16_MAX),
20468#endif
20469#ifdef INT32_MAX
20470 MVAL (INT32_MAX),
20471#endif
20472#ifdef INT64_MAX
20473 MVAL (INT64_MAX),
20474#endif
20475#ifdef UINT8_MAX
20476 MVAL (UINT8_MAX),
20477#endif
20478#ifdef UINT16_MAX
20479 MVAL (UINT16_MAX),
20480#endif
20481#ifdef UINT32_MAX
20482 MVAL (UINT32_MAX),
20483#endif
20484#ifdef UINT64_MAX
20485 MVAL (UINT64_MAX),
20486#endif
20487 NULL
20488 };
f199cab1 20489
3e0be4ab
GM
20490int
20491main ()
20492{
5476a9a4
GM
20493
20494 const char **mv;
20495 for (mv = macro_values; *mv != NULL; mv++)
20496 {
20497 const char *value = *mv;
20498 /* Test whether it looks like a cast expression. */
20499 if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
20500 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
20501 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
20502 || strncmp (value, "((int)"/*)*/, 6) == 0
20503 || strncmp (value, "((signed short)"/*)*/, 15) == 0
20504 || strncmp (value, "((signed char)"/*)*/, 14) == 0)
20505 return mv - macro_values + 1;
20506 }
3e0be4ab 20507 return 0;
5476a9a4 20508
f199cab1
GM
20509 ;
20510 return 0;
20511}
20512_ACEOF
5476a9a4
GM
20513if ac_fn_c_try_run "$LINENO"; then :
20514 gl_cv_header_working_stdint_h=yes
f199cab1 20515fi
5476a9a4
GM
20516rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20517 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1
GM
20518fi
20519
d87ffdb7 20520
5476a9a4
GM
20521fi
20522rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d87ffdb7 20523
5476a9a4
GM
20524fi
20525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
20526$as_echo "$gl_cv_header_working_stdint_h" >&6; }
20527 fi
20528 if test "$gl_cv_header_working_stdint_h" = yes; then
20529 STDINT_H=
20530 else
20531 for ac_header in sys/inttypes.h sys/bitypes.h
20532do :
20533 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
20534ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
20535eval as_val=\$$as_ac_Header
20536 if test "x$as_val" = x""yes; then :
20537 cat >>confdefs.h <<_ACEOF
20538#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
20539_ACEOF
d87ffdb7 20540
5476a9a4 20541fi
d87ffdb7 20542
5476a9a4 20543done
7d2a1c5e 20544
5476a9a4
GM
20545 if test $ac_cv_header_sys_inttypes_h = yes; then
20546 HAVE_SYS_INTTYPES_H=1
20547 else
20548 HAVE_SYS_INTTYPES_H=0
20549 fi
7d2a1c5e 20550
5476a9a4
GM
20551 if test $ac_cv_header_sys_bitypes_h = yes; then
20552 HAVE_SYS_BITYPES_H=1
20553 else
20554 HAVE_SYS_BITYPES_H=0
20555 fi
7d2a1c5e 20556
f199cab1
GM
20557
20558
20559
5476a9a4 20560 if test $APPLE_UNIVERSAL_BUILD = 0; then
f199cab1
GM
20561
20562
5476a9a4
GM
20563 for gltype in ptrdiff_t size_t ; do
20564 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
20565$as_echo_n "checking for bit size of $gltype... " >&6; }
20566if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
20567 $as_echo_n "(cached) " >&6
20568else
20569 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
20570 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20571 included before <wchar.h>. */
20572 #include <stddef.h>
20573 #include <signal.h>
20574 #if HAVE_WCHAR_H
20575 # include <stdio.h>
20576 # include <time.h>
20577 # include <wchar.h>
20578 #endif
f199cab1 20579
5476a9a4 20580#include <limits.h>"; then :
f199cab1 20581
5476a9a4
GM
20582else
20583 result=unknown
20584fi
f199cab1 20585
5476a9a4 20586 eval gl_cv_bitsizeof_${gltype}=\$result
f199cab1 20587
5476a9a4
GM
20588fi
20589eval ac_res=\$gl_cv_bitsizeof_${gltype}
20590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20591$as_echo "$ac_res" >&6; }
20592 eval result=\$gl_cv_bitsizeof_${gltype}
20593 if test $result = unknown; then
20594 result=0
20595 fi
20596 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
20597 cat >>confdefs.h <<_ACEOF
20598#define BITSIZEOF_${GLTYPE} $result
20599_ACEOF
f199cab1 20600
5476a9a4
GM
20601 eval BITSIZEOF_${GLTYPE}=\$result
20602 done
f199cab1
GM
20603
20604
5476a9a4 20605 fi
f199cab1
GM
20606
20607
5476a9a4
GM
20608 for gltype in sig_atomic_t wchar_t wint_t ; do
20609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
20610$as_echo_n "checking for bit size of $gltype... " >&6; }
20611if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
20612 $as_echo_n "(cached) " >&6
20613else
20614 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
20615 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20616 included before <wchar.h>. */
20617 #include <stddef.h>
20618 #include <signal.h>
20619 #if HAVE_WCHAR_H
20620 # include <stdio.h>
20621 # include <time.h>
20622 # include <wchar.h>
20623 #endif
f199cab1 20624
5476a9a4 20625#include <limits.h>"; then :
f199cab1 20626
f199cab1 20627else
5476a9a4 20628 result=unknown
7d2a1c5e 20629fi
7d2a1c5e 20630
5476a9a4 20631 eval gl_cv_bitsizeof_${gltype}=\$result
7d2a1c5e 20632
3e0be4ab 20633fi
5476a9a4
GM
20634eval ac_res=\$gl_cv_bitsizeof_${gltype}
20635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20636$as_echo "$ac_res" >&6; }
20637 eval result=\$gl_cv_bitsizeof_${gltype}
20638 if test $result = unknown; then
20639 result=0
20640 fi
20641 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
20642 cat >>confdefs.h <<_ACEOF
20643#define BITSIZEOF_${GLTYPE} $result
3e0be4ab 20644_ACEOF
7d2a1c5e 20645
5476a9a4
GM
20646 eval BITSIZEOF_${GLTYPE}=\$result
20647 done
7d2a1c5e
GM
20648
20649
5476a9a4
GM
20650
20651
20652 for gltype in sig_atomic_t wchar_t wint_t ; do
20653 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
20654$as_echo_n "checking whether $gltype is signed... " >&6; }
20655if { as_var=gl_cv_type_${gltype}_signed; eval "test \"\${$as_var+set}\" = set"; }; then :
3e0be4ab
GM
20656 $as_echo_n "(cached) " >&6
20657else
f199cab1
GM
20658 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20659/* end confdefs.h. */
f199cab1 20660
5476a9a4
GM
20661 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20662 included before <wchar.h>. */
20663 #include <stddef.h>
20664 #include <signal.h>
20665 #if HAVE_WCHAR_H
20666 # include <stdio.h>
20667 # include <time.h>
20668 # include <wchar.h>
20669 #endif
20670
20671 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
f199cab1
GM
20672int
20673main ()
20674{
5476a9a4 20675
f199cab1
GM
20676 ;
20677 return 0;
20678}
20679_ACEOF
20680if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4 20681 result=yes
f199cab1 20682else
5476a9a4 20683 result=no
f199cab1
GM
20684fi
20685rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5476a9a4 20686 eval gl_cv_type_${gltype}_signed=\$result
7d2a1c5e 20687
3e0be4ab 20688fi
5476a9a4
GM
20689eval ac_res=\$gl_cv_type_${gltype}_signed
20690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20691$as_echo "$ac_res" >&6; }
20692 eval result=\$gl_cv_type_${gltype}_signed
20693 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
20694 if test "$result" = yes; then
20695 cat >>confdefs.h <<_ACEOF
20696#define HAVE_SIGNED_${GLTYPE} 1
f199cab1 20697_ACEOF
d87ffdb7 20698
5476a9a4
GM
20699 eval HAVE_SIGNED_${GLTYPE}=1
20700 else
20701 eval HAVE_SIGNED_${GLTYPE}=0
20702 fi
20703 done
f199cab1 20704
e275c824 20705
5476a9a4
GM
20706 gl_cv_type_ptrdiff_t_signed=yes
20707 gl_cv_type_size_t_signed=no
20708 if test $APPLE_UNIVERSAL_BUILD = 0; then
e275c824 20709
e275c824 20710
5476a9a4
GM
20711 for gltype in ptrdiff_t size_t ; do
20712 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
20713$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
20714if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
16c3e636
PE
20715 $as_echo_n "(cached) " >&6
20716else
5476a9a4
GM
20717 eval gl_cv_type_${gltype}_suffix=no
20718 eval result=\$gl_cv_type_${gltype}_signed
20719 if test "$result" = yes; then
20720 glsufu=
20721 else
20722 glsufu=u
20723 fi
20724 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
20725 case $glsuf in
20726 '') gltype1='int';;
20727 l) gltype1='long int';;
20728 ll) gltype1='long long int';;
20729 i64) gltype1='__int64';;
20730 u) gltype1='unsigned int';;
20731 ul) gltype1='unsigned long int';;
20732 ull) gltype1='unsigned long long int';;
20733 ui64)gltype1='unsigned __int64';;
20734 esac
20735 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 20736/* end confdefs.h. */
16c3e636 20737
5476a9a4
GM
20738 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20739 included before <wchar.h>. */
20740 #include <stddef.h>
20741 #include <signal.h>
20742 #if HAVE_WCHAR_H
20743 # include <stdio.h>
20744 # include <time.h>
20745 # include <wchar.h>
20746 #endif
1f5d53eb 20747
5476a9a4
GM
20748 extern $gltype foo;
20749 extern $gltype1 foo;
f199cab1
GM
20750int
20751main ()
20752{
5476a9a4 20753
f199cab1
GM
20754 ;
20755 return 0;
20756}
20757_ACEOF
20758if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4 20759 eval gl_cv_type_${gltype}_suffix=\$glsuf
f199cab1
GM
20760fi
20761rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5476a9a4
GM
20762 eval result=\$gl_cv_type_${gltype}_suffix
20763 test "$result" != no && break
20764 done
f199cab1 20765fi
5476a9a4
GM
20766eval ac_res=\$gl_cv_type_${gltype}_suffix
20767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20768$as_echo "$ac_res" >&6; }
20769 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
20770 eval result=\$gl_cv_type_${gltype}_suffix
20771 test "$result" = no && result=
20772 eval ${GLTYPE}_SUFFIX=\$result
20773 cat >>confdefs.h <<_ACEOF
20774#define ${GLTYPE}_SUFFIX $result
20775_ACEOF
16c3e636 20776
5476a9a4 20777 done
16c3e636 20778
3e0be4ab 20779
5476a9a4
GM
20780 fi
20781
20782
20783 for gltype in sig_atomic_t wchar_t wint_t ; do
20784 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
20785$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
20786if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
1fd182f0
PE
20787 $as_echo_n "(cached) " >&6
20788else
5476a9a4
GM
20789 eval gl_cv_type_${gltype}_suffix=no
20790 eval result=\$gl_cv_type_${gltype}_signed
20791 if test "$result" = yes; then
20792 glsufu=
20793 else
20794 glsufu=u
20795 fi
20796 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
20797 case $glsuf in
20798 '') gltype1='int';;
20799 l) gltype1='long int';;
20800 ll) gltype1='long long int';;
20801 i64) gltype1='__int64';;
20802 u) gltype1='unsigned int';;
20803 ul) gltype1='unsigned long int';;
20804 ull) gltype1='unsigned long long int';;
20805 ui64)gltype1='unsigned __int64';;
20806 esac
20807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1fd182f0 20808/* end confdefs.h. */
5476a9a4
GM
20809
20810 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20811 included before <wchar.h>. */
20812 #include <stddef.h>
20813 #include <signal.h>
20814 #if HAVE_WCHAR_H
20815 # include <stdio.h>
20816 # include <time.h>
20817 # include <wchar.h>
20818 #endif
20819
20820 extern $gltype foo;
20821 extern $gltype1 foo;
1fd182f0
PE
20822int
20823main ()
20824{
5476a9a4 20825
1fd182f0
PE
20826 ;
20827 return 0;
20828}
20829_ACEOF
3e0be4ab 20830if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4 20831 eval gl_cv_type_${gltype}_suffix=\$glsuf
1f5d53eb 20832fi
3e0be4ab 20833rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5476a9a4
GM
20834 eval result=\$gl_cv_type_${gltype}_suffix
20835 test "$result" != no && break
20836 done
f199cab1 20837fi
5476a9a4
GM
20838eval ac_res=\$gl_cv_type_${gltype}_suffix
20839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20840$as_echo "$ac_res" >&6; }
20841 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
20842 eval result=\$gl_cv_type_${gltype}_suffix
20843 test "$result" = no && result=
20844 eval ${GLTYPE}_SUFFIX=\$result
20845 cat >>confdefs.h <<_ACEOF
20846#define ${GLTYPE}_SUFFIX $result
f199cab1
GM
20847_ACEOF
20848
5476a9a4 20849 done
f199cab1 20850
f199cab1 20851
f199cab1 20852
5476a9a4
GM
20853 if test $BITSIZEOF_WINT_T -lt 32; then
20854 BITSIZEOF_WINT_T=32
20855 fi
f199cab1 20856
5476a9a4
GM
20857 STDINT_H=stdint.h
20858 fi
f199cab1 20859
5476a9a4
GM
20860 if test -n "$STDINT_H"; then
20861 GL_GENERATE_STDINT_H_TRUE=
20862 GL_GENERATE_STDINT_H_FALSE='#'
20863else
20864 GL_GENERATE_STDINT_H_TRUE='#'
20865 GL_GENERATE_STDINT_H_FALSE=
f199cab1
GM
20866fi
20867
f199cab1 20868
f199cab1 20869
3e0be4ab 20870
f199cab1 20871
5476a9a4
GM
20872 GNULIB_IMAXABS=0;
20873 GNULIB_IMAXDIV=0;
20874 GNULIB_STRTOIMAX=0;
20875 GNULIB_STRTOUMAX=0;
20876 HAVE_DECL_IMAXABS=1;
20877 HAVE_DECL_IMAXDIV=1;
20878 HAVE_DECL_STRTOIMAX=1;
20879 HAVE_DECL_STRTOUMAX=1;
20880 REPLACE_STRTOIMAX=0;
20881 INT32_MAX_LT_INTMAX_MAX=1;
20882 INT64_MAX_EQ_LONG_MAX='defined _LP64';
20883 PRI_MACROS_BROKEN=0;
20884 PRIPTR_PREFIX=__PRIPTR_PREFIX;
20885 UINT32_MAX_LT_UINTMAX_MAX=1;
20886 UINT64_MAX_EQ_ULONG_MAX='defined _LP64';
1fd182f0 20887
1fd182f0 20888
1f5d53eb 20889
3e0be4ab
GM
20890
20891
1fd182f0 20892
3e0be4ab 20893
3e0be4ab 20894
f199cab1 20895
1fd182f0 20896
1f5d53eb 20897
1f5d53eb 20898
1f5d53eb 20899
3e0be4ab 20900
3e0be4ab 20901
5476a9a4
GM
20902 if test $gl_cv_have_include_next = yes; then
20903 gl_cv_next_inttypes_h='<'inttypes.h'>'
20904 else
20905 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
20906$as_echo_n "checking absolute name of <inttypes.h>... " >&6; }
20907if test "${gl_cv_next_inttypes_h+set}" = set; then :
20908 $as_echo_n "(cached) " >&6
f199cab1 20909else
2b1928b8 20910
5476a9a4 20911 if test $ac_cv_header_inttypes_h = yes; then
3e0be4ab
GM
20912
20913
5476a9a4 20914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 20915/* end confdefs.h. */
5476a9a4 20916#include <inttypes.h>
3e0be4ab 20917
f199cab1 20918_ACEOF
5476a9a4
GM
20919 case "$host_os" in
20920 aix*) gl_absname_cpp="$ac_cpp -C" ;;
20921 *) gl_absname_cpp="$ac_cpp" ;;
20922 esac
1fd182f0 20923
5476a9a4
GM
20924 case "$host_os" in
20925 mingw*)
20926 gl_dirsep_regex='[/\\]'
20927 ;;
20928 *)
20929 gl_dirsep_regex='\/'
20930 ;;
20931 esac
20932 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
1fd182f0 20933
5476a9a4
GM
20934 gl_header_literal_regex=`echo 'inttypes.h' \
20935 | sed -e "$gl_make_literal_regex_sed"`
20936 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20937 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20938 s|^/[^/]|//&|
20939 p
20940 q
20941 }'
20942 gl_cv_next_inttypes_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20943 sed -n "$gl_absolute_header_sed"`'"'
20944 else
20945 gl_cv_next_inttypes_h='<'inttypes.h'>'
20946 fi
1fd182f0
PE
20947
20948
5476a9a4
GM
20949fi
20950{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
20951$as_echo "$gl_cv_next_inttypes_h" >&6; }
20952 fi
20953 NEXT_INTTYPES_H=$gl_cv_next_inttypes_h
1fd182f0 20954
5476a9a4
GM
20955 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20956 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20957 gl_next_as_first_directive='<'inttypes.h'>'
20958 else
20959 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20960 gl_next_as_first_directive=$gl_cv_next_inttypes_h
20961 fi
20962 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
34119902
GM
20963
20964
3e0be4ab 20965
34119902 20966
3e0be4ab 20967
34119902 20968
b0415a03 20969
b0415a03 20970
3e0be4ab 20971
34119902 20972
34119902 20973
5476a9a4
GM
20974 case "$host_os" in
20975 mingw*)
20976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
20977$as_echo_n "checking for 64-bit off_t... " >&6; }
20978if test "${gl_cv_type_off_t_64+set}" = set; then :
f199cab1
GM
20979 $as_echo_n "(cached) " >&6
20980else
5476a9a4
GM
20981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20982/* end confdefs.h. */
20983#include <sys/types.h>
20984 int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
20985
20986int
20987main ()
20988{
20989
20990 ;
20991 return 0;
20992}
f199cab1 20993_ACEOF
5476a9a4
GM
20994if ac_fn_c_try_compile "$LINENO"; then :
20995 gl_cv_type_off_t_64=yes
20996else
20997 gl_cv_type_off_t_64=no
f199cab1 20998fi
5476a9a4 20999rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34119902 21000
5476a9a4
GM
21001fi
21002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
21003$as_echo "$gl_cv_type_off_t_64" >&6; }
21004 if test $gl_cv_type_off_t_64 = no; then
21005 WINDOWS_64_BIT_OFF_T=1
21006 else
21007 WINDOWS_64_BIT_OFF_T=0
21008 fi
21009 WINDOWS_64_BIT_ST_SIZE=1
21010 ;;
21011 *)
21012 WINDOWS_64_BIT_OFF_T=0
21013 WINDOWS_64_BIT_ST_SIZE=0
21014 ;;
21015 esac
34119902
GM
21016
21017
34119902
GM
21018
21019
283c7aed
GM
21020 GNULIB_FFSL=0;
21021 GNULIB_FFSLL=0;
21022 GNULIB_MEMCHR=0;
21023 GNULIB_MEMMEM=0;
21024 GNULIB_MEMPCPY=0;
21025 GNULIB_MEMRCHR=0;
21026 GNULIB_RAWMEMCHR=0;
21027 GNULIB_STPCPY=0;
21028 GNULIB_STPNCPY=0;
21029 GNULIB_STRCHRNUL=0;
21030 GNULIB_STRDUP=0;
21031 GNULIB_STRNCAT=0;
21032 GNULIB_STRNDUP=0;
21033 GNULIB_STRNLEN=0;
21034 GNULIB_STRPBRK=0;
21035 GNULIB_STRSEP=0;
21036 GNULIB_STRSTR=0;
21037 GNULIB_STRCASESTR=0;
21038 GNULIB_STRTOK_R=0;
21039 GNULIB_MBSLEN=0;
21040 GNULIB_MBSNLEN=0;
21041 GNULIB_MBSCHR=0;
21042 GNULIB_MBSRCHR=0;
21043 GNULIB_MBSSTR=0;
21044 GNULIB_MBSCASECMP=0;
21045 GNULIB_MBSNCASECMP=0;
21046 GNULIB_MBSPCASECMP=0;
21047 GNULIB_MBSCASESTR=0;
21048 GNULIB_MBSCSPN=0;
21049 GNULIB_MBSPBRK=0;
21050 GNULIB_MBSSPN=0;
21051 GNULIB_MBSSEP=0;
21052 GNULIB_MBSTOK_R=0;
21053 GNULIB_STRERROR=0;
21054 GNULIB_STRERROR_R=0;
21055 GNULIB_STRSIGNAL=0;
21056 GNULIB_STRVERSCMP=0;
21057 HAVE_MBSLEN=0;
21058 HAVE_FFSL=1;
21059 HAVE_FFSLL=1;
21060 HAVE_MEMCHR=1;
21061 HAVE_DECL_MEMMEM=1;
21062 HAVE_MEMPCPY=1;
21063 HAVE_DECL_MEMRCHR=1;
21064 HAVE_RAWMEMCHR=1;
21065 HAVE_STPCPY=1;
21066 HAVE_STPNCPY=1;
21067 HAVE_STRCHRNUL=1;
21068 HAVE_DECL_STRDUP=1;
21069 HAVE_DECL_STRNDUP=1;
21070 HAVE_DECL_STRNLEN=1;
21071 HAVE_STRPBRK=1;
21072 HAVE_STRSEP=1;
21073 HAVE_STRCASESTR=1;
21074 HAVE_DECL_STRTOK_R=1;
21075 HAVE_DECL_STRERROR_R=1;
21076 HAVE_DECL_STRSIGNAL=1;
21077 HAVE_STRVERSCMP=1;
21078 REPLACE_MEMCHR=0;
21079 REPLACE_MEMMEM=0;
21080 REPLACE_STPNCPY=0;
21081 REPLACE_STRDUP=0;
21082 REPLACE_STRSTR=0;
21083 REPLACE_STRCASESTR=0;
21084 REPLACE_STRCHRNUL=0;
21085 REPLACE_STRERROR=0;
21086 REPLACE_STRERROR_R=0;
21087 REPLACE_STRNCAT=0;
21088 REPLACE_STRNDUP=0;
21089 REPLACE_STRNLEN=0;
21090 REPLACE_STRSIGNAL=0;
21091 REPLACE_STRTOK_R=0;
21092 UNDEFINE_STRTOK_R=0;
21093
21094ac_fn_c_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default"
21095if test "x$ac_cv_have_decl_memrchr" = x""yes; then :
21096 ac_have_decl=1
21097else
21098 ac_have_decl=0
21099fi
21100
21101cat >>confdefs.h <<_ACEOF
21102#define HAVE_DECL_MEMRCHR $ac_have_decl
21103_ACEOF
21104
21105
e412eb97
GM
21106
21107
5476a9a4
GM
21108 GNULIB_MKTIME=0;
21109 GNULIB_NANOSLEEP=0;
21110 GNULIB_STRPTIME=0;
21111 GNULIB_TIMEGM=0;
21112 GNULIB_TIME_R=0;
21113 HAVE_DECL_LOCALTIME_R=1;
21114 HAVE_NANOSLEEP=1;
21115 HAVE_STRPTIME=1;
21116 HAVE_TIMEGM=1;
21117 REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
21118 REPLACE_MKTIME=GNULIB_PORTCHECK;
21119 REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
21120 REPLACE_TIMEGM=GNULIB_PORTCHECK;
34119902 21121
2393bc74
GM
21122ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default"
21123if test "x$ac_cv_have_decl_alarm" = x""yes; then :
21124 ac_have_decl=1
21125else
21126 ac_have_decl=0
21127fi
3e0be4ab 21128
2393bc74
GM
21129cat >>confdefs.h <<_ACEOF
21130#define HAVE_DECL_ALARM $ac_have_decl
21131_ACEOF
3e0be4ab
GM
21132
21133
0cdca42a
GM
21134
21135
5476a9a4
GM
21136 GNULIB_PSELECT=0;
21137 GNULIB_SELECT=0;
21138 HAVE_PSELECT=1;
21139 REPLACE_PSELECT=0;
21140 REPLACE_SELECT=0;
21141
21142
3e0be4ab 21143
5476a9a4
GM
21144
21145
21146
21147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/select.h> is self-contained" >&5
21148$as_echo_n "checking whether <sys/select.h> is self-contained... " >&6; }
21149if test "${gl_cv_header_sys_select_h_selfcontained+set}" = set; then :
f199cab1 21150 $as_echo_n "(cached) " >&6
3e0be4ab 21151else
5476a9a4
GM
21152
21153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3e0be4ab 21154/* end confdefs.h. */
5476a9a4 21155#include <sys/select.h>
3e0be4ab
GM
21156int
21157main ()
21158{
5476a9a4 21159struct timeval b;
3e0be4ab
GM
21160 ;
21161 return 0;
21162}
34119902 21163_ACEOF
f199cab1 21164if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4 21165 gl_cv_header_sys_select_h_selfcontained=yes
3e0be4ab 21166else
5476a9a4 21167 gl_cv_header_sys_select_h_selfcontained=no
3e0be4ab 21168fi
f199cab1 21169rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5476a9a4
GM
21170 if test $gl_cv_header_sys_select_h_selfcontained = yes; then
21171 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21172/* end confdefs.h. */
21173#include <sys/select.h>
21174int
21175main ()
21176{
21177int memset; int bzero;
21178 ;
21179 return 0;
21180}
3e0be4ab 21181
5476a9a4
GM
21182_ACEOF
21183if ac_fn_c_try_compile "$LINENO"; then :
f199cab1
GM
21184 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21185/* end confdefs.h. */
5476a9a4 21186#include <sys/select.h>
f199cab1
GM
21187int
21188main ()
21189{
5476a9a4
GM
21190
21191 #undef memset
21192 #define memset nonexistent_memset
21193 extern
21194 #ifdef __cplusplus
21195 "C"
21196 #endif
21197 void *memset (void *, int, unsigned long);
21198 #undef bzero
21199 #define bzero nonexistent_bzero
21200 extern
21201 #ifdef __cplusplus
21202 "C"
21203 #endif
21204 void bzero (void *, unsigned long);
21205 fd_set fds;
21206 FD_ZERO (&fds);
21207
f199cab1
GM
21208 ;
21209 return 0;
21210}
5476a9a4 21211
f199cab1 21212_ACEOF
5476a9a4
GM
21213if ac_fn_c_try_link "$LINENO"; then :
21214
f199cab1 21215else
5476a9a4 21216 gl_cv_header_sys_select_h_selfcontained=no
f199cab1 21217fi
5476a9a4
GM
21218rm -f core conftest.err conftest.$ac_objext \
21219 conftest$ac_exeext conftest.$ac_ext
1fd182f0 21220
f199cab1 21221fi
5476a9a4
GM
21222rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21223 fi
1fd182f0 21224
f199cab1 21225fi
5476a9a4
GM
21226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_select_h_selfcontained" >&5
21227$as_echo "$gl_cv_header_sys_select_h_selfcontained" >&6; }
1fd182f0
PE
21228
21229
b06b1098 21230
0eb775a3
GM
21231
21232
b06b1098 21233
1fd182f0 21234
1fd182f0 21235
5476a9a4
GM
21236
21237 if test $gl_cv_have_include_next = yes; then
21238 gl_cv_next_sys_select_h='<'sys/select.h'>'
21239 else
21240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/select.h>" >&5
21241$as_echo_n "checking absolute name of <sys/select.h>... " >&6; }
21242if test "${gl_cv_next_sys_select_h+set}" = set; then :
f199cab1 21243 $as_echo_n "(cached) " >&6
3e0be4ab 21244else
1fd182f0 21245
5476a9a4
GM
21246 if test $ac_cv_header_sys_select_h = yes; then
21247
21248
21249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21250/* end confdefs.h. */
21251#include <sys/select.h>
21252
21253_ACEOF
21254 case "$host_os" in
21255 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21256 *) gl_absname_cpp="$ac_cpp" ;;
21257 esac
21258
21259 case "$host_os" in
21260 mingw*)
21261 gl_dirsep_regex='[/\\]'
21262 ;;
21263 *)
21264 gl_dirsep_regex='\/'
21265 ;;
21266 esac
21267 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21268
21269 gl_header_literal_regex=`echo 'sys/select.h' \
21270 | sed -e "$gl_make_literal_regex_sed"`
21271 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21272 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21273 s|^/[^/]|//&|
21274 p
21275 q
21276 }'
21277 gl_cv_next_sys_select_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21278 sed -n "$gl_absolute_header_sed"`'"'
21279 else
21280 gl_cv_next_sys_select_h='<'sys/select.h'>'
21281 fi
1fd182f0 21282
3e0be4ab 21283
1f5d53eb 21284fi
5476a9a4
GM
21285{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_select_h" >&5
21286$as_echo "$gl_cv_next_sys_select_h" >&6; }
21287 fi
21288 NEXT_SYS_SELECT_H=$gl_cv_next_sys_select_h
1fd182f0 21289
5476a9a4
GM
21290 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21291 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21292 gl_next_as_first_directive='<'sys/select.h'>'
21293 else
21294 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21295 gl_next_as_first_directive=$gl_cv_next_sys_select_h
21296 fi
21297 NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H=$gl_next_as_first_directive
1fd182f0
PE
21298
21299
5476a9a4
GM
21300
21301
21302 if test $ac_cv_header_sys_select_h = yes; then
21303 HAVE_SYS_SELECT_H=1
21304 else
21305 HAVE_SYS_SELECT_H=0
21306 fi
21307
21308
21309
21310
21311
21312 if test $ac_cv_header_sys_socket_h != yes; then
21313 for ac_header in winsock2.h
21314do :
21315 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
21316if test "x$ac_cv_header_winsock2_h" = x""yes; then :
21317 cat >>confdefs.h <<_ACEOF
21318#define HAVE_WINSOCK2_H 1
f199cab1 21319_ACEOF
5476a9a4 21320
f199cab1 21321fi
3e0be4ab 21322
5476a9a4 21323done
3e0be4ab 21324
5476a9a4
GM
21325 fi
21326 if test "$ac_cv_header_winsock2_h" = yes; then
21327 HAVE_WINSOCK2_H=1
21328 UNISTD_H_HAVE_WINSOCK2_H=1
21329 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
21330 else
21331 HAVE_WINSOCK2_H=0
21332 fi
f199cab1 21333
f199cab1 21334
f199cab1 21335
f199cab1 21336
3e0be4ab 21337
3e0be4ab 21338
3e0be4ab 21339
3e0be4ab 21340
5476a9a4
GM
21341 GNULIB_PTHREAD_SIGMASK=0;
21342 GNULIB_RAISE=0;
21343 GNULIB_SIGNAL_H_SIGPIPE=0;
21344 GNULIB_SIGPROCMASK=0;
21345 GNULIB_SIGACTION=0;
21346 HAVE_POSIX_SIGNALBLOCKING=1;
21347 HAVE_PTHREAD_SIGMASK=1;
21348 HAVE_RAISE=1;
21349 HAVE_SIGSET_T=1;
21350 HAVE_SIGINFO_T=1;
21351 HAVE_SIGACTION=1;
21352 HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
21353
21354 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
f199cab1 21355
5476a9a4
GM
21356 HAVE_SIGHANDLER_T=1;
21357 REPLACE_PTHREAD_SIGMASK=0;
21358 REPLACE_RAISE=0;
1f5d53eb 21359
1fd182f0 21360
b06b1098 21361
1fd182f0 21362
3e0be4ab
GM
21363
21364
f077f61d 21365
5476a9a4
GM
21366 ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
21367 #include <signal.h>
21368 /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
21369 #include <sys/types.h>
21370
21371"
21372if test "x$ac_cv_type_sigset_t" = x""yes; then :
21373
21374cat >>confdefs.h <<_ACEOF
21375#define HAVE_SIGSET_T 1
f199cab1 21376_ACEOF
3e0be4ab 21377
5476a9a4
GM
21378gl_cv_type_sigset_t=yes
21379else
21380 gl_cv_type_sigset_t=no
f199cab1 21381fi
3e0be4ab 21382
5476a9a4
GM
21383 if test $gl_cv_type_sigset_t != yes; then
21384 HAVE_SIGSET_T=0
21385 fi
3e0be4ab 21386
1f5d53eb 21387
3e0be4ab 21388
5476a9a4
GM
21389 if test $ac_cv_header_sys_socket_h = no; then
21390 for ac_header in ws2tcpip.h
21391do :
21392 ac_fn_c_check_header_mongrel "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default"
21393if test "x$ac_cv_header_ws2tcpip_h" = x""yes; then :
21394 cat >>confdefs.h <<_ACEOF
21395#define HAVE_WS2TCPIP_H 1
21396_ACEOF
3e0be4ab 21397
5476a9a4 21398fi
3e0be4ab 21399
5476a9a4
GM
21400done
21401
21402 fi
21403
21404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
21405$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
21406if test "${ac_cv_header_stdbool_h+set}" = set; then :
21407 $as_echo_n "(cached) " >&6
21408else
21409 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21410/* end confdefs.h. */
1f5d53eb 21411
5476a9a4
GM
21412 #include <stdbool.h>
21413 #ifndef bool
21414 "error: bool is not defined"
21415 #endif
21416 #ifndef false
21417 "error: false is not defined"
21418 #endif
21419 #if false
21420 "error: false is not 0"
21421 #endif
21422 #ifndef true
21423 "error: true is not defined"
21424 #endif
21425 #if true != 1
21426 "error: true is not 1"
21427 #endif
21428 #ifndef __bool_true_false_are_defined
21429 "error: __bool_true_false_are_defined is not defined"
21430 #endif
21431
21432 struct s { _Bool s: 1; _Bool t; } s;
21433
21434 char a[true == 1 ? 1 : -1];
21435 char b[false == 0 ? 1 : -1];
21436 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
21437 char d[(bool) 0.5 == true ? 1 : -1];
21438 /* See body of main program for 'e'. */
21439 char f[(_Bool) 0.0 == false ? 1 : -1];
21440 char g[true];
21441 char h[sizeof (_Bool)];
21442 char i[sizeof s.t];
21443 enum { j = false, k = true, l = false * true, m = true * 256 };
21444 /* The following fails for
21445 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
21446 _Bool n[m];
21447 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
21448 char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
21449 /* Catch a bug in an HP-UX C compiler. See
21450 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
21451 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
21452 */
21453 _Bool q = true;
21454 _Bool *pq = &q;
1ebc9c87
GM
21455
21456int
21457main ()
21458{
f199cab1 21459
5476a9a4
GM
21460 bool e = &s;
21461 *pq |= q;
21462 *pq |= ! q;
21463 /* Refer to every declared value, to avoid compiler optimizations. */
21464 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
21465 + !m + !n + !o + !p + !q + !pq);
f199cab1 21466
5476a9a4 21467 ;
1ebc9c87
GM
21468 return 0;
21469}
21470_ACEOF
5476a9a4
GM
21471if ac_fn_c_try_compile "$LINENO"; then :
21472 ac_cv_header_stdbool_h=yes
1ebc9c87 21473else
5476a9a4 21474 ac_cv_header_stdbool_h=no
1ebc9c87 21475fi
5476a9a4 21476rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1ebc9c87 21477fi
5476a9a4
GM
21478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
21479$as_echo "$ac_cv_header_stdbool_h" >&6; }
21480 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
21481if test "x$ac_cv_type__Bool" = x""yes; then :
1ebc9c87 21482
5476a9a4
GM
21483cat >>confdefs.h <<_ACEOF
21484#define HAVE__BOOL 1
21485_ACEOF
1ebc9c87 21486
1ebc9c87
GM
21487
21488fi
21489
1ebc9c87 21490
1ebc9c87 21491
5476a9a4
GM
21492 REPLACE_NULL=0;
21493 HAVE_WCHAR_T=1;
21494
21495
21496 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
21497$as_echo_n "checking for wchar_t... " >&6; }
21498if test "${gt_cv_c_wchar_t+set}" = set; then :
21499 $as_echo_n "(cached) " >&6
21500else
21501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21502/* end confdefs.h. */
21503#include <stddef.h>
21504 wchar_t foo = (wchar_t)'\0';
21505int
21506main ()
21507{
21508
21509 ;
21510 return 0;
21511}
21512_ACEOF
21513if ac_fn_c_try_compile "$LINENO"; then :
21514 gt_cv_c_wchar_t=yes
21515else
21516 gt_cv_c_wchar_t=no
21517fi
21518rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1ebc9c87 21519fi
5476a9a4
GM
21520{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
21521$as_echo "$gt_cv_c_wchar_t" >&6; }
21522 if test $gt_cv_c_wchar_t = yes; then
1ebc9c87 21523
5476a9a4
GM
21524$as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
21525
21526 fi
21527
21528
21529 GNULIB_DPRINTF=0;
21530 GNULIB_FCLOSE=0;
21531 GNULIB_FDOPEN=0;
21532 GNULIB_FFLUSH=0;
21533 GNULIB_FGETC=0;
21534 GNULIB_FGETS=0;
21535 GNULIB_FOPEN=0;
21536 GNULIB_FPRINTF=0;
21537 GNULIB_FPRINTF_POSIX=0;
21538 GNULIB_FPURGE=0;
21539 GNULIB_FPUTC=0;
21540 GNULIB_FPUTS=0;
21541 GNULIB_FREAD=0;
21542 GNULIB_FREOPEN=0;
21543 GNULIB_FSCANF=0;
21544 GNULIB_FSEEK=0;
21545 GNULIB_FSEEKO=0;
21546 GNULIB_FTELL=0;
21547 GNULIB_FTELLO=0;
21548 GNULIB_FWRITE=0;
21549 GNULIB_GETC=0;
21550 GNULIB_GETCHAR=0;
21551 GNULIB_GETDELIM=0;
21552 GNULIB_GETLINE=0;
21553 GNULIB_OBSTACK_PRINTF=0;
21554 GNULIB_OBSTACK_PRINTF_POSIX=0;
21555 GNULIB_PCLOSE=0;
21556 GNULIB_PERROR=0;
21557 GNULIB_POPEN=0;
21558 GNULIB_PRINTF=0;
21559 GNULIB_PRINTF_POSIX=0;
21560 GNULIB_PUTC=0;
21561 GNULIB_PUTCHAR=0;
21562 GNULIB_PUTS=0;
21563 GNULIB_REMOVE=0;
21564 GNULIB_RENAME=0;
21565 GNULIB_RENAMEAT=0;
21566 GNULIB_SCANF=0;
21567 GNULIB_SNPRINTF=0;
21568 GNULIB_SPRINTF_POSIX=0;
21569 GNULIB_STDIO_H_NONBLOCKING=0;
21570 GNULIB_STDIO_H_SIGPIPE=0;
21571 GNULIB_TMPFILE=0;
21572 GNULIB_VASPRINTF=0;
21573 GNULIB_VFSCANF=0;
21574 GNULIB_VSCANF=0;
21575 GNULIB_VDPRINTF=0;
21576 GNULIB_VFPRINTF=0;
21577 GNULIB_VFPRINTF_POSIX=0;
21578 GNULIB_VPRINTF=0;
21579 GNULIB_VPRINTF_POSIX=0;
21580 GNULIB_VSNPRINTF=0;
21581 GNULIB_VSPRINTF_POSIX=0;
21582 HAVE_DECL_FPURGE=1;
21583 HAVE_DECL_FSEEKO=1;
21584 HAVE_DECL_FTELLO=1;
21585 HAVE_DECL_GETDELIM=1;
21586 HAVE_DECL_GETLINE=1;
21587 HAVE_DECL_OBSTACK_PRINTF=1;
21588 HAVE_DECL_SNPRINTF=1;
21589 HAVE_DECL_VSNPRINTF=1;
21590 HAVE_DPRINTF=1;
21591 HAVE_FSEEKO=1;
21592 HAVE_FTELLO=1;
21593 HAVE_PCLOSE=1;
21594 HAVE_POPEN=1;
21595 HAVE_RENAMEAT=1;
21596 HAVE_VASPRINTF=1;
21597 HAVE_VDPRINTF=1;
21598 REPLACE_DPRINTF=0;
21599 REPLACE_FCLOSE=0;
21600 REPLACE_FDOPEN=0;
21601 REPLACE_FFLUSH=0;
21602 REPLACE_FOPEN=0;
21603 REPLACE_FPRINTF=0;
21604 REPLACE_FPURGE=0;
21605 REPLACE_FREOPEN=0;
21606 REPLACE_FSEEK=0;
21607 REPLACE_FSEEKO=0;
21608 REPLACE_FTELL=0;
21609 REPLACE_FTELLO=0;
21610 REPLACE_GETDELIM=0;
21611 REPLACE_GETLINE=0;
21612 REPLACE_OBSTACK_PRINTF=0;
21613 REPLACE_PERROR=0;
21614 REPLACE_POPEN=0;
21615 REPLACE_PRINTF=0;
21616 REPLACE_REMOVE=0;
21617 REPLACE_RENAME=0;
21618 REPLACE_RENAMEAT=0;
21619 REPLACE_SNPRINTF=0;
21620 REPLACE_SPRINTF=0;
21621 REPLACE_STDIO_READ_FUNCS=0;
21622 REPLACE_STDIO_WRITE_FUNCS=0;
21623 REPLACE_TMPFILE=0;
21624 REPLACE_VASPRINTF=0;
21625 REPLACE_VDPRINTF=0;
21626 REPLACE_VFPRINTF=0;
21627 REPLACE_VPRINTF=0;
21628 REPLACE_VSNPRINTF=0;
21629 REPLACE_VSPRINTF=0;
1ebc9c87 21630
5476a9a4
GM
21631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
21632$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
21633if test "${ac_cv_struct_tm+set}" = set; then :
1ebc9c87
GM
21634 $as_echo_n "(cached) " >&6
21635else
5476a9a4 21636 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1ebc9c87 21637/* end confdefs.h. */
5476a9a4
GM
21638#include <sys/types.h>
21639#include <time.h>
1ebc9c87
GM
21640
21641int
21642main ()
21643{
5476a9a4
GM
21644struct tm tm;
21645 int *p = &tm.tm_sec;
21646 return !p;
1ebc9c87
GM
21647 ;
21648 return 0;
21649}
21650_ACEOF
5476a9a4
GM
21651if ac_fn_c_try_compile "$LINENO"; then :
21652 ac_cv_struct_tm=time.h
1ebc9c87 21653else
5476a9a4 21654 ac_cv_struct_tm=sys/time.h
1ebc9c87 21655fi
5476a9a4 21656rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1ebc9c87 21657fi
5476a9a4
GM
21658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
21659$as_echo "$ac_cv_struct_tm" >&6; }
21660if test $ac_cv_struct_tm = sys/time.h; then
1ebc9c87 21661
5476a9a4 21662$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
1ebc9c87 21663
1ebc9c87
GM
21664fi
21665
5476a9a4
GM
21666ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
21667#include <$ac_cv_struct_tm>
1fd182f0 21668
5476a9a4
GM
21669"
21670if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
1fd182f0 21671
5476a9a4
GM
21672cat >>confdefs.h <<_ACEOF
21673#define HAVE_STRUCT_TM_TM_ZONE 1
f199cab1 21674_ACEOF
5476a9a4
GM
21675
21676
1f5d53eb 21677fi
1fd182f0 21678
5476a9a4 21679if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
1f5d53eb 21680
5476a9a4 21681$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
1fd182f0 21682
5476a9a4
GM
21683else
21684 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
21685"
21686if test "x$ac_cv_have_decl_tzname" = x""yes; then :
21687 ac_have_decl=1
21688else
21689 ac_have_decl=0
21690fi
1fd182f0 21691
5476a9a4
GM
21692cat >>confdefs.h <<_ACEOF
21693#define HAVE_DECL_TZNAME $ac_have_decl
21694_ACEOF
f199cab1 21695
5476a9a4
GM
21696 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
21697$as_echo_n "checking for tzname... " >&6; }
21698if test "${ac_cv_var_tzname+set}" = set; then :
f199cab1 21699 $as_echo_n "(cached) " >&6
3e0be4ab 21700else
5476a9a4 21701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 21702/* end confdefs.h. */
5476a9a4
GM
21703#include <time.h>
21704#if !HAVE_DECL_TZNAME
21705extern char *tzname[];
f199cab1 21706#endif
5476a9a4 21707
f199cab1
GM
21708int
21709main ()
21710{
5476a9a4 21711return tzname[0][0];
f199cab1
GM
21712 ;
21713 return 0;
21714}
3e0be4ab 21715_ACEOF
f199cab1 21716if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 21717 ac_cv_var_tzname=yes
3e0be4ab 21718else
5476a9a4 21719 ac_cv_var_tzname=no
f199cab1
GM
21720fi
21721rm -f core conftest.err conftest.$ac_objext \
21722 conftest$ac_exeext conftest.$ac_ext
f199cab1 21723fi
5476a9a4
GM
21724{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
21725$as_echo "$ac_cv_var_tzname" >&6; }
21726 if test $ac_cv_var_tzname = yes; then
21727
21728$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
f199cab1 21729
5476a9a4 21730 fi
3e0be4ab 21731fi
cc322c06 21732
5476a9a4
GM
21733
21734 ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include <time.h>
21735"
21736if test "x$ac_cv_member_struct_tm_tm_gmtoff" = x""yes; then :
21737
21738$as_echo "#define HAVE_TM_GMTOFF 1" >>confdefs.h
cc322c06 21739
f199cab1 21740fi
cc322c06 21741
1f5d53eb 21742
e275c824 21743
5476a9a4 21744
283c7aed
GM
21745
21746
21747
21748
21749
21750
21751
21752
21753
21754 if test $gl_cv_have_include_next = yes; then
21755 gl_cv_next_string_h='<'string.h'>'
21756 else
21757 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
21758$as_echo_n "checking absolute name of <string.h>... " >&6; }
21759if test "${gl_cv_next_string_h+set}" = set; then :
21760 $as_echo_n "(cached) " >&6
21761else
21762
21763 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21764/* end confdefs.h. */
21765#include <string.h>
21766
21767_ACEOF
21768 case "$host_os" in
21769 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21770 *) gl_absname_cpp="$ac_cpp" ;;
21771 esac
21772
21773 case "$host_os" in
21774 mingw*)
21775 gl_dirsep_regex='[/\\]'
21776 ;;
21777 *)
21778 gl_dirsep_regex='\/'
21779 ;;
21780 esac
21781 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21782
21783 gl_header_literal_regex=`echo 'string.h' \
21784 | sed -e "$gl_make_literal_regex_sed"`
21785 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21786 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21787 s|^/[^/]|//&|
21788 p
21789 q
21790 }'
21791 gl_cv_next_string_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21792 sed -n "$gl_absolute_header_sed"`'"'
21793
21794
21795fi
21796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
21797$as_echo "$gl_cv_next_string_h" >&6; }
21798 fi
21799 NEXT_STRING_H=$gl_cv_next_string_h
21800
21801 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21802 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21803 gl_next_as_first_directive='<'string.h'>'
21804 else
21805 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21806 gl_next_as_first_directive=$gl_cv_next_string_h
21807 fi
21808 NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
21809
21810
21811
21812
21813
21814
21815
21816
21817
5476a9a4
GM
21818ac_fn_c_check_decl "$LINENO" "strtoimax" "ac_cv_have_decl_strtoimax" "$ac_includes_default"
21819if test "x$ac_cv_have_decl_strtoimax" = x""yes; then :
21820 ac_have_decl=1
3e0be4ab 21821else
5476a9a4 21822 ac_have_decl=0
3e0be4ab 21823fi
5476a9a4
GM
21824
21825cat >>confdefs.h <<_ACEOF
21826#define HAVE_DECL_STRTOIMAX $ac_have_decl
f199cab1 21827_ACEOF
e275c824
PE
21828
21829
5476a9a4
GM
21830
21831ac_fn_c_check_decl "$LINENO" "strtoumax" "ac_cv_have_decl_strtoumax" "$ac_includes_default"
21832if test "x$ac_cv_have_decl_strtoumax" = x""yes; then :
21833 ac_have_decl=1
21834else
21835 ac_have_decl=0
3e0be4ab 21836fi
e275c824 21837
5476a9a4
GM
21838cat >>confdefs.h <<_ACEOF
21839#define HAVE_DECL_STRTOUMAX $ac_have_decl
21840_ACEOF
e275c824
PE
21841
21842
2b1928b8 21843
5476a9a4
GM
21844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
21845$as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
21846if test "${ac_cv_header_stat_broken+set}" = set; then :
f199cab1 21847 $as_echo_n "(cached) " >&6
2b1928b8 21848else
5476a9a4
GM
21849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21850/* end confdefs.h. */
21851#include <sys/types.h>
21852#include <sys/stat.h>
2b1928b8 21853
5476a9a4
GM
21854#if defined S_ISBLK && defined S_IFDIR
21855extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
21856#endif
2b1928b8 21857
5476a9a4
GM
21858#if defined S_ISBLK && defined S_IFCHR
21859extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
21860#endif
0eb775a3 21861
5476a9a4
GM
21862#if defined S_ISLNK && defined S_IFREG
21863extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
21864#endif
21865
21866#if defined S_ISSOCK && defined S_IFREG
21867extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
21868#endif
0eb775a3 21869
5476a9a4
GM
21870_ACEOF
21871if ac_fn_c_try_compile "$LINENO"; then :
21872 ac_cv_header_stat_broken=no
f199cab1 21873else
5476a9a4 21874 ac_cv_header_stat_broken=yes
f199cab1 21875fi
5476a9a4 21876rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 21877fi
5476a9a4
GM
21878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
21879$as_echo "$ac_cv_header_stat_broken" >&6; }
21880if test $ac_cv_header_stat_broken = yes; then
0eb775a3 21881
5476a9a4 21882$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
0eb775a3 21883
5476a9a4 21884fi
0eb775a3
GM
21885
21886
21887
5476a9a4
GM
21888
21889
21890 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
21891$as_echo_n "checking for struct timespec in <time.h>... " >&6; }
21892if test "${gl_cv_sys_struct_timespec_in_time_h+set}" = set; then :
21893 $as_echo_n "(cached) " >&6
21894else
21895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3e0be4ab 21896/* end confdefs.h. */
5476a9a4 21897#include <time.h>
52724a05 21898
3e0be4ab
GM
21899int
21900main ()
21901{
5476a9a4 21902static struct timespec x; x.tv_sec = x.tv_nsec;
3e0be4ab
GM
21903 ;
21904 return 0;
21905}
21906_ACEOF
5476a9a4
GM
21907if ac_fn_c_try_compile "$LINENO"; then :
21908 gl_cv_sys_struct_timespec_in_time_h=yes
3e0be4ab 21909else
5476a9a4 21910 gl_cv_sys_struct_timespec_in_time_h=no
3e0be4ab 21911fi
5476a9a4
GM
21912rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21913fi
21914{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
21915$as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
52724a05 21916
5476a9a4
GM
21917 TIME_H_DEFINES_STRUCT_TIMESPEC=0
21918 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
21919 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
21920 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
21921 TIME_H_DEFINES_STRUCT_TIMESPEC=1
21922 else
21923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
21924$as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
21925if test "${gl_cv_sys_struct_timespec_in_sys_time_h+set}" = set; then :
21926 $as_echo_n "(cached) " >&6
21927else
3e0be4ab
GM
21928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21929/* end confdefs.h. */
5476a9a4
GM
21930#include <sys/time.h>
21931
3e0be4ab
GM
21932int
21933main ()
21934{
5476a9a4 21935static struct timespec x; x.tv_sec = x.tv_nsec;
3e0be4ab
GM
21936 ;
21937 return 0;
21938}
21939_ACEOF
5476a9a4
GM
21940if ac_fn_c_try_compile "$LINENO"; then :
21941 gl_cv_sys_struct_timespec_in_sys_time_h=yes
3e0be4ab 21942else
5476a9a4 21943 gl_cv_sys_struct_timespec_in_sys_time_h=no
3e0be4ab 21944fi
5476a9a4 21945rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 21946fi
5476a9a4
GM
21947{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
21948$as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
21949 if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
21950 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
21951 else
21952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
21953$as_echo_n "checking for struct timespec in <pthread.h>... " >&6; }
21954if test "${gl_cv_sys_struct_timespec_in_pthread_h+set}" = set; then :
3e0be4ab
GM
21955 $as_echo_n "(cached) " >&6
21956else
21957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21958/* end confdefs.h. */
5476a9a4
GM
21959#include <pthread.h>
21960
3e0be4ab
GM
21961int
21962main ()
21963{
5476a9a4 21964static struct timespec x; x.tv_sec = x.tv_nsec;
3e0be4ab
GM
21965 ;
21966 return 0;
21967}
21968_ACEOF
5476a9a4
GM
21969if ac_fn_c_try_compile "$LINENO"; then :
21970 gl_cv_sys_struct_timespec_in_pthread_h=yes
3e0be4ab 21971else
5476a9a4 21972 gl_cv_sys_struct_timespec_in_pthread_h=no
3e0be4ab 21973fi
5476a9a4 21974rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3e0be4ab 21975fi
5476a9a4
GM
21976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
21977$as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
21978 if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
21979 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
21980 fi
21981 fi
f199cab1 21982 fi
e275c824
PE
21983
21984
b0415a03 21985
b0415a03 21986
e275c824 21987
e275c824
PE
21988
21989
f199cab1 21990
e275c824
PE
21991
21992
21993
21994
21995
21996
21997
5476a9a4
GM
21998 if test $gl_cv_have_include_next = yes; then
21999 gl_cv_next_time_h='<'time.h'>'
22000 else
22001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
22002$as_echo_n "checking absolute name of <time.h>... " >&6; }
22003if test "${gl_cv_next_time_h+set}" = set; then :
22004 $as_echo_n "(cached) " >&6
22005else
e275c824 22006
5476a9a4
GM
22007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22008/* end confdefs.h. */
22009#include <time.h>
e275c824 22010
5476a9a4
GM
22011_ACEOF
22012 case "$host_os" in
22013 aix*) gl_absname_cpp="$ac_cpp -C" ;;
22014 *) gl_absname_cpp="$ac_cpp" ;;
22015 esac
e275c824 22016
5476a9a4
GM
22017 case "$host_os" in
22018 mingw*)
22019 gl_dirsep_regex='[/\\]'
22020 ;;
22021 *)
22022 gl_dirsep_regex='\/'
22023 ;;
22024 esac
22025 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
e275c824 22026
5476a9a4
GM
22027 gl_header_literal_regex=`echo 'time.h' \
22028 | sed -e "$gl_make_literal_regex_sed"`
22029 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22030 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22031 s|^/[^/]|//&|
22032 p
22033 q
22034 }'
22035 gl_cv_next_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22036 sed -n "$gl_absolute_header_sed"`'"'
e275c824
PE
22037
22038
5476a9a4
GM
22039fi
22040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
22041$as_echo "$gl_cv_next_time_h" >&6; }
22042 fi
22043 NEXT_TIME_H=$gl_cv_next_time_h
67342916 22044
5476a9a4
GM
22045 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22046 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22047 gl_next_as_first_directive='<'time.h'>'
f199cab1 22048 else
5476a9a4
GM
22049 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22050 gl_next_as_first_directive=$gl_cv_next_time_h
f199cab1 22051 fi
5476a9a4 22052 NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
4fda9c95
GM
22053
22054
52724a05
GM
22055
22056
22057
22058
22059
22060
22061
ae0d7250
PE
22062
22063
22064
cc322c06 22065
f199cab1 22066
b5591ebb
GM
22067ac_fn_c_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default"
22068if test "x$ac_cv_have_decl_unsetenv" = x""yes; then :
22069 ac_have_decl=1
22070else
22071 ac_have_decl=0
22072fi
22073
22074cat >>confdefs.h <<_ACEOF
22075#define HAVE_DECL_UNSETENV $ac_have_decl
22076_ACEOF
22077
cc322c06 22078
5476a9a4
GM
22079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the utimes function works" >&5
22080$as_echo_n "checking whether the utimes function works... " >&6; }
22081if test "${gl_cv_func_working_utimes+set}" = set; then :
22082 $as_echo_n "(cached) " >&6
22083else
1fd182f0 22084
5476a9a4
GM
22085 if test "$cross_compiling" = yes; then :
22086 gl_cv_func_working_utimes=no
22087else
22088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22089/* end confdefs.h. */
22090
22091#include <sys/types.h>
22092#include <sys/stat.h>
22093#include <fcntl.h>
22094#include <sys/time.h>
22095#include <time.h>
22096#include <unistd.h>
22097#include <stdlib.h>
22098#include <stdio.h>
22099#include <utime.h>
1fd182f0 22100
5476a9a4
GM
22101static int
22102inorder (time_t a, time_t b, time_t c)
22103{
22104 return a <= b && b <= c;
22105}
1fd182f0 22106
5476a9a4
GM
22107int
22108main ()
22109{
22110 int result = 0;
22111 char const *file = "conftest.utimes";
22112 static struct timeval timeval[2] = {{9, 10}, {999999, 999999}};
1fd182f0 22113
5476a9a4
GM
22114 /* Test whether utimes() essentially works. */
22115 {
22116 struct stat sbuf;
22117 FILE *f = fopen (file, "w");
22118 if (f == NULL)
22119 result |= 1;
22120 else if (fclose (f) != 0)
22121 result |= 1;
22122 else if (utimes (file, timeval) != 0)
22123 result |= 2;
22124 else if (lstat (file, &sbuf) != 0)
22125 result |= 1;
22126 else if (!(sbuf.st_atime == timeval[0].tv_sec
22127 && sbuf.st_mtime == timeval[1].tv_sec))
22128 result |= 4;
22129 if (unlink (file) != 0)
22130 result |= 1;
22131 }
1fd182f0 22132
5476a9a4
GM
22133 /* Test whether utimes() with a NULL argument sets the file's timestamp
22134 to the current time. Use 'fstat' as well as 'time' to
22135 determine the "current" time, to accommodate NFS file systems
22136 if there is a time skew between the host and the NFS server. */
22137 {
22138 int fd = open (file, O_WRONLY|O_CREAT, 0644);
22139 if (fd < 0)
22140 result |= 1;
22141 else
22142 {
22143 time_t t0, t2;
22144 struct stat st0, st1, st2;
22145 if (time (&t0) == (time_t) -1)
22146 result |= 1;
22147 else if (fstat (fd, &st0) != 0)
22148 result |= 1;
22149 else if (utimes (file, timeval) != 0)
22150 result |= 2;
22151 else if (utimes (file, NULL) != 0)
22152 result |= 8;
22153 else if (fstat (fd, &st1) != 0)
22154 result |= 1;
22155 else if (write (fd, "\n", 1) != 1)
22156 result |= 1;
22157 else if (fstat (fd, &st2) != 0)
22158 result |= 1;
22159 else if (time (&t2) == (time_t) -1)
22160 result |= 1;
22161 else
22162 {
22163 int m_ok_POSIX = inorder (t0, st1.st_mtime, t2);
22164 int m_ok_NFS = inorder (st0.st_mtime, st1.st_mtime, st2.st_mtime);
22165 if (! (st1.st_atime == st1.st_mtime))
22166 result |= 16;
22167 if (! (m_ok_POSIX || m_ok_NFS))
22168 result |= 32;
22169 }
22170 if (close (fd) != 0)
22171 result |= 1;
22172 }
22173 if (unlink (file) != 0)
22174 result |= 1;
22175 }
52724a05 22176
5476a9a4
GM
22177 /* Test whether utimes() with a NULL argument works on read-only files. */
22178 {
22179 int fd = open (file, O_WRONLY|O_CREAT, 0444);
22180 if (fd < 0)
22181 result |= 1;
22182 else if (close (fd) != 0)
22183 result |= 1;
22184 else if (utimes (file, NULL) != 0)
22185 result |= 64;
22186 if (unlink (file) != 0)
22187 result |= 1;
22188 }
1fd182f0 22189
5476a9a4
GM
22190 return result;
22191}
1fd182f0 22192
5476a9a4
GM
22193_ACEOF
22194if ac_fn_c_try_run "$LINENO"; then :
22195 gl_cv_func_working_utimes=yes
22196else
22197 gl_cv_func_working_utimes=no
22198fi
22199rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22200 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1 22201fi
1fd182f0 22202
5476a9a4
GM
22203fi
22204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_utimes" >&5
22205$as_echo "$gl_cv_func_working_utimes" >&6; }
1fd182f0 22206
5476a9a4 22207 if test $gl_cv_func_working_utimes = yes; then
1fd182f0 22208
5476a9a4 22209$as_echo "#define HAVE_WORKING_UTIMES 1" >>confdefs.h
1fd182f0 22210
5476a9a4 22211 fi
1fd182f0 22212
1fd182f0 22213
1fd182f0 22214
1fd182f0 22215
1fd182f0 22216
5476a9a4
GM
22217 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct utimbuf" >&5
22218$as_echo_n "checking for struct utimbuf... " >&6; }
22219if test "${gl_cv_sys_struct_utimbuf+set}" = set; then :
22220 $as_echo_n "(cached) " >&6
22221else
22222 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22223/* end confdefs.h. */
22224#if HAVE_SYS_TIME_H
22225 #include <sys/time.h>
22226 #endif
22227 #include <time.h>
22228 #ifdef HAVE_UTIME_H
22229 #include <utime.h>
22230 #endif
1fd182f0 22231
5476a9a4
GM
22232int
22233main ()
22234{
22235static struct utimbuf x; x.actime = x.modtime;
22236 ;
22237 return 0;
22238}
22239_ACEOF
22240if ac_fn_c_try_compile "$LINENO"; then :
22241 gl_cv_sys_struct_utimbuf=yes
22242else
22243 gl_cv_sys_struct_utimbuf=no
f199cab1 22244fi
5476a9a4 22245rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 22246fi
5476a9a4
GM
22247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_utimbuf" >&5
22248$as_echo "$gl_cv_sys_struct_utimbuf" >&6; }
1fd182f0 22249
5476a9a4 22250 if test $gl_cv_sys_struct_utimbuf = yes; then
1fd182f0 22251
5476a9a4 22252$as_echo "#define HAVE_STRUCT_UTIMBUF 1" >>confdefs.h
1fd182f0 22253
5476a9a4 22254 fi
1fd182f0 22255
1fd182f0 22256
1fd182f0 22257
1fd182f0 22258
1fd182f0 22259
1fd182f0 22260
1fd182f0 22261
3e0be4ab 22262
f199cab1 22263
f199cab1 22264
067d23c9 22265
710f5812
GM
22266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking type of array argument to getgroups" >&5
22267$as_echo_n "checking type of array argument to getgroups... " >&6; }
22268if test "${ac_cv_type_getgroups+set}" = set; then :
22269 $as_echo_n "(cached) " >&6
22270else
22271 if test "$cross_compiling" = yes; then :
22272 ac_cv_type_getgroups=cross
22273else
22274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22275/* end confdefs.h. */
22276/* Thanks to Mike Rendell for this test. */
22277$ac_includes_default
22278#define NGID 256
22279#undef MAX
22280#define MAX(x, y) ((x) > (y) ? (x) : (y))
22281
22282int
22283main ()
22284{
22285 gid_t gidset[NGID];
22286 int i, n;
22287 union { gid_t gval; long int lval; } val;
22288
22289 val.lval = -1;
22290 for (i = 0; i < NGID; i++)
22291 gidset[i] = val.gval;
22292 n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
22293 gidset);
22294 /* Exit non-zero if getgroups seems to require an array of ints. This
22295 happens when gid_t is short int but getgroups modifies an array
22296 of ints. */
22297 return n > 0 && gidset[n] != val.gval;
22298}
22299_ACEOF
22300if ac_fn_c_try_run "$LINENO"; then :
22301 ac_cv_type_getgroups=gid_t
22302else
22303 ac_cv_type_getgroups=int
22304fi
22305rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22306 conftest.$ac_objext conftest.beam conftest.$ac_ext
22307fi
22308
22309if test $ac_cv_type_getgroups = cross; then
22310 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22311/* end confdefs.h. */
22312#include <unistd.h>
22313
22314_ACEOF
22315if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22316 $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then :
22317 ac_cv_type_getgroups=gid_t
22318else
22319 ac_cv_type_getgroups=int
22320fi
22321rm -f conftest*
22322
22323fi
22324fi
22325{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_getgroups" >&5
22326$as_echo "$ac_cv_type_getgroups" >&6; }
22327
22328cat >>confdefs.h <<_ACEOF
22329#define GETGROUPS_T $ac_cv_type_getgroups
22330_ACEOF
22331
22332
22333
067d23c9 22334
0cdca42a
GM
22335
22336
e412eb97
GM
22337
22338
5476a9a4
GM
22339 if false; then
22340 GL_COND_LIBTOOL_TRUE=
22341 GL_COND_LIBTOOL_FALSE='#'
22342else
22343 GL_COND_LIBTOOL_TRUE='#'
22344 GL_COND_LIBTOOL_FALSE=
1fd182f0 22345fi
067d23c9 22346
5476a9a4
GM
22347 gl_cond_libtool=false
22348 gl_libdeps=
22349 gl_ltlibdeps=
22350 gl_m4_base='m4'
067d23c9 22351
f199cab1 22352
f199cab1 22353
f199cab1 22354
067d23c9 22355
f199cab1 22356
f199cab1 22357
f199cab1 22358
067d23c9 22359
5476a9a4 22360 gl_source_base='lib'
cc322c06
GM
22361
22362
5476a9a4
GM
22363 if test $ac_cv_func_alloca_works = no; then
22364 :
f199cab1 22365 fi
cc322c06 22366
5476a9a4
GM
22367 # Define an additional variable used in the Makefile substitution.
22368 if test $ac_cv_working_alloca_h = yes; then
22369 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
22370$as_echo_n "checking for alloca as a compiler built-in... " >&6; }
22371if test "${gl_cv_rpl_alloca+set}" = set; then :
22372 $as_echo_n "(cached) " >&6
22373else
cc322c06 22374
5476a9a4
GM
22375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22376/* end confdefs.h. */
067d23c9 22377
5476a9a4
GM
22378#if defined __GNUC__ || defined _AIX || defined _MSC_VER
22379 Need own alloca
22380#endif
067d23c9 22381
f199cab1 22382_ACEOF
5476a9a4
GM
22383if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22384 $EGREP "Need own alloca" >/dev/null 2>&1; then :
22385 gl_cv_rpl_alloca=yes
22386else
22387 gl_cv_rpl_alloca=no
369e19fc 22388fi
5476a9a4 22389rm -f conftest*
067d23c9 22390
ae0d7250 22391
5476a9a4
GM
22392fi
22393{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
22394$as_echo "$gl_cv_rpl_alloca" >&6; }
22395 if test $gl_cv_rpl_alloca = yes; then
52724a05 22396
5476a9a4 22397$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
ae0d7250 22398
5476a9a4
GM
22399 ALLOCA_H=alloca.h
22400 else
22401 ALLOCA_H=
22402 fi
f199cab1 22403 else
5476a9a4
GM
22404 ALLOCA_H=alloca.h
22405 fi
ae0d7250 22406
5476a9a4
GM
22407 if test -n "$ALLOCA_H"; then
22408 GL_GENERATE_ALLOCA_H_TRUE=
22409 GL_GENERATE_ALLOCA_H_FALSE='#'
22410else
22411 GL_GENERATE_ALLOCA_H_TRUE='#'
22412 GL_GENERATE_ALLOCA_H_FALSE=
22413fi
f199cab1 22414
ae0d7250
PE
22415
22416
eafe4c87
GM
22417 for ac_header in byteswap.h
22418do :
22419 ac_fn_c_check_header_mongrel "$LINENO" "byteswap.h" "ac_cv_header_byteswap_h" "$ac_includes_default"
22420if test "x$ac_cv_header_byteswap_h" = x""yes; then :
22421 cat >>confdefs.h <<_ACEOF
22422#define HAVE_BYTESWAP_H 1
22423_ACEOF
22424
22425 BYTESWAP_H=''
22426
22427else
22428
22429 BYTESWAP_H='byteswap.h'
22430
22431fi
22432
22433done
22434
22435
22436 if test -n "$BYTESWAP_H"; then
22437 GL_GENERATE_BYTESWAP_H_TRUE=
22438 GL_GENERATE_BYTESWAP_H_FALSE='#'
22439else
22440 GL_GENERATE_BYTESWAP_H_TRUE='#'
22441 GL_GENERATE_BYTESWAP_H_FALSE=
22442fi
22443
22444
22445
ae0d7250
PE
22446
22447
22448
5476a9a4
GM
22449 # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
22450 # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
ae0d7250 22451
5476a9a4
GM
22452 # Save and restore LIBS so e.g., -lrt, isn't added to it. Otherwise, *all*
22453 # programs in the package would end up linked with that potentially-shared
22454 # library, inducing unnecessary run-time overhead.
22455 LIB_CLOCK_GETTIME=
ae0d7250 22456
5476a9a4
GM
22457 gl_saved_libs=$LIBS
22458 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
22459$as_echo_n "checking for library containing clock_gettime... " >&6; }
22460if test "${ac_cv_search_clock_gettime+set}" = set; then :
22461 $as_echo_n "(cached) " >&6
22462else
22463 ac_func_search_save_LIBS=$LIBS
22464cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22465/* end confdefs.h. */
22466
22467/* Override any GCC internal prototype to avoid an error.
22468 Use char because int might match the return type of a GCC
22469 builtin and then its argument prototype would still apply. */
22470#ifdef __cplusplus
22471extern "C"
22472#endif
22473char clock_gettime ();
22474int
22475main ()
22476{
22477return clock_gettime ();
22478 ;
22479 return 0;
22480}
22481_ACEOF
22482for ac_lib in '' rt posix4; do
22483 if test -z "$ac_lib"; then
22484 ac_res="none required"
22485 else
22486 ac_res=-l$ac_lib
22487 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
22488 fi
22489 if ac_fn_c_try_link "$LINENO"; then :
22490 ac_cv_search_clock_gettime=$ac_res
f199cab1 22491fi
5476a9a4
GM
22492rm -f core conftest.err conftest.$ac_objext \
22493 conftest$ac_exeext
22494 if test "${ac_cv_search_clock_gettime+set}" = set; then :
22495 break
22496fi
22497done
22498if test "${ac_cv_search_clock_gettime+set}" = set; then :
ae0d7250 22499
5476a9a4
GM
22500else
22501 ac_cv_search_clock_gettime=no
22502fi
22503rm conftest.$ac_ext
22504LIBS=$ac_func_search_save_LIBS
22505fi
22506{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
22507$as_echo "$ac_cv_search_clock_gettime" >&6; }
22508ac_res=$ac_cv_search_clock_gettime
22509if test "$ac_res" != no; then :
22510 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
22511 test "$ac_cv_search_clock_gettime" = "none required" ||
22512 LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime
22513fi
ae0d7250 22514
5476a9a4
GM
22515 for ac_func in clock_gettime clock_settime
22516do :
22517 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
22518ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
22519eval as_val=\$$as_ac_var
22520 if test "x$as_val" = x""yes; then :
22521 cat >>confdefs.h <<_ACEOF
22522#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
22523_ACEOF
ae0d7250 22524
d7ad186c
GM
22525fi
22526done
22527
22528 LIBS=$gl_saved_libs
22529
22530
22531 :
22532
22533
22534
22535cat >>confdefs.h <<_ACEOF
22536#define GNULIB_CLOSE_STREAM 1
22537_ACEOF
22538
22539
22540
22541
ec95982c
GM
22542
22543
22544
22545
22546
22547
d7ad186c
GM
22548 :
22549
22550
22551
22552 :
22553
22554
22555
ffeb6dec 22556 :
d7ad186c
GM
22557
22558
22559
ffeb6dec 22560 :
d7ad186c
GM
22561
22562
22563
22564
22565
22566
22567
22568
22569
22570
22571
ae0d7250 22572
3e0be4ab 22573
d7ad186c
GM
22574 if test $gl_cv_have_include_next = yes; then
22575 gl_cv_next_dirent_h='<'dirent.h'>'
22576 else
22577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5
22578$as_echo_n "checking absolute name of <dirent.h>... " >&6; }
22579if test "${gl_cv_next_dirent_h+set}" = set; then :
22580 $as_echo_n "(cached) " >&6
22581else
3e0be4ab 22582
d7ad186c 22583 if test $ac_cv_header_dirent_h = yes; then
3bf26e96
GM
22584
22585
d7ad186c
GM
22586 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22587/* end confdefs.h. */
22588#include <dirent.h>
3bf26e96 22589
3bf26e96 22590_ACEOF
d7ad186c
GM
22591 case "$host_os" in
22592 aix*) gl_absname_cpp="$ac_cpp -C" ;;
22593 *) gl_absname_cpp="$ac_cpp" ;;
22594 esac
3bf26e96 22595
d7ad186c
GM
22596 case "$host_os" in
22597 mingw*)
22598 gl_dirsep_regex='[/\\]'
22599 ;;
22600 *)
22601 gl_dirsep_regex='\/'
22602 ;;
22603 esac
22604 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
3bf26e96 22605
d7ad186c
GM
22606 gl_header_literal_regex=`echo 'dirent.h' \
22607 | sed -e "$gl_make_literal_regex_sed"`
22608 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22609 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22610 s|^/[^/]|//&|
22611 p
22612 q
22613 }'
22614 gl_cv_next_dirent_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22615 sed -n "$gl_absolute_header_sed"`'"'
22616 else
22617 gl_cv_next_dirent_h='<'dirent.h'>'
22618 fi
3bf26e96 22619
3e0be4ab 22620
d7ad186c
GM
22621fi
22622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5
22623$as_echo "$gl_cv_next_dirent_h" >&6; }
22624 fi
22625 NEXT_DIRENT_H=$gl_cv_next_dirent_h
f199cab1 22626
d7ad186c
GM
22627 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22628 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22629 gl_next_as_first_directive='<'dirent.h'>'
22630 else
22631 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22632 gl_next_as_first_directive=$gl_cv_next_dirent_h
22633 fi
22634 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive
f199cab1 22635
3e0be4ab 22636
f199cab1 22637
f199cab1 22638
d7ad186c
GM
22639 if test $ac_cv_header_dirent_h = yes; then
22640 HAVE_DIRENT_H=1
22641 else
22642 HAVE_DIRENT_H=0
22643 fi
3e0be4ab 22644
f199cab1
GM
22645
22646
22647
5476a9a4
GM
22648
22649
22650
22651
22652
22653
5476a9a4
GM
22654$as_echo "#define HAVE_DUP2 1" >>confdefs.h
22655
22656
22657 if test $HAVE_DUP2 = 1; then
22658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
22659$as_echo_n "checking whether dup2 works... " >&6; }
22660if test "${gl_cv_func_dup2_works+set}" = set; then :
3e0be4ab
GM
22661 $as_echo_n "(cached) " >&6
22662else
5476a9a4
GM
22663 if test "$cross_compiling" = yes; then :
22664 case "$host_os" in
22665 mingw*) # on this platform, dup2 always returns 0 for success
22666 gl_cv_func_dup2_works="guessing no" ;;
22667 cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
22668 gl_cv_func_dup2_works="guessing no" ;;
22669 linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a
22670 # closed fd may yield -EBADF instead of -1 / errno=EBADF.
22671 gl_cv_func_dup2_works="guessing no" ;;
22672 freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF.
22673 gl_cv_func_dup2_works="guessing no" ;;
22674 haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
22675 gl_cv_func_dup2_works="guessing no" ;;
22676 *) gl_cv_func_dup2_works="guessing yes" ;;
22677 esac
22678else
22679 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3e0be4ab 22680/* end confdefs.h. */
ae0d7250 22681
5476a9a4
GM
22682 #include <unistd.h>
22683#include <fcntl.h>
22684#include <errno.h>
3e0be4ab
GM
22685int
22686main ()
22687{
5476a9a4
GM
22688int result = 0;
22689#ifdef FD_CLOEXEC
22690 if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
22691 result |= 1;
22692#endif
22693 if (dup2 (1, 1) == 0)
22694 result |= 2;
22695#ifdef FD_CLOEXEC
22696 if (fcntl (1, F_GETFD) != FD_CLOEXEC)
22697 result |= 4;
22698#endif
22699 close (0);
22700 if (dup2 (0, 0) != -1)
22701 result |= 8;
22702 /* Many gnulib modules require POSIX conformance of EBADF. */
22703 if (dup2 (2, 1000000) == -1 && errno != EBADF)
22704 result |= 16;
8a3fafec 22705 /* Flush out some cygwin core dumps. */
0d1f53ad
GM
22706 if (dup2 (2, -1) != -1 || errno != EBADF)
22707 result |= 32;
8a3fafec
GM
22708 dup2 (2, 255);
22709 dup2 (2, 256);
5476a9a4
GM
22710 return result;
22711
ae0d7250
PE
22712 ;
22713 return 0;
22714}
5476a9a4 22715
ae0d7250 22716_ACEOF
5476a9a4
GM
22717if ac_fn_c_try_run "$LINENO"; then :
22718 gl_cv_func_dup2_works=yes
ae0d7250 22719else
5476a9a4 22720 gl_cv_func_dup2_works=no
ae0d7250 22721fi
5476a9a4
GM
22722rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22723 conftest.$ac_objext conftest.beam conftest.$ac_ext
ae0d7250 22724fi
5476a9a4
GM
22725
22726
3e0be4ab 22727fi
5476a9a4
GM
22728{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
22729$as_echo "$gl_cv_func_dup2_works" >&6; }
22730 case "$gl_cv_func_dup2_works" in
22731 *yes) ;;
22732 *)
22733 REPLACE_DUP2=1
8a3fafec
GM
22734 for ac_func in setdtablesize
22735do :
22736 ac_fn_c_check_func "$LINENO" "setdtablesize" "ac_cv_func_setdtablesize"
22737if test "x$ac_cv_func_setdtablesize" = x""yes; then :
22738 cat >>confdefs.h <<_ACEOF
22739#define HAVE_SETDTABLESIZE 1
22740_ACEOF
22741
22742fi
22743done
22744
5476a9a4
GM
22745 ;;
22746 esac
22747 fi
3e0be4ab 22748
3e0be4ab 22749
a6342fc8 22750 if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
f199cab1 22751
f199cab1
GM
22752
22753
f199cab1 22754
f199cab1 22755
f199cab1 22756
f199cab1 22757
f199cab1 22758
5476a9a4 22759 gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
f199cab1
GM
22760
22761
a6342fc8 22762 fi
f199cab1 22763
f199cab1 22764
f199cab1 22765
f199cab1 22766
f199cab1 22767
5476a9a4 22768 GNULIB_DUP2=1
f199cab1
GM
22769
22770
f199cab1 22771
f199cab1 22772
3e0be4ab 22773
3e0be4ab 22774
f199cab1
GM
22775
22776
ae0d7250 22777
ae0d7250 22778
5476a9a4 22779
93131e11
GM
22780 GNULIB_ENVIRON=1
22781
22782
22783
22784
22785
22786
22787
22788
3a019ab4 22789
8966cbff
GM
22790 LIB_EXECINFO=''
22791 EXECINFO_H='execinfo.h'
22792
22793 if test $ac_cv_header_execinfo_h = yes; then
22794 gl_saved_libs=$LIBS
22795 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing backtrace_symbols_fd" >&5
22796$as_echo_n "checking for library containing backtrace_symbols_fd... " >&6; }
22797if test "${ac_cv_search_backtrace_symbols_fd+set}" = set; then :
22798 $as_echo_n "(cached) " >&6
22799else
22800 ac_func_search_save_LIBS=$LIBS
22801cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22802/* end confdefs.h. */
22803
22804/* Override any GCC internal prototype to avoid an error.
22805 Use char because int might match the return type of a GCC
22806 builtin and then its argument prototype would still apply. */
22807#ifdef __cplusplus
22808extern "C"
22809#endif
22810char backtrace_symbols_fd ();
22811int
22812main ()
22813{
22814return backtrace_symbols_fd ();
22815 ;
22816 return 0;
22817}
22818_ACEOF
22819for ac_lib in '' execinfo; do
22820 if test -z "$ac_lib"; then
22821 ac_res="none required"
22822 else
22823 ac_res=-l$ac_lib
22824 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
22825 fi
22826 if ac_fn_c_try_link "$LINENO"; then :
22827 ac_cv_search_backtrace_symbols_fd=$ac_res
22828fi
22829rm -f core conftest.err conftest.$ac_objext \
22830 conftest$ac_exeext
22831 if test "${ac_cv_search_backtrace_symbols_fd+set}" = set; then :
22832 break
22833fi
22834done
22835if test "${ac_cv_search_backtrace_symbols_fd+set}" = set; then :
22836
22837else
22838 ac_cv_search_backtrace_symbols_fd=no
22839fi
22840rm conftest.$ac_ext
22841LIBS=$ac_func_search_save_LIBS
22842fi
22843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_backtrace_symbols_fd" >&5
22844$as_echo "$ac_cv_search_backtrace_symbols_fd" >&6; }
22845ac_res=$ac_cv_search_backtrace_symbols_fd
22846if test "$ac_res" != no; then :
22847 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
22848 test "$ac_cv_search_backtrace_symbols_fd" = "none required" ||
22849 LIB_EXECINFO=$ac_cv_search_backtrace_symbols_fd
22850fi
22851
22852 LIBS=$gl_saved_libs
22853 test "$ac_cv_search_backtrace_symbols_fd" = no || EXECINFO_H=''
22854 fi
22855
22856 if test -n "$EXECINFO_H"; then
22857
22858
22859
22860
22861
22862
22863
22864
22865 gl_LIBOBJS="$gl_LIBOBJS execinfo.$ac_objext"
22866
22867 fi
22868
22869
22870
22871 if test -n "$EXECINFO_H"; then
22872 GL_GENERATE_EXECINFO_H_TRUE=
22873 GL_GENERATE_EXECINFO_H_FALSE='#'
22874else
22875 GL_GENERATE_EXECINFO_H_TRUE='#'
22876 GL_GENERATE_EXECINFO_H_FALSE=
22877fi
22878
22879
22880
22881
22882
93131e11
GM
22883
22884
22885
7cd2ed2c 22886
710f5812
GM
22887 if test $ac_cv_func_faccessat = no; then
22888 HAVE_FACCESSAT=0
22889 fi
22890
22891 if test $HAVE_FACCESSAT = 0; then
22892
22893
22894
22895
22896
22897
22898
22899
22900 gl_LIBOBJS="$gl_LIBOBJS faccessat.$ac_objext"
22901
22902
22903 for ac_func in access
22904do :
22905 ac_fn_c_check_func "$LINENO" "access" "ac_cv_func_access"
22906if test "x$ac_cv_func_access" = x""yes; then :
22907 cat >>confdefs.h <<_ACEOF
22908#define HAVE_ACCESS 1
22909_ACEOF
22910
22911fi
22912done
22913
22914
22915 fi
22916
22917
22918cat >>confdefs.h <<_ACEOF
22919#define GNULIB_FACCESSAT 1
22920_ACEOF
22921
22922
22923
22924
22925
22926
22927
22928 GNULIB_FACCESSAT=1
22929
22930
22931
22932
22933
22934
22935
22936
22937
22938
0cdca42a
GM
22939 if test $ac_cv_func_fcntl = no; then
22940
22941
22942
22943 if test $ac_cv_func_fcntl = no; then
22944 HAVE_FCNTL=0
22945 else
22946 REPLACE_FCNTL=1
22947 fi
22948
22949 else
22950 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
22951$as_echo_n "checking whether fcntl handles F_DUPFD correctly... " >&6; }
22952if test "${gl_cv_func_fcntl_f_dupfd_works+set}" = set; then :
22953 $as_echo_n "(cached) " >&6
22954else
22955 if test "$cross_compiling" = yes; then :
22956 # Guess that it works on glibc systems
22957 case $host_os in #((
22958 *-gnu*) gl_cv_func_fcntl_f_dupfd_works="guessing yes";;
22959 *) gl_cv_func_fcntl_f_dupfd_works="guessing no";;
22960 esac
22961else
22962 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22963/* end confdefs.h. */
22964
22965#include <fcntl.h>
22966#include <errno.h>
22967
22968int
22969main ()
22970{
22971int result = 0;
22972 if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
22973 if (errno != EINVAL) result |= 2;
22974 return result;
22975
22976 ;
22977 return 0;
22978}
22979_ACEOF
22980if ac_fn_c_try_run "$LINENO"; then :
22981 gl_cv_func_fcntl_f_dupfd_works=yes
22982else
22983 gl_cv_func_fcntl_f_dupfd_works=no
22984fi
22985rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22986 conftest.$ac_objext conftest.beam conftest.$ac_ext
22987fi
22988
22989fi
22990{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
22991$as_echo "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
22992 case $gl_cv_func_fcntl_f_dupfd_works in
22993 *yes) ;;
22994 *)
22995
22996
22997 if test $ac_cv_func_fcntl = no; then
22998 HAVE_FCNTL=0
22999 else
23000 REPLACE_FCNTL=1
23001 fi
23002
23003
23004$as_echo "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
23005 ;;
23006 esac
23007
23008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
23009$as_echo_n "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
23010if test "${gl_cv_func_fcntl_f_dupfd_cloexec+set}" = set; then :
23011 $as_echo_n "(cached) " >&6
23012else
23013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23014/* end confdefs.h. */
23015
23016#include <fcntl.h>
23017#ifndef F_DUPFD_CLOEXEC
23018choke me
23019#endif
23020
23021int
23022main ()
23023{
23024
23025 ;
23026 return 0;
23027}
23028_ACEOF
23029if ac_fn_c_try_compile "$LINENO"; then :
23030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23031/* end confdefs.h. */
23032
23033#ifdef __linux__
23034/* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
23035 it to support the semantics on older kernels that failed with EINVAL. */
23036choke me
23037#endif
23038
23039int
23040main ()
23041{
23042
23043 ;
23044 return 0;
23045}
23046_ACEOF
23047if ac_fn_c_try_compile "$LINENO"; then :
23048 gl_cv_func_fcntl_f_dupfd_cloexec=yes
23049else
23050 gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
23051fi
23052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23053else
23054 gl_cv_func_fcntl_f_dupfd_cloexec=no
23055fi
23056rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23057fi
23058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
23059$as_echo "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
23060 if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then
23061
23062
23063
23064 if test $ac_cv_func_fcntl = no; then
23065 HAVE_FCNTL=0
23066 else
23067 REPLACE_FCNTL=1
23068 fi
23069
23070 fi
23071 fi
23072
23073
23074 if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
23075
23076
23077
23078
23079
23080
23081
23082
23083 gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext"
23084
23085 fi
23086
23087
23088
23089
23090
23091 GNULIB_FCNTL=1
23092
23093
23094
23095
23096
23097
23098
23099
23100
23101
710f5812
GM
23102
23103
23104
23105
23106
23107
23108 if test $gl_cv_have_include_next = yes; then
23109 gl_cv_next_fcntl_h='<'fcntl.h'>'
23110 else
23111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
23112$as_echo_n "checking absolute name of <fcntl.h>... " >&6; }
23113if test "${gl_cv_next_fcntl_h+set}" = set; then :
23114 $as_echo_n "(cached) " >&6
23115else
23116
23117 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23118/* end confdefs.h. */
23119#include <fcntl.h>
23120
23121_ACEOF
23122 case "$host_os" in
23123 aix*) gl_absname_cpp="$ac_cpp -C" ;;
23124 *) gl_absname_cpp="$ac_cpp" ;;
23125 esac
23126
23127 case "$host_os" in
23128 mingw*)
23129 gl_dirsep_regex='[/\\]'
23130 ;;
23131 *)
23132 gl_dirsep_regex='\/'
23133 ;;
23134 esac
23135 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23136
23137 gl_header_literal_regex=`echo 'fcntl.h' \
23138 | sed -e "$gl_make_literal_regex_sed"`
23139 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23140 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23141 s|^/[^/]|//&|
23142 p
23143 q
23144 }'
23145 gl_cv_next_fcntl_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23146 sed -n "$gl_absolute_header_sed"`'"'
23147
23148
23149fi
23150{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
23151$as_echo "$gl_cv_next_fcntl_h" >&6; }
23152 fi
23153 NEXT_FCNTL_H=$gl_cv_next_fcntl_h
23154
23155 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23156 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23157 gl_next_as_first_directive='<'fcntl.h'>'
23158 else
23159 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23160 gl_next_as_first_directive=$gl_cv_next_fcntl_h
23161 fi
23162 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
23163
23164
23165
23166
23167
23168
23169
23170
23171
23172
23173
23174
23175
23176
23177
2407788f
GM
23178 LIB_FDATASYNC=
23179
23180
23181 if test $ac_cv_have_decl_fdatasync = no; then
23182 HAVE_DECL_FDATASYNC=0
23183 for ac_func in fdatasync
23184do :
23185 ac_fn_c_check_func "$LINENO" "fdatasync" "ac_cv_func_fdatasync"
23186if test "x$ac_cv_func_fdatasync" = x""yes; then :
23187 cat >>confdefs.h <<_ACEOF
23188#define HAVE_FDATASYNC 1
23189_ACEOF
23190
23191fi
23192done
23193
23194 if test $ac_cv_func_fdatasync = no; then
23195 HAVE_FDATASYNC=0
23196 fi
23197 else
23198 gl_saved_libs=$LIBS
23199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5
23200$as_echo_n "checking for library containing fdatasync... " >&6; }
23201if test "${ac_cv_search_fdatasync+set}" = set; then :
23202 $as_echo_n "(cached) " >&6
23203else
23204 ac_func_search_save_LIBS=$LIBS
23205cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23206/* end confdefs.h. */
23207
23208/* Override any GCC internal prototype to avoid an error.
23209 Use char because int might match the return type of a GCC
23210 builtin and then its argument prototype would still apply. */
23211#ifdef __cplusplus
23212extern "C"
23213#endif
23214char fdatasync ();
23215int
23216main ()
23217{
23218return fdatasync ();
23219 ;
23220 return 0;
23221}
23222_ACEOF
23223for ac_lib in '' rt posix4; do
23224 if test -z "$ac_lib"; then
23225 ac_res="none required"
23226 else
23227 ac_res=-l$ac_lib
23228 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
23229 fi
23230 if ac_fn_c_try_link "$LINENO"; then :
23231 ac_cv_search_fdatasync=$ac_res
23232fi
23233rm -f core conftest.err conftest.$ac_objext \
23234 conftest$ac_exeext
23235 if test "${ac_cv_search_fdatasync+set}" = set; then :
23236 break
23237fi
23238done
23239if test "${ac_cv_search_fdatasync+set}" = set; then :
23240
23241else
23242 ac_cv_search_fdatasync=no
23243fi
23244rm conftest.$ac_ext
23245LIBS=$ac_func_search_save_LIBS
23246fi
23247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fdatasync" >&5
23248$as_echo "$ac_cv_search_fdatasync" >&6; }
23249ac_res=$ac_cv_search_fdatasync
23250if test "$ac_res" != no; then :
23251 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
23252 test "$ac_cv_search_fdatasync" = "none required" ||
23253 LIB_FDATASYNC=$ac_cv_search_fdatasync
23254fi
23255
23256 LIBS=$gl_saved_libs
23257 fi
23258
23259 if test $HAVE_FDATASYNC = 0; then
23260
23261
23262
23263
23264
23265
23266
23267
23268 gl_LIBOBJS="$gl_LIBOBJS fdatasync.$ac_objext"
23269
23270 fi
23271
23272
23273
23274
23275
23276 GNULIB_FDATASYNC=1
23277
23278
23279
23280
23281
23282
23283
23284
23285
710f5812 23286
d7ad186c
GM
23287 ac_fn_c_check_decl "$LINENO" "fdopendir" "ac_cv_have_decl_fdopendir" "
23288#include <dirent.h>
23289
23290"
23291if test "x$ac_cv_have_decl_fdopendir" = x""yes; then :
23292 ac_have_decl=1
23293else
23294 ac_have_decl=0
23295fi
23296
23297cat >>confdefs.h <<_ACEOF
23298#define HAVE_DECL_FDOPENDIR $ac_have_decl
23299_ACEOF
23300if test $ac_have_decl = 1; then :
23301
23302else
23303 HAVE_DECL_FDOPENDIR=0
23304fi
23305
23306
23307 if test $ac_cv_func_fdopendir = no; then
23308 HAVE_FDOPENDIR=0
23309 else
23310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fdopendir works" >&5
23311$as_echo_n "checking whether fdopendir works... " >&6; }
23312if test "${gl_cv_func_fdopendir_works+set}" = set; then :
23313 $as_echo_n "(cached) " >&6
23314else
23315 if test "$cross_compiling" = yes; then :
23316 case "$host_os" in
23317 # Guess yes on glibc systems.
23318 *-gnu*) gl_cv_func_fdopendir_works="guessing yes" ;;
23319 # If we don't know, assume the worst.
23320 *) gl_cv_func_fdopendir_works="guessing no" ;;
23321 esac
23322
23323else
23324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23325/* end confdefs.h. */
23326
23327#include <dirent.h>
23328#include <fcntl.h>
23329#include <unistd.h>
23330#if !HAVE_DECL_FDOPENDIR
23331extern
23332# ifdef __cplusplus
23333"C"
23334# endif
23335DIR *fdopendir (int);
23336#endif
23337
23338int
23339main ()
23340{
23341int result = 0;
23342 int fd = open ("conftest.c", O_RDONLY);
23343 if (fd < 0) result |= 1;
23344 if (fdopendir (fd)) result |= 2;
23345 if (close (fd)) result |= 4;
23346 return result;
23347 ;
23348 return 0;
23349}
23350_ACEOF
23351if ac_fn_c_try_run "$LINENO"; then :
23352 gl_cv_func_fdopendir_works=yes
23353else
23354 gl_cv_func_fdopendir_works=no
23355fi
23356rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23357 conftest.$ac_objext conftest.beam conftest.$ac_ext
23358fi
23359
23360fi
23361{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopendir_works" >&5
23362$as_echo "$gl_cv_func_fdopendir_works" >&6; }
23363 case "$gl_cv_func_fdopendir_works" in
23364 *yes) ;;
23365 *)
23366 REPLACE_FDOPENDIR=1
23367 ;;
23368 esac
23369 fi
23370
23371 if test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1; then
23372
23373
23374
23375
23376
23377
23378
23379
23380 gl_LIBOBJS="$gl_LIBOBJS fdopendir.$ac_objext"
23381
23382 fi
23383
23384
23385
23386
23387
23388 GNULIB_FDOPENDIR=1
23389
23390
23391
23392
23393
23394
23395
23396cat >>confdefs.h <<_ACEOF
23397#define GNULIB_FDOPENDIR 1
23398_ACEOF
23399
23400
23401
23402
23403
23404
23405
710f5812 23406
7a67e06b
GM
23407 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpending" >&5
23408$as_echo_n "checking for __fpending... " >&6; }
23409if test "${gl_cv_func___fpending+set}" = set; then :
23410 $as_echo_n "(cached) " >&6
3bf26e96 23411else
3bf26e96 23412
7a67e06b
GM
23413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23414/* end confdefs.h. */
23415#include <stdio.h>
23416 #if HAVE_STDIO_EXT_H
23417 # include <stdio_ext.h>
23418 #endif
23419
23420int
23421main ()
23422{
23423return ! __fpending (stdin);
23424 ;
23425 return 0;
23426}
3bf26e96 23427_ACEOF
7a67e06b
GM
23428if ac_fn_c_try_link "$LINENO"; then :
23429 gl_cv_func___fpending=yes
23430else
23431 gl_cv_func___fpending=no
23432fi
23433rm -f core conftest.err conftest.$ac_objext \
23434 conftest$ac_exeext conftest.$ac_ext
3bf26e96 23435
7a67e06b
GM
23436fi
23437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func___fpending" >&5
23438$as_echo "$gl_cv_func___fpending" >&6; }
3bf26e96 23439
7a67e06b 23440 if test $gl_cv_func___fpending = no; then
3bf26e96
GM
23441
23442
23443
23444
23445
23446
23447
23448
23449 gl_LIBOBJS="$gl_LIBOBJS fpending.$ac_objext"
23450
23451
23452 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to determine the number of pending output bytes on a stream" >&5
23453$as_echo_n "checking how to determine the number of pending output bytes on a stream... " >&6; }
23454if test "${ac_cv_sys_pending_output_n_bytes+set}" = set; then :
23455 $as_echo_n "(cached) " >&6
23456else
23457
23458 for ac_expr in \
23459 \
23460 '# glibc2' \
23461 'fp->_IO_write_ptr - fp->_IO_write_base' \
23462 \
23463 '# traditional Unix' \
23464 'fp->_ptr - fp->_base' \
23465 \
23466 '# BSD' \
23467 'fp->_p - fp->_bf._base' \
23468 \
23469 '# SCO, Unixware' \
23470 '(fp->__ptr ? fp->__ptr - fp->__base : 0)' \
23471 \
23472 '# QNX' \
23473 '(fp->_Mode & 0x2000 /*_MWRITE*/ ? fp->_Next - fp->_Buf : 0)' \
23474 \
23475 '# old glibc?' \
23476 'fp->__bufp - fp->__buffer' \
23477 \
23478 '# old glibc iostream?' \
23479 'fp->_pptr - fp->_pbase' \
23480 \
23481 '# emx+gcc' \
23482 'fp->_ptr - fp->_buffer' \
23483 \
23484 '# Minix' \
23485 'fp->_ptr - fp->_buf' \
23486 \
23487 '# Plan9' \
23488 'fp->wp - fp->buf' \
23489 \
23490 '# VMS' \
23491 '(*fp)->_ptr - (*fp)->_base' \
23492 \
23493 '# e.g., DGUX R4.11; the info is not available' \
23494 1 \
23495 ; do
23496
23497 # Skip each embedded comment.
23498 case "$ac_expr" in '#'*) continue;; esac
23499
23500 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23501/* end confdefs.h. */
23502#include <stdio.h>
23503int
23504main ()
23505{
23506FILE *fp = stdin; (void) ($ac_expr);
23507 ;
23508 return 0;
23509}
23510_ACEOF
23511if ac_fn_c_try_compile "$LINENO"; then :
23512 fp_done=yes
23513
23514fi
23515rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23516 test "$fp_done" = yes && break
23517 done
23518
23519 ac_cv_sys_pending_output_n_bytes=$ac_expr
23520
23521
23522fi
23523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_pending_output_n_bytes" >&5
23524$as_echo "$ac_cv_sys_pending_output_n_bytes" >&6; }
23525
23526cat >>confdefs.h <<_ACEOF
23527#define PENDING_OUTPUT_N_BYTES $ac_cv_sys_pending_output_n_bytes
23528_ACEOF
23529
23530
23531 fi
23532
23533
d7ad186c
GM
23534
23535
23536
23537
23538 if test $ac_cv_func_fstatat = no; then
23539 HAVE_FSTATAT=0
23540 else
23541 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fstatat (..., 0) works" >&5
23542$as_echo_n "checking whether fstatat (..., 0) works... " >&6; }
23543if test "${gl_cv_func_fstatat_zero_flag+set}" = set; then :
23544 $as_echo_n "(cached) " >&6
23545else
23546 if test "$cross_compiling" = yes; then :
23547 case "$host_os" in
23548 aix*) gl_cv_func_fstatat_zero_flag="guessing no";;
23549 *) gl_cv_func_fstatat_zero_flag="guessing yes";;
23550 esac
23551
23552else
23553 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23554/* end confdefs.h. */
23555
23556 #include <fcntl.h>
23557 #include <sys/stat.h>
23558 int
23559 main (void)
23560 {
23561 struct stat a;
23562 return fstatat (AT_FDCWD, ".", &a, 0) != 0;
23563 }
23564
23565_ACEOF
23566if ac_fn_c_try_run "$LINENO"; then :
23567 gl_cv_func_fstatat_zero_flag=yes
23568else
23569 gl_cv_func_fstatat_zero_flag=no
23570fi
23571rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23572 conftest.$ac_objext conftest.beam conftest.$ac_ext
23573fi
23574
23575
23576fi
23577{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fstatat_zero_flag" >&5
23578$as_echo "$gl_cv_func_fstatat_zero_flag" >&6; }
23579
23580 case $gl_cv_func_fstatat_zero_flag+$gl_cv_func_lstat_dereferences_slashed_symlink in
23581 *yes+*yes) ;;
23582 *) REPLACE_FSTATAT=1
23583 case $gl_cv_func_fstatat_zero_flag in
23584 *yes)
23585
23586$as_echo "#define HAVE_WORKING_FSTATAT_ZERO_FLAG 1" >>confdefs.h
23587
23588 ;;
23589 esac
23590 ;;
23591 esac
23592 fi
23593
23594 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
23595
23596
23597
23598
23599
23600
23601
23602
23603 gl_LIBOBJS="$gl_LIBOBJS fstatat.$ac_objext"
23604
23605 fi
23606
23607
23608
23609
23610
23611 GNULIB_FSTATAT=1
23612
23613
23614
23615
23616
23617
23618
2407788f
GM
23619
23620 if test $ac_cv_func_fsync = no; then
23621 HAVE_FSYNC=0
23622 fi
23623
23624 if test $HAVE_FSYNC = 0; then
23625
23626
23627
23628
23629
23630
23631
23632
23633 gl_LIBOBJS="$gl_LIBOBJS fsync.$ac_objext"
23634
23635 :
23636 fi
23637
23638
23639
23640
23641
23642 GNULIB_FSYNC=1
23643
23644
23645
23646
23647
23648
23649
5476a9a4
GM
23650# Persuade glibc <stdlib.h> to declare getloadavg().
23651
23652
23653gl_save_LIBS=$LIBS
23654
23655# getloadvg is present in libc on glibc >= 2.2, Mac OS X, FreeBSD >= 2.0,
23656# NetBSD >= 0.9, OpenBSD >= 2.0, Solaris >= 7.
23657HAVE_GETLOADAVG=1
23658ac_fn_c_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg"
23659if test "x$ac_cv_func_getloadavg" = x""yes; then :
23660
23661else
23662 gl_func_getloadavg_done=no
23663
23664 # Some systems with -lutil have (and need) -lkvm as well, some do not.
23665 # On Solaris, -lkvm requires nlist from -lelf, so check that first
23666 # to get the right answer into the cache.
23667 # For kstat on solaris, we need to test for libelf and libkvm to force the
23668 # definition of SVR4 below.
23669 if test $gl_func_getloadavg_done = no; then
23670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_begin in -lelf" >&5
23671$as_echo_n "checking for elf_begin in -lelf... " >&6; }
23672if test "${ac_cv_lib_elf_elf_begin+set}" = set; then :
6ad6792b
GM
23673 $as_echo_n "(cached) " >&6
23674else
3e0be4ab 23675 ac_check_lib_save_LIBS=$LIBS
5476a9a4 23676LIBS="-lelf $LIBS"
3e0be4ab 23677cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6ad6792b 23678/* end confdefs.h. */
6ad6792b 23679
3e0be4ab
GM
23680/* Override any GCC internal prototype to avoid an error.
23681 Use char because int might match the return type of a GCC
23682 builtin and then its argument prototype would still apply. */
23683#ifdef __cplusplus
23684extern "C"
23685#endif
5476a9a4 23686char elf_begin ();
6ad6792b
GM
23687int
23688main ()
23689{
5476a9a4 23690return elf_begin ();
6ad6792b
GM
23691 ;
23692 return 0;
23693}
23694_ACEOF
3e0be4ab 23695if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 23696 ac_cv_lib_elf_elf_begin=yes
3e0be4ab 23697else
5476a9a4 23698 ac_cv_lib_elf_elf_begin=no
6ad6792b 23699fi
3e0be4ab
GM
23700rm -f core conftest.err conftest.$ac_objext \
23701 conftest$ac_exeext conftest.$ac_ext
23702LIBS=$ac_check_lib_save_LIBS
6ad6792b 23703fi
5476a9a4
GM
23704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_elf_elf_begin" >&5
23705$as_echo "$ac_cv_lib_elf_elf_begin" >&6; }
23706if test "x$ac_cv_lib_elf_elf_begin" = x""yes; then :
23707 LIBS="-lelf $LIBS"
6ad6792b
GM
23708fi
23709
5476a9a4
GM
23710 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kvm_open in -lkvm" >&5
23711$as_echo_n "checking for kvm_open in -lkvm... " >&6; }
23712if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then :
6c051bab
GM
23713 $as_echo_n "(cached) " >&6
23714else
5476a9a4
GM
23715 ac_check_lib_save_LIBS=$LIBS
23716LIBS="-lkvm $LIBS"
23717cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c051bab 23718/* end confdefs.h. */
3e0be4ab 23719
5476a9a4
GM
23720/* Override any GCC internal prototype to avoid an error.
23721 Use char because int might match the return type of a GCC
23722 builtin and then its argument prototype would still apply. */
23723#ifdef __cplusplus
23724extern "C"
23725#endif
23726char kvm_open ();
6c051bab
GM
23727int
23728main ()
23729{
5476a9a4 23730return kvm_open ();
6c051bab
GM
23731 ;
23732 return 0;
23733}
23734_ACEOF
3e0be4ab 23735if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 23736 ac_cv_lib_kvm_kvm_open=yes
6c051bab 23737else
5476a9a4 23738 ac_cv_lib_kvm_kvm_open=no
6c051bab 23739fi
3e0be4ab
GM
23740rm -f core conftest.err conftest.$ac_objext \
23741 conftest$ac_exeext conftest.$ac_ext
5476a9a4 23742LIBS=$ac_check_lib_save_LIBS
6c051bab 23743fi
5476a9a4
GM
23744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kvm_kvm_open" >&5
23745$as_echo "$ac_cv_lib_kvm_kvm_open" >&6; }
23746if test "x$ac_cv_lib_kvm_kvm_open" = x""yes; then :
23747 LIBS="-lkvm $LIBS"
3e0be4ab 23748fi
6c051bab 23749
5476a9a4
GM
23750 # Check for the 4.4BSD definition of getloadavg.
23751 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lutil" >&5
23752$as_echo_n "checking for getloadavg in -lutil... " >&6; }
23753if test "${ac_cv_lib_util_getloadavg+set}" = set; then :
ae0d7250
PE
23754 $as_echo_n "(cached) " >&6
23755else
5476a9a4
GM
23756 ac_check_lib_save_LIBS=$LIBS
23757LIBS="-lutil $LIBS"
23758cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6d153f56 23759/* end confdefs.h. */
5476a9a4
GM
23760
23761/* Override any GCC internal prototype to avoid an error.
23762 Use char because int might match the return type of a GCC
23763 builtin and then its argument prototype would still apply. */
23764#ifdef __cplusplus
23765extern "C"
23766#endif
23767char getloadavg ();
ae0d7250
PE
23768int
23769main ()
23770{
5476a9a4 23771return getloadavg ();
ae0d7250
PE
23772 ;
23773 return 0;
23774}
23775_ACEOF
3e0be4ab 23776if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 23777 ac_cv_lib_util_getloadavg=yes
ae0d7250 23778else
5476a9a4 23779 ac_cv_lib_util_getloadavg=no
ae0d7250 23780fi
3e0be4ab
GM
23781rm -f core conftest.err conftest.$ac_objext \
23782 conftest$ac_exeext conftest.$ac_ext
5476a9a4
GM
23783LIBS=$ac_check_lib_save_LIBS
23784fi
23785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_getloadavg" >&5
23786$as_echo "$ac_cv_lib_util_getloadavg" >&6; }
23787if test "x$ac_cv_lib_util_getloadavg" = x""yes; then :
23788 LIBS="-lutil $LIBS" gl_func_getloadavg_done=yes
3e0be4ab 23789fi
6d153f56 23790
5476a9a4 23791 fi
6d153f56 23792
5476a9a4
GM
23793 if test $gl_func_getloadavg_done = no; then
23794 # There is a commonly available library for RS/6000 AIX.
23795 # Since it is not a standard part of AIX, it might be installed locally.
23796 gl_getloadavg_LIBS=$LIBS
23797 LIBS="-L/usr/local/lib $LIBS"
23798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lgetloadavg" >&5
23799$as_echo_n "checking for getloadavg in -lgetloadavg... " >&6; }
23800if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then :
f199cab1 23801 $as_echo_n "(cached) " >&6
3e0be4ab 23802else
f199cab1 23803 ac_check_lib_save_LIBS=$LIBS
5476a9a4 23804LIBS="-lgetloadavg $LIBS"
f199cab1
GM
23805cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23806/* end confdefs.h. */
3e0be4ab 23807
f199cab1
GM
23808/* Override any GCC internal prototype to avoid an error.
23809 Use char because int might match the return type of a GCC
23810 builtin and then its argument prototype would still apply. */
23811#ifdef __cplusplus
23812extern "C"
23813#endif
5476a9a4 23814char getloadavg ();
f199cab1
GM
23815int
23816main ()
23817{
5476a9a4 23818return getloadavg ();
f199cab1
GM
23819 ;
23820 return 0;
23821}
ae0d7250 23822_ACEOF
f199cab1 23823if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 23824 ac_cv_lib_getloadavg_getloadavg=yes
f199cab1 23825else
5476a9a4 23826 ac_cv_lib_getloadavg_getloadavg=no
ae0d7250 23827fi
f199cab1
GM
23828rm -f core conftest.err conftest.$ac_objext \
23829 conftest$ac_exeext conftest.$ac_ext
23830LIBS=$ac_check_lib_save_LIBS
3e0be4ab 23831fi
5476a9a4
GM
23832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_getloadavg_getloadavg" >&5
23833$as_echo "$ac_cv_lib_getloadavg_getloadavg" >&6; }
23834if test "x$ac_cv_lib_getloadavg_getloadavg" = x""yes; then :
23835 LIBS="-lgetloadavg $LIBS" gl_func_getloadavg_done=yes
23836else
23837 LIBS=$gl_getloadavg_LIBS
6d153f56 23838fi
ae0d7250 23839
5476a9a4 23840 fi
16c3e636 23841
5476a9a4
GM
23842 # Set up the replacement function if necessary.
23843 if test $gl_func_getloadavg_done = no; then
23844 HAVE_GETLOADAVG=0
16c3e636 23845
5476a9a4
GM
23846 # Solaris has libkstat which does not require root.
23847 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kstat_open in -lkstat" >&5
23848$as_echo_n "checking for kstat_open in -lkstat... " >&6; }
23849if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then :
f199cab1
GM
23850 $as_echo_n "(cached) " >&6
23851else
23852 ac_check_lib_save_LIBS=$LIBS
5476a9a4 23853LIBS="-lkstat $LIBS"
f199cab1
GM
23854cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23855/* end confdefs.h. */
5f90be1b 23856
f199cab1
GM
23857/* Override any GCC internal prototype to avoid an error.
23858 Use char because int might match the return type of a GCC
23859 builtin and then its argument prototype would still apply. */
23860#ifdef __cplusplus
23861extern "C"
23862#endif
5476a9a4 23863char kstat_open ();
f199cab1
GM
23864int
23865main ()
23866{
5476a9a4 23867return kstat_open ();
f199cab1
GM
23868 ;
23869 return 0;
23870}
3e0be4ab 23871_ACEOF
f199cab1 23872if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 23873 ac_cv_lib_kstat_kstat_open=yes
f199cab1 23874else
5476a9a4 23875 ac_cv_lib_kstat_kstat_open=no
5f90be1b 23876fi
f199cab1
GM
23877rm -f core conftest.err conftest.$ac_objext \
23878 conftest$ac_exeext conftest.$ac_ext
23879LIBS=$ac_check_lib_save_LIBS
3e0be4ab 23880fi
5476a9a4
GM
23881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kstat_kstat_open" >&5
23882$as_echo "$ac_cv_lib_kstat_kstat_open" >&6; }
23883if test "x$ac_cv_lib_kstat_kstat_open" = x""yes; then :
3e0be4ab 23884 cat >>confdefs.h <<_ACEOF
5476a9a4 23885#define HAVE_LIBKSTAT 1
3e0be4ab 23886_ACEOF
5f90be1b 23887
5476a9a4 23888 LIBS="-lkstat $LIBS"
5f90be1b 23889
f199cab1 23890fi
5f90be1b 23891
5476a9a4 23892 test $ac_cv_lib_kstat_kstat_open = yes && gl_func_getloadavg_done=yes
da6c8463 23893
5476a9a4
GM
23894 # AIX has libperfstat which does not require root
23895 if test $gl_func_getloadavg_done = no; then
23896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for perfstat_cpu_total in -lperfstat" >&5
23897$as_echo_n "checking for perfstat_cpu_total in -lperfstat... " >&6; }
23898if test "${ac_cv_lib_perfstat_perfstat_cpu_total+set}" = set; then :
f199cab1
GM
23899 $as_echo_n "(cached) " >&6
23900else
5476a9a4
GM
23901 ac_check_lib_save_LIBS=$LIBS
23902LIBS="-lperfstat $LIBS"
23903cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5f90be1b 23904/* end confdefs.h. */
5476a9a4
GM
23905
23906/* Override any GCC internal prototype to avoid an error.
23907 Use char because int might match the return type of a GCC
23908 builtin and then its argument prototype would still apply. */
23909#ifdef __cplusplus
23910extern "C"
23911#endif
23912char perfstat_cpu_total ();
5f90be1b
PE
23913int
23914main ()
23915{
5476a9a4 23916return perfstat_cpu_total ();
5f90be1b
PE
23917 ;
23918 return 0;
23919}
23920_ACEOF
5476a9a4
GM
23921if ac_fn_c_try_link "$LINENO"; then :
23922 ac_cv_lib_perfstat_perfstat_cpu_total=yes
f199cab1 23923else
5476a9a4 23924 ac_cv_lib_perfstat_perfstat_cpu_total=no
f199cab1 23925fi
5476a9a4
GM
23926rm -f core conftest.err conftest.$ac_objext \
23927 conftest$ac_exeext conftest.$ac_ext
23928LIBS=$ac_check_lib_save_LIBS
f199cab1 23929fi
5476a9a4
GM
23930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_perfstat_perfstat_cpu_total" >&5
23931$as_echo "$ac_cv_lib_perfstat_perfstat_cpu_total" >&6; }
23932if test "x$ac_cv_lib_perfstat_perfstat_cpu_total" = x""yes; then :
23933 cat >>confdefs.h <<_ACEOF
23934#define HAVE_LIBPERFSTAT 1
23935_ACEOF
23936
23937 LIBS="-lperfstat $LIBS"
23938
23939fi
23940
23941 test $ac_cv_lib_perfstat_perfstat_cpu_total = yes && gl_func_getloadavg_done=yes
23942 fi
23943
23944 if test $gl_func_getloadavg_done = no; then
23945 ac_fn_c_check_header_mongrel "$LINENO" "sys/dg_sys_info.h" "ac_cv_header_sys_dg_sys_info_h" "$ac_includes_default"
23946if test "x$ac_cv_header_sys_dg_sys_info_h" = x""yes; then :
23947 gl_func_getloadavg_done=yes
23948
23949$as_echo "#define DGUX 1" >>confdefs.h
23950
23951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dg_sys_info in -ldgc" >&5
23952$as_echo_n "checking for dg_sys_info in -ldgc... " >&6; }
23953if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then :
f199cab1
GM
23954 $as_echo_n "(cached) " >&6
23955else
23956 ac_check_lib_save_LIBS=$LIBS
5476a9a4 23957LIBS="-ldgc $LIBS"
f199cab1
GM
23958cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23959/* end confdefs.h. */
3e0be4ab 23960
f199cab1
GM
23961/* Override any GCC internal prototype to avoid an error.
23962 Use char because int might match the return type of a GCC
23963 builtin and then its argument prototype would still apply. */
23964#ifdef __cplusplus
23965extern "C"
23966#endif
5476a9a4 23967char dg_sys_info ();
f199cab1
GM
23968int
23969main ()
23970{
5476a9a4 23971return dg_sys_info ();
f199cab1
GM
23972 ;
23973 return 0;
23974}
23975_ACEOF
23976if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 23977 ac_cv_lib_dgc_dg_sys_info=yes
f199cab1 23978else
5476a9a4 23979 ac_cv_lib_dgc_dg_sys_info=no
5f90be1b 23980fi
3e0be4ab
GM
23981rm -f core conftest.err conftest.$ac_objext \
23982 conftest$ac_exeext conftest.$ac_ext
f199cab1 23983LIBS=$ac_check_lib_save_LIBS
5f90be1b 23984fi
5476a9a4
GM
23985{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dgc_dg_sys_info" >&5
23986$as_echo "$ac_cv_lib_dgc_dg_sys_info" >&6; }
23987if test "x$ac_cv_lib_dgc_dg_sys_info" = x""yes; then :
23988 cat >>confdefs.h <<_ACEOF
23989#define HAVE_LIBDGC 1
23990_ACEOF
23991
23992 LIBS="-ldgc $LIBS"
23993
da6c8463
GM
23994fi
23995
5476a9a4
GM
23996fi
23997
23998
23999 fi
24000 fi
24001fi
24002
24003
24004if test "x$gl_save_LIBS" = x; then
24005 GETLOADAVG_LIBS=$LIBS
f199cab1 24006else
5476a9a4
GM
24007 GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$gl_save_LIBS!!"`
24008fi
24009LIBS=$gl_save_LIBS
24010
24011
24012# Test whether the system declares getloadavg. Solaris has the function
24013# but declares it in <sys/loadavg.h>, not <stdlib.h>.
24014for ac_header in sys/loadavg.h
24015do :
24016 ac_fn_c_check_header_mongrel "$LINENO" "sys/loadavg.h" "ac_cv_header_sys_loadavg_h" "$ac_includes_default"
24017if test "x$ac_cv_header_sys_loadavg_h" = x""yes; then :
24018 cat >>confdefs.h <<_ACEOF
24019#define HAVE_SYS_LOADAVG_H 1
f199cab1 24020_ACEOF
5476a9a4 24021
f199cab1 24022fi
5476a9a4
GM
24023
24024done
24025
24026if test $ac_cv_header_sys_loadavg_h = yes; then
24027 HAVE_SYS_LOADAVG_H=1
24028else
24029 HAVE_SYS_LOADAVG_H=0
f199cab1 24030fi
5476a9a4
GM
24031ac_fn_c_check_decl "$LINENO" "getloadavg" "ac_cv_have_decl_getloadavg" "#if HAVE_SYS_LOADAVG_H
24032 # include <sys/loadavg.h>
24033 #endif
24034 #include <stdlib.h>
24035"
24036if test "x$ac_cv_have_decl_getloadavg" = x""yes; then :
5f90be1b 24037
f199cab1 24038else
5476a9a4 24039 HAVE_DECL_GETLOADAVG=0
f199cab1 24040fi
5f90be1b 24041
5f90be1b 24042
a6342fc8 24043 if test $HAVE_GETLOADAVG = 0; then
5476a9a4
GM
24044
24045
24046
24047
24048
24049
24050
24051
24052 gl_LIBOBJS="$gl_LIBOBJS getloadavg.$ac_objext"
24053
24054
24055# Figure out what our getloadavg.c needs.
24056
24057
24058
24059# On HPUX9, an unprivileged user can get load averages this way.
24060if test $gl_func_getloadavg_done = no; then
24061 for ac_func in pstat_getdynamic
24062do :
24063 ac_fn_c_check_func "$LINENO" "pstat_getdynamic" "ac_cv_func_pstat_getdynamic"
24064if test "x$ac_cv_func_pstat_getdynamic" = x""yes; then :
24065 cat >>confdefs.h <<_ACEOF
24066#define HAVE_PSTAT_GETDYNAMIC 1
24067_ACEOF
24068 gl_func_getloadavg_done=yes
3e0be4ab 24069fi
5476a9a4 24070done
6ad6792b 24071
5476a9a4 24072fi
6ad6792b 24073
5476a9a4
GM
24074# We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
24075# uses stabs), but it is still SVR4. We cannot check for <elf.h> because
24076# Irix 4.0.5F has the header but not the library.
24077if test $gl_func_getloadavg_done = no && test "$ac_cv_lib_elf_elf_begin" = yes \
24078 && test "$ac_cv_lib_kvm_kvm_open" = yes; then
24079 gl_func_getloadavg_done=yes
6ad6792b 24080
5476a9a4 24081$as_echo "#define SVR4 1" >>confdefs.h
6ad6792b 24082
5476a9a4
GM
24083fi
24084
24085if test $gl_func_getloadavg_done = no; then
24086 ac_fn_c_check_header_mongrel "$LINENO" "inq_stats/cpustats.h" "ac_cv_header_inq_stats_cpustats_h" "$ac_includes_default"
24087if test "x$ac_cv_header_inq_stats_cpustats_h" = x""yes; then :
24088 gl_func_getloadavg_done=yes
24089
24090$as_echo "#define UMAX 1" >>confdefs.h
24091
24092
24093$as_echo "#define UMAX4_3 1" >>confdefs.h
24094
24095fi
24096
24097
24098fi
24099
24100if test $gl_func_getloadavg_done = no; then
24101 ac_fn_c_check_header_mongrel "$LINENO" "sys/cpustats.h" "ac_cv_header_sys_cpustats_h" "$ac_includes_default"
24102if test "x$ac_cv_header_sys_cpustats_h" = x""yes; then :
24103 gl_func_getloadavg_done=yes; $as_echo "#define UMAX 1" >>confdefs.h
24104
24105fi
24106
24107
24108fi
24109
24110if test $gl_func_getloadavg_done = no; then
24111 for ac_header in mach/mach.h
24112do :
24113 ac_fn_c_check_header_mongrel "$LINENO" "mach/mach.h" "ac_cv_header_mach_mach_h" "$ac_includes_default"
24114if test "x$ac_cv_header_mach_mach_h" = x""yes; then :
24115 cat >>confdefs.h <<_ACEOF
24116#define HAVE_MACH_MACH_H 1
24117_ACEOF
24118
24119fi
24120
24121done
24122
24123fi
24124
24125for ac_header in nlist.h
24126do :
24127 ac_fn_c_check_header_mongrel "$LINENO" "nlist.h" "ac_cv_header_nlist_h" "$ac_includes_default"
24128if test "x$ac_cv_header_nlist_h" = x""yes; then :
24129 cat >>confdefs.h <<_ACEOF
24130#define HAVE_NLIST_H 1
24131_ACEOF
24132 ac_fn_c_check_member "$LINENO" "struct nlist" "n_un.n_name" "ac_cv_member_struct_nlist_n_un_n_name" "#include <nlist.h>
24133"
24134if test "x$ac_cv_member_struct_nlist_n_un_n_name" = x""yes; then :
24135
24136cat >>confdefs.h <<_ACEOF
24137#define HAVE_STRUCT_NLIST_N_UN_N_NAME 1
24138_ACEOF
6ad6792b 24139
0eb775a3 24140
f199cab1 24141fi
3e0be4ab 24142
5476a9a4 24143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 24144/* end confdefs.h. */
5476a9a4 24145#include <nlist.h>
f199cab1
GM
24146int
24147main ()
24148{
5476a9a4
GM
24149struct nlist x;
24150 #ifdef HAVE_STRUCT_NLIST_N_UN_N_NAME
24151 x.n_un.n_name = "";
24152 #else
24153 x.n_name = "";
24154 #endif
f199cab1
GM
24155 ;
24156 return 0;
24157}
24158_ACEOF
5476a9a4 24159if ac_fn_c_try_link "$LINENO"; then :
6ad6792b 24160
5476a9a4 24161$as_echo "#define N_NAME_POINTER 1" >>confdefs.h
6ad6792b
GM
24162
24163fi
5476a9a4
GM
24164rm -f core conftest.err conftest.$ac_objext \
24165 conftest$ac_exeext conftest.$ac_ext
6ad6792b 24166
5476a9a4 24167fi
6ad6792b 24168
5476a9a4 24169done
6ad6792b 24170
a6342fc8 24171 fi
ca36e0ff 24172
ca36e0ff
GM
24173
24174
1f5d53eb
PE
24175
24176
5476a9a4 24177 GNULIB_GETLOADAVG=1
1f5d53eb
PE
24178
24179
24180
24181
24182
24183
24184
1f5d53eb 24185
1f5d53eb 24186
3e0be4ab 24187
a6342fc8 24188 if test $REPLACE_GETOPT = 1; then
3e0be4ab 24189
1f5d53eb
PE
24190
24191
1f5d53eb 24192
1f5d53eb
PE
24193
24194
24195
24196
5476a9a4 24197 gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
0eb775a3
GM
24198
24199
1f5d53eb
PE
24200
24201
16c3e636 24202
5476a9a4
GM
24203
24204
24205
24206
24207 gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
24208
24209
24210
24211
a6342fc8
GM
24212 GNULIB_GL_UNISTD_H_GETOPT=1
24213 fi
16c3e636
PE
24214
24215
24216
4fda9c95
GM
24217
24218
24219
24220
5476a9a4
GM
24221 REPLACE_GETOPT=0
24222 if test -n "$gl_replace_getopt"; then
24223 REPLACE_GETOPT=1
24224 fi
24225
24226 if test $REPLACE_GETOPT = 1; then
24227
24228 GETOPT_H=getopt.h
24229
24230$as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
24231
24232
24233
24234 fi
24235
a6342fc8 24236 if test $REPLACE_GETOPT = 1; then
5476a9a4
GM
24237
24238
24239
24240
24241
24242
24243
24244
24245 gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
24246
24247
24248
24249
24250
24251
24252
24253
24254
24255 gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
4fda9c95
GM
24256
24257
24258
24259
a6342fc8
GM
24260 GNULIB_GL_UNISTD_H_GETOPT=1
24261 fi
4fda9c95
GM
24262
24263
24264
24265
4fda9c95 24266
4fda9c95 24267
4fda9c95 24268
5476a9a4
GM
24269
24270
24271
24272
24273
24274 gl_gettimeofday_timezone=void
24275 if test $ac_cv_func_gettimeofday != yes; then
24276 HAVE_GETTIMEOFDAY=0
f199cab1 24277 else
4fda9c95
GM
24278
24279
3e0be4ab 24280
5476a9a4
GM
24281 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5
24282$as_echo_n "checking whether gettimeofday clobbers localtime buffer... " >&6; }
24283if test "${gl_cv_func_gettimeofday_clobber+set}" = set; then :
24284 $as_echo_n "(cached) " >&6
24285else
24286 if test "$cross_compiling" = yes; then :
24287 # When cross-compiling:
24288 case "$host_os" in
24289 # Guess all is fine on glibc systems.
24290 *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
24291 # If we don't know, assume the worst.
24292 *) gl_cv_func_gettimeofday_clobber="guessing yes" ;;
24293 esac
4fda9c95 24294
5476a9a4
GM
24295else
24296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24297/* end confdefs.h. */
24298#include <string.h>
24299 #include <sys/time.h>
24300 #include <time.h>
24301 #include <stdlib.h>
4fda9c95 24302
5476a9a4
GM
24303int
24304main ()
24305{
4fda9c95 24306
5476a9a4
GM
24307 time_t t = 0;
24308 struct tm *lt;
24309 struct tm saved_lt;
24310 struct timeval tv;
24311 lt = localtime (&t);
24312 saved_lt = *lt;
24313 gettimeofday (&tv, NULL);
24314 return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
cc322c06 24315
5476a9a4
GM
24316 ;
24317 return 0;
24318}
24319_ACEOF
24320if ac_fn_c_try_run "$LINENO"; then :
24321 gl_cv_func_gettimeofday_clobber=no
24322else
24323 gl_cv_func_gettimeofday_clobber=yes
24324fi
24325rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24326 conftest.$ac_objext conftest.beam conftest.$ac_ext
24327fi
cc322c06 24328
5476a9a4
GM
24329fi
24330{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5
24331$as_echo "$gl_cv_func_gettimeofday_clobber" >&6; }
cc322c06 24332
5476a9a4
GM
24333 case "$gl_cv_func_gettimeofday_clobber" in
24334 *yes)
24335 REPLACE_GETTIMEOFDAY=1
cc322c06 24336
4fda9c95 24337
5476a9a4 24338$as_echo "#define gmtime rpl_gmtime" >>confdefs.h
4fda9c95 24339
ae0d7250 24340
5476a9a4 24341$as_echo "#define localtime rpl_localtime" >>confdefs.h
ae0d7250
PE
24342
24343
ae0d7250 24344
5476a9a4
GM
24345$as_echo "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h
24346
24347 ;;
24348 esac
24349
24350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
24351$as_echo_n "checking for gettimeofday with POSIX signature... " >&6; }
24352if test "${gl_cv_func_gettimeofday_posix_signature+set}" = set; then :
f199cab1
GM
24353 $as_echo_n "(cached) " >&6
24354else
5476a9a4
GM
24355 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24356/* end confdefs.h. */
24357#include <sys/time.h>
24358 struct timeval c;
24359 int gettimeofday (struct timeval *restrict, void *restrict);
24360
24361int
24362main ()
24363{
24364/* glibc uses struct timezone * rather than the POSIX void *
24365 if _GNU_SOURCE is defined. However, since the only portable
24366 use of gettimeofday uses NULL as the second parameter, and
24367 since the glibc definition is actually more typesafe, it is
24368 not worth wrapping this to get a compliant signature. */
24369 int (*f) (struct timeval *restrict, void *restrict)
24370 = gettimeofday;
24371 int x = f (&c, 0);
24372 return !(x | c.tv_sec | c.tv_usec);
24373
24374 ;
24375 return 0;
24376}
24377_ACEOF
24378if ac_fn_c_try_compile "$LINENO"; then :
24379 gl_cv_func_gettimeofday_posix_signature=yes
24380else
24381 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 24382/* end confdefs.h. */
5476a9a4
GM
24383#include <sys/time.h>
24384int gettimeofday (struct timeval *restrict, struct timezone *restrict);
ae0d7250 24385
f199cab1
GM
24386int
24387main ()
24388{
5476a9a4 24389
f199cab1
GM
24390 ;
24391 return 0;
ae0d7250
PE
24392}
24393_ACEOF
5476a9a4
GM
24394if ac_fn_c_try_compile "$LINENO"; then :
24395 gl_cv_func_gettimeofday_posix_signature=almost
ae0d7250 24396else
5476a9a4 24397 gl_cv_func_gettimeofday_posix_signature=no
ae0d7250 24398fi
5476a9a4 24399rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ae0d7250 24400fi
5476a9a4 24401rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52724a05 24402fi
5476a9a4
GM
24403{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
24404$as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; }
24405 if test $gl_cv_func_gettimeofday_posix_signature = almost; then
24406 gl_gettimeofday_timezone='struct timezone'
24407 elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
24408 REPLACE_GETTIMEOFDAY=1
24409 fi
24410 if test $REPLACE_STRUCT_TIMEVAL = 1; then
24411 REPLACE_GETTIMEOFDAY=1
24412 fi
3e0be4ab 24413
5476a9a4 24414 fi
ae0d7250 24415
5476a9a4
GM
24416cat >>confdefs.h <<_ACEOF
24417#define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone
24418_ACEOF
f199cab1 24419
ae0d7250 24420
a6342fc8 24421 if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
ae0d7250 24422
cc322c06
GM
24423
24424
cc322c06
GM
24425
24426
ae0d7250
PE
24427
24428
24429
5476a9a4 24430 gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
5fa4ac76
PE
24431
24432
5476a9a4
GM
24433 for ac_header in sys/timeb.h
24434do :
24435 ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
24436if test "x$ac_cv_header_sys_timeb_h" = x""yes; then :
24437 cat >>confdefs.h <<_ACEOF
24438#define HAVE_SYS_TIMEB_H 1
24439_ACEOF
5fa4ac76 24440
3e0be4ab 24441fi
5fa4ac76 24442
5476a9a4 24443done
f199cab1 24444
5476a9a4
GM
24445 for ac_func in _ftime
24446do :
24447 ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
24448if test "x$ac_cv_func__ftime" = x""yes; then :
24449 cat >>confdefs.h <<_ACEOF
24450#define HAVE__FTIME 1
24451_ACEOF
5fa4ac76 24452
5476a9a4
GM
24453fi
24454done
5fa4ac76
PE
24455
24456
a6342fc8 24457 fi
5fa4ac76
PE
24458
24459
24460
24461
24462
5476a9a4 24463 GNULIB_GETTIMEOFDAY=1
5fa4ac76
PE
24464
24465
24466
24467
0eb775a3
GM
24468
24469
369e19fc
PE
24470
24471
369e19fc
PE
24472
24473
5476a9a4
GM
24474 if test $ac_cv_func_lstat = yes; then
24475
24476 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
24477 *no)
24478 REPLACE_LSTAT=1
24479 ;;
24480 esac
24481 else
24482 HAVE_LSTAT=0
f199cab1 24483 fi
369e19fc 24484
a6342fc8 24485 if test $REPLACE_LSTAT = 1; then
369e19fc 24486
5fa4ac76 24487
369e19fc 24488
369e19fc 24489
369e19fc 24490
369e19fc 24491
369e19fc 24492
369e19fc 24493
5476a9a4 24494 gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
f199cab1 24495
45d4966b 24496 :
a6342fc8 24497 fi
369e19fc 24498
369e19fc 24499
369e19fc 24500
5fa4ac76
PE
24501
24502
5476a9a4 24503 GNULIB_LSTAT=1
5fa4ac76 24504
5fa4ac76 24505
27505cf5 24506
27505cf5 24507
27505cf5 24508
27505cf5 24509
27505cf5 24510
27505cf5 24511
5fa4ac76
PE
24512
24513
283c7aed
GM
24514 if test $ac_cv_have_decl_memrchr = no; then
24515 HAVE_DECL_MEMRCHR=0
24516 fi
24517
24518 for ac_func in memrchr
24519do :
24520 ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr"
24521if test "x$ac_cv_func_memrchr" = x""yes; then :
24522 cat >>confdefs.h <<_ACEOF
24523#define HAVE_MEMRCHR 1
24524_ACEOF
24525
24526fi
24527done
24528
24529
24530 if test $ac_cv_func_memrchr = no; then
24531
24532
24533
24534
24535
24536
24537
24538
24539 gl_LIBOBJS="$gl_LIBOBJS memrchr.$ac_objext"
24540
24541 :
24542 fi
24543
24544
24545
24546
24547
24548 GNULIB_MEMRCHR=1
24549
24550
24551
24552
24553
24554
24555
24556
24557
24558
5476a9a4 24559
e412eb97
GM
24560 if test $ac_cv_func_mkostemp != yes; then
24561 HAVE_MKOSTEMP=0
24562 fi
24563
24564 if test $HAVE_MKOSTEMP = 0; then
24565
24566
24567
24568
24569
24570
24571
24572
24573 gl_LIBOBJS="$gl_LIBOBJS mkostemp.$ac_objext"
24574
24575
24576
24577 fi
24578
24579
24580cat >>confdefs.h <<_ACEOF
24581#define GNULIB_MKOSTEMP 1
24582_ACEOF
24583
24584
24585
24586
24587
24588
24589
24590 GNULIB_MKOSTEMP=1
24591
24592
24593
24594
24595
24596
24597
24598
24599
24600
24601
5476a9a4
GM
24602 if test $APPLE_UNIVERSAL_BUILD = 1; then
24603 # A universal build on Apple Mac OS X platforms.
24604 # The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode.
24605 # But we need a configuration result that is valid in both modes.
24606 gl_cv_func_working_mktime=no
24607 fi
24608 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5
24609$as_echo_n "checking for working mktime... " >&6; }
24610if test "${gl_cv_func_working_mktime+set}" = set; then :
f199cab1
GM
24611 $as_echo_n "(cached) " >&6
24612else
5476a9a4
GM
24613 if test "$cross_compiling" = yes; then :
24614 gl_cv_func_working_mktime=no
24615else
24616 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 24617/* end confdefs.h. */
5476a9a4
GM
24618/* Test program from Paul Eggert and Tony Leneis. */
24619#include <limits.h>
24620#include <stdlib.h>
24621#include <time.h>
5fa4ac76 24622
5476a9a4
GM
24623#ifdef HAVE_UNISTD_H
24624# include <unistd.h>
f199cab1 24625#endif
5476a9a4 24626
2393bc74
GM
24627#if HAVE_DECL_ALARM
24628# include <signal.h>
5476a9a4
GM
24629#endif
24630
24631/* Work around redefinition to rpl_putenv by other config tests. */
24632#undef putenv
24633
24634static time_t time_t_max;
24635static time_t time_t_min;
24636
24637/* Values we'll use to set the TZ environment variable. */
24638static char *tz_strings[] = {
24639 (char *) 0, "TZ=GMT0", "TZ=JST-9",
24640 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
24641};
24642#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
24643
24644/* Return 0 if mktime fails to convert a date in the spring-forward gap.
24645 Based on a problem report from Andreas Jaeger. */
24646static int
24647spring_forward_gap ()
f199cab1 24648{
5476a9a4
GM
24649 /* glibc (up to about 1998-10-07) failed this test. */
24650 struct tm tm;
24651
24652 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
24653 instead of "TZ=America/Vancouver" in order to detect the bug even
24654 on systems that don't support the Olson extension, or don't have the
24655 full zoneinfo tables installed. */
24656 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
24657
24658 tm.tm_year = 98;
24659 tm.tm_mon = 3;
24660 tm.tm_mday = 5;
24661 tm.tm_hour = 2;
24662 tm.tm_min = 0;
24663 tm.tm_sec = 0;
24664 tm.tm_isdst = -1;
24665 return mktime (&tm) != (time_t) -1;
f199cab1 24666}
5fa4ac76 24667
5476a9a4
GM
24668static int
24669mktime_test1 (time_t now)
24670{
24671 struct tm *lt;
24672 return ! (lt = localtime (&now)) || mktime (lt) == now;
24673}
5fa4ac76 24674
5476a9a4
GM
24675static int
24676mktime_test (time_t now)
24677{
24678 return (mktime_test1 (now)
24679 && mktime_test1 ((time_t) (time_t_max - now))
24680 && mktime_test1 ((time_t) (time_t_min + now)));
24681}
067d23c9 24682
5476a9a4
GM
24683static int
24684irix_6_4_bug ()
24685{
24686 /* Based on code from Ariel Faigon. */
24687 struct tm tm;
24688 tm.tm_year = 96;
24689 tm.tm_mon = 3;
24690 tm.tm_mday = 0;
24691 tm.tm_hour = 0;
24692 tm.tm_min = 0;
24693 tm.tm_sec = 0;
24694 tm.tm_isdst = -1;
24695 mktime (&tm);
24696 return tm.tm_mon == 2 && tm.tm_mday == 31;
24697}
24698
24699static int
24700bigtime_test (int j)
24701{
24702 struct tm tm;
24703 time_t now;
24704 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
24705 now = mktime (&tm);
24706 if (now != (time_t) -1)
24707 {
24708 struct tm *lt = localtime (&now);
24709 if (! (lt
24710 && lt->tm_year == tm.tm_year
24711 && lt->tm_mon == tm.tm_mon
24712 && lt->tm_mday == tm.tm_mday
24713 && lt->tm_hour == tm.tm_hour
24714 && lt->tm_min == tm.tm_min
24715 && lt->tm_sec == tm.tm_sec
24716 && lt->tm_yday == tm.tm_yday
24717 && lt->tm_wday == tm.tm_wday
24718 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
24719 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
24720 return 0;
24721 }
24722 return 1;
24723}
369e19fc 24724
5476a9a4
GM
24725static int
24726year_2050_test ()
24727{
24728 /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
24729 ignoring leap seconds. */
24730 unsigned long int answer = 2527315200UL;
369e19fc 24731
5476a9a4
GM
24732 struct tm tm;
24733 time_t t;
24734 tm.tm_year = 2050 - 1900;
24735 tm.tm_mon = 2 - 1;
24736 tm.tm_mday = 1;
24737 tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
24738 tm.tm_isdst = -1;
369e19fc 24739
5476a9a4
GM
24740 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
24741 instead of "TZ=America/Vancouver" in order to detect the bug even
24742 on systems that don't support the Olson extension, or don't have the
24743 full zoneinfo tables installed. */
24744 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
067d23c9 24745
5476a9a4 24746 t = mktime (&tm);
067d23c9 24747
5476a9a4
GM
24748 /* Check that the result is either a failure, or close enough
24749 to the correct answer that we can assume the discrepancy is
24750 due to leap seconds. */
24751 return (t == (time_t) -1
24752 || (0 < t && answer - 120 <= t && t <= answer + 120));
24753}
067d23c9 24754
f199cab1
GM
24755int
24756main ()
24757{
5476a9a4
GM
24758 int result = 0;
24759 time_t t, delta;
24760 int i, j;
24761 int time_t_signed_magnitude = (time_t) ~ (time_t) 0 < (time_t) -1;
24762 int time_t_signed = ! ((time_t) 0 < (time_t) -1);
067d23c9 24763
2393bc74 24764#if HAVE_DECL_ALARM
5476a9a4
GM
24765 /* This test makes some buggy mktime implementations loop.
24766 Give up after 60 seconds; a mktime slower than that
24767 isn't worth using anyway. */
2393bc74 24768 signal (SIGALRM, SIG_DFL);
5476a9a4 24769 alarm (60);
2393bc74 24770#endif
067d23c9 24771
5476a9a4
GM
24772 time_t_max = (! time_t_signed
24773 ? (time_t) -1
24774 : ((((time_t) 1 << (sizeof (time_t) * CHAR_BIT - 2)) - 1)
24775 * 2 + 1));
24776 time_t_min = (! time_t_signed
24777 ? (time_t) 0
24778 : time_t_signed_magnitude
24779 ? ~ (time_t) 0
24780 : ~ time_t_max);
3e0be4ab 24781
5476a9a4
GM
24782 delta = time_t_max / 997; /* a suitable prime number */
24783 for (i = 0; i < N_STRINGS; i++)
24784 {
24785 if (tz_strings[i])
24786 putenv (tz_strings[i]);
3e0be4ab 24787
5476a9a4
GM
24788 for (t = 0; t <= time_t_max - delta && (result & 1) == 0; t += delta)
24789 if (! mktime_test (t))
24790 result |= 1;
24791 if ((result & 2) == 0
24792 && ! (mktime_test ((time_t) 1)
24793 && mktime_test ((time_t) (60 * 60))
24794 && mktime_test ((time_t) (60 * 60 * 24))))
24795 result |= 2;
f199cab1 24796
5476a9a4
GM
24797 for (j = 1; (result & 4) == 0; j <<= 1)
24798 {
24799 if (! bigtime_test (j))
24800 result |= 4;
24801 if (INT_MAX / 2 < j)
24802 break;
24803 }
24804 if ((result & 8) == 0 && ! bigtime_test (INT_MAX))
24805 result |= 8;
24806 }
24807 if (! irix_6_4_bug ())
24808 result |= 16;
24809 if (! spring_forward_gap ())
24810 result |= 32;
24811 if (! year_2050_test ())
24812 result |= 64;
24813 return result;
067d23c9
KY
24814}
24815_ACEOF
5476a9a4
GM
24816if ac_fn_c_try_run "$LINENO"; then :
24817 gl_cv_func_working_mktime=yes
067d23c9 24818else
5476a9a4 24819 gl_cv_func_working_mktime=no
3e0be4ab 24820fi
5476a9a4
GM
24821rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24822 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1
GM
24823fi
24824
f199cab1 24825
5476a9a4
GM
24826fi
24827{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_mktime" >&5
24828$as_echo "$gl_cv_func_working_mktime" >&6; }
f199cab1 24829
5476a9a4
GM
24830 if test $gl_cv_func_working_mktime = no; then
24831 REPLACE_MKTIME=1
24832 else
24833 REPLACE_MKTIME=0
f199cab1 24834 fi
f199cab1 24835
a6342fc8 24836 if test $REPLACE_MKTIME = 1; then
f199cab1 24837
f199cab1 24838
0eb775a3 24839
067d23c9 24840
a451f14b 24841
a451f14b 24842
743c80a7
PE
24843
24844
5476a9a4
GM
24845 gl_LIBOBJS="$gl_LIBOBJS mktime.$ac_objext"
24846
a6342fc8
GM
24847 :
24848 fi
a451f14b
PE
24849
24850
24851
e275c824
PE
24852
24853
5476a9a4 24854 GNULIB_MKTIME=1
e275c824
PE
24855
24856
24857
24858
24859
24860
24861
24862
d87ffdb7 24863
5476a9a4
GM
24864
24865
0cdca42a
GM
24866
24867 if test $ac_cv_func_pipe2 != yes; then
24868 HAVE_PIPE2=0
24869 fi
24870
24871
24872
24873
24874
24875
24876 GNULIB_PIPE2=1
24877
24878
24879
24880
24881
24882
24883
24884
24885
24886
5476a9a4
GM
24887 if test $ac_cv_func_pselect = yes; then
24888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether signature of pselect conforms to POSIX" >&5
24889$as_echo_n "checking whether signature of pselect conforms to POSIX... " >&6; }
24890if test "${gl_cv_sig_pselect+set}" = set; then :
e275c824
PE
24891 $as_echo_n "(cached) " >&6
24892else
5476a9a4 24893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
e275c824 24894/* end confdefs.h. */
5476a9a4 24895#include <sys/select.h>
e275c824 24896
f199cab1
GM
24897int
24898main ()
24899{
5476a9a4
GM
24900int (*p) (int, fd_set *, fd_set *, fd_set *restrict,
24901 struct timespec const *restrict,
24902 sigset_t const *restrict) = pselect;
24903 return !p;
f199cab1
GM
24904 ;
24905 return 0;
24906}
e275c824 24907_ACEOF
f199cab1 24908if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 24909 gl_cv_sig_pselect=yes
3e0be4ab 24910else
5476a9a4 24911 gl_cv_sig_pselect=no
f199cab1
GM
24912fi
24913rm -f core conftest.err conftest.$ac_objext \
24914 conftest$ac_exeext conftest.$ac_ext
3e0be4ab 24915fi
5476a9a4
GM
24916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sig_pselect" >&5
24917$as_echo "$gl_cv_sig_pselect" >&6; }
b6c9d18d
GM
24918
24919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pselect detects invalid fds" >&5
24920$as_echo_n "checking whether pselect detects invalid fds... " >&6; }
24921if test "${gl_cv_func_pselect_detects_ebadf+set}" = set; then :
24922 $as_echo_n "(cached) " >&6
24923else
24924
24925 if test "$cross_compiling" = yes; then :
24926
24927 case "$host_os" in
24928 # Guess yes on glibc systems.
24929 *-gnu*) gl_cv_func_pselect_detects_ebadf="guessing yes" ;;
24930 # If we don't know, assume the worst.
24931 *) gl_cv_func_pselect_detects_ebadf="guessing no" ;;
24932 esac
24933
24934else
24935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24936/* end confdefs.h. */
24937
24938#include <sys/types.h>
24939#include <sys/time.h>
24940#if HAVE_SYS_SELECT_H
24941# include <sys/select.h>
24942#endif
24943#include <unistd.h>
24944#include <errno.h>
24945
24946int
24947main ()
24948{
24949
24950 fd_set set;
24951 dup2(0, 16);
24952 FD_ZERO(&set);
24953 FD_SET(16, &set);
24954 close(16);
24955 struct timespec timeout;
24956 timeout.tv_sec = 0;
24957 timeout.tv_nsec = 5000;
24958 return pselect (17, &set, NULL, NULL, &timeout, NULL) != -1 || errno != EBADF;
24959
24960 ;
24961 return 0;
24962}
24963_ACEOF
24964if ac_fn_c_try_run "$LINENO"; then :
24965 gl_cv_func_pselect_detects_ebadf=yes
24966else
24967 gl_cv_func_pselect_detects_ebadf=no
24968fi
24969rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24970 conftest.$ac_objext conftest.beam conftest.$ac_ext
24971fi
24972
24973
24974fi
24975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pselect_detects_ebadf" >&5
24976$as_echo "$gl_cv_func_pselect_detects_ebadf" >&6; }
24977 case $gl_cv_func_pselect_detects_ebadf in
24978 *yes) ;;
24979 *) REPLACE_PSELECT=1 ;;
24980 esac
5476a9a4 24981 fi
3e0be4ab 24982
5476a9a4
GM
24983 if test $ac_cv_func_pselect = no || test $gl_cv_sig_pselect = no; then
24984 REPLACE_PSELECT=1
24985 fi
3e0be4ab 24986
a6342fc8 24987 if test $HAVE_PSELECT = 0 || test $REPLACE_PSELECT = 1; then
3e0be4ab
GM
24988
24989
3e0be4ab 24990
3e0be4ab 24991
3e0be4ab 24992
3e0be4ab 24993
3e0be4ab 24994
3e0be4ab 24995
5476a9a4 24996 gl_LIBOBJS="$gl_LIBOBJS pselect.$ac_objext"
3e0be4ab 24997
a6342fc8 24998 fi
3e0be4ab
GM
24999
25000
f199cab1 25001
f199cab1 25002
f199cab1 25003
5476a9a4 25004 GNULIB_PSELECT=1
f199cab1 25005
6d153f56 25006
f199cab1 25007
3e0be4ab 25008
3e0be4ab
GM
25009
25010
f199cab1 25011
0eb775a3
GM
25012
25013
5476a9a4 25014 LIB_PTHREAD_SIGMASK=
0eb775a3 25015
f199cab1 25016
f077f61d
GM
25017
25018
25019 if test "$gl_threads_api" = posix; then
25020 if test $ac_cv_func_pthread_sigmask = yes; then
25021 :
25022 else
25023 if test -n "$LIBMULTITHREAD"; then
25024 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_sigmask in $LIBMULTITHREAD" >&5
25025$as_echo_n "checking for pthread_sigmask in $LIBMULTITHREAD... " >&6; }
25026if test "${gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD+set}" = set; then :
25027 $as_echo_n "(cached) " >&6
25028else
25029 gl_save_LIBS="$LIBS"
25030 LIBS="$LIBS $LIBMULTITHREAD"
25031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25032/* end confdefs.h. */
25033#include <pthread.h>
25034 #include <signal.h>
25035
25036int
25037main ()
25038{
25039return pthread_sigmask (0, (sigset_t *) 0, (sigset_t *) 0);
25040 ;
25041 return 0;
25042}
25043
25044_ACEOF
25045if ac_fn_c_try_link "$LINENO"; then :
25046 gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD=yes
25047else
25048 gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD=no
25049fi
25050rm -f core conftest.err conftest.$ac_objext \
25051 conftest$ac_exeext conftest.$ac_ext
25052 LIBS="$gl_save_LIBS"
25053
25054fi
25055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD" >&5
25056$as_echo "$gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD" >&6; }
25057 if test $gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD = yes; then
25058 LIB_PTHREAD_SIGMASK="$LIBMULTITHREAD"
25059 else
25060 HAVE_PTHREAD_SIGMASK=0
25061 fi
25062 else
25063 HAVE_PTHREAD_SIGMASK=0
25064 fi
25065 fi
5476a9a4 25066 else
f077f61d
GM
25067 if test $ac_cv_func_pthread_sigmask = yes; then
25068 REPLACE_PTHREAD_SIGMASK=1
25069 else
25070 HAVE_PTHREAD_SIGMASK=0
25071 fi
5476a9a4 25072 fi
6d153f56 25073
52724a05 25074
6d153f56
GM
25075
25076
5476a9a4
GM
25077 if test $HAVE_PTHREAD_SIGMASK = 1; then
25078
25079
25080 if test -z "$LIB_PTHREAD_SIGMASK"; then
25081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask works without -lpthread" >&5
25082$as_echo_n "checking whether pthread_sigmask works without -lpthread... " >&6; }
25083if test "${gl_cv_func_pthread_sigmask_in_libc_works+set}" = set; then :
f199cab1
GM
25084 $as_echo_n "(cached) " >&6
25085else
5476a9a4
GM
25086
25087 if test "$cross_compiling" = yes; then :
25088
25089 case "$host_os" in
25090 freebsd* | hpux* | solaris | solaris2.[2-9]*)
25091 gl_cv_func_pthread_sigmask_in_libc_works="guessing no";;
25092 *)
25093 gl_cv_func_pthread_sigmask_in_libc_works="guessing yes";;
25094 esac
25095
25096else
25097 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 25098/* end confdefs.h. */
6d153f56 25099
5476a9a4
GM
25100#include <pthread.h>
25101#include <signal.h>
25102#include <stddef.h>
25103int main ()
f199cab1 25104{
5476a9a4
GM
25105 sigset_t set;
25106 sigemptyset (&set);
25107 return pthread_sigmask (1729, &set, NULL) != 0;
f199cab1
GM
25108}
25109_ACEOF
5476a9a4
GM
25110if ac_fn_c_try_run "$LINENO"; then :
25111 gl_cv_func_pthread_sigmask_in_libc_works=no
f199cab1 25112else
5476a9a4 25113 gl_cv_func_pthread_sigmask_in_libc_works=yes
f199cab1 25114fi
5476a9a4
GM
25115rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25116 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1 25117fi
5476a9a4
GM
25118
25119
f199cab1 25120fi
5476a9a4
GM
25121{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_in_libc_works" >&5
25122$as_echo "$gl_cv_func_pthread_sigmask_in_libc_works" >&6; }
25123 case "$gl_cv_func_pthread_sigmask_in_libc_works" in
25124 *no)
25125 REPLACE_PTHREAD_SIGMASK=1
cc322c06 25126
5476a9a4 25127$as_echo "#define PTHREAD_SIGMASK_INEFFECTIVE 1" >>confdefs.h
cc322c06 25128
5476a9a4
GM
25129 ;;
25130 esac
25131 fi
3e0be4ab 25132
5476a9a4
GM
25133 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask returns error numbers" >&5
25134$as_echo_n "checking whether pthread_sigmask returns error numbers... " >&6; }
25135if test "${gl_cv_func_pthread_sigmask_return_works+set}" = set; then :
3e0be4ab
GM
25136 $as_echo_n "(cached) " >&6
25137else
5476a9a4
GM
25138
25139 gl_save_LIBS="$LIBS"
25140 LIBS="$LIBS $LIB_PTHREAD_SIGMASK"
25141 if test "$cross_compiling" = yes; then :
25142 case "$host_os" in
25143 cygwin*)
25144 gl_cv_func_pthread_sigmask_return_works="guessing no";;
25145 *)
25146 gl_cv_func_pthread_sigmask_return_works="guessing yes";;
25147 esac
25148
25149else
25150 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3e0be4ab 25151/* end confdefs.h. */
f199cab1 25152
5476a9a4
GM
25153#include <pthread.h>
25154#include <signal.h>
25155#include <stddef.h>
25156int main ()
3e0be4ab 25157{
5476a9a4
GM
25158 sigset_t set;
25159 sigemptyset (&set);
25160 if (pthread_sigmask (1729, &set, NULL) == -1)
25161 return 1;
3e0be4ab
GM
25162 return 0;
25163}
6d153f56 25164_ACEOF
5476a9a4
GM
25165if ac_fn_c_try_run "$LINENO"; then :
25166 gl_cv_func_pthread_sigmask_return_works=yes
3e0be4ab 25167else
5476a9a4 25168 gl_cv_func_pthread_sigmask_return_works=no
6d153f56 25169fi
5476a9a4
GM
25170rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25171 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1 25172fi
5476a9a4
GM
25173
25174 LIBS="$gl_save_LIBS"
25175
52724a05 25176fi
5476a9a4
GM
25177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_return_works" >&5
25178$as_echo "$gl_cv_func_pthread_sigmask_return_works" >&6; }
25179 case "$gl_cv_func_pthread_sigmask_return_works" in
25180 *no)
25181 REPLACE_PTHREAD_SIGMASK=1
6d153f56 25182
5476a9a4 25183$as_echo "#define PTHREAD_SIGMASK_FAILS_WITH_ERRNO 1" >>confdefs.h
6d153f56 25184
5476a9a4
GM
25185 ;;
25186 esac
cc322c06 25187
5476a9a4
GM
25188 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask unblocks signals correctly" >&5
25189$as_echo_n "checking whether pthread_sigmask unblocks signals correctly... " >&6; }
25190if test "${gl_cv_func_pthread_sigmask_unblock_works+set}" = set; then :
f199cab1
GM
25191 $as_echo_n "(cached) " >&6
25192else
5476a9a4
GM
25193
25194 case "$host_os" in
25195 irix*)
25196 gl_cv_func_pthread_sigmask_unblock_works="guessing no";;
25197 *)
25198 gl_cv_func_pthread_sigmask_unblock_works="guessing yes";;
25199 esac
25200 gl_save_LIBS="$LIBS"
25201 LIBS="$LIBS $LIBMULTITHREAD"
25202 if test "$cross_compiling" = yes; then :
25203 :
f199cab1 25204else
5476a9a4
GM
25205 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25206/* end confdefs.h. */
6d153f56 25207
5476a9a4
GM
25208#include <pthread.h>
25209#include <signal.h>
25210#include <stdio.h>
25211#include <stdlib.h>
25212#include <unistd.h>
25213static volatile int sigint_occurred;
25214static void
25215sigint_handler (int sig)
25216{
25217 sigint_occurred++;
25218}
25219int main ()
25220{
25221 sigset_t set;
25222 int pid = getpid ();
25223 char command[80];
25224 signal (SIGINT, sigint_handler);
25225 sigemptyset (&set);
25226 sigaddset (&set, SIGINT);
25227 if (!(pthread_sigmask (SIG_BLOCK, &set, NULL) == 0))
25228 return 1;
25229 sprintf (command, "sh -c 'sleep 1; kill -%d %d' &", SIGINT, pid);
25230 if (!(system (command) == 0))
25231 return 2;
25232 sleep (2);
25233 if (!(sigint_occurred == 0))
25234 return 3;
25235 if (!(pthread_sigmask (SIG_UNBLOCK, &set, NULL) == 0))
25236 return 4;
25237 if (!(sigint_occurred == 1)) /* This fails on IRIX. */
25238 return 5;
25239 return 0;
25240}
25241_ACEOF
25242if ac_fn_c_try_run "$LINENO"; then :
25243 :
25244else
25245 gl_cv_func_pthread_sigmask_unblock_works=no
f199cab1 25246fi
5476a9a4
GM
25247rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25248 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1 25249fi
5476a9a4
GM
25250
25251 LIBS="$gl_save_LIBS"
25252
f199cab1 25253fi
5476a9a4
GM
25254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_unblock_works" >&5
25255$as_echo "$gl_cv_func_pthread_sigmask_unblock_works" >&6; }
25256 case "$gl_cv_func_pthread_sigmask_unblock_works" in
25257 *no)
25258 REPLACE_PTHREAD_SIGMASK=1
6d153f56 25259
5476a9a4 25260$as_echo "#define PTHREAD_SIGMASK_UNBLOCK_BUG 1" >>confdefs.h
6d153f56 25261
5476a9a4
GM
25262 ;;
25263 esac
6d153f56 25264 fi
6d153f56 25265
a6342fc8 25266 if test $HAVE_PTHREAD_SIGMASK = 0 || test $REPLACE_PTHREAD_SIGMASK = 1; then
a451f14b 25267
a451f14b 25268
743c80a7
PE
25269
25270
25271
25272
25273
f199cab1 25274
5476a9a4 25275 gl_LIBOBJS="$gl_LIBOBJS pthread_sigmask.$ac_objext"
743c80a7
PE
25276
25277
5476a9a4 25278 if test $HAVE_PTHREAD_SIGMASK = 1; then
743c80a7 25279
5476a9a4 25280$as_echo "#define HAVE_PTHREAD_SIGMASK 1" >>confdefs.h
743c80a7 25281
5476a9a4 25282 fi
743c80a7 25283
a6342fc8 25284 fi
938a4ef9 25285
938a4ef9 25286
938a4ef9 25287
938a4ef9 25288
938a4ef9 25289
5476a9a4 25290 GNULIB_PTHREAD_SIGMASK=1
a451f14b 25291
a451f14b 25292
743c80a7
PE
25293
25294
25295
25296
25297
b5591ebb
GM
25298 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for putenv compatible with GNU and SVID" >&5
25299$as_echo_n "checking for putenv compatible with GNU and SVID... " >&6; }
25300if test "${gl_cv_func_svid_putenv+set}" = set; then :
25301 $as_echo_n "(cached) " >&6
25302else
25303 if test "$cross_compiling" = yes; then :
25304 case "$host_os" in
25305 # Guess yes on glibc systems.
25306 *-gnu*) gl_cv_func_svid_putenv="guessing yes" ;;
25307 # If we don't know, assume the worst.
25308 *) gl_cv_func_svid_putenv="guessing no" ;;
25309 esac
25310
25311else
25312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25313/* end confdefs.h. */
25314$ac_includes_default
25315int
25316main ()
25317{
25318
25319 /* Put it in env. */
25320 if (putenv ("CONFTEST_putenv=val"))
25321 return 1;
25322
25323 /* Try to remove it. */
25324 if (putenv ("CONFTEST_putenv"))
25325 return 2;
25326
25327 /* Make sure it was deleted. */
25328 if (getenv ("CONFTEST_putenv") != 0)
25329 return 3;
25330
25331 return 0;
25332
25333 ;
25334 return 0;
25335}
25336_ACEOF
25337if ac_fn_c_try_run "$LINENO"; then :
25338 gl_cv_func_svid_putenv=yes
25339else
25340 gl_cv_func_svid_putenv=no
25341fi
25342rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25343 conftest.$ac_objext conftest.beam conftest.$ac_ext
25344fi
25345
25346
25347fi
25348{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_svid_putenv" >&5
25349$as_echo "$gl_cv_func_svid_putenv" >&6; }
25350 case "$gl_cv_func_svid_putenv" in
25351 *yes) ;;
25352 *)
25353 REPLACE_PUTENV=1
25354 ;;
25355 esac
25356
25357 if test $REPLACE_PUTENV = 1; then
25358
25359
25360
25361
25362
25363
25364
25365
25366 gl_LIBOBJS="$gl_LIBOBJS putenv.$ac_objext"
25367
c175d440 25368
2393bc74
GM
25369 ac_fn_c_check_decl "$LINENO" "_putenv" "ac_cv_have_decl__putenv" "$ac_includes_default"
25370if test "x$ac_cv_have_decl__putenv" = x""yes; then :
25371 ac_have_decl=1
25372else
25373 ac_have_decl=0
c175d440 25374fi
2393bc74
GM
25375
25376cat >>confdefs.h <<_ACEOF
25377#define HAVE_DECL__PUTENV $ac_have_decl
25378_ACEOF
c175d440
GM
25379
25380
b5591ebb
GM
25381 fi
25382
25383
25384
25385
25386
25387 GNULIB_PUTENV=1
25388
25389
25390
25391
25392
25393
3a019ab4
GM
25394 # Check whether --enable-acl was given.
25395if test "${enable_acl+set}" = set; then :
25396 enableval=$enable_acl;
25397else
25398 enable_acl=auto
25399fi
b5591ebb 25400
743c80a7 25401
3a019ab4
GM
25402 LIB_ACL=
25403 use_acl=0
25404 if test "x$enable_acl" != "xno"; then
25405 for ac_header in sys/acl.h
25406do :
25407 ac_fn_c_check_header_mongrel "$LINENO" "sys/acl.h" "ac_cv_header_sys_acl_h" "$ac_includes_default"
25408if test "x$ac_cv_header_sys_acl_h" = x""yes; then :
25409 cat >>confdefs.h <<_ACEOF
25410#define HAVE_SYS_ACL_H 1
25411_ACEOF
25412
25413fi
25414
25415done
25416
25417 if test $ac_cv_header_sys_acl_h = yes; then
25418 ac_save_LIBS=$LIBS
25419
25420 if test $use_acl = 0; then
25421 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing acl_get_file" >&5
25422$as_echo_n "checking for library containing acl_get_file... " >&6; }
25423if test "${ac_cv_search_acl_get_file+set}" = set; then :
25424 $as_echo_n "(cached) " >&6
25425else
25426 ac_func_search_save_LIBS=$LIBS
25427cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25428/* end confdefs.h. */
25429
25430/* Override any GCC internal prototype to avoid an error.
25431 Use char because int might match the return type of a GCC
25432 builtin and then its argument prototype would still apply. */
25433#ifdef __cplusplus
25434extern "C"
25435#endif
25436char acl_get_file ();
25437int
25438main ()
25439{
25440return acl_get_file ();
25441 ;
25442 return 0;
25443}
25444_ACEOF
25445for ac_lib in '' acl pacl; do
25446 if test -z "$ac_lib"; then
25447 ac_res="none required"
25448 else
25449 ac_res=-l$ac_lib
25450 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
25451 fi
25452 if ac_fn_c_try_link "$LINENO"; then :
25453 ac_cv_search_acl_get_file=$ac_res
25454fi
25455rm -f core conftest.err conftest.$ac_objext \
25456 conftest$ac_exeext
25457 if test "${ac_cv_search_acl_get_file+set}" = set; then :
25458 break
25459fi
25460done
25461if test "${ac_cv_search_acl_get_file+set}" = set; then :
25462
25463else
25464 ac_cv_search_acl_get_file=no
25465fi
25466rm conftest.$ac_ext
25467LIBS=$ac_func_search_save_LIBS
25468fi
25469{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_acl_get_file" >&5
25470$as_echo "$ac_cv_search_acl_get_file" >&6; }
25471ac_res=$ac_cv_search_acl_get_file
25472if test "$ac_res" != no; then :
25473 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
25474 if test "$ac_cv_search_acl_get_file" != "none required"; then
25475 LIB_ACL=$ac_cv_search_acl_get_file
25476 fi
25477 for ac_func in acl_get_file acl_get_fd acl_set_file acl_set_fd \
25478 acl_free acl_from_mode acl_from_text \
25479 acl_delete_def_file acl_extended_file \
25480 acl_delete_fd_np acl_delete_file_np \
25481 acl_copy_ext_native acl_create_entry_np \
25482 acl_to_short_text acl_free_text
25483do :
25484 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
25485ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
25486eval as_val=\$$as_ac_var
25487 if test "x$as_val" = x""yes; then :
25488 cat >>confdefs.h <<_ACEOF
25489#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
25490_ACEOF
25491
25492fi
25493done
25494
25495 # If the acl_get_file bug is detected, don't enable the ACL support.
25496
25497 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working acl_get_file" >&5
25498$as_echo_n "checking for working acl_get_file... " >&6; }
25499if test "${gl_cv_func_working_acl_get_file+set}" = set; then :
25500 $as_echo_n "(cached) " >&6
25501else
25502 if test "$cross_compiling" = yes; then :
25503 gl_cv_func_working_acl_get_file=cross-compiling
25504else
25505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25506/* end confdefs.h. */
25507#include <sys/types.h>
25508 #include <sys/acl.h>
25509 #include <errno.h>
25510
25511int
25512main ()
25513{
25514if (!acl_get_file (".", ACL_TYPE_ACCESS) && errno == ENOENT)
25515 return 1;
25516 return 0;
25517
25518 ;
25519 return 0;
25520}
25521_ACEOF
25522if ac_fn_c_try_run "$LINENO"; then :
25523 gl_cv_func_working_acl_get_file=yes
25524else
25525 gl_cv_func_working_acl_get_file=no
25526fi
25527rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25528 conftest.$ac_objext conftest.beam conftest.$ac_ext
25529fi
25530
25531fi
25532{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_acl_get_file" >&5
25533$as_echo "$gl_cv_func_working_acl_get_file" >&6; }
25534
25535 if test $gl_cv_func_working_acl_get_file = yes; then :
25536 use_acl=1
25537fi
25538
25539 if test $use_acl = 1; then
25540 for ac_header in acl/libacl.h
25541do :
25542 ac_fn_c_check_header_mongrel "$LINENO" "acl/libacl.h" "ac_cv_header_acl_libacl_h" "$ac_includes_default"
25543if test "x$ac_cv_header_acl_libacl_h" = x""yes; then :
25544 cat >>confdefs.h <<_ACEOF
25545#define HAVE_ACL_LIBACL_H 1
25546_ACEOF
25547
25548fi
25549
25550done
25551
25552
25553
25554
25555
25556
25557
25558
25559
25560 for ac_func in acl_entries
25561do :
25562 ac_fn_c_check_func "$LINENO" "acl_entries" "ac_cv_func_acl_entries"
25563if test "x$ac_cv_func_acl_entries" = x""yes; then :
25564 cat >>confdefs.h <<_ACEOF
25565#define HAVE_ACL_ENTRIES 1
25566_ACEOF
25567
25568else
25569
25570 gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
25571
25572fi
25573done
25574
25575
25576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ACL_FIRST_ENTRY" >&5
25577$as_echo_n "checking for ACL_FIRST_ENTRY... " >&6; }
25578if test "${gl_cv_acl_ACL_FIRST_ENTRY+set}" = set; then :
25579 $as_echo_n "(cached) " >&6
25580else
25581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25582/* end confdefs.h. */
25583#include <sys/types.h>
25584#include <sys/acl.h>
25585int type = ACL_FIRST_ENTRY;
25586int
25587main ()
25588{
25589
25590 ;
25591 return 0;
25592}
25593_ACEOF
25594if ac_fn_c_try_compile "$LINENO"; then :
25595 gl_cv_acl_ACL_FIRST_ENTRY=yes
25596else
25597 gl_cv_acl_ACL_FIRST_ENTRY=no
25598fi
25599rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25600fi
25601{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_acl_ACL_FIRST_ENTRY" >&5
25602$as_echo "$gl_cv_acl_ACL_FIRST_ENTRY" >&6; }
25603 if test $gl_cv_acl_ACL_FIRST_ENTRY = yes; then
25604
25605$as_echo "#define HAVE_ACL_FIRST_ENTRY 1" >>confdefs.h
25606
25607 fi
25608 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ACL_TYPE_EXTENDED" >&5
25609$as_echo_n "checking for ACL_TYPE_EXTENDED... " >&6; }
25610if test "${gl_cv_acl_ACL_TYPE_EXTENDED+set}" = set; then :
25611 $as_echo_n "(cached) " >&6
25612else
25613 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25614/* end confdefs.h. */
25615#include <sys/types.h>
25616#include <sys/acl.h>
25617int type = ACL_TYPE_EXTENDED;
25618int
25619main ()
25620{
25621
25622 ;
25623 return 0;
25624}
25625_ACEOF
25626if ac_fn_c_try_compile "$LINENO"; then :
25627 gl_cv_acl_ACL_TYPE_EXTENDED=yes
25628else
25629 gl_cv_acl_ACL_TYPE_EXTENDED=no
25630fi
25631rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25632fi
25633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_acl_ACL_TYPE_EXTENDED" >&5
25634$as_echo "$gl_cv_acl_ACL_TYPE_EXTENDED" >&6; }
25635 if test $gl_cv_acl_ACL_TYPE_EXTENDED = yes; then
25636
25637$as_echo "#define HAVE_ACL_TYPE_EXTENDED 1" >>confdefs.h
25638
25639 fi
25640 else
25641 LIB_ACL=
25642 fi
25643
25644fi
25645
25646 fi
25647
25648 if test $use_acl = 0; then
25649 for ac_func in facl
25650do :
25651 ac_fn_c_check_func "$LINENO" "facl" "ac_cv_func_facl"
25652if test "x$ac_cv_func_facl" = x""yes; then :
25653 cat >>confdefs.h <<_ACEOF
25654#define HAVE_FACL 1
25655_ACEOF
25656
25657fi
25658done
25659
25660 if test $ac_cv_func_facl = yes; then
25661 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing acl_trivial" >&5
25662$as_echo_n "checking for library containing acl_trivial... " >&6; }
25663if test "${ac_cv_search_acl_trivial+set}" = set; then :
25664 $as_echo_n "(cached) " >&6
25665else
25666 ac_func_search_save_LIBS=$LIBS
25667cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25668/* end confdefs.h. */
25669
25670/* Override any GCC internal prototype to avoid an error.
25671 Use char because int might match the return type of a GCC
25672 builtin and then its argument prototype would still apply. */
25673#ifdef __cplusplus
25674extern "C"
25675#endif
25676char acl_trivial ();
25677int
25678main ()
25679{
25680return acl_trivial ();
25681 ;
25682 return 0;
25683}
25684_ACEOF
25685for ac_lib in '' sec; do
25686 if test -z "$ac_lib"; then
25687 ac_res="none required"
25688 else
25689 ac_res=-l$ac_lib
25690 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
25691 fi
25692 if ac_fn_c_try_link "$LINENO"; then :
25693 ac_cv_search_acl_trivial=$ac_res
25694fi
25695rm -f core conftest.err conftest.$ac_objext \
25696 conftest$ac_exeext
25697 if test "${ac_cv_search_acl_trivial+set}" = set; then :
25698 break
25699fi
25700done
25701if test "${ac_cv_search_acl_trivial+set}" = set; then :
25702
25703else
25704 ac_cv_search_acl_trivial=no
25705fi
25706rm conftest.$ac_ext
25707LIBS=$ac_func_search_save_LIBS
25708fi
25709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_acl_trivial" >&5
25710$as_echo "$ac_cv_search_acl_trivial" >&6; }
25711ac_res=$ac_cv_search_acl_trivial
25712if test "$ac_res" != no; then :
25713 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
25714 if test "$ac_cv_search_acl_trivial" != "none required"; then
25715 LIB_ACL=$ac_cv_search_acl_trivial
25716 fi
25717
25718fi
25719
25720 for ac_func in acl_trivial
25721do :
25722 ac_fn_c_check_func "$LINENO" "acl_trivial" "ac_cv_func_acl_trivial"
25723if test "x$ac_cv_func_acl_trivial" = x""yes; then :
25724 cat >>confdefs.h <<_ACEOF
25725#define HAVE_ACL_TRIVIAL 1
25726_ACEOF
25727
25728fi
25729done
25730
25731 use_acl=1
25732 fi
25733 fi
25734
25735 if test $use_acl = 0; then
25736 for ac_func in getacl
25737do :
25738 ac_fn_c_check_func "$LINENO" "getacl" "ac_cv_func_getacl"
25739if test "x$ac_cv_func_getacl" = x""yes; then :
25740 cat >>confdefs.h <<_ACEOF
25741#define HAVE_GETACL 1
25742_ACEOF
25743
25744fi
25745done
25746
25747 if test $ac_cv_func_getacl = yes; then
25748 use_acl=1
25749 fi
25750 for ac_header in aclv.h
25751do :
25752 ac_fn_c_check_header_compile "$LINENO" "aclv.h" "ac_cv_header_aclv_h" "#include <sys/types.h>
25753"
25754if test "x$ac_cv_header_aclv_h" = x""yes; then :
25755 cat >>confdefs.h <<_ACEOF
25756#define HAVE_ACLV_H 1
25757_ACEOF
25758
25759fi
25760
25761done
25762
25763 fi
25764
25765 if test $use_acl = 0; then
25766 for ac_func in aclx_get
25767do :
25768 ac_fn_c_check_func "$LINENO" "aclx_get" "ac_cv_func_aclx_get"
25769if test "x$ac_cv_func_aclx_get" = x""yes; then :
25770 cat >>confdefs.h <<_ACEOF
25771#define HAVE_ACLX_GET 1
25772_ACEOF
25773
25774fi
25775done
25776
25777 if test $ac_cv_func_aclx_get = yes; then
25778 use_acl=1
25779 fi
25780 fi
25781
25782 if test $use_acl = 0 || test "$ac_cv_func_aclx_get" = yes; then
25783 for ac_func in statacl
25784do :
25785 ac_fn_c_check_func "$LINENO" "statacl" "ac_cv_func_statacl"
25786if test "x$ac_cv_func_statacl" = x""yes; then :
25787 cat >>confdefs.h <<_ACEOF
25788#define HAVE_STATACL 1
25789_ACEOF
25790
25791fi
25792done
25793
25794 if test $ac_cv_func_statacl = yes; then
25795 use_acl=1
25796 fi
25797 fi
25798
25799 if test $use_acl = 0; then
25800 for ac_func in aclsort
25801do :
25802 ac_fn_c_check_func "$LINENO" "aclsort" "ac_cv_func_aclsort"
25803if test "x$ac_cv_func_aclsort" = x""yes; then :
25804 cat >>confdefs.h <<_ACEOF
25805#define HAVE_ACLSORT 1
25806_ACEOF
25807
25808fi
25809done
25810
25811 if test $ac_cv_func_aclsort = yes; then
25812 use_acl=1
25813 fi
25814 fi
25815
25816 LIBS=$ac_save_LIBS
25817 fi
25818 if test "x$enable_acl$use_acl" = "xyes0"; then
25819 as_fn_error "ACLs enabled but support not detected" "$LINENO" 5
25820 elif test "x$enable_acl$use_acl" = "xauto0"; then
25821 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libacl development library was not found or not usable." >&5
25822$as_echo "$as_me: WARNING: libacl development library was not found or not usable." >&2;}
25823 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: emacs will be built without ACL support." >&5
25824$as_echo "$as_me: WARNING: emacs will be built without ACL support." >&2;}
25825 fi
25826 fi
25827
25828
25829cat >>confdefs.h <<_ACEOF
25830#define USE_ACL $use_acl
25831_ACEOF
25832
25833 USE_ACL=$use_acl
25834
25835
25836
25837
25838
25839 if test $ac_cv_func_readlink = no; then
25840 HAVE_READLINK=0
25841 else
25842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
25843$as_echo_n "checking whether readlink signature is correct... " >&6; }
25844if test "${gl_cv_decl_readlink_works+set}" = set; then :
25845 $as_echo_n "(cached) " >&6
25846else
25847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25848/* end confdefs.h. */
25849#include <unistd.h>
25850 /* Cause compilation failure if original declaration has wrong type. */
25851 ssize_t readlink (const char *, char *, size_t);
25852int
f199cab1
GM
25853main ()
25854{
5476a9a4 25855
f199cab1
GM
25856 ;
25857 return 0;
25858}
3e0be4ab 25859_ACEOF
5476a9a4
GM
25860if ac_fn_c_try_compile "$LINENO"; then :
25861 gl_cv_decl_readlink_works=yes
25862else
25863 gl_cv_decl_readlink_works=no
3e0be4ab 25864fi
5476a9a4
GM
25865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25866fi
25867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5
25868$as_echo "$gl_cv_decl_readlink_works" >&6; }
25869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
25870$as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; }
25871if test "${gl_cv_func_readlink_works+set}" = set; then :
25872 $as_echo_n "(cached) " >&6
25873else
25874 # We have readlink, so assume ln -s works.
25875 ln -s conftest.no-such conftest.link
25876 ln -s conftest.link conftest.lnk2
25877 if test "$cross_compiling" = yes; then :
25878 case "$host_os" in
25879 # Guess yes on glibc systems.
25880 *-gnu*) gl_cv_func_readlink_works="guessing yes" ;;
25881 # If we don't know, assume the worst.
25882 *) gl_cv_func_readlink_works="guessing no" ;;
25883 esac
25884
25885else
f199cab1 25886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 25887/* end confdefs.h. */
5476a9a4
GM
25888#include <unistd.h>
25889
f199cab1
GM
25890int
25891main ()
25892{
5476a9a4
GM
25893char buf[20];
25894 return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;
f199cab1
GM
25895 ;
25896 return 0;
25897}
067d23c9 25898_ACEOF
5476a9a4
GM
25899if ac_fn_c_try_run "$LINENO"; then :
25900 gl_cv_func_readlink_works=yes
25901else
25902 gl_cv_func_readlink_works=no
067d23c9 25903fi
5476a9a4
GM
25904rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25905 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1 25906fi
067d23c9 25907
5476a9a4 25908 rm -f conftest.link conftest.lnk2
f199cab1 25909fi
5476a9a4
GM
25910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_works" >&5
25911$as_echo "$gl_cv_func_readlink_works" >&6; }
25912 case "$gl_cv_func_readlink_works" in
25913 *yes)
25914 if test "$gl_cv_decl_readlink_works" != yes; then
25915 REPLACE_READLINK=1
25916 fi
25917 ;;
25918 *)
067d23c9 25919
5476a9a4 25920$as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
067d23c9 25921
5476a9a4
GM
25922 REPLACE_READLINK=1
25923 ;;
25924 esac
25925 fi
3e0be4ab 25926
a6342fc8 25927 if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
3e0be4ab
GM
25928
25929
25930
25931
3e0be4ab
GM
25932
25933
5476a9a4
GM
25934
25935
25936 gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext"
25937
25938
25939 :
3e0be4ab 25940
a6342fc8 25941 fi
3e0be4ab 25942
067d23c9 25943
067d23c9 25944
067d23c9 25945
067d23c9 25946
5476a9a4 25947 GNULIB_READLINK=1
067d23c9 25948
067d23c9 25949
067d23c9 25950
067d23c9
KY
25951
25952
067d23c9 25953
d7ad186c
GM
25954
25955
25956
25957 if test $ac_cv_func_readlinkat = no; then
25958 HAVE_READLINKAT=0
25959 fi
25960
25961 if test $HAVE_READLINKAT = 0; then
25962
25963
25964
25965
25966
25967
25968
25969
25970 gl_LIBOBJS="$gl_LIBOBJS readlinkat.$ac_objext"
25971
25972 fi
25973
25974
25975
25976
25977
25978 GNULIB_READLINKAT=1
25979
25980
25981
25982
25983
25984
e4184a20
GM
25985 for ac_func in sig2str
25986do :
25987 ac_fn_c_check_func "$LINENO" "sig2str" "ac_cv_func_sig2str"
25988if test "x$ac_cv_func_sig2str" = x""yes; then :
25989 cat >>confdefs.h <<_ACEOF
25990#define HAVE_SIG2STR 1
25991_ACEOF
25992
25993fi
25994done
25995
25996
25997 if test $ac_cv_func_sig2str = no; then
25998
25999
26000
26001
26002
26003
26004
26005
26006 gl_LIBOBJS="$gl_LIBOBJS sig2str.$ac_objext"
26007
26008
26009 :
26010
26011 fi
26012
369e19fc 26013
067d23c9 26014
5476a9a4
GM
26015
26016
26017
26018
26019
26020
26021
26022
26023 if test $gl_cv_have_include_next = yes; then
26024 gl_cv_next_signal_h='<'signal.h'>'
26025 else
26026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
26027$as_echo_n "checking absolute name of <signal.h>... " >&6; }
26028if test "${gl_cv_next_signal_h+set}" = set; then :
0eb775a3 26029 $as_echo_n "(cached) " >&6
0eb775a3 26030else
5476a9a4
GM
26031
26032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0eb775a3 26033/* end confdefs.h. */
5476a9a4 26034#include <signal.h>
f199cab1 26035
0eb775a3 26036_ACEOF
5476a9a4
GM
26037 case "$host_os" in
26038 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26039 *) gl_absname_cpp="$ac_cpp" ;;
26040 esac
0eb775a3 26041
5476a9a4
GM
26042 case "$host_os" in
26043 mingw*)
26044 gl_dirsep_regex='[/\\]'
26045 ;;
26046 *)
26047 gl_dirsep_regex='\/'
26048 ;;
26049 esac
26050 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
0eb775a3 26051
5476a9a4
GM
26052 gl_header_literal_regex=`echo 'signal.h' \
26053 | sed -e "$gl_make_literal_regex_sed"`
26054 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26055 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26056 s|^/[^/]|//&|
26057 p
26058 q
26059 }'
26060 gl_cv_next_signal_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26061 sed -n "$gl_absolute_header_sed"`'"'
0eb775a3 26062
f199cab1 26063
5476a9a4
GM
26064fi
26065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
26066$as_echo "$gl_cv_next_signal_h" >&6; }
26067 fi
26068 NEXT_SIGNAL_H=$gl_cv_next_signal_h
067d23c9 26069
5476a9a4
GM
26070 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26071 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26072 gl_next_as_first_directive='<'signal.h'>'
26073 else
26074 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26075 gl_next_as_first_directive=$gl_cv_next_signal_h
26076 fi
26077 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
067d23c9 26078
067d23c9
KY
26079
26080
067d23c9 26081
067d23c9 26082
5476a9a4
GM
26083# AIX declares sig_atomic_t to already include volatile, and C89 compilers
26084# then choke on 'volatile sig_atomic_t'. C99 requires that it compile.
26085 ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
26086#include <signal.h>
26087
26088"
26089if test "x$ac_cv_type_volatile_sig_atomic_t" = x""yes; then :
26090
26091else
26092 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
f199cab1 26093fi
067d23c9 26094
067d23c9 26095
067d23c9 26096
067d23c9 26097
938a4ef9 26098
938a4ef9 26099
5476a9a4
GM
26100
26101 ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
26102#include <signal.h>
26103
26104"
26105if test "x$ac_cv_type_sighandler_t" = x""yes; then :
26106
26107else
26108 HAVE_SIGHANDLER_T=0
26109fi
26110
26111
26112
26113
a6342fc8 26114 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
5476a9a4
GM
26115/* <sys/types.h> is not needed according to POSIX, but the
26116 <sys/socket.h> in i386-unknown-freebsd4.10 and
26117 powerpc-apple-darwin5.5 required it. */
26118#include <sys/types.h>
26119#if HAVE_SYS_SOCKET_H
26120# include <sys/socket.h>
26121#elif HAVE_WS2TCPIP_H
26122# include <ws2tcpip.h>
26123#endif
26124
26125"
26126if test "x$ac_cv_type_socklen_t" = x""yes; then :
26127
067d23c9 26128else
5476a9a4
GM
26129 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5
26130$as_echo_n "checking for socklen_t equivalent... " >&6; }
26131 if test "${gl_cv_socklen_t_equiv+set}" = set; then :
26132 $as_echo_n "(cached) " >&6
26133else
26134 # Systems have either "struct sockaddr *" or
26135 # "void *" as the second argument to getpeername
26136 gl_cv_socklen_t_equiv=
26137 for arg2 in "struct sockaddr" void; do
26138 for t in int size_t "unsigned int" "long int" "unsigned long int"; do
26139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 26140/* end confdefs.h. */
5476a9a4
GM
26141#include <sys/types.h>
26142 #include <sys/socket.h>
26143
26144 int getpeername (int, $arg2 *, $t *);
f199cab1
GM
26145int
26146main ()
26147{
5476a9a4
GM
26148$t len;
26149 getpeername (0, 0, &len);
f199cab1
GM
26150 ;
26151 return 0;
26152}
3e0be4ab 26153_ACEOF
5476a9a4
GM
26154if ac_fn_c_try_compile "$LINENO"; then :
26155 gl_cv_socklen_t_equiv="$t"
067d23c9 26156fi
5476a9a4
GM
26157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26158 test "$gl_cv_socklen_t_equiv" != "" && break
26159 done
26160 test "$gl_cv_socklen_t_equiv" != "" && break
26161 done
067d23c9 26162
5476a9a4 26163fi
067d23c9 26164
5476a9a4
GM
26165 if test "$gl_cv_socklen_t_equiv" = ""; then
26166 as_fn_error "Cannot find a type to use in place of socklen_t" "$LINENO" 5
26167 fi
26168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socklen_t_equiv" >&5
26169$as_echo "$gl_cv_socklen_t_equiv" >&6; }
26170
26171cat >>confdefs.h <<_ACEOF
26172#define socklen_t $gl_cv_socklen_t_equiv
26173_ACEOF
067d23c9 26174
f199cab1 26175fi
3e0be4ab 26176
3e0be4ab 26177
5476a9a4
GM
26178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
26179$as_echo_n "checking for ssize_t... " >&6; }
26180if test "${gt_cv_ssize_t+set}" = set; then :
f199cab1
GM
26181 $as_echo_n "(cached) " >&6
26182else
5476a9a4 26183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 26184/* end confdefs.h. */
5476a9a4 26185#include <sys/types.h>
f199cab1
GM
26186int
26187main ()
26188{
5476a9a4
GM
26189int x = sizeof (ssize_t *) + sizeof (ssize_t);
26190 return !x;
f199cab1
GM
26191 ;
26192 return 0;
26193}
26194_ACEOF
5476a9a4
GM
26195if ac_fn_c_try_compile "$LINENO"; then :
26196 gt_cv_ssize_t=yes
067d23c9 26197else
5476a9a4 26198 gt_cv_ssize_t=no
f199cab1 26199fi
5476a9a4 26200rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
067d23c9 26201fi
5476a9a4
GM
26202{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
26203$as_echo "$gt_cv_ssize_t" >&6; }
26204 if test $gt_cv_ssize_t = no; then
26205
26206$as_echo "#define ssize_t int" >>confdefs.h
26207
26208 fi
26209
26210
26211
26212
26213
5476a9a4
GM
26214 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>
26215 #include <sys/stat.h>
26216"
26217if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = x""yes; then :
26218
26219cat >>confdefs.h <<_ACEOF
26220#define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1
26221_ACEOF
26222
26223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5
26224$as_echo_n "checking whether struct stat.st_atim is of type struct timespec... " >&6; }
26225if test "${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+set}" = set; then :
f199cab1
GM
26226 $as_echo_n "(cached) " >&6
26227else
5476a9a4 26228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 26229/* end confdefs.h. */
3e0be4ab 26230
5476a9a4
GM
26231 #include <sys/types.h>
26232 #include <sys/stat.h>
26233 #if HAVE_SYS_TIME_H
26234 # include <sys/time.h>
26235 #endif
26236 #include <time.h>
26237 struct timespec ts;
26238 struct stat st;
26239
f199cab1
GM
26240int
26241main ()
26242{
5476a9a4
GM
26243
26244 st.st_atim = ts;
26245
f199cab1
GM
26246 ;
26247 return 0;
26248}
3e0be4ab 26249_ACEOF
5476a9a4
GM
26250if ac_fn_c_try_compile "$LINENO"; then :
26251 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes
f199cab1 26252else
5476a9a4 26253 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no
f199cab1 26254fi
5476a9a4 26255rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
067d23c9 26256fi
5476a9a4
GM
26257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5
26258$as_echo "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; }
26259 if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
067d23c9 26260
5476a9a4 26261$as_echo "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h
067d23c9 26262
5476a9a4
GM
26263 fi
26264else
26265 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>
26266 #include <sys/stat.h>
26267"
26268if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = x""yes; then :
067d23c9 26269
5476a9a4
GM
26270cat >>confdefs.h <<_ACEOF
26271#define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1
26272_ACEOF
3e0be4ab 26273
0eb775a3 26274
3e0be4ab 26275else
5476a9a4
GM
26276 ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h>
26277 #include <sys/stat.h>
26278"
26279if test "x$ac_cv_member_struct_stat_st_atimensec" = x""yes; then :
26280
26281cat >>confdefs.h <<_ACEOF
26282#define HAVE_STRUCT_STAT_ST_ATIMENSEC 1
067d23c9 26283_ACEOF
5476a9a4
GM
26284
26285
067d23c9 26286else
5476a9a4
GM
26287 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>
26288 #include <sys/stat.h>
26289"
26290if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = x""yes; then :
26291
26292cat >>confdefs.h <<_ACEOF
26293#define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1
26294_ACEOF
26295
26296
3e0be4ab 26297fi
5476a9a4 26298
067d23c9 26299fi
5476a9a4 26300
067d23c9 26301fi
067d23c9
KY
26302
26303fi
26304
067d23c9 26305
067d23c9 26306
067d23c9 26307
067d23c9 26308
5476a9a4
GM
26309 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>
26310 #include <sys/stat.h>
26311"
26312if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = x""yes; then :
26313
26314cat >>confdefs.h <<_ACEOF
26315#define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1
26316_ACEOF
067d23c9
KY
26317
26318
f199cab1 26319else
5476a9a4
GM
26320 ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include <sys/types.h>
26321 #include <sys/stat.h>
26322"
26323if test "x$ac_cv_member_struct_stat_st_birthtimensec" = x""yes; then :
067d23c9 26324
5476a9a4
GM
26325cat >>confdefs.h <<_ACEOF
26326#define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1
26327_ACEOF
067d23c9 26328
3e0be4ab 26329
067d23c9 26330else
5476a9a4
GM
26331 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>
26332 #include <sys/stat.h>
26333"
26334if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = x""yes; then :
067d23c9 26335
5476a9a4
GM
26336cat >>confdefs.h <<_ACEOF
26337#define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1
067d23c9 26338_ACEOF
5476a9a4
GM
26339
26340
f199cab1 26341fi
5476a9a4 26342
f199cab1 26343fi
5476a9a4 26344
067d23c9 26345fi
0eb775a3 26346
0eb775a3 26347
0eb775a3 26348
5476a9a4
GM
26349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working stdalign.h" >&5
26350$as_echo_n "checking for working stdalign.h... " >&6; }
26351if test "${gl_cv_header_working_stdalign_h+set}" = set; then :
f199cab1 26352 $as_echo_n "(cached) " >&6
067d23c9 26353else
5476a9a4 26354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 26355/* end confdefs.h. */
5476a9a4
GM
26356#include <stdalign.h>
26357 #include <stddef.h>
26358
26359 /* Test that alignof yields a result consistent with offsetof.
26360 This catches GCC bug 52023
26361 <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. */
26362 #ifdef __cplusplus
26363 template <class t> struct alignof_helper { char a; t b; };
26364 # define ao(type) offsetof (alignof_helper<type>, b)
26365 #else
26366 # define ao(type) offsetof (struct { char a; type b; }, b)
26367 #endif
26368 char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1];
26369 char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1];
26370 char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1];
26371
26372 /* Test _Alignas only on platforms where gnulib can help. */
26373 #if \
0cdca42a
GM
26374 ((defined __cplusplus && 201103 <= __cplusplus) \
26375 || __GNUC__ || __IBMC__ || __IBMCPP__ || __ICC \
5476a9a4 26376 || 0x5110 <= __SUNPRO_C || 1300 <= _MSC_VER)
6ea3f01e
GM
26377 struct alignas_test { char c; char alignas (8) alignas_8; };
26378 char test_alignas[offsetof (struct alignas_test, alignas_8) == 8
26379 ? 1 : -1];
5476a9a4 26380 #endif
067d23c9 26381
f199cab1
GM
26382int
26383main ()
26384{
5476a9a4 26385
f199cab1
GM
26386 ;
26387 return 0;
26388}
26389_ACEOF
5476a9a4
GM
26390if ac_fn_c_try_compile "$LINENO"; then :
26391 gl_cv_header_working_stdalign_h=yes
f199cab1 26392else
5476a9a4 26393 gl_cv_header_working_stdalign_h=no
f199cab1 26394fi
5476a9a4 26395rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
067d23c9 26396fi
5476a9a4
GM
26397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdalign_h" >&5
26398$as_echo "$gl_cv_header_working_stdalign_h" >&6; }
067d23c9 26399
5476a9a4
GM
26400 if test $gl_cv_header_working_stdalign_h = yes; then
26401 STDALIGN_H=''
26402 else
26403 STDALIGN_H='stdalign.h'
f199cab1 26404 fi
0eb775a3 26405
5476a9a4
GM
26406
26407 if test -n "$STDALIGN_H"; then
26408 GL_GENERATE_STDALIGN_H_TRUE=
26409 GL_GENERATE_STDALIGN_H_FALSE='#'
f199cab1 26410else
5476a9a4
GM
26411 GL_GENERATE_STDALIGN_H_TRUE='#'
26412 GL_GENERATE_STDALIGN_H_FALSE=
0eb775a3 26413fi
0eb775a3
GM
26414
26415
26416
5476a9a4
GM
26417 STDARG_H=''
26418 NEXT_STDARG_H='<stdarg.h>'
26419 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5
26420$as_echo_n "checking for va_copy... " >&6; }
26421 if test "${gl_cv_func_va_copy+set}" = set; then :
f199cab1 26422 $as_echo_n "(cached) " >&6
5476a9a4
GM
26423else
26424
26425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26426/* end confdefs.h. */
26427#include <stdarg.h>
f199cab1
GM
26428int
26429main ()
26430{
5476a9a4
GM
26431
26432#ifndef va_copy
26433void (*func) (va_list, va_list) = va_copy;
26434#endif
26435
f199cab1
GM
26436 ;
26437 return 0;
26438}
26439_ACEOF
5476a9a4
GM
26440if ac_fn_c_try_compile "$LINENO"; then :
26441 gl_cv_func_va_copy=yes
f199cab1 26442else
5476a9a4 26443 gl_cv_func_va_copy=no
f199cab1 26444fi
5476a9a4 26445rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 26446fi
5476a9a4
GM
26447
26448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_va_copy" >&5
26449$as_echo "$gl_cv_func_va_copy" >&6; }
26450 if test $gl_cv_func_va_copy = no; then
26451 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26452/* end confdefs.h. */
26453#if defined _AIX && !defined __GNUC__
26454 AIX vaccine
26455 #endif
26456
26457_ACEOF
26458if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26459 $EGREP "vaccine" >/dev/null 2>&1; then :
26460 gl_aixcc=yes
f199cab1 26461else
5476a9a4 26462 gl_aixcc=no
f199cab1 26463fi
5476a9a4 26464rm -f conftest*
0eb775a3 26465
5476a9a4
GM
26466 if test $gl_aixcc = yes; then
26467 STDARG_H=stdarg.h
0eb775a3
GM
26468
26469
5476a9a4
GM
26470
26471
26472
26473
26474
26475
26476 if test $gl_cv_have_include_next = yes; then
26477 gl_cv_next_stdarg_h='<'stdarg.h'>'
26478 else
26479 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdarg.h>" >&5
26480$as_echo_n "checking absolute name of <stdarg.h>... " >&6; }
26481if test "${gl_cv_next_stdarg_h+set}" = set; then :
f199cab1
GM
26482 $as_echo_n "(cached) " >&6
26483else
5476a9a4
GM
26484
26485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 26486/* end confdefs.h. */
5476a9a4 26487#include <stdarg.h>
0eb775a3 26488
f199cab1 26489_ACEOF
5476a9a4
GM
26490 case "$host_os" in
26491 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26492 *) gl_absname_cpp="$ac_cpp" ;;
26493 esac
26494
26495 case "$host_os" in
26496 mingw*)
26497 gl_dirsep_regex='[/\\]'
26498 ;;
26499 *)
26500 gl_dirsep_regex='\/'
26501 ;;
26502 esac
26503 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26504
26505 gl_header_literal_regex=`echo 'stdarg.h' \
26506 | sed -e "$gl_make_literal_regex_sed"`
26507 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26508 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26509 s|^/[^/]|//&|
26510 p
26511 q
26512 }'
26513 gl_cv_next_stdarg_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26514 sed -n "$gl_absolute_header_sed"`'"'
26515
26516
f199cab1 26517fi
5476a9a4
GM
26518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdarg_h" >&5
26519$as_echo "$gl_cv_next_stdarg_h" >&6; }
26520 fi
26521 NEXT_STDARG_H=$gl_cv_next_stdarg_h
26522
26523 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26524 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26525 gl_next_as_first_directive='<'stdarg.h'>'
26526 else
26527 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26528 gl_next_as_first_directive=$gl_cv_next_stdarg_h
26529 fi
26530 NEXT_AS_FIRST_DIRECTIVE_STDARG_H=$gl_next_as_first_directive
0eb775a3
GM
26531
26532
26533
5476a9a4
GM
26534
26535 if test "$gl_cv_next_stdarg_h" = '""'; then
26536 gl_cv_next_stdarg_h='"///usr/include/stdarg.h"'
26537 NEXT_STDARG_H="$gl_cv_next_stdarg_h"
26538 fi
f199cab1 26539 else
5476a9a4
GM
26540
26541 saved_as_echo_n="$as_echo_n"
26542 as_echo_n=':'
26543 if test "${gl_cv_func___va_copy+set}" = set; then :
f199cab1
GM
26544 $as_echo_n "(cached) " >&6
26545else
0eb775a3 26546
5476a9a4
GM
26547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26548/* end confdefs.h. */
26549#include <stdarg.h>
f199cab1
GM
26550int
26551main ()
26552{
5476a9a4
GM
26553
26554#ifndef __va_copy
26555error, bail out
26556#endif
26557
f199cab1
GM
26558 ;
26559 return 0;
26560}
26561_ACEOF
5476a9a4
GM
26562if ac_fn_c_try_compile "$LINENO"; then :
26563 gl_cv_func___va_copy=yes
f199cab1 26564else
5476a9a4 26565 gl_cv_func___va_copy=no
f199cab1 26566fi
5476a9a4 26567rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 26568fi
0eb775a3 26569
5476a9a4
GM
26570 as_echo_n="$saved_as_echo_n"
26571
26572 if test $gl_cv_func___va_copy = yes; then
26573
26574$as_echo "#define va_copy __va_copy" >>confdefs.h
26575
26576 else
0eb775a3 26577
5476a9a4
GM
26578
26579$as_echo "#define va_copy gl_va_copy" >>confdefs.h
0eb775a3 26580
f199cab1
GM
26581 fi
26582 fi
5476a9a4
GM
26583 fi
26584
26585 if test -n "$STDARG_H"; then
26586 GL_GENERATE_STDARG_H_TRUE=
26587 GL_GENERATE_STDARG_H_FALSE='#'
26588else
26589 GL_GENERATE_STDARG_H_TRUE='#'
26590 GL_GENERATE_STDARG_H_FALSE=
26591fi
26592
26593
26594
26595
26596
26597
26598 # Define two additional variables used in the Makefile substitution.
26599
26600 if test "$ac_cv_header_stdbool_h" = yes; then
26601 STDBOOL_H=''
26602 else
26603 STDBOOL_H='stdbool.h'
26604 fi
26605
26606 if test -n "$STDBOOL_H"; then
26607 GL_GENERATE_STDBOOL_H_TRUE=
26608 GL_GENERATE_STDBOOL_H_FALSE='#'
26609else
26610 GL_GENERATE_STDBOOL_H_TRUE='#'
26611 GL_GENERATE_STDBOOL_H_FALSE=
26612fi
26613
26614
26615 if test "$ac_cv_type__Bool" = yes; then
26616 HAVE__BOOL=1
26617 else
26618 HAVE__BOOL=0
26619 fi
26620
26621
26622
26623
26624
26625 STDDEF_H=
26626 if test $gt_cv_c_wchar_t = no; then
26627 HAVE_WCHAR_T=0
26628 STDDEF_H=stddef.h
26629 fi
26630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
26631$as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
26632if test "${gl_cv_decl_null_works+set}" = set; then :
f199cab1
GM
26633 $as_echo_n "(cached) " >&6
26634else
5476a9a4 26635 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 26636/* end confdefs.h. */
5476a9a4
GM
26637#include <stddef.h>
26638 int test[2 * (sizeof NULL == sizeof (void *)) -1];
3e0be4ab 26639
f199cab1
GM
26640int
26641main ()
26642{
5476a9a4 26643
f199cab1
GM
26644 ;
26645 return 0;
26646}
26647_ACEOF
5476a9a4
GM
26648if ac_fn_c_try_compile "$LINENO"; then :
26649 gl_cv_decl_null_works=yes
f199cab1 26650else
5476a9a4 26651 gl_cv_decl_null_works=no
f199cab1 26652fi
5476a9a4 26653rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 26654fi
5476a9a4
GM
26655{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
26656$as_echo "$gl_cv_decl_null_works" >&6; }
26657 if test $gl_cv_decl_null_works = no; then
26658 REPLACE_NULL=1
26659 STDDEF_H=stddef.h
26660 fi
26661
26662 if test -n "$STDDEF_H"; then
26663 GL_GENERATE_STDDEF_H_TRUE=
26664 GL_GENERATE_STDDEF_H_FALSE='#'
f199cab1 26665else
5476a9a4
GM
26666 GL_GENERATE_STDDEF_H_TRUE='#'
26667 GL_GENERATE_STDDEF_H_FALSE=
f199cab1 26668fi
3e0be4ab 26669
5476a9a4 26670 if test -n "$STDDEF_H"; then
3e0be4ab
GM
26671
26672
5476a9a4
GM
26673
26674
26675
26676
26677
26678
26679 if test $gl_cv_have_include_next = yes; then
26680 gl_cv_next_stddef_h='<'stddef.h'>'
26681 else
26682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
26683$as_echo_n "checking absolute name of <stddef.h>... " >&6; }
26684if test "${gl_cv_next_stddef_h+set}" = set; then :
067d23c9
KY
26685 $as_echo_n "(cached) " >&6
26686else
5476a9a4
GM
26687
26688 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 26689/* end confdefs.h. */
5476a9a4 26690#include <stddef.h>
f199cab1 26691
067d23c9 26692_ACEOF
5476a9a4
GM
26693 case "$host_os" in
26694 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26695 *) gl_absname_cpp="$ac_cpp" ;;
26696 esac
26697
26698 case "$host_os" in
26699 mingw*)
26700 gl_dirsep_regex='[/\\]'
26701 ;;
26702 *)
26703 gl_dirsep_regex='\/'
26704 ;;
26705 esac
26706 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26707
26708 gl_header_literal_regex=`echo 'stddef.h' \
26709 | sed -e "$gl_make_literal_regex_sed"`
26710 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26711 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26712 s|^/[^/]|//&|
26713 p
26714 q
26715 }'
26716 gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26717 sed -n "$gl_absolute_header_sed"`'"'
26718
26719
f199cab1 26720fi
5476a9a4
GM
26721{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
26722$as_echo "$gl_cv_next_stddef_h" >&6; }
26723 fi
26724 NEXT_STDDEF_H=$gl_cv_next_stddef_h
26725
26726 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26727 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26728 gl_next_as_first_directive='<'stddef.h'>'
26729 else
26730 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26731 gl_next_as_first_directive=$gl_cv_next_stddef_h
26732 fi
26733 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
26734
f199cab1 26735
f199cab1 26736
f199cab1 26737
067d23c9 26738 fi
067d23c9 26739
f199cab1 26740
067d23c9 26741
067d23c9 26742
067d23c9 26743
067d23c9
KY
26744
26745
067d23c9 26746
067d23c9
KY
26747
26748
067d23c9 26749
3e0be4ab 26750
5476a9a4
GM
26751 if test $gl_cv_have_include_next = yes; then
26752 gl_cv_next_stdio_h='<'stdio.h'>'
26753 else
26754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
26755$as_echo_n "checking absolute name of <stdio.h>... " >&6; }
26756if test "${gl_cv_next_stdio_h+set}" = set; then :
26757 $as_echo_n "(cached) " >&6
f199cab1 26758else
5476a9a4
GM
26759
26760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26761/* end confdefs.h. */
26762#include <stdio.h>
26763
f199cab1 26764_ACEOF
5476a9a4
GM
26765 case "$host_os" in
26766 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26767 *) gl_absname_cpp="$ac_cpp" ;;
26768 esac
067d23c9 26769
5476a9a4
GM
26770 case "$host_os" in
26771 mingw*)
26772 gl_dirsep_regex='[/\\]'
26773 ;;
26774 *)
26775 gl_dirsep_regex='\/'
26776 ;;
26777 esac
26778 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26779
26780 gl_header_literal_regex=`echo 'stdio.h' \
26781 | sed -e "$gl_make_literal_regex_sed"`
26782 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26783 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26784 s|^/[^/]|//&|
26785 p
26786 q
26787 }'
26788 gl_cv_next_stdio_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26789 sed -n "$gl_absolute_header_sed"`'"'
067d23c9 26790
067d23c9 26791
f199cab1 26792fi
5476a9a4
GM
26793{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
26794$as_echo "$gl_cv_next_stdio_h" >&6; }
26795 fi
26796 NEXT_STDIO_H=$gl_cv_next_stdio_h
067d23c9 26797
5476a9a4
GM
26798 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26799 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26800 gl_next_as_first_directive='<'stdio.h'>'
26801 else
26802 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26803 gl_next_as_first_directive=$gl_cv_next_stdio_h
26804 fi
26805 NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
26806
26807
26808
26809
26810
26811 GNULIB_FSCANF=1
26812
26813
26814cat >>confdefs.h <<_ACEOF
26815#define GNULIB_FSCANF 1
26816_ACEOF
067d23c9 26817
067d23c9 26818
5476a9a4 26819 GNULIB_SCANF=1
f199cab1 26820
f199cab1 26821
5476a9a4
GM
26822cat >>confdefs.h <<_ACEOF
26823#define GNULIB_SCANF 1
f199cab1
GM
26824_ACEOF
26825
067d23c9 26826
5476a9a4
GM
26827 GNULIB_FGETC=1
26828 GNULIB_GETC=1
26829 GNULIB_GETCHAR=1
26830 GNULIB_FGETS=1
26831 GNULIB_FREAD=1
067d23c9 26832
067d23c9 26833
5476a9a4
GM
26834 GNULIB_FPRINTF=1
26835 GNULIB_PRINTF=1
26836 GNULIB_VFPRINTF=1
26837 GNULIB_VPRINTF=1
26838 GNULIB_FPUTC=1
26839 GNULIB_PUTC=1
26840 GNULIB_PUTCHAR=1
26841 GNULIB_FPUTS=1
26842 GNULIB_PUTS=1
26843 GNULIB_FWRITE=1
067d23c9 26844
067d23c9 26845
067d23c9 26846
067d23c9 26847
067d23c9 26848
067d23c9 26849
067d23c9 26850
067d23c9 26851
3e0be4ab
GM
26852
26853
26854
26855
26856
26857
3e0be4ab 26858
5476a9a4
GM
26859 if test $gl_cv_have_include_next = yes; then
26860 gl_cv_next_stdlib_h='<'stdlib.h'>'
26861 else
26862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
26863$as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
26864if test "${gl_cv_next_stdlib_h+set}" = set; then :
067d23c9
KY
26865 $as_echo_n "(cached) " >&6
26866else
5476a9a4
GM
26867
26868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 26869/* end confdefs.h. */
5476a9a4
GM
26870#include <stdlib.h>
26871
f199cab1 26872_ACEOF
5476a9a4
GM
26873 case "$host_os" in
26874 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26875 *) gl_absname_cpp="$ac_cpp" ;;
26876 esac
067d23c9 26877
5476a9a4
GM
26878 case "$host_os" in
26879 mingw*)
26880 gl_dirsep_regex='[/\\]'
26881 ;;
26882 *)
26883 gl_dirsep_regex='\/'
26884 ;;
26885 esac
26886 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26887
26888 gl_header_literal_regex=`echo 'stdlib.h' \
26889 | sed -e "$gl_make_literal_regex_sed"`
26890 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26891 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26892 s|^/[^/]|//&|
26893 p
26894 q
26895 }'
26896 gl_cv_next_stdlib_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26897 sed -n "$gl_absolute_header_sed"`'"'
3e0be4ab 26898
067d23c9 26899
f199cab1 26900fi
5476a9a4
GM
26901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
26902$as_echo "$gl_cv_next_stdlib_h" >&6; }
26903 fi
26904 NEXT_STDLIB_H=$gl_cv_next_stdlib_h
b0415a03 26905
5476a9a4
GM
26906 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26907 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26908 gl_next_as_first_directive='<'stdlib.h'>'
26909 else
26910 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26911 gl_next_as_first_directive=$gl_cv_next_stdlib_h
26912 fi
26913 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
b0415a03 26914
067d23c9 26915
067d23c9 26916
067d23c9 26917
067d23c9 26918
067d23c9 26919
067d23c9 26920
067d23c9 26921
067d23c9 26922
5476a9a4 26923 # This defines (or not) HAVE_TZNAME and HAVE_TM_ZONE.
067d23c9 26924
067d23c9 26925
067d23c9 26926
b0415a03
GM
26927
26928
ac1ca7e9 26929
0eb775a3 26930
5476a9a4 26931$as_echo "#define my_strftime nstrftime" >>confdefs.h
067d23c9 26932
067d23c9 26933
a0a61e58
GM
26934
26935
26936
3e0be4ab 26937
5476a9a4
GM
26938
26939
283c7aed
GM
26940
26941
26942
5476a9a4
GM
26943 if test "$ac_cv_have_decl_strtoimax" != yes; then
26944 HAVE_DECL_STRTOIMAX=0
26945 fi
26946
26947 if test $ac_cv_func_strtoimax = yes; then
26948 HAVE_STRTOIMAX=1
26949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtoimax works" >&5
26950$as_echo_n "checking whether strtoimax works... " >&6; }
26951if test "${gl_cv_func_strtoimax+set}" = set; then :
f199cab1
GM
26952 $as_echo_n "(cached) " >&6
26953else
26954 if test "$cross_compiling" = yes; then :
5476a9a4
GM
26955 case "$host_os" in
26956 # Guess no on AIX 5.
26957 aix5*) gl_cv_func_strtoimax="guessing no" ;;
26958 # Guess yes otherwise.
26959 *) gl_cv_func_strtoimax="guessing yes" ;;
26960 esac
26961
f199cab1
GM
26962else
26963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26964/* end confdefs.h. */
3e0be4ab 26965
5476a9a4
GM
26966#include <errno.h>
26967#include <string.h>
26968#include <inttypes.h>
26969int main ()
26970{
26971 if (sizeof (intmax_t) > sizeof (int))
26972 {
26973 const char *s = "4294967295";
26974 char *p;
26975 intmax_t res;
26976 errno = 0;
26977 res = strtoimax (s, &p, 10);
26978 if (p != s + strlen (s))
26979 return 1;
26980 if (errno != 0)
26981 return 2;
26982 if (res != (intmax_t) 65535 * (intmax_t) 65537)
26983 return 3;
26984 }
26985 else
26986 {
26987 const char *s = "2147483647";
26988 char *p;
26989 intmax_t res;
26990 errno = 0;
26991 res = strtoimax (s, &p, 10);
26992 if (p != s + strlen (s))
26993 return 1;
26994 if (errno != 0)
26995 return 2;
26996 if (res != 2147483647)
26997 return 3;
26998 }
f199cab1
GM
26999 return 0;
27000}
5476a9a4 27001
f199cab1
GM
27002_ACEOF
27003if ac_fn_c_try_run "$LINENO"; then :
5476a9a4 27004 gl_cv_func_strtoimax=yes
f199cab1 27005else
5476a9a4 27006 gl_cv_func_strtoimax=no
f199cab1
GM
27007fi
27008rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27009 conftest.$ac_objext conftest.beam conftest.$ac_ext
067d23c9
KY
27010fi
27011
3e0be4ab 27012
f199cab1 27013fi
5476a9a4
GM
27014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtoimax" >&5
27015$as_echo "$gl_cv_func_strtoimax" >&6; }
27016 case "$gl_cv_func_strtoimax" in
27017 *no) REPLACE_STRTOIMAX=1 ;;
27018 esac
27019 else
27020 HAVE_STRTOIMAX=0
27021 fi
067d23c9 27022
a6342fc8 27023 if test $HAVE_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; then
067d23c9 27024
067d23c9 27025
067d23c9 27026
067d23c9 27027
067d23c9 27028
3e0be4ab 27029
2b1928b8
GM
27030
27031
5476a9a4
GM
27032 gl_LIBOBJS="$gl_LIBOBJS strtoimax.$ac_objext"
27033
27034
27035 ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
27036if test "x$ac_cv_have_decl_strtoll" = x""yes; then :
27037 ac_have_decl=1
f199cab1 27038else
5476a9a4 27039 ac_have_decl=0
f199cab1 27040fi
2b1928b8 27041
5476a9a4
GM
27042cat >>confdefs.h <<_ACEOF
27043#define HAVE_DECL_STRTOLL $ac_have_decl
27044_ACEOF
27045
27046
067d23c9 27047
a6342fc8 27048 fi
067d23c9 27049
3e0be4ab
GM
27050
27051
27052
3e0be4ab 27053
5476a9a4 27054 GNULIB_STRTOIMAX=1
3e0be4ab
GM
27055
27056
27057
27058
3e0be4ab
GM
27059
27060
27061
f199cab1 27062
f199cab1 27063
5476a9a4
GM
27064 if test "$ac_cv_have_decl_strtoumax" != yes; then
27065 HAVE_DECL_STRTOUMAX=0
27066 fi
067d23c9 27067
a6342fc8 27068 if test $ac_cv_func_strtoumax = no; then
0eb775a3 27069
5476a9a4
GM
27070
27071
27072
27073
27074
27075
27076
27077 gl_LIBOBJS="$gl_LIBOBJS strtoumax.$ac_objext"
27078
27079
27080 ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
27081if test "x$ac_cv_have_decl_strtoull" = x""yes; then :
27082 ac_have_decl=1
067d23c9 27083else
5476a9a4 27084 ac_have_decl=0
067d23c9 27085fi
5476a9a4
GM
27086
27087cat >>confdefs.h <<_ACEOF
27088#define HAVE_DECL_STRTOULL $ac_have_decl
27089_ACEOF
27090
27091
27092
a6342fc8 27093 fi
067d23c9 27094
067d23c9 27095
067d23c9 27096
067d23c9 27097
067d23c9 27098
5476a9a4
GM
27099 GNULIB_STRTOUMAX=1
27100
27101
27102
27103
27104
27105
27106
27107 if test $ac_cv_func_symlink = no; then
27108 HAVE_SYMLINK=0
27109 else
27110 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether symlink handles trailing slash correctly" >&5
27111$as_echo_n "checking whether symlink handles trailing slash correctly... " >&6; }
27112if test "${gl_cv_func_symlink_works+set}" = set; then :
f199cab1 27113 $as_echo_n "(cached) " >&6
5476a9a4
GM
27114else
27115 if test "$cross_compiling" = yes; then :
27116 case "$host_os" in
27117 # Guess yes on glibc systems.
27118 *-gnu*) gl_cv_func_symlink_works="guessing yes" ;;
27119 # If we don't know, assume the worst.
27120 *) gl_cv_func_symlink_works="guessing no" ;;
27121 esac
27122
f199cab1
GM
27123else
27124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27125/* end confdefs.h. */
5476a9a4
GM
27126#include <unistd.h>
27127
f199cab1
GM
27128int
27129main ()
27130{
5476a9a4
GM
27131int result = 0;
27132 if (!symlink ("a", "conftest.link/"))
27133 result |= 1;
27134 if (symlink ("conftest.f", "conftest.lnk2"))
27135 result |= 2;
27136 else if (!symlink ("a", "conftest.lnk2/"))
27137 result |= 4;
27138 return result;
067d23c9 27139
f199cab1
GM
27140 ;
27141 return 0;
27142}
27143_ACEOF
5476a9a4
GM
27144if ac_fn_c_try_run "$LINENO"; then :
27145 gl_cv_func_symlink_works=yes
f199cab1 27146else
5476a9a4 27147 gl_cv_func_symlink_works=no
f199cab1 27148fi
5476a9a4
GM
27149rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27150 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1 27151fi
067d23c9 27152
5476a9a4 27153 rm -f conftest.f conftest.link conftest.lnk2
f199cab1 27154fi
5476a9a4
GM
27155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_symlink_works" >&5
27156$as_echo "$gl_cv_func_symlink_works" >&6; }
27157 case "$gl_cv_func_symlink_works" in
27158 *yes) ;;
27159 *)
27160 REPLACE_SYMLINK=1
27161 ;;
27162 esac
27163 fi
067d23c9 27164
a6342fc8 27165 if test $HAVE_SYMLINK = 0 || test $REPLACE_SYMLINK = 1; then
067d23c9 27166
7e723570 27167
7e723570
GM
27168
27169
dd0d840e 27170
dd0d840e
GM
27171
27172
27173
5476a9a4 27174 gl_LIBOBJS="$gl_LIBOBJS symlink.$ac_objext"
dd0d840e 27175
a6342fc8 27176 fi
dd0d840e
GM
27177
27178
d3127c14
GM
27179
27180
d3127c14 27181
5476a9a4 27182 GNULIB_SYMLINK=1
d3127c14 27183
d3127c14 27184
d3127c14
GM
27185
27186
067d23c9 27187
067d23c9 27188
d3127c14 27189
d3127c14 27190
5476a9a4
GM
27191 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/select.h> is self-contained" >&5
27192$as_echo_n "checking whether <sys/select.h> is self-contained... " >&6; }
27193if test "${gl_cv_header_sys_select_h_selfcontained+set}" = set; then :
27194 $as_echo_n "(cached) " >&6
27195else
d3127c14 27196
5476a9a4
GM
27197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27198/* end confdefs.h. */
27199#include <sys/select.h>
27200int
27201main ()
27202{
27203struct timeval b;
27204 ;
27205 return 0;
27206}
27207_ACEOF
27208if ac_fn_c_try_compile "$LINENO"; then :
27209 gl_cv_header_sys_select_h_selfcontained=yes
27210else
27211 gl_cv_header_sys_select_h_selfcontained=no
27212fi
27213rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27214 if test $gl_cv_header_sys_select_h_selfcontained = yes; then
27215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27216/* end confdefs.h. */
27217#include <sys/select.h>
27218int
27219main ()
27220{
27221int memset; int bzero;
27222 ;
27223 return 0;
27224}
3e0be4ab 27225
5476a9a4
GM
27226_ACEOF
27227if ac_fn_c_try_compile "$LINENO"; then :
27228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27229/* end confdefs.h. */
27230#include <sys/select.h>
27231int
27232main ()
27233{
dd0d840e 27234
5476a9a4
GM
27235 #undef memset
27236 #define memset nonexistent_memset
27237 extern
27238 #ifdef __cplusplus
27239 "C"
27240 #endif
27241 void *memset (void *, int, unsigned long);
27242 #undef bzero
27243 #define bzero nonexistent_bzero
27244 extern
27245 #ifdef __cplusplus
27246 "C"
27247 #endif
27248 void bzero (void *, unsigned long);
27249 fd_set fds;
27250 FD_ZERO (&fds);
3e0be4ab 27251
5476a9a4
GM
27252 ;
27253 return 0;
27254}
067d23c9 27255
5476a9a4
GM
27256_ACEOF
27257if ac_fn_c_try_link "$LINENO"; then :
dd0d840e 27258
5476a9a4
GM
27259else
27260 gl_cv_header_sys_select_h_selfcontained=no
27261fi
27262rm -f core conftest.err conftest.$ac_objext \
27263 conftest$ac_exeext conftest.$ac_ext
dd0d840e 27264
5476a9a4
GM
27265fi
27266rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27267 fi
dd0d840e 27268
5476a9a4
GM
27269fi
27270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_select_h_selfcontained" >&5
27271$as_echo "$gl_cv_header_sys_select_h_selfcontained" >&6; }
dd0d840e 27272
dd0d840e
GM
27273
27274
dd0d840e
GM
27275
27276
dd0d840e
GM
27277
27278
27279
dd0d840e 27280
5476a9a4
GM
27281 if test $gl_cv_have_include_next = yes; then
27282 gl_cv_next_sys_select_h='<'sys/select.h'>'
27283 else
27284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/select.h>" >&5
27285$as_echo_n "checking absolute name of <sys/select.h>... " >&6; }
27286if test "${gl_cv_next_sys_select_h+set}" = set; then :
27287 $as_echo_n "(cached) " >&6
27288else
dd0d840e 27289
5476a9a4 27290 if test $ac_cv_header_sys_select_h = yes; then
dd0d840e 27291
dd0d840e 27292
5476a9a4
GM
27293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27294/* end confdefs.h. */
27295#include <sys/select.h>
dd0d840e 27296
5476a9a4
GM
27297_ACEOF
27298 case "$host_os" in
27299 aix*) gl_absname_cpp="$ac_cpp -C" ;;
27300 *) gl_absname_cpp="$ac_cpp" ;;
27301 esac
dd0d840e 27302
5476a9a4
GM
27303 case "$host_os" in
27304 mingw*)
27305 gl_dirsep_regex='[/\\]'
27306 ;;
27307 *)
27308 gl_dirsep_regex='\/'
27309 ;;
27310 esac
27311 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
dd0d840e 27312
5476a9a4
GM
27313 gl_header_literal_regex=`echo 'sys/select.h' \
27314 | sed -e "$gl_make_literal_regex_sed"`
27315 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27316 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27317 s|^/[^/]|//&|
27318 p
27319 q
27320 }'
27321 gl_cv_next_sys_select_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27322 sed -n "$gl_absolute_header_sed"`'"'
27323 else
27324 gl_cv_next_sys_select_h='<'sys/select.h'>'
27325 fi
067d23c9 27326
067d23c9 27327
5476a9a4
GM
27328fi
27329{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_select_h" >&5
27330$as_echo "$gl_cv_next_sys_select_h" >&6; }
27331 fi
27332 NEXT_SYS_SELECT_H=$gl_cv_next_sys_select_h
27333
27334 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27335 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27336 gl_next_as_first_directive='<'sys/select.h'>'
27337 else
27338 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27339 gl_next_as_first_directive=$gl_cv_next_sys_select_h
27340 fi
27341 NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H=$gl_next_as_first_directive
27342
27343
27344
27345
27346 if test $ac_cv_header_sys_select_h = yes; then
27347 HAVE_SYS_SELECT_H=1
27348 else
27349 HAVE_SYS_SELECT_H=0
27350 fi
067d23c9
KY
27351
27352
7e723570 27353
7e723570 27354
7e723570 27355
5476a9a4
GM
27356 if test $ac_cv_header_sys_socket_h != yes; then
27357 for ac_header in winsock2.h
27358do :
27359 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
27360if test "x$ac_cv_header_winsock2_h" = x""yes; then :
27361 cat >>confdefs.h <<_ACEOF
27362#define HAVE_WINSOCK2_H 1
27363_ACEOF
7e723570 27364
5476a9a4 27365fi
7e723570 27366
5476a9a4 27367done
7e723570 27368
5476a9a4
GM
27369 fi
27370 if test "$ac_cv_header_winsock2_h" = yes; then
27371 HAVE_WINSOCK2_H=1
27372 UNISTD_H_HAVE_WINSOCK2_H=1
27373 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
27374 else
27375 HAVE_WINSOCK2_H=0
27376 fi
7e723570
GM
27377
27378
dd0d840e 27379
dd0d840e 27380
dd0d840e
GM
27381
27382
dd0d840e 27383
dd0d840e 27384
dd0d840e
GM
27385
27386
27387
27388
27389
27390
27391
27392
dd0d840e 27393
dd0d840e 27394
dd0d840e 27395
dd0d840e 27396
5476a9a4
GM
27397 if test $gl_cv_have_include_next = yes; then
27398 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
27399 else
27400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
27401$as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
27402if test "${gl_cv_next_sys_stat_h+set}" = set; then :
27403 $as_echo_n "(cached) " >&6
27404else
dd0d840e 27405
5476a9a4 27406 if test $ac_cv_header_sys_stat_h = yes; then
dd0d840e 27407
dd0d840e 27408
5476a9a4
GM
27409 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27410/* end confdefs.h. */
27411#include <sys/stat.h>
dd0d840e 27412
5476a9a4
GM
27413_ACEOF
27414 case "$host_os" in
27415 aix*) gl_absname_cpp="$ac_cpp -C" ;;
27416 *) gl_absname_cpp="$ac_cpp" ;;
27417 esac
dd0d840e 27418
5476a9a4
GM
27419 case "$host_os" in
27420 mingw*)
27421 gl_dirsep_regex='[/\\]'
27422 ;;
27423 *)
27424 gl_dirsep_regex='\/'
27425 ;;
27426 esac
27427 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
dd0d840e 27428
5476a9a4
GM
27429 gl_header_literal_regex=`echo 'sys/stat.h' \
27430 | sed -e "$gl_make_literal_regex_sed"`
27431 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27432 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27433 s|^/[^/]|//&|
27434 p
27435 q
27436 }'
27437 gl_cv_next_sys_stat_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27438 sed -n "$gl_absolute_header_sed"`'"'
27439 else
27440 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
27441 fi
dd0d840e 27442
dd0d840e 27443
5476a9a4
GM
27444fi
27445{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
27446$as_echo "$gl_cv_next_sys_stat_h" >&6; }
27447 fi
27448 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
dd0d840e 27449
5476a9a4
GM
27450 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27451 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27452 gl_next_as_first_directive='<'sys/stat.h'>'
27453 else
27454 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27455 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
27456 fi
27457 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
dd0d840e 27458
dd0d840e 27459
d3127c14 27460
d3127c14 27461
dd0d840e 27462
dd0d840e 27463
dd0d840e 27464
dd0d840e 27465
dd0d840e 27466
dd0d840e 27467
dd0d840e 27468
5476a9a4 27469 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
dd0d840e 27470
5476a9a4 27471$as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
dd0d840e 27472
5476a9a4 27473 fi
dd0d840e 27474
5476a9a4
GM
27475 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
27476 #include <sys/stat.h>
27477"
27478if test "x$ac_cv_type_nlink_t" = x""yes; then :
dd0d840e 27479
5476a9a4 27480else
dd0d840e 27481
5476a9a4 27482$as_echo "#define nlink_t int" >>confdefs.h
dd0d840e 27483
5476a9a4 27484fi
dd0d840e 27485
dd0d840e 27486
dd0d840e 27487
dd0d840e 27488
dd0d840e 27489
dd0d840e 27490
dd0d840e 27491
c9ca3f76 27492
dd0d840e 27493
dd0d840e 27494
dd0d840e 27495
c9ca3f76 27496
dd0d840e 27497
dd0d840e
GM
27498
27499
7e723570
GM
27500
27501
7e723570 27502
5476a9a4
GM
27503 ac_fn_c_check_decl "$LINENO" "localtime_r" "ac_cv_have_decl_localtime_r" "#include <time.h>
27504"
27505if test "x$ac_cv_have_decl_localtime_r" = x""yes; then :
27506 ac_have_decl=1
27507else
27508 ac_have_decl=0
27509fi
7e723570 27510
5476a9a4
GM
27511cat >>confdefs.h <<_ACEOF
27512#define HAVE_DECL_LOCALTIME_R $ac_have_decl
27513_ACEOF
7e723570 27514
5476a9a4
GM
27515 if test $ac_cv_have_decl_localtime_r = no; then
27516 HAVE_DECL_LOCALTIME_R=0
27517 fi
7e723570 27518
7e723570 27519
5476a9a4
GM
27520 if test $ac_cv_func_localtime_r = yes; then
27521 HAVE_LOCALTIME_R=1
27522 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime_r is compatible with its POSIX signature" >&5
27523$as_echo_n "checking whether localtime_r is compatible with its POSIX signature... " >&6; }
27524if test "${gl_cv_time_r_posix+set}" = set; then :
27525 $as_echo_n "(cached) " >&6
27526else
27527 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27528/* end confdefs.h. */
27529#include <time.h>
7e723570
GM
27530int
27531main ()
27532{
5476a9a4
GM
27533/* We don't need to append 'restrict's to the argument types,
27534 even though the POSIX signature has the 'restrict's,
27535 since C99 says they can't affect type compatibility. */
27536 struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r;
27537 if (ptr) return 0;
27538 /* Check the return type is a pointer.
27539 On HP-UX 10 it is 'int'. */
27540 *localtime_r (0, 0);
7e723570
GM
27541 ;
27542 return 0;
27543}
5476a9a4 27544
7e723570 27545_ACEOF
5476a9a4
GM
27546if ac_fn_c_try_compile "$LINENO"; then :
27547 gl_cv_time_r_posix=yes
7e723570 27548else
5476a9a4 27549 gl_cv_time_r_posix=no
7e723570 27550fi
5476a9a4 27551rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
02bd7257 27552
5476a9a4
GM
27553fi
27554{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_r_posix" >&5
27555$as_echo "$gl_cv_time_r_posix" >&6; }
27556 if test $gl_cv_time_r_posix = yes; then
27557 REPLACE_LOCALTIME_R=0
27558 else
27559 REPLACE_LOCALTIME_R=1
27560 fi
27561 else
27562 HAVE_LOCALTIME_R=0
27563 fi
02bd7257 27564
a6342fc8 27565 if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then
02bd7257
GM
27566
27567
02bd7257 27568
02bd7257 27569
02bd7257 27570
02bd7257 27571
7e723570 27572
7e723570 27573
5476a9a4
GM
27574 gl_LIBOBJS="$gl_LIBOBJS time_r.$ac_objext"
27575
27576
27577 :
7e723570 27578
a6342fc8 27579 fi
7e723570 27580
7e723570 27581
7e723570 27582
7e723570 27583
7e723570 27584
5476a9a4 27585 GNULIB_TIME_R=1
7e723570 27586
7e723570 27587
7e723570 27588
7e723570 27589
7e723570 27590
f077f61d
GM
27591
27592
27593
27594
27595
27596 LIB_TIMER_TIME=
27597
27598 gl_saved_libs=$LIBS
27599 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing timer_settime" >&5
27600$as_echo_n "checking for library containing timer_settime... " >&6; }
27601if test "${ac_cv_search_timer_settime+set}" = set; then :
27602 $as_echo_n "(cached) " >&6
27603else
27604 ac_func_search_save_LIBS=$LIBS
27605cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27606/* end confdefs.h. */
27607
27608/* Override any GCC internal prototype to avoid an error.
27609 Use char because int might match the return type of a GCC
27610 builtin and then its argument prototype would still apply. */
27611#ifdef __cplusplus
27612extern "C"
27613#endif
27614char timer_settime ();
27615int
27616main ()
27617{
27618return timer_settime ();
27619 ;
27620 return 0;
27621}
27622_ACEOF
27623for ac_lib in '' rt posix4; do
27624 if test -z "$ac_lib"; then
27625 ac_res="none required"
27626 else
27627 ac_res=-l$ac_lib
27628 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
27629 fi
27630 if ac_fn_c_try_link "$LINENO"; then :
27631 ac_cv_search_timer_settime=$ac_res
27632fi
27633rm -f core conftest.err conftest.$ac_objext \
27634 conftest$ac_exeext
27635 if test "${ac_cv_search_timer_settime+set}" = set; then :
27636 break
27637fi
27638done
27639if test "${ac_cv_search_timer_settime+set}" = set; then :
27640
27641else
27642 ac_cv_search_timer_settime=no
27643fi
27644rm conftest.$ac_ext
27645LIBS=$ac_func_search_save_LIBS
27646fi
27647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_timer_settime" >&5
27648$as_echo "$ac_cv_search_timer_settime" >&6; }
27649ac_res=$ac_cv_search_timer_settime
27650if test "$ac_res" != no; then :
27651 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
27652 test "$ac_cv_search_timer_settime" = "none required" ||
27653 LIB_TIMER_TIME=$ac_cv_search_timer_settime
27654fi
27655
27656 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27657/* end confdefs.h. */
27658
27659#include <features.h>
27660#ifdef __GNU_LIBRARY__
27661 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || (__GLIBC__ > 2)) \
27662 && !defined __UCLIBC__
27663 Thread emulation available
27664 #endif
27665#endif
27666
27667_ACEOF
27668if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27669 $EGREP "Thread" >/dev/null 2>&1; then :
27670 LIB_TIMER_TIME="$LIB_TIMER_TIME $LIBMULTITHREAD"
27671fi
27672rm -f conftest*
27673
27674 for ac_func in timer_settime
27675do :
27676 ac_fn_c_check_func "$LINENO" "timer_settime" "ac_cv_func_timer_settime"
27677if test "x$ac_cv_func_timer_settime" = x""yes; then :
27678 cat >>confdefs.h <<_ACEOF
27679#define HAVE_TIMER_SETTIME 1
27680_ACEOF
27681
27682fi
27683done
27684
27685 LIBS=$gl_saved_libs
27686
a6342fc8 27687 :
7e723570 27688
02bd7257 27689
02bd7257 27690
02bd7257 27691
02bd7257 27692
02bd7257 27693
02bd7257 27694
02bd7257 27695
dd0d840e
GM
27696
27697
27698
dd0d840e 27699
5476a9a4
GM
27700 if test $gl_cv_have_include_next = yes; then
27701 gl_cv_next_unistd_h='<'unistd.h'>'
27702 else
27703 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
27704$as_echo_n "checking absolute name of <unistd.h>... " >&6; }
27705if test "${gl_cv_next_unistd_h+set}" = set; then :
27706 $as_echo_n "(cached) " >&6
27707else
dd0d840e 27708
5476a9a4 27709 if test $ac_cv_header_unistd_h = yes; then
dd0d840e 27710
dd0d840e 27711
5476a9a4 27712 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d3127c14 27713/* end confdefs.h. */
5476a9a4 27714#include <unistd.h>
d3127c14 27715
5476a9a4
GM
27716_ACEOF
27717 case "$host_os" in
27718 aix*) gl_absname_cpp="$ac_cpp -C" ;;
27719 *) gl_absname_cpp="$ac_cpp" ;;
27720 esac
d3127c14 27721
5476a9a4
GM
27722 case "$host_os" in
27723 mingw*)
27724 gl_dirsep_regex='[/\\]'
27725 ;;
27726 *)
27727 gl_dirsep_regex='\/'
27728 ;;
27729 esac
27730 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
27731
27732 gl_header_literal_regex=`echo 'unistd.h' \
27733 | sed -e "$gl_make_literal_regex_sed"`
27734 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27735 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27736 s|^/[^/]|//&|
27737 p
27738 q
27739 }'
27740 gl_cv_next_unistd_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27741 sed -n "$gl_absolute_header_sed"`'"'
27742 else
27743 gl_cv_next_unistd_h='<'unistd.h'>'
27744 fi
d3127c14 27745
d3127c14 27746
c9ca3f76 27747fi
5476a9a4
GM
27748{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
27749$as_echo "$gl_cv_next_unistd_h" >&6; }
27750 fi
27751 NEXT_UNISTD_H=$gl_cv_next_unistd_h
c9ca3f76 27752
5476a9a4
GM
27753 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27754 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27755 gl_next_as_first_directive='<'unistd.h'>'
27756 else
27757 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27758 gl_next_as_first_directive=$gl_cv_next_unistd_h
27759 fi
27760 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
c9ca3f76 27761
c9ca3f76 27762
c9ca3f76 27763
c9ca3f76 27764
5476a9a4
GM
27765 if test $ac_cv_header_unistd_h = yes; then
27766 HAVE_UNISTD_H=1
27767 else
27768 HAVE_UNISTD_H=0
27769 fi
c9ca3f76 27770
d3127c14 27771
dd0d840e 27772
dd0d840e 27773
d3127c14 27774
d3127c14 27775
dd0d840e
GM
27776
27777
c9ca3f76
GM
27778
27779
27780
b5591ebb
GM
27781 if test $ac_cv_have_decl_unsetenv = no; then
27782 HAVE_DECL_UNSETENV=0
27783 fi
27784 for ac_func in unsetenv
27785do :
27786 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
27787if test "x$ac_cv_func_unsetenv" = x""yes; then :
27788 cat >>confdefs.h <<_ACEOF
27789#define HAVE_UNSETENV 1
27790_ACEOF
27791
27792fi
27793done
27794
27795 if test $ac_cv_func_unsetenv = no; then
27796 HAVE_UNSETENV=0
27797 else
27798 HAVE_UNSETENV=1
27799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5
27800$as_echo_n "checking for unsetenv() return type... " >&6; }
27801if test "${gt_cv_func_unsetenv_ret+set}" = set; then :
27802 $as_echo_n "(cached) " >&6
27803else
27804 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27805/* end confdefs.h. */
27806
27807#undef _BSD
27808#define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */
27809#include <stdlib.h>
27810extern
27811#ifdef __cplusplus
27812"C"
27813#endif
27814int unsetenv (const char *name);
27815
27816int
27817main ()
27818{
27819
27820 ;
27821 return 0;
27822}
27823_ACEOF
27824if ac_fn_c_try_compile "$LINENO"; then :
27825 gt_cv_func_unsetenv_ret='int'
27826else
27827 gt_cv_func_unsetenv_ret='void'
27828fi
27829rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27830fi
27831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5
27832$as_echo "$gt_cv_func_unsetenv_ret" >&6; }
27833 if test $gt_cv_func_unsetenv_ret = 'void'; then
27834
27835$as_echo "#define VOID_UNSETENV 1" >>confdefs.h
27836
27837 REPLACE_UNSETENV=1
27838 fi
27839
27840 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5
27841$as_echo_n "checking whether unsetenv obeys POSIX... " >&6; }
27842if test "${gl_cv_func_unsetenv_works+set}" = set; then :
27843 $as_echo_n "(cached) " >&6
27844else
27845 if test "$cross_compiling" = yes; then :
27846 case "$host_os" in
27847 # Guess yes on glibc systems.
27848 *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
27849 # If we don't know, assume the worst.
27850 *) gl_cv_func_unsetenv_works="guessing no" ;;
27851 esac
27852
27853else
27854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27855/* end confdefs.h. */
27856
27857 #include <stdlib.h>
27858 #include <errno.h>
27859 extern char **environ;
27860
27861int
27862main ()
27863{
27864
27865 char entry1[] = "a=1";
27866 char entry2[] = "b=2";
27867 char *env[] = { entry1, entry2, NULL };
27868 if (putenv ((char *) "a=1")) return 1;
27869 if (putenv (entry2)) return 2;
27870 entry2[0] = 'a';
27871 unsetenv ("a");
27872 if (getenv ("a")) return 3;
27873 if (!unsetenv ("") || errno != EINVAL) return 4;
27874 entry2[0] = 'b';
27875 environ = env;
27876 if (!getenv ("a")) return 5;
27877 entry2[0] = 'a';
27878 unsetenv ("a");
27879 if (getenv ("a")) return 6;
27880
27881 ;
27882 return 0;
27883}
27884_ACEOF
27885if ac_fn_c_try_run "$LINENO"; then :
27886 gl_cv_func_unsetenv_works=yes
27887else
27888 gl_cv_func_unsetenv_works=no
27889fi
27890rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27891 conftest.$ac_objext conftest.beam conftest.$ac_ext
27892fi
27893
27894fi
27895{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5
27896$as_echo "$gl_cv_func_unsetenv_works" >&6; }
27897 case "$gl_cv_func_unsetenv_works" in
27898 *yes) ;;
27899 *)
27900 REPLACE_UNSETENV=1
27901 ;;
27902 esac
27903 fi
27904
27905 if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
27906
27907
27908
27909
27910
27911
27912
27913
27914 gl_LIBOBJS="$gl_LIBOBJS unsetenv.$ac_objext"
27915
27916
27917
27918
27919
27920 fi
27921
27922
27923
27924
27925
27926 GNULIB_UNSETENV=1
27927
27928
27929
27930
27931
27932
27933
27934
c9ca3f76
GM
27935
27936
c9ca3f76 27937
5476a9a4
GM
27938 if test $ac_cv_func_futimens = no && test $ac_cv_func_futimesat = yes; then
27939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether futimesat handles NULL file" >&5
27940$as_echo_n "checking whether futimesat handles NULL file... " >&6; }
27941if test "${gl_cv_func_futimesat_works+set}" = set; then :
27942 $as_echo_n "(cached) " >&6
27943else
27944 touch conftest.file
27945 if test "$cross_compiling" = yes; then :
27946 case "$host_os" in
27947 # Guess yes on glibc systems.
27948 *-gnu*) gl_cv_func_futimesat_works="guessing yes" ;;
27949 # If we don't know, assume the worst.
27950 *) gl_cv_func_futimesat_works="guessing no" ;;
27951 esac
c9ca3f76 27952
5476a9a4
GM
27953else
27954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c9ca3f76
GM
27955/* end confdefs.h. */
27956
5476a9a4
GM
27957#include <stddef.h>
27958#include <sys/times.h>
27959#include <fcntl.h>
c9ca3f76
GM
27960
27961int
27962main ()
27963{
5476a9a4
GM
27964 int fd = open ("conftest.file", O_RDWR);
27965 if (fd < 0) return 1;
27966 if (futimesat (fd, NULL, NULL)) return 2;
c9ca3f76
GM
27967
27968 ;
27969 return 0;
27970}
27971_ACEOF
5476a9a4
GM
27972if ac_fn_c_try_run "$LINENO"; then :
27973 gl_cv_func_futimesat_works=yes
c9ca3f76 27974else
5476a9a4 27975 gl_cv_func_futimesat_works=no
c9ca3f76 27976fi
5476a9a4
GM
27977rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27978 conftest.$ac_objext conftest.beam conftest.$ac_ext
c9ca3f76
GM
27979fi
27980
5476a9a4
GM
27981 rm -f conftest.file
27982fi
27983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_futimesat_works" >&5
27984$as_echo "$gl_cv_func_futimesat_works" >&6; }
27985 case "$gl_cv_func_futimesat_works" in
27986 *yes) ;;
27987 *)
7e723570 27988
5476a9a4 27989$as_echo "#define FUTIMESAT_NULL_BUG 1" >>confdefs.h
067d23c9 27990
5476a9a4
GM
27991 ;;
27992 esac
27993 fi
dd0d840e 27994
d7ad186c 27995 gl_gnulib_enabled_260941c0e5dc67ec9e87d1fb321c300b=false
5476a9a4 27996 gl_gnulib_enabled_dosname=false
710f5812 27997 gl_gnulib_enabled_euidaccess=false
0cdca42a 27998 gl_gnulib_enabled_getdtablesize=false
710f5812 27999 gl_gnulib_enabled_getgroups=false
5476a9a4 28000 gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=false
710f5812 28001 gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1=false
d7ad186c 28002 gl_gnulib_enabled_03e0aaad4cb89ca757653bd367a6ccb7=false
5476a9a4 28003 gl_gnulib_enabled_pathmax=false
710f5812 28004 gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c=false
e412eb97 28005 gl_gnulib_enabled_secure_getenv=false
5476a9a4
GM
28006 gl_gnulib_enabled_stat=false
28007 gl_gnulib_enabled_strtoll=false
28008 gl_gnulib_enabled_strtoull=false
e412eb97 28009 gl_gnulib_enabled_tempname=false
710f5812 28010 gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec=false
d7ad186c
GM
28011 func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b ()
28012 {
28013 if ! $gl_gnulib_enabled_260941c0e5dc67ec9e87d1fb321c300b; then
28014
28015
28016
28017
28018
28019
28020
28021
28022 gl_LIBOBJS="$gl_LIBOBJS openat-proc.$ac_objext"
28023
28024 gl_gnulib_enabled_260941c0e5dc67ec9e87d1fb321c300b=true
28025 fi
28026 }
5476a9a4
GM
28027 func_gl_gnulib_m4code_dosname ()
28028 {
28029 if ! $gl_gnulib_enabled_dosname; then
28030 gl_gnulib_enabled_dosname=true
28031 fi
28032 }
710f5812 28033 func_gl_gnulib_m4code_euidaccess ()
5476a9a4 28034 {
710f5812 28035 if ! $gl_gnulib_enabled_euidaccess; then
dd0d840e 28036
d3127c14
GM
28037
28038
28039
28040
710f5812
GM
28041 for ac_func in euidaccess
28042do :
28043 ac_fn_c_check_func "$LINENO" "euidaccess" "ac_cv_func_euidaccess"
28044if test "x$ac_cv_func_euidaccess" = x""yes; then :
28045 cat >>confdefs.h <<_ACEOF
28046#define HAVE_EUIDACCESS 1
28047_ACEOF
d3127c14 28048
710f5812
GM
28049fi
28050done
d3127c14 28051
710f5812
GM
28052 if test $ac_cv_func_euidaccess = no; then
28053 HAVE_EUIDACCESS=0
28054 fi
d3127c14 28055
710f5812
GM
28056 if test $HAVE_EUIDACCESS = 0; then
28057
28058
28059
28060
28061
28062
28063
28064
28065 gl_LIBOBJS="$gl_LIBOBJS euidaccess.$ac_objext"
28066
28067
28068
28069 for ac_header in libgen.h
28070do :
28071 ac_fn_c_check_header_mongrel "$LINENO" "libgen.h" "ac_cv_header_libgen_h" "$ac_includes_default"
28072if test "x$ac_cv_header_libgen_h" = x""yes; then :
28073 cat >>confdefs.h <<_ACEOF
28074#define HAVE_LIBGEN_H 1
28075_ACEOF
28076
28077fi
28078
28079done
28080
28081
28082 ac_fn_c_check_func "$LINENO" "getgroups" "ac_cv_func_getgroups"
28083if test "x$ac_cv_func_getgroups" = x""yes; then :
28084
28085fi
28086
28087
28088 # If we don't yet have getgroups, see if it's in -lbsd.
28089 # This is reported to be necessary on an ITOS 3000WS running SEIUX 3.1.
28090 ac_save_LIBS=$LIBS
28091 if test $ac_cv_func_getgroups = no; then
28092 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getgroups in -lbsd" >&5
28093$as_echo_n "checking for getgroups in -lbsd... " >&6; }
28094if test "${ac_cv_lib_bsd_getgroups+set}" = set; then :
5476a9a4
GM
28095 $as_echo_n "(cached) " >&6
28096else
710f5812
GM
28097 ac_check_lib_save_LIBS=$LIBS
28098LIBS="-lbsd $LIBS"
28099cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d3127c14 28100/* end confdefs.h. */
d3127c14 28101
710f5812
GM
28102/* Override any GCC internal prototype to avoid an error.
28103 Use char because int might match the return type of a GCC
28104 builtin and then its argument prototype would still apply. */
28105#ifdef __cplusplus
28106extern "C"
28107#endif
28108char getgroups ();
d3127c14
GM
28109int
28110main ()
28111{
710f5812 28112return getgroups ();
d3127c14
GM
28113 ;
28114 return 0;
28115}
28116_ACEOF
710f5812
GM
28117if ac_fn_c_try_link "$LINENO"; then :
28118 ac_cv_lib_bsd_getgroups=yes
d3127c14 28119else
710f5812 28120 ac_cv_lib_bsd_getgroups=no
5476a9a4 28121fi
710f5812
GM
28122rm -f core conftest.err conftest.$ac_objext \
28123 conftest$ac_exeext conftest.$ac_ext
28124LIBS=$ac_check_lib_save_LIBS
d3127c14 28125fi
710f5812
GM
28126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_getgroups" >&5
28127$as_echo "$ac_cv_lib_bsd_getgroups" >&6; }
28128if test "x$ac_cv_lib_bsd_getgroups" = x""yes; then :
28129 GETGROUPS_LIB=-lbsd
5476a9a4 28130fi
710f5812
GM
28131
28132 fi
28133
28134 # Run the program to test the functionality of the system-supplied
28135 # getgroups function only if there is such a function.
28136 if test $ac_cv_func_getgroups = yes; then
28137 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getgroups" >&5
28138$as_echo_n "checking for working getgroups... " >&6; }
28139if test "${ac_cv_func_getgroups_works+set}" = set; then :
5476a9a4
GM
28140 $as_echo_n "(cached) " >&6
28141else
710f5812
GM
28142 if test "$cross_compiling" = yes; then :
28143 case "$host_os" in # ((
5476a9a4 28144 # Guess yes on glibc systems.
710f5812 28145 *-gnu*) ac_cv_func_getgroups_works="guessing yes" ;;
5476a9a4 28146 # If we don't know, assume the worst.
710f5812 28147 *) ac_cv_func_getgroups_works="guessing no" ;;
5476a9a4 28148 esac
d3127c14 28149
5476a9a4
GM
28150else
28151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d3127c14 28152/* end confdefs.h. */
710f5812 28153$ac_includes_default
d3127c14
GM
28154int
28155main ()
28156{
710f5812
GM
28157/* On Ultrix 4.3, getgroups (0, 0) always fails. */
28158 return getgroups (0, 0) == -1;
28159 ;
28160 return 0;
28161}
28162
28163_ACEOF
28164if ac_fn_c_try_run "$LINENO"; then :
28165 ac_cv_func_getgroups_works=yes
28166else
28167 ac_cv_func_getgroups_works=no
28168fi
28169rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28170 conftest.$ac_objext conftest.beam conftest.$ac_ext
28171fi
28172
28173
28174fi
28175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getgroups_works" >&5
28176$as_echo "$ac_cv_func_getgroups_works" >&6; }
28177 else
28178 ac_cv_func_getgroups_works=no
28179 fi
28180 case "$ac_cv_func_getgroups_works" in
28181 *yes)
28182
28183$as_echo "#define HAVE_GETGROUPS 1" >>confdefs.h
28184
28185 ;;
28186 esac
28187 LIBS=$ac_save_LIBS
28188
28189
28190 # Solaris 9 and 10 need -lgen to get the eaccess function.
28191 # Save and restore LIBS so -lgen isn't added to it. Otherwise, *all*
28192 # programs in the package would end up linked with that potentially-shared
28193 # library, inducing unnecessary run-time overhead.
28194 LIB_EACCESS=
28195
28196 gl_saved_libs=$LIBS
28197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing eaccess" >&5
28198$as_echo_n "checking for library containing eaccess... " >&6; }
28199if test "${ac_cv_search_eaccess+set}" = set; then :
28200 $as_echo_n "(cached) " >&6
28201else
28202 ac_func_search_save_LIBS=$LIBS
28203cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28204/* end confdefs.h. */
28205
28206/* Override any GCC internal prototype to avoid an error.
28207 Use char because int might match the return type of a GCC
28208 builtin and then its argument prototype would still apply. */
28209#ifdef __cplusplus
28210extern "C"
28211#endif
28212char eaccess ();
28213int
28214main ()
28215{
28216return eaccess ();
28217 ;
28218 return 0;
28219}
28220_ACEOF
28221for ac_lib in '' gen; do
28222 if test -z "$ac_lib"; then
28223 ac_res="none required"
28224 else
28225 ac_res=-l$ac_lib
28226 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
28227 fi
28228 if ac_fn_c_try_link "$LINENO"; then :
28229 ac_cv_search_eaccess=$ac_res
28230fi
28231rm -f core conftest.err conftest.$ac_objext \
28232 conftest$ac_exeext
28233 if test "${ac_cv_search_eaccess+set}" = set; then :
28234 break
28235fi
28236done
28237if test "${ac_cv_search_eaccess+set}" = set; then :
28238
28239else
28240 ac_cv_search_eaccess=no
28241fi
28242rm conftest.$ac_ext
28243LIBS=$ac_func_search_save_LIBS
28244fi
28245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_eaccess" >&5
28246$as_echo "$ac_cv_search_eaccess" >&6; }
28247ac_res=$ac_cv_search_eaccess
28248if test "$ac_res" != no; then :
28249 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
28250 test "$ac_cv_search_eaccess" = "none required" ||
28251 LIB_EACCESS=$ac_cv_search_eaccess
28252fi
28253
28254 for ac_func in eaccess
28255do :
28256 ac_fn_c_check_func "$LINENO" "eaccess" "ac_cv_func_eaccess"
28257if test "x$ac_cv_func_eaccess" = x""yes; then :
28258 cat >>confdefs.h <<_ACEOF
28259#define HAVE_EACCESS 1
28260_ACEOF
28261
28262fi
28263done
28264
28265 LIBS=$gl_saved_libs
28266
28267 fi
28268
28269
28270
28271
28272
28273 GNULIB_EUIDACCESS=1
28274
28275
28276
28277
28278
28279 gl_gnulib_enabled_euidaccess=true
28280 if test $HAVE_EUIDACCESS = 0; then
28281 func_gl_gnulib_m4code_a9786850e999ae65a836a6041e8e5ed1
28282 fi
28283 func_gl_gnulib_m4code_6099e9737f757db36c47fa9d9f02e88c
28284 if test $HAVE_EUIDACCESS = 0; then
28285 func_gl_gnulib_m4code_stat
28286 fi
28287 fi
28288 }
0cdca42a
GM
28289 func_gl_gnulib_m4code_getdtablesize ()
28290 {
28291 if ! $gl_gnulib_enabled_getdtablesize; then
28292
28293
28294
8a3fafec
GM
28295
28296 if test $ac_cv_func_getdtablesize = yes; then
28297 # Cygwin 1.7.25 automatically increases the RLIMIT_NOFILE soft limit
28298 # up to an unchangeable hard limit; all other platforms correctly
28299 # require setrlimit before getdtablesize() can report a larger value.
28300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getdtablesize works" >&5
28301$as_echo_n "checking whether getdtablesize works... " >&6; }
28302if test "${gl_cv_func_getdtablesize_works+set}" = set; then :
28303 $as_echo_n "(cached) " >&6
28304else
28305 if test "$cross_compiling" = yes; then :
28306 case "$host_os" in
28307 cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows
28308 gl_cv_func_getdtablesize_works="guessing no" ;;
28309 *) gl_cv_func_getdtablesize_works="guessing yes" ;;
28310 esac
28311else
28312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28313/* end confdefs.h. */
28314
28315 #include <unistd.h>
28316int
28317main ()
28318{
28319int size = getdtablesize();
28320 if (dup2 (0, getdtablesize()) != -1)
28321 return 1;
28322 if (size != getdtablesize())
28323 return 2;
28324
28325 ;
28326 return 0;
28327}
28328_ACEOF
28329if ac_fn_c_try_run "$LINENO"; then :
28330 gl_cv_func_getdtablesize_works=yes
28331else
28332 gl_cv_func_getdtablesize_works=no
28333fi
28334rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28335 conftest.$ac_objext conftest.beam conftest.$ac_ext
28336fi
28337
28338
28339fi
28340{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getdtablesize_works" >&5
28341$as_echo "$gl_cv_func_getdtablesize_works" >&6; }
28342 case "$gl_cv_func_getdtablesize_works" in
28343 *yes) ;;
28344 *) REPLACE_GETDTABLESIZE=1 ;;
28345 esac
28346 else
0cdca42a
GM
28347 HAVE_GETDTABLESIZE=0
28348 fi
28349
8a3fafec 28350 if test $HAVE_GETDTABLESIZE = 0 || test $REPLACE_GETDTABLESIZE = 1; then
0cdca42a
GM
28351
28352
28353
28354
28355
28356
28357
28358
28359 gl_LIBOBJS="$gl_LIBOBJS getdtablesize.$ac_objext"
28360
28361 :
28362 fi
28363
28364
28365
28366
28367
28368 GNULIB_GETDTABLESIZE=1
28369
28370
28371
28372
28373
28374 gl_gnulib_enabled_getdtablesize=true
28375 fi
28376 }
710f5812
GM
28377 func_gl_gnulib_m4code_getgroups ()
28378 {
28379 if ! $gl_gnulib_enabled_getgroups; then
28380
28381
28382
28383
28384
28385 ac_fn_c_check_func "$LINENO" "getgroups" "ac_cv_func_getgroups"
28386if test "x$ac_cv_func_getgroups" = x""yes; then :
28387
28388fi
28389
28390
28391 # If we don't yet have getgroups, see if it's in -lbsd.
28392 # This is reported to be necessary on an ITOS 3000WS running SEIUX 3.1.
28393 ac_save_LIBS=$LIBS
28394 if test $ac_cv_func_getgroups = no; then
28395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getgroups in -lbsd" >&5
28396$as_echo_n "checking for getgroups in -lbsd... " >&6; }
28397if test "${ac_cv_lib_bsd_getgroups+set}" = set; then :
28398 $as_echo_n "(cached) " >&6
28399else
28400 ac_check_lib_save_LIBS=$LIBS
28401LIBS="-lbsd $LIBS"
28402cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28403/* end confdefs.h. */
28404
28405/* Override any GCC internal prototype to avoid an error.
28406 Use char because int might match the return type of a GCC
28407 builtin and then its argument prototype would still apply. */
28408#ifdef __cplusplus
28409extern "C"
28410#endif
28411char getgroups ();
28412int
28413main ()
28414{
28415return getgroups ();
28416 ;
28417 return 0;
28418}
28419_ACEOF
28420if ac_fn_c_try_link "$LINENO"; then :
28421 ac_cv_lib_bsd_getgroups=yes
28422else
28423 ac_cv_lib_bsd_getgroups=no
28424fi
28425rm -f core conftest.err conftest.$ac_objext \
28426 conftest$ac_exeext conftest.$ac_ext
28427LIBS=$ac_check_lib_save_LIBS
28428fi
28429{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_getgroups" >&5
28430$as_echo "$ac_cv_lib_bsd_getgroups" >&6; }
28431if test "x$ac_cv_lib_bsd_getgroups" = x""yes; then :
28432 GETGROUPS_LIB=-lbsd
28433fi
28434
28435 fi
28436
28437 # Run the program to test the functionality of the system-supplied
28438 # getgroups function only if there is such a function.
28439 if test $ac_cv_func_getgroups = yes; then
28440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getgroups" >&5
28441$as_echo_n "checking for working getgroups... " >&6; }
28442if test "${ac_cv_func_getgroups_works+set}" = set; then :
28443 $as_echo_n "(cached) " >&6
28444else
28445 if test "$cross_compiling" = yes; then :
28446 case "$host_os" in # ((
28447 # Guess yes on glibc systems.
28448 *-gnu*) ac_cv_func_getgroups_works="guessing yes" ;;
28449 # If we don't know, assume the worst.
28450 *) ac_cv_func_getgroups_works="guessing no" ;;
28451 esac
28452
28453else
28454 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28455/* end confdefs.h. */
28456$ac_includes_default
28457int
28458main ()
28459{
28460/* On Ultrix 4.3, getgroups (0, 0) always fails. */
28461 return getgroups (0, 0) == -1;
28462 ;
28463 return 0;
28464}
28465
28466_ACEOF
28467if ac_fn_c_try_run "$LINENO"; then :
28468 ac_cv_func_getgroups_works=yes
28469else
28470 ac_cv_func_getgroups_works=no
28471fi
28472rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28473 conftest.$ac_objext conftest.beam conftest.$ac_ext
28474fi
28475
28476
28477fi
28478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getgroups_works" >&5
28479$as_echo "$ac_cv_func_getgroups_works" >&6; }
28480 else
28481 ac_cv_func_getgroups_works=no
28482 fi
28483 case "$ac_cv_func_getgroups_works" in
28484 *yes)
28485
28486$as_echo "#define HAVE_GETGROUPS 1" >>confdefs.h
28487
28488 ;;
28489 esac
28490 LIBS=$ac_save_LIBS
28491
28492 if test $ac_cv_func_getgroups != yes; then
28493 HAVE_GETGROUPS=0
28494 else
28495 if test "$ac_cv_type_getgroups" != gid_t \
28496 || { case "$ac_cv_func_getgroups_works" in
28497 *yes) false;;
28498 *) true;;
28499 esac
28500 }; then
28501 REPLACE_GETGROUPS=1
28502
28503$as_echo "#define GETGROUPS_ZERO_BUG 1" >>confdefs.h
28504
28505 else
28506 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getgroups handles negative values" >&5
28507$as_echo_n "checking whether getgroups handles negative values... " >&6; }
28508if test "${gl_cv_func_getgroups_works+set}" = set; then :
28509 $as_echo_n "(cached) " >&6
28510else
28511 if test "$cross_compiling" = yes; then :
28512 case "$host_os" in
28513 # Guess yes on glibc systems.
28514 *-gnu*) gl_cv_func_getgroups_works="guessing yes" ;;
28515 # If we don't know, assume the worst.
28516 *) gl_cv_func_getgroups_works="guessing no" ;;
28517 esac
28518
28519else
28520 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28521/* end confdefs.h. */
28522$ac_includes_default
28523int
28524main ()
28525{
28526int size = getgroups (0, 0);
28527 gid_t *list = malloc (size * sizeof *list);
28528 return getgroups (-1, list) != -1;
28529 ;
28530 return 0;
28531}
28532_ACEOF
28533if ac_fn_c_try_run "$LINENO"; then :
28534 gl_cv_func_getgroups_works=yes
28535else
28536 gl_cv_func_getgroups_works=no
28537fi
28538rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28539 conftest.$ac_objext conftest.beam conftest.$ac_ext
28540fi
28541
28542fi
28543{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getgroups_works" >&5
28544$as_echo "$gl_cv_func_getgroups_works" >&6; }
28545 case "$gl_cv_func_getgroups_works" in
28546 *yes) ;;
28547 *) REPLACE_GETGROUPS=1 ;;
28548 esac
28549 fi
28550 fi
28551 test -n "$GETGROUPS_LIB" && LIBS="$GETGROUPS_LIB $LIBS"
28552
28553 if test $HAVE_GETGROUPS = 0 || test $REPLACE_GETGROUPS = 1; then
28554
28555
28556
28557
28558
28559
28560
28561
28562 gl_LIBOBJS="$gl_LIBOBJS getgroups.$ac_objext"
28563
28564 fi
28565
28566
28567
28568
28569
28570 GNULIB_GETGROUPS=1
28571
28572
28573
28574
28575
28576 gl_gnulib_enabled_getgroups=true
28577 fi
28578 }
28579 func_gl_gnulib_m4code_be453cec5eecf5731a274f2de7f2db36 ()
28580 {
28581 if ! $gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36; then
28582
28583
28584 gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=true
28585 fi
28586 }
28587 func_gl_gnulib_m4code_a9786850e999ae65a836a6041e8e5ed1 ()
28588 {
28589 if ! $gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1; then
28590
28591
28592
28593
28594
28595 ac_fn_c_check_func "$LINENO" "group_member" "ac_cv_func_group_member"
28596if test "x$ac_cv_func_group_member" = x""yes; then :
28597
28598else
28599
28600 HAVE_GROUP_MEMBER=0
28601
28602fi
28603
28604
28605 if test $HAVE_GROUP_MEMBER = 0; then
28606
28607
28608
28609
28610
28611
28612
28613
28614 gl_LIBOBJS="$gl_LIBOBJS group-member.$ac_objext"
28615
28616
28617
28618
28619 fi
28620
28621
28622
28623
28624
28625 GNULIB_GROUP_MEMBER=1
28626
28627
28628
28629
28630
28631 gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1=true
28632 if test $HAVE_GROUP_MEMBER = 0; then
28633 func_gl_gnulib_m4code_getgroups
28634 fi
28635 if test $HAVE_GROUP_MEMBER = 0; then
28636 func_gl_gnulib_m4code_682e609604ccaac6be382e4ee3a4eaec
28637 fi
28638 fi
28639 }
d7ad186c
GM
28640 func_gl_gnulib_m4code_03e0aaad4cb89ca757653bd367a6ccb7 ()
28641 {
28642 if ! $gl_gnulib_enabled_03e0aaad4cb89ca757653bd367a6ccb7; then
28643 gl_gnulib_enabled_03e0aaad4cb89ca757653bd367a6ccb7=true
28644 fi
28645 }
710f5812
GM
28646 func_gl_gnulib_m4code_pathmax ()
28647 {
28648 if ! $gl_gnulib_enabled_pathmax; then
28649
28650
28651
28652 gl_gnulib_enabled_pathmax=true
28653 fi
28654 }
28655 func_gl_gnulib_m4code_6099e9737f757db36c47fa9d9f02e88c ()
28656 {
28657 if ! $gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c; then
28658 gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c=true
28659 fi
28660 }
e412eb97
GM
28661 func_gl_gnulib_m4code_secure_getenv ()
28662 {
28663 if ! $gl_gnulib_enabled_secure_getenv; then
28664
28665
28666
28667
28668
28669 if test $ac_cv_func_secure_getenv = no; then
28670 HAVE_SECURE_GETENV=0
28671 fi
28672
28673 if test $HAVE_SECURE_GETENV = 0; then
28674
28675
28676
28677
28678
28679
28680
28681
28682 gl_LIBOBJS="$gl_LIBOBJS secure_getenv.$ac_objext"
28683
28684
28685 for ac_func in __secure_getenv
28686do :
28687 ac_fn_c_check_func "$LINENO" "__secure_getenv" "ac_cv_func___secure_getenv"
28688if test "x$ac_cv_func___secure_getenv" = x""yes; then :
28689 cat >>confdefs.h <<_ACEOF
28690#define HAVE___SECURE_GETENV 1
28691_ACEOF
28692
28693fi
28694done
28695
28696 if test $ac_cv_func___secure_getenv = no; then
28697 for ac_func in issetugid
28698do :
28699 ac_fn_c_check_func "$LINENO" "issetugid" "ac_cv_func_issetugid"
28700if test "x$ac_cv_func_issetugid" = x""yes; then :
28701 cat >>confdefs.h <<_ACEOF
28702#define HAVE_ISSETUGID 1
28703_ACEOF
28704
28705fi
28706done
28707
28708 fi
28709
28710 fi
28711
28712
28713
28714
28715
28716 GNULIB_SECURE_GETENV=1
28717
28718
28719
28720
28721
28722 gl_gnulib_enabled_secure_getenv=true
28723 fi
28724 }
710f5812
GM
28725 func_gl_gnulib_m4code_stat ()
28726 {
28727 if ! $gl_gnulib_enabled_stat; then
28728
28729
28730
28731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5
28732$as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; }
28733if test "${gl_cv_func_stat_dir_slash+set}" = set; then :
28734 $as_echo_n "(cached) " >&6
28735else
28736 if test "$cross_compiling" = yes; then :
28737 case $host_os in
28738 mingw*) gl_cv_func_stat_dir_slash="guessing no";;
28739 *) gl_cv_func_stat_dir_slash="guessing yes";;
28740 esac
28741else
28742 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28743/* end confdefs.h. */
28744#include <sys/stat.h>
28745
28746int
28747main ()
28748{
28749struct stat st; return stat (".", &st) != stat ("./", &st);
28750 ;
28751 return 0;
28752}
28753_ACEOF
28754if ac_fn_c_try_run "$LINENO"; then :
28755 gl_cv_func_stat_dir_slash=yes
28756else
28757 gl_cv_func_stat_dir_slash=no
28758fi
28759rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28760 conftest.$ac_objext conftest.beam conftest.$ac_ext
28761fi
28762
28763fi
28764{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5
28765$as_echo "$gl_cv_func_stat_dir_slash" >&6; }
28766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
28767$as_echo_n "checking whether stat handles trailing slashes on files... " >&6; }
28768if test "${gl_cv_func_stat_file_slash+set}" = set; then :
28769 $as_echo_n "(cached) " >&6
28770else
28771 touch conftest.tmp
28772 # Assume that if we have lstat, we can also check symlinks.
28773 if test $ac_cv_func_lstat = yes; then
28774 ln -s conftest.tmp conftest.lnk
28775 fi
28776 if test "$cross_compiling" = yes; then :
28777 case "$host_os" in
28778 # Guess yes on glibc systems.
28779 *-gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
28780 # If we don't know, assume the worst.
28781 *) gl_cv_func_stat_file_slash="guessing no" ;;
28782 esac
28783
28784else
28785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28786/* end confdefs.h. */
28787#include <sys/stat.h>
28788
28789int
28790main ()
28791{
28792int result = 0;
28793 struct stat st;
28794 if (!stat ("conftest.tmp/", &st))
28795 result |= 1;
28796#if HAVE_LSTAT
28797 if (!stat ("conftest.lnk/", &st))
5476a9a4
GM
28798 result |= 2;
28799#endif
28800 return result;
d3127c14
GM
28801
28802 ;
28803 return 0;
28804}
28805_ACEOF
5476a9a4
GM
28806if ac_fn_c_try_run "$LINENO"; then :
28807 gl_cv_func_stat_file_slash=yes
d3127c14 28808else
5476a9a4
GM
28809 gl_cv_func_stat_file_slash=no
28810fi
28811rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28812 conftest.$ac_objext conftest.beam conftest.$ac_ext
d3127c14 28813fi
d3127c14 28814
5476a9a4
GM
28815 rm -f conftest.tmp conftest.lnk
28816fi
28817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
28818$as_echo "$gl_cv_func_stat_file_slash" >&6; }
28819 case $gl_cv_func_stat_dir_slash in
28820 *no) REPLACE_STAT=1
d3127c14 28821
5476a9a4
GM
28822$as_echo "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h
28823;;
28824 esac
28825 case $gl_cv_func_stat_file_slash in
28826 *no) REPLACE_STAT=1
d3127c14 28827
5476a9a4
GM
28828$as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
28829;;
28830 esac
d3127c14 28831
a6342fc8 28832 if test $REPLACE_STAT = 1; then
d3127c14 28833
dd0d840e 28834
dd0d840e 28835
dd0d840e 28836
dd0d840e 28837
dd0d840e 28838
067d23c9
KY
28839
28840
5476a9a4 28841 gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
067d23c9 28842
45d4966b 28843 :
a6342fc8 28844 fi
067d23c9 28845
dd0d840e
GM
28846
28847
dd0d840e 28848
dd0d840e 28849
5476a9a4 28850 GNULIB_STAT=1
dd0d840e 28851
067d23c9
KY
28852
28853
28854
28855
5476a9a4
GM
28856 gl_gnulib_enabled_stat=true
28857 if test $REPLACE_STAT = 1; then
28858 func_gl_gnulib_m4code_dosname
28859 fi
28860 if test $REPLACE_STAT = 1; then
28861 func_gl_gnulib_m4code_pathmax
28862 fi
5476a9a4
GM
28863 fi
28864 }
28865 func_gl_gnulib_m4code_strtoll ()
28866 {
28867 if ! $gl_gnulib_enabled_strtoll; then
067d23c9
KY
28868
28869
28870
5476a9a4
GM
28871 if test "$ac_cv_type_long_long_int" = yes; then
28872 for ac_func in strtoll
28873do :
28874 ac_fn_c_check_func "$LINENO" "strtoll" "ac_cv_func_strtoll"
28875if test "x$ac_cv_func_strtoll" = x""yes; then :
28876 cat >>confdefs.h <<_ACEOF
28877#define HAVE_STRTOLL 1
28878_ACEOF
067d23c9 28879
5476a9a4
GM
28880fi
28881done
067d23c9 28882
5476a9a4
GM
28883 if test $ac_cv_func_strtoll = no; then
28884 HAVE_STRTOLL=0
28885 fi
28886 fi
067d23c9 28887
a6342fc8 28888 if test $HAVE_STRTOLL = 0; then
067d23c9
KY
28889
28890
28891
067d23c9
KY
28892
28893
28894
28895
28896
5476a9a4 28897 gl_LIBOBJS="$gl_LIBOBJS strtoll.$ac_objext"
067d23c9
KY
28898
28899
5476a9a4 28900 :
067d23c9 28901
a6342fc8 28902 fi
067d23c9
KY
28903
28904
28905
067d23c9 28906
067d23c9 28907
5476a9a4 28908 GNULIB_STRTOLL=1
067d23c9 28909
397f7161 28910
067d23c9
KY
28911
28912
067d23c9 28913
5476a9a4
GM
28914 gl_gnulib_enabled_strtoll=true
28915 fi
28916 }
28917 func_gl_gnulib_m4code_strtoull ()
28918 {
28919 if ! $gl_gnulib_enabled_strtoull; then
067d23c9 28920
067d23c9 28921
067d23c9 28922
5476a9a4
GM
28923 if test "$ac_cv_type_unsigned_long_long_int" = yes; then
28924 for ac_func in strtoull
28925do :
28926 ac_fn_c_check_func "$LINENO" "strtoull" "ac_cv_func_strtoull"
28927if test "x$ac_cv_func_strtoull" = x""yes; then :
28928 cat >>confdefs.h <<_ACEOF
28929#define HAVE_STRTOULL 1
28930_ACEOF
067d23c9 28931
f199cab1 28932fi
5476a9a4 28933done
067d23c9 28934
5476a9a4
GM
28935 if test $ac_cv_func_strtoull = no; then
28936 HAVE_STRTOULL=0
28937 fi
28938 fi
067d23c9 28939
a6342fc8 28940 if test $HAVE_STRTOULL = 0; then
067d23c9
KY
28941
28942
067d23c9 28943
067d23c9 28944
067d23c9 28945
067d23c9 28946
067d23c9 28947
067d23c9 28948
5476a9a4 28949 gl_LIBOBJS="$gl_LIBOBJS strtoull.$ac_objext"
067d23c9 28950
067d23c9 28951
5476a9a4 28952 :
067d23c9 28953
a6342fc8 28954 fi
067d23c9
KY
28955
28956
3e0be4ab 28957
3e0be4ab 28958
067d23c9 28959
5476a9a4 28960 GNULIB_STRTOULL=1
067d23c9 28961
a0a61e58 28962
067d23c9 28963
067d23c9
KY
28964
28965
5476a9a4
GM
28966 gl_gnulib_enabled_strtoull=true
28967 fi
28968 }
e412eb97
GM
28969 func_gl_gnulib_m4code_tempname ()
28970 {
28971 if ! $gl_gnulib_enabled_tempname; then
28972
28973
28974 :
28975
28976
28977 gl_gnulib_enabled_tempname=true
28978 func_gl_gnulib_m4code_secure_getenv
28979 fi
28980 }
710f5812
GM
28981 func_gl_gnulib_m4code_682e609604ccaac6be382e4ee3a4eaec ()
28982 {
28983 if ! $gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec; then
28984 gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec=true
28985 fi
28986 }
d7ad186c
GM
28987 if test $HAVE_FACCESSAT = 0; then
28988 func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b
28989 fi
710f5812
GM
28990 if test $HAVE_FACCESSAT = 0; then
28991 func_gl_gnulib_m4code_dosname
28992 fi
28993 if test $HAVE_FACCESSAT = 0; then
28994 func_gl_gnulib_m4code_euidaccess
28995 fi
d7ad186c
GM
28996 if test $HAVE_FACCESSAT = 0; then
28997 func_gl_gnulib_m4code_03e0aaad4cb89ca757653bd367a6ccb7
28998 fi
0cdca42a
GM
28999 if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
29000 func_gl_gnulib_m4code_getdtablesize
29001 fi
d7ad186c
GM
29002 if test $HAVE_FDOPENDIR = 0; then
29003 func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b
29004 fi
29005 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
29006 func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b
29007 fi
29008 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
29009 func_gl_gnulib_m4code_dosname
29010 fi
29011 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
29012 func_gl_gnulib_m4code_03e0aaad4cb89ca757653bd367a6ccb7
29013 fi
5476a9a4
GM
29014 if test $REPLACE_GETOPT = 1; then
29015 func_gl_gnulib_m4code_be453cec5eecf5731a274f2de7f2db36
29016 fi
29017 if test $REPLACE_LSTAT = 1; then
29018 func_gl_gnulib_m4code_dosname
29019 fi
29020 if test $REPLACE_LSTAT = 1; then
29021 func_gl_gnulib_m4code_stat
29022 fi
e412eb97
GM
29023 if test $HAVE_MKOSTEMP = 0; then
29024 func_gl_gnulib_m4code_tempname
29025 fi
5476a9a4
GM
29026 if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
29027 func_gl_gnulib_m4code_stat
29028 fi
d7ad186c
GM
29029 if test $HAVE_READLINKAT = 0; then
29030 func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b
29031 fi
29032 if test $HAVE_READLINKAT = 0; then
29033 func_gl_gnulib_m4code_dosname
29034 fi
29035 if test $HAVE_READLINKAT = 0; then
29036 func_gl_gnulib_m4code_03e0aaad4cb89ca757653bd367a6ccb7
29037 fi
5476a9a4
GM
29038 if { test $HAVE_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; } && test $ac_cv_type_long_long_int = yes; then
29039 func_gl_gnulib_m4code_strtoll
29040 fi
5476a9a4
GM
29041 if test $ac_cv_func_strtoumax = no && test $ac_cv_type_unsigned_long_long_int = yes; then
29042 func_gl_gnulib_m4code_strtoull
29043 fi
067d23c9 29044
d7ad186c
GM
29045 if $gl_gnulib_enabled_260941c0e5dc67ec9e87d1fb321c300b; then
29046 gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_TRUE=
29047 gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_FALSE='#'
29048else
29049 gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_TRUE='#'
29050 gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_FALSE=
29051fi
29052
5476a9a4
GM
29053 if $gl_gnulib_enabled_dosname; then
29054 gl_GNULIB_ENABLED_dosname_TRUE=
29055 gl_GNULIB_ENABLED_dosname_FALSE='#'
29056else
29057 gl_GNULIB_ENABLED_dosname_TRUE='#'
29058 gl_GNULIB_ENABLED_dosname_FALSE=
29059fi
067d23c9 29060
710f5812
GM
29061 if $gl_gnulib_enabled_euidaccess; then
29062 gl_GNULIB_ENABLED_euidaccess_TRUE=
29063 gl_GNULIB_ENABLED_euidaccess_FALSE='#'
29064else
29065 gl_GNULIB_ENABLED_euidaccess_TRUE='#'
29066 gl_GNULIB_ENABLED_euidaccess_FALSE=
29067fi
29068
0cdca42a
GM
29069 if $gl_gnulib_enabled_getdtablesize; then
29070 gl_GNULIB_ENABLED_getdtablesize_TRUE=
29071 gl_GNULIB_ENABLED_getdtablesize_FALSE='#'
29072else
29073 gl_GNULIB_ENABLED_getdtablesize_TRUE='#'
29074 gl_GNULIB_ENABLED_getdtablesize_FALSE=
29075fi
29076
710f5812
GM
29077 if $gl_gnulib_enabled_getgroups; then
29078 gl_GNULIB_ENABLED_getgroups_TRUE=
29079 gl_GNULIB_ENABLED_getgroups_FALSE='#'
29080else
29081 gl_GNULIB_ENABLED_getgroups_TRUE='#'
29082 gl_GNULIB_ENABLED_getgroups_FALSE=
29083fi
29084
5476a9a4
GM
29085 if $gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36; then
29086 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE=
29087 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE='#'
29088else
29089 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE='#'
29090 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE=
29091fi
067d23c9 29092
710f5812
GM
29093 if $gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1; then
29094 gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_TRUE=
29095 gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_FALSE='#'
29096else
29097 gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_TRUE='#'
29098 gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_FALSE=
29099fi
29100
d7ad186c
GM
29101 if $gl_gnulib_enabled_03e0aaad4cb89ca757653bd367a6ccb7; then
29102 gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_TRUE=
29103 gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_FALSE='#'
29104else
29105 gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_TRUE='#'
29106 gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_FALSE=
29107fi
29108
5476a9a4
GM
29109 if $gl_gnulib_enabled_pathmax; then
29110 gl_GNULIB_ENABLED_pathmax_TRUE=
29111 gl_GNULIB_ENABLED_pathmax_FALSE='#'
29112else
29113 gl_GNULIB_ENABLED_pathmax_TRUE='#'
29114 gl_GNULIB_ENABLED_pathmax_FALSE=
29115fi
067d23c9 29116
710f5812
GM
29117 if $gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c; then
29118 gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_TRUE=
29119 gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_FALSE='#'
29120else
29121 gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_TRUE='#'
29122 gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_FALSE=
29123fi
29124
e412eb97
GM
29125 if $gl_gnulib_enabled_secure_getenv; then
29126 gl_GNULIB_ENABLED_secure_getenv_TRUE=
29127 gl_GNULIB_ENABLED_secure_getenv_FALSE='#'
29128else
29129 gl_GNULIB_ENABLED_secure_getenv_TRUE='#'
29130 gl_GNULIB_ENABLED_secure_getenv_FALSE=
29131fi
29132
5476a9a4
GM
29133 if $gl_gnulib_enabled_stat; then
29134 gl_GNULIB_ENABLED_stat_TRUE=
29135 gl_GNULIB_ENABLED_stat_FALSE='#'
29136else
29137 gl_GNULIB_ENABLED_stat_TRUE='#'
29138 gl_GNULIB_ENABLED_stat_FALSE=
29139fi
067d23c9 29140
5476a9a4
GM
29141 if $gl_gnulib_enabled_strtoll; then
29142 gl_GNULIB_ENABLED_strtoll_TRUE=
29143 gl_GNULIB_ENABLED_strtoll_FALSE='#'
29144else
29145 gl_GNULIB_ENABLED_strtoll_TRUE='#'
29146 gl_GNULIB_ENABLED_strtoll_FALSE=
29147fi
067d23c9 29148
5476a9a4
GM
29149 if $gl_gnulib_enabled_strtoull; then
29150 gl_GNULIB_ENABLED_strtoull_TRUE=
29151 gl_GNULIB_ENABLED_strtoull_FALSE='#'
29152else
29153 gl_GNULIB_ENABLED_strtoull_TRUE='#'
29154 gl_GNULIB_ENABLED_strtoull_FALSE=
f199cab1 29155fi
067d23c9 29156
e412eb97
GM
29157 if $gl_gnulib_enabled_tempname; then
29158 gl_GNULIB_ENABLED_tempname_TRUE=
29159 gl_GNULIB_ENABLED_tempname_FALSE='#'
29160else
29161 gl_GNULIB_ENABLED_tempname_TRUE='#'
29162 gl_GNULIB_ENABLED_tempname_FALSE=
29163fi
29164
710f5812
GM
29165 if $gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec; then
29166 gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_TRUE=
29167 gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_FALSE='#'
29168else
29169 gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_TRUE='#'
29170 gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_FALSE=
29171fi
29172
5476a9a4 29173 # End of code from modules
067d23c9 29174
067d23c9 29175
067d23c9 29176
067d23c9 29177
f199cab1 29178
f199cab1
GM
29179
29180
067d23c9 29181
5476a9a4
GM
29182
29183 gltests_libdeps=
29184 gltests_ltlibdeps=
067d23c9 29185
067d23c9 29186
067d23c9
KY
29187
29188
067d23c9
KY
29189
29190
3e0be4ab 29191
3e0be4ab 29192
3e0be4ab 29193
5476a9a4
GM
29194 gl_source_base='tests'
29195 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 29196
5476a9a4 29197 gl_module_indicator_condition=$gltests_WITNESS
3e0be4ab
GM
29198
29199
29200
29201
29202
067d23c9
KY
29203
29204
29205
3e0be4ab 29206
3e0be4ab 29207
5476a9a4
GM
29208 LIBGNU_LIBDEPS="$gl_libdeps"
29209
29210 LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
29211
067d23c9 29212
5476a9a4
GM
29213CFLAGS=$SAVE_CFLAGS
29214LIBS=$SAVE_LIBS
067d23c9 29215
7c61eaab
GM
29216if test "${opsys}" = "mingw32"; then
29217 CPPFLAGS="$CPPFLAGS -DUSE_CRT_DLL=1 -I $srcdir/nt/inc"
29218 # Remove unneeded switches from the value of CC that goes to Makefiles
29219 CC=`echo $CC | sed -e "s,$GCC_TEST_OPTIONS,,"`
29220fi
29221
067d23c9
KY
29222case "$opsys" in
29223 aix4-2) LD_SWITCH_SYSTEM_TEMACS="-Wl,-bnodelcsect" ;;
29224
29225 darwin)
29226 ## The -headerpad option tells ld (see man page) to leave room at the
29227 ## end of the header for adding load commands. Needed for dumping.
29228 ## 0x690 is the total size of 30 segment load commands (at 56
29229 ## each); under Cocoa 31 commands are required.
29230 if test "$HAVE_NS" = "yes"; then
29231 libs_nsgui="-framework AppKit"
cc70ee9b
GM
29232 if test "$NS_IMPL_COCOA" = "yes"; then
29233 libs_nsgui="$libs_nsgui -framework IOKit"
29234 fi
067d23c9
KY
29235 headerpad_extra=6C8
29236 else
29237 libs_nsgui=
29238 headerpad_extra=690
29239 fi
85cf5029 29240 LD_SWITCH_SYSTEM_TEMACS="-fno-pie -prebind $libs_nsgui -Xlinker -headerpad -Xlinker $headerpad_extra"
067d23c9
KY
29241
29242 ## This is here because src/Makefile.in did some extra fiddling around
2407788f
GM
29243 ## with LD_SWITCH_SYSTEM. It seems cleaner to put this in
29244 ## LD_SWITCH_SYSTEM_TEMACS instead,
067d23c9
KY
29245 test "x$LD_SWITCH_SYSTEM" = "x" && test "x$GCC" != "xyes" && \
29246 LD_SWITCH_SYSTEM_TEMACS="-X $LD_SWITCH_SYSTEM_TEMACS"
29247 ;;
29248
ae629dae
GM
29249 ## LD_SWITCH_X_SITE_RPATH is a -rpath option saying where to
29250 ## find X at run-time.
29251 ## When handled by cpp, this was in LD_SWITCH_SYSTEM. However, at the
29252 ## point where configure sourced the s/*.h file, LD_SWITCH_X_SITE_RPATH
067d23c9
KY
29253 ## had not yet been defined and was expanded to null. Hence LD_SWITCH_SYSTEM
29254 ## had different values in configure (in ac_link) and src/Makefile.in.
29255 ## It seems clearer therefore to put this piece in LD_SWITCH_SYSTEM_TEMACS.
ae629dae 29256 gnu*) LD_SWITCH_SYSTEM_TEMACS="\$(LD_SWITCH_X_SITE_RPATH)" ;;
067d23c9 29257
7c61eaab
GM
29258 mingw32)
29259 ## MinGW64 does not prepend an underscore to symbols, so we must
29260 ## pass a different -entry switch to linker. FIXME: It is better
29261 ## to make the entry points the same by changing unexw32.c.
29262 case "$canonical" in
29263 x86_64-*-*) LD_SWITCH_SYSTEM_TEMACS="-Wl,-stack,0x00800000 -Wl,-heap,0x00100000 -Wl,-image-base,0x01000000 -Wl,-entry,_start -Wl,-Map,./temacs.map" ;;
29264 *) LD_SWITCH_SYSTEM_TEMACS="-Wl,-stack,0x00800000 -Wl,-heap,0x00100000 -Wl,-image-base,0x01000000 -Wl,-entry,__start -Wl,-Map,./temacs.map" ;;
29265 esac
29266 ;;
29267
3766b742
GM
29268 openbsd) LD_SWITCH_SYSTEM_TEMACS='-nopie' ;;
29269
067d23c9
KY
29270 *) LD_SWITCH_SYSTEM_TEMACS= ;;
29271esac
29272
26256684
GM
29273if test x$ac_enable_profiling != x ; then
29274 case $opsys in
29275 *freebsd | gnu-linux) ;;
29276 *) LD_SWITCH_SYSTEM_TEMACS="$LD_SWITCH_SYSTEM_TEMACS -pg" ;;
29277 esac
29278fi
29279
992ec28a
GM
29280LD_SWITCH_SYSTEM_TEMACS="$LDFLAGS_NOCOMBRELOC $LD_SWITCH_SYSTEM_TEMACS"
29281
067d23c9
KY
29282
29283
7c61eaab
GM
29284## MinGW-specific post-link processing of temacs.
29285TEMACS_POST_LINK=":"
29286ADDSECTION=
29287EMACS_HEAPSIZE=
29288if test "${opsys}" = "mingw32"; then
29289 TEMACS_POST_LINK="\$(MINGW_TEMACS_POST_LINK)"
29290 ADDSECTION="../nt/addsection\$(EXEEXT)"
29291 ## Preload heap size of temacs.exe in MB.
29292 case "$canonical" in
29293 x86_64-*-*) EMACS_HEAPSIZE=42 ;;
29294 *) EMACS_HEAPSIZE=27 ;;
29295 esac
29296fi
29297
29298
29299
29300
29301
42dcba54
GM
29302## Common for all window systems
29303if test "$window_system" != "none"; then
067d23c9
KY
29304
29305$as_echo "#define HAVE_WINDOW_SYSTEM 1" >>confdefs.h
29306
42dcba54 29307 WINDOW_SYSTEM_OBJ="fontset.o fringe.o image.o"
067d23c9
KY
29308fi
29309
29310
29311
29312
42dcba54 29313
067d23c9
KY
29314#### Report on what we decided to do.
29315#### Report GTK as a toolkit, even if it doesn't use Xt.
29316#### It makes printing result more understandable as using GTK sets
29317#### toolkit_scroll_bars to yes by default.
29318if test "${HAVE_GTK}" = "yes"; then
a732eace 29319 USE_X_TOOLKIT="$USE_GTK_TOOLKIT"
067d23c9
KY
29320fi
29321
28237e48
GM
29322if test $USE_ACL -ne 0; then
29323 acl_summary="yes $LIB_ACL"
29324else
29325 acl_summary=no
29326fi
29327
067d23c9
KY
29328echo "
29329Configured for \`${canonical}'.
29330
29331 Where should the build process find the source code? ${srcdir}
067d23c9
KY
29332 What compiler should emacs be built with? ${CC} ${CFLAGS}
29333 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
29334 Should Emacs use a relocating allocator for buffers? ${REL_ALLOC}
29335 Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers
29336 What window system should Emacs use? ${window_system}
29337 What toolkit should Emacs use? ${USE_X_TOOLKIT}"
29338
29339if test -n "${x_includes}"; then
29340echo " Where do we find X Windows header files? ${x_includes}"
29341else
29342echo " Where do we find X Windows header files? Standard dirs"
29343fi
29344if test -n "${x_libraries}"; then
29345echo " Where do we find X Windows libraries? ${x_libraries}"
29346else
29347echo " Where do we find X Windows libraries? Standard dirs"
29348fi
29349
29350echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}"
29351echo " Does Emacs use -lXpm? ${HAVE_XPM}"
29352echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
29353echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
29354echo " Does Emacs use a gif library? ${HAVE_GIF} $LIBGIF"
29355echo " Does Emacs use -lpng? ${HAVE_PNG}"
29356echo " Does Emacs use -lrsvg-2? ${HAVE_RSVG}"
29357echo " Does Emacs use imagemagick? ${HAVE_IMAGEMAGICK}"
29358
9dabd86d
GM
29359echo " Does Emacs support sound? ${HAVE_SOUND}"
29360
067d23c9
KY
29361echo " Does Emacs use -lgpm? ${HAVE_GPM}"
29362echo " Does Emacs use -ldbus? ${HAVE_DBUS}"
29363echo " Does Emacs use -lgconf? ${HAVE_GCONF}"
f527bd02 29364echo " Does Emacs use GSettings? ${HAVE_GSETTINGS}"
0f55a32e 29365echo " Does Emacs use a file notification library? ${NOTIFY_SUMMARY}"
28237e48 29366echo " Does Emacs use access control lists? ${acl_summary}"
067d23c9 29367echo " Does Emacs use -lselinux? ${HAVE_LIBSELINUX}"
27f5a136 29368echo " Does Emacs use -lgnutls? ${HAVE_GNUTLS}"
067d23c9
KY
29369echo " Does Emacs use -lxml2? ${HAVE_LIBXML2}"
29370
29371echo " Does Emacs use -lfreetype? ${HAVE_FREETYPE}"
29372echo " Does Emacs use -lm17n-flt? ${HAVE_M17N_FLT}"
29373echo " Does Emacs use -lotf? ${HAVE_LIBOTF}"
29374echo " Does Emacs use -lxft? ${HAVE_XFT}"
7a67e06b 29375echo " Does Emacs directly use zlib? ${HAVE_ZLIB}"
067d23c9
KY
29376
29377echo " Does Emacs use toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
29378echo
29379
eb39a72d
GM
29380if test -n "${EMACSDATA}"; then
29381 echo " Environment variable EMACSDATA set to: $EMACSDATA"
29382fi
29383if test -n "${EMACSDOC}"; then
29384 echo " Environment variable EMACSDOC set to: $EMACSDOC"
29385fi
29386
067d23c9
KY
29387echo
29388
29389if test "$HAVE_NS" = "yes"; then
29390 echo
3d0788a9 29391 echo "You must run \"${MAKE-make} install\" in order to test the built application.
067d23c9
KY
29392The installed application will go to nextstep/Emacs.app and can be
29393run or moved from there."
29394 if test "$EN_NS_SELF_CONTAINED" = "yes"; then
29395 echo "The application will be fully self-contained."
29396 else
29397 echo "The lisp resources for the application will be installed under ${prefix}.
3d0788a9 29398You may need to run \"${MAKE-make} install\" with sudo. The application will fail
067d23c9
KY
29399to run if these resources are not installed."
29400 fi
29401 echo
29402fi
29403
031fabfc
GM
29404if test "${opsys}" = "cygwin"; then
29405 case `uname -r` in
29406 1.5.*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: building Emacs on Cygwin 1.5 is not supported." >&5
29407$as_echo "$as_me: WARNING: building Emacs on Cygwin 1.5 is not supported." >&2;}
29408 echo
29409 ;;
29410 esac
29411fi
067d23c9
KY
29412
29413# Remove any trailing slashes in these variables.
29414test "${prefix}" != NONE &&
29415 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
29416test "${exec_prefix}" != NONE &&
29417 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
29418
bb7dce39
GM
29419if test "$HAVE_NS" = "yes"; then
29420 if test "$NS_IMPL_GNUSTEP" = yes; then
29421 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"
29422
2f342695 29423 ns_check_file=Resources/Info-gnustep.plist
bb7dce39
GM
29424 else
29425 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"
29426
2f342695 29427 ns_check_file=Contents/Info.plist
bb7dce39 29428 fi
2f342695 29429
bb7dce39
GM
29430fi
29431
7c61eaab 29432SUBDIR_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 29433
7c61eaab 29434ac_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 29435
a877df06 29436
73b78882 29437opt_makefile=test/automated/Makefile
a877df06 29438
b5591ebb 29439if test -f "$srcdir/$opt_makefile.in"; then
73b78882 29440 SUBDIR_MAKEFILES="$SUBDIR_MAKEFILES $opt_makefile"
56ade35c 29441 ac_config_files="$ac_config_files test/automated/Makefile"
a877df06 29442
56ade35c 29443fi
73b78882 29444
40b65096
GM
29445
29446opt_makefile=admin/unidata/Makefile
29447
b5591ebb 29448if test -f "$srcdir/$opt_makefile.in"; then
40b65096
GM
29449 SUBDIR_MAKEFILES="$SUBDIR_MAKEFILES $opt_makefile"
29450 ac_config_files="$ac_config_files admin/unidata/Makefile"
29451
29452fi
29453
29454
56ade35c 29455SUBDIR_MAKEFILES_IN=`echo " ${SUBDIR_MAKEFILES}" | sed -e 's| | $(srcdir)/|g' -e 's|Makefile|Makefile.in|g'`
73b78882 29456
067d23c9 29457
9411886d 29458
4c15c0f2 29459ac_config_commands="$ac_config_commands src/epaths.h"
9411886d
PE
29460
29461
4c15c0f2 29462ac_config_commands="$ac_config_commands src/.gdbinit"
9411886d 29463
067d23c9
KY
29464
29465cat >confcache <<\_ACEOF
29466# This file is a shell script that caches the results of configure
29467# tests run on this system so they can be shared between configure
29468# scripts and configure runs, see configure's option --config-cache.
29469# It is not useful on other systems. If it contains results you don't
29470# want to keep, you may remove or edit it.
29471#
29472# config.status only pays attention to the cache file if you give it
29473# the --recheck option to rerun configure.
29474#
29475# `ac_cv_env_foo' variables (set or unset) will be overridden when
29476# loading this file, other *unset* `ac_cv_foo' will be assigned the
29477# following values.
29478
29479_ACEOF
29480
29481# The following way of writing the cache mishandles newlines in values,
29482# but we know of no workaround that is simple, portable, and efficient.
29483# So, we kill variables containing newlines.
29484# Ultrix sh set writes to stderr and can't be redirected directly,
29485# and sets the high bit in the cache file unless we assign to the vars.
29486(
29487 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
29488 eval ac_val=\$$ac_var
29489 case $ac_val in #(
29490 *${as_nl}*)
29491 case $ac_var in #(
29492 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
29493$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
29494 esac
29495 case $ac_var in #(
29496 _ | IFS | as_nl) ;; #(
29497 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
29498 *) { eval $ac_var=; unset $ac_var;} ;;
29499 esac ;;
29500 esac
29501 done
29502
29503 (set) 2>&1 |
29504 case $as_nl`(ac_space=' '; set) 2>&1` in #(
29505 *${as_nl}ac_space=\ *)
29506 # `set' does not quote correctly, so add quotes: double-quote
29507 # substitution turns \\\\ into \\, and sed turns \\ into \.
29508 sed -n \
29509 "s/'/'\\\\''/g;
29510 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
29511 ;; #(
29512 *)
29513 # `set' quotes correctly as required by POSIX, so do not add quotes.
29514 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
29515 ;;
29516 esac |
29517 sort
29518) |
29519 sed '
29520 /^ac_cv_env_/b end
29521 t clear
29522 :clear
29523 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
29524 t end
29525 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
29526 :end' >>confcache
29527if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
29528 if test -w "$cache_file"; then
a9bec17c 29529 test "x$cache_file" != "x/dev/null" &&
067d23c9
KY
29530 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
29531$as_echo "$as_me: updating cache $cache_file" >&6;}
a9bec17c 29532 cat confcache >$cache_file
067d23c9
KY
29533 else
29534 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
29535$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
29536 fi
29537fi
29538rm -f confcache
29539
29540test "x$prefix" = xNONE && prefix=$ac_default_prefix
29541# Let make expand exec_prefix.
29542test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
29543
29544DEFS=-DHAVE_CONFIG_H
29545
29546ac_libobjs=
29547ac_ltlibobjs=
29548for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
29549 # 1. Remove the extension, and $U if already installed.
29550 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
29551 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
29552 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
29553 # will be set to the directory where LIBOBJS objects are built.
29554 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
29555 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
29556done
29557LIBOBJS=$ac_libobjs
29558
29559LTLIBOBJS=$ac_ltlibobjs
29560
29561
743c80a7
PE
29562 if test -n "$EXEEXT"; then
29563 am__EXEEXT_TRUE=
29564 am__EXEEXT_FALSE='#'
29565else
29566 am__EXEEXT_TRUE='#'
29567 am__EXEEXT_FALSE=
29568fi
29569
29570if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
a9bec17c 29571 as_fn_error "conditional \"AMDEP\" was never defined.
743c80a7
PE
29572Usually this means the macro was only invoked conditionally." "$LINENO" 5
29573fi
29574if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
a9bec17c 29575 as_fn_error "conditional \"am__fastdepCC\" was never defined.
743c80a7
PE
29576Usually this means the macro was only invoked conditionally." "$LINENO" 5
29577fi
7c61eaab
GM
29578if test -z "${BUILDING_FOR_WINDOWSNT_TRUE}" && test -z "${BUILDING_FOR_WINDOWSNT_FALSE}"; then
29579 as_fn_error "conditional \"BUILDING_FOR_WINDOWSNT\" was never defined.
29580Usually this means the macro was only invoked conditionally." "$LINENO" 5
29581fi
743c80a7 29582if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
a9bec17c 29583 as_fn_error "conditional \"GL_COND_LIBTOOL\" was never defined.
743c80a7
PE
29584Usually this means the macro was only invoked conditionally." "$LINENO" 5
29585fi
4fc2b746 29586if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
a9bec17c 29587 as_fn_error "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
4fc2b746
GM
29588Usually this means the macro was only invoked conditionally." "$LINENO" 5
29589fi
eafe4c87
GM
29590if test -z "${GL_GENERATE_BYTESWAP_H_TRUE}" && test -z "${GL_GENERATE_BYTESWAP_H_FALSE}"; then
29591 as_fn_error "conditional \"GL_GENERATE_BYTESWAP_H\" was never defined.
29592Usually this means the macro was only invoked conditionally." "$LINENO" 5
29593fi
743c80a7 29594
3a019ab4
GM
29595if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then
29596 as_fn_error "conditional \"GL_GENERATE_ERRNO_H\" was never defined.
29597Usually this means the macro was only invoked conditionally." "$LINENO" 5
29598fi
8966cbff
GM
29599if test -z "${GL_GENERATE_EXECINFO_H_TRUE}" && test -z "${GL_GENERATE_EXECINFO_H_FALSE}"; then
29600 as_fn_error "conditional \"GL_GENERATE_EXECINFO_H\" was never defined.
29601Usually this means the macro was only invoked conditionally." "$LINENO" 5
29602fi
4fda9c95 29603if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
a9bec17c 29604 as_fn_error "conditional \"GL_GENERATE_STDINT_H\" was never defined.
4fda9c95
GM
29605Usually this means the macro was only invoked conditionally." "$LINENO" 5
29606fi
0eb775a3
GM
29607if test -z "${GL_GENERATE_STDALIGN_H_TRUE}" && test -z "${GL_GENERATE_STDALIGN_H_FALSE}"; then
29608 as_fn_error "conditional \"GL_GENERATE_STDALIGN_H\" was never defined.
29609Usually this means the macro was only invoked conditionally." "$LINENO" 5
29610fi
6d153f56 29611if test -z "${GL_GENERATE_STDARG_H_TRUE}" && test -z "${GL_GENERATE_STDARG_H_FALSE}"; then
a9bec17c 29612 as_fn_error "conditional \"GL_GENERATE_STDARG_H\" was never defined.
6d153f56
GM
29613Usually this means the macro was only invoked conditionally." "$LINENO" 5
29614fi
6c051bab 29615if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
a9bec17c 29616 as_fn_error "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
6c051bab
GM
29617Usually this means the macro was only invoked conditionally." "$LINENO" 5
29618fi
29619if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
a9bec17c 29620 as_fn_error "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
6c051bab
GM
29621Usually this means the macro was only invoked conditionally." "$LINENO" 5
29622fi
d7ad186c
GM
29623if test -z "${gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_TRUE}" && test -z "${gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_FALSE}"; then
29624 as_fn_error "conditional \"gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b\" was never defined.
29625Usually this means the macro was only invoked conditionally." "$LINENO" 5
29626fi
6d153f56 29627if test -z "${gl_GNULIB_ENABLED_dosname_TRUE}" && test -z "${gl_GNULIB_ENABLED_dosname_FALSE}"; then
a9bec17c 29628 as_fn_error "conditional \"gl_GNULIB_ENABLED_dosname\" was never defined.
6d153f56
GM
29629Usually this means the macro was only invoked conditionally." "$LINENO" 5
29630fi
710f5812
GM
29631if test -z "${gl_GNULIB_ENABLED_euidaccess_TRUE}" && test -z "${gl_GNULIB_ENABLED_euidaccess_FALSE}"; then
29632 as_fn_error "conditional \"gl_GNULIB_ENABLED_euidaccess\" was never defined.
29633Usually this means the macro was only invoked conditionally." "$LINENO" 5
29634fi
0cdca42a
GM
29635if test -z "${gl_GNULIB_ENABLED_getdtablesize_TRUE}" && test -z "${gl_GNULIB_ENABLED_getdtablesize_FALSE}"; then
29636 as_fn_error "conditional \"gl_GNULIB_ENABLED_getdtablesize\" was never defined.
29637Usually this means the macro was only invoked conditionally." "$LINENO" 5
29638fi
710f5812
GM
29639if test -z "${gl_GNULIB_ENABLED_getgroups_TRUE}" && test -z "${gl_GNULIB_ENABLED_getgroups_FALSE}"; then
29640 as_fn_error "conditional \"gl_GNULIB_ENABLED_getgroups\" was never defined.
29641Usually this means the macro was only invoked conditionally." "$LINENO" 5
29642fi
6d153f56 29643if test -z "${gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE}" && test -z "${gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE}"; then
a9bec17c 29644 as_fn_error "conditional \"gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36\" was never defined.
6d153f56
GM
29645Usually this means the macro was only invoked conditionally." "$LINENO" 5
29646fi
710f5812
GM
29647if test -z "${gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_TRUE}" && test -z "${gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_FALSE}"; then
29648 as_fn_error "conditional \"gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1\" was never defined.
29649Usually this means the macro was only invoked conditionally." "$LINENO" 5
29650fi
d7ad186c
GM
29651if test -z "${gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_TRUE}" && test -z "${gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_FALSE}"; then
29652 as_fn_error "conditional \"gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7\" was never defined.
29653Usually this means the macro was only invoked conditionally." "$LINENO" 5
29654fi
a0a61e58
GM
29655if test -z "${gl_GNULIB_ENABLED_pathmax_TRUE}" && test -z "${gl_GNULIB_ENABLED_pathmax_FALSE}"; then
29656 as_fn_error "conditional \"gl_GNULIB_ENABLED_pathmax\" was never defined.
29657Usually this means the macro was only invoked conditionally." "$LINENO" 5
29658fi
710f5812
GM
29659if test -z "${gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_TRUE}" && test -z "${gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_FALSE}"; then
29660 as_fn_error "conditional \"gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c\" was never defined.
29661Usually this means the macro was only invoked conditionally." "$LINENO" 5
29662fi
e412eb97
GM
29663if test -z "${gl_GNULIB_ENABLED_secure_getenv_TRUE}" && test -z "${gl_GNULIB_ENABLED_secure_getenv_FALSE}"; then
29664 as_fn_error "conditional \"gl_GNULIB_ENABLED_secure_getenv\" was never defined.
29665Usually this means the macro was only invoked conditionally." "$LINENO" 5
29666fi
6d153f56 29667if test -z "${gl_GNULIB_ENABLED_stat_TRUE}" && test -z "${gl_GNULIB_ENABLED_stat_FALSE}"; then
a9bec17c 29668 as_fn_error "conditional \"gl_GNULIB_ENABLED_stat\" was never defined.
6d153f56
GM
29669Usually this means the macro was only invoked conditionally." "$LINENO" 5
29670fi
3e0be4ab 29671if test -z "${gl_GNULIB_ENABLED_strtoll_TRUE}" && test -z "${gl_GNULIB_ENABLED_strtoll_FALSE}"; then
a9bec17c 29672 as_fn_error "conditional \"gl_GNULIB_ENABLED_strtoll\" was never defined.
3e0be4ab
GM
29673Usually this means the macro was only invoked conditionally." "$LINENO" 5
29674fi
6d153f56 29675if test -z "${gl_GNULIB_ENABLED_strtoull_TRUE}" && test -z "${gl_GNULIB_ENABLED_strtoull_FALSE}"; then
a9bec17c 29676 as_fn_error "conditional \"gl_GNULIB_ENABLED_strtoull\" was never defined.
6d153f56
GM
29677Usually this means the macro was only invoked conditionally." "$LINENO" 5
29678fi
e412eb97
GM
29679if test -z "${gl_GNULIB_ENABLED_tempname_TRUE}" && test -z "${gl_GNULIB_ENABLED_tempname_FALSE}"; then
29680 as_fn_error "conditional \"gl_GNULIB_ENABLED_tempname\" was never defined.
29681Usually this means the macro was only invoked conditionally." "$LINENO" 5
29682fi
710f5812
GM
29683if test -z "${gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_TRUE}" && test -z "${gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_FALSE}"; then
29684 as_fn_error "conditional \"gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec\" was never defined.
29685Usually this means the macro was only invoked conditionally." "$LINENO" 5
6c051bab 29686fi
942f733f 29687
743c80a7
PE
29688 gl_libobjs=
29689 gl_ltlibobjs=
29690 if test -n "$gl_LIBOBJS"; then
29691 # Remove the extension.
29692 sed_drop_objext='s/\.o$//;s/\.obj$//'
29693 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
29694 gl_libobjs="$gl_libobjs $i.$ac_objext"
29695 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
29696 done
29697 fi
29698 gl_LIBOBJS=$gl_libobjs
29699
29700 gl_LTLIBOBJS=$gl_ltlibobjs
29701
29702
29703
29704 gltests_libobjs=
29705 gltests_ltlibobjs=
29706 if test -n "$gltests_LIBOBJS"; then
29707 # Remove the extension.
29708 sed_drop_objext='s/\.o$//;s/\.obj$//'
29709 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
29710 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
29711 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
29712 done
29713 fi
29714 gltests_LIBOBJS=$gltests_libobjs
29715
29716 gltests_LTLIBOBJS=$gltests_ltlibobjs
29717
067d23c9
KY
29718
29719
a9bec17c 29720: ${CONFIG_STATUS=./config.status}
067d23c9
KY
29721ac_write_fail=0
29722ac_clean_files_save=$ac_clean_files
29723ac_clean_files="$ac_clean_files $CONFIG_STATUS"
29724{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
29725$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
29726as_write_fail=0
29727cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
29728#! $SHELL
29729# Generated by $as_me.
29730# Run this file to recreate the current configuration.
29731# Compiler output produced by configure, useful for debugging
29732# configure, is in config.log if it exists.
29733
29734debug=false
29735ac_cs_recheck=false
29736ac_cs_silent=false
29737
29738SHELL=\${CONFIG_SHELL-$SHELL}
29739export SHELL
29740_ASEOF
29741cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
29742## -------------------- ##
29743## M4sh Initialization. ##
29744## -------------------- ##
29745
29746# Be more Bourne compatible
29747DUALCASE=1; export DUALCASE # for MKS sh
29748if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
29749 emulate sh
29750 NULLCMD=:
29751 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
29752 # is contrary to our usage. Disable this feature.
29753 alias -g '${1+"$@"}'='"$@"'
29754 setopt NO_GLOB_SUBST
29755else
29756 case `(set -o) 2>/dev/null` in #(
29757 *posix*) :
29758 set -o posix ;; #(
29759 *) :
29760 ;;
29761esac
29762fi
29763
29764
29765as_nl='
29766'
29767export as_nl
29768# Printing a long string crashes Solaris 7 /usr/bin/printf.
29769as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
29770as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
29771as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
29772# Prefer a ksh shell builtin over an external printf program on Solaris,
29773# but without wasting forks for bash or zsh.
29774if test -z "$BASH_VERSION$ZSH_VERSION" \
29775 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
29776 as_echo='print -r --'
29777 as_echo_n='print -rn --'
29778elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
29779 as_echo='printf %s\n'
29780 as_echo_n='printf %s'
29781else
29782 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
29783 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
29784 as_echo_n='/usr/ucb/echo -n'
29785 else
29786 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
29787 as_echo_n_body='eval
29788 arg=$1;
29789 case $arg in #(
29790 *"$as_nl"*)
29791 expr "X$arg" : "X\\(.*\\)$as_nl";
29792 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
29793 esac;
29794 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
29795 '
29796 export as_echo_n_body
29797 as_echo_n='sh -c $as_echo_n_body as_echo'
29798 fi
29799 export as_echo_body
29800 as_echo='sh -c $as_echo_body as_echo'
29801fi
29802
29803# The user is always right.
29804if test "${PATH_SEPARATOR+set}" != set; then
29805 PATH_SEPARATOR=:
29806 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
29807 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
29808 PATH_SEPARATOR=';'
29809 }
29810fi
29811
29812
29813# IFS
29814# We need space, tab and new line, in precisely that order. Quoting is
29815# there to prevent editors from complaining about space-tab.
29816# (If _AS_PATH_WALK were called with IFS unset, it would disable word
29817# splitting by setting IFS to empty value.)
29818IFS=" "" $as_nl"
29819
29820# Find who we are. Look in the path if we contain no directory separator.
29821case $0 in #((
29822 *[\\/]* ) as_myself=$0 ;;
29823 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29824for as_dir in $PATH
29825do
29826 IFS=$as_save_IFS
29827 test -z "$as_dir" && as_dir=.
29828 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
29829 done
29830IFS=$as_save_IFS
29831
29832 ;;
29833esac
29834# We did not find ourselves, most probably we were run as `sh COMMAND'
29835# in which case we are not to be found in the path.
29836if test "x$as_myself" = x; then
29837 as_myself=$0
29838fi
29839if test ! -f "$as_myself"; then
29840 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
29841 exit 1
29842fi
29843
29844# Unset variables that we do not need and which cause bugs (e.g. in
29845# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
29846# suppresses any "Segmentation fault" message there. '((' could
29847# trigger a bug in pdksh 5.2.14.
29848for as_var in BASH_ENV ENV MAIL MAILPATH
29849do eval test x\${$as_var+set} = xset \
29850 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
29851done
29852PS1='$ '
29853PS2='> '
29854PS4='+ '
29855
29856# NLS nuisances.
29857LC_ALL=C
29858export LC_ALL
29859LANGUAGE=C
29860export LANGUAGE
29861
29862# CDPATH.
29863(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
29864
29865
a9bec17c
GM
29866# as_fn_error ERROR [LINENO LOG_FD]
29867# ---------------------------------
067d23c9
KY
29868# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
29869# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
a9bec17c 29870# script with status $?, using 1 if that was 0.
067d23c9
KY
29871as_fn_error ()
29872{
a9bec17c
GM
29873 as_status=$?; test $as_status -eq 0 && as_status=1
29874 if test "$3"; then
29875 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
29876 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
067d23c9 29877 fi
a9bec17c 29878 $as_echo "$as_me: error: $1" >&2
067d23c9
KY
29879 as_fn_exit $as_status
29880} # as_fn_error
29881
29882
29883# as_fn_set_status STATUS
29884# -----------------------
29885# Set $? to STATUS, without forking.
29886as_fn_set_status ()
29887{
29888 return $1
29889} # as_fn_set_status
29890
29891# as_fn_exit STATUS
29892# -----------------
29893# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
29894as_fn_exit ()
29895{
29896 set +e
29897 as_fn_set_status $1
29898 exit $1
29899} # as_fn_exit
29900
29901# as_fn_unset VAR
29902# ---------------
29903# Portably unset VAR.
29904as_fn_unset ()
29905{
29906 { eval $1=; unset $1;}
29907}
29908as_unset=as_fn_unset
29909# as_fn_append VAR VALUE
29910# ----------------------
29911# Append the text in VALUE to the end of the definition contained in VAR. Take
29912# advantage of any shell optimizations that allow amortized linear growth over
29913# repeated appends, instead of the typical quadratic growth present in naive
29914# implementations.
29915if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
29916 eval 'as_fn_append ()
29917 {
29918 eval $1+=\$2
29919 }'
29920else
29921 as_fn_append ()
29922 {
29923 eval $1=\$$1\$2
29924 }
29925fi # as_fn_append
29926
29927# as_fn_arith ARG...
29928# ------------------
29929# Perform arithmetic evaluation on the ARGs, and store the result in the
29930# global $as_val. Take advantage of shells that can avoid forks. The arguments
29931# must be portable across $(()) and expr.
29932if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
29933 eval 'as_fn_arith ()
29934 {
29935 as_val=$(( $* ))
29936 }'
29937else
29938 as_fn_arith ()
29939 {
29940 as_val=`expr "$@" || test $? -eq 1`
29941 }
29942fi # as_fn_arith
29943
29944
29945if expr a : '\(a\)' >/dev/null 2>&1 &&
29946 test "X`expr 00001 : '.*\(...\)'`" = X001; then
29947 as_expr=expr
29948else
29949 as_expr=false
29950fi
29951
29952if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
29953 as_basename=basename
29954else
29955 as_basename=false
29956fi
29957
29958if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
29959 as_dirname=dirname
29960else
29961 as_dirname=false
29962fi
29963
29964as_me=`$as_basename -- "$0" ||
29965$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
29966 X"$0" : 'X\(//\)$' \| \
29967 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
29968$as_echo X/"$0" |
29969 sed '/^.*\/\([^/][^/]*\)\/*$/{
29970 s//\1/
29971 q
29972 }
29973 /^X\/\(\/\/\)$/{
29974 s//\1/
29975 q
29976 }
29977 /^X\/\(\/\).*/{
29978 s//\1/
29979 q
29980 }
29981 s/.*/./; q'`
29982
29983# Avoid depending upon Character Ranges.
29984as_cr_letters='abcdefghijklmnopqrstuvwxyz'
29985as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
29986as_cr_Letters=$as_cr_letters$as_cr_LETTERS
29987as_cr_digits='0123456789'
29988as_cr_alnum=$as_cr_Letters$as_cr_digits
29989
29990ECHO_C= ECHO_N= ECHO_T=
29991case `echo -n x` in #(((((
29992-n*)
29993 case `echo 'xy\c'` in
29994 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
29995 xy) ECHO_C='\c';;
29996 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
29997 ECHO_T=' ';;
29998 esac;;
29999*)
30000 ECHO_N='-n';;
30001esac
30002
30003rm -f conf$$ conf$$.exe conf$$.file
30004if test -d conf$$.dir; then
30005 rm -f conf$$.dir/conf$$.file
30006else
30007 rm -f conf$$.dir
30008 mkdir conf$$.dir 2>/dev/null
30009fi
30010if (echo >conf$$.file) 2>/dev/null; then
30011 if ln -s conf$$.file conf$$ 2>/dev/null; then
30012 as_ln_s='ln -s'
30013 # ... but there are two gotchas:
30014 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
30015 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
30016 # In both cases, we have to default to `cp -p'.
30017 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
30018 as_ln_s='cp -p'
30019 elif ln conf$$.file conf$$ 2>/dev/null; then
30020 as_ln_s=ln
30021 else
30022 as_ln_s='cp -p'
30023 fi
30024else
30025 as_ln_s='cp -p'
30026fi
30027rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
30028rmdir conf$$.dir 2>/dev/null
30029
30030
30031# as_fn_mkdir_p
30032# -------------
30033# Create "$as_dir" as a directory, including parents if necessary.
30034as_fn_mkdir_p ()
30035{
30036
30037 case $as_dir in #(
30038 -*) as_dir=./$as_dir;;
30039 esac
30040 test -d "$as_dir" || eval $as_mkdir_p || {
30041 as_dirs=
30042 while :; do
30043 case $as_dir in #(
30044 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
30045 *) as_qdir=$as_dir;;
30046 esac
30047 as_dirs="'$as_qdir' $as_dirs"
30048 as_dir=`$as_dirname -- "$as_dir" ||
30049$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30050 X"$as_dir" : 'X\(//\)[^/]' \| \
30051 X"$as_dir" : 'X\(//\)$' \| \
30052 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
30053$as_echo X"$as_dir" |
30054 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
30055 s//\1/
30056 q
30057 }
30058 /^X\(\/\/\)[^/].*/{
30059 s//\1/
30060 q
30061 }
30062 /^X\(\/\/\)$/{
30063 s//\1/
30064 q
30065 }
30066 /^X\(\/\).*/{
30067 s//\1/
30068 q
30069 }
30070 s/.*/./; q'`
30071 test -d "$as_dir" && break
30072 done
30073 test -z "$as_dirs" || eval "mkdir $as_dirs"
a9bec17c 30074 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
067d23c9
KY
30075
30076
30077} # as_fn_mkdir_p
30078if mkdir -p . 2>/dev/null; then
30079 as_mkdir_p='mkdir -p "$as_dir"'
30080else
30081 test -d ./-p && rmdir ./-p
30082 as_mkdir_p=false
30083fi
30084
30085if test -x / >/dev/null 2>&1; then
30086 as_test_x='test -x'
30087else
30088 if ls -dL / >/dev/null 2>&1; then
30089 as_ls_L_option=L
30090 else
30091 as_ls_L_option=
30092 fi
30093 as_test_x='
30094 eval sh -c '\''
30095 if test -d "$1"; then
30096 test -d "$1/.";
30097 else
30098 case $1 in #(
30099 -*)set "./$1";;
30100 esac;
30101 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
30102 ???[sx]*):;;*)false;;esac;fi
30103 '\'' sh
30104 '
30105fi
30106as_executable_p=$as_test_x
30107
30108# Sed expression to map a string onto a valid CPP name.
30109as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
30110
30111# Sed expression to map a string onto a valid variable name.
30112as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
30113
30114
30115exec 6>&1
30116## ----------------------------------- ##
30117## Main body of $CONFIG_STATUS script. ##
30118## ----------------------------------- ##
30119_ASEOF
30120test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
30121
30122cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30123# Save the log message, to keep $0 and so on meaningful, and to
30124# report actual input values of CONFIG_FILES etc. instead of their
30125# values after options handling.
30126ac_log="
c574bc34 30127This file was extended by emacs $as_me 24.3.50, which was
a9bec17c 30128generated by GNU Autoconf 2.65. Invocation command line was
067d23c9
KY
30129
30130 CONFIG_FILES = $CONFIG_FILES
30131 CONFIG_HEADERS = $CONFIG_HEADERS
30132 CONFIG_LINKS = $CONFIG_LINKS
30133 CONFIG_COMMANDS = $CONFIG_COMMANDS
30134 $ $0 $@
30135
30136on `(hostname || uname -n) 2>/dev/null | sed 1q`
30137"
30138
30139_ACEOF
30140
30141case $ac_config_files in *"
30142"*) set x $ac_config_files; shift; ac_config_files=$*;;
30143esac
30144
30145case $ac_config_headers in *"
30146"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
30147esac
30148
30149
30150cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30151# Files that config.status was made for.
30152config_files="$ac_config_files"
30153config_headers="$ac_config_headers"
30154config_commands="$ac_config_commands"
30155
30156_ACEOF
30157
30158cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30159ac_cs_usage="\
30160\`$as_me' instantiates files and other configuration actions
30161from templates according to the current configuration. Unless the files
30162and actions are specified as TAGs, all are instantiated by default.
30163
30164Usage: $0 [OPTION]... [TAG]...
30165
30166 -h, --help print this help, then exit
30167 -V, --version print version number and configuration settings, then exit
30168 --config print configuration, then exit
30169 -q, --quiet, --silent
30170 do not print progress messages
30171 -d, --debug don't remove temporary files
30172 --recheck update $as_me by reconfiguring in the same conditions
30173 --file=FILE[:TEMPLATE]
30174 instantiate the configuration file FILE
30175 --header=FILE[:TEMPLATE]
30176 instantiate the configuration header FILE
30177
30178Configuration files:
30179$config_files
30180
30181Configuration headers:
30182$config_headers
30183
30184Configuration commands:
30185$config_commands
30186
30187Report bugs to the package provider."
30188
30189_ACEOF
30190cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30191ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
30192ac_cs_version="\\
c574bc34 30193emacs config.status 24.3.50
a9bec17c 30194configured by $0, generated by GNU Autoconf 2.65,
067d23c9
KY
30195 with options \\"\$ac_cs_config\\"
30196
a9bec17c 30197Copyright (C) 2009 Free Software Foundation, Inc.
067d23c9
KY
30198This config.status script is free software; the Free Software Foundation
30199gives unlimited permission to copy, distribute and modify it."
30200
30201ac_pwd='$ac_pwd'
30202srcdir='$srcdir'
30203INSTALL='$INSTALL'
743c80a7
PE
30204MKDIR_P='$MKDIR_P'
30205AWK='$AWK'
067d23c9
KY
30206test -n "\$AWK" || AWK=awk
30207_ACEOF
30208
30209cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30210# The default lists apply if the user does not specify any file.
30211ac_need_defaults=:
30212while test $# != 0
30213do
30214 case $1 in
a9bec17c 30215 --*=*)
067d23c9
KY
30216 ac_option=`expr "X$1" : 'X\([^=]*\)='`
30217 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
30218 ac_shift=:
30219 ;;
30220 *)
30221 ac_option=$1
30222 ac_optarg=$2
30223 ac_shift=shift
30224 ;;
30225 esac
30226
30227 case $ac_option in
30228 # Handling of the options.
30229 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
30230 ac_cs_recheck=: ;;
30231 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
30232 $as_echo "$ac_cs_version"; exit ;;
30233 --config | --confi | --conf | --con | --co | --c )
30234 $as_echo "$ac_cs_config"; exit ;;
30235 --debug | --debu | --deb | --de | --d | -d )
30236 debug=: ;;
30237 --file | --fil | --fi | --f )
30238 $ac_shift
30239 case $ac_optarg in
30240 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
30241 esac
30242 as_fn_append CONFIG_FILES " '$ac_optarg'"
30243 ac_need_defaults=false;;
30244 --header | --heade | --head | --hea )
30245 $ac_shift
30246 case $ac_optarg in
30247 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
30248 esac
30249 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
30250 ac_need_defaults=false;;
30251 --he | --h)
30252 # Conflict between --help and --header
a9bec17c 30253 as_fn_error "ambiguous option: \`$1'
067d23c9
KY
30254Try \`$0 --help' for more information.";;
30255 --help | --hel | -h )
30256 $as_echo "$ac_cs_usage"; exit ;;
30257 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
30258 | -silent | --silent | --silen | --sile | --sil | --si | --s)
30259 ac_cs_silent=: ;;
30260
30261 # This is an error.
a9bec17c 30262 -*) as_fn_error "unrecognized option: \`$1'
067d23c9
KY
30263Try \`$0 --help' for more information." ;;
30264
30265 *) as_fn_append ac_config_targets " $1"
30266 ac_need_defaults=false ;;
30267
30268 esac
30269 shift
30270done
30271
30272ac_configure_extra_args=
30273
30274if $ac_cs_silent; then
30275 exec 6>/dev/null
30276 ac_configure_extra_args="$ac_configure_extra_args --silent"
30277fi
30278
30279_ACEOF
30280cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30281if \$ac_cs_recheck; then
30282 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
30283 shift
30284 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
30285 CONFIG_SHELL='$SHELL'
30286 export CONFIG_SHELL
30287 exec "\$@"
30288fi
30289
30290_ACEOF
30291cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30292exec 5>>config.log
30293{
30294 echo
30295 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
30296## Running $as_me. ##
30297_ASBOX
30298 $as_echo "$ac_log"
30299} >&5
30300
30301_ACEOF
30302cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30303#
30304# INIT-COMMANDS
30305#
743c80a7 30306AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
7c61eaab 30307GCC="$GCC" CPPFLAGS="$CPPFLAGS" opsys="$opsys"
067d23c9
KY
30308
30309_ACEOF
30310
30311cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30312
30313# Handling of arguments.
30314for ac_config_target in $ac_config_targets
30315do
30316 case $ac_config_target in
30317 "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:src/config.in" ;;
743c80a7 30318 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
bb7dce39
GM
30319 "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" ;;
30320 "nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop") CONFIG_FILES="$CONFIG_FILES nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop:nextstep/templates/Emacs.desktop.in" ;;
30321 "nextstep/Cocoa/Emacs.base/Contents/Info.plist") CONFIG_FILES="$CONFIG_FILES nextstep/Cocoa/Emacs.base/Contents/Info.plist:nextstep/templates/Info.plist.in" ;;
30322 "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 30323 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
743c80a7 30324 "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
56ade35c
GM
30325 "lib-src/Makefile") CONFIG_FILES="$CONFIG_FILES lib-src/Makefile" ;;
30326 "oldXMenu/Makefile") CONFIG_FILES="$CONFIG_FILES oldXMenu/Makefile" ;;
30327 "doc/emacs/Makefile") CONFIG_FILES="$CONFIG_FILES doc/emacs/Makefile" ;;
30328 "doc/misc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/misc/Makefile" ;;
30329 "doc/lispintro/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispintro/Makefile" ;;
30330 "doc/lispref/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispref/Makefile" ;;
30331 "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
30332 "lwlib/Makefile") CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;;
30333 "lisp/Makefile") CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;;
30334 "leim/Makefile") CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;;
bb7dce39 30335 "nextstep/Makefile") CONFIG_FILES="$CONFIG_FILES nextstep/Makefile" ;;
7c61eaab 30336 "nt/Makefile") CONFIG_FILES="$CONFIG_FILES nt/Makefile" ;;
56ade35c 30337 "test/automated/Makefile") CONFIG_FILES="$CONFIG_FILES test/automated/Makefile" ;;
40b65096 30338 "admin/unidata/Makefile") CONFIG_FILES="$CONFIG_FILES admin/unidata/Makefile" ;;
4c15c0f2
GM
30339 "src/epaths.h") CONFIG_COMMANDS="$CONFIG_COMMANDS src/epaths.h" ;;
30340 "src/.gdbinit") CONFIG_COMMANDS="$CONFIG_COMMANDS src/.gdbinit" ;;
067d23c9 30341
a9bec17c 30342 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
067d23c9
KY
30343 esac
30344done
30345
30346
30347# If the user did not use the arguments to specify the items to instantiate,
30348# then the envvar interface is used. Set only those that are not.
30349# We use the long form for the default assignment because of an extremely
30350# bizarre bug on SunOS 4.1.3.
30351if $ac_need_defaults; then
30352 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
30353 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
30354 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
30355fi
30356
30357# Have a temporary directory for convenience. Make it in the build tree
30358# simply because there is no reason against having it here, and in addition,
30359# creating and moving files from /tmp can sometimes cause problems.
30360# Hook for its removal unless debugging.
30361# Note that there is a small window in which the directory will not be cleaned:
30362# after its creation but before its name has been assigned to `$tmp'.
30363$debug ||
30364{
a9bec17c 30365 tmp=
067d23c9 30366 trap 'exit_status=$?
a9bec17c 30367 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
067d23c9
KY
30368' 0
30369 trap 'as_fn_exit 1' 1 2 13 15
30370}
30371# Create a (secure) tmp directory for tmp files.
30372
30373{
30374 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
a9bec17c 30375 test -n "$tmp" && test -d "$tmp"
067d23c9
KY
30376} ||
30377{
30378 tmp=./conf$$-$RANDOM
30379 (umask 077 && mkdir "$tmp")
a9bec17c 30380} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
067d23c9
KY
30381
30382# Set up the scripts for CONFIG_FILES section.
30383# No need to generate them if there are no CONFIG_FILES.
30384# This happens for instance with `./config.status config.h'.
30385if test -n "$CONFIG_FILES"; then
30386
30387if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
30388 ac_cs_awk_getline=:
30389 ac_cs_awk_pipe_init=
30390 ac_cs_awk_read_file='
30391 while ((getline aline < (F[key])) > 0)
30392 print(aline)
30393 close(F[key])'
30394 ac_cs_awk_pipe_fini=
30395else
30396 ac_cs_awk_getline=false
30397 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
30398 ac_cs_awk_read_file='
30399 print "|#_!!_#|"
30400 print "cat " F[key] " &&"
30401 '$ac_cs_awk_pipe_init
30402 # The final `:' finishes the AND list.
30403 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
30404fi
30405ac_cr=`echo X | tr X '\015'`
30406# On cygwin, bash can eat \r inside `` if the user requested igncr.
30407# But we know of no other shell where ac_cr would be empty at this
30408# point, so we can use a bashism as a fallback.
30409if test "x$ac_cr" = x; then
30410 eval ac_cr=\$\'\\r\'
30411fi
30412ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
30413if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
a9bec17c 30414 ac_cs_awk_cr='\r'
067d23c9
KY
30415else
30416 ac_cs_awk_cr=$ac_cr
30417fi
30418
a9bec17c 30419echo 'BEGIN {' >"$tmp/subs1.awk" &&
067d23c9
KY
30420_ACEOF
30421
30422# Create commands to substitute file output variables.
30423{
30424 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
a9bec17c 30425 echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
067d23c9
KY
30426 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
30427 echo "_ACAWK" &&
30428 echo "_ACEOF"
30429} >conf$$files.sh &&
30430. ./conf$$files.sh ||
a9bec17c 30431 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
067d23c9
KY
30432rm -f conf$$files.sh
30433
30434{
30435 echo "cat >conf$$subs.awk <<_ACEOF" &&
30436 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
30437 echo "_ACEOF"
30438} >conf$$subs.sh ||
a9bec17c
GM
30439 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
30440ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
067d23c9
KY
30441ac_delim='%!_!# '
30442for ac_last_try in false false false false false :; do
30443 . ./conf$$subs.sh ||
a9bec17c 30444 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
067d23c9
KY
30445
30446 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
30447 if test $ac_delim_n = $ac_delim_num; then
30448 break
30449 elif $ac_last_try; then
a9bec17c 30450 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
067d23c9
KY
30451 else
30452 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
30453 fi
30454done
30455rm -f conf$$subs.sh
30456
30457cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
a9bec17c 30458cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
067d23c9
KY
30459_ACEOF
30460sed -n '
30461h
30462s/^/S["/; s/!.*/"]=/
30463p
30464g
30465s/^[^!]*!//
30466:repl
30467t repl
30468s/'"$ac_delim"'$//
30469t delim
30470:nl
30471h
30472s/\(.\{148\}\)..*/\1/
30473t more1
30474s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
30475p
30476n
30477b repl
30478:more1
30479s/["\\]/\\&/g; s/^/"/; s/$/"\\/
30480p
30481g
30482s/.\{148\}//
30483t nl
30484:delim
30485h
30486s/\(.\{148\}\)..*/\1/
30487t more2
30488s/["\\]/\\&/g; s/^/"/; s/$/"/
30489p
30490b
30491:more2
30492s/["\\]/\\&/g; s/^/"/; s/$/"\\/
30493p
30494g
30495s/.\{148\}//
30496t delim
30497' <conf$$subs.awk | sed '
30498/^[^""]/{
30499 N
30500 s/\n//
30501}
30502' >>$CONFIG_STATUS || ac_write_fail=1
30503rm -f conf$$subs.awk
30504cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30505_ACAWK
a9bec17c 30506cat >>"\$tmp/subs1.awk" <<_ACAWK &&
067d23c9
KY
30507 for (key in S) S_is_set[key] = 1
30508 FS = "\a"
30509 \$ac_cs_awk_pipe_init
30510}
30511{
30512 line = $ 0
30513 nfields = split(line, field, "@")
30514 substed = 0
30515 len = length(field[1])
30516 for (i = 2; i < nfields; i++) {
30517 key = field[i]
30518 keylen = length(key)
30519 if (S_is_set[key]) {
30520 value = S[key]
30521 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
30522 len += length(value) + length(field[++i])
30523 substed = 1
30524 } else
30525 len += 1 + keylen
30526 }
30527 if (nfields == 3 && !substed) {
30528 key = field[2]
30529 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
30530 \$ac_cs_awk_read_file
30531 next
30532 }
30533 }
30534 print line
30535}
30536\$ac_cs_awk_pipe_fini
30537_ACAWK
30538_ACEOF
30539cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30540if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
30541 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
30542else
30543 cat
a9bec17c
GM
30544fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
30545 || as_fn_error "could not setup config files machinery" "$LINENO" 5
067d23c9
KY
30546_ACEOF
30547
a9bec17c
GM
30548# VPATH may cause trouble with some makes, so we remove $(srcdir),
30549# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
067d23c9
KY
30550# trailing colons and then remove the whole line if VPATH becomes empty
30551# (actually we leave an empty line to preserve line numbers).
30552if test "x$srcdir" = x.; then
a9bec17c
GM
30553 ac_vpsub='/^[ ]*VPATH[ ]*=/{
30554s/:*\$(srcdir):*/:/
30555s/:*\${srcdir}:*/:/
30556s/:*@srcdir@:*/:/
30557s/^\([^=]*=[ ]*\):*/\1/
067d23c9
KY
30558s/:*$//
30559s/^[^=]*=[ ]*$//
30560}'
30561fi
30562
30563cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30564fi # test -n "$CONFIG_FILES"
30565
30566# Set up the scripts for CONFIG_HEADERS section.
30567# No need to generate them if there are no CONFIG_HEADERS.
30568# This happens for instance with `./config.status Makefile'.
30569if test -n "$CONFIG_HEADERS"; then
a9bec17c 30570cat >"$tmp/defines.awk" <<\_ACAWK ||
067d23c9
KY
30571BEGIN {
30572_ACEOF
30573
30574# Transform confdefs.h into an awk script `defines.awk', embedded as
30575# here-document in config.status, that substitutes the proper values into
30576# config.h.in to produce config.h.
30577
30578# Create a delimiter string that does not exist in confdefs.h, to ease
30579# handling of long lines.
30580ac_delim='%!_!# '
30581for ac_last_try in false false :; do
a9bec17c
GM
30582 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
30583 if test -z "$ac_t"; then
067d23c9
KY
30584 break
30585 elif $ac_last_try; then
a9bec17c 30586 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
067d23c9
KY
30587 else
30588 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
30589 fi
30590done
30591
30592# For the awk script, D is an array of macro values keyed by name,
30593# likewise P contains macro parameters if any. Preserve backslash
30594# newline sequences.
30595
30596ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
30597sed -n '
30598s/.\{148\}/&'"$ac_delim"'/g
30599t rset
30600:rset
30601s/^[ ]*#[ ]*define[ ][ ]*/ /
30602t def
30603d
30604:def
30605s/\\$//
30606t bsnl
30607s/["\\]/\\&/g
30608s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
30609D["\1"]=" \3"/p
30610s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
30611d
30612:bsnl
30613s/["\\]/\\&/g
30614s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
30615D["\1"]=" \3\\\\\\n"\\/p
30616t cont
30617s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
30618t cont
30619d
30620:cont
30621n
30622s/.\{148\}/&'"$ac_delim"'/g
30623t clear
30624:clear
30625s/\\$//
30626t bsnlc
30627s/["\\]/\\&/g; s/^/"/; s/$/"/p
30628d
30629:bsnlc
30630s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
30631b cont
30632' <confdefs.h | sed '
30633s/'"$ac_delim"'/"\\\
30634"/g' >>$CONFIG_STATUS || ac_write_fail=1
30635
30636cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30637 for (key in D) D_is_set[key] = 1
30638 FS = "\a"
30639}
30640/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
30641 line = \$ 0
30642 split(line, arg, " ")
30643 if (arg[1] == "#") {
30644 defundef = arg[2]
30645 mac1 = arg[3]
30646 } else {
30647 defundef = substr(arg[1], 2)
30648 mac1 = arg[2]
30649 }
30650 split(mac1, mac2, "(") #)
30651 macro = mac2[1]
30652 prefix = substr(line, 1, index(line, defundef) - 1)
30653 if (D_is_set[macro]) {
30654 # Preserve the white space surrounding the "#".
30655 print prefix "define", macro P[macro] D[macro]
30656 next
30657 } else {
30658 # Replace #undef with comments. This is necessary, for example,
30659 # in the case of _POSIX_SOURCE, which is predefined and required
30660 # on some systems where configure will not decide to define it.
30661 if (defundef == "undef") {
30662 print "/*", prefix defundef, macro, "*/"
30663 next
30664 }
30665 }
30666}
30667{ print }
30668_ACAWK
30669_ACEOF
30670cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
a9bec17c 30671 as_fn_error "could not setup config headers machinery" "$LINENO" 5
067d23c9
KY
30672fi # test -n "$CONFIG_HEADERS"
30673
30674
30675eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
30676shift
30677for ac_tag
30678do
30679 case $ac_tag in
30680 :[FHLC]) ac_mode=$ac_tag; continue;;
30681 esac
30682 case $ac_mode$ac_tag in
30683 :[FHL]*:*);;
a9bec17c 30684 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
067d23c9
KY
30685 :[FH]-) ac_tag=-:-;;
30686 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
30687 esac
30688 ac_save_IFS=$IFS
30689 IFS=:
30690 set x $ac_tag
30691 IFS=$ac_save_IFS
30692 shift
30693 ac_file=$1
30694 shift
30695
30696 case $ac_mode in
30697 :L) ac_source=$1;;
30698 :[FH])
30699 ac_file_inputs=
30700 for ac_f
30701 do
30702 case $ac_f in
a9bec17c 30703 -) ac_f="$tmp/stdin";;
067d23c9
KY
30704 *) # Look for the file first in the build tree, then in the source tree
30705 # (if the path is not absolute). The absolute path cannot be DOS-style,
30706 # because $ac_f cannot contain `:'.
30707 test -f "$ac_f" ||
30708 case $ac_f in
30709 [\\/$]*) false;;
30710 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
30711 esac ||
a9bec17c 30712 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
067d23c9
KY
30713 esac
30714 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
30715 as_fn_append ac_file_inputs " '$ac_f'"
30716 done
30717
30718 # Let's still pretend it is `configure' which instantiates (i.e., don't
30719 # use $as_me), people would be surprised to read:
30720 # /* config.h. Generated by config.status. */
30721 configure_input='Generated from '`
30722 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
30723 `' by configure.'
30724 if test x"$ac_file" != x-; then
30725 configure_input="$ac_file. $configure_input"
30726 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
30727$as_echo "$as_me: creating $ac_file" >&6;}
30728 fi
30729 # Neutralize special characters interpreted by sed in replacement strings.
30730 case $configure_input in #(
30731 *\&* | *\|* | *\\* )
30732 ac_sed_conf_input=`$as_echo "$configure_input" |
30733 sed 's/[\\\\&|]/\\\\&/g'`;; #(
30734 *) ac_sed_conf_input=$configure_input;;
30735 esac
30736
30737 case $ac_tag in
a9bec17c
GM
30738 *:-:* | *:-) cat >"$tmp/stdin" \
30739 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
067d23c9
KY
30740 esac
30741 ;;
30742 esac
30743
30744 ac_dir=`$as_dirname -- "$ac_file" ||
30745$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30746 X"$ac_file" : 'X\(//\)[^/]' \| \
30747 X"$ac_file" : 'X\(//\)$' \| \
30748 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
30749$as_echo X"$ac_file" |
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'`
30767 as_dir="$ac_dir"; as_fn_mkdir_p
30768 ac_builddir=.
30769
30770case "$ac_dir" in
30771.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
30772*)
30773 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
30774 # A ".." for each directory in $ac_dir_suffix.
30775 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
30776 case $ac_top_builddir_sub in
30777 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
30778 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
30779 esac ;;
30780esac
30781ac_abs_top_builddir=$ac_pwd
30782ac_abs_builddir=$ac_pwd$ac_dir_suffix
30783# for backward compatibility:
30784ac_top_builddir=$ac_top_build_prefix
30785
30786case $srcdir in
30787 .) # We are building in place.
30788 ac_srcdir=.
30789 ac_top_srcdir=$ac_top_builddir_sub
30790 ac_abs_top_srcdir=$ac_pwd ;;
30791 [\\/]* | ?:[\\/]* ) # Absolute name.
30792 ac_srcdir=$srcdir$ac_dir_suffix;
30793 ac_top_srcdir=$srcdir
30794 ac_abs_top_srcdir=$srcdir ;;
30795 *) # Relative name.
30796 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
30797 ac_top_srcdir=$ac_top_build_prefix$srcdir
30798 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
30799esac
30800ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
30801
30802
30803 case $ac_mode in
30804 :F)
30805 #
30806 # CONFIG_FILE
30807 #
30808
30809 case $INSTALL in
30810 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
30811 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
30812 esac
743c80a7
PE
30813 ac_MKDIR_P=$MKDIR_P
30814 case $MKDIR_P in
30815 [\\/$]* | ?:[\\/]* ) ;;
30816 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
30817 esac
067d23c9
KY
30818_ACEOF
30819
30820cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30821# If the template does not know about datarootdir, expand it.
30822# FIXME: This hack should be removed a few years after 2.60.
30823ac_datarootdir_hack=; ac_datarootdir_seen=
30824ac_sed_dataroot='
30825/datarootdir/ {
30826 p
30827 q
30828}
30829/@datadir@/p
30830/@docdir@/p
30831/@infodir@/p
30832/@localedir@/p
30833/@mandir@/p'
30834case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
30835*datarootdir*) ac_datarootdir_seen=yes;;
30836*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
30837 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
30838$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
30839_ACEOF
30840cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30841 ac_datarootdir_hack='
30842 s&@datadir@&$datadir&g
30843 s&@docdir@&$docdir&g
30844 s&@infodir@&$infodir&g
30845 s&@localedir@&$localedir&g
30846 s&@mandir@&$mandir&g
30847 s&\\\${datarootdir}&$datarootdir&g' ;;
30848esac
30849_ACEOF
30850
30851# Neutralize VPATH when `$srcdir' = `.'.
30852# Shell code in configure.ac might set extrasub.
30853# FIXME: do we really want to maintain this feature?
30854cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30855ac_sed_extra="$ac_vpsub
30856$extrasub
30857_ACEOF
30858cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30859:t
30860/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
30861s|@configure_input@|$ac_sed_conf_input|;t t
30862s&@top_builddir@&$ac_top_builddir_sub&;t t
30863s&@top_build_prefix@&$ac_top_build_prefix&;t t
30864s&@srcdir@&$ac_srcdir&;t t
30865s&@abs_srcdir@&$ac_abs_srcdir&;t t
30866s&@top_srcdir@&$ac_top_srcdir&;t t
30867s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
30868s&@builddir@&$ac_builddir&;t t
30869s&@abs_builddir@&$ac_abs_builddir&;t t
30870s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
30871s&@INSTALL@&$ac_INSTALL&;t t
743c80a7 30872s&@MKDIR_P@&$ac_MKDIR_P&;t t
067d23c9
KY
30873$ac_datarootdir_hack
30874"
30875eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
30876if $ac_cs_awk_getline; then
a9bec17c 30877 $AWK -f "$tmp/subs.awk"
067d23c9 30878else
a9bec17c
GM
30879 $AWK -f "$tmp/subs.awk" | $SHELL
30880fi >$tmp/out \
30881 || as_fn_error "could not create $ac_file" "$LINENO" 5
067d23c9
KY
30882
30883test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
a9bec17c
GM
30884 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
30885 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
067d23c9 30886 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
a9bec17c 30887which seems to be undefined. Please make sure it is defined." >&5
067d23c9 30888$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
a9bec17c 30889which seems to be undefined. Please make sure it is defined." >&2;}
067d23c9 30890
a9bec17c 30891 rm -f "$tmp/stdin"
067d23c9 30892 case $ac_file in
a9bec17c
GM
30893 -) cat "$tmp/out" && rm -f "$tmp/out";;
30894 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
067d23c9 30895 esac \
a9bec17c 30896 || as_fn_error "could not create $ac_file" "$LINENO" 5
067d23c9
KY
30897 ;;
30898 :H)
30899 #
30900 # CONFIG_HEADER
30901 #
30902 if test x"$ac_file" != x-; then
30903 {
30904 $as_echo "/* $configure_input */" \
a9bec17c
GM
30905 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
30906 } >"$tmp/config.h" \
30907 || as_fn_error "could not create $ac_file" "$LINENO" 5
30908 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
067d23c9
KY
30909 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
30910$as_echo "$as_me: $ac_file is unchanged" >&6;}
30911 else
30912 rm -f "$ac_file"
a9bec17c
GM
30913 mv "$tmp/config.h" "$ac_file" \
30914 || as_fn_error "could not create $ac_file" "$LINENO" 5
067d23c9
KY
30915 fi
30916 else
30917 $as_echo "/* $configure_input */" \
a9bec17c
GM
30918 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
30919 || as_fn_error "could not create -" "$LINENO" 5
067d23c9 30920 fi
743c80a7
PE
30921# Compute "$ac_file"'s index in $config_headers.
30922_am_arg="$ac_file"
30923_am_stamp_count=1
30924for _am_header in $config_headers :; do
30925 case $_am_header in
30926 $_am_arg | $_am_arg:* )
30927 break ;;
30928 * )
30929 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
30930 esac
30931done
30932echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
30933$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30934 X"$_am_arg" : 'X\(//\)[^/]' \| \
30935 X"$_am_arg" : 'X\(//\)$' \| \
30936 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
30937$as_echo X"$_am_arg" |
30938 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
30939 s//\1/
30940 q
30941 }
30942 /^X\(\/\/\)[^/].*/{
30943 s//\1/
30944 q
30945 }
30946 /^X\(\/\/\)$/{
30947 s//\1/
30948 q
30949 }
30950 /^X\(\/\).*/{
30951 s//\1/
30952 q
30953 }
30954 s/.*/./; q'`/stamp-h$_am_stamp_count
067d23c9
KY
30955 ;;
30956
30957 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
30958$as_echo "$as_me: executing $ac_file commands" >&6;}
30959 ;;
30960 esac
30961
30962
30963 case $ac_file$ac_mode in
743c80a7
PE
30964 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
30965 # Autoconf 2.62 quotes --file arguments for eval, but not when files
30966 # are listed without --file. Let's play safe and only enable the eval
30967 # if we detect the quoting.
30968 case $CONFIG_FILES in
30969 *\'*) eval set x "$CONFIG_FILES" ;;
30970 *) set x $CONFIG_FILES ;;
30971 esac
30972 shift
30973 for mf
30974 do
30975 # Strip MF so we end up with the name of the file.
30976 mf=`echo "$mf" | sed -e 's/:.*$//'`
30977 # Check whether this is an Automake generated Makefile or not.
30978 # We used to match only the files named `Makefile.in', but
30979 # some people rename them; so instead we look at the file content.
30980 # Grep'ing the first line is not enough: some people post-process
30981 # each Makefile.in and add a new line on top of each file to say so.
30982 # Grep'ing the whole file is not good either: AIX grep has a line
30983 # limit of 2048, but all sed's we know have understand at least 4000.
30984 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
30985 dirpart=`$as_dirname -- "$mf" ||
30986$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30987 X"$mf" : 'X\(//\)[^/]' \| \
30988 X"$mf" : 'X\(//\)$' \| \
30989 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
30990$as_echo X"$mf" |
30991 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
30992 s//\1/
30993 q
30994 }
30995 /^X\(\/\/\)[^/].*/{
30996 s//\1/
30997 q
30998 }
30999 /^X\(\/\/\)$/{
31000 s//\1/
31001 q
31002 }
31003 /^X\(\/\).*/{
31004 s//\1/
31005 q
31006 }
31007 s/.*/./; q'`
31008 else
31009 continue
31010 fi
31011 # Extract the definition of DEPDIR, am__include, and am__quote
31012 # from the Makefile without running `make'.
31013 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
31014 test -z "$DEPDIR" && continue
31015 am__include=`sed -n 's/^am__include = //p' < "$mf"`
31016 test -z "am__include" && continue
31017 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
31018 # When using ansi2knr, U may be empty or an underscore; expand it
31019 U=`sed -n 's/^U = //p' < "$mf"`
31020 # Find all dependency output files, they are included files with
31021 # $(DEPDIR) in their names. We invoke sed twice because it is the
31022 # simplest approach to changing $(DEPDIR) to its actual value in the
31023 # expansion.
31024 for file in `sed -n "
31025 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
31026 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
31027 # Make sure the directory exists.
31028 test -f "$dirpart/$file" && continue
31029 fdir=`$as_dirname -- "$file" ||
31030$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
31031 X"$file" : 'X\(//\)[^/]' \| \
31032 X"$file" : 'X\(//\)$' \| \
31033 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
31034$as_echo X"$file" |
31035 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
31036 s//\1/
31037 q
31038 }
31039 /^X\(\/\/\)[^/].*/{
31040 s//\1/
31041 q
31042 }
31043 /^X\(\/\/\)$/{
31044 s//\1/
31045 q
31046 }
31047 /^X\(\/\).*/{
31048 s//\1/
31049 q
31050 }
31051 s/.*/./; q'`
31052 as_dir=$dirpart/$fdir; as_fn_mkdir_p
31053 # echo "creating $dirpart/$file"
31054 echo '# dummy' > "$dirpart/$file"
31055 done
31056 done
31057}
31058 ;;
4c15c0f2 31059 "src/epaths.h":C)
7c61eaab
GM
31060if test "${opsys}" = "mingw32"; then
31061 ${MAKE-make} MAKEFILE_NAME=do-not-make-Makefile epaths-force-w32
31062else
31063 ${MAKE-make} MAKEFILE_NAME=do-not-make-Makefile epaths-force
31064fi
9411886d 31065 ;;
4c15c0f2 31066 "src/.gdbinit":C)
b5591ebb 31067if test ! -f src/.gdbinit && test -f "$srcdir/src/.gdbinit"; then
b5591ebb 31068 echo "source $srcdir/src/.gdbinit" > src/.gdbinit
067d23c9 31069fi
067d23c9
KY
31070 ;;
31071
31072 esac
31073done # for ac_tag
31074
31075
31076as_fn_exit 0
31077_ACEOF
31078ac_clean_files=$ac_clean_files_save
31079
31080test $ac_write_fail = 0 ||
a9bec17c 31081 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
067d23c9
KY
31082
31083
31084# configure is writing to config.log, and then calls config.status.
31085# config.status does its own redirection, appending to config.log.
31086# Unfortunately, on DOS this fails, as config.log is still kept open
31087# by configure, so config.status won't be able to write to it; its
31088# output is simply discarded. So we exec the FD to /dev/null,
31089# effectively closing config.log, so it can be properly (re)opened and
31090# appended to by config.status. When coming back to configure, we
31091# need to make the FD available again.
31092if test "$no_create" != yes; then
31093 ac_cs_success=:
31094 ac_config_status_args=
31095 test "$silent" = yes &&
31096 ac_config_status_args="$ac_config_status_args --quiet"
31097 exec 5>/dev/null
31098 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
31099 exec 5>>config.log
31100 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
31101 # would make configure fail if this is the last instruction.
a9bec17c 31102 $ac_cs_success || as_fn_exit $?
067d23c9
KY
31103fi
31104if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
31105 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
31106$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
31107fi
31108