Improve commentary.
[bpt/emacs.git] / autogen / configure
CommitLineData
067d23c9
KY
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
c574bc34 3# Generated by GNU Autoconf 2.65 for emacs 24.3.50.
067d23c9
KY
4#
5#
6# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
a9bec17c
GM
7# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
8# Inc.
067d23c9
KY
9#
10#
11# This configure script is free software; the Free Software Foundation
12# gives unlimited permission to copy, distribute and modify it.
13## -------------------- ##
14## M4sh Initialization. ##
15## -------------------- ##
16
17# Be more Bourne compatible
18DUALCASE=1; export DUALCASE # for MKS sh
19if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
20 emulate sh
21 NULLCMD=:
22 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
23 # is contrary to our usage. Disable this feature.
24 alias -g '${1+"$@"}'='"$@"'
25 setopt NO_GLOB_SUBST
26else
27 case `(set -o) 2>/dev/null` in #(
28 *posix*) :
29 set -o posix ;; #(
30 *) :
31 ;;
32esac
33fi
34
35
36as_nl='
37'
38export as_nl
39# Printing a long string crashes Solaris 7 /usr/bin/printf.
40as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43# Prefer a ksh shell builtin over an external printf program on Solaris,
44# but without wasting forks for bash or zsh.
45if test -z "$BASH_VERSION$ZSH_VERSION" \
46 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47 as_echo='print -r --'
48 as_echo_n='print -rn --'
49elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50 as_echo='printf %s\n'
51 as_echo_n='printf %s'
52else
53 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55 as_echo_n='/usr/ucb/echo -n'
56 else
57 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58 as_echo_n_body='eval
59 arg=$1;
60 case $arg in #(
61 *"$as_nl"*)
62 expr "X$arg" : "X\\(.*\\)$as_nl";
63 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64 esac;
65 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66 '
67 export as_echo_n_body
68 as_echo_n='sh -c $as_echo_n_body as_echo'
69 fi
70 export as_echo_body
71 as_echo='sh -c $as_echo_body as_echo'
72fi
73
74# The user is always right.
75if test "${PATH_SEPARATOR+set}" != set; then
76 PATH_SEPARATOR=:
77 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79 PATH_SEPARATOR=';'
80 }
81fi
82
83
84# IFS
85# We need space, tab and new line, in precisely that order. Quoting is
86# there to prevent editors from complaining about space-tab.
87# (If _AS_PATH_WALK were called with IFS unset, it would disable word
88# splitting by setting IFS to empty value.)
89IFS=" "" $as_nl"
90
91# Find who we are. Look in the path if we contain no directory separator.
92case $0 in #((
93 *[\\/]* ) as_myself=$0 ;;
94 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
95for as_dir in $PATH
96do
97 IFS=$as_save_IFS
98 test -z "$as_dir" && as_dir=.
99 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
100 done
101IFS=$as_save_IFS
102
103 ;;
104esac
105# We did not find ourselves, most probably we were run as `sh COMMAND'
106# in which case we are not to be found in the path.
107if test "x$as_myself" = x; then
108 as_myself=$0
109fi
110if test ! -f "$as_myself"; then
111 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
112 exit 1
113fi
114
115# Unset variables that we do not need and which cause bugs (e.g. in
116# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
117# suppresses any "Segmentation fault" message there. '((' could
118# trigger a bug in pdksh 5.2.14.
119for as_var in BASH_ENV ENV MAIL MAILPATH
120do eval test x\${$as_var+set} = xset \
121 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
122done
123PS1='$ '
124PS2='> '
125PS4='+ '
126
127# NLS nuisances.
128LC_ALL=C
129export LC_ALL
130LANGUAGE=C
131export LANGUAGE
132
133# CDPATH.
134(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
135
136if test "x$CONFIG_SHELL" = x; then
137 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
138 emulate sh
139 NULLCMD=:
140 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
141 # is contrary to our usage. Disable this feature.
142 alias -g '\${1+\"\$@\"}'='\"\$@\"'
143 setopt NO_GLOB_SUBST
144else
145 case \`(set -o) 2>/dev/null\` in #(
146 *posix*) :
147 set -o posix ;; #(
148 *) :
149 ;;
150esac
151fi
152"
153 as_required="as_fn_return () { (exit \$1); }
154as_fn_success () { as_fn_return 0; }
155as_fn_failure () { as_fn_return 1; }
156as_fn_ret_success () { return 0; }
157as_fn_ret_failure () { return 1; }
158
159exitcode=0
160as_fn_success || { exitcode=1; echo as_fn_success failed.; }
161as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
162as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
163as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
164if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
165
166else
167 exitcode=1; echo positional parameters were not saved.
168fi
169test x\$exitcode = x0 || exit 1"
170 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
171 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
172 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
173 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
174test \$(( 1 + 1 )) = 2 || exit 1"
175 if (eval "$as_required") 2>/dev/null; then :
176 as_have_required=yes
177else
178 as_have_required=no
179fi
180 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
181
182else
183 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
184as_found=false
185for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
186do
187 IFS=$as_save_IFS
188 test -z "$as_dir" && as_dir=.
189 as_found=:
190 case $as_dir in #(
191 /*)
192 for as_base in sh bash ksh sh5; do
193 # Try only shells that exist, to save several forks.
194 as_shell=$as_dir/$as_base
195 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
196 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
197 CONFIG_SHELL=$as_shell as_have_required=yes
198 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
199 break 2
200fi
201fi
202 done;;
203 esac
204 as_found=false
205done
206$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
207 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
208 CONFIG_SHELL=$SHELL as_have_required=yes
209fi; }
210IFS=$as_save_IFS
211
212
213 if test "x$CONFIG_SHELL" != x; then :
214 # We cannot yet assume a decent shell, so we have to provide a
215 # neutralization value for shells without unset; and this also
216 # works around shells that cannot unset nonexistent variables.
217 BASH_ENV=/dev/null
218 ENV=/dev/null
219 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
220 export CONFIG_SHELL
a9bec17c 221 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
067d23c9
KY
222fi
223
224 if test x$as_have_required = xno; then :
225 $as_echo "$0: This script requires a shell more modern than all"
226 $as_echo "$0: the shells that I found on your system."
227 if test x${ZSH_VERSION+set} = xset ; then
228 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
229 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
230 else
231 $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
232$0: including any error possibly output before this
233$0: message. Then install a modern shell, or manually run
234$0: the script under such a shell if you do have one."
235 fi
236 exit 1
237fi
238fi
239fi
240SHELL=${CONFIG_SHELL-/bin/sh}
241export SHELL
242# Unset more variables known to interfere with behavior of common tools.
243CLICOLOR_FORCE= GREP_OPTIONS=
244unset CLICOLOR_FORCE GREP_OPTIONS
245
246## --------------------- ##
247## M4sh Shell Functions. ##
248## --------------------- ##
249# as_fn_unset VAR
250# ---------------
251# Portably unset VAR.
252as_fn_unset ()
253{
254 { eval $1=; unset $1;}
255}
256as_unset=as_fn_unset
257
258# as_fn_set_status STATUS
259# -----------------------
260# Set $? to STATUS, without forking.
261as_fn_set_status ()
262{
263 return $1
264} # as_fn_set_status
265
266# as_fn_exit STATUS
267# -----------------
268# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
269as_fn_exit ()
270{
271 set +e
272 as_fn_set_status $1
273 exit $1
274} # as_fn_exit
275
276# as_fn_mkdir_p
277# -------------
278# Create "$as_dir" as a directory, including parents if necessary.
279as_fn_mkdir_p ()
280{
281
282 case $as_dir in #(
283 -*) as_dir=./$as_dir;;
284 esac
285 test -d "$as_dir" || eval $as_mkdir_p || {
286 as_dirs=
287 while :; do
288 case $as_dir in #(
289 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
290 *) as_qdir=$as_dir;;
291 esac
292 as_dirs="'$as_qdir' $as_dirs"
293 as_dir=`$as_dirname -- "$as_dir" ||
294$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
295 X"$as_dir" : 'X\(//\)[^/]' \| \
296 X"$as_dir" : 'X\(//\)$' \| \
297 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
298$as_echo X"$as_dir" |
299 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
300 s//\1/
301 q
302 }
303 /^X\(\/\/\)[^/].*/{
304 s//\1/
305 q
306 }
307 /^X\(\/\/\)$/{
308 s//\1/
309 q
310 }
311 /^X\(\/\).*/{
312 s//\1/
313 q
314 }
315 s/.*/./; q'`
316 test -d "$as_dir" && break
317 done
318 test -z "$as_dirs" || eval "mkdir $as_dirs"
a9bec17c 319 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
067d23c9
KY
320
321
322} # as_fn_mkdir_p
323# as_fn_append VAR VALUE
324# ----------------------
325# Append the text in VALUE to the end of the definition contained in VAR. Take
326# advantage of any shell optimizations that allow amortized linear growth over
327# repeated appends, instead of the typical quadratic growth present in naive
328# implementations.
329if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
330 eval 'as_fn_append ()
331 {
332 eval $1+=\$2
333 }'
334else
335 as_fn_append ()
336 {
337 eval $1=\$$1\$2
338 }
339fi # as_fn_append
340
341# as_fn_arith ARG...
342# ------------------
343# Perform arithmetic evaluation on the ARGs, and store the result in the
344# global $as_val. Take advantage of shells that can avoid forks. The arguments
345# must be portable across $(()) and expr.
346if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
347 eval 'as_fn_arith ()
348 {
349 as_val=$(( $* ))
350 }'
351else
352 as_fn_arith ()
353 {
354 as_val=`expr "$@" || test $? -eq 1`
355 }
356fi # as_fn_arith
357
358
a9bec17c
GM
359# as_fn_error ERROR [LINENO LOG_FD]
360# ---------------------------------
067d23c9
KY
361# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
362# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
a9bec17c 363# script with status $?, using 1 if that was 0.
067d23c9
KY
364as_fn_error ()
365{
a9bec17c
GM
366 as_status=$?; test $as_status -eq 0 && as_status=1
367 if test "$3"; then
368 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
369 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
067d23c9 370 fi
a9bec17c 371 $as_echo "$as_me: error: $1" >&2
067d23c9
KY
372 as_fn_exit $as_status
373} # as_fn_error
374
375if expr a : '\(a\)' >/dev/null 2>&1 &&
376 test "X`expr 00001 : '.*\(...\)'`" = X001; then
377 as_expr=expr
378else
379 as_expr=false
380fi
381
382if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
383 as_basename=basename
384else
385 as_basename=false
386fi
387
388if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
389 as_dirname=dirname
390else
391 as_dirname=false
392fi
393
394as_me=`$as_basename -- "$0" ||
395$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
396 X"$0" : 'X\(//\)$' \| \
397 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
398$as_echo X/"$0" |
399 sed '/^.*\/\([^/][^/]*\)\/*$/{
400 s//\1/
401 q
402 }
403 /^X\/\(\/\/\)$/{
404 s//\1/
405 q
406 }
407 /^X\/\(\/\).*/{
408 s//\1/
409 q
410 }
411 s/.*/./; q'`
412
413# Avoid depending upon Character Ranges.
414as_cr_letters='abcdefghijklmnopqrstuvwxyz'
415as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
416as_cr_Letters=$as_cr_letters$as_cr_LETTERS
417as_cr_digits='0123456789'
418as_cr_alnum=$as_cr_Letters$as_cr_digits
419
420
421 as_lineno_1=$LINENO as_lineno_1a=$LINENO
422 as_lineno_2=$LINENO as_lineno_2a=$LINENO
423 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
424 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
425 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
426 sed -n '
427 p
428 /[$]LINENO/=
429 ' <$as_myself |
430 sed '
431 s/[$]LINENO.*/&-/
432 t lineno
433 b
434 :lineno
435 N
436 :loop
437 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
438 t loop
439 s/-\n.*//
440 ' >$as_me.lineno &&
441 chmod +x "$as_me.lineno" ||
442 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
443
444 # Don't try to exec as it changes $[0], causing all sort of problems
445 # (the dirname of $[0] is not the place where we might find the
446 # original and so on. Autoconf is especially sensitive to this).
447 . "./$as_me.lineno"
448 # Exit status is that of the last command.
449 exit
450}
451
452ECHO_C= ECHO_N= ECHO_T=
453case `echo -n x` in #(((((
454-n*)
455 case `echo 'xy\c'` in
456 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
457 xy) ECHO_C='\c';;
458 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
459 ECHO_T=' ';;
460 esac;;
461*)
462 ECHO_N='-n';;
463esac
464
465rm -f conf$$ conf$$.exe conf$$.file
466if test -d conf$$.dir; then
467 rm -f conf$$.dir/conf$$.file
468else
469 rm -f conf$$.dir
470 mkdir conf$$.dir 2>/dev/null
471fi
472if (echo >conf$$.file) 2>/dev/null; then
473 if ln -s conf$$.file conf$$ 2>/dev/null; then
474 as_ln_s='ln -s'
475 # ... but there are two gotchas:
476 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
477 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
478 # In both cases, we have to default to `cp -p'.
479 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
480 as_ln_s='cp -p'
481 elif ln conf$$.file conf$$ 2>/dev/null; then
482 as_ln_s=ln
483 else
484 as_ln_s='cp -p'
485 fi
486else
487 as_ln_s='cp -p'
488fi
489rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
490rmdir conf$$.dir 2>/dev/null
491
492if mkdir -p . 2>/dev/null; then
493 as_mkdir_p='mkdir -p "$as_dir"'
494else
495 test -d ./-p && rmdir ./-p
496 as_mkdir_p=false
497fi
498
499if test -x / >/dev/null 2>&1; then
500 as_test_x='test -x'
501else
502 if ls -dL / >/dev/null 2>&1; then
503 as_ls_L_option=L
504 else
505 as_ls_L_option=
506 fi
507 as_test_x='
508 eval sh -c '\''
509 if test -d "$1"; then
510 test -d "$1/.";
511 else
512 case $1 in #(
513 -*)set "./$1";;
514 esac;
515 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
516 ???[sx]*):;;*)false;;esac;fi
517 '\'' sh
518 '
519fi
520as_executable_p=$as_test_x
521
522# Sed expression to map a string onto a valid CPP name.
523as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
524
525# Sed expression to map a string onto a valid variable name.
526as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
527
528
529test -n "$DJDIR" || exec 7<&0 </dev/null
530exec 6>&1
531
532# Name of the host.
a9bec17c 533# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
067d23c9
KY
534# so uname gets run too.
535ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
536
537#
538# Initializations.
539#
540ac_default_prefix=/usr/local
541ac_clean_files=
542ac_config_libobj_dir=.
543LIBOBJS=
544cross_compiling=no
545subdirs=
546MFLAGS=
547MAKEFLAGS=
548
549# Identity of this package.
550PACKAGE_NAME='emacs'
551PACKAGE_TARNAME='emacs'
c574bc34
GM
552PACKAGE_VERSION='24.3.50'
553PACKAGE_STRING='emacs 24.3.50'
067d23c9
KY
554PACKAGE_BUGREPORT=''
555PACKAGE_URL=''
556
557ac_unique_file="src/lisp.h"
558# Factoring default headers for most tests.
559ac_includes_default="\
560#include <stdio.h>
561#ifdef HAVE_SYS_TYPES_H
562# include <sys/types.h>
563#endif
564#ifdef HAVE_SYS_STAT_H
565# include <sys/stat.h>
566#endif
567#ifdef STDC_HEADERS
568# include <stdlib.h>
569# include <stddef.h>
570#else
571# ifdef HAVE_STDLIB_H
572# include <stdlib.h>
573# endif
574#endif
575#ifdef HAVE_STRING_H
576# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
577# include <memory.h>
578# endif
579# include <string.h>
580#endif
581#ifdef HAVE_STRINGS_H
582# include <strings.h>
583#endif
584#ifdef HAVE_INTTYPES_H
585# include <inttypes.h>
586#endif
587#ifdef HAVE_STDINT_H
588# include <stdint.h>
589#endif
590#ifdef HAVE_UNISTD_H
591# include <unistd.h>
592#endif"
593
f199cab1 594ac_header_list=
5476a9a4 595ac_func_list=
e275c824 596gl_getopt_required=POSIX
7e723570 597gl_getopt_required=POSIX
743c80a7
PE
598ac_subst_vars='gltests_LTLIBOBJS
599gltests_LIBOBJS
600gl_LTLIBOBJS
601gl_LIBOBJS
602am__EXEEXT_FALSE
603am__EXEEXT_TRUE
604LTLIBOBJS
1f5d53eb 605LIBOBJS
73b78882 606SUBDIR_MAKEFILES_IN
2f342695 607ns_check_file
42dcba54 608WINDOW_SYSTEM_OBJ
7c61eaab
GM
609EMACS_HEAPSIZE
610TEMACS_POST_LINK
611ADDSECTION
067d23c9 612LD_SWITCH_SYSTEM_TEMACS
743c80a7
PE
613LIBGNU_LTLIBDEPS
614LIBGNU_LIBDEPS
615gltests_WITNESS
710f5812
GM
616gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_FALSE
617gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_TRUE
e412eb97
GM
618gl_GNULIB_ENABLED_tempname_FALSE
619gl_GNULIB_ENABLED_tempname_TRUE
6d153f56
GM
620gl_GNULIB_ENABLED_strtoull_FALSE
621gl_GNULIB_ENABLED_strtoull_TRUE
3e0be4ab
GM
622gl_GNULIB_ENABLED_strtoll_FALSE
623gl_GNULIB_ENABLED_strtoll_TRUE
6d153f56
GM
624gl_GNULIB_ENABLED_stat_FALSE
625gl_GNULIB_ENABLED_stat_TRUE
e412eb97
GM
626gl_GNULIB_ENABLED_secure_getenv_FALSE
627gl_GNULIB_ENABLED_secure_getenv_TRUE
710f5812
GM
628gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_FALSE
629gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_TRUE
a0a61e58
GM
630gl_GNULIB_ENABLED_pathmax_FALSE
631gl_GNULIB_ENABLED_pathmax_TRUE
d7ad186c
GM
632gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_FALSE
633gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_TRUE
710f5812
GM
634gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_FALSE
635gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_TRUE
6d153f56
GM
636gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE
637gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE
710f5812
GM
638gl_GNULIB_ENABLED_getgroups_FALSE
639gl_GNULIB_ENABLED_getgroups_TRUE
0cdca42a
GM
640gl_GNULIB_ENABLED_getdtablesize_FALSE
641gl_GNULIB_ENABLED_getdtablesize_TRUE
710f5812
GM
642gl_GNULIB_ENABLED_euidaccess_FALSE
643gl_GNULIB_ENABLED_euidaccess_TRUE
6d153f56
GM
644gl_GNULIB_ENABLED_dosname_FALSE
645gl_GNULIB_ENABLED_dosname_TRUE
d7ad186c
GM
646gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_FALSE
647gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_TRUE
6d153f56
GM
648LTLIBINTL
649LIBINTL
710f5812 650LIB_EACCESS
f199cab1 651WINDOWS_64_BIT_OFF_T
e275c824
PE
652HAVE_UNISTD_H
653NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
654NEXT_UNISTD_H
f077f61d 655LIB_TIMER_TIME
1fd182f0
PE
656PTHREAD_H_DEFINES_STRUCT_TIMESPEC
657SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
658TIME_H_DEFINES_STRUCT_TIMESPEC
659NEXT_AS_FIRST_DIRECTIVE_TIME_H
660NEXT_TIME_H
0eb775a3 661WINDOWS_64_BIT_ST_SIZE
5fa4ac76
PE
662NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
663NEXT_SYS_STAT_H
283c7aed
GM
664NEXT_AS_FIRST_DIRECTIVE_STRING_H
665NEXT_STRING_H
1f5d53eb
PE
666NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
667NEXT_STDLIB_H
6ad6792b
GM
668NEXT_AS_FIRST_DIRECTIVE_STDIO_H
669NEXT_STDIO_H
670REPLACE_VSPRINTF
671REPLACE_VSNPRINTF
672REPLACE_VPRINTF
673REPLACE_VFPRINTF
674REPLACE_VDPRINTF
675REPLACE_VASPRINTF
676REPLACE_TMPFILE
677REPLACE_STDIO_WRITE_FUNCS
ca36e0ff 678REPLACE_STDIO_READ_FUNCS
6ad6792b
GM
679REPLACE_SPRINTF
680REPLACE_SNPRINTF
681REPLACE_RENAMEAT
682REPLACE_RENAME
683REPLACE_REMOVE
684REPLACE_PRINTF
685REPLACE_POPEN
686REPLACE_PERROR
687REPLACE_OBSTACK_PRINTF
688REPLACE_GETLINE
689REPLACE_GETDELIM
690REPLACE_FTELLO
691REPLACE_FTELL
692REPLACE_FSEEKO
693REPLACE_FSEEK
694REPLACE_FREOPEN
695REPLACE_FPURGE
696REPLACE_FPRINTF
697REPLACE_FOPEN
698REPLACE_FFLUSH
2b1928b8 699REPLACE_FDOPEN
6ad6792b
GM
700REPLACE_FCLOSE
701REPLACE_DPRINTF
702HAVE_VDPRINTF
703HAVE_VASPRINTF
704HAVE_RENAMEAT
2b1928b8
GM
705HAVE_POPEN
706HAVE_PCLOSE
6ad6792b
GM
707HAVE_FTELLO
708HAVE_FSEEKO
709HAVE_DPRINTF
710HAVE_DECL_VSNPRINTF
711HAVE_DECL_SNPRINTF
712HAVE_DECL_OBSTACK_PRINTF
713HAVE_DECL_GETLINE
714HAVE_DECL_GETDELIM
715HAVE_DECL_FTELLO
716HAVE_DECL_FSEEKO
717HAVE_DECL_FPURGE
718GNULIB_VSPRINTF_POSIX
719GNULIB_VSNPRINTF
720GNULIB_VPRINTF_POSIX
721GNULIB_VPRINTF
722GNULIB_VFPRINTF_POSIX
723GNULIB_VFPRINTF
724GNULIB_VDPRINTF
ca36e0ff
GM
725GNULIB_VSCANF
726GNULIB_VFSCANF
6ad6792b
GM
727GNULIB_VASPRINTF
728GNULIB_TMPFILE
729GNULIB_STDIO_H_SIGPIPE
ca36e0ff 730GNULIB_STDIO_H_NONBLOCKING
6ad6792b
GM
731GNULIB_SPRINTF_POSIX
732GNULIB_SNPRINTF
ca36e0ff 733GNULIB_SCANF
6ad6792b
GM
734GNULIB_RENAMEAT
735GNULIB_RENAME
736GNULIB_REMOVE
737GNULIB_PUTS
738GNULIB_PUTCHAR
739GNULIB_PUTC
740GNULIB_PRINTF_POSIX
741GNULIB_PRINTF
742GNULIB_POPEN
743GNULIB_PERROR
2b1928b8 744GNULIB_PCLOSE
6ad6792b
GM
745GNULIB_OBSTACK_PRINTF_POSIX
746GNULIB_OBSTACK_PRINTF
747GNULIB_GETLINE
748GNULIB_GETDELIM
ca36e0ff
GM
749GNULIB_GETCHAR
750GNULIB_GETC
6ad6792b
GM
751GNULIB_FWRITE
752GNULIB_FTELLO
753GNULIB_FTELL
754GNULIB_FSEEKO
755GNULIB_FSEEK
ca36e0ff 756GNULIB_FSCANF
6ad6792b 757GNULIB_FREOPEN
ca36e0ff 758GNULIB_FREAD
6ad6792b
GM
759GNULIB_FPUTS
760GNULIB_FPUTC
761GNULIB_FPURGE
762GNULIB_FPRINTF_POSIX
763GNULIB_FPRINTF
764GNULIB_FOPEN
ca36e0ff
GM
765GNULIB_FGETS
766GNULIB_FGETC
6ad6792b 767GNULIB_FFLUSH
2b1928b8 768GNULIB_FDOPEN
6ad6792b
GM
769GNULIB_FCLOSE
770GNULIB_DPRINTF
1fd182f0
PE
771NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
772NEXT_STDDEF_H
6c051bab
GM
773GL_GENERATE_STDDEF_H_FALSE
774GL_GENERATE_STDDEF_H_TRUE
1fd182f0
PE
775STDDEF_H
776HAVE_WCHAR_T
777REPLACE_NULL
16c3e636 778HAVE__BOOL
6c051bab
GM
779GL_GENERATE_STDBOOL_H_FALSE
780GL_GENERATE_STDBOOL_H_TRUE
16c3e636 781STDBOOL_H
6d153f56
GM
782GL_GENERATE_STDARG_H_FALSE
783GL_GENERATE_STDARG_H_TRUE
784STDARG_H
785NEXT_AS_FIRST_DIRECTIVE_STDARG_H
786NEXT_STDARG_H
0eb775a3
GM
787GL_GENERATE_STDALIGN_H_FALSE
788GL_GENERATE_STDALIGN_H_TRUE
789STDALIGN_H
3e0be4ab
GM
790NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H
791NEXT_SIGNAL_H
3a019ab4
GM
792USE_ACL
793LIB_ACL
0eb775a3 794LIB_PTHREAD_SIGMASK
2b1928b8 795REPLACE_RAISE
3e0be4ab
GM
796REPLACE_PTHREAD_SIGMASK
797HAVE_SIGHANDLER_T
798HAVE_TYPE_VOLATILE_SIG_ATOMIC_T
799HAVE_STRUCT_SIGACTION_SA_SIGACTION
800HAVE_SIGACTION
801HAVE_SIGINFO_T
802HAVE_SIGSET_T
2b1928b8 803HAVE_RAISE
3e0be4ab
GM
804HAVE_PTHREAD_SIGMASK
805HAVE_POSIX_SIGNALBLOCKING
806GNULIB_SIGACTION
807GNULIB_SIGPROCMASK
808GNULIB_SIGNAL_H_SIGPIPE
2b1928b8 809GNULIB_RAISE
3e0be4ab 810GNULIB_PTHREAD_SIGMASK
f199cab1
GM
811HAVE_SYS_SELECT_H
812NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H
813NEXT_SYS_SELECT_H
814REPLACE_SELECT
815REPLACE_PSELECT
816HAVE_PSELECT
817GNULIB_SELECT
818GNULIB_PSELECT
1fd182f0
PE
819REPLACE_TIMEGM
820REPLACE_NANOSLEEP
821REPLACE_MKTIME
822REPLACE_LOCALTIME_R
823HAVE_TIMEGM
824HAVE_STRPTIME
825HAVE_NANOSLEEP
826HAVE_DECL_LOCALTIME_R
827GNULIB_TIME_R
828GNULIB_TIMEGM
829GNULIB_STRPTIME
830GNULIB_NANOSLEEP
831GNULIB_MKTIME
283c7aed
GM
832UNDEFINE_STRTOK_R
833REPLACE_STRTOK_R
834REPLACE_STRSIGNAL
835REPLACE_STRNLEN
836REPLACE_STRNDUP
837REPLACE_STRNCAT
838REPLACE_STRERROR_R
839REPLACE_STRERROR
840REPLACE_STRCHRNUL
841REPLACE_STRCASESTR
842REPLACE_STRSTR
843REPLACE_STRDUP
844REPLACE_STPNCPY
845REPLACE_MEMMEM
846REPLACE_MEMCHR
847HAVE_STRVERSCMP
848HAVE_DECL_STRSIGNAL
849HAVE_DECL_STRERROR_R
850HAVE_DECL_STRTOK_R
851HAVE_STRCASESTR
852HAVE_STRSEP
853HAVE_STRPBRK
854HAVE_DECL_STRNLEN
855HAVE_DECL_STRNDUP
856HAVE_DECL_STRDUP
857HAVE_STRCHRNUL
858HAVE_STPNCPY
859HAVE_STPCPY
860HAVE_RAWMEMCHR
861HAVE_DECL_MEMRCHR
862HAVE_MEMPCPY
863HAVE_DECL_MEMMEM
864HAVE_MEMCHR
865HAVE_FFSLL
866HAVE_FFSL
867HAVE_MBSLEN
868GNULIB_STRVERSCMP
869GNULIB_STRSIGNAL
870GNULIB_STRERROR_R
871GNULIB_STRERROR
872GNULIB_MBSTOK_R
873GNULIB_MBSSEP
874GNULIB_MBSSPN
875GNULIB_MBSPBRK
876GNULIB_MBSCSPN
877GNULIB_MBSCASESTR
878GNULIB_MBSPCASECMP
879GNULIB_MBSNCASECMP
880GNULIB_MBSCASECMP
881GNULIB_MBSSTR
882GNULIB_MBSRCHR
883GNULIB_MBSCHR
884GNULIB_MBSNLEN
885GNULIB_MBSLEN
886GNULIB_STRTOK_R
887GNULIB_STRCASESTR
888GNULIB_STRSTR
889GNULIB_STRSEP
890GNULIB_STRPBRK
891GNULIB_STRNLEN
892GNULIB_STRNDUP
893GNULIB_STRNCAT
894GNULIB_STRDUP
895GNULIB_STRCHRNUL
896GNULIB_STPNCPY
897GNULIB_STPCPY
898GNULIB_RAWMEMCHR
899GNULIB_MEMRCHR
900GNULIB_MEMPCPY
901GNULIB_MEMMEM
902GNULIB_MEMCHR
903GNULIB_FFSLL
904GNULIB_FFSL
4fda9c95
GM
905NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H
906NEXT_INTTYPES_H
907UINT64_MAX_EQ_ULONG_MAX
908UINT32_MAX_LT_UINTMAX_MAX
909PRIPTR_PREFIX
910PRI_MACROS_BROKEN
911INT64_MAX_EQ_LONG_MAX
912INT32_MAX_LT_INTMAX_MAX
0eb775a3 913REPLACE_STRTOIMAX
4fda9c95
GM
914HAVE_DECL_STRTOUMAX
915HAVE_DECL_STRTOIMAX
916HAVE_DECL_IMAXDIV
917HAVE_DECL_IMAXABS
918GNULIB_STRTOUMAX
919GNULIB_STRTOIMAX
920GNULIB_IMAXDIV
921GNULIB_IMAXABS
922GL_GENERATE_STDINT_H_FALSE
923GL_GENERATE_STDINT_H_TRUE
924STDINT_H
925WINT_T_SUFFIX
926WCHAR_T_SUFFIX
927SIG_ATOMIC_T_SUFFIX
928SIZE_T_SUFFIX
929PTRDIFF_T_SUFFIX
930HAVE_SIGNED_WINT_T
931HAVE_SIGNED_WCHAR_T
932HAVE_SIGNED_SIG_ATOMIC_T
933BITSIZEOF_WINT_T
934BITSIZEOF_WCHAR_T
935BITSIZEOF_SIG_ATOMIC_T
936BITSIZEOF_SIZE_T
937BITSIZEOF_PTRDIFF_T
938APPLE_UNIVERSAL_BUILD
939HAVE_SYS_BITYPES_H
940HAVE_SYS_INTTYPES_H
941HAVE_STDINT_H
942NEXT_AS_FIRST_DIRECTIVE_STDINT_H
943NEXT_STDINT_H
944HAVE_SYS_TYPES_H
945HAVE_INTTYPES_H
946HAVE_WCHAR_H
947HAVE_UNSIGNED_LONG_LONG_INT
948HAVE_LONG_LONG_INT
f199cab1
GM
949HAVE_WINSOCK2_H
950NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
951NEXT_SYS_TIME_H
952REPLACE_STRUCT_TIMEVAL
953REPLACE_GETTIMEOFDAY
954HAVE_SYS_TIME_H
955HAVE_STRUCT_TIMEVAL
956HAVE_GETTIMEOFDAY
957GNULIB_GETTIMEOFDAY
0eb775a3 958GNULIB_GL_UNISTD_H_GETOPT
e275c824
PE
959GETOPT_H
960HAVE_GETOPT_H
961NEXT_AS_FIRST_DIRECTIVE_GETOPT_H
962NEXT_GETOPT_H
7d2a1c5e
GM
963GETLOADAVG_LIBS
964REPLACE_WCTOMB
965REPLACE_UNSETENV
966REPLACE_STRTOD
967REPLACE_SETENV
968REPLACE_REALPATH
969REPLACE_REALLOC
0eb775a3 970REPLACE_RANDOM_R
7d2a1c5e 971REPLACE_PUTENV
0eb775a3 972REPLACE_PTSNAME_R
b6c9d18d 973REPLACE_PTSNAME
7d2a1c5e
GM
974REPLACE_MKSTEMP
975REPLACE_MBTOWC
976REPLACE_MALLOC
977REPLACE_CANONICALIZE_FILE_NAME
978REPLACE_CALLOC
979HAVE_DECL_UNSETENV
980HAVE_UNLOCKPT
981HAVE_SYS_LOADAVG_H
982HAVE_STRUCT_RANDOM_DATA
983HAVE_STRTOULL
984HAVE_STRTOLL
985HAVE_STRTOD
986HAVE_DECL_SETENV
987HAVE_SETENV
2cdd55fc 988HAVE_SECURE_GETENV
7d2a1c5e
GM
989HAVE_RPMATCH
990HAVE_REALPATH
991HAVE_RANDOM_R
992HAVE_RANDOM_H
0eb775a3
GM
993HAVE_RANDOM
994HAVE_PTSNAME_R
7d2a1c5e 995HAVE_PTSNAME
0eb775a3 996HAVE_POSIX_OPENPT
7d2a1c5e
GM
997HAVE_MKSTEMPS
998HAVE_MKSTEMP
999HAVE_MKOSTEMPS
1000HAVE_MKOSTEMP
1001HAVE_MKDTEMP
1002HAVE_GRANTPT
1003HAVE_GETSUBOPT
1004HAVE_DECL_GETLOADAVG
1005HAVE_CANONICALIZE_FILE_NAME
1006HAVE_ATOLL
1007HAVE__EXIT
1008GNULIB_WCTOMB
1009GNULIB_UNSETENV
1010GNULIB_UNLOCKPT
1011GNULIB_SYSTEM_POSIX
1012GNULIB_STRTOULL
1013GNULIB_STRTOLL
1014GNULIB_STRTOD
1015GNULIB_SETENV
2cdd55fc 1016GNULIB_SECURE_GETENV
7d2a1c5e
GM
1017GNULIB_RPMATCH
1018GNULIB_REALPATH
1019GNULIB_REALLOC_POSIX
1020GNULIB_RANDOM_R
0eb775a3 1021GNULIB_RANDOM
7d2a1c5e 1022GNULIB_PUTENV
0eb775a3 1023GNULIB_PTSNAME_R
7d2a1c5e 1024GNULIB_PTSNAME
0eb775a3 1025GNULIB_POSIX_OPENPT
7d2a1c5e
GM
1026GNULIB_MKSTEMPS
1027GNULIB_MKSTEMP
1028GNULIB_MKOSTEMPS
1029GNULIB_MKOSTEMP
1030GNULIB_MKDTEMP
1031GNULIB_MBTOWC
1032GNULIB_MALLOC_POSIX
1033GNULIB_GRANTPT
1034GNULIB_GETSUBOPT
1035GNULIB_GETLOADAVG
1036GNULIB_CANONICALIZE_FILE_NAME
1037GNULIB_CALLOC_POSIX
1038GNULIB_ATOLL
1039GNULIB__EXIT
d7ad186c
GM
1040REPLACE_UTIMENSAT
1041REPLACE_STAT
1042REPLACE_MKNOD
1043REPLACE_MKFIFO
1044REPLACE_MKDIR
1045REPLACE_LSTAT
1046REPLACE_FUTIMENS
1047REPLACE_FSTATAT
1048REPLACE_FSTAT
1049HAVE_UTIMENSAT
1050HAVE_MKNODAT
1051HAVE_MKNOD
1052HAVE_MKFIFOAT
1053HAVE_MKFIFO
1054HAVE_MKDIRAT
1055HAVE_LSTAT
1056HAVE_LCHMOD
1057HAVE_FUTIMENS
1058HAVE_FSTATAT
1059HAVE_FCHMODAT
1060GNULIB_UTIMENSAT
1061GNULIB_STAT
1062GNULIB_MKNODAT
1063GNULIB_MKNOD
1064GNULIB_MKFIFOAT
1065GNULIB_MKFIFO
1066GNULIB_MKDIRAT
1067GNULIB_LSTAT
1068GNULIB_LCHMOD
1069GNULIB_FUTIMENS
1070GNULIB_FSTATAT
1071GNULIB_FSTAT
1072GNULIB_FCHMODAT
2407788f 1073LIB_FDATASYNC
710f5812
GM
1074NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
1075NEXT_FCNTL_H
710f5812
GM
1076REPLACE_OPENAT
1077REPLACE_OPEN
1078REPLACE_FCNTL
1079HAVE_OPENAT
1080HAVE_FCNTL
1081GNULIB_OPENAT
1082GNULIB_OPEN
1083GNULIB_NONBLOCKING
1084GNULIB_FCNTL
8966cbff
GM
1085GL_GENERATE_EXECINFO_H_FALSE
1086GL_GENERATE_EXECINFO_H_TRUE
1087LIB_EXECINFO
1088EXECINFO_H
3a019ab4
GM
1089EOVERFLOW_VALUE
1090EOVERFLOW_HIDDEN
1091ENOLINK_VALUE
1092ENOLINK_HIDDEN
1093EMULTIHOP_VALUE
1094EMULTIHOP_HIDDEN
1095GL_GENERATE_ERRNO_H_FALSE
1096GL_GENERATE_ERRNO_H_TRUE
1097ERRNO_H
1098NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
1099NEXT_ERRNO_H
d7ad186c
GM
1100HAVE_DIRENT_H
1101NEXT_AS_FIRST_DIRECTIVE_DIRENT_H
1102NEXT_DIRENT_H
1103PRAGMA_COLUMNS
1104PRAGMA_SYSTEM_HEADER
1105INCLUDE_NEXT_AS_FIRST_DIRECTIVE
1106INCLUDE_NEXT
1107REPLACE_FDOPENDIR
1108REPLACE_DIRFD
1109REPLACE_CLOSEDIR
1110REPLACE_OPENDIR
1111HAVE_ALPHASORT
1112HAVE_SCANDIR
1113HAVE_FDOPENDIR
1114HAVE_DECL_FDOPENDIR
1115HAVE_DECL_DIRFD
1116HAVE_CLOSEDIR
1117HAVE_REWINDDIR
1118HAVE_READDIR
1119HAVE_OPENDIR
1120GNULIB_ALPHASORT
1121GNULIB_SCANDIR
1122GNULIB_FDOPENDIR
1123GNULIB_DIRFD
1124GNULIB_CLOSEDIR
1125GNULIB_REWINDDIR
1126GNULIB_READDIR
1127GNULIB_OPENDIR
e275c824
PE
1128UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1129UNISTD_H_HAVE_WINSOCK2_H
1130REPLACE_WRITE
1131REPLACE_USLEEP
1132REPLACE_UNLINKAT
1133REPLACE_UNLINK
1134REPLACE_TTYNAME_R
1135REPLACE_SYMLINK
1136REPLACE_SLEEP
1137REPLACE_RMDIR
1138REPLACE_READLINK
ca36e0ff 1139REPLACE_READ
e275c824
PE
1140REPLACE_PWRITE
1141REPLACE_PREAD
1142REPLACE_LSEEK
1143REPLACE_LINKAT
1144REPLACE_LINK
1145REPLACE_LCHOWN
0eb775a3 1146REPLACE_ISATTY
e275c824
PE
1147REPLACE_GETPAGESIZE
1148REPLACE_GETGROUPS
1149REPLACE_GETLOGIN_R
1150REPLACE_GETDOMAINNAME
1151REPLACE_GETCWD
0eb775a3 1152REPLACE_FTRUNCATE
e275c824
PE
1153REPLACE_FCHOWNAT
1154REPLACE_DUP2
1155REPLACE_DUP
1156REPLACE_CLOSE
1157REPLACE_CHOWN
1158HAVE_SYS_PARAM_H
1159HAVE_OS_H
1160HAVE_DECL_TTYNAME_R
0eb775a3 1161HAVE_DECL_SETHOSTNAME
e275c824
PE
1162HAVE_DECL_GETUSERSHELL
1163HAVE_DECL_GETPAGESIZE
1164HAVE_DECL_GETLOGIN_R
1165HAVE_DECL_GETDOMAINNAME
2b1928b8 1166HAVE_DECL_FDATASYNC
e275c824
PE
1167HAVE_DECL_FCHDIR
1168HAVE_DECL_ENVIRON
1169HAVE_USLEEP
1170HAVE_UNLINKAT
1171HAVE_SYMLINKAT
1172HAVE_SYMLINK
1173HAVE_SLEEP
0eb775a3 1174HAVE_SETHOSTNAME
e275c824
PE
1175HAVE_READLINKAT
1176HAVE_READLINK
1177HAVE_PWRITE
1178HAVE_PREAD
1179HAVE_PIPE2
1180HAVE_PIPE
1181HAVE_LINKAT
1182HAVE_LINK
1183HAVE_LCHOWN
da6c8463 1184HAVE_GROUP_MEMBER
e275c824
PE
1185HAVE_GETPAGESIZE
1186HAVE_GETLOGIN
1187HAVE_GETHOSTNAME
1188HAVE_GETGROUPS
1189HAVE_GETDTABLESIZE
1190HAVE_FTRUNCATE
1191HAVE_FSYNC
2b1928b8 1192HAVE_FDATASYNC
e275c824
PE
1193HAVE_FCHOWNAT
1194HAVE_FCHDIR
1195HAVE_FACCESSAT
1196HAVE_EUIDACCESS
1197HAVE_DUP3
1198HAVE_DUP2
1199HAVE_CHOWN
1200GNULIB_WRITE
1201GNULIB_USLEEP
1202GNULIB_UNLINKAT
1203GNULIB_UNLINK
1204GNULIB_UNISTD_H_SIGPIPE
ca36e0ff 1205GNULIB_UNISTD_H_NONBLOCKING
e275c824
PE
1206GNULIB_TTYNAME_R
1207GNULIB_SYMLINKAT
1208GNULIB_SYMLINK
1209GNULIB_SLEEP
0eb775a3 1210GNULIB_SETHOSTNAME
e275c824
PE
1211GNULIB_RMDIR
1212GNULIB_READLINKAT
1213GNULIB_READLINK
ca36e0ff 1214GNULIB_READ
e275c824
PE
1215GNULIB_PWRITE
1216GNULIB_PREAD
1217GNULIB_PIPE2
1218GNULIB_PIPE
1219GNULIB_LSEEK
1220GNULIB_LINKAT
1221GNULIB_LINK
1222GNULIB_LCHOWN
0eb775a3 1223GNULIB_ISATTY
da6c8463 1224GNULIB_GROUP_MEMBER
e275c824
PE
1225GNULIB_GETUSERSHELL
1226GNULIB_GETPAGESIZE
1227GNULIB_GETLOGIN_R
1228GNULIB_GETLOGIN
1229GNULIB_GETHOSTNAME
1230GNULIB_GETGROUPS
1231GNULIB_GETDTABLESIZE
1232GNULIB_GETDOMAINNAME
1233GNULIB_GETCWD
1234GNULIB_FTRUNCATE
1235GNULIB_FSYNC
2b1928b8 1236GNULIB_FDATASYNC
e275c824
PE
1237GNULIB_FCHOWNAT
1238GNULIB_FCHDIR
1239GNULIB_FACCESSAT
1240GNULIB_EUIDACCESS
1241GNULIB_ENVIRON
1242GNULIB_DUP3
1243GNULIB_DUP2
2b1928b8 1244GNULIB_DUP
e275c824
PE
1245GNULIB_CLOSE
1246GNULIB_CHOWN
2b1928b8 1247GNULIB_CHDIR
f199cab1 1248LIB_CLOCK_GETTIME
4fc2b746
GM
1249GL_GENERATE_ALLOCA_H_FALSE
1250GL_GENERATE_ALLOCA_H_TRUE
1251ALLOCA_H
1252ALLOCA
743c80a7
PE
1253GL_COND_LIBTOOL_FALSE
1254GL_COND_LIBTOOL_TRUE
5476a9a4
GM
1255POST_ALLOC_OBJ
1256PRE_ALLOC_OBJ
1257CYGWIN_OBJ
1258RALLOC_OBJ
1259OLDXMENU_DEPS
1260LIBX_OTHER
1261LIBXMENU
1262OLDXMENU
1263OLDXMENU_TARGET
1264LIBXT_OTHER
1265TOOLKIT_LIBW
1266WIDGET_OBJ
1267XOBJ
1268XMENU_OBJ
1269FONT_OBJ
1270OTHER_FILES
1271GNU_OBJC_CFLAGS
1272ns_appsrc
1273ns_appresdir
1274ns_appbindir
1275ns_appdir
5476a9a4
GM
1276X_TOOLKIT_TYPE
1277GNUSTEP_CFLAGS
1278C_SWITCH_X_SITE
1279LD_SWITCH_X_SITE
1280gameuser
1281gamedir
1282bitmapdir
7a67e06b 1283etcdocdir
5476a9a4
GM
1284archlibdir
1285etcdir
1286x_default_search_path
1287lisppath
1288locallisppath
1289standardlisppath
1290leimdir
1291lispdir
1292srcdir
1293canonical
1294configuration
1295version
bb7dce39 1296copyright
0f55a32e 1297XGSELOBJ
5476a9a4
GM
1298KRB4LIB
1299DESLIB
1300KRB5LIB
1301CRYPTOLIB
1302COM_ERRLIB
1303LIBRESOLV
1304LIBHESIOD
1305TERMCAP_OBJ
1306LIBS_TERMCAP
1307BLESSMAIL_TARGET
1308LIBS_MAIL
1309liblockfile
1310LIBXML2_LIBS
1311LIBXML2_CFLAGS
910833ae
GM
1312XINERAMA_LIBS
1313XINERAMA_CFLAGS
1314XRANDR_LIBS
1315XRANDR_CFLAGS
5476a9a4
GM
1316LIBXSM
1317LIBGPM
1318LIBGIF
1319LIBTIFF
7a67e06b 1320LIBZ
5476a9a4
GM
1321LIBPNG
1322LIBJPEG
1323LIBXPM
1324M17N_FLT_LIBS
1325M17N_FLT_CFLAGS
1326LIBOTF_LIBS
1327LIBOTF_CFLAGS
1328FREETYPE_LIBS
1329FREETYPE_CFLAGS
1330XFT_LIBS
1331XFT_CFLAGS
1332FONTCONFIG_LIBS
1333FONTCONFIG_CFLAGS
1334LIBXMU
1335LIBXTR6
0f55a32e
GM
1336NOTIFY_OBJ
1337GFILENOTIFY_LIBS
1338GFILENOTIFY_CFLAGS
5476a9a4
GM
1339LIBGNUTLS_LIBS
1340LIBGNUTLS_CFLAGS
1341LIBSELINUX_LIBS
1342SETTINGS_LIBS
1343SETTINGS_CFLAGS
dcde497f
GM
1344GOBJECT_LIBS
1345GOBJECT_CFLAGS
5476a9a4
GM
1346GCONF_LIBS
1347GCONF_CFLAGS
1348GSETTINGS_LIBS
1349GSETTINGS_CFLAGS
1350DBUS_OBJ
1351DBUS_LIBS
1352DBUS_CFLAGS
1353GTK_OBJ
1354GTK_LIBS
1355GTK_CFLAGS
1356IMAGEMAGICK_LIBS
1357IMAGEMAGICK_CFLAGS
1358RSVG_LIBS
1359RSVG_CFLAGS
1360LIB_PTHREAD
1361VMLIMIT_OBJ
1362GMALLOC_OBJ
1363HAVE_XSERVER
7c61eaab
GM
1364XARGS_LIMIT
1365NTLIB
1366LIB_WSOCK32
1367LIBS_ECLIENT
1368CM_OBJ
1369NTDIR
1370FIRSTFILE_OBJ
b5eb356a 1371W32_RES_LINK
7c61eaab
GM
1372CLIENTW
1373CLIENTRES
68b8ed38 1374UPDATE_MANIFEST
7c61eaab
GM
1375EMACS_MANIFEST
1376EMACSRES
5c0255d9
GM
1377W32_LIBS
1378W32_OBJ
b5eb356a 1379WINDRES
5476a9a4
GM
1380NS_OBJC_OBJ
1381NS_OBJ
1382ns_self_contained
1383INSTALL_ARCH_INDEP_EXTRA
4efe5ef9 1384LIBS_GNUSTEP
5476a9a4
GM
1385LD_SWITCH_X_SITE_RPATH
1386XMKMF
1387DEPFLAGS
1388MKDEPDIR
1389CFLAGS_SOUND
1390ALSA_LIBS
1391ALSA_CFLAGS
1392LIBSOUND
1393PKG_CONFIG
067d23c9 1394LIB_MATH
067d23c9
KY
1395LIBS_SYSTEM
1396C_SWITCH_SYSTEM
1397UNEXEC_OBJ
1398C_SWITCH_MACHINE
1399LD_SWITCH_SYSTEM
1400CANNOT_DUMP
c65a2df9 1401DOCMISC_W32
141d074d
GM
1402INFO_OPTS
1403INFO_EXT
96f129d5 1404HAVE_MAKEINFO
9c29597b 1405PAXCTL
067d23c9
KY
1406GZIP_PROG
1407INSTALL_INFO
4c5f4270 1408LN_S_FILEONLY
a6b92a4a 1409GNULIB_WARN_CFLAGS
a6b92a4a 1410WERROR_CFLAGS
bab4f76d 1411WARN_CFLAGS
369e19fc
PE
1412RANLIB
1413ARFLAGS
1414AR
067d23c9
KY
1415EGREP
1416GREP
1417CPP
7c61eaab
GM
1418BUILDING_FOR_WINDOWSNT_FALSE
1419BUILDING_FOR_WINDOWSNT_TRUE
743c80a7
PE
1420am__fastdepCC_FALSE
1421am__fastdepCC_TRUE
1422CCDEPMODE
1423AMDEPBACKSLASH
1424AMDEP_FALSE
1425AMDEP_TRUE
1426am__quote
1427am__include
1428DEPDIR
067d23c9
KY
1429OBJEXT
1430EXEEXT
1431ac_ct_CC
1432CPPFLAGS
1433LDFLAGS
1434CFLAGS
1435CC
1436host_os
1437host_vendor
1438host_cpu
1439host
1440build_os
1441build_vendor
1442build_cpu
1443build
1444PROFILING_CFLAGS
c3a461a5 1445cache_file
743c80a7
PE
1446am__untar
1447am__tar
1448AMTAR
1449am__leading_dot
1450SET_MAKE
1451AWK
1452mkdir_p
1453MKDIR_P
1454INSTALL_STRIP_PROGRAM
1455STRIP
1456install_sh
1457MAKEINFO
1458AUTOHEADER
1459AUTOMAKE
1460AUTOCONF
1461ACLOCAL
1462VERSION
1463PACKAGE
1464CYGPATH_W
1465am__isrc
1466INSTALL_DATA
1467INSTALL_SCRIPT
1468INSTALL_PROGRAM
067d23c9
KY
1469target_alias
1470host_alias
1471build_alias
1472LIBS
1473ECHO_T
1474ECHO_N
1475ECHO_C
1476DEFS
1477mandir
1478localedir
1479libdir
1480psdir
1481pdfdir
1482dvidir
1483htmldir
1484infodir
1485docdir
1486oldincludedir
1487includedir
1488localstatedir
1489sharedstatedir
1490sysconfdir
1491datadir
1492datarootdir
1493libexecdir
1494sbindir
1495bindir
1496program_transform_name
1497prefix
1498exec_prefix
1499PACKAGE_URL
1500PACKAGE_BUGREPORT
1501PACKAGE_STRING
1502PACKAGE_VERSION
1503PACKAGE_TARNAME
1504PACKAGE_NAME
1505PATH_SEPARATOR
1506SHELL'
1507ac_subst_files='deps_frag
bb7dce39 1508lisp_frag'
067d23c9
KY
1509ac_user_opts='
1510enable_option_checking
ee77919d 1511with_all
067d23c9
KY
1512with_pop
1513with_kerberos
1514with_kerberos5
1515with_hesiod
1516with_mmdf
1517with_mail_unlink
1518with_mailhost
1519with_sound
067d23c9 1520with_x_toolkit
0442dc7f 1521with_wide_int
067d23c9
KY
1522with_xpm
1523with_jpeg
1524with_tiff
1525with_gif
1526with_png
1527with_rsvg
1528with_xml2
1529with_imagemagick
1530with_xft
1531with_libotf
1532with_m17n_flt
1533with_toolkit_scroll_bars
1534with_xaw3d
1535with_xim
1536with_ns
5c0255d9 1537with_w32
067d23c9
KY
1538with_gpm
1539with_dbus
1540with_gconf
f527bd02 1541with_gsettings
067d23c9
KY
1542with_selinux
1543with_gnutls
7a67e06b 1544with_zlib
0f55a32e 1545with_file_notification
067d23c9 1546with_makeinfo
992ec28a 1547with_compress_install
067d23c9 1548with_pkg_config_prog
4fc5868a 1549with_gameuser
067d23c9
KY
1550with_gnustep_conf
1551enable_ns_self_contained
067d23c9
KY
1552enable_locallisppath
1553enable_checking
afd07e01 1554enable_check_lisp_object_type
067d23c9
KY
1555enable_profiling
1556enable_autodepend
4efe5ef9 1557enable_gtk_deprecation_warnings
743c80a7 1558enable_dependency_tracking
067d23c9 1559enable_largefile
a6b92a4a 1560enable_gcc_warnings
e4d35030 1561enable_link_time_optimization
067d23c9 1562with_x
3a019ab4 1563enable_acl
067d23c9
KY
1564'
1565 ac_precious_vars='build_alias
1566host_alias
1567target_alias
1568CC
1569CFLAGS
1570LDFLAGS
1571LIBS
1572CPPFLAGS
1573CPP
1574XMKMF'
1575
1576
1577# Initialize some variables set by options.
1578ac_init_help=
1579ac_init_version=false
1580ac_unrecognized_opts=
1581ac_unrecognized_sep=
1582# The variables have the same names as the options, with
1583# dashes changed to underlines.
1584cache_file=/dev/null
1585exec_prefix=NONE
1586no_create=
1587no_recursion=
1588prefix=NONE
1589program_prefix=NONE
1590program_suffix=NONE
1591program_transform_name=s,x,x,
1592silent=
1593site=
1594srcdir=
1595verbose=
1596x_includes=NONE
1597x_libraries=NONE
1598
1599# Installation directory options.
1600# These are left unexpanded so users can "make install exec_prefix=/foo"
1601# and all the variables that are supposed to be based on exec_prefix
1602# by default will actually change.
1603# Use braces instead of parens because sh, perl, etc. also accept them.
1604# (The list follows the same order as the GNU Coding Standards.)
1605bindir='${exec_prefix}/bin'
1606sbindir='${exec_prefix}/sbin'
1607libexecdir='${exec_prefix}/libexec'
1608datarootdir='${prefix}/share'
1609datadir='${datarootdir}'
1610sysconfdir='${prefix}/etc'
1611sharedstatedir='${prefix}/com'
1612localstatedir='${prefix}/var'
1613includedir='${prefix}/include'
1614oldincludedir='/usr/include'
1615docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1616infodir='${datarootdir}/info'
1617htmldir='${docdir}'
1618dvidir='${docdir}'
1619pdfdir='${docdir}'
1620psdir='${docdir}'
1621libdir='${exec_prefix}/lib'
1622localedir='${datarootdir}/locale'
1623mandir='${datarootdir}/man'
1624
1625ac_prev=
1626ac_dashdash=
1627for ac_option
1628do
1629 # If the previous option needs an argument, assign it.
1630 if test -n "$ac_prev"; then
1631 eval $ac_prev=\$ac_option
1632 ac_prev=
1633 continue
1634 fi
1635
1636 case $ac_option in
a9bec17c
GM
1637 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1638 *) ac_optarg=yes ;;
067d23c9
KY
1639 esac
1640
1641 # Accept the important Cygnus configure options, so we can diagnose typos.
1642
1643 case $ac_dashdash$ac_option in
1644 --)
1645 ac_dashdash=yes ;;
1646
1647 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1648 ac_prev=bindir ;;
1649 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1650 bindir=$ac_optarg ;;
1651
1652 -build | --build | --buil | --bui | --bu)
1653 ac_prev=build_alias ;;
1654 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1655 build_alias=$ac_optarg ;;
1656
1657 -cache-file | --cache-file | --cache-fil | --cache-fi \
1658 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1659 ac_prev=cache_file ;;
1660 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1661 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1662 cache_file=$ac_optarg ;;
1663
1664 --config-cache | -C)
1665 cache_file=config.cache ;;
1666
1667 -datadir | --datadir | --datadi | --datad)
1668 ac_prev=datadir ;;
1669 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1670 datadir=$ac_optarg ;;
1671
1672 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1673 | --dataroo | --dataro | --datar)
1674 ac_prev=datarootdir ;;
1675 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1676 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1677 datarootdir=$ac_optarg ;;
1678
1679 -disable-* | --disable-*)
1680 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1681 # Reject names that are not valid shell variable names.
1682 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
a9bec17c 1683 as_fn_error "invalid feature name: $ac_useropt"
067d23c9
KY
1684 ac_useropt_orig=$ac_useropt
1685 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1686 case $ac_user_opts in
1687 *"
1688"enable_$ac_useropt"
1689"*) ;;
1690 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1691 ac_unrecognized_sep=', ';;
1692 esac
1693 eval enable_$ac_useropt=no ;;
1694
1695 -docdir | --docdir | --docdi | --doc | --do)
1696 ac_prev=docdir ;;
1697 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1698 docdir=$ac_optarg ;;
1699
1700 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1701 ac_prev=dvidir ;;
1702 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1703 dvidir=$ac_optarg ;;
1704
1705 -enable-* | --enable-*)
1706 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1707 # Reject names that are not valid shell variable names.
1708 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
a9bec17c 1709 as_fn_error "invalid feature name: $ac_useropt"
067d23c9
KY
1710 ac_useropt_orig=$ac_useropt
1711 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1712 case $ac_user_opts in
1713 *"
1714"enable_$ac_useropt"
1715"*) ;;
1716 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1717 ac_unrecognized_sep=', ';;
1718 esac
1719 eval enable_$ac_useropt=\$ac_optarg ;;
1720
1721 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1722 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1723 | --exec | --exe | --ex)
1724 ac_prev=exec_prefix ;;
1725 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1726 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1727 | --exec=* | --exe=* | --ex=*)
1728 exec_prefix=$ac_optarg ;;
1729
1730 -gas | --gas | --ga | --g)
1731 # Obsolete; use --with-gas.
1732 with_gas=yes ;;
1733
1734 -help | --help | --hel | --he | -h)
1735 ac_init_help=long ;;
1736 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1737 ac_init_help=recursive ;;
1738 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1739 ac_init_help=short ;;
1740
1741 -host | --host | --hos | --ho)
1742 ac_prev=host_alias ;;
1743 -host=* | --host=* | --hos=* | --ho=*)
1744 host_alias=$ac_optarg ;;
1745
1746 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1747 ac_prev=htmldir ;;
1748 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1749 | --ht=*)
1750 htmldir=$ac_optarg ;;
1751
1752 -includedir | --includedir | --includedi | --included | --include \
1753 | --includ | --inclu | --incl | --inc)
1754 ac_prev=includedir ;;
1755 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1756 | --includ=* | --inclu=* | --incl=* | --inc=*)
1757 includedir=$ac_optarg ;;
1758
1759 -infodir | --infodir | --infodi | --infod | --info | --inf)
1760 ac_prev=infodir ;;
1761 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1762 infodir=$ac_optarg ;;
1763
1764 -libdir | --libdir | --libdi | --libd)
1765 ac_prev=libdir ;;
1766 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1767 libdir=$ac_optarg ;;
1768
1769 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1770 | --libexe | --libex | --libe)
1771 ac_prev=libexecdir ;;
1772 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1773 | --libexe=* | --libex=* | --libe=*)
1774 libexecdir=$ac_optarg ;;
1775
1776 -localedir | --localedir | --localedi | --localed | --locale)
1777 ac_prev=localedir ;;
1778 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1779 localedir=$ac_optarg ;;
1780
1781 -localstatedir | --localstatedir | --localstatedi | --localstated \
1782 | --localstate | --localstat | --localsta | --localst | --locals)
1783 ac_prev=localstatedir ;;
1784 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1785 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1786 localstatedir=$ac_optarg ;;
1787
1788 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1789 ac_prev=mandir ;;
1790 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1791 mandir=$ac_optarg ;;
1792
1793 -nfp | --nfp | --nf)
1794 # Obsolete; use --without-fp.
1795 with_fp=no ;;
1796
1797 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1798 | --no-cr | --no-c | -n)
1799 no_create=yes ;;
1800
1801 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1802 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1803 no_recursion=yes ;;
1804
1805 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1806 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1807 | --oldin | --oldi | --old | --ol | --o)
1808 ac_prev=oldincludedir ;;
1809 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1810 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1811 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1812 oldincludedir=$ac_optarg ;;
1813
1814 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1815 ac_prev=prefix ;;
1816 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1817 prefix=$ac_optarg ;;
1818
1819 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1820 | --program-pre | --program-pr | --program-p)
1821 ac_prev=program_prefix ;;
1822 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1823 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1824 program_prefix=$ac_optarg ;;
1825
1826 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1827 | --program-suf | --program-su | --program-s)
1828 ac_prev=program_suffix ;;
1829 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1830 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1831 program_suffix=$ac_optarg ;;
1832
1833 -program-transform-name | --program-transform-name \
1834 | --program-transform-nam | --program-transform-na \
1835 | --program-transform-n | --program-transform- \
1836 | --program-transform | --program-transfor \
1837 | --program-transfo | --program-transf \
1838 | --program-trans | --program-tran \
1839 | --progr-tra | --program-tr | --program-t)
1840 ac_prev=program_transform_name ;;
1841 -program-transform-name=* | --program-transform-name=* \
1842 | --program-transform-nam=* | --program-transform-na=* \
1843 | --program-transform-n=* | --program-transform-=* \
1844 | --program-transform=* | --program-transfor=* \
1845 | --program-transfo=* | --program-transf=* \
1846 | --program-trans=* | --program-tran=* \
1847 | --progr-tra=* | --program-tr=* | --program-t=*)
1848 program_transform_name=$ac_optarg ;;
1849
1850 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1851 ac_prev=pdfdir ;;
1852 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1853 pdfdir=$ac_optarg ;;
1854
1855 -psdir | --psdir | --psdi | --psd | --ps)
1856 ac_prev=psdir ;;
1857 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1858 psdir=$ac_optarg ;;
1859
1860 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1861 | -silent | --silent | --silen | --sile | --sil)
1862 silent=yes ;;
1863
1864 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1865 ac_prev=sbindir ;;
1866 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1867 | --sbi=* | --sb=*)
1868 sbindir=$ac_optarg ;;
1869
1870 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1871 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1872 | --sharedst | --shareds | --shared | --share | --shar \
1873 | --sha | --sh)
1874 ac_prev=sharedstatedir ;;
1875 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1876 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1877 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1878 | --sha=* | --sh=*)
1879 sharedstatedir=$ac_optarg ;;
1880
1881 -site | --site | --sit)
1882 ac_prev=site ;;
1883 -site=* | --site=* | --sit=*)
1884 site=$ac_optarg ;;
1885
1886 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1887 ac_prev=srcdir ;;
1888 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1889 srcdir=$ac_optarg ;;
1890
1891 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1892 | --syscon | --sysco | --sysc | --sys | --sy)
1893 ac_prev=sysconfdir ;;
1894 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1895 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1896 sysconfdir=$ac_optarg ;;
1897
1898 -target | --target | --targe | --targ | --tar | --ta | --t)
1899 ac_prev=target_alias ;;
1900 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1901 target_alias=$ac_optarg ;;
1902
1903 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1904 verbose=yes ;;
1905
1906 -version | --version | --versio | --versi | --vers | -V)
1907 ac_init_version=: ;;
1908
1909 -with-* | --with-*)
1910 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1911 # Reject names that are not valid shell variable names.
1912 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
a9bec17c 1913 as_fn_error "invalid package name: $ac_useropt"
067d23c9
KY
1914 ac_useropt_orig=$ac_useropt
1915 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1916 case $ac_user_opts in
1917 *"
1918"with_$ac_useropt"
1919"*) ;;
1920 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1921 ac_unrecognized_sep=', ';;
1922 esac
1923 eval with_$ac_useropt=\$ac_optarg ;;
1924
1925 -without-* | --without-*)
1926 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1927 # Reject names that are not valid shell variable names.
1928 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
a9bec17c 1929 as_fn_error "invalid package name: $ac_useropt"
067d23c9
KY
1930 ac_useropt_orig=$ac_useropt
1931 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1932 case $ac_user_opts in
1933 *"
1934"with_$ac_useropt"
1935"*) ;;
1936 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1937 ac_unrecognized_sep=', ';;
1938 esac
1939 eval with_$ac_useropt=no ;;
1940
1941 --x)
1942 # Obsolete; use --with-x.
1943 with_x=yes ;;
1944
1945 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1946 | --x-incl | --x-inc | --x-in | --x-i)
1947 ac_prev=x_includes ;;
1948 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1949 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1950 x_includes=$ac_optarg ;;
1951
1952 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1953 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1954 ac_prev=x_libraries ;;
1955 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1956 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1957 x_libraries=$ac_optarg ;;
1958
a9bec17c
GM
1959 -*) as_fn_error "unrecognized option: \`$ac_option'
1960Try \`$0 --help' for more information."
067d23c9
KY
1961 ;;
1962
1963 *=*)
1964 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1965 # Reject names that are not valid shell variable names.
1966 case $ac_envvar in #(
1967 '' | [0-9]* | *[!_$as_cr_alnum]* )
a9bec17c 1968 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
067d23c9
KY
1969 esac
1970 eval $ac_envvar=\$ac_optarg
1971 export $ac_envvar ;;
1972
1973 *)
1974 # FIXME: should be removed in autoconf 3.0.
1975 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1976 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1977 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
a9bec17c 1978 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
067d23c9
KY
1979 ;;
1980
1981 esac
1982done
1983
1984if test -n "$ac_prev"; then
1985 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
a9bec17c 1986 as_fn_error "missing argument to $ac_option"
067d23c9
KY
1987fi
1988
1989if test -n "$ac_unrecognized_opts"; then
1990 case $enable_option_checking in
1991 no) ;;
a9bec17c 1992 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
067d23c9
KY
1993 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1994 esac
1995fi
1996
1997# Check all directory arguments for consistency.
1998for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1999 datadir sysconfdir sharedstatedir localstatedir includedir \
2000 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
2001 libdir localedir mandir
2002do
2003 eval ac_val=\$$ac_var
2004 # Remove trailing slashes.
2005 case $ac_val in
2006 */ )
2007 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
2008 eval $ac_var=\$ac_val;;
2009 esac
2010 # Be sure to have absolute directory names.
2011 case $ac_val in
2012 [\\/$]* | ?:[\\/]* ) continue;;
2013 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
2014 esac
a9bec17c 2015 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
067d23c9
KY
2016done
2017
2018# There might be people who depend on the old broken behavior: `$host'
2019# used to hold the argument of --host etc.
2020# FIXME: To remove some day.
2021build=$build_alias
2022host=$host_alias
2023target=$target_alias
2024
2025# FIXME: To remove some day.
2026if test "x$host_alias" != x; then
2027 if test "x$build_alias" = x; then
2028 cross_compiling=maybe
a9bec17c
GM
2029 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
2030 If a cross compiler is detected then cross compile mode will be used." >&2
067d23c9
KY
2031 elif test "x$build_alias" != "x$host_alias"; then
2032 cross_compiling=yes
2033 fi
2034fi
2035
2036ac_tool_prefix=
2037test -n "$host_alias" && ac_tool_prefix=$host_alias-
2038
2039test "$silent" = yes && exec 6>/dev/null
2040
2041
2042ac_pwd=`pwd` && test -n "$ac_pwd" &&
2043ac_ls_di=`ls -di .` &&
2044ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
a9bec17c 2045 as_fn_error "working directory cannot be determined"
067d23c9 2046test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
a9bec17c 2047 as_fn_error "pwd does not report name of working directory"
067d23c9
KY
2048
2049
2050# Find the source files, if location was not specified.
2051if test -z "$srcdir"; then
2052 ac_srcdir_defaulted=yes
2053 # Try the directory containing this script, then the parent directory.
2054 ac_confdir=`$as_dirname -- "$as_myself" ||
2055$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
2056 X"$as_myself" : 'X\(//\)[^/]' \| \
2057 X"$as_myself" : 'X\(//\)$' \| \
2058 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
2059$as_echo X"$as_myself" |
2060 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
2061 s//\1/
2062 q
2063 }
2064 /^X\(\/\/\)[^/].*/{
2065 s//\1/
2066 q
2067 }
2068 /^X\(\/\/\)$/{
2069 s//\1/
2070 q
2071 }
2072 /^X\(\/\).*/{
2073 s//\1/
2074 q
2075 }
2076 s/.*/./; q'`
2077 srcdir=$ac_confdir
2078 if test ! -r "$srcdir/$ac_unique_file"; then
2079 srcdir=..
2080 fi
2081else
2082 ac_srcdir_defaulted=no
2083fi
2084if test ! -r "$srcdir/$ac_unique_file"; then
2085 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
a9bec17c 2086 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
067d23c9
KY
2087fi
2088ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
2089ac_abs_confdir=`(
a9bec17c 2090 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
067d23c9
KY
2091 pwd)`
2092# When building in place, set srcdir=.
2093if test "$ac_abs_confdir" = "$ac_pwd"; then
2094 srcdir=.
2095fi
2096# Remove unnecessary trailing slashes from srcdir.
2097# Double slashes in file names in object file debugging info
2098# mess up M-x gdb in Emacs.
2099case $srcdir in
2100*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
2101esac
2102for ac_var in $ac_precious_vars; do
2103 eval ac_env_${ac_var}_set=\${${ac_var}+set}
2104 eval ac_env_${ac_var}_value=\$${ac_var}
2105 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
2106 eval ac_cv_env_${ac_var}_value=\$${ac_var}
2107done
2108
2109#
2110# Report the --help message.
2111#
2112if test "$ac_init_help" = "long"; then
2113 # Omit some internal or obsolete options to make the list less imposing.
2114 # This message is too long to be a string in the A/UX 3.1 sh.
2115 cat <<_ACEOF
c574bc34 2116\`configure' configures emacs 24.3.50 to adapt to many kinds of systems.
067d23c9
KY
2117
2118Usage: $0 [OPTION]... [VAR=VALUE]...
2119
2120To assign environment variables (e.g., CC, CFLAGS...), specify them as
2121VAR=VALUE. See below for descriptions of some of the useful variables.
2122
2123Defaults for the options are specified in brackets.
2124
2125Configuration:
2126 -h, --help display this help and exit
2127 --help=short display options specific to this package
2128 --help=recursive display the short help of all the included packages
2129 -V, --version display version information and exit
a9bec17c 2130 -q, --quiet, --silent do not print \`checking...' messages
067d23c9
KY
2131 --cache-file=FILE cache test results in FILE [disabled]
2132 -C, --config-cache alias for \`--cache-file=config.cache'
2133 -n, --no-create do not create output files
2134 --srcdir=DIR find the sources in DIR [configure dir or \`..']
2135
2136Installation directories:
2137 --prefix=PREFIX install architecture-independent files in PREFIX
2138 [$ac_default_prefix]
2139 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
2140 [PREFIX]
2141
2142By default, \`make install' will install all the files in
2143\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
2144an installation prefix other than \`$ac_default_prefix' using \`--prefix',
2145for instance \`--prefix=\$HOME'.
2146
2147For better control, use the options below.
2148
2149Fine tuning of the installation directories:
2150 --bindir=DIR user executables [EPREFIX/bin]
2151 --sbindir=DIR system admin executables [EPREFIX/sbin]
2152 --libexecdir=DIR program executables [EPREFIX/libexec]
2153 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
2154 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
2155 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
2156 --libdir=DIR object code libraries [EPREFIX/lib]
2157 --includedir=DIR C header files [PREFIX/include]
2158 --oldincludedir=DIR C header files for non-gcc [/usr/include]
2159 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
2160 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
2161 --infodir=DIR info documentation [DATAROOTDIR/info]
2162 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
2163 --mandir=DIR man documentation [DATAROOTDIR/man]
2164 --docdir=DIR documentation root [DATAROOTDIR/doc/emacs]
2165 --htmldir=DIR html documentation [DOCDIR]
2166 --dvidir=DIR dvi documentation [DOCDIR]
2167 --pdfdir=DIR pdf documentation [DOCDIR]
2168 --psdir=DIR ps documentation [DOCDIR]
2169_ACEOF
2170
2171 cat <<\_ACEOF
2172
2173Program names:
2174 --program-prefix=PREFIX prepend PREFIX to installed program names
2175 --program-suffix=SUFFIX append SUFFIX to installed program names
2176 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
2177
2178X features:
2179 --x-includes=DIR X include files are in DIR
2180 --x-libraries=DIR X library files are in DIR
2181
2182System types:
2183 --build=BUILD configure for building on BUILD [guessed]
2184 --host=HOST cross-compile to build programs to run on HOST [BUILD]
2185_ACEOF
2186fi
2187
2188if test -n "$ac_init_help"; then
2189 case $ac_init_help in
c574bc34 2190 short | recursive ) echo "Configuration of emacs 24.3.50:";;
067d23c9
KY
2191 esac
2192 cat <<\_ACEOF
2193
2194Optional Features:
2195 --disable-option-checking ignore unrecognized --enable/--with options
2196 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
2197 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
2198 --disable-ns-self-contained
2199 disable self contained build under NeXTstep
067d23c9
KY
2200 --enable-locallisppath=PATH
2201 directories Emacs should search for lisp files
2202 specific to this site
2203 --enable-checking[=LIST]
2204 enable expensive run-time checks. With LIST, enable
2205 only specific categories of checks. Categories are:
2206 all,yes,no. Flags are: stringbytes, stringoverrun,
7ee3791f 2207 stringfreelist, xmallocoverrun, conslist, glyphs
afd07e01
GM
2208 --enable-check-lisp-object-type
2209 enable compile time checks for the Lisp_Object data
2210 type. This is useful for development for catching
2211 certain types of bugs.
3dc00ee8
GM
2212 --enable-profiling build emacs with low-level, gprof profiling support.
2213 Mainly useful for debugging Emacs itself. May not
2214 work on all platforms. Stops profiler.el working.
067d23c9
KY
2215 --enable-autodepend automatically generate dependencies to .h-files.
2216 Requires GNU Make and Gcc. Enabled if GNU Make and
2217 Gcc is found
4efe5ef9
GM
2218 --enable-gtk-deprecation-warnings
2219 Show Gtk+/Gdk deprecation warnings for Gtk+ >= 3.0
743c80a7
PE
2220 --disable-dependency-tracking speeds up one-time build
2221 --enable-dependency-tracking do not reject slow dependency extractors
067d23c9 2222 --disable-largefile omit support for large files
ac924f35
GM
2223 --enable-gcc-warnings turn on lots of GCC warnings/errors. This is
2224 intended for developers, and may generate false
2225 alarms when used with older or non-GNU development
2226 tools.
e4d35030
GM
2227 --enable-link-time-optimization
2228 build emacs with link-time optimization. This is
2229 supported only for GCC since 4.5.0.
3a019ab4 2230 --disable-acl do not support ACLs
067d23c9
KY
2231
2232Optional Packages:
2233 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
2234 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
ee77919d
GM
2235 --without-all omit almost all features and build small executable
2236 with minimal dependencies
067d23c9
KY
2237 --without-pop don't support POP mail retrieval with movemail
2238 --with-kerberos support Kerberos-authenticated POP
2239 --with-kerberos5 support Kerberos version 5 authenticated POP
2240 --with-hesiod support Hesiod to get the POP server host
2241 --with-mmdf support MMDF mailboxes
2242 --with-mail-unlink unlink, rather than empty, mail spool after reading
2243 --with-mailhost=HOSTNAME
2244 string giving default POP mail host
dfdf7fe5
GM
2245 --with-sound=VALUE compile with sound support (VALUE one of: yes, alsa,
2246 oss, bsd-ossaudio, no; default yes). Only for
9dabd86d 2247 GNU/Linux, FreeBSD, NetBSD, MinGW.
4fa92495
GM
2248 --with-x-toolkit=KIT use an X toolkit (KIT one of: yes or gtk, gtk2,
2249 gtk3, lucid or athena, motif, no)
0442dc7f 2250 --with-wide-int prefer wide Emacs integers (typically 62-bit)
067d23c9
KY
2251 --without-xpm don't compile with XPM image support
2252 --without-jpeg don't compile with JPEG image support
2253 --without-tiff don't compile with TIFF image support
2254 --without-gif don't compile with GIF image support
2255 --without-png don't compile with PNG image support
2256 --without-rsvg don't compile with SVG image support
2257 --without-xml2 don't compile with XML parsing support
2258 --without-imagemagick don't compile with ImageMagick image support
2259 --without-xft don't use XFT for anti aliased fonts
2260 --without-libotf don't use libotf for OpenType font support
2261 --without-m17n-flt don't use m17n-flt for text shaping
2262 --without-toolkit-scroll-bars
2263 don't use Motif or Xaw3d scroll bars
2264 --without-xaw3d don't use Xaw3d
2265 --without-xim don't use X11 XIM
7834125e 2266 --with-ns use NeXTstep (Cocoa or GNUstep) windowing system
7c61eaab 2267 --with-w32 use native MS Windows GUI in a Cygwin build
067d23c9
KY
2268 --without-gpm don't use -lgpm for mouse support on a GNU/Linux
2269 console
2270 --without-dbus don't compile with D-Bus support
2271 --without-gconf don't compile with GConf support
f527bd02 2272 --without-gsettings don't compile with GSettings support
067d23c9
KY
2273 --without-selinux don't compile with SELinux support
2274 --without-gnutls don't use -lgnutls for SSL/TLS support
7a67e06b 2275 --without-zlib don't compile with zlib decompression support
0f55a32e
GM
2276 --with-file-notification=LIB
2277 use a file notification library (LIB one of: yes,
2278 gfile, inotify, w32, no)
067d23c9 2279 --without-makeinfo don't require makeinfo for building manuals
992ec28a
GM
2280 --without-compress-install
2281 don't compress some files (.el, .info, etc.) when
2282 installing. Equivalent to: make GZIP_PROG= install
b5591ebb
GM
2283 --with-pkg-config-prog=FILENAME
2284 file name of pkg-config for finding GTK and librsvg
4fc5868a 2285 --with-gameuser=USER user for shared game score files
b5591ebb
GM
2286 --with-gnustep-conf=FILENAME
2287 name of GNUstep.conf; default $GNUSTEP_CONFIG_FILE,
067d23c9
KY
2288 or /etc/GNUstep/GNUstep.conf
2289 --with-x use the X Window System
2290
2291Some influential environment variables:
2292 CC C compiler command
2293 CFLAGS C compiler flags
2294 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
2295 nonstandard directory <lib dir>
2296 LIBS libraries to pass to the linker, e.g. -l<library>
2297 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2298 you have headers in a nonstandard directory <include dir>
2299 CPP C preprocessor
2300 XMKMF Path to xmkmf, Makefile generator for X Window System
2301
2302Use these variables to override the choices made by `configure' or to help
2303it to find libraries and programs with nonstandard names/locations.
2304
2305Report bugs to the package provider.
2306_ACEOF
2307ac_status=$?
2308fi
2309
2310if test "$ac_init_help" = "recursive"; then
2311 # If there are subdirs, report their specific --help.
2312 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2313 test -d "$ac_dir" ||
2314 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2315 continue
2316 ac_builddir=.
2317
2318case "$ac_dir" in
2319.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2320*)
2321 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2322 # A ".." for each directory in $ac_dir_suffix.
2323 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2324 case $ac_top_builddir_sub in
2325 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2326 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2327 esac ;;
2328esac
2329ac_abs_top_builddir=$ac_pwd
2330ac_abs_builddir=$ac_pwd$ac_dir_suffix
2331# for backward compatibility:
2332ac_top_builddir=$ac_top_build_prefix
2333
2334case $srcdir in
2335 .) # We are building in place.
2336 ac_srcdir=.
2337 ac_top_srcdir=$ac_top_builddir_sub
2338 ac_abs_top_srcdir=$ac_pwd ;;
2339 [\\/]* | ?:[\\/]* ) # Absolute name.
2340 ac_srcdir=$srcdir$ac_dir_suffix;
2341 ac_top_srcdir=$srcdir
2342 ac_abs_top_srcdir=$srcdir ;;
2343 *) # Relative name.
2344 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2345 ac_top_srcdir=$ac_top_build_prefix$srcdir
2346 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2347esac
2348ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2349
2350 cd "$ac_dir" || { ac_status=$?; continue; }
2351 # Check for guested configure.
2352 if test -f "$ac_srcdir/configure.gnu"; then
2353 echo &&
2354 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2355 elif test -f "$ac_srcdir/configure"; then
2356 echo &&
2357 $SHELL "$ac_srcdir/configure" --help=recursive
2358 else
2359 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2360 fi || ac_status=$?
2361 cd "$ac_pwd" || { ac_status=$?; break; }
2362 done
2363fi
2364
2365test -n "$ac_init_help" && exit $ac_status
2366if $ac_init_version; then
2367 cat <<\_ACEOF
c574bc34 2368emacs configure 24.3.50
a9bec17c 2369generated by GNU Autoconf 2.65
067d23c9 2370
a9bec17c 2371Copyright (C) 2009 Free Software Foundation, Inc.
067d23c9
KY
2372This configure script is free software; the Free Software Foundation
2373gives unlimited permission to copy, distribute and modify it.
2374_ACEOF
2375 exit
2376fi
2377
2378## ------------------------ ##
2379## Autoconf initialization. ##
2380## ------------------------ ##
2381
2382# ac_fn_c_try_compile LINENO
2383# --------------------------
2384# Try to compile conftest.$ac_ext, and return whether this succeeded.
2385ac_fn_c_try_compile ()
2386{
2387 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2388 rm -f conftest.$ac_objext
2389 if { { ac_try="$ac_compile"
2390case "(($ac_try" in
2391 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2392 *) ac_try_echo=$ac_try;;
2393esac
2394eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2395$as_echo "$ac_try_echo"; } >&5
2396 (eval "$ac_compile") 2>conftest.err
2397 ac_status=$?
2398 if test -s conftest.err; then
2399 grep -v '^ *+' conftest.err >conftest.er1
2400 cat conftest.er1 >&5
2401 mv -f conftest.er1 conftest.err
2402 fi
2403 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2404 test $ac_status = 0; } && {
2405 test -z "$ac_c_werror_flag" ||
2406 test ! -s conftest.err
2407 } && test -s conftest.$ac_objext; then :
2408 ac_retval=0
2409else
2410 $as_echo "$as_me: failed program was:" >&5
2411sed 's/^/| /' conftest.$ac_ext >&5
2412
2413 ac_retval=1
2414fi
a9bec17c 2415 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
067d23c9
KY
2416 as_fn_set_status $ac_retval
2417
2418} # ac_fn_c_try_compile
2419
067d23c9
KY
2420# ac_fn_c_try_cpp LINENO
2421# ----------------------
2422# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2423ac_fn_c_try_cpp ()
2424{
2425 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2426 if { { ac_try="$ac_cpp conftest.$ac_ext"
2427case "(($ac_try" in
2428 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2429 *) ac_try_echo=$ac_try;;
2430esac
2431eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2432$as_echo "$ac_try_echo"; } >&5
2433 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2434 ac_status=$?
2435 if test -s conftest.err; then
2436 grep -v '^ *+' conftest.err >conftest.er1
2437 cat conftest.er1 >&5
2438 mv -f conftest.er1 conftest.err
2439 fi
2440 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
a9bec17c 2441 test $ac_status = 0; } >/dev/null && {
067d23c9
KY
2442 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2443 test ! -s conftest.err
2444 }; then :
2445 ac_retval=0
2446else
2447 $as_echo "$as_me: failed program was:" >&5
2448sed 's/^/| /' conftest.$ac_ext >&5
2449
2450 ac_retval=1
2451fi
a9bec17c 2452 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
067d23c9
KY
2453 as_fn_set_status $ac_retval
2454
2455} # ac_fn_c_try_cpp
2456
2457# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
2458# -------------------------------------------------------
2459# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2460# the include files in INCLUDES and setting the cache variable VAR
2461# accordingly.
2462ac_fn_c_check_header_mongrel ()
2463{
2464 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
a9bec17c 2465 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
067d23c9
KY
2466 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2467$as_echo_n "checking for $2... " >&6; }
a9bec17c 2468if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
067d23c9
KY
2469 $as_echo_n "(cached) " >&6
2470fi
2471eval ac_res=\$$3
2472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2473$as_echo "$ac_res" >&6; }
2474else
2475 # Is the header compilable?
2476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2477$as_echo_n "checking $2 usability... " >&6; }
2478cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2479/* end confdefs.h. */
2480$4
2481#include <$2>
2482_ACEOF
2483if ac_fn_c_try_compile "$LINENO"; then :
2484 ac_header_compiler=yes
2485else
2486 ac_header_compiler=no
2487fi
2488rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2489{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2490$as_echo "$ac_header_compiler" >&6; }
2491
2492# Is the header present?
2493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2494$as_echo_n "checking $2 presence... " >&6; }
2495cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2496/* end confdefs.h. */
2497#include <$2>
2498_ACEOF
2499if ac_fn_c_try_cpp "$LINENO"; then :
2500 ac_header_preproc=yes
2501else
2502 ac_header_preproc=no
2503fi
a9bec17c 2504rm -f conftest.err conftest.$ac_ext
067d23c9
KY
2505{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2506$as_echo "$ac_header_preproc" >&6; }
2507
2508# So? What about this header?
2509case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
2510 yes:no: )
2511 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2512$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2513 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2514$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2515 ;;
2516 no:yes:* )
2517 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2518$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2519 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
2520$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
2521 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2522$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2523 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
2524$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
2525 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2526$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2527 ;;
2528esac
2529 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2530$as_echo_n "checking for $2... " >&6; }
a9bec17c 2531if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
067d23c9
KY
2532 $as_echo_n "(cached) " >&6
2533else
2534 eval "$3=\$ac_header_compiler"
2535fi
2536eval ac_res=\$$3
2537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2538$as_echo "$ac_res" >&6; }
2539fi
a9bec17c 2540 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
067d23c9
KY
2541
2542} # ac_fn_c_check_header_mongrel
2543
2544# ac_fn_c_try_run LINENO
2545# ----------------------
2546# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2547# that executables *can* be run.
2548ac_fn_c_try_run ()
2549{
2550 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2551 if { { ac_try="$ac_link"
2552case "(($ac_try" in
2553 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2554 *) ac_try_echo=$ac_try;;
2555esac
2556eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2557$as_echo "$ac_try_echo"; } >&5
2558 (eval "$ac_link") 2>&5
2559 ac_status=$?
2560 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2561 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2562 { { case "(($ac_try" in
2563 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2564 *) ac_try_echo=$ac_try;;
2565esac
2566eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2567$as_echo "$ac_try_echo"; } >&5
2568 (eval "$ac_try") 2>&5
2569 ac_status=$?
2570 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2571 test $ac_status = 0; }; }; then :
2572 ac_retval=0
2573else
2574 $as_echo "$as_me: program exited with status $ac_status" >&5
2575 $as_echo "$as_me: failed program was:" >&5
2576sed 's/^/| /' conftest.$ac_ext >&5
2577
2578 ac_retval=$ac_status
2579fi
2580 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
a9bec17c 2581 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
067d23c9
KY
2582 as_fn_set_status $ac_retval
2583
2584} # ac_fn_c_try_run
2585
2586# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2587# -------------------------------------------------------
2588# Tests whether HEADER exists and can be compiled using the include files in
2589# INCLUDES, setting the cache variable VAR accordingly.
2590ac_fn_c_check_header_compile ()
2591{
2592 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2594$as_echo_n "checking for $2... " >&6; }
a9bec17c 2595if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
067d23c9
KY
2596 $as_echo_n "(cached) " >&6
2597else
2598 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2599/* end confdefs.h. */
2600$4
2601#include <$2>
2602_ACEOF
2603if ac_fn_c_try_compile "$LINENO"; then :
2604 eval "$3=yes"
2605else
2606 eval "$3=no"
2607fi
2608rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2609fi
2610eval ac_res=\$$3
2611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2612$as_echo "$ac_res" >&6; }
a9bec17c 2613 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
067d23c9
KY
2614
2615} # ac_fn_c_check_header_compile
2616
1fd182f0
PE
2617# ac_fn_c_try_link LINENO
2618# -----------------------
2619# Try to link conftest.$ac_ext, and return whether this succeeded.
2620ac_fn_c_try_link ()
2621{
2622 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2623 rm -f conftest.$ac_objext conftest$ac_exeext
2624 if { { ac_try="$ac_link"
2625case "(($ac_try" in
2626 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2627 *) ac_try_echo=$ac_try;;
2628esac
2629eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2630$as_echo "$ac_try_echo"; } >&5
2631 (eval "$ac_link") 2>conftest.err
2632 ac_status=$?
2633 if test -s conftest.err; then
2634 grep -v '^ *+' conftest.err >conftest.er1
2635 cat conftest.er1 >&5
2636 mv -f conftest.er1 conftest.err
2637 fi
2638 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2639 test $ac_status = 0; } && {
2640 test -z "$ac_c_werror_flag" ||
2641 test ! -s conftest.err
2642 } && test -s conftest$ac_exeext && {
2643 test "$cross_compiling" = yes ||
2644 $as_test_x conftest$ac_exeext
2645 }; then :
2646 ac_retval=0
2647else
2648 $as_echo "$as_me: failed program was:" >&5
2649sed 's/^/| /' conftest.$ac_ext >&5
2650
2651 ac_retval=1
2652fi
2653 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2654 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2655 # interfere with the next link command; also delete a directory that is
2656 # left behind by Apple's compiler. We do this before executing the actions.
2657 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
a9bec17c 2658 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1fd182f0
PE
2659 as_fn_set_status $ac_retval
2660
2661} # ac_fn_c_try_link
2662
42bbbe8b
GM
2663# ac_fn_c_check_decl LINENO SYMBOL VAR
2664# ------------------------------------
2665# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2666ac_fn_c_check_decl ()
2667{
2668 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5
2670$as_echo_n "checking whether $2 is declared... " >&6; }
2671if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2672 $as_echo_n "(cached) " >&6
2673else
2674 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2675/* end confdefs.h. */
2676$4
2677int
2678main ()
2679{
2680#ifndef $2
2681 (void) $2;
2682#endif
2683
2684 ;
2685 return 0;
2686}
2687_ACEOF
2688if ac_fn_c_try_compile "$LINENO"; then :
2689 eval "$3=yes"
2690else
2691 eval "$3=no"
2692fi
2693rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2694fi
2695eval ac_res=\$$3
2696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2697$as_echo "$ac_res" >&6; }
2698 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2699
2700} # ac_fn_c_check_decl
2701
5476a9a4
GM
2702# ac_fn_c_check_header_preproc LINENO HEADER VAR
2703# ----------------------------------------------
2704# Tests whether HEADER is present, setting the cache variable VAR accordingly.
2705ac_fn_c_check_header_preproc ()
067d23c9
KY
2706{
2707 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2708 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2709$as_echo_n "checking for $2... " >&6; }
a9bec17c 2710if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
067d23c9
KY
2711 $as_echo_n "(cached) " >&6
2712else
2713 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2714/* end confdefs.h. */
5476a9a4
GM
2715#include <$2>
2716_ACEOF
2717if ac_fn_c_try_cpp "$LINENO"; then :
2718 eval "$3=yes"
2719else
2720 eval "$3=no"
2721fi
2722rm -f conftest.err conftest.$ac_ext
2723fi
2724eval ac_res=\$$3
2725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2726$as_echo "$ac_res" >&6; }
2727 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
067d23c9 2728
5476a9a4 2729} # ac_fn_c_check_header_preproc
067d23c9 2730
5476a9a4
GM
2731# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2732# ----------------------------------------------------
2733# Tries to find if the field MEMBER exists in type AGGR, after including
2734# INCLUDES, setting cache variable VAR accordingly.
2735ac_fn_c_check_member ()
2736{
2737 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2739$as_echo_n "checking for $2.$3... " >&6; }
2740if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2741 $as_echo_n "(cached) " >&6
2742else
2743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2744/* end confdefs.h. */
2745$5
2746int
2747main ()
2748{
2749static $2 ac_aggr;
2750if (ac_aggr.$3)
2751return 0;
2752 ;
2753 return 0;
2754}
2755_ACEOF
2756if ac_fn_c_try_compile "$LINENO"; then :
2757 eval "$4=yes"
2758else
2759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2760/* end confdefs.h. */
2761$5
2762int
2763main ()
2764{
2765static $2 ac_aggr;
2766if (sizeof ac_aggr.$3)
2767return 0;
2768 ;
2769 return 0;
2770}
2771_ACEOF
2772if ac_fn_c_try_compile "$LINENO"; then :
2773 eval "$4=yes"
2774else
2775 eval "$4=no"
2776fi
2777rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2778fi
2779rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2780fi
2781eval ac_res=\$$4
2782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2783$as_echo "$ac_res" >&6; }
2784 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2785
2786} # ac_fn_c_check_member
2787
2788# ac_fn_c_check_func LINENO FUNC VAR
2789# ----------------------------------
2790# Tests whether FUNC exists, setting the cache variable VAR accordingly
2791ac_fn_c_check_func ()
2792{
2793 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2794 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2795$as_echo_n "checking for $2... " >&6; }
2796if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2797 $as_echo_n "(cached) " >&6
2798else
2799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2800/* end confdefs.h. */
2801/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2802 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2803#define $2 innocuous_$2
2804
2805/* System header to define __stub macros and hopefully few prototypes,
2806 which can conflict with char $2 (); below.
2807 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2808 <limits.h> exists even on freestanding compilers. */
2809
2810#ifdef __STDC__
067d23c9
KY
2811# include <limits.h>
2812#else
2813# include <assert.h>
2814#endif
2815
2816#undef $2
2817
2818/* Override any GCC internal prototype to avoid an error.
2819 Use char because int might match the return type of a GCC
2820 builtin and then its argument prototype would still apply. */
2821#ifdef __cplusplus
2822extern "C"
2823#endif
2824char $2 ();
2825/* The GNU C library defines this for functions which it implements
2826 to always fail with ENOSYS. Some functions are actually named
2827 something starting with __ and the normal name is an alias. */
2828#if defined __stub_$2 || defined __stub___$2
2829choke me
2830#endif
2831
2832int
2833main ()
2834{
2835return $2 ();
2836 ;
2837 return 0;
2838}
2839_ACEOF
2840if ac_fn_c_try_link "$LINENO"; then :
2841 eval "$3=yes"
2842else
2843 eval "$3=no"
2844fi
2845rm -f core conftest.err conftest.$ac_objext \
2846 conftest$ac_exeext conftest.$ac_ext
2847fi
2848eval ac_res=\$$3
2849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2850$as_echo "$ac_res" >&6; }
a9bec17c 2851 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
067d23c9
KY
2852
2853} # ac_fn_c_check_func
2854
5476a9a4
GM
2855# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2856# -------------------------------------------
2857# Tests whether TYPE exists after having included INCLUDES, setting cache
2858# variable VAR accordingly.
2859ac_fn_c_check_type ()
3e0be4ab
GM
2860{
2861 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
5476a9a4
GM
2862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2863$as_echo_n "checking for $2... " >&6; }
2864if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
3e0be4ab
GM
2865 $as_echo_n "(cached) " >&6
2866else
5476a9a4 2867 eval "$3=no"
3e0be4ab
GM
2868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2869/* end confdefs.h. */
5476a9a4 2870$4
3e0be4ab
GM
2871int
2872main ()
2873{
5476a9a4
GM
2874if (sizeof ($2))
2875 return 0;
3e0be4ab
GM
2876 ;
2877 return 0;
2878}
2879_ACEOF
2880if ac_fn_c_try_compile "$LINENO"; then :
2881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2882/* end confdefs.h. */
5476a9a4 2883$4
3e0be4ab
GM
2884int
2885main ()
2886{
5476a9a4
GM
2887if (sizeof (($2)))
2888 return 0;
3e0be4ab
GM
2889 ;
2890 return 0;
2891}
2892_ACEOF
2893if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4 2894
3e0be4ab 2895else
5476a9a4 2896 eval "$3=yes"
3e0be4ab
GM
2897fi
2898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2899fi
2900rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2901fi
5476a9a4 2902eval ac_res=\$$3
3e0be4ab
GM
2903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2904$as_echo "$ac_res" >&6; }
a9bec17c 2905 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
3e0be4ab 2906
5476a9a4 2907} # ac_fn_c_check_type
3e0be4ab 2908
5f90be1b
PE
2909# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2910# --------------------------------------------
2911# Tries to find the compile-time value of EXPR in a program that includes
2912# INCLUDES, setting VAR accordingly. Returns whether the value could be
2913# computed
2914ac_fn_c_compute_int ()
2915{
2916 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2917 if test "$cross_compiling" = yes; then
2918 # Depending upon the size, compute the lo and hi bounds.
2919cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2920/* end confdefs.h. */
2921$4
2922int
2923main ()
2924{
2925static int test_array [1 - 2 * !(($2) >= 0)];
2926test_array [0] = 0
2927
2928 ;
2929 return 0;
2930}
2931_ACEOF
2932if ac_fn_c_try_compile "$LINENO"; then :
2933 ac_lo=0 ac_mid=0
2934 while :; do
2935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2936/* end confdefs.h. */
2937$4
2938int
2939main ()
2940{
2941static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2942test_array [0] = 0
2943
2944 ;
2945 return 0;
2946}
2947_ACEOF
2948if ac_fn_c_try_compile "$LINENO"; then :
2949 ac_hi=$ac_mid; break
2950else
2951 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2952 if test $ac_lo -le $ac_mid; then
2953 ac_lo= ac_hi=
2954 break
2955 fi
2956 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2957fi
2958rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2959 done
2960else
2961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2962/* end confdefs.h. */
2963$4
2964int
2965main ()
2966{
2967static int test_array [1 - 2 * !(($2) < 0)];
2968test_array [0] = 0
2969
2970 ;
2971 return 0;
2972}
2973_ACEOF
2974if ac_fn_c_try_compile "$LINENO"; then :
2975 ac_hi=-1 ac_mid=-1
2976 while :; do
2977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2978/* end confdefs.h. */
2979$4
2980int
2981main ()
2982{
2983static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2984test_array [0] = 0
2985
2986 ;
2987 return 0;
2988}
2989_ACEOF
2990if ac_fn_c_try_compile "$LINENO"; then :
2991 ac_lo=$ac_mid; break
2992else
2993 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2994 if test $ac_mid -le $ac_hi; then
2995 ac_lo= ac_hi=
2996 break
2997 fi
2998 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2999fi
3000rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3001 done
3002else
3003 ac_lo= ac_hi=
3004fi
3005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3006fi
3007rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3008# Binary search between lo and hi bounds.
3009while test "x$ac_lo" != "x$ac_hi"; do
3010 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
3011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3012/* end confdefs.h. */
3013$4
3014int
3015main ()
3016{
3017static int test_array [1 - 2 * !(($2) <= $ac_mid)];
3018test_array [0] = 0
3019
3020 ;
3021 return 0;
3022}
3023_ACEOF
3024if ac_fn_c_try_compile "$LINENO"; then :
3025 ac_hi=$ac_mid
3026else
3027 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
3028fi
3029rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3030done
3031case $ac_lo in #((
3032?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
3033'') ac_retval=1 ;;
3034esac
3035 else
3036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3037/* end confdefs.h. */
3038$4
3039static long int longval () { return $2; }
3040static unsigned long int ulongval () { return $2; }
3041#include <stdio.h>
3042#include <stdlib.h>
3043int
3044main ()
3045{
3046
3047 FILE *f = fopen ("conftest.val", "w");
3048 if (! f)
3049 return 1;
3050 if (($2) < 0)
3051 {
3052 long int i = longval ();
3053 if (i != ($2))
3054 return 1;
3055 fprintf (f, "%ld", i);
3056 }
3057 else
3058 {
3059 unsigned long int i = ulongval ();
3060 if (i != ($2))
3061 return 1;
3062 fprintf (f, "%lu", i);
3063 }
3064 /* Do not output a trailing newline, as this causes \r\n confusion
3065 on some platforms. */
3066 return ferror (f) || fclose (f) != 0;
3067
3068 ;
3069 return 0;
3070}
3071_ACEOF
3072if ac_fn_c_try_run "$LINENO"; then :
3073 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
3074else
3075 ac_retval=1
3076fi
3077rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3078 conftest.$ac_objext conftest.beam conftest.$ac_ext
3079rm -f conftest.val
3080
3081 fi
a9bec17c 3082 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
5f90be1b
PE
3083 as_fn_set_status $ac_retval
3084
3085} # ac_fn_c_compute_int
067d23c9
KY
3086cat >config.log <<_ACEOF
3087This file contains any messages produced by compilers while
3088running configure, to aid debugging if configure makes a mistake.
3089
c574bc34 3090It was created by emacs $as_me 24.3.50, which was
a9bec17c 3091generated by GNU Autoconf 2.65. Invocation command line was
067d23c9
KY
3092
3093 $ $0 $@
3094
3095_ACEOF
3096exec 5>>config.log
3097{
3098cat <<_ASUNAME
3099## --------- ##
3100## Platform. ##
3101## --------- ##
3102
3103hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3104uname -m = `(uname -m) 2>/dev/null || echo unknown`
3105uname -r = `(uname -r) 2>/dev/null || echo unknown`
3106uname -s = `(uname -s) 2>/dev/null || echo unknown`
3107uname -v = `(uname -v) 2>/dev/null || echo unknown`
3108
3109/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3110/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
3111
3112/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
3113/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
3114/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3115/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
3116/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
3117/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
3118/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
3119
3120_ASUNAME
3121
3122as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3123for as_dir in $PATH
3124do
3125 IFS=$as_save_IFS
3126 test -z "$as_dir" && as_dir=.
3127 $as_echo "PATH: $as_dir"
3128 done
3129IFS=$as_save_IFS
3130
3131} >&5
3132
3133cat >&5 <<_ACEOF
3134
3135
3136## ----------- ##
3137## Core tests. ##
3138## ----------- ##
3139
3140_ACEOF
3141
3142
3143# Keep a trace of the command line.
3144# Strip out --no-create and --no-recursion so they do not pile up.
3145# Strip out --silent because we don't want to record it for future runs.
3146# Also quote any args containing shell meta-characters.
3147# Make two passes to allow for proper duplicate-argument suppression.
3148ac_configure_args=
3149ac_configure_args0=
3150ac_configure_args1=
3151ac_must_keep_next=false
3152for ac_pass in 1 2
3153do
3154 for ac_arg
3155 do
3156 case $ac_arg in
3157 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3158 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3159 | -silent | --silent | --silen | --sile | --sil)
3160 continue ;;
3161 *\'*)
3162 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3163 esac
3164 case $ac_pass in
3165 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3166 2)
3167 as_fn_append ac_configure_args1 " '$ac_arg'"
3168 if test $ac_must_keep_next = true; then
3169 ac_must_keep_next=false # Got value, back to normal.
3170 else
3171 case $ac_arg in
3172 *=* | --config-cache | -C | -disable-* | --disable-* \
3173 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3174 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3175 | -with-* | --with-* | -without-* | --without-* | --x)
3176 case "$ac_configure_args0 " in
3177 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3178 esac
3179 ;;
3180 -* ) ac_must_keep_next=true ;;
3181 esac
3182 fi
3183 as_fn_append ac_configure_args " '$ac_arg'"
3184 ;;
3185 esac
3186 done
3187done
3188{ ac_configure_args0=; unset ac_configure_args0;}
3189{ ac_configure_args1=; unset ac_configure_args1;}
3190
3191# When interrupted or exit'd, cleanup temporary files, and complete
3192# config.log. We remove comments because anyway the quotes in there
3193# would cause problems or look ugly.
3194# WARNING: Use '\'' to represent an apostrophe within the trap.
3195# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3196trap 'exit_status=$?
3197 # Save into config.log some information that might help in debugging.
3198 {
3199 echo
3200
a9bec17c
GM
3201 cat <<\_ASBOX
3202## ---------------- ##
067d23c9 3203## Cache variables. ##
a9bec17c
GM
3204## ---------------- ##
3205_ASBOX
067d23c9
KY
3206 echo
3207 # The following way of writing the cache mishandles newlines in values,
3208(
3209 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3210 eval ac_val=\$$ac_var
3211 case $ac_val in #(
3212 *${as_nl}*)
3213 case $ac_var in #(
3214 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3215$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3216 esac
3217 case $ac_var in #(
3218 _ | IFS | as_nl) ;; #(
3219 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3220 *) { eval $ac_var=; unset $ac_var;} ;;
3221 esac ;;
3222 esac
3223 done
3224 (set) 2>&1 |
3225 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3226 *${as_nl}ac_space=\ *)
3227 sed -n \
3228 "s/'\''/'\''\\\\'\'''\''/g;
3229 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3230 ;; #(
3231 *)
3232 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3233 ;;
3234 esac |
3235 sort
3236)
3237 echo
3238
a9bec17c
GM
3239 cat <<\_ASBOX
3240## ----------------- ##
067d23c9 3241## Output variables. ##
a9bec17c
GM
3242## ----------------- ##
3243_ASBOX
067d23c9
KY
3244 echo
3245 for ac_var in $ac_subst_vars
3246 do
3247 eval ac_val=\$$ac_var
3248 case $ac_val in
3249 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3250 esac
3251 $as_echo "$ac_var='\''$ac_val'\''"
3252 done | sort
3253 echo
3254
3255 if test -n "$ac_subst_files"; then
a9bec17c
GM
3256 cat <<\_ASBOX
3257## ------------------- ##
067d23c9 3258## File substitutions. ##
a9bec17c
GM
3259## ------------------- ##
3260_ASBOX
067d23c9
KY
3261 echo
3262 for ac_var in $ac_subst_files
3263 do
3264 eval ac_val=\$$ac_var
3265 case $ac_val in
3266 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3267 esac
3268 $as_echo "$ac_var='\''$ac_val'\''"
3269 done | sort
3270 echo
3271 fi
3272
3273 if test -s confdefs.h; then
a9bec17c
GM
3274 cat <<\_ASBOX
3275## ----------- ##
067d23c9 3276## confdefs.h. ##
a9bec17c
GM
3277## ----------- ##
3278_ASBOX
067d23c9
KY
3279 echo
3280 cat confdefs.h
3281 echo
3282 fi
3283 test "$ac_signal" != 0 &&
3284 $as_echo "$as_me: caught signal $ac_signal"
3285 $as_echo "$as_me: exit $exit_status"
3286 } >&5
3287 rm -f core *.core core.conftest.* &&
3288 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3289 exit $exit_status
3290' 0
3291for ac_signal in 1 2 13 15; do
3292 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3293done
3294ac_signal=0
3295
3296# confdefs.h avoids OS command line length limits that DEFS can exceed.
3297rm -f -r conftest* confdefs.h
3298
3299$as_echo "/* confdefs.h */" > confdefs.h
3300
3301# Predefined preprocessor variables.
3302
3303cat >>confdefs.h <<_ACEOF
3304#define PACKAGE_NAME "$PACKAGE_NAME"
3305_ACEOF
3306
3307cat >>confdefs.h <<_ACEOF
3308#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3309_ACEOF
3310
3311cat >>confdefs.h <<_ACEOF
3312#define PACKAGE_VERSION "$PACKAGE_VERSION"
3313_ACEOF
3314
3315cat >>confdefs.h <<_ACEOF
3316#define PACKAGE_STRING "$PACKAGE_STRING"
3317_ACEOF
3318
3319cat >>confdefs.h <<_ACEOF
3320#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3321_ACEOF
3322
3323cat >>confdefs.h <<_ACEOF
3324#define PACKAGE_URL "$PACKAGE_URL"
3325_ACEOF
3326
3327
3328# Let the site file select an alternate cache file if it wants to.
3329# Prefer an explicitly selected file to automatically selected ones.
3330ac_site_file1=NONE
3331ac_site_file2=NONE
3332if test -n "$CONFIG_SITE"; then
a9bec17c 3333 ac_site_file1=$CONFIG_SITE
067d23c9
KY
3334elif test "x$prefix" != xNONE; then
3335 ac_site_file1=$prefix/share/config.site
3336 ac_site_file2=$prefix/etc/config.site
3337else
3338 ac_site_file1=$ac_default_prefix/share/config.site
3339 ac_site_file2=$ac_default_prefix/etc/config.site
3340fi
3341for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3342do
3343 test "x$ac_site_file" = xNONE && continue
3344 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3345 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3346$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3347 sed 's/^/| /' "$ac_site_file" >&5
a9bec17c 3348 . "$ac_site_file"
067d23c9
KY
3349 fi
3350done
3351
3352if test -r "$cache_file"; then
3353 # Some versions of bash will fail to source /dev/null (special files
3354 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
3355 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3356 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3357$as_echo "$as_me: loading cache $cache_file" >&6;}
3358 case $cache_file in
3359 [\\/]* | ?:[\\/]* ) . "$cache_file";;
3360 *) . "./$cache_file";;
3361 esac
3362 fi
3363else
3364 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3365$as_echo "$as_me: creating cache $cache_file" >&6;}
3366 >$cache_file
3367fi
3368
5476a9a4 3369as_fn_append ac_header_list " sys/systeminfo.h"
5476a9a4
GM
3370as_fn_append ac_header_list " coff.h"
3371as_fn_append ac_header_list " pty.h"
5476a9a4
GM
3372as_fn_append ac_header_list " sys/resource.h"
3373as_fn_append ac_header_list " sys/utsname.h"
3374as_fn_append ac_header_list " pwd.h"
3375as_fn_append ac_header_list " utmp.h"
5476a9a4
GM
3376as_fn_append ac_header_list " util.h"
3377as_fn_append ac_header_list " sys/socket.h"
3378as_fn_append ac_header_list " stdlib.h"
3379as_fn_append ac_header_list " unistd.h"
7e723570 3380as_fn_append ac_header_list " sys/param.h"
5476a9a4
GM
3381as_fn_append ac_header_list " pthread.h"
3382as_fn_append ac_header_list " malloc/malloc.h"
3383as_fn_append ac_header_list " maillock.h"
3384as_fn_append ac_header_list " sys/un.h"
3385as_fn_append ac_func_list " tzset"
3386as_fn_append ac_func_list " readlinkat"
d7ad186c 3387as_fn_append ac_header_list " dirent.h"
8966cbff 3388as_fn_append ac_header_list " execinfo.h"
710f5812 3389as_fn_append ac_func_list " faccessat"
0cdca42a 3390as_fn_append ac_func_list " fcntl"
d7ad186c 3391as_fn_append ac_func_list " fdopendir"
eda33f78 3392as_fn_append ac_header_list " stdio_ext.h"
d7ad186c 3393as_fn_append ac_func_list " fstatat"
2407788f 3394as_fn_append ac_func_list " fsync"
f199cab1
GM
3395gl_getopt_required=GNU
3396as_fn_append ac_header_list " getopt.h"
3397as_fn_append ac_func_list " gettimeofday"
3398as_fn_append ac_func_list " nanotime"
e700232f 3399as_fn_append ac_header_list " sys/time.h"
f199cab1
GM
3400as_fn_append ac_header_list " wchar.h"
3401as_fn_append ac_header_list " stdint.h"
3402as_fn_append ac_header_list " inttypes.h"
3403as_fn_append ac_func_list " lstat"
e412eb97 3404as_fn_append ac_func_list " mkostemp"
0cdca42a 3405as_fn_append ac_func_list " pipe2"
f199cab1
GM
3406as_fn_append ac_header_list " sys/select.h"
3407as_fn_append ac_func_list " pselect"
3408as_fn_append ac_func_list " pthread_sigmask"
3409as_fn_append ac_func_list " readlink"
f199cab1
GM
3410as_fn_append ac_func_list " strtoimax"
3411as_fn_append ac_func_list " strtoumax"
3412as_fn_append ac_func_list " symlink"
3413as_fn_append ac_header_list " sys/stat.h"
3414as_fn_append ac_func_list " localtime_r"
e700232f 3415as_fn_append ac_header_list " utime.h"
f199cab1
GM
3416as_fn_append ac_func_list " futimes"
3417as_fn_append ac_func_list " futimesat"
3418as_fn_append ac_func_list " futimens"
3419as_fn_append ac_func_list " utimensat"
3420as_fn_append ac_func_list " lutimes"
0cdca42a 3421as_fn_append ac_func_list " getdtablesize"
e412eb97 3422as_fn_append ac_func_list " secure_getenv"
067d23c9
KY
3423# Check that the precious variables saved in the cache have kept the same
3424# value.
3425ac_cache_corrupted=false
3426for ac_var in $ac_precious_vars; do
3427 eval ac_old_set=\$ac_cv_env_${ac_var}_set
3428 eval ac_new_set=\$ac_env_${ac_var}_set
3429 eval ac_old_val=\$ac_cv_env_${ac_var}_value
3430 eval ac_new_val=\$ac_env_${ac_var}_value
3431 case $ac_old_set,$ac_new_set in
3432 set,)
3433 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3434$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3435 ac_cache_corrupted=: ;;
3436 ,set)
3437 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3438$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3439 ac_cache_corrupted=: ;;
3440 ,);;
3441 *)
3442 if test "x$ac_old_val" != "x$ac_new_val"; then
3443 # differences in whitespace do not lead to failure.
3444 ac_old_val_w=`echo x $ac_old_val`
3445 ac_new_val_w=`echo x $ac_new_val`
3446 if test "$ac_old_val_w" != "$ac_new_val_w"; then
3447 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3448$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3449 ac_cache_corrupted=:
3450 else
3451 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3452$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3453 eval $ac_var=\$ac_old_val
3454 fi
3455 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
3456$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
3457 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
3458$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
3459 fi;;
3460 esac
3461 # Pass precious variables to config.status.
3462 if test "$ac_new_set" = set; then
3463 case $ac_new_val in
3464 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3465 *) ac_arg=$ac_var=$ac_new_val ;;
3466 esac
3467 case " $ac_configure_args " in
3468 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
3469 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3470 esac
3471 fi
3472done
3473if $ac_cache_corrupted; then
3474 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3475$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3476 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3477$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
a9bec17c 3478 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
067d23c9
KY
3479fi
3480## -------------------- ##
3481## Main body of script. ##
3482## -------------------- ##
3483
3484ac_ext=c
3485ac_cpp='$CPP $CPPFLAGS'
3486ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3487ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3488ac_compiler_gnu=$ac_cv_c_compiler_gnu
3489
3490
2f559cd2 3491
1df7c7ca
GM
3492emacs_config_options=
3493optsep=
3494for opt in ${1+"$@"} CFLAGS CPPFLAGS LDFLAGS; do
3495 case $opt in
3496 -n | --no-create | --no-recursion)
3497 continue ;;
3498 CFLAGS | CPPFLAGS | LDFLAGS)
3499 eval 'test "${'$opt'+set}" = set' || continue
3500 case " $*" in
3501 *" $opt="*) continue ;;
3502 esac
3503 eval opt=$opt=\$$opt ;;
3504 esac
3505
3506 emacs_shell_specials=$IFS\''"#$&()*;<>?[\\`{|~'
3507 case $opt in
3508 *["$emacs_shell_specials"]*)
3509 case $opt in
3510 *\'*)
3511 emacs_quote_apostrophes="s/'/'\\\\''/g"
3512 opt=`$as_echo "$opt" | sed "$emacs_quote_apostrophes"` ;;
3513 esac
3514 opt="'$opt'"
3515 case $opt in
3516 *['"\\']*)
3517 emacs_quote_for_c='s/["\\]/\\&/g; $!s/$/\\n\\/'
3518 opt=`$as_echo "$opt" | sed "$emacs_quote_for_c"` ;;
3519 esac ;;
3520 esac
3521 as_fn_append emacs_config_options "$optsep$opt"
3522 optsep=' '
2f559cd2
GM
3523done
3524
067d23c9
KY
3525ac_config_headers="$ac_config_headers src/config.h:src/config.in"
3526
3527
743c80a7 3528ac_aux_dir=
369e19fc 3529for ac_dir in build-aux "$srcdir"/build-aux; do
a9bec17c
GM
3530 for ac_t in install-sh install.sh shtool; do
3531 if test -f "$ac_dir/$ac_t"; then
3532 ac_aux_dir=$ac_dir
3533 ac_install_sh="$ac_aux_dir/$ac_t -c"
3534 break 2
3535 fi
3536 done
743c80a7
PE
3537done
3538if test -z "$ac_aux_dir"; then
a9bec17c 3539 as_fn_error "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
743c80a7 3540fi
067d23c9 3541
743c80a7
PE
3542# These three variables are undocumented and unsupported,
3543# and are intended to be withdrawn in a future Autoconf release.
3544# They can cause serious problems if a builder's source tree is in a directory
3545# whose full name contains unusual characters.
3546ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
3547ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
3548ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
067d23c9 3549
067d23c9 3550
369e19fc
PE
3551am__api_version='1.11'
3552
743c80a7
PE
3553# Find a good install program. We prefer a C program (faster),
3554# so one script is as good as another. But avoid the broken or
3555# incompatible versions:
3556# SysV /etc/install, /usr/sbin/install
3557# SunOS /usr/etc/install
3558# IRIX /sbin/install
3559# AIX /bin/install
3560# AmigaOS /C/install, which installs bootblocks on floppy discs
3561# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3562# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3563# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3564# OS/2's system install, which has a completely different semantic
3565# ./install, which can be erroneously created by make from ./install.sh.
3566# Reject install programs that cannot install multiple files.
3567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
3568$as_echo_n "checking for a BSD-compatible install... " >&6; }
3569if test -z "$INSTALL"; then
a9bec17c 3570if test "${ac_cv_path_install+set}" = set; then :
743c80a7
PE
3571 $as_echo_n "(cached) " >&6
3572else
3573 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3574for as_dir in $PATH
3575do
3576 IFS=$as_save_IFS
3577 test -z "$as_dir" && as_dir=.
3578 # Account for people who put trailing slashes in PATH elements.
3579case $as_dir/ in #((
3580 ./ | .// | /[cC]/* | \
3581 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3582 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
3583 /usr/ucb/* ) ;;
3584 *)
3585 # OSF1 and SCO ODT 3.0 have their own names for install.
3586 # Don't use installbsd from OSF since it installs stuff as root
3587 # by default.
3588 for ac_prog in ginstall scoinst install; do
3589 for ac_exec_ext in '' $ac_executable_extensions; do
3590 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
3591 if test $ac_prog = install &&
3592 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3593 # AIX install. It has an incompatible calling convention.
3594 :
3595 elif test $ac_prog = install &&
3596 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3597 # program-specific install script used by HP pwplus--don't use.
3598 :
3599 else
3600 rm -rf conftest.one conftest.two conftest.dir
3601 echo one > conftest.one
3602 echo two > conftest.two
3603 mkdir conftest.dir
3604 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
3605 test -s conftest.one && test -s conftest.two &&
3606 test -s conftest.dir/conftest.one &&
3607 test -s conftest.dir/conftest.two
3608 then
3609 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3610 break 3
3611 fi
3612 fi
3613 fi
3614 done
3615 done
3616 ;;
3617esac
067d23c9 3618
743c80a7
PE
3619 done
3620IFS=$as_save_IFS
067d23c9 3621
743c80a7 3622rm -rf conftest.one conftest.two conftest.dir
067d23c9 3623
067d23c9 3624fi
743c80a7
PE
3625 if test "${ac_cv_path_install+set}" = set; then
3626 INSTALL=$ac_cv_path_install
3627 else
3628 # As a last resort, use the slow shell script. Don't cache a
3629 # value for INSTALL within a source directory, because that will
3630 # break other packages using the cache if that directory is
3631 # removed, or if the value is a relative name.
3632 INSTALL=$ac_install_sh
3633 fi
067d23c9 3634fi
743c80a7
PE
3635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
3636$as_echo "$INSTALL" >&6; }
067d23c9 3637
743c80a7
PE
3638# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3639# It thinks the first close brace ends the variable substitution.
3640test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
067d23c9 3641
743c80a7 3642test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
067d23c9 3643
743c80a7 3644test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
067d23c9 3645
743c80a7
PE
3646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
3647$as_echo_n "checking whether build environment is sane... " >&6; }
3648# Just in case
3649sleep 1
3650echo timestamp > conftest.file
3651# Reject unsafe characters in $srcdir or the absolute working directory
3652# name. Accept space and tab only in the latter.
3653am_lf='
3654'
3655case `pwd` in
3656 *[\\\"\#\$\&\'\`$am_lf]*)
a9bec17c 3657 as_fn_error "unsafe absolute working directory name" "$LINENO" 5;;
743c80a7
PE
3658esac
3659case $srcdir in
3660 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
a9bec17c 3661 as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
743c80a7 3662esac
067d23c9 3663
743c80a7
PE
3664# Do `set' in a subshell so we don't clobber the current shell's
3665# arguments. Must try -L first in case configure is actually a
3666# symlink; some systems play weird games with the mod time of symlinks
3667# (eg FreeBSD returns the mod time of the symlink's containing
3668# directory).
3669if (
3670 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
3671 if test "$*" = "X"; then
3672 # -L didn't work.
3673 set X `ls -t "$srcdir/configure" conftest.file`
3674 fi
3675 rm -f conftest.file
3676 if test "$*" != "X $srcdir/configure conftest.file" \
3677 && test "$*" != "X conftest.file $srcdir/configure"; then
3678
3679 # If neither matched, then we have a broken ls. This can happen
3680 # if, for instance, CONFIG_SHELL is bash and it inherits a
3681 # broken ls alias from the environment. This has actually
3682 # happened. Such a system could not be considered "sane".
a9bec17c 3683 as_fn_error "ls -t appears to fail. Make sure there is not a broken
743c80a7
PE
3684alias in your environment" "$LINENO" 5
3685 fi
067d23c9 3686
743c80a7
PE
3687 test "$2" = conftest.file
3688 )
3689then
3690 # Ok.
3691 :
067d23c9 3692else
a9bec17c 3693 as_fn_error "newly created file is older than distributed files!
743c80a7 3694Check your system clock" "$LINENO" 5
067d23c9 3695fi
743c80a7
PE
3696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3697$as_echo "yes" >&6; }
3698test "$program_prefix" != NONE &&
3699 program_transform_name="s&^&$program_prefix&;$program_transform_name"
3700# Use a double $ so make ignores it.
3701test "$program_suffix" != NONE &&
3702 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
3703# Double any \ or $.
3704# By default was `s,x,x', remove it if useless.
3705ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
3706program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
067d23c9 3707
743c80a7
PE
3708# expand $ac_aux_dir to an absolute path
3709am_aux_dir=`cd $ac_aux_dir && pwd`
067d23c9 3710
743c80a7
PE
3711if test x"${MISSING+set}" != xset; then
3712 case $am_aux_dir in
3713 *\ * | *\ *)
3714 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
3715 *)
3716 MISSING="\${SHELL} $am_aux_dir/missing" ;;
3717 esac
067d23c9 3718fi
743c80a7
PE
3719# Use eval to expand $SHELL
3720if eval "$MISSING --run true"; then
3721 am_missing_run="$MISSING --run "
067d23c9 3722else
743c80a7
PE
3723 am_missing_run=
3724 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
3725$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
067d23c9
KY
3726fi
3727
743c80a7
PE
3728if test x"${install_sh}" != xset; then
3729 case $am_aux_dir in
3730 *\ * | *\ *)
3731 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
3732 *)
3733 install_sh="\${SHELL} $am_aux_dir/install-sh"
3734 esac
067d23c9
KY
3735fi
3736
743c80a7
PE
3737# Installed binaries are usually stripped using `strip' when the user
3738# run `make install-strip'. However `strip' might not be the right
3739# tool to use in cross-compilation environments, therefore Automake
3740# will honor the `STRIP' environment variable to overrule this program.
3741if test "$cross_compiling" != no; then
3742 if test -n "$ac_tool_prefix"; then
3743 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
3744set dummy ${ac_tool_prefix}strip; ac_word=$2
3745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3746$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 3747if test "${ac_cv_prog_STRIP+set}" = set; then :
743c80a7 3748 $as_echo_n "(cached) " >&6
067d23c9 3749else
743c80a7
PE
3750 if test -n "$STRIP"; then
3751 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
3752else
3753as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3754for as_dir in $PATH
3755do
3756 IFS=$as_save_IFS
3757 test -z "$as_dir" && as_dir=.
3758 for ac_exec_ext in '' $ac_executable_extensions; do
3759 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3760 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
3761 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3762 break 2
3763 fi
3764done
3765 done
3766IFS=$as_save_IFS
067d23c9
KY
3767
3768fi
067d23c9 3769fi
743c80a7
PE
3770STRIP=$ac_cv_prog_STRIP
3771if test -n "$STRIP"; then
3772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
3773$as_echo "$STRIP" >&6; }
3774else
3775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3776$as_echo "no" >&6; }
067d23c9
KY
3777fi
3778
3779
067d23c9 3780fi
743c80a7
PE
3781if test -z "$ac_cv_prog_STRIP"; then
3782 ac_ct_STRIP=$STRIP
3783 # Extract the first word of "strip", so it can be a program name with args.
3784set dummy strip; ac_word=$2
3785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3786$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 3787if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
743c80a7
PE
3788 $as_echo_n "(cached) " >&6
3789else
3790 if test -n "$ac_ct_STRIP"; then
3791 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
3792else
3793as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3794for as_dir in $PATH
3795do
3796 IFS=$as_save_IFS
3797 test -z "$as_dir" && as_dir=.
3798 for ac_exec_ext in '' $ac_executable_extensions; do
3799 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3800 ac_cv_prog_ac_ct_STRIP="strip"
3801 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3802 break 2
3803 fi
3804done
3805 done
3806IFS=$as_save_IFS
3807
3808fi
3809fi
3810ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
3811if test -n "$ac_ct_STRIP"; then
3812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
3813$as_echo "$ac_ct_STRIP" >&6; }
3814else
3815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3816$as_echo "no" >&6; }
3817fi
3818
3819 if test "x$ac_ct_STRIP" = x; then
3820 STRIP=":"
3821 else
3822 case $cross_compiling:$ac_tool_warned in
3823yes:)
3824{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3825$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3826ac_tool_warned=yes ;;
3827esac
3828 STRIP=$ac_ct_STRIP
3829 fi
3830else
3831 STRIP="$ac_cv_prog_STRIP"
3832fi
3833
3834fi
3835INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
3836
3837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
3838$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
3839if test -z "$MKDIR_P"; then
a9bec17c 3840 if test "${ac_cv_path_mkdir+set}" = set; then :
743c80a7
PE
3841 $as_echo_n "(cached) " >&6
3842else
3843 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3844for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
3845do
3846 IFS=$as_save_IFS
3847 test -z "$as_dir" && as_dir=.
3848 for ac_prog in mkdir gmkdir; do
3849 for ac_exec_ext in '' $ac_executable_extensions; do
3850 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
3851 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
3852 'mkdir (GNU coreutils) '* | \
3853 'mkdir (coreutils) '* | \
3854 'mkdir (fileutils) '4.1*)
3855 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
3856 break 3;;
3857 esac
3858 done
3859 done
3860 done
3861IFS=$as_save_IFS
3862
3863fi
3864
3865 test -d ./--version && rmdir ./--version
3866 if test "${ac_cv_path_mkdir+set}" = set; then
3867 MKDIR_P="$ac_cv_path_mkdir -p"
3868 else
3869 # As a last resort, use the slow shell script. Don't cache a
3870 # value for MKDIR_P within a source directory, because that will
3871 # break other packages using the cache if that directory is
3872 # removed, or if the value is a relative name.
3873 MKDIR_P="$ac_install_sh -d"
3874 fi
3875fi
3876{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
3877$as_echo "$MKDIR_P" >&6; }
3878
3879mkdir_p="$MKDIR_P"
3880case $mkdir_p in
3881 [\\/$]* | ?:[\\/]*) ;;
3882 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
3883esac
3884
3885for ac_prog in gawk mawk nawk awk
3886do
3887 # Extract the first word of "$ac_prog", so it can be a program name with args.
3888set dummy $ac_prog; ac_word=$2
3889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3890$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 3891if test "${ac_cv_prog_AWK+set}" = set; then :
743c80a7
PE
3892 $as_echo_n "(cached) " >&6
3893else
3894 if test -n "$AWK"; then
3895 ac_cv_prog_AWK="$AWK" # Let the user override the test.
3896else
3897as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3898for as_dir in $PATH
3899do
3900 IFS=$as_save_IFS
3901 test -z "$as_dir" && as_dir=.
3902 for ac_exec_ext in '' $ac_executable_extensions; do
3903 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3904 ac_cv_prog_AWK="$ac_prog"
3905 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3906 break 2
3907 fi
3908done
3909 done
3910IFS=$as_save_IFS
3911
3912fi
3913fi
3914AWK=$ac_cv_prog_AWK
3915if test -n "$AWK"; then
3916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
3917$as_echo "$AWK" >&6; }
3918else
3919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3920$as_echo "no" >&6; }
3921fi
3922
3923
3924 test -n "$AWK" && break
3925done
3926
3927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3928$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
3929set x ${MAKE-make}
3930ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
a9bec17c 3931if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
743c80a7
PE
3932 $as_echo_n "(cached) " >&6
3933else
3934 cat >conftest.make <<\_ACEOF
3935SHELL = /bin/sh
3936all:
3937 @echo '@@@%%%=$(MAKE)=@@@%%%'
3938_ACEOF
a9bec17c 3939# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
743c80a7
PE
3940case `${MAKE-make} -f conftest.make 2>/dev/null` in
3941 *@@@%%%=?*=@@@%%%*)
3942 eval ac_cv_prog_make_${ac_make}_set=yes;;
3943 *)
3944 eval ac_cv_prog_make_${ac_make}_set=no;;
3945esac
3946rm -f conftest.make
3947fi
3948if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3950$as_echo "yes" >&6; }
3951 SET_MAKE=
3952else
3953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3954$as_echo "no" >&6; }
3955 SET_MAKE="MAKE=${MAKE-make}"
3956fi
3957
3958rm -rf .tst 2>/dev/null
3959mkdir .tst 2>/dev/null
3960if test -d .tst; then
3961 am__leading_dot=.
3962else
3963 am__leading_dot=_
3964fi
3965rmdir .tst 2>/dev/null
3966
3967if test "`cd $srcdir && pwd`" != "`pwd`"; then
3968 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
3969 # is not polluted with repeated "-I."
3970 am__isrc=' -I$(srcdir)'
3971 # test to see if srcdir already configured
3972 if test -f $srcdir/config.status; then
a9bec17c 3973 as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
743c80a7
PE
3974 fi
3975fi
3976
3977# test whether we have cygpath
3978if test -z "$CYGPATH_W"; then
3979 if (cygpath --version) >/dev/null 2>/dev/null; then
3980 CYGPATH_W='cygpath -w'
3981 else
3982 CYGPATH_W=echo
3983 fi
3984fi
3985
3986
3987# Define the identity of the package.
3988 PACKAGE='emacs'
c574bc34 3989 VERSION='24.3.50'
743c80a7
PE
3990
3991
3992cat >>confdefs.h <<_ACEOF
3993#define PACKAGE "$PACKAGE"
3994_ACEOF
3995
3996
3997cat >>confdefs.h <<_ACEOF
3998#define VERSION "$VERSION"
3999_ACEOF
4000
4001# Some tools Automake needs.
4002
4003ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
4004
4005
4006AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
4007
4008
4009AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
4010
4011
4012AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
4013
4014
4015MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
4016
4017# We need awk for the "check" target. The system "awk" is bad on
4018# some platforms.
4019# Always define AMTAR for backward compatibility.
4020
4021AMTAR=${AMTAR-"${am_missing_run}tar"}
4022
4023am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
4024
4025
4026
4027
4028
4029
4030
4031
4032lispdir='${datadir}/emacs/${version}/lisp'
e1939eb1 4033leimdir='${datadir}/emacs/${version}/leim'
397f7161 4034standardlisppath='${lispdir}:${leimdir}'
743c80a7
PE
4035locallisppath='${datadir}/emacs/${version}/site-lisp:'\
4036'${datadir}/emacs/site-lisp'
397f7161 4037lisppath='${locallisppath}:${standardlisppath}'
743c80a7
PE
4038etcdir='${datadir}/emacs/${version}/etc'
4039archlibdir='${libexecdir}/emacs/${version}/${configuration}'
7a67e06b 4040etcdocdir='${datadir}/emacs/${version}/etc'
743c80a7
PE
4041gamedir='${localstatedir}/games/emacs'
4042
ee77919d
GM
4043
4044# Check whether --with-all was given.
4045if test "${with_all+set}" = set; then :
4046 withval=$with_all; with_features=$withval
c0528ebe 4047else
ee77919d 4048 with_features=yes
c0528ebe
GM
4049fi
4050
4051
743c80a7
PE
4052
4053
4054
4055# Check whether --with-pop was given.
4056if test "${with_pop+set}" = set; then :
4057 withval=$with_pop;
4058else
ee77919d 4059 with_pop=$with_features
743c80a7
PE
4060fi
4061
4062if test "$with_pop" = yes; then
4063 $as_echo "#define MAIL_USE_POP 1" >>confdefs.h
4064
4065fi
4066
4067
4068# Check whether --with-kerberos was given.
4069if test "${with_kerberos+set}" = set; then :
4070 withval=$with_kerberos;
4071else
4072 with_kerberos=no
4073fi
4074
4075if test "$with_kerberos" != no; then
4076 $as_echo "#define KERBEROS 1" >>confdefs.h
4077
4078fi
4079
4080
4081# Check whether --with-kerberos5 was given.
4082if test "${with_kerberos5+set}" = set; then :
4083 withval=$with_kerberos5;
4084else
4085 with_kerberos5=no
4086fi
4087
4088if test "${with_kerberos5}" != no; then
4089 if test "${with_kerberos}" = no; then
4090 with_kerberos=yes
4091 $as_echo "#define KERBEROS 1" >>confdefs.h
4092
4093 fi
4094
4095$as_echo "#define KERBEROS5 1" >>confdefs.h
4096
4097fi
4098
4099
4100# Check whether --with-hesiod was given.
4101if test "${with_hesiod+set}" = set; then :
4102 withval=$with_hesiod;
4103else
4104 with_hesiod=no
4105fi
4106
4107if test "$with_hesiod" != no; then
4108
4109$as_echo "#define HESIOD 1" >>confdefs.h
4110
4111fi
4112
4113
4114# Check whether --with-mmdf was given.
4115if test "${with_mmdf+set}" = set; then :
4116 withval=$with_mmdf;
4117else
4118 with_mmdf=no
4119fi
4120
4121if test "$with_mmdf" != no; then
4122
4123$as_echo "#define MAIL_USE_MMDF 1" >>confdefs.h
4124
4125fi
4126
4127
4128# Check whether --with-mail-unlink was given.
4129if test "${with_mail_unlink+set}" = set; then :
4130 withval=$with_mail_unlink;
4131else
4132 with_mail_unlink=no
4133fi
4134
4135if test "$with_mail_unlink" != no; then
4136
4137$as_echo "#define MAIL_UNLINK_SPOOL 1" >>confdefs.h
4138
4139fi
4140
4141
4142# Check whether --with-mailhost was given.
4143if test "${with_mailhost+set}" = set; then :
4144 withval=$with_mailhost;
4145cat >>confdefs.h <<_ACEOF
4146#define MAILHOST "$withval"
4147_ACEOF
4148
4149fi
4150
4151
4152
067d23c9
KY
4153# Check whether --with-sound was given.
4154if test "${with_sound+set}" = set; then :
9dabd86d 4155 withval=$with_sound; case "${withval}" in
dfdf7fe5 4156 yes|no|alsa|oss|bsd-ossaudio) val=$withval ;;
9dabd86d 4157 *) as_fn_error "\`--with-sound=$withval' is invalid;
dfdf7fe5 4158this option's value should be \`yes', \`no', \`alsa', \`oss', or \`bsd-ossaudio'." "$LINENO" 5
9dabd86d
GM
4159 ;;
4160 esac
4161 with_sound=$val
4162
067d23c9 4163else
9dabd86d 4164 with_sound=$with_features
067d23c9
KY
4165fi
4166
4167
4168
067d23c9
KY
4169# Check whether --with-x-toolkit was given.
4170if test "${with_x_toolkit+set}" = set; then :
4171 withval=$with_x_toolkit; case "${withval}" in
4172 y | ye | yes ) val=gtk ;;
4173 n | no ) val=no ;;
4174 l | lu | luc | luci | lucid ) val=lucid ;;
4175 a | at | ath | athe | athen | athena ) val=athena ;;
4176 m | mo | mot | moti | motif ) val=motif ;;
4177 g | gt | gtk ) val=gtk ;;
4fa92495 4178 gtk2 ) val=gtk2 ;;
067d23c9
KY
4179 gtk3 ) val=gtk3 ;;
4180 * )
a9bec17c 4181as_fn_error "\`--with-x-toolkit=$withval' is invalid;
4fa92495
GM
4182this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif', \`gtk',
4183\`gtk2' or \`gtk3'. \`yes' and \`gtk' are synonyms.
4184\`athena' and \`lucid' are synonyms." "$LINENO" 5
067d23c9
KY
4185 ;;
4186 esac
4187 with_x_toolkit=$val
4188
4189fi
4190
4191
4192
0442dc7f
GM
4193# Check whether --with-wide-int was given.
4194if test "${with_wide_int+set}" = set; then :
4195 withval=$with_wide_int;
4196else
4197 with_wide_int=no
4198fi
4199
4200if test "$with_wide_int" = yes; then
4201
4202$as_echo "#define WIDE_EMACS_INT 1" >>confdefs.h
4203
4204fi
4205
4206
067d23c9
KY
4207# Check whether --with-xpm was given.
4208if test "${with_xpm+set}" = set; then :
4209 withval=$with_xpm;
4210else
ee77919d 4211 with_xpm=$with_features
067d23c9
KY
4212fi
4213
4214
4215# Check whether --with-jpeg was given.
4216if test "${with_jpeg+set}" = set; then :
4217 withval=$with_jpeg;
4218else
ee77919d 4219 with_jpeg=$with_features
067d23c9
KY
4220fi
4221
4222
4223# Check whether --with-tiff was given.
4224if test "${with_tiff+set}" = set; then :
4225 withval=$with_tiff;
4226else
ee77919d 4227 with_tiff=$with_features
067d23c9
KY
4228fi
4229
4230
4231# Check whether --with-gif was given.
4232if test "${with_gif+set}" = set; then :
4233 withval=$with_gif;
4234else
ee77919d 4235 with_gif=$with_features
067d23c9
KY
4236fi
4237
4238
4239# Check whether --with-png was given.
4240if test "${with_png+set}" = set; then :
4241 withval=$with_png;
4242else
ee77919d 4243 with_png=$with_features
067d23c9
KY
4244fi
4245
4246
4247# Check whether --with-rsvg was given.
4248if test "${with_rsvg+set}" = set; then :
4249 withval=$with_rsvg;
4250else
ee77919d 4251 with_rsvg=$with_features
067d23c9
KY
4252fi
4253
4254
4255# Check whether --with-xml2 was given.
4256if test "${with_xml2+set}" = set; then :
4257 withval=$with_xml2;
4258else
ee77919d 4259 with_xml2=$with_features
067d23c9
KY
4260fi
4261
4262
4263# Check whether --with-imagemagick was given.
4264if test "${with_imagemagick+set}" = set; then :
4265 withval=$with_imagemagick;
4266else
ee77919d 4267 with_imagemagick=$with_features
067d23c9
KY
4268fi
4269
4270
4271
4272# Check whether --with-xft was given.
4273if test "${with_xft+set}" = set; then :
4274 withval=$with_xft;
4275else
ee77919d 4276 with_xft=$with_features
067d23c9
KY
4277fi
4278
4279
4280# Check whether --with-libotf was given.
4281if test "${with_libotf+set}" = set; then :
4282 withval=$with_libotf;
4283else
ee77919d 4284 with_libotf=$with_features
067d23c9
KY
4285fi
4286
4287
4288# Check whether --with-m17n-flt was given.
4289if test "${with_m17n_flt+set}" = set; then :
4290 withval=$with_m17n_flt;
4291else
ee77919d 4292 with_m17n_flt=$with_features
067d23c9
KY
4293fi
4294
4295
4296
4297# Check whether --with-toolkit-scroll-bars was given.
4298if test "${with_toolkit_scroll_bars+set}" = set; then :
4299 withval=$with_toolkit_scroll_bars;
4300else
ee77919d 4301 with_toolkit_scroll_bars=$with_features
067d23c9
KY
4302fi
4303
4304
4305# Check whether --with-xaw3d was given.
4306if test "${with_xaw3d+set}" = set; then :
4307 withval=$with_xaw3d;
4308else
ee77919d 4309 with_xaw3d=$with_features
067d23c9
KY
4310fi
4311
4312
4313# Check whether --with-xim was given.
4314if test "${with_xim+set}" = set; then :
4315 withval=$with_xim;
4316else
ee77919d 4317 with_xim=$with_features
067d23c9
KY
4318fi
4319
4320
4321# Check whether --with-ns was given.
4322if test "${with_ns+set}" = set; then :
4323 withval=$with_ns;
4324else
4325 with_ns=no
4326fi
4327
4328
5c0255d9
GM
4329# Check whether --with-w32 was given.
4330if test "${with_w32+set}" = set; then :
4331 withval=$with_w32;
4332else
4333 with_w32=no
4334fi
4335
4336
067d23c9
KY
4337
4338# Check whether --with-gpm was given.
4339if test "${with_gpm+set}" = set; then :
4340 withval=$with_gpm;
4341else
ee77919d 4342 with_gpm=$with_features
067d23c9
KY
4343fi
4344
4345
4346# Check whether --with-dbus was given.
4347if test "${with_dbus+set}" = set; then :
4348 withval=$with_dbus;
4349else
ee77919d 4350 with_dbus=$with_features
067d23c9
KY
4351fi
4352
4353
4354# Check whether --with-gconf was given.
4355if test "${with_gconf+set}" = set; then :
4356 withval=$with_gconf;
4357else
ee77919d 4358 with_gconf=$with_features
067d23c9
KY
4359fi
4360
4361
f527bd02
GM
4362# Check whether --with-gsettings was given.
4363if test "${with_gsettings+set}" = set; then :
4364 withval=$with_gsettings;
4365else
ee77919d 4366 with_gsettings=$with_features
f527bd02
GM
4367fi
4368
4369
067d23c9
KY
4370# Check whether --with-selinux was given.
4371if test "${with_selinux+set}" = set; then :
4372 withval=$with_selinux;
4373else
ee77919d 4374 with_selinux=$with_features
067d23c9
KY
4375fi
4376
4377
4378# Check whether --with-gnutls was given.
4379if test "${with_gnutls+set}" = set; then :
4380 withval=$with_gnutls;
4381else
ee77919d 4382 with_gnutls=$with_features
067d23c9
KY
4383fi
4384
4385
7a67e06b
GM
4386# Check whether --with-zlib was given.
4387if test "${with_zlib+set}" = set; then :
4388 withval=$with_zlib;
4389else
4390 with_zlib=$with_features
4391fi
4392
4393
0f55a32e
GM
4394
4395# Check whether --with-file-notification was given.
4396if test "${with_file_notification+set}" = set; then :
4397 withval=$with_file_notification; case "${withval}" in
4398 y | ye | yes ) val=yes ;;
4399 n | no ) val=no ;;
4400 g | gf | gfi | gfil | gfile ) val=gfile ;;
4401 i | in | ino | inot | inoti | inotif | inotify ) val=inotify ;;
4402 w | w3 | w32 ) val=w32 ;;
4403 * ) as_fn_error "\`--with-file-notification=$withval' is invalid;
4404this option's value should be \`yes', \`no', \`gfile', \`inotify' or \`w32'.
6ee585de
GM
4405\`yes' is a synonym for \`w32' on MS-Windows, for \`no' on Nextstep,
4406otherwise for the first of \`gfile' or \`inotify' that is usable." "$LINENO" 5
0f55a32e
GM
4407 ;;
4408 esac
4409 with_file_notification=$val
4410
b5eb356a 4411else
09220615 4412 with_file_notification=$with_features
b5eb356a
GM
4413fi
4414
4415
067d23c9
KY
4416## For the times when you want to build Emacs but don't have
4417## a suitable makeinfo, and can live without the manuals.
4418
4419# Check whether --with-makeinfo was given.
4420if test "${with_makeinfo+set}" = set; then :
4421 withval=$with_makeinfo;
4422else
ee77919d 4423 with_makeinfo=$with_features
067d23c9
KY
4424fi
4425
4426
c3a461a5
GM
4427## Makefile.in needs the cache file name.
4428
4429
067d23c9
KY
4430## This is an option because I do not know if all info/man support
4431## compressed files, nor how to test if they do so.
4432
992ec28a
GM
4433# Check whether --with-compress-install was given.
4434if test "${with_compress_install+set}" = set; then :
4435 withval=$with_compress_install;
067d23c9 4436else
992ec28a 4437 with_compress_install=$with_features
067d23c9
KY
4438fi
4439
4440
4441
4442# Check whether --with-pkg-config-prog was given.
4443if test "${with_pkg_config_prog+set}" = set; then :
4444 withval=$with_pkg_config_prog;
4445fi
4446
4447if test "X${with_pkg_config_prog}" != X; then
4448 if test "${with_pkg_config_prog}" != yes; then
4449 PKG_CONFIG="${with_pkg_config_prog}"
4450 fi
4451fi
4452
067d23c9 4453
4fc5868a
UM
4454# Check whether --with-gameuser was given.
4455if test "${with_gameuser+set}" = set; then :
4456 withval=$with_gameuser;
4457fi
4458
4459test "X${with_gameuser}" != X && test "${with_gameuser}" != yes \
4460 && gameuser="${with_gameuser}"
4461test "X$gameuser" = X && gameuser=games
4462
4463
067d23c9
KY
4464# Check whether --with-gnustep-conf was given.
4465if test "${with_gnustep_conf+set}" = set; then :
4466 withval=$with_gnustep_conf;
4467fi
4468
4469test "X${with_gnustep_conf}" != X && test "${with_gnustep_conf}" != yes && \
4470 GNUSTEP_CONFIG_FILE="${with_gnustep_conf}"
4471test "X$GNUSTEP_CONFIG_FILE" = "X" && \
4472 GNUSTEP_CONFIG_FILE=/etc/GNUstep/GNUstep.conf
4473
4474# Check whether --enable-ns-self-contained was given.
4475if test "${enable_ns_self_contained+set}" = set; then :
4476 enableval=$enable_ns_self_contained; EN_NS_SELF_CONTAINED=$enableval
4477else
4478 EN_NS_SELF_CONTAINED=yes
4479fi
4480
4481
067d23c9
KY
4482# Check whether --enable-locallisppath was given.
4483if test "${enable_locallisppath+set}" = set; then :
4484 enableval=$enable_locallisppath; if test "${enableval}" = "no"; then
4485 locallisppath=
4486elif test "${enableval}" != "yes"; then
4487 locallisppath=${enableval}
4488fi
4489fi
4490
4491
4492# Check whether --enable-checking was given.
4493if test "${enable_checking+set}" = set; then :
4494 enableval=$enable_checking; ac_checking_flags="${enableval}"
4495fi
4496
4497IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
4498for check in $ac_checking_flags
4499do
4500 case $check in
4501 # these set all the flags to specific states
4502 yes) ac_enable_checking=1 ;;
4503 no) ac_enable_checking= ;
4504 ac_gc_check_stringbytes= ;
4505 ac_gc_check_string_overrun= ;
4506 ac_gc_check_string_free_list= ;
4507 ac_xmalloc_overrun= ;
7ee3791f 4508 ac_gc_check_cons_list= ;
e4d35030 4509 ac_glyphs_debug= ;;
067d23c9
KY
4510 all) ac_enable_checking=1 ;
4511 ac_gc_check_stringbytes=1 ;
4512 ac_gc_check_string_overrun=1 ;
4513 ac_gc_check_string_free_list=1 ;
4514 ac_xmalloc_overrun=1 ;
7ee3791f 4515 ac_gc_check_cons_list=1 ;
e4d35030 4516 ac_glyphs_debug=1 ;;
067d23c9
KY
4517 # these enable particular checks
4518 stringbytes) ac_gc_check_stringbytes=1 ;;
4519 stringoverrun) ac_gc_check_string_overrun=1 ;;
4520 stringfreelist) ac_gc_check_string_free_list=1 ;;
4521 xmallocoverrun) ac_xmalloc_overrun=1 ;;
4522 conslist) ac_gc_check_cons_list=1 ;;
e4d35030 4523 glyphs) ac_glyphs_debug=1 ;;
a9bec17c 4524 *) as_fn_error "unknown check category $check" "$LINENO" 5 ;;
067d23c9
KY
4525 esac
4526done
4527IFS="$ac_save_IFS"
4528
4529if test x$ac_enable_checking != x ; then
4530
4531$as_echo "#define ENABLE_CHECKING 1" >>confdefs.h
4532
4533fi
4534if test x$ac_gc_check_stringbytes != x ; then
4535
4536$as_echo "#define GC_CHECK_STRING_BYTES 1" >>confdefs.h
4537
4538fi
4fda9c95 4539if test x$ac_gc_check_string_overrun != x ; then
067d23c9
KY
4540
4541$as_echo "#define GC_CHECK_STRING_OVERRUN 1" >>confdefs.h
4542
4543fi
4544if test x$ac_gc_check_string_free_list != x ; then
4545
4546$as_echo "#define GC_CHECK_STRING_FREE_LIST 1" >>confdefs.h
4547
4548fi
4549if test x$ac_xmalloc_overrun != x ; then
4550
4551$as_echo "#define XMALLOC_OVERRUN_CHECK 1" >>confdefs.h
4552
4553fi
4554if test x$ac_gc_check_cons_list != x ; then
4555
4556$as_echo "#define GC_CHECK_CONS_LIST 1" >>confdefs.h
4557
7ee3791f 4558fi
e4d35030 4559if test x$ac_glyphs_debug != x ; then
7ee3791f
GM
4560
4561$as_echo "#define GLYPH_DEBUG 1" >>confdefs.h
4562
067d23c9
KY
4563fi
4564
afd07e01
GM
4565# Check whether --enable-check-lisp-object-type was given.
4566if test "${enable_check_lisp_object_type+set}" = set; then :
4567 enableval=$enable_check_lisp_object_type; if test "${enableval}" != "no"; then
067d23c9 4568
afd07e01 4569$as_echo "#define CHECK_LISP_OBJECT_TYPE 1" >>confdefs.h
067d23c9
KY
4570
4571fi
4572fi
4573
4574
4575
4576# Check whether --enable-profiling was given.
4577if test "${enable_profiling+set}" = set; then :
4578 enableval=$enable_profiling; ac_enable_profiling="${enableval}"
4579fi
4580
4581if test x$ac_enable_profiling != x ; then
4582 PROFILING_CFLAGS="-DPROFILING=1 -pg"
4583else
4584 PROFILING_CFLAGS=
4585fi
4586
4587
4588# Check whether --enable-autodepend was given.
4589if test "${enable_autodepend+set}" = set; then :
4590 enableval=$enable_autodepend; ac_enable_autodepend="${enableval}"
4591else
4592 ac_enable_autodepend=yes
4593fi
4594
4595
4efe5ef9
GM
4596# Check whether --enable-gtk-deprecation-warnings was given.
4597if test "${enable_gtk_deprecation_warnings+set}" = set; then :
4598 enableval=$enable_gtk_deprecation_warnings; ac_enable_gtk_deprecation_warnings="${enableval}"
4599fi
4600
4601
067d23c9 4602#### Make srcdir absolute, if it isn't already. It's important to
b5591ebb 4603#### avoid running the file name through pwd unnecessarily, since pwd can
067d23c9
KY
4604#### give you automounter prefixes, which can go away. We do all this
4605#### so Emacs can find its files when run uninstalled.
4606## Make sure CDPATH doesn't affect cd (in case PWD is relative).
4607unset CDPATH
4608case "${srcdir}" in
7c61eaab 4609 [\\/]* | ?:[\\/]*) ;;
067d23c9
KY
4610 . )
4611 ## We may be able to use the $PWD environment variable to make this
4612 ## absolute. But sometimes PWD is inaccurate.
b5591ebb 4613 ## Note: we used to use $PWD at the end instead of `pwd`,
067d23c9
KY
4614 ## but that tested only for a well-formed and valid PWD,
4615 ## it did not object when PWD was well-formed and valid but just wrong.
b5591ebb 4616 if test ".$PWD" != "." && test ".`(cd "$PWD" ; sh -c pwd)`" = ".`pwd`" ;
067d23c9
KY
4617 then
4618 srcdir="$PWD"
4619 else
b5591ebb 4620 srcdir=`(cd "$srcdir"; pwd)`
067d23c9
KY
4621 fi
4622 ;;
b5591ebb 4623 * ) srcdir=`(cd "$srcdir"; pwd)` ;;
067d23c9
KY
4624esac
4625
52d4169a
GM
4626#### When building with MinGW inside the MSYS tree, 'pwd' produces
4627#### directories relative to the root of the MSYS tree,
4628#### e.g. '/home/user/foo' instead of '/d/MSYS/home/user/foo'. When
4629#### such a value of srcdir is written to the top-level Makefile, it
4630#### gets propagated to src/epaths.h, and that causes temacs to fail,
4631#### because, being a MinGW program that knows nothing of MSYS root
4632#### substitution, it cannot find the data directory. "pwd -W"
4633#### produces Windows-style 'd:/foo/bar' absolute directory names, so
4634#### we use it here to countermand that lossage.
4635test "$MSYSTEM" = "MINGW32" && srcdir=`(cd "$srcdir"; pwd -W | sed -e 's,^\([A-Za-z]\):,/\1,')`
4636
067d23c9
KY
4637### Canonicalize the configuration name.
4638
067d23c9
KY
4639# Make sure we can run config.sub.
4640$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
a9bec17c 4641 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
067d23c9
KY
4642
4643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4644$as_echo_n "checking build system type... " >&6; }
a9bec17c 4645if test "${ac_cv_build+set}" = set; then :
067d23c9
KY
4646 $as_echo_n "(cached) " >&6
4647else
4648 ac_build_alias=$build_alias
4649test "x$ac_build_alias" = x &&
4650 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4651test "x$ac_build_alias" = x &&
a9bec17c 4652 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
067d23c9 4653ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
a9bec17c 4654 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
067d23c9
KY
4655
4656fi
4657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4658$as_echo "$ac_cv_build" >&6; }
4659case $ac_cv_build in
4660*-*-*) ;;
a9bec17c 4661*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
067d23c9
KY
4662esac
4663build=$ac_cv_build
4664ac_save_IFS=$IFS; IFS='-'
4665set x $ac_cv_build
4666shift
4667build_cpu=$1
4668build_vendor=$2
4669shift; shift
4670# Remember, the first character of IFS is used to create $*,
4671# except with old shells:
4672build_os=$*
4673IFS=$ac_save_IFS
4674case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
4675
4676
4677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4678$as_echo_n "checking host system type... " >&6; }
a9bec17c 4679if test "${ac_cv_host+set}" = set; then :
067d23c9
KY
4680 $as_echo_n "(cached) " >&6
4681else
4682 if test "x$host_alias" = x; then
4683 ac_cv_host=$ac_cv_build
4684else
4685 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
a9bec17c 4686 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
067d23c9
KY
4687fi
4688
4689fi
4690{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4691$as_echo "$ac_cv_host" >&6; }
4692case $ac_cv_host in
4693*-*-*) ;;
a9bec17c 4694*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
067d23c9
KY
4695esac
4696host=$ac_cv_host
4697ac_save_IFS=$IFS; IFS='-'
4698set x $ac_cv_host
4699shift
4700host_cpu=$1
4701host_vendor=$2
4702shift; shift
4703# Remember, the first character of IFS is used to create $*,
4704# except with old shells:
4705host_os=$*
4706IFS=$ac_save_IFS
4707case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
4708
4709
4710canonical=$host
4711configuration=${host_alias-${build_alias-$host}}
4712
4713
4714
4715### If you add support for a new configuration, add code to this
4716### switch statement to recognize your configuration name and select
42bbbe8b 4717### the appropriate operating system file.
067d23c9 4718
42bbbe8b 4719### You would hope that you could choose an s/*.h
067d23c9 4720### file based on the operating system portion. However, it turns out
42bbbe8b 4721### that each s/*.h file is pretty manufacturer-specific.
067d23c9
KY
4722### So we basically have to have a special case for each
4723### configuration name.
4724###
4725### As far as handling version numbers on operating systems is
4726### concerned, make sure things will fail in a fixable way. If
4727### /etc/MACHINES doesn't say anything about version numbers, be
4728### prepared to handle anything reasonably. If version numbers
4729### matter, be sure /etc/MACHINES says something about it.
4730
42bbbe8b 4731opsys='' unported=no
067d23c9
KY
4732case "${canonical}" in
4733
9b6e5515
GM
4734 ## GNU/Linux and similar ports
4735 *-*-linux* )
d6a003a8 4736 opsys=gnu-linux
d6a003a8
AS
4737 ;;
4738
067d23c9
KY
4739 ## FreeBSD ports
4740 *-*-freebsd* )
4741 opsys=freebsd
067d23c9
KY
4742 ;;
4743
87e1a811
GM
4744 ## DragonFly ports
4745 *-*-dragonfly* )
4746 opsys=dragonfly
4747 ;;
4748
067d23c9
KY
4749 ## FreeBSD kernel + glibc based userland
4750 *-*-kfreebsd*gnu* )
4751 opsys=gnu-kfreebsd
067d23c9
KY
4752 ;;
4753
4754 ## NetBSD ports
4755 *-*-netbsd* )
4756 opsys=netbsd
067d23c9
KY
4757 ;;
4758
4759 ## OpenBSD ports
4760 *-*-openbsd* )
4761 opsys=openbsd
067d23c9
KY
4762 ;;
4763
067d23c9
KY
4764 ## Apple Darwin / Mac OS X
4765 *-apple-darwin* )
4766 case "${canonical}" in
42bbbe8b
GM
4767 i[3456]86-* ) ;;
4768 powerpc-* ) ;;
4769 x86_64-* ) ;;
067d23c9
KY
4770 * ) unported=yes ;;
4771 esac
4772 opsys=darwin
adf4198e
GM
4773 ## Use fink packages if available.
4774 ## FIXME find a better way to do this: http://debbugs.gnu.org/11507
4775## if test -d /sw/include && test -d /sw/lib; then
4776## GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib"
4777## NON_GCC_TEST_OPTIONS=${GCC_TEST_OPTIONS}
4778## fi
067d23c9
KY
4779 ;;
4780
8c35e3c3
GM
4781 ## Cygwin ports
4782 *-*-cygwin )
4783 opsys=cygwin
4784 ;;
4785
067d23c9
KY
4786 ## HP 9000 series 700 and 800, running HP/UX
4787 hppa*-hp-hpux10.2* )
d6a003a8 4788 opsys=hpux10-20
067d23c9
KY
4789 ;;
4790 hppa*-hp-hpux1[1-9]* )
d6a003a8 4791 opsys=hpux11
067d23c9
KY
4792 CFLAGS="-D_INCLUDE__STDC_A1_SOURCE $CFLAGS"
4793 ;;
4794
067d23c9 4795 ## IBM machines
067d23c9 4796 rs6000-ibm-aix4.[23]* )
42bbbe8b 4797 opsys=aix4-2
067d23c9
KY
4798 ;;
4799 powerpc-ibm-aix4.[23]* )
42bbbe8b 4800 opsys=aix4-2
067d23c9
KY
4801 ;;
4802 rs6000-ibm-aix[56]* )
42bbbe8b 4803 opsys=aix4-2
067d23c9
KY
4804 ;;
4805 powerpc-ibm-aix[56]* )
42bbbe8b 4806 opsys=aix4-2
067d23c9
KY
4807 ;;
4808
067d23c9
KY
4809 ## Silicon Graphics machines
4810 ## Iris 4D
4811 mips-sgi-irix6.5 )
fd44db7f 4812 opsys=irix6-5
067d23c9
KY
4813 # Without defining _LANGUAGE_C, things get masked out in the headers
4814 # so that, for instance, grepping for `free' in stdlib.h fails and
4815 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
067d23c9
KY
4816 NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
4817 ;;
4818
4819 ## Suns
067d23c9
KY
4820 *-sun-solaris* \
4821 | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* \
4822 | x86_64-*-solaris2* | x86_64-*-sunos5*)
4823 case "${canonical}" in
42bbbe8b
GM
4824 i[3456]86-*-* ) ;;
4825 amd64-*-*|x86_64-*-*) ;;
4826 sparc* ) ;;
067d23c9
KY
4827 * ) unported=yes ;;
4828 esac
4829 case "${canonical}" in
4830 *-sunos5.6* | *-solaris2.6* )
4831 opsys=sol2-6
067d23c9
KY
4832 RANLIB="ar -ts"
4833 ;;
4834 *-sunos5.[7-9]* | *-solaris2.[7-9]* )
4835 opsys=sol2-6
4836 emacs_check_sunpro_c=yes
067d23c9
KY
4837 ;;
4838 *-sunos5* | *-solaris* )
4839 opsys=sol2-10
4840 emacs_check_sunpro_c=yes
067d23c9
KY
4841 ;;
4842 esac
4843 ## Watch out for a compiler that we know will not work.
4844 case "${canonical}" in
4845 *-solaris* | *-sunos5* )
4846 if [ "x$CC" = x/usr/ucb/cc ]; then
4847 ## /usr/ucb/cc doesn't work;
4848 ## we should find some other compiler that does work.
4849 unset CC
4850 fi
4851 ;;
4852 *) ;;
4853 esac
4854 ;;
4855
067d23c9
KY
4856 ## Intel 386 machines where we don't care about the manufacturer.
4857 i[3456]86-*-* )
067d23c9 4858 case "${canonical}" in
5ec54608 4859 *-darwin* ) opsys=darwin ;;
7c61eaab
GM
4860 *-mingw32 )
4861 opsys=mingw32
4862 # MinGW overrides and adds some system headers in nt/inc.
4863 GCC_TEST_OPTIONS="-I $srcdir/nt/inc"
4864 ;;
5ec54608
GM
4865 *-sysv4.2uw* ) opsys=unixware ;;
4866 *-sysv5uw* ) opsys=unixware ;;
4867 *-sysv5OpenUNIX* ) opsys=unixware ;;
067d23c9
KY
4868 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
4869 esac
4870 ;;
4871
067d23c9
KY
4872 * )
4873 unported=yes
4874 ;;
4875esac
4876
4877### If the code above didn't choose an operating system, just choose
4878### an operating system based on the configuration name. You really
4879### only want to use this when you have no idea what the right
4880### operating system is; if you know what operating systems a machine
4881### runs, it's cleaner to make it explicit in the case statement
4882### above.
4883if test x"${opsys}" = x; then
4884 case "${canonical}" in
4885 *-gnu* ) opsys=gnu ;;
4886 * )
4887 unported=yes
4888 ;;
4889 esac
4890fi
4891
4892
4893
4894if test $unported = yes; then
a9bec17c 4895 as_fn_error "Emacs hasn't been ported to \`${canonical}' systems.
067d23c9
KY
4896Check \`etc/MACHINES' for recognized configuration names." "$LINENO" 5
4897fi
4898
067d23c9
KY
4899
4900#### Choose a compiler.
067d23c9
KY
4901
4902ac_ext=c
4903ac_cpp='$CPP $CPPFLAGS'
4904ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4905ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4906ac_compiler_gnu=$ac_cv_c_compiler_gnu
4907if test -n "$ac_tool_prefix"; then
4908 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4909set dummy ${ac_tool_prefix}gcc; ac_word=$2
4910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4911$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 4912if test "${ac_cv_prog_CC+set}" = set; then :
067d23c9
KY
4913 $as_echo_n "(cached) " >&6
4914else
4915 if test -n "$CC"; then
4916 ac_cv_prog_CC="$CC" # Let the user override the test.
4917else
4918as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4919for as_dir in $PATH
4920do
4921 IFS=$as_save_IFS
4922 test -z "$as_dir" && as_dir=.
4923 for ac_exec_ext in '' $ac_executable_extensions; do
4924 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4925 ac_cv_prog_CC="${ac_tool_prefix}gcc"
4926 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4927 break 2
4928 fi
4929done
4930 done
4931IFS=$as_save_IFS
4932
4933fi
4934fi
4935CC=$ac_cv_prog_CC
4936if test -n "$CC"; then
4937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4938$as_echo "$CC" >&6; }
4939else
4940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4941$as_echo "no" >&6; }
4942fi
4943
4944
4945fi
4946if test -z "$ac_cv_prog_CC"; then
4947 ac_ct_CC=$CC
4948 # Extract the first word of "gcc", so it can be a program name with args.
4949set dummy gcc; ac_word=$2
4950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4951$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 4952if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
067d23c9
KY
4953 $as_echo_n "(cached) " >&6
4954else
4955 if test -n "$ac_ct_CC"; then
4956 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4957else
4958as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4959for as_dir in $PATH
4960do
4961 IFS=$as_save_IFS
4962 test -z "$as_dir" && as_dir=.
4963 for ac_exec_ext in '' $ac_executable_extensions; do
4964 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4965 ac_cv_prog_ac_ct_CC="gcc"
4966 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4967 break 2
4968 fi
4969done
4970 done
4971IFS=$as_save_IFS
4972
4973fi
4974fi
4975ac_ct_CC=$ac_cv_prog_ac_ct_CC
4976if test -n "$ac_ct_CC"; then
4977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4978$as_echo "$ac_ct_CC" >&6; }
4979else
4980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4981$as_echo "no" >&6; }
4982fi
4983
4984 if test "x$ac_ct_CC" = x; then
4985 CC=""
4986 else
4987 case $cross_compiling:$ac_tool_warned in
4988yes:)
4989{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4990$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4991ac_tool_warned=yes ;;
4992esac
4993 CC=$ac_ct_CC
4994 fi
4995else
4996 CC="$ac_cv_prog_CC"
4997fi
4998
4999if test -z "$CC"; then
5000 if test -n "$ac_tool_prefix"; then
5001 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
5002set dummy ${ac_tool_prefix}cc; ac_word=$2
5003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5004$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 5005if test "${ac_cv_prog_CC+set}" = set; then :
067d23c9
KY
5006 $as_echo_n "(cached) " >&6
5007else
5008 if test -n "$CC"; then
5009 ac_cv_prog_CC="$CC" # Let the user override the test.
5010else
5011as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5012for as_dir in $PATH
5013do
5014 IFS=$as_save_IFS
5015 test -z "$as_dir" && as_dir=.
5016 for ac_exec_ext in '' $ac_executable_extensions; do
5017 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5018 ac_cv_prog_CC="${ac_tool_prefix}cc"
5019 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5020 break 2
5021 fi
5022done
5023 done
5024IFS=$as_save_IFS
5025
5026fi
5027fi
5028CC=$ac_cv_prog_CC
5029if test -n "$CC"; then
5030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5031$as_echo "$CC" >&6; }
5032else
5033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5034$as_echo "no" >&6; }
5035fi
5036
5037
5038 fi
5039fi
5040if test -z "$CC"; then
5041 # Extract the first word of "cc", so it can be a program name with args.
5042set dummy cc; ac_word=$2
5043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5044$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 5045if test "${ac_cv_prog_CC+set}" = set; then :
067d23c9
KY
5046 $as_echo_n "(cached) " >&6
5047else
5048 if test -n "$CC"; then
5049 ac_cv_prog_CC="$CC" # Let the user override the test.
5050else
5051 ac_prog_rejected=no
5052as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5053for as_dir in $PATH
5054do
5055 IFS=$as_save_IFS
5056 test -z "$as_dir" && as_dir=.
5057 for ac_exec_ext in '' $ac_executable_extensions; do
5058 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5059 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
5060 ac_prog_rejected=yes
5061 continue
5062 fi
5063 ac_cv_prog_CC="cc"
5064 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5065 break 2
5066 fi
5067done
5068 done
5069IFS=$as_save_IFS
5070
5071if test $ac_prog_rejected = yes; then
5072 # We found a bogon in the path, so make sure we never use it.
5073 set dummy $ac_cv_prog_CC
5074 shift
5075 if test $# != 0; then
5076 # We chose a different compiler from the bogus one.
5077 # However, it has the same basename, so the bogon will be chosen
5078 # first if we set CC to just the basename; use the full file name.
5079 shift
5080 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
5081 fi
5082fi
5083fi
5084fi
5085CC=$ac_cv_prog_CC
5086if test -n "$CC"; then
5087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5088$as_echo "$CC" >&6; }
5089else
5090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5091$as_echo "no" >&6; }
5092fi
5093
5094
5095fi
5096if test -z "$CC"; then
5097 if test -n "$ac_tool_prefix"; then
5098 for ac_prog in cl.exe
5099 do
5100 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5101set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5103$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 5104if test "${ac_cv_prog_CC+set}" = set; then :
067d23c9
KY
5105 $as_echo_n "(cached) " >&6
5106else
5107 if test -n "$CC"; then
5108 ac_cv_prog_CC="$CC" # Let the user override the test.
5109else
5110as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5111for as_dir in $PATH
5112do
5113 IFS=$as_save_IFS
5114 test -z "$as_dir" && as_dir=.
5115 for ac_exec_ext in '' $ac_executable_extensions; do
5116 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5117 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
5118 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5119 break 2
5120 fi
5121done
5122 done
5123IFS=$as_save_IFS
5124
5125fi
5126fi
5127CC=$ac_cv_prog_CC
5128if test -n "$CC"; then
5129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5130$as_echo "$CC" >&6; }
5131else
5132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5133$as_echo "no" >&6; }
5134fi
5135
5136
5137 test -n "$CC" && break
5138 done
5139fi
5140if test -z "$CC"; then
5141 ac_ct_CC=$CC
5142 for ac_prog in cl.exe
5143do
5144 # Extract the first word of "$ac_prog", so it can be a program name with args.
5145set dummy $ac_prog; ac_word=$2
5146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5147$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 5148if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
067d23c9
KY
5149 $as_echo_n "(cached) " >&6
5150else
5151 if test -n "$ac_ct_CC"; then
5152 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5153else
5154as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5155for as_dir in $PATH
5156do
5157 IFS=$as_save_IFS
5158 test -z "$as_dir" && as_dir=.
5159 for ac_exec_ext in '' $ac_executable_extensions; do
5160 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5161 ac_cv_prog_ac_ct_CC="$ac_prog"
5162 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5163 break 2
5164 fi
5165done
5166 done
5167IFS=$as_save_IFS
5168
5169fi
5170fi
5171ac_ct_CC=$ac_cv_prog_ac_ct_CC
5172if test -n "$ac_ct_CC"; then
5173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5174$as_echo "$ac_ct_CC" >&6; }
5175else
5176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5177$as_echo "no" >&6; }
5178fi
5179
5180
5181 test -n "$ac_ct_CC" && break
5182done
5183
5184 if test "x$ac_ct_CC" = x; then
5185 CC=""
5186 else
5187 case $cross_compiling:$ac_tool_warned in
5188yes:)
5189{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5190$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5191ac_tool_warned=yes ;;
5192esac
5193 CC=$ac_ct_CC
5194 fi
5195fi
5196
5197fi
5198
5199
5200test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5201$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
a9bec17c
GM
5202as_fn_error "no acceptable C compiler found in \$PATH
5203See \`config.log' for more details." "$LINENO" 5; }
067d23c9
KY
5204
5205# Provide some information about the compiler.
5206$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
5207set X $ac_compile
5208ac_compiler=$2
5209for ac_option in --version -v -V -qversion; do
5210 { { ac_try="$ac_compiler $ac_option >&5"
5211case "(($ac_try" in
5212 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5213 *) ac_try_echo=$ac_try;;
5214esac
5215eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5216$as_echo "$ac_try_echo"; } >&5
5217 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
5218 ac_status=$?
5219 if test -s conftest.err; then
5220 sed '10a\
5221... rest of stderr output deleted ...
5222 10q' conftest.err >conftest.er1
5223 cat conftest.er1 >&5
5224 fi
5225 rm -f conftest.er1 conftest.err
5226 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5227 test $ac_status = 0; }
5228done
5229
5230cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5231/* end confdefs.h. */
5232
5233int
5234main ()
5235{
5236
5237 ;
5238 return 0;
5239}
5240_ACEOF
5241ac_clean_files_save=$ac_clean_files
5242ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
5243# Try to create an executable without -o first, disregard a.out.
5244# It will help us diagnose broken compilers, and finding out an intuition
5245# of exeext.
5246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
5247$as_echo_n "checking whether the C compiler works... " >&6; }
5248ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
5249
5250# The possible output files:
5251ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
5252
5253ac_rmfiles=
5254for ac_file in $ac_files
5255do
5256 case $ac_file in
5257 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
5258 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
5259 esac
5260done
5261rm -f $ac_rmfiles
5262
5263if { { ac_try="$ac_link_default"
5264case "(($ac_try" in
5265 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5266 *) ac_try_echo=$ac_try;;
5267esac
5268eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5269$as_echo "$ac_try_echo"; } >&5
5270 (eval "$ac_link_default") 2>&5
5271 ac_status=$?
5272 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5273 test $ac_status = 0; }; then :
5274 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
5275# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
5276# in a Makefile. We should not override ac_cv_exeext if it was cached,
5277# so that the user can short-circuit this test for compilers unknown to
5278# Autoconf.
5279for ac_file in $ac_files ''
5280do
5281 test -f "$ac_file" || continue
5282 case $ac_file in
5283 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
5284 ;;
5285 [ab].out )
5286 # We found the default executable, but exeext='' is most
5287 # certainly right.
5288 break;;
5289 *.* )
5290 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
5291 then :; else
5292 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
5293 fi
5294 # We set ac_cv_exeext here because the later test for it is not
5295 # safe: cross compilers may not add the suffix if given an `-o'
5296 # argument, so we may need to know it at that point already.
5297 # Even if this section looks crufty: it has the advantage of
5298 # actually working.
5299 break;;
5300 * )
5301 break;;
5302 esac
5303done
5304test "$ac_cv_exeext" = no && ac_cv_exeext=
5305
5306else
5307 ac_file=''
5308fi
5309if test -z "$ac_file"; then :
5310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5311$as_echo "no" >&6; }
5312$as_echo "$as_me: failed program was:" >&5
5313sed 's/^/| /' conftest.$ac_ext >&5
5314
5315{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5316$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
a9bec17c
GM
5317{ as_fn_set_status 77
5318as_fn_error "C compiler cannot create executables
5319See \`config.log' for more details." "$LINENO" 5; }; }
067d23c9
KY
5320else
5321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5322$as_echo "yes" >&6; }
5323fi
5324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
5325$as_echo_n "checking for C compiler default output file name... " >&6; }
5326{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
5327$as_echo "$ac_file" >&6; }
5328ac_exeext=$ac_cv_exeext
5329
5330rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
5331ac_clean_files=$ac_clean_files_save
5332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
5333$as_echo_n "checking for suffix of executables... " >&6; }
5334if { { ac_try="$ac_link"
5335case "(($ac_try" in
5336 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5337 *) ac_try_echo=$ac_try;;
5338esac
5339eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5340$as_echo "$ac_try_echo"; } >&5
5341 (eval "$ac_link") 2>&5
5342 ac_status=$?
5343 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5344 test $ac_status = 0; }; then :
5345 # If both `conftest.exe' and `conftest' are `present' (well, observable)
5346# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
5347# work properly (i.e., refer to `conftest.exe'), while it won't with
5348# `rm'.
5349for ac_file in conftest.exe conftest conftest.*; do
5350 test -f "$ac_file" || continue
5351 case $ac_file in
5352 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
5353 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
5354 break;;
5355 * ) break;;
5356 esac
5357done
5358else
5359 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5360$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
a9bec17c
GM
5361as_fn_error "cannot compute suffix of executables: cannot compile and link
5362See \`config.log' for more details." "$LINENO" 5; }
067d23c9
KY
5363fi
5364rm -f conftest conftest$ac_cv_exeext
5365{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
5366$as_echo "$ac_cv_exeext" >&6; }
5367
5368rm -f conftest.$ac_ext
5369EXEEXT=$ac_cv_exeext
5370ac_exeext=$EXEEXT
5371cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5372/* end confdefs.h. */
5373#include <stdio.h>
5374int
5375main ()
5376{
5377FILE *f = fopen ("conftest.out", "w");
5378 return ferror (f) || fclose (f) != 0;
5379
5380 ;
5381 return 0;
5382}
5383_ACEOF
5384ac_clean_files="$ac_clean_files conftest.out"
5385# Check that the compiler produces executables we can run. If not, either
5386# the compiler is broken, or we cross compile.
5387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
5388$as_echo_n "checking whether we are cross compiling... " >&6; }
5389if test "$cross_compiling" != yes; then
5390 { { ac_try="$ac_link"
5391case "(($ac_try" in
5392 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5393 *) ac_try_echo=$ac_try;;
5394esac
5395eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5396$as_echo "$ac_try_echo"; } >&5
5397 (eval "$ac_link") 2>&5
5398 ac_status=$?
5399 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5400 test $ac_status = 0; }
5401 if { ac_try='./conftest$ac_cv_exeext'
5402 { { case "(($ac_try" in
5403 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5404 *) ac_try_echo=$ac_try;;
5405esac
5406eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5407$as_echo "$ac_try_echo"; } >&5
5408 (eval "$ac_try") 2>&5
5409 ac_status=$?
5410 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5411 test $ac_status = 0; }; }; then
5412 cross_compiling=no
5413 else
5414 if test "$cross_compiling" = maybe; then
5415 cross_compiling=yes
5416 else
5417 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5418$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
a9bec17c 5419as_fn_error "cannot run C compiled programs.
067d23c9 5420If you meant to cross compile, use \`--host'.
a9bec17c 5421See \`config.log' for more details." "$LINENO" 5; }
067d23c9
KY
5422 fi
5423 fi
5424fi
5425{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
5426$as_echo "$cross_compiling" >&6; }
5427
5428rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
5429ac_clean_files=$ac_clean_files_save
5430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
5431$as_echo_n "checking for suffix of object files... " >&6; }
a9bec17c 5432if test "${ac_cv_objext+set}" = set; then :
067d23c9
KY
5433 $as_echo_n "(cached) " >&6
5434else
5435 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5436/* end confdefs.h. */
5437
5438int
5439main ()
5440{
5441
5442 ;
5443 return 0;
5444}
5445_ACEOF
5446rm -f conftest.o conftest.obj
5447if { { ac_try="$ac_compile"
5448case "(($ac_try" in
5449 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5450 *) ac_try_echo=$ac_try;;
5451esac
5452eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5453$as_echo "$ac_try_echo"; } >&5
5454 (eval "$ac_compile") 2>&5
5455 ac_status=$?
5456 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5457 test $ac_status = 0; }; then :
5458 for ac_file in conftest.o conftest.obj conftest.*; do
5459 test -f "$ac_file" || continue;
5460 case $ac_file in
5461 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
5462 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
5463 break;;
5464 esac
5465done
5466else
5467 $as_echo "$as_me: failed program was:" >&5
5468sed 's/^/| /' conftest.$ac_ext >&5
5469
5470{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5471$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
a9bec17c
GM
5472as_fn_error "cannot compute suffix of object files: cannot compile
5473See \`config.log' for more details." "$LINENO" 5; }
067d23c9
KY
5474fi
5475rm -f conftest.$ac_cv_objext conftest.$ac_ext
5476fi
5477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
5478$as_echo "$ac_cv_objext" >&6; }
5479OBJEXT=$ac_cv_objext
5480ac_objext=$OBJEXT
5481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
5482$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
a9bec17c 5483if test "${ac_cv_c_compiler_gnu+set}" = set; then :
067d23c9
KY
5484 $as_echo_n "(cached) " >&6
5485else
5486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5487/* end confdefs.h. */
5488
5489int
5490main ()
5491{
5492#ifndef __GNUC__
5493 choke me
5494#endif
5495
5496 ;
5497 return 0;
5498}
5499_ACEOF
5500if ac_fn_c_try_compile "$LINENO"; then :
5501 ac_compiler_gnu=yes
5502else
5503 ac_compiler_gnu=no
5504fi
5505rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5506ac_cv_c_compiler_gnu=$ac_compiler_gnu
5507
5508fi
5509{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
5510$as_echo "$ac_cv_c_compiler_gnu" >&6; }
5511if test $ac_compiler_gnu = yes; then
5512 GCC=yes
5513else
5514 GCC=
5515fi
5516ac_test_CFLAGS=${CFLAGS+set}
5517ac_save_CFLAGS=$CFLAGS
5518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
5519$as_echo_n "checking whether $CC accepts -g... " >&6; }
a9bec17c 5520if test "${ac_cv_prog_cc_g+set}" = set; then :
067d23c9
KY
5521 $as_echo_n "(cached) " >&6
5522else
5523 ac_save_c_werror_flag=$ac_c_werror_flag
5524 ac_c_werror_flag=yes
5525 ac_cv_prog_cc_g=no
5526 CFLAGS="-g"
5527 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5528/* end confdefs.h. */
5529
5530int
5531main ()
5532{
5533
5534 ;
5535 return 0;
5536}
5537_ACEOF
5538if ac_fn_c_try_compile "$LINENO"; then :
5539 ac_cv_prog_cc_g=yes
5540else
5541 CFLAGS=""
5542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5543/* end confdefs.h. */
5544
5545int
5546main ()
5547{
5548
5549 ;
5550 return 0;
5551}
5552_ACEOF
5553if ac_fn_c_try_compile "$LINENO"; then :
5554
5555else
5556 ac_c_werror_flag=$ac_save_c_werror_flag
5557 CFLAGS="-g"
5558 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5559/* end confdefs.h. */
5560
5561int
5562main ()
5563{
5564
5565 ;
5566 return 0;
5567}
5568_ACEOF
5569if ac_fn_c_try_compile "$LINENO"; then :
5570 ac_cv_prog_cc_g=yes
5571fi
5572rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5573fi
5574rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5575fi
5576rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5577 ac_c_werror_flag=$ac_save_c_werror_flag
5578fi
5579{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
5580$as_echo "$ac_cv_prog_cc_g" >&6; }
5581if test "$ac_test_CFLAGS" = set; then
5582 CFLAGS=$ac_save_CFLAGS
5583elif test $ac_cv_prog_cc_g = yes; then
5584 if test "$GCC" = yes; then
5585 CFLAGS="-g -O2"
5586 else
5587 CFLAGS="-g"
5588 fi
5589else
5590 if test "$GCC" = yes; then
5591 CFLAGS="-O2"
5592 else
5593 CFLAGS=
5594 fi
5595fi
5596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
5597$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
a9bec17c 5598if test "${ac_cv_prog_cc_c89+set}" = set; then :
067d23c9
KY
5599 $as_echo_n "(cached) " >&6
5600else
5601 ac_cv_prog_cc_c89=no
5602ac_save_CC=$CC
5603cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5604/* end confdefs.h. */
5605#include <stdarg.h>
5606#include <stdio.h>
5607#include <sys/types.h>
5608#include <sys/stat.h>
5609/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
5610struct buf { int x; };
5611FILE * (*rcsopen) (struct buf *, struct stat *, int);
5612static char *e (p, i)
5613 char **p;
5614 int i;
5615{
5616 return p[i];
5617}
5618static char *f (char * (*g) (char **, int), char **p, ...)
5619{
5620 char *s;
5621 va_list v;
5622 va_start (v,p);
5623 s = g (p, va_arg (v,int));
5624 va_end (v);
5625 return s;
5626}
5627
5628/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
5629 function prototypes and stuff, but not '\xHH' hex character constants.
5630 These don't provoke an error unfortunately, instead are silently treated
5631 as 'x'. The following induces an error, until -std is added to get
5632 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
5633 array size at least. It's necessary to write '\x00'==0 to get something
5634 that's true only with -std. */
5635int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5636
5637/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5638 inside strings and character constants. */
5639#define FOO(x) 'x'
5640int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5641
5642int test (int i, double x);
5643struct s1 {int (*f) (int a);};
5644struct s2 {int (*f) (double a);};
5645int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5646int argc;
5647char **argv;
5648int
5649main ()
5650{
5651return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
5652 ;
5653 return 0;
5654}
5655_ACEOF
5656for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5657 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5658do
5659 CC="$ac_save_CC $ac_arg"
5660 if ac_fn_c_try_compile "$LINENO"; then :
5661 ac_cv_prog_cc_c89=$ac_arg
5662fi
5663rm -f core conftest.err conftest.$ac_objext
5664 test "x$ac_cv_prog_cc_c89" != "xno" && break
5665done
743c80a7
PE
5666rm -f conftest.$ac_ext
5667CC=$ac_save_CC
5668
5669fi
5670# AC_CACHE_VAL
5671case "x$ac_cv_prog_cc_c89" in
5672 x)
5673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5674$as_echo "none needed" >&6; } ;;
5675 xno)
5676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5677$as_echo "unsupported" >&6; } ;;
5678 *)
5679 CC="$CC $ac_cv_prog_cc_c89"
5680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5681$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
5682esac
5683if test "x$ac_cv_prog_cc_c89" != xno; then :
5684
5685fi
5686
5687ac_ext=c
5688ac_cpp='$CPP $CPPFLAGS'
5689ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5690ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5691ac_compiler_gnu=$ac_cv_c_compiler_gnu
5692DEPDIR="${am__leading_dot}deps"
5693
5694ac_config_commands="$ac_config_commands depfiles"
5695
5696
5697am_make=${MAKE-make}
5698cat > confinc << 'END'
5699am__doit:
5700 @echo this is the am__doit target
5701.PHONY: am__doit
5702END
5703# If we don't find an include directive, just comment out the code.
5704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
5705$as_echo_n "checking for style of include used by $am_make... " >&6; }
5706am__include="#"
5707am__quote=
5708_am_result=none
5709# First try GNU make style include.
5710echo "include confinc" > confmf
5711# Ignore all kinds of additional output from `make'.
5712case `$am_make -s -f confmf 2> /dev/null` in #(
5713*the\ am__doit\ target*)
5714 am__include=include
5715 am__quote=
5716 _am_result=GNU
5717 ;;
5718esac
5719# Now try BSD make style include.
5720if test "$am__include" = "#"; then
5721 echo '.include "confinc"' > confmf
5722 case `$am_make -s -f confmf 2> /dev/null` in #(
5723 *the\ am__doit\ target*)
5724 am__include=.include
5725 am__quote="\""
5726 _am_result=BSD
5727 ;;
5728 esac
5729fi
5730
5731
5732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
5733$as_echo "$_am_result" >&6; }
5734rm -f confinc confmf
5735
5736# Check whether --enable-dependency-tracking was given.
5737if test "${enable_dependency_tracking+set}" = set; then :
5738 enableval=$enable_dependency_tracking;
5739fi
5740
5741if test "x$enable_dependency_tracking" != xno; then
5742 am_depcomp="$ac_aux_dir/depcomp"
5743 AMDEPBACKSLASH='\'
5744fi
5745 if test "x$enable_dependency_tracking" != xno; then
5746 AMDEP_TRUE=
5747 AMDEP_FALSE='#'
5748else
5749 AMDEP_TRUE='#'
5750 AMDEP_FALSE=
5751fi
5752
5753
5754
5755depcc="$CC" am_compiler_list=
5756
5757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
5758$as_echo_n "checking dependency style of $depcc... " >&6; }
a9bec17c 5759if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
743c80a7
PE
5760 $as_echo_n "(cached) " >&6
5761else
5762 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
5763 # We make a subdir and do the tests there. Otherwise we can end up
5764 # making bogus files that we don't know about and never remove. For
5765 # instance it was reported that on HP-UX the gcc test will end up
5766 # making a dummy file named `D' -- because `-MD' means `put the output
5767 # in D'.
5768 mkdir conftest.dir
5769 # Copy depcomp to subdir because otherwise we won't find it if we're
5770 # using a relative directory.
5771 cp "$am_depcomp" conftest.dir
5772 cd conftest.dir
5773 # We will build objects and dependencies in a subdirectory because
5774 # it helps to detect inapplicable dependency modes. For instance
5775 # both Tru64's cc and ICC support -MD to output dependencies as a
5776 # side effect of compilation, but ICC will put the dependencies in
5777 # the current directory while Tru64 will put them in the object
5778 # directory.
5779 mkdir sub
5780
5781 am_cv_CC_dependencies_compiler_type=none
5782 if test "$am_compiler_list" = ""; then
5783 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5784 fi
5785 am__universal=false
5786 case " $depcc " in #(
5787 *\ -arch\ *\ -arch\ *) am__universal=true ;;
5788 esac
5789
5790 for depmode in $am_compiler_list; do
5791 # Setup a source with many dependencies, because some compilers
5792 # like to wrap large dependency lists on column 80 (with \), and
5793 # we should not choose a depcomp mode which is confused by this.
5794 #
5795 # We need to recreate these files for each test, as the compiler may
5796 # overwrite some of them when testing with obscure command lines.
5797 # This happens at least with the AIX C compiler.
5798 : > sub/conftest.c
5799 for i in 1 2 3 4 5 6; do
5800 echo '#include "conftst'$i'.h"' >> sub/conftest.c
5801 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
5802 # Solaris 8's {/usr,}/bin/sh.
5803 touch sub/conftst$i.h
5804 done
5805 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
5806
5807 # We check with `-c' and `-o' for the sake of the "dashmstdout"
5808 # mode. It turns out that the SunPro C++ compiler does not properly
5809 # handle `-M -o', and we need to detect this. Also, some Intel
5810 # versions had trouble with output in subdirs
5811 am__obj=sub/conftest.${OBJEXT-o}
5812 am__minus_obj="-o $am__obj"
5813 case $depmode in
5814 gcc)
5815 # This depmode causes a compiler race in universal mode.
5816 test "$am__universal" = false || continue
5817 ;;
5818 nosideeffect)
5819 # after this tag, mechanisms are not by side-effect, so they'll
5820 # only be used when explicitly requested
5821 if test "x$enable_dependency_tracking" = xyes; then
5822 continue
5823 else
5824 break
5825 fi
5826 ;;
5827 msvisualcpp | msvcmsys)
5828 # This compiler won't grok `-c -o', but also, the minuso test has
5829 # not run yet. These depmodes are late enough in the game, and
5830 # so weak that their functioning should not be impacted.
5831 am__obj=conftest.${OBJEXT-o}
5832 am__minus_obj=
5833 ;;
5834 none) break ;;
5835 esac
5836 if depmode=$depmode \
5837 source=sub/conftest.c object=$am__obj \
5838 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
5839 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
5840 >/dev/null 2>conftest.err &&
5841 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
5842 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
5843 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
5844 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
5845 # icc doesn't choke on unknown options, it will just issue warnings
5846 # or remarks (even with -Werror). So we grep stderr for any message
5847 # that says an option was ignored or not supported.
5848 # When given -MP, icc 7.0 and 7.1 complain thusly:
5849 # icc: Command line warning: ignoring option '-M'; no argument required
5850 # The diagnosis changed in icc 8.0:
5851 # icc: Command line remark: option '-MP' not supported
5852 if (grep 'ignoring option' conftest.err ||
5853 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
5854 am_cv_CC_dependencies_compiler_type=$depmode
5855 break
5856 fi
5857 fi
5858 done
5859
5860 cd ..
5861 rm -rf conftest.dir
5862else
5863 am_cv_CC_dependencies_compiler_type=none
5864fi
5865
5866fi
5867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
5868$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
5869CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
5870
5871 if
5872 test "x$enable_dependency_tracking" != xno \
5873 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
5874 am__fastdepCC_TRUE=
5875 am__fastdepCC_FALSE='#'
5876else
5877 am__fastdepCC_TRUE='#'
5878 am__fastdepCC_FALSE=
5879fi
5880
5881
5882if test "x$CC" != xcc; then
5883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5
5884$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
5885else
5886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5
5887$as_echo_n "checking whether cc understands -c and -o together... " >&6; }
5888fi
5889set dummy $CC; ac_cc=`$as_echo "$2" |
5890 sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
a9bec17c 5891if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then :
743c80a7
PE
5892 $as_echo_n "(cached) " >&6
5893else
5894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5895/* end confdefs.h. */
5896
5897int
5898main ()
5899{
5900
5901 ;
5902 return 0;
5903}
5904_ACEOF
5905# Make sure it works both with $CC and with simple cc.
5906# We do the test twice because some compilers refuse to overwrite an
5907# existing .o file with -o, though they will create one.
5908ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
5909rm -f conftest2.*
5910if { { case "(($ac_try" in
5911 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5912 *) ac_try_echo=$ac_try;;
5913esac
5914eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5915$as_echo "$ac_try_echo"; } >&5
5916 (eval "$ac_try") 2>&5
5917 ac_status=$?
5918 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5919 test $ac_status = 0; } &&
5920 test -f conftest2.$ac_objext && { { case "(($ac_try" in
5921 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5922 *) ac_try_echo=$ac_try;;
5923esac
5924eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5925$as_echo "$ac_try_echo"; } >&5
5926 (eval "$ac_try") 2>&5
5927 ac_status=$?
5928 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5929 test $ac_status = 0; };
5930then
5931 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
5932 if test "x$CC" != xcc; then
5933 # Test first that cc exists at all.
5934 if { ac_try='cc -c conftest.$ac_ext >&5'
5935 { { case "(($ac_try" in
5936 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5937 *) ac_try_echo=$ac_try;;
5938esac
5939eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5940$as_echo "$ac_try_echo"; } >&5
5941 (eval "$ac_try") 2>&5
5942 ac_status=$?
5943 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5944 test $ac_status = 0; }; }; then
5945 ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
5946 rm -f conftest2.*
5947 if { { case "(($ac_try" in
5948 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5949 *) ac_try_echo=$ac_try;;
5950esac
5951eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5952$as_echo "$ac_try_echo"; } >&5
5953 (eval "$ac_try") 2>&5
5954 ac_status=$?
5955 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5956 test $ac_status = 0; } &&
5957 test -f conftest2.$ac_objext && { { case "(($ac_try" in
5958 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5959 *) ac_try_echo=$ac_try;;
5960esac
5961eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5962$as_echo "$ac_try_echo"; } >&5
5963 (eval "$ac_try") 2>&5
5964 ac_status=$?
5965 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5966 test $ac_status = 0; };
5967 then
5968 # cc works too.
5969 :
5970 else
5971 # cc exists but doesn't like -o.
5972 eval ac_cv_prog_cc_${ac_cc}_c_o=no
5973 fi
5974 fi
5975 fi
5976else
5977 eval ac_cv_prog_cc_${ac_cc}_c_o=no
5978fi
5979rm -f core conftest*
5980
5981fi
5982if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
5983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5984$as_echo "yes" >&6; }
5985else
5986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5987$as_echo "no" >&6; }
5988
5989$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h
5990
5991fi
5992
5993# FIXME: we rely on the cache variable name because
5994# there is no other way.
5995set dummy $CC
5996am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
5997eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
5998if test "$am_t" != yes; then
5999 # Losing compiler, so override with the script.
6000 # FIXME: It is wrong to rewrite CC.
6001 # But if we don't then we get into trouble of one sort or another.
6002 # A longer-term fix would be to have automake use am__CC in this case,
6003 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
6004 CC="$am_aux_dir/compile $CC"
6005fi
6006
6007
6008
5ec54608
GM
6009if test x$GCC = xyes; then
6010 test "x$GCC_TEST_OPTIONS" != x && CC="$CC $GCC_TEST_OPTIONS"
6011else
6012 test "x$NON_GCC_TEST_OPTIONS" != x && CC="$CC $NON_GCC_TEST_OPTIONS"
6013fi
6014
7c61eaab
GM
6015 if test "x$opsys" = "xmingw32"; then
6016 BUILDING_FOR_WINDOWSNT_TRUE=
6017 BUILDING_FOR_WINDOWSNT_FALSE='#'
6018else
6019 BUILDING_FOR_WINDOWSNT_TRUE='#'
6020 BUILDING_FOR_WINDOWSNT_FALSE=
6021fi
6022
6023
34fd7a48
GM
6024# Avoid gnulib's tests for HAVE_WORKING_O_NOATIME and HAVE_WORKING_O_NOFOLLOW,
6025# as we don't use them.
710f5812 6026
f077f61d
GM
6027# Avoid gnulib's threadlib module, as we do threads our own way.
6028
6029
5ec54608 6030# Initialize gnulib right after choosing the compiler.
743c80a7 6031
067d23c9
KY
6032ac_ext=c
6033ac_cpp='$CPP $CPPFLAGS'
6034ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6035ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6036ac_compiler_gnu=$ac_cv_c_compiler_gnu
6037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
6038$as_echo_n "checking how to run the C preprocessor... " >&6; }
6039# On Suns, sometimes $CPP names a directory.
6040if test -n "$CPP" && test -d "$CPP"; then
6041 CPP=
6042fi
6043if test -z "$CPP"; then
a9bec17c 6044 if test "${ac_cv_prog_CPP+set}" = set; then :
067d23c9
KY
6045 $as_echo_n "(cached) " >&6
6046else
6047 # Double quotes because CPP needs to be expanded
6048 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
6049 do
6050 ac_preproc_ok=false
6051for ac_c_preproc_warn_flag in '' yes
6052do
6053 # Use a header file that comes with gcc, so configuring glibc
6054 # with a fresh cross-compiler works.
6055 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6056 # <limits.h> exists even on freestanding compilers.
6057 # On the NeXT, cc -E runs the code through the compiler's parser,
6058 # not just through cpp. "Syntax error" is here to catch this case.
6059 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6060/* end confdefs.h. */
6061#ifdef __STDC__
6062# include <limits.h>
6063#else
6064# include <assert.h>
6065#endif
6066 Syntax error
6067_ACEOF
6068if ac_fn_c_try_cpp "$LINENO"; then :
6069
6070else
6071 # Broken: fails on valid input.
6072continue
6073fi
a9bec17c 6074rm -f conftest.err conftest.$ac_ext
067d23c9
KY
6075
6076 # OK, works on sane cases. Now check whether nonexistent headers
6077 # can be detected and how.
6078 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6079/* end confdefs.h. */
6080#include <ac_nonexistent.h>
6081_ACEOF
6082if ac_fn_c_try_cpp "$LINENO"; then :
6083 # Broken: success on invalid input.
6084continue
6085else
6086 # Passes both tests.
6087ac_preproc_ok=:
6088break
6089fi
a9bec17c 6090rm -f conftest.err conftest.$ac_ext
067d23c9
KY
6091
6092done
6093# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
a9bec17c 6094rm -f conftest.err conftest.$ac_ext
067d23c9
KY
6095if $ac_preproc_ok; then :
6096 break
6097fi
6098
6099 done
6100 ac_cv_prog_CPP=$CPP
6101
6102fi
6103 CPP=$ac_cv_prog_CPP
6104else
6105 ac_cv_prog_CPP=$CPP
6106fi
6107{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
6108$as_echo "$CPP" >&6; }
6109ac_preproc_ok=false
6110for ac_c_preproc_warn_flag in '' yes
6111do
6112 # Use a header file that comes with gcc, so configuring glibc
6113 # with a fresh cross-compiler works.
6114 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6115 # <limits.h> exists even on freestanding compilers.
6116 # On the NeXT, cc -E runs the code through the compiler's parser,
6117 # not just through cpp. "Syntax error" is here to catch this case.
6118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6119/* end confdefs.h. */
6120#ifdef __STDC__
6121# include <limits.h>
6122#else
6123# include <assert.h>
6124#endif
6125 Syntax error
6126_ACEOF
6127if ac_fn_c_try_cpp "$LINENO"; then :
6128
6129else
6130 # Broken: fails on valid input.
6131continue
6132fi
a9bec17c 6133rm -f conftest.err conftest.$ac_ext
067d23c9
KY
6134
6135 # OK, works on sane cases. Now check whether nonexistent headers
6136 # can be detected and how.
6137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6138/* end confdefs.h. */
6139#include <ac_nonexistent.h>
6140_ACEOF
6141if ac_fn_c_try_cpp "$LINENO"; then :
6142 # Broken: success on invalid input.
6143continue
6144else
6145 # Passes both tests.
6146ac_preproc_ok=:
6147break
6148fi
a9bec17c 6149rm -f conftest.err conftest.$ac_ext
067d23c9
KY
6150
6151done
6152# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
a9bec17c 6153rm -f conftest.err conftest.$ac_ext
067d23c9
KY
6154if $ac_preproc_ok; then :
6155
6156else
6157 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6158$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
a9bec17c
GM
6159as_fn_error "C preprocessor \"$CPP\" fails sanity check
6160See \`config.log' for more details." "$LINENO" 5; }
067d23c9
KY
6161fi
6162
6163ac_ext=c
6164ac_cpp='$CPP $CPPFLAGS'
6165ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6166ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6167ac_compiler_gnu=$ac_cv_c_compiler_gnu
6168
6169
6170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6171$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
a9bec17c 6172if test "${ac_cv_path_GREP+set}" = set; then :
067d23c9
KY
6173 $as_echo_n "(cached) " >&6
6174else
6175 if test -z "$GREP"; then
6176 ac_path_GREP_found=false
6177 # Loop through the user's path and test for each of PROGNAME-LIST
6178 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6179for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6180do
6181 IFS=$as_save_IFS
6182 test -z "$as_dir" && as_dir=.
6183 for ac_prog in grep ggrep; do
6184 for ac_exec_ext in '' $ac_executable_extensions; do
6185 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6186 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
6187# Check for GNU ac_path_GREP and select it if it is found.
6188 # Check for GNU $ac_path_GREP
6189case `"$ac_path_GREP" --version 2>&1` in
6190*GNU*)
6191 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6192*)
6193 ac_count=0
6194 $as_echo_n 0123456789 >"conftest.in"
6195 while :
6196 do
6197 cat "conftest.in" "conftest.in" >"conftest.tmp"
6198 mv "conftest.tmp" "conftest.in"
6199 cp "conftest.in" "conftest.nl"
6200 $as_echo 'GREP' >> "conftest.nl"
6201 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6202 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6203 as_fn_arith $ac_count + 1 && ac_count=$as_val
6204 if test $ac_count -gt ${ac_path_GREP_max-0}; then
6205 # Best one so far, save it but keep looking for a better one
6206 ac_cv_path_GREP="$ac_path_GREP"
6207 ac_path_GREP_max=$ac_count
6208 fi
6209 # 10*(2^10) chars as input seems more than enough
6210 test $ac_count -gt 10 && break
6211 done
6212 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6213esac
6214
6215 $ac_path_GREP_found && break 3
6216 done
6217 done
6218 done
6219IFS=$as_save_IFS
6220 if test -z "$ac_cv_path_GREP"; then
a9bec17c 6221 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
067d23c9
KY
6222 fi
6223else
6224 ac_cv_path_GREP=$GREP
6225fi
6226
6227fi
6228{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6229$as_echo "$ac_cv_path_GREP" >&6; }
6230 GREP="$ac_cv_path_GREP"
6231
6232
6233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6234$as_echo_n "checking for egrep... " >&6; }
a9bec17c 6235if test "${ac_cv_path_EGREP+set}" = set; then :
067d23c9
KY
6236 $as_echo_n "(cached) " >&6
6237else
6238 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6239 then ac_cv_path_EGREP="$GREP -E"
6240 else
6241 if test -z "$EGREP"; then
6242 ac_path_EGREP_found=false
6243 # Loop through the user's path and test for each of PROGNAME-LIST
6244 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6245for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6246do
6247 IFS=$as_save_IFS
6248 test -z "$as_dir" && as_dir=.
6249 for ac_prog in egrep; do
6250 for ac_exec_ext in '' $ac_executable_extensions; do
6251 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6252 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
6253# Check for GNU ac_path_EGREP and select it if it is found.
6254 # Check for GNU $ac_path_EGREP
6255case `"$ac_path_EGREP" --version 2>&1` in
6256*GNU*)
6257 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6258*)
6259 ac_count=0
6260 $as_echo_n 0123456789 >"conftest.in"
6261 while :
6262 do
6263 cat "conftest.in" "conftest.in" >"conftest.tmp"
6264 mv "conftest.tmp" "conftest.in"
6265 cp "conftest.in" "conftest.nl"
6266 $as_echo 'EGREP' >> "conftest.nl"
6267 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6268 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6269 as_fn_arith $ac_count + 1 && ac_count=$as_val
6270 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6271 # Best one so far, save it but keep looking for a better one
6272 ac_cv_path_EGREP="$ac_path_EGREP"
6273 ac_path_EGREP_max=$ac_count
6274 fi
6275 # 10*(2^10) chars as input seems more than enough
6276 test $ac_count -gt 10 && break
6277 done
6278 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6279esac
6280
6281 $ac_path_EGREP_found && break 3
6282 done
6283 done
6284 done
6285IFS=$as_save_IFS
6286 if test -z "$ac_cv_path_EGREP"; then
a9bec17c 6287 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
067d23c9
KY
6288 fi
6289else
6290 ac_cv_path_EGREP=$EGREP
6291fi
6292
6293 fi
6294fi
6295{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6296$as_echo "$ac_cv_path_EGREP" >&6; }
6297 EGREP="$ac_cv_path_EGREP"
6298
6299
369e19fc
PE
6300
6301
6302 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
6303$as_echo_n "checking for Minix Amsterdam compiler... " >&6; }
a9bec17c 6304if test "${gl_cv_c_amsterdam_compiler+set}" = set; then :
369e19fc
PE
6305 $as_echo_n "(cached) " >&6
6306else
6307
6308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6309/* end confdefs.h. */
6310
6311#ifdef __ACK__
6312Amsterdam
6313#endif
6314
6315_ACEOF
6316if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6317 $EGREP "Amsterdam" >/dev/null 2>&1; then :
6318 gl_cv_c_amsterdam_compiler=yes
6319else
6320 gl_cv_c_amsterdam_compiler=no
6321fi
6322rm -f conftest*
6323
6324
6325fi
6326{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
6327$as_echo "$gl_cv_c_amsterdam_compiler" >&6; }
6328 if test -z "$AR"; then
6329 if test $gl_cv_c_amsterdam_compiler = yes; then
6330 AR='cc -c.a'
6331 if test -z "$ARFLAGS"; then
6332 ARFLAGS='-o'
6333 fi
6334 else
6335 if test -n "$ac_tool_prefix"; then
6336 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6337set dummy ${ac_tool_prefix}ar; ac_word=$2
6338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6339$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 6340if test "${ac_cv_prog_AR+set}" = set; then :
369e19fc
PE
6341 $as_echo_n "(cached) " >&6
6342else
6343 if test -n "$AR"; then
6344 ac_cv_prog_AR="$AR" # Let the user override the test.
6345else
6346as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6347for as_dir in $PATH
6348do
6349 IFS=$as_save_IFS
6350 test -z "$as_dir" && as_dir=.
6351 for ac_exec_ext in '' $ac_executable_extensions; do
6352 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6353 ac_cv_prog_AR="${ac_tool_prefix}ar"
6354 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6355 break 2
6356 fi
6357done
6358 done
6359IFS=$as_save_IFS
6360
6361fi
6362fi
6363AR=$ac_cv_prog_AR
6364if test -n "$AR"; then
6365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6366$as_echo "$AR" >&6; }
6367else
6368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6369$as_echo "no" >&6; }
6370fi
6371
6372
6373fi
6374if test -z "$ac_cv_prog_AR"; then
6375 ac_ct_AR=$AR
6376 # Extract the first word of "ar", so it can be a program name with args.
6377set dummy ar; ac_word=$2
6378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6379$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 6380if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
369e19fc
PE
6381 $as_echo_n "(cached) " >&6
6382else
6383 if test -n "$ac_ct_AR"; then
6384 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6385else
6386as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6387for as_dir in $PATH
6388do
6389 IFS=$as_save_IFS
6390 test -z "$as_dir" && as_dir=.
6391 for ac_exec_ext in '' $ac_executable_extensions; do
6392 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6393 ac_cv_prog_ac_ct_AR="ar"
6394 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6395 break 2
6396 fi
6397done
6398 done
6399IFS=$as_save_IFS
6400
6401fi
6402fi
6403ac_ct_AR=$ac_cv_prog_ac_ct_AR
6404if test -n "$ac_ct_AR"; then
6405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6406$as_echo "$ac_ct_AR" >&6; }
6407else
6408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6409$as_echo "no" >&6; }
6410fi
6411
6412 if test "x$ac_ct_AR" = x; then
6413 AR="ar"
6414 else
6415 case $cross_compiling:$ac_tool_warned in
6416yes:)
6417{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6418$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6419ac_tool_warned=yes ;;
6420esac
6421 AR=$ac_ct_AR
6422 fi
6423else
6424 AR="$ac_cv_prog_AR"
6425fi
6426
6427 if test -z "$ARFLAGS"; then
6428 ARFLAGS='cru'
6429 fi
6430 fi
6431 else
6432 if test -z "$ARFLAGS"; then
6433 ARFLAGS='cru'
6434 fi
6435 fi
6436
6437
6438 if test -z "$RANLIB"; then
6439 if test $gl_cv_c_amsterdam_compiler = yes; then
6440 RANLIB=':'
6441 else
6442 if test -n "$ac_tool_prefix"; then
6443 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6444set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6446$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 6447if test "${ac_cv_prog_RANLIB+set}" = set; then :
369e19fc
PE
6448 $as_echo_n "(cached) " >&6
6449else
6450 if test -n "$RANLIB"; then
6451 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6452else
6453as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6454for as_dir in $PATH
6455do
6456 IFS=$as_save_IFS
6457 test -z "$as_dir" && as_dir=.
6458 for ac_exec_ext in '' $ac_executable_extensions; do
6459 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6460 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6461 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6462 break 2
6463 fi
6464done
6465 done
6466IFS=$as_save_IFS
6467
6468fi
6469fi
6470RANLIB=$ac_cv_prog_RANLIB
6471if test -n "$RANLIB"; then
6472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6473$as_echo "$RANLIB" >&6; }
6474else
6475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6476$as_echo "no" >&6; }
6477fi
6478
6479
6480fi
6481if test -z "$ac_cv_prog_RANLIB"; then
6482 ac_ct_RANLIB=$RANLIB
6483 # Extract the first word of "ranlib", so it can be a program name with args.
6484set dummy ranlib; ac_word=$2
6485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6486$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 6487if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
369e19fc
PE
6488 $as_echo_n "(cached) " >&6
6489else
6490 if test -n "$ac_ct_RANLIB"; then
6491 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6492else
6493as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6494for as_dir in $PATH
6495do
6496 IFS=$as_save_IFS
6497 test -z "$as_dir" && as_dir=.
6498 for ac_exec_ext in '' $ac_executable_extensions; do
6499 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6500 ac_cv_prog_ac_ct_RANLIB="ranlib"
6501 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6502 break 2
6503 fi
6504done
6505 done
6506IFS=$as_save_IFS
6507
6508fi
6509fi
6510ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6511if test -n "$ac_ct_RANLIB"; then
6512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6513$as_echo "$ac_ct_RANLIB" >&6; }
6514else
6515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6516$as_echo "no" >&6; }
6517fi
6518
6519 if test "x$ac_ct_RANLIB" = x; then
6520 RANLIB=":"
6521 else
6522 case $cross_compiling:$ac_tool_warned in
6523yes:)
6524{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6525$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6526ac_tool_warned=yes ;;
6527esac
6528 RANLIB=$ac_ct_RANLIB
6529 fi
6530else
6531 RANLIB="$ac_cv_prog_RANLIB"
6532fi
6533
6534 fi
6535 fi
6536
6537
067d23c9
KY
6538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6539$as_echo_n "checking for ANSI C header files... " >&6; }
a9bec17c 6540if test "${ac_cv_header_stdc+set}" = set; then :
067d23c9
KY
6541 $as_echo_n "(cached) " >&6
6542else
6543 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6544/* end confdefs.h. */
6545#include <stdlib.h>
6546#include <stdarg.h>
6547#include <string.h>
6548#include <float.h>
6549
6550int
6551main ()
6552{
6553
6554 ;
6555 return 0;
6556}
6557_ACEOF
6558if ac_fn_c_try_compile "$LINENO"; then :
6559 ac_cv_header_stdc=yes
6560else
6561 ac_cv_header_stdc=no
6562fi
6563rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6564
6565if test $ac_cv_header_stdc = yes; then
6566 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6567 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6568/* end confdefs.h. */
6569#include <string.h>
6570
6571_ACEOF
6572if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6573 $EGREP "memchr" >/dev/null 2>&1; then :
6574
6575else
6576 ac_cv_header_stdc=no
6577fi
6578rm -f conftest*
6579
6580fi
6581
6582if test $ac_cv_header_stdc = yes; then
6583 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6584 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6585/* end confdefs.h. */
6586#include <stdlib.h>
6587
6588_ACEOF
6589if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6590 $EGREP "free" >/dev/null 2>&1; then :
6591
6592else
6593 ac_cv_header_stdc=no
6594fi
6595rm -f conftest*
6596
6597fi
6598
6599if test $ac_cv_header_stdc = yes; then
6600 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6601 if test "$cross_compiling" = yes; then :
6602 :
6603else
6604 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6605/* end confdefs.h. */
6606#include <ctype.h>
6607#include <stdlib.h>
6608#if ((' ' & 0x0FF) == 0x020)
6609# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6610# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6611#else
6612# define ISLOWER(c) \
6613 (('a' <= (c) && (c) <= 'i') \
6614 || ('j' <= (c) && (c) <= 'r') \
6615 || ('s' <= (c) && (c) <= 'z'))
6616# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6617#endif
6618
6619#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6620int
6621main ()
6622{
6623 int i;
6624 for (i = 0; i < 256; i++)
6625 if (XOR (islower (i), ISLOWER (i))
6626 || toupper (i) != TOUPPER (i))
6627 return 2;
6628 return 0;
6629}
6630_ACEOF
6631if ac_fn_c_try_run "$LINENO"; then :
6632
6633else
6634 ac_cv_header_stdc=no
6635fi
6636rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6637 conftest.$ac_objext conftest.beam conftest.$ac_ext
6638fi
6639
6640fi
6641fi
6642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6643$as_echo "$ac_cv_header_stdc" >&6; }
6644if test $ac_cv_header_stdc = yes; then
6645
6646$as_echo "#define STDC_HEADERS 1" >>confdefs.h
6647
6648fi
6649
6650# On IRIX 5.3, sys/types and inttypes.h are conflicting.
6651for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
6652 inttypes.h stdint.h unistd.h
6653do :
6654 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6655ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
6656"
a9bec17c
GM
6657eval as_val=\$$as_ac_Header
6658 if test "x$as_val" = x""yes; then :
067d23c9
KY
6659 cat >>confdefs.h <<_ACEOF
6660#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6661_ACEOF
6662
6663fi
6664
6665done
6666
6667
6668
6669 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
a9bec17c 6670if test "x$ac_cv_header_minix_config_h" = x""yes; then :
067d23c9
KY
6671 MINIX=yes
6672else
6673 MINIX=
6674fi
6675
6676
6677 if test "$MINIX" = yes; then
6678
6679$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
6680
6681
6682$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
6683
6684
6685$as_echo "#define _MINIX 1" >>confdefs.h
6686
1fd182f0 6687
2cdd55fc 6688$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
1fd182f0 6689
2cdd55fc 6690 fi
1fd182f0 6691
067d23c9
KY
6692
6693 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
6694$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
a9bec17c 6695if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
067d23c9
KY
6696 $as_echo_n "(cached) " >&6
6697else
6698 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6699/* end confdefs.h. */
369e19fc
PE
6700
6701# define __EXTENSIONS__ 1
6702 $ac_includes_default
6703int
6704main ()
6705{
6706
6707 ;
6708 return 0;
6709}
6710_ACEOF
6711if ac_fn_c_try_compile "$LINENO"; then :
6712 ac_cv_safe_to_define___extensions__=yes
6713else
6714 ac_cv_safe_to_define___extensions__=no
6715fi
6716rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6717fi
6718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
6719$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
6720 test $ac_cv_safe_to_define___extensions__ = yes &&
6721 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
6722
6723 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
6724
6725 $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
6726
6727 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
6728
6729 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
6730
6731 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
6732
2cdd55fc
GM
6733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
6734$as_echo_n "checking whether _XOPEN_SOURCE should be defined... " >&6; }
6735if test "${ac_cv_should_define__xopen_source+set}" = set; then :
6736 $as_echo_n "(cached) " >&6
6737else
6738 ac_cv_should_define__xopen_source=no
6739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6740/* end confdefs.h. */
6741
6742 #include <wchar.h>
6743 mbstate_t x;
6744int
6745main ()
6746{
6747
6748 ;
6749 return 0;
6750}
6751_ACEOF
6752if ac_fn_c_try_compile "$LINENO"; then :
6753
6754else
6755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6756/* end confdefs.h. */
6757
6758 #define _XOPEN_SOURCE 500
6759 #include <wchar.h>
6760 mbstate_t x;
6761int
6762main ()
6763{
6764
6765 ;
6766 return 0;
6767}
6768_ACEOF
6769if ac_fn_c_try_compile "$LINENO"; then :
6770 ac_cv_should_define__xopen_source=yes
6771fi
6772rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6773fi
6774rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6775fi
6776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
6777$as_echo "$ac_cv_should_define__xopen_source" >&6; }
6778 test $ac_cv_should_define__xopen_source = yes &&
6779 $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
6780
369e19fc
PE
6781
6782
6783
6784
6785
6786
6787
6788# Check whether --enable-largefile was given.
6789if test "${enable_largefile+set}" = set; then :
6790 enableval=$enable_largefile;
6791fi
6792
6793if test "$enable_largefile" != no; then
6794
6795 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
6796$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
a9bec17c 6797if test "${ac_cv_sys_largefile_CC+set}" = set; then :
369e19fc
PE
6798 $as_echo_n "(cached) " >&6
6799else
6800 ac_cv_sys_largefile_CC=no
6801 if test "$GCC" != yes; then
6802 ac_save_CC=$CC
6803 while :; do
6804 # IRIX 6.2 and later do not support large files by default,
6805 # so use the C compiler's -n32 option if that helps.
6806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6807/* end confdefs.h. */
6808#include <sys/types.h>
6809 /* Check that off_t can represent 2**63 - 1 correctly.
6810 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6811 since some C++ compilers masquerading as C compilers
6812 incorrectly reject 9223372036854775807. */
6813#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6814 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6815 && LARGE_OFF_T % 2147483647 == 1)
6816 ? 1 : -1];
6817int
6818main ()
6819{
6820
6821 ;
6822 return 0;
6823}
6824_ACEOF
6825 if ac_fn_c_try_compile "$LINENO"; then :
6826 break
6827fi
6828rm -f core conftest.err conftest.$ac_objext
6829 CC="$CC -n32"
6830 if ac_fn_c_try_compile "$LINENO"; then :
6831 ac_cv_sys_largefile_CC=' -n32'; break
6832fi
6833rm -f core conftest.err conftest.$ac_objext
6834 break
6835 done
6836 CC=$ac_save_CC
6837 rm -f conftest.$ac_ext
6838 fi
6839fi
6840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
6841$as_echo "$ac_cv_sys_largefile_CC" >&6; }
6842 if test "$ac_cv_sys_largefile_CC" != no; then
6843 CC=$CC$ac_cv_sys_largefile_CC
6844 fi
6845
6846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
6847$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
a9bec17c 6848if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
369e19fc
PE
6849 $as_echo_n "(cached) " >&6
6850else
6851 while :; do
6852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6853/* end confdefs.h. */
6854#include <sys/types.h>
6855 /* Check that off_t can represent 2**63 - 1 correctly.
6856 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6857 since some C++ compilers masquerading as C compilers
6858 incorrectly reject 9223372036854775807. */
6859#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6860 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6861 && LARGE_OFF_T % 2147483647 == 1)
6862 ? 1 : -1];
6863int
6864main ()
6865{
6866
6867 ;
6868 return 0;
6869}
6870_ACEOF
6871if ac_fn_c_try_compile "$LINENO"; then :
6872 ac_cv_sys_file_offset_bits=no; break
6873fi
6874rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6876/* end confdefs.h. */
6877#define _FILE_OFFSET_BITS 64
6878#include <sys/types.h>
6879 /* Check that off_t can represent 2**63 - 1 correctly.
6880 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6881 since some C++ compilers masquerading as C compilers
6882 incorrectly reject 9223372036854775807. */
6883#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6884 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6885 && LARGE_OFF_T % 2147483647 == 1)
6886 ? 1 : -1];
6887int
6888main ()
6889{
6890
6891 ;
6892 return 0;
6893}
6894_ACEOF
6895if ac_fn_c_try_compile "$LINENO"; then :
6896 ac_cv_sys_file_offset_bits=64; break
6897fi
6898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6899 ac_cv_sys_file_offset_bits=unknown
6900 break
6901done
6902fi
6903{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
6904$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
6905case $ac_cv_sys_file_offset_bits in #(
6906 no | unknown) ;;
6907 *)
6908cat >>confdefs.h <<_ACEOF
6909#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
6910_ACEOF
6911;;
6912esac
6913rm -rf conftest*
6914 if test $ac_cv_sys_file_offset_bits = unknown; then
6915 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
6916$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
a9bec17c 6917if test "${ac_cv_sys_large_files+set}" = set; then :
369e19fc
PE
6918 $as_echo_n "(cached) " >&6
6919else
6920 while :; do
6921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6922/* end confdefs.h. */
6923#include <sys/types.h>
6924 /* Check that off_t can represent 2**63 - 1 correctly.
6925 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6926 since some C++ compilers masquerading as C compilers
6927 incorrectly reject 9223372036854775807. */
6928#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6929 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6930 && LARGE_OFF_T % 2147483647 == 1)
6931 ? 1 : -1];
6932int
6933main ()
6934{
6935
6936 ;
6937 return 0;
6938}
6939_ACEOF
6940if ac_fn_c_try_compile "$LINENO"; then :
6941 ac_cv_sys_large_files=no; break
6942fi
6943rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6945/* end confdefs.h. */
6946#define _LARGE_FILES 1
6947#include <sys/types.h>
6948 /* Check that off_t can represent 2**63 - 1 correctly.
6949 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6950 since some C++ compilers masquerading as C compilers
6951 incorrectly reject 9223372036854775807. */
6952#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6953 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6954 && LARGE_OFF_T % 2147483647 == 1)
6955 ? 1 : -1];
067d23c9
KY
6956int
6957main ()
6958{
6959
6960 ;
6961 return 0;
6962}
6963_ACEOF
6964if ac_fn_c_try_compile "$LINENO"; then :
369e19fc 6965 ac_cv_sys_large_files=1; break
067d23c9
KY
6966fi
6967rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
369e19fc
PE
6968 ac_cv_sys_large_files=unknown
6969 break
6970done
067d23c9 6971fi
369e19fc
PE
6972{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
6973$as_echo "$ac_cv_sys_large_files" >&6; }
6974case $ac_cv_sys_large_files in #(
6975 no | unknown) ;;
6976 *)
6977cat >>confdefs.h <<_ACEOF
6978#define _LARGE_FILES $ac_cv_sys_large_files
6979_ACEOF
6980;;
6981esac
6982rm -rf conftest*
6983 fi
1fd182f0
PE
6984
6985
858c7150
GM
6986$as_echo "#define _DARWIN_USE_64_BIT_INODE 1" >>confdefs.h
6987
369e19fc 6988fi
1fd182f0 6989
6d153f56
GM
6990 case $ac_cv_prog_cc_stdc in #(
6991 no) :
6992 ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; #(
6993 *) :
6994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
6995$as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
a9bec17c 6996if test "${ac_cv_prog_cc_c99+set}" = set; then :
6d153f56
GM
6997 $as_echo_n "(cached) " >&6
6998else
6999 ac_cv_prog_cc_c99=no
7000ac_save_CC=$CC
7001cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7002/* end confdefs.h. */
7003#include <stdarg.h>
7004#include <stdbool.h>
7005#include <stdlib.h>
7006#include <wchar.h>
7007#include <stdio.h>
7008
7009// Check varargs macros. These examples are taken from C99 6.10.3.5.
7010#define debug(...) fprintf (stderr, __VA_ARGS__)
7011#define showlist(...) puts (#__VA_ARGS__)
7012#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
7013static void
7014test_varargs_macros (void)
7015{
7016 int x = 1234;
7017 int y = 5678;
7018 debug ("Flag");
7019 debug ("X = %d\n", x);
7020 showlist (The first, second, and third items.);
7021 report (x>y, "x is %d but y is %d", x, y);
7022}
7023
7024// Check long long types.
7025#define BIG64 18446744073709551615ull
7026#define BIG32 4294967295ul
7027#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
7028#if !BIG_OK
7029 your preprocessor is broken;
7030#endif
7031#if BIG_OK
7032#else
7033 your preprocessor is broken;
7034#endif
7035static long long int bignum = -9223372036854775807LL;
7036static unsigned long long int ubignum = BIG64;
7037
7038struct incomplete_array
7039{
7040 int datasize;
7041 double data[];
7042};
7043
7044struct named_init {
7045 int number;
7046 const wchar_t *name;
7047 double average;
7048};
7049
7050typedef const char *ccp;
7051
7052static inline int
7053test_restrict (ccp restrict text)
7054{
7055 // See if C++-style comments work.
7056 // Iterate through items via the restricted pointer.
7057 // Also check for declarations in for loops.
7058 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
7059 continue;
7060 return 0;
7061}
7062
7063// Check varargs and va_copy.
7064static void
7065test_varargs (const char *format, ...)
7066{
7067 va_list args;
7068 va_start (args, format);
7069 va_list args_copy;
7070 va_copy (args_copy, args);
7071
7072 const char *str;
7073 int number;
7074 float fnumber;
7075
7076 while (*format)
7077 {
7078 switch (*format++)
7079 {
7080 case 's': // string
7081 str = va_arg (args_copy, const char *);
7082 break;
7083 case 'd': // int
7084 number = va_arg (args_copy, int);
7085 break;
7086 case 'f': // float
7087 fnumber = va_arg (args_copy, double);
7088 break;
7089 default:
7090 break;
7091 }
7092 }
7093 va_end (args_copy);
7094 va_end (args);
7095}
7096
7097int
7098main ()
7099{
7100
7101 // Check bool.
7102 _Bool success = false;
7103
7104 // Check restrict.
7105 if (test_restrict ("String literal") == 0)
7106 success = true;
7107 char *restrict newvar = "Another string";
7108
7109 // Check varargs.
7110 test_varargs ("s, d' f .", "string", 65, 34.234);
7111 test_varargs_macros ();
7112
7113 // Check flexible array members.
7114 struct incomplete_array *ia =
7115 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
7116 ia->datasize = 10;
7117 for (int i = 0; i < ia->datasize; ++i)
7118 ia->data[i] = i * 1.234;
7119
7120 // Check named initializers.
7121 struct named_init ni = {
7122 .number = 34,
7123 .name = L"Test wide string",
7124 .average = 543.34343,
7125 };
7126
7127 ni.number = 58;
7128
7129 int dynamic_array[ni.number];
7130 dynamic_array[ni.number - 1] = 543;
7131
7132 // work around unused variable warnings
7133 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
7134 || dynamic_array[ni.number - 1] != 543);
7135
7136 ;
7137 return 0;
7138}
7139_ACEOF
7140for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99
7141do
7142 CC="$ac_save_CC $ac_arg"
7143 if ac_fn_c_try_compile "$LINENO"; then :
7144 ac_cv_prog_cc_c99=$ac_arg
7145fi
7146rm -f core conftest.err conftest.$ac_objext
7147 test "x$ac_cv_prog_cc_c99" != "xno" && break
7148done
7149rm -f conftest.$ac_ext
7150CC=$ac_save_CC
7151
7152fi
7153# AC_CACHE_VAL
7154case "x$ac_cv_prog_cc_c99" in
7155 x)
7156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
7157$as_echo "none needed" >&6; } ;;
7158 xno)
7159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
7160$as_echo "unsupported" >&6; } ;;
7161 *)
7162 CC="$CC $ac_cv_prog_cc_c99"
7163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
7164$as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
7165esac
7166if test "x$ac_cv_prog_cc_c99" != xno; then :
7167 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
7168else
7169 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
7170$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
a9bec17c 7171if test "${ac_cv_prog_cc_c89+set}" = set; then :
6d153f56
GM
7172 $as_echo_n "(cached) " >&6
7173else
7174 ac_cv_prog_cc_c89=no
7175ac_save_CC=$CC
7176cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7177/* end confdefs.h. */
7178#include <stdarg.h>
7179#include <stdio.h>
7180#include <sys/types.h>
7181#include <sys/stat.h>
7182/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
7183struct buf { int x; };
7184FILE * (*rcsopen) (struct buf *, struct stat *, int);
7185static char *e (p, i)
7186 char **p;
7187 int i;
7188{
7189 return p[i];
7190}
7191static char *f (char * (*g) (char **, int), char **p, ...)
7192{
7193 char *s;
7194 va_list v;
7195 va_start (v,p);
7196 s = g (p, va_arg (v,int));
7197 va_end (v);
7198 return s;
7199}
7200
7201/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
7202 function prototypes and stuff, but not '\xHH' hex character constants.
7203 These don't provoke an error unfortunately, instead are silently treated
7204 as 'x'. The following induces an error, until -std is added to get
7205 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
7206 array size at least. It's necessary to write '\x00'==0 to get something
7207 that's true only with -std. */
7208int osf4_cc_array ['\x00' == 0 ? 1 : -1];
7209
7210/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
7211 inside strings and character constants. */
7212#define FOO(x) 'x'
7213int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
7214
7215int test (int i, double x);
7216struct s1 {int (*f) (int a);};
7217struct s2 {int (*f) (double a);};
7218int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
7219int argc;
7220char **argv;
7221int
7222main ()
7223{
7224return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
7225 ;
7226 return 0;
7227}
7228_ACEOF
7229for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
7230 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
7231do
7232 CC="$ac_save_CC $ac_arg"
7233 if ac_fn_c_try_compile "$LINENO"; then :
7234 ac_cv_prog_cc_c89=$ac_arg
7235fi
7236rm -f core conftest.err conftest.$ac_objext
7237 test "x$ac_cv_prog_cc_c89" != "xno" && break
7238done
7239rm -f conftest.$ac_ext
7240CC=$ac_save_CC
7241
7242fi
7243# AC_CACHE_VAL
7244case "x$ac_cv_prog_cc_c89" in
7245 x)
7246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
7247$as_echo "none needed" >&6; } ;;
7248 xno)
7249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
7250$as_echo "unsupported" >&6; } ;;
7251 *)
7252 CC="$CC $ac_cv_prog_cc_c89"
7253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
7254$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
7255esac
7256if test "x$ac_cv_prog_cc_c89" != xno; then :
7257 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
7258else
7259 ac_cv_prog_cc_stdc=no
7260fi
7261
7262fi
7263 ;;
7264esac
7265 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5
7266$as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; }
a9bec17c 7267 if test "${ac_cv_prog_cc_stdc+set}" = set; then :
6d153f56
GM
7268 $as_echo_n "(cached) " >&6
7269fi
7270
7271 case $ac_cv_prog_cc_stdc in #(
7272 no) :
7273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
7274$as_echo "unsupported" >&6; } ;; #(
7275 '') :
7276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
7277$as_echo "none needed" >&6; } ;; #(
7278 *) :
7279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_stdc" >&5
7280$as_echo "$ac_cv_prog_cc_stdc" >&6; } ;;
7281esac
7282
1fd182f0
PE
7283
7284
4fc2b746 7285 # Code from module alloca-opt:
8d8af66d 7286 # Code from module allocator:
d7ad186c 7287 # Code from module at-internal:
20c9c1dc 7288 # Code from module binary-io:
938a4ef9
GM
7289 # Code from module c-ctype:
7290 # Code from module c-strcase:
6c051bab 7291 # Code from module careadlinkat:
f199cab1 7292 # Code from module clock-time:
3bf26e96 7293 # Code from module close-stream:
942f733f 7294 # Code from module crypto/md5:
40e27e7f 7295 # Code from module crypto/sha1:
d87ffdb7
GM
7296 # Code from module crypto/sha256:
7297 # Code from module crypto/sha512:
d7ad186c 7298 # Code from module dirent:
36f13e16 7299 # Code from module dosname:
f737437b 7300 # Code from module dtoastr:
f199cab1 7301 # Code from module dtotimespec:
7d2a1c5e 7302 # Code from module dup2:
93131e11 7303 # Code from module environ:
3a019ab4 7304 # Code from module errno:
710f5812 7305 # Code from module euidaccess:
8966cbff 7306 # Code from module execinfo:
1fd182f0
PE
7307 # Code from module extensions:
7308
7cd2ed2c 7309 # Code from module extern-inline:
710f5812 7310 # Code from module faccessat:
0cdca42a 7311 # Code from module fcntl:
710f5812 7312 # Code from module fcntl-h:
2407788f 7313 # Code from module fdatasync:
d7ad186c 7314 # Code from module fdopendir:
5fa4ac76 7315 # Code from module filemode:
3bf26e96 7316 # Code from module fpending:
d7ad186c 7317 # Code from module fstatat:
2407788f 7318 # Code from module fsync:
0cdca42a 7319 # Code from module getdtablesize:
710f5812 7320 # Code from module getgroups:
1f5d53eb 7321 # Code from module getloadavg:
e275c824
PE
7322 # Code from module getopt-gnu:
7323 # Code from module getopt-posix:
7324 # Code from module gettext-h:
f199cab1
GM
7325 # Code from module gettime:
7326 # Code from module gettimeofday:
710f5812 7327 # Code from module group-member:
1fd182f0
PE
7328 # Code from module include_next:
7329 # Code from module intprops:
4fda9c95 7330 # Code from module inttypes-incomplete:
369e19fc
PE
7331 # Code from module largefile:
7332
ae0d7250 7333 # Code from module lstat:
ac1ca7e9 7334 # Code from module manywarnings:
283c7aed 7335 # Code from module memrchr:
e412eb97 7336 # Code from module mkostemp:
1fd182f0
PE
7337 # Code from module mktime:
7338 # Code from module multiarch:
369e19fc 7339 # Code from module nocrash:
d7ad186c 7340 # Code from module openat-h:
a0a61e58 7341 # Code from module pathmax:
0cdca42a 7342 # Code from module pipe2:
f199cab1 7343 # Code from module pselect:
3e0be4ab 7344 # Code from module pthread_sigmask:
b5591ebb 7345 # Code from module putenv:
3a019ab4 7346 # Code from module qacl:
ae0d7250 7347 # Code from module readlink:
d7ad186c 7348 # Code from module readlinkat:
710f5812 7349 # Code from module root-uid:
e412eb97 7350 # Code from module secure_getenv:
e4184a20 7351 # Code from module sig2str:
2b1928b8 7352 # Code from module signal-h:
369e19fc
PE
7353 # Code from module snippet/_Noreturn:
7354 # Code from module snippet/arg-nonnull:
7355 # Code from module snippet/c++defs:
7356 # Code from module snippet/warn-on-use:
6ad6792b 7357 # Code from module socklen:
6c051bab 7358 # Code from module ssize_t:
ae0d7250 7359 # Code from module stat:
f199cab1 7360 # Code from module stat-time:
0eb775a3 7361 # Code from module stdalign:
6d153f56
GM
7362 # Code from module stdarg:
7363
8c069cc7
GM
7364
7365
16c3e636 7366 # Code from module stdbool:
1fd182f0 7367 # Code from module stddef:
5f90be1b 7368 # Code from module stdint:
6ad6792b 7369 # Code from module stdio:
1f5d53eb 7370 # Code from module stdlib:
16c3e636 7371 # Code from module strftime:
283c7aed 7372 # Code from module string:
3e0be4ab
GM
7373 # Code from module strtoimax:
7374 # Code from module strtoll:
4fda9c95
GM
7375 # Code from module strtoull:
7376 # Code from module strtoumax:
ae0d7250 7377 # Code from module symlink:
f199cab1 7378 # Code from module sys_select:
5fa4ac76 7379 # Code from module sys_stat:
f199cab1 7380 # Code from module sys_time:
e412eb97 7381 # Code from module tempname:
1fd182f0
PE
7382 # Code from module time:
7383 # Code from module time_r:
f077f61d 7384 # Code from module timer-time:
f199cab1
GM
7385 # Code from module timespec:
7386 # Code from module timespec-add:
7387 # Code from module timespec-sub:
d87ffdb7 7388 # Code from module u64:
e275c824 7389 # Code from module unistd:
b5591ebb 7390 # Code from module unsetenv:
f199cab1 7391 # Code from module utimens:
4fda9c95 7392 # Code from module verify:
ac1ca7e9 7393 # Code from module warnings:
710f5812 7394 # Code from module xalloc-oversized:
1fd182f0
PE
7395
7396
6bd1cda5 7397if test "$ac_test_CFLAGS" != set; then
8beecaed
GM
7398 # It's helpful to have C macros available to GDB, so prefer -g3 to -g
7399 # if -g3 works and the user does not specify CFLAGS.
7400 # This test must follow gl_EARLY; otherwise AC_LINK_IFELSE complains.
6bd1cda5
GM
7401 case $CFLAGS in
7402 '-g')
7403 emacs_g3_CFLAGS='-g3';;
7404 '-g -O2')
7405 emacs_g3_CFLAGS='-g3 -O2';;
7406 *)
7407 emacs_g3_CFLAGS='';;
7408 esac
7409 if test -n "$emacs_g3_CFLAGS"; then
7410 emacs_save_CFLAGS=$CFLAGS
7411 CFLAGS=$emacs_g3_CFLAGS
7412 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts $emacs_g3_CFLAGS" >&5
7413$as_echo_n "checking whether $CC accepts $emacs_g3_CFLAGS... " >&6; }
7414if test "${emacs_cv_prog_cc_g3+set}" = set; then :
7415 $as_echo_n "(cached) " >&6
7416else
7417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7418/* end confdefs.h. */
7419
7420int
7421main ()
7422{
7423
7424 ;
7425 return 0;
7426}
7427_ACEOF
7428if ac_fn_c_try_link "$LINENO"; then :
7429 emacs_cv_prog_cc_g3=yes
7430else
7431 emacs_cv_prog_cc_g3=no
7432fi
7433rm -f core conftest.err conftest.$ac_objext \
7434 conftest$ac_exeext conftest.$ac_ext
7435fi
7436{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_prog_cc_g3" >&5
7437$as_echo "$emacs_cv_prog_cc_g3" >&6; }
8beecaed 7438 if test $emacs_cv_prog_cc_g3 != yes; then
6bd1cda5
GM
7439 CFLAGS=$emacs_save_CFLAGS
7440 fi
7c61eaab
GM
7441 if test $opsys = mingw32; then
7442 CFLAGS="$CFLAGS -gdwarf-2"
7443 fi
6bd1cda5 7444 fi
8beecaed
GM
7445
7446 case $CFLAGS in
7447 *-O*) ;;
7448 *)
7449 # No optimization flag was inferred for this non-GCC compiler.
7450 # Try -O. This is needed for xlc on AIX; see Bug#14258.
7451 emacs_save_CFLAGS=$CFLAGS
7452 test -z "$CFLAGS" || CFLAGS="$CFLAGS "
7453 CFLAGS=${CFLAGS}-O
7454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -O" >&5
7455$as_echo_n "checking whether $CC accepts -O... " >&6; }
7456if test "${emacs_cv_prog_cc_o+set}" = set; then :
7457 $as_echo_n "(cached) " >&6
7458else
7459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7460/* end confdefs.h. */
7461
7462int
7463main ()
7464{
7465
7466 ;
7467 return 0;
7468}
7469_ACEOF
7470if ac_fn_c_try_link "$LINENO"; then :
7471 emacs_cv_prog_cc_o=yes
7472else
7473 emacs_cv_prog_cc_o=no
7474fi
7475rm -f core conftest.err conftest.$ac_objext \
7476 conftest$ac_exeext conftest.$ac_ext
7477fi
7478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_prog_cc_o" >&5
7479$as_echo "$emacs_cv_prog_cc_o" >&6; }
7480 if test $emacs_cv_prog_cc_o != yes; then
7481 CFLAGS=$emacs_save_CFLAGS
7482 fi ;;
7483 esac
6bd1cda5
GM
7484fi
7485
a6b92a4a
GM
7486# Check whether --enable-gcc-warnings was given.
7487if test "${enable_gcc_warnings+set}" = set; then :
7488 enableval=$enable_gcc_warnings; case $enableval in
7489 yes|no) ;;
7490 *) as_fn_error "bad value $enableval for gcc-warnings option" "$LINENO" 5 ;;
7491 esac
7492 gl_gcc_warnings=$enableval
7493else
7494 gl_gcc_warnings=no
7495
7496fi
7497
7498
e4d35030
GM
7499# Check whether --enable-link-time-optimization was given.
7500if test "${enable_link_time_optimization+set}" = set; then :
7501 enableval=$enable_link_time_optimization; if test "${enableval}" != "no"; then
7502 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether link-time optimization is supported" >&5
7503$as_echo_n "checking whether link-time optimization is supported... " >&6; }
7504 ac_lto_supported=no
7505 if test x$GCC = xyes; then
7506 CPUS=`getconf _NPROCESSORS_ONLN 2>/dev/null`
7507 if test x$CPUS != x; then
7508 LTO="-flto=$CPUS"
7509 else
7510 LTO="-flto"
7511 fi
7512 old_CFLAGS=$CFLAGS
7513 CFLAGS="$CFLAGS $LTO"
7514 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7515/* end confdefs.h. */
7516
7517int
7518main ()
7519{
7520
7521 ;
7522 return 0;
7523}
7524_ACEOF
7525if ac_fn_c_try_compile "$LINENO"; then :
7526 ac_lto_supported=yes
7527else
7528 ac_lto_supported=no
7529fi
7530rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7531 CFLAGS="$old_CFLAGS"
7532 fi
7533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_lto_supported" >&5
7534$as_echo "$ac_lto_supported" >&6; }
7535 if test "$ac_lto_supported" = "yes"; then
7536 CFLAGS="$CFLAGS $LTO"
7537 fi
7538fi
7539fi
7540
7541
a6b92a4a
GM
7542# gl_GCC_VERSION_IFELSE([major], [minor], [run-if-found], [run-if-not-found])
7543# ------------------------------------------------
7544# If $CPP is gcc-MAJOR.MINOR or newer, then run RUN-IF-FOUND.
7545# Otherwise, run RUN-IF-NOT-FOUND.
7546
7547
bab4f76d
GM
7548# clang is unduly picky about some things.
7549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler is clang" >&5
7550$as_echo_n "checking whether the compiler is clang... " >&6; }
7551if test "${emacs_cv_clang+set}" = set; then :
7552 $as_echo_n "(cached) " >&6
7553else
7554 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7555/* end confdefs.h. */
7556
7557 #ifndef __clang__
7558 #error "not clang"
7559 #endif
7560
7561int
7562main ()
7563{
7564
7565 ;
7566 return 0;
7567}
7568_ACEOF
7569if ac_fn_c_try_compile "$LINENO"; then :
7570 emacs_cv_clang=yes
7571else
7572 emacs_cv_clang=no
7573fi
7574rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7575fi
7576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_clang" >&5
7577$as_echo "$emacs_cv_clang" >&6; }
7578
a6b92a4a
GM
7579# When compiling with GCC, prefer -isystem to -I when including system
7580# include files, to avoid generating useless diagnostics for the files.
7581if test "$gl_gcc_warnings" != yes; then
7582 isystem='-I'
bab4f76d
GM
7583 if test "$emacs_cv_clang" = yes
7584 then
7585 # Turn off some warnings if supported.
7586 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror -Wunknown-warning-option" >&5
dcfda130
GM
7587$as_echo_n "checking whether C compiler handles -Werror -Wunknown-warning-option... " >&6; }
7588if test "${gl_cv_warn_c__Werror__Wunknown_warning_option+set}" = set; then :
7589 $as_echo_n "(cached) " >&6
7590else
7591
7592 gl_save_compiler_FLAGS="$CFLAGS"
7593 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror -Wunknown-warning-option"
7594 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7595/* end confdefs.h. */
7596
7597int
7598main ()
7599{
7600
7601 ;
7602 return 0;
7603}
7604_ACEOF
ec165e83 7605if ac_fn_c_try_link "$LINENO"; then :
dcfda130
GM
7606 gl_cv_warn_c__Werror__Wunknown_warning_option=yes
7607else
7608 gl_cv_warn_c__Werror__Wunknown_warning_option=no
7609fi
ec165e83
GM
7610rm -f core conftest.err conftest.$ac_objext \
7611 conftest$ac_exeext conftest.$ac_ext
dcfda130
GM
7612 CFLAGS="$gl_save_compiler_FLAGS"
7613
7614fi
7615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror__Wunknown_warning_option" >&5
7616$as_echo "$gl_cv_warn_c__Werror__Wunknown_warning_option" >&6; }
7617if test "x$gl_cv_warn_c__Werror__Wunknown_warning_option" = x""yes; then :
7618 gl_unknown_warnings_are_errors='-Wunknown-warning-option -Werror'
7619else
7620 gl_unknown_warnings_are_errors=
7621fi
7622
7623
bab4f76d
GM
7624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-switch" >&5
7625$as_echo_n "checking whether C compiler handles -Wno-switch... " >&6; }
7626if test "${gl_cv_warn_c__Wno_switch+set}" = set; then :
7627 $as_echo_n "(cached) " >&6
7628else
7629
7630 gl_save_compiler_FLAGS="$CFLAGS"
7631 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wswitch"
7632 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7633/* end confdefs.h. */
7634
7635int
7636main ()
7637{
7638
7639 ;
7640 return 0;
7641}
7642_ACEOF
ec165e83 7643if ac_fn_c_try_link "$LINENO"; then :
bab4f76d
GM
7644 gl_cv_warn_c__Wno_switch=yes
7645else
7646 gl_cv_warn_c__Wno_switch=no
7647fi
ec165e83
GM
7648rm -f core conftest.err conftest.$ac_objext \
7649 conftest$ac_exeext conftest.$ac_ext
bab4f76d
GM
7650 CFLAGS="$gl_save_compiler_FLAGS"
7651
7652fi
7653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_switch" >&5
7654$as_echo "$gl_cv_warn_c__Wno_switch" >&6; }
7655if test "x$gl_cv_warn_c__Wno_switch" = x""yes; then :
7656 as_fn_append WARN_CFLAGS " -Wno-switch"
7657fi
7658
7659
7660
7661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-tautological-constant-out-of-range-compare" >&5
7662$as_echo_n "checking whether C compiler handles -Wno-tautological-constant-out-of-range-compare... " >&6; }
7663if test "${gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare+set}" = set; then :
7664 $as_echo_n "(cached) " >&6
7665else
7666
7667 gl_save_compiler_FLAGS="$CFLAGS"
7668 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wtautological-constant-out-of-range-compare"
7669 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7670/* end confdefs.h. */
7671
7672int
7673main ()
7674{
7675
7676 ;
7677 return 0;
7678}
7679_ACEOF
ec165e83 7680if ac_fn_c_try_link "$LINENO"; then :
bab4f76d
GM
7681 gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare=yes
7682else
7683 gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare=no
7684fi
ec165e83
GM
7685rm -f core conftest.err conftest.$ac_objext \
7686 conftest$ac_exeext conftest.$ac_ext
bab4f76d
GM
7687 CFLAGS="$gl_save_compiler_FLAGS"
7688
7689fi
7690{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare" >&5
7691$as_echo "$gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare" >&6; }
7692if test "x$gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare" = x""yes; then :
7693 as_fn_append WARN_CFLAGS " -Wno-tautological-constant-out-of-range-compare"
7694fi
7695
7696
7697
7698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-pointer-sign" >&5
7699$as_echo_n "checking whether C compiler handles -Wno-pointer-sign... " >&6; }
7700if test "${gl_cv_warn_c__Wno_pointer_sign+set}" = set; then :
7701 $as_echo_n "(cached) " >&6
7702else
7703
7704 gl_save_compiler_FLAGS="$CFLAGS"
7705 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wpointer-sign"
7706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7707/* end confdefs.h. */
7708
7709int
7710main ()
7711{
7712
7713 ;
7714 return 0;
7715}
7716_ACEOF
ec165e83 7717if ac_fn_c_try_link "$LINENO"; then :
bab4f76d
GM
7718 gl_cv_warn_c__Wno_pointer_sign=yes
7719else
7720 gl_cv_warn_c__Wno_pointer_sign=no
7721fi
ec165e83
GM
7722rm -f core conftest.err conftest.$ac_objext \
7723 conftest$ac_exeext conftest.$ac_ext
bab4f76d
GM
7724 CFLAGS="$gl_save_compiler_FLAGS"
7725
7726fi
7727{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_pointer_sign" >&5
7728$as_echo "$gl_cv_warn_c__Wno_pointer_sign" >&6; }
7729if test "x$gl_cv_warn_c__Wno_pointer_sign" = x""yes; then :
7730 as_fn_append WARN_CFLAGS " -Wno-pointer-sign"
7731fi
7732
7733
7734 fi
7735else
7736 isystem='-isystem '
7737
7738 # This, $nw, is the list of warnings we disable.
7739 nw=
7740
7741 case $with_x_toolkit in
7742 lucid | athena | motif)
7743 # Old toolkits mishandle 'const'.
7744 nw="$nw -Wwrite-strings"
7745 ;;
7746 *)
7747
dcfda130 7748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror" >&5
a6b92a4a
GM
7749$as_echo_n "checking whether C compiler handles -Werror... " >&6; }
7750if test "${gl_cv_warn_c__Werror+set}" = set; then :
7751 $as_echo_n "(cached) " >&6
7752else
7753
7754 gl_save_compiler_FLAGS="$CFLAGS"
dcfda130 7755 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror"
a6b92a4a 7756 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
7757/* end confdefs.h. */
7758
7759int
7760main ()
7761{
7762
7763 ;
7764 return 0;
7765}
7766_ACEOF
ec165e83 7767if ac_fn_c_try_link "$LINENO"; then :
a6b92a4a 7768 gl_cv_warn_c__Werror=yes
067d23c9 7769else
a6b92a4a 7770 gl_cv_warn_c__Werror=no
067d23c9 7771fi
ec165e83
GM
7772rm -f core conftest.err conftest.$ac_objext \
7773 conftest$ac_exeext conftest.$ac_ext
a6b92a4a
GM
7774 CFLAGS="$gl_save_compiler_FLAGS"
7775
7776fi
7777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror" >&5
7778$as_echo "$gl_cv_warn_c__Werror" >&6; }
7779if test "x$gl_cv_warn_c__Werror" = x""yes; then :
7780 as_fn_append WERROR_CFLAGS " -Werror"
7781fi
7782
0eb775a3 7783
a6b92a4a
GM
7784 ;;
7785 esac
7786
7787
a6b92a4a 7788 nw="$nw -Wsystem-headers" # Don't let system headers trigger warnings
a6b92a4a 7789 nw="$nw -Woverlength-strings" # Not a problem these days
a6b92a4a 7790 nw="$nw -Wlogical-op" # any use of fwrite provokes this
fd9d2a9d 7791 nw="$nw -Wformat-nonliteral" # we do this a lot
a6b92a4a
GM
7792 nw="$nw -Wvla" # warnings in gettext.h
7793 nw="$nw -Wnested-externs" # use of XARGMATCH/verify_function__
a6b92a4a 7794 nw="$nw -Wswitch-default" # Too many warnings for now
fd9d2a9d 7795 nw="$nw -Winline" # OK to ignore 'inline'
6ec9a5a7 7796 nw="$nw -Wjump-misses-init" # We sometimes safely jump over init.
da8ed5ba
GM
7797 nw="$nw -Wstrict-overflow" # OK to optimize assuming that
7798 # signed overflow has undefined behavior
fd9d2a9d
GM
7799 nw="$nw -Wsync-nand" # irrelevant here, and provokes ObjC warning
7800 nw="$nw -Wunsafe-loop-optimizations" # OK to suppress unsafe optimizations
372c83ba 7801 nw="$nw -Wbad-function-cast" # These casts are no worse than others.
a6b92a4a
GM
7802
7803 # Emacs doesn't care about shadowing; see
7804 # <http://lists.gnu.org/archive/html/emacs-diffs/2011-11/msg00265.html>.
7805 nw="$nw -Wshadow"
7806
ad33cb00
GM
7807 # Emacs's use of alloca inhibits protecting the stack.
7808 nw="$nw -Wstack-protector"
7809
da8ed5ba 7810 # The following line should be removable at some point.
a6b92a4a
GM
7811 nw="$nw -Wsuggest-attribute=pure"
7812
fc4002bd
GM
7813 # This part is merely for shortening the command line,
7814 # since -Wno-FOO needs to be added below regardless.
7815 nw="$nw -Wmissing-field-initializers"
7816 nw="$nw -Wswitch"
7817 nw="$nw -Wtype-limits"
7818 nw="$nw -Wunused-parameter"
7819
c081121f
GM
7820 if test $emacs_cv_clang = yes; then
7821 nw="$nw -Wcast-align"
7822 fi
7823
a6b92a4a
GM
7824
7825
7826 if test -n "$GCC"; then
7827
7828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is supported" >&5
7829$as_echo_n "checking whether -Wno-missing-field-initializers is supported... " >&6; }
7830 if test "${gl_cv_cc_nomfi_supported+set}" = set; then :
7831 $as_echo_n "(cached) " >&6
7832else
7833
7834 gl_save_CFLAGS="$CFLAGS"
7835 CFLAGS="$CFLAGS -W -Werror -Wno-missing-field-initializers"
7836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
7837/* end confdefs.h. */
7838
7839int
7840main ()
7841{
7842
7843 ;
7844 return 0;
7845}
7846_ACEOF
7847if ac_fn_c_try_compile "$LINENO"; then :
a6b92a4a 7848 gl_cv_cc_nomfi_supported=yes
067d23c9 7849else
a6b92a4a 7850 gl_cv_cc_nomfi_supported=no
067d23c9
KY
7851fi
7852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a6b92a4a
GM
7853 CFLAGS="$gl_save_CFLAGS"
7854fi
7855
7856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_supported" >&5
7857$as_echo "$gl_cv_cc_nomfi_supported" >&6; }
7858
7859 if test "$gl_cv_cc_nomfi_supported" = yes; then
7860 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is needed" >&5
7861$as_echo_n "checking whether -Wno-missing-field-initializers is needed... " >&6; }
7862 if test "${gl_cv_cc_nomfi_needed+set}" = set; then :
7863 $as_echo_n "(cached) " >&6
7864else
7865
7866 gl_save_CFLAGS="$CFLAGS"
7867 CFLAGS="$CFLAGS -W -Werror"
7868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7869/* end confdefs.h. */
7870void f (void)
7871 {
7872 typedef struct { int a; int b; } s_t;
7873 s_t s1 = { 0, };
7874 }
7875
7876int
7877main ()
7878{
7879
7880 ;
7881 return 0;
7882}
7883_ACEOF
7884if ac_fn_c_try_compile "$LINENO"; then :
7885 gl_cv_cc_nomfi_needed=no
7886else
7887 gl_cv_cc_nomfi_needed=yes
7888fi
7889rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7890 CFLAGS="$gl_save_CFLAGS"
7891
7892fi
7893
7894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_needed" >&5
7895$as_echo "$gl_cv_cc_nomfi_needed" >&6; }
7896 fi
b6c9d18d
GM
7897
7898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wuninitialized is supported" >&5
7899$as_echo_n "checking whether -Wuninitialized is supported... " >&6; }
7900 if test "${gl_cv_cc_uninitialized_supported+set}" = set; then :
7901 $as_echo_n "(cached) " >&6
7902else
7903
7904 gl_save_CFLAGS="$CFLAGS"
7905 CFLAGS="$CFLAGS -Werror -Wuninitialized"
7906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7907/* end confdefs.h. */
7908
7909int
7910main ()
7911{
7912
7913 ;
7914 return 0;
7915}
7916_ACEOF
7917if ac_fn_c_try_compile "$LINENO"; then :
7918 gl_cv_cc_uninitialized_supported=yes
7919else
7920 gl_cv_cc_uninitialized_supported=no
7921fi
7922rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7923 CFLAGS="$gl_save_CFLAGS"
7924fi
7925
7926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_uninitialized_supported" >&5
7927$as_echo "$gl_cv_cc_uninitialized_supported" >&6; }
7928
a6b92a4a
GM
7929 fi
7930
b6c9d18d 7931 # List all gcc warning categories.
a6b92a4a
GM
7932 gl_manywarn_set=
7933 for gl_manywarn_item in \
a6b92a4a 7934 -W \
dcde497f
GM
7935 -Wabi \
7936 -Waddress \
dcfda130 7937 -Waggressive-loop-optimizations \
dcde497f
GM
7938 -Wall \
7939 -Warray-bounds \
7940 -Wattributes \
a6b92a4a 7941 -Wbad-function-cast \
a6b92a4a 7942 -Wbuiltin-macro-redefined \
dcde497f
GM
7943 -Wcast-align \
7944 -Wchar-subscripts \
7945 -Wclobbered \
7946 -Wcomment \
7947 -Wcomments \
a6b92a4a 7948 -Wcoverage-mismatch \
a6b92a4a
GM
7949 -Wcpp \
7950 -Wdeprecated \
7951 -Wdeprecated-declarations \
dcde497f 7952 -Wdisabled-optimization \
a6b92a4a
GM
7953 -Wdiv-by-zero \
7954 -Wdouble-promotion \
dcde497f 7955 -Wempty-body \
a6b92a4a 7956 -Wendif-labels \
dcde497f 7957 -Wenum-compare \
a6b92a4a
GM
7958 -Wextra \
7959 -Wformat-contains-nul \
7960 -Wformat-extra-args \
dcde497f
GM
7961 -Wformat-nonliteral \
7962 -Wformat-security \
7963 -Wformat-y2k \
a6b92a4a 7964 -Wformat-zero-length \
dcde497f
GM
7965 -Wfree-nonheap-object \
7966 -Wignored-qualifiers \
7967 -Wimplicit \
7968 -Wimplicit-function-declaration \
7969 -Wimplicit-int \
7970 -Winit-self \
7971 -Winline \
7972 -Wint-to-pointer-cast \
7973 -Winvalid-memory-model \
7974 -Winvalid-pch \
7975 -Wjump-misses-init \
7976 -Wlogical-op \
7977 -Wmain \
7978 -Wmaybe-uninitialized \
7979 -Wmissing-braces \
7980 -Wmissing-declarations \
7981 -Wmissing-field-initializers \
dcde497f 7982 -Wmissing-include-dirs \
dcde497f
GM
7983 -Wmissing-parameter-type \
7984 -Wmissing-prototypes \
7985 -Wmudflap \
a6b92a4a 7986 -Wmultichar \
dcde497f
GM
7987 -Wnarrowing \
7988 -Wnested-externs \
7989 -Wnonnull \
a6b92a4a 7990 -Wnormalized=nfc \
dcde497f
GM
7991 -Wold-style-declaration \
7992 -Wold-style-definition \
a6b92a4a 7993 -Woverflow \
dcde497f
GM
7994 -Woverlength-strings \
7995 -Woverride-init \
7996 -Wpacked \
7997 -Wpacked-bitfield-compat \
7998 -Wparentheses \
7999 -Wpointer-arith \
8000 -Wpointer-sign \
a6b92a4a
GM
8001 -Wpointer-to-int-cast \
8002 -Wpragmas \
dcfda130 8003 -Wreturn-local-addr \
dcde497f
GM
8004 -Wreturn-type \
8005 -Wsequence-point \
8006 -Wshadow \
8007 -Wsizeof-pointer-memaccess \
8008 -Wstack-protector \
8009 -Wstrict-aliasing \
8010 -Wstrict-overflow \
8011 -Wstrict-prototypes \
a6b92a4a 8012 -Wsuggest-attribute=const \
dcde497f 8013 -Wsuggest-attribute=format \
a6b92a4a
GM
8014 -Wsuggest-attribute=noreturn \
8015 -Wsuggest-attribute=pure \
dcde497f
GM
8016 -Wswitch \
8017 -Wswitch-default \
8018 -Wsync-nand \
8019 -Wsystem-headers \
a6b92a4a 8020 -Wtrampolines \
dcde497f
GM
8021 -Wtrigraphs \
8022 -Wtype-limits \
8023 -Wuninitialized \
8024 -Wunknown-pragmas \
dcde497f
GM
8025 -Wunsafe-loop-optimizations \
8026 -Wunused \
8027 -Wunused-but-set-parameter \
8028 -Wunused-but-set-variable \
8029 -Wunused-function \
8030 -Wunused-label \
8031 -Wunused-local-typedefs \
8032 -Wunused-macros \
8033 -Wunused-parameter \
8034 -Wunused-result \
8035 -Wunused-value \
8036 -Wunused-variable \
8037 -Wvarargs \
8038 -Wvariadic-macros \
8039 -Wvector-operation-performance \
8040 -Wvla \
8041 -Wvolatile-register-var \
8042 -Wwrite-strings \
ec165e83
GM
8043 -fdiagnostics-show-option \
8044 -funit-at-a-time \
dcde497f 8045 \
a6b92a4a
GM
8046 ; do
8047 gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
8048 done
8049
b6c9d18d 8050 # Disable specific options as needed.
a6b92a4a
GM
8051 if test "$gl_cv_cc_nomfi_needed" = yes; then
8052 gl_manywarn_set="$gl_manywarn_set -Wno-missing-field-initializers"
8053 fi
8054
b6c9d18d
GM
8055 if test "$gl_cv_cc_uninitialized_supported" = no; then
8056 gl_manywarn_set="$gl_manywarn_set -Wno-uninitialized"
8057 fi
8058
a6b92a4a
GM
8059 ws=$gl_manywarn_set
8060
8061
8062 gl_warn_set=
8063 set x $ws; shift
8064 for gl_warn_item
8065 do
8066 case " $nw " in
8067 *" $gl_warn_item "*)
8068 ;;
8069 *)
8070 gl_warn_set="$gl_warn_set $gl_warn_item"
8071 ;;
8072 esac
8073 done
8074 ws=$gl_warn_set
8075
8076 for w in $ws; do
dcfda130
GM
8077
8078as_gl_Warn=`$as_echo "gl_cv_warn_c_$w" | $as_tr_sh`
6e64a12b
GM
8079gl_positive="$w"
8080case $gl_positive in
8081 -Wno-*) gl_positive=-W`expr "X$gl_positive" : 'X-Wno-\(.*\)'` ;;
8082esac
a6b92a4a
GM
8083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles $w" >&5
8084$as_echo_n "checking whether C compiler handles $w... " >&6; }
8085if { as_var=$as_gl_Warn; eval "test \"\${$as_var+set}\" = set"; }; then :
8086 $as_echo_n "(cached) " >&6
8087else
8088
8089 gl_save_compiler_FLAGS="$CFLAGS"
6e64a12b 8090 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors $gl_positive"
a6b92a4a
GM
8091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8092/* end confdefs.h. */
8093
8094int
8095main ()
8096{
8097
8098 ;
8099 return 0;
8100}
8101_ACEOF
ec165e83 8102if ac_fn_c_try_link "$LINENO"; then :
a6b92a4a
GM
8103 eval "$as_gl_Warn=yes"
8104else
8105 eval "$as_gl_Warn=no"
8106fi
ec165e83
GM
8107rm -f core conftest.err conftest.$ac_objext \
8108 conftest$ac_exeext conftest.$ac_ext
a6b92a4a
GM
8109 CFLAGS="$gl_save_compiler_FLAGS"
8110
8111fi
8112eval ac_res=\$$as_gl_Warn
8113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8114$as_echo "$ac_res" >&6; }
8115eval as_val=\$$as_gl_Warn
8116 if test "x$as_val" = x""yes; then :
8117 as_fn_append WARN_CFLAGS " $w"
8118fi
8119
0eb775a3 8120
a6b92a4a 8121 done
dcfda130
GM
8122
8123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-missing-field-initializers" >&5
a6b92a4a
GM
8124$as_echo_n "checking whether C compiler handles -Wno-missing-field-initializers... " >&6; }
8125if test "${gl_cv_warn_c__Wno_missing_field_initializers+set}" = set; then :
8126 $as_echo_n "(cached) " >&6
8127else
8128
8129 gl_save_compiler_FLAGS="$CFLAGS"
6e64a12b 8130 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wmissing-field-initializers"
a6b92a4a
GM
8131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8132/* end confdefs.h. */
8133
8134int
8135main ()
8136{
8137
8138 ;
8139 return 0;
8140}
8141_ACEOF
ec165e83 8142if ac_fn_c_try_link "$LINENO"; then :
a6b92a4a
GM
8143 gl_cv_warn_c__Wno_missing_field_initializers=yes
8144else
8145 gl_cv_warn_c__Wno_missing_field_initializers=no
8146fi
ec165e83
GM
8147rm -f core conftest.err conftest.$ac_objext \
8148 conftest$ac_exeext conftest.$ac_ext
a6b92a4a
GM
8149 CFLAGS="$gl_save_compiler_FLAGS"
8150
8151fi
8152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_missing_field_initializers" >&5
8153$as_echo "$gl_cv_warn_c__Wno_missing_field_initializers" >&6; }
8154if test "x$gl_cv_warn_c__Wno_missing_field_initializers" = x""yes; then :
8155 as_fn_append WARN_CFLAGS " -Wno-missing-field-initializers"
8156fi
0eb775a3 8157
a6b92a4a 8158 # We need this one
dcfda130
GM
8159
8160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-sign-compare" >&5
a6b92a4a
GM
8161$as_echo_n "checking whether C compiler handles -Wno-sign-compare... " >&6; }
8162if test "${gl_cv_warn_c__Wno_sign_compare+set}" = set; then :
8163 $as_echo_n "(cached) " >&6
8164else
8165
8166 gl_save_compiler_FLAGS="$CFLAGS"
6e64a12b 8167 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wsign-compare"
a6b92a4a
GM
8168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8169/* end confdefs.h. */
8170
8171int
8172main ()
8173{
8174
8175 ;
8176 return 0;
8177}
8178_ACEOF
ec165e83 8179if ac_fn_c_try_link "$LINENO"; then :
a6b92a4a
GM
8180 gl_cv_warn_c__Wno_sign_compare=yes
8181else
8182 gl_cv_warn_c__Wno_sign_compare=no
8183fi
ec165e83
GM
8184rm -f core conftest.err conftest.$ac_objext \
8185 conftest$ac_exeext conftest.$ac_ext
a6b92a4a
GM
8186 CFLAGS="$gl_save_compiler_FLAGS"
8187
8188fi
8189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_sign_compare" >&5
8190$as_echo "$gl_cv_warn_c__Wno_sign_compare" >&6; }
8191if test "x$gl_cv_warn_c__Wno_sign_compare" = x""yes; then :
8192 as_fn_append WARN_CFLAGS " -Wno-sign-compare"
8193fi
0eb775a3 8194
a6b92a4a 8195 # Too many warnings for now
dcfda130
GM
8196
8197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-type-limits" >&5
a6b92a4a
GM
8198$as_echo_n "checking whether C compiler handles -Wno-type-limits... " >&6; }
8199if test "${gl_cv_warn_c__Wno_type_limits+set}" = set; then :
8200 $as_echo_n "(cached) " >&6
8201else
8202
8203 gl_save_compiler_FLAGS="$CFLAGS"
6e64a12b 8204 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wtype-limits"
a6b92a4a
GM
8205 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8206/* end confdefs.h. */
8207
8208int
8209main ()
8210{
8211
8212 ;
8213 return 0;
8214}
8215_ACEOF
ec165e83 8216if ac_fn_c_try_link "$LINENO"; then :
a6b92a4a
GM
8217 gl_cv_warn_c__Wno_type_limits=yes
8218else
8219 gl_cv_warn_c__Wno_type_limits=no
8220fi
ec165e83
GM
8221rm -f core conftest.err conftest.$ac_objext \
8222 conftest$ac_exeext conftest.$ac_ext
a6b92a4a
GM
8223 CFLAGS="$gl_save_compiler_FLAGS"
8224
8225fi
8226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_type_limits" >&5
8227$as_echo "$gl_cv_warn_c__Wno_type_limits" >&6; }
8228if test "x$gl_cv_warn_c__Wno_type_limits" = x""yes; then :
8229 as_fn_append WARN_CFLAGS " -Wno-type-limits"
8230fi
0eb775a3 8231
a6b92a4a 8232 # Too many warnings for now
dcfda130
GM
8233
8234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-switch" >&5
a6b92a4a
GM
8235$as_echo_n "checking whether C compiler handles -Wno-switch... " >&6; }
8236if test "${gl_cv_warn_c__Wno_switch+set}" = set; then :
8237 $as_echo_n "(cached) " >&6
8238else
8239
8240 gl_save_compiler_FLAGS="$CFLAGS"
6e64a12b 8241 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wswitch"
a6b92a4a
GM
8242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8243/* end confdefs.h. */
8244
8245int
8246main ()
8247{
8248
8249 ;
8250 return 0;
8251}
8252_ACEOF
ec165e83 8253if ac_fn_c_try_link "$LINENO"; then :
a6b92a4a
GM
8254 gl_cv_warn_c__Wno_switch=yes
8255else
8256 gl_cv_warn_c__Wno_switch=no
8257fi
ec165e83
GM
8258rm -f core conftest.err conftest.$ac_objext \
8259 conftest$ac_exeext conftest.$ac_ext
a6b92a4a
GM
8260 CFLAGS="$gl_save_compiler_FLAGS"
8261
8262fi
8263{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_switch" >&5
8264$as_echo "$gl_cv_warn_c__Wno_switch" >&6; }
8265if test "x$gl_cv_warn_c__Wno_switch" = x""yes; then :
8266 as_fn_append WARN_CFLAGS " -Wno-switch"
8267fi
0eb775a3 8268
a6b92a4a 8269 # Too many warnings for now
dcfda130
GM
8270
8271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-parameter" >&5
a6b92a4a
GM
8272$as_echo_n "checking whether C compiler handles -Wno-unused-parameter... " >&6; }
8273if test "${gl_cv_warn_c__Wno_unused_parameter+set}" = set; then :
8274 $as_echo_n "(cached) " >&6
8275else
8276
8277 gl_save_compiler_FLAGS="$CFLAGS"
6e64a12b 8278 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wunused-parameter"
a6b92a4a
GM
8279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8280/* end confdefs.h. */
8281
8282int
8283main ()
8284{
8285
8286 ;
8287 return 0;
8288}
8289_ACEOF
ec165e83 8290if ac_fn_c_try_link "$LINENO"; then :
a6b92a4a
GM
8291 gl_cv_warn_c__Wno_unused_parameter=yes
8292else
8293 gl_cv_warn_c__Wno_unused_parameter=no
8294fi
ec165e83
GM
8295rm -f core conftest.err conftest.$ac_objext \
8296 conftest$ac_exeext conftest.$ac_ext
a6b92a4a
GM
8297 CFLAGS="$gl_save_compiler_FLAGS"
8298
8299fi
8300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_parameter" >&5
8301$as_echo "$gl_cv_warn_c__Wno_unused_parameter" >&6; }
8302if test "x$gl_cv_warn_c__Wno_unused_parameter" = x""yes; then :
8303 as_fn_append WARN_CFLAGS " -Wno-unused-parameter"
8304fi
0eb775a3 8305
a6b92a4a 8306 # Too many warnings for now
dcfda130
GM
8307
8308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-format-nonliteral" >&5
a6b92a4a
GM
8309$as_echo_n "checking whether C compiler handles -Wno-format-nonliteral... " >&6; }
8310if test "${gl_cv_warn_c__Wno_format_nonliteral+set}" = set; then :
8311 $as_echo_n "(cached) " >&6
8312else
8313
8314 gl_save_compiler_FLAGS="$CFLAGS"
6e64a12b 8315 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wformat-nonliteral"
a6b92a4a
GM
8316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8317/* end confdefs.h. */
8318
8319int
8320main ()
8321{
8322
8323 ;
8324 return 0;
8325}
8326_ACEOF
ec165e83 8327if ac_fn_c_try_link "$LINENO"; then :
a6b92a4a
GM
8328 gl_cv_warn_c__Wno_format_nonliteral=yes
8329else
8330 gl_cv_warn_c__Wno_format_nonliteral=no
8331fi
ec165e83
GM
8332rm -f core conftest.err conftest.$ac_objext \
8333 conftest$ac_exeext conftest.$ac_ext
a6b92a4a
GM
8334 CFLAGS="$gl_save_compiler_FLAGS"
8335
8336fi
8337{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_format_nonliteral" >&5
8338$as_echo "$gl_cv_warn_c__Wno_format_nonliteral" >&6; }
8339if test "x$gl_cv_warn_c__Wno_format_nonliteral" = x""yes; then :
8340 as_fn_append WARN_CFLAGS " -Wno-format-nonliteral"
8341fi
8342
8343
0eb775a3 8344
a6b92a4a
GM
8345 # In spite of excluding -Wlogical-op above, it is enabled, as of
8346 # gcc 4.5.0 20090517.
dcfda130
GM
8347
8348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-logical-op" >&5
a6b92a4a
GM
8349$as_echo_n "checking whether C compiler handles -Wno-logical-op... " >&6; }
8350if test "${gl_cv_warn_c__Wno_logical_op+set}" = set; then :
8351 $as_echo_n "(cached) " >&6
8352else
8353
8354 gl_save_compiler_FLAGS="$CFLAGS"
6e64a12b 8355 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wlogical-op"
a6b92a4a
GM
8356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8357/* end confdefs.h. */
8358
8359int
8360main ()
8361{
8362
8363 ;
8364 return 0;
8365}
8366_ACEOF
ec165e83 8367if ac_fn_c_try_link "$LINENO"; then :
a6b92a4a
GM
8368 gl_cv_warn_c__Wno_logical_op=yes
8369else
8370 gl_cv_warn_c__Wno_logical_op=no
8371fi
ec165e83
GM
8372rm -f core conftest.err conftest.$ac_objext \
8373 conftest$ac_exeext conftest.$ac_ext
a6b92a4a
GM
8374 CFLAGS="$gl_save_compiler_FLAGS"
8375
8376fi
8377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_logical_op" >&5
8378$as_echo "$gl_cv_warn_c__Wno_logical_op" >&6; }
8379if test "x$gl_cv_warn_c__Wno_logical_op" = x""yes; then :
8380 as_fn_append WARN_CFLAGS " -Wno-logical-op"
8381fi
8382
8383
0eb775a3 8384
c081121f
GM
8385 # More things that clang is unduly picky about.
8386 if test $emacs_cv_clang = yes; then
8387
8388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-format-extra-args" >&5
8389$as_echo_n "checking whether C compiler handles -Wno-format-extra-args... " >&6; }
8390if test "${gl_cv_warn_c__Wno_format_extra_args+set}" = set; then :
8391 $as_echo_n "(cached) " >&6
8392else
8393
8394 gl_save_compiler_FLAGS="$CFLAGS"
6e64a12b 8395 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wformat-extra-args"
c081121f
GM
8396 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8397/* end confdefs.h. */
8398
8399int
8400main ()
8401{
8402
8403 ;
8404 return 0;
8405}
8406_ACEOF
ec165e83 8407if ac_fn_c_try_link "$LINENO"; then :
c081121f
GM
8408 gl_cv_warn_c__Wno_format_extra_args=yes
8409else
8410 gl_cv_warn_c__Wno_format_extra_args=no
8411fi
ec165e83
GM
8412rm -f core conftest.err conftest.$ac_objext \
8413 conftest$ac_exeext conftest.$ac_ext
c081121f
GM
8414 CFLAGS="$gl_save_compiler_FLAGS"
8415
8416fi
8417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_format_extra_args" >&5
8418$as_echo "$gl_cv_warn_c__Wno_format_extra_args" >&6; }
8419if test "x$gl_cv_warn_c__Wno_format_extra_args" = x""yes; then :
8420 as_fn_append WARN_CFLAGS " -Wno-format-extra-args"
8421fi
8422
8423
8424
8425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-tautological-constant-out-of-range-compare" >&5
8426$as_echo_n "checking whether C compiler handles -Wno-tautological-constant-out-of-range-compare... " >&6; }
8427if test "${gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare+set}" = set; then :
8428 $as_echo_n "(cached) " >&6
8429else
8430
8431 gl_save_compiler_FLAGS="$CFLAGS"
6e64a12b 8432 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wtautological-constant-out-of-range-compare"
c081121f
GM
8433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8434/* end confdefs.h. */
8435
8436int
8437main ()
8438{
8439
8440 ;
8441 return 0;
8442}
8443_ACEOF
ec165e83 8444if ac_fn_c_try_link "$LINENO"; then :
c081121f
GM
8445 gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare=yes
8446else
8447 gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare=no
8448fi
ec165e83
GM
8449rm -f core conftest.err conftest.$ac_objext \
8450 conftest$ac_exeext conftest.$ac_ext
c081121f
GM
8451 CFLAGS="$gl_save_compiler_FLAGS"
8452
8453fi
8454{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare" >&5
8455$as_echo "$gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare" >&6; }
8456if test "x$gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare" = x""yes; then :
8457 as_fn_append WARN_CFLAGS " -Wno-tautological-constant-out-of-range-compare"
8458fi
8459
8460
8461
8462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-command-line-argument" >&5
8463$as_echo_n "checking whether C compiler handles -Wno-unused-command-line-argument... " >&6; }
8464if test "${gl_cv_warn_c__Wno_unused_command_line_argument+set}" = set; then :
8465 $as_echo_n "(cached) " >&6
8466else
8467
8468 gl_save_compiler_FLAGS="$CFLAGS"
6e64a12b 8469 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wunused-command-line-argument"
c081121f
GM
8470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8471/* end confdefs.h. */
8472
8473int
8474main ()
8475{
8476
8477 ;
8478 return 0;
8479}
8480_ACEOF
ec165e83 8481if ac_fn_c_try_link "$LINENO"; then :
c081121f
GM
8482 gl_cv_warn_c__Wno_unused_command_line_argument=yes
8483else
8484 gl_cv_warn_c__Wno_unused_command_line_argument=no
8485fi
ec165e83
GM
8486rm -f core conftest.err conftest.$ac_objext \
8487 conftest$ac_exeext conftest.$ac_ext
c081121f
GM
8488 CFLAGS="$gl_save_compiler_FLAGS"
8489
8490fi
8491{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_command_line_argument" >&5
8492$as_echo "$gl_cv_warn_c__Wno_unused_command_line_argument" >&6; }
8493if test "x$gl_cv_warn_c__Wno_unused_command_line_argument" = x""yes; then :
8494 as_fn_append WARN_CFLAGS " -Wno-unused-command-line-argument"
8495fi
8496
8497
8498
8499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-value" >&5
8500$as_echo_n "checking whether C compiler handles -Wno-unused-value... " >&6; }
8501if test "${gl_cv_warn_c__Wno_unused_value+set}" = set; then :
8502 $as_echo_n "(cached) " >&6
8503else
8504
8505 gl_save_compiler_FLAGS="$CFLAGS"
6e64a12b 8506 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wunused-value"
c081121f
GM
8507 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8508/* end confdefs.h. */
8509
8510int
8511main ()
8512{
8513
8514 ;
8515 return 0;
8516}
8517_ACEOF
ec165e83 8518if ac_fn_c_try_link "$LINENO"; then :
c081121f
GM
8519 gl_cv_warn_c__Wno_unused_value=yes
8520else
8521 gl_cv_warn_c__Wno_unused_value=no
8522fi
ec165e83
GM
8523rm -f core conftest.err conftest.$ac_objext \
8524 conftest$ac_exeext conftest.$ac_ext
c081121f
GM
8525 CFLAGS="$gl_save_compiler_FLAGS"
8526
8527fi
8528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_value" >&5
8529$as_echo "$gl_cv_warn_c__Wno_unused_value" >&6; }
8530if test "x$gl_cv_warn_c__Wno_unused_value" = x""yes; then :
8531 as_fn_append WARN_CFLAGS " -Wno-unused-value"
8532fi
8533
8534
8535 fi
8536
dcfda130 8537
a6b92a4a
GM
8538$as_echo "#define lint 1" >>confdefs.h
8539
8540
a6b92a4a
GM
8541
8542$as_echo "#define GNULIB_PORTCHECK 1" >>confdefs.h
8543
8544
8545 # We use a slightly smaller set of warning options for lib/.
8546 # Remove the following and save the result in GNULIB_WARN_CFLAGS.
8547 nw=
8548 nw="$nw -Wunused-macros"
8549
8550
8551 gl_warn_set=
8552 set x $WARN_CFLAGS; shift
8553 for gl_warn_item
8554 do
8555 case " $nw " in
8556 *" $gl_warn_item "*)
8557 ;;
8558 *)
8559 gl_warn_set="$gl_warn_set $gl_warn_item"
8560 ;;
8561 esac
8562 done
8563 GNULIB_WARN_CFLAGS=$gl_warn_set
8564
8565
8566fi
067d23c9
KY
8567
8568
8569
4c5f4270
GM
8570
8571
8572
8573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works for files in the same directory" >&5
8574$as_echo_n "checking whether ln -s works for files in the same directory... " >&6; }
8575rm -f conf$$ conf$$.file
8576
8577LN_S_FILEONLY='cp -p'
8578
8579if (echo >conf$$.file) 2>/dev/null; then
8580 if ln -s conf$$.file conf$$ 2>/dev/null; then
8581 LN_S_FILEONLY='ln -s'
8582 elif ln conf$$.file conf$$ 2>/dev/null; then
8583 LN_S_FILEONLY=ln
8584 fi
8585fi
8586
8587rm -f conf$$ conf$$.file
8588
8589if test "$LN_S_FILEONLY" = "ln -s"; then
8590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
0e733db9
GM
8591$as_echo "yes" >&6; }
8592else
4c5f4270
GM
8593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S_FILEONLY" >&5
8594$as_echo "no, using $LN_S_FILEONLY" >&6; }
0e733db9
GM
8595fi
8596
067d23c9 8597
4c5f4270
GM
8598
8599
7c61eaab
GM
8600if test "$opsys" = "mingw32"; then
8601 LN_S="ln"
8602fi
8603
067d23c9
KY
8604# Extract the first word of "install-info", so it can be a program name with args.
8605set dummy install-info; ac_word=$2
8606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8607$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 8608if test "${ac_cv_path_INSTALL_INFO+set}" = set; then :
067d23c9
KY
8609 $as_echo_n "(cached) " >&6
8610else
8611 case $INSTALL_INFO in
8612 [\\/]* | ?:[\\/]*)
8613 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
8614 ;;
8615 *)
8616 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
e700232f 8617for as_dir in $PATH$PATH_SEPARATOR/usr/sbin$PATH_SEPARATOR/sbin
067d23c9
KY
8618do
8619 IFS=$as_save_IFS
8620 test -z "$as_dir" && as_dir=.
8621 for ac_exec_ext in '' $ac_executable_extensions; do
8622 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8623 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
8624 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8625 break 2
8626 fi
8627done
8628 done
8629IFS=$as_save_IFS
8630
8631 test -z "$ac_cv_path_INSTALL_INFO" && ac_cv_path_INSTALL_INFO=":"
8632 ;;
8633esac
8634fi
8635INSTALL_INFO=$ac_cv_path_INSTALL_INFO
8636if test -n "$INSTALL_INFO"; then
8637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_INFO" >&5
8638$as_echo "$INSTALL_INFO" >&6; }
8639else
8640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8641$as_echo "no" >&6; }
8642fi
8643
8644
8645# Extract the first word of "gzip", so it can be a program name with args.
8646set dummy gzip; ac_word=$2
8647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8648$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 8649if test "${ac_cv_path_GZIP_PROG+set}" = set; then :
067d23c9
KY
8650 $as_echo_n "(cached) " >&6
8651else
8652 case $GZIP_PROG in
8653 [\\/]* | ?:[\\/]*)
8654 ac_cv_path_GZIP_PROG="$GZIP_PROG" # Let the user override the test with a path.
8655 ;;
8656 *)
8657 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8658for as_dir in $PATH
8659do
8660 IFS=$as_save_IFS
8661 test -z "$as_dir" && as_dir=.
8662 for ac_exec_ext in '' $ac_executable_extensions; do
8663 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8664 ac_cv_path_GZIP_PROG="$as_dir/$ac_word$ac_exec_ext"
8665 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8666 break 2
8667 fi
8668done
8669 done
8670IFS=$as_save_IFS
8671
8672 ;;
8673esac
8674fi
8675GZIP_PROG=$ac_cv_path_GZIP_PROG
8676if test -n "$GZIP_PROG"; then
8677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP_PROG" >&5
8678$as_echo "$GZIP_PROG" >&6; }
8679else
8680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8681$as_echo "no" >&6; }
8682fi
8683
8684
7ee3791f 8685
992ec28a
GM
8686test $with_compress_install != yes && test -n "$GZIP_PROG" && \
8687 GZIP_PROG=" # $GZIP_PROG # (disabled by configure --without-compress-install)"
8688
7ee3791f
GM
8689if test $opsys = gnu-linux; then
8690 # Extract the first word of "paxctl", so it can be a program name with args.
9c29597b
GM
8691set dummy paxctl; ac_word=$2
8692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8693$as_echo_n "checking for $ac_word... " >&6; }
8694if test "${ac_cv_path_PAXCTL+set}" = set; then :
8695 $as_echo_n "(cached) " >&6
8696else
8697 case $PAXCTL in
8698 [\\/]* | ?:[\\/]*)
8699 ac_cv_path_PAXCTL="$PAXCTL" # Let the user override the test with a path.
8700 ;;
8701 *)
8702 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8703for as_dir in $PATH$PATH_SEPARATOR/sbin$PATH_SEPARATOR/usr/sbin
8704do
8705 IFS=$as_save_IFS
8706 test -z "$as_dir" && as_dir=.
8707 for ac_exec_ext in '' $ac_executable_extensions; do
8708 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8709 ac_cv_path_PAXCTL="$as_dir/$ac_word$ac_exec_ext"
8710 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8711 break 2
8712 fi
8713done
8714 done
8715IFS=$as_save_IFS
8716
8717 ;;
8718esac
8719fi
8720PAXCTL=$ac_cv_path_PAXCTL
8721if test -n "$PAXCTL"; then
8722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PAXCTL" >&5
8723$as_echo "$PAXCTL" >&6; }
8724else
8725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8726$as_echo "no" >&6; }
8727fi
8728
8729
685e57ea
GM
8730 if test "X$PAXCTL" != X; then
8731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether binaries have a PT_PAX_FLAGS header" >&5
8732$as_echo_n "checking whether binaries have a PT_PAX_FLAGS header... " >&6; }
8733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8734/* end confdefs.h. */
8735
8736int
8737main ()
8738{
8739
8740 ;
8741 return 0;
8742}
8743_ACEOF
8744if ac_fn_c_try_link "$LINENO"; then :
8745 if $PAXCTL -v conftest$EXEEXT >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8746$as_echo "yes" >&6; }
8747 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8748$as_echo "no" >&6; }; PAXCTL=""; fi
8749fi
8750rm -f core conftest.err conftest.$ac_objext \
8751 conftest$ac_exeext conftest.$ac_ext
8752 fi
7ee3791f 8753fi
067d23c9 8754
9e40dda4 8755## Need makeinfo >= 4.7 (?) to build the manuals.
067d23c9
KY
8756# Extract the first word of "makeinfo", so it can be a program name with args.
8757set dummy makeinfo; ac_word=$2
8758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8759$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 8760if test "${ac_cv_path_MAKEINFO+set}" = set; then :
067d23c9
KY
8761 $as_echo_n "(cached) " >&6
8762else
8763 case $MAKEINFO in
8764 [\\/]* | ?:[\\/]*)
8765 ac_cv_path_MAKEINFO="$MAKEINFO" # Let the user override the test with a path.
8766 ;;
8767 *)
8768 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8769for as_dir in $PATH
8770do
8771 IFS=$as_save_IFS
8772 test -z "$as_dir" && as_dir=.
8773 for ac_exec_ext in '' $ac_executable_extensions; do
8774 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8775 ac_cv_path_MAKEINFO="$as_dir/$ac_word$ac_exec_ext"
8776 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8777 break 2
8778 fi
8779done
8780 done
8781IFS=$as_save_IFS
8782
8783 test -z "$ac_cv_path_MAKEINFO" && ac_cv_path_MAKEINFO="no"
8784 ;;
8785esac
8786fi
8787MAKEINFO=$ac_cv_path_MAKEINFO
8788if test -n "$MAKEINFO"; then
8789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKEINFO" >&5
8790$as_echo "$MAKEINFO" >&6; }
8791else
8792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8793$as_echo "no" >&6; }
8794fi
8795
8796
b5591ebb
GM
8797if test "$MAKEINFO" != "no"; then
8798 case `
8799 $MAKEINFO --version 2> /dev/null |
8800 $EGREP 'texinfo[^0-9]*([1-4][0-9]+|[5-9]|4\.[7-9]|4\.[1-6][0-9]+)'
8801 ` in
8802 '') MAKEINFO=no;;
8803 esac
067d23c9
KY
8804fi
8805
8806## Makeinfo is unusual. For a released Emacs, the manuals are
8807## pre-built, and not deleted by the normal clean rules. makeinfo is
8808## therefore in the category of "special tools" not normally required, which
8809## configure does not have to check for (eg autoconf itself).
8810## In a Bazaar checkout on the other hand, the manuals are not included.
8811## So makeinfo is a requirement to build from Bazaar, and configure
8812## should test for it as it does for any other build requirement.
8813## We use the presence of $srcdir/info/emacs to distinguish a release,
8814## with pre-built manuals, from a Bazaar checkout.
96f129d5
GM
8815HAVE_MAKEINFO=yes
8816
067d23c9 8817if test "$MAKEINFO" = "no"; then
96f129d5 8818 MAKEINFO=makeinfo
067d23c9 8819 if test "x${with_makeinfo}" = "xno"; then
96f129d5 8820 HAVE_MAKEINFO=no
b5591ebb 8821 elif test ! -e "$srcdir/info/emacs" && test ! -e "$srcdir/info/emacs.info"; then
9e40dda4 8822 as_fn_error "You do not seem to have makeinfo >= 4.7, and your
067d23c9
KY
8823source tree does not seem to have pre-built manuals in the \`info' directory.
8824Either install a suitable version of makeinfo, or re-run configure
8825with the \`--without-makeinfo' option to build without the manuals. " "$LINENO" 5
8826 fi
8827fi
8828
8829
141d074d
GM
8830INFO_EXT=.info
8831INFO_OPTS=--no-split
8832
8833
8834
ffeb6dec 8835if test $opsys = mingw32; then
c65a2df9 8836 DOCMISC_W32=efaq-w32
ffeb6dec 8837else
c65a2df9 8838 DOCMISC_W32=
ffeb6dec
GM
8839fi
8840
8841
8842
067d23c9
KY
8843if test x$GCC = xyes; then
8844 test "x$GCC_LINK_TEST_OPTIONS" != x && \
8845 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
8846else
8847 test "x$NON_GCC_LINK_TEST_OPTIONS" != x && \
8848 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
8849fi
8850
8851
57f26ea7 8852late_LDFLAGS="$LDFLAGS"
067d23c9 8853if test x$GCC = xyes; then
992ec28a 8854 LDFLAGS_NOCOMBRELOC="-Wl,-znocombreloc"
067d23c9 8855else
992ec28a 8856 LDFLAGS_NOCOMBRELOC="-znocombreloc"
067d23c9
KY
8857fi
8858
992ec28a
GM
8859LDFLAGS="$LDFLAGS $LDFLAGS_NOCOMBRELOC"
8860
067d23c9
KY
8861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -znocombreloc" >&5
8862$as_echo_n "checking for -znocombreloc... " >&6; }
8863cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8864/* end confdefs.h. */
8865
8866int
8867main ()
8868{
8869
8870 ;
8871 return 0;
8872}
8873_ACEOF
8874if ac_fn_c_try_link "$LINENO"; then :
8875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8876$as_echo "yes" >&6; }
8877else
992ec28a 8878 LDFLAGS_NOCOMBRELOC=
067d23c9
KY
8879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8880$as_echo "no" >&6; }
8881fi
8882rm -f core conftest.err conftest.$ac_objext \
8883 conftest$ac_exeext conftest.$ac_ext
8884
57f26ea7 8885LDFLAGS="$late_LDFLAGS"
067d23c9 8886
125c3718 8887test "x$CANNOT_DUMP" = "x" && CANNOT_DUMP=no
067d23c9 8888case "$opsys" in
125c3718
PE
8889 your-opsys-here) CANNOT_DUMP=yes ;;
8890esac
8891
8892test "$CANNOT_DUMP" = "yes" && \
067d23c9
KY
8893
8894$as_echo "#define CANNOT_DUMP 1" >>confdefs.h
8895
125c3718 8896
067d23c9
KY
8897
8898
8899
8900UNEXEC_OBJ=unexelf.o
8901case "$opsys" in
8902 # MSDOS uses unexcoff.o
067d23c9
KY
8903 aix4-2)
8904 UNEXEC_OBJ=unexaix.o
8905 ;;
8906 cygwin)
8907 UNEXEC_OBJ=unexcw.o
8908 ;;
8909 darwin)
8910 UNEXEC_OBJ=unexmacosx.o
8911 ;;
8912 hpux10-20 | hpux11)
8913 UNEXEC_OBJ=unexhp9k800.o
8914 ;;
7c61eaab
GM
8915 mingw32)
8916 UNEXEC_OBJ=unexw32.o
8917 ;;
067d23c9
KY
8918 sol2-10)
8919 # Use the Solaris dldump() function, called from unexsol.c, to dump
8920 # emacs, instead of the generic ELF dump code found in unexelf.c.
8921 # The resulting binary has a complete symbol table, and is better
8922 # for debugging and other observability tools (debuggers, pstack, etc).
8923 #
8924 # If you encounter a problem using dldump(), please consider sending
8925 # a message to the OpenSolaris tools-linking mailing list:
8926 # http://mail.opensolaris.org/mailman/listinfo/tools-linking
8927 #
8928 # It is likely that dldump() works with older Solaris too, but this has
8929 # not been tested, so for now this change is for Solaris 10 or newer.
8930 UNEXEC_OBJ=unexsol.o
8931 ;;
8932esac
8933
8934LD_SWITCH_SYSTEM=
8935case "$opsys" in
87e1a811 8936 freebsd|dragonfly)
067d23c9
KY
8937 ## Let `ld' find image libs and similar things in /usr/local/lib.
8938 ## The system compiler, GCC, has apparently been modified to not
8939 ## look there, contrary to what a stock GCC would do.
a7479549
GM
8940### It's not our place to do this. See bug#10313#17.
8941### LD_SWITCH_SYSTEM=-L/usr/local/lib
8942 :
067d23c9
KY
8943 ;;
8944
8945 gnu-linux)
8946 ## cpp test was "ifdef __mips__", but presumably this is equivalent...
d6a003a8 8947 case $host_cpu in mips*) LD_SWITCH_SYSTEM="-G 0";; esac
067d23c9
KY
8948 ;;
8949
8950 netbsd)
a7479549
GM
8951### It's not our place to do this. See bug#10313#17.
8952### LD_SWITCH_SYSTEM="-Wl,-rpath,/usr/pkg/lib -L/usr/pkg/lib -Wl,-rpath,/usr/local/lib -L/usr/local/lib"
8953 :
067d23c9
KY
8954 ;;
8955
8956 openbsd)
3766b742 8957 ## Han Boetes <han@boetes.org> says this is necessary,
067d23c9
KY
8958 ## otherwise Emacs dumps core on elf systems.
8959 LD_SWITCH_SYSTEM="-Z"
8960 ;;
8961esac
8962
8963
8964ac_link="$ac_link $LD_SWITCH_SYSTEM"
8965
ae629dae 8966## This setting of LD_SWITCH_SYSTEM references LD_SWITCH_X_SITE_RPATH,
067d23c9
KY
8967## which has not been defined yet. When this was handled with cpp,
8968## it was expanded to null when configure sourced the s/*.h file.
8969## Thus LD_SWITCH_SYSTEM had different values in configure and the Makefiles.
8970## FIXME it would be cleaner to put this in LD_SWITCH_SYSTEM_TEMACS
8971## (or somesuch), but because it is supposed to go at the _front_
8972## of LD_SWITCH_SYSTEM, we cannot do that in exactly the same way.
8973## Compare with the gnu-linux case below, which added to the end
8974## of LD_SWITCH_SYSTEM, and so can instead go at the front of
8975## LD_SWITCH_SYSTEM_TEMACS.
8976case "$opsys" in
8977 netbsd|openbsd)
ae629dae 8978 LD_SWITCH_SYSTEM="\$(LD_SWITCH_X_SITE_RPATH) $LD_SWITCH_SYSTEM" ;;
067d23c9
KY
8979esac
8980
8981
8982C_SWITCH_MACHINE=
42bbbe8b
GM
8983case $canonical in
8984 alpha*)
067d23c9 8985 ac_fn_c_check_decl "$LINENO" "__ELF__" "ac_cv_have_decl___ELF__" "$ac_includes_default"
a9bec17c 8986if test "x$ac_cv_have_decl___ELF__" = x""yes; then :
067d23c9
KY
8987
8988fi
8989
8990 if test "$ac_cv_have_decl___ELF__" = "yes"; then
8991 ## With ELF, make sure that all common symbols get allocated to in the
8992 ## data section. Otherwise, the dump of temacs may miss variables in
8993 ## the shared library that have been initialized. For example, with
8994 ## GNU libc, __malloc_initialized would normally be resolved to the
8995 ## shared library's .bss section, which is fatal.
8996 if test "x$GCC" = "xyes"; then
8997 C_SWITCH_MACHINE="-fno-common"
8998 else
a9bec17c 8999 as_fn_error "What gives? Fix me if DEC Unix supports ELF now." "$LINENO" 5
067d23c9
KY
9000 fi
9001 else
9002 UNEXEC_OBJ=unexalpha.o
9003 fi
42bbbe8b
GM
9004 ;;
9005esac
067d23c9
KY
9006
9007
9008
9009
9010C_SWITCH_SYSTEM=
9011## Some programs in src produce warnings saying certain subprograms
9012## are too complex and need a MAXMEM value greater than 2000 for
9013## additional optimization. --nils@exp-math.uni-essen.de
9014test "$opsys" = "aix4.2" && test "x$GCC" != "xyes" && \
9015 C_SWITCH_SYSTEM="-ma -qmaxmem=4000"
7c61eaab 9016test "$opsys" = "mingw32" && C_SWITCH_SYSTEM="-mtune=pentium4"
067d23c9
KY
9017## gnu-linux might need -D_BSD_SOURCE on old libc5 systems.
9018## It is redundant in glibc2, since we define _GNU_SOURCE.
9019
9020
9021
9022LIBS_SYSTEM=
9023case "$opsys" in
9024 ## IBM's X11R5 uses -lIM and -liconv in AIX 3.2.2.
9025 aix4-2) LIBS_SYSTEM="-lrts -lIM -liconv" ;;
9026
87e1a811 9027 freebsd|dragonfly) LIBS_SYSTEM="-lutil" ;;
067d23c9
KY
9028
9029 hpux*) LIBS_SYSTEM="-l:libdld.sl" ;;
9030
1f5d53eb 9031 sol2*) LIBS_SYSTEM="-lsocket -lnsl" ;;
067d23c9
KY
9032
9033 ## Motif needs -lgen.
9034 unixware) LIBS_SYSTEM="-lsocket -lnsl -lelf -lgen" ;;
9035esac
9036
9037
9038
9039### Make sure subsequent tests use flags consistent with the build flags.
9040
9041if test x"${OVERRIDE_CPPFLAGS}" != x; then
9042 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
9043else
9044 CPPFLAGS="$C_SWITCH_SYSTEM $C_SWITCH_MACHINE $CPPFLAGS"
9045fi
9046
4fda9c95
GM
9047# Suppress obsolescent Autoconf test for size_t; Emacs assumes C89 or better.
9048
3e0be4ab
GM
9049# Likewise for obsolescent test for uid_t, gid_t; Emacs assumes them.
9050
4fda9c95 9051
067d23c9 9052
067d23c9 9053LIB_MATH=-lm
4717915f 9054SYSTEM_TYPE=`echo $opsys | sed -e 's/[0-9].*//' -e 's|-|/|'`
067d23c9
KY
9055
9056case $opsys in
9057 cygwin )
9058 LIB_MATH=
067d23c9
KY
9059 ;;
9060 darwin )
9061 ## Adding -lm confuses the dynamic linker, so omit it.
9062 LIB_MATH=
067d23c9 9063 ;;
87e1a811 9064 freebsd | dragonfly )
15f79fcd 9065 SYSTEM_TYPE=berkeley-unix
067d23c9
KY
9066 ;;
9067 gnu-linux | gnu-kfreebsd )
067d23c9
KY
9068 ;;
9069 hpux10-20 | hpux11 )
067d23c9 9070 ;;
7c61eaab
GM
9071 mingw32 )
9072 LIB_MATH=
9073 SYSTEM_TYPE=windows-nt
9074 ;;
bb72ce91 9075 netbsd | openbsd )
15f79fcd 9076 SYSTEM_TYPE=berkeley-unix
067d23c9 9077 ;;
15f79fcd
GM
9078
9079 sol2* | unixware )
9080 SYSTEM_TYPE=usg-unix-v
9081 ;;
9082
067d23c9
KY
9083esac
9084
9085
9086
15f79fcd
GM
9087cat >>confdefs.h <<_ACEOF
9088#define SYSTEM_TYPE "$SYSTEM_TYPE"
9089_ACEOF
9090
9091
130f1dac 9092
5476a9a4
GM
9093pre_PKG_CONFIG_CFLAGS=$CFLAGS
9094pre_PKG_CONFIG_LIBS=$LIBS
067d23c9 9095
5476a9a4
GM
9096# Extract the first word of "pkg-config", so it can be a program name with args.
9097set dummy pkg-config; ac_word=$2
9098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9099$as_echo_n "checking for $ac_word... " >&6; }
9100if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
9101 $as_echo_n "(cached) " >&6
9102else
9103 case $PKG_CONFIG in
9104 [\\/]* | ?:[\\/]*)
9105 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9106 ;;
9107 *)
9108 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9109for as_dir in $PATH
9110do
9111 IFS=$as_save_IFS
9112 test -z "$as_dir" && as_dir=.
9113 for ac_exec_ext in '' $ac_executable_extensions; do
9114 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9115 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9116 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9117 break 2
9118 fi
9119done
9120 done
9121IFS=$as_save_IFS
9122
9123 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
9124 ;;
9125esac
9126fi
9127PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9128if test -n "$PKG_CONFIG"; then
9129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9130$as_echo "$PKG_CONFIG" >&6; }
9131else
9132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9133$as_echo "no" >&6; }
9134fi
f199cab1
GM
9135
9136
f199cab1 9137
5476a9a4
GM
9138
9139
9dabd86d 9140HAVE_SOUND=no
5476a9a4 9141if test "${with_sound}" != "no"; then
7c61eaab 9142 # Sound support for GNU/Linux, the free BSDs, and MinGW.
db7863f4 9143 for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h
5476a9a4
GM
9144do :
9145 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7c61eaab
GM
9146ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
9147 #ifdef __MINGW32__
9148 #define WIN32_LEAN_AND_MEAN
9149 #include <windows.h>
9150 #endif
9151
9152"
5476a9a4
GM
9153eval as_val=\$$as_ac_Header
9154 if test "x$as_val" = x""yes; then :
9155 cat >>confdefs.h <<_ACEOF
9156#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9157_ACEOF
9158 have_sound_header=yes
9159fi
9160
9161done
9162
dfdf7fe5
GM
9163 test "${with_sound}" = "oss" && test "${have_sound_header}" != "yes" && \
9164 as_fn_error "OSS sound support requested but not found." "$LINENO" 5
9165
9166 if test "${with_sound}" = "bsd-ossaudio" || test "${with_sound}" = "yes"; then
9dabd86d
GM
9167 # Emulation library used on NetBSD.
9168 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _oss_ioctl in -lossaudio" >&5
5476a9a4
GM
9169$as_echo_n "checking for _oss_ioctl in -lossaudio... " >&6; }
9170if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then :
067d23c9
KY
9171 $as_echo_n "(cached) " >&6
9172else
5476a9a4
GM
9173 ac_check_lib_save_LIBS=$LIBS
9174LIBS="-lossaudio $LIBS"
9175cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 9176/* end confdefs.h. */
5476a9a4
GM
9177
9178/* Override any GCC internal prototype to avoid an error.
9179 Use char because int might match the return type of a GCC
9180 builtin and then its argument prototype would still apply. */
9181#ifdef __cplusplus
9182extern "C"
9183#endif
9184char _oss_ioctl ();
067d23c9
KY
9185int
9186main ()
9187{
5476a9a4 9188return _oss_ioctl ();
067d23c9
KY
9189 ;
9190 return 0;
9191}
9192_ACEOF
9193if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 9194 ac_cv_lib_ossaudio__oss_ioctl=yes
067d23c9 9195else
5476a9a4 9196 ac_cv_lib_ossaudio__oss_ioctl=no
067d23c9
KY
9197fi
9198rm -f core conftest.err conftest.$ac_objext \
9199 conftest$ac_exeext conftest.$ac_ext
5476a9a4
GM
9200LIBS=$ac_check_lib_save_LIBS
9201fi
9202{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5
9203$as_echo "$ac_cv_lib_ossaudio__oss_ioctl" >&6; }
9204if test "x$ac_cv_lib_ossaudio__oss_ioctl" = x""yes; then :
9205 LIBSOUND=-lossaudio
9206else
9207 LIBSOUND=
067d23c9
KY
9208fi
9209
dfdf7fe5
GM
9210 test "${with_sound}" = "bsd-ossaudio" && test -z "$LIBSOUND" && \
9211 as_fn_error "bsd-ossaudio sound support requested but not found." "$LINENO" 5
9dabd86d 9212 fi
067d23c9
KY
9213
9214
9dabd86d
GM
9215 if test "${with_sound}" = "alsa" || test "${with_sound}" = "yes"; then
9216 ALSA_REQUIRED=1.0.0
9217 ALSA_MODULES="alsa >= $ALSA_REQUIRED"
5476a9a4
GM
9218
9219 succeeded=no
9220
9221 if test "$PKG_CONFIG" = "no" ; then
9222 HAVE_ALSA=no
9223 else
9224 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 9225 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
9226 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ALSA_MODULES" >&5
9227$as_echo_n "checking for $ALSA_MODULES... " >&6; }
9228
b5591ebb
GM
9229 if "$PKG_CONFIG" --exists "$ALSA_MODULES" 2>&5 &&
9230 ALSA_CFLAGS=`"$PKG_CONFIG" --cflags "$ALSA_MODULES" 2>&5` &&
9231 ALSA_LIBS=`"$PKG_CONFIG" --libs "$ALSA_MODULES" 2>&5`; then
5476a9a4
GM
9232 edit_cflags="
9233 s,///*,/,g
9234 s/^/ /
9235 s/ -I/ $isystem/g
9236 s/^ //
9237 "
9238 ALSA_CFLAGS=`$as_echo "$ALSA_CFLAGS" | sed -e "$edit_cflags"`
9239 ALSA_LIBS=`$as_echo "$ALSA_LIBS" | sed -e 's,///*,/,g'`
9240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$ALSA_CFLAGS' LIBS='$ALSA_LIBS'" >&5
9241$as_echo "yes CFLAGS='$ALSA_CFLAGS' LIBS='$ALSA_LIBS'" >&6; }
9242 succeeded=yes
9243 else
9244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9245$as_echo "no" >&6; }
9246 ALSA_CFLAGS=""
9247 ALSA_LIBS=""
9248 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
9249 ## do set a variable so people can do so. Do it in a subshell
9250 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 9251 ALSA_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$ALSA_MODULES") 2>&1`
5476a9a4
GM
9252
9253 fi
9254
9255
9256
9257 else
9258 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
9259 echo "*** See http://www.freedesktop.org/software/pkgconfig"
9260 fi
9261 fi
9262
9263 if test $succeeded = yes; then
9264 HAVE_ALSA=yes
9265 else
9266 HAVE_ALSA=no
9267 fi
f199cab1 9268
9dabd86d
GM
9269 if test $HAVE_ALSA = yes; then
9270 SAVE_CFLAGS="$CFLAGS"
9271 SAVE_LIBS="$LIBS"
9272 CFLAGS="$ALSA_CFLAGS $CFLAGS"
9273 LIBS="$ALSA_LIBS $LIBS"
9274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5476a9a4
GM
9275/* end confdefs.h. */
9276#include <asoundlib.h>
067d23c9
KY
9277int
9278main ()
9279{
5476a9a4 9280snd_lib_error_set_handler (0);
067d23c9
KY
9281 ;
9282 return 0;
9283}
9284_ACEOF
5476a9a4
GM
9285if ac_fn_c_try_compile "$LINENO"; then :
9286 emacs_alsa_normal=yes
067d23c9 9287else
5476a9a4 9288 emacs_alsa_normal=no
067d23c9 9289fi
5476a9a4 9290rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9dabd86d
GM
9291 if test "$emacs_alsa_normal" != yes; then
9292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5476a9a4
GM
9293/* end confdefs.h. */
9294#include <alsa/asoundlib.h>
9295int
9296main ()
9297{
9298snd_lib_error_set_handler (0);
9299 ;
9300 return 0;
9301}
9302_ACEOF
9303if ac_fn_c_try_compile "$LINENO"; then :
9304 emacs_alsa_subdir=yes
9305else
9306 emacs_alsa_subdir=no
f199cab1 9307fi
5476a9a4 9308rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9dabd86d
GM
9309 if test "$emacs_alsa_subdir" != yes; then
9310 as_fn_error "pkg-config found alsa, but it does not compile. See config.log for error messages." "$LINENO" 5
9311 fi
9312 ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE"
5476a9a4 9313 fi
067d23c9 9314
9dabd86d
GM
9315 CFLAGS="$SAVE_CFLAGS"
9316 LIBS="$SAVE_LIBS"
9317 LIBSOUND="$LIBSOUND $ALSA_LIBS"
9318 CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS"
067d23c9 9319
5476a9a4 9320$as_echo "#define HAVE_ALSA 1" >>confdefs.h
067d23c9 9321
9dabd86d
GM
9322 elif test "${with_sound}" = "alsa"; then
9323 as_fn_error "ALSA sound support requested but not found." "$LINENO" 5
9324 fi
5476a9a4 9325 fi
9dabd86d 9326 if test x$have_sound_header = xyes || test $HAVE_ALSA = yes; then
5476a9a4 9327 case "$opsys" in
9dabd86d 9328 gnu-linux|freebsd|netbsd|mingw32)
067d23c9 9329
5476a9a4 9330$as_echo "#define HAVE_SOUND 1" >>confdefs.h
067d23c9 9331
9dabd86d 9332 HAVE_SOUND=yes
5476a9a4
GM
9333 ;;
9334 esac
9335 fi
067d23c9
KY
9336
9337
5476a9a4 9338fi
067d23c9 9339
e700232f
GM
9340
9341
9342
5476a9a4
GM
9343 for ac_header in $ac_header_list
9344do :
9345 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9346ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
9347"
9348eval as_val=\$$as_ac_Header
9349 if test "x$as_val" = x""yes; then :
9350 cat >>confdefs.h <<_ACEOF
9351#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
067d23c9
KY
9352_ACEOF
9353
f199cab1 9354fi
e700232f 9355
5476a9a4
GM
9356done
9357
9358
e700232f
GM
9359
9360
9361
f199cab1 9362
067d23c9 9363
067d23c9 9364
067d23c9 9365
067d23c9 9366
f199cab1
GM
9367
9368
9369
067d23c9 9370
067d23c9 9371
f199cab1
GM
9372
9373
9374
5476a9a4
GM
9375
9376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if personality LINUX32 can be set" >&5
9377$as_echo_n "checking if personality LINUX32 can be set... " >&6; }
9378cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9379/* end confdefs.h. */
9380#include <sys/personality.h>
067d23c9
KY
9381int
9382main ()
9383{
5476a9a4 9384personality (PER_LINUX32)
067d23c9
KY
9385 ;
9386 return 0;
9387}
9388_ACEOF
9389if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4 9390 emacs_cv_personality_linux32=yes
067d23c9 9391else
5476a9a4 9392 emacs_cv_personality_linux32=no
067d23c9 9393fi
f199cab1 9394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5476a9a4
GM
9395{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_personality_linux32" >&5
9396$as_echo "$emacs_cv_personality_linux32" >&6; }
f199cab1 9397
5476a9a4 9398if test $emacs_cv_personality_linux32 = yes; then
f199cab1 9399
5476a9a4
GM
9400$as_echo "#define HAVE_PERSONALITY_LINUX32 1" >>confdefs.h
9401
9402fi
9403
9404for ac_header in term.h
9405do :
9406 ac_fn_c_check_header_preproc "$LINENO" "term.h" "ac_cv_header_term_h"
9407if test "x$ac_cv_header_term_h" = x""yes; then :
9408 cat >>confdefs.h <<_ACEOF
9409#define HAVE_TERM_H 1
067d23c9 9410_ACEOF
5476a9a4
GM
9411
9412fi
9413
9414done
9415
9416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
9417$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
9418if test "${ac_cv_header_time+set}" = set; then :
9419 $as_echo_n "(cached) " >&6
9420else
9421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 9422/* end confdefs.h. */
5476a9a4
GM
9423#include <sys/types.h>
9424#include <sys/time.h>
9425#include <time.h>
f199cab1 9426
067d23c9
KY
9427int
9428main ()
9429{
5476a9a4
GM
9430if ((struct tm *) 0)
9431return 0;
067d23c9
KY
9432 ;
9433 return 0;
9434}
9435_ACEOF
9436if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4 9437 ac_cv_header_time=yes
067d23c9 9438else
5476a9a4 9439 ac_cv_header_time=no
067d23c9
KY
9440fi
9441rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9442fi
5476a9a4
GM
9443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
9444$as_echo "$ac_cv_header_time" >&6; }
9445if test $ac_cv_header_time = yes; then
f199cab1 9446
5476a9a4
GM
9447$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
9448
9449fi
9450
dc67e786
GM
9451ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "#include <signal.h>
9452
9453"
5476a9a4
GM
9454if test "x$ac_cv_have_decl_sys_siglist" = x""yes; then :
9455 ac_have_decl=1
9456else
9457 ac_have_decl=0
9458fi
9459
9460cat >>confdefs.h <<_ACEOF
9461#define HAVE_DECL_SYS_SIGLIST $ac_have_decl
067d23c9 9462_ACEOF
5476a9a4
GM
9463
9464if test $ac_cv_have_decl_sys_siglist != yes; then
9465 # For Tru64, at least:
dc67e786
GM
9466 ac_fn_c_check_decl "$LINENO" "__sys_siglist" "ac_cv_have_decl___sys_siglist" "#include <signal.h>
9467
9468"
5476a9a4
GM
9469if test "x$ac_cv_have_decl___sys_siglist" = x""yes; then :
9470 ac_have_decl=1
9471else
9472 ac_have_decl=0
067d23c9 9473fi
5476a9a4
GM
9474
9475cat >>confdefs.h <<_ACEOF
9476#define HAVE_DECL___SYS_SIGLIST $ac_have_decl
9477_ACEOF
9478
5476a9a4
GM
9479fi
9480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
9481$as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
9482if test "${ac_cv_header_sys_wait_h+set}" = set; then :
9483 $as_echo_n "(cached) " >&6
067d23c9
KY
9484else
9485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9486/* end confdefs.h. */
5476a9a4
GM
9487#include <sys/types.h>
9488#include <sys/wait.h>
9489#ifndef WEXITSTATUS
9490# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
9491#endif
9492#ifndef WIFEXITED
9493# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
9494#endif
9495
067d23c9
KY
9496int
9497main ()
9498{
5476a9a4
GM
9499 int s;
9500 wait (&s);
9501 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
067d23c9
KY
9502 ;
9503 return 0;
9504}
9505_ACEOF
5476a9a4
GM
9506if ac_fn_c_try_compile "$LINENO"; then :
9507 ac_cv_header_sys_wait_h=yes
067d23c9 9508else
5476a9a4 9509 ac_cv_header_sys_wait_h=no
067d23c9 9510fi
5476a9a4 9511rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
067d23c9 9512fi
5476a9a4
GM
9513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
9514$as_echo "$ac_cv_header_sys_wait_h" >&6; }
9515if test $ac_cv_header_sys_wait_h = yes; then
067d23c9 9516
5476a9a4 9517$as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
7417b37c 9518
5476a9a4 9519fi
7417b37c 9520
7417b37c 9521
067d23c9
KY
9522
9523
e700232f 9524
5476a9a4
GM
9525for ac_header in net/if.h
9526do :
9527 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
9528#if HAVE_SYS_SOCKET_H
9529#include <sys/socket.h>
9530#endif
9531"
9532if test "x$ac_cv_header_net_if_h" = x""yes; then :
9533 cat >>confdefs.h <<_ACEOF
9534#define HAVE_NET_IF_H 1
067d23c9 9535_ACEOF
7cae64b4 9536
067d23c9 9537fi
067d23c9 9538
5476a9a4 9539done
4d4b75e8 9540
5476a9a4
GM
9541for ac_header in ifaddrs.h
9542do :
9543 ac_fn_c_check_header_compile "$LINENO" "ifaddrs.h" "ac_cv_header_ifaddrs_h" "$ac_includes_default
9544#if HAVE_SYS_SOCKET_H
9545#include <sys/socket.h>
9546#endif
9547"
9548if test "x$ac_cv_header_ifaddrs_h" = x""yes; then :
9549 cat >>confdefs.h <<_ACEOF
9550#define HAVE_IFADDRS_H 1
9551_ACEOF
4d4b75e8 9552
5476a9a4 9553fi
4d4b75e8 9554
5476a9a4 9555done
7e723570 9556
5476a9a4 9557for ac_header in net/if_dl.h
7e723570 9558do :
5476a9a4
GM
9559 ac_fn_c_check_header_compile "$LINENO" "net/if_dl.h" "ac_cv_header_net_if_dl_h" "$ac_includes_default
9560#if HAVE_SYS_SOCKET_H
9561#include <sys/socket.h>
9562#endif
7e723570 9563"
5476a9a4 9564if test "x$ac_cv_header_net_if_dl_h" = x""yes; then :
7e723570 9565 cat >>confdefs.h <<_ACEOF
5476a9a4 9566#define HAVE_NET_IF_DL_H 1
7e723570
GM
9567_ACEOF
9568
9569fi
9570
9571done
9572
9573
5476a9a4
GM
9574ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_flags" "ac_cv_member_struct_ifreq_ifr_flags" "$ac_includes_default
9575#if HAVE_SYS_SOCKET_H
9576#include <sys/socket.h>
9577#endif
9578#if HAVE_NET_IF_H
9579#include <net/if.h>
9580#endif
9581"
9582if test "x$ac_cv_member_struct_ifreq_ifr_flags" = x""yes; then :
7e723570 9583
5476a9a4
GM
9584cat >>confdefs.h <<_ACEOF
9585#define HAVE_STRUCT_IFREQ_IFR_FLAGS 1
9586_ACEOF
7e723570
GM
9587
9588
5476a9a4
GM
9589fi
9590ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_hwaddr" "ac_cv_member_struct_ifreq_ifr_hwaddr" "$ac_includes_default
9591#if HAVE_SYS_SOCKET_H
9592#include <sys/socket.h>
f199cab1 9593#endif
5476a9a4
GM
9594#if HAVE_NET_IF_H
9595#include <net/if.h>
f199cab1 9596#endif
5476a9a4
GM
9597"
9598if test "x$ac_cv_member_struct_ifreq_ifr_hwaddr" = x""yes; then :
9599
9600cat >>confdefs.h <<_ACEOF
9601#define HAVE_STRUCT_IFREQ_IFR_HWADDR 1
9602_ACEOF
9603
9604
9605fi
9606ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_netmask" "ac_cv_member_struct_ifreq_ifr_netmask" "$ac_includes_default
9607#if HAVE_SYS_SOCKET_H
9608#include <sys/socket.h>
f199cab1 9609#endif
5476a9a4
GM
9610#if HAVE_NET_IF_H
9611#include <net/if.h>
9612#endif
9613"
9614if test "x$ac_cv_member_struct_ifreq_ifr_netmask" = x""yes; then :
9615
9616cat >>confdefs.h <<_ACEOF
9617#define HAVE_STRUCT_IFREQ_IFR_NETMASK 1
f199cab1 9618_ACEOF
5476a9a4
GM
9619
9620
9621fi
9622ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_broadaddr" "ac_cv_member_struct_ifreq_ifr_broadaddr" "$ac_includes_default
9623#if HAVE_SYS_SOCKET_H
9624#include <sys/socket.h>
9625#endif
9626#if HAVE_NET_IF_H
9627#include <net/if.h>
9628#endif
9629"
9630if test "x$ac_cv_member_struct_ifreq_ifr_broadaddr" = x""yes; then :
9631
9632cat >>confdefs.h <<_ACEOF
9633#define HAVE_STRUCT_IFREQ_IFR_BROADADDR 1
f199cab1 9634_ACEOF
5476a9a4
GM
9635
9636
067d23c9 9637fi
5476a9a4
GM
9638ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_addr" "ac_cv_member_struct_ifreq_ifr_addr" "$ac_includes_default
9639#if HAVE_SYS_SOCKET_H
9640#include <sys/socket.h>
9641#endif
9642#if HAVE_NET_IF_H
9643#include <net/if.h>
9644#endif
9645"
9646if test "x$ac_cv_member_struct_ifreq_ifr_addr" = x""yes; then :
9647
9648cat >>confdefs.h <<_ACEOF
9649#define HAVE_STRUCT_IFREQ_IFR_ADDR 1
9650_ACEOF
9651
067d23c9 9652
f199cab1 9653fi
5476a9a4
GM
9654ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_addr.sa_len" "ac_cv_member_struct_ifreq_ifr_addr_sa_len" "$ac_includes_default
9655#if HAVE_SYS_SOCKET_H
9656#include <sys/socket.h>
9657#endif
9658#if HAVE_NET_IF_H
9659#include <net/if.h>
9660#endif
9661"
9662if test "x$ac_cv_member_struct_ifreq_ifr_addr_sa_len" = x""yes; then :
9663
9664cat >>confdefs.h <<_ACEOF
9665#define HAVE_STRUCT_IFREQ_IFR_ADDR_SA_LEN 1
9666_ACEOF
9667
067d23c9
KY
9668
9669fi
9670
9671
067d23c9 9672
f199cab1 9673
5476a9a4
GM
9674DEPFLAGS=
9675MKDEPDIR=":"
9676deps_frag=deps.mk
9677if test "$GCC" = yes && test "$ac_enable_autodepend" = yes; then
9678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using GNU Make" >&5
9679$as_echo_n "checking whether we are using GNU Make... " >&6; }
9680 HAVE_GNU_MAKE=no
9681 testval=`${MAKE-make} --version 2>/dev/null | grep 'GNU Make'`
9682 if test "x$testval" != x; then
9683 HAVE_GNU_MAKE=yes
9684 else
9685 ac_enable_autodepend=no
9686 fi
9687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_GNU_MAKE" >&5
9688$as_echo "$HAVE_GNU_MAKE" >&6; }
9689 if test $HAVE_GNU_MAKE = yes; then
9690 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -MMD -MF" >&5
9691$as_echo_n "checking whether gcc understands -MMD -MF... " >&6; }
9692 SAVE_CFLAGS="$CFLAGS"
9693 CFLAGS="$CFLAGS -MMD -MF deps.d -MP"
9694 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9695/* end confdefs.h. */
f199cab1 9696
5476a9a4
GM
9697int
9698main ()
9699{
f199cab1 9700
5476a9a4
GM
9701 ;
9702 return 0;
9703}
9704_ACEOF
9705if ac_fn_c_try_compile "$LINENO"; then :
f199cab1 9706
5476a9a4
GM
9707else
9708 ac_enable_autodepend=no
9709fi
9710rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9711 CFLAGS="$SAVE_CFLAGS"
9712 test -f deps.d || ac_enable_autodepend=no
9713 rm -rf deps.d
9714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_autodepend" >&5
9715$as_echo "$ac_enable_autodepend" >&6; }
9716 fi
9717 if test $ac_enable_autodepend = yes; then
9718 DEPFLAGS='-MMD -MF ${DEPDIR}/$*.d -MP'
9719 ## MKDIR_P is documented (see AC_PROG_MKDIR_P) to be parallel-safe.
9720 MKDEPDIR='${MKDIR_P} ${DEPDIR}'
9721 deps_frag=autodeps.mk
9722 fi
9723fi
9724deps_frag=$srcdir/src/$deps_frag
f199cab1
GM
9725
9726
9727
9728
9729
5476a9a4 9730lisp_frag=$srcdir/src/lisp.mk
f199cab1
GM
9731
9732
9733
5476a9a4
GM
9734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long file names" >&5
9735$as_echo_n "checking for long file names... " >&6; }
9736if test "${ac_cv_sys_long_file_names+set}" = set; then :
9737 $as_echo_n "(cached) " >&6
9738else
9739 ac_cv_sys_long_file_names=yes
9740# Test for long file names in all the places we know might matter:
9741# . the current directory, where building will happen
9742# $prefix/lib where we will be installing things
9743# $exec_prefix/lib likewise
9744# $TMPDIR if set, where it might want to write temporary files
9745# /tmp where it might want to write temporary files
9746# /var/tmp likewise
9747# /usr/tmp likewise
9748for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do
9749 # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib
9750 # in the usual case where exec_prefix is '${prefix}'.
9751 case $ac_dir in #(
9752 . | /* | ?:[\\/]*) ;; #(
9753 *) continue;;
9754 esac
9755 test -w "$ac_dir/." || continue # It is less confusing to not echo anything here.
9756 ac_xdir=$ac_dir/cf$$
9757 (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
9758 ac_tf1=$ac_xdir/conftest9012345
9759 ac_tf2=$ac_xdir/conftest9012346
9760 touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" ||
9761 ac_cv_sys_long_file_names=no
9762 rm -f -r "$ac_xdir" 2>/dev/null
9763 test $ac_cv_sys_long_file_names = no && break
9764done
9765fi
9766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_long_file_names" >&5
9767$as_echo "$ac_cv_sys_long_file_names" >&6; }
9768if test $ac_cv_sys_long_file_names = yes; then
f199cab1 9769
5476a9a4 9770$as_echo "#define HAVE_LONG_FILE_NAMES 1" >>confdefs.h
f199cab1 9771
5476a9a4 9772fi
f199cab1 9773
f199cab1 9774
5476a9a4 9775#### Choose a window system.
f199cab1 9776
42dcba54
GM
9777## We leave window_system equal to none if
9778## we end up building without one. Any new window system should
9779## set window_system to an appropriate value and add objects to
9780## window-system-specific substs.
9781
9782window_system=none
5476a9a4
GM
9783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
9784$as_echo_n "checking for X... " >&6; }
f199cab1 9785
f199cab1 9786
5476a9a4
GM
9787# Check whether --with-x was given.
9788if test "${with_x+set}" = set; then :
9789 withval=$with_x;
9790fi
f199cab1 9791
5476a9a4
GM
9792# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
9793if test "x$with_x" = xno; then
9794 # The user explicitly disabled X.
9795 have_x=disabled
9796else
9797 case $x_includes,$x_libraries in #(
9798 *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
9799 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
9800 $as_echo_n "(cached) " >&6
9801else
9802 # One or both of the vars are not set, and there is no cached value.
9803ac_x_includes=no ac_x_libraries=no
9804rm -f -r conftest.dir
9805if mkdir conftest.dir; then
9806 cd conftest.dir
9807 cat >Imakefile <<'_ACEOF'
9808incroot:
9809 @echo incroot='${INCROOT}'
9810usrlibdir:
9811 @echo usrlibdir='${USRLIBDIR}'
9812libdir:
9813 @echo libdir='${LIBDIR}'
9814_ACEOF
9815 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
9816 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
9817 for ac_var in incroot usrlibdir libdir; do
9818 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
9819 done
9820 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
9821 for ac_extension in a so sl dylib la dll; do
9822 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
9823 test -f "$ac_im_libdir/libX11.$ac_extension"; then
9824 ac_im_usrlibdir=$ac_im_libdir; break
9825 fi
9826 done
9827 # Screen out bogus values from the imake configuration. They are
9828 # bogus both because they are the default anyway, and because
9829 # using them would break gcc on systems where it needs fixed includes.
9830 case $ac_im_incroot in
9831 /usr/include) ac_x_includes= ;;
9832 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
9833 esac
9834 case $ac_im_usrlibdir in
9835 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
9836 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
9837 esac
9838 fi
9839 cd ..
9840 rm -f -r conftest.dir
067d23c9
KY
9841fi
9842
5476a9a4
GM
9843# Standard set of common directories for X headers.
9844# Check X11 before X11Rn because it is often a symlink to the current release.
9845ac_x_header_dirs='
9846/usr/X11/include
9847/usr/X11R7/include
9848/usr/X11R6/include
9849/usr/X11R5/include
9850/usr/X11R4/include
067d23c9 9851
5476a9a4
GM
9852/usr/include/X11
9853/usr/include/X11R7
9854/usr/include/X11R6
9855/usr/include/X11R5
9856/usr/include/X11R4
067d23c9 9857
5476a9a4
GM
9858/usr/local/X11/include
9859/usr/local/X11R7/include
9860/usr/local/X11R6/include
9861/usr/local/X11R5/include
9862/usr/local/X11R4/include
067d23c9 9863
5476a9a4
GM
9864/usr/local/include/X11
9865/usr/local/include/X11R7
9866/usr/local/include/X11R6
9867/usr/local/include/X11R5
9868/usr/local/include/X11R4
067d23c9 9869
5476a9a4
GM
9870/usr/X386/include
9871/usr/x386/include
9872/usr/XFree86/include/X11
067d23c9 9873
5476a9a4
GM
9874/usr/include
9875/usr/local/include
9876/usr/unsupported/include
9877/usr/athena/include
9878/usr/local/x11r5/include
9879/usr/lpp/Xamples/include
067d23c9 9880
5476a9a4
GM
9881/usr/openwin/include
9882/usr/openwin/share/include'
067d23c9 9883
5476a9a4
GM
9884if test "$ac_x_includes" = no; then
9885 # Guess where to find include files, by looking for Xlib.h.
9886 # First, try using that file with no special directory specified.
9887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9888/* end confdefs.h. */
9889#include <X11/Xlib.h>
067d23c9 9890_ACEOF
5476a9a4
GM
9891if ac_fn_c_try_cpp "$LINENO"; then :
9892 # We can compile using X headers with no special include directory.
9893ac_x_includes=
067d23c9 9894else
5476a9a4
GM
9895 for ac_dir in $ac_x_header_dirs; do
9896 if test -r "$ac_dir/X11/Xlib.h"; then
9897 ac_x_includes=$ac_dir
9898 break
f199cab1 9899 fi
f199cab1 9900done
5476a9a4
GM
9901fi
9902rm -f conftest.err conftest.$ac_ext
9903fi # $ac_x_includes = no
067d23c9 9904
5476a9a4
GM
9905if test "$ac_x_libraries" = no; then
9906 # Check for the libraries.
9907 # See if we find them without any special options.
9908 # Don't add to $LIBS permanently.
9909 ac_save_LIBS=$LIBS
9910 LIBS="-lX11 $LIBS"
7ee3791f 9911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 9912/* end confdefs.h. */
5476a9a4 9913#include <X11/Xlib.h>
067d23c9
KY
9914int
9915main ()
9916{
5476a9a4
GM
9917XrmInitialize ()
9918 ;
067d23c9
KY
9919 return 0;
9920}
9921_ACEOF
5476a9a4
GM
9922if ac_fn_c_try_link "$LINENO"; then :
9923 LIBS=$ac_save_LIBS
9924# We can link X programs with no special library path.
9925ac_x_libraries=
7ee3791f 9926else
5476a9a4
GM
9927 LIBS=$ac_save_LIBS
9928for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
9929do
9930 # Don't even attempt the hair of trying to link an X program!
9931 for ac_extension in a so sl dylib la dll; do
9932 if test -r "$ac_dir/libX11.$ac_extension"; then
9933 ac_x_libraries=$ac_dir
9934 break 2
9935 fi
9936 done
9937done
7ee3791f 9938fi
5476a9a4
GM
9939rm -f core conftest.err conftest.$ac_objext \
9940 conftest$ac_exeext conftest.$ac_ext
9941fi # $ac_x_libraries = no
7ee3791f 9942
5476a9a4
GM
9943case $ac_x_includes,$ac_x_libraries in #(
9944 no,* | *,no | *\'*)
9945 # Didn't find X, or a directory has "'" in its name.
9946 ac_cv_have_x="have_x=no";; #(
9947 *)
9948 # Record where we found X for the cache.
9949 ac_cv_have_x="have_x=yes\
9950 ac_x_includes='$ac_x_includes'\
9951 ac_x_libraries='$ac_x_libraries'"
9952esac
9953fi
9954;; #(
9955 *) have_x=yes;;
9956 esac
9957 eval "$ac_cv_have_x"
9958fi # $with_x != no
9959
9960if test "$have_x" != yes; then
9961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
9962$as_echo "$have_x" >&6; }
9963 no_x=yes
9964else
9965 # If each of the values was on the command line, it overrides each guess.
9966 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
9967 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
9968 # Update the cache value to reflect the command line values.
9969 ac_cv_have_x="have_x=yes\
9970 ac_x_includes='$x_includes'\
9971 ac_x_libraries='$x_libraries'"
9972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
9973$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
9974fi
9975
42dcba54 9976if test "$no_x" != yes; then
5476a9a4
GM
9977 window_system=x11
9978fi
9979
9980LD_SWITCH_X_SITE_RPATH=
9981if test "${x_libraries}" != NONE; then
9982 if test -n "${x_libraries}"; then
9983 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
9984 LD_SWITCH_X_SITE_RPATH=-Wl,-rpath,`echo ${x_libraries} | sed -e "s/:/ -Wl,-rpath,/g"`
9985 fi
9986 x_default_search_path=""
9987 x_search_path=${x_libraries}
9988 if test -z "${x_search_path}"; then
9989 x_search_path=/usr/lib
9990 fi
9991 for x_library in `echo ${x_search_path}: | \
9992 sed -e "s/:/ /g" -e p -e "s:/lib[^ /]* :/share :g"`; do
9993 x_search_path="\
9994${x_library}/X11/%L/%T/%N%C%S:\
9995${x_library}/X11/%l/%T/%N%C%S:\
9996${x_library}/X11/%T/%N%C%S:\
9997${x_library}/X11/%L/%T/%N%S:\
9998${x_library}/X11/%l/%T/%N%S:\
9999${x_library}/X11/%T/%N%S"
10000 if test x"${x_default_search_path}" = x; then
10001 x_default_search_path=${x_search_path}
10002 else
10003 x_default_search_path="${x_search_path}:${x_default_search_path}"
10004 fi
10005 done
10006fi
10007
10008
10009if test "${x_includes}" != NONE && test -n "${x_includes}"; then
10010 C_SWITCH_X_SITE="$isystem"`echo ${x_includes} | sed -e "s/:/ $isystem/g"`
10011fi
10012
10013if test x"${x_includes}" = x; then
10014 bitmapdir=/usr/include/X11/bitmaps
10015else
10016 # accumulate include directories that have X11 bitmap subdirectories
10017 bmd_acc="dummyval"
10018 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
10019 if test -d "${bmd}/X11/bitmaps"; then
10020 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
10021 fi
10022 if test -d "${bmd}/bitmaps"; then
10023 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
10024 fi
10025 done
10026 if test ${bmd_acc} != "dummyval"; then
10027 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
10028 fi
10029fi
7ee3791f 10030
5476a9a4
GM
10031HAVE_NS=no
10032NS_IMPL_COCOA=no
10033NS_IMPL_GNUSTEP=no
10034tmp_CPPFLAGS="$CPPFLAGS"
10035tmp_CFLAGS="$CFLAGS"
10036CPPFLAGS="$CPPFLAGS -x objective-c"
10037CFLAGS="$CFLAGS -x objective-c"
5476a9a4 10038GNU_OBJC_CFLAGS=
4efe5ef9 10039LIBS_GNUSTEP=
5476a9a4
GM
10040if test "${with_ns}" != no; then
10041 if test "${opsys}" = darwin; then
10042 NS_IMPL_COCOA=yes
10043 ns_appdir=`pwd`/nextstep/Emacs.app
10044 ns_appbindir=${ns_appdir}/Contents/MacOS
10045 ns_appresdir=${ns_appdir}/Contents/Resources
bb7dce39 10046 ns_appsrc=Cocoa/Emacs.base
5476a9a4
GM
10047 elif test -f $GNUSTEP_CONFIG_FILE; then
10048 NS_IMPL_GNUSTEP=yes
10049 ns_appdir=`pwd`/nextstep/Emacs.app
10050 ns_appbindir=${ns_appdir}
10051 ns_appresdir=${ns_appdir}/Resources
bb7dce39 10052 ns_appsrc=GNUstep/Emacs.base
5476a9a4
GM
10053 GNUSTEP_SYSTEM_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_HEADERS)"
10054 GNUSTEP_SYSTEM_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_LIBRARIES)"
10055 GNUSTEP_LOCAL_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_HEADERS)"
10056 GNUSTEP_LOCAL_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_LIBRARIES)"
10057 test "x${GNUSTEP_LOCAL_HEADERS}" != "x" && \
10058 GNUSTEP_LOCAL_HEADERS="-I${GNUSTEP_LOCAL_HEADERS}"
10059 test "x${GNUSTEP_LOCAL_LIBRARIES}" != "x" && \
10060 GNUSTEP_LOCAL_LIBRARIES="-L${GNUSTEP_LOCAL_LIBRARIES}"
10061 CPPFLAGS="$CPPFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
10062 CFLAGS="$CFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
10063 LDFLAGS="$LDFLAGS -L${GNUSTEP_SYSTEM_LIBRARIES} ${GNUSTEP_LOCAL_LIBRARIES}"
4efe5ef9 10064 LIBS_GNUSTEP="-lgnustep-gui -lgnustep-base -lobjc -lpthread"
5476a9a4
GM
10065 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if GNUstep defines BASE_NATIVE_OBJC_EXCEPTIONS" >&5
10066$as_echo_n "checking if GNUstep defines BASE_NATIVE_OBJC_EXCEPTIONS... " >&6; }
10067if test "${emacs_cv_objc_exceptions+set}" = set; then :
10068 $as_echo_n "(cached) " >&6
10069else
10070 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10071/* end confdefs.h. */
10072#include <GNUstepBase/GSConfig.h>
39b3d70b
GM
10073int
10074main ()
10075{
5476a9a4
GM
10076#if defined BASE_NATIVE_OBJC_EXCEPTIONS && BASE_NATIVE_OBJC_EXCEPTIONS > 0
100771;
10078#else
10079fail;
10080#endif
10081 ;
39b3d70b
GM
10082 return 0;
10083}
10084_ACEOF
5476a9a4
GM
10085if ac_fn_c_try_compile "$LINENO"; then :
10086 emacs_cv_objc_exceptions=yes
39b3d70b 10087else
5476a9a4 10088 emacs_cv_objc_exceptions=no
39b3d70b 10089fi
5476a9a4 10090rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
39b3d70b 10091fi
5476a9a4
GM
10092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_objc_exceptions" >&5
10093$as_echo "$emacs_cv_objc_exceptions" >&6; }
10094 if test $emacs_cv_objc_exceptions = yes; then
39b3d70b 10095
5476a9a4
GM
10096$as_echo "#define _NATIVE_OBJC_EXCEPTIONS 1" >>confdefs.h
10097
10098 GNU_OBJC_CFLAGS="-fobjc-exceptions"
10099 fi
10100 fi
10101
10102 CFLAGS="$CFLAGS $GNU_OBJC_CFLAGS"
10103
10104 ac_fn_c_check_header_mongrel "$LINENO" "AppKit/AppKit.h" "ac_cv_header_AppKit_AppKit_h" "$ac_includes_default"
10105if test "x$ac_cv_header_AppKit_AppKit_h" = x""yes; then :
10106 HAVE_NS=yes
067d23c9 10107else
5476a9a4
GM
10108 as_fn_error "\`--with-ns' was specified, but the include
10109 files are missing or cannot be compiled." "$LINENO" 5
10110fi
f199cab1 10111
f199cab1 10112
dc67e786 10113
c6ad9bca
GM
10114 macfont_file=""
10115 if test "${NS_IMPL_COCOA}" = "yes"; then
10116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.4 or newer" >&5
10117$as_echo_n "checking for OSX 10.4 or newer... " >&6; }
10118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
dc67e786
GM
10119/* end confdefs.h. */
10120#include <AppKit/AppKit.h>
10121int
10122main ()
10123{
10124
10125#ifdef MAC_OS_X_VERSION_MAX_ALLOWED
10126#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1040
10127 ; /* OK */
10128#else
10129#error "OSX 10.4 or newer required"
10130#endif
10131#endif
10132
10133 ;
10134 return 0;
10135}
10136_ACEOF
10137if ac_fn_c_try_compile "$LINENO"; then :
10138 ns_osx_have_104=yes
10139else
10140 ns_osx_have_104=no
10141fi
10142rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c6ad9bca
GM
10143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ns_osx_have_104" >&5
10144$as_echo "$ns_osx_have_104" >&6; }
10145
10146 if test $ns_osx_have_104 = no; then
10147 as_fn_error "\`OSX 10.4 or newer is required'" "$LINENO" 5;
10148 fi
10149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 or newer" >&5
10150$as_echo_n "checking for OSX 10.5 or newer... " >&6; }
10151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10152/* end confdefs.h. */
10153#include <AppKit/AppKit.h>
10154int
10155main ()
10156{
10157
10158#ifdef MAC_OS_X_VERSION_MAX_ALLOWED
10159#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1050
10160 ; /* OK */
10161#else
10162#error "OSX 10.5 not found"
10163#endif
10164#endif
10165
10166 ;
10167 return 0;
10168}
10169_ACEOF
10170if ac_fn_c_try_compile "$LINENO"; then :
10171 ns_osx_have_105=yes
10172else
10173 ns_osx_have_105=no
10174fi
10175rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ns_osx_have_105" >&5
10177$as_echo "$ns_osx_have_105" >&6; }
10178 if test $ns_osx_have_105 = yes; then
10179 macfont_file="macfont.o"
10180 fi
10181 fi
5476a9a4
GM
10182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10183/* end confdefs.h. */
10184#include <Foundation/NSObjCRuntime.h>
067d23c9
KY
10185int
10186main ()
10187{
5476a9a4
GM
10188NSInteger i;
10189 ;
067d23c9
KY
10190 return 0;
10191}
10192_ACEOF
5476a9a4
GM
10193if ac_fn_c_try_compile "$LINENO"; then :
10194 ns_have_nsinteger=yes
067d23c9 10195else
5476a9a4 10196 ns_have_nsinteger=no
067d23c9 10197fi
5476a9a4
GM
10198rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10199 if test $ns_have_nsinteger = yes; then
067d23c9 10200
5476a9a4 10201$as_echo "#define NS_HAVE_NSINTEGER 1" >>confdefs.h
067d23c9 10202
067d23c9 10203 fi
5476a9a4 10204fi
067d23c9 10205
5476a9a4 10206
5c0255d9 10207
5476a9a4
GM
10208INSTALL_ARCH_INDEP_EXTRA=install-etc
10209ns_self_contained=no
5476a9a4
GM
10210NS_OBJ=
10211NS_OBJC_OBJ=
10212if test "${HAVE_NS}" = yes; then
10213 if test "$with_toolkit_scroll_bars" = "no"; then
10214 as_fn_error "Non-toolkit scroll bars are not implemented for Nextstep." "$LINENO" 5
10215 fi
10216
10217 window_system=nextstep
5476a9a4
GM
10218 # set up packaging dirs
10219 if test "${EN_NS_SELF_CONTAINED}" = yes; then
10220 ns_self_contained=yes
10221 prefix=${ns_appresdir}
10222 exec_prefix=${ns_appbindir}
10223 libexecdir="\${ns_appbindir}/libexec"
10224 archlibdir="\${ns_appbindir}/libexec"
7a67e06b 10225 etcdocdir="\${ns_appresdir}/etc"
5476a9a4
GM
10226 etcdir="\${ns_appresdir}/etc"
10227 infodir="\${ns_appresdir}/info"
10228 mandir="\${ns_appresdir}/man"
10229 lispdir="\${ns_appresdir}/lisp"
10230 leimdir="\${ns_appresdir}/leim"
10231 INSTALL_ARCH_INDEP_EXTRA=
10232 fi
c6ad9bca
GM
10233
10234 NS_OBJC_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o $macfont_file"
5476a9a4
GM
10235fi
10236CFLAGS="$tmp_CFLAGS"
10237CPPFLAGS="$tmp_CPPFLAGS"
10238
10239
10240
10241
10242
5c0255d9
GM
10243HAVE_W32=no
10244W32_OBJ=
10245W32_LIBS=
7c61eaab
GM
10246EMACSRES=
10247CLIENTRES=
10248CLIENTW=
b5eb356a 10249W32_RES_LINK=
7c61eaab 10250EMACS_MANIFEST=
68b8ed38 10251UPDATE_MANIFEST=
5c0255d9 10252if test "${with_w32}" != no; then
7c61eaab
GM
10253 case "${opsys}" in
10254 cygwin)
10255 ac_fn_c_check_header_mongrel "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default"
5c0255d9
GM
10256if test "x$ac_cv_header_windows_h" = x""yes; then :
10257 HAVE_W32=yes
10258else
10259 as_fn_error "\`--with-w32' was specified, but windows.h
7c61eaab
GM
10260 cannot be found." "$LINENO" 5
10261fi
10262
10263
10264 ;;
10265 mingw32)
10266 ## Using --with-w32 with MinGW is a no-op, but we allow it.
10267 ;;
10268 *)
10269 as_fn_error "Using w32 with an autotools build is only supported for Cygwin and MinGW32." "$LINENO" 5
10270 ;;
10271 esac
5c0255d9
GM
10272fi
10273
7c61eaab
GM
10274if test "${opsys}" = "mingw32"; then
10275 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Windows API headers are recent enough" >&5
10276$as_echo_n "checking whether Windows API headers are recent enough... " >&6; }
10277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10278/* end confdefs.h. */
10279
10280 #include <windows.h>
10281 #include <usp10.h>
10282int
10283main ()
10284{
20c9c1dc
GM
10285PIMAGE_NT_HEADERS pHeader;
10286 PIMAGE_SECTION_HEADER pSection = IMAGE_FIRST_SECTION(pHeader)
7c61eaab
GM
10287 ;
10288 return 0;
10289}
10290_ACEOF
10291if ac_fn_c_try_compile "$LINENO"; then :
10292 emacs_cv_w32api=yes
10293 HAVE_W32=yes
10294else
10295 emacs_cv_w32api=no
10296fi
10297rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_w32api" >&5
10299$as_echo "$emacs_cv_w32api" >&6; }
10300 if test "${emacs_cv_w32api}" = "no"; then
10301 as_fn_error "the Windows API headers are too old to support this build." "$LINENO" 5
10302 fi
10303fi
5c0255d9 10304
7c61eaab
GM
10305FIRSTFILE_OBJ=
10306NTDIR=
10307LIBS_ECLIENT=
10308LIB_WSOCK32=
10309NTLIB=
10310CM_OBJ="cm.o"
10311XARGS_LIMIT=
10312if test "${HAVE_W32}" = "yes"; then
5c0255d9
GM
10313
10314$as_echo "#define HAVE_NTGUI 1" >>confdefs.h
10315
b5eb356a
GM
10316 if test -n "$ac_tool_prefix"; then
10317 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
10318set dummy ${ac_tool_prefix}windres; ac_word=$2
10319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10320$as_echo_n "checking for $ac_word... " >&6; }
10321if test "${ac_cv_prog_WINDRES+set}" = set; then :
10322 $as_echo_n "(cached) " >&6
10323else
10324 if test -n "$WINDRES"; then
10325 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
10326else
10327as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10328for as_dir in $PATH
10329do
10330 IFS=$as_save_IFS
10331 test -z "$as_dir" && as_dir=.
10332 for ac_exec_ext in '' $ac_executable_extensions; do
10333 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10334 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
10335 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10336 break 2
10337 fi
10338done
10339 done
10340IFS=$as_save_IFS
10341
10342fi
10343fi
10344WINDRES=$ac_cv_prog_WINDRES
10345if test -n "$WINDRES"; then
10346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
10347$as_echo "$WINDRES" >&6; }
10348else
10349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10350$as_echo "no" >&6; }
10351fi
10352
10353
10354fi
10355if test -z "$ac_cv_prog_WINDRES"; then
10356 ac_ct_WINDRES=$WINDRES
10357 # Extract the first word of "windres", so it can be a program name with args.
10358set dummy windres; ac_word=$2
10359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10360$as_echo_n "checking for $ac_word... " >&6; }
10361if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then :
10362 $as_echo_n "(cached) " >&6
10363else
10364 if test -n "$ac_ct_WINDRES"; then
10365 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
10366else
10367as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10368for as_dir in $PATH
10369do
10370 IFS=$as_save_IFS
10371 test -z "$as_dir" && as_dir=.
10372 for ac_exec_ext in '' $ac_executable_extensions; do
10373 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10374 ac_cv_prog_ac_ct_WINDRES="windres"
10375 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10376 break 2
10377 fi
10378done
10379 done
10380IFS=$as_save_IFS
10381
10382fi
10383fi
10384ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
10385if test -n "$ac_ct_WINDRES"; then
10386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
10387$as_echo "$ac_ct_WINDRES" >&6; }
10388else
10389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10390$as_echo "no" >&6; }
10391fi
10392
10393 if test "x$ac_ct_WINDRES" = x; then
10394 WINDRES="as_fn_error "No resource compiler found." "$LINENO" 5"
10395 else
10396 case $cross_compiling:$ac_tool_warned in
10397yes:)
10398{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10399$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10400ac_tool_warned=yes ;;
10401esac
10402 WINDRES=$ac_ct_WINDRES
10403 fi
10404else
10405 WINDRES="$ac_cv_prog_WINDRES"
10406fi
10407
5c0255d9
GM
10408 W32_OBJ="w32fns.o w32menu.o w32reg.o w32font.o w32term.o"
10409 W32_OBJ="$W32_OBJ w32xfns.o w32select.o w32uniscribe.o"
7c61eaab
GM
10410 EMACSRES="emacs.res"
10411 case "$canonical" in
10412 x86_64-*-*) EMACS_MANIFEST="emacs-x64.manifest" ;;
10413 *) EMACS_MANIFEST="emacs-x86.manifest" ;;
10414 esac
68b8ed38 10415 UPDATE_MANIFEST=update-game-score.exe.manifest
7c61eaab
GM
10416 if test "${opsys}" = "cygwin"; then
10417 W32_LIBS="$W32_LIBS -lkernel32 -luser32 -lgdi32 -lole32 -lcomdlg32"
10418 W32_LIBS="$W32_LIBS -lusp10 -lcomctl32 -lwinspool"
10419 # Tell the linker that emacs.res is an object (which we compile from
10420 # the rc file), not a linker script.
10421 W32_RES_LINK="-Wl,emacs.res"
10422 else
10423 W32_OBJ="$W32_OBJ w32.o w32console.o w32heap.o w32inevt.o w32proc.o"
7c61eaab
GM
10424 W32_LIBS="$W32_LIBS -lwinmm -lgdi32 -lcomdlg32"
10425 W32_LIBS="$W32_LIBS -lmpr -lwinspool -lole32 -lcomctl32 -lusp10"
10426 W32_RES_LINK="\$(EMACSRES)"
10427 CLIENTRES="emacsclient.res"
10428 CLIENTW="emacsclientw\$(EXEEXT)"
10429 FIRSTFILE_OBJ=firstfile.o
10430 NTDIR=nt
10431 CM_OBJ=
10432 LIBS_ECLIENT="-lcomctl32"
10433 LIB_WSOCK32="-lwsock32"
10434 NTLIB="ntlib.$ac_objext"
10435 XARGS_LIMIT="-s 10000"
10436 fi
5c0255d9
GM
10437fi
10438
10439
10440
b5eb356a
GM
10441
10442
7c61eaab
GM
10443
10444
10445
10446
10447
10448
10449
10450
10451
10452
68b8ed38 10453
5c0255d9
GM
10454if test "${HAVE_W32}" = "yes"; then
10455 window_system=w32
10456 with_xft=no
10457fi
10458
42dcba54
GM
10459## $window_system is now set to the window system we will
10460## ultimately use.
10461
d04a2836
GM
10462if test "$window_system" = none && test "$gl_gcc_warnings" = yes; then
10463 # Too many warnings for now.
fc4002bd
GM
10464 nw=
10465 nw="$nw -Wsuggest-attribute=const"
10466 nw="$nw -Wsuggest-attribute=noreturn"
10467
10468 gl_warn_set=
10469 set x $WARN_CFLAGS; shift
10470 for gl_warn_item
10471 do
10472 case " $nw " in
10473 *" $gl_warn_item "*)
10474 ;;
10475 *)
10476 gl_warn_set="$gl_warn_set $gl_warn_item"
10477 ;;
10478 esac
10479 done
10480 WARN_CFLAGS=$gl_warn_set
10481
10482
d04a2836
GM
10483
10484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-variable" >&5
10485$as_echo_n "checking whether C compiler handles -Wno-unused-variable... " >&6; }
10486if test "${gl_cv_warn_c__Wno_unused_variable+set}" = set; then :
10487 $as_echo_n "(cached) " >&6
10488else
10489
10490 gl_save_compiler_FLAGS="$CFLAGS"
10491 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wunused-variable"
10492 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10493/* end confdefs.h. */
10494
10495int
10496main ()
10497{
10498
10499 ;
10500 return 0;
10501}
10502_ACEOF
ec165e83 10503if ac_fn_c_try_link "$LINENO"; then :
d04a2836
GM
10504 gl_cv_warn_c__Wno_unused_variable=yes
10505else
10506 gl_cv_warn_c__Wno_unused_variable=no
10507fi
ec165e83
GM
10508rm -f core conftest.err conftest.$ac_objext \
10509 conftest$ac_exeext conftest.$ac_ext
d04a2836
GM
10510 CFLAGS="$gl_save_compiler_FLAGS"
10511
10512fi
10513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_variable" >&5
10514$as_echo "$gl_cv_warn_c__Wno_unused_variable" >&6; }
10515if test "x$gl_cv_warn_c__Wno_unused_variable" = x""yes; then :
10516 as_fn_append WARN_CFLAGS " -Wno-unused-variable"
10517fi
10518
10519
10520
10521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-but-set-variable" >&5
10522$as_echo_n "checking whether C compiler handles -Wno-unused-but-set-variable... " >&6; }
10523if test "${gl_cv_warn_c__Wno_unused_but_set_variable+set}" = set; then :
10524 $as_echo_n "(cached) " >&6
10525else
10526
10527 gl_save_compiler_FLAGS="$CFLAGS"
10528 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wunused-but-set-variable"
10529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10530/* end confdefs.h. */
10531
10532int
10533main ()
10534{
10535
10536 ;
10537 return 0;
10538}
10539_ACEOF
ec165e83 10540if ac_fn_c_try_link "$LINENO"; then :
d04a2836
GM
10541 gl_cv_warn_c__Wno_unused_but_set_variable=yes
10542else
10543 gl_cv_warn_c__Wno_unused_but_set_variable=no
10544fi
ec165e83
GM
10545rm -f core conftest.err conftest.$ac_objext \
10546 conftest$ac_exeext conftest.$ac_ext
d04a2836
GM
10547 CFLAGS="$gl_save_compiler_FLAGS"
10548
10549fi
10550{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_but_set_variable" >&5
10551$as_echo "$gl_cv_warn_c__Wno_unused_but_set_variable" >&6; }
10552if test "x$gl_cv_warn_c__Wno_unused_but_set_variable" = x""yes; then :
10553 as_fn_append WARN_CFLAGS " -Wno-unused-but-set-variable"
10554fi
10555
10556
10557
10558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-but-set-parameter" >&5
10559$as_echo_n "checking whether C compiler handles -Wno-unused-but-set-parameter... " >&6; }
10560if test "${gl_cv_warn_c__Wno_unused_but_set_parameter+set}" = set; then :
10561 $as_echo_n "(cached) " >&6
10562else
10563
10564 gl_save_compiler_FLAGS="$CFLAGS"
10565 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wunused-but-set-parameter"
10566 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10567/* end confdefs.h. */
10568
10569int
10570main ()
10571{
10572
10573 ;
10574 return 0;
10575}
10576_ACEOF
ec165e83 10577if ac_fn_c_try_link "$LINENO"; then :
d04a2836
GM
10578 gl_cv_warn_c__Wno_unused_but_set_parameter=yes
10579else
10580 gl_cv_warn_c__Wno_unused_but_set_parameter=no
10581fi
ec165e83
GM
10582rm -f core conftest.err conftest.$ac_objext \
10583 conftest$ac_exeext conftest.$ac_ext
d04a2836
GM
10584 CFLAGS="$gl_save_compiler_FLAGS"
10585
10586fi
10587{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_but_set_parameter" >&5
10588$as_echo "$gl_cv_warn_c__Wno_unused_but_set_parameter" >&6; }
10589if test "x$gl_cv_warn_c__Wno_unused_but_set_parameter" = x""yes; then :
10590 as_fn_append WARN_CFLAGS " -Wno-unused-but-set-parameter"
10591fi
10592
10593
10594fi
10595
42dcba54
GM
10596term_header=
10597HAVE_X_WINDOWS=no
10598HAVE_X11=no
10599USE_X_TOOLKIT=none
10600
5476a9a4
GM
10601case "${window_system}" in
10602 x11 )
10603 HAVE_X_WINDOWS=yes
10604 HAVE_X11=yes
42dcba54 10605 term_header=xterm.h
5476a9a4
GM
10606 case "${with_x_toolkit}" in
10607 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
10608 motif ) USE_X_TOOLKIT=MOTIF ;;
10609 gtk ) with_gtk=yes
42dcba54 10610 term_header=gtkutil.h
5476a9a4 10611 USE_X_TOOLKIT=none ;;
4fa92495
GM
10612 gtk2 ) with_gtk2=yes
10613 term_header=gtkutil.h
10614 USE_X_TOOLKIT=none ;;
5476a9a4 10615 gtk3 ) with_gtk3=yes
42dcba54 10616 term_header=gtkutil.h
5476a9a4
GM
10617 USE_X_TOOLKIT=none ;;
10618 no ) USE_X_TOOLKIT=none ;;
10619 * ) USE_X_TOOLKIT=maybe ;;
10620 esac
10621 ;;
42dcba54
GM
10622 nextstep )
10623 term_header=nsterm.h
5476a9a4 10624 ;;
5c0255d9
GM
10625 w32 )
10626 term_header=w32term.h
10627 ;;
5476a9a4
GM
10628esac
10629
10630if test "$window_system" = none && test "X$with_x" != "Xno"; then
10631 # Extract the first word of "X", so it can be a program name with args.
10632set dummy X; ac_word=$2
10633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10634$as_echo_n "checking for $ac_word... " >&6; }
10635if test "${ac_cv_prog_HAVE_XSERVER+set}" = set; then :
10636 $as_echo_n "(cached) " >&6
10637else
10638 if test -n "$HAVE_XSERVER"; then
10639 ac_cv_prog_HAVE_XSERVER="$HAVE_XSERVER" # Let the user override the test.
10640else
10641as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10642for as_dir in $PATH
10643do
10644 IFS=$as_save_IFS
10645 test -z "$as_dir" && as_dir=.
10646 for ac_exec_ext in '' $ac_executable_extensions; do
10647 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10648 ac_cv_prog_HAVE_XSERVER="true"
10649 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10650 break 2
10651 fi
10652done
10653 done
10654IFS=$as_save_IFS
10655
10656 test -z "$ac_cv_prog_HAVE_XSERVER" && ac_cv_prog_HAVE_XSERVER="false"
10657fi
10658fi
10659HAVE_XSERVER=$ac_cv_prog_HAVE_XSERVER
10660if test -n "$HAVE_XSERVER"; then
10661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_XSERVER" >&5
10662$as_echo "$HAVE_XSERVER" >&6; }
10663else
10664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10665$as_echo "no" >&6; }
10666fi
10667
10668
10669 if test "$HAVE_XSERVER" = true ||
10670 test -n "$DISPLAY" ||
10671 test "`echo /usr/lib/libX11.*`" != "/usr/lib/libX11.*"; then
10672 as_fn_error "You seem to be running X, but no X development libraries
10673were found. You should install the relevant development files for X
10674and for the toolkit you want, such as Gtk+, Lesstif or Motif. Also make
10675sure you have development files for image handling, i.e.
10676tiff, gif, jpeg, png and xpm.
10677If you are sure you want Emacs compiled without X window support, pass
10678 --without-x
10679to configure." "$LINENO" 5
10680 fi
10681fi
10682
10683### If we're using X11, we should use the X menu package.
10684HAVE_MENUS=no
10685case ${HAVE_X11} in
10686 yes ) HAVE_MENUS=yes ;;
10687esac
10688
10689# Does the opsystem file prohibit the use of the GNU malloc?
10690# Assume not, until told otherwise.
10691GNU_MALLOC=yes
10692
10693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc is Doug Lea style" >&5
10694$as_echo_n "checking whether malloc is Doug Lea style... " >&6; }
10695if test "${emacs_cv_var_doug_lea_malloc+set}" = set; then :
067d23c9
KY
10696 $as_echo_n "(cached) " >&6
10697else
5476a9a4
GM
10698 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10699/* end confdefs.h. */
10700#include <malloc.h>
10701 static void hook (void) {}
10702int
10703main ()
10704{
10705malloc_set_state (malloc_get_state ());
10706 __after_morecore_hook = hook;
10707 __malloc_initialize_hook = hook;
10708 ;
10709 return 0;
10710}
10711_ACEOF
10712if ac_fn_c_try_link "$LINENO"; then :
10713 emacs_cv_var_doug_lea_malloc=yes
10714else
10715 emacs_cv_var_doug_lea_malloc=no
10716fi
10717rm -f core conftest.err conftest.$ac_objext \
10718 conftest$ac_exeext conftest.$ac_ext
10719fi
10720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_var_doug_lea_malloc" >&5
10721$as_echo "$emacs_cv_var_doug_lea_malloc" >&6; }
10722doug_lea_malloc=$emacs_cv_var_doug_lea_malloc
10723
10724
10725system_malloc=no
10726case "$opsys" in
10727 ## darwin ld insists on the use of malloc routines in the System framework.
10728 darwin|sol2-10) system_malloc=yes ;;
10729esac
10730
10731if test "${system_malloc}" = "yes"; then
10732
10733$as_echo "#define SYSTEM_MALLOC 1" >>confdefs.h
10734
10735 GNU_MALLOC=no
10736 GNU_MALLOC_reason="
10737 (The GNU allocators don't work with this system configuration.)"
10738 GMALLOC_OBJ=
10739 VMLIMIT_OBJ=
10740else
10741 test "$doug_lea_malloc" != "yes" && GMALLOC_OBJ=gmalloc.o
10742 VMLIMIT_OBJ=vm-limit.o
ce9ae7ca
GM
10743
10744 for ac_header in sys/vlimit.h
10745do :
10746 ac_fn_c_check_header_mongrel "$LINENO" "sys/vlimit.h" "ac_cv_header_sys_vlimit_h" "$ac_includes_default"
10747if test "x$ac_cv_header_sys_vlimit_h" = x""yes; then :
10748 cat >>confdefs.h <<_ACEOF
10749#define HAVE_SYS_VLIMIT_H 1
10750_ACEOF
10751
10752fi
10753
10754done
10755
10756 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for data_start" >&5
10757$as_echo_n "checking for data_start... " >&6; }
10758if test "${emacs_cv_data_start+set}" = set; then :
10759 $as_echo_n "(cached) " >&6
10760else
10761 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10762/* end confdefs.h. */
10763extern char data_start[]; char ch;
10764int
10765main ()
10766{
71e41a46 10767return data_start < &ch;
ce9ae7ca
GM
10768 ;
10769 return 0;
10770}
10771_ACEOF
10772if ac_fn_c_try_link "$LINENO"; then :
10773 emacs_cv_data_start=yes
10774else
10775 emacs_cv_data_start=no
10776fi
10777rm -f core conftest.err conftest.$ac_objext \
10778 conftest$ac_exeext conftest.$ac_ext
10779fi
10780{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_data_start" >&5
10781$as_echo "$emacs_cv_data_start" >&6; }
10782 if test $emacs_cv_data_start = yes; then
10783
10784$as_echo "#define HAVE_DATA_START 1" >>confdefs.h
10785
10786 fi
5476a9a4
GM
10787fi
10788
10789
10790
10791if test "$doug_lea_malloc" = "yes" ; then
10792 if test "$GNU_MALLOC" = yes ; then
10793 GNU_MALLOC_reason="
10794 (Using Doug Lea's new malloc from the GNU C Library.)"
10795 fi
10796
10797$as_echo "#define DOUG_LEA_MALLOC 1" >>confdefs.h
10798
10799
10800 ## Use mmap directly for allocating larger buffers.
10801 ## FIXME this comes from src/s/{gnu,gnu-linux}.h:
10802 ## #ifdef DOUG_LEA_MALLOC; #undef REL_ALLOC; #endif
10803 ## Does the AC_FUNC_MMAP test below make this check unnecessary?
10804 case "$opsys" in
10805 gnu*) REL_ALLOC=no ;;
10806 esac
10807fi
10808
10809if test x"${REL_ALLOC}" = x; then
10810 REL_ALLOC=${GNU_MALLOC}
10811fi
10812
10813use_mmap_for_buffers=no
10814case "$opsys" in
10815 cygwin|freebsd|irix6-5) use_mmap_for_buffers=yes ;;
10816esac
10817
10818
10819
10820
10821
10822
10823
10824
10825for ac_func in getpagesize
10826do :
10827 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
10828if test "x$ac_cv_func_getpagesize" = x""yes; then :
10829 cat >>confdefs.h <<_ACEOF
10830#define HAVE_GETPAGESIZE 1
10831_ACEOF
10832
10833fi
10834done
10835
10836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
10837$as_echo_n "checking for working mmap... " >&6; }
10838if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
10839 $as_echo_n "(cached) " >&6
10840else
10841 if test "$cross_compiling" = yes; then :
10842 ac_cv_func_mmap_fixed_mapped=no
10843else
10844 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10845/* end confdefs.h. */
10846$ac_includes_default
10847/* malloc might have been renamed as rpl_malloc. */
10848#undef malloc
10849
10850/* Thanks to Mike Haertel and Jim Avera for this test.
10851 Here is a matrix of mmap possibilities:
10852 mmap private not fixed
10853 mmap private fixed at somewhere currently unmapped
10854 mmap private fixed at somewhere already mapped
10855 mmap shared not fixed
10856 mmap shared fixed at somewhere currently unmapped
10857 mmap shared fixed at somewhere already mapped
10858 For private mappings, we should verify that changes cannot be read()
10859 back from the file, nor mmap's back from the file at a different
10860 address. (There have been systems where private was not correctly
10861 implemented like the infamous i386 svr4.0, and systems where the
10862 VM page cache was not coherent with the file system buffer cache
10863 like early versions of FreeBSD and possibly contemporary NetBSD.)
10864 For shared mappings, we should conversely verify that changes get
10865 propagated back to all the places they're supposed to be.
10866
10867 Grep wants private fixed already mapped.
10868 The main things grep needs to know about mmap are:
10869 * does it exist and is it safe to write into the mmap'd area
10870 * how to use it (BSD variants) */
10871
10872#include <fcntl.h>
10873#include <sys/mman.h>
10874
10875#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
10876char *malloc ();
10877#endif
10878
10879/* This mess was copied from the GNU getpagesize.h. */
10880#ifndef HAVE_GETPAGESIZE
10881# ifdef _SC_PAGESIZE
10882# define getpagesize() sysconf(_SC_PAGESIZE)
10883# else /* no _SC_PAGESIZE */
10884# ifdef HAVE_SYS_PARAM_H
10885# include <sys/param.h>
10886# ifdef EXEC_PAGESIZE
10887# define getpagesize() EXEC_PAGESIZE
10888# else /* no EXEC_PAGESIZE */
10889# ifdef NBPG
10890# define getpagesize() NBPG * CLSIZE
10891# ifndef CLSIZE
10892# define CLSIZE 1
10893# endif /* no CLSIZE */
10894# else /* no NBPG */
10895# ifdef NBPC
10896# define getpagesize() NBPC
10897# else /* no NBPC */
10898# ifdef PAGESIZE
10899# define getpagesize() PAGESIZE
10900# endif /* PAGESIZE */
10901# endif /* no NBPC */
10902# endif /* no NBPG */
10903# endif /* no EXEC_PAGESIZE */
10904# else /* no HAVE_SYS_PARAM_H */
10905# define getpagesize() 8192 /* punt totally */
10906# endif /* no HAVE_SYS_PARAM_H */
10907# endif /* no _SC_PAGESIZE */
10908
10909#endif /* no HAVE_GETPAGESIZE */
10910
10911int
10912main ()
10913{
10914 char *data, *data2, *data3;
10915 const char *cdata2;
10916 int i, pagesize;
10917 int fd, fd2;
10918
10919 pagesize = getpagesize ();
10920
10921 /* First, make a file with some known garbage in it. */
10922 data = (char *) malloc (pagesize);
10923 if (!data)
10924 return 1;
10925 for (i = 0; i < pagesize; ++i)
10926 *(data + i) = rand ();
10927 umask (0);
10928 fd = creat ("conftest.mmap", 0600);
10929 if (fd < 0)
10930 return 2;
10931 if (write (fd, data, pagesize) != pagesize)
10932 return 3;
10933 close (fd);
10934
10935 /* Next, check that the tail of a page is zero-filled. File must have
10936 non-zero length, otherwise we risk SIGBUS for entire page. */
10937 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
10938 if (fd2 < 0)
10939 return 4;
10940 cdata2 = "";
10941 if (write (fd2, cdata2, 1) != 1)
10942 return 5;
10943 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
10944 if (data2 == MAP_FAILED)
10945 return 6;
10946 for (i = 0; i < pagesize; ++i)
10947 if (*(data2 + i))
10948 return 7;
10949 close (fd2);
10950 if (munmap (data2, pagesize))
10951 return 8;
10952
10953 /* Next, try to mmap the file at a fixed address which already has
10954 something else allocated at it. If we can, also make sure that
10955 we see the same garbage. */
10956 fd = open ("conftest.mmap", O_RDWR);
10957 if (fd < 0)
10958 return 9;
10959 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
10960 MAP_PRIVATE | MAP_FIXED, fd, 0L))
10961 return 10;
10962 for (i = 0; i < pagesize; ++i)
10963 if (*(data + i) != *(data2 + i))
10964 return 11;
10965
10966 /* Finally, make sure that changes to the mapped area do not
10967 percolate back to the file as seen by read(). (This is a bug on
10968 some variants of i386 svr4.0.) */
10969 for (i = 0; i < pagesize; ++i)
10970 *(data2 + i) = *(data2 + i) + 1;
10971 data3 = (char *) malloc (pagesize);
10972 if (!data3)
10973 return 12;
10974 if (read (fd, data3, pagesize) != pagesize)
10975 return 13;
10976 for (i = 0; i < pagesize; ++i)
10977 if (*(data + i) != *(data3 + i))
10978 return 14;
10979 close (fd);
10980 return 0;
10981}
10982_ACEOF
10983if ac_fn_c_try_run "$LINENO"; then :
10984 ac_cv_func_mmap_fixed_mapped=yes
10985else
10986 ac_cv_func_mmap_fixed_mapped=no
10987fi
10988rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10989 conftest.$ac_objext conftest.beam conftest.$ac_ext
10990fi
10991
10992fi
10993{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
10994$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
10995if test $ac_cv_func_mmap_fixed_mapped = yes; then
10996
10997$as_echo "#define HAVE_MMAP 1" >>confdefs.h
10998
10999fi
11000rm -f conftest.mmap conftest.txt
11001
11002if test $use_mmap_for_buffers = yes; then
f199cab1 11003
5476a9a4
GM
11004$as_echo "#define USE_MMAP_FOR_BUFFERS 1" >>confdefs.h
11005
11006 REL_ALLOC=no
11007fi
11008
11009LIBS="$LIBS_SYSTEM $LIBS"
11010
11011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
11012$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
11013if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then :
11014 $as_echo_n "(cached) " >&6
067d23c9 11015else
5476a9a4
GM
11016 ac_check_lib_save_LIBS=$LIBS
11017LIBS="-ldnet $LIBS"
11018cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 11019/* end confdefs.h. */
067d23c9 11020
5476a9a4
GM
11021/* Override any GCC internal prototype to avoid an error.
11022 Use char because int might match the return type of a GCC
11023 builtin and then its argument prototype would still apply. */
11024#ifdef __cplusplus
11025extern "C"
11026#endif
11027char dnet_ntoa ();
11028int
11029main ()
f199cab1 11030{
5476a9a4
GM
11031return dnet_ntoa ();
11032 ;
11033 return 0;
f199cab1 11034}
5476a9a4
GM
11035_ACEOF
11036if ac_fn_c_try_link "$LINENO"; then :
11037 ac_cv_lib_dnet_dnet_ntoa=yes
11038else
11039 ac_cv_lib_dnet_dnet_ntoa=no
11040fi
11041rm -f core conftest.err conftest.$ac_objext \
11042 conftest$ac_exeext conftest.$ac_ext
11043LIBS=$ac_check_lib_save_LIBS
11044fi
11045{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
11046$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
11047if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then :
11048 cat >>confdefs.h <<_ACEOF
11049#define HAVE_LIBDNET 1
11050_ACEOF
11051
11052 LIBS="-ldnet $LIBS"
11053
11054fi
11055
11056
11057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lXbsd" >&5
11058$as_echo_n "checking for main in -lXbsd... " >&6; }
11059if test "${ac_cv_lib_Xbsd_main+set}" = set; then :
11060 $as_echo_n "(cached) " >&6
11061else
11062 ac_check_lib_save_LIBS=$LIBS
11063LIBS="-lXbsd $LIBS"
11064cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11065/* end confdefs.h. */
11066
11067
11068int
11069main ()
f199cab1 11070{
5476a9a4
GM
11071return main ();
11072 ;
11073 return 0;
f199cab1 11074}
5476a9a4
GM
11075_ACEOF
11076if ac_fn_c_try_link "$LINENO"; then :
11077 ac_cv_lib_Xbsd_main=yes
11078else
11079 ac_cv_lib_Xbsd_main=no
11080fi
11081rm -f core conftest.err conftest.$ac_objext \
11082 conftest$ac_exeext conftest.$ac_ext
11083LIBS=$ac_check_lib_save_LIBS
11084fi
11085{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xbsd_main" >&5
11086$as_echo "$ac_cv_lib_Xbsd_main" >&6; }
11087if test "x$ac_cv_lib_Xbsd_main" = x""yes; then :
11088 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
11089fi
11090
11091
11092LIB_PTHREAD=
11093
11094
11095
11096if test "$ac_cv_header_pthread_h"; then
11097 if test "$GMALLOC_OBJ" = gmalloc.o; then
11098 emacs_pthread_function=pthread_atfork
11099 else
11100 emacs_pthread_function=pthread_self
11101 fi
11102 as_ac_Lib=`$as_echo "ac_cv_lib_pthread_$emacs_pthread_function" | $as_tr_sh`
11103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $emacs_pthread_function in -lpthread" >&5
11104$as_echo_n "checking for $emacs_pthread_function in -lpthread... " >&6; }
11105if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
11106 $as_echo_n "(cached) " >&6
11107else
11108 ac_check_lib_save_LIBS=$LIBS
11109LIBS="-lpthread $LIBS"
11110cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11111/* end confdefs.h. */
11112
11113/* Override any GCC internal prototype to avoid an error.
11114 Use char because int might match the return type of a GCC
11115 builtin and then its argument prototype would still apply. */
11116#ifdef __cplusplus
11117extern "C"
11118#endif
11119char $emacs_pthread_function ();
11120int
11121main ()
f199cab1 11122{
5476a9a4
GM
11123return $emacs_pthread_function ();
11124 ;
11125 return 0;
f199cab1 11126}
5476a9a4
GM
11127_ACEOF
11128if ac_fn_c_try_link "$LINENO"; then :
11129 eval "$as_ac_Lib=yes"
11130else
11131 eval "$as_ac_Lib=no"
11132fi
11133rm -f core conftest.err conftest.$ac_objext \
11134 conftest$ac_exeext conftest.$ac_ext
11135LIBS=$ac_check_lib_save_LIBS
11136fi
11137eval ac_res=\$$as_ac_Lib
11138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11139$as_echo "$ac_res" >&6; }
11140eval as_val=\$$as_ac_Lib
11141 if test "x$as_val" = x""yes; then :
11142 HAVE_PTHREAD=yes
11143fi
11144
11145fi
11146if test "$HAVE_PTHREAD" = yes; then
11147 case "${canonical}" in
11148 *-hpux*) ;;
11149 *) LIB_PTHREAD="-lpthread"
11150 LIBS="$LIB_PTHREAD $LIBS" ;;
11151 esac
11152
11153$as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
11154
11155fi
11156
11157
11158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cma_open in -lpthreads" >&5
11159$as_echo_n "checking for cma_open in -lpthreads... " >&6; }
11160if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then :
11161 $as_echo_n "(cached) " >&6
11162else
11163 ac_check_lib_save_LIBS=$LIBS
11164LIBS="-lpthreads $LIBS"
11165cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11166/* end confdefs.h. */
11167
11168/* Override any GCC internal prototype to avoid an error.
11169 Use char because int might match the return type of a GCC
11170 builtin and then its argument prototype would still apply. */
11171#ifdef __cplusplus
11172extern "C"
f199cab1 11173#endif
5476a9a4
GM
11174char cma_open ();
11175int
11176main ()
11177{
11178return cma_open ();
11179 ;
11180 return 0;
f199cab1 11181}
5476a9a4
GM
11182_ACEOF
11183if ac_fn_c_try_link "$LINENO"; then :
11184 ac_cv_lib_pthreads_cma_open=yes
11185else
11186 ac_cv_lib_pthreads_cma_open=no
11187fi
11188rm -f core conftest.err conftest.$ac_objext \
11189 conftest$ac_exeext conftest.$ac_ext
11190LIBS=$ac_check_lib_save_LIBS
11191fi
11192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_cma_open" >&5
11193$as_echo "$ac_cv_lib_pthreads_cma_open" >&6; }
11194if test "x$ac_cv_lib_pthreads_cma_open" = x""yes; then :
11195 cat >>confdefs.h <<_ACEOF
11196#define HAVE_LIBPTHREADS 1
11197_ACEOF
11198
11199 LIBS="-lpthreads $LIBS"
11200
11201fi
11202
11203
11204## Note: when using cpp in s/aix4.2.h, this definition depended on
11205## HAVE_LIBPTHREADS. That was not defined earlier in configure when
11206## the system file was sourced. Hence the value of LIBS_SYSTEM
11207## added to LIBS in configure would never contain the pthreads part,
11208## but the value used in Makefiles might. FIXME?
11209##
11210## -lpthreads seems to be necessary for Xlib in X11R6, and should
11211## be harmless on older versions of X where it happens to exist.
11212test "$opsys" = "aix4-2" && \
11213 test $ac_cv_lib_pthreads_cma_open = yes && \
11214 LIBS_SYSTEM="$LIBS_SYSTEM -lpthreads"
11215
11216
11217case ${host_os} in
11218aix*)
11219 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
11220$as_echo_n "checking for -bbigtoc option... " >&6; }
11221if test "${gdb_cv_bigtoc+set}" = set; then :
11222 $as_echo_n "(cached) " >&6
11223else
11224
11225 case $GCC in
11226 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
11227 *) gdb_cv_bigtoc=-bbigtoc ;;
11228 esac
067d23c9 11229
5476a9a4
GM
11230 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
11231 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11232/* end confdefs.h. */
067d23c9
KY
11233
11234int
11235main ()
11236{
5476a9a4
GM
11237int i;
11238 ;
11239 return 0;
11240}
11241_ACEOF
11242if ac_fn_c_try_link "$LINENO"; then :
067d23c9 11243
5476a9a4
GM
11244else
11245 gdb_cv_bigtoc=
11246fi
11247rm -f core conftest.err conftest.$ac_objext \
11248 conftest$ac_exeext conftest.$ac_ext
067d23c9 11249
5476a9a4
GM
11250fi
11251{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
11252$as_echo "$gdb_cv_bigtoc" >&6; }
11253 ;;
11254esac
067d23c9 11255
5476a9a4
GM
11256# Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets
11257# used for the tests that follow. We set them back to REAL_CFLAGS and
11258# REAL_CPPFLAGS later on.
067d23c9 11259
5476a9a4
GM
11260REAL_CFLAGS="$CFLAGS"
11261REAL_CPPFLAGS="$CPPFLAGS"
11262
11263if test "${HAVE_X11}" = "yes"; then
11264 DEFS="$C_SWITCH_X_SITE $DEFS"
11265 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
11266 LIBS="-lX11 $LIBS"
11267 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
11268 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
11269
11270 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
11271 # This is handled by LD_SWITCH_X_SITE_RPATH during the real build,
11272 # but it's more convenient here to set LD_RUN_PATH since this
11273 # also works on hosts that don't understand LD_SWITCH_X_SITE_RPATH.
11274 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
11275 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
11276 export LD_RUN_PATH
11277 fi
11278
11279 if test "${opsys}" = "gnu-linux"; then
11280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether X on GNU/Linux needs -b to link" >&5
11281$as_echo_n "checking whether X on GNU/Linux needs -b to link... " >&6; }
11282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11283/* end confdefs.h. */
067d23c9 11284
5476a9a4
GM
11285int
11286main ()
11287{
11288XOpenDisplay ("foo");
f199cab1 11289 ;
067d23c9
KY
11290 return 0;
11291}
11292_ACEOF
5476a9a4
GM
11293if ac_fn_c_try_link "$LINENO"; then :
11294 xgnu_linux_first_failure=no
067d23c9 11295else
5476a9a4 11296 xgnu_linux_first_failure=yes
067d23c9 11297fi
5476a9a4
GM
11298rm -f core conftest.err conftest.$ac_objext \
11299 conftest$ac_exeext conftest.$ac_ext
11300 if test "${xgnu_linux_first_failure}" = "yes"; then
11301 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
11302 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
11303 OLD_CPPFLAGS="$CPPFLAGS"
11304 OLD_LIBS="$LIBS"
11305 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
11306 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
11307 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
11308 LIBS="$LIBS -b i486-linuxaout"
11309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11310/* end confdefs.h. */
067d23c9 11311
5476a9a4
GM
11312int
11313main ()
11314{
11315XOpenDisplay ("foo");
11316 ;
11317 return 0;
11318}
11319_ACEOF
11320if ac_fn_c_try_link "$LINENO"; then :
11321 xgnu_linux_second_failure=no
11322else
11323 xgnu_linux_second_failure=yes
067d23c9 11324fi
5476a9a4
GM
11325rm -f core conftest.err conftest.$ac_objext \
11326 conftest$ac_exeext conftest.$ac_ext
11327 if test "${xgnu_linux_second_failure}" = "yes"; then
11328 # If we get the same failure with -b, there is no use adding -b.
11329 # So take it out. This plays safe.
11330 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
11331 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
11332 CPPFLAGS="$OLD_CPPFLAGS"
11333 LIBS="$OLD_LIBS"
11334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11335$as_echo "no" >&6; }
11336 else
11337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11338$as_echo "yes" >&6; }
11339 fi
0eb4e0df 11340 else
5476a9a4
GM
11341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11342$as_echo "no" >&6; }
11343 fi
11344 fi
0eb4e0df 11345
5476a9a4
GM
11346 # Reportedly, some broken Solaris systems have XKBlib.h but are missing
11347 # header files included from there.
11348 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Xkb" >&5
11349$as_echo_n "checking for Xkb... " >&6; }
0eb4e0df
GM
11350 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11351/* end confdefs.h. */
5476a9a4
GM
11352#include <X11/Xlib.h>
11353#include <X11/XKBlib.h>
0eb4e0df
GM
11354int
11355main ()
11356{
5476a9a4 11357XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);
0eb4e0df
GM
11358 ;
11359 return 0;
11360}
11361_ACEOF
5476a9a4
GM
11362if ac_fn_c_try_link "$LINENO"; then :
11363 emacs_xkb=yes
0eb4e0df 11364else
5476a9a4 11365 emacs_xkb=no
0eb4e0df 11366fi
5476a9a4
GM
11367rm -f core conftest.err conftest.$ac_objext \
11368 conftest$ac_exeext conftest.$ac_ext
11369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_xkb" >&5
11370$as_echo "$emacs_xkb" >&6; }
11371 if test $emacs_xkb = yes; then
1abfdc54 11372
f46ba47d
GM
11373$as_echo "#define HAVE_XKB 1" >>confdefs.h
11374
e1fefc61 11375 fi
1abfdc54 11376
5476a9a4
GM
11377 for ac_func in XrmSetDatabase XScreenResourceString \
11378XScreenNumberOfScreen
11379do :
11380 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11381ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11382eval as_val=\$$as_ac_var
11383 if test "x$as_val" = x""yes; then :
11384 cat >>confdefs.h <<_ACEOF
11385#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
f199cab1 11386_ACEOF
1abfdc54 11387
5476a9a4
GM
11388fi
11389done
1abfdc54 11390
5476a9a4 11391fi
1abfdc54 11392
5476a9a4
GM
11393if test "${window_system}" = "x11"; then
11394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 version 6" >&5
11395$as_echo_n "checking X11 version 6... " >&6; }
11396 if test "${emacs_cv_x11_version_6+set}" = set; then :
067d23c9
KY
11397 $as_echo_n "(cached) " >&6
11398else
5476a9a4 11399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 11400/* end confdefs.h. */
5476a9a4 11401#include <X11/Xlib.h>
067d23c9
KY
11402int
11403main ()
11404{
5476a9a4
GM
11405#if XlibSpecificationRelease < 6
11406fail;
11407#endif
11408
067d23c9
KY
11409 ;
11410 return 0;
11411}
11412_ACEOF
5476a9a4
GM
11413if ac_fn_c_try_link "$LINENO"; then :
11414 emacs_cv_x11_version_6=yes
11415else
11416 emacs_cv_x11_version_6=no
11417fi
11418rm -f core conftest.err conftest.$ac_objext \
11419 conftest$ac_exeext conftest.$ac_ext
067d23c9 11420fi
f199cab1 11421
5476a9a4
GM
11422 if test $emacs_cv_x11_version_6 = yes; then
11423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5
11424$as_echo "6 or newer" >&6; }
f199cab1 11425
5476a9a4 11426$as_echo "#define HAVE_X11R6 1" >>confdefs.h
f199cab1
GM
11427
11428
5476a9a4 11429$as_echo "#define HAVE_X_I18N 1" >>confdefs.h
f199cab1 11430
5476a9a4
GM
11431 ## inoue@ainet.or.jp says Solaris has a bug related to X11R6-style
11432 ## XIM support.
11433 case "$opsys" in
11434 sol2-*) : ;;
11435 *)
11436$as_echo "#define HAVE_X11R6_XIM 1" >>confdefs.h
f199cab1 11437
5476a9a4
GM
11438 ;;
11439 esac
11440 else
11441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5
11442$as_echo "before 6" >&6; }
11443 fi
11444fi
f199cab1 11445
067d23c9 11446
5476a9a4
GM
11447### Use -lrsvg-2 if available, unless `--with-rsvg=no' is specified.
11448HAVE_RSVG=no
7c61eaab 11449if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes" || test "${opsys}" = "mingw32"; then
5476a9a4
GM
11450 if test "${with_rsvg}" != "no"; then
11451 RSVG_REQUIRED=2.11.0
11452 RSVG_MODULE="librsvg-2.0 >= $RSVG_REQUIRED"
067d23c9 11453
f199cab1 11454
5476a9a4 11455 succeeded=no
067d23c9 11456
5476a9a4
GM
11457 if test "$PKG_CONFIG" = "no" ; then
11458 :
11459 else
11460 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 11461 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
11462 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $RSVG_MODULE" >&5
11463$as_echo_n "checking for $RSVG_MODULE... " >&6; }
f199cab1 11464
b5591ebb
GM
11465 if "$PKG_CONFIG" --exists "$RSVG_MODULE" 2>&5 &&
11466 RSVG_CFLAGS=`"$PKG_CONFIG" --cflags "$RSVG_MODULE" 2>&5` &&
11467 RSVG_LIBS=`"$PKG_CONFIG" --libs "$RSVG_MODULE" 2>&5`; then
5476a9a4
GM
11468 edit_cflags="
11469 s,///*,/,g
11470 s/^/ /
11471 s/ -I/ $isystem/g
11472 s/^ //
11473 "
11474 RSVG_CFLAGS=`$as_echo "$RSVG_CFLAGS" | sed -e "$edit_cflags"`
11475 RSVG_LIBS=`$as_echo "$RSVG_LIBS" | sed -e 's,///*,/,g'`
11476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$RSVG_CFLAGS' LIBS='$RSVG_LIBS'" >&5
11477$as_echo "yes CFLAGS='$RSVG_CFLAGS' LIBS='$RSVG_LIBS'" >&6; }
11478 succeeded=yes
11479 else
11480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11481$as_echo "no" >&6; }
11482 RSVG_CFLAGS=""
11483 RSVG_LIBS=""
11484 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
11485 ## do set a variable so people can do so. Do it in a subshell
11486 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 11487 RSVG_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$RSVG_MODULE") 2>&1`
f199cab1 11488
5476a9a4 11489 fi
067d23c9 11490
067d23c9 11491
067d23c9 11492
f199cab1 11493 else
5476a9a4
GM
11494 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11495 echo "*** See http://www.freedesktop.org/software/pkgconfig"
f199cab1 11496 fi
5476a9a4
GM
11497 fi
11498
11499 if test $succeeded = yes; then
11500 HAVE_RSVG=yes
11501 else
11502 :
11503 fi
067d23c9 11504
067d23c9 11505
067d23c9 11506
f199cab1 11507
5476a9a4 11508 if test $HAVE_RSVG = yes; then
f199cab1 11509
5476a9a4
GM
11510$as_echo "#define HAVE_RSVG 1" >>confdefs.h
11511
11512 CFLAGS="$CFLAGS $RSVG_CFLAGS"
11513 LIBS="$RSVG_LIBS $LIBS"
11514 fi
f199cab1 11515 fi
5476a9a4 11516fi
f199cab1 11517
5476a9a4 11518HAVE_IMAGEMAGICK=no
d236c302 11519if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes"; then
5476a9a4
GM
11520 if test "${with_imagemagick}" != "no"; then
11521 ## 6.2.8 is the earliest version known to work, but earlier versions
11522 ## might work - let us know if you find one.
11523 ## 6.0.7 does not work. See bug#7955.
0cb77136
GM
11524 ## 6.8.2 makes Emacs crash; see Bug#13867.
11525 IMAGEMAGICK_MODULE="Wand >= 6.2.8 Wand != 6.8.2"
f199cab1 11526
5476a9a4 11527 succeeded=no
f199cab1 11528
5476a9a4
GM
11529 if test "$PKG_CONFIG" = "no" ; then
11530 :
11531 else
11532 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 11533 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
11534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $IMAGEMAGICK_MODULE" >&5
11535$as_echo_n "checking for $IMAGEMAGICK_MODULE... " >&6; }
f199cab1 11536
b5591ebb
GM
11537 if "$PKG_CONFIG" --exists "$IMAGEMAGICK_MODULE" 2>&5 &&
11538 IMAGEMAGICK_CFLAGS=`"$PKG_CONFIG" --cflags "$IMAGEMAGICK_MODULE" 2>&5` &&
11539 IMAGEMAGICK_LIBS=`"$PKG_CONFIG" --libs "$IMAGEMAGICK_MODULE" 2>&5`; then
5476a9a4
GM
11540 edit_cflags="
11541 s,///*,/,g
11542 s/^/ /
11543 s/ -I/ $isystem/g
11544 s/^ //
11545 "
11546 IMAGEMAGICK_CFLAGS=`$as_echo "$IMAGEMAGICK_CFLAGS" | sed -e "$edit_cflags"`
11547 IMAGEMAGICK_LIBS=`$as_echo "$IMAGEMAGICK_LIBS" | sed -e 's,///*,/,g'`
11548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$IMAGEMAGICK_CFLAGS' LIBS='$IMAGEMAGICK_LIBS'" >&5
11549$as_echo "yes CFLAGS='$IMAGEMAGICK_CFLAGS' LIBS='$IMAGEMAGICK_LIBS'" >&6; }
11550 succeeded=yes
11551 else
11552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11553$as_echo "no" >&6; }
11554 IMAGEMAGICK_CFLAGS=""
11555 IMAGEMAGICK_LIBS=""
11556 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
11557 ## do set a variable so people can do so. Do it in a subshell
11558 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 11559 IMAGEMAGICK_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$IMAGEMAGICK_MODULE") 2>&1`
f199cab1 11560
5476a9a4 11561 fi
f199cab1 11562
f199cab1 11563
f199cab1 11564
5476a9a4
GM
11565 else
11566 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11567 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11568 fi
f199cab1 11569 fi
5476a9a4
GM
11570
11571 if test $succeeded = yes; then
11572 HAVE_IMAGEMAGICK=yes
f199cab1 11573 else
5476a9a4 11574 :
067d23c9
KY
11575 fi
11576
f199cab1 11577
067d23c9 11578
f199cab1 11579
5476a9a4 11580 if test $HAVE_IMAGEMAGICK = yes; then
067d23c9 11581
5476a9a4 11582$as_echo "#define HAVE_IMAGEMAGICK 1" >>confdefs.h
f199cab1 11583
5476a9a4
GM
11584 CFLAGS="$CFLAGS $IMAGEMAGICK_CFLAGS"
11585 LIBS="$IMAGEMAGICK_LIBS $LIBS"
11586 for ac_func in MagickExportImagePixels MagickMergeImageLayers
11587do :
11588 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11589ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11590eval as_val=\$$as_ac_var
11591 if test "x$as_val" = x""yes; then :
11592 cat >>confdefs.h <<_ACEOF
11593#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
067d23c9 11594_ACEOF
f199cab1
GM
11595
11596fi
5476a9a4
GM
11597done
11598
067d23c9
KY
11599 fi
11600 fi
5476a9a4 11601fi
067d23c9 11602
f199cab1 11603
5476a9a4
GM
11604HAVE_GTK=no
11605GTK_OBJ=
6d89e343 11606gtk_term_header=$term_header
4fa92495
GM
11607check_gtk2=no
11608gtk3_pkg_errors=
7c61eaab
GM
11609if test "${opsys}" != "mingw32"; then
11610 if test "${with_gtk3}" = "yes" || test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "maybe"; then
11611 GLIB_REQUIRED=2.28
11612 GTK_REQUIRED=3.0
11613 GTK_MODULES="gtk+-3.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
f199cab1
GM
11614
11615
5476a9a4 11616 succeeded=no
f199cab1 11617
5476a9a4
GM
11618 if test "$PKG_CONFIG" = "no" ; then
11619 pkg_check_gtk=no
11620 else
11621 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 11622 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
11623 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5
11624$as_echo_n "checking for $GTK_MODULES... " >&6; }
f199cab1 11625
b5591ebb
GM
11626 if "$PKG_CONFIG" --exists "$GTK_MODULES" 2>&5 &&
11627 GTK_CFLAGS=`"$PKG_CONFIG" --cflags "$GTK_MODULES" 2>&5` &&
11628 GTK_LIBS=`"$PKG_CONFIG" --libs "$GTK_MODULES" 2>&5`; then
5476a9a4
GM
11629 edit_cflags="
11630 s,///*,/,g
11631 s/^/ /
11632 s/ -I/ $isystem/g
11633 s/^ //
11634 "
11635 GTK_CFLAGS=`$as_echo "$GTK_CFLAGS" | sed -e "$edit_cflags"`
11636 GTK_LIBS=`$as_echo "$GTK_LIBS" | sed -e 's,///*,/,g'`
11637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&5
11638$as_echo "yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&6; }
11639 succeeded=yes
11640 else
11641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11642$as_echo "no" >&6; }
11643 GTK_CFLAGS=""
11644 GTK_LIBS=""
11645 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
11646 ## do set a variable so people can do so. Do it in a subshell
11647 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 11648 GTK_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$GTK_MODULES") 2>&1`
f199cab1 11649
5476a9a4 11650 fi
f199cab1 11651
f199cab1 11652
f199cab1 11653
5476a9a4
GM
11654 else
11655 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11656 echo "*** See http://www.freedesktop.org/software/pkgconfig"
f199cab1 11657 fi
5476a9a4 11658 fi
067d23c9 11659
5476a9a4
GM
11660 if test $succeeded = yes; then
11661 pkg_check_gtk=yes
11662 else
11663 pkg_check_gtk=no
11664 fi
067d23c9 11665
7c61eaab
GM
11666 if test "$pkg_check_gtk" = "no" && test "$with_gtk3" = "yes"; then
11667 as_fn_error "$GTK_PKG_ERRORS" "$LINENO" 5
11668 fi
11669 if test "$pkg_check_gtk" = "yes"; then
067d23c9 11670
5476a9a4 11671$as_echo "#define HAVE_GTK3 1" >>confdefs.h
067d23c9 11672
7c61eaab 11673 GTK_OBJ=emacsgtkfixed.o
6d89e343 11674 gtk_term_header=gtkutil.h
7c61eaab
GM
11675 USE_GTK_TOOLKIT="GTK3"
11676 if test "x$ac_enable_gtk_deprecation_warnings" = x; then
11677 GTK_CFLAGS="$GTK_CFLAGS -DGDK_DISABLE_DEPRECATION_WARNINGS"
c081121f 11678 GTK_CFLAGS="$GTK_CFLAGS -DGLIB_DISABLE_DEPRECATION_WARNINGS"
7c61eaab
GM
11679 fi
11680 else
11681 check_gtk2=yes
11682 gtk3_pkg_errors="$GTK_PKG_ERRORS "
11683 fi
4fa92495 11684 fi
067d23c9 11685
7c61eaab
GM
11686 if test "${with_gtk2}" = "yes" || test "$check_gtk2" = "yes"; then
11687 GLIB_REQUIRED=2.10
11688 GTK_REQUIRED=2.10
11689 GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
f199cab1 11690
5476a9a4
GM
11691
11692 succeeded=no
11693
11694 if test "$PKG_CONFIG" = "no" ; then
11695 pkg_check_gtk=no
11696 else
11697 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 11698 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
11699 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5
11700$as_echo_n "checking for $GTK_MODULES... " >&6; }
11701
b5591ebb
GM
11702 if "$PKG_CONFIG" --exists "$GTK_MODULES" 2>&5 &&
11703 GTK_CFLAGS=`"$PKG_CONFIG" --cflags "$GTK_MODULES" 2>&5` &&
11704 GTK_LIBS=`"$PKG_CONFIG" --libs "$GTK_MODULES" 2>&5`; then
5476a9a4
GM
11705 edit_cflags="
11706 s,///*,/,g
11707 s/^/ /
11708 s/ -I/ $isystem/g
11709 s/^ //
11710 "
11711 GTK_CFLAGS=`$as_echo "$GTK_CFLAGS" | sed -e "$edit_cflags"`
11712 GTK_LIBS=`$as_echo "$GTK_LIBS" | sed -e 's,///*,/,g'`
11713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&5
11714$as_echo "yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&6; }
11715 succeeded=yes
11716 else
11717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11718$as_echo "no" >&6; }
11719 GTK_CFLAGS=""
11720 GTK_LIBS=""
11721 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
11722 ## do set a variable so people can do so. Do it in a subshell
11723 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 11724 GTK_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$GTK_MODULES") 2>&1`
5476a9a4
GM
11725
11726 fi
11727
11728
11729
11730 else
11731 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11732 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11733 fi
11734 fi
11735
11736 if test $succeeded = yes; then
11737 pkg_check_gtk=yes
11738 else
11739 pkg_check_gtk=no
11740 fi
11741
7c61eaab
GM
11742 if test "$pkg_check_gtk" = "no" &&
11743 { test "$with_gtk" = yes || test "$with_gtk2" = "yes"; }
11744 then
11745 as_fn_error "$gtk3_pkg_errors$GTK_PKG_ERRORS" "$LINENO" 5
11746 fi
11747 test "$pkg_check_gtk" = "yes" && USE_GTK_TOOLKIT="GTK2"
5476a9a4 11748 fi
067d23c9 11749fi
067d23c9 11750
5476a9a4
GM
11751if test x"$pkg_check_gtk" = xyes; then
11752
11753
11754
11755 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS"
11756 CFLAGS="$CFLAGS $GTK_CFLAGS"
11757 LIBS="$GTK_LIBS $LIBS"
646b9499
GM
11758 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether GTK compiles" >&5
11759$as_echo_n "checking whether GTK compiles... " >&6; }
11760 GTK_COMPILES=no
11761 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11762/* end confdefs.h. */
11763/* Check the Gtk and Glib APIs. */
11764 #include <gtk/gtk.h>
11765 #include <glib-object.h>
11766 static void
11767 callback (GObject *go, GParamSpec *spec, gpointer user_data)
11768 {}
11769
11770int
11771main ()
11772{
11773
11774 GtkSettings *gs = 0;
11775 /* Use G_CALLBACK to make sure function pointers can be cast to void *;
11776 strict C prohibits this. Use gtk_main_iteration to test that the
11777 libraries are there. */
11778 if (g_signal_handler_find (G_OBJECT (gs), G_SIGNAL_MATCH_FUNC,
11779 0, 0, 0, G_CALLBACK (callback), 0))
11780 gtk_main_iteration ();
11781
11782 ;
11783 return 0;
11784}
5476a9a4 11785_ACEOF
646b9499
GM
11786if ac_fn_c_try_link "$LINENO"; then :
11787 GTK_COMPILES=yes
f199cab1 11788fi
646b9499
GM
11789rm -f core conftest.err conftest.$ac_objext \
11790 conftest$ac_exeext conftest.$ac_ext
11791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_COMPILES" >&5
11792$as_echo "$GTK_COMPILES" >&6; }
5476a9a4 11793 if test "${GTK_COMPILES}" != "yes"; then
6d89e343 11794 GTK_OBJ=
5476a9a4
GM
11795 if test "$USE_X_TOOLKIT" != "maybe"; then
11796 as_fn_error "Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" "$LINENO" 5;
11797 fi
11798 else
11799 HAVE_GTK=yes
11800
11801$as_echo "#define USE_GTK 1" >>confdefs.h
067d23c9 11802
5476a9a4 11803 GTK_OBJ="gtkutil.o $GTK_OBJ"
6d89e343 11804 term_header=$gtk_term_header
5476a9a4 11805 USE_X_TOOLKIT=none
b5591ebb 11806 if "$PKG_CONFIG" --atleast-version=2.10 gtk+-2.0; then
5476a9a4
GM
11807 :
11808 else
11809 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your version of Gtk+ will have problems with
11810 closing open displays. This is no problem if you just use
11811 one display, but if you use more than one and close one of them
11812 Emacs may crash." >&5
11813$as_echo "$as_me: WARNING: Your version of Gtk+ will have problems with
11814 closing open displays. This is no problem if you just use
11815 one display, but if you use more than one and close one of them
11816 Emacs may crash." >&2;}
11817 sleep 3
11818 fi
067d23c9
KY
11819 fi
11820
5476a9a4 11821fi
067d23c9
KY
11822
11823
11824
5476a9a4 11825if test "${HAVE_GTK}" = "yes"; then
067d23c9 11826
5476a9a4
GM
11827 if test "$with_toolkit_scroll_bars" != no; then
11828 with_toolkit_scroll_bars=yes
11829 fi
067d23c9 11830
5476a9a4
GM
11831 HAVE_GTK_FILE_SELECTION=no
11832 ac_fn_c_check_decl "$LINENO" "GTK_TYPE_FILE_SELECTION" "ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" "$ac_includes_default
11833#include <gtk/gtk.h>
11834"
11835if test "x$ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" = x""yes; then :
11836 HAVE_GTK_FILE_SELECTION=yes
11837else
11838 HAVE_GTK_FILE_SELECTION=no
11839fi
067d23c9 11840
5476a9a4
GM
11841 if test "$HAVE_GTK_FILE_SELECTION" = yes; then
11842 for ac_func in gtk_file_selection_new
11843do :
11844 ac_fn_c_check_func "$LINENO" "gtk_file_selection_new" "ac_cv_func_gtk_file_selection_new"
11845if test "x$ac_cv_func_gtk_file_selection_new" = x""yes; then :
11846 cat >>confdefs.h <<_ACEOF
11847#define HAVE_GTK_FILE_SELECTION_NEW 1
f199cab1 11848_ACEOF
067d23c9 11849
f199cab1 11850fi
5476a9a4
GM
11851done
11852
f199cab1 11853 fi
067d23c9 11854
4efe5ef9
GM
11855 HAVE_GTK_HANDLE_BOX=no
11856 ac_fn_c_check_decl "$LINENO" "GTK_TYPE_HANDLE_BOX" "ac_cv_have_decl_GTK_TYPE_HANDLE_BOX" "$ac_includes_default
11857#include <gtk/gtk.h>
11858"
11859if test "x$ac_cv_have_decl_GTK_TYPE_HANDLE_BOX" = x""yes; then :
11860 HAVE_GTK_HANDLE_BOX=yes
11861else
11862 HAVE_GTK_HANDLE_BOX=no
11863fi
11864
11865 if test "$HAVE_GTK_HANDLE_BOX" = yes; then
11866 for ac_func in gtk_handle_box_new
11867do :
11868 ac_fn_c_check_func "$LINENO" "gtk_handle_box_new" "ac_cv_func_gtk_handle_box_new"
11869if test "x$ac_cv_func_gtk_handle_box_new" = x""yes; then :
11870 cat >>confdefs.h <<_ACEOF
11871#define HAVE_GTK_HANDLE_BOX_NEW 1
11872_ACEOF
11873
11874fi
11875done
11876
11877 fi
11878
11879 HAVE_GTK_TEAROFF_MENU_ITEM=no
11880 ac_fn_c_check_decl "$LINENO" "GTK_TYPE_TEAROFF_MENU_ITEM" "ac_cv_have_decl_GTK_TYPE_TEAROFF_MENU_ITEM" "$ac_includes_default
11881#include <gtk/gtk.h>
11882"
11883if test "x$ac_cv_have_decl_GTK_TYPE_TEAROFF_MENU_ITEM" = x""yes; then :
11884 HAVE_GTK_TEAROFF_MENU_ITEM=yes
11885else
11886 HAVE_GTK_TEAROFF_MENU_ITEM=no
11887fi
11888
11889 if test "$HAVE_GTK_TEAROFF_MENU_ITEM" = yes; then
11890 for ac_func in gtk_tearoff_menu_item_new
11891do :
11892 ac_fn_c_check_func "$LINENO" "gtk_tearoff_menu_item_new" "ac_cv_func_gtk_tearoff_menu_item_new"
11893if test "x$ac_cv_func_gtk_tearoff_menu_item_new" = x""yes; then :
11894 cat >>confdefs.h <<_ACEOF
11895#define HAVE_GTK_TEAROFF_MENU_ITEM_NEW 1
11896_ACEOF
11897
11898fi
11899done
11900
11901 fi
067d23c9 11902
5476a9a4
GM
11903 for ac_func in gtk_widget_get_window gtk_widget_set_has_window \
11904 gtk_dialog_get_action_area gtk_widget_get_sensitive \
11905 gtk_widget_get_mapped gtk_adjustment_get_page_size \
11906 gtk_orientable_set_orientation \
11907 gtk_window_set_has_resize_grip
11908do :
11909 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11910ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11911eval as_val=\$$as_ac_var
11912 if test "x$as_val" = x""yes; then :
11913 cat >>confdefs.h <<_ACEOF
11914#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11915_ACEOF
067d23c9 11916
5476a9a4
GM
11917fi
11918done
067d23c9 11919
42dcba54
GM
11920
11921 term_header=gtkutil.h
5476a9a4 11922fi
067d23c9 11923
5476a9a4
GM
11924HAVE_DBUS=no
11925DBUS_OBJ=
11926if test "${with_dbus}" = "yes"; then
067d23c9 11927
5476a9a4 11928 succeeded=no
067d23c9 11929
5476a9a4
GM
11930 if test "$PKG_CONFIG" = "no" ; then
11931 HAVE_DBUS=no
f199cab1 11932 else
5476a9a4 11933 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 11934 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
11935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbus-1 >= 1.0" >&5
11936$as_echo_n "checking for dbus-1 >= 1.0... " >&6; }
067d23c9 11937
b5591ebb
GM
11938 if "$PKG_CONFIG" --exists "dbus-1 >= 1.0" 2>&5 &&
11939 DBUS_CFLAGS=`"$PKG_CONFIG" --cflags "dbus-1 >= 1.0" 2>&5` &&
11940 DBUS_LIBS=`"$PKG_CONFIG" --libs "dbus-1 >= 1.0" 2>&5`; then
5476a9a4
GM
11941 edit_cflags="
11942 s,///*,/,g
11943 s/^/ /
11944 s/ -I/ $isystem/g
11945 s/^ //
11946 "
11947 DBUS_CFLAGS=`$as_echo "$DBUS_CFLAGS" | sed -e "$edit_cflags"`
11948 DBUS_LIBS=`$as_echo "$DBUS_LIBS" | sed -e 's,///*,/,g'`
11949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$DBUS_CFLAGS' LIBS='$DBUS_LIBS'" >&5
11950$as_echo "yes CFLAGS='$DBUS_CFLAGS' LIBS='$DBUS_LIBS'" >&6; }
11951 succeeded=yes
11952 else
11953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11954$as_echo "no" >&6; }
11955 DBUS_CFLAGS=""
11956 DBUS_LIBS=""
11957 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
11958 ## do set a variable so people can do so. Do it in a subshell
11959 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 11960 DBUS_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "dbus-1 >= 1.0") 2>&1`
067d23c9 11961
5476a9a4 11962 fi
067d23c9 11963
15f79fcd 11964
067d23c9 11965
5476a9a4
GM
11966 else
11967 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11968 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11969 fi
067d23c9 11970 fi
067d23c9 11971
5476a9a4
GM
11972 if test $succeeded = yes; then
11973 HAVE_DBUS=yes
f199cab1 11974 else
5476a9a4 11975 HAVE_DBUS=no
f199cab1 11976 fi
067d23c9 11977
5476a9a4
GM
11978 if test "$HAVE_DBUS" = yes; then
11979 LIBS="$LIBS $DBUS_LIBS"
067d23c9 11980
5476a9a4 11981$as_echo "#define HAVE_DBUS 1" >>confdefs.h
067d23c9 11982
5476a9a4
GM
11983 for ac_func in dbus_watch_get_unix_fd \
11984 dbus_type_is_valid \
11985 dbus_validate_bus_name \
11986 dbus_validate_path \
11987 dbus_validate_interface \
11988 dbus_validate_member
11989do :
11990 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11991ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11992eval as_val=\$$as_ac_var
11993 if test "x$as_val" = x""yes; then :
11994 cat >>confdefs.h <<_ACEOF
11995#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11996_ACEOF
067d23c9 11997
5476a9a4
GM
11998fi
11999done
067d23c9 12000
5476a9a4
GM
12001 DBUS_OBJ=dbusbind.o
12002 fi
12003fi
067d23c9
KY
12004
12005
5476a9a4
GM
12006HAVE_GSETTINGS=no
12007if test "${HAVE_X11}" = "yes" && test "${with_gsettings}" = "yes"; then
067d23c9 12008
5476a9a4 12009 succeeded=no
067d23c9 12010
5476a9a4
GM
12011 if test "$PKG_CONFIG" = "no" ; then
12012 HAVE_GSETTINGS=no
12013 else
12014 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 12015 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
12016 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gio-2.0 >= 2.26" >&5
12017$as_echo_n "checking for gio-2.0 >= 2.26... " >&6; }
0afb4571 12018
b5591ebb
GM
12019 if "$PKG_CONFIG" --exists "gio-2.0 >= 2.26" 2>&5 &&
12020 GSETTINGS_CFLAGS=`"$PKG_CONFIG" --cflags "gio-2.0 >= 2.26" 2>&5` &&
12021 GSETTINGS_LIBS=`"$PKG_CONFIG" --libs "gio-2.0 >= 2.26" 2>&5`; then
5476a9a4
GM
12022 edit_cflags="
12023 s,///*,/,g
12024 s/^/ /
12025 s/ -I/ $isystem/g
12026 s/^ //
12027 "
12028 GSETTINGS_CFLAGS=`$as_echo "$GSETTINGS_CFLAGS" | sed -e "$edit_cflags"`
12029 GSETTINGS_LIBS=`$as_echo "$GSETTINGS_LIBS" | sed -e 's,///*,/,g'`
12030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GSETTINGS_CFLAGS' LIBS='$GSETTINGS_LIBS'" >&5
12031$as_echo "yes CFLAGS='$GSETTINGS_CFLAGS' LIBS='$GSETTINGS_LIBS'" >&6; }
12032 succeeded=yes
12033 else
12034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12035$as_echo "no" >&6; }
12036 GSETTINGS_CFLAGS=""
12037 GSETTINGS_LIBS=""
12038 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
12039 ## do set a variable so people can do so. Do it in a subshell
12040 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 12041 GSETTINGS_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "gio-2.0 >= 2.26") 2>&1`
0afb4571 12042
5476a9a4 12043 fi
067d23c9
KY
12044
12045
12046
12047 else
5476a9a4
GM
12048 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12049 echo "*** See http://www.freedesktop.org/software/pkgconfig"
067d23c9 12050 fi
5476a9a4 12051 fi
067d23c9 12052
5476a9a4
GM
12053 if test $succeeded = yes; then
12054 HAVE_GSETTINGS=yes
12055 else
12056 HAVE_GSETTINGS=no
12057 fi
f199cab1 12058
5476a9a4 12059 if test "$HAVE_GSETTINGS" = "yes"; then
f199cab1 12060
5476a9a4 12061$as_echo "#define HAVE_GSETTINGS 1" >>confdefs.h
f199cab1 12062
5476a9a4
GM
12063 SETTINGS_CFLAGS="$GSETTINGS_CFLAGS"
12064 SETTINGS_LIBS="$GSETTINGS_LIBS"
12065 fi
12066fi
067d23c9 12067
5476a9a4
GM
12068HAVE_GCONF=no
12069if test "${HAVE_X11}" = "yes" && test "${with_gconf}" = "yes"; then
067d23c9 12070
5476a9a4 12071 succeeded=no
067d23c9 12072
5476a9a4
GM
12073 if test "$PKG_CONFIG" = "no" ; then
12074 HAVE_GCONF=no
12075 else
12076 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 12077 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
12078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gconf-2.0 >= 2.13" >&5
12079$as_echo_n "checking for gconf-2.0 >= 2.13... " >&6; }
067d23c9 12080
b5591ebb
GM
12081 if "$PKG_CONFIG" --exists "gconf-2.0 >= 2.13" 2>&5 &&
12082 GCONF_CFLAGS=`"$PKG_CONFIG" --cflags "gconf-2.0 >= 2.13" 2>&5` &&
12083 GCONF_LIBS=`"$PKG_CONFIG" --libs "gconf-2.0 >= 2.13" 2>&5`; then
5476a9a4
GM
12084 edit_cflags="
12085 s,///*,/,g
12086 s/^/ /
12087 s/ -I/ $isystem/g
12088 s/^ //
12089 "
12090 GCONF_CFLAGS=`$as_echo "$GCONF_CFLAGS" | sed -e "$edit_cflags"`
12091 GCONF_LIBS=`$as_echo "$GCONF_LIBS" | sed -e 's,///*,/,g'`
12092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GCONF_CFLAGS' LIBS='$GCONF_LIBS'" >&5
12093$as_echo "yes CFLAGS='$GCONF_CFLAGS' LIBS='$GCONF_LIBS'" >&6; }
12094 succeeded=yes
12095 else
12096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12097$as_echo "no" >&6; }
12098 GCONF_CFLAGS=""
12099 GCONF_LIBS=""
12100 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
12101 ## do set a variable so people can do so. Do it in a subshell
12102 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 12103 GCONF_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "gconf-2.0 >= 2.13") 2>&1`
067d23c9 12104
5476a9a4 12105 fi
f199cab1 12106
f199cab1
GM
12107
12108
5476a9a4
GM
12109 else
12110 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12111 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12112 fi
12113 fi
f199cab1 12114
5476a9a4
GM
12115 if test $succeeded = yes; then
12116 HAVE_GCONF=yes
12117 else
12118 HAVE_GCONF=no
12119 fi
f199cab1 12120
5476a9a4 12121 if test "$HAVE_GCONF" = yes; then
f199cab1 12122
5476a9a4 12123$as_echo "#define HAVE_GCONF 1" >>confdefs.h
f199cab1 12124
5476a9a4
GM
12125 SETTINGS_CFLAGS="$SETTINGS_CFLAGS $GCONF_CFLAGS"
12126 SETTINGS_LIBS="$SETTINGS_LIBS $GCONF_LIBS"
12127 fi
12128fi
f199cab1 12129
5476a9a4 12130if test "$HAVE_GSETTINGS" = "yes" || test "$HAVE_GCONF" = "yes"; then
dcde497f
GM
12131
12132 succeeded=no
12133
12134 if test "$PKG_CONFIG" = "no" ; then
12135 HAVE_GOBJECT=no
12136 else
12137 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 12138 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
dcde497f
GM
12139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gobject-2.0 >= 2.0" >&5
12140$as_echo_n "checking for gobject-2.0 >= 2.0... " >&6; }
12141
b5591ebb
GM
12142 if "$PKG_CONFIG" --exists "gobject-2.0 >= 2.0" 2>&5 &&
12143 GOBJECT_CFLAGS=`"$PKG_CONFIG" --cflags "gobject-2.0 >= 2.0" 2>&5` &&
12144 GOBJECT_LIBS=`"$PKG_CONFIG" --libs "gobject-2.0 >= 2.0" 2>&5`; then
dcde497f
GM
12145 edit_cflags="
12146 s,///*,/,g
12147 s/^/ /
12148 s/ -I/ $isystem/g
12149 s/^ //
12150 "
12151 GOBJECT_CFLAGS=`$as_echo "$GOBJECT_CFLAGS" | sed -e "$edit_cflags"`
12152 GOBJECT_LIBS=`$as_echo "$GOBJECT_LIBS" | sed -e 's,///*,/,g'`
12153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GOBJECT_CFLAGS' LIBS='$GOBJECT_LIBS'" >&5
12154$as_echo "yes CFLAGS='$GOBJECT_CFLAGS' LIBS='$GOBJECT_LIBS'" >&6; }
12155 succeeded=yes
12156 else
12157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12158$as_echo "no" >&6; }
12159 GOBJECT_CFLAGS=""
12160 GOBJECT_LIBS=""
12161 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
12162 ## do set a variable so people can do so. Do it in a subshell
12163 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 12164 GOBJECT_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "gobject-2.0 >= 2.0") 2>&1`
dcde497f
GM
12165
12166 fi
12167
12168
12169
12170 else
12171 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12172 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12173 fi
12174 fi
12175
12176 if test $succeeded = yes; then
12177 HAVE_GOBJECT=yes
12178 else
12179 HAVE_GOBJECT=no
12180 fi
12181
12182 if test "$HAVE_GOBJECT" = "yes"; then
12183 SETTINGS_CFLAGS="$SETTINGS_CFLAGS $GOBJECT_CFLAGS"
12184 SETTINGS_LIBS="$SETTINGS_LIBS $GOBJECT_LIBS"
12185 fi
5476a9a4
GM
12186 SAVE_CFLAGS="$CFLAGS"
12187 SAVE_LIBS="$LIBS"
12188 CFLAGS="$SETTINGS_CFLAGS $CFLAGS"
12189 LIBS="$SETTINGS_LIBS $LIBS"
5476a9a4
GM
12190 CFLAGS="$SAVE_CFLAGS"
12191 LIBS="$SAVE_LIBS"
12192fi
067d23c9 12193
067d23c9 12194
f199cab1 12195
067d23c9 12196
5476a9a4
GM
12197HAVE_LIBSELINUX=no
12198LIBSELINUX_LIBS=
12199if test "${with_selinux}" = "yes"; then
12200 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lgetfilecon in -lselinux" >&5
12201$as_echo_n "checking for lgetfilecon in -lselinux... " >&6; }
12202if test "${ac_cv_lib_selinux_lgetfilecon+set}" = set; then :
12203 $as_echo_n "(cached) " >&6
12204else
12205 ac_check_lib_save_LIBS=$LIBS
12206LIBS="-lselinux $LIBS"
12207cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12208/* end confdefs.h. */
067d23c9 12209
5476a9a4
GM
12210/* Override any GCC internal prototype to avoid an error.
12211 Use char because int might match the return type of a GCC
12212 builtin and then its argument prototype would still apply. */
12213#ifdef __cplusplus
12214extern "C"
f199cab1 12215#endif
5476a9a4 12216char lgetfilecon ();
f199cab1
GM
12217int
12218main ()
12219{
5476a9a4 12220return lgetfilecon ();
f199cab1
GM
12221 ;
12222 return 0;
12223}
12224_ACEOF
5476a9a4
GM
12225if ac_fn_c_try_link "$LINENO"; then :
12226 ac_cv_lib_selinux_lgetfilecon=yes
12227else
12228 ac_cv_lib_selinux_lgetfilecon=no
f199cab1 12229fi
5476a9a4
GM
12230rm -f core conftest.err conftest.$ac_objext \
12231 conftest$ac_exeext conftest.$ac_ext
12232LIBS=$ac_check_lib_save_LIBS
12233fi
12234{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_lgetfilecon" >&5
12235$as_echo "$ac_cv_lib_selinux_lgetfilecon" >&6; }
12236if test "x$ac_cv_lib_selinux_lgetfilecon" = x""yes; then :
12237 HAVE_LIBSELINUX=yes
12238else
12239 HAVE_LIBSELINUX=no
067d23c9
KY
12240fi
12241
5476a9a4 12242 if test "$HAVE_LIBSELINUX" = yes; then
067d23c9 12243
5476a9a4 12244$as_echo "#define HAVE_LIBSELINUX 1" >>confdefs.h
067d23c9 12245
5476a9a4
GM
12246 LIBSELINUX_LIBS=-lselinux
12247 fi
f199cab1 12248fi
067d23c9 12249
067d23c9 12250
5476a9a4 12251HAVE_GNUTLS=no
5476a9a4 12252if test "${with_gnutls}" = "yes" ; then
067d23c9 12253
5476a9a4 12254 succeeded=no
067d23c9 12255
5476a9a4
GM
12256 if test "$PKG_CONFIG" = "no" ; then
12257 HAVE_GNUTLS=no
12258 else
12259 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 12260 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
12261 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gnutls >= 2.6.6" >&5
12262$as_echo_n "checking for gnutls >= 2.6.6... " >&6; }
067d23c9 12263
b5591ebb
GM
12264 if "$PKG_CONFIG" --exists "gnutls >= 2.6.6" 2>&5 &&
12265 LIBGNUTLS_CFLAGS=`"$PKG_CONFIG" --cflags "gnutls >= 2.6.6" 2>&5` &&
12266 LIBGNUTLS_LIBS=`"$PKG_CONFIG" --libs "gnutls >= 2.6.6" 2>&5`; then
5476a9a4
GM
12267 edit_cflags="
12268 s,///*,/,g
12269 s/^/ /
12270 s/ -I/ $isystem/g
12271 s/^ //
12272 "
12273 LIBGNUTLS_CFLAGS=`$as_echo "$LIBGNUTLS_CFLAGS" | sed -e "$edit_cflags"`
12274 LIBGNUTLS_LIBS=`$as_echo "$LIBGNUTLS_LIBS" | sed -e 's,///*,/,g'`
12275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBGNUTLS_CFLAGS' LIBS='$LIBGNUTLS_LIBS'" >&5
12276$as_echo "yes CFLAGS='$LIBGNUTLS_CFLAGS' LIBS='$LIBGNUTLS_LIBS'" >&6; }
12277 succeeded=yes
12278 else
12279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12280$as_echo "no" >&6; }
12281 LIBGNUTLS_CFLAGS=""
12282 LIBGNUTLS_LIBS=""
12283 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
12284 ## do set a variable so people can do so. Do it in a subshell
12285 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 12286 LIBGNUTLS_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "gnutls >= 2.6.6") 2>&1`
067d23c9 12287
5476a9a4 12288 fi
067d23c9 12289
067d23c9 12290
067d23c9 12291
5476a9a4
GM
12292 else
12293 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12294 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12295 fi
12296 fi
067d23c9 12297
5476a9a4
GM
12298 if test $succeeded = yes; then
12299 HAVE_GNUTLS=yes
12300 else
12301 HAVE_GNUTLS=no
12302 fi
067d23c9 12303
5476a9a4 12304 if test "${HAVE_GNUTLS}" = "yes"; then
067d23c9 12305
5476a9a4 12306$as_echo "#define HAVE_GNUTLS 1" >>confdefs.h
067d23c9 12307
5476a9a4 12308 fi
f199cab1 12309
7c61eaab
GM
12310 # Windows loads GnuTLS dynamically
12311 if test "${opsys}" = "mingw32"; then
7c61eaab 12312 LIBGNUTLS_LIBS=
db7863f4
GM
12313 else
12314 CFLAGS="$CFLAGS $LIBGNUTLS_CFLAGS"
12315 LIBS="$LIBGNUTLS_LIBS $LIBS"
7c61eaab 12316 fi
5476a9a4 12317fi
f527bd02 12318
f527bd02 12319
5476a9a4
GM
12320
12321
0f55a32e
GM
12322NOTIFY_OBJ=
12323NOTIFY_SUMMARY=no
12324
6ee585de
GM
12325if test "${with_ns}" = yes && test ${with_file_notification} = yes; then
12326 with_file_notification=no
12327fi
12328
12329case $with_file_notification,$opsys in
12330 w32,* | yes,mingw32)
12331 ac_fn_c_check_header_mongrel "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default"
12332if test "x$ac_cv_header_windows_h" = x""yes; then :
12333
0f55a32e
GM
12334fi
12335
6ee585de
GM
12336
12337 if test "$ac_cv_header_windows_h" = yes ; then
12338
12339$as_echo "#define HAVE_W32NOTIFY 1" >>confdefs.h
12340
12341 NOTIFY_OBJ=w32notify.o
12342 NOTIFY_SUMMARY="yes (w32)"
12343 fi ;;
12344esac
12345
12346case $with_file_notification,$NOTIFY_OBJ in
12347 gfile, | yes,)
0f55a32e
GM
12348
12349 succeeded=no
12350
12351 if test "$PKG_CONFIG" = "no" ; then
12352 HAVE_GFILENOTIFY=no
12353 else
12354 PKG_CONFIG_MIN_VERSION=0.9.0
12355 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
12356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gio-2.0 >= 2.24" >&5
12357$as_echo_n "checking for gio-2.0 >= 2.24... " >&6; }
12358
12359 if "$PKG_CONFIG" --exists "gio-2.0 >= 2.24" 2>&5 &&
12360 GFILENOTIFY_CFLAGS=`"$PKG_CONFIG" --cflags "gio-2.0 >= 2.24" 2>&5` &&
12361 GFILENOTIFY_LIBS=`"$PKG_CONFIG" --libs "gio-2.0 >= 2.24" 2>&5`; then
12362 edit_cflags="
12363 s,///*,/,g
12364 s/^/ /
12365 s/ -I/ $isystem/g
12366 s/^ //
12367 "
12368 GFILENOTIFY_CFLAGS=`$as_echo "$GFILENOTIFY_CFLAGS" | sed -e "$edit_cflags"`
12369 GFILENOTIFY_LIBS=`$as_echo "$GFILENOTIFY_LIBS" | sed -e 's,///*,/,g'`
12370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GFILENOTIFY_CFLAGS' LIBS='$GFILENOTIFY_LIBS'" >&5
12371$as_echo "yes CFLAGS='$GFILENOTIFY_CFLAGS' LIBS='$GFILENOTIFY_LIBS'" >&6; }
12372 succeeded=yes
12373 else
12374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12375$as_echo "no" >&6; }
12376 GFILENOTIFY_CFLAGS=""
12377 GFILENOTIFY_LIBS=""
12378 ## If we have a custom action on failure, don't print errors, but
12379 ## do set a variable so people can do so. Do it in a subshell
12380 ## to capture any diagnostics in invoking pkg-config.
12381 GFILENOTIFY_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "gio-2.0 >= 2.24") 2>&1`
12382
12383 fi
12384
12385
12386
12387 else
12388 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12389 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12390 fi
12391 fi
12392
12393 if test $succeeded = yes; then
12394 HAVE_GFILENOTIFY=yes
12395 else
12396 HAVE_GFILENOTIFY=no
12397 fi
12398
6ee585de 12399 if test "$HAVE_GFILENOTIFY" = "yes"; then
0f55a32e
GM
12400
12401$as_echo "#define HAVE_GFILENOTIFY 1" >>confdefs.h
12402
6ee585de
GM
12403 NOTIFY_OBJ=gfilenotify.o
12404 NOTIFY_SUMMARY="yes -lgio (gfile)"
12405 fi ;;
12406esac
12407
12408case $with_file_notification,$NOTIFY_OBJ in
12409 inotify, | yes,)
12410 ac_fn_c_check_header_mongrel "$LINENO" "sys/inotify.h" "ac_cv_header_sys_inotify_h" "$ac_includes_default"
b5eb356a 12411if test "x$ac_cv_header_sys_inotify_h" = x""yes; then :
b5eb356a
GM
12412
12413fi
12414
b5eb356a 12415
6ee585de
GM
12416 if test "$ac_cv_header_sys_inotify_h" = yes ; then
12417 ac_fn_c_check_func "$LINENO" "inotify_init1" "ac_cv_func_inotify_init1"
b5eb356a
GM
12418if test "x$ac_cv_func_inotify_init1" = x""yes; then :
12419
12420fi
12421
6ee585de 12422 if test "$ac_cv_func_inotify_init1" = yes; then
0f55a32e
GM
12423
12424$as_echo "#define HAVE_INOTIFY 1" >>confdefs.h
12425
6ee585de
GM
12426 NOTIFY_OBJ=inotify.o
12427 NOTIFY_SUMMARY="yes -lglibc (inotify)"
12428 fi
12429 fi ;;
12430esac
0f55a32e 12431
6ee585de
GM
12432case $with_file_notification,$NOTIFY_OBJ in
12433 yes,* | no,* | *,?*) ;;
12434 *) as_fn_error "File notification \`$with_file_notification' requested but requirements not found." "$LINENO" 5 ;;
12435esac
0f55a32e 12436
0f55a32e 12437if test -n "$NOTIFY_OBJ"; then
b5eb356a 12438
0f55a32e 12439$as_echo "#define USE_FILE_NOTIFY 1" >>confdefs.h
b5eb356a
GM
12440
12441fi
12442
0f55a32e
GM
12443
12444
12445
5476a9a4
GM
12446HAVE_XAW3D=no
12447LUCID_LIBW=
12448if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then
12449 if test "$with_xaw3d" != no; then
5476a9a4 12450 if test "${emacs_cv_xaw3d+set}" = set; then :
f199cab1
GM
12451 $as_echo_n "(cached) " >&6
12452else
5476a9a4
GM
12453 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12454/* end confdefs.h. */
f527bd02 12455
5476a9a4
GM
12456#include <X11/Intrinsic.h>
12457#include <X11/Xaw3d/Simple.h>
12458int
12459main ()
12460{
12461
12462 ;
12463 return 0;
12464}
12465_ACEOF
12466if ac_fn_c_try_link "$LINENO"; then :
12467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XawScrollbarSetThumb in -lXaw3d" >&5
12468$as_echo_n "checking for XawScrollbarSetThumb in -lXaw3d... " >&6; }
12469if test "${ac_cv_lib_Xaw3d_XawScrollbarSetThumb+set}" = set; then :
12470 $as_echo_n "(cached) " >&6
12471else
12472 ac_check_lib_save_LIBS=$LIBS
12473LIBS="-lXaw3d $LIBS"
12474cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12475/* end confdefs.h. */
f527bd02 12476
5476a9a4
GM
12477/* Override any GCC internal prototype to avoid an error.
12478 Use char because int might match the return type of a GCC
12479 builtin and then its argument prototype would still apply. */
12480#ifdef __cplusplus
12481extern "C"
12482#endif
12483char XawScrollbarSetThumb ();
12484int
12485main ()
12486{
12487return XawScrollbarSetThumb ();
12488 ;
12489 return 0;
12490}
12491_ACEOF
12492if ac_fn_c_try_link "$LINENO"; then :
12493 ac_cv_lib_Xaw3d_XawScrollbarSetThumb=yes
f199cab1 12494else
5476a9a4 12495 ac_cv_lib_Xaw3d_XawScrollbarSetThumb=no
f199cab1 12496fi
5476a9a4
GM
12497rm -f core conftest.err conftest.$ac_objext \
12498 conftest$ac_exeext conftest.$ac_ext
12499LIBS=$ac_check_lib_save_LIBS
12500fi
12501{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&5
12502$as_echo "$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&6; }
12503if test "x$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" = x""yes; then :
12504 emacs_cv_xaw3d=yes
12505else
12506 emacs_cv_xaw3d=no
f199cab1 12507fi
f527bd02 12508
5476a9a4
GM
12509else
12510 emacs_cv_xaw3d=no
12511fi
12512rm -f core conftest.err conftest.$ac_objext \
12513 conftest$ac_exeext conftest.$ac_ext
12514fi
f527bd02 12515
5476a9a4
GM
12516 else
12517 emacs_cv_xaw3d=no
12518 fi
12519 if test $emacs_cv_xaw3d = yes; then
4fa92495
GM
12520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xaw3d" >&5
12521$as_echo_n "checking for xaw3d... " >&6; }
5476a9a4
GM
12522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5
12523$as_echo "yes; using Lucid toolkit" >&6; }
12524 USE_X_TOOLKIT=LUCID
12525 HAVE_XAW3D=yes
12526 LUCID_LIBW=-lXaw3d
f527bd02 12527
5476a9a4 12528$as_echo "#define HAVE_XAW3D 1" >>confdefs.h
f527bd02 12529
5476a9a4 12530 else
4fa92495
GM
12531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xaw3d" >&5
12532$as_echo_n "checking for xaw3d... " >&6; }
5476a9a4
GM
12533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12534$as_echo "no" >&6; }
12535 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libXaw" >&5
12536$as_echo_n "checking for libXaw... " >&6; }
12537 if test "${emacs_cv_xaw+set}" = set; then :
f199cab1
GM
12538 $as_echo_n "(cached) " >&6
12539else
12540 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12541/* end confdefs.h. */
067d23c9 12542
5476a9a4
GM
12543#include <X11/Intrinsic.h>
12544#include <X11/Xaw/Simple.h>
f199cab1
GM
12545int
12546main ()
12547{
067d23c9 12548
f199cab1
GM
12549 ;
12550 return 0;
12551}
12552_ACEOF
5476a9a4
GM
12553if ac_fn_c_try_link "$LINENO"; then :
12554 emacs_cv_xaw=yes
f199cab1 12555else
5476a9a4 12556 emacs_cv_xaw=no
f199cab1 12557fi
5476a9a4
GM
12558rm -f core conftest.err conftest.$ac_objext \
12559 conftest$ac_exeext conftest.$ac_ext
f199cab1 12560fi
067d23c9 12561
5476a9a4
GM
12562 if test $emacs_cv_xaw = yes; then
12563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5
12564$as_echo "yes; using Lucid toolkit" >&6; }
12565 USE_X_TOOLKIT=LUCID
12566 LUCID_LIBW=-lXaw
12567 elif test x"${USE_X_TOOLKIT}" = xLUCID; then
12568 as_fn_error "Lucid toolkit requires X11/Xaw include files" "$LINENO" 5
f199cab1 12569 else
5476a9a4
GM
12570 as_fn_error "No X toolkit could be found.
12571If you are sure you want Emacs compiled without an X toolkit, pass
12572 --with-x-toolkit=no
12573to configure. Otherwise, install the development libraries for the toolkit
12574that you want to use (e.g. Gtk+) and re-run configure." "$LINENO" 5
f199cab1 12575 fi
5476a9a4
GM
12576 fi
12577fi
067d23c9 12578
5476a9a4 12579X_TOOLKIT_TYPE=$USE_X_TOOLKIT
067d23c9 12580
5476a9a4
GM
12581LIBXTR6=
12582if test "${USE_X_TOOLKIT}" != "none"; then
12583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 toolkit version" >&5
12584$as_echo_n "checking X11 toolkit version... " >&6; }
12585 if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then :
f199cab1
GM
12586 $as_echo_n "(cached) " >&6
12587else
5476a9a4 12588 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 12589/* end confdefs.h. */
5476a9a4 12590#include <X11/Intrinsic.h>
f199cab1
GM
12591int
12592main ()
12593{
5476a9a4
GM
12594#if XtSpecificationRelease < 6
12595fail;
12596#endif
f527bd02 12597
f199cab1
GM
12598 ;
12599 return 0;
12600}
067d23c9 12601_ACEOF
5476a9a4
GM
12602if ac_fn_c_try_link "$LINENO"; then :
12603 emacs_cv_x11_toolkit_version_6=yes
12604else
12605 emacs_cv_x11_toolkit_version_6=no
067d23c9 12606fi
5476a9a4
GM
12607rm -f core conftest.err conftest.$ac_objext \
12608 conftest$ac_exeext conftest.$ac_ext
067d23c9
KY
12609fi
12610
5476a9a4
GM
12611 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
12612 if test $emacs_cv_x11_toolkit_version_6 = yes; then
12613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5
12614$as_echo "6 or newer" >&6; }
f527bd02 12615
5476a9a4 12616$as_echo "#define HAVE_X11XTR6 1" >>confdefs.h
f527bd02 12617
5476a9a4
GM
12618 LIBXTR6="-lSM -lICE"
12619 case "$opsys" in
12620 ## Use libw.a along with X11R6 Xt.
12621 unixware) LIBXTR6="$LIBXTR6 -lw" ;;
12622 esac
12623 else
12624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5
12625$as_echo "before 6" >&6; }
f199cab1 12626 fi
f527bd02 12627
5476a9a4
GM
12628 OLDLIBS="$LIBS"
12629 if test x$HAVE_X11XTR6 = xyes; then
12630 LIBS="-lXt -lSM -lICE $LIBS"
12631 else
12632 LIBS="-lXt $LIBS"
12633 fi
12634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XmuConvertStandardSelection in -lXmu" >&5
12635$as_echo_n "checking for XmuConvertStandardSelection in -lXmu... " >&6; }
12636if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then :
12637 $as_echo_n "(cached) " >&6
12638else
12639 ac_check_lib_save_LIBS=$LIBS
12640LIBS="-lXmu $LIBS"
12641cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12642/* end confdefs.h. */
f199cab1 12643
5476a9a4
GM
12644/* Override any GCC internal prototype to avoid an error.
12645 Use char because int might match the return type of a GCC
12646 builtin and then its argument prototype would still apply. */
12647#ifdef __cplusplus
12648extern "C"
12649#endif
12650char XmuConvertStandardSelection ();
067d23c9
KY
12651int
12652main ()
12653{
5476a9a4 12654return XmuConvertStandardSelection ();
067d23c9
KY
12655 ;
12656 return 0;
12657}
12658_ACEOF
5476a9a4
GM
12659if ac_fn_c_try_link "$LINENO"; then :
12660 ac_cv_lib_Xmu_XmuConvertStandardSelection=yes
12661else
12662 ac_cv_lib_Xmu_XmuConvertStandardSelection=no
067d23c9 12663fi
5476a9a4
GM
12664rm -f core conftest.err conftest.$ac_objext \
12665 conftest$ac_exeext conftest.$ac_ext
12666LIBS=$ac_check_lib_save_LIBS
067d23c9 12667fi
5476a9a4
GM
12668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5
12669$as_echo "$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6; }
12670if test "x$ac_cv_lib_Xmu_XmuConvertStandardSelection" = x""yes; then :
12671 cat >>confdefs.h <<_ACEOF
12672#define HAVE_LIBXMU 1
f199cab1
GM
12673_ACEOF
12674
5476a9a4 12675 LIBS="-lXmu $LIBS"
f199cab1 12676
067d23c9
KY
12677fi
12678
5476a9a4
GM
12679 test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
12680 fi
067d23c9 12681
067d23c9 12682
5476a9a4
GM
12683LIBXMU=-lXmu
12684case $opsys in
12685 ## These systems don't supply Xmu.
12686 hpux* | aix4-2 )
12687 test "X$ac_cv_lib_Xmu_XmuConvertStandardSelection" != "Xyes" && LIBXMU=
12688 ;;
7c61eaab
GM
12689 mingw32 )
12690 LIBXMU=
12691 ;;
5476a9a4 12692esac
067d23c9
KY
12693
12694
5476a9a4
GM
12695# On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
12696if test "${HAVE_X11}" = "yes"; then
12697 if test "${USE_X_TOOLKIT}" != "none"; then
12698 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XShapeQueryExtension in -lXext" >&5
12699$as_echo_n "checking for XShapeQueryExtension in -lXext... " >&6; }
12700if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then :
f199cab1
GM
12701 $as_echo_n "(cached) " >&6
12702else
5476a9a4
GM
12703 ac_check_lib_save_LIBS=$LIBS
12704LIBS="-lXext $LIBS"
12705cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 12706/* end confdefs.h. */
f199cab1 12707
5476a9a4
GM
12708/* Override any GCC internal prototype to avoid an error.
12709 Use char because int might match the return type of a GCC
12710 builtin and then its argument prototype would still apply. */
12711#ifdef __cplusplus
12712extern "C"
12713#endif
12714char XShapeQueryExtension ();
12715int
12716main ()
12717{
12718return XShapeQueryExtension ();
12719 ;
12720 return 0;
12721}
e7d4e61f 12722_ACEOF
5476a9a4
GM
12723if ac_fn_c_try_link "$LINENO"; then :
12724 ac_cv_lib_Xext_XShapeQueryExtension=yes
12725else
12726 ac_cv_lib_Xext_XShapeQueryExtension=no
067d23c9 12727fi
5476a9a4
GM
12728rm -f core conftest.err conftest.$ac_objext \
12729 conftest$ac_exeext conftest.$ac_ext
12730LIBS=$ac_check_lib_save_LIBS
12731fi
12732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
12733$as_echo "$ac_cv_lib_Xext_XShapeQueryExtension" >&6; }
12734if test "x$ac_cv_lib_Xext_XShapeQueryExtension" = x""yes; then :
12735 cat >>confdefs.h <<_ACEOF
12736#define HAVE_LIBXEXT 1
12737_ACEOF
f199cab1 12738
5476a9a4 12739 LIBS="-lXext $LIBS"
f199cab1 12740
5476a9a4 12741fi
f199cab1 12742
5476a9a4
GM
12743 fi
12744fi
f199cab1 12745
5476a9a4
GM
12746LIBXP=
12747if test "${USE_X_TOOLKIT}" = "MOTIF"; then
8ad96b1d
GM
12748 # OpenMotif may be installed in such a way on some GNU/Linux systems.
12749 if test -d /usr/include/openmotif; then
12750 CPPFLAGS="-I/usr/include/openmotif $CPPFLAGS"
12751 emacs_cv_openmotif=yes
12752 case "$canonical" in
12753 x86_64-*-linux-gnu* | powerpc64-*-linux-gnu* | sparc64-*-linux-gnu*)
12754 test -d /usr/lib64/openmotif && LDFLAGS="-L/usr/lib64/openmotif $LDFLAGS"
12755 ;;
12756 *)
12757 test -d /usr/lib/openmotif && LDFLAGS="-L/usr/lib/openmotif $LDFLAGS"
12758 esac
12759 else
12760 emacs_cv_openmotif=no
12761 fi
12762 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for (Open)Motif version 2.1" >&5
12763$as_echo_n "checking for (Open)Motif version 2.1... " >&6; }
5476a9a4 12764if test "${emacs_cv_motif_version_2_1+set}" = set; then :
ae1362a3
AS
12765 $as_echo_n "(cached) " >&6
12766else
f199cab1
GM
12767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12768/* end confdefs.h. */
5476a9a4
GM
12769#include <Xm/Xm.h>
12770int
12771main ()
12772{
12773#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
12774int x = 5;
12775#else
12776Motif version prior to 2.1.
12777#endif
12778 ;
12779 return 0;
12780}
12781_ACEOF
12782if ac_fn_c_try_compile "$LINENO"; then :
12783 emacs_cv_motif_version_2_1=yes
12784else
12785 emacs_cv_motif_version_2_1=no
12786fi
12787rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12788fi
12789{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_motif_version_2_1" >&5
12790$as_echo "$emacs_cv_motif_version_2_1" >&6; }
12791 if test $emacs_cv_motif_version_2_1 = yes; then
12792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpCreateContext in -lXp" >&5
12793$as_echo_n "checking for XpCreateContext in -lXp... " >&6; }
12794if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then :
12795 $as_echo_n "(cached) " >&6
12796else
12797 ac_check_lib_save_LIBS=$LIBS
12798LIBS="-lXp $LIBS"
12799cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12800/* end confdefs.h. */
f199cab1 12801
5476a9a4
GM
12802/* Override any GCC internal prototype to avoid an error.
12803 Use char because int might match the return type of a GCC
12804 builtin and then its argument prototype would still apply. */
12805#ifdef __cplusplus
12806extern "C"
12807#endif
12808char XpCreateContext ();
ae1362a3
AS
12809int
12810main ()
12811{
5476a9a4 12812return XpCreateContext ();
ae1362a3
AS
12813 ;
12814 return 0;
12815}
12816_ACEOF
5476a9a4
GM
12817if ac_fn_c_try_link "$LINENO"; then :
12818 ac_cv_lib_Xp_XpCreateContext=yes
067d23c9 12819else
5476a9a4 12820 ac_cv_lib_Xp_XpCreateContext=no
067d23c9 12821fi
5476a9a4
GM
12822rm -f core conftest.err conftest.$ac_objext \
12823 conftest$ac_exeext conftest.$ac_ext
12824LIBS=$ac_check_lib_save_LIBS
12825fi
12826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xp_XpCreateContext" >&5
12827$as_echo "$ac_cv_lib_Xp_XpCreateContext" >&6; }
12828if test "x$ac_cv_lib_Xp_XpCreateContext" = x""yes; then :
12829 LIBXP=-lXp
067d23c9 12830fi
f199cab1 12831
8ad96b1d
GM
12832 if test x$emacs_cv_openmotif = xyes; then
12833 REAL_CPPFLAGS="-I/usr/include/openmotif $REAL_CPPFLAGS"
12834 fi
5476a9a4
GM
12835 else
12836 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LessTif where some systems put it" >&5
12837$as_echo_n "checking for LessTif where some systems put it... " >&6; }
12838if test "${emacs_cv_lesstif+set}" = set; then :
067d23c9 12839 $as_echo_n "(cached) " >&6
f199cab1 12840else
5476a9a4
GM
12841 # We put this in CFLAGS temporarily to precede other -I options
12842 # that might be in CFLAGS temporarily.
12843 # We put this in CPPFLAGS where it precedes the other -I options.
12844 OLD_CPPFLAGS=$CPPFLAGS
12845 OLD_CFLAGS=$CFLAGS
12846 CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS"
12847 CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS"
12848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 12849/* end confdefs.h. */
5476a9a4 12850#include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h>
067d23c9
KY
12851int
12852main ()
12853{
5476a9a4 12854int x = 5;
067d23c9
KY
12855 ;
12856 return 0;
12857}
12858_ACEOF
5476a9a4
GM
12859if ac_fn_c_try_compile "$LINENO"; then :
12860 emacs_cv_lesstif=yes
067d23c9 12861else
5476a9a4 12862 emacs_cv_lesstif=no
067d23c9 12863fi
5476a9a4 12864rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
067d23c9 12865fi
5476a9a4
GM
12866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_lesstif" >&5
12867$as_echo "$emacs_cv_lesstif" >&6; }
12868 if test $emacs_cv_lesstif = yes; then
12869 # Make sure this -I option remains in CPPFLAGS after it is set
12870 # back to REAL_CPPFLAGS.
12871 # There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not
12872 # have those other -I options anyway. Ultimately, having this
12873 # directory ultimately in CPPFLAGS will be enough.
12874 REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS"
12875 LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS"
12876 else
12877 CFLAGS=$OLD_CFLAGS
12878 CPPFLAGS=$OLD_CPPFLAGS
12879 fi
12880 fi
12881 ac_fn_c_check_header_mongrel "$LINENO" "Xm/BulletinB.h" "ac_cv_header_Xm_BulletinB_h" "$ac_includes_default"
12882if test "x$ac_cv_header_Xm_BulletinB_h" = x""yes; then :
067d23c9 12883
5476a9a4
GM
12884else
12885 as_fn_error "Motif toolkit requested but requirements not found." "$LINENO" 5
067d23c9 12886fi
f199cab1
GM
12887
12888
5476a9a4 12889fi
f199cab1
GM
12890
12891
5476a9a4
GM
12892USE_TOOLKIT_SCROLL_BARS=no
12893if test "${with_toolkit_scroll_bars}" != "no"; then
12894 if test "${USE_X_TOOLKIT}" != "none"; then
12895 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
12896 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
f199cab1 12897
5476a9a4
GM
12898 HAVE_XAW3D=no
12899 USE_TOOLKIT_SCROLL_BARS=yes
12900 elif test "${HAVE_XAW3D}" = "yes" || test "${USE_X_TOOLKIT}" = "LUCID"; then
12901 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
f199cab1 12902
5476a9a4
GM
12903 USE_TOOLKIT_SCROLL_BARS=yes
12904 fi
12905 elif test "${HAVE_GTK}" = "yes"; then
12906 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
f199cab1 12907
5476a9a4
GM
12908 USE_TOOLKIT_SCROLL_BARS=yes
12909 elif test "${HAVE_NS}" = "yes"; then
12910 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
f199cab1 12911
5c0255d9
GM
12912 USE_TOOLKIT_SCROLL_BARS=yes
12913 elif test "${HAVE_W32}" = "yes"; then
12914 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
12915
5476a9a4
GM
12916 USE_TOOLKIT_SCROLL_BARS=yes
12917 fi
12918fi
f199cab1 12919
5476a9a4 12920cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 12921/* end confdefs.h. */
5476a9a4
GM
12922
12923 #include <X11/Xlib.h>
12924 #include <X11/Xresource.h>
067d23c9
KY
12925int
12926main ()
12927{
5476a9a4 12928XIMProc callback;
067d23c9
KY
12929 ;
12930 return 0;
12931}
12932_ACEOF
f199cab1 12933if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4
GM
12934 HAVE_XIM=yes
12935
12936$as_echo "#define HAVE_XIM 1" >>confdefs.h
12937
067d23c9 12938else
5476a9a4 12939 HAVE_XIM=no
067d23c9 12940fi
f199cab1 12941rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 12942
f199cab1 12943
5476a9a4
GM
12944if test "${with_xim}" != "no"; then
12945
12946$as_echo "#define USE_XIM 1" >>confdefs.h
12947
12948fi
12949
12950
12951if test "${HAVE_XIM}" != "no"; then
12952 late_CFLAGS=$CFLAGS
12953 if test "$GCC" = yes; then
12954 CFLAGS="$CFLAGS --pedantic-errors"
12955 fi
12956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12957/* end confdefs.h. */
f199cab1 12958
5476a9a4
GM
12959#include <X11/Xlib.h>
12960#include <X11/Xresource.h>
12961int
12962main ()
12963{
12964Display *display;
12965XrmDatabase db;
12966char *res_name;
12967char *res_class;
12968XIMProc callback;
12969XPointer *client_data;
12970#ifndef __GNUC__
12971/* If we're not using GCC, it's probably not XFree86, and this is
12972 probably right, but we can't use something like --pedantic-errors. */
12973extern Bool XRegisterIMInstantiateCallback(Display*, XrmDatabase, char*,
12974 char*, XIMProc, XPointer*);
12975#endif
12976(void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, callback,
12977 client_data);
067d23c9
KY
12978 ;
12979 return 0;
12980}
12981_ACEOF
5476a9a4
GM
12982if ac_fn_c_try_compile "$LINENO"; then :
12983 emacs_cv_arg6_star=yes
067d23c9 12984fi
f199cab1 12985rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5476a9a4
GM
12986 if test "$emacs_cv_arg6_star" = yes; then
12987 $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer*" >>confdefs.h
12988
12989 else
12990 $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer" >>confdefs.h
067d23c9 12991
5476a9a4
GM
12992 fi
12993 CFLAGS=$late_CFLAGS
067d23c9
KY
12994fi
12995
5476a9a4
GM
12996### Start of font-backend (under any platform) section.
12997# (nothing here yet -- this is a placeholder)
12998### End of font-backend (under any platform) section.
067d23c9 12999
5476a9a4
GM
13000### Start of font-backend (under X11) section.
13001if test "${HAVE_X11}" = "yes"; then
067d23c9 13002
5476a9a4 13003 succeeded=no
067d23c9 13004
5476a9a4
GM
13005 if test "$PKG_CONFIG" = "no" ; then
13006 HAVE_FC=no
13007 else
13008 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 13009 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
13010 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fontconfig >= 2.2.0" >&5
13011$as_echo_n "checking for fontconfig >= 2.2.0... " >&6; }
f199cab1 13012
b5591ebb
GM
13013 if "$PKG_CONFIG" --exists "fontconfig >= 2.2.0" 2>&5 &&
13014 FONTCONFIG_CFLAGS=`"$PKG_CONFIG" --cflags "fontconfig >= 2.2.0" 2>&5` &&
13015 FONTCONFIG_LIBS=`"$PKG_CONFIG" --libs "fontconfig >= 2.2.0" 2>&5`; then
5476a9a4
GM
13016 edit_cflags="
13017 s,///*,/,g
13018 s/^/ /
13019 s/ -I/ $isystem/g
13020 s/^ //
13021 "
13022 FONTCONFIG_CFLAGS=`$as_echo "$FONTCONFIG_CFLAGS" | sed -e "$edit_cflags"`
13023 FONTCONFIG_LIBS=`$as_echo "$FONTCONFIG_LIBS" | sed -e 's,///*,/,g'`
13024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$FONTCONFIG_CFLAGS' LIBS='$FONTCONFIG_LIBS'" >&5
13025$as_echo "yes CFLAGS='$FONTCONFIG_CFLAGS' LIBS='$FONTCONFIG_LIBS'" >&6; }
13026 succeeded=yes
13027 else
13028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13029$as_echo "no" >&6; }
13030 FONTCONFIG_CFLAGS=""
13031 FONTCONFIG_LIBS=""
13032 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
13033 ## do set a variable so people can do so. Do it in a subshell
13034 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 13035 FONTCONFIG_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "fontconfig >= 2.2.0") 2>&1`
f199cab1 13036
5476a9a4 13037 fi
f199cab1
GM
13038
13039
13040
f199cab1 13041 else
5476a9a4
GM
13042 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
13043 echo "*** See http://www.freedesktop.org/software/pkgconfig"
13044 fi
13045 fi
f199cab1 13046
5476a9a4
GM
13047 if test $succeeded = yes; then
13048 HAVE_FC=yes
13049 else
13050 HAVE_FC=no
13051 fi
f199cab1 13052
067d23c9 13053
5476a9a4
GM
13054 ## Use -lXft if available, unless `--with-xft=no'.
13055 HAVE_XFT=maybe
13056 if test "${HAVE_FC}" = "no" || test "x${with_x}" = "xno"; then
13057 with_xft="no";
13058 fi
13059 if test "x${with_xft}" != "xno"; then
f199cab1 13060
f199cab1 13061
5476a9a4 13062 succeeded=no
f199cab1 13063
5476a9a4
GM
13064 if test "$PKG_CONFIG" = "no" ; then
13065 HAVE_XFT=no
13066 else
13067 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 13068 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
13069 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xft >= 0.13.0" >&5
13070$as_echo_n "checking for xft >= 0.13.0... " >&6; }
f199cab1 13071
b5591ebb
GM
13072 if "$PKG_CONFIG" --exists "xft >= 0.13.0" 2>&5 &&
13073 XFT_CFLAGS=`"$PKG_CONFIG" --cflags "xft >= 0.13.0" 2>&5` &&
13074 XFT_LIBS=`"$PKG_CONFIG" --libs "xft >= 0.13.0" 2>&5`; then
5476a9a4
GM
13075 edit_cflags="
13076 s,///*,/,g
13077 s/^/ /
13078 s/ -I/ $isystem/g
13079 s/^ //
13080 "
13081 XFT_CFLAGS=`$as_echo "$XFT_CFLAGS" | sed -e "$edit_cflags"`
13082 XFT_LIBS=`$as_echo "$XFT_LIBS" | sed -e 's,///*,/,g'`
13083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$XFT_CFLAGS' LIBS='$XFT_LIBS'" >&5
13084$as_echo "yes CFLAGS='$XFT_CFLAGS' LIBS='$XFT_LIBS'" >&6; }
13085 succeeded=yes
13086 else
13087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13088$as_echo "no" >&6; }
13089 XFT_CFLAGS=""
13090 XFT_LIBS=""
13091 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
13092 ## do set a variable so people can do so. Do it in a subshell
13093 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 13094 XFT_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "xft >= 0.13.0") 2>&1`
f199cab1 13095
5476a9a4 13096 fi
f199cab1
GM
13097
13098
13099
5476a9a4
GM
13100 else
13101 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
13102 echo "*** See http://www.freedesktop.org/software/pkgconfig"
13103 fi
13104 fi
f199cab1 13105
5476a9a4
GM
13106 if test $succeeded = yes; then
13107 :
f199cab1 13108 else
5476a9a4 13109 HAVE_XFT=no
f199cab1
GM
13110 fi
13111
5476a9a4
GM
13112 ## Because xftfont.c uses XRenderQueryExtension, we also
13113 ## need to link to -lXrender.
13114 HAVE_XRENDER=no
13115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRenderQueryExtension in -lXrender" >&5
13116$as_echo_n "checking for XRenderQueryExtension in -lXrender... " >&6; }
13117if test "${ac_cv_lib_Xrender_XRenderQueryExtension+set}" = set; then :
13118 $as_echo_n "(cached) " >&6
13119else
13120 ac_check_lib_save_LIBS=$LIBS
13121LIBS="-lXrender $LIBS"
13122cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13123/* end confdefs.h. */
f199cab1 13124
5476a9a4
GM
13125/* Override any GCC internal prototype to avoid an error.
13126 Use char because int might match the return type of a GCC
13127 builtin and then its argument prototype would still apply. */
13128#ifdef __cplusplus
13129extern "C"
13130#endif
13131char XRenderQueryExtension ();
13132int
13133main ()
13134{
13135return XRenderQueryExtension ();
13136 ;
13137 return 0;
13138}
13139_ACEOF
13140if ac_fn_c_try_link "$LINENO"; then :
13141 ac_cv_lib_Xrender_XRenderQueryExtension=yes
13142else
13143 ac_cv_lib_Xrender_XRenderQueryExtension=no
13144fi
13145rm -f core conftest.err conftest.$ac_objext \
13146 conftest$ac_exeext conftest.$ac_ext
13147LIBS=$ac_check_lib_save_LIBS
13148fi
13149{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrender_XRenderQueryExtension" >&5
13150$as_echo "$ac_cv_lib_Xrender_XRenderQueryExtension" >&6; }
13151if test "x$ac_cv_lib_Xrender_XRenderQueryExtension" = x""yes; then :
13152 HAVE_XRENDER=yes
13153fi
f199cab1 13154
5476a9a4
GM
13155 if test "$HAVE_XFT" != no && test "$HAVE_XRENDER" != no; then
13156 OLD_CPPFLAGS="$CPPFLAGS"
13157 OLD_CFLAGS="$CFLAGS"
13158 OLD_LIBS="$LIBS"
13159 CPPFLAGS="$CPPFLAGS $XFT_CFLAGS"
13160 CFLAGS="$CFLAGS $XFT_CFLAGS"
13161 XFT_LIBS="-lXrender $XFT_LIBS"
13162 LIBS="$XFT_LIBS $LIBS"
46f74982
GM
13163 ac_fn_c_check_header_compile "$LINENO" "X11/Xft/Xft.h" "ac_cv_header_X11_Xft_Xft_h" "#include <X11/X.h>
13164"
5476a9a4
GM
13165if test "x$ac_cv_header_X11_Xft_Xft_h" = x""yes; then :
13166 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XftFontOpen in -lXft" >&5
13167$as_echo_n "checking for XftFontOpen in -lXft... " >&6; }
13168if test "${ac_cv_lib_Xft_XftFontOpen+set}" = set; then :
13169 $as_echo_n "(cached) " >&6
13170else
13171 ac_check_lib_save_LIBS=$LIBS
13172LIBS="-lXft $XFT_LIBS $LIBS"
13173cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13174/* end confdefs.h. */
f199cab1 13175
5476a9a4
GM
13176/* Override any GCC internal prototype to avoid an error.
13177 Use char because int might match the return type of a GCC
13178 builtin and then its argument prototype would still apply. */
13179#ifdef __cplusplus
13180extern "C"
13181#endif
13182char XftFontOpen ();
13183int
13184main ()
13185{
13186return XftFontOpen ();
13187 ;
13188 return 0;
13189}
067d23c9 13190_ACEOF
5476a9a4
GM
13191if ac_fn_c_try_link "$LINENO"; then :
13192 ac_cv_lib_Xft_XftFontOpen=yes
13193else
13194 ac_cv_lib_Xft_XftFontOpen=no
13195fi
13196rm -f core conftest.err conftest.$ac_objext \
13197 conftest$ac_exeext conftest.$ac_ext
13198LIBS=$ac_check_lib_save_LIBS
13199fi
13200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xft_XftFontOpen" >&5
13201$as_echo "$ac_cv_lib_Xft_XftFontOpen" >&6; }
13202if test "x$ac_cv_lib_Xft_XftFontOpen" = x""yes; then :
13203 HAVE_XFT=yes
f199cab1
GM
13204fi
13205
5476a9a4 13206fi
f199cab1
GM
13207
13208
f199cab1 13209
5476a9a4 13210 if test "${HAVE_XFT}" = "yes"; then
f199cab1 13211
5476a9a4 13212$as_echo "#define HAVE_XFT 1" >>confdefs.h
f199cab1 13213
067d23c9 13214
5476a9a4
GM
13215 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $XFT_CFLAGS"
13216 else
13217 CPPFLAGS="$OLD_CPPFLAGS"
13218 CFLAGS="$OLD_CFLAGS"
13219 LIBS="$OLD_LIBS"
13220 fi # "${HAVE_XFT}" = "yes"
13221 fi # "$HAVE_XFT" != no
13222 fi # "x${with_xft}" != "xno"
f199cab1 13223
5476a9a4
GM
13224 ## We used to allow building with FreeType and without Xft.
13225 ## However, the ftx font backend driver is not in good shape.
13226 if test "$HAVE_XFT" != "yes"; then
13227 HAVE_XFT=no
13228 HAVE_FREETYPE=no
13229 else
f199cab1 13230
5476a9a4 13231 succeeded=no
f199cab1 13232
5476a9a4
GM
13233 if test "$PKG_CONFIG" = "no" ; then
13234 HAVE_FREETYPE=no
13235 else
13236 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 13237 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
13238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype2" >&5
13239$as_echo_n "checking for freetype2... " >&6; }
f199cab1 13240
b5591ebb
GM
13241 if "$PKG_CONFIG" --exists "freetype2" 2>&5 &&
13242 FREETYPE_CFLAGS=`"$PKG_CONFIG" --cflags "freetype2" 2>&5` &&
13243 FREETYPE_LIBS=`"$PKG_CONFIG" --libs "freetype2" 2>&5`; then
5476a9a4
GM
13244 edit_cflags="
13245 s,///*,/,g
13246 s/^/ /
13247 s/ -I/ $isystem/g
13248 s/^ //
13249 "
13250 FREETYPE_CFLAGS=`$as_echo "$FREETYPE_CFLAGS" | sed -e "$edit_cflags"`
13251 FREETYPE_LIBS=`$as_echo "$FREETYPE_LIBS" | sed -e 's,///*,/,g'`
13252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$FREETYPE_CFLAGS' LIBS='$FREETYPE_LIBS'" >&5
13253$as_echo "yes CFLAGS='$FREETYPE_CFLAGS' LIBS='$FREETYPE_LIBS'" >&6; }
13254 succeeded=yes
13255 else
13256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13257$as_echo "no" >&6; }
13258 FREETYPE_CFLAGS=""
13259 FREETYPE_LIBS=""
13260 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
13261 ## do set a variable so people can do so. Do it in a subshell
13262 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 13263 FREETYPE_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "freetype2") 2>&1`
f199cab1 13264
5476a9a4 13265 fi
f199cab1 13266
f199cab1 13267
067d23c9 13268
5476a9a4
GM
13269 else
13270 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
13271 echo "*** See http://www.freedesktop.org/software/pkgconfig"
13272 fi
067d23c9 13273 fi
f199cab1 13274
5476a9a4
GM
13275 if test $succeeded = yes; then
13276 HAVE_FREETYPE=yes
13277 else
13278 HAVE_FREETYPE=no
13279 fi
f199cab1 13280
f199cab1 13281
5476a9a4
GM
13282 test "$HAVE_FREETYPE" = "no" && as_fn_error "libxft requires libfreetype" "$LINENO" 5
13283 fi
f199cab1 13284
5476a9a4
GM
13285 HAVE_LIBOTF=no
13286 if test "${HAVE_FREETYPE}" = "yes"; then
f199cab1 13287
5476a9a4 13288$as_echo "#define HAVE_FREETYPE 1" >>confdefs.h
f199cab1 13289
5476a9a4 13290 if test "${with_libotf}" != "no"; then
f199cab1 13291
5476a9a4 13292 succeeded=no
f199cab1 13293
5476a9a4
GM
13294 if test "$PKG_CONFIG" = "no" ; then
13295 HAVE_LIBOTF=no
13296 else
13297 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 13298 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
13299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libotf" >&5
13300$as_echo_n "checking for libotf... " >&6; }
f199cab1 13301
b5591ebb
GM
13302 if "$PKG_CONFIG" --exists "libotf" 2>&5 &&
13303 LIBOTF_CFLAGS=`"$PKG_CONFIG" --cflags "libotf" 2>&5` &&
13304 LIBOTF_LIBS=`"$PKG_CONFIG" --libs "libotf" 2>&5`; then
5476a9a4
GM
13305 edit_cflags="
13306 s,///*,/,g
13307 s/^/ /
13308 s/ -I/ $isystem/g
13309 s/^ //
13310 "
13311 LIBOTF_CFLAGS=`$as_echo "$LIBOTF_CFLAGS" | sed -e "$edit_cflags"`
13312 LIBOTF_LIBS=`$as_echo "$LIBOTF_LIBS" | sed -e 's,///*,/,g'`
13313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBOTF_CFLAGS' LIBS='$LIBOTF_LIBS'" >&5
13314$as_echo "yes CFLAGS='$LIBOTF_CFLAGS' LIBS='$LIBOTF_LIBS'" >&6; }
13315 succeeded=yes
13316 else
13317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13318$as_echo "no" >&6; }
13319 LIBOTF_CFLAGS=""
13320 LIBOTF_LIBS=""
13321 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
13322 ## do set a variable so people can do so. Do it in a subshell
13323 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 13324 LIBOTF_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "libotf") 2>&1`
067d23c9 13325
5476a9a4 13326 fi
f199cab1
GM
13327
13328
067d23c9 13329
5476a9a4
GM
13330 else
13331 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
13332 echo "*** See http://www.freedesktop.org/software/pkgconfig"
13333 fi
13334 fi
f199cab1 13335
5476a9a4
GM
13336 if test $succeeded = yes; then
13337 HAVE_LIBOTF=yes
13338 else
13339 HAVE_LIBOTF=no
13340 fi
f199cab1 13341
5476a9a4 13342 if test "$HAVE_LIBOTF" = "yes"; then
f199cab1 13343
5476a9a4 13344$as_echo "#define HAVE_LIBOTF 1" >>confdefs.h
f199cab1 13345
5476a9a4
GM
13346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTF_get_variation_glyphs in -lotf" >&5
13347$as_echo_n "checking for OTF_get_variation_glyphs in -lotf... " >&6; }
13348if test "${ac_cv_lib_otf_OTF_get_variation_glyphs+set}" = set; then :
067d23c9
KY
13349 $as_echo_n "(cached) " >&6
13350else
5476a9a4
GM
13351 ac_check_lib_save_LIBS=$LIBS
13352LIBS="-lotf $LIBS"
13353cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 13354/* end confdefs.h. */
5476a9a4
GM
13355
13356/* Override any GCC internal prototype to avoid an error.
13357 Use char because int might match the return type of a GCC
13358 builtin and then its argument prototype would still apply. */
13359#ifdef __cplusplus
13360extern "C"
13361#endif
13362char OTF_get_variation_glyphs ();
067d23c9
KY
13363int
13364main ()
13365{
5476a9a4 13366return OTF_get_variation_glyphs ();
067d23c9
KY
13367 ;
13368 return 0;
13369}
13370_ACEOF
5476a9a4
GM
13371if ac_fn_c_try_link "$LINENO"; then :
13372 ac_cv_lib_otf_OTF_get_variation_glyphs=yes
067d23c9 13373else
5476a9a4 13374 ac_cv_lib_otf_OTF_get_variation_glyphs=no
067d23c9 13375fi
5476a9a4
GM
13376rm -f core conftest.err conftest.$ac_objext \
13377 conftest$ac_exeext conftest.$ac_ext
13378LIBS=$ac_check_lib_save_LIBS
13379fi
13380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_otf_OTF_get_variation_glyphs" >&5
13381$as_echo "$ac_cv_lib_otf_OTF_get_variation_glyphs" >&6; }
13382if test "x$ac_cv_lib_otf_OTF_get_variation_glyphs" = x""yes; then :
13383 HAVE_OTF_GET_VARIATION_GLYPHS=yes
13384else
13385 HAVE_OTF_GET_VARIATION_GLYPHS=no
067d23c9 13386fi
067d23c9 13387
5476a9a4
GM
13388 if test "${HAVE_OTF_GET_VARIATION_GLYPHS}" = "yes"; then
13389
13390$as_echo "#define HAVE_OTF_GET_VARIATION_GLYPHS 1" >>confdefs.h
13391
13392 fi
13393 fi
13394 fi
13395 fi
13396
13397 HAVE_M17N_FLT=no
13398 if test "${HAVE_LIBOTF}" = yes; then
13399 if test "${with_m17n_flt}" != "no"; then
13400
13401 succeeded=no
13402
13403 if test "$PKG_CONFIG" = "no" ; then
13404 HAVE_M17N_FLT=no
13405 else
13406 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 13407 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
13408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for m17n-flt" >&5
13409$as_echo_n "checking for m17n-flt... " >&6; }
13410
b5591ebb
GM
13411 if "$PKG_CONFIG" --exists "m17n-flt" 2>&5 &&
13412 M17N_FLT_CFLAGS=`"$PKG_CONFIG" --cflags "m17n-flt" 2>&5` &&
13413 M17N_FLT_LIBS=`"$PKG_CONFIG" --libs "m17n-flt" 2>&5`; then
5476a9a4
GM
13414 edit_cflags="
13415 s,///*,/,g
13416 s/^/ /
13417 s/ -I/ $isystem/g
13418 s/^ //
13419 "
13420 M17N_FLT_CFLAGS=`$as_echo "$M17N_FLT_CFLAGS" | sed -e "$edit_cflags"`
13421 M17N_FLT_LIBS=`$as_echo "$M17N_FLT_LIBS" | sed -e 's,///*,/,g'`
13422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$M17N_FLT_CFLAGS' LIBS='$M17N_FLT_LIBS'" >&5
13423$as_echo "yes CFLAGS='$M17N_FLT_CFLAGS' LIBS='$M17N_FLT_LIBS'" >&6; }
13424 succeeded=yes
13425 else
13426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13427$as_echo "no" >&6; }
13428 M17N_FLT_CFLAGS=""
13429 M17N_FLT_LIBS=""
13430 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
13431 ## do set a variable so people can do so. Do it in a subshell
13432 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 13433 M17N_FLT_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "m17n-flt") 2>&1`
5476a9a4
GM
13434
13435 fi
13436
13437
067d23c9 13438
5476a9a4
GM
13439 else
13440 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
13441 echo "*** See http://www.freedesktop.org/software/pkgconfig"
13442 fi
f199cab1 13443 fi
067d23c9 13444
5476a9a4
GM
13445 if test $succeeded = yes; then
13446 HAVE_M17N_FLT=yes
13447 else
13448 HAVE_M17N_FLT=no
13449 fi
13450
13451 if test "$HAVE_M17N_FLT" = "yes"; then
13452
13453$as_echo "#define HAVE_M17N_FLT 1" >>confdefs.h
13454
13455 fi
13456 fi
13457 fi
13458else
13459 HAVE_XFT=no
13460 HAVE_FREETYPE=no
13461 HAVE_LIBOTF=no
13462 HAVE_M17N_FLT=no
13463fi
13464
13465### End of font-backend (under X11) section.
13466
13467
067d23c9 13468
067d23c9 13469
5476a9a4
GM
13470
13471
13472
13473
13474
13475
13476### Use -lXpm if available, unless `--with-xpm=no'.
7c61eaab 13477### mingw32 doesn't use -lXpm, since it loads the library dynamically.
5476a9a4
GM
13478HAVE_XPM=no
13479LIBXPM=
7c61eaab 13480if test "${HAVE_W32}" = "yes" && test "${opsys}" = "cygwin"; then
5c0255d9
GM
13481 if test "${with_xpm}" != "no"; then
13482 SAVE_CPPFLAGS="$CPPFLAGS"
13483 SAVE_LDFLAGS="$LDFLAGS"
13484 CPPFLAGS="$CPPFLAGS -I/usr/include/noX"
13485 LDFLAGS="$LDFLAGS -L/usr/lib/noX"
13486 ac_fn_c_check_header_mongrel "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "$ac_includes_default"
13487if test "x$ac_cv_header_X11_xpm_h" = x""yes; then :
13488 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReadFileToImage in -lXpm" >&5
13489$as_echo_n "checking for XpmReadFileToImage in -lXpm... " >&6; }
13490if test "${ac_cv_lib_Xpm_XpmReadFileToImage+set}" = set; then :
13491 $as_echo_n "(cached) " >&6
13492else
13493 ac_check_lib_save_LIBS=$LIBS
13494LIBS="-lXpm $LIBS"
13495cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13496/* end confdefs.h. */
13497
13498/* Override any GCC internal prototype to avoid an error.
13499 Use char because int might match the return type of a GCC
13500 builtin and then its argument prototype would still apply. */
13501#ifdef __cplusplus
13502extern "C"
13503#endif
13504char XpmReadFileToImage ();
13505int
13506main ()
13507{
13508return XpmReadFileToImage ();
13509 ;
13510 return 0;
13511}
13512_ACEOF
13513if ac_fn_c_try_link "$LINENO"; then :
13514 ac_cv_lib_Xpm_XpmReadFileToImage=yes
13515else
13516 ac_cv_lib_Xpm_XpmReadFileToImage=no
13517fi
13518rm -f core conftest.err conftest.$ac_objext \
13519 conftest$ac_exeext conftest.$ac_ext
13520LIBS=$ac_check_lib_save_LIBS
13521fi
13522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmReadFileToImage" >&5
13523$as_echo "$ac_cv_lib_Xpm_XpmReadFileToImage" >&6; }
13524if test "x$ac_cv_lib_Xpm_XpmReadFileToImage" = x""yes; then :
13525 HAVE_XPM=yes
13526fi
13527
13528fi
13529
13530
13531 if test "${HAVE_XPM}" = "yes"; then
13532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReturnAllocPixels preprocessor define" >&5
13533$as_echo_n "checking for XpmReturnAllocPixels preprocessor define... " >&6; }
13534 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13535/* end confdefs.h. */
13536#include "X11/xpm.h"
13537#ifndef XpmReturnAllocPixels
13538no_return_alloc_pixels
13539#endif
13540
13541_ACEOF
13542if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13543 $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then :
13544 HAVE_XPM=no
13545else
13546 HAVE_XPM=yes
13547fi
13548rm -f conftest*
13549
13550
13551 if test "${HAVE_XPM}" = "yes"; then
13552 REAL_CPPFLAGS="$REAL_CPPFLAGS -I/usr/include/noX"
13553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13554$as_echo "yes" >&6; }
13555 else
13556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13557$as_echo "no" >&6; }
13558 CPPFLAGS="$SAVE_CPPFLAGS"
13559 LDFLAGS="$SAVE_LDFLAGS"
13560 fi
13561 fi
13562 fi
13563
13564 if test "${HAVE_XPM}" = "yes"; then
13565
13566$as_echo "#define HAVE_XPM 1" >>confdefs.h
13567
13568 LIBXPM=-lXpm
13569 fi
13570fi
13571
5476a9a4
GM
13572if test "${HAVE_X11}" = "yes"; then
13573 if test "${with_xpm}" != "no"; then
13574 ac_fn_c_check_header_mongrel "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "$ac_includes_default"
13575if test "x$ac_cv_header_X11_xpm_h" = x""yes; then :
13576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReadFileToPixmap in -lXpm" >&5
13577$as_echo_n "checking for XpmReadFileToPixmap in -lXpm... " >&6; }
13578if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then :
f199cab1
GM
13579 $as_echo_n "(cached) " >&6
13580else
5476a9a4
GM
13581 ac_check_lib_save_LIBS=$LIBS
13582LIBS="-lXpm -lX11 $LIBS"
13583cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
13584/* end confdefs.h. */
13585
5476a9a4
GM
13586/* Override any GCC internal prototype to avoid an error.
13587 Use char because int might match the return type of a GCC
13588 builtin and then its argument prototype would still apply. */
13589#ifdef __cplusplus
13590extern "C"
13591#endif
13592char XpmReadFileToPixmap ();
067d23c9
KY
13593int
13594main ()
13595{
5476a9a4 13596return XpmReadFileToPixmap ();
067d23c9
KY
13597 ;
13598 return 0;
13599}
13600_ACEOF
5476a9a4
GM
13601if ac_fn_c_try_link "$LINENO"; then :
13602 ac_cv_lib_Xpm_XpmReadFileToPixmap=yes
067d23c9 13603else
5476a9a4 13604 ac_cv_lib_Xpm_XpmReadFileToPixmap=no
067d23c9 13605fi
5476a9a4
GM
13606rm -f core conftest.err conftest.$ac_objext \
13607 conftest$ac_exeext conftest.$ac_ext
13608LIBS=$ac_check_lib_save_LIBS
13609fi
13610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5
13611$as_echo "$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6; }
13612if test "x$ac_cv_lib_Xpm_XpmReadFileToPixmap" = x""yes; then :
13613 HAVE_XPM=yes
f199cab1 13614fi
067d23c9
KY
13615
13616fi
13617
13618
5476a9a4
GM
13619 if test "${HAVE_XPM}" = "yes"; then
13620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReturnAllocPixels preprocessor define" >&5
13621$as_echo_n "checking for XpmReturnAllocPixels preprocessor define... " >&6; }
13622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13623/* end confdefs.h. */
13624#include "X11/xpm.h"
13625#ifndef XpmReturnAllocPixels
13626no_return_alloc_pixels
13627#endif
067d23c9 13628
067d23c9 13629_ACEOF
5476a9a4
GM
13630if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13631 $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then :
13632 HAVE_XPM=no
13633else
13634 HAVE_XPM=yes
13635fi
13636rm -f conftest*
067d23c9 13637
067d23c9 13638
5476a9a4
GM
13639 if test "${HAVE_XPM}" = "yes"; then
13640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13641$as_echo "yes" >&6; }
13642 else
13643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13644$as_echo "no" >&6; }
13645 fi
13646 fi
13647 fi
067d23c9 13648
5476a9a4 13649 if test "${HAVE_XPM}" = "yes"; then
067d23c9 13650
5476a9a4 13651$as_echo "#define HAVE_XPM 1" >>confdefs.h
067d23c9 13652
5476a9a4
GM
13653 LIBXPM=-lXpm
13654 fi
067d23c9
KY
13655fi
13656
7c61eaab
GM
13657### FIXME: Perhaps regroup to minimize code duplication due to MinGW's
13658### slightly different requirements wrt image libraries (it doesn't
13659### use -lXpm because it loads the xpm shared library dynamically at
13660### run time).
13661if test "${opsys}" = "mingw32"; then
13662 if test "${with_xpm}" != "no"; then
13663 ac_fn_c_check_header_compile "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "
13664#define FOR_MSW 1
13665"
13666if test "x$ac_cv_header_X11_xpm_h" = x""yes; then :
13667 HAVE_XPM=yes
13668else
13669 HAVE_XPM=no
13670fi
13671
13672
13673 fi
13674
13675 if test "${HAVE_XPM}" = "yes"; then
13676
13677$as_echo "#define HAVE_XPM 1" >>confdefs.h
13678
13679 fi
13680fi
13681
f199cab1 13682
5c0255d9 13683
5476a9a4 13684### Use -ljpeg if available, unless `--with-jpeg=no'.
7c61eaab 13685### mingw32 doesn't use -ljpeg, since it loads the library dynamically.
5476a9a4
GM
13686HAVE_JPEG=no
13687LIBJPEG=
7c61eaab
GM
13688if test "${opsys}" = "mingw32"; then
13689 if test "${with_jpeg}" != "no"; then
13690 ac_fn_c_check_header_mongrel "$LINENO" "jerror.h" "ac_cv_header_jerror_h" "$ac_includes_default"
13691if test "x$ac_cv_header_jerror_h" = x""yes; then :
13692 HAVE_JPEG=yes
13693else
13694 HAVE_JPEG=no
13695fi
13696
13697
13698 fi
13699 if test "${HAVE_JPEG}" = "yes"; then
13700 $as_echo "#define HAVE_JPEG 1" >>confdefs.h
13701
13702 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13703/* end confdefs.h. */
13704#include <jpeglib.h>
13705 version=JPEG_LIB_VERSION
13706
13707_ACEOF
13708if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13709 $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then :
13710 $as_echo "#define HAVE_JPEG 1" >>confdefs.h
13711
13712else
13713 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libjpeg found, but not version 6b or later" >&5
13714$as_echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;}
13715 HAVE_JPEG=no
13716fi
13717rm -f conftest*
13718
13719 fi
13720elif test "${HAVE_X11}" = "yes" || test "${HAVE_W32}" = "yes"; then
5476a9a4
GM
13721 if test "${with_jpeg}" != "no"; then
13722 ac_fn_c_check_header_mongrel "$LINENO" "jerror.h" "ac_cv_header_jerror_h" "$ac_includes_default"
13723if test "x$ac_cv_header_jerror_h" = x""yes; then :
13724 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_destroy_compress in -ljpeg" >&5
13725$as_echo_n "checking for jpeg_destroy_compress in -ljpeg... " >&6; }
13726if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then :
067d23c9
KY
13727 $as_echo_n "(cached) " >&6
13728else
5476a9a4
GM
13729 ac_check_lib_save_LIBS=$LIBS
13730LIBS="-ljpeg $LIBS"
13731cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 13732/* end confdefs.h. */
f199cab1 13733
5476a9a4
GM
13734/* Override any GCC internal prototype to avoid an error.
13735 Use char because int might match the return type of a GCC
13736 builtin and then its argument prototype would still apply. */
13737#ifdef __cplusplus
13738extern "C"
13739#endif
13740char jpeg_destroy_compress ();
067d23c9
KY
13741int
13742main ()
13743{
5476a9a4 13744return jpeg_destroy_compress ();
067d23c9
KY
13745 ;
13746 return 0;
13747}
13748_ACEOF
13749if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 13750 ac_cv_lib_jpeg_jpeg_destroy_compress=yes
067d23c9 13751else
5476a9a4 13752 ac_cv_lib_jpeg_jpeg_destroy_compress=no
067d23c9
KY
13753fi
13754rm -f core conftest.err conftest.$ac_objext \
13755 conftest$ac_exeext conftest.$ac_ext
5476a9a4
GM
13756LIBS=$ac_check_lib_save_LIBS
13757fi
13758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5
13759$as_echo "$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6; }
13760if test "x$ac_cv_lib_jpeg_jpeg_destroy_compress" = x""yes; then :
13761 HAVE_JPEG=yes
13762fi
13763
067d23c9 13764fi
f199cab1 13765
f199cab1
GM
13766
13767 fi
067d23c9 13768
5476a9a4
GM
13769 if test "${HAVE_JPEG}" = "yes"; then
13770 $as_echo "#define HAVE_JPEG 1" >>confdefs.h
f199cab1 13771
5476a9a4
GM
13772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13773/* end confdefs.h. */
13774#include <jpeglib.h>
13775 version=JPEG_LIB_VERSION
f199cab1 13776
5476a9a4
GM
13777_ACEOF
13778if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13779 $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then :
13780 $as_echo "#define HAVE_JPEG 1" >>confdefs.h
f199cab1 13781
5476a9a4
GM
13782else
13783 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libjpeg found, but not version 6b or later" >&5
13784$as_echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;}
7c61eaab 13785 HAVE_JPEG=no
067d23c9 13786fi
5476a9a4 13787rm -f conftest*
067d23c9 13788
5476a9a4
GM
13789 fi
13790 if test "${HAVE_JPEG}" = "yes"; then
13791 LIBJPEG=-ljpeg
13792 fi
13793fi
067d23c9
KY
13794
13795
5476a9a4 13796### Use -lpng if available, unless `--with-png=no'.
7c61eaab 13797### mingw32 doesn't use -lpng, since it loads the library dynamically.
5476a9a4
GM
13798HAVE_PNG=no
13799LIBPNG=
7c61eaab
GM
13800if test "${opsys}" = "mingw32"; then
13801 if test "${with_png}" != "no"; then
13802 ac_fn_c_check_header_mongrel "$LINENO" "png.h" "ac_cv_header_png_h" "$ac_includes_default"
13803if test "x$ac_cv_header_png_h" = x""yes; then :
13804 HAVE_PNG=yes
13805else
13806 HAVE_PNG=no
13807fi
13808
13809
13810 fi
13811 if test "${HAVE_PNG}" = "yes"; then
13812
13813$as_echo "#define HAVE_PNG 1" >>confdefs.h
13814
13815
13816 ac_fn_c_check_decl "$LINENO" "png_longjmp" "ac_cv_have_decl_png_longjmp" "#ifdef HAVE_LIBPNG_PNG_H
13817 # include <libpng/png.h>
13818 #else
13819 # include <png.h>
13820 #endif
13821
13822"
13823if test "x$ac_cv_have_decl_png_longjmp" = x""yes; then :
13824
13825else
13826
13827$as_echo "#define PNG_DEPSTRUCT /**/" >>confdefs.h
13828
13829fi
13830
13831 fi
13832elif test "${HAVE_X11}" = "yes" || test "${HAVE_W32}" = "yes"; then
5476a9a4
GM
13833 if test "${with_png}" != "no"; then
13834 # Debian unstable as of July 2003 has multiple libpngs, and puts png.h
13835 # in /usr/include/libpng.
13836 for ac_header in png.h libpng/png.h
13837do :
13838 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13839ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13840eval as_val=\$$as_ac_Header
13841 if test "x$as_val" = x""yes; then :
13842 cat >>confdefs.h <<_ACEOF
13843#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13844_ACEOF
13845 break
13846fi
067d23c9 13847
5476a9a4 13848done
067d23c9 13849
5476a9a4
GM
13850 if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then
13851 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_get_channels in -lpng" >&5
13852$as_echo_n "checking for png_get_channels in -lpng... " >&6; }
13853if test "${ac_cv_lib_png_png_get_channels+set}" = set; then :
13854 $as_echo_n "(cached) " >&6
13855else
13856 ac_check_lib_save_LIBS=$LIBS
13857LIBS="-lpng -lz -lm $LIBS"
13858cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13859/* end confdefs.h. */
067d23c9 13860
5476a9a4
GM
13861/* Override any GCC internal prototype to avoid an error.
13862 Use char because int might match the return type of a GCC
13863 builtin and then its argument prototype would still apply. */
13864#ifdef __cplusplus
13865extern "C"
13866#endif
13867char png_get_channels ();
13868int
13869main ()
13870{
13871return png_get_channels ();
13872 ;
13873 return 0;
13874}
13875_ACEOF
13876if ac_fn_c_try_link "$LINENO"; then :
13877 ac_cv_lib_png_png_get_channels=yes
f199cab1 13878else
5476a9a4
GM
13879 ac_cv_lib_png_png_get_channels=no
13880fi
13881rm -f core conftest.err conftest.$ac_objext \
13882 conftest$ac_exeext conftest.$ac_ext
13883LIBS=$ac_check_lib_save_LIBS
13884fi
13885{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_png_png_get_channels" >&5
13886$as_echo "$ac_cv_lib_png_png_get_channels" >&6; }
13887if test "x$ac_cv_lib_png_png_get_channels" = x""yes; then :
13888 HAVE_PNG=yes
f199cab1 13889fi
067d23c9 13890
5476a9a4
GM
13891 fi
13892 fi
7834125e 13893
5476a9a4
GM
13894 if test "${HAVE_PNG}" = "yes"; then
13895
13896$as_echo "#define HAVE_PNG 1" >>confdefs.h
13897
13898 LIBPNG="-lpng -lz -lm"
13899
13900 ac_fn_c_check_decl "$LINENO" "png_longjmp" "ac_cv_have_decl_png_longjmp" "#ifdef HAVE_LIBPNG_PNG_H
13901 # include <libpng/png.h>
13902 #else
13903 # include <png.h>
13904 #endif
13905
13906"
13907if test "x$ac_cv_have_decl_png_longjmp" = x""yes; then :
13908
13909else
7834125e 13910
5476a9a4 13911$as_echo "#define PNG_DEPSTRUCT /**/" >>confdefs.h
7834125e 13912
f199cab1 13913fi
7834125e 13914
5476a9a4
GM
13915 fi
13916fi
7834125e
GM
13917
13918
7a67e06b
GM
13919HAVE_ZLIB=no
13920LIBZ=
13921if test "${with_zlib}" != "no"; then
31593bf6
GM
13922 OLIBS=$LIBS
13923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inflateEnd" >&5
7a67e06b
GM
13924$as_echo_n "checking for library containing inflateEnd... " >&6; }
13925if test "${ac_cv_search_inflateEnd+set}" = set; then :
13926 $as_echo_n "(cached) " >&6
13927else
13928 ac_func_search_save_LIBS=$LIBS
13929cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13930/* end confdefs.h. */
13931
13932/* Override any GCC internal prototype to avoid an error.
13933 Use char because int might match the return type of a GCC
13934 builtin and then its argument prototype would still apply. */
13935#ifdef __cplusplus
13936extern "C"
13937#endif
13938char inflateEnd ();
13939int
13940main ()
13941{
13942return inflateEnd ();
13943 ;
13944 return 0;
13945}
13946_ACEOF
13947for ac_lib in '' z; do
13948 if test -z "$ac_lib"; then
13949 ac_res="none required"
13950 else
13951 ac_res=-l$ac_lib
13952 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
13953 fi
13954 if ac_fn_c_try_link "$LINENO"; then :
13955 ac_cv_search_inflateEnd=$ac_res
13956fi
13957rm -f core conftest.err conftest.$ac_objext \
13958 conftest$ac_exeext
13959 if test "${ac_cv_search_inflateEnd+set}" = set; then :
13960 break
13961fi
13962done
13963if test "${ac_cv_search_inflateEnd+set}" = set; then :
13964
13965else
13966 ac_cv_search_inflateEnd=no
13967fi
13968rm conftest.$ac_ext
13969LIBS=$ac_func_search_save_LIBS
13970fi
13971{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inflateEnd" >&5
13972$as_echo "$ac_cv_search_inflateEnd" >&6; }
13973ac_res=$ac_cv_search_inflateEnd
13974if test "$ac_res" != no; then :
13975 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13976 HAVE_ZLIB=yes
13977fi
13978
31593bf6
GM
13979 LIBS=$OLIBS
13980 case $ac_cv_search_inflateEnd in
13981 -*) LIBZ=$ac_cv_search_inflateEnd ;;
13982 esac
7a67e06b
GM
13983fi
13984if test "${HAVE_ZLIB}" = "yes"; then
13985
13986$as_echo "#define HAVE_ZLIB 1" >>confdefs.h
13987
31593bf6
GM
13988 ### mingw32 doesn't use -lz, since it loads the library dynamically.
13989 if test "${opsys}" = "mingw32"; then
13990 LIBZ=
13991 fi
7a67e06b
GM
13992fi
13993
13994
13995
5476a9a4 13996### Use -ltiff if available, unless `--with-tiff=no'.
7c61eaab 13997### mingw32 doesn't use -ltiff, since it loads the library dynamically.
5476a9a4
GM
13998HAVE_TIFF=no
13999LIBTIFF=
7c61eaab
GM
14000if test "${opsys}" = "mingw32"; then
14001 if test "${with_tiff}" != "no"; then
14002 ac_fn_c_check_header_mongrel "$LINENO" "tiffio.h" "ac_cv_header_tiffio_h" "$ac_includes_default"
14003if test "x$ac_cv_header_tiffio_h" = x""yes; then :
14004 HAVE_TIFF=yes
14005else
14006 HAVE_TIFF=no
14007fi
14008
14009
14010 fi
14011 if test "${HAVE_TIFF}" = "yes"; then
14012
14013$as_echo "#define HAVE_TIFF 1" >>confdefs.h
14014
14015 fi
14016elif test "${HAVE_X11}" = "yes" || test "${HAVE_W32}" = "yes"; then
5476a9a4
GM
14017 if test "${with_tiff}" != "no"; then
14018 ac_fn_c_check_header_mongrel "$LINENO" "tiffio.h" "ac_cv_header_tiffio_h" "$ac_includes_default"
14019if test "x$ac_cv_header_tiffio_h" = x""yes; then :
14020 tifflibs="-lz -lm"
14021 # At least one tiff package requires the jpeg library.
14022 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
14023 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIFFGetVersion in -ltiff" >&5
14024$as_echo_n "checking for TIFFGetVersion in -ltiff... " >&6; }
14025if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then :
f199cab1
GM
14026 $as_echo_n "(cached) " >&6
14027else
5476a9a4
GM
14028 ac_check_lib_save_LIBS=$LIBS
14029LIBS="-ltiff $tifflibs $LIBS"
14030cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 14031/* end confdefs.h. */
067d23c9 14032
5476a9a4
GM
14033/* Override any GCC internal prototype to avoid an error.
14034 Use char because int might match the return type of a GCC
14035 builtin and then its argument prototype would still apply. */
14036#ifdef __cplusplus
14037extern "C"
f199cab1 14038#endif
5476a9a4
GM
14039char TIFFGetVersion ();
14040int
14041main ()
14042{
14043return TIFFGetVersion ();
14044 ;
14045 return 0;
14046}
f199cab1 14047_ACEOF
5476a9a4
GM
14048if ac_fn_c_try_link "$LINENO"; then :
14049 ac_cv_lib_tiff_TIFFGetVersion=yes
f199cab1 14050else
5476a9a4 14051 ac_cv_lib_tiff_TIFFGetVersion=no
f199cab1 14052fi
5476a9a4
GM
14053rm -f core conftest.err conftest.$ac_objext \
14054 conftest$ac_exeext conftest.$ac_ext
14055LIBS=$ac_check_lib_save_LIBS
f199cab1 14056fi
5476a9a4
GM
14057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5
14058$as_echo "$ac_cv_lib_tiff_TIFFGetVersion" >&6; }
14059if test "x$ac_cv_lib_tiff_TIFFGetVersion" = x""yes; then :
14060 HAVE_TIFF=yes
f199cab1 14061fi
067d23c9 14062
5476a9a4 14063fi
067d23c9 14064
067d23c9 14065
5476a9a4 14066 fi
f199cab1 14067
5476a9a4 14068 if test "${HAVE_TIFF}" = "yes"; then
067d23c9 14069
5476a9a4 14070$as_echo "#define HAVE_TIFF 1" >>confdefs.h
067d23c9 14071
5476a9a4
GM
14072 LIBTIFF=-ltiff
14073 fi
f199cab1 14074fi
067d23c9 14075
067d23c9 14076
5476a9a4 14077### Use -lgif or -lungif if available, unless `--with-gif=no'.
7c61eaab 14078### mingw32 doesn't use -lgif/-lungif, since it loads the library dynamically.
5476a9a4
GM
14079HAVE_GIF=no
14080LIBGIF=
7c61eaab
GM
14081if test "${opsys}" = "mingw32"; then
14082 if test "${with_gif}" != "no"; then
14083 ac_fn_c_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
14084if test "x$ac_cv_header_gif_lib_h" = x""yes; then :
14085 HAVE_GIF=yes
14086else
14087 HAVE_GIF=no
14088fi
14089
14090
14091 fi
14092 if test "${HAVE_GIF}" = "yes"; then
14093
14094$as_echo "#define HAVE_GIF 1" >>confdefs.h
14095
14096 fi
14097elif test "${HAVE_X11}" = "yes" && test "${with_gif}" != "no" \
5c0255d9 14098 || test "${HAVE_W32}" = "yes"; then
5476a9a4
GM
14099 ac_fn_c_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
14100if test "x$ac_cv_header_gif_lib_h" = x""yes; then :
14101 # EGifPutExtensionLast only exists from version libungif-4.1.0b1.
14102# Earlier versions can crash Emacs.
14103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lgif" >&5
14104$as_echo_n "checking for EGifPutExtensionLast in -lgif... " >&6; }
14105if test "${ac_cv_lib_gif_EGifPutExtensionLast+set}" = set; then :
f199cab1
GM
14106 $as_echo_n "(cached) " >&6
14107else
5476a9a4
GM
14108 ac_check_lib_save_LIBS=$LIBS
14109LIBS="-lgif $LIBS"
14110cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 14111/* end confdefs.h. */
067d23c9 14112
5476a9a4
GM
14113/* Override any GCC internal prototype to avoid an error.
14114 Use char because int might match the return type of a GCC
14115 builtin and then its argument prototype would still apply. */
14116#ifdef __cplusplus
14117extern "C"
14118#endif
14119char EGifPutExtensionLast ();
f199cab1
GM
14120int
14121main ()
14122{
5476a9a4 14123return EGifPutExtensionLast ();
f199cab1
GM
14124 ;
14125 return 0;
14126}
14127_ACEOF
5476a9a4
GM
14128if ac_fn_c_try_link "$LINENO"; then :
14129 ac_cv_lib_gif_EGifPutExtensionLast=yes
f199cab1 14130else
5476a9a4 14131 ac_cv_lib_gif_EGifPutExtensionLast=no
f199cab1 14132fi
5476a9a4
GM
14133rm -f core conftest.err conftest.$ac_objext \
14134 conftest$ac_exeext conftest.$ac_ext
14135LIBS=$ac_check_lib_save_LIBS
14136fi
14137{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_EGifPutExtensionLast" >&5
14138$as_echo "$ac_cv_lib_gif_EGifPutExtensionLast" >&6; }
14139if test "x$ac_cv_lib_gif_EGifPutExtensionLast" = x""yes; then :
14140 HAVE_GIF=yes
14141else
14142 HAVE_GIF=maybe
f199cab1 14143fi
067d23c9 14144
5476a9a4
GM
14145fi
14146
14147
14148
14149 if test "$HAVE_GIF" = yes; then
14150 LIBGIF=-lgif
14151 elif test "$HAVE_GIF" = maybe; then
14152# If gif_lib.h but no libgif, try libungif.
14153 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lungif" >&5
14154$as_echo_n "checking for EGifPutExtensionLast in -lungif... " >&6; }
14155if test "${ac_cv_lib_ungif_EGifPutExtensionLast+set}" = set; then :
f199cab1
GM
14156 $as_echo_n "(cached) " >&6
14157else
5476a9a4
GM
14158 ac_check_lib_save_LIBS=$LIBS
14159LIBS="-lungif $LIBS"
14160cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 14161/* end confdefs.h. */
f199cab1 14162
5476a9a4
GM
14163/* Override any GCC internal prototype to avoid an error.
14164 Use char because int might match the return type of a GCC
14165 builtin and then its argument prototype would still apply. */
14166#ifdef __cplusplus
14167extern "C"
14168#endif
14169char EGifPutExtensionLast ();
f199cab1
GM
14170int
14171main ()
14172{
5476a9a4 14173return EGifPutExtensionLast ();
f199cab1
GM
14174 ;
14175 return 0;
14176}
14177_ACEOF
5476a9a4
GM
14178if ac_fn_c_try_link "$LINENO"; then :
14179 ac_cv_lib_ungif_EGifPutExtensionLast=yes
f199cab1 14180else
5476a9a4 14181 ac_cv_lib_ungif_EGifPutExtensionLast=no
f199cab1 14182fi
5476a9a4
GM
14183rm -f core conftest.err conftest.$ac_objext \
14184 conftest$ac_exeext conftest.$ac_ext
14185LIBS=$ac_check_lib_save_LIBS
f199cab1 14186fi
5476a9a4
GM
14187{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5
14188$as_echo "$ac_cv_lib_ungif_EGifPutExtensionLast" >&6; }
14189if test "x$ac_cv_lib_ungif_EGifPutExtensionLast" = x""yes; then :
14190 HAVE_GIF=yes
14191else
14192 HAVE_GIF=no
14193fi
14194
14195 test "$HAVE_GIF" = yes && LIBGIF=-lungif
14196 fi
14197
14198 if test "${HAVE_GIF}" = "yes"; then
14199
14200$as_echo "#define HAVE_GIF 1" >>confdefs.h
14201
14202 fi
14203fi
14204
14205
14206if test "${HAVE_X11}" = "yes"; then
14207 MISSING=""
14208 WITH_NO=""
14209 test "${with_xpm}" != "no" && test "${HAVE_XPM}" != "yes" &&
14210 MISSING="libXpm" && WITH_NO="--with-xpm=no"
14211 test "${with_jpeg}" != "no" && test "${HAVE_JPEG}" != "yes" &&
14212 MISSING="$MISSING libjpeg" && WITH_NO="$WITH_NO --with-jpeg=no"
14213 test "${with_png}" != "no" && test "${HAVE_PNG}" != "yes" &&
14214 MISSING="$MISSING libpng" && WITH_NO="$WITH_NO --with-png=no"
14215 test "${with_gif}" != "no" && test "${HAVE_GIF}" != "yes" &&
14216 MISSING="$MISSING libgif/libungif" && WITH_NO="$WITH_NO --with-gif=no"
14217 test "${with_tiff}" != "no" && test "${HAVE_TIFF}" != "yes" &&
14218 MISSING="$MISSING libtiff" && WITH_NO="$WITH_NO --with-tiff=no"
14219
14220 if test "X${MISSING}" != X; then
14221 as_fn_error "The following required libraries were not found:
14222 $MISSING
14223Maybe some development libraries/packages are missing?
14224If you don't want to link with them give
14225 $WITH_NO
14226as options to configure" "$LINENO" 5
14227 fi
14228fi
14229
14230### Use -lgpm if available, unless `--with-gpm=no'.
14231HAVE_GPM=no
14232LIBGPM=
14233if test "${with_gpm}" != "no"; then
14234 ac_fn_c_check_header_mongrel "$LINENO" "gpm.h" "ac_cv_header_gpm_h" "$ac_includes_default"
14235if test "x$ac_cv_header_gpm_h" = x""yes; then :
14236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Gpm_Open in -lgpm" >&5
14237$as_echo_n "checking for Gpm_Open in -lgpm... " >&6; }
14238if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then :
067d23c9
KY
14239 $as_echo_n "(cached) " >&6
14240else
5476a9a4
GM
14241 ac_check_lib_save_LIBS=$LIBS
14242LIBS="-lgpm $LIBS"
14243cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
14244/* end confdefs.h. */
14245
5476a9a4
GM
14246/* Override any GCC internal prototype to avoid an error.
14247 Use char because int might match the return type of a GCC
14248 builtin and then its argument prototype would still apply. */
14249#ifdef __cplusplus
14250extern "C"
14251#endif
14252char Gpm_Open ();
067d23c9
KY
14253int
14254main ()
14255{
5476a9a4 14256return Gpm_Open ();
067d23c9
KY
14257 ;
14258 return 0;
14259}
14260_ACEOF
5476a9a4
GM
14261if ac_fn_c_try_link "$LINENO"; then :
14262 ac_cv_lib_gpm_Gpm_Open=yes
067d23c9 14263else
5476a9a4 14264 ac_cv_lib_gpm_Gpm_Open=no
067d23c9 14265fi
5476a9a4
GM
14266rm -f core conftest.err conftest.$ac_objext \
14267 conftest$ac_exeext conftest.$ac_ext
14268LIBS=$ac_check_lib_save_LIBS
14269fi
14270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gpm_Gpm_Open" >&5
14271$as_echo "$ac_cv_lib_gpm_Gpm_Open" >&6; }
14272if test "x$ac_cv_lib_gpm_Gpm_Open" = x""yes; then :
14273 HAVE_GPM=yes
067d23c9 14274fi
f199cab1 14275
5476a9a4 14276fi
f199cab1 14277
f199cab1 14278
f199cab1 14279
5476a9a4 14280 if test "${HAVE_GPM}" = "yes"; then
f199cab1 14281
5476a9a4 14282$as_echo "#define HAVE_GPM 1" >>confdefs.h
f199cab1 14283
5476a9a4
GM
14284 LIBGPM=-lgpm
14285 fi
067d23c9 14286fi
067d23c9
KY
14287
14288
14289
14290
14291
14292
5476a9a4
GM
14293GNUSTEP_CFLAGS=
14294### Use NeXTstep API to implement GUI.
14295if test "${HAVE_NS}" = "yes"; then
067d23c9 14296
5476a9a4 14297$as_echo "#define HAVE_NS 1" >>confdefs.h
067d23c9 14298
5476a9a4 14299 if test "${NS_IMPL_COCOA}" = "yes"; then
067d23c9 14300
5476a9a4 14301$as_echo "#define NS_IMPL_COCOA 1" >>confdefs.h
f199cab1 14302
5476a9a4
GM
14303 fi
14304 if test "${NS_IMPL_GNUSTEP}" = "yes"; then
f199cab1 14305
5476a9a4 14306$as_echo "#define NS_IMPL_GNUSTEP 1" >>confdefs.h
f199cab1 14307
5476a9a4
GM
14308 # See also .m.o rule in Makefile.in */
14309 # FIXME: are all these flags really needed? Document here why. */
14310 GNUSTEP_CFLAGS="-D_REENTRANT -fPIC -fno-strict-aliasing -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
14311 ## Extra CFLAGS applied to src/*.m files.
14312 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"
14313 fi
14314 # We also have mouse menus.
14315 HAVE_MENUS=yes
14316 OTHER_FILES=ns-app
14317fi
f199cab1 14318
5c0255d9
GM
14319if test "${HAVE_W32}" = "yes"; then
14320 HAVE_MENUS=yes
14321fi
f199cab1 14322
5476a9a4
GM
14323### Use session management (-lSM -lICE) if available
14324HAVE_X_SM=no
14325LIBXSM=
14326if test "${HAVE_X11}" = "yes"; then
14327 ac_fn_c_check_header_mongrel "$LINENO" "X11/SM/SMlib.h" "ac_cv_header_X11_SM_SMlib_h" "$ac_includes_default"
14328if test "x$ac_cv_header_X11_SM_SMlib_h" = x""yes; then :
14329 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SmcOpenConnection in -lSM" >&5
14330$as_echo_n "checking for SmcOpenConnection in -lSM... " >&6; }
14331if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then :
067d23c9
KY
14332 $as_echo_n "(cached) " >&6
14333else
5476a9a4
GM
14334 ac_check_lib_save_LIBS=$LIBS
14335LIBS="-lSM -lICE $LIBS"
14336cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
14337/* end confdefs.h. */
14338
5476a9a4
GM
14339/* Override any GCC internal prototype to avoid an error.
14340 Use char because int might match the return type of a GCC
14341 builtin and then its argument prototype would still apply. */
14342#ifdef __cplusplus
14343extern "C"
14344#endif
14345char SmcOpenConnection ();
f199cab1
GM
14346int
14347main ()
14348{
5476a9a4
GM
14349return SmcOpenConnection ();
14350 ;
14351 return 0;
f199cab1 14352}
067d23c9 14353_ACEOF
5476a9a4
GM
14354if ac_fn_c_try_link "$LINENO"; then :
14355 ac_cv_lib_SM_SmcOpenConnection=yes
067d23c9 14356else
5476a9a4 14357 ac_cv_lib_SM_SmcOpenConnection=no
f199cab1 14358fi
5476a9a4
GM
14359rm -f core conftest.err conftest.$ac_objext \
14360 conftest$ac_exeext conftest.$ac_ext
14361LIBS=$ac_check_lib_save_LIBS
14362fi
14363{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_SM_SmcOpenConnection" >&5
14364$as_echo "$ac_cv_lib_SM_SmcOpenConnection" >&6; }
14365if test "x$ac_cv_lib_SM_SmcOpenConnection" = x""yes; then :
14366 HAVE_X_SM=yes
067d23c9 14367fi
067d23c9 14368
f199cab1 14369fi
f199cab1 14370
f199cab1 14371
067d23c9 14372
5476a9a4
GM
14373 if test "${HAVE_X_SM}" = "yes"; then
14374
14375$as_echo "#define HAVE_X_SM 1" >>confdefs.h
14376
14377 LIBXSM="-lSM -lICE"
14378 case "$LIBS" in
14379 *-lSM*) ;;
14380 *) LIBS="$LIBXSM $LIBS" ;;
14381 esac
067d23c9 14382 fi
5476a9a4 14383fi
067d23c9 14384
067d23c9 14385
910833ae
GM
14386### Use XRandr (-lXrandr) if available
14387HAVE_XRANDR=no
14388if test "${HAVE_X11}" = "yes"; then
14389 XRANDR_REQUIRED=1.2.2
14390 XRANDR_MODULES="xrandr >= $XRANDR_REQUIRED"
14391
14392 succeeded=no
14393
14394 if test "$PKG_CONFIG" = "no" ; then
14395 HAVE_XRANDR=no
14396 else
14397 PKG_CONFIG_MIN_VERSION=0.9.0
14398 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
14399 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $XRANDR_MODULES" >&5
14400$as_echo_n "checking for $XRANDR_MODULES... " >&6; }
14401
14402 if "$PKG_CONFIG" --exists "$XRANDR_MODULES" 2>&5 &&
14403 XRANDR_CFLAGS=`"$PKG_CONFIG" --cflags "$XRANDR_MODULES" 2>&5` &&
14404 XRANDR_LIBS=`"$PKG_CONFIG" --libs "$XRANDR_MODULES" 2>&5`; then
14405 edit_cflags="
14406 s,///*,/,g
14407 s/^/ /
14408 s/ -I/ $isystem/g
14409 s/^ //
14410 "
14411 XRANDR_CFLAGS=`$as_echo "$XRANDR_CFLAGS" | sed -e "$edit_cflags"`
14412 XRANDR_LIBS=`$as_echo "$XRANDR_LIBS" | sed -e 's,///*,/,g'`
14413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$XRANDR_CFLAGS' LIBS='$XRANDR_LIBS'" >&5
14414$as_echo "yes CFLAGS='$XRANDR_CFLAGS' LIBS='$XRANDR_LIBS'" >&6; }
14415 succeeded=yes
14416 else
14417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14418$as_echo "no" >&6; }
14419 XRANDR_CFLAGS=""
14420 XRANDR_LIBS=""
14421 ## If we have a custom action on failure, don't print errors, but
14422 ## do set a variable so people can do so. Do it in a subshell
14423 ## to capture any diagnostics in invoking pkg-config.
14424 XRANDR_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$XRANDR_MODULES") 2>&1`
14425
14426 fi
14427
14428
14429
14430 else
14431 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
14432 echo "*** See http://www.freedesktop.org/software/pkgconfig"
14433 fi
14434 fi
14435
14436 if test $succeeded = yes; then
14437 HAVE_XRANDR=yes
14438 else
14439 HAVE_XRANDR=no
14440 fi
14441
14442 if test $HAVE_XRANDR = no; then
14443 # Test old way in case pkg-config doesn't have it (older machines).
14444 ac_fn_c_check_header_mongrel "$LINENO" "X11/extensions/Xrandr.h" "ac_cv_header_X11_extensions_Xrandr_h" "$ac_includes_default"
14445if test "x$ac_cv_header_X11_extensions_Xrandr_h" = x""yes; then :
c31effdb
GM
14446 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRRGetScreenResources in -lXrandr" >&5
14447$as_echo_n "checking for XRRGetScreenResources in -lXrandr... " >&6; }
14448if test "${ac_cv_lib_Xrandr_XRRGetScreenResources+set}" = set; then :
910833ae
GM
14449 $as_echo_n "(cached) " >&6
14450else
14451 ac_check_lib_save_LIBS=$LIBS
14452LIBS="-lXrandr $LIBS"
14453cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14454/* end confdefs.h. */
14455
14456/* Override any GCC internal prototype to avoid an error.
14457 Use char because int might match the return type of a GCC
14458 builtin and then its argument prototype would still apply. */
14459#ifdef __cplusplus
14460extern "C"
14461#endif
c31effdb 14462char XRRGetScreenResources ();
910833ae
GM
14463int
14464main ()
14465{
c31effdb 14466return XRRGetScreenResources ();
910833ae
GM
14467 ;
14468 return 0;
14469}
14470_ACEOF
14471if ac_fn_c_try_link "$LINENO"; then :
c31effdb 14472 ac_cv_lib_Xrandr_XRRGetScreenResources=yes
910833ae 14473else
c31effdb 14474 ac_cv_lib_Xrandr_XRRGetScreenResources=no
910833ae
GM
14475fi
14476rm -f core conftest.err conftest.$ac_objext \
14477 conftest$ac_exeext conftest.$ac_ext
14478LIBS=$ac_check_lib_save_LIBS
14479fi
c31effdb
GM
14480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrandr_XRRGetScreenResources" >&5
14481$as_echo "$ac_cv_lib_Xrandr_XRRGetScreenResources" >&6; }
14482if test "x$ac_cv_lib_Xrandr_XRRGetScreenResources" = x""yes; then :
910833ae
GM
14483 HAVE_XRANDR=yes
14484fi
14485
14486fi
14487
14488
14489 if test $HAVE_XRANDR = yes; then
14490 XRANDR_LIBS=-lXrandr
14491
14492 fi
14493 fi
14494 if test $HAVE_XRANDR = yes; then
14495 SAVE_CFLAGS="$CFLAGS"
14496 SAVE_LIBS="$LIBS"
14497 CFLAGS="$XRANDR_CFLAGS $CFLAGS"
14498 LIBS="$XRANDR_LIBS $LIBS"
14499 for ac_func in XRRGetOutputPrimary XRRGetScreenResourcesCurrent
14500do :
14501 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14502ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14503eval as_val=\$$as_ac_var
14504 if test "x$as_val" = x""yes; then :
14505 cat >>confdefs.h <<_ACEOF
14506#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14507_ACEOF
14508
14509fi
14510done
14511
14512 CFLAGS="$SAVE_CFLAGS"
14513 LIBS="$SAVE_LIBS"
14514
14515
14516$as_echo "#define HAVE_XRANDR 1" >>confdefs.h
14517
14518 fi
14519fi
14520
14521### Use Xinerama (-lXinerama) if available
14522HAVE_XINERAMA=no
14523if test "${HAVE_X11}" = "yes"; then
14524 XINERAMA_REQUIRED=1.0.2
14525 XINERAMA_MODULES="xinerama >= $XINERAMA_REQUIRED"
14526
14527 succeeded=no
14528
14529 if test "$PKG_CONFIG" = "no" ; then
14530 HAVE_XINERAMA=no
14531 else
14532 PKG_CONFIG_MIN_VERSION=0.9.0
14533 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
14534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $XINERAMA_MODULES" >&5
14535$as_echo_n "checking for $XINERAMA_MODULES... " >&6; }
14536
14537 if "$PKG_CONFIG" --exists "$XINERAMA_MODULES" 2>&5 &&
14538 XINERAMA_CFLAGS=`"$PKG_CONFIG" --cflags "$XINERAMA_MODULES" 2>&5` &&
14539 XINERAMA_LIBS=`"$PKG_CONFIG" --libs "$XINERAMA_MODULES" 2>&5`; then
14540 edit_cflags="
14541 s,///*,/,g
14542 s/^/ /
14543 s/ -I/ $isystem/g
14544 s/^ //
14545 "
14546 XINERAMA_CFLAGS=`$as_echo "$XINERAMA_CFLAGS" | sed -e "$edit_cflags"`
14547 XINERAMA_LIBS=`$as_echo "$XINERAMA_LIBS" | sed -e 's,///*,/,g'`
14548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$XINERAMA_CFLAGS' LIBS='$XINERAMA_LIBS'" >&5
14549$as_echo "yes CFLAGS='$XINERAMA_CFLAGS' LIBS='$XINERAMA_LIBS'" >&6; }
14550 succeeded=yes
14551 else
14552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14553$as_echo "no" >&6; }
14554 XINERAMA_CFLAGS=""
14555 XINERAMA_LIBS=""
14556 ## If we have a custom action on failure, don't print errors, but
14557 ## do set a variable so people can do so. Do it in a subshell
14558 ## to capture any diagnostics in invoking pkg-config.
14559 XINERAMA_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "$XINERAMA_MODULES") 2>&1`
14560
14561 fi
14562
14563
14564
14565 else
14566 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
14567 echo "*** See http://www.freedesktop.org/software/pkgconfig"
14568 fi
14569 fi
14570
14571 if test $succeeded = yes; then
14572 HAVE_XINERAMA=yes
14573 else
14574 HAVE_XINERAMA=no
14575 fi
14576
14577 if test $HAVE_XINERAMA = no; then
14578 # Test old way in case pkg-config doesn't have it (older machines).
14579 ac_fn_c_check_header_mongrel "$LINENO" "X11/extensions/Xinerama.h" "ac_cv_header_X11_extensions_Xinerama_h" "$ac_includes_default"
14580if test "x$ac_cv_header_X11_extensions_Xinerama_h" = x""yes; then :
14581 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XineramaQueryExtension in -lXinerama" >&5
14582$as_echo_n "checking for XineramaQueryExtension in -lXinerama... " >&6; }
14583if test "${ac_cv_lib_Xinerama_XineramaQueryExtension+set}" = set; then :
14584 $as_echo_n "(cached) " >&6
14585else
14586 ac_check_lib_save_LIBS=$LIBS
14587LIBS="-lXinerama $LIBS"
14588cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14589/* end confdefs.h. */
14590
14591/* Override any GCC internal prototype to avoid an error.
14592 Use char because int might match the return type of a GCC
14593 builtin and then its argument prototype would still apply. */
14594#ifdef __cplusplus
14595extern "C"
14596#endif
14597char XineramaQueryExtension ();
14598int
14599main ()
14600{
14601return XineramaQueryExtension ();
14602 ;
14603 return 0;
14604}
14605_ACEOF
14606if ac_fn_c_try_link "$LINENO"; then :
14607 ac_cv_lib_Xinerama_XineramaQueryExtension=yes
14608else
14609 ac_cv_lib_Xinerama_XineramaQueryExtension=no
14610fi
14611rm -f core conftest.err conftest.$ac_objext \
14612 conftest$ac_exeext conftest.$ac_ext
14613LIBS=$ac_check_lib_save_LIBS
14614fi
14615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xinerama_XineramaQueryExtension" >&5
14616$as_echo "$ac_cv_lib_Xinerama_XineramaQueryExtension" >&6; }
14617if test "x$ac_cv_lib_Xinerama_XineramaQueryExtension" = x""yes; then :
14618 HAVE_XINERAMA=yes
14619fi
14620
14621fi
14622
14623
14624 if test $HAVE_XINERAMA = yes; then
14625 XINERAMA_LIBS=-lXinerama
14626
14627 fi
14628 fi
14629 if test $HAVE_XINERAMA = yes; then
14630
14631$as_echo "#define HAVE_XINERAMA 1" >>confdefs.h
14632
14633 fi
14634fi
14635
14636
5476a9a4 14637### Use libxml (-lxml2) if available
7c61eaab 14638### mingw32 doesn't use -lxml2, since it loads the library dynamically.
5476a9a4
GM
14639HAVE_LIBXML2=no
14640if test "${with_xml2}" != "no"; then
14641 ### I'm not sure what the version number should be, so I just guessed.
067d23c9 14642
5476a9a4 14643 succeeded=no
067d23c9 14644
5476a9a4
GM
14645 if test "$PKG_CONFIG" = "no" ; then
14646 HAVE_LIBXML2=no
14647 else
14648 PKG_CONFIG_MIN_VERSION=0.9.0
b5591ebb 14649 if "$PKG_CONFIG" --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5476a9a4
GM
14650 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxml-2.0 > 2.6.17" >&5
14651$as_echo_n "checking for libxml-2.0 > 2.6.17... " >&6; }
067d23c9 14652
b5591ebb
GM
14653 if "$PKG_CONFIG" --exists "libxml-2.0 > 2.6.17" 2>&5 &&
14654 LIBXML2_CFLAGS=`"$PKG_CONFIG" --cflags "libxml-2.0 > 2.6.17" 2>&5` &&
14655 LIBXML2_LIBS=`"$PKG_CONFIG" --libs "libxml-2.0 > 2.6.17" 2>&5`; then
5476a9a4
GM
14656 edit_cflags="
14657 s,///*,/,g
14658 s/^/ /
14659 s/ -I/ $isystem/g
14660 s/^ //
14661 "
14662 LIBXML2_CFLAGS=`$as_echo "$LIBXML2_CFLAGS" | sed -e "$edit_cflags"`
14663 LIBXML2_LIBS=`$as_echo "$LIBXML2_LIBS" | sed -e 's,///*,/,g'`
14664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBXML2_CFLAGS' LIBS='$LIBXML2_LIBS'" >&5
14665$as_echo "yes CFLAGS='$LIBXML2_CFLAGS' LIBS='$LIBXML2_LIBS'" >&6; }
14666 succeeded=yes
14667 else
14668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14669$as_echo "no" >&6; }
14670 LIBXML2_CFLAGS=""
14671 LIBXML2_LIBS=""
14672 ## If we have a custom action on failure, don't print errors, but
e2d8f316
GM
14673 ## do set a variable so people can do so. Do it in a subshell
14674 ## to capture any diagnostics in invoking pkg-config.
b5591ebb 14675 LIBXML2_PKG_ERRORS=`("$PKG_CONFIG" --print-errors "libxml-2.0 > 2.6.17") 2>&1`
5476a9a4
GM
14676
14677 fi
14678
14679
14680
14681 else
14682 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
14683 echo "*** See http://www.freedesktop.org/software/pkgconfig"
14684 fi
14685 fi
14686
14687 if test $succeeded = yes; then
14688 HAVE_LIBXML2=yes
14689 else
14690 HAVE_LIBXML2=no
14691 fi
14692
4628c0bf
GM
14693 # Built-in libxml2 on OS X 10.8 lacks libxml-2.0.pc.
14694 if test "${HAVE_LIBXML2}" != "yes" -a "$opsys" = "darwin"; then
14695 SAVE_CPPFLAGS="$CPPFLAGS"
14696 CPPFLAGS="$CPPFLAGS -I/usr/include/libxml2"
14697 ac_fn_c_check_header_mongrel "$LINENO" "libxml/HTMLparser.h" "ac_cv_header_libxml_HTMLparser_h" "$ac_includes_default"
14698if test "x$ac_cv_header_libxml_HTMLparser_h" = x""yes; then :
14699 ac_fn_c_check_decl "$LINENO" "HTML_PARSE_RECOVER" "ac_cv_have_decl_HTML_PARSE_RECOVER" "#include <libxml/HTMLparser.h>
14700"
14701if test "x$ac_cv_have_decl_HTML_PARSE_RECOVER" = x""yes; then :
14702 HAVE_LIBXML2=yes
14703fi
14704
14705fi
14706
14707
14708 CPPFLAGS="$SAVE_CPPFLAGS"
14709 if test "${HAVE_LIBXML2}" = "yes"; then
14710 LIBXML2_LIBS="-lxml2"
14711 LIBXML2_CFLAGS="-I/usr/include/libxml2"
14712 fi
14713 fi
5476a9a4 14714 if test "${HAVE_LIBXML2}" = "yes"; then
7c61eaab
GM
14715 if test "${opsys}" != "mingw32"; then
14716 LIBS="$LIBXML2_LIBS $LIBS"
14717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for htmlReadMemory in -lxml2" >&5
5476a9a4
GM
14718$as_echo_n "checking for htmlReadMemory in -lxml2... " >&6; }
14719if test "${ac_cv_lib_xml2_htmlReadMemory+set}" = set; then :
067d23c9
KY
14720 $as_echo_n "(cached) " >&6
14721else
5476a9a4
GM
14722 ac_check_lib_save_LIBS=$LIBS
14723LIBS="-lxml2 $LIBS"
14724cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
14725/* end confdefs.h. */
14726
5476a9a4
GM
14727/* Override any GCC internal prototype to avoid an error.
14728 Use char because int might match the return type of a GCC
14729 builtin and then its argument prototype would still apply. */
14730#ifdef __cplusplus
14731extern "C"
14732#endif
14733char htmlReadMemory ();
067d23c9
KY
14734int
14735main ()
14736{
5476a9a4 14737return htmlReadMemory ();
067d23c9
KY
14738 ;
14739 return 0;
14740}
14741_ACEOF
5476a9a4
GM
14742if ac_fn_c_try_link "$LINENO"; then :
14743 ac_cv_lib_xml2_htmlReadMemory=yes
067d23c9 14744else
5476a9a4 14745 ac_cv_lib_xml2_htmlReadMemory=no
067d23c9 14746fi
5476a9a4
GM
14747rm -f core conftest.err conftest.$ac_objext \
14748 conftest$ac_exeext conftest.$ac_ext
14749LIBS=$ac_check_lib_save_LIBS
14750fi
14751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_htmlReadMemory" >&5
14752$as_echo "$ac_cv_lib_xml2_htmlReadMemory" >&6; }
14753if test "x$ac_cv_lib_xml2_htmlReadMemory" = x""yes; then :
14754 HAVE_LIBXML2=yes
14755else
14756 HAVE_LIBXML2=no
067d23c9
KY
14757fi
14758
7c61eaab
GM
14759 else
14760 LIBXML2_LIBS=""
14761 fi
5476a9a4 14762 if test "${HAVE_LIBXML2}" = "yes"; then
067d23c9 14763
5476a9a4 14764$as_echo "#define HAVE_LIBXML2 1" >>confdefs.h
067d23c9 14765
5476a9a4
GM
14766 else
14767 LIBXML2_LIBS=""
14768 LIBXML2_CFLAGS=""
14769 fi
067d23c9 14770 fi
5476a9a4 14771fi
067d23c9 14772
067d23c9 14773
067d23c9 14774
5476a9a4 14775# If netdb.h doesn't declare h_errno, we must declare it by hand.
7c61eaab
GM
14776# On MinGW, that is provided by nt/inc/sys/socket.h and w32.c.
14777if test "${opsys}" = "mingw32"; then
14778 emacs_cv_netdb_declares_h_errno=yes
14779fi
5476a9a4
GM
14780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether netdb declares h_errno" >&5
14781$as_echo_n "checking whether netdb declares h_errno... " >&6; }
14782if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then :
14783 $as_echo_n "(cached) " >&6
067d23c9 14784else
5476a9a4
GM
14785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14786/* end confdefs.h. */
14787#include <netdb.h>
14788int
14789main ()
14790{
14791return h_errno;
14792 ;
14793 return 0;
14794}
14795_ACEOF
14796if ac_fn_c_try_link "$LINENO"; then :
14797 emacs_cv_netdb_declares_h_errno=yes
14798else
14799 emacs_cv_netdb_declares_h_errno=no
067d23c9 14800fi
5476a9a4
GM
14801rm -f core conftest.err conftest.$ac_objext \
14802 conftest$ac_exeext conftest.$ac_ext
14803fi
14804{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_netdb_declares_h_errno" >&5
14805$as_echo "$emacs_cv_netdb_declares_h_errno" >&6; }
14806if test $emacs_cv_netdb_declares_h_errno = yes; then
067d23c9 14807
5476a9a4 14808$as_echo "#define HAVE_H_ERRNO 1" >>confdefs.h
f199cab1 14809
5476a9a4 14810fi
f199cab1 14811
2c98a625 14812# sqrt and other floating-point functions such as fmod and frexp
7c61eaab
GM
14813# are found in -lm on most systems, but mingw32 doesn't use -lm.
14814if test "${opsys}" != "mingw32"; then
14815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5
5476a9a4
GM
14816$as_echo_n "checking for sqrt in -lm... " >&6; }
14817if test "${ac_cv_lib_m_sqrt+set}" = set; then :
14818 $as_echo_n "(cached) " >&6
14819else
14820 ac_check_lib_save_LIBS=$LIBS
14821LIBS="-lm $LIBS"
14822cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14823/* end confdefs.h. */
f199cab1 14824
5476a9a4
GM
14825/* Override any GCC internal prototype to avoid an error.
14826 Use char because int might match the return type of a GCC
14827 builtin and then its argument prototype would still apply. */
14828#ifdef __cplusplus
14829extern "C"
14830#endif
14831char sqrt ();
14832int
14833main ()
14834{
14835return sqrt ();
14836 ;
14837 return 0;
14838}
14839_ACEOF
14840if ac_fn_c_try_link "$LINENO"; then :
14841 ac_cv_lib_m_sqrt=yes
14842else
14843 ac_cv_lib_m_sqrt=no
14844fi
14845rm -f core conftest.err conftest.$ac_objext \
14846 conftest$ac_exeext conftest.$ac_ext
14847LIBS=$ac_check_lib_save_LIBS
14848fi
14849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sqrt" >&5
14850$as_echo "$ac_cv_lib_m_sqrt" >&6; }
14851if test "x$ac_cv_lib_m_sqrt" = x""yes; then :
14852 cat >>confdefs.h <<_ACEOF
14853#define HAVE_LIBM 1
14854_ACEOF
f199cab1 14855
5476a9a4 14856 LIBS="-lm $LIBS"
f199cab1 14857
5476a9a4 14858fi
f199cab1 14859
7c61eaab 14860fi
f199cab1 14861
5476a9a4
GM
14862# Check for mail-locking functions in a "mail" library. Probably this should
14863# have the same check as for liblockfile below.
14864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -lmail" >&5
14865$as_echo_n "checking for maillock in -lmail... " >&6; }
14866if test "${ac_cv_lib_mail_maillock+set}" = set; then :
067d23c9
KY
14867 $as_echo_n "(cached) " >&6
14868else
5476a9a4
GM
14869 ac_check_lib_save_LIBS=$LIBS
14870LIBS="-lmail $LIBS"
14871cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
14872/* end confdefs.h. */
14873
5476a9a4
GM
14874/* Override any GCC internal prototype to avoid an error.
14875 Use char because int might match the return type of a GCC
14876 builtin and then its argument prototype would still apply. */
14877#ifdef __cplusplus
14878extern "C"
067d23c9 14879#endif
5476a9a4
GM
14880char maillock ();
14881int
14882main ()
14883{
14884return maillock ();
14885 ;
14886 return 0;
14887}
067d23c9 14888_ACEOF
5476a9a4
GM
14889if ac_fn_c_try_link "$LINENO"; then :
14890 ac_cv_lib_mail_maillock=yes
067d23c9 14891else
5476a9a4 14892 ac_cv_lib_mail_maillock=no
067d23c9 14893fi
5476a9a4
GM
14894rm -f core conftest.err conftest.$ac_objext \
14895 conftest$ac_exeext conftest.$ac_ext
14896LIBS=$ac_check_lib_save_LIBS
067d23c9 14897fi
5476a9a4
GM
14898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mail_maillock" >&5
14899$as_echo "$ac_cv_lib_mail_maillock" >&6; }
14900if test "x$ac_cv_lib_mail_maillock" = x""yes; then :
14901 have_mail=yes
f199cab1 14902else
5476a9a4 14903 have_mail=no
067d23c9
KY
14904fi
14905
5476a9a4
GM
14906if test $have_mail = yes; then
14907 LIBS_MAIL=-lmail
14908 LIBS="$LIBS_MAIL $LIBS"
067d23c9 14909
5476a9a4 14910$as_echo "#define HAVE_LIBMAIL 1" >>confdefs.h
067d23c9 14911
5476a9a4
GM
14912else
14913 LIBS_MAIL=
14914fi
14915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -llockfile" >&5
14916$as_echo_n "checking for maillock in -llockfile... " >&6; }
14917if test "${ac_cv_lib_lockfile_maillock+set}" = set; then :
067d23c9
KY
14918 $as_echo_n "(cached) " >&6
14919else
5476a9a4
GM
14920 ac_check_lib_save_LIBS=$LIBS
14921LIBS="-llockfile $LIBS"
067d23c9
KY
14922cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14923/* end confdefs.h. */
14924
14925/* Override any GCC internal prototype to avoid an error.
14926 Use char because int might match the return type of a GCC
14927 builtin and then its argument prototype would still apply. */
14928#ifdef __cplusplus
14929extern "C"
14930#endif
5476a9a4 14931char maillock ();
067d23c9
KY
14932int
14933main ()
14934{
5476a9a4 14935return maillock ();
067d23c9
KY
14936 ;
14937 return 0;
14938}
14939_ACEOF
5476a9a4
GM
14940if ac_fn_c_try_link "$LINENO"; then :
14941 ac_cv_lib_lockfile_maillock=yes
14942else
14943 ac_cv_lib_lockfile_maillock=no
067d23c9
KY
14944fi
14945rm -f core conftest.err conftest.$ac_objext \
5476a9a4
GM
14946 conftest$ac_exeext conftest.$ac_ext
14947LIBS=$ac_check_lib_save_LIBS
067d23c9 14948fi
5476a9a4
GM
14949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lockfile_maillock" >&5
14950$as_echo "$ac_cv_lib_lockfile_maillock" >&6; }
14951if test "x$ac_cv_lib_lockfile_maillock" = x""yes; then :
14952 have_lockfile=yes
067d23c9 14953else
5476a9a4 14954 have_lockfile=no
f199cab1
GM
14955fi
14956
5476a9a4
GM
14957if test $have_lockfile = yes; then
14958 LIBS_MAIL=-llockfile
14959 LIBS="$LIBS_MAIL $LIBS"
067d23c9 14960
5476a9a4 14961$as_echo "#define HAVE_LIBLOCKFILE 1" >>confdefs.h
067d23c9 14962
5476a9a4
GM
14963else
14964# If we have the shared liblockfile, assume we must use it for mail
14965# locking (e.g. Debian). If we couldn't link against liblockfile
14966# (no liblockfile.a installed), ensure that we don't need to.
14967 # Extract the first word of "liblockfile.so", so it can be a program name with args.
14968set dummy liblockfile.so; ac_word=$2
14969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14970$as_echo_n "checking for $ac_word... " >&6; }
14971if test "${ac_cv_prog_liblockfile+set}" = set; then :
14972 $as_echo_n "(cached) " >&6
14973else
14974 if test -n "$liblockfile"; then
14975 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
14976else
14977as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14978as_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
14979for as_dir in $as_dummy
14980do
14981 IFS=$as_save_IFS
14982 test -z "$as_dir" && as_dir=.
14983 for ac_exec_ext in '' $ac_executable_extensions; do
14984 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
14985 ac_cv_prog_liblockfile="yes"
14986 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14987 break 2
14988 fi
14989done
14990 done
14991IFS=$as_save_IFS
067d23c9 14992
5476a9a4
GM
14993 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
14994fi
14995fi
14996liblockfile=$ac_cv_prog_liblockfile
14997if test -n "$liblockfile"; then
14998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $liblockfile" >&5
14999$as_echo "$liblockfile" >&6; }
15000else
15001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15002$as_echo "no" >&6; }
15003fi
067d23c9 15004
067d23c9 15005
5476a9a4
GM
15006 if test $ac_cv_prog_liblockfile = yes; then
15007 as_fn_error "Shared liblockfile found but can't link against it.
15008This probably means that movemail could lose mail.
15009There may be a \`development' package to install containing liblockfile." "$LINENO" 5
15010 fi
15011fi
067d23c9 15012
067d23c9 15013
067d23c9 15014
067d23c9
KY
15015
15016
5476a9a4
GM
15017## Define MAIL_USE_FLOCK (or LOCKF) if the mailer uses flock (or lockf) to
15018## interlock access to the mail spool. The alternative is a lock file named
15019## /usr/spool/mail/$USER.lock.
15020mail_lock=no
15021case "$opsys" in
15022 aix4-2) mail_lock="lockf" ;;
067d23c9 15023
87e1a811 15024 gnu|freebsd|dragonfly|netbsd|openbsd|darwin|irix6-5) mail_lock="flock" ;;
067d23c9 15025
5476a9a4
GM
15026 ## On GNU/Linux systems, both methods are used by various mail programs.
15027 ## I assume most people are using newer mailers that have heard of flock.
15028 ## Change this if you need to.
15029 ## Debian contains a patch which says: ``On Debian/GNU/Linux systems,
15030 ## configure gets the right answers, and that means *NOT* using flock.
15031 ## Using flock is guaranteed to be the wrong thing. See Debian Policy
15032 ## for details.'' and then uses `#ifdef DEBIAN'. Unfortunately the
15033 ## Debian maintainer hasn't provided a clean fix for Emacs.
15034 ## movemail.c will use `maillock' when MAILDIR, HAVE_LIBMAIL and
15035 ## HAVE_MAILLOCK_H are defined, so the following appears to be the
15036 ## correct logic. -- fx
15037 ## We must check for HAVE_LIBLOCKFILE too, as movemail does.
15038 ## liblockfile is a Free Software replacement for libmail, used on
15039 ## Debian systems and elsewhere. -rfr.
15040 gnu-*)
15041 mail_lock="flock"
15042 if test $have_mail = yes || test $have_lockfile = yes; then
15043 test $ac_cv_header_maillock_h = yes && mail_lock=no
15044 fi
15045 ;;
7c61eaab
GM
15046
15047 mingw32)
15048 mail_lock="none-needed" ;;
5476a9a4 15049esac
f199cab1 15050
5476a9a4
GM
15051BLESSMAIL_TARGET=
15052case "$mail_lock" in
15053 flock)
15054$as_echo "#define MAIL_USE_FLOCK 1" >>confdefs.h
15055 ;;
f199cab1 15056
5476a9a4
GM
15057 lockf)
15058$as_echo "#define MAIL_USE_LOCKF 1" >>confdefs.h
15059 ;;
f199cab1 15060
7c61eaab
GM
15061 none-needed) ;;
15062
5476a9a4
GM
15063 *) BLESSMAIL_TARGET="need-blessmail" ;;
15064esac
f199cab1
GM
15065
15066
15067
0cdca42a 15068for ac_func in accept4 gethostname \
e7d0e5ee 15069getrusage get_current_dir_name \
eda33f78 15070lrand48 \
a455a5ce 15071select getpagesize setlocale \
db7863f4 15072getrlimit setrlimit shutdown getaddrinfo \
eda33f78 15073strsignal setitimer \
5476a9a4 15074sendto recvfrom getsockname getpeername getifaddrs freeifaddrs \
e412eb97 15075gai_strerror getline getdelim sync \
5476a9a4
GM
15076difftime posix_memalign \
15077getpwent endpwent getgrent endgrent \
15078touchlock \
4628c0bf 15079cfmakeraw cfsetspeed copysign __executable_start log2
5476a9a4
GM
15080do :
15081 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15082ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15083eval as_val=\$$as_ac_var
15084 if test "x$as_val" = x""yes; then :
15085 cat >>confdefs.h <<_ACEOF
15086#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15087_ACEOF
f199cab1 15088
5476a9a4
GM
15089fi
15090done
f199cab1
GM
15091
15092
5476a9a4
GM
15093## Eric Backus <ericb@lsid.hp.com> says, HP-UX 9.x on HP 700 machines
15094## has a broken `rint' in some library versions including math library
15095## version number A.09.05.
15096## You can fix the math library by installing patch number PHSS_4630.
15097## But we can fix it more reliably for Emacs by just not using rint.
8ad96b1d 15098## We also skip HAVE_RANDOM - see comments in src/conf_post.h.
5476a9a4
GM
15099case $opsys in
15100 hpux*) : ;;
15101 *) for ac_func in random rint
15102do :
15103 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15104ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15105eval as_val=\$$as_ac_var
15106 if test "x$as_val" = x""yes; then :
15107 cat >>confdefs.h <<_ACEOF
15108#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15109_ACEOF
f199cab1 15110
5476a9a4
GM
15111fi
15112done
15113 ;;
15114esac
f199cab1 15115
5476a9a4
GM
15116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unwind_init" >&5
15117$as_echo_n "checking for __builtin_unwind_init... " >&6; }
15118if test "${emacs_cv_func___builtin_unwind_init+set}" = set; then :
067d23c9 15119 $as_echo_n "(cached) " >&6
f199cab1
GM
15120else
15121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
15122/* end confdefs.h. */
15123
067d23c9
KY
15124int
15125main ()
15126{
5476a9a4 15127__builtin_unwind_init ();
067d23c9
KY
15128 ;
15129 return 0;
15130}
15131_ACEOF
5476a9a4
GM
15132if ac_fn_c_try_link "$LINENO"; then :
15133 emacs_cv_func___builtin_unwind_init=yes
067d23c9 15134else
5476a9a4 15135 emacs_cv_func___builtin_unwind_init=no
067d23c9 15136fi
5476a9a4
GM
15137rm -f core conftest.err conftest.$ac_objext \
15138 conftest$ac_exeext conftest.$ac_ext
067d23c9 15139fi
5476a9a4
GM
15140{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_func___builtin_unwind_init" >&5
15141$as_echo "$emacs_cv_func___builtin_unwind_init" >&6; }
15142if test $emacs_cv_func___builtin_unwind_init = yes; then
067d23c9 15143
5476a9a4 15144$as_echo "#define HAVE___BUILTIN_UNWIND_INIT 1" >>confdefs.h
f199cab1 15145
067d23c9 15146fi
067d23c9 15147
f199cab1
GM
15148
15149
15150
15151
5476a9a4
GM
15152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
15153$as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
15154if test "${ac_cv_sys_largefile_source+set}" = set; then :
15155 $as_echo_n "(cached) " >&6
15156else
15157 while :; do
15158 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15159/* end confdefs.h. */
15160#include <sys/types.h> /* for off_t */
15161 #include <stdio.h>
15162int
15163main ()
15164{
15165int (*fp) (FILE *, off_t, int) = fseeko;
15166 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15167 ;
15168 return 0;
15169}
15170_ACEOF
15171if ac_fn_c_try_link "$LINENO"; then :
15172 ac_cv_sys_largefile_source=no; break
067d23c9 15173fi
5476a9a4
GM
15174rm -f core conftest.err conftest.$ac_objext \
15175 conftest$ac_exeext conftest.$ac_ext
15176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15177/* end confdefs.h. */
15178#define _LARGEFILE_SOURCE 1
15179#include <sys/types.h> /* for off_t */
15180 #include <stdio.h>
15181int
15182main ()
15183{
15184int (*fp) (FILE *, off_t, int) = fseeko;
15185 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15186 ;
15187 return 0;
15188}
15189_ACEOF
15190if ac_fn_c_try_link "$LINENO"; then :
15191 ac_cv_sys_largefile_source=1; break
15192fi
15193rm -f core conftest.err conftest.$ac_objext \
15194 conftest$ac_exeext conftest.$ac_ext
15195 ac_cv_sys_largefile_source=unknown
15196 break
15197done
15198fi
15199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
15200$as_echo "$ac_cv_sys_largefile_source" >&6; }
15201case $ac_cv_sys_largefile_source in #(
15202 no | unknown) ;;
15203 *)
15204cat >>confdefs.h <<_ACEOF
15205#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
15206_ACEOF
15207;;
15208esac
15209rm -rf conftest*
067d23c9 15210
5476a9a4
GM
15211# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
15212# in glibc 2.1.3, but that breaks too many other things.
15213# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
15214if test $ac_cv_sys_largefile_source != unknown; then
067d23c9 15215
5476a9a4 15216$as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
067d23c9 15217
5476a9a4 15218fi
067d23c9
KY
15219
15220
5476a9a4
GM
15221# UNIX98 PTYs.
15222for ac_func in grantpt
15223do :
15224 ac_fn_c_check_func "$LINENO" "grantpt" "ac_cv_func_grantpt"
15225if test "x$ac_cv_func_grantpt" = x""yes; then :
15226 cat >>confdefs.h <<_ACEOF
15227#define HAVE_GRANTPT 1
15228_ACEOF
f199cab1 15229
5476a9a4
GM
15230fi
15231done
f199cab1 15232
f199cab1 15233
5476a9a4 15234# PTY-related GNU extensions.
1146da8d 15235for ac_func in getpt posix_openpt
5476a9a4 15236do :
1146da8d
GM
15237 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15238ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15239eval as_val=\$$as_ac_var
15240 if test "x$as_val" = x""yes; then :
5476a9a4 15241 cat >>confdefs.h <<_ACEOF
1146da8d 15242#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
5476a9a4 15243_ACEOF
f199cab1 15244
5476a9a4
GM
15245fi
15246done
f199cab1 15247
f199cab1 15248
5476a9a4
GM
15249# Check this now, so that we will NOT find the above functions in ncurses.
15250# That is because we have not set up to link ncurses in lib-src.
15251# It's better to believe a function is not available
15252# than to expect to find it in ncurses.
15253# Also we need tputs and friends to be able to build at all.
15254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tputs" >&5
15255$as_echo_n "checking for library containing tputs... " >&6; }
15256# Run a test program that contains a call to tputs, a call that is
15257# never executed. This tests whether a pre-'main' dynamic linker
15258# works with the library. It's too much trouble to actually call
15259# tputs in the test program, due to portability hassles. When
15260# cross-compiling, assume the test program will run if it links.
f199cab1 15261
7c61eaab
GM
15262if test "${opsys}" = "mingw32"; then
15263 msg='none required'
15264else
15265 # Maybe curses should be tried earlier?
15266 # See http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9736#35
15267 for tputs_library in '' tinfo ncurses terminfo termcap curses; do
15268 OLIBS=$LIBS
15269 if test -z "$tputs_library"; then
15270 LIBS_TERMCAP=
15271 msg='none required'
15272 else
15273 LIBS_TERMCAP=-l$tputs_library
15274 msg=$LIBS_TERMCAP
15275 LIBS="$LIBS_TERMCAP $LIBS"
15276 fi
15277 if test "$cross_compiling" = yes; then :
5476a9a4 15278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
15279/* end confdefs.h. */
15280
5476a9a4
GM
15281 extern void tputs (const char *, int, int (*)(int));
15282 int main (int argc, char **argv)
15283 {
15284 if (argc == 10000)
15285 tputs (argv[0], 0, 0);
15286 return 0;
15287 }
15288
067d23c9
KY
15289_ACEOF
15290if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 15291
067d23c9 15292else
5476a9a4 15293 msg=no
067d23c9
KY
15294fi
15295rm -f core conftest.err conftest.$ac_objext \
15296 conftest$ac_exeext conftest.$ac_ext
067d23c9 15297else
5476a9a4 15298 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
15299/* end confdefs.h. */
15300
5476a9a4
GM
15301 extern void tputs (const char *, int, int (*)(int));
15302 int main (int argc, char **argv)
15303 {
15304 if (argc == 10000)
15305 tputs (argv[0], 0, 0);
15306 return 0;
15307 }
15308
067d23c9 15309_ACEOF
5476a9a4
GM
15310if ac_fn_c_try_run "$LINENO"; then :
15311
067d23c9 15312else
5476a9a4 15313 msg=no
067d23c9 15314fi
5476a9a4
GM
15315rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15316 conftest.$ac_objext conftest.beam conftest.$ac_ext
067d23c9 15317fi
5476a9a4 15318
7c61eaab
GM
15319 LIBS=$OLIBS
15320 if test "X$msg" != Xno; then
15321 break
15322 fi
15323 done
15324fi
5476a9a4
GM
15325{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $msg" >&5
15326$as_echo "$msg" >&6; }
15327if test "X$msg" = Xno; then
15328 as_fn_error "The required function \`tputs' was not found in any library.
15329The following libraries were tried (in order):
15330 libtinfo, libncurses, libterminfo, libtermcap, libcurses
15331Please try installing whichever of these libraries is most appropriate
15332for your system, together with its header files.
15333For example, a libncurses-dev(el) or similar package." "$LINENO" 5
067d23c9
KY
15334fi
15335
5476a9a4
GM
15336## Use termcap instead of terminfo?
15337## Only true for: freebsd < 40000, ms-w32, msdos, netbsd < 599002500.
15338TERMINFO=yes
15339## FIXME? In the cases below where we unconditionally set
15340## LIBS_TERMCAP="-lncurses", this overrides LIBS_TERMCAP = -ltinfo,
15341## if that was found above to have tputs.
15342## Should we use the gnu* logic everywhere?
15343case "$opsys" in
15344 ## darwin: Prevents crashes when running Emacs in Terminal.app under 10.2.
15345 ## The ncurses library has been moved out of the System framework in
15346 ## Mac OS X 10.2. So if configure detects it, set the command-line
15347 ## option to use it.
15348 darwin) LIBS_TERMCAP="-lncurses" ;;
15349
15350 gnu*) test -z "$LIBS_TERMCAP" && LIBS_TERMCAP="-lncurses" ;;
15351
15352 freebsd)
15353 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether FreeBSD is new enough to use terminfo" >&5
15354$as_echo_n "checking whether FreeBSD is new enough to use terminfo... " >&6; }
15355 if test "${emacs_cv_freebsd_terminfo+set}" = set; then :
067d23c9
KY
15356 $as_echo_n "(cached) " >&6
15357else
5476a9a4 15358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 15359/* end confdefs.h. */
5476a9a4 15360#include <osreldate.h>
067d23c9
KY
15361int
15362main ()
15363{
5476a9a4
GM
15364#if __FreeBSD_version < 400000
15365fail;
15366#endif
15367
067d23c9
KY
15368 ;
15369 return 0;
15370}
15371_ACEOF
15372if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 15373 emacs_cv_freebsd_terminfo=yes
067d23c9 15374else
5476a9a4 15375 emacs_cv_freebsd_terminfo=no
067d23c9
KY
15376fi
15377rm -f core conftest.err conftest.$ac_objext \
15378 conftest$ac_exeext conftest.$ac_ext
15379fi
5476a9a4
GM
15380
15381
15382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_freebsd_terminfo" >&5
15383$as_echo "$emacs_cv_freebsd_terminfo" >&6; }
15384
15385 if test $emacs_cv_freebsd_terminfo = yes; then
15386 LIBS_TERMCAP="-lncurses"
15387 else
15388 TERMINFO=no
15389 LIBS_TERMCAP="-ltermcap"
15390 fi
15391 ;;
15392
7c61eaab
GM
15393 mingw32)
15394 TERMINFO=no
15395 LIBS_TERMCAP=
15396 ;;
15397
5476a9a4
GM
15398 netbsd)
15399 if test "x$LIBS_TERMCAP" != "x-lterminfo"; then
15400 TERMINFO=no
15401 LIBS_TERMCAP="-ltermcap"
15402 fi
15403 ;;
15404
87e1a811 15405 openbsd | dragonfly) LIBS_TERMCAP="-lncurses" ;;
5476a9a4
GM
15406
15407 ## hpux: Make sure we get select from libc rather than from libcurses
15408 ## because libcurses on HPUX 10.10 has a broken version of select.
15409 ## We used to use -lc -lcurses, but this may be cleaner.
15410 ## FIXME? But TERMINFO = yes on hpux (it used to be explicitly
15411 # set that way, now it uses the default). Isn't this a contradiction?
15412 hpux*) LIBS_TERMCAP="-ltermcap" ;;
15413
15414esac
15415
15416TERMCAP_OBJ=tparam.o
15417if test $TERMINFO = yes; then
15418
15419$as_echo "#define TERMINFO 1" >>confdefs.h
15420
15421 TERMCAP_OBJ=terminfo.o
067d23c9 15422fi
20d5e28a
GM
15423if test "X$LIBS_TERMCAP" = "X-lncurses"; then
15424
15425$as_echo "#define USE_NCURSES 1" >>confdefs.h
15426
15427fi
067d23c9 15428
f199cab1 15429
067d23c9 15430
5476a9a4
GM
15431
15432# Do we have res_init, for detecting changes in /etc/resolv.conf?
15433# On Darwin, res_init appears not to be useful: see bug#562 and
15434# http://lists.gnu.org/archive/html/emacs-devel/2007-11/msg01467.html
15435resolv=no
15436
15437if test $opsys != darwin; then
15438
15439 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15440/* end confdefs.h. */
15441#include <netinet/in.h>
15442#include <arpa/nameser.h>
15443#include <resolv.h>
067d23c9
KY
15444int
15445main ()
15446{
5476a9a4 15447return res_init();
067d23c9
KY
15448 ;
15449 return 0;
15450}
15451_ACEOF
15452if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 15453 have_res_init=yes
067d23c9 15454else
5476a9a4 15455 have_res_init=no
067d23c9
KY
15456fi
15457rm -f core conftest.err conftest.$ac_objext \
15458 conftest$ac_exeext conftest.$ac_ext
5476a9a4
GM
15459 if test "$have_res_init" = no; then
15460 OLIBS="$LIBS"
15461 LIBS="$LIBS -lresolv"
15462 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_init with -lresolv" >&5
15463$as_echo_n "checking for res_init with -lresolv... " >&6; }
15464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 15465/* end confdefs.h. */
5476a9a4
GM
15466#include <netinet/in.h>
15467#include <arpa/nameser.h>
15468#include <resolv.h>
067d23c9
KY
15469int
15470main ()
15471{
5476a9a4 15472return res_init();
067d23c9
KY
15473 ;
15474 return 0;
15475}
15476_ACEOF
15477if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 15478 have_res_init=yes
067d23c9 15479else
5476a9a4 15480 have_res_init=no
067d23c9
KY
15481fi
15482rm -f core conftest.err conftest.$ac_objext \
15483 conftest$ac_exeext conftest.$ac_ext
5476a9a4
GM
15484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_res_init" >&5
15485$as_echo "$have_res_init" >&6; }
15486 if test "$have_res_init" = yes ; then
15487 resolv=yes
15488 fi
15489 LIBS="$OLIBS"
15490 fi
067d23c9 15491
5476a9a4
GM
15492 if test "$have_res_init" = yes; then
15493
15494$as_echo "#define HAVE_RES_INIT 1" >>confdefs.h
067d23c9 15495
5476a9a4 15496 fi
067d23c9 15497fi
5476a9a4
GM
15498# Do we need the Hesiod library to provide the support routines?
15499LIBHESIOD=
15500if test "$with_hesiod" != no ; then
15501 # Don't set $LIBS here -- see comments above. FIXME which comments?
15502 ac_fn_c_check_func "$LINENO" "res_send" "ac_cv_func_res_send"
15503if test "x$ac_cv_func_res_send" = x""yes; then :
f199cab1 15504
5476a9a4
GM
15505else
15506 ac_fn_c_check_func "$LINENO" "__res_send" "ac_cv_func___res_send"
15507if test "x$ac_cv_func___res_send" = x""yes; then :
f199cab1 15508
5476a9a4
GM
15509else
15510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_send in -lresolv" >&5
15511$as_echo_n "checking for res_send in -lresolv... " >&6; }
15512if test "${ac_cv_lib_resolv_res_send+set}" = set; then :
067d23c9
KY
15513 $as_echo_n "(cached) " >&6
15514else
15515 ac_check_lib_save_LIBS=$LIBS
5476a9a4 15516LIBS="-lresolv $LIBS"
067d23c9
KY
15517cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15518/* end confdefs.h. */
15519
15520/* Override any GCC internal prototype to avoid an error.
15521 Use char because int might match the return type of a GCC
15522 builtin and then its argument prototype would still apply. */
15523#ifdef __cplusplus
15524extern "C"
15525#endif
5476a9a4 15526char res_send ();
067d23c9
KY
15527int
15528main ()
15529{
5476a9a4 15530return res_send ();
067d23c9
KY
15531 ;
15532 return 0;
15533}
15534_ACEOF
15535if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 15536 ac_cv_lib_resolv_res_send=yes
067d23c9 15537else
5476a9a4 15538 ac_cv_lib_resolv_res_send=no
067d23c9
KY
15539fi
15540rm -f core conftest.err conftest.$ac_objext \
f199cab1
GM
15541 conftest$ac_exeext conftest.$ac_ext
15542LIBS=$ac_check_lib_save_LIBS
15543fi
5476a9a4
GM
15544{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_send" >&5
15545$as_echo "$ac_cv_lib_resolv_res_send" >&6; }
15546if test "x$ac_cv_lib_resolv_res_send" = x""yes; then :
15547 resolv=yes
15548else
15549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __res_send in -lresolv" >&5
15550$as_echo_n "checking for __res_send in -lresolv... " >&6; }
15551if test "${ac_cv_lib_resolv___res_send+set}" = set; then :
f199cab1
GM
15552 $as_echo_n "(cached) " >&6
15553else
15554 ac_check_lib_save_LIBS=$LIBS
5476a9a4 15555LIBS="-lresolv $LIBS"
f199cab1
GM
15556cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15557/* end confdefs.h. */
4717915f 15558
f199cab1
GM
15559/* Override any GCC internal prototype to avoid an error.
15560 Use char because int might match the return type of a GCC
15561 builtin and then its argument prototype would still apply. */
15562#ifdef __cplusplus
15563extern "C"
15564#endif
5476a9a4 15565char __res_send ();
f199cab1
GM
15566int
15567main ()
15568{
5476a9a4 15569return __res_send ();
f199cab1
GM
15570 ;
15571 return 0;
15572}
15573_ACEOF
15574if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 15575 ac_cv_lib_resolv___res_send=yes
f199cab1 15576else
5476a9a4 15577 ac_cv_lib_resolv___res_send=no
f199cab1
GM
15578fi
15579rm -f core conftest.err conftest.$ac_objext \
15580 conftest$ac_exeext conftest.$ac_ext
15581LIBS=$ac_check_lib_save_LIBS
15582fi
5476a9a4
GM
15583{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv___res_send" >&5
15584$as_echo "$ac_cv_lib_resolv___res_send" >&6; }
15585if test "x$ac_cv_lib_resolv___res_send" = x""yes; then :
15586 resolv=yes
067d23c9 15587fi
f199cab1 15588
5476a9a4 15589fi
1f5d53eb 15590
5476a9a4 15591fi
067d23c9 15592
067d23c9
KY
15593fi
15594
5476a9a4
GM
15595 if test "$resolv" = yes ; then
15596 RESOLVLIB=-lresolv
15597 else
15598 RESOLVLIB=
15599 fi
15600 ac_fn_c_check_func "$LINENO" "hes_getmailhost" "ac_cv_func_hes_getmailhost"
15601if test "x$ac_cv_func_hes_getmailhost" = x""yes; then :
15602
15603else
15604 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hes_getmailhost in -lhesiod" >&5
15605$as_echo_n "checking for hes_getmailhost in -lhesiod... " >&6; }
15606if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then :
15607 $as_echo_n "(cached) " >&6
15608else
15609 ac_check_lib_save_LIBS=$LIBS
15610LIBS="-lhesiod $RESOLVLIB $LIBS"
15611cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 15612/* end confdefs.h. */
5476a9a4
GM
15613
15614/* Override any GCC internal prototype to avoid an error.
15615 Use char because int might match the return type of a GCC
15616 builtin and then its argument prototype would still apply. */
15617#ifdef __cplusplus
15618extern "C"
15619#endif
15620char hes_getmailhost ();
067d23c9
KY
15621int
15622main ()
15623{
5476a9a4 15624return hes_getmailhost ();
067d23c9
KY
15625 ;
15626 return 0;
15627}
15628_ACEOF
f199cab1 15629if ac_fn_c_try_link "$LINENO"; then :
5476a9a4
GM
15630 ac_cv_lib_hesiod_hes_getmailhost=yes
15631else
15632 ac_cv_lib_hesiod_hes_getmailhost=no
067d23c9 15633fi
f199cab1
GM
15634rm -f core conftest.err conftest.$ac_objext \
15635 conftest$ac_exeext conftest.$ac_ext
5476a9a4 15636LIBS=$ac_check_lib_save_LIBS
067d23c9 15637fi
5476a9a4
GM
15638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5
15639$as_echo "$ac_cv_lib_hesiod_hes_getmailhost" >&6; }
15640if test "x$ac_cv_lib_hesiod_hes_getmailhost" = x""yes; then :
15641 hesiod=yes
15642else
15643 :
067d23c9
KY
15644fi
15645
c5a68906 15646fi
f199cab1
GM
15647
15648
5476a9a4 15649 if test x"$hesiod" = xyes; then
5476a9a4 15650 LIBHESIOD=-lhesiod
c5a68906 15651 fi
5476a9a4 15652fi
4fc2b746 15653
4fc2b746 15654
5476a9a4
GM
15655# Do we need libresolv (due to res_init or Hesiod)?
15656if test "$resolv" = yes && test $opsys != darwin; then
5476a9a4
GM
15657 LIBRESOLV=-lresolv
15658else
15659 LIBRESOLV=
15660fi
4fc2b746 15661
4fc2b746 15662
5476a9a4
GM
15663# These tell us which Kerberos-related libraries to use.
15664COM_ERRLIB=
15665CRYPTOLIB=
15666KRB5LIB=
15667DESLIB=
15668KRB4LIB=
4fc2b746 15669
5476a9a4
GM
15670if test "${with_kerberos}" != no; then
15671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for com_err in -lcom_err" >&5
15672$as_echo_n "checking for com_err in -lcom_err... " >&6; }
15673if test "${ac_cv_lib_com_err_com_err+set}" = set; then :
15674 $as_echo_n "(cached) " >&6
15675else
15676 ac_check_lib_save_LIBS=$LIBS
15677LIBS="-lcom_err $LIBS"
15678cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15679/* end confdefs.h. */
4fc2b746 15680
5476a9a4
GM
15681/* Override any GCC internal prototype to avoid an error.
15682 Use char because int might match the return type of a GCC
15683 builtin and then its argument prototype would still apply. */
15684#ifdef __cplusplus
15685extern "C"
15686#endif
15687char com_err ();
15688int
15689main ()
15690{
15691return com_err ();
15692 ;
15693 return 0;
15694}
15695_ACEOF
15696if ac_fn_c_try_link "$LINENO"; then :
15697 ac_cv_lib_com_err_com_err=yes
15698else
15699 ac_cv_lib_com_err_com_err=no
15700fi
15701rm -f core conftest.err conftest.$ac_objext \
15702 conftest$ac_exeext conftest.$ac_ext
15703LIBS=$ac_check_lib_save_LIBS
15704fi
15705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_com_err_com_err" >&5
15706$as_echo "$ac_cv_lib_com_err_com_err" >&6; }
15707if test "x$ac_cv_lib_com_err_com_err" = x""yes; then :
15708 have_com_err=yes
15709else
15710 have_com_err=no
15711fi
f199cab1 15712
5476a9a4
GM
15713 if test $have_com_err = yes; then
15714 COM_ERRLIB=-lcom_err
15715 LIBS="$COM_ERRLIB $LIBS"
5476a9a4
GM
15716 fi
15717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lcrypto" >&5
15718$as_echo_n "checking for mit_des_cbc_encrypt in -lcrypto... " >&6; }
15719if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then :
15720 $as_echo_n "(cached) " >&6
15721else
15722 ac_check_lib_save_LIBS=$LIBS
15723LIBS="-lcrypto $LIBS"
15724cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15725/* end confdefs.h. */
f199cab1 15726
5476a9a4
GM
15727/* Override any GCC internal prototype to avoid an error.
15728 Use char because int might match the return type of a GCC
15729 builtin and then its argument prototype would still apply. */
15730#ifdef __cplusplus
15731extern "C"
15732#endif
15733char mit_des_cbc_encrypt ();
15734int
15735main ()
15736{
15737return mit_des_cbc_encrypt ();
15738 ;
15739 return 0;
15740}
15741_ACEOF
15742if ac_fn_c_try_link "$LINENO"; then :
15743 ac_cv_lib_crypto_mit_des_cbc_encrypt=yes
15744else
15745 ac_cv_lib_crypto_mit_des_cbc_encrypt=no
15746fi
15747rm -f core conftest.err conftest.$ac_objext \
15748 conftest$ac_exeext conftest.$ac_ext
15749LIBS=$ac_check_lib_save_LIBS
15750fi
15751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5
15752$as_echo "$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6; }
15753if test "x$ac_cv_lib_crypto_mit_des_cbc_encrypt" = x""yes; then :
15754 have_crypto=yes
15755else
15756 have_crypto=no
15757fi
f199cab1 15758
5476a9a4
GM
15759 if test $have_crypto = yes; then
15760 CRYPTOLIB=-lcrypto
15761 LIBS="$CRYPTOLIB $LIBS"
5476a9a4
GM
15762 fi
15763 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
15764$as_echo_n "checking for mit_des_cbc_encrypt in -lk5crypto... " >&6; }
15765if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then :
15766 $as_echo_n "(cached) " >&6
15767else
15768 ac_check_lib_save_LIBS=$LIBS
15769LIBS="-lk5crypto $LIBS"
15770cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15771/* end confdefs.h. */
f199cab1 15772
5476a9a4
GM
15773/* Override any GCC internal prototype to avoid an error.
15774 Use char because int might match the return type of a GCC
15775 builtin and then its argument prototype would still apply. */
15776#ifdef __cplusplus
15777extern "C"
15778#endif
15779char mit_des_cbc_encrypt ();
15780int
15781main ()
15782{
15783return mit_des_cbc_encrypt ();
15784 ;
15785 return 0;
15786}
15787_ACEOF
15788if ac_fn_c_try_link "$LINENO"; then :
15789 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes
15790else
15791 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no
15792fi
15793rm -f core conftest.err conftest.$ac_objext \
15794 conftest$ac_exeext conftest.$ac_ext
15795LIBS=$ac_check_lib_save_LIBS
15796fi
15797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5
15798$as_echo "$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6; }
15799if test "x$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" = x""yes; then :
15800 have_k5crypto=yes
15801else
15802 have_k5crypto=no
4fc2b746 15803fi
4fc2b746 15804
5476a9a4
GM
15805 if test $have_k5crypto = yes; then
15806 CRYPTOLIB=-lk5crypto
15807 LIBS="$CRYPTOLIB $LIBS"
5476a9a4
GM
15808 fi
15809 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5_init_context in -lkrb5" >&5
15810$as_echo_n "checking for krb5_init_context in -lkrb5... " >&6; }
15811if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then :
15812 $as_echo_n "(cached) " >&6
15813else
15814 ac_check_lib_save_LIBS=$LIBS
15815LIBS="-lkrb5 $LIBS"
15816cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15817/* end confdefs.h. */
4fc2b746 15818
5476a9a4
GM
15819/* Override any GCC internal prototype to avoid an error.
15820 Use char because int might match the return type of a GCC
15821 builtin and then its argument prototype would still apply. */
15822#ifdef __cplusplus
15823extern "C"
15824#endif
15825char krb5_init_context ();
15826int
15827main ()
15828{
15829return krb5_init_context ();
15830 ;
15831 return 0;
15832}
15833_ACEOF
15834if ac_fn_c_try_link "$LINENO"; then :
15835 ac_cv_lib_krb5_krb5_init_context=yes
15836else
15837 ac_cv_lib_krb5_krb5_init_context=no
15838fi
15839rm -f core conftest.err conftest.$ac_objext \
15840 conftest$ac_exeext conftest.$ac_ext
15841LIBS=$ac_check_lib_save_LIBS
15842fi
15843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb5_krb5_init_context" >&5
15844$as_echo "$ac_cv_lib_krb5_krb5_init_context" >&6; }
15845if test "x$ac_cv_lib_krb5_krb5_init_context" = x""yes; then :
15846 have_krb5=yes
15847else
15848 have_krb5=no
15849fi
f199cab1 15850
5476a9a4
GM
15851 if test $have_krb5=yes; then
15852 KRB5LIB=-lkrb5
15853 LIBS="$KRB5LIB $LIBS"
5476a9a4
GM
15854 fi
15855 if test "${with_kerberos5}" = no; then
15856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes425" >&5
15857$as_echo_n "checking for des_cbc_encrypt in -ldes425... " >&6; }
15858if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then :
f199cab1
GM
15859 $as_echo_n "(cached) " >&6
15860else
5476a9a4
GM
15861 ac_check_lib_save_LIBS=$LIBS
15862LIBS="-ldes425 $LIBS"
15863cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3e0be4ab 15864/* end confdefs.h. */
f199cab1 15865
5476a9a4
GM
15866/* Override any GCC internal prototype to avoid an error.
15867 Use char because int might match the return type of a GCC
15868 builtin and then its argument prototype would still apply. */
15869#ifdef __cplusplus
15870extern "C"
15871#endif
15872char des_cbc_encrypt ();
3e0be4ab
GM
15873int
15874main ()
15875{
5476a9a4 15876return des_cbc_encrypt ();
3e0be4ab
GM
15877 ;
15878 return 0;
15879}
15880_ACEOF
5476a9a4
GM
15881if ac_fn_c_try_link "$LINENO"; then :
15882 ac_cv_lib_des425_des_cbc_encrypt=yes
3e0be4ab 15883else
5476a9a4 15884 ac_cv_lib_des425_des_cbc_encrypt=no
3e0be4ab 15885fi
5476a9a4
GM
15886rm -f core conftest.err conftest.$ac_objext \
15887 conftest$ac_exeext conftest.$ac_ext
15888LIBS=$ac_check_lib_save_LIBS
4fc2b746 15889fi
5476a9a4
GM
15890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
15891$as_echo "$ac_cv_lib_des425_des_cbc_encrypt" >&6; }
15892if test "x$ac_cv_lib_des425_des_cbc_encrypt" = x""yes; then :
15893 have_des425=yes
15894else
15895 have_des425=no
f199cab1 15896fi
6c051bab 15897
5476a9a4
GM
15898 if test $have_des425 = yes; then
15899 DESLIB=-ldes425
15900 LIBS="$DESLIB $LIBS"
5476a9a4
GM
15901 else
15902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes" >&5
15903$as_echo_n "checking for des_cbc_encrypt in -ldes... " >&6; }
15904if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then :
15905 $as_echo_n "(cached) " >&6
15906else
15907 ac_check_lib_save_LIBS=$LIBS
15908LIBS="-ldes $LIBS"
15909cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15910/* end confdefs.h. */
f199cab1 15911
5476a9a4
GM
15912/* Override any GCC internal prototype to avoid an error.
15913 Use char because int might match the return type of a GCC
15914 builtin and then its argument prototype would still apply. */
15915#ifdef __cplusplus
15916extern "C"
15917#endif
15918char des_cbc_encrypt ();
15919int
15920main ()
15921{
15922return des_cbc_encrypt ();
15923 ;
15924 return 0;
15925}
15926_ACEOF
15927if ac_fn_c_try_link "$LINENO"; then :
15928 ac_cv_lib_des_des_cbc_encrypt=yes
15929else
15930 ac_cv_lib_des_des_cbc_encrypt=no
15931fi
15932rm -f core conftest.err conftest.$ac_objext \
15933 conftest$ac_exeext conftest.$ac_ext
15934LIBS=$ac_check_lib_save_LIBS
15935fi
15936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
15937$as_echo "$ac_cv_lib_des_des_cbc_encrypt" >&6; }
15938if test "x$ac_cv_lib_des_des_cbc_encrypt" = x""yes; then :
15939 have_des=yes
15940else
15941 have_des=no
15942fi
f199cab1 15943
5476a9a4
GM
15944 if test $have_des = yes; then
15945 DESLIB=-ldes
15946 LIBS="$DESLIB $LIBS"
5476a9a4
GM
15947 fi
15948 fi
15949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb4" >&5
15950$as_echo_n "checking for krb_get_cred in -lkrb4... " >&6; }
15951if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then :
942f733f
PE
15952 $as_echo_n "(cached) " >&6
15953else
5476a9a4
GM
15954 ac_check_lib_save_LIBS=$LIBS
15955LIBS="-lkrb4 $LIBS"
15956cat confdefs.h - <<_ACEOF >conftest.$ac_ext
942f733f 15957/* end confdefs.h. */
942f733f 15958
5476a9a4
GM
15959/* Override any GCC internal prototype to avoid an error.
15960 Use char because int might match the return type of a GCC
15961 builtin and then its argument prototype would still apply. */
15962#ifdef __cplusplus
15963extern "C"
15964#endif
15965char krb_get_cred ();
942f733f
PE
15966int
15967main ()
15968{
5476a9a4 15969return krb_get_cred ();
942f733f
PE
15970 ;
15971 return 0;
15972}
15973_ACEOF
5476a9a4
GM
15974if ac_fn_c_try_link "$LINENO"; then :
15975 ac_cv_lib_krb4_krb_get_cred=yes
15976else
15977 ac_cv_lib_krb4_krb_get_cred=no
15978fi
15979rm -f core conftest.err conftest.$ac_objext \
15980 conftest$ac_exeext conftest.$ac_ext
15981LIBS=$ac_check_lib_save_LIBS
15982fi
15983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb4_krb_get_cred" >&5
15984$as_echo "$ac_cv_lib_krb4_krb_get_cred" >&6; }
15985if test "x$ac_cv_lib_krb4_krb_get_cred" = x""yes; then :
15986 have_krb4=yes
15987else
15988 have_krb4=no
15989fi
15990
15991 if test $have_krb4 = yes; then
15992 KRB4LIB=-lkrb4
15993 LIBS="$KRB4LIB $LIBS"
5476a9a4
GM
15994 else
15995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb" >&5
15996$as_echo_n "checking for krb_get_cred in -lkrb... " >&6; }
15997if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then :
15998 $as_echo_n "(cached) " >&6
3e0be4ab 15999else
5476a9a4
GM
16000 ac_check_lib_save_LIBS=$LIBS
16001LIBS="-lkrb $LIBS"
16002cat confdefs.h - <<_ACEOF >conftest.$ac_ext
942f733f 16003/* end confdefs.h. */
942f733f 16004
5476a9a4
GM
16005/* Override any GCC internal prototype to avoid an error.
16006 Use char because int might match the return type of a GCC
16007 builtin and then its argument prototype would still apply. */
16008#ifdef __cplusplus
16009extern "C"
16010#endif
16011char krb_get_cred ();
942f733f
PE
16012int
16013main ()
16014{
5476a9a4 16015return krb_get_cred ();
942f733f
PE
16016 ;
16017 return 0;
16018}
16019_ACEOF
5476a9a4
GM
16020if ac_fn_c_try_link "$LINENO"; then :
16021 ac_cv_lib_krb_krb_get_cred=yes
942f733f 16022else
5476a9a4 16023 ac_cv_lib_krb_krb_get_cred=no
942f733f 16024fi
5476a9a4
GM
16025rm -f core conftest.err conftest.$ac_objext \
16026 conftest$ac_exeext conftest.$ac_ext
16027LIBS=$ac_check_lib_save_LIBS
3e0be4ab 16028fi
5476a9a4
GM
16029{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb_krb_get_cred" >&5
16030$as_echo "$ac_cv_lib_krb_krb_get_cred" >&6; }
16031if test "x$ac_cv_lib_krb_krb_get_cred" = x""yes; then :
16032 have_krb=yes
16033else
16034 have_krb=no
942f733f 16035fi
f199cab1 16036
5476a9a4
GM
16037 if test $have_krb = yes; then
16038 KRB4LIB=-lkrb
16039 LIBS="$KRB4LIB $LIBS"
5476a9a4
GM
16040 fi
16041 fi
f199cab1
GM
16042 fi
16043
5476a9a4
GM
16044 if test "${with_kerberos5}" != no; then
16045 for ac_header in krb5.h
16046do :
16047 ac_fn_c_check_header_mongrel "$LINENO" "krb5.h" "ac_cv_header_krb5_h" "$ac_includes_default"
16048if test "x$ac_cv_header_krb5_h" = x""yes; then :
16049 cat >>confdefs.h <<_ACEOF
16050#define HAVE_KRB5_H 1
16051_ACEOF
16052 ac_fn_c_check_member "$LINENO" "krb5_error" "text" "ac_cv_member_krb5_error_text" "#include <krb5.h>
16053"
16054if test "x$ac_cv_member_krb5_error_text" = x""yes; then :
16055
f199cab1 16056cat >>confdefs.h <<_ACEOF
5476a9a4 16057#define HAVE_KRB5_ERROR_TEXT 1
f199cab1
GM
16058_ACEOF
16059
16060
5476a9a4
GM
16061fi
16062ac_fn_c_check_member "$LINENO" "krb5_error" "e_text" "ac_cv_member_krb5_error_e_text" "#include <krb5.h>
16063"
16064if test "x$ac_cv_member_krb5_error_e_text" = x""yes; then :
f199cab1 16065
5476a9a4
GM
16066cat >>confdefs.h <<_ACEOF
16067#define HAVE_KRB5_ERROR_E_TEXT 1
16068_ACEOF
f199cab1
GM
16069
16070
5476a9a4 16071fi
f199cab1 16072
5476a9a4 16073fi
f199cab1 16074
5476a9a4 16075done
f199cab1 16076
5476a9a4 16077 else
5476a9a4 16078 for ac_header in krb.h
f199cab1 16079do :
5476a9a4
GM
16080 ac_fn_c_check_header_mongrel "$LINENO" "krb.h" "ac_cv_header_krb_h" "$ac_includes_default"
16081if test "x$ac_cv_header_krb_h" = x""yes; then :
f199cab1 16082 cat >>confdefs.h <<_ACEOF
5476a9a4
GM
16083#define HAVE_KRB_H 1
16084_ACEOF
16085
16086else
16087 for ac_header in kerberosIV/krb.h
16088do :
16089 ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/krb.h" "ac_cv_header_kerberosIV_krb_h" "$ac_includes_default"
16090if test "x$ac_cv_header_kerberosIV_krb_h" = x""yes; then :
16091 cat >>confdefs.h <<_ACEOF
16092#define HAVE_KERBEROSIV_KRB_H 1
16093_ACEOF
16094
16095else
16096 for ac_header in kerberos/krb.h
16097do :
16098 ac_fn_c_check_header_mongrel "$LINENO" "kerberos/krb.h" "ac_cv_header_kerberos_krb_h" "$ac_includes_default"
16099if test "x$ac_cv_header_kerberos_krb_h" = x""yes; then :
16100 cat >>confdefs.h <<_ACEOF
16101#define HAVE_KERBEROS_KRB_H 1
f199cab1 16102_ACEOF
942f733f 16103
3e0be4ab 16104fi
942f733f 16105
f199cab1
GM
16106done
16107
5476a9a4
GM
16108fi
16109
16110done
16111
16112fi
16113
16114done
16115
16116 fi
16117 for ac_header in com_err.h
f199cab1 16118do :
5476a9a4
GM
16119 ac_fn_c_check_header_mongrel "$LINENO" "com_err.h" "ac_cv_header_com_err_h" "$ac_includes_default"
16120if test "x$ac_cv_header_com_err_h" = x""yes; then :
f199cab1 16121 cat >>confdefs.h <<_ACEOF
5476a9a4 16122#define HAVE_COM_ERR_H 1
f199cab1
GM
16123_ACEOF
16124
3e0be4ab 16125fi
f199cab1 16126
5476a9a4 16127done
3e0be4ab
GM
16128
16129fi
16130
f199cab1
GM
16131
16132
16133
16134
f199cab1
GM
16135
16136
bab4f76d
GM
16137for ac_header in valgrind/valgrind.h
16138do :
16139 ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default"
16140if test "x$ac_cv_header_valgrind_valgrind_h" = x""yes; then :
16141 cat >>confdefs.h <<_ACEOF
16142#define HAVE_VALGRIND_VALGRIND_H 1
16143_ACEOF
16144
16145fi
16146
16147done
16148
16149
f199cab1
GM
16150
16151
16152
5476a9a4
GM
16153 for ac_func in $ac_func_list
16154do :
16155 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16156ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16157eval as_val=\$$as_ac_var
16158 if test "x$as_val" = x""yes; then :
16159 cat >>confdefs.h <<_ACEOF
16160#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16161_ACEOF
16162
16163fi
16164done
16165
f199cab1
GM
16166
16167
16168
5476a9a4
GM
16169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime caches TZ" >&5
16170$as_echo_n "checking whether localtime caches TZ... " >&6; }
16171if test "${emacs_cv_localtime_cache+set}" = set; then :
16172 $as_echo_n "(cached) " >&6
16173else
16174 if test x$ac_cv_func_tzset = xyes; then
16175if test "$cross_compiling" = yes; then :
16176 # If we have tzset, assume the worst when cross-compiling.
16177emacs_cv_localtime_cache=yes
16178else
16179 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16180/* end confdefs.h. */
16181#include <time.h>
16182char TZ_GMT0[] = "TZ=GMT0";
16183char TZ_PST8[] = "TZ=PST8";
16184main()
16185{
16186 time_t now = time ((time_t *) 0);
16187 int hour_GMT0, hour_unset;
16188 if (putenv (TZ_GMT0) != 0)
16189 exit (1);
16190 hour_GMT0 = localtime (&now)->tm_hour;
16191 unsetenv("TZ");
16192 hour_unset = localtime (&now)->tm_hour;
16193 if (putenv (TZ_PST8) != 0)
16194 exit (1);
16195 if (localtime (&now)->tm_hour == hour_GMT0)
16196 exit (1);
16197 unsetenv("TZ");
16198 if (localtime (&now)->tm_hour != hour_unset)
16199 exit (1);
16200 exit (0);
16201}
16202_ACEOF
16203if ac_fn_c_try_run "$LINENO"; then :
16204 emacs_cv_localtime_cache=no
16205else
16206 emacs_cv_localtime_cache=yes
16207fi
16208rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16209 conftest.$ac_objext conftest.beam conftest.$ac_ext
16210fi
f199cab1 16211
5476a9a4
GM
16212else
16213 # If we lack tzset, report that localtime does not cache TZ,
16214 # since we can't invalidate the cache if we don't have tzset.
16215 emacs_cv_localtime_cache=no
16216fi
16217fi
16218{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_localtime_cache" >&5
16219$as_echo "$emacs_cv_localtime_cache" >&6; }
16220if test $emacs_cv_localtime_cache = yes; then
f199cab1 16221
5476a9a4 16222$as_echo "#define LOCALTIME_CACHE 1" >>confdefs.h
f199cab1 16223
5476a9a4 16224fi
f199cab1 16225
5476a9a4
GM
16226ok_so_far=yes
16227ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket"
16228if test "x$ac_cv_func_socket" = x""yes; then :
3e0be4ab 16229
5476a9a4
GM
16230else
16231 ok_so_far=no
16232fi
f199cab1 16233
5476a9a4
GM
16234if test $ok_so_far = yes; then
16235 ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
16236if test "x$ac_cv_header_netinet_in_h" = x""yes; then :
f199cab1 16237
5476a9a4
GM
16238else
16239 ok_so_far=no
16240fi
f199cab1
GM
16241
16242
5476a9a4
GM
16243fi
16244if test $ok_so_far = yes; then
16245 ac_fn_c_check_header_mongrel "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default"
16246if test "x$ac_cv_header_arpa_inet_h" = x""yes; then :
f199cab1 16247
5476a9a4
GM
16248else
16249 ok_so_far=no
16250fi
f199cab1
GM
16251
16252
5476a9a4
GM
16253fi
16254if test $ok_so_far = yes; then
f199cab1 16255
5476a9a4 16256$as_echo "#define HAVE_INET_SOCKETS 1" >>confdefs.h
f199cab1 16257
5476a9a4 16258fi
f199cab1 16259
bb7dce39
GM
16260case $canonical in
16261 *-solaris2.4 | *-solaris2.4.*)
16262 : ${ac_cv_func_vfork_works=no};;
16263esac
16264
5476a9a4
GM
16265ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
16266if test "x$ac_cv_type_pid_t" = x""yes; then :
3e0be4ab 16267
5476a9a4 16268else
3e0be4ab 16269
5476a9a4
GM
16270cat >>confdefs.h <<_ACEOF
16271#define pid_t int
16272_ACEOF
f199cab1 16273
5476a9a4 16274fi
f199cab1 16275
5476a9a4
GM
16276for ac_header in vfork.h
16277do :
16278 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
16279if test "x$ac_cv_header_vfork_h" = x""yes; then :
16280 cat >>confdefs.h <<_ACEOF
16281#define HAVE_VFORK_H 1
16282_ACEOF
f199cab1 16283
5476a9a4 16284fi
f199cab1 16285
5476a9a4 16286done
f199cab1 16287
5476a9a4
GM
16288for ac_func in fork vfork
16289do :
16290 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16291ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16292eval as_val=\$$as_ac_var
16293 if test "x$as_val" = x""yes; then :
16294 cat >>confdefs.h <<_ACEOF
16295#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16296_ACEOF
f199cab1 16297
5476a9a4
GM
16298fi
16299done
f199cab1 16300
5476a9a4
GM
16301if test "x$ac_cv_func_fork" = xyes; then
16302 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
16303$as_echo_n "checking for working fork... " >&6; }
16304if test "${ac_cv_func_fork_works+set}" = set; then :
16305 $as_echo_n "(cached) " >&6
16306else
16307 if test "$cross_compiling" = yes; then :
16308 ac_cv_func_fork_works=cross
16309else
16310 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16311/* end confdefs.h. */
16312$ac_includes_default
16313int
16314main ()
16315{
f199cab1 16316
5476a9a4
GM
16317 /* By Ruediger Kuhlmann. */
16318 return fork () < 0;
f199cab1 16319
5476a9a4
GM
16320 ;
16321 return 0;
16322}
16323_ACEOF
16324if ac_fn_c_try_run "$LINENO"; then :
16325 ac_cv_func_fork_works=yes
16326else
16327 ac_cv_func_fork_works=no
16328fi
16329rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16330 conftest.$ac_objext conftest.beam conftest.$ac_ext
16331fi
f199cab1 16332
5476a9a4
GM
16333fi
16334{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
16335$as_echo "$ac_cv_func_fork_works" >&6; }
f199cab1 16336
5476a9a4
GM
16337else
16338 ac_cv_func_fork_works=$ac_cv_func_fork
16339fi
16340if test "x$ac_cv_func_fork_works" = xcross; then
16341 case $host in
16342 *-*-amigaos* | *-*-msdosdjgpp*)
16343 # Override, as these systems have only a dummy fork() stub
16344 ac_cv_func_fork_works=no
16345 ;;
16346 *)
16347 ac_cv_func_fork_works=yes
16348 ;;
16349 esac
16350 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
16351$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
16352fi
16353ac_cv_func_vfork_works=$ac_cv_func_vfork
16354if test "x$ac_cv_func_vfork" = xyes; then
16355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
16356$as_echo_n "checking for working vfork... " >&6; }
16357if test "${ac_cv_func_vfork_works+set}" = set; then :
f199cab1
GM
16358 $as_echo_n "(cached) " >&6
16359else
16360 if test "$cross_compiling" = yes; then :
5476a9a4 16361 ac_cv_func_vfork_works=cross
f199cab1
GM
16362else
16363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16364/* end confdefs.h. */
5476a9a4
GM
16365/* Thanks to Paul Eggert for this test. */
16366$ac_includes_default
16367#include <sys/wait.h>
16368#ifdef HAVE_VFORK_H
16369# include <vfork.h>
f199cab1 16370#endif
5476a9a4
GM
16371/* On some sparc systems, changes by the child to local and incoming
16372 argument registers are propagated back to the parent. The compiler
16373 is told about this with #include <vfork.h>, but some compilers
16374 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
16375 static variable whose address is put into a register that is
16376 clobbered by the vfork. */
16377static void
16378#ifdef __cplusplus
16379sparc_address_test (int arg)
16380# else
16381sparc_address_test (arg) int arg;
f199cab1 16382#endif
5476a9a4
GM
16383{
16384 static pid_t child;
16385 if (!child) {
16386 child = vfork ();
16387 if (child < 0) {
16388 perror ("vfork");
16389 _exit(2);
16390 }
16391 if (!child) {
16392 arg = getpid();
16393 write(-1, "", 0);
16394 _exit (arg);
16395 }
16396 }
16397}
f199cab1 16398
5476a9a4
GM
16399int
16400main ()
16401{
16402 pid_t parent = getpid ();
16403 pid_t child;
f199cab1 16404
5476a9a4 16405 sparc_address_test (0);
f199cab1 16406
5476a9a4 16407 child = vfork ();
3e0be4ab 16408
5476a9a4
GM
16409 if (child == 0) {
16410 /* Here is another test for sparc vfork register problems. This
16411 test uses lots of local variables, at least as many local
16412 variables as main has allocated so far including compiler
16413 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
16414 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
16415 reuse the register of parent for one of the local variables,
16416 since it will think that parent can't possibly be used any more
16417 in this routine. Assigning to the local variable will thus
16418 munge parent in the parent process. */
16419 pid_t
16420 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
16421 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
16422 /* Convince the compiler that p..p7 are live; otherwise, it might
16423 use the same hardware register for all 8 local variables. */
16424 if (p != p1 || p != p2 || p != p3 || p != p4
16425 || p != p5 || p != p6 || p != p7)
16426 _exit(1);
3e0be4ab 16427
5476a9a4
GM
16428 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
16429 from child file descriptors. If the child closes a descriptor
16430 before it execs or exits, this munges the parent's descriptor
16431 as well. Test for this by closing stdout in the child. */
16432 _exit(close(fileno(stdout)) != 0);
16433 } else {
16434 int status;
16435 struct stat st;
3e0be4ab 16436
5476a9a4
GM
16437 while (wait(&status) != child)
16438 ;
16439 return (
16440 /* Was there some problem with vforking? */
16441 child < 0
3e0be4ab 16442
5476a9a4
GM
16443 /* Did the child fail? (This shouldn't happen.) */
16444 || status
16445
16446 /* Did the vfork/compiler bug occur? */
16447 || parent != getpid()
16448
16449 /* Did the file descriptor bug occur? */
16450 || fstat(fileno(stdout), &st) != 0
16451 );
16452 }
f199cab1 16453}
5476a9a4
GM
16454_ACEOF
16455if ac_fn_c_try_run "$LINENO"; then :
16456 ac_cv_func_vfork_works=yes
16457else
16458 ac_cv_func_vfork_works=no
16459fi
16460rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16461 conftest.$ac_objext conftest.beam conftest.$ac_ext
16462fi
16463
16464fi
16465{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
16466$as_echo "$ac_cv_func_vfork_works" >&6; }
16467
16468fi;
16469if test "x$ac_cv_func_fork_works" = xcross; then
16470 ac_cv_func_vfork_works=$ac_cv_func_vfork
16471 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
16472$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
16473fi
16474
16475if test "x$ac_cv_func_vfork_works" = xyes; then
3e0be4ab 16476
5476a9a4 16477$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
3e0be4ab 16478
5476a9a4 16479else
3e0be4ab 16480
5476a9a4 16481$as_echo "#define vfork fork" >>confdefs.h
942f733f 16482
5476a9a4
GM
16483fi
16484if test "x$ac_cv_func_fork_works" = xyes; then
942f733f 16485
5476a9a4 16486$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
942f733f 16487
5476a9a4 16488fi
f199cab1 16489
f199cab1 16490
5476a9a4
GM
16491for ac_func in snprintf
16492do :
16493 ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
16494if test "x$ac_cv_func_snprintf" = x""yes; then :
16495 cat >>confdefs.h <<_ACEOF
16496#define HAVE_SNPRINTF 1
16497_ACEOF
16498
16499fi
16500done
16501
942f733f 16502
0f55a32e
GM
16503XGSELOBJ=
16504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether GLib is linked in" >&5
16505$as_echo_n "checking whether GLib is linked in... " >&6; }
16506cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16507/* end confdefs.h. */
16508#include <glib.h>
16509
16510int
16511main ()
16512{
16513g_print ("Hello world");
16514 ;
16515 return 0;
16516}
16517_ACEOF
16518if ac_fn_c_try_link "$LINENO"; then :
16519 links_glib=yes
16520else
16521 links_glib=no
16522fi
16523rm -f core conftest.err conftest.$ac_objext \
16524 conftest$ac_exeext conftest.$ac_ext
16525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $links_glib" >&5
16526$as_echo "$links_glib" >&6; }
16527if test "${links_glib}" = "yes"; then
16528
16529$as_echo "#define HAVE_GLIB 1" >>confdefs.h
16530
7cee6e79
GM
16531 if test "$HAVE_NS" = no;then
16532 XGSELOBJ=xgselect.o
16533 fi
0f55a32e
GM
16534fi
16535
16536
5476a9a4
GM
16537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
16538$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
16539if test "${emacs_cv_langinfo_codeset+set}" = set; then :
16540 $as_echo_n "(cached) " >&6
16541else
16542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16543/* end confdefs.h. */
16544#include <langinfo.h>
3e0be4ab
GM
16545int
16546main ()
16547{
5476a9a4
GM
16548char* cs = nl_langinfo(CODESET);
16549 ;
16550 return 0;
16551}
16552_ACEOF
16553if ac_fn_c_try_link "$LINENO"; then :
16554 emacs_cv_langinfo_codeset=yes
16555else
16556 emacs_cv_langinfo_codeset=no
16557fi
16558rm -f core conftest.err conftest.$ac_objext \
16559 conftest$ac_exeext conftest.$ac_ext
f199cab1 16560
5476a9a4
GM
16561fi
16562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_langinfo_codeset" >&5
16563$as_echo "$emacs_cv_langinfo_codeset" >&6; }
16564if test $emacs_cv_langinfo_codeset = yes; then
f199cab1 16565
5476a9a4 16566$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
f199cab1 16567
5476a9a4 16568fi
f199cab1 16569
5476a9a4
GM
16570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
16571$as_echo_n "checking for mbstate_t... " >&6; }
16572if test "${ac_cv_type_mbstate_t+set}" = set; then :
16573 $as_echo_n "(cached) " >&6
16574else
16575 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16576/* end confdefs.h. */
16577$ac_includes_default
16578# include <wchar.h>
16579int
16580main ()
16581{
16582mbstate_t x; return sizeof x;
16583 ;
16584 return 0;
3e0be4ab 16585}
942f733f 16586_ACEOF
5476a9a4
GM
16587if ac_fn_c_try_compile "$LINENO"; then :
16588 ac_cv_type_mbstate_t=yes
3e0be4ab 16589else
5476a9a4 16590 ac_cv_type_mbstate_t=no
942f733f 16591fi
5476a9a4 16592rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3e0be4ab 16593fi
5476a9a4
GM
16594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
16595$as_echo "$ac_cv_type_mbstate_t" >&6; }
16596 if test $ac_cv_type_mbstate_t = yes; then
f199cab1 16597
5476a9a4 16598$as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
f199cab1 16599
5476a9a4 16600 else
f199cab1 16601
5476a9a4 16602$as_echo "#define mbstate_t int" >>confdefs.h
f199cab1 16603
5476a9a4
GM
16604 fi
16605
16606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C restricted array declarations" >&5
16607$as_echo_n "checking for C restricted array declarations... " >&6; }
16608if test "${emacs_cv_c_restrict_arr+set}" = set; then :
16609 $as_echo_n "(cached) " >&6
16610else
16611 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16612/* end confdefs.h. */
16613void fred (int x[__restrict]);
16614int
16615main ()
16616{
16617
16618 ;
16619 return 0;
16620}
16621_ACEOF
16622if ac_fn_c_try_compile "$LINENO"; then :
16623 emacs_cv_c_restrict_arr=yes
16624else
16625 emacs_cv_c_restrict_arr=no
16626fi
16627rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16628fi
16629{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_c_restrict_arr" >&5
16630$as_echo "$emacs_cv_c_restrict_arr" >&6; }
16631if test "$emacs_cv_c_restrict_arr" = yes; then
f199cab1 16632
5476a9a4 16633$as_echo "#define __restrict_arr __restrict" >>confdefs.h
f199cab1 16634
5476a9a4 16635fi
f199cab1
GM
16636
16637
7c61eaab 16638if test "${opsys}" != "mingw32"; then
f199cab1 16639
8ad96b1d
GM
16640$as_echo "#define AMPERSAND_FULL_NAME 1" >>confdefs.h
16641
7c61eaab 16642fi
8ad96b1d
GM
16643
16644
5476a9a4 16645$as_echo "#define CLASH_DETECTION 1" >>confdefs.h
f199cab1
GM
16646
16647
5476a9a4 16648## Note: PTYs are broken on darwin <6. Use at your own risk.
7c61eaab 16649if test "${opsys}" != "mingw32"; then
f199cab1 16650
5476a9a4 16651$as_echo "#define HAVE_PTYS 1" >>confdefs.h
f199cab1 16652
7c61eaab 16653fi
f199cab1
GM
16654
16655
5476a9a4 16656$as_echo "#define HAVE_SOCKETS 1" >>confdefs.h
f199cab1 16657
942f733f 16658
942f733f 16659
6b10626d
GM
16660
16661
7c61eaab
GM
16662if test "${opsys}" = "mingw32"; then
16663 $as_echo "#define NULL_DEVICE \"NUL:\"" >>confdefs.h
16664
16665else
16666 $as_echo "#define NULL_DEVICE \"/dev/null\"" >>confdefs.h
16667
16668fi
8ad96b1d
GM
16669
16670
7c61eaab
GM
16671if test "${opsys}" = "mingw32"; then
16672 $as_echo "#define SEPCHAR ';'" >>confdefs.h
8ad96b1d 16673
7c61eaab
GM
16674else
16675 $as_echo "#define SEPCHAR ':'" >>confdefs.h
8ad96b1d 16676
7c61eaab 16677fi
8ad96b1d
GM
16678
16679
16680$as_echo "#define subprocesses 1" >>confdefs.h
16681
16682
16683
16684$as_echo "#define USER_FULL_NAME pw->pw_gecos" >>confdefs.h
16685
16686
16687
942f733f 16688
9ff736dc
GM
16689$as_echo "#define DIRECTORY_SEP '/'" >>confdefs.h
16690
16691
7c61eaab 16692if test "${opsys}" = "mingw32"; then
7c61eaab 16693
db7863f4 16694$as_echo "#define IS_DEVICE_SEP(_c_) ((_c_) == ':')" >>confdefs.h
f199cab1 16695
6b10626d 16696
7c61eaab
GM
16697
16698$as_echo "#define IS_DIRECTORY_SEP(_c_) ((_c_) == '/' || (_c_) == '\\\\')" >>confdefs.h
16699
16700
16701
16702$as_echo "#define IS_ANY_SEP(_c_) (IS_DIRECTORY_SEP (_c_) || IS_DEVICE_SEP(_c_))" >>confdefs.h
16703
16704else
16705
6b10626d
GM
16706$as_echo "#define IS_DEVICE_SEP(_c_) 0" >>confdefs.h
16707
16708
16709
16710$as_echo "#define IS_DIRECTORY_SEP(_c_) ((_c_) == DIRECTORY_SEP)" >>confdefs.h
16711
16712
16713
16714$as_echo "#define IS_ANY_SEP(_c_) (IS_DIRECTORY_SEP (_c_))" >>confdefs.h
16715
7c61eaab 16716fi
6b10626d
GM
16717
16718
16719
5476a9a4
GM
16720case $opsys in
16721 aix4-2)
16722 if test x$ac_cv_lib_Xmu_XmuConvertStandardSelection != xyes; then
16723 $as_echo "#define NO_EDITRES 1" >>confdefs.h
f199cab1 16724
5476a9a4
GM
16725 fi
16726 ;;
f199cab1 16727
5476a9a4
GM
16728 hpux*)
16729 $as_echo "#define NO_EDITRES 1" >>confdefs.h
f199cab1 16730
5476a9a4
GM
16731 ;;
16732esac
f199cab1
GM
16733
16734
5476a9a4 16735case $opsys in
5476a9a4 16736 irix6-5 | sol2* | unixware )
f199cab1 16737
5476a9a4 16738$as_echo "#define NSIG_MINIMUM 32" >>confdefs.h
f199cab1 16739
5476a9a4
GM
16740 ;;
16741esac
f199cab1 16742
4fa92495 16743emacs_broken_SIGIO=no
f199cab1 16744
5476a9a4 16745case $opsys in
ffeb6dec 16746 hpux* | irix6-5 | openbsd | sol2* | unixware )
4fa92495 16747 emacs_broken_SIGIO=yes
5476a9a4 16748 ;;
f199cab1 16749
5476a9a4 16750 aix4-2)
f199cab1 16751
5476a9a4 16752$as_echo "#define BROKEN_GET_CURRENT_DIR_NAME 1" >>confdefs.h
067d23c9 16753
5476a9a4 16754 ;;
067d23c9 16755
5476a9a4 16756 freebsd)
f199cab1 16757
5476a9a4 16758$as_echo "#define BROKEN_PTY_READ_AFTER_EAGAIN 1" >>confdefs.h
f199cab1 16759
5476a9a4 16760 ;;
5476a9a4 16761esac
f199cab1 16762
5476a9a4
GM
16763case $opsys in
16764 gnu-* | sol2-10 )
f199cab1 16765
5476a9a4 16766$as_echo "#define HAVE_PROCFS 1" >>confdefs.h
f199cab1 16767
5476a9a4
GM
16768 ;;
16769esac
f199cab1 16770
5476a9a4 16771case $opsys in
87e1a811 16772 darwin | dragonfly | freebsd | netbsd | openbsd )
f199cab1 16773
5476a9a4 16774$as_echo "#define DONT_REOPEN_PTY 1" >>confdefs.h
f199cab1 16775
5476a9a4
GM
16776 ;;
16777esac
f199cab1 16778
5476a9a4
GM
16779case $opsys in
16780 netbsd | openbsd) sound_device="/dev/audio" ;;
16781 *) sound_device="/dev/dsp" ;;
16782esac
f199cab1 16783
f199cab1 16784
5476a9a4
GM
16785cat >>confdefs.h <<_ACEOF
16786#define DEFAULT_SOUND_DEVICE "$sound_device"
16787_ACEOF
f199cab1
GM
16788
16789
16790
5476a9a4
GM
16791case $opsys in
16792 darwin | gnu-linux | gnu-kfreebsd )
f199cab1 16793
5476a9a4 16794$as_echo "#define INTERRUPT_INPUT 1" >>confdefs.h
f199cab1 16795
5476a9a4
GM
16796 ;;
16797esac
f199cab1 16798
f199cab1 16799
5476a9a4
GM
16800case $opsys in
16801 cygwin|gnu|gnu-linux|gnu-kfreebsd|irix6-5|freebsd|netbsd|openbsd)
f199cab1 16802
5476a9a4 16803$as_echo "#define NARROWPROTO 1" >>confdefs.h
067d23c9 16804
5476a9a4
GM
16805 ;;
16806esac
f199cab1
GM
16807
16808
067d23c9 16809
1f5d53eb
PE
16810
16811
f199cab1 16812
f199cab1 16813
7d2a1c5e 16814
5476a9a4
GM
16815case $opsys in
16816 aix4-2 )
a09508f2 16817 $as_echo "#define PTY_ITERATION int c; for (c = 0; !c ; c++)" >>confdefs.h
f199cab1 16818
a09508f2 16819 $as_echo "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptc\");" >>confdefs.h
f199cab1 16820
a09508f2 16821 $as_echo "#define PTY_TTY_NAME_SPRINTF strcpy (pty_name, ttyname (fd));" >>confdefs.h
7d2a1c5e 16822
5476a9a4 16823 ;;
7d2a1c5e 16824
5476a9a4 16825 cygwin )
a09508f2 16826 $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++)" >>confdefs.h
7d2a1c5e 16827
843f2634 16828 $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 16829
a09508f2 16830 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
7d2a1c5e 16831
a09508f2 16832 $as_echo "#define PTY_TTY_NAME_SPRINTF /**/" >>confdefs.h
f199cab1 16833
5476a9a4 16834 ;;
f199cab1 16835
1146da8d 16836 darwin )
a09508f2 16837 $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++)" >>confdefs.h
7d2a1c5e 16838
5476a9a4 16839 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
7d2a1c5e 16840
a09508f2 16841 $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 16842
a09508f2 16843 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
f199cab1 16844
a09508f2 16845 $as_echo "#define PTY_TTY_NAME_SPRINTF /**/" >>confdefs.h
f199cab1 16846
5476a9a4 16847 ;;
f199cab1 16848
1146da8d 16849 gnu | openbsd )
5476a9a4 16850 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
f199cab1 16851
5476a9a4 16852 ;;
f199cab1 16853
87e1a811 16854 gnu-linux | gnu-kfreebsd | dragonfly | freebsd | netbsd )
5476a9a4 16855 if test "x$ac_cv_func_grantpt" = xyes; then
f199cab1 16856
5476a9a4 16857$as_echo "#define UNIX98_PTYS 1" >>confdefs.h
f199cab1 16858
a09508f2 16859 $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++)" >>confdefs.h
f199cab1 16860
75bdb32a 16861 $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 16862
1146da8d 16863 if test "x$ac_cv_func_posix_openpt" = xyes; then
df391f9b 16864 $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
16865
16866 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
16867
16868 elif test "x$ac_cv_func_getpt" = xyes; then
5476a9a4 16869 $as_echo "#define PTY_OPEN fd = getpt ()" >>confdefs.h
f199cab1 16870
a09508f2 16871 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
f199cab1 16872
5476a9a4 16873 else
a09508f2 16874 $as_echo "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptmx\");" >>confdefs.h
f199cab1 16875
5476a9a4
GM
16876 fi
16877 else
16878 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
f199cab1 16879
5476a9a4
GM
16880 fi
16881 ;;
f199cab1 16882
5476a9a4
GM
16883 hpux*)
16884 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
f199cab1 16885
a09508f2 16886 $as_echo "#define PTY_NAME_SPRINTF sprintf (pty_name, \"/dev/ptym/pty%c%x\", c, i);" >>confdefs.h
f199cab1 16887
a09508f2 16888 $as_echo "#define PTY_TTY_NAME_SPRINTF sprintf (pty_name, \"/dev/pty/tty%c%x\", c, i);" >>confdefs.h
f199cab1 16889
5476a9a4 16890 ;;
f199cab1 16891
5476a9a4
GM
16892 irix6-5 )
16893 $as_echo "#define PTY_ITERATION /**/" >>confdefs.h
f199cab1 16894
5476a9a4 16895 $as_echo "#define FIRST_PTY_LETTER 'q'" >>confdefs.h
f199cab1 16896
e4184a20 16897 $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 16898
a09508f2 16899 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
f199cab1 16900
a09508f2 16901 $as_echo "#define PTY_TTY_NAME_SPRINTF /**/" >>confdefs.h
f199cab1 16902
5476a9a4 16903 ;;
f199cab1 16904
5476a9a4 16905 sol2* )
75bdb32a 16906 $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 16907
5476a9a4 16908 ;;
f199cab1 16909
5476a9a4 16910 unixware )
75bdb32a 16911 $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
16912
16913 ;;
16914esac
16915
16916
16917case $opsys in
16918 sol2* | unixware )
16919 $as_echo "#define FIRST_PTY_LETTER 'z'" >>confdefs.h
16920
a09508f2 16921 $as_echo "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptmx\");" >>confdefs.h
5476a9a4
GM
16922
16923
16924$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
16925
16926 ;;
16927esac
16928
16929
16930
16931
16932case $opsys in
87e1a811 16933 aix4-2 | cygwin | gnu | irix6-5 | dragonfly | freebsd | netbsd | openbsd | darwin )
5476a9a4
GM
16934 $as_echo "#define SIGNALS_VIA_CHARACTERS 1" >>confdefs.h
16935
16936 ;;
16937
16938 gnu-linux | gnu-kfreebsd )
16939
16940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signals via characters" >&5
16941$as_echo_n "checking for signals via characters... " >&6; }
16942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1f5d53eb 16943/* end confdefs.h. */
5476a9a4
GM
16944
16945#include <linux/version.h>
16946#if LINUX_VERSION_CODE < 0x20400
16947# error "Linux version too old"
16948#endif
16949
3e0be4ab
GM
16950int
16951main ()
16952{
f199cab1 16953
3e0be4ab
GM
16954 ;
16955 return 0;
16956}
067d23c9 16957_ACEOF
5476a9a4
GM
16958if ac_fn_c_try_cpp "$LINENO"; then :
16959 emacs_signals_via_chars=yes
1f5d53eb 16960else
5476a9a4 16961 emacs_signals_via_chars=no
067d23c9 16962fi
5476a9a4 16963rm -f conftest.err conftest.$ac_ext
067d23c9 16964
5476a9a4
GM
16965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_signals_via_chars" >&5
16966$as_echo "$emacs_signals_via_chars" >&6; }
16967 test $emacs_signals_via_chars = yes && $as_echo "#define SIGNALS_VIA_CHARACTERS 1" >>confdefs.h
16968
16969 ;;
16970esac
16971
16972
16973
16974
5476a9a4 16975case $opsys in
0f63df79 16976 aix*)
ce9ae7ca 16977 $as_echo "#define DATA_SEG_BITS 0x20000000" >>confdefs.h
0f63df79
GM
16978
16979 ;;
5476a9a4 16980 hpux*)
ce9ae7ca 16981 $as_echo "#define DATA_SEG_BITS 0x40000000" >>confdefs.h
067d23c9 16982
5476a9a4
GM
16983 ;;
16984 irix6-5)
5476a9a4 16985 $as_echo "#define DATA_SEG_BITS 0x10000000" >>confdefs.h
067d23c9 16986
5476a9a4
GM
16987 ;;
16988esac
067d23c9 16989
1f5d53eb 16990
1f5d53eb 16991
067d23c9 16992
5476a9a4
GM
16993case $opsys in
16994 darwin) $as_echo "#define TAB3 OXTABS" >>confdefs.h
16995 ;;
f199cab1 16996
87e1a811 16997 gnu | dragonfly | freebsd | netbsd | openbsd )
f199cab1 16998
5476a9a4 16999$as_echo "#define TABDLY OXTABS" >>confdefs.h
f199cab1 17000
5476a9a4 17001 $as_echo "#define TAB3 OXTABS" >>confdefs.h
f199cab1 17002
5476a9a4 17003 ;;
f199cab1 17004
5476a9a4 17005 gnu-linux | gnu-kfreebsd )
5476a9a4
GM
17006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17007/* end confdefs.h. */
3e0be4ab 17008
5476a9a4
GM
17009#ifndef __ia64__
17010# error "not ia64"
17011#endif
067d23c9 17012
5476a9a4
GM
17013int
17014main ()
17015{
3e0be4ab 17016
5476a9a4
GM
17017 ;
17018 return 0;
17019}
17020_ACEOF
17021if ac_fn_c_try_cpp "$LINENO"; then :
f199cab1 17022
5476a9a4 17023$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 17024
3e0be4ab 17025fi
5476a9a4
GM
17026rm -f conftest.err conftest.$ac_ext
17027 ;;
067d23c9 17028
5476a9a4 17029 hpux*)
3e0be4ab 17030
5476a9a4 17031$as_echo "#define RUN_TIME_REMAP 1" >>confdefs.h
3e0be4ab 17032
5476a9a4 17033 ;;
5476a9a4 17034esac
3e0be4ab
GM
17035
17036
f199cab1 17037
e700232f
GM
17038
17039
5476a9a4 17040case $opsys in
5476a9a4
GM
17041 gnu-linux | gnu-kfreebsd )
17042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1fd182f0 17043/* end confdefs.h. */
f199cab1 17044
5476a9a4
GM
17045#if defined __i386__ || defined __sparc__ || defined __mc68000__ \
17046 || defined __alpha__ || defined __mips__ || defined __s390__ \
17047 || defined __arm__ || defined __powerpc__ || defined __amd64__ \
17048 || defined __ia64__ || defined __sh__
17049/* ok */
17050#else
17051# error "setjmp not known to work on this arch"
17052#endif
17053
f199cab1
GM
17054int
17055main ()
1fd182f0 17056{
5476a9a4 17057
f199cab1
GM
17058 ;
17059 return 0;
1fd182f0
PE
17060}
17061_ACEOF
5476a9a4
GM
17062if ac_fn_c_try_cpp "$LINENO"; then :
17063 $as_echo "#define GC_SETJMP_WORKS 1" >>confdefs.h
f199cab1 17064
1f5d53eb 17065fi
5476a9a4
GM
17066rm -f conftest.err conftest.$ac_ext
17067 ;;
17068esac
1fd182f0 17069
f199cab1 17070
5476a9a4
GM
17071if test x$GCC = xyes; then
17072 $as_echo "#define GC_SETJMP_WORKS 1" >>confdefs.h
17073
1fd182f0 17074else
5476a9a4 17075 case $opsys in
87e1a811 17076 dragonfly | freebsd | netbsd | openbsd | irix6-5 | sol2* )
5476a9a4 17077 $as_echo "#define GC_SETJMP_WORKS 1" >>confdefs.h
1fd182f0 17078
5476a9a4
GM
17079 ;;
17080 esac
17081fi
6ec9a5a7
GM
17082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _setjmp" >&5
17083$as_echo_n "checking for _setjmp... " >&6; }
17084if test "${emacs_cv_func__setjmp+set}" = set; then :
17085 $as_echo_n "(cached) " >&6
17086else
17087 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17088/* end confdefs.h. */
17089#include <setjmp.h>
7c61eaab
GM
17090 #ifdef __MINGW32__
17091 # define _longjmp longjmp
17092 #endif
1fd182f0 17093
6ec9a5a7
GM
17094int
17095main ()
17096{
17097jmp_buf j;
17098 if (! _setjmp (j))
17099 _longjmp (j, 1);
17100 ;
17101 return 0;
17102}
17103_ACEOF
17104if ac_fn_c_try_link "$LINENO"; then :
17105 emacs_cv_func__setjmp=yes
17106else
17107 emacs_cv_func__setjmp=no
17108fi
17109rm -f core conftest.err conftest.$ac_objext \
17110 conftest$ac_exeext conftest.$ac_ext
17111fi
17112{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_func__setjmp" >&5
17113$as_echo "$emacs_cv_func__setjmp" >&6; }
e2d8f316 17114if test $emacs_cv_func__setjmp = yes; then
906debc3 17115
e2d8f316 17116$as_echo "#define HAVE__SETJMP 1" >>confdefs.h
906debc3 17117
e2d8f316
GM
17118else
17119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
17120$as_echo_n "checking for sigsetjmp... " >&6; }
17121if test "${emacs_cv_func_sigsetjmp+set}" = set; then :
17122 $as_echo_n "(cached) " >&6
17123else
17124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17125/* end confdefs.h. */
17126#include <setjmp.h>
17127
17128int
17129main ()
17130{
17131sigjmp_buf j;
17132 if (! sigsetjmp (j, 1))
17133 siglongjmp (j, 1);
17134 ;
17135 return 0;
17136}
17137_ACEOF
17138if ac_fn_c_try_link "$LINENO"; then :
17139 emacs_cv_func_sigsetjmp=yes
17140else
17141 emacs_cv_func_sigsetjmp=no
17142fi
17143rm -f core conftest.err conftest.$ac_objext \
17144 conftest$ac_exeext conftest.$ac_ext
17145fi
17146{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_func_sigsetjmp" >&5
17147$as_echo "$emacs_cv_func_sigsetjmp" >&6; }
17148 if test $emacs_cv_func_sigsetjmp = yes; then
906debc3 17149
e2d8f316 17150$as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
906debc3 17151
e2d8f316 17152 fi
6ec9a5a7
GM
17153fi
17154
17155case $opsys in
17156 sol2* | unixware )
906debc3
GM
17157
17158$as_echo "#define TIOCSIGSEND TIOCSIGNAL" >>confdefs.h
17159
17160 ;;
17161esac
17162
906debc3 17163
5476a9a4
GM
17164case $opsys in
17165 hpux* | sol2* )
1f5d53eb 17166
5476a9a4 17167$as_echo "#define XOS_NEEDS_TIME_H 1" >>confdefs.h
1f5d53eb 17168
5476a9a4
GM
17169 ;;
17170esac
1f5d53eb 17171
1f5d53eb 17172
4fda9c95 17173
3e0be4ab 17174
4fda9c95 17175
4fda9c95 17176
f199cab1 17177
5476a9a4
GM
17178case $opsys in
17179 aix4-2)
17180 $as_echo "#define USG /**/" >>confdefs.h
17181
5476a9a4
GM
17182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17183/* end confdefs.h. */
17184
17185#ifndef _AIX
17186# error "_AIX not defined"
17187#endif
f199cab1 17188
4fda9c95
GM
17189int
17190main ()
17191{
3e0be4ab 17192
4fda9c95
GM
17193 ;
17194 return 0;
17195}
17196_ACEOF
5476a9a4 17197if ac_fn_c_try_cpp "$LINENO"; then :
4fda9c95 17198
3e0be4ab 17199else
4fda9c95 17200
5476a9a4 17201$as_echo "#define _AIX /**/" >>confdefs.h
3e0be4ab 17202
5476a9a4
GM
17203fi
17204rm -f conftest.err conftest.$ac_ext
17205 ;;
4fda9c95 17206
5476a9a4 17207 cygwin)
3e0be4ab 17208
5476a9a4 17209$as_echo "#define CYGWIN 1" >>confdefs.h
f199cab1 17210
5476a9a4 17211 ;;
f199cab1 17212
5476a9a4 17213 darwin)
f199cab1 17214
5476a9a4 17215$as_echo "#define DARWIN_OS /**/" >>confdefs.h
f199cab1 17216
5476a9a4 17217 ;;
4fda9c95 17218
5476a9a4
GM
17219 gnu-linux | gnu-kfreebsd )
17220 $as_echo "#define USG /**/" >>confdefs.h
4fda9c95 17221
f199cab1 17222
5476a9a4 17223$as_echo "#define GNU_LINUX /**/" >>confdefs.h
4fda9c95 17224
5476a9a4 17225 ;;
4fda9c95 17226
5476a9a4
GM
17227 hpux*)
17228 $as_echo "#define USG /**/" >>confdefs.h
4fda9c95 17229
4717915f 17230
5476a9a4 17231$as_echo "#define HPUX /**/" >>confdefs.h
697210c4 17232
5476a9a4 17233 ;;
697210c4 17234
5476a9a4
GM
17235 irix6-5)
17236 $as_echo "#define USG /**/" >>confdefs.h
f199cab1 17237
906debc3
GM
17238 $as_echo "#define USG5_4 /**/" >>confdefs.h
17239
f199cab1 17240
5476a9a4 17241$as_echo "#define IRIX6_5 /**/" >>confdefs.h
f199cab1 17242
5476a9a4 17243 ;;
f199cab1 17244
7c61eaab
GM
17245 mingw32)
17246 $as_echo "#define DOS_NT /**/" >>confdefs.h
17247
17248
17249$as_echo "#define WINDOWSNT 1" >>confdefs.h
17250
17251 if test "x$ac_enable_checking" != "x" ; then
17252
17253$as_echo "#define EMACSDEBUG 1" >>confdefs.h
17254
17255 fi
17256 ;;
17257
5476a9a4
GM
17258 sol2*)
17259 $as_echo "#define USG /**/" >>confdefs.h
4fda9c95 17260
906debc3
GM
17261 $as_echo "#define USG5_4 /**/" >>confdefs.h
17262
4fda9c95 17263
5476a9a4 17264$as_echo "#define SOLARIS2 /**/" >>confdefs.h
f199cab1 17265
5476a9a4 17266 ;;
f199cab1 17267
5476a9a4
GM
17268 unixware)
17269 $as_echo "#define USG /**/" >>confdefs.h
f199cab1 17270
906debc3
GM
17271 $as_echo "#define USG5_4 /**/" >>confdefs.h
17272
5476a9a4
GM
17273 ;;
17274esac
f199cab1 17275
4fa92495
GM
17276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable FIONREAD" >&5
17277$as_echo_n "checking for usable FIONREAD... " >&6; }
17278if test "${emacs_cv_usable_FIONREAD+set}" = set; then :
17279 $as_echo_n "(cached) " >&6
17280else
17281 case $opsys in
17282 aix4-2)
17283 emacs_cv_usable_FIONREAD=no
17284 ;;
17285
7c61eaab
GM
17286 mingw32)
17287 emacs_cv_usable_FIONREAD=yes
17288 ;;
17289
4fa92495
GM
17290 *)
17291 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17292/* end confdefs.h. */
17293#include <sys/types.h>
17294 #include <sys/ioctl.h>
17295 #ifdef USG5_4
17296 # include <sys/filio.h>
17297 #endif
17298
17299int
17300main ()
17301{
17302int foo = ioctl (0, FIONREAD, &foo);
17303 ;
17304 return 0;
17305}
17306_ACEOF
17307if ac_fn_c_try_compile "$LINENO"; then :
17308 emacs_cv_usable_FIONREAD=yes
17309else
17310 emacs_cv_usable_FIONREAD=no
17311fi
17312rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17313 ;;
17314 esac
17315fi
17316{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_usable_FIONREAD" >&5
17317$as_echo "$emacs_cv_usable_FIONREAD" >&6; }
17318if test $emacs_cv_usable_FIONREAD = yes; then
17319
17320$as_echo "#define USABLE_FIONREAD 1" >>confdefs.h
17321
17322
17323 if test $emacs_broken_SIGIO = no; then
17324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable SIGIO" >&5
17325$as_echo_n "checking for usable SIGIO... " >&6; }
17326if test "${emacs_cv_usable_SIGIO+set}" = set; then :
17327 $as_echo_n "(cached) " >&6
17328else
17329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17330/* end confdefs.h. */
17331#include <fcntl.h>
17332 #include <signal.h>
17333
17334int
17335main ()
17336{
17337int foo = SIGIO | F_SETFL | FASYNC;
17338 ;
17339 return 0;
17340}
17341_ACEOF
17342if ac_fn_c_try_compile "$LINENO"; then :
17343 emacs_cv_usable_SIGIO=yes
17344else
17345 emacs_cv_usable_SIGIO=no
17346fi
17347rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17348fi
17349{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_usable_SIGIO" >&5
17350$as_echo "$emacs_cv_usable_SIGIO" >&6; }
17351 if test $emacs_cv_usable_SIGIO = yes; then
17352
17353$as_echo "#define USABLE_SIGIO 1" >>confdefs.h
17354
17355 fi
17356 fi
17357fi
17358
4fda9c95 17359
5476a9a4 17360case $opsys in
32c8eae2 17361 cygwin)
4fda9c95 17362
5476a9a4 17363$as_echo "#define G_SLICE_ALWAYS_MALLOC 1" >>confdefs.h
4fda9c95 17364
5476a9a4 17365 ;;
4fda9c95 17366
5476a9a4 17367 hpux11)
f199cab1 17368
5476a9a4 17369$as_echo "#define USG_SUBTTY_WORKS 1" >>confdefs.h
f199cab1 17370
5476a9a4 17371 ;;
f199cab1 17372
5476a9a4 17373 irix6-5)
f199cab1 17374
5476a9a4 17375$as_echo "#define PREFER_VSUSP 1" >>confdefs.h
f199cab1 17376
5476a9a4 17377 ;;
f199cab1 17378
5476a9a4 17379 sol2-10)
f199cab1 17380
5476a9a4 17381$as_echo "#define _STRUCTURED_PROC 1" >>confdefs.h
f199cab1 17382
5476a9a4
GM
17383 ;;
17384esac
f199cab1 17385
5476a9a4
GM
17386# Set up the CFLAGS for real compilation, so we can substitute it.
17387CFLAGS="$REAL_CFLAGS"
17388CPPFLAGS="$REAL_CPPFLAGS"
f199cab1 17389
5476a9a4
GM
17390## Hack to detect a buggy GCC version.
17391if test "x$GCC" = xyes \
17392 && test x"`$CC --version 2> /dev/null | grep 'gcc.* 4.5.0'`" != x \
17393 && test x"`echo $CFLAGS | grep '\-O[23]'`" != x \
17394 && test x"`echo $CFLAGS | grep '\-fno-optimize-sibling-calls'`" = x; then
17395 as_fn_error "GCC 4.5.0 has problems compiling Emacs; see etc/PROBLEMS'." "$LINENO" 5
17396fi
f199cab1 17397
5476a9a4 17398version=$PACKAGE_VERSION
f199cab1 17399
0778f6f0 17400copyright="Copyright (C) 2013 Free Software Foundation, Inc."
bb7dce39
GM
17401
17402cat >>confdefs.h <<_ACEOF
17403#define COPYRIGHT "$copyright"
17404_ACEOF
17405
17406
17407
5476a9a4
GM
17408### Specify what sort of things we'll be editing into Makefile and config.h.
17409### Use configuration here uncanonicalized to avoid exceeding size limits.
4fda9c95 17410
f199cab1 17411
5476a9a4 17412## Unused?
4fda9c95
GM
17413
17414
17415
17416
4717915f 17417
4717915f 17418
4717915f 17419
4717915f 17420
4717915f 17421
4717915f 17422
4717915f 17423
4717915f 17424
4717915f 17425
4717915f 17426
4717915f 17427
4717915f
GM
17428
17429
4717915f
GM
17430
17431
4717915f 17432
4717915f 17433
4717915f 17434
5476a9a4
GM
17435## FIXME? Nothing uses @LD_SWITCH_X_SITE@.
17436## src/Makefile.in did add LD_SWITCH_X_SITE (as a cpp define) to the
17437## end of LIBX_BASE, but nothing ever set it.
4717915f 17438
4717915f 17439
4fda9c95 17440
4fda9c95 17441
5476a9a4
GM
17442## Used in lwlib/Makefile.in.
17443
4fda9c95 17444
4fda9c95 17445
4fda9c95
GM
17446
17447
17448
17449
4fda9c95 17450
42dcba54
GM
17451if test -n "${term_header}"; then
17452
17453cat >>confdefs.h <<_ACEOF
17454#define TERM_HEADER "${term_header}"
17455_ACEOF
17456
17457fi
17458
4fda9c95 17459
5476a9a4
GM
17460cat >>confdefs.h <<_ACEOF
17461#define EMACS_CONFIGURATION "${canonical}"
17462_ACEOF
4fda9c95
GM
17463
17464
5476a9a4 17465cat >>confdefs.h <<_ACEOF
e25a10b7 17466#define EMACS_CONFIG_OPTIONS "${emacs_config_options}"
5476a9a4
GM
17467_ACEOF
17468
5476a9a4 17469
4fda9c95 17470
7c61eaab
GM
17471case $opsys in
17472 mingw32)
17473 $as_echo "#define config_opsysfile <ms-w32.h>" >>confdefs.h
17474
17475 ;;
17476esac
17477
5476a9a4
GM
17478XMENU_OBJ=
17479XOBJ=
17480FONT_OBJ=
17481if test "${HAVE_X_WINDOWS}" = "yes" ; then
17482
17483$as_echo "#define HAVE_X_WINDOWS 1" >>confdefs.h
4fda9c95 17484
5476a9a4 17485 XMENU_OBJ=xmenu.o
0f55a32e 17486 XOBJ="xterm.o xfns.o xselect.o xrdb.o xsmfns.o xsettings.o"
5476a9a4
GM
17487 FONT_OBJ=xfont.o
17488 if test "$HAVE_XFT" = "yes"; then
17489 FONT_OBJ="$FONT_OBJ ftfont.o xftfont.o ftxfont.o"
17490 elif test "$HAVE_FREETYPE" = "yes"; then
17491 FONT_OBJ="$FONT_OBJ ftfont.o ftxfont.o"
17492 fi
4fda9c95 17493
f199cab1 17494fi
4fda9c95 17495
4fda9c95 17496
4fda9c95 17497
4fda9c95 17498
5476a9a4
GM
17499WIDGET_OBJ=
17500MOTIF_LIBW=
17501if test "${USE_X_TOOLKIT}" != "none" ; then
17502 WIDGET_OBJ=widget.o
17503
17504$as_echo "#define USE_X_TOOLKIT 1" >>confdefs.h
17505
17506 if test "${USE_X_TOOLKIT}" = "LUCID"; then
17507
17508$as_echo "#define USE_LUCID 1" >>confdefs.h
e1939eb1 17509
5476a9a4 17510 elif test "${USE_X_TOOLKIT}" = "MOTIF"; then
4fda9c95 17511
5476a9a4 17512$as_echo "#define USE_MOTIF 1" >>confdefs.h
3e0be4ab 17513
5476a9a4
GM
17514 MOTIF_LIBW=-lXm
17515 case "$opsys" in
17516 gnu-linux)
17517 ## Paul Abrahams <abrahams at equinox.shaysnet.com> says this is needed.
17518 MOTIF_LIBW="$MOTIF_LIBW -lXpm"
17519 ;;
3e0be4ab 17520
5476a9a4
GM
17521 unixware)
17522 ## Richard Anthony Ryan <ryanr at ellingtn.ftc.nrcs.usda.gov>
17523 ## says -lXimp is needed in UNIX_SV ... 4.2 1.1.2.
17524 MOTIF_LIBW="MOTIF_LIBW -lXimp"
17525 ;;
3e0be4ab 17526
5476a9a4
GM
17527 aix4-2)
17528 ## olson@mcs.anl.gov says -li18n is needed by -lXm.
17529 MOTIF_LIBW="$MOTIF_LIBW -li18n"
17530 ;;
17531 esac
17532 MOTIF_LIBW="$MOTIF_LIBW $LIBXP"
17533 fi
17534fi
4fda9c95 17535
3e0be4ab 17536
5476a9a4
GM
17537TOOLKIT_LIBW=
17538case "$USE_X_TOOLKIT" in
17539 MOTIF) TOOLKIT_LIBW="$MOTIF_LIBW" ;;
17540 LUCID) TOOLKIT_LIBW="$LUCID_LIBW" ;;
17541 none) test "x$HAVE_GTK" = "xyes" && TOOLKIT_LIBW="$GTK_LIBS" ;;
17542esac
4fda9c95
GM
17543
17544
7c61eaab
GM
17545if test "${opsys}" != "mingw32"; then
17546 if test "$USE_X_TOOLKIT" = "none"; then
17547 LIBXT_OTHER="\$(LIBXSM)"
17548 OLDXMENU_TARGET="really-oldXMenu"
17549 else
17550 LIBXT_OTHER="\$(LIBXMU) -lXt \$(LIBXTR6) -lXext"
17551 OLDXMENU_TARGET="really-lwlib"
17552 fi
5476a9a4 17553fi
4fda9c95
GM
17554
17555
5476a9a4
GM
17556## The X Menu stuff is present in the X10 distribution, but missing
17557## from X11. If we have X10, just use the installed library;
17558## otherwise, use our own copy.
17559if test "${HAVE_X11}" = "yes" ; then
4fda9c95 17560
5476a9a4 17561$as_echo "#define HAVE_X11 1" >>confdefs.h
4fda9c95 17562
4fda9c95 17563
5476a9a4
GM
17564 if test "$USE_X_TOOLKIT" = "none"; then
17565 OLDXMENU="\${oldXMenudir}/libXMenu11.a"
17566 else
17567 OLDXMENU="\${lwlibdir}/liblw.a"
17568 fi
17569 LIBXMENU="\$(OLDXMENU)"
17570 LIBX_OTHER="\$(LIBXT) \$(LIBX_EXTRA)"
17571 OLDXMENU_DEPS="\${OLDXMENU} ../src/\${OLDXMENU}"
f199cab1 17572else
5476a9a4
GM
17573 ## For a syntactically valid Makefile; not actually used for anything.
17574 ## See comments in src/Makefile.in.
17575 OLDXMENU=nothing
17576 ## FIXME This case (!HAVE_X11 && HAVE_X_WINDOWS) is no longer possible(?).
17577 if test "${HAVE_X_WINDOWS}" = "yes"; then
17578 LIBXMENU="-lXMenu"
17579 else
17580 LIBXMENU=
17581 fi
17582 LIBX_OTHER=
17583 OLDXMENU_DEPS=
17584fi
4fda9c95 17585
5476a9a4
GM
17586if test "$HAVE_GTK" = "yes" || test "$HAVE_MENUS" != "yes"; then
17587 OLDXMENU_TARGET=
17588 OLDXMENU=nothing
17589 LIBXMENU=
17590 OLDXMENU_DEPS=
17591fi
4fda9c95 17592
4fda9c95
GM
17593
17594
3e0be4ab 17595
4fda9c95 17596
3e0be4ab 17597
3e0be4ab 17598
5476a9a4 17599if test "${HAVE_MENUS}" = "yes" ; then
3e0be4ab 17600
5476a9a4 17601$as_echo "#define HAVE_MENUS 1" >>confdefs.h
4fda9c95 17602
5476a9a4 17603fi
4fda9c95 17604
5476a9a4 17605if test "${GNU_MALLOC}" = "yes" ; then
4fda9c95 17606
5476a9a4 17607$as_echo "#define GNU_MALLOC 1" >>confdefs.h
4fda9c95 17608
5476a9a4 17609fi
3e0be4ab 17610
5476a9a4
GM
17611RALLOC_OBJ=
17612if test "${REL_ALLOC}" = "yes" ; then
17613
17614$as_echo "#define REL_ALLOC 1" >>confdefs.h
4fda9c95
GM
17615
17616
5476a9a4
GM
17617 test "$system_malloc" != "yes" && RALLOC_OBJ=ralloc.o
17618fi
4fda9c95 17619
4fda9c95 17620
5476a9a4 17621if test "$opsys" = "cygwin"; then
5c0255d9 17622 CYGWIN_OBJ="sheap.o cygw32.o"
5476a9a4
GM
17623 ## Cygwin differs because of its unexec().
17624 PRE_ALLOC_OBJ=
17625 POST_ALLOC_OBJ=lastfile.o
7c61eaab
GM
17626elif test "$opsys" = "mingw32"; then
17627 CYGWIN_OBJ=
17628 PRE_ALLOC_OBJ=
17629 POST_ALLOC_OBJ=lastfile.o
5476a9a4
GM
17630else
17631 CYGWIN_OBJ=
17632 PRE_ALLOC_OBJ=lastfile.o
17633 POST_ALLOC_OBJ=
17634fi
4fda9c95 17635
3e0be4ab 17636
3e0be4ab 17637
3e0be4ab 17638
ad4c8083
GM
17639
17640
5476a9a4
GM
17641# Configure gnulib. Although this does not affect CFLAGS or LIBS permanently.
17642# it temporarily reverts them to their pre-pkg-config values,
17643# because gnulib needs to work with both src (which uses the
17644# pkg-config stuff) and lib-src (which does not). For example, gnulib
17645# may need to determine whether LIB_CLOCK_GETTIME should contain -lrt,
17646# and it therefore needs to run in an environment where LIBS does not
17647# already contain -lrt merely because 'pkg-config --libs' printed '-lrt'
17648# for some package unrelated to lib-src.
17649SAVE_CFLAGS=$CFLAGS
17650SAVE_LIBS=$LIBS
17651CFLAGS=$pre_PKG_CONFIG_CFLAGS
17652LIBS="$LIB_PTHREAD $pre_PKG_CONFIG_LIBS"
3e0be4ab 17653
3e0be4ab
GM
17654
17655
4fda9c95 17656
4fda9c95 17657
3e0be4ab 17658
3e0be4ab
GM
17659
17660
4fda9c95 17661
3e0be4ab
GM
17662
17663
5476a9a4
GM
17664 LIBC_FATAL_STDERR_=1
17665 export LIBC_FATAL_STDERR_
3e0be4ab 17666
5476a9a4
GM
17667# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
17668# for constant arguments. Useless!
17669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
17670$as_echo_n "checking for working alloca.h... " >&6; }
17671if test "${ac_cv_working_alloca_h+set}" = set; then :
17672 $as_echo_n "(cached) " >&6
17673else
17674 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17675/* end confdefs.h. */
17676#include <alloca.h>
17677int
17678main ()
17679{
17680char *p = (char *) alloca (2 * sizeof (int));
17681 if (p) return 0;
17682 ;
17683 return 0;
17684}
17685_ACEOF
17686if ac_fn_c_try_link "$LINENO"; then :
17687 ac_cv_working_alloca_h=yes
17688else
17689 ac_cv_working_alloca_h=no
17690fi
17691rm -f core conftest.err conftest.$ac_objext \
17692 conftest$ac_exeext conftest.$ac_ext
17693fi
17694{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
17695$as_echo "$ac_cv_working_alloca_h" >&6; }
17696if test $ac_cv_working_alloca_h = yes; then
3e0be4ab 17697
5476a9a4 17698$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
3e0be4ab 17699
5476a9a4 17700fi
3e0be4ab 17701
5476a9a4
GM
17702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
17703$as_echo_n "checking for alloca... " >&6; }
17704if test "${ac_cv_func_alloca_works+set}" = set; then :
f199cab1
GM
17705 $as_echo_n "(cached) " >&6
17706else
5476a9a4 17707 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 17708/* end confdefs.h. */
5476a9a4
GM
17709#ifdef __GNUC__
17710# define alloca __builtin_alloca
17711#else
17712# ifdef _MSC_VER
17713# include <malloc.h>
17714# define alloca _alloca
17715# else
17716# ifdef HAVE_ALLOCA_H
17717# include <alloca.h>
17718# else
17719# ifdef _AIX
17720 #pragma alloca
17721# else
17722# ifndef alloca /* predefined by HP cc +Olibcalls */
17723char *alloca ();
17724# endif
17725# endif
17726# endif
17727# endif
17728#endif
17729
17730int
17731main ()
17732{
17733char *p = (char *) alloca (1);
17734 if (p) return 0;
17735 ;
17736 return 0;
17737}
17738_ACEOF
17739if ac_fn_c_try_link "$LINENO"; then :
17740 ac_cv_func_alloca_works=yes
17741else
17742 ac_cv_func_alloca_works=no
17743fi
17744rm -f core conftest.err conftest.$ac_objext \
17745 conftest$ac_exeext conftest.$ac_ext
17746fi
17747{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
17748$as_echo "$ac_cv_func_alloca_works" >&6; }
17749
17750if test $ac_cv_func_alloca_works = yes; then
17751
17752$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
17753
17754else
17755 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
17756# that cause trouble. Some versions do not even contain alloca or
17757# contain a buggy version. If you still want to use their alloca,
17758# use ar to extract alloca.o from them instead of compiling alloca.c.
3e0be4ab 17759
4fda9c95 17760
4fda9c95 17761
4fda9c95
GM
17762
17763
5476a9a4 17764ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
4fda9c95 17765
5476a9a4 17766$as_echo "#define C_ALLOCA 1" >>confdefs.h
4fda9c95 17767
4fda9c95 17768
5476a9a4
GM
17769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether 'alloca.c' needs Cray hooks" >&5
17770$as_echo_n "checking whether 'alloca.c' needs Cray hooks... " >&6; }
17771if test "${ac_cv_os_cray+set}" = set; then :
17772 $as_echo_n "(cached) " >&6
17773else
17774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17775/* end confdefs.h. */
17776#if defined CRAY && ! defined CRAY2
17777webecray
17778#else
17779wenotbecray
17780#endif
4fda9c95 17781
5476a9a4
GM
17782_ACEOF
17783if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17784 $EGREP "webecray" >/dev/null 2>&1; then :
17785 ac_cv_os_cray=yes
17786else
17787 ac_cv_os_cray=no
17788fi
17789rm -f conftest*
4fda9c95 17790
5476a9a4
GM
17791fi
17792{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
17793$as_echo "$ac_cv_os_cray" >&6; }
17794if test $ac_cv_os_cray = yes; then
17795 for ac_func in _getb67 GETB67 getb67; do
17796 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17797ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17798eval as_val=\$$as_ac_var
17799 if test "x$as_val" = x""yes; then :
4fda9c95 17800
5476a9a4
GM
17801cat >>confdefs.h <<_ACEOF
17802#define CRAY_STACKSEG_END $ac_func
17803_ACEOF
4fda9c95 17804
5476a9a4
GM
17805 break
17806fi
4fda9c95 17807
5476a9a4
GM
17808 done
17809fi
4fda9c95 17810
5476a9a4
GM
17811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
17812$as_echo_n "checking stack direction for C alloca... " >&6; }
17813if test "${ac_cv_c_stack_direction+set}" = set; then :
17814 $as_echo_n "(cached) " >&6
17815else
17816 if test "$cross_compiling" = yes; then :
17817 ac_cv_c_stack_direction=0
17818else
17819 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17820/* end confdefs.h. */
17821$ac_includes_default
17822int
17823find_stack_direction (int *addr, int depth)
17824{
17825 int dir, dummy = 0;
17826 if (! addr)
17827 addr = &dummy;
17828 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
17829 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
17830 return dir + dummy;
17831}
4fda9c95 17832
5476a9a4
GM
17833int
17834main (int argc, char **argv)
17835{
17836 return find_stack_direction (0, argc + !argv + 20) < 0;
17837}
17838_ACEOF
17839if ac_fn_c_try_run "$LINENO"; then :
17840 ac_cv_c_stack_direction=1
17841else
17842 ac_cv_c_stack_direction=-1
17843fi
17844rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17845 conftest.$ac_objext conftest.beam conftest.$ac_ext
17846fi
4fda9c95 17847
5476a9a4
GM
17848fi
17849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
17850$as_echo "$ac_cv_c_stack_direction" >&6; }
17851cat >>confdefs.h <<_ACEOF
17852#define STACK_DIRECTION $ac_cv_c_stack_direction
17853_ACEOF
3e0be4ab
GM
17854
17855
5476a9a4 17856fi
3e0be4ab
GM
17857
17858
17859
17860
5476a9a4
GM
17861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
17862$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
17863if test "${ac_cv_c_bigendian+set}" = set; then :
17864 $as_echo_n "(cached) " >&6
17865else
17866 ac_cv_c_bigendian=unknown
17867 # See if we're dealing with a universal compiler.
17868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17869/* end confdefs.h. */
17870#ifndef __APPLE_CC__
17871 not a universal capable compiler
17872 #endif
17873 typedef int dummy;
17874
17875_ACEOF
17876if ac_fn_c_try_compile "$LINENO"; then :
3e0be4ab 17877
5476a9a4
GM
17878 # Check for potential -arch flags. It is not universal unless
17879 # there are at least two -arch flags with different values.
17880 ac_arch=
17881 ac_prev=
17882 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
17883 if test -n "$ac_prev"; then
17884 case $ac_word in
17885 i?86 | x86_64 | ppc | ppc64)
17886 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
17887 ac_arch=$ac_word
17888 else
17889 ac_cv_c_bigendian=universal
17890 break
17891 fi
17892 ;;
17893 esac
17894 ac_prev=
17895 elif test "x$ac_word" = "x-arch"; then
17896 ac_prev=arch
17897 fi
17898 done
17899fi
17900rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17901 if test $ac_cv_c_bigendian = unknown; then
17902 # See if sys/param.h defines the BYTE_ORDER macro.
17903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17904/* end confdefs.h. */
17905#include <sys/types.h>
17906 #include <sys/param.h>
3e0be4ab 17907
5476a9a4
GM
17908int
17909main ()
17910{
17911#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
17912 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
17913 && LITTLE_ENDIAN)
17914 bogus endian macros
17915 #endif
3e0be4ab 17916
5476a9a4
GM
17917 ;
17918 return 0;
17919}
17920_ACEOF
17921if ac_fn_c_try_compile "$LINENO"; then :
17922 # It does; now see whether it defined to BIG_ENDIAN or not.
17923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17924/* end confdefs.h. */
17925#include <sys/types.h>
17926 #include <sys/param.h>
369e19fc 17927
5476a9a4
GM
17928int
17929main ()
17930{
17931#if BYTE_ORDER != BIG_ENDIAN
17932 not big endian
17933 #endif
3e0be4ab 17934
5476a9a4
GM
17935 ;
17936 return 0;
17937}
17938_ACEOF
17939if ac_fn_c_try_compile "$LINENO"; then :
17940 ac_cv_c_bigendian=yes
17941else
17942 ac_cv_c_bigendian=no
17943fi
17944rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17945fi
17946rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17947 fi
17948 if test $ac_cv_c_bigendian = unknown; then
17949 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
17950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17951/* end confdefs.h. */
17952#include <limits.h>
4fda9c95 17953
5476a9a4
GM
17954int
17955main ()
17956{
17957#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
17958 bogus endian macros
17959 #endif
4fda9c95 17960
5476a9a4
GM
17961 ;
17962 return 0;
17963}
17964_ACEOF
17965if ac_fn_c_try_compile "$LINENO"; then :
17966 # It does; now see whether it defined to _BIG_ENDIAN or not.
17967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17968/* end confdefs.h. */
17969#include <limits.h>
4fda9c95 17970
5476a9a4
GM
17971int
17972main ()
17973{
17974#ifndef _BIG_ENDIAN
17975 not big endian
17976 #endif
f199cab1 17977
5476a9a4
GM
17978 ;
17979 return 0;
17980}
17981_ACEOF
17982if ac_fn_c_try_compile "$LINENO"; then :
17983 ac_cv_c_bigendian=yes
f199cab1 17984else
5476a9a4
GM
17985 ac_cv_c_bigendian=no
17986fi
17987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17988fi
17989rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17990 fi
17991 if test $ac_cv_c_bigendian = unknown; then
17992 # Compile a test program.
17993 if test "$cross_compiling" = yes; then :
17994 # Try to guess by grepping values from an object file.
17995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17996/* end confdefs.h. */
17997short int ascii_mm[] =
17998 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
17999 short int ascii_ii[] =
18000 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
18001 int use_ascii (int i) {
18002 return ascii_mm[i] + ascii_ii[i];
18003 }
18004 short int ebcdic_ii[] =
18005 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
18006 short int ebcdic_mm[] =
18007 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
18008 int use_ebcdic (int i) {
18009 return ebcdic_mm[i] + ebcdic_ii[i];
18010 }
18011 extern int foo;
f199cab1 18012
5476a9a4
GM
18013int
18014main ()
18015{
18016return use_ascii (foo) == use_ebcdic (foo);
18017 ;
18018 return 0;
18019}
18020_ACEOF
18021if ac_fn_c_try_compile "$LINENO"; then :
18022 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
18023 ac_cv_c_bigendian=yes
18024 fi
18025 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
18026 if test "$ac_cv_c_bigendian" = unknown; then
18027 ac_cv_c_bigendian=no
18028 else
18029 # finding both strings is unlikely to happen, but who knows?
18030 ac_cv_c_bigendian=unknown
18031 fi
18032 fi
18033fi
18034rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4fda9c95 18035else
3e0be4ab 18036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4fda9c95 18037/* end confdefs.h. */
5476a9a4
GM
18038$ac_includes_default
18039int
18040main ()
4fda9c95 18041{
5476a9a4
GM
18042
18043 /* Are we little or big endian? From Harbison&Steele. */
18044 union
18045 {
18046 long int l;
18047 char c[sizeof (long int)];
18048 } u;
18049 u.l = 1;
18050 return u.c[sizeof (long int) - 1] == 1;
18051
18052 ;
4fda9c95
GM
18053 return 0;
18054}
18055_ACEOF
f199cab1 18056if ac_fn_c_try_run "$LINENO"; then :
5476a9a4 18057 ac_cv_c_bigendian=no
3e0be4ab 18058else
5476a9a4 18059 ac_cv_c_bigendian=yes
4fda9c95 18060fi
f199cab1
GM
18061rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18062 conftest.$ac_objext conftest.beam conftest.$ac_ext
4fda9c95 18063fi
4fda9c95 18064
5476a9a4 18065 fi
f199cab1 18066fi
5476a9a4
GM
18067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
18068$as_echo "$ac_cv_c_bigendian" >&6; }
18069 case $ac_cv_c_bigendian in #(
18070 yes)
18071 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
18072;; #(
18073 no)
18074 ;; #(
18075 universal)
3e0be4ab 18076
5476a9a4 18077$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
3e0be4ab 18078
5476a9a4
GM
18079 ;; #(
18080 *)
18081 as_fn_error "unknown endianness
18082 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
18083 esac
4fda9c95 18084
4fda9c95 18085
da6c8463 18086
5476a9a4
GM
18087 GNULIB_CHDIR=0;
18088 GNULIB_CHOWN=0;
18089 GNULIB_CLOSE=0;
18090 GNULIB_DUP=0;
18091 GNULIB_DUP2=0;
18092 GNULIB_DUP3=0;
18093 GNULIB_ENVIRON=0;
18094 GNULIB_EUIDACCESS=0;
18095 GNULIB_FACCESSAT=0;
18096 GNULIB_FCHDIR=0;
18097 GNULIB_FCHOWNAT=0;
18098 GNULIB_FDATASYNC=0;
18099 GNULIB_FSYNC=0;
18100 GNULIB_FTRUNCATE=0;
18101 GNULIB_GETCWD=0;
18102 GNULIB_GETDOMAINNAME=0;
18103 GNULIB_GETDTABLESIZE=0;
18104 GNULIB_GETGROUPS=0;
18105 GNULIB_GETHOSTNAME=0;
18106 GNULIB_GETLOGIN=0;
18107 GNULIB_GETLOGIN_R=0;
18108 GNULIB_GETPAGESIZE=0;
18109 GNULIB_GETUSERSHELL=0;
18110 GNULIB_GROUP_MEMBER=0;
18111 GNULIB_ISATTY=0;
18112 GNULIB_LCHOWN=0;
18113 GNULIB_LINK=0;
18114 GNULIB_LINKAT=0;
18115 GNULIB_LSEEK=0;
18116 GNULIB_PIPE=0;
18117 GNULIB_PIPE2=0;
18118 GNULIB_PREAD=0;
18119 GNULIB_PWRITE=0;
18120 GNULIB_READ=0;
18121 GNULIB_READLINK=0;
18122 GNULIB_READLINKAT=0;
18123 GNULIB_RMDIR=0;
18124 GNULIB_SETHOSTNAME=0;
18125 GNULIB_SLEEP=0;
18126 GNULIB_SYMLINK=0;
18127 GNULIB_SYMLINKAT=0;
18128 GNULIB_TTYNAME_R=0;
18129 GNULIB_UNISTD_H_NONBLOCKING=0;
18130 GNULIB_UNISTD_H_SIGPIPE=0;
18131 GNULIB_UNLINK=0;
18132 GNULIB_UNLINKAT=0;
18133 GNULIB_USLEEP=0;
18134 GNULIB_WRITE=0;
18135 HAVE_CHOWN=1;
18136 HAVE_DUP2=1;
18137 HAVE_DUP3=1;
18138 HAVE_EUIDACCESS=1;
18139 HAVE_FACCESSAT=1;
18140 HAVE_FCHDIR=1;
18141 HAVE_FCHOWNAT=1;
18142 HAVE_FDATASYNC=1;
18143 HAVE_FSYNC=1;
18144 HAVE_FTRUNCATE=1;
18145 HAVE_GETDTABLESIZE=1;
18146 HAVE_GETGROUPS=1;
18147 HAVE_GETHOSTNAME=1;
18148 HAVE_GETLOGIN=1;
18149 HAVE_GETPAGESIZE=1;
18150 HAVE_GROUP_MEMBER=1;
18151 HAVE_LCHOWN=1;
18152 HAVE_LINK=1;
18153 HAVE_LINKAT=1;
18154 HAVE_PIPE=1;
18155 HAVE_PIPE2=1;
18156 HAVE_PREAD=1;
18157 HAVE_PWRITE=1;
18158 HAVE_READLINK=1;
18159 HAVE_READLINKAT=1;
18160 HAVE_SETHOSTNAME=1;
18161 HAVE_SLEEP=1;
18162 HAVE_SYMLINK=1;
18163 HAVE_SYMLINKAT=1;
18164 HAVE_UNLINKAT=1;
18165 HAVE_USLEEP=1;
18166 HAVE_DECL_ENVIRON=1;
18167 HAVE_DECL_FCHDIR=1;
18168 HAVE_DECL_FDATASYNC=1;
18169 HAVE_DECL_GETDOMAINNAME=1;
18170 HAVE_DECL_GETLOGIN_R=1;
18171 HAVE_DECL_GETPAGESIZE=1;
18172 HAVE_DECL_GETUSERSHELL=1;
18173 HAVE_DECL_SETHOSTNAME=1;
18174 HAVE_DECL_TTYNAME_R=1;
18175 HAVE_OS_H=0;
18176 HAVE_SYS_PARAM_H=0;
18177 REPLACE_CHOWN=0;
18178 REPLACE_CLOSE=0;
18179 REPLACE_DUP=0;
18180 REPLACE_DUP2=0;
18181 REPLACE_FCHOWNAT=0;
18182 REPLACE_FTRUNCATE=0;
18183 REPLACE_GETCWD=0;
18184 REPLACE_GETDOMAINNAME=0;
18185 REPLACE_GETLOGIN_R=0;
18186 REPLACE_GETGROUPS=0;
18187 REPLACE_GETPAGESIZE=0;
18188 REPLACE_ISATTY=0;
18189 REPLACE_LCHOWN=0;
18190 REPLACE_LINK=0;
18191 REPLACE_LINKAT=0;
18192 REPLACE_LSEEK=0;
18193 REPLACE_PREAD=0;
18194 REPLACE_PWRITE=0;
18195 REPLACE_READ=0;
18196 REPLACE_READLINK=0;
18197 REPLACE_RMDIR=0;
18198 REPLACE_SLEEP=0;
18199 REPLACE_SYMLINK=0;
18200 REPLACE_TTYNAME_R=0;
18201 REPLACE_UNLINK=0;
18202 REPLACE_UNLINKAT=0;
18203 REPLACE_USLEEP=0;
18204 REPLACE_WRITE=0;
18205 UNISTD_H_HAVE_WINSOCK2_H=0;
18206 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
f199cab1
GM
18207
18208
93131e11 18209
d7ad186c
GM
18210 GNULIB_OPENDIR=0;
18211 GNULIB_READDIR=0;
18212 GNULIB_REWINDDIR=0;
18213 GNULIB_CLOSEDIR=0;
18214 GNULIB_DIRFD=0;
18215 GNULIB_FDOPENDIR=0;
18216 GNULIB_SCANDIR=0;
18217 GNULIB_ALPHASORT=0;
18218 HAVE_OPENDIR=1;
18219 HAVE_READDIR=1;
18220 HAVE_REWINDDIR=1;
18221 HAVE_CLOSEDIR=1;
18222 HAVE_DECL_DIRFD=1;
18223 HAVE_DECL_FDOPENDIR=1;
18224 HAVE_FDOPENDIR=1;
18225 HAVE_SCANDIR=1;
18226 HAVE_ALPHASORT=1;
18227 REPLACE_OPENDIR=0;
18228 REPLACE_CLOSEDIR=0;
18229 REPLACE_DIRFD=0;
18230 REPLACE_FDOPENDIR=0;
710f5812
GM
18231
18232
18233
18234 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
18235$as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
18236if test "${gl_cv_have_include_next+set}" = set; then :
18237 $as_echo_n "(cached) " >&6
18238else
18239 rm -rf conftestd1a conftestd1b conftestd2
18240 mkdir conftestd1a conftestd1b conftestd2
18241 cat <<EOF > conftestd1a/conftest.h
18242#define DEFINED_IN_CONFTESTD1
18243#include_next <conftest.h>
18244#ifdef DEFINED_IN_CONFTESTD2
18245int foo;
18246#else
18247#error "include_next doesn't work"
18248#endif
18249EOF
18250 cat <<EOF > conftestd1b/conftest.h
18251#define DEFINED_IN_CONFTESTD1
18252#include <stdio.h>
18253#include_next <conftest.h>
18254#ifdef DEFINED_IN_CONFTESTD2
18255int foo;
18256#else
18257#error "include_next doesn't work"
18258#endif
18259EOF
18260 cat <<EOF > conftestd2/conftest.h
18261#ifndef DEFINED_IN_CONFTESTD1
18262#error "include_next test doesn't work"
18263#endif
18264#define DEFINED_IN_CONFTESTD2
18265EOF
18266 gl_save_CPPFLAGS="$CPPFLAGS"
18267 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
18268 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18269/* end confdefs.h. */
18270#include <conftest.h>
18271_ACEOF
18272if ac_fn_c_try_compile "$LINENO"; then :
18273 gl_cv_have_include_next=yes
18274else
18275 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
18276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18277/* end confdefs.h. */
18278#include <conftest.h>
18279_ACEOF
18280if ac_fn_c_try_compile "$LINENO"; then :
18281 gl_cv_have_include_next=buggy
18282else
18283 gl_cv_have_include_next=no
18284fi
18285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18286
18287fi
18288rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18289 CPPFLAGS="$gl_save_CPPFLAGS"
18290 rm -rf conftestd1a conftestd1b conftestd2
18291
18292fi
18293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
18294$as_echo "$gl_cv_have_include_next" >&6; }
18295 PRAGMA_SYSTEM_HEADER=
18296 if test $gl_cv_have_include_next = yes; then
18297 INCLUDE_NEXT=include_next
18298 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
18299 if test -n "$GCC"; then
18300 PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
18301 fi
18302 else
18303 if test $gl_cv_have_include_next = buggy; then
18304 INCLUDE_NEXT=include
18305 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
18306 else
18307 INCLUDE_NEXT=include
18308 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
18309 fi
18310 fi
18311
18312
18313
18314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5
18315$as_echo_n "checking whether system header files limit the line length... " >&6; }
18316if test "${gl_cv_pragma_columns+set}" = set; then :
18317 $as_echo_n "(cached) " >&6
18318else
18319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18320/* end confdefs.h. */
18321
18322#ifdef __TANDEM
18323choke me
18324#endif
18325
18326_ACEOF
18327if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18328 $EGREP "choke me" >/dev/null 2>&1; then :
18329 gl_cv_pragma_columns=yes
18330else
18331 gl_cv_pragma_columns=no
18332fi
18333rm -f conftest*
18334
18335
18336fi
18337{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5
18338$as_echo "$gl_cv_pragma_columns" >&6; }
18339 if test $gl_cv_pragma_columns = yes; then
18340 PRAGMA_COLUMNS="#pragma COLUMNS 10000"
18341 else
18342 PRAGMA_COLUMNS=
18343 fi
18344
18345
710f5812 18346
710f5812 18347
710f5812 18348
d7ad186c
GM
18349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtold conforms to C99" >&5
18350$as_echo_n "checking whether strtold conforms to C99... " >&6; }
18351if test "${gl_cv_func_c99_strtold+set}" = set; then :
f199cab1 18352 $as_echo_n "(cached) " >&6
ae0d7250 18353else
f199cab1 18354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3e0be4ab 18355/* end confdefs.h. */
d7ad186c
GM
18356/* On HP-UX before 11.23, strtold returns a struct instead of
18357 long double. Reject implementations like that, by requiring
18358 compatibility with the C99 prototype. */
18359 #include <stdlib.h>
18360 static long double (*p) (char const *, char **) = strtold;
18361 static long double
18362 test (char const *nptr, char **endptr)
18363 {
18364 long double r;
18365 r = strtold (nptr, endptr);
18366 return r;
18367 }
3e0be4ab
GM
18368int
18369main ()
18370{
d7ad186c 18371return test ("1.0", NULL) != 1 || p ("1.0", NULL) != 1;
3e0be4ab
GM
18372 ;
18373 return 0;
18374}
6ad6792b 18375_ACEOF
d7ad186c
GM
18376if ac_fn_c_try_link "$LINENO"; then :
18377 gl_cv_func_c99_strtold=yes
f199cab1 18378else
d7ad186c 18379 gl_cv_func_c99_strtold=no
f199cab1 18380fi
d7ad186c
GM
18381rm -f core conftest.err conftest.$ac_objext \
18382 conftest$ac_exeext conftest.$ac_ext
f199cab1 18383fi
d7ad186c
GM
18384{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_c99_strtold" >&5
18385$as_echo "$gl_cv_func_c99_strtold" >&6; }
18386 if test $gl_cv_func_c99_strtold = yes; then
f199cab1 18387
d7ad186c 18388$as_echo "#define HAVE_C99_STRTOLD 1" >>confdefs.h
f199cab1 18389
5476a9a4 18390 fi
f199cab1 18391
f199cab1 18392
f199cab1
GM
18393
18394
4fda9c95 18395
3bf26e96
GM
18396
18397
eda33f78 18398
d7ad186c
GM
18399 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
18400$as_echo_n "checking if environ is properly declared... " >&6; }
18401 if test "${gt_cv_var_environ_declaration+set}" = set; then :
18402 $as_echo_n "(cached) " >&6
18403else
eda33f78 18404
d7ad186c
GM
18405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18406/* end confdefs.h. */
18407#if HAVE_UNISTD_H
18408 #include <unistd.h>
18409 #endif
18410 /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>. */
18411 #include <stdlib.h>
18412
18413 extern struct { int foo; } environ;
18414int
18415main ()
18416{
18417environ.foo = 1;
18418 ;
18419 return 0;
18420}
18421_ACEOF
18422if ac_fn_c_try_compile "$LINENO"; then :
18423 gt_cv_var_environ_declaration=no
18424else
18425 gt_cv_var_environ_declaration=yes
18426fi
18427rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18428fi
18429
18430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
18431$as_echo "$gt_cv_var_environ_declaration" >&6; }
18432 if test $gt_cv_var_environ_declaration = yes; then
18433
18434$as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
18435
18436 fi
18437
18438
18439 if test $gt_cv_var_environ_declaration != yes; then
18440 HAVE_DECL_ENVIRON=0
18441 fi
18442
18443
18444
3a019ab4
GM
18445 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
18446$as_echo_n "checking for complete errno.h... " >&6; }
18447if test "${gl_cv_header_errno_h_complete+set}" = set; then :
18448 $as_echo_n "(cached) " >&6
18449else
18450
18451 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18452/* end confdefs.h. */
18453
18454#include <errno.h>
18455#if !defined ETXTBSY
18456booboo
18457#endif
18458#if !defined ENOMSG
18459booboo
18460#endif
18461#if !defined EIDRM
18462booboo
18463#endif
18464#if !defined ENOLINK
18465booboo
18466#endif
18467#if !defined EPROTO
18468booboo
18469#endif
18470#if !defined EMULTIHOP
18471booboo
18472#endif
18473#if !defined EBADMSG
18474booboo
18475#endif
18476#if !defined EOVERFLOW
18477booboo
18478#endif
18479#if !defined ENOTSUP
18480booboo
18481#endif
18482#if !defined ENETRESET
18483booboo
18484#endif
18485#if !defined ECONNABORTED
18486booboo
18487#endif
18488#if !defined ESTALE
18489booboo
18490#endif
18491#if !defined EDQUOT
18492booboo
18493#endif
18494#if !defined ECANCELED
18495booboo
18496#endif
18497#if !defined EOWNERDEAD
18498booboo
18499#endif
18500#if !defined ENOTRECOVERABLE
18501booboo
18502#endif
18503#if !defined EILSEQ
18504booboo
18505#endif
18506
18507_ACEOF
18508if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18509 $EGREP "booboo" >/dev/null 2>&1; then :
18510 gl_cv_header_errno_h_complete=no
18511else
18512 gl_cv_header_errno_h_complete=yes
18513fi
18514rm -f conftest*
18515
d7ad186c 18516
3a019ab4
GM
18517fi
18518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
18519$as_echo "$gl_cv_header_errno_h_complete" >&6; }
18520 if test $gl_cv_header_errno_h_complete = yes; then
18521 ERRNO_H=''
18522 else
d7ad186c
GM
18523
18524
18525
18526
18527
d7ad186c
GM
18528
18529
d7ad186c 18530
3a019ab4
GM
18531 if test $gl_cv_have_include_next = yes; then
18532 gl_cv_next_errno_h='<'errno.h'>'
18533 else
18534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
18535$as_echo_n "checking absolute name of <errno.h>... " >&6; }
18536if test "${gl_cv_next_errno_h+set}" = set; then :
18537 $as_echo_n "(cached) " >&6
d7ad186c
GM
18538else
18539
3a019ab4
GM
18540 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18541/* end confdefs.h. */
18542#include <errno.h>
18543
d7ad186c 18544_ACEOF
3a019ab4
GM
18545 case "$host_os" in
18546 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18547 *) gl_absname_cpp="$ac_cpp" ;;
18548 esac
18549
18550 case "$host_os" in
18551 mingw*)
18552 gl_dirsep_regex='[/\\]'
18553 ;;
18554 *)
18555 gl_dirsep_regex='\/'
18556 ;;
18557 esac
18558 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18559
18560 gl_header_literal_regex=`echo 'errno.h' \
18561 | sed -e "$gl_make_literal_regex_sed"`
18562 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18563 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18564 s|^/[^/]|//&|
18565 p
18566 q
18567 }'
18568 gl_cv_next_errno_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18569 sed -n "$gl_absolute_header_sed"`'"'
d7ad186c 18570
d7ad186c 18571
2407788f 18572fi
3a019ab4
GM
18573{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
18574$as_echo "$gl_cv_next_errno_h" >&6; }
18575 fi
18576 NEXT_ERRNO_H=$gl_cv_next_errno_h
2407788f 18577
3a019ab4
GM
18578 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18579 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18580 gl_next_as_first_directive='<'errno.h'>'
18581 else
18582 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18583 gl_next_as_first_directive=$gl_cv_next_errno_h
18584 fi
18585 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
2407788f 18586
d7ad186c
GM
18587
18588
d7ad186c 18589
3a019ab4
GM
18590 ERRNO_H='errno.h'
18591 fi
18592
18593 if test -n "$ERRNO_H"; then
18594 GL_GENERATE_ERRNO_H_TRUE=
18595 GL_GENERATE_ERRNO_H_FALSE='#'
d7ad186c 18596else
3a019ab4
GM
18597 GL_GENERATE_ERRNO_H_TRUE='#'
18598 GL_GENERATE_ERRNO_H_FALSE=
d7ad186c 18599fi
d7ad186c 18600
d7ad186c 18601
3a019ab4
GM
18602 if test -n "$ERRNO_H"; then
18603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
18604$as_echo_n "checking for EMULTIHOP value... " >&6; }
18605if test "${gl_cv_header_errno_h_EMULTIHOP+set}" = set; then :
18606 $as_echo_n "(cached) " >&6
18607else
d7ad186c 18608
3a019ab4
GM
18609 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18610/* end confdefs.h. */
d7ad186c 18611
3a019ab4
GM
18612#include <errno.h>
18613#ifdef EMULTIHOP
18614yes
18615#endif
d7ad186c 18616
3a019ab4
GM
18617_ACEOF
18618if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18619 $EGREP "yes" >/dev/null 2>&1; then :
18620 gl_cv_header_errno_h_EMULTIHOP=yes
d7ad186c 18621else
3a019ab4 18622 gl_cv_header_errno_h_EMULTIHOP=no
d7ad186c 18623fi
3a019ab4
GM
18624rm -f conftest*
18625
18626 if test $gl_cv_header_errno_h_EMULTIHOP = no; then
18627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18628/* end confdefs.h. */
18629
18630#define _XOPEN_SOURCE_EXTENDED 1
18631#include <errno.h>
18632#ifdef EMULTIHOP
18633yes
18634#endif
d7ad186c 18635
d7ad186c 18636_ACEOF
3a019ab4
GM
18637if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18638 $EGREP "yes" >/dev/null 2>&1; then :
18639 gl_cv_header_errno_h_EMULTIHOP=hidden
18640fi
18641rm -f conftest*
d7ad186c 18642
3a019ab4
GM
18643 if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
18644 if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP" "
18645#define _XOPEN_SOURCE_EXTENDED 1
18646#include <errno.h>
18647/* The following two lines are a workaround against an autoconf-2.52 bug. */
18648#include <stdio.h>
18649#include <stdlib.h>
18650"; then :
d7ad186c 18651
3a019ab4 18652fi
d7ad186c 18653
3a019ab4
GM
18654 fi
18655 fi
d7ad186c 18656
3a019ab4
GM
18657fi
18658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
18659$as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
18660 case $gl_cv_header_errno_h_EMULTIHOP in
18661 yes | no)
18662 EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
18663 ;;
18664 *)
18665 EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
18666 ;;
18667 esac
d7ad186c
GM
18668
18669
3a019ab4 18670 fi
d7ad186c
GM
18671
18672
3a019ab4
GM
18673 if test -n "$ERRNO_H"; then
18674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
18675$as_echo_n "checking for ENOLINK value... " >&6; }
18676if test "${gl_cv_header_errno_h_ENOLINK+set}" = set; then :
d7ad186c
GM
18677 $as_echo_n "(cached) " >&6
18678else
d7ad186c 18679
3a019ab4 18680 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d7ad186c 18681/* end confdefs.h. */
3a019ab4
GM
18682
18683#include <errno.h>
18684#ifdef ENOLINK
18685yes
18686#endif
18687
18688_ACEOF
18689if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18690 $EGREP "yes" >/dev/null 2>&1; then :
18691 gl_cv_header_errno_h_ENOLINK=yes
18692else
18693 gl_cv_header_errno_h_ENOLINK=no
18694fi
18695rm -f conftest*
18696
18697 if test $gl_cv_header_errno_h_ENOLINK = no; then
18698 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18699/* end confdefs.h. */
18700
18701#define _XOPEN_SOURCE_EXTENDED 1
18702#include <errno.h>
18703#ifdef ENOLINK
18704yes
18705#endif
18706
18707_ACEOF
18708if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18709 $EGREP "yes" >/dev/null 2>&1; then :
18710 gl_cv_header_errno_h_ENOLINK=hidden
18711fi
18712rm -f conftest*
18713
18714 if test $gl_cv_header_errno_h_ENOLINK = hidden; then
18715 if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK" "
18716#define _XOPEN_SOURCE_EXTENDED 1
18717#include <errno.h>
18718/* The following two lines are a workaround against an autoconf-2.52 bug. */
18719#include <stdio.h>
18720#include <stdlib.h>
18721"; then :
18722
18723fi
18724
18725 fi
18726 fi
18727
18728fi
18729{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
18730$as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; }
18731 case $gl_cv_header_errno_h_ENOLINK in
18732 yes | no)
18733 ENOLINK_HIDDEN=0; ENOLINK_VALUE=
18734 ;;
18735 *)
18736 ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
18737 ;;
18738 esac
18739
18740
18741 fi
18742
18743
18744 if test -n "$ERRNO_H"; then
18745 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
18746$as_echo_n "checking for EOVERFLOW value... " >&6; }
18747if test "${gl_cv_header_errno_h_EOVERFLOW+set}" = set; then :
18748 $as_echo_n "(cached) " >&6
18749else
18750
18751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18752/* end confdefs.h. */
18753
18754#include <errno.h>
18755#ifdef EOVERFLOW
18756yes
18757#endif
18758
18759_ACEOF
18760if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18761 $EGREP "yes" >/dev/null 2>&1; then :
18762 gl_cv_header_errno_h_EOVERFLOW=yes
18763else
18764 gl_cv_header_errno_h_EOVERFLOW=no
18765fi
18766rm -f conftest*
18767
18768 if test $gl_cv_header_errno_h_EOVERFLOW = no; then
18769 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18770/* end confdefs.h. */
18771
18772#define _XOPEN_SOURCE_EXTENDED 1
18773#include <errno.h>
18774#ifdef EOVERFLOW
18775yes
18776#endif
18777
18778_ACEOF
18779if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18780 $EGREP "yes" >/dev/null 2>&1; then :
18781 gl_cv_header_errno_h_EOVERFLOW=hidden
18782fi
18783rm -f conftest*
18784
18785 if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
18786 if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW" "
18787#define _XOPEN_SOURCE_EXTENDED 1
18788#include <errno.h>
18789/* The following two lines are a workaround against an autoconf-2.52 bug. */
18790#include <stdio.h>
18791#include <stdlib.h>
18792"; then :
18793
18794fi
18795
18796 fi
18797 fi
18798
18799fi
18800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
18801$as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
18802 case $gl_cv_header_errno_h_EOVERFLOW in
18803 yes | no)
18804 EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
18805 ;;
18806 *)
18807 EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
18808 ;;
18809 esac
18810
18811
18812 fi
18813
18814
18815
18816
18817
18818
18819
18820
18821
18822
18823 GNULIB_FCNTL=0;
18824 GNULIB_NONBLOCKING=0;
18825 GNULIB_OPEN=0;
18826 GNULIB_OPENAT=0;
18827 HAVE_FCNTL=1;
18828 HAVE_OPENAT=1;
18829 REPLACE_FCNTL=0;
18830 REPLACE_OPEN=0;
18831 REPLACE_OPENAT=0;
18832
18833
0cdca42a
GM
18834
18835
3a019ab4
GM
18836ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
18837if test "x$ac_cv_type_mode_t" = x""yes; then :
18838
18839else
18840
18841cat >>confdefs.h <<_ACEOF
18842#define mode_t int
18843_ACEOF
18844
18845fi
18846
18847ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "$ac_includes_default"
18848if test "x$ac_cv_have_decl_fdatasync" = x""yes; then :
18849 ac_have_decl=1
18850else
18851 ac_have_decl=0
18852fi
18853
18854cat >>confdefs.h <<_ACEOF
18855#define HAVE_DECL_FDATASYNC $ac_have_decl
18856_ACEOF
18857
18858
18859
18860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for st_dm_mode in struct stat" >&5
18861$as_echo_n "checking for st_dm_mode in struct stat... " >&6; }
18862if test "${ac_cv_struct_st_dm_mode+set}" = set; then :
18863 $as_echo_n "(cached) " >&6
18864else
18865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18866/* end confdefs.h. */
18867
18868#include <sys/types.h>
18869#include <sys/stat.h>
18870int
18871main ()
18872{
18873struct stat s; s.st_dm_mode;
18874 ;
18875 return 0;
18876}
18877_ACEOF
18878if ac_fn_c_try_compile "$LINENO"; then :
18879 ac_cv_struct_st_dm_mode=yes
18880else
18881 ac_cv_struct_st_dm_mode=no
18882fi
18883rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18884fi
18885{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_st_dm_mode" >&5
18886$as_echo "$ac_cv_struct_st_dm_mode" >&6; }
18887
18888 if test $ac_cv_struct_st_dm_mode = yes; then
18889
18890$as_echo "#define HAVE_ST_DM_MODE 1" >>confdefs.h
18891
18892 fi
18893
18894
18895ac_fn_c_check_decl "$LINENO" "strmode" "ac_cv_have_decl_strmode" "$ac_includes_default"
18896if test "x$ac_cv_have_decl_strmode" = x""yes; then :
18897 ac_have_decl=1
18898else
18899 ac_have_decl=0
18900fi
18901
18902cat >>confdefs.h <<_ACEOF
18903#define HAVE_DECL_STRMODE $ac_have_decl
18904_ACEOF
18905
18906
18907
18908
3a019ab4
GM
18909 GNULIB_FCHMODAT=0;
18910 GNULIB_FSTAT=0;
18911 GNULIB_FSTATAT=0;
18912 GNULIB_FUTIMENS=0;
18913 GNULIB_LCHMOD=0;
18914 GNULIB_LSTAT=0;
18915 GNULIB_MKDIRAT=0;
18916 GNULIB_MKFIFO=0;
18917 GNULIB_MKFIFOAT=0;
18918 GNULIB_MKNOD=0;
18919 GNULIB_MKNODAT=0;
18920 GNULIB_STAT=0;
18921 GNULIB_UTIMENSAT=0;
18922 HAVE_FCHMODAT=1;
18923 HAVE_FSTATAT=1;
18924 HAVE_FUTIMENS=1;
18925 HAVE_LCHMOD=1;
18926 HAVE_LSTAT=1;
18927 HAVE_MKDIRAT=1;
18928 HAVE_MKFIFO=1;
18929 HAVE_MKFIFOAT=1;
18930 HAVE_MKNOD=1;
18931 HAVE_MKNODAT=1;
18932 HAVE_UTIMENSAT=1;
18933 REPLACE_FSTAT=0;
18934 REPLACE_FSTATAT=0;
18935 REPLACE_FUTIMENS=0;
18936 REPLACE_LSTAT=0;
18937 REPLACE_MKDIR=0;
18938 REPLACE_MKFIFO=0;
18939 REPLACE_MKNOD=0;
18940 REPLACE_STAT=0;
18941 REPLACE_UTIMENSAT=0;
18942
18943
18944 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
18945$as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
18946if test "${gl_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then :
18947 $as_echo_n "(cached) " >&6
18948else
18949 rm -f conftest.sym conftest.file
18950 echo >conftest.file
18951 if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then
18952 if test "$cross_compiling" = yes; then :
18953 case "$host_os" in
18954 # Guess yes on glibc systems.
18955 *-gnu*) gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
18956 # If we don't know, assume the worst.
18957 *) gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
18958 esac
18959
18960else
18961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18962/* end confdefs.h. */
18963$ac_includes_default
18964int
18965main ()
18966{
18967struct stat sbuf;
18968 /* Linux will dereference the symlink and fail, as required by
d7ad186c
GM
18969 POSIX. That is better in the sense that it means we will not
18970 have to compile and use the lstat wrapper. */
18971 return lstat ("conftest.sym/", &sbuf) == 0;
18972
18973 ;
18974 return 0;
18975}
18976_ACEOF
18977if ac_fn_c_try_run "$LINENO"; then :
18978 gl_cv_func_lstat_dereferences_slashed_symlink=yes
18979else
18980 gl_cv_func_lstat_dereferences_slashed_symlink=no
18981fi
18982rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18983 conftest.$ac_objext conftest.beam conftest.$ac_ext
18984fi
18985
18986 else
18987 # If the 'ln -s' command failed, then we probably don't even
18988 # have an lstat function.
18989 gl_cv_func_lstat_dereferences_slashed_symlink="guessing no"
18990 fi
18991 rm -f conftest.sym conftest.file
18992
18993fi
18994{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
18995$as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
18996 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
18997 *yes)
18998
18999cat >>confdefs.h <<_ACEOF
19000#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
19001_ACEOF
19002
19003 ;;
19004 esac
19005
19006
19007
19008
2407788f
GM
19009
19010
d7ad186c
GM
19011 GNULIB__EXIT=0;
19012 GNULIB_ATOLL=0;
19013 GNULIB_CALLOC_POSIX=0;
19014 GNULIB_CANONICALIZE_FILE_NAME=0;
19015 GNULIB_GETLOADAVG=0;
19016 GNULIB_GETSUBOPT=0;
19017 GNULIB_GRANTPT=0;
5476a9a4
GM
19018 GNULIB_MALLOC_POSIX=0;
19019 GNULIB_MBTOWC=0;
19020 GNULIB_MKDTEMP=0;
19021 GNULIB_MKOSTEMP=0;
19022 GNULIB_MKOSTEMPS=0;
19023 GNULIB_MKSTEMP=0;
19024 GNULIB_MKSTEMPS=0;
19025 GNULIB_POSIX_OPENPT=0;
19026 GNULIB_PTSNAME=0;
19027 GNULIB_PTSNAME_R=0;
19028 GNULIB_PUTENV=0;
19029 GNULIB_RANDOM=0;
19030 GNULIB_RANDOM_R=0;
19031 GNULIB_REALLOC_POSIX=0;
19032 GNULIB_REALPATH=0;
19033 GNULIB_RPMATCH=0;
2cdd55fc 19034 GNULIB_SECURE_GETENV=0;
5476a9a4
GM
19035 GNULIB_SETENV=0;
19036 GNULIB_STRTOD=0;
19037 GNULIB_STRTOLL=0;
19038 GNULIB_STRTOULL=0;
19039 GNULIB_SYSTEM_POSIX=0;
19040 GNULIB_UNLOCKPT=0;
19041 GNULIB_UNSETENV=0;
19042 GNULIB_WCTOMB=0;
19043 HAVE__EXIT=1;
19044 HAVE_ATOLL=1;
19045 HAVE_CANONICALIZE_FILE_NAME=1;
19046 HAVE_DECL_GETLOADAVG=1;
19047 HAVE_GETSUBOPT=1;
19048 HAVE_GRANTPT=1;
19049 HAVE_MKDTEMP=1;
19050 HAVE_MKOSTEMP=1;
19051 HAVE_MKOSTEMPS=1;
19052 HAVE_MKSTEMP=1;
19053 HAVE_MKSTEMPS=1;
19054 HAVE_POSIX_OPENPT=1;
19055 HAVE_PTSNAME=1;
19056 HAVE_PTSNAME_R=1;
19057 HAVE_RANDOM=1;
19058 HAVE_RANDOM_H=1;
19059 HAVE_RANDOM_R=1;
19060 HAVE_REALPATH=1;
19061 HAVE_RPMATCH=1;
2cdd55fc 19062 HAVE_SECURE_GETENV=1;
5476a9a4
GM
19063 HAVE_SETENV=1;
19064 HAVE_DECL_SETENV=1;
19065 HAVE_STRTOD=1;
19066 HAVE_STRTOLL=1;
19067 HAVE_STRTOULL=1;
19068 HAVE_STRUCT_RANDOM_DATA=1;
19069 HAVE_SYS_LOADAVG_H=0;
19070 HAVE_UNLOCKPT=1;
19071 HAVE_DECL_UNSETENV=1;
19072 REPLACE_CALLOC=0;
19073 REPLACE_CANONICALIZE_FILE_NAME=0;
19074 REPLACE_MALLOC=0;
19075 REPLACE_MBTOWC=0;
19076 REPLACE_MKSTEMP=0;
b6c9d18d 19077 REPLACE_PTSNAME=0;
5476a9a4
GM
19078 REPLACE_PTSNAME_R=0;
19079 REPLACE_PUTENV=0;
19080 REPLACE_RANDOM_R=0;
19081 REPLACE_REALLOC=0;
19082 REPLACE_REALPATH=0;
19083 REPLACE_SETENV=0;
19084 REPLACE_STRTOD=0;
19085 REPLACE_UNSETENV=0;
19086 REPLACE_WCTOMB=0;
f199cab1
GM
19087
19088
19089
f199cab1
GM
19090
19091
19092
19093
19094
19095
19096
19097
19098
19099
5f90be1b 19100
f199cab1
GM
19101
19102
19103 if test $gl_cv_have_include_next = yes; then
5476a9a4 19104 gl_cv_next_getopt_h='<'getopt.h'>'
f199cab1 19105 else
5476a9a4
GM
19106 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <getopt.h>" >&5
19107$as_echo_n "checking absolute name of <getopt.h>... " >&6; }
19108if test "${gl_cv_next_getopt_h+set}" = set; then :
5f90be1b 19109 $as_echo_n "(cached) " >&6
5f90be1b 19110else
f199cab1 19111
5476a9a4 19112 if test $ac_cv_header_getopt_h = yes; then
f199cab1
GM
19113
19114
19115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5f90be1b 19116/* end confdefs.h. */
5476a9a4 19117#include <getopt.h>
4fda9c95 19118
5f90be1b 19119_ACEOF
f199cab1
GM
19120 case "$host_os" in
19121 aix*) gl_absname_cpp="$ac_cpp -C" ;;
19122 *) gl_absname_cpp="$ac_cpp" ;;
19123 esac
5f90be1b 19124
f199cab1
GM
19125 case "$host_os" in
19126 mingw*)
19127 gl_dirsep_regex='[/\\]'
19128 ;;
19129 *)
19130 gl_dirsep_regex='\/'
19131 ;;
19132 esac
19133 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
5f90be1b 19134
5476a9a4 19135 gl_header_literal_regex=`echo 'getopt.h' \
f199cab1
GM
19136 | sed -e "$gl_make_literal_regex_sed"`
19137 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19138 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19139 s|^/[^/]|//&|
19140 p
19141 q
19142 }'
5476a9a4 19143 gl_cv_next_getopt_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
f199cab1
GM
19144 sed -n "$gl_absolute_header_sed"`'"'
19145 else
5476a9a4 19146 gl_cv_next_getopt_h='<'getopt.h'>'
f199cab1 19147 fi
5f90be1b
PE
19148
19149
3e0be4ab 19150fi
5476a9a4
GM
19151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5
19152$as_echo "$gl_cv_next_getopt_h" >&6; }
f199cab1 19153 fi
5476a9a4 19154 NEXT_GETOPT_H=$gl_cv_next_getopt_h
3e0be4ab 19155
f199cab1
GM
19156 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19157 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
5476a9a4 19158 gl_next_as_first_directive='<'getopt.h'>'
f199cab1
GM
19159 else
19160 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
5476a9a4 19161 gl_next_as_first_directive=$gl_cv_next_getopt_h
f199cab1 19162 fi
5476a9a4 19163 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive
f199cab1
GM
19164
19165
f199cab1 19166
f199cab1 19167
5476a9a4
GM
19168 if test $ac_cv_header_getopt_h = yes; then
19169 HAVE_GETOPT_H=1
19170 else
19171 HAVE_GETOPT_H=0
f199cab1
GM
19172 fi
19173
f199cab1 19174
5476a9a4 19175 gl_replace_getopt=
f199cab1 19176
5476a9a4
GM
19177 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
19178 for ac_header in getopt.h
19179do :
19180 ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
19181if test "x$ac_cv_header_getopt_h" = x""yes; then :
19182 cat >>confdefs.h <<_ACEOF
19183#define HAVE_GETOPT_H 1
19184_ACEOF
f199cab1 19185
5476a9a4
GM
19186else
19187 gl_replace_getopt=yes
3e0be4ab 19188fi
3e0be4ab 19189
5476a9a4 19190done
3e0be4ab 19191
5476a9a4 19192 fi
3e0be4ab 19193
5476a9a4
GM
19194 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
19195 for ac_func in getopt_long_only
19196do :
19197 ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only"
19198if test "x$ac_cv_func_getopt_long_only" = x""yes; then :
19199 cat >>confdefs.h <<_ACEOF
19200#define HAVE_GETOPT_LONG_ONLY 1
19201_ACEOF
3e0be4ab 19202
3e0be4ab 19203else
5476a9a4 19204 gl_replace_getopt=yes
3e0be4ab 19205fi
5476a9a4 19206done
3e0be4ab 19207
f199cab1 19208 fi
3e0be4ab 19209
5476a9a4
GM
19210 if test -z "$gl_replace_getopt"; then
19211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5
19212$as_echo_n "checking whether getopt is POSIX compatible... " >&6; }
19213if test "${gl_cv_func_getopt_posix+set}" = set; then :
3e0be4ab 19214 $as_echo_n "(cached) " >&6
5476a9a4
GM
19215else
19216
19217 if test $cross_compiling = no; then
19218 if test "$cross_compiling" = yes; then :
19219 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19220$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19221as_fn_error "cannot run test program while cross compiling
19222See \`config.log' for more details." "$LINENO" 5; }
3e0be4ab 19223else
f199cab1 19224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3e0be4ab 19225/* end confdefs.h. */
5476a9a4
GM
19226
19227#include <unistd.h>
19228#include <stdlib.h>
19229#include <string.h>
19230
f199cab1
GM
19231int
19232main ()
19233{
5476a9a4
GM
19234 static char program[] = "program";
19235 static char a[] = "-a";
19236 static char foo[] = "foo";
19237 static char bar[] = "bar";
19238 char *argv[] = { program, a, foo, bar, NULL };
19239 int c;
19240
19241 c = getopt (4, argv, "ab");
19242 if (!(c == 'a'))
19243 return 1;
19244 c = getopt (4, argv, "ab");
19245 if (!(c == -1))
19246 return 2;
19247 if (!(optind == 2))
19248 return 3;
f199cab1
GM
19249 return 0;
19250}
19251
3e0be4ab 19252_ACEOF
5476a9a4
GM
19253if ac_fn_c_try_run "$LINENO"; then :
19254 gl_cv_func_getopt_posix=maybe
3e0be4ab 19255else
5476a9a4 19256 gl_cv_func_getopt_posix=no
3e0be4ab 19257fi
5476a9a4
GM
19258rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19259 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1
GM
19260fi
19261
5476a9a4
GM
19262 if test $gl_cv_func_getopt_posix = maybe; then
19263 if test "$cross_compiling" = yes; then :
19264 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19265$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19266as_fn_error "cannot run test program while cross compiling
19267See \`config.log' for more details." "$LINENO" 5; }
3e0be4ab 19268else
5476a9a4
GM
19269 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19270/* end confdefs.h. */
3e0be4ab 19271
5476a9a4
GM
19272#include <unistd.h>
19273#include <stdlib.h>
19274#include <string.h>
3e0be4ab 19275
5476a9a4
GM
19276int
19277main ()
19278{
19279 static char program[] = "program";
19280 static char donald[] = "donald";
19281 static char p[] = "-p";
19282 static char billy[] = "billy";
19283 static char duck[] = "duck";
19284 static char a[] = "-a";
19285 static char bar[] = "bar";
19286 char *argv[] = { program, donald, p, billy, duck, a, bar, NULL };
19287 int c;
3e0be4ab 19288
5476a9a4
GM
19289 c = getopt (7, argv, "+abp:q:");
19290 if (!(c == -1))
19291 return 4;
19292 if (!(strcmp (argv[0], "program") == 0))
19293 return 5;
19294 if (!(strcmp (argv[1], "donald") == 0))
19295 return 6;
19296 if (!(strcmp (argv[2], "-p") == 0))
19297 return 7;
19298 if (!(strcmp (argv[3], "billy") == 0))
19299 return 8;
19300 if (!(strcmp (argv[4], "duck") == 0))
19301 return 9;
19302 if (!(strcmp (argv[5], "-a") == 0))
19303 return 10;
19304 if (!(strcmp (argv[6], "bar") == 0))
19305 return 11;
19306 if (!(optind == 1))
19307 return 12;
19308 return 0;
19309}
3e0be4ab
GM
19310
19311_ACEOF
5476a9a4
GM
19312if ac_fn_c_try_run "$LINENO"; then :
19313 gl_cv_func_getopt_posix=maybe
19314else
19315 gl_cv_func_getopt_posix=no
19316fi
19317rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19318 conftest.$ac_objext conftest.beam conftest.$ac_ext
19319fi
b0415a03 19320
5476a9a4
GM
19321 fi
19322 if test $gl_cv_func_getopt_posix = maybe; then
19323 if test "$cross_compiling" = yes; then :
19324 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19325$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19326as_fn_error "cannot run test program while cross compiling
19327See \`config.log' for more details." "$LINENO" 5; }
19328else
19329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19330/* end confdefs.h. */
b0415a03 19331
5476a9a4
GM
19332#include <unistd.h>
19333#include <stdlib.h>
19334#include <string.h>
3e0be4ab 19335
5476a9a4
GM
19336int
19337main ()
19338{
19339 static char program[] = "program";
19340 static char ab[] = "-ab";
19341 char *argv[3] = { program, ab, NULL };
19342 if (getopt (2, argv, "ab:") != 'a')
19343 return 13;
19344 if (getopt (2, argv, "ab:") != '?')
19345 return 14;
19346 if (optopt != 'b')
19347 return 15;
19348 if (optind != 2)
19349 return 16;
19350 return 0;
19351}
3e0be4ab 19352
5476a9a4
GM
19353_ACEOF
19354if ac_fn_c_try_run "$LINENO"; then :
19355 gl_cv_func_getopt_posix=yes
19356else
19357 gl_cv_func_getopt_posix=no
19358fi
19359rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19360 conftest.$ac_objext conftest.beam conftest.$ac_ext
3e0be4ab 19361fi
3e0be4ab 19362
5476a9a4
GM
19363 fi
19364 else
19365 case "$host_os" in
19366 darwin* | aix* | mingw*) gl_cv_func_getopt_posix="guessing no";;
19367 *) gl_cv_func_getopt_posix="guessing yes";;
19368 esac
19369 fi
3e0be4ab 19370
5476a9a4
GM
19371fi
19372{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5
19373$as_echo "$gl_cv_func_getopt_posix" >&6; }
19374 case "$gl_cv_func_getopt_posix" in
19375 *no) gl_replace_getopt=yes ;;
19376 esac
3e0be4ab
GM
19377 fi
19378
5476a9a4
GM
19379 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
19380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5
19381$as_echo_n "checking for working GNU getopt function... " >&6; }
19382if test "${gl_cv_func_getopt_gnu+set}" = set; then :
19383 $as_echo_n "(cached) " >&6
19384else
19385 # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the
19386 # optstring is necessary for programs like m4 that have POSIX-mandated
19387 # semantics for supporting options interspersed with files.
19388 # Also, since getopt_long is a GNU extension, we require optind=0.
19389 # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT;
19390 # so take care to revert to the correct (non-)export state.
19391 gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }'
19392 case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in
19393 xx) gl_had_POSIXLY_CORRECT=exported ;;
19394 x) gl_had_POSIXLY_CORRECT=yes ;;
19395 *) gl_had_POSIXLY_CORRECT= ;;
19396 esac
19397 POSIXLY_CORRECT=1
19398 export POSIXLY_CORRECT
19399 if test "$cross_compiling" = yes; then :
19400 gl_cv_func_getopt_gnu="guessing no"
3e0be4ab 19401
5476a9a4
GM
19402else
19403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19404/* end confdefs.h. */
19405#include <getopt.h>
19406 #include <stddef.h>
19407 #include <string.h>
3e0be4ab 19408
5476a9a4
GM
19409#include <stdlib.h>
19410#if defined __MACH__ && defined __APPLE__
19411/* Avoid a crash on Mac OS X. */
19412#include <mach/mach.h>
19413#include <mach/mach_error.h>
19414#include <mach/thread_status.h>
19415#include <mach/exception.h>
19416#include <mach/task.h>
19417#include <pthread.h>
19418/* The exception port on which our thread listens. */
19419static mach_port_t our_exception_port;
19420/* The main function of the thread listening for exceptions of type
19421 EXC_BAD_ACCESS. */
19422static void *
19423mach_exception_thread (void *arg)
19424{
19425 /* Buffer for a message to be received. */
19426 struct {
19427 mach_msg_header_t head;
19428 mach_msg_body_t msgh_body;
19429 char data[1024];
19430 } msg;
19431 mach_msg_return_t retval;
19432 /* Wait for a message on the exception port. */
19433 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
19434 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
19435 if (retval != MACH_MSG_SUCCESS)
19436 abort ();
19437 exit (1);
19438}
19439static void
19440nocrash_init (void)
19441{
19442 mach_port_t self = mach_task_self ();
19443 /* Allocate a port on which the thread shall listen for exceptions. */
19444 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
19445 == KERN_SUCCESS) {
19446 /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
19447 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
19448 MACH_MSG_TYPE_MAKE_SEND)
19449 == KERN_SUCCESS) {
19450 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
19451 for us. */
19452 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
19453 /* Create the thread listening on the exception port. */
19454 pthread_attr_t attr;
19455 pthread_t thread;
19456 if (pthread_attr_init (&attr) == 0
19457 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
19458 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
19459 pthread_attr_destroy (&attr);
19460 /* Replace the exception port info for these exceptions with our own.
19461 Note that we replace the exception port for the entire task, not only
19462 for a particular thread. This has the effect that when our exception
19463 port gets the message, the thread specific exception port has already
19464 been asked, and we don't need to bother about it.
19465 See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
19466 task_set_exception_ports (self, mask, our_exception_port,
19467 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
19468 }
19469 }
19470 }
19471}
19472#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
19473/* Avoid a crash on native Windows. */
19474#define WIN32_LEAN_AND_MEAN
19475#include <windows.h>
19476#include <winerror.h>
19477static LONG WINAPI
19478exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
19479{
19480 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
19481 {
19482 case EXCEPTION_ACCESS_VIOLATION:
19483 case EXCEPTION_IN_PAGE_ERROR:
19484 case EXCEPTION_STACK_OVERFLOW:
19485 case EXCEPTION_GUARD_PAGE:
19486 case EXCEPTION_PRIV_INSTRUCTION:
19487 case EXCEPTION_ILLEGAL_INSTRUCTION:
19488 case EXCEPTION_DATATYPE_MISALIGNMENT:
19489 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
19490 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
19491 exit (1);
19492 }
19493 return EXCEPTION_CONTINUE_SEARCH;
19494}
19495static void
19496nocrash_init (void)
19497{
19498 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
19499}
19500#else
19501/* Avoid a crash on POSIX systems. */
19502#include <signal.h>
19503/* A POSIX signal handler. */
19504static void
19505exception_handler (int sig)
19506{
19507 exit (1);
19508}
19509static void
19510nocrash_init (void)
19511{
19512#ifdef SIGSEGV
19513 signal (SIGSEGV, exception_handler);
19514#endif
19515#ifdef SIGBUS
19516 signal (SIGBUS, exception_handler);
19517#endif
19518}
19519#endif
3e0be4ab 19520
3e0be4ab 19521
5476a9a4
GM
19522int
19523main ()
19524{
3e0be4ab 19525
5476a9a4 19526 int result = 0;
3e0be4ab 19527
5476a9a4 19528 nocrash_init();
3e0be4ab 19529
5476a9a4
GM
19530 /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
19531 and fails on Mac OS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
19532 OSF/1 5.1, Solaris 10. */
19533 {
19534 static char conftest[] = "conftest";
19535 static char plus[] = "-+";
19536 char *argv[3] = { conftest, plus, NULL };
19537 opterr = 0;
19538 if (getopt (2, argv, "+a") != '?')
19539 result |= 1;
19540 }
19541 /* This code succeeds on glibc 2.8, mingw,
19542 and fails on Mac OS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
19543 IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */
19544 {
19545 static char program[] = "program";
19546 static char p[] = "-p";
19547 static char foo[] = "foo";
19548 static char bar[] = "bar";
19549 char *argv[] = { program, p, foo, bar, NULL };
3e0be4ab 19550
5476a9a4
GM
19551 optind = 1;
19552 if (getopt (4, argv, "p::") != 'p')
19553 result |= 2;
19554 else if (optarg != NULL)
19555 result |= 4;
19556 else if (getopt (4, argv, "p::") != -1)
19557 result |= 6;
19558 else if (optind != 2)
19559 result |= 8;
19560 }
19561 /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */
19562 {
19563 static char program[] = "program";
19564 static char foo[] = "foo";
19565 static char p[] = "-p";
19566 char *argv[] = { program, foo, p, NULL };
19567 optind = 0;
19568 if (getopt (3, argv, "-p") != 1)
19569 result |= 16;
19570 else if (getopt (3, argv, "-p") != 'p')
19571 result |= 16;
19572 }
19573 /* This code fails on glibc 2.11. */
19574 {
19575 static char program[] = "program";
19576 static char b[] = "-b";
19577 static char a[] = "-a";
19578 char *argv[] = { program, b, a, NULL };
19579 optind = opterr = 0;
19580 if (getopt (3, argv, "+:a:b") != 'b')
19581 result |= 32;
19582 else if (getopt (3, argv, "+:a:b") != ':')
19583 result |= 32;
19584 }
19585 /* This code dumps core on glibc 2.14. */
19586 {
19587 static char program[] = "program";
19588 static char w[] = "-W";
19589 static char dummy[] = "dummy";
19590 char *argv[] = { program, w, dummy, NULL };
19591 optind = opterr = 1;
19592 if (getopt (3, argv, "W;") != 'W')
19593 result |= 64;
19594 }
19595 return result;
3e0be4ab 19596
5476a9a4
GM
19597 ;
19598 return 0;
19599}
19600_ACEOF
19601if ac_fn_c_try_run "$LINENO"; then :
19602 gl_cv_func_getopt_gnu=yes
19603else
19604 gl_cv_func_getopt_gnu=no
19605fi
19606rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19607 conftest.$ac_objext conftest.beam conftest.$ac_ext
19608fi
3e0be4ab 19609
5476a9a4
GM
19610 case $gl_had_POSIXLY_CORRECT in
19611 exported) ;;
19612 yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;;
19613 *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;;
19614 esac
3e0be4ab 19615
5476a9a4
GM
19616fi
19617{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5
19618$as_echo "$gl_cv_func_getopt_gnu" >&6; }
19619 if test "$gl_cv_func_getopt_gnu" != yes; then
19620 gl_replace_getopt=yes
19621 else
19622 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt_long function" >&5
19623$as_echo_n "checking for working GNU getopt_long function... " >&6; }
19624if test "${gl_cv_func_getopt_long_gnu+set}" = set; then :
f199cab1
GM
19625 $as_echo_n "(cached) " >&6
19626else
5476a9a4
GM
19627 if test "$cross_compiling" = yes; then :
19628 case "$host_os" in
19629 openbsd*) gl_cv_func_getopt_long_gnu="guessing no";;
19630 *) gl_cv_func_getopt_long_gnu="guessing yes";;
19631 esac
3e0be4ab
GM
19632
19633else
19634 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19635/* end confdefs.h. */
5476a9a4
GM
19636#include <getopt.h>
19637 #include <stddef.h>
19638 #include <string.h>
f199cab1
GM
19639
19640int
19641main ()
369e19fc 19642{
5476a9a4
GM
19643static const struct option long_options[] =
19644 {
19645 { "xtremely-",no_argument, NULL, 1003 },
19646 { "xtra", no_argument, NULL, 1001 },
19647 { "xtreme", no_argument, NULL, 1002 },
19648 { "xtremely", no_argument, NULL, 1003 },
19649 { NULL, 0, NULL, 0 }
19650 };
19651 /* This code fails on OpenBSD 5.0. */
19652 {
19653 static char program[] = "program";
19654 static char xtremel[] = "--xtremel";
19655 char *argv[] = { program, xtremel, NULL };
19656 int option_index;
19657 optind = 1; opterr = 0;
19658 if (getopt_long (2, argv, "", long_options, &option_index) != 1003)
19659 return 1;
19660 }
19661 return 0;
f199cab1
GM
19662
19663 ;
19664 return 0;
369e19fc 19665}
f199cab1
GM
19666_ACEOF
19667if ac_fn_c_try_run "$LINENO"; then :
5476a9a4 19668 gl_cv_func_getopt_long_gnu=yes
f199cab1 19669else
5476a9a4 19670 gl_cv_func_getopt_long_gnu=no
f199cab1
GM
19671fi
19672rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19673 conftest.$ac_objext conftest.beam conftest.$ac_ext
19674fi
19675
5476a9a4 19676
f199cab1 19677fi
5476a9a4
GM
19678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_long_gnu" >&5
19679$as_echo "$gl_cv_func_getopt_long_gnu" >&6; }
19680 case "$gl_cv_func_getopt_long_gnu" in
19681 *yes) ;;
19682 *) gl_replace_getopt=yes ;;
19683 esac
19684 fi
19685 fi
f199cab1 19686
f199cab1 19687
f199cab1 19688
369e19fc
PE
19689
19690
5476a9a4
GM
19691
19692 REPLACE_GETOPT=0
19693 if test -n "$gl_replace_getopt"; then
19694 REPLACE_GETOPT=1
f199cab1 19695 fi
3e0be4ab 19696
5476a9a4 19697 if test $REPLACE_GETOPT = 1; then
369e19fc 19698
5476a9a4 19699 GETOPT_H=getopt.h
369e19fc 19700
5476a9a4 19701$as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
6ad6792b
GM
19702
19703
f199cab1 19704
5476a9a4 19705 fi
f199cab1 19706
5476a9a4
GM
19707ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default"
19708if test "x$ac_cv_have_decl_getenv" = x""yes; then :
19709 ac_have_decl=1
3e0be4ab 19710else
5476a9a4 19711 ac_have_decl=0
3e0be4ab 19712fi
e275c824 19713
5476a9a4
GM
19714cat >>confdefs.h <<_ACEOF
19715#define HAVE_DECL_GETENV $ac_have_decl
19716_ACEOF
19717
a6342fc8 19718:
f199cab1 19719
5476a9a4
GM
19720
19721
19722
19723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
19724$as_echo_n "checking for C/C++ restrict keyword... " >&6; }
19725if test "${ac_cv_c_restrict+set}" = set; then :
19726 $as_echo_n "(cached) " >&6
f199cab1 19727else
5476a9a4
GM
19728 ac_cv_c_restrict=no
19729 # The order here caters to the fact that C++ does not require restrict.
19730 for ac_kw in __restrict __restrict__ _Restrict restrict; do
19731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 19732/* end confdefs.h. */
5476a9a4
GM
19733typedef int * int_ptr;
19734 int foo (int_ptr $ac_kw ip) {
19735 return ip[0];
19736 }
f199cab1
GM
19737int
19738main ()
19739{
5476a9a4
GM
19740int s[1];
19741 int * $ac_kw t = s;
19742 t[0] = 0;
19743 return foo(t)
f199cab1
GM
19744 ;
19745 return 0;
19746}
19747_ACEOF
5476a9a4
GM
19748if ac_fn_c_try_compile "$LINENO"; then :
19749 ac_cv_c_restrict=$ac_kw
f199cab1 19750fi
5476a9a4
GM
19751rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19752 test "$ac_cv_c_restrict" != no && break
19753 done
f199cab1 19754
f199cab1 19755fi
5476a9a4
GM
19756{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
19757$as_echo "$ac_cv_c_restrict" >&6; }
f199cab1 19758
5476a9a4
GM
19759 case $ac_cv_c_restrict in
19760 restrict) ;;
19761 no) $as_echo "#define restrict /**/" >>confdefs.h
19762 ;;
19763 *) cat >>confdefs.h <<_ACEOF
19764#define restrict $ac_cv_c_restrict
19765_ACEOF
19766 ;;
19767 esac
f199cab1 19768
f199cab1 19769
5476a9a4
GM
19770 GNULIB_GETTIMEOFDAY=0;
19771 HAVE_GETTIMEOFDAY=1;
19772 HAVE_STRUCT_TIMEVAL=1;
19773 HAVE_SYS_TIME_H=1;
19774 REPLACE_GETTIMEOFDAY=0;
19775 REPLACE_STRUCT_TIMEVAL=0;
e275c824 19776
e275c824 19777
e275c824 19778
e275c824 19779
4fda9c95 19780
5fa4ac76 19781
5fa4ac76 19782
5fa4ac76 19783
f199cab1
GM
19784
19785
19786
5fa4ac76 19787
5fa4ac76 19788
5fa4ac76 19789
5fa4ac76 19790
5fa4ac76 19791
5476a9a4
GM
19792 if test $gl_cv_have_include_next = yes; then
19793 gl_cv_next_sys_time_h='<'sys/time.h'>'
19794 else
19795 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
19796$as_echo_n "checking absolute name of <sys/time.h>... " >&6; }
19797if test "${gl_cv_next_sys_time_h+set}" = set; then :
19798 $as_echo_n "(cached) " >&6
19799else
5fa4ac76 19800
5476a9a4 19801 if test $ac_cv_header_sys_time_h = yes; then
5fa4ac76
PE
19802
19803
5476a9a4
GM
19804 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19805/* end confdefs.h. */
19806#include <sys/time.h>
5fa4ac76 19807
5476a9a4
GM
19808_ACEOF
19809 case "$host_os" in
19810 aix*) gl_absname_cpp="$ac_cpp -C" ;;
19811 *) gl_absname_cpp="$ac_cpp" ;;
19812 esac
1f5d53eb 19813
5476a9a4
GM
19814 case "$host_os" in
19815 mingw*)
19816 gl_dirsep_regex='[/\\]'
19817 ;;
19818 *)
19819 gl_dirsep_regex='\/'
19820 ;;
19821 esac
19822 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
1f5d53eb 19823
5476a9a4
GM
19824 gl_header_literal_regex=`echo 'sys/time.h' \
19825 | sed -e "$gl_make_literal_regex_sed"`
19826 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19827 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19828 s|^/[^/]|//&|
19829 p
19830 q
19831 }'
19832 gl_cv_next_sys_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19833 sed -n "$gl_absolute_header_sed"`'"'
19834 else
19835 gl_cv_next_sys_time_h='<'sys/time.h'>'
19836 fi
1f5d53eb 19837
1f5d53eb 19838
5476a9a4
GM
19839fi
19840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
19841$as_echo "$gl_cv_next_sys_time_h" >&6; }
19842 fi
19843 NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
3e0be4ab 19844
5476a9a4
GM
19845 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19846 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19847 gl_next_as_first_directive='<'sys/time.h'>'
19848 else
19849 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19850 gl_next_as_first_directive=$gl_cv_next_sys_time_h
19851 fi
19852 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
3e0be4ab 19853
e275c824 19854
3e0be4ab 19855
f199cab1
GM
19856
19857
5476a9a4
GM
19858 if test $ac_cv_header_sys_time_h != yes; then
19859 HAVE_SYS_TIME_H=0
19860 fi
f199cab1
GM
19861
19862
19863
19864
19865
5476a9a4
GM
19866 if test $ac_cv_header_sys_socket_h != yes; then
19867 for ac_header in winsock2.h
19868do :
19869 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
19870if test "x$ac_cv_header_winsock2_h" = x""yes; then :
19871 cat >>confdefs.h <<_ACEOF
19872#define HAVE_WINSOCK2_H 1
19873_ACEOF
f199cab1 19874
5476a9a4 19875fi
3e0be4ab 19876
5476a9a4 19877done
3e0be4ab 19878
5476a9a4
GM
19879 fi
19880 if test "$ac_cv_header_winsock2_h" = yes; then
19881 HAVE_WINSOCK2_H=1
19882 UNISTD_H_HAVE_WINSOCK2_H=1
19883 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
19884 else
19885 HAVE_WINSOCK2_H=0
19886 fi
19887
19888
19889 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
19890$as_echo_n "checking for struct timeval... " >&6; }
19891if test "${gl_cv_sys_struct_timeval+set}" = set; then :
19892 $as_echo_n "(cached) " >&6
19893else
19894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19895/* end confdefs.h. */
19896#if HAVE_SYS_TIME_H
19897 #include <sys/time.h>
19898 #endif
19899 #include <time.h>
19900 #if HAVE_WINSOCK2_H
19901 # include <winsock2.h>
19902 #endif
f199cab1 19903
5476a9a4
GM
19904int
19905main ()
19906{
19907static struct timeval x; x.tv_sec = x.tv_usec;
19908 ;
19909 return 0;
19910}
19911_ACEOF
19912if ac_fn_c_try_compile "$LINENO"; then :
19913 gl_cv_sys_struct_timeval=yes
19914else
19915 gl_cv_sys_struct_timeval=no
f199cab1 19916fi
5476a9a4 19917rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 19918
5476a9a4
GM
19919fi
19920{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
19921$as_echo "$gl_cv_sys_struct_timeval" >&6; }
19922 if test $gl_cv_sys_struct_timeval != yes; then
19923 HAVE_STRUCT_TIMEVAL=0
19924 else
19925 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
19926$as_echo_n "checking for wide-enough struct timeval.tv_sec member... " >&6; }
19927if test "${gl_cv_sys_struct_timeval_tv_sec+set}" = set; then :
19928 $as_echo_n "(cached) " >&6
19929else
19930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19931/* end confdefs.h. */
19932#if HAVE_SYS_TIME_H
19933 #include <sys/time.h>
19934 #endif
19935 #include <time.h>
19936 #if HAVE_WINSOCK2_H
19937 # include <winsock2.h>
19938 #endif
f199cab1 19939
5476a9a4
GM
19940int
19941main ()
19942{
19943static struct timeval x;
19944 typedef int verify_tv_sec_type[
19945 sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
19946 ];
f199cab1 19947
5476a9a4
GM
19948 ;
19949 return 0;
19950}
19951_ACEOF
19952if ac_fn_c_try_compile "$LINENO"; then :
19953 gl_cv_sys_struct_timeval_tv_sec=yes
19954else
19955 gl_cv_sys_struct_timeval_tv_sec=no
19956fi
19957rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 19958
5476a9a4
GM
19959fi
19960{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
19961$as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
19962 if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
19963 REPLACE_STRUCT_TIMEVAL=1
19964 fi
19965 fi
f199cab1 19966
f199cab1
GM
19967
19968
19969
19970
19971
f199cab1 19972
5476a9a4
GM
19973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
19974$as_echo_n "checking for unsigned long long int... " >&6; }
19975if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then :
19976 $as_echo_n "(cached) " >&6
19977else
19978 ac_cv_type_unsigned_long_long_int=yes
19979 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
19980 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19981/* end confdefs.h. */
f199cab1 19982
5476a9a4
GM
19983 /* For now, do not test the preprocessor; as of 2007 there are too many
19984 implementations with broken preprocessors. Perhaps this can
19985 be revisited in 2012. In the meantime, code should not expect
19986 #if to work with literals wider than 32 bits. */
19987 /* Test literals. */
19988 long long int ll = 9223372036854775807ll;
19989 long long int nll = -9223372036854775807LL;
19990 unsigned long long int ull = 18446744073709551615ULL;
19991 /* Test constant expressions. */
19992 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
19993 ? 1 : -1)];
19994 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
19995 ? 1 : -1)];
19996 int i = 63;
19997int
19998main ()
19999{
20000/* Test availability of runtime routines for shift and division. */
20001 long long int llmax = 9223372036854775807ll;
20002 unsigned long long int ullmax = 18446744073709551615ull;
20003 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
20004 | (llmax / ll) | (llmax % ll)
20005 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
20006 | (ullmax / ull) | (ullmax % ull));
20007 ;
20008 return 0;
20009}
f199cab1 20010
e275c824 20011_ACEOF
5476a9a4 20012if ac_fn_c_try_link "$LINENO"; then :
3e0be4ab 20013
5476a9a4
GM
20014else
20015 ac_cv_type_unsigned_long_long_int=no
e275c824 20016fi
5476a9a4
GM
20017rm -f core conftest.err conftest.$ac_objext \
20018 conftest$ac_exeext conftest.$ac_ext
20019 fi
20020fi
20021{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
20022$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
20023 if test $ac_cv_type_unsigned_long_long_int = yes; then
e275c824 20024
5476a9a4 20025$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
e275c824 20026
5476a9a4 20027 fi
e275c824
PE
20028
20029
f199cab1 20030
5476a9a4
GM
20031 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
20032$as_echo_n "checking for long long int... " >&6; }
20033if test "${ac_cv_type_long_long_int+set}" = set; then :
20034 $as_echo_n "(cached) " >&6
20035else
20036 ac_cv_type_long_long_int=yes
20037 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
20038 ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
20039 if test $ac_cv_type_long_long_int = yes; then
20040 if test "$cross_compiling" = yes; then :
f199cab1 20041 :
5476a9a4
GM
20042else
20043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20044/* end confdefs.h. */
20045#include <limits.h>
20046 #ifndef LLONG_MAX
20047 # define HALF \
20048 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
20049 # define LLONG_MAX (HALF - 1 + HALF)
20050 #endif
20051int
20052main ()
20053{
20054long long int n = 1;
20055 int i;
20056 for (i = 0; ; i++)
20057 {
20058 long long int m = n << i;
20059 if (m >> i != n)
20060 return 1;
20061 if (LLONG_MAX / 2 < m)
20062 break;
20063 }
20064 return 0;
20065 ;
20066 return 0;
20067}
20068_ACEOF
20069if ac_fn_c_try_run "$LINENO"; then :
20070
20071else
20072 ac_cv_type_long_long_int=no
20073fi
20074rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20075 conftest.$ac_objext conftest.beam conftest.$ac_ext
20076fi
e275c824 20077
5476a9a4
GM
20078 fi
20079 fi
1f5d53eb 20080fi
5476a9a4
GM
20081{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
20082$as_echo "$ac_cv_type_long_long_int" >&6; }
20083 if test $ac_cv_type_long_long_int = yes; then
e275c824 20084
5476a9a4 20085$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
e275c824 20086
5476a9a4 20087 fi
e275c824
PE
20088
20089
e275c824
PE
20090
20091
20092
20093
5476a9a4
GM
20094 gl_cv_c_multiarch=no
20095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20096/* end confdefs.h. */
20097#ifndef __APPLE_CC__
20098 not a universal capable compiler
20099 #endif
20100 typedef int dummy;
e275c824 20101
5476a9a4
GM
20102_ACEOF
20103if ac_fn_c_try_compile "$LINENO"; then :
e275c824 20104
5476a9a4
GM
20105 arch=
20106 prev=
20107 for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
20108 if test -n "$prev"; then
20109 case $word in
20110 i?86 | x86_64 | ppc | ppc64)
20111 if test -z "$arch" || test "$arch" = "$word"; then
20112 arch="$word"
20113 else
20114 gl_cv_c_multiarch=yes
20115 fi
20116 ;;
20117 esac
20118 prev=
20119 else
20120 if test "x$word" = "x-arch"; then
20121 prev=arch
20122 fi
20123 fi
20124 done
f199cab1 20125
f199cab1 20126fi
5476a9a4
GM
20127rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20128 if test $gl_cv_c_multiarch = yes; then
20129 APPLE_UNIVERSAL_BUILD=1
20130 else
20131 APPLE_UNIVERSAL_BUILD=0
20132 fi
e275c824
PE
20133
20134
67342916 20135
67342916 20136
67342916 20137
5476a9a4
GM
20138 if test $ac_cv_type_long_long_int = yes; then
20139 HAVE_LONG_LONG_INT=1
20140 else
20141 HAVE_LONG_LONG_INT=0
20142 fi
e275c824 20143
e275c824 20144
5476a9a4
GM
20145 if test $ac_cv_type_unsigned_long_long_int = yes; then
20146 HAVE_UNSIGNED_LONG_LONG_INT=1
20147 else
20148 HAVE_UNSIGNED_LONG_LONG_INT=0
20149 fi
e275c824
PE
20150
20151
20152
5476a9a4
GM
20153 if test $ac_cv_header_wchar_h = yes; then
20154 HAVE_WCHAR_H=1
20155 else
20156 HAVE_WCHAR_H=0
20157 fi
e275c824 20158
e275c824 20159
5476a9a4
GM
20160 if test $ac_cv_header_inttypes_h = yes; then
20161 HAVE_INTTYPES_H=1
20162 else
20163 HAVE_INTTYPES_H=0
20164 fi
6c051bab 20165
942f733f 20166
5476a9a4
GM
20167 if test $ac_cv_header_sys_types_h = yes; then
20168 HAVE_SYS_TYPES_H=1
20169 else
20170 HAVE_SYS_TYPES_H=0
20171 fi
4fc2b746 20172
4fc2b746 20173
f199cab1
GM
20174
20175
20176
20177
20178
20179
20180
20181
20182
5476a9a4
GM
20183 if test $gl_cv_have_include_next = yes; then
20184 gl_cv_next_stdint_h='<'stdint.h'>'
20185 else
20186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
20187$as_echo_n "checking absolute name of <stdint.h>... " >&6; }
20188if test "${gl_cv_next_stdint_h+set}" = set; then :
20189 $as_echo_n "(cached) " >&6
20190else
f199cab1 20191
5476a9a4 20192 if test $ac_cv_header_stdint_h = yes; then
f199cab1
GM
20193
20194
5476a9a4
GM
20195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20196/* end confdefs.h. */
20197#include <stdint.h>
f199cab1 20198
5476a9a4
GM
20199_ACEOF
20200 case "$host_os" in
20201 aix*) gl_absname_cpp="$ac_cpp -C" ;;
20202 *) gl_absname_cpp="$ac_cpp" ;;
20203 esac
f199cab1 20204
5476a9a4
GM
20205 case "$host_os" in
20206 mingw*)
20207 gl_dirsep_regex='[/\\]'
20208 ;;
20209 *)
20210 gl_dirsep_regex='\/'
20211 ;;
20212 esac
20213 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
4fc2b746 20214
5476a9a4
GM
20215 gl_header_literal_regex=`echo 'stdint.h' \
20216 | sed -e "$gl_make_literal_regex_sed"`
20217 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20218 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20219 s|^/[^/]|//&|
20220 p
20221 q
20222 }'
20223 gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20224 sed -n "$gl_absolute_header_sed"`'"'
20225 else
20226 gl_cv_next_stdint_h='<'stdint.h'>'
20227 fi
4fc2b746 20228
4fc2b746 20229
5476a9a4
GM
20230fi
20231{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
20232$as_echo "$gl_cv_next_stdint_h" >&6; }
20233 fi
20234 NEXT_STDINT_H=$gl_cv_next_stdint_h
b0415a03 20235
5476a9a4
GM
20236 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20237 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20238 gl_next_as_first_directive='<'stdint.h'>'
20239 else
20240 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20241 gl_next_as_first_directive=$gl_cv_next_stdint_h
20242 fi
20243 NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
b0415a03 20244
4fc2b746 20245
f199cab1 20246
f199cab1 20247
5476a9a4
GM
20248 if test $ac_cv_header_stdint_h = yes; then
20249 HAVE_STDINT_H=1
20250 else
20251 HAVE_STDINT_H=0
20252 fi
f199cab1
GM
20253
20254
5476a9a4
GM
20255 if test $ac_cv_header_stdint_h = yes; then
20256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
20257$as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
20258if test "${gl_cv_header_working_stdint_h+set}" = set; then :
f199cab1
GM
20259 $as_echo_n "(cached) " >&6
20260else
5476a9a4
GM
20261 gl_cv_header_working_stdint_h=no
20262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20263/* end confdefs.h. */
4fc2b746
GM
20264
20265
5476a9a4
GM
20266#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
20267#include <stdint.h>
20268/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
20269#if !(defined WCHAR_MIN && defined WCHAR_MAX)
20270#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
20271#endif
4fc2b746 20272
942f733f 20273
5476a9a4
GM
20274 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20275 included before <wchar.h>. */
20276 #include <stddef.h>
20277 #include <signal.h>
20278 #if HAVE_WCHAR_H
20279 # include <stdio.h>
20280 # include <time.h>
20281 # include <wchar.h>
20282 #endif
e275c824 20283
f199cab1 20284
5476a9a4
GM
20285#ifdef INT8_MAX
20286int8_t a1 = INT8_MAX;
20287int8_t a1min = INT8_MIN;
20288#endif
20289#ifdef INT16_MAX
20290int16_t a2 = INT16_MAX;
20291int16_t a2min = INT16_MIN;
20292#endif
20293#ifdef INT32_MAX
20294int32_t a3 = INT32_MAX;
20295int32_t a3min = INT32_MIN;
20296#endif
20297#ifdef INT64_MAX
20298int64_t a4 = INT64_MAX;
20299int64_t a4min = INT64_MIN;
20300#endif
20301#ifdef UINT8_MAX
20302uint8_t b1 = UINT8_MAX;
20303#else
20304typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
20305#endif
20306#ifdef UINT16_MAX
20307uint16_t b2 = UINT16_MAX;
20308#endif
20309#ifdef UINT32_MAX
20310uint32_t b3 = UINT32_MAX;
20311#endif
20312#ifdef UINT64_MAX
20313uint64_t b4 = UINT64_MAX;
20314#endif
20315int_least8_t c1 = INT8_C (0x7f);
20316int_least8_t c1max = INT_LEAST8_MAX;
20317int_least8_t c1min = INT_LEAST8_MIN;
20318int_least16_t c2 = INT16_C (0x7fff);
20319int_least16_t c2max = INT_LEAST16_MAX;
20320int_least16_t c2min = INT_LEAST16_MIN;
20321int_least32_t c3 = INT32_C (0x7fffffff);
20322int_least32_t c3max = INT_LEAST32_MAX;
20323int_least32_t c3min = INT_LEAST32_MIN;
20324int_least64_t c4 = INT64_C (0x7fffffffffffffff);
20325int_least64_t c4max = INT_LEAST64_MAX;
20326int_least64_t c4min = INT_LEAST64_MIN;
20327uint_least8_t d1 = UINT8_C (0xff);
20328uint_least8_t d1max = UINT_LEAST8_MAX;
20329uint_least16_t d2 = UINT16_C (0xffff);
20330uint_least16_t d2max = UINT_LEAST16_MAX;
20331uint_least32_t d3 = UINT32_C (0xffffffff);
20332uint_least32_t d3max = UINT_LEAST32_MAX;
20333uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
20334uint_least64_t d4max = UINT_LEAST64_MAX;
20335int_fast8_t e1 = INT_FAST8_MAX;
20336int_fast8_t e1min = INT_FAST8_MIN;
20337int_fast16_t e2 = INT_FAST16_MAX;
20338int_fast16_t e2min = INT_FAST16_MIN;
20339int_fast32_t e3 = INT_FAST32_MAX;
20340int_fast32_t e3min = INT_FAST32_MIN;
20341int_fast64_t e4 = INT_FAST64_MAX;
20342int_fast64_t e4min = INT_FAST64_MIN;
20343uint_fast8_t f1 = UINT_FAST8_MAX;
20344uint_fast16_t f2 = UINT_FAST16_MAX;
20345uint_fast32_t f3 = UINT_FAST32_MAX;
20346uint_fast64_t f4 = UINT_FAST64_MAX;
20347#ifdef INTPTR_MAX
20348intptr_t g = INTPTR_MAX;
20349intptr_t gmin = INTPTR_MIN;
20350#endif
20351#ifdef UINTPTR_MAX
20352uintptr_t h = UINTPTR_MAX;
20353#endif
20354intmax_t i = INTMAX_MAX;
20355uintmax_t j = UINTMAX_MAX;
5fa4ac76 20356
5476a9a4
GM
20357#include <limits.h> /* for CHAR_BIT */
20358#define TYPE_MINIMUM(t) \
20359 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
20360#define TYPE_MAXIMUM(t) \
20361 ((t) ((t) 0 < (t) -1 \
20362 ? (t) -1 \
20363 : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
20364struct s {
20365 int check_PTRDIFF:
20366 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
20367 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
20368 ? 1 : -1;
20369 /* Detect bug in FreeBSD 6.0 / ia64. */
20370 int check_SIG_ATOMIC:
20371 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
20372 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
20373 ? 1 : -1;
20374 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
20375 int check_WCHAR:
20376 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
20377 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
20378 ? 1 : -1;
20379 /* Detect bug in mingw. */
20380 int check_WINT:
20381 WINT_MIN == TYPE_MINIMUM (wint_t)
20382 && WINT_MAX == TYPE_MAXIMUM (wint_t)
20383 ? 1 : -1;
5fa4ac76 20384
5476a9a4
GM
20385 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
20386 int check_UINT8_C:
20387 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
20388 int check_UINT16_C:
20389 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
20390
20391 /* Detect bugs in OpenBSD 3.9 stdint.h. */
20392#ifdef UINT8_MAX
20393 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
3e0be4ab 20394#endif
5476a9a4
GM
20395#ifdef UINT16_MAX
20396 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
20397#endif
20398#ifdef UINT32_MAX
20399 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
20400#endif
20401#ifdef UINT64_MAX
20402 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
20403#endif
20404 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
20405 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
20406 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
20407 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
20408 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
20409 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
20410 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
20411 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
20412 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
20413 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
20414 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
20415};
20416
f199cab1
GM
20417int
20418main ()
20419{
5476a9a4 20420
f199cab1
GM
20421 ;
20422 return 0;
20423}
20424_ACEOF
5476a9a4
GM
20425if ac_fn_c_try_compile "$LINENO"; then :
20426 if test "$cross_compiling" = yes; then :
20427 gl_cv_header_working_stdint_h=yes
40e27e7f 20428
5476a9a4
GM
20429else
20430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20431/* end confdefs.h. */
40e27e7f 20432
f199cab1 20433
5476a9a4
GM
20434#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
20435#include <stdint.h>
f199cab1
GM
20436
20437
5476a9a4
GM
20438 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20439 included before <wchar.h>. */
20440 #include <stddef.h>
20441 #include <signal.h>
20442 #if HAVE_WCHAR_H
20443 # include <stdio.h>
20444 # include <time.h>
20445 # include <wchar.h>
20446 #endif
f199cab1 20447
d87ffdb7 20448
5476a9a4
GM
20449#include <stdio.h>
20450#include <string.h>
20451#define MVAL(macro) MVAL1(macro)
20452#define MVAL1(expression) #expression
20453static const char *macro_values[] =
20454 {
20455#ifdef INT8_MAX
20456 MVAL (INT8_MAX),
20457#endif
20458#ifdef INT16_MAX
20459 MVAL (INT16_MAX),
20460#endif
20461#ifdef INT32_MAX
20462 MVAL (INT32_MAX),
20463#endif
20464#ifdef INT64_MAX
20465 MVAL (INT64_MAX),
20466#endif
20467#ifdef UINT8_MAX
20468 MVAL (UINT8_MAX),
20469#endif
20470#ifdef UINT16_MAX
20471 MVAL (UINT16_MAX),
20472#endif
20473#ifdef UINT32_MAX
20474 MVAL (UINT32_MAX),
20475#endif
20476#ifdef UINT64_MAX
20477 MVAL (UINT64_MAX),
20478#endif
20479 NULL
20480 };
f199cab1 20481
3e0be4ab
GM
20482int
20483main ()
20484{
5476a9a4
GM
20485
20486 const char **mv;
20487 for (mv = macro_values; *mv != NULL; mv++)
20488 {
20489 const char *value = *mv;
20490 /* Test whether it looks like a cast expression. */
20491 if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
20492 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
20493 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
20494 || strncmp (value, "((int)"/*)*/, 6) == 0
20495 || strncmp (value, "((signed short)"/*)*/, 15) == 0
20496 || strncmp (value, "((signed char)"/*)*/, 14) == 0)
20497 return mv - macro_values + 1;
20498 }
3e0be4ab 20499 return 0;
5476a9a4 20500
f199cab1
GM
20501 ;
20502 return 0;
20503}
20504_ACEOF
5476a9a4
GM
20505if ac_fn_c_try_run "$LINENO"; then :
20506 gl_cv_header_working_stdint_h=yes
f199cab1 20507fi
5476a9a4
GM
20508rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20509 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1
GM
20510fi
20511
d87ffdb7 20512
5476a9a4
GM
20513fi
20514rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d87ffdb7 20515
5476a9a4
GM
20516fi
20517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
20518$as_echo "$gl_cv_header_working_stdint_h" >&6; }
20519 fi
20520 if test "$gl_cv_header_working_stdint_h" = yes; then
20521 STDINT_H=
20522 else
20523 for ac_header in sys/inttypes.h sys/bitypes.h
20524do :
20525 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
20526ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
20527eval as_val=\$$as_ac_Header
20528 if test "x$as_val" = x""yes; then :
20529 cat >>confdefs.h <<_ACEOF
20530#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
20531_ACEOF
d87ffdb7 20532
5476a9a4 20533fi
d87ffdb7 20534
5476a9a4 20535done
7d2a1c5e 20536
5476a9a4
GM
20537 if test $ac_cv_header_sys_inttypes_h = yes; then
20538 HAVE_SYS_INTTYPES_H=1
20539 else
20540 HAVE_SYS_INTTYPES_H=0
20541 fi
7d2a1c5e 20542
5476a9a4
GM
20543 if test $ac_cv_header_sys_bitypes_h = yes; then
20544 HAVE_SYS_BITYPES_H=1
20545 else
20546 HAVE_SYS_BITYPES_H=0
20547 fi
7d2a1c5e 20548
f199cab1
GM
20549
20550
20551
5476a9a4 20552 if test $APPLE_UNIVERSAL_BUILD = 0; then
f199cab1
GM
20553
20554
5476a9a4
GM
20555 for gltype in ptrdiff_t size_t ; do
20556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
20557$as_echo_n "checking for bit size of $gltype... " >&6; }
20558if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
20559 $as_echo_n "(cached) " >&6
20560else
20561 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
20562 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20563 included before <wchar.h>. */
20564 #include <stddef.h>
20565 #include <signal.h>
20566 #if HAVE_WCHAR_H
20567 # include <stdio.h>
20568 # include <time.h>
20569 # include <wchar.h>
20570 #endif
f199cab1 20571
5476a9a4 20572#include <limits.h>"; then :
f199cab1 20573
5476a9a4
GM
20574else
20575 result=unknown
20576fi
f199cab1 20577
5476a9a4 20578 eval gl_cv_bitsizeof_${gltype}=\$result
f199cab1 20579
5476a9a4
GM
20580fi
20581eval ac_res=\$gl_cv_bitsizeof_${gltype}
20582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20583$as_echo "$ac_res" >&6; }
20584 eval result=\$gl_cv_bitsizeof_${gltype}
20585 if test $result = unknown; then
20586 result=0
20587 fi
20588 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
20589 cat >>confdefs.h <<_ACEOF
20590#define BITSIZEOF_${GLTYPE} $result
20591_ACEOF
f199cab1 20592
5476a9a4
GM
20593 eval BITSIZEOF_${GLTYPE}=\$result
20594 done
f199cab1
GM
20595
20596
5476a9a4 20597 fi
f199cab1
GM
20598
20599
5476a9a4
GM
20600 for gltype in sig_atomic_t wchar_t wint_t ; do
20601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
20602$as_echo_n "checking for bit size of $gltype... " >&6; }
20603if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
20604 $as_echo_n "(cached) " >&6
20605else
20606 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
20607 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20608 included before <wchar.h>. */
20609 #include <stddef.h>
20610 #include <signal.h>
20611 #if HAVE_WCHAR_H
20612 # include <stdio.h>
20613 # include <time.h>
20614 # include <wchar.h>
20615 #endif
f199cab1 20616
5476a9a4 20617#include <limits.h>"; then :
f199cab1 20618
f199cab1 20619else
5476a9a4 20620 result=unknown
7d2a1c5e 20621fi
7d2a1c5e 20622
5476a9a4 20623 eval gl_cv_bitsizeof_${gltype}=\$result
7d2a1c5e 20624
3e0be4ab 20625fi
5476a9a4
GM
20626eval ac_res=\$gl_cv_bitsizeof_${gltype}
20627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20628$as_echo "$ac_res" >&6; }
20629 eval result=\$gl_cv_bitsizeof_${gltype}
20630 if test $result = unknown; then
20631 result=0
20632 fi
20633 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
20634 cat >>confdefs.h <<_ACEOF
20635#define BITSIZEOF_${GLTYPE} $result
3e0be4ab 20636_ACEOF
7d2a1c5e 20637
5476a9a4
GM
20638 eval BITSIZEOF_${GLTYPE}=\$result
20639 done
7d2a1c5e
GM
20640
20641
5476a9a4
GM
20642
20643
20644 for gltype in sig_atomic_t wchar_t wint_t ; do
20645 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
20646$as_echo_n "checking whether $gltype is signed... " >&6; }
20647if { as_var=gl_cv_type_${gltype}_signed; eval "test \"\${$as_var+set}\" = set"; }; then :
3e0be4ab
GM
20648 $as_echo_n "(cached) " >&6
20649else
f199cab1
GM
20650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20651/* end confdefs.h. */
f199cab1 20652
5476a9a4
GM
20653 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20654 included before <wchar.h>. */
20655 #include <stddef.h>
20656 #include <signal.h>
20657 #if HAVE_WCHAR_H
20658 # include <stdio.h>
20659 # include <time.h>
20660 # include <wchar.h>
20661 #endif
20662
20663 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
f199cab1
GM
20664int
20665main ()
20666{
5476a9a4 20667
f199cab1
GM
20668 ;
20669 return 0;
20670}
20671_ACEOF
20672if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4 20673 result=yes
f199cab1 20674else
5476a9a4 20675 result=no
f199cab1
GM
20676fi
20677rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5476a9a4 20678 eval gl_cv_type_${gltype}_signed=\$result
7d2a1c5e 20679
3e0be4ab 20680fi
5476a9a4
GM
20681eval ac_res=\$gl_cv_type_${gltype}_signed
20682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20683$as_echo "$ac_res" >&6; }
20684 eval result=\$gl_cv_type_${gltype}_signed
20685 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
20686 if test "$result" = yes; then
20687 cat >>confdefs.h <<_ACEOF
20688#define HAVE_SIGNED_${GLTYPE} 1
f199cab1 20689_ACEOF
d87ffdb7 20690
5476a9a4
GM
20691 eval HAVE_SIGNED_${GLTYPE}=1
20692 else
20693 eval HAVE_SIGNED_${GLTYPE}=0
20694 fi
20695 done
f199cab1 20696
e275c824 20697
5476a9a4
GM
20698 gl_cv_type_ptrdiff_t_signed=yes
20699 gl_cv_type_size_t_signed=no
20700 if test $APPLE_UNIVERSAL_BUILD = 0; then
e275c824 20701
e275c824 20702
5476a9a4
GM
20703 for gltype in ptrdiff_t size_t ; do
20704 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
20705$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
20706if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
16c3e636
PE
20707 $as_echo_n "(cached) " >&6
20708else
5476a9a4
GM
20709 eval gl_cv_type_${gltype}_suffix=no
20710 eval result=\$gl_cv_type_${gltype}_signed
20711 if test "$result" = yes; then
20712 glsufu=
20713 else
20714 glsufu=u
20715 fi
20716 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
20717 case $glsuf in
20718 '') gltype1='int';;
20719 l) gltype1='long int';;
20720 ll) gltype1='long long int';;
20721 i64) gltype1='__int64';;
20722 u) gltype1='unsigned int';;
20723 ul) gltype1='unsigned long int';;
20724 ull) gltype1='unsigned long long int';;
20725 ui64)gltype1='unsigned __int64';;
20726 esac
20727 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 20728/* end confdefs.h. */
16c3e636 20729
5476a9a4
GM
20730 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20731 included before <wchar.h>. */
20732 #include <stddef.h>
20733 #include <signal.h>
20734 #if HAVE_WCHAR_H
20735 # include <stdio.h>
20736 # include <time.h>
20737 # include <wchar.h>
20738 #endif
1f5d53eb 20739
5476a9a4
GM
20740 extern $gltype foo;
20741 extern $gltype1 foo;
f199cab1
GM
20742int
20743main ()
20744{
5476a9a4 20745
f199cab1
GM
20746 ;
20747 return 0;
20748}
20749_ACEOF
20750if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4 20751 eval gl_cv_type_${gltype}_suffix=\$glsuf
f199cab1
GM
20752fi
20753rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5476a9a4
GM
20754 eval result=\$gl_cv_type_${gltype}_suffix
20755 test "$result" != no && break
20756 done
f199cab1 20757fi
5476a9a4
GM
20758eval ac_res=\$gl_cv_type_${gltype}_suffix
20759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20760$as_echo "$ac_res" >&6; }
20761 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
20762 eval result=\$gl_cv_type_${gltype}_suffix
20763 test "$result" = no && result=
20764 eval ${GLTYPE}_SUFFIX=\$result
20765 cat >>confdefs.h <<_ACEOF
20766#define ${GLTYPE}_SUFFIX $result
20767_ACEOF
16c3e636 20768
5476a9a4 20769 done
16c3e636 20770
3e0be4ab 20771
5476a9a4
GM
20772 fi
20773
20774
20775 for gltype in sig_atomic_t wchar_t wint_t ; do
20776 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
20777$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
20778if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
1fd182f0
PE
20779 $as_echo_n "(cached) " >&6
20780else
5476a9a4
GM
20781 eval gl_cv_type_${gltype}_suffix=no
20782 eval result=\$gl_cv_type_${gltype}_signed
20783 if test "$result" = yes; then
20784 glsufu=
20785 else
20786 glsufu=u
20787 fi
20788 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
20789 case $glsuf in
20790 '') gltype1='int';;
20791 l) gltype1='long int';;
20792 ll) gltype1='long long int';;
20793 i64) gltype1='__int64';;
20794 u) gltype1='unsigned int';;
20795 ul) gltype1='unsigned long int';;
20796 ull) gltype1='unsigned long long int';;
20797 ui64)gltype1='unsigned __int64';;
20798 esac
20799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1fd182f0 20800/* end confdefs.h. */
5476a9a4
GM
20801
20802 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20803 included before <wchar.h>. */
20804 #include <stddef.h>
20805 #include <signal.h>
20806 #if HAVE_WCHAR_H
20807 # include <stdio.h>
20808 # include <time.h>
20809 # include <wchar.h>
20810 #endif
20811
20812 extern $gltype foo;
20813 extern $gltype1 foo;
1fd182f0
PE
20814int
20815main ()
20816{
5476a9a4 20817
1fd182f0
PE
20818 ;
20819 return 0;
20820}
20821_ACEOF
3e0be4ab 20822if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4 20823 eval gl_cv_type_${gltype}_suffix=\$glsuf
1f5d53eb 20824fi
3e0be4ab 20825rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5476a9a4
GM
20826 eval result=\$gl_cv_type_${gltype}_suffix
20827 test "$result" != no && break
20828 done
f199cab1 20829fi
5476a9a4
GM
20830eval ac_res=\$gl_cv_type_${gltype}_suffix
20831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20832$as_echo "$ac_res" >&6; }
20833 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
20834 eval result=\$gl_cv_type_${gltype}_suffix
20835 test "$result" = no && result=
20836 eval ${GLTYPE}_SUFFIX=\$result
20837 cat >>confdefs.h <<_ACEOF
20838#define ${GLTYPE}_SUFFIX $result
f199cab1
GM
20839_ACEOF
20840
5476a9a4 20841 done
f199cab1 20842
f199cab1 20843
f199cab1 20844
5476a9a4
GM
20845 if test $BITSIZEOF_WINT_T -lt 32; then
20846 BITSIZEOF_WINT_T=32
20847 fi
f199cab1 20848
5476a9a4
GM
20849 STDINT_H=stdint.h
20850 fi
f199cab1 20851
5476a9a4
GM
20852 if test -n "$STDINT_H"; then
20853 GL_GENERATE_STDINT_H_TRUE=
20854 GL_GENERATE_STDINT_H_FALSE='#'
20855else
20856 GL_GENERATE_STDINT_H_TRUE='#'
20857 GL_GENERATE_STDINT_H_FALSE=
f199cab1
GM
20858fi
20859
f199cab1 20860
f199cab1 20861
3e0be4ab 20862
f199cab1 20863
5476a9a4
GM
20864 GNULIB_IMAXABS=0;
20865 GNULIB_IMAXDIV=0;
20866 GNULIB_STRTOIMAX=0;
20867 GNULIB_STRTOUMAX=0;
20868 HAVE_DECL_IMAXABS=1;
20869 HAVE_DECL_IMAXDIV=1;
20870 HAVE_DECL_STRTOIMAX=1;
20871 HAVE_DECL_STRTOUMAX=1;
20872 REPLACE_STRTOIMAX=0;
20873 INT32_MAX_LT_INTMAX_MAX=1;
20874 INT64_MAX_EQ_LONG_MAX='defined _LP64';
20875 PRI_MACROS_BROKEN=0;
20876 PRIPTR_PREFIX=__PRIPTR_PREFIX;
20877 UINT32_MAX_LT_UINTMAX_MAX=1;
20878 UINT64_MAX_EQ_ULONG_MAX='defined _LP64';
1fd182f0 20879
1fd182f0 20880
1f5d53eb 20881
3e0be4ab
GM
20882
20883
1fd182f0 20884
3e0be4ab 20885
3e0be4ab 20886
f199cab1 20887
1fd182f0 20888
1f5d53eb 20889
1f5d53eb 20890
1f5d53eb 20891
3e0be4ab 20892
3e0be4ab 20893
5476a9a4
GM
20894 if test $gl_cv_have_include_next = yes; then
20895 gl_cv_next_inttypes_h='<'inttypes.h'>'
20896 else
20897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
20898$as_echo_n "checking absolute name of <inttypes.h>... " >&6; }
20899if test "${gl_cv_next_inttypes_h+set}" = set; then :
20900 $as_echo_n "(cached) " >&6
f199cab1 20901else
2b1928b8 20902
5476a9a4 20903 if test $ac_cv_header_inttypes_h = yes; then
3e0be4ab
GM
20904
20905
5476a9a4 20906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 20907/* end confdefs.h. */
5476a9a4 20908#include <inttypes.h>
3e0be4ab 20909
f199cab1 20910_ACEOF
5476a9a4
GM
20911 case "$host_os" in
20912 aix*) gl_absname_cpp="$ac_cpp -C" ;;
20913 *) gl_absname_cpp="$ac_cpp" ;;
20914 esac
1fd182f0 20915
5476a9a4
GM
20916 case "$host_os" in
20917 mingw*)
20918 gl_dirsep_regex='[/\\]'
20919 ;;
20920 *)
20921 gl_dirsep_regex='\/'
20922 ;;
20923 esac
20924 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
1fd182f0 20925
5476a9a4
GM
20926 gl_header_literal_regex=`echo 'inttypes.h' \
20927 | sed -e "$gl_make_literal_regex_sed"`
20928 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20929 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20930 s|^/[^/]|//&|
20931 p
20932 q
20933 }'
20934 gl_cv_next_inttypes_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20935 sed -n "$gl_absolute_header_sed"`'"'
20936 else
20937 gl_cv_next_inttypes_h='<'inttypes.h'>'
20938 fi
1fd182f0
PE
20939
20940
5476a9a4
GM
20941fi
20942{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
20943$as_echo "$gl_cv_next_inttypes_h" >&6; }
20944 fi
20945 NEXT_INTTYPES_H=$gl_cv_next_inttypes_h
1fd182f0 20946
5476a9a4
GM
20947 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20948 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20949 gl_next_as_first_directive='<'inttypes.h'>'
20950 else
20951 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20952 gl_next_as_first_directive=$gl_cv_next_inttypes_h
20953 fi
20954 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
34119902
GM
20955
20956
3e0be4ab 20957
34119902 20958
3e0be4ab 20959
34119902 20960
b0415a03 20961
b0415a03 20962
3e0be4ab 20963
34119902 20964
34119902 20965
5476a9a4
GM
20966 case "$host_os" in
20967 mingw*)
20968 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
20969$as_echo_n "checking for 64-bit off_t... " >&6; }
20970if test "${gl_cv_type_off_t_64+set}" = set; then :
f199cab1
GM
20971 $as_echo_n "(cached) " >&6
20972else
5476a9a4
GM
20973 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20974/* end confdefs.h. */
20975#include <sys/types.h>
20976 int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
20977
20978int
20979main ()
20980{
20981
20982 ;
20983 return 0;
20984}
f199cab1 20985_ACEOF
5476a9a4
GM
20986if ac_fn_c_try_compile "$LINENO"; then :
20987 gl_cv_type_off_t_64=yes
20988else
20989 gl_cv_type_off_t_64=no
f199cab1 20990fi
5476a9a4 20991rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34119902 20992
5476a9a4
GM
20993fi
20994{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
20995$as_echo "$gl_cv_type_off_t_64" >&6; }
20996 if test $gl_cv_type_off_t_64 = no; then
20997 WINDOWS_64_BIT_OFF_T=1
20998 else
20999 WINDOWS_64_BIT_OFF_T=0
21000 fi
21001 WINDOWS_64_BIT_ST_SIZE=1
21002 ;;
21003 *)
21004 WINDOWS_64_BIT_OFF_T=0
21005 WINDOWS_64_BIT_ST_SIZE=0
21006 ;;
21007 esac
34119902
GM
21008
21009
34119902
GM
21010
21011
283c7aed
GM
21012 GNULIB_FFSL=0;
21013 GNULIB_FFSLL=0;
21014 GNULIB_MEMCHR=0;
21015 GNULIB_MEMMEM=0;
21016 GNULIB_MEMPCPY=0;
21017 GNULIB_MEMRCHR=0;
21018 GNULIB_RAWMEMCHR=0;
21019 GNULIB_STPCPY=0;
21020 GNULIB_STPNCPY=0;
21021 GNULIB_STRCHRNUL=0;
21022 GNULIB_STRDUP=0;
21023 GNULIB_STRNCAT=0;
21024 GNULIB_STRNDUP=0;
21025 GNULIB_STRNLEN=0;
21026 GNULIB_STRPBRK=0;
21027 GNULIB_STRSEP=0;
21028 GNULIB_STRSTR=0;
21029 GNULIB_STRCASESTR=0;
21030 GNULIB_STRTOK_R=0;
21031 GNULIB_MBSLEN=0;
21032 GNULIB_MBSNLEN=0;
21033 GNULIB_MBSCHR=0;
21034 GNULIB_MBSRCHR=0;
21035 GNULIB_MBSSTR=0;
21036 GNULIB_MBSCASECMP=0;
21037 GNULIB_MBSNCASECMP=0;
21038 GNULIB_MBSPCASECMP=0;
21039 GNULIB_MBSCASESTR=0;
21040 GNULIB_MBSCSPN=0;
21041 GNULIB_MBSPBRK=0;
21042 GNULIB_MBSSPN=0;
21043 GNULIB_MBSSEP=0;
21044 GNULIB_MBSTOK_R=0;
21045 GNULIB_STRERROR=0;
21046 GNULIB_STRERROR_R=0;
21047 GNULIB_STRSIGNAL=0;
21048 GNULIB_STRVERSCMP=0;
21049 HAVE_MBSLEN=0;
21050 HAVE_FFSL=1;
21051 HAVE_FFSLL=1;
21052 HAVE_MEMCHR=1;
21053 HAVE_DECL_MEMMEM=1;
21054 HAVE_MEMPCPY=1;
21055 HAVE_DECL_MEMRCHR=1;
21056 HAVE_RAWMEMCHR=1;
21057 HAVE_STPCPY=1;
21058 HAVE_STPNCPY=1;
21059 HAVE_STRCHRNUL=1;
21060 HAVE_DECL_STRDUP=1;
21061 HAVE_DECL_STRNDUP=1;
21062 HAVE_DECL_STRNLEN=1;
21063 HAVE_STRPBRK=1;
21064 HAVE_STRSEP=1;
21065 HAVE_STRCASESTR=1;
21066 HAVE_DECL_STRTOK_R=1;
21067 HAVE_DECL_STRERROR_R=1;
21068 HAVE_DECL_STRSIGNAL=1;
21069 HAVE_STRVERSCMP=1;
21070 REPLACE_MEMCHR=0;
21071 REPLACE_MEMMEM=0;
21072 REPLACE_STPNCPY=0;
21073 REPLACE_STRDUP=0;
21074 REPLACE_STRSTR=0;
21075 REPLACE_STRCASESTR=0;
21076 REPLACE_STRCHRNUL=0;
21077 REPLACE_STRERROR=0;
21078 REPLACE_STRERROR_R=0;
21079 REPLACE_STRNCAT=0;
21080 REPLACE_STRNDUP=0;
21081 REPLACE_STRNLEN=0;
21082 REPLACE_STRSIGNAL=0;
21083 REPLACE_STRTOK_R=0;
21084 UNDEFINE_STRTOK_R=0;
21085
21086ac_fn_c_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default"
21087if test "x$ac_cv_have_decl_memrchr" = x""yes; then :
21088 ac_have_decl=1
21089else
21090 ac_have_decl=0
21091fi
21092
21093cat >>confdefs.h <<_ACEOF
21094#define HAVE_DECL_MEMRCHR $ac_have_decl
21095_ACEOF
21096
21097
e412eb97
GM
21098
21099
5476a9a4
GM
21100 GNULIB_MKTIME=0;
21101 GNULIB_NANOSLEEP=0;
21102 GNULIB_STRPTIME=0;
21103 GNULIB_TIMEGM=0;
21104 GNULIB_TIME_R=0;
21105 HAVE_DECL_LOCALTIME_R=1;
21106 HAVE_NANOSLEEP=1;
21107 HAVE_STRPTIME=1;
21108 HAVE_TIMEGM=1;
21109 REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
21110 REPLACE_MKTIME=GNULIB_PORTCHECK;
21111 REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
21112 REPLACE_TIMEGM=GNULIB_PORTCHECK;
34119902 21113
2393bc74
GM
21114ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default"
21115if test "x$ac_cv_have_decl_alarm" = x""yes; then :
21116 ac_have_decl=1
21117else
21118 ac_have_decl=0
21119fi
3e0be4ab 21120
2393bc74
GM
21121cat >>confdefs.h <<_ACEOF
21122#define HAVE_DECL_ALARM $ac_have_decl
21123_ACEOF
3e0be4ab
GM
21124
21125
0cdca42a
GM
21126
21127
5476a9a4
GM
21128 GNULIB_PSELECT=0;
21129 GNULIB_SELECT=0;
21130 HAVE_PSELECT=1;
21131 REPLACE_PSELECT=0;
21132 REPLACE_SELECT=0;
21133
21134
3e0be4ab 21135
5476a9a4
GM
21136
21137
21138
21139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/select.h> is self-contained" >&5
21140$as_echo_n "checking whether <sys/select.h> is self-contained... " >&6; }
21141if test "${gl_cv_header_sys_select_h_selfcontained+set}" = set; then :
f199cab1 21142 $as_echo_n "(cached) " >&6
3e0be4ab 21143else
5476a9a4
GM
21144
21145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3e0be4ab 21146/* end confdefs.h. */
5476a9a4 21147#include <sys/select.h>
3e0be4ab
GM
21148int
21149main ()
21150{
5476a9a4 21151struct timeval b;
3e0be4ab
GM
21152 ;
21153 return 0;
21154}
34119902 21155_ACEOF
f199cab1 21156if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4 21157 gl_cv_header_sys_select_h_selfcontained=yes
3e0be4ab 21158else
5476a9a4 21159 gl_cv_header_sys_select_h_selfcontained=no
3e0be4ab 21160fi
f199cab1 21161rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5476a9a4
GM
21162 if test $gl_cv_header_sys_select_h_selfcontained = yes; then
21163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21164/* end confdefs.h. */
21165#include <sys/select.h>
21166int
21167main ()
21168{
21169int memset; int bzero;
21170 ;
21171 return 0;
21172}
3e0be4ab 21173
5476a9a4
GM
21174_ACEOF
21175if ac_fn_c_try_compile "$LINENO"; then :
f199cab1
GM
21176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21177/* end confdefs.h. */
5476a9a4 21178#include <sys/select.h>
f199cab1
GM
21179int
21180main ()
21181{
5476a9a4
GM
21182
21183 #undef memset
21184 #define memset nonexistent_memset
21185 extern
21186 #ifdef __cplusplus
21187 "C"
21188 #endif
21189 void *memset (void *, int, unsigned long);
21190 #undef bzero
21191 #define bzero nonexistent_bzero
21192 extern
21193 #ifdef __cplusplus
21194 "C"
21195 #endif
21196 void bzero (void *, unsigned long);
21197 fd_set fds;
21198 FD_ZERO (&fds);
21199
f199cab1
GM
21200 ;
21201 return 0;
21202}
5476a9a4 21203
f199cab1 21204_ACEOF
5476a9a4
GM
21205if ac_fn_c_try_link "$LINENO"; then :
21206
f199cab1 21207else
5476a9a4 21208 gl_cv_header_sys_select_h_selfcontained=no
f199cab1 21209fi
5476a9a4
GM
21210rm -f core conftest.err conftest.$ac_objext \
21211 conftest$ac_exeext conftest.$ac_ext
1fd182f0 21212
f199cab1 21213fi
5476a9a4
GM
21214rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21215 fi
1fd182f0 21216
f199cab1 21217fi
5476a9a4
GM
21218{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_select_h_selfcontained" >&5
21219$as_echo "$gl_cv_header_sys_select_h_selfcontained" >&6; }
1fd182f0
PE
21220
21221
b06b1098 21222
0eb775a3
GM
21223
21224
b06b1098 21225
1fd182f0 21226
1fd182f0 21227
5476a9a4
GM
21228
21229 if test $gl_cv_have_include_next = yes; then
21230 gl_cv_next_sys_select_h='<'sys/select.h'>'
21231 else
21232 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/select.h>" >&5
21233$as_echo_n "checking absolute name of <sys/select.h>... " >&6; }
21234if test "${gl_cv_next_sys_select_h+set}" = set; then :
f199cab1 21235 $as_echo_n "(cached) " >&6
3e0be4ab 21236else
1fd182f0 21237
5476a9a4
GM
21238 if test $ac_cv_header_sys_select_h = yes; then
21239
21240
21241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21242/* end confdefs.h. */
21243#include <sys/select.h>
21244
21245_ACEOF
21246 case "$host_os" in
21247 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21248 *) gl_absname_cpp="$ac_cpp" ;;
21249 esac
21250
21251 case "$host_os" in
21252 mingw*)
21253 gl_dirsep_regex='[/\\]'
21254 ;;
21255 *)
21256 gl_dirsep_regex='\/'
21257 ;;
21258 esac
21259 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21260
21261 gl_header_literal_regex=`echo 'sys/select.h' \
21262 | sed -e "$gl_make_literal_regex_sed"`
21263 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21264 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21265 s|^/[^/]|//&|
21266 p
21267 q
21268 }'
21269 gl_cv_next_sys_select_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21270 sed -n "$gl_absolute_header_sed"`'"'
21271 else
21272 gl_cv_next_sys_select_h='<'sys/select.h'>'
21273 fi
1fd182f0 21274
3e0be4ab 21275
1f5d53eb 21276fi
5476a9a4
GM
21277{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_select_h" >&5
21278$as_echo "$gl_cv_next_sys_select_h" >&6; }
21279 fi
21280 NEXT_SYS_SELECT_H=$gl_cv_next_sys_select_h
1fd182f0 21281
5476a9a4
GM
21282 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21283 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21284 gl_next_as_first_directive='<'sys/select.h'>'
21285 else
21286 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21287 gl_next_as_first_directive=$gl_cv_next_sys_select_h
21288 fi
21289 NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H=$gl_next_as_first_directive
1fd182f0
PE
21290
21291
5476a9a4
GM
21292
21293
21294 if test $ac_cv_header_sys_select_h = yes; then
21295 HAVE_SYS_SELECT_H=1
21296 else
21297 HAVE_SYS_SELECT_H=0
21298 fi
21299
21300
21301
21302
21303
21304 if test $ac_cv_header_sys_socket_h != yes; then
21305 for ac_header in winsock2.h
21306do :
21307 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
21308if test "x$ac_cv_header_winsock2_h" = x""yes; then :
21309 cat >>confdefs.h <<_ACEOF
21310#define HAVE_WINSOCK2_H 1
f199cab1 21311_ACEOF
5476a9a4 21312
f199cab1 21313fi
3e0be4ab 21314
5476a9a4 21315done
3e0be4ab 21316
5476a9a4
GM
21317 fi
21318 if test "$ac_cv_header_winsock2_h" = yes; then
21319 HAVE_WINSOCK2_H=1
21320 UNISTD_H_HAVE_WINSOCK2_H=1
21321 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
21322 else
21323 HAVE_WINSOCK2_H=0
21324 fi
f199cab1 21325
f199cab1 21326
f199cab1 21327
f199cab1 21328
3e0be4ab 21329
3e0be4ab 21330
3e0be4ab 21331
3e0be4ab 21332
5476a9a4
GM
21333 GNULIB_PTHREAD_SIGMASK=0;
21334 GNULIB_RAISE=0;
21335 GNULIB_SIGNAL_H_SIGPIPE=0;
21336 GNULIB_SIGPROCMASK=0;
21337 GNULIB_SIGACTION=0;
21338 HAVE_POSIX_SIGNALBLOCKING=1;
21339 HAVE_PTHREAD_SIGMASK=1;
21340 HAVE_RAISE=1;
21341 HAVE_SIGSET_T=1;
21342 HAVE_SIGINFO_T=1;
21343 HAVE_SIGACTION=1;
21344 HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
21345
21346 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
f199cab1 21347
5476a9a4
GM
21348 HAVE_SIGHANDLER_T=1;
21349 REPLACE_PTHREAD_SIGMASK=0;
21350 REPLACE_RAISE=0;
1f5d53eb 21351
1fd182f0 21352
b06b1098 21353
1fd182f0 21354
3e0be4ab
GM
21355
21356
f077f61d 21357
5476a9a4
GM
21358 ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
21359 #include <signal.h>
21360 /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
21361 #include <sys/types.h>
21362
21363"
21364if test "x$ac_cv_type_sigset_t" = x""yes; then :
21365
21366cat >>confdefs.h <<_ACEOF
21367#define HAVE_SIGSET_T 1
f199cab1 21368_ACEOF
3e0be4ab 21369
5476a9a4
GM
21370gl_cv_type_sigset_t=yes
21371else
21372 gl_cv_type_sigset_t=no
f199cab1 21373fi
3e0be4ab 21374
5476a9a4
GM
21375 if test $gl_cv_type_sigset_t != yes; then
21376 HAVE_SIGSET_T=0
21377 fi
3e0be4ab 21378
1f5d53eb 21379
3e0be4ab 21380
5476a9a4
GM
21381 if test $ac_cv_header_sys_socket_h = no; then
21382 for ac_header in ws2tcpip.h
21383do :
21384 ac_fn_c_check_header_mongrel "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default"
21385if test "x$ac_cv_header_ws2tcpip_h" = x""yes; then :
21386 cat >>confdefs.h <<_ACEOF
21387#define HAVE_WS2TCPIP_H 1
21388_ACEOF
3e0be4ab 21389
5476a9a4 21390fi
3e0be4ab 21391
5476a9a4
GM
21392done
21393
21394 fi
21395
21396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
21397$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
21398if test "${ac_cv_header_stdbool_h+set}" = set; then :
21399 $as_echo_n "(cached) " >&6
21400else
21401 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21402/* end confdefs.h. */
1f5d53eb 21403
5476a9a4
GM
21404 #include <stdbool.h>
21405 #ifndef bool
21406 "error: bool is not defined"
21407 #endif
21408 #ifndef false
21409 "error: false is not defined"
21410 #endif
21411 #if false
21412 "error: false is not 0"
21413 #endif
21414 #ifndef true
21415 "error: true is not defined"
21416 #endif
21417 #if true != 1
21418 "error: true is not 1"
21419 #endif
21420 #ifndef __bool_true_false_are_defined
21421 "error: __bool_true_false_are_defined is not defined"
21422 #endif
21423
21424 struct s { _Bool s: 1; _Bool t; } s;
21425
21426 char a[true == 1 ? 1 : -1];
21427 char b[false == 0 ? 1 : -1];
21428 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
21429 char d[(bool) 0.5 == true ? 1 : -1];
21430 /* See body of main program for 'e'. */
21431 char f[(_Bool) 0.0 == false ? 1 : -1];
21432 char g[true];
21433 char h[sizeof (_Bool)];
21434 char i[sizeof s.t];
21435 enum { j = false, k = true, l = false * true, m = true * 256 };
21436 /* The following fails for
21437 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
21438 _Bool n[m];
21439 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
21440 char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
21441 /* Catch a bug in an HP-UX C compiler. See
21442 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
21443 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
21444 */
21445 _Bool q = true;
21446 _Bool *pq = &q;
1ebc9c87
GM
21447
21448int
21449main ()
21450{
f199cab1 21451
5476a9a4
GM
21452 bool e = &s;
21453 *pq |= q;
21454 *pq |= ! q;
21455 /* Refer to every declared value, to avoid compiler optimizations. */
21456 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
21457 + !m + !n + !o + !p + !q + !pq);
f199cab1 21458
5476a9a4 21459 ;
1ebc9c87
GM
21460 return 0;
21461}
21462_ACEOF
5476a9a4
GM
21463if ac_fn_c_try_compile "$LINENO"; then :
21464 ac_cv_header_stdbool_h=yes
1ebc9c87 21465else
5476a9a4 21466 ac_cv_header_stdbool_h=no
1ebc9c87 21467fi
5476a9a4 21468rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1ebc9c87 21469fi
5476a9a4
GM
21470{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
21471$as_echo "$ac_cv_header_stdbool_h" >&6; }
21472 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
21473if test "x$ac_cv_type__Bool" = x""yes; then :
1ebc9c87 21474
5476a9a4
GM
21475cat >>confdefs.h <<_ACEOF
21476#define HAVE__BOOL 1
21477_ACEOF
1ebc9c87 21478
1ebc9c87
GM
21479
21480fi
21481
1ebc9c87 21482
1ebc9c87 21483
5476a9a4
GM
21484 REPLACE_NULL=0;
21485 HAVE_WCHAR_T=1;
21486
21487
21488 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
21489$as_echo_n "checking for wchar_t... " >&6; }
21490if test "${gt_cv_c_wchar_t+set}" = set; then :
21491 $as_echo_n "(cached) " >&6
21492else
21493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21494/* end confdefs.h. */
21495#include <stddef.h>
21496 wchar_t foo = (wchar_t)'\0';
21497int
21498main ()
21499{
21500
21501 ;
21502 return 0;
21503}
21504_ACEOF
21505if ac_fn_c_try_compile "$LINENO"; then :
21506 gt_cv_c_wchar_t=yes
21507else
21508 gt_cv_c_wchar_t=no
21509fi
21510rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1ebc9c87 21511fi
5476a9a4
GM
21512{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
21513$as_echo "$gt_cv_c_wchar_t" >&6; }
21514 if test $gt_cv_c_wchar_t = yes; then
1ebc9c87 21515
5476a9a4
GM
21516$as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
21517
21518 fi
21519
21520
21521 GNULIB_DPRINTF=0;
21522 GNULIB_FCLOSE=0;
21523 GNULIB_FDOPEN=0;
21524 GNULIB_FFLUSH=0;
21525 GNULIB_FGETC=0;
21526 GNULIB_FGETS=0;
21527 GNULIB_FOPEN=0;
21528 GNULIB_FPRINTF=0;
21529 GNULIB_FPRINTF_POSIX=0;
21530 GNULIB_FPURGE=0;
21531 GNULIB_FPUTC=0;
21532 GNULIB_FPUTS=0;
21533 GNULIB_FREAD=0;
21534 GNULIB_FREOPEN=0;
21535 GNULIB_FSCANF=0;
21536 GNULIB_FSEEK=0;
21537 GNULIB_FSEEKO=0;
21538 GNULIB_FTELL=0;
21539 GNULIB_FTELLO=0;
21540 GNULIB_FWRITE=0;
21541 GNULIB_GETC=0;
21542 GNULIB_GETCHAR=0;
21543 GNULIB_GETDELIM=0;
21544 GNULIB_GETLINE=0;
21545 GNULIB_OBSTACK_PRINTF=0;
21546 GNULIB_OBSTACK_PRINTF_POSIX=0;
21547 GNULIB_PCLOSE=0;
21548 GNULIB_PERROR=0;
21549 GNULIB_POPEN=0;
21550 GNULIB_PRINTF=0;
21551 GNULIB_PRINTF_POSIX=0;
21552 GNULIB_PUTC=0;
21553 GNULIB_PUTCHAR=0;
21554 GNULIB_PUTS=0;
21555 GNULIB_REMOVE=0;
21556 GNULIB_RENAME=0;
21557 GNULIB_RENAMEAT=0;
21558 GNULIB_SCANF=0;
21559 GNULIB_SNPRINTF=0;
21560 GNULIB_SPRINTF_POSIX=0;
21561 GNULIB_STDIO_H_NONBLOCKING=0;
21562 GNULIB_STDIO_H_SIGPIPE=0;
21563 GNULIB_TMPFILE=0;
21564 GNULIB_VASPRINTF=0;
21565 GNULIB_VFSCANF=0;
21566 GNULIB_VSCANF=0;
21567 GNULIB_VDPRINTF=0;
21568 GNULIB_VFPRINTF=0;
21569 GNULIB_VFPRINTF_POSIX=0;
21570 GNULIB_VPRINTF=0;
21571 GNULIB_VPRINTF_POSIX=0;
21572 GNULIB_VSNPRINTF=0;
21573 GNULIB_VSPRINTF_POSIX=0;
21574 HAVE_DECL_FPURGE=1;
21575 HAVE_DECL_FSEEKO=1;
21576 HAVE_DECL_FTELLO=1;
21577 HAVE_DECL_GETDELIM=1;
21578 HAVE_DECL_GETLINE=1;
21579 HAVE_DECL_OBSTACK_PRINTF=1;
21580 HAVE_DECL_SNPRINTF=1;
21581 HAVE_DECL_VSNPRINTF=1;
21582 HAVE_DPRINTF=1;
21583 HAVE_FSEEKO=1;
21584 HAVE_FTELLO=1;
21585 HAVE_PCLOSE=1;
21586 HAVE_POPEN=1;
21587 HAVE_RENAMEAT=1;
21588 HAVE_VASPRINTF=1;
21589 HAVE_VDPRINTF=1;
21590 REPLACE_DPRINTF=0;
21591 REPLACE_FCLOSE=0;
21592 REPLACE_FDOPEN=0;
21593 REPLACE_FFLUSH=0;
21594 REPLACE_FOPEN=0;
21595 REPLACE_FPRINTF=0;
21596 REPLACE_FPURGE=0;
21597 REPLACE_FREOPEN=0;
21598 REPLACE_FSEEK=0;
21599 REPLACE_FSEEKO=0;
21600 REPLACE_FTELL=0;
21601 REPLACE_FTELLO=0;
21602 REPLACE_GETDELIM=0;
21603 REPLACE_GETLINE=0;
21604 REPLACE_OBSTACK_PRINTF=0;
21605 REPLACE_PERROR=0;
21606 REPLACE_POPEN=0;
21607 REPLACE_PRINTF=0;
21608 REPLACE_REMOVE=0;
21609 REPLACE_RENAME=0;
21610 REPLACE_RENAMEAT=0;
21611 REPLACE_SNPRINTF=0;
21612 REPLACE_SPRINTF=0;
21613 REPLACE_STDIO_READ_FUNCS=0;
21614 REPLACE_STDIO_WRITE_FUNCS=0;
21615 REPLACE_TMPFILE=0;
21616 REPLACE_VASPRINTF=0;
21617 REPLACE_VDPRINTF=0;
21618 REPLACE_VFPRINTF=0;
21619 REPLACE_VPRINTF=0;
21620 REPLACE_VSNPRINTF=0;
21621 REPLACE_VSPRINTF=0;
1ebc9c87 21622
5476a9a4
GM
21623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
21624$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
21625if test "${ac_cv_struct_tm+set}" = set; then :
1ebc9c87
GM
21626 $as_echo_n "(cached) " >&6
21627else
5476a9a4 21628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1ebc9c87 21629/* end confdefs.h. */
5476a9a4
GM
21630#include <sys/types.h>
21631#include <time.h>
1ebc9c87
GM
21632
21633int
21634main ()
21635{
5476a9a4
GM
21636struct tm tm;
21637 int *p = &tm.tm_sec;
21638 return !p;
1ebc9c87
GM
21639 ;
21640 return 0;
21641}
21642_ACEOF
5476a9a4
GM
21643if ac_fn_c_try_compile "$LINENO"; then :
21644 ac_cv_struct_tm=time.h
1ebc9c87 21645else
5476a9a4 21646 ac_cv_struct_tm=sys/time.h
1ebc9c87 21647fi
5476a9a4 21648rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1ebc9c87 21649fi
5476a9a4
GM
21650{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
21651$as_echo "$ac_cv_struct_tm" >&6; }
21652if test $ac_cv_struct_tm = sys/time.h; then
1ebc9c87 21653
5476a9a4 21654$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
1ebc9c87 21655
1ebc9c87
GM
21656fi
21657
5476a9a4
GM
21658ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
21659#include <$ac_cv_struct_tm>
1fd182f0 21660
5476a9a4
GM
21661"
21662if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
1fd182f0 21663
5476a9a4
GM
21664cat >>confdefs.h <<_ACEOF
21665#define HAVE_STRUCT_TM_TM_ZONE 1
f199cab1 21666_ACEOF
5476a9a4
GM
21667
21668
1f5d53eb 21669fi
1fd182f0 21670
5476a9a4 21671if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
1f5d53eb 21672
5476a9a4 21673$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
1fd182f0 21674
5476a9a4
GM
21675else
21676 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
21677"
21678if test "x$ac_cv_have_decl_tzname" = x""yes; then :
21679 ac_have_decl=1
21680else
21681 ac_have_decl=0
21682fi
1fd182f0 21683
5476a9a4
GM
21684cat >>confdefs.h <<_ACEOF
21685#define HAVE_DECL_TZNAME $ac_have_decl
21686_ACEOF
f199cab1 21687
5476a9a4
GM
21688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
21689$as_echo_n "checking for tzname... " >&6; }
21690if test "${ac_cv_var_tzname+set}" = set; then :
f199cab1 21691 $as_echo_n "(cached) " >&6
3e0be4ab 21692else
5476a9a4 21693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 21694/* end confdefs.h. */
5476a9a4
GM
21695#include <time.h>
21696#if !HAVE_DECL_TZNAME
21697extern char *tzname[];
f199cab1 21698#endif
5476a9a4 21699
f199cab1
GM
21700int
21701main ()
21702{
5476a9a4 21703return tzname[0][0];
f199cab1
GM
21704 ;
21705 return 0;
21706}
3e0be4ab 21707_ACEOF
f199cab1 21708if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 21709 ac_cv_var_tzname=yes
3e0be4ab 21710else
5476a9a4 21711 ac_cv_var_tzname=no
f199cab1
GM
21712fi
21713rm -f core conftest.err conftest.$ac_objext \
21714 conftest$ac_exeext conftest.$ac_ext
f199cab1 21715fi
5476a9a4
GM
21716{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
21717$as_echo "$ac_cv_var_tzname" >&6; }
21718 if test $ac_cv_var_tzname = yes; then
21719
21720$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
f199cab1 21721
5476a9a4 21722 fi
3e0be4ab 21723fi
cc322c06 21724
5476a9a4
GM
21725
21726 ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include <time.h>
21727"
21728if test "x$ac_cv_member_struct_tm_tm_gmtoff" = x""yes; then :
21729
21730$as_echo "#define HAVE_TM_GMTOFF 1" >>confdefs.h
cc322c06 21731
f199cab1 21732fi
cc322c06 21733
1f5d53eb 21734
e275c824 21735
5476a9a4 21736
283c7aed
GM
21737
21738
21739
21740
21741
21742
21743
21744
21745
21746 if test $gl_cv_have_include_next = yes; then
21747 gl_cv_next_string_h='<'string.h'>'
21748 else
21749 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
21750$as_echo_n "checking absolute name of <string.h>... " >&6; }
21751if test "${gl_cv_next_string_h+set}" = set; then :
21752 $as_echo_n "(cached) " >&6
21753else
21754
21755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21756/* end confdefs.h. */
21757#include <string.h>
21758
21759_ACEOF
21760 case "$host_os" in
21761 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21762 *) gl_absname_cpp="$ac_cpp" ;;
21763 esac
21764
21765 case "$host_os" in
21766 mingw*)
21767 gl_dirsep_regex='[/\\]'
21768 ;;
21769 *)
21770 gl_dirsep_regex='\/'
21771 ;;
21772 esac
21773 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21774
21775 gl_header_literal_regex=`echo 'string.h' \
21776 | sed -e "$gl_make_literal_regex_sed"`
21777 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21778 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21779 s|^/[^/]|//&|
21780 p
21781 q
21782 }'
21783 gl_cv_next_string_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21784 sed -n "$gl_absolute_header_sed"`'"'
21785
21786
21787fi
21788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
21789$as_echo "$gl_cv_next_string_h" >&6; }
21790 fi
21791 NEXT_STRING_H=$gl_cv_next_string_h
21792
21793 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21794 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21795 gl_next_as_first_directive='<'string.h'>'
21796 else
21797 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21798 gl_next_as_first_directive=$gl_cv_next_string_h
21799 fi
21800 NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
21801
21802
21803
21804
21805
21806
21807
21808
21809
5476a9a4
GM
21810ac_fn_c_check_decl "$LINENO" "strtoimax" "ac_cv_have_decl_strtoimax" "$ac_includes_default"
21811if test "x$ac_cv_have_decl_strtoimax" = x""yes; then :
21812 ac_have_decl=1
3e0be4ab 21813else
5476a9a4 21814 ac_have_decl=0
3e0be4ab 21815fi
5476a9a4
GM
21816
21817cat >>confdefs.h <<_ACEOF
21818#define HAVE_DECL_STRTOIMAX $ac_have_decl
f199cab1 21819_ACEOF
e275c824
PE
21820
21821
5476a9a4
GM
21822
21823ac_fn_c_check_decl "$LINENO" "strtoumax" "ac_cv_have_decl_strtoumax" "$ac_includes_default"
21824if test "x$ac_cv_have_decl_strtoumax" = x""yes; then :
21825 ac_have_decl=1
21826else
21827 ac_have_decl=0
3e0be4ab 21828fi
e275c824 21829
5476a9a4
GM
21830cat >>confdefs.h <<_ACEOF
21831#define HAVE_DECL_STRTOUMAX $ac_have_decl
21832_ACEOF
e275c824
PE
21833
21834
2b1928b8 21835
5476a9a4
GM
21836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
21837$as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
21838if test "${ac_cv_header_stat_broken+set}" = set; then :
f199cab1 21839 $as_echo_n "(cached) " >&6
2b1928b8 21840else
5476a9a4
GM
21841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21842/* end confdefs.h. */
21843#include <sys/types.h>
21844#include <sys/stat.h>
2b1928b8 21845
5476a9a4
GM
21846#if defined S_ISBLK && defined S_IFDIR
21847extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
21848#endif
2b1928b8 21849
5476a9a4
GM
21850#if defined S_ISBLK && defined S_IFCHR
21851extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
21852#endif
0eb775a3 21853
5476a9a4
GM
21854#if defined S_ISLNK && defined S_IFREG
21855extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
21856#endif
21857
21858#if defined S_ISSOCK && defined S_IFREG
21859extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
21860#endif
0eb775a3 21861
5476a9a4
GM
21862_ACEOF
21863if ac_fn_c_try_compile "$LINENO"; then :
21864 ac_cv_header_stat_broken=no
f199cab1 21865else
5476a9a4 21866 ac_cv_header_stat_broken=yes
f199cab1 21867fi
5476a9a4 21868rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 21869fi
5476a9a4
GM
21870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
21871$as_echo "$ac_cv_header_stat_broken" >&6; }
21872if test $ac_cv_header_stat_broken = yes; then
0eb775a3 21873
5476a9a4 21874$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
0eb775a3 21875
5476a9a4 21876fi
0eb775a3
GM
21877
21878
21879
5476a9a4
GM
21880
21881
21882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
21883$as_echo_n "checking for struct timespec in <time.h>... " >&6; }
21884if test "${gl_cv_sys_struct_timespec_in_time_h+set}" = set; then :
21885 $as_echo_n "(cached) " >&6
21886else
21887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3e0be4ab 21888/* end confdefs.h. */
5476a9a4 21889#include <time.h>
52724a05 21890
3e0be4ab
GM
21891int
21892main ()
21893{
5476a9a4 21894static struct timespec x; x.tv_sec = x.tv_nsec;
3e0be4ab
GM
21895 ;
21896 return 0;
21897}
21898_ACEOF
5476a9a4
GM
21899if ac_fn_c_try_compile "$LINENO"; then :
21900 gl_cv_sys_struct_timespec_in_time_h=yes
3e0be4ab 21901else
5476a9a4 21902 gl_cv_sys_struct_timespec_in_time_h=no
3e0be4ab 21903fi
5476a9a4
GM
21904rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21905fi
21906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
21907$as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
52724a05 21908
5476a9a4
GM
21909 TIME_H_DEFINES_STRUCT_TIMESPEC=0
21910 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
21911 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
21912 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
21913 TIME_H_DEFINES_STRUCT_TIMESPEC=1
21914 else
21915 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
21916$as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
21917if test "${gl_cv_sys_struct_timespec_in_sys_time_h+set}" = set; then :
21918 $as_echo_n "(cached) " >&6
21919else
3e0be4ab
GM
21920 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21921/* end confdefs.h. */
5476a9a4
GM
21922#include <sys/time.h>
21923
3e0be4ab
GM
21924int
21925main ()
21926{
5476a9a4 21927static struct timespec x; x.tv_sec = x.tv_nsec;
3e0be4ab
GM
21928 ;
21929 return 0;
21930}
21931_ACEOF
5476a9a4
GM
21932if ac_fn_c_try_compile "$LINENO"; then :
21933 gl_cv_sys_struct_timespec_in_sys_time_h=yes
3e0be4ab 21934else
5476a9a4 21935 gl_cv_sys_struct_timespec_in_sys_time_h=no
3e0be4ab 21936fi
5476a9a4 21937rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 21938fi
5476a9a4
GM
21939{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
21940$as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
21941 if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
21942 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
21943 else
21944 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
21945$as_echo_n "checking for struct timespec in <pthread.h>... " >&6; }
21946if test "${gl_cv_sys_struct_timespec_in_pthread_h+set}" = set; then :
3e0be4ab
GM
21947 $as_echo_n "(cached) " >&6
21948else
21949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21950/* end confdefs.h. */
5476a9a4
GM
21951#include <pthread.h>
21952
3e0be4ab
GM
21953int
21954main ()
21955{
5476a9a4 21956static struct timespec x; x.tv_sec = x.tv_nsec;
3e0be4ab
GM
21957 ;
21958 return 0;
21959}
21960_ACEOF
5476a9a4
GM
21961if ac_fn_c_try_compile "$LINENO"; then :
21962 gl_cv_sys_struct_timespec_in_pthread_h=yes
3e0be4ab 21963else
5476a9a4 21964 gl_cv_sys_struct_timespec_in_pthread_h=no
3e0be4ab 21965fi
5476a9a4 21966rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3e0be4ab 21967fi
5476a9a4
GM
21968{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
21969$as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
21970 if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
21971 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
21972 fi
21973 fi
f199cab1 21974 fi
e275c824
PE
21975
21976
b0415a03 21977
b0415a03 21978
e275c824 21979
e275c824
PE
21980
21981
f199cab1 21982
e275c824
PE
21983
21984
21985
21986
21987
21988
21989
5476a9a4
GM
21990 if test $gl_cv_have_include_next = yes; then
21991 gl_cv_next_time_h='<'time.h'>'
21992 else
21993 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
21994$as_echo_n "checking absolute name of <time.h>... " >&6; }
21995if test "${gl_cv_next_time_h+set}" = set; then :
21996 $as_echo_n "(cached) " >&6
21997else
e275c824 21998
5476a9a4
GM
21999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22000/* end confdefs.h. */
22001#include <time.h>
e275c824 22002
5476a9a4
GM
22003_ACEOF
22004 case "$host_os" in
22005 aix*) gl_absname_cpp="$ac_cpp -C" ;;
22006 *) gl_absname_cpp="$ac_cpp" ;;
22007 esac
e275c824 22008
5476a9a4
GM
22009 case "$host_os" in
22010 mingw*)
22011 gl_dirsep_regex='[/\\]'
22012 ;;
22013 *)
22014 gl_dirsep_regex='\/'
22015 ;;
22016 esac
22017 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
e275c824 22018
5476a9a4
GM
22019 gl_header_literal_regex=`echo 'time.h' \
22020 | sed -e "$gl_make_literal_regex_sed"`
22021 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22022 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22023 s|^/[^/]|//&|
22024 p
22025 q
22026 }'
22027 gl_cv_next_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22028 sed -n "$gl_absolute_header_sed"`'"'
e275c824
PE
22029
22030
5476a9a4
GM
22031fi
22032{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
22033$as_echo "$gl_cv_next_time_h" >&6; }
22034 fi
22035 NEXT_TIME_H=$gl_cv_next_time_h
67342916 22036
5476a9a4
GM
22037 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22038 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22039 gl_next_as_first_directive='<'time.h'>'
f199cab1 22040 else
5476a9a4
GM
22041 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22042 gl_next_as_first_directive=$gl_cv_next_time_h
f199cab1 22043 fi
5476a9a4 22044 NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
4fda9c95
GM
22045
22046
52724a05
GM
22047
22048
22049
22050
22051
22052
22053
ae0d7250
PE
22054
22055
22056
cc322c06 22057
f199cab1 22058
b5591ebb
GM
22059ac_fn_c_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default"
22060if test "x$ac_cv_have_decl_unsetenv" = x""yes; then :
22061 ac_have_decl=1
22062else
22063 ac_have_decl=0
22064fi
22065
22066cat >>confdefs.h <<_ACEOF
22067#define HAVE_DECL_UNSETENV $ac_have_decl
22068_ACEOF
22069
cc322c06 22070
5476a9a4
GM
22071 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the utimes function works" >&5
22072$as_echo_n "checking whether the utimes function works... " >&6; }
22073if test "${gl_cv_func_working_utimes+set}" = set; then :
22074 $as_echo_n "(cached) " >&6
22075else
1fd182f0 22076
5476a9a4
GM
22077 if test "$cross_compiling" = yes; then :
22078 gl_cv_func_working_utimes=no
22079else
22080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22081/* end confdefs.h. */
22082
22083#include <sys/types.h>
22084#include <sys/stat.h>
22085#include <fcntl.h>
22086#include <sys/time.h>
22087#include <time.h>
22088#include <unistd.h>
22089#include <stdlib.h>
22090#include <stdio.h>
22091#include <utime.h>
1fd182f0 22092
5476a9a4
GM
22093static int
22094inorder (time_t a, time_t b, time_t c)
22095{
22096 return a <= b && b <= c;
22097}
1fd182f0 22098
5476a9a4
GM
22099int
22100main ()
22101{
22102 int result = 0;
22103 char const *file = "conftest.utimes";
22104 static struct timeval timeval[2] = {{9, 10}, {999999, 999999}};
1fd182f0 22105
5476a9a4
GM
22106 /* Test whether utimes() essentially works. */
22107 {
22108 struct stat sbuf;
22109 FILE *f = fopen (file, "w");
22110 if (f == NULL)
22111 result |= 1;
22112 else if (fclose (f) != 0)
22113 result |= 1;
22114 else if (utimes (file, timeval) != 0)
22115 result |= 2;
22116 else if (lstat (file, &sbuf) != 0)
22117 result |= 1;
22118 else if (!(sbuf.st_atime == timeval[0].tv_sec
22119 && sbuf.st_mtime == timeval[1].tv_sec))
22120 result |= 4;
22121 if (unlink (file) != 0)
22122 result |= 1;
22123 }
1fd182f0 22124
5476a9a4
GM
22125 /* Test whether utimes() with a NULL argument sets the file's timestamp
22126 to the current time. Use 'fstat' as well as 'time' to
22127 determine the "current" time, to accommodate NFS file systems
22128 if there is a time skew between the host and the NFS server. */
22129 {
22130 int fd = open (file, O_WRONLY|O_CREAT, 0644);
22131 if (fd < 0)
22132 result |= 1;
22133 else
22134 {
22135 time_t t0, t2;
22136 struct stat st0, st1, st2;
22137 if (time (&t0) == (time_t) -1)
22138 result |= 1;
22139 else if (fstat (fd, &st0) != 0)
22140 result |= 1;
22141 else if (utimes (file, timeval) != 0)
22142 result |= 2;
22143 else if (utimes (file, NULL) != 0)
22144 result |= 8;
22145 else if (fstat (fd, &st1) != 0)
22146 result |= 1;
22147 else if (write (fd, "\n", 1) != 1)
22148 result |= 1;
22149 else if (fstat (fd, &st2) != 0)
22150 result |= 1;
22151 else if (time (&t2) == (time_t) -1)
22152 result |= 1;
22153 else
22154 {
22155 int m_ok_POSIX = inorder (t0, st1.st_mtime, t2);
22156 int m_ok_NFS = inorder (st0.st_mtime, st1.st_mtime, st2.st_mtime);
22157 if (! (st1.st_atime == st1.st_mtime))
22158 result |= 16;
22159 if (! (m_ok_POSIX || m_ok_NFS))
22160 result |= 32;
22161 }
22162 if (close (fd) != 0)
22163 result |= 1;
22164 }
22165 if (unlink (file) != 0)
22166 result |= 1;
22167 }
52724a05 22168
5476a9a4
GM
22169 /* Test whether utimes() with a NULL argument works on read-only files. */
22170 {
22171 int fd = open (file, O_WRONLY|O_CREAT, 0444);
22172 if (fd < 0)
22173 result |= 1;
22174 else if (close (fd) != 0)
22175 result |= 1;
22176 else if (utimes (file, NULL) != 0)
22177 result |= 64;
22178 if (unlink (file) != 0)
22179 result |= 1;
22180 }
1fd182f0 22181
5476a9a4
GM
22182 return result;
22183}
1fd182f0 22184
5476a9a4
GM
22185_ACEOF
22186if ac_fn_c_try_run "$LINENO"; then :
22187 gl_cv_func_working_utimes=yes
22188else
22189 gl_cv_func_working_utimes=no
22190fi
22191rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22192 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1 22193fi
1fd182f0 22194
5476a9a4
GM
22195fi
22196{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_utimes" >&5
22197$as_echo "$gl_cv_func_working_utimes" >&6; }
1fd182f0 22198
5476a9a4 22199 if test $gl_cv_func_working_utimes = yes; then
1fd182f0 22200
5476a9a4 22201$as_echo "#define HAVE_WORKING_UTIMES 1" >>confdefs.h
1fd182f0 22202
5476a9a4 22203 fi
1fd182f0 22204
1fd182f0 22205
1fd182f0 22206
1fd182f0 22207
1fd182f0 22208
5476a9a4
GM
22209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct utimbuf" >&5
22210$as_echo_n "checking for struct utimbuf... " >&6; }
22211if test "${gl_cv_sys_struct_utimbuf+set}" = set; then :
22212 $as_echo_n "(cached) " >&6
22213else
22214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22215/* end confdefs.h. */
22216#if HAVE_SYS_TIME_H
22217 #include <sys/time.h>
22218 #endif
22219 #include <time.h>
22220 #ifdef HAVE_UTIME_H
22221 #include <utime.h>
22222 #endif
1fd182f0 22223
5476a9a4
GM
22224int
22225main ()
22226{
22227static struct utimbuf x; x.actime = x.modtime;
22228 ;
22229 return 0;
22230}
22231_ACEOF
22232if ac_fn_c_try_compile "$LINENO"; then :
22233 gl_cv_sys_struct_utimbuf=yes
22234else
22235 gl_cv_sys_struct_utimbuf=no
f199cab1 22236fi
5476a9a4 22237rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 22238fi
5476a9a4
GM
22239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_utimbuf" >&5
22240$as_echo "$gl_cv_sys_struct_utimbuf" >&6; }
1fd182f0 22241
5476a9a4 22242 if test $gl_cv_sys_struct_utimbuf = yes; then
1fd182f0 22243
5476a9a4 22244$as_echo "#define HAVE_STRUCT_UTIMBUF 1" >>confdefs.h
1fd182f0 22245
5476a9a4 22246 fi
1fd182f0 22247
1fd182f0 22248
1fd182f0 22249
1fd182f0 22250
1fd182f0 22251
1fd182f0 22252
1fd182f0 22253
3e0be4ab 22254
f199cab1 22255
f199cab1 22256
067d23c9 22257
710f5812
GM
22258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking type of array argument to getgroups" >&5
22259$as_echo_n "checking type of array argument to getgroups... " >&6; }
22260if test "${ac_cv_type_getgroups+set}" = set; then :
22261 $as_echo_n "(cached) " >&6
22262else
22263 if test "$cross_compiling" = yes; then :
22264 ac_cv_type_getgroups=cross
22265else
22266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22267/* end confdefs.h. */
22268/* Thanks to Mike Rendell for this test. */
22269$ac_includes_default
22270#define NGID 256
22271#undef MAX
22272#define MAX(x, y) ((x) > (y) ? (x) : (y))
22273
22274int
22275main ()
22276{
22277 gid_t gidset[NGID];
22278 int i, n;
22279 union { gid_t gval; long int lval; } val;
22280
22281 val.lval = -1;
22282 for (i = 0; i < NGID; i++)
22283 gidset[i] = val.gval;
22284 n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
22285 gidset);
22286 /* Exit non-zero if getgroups seems to require an array of ints. This
22287 happens when gid_t is short int but getgroups modifies an array
22288 of ints. */
22289 return n > 0 && gidset[n] != val.gval;
22290}
22291_ACEOF
22292if ac_fn_c_try_run "$LINENO"; then :
22293 ac_cv_type_getgroups=gid_t
22294else
22295 ac_cv_type_getgroups=int
22296fi
22297rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22298 conftest.$ac_objext conftest.beam conftest.$ac_ext
22299fi
22300
22301if test $ac_cv_type_getgroups = cross; then
22302 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22303/* end confdefs.h. */
22304#include <unistd.h>
22305
22306_ACEOF
22307if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22308 $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then :
22309 ac_cv_type_getgroups=gid_t
22310else
22311 ac_cv_type_getgroups=int
22312fi
22313rm -f conftest*
22314
22315fi
22316fi
22317{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_getgroups" >&5
22318$as_echo "$ac_cv_type_getgroups" >&6; }
22319
22320cat >>confdefs.h <<_ACEOF
22321#define GETGROUPS_T $ac_cv_type_getgroups
22322_ACEOF
22323
22324
22325
067d23c9 22326
0cdca42a
GM
22327
22328
e412eb97
GM
22329
22330
5476a9a4
GM
22331 if false; then
22332 GL_COND_LIBTOOL_TRUE=
22333 GL_COND_LIBTOOL_FALSE='#'
22334else
22335 GL_COND_LIBTOOL_TRUE='#'
22336 GL_COND_LIBTOOL_FALSE=
1fd182f0 22337fi
067d23c9 22338
5476a9a4
GM
22339 gl_cond_libtool=false
22340 gl_libdeps=
22341 gl_ltlibdeps=
22342 gl_m4_base='m4'
067d23c9 22343
f199cab1 22344
f199cab1 22345
f199cab1 22346
067d23c9 22347
f199cab1 22348
f199cab1 22349
f199cab1 22350
067d23c9 22351
5476a9a4 22352 gl_source_base='lib'
cc322c06
GM
22353
22354
5476a9a4
GM
22355 if test $ac_cv_func_alloca_works = no; then
22356 :
f199cab1 22357 fi
cc322c06 22358
5476a9a4
GM
22359 # Define an additional variable used in the Makefile substitution.
22360 if test $ac_cv_working_alloca_h = yes; then
22361 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
22362$as_echo_n "checking for alloca as a compiler built-in... " >&6; }
22363if test "${gl_cv_rpl_alloca+set}" = set; then :
22364 $as_echo_n "(cached) " >&6
22365else
cc322c06 22366
5476a9a4
GM
22367 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22368/* end confdefs.h. */
067d23c9 22369
5476a9a4
GM
22370#if defined __GNUC__ || defined _AIX || defined _MSC_VER
22371 Need own alloca
22372#endif
067d23c9 22373
f199cab1 22374_ACEOF
5476a9a4
GM
22375if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22376 $EGREP "Need own alloca" >/dev/null 2>&1; then :
22377 gl_cv_rpl_alloca=yes
22378else
22379 gl_cv_rpl_alloca=no
369e19fc 22380fi
5476a9a4 22381rm -f conftest*
067d23c9 22382
ae0d7250 22383
5476a9a4
GM
22384fi
22385{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
22386$as_echo "$gl_cv_rpl_alloca" >&6; }
22387 if test $gl_cv_rpl_alloca = yes; then
52724a05 22388
5476a9a4 22389$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
ae0d7250 22390
5476a9a4
GM
22391 ALLOCA_H=alloca.h
22392 else
22393 ALLOCA_H=
22394 fi
f199cab1 22395 else
5476a9a4
GM
22396 ALLOCA_H=alloca.h
22397 fi
ae0d7250 22398
5476a9a4
GM
22399 if test -n "$ALLOCA_H"; then
22400 GL_GENERATE_ALLOCA_H_TRUE=
22401 GL_GENERATE_ALLOCA_H_FALSE='#'
22402else
22403 GL_GENERATE_ALLOCA_H_TRUE='#'
22404 GL_GENERATE_ALLOCA_H_FALSE=
22405fi
f199cab1 22406
ae0d7250
PE
22407
22408
22409
22410
22411
5476a9a4
GM
22412 # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
22413 # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
ae0d7250 22414
5476a9a4
GM
22415 # Save and restore LIBS so e.g., -lrt, isn't added to it. Otherwise, *all*
22416 # programs in the package would end up linked with that potentially-shared
22417 # library, inducing unnecessary run-time overhead.
22418 LIB_CLOCK_GETTIME=
ae0d7250 22419
5476a9a4
GM
22420 gl_saved_libs=$LIBS
22421 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
22422$as_echo_n "checking for library containing clock_gettime... " >&6; }
22423if test "${ac_cv_search_clock_gettime+set}" = set; then :
22424 $as_echo_n "(cached) " >&6
22425else
22426 ac_func_search_save_LIBS=$LIBS
22427cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22428/* end confdefs.h. */
22429
22430/* Override any GCC internal prototype to avoid an error.
22431 Use char because int might match the return type of a GCC
22432 builtin and then its argument prototype would still apply. */
22433#ifdef __cplusplus
22434extern "C"
22435#endif
22436char clock_gettime ();
22437int
22438main ()
22439{
22440return clock_gettime ();
22441 ;
22442 return 0;
22443}
22444_ACEOF
22445for ac_lib in '' rt posix4; do
22446 if test -z "$ac_lib"; then
22447 ac_res="none required"
22448 else
22449 ac_res=-l$ac_lib
22450 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
22451 fi
22452 if ac_fn_c_try_link "$LINENO"; then :
22453 ac_cv_search_clock_gettime=$ac_res
f199cab1 22454fi
5476a9a4
GM
22455rm -f core conftest.err conftest.$ac_objext \
22456 conftest$ac_exeext
22457 if test "${ac_cv_search_clock_gettime+set}" = set; then :
22458 break
22459fi
22460done
22461if test "${ac_cv_search_clock_gettime+set}" = set; then :
ae0d7250 22462
5476a9a4
GM
22463else
22464 ac_cv_search_clock_gettime=no
22465fi
22466rm conftest.$ac_ext
22467LIBS=$ac_func_search_save_LIBS
22468fi
22469{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
22470$as_echo "$ac_cv_search_clock_gettime" >&6; }
22471ac_res=$ac_cv_search_clock_gettime
22472if test "$ac_res" != no; then :
22473 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
22474 test "$ac_cv_search_clock_gettime" = "none required" ||
22475 LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime
22476fi
ae0d7250 22477
5476a9a4
GM
22478 for ac_func in clock_gettime clock_settime
22479do :
22480 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
22481ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
22482eval as_val=\$$as_ac_var
22483 if test "x$as_val" = x""yes; then :
22484 cat >>confdefs.h <<_ACEOF
22485#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
22486_ACEOF
ae0d7250 22487
d7ad186c
GM
22488fi
22489done
22490
22491 LIBS=$gl_saved_libs
22492
22493
22494 :
22495
22496
22497
22498cat >>confdefs.h <<_ACEOF
22499#define GNULIB_CLOSE_STREAM 1
22500_ACEOF
22501
22502
22503
22504
22505 :
22506
22507
22508
22509 :
22510
22511
22512
ffeb6dec 22513 :
d7ad186c
GM
22514
22515
22516
ffeb6dec 22517 :
d7ad186c
GM
22518
22519
22520
22521
22522
22523
22524
22525
22526
22527
22528
ae0d7250 22529
3e0be4ab 22530
d7ad186c
GM
22531 if test $gl_cv_have_include_next = yes; then
22532 gl_cv_next_dirent_h='<'dirent.h'>'
22533 else
22534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5
22535$as_echo_n "checking absolute name of <dirent.h>... " >&6; }
22536if test "${gl_cv_next_dirent_h+set}" = set; then :
22537 $as_echo_n "(cached) " >&6
22538else
3e0be4ab 22539
d7ad186c 22540 if test $ac_cv_header_dirent_h = yes; then
3bf26e96
GM
22541
22542
d7ad186c
GM
22543 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22544/* end confdefs.h. */
22545#include <dirent.h>
3bf26e96 22546
3bf26e96 22547_ACEOF
d7ad186c
GM
22548 case "$host_os" in
22549 aix*) gl_absname_cpp="$ac_cpp -C" ;;
22550 *) gl_absname_cpp="$ac_cpp" ;;
22551 esac
3bf26e96 22552
d7ad186c
GM
22553 case "$host_os" in
22554 mingw*)
22555 gl_dirsep_regex='[/\\]'
22556 ;;
22557 *)
22558 gl_dirsep_regex='\/'
22559 ;;
22560 esac
22561 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
3bf26e96 22562
d7ad186c
GM
22563 gl_header_literal_regex=`echo 'dirent.h' \
22564 | sed -e "$gl_make_literal_regex_sed"`
22565 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22566 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22567 s|^/[^/]|//&|
22568 p
22569 q
22570 }'
22571 gl_cv_next_dirent_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22572 sed -n "$gl_absolute_header_sed"`'"'
22573 else
22574 gl_cv_next_dirent_h='<'dirent.h'>'
22575 fi
3bf26e96 22576
3e0be4ab 22577
d7ad186c
GM
22578fi
22579{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5
22580$as_echo "$gl_cv_next_dirent_h" >&6; }
22581 fi
22582 NEXT_DIRENT_H=$gl_cv_next_dirent_h
f199cab1 22583
d7ad186c
GM
22584 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22585 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22586 gl_next_as_first_directive='<'dirent.h'>'
22587 else
22588 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22589 gl_next_as_first_directive=$gl_cv_next_dirent_h
22590 fi
22591 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive
f199cab1 22592
3e0be4ab 22593
f199cab1 22594
f199cab1 22595
d7ad186c
GM
22596 if test $ac_cv_header_dirent_h = yes; then
22597 HAVE_DIRENT_H=1
22598 else
22599 HAVE_DIRENT_H=0
22600 fi
3e0be4ab 22601
f199cab1
GM
22602
22603
22604
5476a9a4
GM
22605
22606
22607
22608
22609
22610
5476a9a4
GM
22611$as_echo "#define HAVE_DUP2 1" >>confdefs.h
22612
22613
22614 if test $HAVE_DUP2 = 1; then
22615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
22616$as_echo_n "checking whether dup2 works... " >&6; }
22617if test "${gl_cv_func_dup2_works+set}" = set; then :
3e0be4ab
GM
22618 $as_echo_n "(cached) " >&6
22619else
5476a9a4
GM
22620 if test "$cross_compiling" = yes; then :
22621 case "$host_os" in
22622 mingw*) # on this platform, dup2 always returns 0 for success
22623 gl_cv_func_dup2_works="guessing no" ;;
22624 cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
22625 gl_cv_func_dup2_works="guessing no" ;;
22626 linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a
22627 # closed fd may yield -EBADF instead of -1 / errno=EBADF.
22628 gl_cv_func_dup2_works="guessing no" ;;
22629 freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF.
22630 gl_cv_func_dup2_works="guessing no" ;;
22631 haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
22632 gl_cv_func_dup2_works="guessing no" ;;
22633 *) gl_cv_func_dup2_works="guessing yes" ;;
22634 esac
22635else
22636 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3e0be4ab 22637/* end confdefs.h. */
ae0d7250 22638
5476a9a4
GM
22639 #include <unistd.h>
22640#include <fcntl.h>
22641#include <errno.h>
3e0be4ab
GM
22642int
22643main ()
22644{
5476a9a4
GM
22645int result = 0;
22646#ifdef FD_CLOEXEC
22647 if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
22648 result |= 1;
22649#endif
22650 if (dup2 (1, 1) == 0)
22651 result |= 2;
22652#ifdef FD_CLOEXEC
22653 if (fcntl (1, F_GETFD) != FD_CLOEXEC)
22654 result |= 4;
22655#endif
22656 close (0);
22657 if (dup2 (0, 0) != -1)
22658 result |= 8;
22659 /* Many gnulib modules require POSIX conformance of EBADF. */
22660 if (dup2 (2, 1000000) == -1 && errno != EBADF)
22661 result |= 16;
0d1f53ad
GM
22662 /* Flush out a cygwin core dump. */
22663 if (dup2 (2, -1) != -1 || errno != EBADF)
22664 result |= 32;
5476a9a4
GM
22665 return result;
22666
ae0d7250
PE
22667 ;
22668 return 0;
22669}
5476a9a4 22670
ae0d7250 22671_ACEOF
5476a9a4
GM
22672if ac_fn_c_try_run "$LINENO"; then :
22673 gl_cv_func_dup2_works=yes
ae0d7250 22674else
5476a9a4 22675 gl_cv_func_dup2_works=no
ae0d7250 22676fi
5476a9a4
GM
22677rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22678 conftest.$ac_objext conftest.beam conftest.$ac_ext
ae0d7250 22679fi
5476a9a4
GM
22680
22681
3e0be4ab 22682fi
5476a9a4
GM
22683{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
22684$as_echo "$gl_cv_func_dup2_works" >&6; }
22685 case "$gl_cv_func_dup2_works" in
22686 *yes) ;;
22687 *)
22688 REPLACE_DUP2=1
22689 ;;
22690 esac
22691 fi
3e0be4ab 22692
3e0be4ab 22693
a6342fc8 22694 if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
f199cab1 22695
f199cab1
GM
22696
22697
f199cab1 22698
f199cab1 22699
f199cab1 22700
f199cab1 22701
f199cab1 22702
5476a9a4 22703 gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
f199cab1
GM
22704
22705
a6342fc8 22706 fi
f199cab1 22707
f199cab1 22708
f199cab1 22709
f199cab1 22710
f199cab1 22711
5476a9a4 22712 GNULIB_DUP2=1
f199cab1
GM
22713
22714
f199cab1 22715
f199cab1 22716
3e0be4ab 22717
3e0be4ab 22718
f199cab1
GM
22719
22720
ae0d7250 22721
ae0d7250 22722
5476a9a4 22723
93131e11
GM
22724 GNULIB_ENVIRON=1
22725
22726
22727
22728
22729
22730
22731
22732
3a019ab4 22733
8966cbff
GM
22734 LIB_EXECINFO=''
22735 EXECINFO_H='execinfo.h'
22736
22737 if test $ac_cv_header_execinfo_h = yes; then
22738 gl_saved_libs=$LIBS
22739 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing backtrace_symbols_fd" >&5
22740$as_echo_n "checking for library containing backtrace_symbols_fd... " >&6; }
22741if test "${ac_cv_search_backtrace_symbols_fd+set}" = set; then :
22742 $as_echo_n "(cached) " >&6
22743else
22744 ac_func_search_save_LIBS=$LIBS
22745cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22746/* end confdefs.h. */
22747
22748/* Override any GCC internal prototype to avoid an error.
22749 Use char because int might match the return type of a GCC
22750 builtin and then its argument prototype would still apply. */
22751#ifdef __cplusplus
22752extern "C"
22753#endif
22754char backtrace_symbols_fd ();
22755int
22756main ()
22757{
22758return backtrace_symbols_fd ();
22759 ;
22760 return 0;
22761}
22762_ACEOF
22763for ac_lib in '' execinfo; do
22764 if test -z "$ac_lib"; then
22765 ac_res="none required"
22766 else
22767 ac_res=-l$ac_lib
22768 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
22769 fi
22770 if ac_fn_c_try_link "$LINENO"; then :
22771 ac_cv_search_backtrace_symbols_fd=$ac_res
22772fi
22773rm -f core conftest.err conftest.$ac_objext \
22774 conftest$ac_exeext
22775 if test "${ac_cv_search_backtrace_symbols_fd+set}" = set; then :
22776 break
22777fi
22778done
22779if test "${ac_cv_search_backtrace_symbols_fd+set}" = set; then :
22780
22781else
22782 ac_cv_search_backtrace_symbols_fd=no
22783fi
22784rm conftest.$ac_ext
22785LIBS=$ac_func_search_save_LIBS
22786fi
22787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_backtrace_symbols_fd" >&5
22788$as_echo "$ac_cv_search_backtrace_symbols_fd" >&6; }
22789ac_res=$ac_cv_search_backtrace_symbols_fd
22790if test "$ac_res" != no; then :
22791 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
22792 test "$ac_cv_search_backtrace_symbols_fd" = "none required" ||
22793 LIB_EXECINFO=$ac_cv_search_backtrace_symbols_fd
22794fi
22795
22796 LIBS=$gl_saved_libs
22797 test "$ac_cv_search_backtrace_symbols_fd" = no || EXECINFO_H=''
22798 fi
22799
22800 if test -n "$EXECINFO_H"; then
22801
22802
22803
22804
22805
22806
22807
22808
22809 gl_LIBOBJS="$gl_LIBOBJS execinfo.$ac_objext"
22810
22811 fi
22812
22813
22814
22815 if test -n "$EXECINFO_H"; then
22816 GL_GENERATE_EXECINFO_H_TRUE=
22817 GL_GENERATE_EXECINFO_H_FALSE='#'
22818else
22819 GL_GENERATE_EXECINFO_H_TRUE='#'
22820 GL_GENERATE_EXECINFO_H_FALSE=
22821fi
22822
22823
22824
22825
22826
93131e11
GM
22827
22828
22829
7cd2ed2c 22830
710f5812
GM
22831 if test $ac_cv_func_faccessat = no; then
22832 HAVE_FACCESSAT=0
22833 fi
22834
22835 if test $HAVE_FACCESSAT = 0; then
22836
22837
22838
22839
22840
22841
22842
22843
22844 gl_LIBOBJS="$gl_LIBOBJS faccessat.$ac_objext"
22845
22846
22847 for ac_func in access
22848do :
22849 ac_fn_c_check_func "$LINENO" "access" "ac_cv_func_access"
22850if test "x$ac_cv_func_access" = x""yes; then :
22851 cat >>confdefs.h <<_ACEOF
22852#define HAVE_ACCESS 1
22853_ACEOF
22854
22855fi
22856done
22857
22858
22859 fi
22860
22861
22862cat >>confdefs.h <<_ACEOF
22863#define GNULIB_FACCESSAT 1
22864_ACEOF
22865
22866
22867
22868
22869
22870
22871
22872 GNULIB_FACCESSAT=1
22873
22874
22875
22876
22877
22878
22879
22880
22881
22882
0cdca42a
GM
22883 if test $ac_cv_func_fcntl = no; then
22884
22885
22886
22887 if test $ac_cv_func_fcntl = no; then
22888 HAVE_FCNTL=0
22889 else
22890 REPLACE_FCNTL=1
22891 fi
22892
22893 else
22894 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
22895$as_echo_n "checking whether fcntl handles F_DUPFD correctly... " >&6; }
22896if test "${gl_cv_func_fcntl_f_dupfd_works+set}" = set; then :
22897 $as_echo_n "(cached) " >&6
22898else
22899 if test "$cross_compiling" = yes; then :
22900 # Guess that it works on glibc systems
22901 case $host_os in #((
22902 *-gnu*) gl_cv_func_fcntl_f_dupfd_works="guessing yes";;
22903 *) gl_cv_func_fcntl_f_dupfd_works="guessing no";;
22904 esac
22905else
22906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22907/* end confdefs.h. */
22908
22909#include <fcntl.h>
22910#include <errno.h>
22911
22912int
22913main ()
22914{
22915int result = 0;
22916 if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
22917 if (errno != EINVAL) result |= 2;
22918 return result;
22919
22920 ;
22921 return 0;
22922}
22923_ACEOF
22924if ac_fn_c_try_run "$LINENO"; then :
22925 gl_cv_func_fcntl_f_dupfd_works=yes
22926else
22927 gl_cv_func_fcntl_f_dupfd_works=no
22928fi
22929rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22930 conftest.$ac_objext conftest.beam conftest.$ac_ext
22931fi
22932
22933fi
22934{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
22935$as_echo "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
22936 case $gl_cv_func_fcntl_f_dupfd_works in
22937 *yes) ;;
22938 *)
22939
22940
22941 if test $ac_cv_func_fcntl = no; then
22942 HAVE_FCNTL=0
22943 else
22944 REPLACE_FCNTL=1
22945 fi
22946
22947
22948$as_echo "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
22949 ;;
22950 esac
22951
22952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
22953$as_echo_n "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
22954if test "${gl_cv_func_fcntl_f_dupfd_cloexec+set}" = set; then :
22955 $as_echo_n "(cached) " >&6
22956else
22957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22958/* end confdefs.h. */
22959
22960#include <fcntl.h>
22961#ifndef F_DUPFD_CLOEXEC
22962choke me
22963#endif
22964
22965int
22966main ()
22967{
22968
22969 ;
22970 return 0;
22971}
22972_ACEOF
22973if ac_fn_c_try_compile "$LINENO"; then :
22974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22975/* end confdefs.h. */
22976
22977#ifdef __linux__
22978/* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
22979 it to support the semantics on older kernels that failed with EINVAL. */
22980choke me
22981#endif
22982
22983int
22984main ()
22985{
22986
22987 ;
22988 return 0;
22989}
22990_ACEOF
22991if ac_fn_c_try_compile "$LINENO"; then :
22992 gl_cv_func_fcntl_f_dupfd_cloexec=yes
22993else
22994 gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
22995fi
22996rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22997else
22998 gl_cv_func_fcntl_f_dupfd_cloexec=no
22999fi
23000rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23001fi
23002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
23003$as_echo "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
23004 if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then
23005
23006
23007
23008 if test $ac_cv_func_fcntl = no; then
23009 HAVE_FCNTL=0
23010 else
23011 REPLACE_FCNTL=1
23012 fi
23013
23014 fi
23015 fi
23016
23017
23018 if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
23019
23020
23021
23022
23023
23024
23025
23026
23027 gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext"
23028
23029 fi
23030
23031
23032
23033
23034
23035 GNULIB_FCNTL=1
23036
23037
23038
23039
23040
23041
23042
23043
23044
23045
710f5812
GM
23046
23047
23048
23049
23050
23051
23052 if test $gl_cv_have_include_next = yes; then
23053 gl_cv_next_fcntl_h='<'fcntl.h'>'
23054 else
23055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
23056$as_echo_n "checking absolute name of <fcntl.h>... " >&6; }
23057if test "${gl_cv_next_fcntl_h+set}" = set; then :
23058 $as_echo_n "(cached) " >&6
23059else
23060
23061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23062/* end confdefs.h. */
23063#include <fcntl.h>
23064
23065_ACEOF
23066 case "$host_os" in
23067 aix*) gl_absname_cpp="$ac_cpp -C" ;;
23068 *) gl_absname_cpp="$ac_cpp" ;;
23069 esac
23070
23071 case "$host_os" in
23072 mingw*)
23073 gl_dirsep_regex='[/\\]'
23074 ;;
23075 *)
23076 gl_dirsep_regex='\/'
23077 ;;
23078 esac
23079 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23080
23081 gl_header_literal_regex=`echo 'fcntl.h' \
23082 | sed -e "$gl_make_literal_regex_sed"`
23083 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23084 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23085 s|^/[^/]|//&|
23086 p
23087 q
23088 }'
23089 gl_cv_next_fcntl_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23090 sed -n "$gl_absolute_header_sed"`'"'
23091
23092
23093fi
23094{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
23095$as_echo "$gl_cv_next_fcntl_h" >&6; }
23096 fi
23097 NEXT_FCNTL_H=$gl_cv_next_fcntl_h
23098
23099 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23100 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23101 gl_next_as_first_directive='<'fcntl.h'>'
23102 else
23103 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23104 gl_next_as_first_directive=$gl_cv_next_fcntl_h
23105 fi
23106 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
23107
23108
23109
23110
23111
23112
23113
23114
23115
23116
23117
23118
23119
23120
23121
2407788f
GM
23122 LIB_FDATASYNC=
23123
23124
23125 if test $ac_cv_have_decl_fdatasync = no; then
23126 HAVE_DECL_FDATASYNC=0
23127 for ac_func in fdatasync
23128do :
23129 ac_fn_c_check_func "$LINENO" "fdatasync" "ac_cv_func_fdatasync"
23130if test "x$ac_cv_func_fdatasync" = x""yes; then :
23131 cat >>confdefs.h <<_ACEOF
23132#define HAVE_FDATASYNC 1
23133_ACEOF
23134
23135fi
23136done
23137
23138 if test $ac_cv_func_fdatasync = no; then
23139 HAVE_FDATASYNC=0
23140 fi
23141 else
23142 gl_saved_libs=$LIBS
23143 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5
23144$as_echo_n "checking for library containing fdatasync... " >&6; }
23145if test "${ac_cv_search_fdatasync+set}" = set; then :
23146 $as_echo_n "(cached) " >&6
23147else
23148 ac_func_search_save_LIBS=$LIBS
23149cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23150/* end confdefs.h. */
23151
23152/* Override any GCC internal prototype to avoid an error.
23153 Use char because int might match the return type of a GCC
23154 builtin and then its argument prototype would still apply. */
23155#ifdef __cplusplus
23156extern "C"
23157#endif
23158char fdatasync ();
23159int
23160main ()
23161{
23162return fdatasync ();
23163 ;
23164 return 0;
23165}
23166_ACEOF
23167for ac_lib in '' rt posix4; do
23168 if test -z "$ac_lib"; then
23169 ac_res="none required"
23170 else
23171 ac_res=-l$ac_lib
23172 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
23173 fi
23174 if ac_fn_c_try_link "$LINENO"; then :
23175 ac_cv_search_fdatasync=$ac_res
23176fi
23177rm -f core conftest.err conftest.$ac_objext \
23178 conftest$ac_exeext
23179 if test "${ac_cv_search_fdatasync+set}" = set; then :
23180 break
23181fi
23182done
23183if test "${ac_cv_search_fdatasync+set}" = set; then :
23184
23185else
23186 ac_cv_search_fdatasync=no
23187fi
23188rm conftest.$ac_ext
23189LIBS=$ac_func_search_save_LIBS
23190fi
23191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fdatasync" >&5
23192$as_echo "$ac_cv_search_fdatasync" >&6; }
23193ac_res=$ac_cv_search_fdatasync
23194if test "$ac_res" != no; then :
23195 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
23196 test "$ac_cv_search_fdatasync" = "none required" ||
23197 LIB_FDATASYNC=$ac_cv_search_fdatasync
23198fi
23199
23200 LIBS=$gl_saved_libs
23201 fi
23202
23203 if test $HAVE_FDATASYNC = 0; then
23204
23205
23206
23207
23208
23209
23210
23211
23212 gl_LIBOBJS="$gl_LIBOBJS fdatasync.$ac_objext"
23213
23214 fi
23215
23216
23217
23218
23219
23220 GNULIB_FDATASYNC=1
23221
23222
23223
23224
23225
23226
23227
23228
23229
710f5812 23230
d7ad186c
GM
23231 ac_fn_c_check_decl "$LINENO" "fdopendir" "ac_cv_have_decl_fdopendir" "
23232#include <dirent.h>
23233
23234"
23235if test "x$ac_cv_have_decl_fdopendir" = x""yes; then :
23236 ac_have_decl=1
23237else
23238 ac_have_decl=0
23239fi
23240
23241cat >>confdefs.h <<_ACEOF
23242#define HAVE_DECL_FDOPENDIR $ac_have_decl
23243_ACEOF
23244if test $ac_have_decl = 1; then :
23245
23246else
23247 HAVE_DECL_FDOPENDIR=0
23248fi
23249
23250
23251 if test $ac_cv_func_fdopendir = no; then
23252 HAVE_FDOPENDIR=0
23253 else
23254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fdopendir works" >&5
23255$as_echo_n "checking whether fdopendir works... " >&6; }
23256if test "${gl_cv_func_fdopendir_works+set}" = set; then :
23257 $as_echo_n "(cached) " >&6
23258else
23259 if test "$cross_compiling" = yes; then :
23260 case "$host_os" in
23261 # Guess yes on glibc systems.
23262 *-gnu*) gl_cv_func_fdopendir_works="guessing yes" ;;
23263 # If we don't know, assume the worst.
23264 *) gl_cv_func_fdopendir_works="guessing no" ;;
23265 esac
23266
23267else
23268 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23269/* end confdefs.h. */
23270
23271#include <dirent.h>
23272#include <fcntl.h>
23273#include <unistd.h>
23274#if !HAVE_DECL_FDOPENDIR
23275extern
23276# ifdef __cplusplus
23277"C"
23278# endif
23279DIR *fdopendir (int);
23280#endif
23281
23282int
23283main ()
23284{
23285int result = 0;
23286 int fd = open ("conftest.c", O_RDONLY);
23287 if (fd < 0) result |= 1;
23288 if (fdopendir (fd)) result |= 2;
23289 if (close (fd)) result |= 4;
23290 return result;
23291 ;
23292 return 0;
23293}
23294_ACEOF
23295if ac_fn_c_try_run "$LINENO"; then :
23296 gl_cv_func_fdopendir_works=yes
23297else
23298 gl_cv_func_fdopendir_works=no
23299fi
23300rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23301 conftest.$ac_objext conftest.beam conftest.$ac_ext
23302fi
23303
23304fi
23305{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopendir_works" >&5
23306$as_echo "$gl_cv_func_fdopendir_works" >&6; }
23307 case "$gl_cv_func_fdopendir_works" in
23308 *yes) ;;
23309 *)
23310 REPLACE_FDOPENDIR=1
23311 ;;
23312 esac
23313 fi
23314
23315 if test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1; then
23316
23317
23318
23319
23320
23321
23322
23323
23324 gl_LIBOBJS="$gl_LIBOBJS fdopendir.$ac_objext"
23325
23326 fi
23327
23328
23329
23330
23331
23332 GNULIB_FDOPENDIR=1
23333
23334
23335
23336
23337
23338
23339
23340cat >>confdefs.h <<_ACEOF
23341#define GNULIB_FDOPENDIR 1
23342_ACEOF
23343
23344
23345
23346
23347
23348
23349
710f5812 23350
7a67e06b
GM
23351 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpending" >&5
23352$as_echo_n "checking for __fpending... " >&6; }
23353if test "${gl_cv_func___fpending+set}" = set; then :
23354 $as_echo_n "(cached) " >&6
3bf26e96 23355else
3bf26e96 23356
7a67e06b
GM
23357 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23358/* end confdefs.h. */
23359#include <stdio.h>
23360 #if HAVE_STDIO_EXT_H
23361 # include <stdio_ext.h>
23362 #endif
23363
23364int
23365main ()
23366{
23367return ! __fpending (stdin);
23368 ;
23369 return 0;
23370}
3bf26e96 23371_ACEOF
7a67e06b
GM
23372if ac_fn_c_try_link "$LINENO"; then :
23373 gl_cv_func___fpending=yes
23374else
23375 gl_cv_func___fpending=no
23376fi
23377rm -f core conftest.err conftest.$ac_objext \
23378 conftest$ac_exeext conftest.$ac_ext
3bf26e96 23379
7a67e06b
GM
23380fi
23381{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func___fpending" >&5
23382$as_echo "$gl_cv_func___fpending" >&6; }
3bf26e96 23383
7a67e06b 23384 if test $gl_cv_func___fpending = no; then
3bf26e96
GM
23385
23386
23387
23388
23389
23390
23391
23392
23393 gl_LIBOBJS="$gl_LIBOBJS fpending.$ac_objext"
23394
23395
23396 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to determine the number of pending output bytes on a stream" >&5
23397$as_echo_n "checking how to determine the number of pending output bytes on a stream... " >&6; }
23398if test "${ac_cv_sys_pending_output_n_bytes+set}" = set; then :
23399 $as_echo_n "(cached) " >&6
23400else
23401
23402 for ac_expr in \
23403 \
23404 '# glibc2' \
23405 'fp->_IO_write_ptr - fp->_IO_write_base' \
23406 \
23407 '# traditional Unix' \
23408 'fp->_ptr - fp->_base' \
23409 \
23410 '# BSD' \
23411 'fp->_p - fp->_bf._base' \
23412 \
23413 '# SCO, Unixware' \
23414 '(fp->__ptr ? fp->__ptr - fp->__base : 0)' \
23415 \
23416 '# QNX' \
23417 '(fp->_Mode & 0x2000 /*_MWRITE*/ ? fp->_Next - fp->_Buf : 0)' \
23418 \
23419 '# old glibc?' \
23420 'fp->__bufp - fp->__buffer' \
23421 \
23422 '# old glibc iostream?' \
23423 'fp->_pptr - fp->_pbase' \
23424 \
23425 '# emx+gcc' \
23426 'fp->_ptr - fp->_buffer' \
23427 \
23428 '# Minix' \
23429 'fp->_ptr - fp->_buf' \
23430 \
23431 '# Plan9' \
23432 'fp->wp - fp->buf' \
23433 \
23434 '# VMS' \
23435 '(*fp)->_ptr - (*fp)->_base' \
23436 \
23437 '# e.g., DGUX R4.11; the info is not available' \
23438 1 \
23439 ; do
23440
23441 # Skip each embedded comment.
23442 case "$ac_expr" in '#'*) continue;; esac
23443
23444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23445/* end confdefs.h. */
23446#include <stdio.h>
23447int
23448main ()
23449{
23450FILE *fp = stdin; (void) ($ac_expr);
23451 ;
23452 return 0;
23453}
23454_ACEOF
23455if ac_fn_c_try_compile "$LINENO"; then :
23456 fp_done=yes
23457
23458fi
23459rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23460 test "$fp_done" = yes && break
23461 done
23462
23463 ac_cv_sys_pending_output_n_bytes=$ac_expr
23464
23465
23466fi
23467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_pending_output_n_bytes" >&5
23468$as_echo "$ac_cv_sys_pending_output_n_bytes" >&6; }
23469
23470cat >>confdefs.h <<_ACEOF
23471#define PENDING_OUTPUT_N_BYTES $ac_cv_sys_pending_output_n_bytes
23472_ACEOF
23473
23474
23475 fi
23476
23477
d7ad186c
GM
23478
23479
23480
23481
23482 if test $ac_cv_func_fstatat = no; then
23483 HAVE_FSTATAT=0
23484 else
23485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fstatat (..., 0) works" >&5
23486$as_echo_n "checking whether fstatat (..., 0) works... " >&6; }
23487if test "${gl_cv_func_fstatat_zero_flag+set}" = set; then :
23488 $as_echo_n "(cached) " >&6
23489else
23490 if test "$cross_compiling" = yes; then :
23491 case "$host_os" in
23492 aix*) gl_cv_func_fstatat_zero_flag="guessing no";;
23493 *) gl_cv_func_fstatat_zero_flag="guessing yes";;
23494 esac
23495
23496else
23497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23498/* end confdefs.h. */
23499
23500 #include <fcntl.h>
23501 #include <sys/stat.h>
23502 int
23503 main (void)
23504 {
23505 struct stat a;
23506 return fstatat (AT_FDCWD, ".", &a, 0) != 0;
23507 }
23508
23509_ACEOF
23510if ac_fn_c_try_run "$LINENO"; then :
23511 gl_cv_func_fstatat_zero_flag=yes
23512else
23513 gl_cv_func_fstatat_zero_flag=no
23514fi
23515rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23516 conftest.$ac_objext conftest.beam conftest.$ac_ext
23517fi
23518
23519
23520fi
23521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fstatat_zero_flag" >&5
23522$as_echo "$gl_cv_func_fstatat_zero_flag" >&6; }
23523
23524 case $gl_cv_func_fstatat_zero_flag+$gl_cv_func_lstat_dereferences_slashed_symlink in
23525 *yes+*yes) ;;
23526 *) REPLACE_FSTATAT=1
23527 case $gl_cv_func_fstatat_zero_flag in
23528 *yes)
23529
23530$as_echo "#define HAVE_WORKING_FSTATAT_ZERO_FLAG 1" >>confdefs.h
23531
23532 ;;
23533 esac
23534 ;;
23535 esac
23536 fi
23537
23538 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
23539
23540
23541
23542
23543
23544
23545
23546
23547 gl_LIBOBJS="$gl_LIBOBJS fstatat.$ac_objext"
23548
23549 fi
23550
23551
23552
23553
23554
23555 GNULIB_FSTATAT=1
23556
23557
23558
23559
23560
23561
23562
2407788f
GM
23563
23564 if test $ac_cv_func_fsync = no; then
23565 HAVE_FSYNC=0
23566 fi
23567
23568 if test $HAVE_FSYNC = 0; then
23569
23570
23571
23572
23573
23574
23575
23576
23577 gl_LIBOBJS="$gl_LIBOBJS fsync.$ac_objext"
23578
23579 :
23580 fi
23581
23582
23583
23584
23585
23586 GNULIB_FSYNC=1
23587
23588
23589
23590
23591
23592
23593
5476a9a4
GM
23594# Persuade glibc <stdlib.h> to declare getloadavg().
23595
23596
23597gl_save_LIBS=$LIBS
23598
23599# getloadvg is present in libc on glibc >= 2.2, Mac OS X, FreeBSD >= 2.0,
23600# NetBSD >= 0.9, OpenBSD >= 2.0, Solaris >= 7.
23601HAVE_GETLOADAVG=1
23602ac_fn_c_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg"
23603if test "x$ac_cv_func_getloadavg" = x""yes; then :
23604
23605else
23606 gl_func_getloadavg_done=no
23607
23608 # Some systems with -lutil have (and need) -lkvm as well, some do not.
23609 # On Solaris, -lkvm requires nlist from -lelf, so check that first
23610 # to get the right answer into the cache.
23611 # For kstat on solaris, we need to test for libelf and libkvm to force the
23612 # definition of SVR4 below.
23613 if test $gl_func_getloadavg_done = no; then
23614 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_begin in -lelf" >&5
23615$as_echo_n "checking for elf_begin in -lelf... " >&6; }
23616if test "${ac_cv_lib_elf_elf_begin+set}" = set; then :
6ad6792b
GM
23617 $as_echo_n "(cached) " >&6
23618else
3e0be4ab 23619 ac_check_lib_save_LIBS=$LIBS
5476a9a4 23620LIBS="-lelf $LIBS"
3e0be4ab 23621cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6ad6792b 23622/* end confdefs.h. */
6ad6792b 23623
3e0be4ab
GM
23624/* Override any GCC internal prototype to avoid an error.
23625 Use char because int might match the return type of a GCC
23626 builtin and then its argument prototype would still apply. */
23627#ifdef __cplusplus
23628extern "C"
23629#endif
5476a9a4 23630char elf_begin ();
6ad6792b
GM
23631int
23632main ()
23633{
5476a9a4 23634return elf_begin ();
6ad6792b
GM
23635 ;
23636 return 0;
23637}
23638_ACEOF
3e0be4ab 23639if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 23640 ac_cv_lib_elf_elf_begin=yes
3e0be4ab 23641else
5476a9a4 23642 ac_cv_lib_elf_elf_begin=no
6ad6792b 23643fi
3e0be4ab
GM
23644rm -f core conftest.err conftest.$ac_objext \
23645 conftest$ac_exeext conftest.$ac_ext
23646LIBS=$ac_check_lib_save_LIBS
6ad6792b 23647fi
5476a9a4
GM
23648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_elf_elf_begin" >&5
23649$as_echo "$ac_cv_lib_elf_elf_begin" >&6; }
23650if test "x$ac_cv_lib_elf_elf_begin" = x""yes; then :
23651 LIBS="-lelf $LIBS"
6ad6792b
GM
23652fi
23653
5476a9a4
GM
23654 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kvm_open in -lkvm" >&5
23655$as_echo_n "checking for kvm_open in -lkvm... " >&6; }
23656if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then :
6c051bab
GM
23657 $as_echo_n "(cached) " >&6
23658else
5476a9a4
GM
23659 ac_check_lib_save_LIBS=$LIBS
23660LIBS="-lkvm $LIBS"
23661cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c051bab 23662/* end confdefs.h. */
3e0be4ab 23663
5476a9a4
GM
23664/* Override any GCC internal prototype to avoid an error.
23665 Use char because int might match the return type of a GCC
23666 builtin and then its argument prototype would still apply. */
23667#ifdef __cplusplus
23668extern "C"
23669#endif
23670char kvm_open ();
6c051bab
GM
23671int
23672main ()
23673{
5476a9a4 23674return kvm_open ();
6c051bab
GM
23675 ;
23676 return 0;
23677}
23678_ACEOF
3e0be4ab 23679if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 23680 ac_cv_lib_kvm_kvm_open=yes
6c051bab 23681else
5476a9a4 23682 ac_cv_lib_kvm_kvm_open=no
6c051bab 23683fi
3e0be4ab
GM
23684rm -f core conftest.err conftest.$ac_objext \
23685 conftest$ac_exeext conftest.$ac_ext
5476a9a4 23686LIBS=$ac_check_lib_save_LIBS
6c051bab 23687fi
5476a9a4
GM
23688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kvm_kvm_open" >&5
23689$as_echo "$ac_cv_lib_kvm_kvm_open" >&6; }
23690if test "x$ac_cv_lib_kvm_kvm_open" = x""yes; then :
23691 LIBS="-lkvm $LIBS"
3e0be4ab 23692fi
6c051bab 23693
5476a9a4
GM
23694 # Check for the 4.4BSD definition of getloadavg.
23695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lutil" >&5
23696$as_echo_n "checking for getloadavg in -lutil... " >&6; }
23697if test "${ac_cv_lib_util_getloadavg+set}" = set; then :
ae0d7250
PE
23698 $as_echo_n "(cached) " >&6
23699else
5476a9a4
GM
23700 ac_check_lib_save_LIBS=$LIBS
23701LIBS="-lutil $LIBS"
23702cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6d153f56 23703/* end confdefs.h. */
5476a9a4
GM
23704
23705/* Override any GCC internal prototype to avoid an error.
23706 Use char because int might match the return type of a GCC
23707 builtin and then its argument prototype would still apply. */
23708#ifdef __cplusplus
23709extern "C"
23710#endif
23711char getloadavg ();
ae0d7250
PE
23712int
23713main ()
23714{
5476a9a4 23715return getloadavg ();
ae0d7250
PE
23716 ;
23717 return 0;
23718}
23719_ACEOF
3e0be4ab 23720if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 23721 ac_cv_lib_util_getloadavg=yes
ae0d7250 23722else
5476a9a4 23723 ac_cv_lib_util_getloadavg=no
ae0d7250 23724fi
3e0be4ab
GM
23725rm -f core conftest.err conftest.$ac_objext \
23726 conftest$ac_exeext conftest.$ac_ext
5476a9a4
GM
23727LIBS=$ac_check_lib_save_LIBS
23728fi
23729{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_getloadavg" >&5
23730$as_echo "$ac_cv_lib_util_getloadavg" >&6; }
23731if test "x$ac_cv_lib_util_getloadavg" = x""yes; then :
23732 LIBS="-lutil $LIBS" gl_func_getloadavg_done=yes
3e0be4ab 23733fi
6d153f56 23734
5476a9a4 23735 fi
6d153f56 23736
5476a9a4
GM
23737 if test $gl_func_getloadavg_done = no; then
23738 # There is a commonly available library for RS/6000 AIX.
23739 # Since it is not a standard part of AIX, it might be installed locally.
23740 gl_getloadavg_LIBS=$LIBS
23741 LIBS="-L/usr/local/lib $LIBS"
23742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lgetloadavg" >&5
23743$as_echo_n "checking for getloadavg in -lgetloadavg... " >&6; }
23744if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then :
f199cab1 23745 $as_echo_n "(cached) " >&6
3e0be4ab 23746else
f199cab1 23747 ac_check_lib_save_LIBS=$LIBS
5476a9a4 23748LIBS="-lgetloadavg $LIBS"
f199cab1
GM
23749cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23750/* end confdefs.h. */
3e0be4ab 23751
f199cab1
GM
23752/* Override any GCC internal prototype to avoid an error.
23753 Use char because int might match the return type of a GCC
23754 builtin and then its argument prototype would still apply. */
23755#ifdef __cplusplus
23756extern "C"
23757#endif
5476a9a4 23758char getloadavg ();
f199cab1
GM
23759int
23760main ()
23761{
5476a9a4 23762return getloadavg ();
f199cab1
GM
23763 ;
23764 return 0;
23765}
ae0d7250 23766_ACEOF
f199cab1 23767if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 23768 ac_cv_lib_getloadavg_getloadavg=yes
f199cab1 23769else
5476a9a4 23770 ac_cv_lib_getloadavg_getloadavg=no
ae0d7250 23771fi
f199cab1
GM
23772rm -f core conftest.err conftest.$ac_objext \
23773 conftest$ac_exeext conftest.$ac_ext
23774LIBS=$ac_check_lib_save_LIBS
3e0be4ab 23775fi
5476a9a4
GM
23776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_getloadavg_getloadavg" >&5
23777$as_echo "$ac_cv_lib_getloadavg_getloadavg" >&6; }
23778if test "x$ac_cv_lib_getloadavg_getloadavg" = x""yes; then :
23779 LIBS="-lgetloadavg $LIBS" gl_func_getloadavg_done=yes
23780else
23781 LIBS=$gl_getloadavg_LIBS
6d153f56 23782fi
ae0d7250 23783
5476a9a4 23784 fi
16c3e636 23785
5476a9a4
GM
23786 # Set up the replacement function if necessary.
23787 if test $gl_func_getloadavg_done = no; then
23788 HAVE_GETLOADAVG=0
16c3e636 23789
5476a9a4
GM
23790 # Solaris has libkstat which does not require root.
23791 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kstat_open in -lkstat" >&5
23792$as_echo_n "checking for kstat_open in -lkstat... " >&6; }
23793if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then :
f199cab1
GM
23794 $as_echo_n "(cached) " >&6
23795else
23796 ac_check_lib_save_LIBS=$LIBS
5476a9a4 23797LIBS="-lkstat $LIBS"
f199cab1
GM
23798cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23799/* end confdefs.h. */
5f90be1b 23800
f199cab1
GM
23801/* Override any GCC internal prototype to avoid an error.
23802 Use char because int might match the return type of a GCC
23803 builtin and then its argument prototype would still apply. */
23804#ifdef __cplusplus
23805extern "C"
23806#endif
5476a9a4 23807char kstat_open ();
f199cab1
GM
23808int
23809main ()
23810{
5476a9a4 23811return kstat_open ();
f199cab1
GM
23812 ;
23813 return 0;
23814}
3e0be4ab 23815_ACEOF
f199cab1 23816if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 23817 ac_cv_lib_kstat_kstat_open=yes
f199cab1 23818else
5476a9a4 23819 ac_cv_lib_kstat_kstat_open=no
5f90be1b 23820fi
f199cab1
GM
23821rm -f core conftest.err conftest.$ac_objext \
23822 conftest$ac_exeext conftest.$ac_ext
23823LIBS=$ac_check_lib_save_LIBS
3e0be4ab 23824fi
5476a9a4
GM
23825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kstat_kstat_open" >&5
23826$as_echo "$ac_cv_lib_kstat_kstat_open" >&6; }
23827if test "x$ac_cv_lib_kstat_kstat_open" = x""yes; then :
3e0be4ab 23828 cat >>confdefs.h <<_ACEOF
5476a9a4 23829#define HAVE_LIBKSTAT 1
3e0be4ab 23830_ACEOF
5f90be1b 23831
5476a9a4 23832 LIBS="-lkstat $LIBS"
5f90be1b 23833
f199cab1 23834fi
5f90be1b 23835
5476a9a4 23836 test $ac_cv_lib_kstat_kstat_open = yes && gl_func_getloadavg_done=yes
da6c8463 23837
5476a9a4
GM
23838 # AIX has libperfstat which does not require root
23839 if test $gl_func_getloadavg_done = no; then
23840 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for perfstat_cpu_total in -lperfstat" >&5
23841$as_echo_n "checking for perfstat_cpu_total in -lperfstat... " >&6; }
23842if test "${ac_cv_lib_perfstat_perfstat_cpu_total+set}" = set; then :
f199cab1
GM
23843 $as_echo_n "(cached) " >&6
23844else
5476a9a4
GM
23845 ac_check_lib_save_LIBS=$LIBS
23846LIBS="-lperfstat $LIBS"
23847cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5f90be1b 23848/* end confdefs.h. */
5476a9a4
GM
23849
23850/* Override any GCC internal prototype to avoid an error.
23851 Use char because int might match the return type of a GCC
23852 builtin and then its argument prototype would still apply. */
23853#ifdef __cplusplus
23854extern "C"
23855#endif
23856char perfstat_cpu_total ();
5f90be1b
PE
23857int
23858main ()
23859{
5476a9a4 23860return perfstat_cpu_total ();
5f90be1b
PE
23861 ;
23862 return 0;
23863}
23864_ACEOF
5476a9a4
GM
23865if ac_fn_c_try_link "$LINENO"; then :
23866 ac_cv_lib_perfstat_perfstat_cpu_total=yes
f199cab1 23867else
5476a9a4 23868 ac_cv_lib_perfstat_perfstat_cpu_total=no
f199cab1 23869fi
5476a9a4
GM
23870rm -f core conftest.err conftest.$ac_objext \
23871 conftest$ac_exeext conftest.$ac_ext
23872LIBS=$ac_check_lib_save_LIBS
f199cab1 23873fi
5476a9a4
GM
23874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_perfstat_perfstat_cpu_total" >&5
23875$as_echo "$ac_cv_lib_perfstat_perfstat_cpu_total" >&6; }
23876if test "x$ac_cv_lib_perfstat_perfstat_cpu_total" = x""yes; then :
23877 cat >>confdefs.h <<_ACEOF
23878#define HAVE_LIBPERFSTAT 1
23879_ACEOF
23880
23881 LIBS="-lperfstat $LIBS"
23882
23883fi
23884
23885 test $ac_cv_lib_perfstat_perfstat_cpu_total = yes && gl_func_getloadavg_done=yes
23886 fi
23887
23888 if test $gl_func_getloadavg_done = no; then
23889 ac_fn_c_check_header_mongrel "$LINENO" "sys/dg_sys_info.h" "ac_cv_header_sys_dg_sys_info_h" "$ac_includes_default"
23890if test "x$ac_cv_header_sys_dg_sys_info_h" = x""yes; then :
23891 gl_func_getloadavg_done=yes
23892
23893$as_echo "#define DGUX 1" >>confdefs.h
23894
23895 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dg_sys_info in -ldgc" >&5
23896$as_echo_n "checking for dg_sys_info in -ldgc... " >&6; }
23897if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then :
f199cab1
GM
23898 $as_echo_n "(cached) " >&6
23899else
23900 ac_check_lib_save_LIBS=$LIBS
5476a9a4 23901LIBS="-ldgc $LIBS"
f199cab1
GM
23902cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23903/* end confdefs.h. */
3e0be4ab 23904
f199cab1
GM
23905/* Override any GCC internal prototype to avoid an error.
23906 Use char because int might match the return type of a GCC
23907 builtin and then its argument prototype would still apply. */
23908#ifdef __cplusplus
23909extern "C"
23910#endif
5476a9a4 23911char dg_sys_info ();
f199cab1
GM
23912int
23913main ()
23914{
5476a9a4 23915return dg_sys_info ();
f199cab1
GM
23916 ;
23917 return 0;
23918}
23919_ACEOF
23920if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 23921 ac_cv_lib_dgc_dg_sys_info=yes
f199cab1 23922else
5476a9a4 23923 ac_cv_lib_dgc_dg_sys_info=no
5f90be1b 23924fi
3e0be4ab
GM
23925rm -f core conftest.err conftest.$ac_objext \
23926 conftest$ac_exeext conftest.$ac_ext
f199cab1 23927LIBS=$ac_check_lib_save_LIBS
5f90be1b 23928fi
5476a9a4
GM
23929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dgc_dg_sys_info" >&5
23930$as_echo "$ac_cv_lib_dgc_dg_sys_info" >&6; }
23931if test "x$ac_cv_lib_dgc_dg_sys_info" = x""yes; then :
23932 cat >>confdefs.h <<_ACEOF
23933#define HAVE_LIBDGC 1
23934_ACEOF
23935
23936 LIBS="-ldgc $LIBS"
23937
da6c8463
GM
23938fi
23939
5476a9a4
GM
23940fi
23941
23942
23943 fi
23944 fi
23945fi
23946
23947
23948if test "x$gl_save_LIBS" = x; then
23949 GETLOADAVG_LIBS=$LIBS
f199cab1 23950else
5476a9a4
GM
23951 GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$gl_save_LIBS!!"`
23952fi
23953LIBS=$gl_save_LIBS
23954
23955
23956# Test whether the system declares getloadavg. Solaris has the function
23957# but declares it in <sys/loadavg.h>, not <stdlib.h>.
23958for ac_header in sys/loadavg.h
23959do :
23960 ac_fn_c_check_header_mongrel "$LINENO" "sys/loadavg.h" "ac_cv_header_sys_loadavg_h" "$ac_includes_default"
23961if test "x$ac_cv_header_sys_loadavg_h" = x""yes; then :
23962 cat >>confdefs.h <<_ACEOF
23963#define HAVE_SYS_LOADAVG_H 1
f199cab1 23964_ACEOF
5476a9a4 23965
f199cab1 23966fi
5476a9a4
GM
23967
23968done
23969
23970if test $ac_cv_header_sys_loadavg_h = yes; then
23971 HAVE_SYS_LOADAVG_H=1
23972else
23973 HAVE_SYS_LOADAVG_H=0
f199cab1 23974fi
5476a9a4
GM
23975ac_fn_c_check_decl "$LINENO" "getloadavg" "ac_cv_have_decl_getloadavg" "#if HAVE_SYS_LOADAVG_H
23976 # include <sys/loadavg.h>
23977 #endif
23978 #include <stdlib.h>
23979"
23980if test "x$ac_cv_have_decl_getloadavg" = x""yes; then :
5f90be1b 23981
f199cab1 23982else
5476a9a4 23983 HAVE_DECL_GETLOADAVG=0
f199cab1 23984fi
5f90be1b 23985
5f90be1b 23986
a6342fc8 23987 if test $HAVE_GETLOADAVG = 0; then
5476a9a4
GM
23988
23989
23990
23991
23992
23993
23994
23995
23996 gl_LIBOBJS="$gl_LIBOBJS getloadavg.$ac_objext"
23997
23998
23999# Figure out what our getloadavg.c needs.
24000
24001
24002
24003# On HPUX9, an unprivileged user can get load averages this way.
24004if test $gl_func_getloadavg_done = no; then
24005 for ac_func in pstat_getdynamic
24006do :
24007 ac_fn_c_check_func "$LINENO" "pstat_getdynamic" "ac_cv_func_pstat_getdynamic"
24008if test "x$ac_cv_func_pstat_getdynamic" = x""yes; then :
24009 cat >>confdefs.h <<_ACEOF
24010#define HAVE_PSTAT_GETDYNAMIC 1
24011_ACEOF
24012 gl_func_getloadavg_done=yes
3e0be4ab 24013fi
5476a9a4 24014done
6ad6792b 24015
5476a9a4 24016fi
6ad6792b 24017
5476a9a4
GM
24018# We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
24019# uses stabs), but it is still SVR4. We cannot check for <elf.h> because
24020# Irix 4.0.5F has the header but not the library.
24021if test $gl_func_getloadavg_done = no && test "$ac_cv_lib_elf_elf_begin" = yes \
24022 && test "$ac_cv_lib_kvm_kvm_open" = yes; then
24023 gl_func_getloadavg_done=yes
6ad6792b 24024
5476a9a4 24025$as_echo "#define SVR4 1" >>confdefs.h
6ad6792b 24026
5476a9a4
GM
24027fi
24028
24029if test $gl_func_getloadavg_done = no; then
24030 ac_fn_c_check_header_mongrel "$LINENO" "inq_stats/cpustats.h" "ac_cv_header_inq_stats_cpustats_h" "$ac_includes_default"
24031if test "x$ac_cv_header_inq_stats_cpustats_h" = x""yes; then :
24032 gl_func_getloadavg_done=yes
24033
24034$as_echo "#define UMAX 1" >>confdefs.h
24035
24036
24037$as_echo "#define UMAX4_3 1" >>confdefs.h
24038
24039fi
24040
24041
24042fi
24043
24044if test $gl_func_getloadavg_done = no; then
24045 ac_fn_c_check_header_mongrel "$LINENO" "sys/cpustats.h" "ac_cv_header_sys_cpustats_h" "$ac_includes_default"
24046if test "x$ac_cv_header_sys_cpustats_h" = x""yes; then :
24047 gl_func_getloadavg_done=yes; $as_echo "#define UMAX 1" >>confdefs.h
24048
24049fi
24050
24051
24052fi
24053
24054if test $gl_func_getloadavg_done = no; then
24055 for ac_header in mach/mach.h
24056do :
24057 ac_fn_c_check_header_mongrel "$LINENO" "mach/mach.h" "ac_cv_header_mach_mach_h" "$ac_includes_default"
24058if test "x$ac_cv_header_mach_mach_h" = x""yes; then :
24059 cat >>confdefs.h <<_ACEOF
24060#define HAVE_MACH_MACH_H 1
24061_ACEOF
24062
24063fi
24064
24065done
24066
24067fi
24068
24069for ac_header in nlist.h
24070do :
24071 ac_fn_c_check_header_mongrel "$LINENO" "nlist.h" "ac_cv_header_nlist_h" "$ac_includes_default"
24072if test "x$ac_cv_header_nlist_h" = x""yes; then :
24073 cat >>confdefs.h <<_ACEOF
24074#define HAVE_NLIST_H 1
24075_ACEOF
24076 ac_fn_c_check_member "$LINENO" "struct nlist" "n_un.n_name" "ac_cv_member_struct_nlist_n_un_n_name" "#include <nlist.h>
24077"
24078if test "x$ac_cv_member_struct_nlist_n_un_n_name" = x""yes; then :
24079
24080cat >>confdefs.h <<_ACEOF
24081#define HAVE_STRUCT_NLIST_N_UN_N_NAME 1
24082_ACEOF
6ad6792b 24083
0eb775a3 24084
f199cab1 24085fi
3e0be4ab 24086
5476a9a4 24087 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 24088/* end confdefs.h. */
5476a9a4 24089#include <nlist.h>
f199cab1
GM
24090int
24091main ()
24092{
5476a9a4
GM
24093struct nlist x;
24094 #ifdef HAVE_STRUCT_NLIST_N_UN_N_NAME
24095 x.n_un.n_name = "";
24096 #else
24097 x.n_name = "";
24098 #endif
f199cab1
GM
24099 ;
24100 return 0;
24101}
24102_ACEOF
5476a9a4 24103if ac_fn_c_try_link "$LINENO"; then :
6ad6792b 24104
5476a9a4 24105$as_echo "#define N_NAME_POINTER 1" >>confdefs.h
6ad6792b
GM
24106
24107fi
5476a9a4
GM
24108rm -f core conftest.err conftest.$ac_objext \
24109 conftest$ac_exeext conftest.$ac_ext
6ad6792b 24110
5476a9a4 24111fi
6ad6792b 24112
5476a9a4 24113done
6ad6792b 24114
a6342fc8 24115 fi
ca36e0ff 24116
ca36e0ff
GM
24117
24118
1f5d53eb
PE
24119
24120
5476a9a4 24121 GNULIB_GETLOADAVG=1
1f5d53eb
PE
24122
24123
24124
24125
24126
24127
24128
1f5d53eb 24129
1f5d53eb 24130
3e0be4ab 24131
a6342fc8 24132 if test $REPLACE_GETOPT = 1; then
3e0be4ab 24133
1f5d53eb
PE
24134
24135
1f5d53eb 24136
1f5d53eb
PE
24137
24138
24139
24140
5476a9a4 24141 gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
0eb775a3
GM
24142
24143
1f5d53eb
PE
24144
24145
16c3e636 24146
5476a9a4
GM
24147
24148
24149
24150
24151 gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
24152
24153
24154
24155
a6342fc8
GM
24156 GNULIB_GL_UNISTD_H_GETOPT=1
24157 fi
16c3e636
PE
24158
24159
24160
4fda9c95
GM
24161
24162
24163
24164
5476a9a4
GM
24165 REPLACE_GETOPT=0
24166 if test -n "$gl_replace_getopt"; then
24167 REPLACE_GETOPT=1
24168 fi
24169
24170 if test $REPLACE_GETOPT = 1; then
24171
24172 GETOPT_H=getopt.h
24173
24174$as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
24175
24176
24177
24178 fi
24179
a6342fc8 24180 if test $REPLACE_GETOPT = 1; then
5476a9a4
GM
24181
24182
24183
24184
24185
24186
24187
24188
24189 gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
24190
24191
24192
24193
24194
24195
24196
24197
24198
24199 gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
4fda9c95
GM
24200
24201
24202
24203
a6342fc8
GM
24204 GNULIB_GL_UNISTD_H_GETOPT=1
24205 fi
4fda9c95
GM
24206
24207
24208
24209
4fda9c95 24210
4fda9c95 24211
4fda9c95 24212
5476a9a4
GM
24213
24214
24215
24216
24217
24218 gl_gettimeofday_timezone=void
24219 if test $ac_cv_func_gettimeofday != yes; then
24220 HAVE_GETTIMEOFDAY=0
f199cab1 24221 else
4fda9c95
GM
24222
24223
3e0be4ab 24224
5476a9a4
GM
24225 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5
24226$as_echo_n "checking whether gettimeofday clobbers localtime buffer... " >&6; }
24227if test "${gl_cv_func_gettimeofday_clobber+set}" = set; then :
24228 $as_echo_n "(cached) " >&6
24229else
24230 if test "$cross_compiling" = yes; then :
24231 # When cross-compiling:
24232 case "$host_os" in
24233 # Guess all is fine on glibc systems.
24234 *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
24235 # If we don't know, assume the worst.
24236 *) gl_cv_func_gettimeofday_clobber="guessing yes" ;;
24237 esac
4fda9c95 24238
5476a9a4
GM
24239else
24240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24241/* end confdefs.h. */
24242#include <string.h>
24243 #include <sys/time.h>
24244 #include <time.h>
24245 #include <stdlib.h>
4fda9c95 24246
5476a9a4
GM
24247int
24248main ()
24249{
4fda9c95 24250
5476a9a4
GM
24251 time_t t = 0;
24252 struct tm *lt;
24253 struct tm saved_lt;
24254 struct timeval tv;
24255 lt = localtime (&t);
24256 saved_lt = *lt;
24257 gettimeofday (&tv, NULL);
24258 return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
cc322c06 24259
5476a9a4
GM
24260 ;
24261 return 0;
24262}
24263_ACEOF
24264if ac_fn_c_try_run "$LINENO"; then :
24265 gl_cv_func_gettimeofday_clobber=no
24266else
24267 gl_cv_func_gettimeofday_clobber=yes
24268fi
24269rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24270 conftest.$ac_objext conftest.beam conftest.$ac_ext
24271fi
cc322c06 24272
5476a9a4
GM
24273fi
24274{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5
24275$as_echo "$gl_cv_func_gettimeofday_clobber" >&6; }
cc322c06 24276
5476a9a4
GM
24277 case "$gl_cv_func_gettimeofday_clobber" in
24278 *yes)
24279 REPLACE_GETTIMEOFDAY=1
cc322c06 24280
4fda9c95 24281
5476a9a4 24282$as_echo "#define gmtime rpl_gmtime" >>confdefs.h
4fda9c95 24283
ae0d7250 24284
5476a9a4 24285$as_echo "#define localtime rpl_localtime" >>confdefs.h
ae0d7250
PE
24286
24287
ae0d7250 24288
5476a9a4
GM
24289$as_echo "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h
24290
24291 ;;
24292 esac
24293
24294 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
24295$as_echo_n "checking for gettimeofday with POSIX signature... " >&6; }
24296if test "${gl_cv_func_gettimeofday_posix_signature+set}" = set; then :
f199cab1
GM
24297 $as_echo_n "(cached) " >&6
24298else
5476a9a4
GM
24299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24300/* end confdefs.h. */
24301#include <sys/time.h>
24302 struct timeval c;
24303 int gettimeofday (struct timeval *restrict, void *restrict);
24304
24305int
24306main ()
24307{
24308/* glibc uses struct timezone * rather than the POSIX void *
24309 if _GNU_SOURCE is defined. However, since the only portable
24310 use of gettimeofday uses NULL as the second parameter, and
24311 since the glibc definition is actually more typesafe, it is
24312 not worth wrapping this to get a compliant signature. */
24313 int (*f) (struct timeval *restrict, void *restrict)
24314 = gettimeofday;
24315 int x = f (&c, 0);
24316 return !(x | c.tv_sec | c.tv_usec);
24317
24318 ;
24319 return 0;
24320}
24321_ACEOF
24322if ac_fn_c_try_compile "$LINENO"; then :
24323 gl_cv_func_gettimeofday_posix_signature=yes
24324else
24325 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 24326/* end confdefs.h. */
5476a9a4
GM
24327#include <sys/time.h>
24328int gettimeofday (struct timeval *restrict, struct timezone *restrict);
ae0d7250 24329
f199cab1
GM
24330int
24331main ()
24332{
5476a9a4 24333
f199cab1
GM
24334 ;
24335 return 0;
ae0d7250
PE
24336}
24337_ACEOF
5476a9a4
GM
24338if ac_fn_c_try_compile "$LINENO"; then :
24339 gl_cv_func_gettimeofday_posix_signature=almost
ae0d7250 24340else
5476a9a4 24341 gl_cv_func_gettimeofday_posix_signature=no
ae0d7250 24342fi
5476a9a4 24343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ae0d7250 24344fi
5476a9a4 24345rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52724a05 24346fi
5476a9a4
GM
24347{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
24348$as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; }
24349 if test $gl_cv_func_gettimeofday_posix_signature = almost; then
24350 gl_gettimeofday_timezone='struct timezone'
24351 elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
24352 REPLACE_GETTIMEOFDAY=1
24353 fi
24354 if test $REPLACE_STRUCT_TIMEVAL = 1; then
24355 REPLACE_GETTIMEOFDAY=1
24356 fi
3e0be4ab 24357
5476a9a4 24358 fi
ae0d7250 24359
5476a9a4
GM
24360cat >>confdefs.h <<_ACEOF
24361#define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone
24362_ACEOF
f199cab1 24363
ae0d7250 24364
a6342fc8 24365 if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
ae0d7250 24366
cc322c06
GM
24367
24368
cc322c06
GM
24369
24370
ae0d7250
PE
24371
24372
24373
5476a9a4 24374 gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
5fa4ac76
PE
24375
24376
5476a9a4
GM
24377 for ac_header in sys/timeb.h
24378do :
24379 ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
24380if test "x$ac_cv_header_sys_timeb_h" = x""yes; then :
24381 cat >>confdefs.h <<_ACEOF
24382#define HAVE_SYS_TIMEB_H 1
24383_ACEOF
5fa4ac76 24384
3e0be4ab 24385fi
5fa4ac76 24386
5476a9a4 24387done
f199cab1 24388
5476a9a4
GM
24389 for ac_func in _ftime
24390do :
24391 ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
24392if test "x$ac_cv_func__ftime" = x""yes; then :
24393 cat >>confdefs.h <<_ACEOF
24394#define HAVE__FTIME 1
24395_ACEOF
5fa4ac76 24396
5476a9a4
GM
24397fi
24398done
5fa4ac76
PE
24399
24400
a6342fc8 24401 fi
5fa4ac76
PE
24402
24403
24404
24405
24406
5476a9a4 24407 GNULIB_GETTIMEOFDAY=1
5fa4ac76
PE
24408
24409
24410
24411
0eb775a3
GM
24412
24413
369e19fc
PE
24414
24415
369e19fc
PE
24416
24417
5476a9a4
GM
24418 if test $ac_cv_func_lstat = yes; then
24419
24420 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
24421 *no)
24422 REPLACE_LSTAT=1
24423 ;;
24424 esac
24425 else
24426 HAVE_LSTAT=0
f199cab1 24427 fi
369e19fc 24428
a6342fc8 24429 if test $REPLACE_LSTAT = 1; then
369e19fc 24430
5fa4ac76 24431
369e19fc 24432
369e19fc 24433
369e19fc 24434
369e19fc 24435
369e19fc 24436
369e19fc 24437
5476a9a4 24438 gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
f199cab1 24439
45d4966b 24440 :
a6342fc8 24441 fi
369e19fc 24442
369e19fc 24443
369e19fc 24444
5fa4ac76
PE
24445
24446
5476a9a4 24447 GNULIB_LSTAT=1
5fa4ac76 24448
5fa4ac76 24449
27505cf5 24450
27505cf5 24451
27505cf5 24452
27505cf5 24453
27505cf5 24454
27505cf5 24455
5fa4ac76
PE
24456
24457
283c7aed
GM
24458 if test $ac_cv_have_decl_memrchr = no; then
24459 HAVE_DECL_MEMRCHR=0
24460 fi
24461
24462 for ac_func in memrchr
24463do :
24464 ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr"
24465if test "x$ac_cv_func_memrchr" = x""yes; then :
24466 cat >>confdefs.h <<_ACEOF
24467#define HAVE_MEMRCHR 1
24468_ACEOF
24469
24470fi
24471done
24472
24473
24474 if test $ac_cv_func_memrchr = no; then
24475
24476
24477
24478
24479
24480
24481
24482
24483 gl_LIBOBJS="$gl_LIBOBJS memrchr.$ac_objext"
24484
24485 :
24486 fi
24487
24488
24489
24490
24491
24492 GNULIB_MEMRCHR=1
24493
24494
24495
24496
24497
24498
24499
24500
24501
24502
5476a9a4 24503
e412eb97
GM
24504 if test $ac_cv_func_mkostemp != yes; then
24505 HAVE_MKOSTEMP=0
24506 fi
24507
24508 if test $HAVE_MKOSTEMP = 0; then
24509
24510
24511
24512
24513
24514
24515
24516
24517 gl_LIBOBJS="$gl_LIBOBJS mkostemp.$ac_objext"
24518
24519
24520
24521 fi
24522
24523
24524cat >>confdefs.h <<_ACEOF
24525#define GNULIB_MKOSTEMP 1
24526_ACEOF
24527
24528
24529
24530
24531
24532
24533
24534 GNULIB_MKOSTEMP=1
24535
24536
24537
24538
24539
24540
24541
24542
24543
24544
24545
5476a9a4
GM
24546 if test $APPLE_UNIVERSAL_BUILD = 1; then
24547 # A universal build on Apple Mac OS X platforms.
24548 # The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode.
24549 # But we need a configuration result that is valid in both modes.
24550 gl_cv_func_working_mktime=no
24551 fi
24552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5
24553$as_echo_n "checking for working mktime... " >&6; }
24554if test "${gl_cv_func_working_mktime+set}" = set; then :
f199cab1
GM
24555 $as_echo_n "(cached) " >&6
24556else
5476a9a4
GM
24557 if test "$cross_compiling" = yes; then :
24558 gl_cv_func_working_mktime=no
24559else
24560 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 24561/* end confdefs.h. */
5476a9a4
GM
24562/* Test program from Paul Eggert and Tony Leneis. */
24563#include <limits.h>
24564#include <stdlib.h>
24565#include <time.h>
5fa4ac76 24566
5476a9a4
GM
24567#ifdef HAVE_UNISTD_H
24568# include <unistd.h>
f199cab1 24569#endif
5476a9a4 24570
2393bc74
GM
24571#if HAVE_DECL_ALARM
24572# include <signal.h>
5476a9a4
GM
24573#endif
24574
24575/* Work around redefinition to rpl_putenv by other config tests. */
24576#undef putenv
24577
24578static time_t time_t_max;
24579static time_t time_t_min;
24580
24581/* Values we'll use to set the TZ environment variable. */
24582static char *tz_strings[] = {
24583 (char *) 0, "TZ=GMT0", "TZ=JST-9",
24584 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
24585};
24586#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
24587
24588/* Return 0 if mktime fails to convert a date in the spring-forward gap.
24589 Based on a problem report from Andreas Jaeger. */
24590static int
24591spring_forward_gap ()
f199cab1 24592{
5476a9a4
GM
24593 /* glibc (up to about 1998-10-07) failed this test. */
24594 struct tm tm;
24595
24596 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
24597 instead of "TZ=America/Vancouver" in order to detect the bug even
24598 on systems that don't support the Olson extension, or don't have the
24599 full zoneinfo tables installed. */
24600 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
24601
24602 tm.tm_year = 98;
24603 tm.tm_mon = 3;
24604 tm.tm_mday = 5;
24605 tm.tm_hour = 2;
24606 tm.tm_min = 0;
24607 tm.tm_sec = 0;
24608 tm.tm_isdst = -1;
24609 return mktime (&tm) != (time_t) -1;
f199cab1 24610}
5fa4ac76 24611
5476a9a4
GM
24612static int
24613mktime_test1 (time_t now)
24614{
24615 struct tm *lt;
24616 return ! (lt = localtime (&now)) || mktime (lt) == now;
24617}
5fa4ac76 24618
5476a9a4
GM
24619static int
24620mktime_test (time_t now)
24621{
24622 return (mktime_test1 (now)
24623 && mktime_test1 ((time_t) (time_t_max - now))
24624 && mktime_test1 ((time_t) (time_t_min + now)));
24625}
067d23c9 24626
5476a9a4
GM
24627static int
24628irix_6_4_bug ()
24629{
24630 /* Based on code from Ariel Faigon. */
24631 struct tm tm;
24632 tm.tm_year = 96;
24633 tm.tm_mon = 3;
24634 tm.tm_mday = 0;
24635 tm.tm_hour = 0;
24636 tm.tm_min = 0;
24637 tm.tm_sec = 0;
24638 tm.tm_isdst = -1;
24639 mktime (&tm);
24640 return tm.tm_mon == 2 && tm.tm_mday == 31;
24641}
24642
24643static int
24644bigtime_test (int j)
24645{
24646 struct tm tm;
24647 time_t now;
24648 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
24649 now = mktime (&tm);
24650 if (now != (time_t) -1)
24651 {
24652 struct tm *lt = localtime (&now);
24653 if (! (lt
24654 && lt->tm_year == tm.tm_year
24655 && lt->tm_mon == tm.tm_mon
24656 && lt->tm_mday == tm.tm_mday
24657 && lt->tm_hour == tm.tm_hour
24658 && lt->tm_min == tm.tm_min
24659 && lt->tm_sec == tm.tm_sec
24660 && lt->tm_yday == tm.tm_yday
24661 && lt->tm_wday == tm.tm_wday
24662 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
24663 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
24664 return 0;
24665 }
24666 return 1;
24667}
369e19fc 24668
5476a9a4
GM
24669static int
24670year_2050_test ()
24671{
24672 /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
24673 ignoring leap seconds. */
24674 unsigned long int answer = 2527315200UL;
369e19fc 24675
5476a9a4
GM
24676 struct tm tm;
24677 time_t t;
24678 tm.tm_year = 2050 - 1900;
24679 tm.tm_mon = 2 - 1;
24680 tm.tm_mday = 1;
24681 tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
24682 tm.tm_isdst = -1;
369e19fc 24683
5476a9a4
GM
24684 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
24685 instead of "TZ=America/Vancouver" in order to detect the bug even
24686 on systems that don't support the Olson extension, or don't have the
24687 full zoneinfo tables installed. */
24688 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
067d23c9 24689
5476a9a4 24690 t = mktime (&tm);
067d23c9 24691
5476a9a4
GM
24692 /* Check that the result is either a failure, or close enough
24693 to the correct answer that we can assume the discrepancy is
24694 due to leap seconds. */
24695 return (t == (time_t) -1
24696 || (0 < t && answer - 120 <= t && t <= answer + 120));
24697}
067d23c9 24698
f199cab1
GM
24699int
24700main ()
24701{
5476a9a4
GM
24702 int result = 0;
24703 time_t t, delta;
24704 int i, j;
24705 int time_t_signed_magnitude = (time_t) ~ (time_t) 0 < (time_t) -1;
24706 int time_t_signed = ! ((time_t) 0 < (time_t) -1);
067d23c9 24707
2393bc74 24708#if HAVE_DECL_ALARM
5476a9a4
GM
24709 /* This test makes some buggy mktime implementations loop.
24710 Give up after 60 seconds; a mktime slower than that
24711 isn't worth using anyway. */
2393bc74 24712 signal (SIGALRM, SIG_DFL);
5476a9a4 24713 alarm (60);
2393bc74 24714#endif
067d23c9 24715
5476a9a4
GM
24716 time_t_max = (! time_t_signed
24717 ? (time_t) -1
24718 : ((((time_t) 1 << (sizeof (time_t) * CHAR_BIT - 2)) - 1)
24719 * 2 + 1));
24720 time_t_min = (! time_t_signed
24721 ? (time_t) 0
24722 : time_t_signed_magnitude
24723 ? ~ (time_t) 0
24724 : ~ time_t_max);
3e0be4ab 24725
5476a9a4
GM
24726 delta = time_t_max / 997; /* a suitable prime number */
24727 for (i = 0; i < N_STRINGS; i++)
24728 {
24729 if (tz_strings[i])
24730 putenv (tz_strings[i]);
3e0be4ab 24731
5476a9a4
GM
24732 for (t = 0; t <= time_t_max - delta && (result & 1) == 0; t += delta)
24733 if (! mktime_test (t))
24734 result |= 1;
24735 if ((result & 2) == 0
24736 && ! (mktime_test ((time_t) 1)
24737 && mktime_test ((time_t) (60 * 60))
24738 && mktime_test ((time_t) (60 * 60 * 24))))
24739 result |= 2;
f199cab1 24740
5476a9a4
GM
24741 for (j = 1; (result & 4) == 0; j <<= 1)
24742 {
24743 if (! bigtime_test (j))
24744 result |= 4;
24745 if (INT_MAX / 2 < j)
24746 break;
24747 }
24748 if ((result & 8) == 0 && ! bigtime_test (INT_MAX))
24749 result |= 8;
24750 }
24751 if (! irix_6_4_bug ())
24752 result |= 16;
24753 if (! spring_forward_gap ())
24754 result |= 32;
24755 if (! year_2050_test ())
24756 result |= 64;
24757 return result;
067d23c9
KY
24758}
24759_ACEOF
5476a9a4
GM
24760if ac_fn_c_try_run "$LINENO"; then :
24761 gl_cv_func_working_mktime=yes
067d23c9 24762else
5476a9a4 24763 gl_cv_func_working_mktime=no
3e0be4ab 24764fi
5476a9a4
GM
24765rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24766 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1
GM
24767fi
24768
f199cab1 24769
5476a9a4
GM
24770fi
24771{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_mktime" >&5
24772$as_echo "$gl_cv_func_working_mktime" >&6; }
f199cab1 24773
5476a9a4
GM
24774 if test $gl_cv_func_working_mktime = no; then
24775 REPLACE_MKTIME=1
24776 else
24777 REPLACE_MKTIME=0
f199cab1 24778 fi
f199cab1 24779
a6342fc8 24780 if test $REPLACE_MKTIME = 1; then
f199cab1 24781
f199cab1 24782
0eb775a3 24783
067d23c9 24784
a451f14b 24785
a451f14b 24786
743c80a7
PE
24787
24788
5476a9a4
GM
24789 gl_LIBOBJS="$gl_LIBOBJS mktime.$ac_objext"
24790
a6342fc8
GM
24791 :
24792 fi
a451f14b
PE
24793
24794
24795
e275c824
PE
24796
24797
5476a9a4 24798 GNULIB_MKTIME=1
e275c824
PE
24799
24800
24801
24802
24803
24804
24805
24806
d87ffdb7 24807
5476a9a4
GM
24808
24809
0cdca42a
GM
24810
24811 if test $ac_cv_func_pipe2 != yes; then
24812 HAVE_PIPE2=0
24813 fi
24814
24815
24816
24817
24818
24819
24820 GNULIB_PIPE2=1
24821
24822
24823
24824
24825
24826
24827
24828
24829
24830
5476a9a4
GM
24831 if test $ac_cv_func_pselect = yes; then
24832 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether signature of pselect conforms to POSIX" >&5
24833$as_echo_n "checking whether signature of pselect conforms to POSIX... " >&6; }
24834if test "${gl_cv_sig_pselect+set}" = set; then :
e275c824
PE
24835 $as_echo_n "(cached) " >&6
24836else
5476a9a4 24837 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
e275c824 24838/* end confdefs.h. */
5476a9a4 24839#include <sys/select.h>
e275c824 24840
f199cab1
GM
24841int
24842main ()
24843{
5476a9a4
GM
24844int (*p) (int, fd_set *, fd_set *, fd_set *restrict,
24845 struct timespec const *restrict,
24846 sigset_t const *restrict) = pselect;
24847 return !p;
f199cab1
GM
24848 ;
24849 return 0;
24850}
e275c824 24851_ACEOF
f199cab1 24852if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 24853 gl_cv_sig_pselect=yes
3e0be4ab 24854else
5476a9a4 24855 gl_cv_sig_pselect=no
f199cab1
GM
24856fi
24857rm -f core conftest.err conftest.$ac_objext \
24858 conftest$ac_exeext conftest.$ac_ext
3e0be4ab 24859fi
5476a9a4
GM
24860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sig_pselect" >&5
24861$as_echo "$gl_cv_sig_pselect" >&6; }
b6c9d18d
GM
24862
24863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pselect detects invalid fds" >&5
24864$as_echo_n "checking whether pselect detects invalid fds... " >&6; }
24865if test "${gl_cv_func_pselect_detects_ebadf+set}" = set; then :
24866 $as_echo_n "(cached) " >&6
24867else
24868
24869 if test "$cross_compiling" = yes; then :
24870
24871 case "$host_os" in
24872 # Guess yes on glibc systems.
24873 *-gnu*) gl_cv_func_pselect_detects_ebadf="guessing yes" ;;
24874 # If we don't know, assume the worst.
24875 *) gl_cv_func_pselect_detects_ebadf="guessing no" ;;
24876 esac
24877
24878else
24879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24880/* end confdefs.h. */
24881
24882#include <sys/types.h>
24883#include <sys/time.h>
24884#if HAVE_SYS_SELECT_H
24885# include <sys/select.h>
24886#endif
24887#include <unistd.h>
24888#include <errno.h>
24889
24890int
24891main ()
24892{
24893
24894 fd_set set;
24895 dup2(0, 16);
24896 FD_ZERO(&set);
24897 FD_SET(16, &set);
24898 close(16);
24899 struct timespec timeout;
24900 timeout.tv_sec = 0;
24901 timeout.tv_nsec = 5000;
24902 return pselect (17, &set, NULL, NULL, &timeout, NULL) != -1 || errno != EBADF;
24903
24904 ;
24905 return 0;
24906}
24907_ACEOF
24908if ac_fn_c_try_run "$LINENO"; then :
24909 gl_cv_func_pselect_detects_ebadf=yes
24910else
24911 gl_cv_func_pselect_detects_ebadf=no
24912fi
24913rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24914 conftest.$ac_objext conftest.beam conftest.$ac_ext
24915fi
24916
24917
24918fi
24919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pselect_detects_ebadf" >&5
24920$as_echo "$gl_cv_func_pselect_detects_ebadf" >&6; }
24921 case $gl_cv_func_pselect_detects_ebadf in
24922 *yes) ;;
24923 *) REPLACE_PSELECT=1 ;;
24924 esac
5476a9a4 24925 fi
3e0be4ab 24926
5476a9a4
GM
24927 if test $ac_cv_func_pselect = no || test $gl_cv_sig_pselect = no; then
24928 REPLACE_PSELECT=1
24929 fi
3e0be4ab 24930
a6342fc8 24931 if test $HAVE_PSELECT = 0 || test $REPLACE_PSELECT = 1; then
3e0be4ab
GM
24932
24933
3e0be4ab 24934
3e0be4ab 24935
3e0be4ab 24936
3e0be4ab 24937
3e0be4ab 24938
3e0be4ab 24939
5476a9a4 24940 gl_LIBOBJS="$gl_LIBOBJS pselect.$ac_objext"
3e0be4ab 24941
a6342fc8 24942 fi
3e0be4ab
GM
24943
24944
f199cab1 24945
f199cab1 24946
f199cab1 24947
5476a9a4 24948 GNULIB_PSELECT=1
f199cab1 24949
6d153f56 24950
f199cab1 24951
3e0be4ab 24952
3e0be4ab
GM
24953
24954
f199cab1 24955
0eb775a3
GM
24956
24957
5476a9a4 24958 LIB_PTHREAD_SIGMASK=
0eb775a3 24959
f199cab1 24960
f077f61d
GM
24961
24962
24963 if test "$gl_threads_api" = posix; then
24964 if test $ac_cv_func_pthread_sigmask = yes; then
24965 :
24966 else
24967 if test -n "$LIBMULTITHREAD"; then
24968 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_sigmask in $LIBMULTITHREAD" >&5
24969$as_echo_n "checking for pthread_sigmask in $LIBMULTITHREAD... " >&6; }
24970if test "${gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD+set}" = set; then :
24971 $as_echo_n "(cached) " >&6
24972else
24973 gl_save_LIBS="$LIBS"
24974 LIBS="$LIBS $LIBMULTITHREAD"
24975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24976/* end confdefs.h. */
24977#include <pthread.h>
24978 #include <signal.h>
24979
24980int
24981main ()
24982{
24983return pthread_sigmask (0, (sigset_t *) 0, (sigset_t *) 0);
24984 ;
24985 return 0;
24986}
24987
24988_ACEOF
24989if ac_fn_c_try_link "$LINENO"; then :
24990 gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD=yes
24991else
24992 gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD=no
24993fi
24994rm -f core conftest.err conftest.$ac_objext \
24995 conftest$ac_exeext conftest.$ac_ext
24996 LIBS="$gl_save_LIBS"
24997
24998fi
24999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD" >&5
25000$as_echo "$gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD" >&6; }
25001 if test $gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD = yes; then
25002 LIB_PTHREAD_SIGMASK="$LIBMULTITHREAD"
25003 else
25004 HAVE_PTHREAD_SIGMASK=0
25005 fi
25006 else
25007 HAVE_PTHREAD_SIGMASK=0
25008 fi
25009 fi
5476a9a4 25010 else
f077f61d
GM
25011 if test $ac_cv_func_pthread_sigmask = yes; then
25012 REPLACE_PTHREAD_SIGMASK=1
25013 else
25014 HAVE_PTHREAD_SIGMASK=0
25015 fi
5476a9a4 25016 fi
6d153f56 25017
52724a05 25018
6d153f56
GM
25019
25020
5476a9a4
GM
25021 if test $HAVE_PTHREAD_SIGMASK = 1; then
25022
25023
25024 if test -z "$LIB_PTHREAD_SIGMASK"; then
25025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask works without -lpthread" >&5
25026$as_echo_n "checking whether pthread_sigmask works without -lpthread... " >&6; }
25027if test "${gl_cv_func_pthread_sigmask_in_libc_works+set}" = set; then :
f199cab1
GM
25028 $as_echo_n "(cached) " >&6
25029else
5476a9a4
GM
25030
25031 if test "$cross_compiling" = yes; then :
25032
25033 case "$host_os" in
25034 freebsd* | hpux* | solaris | solaris2.[2-9]*)
25035 gl_cv_func_pthread_sigmask_in_libc_works="guessing no";;
25036 *)
25037 gl_cv_func_pthread_sigmask_in_libc_works="guessing yes";;
25038 esac
25039
25040else
25041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 25042/* end confdefs.h. */
6d153f56 25043
5476a9a4
GM
25044#include <pthread.h>
25045#include <signal.h>
25046#include <stddef.h>
25047int main ()
f199cab1 25048{
5476a9a4
GM
25049 sigset_t set;
25050 sigemptyset (&set);
25051 return pthread_sigmask (1729, &set, NULL) != 0;
f199cab1
GM
25052}
25053_ACEOF
5476a9a4
GM
25054if ac_fn_c_try_run "$LINENO"; then :
25055 gl_cv_func_pthread_sigmask_in_libc_works=no
f199cab1 25056else
5476a9a4 25057 gl_cv_func_pthread_sigmask_in_libc_works=yes
f199cab1 25058fi
5476a9a4
GM
25059rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25060 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1 25061fi
5476a9a4
GM
25062
25063
f199cab1 25064fi
5476a9a4
GM
25065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_in_libc_works" >&5
25066$as_echo "$gl_cv_func_pthread_sigmask_in_libc_works" >&6; }
25067 case "$gl_cv_func_pthread_sigmask_in_libc_works" in
25068 *no)
25069 REPLACE_PTHREAD_SIGMASK=1
cc322c06 25070
5476a9a4 25071$as_echo "#define PTHREAD_SIGMASK_INEFFECTIVE 1" >>confdefs.h
cc322c06 25072
5476a9a4
GM
25073 ;;
25074 esac
25075 fi
3e0be4ab 25076
5476a9a4
GM
25077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask returns error numbers" >&5
25078$as_echo_n "checking whether pthread_sigmask returns error numbers... " >&6; }
25079if test "${gl_cv_func_pthread_sigmask_return_works+set}" = set; then :
3e0be4ab
GM
25080 $as_echo_n "(cached) " >&6
25081else
5476a9a4
GM
25082
25083 gl_save_LIBS="$LIBS"
25084 LIBS="$LIBS $LIB_PTHREAD_SIGMASK"
25085 if test "$cross_compiling" = yes; then :
25086 case "$host_os" in
25087 cygwin*)
25088 gl_cv_func_pthread_sigmask_return_works="guessing no";;
25089 *)
25090 gl_cv_func_pthread_sigmask_return_works="guessing yes";;
25091 esac
25092
25093else
25094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3e0be4ab 25095/* end confdefs.h. */
f199cab1 25096
5476a9a4
GM
25097#include <pthread.h>
25098#include <signal.h>
25099#include <stddef.h>
25100int main ()
3e0be4ab 25101{
5476a9a4
GM
25102 sigset_t set;
25103 sigemptyset (&set);
25104 if (pthread_sigmask (1729, &set, NULL) == -1)
25105 return 1;
3e0be4ab
GM
25106 return 0;
25107}
6d153f56 25108_ACEOF
5476a9a4
GM
25109if ac_fn_c_try_run "$LINENO"; then :
25110 gl_cv_func_pthread_sigmask_return_works=yes
3e0be4ab 25111else
5476a9a4 25112 gl_cv_func_pthread_sigmask_return_works=no
6d153f56 25113fi
5476a9a4
GM
25114rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25115 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1 25116fi
5476a9a4
GM
25117
25118 LIBS="$gl_save_LIBS"
25119
52724a05 25120fi
5476a9a4
GM
25121{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_return_works" >&5
25122$as_echo "$gl_cv_func_pthread_sigmask_return_works" >&6; }
25123 case "$gl_cv_func_pthread_sigmask_return_works" in
25124 *no)
25125 REPLACE_PTHREAD_SIGMASK=1
6d153f56 25126
5476a9a4 25127$as_echo "#define PTHREAD_SIGMASK_FAILS_WITH_ERRNO 1" >>confdefs.h
6d153f56 25128
5476a9a4
GM
25129 ;;
25130 esac
cc322c06 25131
5476a9a4
GM
25132 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask unblocks signals correctly" >&5
25133$as_echo_n "checking whether pthread_sigmask unblocks signals correctly... " >&6; }
25134if test "${gl_cv_func_pthread_sigmask_unblock_works+set}" = set; then :
f199cab1
GM
25135 $as_echo_n "(cached) " >&6
25136else
5476a9a4
GM
25137
25138 case "$host_os" in
25139 irix*)
25140 gl_cv_func_pthread_sigmask_unblock_works="guessing no";;
25141 *)
25142 gl_cv_func_pthread_sigmask_unblock_works="guessing yes";;
25143 esac
25144 gl_save_LIBS="$LIBS"
25145 LIBS="$LIBS $LIBMULTITHREAD"
25146 if test "$cross_compiling" = yes; then :
25147 :
f199cab1 25148else
5476a9a4
GM
25149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25150/* end confdefs.h. */
6d153f56 25151
5476a9a4
GM
25152#include <pthread.h>
25153#include <signal.h>
25154#include <stdio.h>
25155#include <stdlib.h>
25156#include <unistd.h>
25157static volatile int sigint_occurred;
25158static void
25159sigint_handler (int sig)
25160{
25161 sigint_occurred++;
25162}
25163int main ()
25164{
25165 sigset_t set;
25166 int pid = getpid ();
25167 char command[80];
25168 signal (SIGINT, sigint_handler);
25169 sigemptyset (&set);
25170 sigaddset (&set, SIGINT);
25171 if (!(pthread_sigmask (SIG_BLOCK, &set, NULL) == 0))
25172 return 1;
25173 sprintf (command, "sh -c 'sleep 1; kill -%d %d' &", SIGINT, pid);
25174 if (!(system (command) == 0))
25175 return 2;
25176 sleep (2);
25177 if (!(sigint_occurred == 0))
25178 return 3;
25179 if (!(pthread_sigmask (SIG_UNBLOCK, &set, NULL) == 0))
25180 return 4;
25181 if (!(sigint_occurred == 1)) /* This fails on IRIX. */
25182 return 5;
25183 return 0;
25184}
25185_ACEOF
25186if ac_fn_c_try_run "$LINENO"; then :
25187 :
25188else
25189 gl_cv_func_pthread_sigmask_unblock_works=no
f199cab1 25190fi
5476a9a4
GM
25191rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25192 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1 25193fi
5476a9a4
GM
25194
25195 LIBS="$gl_save_LIBS"
25196
f199cab1 25197fi
5476a9a4
GM
25198{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_unblock_works" >&5
25199$as_echo "$gl_cv_func_pthread_sigmask_unblock_works" >&6; }
25200 case "$gl_cv_func_pthread_sigmask_unblock_works" in
25201 *no)
25202 REPLACE_PTHREAD_SIGMASK=1
6d153f56 25203
5476a9a4 25204$as_echo "#define PTHREAD_SIGMASK_UNBLOCK_BUG 1" >>confdefs.h
6d153f56 25205
5476a9a4
GM
25206 ;;
25207 esac
6d153f56 25208 fi
6d153f56 25209
a6342fc8 25210 if test $HAVE_PTHREAD_SIGMASK = 0 || test $REPLACE_PTHREAD_SIGMASK = 1; then
a451f14b 25211
a451f14b 25212
743c80a7
PE
25213
25214
25215
25216
25217
f199cab1 25218
5476a9a4 25219 gl_LIBOBJS="$gl_LIBOBJS pthread_sigmask.$ac_objext"
743c80a7
PE
25220
25221
5476a9a4 25222 if test $HAVE_PTHREAD_SIGMASK = 1; then
743c80a7 25223
5476a9a4 25224$as_echo "#define HAVE_PTHREAD_SIGMASK 1" >>confdefs.h
743c80a7 25225
5476a9a4 25226 fi
743c80a7 25227
a6342fc8 25228 fi
938a4ef9 25229
938a4ef9 25230
938a4ef9 25231
938a4ef9 25232
938a4ef9 25233
5476a9a4 25234 GNULIB_PTHREAD_SIGMASK=1
a451f14b 25235
a451f14b 25236
743c80a7
PE
25237
25238
25239
25240
25241
b5591ebb
GM
25242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for putenv compatible with GNU and SVID" >&5
25243$as_echo_n "checking for putenv compatible with GNU and SVID... " >&6; }
25244if test "${gl_cv_func_svid_putenv+set}" = set; then :
25245 $as_echo_n "(cached) " >&6
25246else
25247 if test "$cross_compiling" = yes; then :
25248 case "$host_os" in
25249 # Guess yes on glibc systems.
25250 *-gnu*) gl_cv_func_svid_putenv="guessing yes" ;;
25251 # If we don't know, assume the worst.
25252 *) gl_cv_func_svid_putenv="guessing no" ;;
25253 esac
25254
25255else
25256 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25257/* end confdefs.h. */
25258$ac_includes_default
25259int
25260main ()
25261{
25262
25263 /* Put it in env. */
25264 if (putenv ("CONFTEST_putenv=val"))
25265 return 1;
25266
25267 /* Try to remove it. */
25268 if (putenv ("CONFTEST_putenv"))
25269 return 2;
25270
25271 /* Make sure it was deleted. */
25272 if (getenv ("CONFTEST_putenv") != 0)
25273 return 3;
25274
25275 return 0;
25276
25277 ;
25278 return 0;
25279}
25280_ACEOF
25281if ac_fn_c_try_run "$LINENO"; then :
25282 gl_cv_func_svid_putenv=yes
25283else
25284 gl_cv_func_svid_putenv=no
25285fi
25286rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25287 conftest.$ac_objext conftest.beam conftest.$ac_ext
25288fi
25289
25290
25291fi
25292{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_svid_putenv" >&5
25293$as_echo "$gl_cv_func_svid_putenv" >&6; }
25294 case "$gl_cv_func_svid_putenv" in
25295 *yes) ;;
25296 *)
25297 REPLACE_PUTENV=1
25298 ;;
25299 esac
25300
25301 if test $REPLACE_PUTENV = 1; then
25302
25303
25304
25305
25306
25307
25308
25309
25310 gl_LIBOBJS="$gl_LIBOBJS putenv.$ac_objext"
25311
c175d440 25312
2393bc74
GM
25313 ac_fn_c_check_decl "$LINENO" "_putenv" "ac_cv_have_decl__putenv" "$ac_includes_default"
25314if test "x$ac_cv_have_decl__putenv" = x""yes; then :
25315 ac_have_decl=1
25316else
25317 ac_have_decl=0
c175d440 25318fi
2393bc74
GM
25319
25320cat >>confdefs.h <<_ACEOF
25321#define HAVE_DECL__PUTENV $ac_have_decl
25322_ACEOF
c175d440
GM
25323
25324
b5591ebb
GM
25325 fi
25326
25327
25328
25329
25330
25331 GNULIB_PUTENV=1
25332
25333
25334
25335
25336
25337
3a019ab4
GM
25338 # Check whether --enable-acl was given.
25339if test "${enable_acl+set}" = set; then :
25340 enableval=$enable_acl;
25341else
25342 enable_acl=auto
25343fi
b5591ebb 25344
743c80a7 25345
3a019ab4
GM
25346 LIB_ACL=
25347 use_acl=0
25348 if test "x$enable_acl" != "xno"; then
25349 for ac_header in sys/acl.h
25350do :
25351 ac_fn_c_check_header_mongrel "$LINENO" "sys/acl.h" "ac_cv_header_sys_acl_h" "$ac_includes_default"
25352if test "x$ac_cv_header_sys_acl_h" = x""yes; then :
25353 cat >>confdefs.h <<_ACEOF
25354#define HAVE_SYS_ACL_H 1
25355_ACEOF
25356
25357fi
25358
25359done
25360
25361 if test $ac_cv_header_sys_acl_h = yes; then
25362 ac_save_LIBS=$LIBS
25363
25364 if test $use_acl = 0; then
25365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing acl_get_file" >&5
25366$as_echo_n "checking for library containing acl_get_file... " >&6; }
25367if test "${ac_cv_search_acl_get_file+set}" = set; then :
25368 $as_echo_n "(cached) " >&6
25369else
25370 ac_func_search_save_LIBS=$LIBS
25371cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25372/* end confdefs.h. */
25373
25374/* Override any GCC internal prototype to avoid an error.
25375 Use char because int might match the return type of a GCC
25376 builtin and then its argument prototype would still apply. */
25377#ifdef __cplusplus
25378extern "C"
25379#endif
25380char acl_get_file ();
25381int
25382main ()
25383{
25384return acl_get_file ();
25385 ;
25386 return 0;
25387}
25388_ACEOF
25389for ac_lib in '' acl pacl; do
25390 if test -z "$ac_lib"; then
25391 ac_res="none required"
25392 else
25393 ac_res=-l$ac_lib
25394 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
25395 fi
25396 if ac_fn_c_try_link "$LINENO"; then :
25397 ac_cv_search_acl_get_file=$ac_res
25398fi
25399rm -f core conftest.err conftest.$ac_objext \
25400 conftest$ac_exeext
25401 if test "${ac_cv_search_acl_get_file+set}" = set; then :
25402 break
25403fi
25404done
25405if test "${ac_cv_search_acl_get_file+set}" = set; then :
25406
25407else
25408 ac_cv_search_acl_get_file=no
25409fi
25410rm conftest.$ac_ext
25411LIBS=$ac_func_search_save_LIBS
25412fi
25413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_acl_get_file" >&5
25414$as_echo "$ac_cv_search_acl_get_file" >&6; }
25415ac_res=$ac_cv_search_acl_get_file
25416if test "$ac_res" != no; then :
25417 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
25418 if test "$ac_cv_search_acl_get_file" != "none required"; then
25419 LIB_ACL=$ac_cv_search_acl_get_file
25420 fi
25421 for ac_func in acl_get_file acl_get_fd acl_set_file acl_set_fd \
25422 acl_free acl_from_mode acl_from_text \
25423 acl_delete_def_file acl_extended_file \
25424 acl_delete_fd_np acl_delete_file_np \
25425 acl_copy_ext_native acl_create_entry_np \
25426 acl_to_short_text acl_free_text
25427do :
25428 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
25429ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
25430eval as_val=\$$as_ac_var
25431 if test "x$as_val" = x""yes; then :
25432 cat >>confdefs.h <<_ACEOF
25433#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
25434_ACEOF
25435
25436fi
25437done
25438
25439 # If the acl_get_file bug is detected, don't enable the ACL support.
25440
25441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working acl_get_file" >&5
25442$as_echo_n "checking for working acl_get_file... " >&6; }
25443if test "${gl_cv_func_working_acl_get_file+set}" = set; then :
25444 $as_echo_n "(cached) " >&6
25445else
25446 if test "$cross_compiling" = yes; then :
25447 gl_cv_func_working_acl_get_file=cross-compiling
25448else
25449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25450/* end confdefs.h. */
25451#include <sys/types.h>
25452 #include <sys/acl.h>
25453 #include <errno.h>
25454
25455int
25456main ()
25457{
25458if (!acl_get_file (".", ACL_TYPE_ACCESS) && errno == ENOENT)
25459 return 1;
25460 return 0;
25461
25462 ;
25463 return 0;
25464}
25465_ACEOF
25466if ac_fn_c_try_run "$LINENO"; then :
25467 gl_cv_func_working_acl_get_file=yes
25468else
25469 gl_cv_func_working_acl_get_file=no
25470fi
25471rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25472 conftest.$ac_objext conftest.beam conftest.$ac_ext
25473fi
25474
25475fi
25476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_acl_get_file" >&5
25477$as_echo "$gl_cv_func_working_acl_get_file" >&6; }
25478
25479 if test $gl_cv_func_working_acl_get_file = yes; then :
25480 use_acl=1
25481fi
25482
25483 if test $use_acl = 1; then
25484 for ac_header in acl/libacl.h
25485do :
25486 ac_fn_c_check_header_mongrel "$LINENO" "acl/libacl.h" "ac_cv_header_acl_libacl_h" "$ac_includes_default"
25487if test "x$ac_cv_header_acl_libacl_h" = x""yes; then :
25488 cat >>confdefs.h <<_ACEOF
25489#define HAVE_ACL_LIBACL_H 1
25490_ACEOF
25491
25492fi
25493
25494done
25495
25496
25497
25498
25499
25500
25501
25502
25503
25504 for ac_func in acl_entries
25505do :
25506 ac_fn_c_check_func "$LINENO" "acl_entries" "ac_cv_func_acl_entries"
25507if test "x$ac_cv_func_acl_entries" = x""yes; then :
25508 cat >>confdefs.h <<_ACEOF
25509#define HAVE_ACL_ENTRIES 1
25510_ACEOF
25511
25512else
25513
25514 gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
25515
25516fi
25517done
25518
25519
25520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ACL_FIRST_ENTRY" >&5
25521$as_echo_n "checking for ACL_FIRST_ENTRY... " >&6; }
25522if test "${gl_cv_acl_ACL_FIRST_ENTRY+set}" = set; then :
25523 $as_echo_n "(cached) " >&6
25524else
25525 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25526/* end confdefs.h. */
25527#include <sys/types.h>
25528#include <sys/acl.h>
25529int type = ACL_FIRST_ENTRY;
25530int
25531main ()
25532{
25533
25534 ;
25535 return 0;
25536}
25537_ACEOF
25538if ac_fn_c_try_compile "$LINENO"; then :
25539 gl_cv_acl_ACL_FIRST_ENTRY=yes
25540else
25541 gl_cv_acl_ACL_FIRST_ENTRY=no
25542fi
25543rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25544fi
25545{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_acl_ACL_FIRST_ENTRY" >&5
25546$as_echo "$gl_cv_acl_ACL_FIRST_ENTRY" >&6; }
25547 if test $gl_cv_acl_ACL_FIRST_ENTRY = yes; then
25548
25549$as_echo "#define HAVE_ACL_FIRST_ENTRY 1" >>confdefs.h
25550
25551 fi
25552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ACL_TYPE_EXTENDED" >&5
25553$as_echo_n "checking for ACL_TYPE_EXTENDED... " >&6; }
25554if test "${gl_cv_acl_ACL_TYPE_EXTENDED+set}" = set; then :
25555 $as_echo_n "(cached) " >&6
25556else
25557 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25558/* end confdefs.h. */
25559#include <sys/types.h>
25560#include <sys/acl.h>
25561int type = ACL_TYPE_EXTENDED;
25562int
25563main ()
25564{
25565
25566 ;
25567 return 0;
25568}
25569_ACEOF
25570if ac_fn_c_try_compile "$LINENO"; then :
25571 gl_cv_acl_ACL_TYPE_EXTENDED=yes
25572else
25573 gl_cv_acl_ACL_TYPE_EXTENDED=no
25574fi
25575rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25576fi
25577{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_acl_ACL_TYPE_EXTENDED" >&5
25578$as_echo "$gl_cv_acl_ACL_TYPE_EXTENDED" >&6; }
25579 if test $gl_cv_acl_ACL_TYPE_EXTENDED = yes; then
25580
25581$as_echo "#define HAVE_ACL_TYPE_EXTENDED 1" >>confdefs.h
25582
25583 fi
25584 else
25585 LIB_ACL=
25586 fi
25587
25588fi
25589
25590 fi
25591
25592 if test $use_acl = 0; then
25593 for ac_func in facl
25594do :
25595 ac_fn_c_check_func "$LINENO" "facl" "ac_cv_func_facl"
25596if test "x$ac_cv_func_facl" = x""yes; then :
25597 cat >>confdefs.h <<_ACEOF
25598#define HAVE_FACL 1
25599_ACEOF
25600
25601fi
25602done
25603
25604 if test $ac_cv_func_facl = yes; then
25605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing acl_trivial" >&5
25606$as_echo_n "checking for library containing acl_trivial... " >&6; }
25607if test "${ac_cv_search_acl_trivial+set}" = set; then :
25608 $as_echo_n "(cached) " >&6
25609else
25610 ac_func_search_save_LIBS=$LIBS
25611cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25612/* end confdefs.h. */
25613
25614/* Override any GCC internal prototype to avoid an error.
25615 Use char because int might match the return type of a GCC
25616 builtin and then its argument prototype would still apply. */
25617#ifdef __cplusplus
25618extern "C"
25619#endif
25620char acl_trivial ();
25621int
25622main ()
25623{
25624return acl_trivial ();
25625 ;
25626 return 0;
25627}
25628_ACEOF
25629for ac_lib in '' sec; do
25630 if test -z "$ac_lib"; then
25631 ac_res="none required"
25632 else
25633 ac_res=-l$ac_lib
25634 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
25635 fi
25636 if ac_fn_c_try_link "$LINENO"; then :
25637 ac_cv_search_acl_trivial=$ac_res
25638fi
25639rm -f core conftest.err conftest.$ac_objext \
25640 conftest$ac_exeext
25641 if test "${ac_cv_search_acl_trivial+set}" = set; then :
25642 break
25643fi
25644done
25645if test "${ac_cv_search_acl_trivial+set}" = set; then :
25646
25647else
25648 ac_cv_search_acl_trivial=no
25649fi
25650rm conftest.$ac_ext
25651LIBS=$ac_func_search_save_LIBS
25652fi
25653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_acl_trivial" >&5
25654$as_echo "$ac_cv_search_acl_trivial" >&6; }
25655ac_res=$ac_cv_search_acl_trivial
25656if test "$ac_res" != no; then :
25657 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
25658 if test "$ac_cv_search_acl_trivial" != "none required"; then
25659 LIB_ACL=$ac_cv_search_acl_trivial
25660 fi
25661
25662fi
25663
25664 for ac_func in acl_trivial
25665do :
25666 ac_fn_c_check_func "$LINENO" "acl_trivial" "ac_cv_func_acl_trivial"
25667if test "x$ac_cv_func_acl_trivial" = x""yes; then :
25668 cat >>confdefs.h <<_ACEOF
25669#define HAVE_ACL_TRIVIAL 1
25670_ACEOF
25671
25672fi
25673done
25674
25675 use_acl=1
25676 fi
25677 fi
25678
25679 if test $use_acl = 0; then
25680 for ac_func in getacl
25681do :
25682 ac_fn_c_check_func "$LINENO" "getacl" "ac_cv_func_getacl"
25683if test "x$ac_cv_func_getacl" = x""yes; then :
25684 cat >>confdefs.h <<_ACEOF
25685#define HAVE_GETACL 1
25686_ACEOF
25687
25688fi
25689done
25690
25691 if test $ac_cv_func_getacl = yes; then
25692 use_acl=1
25693 fi
25694 for ac_header in aclv.h
25695do :
25696 ac_fn_c_check_header_compile "$LINENO" "aclv.h" "ac_cv_header_aclv_h" "#include <sys/types.h>
25697"
25698if test "x$ac_cv_header_aclv_h" = x""yes; then :
25699 cat >>confdefs.h <<_ACEOF
25700#define HAVE_ACLV_H 1
25701_ACEOF
25702
25703fi
25704
25705done
25706
25707 fi
25708
25709 if test $use_acl = 0; then
25710 for ac_func in aclx_get
25711do :
25712 ac_fn_c_check_func "$LINENO" "aclx_get" "ac_cv_func_aclx_get"
25713if test "x$ac_cv_func_aclx_get" = x""yes; then :
25714 cat >>confdefs.h <<_ACEOF
25715#define HAVE_ACLX_GET 1
25716_ACEOF
25717
25718fi
25719done
25720
25721 if test $ac_cv_func_aclx_get = yes; then
25722 use_acl=1
25723 fi
25724 fi
25725
25726 if test $use_acl = 0 || test "$ac_cv_func_aclx_get" = yes; then
25727 for ac_func in statacl
25728do :
25729 ac_fn_c_check_func "$LINENO" "statacl" "ac_cv_func_statacl"
25730if test "x$ac_cv_func_statacl" = x""yes; then :
25731 cat >>confdefs.h <<_ACEOF
25732#define HAVE_STATACL 1
25733_ACEOF
25734
25735fi
25736done
25737
25738 if test $ac_cv_func_statacl = yes; then
25739 use_acl=1
25740 fi
25741 fi
25742
25743 if test $use_acl = 0; then
25744 for ac_func in aclsort
25745do :
25746 ac_fn_c_check_func "$LINENO" "aclsort" "ac_cv_func_aclsort"
25747if test "x$ac_cv_func_aclsort" = x""yes; then :
25748 cat >>confdefs.h <<_ACEOF
25749#define HAVE_ACLSORT 1
25750_ACEOF
25751
25752fi
25753done
25754
25755 if test $ac_cv_func_aclsort = yes; then
25756 use_acl=1
25757 fi
25758 fi
25759
25760 LIBS=$ac_save_LIBS
25761 fi
25762 if test "x$enable_acl$use_acl" = "xyes0"; then
25763 as_fn_error "ACLs enabled but support not detected" "$LINENO" 5
25764 elif test "x$enable_acl$use_acl" = "xauto0"; then
25765 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libacl development library was not found or not usable." >&5
25766$as_echo "$as_me: WARNING: libacl development library was not found or not usable." >&2;}
25767 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: emacs will be built without ACL support." >&5
25768$as_echo "$as_me: WARNING: emacs will be built without ACL support." >&2;}
25769 fi
25770 fi
25771
25772
25773cat >>confdefs.h <<_ACEOF
25774#define USE_ACL $use_acl
25775_ACEOF
25776
25777 USE_ACL=$use_acl
25778
25779
25780
25781
25782
25783 if test $ac_cv_func_readlink = no; then
25784 HAVE_READLINK=0
25785 else
25786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
25787$as_echo_n "checking whether readlink signature is correct... " >&6; }
25788if test "${gl_cv_decl_readlink_works+set}" = set; then :
25789 $as_echo_n "(cached) " >&6
25790else
25791 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25792/* end confdefs.h. */
25793#include <unistd.h>
25794 /* Cause compilation failure if original declaration has wrong type. */
25795 ssize_t readlink (const char *, char *, size_t);
25796int
f199cab1
GM
25797main ()
25798{
5476a9a4 25799
f199cab1
GM
25800 ;
25801 return 0;
25802}
3e0be4ab 25803_ACEOF
5476a9a4
GM
25804if ac_fn_c_try_compile "$LINENO"; then :
25805 gl_cv_decl_readlink_works=yes
25806else
25807 gl_cv_decl_readlink_works=no
3e0be4ab 25808fi
5476a9a4
GM
25809rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25810fi
25811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5
25812$as_echo "$gl_cv_decl_readlink_works" >&6; }
25813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
25814$as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; }
25815if test "${gl_cv_func_readlink_works+set}" = set; then :
25816 $as_echo_n "(cached) " >&6
25817else
25818 # We have readlink, so assume ln -s works.
25819 ln -s conftest.no-such conftest.link
25820 ln -s conftest.link conftest.lnk2
25821 if test "$cross_compiling" = yes; then :
25822 case "$host_os" in
25823 # Guess yes on glibc systems.
25824 *-gnu*) gl_cv_func_readlink_works="guessing yes" ;;
25825 # If we don't know, assume the worst.
25826 *) gl_cv_func_readlink_works="guessing no" ;;
25827 esac
25828
25829else
f199cab1 25830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 25831/* end confdefs.h. */
5476a9a4
GM
25832#include <unistd.h>
25833
f199cab1
GM
25834int
25835main ()
25836{
5476a9a4
GM
25837char buf[20];
25838 return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;
f199cab1
GM
25839 ;
25840 return 0;
25841}
067d23c9 25842_ACEOF
5476a9a4
GM
25843if ac_fn_c_try_run "$LINENO"; then :
25844 gl_cv_func_readlink_works=yes
25845else
25846 gl_cv_func_readlink_works=no
067d23c9 25847fi
5476a9a4
GM
25848rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25849 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1 25850fi
067d23c9 25851
5476a9a4 25852 rm -f conftest.link conftest.lnk2
f199cab1 25853fi
5476a9a4
GM
25854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_works" >&5
25855$as_echo "$gl_cv_func_readlink_works" >&6; }
25856 case "$gl_cv_func_readlink_works" in
25857 *yes)
25858 if test "$gl_cv_decl_readlink_works" != yes; then
25859 REPLACE_READLINK=1
25860 fi
25861 ;;
25862 *)
067d23c9 25863
5476a9a4 25864$as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
067d23c9 25865
5476a9a4
GM
25866 REPLACE_READLINK=1
25867 ;;
25868 esac
25869 fi
3e0be4ab 25870
a6342fc8 25871 if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
3e0be4ab
GM
25872
25873
25874
25875
3e0be4ab
GM
25876
25877
5476a9a4
GM
25878
25879
25880 gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext"
25881
25882
25883 :
3e0be4ab 25884
a6342fc8 25885 fi
3e0be4ab 25886
067d23c9 25887
067d23c9 25888
067d23c9 25889
067d23c9 25890
5476a9a4 25891 GNULIB_READLINK=1
067d23c9 25892
067d23c9 25893
067d23c9 25894
067d23c9
KY
25895
25896
067d23c9 25897
d7ad186c
GM
25898
25899
25900
25901 if test $ac_cv_func_readlinkat = no; then
25902 HAVE_READLINKAT=0
25903 fi
25904
25905 if test $HAVE_READLINKAT = 0; then
25906
25907
25908
25909
25910
25911
25912
25913
25914 gl_LIBOBJS="$gl_LIBOBJS readlinkat.$ac_objext"
25915
25916 fi
25917
25918
25919
25920
25921
25922 GNULIB_READLINKAT=1
25923
25924
25925
25926
25927
25928
e4184a20
GM
25929 for ac_func in sig2str
25930do :
25931 ac_fn_c_check_func "$LINENO" "sig2str" "ac_cv_func_sig2str"
25932if test "x$ac_cv_func_sig2str" = x""yes; then :
25933 cat >>confdefs.h <<_ACEOF
25934#define HAVE_SIG2STR 1
25935_ACEOF
25936
25937fi
25938done
25939
25940
25941 if test $ac_cv_func_sig2str = no; then
25942
25943
25944
25945
25946
25947
25948
25949
25950 gl_LIBOBJS="$gl_LIBOBJS sig2str.$ac_objext"
25951
25952
25953 :
25954
25955 fi
25956
369e19fc 25957
067d23c9 25958
5476a9a4
GM
25959
25960
25961
25962
25963
25964
25965
25966
25967 if test $gl_cv_have_include_next = yes; then
25968 gl_cv_next_signal_h='<'signal.h'>'
25969 else
25970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
25971$as_echo_n "checking absolute name of <signal.h>... " >&6; }
25972if test "${gl_cv_next_signal_h+set}" = set; then :
0eb775a3 25973 $as_echo_n "(cached) " >&6
0eb775a3 25974else
5476a9a4
GM
25975
25976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0eb775a3 25977/* end confdefs.h. */
5476a9a4 25978#include <signal.h>
f199cab1 25979
0eb775a3 25980_ACEOF
5476a9a4
GM
25981 case "$host_os" in
25982 aix*) gl_absname_cpp="$ac_cpp -C" ;;
25983 *) gl_absname_cpp="$ac_cpp" ;;
25984 esac
0eb775a3 25985
5476a9a4
GM
25986 case "$host_os" in
25987 mingw*)
25988 gl_dirsep_regex='[/\\]'
25989 ;;
25990 *)
25991 gl_dirsep_regex='\/'
25992 ;;
25993 esac
25994 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
0eb775a3 25995
5476a9a4
GM
25996 gl_header_literal_regex=`echo 'signal.h' \
25997 | sed -e "$gl_make_literal_regex_sed"`
25998 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25999 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26000 s|^/[^/]|//&|
26001 p
26002 q
26003 }'
26004 gl_cv_next_signal_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26005 sed -n "$gl_absolute_header_sed"`'"'
0eb775a3 26006
f199cab1 26007
5476a9a4
GM
26008fi
26009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
26010$as_echo "$gl_cv_next_signal_h" >&6; }
26011 fi
26012 NEXT_SIGNAL_H=$gl_cv_next_signal_h
067d23c9 26013
5476a9a4
GM
26014 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26015 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26016 gl_next_as_first_directive='<'signal.h'>'
26017 else
26018 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26019 gl_next_as_first_directive=$gl_cv_next_signal_h
26020 fi
26021 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
067d23c9 26022
067d23c9
KY
26023
26024
067d23c9 26025
067d23c9 26026
5476a9a4
GM
26027# AIX declares sig_atomic_t to already include volatile, and C89 compilers
26028# then choke on 'volatile sig_atomic_t'. C99 requires that it compile.
26029 ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
26030#include <signal.h>
26031
26032"
26033if test "x$ac_cv_type_volatile_sig_atomic_t" = x""yes; then :
26034
26035else
26036 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
f199cab1 26037fi
067d23c9 26038
067d23c9 26039
067d23c9 26040
067d23c9 26041
938a4ef9 26042
938a4ef9 26043
5476a9a4
GM
26044
26045 ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
26046#include <signal.h>
26047
26048"
26049if test "x$ac_cv_type_sighandler_t" = x""yes; then :
26050
26051else
26052 HAVE_SIGHANDLER_T=0
26053fi
26054
26055
26056
26057
a6342fc8 26058 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
5476a9a4
GM
26059/* <sys/types.h> is not needed according to POSIX, but the
26060 <sys/socket.h> in i386-unknown-freebsd4.10 and
26061 powerpc-apple-darwin5.5 required it. */
26062#include <sys/types.h>
26063#if HAVE_SYS_SOCKET_H
26064# include <sys/socket.h>
26065#elif HAVE_WS2TCPIP_H
26066# include <ws2tcpip.h>
26067#endif
26068
26069"
26070if test "x$ac_cv_type_socklen_t" = x""yes; then :
26071
067d23c9 26072else
5476a9a4
GM
26073 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5
26074$as_echo_n "checking for socklen_t equivalent... " >&6; }
26075 if test "${gl_cv_socklen_t_equiv+set}" = set; then :
26076 $as_echo_n "(cached) " >&6
26077else
26078 # Systems have either "struct sockaddr *" or
26079 # "void *" as the second argument to getpeername
26080 gl_cv_socklen_t_equiv=
26081 for arg2 in "struct sockaddr" void; do
26082 for t in int size_t "unsigned int" "long int" "unsigned long int"; do
26083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 26084/* end confdefs.h. */
5476a9a4
GM
26085#include <sys/types.h>
26086 #include <sys/socket.h>
26087
26088 int getpeername (int, $arg2 *, $t *);
f199cab1
GM
26089int
26090main ()
26091{
5476a9a4
GM
26092$t len;
26093 getpeername (0, 0, &len);
f199cab1
GM
26094 ;
26095 return 0;
26096}
3e0be4ab 26097_ACEOF
5476a9a4
GM
26098if ac_fn_c_try_compile "$LINENO"; then :
26099 gl_cv_socklen_t_equiv="$t"
067d23c9 26100fi
5476a9a4
GM
26101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26102 test "$gl_cv_socklen_t_equiv" != "" && break
26103 done
26104 test "$gl_cv_socklen_t_equiv" != "" && break
26105 done
067d23c9 26106
5476a9a4 26107fi
067d23c9 26108
5476a9a4
GM
26109 if test "$gl_cv_socklen_t_equiv" = ""; then
26110 as_fn_error "Cannot find a type to use in place of socklen_t" "$LINENO" 5
26111 fi
26112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socklen_t_equiv" >&5
26113$as_echo "$gl_cv_socklen_t_equiv" >&6; }
26114
26115cat >>confdefs.h <<_ACEOF
26116#define socklen_t $gl_cv_socklen_t_equiv
26117_ACEOF
067d23c9 26118
f199cab1 26119fi
3e0be4ab 26120
3e0be4ab 26121
5476a9a4
GM
26122 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
26123$as_echo_n "checking for ssize_t... " >&6; }
26124if test "${gt_cv_ssize_t+set}" = set; then :
f199cab1
GM
26125 $as_echo_n "(cached) " >&6
26126else
5476a9a4 26127 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 26128/* end confdefs.h. */
5476a9a4 26129#include <sys/types.h>
f199cab1
GM
26130int
26131main ()
26132{
5476a9a4
GM
26133int x = sizeof (ssize_t *) + sizeof (ssize_t);
26134 return !x;
f199cab1
GM
26135 ;
26136 return 0;
26137}
26138_ACEOF
5476a9a4
GM
26139if ac_fn_c_try_compile "$LINENO"; then :
26140 gt_cv_ssize_t=yes
067d23c9 26141else
5476a9a4 26142 gt_cv_ssize_t=no
f199cab1 26143fi
5476a9a4 26144rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
067d23c9 26145fi
5476a9a4
GM
26146{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
26147$as_echo "$gt_cv_ssize_t" >&6; }
26148 if test $gt_cv_ssize_t = no; then
26149
26150$as_echo "#define ssize_t int" >>confdefs.h
26151
26152 fi
26153
26154
26155
26156
26157
5476a9a4
GM
26158 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>
26159 #include <sys/stat.h>
26160"
26161if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = x""yes; then :
26162
26163cat >>confdefs.h <<_ACEOF
26164#define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1
26165_ACEOF
26166
26167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5
26168$as_echo_n "checking whether struct stat.st_atim is of type struct timespec... " >&6; }
26169if test "${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+set}" = set; then :
f199cab1
GM
26170 $as_echo_n "(cached) " >&6
26171else
5476a9a4 26172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 26173/* end confdefs.h. */
3e0be4ab 26174
5476a9a4
GM
26175 #include <sys/types.h>
26176 #include <sys/stat.h>
26177 #if HAVE_SYS_TIME_H
26178 # include <sys/time.h>
26179 #endif
26180 #include <time.h>
26181 struct timespec ts;
26182 struct stat st;
26183
f199cab1
GM
26184int
26185main ()
26186{
5476a9a4
GM
26187
26188 st.st_atim = ts;
26189
f199cab1
GM
26190 ;
26191 return 0;
26192}
3e0be4ab 26193_ACEOF
5476a9a4
GM
26194if ac_fn_c_try_compile "$LINENO"; then :
26195 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes
f199cab1 26196else
5476a9a4 26197 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no
f199cab1 26198fi
5476a9a4 26199rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
067d23c9 26200fi
5476a9a4
GM
26201{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5
26202$as_echo "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; }
26203 if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
067d23c9 26204
5476a9a4 26205$as_echo "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h
067d23c9 26206
5476a9a4
GM
26207 fi
26208else
26209 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>
26210 #include <sys/stat.h>
26211"
26212if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = x""yes; then :
067d23c9 26213
5476a9a4
GM
26214cat >>confdefs.h <<_ACEOF
26215#define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1
26216_ACEOF
3e0be4ab 26217
0eb775a3 26218
3e0be4ab 26219else
5476a9a4
GM
26220 ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h>
26221 #include <sys/stat.h>
26222"
26223if test "x$ac_cv_member_struct_stat_st_atimensec" = x""yes; then :
26224
26225cat >>confdefs.h <<_ACEOF
26226#define HAVE_STRUCT_STAT_ST_ATIMENSEC 1
067d23c9 26227_ACEOF
5476a9a4
GM
26228
26229
067d23c9 26230else
5476a9a4
GM
26231 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>
26232 #include <sys/stat.h>
26233"
26234if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = x""yes; then :
26235
26236cat >>confdefs.h <<_ACEOF
26237#define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1
26238_ACEOF
26239
26240
3e0be4ab 26241fi
5476a9a4 26242
067d23c9 26243fi
5476a9a4 26244
067d23c9 26245fi
067d23c9
KY
26246
26247fi
26248
067d23c9 26249
067d23c9 26250
067d23c9 26251
067d23c9 26252
5476a9a4
GM
26253 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>
26254 #include <sys/stat.h>
26255"
26256if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = x""yes; then :
26257
26258cat >>confdefs.h <<_ACEOF
26259#define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1
26260_ACEOF
067d23c9
KY
26261
26262
f199cab1 26263else
5476a9a4
GM
26264 ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include <sys/types.h>
26265 #include <sys/stat.h>
26266"
26267if test "x$ac_cv_member_struct_stat_st_birthtimensec" = x""yes; then :
067d23c9 26268
5476a9a4
GM
26269cat >>confdefs.h <<_ACEOF
26270#define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1
26271_ACEOF
067d23c9 26272
3e0be4ab 26273
067d23c9 26274else
5476a9a4
GM
26275 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>
26276 #include <sys/stat.h>
26277"
26278if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = x""yes; then :
067d23c9 26279
5476a9a4
GM
26280cat >>confdefs.h <<_ACEOF
26281#define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1
067d23c9 26282_ACEOF
5476a9a4
GM
26283
26284
f199cab1 26285fi
5476a9a4 26286
f199cab1 26287fi
5476a9a4 26288
067d23c9 26289fi
0eb775a3 26290
0eb775a3 26291
0eb775a3 26292
5476a9a4
GM
26293 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working stdalign.h" >&5
26294$as_echo_n "checking for working stdalign.h... " >&6; }
26295if test "${gl_cv_header_working_stdalign_h+set}" = set; then :
f199cab1 26296 $as_echo_n "(cached) " >&6
067d23c9 26297else
5476a9a4 26298 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 26299/* end confdefs.h. */
5476a9a4
GM
26300#include <stdalign.h>
26301 #include <stddef.h>
26302
26303 /* Test that alignof yields a result consistent with offsetof.
26304 This catches GCC bug 52023
26305 <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. */
26306 #ifdef __cplusplus
26307 template <class t> struct alignof_helper { char a; t b; };
26308 # define ao(type) offsetof (alignof_helper<type>, b)
26309 #else
26310 # define ao(type) offsetof (struct { char a; type b; }, b)
26311 #endif
26312 char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1];
26313 char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1];
26314 char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1];
26315
26316 /* Test _Alignas only on platforms where gnulib can help. */
26317 #if \
0cdca42a
GM
26318 ((defined __cplusplus && 201103 <= __cplusplus) \
26319 || __GNUC__ || __IBMC__ || __IBMCPP__ || __ICC \
5476a9a4 26320 || 0x5110 <= __SUNPRO_C || 1300 <= _MSC_VER)
6ea3f01e
GM
26321 struct alignas_test { char c; char alignas (8) alignas_8; };
26322 char test_alignas[offsetof (struct alignas_test, alignas_8) == 8
26323 ? 1 : -1];
5476a9a4 26324 #endif
067d23c9 26325
f199cab1
GM
26326int
26327main ()
26328{
5476a9a4 26329
f199cab1
GM
26330 ;
26331 return 0;
26332}
26333_ACEOF
5476a9a4
GM
26334if ac_fn_c_try_compile "$LINENO"; then :
26335 gl_cv_header_working_stdalign_h=yes
f199cab1 26336else
5476a9a4 26337 gl_cv_header_working_stdalign_h=no
f199cab1 26338fi
5476a9a4 26339rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
067d23c9 26340fi
5476a9a4
GM
26341{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdalign_h" >&5
26342$as_echo "$gl_cv_header_working_stdalign_h" >&6; }
067d23c9 26343
5476a9a4
GM
26344 if test $gl_cv_header_working_stdalign_h = yes; then
26345 STDALIGN_H=''
26346 else
26347 STDALIGN_H='stdalign.h'
f199cab1 26348 fi
0eb775a3 26349
5476a9a4
GM
26350
26351 if test -n "$STDALIGN_H"; then
26352 GL_GENERATE_STDALIGN_H_TRUE=
26353 GL_GENERATE_STDALIGN_H_FALSE='#'
f199cab1 26354else
5476a9a4
GM
26355 GL_GENERATE_STDALIGN_H_TRUE='#'
26356 GL_GENERATE_STDALIGN_H_FALSE=
0eb775a3 26357fi
0eb775a3
GM
26358
26359
26360
5476a9a4
GM
26361 STDARG_H=''
26362 NEXT_STDARG_H='<stdarg.h>'
26363 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5
26364$as_echo_n "checking for va_copy... " >&6; }
26365 if test "${gl_cv_func_va_copy+set}" = set; then :
f199cab1 26366 $as_echo_n "(cached) " >&6
5476a9a4
GM
26367else
26368
26369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26370/* end confdefs.h. */
26371#include <stdarg.h>
f199cab1
GM
26372int
26373main ()
26374{
5476a9a4
GM
26375
26376#ifndef va_copy
26377void (*func) (va_list, va_list) = va_copy;
26378#endif
26379
f199cab1
GM
26380 ;
26381 return 0;
26382}
26383_ACEOF
5476a9a4
GM
26384if ac_fn_c_try_compile "$LINENO"; then :
26385 gl_cv_func_va_copy=yes
f199cab1 26386else
5476a9a4 26387 gl_cv_func_va_copy=no
f199cab1 26388fi
5476a9a4 26389rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 26390fi
5476a9a4
GM
26391
26392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_va_copy" >&5
26393$as_echo "$gl_cv_func_va_copy" >&6; }
26394 if test $gl_cv_func_va_copy = no; then
26395 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26396/* end confdefs.h. */
26397#if defined _AIX && !defined __GNUC__
26398 AIX vaccine
26399 #endif
26400
26401_ACEOF
26402if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26403 $EGREP "vaccine" >/dev/null 2>&1; then :
26404 gl_aixcc=yes
f199cab1 26405else
5476a9a4 26406 gl_aixcc=no
f199cab1 26407fi
5476a9a4 26408rm -f conftest*
0eb775a3 26409
5476a9a4
GM
26410 if test $gl_aixcc = yes; then
26411 STDARG_H=stdarg.h
0eb775a3
GM
26412
26413
5476a9a4
GM
26414
26415
26416
26417
26418
26419
26420 if test $gl_cv_have_include_next = yes; then
26421 gl_cv_next_stdarg_h='<'stdarg.h'>'
26422 else
26423 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdarg.h>" >&5
26424$as_echo_n "checking absolute name of <stdarg.h>... " >&6; }
26425if test "${gl_cv_next_stdarg_h+set}" = set; then :
f199cab1
GM
26426 $as_echo_n "(cached) " >&6
26427else
5476a9a4
GM
26428
26429 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 26430/* end confdefs.h. */
5476a9a4 26431#include <stdarg.h>
0eb775a3 26432
f199cab1 26433_ACEOF
5476a9a4
GM
26434 case "$host_os" in
26435 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26436 *) gl_absname_cpp="$ac_cpp" ;;
26437 esac
26438
26439 case "$host_os" in
26440 mingw*)
26441 gl_dirsep_regex='[/\\]'
26442 ;;
26443 *)
26444 gl_dirsep_regex='\/'
26445 ;;
26446 esac
26447 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26448
26449 gl_header_literal_regex=`echo 'stdarg.h' \
26450 | sed -e "$gl_make_literal_regex_sed"`
26451 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26452 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26453 s|^/[^/]|//&|
26454 p
26455 q
26456 }'
26457 gl_cv_next_stdarg_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26458 sed -n "$gl_absolute_header_sed"`'"'
26459
26460
f199cab1 26461fi
5476a9a4
GM
26462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdarg_h" >&5
26463$as_echo "$gl_cv_next_stdarg_h" >&6; }
26464 fi
26465 NEXT_STDARG_H=$gl_cv_next_stdarg_h
26466
26467 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26468 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26469 gl_next_as_first_directive='<'stdarg.h'>'
26470 else
26471 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26472 gl_next_as_first_directive=$gl_cv_next_stdarg_h
26473 fi
26474 NEXT_AS_FIRST_DIRECTIVE_STDARG_H=$gl_next_as_first_directive
0eb775a3
GM
26475
26476
26477
5476a9a4
GM
26478
26479 if test "$gl_cv_next_stdarg_h" = '""'; then
26480 gl_cv_next_stdarg_h='"///usr/include/stdarg.h"'
26481 NEXT_STDARG_H="$gl_cv_next_stdarg_h"
26482 fi
f199cab1 26483 else
5476a9a4
GM
26484
26485 saved_as_echo_n="$as_echo_n"
26486 as_echo_n=':'
26487 if test "${gl_cv_func___va_copy+set}" = set; then :
f199cab1
GM
26488 $as_echo_n "(cached) " >&6
26489else
0eb775a3 26490
5476a9a4
GM
26491 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26492/* end confdefs.h. */
26493#include <stdarg.h>
f199cab1
GM
26494int
26495main ()
26496{
5476a9a4
GM
26497
26498#ifndef __va_copy
26499error, bail out
26500#endif
26501
f199cab1
GM
26502 ;
26503 return 0;
26504}
26505_ACEOF
5476a9a4
GM
26506if ac_fn_c_try_compile "$LINENO"; then :
26507 gl_cv_func___va_copy=yes
f199cab1 26508else
5476a9a4 26509 gl_cv_func___va_copy=no
f199cab1 26510fi
5476a9a4 26511rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 26512fi
0eb775a3 26513
5476a9a4
GM
26514 as_echo_n="$saved_as_echo_n"
26515
26516 if test $gl_cv_func___va_copy = yes; then
26517
26518$as_echo "#define va_copy __va_copy" >>confdefs.h
26519
26520 else
0eb775a3 26521
5476a9a4
GM
26522
26523$as_echo "#define va_copy gl_va_copy" >>confdefs.h
0eb775a3 26524
f199cab1
GM
26525 fi
26526 fi
5476a9a4
GM
26527 fi
26528
26529 if test -n "$STDARG_H"; then
26530 GL_GENERATE_STDARG_H_TRUE=
26531 GL_GENERATE_STDARG_H_FALSE='#'
26532else
26533 GL_GENERATE_STDARG_H_TRUE='#'
26534 GL_GENERATE_STDARG_H_FALSE=
26535fi
26536
26537
26538
26539
26540
26541
26542 # Define two additional variables used in the Makefile substitution.
26543
26544 if test "$ac_cv_header_stdbool_h" = yes; then
26545 STDBOOL_H=''
26546 else
26547 STDBOOL_H='stdbool.h'
26548 fi
26549
26550 if test -n "$STDBOOL_H"; then
26551 GL_GENERATE_STDBOOL_H_TRUE=
26552 GL_GENERATE_STDBOOL_H_FALSE='#'
26553else
26554 GL_GENERATE_STDBOOL_H_TRUE='#'
26555 GL_GENERATE_STDBOOL_H_FALSE=
26556fi
26557
26558
26559 if test "$ac_cv_type__Bool" = yes; then
26560 HAVE__BOOL=1
26561 else
26562 HAVE__BOOL=0
26563 fi
26564
26565
26566
26567
26568
26569 STDDEF_H=
26570 if test $gt_cv_c_wchar_t = no; then
26571 HAVE_WCHAR_T=0
26572 STDDEF_H=stddef.h
26573 fi
26574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
26575$as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
26576if test "${gl_cv_decl_null_works+set}" = set; then :
f199cab1
GM
26577 $as_echo_n "(cached) " >&6
26578else
5476a9a4 26579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 26580/* end confdefs.h. */
5476a9a4
GM
26581#include <stddef.h>
26582 int test[2 * (sizeof NULL == sizeof (void *)) -1];
3e0be4ab 26583
f199cab1
GM
26584int
26585main ()
26586{
5476a9a4 26587
f199cab1
GM
26588 ;
26589 return 0;
26590}
26591_ACEOF
5476a9a4
GM
26592if ac_fn_c_try_compile "$LINENO"; then :
26593 gl_cv_decl_null_works=yes
f199cab1 26594else
5476a9a4 26595 gl_cv_decl_null_works=no
f199cab1 26596fi
5476a9a4 26597rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 26598fi
5476a9a4
GM
26599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
26600$as_echo "$gl_cv_decl_null_works" >&6; }
26601 if test $gl_cv_decl_null_works = no; then
26602 REPLACE_NULL=1
26603 STDDEF_H=stddef.h
26604 fi
26605
26606 if test -n "$STDDEF_H"; then
26607 GL_GENERATE_STDDEF_H_TRUE=
26608 GL_GENERATE_STDDEF_H_FALSE='#'
f199cab1 26609else
5476a9a4
GM
26610 GL_GENERATE_STDDEF_H_TRUE='#'
26611 GL_GENERATE_STDDEF_H_FALSE=
f199cab1 26612fi
3e0be4ab 26613
5476a9a4 26614 if test -n "$STDDEF_H"; then
3e0be4ab
GM
26615
26616
5476a9a4
GM
26617
26618
26619
26620
26621
26622
26623 if test $gl_cv_have_include_next = yes; then
26624 gl_cv_next_stddef_h='<'stddef.h'>'
26625 else
26626 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
26627$as_echo_n "checking absolute name of <stddef.h>... " >&6; }
26628if test "${gl_cv_next_stddef_h+set}" = set; then :
067d23c9
KY
26629 $as_echo_n "(cached) " >&6
26630else
5476a9a4
GM
26631
26632 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 26633/* end confdefs.h. */
5476a9a4 26634#include <stddef.h>
f199cab1 26635
067d23c9 26636_ACEOF
5476a9a4
GM
26637 case "$host_os" in
26638 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26639 *) gl_absname_cpp="$ac_cpp" ;;
26640 esac
26641
26642 case "$host_os" in
26643 mingw*)
26644 gl_dirsep_regex='[/\\]'
26645 ;;
26646 *)
26647 gl_dirsep_regex='\/'
26648 ;;
26649 esac
26650 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26651
26652 gl_header_literal_regex=`echo 'stddef.h' \
26653 | sed -e "$gl_make_literal_regex_sed"`
26654 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26655 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26656 s|^/[^/]|//&|
26657 p
26658 q
26659 }'
26660 gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26661 sed -n "$gl_absolute_header_sed"`'"'
26662
26663
f199cab1 26664fi
5476a9a4
GM
26665{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
26666$as_echo "$gl_cv_next_stddef_h" >&6; }
26667 fi
26668 NEXT_STDDEF_H=$gl_cv_next_stddef_h
26669
26670 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26671 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26672 gl_next_as_first_directive='<'stddef.h'>'
26673 else
26674 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26675 gl_next_as_first_directive=$gl_cv_next_stddef_h
26676 fi
26677 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
26678
f199cab1 26679
f199cab1 26680
f199cab1 26681
067d23c9 26682 fi
067d23c9 26683
f199cab1 26684
067d23c9 26685
067d23c9 26686
067d23c9 26687
067d23c9
KY
26688
26689
067d23c9 26690
067d23c9
KY
26691
26692
067d23c9 26693
3e0be4ab 26694
5476a9a4
GM
26695 if test $gl_cv_have_include_next = yes; then
26696 gl_cv_next_stdio_h='<'stdio.h'>'
26697 else
26698 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
26699$as_echo_n "checking absolute name of <stdio.h>... " >&6; }
26700if test "${gl_cv_next_stdio_h+set}" = set; then :
26701 $as_echo_n "(cached) " >&6
f199cab1 26702else
5476a9a4
GM
26703
26704 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26705/* end confdefs.h. */
26706#include <stdio.h>
26707
f199cab1 26708_ACEOF
5476a9a4
GM
26709 case "$host_os" in
26710 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26711 *) gl_absname_cpp="$ac_cpp" ;;
26712 esac
067d23c9 26713
5476a9a4
GM
26714 case "$host_os" in
26715 mingw*)
26716 gl_dirsep_regex='[/\\]'
26717 ;;
26718 *)
26719 gl_dirsep_regex='\/'
26720 ;;
26721 esac
26722 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26723
26724 gl_header_literal_regex=`echo 'stdio.h' \
26725 | sed -e "$gl_make_literal_regex_sed"`
26726 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26727 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26728 s|^/[^/]|//&|
26729 p
26730 q
26731 }'
26732 gl_cv_next_stdio_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26733 sed -n "$gl_absolute_header_sed"`'"'
067d23c9 26734
067d23c9 26735
f199cab1 26736fi
5476a9a4
GM
26737{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
26738$as_echo "$gl_cv_next_stdio_h" >&6; }
26739 fi
26740 NEXT_STDIO_H=$gl_cv_next_stdio_h
067d23c9 26741
5476a9a4
GM
26742 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26743 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26744 gl_next_as_first_directive='<'stdio.h'>'
26745 else
26746 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26747 gl_next_as_first_directive=$gl_cv_next_stdio_h
26748 fi
26749 NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
26750
26751
26752
26753
26754
26755 GNULIB_FSCANF=1
26756
26757
26758cat >>confdefs.h <<_ACEOF
26759#define GNULIB_FSCANF 1
26760_ACEOF
067d23c9 26761
067d23c9 26762
5476a9a4 26763 GNULIB_SCANF=1
f199cab1 26764
f199cab1 26765
5476a9a4
GM
26766cat >>confdefs.h <<_ACEOF
26767#define GNULIB_SCANF 1
f199cab1
GM
26768_ACEOF
26769
067d23c9 26770
5476a9a4
GM
26771 GNULIB_FGETC=1
26772 GNULIB_GETC=1
26773 GNULIB_GETCHAR=1
26774 GNULIB_FGETS=1
26775 GNULIB_FREAD=1
067d23c9 26776
067d23c9 26777
5476a9a4
GM
26778 GNULIB_FPRINTF=1
26779 GNULIB_PRINTF=1
26780 GNULIB_VFPRINTF=1
26781 GNULIB_VPRINTF=1
26782 GNULIB_FPUTC=1
26783 GNULIB_PUTC=1
26784 GNULIB_PUTCHAR=1
26785 GNULIB_FPUTS=1
26786 GNULIB_PUTS=1
26787 GNULIB_FWRITE=1
067d23c9 26788
067d23c9 26789
067d23c9 26790
067d23c9 26791
067d23c9 26792
067d23c9 26793
067d23c9 26794
067d23c9 26795
3e0be4ab
GM
26796
26797
26798
26799
26800
26801
3e0be4ab 26802
5476a9a4
GM
26803 if test $gl_cv_have_include_next = yes; then
26804 gl_cv_next_stdlib_h='<'stdlib.h'>'
26805 else
26806 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
26807$as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
26808if test "${gl_cv_next_stdlib_h+set}" = set; then :
067d23c9
KY
26809 $as_echo_n "(cached) " >&6
26810else
5476a9a4
GM
26811
26812 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 26813/* end confdefs.h. */
5476a9a4
GM
26814#include <stdlib.h>
26815
f199cab1 26816_ACEOF
5476a9a4
GM
26817 case "$host_os" in
26818 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26819 *) gl_absname_cpp="$ac_cpp" ;;
26820 esac
067d23c9 26821
5476a9a4
GM
26822 case "$host_os" in
26823 mingw*)
26824 gl_dirsep_regex='[/\\]'
26825 ;;
26826 *)
26827 gl_dirsep_regex='\/'
26828 ;;
26829 esac
26830 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26831
26832 gl_header_literal_regex=`echo 'stdlib.h' \
26833 | sed -e "$gl_make_literal_regex_sed"`
26834 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26835 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26836 s|^/[^/]|//&|
26837 p
26838 q
26839 }'
26840 gl_cv_next_stdlib_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26841 sed -n "$gl_absolute_header_sed"`'"'
3e0be4ab 26842
067d23c9 26843
f199cab1 26844fi
5476a9a4
GM
26845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
26846$as_echo "$gl_cv_next_stdlib_h" >&6; }
26847 fi
26848 NEXT_STDLIB_H=$gl_cv_next_stdlib_h
b0415a03 26849
5476a9a4
GM
26850 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26851 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26852 gl_next_as_first_directive='<'stdlib.h'>'
26853 else
26854 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26855 gl_next_as_first_directive=$gl_cv_next_stdlib_h
26856 fi
26857 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
b0415a03 26858
067d23c9 26859
067d23c9 26860
067d23c9 26861
067d23c9 26862
067d23c9 26863
067d23c9 26864
067d23c9 26865
067d23c9 26866
5476a9a4 26867 # This defines (or not) HAVE_TZNAME and HAVE_TM_ZONE.
067d23c9 26868
067d23c9 26869
067d23c9 26870
b0415a03
GM
26871
26872
ac1ca7e9 26873
0eb775a3 26874
5476a9a4 26875$as_echo "#define my_strftime nstrftime" >>confdefs.h
067d23c9 26876
067d23c9 26877
a0a61e58
GM
26878
26879
26880
3e0be4ab 26881
5476a9a4
GM
26882
26883
283c7aed
GM
26884
26885
26886
5476a9a4
GM
26887 if test "$ac_cv_have_decl_strtoimax" != yes; then
26888 HAVE_DECL_STRTOIMAX=0
26889 fi
26890
26891 if test $ac_cv_func_strtoimax = yes; then
26892 HAVE_STRTOIMAX=1
26893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtoimax works" >&5
26894$as_echo_n "checking whether strtoimax works... " >&6; }
26895if test "${gl_cv_func_strtoimax+set}" = set; then :
f199cab1
GM
26896 $as_echo_n "(cached) " >&6
26897else
26898 if test "$cross_compiling" = yes; then :
5476a9a4
GM
26899 case "$host_os" in
26900 # Guess no on AIX 5.
26901 aix5*) gl_cv_func_strtoimax="guessing no" ;;
26902 # Guess yes otherwise.
26903 *) gl_cv_func_strtoimax="guessing yes" ;;
26904 esac
26905
f199cab1
GM
26906else
26907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26908/* end confdefs.h. */
3e0be4ab 26909
5476a9a4
GM
26910#include <errno.h>
26911#include <string.h>
26912#include <inttypes.h>
26913int main ()
26914{
26915 if (sizeof (intmax_t) > sizeof (int))
26916 {
26917 const char *s = "4294967295";
26918 char *p;
26919 intmax_t res;
26920 errno = 0;
26921 res = strtoimax (s, &p, 10);
26922 if (p != s + strlen (s))
26923 return 1;
26924 if (errno != 0)
26925 return 2;
26926 if (res != (intmax_t) 65535 * (intmax_t) 65537)
26927 return 3;
26928 }
26929 else
26930 {
26931 const char *s = "2147483647";
26932 char *p;
26933 intmax_t res;
26934 errno = 0;
26935 res = strtoimax (s, &p, 10);
26936 if (p != s + strlen (s))
26937 return 1;
26938 if (errno != 0)
26939 return 2;
26940 if (res != 2147483647)
26941 return 3;
26942 }
f199cab1
GM
26943 return 0;
26944}
5476a9a4 26945
f199cab1
GM
26946_ACEOF
26947if ac_fn_c_try_run "$LINENO"; then :
5476a9a4 26948 gl_cv_func_strtoimax=yes
f199cab1 26949else
5476a9a4 26950 gl_cv_func_strtoimax=no
f199cab1
GM
26951fi
26952rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26953 conftest.$ac_objext conftest.beam conftest.$ac_ext
067d23c9
KY
26954fi
26955
3e0be4ab 26956
f199cab1 26957fi
5476a9a4
GM
26958{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtoimax" >&5
26959$as_echo "$gl_cv_func_strtoimax" >&6; }
26960 case "$gl_cv_func_strtoimax" in
26961 *no) REPLACE_STRTOIMAX=1 ;;
26962 esac
26963 else
26964 HAVE_STRTOIMAX=0
26965 fi
067d23c9 26966
a6342fc8 26967 if test $HAVE_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; then
067d23c9 26968
067d23c9 26969
067d23c9 26970
067d23c9 26971
067d23c9 26972
3e0be4ab 26973
2b1928b8
GM
26974
26975
5476a9a4
GM
26976 gl_LIBOBJS="$gl_LIBOBJS strtoimax.$ac_objext"
26977
26978
26979 ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
26980if test "x$ac_cv_have_decl_strtoll" = x""yes; then :
26981 ac_have_decl=1
f199cab1 26982else
5476a9a4 26983 ac_have_decl=0
f199cab1 26984fi
2b1928b8 26985
5476a9a4
GM
26986cat >>confdefs.h <<_ACEOF
26987#define HAVE_DECL_STRTOLL $ac_have_decl
26988_ACEOF
26989
26990
067d23c9 26991
a6342fc8 26992 fi
067d23c9 26993
3e0be4ab
GM
26994
26995
26996
3e0be4ab 26997
5476a9a4 26998 GNULIB_STRTOIMAX=1
3e0be4ab
GM
26999
27000
27001
27002
3e0be4ab
GM
27003
27004
27005
f199cab1 27006
f199cab1 27007
5476a9a4
GM
27008 if test "$ac_cv_have_decl_strtoumax" != yes; then
27009 HAVE_DECL_STRTOUMAX=0
27010 fi
067d23c9 27011
a6342fc8 27012 if test $ac_cv_func_strtoumax = no; then
0eb775a3 27013
5476a9a4
GM
27014
27015
27016
27017
27018
27019
27020
27021 gl_LIBOBJS="$gl_LIBOBJS strtoumax.$ac_objext"
27022
27023
27024 ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
27025if test "x$ac_cv_have_decl_strtoull" = x""yes; then :
27026 ac_have_decl=1
067d23c9 27027else
5476a9a4 27028 ac_have_decl=0
067d23c9 27029fi
5476a9a4
GM
27030
27031cat >>confdefs.h <<_ACEOF
27032#define HAVE_DECL_STRTOULL $ac_have_decl
27033_ACEOF
27034
27035
27036
a6342fc8 27037 fi
067d23c9 27038
067d23c9 27039
067d23c9 27040
067d23c9 27041
067d23c9 27042
5476a9a4
GM
27043 GNULIB_STRTOUMAX=1
27044
27045
27046
27047
27048
27049
27050
27051 if test $ac_cv_func_symlink = no; then
27052 HAVE_SYMLINK=0
27053 else
27054 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether symlink handles trailing slash correctly" >&5
27055$as_echo_n "checking whether symlink handles trailing slash correctly... " >&6; }
27056if test "${gl_cv_func_symlink_works+set}" = set; then :
f199cab1 27057 $as_echo_n "(cached) " >&6
5476a9a4
GM
27058else
27059 if test "$cross_compiling" = yes; then :
27060 case "$host_os" in
27061 # Guess yes on glibc systems.
27062 *-gnu*) gl_cv_func_symlink_works="guessing yes" ;;
27063 # If we don't know, assume the worst.
27064 *) gl_cv_func_symlink_works="guessing no" ;;
27065 esac
27066
f199cab1
GM
27067else
27068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27069/* end confdefs.h. */
5476a9a4
GM
27070#include <unistd.h>
27071
f199cab1
GM
27072int
27073main ()
27074{
5476a9a4
GM
27075int result = 0;
27076 if (!symlink ("a", "conftest.link/"))
27077 result |= 1;
27078 if (symlink ("conftest.f", "conftest.lnk2"))
27079 result |= 2;
27080 else if (!symlink ("a", "conftest.lnk2/"))
27081 result |= 4;
27082 return result;
067d23c9 27083
f199cab1
GM
27084 ;
27085 return 0;
27086}
27087_ACEOF
5476a9a4
GM
27088if ac_fn_c_try_run "$LINENO"; then :
27089 gl_cv_func_symlink_works=yes
f199cab1 27090else
5476a9a4 27091 gl_cv_func_symlink_works=no
f199cab1 27092fi
5476a9a4
GM
27093rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27094 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1 27095fi
067d23c9 27096
5476a9a4 27097 rm -f conftest.f conftest.link conftest.lnk2
f199cab1 27098fi
5476a9a4
GM
27099{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_symlink_works" >&5
27100$as_echo "$gl_cv_func_symlink_works" >&6; }
27101 case "$gl_cv_func_symlink_works" in
27102 *yes) ;;
27103 *)
27104 REPLACE_SYMLINK=1
27105 ;;
27106 esac
27107 fi
067d23c9 27108
a6342fc8 27109 if test $HAVE_SYMLINK = 0 || test $REPLACE_SYMLINK = 1; then
067d23c9 27110
7e723570 27111
7e723570
GM
27112
27113
dd0d840e 27114
dd0d840e
GM
27115
27116
27117
5476a9a4 27118 gl_LIBOBJS="$gl_LIBOBJS symlink.$ac_objext"
dd0d840e 27119
a6342fc8 27120 fi
dd0d840e
GM
27121
27122
d3127c14
GM
27123
27124
d3127c14 27125
5476a9a4 27126 GNULIB_SYMLINK=1
d3127c14 27127
d3127c14 27128
d3127c14
GM
27129
27130
067d23c9 27131
067d23c9 27132
d3127c14 27133
d3127c14 27134
5476a9a4
GM
27135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/select.h> is self-contained" >&5
27136$as_echo_n "checking whether <sys/select.h> is self-contained... " >&6; }
27137if test "${gl_cv_header_sys_select_h_selfcontained+set}" = set; then :
27138 $as_echo_n "(cached) " >&6
27139else
d3127c14 27140
5476a9a4
GM
27141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27142/* end confdefs.h. */
27143#include <sys/select.h>
27144int
27145main ()
27146{
27147struct timeval b;
27148 ;
27149 return 0;
27150}
27151_ACEOF
27152if ac_fn_c_try_compile "$LINENO"; then :
27153 gl_cv_header_sys_select_h_selfcontained=yes
27154else
27155 gl_cv_header_sys_select_h_selfcontained=no
27156fi
27157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27158 if test $gl_cv_header_sys_select_h_selfcontained = yes; then
27159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27160/* end confdefs.h. */
27161#include <sys/select.h>
27162int
27163main ()
27164{
27165int memset; int bzero;
27166 ;
27167 return 0;
27168}
3e0be4ab 27169
5476a9a4
GM
27170_ACEOF
27171if ac_fn_c_try_compile "$LINENO"; then :
27172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27173/* end confdefs.h. */
27174#include <sys/select.h>
27175int
27176main ()
27177{
dd0d840e 27178
5476a9a4
GM
27179 #undef memset
27180 #define memset nonexistent_memset
27181 extern
27182 #ifdef __cplusplus
27183 "C"
27184 #endif
27185 void *memset (void *, int, unsigned long);
27186 #undef bzero
27187 #define bzero nonexistent_bzero
27188 extern
27189 #ifdef __cplusplus
27190 "C"
27191 #endif
27192 void bzero (void *, unsigned long);
27193 fd_set fds;
27194 FD_ZERO (&fds);
3e0be4ab 27195
5476a9a4
GM
27196 ;
27197 return 0;
27198}
067d23c9 27199
5476a9a4
GM
27200_ACEOF
27201if ac_fn_c_try_link "$LINENO"; then :
dd0d840e 27202
5476a9a4
GM
27203else
27204 gl_cv_header_sys_select_h_selfcontained=no
27205fi
27206rm -f core conftest.err conftest.$ac_objext \
27207 conftest$ac_exeext conftest.$ac_ext
dd0d840e 27208
5476a9a4
GM
27209fi
27210rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27211 fi
dd0d840e 27212
5476a9a4
GM
27213fi
27214{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_select_h_selfcontained" >&5
27215$as_echo "$gl_cv_header_sys_select_h_selfcontained" >&6; }
dd0d840e 27216
dd0d840e
GM
27217
27218
dd0d840e
GM
27219
27220
dd0d840e
GM
27221
27222
27223
dd0d840e 27224
5476a9a4
GM
27225 if test $gl_cv_have_include_next = yes; then
27226 gl_cv_next_sys_select_h='<'sys/select.h'>'
27227 else
27228 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/select.h>" >&5
27229$as_echo_n "checking absolute name of <sys/select.h>... " >&6; }
27230if test "${gl_cv_next_sys_select_h+set}" = set; then :
27231 $as_echo_n "(cached) " >&6
27232else
dd0d840e 27233
5476a9a4 27234 if test $ac_cv_header_sys_select_h = yes; then
dd0d840e 27235
dd0d840e 27236
5476a9a4
GM
27237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27238/* end confdefs.h. */
27239#include <sys/select.h>
dd0d840e 27240
5476a9a4
GM
27241_ACEOF
27242 case "$host_os" in
27243 aix*) gl_absname_cpp="$ac_cpp -C" ;;
27244 *) gl_absname_cpp="$ac_cpp" ;;
27245 esac
dd0d840e 27246
5476a9a4
GM
27247 case "$host_os" in
27248 mingw*)
27249 gl_dirsep_regex='[/\\]'
27250 ;;
27251 *)
27252 gl_dirsep_regex='\/'
27253 ;;
27254 esac
27255 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
dd0d840e 27256
5476a9a4
GM
27257 gl_header_literal_regex=`echo 'sys/select.h' \
27258 | sed -e "$gl_make_literal_regex_sed"`
27259 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27260 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27261 s|^/[^/]|//&|
27262 p
27263 q
27264 }'
27265 gl_cv_next_sys_select_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27266 sed -n "$gl_absolute_header_sed"`'"'
27267 else
27268 gl_cv_next_sys_select_h='<'sys/select.h'>'
27269 fi
067d23c9 27270
067d23c9 27271
5476a9a4
GM
27272fi
27273{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_select_h" >&5
27274$as_echo "$gl_cv_next_sys_select_h" >&6; }
27275 fi
27276 NEXT_SYS_SELECT_H=$gl_cv_next_sys_select_h
27277
27278 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27279 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27280 gl_next_as_first_directive='<'sys/select.h'>'
27281 else
27282 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27283 gl_next_as_first_directive=$gl_cv_next_sys_select_h
27284 fi
27285 NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H=$gl_next_as_first_directive
27286
27287
27288
27289
27290 if test $ac_cv_header_sys_select_h = yes; then
27291 HAVE_SYS_SELECT_H=1
27292 else
27293 HAVE_SYS_SELECT_H=0
27294 fi
067d23c9
KY
27295
27296
7e723570 27297
7e723570 27298
7e723570 27299
5476a9a4
GM
27300 if test $ac_cv_header_sys_socket_h != yes; then
27301 for ac_header in winsock2.h
27302do :
27303 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
27304if test "x$ac_cv_header_winsock2_h" = x""yes; then :
27305 cat >>confdefs.h <<_ACEOF
27306#define HAVE_WINSOCK2_H 1
27307_ACEOF
7e723570 27308
5476a9a4 27309fi
7e723570 27310
5476a9a4 27311done
7e723570 27312
5476a9a4
GM
27313 fi
27314 if test "$ac_cv_header_winsock2_h" = yes; then
27315 HAVE_WINSOCK2_H=1
27316 UNISTD_H_HAVE_WINSOCK2_H=1
27317 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
27318 else
27319 HAVE_WINSOCK2_H=0
27320 fi
7e723570
GM
27321
27322
dd0d840e 27323
dd0d840e 27324
dd0d840e
GM
27325
27326
dd0d840e 27327
dd0d840e 27328
dd0d840e
GM
27329
27330
27331
27332
27333
27334
27335
27336
dd0d840e 27337
dd0d840e 27338
dd0d840e 27339
dd0d840e 27340
5476a9a4
GM
27341 if test $gl_cv_have_include_next = yes; then
27342 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
27343 else
27344 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
27345$as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
27346if test "${gl_cv_next_sys_stat_h+set}" = set; then :
27347 $as_echo_n "(cached) " >&6
27348else
dd0d840e 27349
5476a9a4 27350 if test $ac_cv_header_sys_stat_h = yes; then
dd0d840e 27351
dd0d840e 27352
5476a9a4
GM
27353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27354/* end confdefs.h. */
27355#include <sys/stat.h>
dd0d840e 27356
5476a9a4
GM
27357_ACEOF
27358 case "$host_os" in
27359 aix*) gl_absname_cpp="$ac_cpp -C" ;;
27360 *) gl_absname_cpp="$ac_cpp" ;;
27361 esac
dd0d840e 27362
5476a9a4
GM
27363 case "$host_os" in
27364 mingw*)
27365 gl_dirsep_regex='[/\\]'
27366 ;;
27367 *)
27368 gl_dirsep_regex='\/'
27369 ;;
27370 esac
27371 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
dd0d840e 27372
5476a9a4
GM
27373 gl_header_literal_regex=`echo 'sys/stat.h' \
27374 | sed -e "$gl_make_literal_regex_sed"`
27375 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27376 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27377 s|^/[^/]|//&|
27378 p
27379 q
27380 }'
27381 gl_cv_next_sys_stat_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27382 sed -n "$gl_absolute_header_sed"`'"'
27383 else
27384 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
27385 fi
dd0d840e 27386
dd0d840e 27387
5476a9a4
GM
27388fi
27389{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
27390$as_echo "$gl_cv_next_sys_stat_h" >&6; }
27391 fi
27392 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
dd0d840e 27393
5476a9a4
GM
27394 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27395 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27396 gl_next_as_first_directive='<'sys/stat.h'>'
27397 else
27398 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27399 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
27400 fi
27401 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
dd0d840e 27402
dd0d840e 27403
d3127c14 27404
d3127c14 27405
dd0d840e 27406
dd0d840e 27407
dd0d840e 27408
dd0d840e 27409
dd0d840e 27410
dd0d840e 27411
dd0d840e 27412
5476a9a4 27413 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
dd0d840e 27414
5476a9a4 27415$as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
dd0d840e 27416
5476a9a4 27417 fi
dd0d840e 27418
5476a9a4
GM
27419 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
27420 #include <sys/stat.h>
27421"
27422if test "x$ac_cv_type_nlink_t" = x""yes; then :
dd0d840e 27423
5476a9a4 27424else
dd0d840e 27425
5476a9a4 27426$as_echo "#define nlink_t int" >>confdefs.h
dd0d840e 27427
5476a9a4 27428fi
dd0d840e 27429
dd0d840e 27430
dd0d840e 27431
dd0d840e 27432
dd0d840e 27433
dd0d840e 27434
dd0d840e 27435
c9ca3f76 27436
dd0d840e 27437
dd0d840e 27438
dd0d840e 27439
c9ca3f76 27440
dd0d840e 27441
dd0d840e
GM
27442
27443
7e723570
GM
27444
27445
7e723570 27446
5476a9a4
GM
27447 ac_fn_c_check_decl "$LINENO" "localtime_r" "ac_cv_have_decl_localtime_r" "#include <time.h>
27448"
27449if test "x$ac_cv_have_decl_localtime_r" = x""yes; then :
27450 ac_have_decl=1
27451else
27452 ac_have_decl=0
27453fi
7e723570 27454
5476a9a4
GM
27455cat >>confdefs.h <<_ACEOF
27456#define HAVE_DECL_LOCALTIME_R $ac_have_decl
27457_ACEOF
7e723570 27458
5476a9a4
GM
27459 if test $ac_cv_have_decl_localtime_r = no; then
27460 HAVE_DECL_LOCALTIME_R=0
27461 fi
7e723570 27462
7e723570 27463
5476a9a4
GM
27464 if test $ac_cv_func_localtime_r = yes; then
27465 HAVE_LOCALTIME_R=1
27466 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime_r is compatible with its POSIX signature" >&5
27467$as_echo_n "checking whether localtime_r is compatible with its POSIX signature... " >&6; }
27468if test "${gl_cv_time_r_posix+set}" = set; then :
27469 $as_echo_n "(cached) " >&6
27470else
27471 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27472/* end confdefs.h. */
27473#include <time.h>
7e723570
GM
27474int
27475main ()
27476{
5476a9a4
GM
27477/* We don't need to append 'restrict's to the argument types,
27478 even though the POSIX signature has the 'restrict's,
27479 since C99 says they can't affect type compatibility. */
27480 struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r;
27481 if (ptr) return 0;
27482 /* Check the return type is a pointer.
27483 On HP-UX 10 it is 'int'. */
27484 *localtime_r (0, 0);
7e723570
GM
27485 ;
27486 return 0;
27487}
5476a9a4 27488
7e723570 27489_ACEOF
5476a9a4
GM
27490if ac_fn_c_try_compile "$LINENO"; then :
27491 gl_cv_time_r_posix=yes
7e723570 27492else
5476a9a4 27493 gl_cv_time_r_posix=no
7e723570 27494fi
5476a9a4 27495rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
02bd7257 27496
5476a9a4
GM
27497fi
27498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_r_posix" >&5
27499$as_echo "$gl_cv_time_r_posix" >&6; }
27500 if test $gl_cv_time_r_posix = yes; then
27501 REPLACE_LOCALTIME_R=0
27502 else
27503 REPLACE_LOCALTIME_R=1
27504 fi
27505 else
27506 HAVE_LOCALTIME_R=0
27507 fi
02bd7257 27508
a6342fc8 27509 if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then
02bd7257
GM
27510
27511
02bd7257 27512
02bd7257 27513
02bd7257 27514
02bd7257 27515
7e723570 27516
7e723570 27517
5476a9a4
GM
27518 gl_LIBOBJS="$gl_LIBOBJS time_r.$ac_objext"
27519
27520
27521 :
7e723570 27522
a6342fc8 27523 fi
7e723570 27524
7e723570 27525
7e723570 27526
7e723570 27527
7e723570 27528
5476a9a4 27529 GNULIB_TIME_R=1
7e723570 27530
7e723570 27531
7e723570 27532
7e723570 27533
7e723570 27534
f077f61d
GM
27535
27536
27537
27538
27539
27540 LIB_TIMER_TIME=
27541
27542 gl_saved_libs=$LIBS
27543 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing timer_settime" >&5
27544$as_echo_n "checking for library containing timer_settime... " >&6; }
27545if test "${ac_cv_search_timer_settime+set}" = set; then :
27546 $as_echo_n "(cached) " >&6
27547else
27548 ac_func_search_save_LIBS=$LIBS
27549cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27550/* end confdefs.h. */
27551
27552/* Override any GCC internal prototype to avoid an error.
27553 Use char because int might match the return type of a GCC
27554 builtin and then its argument prototype would still apply. */
27555#ifdef __cplusplus
27556extern "C"
27557#endif
27558char timer_settime ();
27559int
27560main ()
27561{
27562return timer_settime ();
27563 ;
27564 return 0;
27565}
27566_ACEOF
27567for ac_lib in '' rt posix4; do
27568 if test -z "$ac_lib"; then
27569 ac_res="none required"
27570 else
27571 ac_res=-l$ac_lib
27572 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
27573 fi
27574 if ac_fn_c_try_link "$LINENO"; then :
27575 ac_cv_search_timer_settime=$ac_res
27576fi
27577rm -f core conftest.err conftest.$ac_objext \
27578 conftest$ac_exeext
27579 if test "${ac_cv_search_timer_settime+set}" = set; then :
27580 break
27581fi
27582done
27583if test "${ac_cv_search_timer_settime+set}" = set; then :
27584
27585else
27586 ac_cv_search_timer_settime=no
27587fi
27588rm conftest.$ac_ext
27589LIBS=$ac_func_search_save_LIBS
27590fi
27591{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_timer_settime" >&5
27592$as_echo "$ac_cv_search_timer_settime" >&6; }
27593ac_res=$ac_cv_search_timer_settime
27594if test "$ac_res" != no; then :
27595 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
27596 test "$ac_cv_search_timer_settime" = "none required" ||
27597 LIB_TIMER_TIME=$ac_cv_search_timer_settime
27598fi
27599
27600 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27601/* end confdefs.h. */
27602
27603#include <features.h>
27604#ifdef __GNU_LIBRARY__
27605 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || (__GLIBC__ > 2)) \
27606 && !defined __UCLIBC__
27607 Thread emulation available
27608 #endif
27609#endif
27610
27611_ACEOF
27612if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27613 $EGREP "Thread" >/dev/null 2>&1; then :
27614 LIB_TIMER_TIME="$LIB_TIMER_TIME $LIBMULTITHREAD"
27615fi
27616rm -f conftest*
27617
27618 for ac_func in timer_settime
27619do :
27620 ac_fn_c_check_func "$LINENO" "timer_settime" "ac_cv_func_timer_settime"
27621if test "x$ac_cv_func_timer_settime" = x""yes; then :
27622 cat >>confdefs.h <<_ACEOF
27623#define HAVE_TIMER_SETTIME 1
27624_ACEOF
27625
27626fi
27627done
27628
27629 LIBS=$gl_saved_libs
27630
a6342fc8 27631 :
7e723570 27632
02bd7257 27633
02bd7257 27634
02bd7257 27635
02bd7257 27636
02bd7257 27637
02bd7257 27638
02bd7257 27639
dd0d840e
GM
27640
27641
27642
dd0d840e 27643
5476a9a4
GM
27644 if test $gl_cv_have_include_next = yes; then
27645 gl_cv_next_unistd_h='<'unistd.h'>'
27646 else
27647 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
27648$as_echo_n "checking absolute name of <unistd.h>... " >&6; }
27649if test "${gl_cv_next_unistd_h+set}" = set; then :
27650 $as_echo_n "(cached) " >&6
27651else
dd0d840e 27652
5476a9a4 27653 if test $ac_cv_header_unistd_h = yes; then
dd0d840e 27654
dd0d840e 27655
5476a9a4 27656 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d3127c14 27657/* end confdefs.h. */
5476a9a4 27658#include <unistd.h>
d3127c14 27659
5476a9a4
GM
27660_ACEOF
27661 case "$host_os" in
27662 aix*) gl_absname_cpp="$ac_cpp -C" ;;
27663 *) gl_absname_cpp="$ac_cpp" ;;
27664 esac
d3127c14 27665
5476a9a4
GM
27666 case "$host_os" in
27667 mingw*)
27668 gl_dirsep_regex='[/\\]'
27669 ;;
27670 *)
27671 gl_dirsep_regex='\/'
27672 ;;
27673 esac
27674 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
27675
27676 gl_header_literal_regex=`echo 'unistd.h' \
27677 | sed -e "$gl_make_literal_regex_sed"`
27678 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27679 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27680 s|^/[^/]|//&|
27681 p
27682 q
27683 }'
27684 gl_cv_next_unistd_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27685 sed -n "$gl_absolute_header_sed"`'"'
27686 else
27687 gl_cv_next_unistd_h='<'unistd.h'>'
27688 fi
d3127c14 27689
d3127c14 27690
c9ca3f76 27691fi
5476a9a4
GM
27692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
27693$as_echo "$gl_cv_next_unistd_h" >&6; }
27694 fi
27695 NEXT_UNISTD_H=$gl_cv_next_unistd_h
c9ca3f76 27696
5476a9a4
GM
27697 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27698 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27699 gl_next_as_first_directive='<'unistd.h'>'
27700 else
27701 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27702 gl_next_as_first_directive=$gl_cv_next_unistd_h
27703 fi
27704 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
c9ca3f76 27705
c9ca3f76 27706
c9ca3f76 27707
c9ca3f76 27708
5476a9a4
GM
27709 if test $ac_cv_header_unistd_h = yes; then
27710 HAVE_UNISTD_H=1
27711 else
27712 HAVE_UNISTD_H=0
27713 fi
c9ca3f76 27714
d3127c14 27715
dd0d840e 27716
dd0d840e 27717
d3127c14 27718
d3127c14 27719
dd0d840e
GM
27720
27721
c9ca3f76
GM
27722
27723
27724
b5591ebb
GM
27725 if test $ac_cv_have_decl_unsetenv = no; then
27726 HAVE_DECL_UNSETENV=0
27727 fi
27728 for ac_func in unsetenv
27729do :
27730 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
27731if test "x$ac_cv_func_unsetenv" = x""yes; then :
27732 cat >>confdefs.h <<_ACEOF
27733#define HAVE_UNSETENV 1
27734_ACEOF
27735
27736fi
27737done
27738
27739 if test $ac_cv_func_unsetenv = no; then
27740 HAVE_UNSETENV=0
27741 else
27742 HAVE_UNSETENV=1
27743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5
27744$as_echo_n "checking for unsetenv() return type... " >&6; }
27745if test "${gt_cv_func_unsetenv_ret+set}" = set; then :
27746 $as_echo_n "(cached) " >&6
27747else
27748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27749/* end confdefs.h. */
27750
27751#undef _BSD
27752#define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */
27753#include <stdlib.h>
27754extern
27755#ifdef __cplusplus
27756"C"
27757#endif
27758int unsetenv (const char *name);
27759
27760int
27761main ()
27762{
27763
27764 ;
27765 return 0;
27766}
27767_ACEOF
27768if ac_fn_c_try_compile "$LINENO"; then :
27769 gt_cv_func_unsetenv_ret='int'
27770else
27771 gt_cv_func_unsetenv_ret='void'
27772fi
27773rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27774fi
27775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5
27776$as_echo "$gt_cv_func_unsetenv_ret" >&6; }
27777 if test $gt_cv_func_unsetenv_ret = 'void'; then
27778
27779$as_echo "#define VOID_UNSETENV 1" >>confdefs.h
27780
27781 REPLACE_UNSETENV=1
27782 fi
27783
27784 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5
27785$as_echo_n "checking whether unsetenv obeys POSIX... " >&6; }
27786if test "${gl_cv_func_unsetenv_works+set}" = set; then :
27787 $as_echo_n "(cached) " >&6
27788else
27789 if test "$cross_compiling" = yes; then :
27790 case "$host_os" in
27791 # Guess yes on glibc systems.
27792 *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
27793 # If we don't know, assume the worst.
27794 *) gl_cv_func_unsetenv_works="guessing no" ;;
27795 esac
27796
27797else
27798 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27799/* end confdefs.h. */
27800
27801 #include <stdlib.h>
27802 #include <errno.h>
27803 extern char **environ;
27804
27805int
27806main ()
27807{
27808
27809 char entry1[] = "a=1";
27810 char entry2[] = "b=2";
27811 char *env[] = { entry1, entry2, NULL };
27812 if (putenv ((char *) "a=1")) return 1;
27813 if (putenv (entry2)) return 2;
27814 entry2[0] = 'a';
27815 unsetenv ("a");
27816 if (getenv ("a")) return 3;
27817 if (!unsetenv ("") || errno != EINVAL) return 4;
27818 entry2[0] = 'b';
27819 environ = env;
27820 if (!getenv ("a")) return 5;
27821 entry2[0] = 'a';
27822 unsetenv ("a");
27823 if (getenv ("a")) return 6;
27824
27825 ;
27826 return 0;
27827}
27828_ACEOF
27829if ac_fn_c_try_run "$LINENO"; then :
27830 gl_cv_func_unsetenv_works=yes
27831else
27832 gl_cv_func_unsetenv_works=no
27833fi
27834rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27835 conftest.$ac_objext conftest.beam conftest.$ac_ext
27836fi
27837
27838fi
27839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5
27840$as_echo "$gl_cv_func_unsetenv_works" >&6; }
27841 case "$gl_cv_func_unsetenv_works" in
27842 *yes) ;;
27843 *)
27844 REPLACE_UNSETENV=1
27845 ;;
27846 esac
27847 fi
27848
27849 if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
27850
27851
27852
27853
27854
27855
27856
27857
27858 gl_LIBOBJS="$gl_LIBOBJS unsetenv.$ac_objext"
27859
27860
27861
27862
27863
27864 fi
27865
27866
27867
27868
27869
27870 GNULIB_UNSETENV=1
27871
27872
27873
27874
27875
27876
27877
27878
c9ca3f76
GM
27879
27880
c9ca3f76 27881
5476a9a4
GM
27882 if test $ac_cv_func_futimens = no && test $ac_cv_func_futimesat = yes; then
27883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether futimesat handles NULL file" >&5
27884$as_echo_n "checking whether futimesat handles NULL file... " >&6; }
27885if test "${gl_cv_func_futimesat_works+set}" = set; then :
27886 $as_echo_n "(cached) " >&6
27887else
27888 touch conftest.file
27889 if test "$cross_compiling" = yes; then :
27890 case "$host_os" in
27891 # Guess yes on glibc systems.
27892 *-gnu*) gl_cv_func_futimesat_works="guessing yes" ;;
27893 # If we don't know, assume the worst.
27894 *) gl_cv_func_futimesat_works="guessing no" ;;
27895 esac
c9ca3f76 27896
5476a9a4
GM
27897else
27898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c9ca3f76
GM
27899/* end confdefs.h. */
27900
5476a9a4
GM
27901#include <stddef.h>
27902#include <sys/times.h>
27903#include <fcntl.h>
c9ca3f76
GM
27904
27905int
27906main ()
27907{
5476a9a4
GM
27908 int fd = open ("conftest.file", O_RDWR);
27909 if (fd < 0) return 1;
27910 if (futimesat (fd, NULL, NULL)) return 2;
c9ca3f76
GM
27911
27912 ;
27913 return 0;
27914}
27915_ACEOF
5476a9a4
GM
27916if ac_fn_c_try_run "$LINENO"; then :
27917 gl_cv_func_futimesat_works=yes
c9ca3f76 27918else
5476a9a4 27919 gl_cv_func_futimesat_works=no
c9ca3f76 27920fi
5476a9a4
GM
27921rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27922 conftest.$ac_objext conftest.beam conftest.$ac_ext
c9ca3f76
GM
27923fi
27924
5476a9a4
GM
27925 rm -f conftest.file
27926fi
27927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_futimesat_works" >&5
27928$as_echo "$gl_cv_func_futimesat_works" >&6; }
27929 case "$gl_cv_func_futimesat_works" in
27930 *yes) ;;
27931 *)
7e723570 27932
5476a9a4 27933$as_echo "#define FUTIMESAT_NULL_BUG 1" >>confdefs.h
067d23c9 27934
5476a9a4
GM
27935 ;;
27936 esac
27937 fi
dd0d840e 27938
d7ad186c 27939 gl_gnulib_enabled_260941c0e5dc67ec9e87d1fb321c300b=false
5476a9a4 27940 gl_gnulib_enabled_dosname=false
710f5812 27941 gl_gnulib_enabled_euidaccess=false
0cdca42a 27942 gl_gnulib_enabled_getdtablesize=false
710f5812 27943 gl_gnulib_enabled_getgroups=false
5476a9a4 27944 gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=false
710f5812 27945 gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1=false
d7ad186c 27946 gl_gnulib_enabled_03e0aaad4cb89ca757653bd367a6ccb7=false
5476a9a4 27947 gl_gnulib_enabled_pathmax=false
710f5812 27948 gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c=false
e412eb97 27949 gl_gnulib_enabled_secure_getenv=false
5476a9a4
GM
27950 gl_gnulib_enabled_stat=false
27951 gl_gnulib_enabled_strtoll=false
27952 gl_gnulib_enabled_strtoull=false
e412eb97 27953 gl_gnulib_enabled_tempname=false
710f5812 27954 gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec=false
d7ad186c
GM
27955 func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b ()
27956 {
27957 if ! $gl_gnulib_enabled_260941c0e5dc67ec9e87d1fb321c300b; then
27958
27959
27960
27961
27962
27963
27964
27965
27966 gl_LIBOBJS="$gl_LIBOBJS openat-proc.$ac_objext"
27967
27968 gl_gnulib_enabled_260941c0e5dc67ec9e87d1fb321c300b=true
27969 fi
27970 }
5476a9a4
GM
27971 func_gl_gnulib_m4code_dosname ()
27972 {
27973 if ! $gl_gnulib_enabled_dosname; then
27974 gl_gnulib_enabled_dosname=true
27975 fi
27976 }
710f5812 27977 func_gl_gnulib_m4code_euidaccess ()
5476a9a4 27978 {
710f5812 27979 if ! $gl_gnulib_enabled_euidaccess; then
dd0d840e 27980
d3127c14
GM
27981
27982
27983
27984
710f5812
GM
27985 for ac_func in euidaccess
27986do :
27987 ac_fn_c_check_func "$LINENO" "euidaccess" "ac_cv_func_euidaccess"
27988if test "x$ac_cv_func_euidaccess" = x""yes; then :
27989 cat >>confdefs.h <<_ACEOF
27990#define HAVE_EUIDACCESS 1
27991_ACEOF
d3127c14 27992
710f5812
GM
27993fi
27994done
d3127c14 27995
710f5812
GM
27996 if test $ac_cv_func_euidaccess = no; then
27997 HAVE_EUIDACCESS=0
27998 fi
d3127c14 27999
710f5812
GM
28000 if test $HAVE_EUIDACCESS = 0; then
28001
28002
28003
28004
28005
28006
28007
28008
28009 gl_LIBOBJS="$gl_LIBOBJS euidaccess.$ac_objext"
28010
28011
28012
28013 for ac_header in libgen.h
28014do :
28015 ac_fn_c_check_header_mongrel "$LINENO" "libgen.h" "ac_cv_header_libgen_h" "$ac_includes_default"
28016if test "x$ac_cv_header_libgen_h" = x""yes; then :
28017 cat >>confdefs.h <<_ACEOF
28018#define HAVE_LIBGEN_H 1
28019_ACEOF
28020
28021fi
28022
28023done
28024
28025
28026 ac_fn_c_check_func "$LINENO" "getgroups" "ac_cv_func_getgroups"
28027if test "x$ac_cv_func_getgroups" = x""yes; then :
28028
28029fi
28030
28031
28032 # If we don't yet have getgroups, see if it's in -lbsd.
28033 # This is reported to be necessary on an ITOS 3000WS running SEIUX 3.1.
28034 ac_save_LIBS=$LIBS
28035 if test $ac_cv_func_getgroups = no; then
28036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getgroups in -lbsd" >&5
28037$as_echo_n "checking for getgroups in -lbsd... " >&6; }
28038if test "${ac_cv_lib_bsd_getgroups+set}" = set; then :
5476a9a4
GM
28039 $as_echo_n "(cached) " >&6
28040else
710f5812
GM
28041 ac_check_lib_save_LIBS=$LIBS
28042LIBS="-lbsd $LIBS"
28043cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d3127c14 28044/* end confdefs.h. */
d3127c14 28045
710f5812
GM
28046/* Override any GCC internal prototype to avoid an error.
28047 Use char because int might match the return type of a GCC
28048 builtin and then its argument prototype would still apply. */
28049#ifdef __cplusplus
28050extern "C"
28051#endif
28052char getgroups ();
d3127c14
GM
28053int
28054main ()
28055{
710f5812 28056return getgroups ();
d3127c14
GM
28057 ;
28058 return 0;
28059}
28060_ACEOF
710f5812
GM
28061if ac_fn_c_try_link "$LINENO"; then :
28062 ac_cv_lib_bsd_getgroups=yes
d3127c14 28063else
710f5812 28064 ac_cv_lib_bsd_getgroups=no
5476a9a4 28065fi
710f5812
GM
28066rm -f core conftest.err conftest.$ac_objext \
28067 conftest$ac_exeext conftest.$ac_ext
28068LIBS=$ac_check_lib_save_LIBS
d3127c14 28069fi
710f5812
GM
28070{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_getgroups" >&5
28071$as_echo "$ac_cv_lib_bsd_getgroups" >&6; }
28072if test "x$ac_cv_lib_bsd_getgroups" = x""yes; then :
28073 GETGROUPS_LIB=-lbsd
5476a9a4 28074fi
710f5812
GM
28075
28076 fi
28077
28078 # Run the program to test the functionality of the system-supplied
28079 # getgroups function only if there is such a function.
28080 if test $ac_cv_func_getgroups = yes; then
28081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getgroups" >&5
28082$as_echo_n "checking for working getgroups... " >&6; }
28083if test "${ac_cv_func_getgroups_works+set}" = set; then :
5476a9a4
GM
28084 $as_echo_n "(cached) " >&6
28085else
710f5812
GM
28086 if test "$cross_compiling" = yes; then :
28087 case "$host_os" in # ((
5476a9a4 28088 # Guess yes on glibc systems.
710f5812 28089 *-gnu*) ac_cv_func_getgroups_works="guessing yes" ;;
5476a9a4 28090 # If we don't know, assume the worst.
710f5812 28091 *) ac_cv_func_getgroups_works="guessing no" ;;
5476a9a4 28092 esac
d3127c14 28093
5476a9a4
GM
28094else
28095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d3127c14 28096/* end confdefs.h. */
710f5812 28097$ac_includes_default
d3127c14
GM
28098int
28099main ()
28100{
710f5812
GM
28101/* On Ultrix 4.3, getgroups (0, 0) always fails. */
28102 return getgroups (0, 0) == -1;
28103 ;
28104 return 0;
28105}
28106
28107_ACEOF
28108if ac_fn_c_try_run "$LINENO"; then :
28109 ac_cv_func_getgroups_works=yes
28110else
28111 ac_cv_func_getgroups_works=no
28112fi
28113rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28114 conftest.$ac_objext conftest.beam conftest.$ac_ext
28115fi
28116
28117
28118fi
28119{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getgroups_works" >&5
28120$as_echo "$ac_cv_func_getgroups_works" >&6; }
28121 else
28122 ac_cv_func_getgroups_works=no
28123 fi
28124 case "$ac_cv_func_getgroups_works" in
28125 *yes)
28126
28127$as_echo "#define HAVE_GETGROUPS 1" >>confdefs.h
28128
28129 ;;
28130 esac
28131 LIBS=$ac_save_LIBS
28132
28133
28134 # Solaris 9 and 10 need -lgen to get the eaccess function.
28135 # Save and restore LIBS so -lgen isn't added to it. Otherwise, *all*
28136 # programs in the package would end up linked with that potentially-shared
28137 # library, inducing unnecessary run-time overhead.
28138 LIB_EACCESS=
28139
28140 gl_saved_libs=$LIBS
28141 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing eaccess" >&5
28142$as_echo_n "checking for library containing eaccess... " >&6; }
28143if test "${ac_cv_search_eaccess+set}" = set; then :
28144 $as_echo_n "(cached) " >&6
28145else
28146 ac_func_search_save_LIBS=$LIBS
28147cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28148/* end confdefs.h. */
28149
28150/* Override any GCC internal prototype to avoid an error.
28151 Use char because int might match the return type of a GCC
28152 builtin and then its argument prototype would still apply. */
28153#ifdef __cplusplus
28154extern "C"
28155#endif
28156char eaccess ();
28157int
28158main ()
28159{
28160return eaccess ();
28161 ;
28162 return 0;
28163}
28164_ACEOF
28165for ac_lib in '' gen; do
28166 if test -z "$ac_lib"; then
28167 ac_res="none required"
28168 else
28169 ac_res=-l$ac_lib
28170 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
28171 fi
28172 if ac_fn_c_try_link "$LINENO"; then :
28173 ac_cv_search_eaccess=$ac_res
28174fi
28175rm -f core conftest.err conftest.$ac_objext \
28176 conftest$ac_exeext
28177 if test "${ac_cv_search_eaccess+set}" = set; then :
28178 break
28179fi
28180done
28181if test "${ac_cv_search_eaccess+set}" = set; then :
28182
28183else
28184 ac_cv_search_eaccess=no
28185fi
28186rm conftest.$ac_ext
28187LIBS=$ac_func_search_save_LIBS
28188fi
28189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_eaccess" >&5
28190$as_echo "$ac_cv_search_eaccess" >&6; }
28191ac_res=$ac_cv_search_eaccess
28192if test "$ac_res" != no; then :
28193 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
28194 test "$ac_cv_search_eaccess" = "none required" ||
28195 LIB_EACCESS=$ac_cv_search_eaccess
28196fi
28197
28198 for ac_func in eaccess
28199do :
28200 ac_fn_c_check_func "$LINENO" "eaccess" "ac_cv_func_eaccess"
28201if test "x$ac_cv_func_eaccess" = x""yes; then :
28202 cat >>confdefs.h <<_ACEOF
28203#define HAVE_EACCESS 1
28204_ACEOF
28205
28206fi
28207done
28208
28209 LIBS=$gl_saved_libs
28210
28211 fi
28212
28213
28214
28215
28216
28217 GNULIB_EUIDACCESS=1
28218
28219
28220
28221
28222
28223 gl_gnulib_enabled_euidaccess=true
28224 if test $HAVE_EUIDACCESS = 0; then
28225 func_gl_gnulib_m4code_a9786850e999ae65a836a6041e8e5ed1
28226 fi
28227 func_gl_gnulib_m4code_6099e9737f757db36c47fa9d9f02e88c
28228 if test $HAVE_EUIDACCESS = 0; then
28229 func_gl_gnulib_m4code_stat
28230 fi
28231 fi
28232 }
0cdca42a
GM
28233 func_gl_gnulib_m4code_getdtablesize ()
28234 {
28235 if ! $gl_gnulib_enabled_getdtablesize; then
28236
28237
28238
28239 if test $ac_cv_func_getdtablesize != yes; then
28240 HAVE_GETDTABLESIZE=0
28241 fi
28242
28243 if test $HAVE_GETDTABLESIZE = 0; then
28244
28245
28246
28247
28248
28249
28250
28251
28252 gl_LIBOBJS="$gl_LIBOBJS getdtablesize.$ac_objext"
28253
28254 :
28255 fi
28256
28257
28258
28259
28260
28261 GNULIB_GETDTABLESIZE=1
28262
28263
28264
28265
28266
28267 gl_gnulib_enabled_getdtablesize=true
28268 fi
28269 }
710f5812
GM
28270 func_gl_gnulib_m4code_getgroups ()
28271 {
28272 if ! $gl_gnulib_enabled_getgroups; then
28273
28274
28275
28276
28277
28278 ac_fn_c_check_func "$LINENO" "getgroups" "ac_cv_func_getgroups"
28279if test "x$ac_cv_func_getgroups" = x""yes; then :
28280
28281fi
28282
28283
28284 # If we don't yet have getgroups, see if it's in -lbsd.
28285 # This is reported to be necessary on an ITOS 3000WS running SEIUX 3.1.
28286 ac_save_LIBS=$LIBS
28287 if test $ac_cv_func_getgroups = no; then
28288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getgroups in -lbsd" >&5
28289$as_echo_n "checking for getgroups in -lbsd... " >&6; }
28290if test "${ac_cv_lib_bsd_getgroups+set}" = set; then :
28291 $as_echo_n "(cached) " >&6
28292else
28293 ac_check_lib_save_LIBS=$LIBS
28294LIBS="-lbsd $LIBS"
28295cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28296/* end confdefs.h. */
28297
28298/* Override any GCC internal prototype to avoid an error.
28299 Use char because int might match the return type of a GCC
28300 builtin and then its argument prototype would still apply. */
28301#ifdef __cplusplus
28302extern "C"
28303#endif
28304char getgroups ();
28305int
28306main ()
28307{
28308return getgroups ();
28309 ;
28310 return 0;
28311}
28312_ACEOF
28313if ac_fn_c_try_link "$LINENO"; then :
28314 ac_cv_lib_bsd_getgroups=yes
28315else
28316 ac_cv_lib_bsd_getgroups=no
28317fi
28318rm -f core conftest.err conftest.$ac_objext \
28319 conftest$ac_exeext conftest.$ac_ext
28320LIBS=$ac_check_lib_save_LIBS
28321fi
28322{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_getgroups" >&5
28323$as_echo "$ac_cv_lib_bsd_getgroups" >&6; }
28324if test "x$ac_cv_lib_bsd_getgroups" = x""yes; then :
28325 GETGROUPS_LIB=-lbsd
28326fi
28327
28328 fi
28329
28330 # Run the program to test the functionality of the system-supplied
28331 # getgroups function only if there is such a function.
28332 if test $ac_cv_func_getgroups = yes; then
28333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getgroups" >&5
28334$as_echo_n "checking for working getgroups... " >&6; }
28335if test "${ac_cv_func_getgroups_works+set}" = set; then :
28336 $as_echo_n "(cached) " >&6
28337else
28338 if test "$cross_compiling" = yes; then :
28339 case "$host_os" in # ((
28340 # Guess yes on glibc systems.
28341 *-gnu*) ac_cv_func_getgroups_works="guessing yes" ;;
28342 # If we don't know, assume the worst.
28343 *) ac_cv_func_getgroups_works="guessing no" ;;
28344 esac
28345
28346else
28347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28348/* end confdefs.h. */
28349$ac_includes_default
28350int
28351main ()
28352{
28353/* On Ultrix 4.3, getgroups (0, 0) always fails. */
28354 return getgroups (0, 0) == -1;
28355 ;
28356 return 0;
28357}
28358
28359_ACEOF
28360if ac_fn_c_try_run "$LINENO"; then :
28361 ac_cv_func_getgroups_works=yes
28362else
28363 ac_cv_func_getgroups_works=no
28364fi
28365rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28366 conftest.$ac_objext conftest.beam conftest.$ac_ext
28367fi
28368
28369
28370fi
28371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getgroups_works" >&5
28372$as_echo "$ac_cv_func_getgroups_works" >&6; }
28373 else
28374 ac_cv_func_getgroups_works=no
28375 fi
28376 case "$ac_cv_func_getgroups_works" in
28377 *yes)
28378
28379$as_echo "#define HAVE_GETGROUPS 1" >>confdefs.h
28380
28381 ;;
28382 esac
28383 LIBS=$ac_save_LIBS
28384
28385 if test $ac_cv_func_getgroups != yes; then
28386 HAVE_GETGROUPS=0
28387 else
28388 if test "$ac_cv_type_getgroups" != gid_t \
28389 || { case "$ac_cv_func_getgroups_works" in
28390 *yes) false;;
28391 *) true;;
28392 esac
28393 }; then
28394 REPLACE_GETGROUPS=1
28395
28396$as_echo "#define GETGROUPS_ZERO_BUG 1" >>confdefs.h
28397
28398 else
28399 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getgroups handles negative values" >&5
28400$as_echo_n "checking whether getgroups handles negative values... " >&6; }
28401if test "${gl_cv_func_getgroups_works+set}" = set; then :
28402 $as_echo_n "(cached) " >&6
28403else
28404 if test "$cross_compiling" = yes; then :
28405 case "$host_os" in
28406 # Guess yes on glibc systems.
28407 *-gnu*) gl_cv_func_getgroups_works="guessing yes" ;;
28408 # If we don't know, assume the worst.
28409 *) gl_cv_func_getgroups_works="guessing no" ;;
28410 esac
28411
28412else
28413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28414/* end confdefs.h. */
28415$ac_includes_default
28416int
28417main ()
28418{
28419int size = getgroups (0, 0);
28420 gid_t *list = malloc (size * sizeof *list);
28421 return getgroups (-1, list) != -1;
28422 ;
28423 return 0;
28424}
28425_ACEOF
28426if ac_fn_c_try_run "$LINENO"; then :
28427 gl_cv_func_getgroups_works=yes
28428else
28429 gl_cv_func_getgroups_works=no
28430fi
28431rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28432 conftest.$ac_objext conftest.beam conftest.$ac_ext
28433fi
28434
28435fi
28436{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getgroups_works" >&5
28437$as_echo "$gl_cv_func_getgroups_works" >&6; }
28438 case "$gl_cv_func_getgroups_works" in
28439 *yes) ;;
28440 *) REPLACE_GETGROUPS=1 ;;
28441 esac
28442 fi
28443 fi
28444 test -n "$GETGROUPS_LIB" && LIBS="$GETGROUPS_LIB $LIBS"
28445
28446 if test $HAVE_GETGROUPS = 0 || test $REPLACE_GETGROUPS = 1; then
28447
28448
28449
28450
28451
28452
28453
28454
28455 gl_LIBOBJS="$gl_LIBOBJS getgroups.$ac_objext"
28456
28457 fi
28458
28459
28460
28461
28462
28463 GNULIB_GETGROUPS=1
28464
28465
28466
28467
28468
28469 gl_gnulib_enabled_getgroups=true
28470 fi
28471 }
28472 func_gl_gnulib_m4code_be453cec5eecf5731a274f2de7f2db36 ()
28473 {
28474 if ! $gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36; then
28475
28476
28477 gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=true
28478 fi
28479 }
28480 func_gl_gnulib_m4code_a9786850e999ae65a836a6041e8e5ed1 ()
28481 {
28482 if ! $gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1; then
28483
28484
28485
28486
28487
28488 ac_fn_c_check_func "$LINENO" "group_member" "ac_cv_func_group_member"
28489if test "x$ac_cv_func_group_member" = x""yes; then :
28490
28491else
28492
28493 HAVE_GROUP_MEMBER=0
28494
28495fi
28496
28497
28498 if test $HAVE_GROUP_MEMBER = 0; then
28499
28500
28501
28502
28503
28504
28505
28506
28507 gl_LIBOBJS="$gl_LIBOBJS group-member.$ac_objext"
28508
28509
28510
28511
28512 fi
28513
28514
28515
28516
28517
28518 GNULIB_GROUP_MEMBER=1
28519
28520
28521
28522
28523
28524 gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1=true
28525 if test $HAVE_GROUP_MEMBER = 0; then
28526 func_gl_gnulib_m4code_getgroups
28527 fi
28528 if test $HAVE_GROUP_MEMBER = 0; then
28529 func_gl_gnulib_m4code_682e609604ccaac6be382e4ee3a4eaec
28530 fi
28531 fi
28532 }
d7ad186c
GM
28533 func_gl_gnulib_m4code_03e0aaad4cb89ca757653bd367a6ccb7 ()
28534 {
28535 if ! $gl_gnulib_enabled_03e0aaad4cb89ca757653bd367a6ccb7; then
28536 gl_gnulib_enabled_03e0aaad4cb89ca757653bd367a6ccb7=true
28537 fi
28538 }
710f5812
GM
28539 func_gl_gnulib_m4code_pathmax ()
28540 {
28541 if ! $gl_gnulib_enabled_pathmax; then
28542
28543
28544
28545 gl_gnulib_enabled_pathmax=true
28546 fi
28547 }
28548 func_gl_gnulib_m4code_6099e9737f757db36c47fa9d9f02e88c ()
28549 {
28550 if ! $gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c; then
28551 gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c=true
28552 fi
28553 }
e412eb97
GM
28554 func_gl_gnulib_m4code_secure_getenv ()
28555 {
28556 if ! $gl_gnulib_enabled_secure_getenv; then
28557
28558
28559
28560
28561
28562 if test $ac_cv_func_secure_getenv = no; then
28563 HAVE_SECURE_GETENV=0
28564 fi
28565
28566 if test $HAVE_SECURE_GETENV = 0; then
28567
28568
28569
28570
28571
28572
28573
28574
28575 gl_LIBOBJS="$gl_LIBOBJS secure_getenv.$ac_objext"
28576
28577
28578 for ac_func in __secure_getenv
28579do :
28580 ac_fn_c_check_func "$LINENO" "__secure_getenv" "ac_cv_func___secure_getenv"
28581if test "x$ac_cv_func___secure_getenv" = x""yes; then :
28582 cat >>confdefs.h <<_ACEOF
28583#define HAVE___SECURE_GETENV 1
28584_ACEOF
28585
28586fi
28587done
28588
28589 if test $ac_cv_func___secure_getenv = no; then
28590 for ac_func in issetugid
28591do :
28592 ac_fn_c_check_func "$LINENO" "issetugid" "ac_cv_func_issetugid"
28593if test "x$ac_cv_func_issetugid" = x""yes; then :
28594 cat >>confdefs.h <<_ACEOF
28595#define HAVE_ISSETUGID 1
28596_ACEOF
28597
28598fi
28599done
28600
28601 fi
28602
28603 fi
28604
28605
28606
28607
28608
28609 GNULIB_SECURE_GETENV=1
28610
28611
28612
28613
28614
28615 gl_gnulib_enabled_secure_getenv=true
28616 fi
28617 }
710f5812
GM
28618 func_gl_gnulib_m4code_stat ()
28619 {
28620 if ! $gl_gnulib_enabled_stat; then
28621
28622
28623
28624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5
28625$as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; }
28626if test "${gl_cv_func_stat_dir_slash+set}" = set; then :
28627 $as_echo_n "(cached) " >&6
28628else
28629 if test "$cross_compiling" = yes; then :
28630 case $host_os in
28631 mingw*) gl_cv_func_stat_dir_slash="guessing no";;
28632 *) gl_cv_func_stat_dir_slash="guessing yes";;
28633 esac
28634else
28635 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28636/* end confdefs.h. */
28637#include <sys/stat.h>
28638
28639int
28640main ()
28641{
28642struct stat st; return stat (".", &st) != stat ("./", &st);
28643 ;
28644 return 0;
28645}
28646_ACEOF
28647if ac_fn_c_try_run "$LINENO"; then :
28648 gl_cv_func_stat_dir_slash=yes
28649else
28650 gl_cv_func_stat_dir_slash=no
28651fi
28652rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28653 conftest.$ac_objext conftest.beam conftest.$ac_ext
28654fi
28655
28656fi
28657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5
28658$as_echo "$gl_cv_func_stat_dir_slash" >&6; }
28659 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
28660$as_echo_n "checking whether stat handles trailing slashes on files... " >&6; }
28661if test "${gl_cv_func_stat_file_slash+set}" = set; then :
28662 $as_echo_n "(cached) " >&6
28663else
28664 touch conftest.tmp
28665 # Assume that if we have lstat, we can also check symlinks.
28666 if test $ac_cv_func_lstat = yes; then
28667 ln -s conftest.tmp conftest.lnk
28668 fi
28669 if test "$cross_compiling" = yes; then :
28670 case "$host_os" in
28671 # Guess yes on glibc systems.
28672 *-gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
28673 # If we don't know, assume the worst.
28674 *) gl_cv_func_stat_file_slash="guessing no" ;;
28675 esac
28676
28677else
28678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28679/* end confdefs.h. */
28680#include <sys/stat.h>
28681
28682int
28683main ()
28684{
28685int result = 0;
28686 struct stat st;
28687 if (!stat ("conftest.tmp/", &st))
28688 result |= 1;
28689#if HAVE_LSTAT
28690 if (!stat ("conftest.lnk/", &st))
5476a9a4
GM
28691 result |= 2;
28692#endif
28693 return result;
d3127c14
GM
28694
28695 ;
28696 return 0;
28697}
28698_ACEOF
5476a9a4
GM
28699if ac_fn_c_try_run "$LINENO"; then :
28700 gl_cv_func_stat_file_slash=yes
d3127c14 28701else
5476a9a4
GM
28702 gl_cv_func_stat_file_slash=no
28703fi
28704rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28705 conftest.$ac_objext conftest.beam conftest.$ac_ext
d3127c14 28706fi
d3127c14 28707
5476a9a4
GM
28708 rm -f conftest.tmp conftest.lnk
28709fi
28710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
28711$as_echo "$gl_cv_func_stat_file_slash" >&6; }
28712 case $gl_cv_func_stat_dir_slash in
28713 *no) REPLACE_STAT=1
d3127c14 28714
5476a9a4
GM
28715$as_echo "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h
28716;;
28717 esac
28718 case $gl_cv_func_stat_file_slash in
28719 *no) REPLACE_STAT=1
d3127c14 28720
5476a9a4
GM
28721$as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
28722;;
28723 esac
d3127c14 28724
a6342fc8 28725 if test $REPLACE_STAT = 1; then
d3127c14 28726
dd0d840e 28727
dd0d840e 28728
dd0d840e 28729
dd0d840e 28730
dd0d840e 28731
067d23c9
KY
28732
28733
5476a9a4 28734 gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
067d23c9 28735
45d4966b 28736 :
a6342fc8 28737 fi
067d23c9 28738
dd0d840e
GM
28739
28740
dd0d840e 28741
dd0d840e 28742
5476a9a4 28743 GNULIB_STAT=1
dd0d840e 28744
067d23c9
KY
28745
28746
28747
28748
5476a9a4
GM
28749 gl_gnulib_enabled_stat=true
28750 if test $REPLACE_STAT = 1; then
28751 func_gl_gnulib_m4code_dosname
28752 fi
28753 if test $REPLACE_STAT = 1; then
28754 func_gl_gnulib_m4code_pathmax
28755 fi
5476a9a4
GM
28756 fi
28757 }
28758 func_gl_gnulib_m4code_strtoll ()
28759 {
28760 if ! $gl_gnulib_enabled_strtoll; then
067d23c9
KY
28761
28762
28763
5476a9a4
GM
28764 if test "$ac_cv_type_long_long_int" = yes; then
28765 for ac_func in strtoll
28766do :
28767 ac_fn_c_check_func "$LINENO" "strtoll" "ac_cv_func_strtoll"
28768if test "x$ac_cv_func_strtoll" = x""yes; then :
28769 cat >>confdefs.h <<_ACEOF
28770#define HAVE_STRTOLL 1
28771_ACEOF
067d23c9 28772
5476a9a4
GM
28773fi
28774done
067d23c9 28775
5476a9a4
GM
28776 if test $ac_cv_func_strtoll = no; then
28777 HAVE_STRTOLL=0
28778 fi
28779 fi
067d23c9 28780
a6342fc8 28781 if test $HAVE_STRTOLL = 0; then
067d23c9
KY
28782
28783
28784
067d23c9
KY
28785
28786
28787
28788
28789
5476a9a4 28790 gl_LIBOBJS="$gl_LIBOBJS strtoll.$ac_objext"
067d23c9
KY
28791
28792
5476a9a4 28793 :
067d23c9 28794
a6342fc8 28795 fi
067d23c9
KY
28796
28797
28798
067d23c9 28799
067d23c9 28800
5476a9a4 28801 GNULIB_STRTOLL=1
067d23c9 28802
397f7161 28803
067d23c9
KY
28804
28805
067d23c9 28806
5476a9a4
GM
28807 gl_gnulib_enabled_strtoll=true
28808 fi
28809 }
28810 func_gl_gnulib_m4code_strtoull ()
28811 {
28812 if ! $gl_gnulib_enabled_strtoull; then
067d23c9 28813
067d23c9 28814
067d23c9 28815
5476a9a4
GM
28816 if test "$ac_cv_type_unsigned_long_long_int" = yes; then
28817 for ac_func in strtoull
28818do :
28819 ac_fn_c_check_func "$LINENO" "strtoull" "ac_cv_func_strtoull"
28820if test "x$ac_cv_func_strtoull" = x""yes; then :
28821 cat >>confdefs.h <<_ACEOF
28822#define HAVE_STRTOULL 1
28823_ACEOF
067d23c9 28824
f199cab1 28825fi
5476a9a4 28826done
067d23c9 28827
5476a9a4
GM
28828 if test $ac_cv_func_strtoull = no; then
28829 HAVE_STRTOULL=0
28830 fi
28831 fi
067d23c9 28832
a6342fc8 28833 if test $HAVE_STRTOULL = 0; then
067d23c9
KY
28834
28835
067d23c9 28836
067d23c9 28837
067d23c9 28838
067d23c9 28839
067d23c9 28840
067d23c9 28841
5476a9a4 28842 gl_LIBOBJS="$gl_LIBOBJS strtoull.$ac_objext"
067d23c9 28843
067d23c9 28844
5476a9a4 28845 :
067d23c9 28846
a6342fc8 28847 fi
067d23c9
KY
28848
28849
3e0be4ab 28850
3e0be4ab 28851
067d23c9 28852
5476a9a4 28853 GNULIB_STRTOULL=1
067d23c9 28854
a0a61e58 28855
067d23c9 28856
067d23c9
KY
28857
28858
5476a9a4
GM
28859 gl_gnulib_enabled_strtoull=true
28860 fi
28861 }
e412eb97
GM
28862 func_gl_gnulib_m4code_tempname ()
28863 {
28864 if ! $gl_gnulib_enabled_tempname; then
28865
28866
28867 :
28868
28869
28870 gl_gnulib_enabled_tempname=true
28871 func_gl_gnulib_m4code_secure_getenv
28872 fi
28873 }
710f5812
GM
28874 func_gl_gnulib_m4code_682e609604ccaac6be382e4ee3a4eaec ()
28875 {
28876 if ! $gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec; then
28877 gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec=true
28878 fi
28879 }
d7ad186c
GM
28880 if test $HAVE_FACCESSAT = 0; then
28881 func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b
28882 fi
710f5812
GM
28883 if test $HAVE_FACCESSAT = 0; then
28884 func_gl_gnulib_m4code_dosname
28885 fi
28886 if test $HAVE_FACCESSAT = 0; then
28887 func_gl_gnulib_m4code_euidaccess
28888 fi
d7ad186c
GM
28889 if test $HAVE_FACCESSAT = 0; then
28890 func_gl_gnulib_m4code_03e0aaad4cb89ca757653bd367a6ccb7
28891 fi
0cdca42a
GM
28892 if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
28893 func_gl_gnulib_m4code_getdtablesize
28894 fi
d7ad186c
GM
28895 if test $HAVE_FDOPENDIR = 0; then
28896 func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b
28897 fi
28898 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
28899 func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b
28900 fi
28901 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
28902 func_gl_gnulib_m4code_dosname
28903 fi
28904 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
28905 func_gl_gnulib_m4code_03e0aaad4cb89ca757653bd367a6ccb7
28906 fi
5476a9a4
GM
28907 if test $REPLACE_GETOPT = 1; then
28908 func_gl_gnulib_m4code_be453cec5eecf5731a274f2de7f2db36
28909 fi
28910 if test $REPLACE_LSTAT = 1; then
28911 func_gl_gnulib_m4code_dosname
28912 fi
28913 if test $REPLACE_LSTAT = 1; then
28914 func_gl_gnulib_m4code_stat
28915 fi
e412eb97
GM
28916 if test $HAVE_MKOSTEMP = 0; then
28917 func_gl_gnulib_m4code_tempname
28918 fi
5476a9a4
GM
28919 if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
28920 func_gl_gnulib_m4code_stat
28921 fi
d7ad186c
GM
28922 if test $HAVE_READLINKAT = 0; then
28923 func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b
28924 fi
28925 if test $HAVE_READLINKAT = 0; then
28926 func_gl_gnulib_m4code_dosname
28927 fi
28928 if test $HAVE_READLINKAT = 0; then
28929 func_gl_gnulib_m4code_03e0aaad4cb89ca757653bd367a6ccb7
28930 fi
5476a9a4
GM
28931 if { test $HAVE_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; } && test $ac_cv_type_long_long_int = yes; then
28932 func_gl_gnulib_m4code_strtoll
28933 fi
5476a9a4
GM
28934 if test $ac_cv_func_strtoumax = no && test $ac_cv_type_unsigned_long_long_int = yes; then
28935 func_gl_gnulib_m4code_strtoull
28936 fi
067d23c9 28937
d7ad186c
GM
28938 if $gl_gnulib_enabled_260941c0e5dc67ec9e87d1fb321c300b; then
28939 gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_TRUE=
28940 gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_FALSE='#'
28941else
28942 gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_TRUE='#'
28943 gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_FALSE=
28944fi
28945
5476a9a4
GM
28946 if $gl_gnulib_enabled_dosname; then
28947 gl_GNULIB_ENABLED_dosname_TRUE=
28948 gl_GNULIB_ENABLED_dosname_FALSE='#'
28949else
28950 gl_GNULIB_ENABLED_dosname_TRUE='#'
28951 gl_GNULIB_ENABLED_dosname_FALSE=
28952fi
067d23c9 28953
710f5812
GM
28954 if $gl_gnulib_enabled_euidaccess; then
28955 gl_GNULIB_ENABLED_euidaccess_TRUE=
28956 gl_GNULIB_ENABLED_euidaccess_FALSE='#'
28957else
28958 gl_GNULIB_ENABLED_euidaccess_TRUE='#'
28959 gl_GNULIB_ENABLED_euidaccess_FALSE=
28960fi
28961
0cdca42a
GM
28962 if $gl_gnulib_enabled_getdtablesize; then
28963 gl_GNULIB_ENABLED_getdtablesize_TRUE=
28964 gl_GNULIB_ENABLED_getdtablesize_FALSE='#'
28965else
28966 gl_GNULIB_ENABLED_getdtablesize_TRUE='#'
28967 gl_GNULIB_ENABLED_getdtablesize_FALSE=
28968fi
28969
710f5812
GM
28970 if $gl_gnulib_enabled_getgroups; then
28971 gl_GNULIB_ENABLED_getgroups_TRUE=
28972 gl_GNULIB_ENABLED_getgroups_FALSE='#'
28973else
28974 gl_GNULIB_ENABLED_getgroups_TRUE='#'
28975 gl_GNULIB_ENABLED_getgroups_FALSE=
28976fi
28977
5476a9a4
GM
28978 if $gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36; then
28979 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE=
28980 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE='#'
28981else
28982 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE='#'
28983 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE=
28984fi
067d23c9 28985
710f5812
GM
28986 if $gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1; then
28987 gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_TRUE=
28988 gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_FALSE='#'
28989else
28990 gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_TRUE='#'
28991 gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_FALSE=
28992fi
28993
d7ad186c
GM
28994 if $gl_gnulib_enabled_03e0aaad4cb89ca757653bd367a6ccb7; then
28995 gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_TRUE=
28996 gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_FALSE='#'
28997else
28998 gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_TRUE='#'
28999 gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_FALSE=
29000fi
29001
5476a9a4
GM
29002 if $gl_gnulib_enabled_pathmax; then
29003 gl_GNULIB_ENABLED_pathmax_TRUE=
29004 gl_GNULIB_ENABLED_pathmax_FALSE='#'
29005else
29006 gl_GNULIB_ENABLED_pathmax_TRUE='#'
29007 gl_GNULIB_ENABLED_pathmax_FALSE=
29008fi
067d23c9 29009
710f5812
GM
29010 if $gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c; then
29011 gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_TRUE=
29012 gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_FALSE='#'
29013else
29014 gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_TRUE='#'
29015 gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_FALSE=
29016fi
29017
e412eb97
GM
29018 if $gl_gnulib_enabled_secure_getenv; then
29019 gl_GNULIB_ENABLED_secure_getenv_TRUE=
29020 gl_GNULIB_ENABLED_secure_getenv_FALSE='#'
29021else
29022 gl_GNULIB_ENABLED_secure_getenv_TRUE='#'
29023 gl_GNULIB_ENABLED_secure_getenv_FALSE=
29024fi
29025
5476a9a4
GM
29026 if $gl_gnulib_enabled_stat; then
29027 gl_GNULIB_ENABLED_stat_TRUE=
29028 gl_GNULIB_ENABLED_stat_FALSE='#'
29029else
29030 gl_GNULIB_ENABLED_stat_TRUE='#'
29031 gl_GNULIB_ENABLED_stat_FALSE=
29032fi
067d23c9 29033
5476a9a4
GM
29034 if $gl_gnulib_enabled_strtoll; then
29035 gl_GNULIB_ENABLED_strtoll_TRUE=
29036 gl_GNULIB_ENABLED_strtoll_FALSE='#'
29037else
29038 gl_GNULIB_ENABLED_strtoll_TRUE='#'
29039 gl_GNULIB_ENABLED_strtoll_FALSE=
29040fi
067d23c9 29041
5476a9a4
GM
29042 if $gl_gnulib_enabled_strtoull; then
29043 gl_GNULIB_ENABLED_strtoull_TRUE=
29044 gl_GNULIB_ENABLED_strtoull_FALSE='#'
29045else
29046 gl_GNULIB_ENABLED_strtoull_TRUE='#'
29047 gl_GNULIB_ENABLED_strtoull_FALSE=
f199cab1 29048fi
067d23c9 29049
e412eb97
GM
29050 if $gl_gnulib_enabled_tempname; then
29051 gl_GNULIB_ENABLED_tempname_TRUE=
29052 gl_GNULIB_ENABLED_tempname_FALSE='#'
29053else
29054 gl_GNULIB_ENABLED_tempname_TRUE='#'
29055 gl_GNULIB_ENABLED_tempname_FALSE=
29056fi
29057
710f5812
GM
29058 if $gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec; then
29059 gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_TRUE=
29060 gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_FALSE='#'
29061else
29062 gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_TRUE='#'
29063 gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_FALSE=
29064fi
29065
5476a9a4 29066 # End of code from modules
067d23c9 29067
067d23c9 29068
067d23c9 29069
067d23c9 29070
f199cab1 29071
f199cab1
GM
29072
29073
067d23c9 29074
5476a9a4
GM
29075
29076 gltests_libdeps=
29077 gltests_ltlibdeps=
067d23c9 29078
067d23c9 29079
067d23c9
KY
29080
29081
067d23c9
KY
29082
29083
3e0be4ab 29084
3e0be4ab 29085
3e0be4ab 29086
5476a9a4
GM
29087 gl_source_base='tests'
29088 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 29089
5476a9a4 29090 gl_module_indicator_condition=$gltests_WITNESS
3e0be4ab
GM
29091
29092
29093
29094
29095
067d23c9
KY
29096
29097
29098
3e0be4ab 29099
3e0be4ab 29100
5476a9a4
GM
29101 LIBGNU_LIBDEPS="$gl_libdeps"
29102
29103 LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
29104
067d23c9 29105
5476a9a4
GM
29106CFLAGS=$SAVE_CFLAGS
29107LIBS=$SAVE_LIBS
067d23c9 29108
7c61eaab
GM
29109if test "${opsys}" = "mingw32"; then
29110 CPPFLAGS="$CPPFLAGS -DUSE_CRT_DLL=1 -I $srcdir/nt/inc"
29111 # Remove unneeded switches from the value of CC that goes to Makefiles
29112 CC=`echo $CC | sed -e "s,$GCC_TEST_OPTIONS,,"`
29113fi
29114
067d23c9
KY
29115case "$opsys" in
29116 aix4-2) LD_SWITCH_SYSTEM_TEMACS="-Wl,-bnodelcsect" ;;
29117
29118 darwin)
29119 ## The -headerpad option tells ld (see man page) to leave room at the
29120 ## end of the header for adding load commands. Needed for dumping.
29121 ## 0x690 is the total size of 30 segment load commands (at 56
29122 ## each); under Cocoa 31 commands are required.
29123 if test "$HAVE_NS" = "yes"; then
29124 libs_nsgui="-framework AppKit"
cc70ee9b
GM
29125 if test "$NS_IMPL_COCOA" = "yes"; then
29126 libs_nsgui="$libs_nsgui -framework IOKit"
29127 fi
067d23c9
KY
29128 headerpad_extra=6C8
29129 else
29130 libs_nsgui=
29131 headerpad_extra=690
29132 fi
85cf5029 29133 LD_SWITCH_SYSTEM_TEMACS="-fno-pie -prebind $libs_nsgui -Xlinker -headerpad -Xlinker $headerpad_extra"
067d23c9
KY
29134
29135 ## This is here because src/Makefile.in did some extra fiddling around
2407788f
GM
29136 ## with LD_SWITCH_SYSTEM. It seems cleaner to put this in
29137 ## LD_SWITCH_SYSTEM_TEMACS instead,
067d23c9
KY
29138 test "x$LD_SWITCH_SYSTEM" = "x" && test "x$GCC" != "xyes" && \
29139 LD_SWITCH_SYSTEM_TEMACS="-X $LD_SWITCH_SYSTEM_TEMACS"
29140 ;;
29141
ae629dae
GM
29142 ## LD_SWITCH_X_SITE_RPATH is a -rpath option saying where to
29143 ## find X at run-time.
29144 ## When handled by cpp, this was in LD_SWITCH_SYSTEM. However, at the
29145 ## point where configure sourced the s/*.h file, LD_SWITCH_X_SITE_RPATH
067d23c9
KY
29146 ## had not yet been defined and was expanded to null. Hence LD_SWITCH_SYSTEM
29147 ## had different values in configure (in ac_link) and src/Makefile.in.
29148 ## It seems clearer therefore to put this piece in LD_SWITCH_SYSTEM_TEMACS.
ae629dae 29149 gnu*) LD_SWITCH_SYSTEM_TEMACS="\$(LD_SWITCH_X_SITE_RPATH)" ;;
067d23c9 29150
7c61eaab
GM
29151 mingw32)
29152 ## MinGW64 does not prepend an underscore to symbols, so we must
29153 ## pass a different -entry switch to linker. FIXME: It is better
29154 ## to make the entry points the same by changing unexw32.c.
29155 case "$canonical" in
29156 x86_64-*-*) LD_SWITCH_SYSTEM_TEMACS="-Wl,-stack,0x00800000 -Wl,-heap,0x00100000 -Wl,-image-base,0x01000000 -Wl,-entry,_start -Wl,-Map,./temacs.map" ;;
29157 *) LD_SWITCH_SYSTEM_TEMACS="-Wl,-stack,0x00800000 -Wl,-heap,0x00100000 -Wl,-image-base,0x01000000 -Wl,-entry,__start -Wl,-Map,./temacs.map" ;;
29158 esac
29159 ;;
29160
3766b742
GM
29161 openbsd) LD_SWITCH_SYSTEM_TEMACS='-nopie' ;;
29162
067d23c9
KY
29163 *) LD_SWITCH_SYSTEM_TEMACS= ;;
29164esac
29165
26256684
GM
29166if test x$ac_enable_profiling != x ; then
29167 case $opsys in
29168 *freebsd | gnu-linux) ;;
29169 *) LD_SWITCH_SYSTEM_TEMACS="$LD_SWITCH_SYSTEM_TEMACS -pg" ;;
29170 esac
29171fi
29172
992ec28a
GM
29173LD_SWITCH_SYSTEM_TEMACS="$LDFLAGS_NOCOMBRELOC $LD_SWITCH_SYSTEM_TEMACS"
29174
067d23c9
KY
29175
29176
7c61eaab
GM
29177## MinGW-specific post-link processing of temacs.
29178TEMACS_POST_LINK=":"
29179ADDSECTION=
29180EMACS_HEAPSIZE=
29181if test "${opsys}" = "mingw32"; then
29182 TEMACS_POST_LINK="\$(MINGW_TEMACS_POST_LINK)"
29183 ADDSECTION="../nt/addsection\$(EXEEXT)"
29184 ## Preload heap size of temacs.exe in MB.
29185 case "$canonical" in
29186 x86_64-*-*) EMACS_HEAPSIZE=42 ;;
29187 *) EMACS_HEAPSIZE=27 ;;
29188 esac
29189fi
29190
29191
29192
29193
29194
42dcba54
GM
29195## Common for all window systems
29196if test "$window_system" != "none"; then
067d23c9
KY
29197
29198$as_echo "#define HAVE_WINDOW_SYSTEM 1" >>confdefs.h
29199
42dcba54 29200 WINDOW_SYSTEM_OBJ="fontset.o fringe.o image.o"
067d23c9
KY
29201fi
29202
29203
29204
29205
42dcba54 29206
067d23c9
KY
29207#### Report on what we decided to do.
29208#### Report GTK as a toolkit, even if it doesn't use Xt.
29209#### It makes printing result more understandable as using GTK sets
29210#### toolkit_scroll_bars to yes by default.
29211if test "${HAVE_GTK}" = "yes"; then
a732eace 29212 USE_X_TOOLKIT="$USE_GTK_TOOLKIT"
067d23c9
KY
29213fi
29214
28237e48
GM
29215if test $USE_ACL -ne 0; then
29216 acl_summary="yes $LIB_ACL"
29217else
29218 acl_summary=no
29219fi
29220
067d23c9
KY
29221echo "
29222Configured for \`${canonical}'.
29223
29224 Where should the build process find the source code? ${srcdir}
067d23c9
KY
29225 What compiler should emacs be built with? ${CC} ${CFLAGS}
29226 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
29227 Should Emacs use a relocating allocator for buffers? ${REL_ALLOC}
29228 Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers
29229 What window system should Emacs use? ${window_system}
29230 What toolkit should Emacs use? ${USE_X_TOOLKIT}"
29231
29232if test -n "${x_includes}"; then
29233echo " Where do we find X Windows header files? ${x_includes}"
29234else
29235echo " Where do we find X Windows header files? Standard dirs"
29236fi
29237if test -n "${x_libraries}"; then
29238echo " Where do we find X Windows libraries? ${x_libraries}"
29239else
29240echo " Where do we find X Windows libraries? Standard dirs"
29241fi
29242
29243echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}"
29244echo " Does Emacs use -lXpm? ${HAVE_XPM}"
29245echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
29246echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
29247echo " Does Emacs use a gif library? ${HAVE_GIF} $LIBGIF"
29248echo " Does Emacs use -lpng? ${HAVE_PNG}"
29249echo " Does Emacs use -lrsvg-2? ${HAVE_RSVG}"
29250echo " Does Emacs use imagemagick? ${HAVE_IMAGEMAGICK}"
29251
9dabd86d
GM
29252echo " Does Emacs support sound? ${HAVE_SOUND}"
29253
067d23c9
KY
29254echo " Does Emacs use -lgpm? ${HAVE_GPM}"
29255echo " Does Emacs use -ldbus? ${HAVE_DBUS}"
29256echo " Does Emacs use -lgconf? ${HAVE_GCONF}"
f527bd02 29257echo " Does Emacs use GSettings? ${HAVE_GSETTINGS}"
0f55a32e 29258echo " Does Emacs use a file notification library? ${NOTIFY_SUMMARY}"
28237e48 29259echo " Does Emacs use access control lists? ${acl_summary}"
067d23c9 29260echo " Does Emacs use -lselinux? ${HAVE_LIBSELINUX}"
27f5a136 29261echo " Does Emacs use -lgnutls? ${HAVE_GNUTLS}"
067d23c9
KY
29262echo " Does Emacs use -lxml2? ${HAVE_LIBXML2}"
29263
29264echo " Does Emacs use -lfreetype? ${HAVE_FREETYPE}"
29265echo " Does Emacs use -lm17n-flt? ${HAVE_M17N_FLT}"
29266echo " Does Emacs use -lotf? ${HAVE_LIBOTF}"
29267echo " Does Emacs use -lxft? ${HAVE_XFT}"
7a67e06b 29268echo " Does Emacs directly use zlib? ${HAVE_ZLIB}"
067d23c9
KY
29269
29270echo " Does Emacs use toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
29271echo
29272
eb39a72d
GM
29273if test -n "${EMACSDATA}"; then
29274 echo " Environment variable EMACSDATA set to: $EMACSDATA"
29275fi
29276if test -n "${EMACSDOC}"; then
29277 echo " Environment variable EMACSDOC set to: $EMACSDOC"
29278fi
29279
067d23c9
KY
29280echo
29281
29282if test "$HAVE_NS" = "yes"; then
29283 echo
3d0788a9 29284 echo "You must run \"${MAKE-make} install\" in order to test the built application.
067d23c9
KY
29285The installed application will go to nextstep/Emacs.app and can be
29286run or moved from there."
29287 if test "$EN_NS_SELF_CONTAINED" = "yes"; then
29288 echo "The application will be fully self-contained."
29289 else
29290 echo "The lisp resources for the application will be installed under ${prefix}.
3d0788a9 29291You may need to run \"${MAKE-make} install\" with sudo. The application will fail
067d23c9
KY
29292to run if these resources are not installed."
29293 fi
29294 echo
29295fi
29296
031fabfc
GM
29297if test "${opsys}" = "cygwin"; then
29298 case `uname -r` in
29299 1.5.*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: building Emacs on Cygwin 1.5 is not supported." >&5
29300$as_echo "$as_me: WARNING: building Emacs on Cygwin 1.5 is not supported." >&2;}
29301 echo
29302 ;;
29303 esac
29304fi
067d23c9
KY
29305
29306# Remove any trailing slashes in these variables.
29307test "${prefix}" != NONE &&
29308 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
29309test "${exec_prefix}" != NONE &&
29310 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
29311
bb7dce39
GM
29312if test "$HAVE_NS" = "yes"; then
29313 if test "$NS_IMPL_GNUSTEP" = yes; then
29314 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"
29315
2f342695 29316 ns_check_file=Resources/Info-gnustep.plist
bb7dce39
GM
29317 else
29318 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"
29319
2f342695 29320 ns_check_file=Contents/Info.plist
bb7dce39 29321 fi
2f342695 29322
bb7dce39
GM
29323fi
29324
7c61eaab 29325SUBDIR_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 29326
7c61eaab 29327ac_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 29328
a877df06 29329
73b78882 29330opt_makefile=test/automated/Makefile
a877df06 29331
b5591ebb 29332if test -f "$srcdir/$opt_makefile.in"; then
73b78882 29333 SUBDIR_MAKEFILES="$SUBDIR_MAKEFILES $opt_makefile"
56ade35c 29334 ac_config_files="$ac_config_files test/automated/Makefile"
a877df06 29335
56ade35c 29336fi
73b78882 29337
40b65096
GM
29338
29339opt_makefile=admin/unidata/Makefile
29340
b5591ebb 29341if test -f "$srcdir/$opt_makefile.in"; then
40b65096
GM
29342 SUBDIR_MAKEFILES="$SUBDIR_MAKEFILES $opt_makefile"
29343 ac_config_files="$ac_config_files admin/unidata/Makefile"
29344
29345fi
29346
29347
56ade35c 29348SUBDIR_MAKEFILES_IN=`echo " ${SUBDIR_MAKEFILES}" | sed -e 's| | $(srcdir)/|g' -e 's|Makefile|Makefile.in|g'`
73b78882 29349
067d23c9 29350
9411886d 29351
4c15c0f2 29352ac_config_commands="$ac_config_commands src/epaths.h"
9411886d
PE
29353
29354
4c15c0f2 29355ac_config_commands="$ac_config_commands src/.gdbinit"
9411886d 29356
067d23c9
KY
29357
29358cat >confcache <<\_ACEOF
29359# This file is a shell script that caches the results of configure
29360# tests run on this system so they can be shared between configure
29361# scripts and configure runs, see configure's option --config-cache.
29362# It is not useful on other systems. If it contains results you don't
29363# want to keep, you may remove or edit it.
29364#
29365# config.status only pays attention to the cache file if you give it
29366# the --recheck option to rerun configure.
29367#
29368# `ac_cv_env_foo' variables (set or unset) will be overridden when
29369# loading this file, other *unset* `ac_cv_foo' will be assigned the
29370# following values.
29371
29372_ACEOF
29373
29374# The following way of writing the cache mishandles newlines in values,
29375# but we know of no workaround that is simple, portable, and efficient.
29376# So, we kill variables containing newlines.
29377# Ultrix sh set writes to stderr and can't be redirected directly,
29378# and sets the high bit in the cache file unless we assign to the vars.
29379(
29380 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
29381 eval ac_val=\$$ac_var
29382 case $ac_val in #(
29383 *${as_nl}*)
29384 case $ac_var in #(
29385 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
29386$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
29387 esac
29388 case $ac_var in #(
29389 _ | IFS | as_nl) ;; #(
29390 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
29391 *) { eval $ac_var=; unset $ac_var;} ;;
29392 esac ;;
29393 esac
29394 done
29395
29396 (set) 2>&1 |
29397 case $as_nl`(ac_space=' '; set) 2>&1` in #(
29398 *${as_nl}ac_space=\ *)
29399 # `set' does not quote correctly, so add quotes: double-quote
29400 # substitution turns \\\\ into \\, and sed turns \\ into \.
29401 sed -n \
29402 "s/'/'\\\\''/g;
29403 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
29404 ;; #(
29405 *)
29406 # `set' quotes correctly as required by POSIX, so do not add quotes.
29407 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
29408 ;;
29409 esac |
29410 sort
29411) |
29412 sed '
29413 /^ac_cv_env_/b end
29414 t clear
29415 :clear
29416 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
29417 t end
29418 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
29419 :end' >>confcache
29420if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
29421 if test -w "$cache_file"; then
a9bec17c 29422 test "x$cache_file" != "x/dev/null" &&
067d23c9
KY
29423 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
29424$as_echo "$as_me: updating cache $cache_file" >&6;}
a9bec17c 29425 cat confcache >$cache_file
067d23c9
KY
29426 else
29427 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
29428$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
29429 fi
29430fi
29431rm -f confcache
29432
29433test "x$prefix" = xNONE && prefix=$ac_default_prefix
29434# Let make expand exec_prefix.
29435test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
29436
29437DEFS=-DHAVE_CONFIG_H
29438
29439ac_libobjs=
29440ac_ltlibobjs=
29441for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
29442 # 1. Remove the extension, and $U if already installed.
29443 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
29444 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
29445 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
29446 # will be set to the directory where LIBOBJS objects are built.
29447 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
29448 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
29449done
29450LIBOBJS=$ac_libobjs
29451
29452LTLIBOBJS=$ac_ltlibobjs
29453
29454
743c80a7
PE
29455 if test -n "$EXEEXT"; then
29456 am__EXEEXT_TRUE=
29457 am__EXEEXT_FALSE='#'
29458else
29459 am__EXEEXT_TRUE='#'
29460 am__EXEEXT_FALSE=
29461fi
29462
29463if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
a9bec17c 29464 as_fn_error "conditional \"AMDEP\" was never defined.
743c80a7
PE
29465Usually this means the macro was only invoked conditionally." "$LINENO" 5
29466fi
29467if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
a9bec17c 29468 as_fn_error "conditional \"am__fastdepCC\" was never defined.
743c80a7
PE
29469Usually this means the macro was only invoked conditionally." "$LINENO" 5
29470fi
7c61eaab
GM
29471if test -z "${BUILDING_FOR_WINDOWSNT_TRUE}" && test -z "${BUILDING_FOR_WINDOWSNT_FALSE}"; then
29472 as_fn_error "conditional \"BUILDING_FOR_WINDOWSNT\" was never defined.
29473Usually this means the macro was only invoked conditionally." "$LINENO" 5
29474fi
743c80a7 29475if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
a9bec17c 29476 as_fn_error "conditional \"GL_COND_LIBTOOL\" was never defined.
743c80a7
PE
29477Usually this means the macro was only invoked conditionally." "$LINENO" 5
29478fi
4fc2b746 29479if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
a9bec17c 29480 as_fn_error "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
4fc2b746
GM
29481Usually this means the macro was only invoked conditionally." "$LINENO" 5
29482fi
743c80a7 29483
3a019ab4
GM
29484if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then
29485 as_fn_error "conditional \"GL_GENERATE_ERRNO_H\" was never defined.
29486Usually this means the macro was only invoked conditionally." "$LINENO" 5
29487fi
8966cbff
GM
29488if test -z "${GL_GENERATE_EXECINFO_H_TRUE}" && test -z "${GL_GENERATE_EXECINFO_H_FALSE}"; then
29489 as_fn_error "conditional \"GL_GENERATE_EXECINFO_H\" was never defined.
29490Usually this means the macro was only invoked conditionally." "$LINENO" 5
29491fi
4fda9c95 29492if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
a9bec17c 29493 as_fn_error "conditional \"GL_GENERATE_STDINT_H\" was never defined.
4fda9c95
GM
29494Usually this means the macro was only invoked conditionally." "$LINENO" 5
29495fi
0eb775a3
GM
29496if test -z "${GL_GENERATE_STDALIGN_H_TRUE}" && test -z "${GL_GENERATE_STDALIGN_H_FALSE}"; then
29497 as_fn_error "conditional \"GL_GENERATE_STDALIGN_H\" was never defined.
29498Usually this means the macro was only invoked conditionally." "$LINENO" 5
29499fi
6d153f56 29500if test -z "${GL_GENERATE_STDARG_H_TRUE}" && test -z "${GL_GENERATE_STDARG_H_FALSE}"; then
a9bec17c 29501 as_fn_error "conditional \"GL_GENERATE_STDARG_H\" was never defined.
6d153f56
GM
29502Usually this means the macro was only invoked conditionally." "$LINENO" 5
29503fi
6c051bab 29504if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
a9bec17c 29505 as_fn_error "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
6c051bab
GM
29506Usually this means the macro was only invoked conditionally." "$LINENO" 5
29507fi
29508if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
a9bec17c 29509 as_fn_error "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
6c051bab
GM
29510Usually this means the macro was only invoked conditionally." "$LINENO" 5
29511fi
d7ad186c
GM
29512if test -z "${gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_TRUE}" && test -z "${gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_FALSE}"; then
29513 as_fn_error "conditional \"gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b\" was never defined.
29514Usually this means the macro was only invoked conditionally." "$LINENO" 5
29515fi
6d153f56 29516if test -z "${gl_GNULIB_ENABLED_dosname_TRUE}" && test -z "${gl_GNULIB_ENABLED_dosname_FALSE}"; then
a9bec17c 29517 as_fn_error "conditional \"gl_GNULIB_ENABLED_dosname\" was never defined.
6d153f56
GM
29518Usually this means the macro was only invoked conditionally." "$LINENO" 5
29519fi
710f5812
GM
29520if test -z "${gl_GNULIB_ENABLED_euidaccess_TRUE}" && test -z "${gl_GNULIB_ENABLED_euidaccess_FALSE}"; then
29521 as_fn_error "conditional \"gl_GNULIB_ENABLED_euidaccess\" was never defined.
29522Usually this means the macro was only invoked conditionally." "$LINENO" 5
29523fi
0cdca42a
GM
29524if test -z "${gl_GNULIB_ENABLED_getdtablesize_TRUE}" && test -z "${gl_GNULIB_ENABLED_getdtablesize_FALSE}"; then
29525 as_fn_error "conditional \"gl_GNULIB_ENABLED_getdtablesize\" was never defined.
29526Usually this means the macro was only invoked conditionally." "$LINENO" 5
29527fi
710f5812
GM
29528if test -z "${gl_GNULIB_ENABLED_getgroups_TRUE}" && test -z "${gl_GNULIB_ENABLED_getgroups_FALSE}"; then
29529 as_fn_error "conditional \"gl_GNULIB_ENABLED_getgroups\" was never defined.
29530Usually this means the macro was only invoked conditionally." "$LINENO" 5
29531fi
6d153f56 29532if test -z "${gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE}" && test -z "${gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE}"; then
a9bec17c 29533 as_fn_error "conditional \"gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36\" was never defined.
6d153f56
GM
29534Usually this means the macro was only invoked conditionally." "$LINENO" 5
29535fi
710f5812
GM
29536if test -z "${gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_TRUE}" && test -z "${gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_FALSE}"; then
29537 as_fn_error "conditional \"gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1\" was never defined.
29538Usually this means the macro was only invoked conditionally." "$LINENO" 5
29539fi
d7ad186c
GM
29540if test -z "${gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_TRUE}" && test -z "${gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7_FALSE}"; then
29541 as_fn_error "conditional \"gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7\" was never defined.
29542Usually this means the macro was only invoked conditionally." "$LINENO" 5
29543fi
a0a61e58
GM
29544if test -z "${gl_GNULIB_ENABLED_pathmax_TRUE}" && test -z "${gl_GNULIB_ENABLED_pathmax_FALSE}"; then
29545 as_fn_error "conditional \"gl_GNULIB_ENABLED_pathmax\" was never defined.
29546Usually this means the macro was only invoked conditionally." "$LINENO" 5
29547fi
710f5812
GM
29548if test -z "${gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_TRUE}" && test -z "${gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_FALSE}"; then
29549 as_fn_error "conditional \"gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c\" was never defined.
29550Usually this means the macro was only invoked conditionally." "$LINENO" 5
29551fi
e412eb97
GM
29552if test -z "${gl_GNULIB_ENABLED_secure_getenv_TRUE}" && test -z "${gl_GNULIB_ENABLED_secure_getenv_FALSE}"; then
29553 as_fn_error "conditional \"gl_GNULIB_ENABLED_secure_getenv\" was never defined.
29554Usually this means the macro was only invoked conditionally." "$LINENO" 5
29555fi
6d153f56 29556if test -z "${gl_GNULIB_ENABLED_stat_TRUE}" && test -z "${gl_GNULIB_ENABLED_stat_FALSE}"; then
a9bec17c 29557 as_fn_error "conditional \"gl_GNULIB_ENABLED_stat\" was never defined.
6d153f56
GM
29558Usually this means the macro was only invoked conditionally." "$LINENO" 5
29559fi
3e0be4ab 29560if test -z "${gl_GNULIB_ENABLED_strtoll_TRUE}" && test -z "${gl_GNULIB_ENABLED_strtoll_FALSE}"; then
a9bec17c 29561 as_fn_error "conditional \"gl_GNULIB_ENABLED_strtoll\" was never defined.
3e0be4ab
GM
29562Usually this means the macro was only invoked conditionally." "$LINENO" 5
29563fi
6d153f56 29564if test -z "${gl_GNULIB_ENABLED_strtoull_TRUE}" && test -z "${gl_GNULIB_ENABLED_strtoull_FALSE}"; then
a9bec17c 29565 as_fn_error "conditional \"gl_GNULIB_ENABLED_strtoull\" was never defined.
6d153f56
GM
29566Usually this means the macro was only invoked conditionally." "$LINENO" 5
29567fi
e412eb97
GM
29568if test -z "${gl_GNULIB_ENABLED_tempname_TRUE}" && test -z "${gl_GNULIB_ENABLED_tempname_FALSE}"; then
29569 as_fn_error "conditional \"gl_GNULIB_ENABLED_tempname\" was never defined.
29570Usually this means the macro was only invoked conditionally." "$LINENO" 5
29571fi
710f5812
GM
29572if test -z "${gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_TRUE}" && test -z "${gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_FALSE}"; then
29573 as_fn_error "conditional \"gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec\" was never defined.
29574Usually this means the macro was only invoked conditionally." "$LINENO" 5
6c051bab 29575fi
942f733f 29576
743c80a7
PE
29577 gl_libobjs=
29578 gl_ltlibobjs=
29579 if test -n "$gl_LIBOBJS"; then
29580 # Remove the extension.
29581 sed_drop_objext='s/\.o$//;s/\.obj$//'
29582 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
29583 gl_libobjs="$gl_libobjs $i.$ac_objext"
29584 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
29585 done
29586 fi
29587 gl_LIBOBJS=$gl_libobjs
29588
29589 gl_LTLIBOBJS=$gl_ltlibobjs
29590
29591
29592
29593 gltests_libobjs=
29594 gltests_ltlibobjs=
29595 if test -n "$gltests_LIBOBJS"; then
29596 # Remove the extension.
29597 sed_drop_objext='s/\.o$//;s/\.obj$//'
29598 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
29599 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
29600 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
29601 done
29602 fi
29603 gltests_LIBOBJS=$gltests_libobjs
29604
29605 gltests_LTLIBOBJS=$gltests_ltlibobjs
29606
067d23c9
KY
29607
29608
a9bec17c 29609: ${CONFIG_STATUS=./config.status}
067d23c9
KY
29610ac_write_fail=0
29611ac_clean_files_save=$ac_clean_files
29612ac_clean_files="$ac_clean_files $CONFIG_STATUS"
29613{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
29614$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
29615as_write_fail=0
29616cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
29617#! $SHELL
29618# Generated by $as_me.
29619# Run this file to recreate the current configuration.
29620# Compiler output produced by configure, useful for debugging
29621# configure, is in config.log if it exists.
29622
29623debug=false
29624ac_cs_recheck=false
29625ac_cs_silent=false
29626
29627SHELL=\${CONFIG_SHELL-$SHELL}
29628export SHELL
29629_ASEOF
29630cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
29631## -------------------- ##
29632## M4sh Initialization. ##
29633## -------------------- ##
29634
29635# Be more Bourne compatible
29636DUALCASE=1; export DUALCASE # for MKS sh
29637if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
29638 emulate sh
29639 NULLCMD=:
29640 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
29641 # is contrary to our usage. Disable this feature.
29642 alias -g '${1+"$@"}'='"$@"'
29643 setopt NO_GLOB_SUBST
29644else
29645 case `(set -o) 2>/dev/null` in #(
29646 *posix*) :
29647 set -o posix ;; #(
29648 *) :
29649 ;;
29650esac
29651fi
29652
29653
29654as_nl='
29655'
29656export as_nl
29657# Printing a long string crashes Solaris 7 /usr/bin/printf.
29658as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
29659as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
29660as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
29661# Prefer a ksh shell builtin over an external printf program on Solaris,
29662# but without wasting forks for bash or zsh.
29663if test -z "$BASH_VERSION$ZSH_VERSION" \
29664 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
29665 as_echo='print -r --'
29666 as_echo_n='print -rn --'
29667elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
29668 as_echo='printf %s\n'
29669 as_echo_n='printf %s'
29670else
29671 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
29672 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
29673 as_echo_n='/usr/ucb/echo -n'
29674 else
29675 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
29676 as_echo_n_body='eval
29677 arg=$1;
29678 case $arg in #(
29679 *"$as_nl"*)
29680 expr "X$arg" : "X\\(.*\\)$as_nl";
29681 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
29682 esac;
29683 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
29684 '
29685 export as_echo_n_body
29686 as_echo_n='sh -c $as_echo_n_body as_echo'
29687 fi
29688 export as_echo_body
29689 as_echo='sh -c $as_echo_body as_echo'
29690fi
29691
29692# The user is always right.
29693if test "${PATH_SEPARATOR+set}" != set; then
29694 PATH_SEPARATOR=:
29695 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
29696 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
29697 PATH_SEPARATOR=';'
29698 }
29699fi
29700
29701
29702# IFS
29703# We need space, tab and new line, in precisely that order. Quoting is
29704# there to prevent editors from complaining about space-tab.
29705# (If _AS_PATH_WALK were called with IFS unset, it would disable word
29706# splitting by setting IFS to empty value.)
29707IFS=" "" $as_nl"
29708
29709# Find who we are. Look in the path if we contain no directory separator.
29710case $0 in #((
29711 *[\\/]* ) as_myself=$0 ;;
29712 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29713for as_dir in $PATH
29714do
29715 IFS=$as_save_IFS
29716 test -z "$as_dir" && as_dir=.
29717 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
29718 done
29719IFS=$as_save_IFS
29720
29721 ;;
29722esac
29723# We did not find ourselves, most probably we were run as `sh COMMAND'
29724# in which case we are not to be found in the path.
29725if test "x$as_myself" = x; then
29726 as_myself=$0
29727fi
29728if test ! -f "$as_myself"; then
29729 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
29730 exit 1
29731fi
29732
29733# Unset variables that we do not need and which cause bugs (e.g. in
29734# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
29735# suppresses any "Segmentation fault" message there. '((' could
29736# trigger a bug in pdksh 5.2.14.
29737for as_var in BASH_ENV ENV MAIL MAILPATH
29738do eval test x\${$as_var+set} = xset \
29739 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
29740done
29741PS1='$ '
29742PS2='> '
29743PS4='+ '
29744
29745# NLS nuisances.
29746LC_ALL=C
29747export LC_ALL
29748LANGUAGE=C
29749export LANGUAGE
29750
29751# CDPATH.
29752(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
29753
29754
a9bec17c
GM
29755# as_fn_error ERROR [LINENO LOG_FD]
29756# ---------------------------------
067d23c9
KY
29757# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
29758# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
a9bec17c 29759# script with status $?, using 1 if that was 0.
067d23c9
KY
29760as_fn_error ()
29761{
a9bec17c
GM
29762 as_status=$?; test $as_status -eq 0 && as_status=1
29763 if test "$3"; then
29764 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
29765 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
067d23c9 29766 fi
a9bec17c 29767 $as_echo "$as_me: error: $1" >&2
067d23c9
KY
29768 as_fn_exit $as_status
29769} # as_fn_error
29770
29771
29772# as_fn_set_status STATUS
29773# -----------------------
29774# Set $? to STATUS, without forking.
29775as_fn_set_status ()
29776{
29777 return $1
29778} # as_fn_set_status
29779
29780# as_fn_exit STATUS
29781# -----------------
29782# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
29783as_fn_exit ()
29784{
29785 set +e
29786 as_fn_set_status $1
29787 exit $1
29788} # as_fn_exit
29789
29790# as_fn_unset VAR
29791# ---------------
29792# Portably unset VAR.
29793as_fn_unset ()
29794{
29795 { eval $1=; unset $1;}
29796}
29797as_unset=as_fn_unset
29798# as_fn_append VAR VALUE
29799# ----------------------
29800# Append the text in VALUE to the end of the definition contained in VAR. Take
29801# advantage of any shell optimizations that allow amortized linear growth over
29802# repeated appends, instead of the typical quadratic growth present in naive
29803# implementations.
29804if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
29805 eval 'as_fn_append ()
29806 {
29807 eval $1+=\$2
29808 }'
29809else
29810 as_fn_append ()
29811 {
29812 eval $1=\$$1\$2
29813 }
29814fi # as_fn_append
29815
29816# as_fn_arith ARG...
29817# ------------------
29818# Perform arithmetic evaluation on the ARGs, and store the result in the
29819# global $as_val. Take advantage of shells that can avoid forks. The arguments
29820# must be portable across $(()) and expr.
29821if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
29822 eval 'as_fn_arith ()
29823 {
29824 as_val=$(( $* ))
29825 }'
29826else
29827 as_fn_arith ()
29828 {
29829 as_val=`expr "$@" || test $? -eq 1`
29830 }
29831fi # as_fn_arith
29832
29833
29834if expr a : '\(a\)' >/dev/null 2>&1 &&
29835 test "X`expr 00001 : '.*\(...\)'`" = X001; then
29836 as_expr=expr
29837else
29838 as_expr=false
29839fi
29840
29841if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
29842 as_basename=basename
29843else
29844 as_basename=false
29845fi
29846
29847if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
29848 as_dirname=dirname
29849else
29850 as_dirname=false
29851fi
29852
29853as_me=`$as_basename -- "$0" ||
29854$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
29855 X"$0" : 'X\(//\)$' \| \
29856 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
29857$as_echo X/"$0" |
29858 sed '/^.*\/\([^/][^/]*\)\/*$/{
29859 s//\1/
29860 q
29861 }
29862 /^X\/\(\/\/\)$/{
29863 s//\1/
29864 q
29865 }
29866 /^X\/\(\/\).*/{
29867 s//\1/
29868 q
29869 }
29870 s/.*/./; q'`
29871
29872# Avoid depending upon Character Ranges.
29873as_cr_letters='abcdefghijklmnopqrstuvwxyz'
29874as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
29875as_cr_Letters=$as_cr_letters$as_cr_LETTERS
29876as_cr_digits='0123456789'
29877as_cr_alnum=$as_cr_Letters$as_cr_digits
29878
29879ECHO_C= ECHO_N= ECHO_T=
29880case `echo -n x` in #(((((
29881-n*)
29882 case `echo 'xy\c'` in
29883 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
29884 xy) ECHO_C='\c';;
29885 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
29886 ECHO_T=' ';;
29887 esac;;
29888*)
29889 ECHO_N='-n';;
29890esac
29891
29892rm -f conf$$ conf$$.exe conf$$.file
29893if test -d conf$$.dir; then
29894 rm -f conf$$.dir/conf$$.file
29895else
29896 rm -f conf$$.dir
29897 mkdir conf$$.dir 2>/dev/null
29898fi
29899if (echo >conf$$.file) 2>/dev/null; then
29900 if ln -s conf$$.file conf$$ 2>/dev/null; then
29901 as_ln_s='ln -s'
29902 # ... but there are two gotchas:
29903 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
29904 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
29905 # In both cases, we have to default to `cp -p'.
29906 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
29907 as_ln_s='cp -p'
29908 elif ln conf$$.file conf$$ 2>/dev/null; then
29909 as_ln_s=ln
29910 else
29911 as_ln_s='cp -p'
29912 fi
29913else
29914 as_ln_s='cp -p'
29915fi
29916rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
29917rmdir conf$$.dir 2>/dev/null
29918
29919
29920# as_fn_mkdir_p
29921# -------------
29922# Create "$as_dir" as a directory, including parents if necessary.
29923as_fn_mkdir_p ()
29924{
29925
29926 case $as_dir in #(
29927 -*) as_dir=./$as_dir;;
29928 esac
29929 test -d "$as_dir" || eval $as_mkdir_p || {
29930 as_dirs=
29931 while :; do
29932 case $as_dir in #(
29933 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
29934 *) as_qdir=$as_dir;;
29935 esac
29936 as_dirs="'$as_qdir' $as_dirs"
29937 as_dir=`$as_dirname -- "$as_dir" ||
29938$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
29939 X"$as_dir" : 'X\(//\)[^/]' \| \
29940 X"$as_dir" : 'X\(//\)$' \| \
29941 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
29942$as_echo X"$as_dir" |
29943 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
29944 s//\1/
29945 q
29946 }
29947 /^X\(\/\/\)[^/].*/{
29948 s//\1/
29949 q
29950 }
29951 /^X\(\/\/\)$/{
29952 s//\1/
29953 q
29954 }
29955 /^X\(\/\).*/{
29956 s//\1/
29957 q
29958 }
29959 s/.*/./; q'`
29960 test -d "$as_dir" && break
29961 done
29962 test -z "$as_dirs" || eval "mkdir $as_dirs"
a9bec17c 29963 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
067d23c9
KY
29964
29965
29966} # as_fn_mkdir_p
29967if mkdir -p . 2>/dev/null; then
29968 as_mkdir_p='mkdir -p "$as_dir"'
29969else
29970 test -d ./-p && rmdir ./-p
29971 as_mkdir_p=false
29972fi
29973
29974if test -x / >/dev/null 2>&1; then
29975 as_test_x='test -x'
29976else
29977 if ls -dL / >/dev/null 2>&1; then
29978 as_ls_L_option=L
29979 else
29980 as_ls_L_option=
29981 fi
29982 as_test_x='
29983 eval sh -c '\''
29984 if test -d "$1"; then
29985 test -d "$1/.";
29986 else
29987 case $1 in #(
29988 -*)set "./$1";;
29989 esac;
29990 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
29991 ???[sx]*):;;*)false;;esac;fi
29992 '\'' sh
29993 '
29994fi
29995as_executable_p=$as_test_x
29996
29997# Sed expression to map a string onto a valid CPP name.
29998as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
29999
30000# Sed expression to map a string onto a valid variable name.
30001as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
30002
30003
30004exec 6>&1
30005## ----------------------------------- ##
30006## Main body of $CONFIG_STATUS script. ##
30007## ----------------------------------- ##
30008_ASEOF
30009test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
30010
30011cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30012# Save the log message, to keep $0 and so on meaningful, and to
30013# report actual input values of CONFIG_FILES etc. instead of their
30014# values after options handling.
30015ac_log="
c574bc34 30016This file was extended by emacs $as_me 24.3.50, which was
a9bec17c 30017generated by GNU Autoconf 2.65. Invocation command line was
067d23c9
KY
30018
30019 CONFIG_FILES = $CONFIG_FILES
30020 CONFIG_HEADERS = $CONFIG_HEADERS
30021 CONFIG_LINKS = $CONFIG_LINKS
30022 CONFIG_COMMANDS = $CONFIG_COMMANDS
30023 $ $0 $@
30024
30025on `(hostname || uname -n) 2>/dev/null | sed 1q`
30026"
30027
30028_ACEOF
30029
30030case $ac_config_files in *"
30031"*) set x $ac_config_files; shift; ac_config_files=$*;;
30032esac
30033
30034case $ac_config_headers in *"
30035"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
30036esac
30037
30038
30039cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30040# Files that config.status was made for.
30041config_files="$ac_config_files"
30042config_headers="$ac_config_headers"
30043config_commands="$ac_config_commands"
30044
30045_ACEOF
30046
30047cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30048ac_cs_usage="\
30049\`$as_me' instantiates files and other configuration actions
30050from templates according to the current configuration. Unless the files
30051and actions are specified as TAGs, all are instantiated by default.
30052
30053Usage: $0 [OPTION]... [TAG]...
30054
30055 -h, --help print this help, then exit
30056 -V, --version print version number and configuration settings, then exit
30057 --config print configuration, then exit
30058 -q, --quiet, --silent
30059 do not print progress messages
30060 -d, --debug don't remove temporary files
30061 --recheck update $as_me by reconfiguring in the same conditions
30062 --file=FILE[:TEMPLATE]
30063 instantiate the configuration file FILE
30064 --header=FILE[:TEMPLATE]
30065 instantiate the configuration header FILE
30066
30067Configuration files:
30068$config_files
30069
30070Configuration headers:
30071$config_headers
30072
30073Configuration commands:
30074$config_commands
30075
30076Report bugs to the package provider."
30077
30078_ACEOF
30079cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30080ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
30081ac_cs_version="\\
c574bc34 30082emacs config.status 24.3.50
a9bec17c 30083configured by $0, generated by GNU Autoconf 2.65,
067d23c9
KY
30084 with options \\"\$ac_cs_config\\"
30085
a9bec17c 30086Copyright (C) 2009 Free Software Foundation, Inc.
067d23c9
KY
30087This config.status script is free software; the Free Software Foundation
30088gives unlimited permission to copy, distribute and modify it."
30089
30090ac_pwd='$ac_pwd'
30091srcdir='$srcdir'
30092INSTALL='$INSTALL'
743c80a7
PE
30093MKDIR_P='$MKDIR_P'
30094AWK='$AWK'
067d23c9
KY
30095test -n "\$AWK" || AWK=awk
30096_ACEOF
30097
30098cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30099# The default lists apply if the user does not specify any file.
30100ac_need_defaults=:
30101while test $# != 0
30102do
30103 case $1 in
a9bec17c 30104 --*=*)
067d23c9
KY
30105 ac_option=`expr "X$1" : 'X\([^=]*\)='`
30106 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
30107 ac_shift=:
30108 ;;
30109 *)
30110 ac_option=$1
30111 ac_optarg=$2
30112 ac_shift=shift
30113 ;;
30114 esac
30115
30116 case $ac_option in
30117 # Handling of the options.
30118 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
30119 ac_cs_recheck=: ;;
30120 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
30121 $as_echo "$ac_cs_version"; exit ;;
30122 --config | --confi | --conf | --con | --co | --c )
30123 $as_echo "$ac_cs_config"; exit ;;
30124 --debug | --debu | --deb | --de | --d | -d )
30125 debug=: ;;
30126 --file | --fil | --fi | --f )
30127 $ac_shift
30128 case $ac_optarg in
30129 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
30130 esac
30131 as_fn_append CONFIG_FILES " '$ac_optarg'"
30132 ac_need_defaults=false;;
30133 --header | --heade | --head | --hea )
30134 $ac_shift
30135 case $ac_optarg in
30136 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
30137 esac
30138 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
30139 ac_need_defaults=false;;
30140 --he | --h)
30141 # Conflict between --help and --header
a9bec17c 30142 as_fn_error "ambiguous option: \`$1'
067d23c9
KY
30143Try \`$0 --help' for more information.";;
30144 --help | --hel | -h )
30145 $as_echo "$ac_cs_usage"; exit ;;
30146 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
30147 | -silent | --silent | --silen | --sile | --sil | --si | --s)
30148 ac_cs_silent=: ;;
30149
30150 # This is an error.
a9bec17c 30151 -*) as_fn_error "unrecognized option: \`$1'
067d23c9
KY
30152Try \`$0 --help' for more information." ;;
30153
30154 *) as_fn_append ac_config_targets " $1"
30155 ac_need_defaults=false ;;
30156
30157 esac
30158 shift
30159done
30160
30161ac_configure_extra_args=
30162
30163if $ac_cs_silent; then
30164 exec 6>/dev/null
30165 ac_configure_extra_args="$ac_configure_extra_args --silent"
30166fi
30167
30168_ACEOF
30169cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30170if \$ac_cs_recheck; then
30171 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
30172 shift
30173 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
30174 CONFIG_SHELL='$SHELL'
30175 export CONFIG_SHELL
30176 exec "\$@"
30177fi
30178
30179_ACEOF
30180cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30181exec 5>>config.log
30182{
30183 echo
30184 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
30185## Running $as_me. ##
30186_ASBOX
30187 $as_echo "$ac_log"
30188} >&5
30189
30190_ACEOF
30191cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30192#
30193# INIT-COMMANDS
30194#
743c80a7 30195AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
7c61eaab 30196GCC="$GCC" CPPFLAGS="$CPPFLAGS" opsys="$opsys"
067d23c9
KY
30197
30198_ACEOF
30199
30200cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30201
30202# Handling of arguments.
30203for ac_config_target in $ac_config_targets
30204do
30205 case $ac_config_target in
30206 "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:src/config.in" ;;
743c80a7 30207 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
bb7dce39
GM
30208 "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" ;;
30209 "nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop") CONFIG_FILES="$CONFIG_FILES nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop:nextstep/templates/Emacs.desktop.in" ;;
30210 "nextstep/Cocoa/Emacs.base/Contents/Info.plist") CONFIG_FILES="$CONFIG_FILES nextstep/Cocoa/Emacs.base/Contents/Info.plist:nextstep/templates/Info.plist.in" ;;
30211 "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 30212 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
743c80a7 30213 "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
56ade35c
GM
30214 "lib-src/Makefile") CONFIG_FILES="$CONFIG_FILES lib-src/Makefile" ;;
30215 "oldXMenu/Makefile") CONFIG_FILES="$CONFIG_FILES oldXMenu/Makefile" ;;
30216 "doc/emacs/Makefile") CONFIG_FILES="$CONFIG_FILES doc/emacs/Makefile" ;;
30217 "doc/misc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/misc/Makefile" ;;
30218 "doc/lispintro/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispintro/Makefile" ;;
30219 "doc/lispref/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispref/Makefile" ;;
30220 "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
30221 "lwlib/Makefile") CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;;
30222 "lisp/Makefile") CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;;
30223 "leim/Makefile") CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;;
bb7dce39 30224 "nextstep/Makefile") CONFIG_FILES="$CONFIG_FILES nextstep/Makefile" ;;
7c61eaab 30225 "nt/Makefile") CONFIG_FILES="$CONFIG_FILES nt/Makefile" ;;
56ade35c 30226 "test/automated/Makefile") CONFIG_FILES="$CONFIG_FILES test/automated/Makefile" ;;
40b65096 30227 "admin/unidata/Makefile") CONFIG_FILES="$CONFIG_FILES admin/unidata/Makefile" ;;
4c15c0f2
GM
30228 "src/epaths.h") CONFIG_COMMANDS="$CONFIG_COMMANDS src/epaths.h" ;;
30229 "src/.gdbinit") CONFIG_COMMANDS="$CONFIG_COMMANDS src/.gdbinit" ;;
067d23c9 30230
a9bec17c 30231 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
067d23c9
KY
30232 esac
30233done
30234
30235
30236# If the user did not use the arguments to specify the items to instantiate,
30237# then the envvar interface is used. Set only those that are not.
30238# We use the long form for the default assignment because of an extremely
30239# bizarre bug on SunOS 4.1.3.
30240if $ac_need_defaults; then
30241 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
30242 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
30243 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
30244fi
30245
30246# Have a temporary directory for convenience. Make it in the build tree
30247# simply because there is no reason against having it here, and in addition,
30248# creating and moving files from /tmp can sometimes cause problems.
30249# Hook for its removal unless debugging.
30250# Note that there is a small window in which the directory will not be cleaned:
30251# after its creation but before its name has been assigned to `$tmp'.
30252$debug ||
30253{
a9bec17c 30254 tmp=
067d23c9 30255 trap 'exit_status=$?
a9bec17c 30256 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
067d23c9
KY
30257' 0
30258 trap 'as_fn_exit 1' 1 2 13 15
30259}
30260# Create a (secure) tmp directory for tmp files.
30261
30262{
30263 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
a9bec17c 30264 test -n "$tmp" && test -d "$tmp"
067d23c9
KY
30265} ||
30266{
30267 tmp=./conf$$-$RANDOM
30268 (umask 077 && mkdir "$tmp")
a9bec17c 30269} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
067d23c9
KY
30270
30271# Set up the scripts for CONFIG_FILES section.
30272# No need to generate them if there are no CONFIG_FILES.
30273# This happens for instance with `./config.status config.h'.
30274if test -n "$CONFIG_FILES"; then
30275
30276if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
30277 ac_cs_awk_getline=:
30278 ac_cs_awk_pipe_init=
30279 ac_cs_awk_read_file='
30280 while ((getline aline < (F[key])) > 0)
30281 print(aline)
30282 close(F[key])'
30283 ac_cs_awk_pipe_fini=
30284else
30285 ac_cs_awk_getline=false
30286 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
30287 ac_cs_awk_read_file='
30288 print "|#_!!_#|"
30289 print "cat " F[key] " &&"
30290 '$ac_cs_awk_pipe_init
30291 # The final `:' finishes the AND list.
30292 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
30293fi
30294ac_cr=`echo X | tr X '\015'`
30295# On cygwin, bash can eat \r inside `` if the user requested igncr.
30296# But we know of no other shell where ac_cr would be empty at this
30297# point, so we can use a bashism as a fallback.
30298if test "x$ac_cr" = x; then
30299 eval ac_cr=\$\'\\r\'
30300fi
30301ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
30302if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
a9bec17c 30303 ac_cs_awk_cr='\r'
067d23c9
KY
30304else
30305 ac_cs_awk_cr=$ac_cr
30306fi
30307
a9bec17c 30308echo 'BEGIN {' >"$tmp/subs1.awk" &&
067d23c9
KY
30309_ACEOF
30310
30311# Create commands to substitute file output variables.
30312{
30313 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
a9bec17c 30314 echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
067d23c9
KY
30315 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
30316 echo "_ACAWK" &&
30317 echo "_ACEOF"
30318} >conf$$files.sh &&
30319. ./conf$$files.sh ||
a9bec17c 30320 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
067d23c9
KY
30321rm -f conf$$files.sh
30322
30323{
30324 echo "cat >conf$$subs.awk <<_ACEOF" &&
30325 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
30326 echo "_ACEOF"
30327} >conf$$subs.sh ||
a9bec17c
GM
30328 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
30329ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
067d23c9
KY
30330ac_delim='%!_!# '
30331for ac_last_try in false false false false false :; do
30332 . ./conf$$subs.sh ||
a9bec17c 30333 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
067d23c9
KY
30334
30335 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
30336 if test $ac_delim_n = $ac_delim_num; then
30337 break
30338 elif $ac_last_try; then
a9bec17c 30339 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
067d23c9
KY
30340 else
30341 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
30342 fi
30343done
30344rm -f conf$$subs.sh
30345
30346cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
a9bec17c 30347cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
067d23c9
KY
30348_ACEOF
30349sed -n '
30350h
30351s/^/S["/; s/!.*/"]=/
30352p
30353g
30354s/^[^!]*!//
30355:repl
30356t repl
30357s/'"$ac_delim"'$//
30358t delim
30359:nl
30360h
30361s/\(.\{148\}\)..*/\1/
30362t more1
30363s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
30364p
30365n
30366b repl
30367:more1
30368s/["\\]/\\&/g; s/^/"/; s/$/"\\/
30369p
30370g
30371s/.\{148\}//
30372t nl
30373:delim
30374h
30375s/\(.\{148\}\)..*/\1/
30376t more2
30377s/["\\]/\\&/g; s/^/"/; s/$/"/
30378p
30379b
30380:more2
30381s/["\\]/\\&/g; s/^/"/; s/$/"\\/
30382p
30383g
30384s/.\{148\}//
30385t delim
30386' <conf$$subs.awk | sed '
30387/^[^""]/{
30388 N
30389 s/\n//
30390}
30391' >>$CONFIG_STATUS || ac_write_fail=1
30392rm -f conf$$subs.awk
30393cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30394_ACAWK
a9bec17c 30395cat >>"\$tmp/subs1.awk" <<_ACAWK &&
067d23c9
KY
30396 for (key in S) S_is_set[key] = 1
30397 FS = "\a"
30398 \$ac_cs_awk_pipe_init
30399}
30400{
30401 line = $ 0
30402 nfields = split(line, field, "@")
30403 substed = 0
30404 len = length(field[1])
30405 for (i = 2; i < nfields; i++) {
30406 key = field[i]
30407 keylen = length(key)
30408 if (S_is_set[key]) {
30409 value = S[key]
30410 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
30411 len += length(value) + length(field[++i])
30412 substed = 1
30413 } else
30414 len += 1 + keylen
30415 }
30416 if (nfields == 3 && !substed) {
30417 key = field[2]
30418 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
30419 \$ac_cs_awk_read_file
30420 next
30421 }
30422 }
30423 print line
30424}
30425\$ac_cs_awk_pipe_fini
30426_ACAWK
30427_ACEOF
30428cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30429if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
30430 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
30431else
30432 cat
a9bec17c
GM
30433fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
30434 || as_fn_error "could not setup config files machinery" "$LINENO" 5
067d23c9
KY
30435_ACEOF
30436
a9bec17c
GM
30437# VPATH may cause trouble with some makes, so we remove $(srcdir),
30438# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
067d23c9
KY
30439# trailing colons and then remove the whole line if VPATH becomes empty
30440# (actually we leave an empty line to preserve line numbers).
30441if test "x$srcdir" = x.; then
a9bec17c
GM
30442 ac_vpsub='/^[ ]*VPATH[ ]*=/{
30443s/:*\$(srcdir):*/:/
30444s/:*\${srcdir}:*/:/
30445s/:*@srcdir@:*/:/
30446s/^\([^=]*=[ ]*\):*/\1/
067d23c9
KY
30447s/:*$//
30448s/^[^=]*=[ ]*$//
30449}'
30450fi
30451
30452cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30453fi # test -n "$CONFIG_FILES"
30454
30455# Set up the scripts for CONFIG_HEADERS section.
30456# No need to generate them if there are no CONFIG_HEADERS.
30457# This happens for instance with `./config.status Makefile'.
30458if test -n "$CONFIG_HEADERS"; then
a9bec17c 30459cat >"$tmp/defines.awk" <<\_ACAWK ||
067d23c9
KY
30460BEGIN {
30461_ACEOF
30462
30463# Transform confdefs.h into an awk script `defines.awk', embedded as
30464# here-document in config.status, that substitutes the proper values into
30465# config.h.in to produce config.h.
30466
30467# Create a delimiter string that does not exist in confdefs.h, to ease
30468# handling of long lines.
30469ac_delim='%!_!# '
30470for ac_last_try in false false :; do
a9bec17c
GM
30471 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
30472 if test -z "$ac_t"; then
067d23c9
KY
30473 break
30474 elif $ac_last_try; then
a9bec17c 30475 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
067d23c9
KY
30476 else
30477 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
30478 fi
30479done
30480
30481# For the awk script, D is an array of macro values keyed by name,
30482# likewise P contains macro parameters if any. Preserve backslash
30483# newline sequences.
30484
30485ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
30486sed -n '
30487s/.\{148\}/&'"$ac_delim"'/g
30488t rset
30489:rset
30490s/^[ ]*#[ ]*define[ ][ ]*/ /
30491t def
30492d
30493:def
30494s/\\$//
30495t bsnl
30496s/["\\]/\\&/g
30497s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
30498D["\1"]=" \3"/p
30499s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
30500d
30501:bsnl
30502s/["\\]/\\&/g
30503s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
30504D["\1"]=" \3\\\\\\n"\\/p
30505t cont
30506s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
30507t cont
30508d
30509:cont
30510n
30511s/.\{148\}/&'"$ac_delim"'/g
30512t clear
30513:clear
30514s/\\$//
30515t bsnlc
30516s/["\\]/\\&/g; s/^/"/; s/$/"/p
30517d
30518:bsnlc
30519s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
30520b cont
30521' <confdefs.h | sed '
30522s/'"$ac_delim"'/"\\\
30523"/g' >>$CONFIG_STATUS || ac_write_fail=1
30524
30525cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30526 for (key in D) D_is_set[key] = 1
30527 FS = "\a"
30528}
30529/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
30530 line = \$ 0
30531 split(line, arg, " ")
30532 if (arg[1] == "#") {
30533 defundef = arg[2]
30534 mac1 = arg[3]
30535 } else {
30536 defundef = substr(arg[1], 2)
30537 mac1 = arg[2]
30538 }
30539 split(mac1, mac2, "(") #)
30540 macro = mac2[1]
30541 prefix = substr(line, 1, index(line, defundef) - 1)
30542 if (D_is_set[macro]) {
30543 # Preserve the white space surrounding the "#".
30544 print prefix "define", macro P[macro] D[macro]
30545 next
30546 } else {
30547 # Replace #undef with comments. This is necessary, for example,
30548 # in the case of _POSIX_SOURCE, which is predefined and required
30549 # on some systems where configure will not decide to define it.
30550 if (defundef == "undef") {
30551 print "/*", prefix defundef, macro, "*/"
30552 next
30553 }
30554 }
30555}
30556{ print }
30557_ACAWK
30558_ACEOF
30559cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
a9bec17c 30560 as_fn_error "could not setup config headers machinery" "$LINENO" 5
067d23c9
KY
30561fi # test -n "$CONFIG_HEADERS"
30562
30563
30564eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
30565shift
30566for ac_tag
30567do
30568 case $ac_tag in
30569 :[FHLC]) ac_mode=$ac_tag; continue;;
30570 esac
30571 case $ac_mode$ac_tag in
30572 :[FHL]*:*);;
a9bec17c 30573 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
067d23c9
KY
30574 :[FH]-) ac_tag=-:-;;
30575 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
30576 esac
30577 ac_save_IFS=$IFS
30578 IFS=:
30579 set x $ac_tag
30580 IFS=$ac_save_IFS
30581 shift
30582 ac_file=$1
30583 shift
30584
30585 case $ac_mode in
30586 :L) ac_source=$1;;
30587 :[FH])
30588 ac_file_inputs=
30589 for ac_f
30590 do
30591 case $ac_f in
a9bec17c 30592 -) ac_f="$tmp/stdin";;
067d23c9
KY
30593 *) # Look for the file first in the build tree, then in the source tree
30594 # (if the path is not absolute). The absolute path cannot be DOS-style,
30595 # because $ac_f cannot contain `:'.
30596 test -f "$ac_f" ||
30597 case $ac_f in
30598 [\\/$]*) false;;
30599 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
30600 esac ||
a9bec17c 30601 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
067d23c9
KY
30602 esac
30603 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
30604 as_fn_append ac_file_inputs " '$ac_f'"
30605 done
30606
30607 # Let's still pretend it is `configure' which instantiates (i.e., don't
30608 # use $as_me), people would be surprised to read:
30609 # /* config.h. Generated by config.status. */
30610 configure_input='Generated from '`
30611 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
30612 `' by configure.'
30613 if test x"$ac_file" != x-; then
30614 configure_input="$ac_file. $configure_input"
30615 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
30616$as_echo "$as_me: creating $ac_file" >&6;}
30617 fi
30618 # Neutralize special characters interpreted by sed in replacement strings.
30619 case $configure_input in #(
30620 *\&* | *\|* | *\\* )
30621 ac_sed_conf_input=`$as_echo "$configure_input" |
30622 sed 's/[\\\\&|]/\\\\&/g'`;; #(
30623 *) ac_sed_conf_input=$configure_input;;
30624 esac
30625
30626 case $ac_tag in
a9bec17c
GM
30627 *:-:* | *:-) cat >"$tmp/stdin" \
30628 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
067d23c9
KY
30629 esac
30630 ;;
30631 esac
30632
30633 ac_dir=`$as_dirname -- "$ac_file" ||
30634$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30635 X"$ac_file" : 'X\(//\)[^/]' \| \
30636 X"$ac_file" : 'X\(//\)$' \| \
30637 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
30638$as_echo X"$ac_file" |
30639 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
30640 s//\1/
30641 q
30642 }
30643 /^X\(\/\/\)[^/].*/{
30644 s//\1/
30645 q
30646 }
30647 /^X\(\/\/\)$/{
30648 s//\1/
30649 q
30650 }
30651 /^X\(\/\).*/{
30652 s//\1/
30653 q
30654 }
30655 s/.*/./; q'`
30656 as_dir="$ac_dir"; as_fn_mkdir_p
30657 ac_builddir=.
30658
30659case "$ac_dir" in
30660.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
30661*)
30662 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
30663 # A ".." for each directory in $ac_dir_suffix.
30664 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
30665 case $ac_top_builddir_sub in
30666 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
30667 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
30668 esac ;;
30669esac
30670ac_abs_top_builddir=$ac_pwd
30671ac_abs_builddir=$ac_pwd$ac_dir_suffix
30672# for backward compatibility:
30673ac_top_builddir=$ac_top_build_prefix
30674
30675case $srcdir in
30676 .) # We are building in place.
30677 ac_srcdir=.
30678 ac_top_srcdir=$ac_top_builddir_sub
30679 ac_abs_top_srcdir=$ac_pwd ;;
30680 [\\/]* | ?:[\\/]* ) # Absolute name.
30681 ac_srcdir=$srcdir$ac_dir_suffix;
30682 ac_top_srcdir=$srcdir
30683 ac_abs_top_srcdir=$srcdir ;;
30684 *) # Relative name.
30685 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
30686 ac_top_srcdir=$ac_top_build_prefix$srcdir
30687 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
30688esac
30689ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
30690
30691
30692 case $ac_mode in
30693 :F)
30694 #
30695 # CONFIG_FILE
30696 #
30697
30698 case $INSTALL in
30699 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
30700 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
30701 esac
743c80a7
PE
30702 ac_MKDIR_P=$MKDIR_P
30703 case $MKDIR_P in
30704 [\\/$]* | ?:[\\/]* ) ;;
30705 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
30706 esac
067d23c9
KY
30707_ACEOF
30708
30709cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30710# If the template does not know about datarootdir, expand it.
30711# FIXME: This hack should be removed a few years after 2.60.
30712ac_datarootdir_hack=; ac_datarootdir_seen=
30713ac_sed_dataroot='
30714/datarootdir/ {
30715 p
30716 q
30717}
30718/@datadir@/p
30719/@docdir@/p
30720/@infodir@/p
30721/@localedir@/p
30722/@mandir@/p'
30723case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
30724*datarootdir*) ac_datarootdir_seen=yes;;
30725*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
30726 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
30727$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
30728_ACEOF
30729cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30730 ac_datarootdir_hack='
30731 s&@datadir@&$datadir&g
30732 s&@docdir@&$docdir&g
30733 s&@infodir@&$infodir&g
30734 s&@localedir@&$localedir&g
30735 s&@mandir@&$mandir&g
30736 s&\\\${datarootdir}&$datarootdir&g' ;;
30737esac
30738_ACEOF
30739
30740# Neutralize VPATH when `$srcdir' = `.'.
30741# Shell code in configure.ac might set extrasub.
30742# FIXME: do we really want to maintain this feature?
30743cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30744ac_sed_extra="$ac_vpsub
30745$extrasub
30746_ACEOF
30747cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30748:t
30749/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
30750s|@configure_input@|$ac_sed_conf_input|;t t
30751s&@top_builddir@&$ac_top_builddir_sub&;t t
30752s&@top_build_prefix@&$ac_top_build_prefix&;t t
30753s&@srcdir@&$ac_srcdir&;t t
30754s&@abs_srcdir@&$ac_abs_srcdir&;t t
30755s&@top_srcdir@&$ac_top_srcdir&;t t
30756s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
30757s&@builddir@&$ac_builddir&;t t
30758s&@abs_builddir@&$ac_abs_builddir&;t t
30759s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
30760s&@INSTALL@&$ac_INSTALL&;t t
743c80a7 30761s&@MKDIR_P@&$ac_MKDIR_P&;t t
067d23c9
KY
30762$ac_datarootdir_hack
30763"
30764eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
30765if $ac_cs_awk_getline; then
a9bec17c 30766 $AWK -f "$tmp/subs.awk"
067d23c9 30767else
a9bec17c
GM
30768 $AWK -f "$tmp/subs.awk" | $SHELL
30769fi >$tmp/out \
30770 || as_fn_error "could not create $ac_file" "$LINENO" 5
067d23c9
KY
30771
30772test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
a9bec17c
GM
30773 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
30774 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
067d23c9 30775 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
a9bec17c 30776which seems to be undefined. Please make sure it is defined." >&5
067d23c9 30777$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
a9bec17c 30778which seems to be undefined. Please make sure it is defined." >&2;}
067d23c9 30779
a9bec17c 30780 rm -f "$tmp/stdin"
067d23c9 30781 case $ac_file in
a9bec17c
GM
30782 -) cat "$tmp/out" && rm -f "$tmp/out";;
30783 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
067d23c9 30784 esac \
a9bec17c 30785 || as_fn_error "could not create $ac_file" "$LINENO" 5
067d23c9
KY
30786 ;;
30787 :H)
30788 #
30789 # CONFIG_HEADER
30790 #
30791 if test x"$ac_file" != x-; then
30792 {
30793 $as_echo "/* $configure_input */" \
a9bec17c
GM
30794 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
30795 } >"$tmp/config.h" \
30796 || as_fn_error "could not create $ac_file" "$LINENO" 5
30797 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
067d23c9
KY
30798 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
30799$as_echo "$as_me: $ac_file is unchanged" >&6;}
30800 else
30801 rm -f "$ac_file"
a9bec17c
GM
30802 mv "$tmp/config.h" "$ac_file" \
30803 || as_fn_error "could not create $ac_file" "$LINENO" 5
067d23c9
KY
30804 fi
30805 else
30806 $as_echo "/* $configure_input */" \
a9bec17c
GM
30807 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
30808 || as_fn_error "could not create -" "$LINENO" 5
067d23c9 30809 fi
743c80a7
PE
30810# Compute "$ac_file"'s index in $config_headers.
30811_am_arg="$ac_file"
30812_am_stamp_count=1
30813for _am_header in $config_headers :; do
30814 case $_am_header in
30815 $_am_arg | $_am_arg:* )
30816 break ;;
30817 * )
30818 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
30819 esac
30820done
30821echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
30822$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30823 X"$_am_arg" : 'X\(//\)[^/]' \| \
30824 X"$_am_arg" : 'X\(//\)$' \| \
30825 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
30826$as_echo X"$_am_arg" |
30827 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
30828 s//\1/
30829 q
30830 }
30831 /^X\(\/\/\)[^/].*/{
30832 s//\1/
30833 q
30834 }
30835 /^X\(\/\/\)$/{
30836 s//\1/
30837 q
30838 }
30839 /^X\(\/\).*/{
30840 s//\1/
30841 q
30842 }
30843 s/.*/./; q'`/stamp-h$_am_stamp_count
067d23c9
KY
30844 ;;
30845
30846 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
30847$as_echo "$as_me: executing $ac_file commands" >&6;}
30848 ;;
30849 esac
30850
30851
30852 case $ac_file$ac_mode in
743c80a7
PE
30853 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
30854 # Autoconf 2.62 quotes --file arguments for eval, but not when files
30855 # are listed without --file. Let's play safe and only enable the eval
30856 # if we detect the quoting.
30857 case $CONFIG_FILES in
30858 *\'*) eval set x "$CONFIG_FILES" ;;
30859 *) set x $CONFIG_FILES ;;
30860 esac
30861 shift
30862 for mf
30863 do
30864 # Strip MF so we end up with the name of the file.
30865 mf=`echo "$mf" | sed -e 's/:.*$//'`
30866 # Check whether this is an Automake generated Makefile or not.
30867 # We used to match only the files named `Makefile.in', but
30868 # some people rename them; so instead we look at the file content.
30869 # Grep'ing the first line is not enough: some people post-process
30870 # each Makefile.in and add a new line on top of each file to say so.
30871 # Grep'ing the whole file is not good either: AIX grep has a line
30872 # limit of 2048, but all sed's we know have understand at least 4000.
30873 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
30874 dirpart=`$as_dirname -- "$mf" ||
30875$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30876 X"$mf" : 'X\(//\)[^/]' \| \
30877 X"$mf" : 'X\(//\)$' \| \
30878 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
30879$as_echo X"$mf" |
30880 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
30881 s//\1/
30882 q
30883 }
30884 /^X\(\/\/\)[^/].*/{
30885 s//\1/
30886 q
30887 }
30888 /^X\(\/\/\)$/{
30889 s//\1/
30890 q
30891 }
30892 /^X\(\/\).*/{
30893 s//\1/
30894 q
30895 }
30896 s/.*/./; q'`
30897 else
30898 continue
30899 fi
30900 # Extract the definition of DEPDIR, am__include, and am__quote
30901 # from the Makefile without running `make'.
30902 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
30903 test -z "$DEPDIR" && continue
30904 am__include=`sed -n 's/^am__include = //p' < "$mf"`
30905 test -z "am__include" && continue
30906 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
30907 # When using ansi2knr, U may be empty or an underscore; expand it
30908 U=`sed -n 's/^U = //p' < "$mf"`
30909 # Find all dependency output files, they are included files with
30910 # $(DEPDIR) in their names. We invoke sed twice because it is the
30911 # simplest approach to changing $(DEPDIR) to its actual value in the
30912 # expansion.
30913 for file in `sed -n "
30914 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
30915 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
30916 # Make sure the directory exists.
30917 test -f "$dirpart/$file" && continue
30918 fdir=`$as_dirname -- "$file" ||
30919$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30920 X"$file" : 'X\(//\)[^/]' \| \
30921 X"$file" : 'X\(//\)$' \| \
30922 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
30923$as_echo X"$file" |
30924 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
30925 s//\1/
30926 q
30927 }
30928 /^X\(\/\/\)[^/].*/{
30929 s//\1/
30930 q
30931 }
30932 /^X\(\/\/\)$/{
30933 s//\1/
30934 q
30935 }
30936 /^X\(\/\).*/{
30937 s//\1/
30938 q
30939 }
30940 s/.*/./; q'`
30941 as_dir=$dirpart/$fdir; as_fn_mkdir_p
30942 # echo "creating $dirpart/$file"
30943 echo '# dummy' > "$dirpart/$file"
30944 done
30945 done
30946}
30947 ;;
4c15c0f2 30948 "src/epaths.h":C)
7c61eaab
GM
30949if test "${opsys}" = "mingw32"; then
30950 ${MAKE-make} MAKEFILE_NAME=do-not-make-Makefile epaths-force-w32
30951else
30952 ${MAKE-make} MAKEFILE_NAME=do-not-make-Makefile epaths-force
30953fi
9411886d 30954 ;;
4c15c0f2 30955 "src/.gdbinit":C)
b5591ebb 30956if test ! -f src/.gdbinit && test -f "$srcdir/src/.gdbinit"; then
b5591ebb 30957 echo "source $srcdir/src/.gdbinit" > src/.gdbinit
067d23c9 30958fi
067d23c9
KY
30959 ;;
30960
30961 esac
30962done # for ac_tag
30963
30964
30965as_fn_exit 0
30966_ACEOF
30967ac_clean_files=$ac_clean_files_save
30968
30969test $ac_write_fail = 0 ||
a9bec17c 30970 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
067d23c9
KY
30971
30972
30973# configure is writing to config.log, and then calls config.status.
30974# config.status does its own redirection, appending to config.log.
30975# Unfortunately, on DOS this fails, as config.log is still kept open
30976# by configure, so config.status won't be able to write to it; its
30977# output is simply discarded. So we exec the FD to /dev/null,
30978# effectively closing config.log, so it can be properly (re)opened and
30979# appended to by config.status. When coming back to configure, we
30980# need to make the FD available again.
30981if test "$no_create" != yes; then
30982 ac_cs_success=:
30983 ac_config_status_args=
30984 test "$silent" = yes &&
30985 ac_config_status_args="$ac_config_status_args --quiet"
30986 exec 5>/dev/null
30987 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
30988 exec 5>>config.log
30989 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
30990 # would make configure fail if this is the last instruction.
a9bec17c 30991 $ac_cs_success || as_fn_exit $?
067d23c9
KY
30992fi
30993if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
30994 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
30995$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
30996fi
30997